@object-ui/plugin-dashboard 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +9 -0
- package/dist/index.js +1279 -1268
- package/dist/index.umd.cjs +5 -5
- package/dist/src/DashboardGridLayout.d.ts.map +1 -1
- package/dist/src/DashboardRenderer.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/DashboardGridLayout.tsx +12 -7
- package/src/DashboardRenderer.tsx +17 -12
- package/src/__tests__/DashboardRenderer.widgetData.test.tsx +261 -0
package/dist/index.js
CHANGED
|
@@ -13,19 +13,19 @@ function Qn() {
|
|
|
13
13
|
if (Dr) return gt;
|
|
14
14
|
Dr = 1;
|
|
15
15
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
16
|
-
function r(n, o,
|
|
16
|
+
function r(n, o, i) {
|
|
17
17
|
var l = null;
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
for (var
|
|
21
|
-
|
|
22
|
-
} else
|
|
23
|
-
return o =
|
|
18
|
+
if (i !== void 0 && (l = "" + i), o.key !== void 0 && (l = "" + o.key), "key" in o) {
|
|
19
|
+
i = {};
|
|
20
|
+
for (var p in o)
|
|
21
|
+
p !== "key" && (i[p] = o[p]);
|
|
22
|
+
} else i = o;
|
|
23
|
+
return o = i.ref, {
|
|
24
24
|
$$typeof: e,
|
|
25
25
|
type: n,
|
|
26
26
|
key: l,
|
|
27
27
|
ref: o !== void 0 ? o : null,
|
|
28
|
-
props:
|
|
28
|
+
props: i
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
return gt.Fragment = t, gt.jsx = r, gt.jsxs = r, gt;
|
|
@@ -34,146 +34,146 @@ var mt = {};
|
|
|
34
34
|
var _r;
|
|
35
35
|
function eo() {
|
|
36
36
|
return _r || (_r = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
37
|
-
function e(
|
|
38
|
-
if (
|
|
39
|
-
if (typeof
|
|
40
|
-
return
|
|
41
|
-
if (typeof
|
|
42
|
-
switch (
|
|
37
|
+
function e(d) {
|
|
38
|
+
if (d == null) return null;
|
|
39
|
+
if (typeof d == "function")
|
|
40
|
+
return d.$$typeof === L ? null : d.displayName || d.name || null;
|
|
41
|
+
if (typeof d == "string") return d;
|
|
42
|
+
switch (d) {
|
|
43
43
|
case a:
|
|
44
44
|
return "Fragment";
|
|
45
45
|
case g:
|
|
46
46
|
return "Profiler";
|
|
47
|
-
case
|
|
47
|
+
case s:
|
|
48
48
|
return "StrictMode";
|
|
49
49
|
case w:
|
|
50
50
|
return "Suspense";
|
|
51
|
-
case
|
|
51
|
+
case f:
|
|
52
52
|
return "SuspenseList";
|
|
53
|
-
case
|
|
53
|
+
case W:
|
|
54
54
|
return "Activity";
|
|
55
55
|
}
|
|
56
|
-
if (typeof
|
|
57
|
-
switch (typeof
|
|
56
|
+
if (typeof d == "object")
|
|
57
|
+
switch (typeof d.tag == "number" && console.error(
|
|
58
58
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
59
|
-
),
|
|
60
|
-
case
|
|
59
|
+
), d.$$typeof) {
|
|
60
|
+
case v:
|
|
61
61
|
return "Portal";
|
|
62
|
-
case
|
|
63
|
-
return
|
|
62
|
+
case R:
|
|
63
|
+
return d.displayName || "Context";
|
|
64
64
|
case b:
|
|
65
|
-
return (
|
|
66
|
-
case
|
|
67
|
-
var _ =
|
|
68
|
-
return
|
|
69
|
-
case
|
|
70
|
-
return _ =
|
|
65
|
+
return (d._context.displayName || "Context") + ".Consumer";
|
|
66
|
+
case u:
|
|
67
|
+
var _ = d.render;
|
|
68
|
+
return d = d.displayName, d || (d = _.displayName || _.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
69
|
+
case y:
|
|
70
|
+
return _ = d.displayName || null, _ !== null ? _ : e(d.type) || "Memo";
|
|
71
71
|
case C:
|
|
72
|
-
_ =
|
|
72
|
+
_ = d._payload, d = d._init;
|
|
73
73
|
try {
|
|
74
|
-
return e(
|
|
74
|
+
return e(d(_));
|
|
75
75
|
} catch {
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
return null;
|
|
79
79
|
}
|
|
80
|
-
function t(
|
|
81
|
-
return "" +
|
|
80
|
+
function t(d) {
|
|
81
|
+
return "" + d;
|
|
82
82
|
}
|
|
83
|
-
function r(
|
|
83
|
+
function r(d) {
|
|
84
84
|
try {
|
|
85
|
-
t(
|
|
85
|
+
t(d);
|
|
86
86
|
var _ = !1;
|
|
87
87
|
} catch {
|
|
88
88
|
_ = !0;
|
|
89
89
|
}
|
|
90
90
|
if (_) {
|
|
91
91
|
_ = console;
|
|
92
|
-
var M = _.error, z = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
92
|
+
var M = _.error, z = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
93
93
|
return M.call(
|
|
94
94
|
_,
|
|
95
95
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
96
96
|
z
|
|
97
|
-
), t(
|
|
97
|
+
), t(d);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
function n(
|
|
101
|
-
if (
|
|
102
|
-
if (typeof
|
|
100
|
+
function n(d) {
|
|
101
|
+
if (d === a) return "<>";
|
|
102
|
+
if (typeof d == "object" && d !== null && d.$$typeof === C)
|
|
103
103
|
return "<...>";
|
|
104
104
|
try {
|
|
105
|
-
var _ = e(
|
|
105
|
+
var _ = e(d);
|
|
106
106
|
return _ ? "<" + _ + ">" : "<...>";
|
|
107
107
|
} catch {
|
|
108
108
|
return "<...>";
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
function o() {
|
|
112
|
-
var
|
|
113
|
-
return
|
|
112
|
+
var d = G.A;
|
|
113
|
+
return d === null ? null : d.getOwner();
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function i() {
|
|
116
116
|
return Error("react-stack-top-frame");
|
|
117
117
|
}
|
|
118
|
-
function l(
|
|
119
|
-
if (k.call(
|
|
120
|
-
var _ = Object.getOwnPropertyDescriptor(
|
|
118
|
+
function l(d) {
|
|
119
|
+
if (k.call(d, "key")) {
|
|
120
|
+
var _ = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
121
121
|
if (_ && _.isReactWarning) return !1;
|
|
122
122
|
}
|
|
123
|
-
return
|
|
123
|
+
return d.key !== void 0;
|
|
124
124
|
}
|
|
125
|
-
function d
|
|
125
|
+
function p(d, _) {
|
|
126
126
|
function M() {
|
|
127
127
|
X || (X = !0, console.error(
|
|
128
128
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
129
129
|
_
|
|
130
130
|
));
|
|
131
131
|
}
|
|
132
|
-
M.isReactWarning = !0, Object.defineProperty(
|
|
132
|
+
M.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
133
133
|
get: M,
|
|
134
134
|
configurable: !0
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
var
|
|
139
|
-
return V[
|
|
137
|
+
function c() {
|
|
138
|
+
var d = e(this.type);
|
|
139
|
+
return V[d] || (V[d] = !0, console.error(
|
|
140
140
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
141
|
-
)),
|
|
141
|
+
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function x(d, _, M, z, F, A) {
|
|
144
144
|
var T = M.ref;
|
|
145
|
-
return
|
|
145
|
+
return d = {
|
|
146
146
|
$$typeof: O,
|
|
147
|
-
type:
|
|
147
|
+
type: d,
|
|
148
148
|
key: _,
|
|
149
149
|
props: M,
|
|
150
150
|
_owner: z
|
|
151
|
-
}, (T !== void 0 ? T : null) !== null ? Object.defineProperty(
|
|
151
|
+
}, (T !== void 0 ? T : null) !== null ? Object.defineProperty(d, "ref", {
|
|
152
152
|
enumerable: !1,
|
|
153
|
-
get:
|
|
154
|
-
}) : Object.defineProperty(
|
|
153
|
+
get: c
|
|
154
|
+
}) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
155
155
|
configurable: !1,
|
|
156
156
|
enumerable: !1,
|
|
157
157
|
writable: !0,
|
|
158
158
|
value: 0
|
|
159
|
-
}), Object.defineProperty(
|
|
159
|
+
}), Object.defineProperty(d, "_debugInfo", {
|
|
160
160
|
configurable: !1,
|
|
161
161
|
enumerable: !1,
|
|
162
162
|
writable: !0,
|
|
163
163
|
value: null
|
|
164
|
-
}), Object.defineProperty(
|
|
164
|
+
}), Object.defineProperty(d, "_debugStack", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
168
|
value: F
|
|
169
|
-
}), Object.defineProperty(
|
|
169
|
+
}), Object.defineProperty(d, "_debugTask", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
writable: !0,
|
|
173
173
|
value: A
|
|
174
|
-
}), Object.freeze && (Object.freeze(
|
|
174
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
175
175
|
}
|
|
176
|
-
function m(
|
|
176
|
+
function m(d, _, M, z, F, A) {
|
|
177
177
|
var T = _.children;
|
|
178
178
|
if (T !== void 0)
|
|
179
179
|
if (z)
|
|
@@ -187,11 +187,11 @@ function eo() {
|
|
|
187
187
|
);
|
|
188
188
|
else h(T);
|
|
189
189
|
if (k.call(_, "key")) {
|
|
190
|
-
T = e(
|
|
191
|
-
var
|
|
192
|
-
return
|
|
190
|
+
T = e(d);
|
|
191
|
+
var q = Object.keys(_).filter(function($) {
|
|
192
|
+
return $ !== "key";
|
|
193
193
|
});
|
|
194
|
-
z = 0 <
|
|
194
|
+
z = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", P[T + z] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
195
195
|
`A props object containing a "key" prop is being spread into JSX:
|
|
196
196
|
let props = %s;
|
|
197
197
|
<%s {...props} />
|
|
@@ -200,7 +200,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
200
200
|
<%s key={someKey} {...props} />`,
|
|
201
201
|
z,
|
|
202
202
|
T,
|
|
203
|
-
|
|
203
|
+
q,
|
|
204
204
|
T
|
|
205
205
|
), P[T + z] = !0);
|
|
206
206
|
}
|
|
@@ -209,11 +209,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
209
|
for (var N in _)
|
|
210
210
|
N !== "key" && (M[N] = _[N]);
|
|
211
211
|
} else M = _;
|
|
212
|
-
return T &&
|
|
212
|
+
return T && p(
|
|
213
213
|
M,
|
|
214
|
-
typeof
|
|
215
|
-
),
|
|
216
|
-
|
|
214
|
+
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
215
|
+
), x(
|
|
216
|
+
d,
|
|
217
217
|
T,
|
|
218
218
|
M,
|
|
219
219
|
o(),
|
|
@@ -221,43 +221,43 @@ React keys must be passed directly to JSX without using spread:
|
|
|
221
221
|
A
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
|
-
function h(
|
|
225
|
-
|
|
224
|
+
function h(d) {
|
|
225
|
+
S(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === C && (d._payload.status === "fulfilled" ? S(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
return typeof
|
|
227
|
+
function S(d) {
|
|
228
|
+
return typeof d == "object" && d !== null && d.$$typeof === O;
|
|
229
229
|
}
|
|
230
|
-
var E = Ee, O = /* @__PURE__ */ Symbol.for("react.transitional.element"),
|
|
230
|
+
var E = Ee, O = /* @__PURE__ */ Symbol.for("react.transitional.element"), v = /* @__PURE__ */ Symbol.for("react.portal"), a = /* @__PURE__ */ Symbol.for("react.fragment"), s = /* @__PURE__ */ Symbol.for("react.strict_mode"), g = /* @__PURE__ */ Symbol.for("react.profiler"), b = /* @__PURE__ */ Symbol.for("react.consumer"), R = /* @__PURE__ */ Symbol.for("react.context"), u = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), f = /* @__PURE__ */ Symbol.for("react.suspense_list"), y = /* @__PURE__ */ Symbol.for("react.memo"), C = /* @__PURE__ */ Symbol.for("react.lazy"), W = /* @__PURE__ */ Symbol.for("react.activity"), L = /* @__PURE__ */ Symbol.for("react.client.reference"), G = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, k = Object.prototype.hasOwnProperty, H = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
231
231
|
return null;
|
|
232
232
|
};
|
|
233
233
|
E = {
|
|
234
|
-
react_stack_bottom_frame: function(
|
|
235
|
-
return
|
|
234
|
+
react_stack_bottom_frame: function(d) {
|
|
235
|
+
return d();
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
238
|
var X, V = {}, ie = E.react_stack_bottom_frame.bind(
|
|
239
239
|
E,
|
|
240
|
-
|
|
241
|
-
)(), me = J(n(
|
|
242
|
-
mt.Fragment = a, mt.jsx = function(
|
|
240
|
+
i
|
|
241
|
+
)(), me = J(n(i)), P = {};
|
|
242
|
+
mt.Fragment = a, mt.jsx = function(d, _, M) {
|
|
243
243
|
var z = 1e4 > G.recentlyCreatedOwnerStacks++;
|
|
244
244
|
return m(
|
|
245
|
-
|
|
245
|
+
d,
|
|
246
246
|
_,
|
|
247
247
|
M,
|
|
248
248
|
!1,
|
|
249
249
|
z ? Error("react-stack-top-frame") : ie,
|
|
250
|
-
z ? J(n(
|
|
250
|
+
z ? J(n(d)) : me
|
|
251
251
|
);
|
|
252
|
-
}, mt.jsxs = function(
|
|
252
|
+
}, mt.jsxs = function(d, _, M) {
|
|
253
253
|
var z = 1e4 > G.recentlyCreatedOwnerStacks++;
|
|
254
254
|
return m(
|
|
255
|
-
|
|
255
|
+
d,
|
|
256
256
|
_,
|
|
257
257
|
M,
|
|
258
258
|
!0,
|
|
259
259
|
z ? Error("react-stack-top-frame") : ie,
|
|
260
|
-
z ? J(n(
|
|
260
|
+
z ? J(n(d)) : me
|
|
261
261
|
);
|
|
262
262
|
};
|
|
263
263
|
})()), mt;
|
|
@@ -274,50 +274,54 @@ const ro = [
|
|
|
274
274
|
"hsl(var(--chart-4))",
|
|
275
275
|
"hsl(var(--chart-5))"
|
|
276
276
|
], yn = Un(
|
|
277
|
-
({ schema: e, className: t, dataSource: r, onRefresh: n, ...o },
|
|
278
|
-
const l = e.columns || 4,
|
|
277
|
+
({ schema: e, className: t, dataSource: r, onRefresh: n, ...o }, i) => {
|
|
278
|
+
const l = e.columns || 4, p = e.gap || 4, [c, x] = Re(!1), [m, h] = Re(!1), S = ne(null);
|
|
279
279
|
We(() => {
|
|
280
280
|
const a = () => h(window.innerWidth < 640);
|
|
281
281
|
return a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
|
|
282
282
|
}, []);
|
|
283
283
|
const E = fe(() => {
|
|
284
|
-
n && (
|
|
284
|
+
n && (x(!0), n(), setTimeout(() => x(!1), 600));
|
|
285
285
|
}, [n]);
|
|
286
286
|
We(() => {
|
|
287
287
|
if (!(!e.refreshInterval || e.refreshInterval <= 0 || !n))
|
|
288
|
-
return
|
|
289
|
-
|
|
288
|
+
return S.current = setInterval(E, e.refreshInterval * 1e3), () => {
|
|
289
|
+
S.current && clearInterval(S.current);
|
|
290
290
|
};
|
|
291
291
|
}, [e.refreshInterval, n, E]);
|
|
292
|
-
const O = (a) => {
|
|
293
|
-
const
|
|
292
|
+
const O = (a, s) => {
|
|
293
|
+
const b = (() => {
|
|
294
294
|
if (a.component) return a.component;
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
const
|
|
295
|
+
const w = a.type, f = a.options || {};
|
|
296
|
+
if (w === "bar" || w === "line" || w === "area" || w === "pie" || w === "donut") {
|
|
297
|
+
const y = a.data || f.data, C = Array.isArray(y) ? y : y?.items || [], W = f.xField || "name", L = f.yField || "value";
|
|
298
298
|
return {
|
|
299
299
|
type: "chart",
|
|
300
|
-
chartType:
|
|
301
|
-
data:
|
|
302
|
-
xAxisKey:
|
|
303
|
-
series: [{ dataKey:
|
|
300
|
+
chartType: w,
|
|
301
|
+
data: C,
|
|
302
|
+
xAxisKey: W,
|
|
303
|
+
series: [{ dataKey: L }],
|
|
304
304
|
colors: ro,
|
|
305
305
|
className: "h-[200px] sm:h-[250px] md:h-[300px]"
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
308
|
+
if (w === "table") {
|
|
309
|
+
const y = a.data || f.data;
|
|
310
|
+
return {
|
|
311
|
+
type: "data-table",
|
|
312
|
+
...f,
|
|
313
|
+
data: y?.items || [],
|
|
314
|
+
searchable: !1,
|
|
315
|
+
pagination: !1,
|
|
316
|
+
className: "border-0"
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
return {
|
|
316
320
|
...a,
|
|
317
|
-
...
|
|
321
|
+
...f
|
|
318
322
|
};
|
|
319
|
-
})()
|
|
320
|
-
return
|
|
323
|
+
})(), R = a.type === "metric", u = a.id || a.title || `widget-${s}`;
|
|
324
|
+
return R ? /* @__PURE__ */ j.jsx(
|
|
321
325
|
"div",
|
|
322
326
|
{
|
|
323
327
|
className: _e("h-full w-full", m && "w-[85vw] shrink-0 snap-center"),
|
|
@@ -325,9 +329,9 @@ const ro = [
|
|
|
325
329
|
gridColumn: `span ${a.layout.w}`,
|
|
326
330
|
gridRow: `span ${a.layout.h}`
|
|
327
331
|
} : void 0,
|
|
328
|
-
children: /* @__PURE__ */ j.jsx($t, { schema:
|
|
332
|
+
children: /* @__PURE__ */ j.jsx($t, { schema: b, className: "h-full w-full" })
|
|
329
333
|
},
|
|
330
|
-
|
|
334
|
+
u
|
|
331
335
|
) : /* @__PURE__ */ j.jsxs(
|
|
332
336
|
Ft,
|
|
333
337
|
{
|
|
@@ -342,39 +346,39 @@ const ro = [
|
|
|
342
346
|
} : void 0,
|
|
343
347
|
children: [
|
|
344
348
|
a.title && /* @__PURE__ */ j.jsx(Xt, { className: "pb-2 border-b border-border/40 bg-muted/20 px-3 sm:px-6", children: /* @__PURE__ */ j.jsx(Ut, { className: "text-sm sm:text-base font-medium tracking-tight truncate", title: a.title, children: a.title }) }),
|
|
345
|
-
/* @__PURE__ */ j.jsx(Gt, { className: "p-0", children: /* @__PURE__ */ j.jsx("div", { className: _e("h-full w-full", "p-3 sm:p-4 md:p-6"), children: /* @__PURE__ */ j.jsx($t, { schema:
|
|
349
|
+
/* @__PURE__ */ j.jsx(Gt, { className: "p-0", children: /* @__PURE__ */ j.jsx("div", { className: _e("h-full w-full", "p-3 sm:p-4 md:p-6"), children: /* @__PURE__ */ j.jsx($t, { schema: b }) }) })
|
|
346
350
|
]
|
|
347
351
|
},
|
|
348
|
-
|
|
352
|
+
u
|
|
349
353
|
);
|
|
350
|
-
},
|
|
354
|
+
}, v = n && /* @__PURE__ */ j.jsx("div", { className: _e(m ? "flex justify-end mb-2" : "col-span-full flex justify-end mb-2"), children: /* @__PURE__ */ j.jsxs(
|
|
351
355
|
lt,
|
|
352
356
|
{
|
|
353
357
|
variant: "outline",
|
|
354
358
|
size: "sm",
|
|
355
359
|
onClick: E,
|
|
356
|
-
disabled:
|
|
360
|
+
disabled: c,
|
|
357
361
|
"aria-label": "Refresh dashboard",
|
|
358
362
|
children: [
|
|
359
|
-
/* @__PURE__ */ j.jsx(dn, { className: _e("h-4 w-4 mr-2",
|
|
360
|
-
|
|
363
|
+
/* @__PURE__ */ j.jsx(dn, { className: _e("h-4 w-4 mr-2", c && "animate-spin") }),
|
|
364
|
+
c ? "Refreshing…" : "Refresh All"
|
|
361
365
|
]
|
|
362
366
|
}
|
|
363
367
|
) });
|
|
364
|
-
return m ? /* @__PURE__ */ j.jsxs("div", { ref:
|
|
365
|
-
|
|
368
|
+
return m ? /* @__PURE__ */ j.jsxs("div", { ref: i, className: _e("flex flex-col", t), ...o, children: [
|
|
369
|
+
v,
|
|
366
370
|
/* @__PURE__ */ j.jsx(
|
|
367
371
|
"div",
|
|
368
372
|
{
|
|
369
373
|
className: "flex overflow-x-auto snap-x snap-mandatory gap-3 pb-4 [-webkit-overflow-scrolling:touch]",
|
|
370
374
|
style: { scrollPaddingLeft: "0.75rem" },
|
|
371
|
-
children: e.widgets?.map((a) => O(a))
|
|
375
|
+
children: e.widgets?.map((a, s) => O(a, s))
|
|
372
376
|
}
|
|
373
377
|
)
|
|
374
378
|
] }) : /* @__PURE__ */ j.jsxs(
|
|
375
379
|
"div",
|
|
376
380
|
{
|
|
377
|
-
ref:
|
|
381
|
+
ref: i,
|
|
378
382
|
className: _e(
|
|
379
383
|
"grid auto-rows-min",
|
|
380
384
|
"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
@@ -382,12 +386,12 @@ const ro = [
|
|
|
382
386
|
),
|
|
383
387
|
style: {
|
|
384
388
|
...l > 4 && { gridTemplateColumns: `repeat(${l}, minmax(0, 1fr))` },
|
|
385
|
-
gap: `${
|
|
389
|
+
gap: `${p * 0.25}rem`
|
|
386
390
|
},
|
|
387
391
|
...o,
|
|
388
392
|
children: [
|
|
389
|
-
|
|
390
|
-
e.widgets?.map((a) => O(a))
|
|
393
|
+
v,
|
|
394
|
+
e.widgets?.map((a, s) => O(a, s))
|
|
391
395
|
]
|
|
392
396
|
}
|
|
393
397
|
);
|
|
@@ -402,43 +406,43 @@ function ut(e, t, r) {
|
|
|
402
406
|
t * e + Math.max(0, e - 1) * r
|
|
403
407
|
) : e;
|
|
404
408
|
}
|
|
405
|
-
function yt(e, t, r, n, o,
|
|
406
|
-
const { margin:
|
|
407
|
-
let h,
|
|
408
|
-
if (l ? (h = Math.round(l.width),
|
|
409
|
+
function yt(e, t, r, n, o, i, l) {
|
|
410
|
+
const { margin: p, containerPadding: c, rowHeight: x } = e, m = ft(e);
|
|
411
|
+
let h, S, E, O;
|
|
412
|
+
if (l ? (h = Math.round(l.width), S = Math.round(l.height)) : (h = ut(n, m, p[0]), S = ut(o, x, p[1])), i ? (E = Math.round(i.top), O = Math.round(i.left)) : l ? (E = Math.round(l.top), O = Math.round(l.left)) : (E = Math.round((x + p[1]) * r + c[1]), O = Math.round((m + p[0]) * t + c[0])), !i && !l) {
|
|
409
413
|
if (Number.isFinite(n)) {
|
|
410
414
|
const a = Math.round(
|
|
411
|
-
(m +
|
|
415
|
+
(m + p[0]) * (t + n) + c[0]
|
|
412
416
|
) - O - h;
|
|
413
|
-
a !==
|
|
417
|
+
a !== p[0] && (h += a - p[0]);
|
|
414
418
|
}
|
|
415
419
|
if (Number.isFinite(o)) {
|
|
416
420
|
const a = Math.round(
|
|
417
|
-
(
|
|
418
|
-
) - E -
|
|
419
|
-
a !==
|
|
421
|
+
(x + p[1]) * (r + o) + c[1]
|
|
422
|
+
) - E - S;
|
|
423
|
+
a !== p[1] && (S += a - p[1]);
|
|
420
424
|
}
|
|
421
425
|
}
|
|
422
|
-
return { top: E, left: O, width: h, height:
|
|
426
|
+
return { top: E, left: O, width: h, height: S };
|
|
423
427
|
}
|
|
424
428
|
function no(e, t, r, n, o) {
|
|
425
|
-
const { margin:
|
|
426
|
-
let h = Math.round((r - l[0]) / (m +
|
|
427
|
-
return h = Ht(h, 0,
|
|
429
|
+
const { margin: i, containerPadding: l, cols: p, rowHeight: c, maxRows: x } = e, m = ft(e);
|
|
430
|
+
let h = Math.round((r - l[0]) / (m + i[0])), S = Math.round((t - l[1]) / (c + i[1]));
|
|
431
|
+
return h = Ht(h, 0, p - n), S = Ht(S, 0, x - o), { x: h, y: S };
|
|
428
432
|
}
|
|
429
433
|
function Nt(e, t, r) {
|
|
430
|
-
const { margin: n, containerPadding: o, rowHeight:
|
|
431
|
-
return { x:
|
|
434
|
+
const { margin: n, containerPadding: o, rowHeight: i } = e, l = ft(e), p = Math.round((r - o[0]) / (l + n[0])), c = Math.round((t - o[1]) / (i + n[1]));
|
|
435
|
+
return { x: p, y: c };
|
|
432
436
|
}
|
|
433
437
|
function oo(e, t, r) {
|
|
434
|
-
const { margin: n, rowHeight: o } = e,
|
|
438
|
+
const { margin: n, rowHeight: o } = e, i = ft(e), l = Math.max(
|
|
435
439
|
1,
|
|
436
|
-
Math.round((t + n[0]) / (
|
|
437
|
-
),
|
|
440
|
+
Math.round((t + n[0]) / (i + n[0]))
|
|
441
|
+
), p = Math.max(
|
|
438
442
|
1,
|
|
439
443
|
Math.round((r + n[1]) / (o + n[1]))
|
|
440
444
|
);
|
|
441
|
-
return { w: l, h:
|
|
445
|
+
return { w: l, h: p };
|
|
442
446
|
}
|
|
443
447
|
function Ht(e, t, r) {
|
|
444
448
|
return Math.max(Math.min(e, r), t);
|
|
@@ -539,68 +543,68 @@ function yr(e, t) {
|
|
|
539
543
|
}
|
|
540
544
|
return e;
|
|
541
545
|
}
|
|
542
|
-
function tt(e, t, r, n, o,
|
|
546
|
+
function tt(e, t, r, n, o, i, l, p, c) {
|
|
543
547
|
if (t.static && t.isDraggable !== !0)
|
|
544
548
|
return [...e];
|
|
545
549
|
if (t.y === n && t.x === r)
|
|
546
550
|
return [...e];
|
|
547
|
-
const
|
|
551
|
+
const x = t.x, m = t.y;
|
|
548
552
|
typeof r == "number" && (t.x = r), typeof n == "number" && (t.y = n), t.moved = !0;
|
|
549
553
|
let h = ao(e, l);
|
|
550
|
-
(l === "vertical" && typeof n == "number" ? m >= n : l === "horizontal" && typeof r == "number" &&
|
|
554
|
+
(l === "vertical" && typeof n == "number" ? m >= n : l === "horizontal" && typeof r == "number" && x >= r) && (h = h.reverse());
|
|
551
555
|
const E = vn(h, t), O = E.length > 0;
|
|
552
|
-
if (O &&
|
|
556
|
+
if (O && c)
|
|
553
557
|
return Qe(e);
|
|
554
|
-
if (O &&
|
|
555
|
-
return t.x =
|
|
556
|
-
let
|
|
558
|
+
if (O && i)
|
|
559
|
+
return t.x = x, t.y = m, t.moved = !1, e;
|
|
560
|
+
let v = [...e];
|
|
557
561
|
for (let a = 0; a < E.length; a++) {
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
+
const s = E[a];
|
|
563
|
+
s !== void 0 && (s.moved || (s.static ? v = Tr(
|
|
564
|
+
v,
|
|
565
|
+
s,
|
|
562
566
|
t,
|
|
563
567
|
o,
|
|
564
568
|
l
|
|
565
|
-
) :
|
|
566
|
-
|
|
569
|
+
) : v = Tr(
|
|
570
|
+
v,
|
|
567
571
|
t,
|
|
568
|
-
|
|
572
|
+
s,
|
|
569
573
|
o,
|
|
570
574
|
l
|
|
571
575
|
)));
|
|
572
576
|
}
|
|
573
|
-
return
|
|
577
|
+
return v;
|
|
574
578
|
}
|
|
575
|
-
function Tr(e, t, r, n, o,
|
|
576
|
-
const l = o === "horizontal",
|
|
579
|
+
function Tr(e, t, r, n, o, i) {
|
|
580
|
+
const l = o === "horizontal", p = o === "vertical", c = t.static;
|
|
577
581
|
if (n) {
|
|
578
582
|
n = !1;
|
|
579
583
|
const h = {
|
|
580
584
|
x: l ? Math.max(t.x - r.w, 0) : r.x,
|
|
581
|
-
y:
|
|
585
|
+
y: p ? Math.max(t.y - r.h, 0) : r.y,
|
|
582
586
|
w: r.w,
|
|
583
587
|
h: r.h,
|
|
584
588
|
i: "-1"
|
|
585
|
-
},
|
|
586
|
-
if (!
|
|
589
|
+
}, S = rt(e, h), E = S !== void 0 && S.y + S.h > t.y, O = S !== void 0 && t.x + t.w > S.x;
|
|
590
|
+
if (!S)
|
|
587
591
|
return tt(
|
|
588
592
|
e,
|
|
589
593
|
r,
|
|
590
594
|
l ? h.x : void 0,
|
|
591
|
-
|
|
595
|
+
p ? h.y : void 0,
|
|
592
596
|
n,
|
|
593
|
-
|
|
597
|
+
c,
|
|
594
598
|
o
|
|
595
599
|
);
|
|
596
|
-
if (E &&
|
|
600
|
+
if (E && p)
|
|
597
601
|
return tt(
|
|
598
602
|
e,
|
|
599
603
|
r,
|
|
600
604
|
void 0,
|
|
601
605
|
r.y + 1,
|
|
602
606
|
n,
|
|
603
|
-
|
|
607
|
+
c,
|
|
604
608
|
o
|
|
605
609
|
);
|
|
606
610
|
if (E && o === null)
|
|
@@ -612,18 +616,18 @@ function Tr(e, t, r, n, o, s) {
|
|
|
612
616
|
r.x,
|
|
613
617
|
void 0,
|
|
614
618
|
n,
|
|
615
|
-
|
|
619
|
+
c,
|
|
616
620
|
o
|
|
617
621
|
);
|
|
618
622
|
}
|
|
619
|
-
const
|
|
620
|
-
return
|
|
623
|
+
const x = l ? r.x + 1 : void 0, m = p ? r.y + 1 : void 0;
|
|
624
|
+
return x === void 0 && m === void 0 ? [...e] : tt(
|
|
621
625
|
e,
|
|
622
626
|
r,
|
|
623
|
-
|
|
627
|
+
x,
|
|
624
628
|
m,
|
|
625
629
|
n,
|
|
626
|
-
|
|
630
|
+
c,
|
|
627
631
|
o
|
|
628
632
|
);
|
|
629
633
|
}
|
|
@@ -638,11 +642,11 @@ var lo = {
|
|
|
638
642
|
y: ct(r, 0, Math.max(0, o - e.h))
|
|
639
643
|
};
|
|
640
644
|
},
|
|
641
|
-
constrainSize(e, t, r, n, { cols: o, maxRows:
|
|
642
|
-
const l = n === "w" || n === "nw" || n === "sw" ? e.x + e.w : o - e.x,
|
|
645
|
+
constrainSize(e, t, r, n, { cols: o, maxRows: i }) {
|
|
646
|
+
const l = n === "w" || n === "nw" || n === "sw" ? e.x + e.w : o - e.x, p = n === "n" || n === "nw" || n === "ne" ? e.y + e.h : i - e.y;
|
|
643
647
|
return {
|
|
644
648
|
w: ct(t, 1, Math.max(1, l)),
|
|
645
|
-
h: ct(r, 1, Math.max(1,
|
|
649
|
+
h: ct(r, 1, Math.max(1, p))
|
|
646
650
|
};
|
|
647
651
|
}
|
|
648
652
|
}, co = {
|
|
@@ -655,37 +659,37 @@ var lo = {
|
|
|
655
659
|
}
|
|
656
660
|
}, xn = [lo, co];
|
|
657
661
|
function kt(e, t, r, n, o) {
|
|
658
|
-
let
|
|
662
|
+
let i = { x: r, y: n };
|
|
659
663
|
for (const l of e)
|
|
660
|
-
l.constrainPosition && (
|
|
664
|
+
l.constrainPosition && (i = l.constrainPosition(t, i.x, i.y, o));
|
|
661
665
|
if (t.constraints)
|
|
662
666
|
for (const l of t.constraints)
|
|
663
|
-
l.constrainPosition && (
|
|
667
|
+
l.constrainPosition && (i = l.constrainPosition(
|
|
664
668
|
t,
|
|
665
|
-
|
|
666
|
-
|
|
669
|
+
i.x,
|
|
670
|
+
i.y,
|
|
667
671
|
o
|
|
668
672
|
));
|
|
669
|
-
return
|
|
673
|
+
return i;
|
|
670
674
|
}
|
|
671
|
-
function uo(e, t, r, n, o,
|
|
675
|
+
function uo(e, t, r, n, o, i) {
|
|
672
676
|
let l = { w: r, h: n };
|
|
673
|
-
for (const
|
|
674
|
-
|
|
677
|
+
for (const p of e)
|
|
678
|
+
p.constrainSize && (l = p.constrainSize(
|
|
675
679
|
t,
|
|
676
680
|
l.w,
|
|
677
681
|
l.h,
|
|
678
682
|
o,
|
|
679
|
-
|
|
683
|
+
i
|
|
680
684
|
));
|
|
681
685
|
if (t.constraints)
|
|
682
|
-
for (const
|
|
683
|
-
|
|
686
|
+
for (const p of t.constraints)
|
|
687
|
+
p.constrainSize && (l = p.constrainSize(
|
|
684
688
|
t,
|
|
685
689
|
l.w,
|
|
686
690
|
l.h,
|
|
687
691
|
o,
|
|
688
|
-
|
|
692
|
+
i
|
|
689
693
|
));
|
|
690
694
|
return l;
|
|
691
695
|
}
|
|
@@ -737,18 +741,18 @@ function Yt(e) {
|
|
|
737
741
|
return Math.max(0, e);
|
|
738
742
|
}
|
|
739
743
|
var vr = (e, t, r) => {
|
|
740
|
-
const { left: n, height: o, width:
|
|
744
|
+
const { left: n, height: o, width: i } = t, l = e.top - (o - e.height);
|
|
741
745
|
return {
|
|
742
746
|
left: n,
|
|
743
|
-
width:
|
|
747
|
+
width: i,
|
|
744
748
|
height: Sn(l, e.height, o),
|
|
745
749
|
top: Yt(l)
|
|
746
750
|
};
|
|
747
751
|
}, br = (e, t, r) => {
|
|
748
|
-
const { top: n, left: o, height:
|
|
752
|
+
const { top: n, left: o, height: i, width: l } = t;
|
|
749
753
|
return {
|
|
750
754
|
top: n,
|
|
751
|
-
height:
|
|
755
|
+
height: i,
|
|
752
756
|
width: po(
|
|
753
757
|
e.left,
|
|
754
758
|
e.width,
|
|
@@ -758,7 +762,7 @@ var vr = (e, t, r) => {
|
|
|
758
762
|
left: ho(o)
|
|
759
763
|
};
|
|
760
764
|
}, xr = (e, t, r) => {
|
|
761
|
-
const { top: n, height: o, width:
|
|
765
|
+
const { top: n, height: o, width: i } = t, l = e.left + e.width - i;
|
|
762
766
|
return l < 0 ? {
|
|
763
767
|
height: o,
|
|
764
768
|
width: e.left + e.width,
|
|
@@ -766,16 +770,16 @@ var vr = (e, t, r) => {
|
|
|
766
770
|
left: 0
|
|
767
771
|
} : {
|
|
768
772
|
height: o,
|
|
769
|
-
width:
|
|
773
|
+
width: i,
|
|
770
774
|
top: Yt(n),
|
|
771
775
|
left: l
|
|
772
776
|
};
|
|
773
777
|
}, wr = (e, t, r) => {
|
|
774
|
-
const { top: n, left: o, height:
|
|
778
|
+
const { top: n, left: o, height: i, width: l } = t;
|
|
775
779
|
return {
|
|
776
780
|
width: l,
|
|
777
781
|
left: o,
|
|
778
|
-
height: Sn(n, e.height,
|
|
782
|
+
height: Sn(n, e.height, i),
|
|
779
783
|
top: Yt(n)
|
|
780
784
|
};
|
|
781
785
|
}, go = (e, t, r) => vr(
|
|
@@ -828,19 +832,19 @@ var wo = {
|
|
|
828
832
|
defaultItem: { w: 1, h: 1 }
|
|
829
833
|
};
|
|
830
834
|
function Sr(e, t, r, n, o) {
|
|
831
|
-
const
|
|
835
|
+
const i = n === "x" ? "w" : "h";
|
|
832
836
|
t[n] += 1;
|
|
833
|
-
const l = e.findIndex((
|
|
834
|
-
for (let
|
|
835
|
-
const
|
|
836
|
-
if (
|
|
837
|
-
if (!
|
|
838
|
-
mr(t,
|
|
837
|
+
const l = e.findIndex((c) => c.i === t.i), p = o ?? Jt(e).length > 0;
|
|
838
|
+
for (let c = l + 1; c < e.length; c++) {
|
|
839
|
+
const x = e[c];
|
|
840
|
+
if (x !== void 0 && !x.static) {
|
|
841
|
+
if (!p && x.y > t.y + t.h) break;
|
|
842
|
+
mr(t, x) && Sr(
|
|
839
843
|
e,
|
|
840
|
-
|
|
841
|
-
r + t[
|
|
844
|
+
x,
|
|
845
|
+
r + t[i],
|
|
842
846
|
n,
|
|
843
|
-
|
|
847
|
+
p
|
|
844
848
|
);
|
|
845
849
|
}
|
|
846
850
|
}
|
|
@@ -870,29 +874,29 @@ var Rn = {
|
|
|
870
874
|
compact(e, t) {
|
|
871
875
|
const r = Jt(e);
|
|
872
876
|
let n = Vt(r);
|
|
873
|
-
const o = hr(e),
|
|
877
|
+
const o = hr(e), i = new Array(e.length);
|
|
874
878
|
for (let l = 0; l < o.length; l++) {
|
|
875
|
-
const
|
|
876
|
-
if (
|
|
877
|
-
let
|
|
878
|
-
|
|
879
|
-
const
|
|
880
|
-
|
|
879
|
+
const p = o[l];
|
|
880
|
+
if (p === void 0) continue;
|
|
881
|
+
let c = nt(p);
|
|
882
|
+
c.static || (c = Oo(r, c, o, n), n = Math.max(n, c.y + c.h), r.push(c));
|
|
883
|
+
const x = e.indexOf(p);
|
|
884
|
+
i[x] = c, c.moved = !1;
|
|
881
885
|
}
|
|
882
|
-
return
|
|
886
|
+
return i;
|
|
883
887
|
}
|
|
884
888
|
}, En = {
|
|
885
889
|
type: "horizontal",
|
|
886
890
|
allowOverlap: !1,
|
|
887
891
|
compact(e, t) {
|
|
888
892
|
const r = Jt(e), n = bn(e), o = new Array(e.length);
|
|
889
|
-
for (let
|
|
890
|
-
const l = n[
|
|
893
|
+
for (let i = 0; i < n.length; i++) {
|
|
894
|
+
const l = n[i];
|
|
891
895
|
if (l === void 0) continue;
|
|
892
|
-
let
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
o[
|
|
896
|
+
let p = nt(l);
|
|
897
|
+
p.static || (p = Do(r, p, t, n), r.push(p));
|
|
898
|
+
const c = e.indexOf(l);
|
|
899
|
+
o[c] = p, p.moved = !1;
|
|
896
900
|
}
|
|
897
901
|
return o;
|
|
898
902
|
}
|
|
@@ -931,10 +935,10 @@ function Mr(e, t) {
|
|
|
931
935
|
if (n === void 0)
|
|
932
936
|
throw new Error("No breakpoints defined");
|
|
933
937
|
for (let o = 1; o < r.length; o++) {
|
|
934
|
-
const
|
|
935
|
-
if (
|
|
936
|
-
const l = e[
|
|
937
|
-
t > l && (n =
|
|
938
|
+
const i = r[o];
|
|
939
|
+
if (i === void 0) continue;
|
|
940
|
+
const l = e[i];
|
|
941
|
+
t > l && (n = i);
|
|
938
942
|
}
|
|
939
943
|
return n;
|
|
940
944
|
}
|
|
@@ -946,25 +950,25 @@ function Nr(e, t) {
|
|
|
946
950
|
);
|
|
947
951
|
return r;
|
|
948
952
|
}
|
|
949
|
-
function ar(e, t, r, n, o,
|
|
953
|
+
function ar(e, t, r, n, o, i) {
|
|
950
954
|
const l = e[r];
|
|
951
955
|
if (l)
|
|
952
956
|
return Qe(l);
|
|
953
|
-
let
|
|
954
|
-
const
|
|
955
|
-
|
|
957
|
+
let p = e[n];
|
|
958
|
+
const c = Cn(t), x = c.slice(
|
|
959
|
+
c.indexOf(r)
|
|
956
960
|
);
|
|
957
|
-
for (let E = 0; E <
|
|
958
|
-
const O =
|
|
961
|
+
for (let E = 0; E < x.length; E++) {
|
|
962
|
+
const O = x[E];
|
|
959
963
|
if (O === void 0) continue;
|
|
960
|
-
const
|
|
961
|
-
if (
|
|
962
|
-
|
|
964
|
+
const v = e[O];
|
|
965
|
+
if (v) {
|
|
966
|
+
p = v;
|
|
963
967
|
break;
|
|
964
968
|
}
|
|
965
969
|
}
|
|
966
|
-
const m = Qe(
|
|
967
|
-
return (typeof
|
|
970
|
+
const m = Qe(p || []), h = yr(m, { cols: o });
|
|
971
|
+
return (typeof i == "object" && i !== null ? i : Rr(i)).compact(h, o);
|
|
968
972
|
}
|
|
969
973
|
function At(e, t) {
|
|
970
974
|
if (Array.isArray(e))
|
|
@@ -973,28 +977,28 @@ function At(e, t) {
|
|
|
973
977
|
if (n !== void 0)
|
|
974
978
|
return n;
|
|
975
979
|
const o = Object.keys(r);
|
|
976
|
-
for (const
|
|
977
|
-
const l = r[
|
|
980
|
+
for (const i of o) {
|
|
981
|
+
const l = r[i];
|
|
978
982
|
if (l !== void 0)
|
|
979
983
|
return l;
|
|
980
984
|
}
|
|
981
985
|
return [10, 10];
|
|
982
986
|
}
|
|
983
987
|
function On(e) {
|
|
984
|
-
return function(r, n, o,
|
|
985
|
-
return e(r, n,
|
|
988
|
+
return function(r, n, o, i, l, p, c) {
|
|
989
|
+
return e(r, n, c);
|
|
986
990
|
};
|
|
987
991
|
}
|
|
988
992
|
function Kt(e) {
|
|
989
|
-
return function(r, n, o,
|
|
993
|
+
return function(r, n, o, i) {
|
|
990
994
|
if (!r || !n || typeof r != "object" || typeof n != "object")
|
|
991
|
-
return e(r, n, o,
|
|
992
|
-
var l =
|
|
993
|
-
if (l &&
|
|
994
|
-
return l === n &&
|
|
995
|
-
|
|
996
|
-
var
|
|
997
|
-
return
|
|
995
|
+
return e(r, n, o, i);
|
|
996
|
+
var l = i.get(r), p = i.get(n);
|
|
997
|
+
if (l && p)
|
|
998
|
+
return l === n && p === r;
|
|
999
|
+
i.set(r, n), i.set(n, r);
|
|
1000
|
+
var c = e(r, n, o, i);
|
|
1001
|
+
return i.delete(r), i.delete(n), c;
|
|
998
1002
|
};
|
|
999
1003
|
}
|
|
1000
1004
|
function Dn(e, t) {
|
|
@@ -1016,21 +1020,21 @@ function Zt(e, t) {
|
|
|
1016
1020
|
}
|
|
1017
1021
|
var zo = "[object Arguments]", Mo = "[object Boolean]", No = "[object Date]", ko = "[object RegExp]", Ao = "[object Map]", Io = "[object Number]", Lo = "[object Object]", Wo = "[object Set]", qo = "[object String]", Ir = Object.prototype.toString;
|
|
1018
1022
|
function Qt(e) {
|
|
1019
|
-
var t = e.areArraysEqual, r = e.areDatesEqual, n = e.areMapsEqual, o = e.areObjectsEqual,
|
|
1020
|
-
function
|
|
1023
|
+
var t = e.areArraysEqual, r = e.areDatesEqual, n = e.areMapsEqual, o = e.areObjectsEqual, i = e.areRegExpsEqual, l = e.areSetsEqual, p = e.createIsNestedEqual, c = p(x);
|
|
1024
|
+
function x(m, h, S) {
|
|
1021
1025
|
if (m === h)
|
|
1022
1026
|
return !0;
|
|
1023
1027
|
if (!m || !h || typeof m != "object" || typeof h != "object")
|
|
1024
1028
|
return m !== m && h !== h;
|
|
1025
1029
|
if (kr(m) && kr(h))
|
|
1026
|
-
return o(m, h,
|
|
1030
|
+
return o(m, h, c, S);
|
|
1027
1031
|
var E = Array.isArray(m), O = Array.isArray(h);
|
|
1028
1032
|
if (E || O)
|
|
1029
|
-
return E === O && t(m, h,
|
|
1030
|
-
var
|
|
1031
|
-
return
|
|
1033
|
+
return E === O && t(m, h, c, S);
|
|
1034
|
+
var v = Ir.call(m);
|
|
1035
|
+
return v !== Ir.call(h) ? !1 : v === No ? r(m, h, c, S) : v === ko ? i(m, h, c, S) : v === Ao ? n(m, h, c, S) : v === Wo ? l(m, h, c, S) : v === Lo || v === zo ? Ar(m) || Ar(h) ? !1 : o(m, h, c, S) : v === Mo || v === Io || v === qo ? Zt(m.valueOf(), h.valueOf()) : !1;
|
|
1032
1036
|
}
|
|
1033
|
-
return
|
|
1037
|
+
return x;
|
|
1034
1038
|
}
|
|
1035
1039
|
function _n(e, t, r, n) {
|
|
1036
1040
|
var o = e.length;
|
|
@@ -1051,25 +1055,25 @@ function Tn(e, t, r, n) {
|
|
|
1051
1055
|
return !1;
|
|
1052
1056
|
if (!e.size)
|
|
1053
1057
|
return !0;
|
|
1054
|
-
var
|
|
1055
|
-
return e.forEach(function(
|
|
1058
|
+
var i = {}, l = 0;
|
|
1059
|
+
return e.forEach(function(p, c) {
|
|
1056
1060
|
if (o) {
|
|
1057
|
-
var
|
|
1058
|
-
t.forEach(function(h,
|
|
1059
|
-
!
|
|
1060
|
-
}), l++, o =
|
|
1061
|
+
var x = !1, m = 0;
|
|
1062
|
+
t.forEach(function(h, S) {
|
|
1063
|
+
!x && !i[m] && (x = r(c, S, l, m, e, t, n) && r(p, h, c, S, e, t, n)) && (i[m] = !0), m++;
|
|
1064
|
+
}), l++, o = x;
|
|
1061
1065
|
}
|
|
1062
1066
|
}), o;
|
|
1063
1067
|
}
|
|
1064
1068
|
var Ho = Kt(Tn), Yo = "_owner", Bo = Object.prototype.hasOwnProperty;
|
|
1065
1069
|
function zn(e, t, r, n) {
|
|
1066
|
-
var o = Object.keys(e),
|
|
1067
|
-
if (Object.keys(t).length !==
|
|
1070
|
+
var o = Object.keys(e), i = o.length;
|
|
1071
|
+
if (Object.keys(t).length !== i)
|
|
1068
1072
|
return !1;
|
|
1069
|
-
for (var l;
|
|
1070
|
-
if (l = o[
|
|
1071
|
-
var
|
|
1072
|
-
if ((
|
|
1073
|
+
for (var l; i-- > 0; ) {
|
|
1074
|
+
if (l = o[i], l === Yo) {
|
|
1075
|
+
var p = !!e.$$typeof, c = !!t.$$typeof;
|
|
1076
|
+
if ((p || c) && p !== c)
|
|
1073
1077
|
return !1;
|
|
1074
1078
|
}
|
|
1075
1079
|
if (!Bo.call(t, l) || !r(e[l], t[l], l, l, e, t, n))
|
|
@@ -1087,13 +1091,13 @@ function Nn(e, t, r, n) {
|
|
|
1087
1091
|
return !1;
|
|
1088
1092
|
if (!e.size)
|
|
1089
1093
|
return !0;
|
|
1090
|
-
var
|
|
1091
|
-
return e.forEach(function(l,
|
|
1094
|
+
var i = {};
|
|
1095
|
+
return e.forEach(function(l, p) {
|
|
1092
1096
|
if (o) {
|
|
1093
|
-
var
|
|
1097
|
+
var c = !1, x = 0;
|
|
1094
1098
|
t.forEach(function(m, h) {
|
|
1095
|
-
!
|
|
1096
|
-
}), o =
|
|
1099
|
+
!c && !i[x] && (c = r(l, m, p, h, e, t, n)) && (i[x] = !0), x++;
|
|
1100
|
+
}), o = c;
|
|
1097
1101
|
}
|
|
1098
1102
|
}), o;
|
|
1099
1103
|
}
|
|
@@ -1127,30 +1131,30 @@ Qt(Dn(An, {
|
|
|
1127
1131
|
}
|
|
1128
1132
|
}));
|
|
1129
1133
|
function Go(e = {}) {
|
|
1130
|
-
const { measureBeforeMount: t = !1, initialWidth: r = 1280 } = e, [n, o] = Re(r), [
|
|
1131
|
-
const m =
|
|
1134
|
+
const { measureBeforeMount: t = !1, initialWidth: r = 1280 } = e, [n, o] = Re(r), [i, l] = Re(!t), p = ne(null), c = ne(null), x = fe(() => {
|
|
1135
|
+
const m = p.current;
|
|
1132
1136
|
if (m) {
|
|
1133
1137
|
const h = m.offsetWidth;
|
|
1134
|
-
o(h),
|
|
1138
|
+
o(h), i || l(!0);
|
|
1135
1139
|
}
|
|
1136
|
-
}, [
|
|
1140
|
+
}, [i]);
|
|
1137
1141
|
return We(() => {
|
|
1138
|
-
const m =
|
|
1142
|
+
const m = p.current;
|
|
1139
1143
|
if (m)
|
|
1140
|
-
return
|
|
1141
|
-
const
|
|
1142
|
-
if (
|
|
1143
|
-
const E =
|
|
1144
|
+
return x(), typeof ResizeObserver < "u" && (c.current = new ResizeObserver((h) => {
|
|
1145
|
+
const S = h[0];
|
|
1146
|
+
if (S) {
|
|
1147
|
+
const E = S.contentRect.width;
|
|
1144
1148
|
o(E);
|
|
1145
1149
|
}
|
|
1146
|
-
}),
|
|
1147
|
-
|
|
1150
|
+
}), c.current.observe(m)), () => {
|
|
1151
|
+
c.current && (c.current.disconnect(), c.current = null);
|
|
1148
1152
|
};
|
|
1149
|
-
}, [
|
|
1153
|
+
}, [x]), {
|
|
1150
1154
|
width: n,
|
|
1151
|
-
mounted:
|
|
1152
|
-
containerRef:
|
|
1153
|
-
measureWidth:
|
|
1155
|
+
mounted: i,
|
|
1156
|
+
containerRef: p,
|
|
1157
|
+
measureWidth: x
|
|
1154
1158
|
};
|
|
1155
1159
|
}
|
|
1156
1160
|
var vt = { exports: {} }, sr = {}, It = { exports: {} }, Lt = { exports: {} }, te = {};
|
|
@@ -1158,28 +1162,28 @@ var Lr;
|
|
|
1158
1162
|
function Vo() {
|
|
1159
1163
|
if (Lr) return te;
|
|
1160
1164
|
Lr = 1;
|
|
1161
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108,
|
|
1162
|
-
function b(
|
|
1163
|
-
if (typeof
|
|
1164
|
-
var w =
|
|
1165
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, p = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, c = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, x = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, h = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, S = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, E = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, O = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, a = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, s = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, g = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1166
|
+
function b(u) {
|
|
1167
|
+
if (typeof u == "object" && u !== null) {
|
|
1168
|
+
var w = u.$$typeof;
|
|
1165
1169
|
switch (w) {
|
|
1166
1170
|
case t:
|
|
1167
|
-
switch (
|
|
1168
|
-
case
|
|
1169
|
-
case
|
|
1171
|
+
switch (u = u.type, u) {
|
|
1172
|
+
case c:
|
|
1173
|
+
case x:
|
|
1170
1174
|
case n:
|
|
1171
|
-
case
|
|
1175
|
+
case i:
|
|
1172
1176
|
case o:
|
|
1173
1177
|
case h:
|
|
1174
|
-
return
|
|
1178
|
+
return u;
|
|
1175
1179
|
default:
|
|
1176
|
-
switch (
|
|
1177
|
-
case
|
|
1180
|
+
switch (u = u && u.$$typeof, u) {
|
|
1181
|
+
case p:
|
|
1178
1182
|
case m:
|
|
1179
1183
|
case O:
|
|
1180
1184
|
case E:
|
|
1181
1185
|
case l:
|
|
1182
|
-
return
|
|
1186
|
+
return u;
|
|
1183
1187
|
default:
|
|
1184
1188
|
return w;
|
|
1185
1189
|
}
|
|
@@ -1189,64 +1193,64 @@ function Vo() {
|
|
|
1189
1193
|
}
|
|
1190
1194
|
}
|
|
1191
1195
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return b(
|
|
1196
|
+
function R(u) {
|
|
1197
|
+
return b(u) === x;
|
|
1194
1198
|
}
|
|
1195
|
-
return te.AsyncMode =
|
|
1196
|
-
return
|
|
1197
|
-
}, te.isConcurrentMode =
|
|
1198
|
-
return b(
|
|
1199
|
-
}, te.isContextProvider = function(
|
|
1200
|
-
return b(
|
|
1201
|
-
}, te.isElement = function(
|
|
1202
|
-
return typeof
|
|
1203
|
-
}, te.isForwardRef = function(
|
|
1204
|
-
return b(
|
|
1205
|
-
}, te.isFragment = function(
|
|
1206
|
-
return b(
|
|
1207
|
-
}, te.isLazy = function(
|
|
1208
|
-
return b(
|
|
1209
|
-
}, te.isMemo = function(
|
|
1210
|
-
return b(
|
|
1211
|
-
}, te.isPortal = function(
|
|
1212
|
-
return b(
|
|
1213
|
-
}, te.isProfiler = function(
|
|
1214
|
-
return b(
|
|
1215
|
-
}, te.isStrictMode = function(
|
|
1216
|
-
return b(
|
|
1217
|
-
}, te.isSuspense = function(
|
|
1218
|
-
return b(
|
|
1219
|
-
}, te.isValidElementType = function(
|
|
1220
|
-
return typeof
|
|
1199
|
+
return te.AsyncMode = c, te.ConcurrentMode = x, te.ContextConsumer = p, te.ContextProvider = l, te.Element = t, te.ForwardRef = m, te.Fragment = n, te.Lazy = O, te.Memo = E, te.Portal = r, te.Profiler = i, te.StrictMode = o, te.Suspense = h, te.isAsyncMode = function(u) {
|
|
1200
|
+
return R(u) || b(u) === c;
|
|
1201
|
+
}, te.isConcurrentMode = R, te.isContextConsumer = function(u) {
|
|
1202
|
+
return b(u) === p;
|
|
1203
|
+
}, te.isContextProvider = function(u) {
|
|
1204
|
+
return b(u) === l;
|
|
1205
|
+
}, te.isElement = function(u) {
|
|
1206
|
+
return typeof u == "object" && u !== null && u.$$typeof === t;
|
|
1207
|
+
}, te.isForwardRef = function(u) {
|
|
1208
|
+
return b(u) === m;
|
|
1209
|
+
}, te.isFragment = function(u) {
|
|
1210
|
+
return b(u) === n;
|
|
1211
|
+
}, te.isLazy = function(u) {
|
|
1212
|
+
return b(u) === O;
|
|
1213
|
+
}, te.isMemo = function(u) {
|
|
1214
|
+
return b(u) === E;
|
|
1215
|
+
}, te.isPortal = function(u) {
|
|
1216
|
+
return b(u) === r;
|
|
1217
|
+
}, te.isProfiler = function(u) {
|
|
1218
|
+
return b(u) === i;
|
|
1219
|
+
}, te.isStrictMode = function(u) {
|
|
1220
|
+
return b(u) === o;
|
|
1221
|
+
}, te.isSuspense = function(u) {
|
|
1222
|
+
return b(u) === h;
|
|
1223
|
+
}, te.isValidElementType = function(u) {
|
|
1224
|
+
return typeof u == "string" || typeof u == "function" || u === n || u === x || u === i || u === o || u === h || u === S || typeof u == "object" && u !== null && (u.$$typeof === O || u.$$typeof === E || u.$$typeof === l || u.$$typeof === p || u.$$typeof === m || u.$$typeof === a || u.$$typeof === s || u.$$typeof === g || u.$$typeof === v);
|
|
1221
1225
|
}, te.typeOf = b, te;
|
|
1222
1226
|
}
|
|
1223
1227
|
var re = {};
|
|
1224
1228
|
var Wr;
|
|
1225
1229
|
function Jo() {
|
|
1226
1230
|
return Wr || (Wr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1227
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108,
|
|
1231
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, p = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, c = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, x = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, h = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, S = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, E = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, O = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, a = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, s = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, g = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1228
1232
|
function b(D) {
|
|
1229
1233
|
return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1230
|
-
D === n || D ===
|
|
1234
|
+
D === n || D === x || D === i || D === o || D === h || D === S || typeof D == "object" && D !== null && (D.$$typeof === O || D.$$typeof === E || D.$$typeof === l || D.$$typeof === p || D.$$typeof === m || D.$$typeof === a || D.$$typeof === s || D.$$typeof === g || D.$$typeof === v);
|
|
1231
1235
|
}
|
|
1232
|
-
function
|
|
1236
|
+
function R(D) {
|
|
1233
1237
|
if (typeof D == "object" && D !== null) {
|
|
1234
1238
|
var oe = D.$$typeof;
|
|
1235
1239
|
switch (oe) {
|
|
1236
1240
|
case t:
|
|
1237
1241
|
var ze = D.type;
|
|
1238
1242
|
switch (ze) {
|
|
1239
|
-
case
|
|
1240
|
-
case
|
|
1243
|
+
case c:
|
|
1244
|
+
case x:
|
|
1241
1245
|
case n:
|
|
1242
|
-
case
|
|
1246
|
+
case i:
|
|
1243
1247
|
case o:
|
|
1244
1248
|
case h:
|
|
1245
1249
|
return ze;
|
|
1246
1250
|
default:
|
|
1247
1251
|
var je = ze && ze.$$typeof;
|
|
1248
1252
|
switch (je) {
|
|
1249
|
-
case
|
|
1253
|
+
case p:
|
|
1250
1254
|
case m:
|
|
1251
1255
|
case O:
|
|
1252
1256
|
case E:
|
|
@@ -1261,47 +1265,47 @@ function Jo() {
|
|
|
1261
1265
|
}
|
|
1262
1266
|
}
|
|
1263
1267
|
}
|
|
1264
|
-
var
|
|
1268
|
+
var u = c, w = x, f = p, y = l, C = t, W = m, L = n, G = O, k = E, H = r, J = i, X = o, V = h, ie = !1;
|
|
1265
1269
|
function me(D) {
|
|
1266
|
-
return ie || (ie = !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.")), P(D) ||
|
|
1270
|
+
return ie || (ie = !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.")), P(D) || R(D) === c;
|
|
1267
1271
|
}
|
|
1268
1272
|
function P(D) {
|
|
1269
|
-
return
|
|
1273
|
+
return R(D) === x;
|
|
1270
1274
|
}
|
|
1271
|
-
function
|
|
1272
|
-
return
|
|
1275
|
+
function d(D) {
|
|
1276
|
+
return R(D) === p;
|
|
1273
1277
|
}
|
|
1274
1278
|
function _(D) {
|
|
1275
|
-
return
|
|
1279
|
+
return R(D) === l;
|
|
1276
1280
|
}
|
|
1277
1281
|
function M(D) {
|
|
1278
1282
|
return typeof D == "object" && D !== null && D.$$typeof === t;
|
|
1279
1283
|
}
|
|
1280
1284
|
function z(D) {
|
|
1281
|
-
return
|
|
1285
|
+
return R(D) === m;
|
|
1282
1286
|
}
|
|
1283
1287
|
function F(D) {
|
|
1284
|
-
return
|
|
1288
|
+
return R(D) === n;
|
|
1285
1289
|
}
|
|
1286
1290
|
function A(D) {
|
|
1287
|
-
return
|
|
1291
|
+
return R(D) === O;
|
|
1288
1292
|
}
|
|
1289
1293
|
function T(D) {
|
|
1290
|
-
return
|
|
1294
|
+
return R(D) === E;
|
|
1291
1295
|
}
|
|
1292
|
-
function
|
|
1293
|
-
return
|
|
1296
|
+
function q(D) {
|
|
1297
|
+
return R(D) === r;
|
|
1294
1298
|
}
|
|
1295
1299
|
function N(D) {
|
|
1296
|
-
return
|
|
1300
|
+
return R(D) === i;
|
|
1297
1301
|
}
|
|
1298
|
-
function
|
|
1299
|
-
return
|
|
1302
|
+
function $(D) {
|
|
1303
|
+
return R(D) === o;
|
|
1300
1304
|
}
|
|
1301
1305
|
function B(D) {
|
|
1302
|
-
return
|
|
1306
|
+
return R(D) === h;
|
|
1303
1307
|
}
|
|
1304
|
-
re.AsyncMode =
|
|
1308
|
+
re.AsyncMode = u, re.ConcurrentMode = w, re.ContextConsumer = f, re.ContextProvider = y, re.Element = C, re.ForwardRef = W, re.Fragment = L, re.Lazy = G, re.Memo = k, re.Portal = H, re.Profiler = J, re.StrictMode = X, re.Suspense = V, re.isAsyncMode = me, re.isConcurrentMode = P, re.isContextConsumer = d, re.isContextProvider = _, re.isElement = M, re.isForwardRef = z, re.isFragment = F, re.isLazy = A, re.isMemo = T, re.isPortal = q, re.isProfiler = N, re.isStrictMode = $, re.isSuspense = B, re.isValidElementType = b, re.typeOf = R;
|
|
1305
1309
|
})()), re;
|
|
1306
1310
|
}
|
|
1307
1311
|
var qr;
|
|
@@ -1313,45 +1317,45 @@ function Ko() {
|
|
|
1313
1317
|
if ($r) return ir;
|
|
1314
1318
|
$r = 1;
|
|
1315
1319
|
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
1316
|
-
function n(
|
|
1317
|
-
if (
|
|
1320
|
+
function n(i) {
|
|
1321
|
+
if (i == null)
|
|
1318
1322
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
1319
|
-
return Object(
|
|
1323
|
+
return Object(i);
|
|
1320
1324
|
}
|
|
1321
1325
|
function o() {
|
|
1322
1326
|
try {
|
|
1323
1327
|
if (!Object.assign)
|
|
1324
1328
|
return !1;
|
|
1325
|
-
var
|
|
1326
|
-
if (
|
|
1329
|
+
var i = new String("abc");
|
|
1330
|
+
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
1327
1331
|
return !1;
|
|
1328
|
-
for (var l = {},
|
|
1329
|
-
l["_" + String.fromCharCode(
|
|
1330
|
-
var
|
|
1332
|
+
for (var l = {}, p = 0; p < 10; p++)
|
|
1333
|
+
l["_" + String.fromCharCode(p)] = p;
|
|
1334
|
+
var c = Object.getOwnPropertyNames(l).map(function(m) {
|
|
1331
1335
|
return l[m];
|
|
1332
1336
|
});
|
|
1333
|
-
if (
|
|
1337
|
+
if (c.join("") !== "0123456789")
|
|
1334
1338
|
return !1;
|
|
1335
|
-
var
|
|
1339
|
+
var x = {};
|
|
1336
1340
|
return "abcdefghijklmnopqrst".split("").forEach(function(m) {
|
|
1337
|
-
|
|
1338
|
-
}), Object.keys(Object.assign({},
|
|
1341
|
+
x[m] = m;
|
|
1342
|
+
}), Object.keys(Object.assign({}, x)).join("") === "abcdefghijklmnopqrst";
|
|
1339
1343
|
} catch {
|
|
1340
1344
|
return !1;
|
|
1341
1345
|
}
|
|
1342
1346
|
}
|
|
1343
|
-
return ir = o() ? Object.assign : function(
|
|
1344
|
-
for (var
|
|
1345
|
-
|
|
1346
|
-
for (var h in
|
|
1347
|
-
t.call(
|
|
1347
|
+
return ir = o() ? Object.assign : function(i, l) {
|
|
1348
|
+
for (var p, c = n(i), x, m = 1; m < arguments.length; m++) {
|
|
1349
|
+
p = Object(arguments[m]);
|
|
1350
|
+
for (var h in p)
|
|
1351
|
+
t.call(p, h) && (c[h] = p[h]);
|
|
1348
1352
|
if (e) {
|
|
1349
|
-
|
|
1350
|
-
for (var
|
|
1351
|
-
r.call(
|
|
1353
|
+
x = e(p);
|
|
1354
|
+
for (var S = 0; S < x.length; S++)
|
|
1355
|
+
r.call(p, x[S]) && (c[x[S]] = p[x[S]]);
|
|
1352
1356
|
}
|
|
1353
1357
|
}
|
|
1354
|
-
return
|
|
1358
|
+
return c;
|
|
1355
1359
|
}, ir;
|
|
1356
1360
|
}
|
|
1357
1361
|
var lr, Hr;
|
|
@@ -1373,8 +1377,8 @@ function Zo() {
|
|
|
1373
1377
|
};
|
|
1374
1378
|
if (process.env.NODE_ENV !== "production") {
|
|
1375
1379
|
var t = /* @__PURE__ */ Er(), r = {}, n = /* @__PURE__ */ Ln();
|
|
1376
|
-
e = function(
|
|
1377
|
-
var l = "Warning: " +
|
|
1380
|
+
e = function(i) {
|
|
1381
|
+
var l = "Warning: " + i;
|
|
1378
1382
|
typeof console < "u" && console.error(l);
|
|
1379
1383
|
try {
|
|
1380
1384
|
throw new Error(l);
|
|
@@ -1382,29 +1386,29 @@ function Zo() {
|
|
|
1382
1386
|
}
|
|
1383
1387
|
};
|
|
1384
1388
|
}
|
|
1385
|
-
function o(
|
|
1389
|
+
function o(i, l, p, c, x) {
|
|
1386
1390
|
if (process.env.NODE_ENV !== "production") {
|
|
1387
|
-
for (var m in
|
|
1388
|
-
if (n(
|
|
1391
|
+
for (var m in i)
|
|
1392
|
+
if (n(i, m)) {
|
|
1389
1393
|
var h;
|
|
1390
1394
|
try {
|
|
1391
|
-
if (typeof
|
|
1392
|
-
var
|
|
1393
|
-
(
|
|
1395
|
+
if (typeof i[m] != "function") {
|
|
1396
|
+
var S = Error(
|
|
1397
|
+
(c || "React class") + ": " + p + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1394
1398
|
);
|
|
1395
|
-
throw
|
|
1399
|
+
throw S.name = "Invariant Violation", S;
|
|
1396
1400
|
}
|
|
1397
|
-
h =
|
|
1401
|
+
h = i[m](l, m, c, p, null, t);
|
|
1398
1402
|
} catch (O) {
|
|
1399
1403
|
h = O;
|
|
1400
1404
|
}
|
|
1401
1405
|
if (h && !(h instanceof Error) && e(
|
|
1402
|
-
(
|
|
1406
|
+
(c || "React class") + ": type specification of " + p + " `" + m + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1403
1407
|
), h instanceof Error && !(h.message in r)) {
|
|
1404
1408
|
r[h.message] = !0;
|
|
1405
|
-
var E =
|
|
1409
|
+
var E = x ? x() : "";
|
|
1406
1410
|
e(
|
|
1407
|
-
"Failed " +
|
|
1411
|
+
"Failed " + p + " type: " + h.message + (E ?? "")
|
|
1408
1412
|
);
|
|
1409
1413
|
}
|
|
1410
1414
|
}
|
|
@@ -1418,250 +1422,250 @@ var fr, Fr;
|
|
|
1418
1422
|
function Qo() {
|
|
1419
1423
|
if (Fr) return fr;
|
|
1420
1424
|
Fr = 1;
|
|
1421
|
-
var e = In(), t = Ko(), r = /* @__PURE__ */ Er(), n = /* @__PURE__ */ Ln(), o = /* @__PURE__ */ Zo(),
|
|
1425
|
+
var e = In(), t = Ko(), r = /* @__PURE__ */ Er(), n = /* @__PURE__ */ Ln(), o = /* @__PURE__ */ Zo(), i = function() {
|
|
1422
1426
|
};
|
|
1423
|
-
process.env.NODE_ENV !== "production" && (
|
|
1424
|
-
var
|
|
1425
|
-
typeof console < "u" && console.error(
|
|
1427
|
+
process.env.NODE_ENV !== "production" && (i = function(p) {
|
|
1428
|
+
var c = "Warning: " + p;
|
|
1429
|
+
typeof console < "u" && console.error(c);
|
|
1426
1430
|
try {
|
|
1427
|
-
throw new Error(
|
|
1431
|
+
throw new Error(c);
|
|
1428
1432
|
} catch {
|
|
1429
1433
|
}
|
|
1430
1434
|
});
|
|
1431
1435
|
function l() {
|
|
1432
1436
|
return null;
|
|
1433
1437
|
}
|
|
1434
|
-
return fr = function(
|
|
1435
|
-
var
|
|
1438
|
+
return fr = function(p, c) {
|
|
1439
|
+
var x = typeof Symbol == "function" && Symbol.iterator, m = "@@iterator";
|
|
1436
1440
|
function h(P) {
|
|
1437
|
-
var
|
|
1438
|
-
if (typeof
|
|
1439
|
-
return
|
|
1440
|
-
}
|
|
1441
|
-
var
|
|
1442
|
-
array:
|
|
1443
|
-
bigint:
|
|
1444
|
-
bool:
|
|
1445
|
-
func:
|
|
1446
|
-
number:
|
|
1447
|
-
object:
|
|
1448
|
-
string:
|
|
1449
|
-
symbol:
|
|
1441
|
+
var d = P && (x && P[x] || P[m]);
|
|
1442
|
+
if (typeof d == "function")
|
|
1443
|
+
return d;
|
|
1444
|
+
}
|
|
1445
|
+
var S = "<<anonymous>>", E = {
|
|
1446
|
+
array: s("array"),
|
|
1447
|
+
bigint: s("bigint"),
|
|
1448
|
+
bool: s("boolean"),
|
|
1449
|
+
func: s("function"),
|
|
1450
|
+
number: s("number"),
|
|
1451
|
+
object: s("object"),
|
|
1452
|
+
string: s("string"),
|
|
1453
|
+
symbol: s("symbol"),
|
|
1450
1454
|
any: g(),
|
|
1451
1455
|
arrayOf: b,
|
|
1452
|
-
element:
|
|
1453
|
-
elementType:
|
|
1456
|
+
element: R(),
|
|
1457
|
+
elementType: u(),
|
|
1454
1458
|
instanceOf: w,
|
|
1455
|
-
node:
|
|
1456
|
-
objectOf:
|
|
1457
|
-
oneOf:
|
|
1459
|
+
node: W(),
|
|
1460
|
+
objectOf: y,
|
|
1461
|
+
oneOf: f,
|
|
1458
1462
|
oneOfType: C,
|
|
1459
1463
|
shape: G,
|
|
1460
1464
|
exact: k
|
|
1461
1465
|
};
|
|
1462
|
-
function O(P,
|
|
1463
|
-
return P ===
|
|
1466
|
+
function O(P, d) {
|
|
1467
|
+
return P === d ? P !== 0 || 1 / P === 1 / d : P !== P && d !== d;
|
|
1464
1468
|
}
|
|
1465
|
-
function
|
|
1466
|
-
this.message = P, this.data =
|
|
1469
|
+
function v(P, d) {
|
|
1470
|
+
this.message = P, this.data = d && typeof d == "object" ? d : {}, this.stack = "";
|
|
1467
1471
|
}
|
|
1468
|
-
|
|
1472
|
+
v.prototype = Error.prototype;
|
|
1469
1473
|
function a(P) {
|
|
1470
1474
|
if (process.env.NODE_ENV !== "production")
|
|
1471
|
-
var
|
|
1472
|
-
function M(F, A, T,
|
|
1473
|
-
if (
|
|
1474
|
-
if (
|
|
1475
|
+
var d = {}, _ = 0;
|
|
1476
|
+
function M(F, A, T, q, N, $, B) {
|
|
1477
|
+
if (q = q || S, $ = $ || T, B !== r) {
|
|
1478
|
+
if (c) {
|
|
1475
1479
|
var D = new Error(
|
|
1476
1480
|
"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"
|
|
1477
1481
|
);
|
|
1478
1482
|
throw D.name = "Invariant Violation", D;
|
|
1479
1483
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1480
|
-
var oe =
|
|
1481
|
-
!
|
|
1482
|
-
_ < 3 && (
|
|
1483
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
1484
|
-
),
|
|
1484
|
+
var oe = q + ":" + T;
|
|
1485
|
+
!d[oe] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1486
|
+
_ < 3 && (i(
|
|
1487
|
+
"You are manually calling a React.PropTypes validation function for the `" + $ + "` prop on `" + q + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1488
|
+
), d[oe] = !0, _++);
|
|
1485
1489
|
}
|
|
1486
1490
|
}
|
|
1487
|
-
return A[T] == null ? F ? A[T] === null ? new
|
|
1491
|
+
return A[T] == null ? F ? A[T] === null ? new v("The " + N + " `" + $ + "` is marked as required " + ("in `" + q + "`, but its value is `null`.")) : new v("The " + N + " `" + $ + "` is marked as required in " + ("`" + q + "`, but its value is `undefined`.")) : null : P(A, T, q, N, $);
|
|
1488
1492
|
}
|
|
1489
1493
|
var z = M.bind(null, !1);
|
|
1490
1494
|
return z.isRequired = M.bind(null, !0), z;
|
|
1491
1495
|
}
|
|
1492
|
-
function
|
|
1493
|
-
function
|
|
1494
|
-
var
|
|
1496
|
+
function s(P) {
|
|
1497
|
+
function d(_, M, z, F, A, T) {
|
|
1498
|
+
var q = _[M], N = X(q);
|
|
1495
1499
|
if (N !== P) {
|
|
1496
|
-
var
|
|
1497
|
-
return new
|
|
1498
|
-
"Invalid " + F + " `" + A + "` of type " + ("`" +
|
|
1500
|
+
var $ = V(q);
|
|
1501
|
+
return new v(
|
|
1502
|
+
"Invalid " + F + " `" + A + "` of type " + ("`" + $ + "` supplied to `" + z + "`, expected ") + ("`" + P + "`."),
|
|
1499
1503
|
{ expectedType: P }
|
|
1500
1504
|
);
|
|
1501
1505
|
}
|
|
1502
1506
|
return null;
|
|
1503
1507
|
}
|
|
1504
|
-
return a(
|
|
1508
|
+
return a(d);
|
|
1505
1509
|
}
|
|
1506
1510
|
function g() {
|
|
1507
1511
|
return a(l);
|
|
1508
1512
|
}
|
|
1509
1513
|
function b(P) {
|
|
1510
|
-
function
|
|
1514
|
+
function d(_, M, z, F, A) {
|
|
1511
1515
|
if (typeof P != "function")
|
|
1512
|
-
return new
|
|
1516
|
+
return new v("Property `" + A + "` of component `" + z + "` has invalid PropType notation inside arrayOf.");
|
|
1513
1517
|
var T = _[M];
|
|
1514
1518
|
if (!Array.isArray(T)) {
|
|
1515
|
-
var
|
|
1516
|
-
return new
|
|
1519
|
+
var q = X(T);
|
|
1520
|
+
return new v("Invalid " + F + " `" + A + "` of type " + ("`" + q + "` supplied to `" + z + "`, expected an array."));
|
|
1517
1521
|
}
|
|
1518
1522
|
for (var N = 0; N < T.length; N++) {
|
|
1519
|
-
var
|
|
1520
|
-
if (
|
|
1521
|
-
return
|
|
1523
|
+
var $ = P(T, N, z, F, A + "[" + N + "]", r);
|
|
1524
|
+
if ($ instanceof Error)
|
|
1525
|
+
return $;
|
|
1522
1526
|
}
|
|
1523
1527
|
return null;
|
|
1524
1528
|
}
|
|
1525
|
-
return a(
|
|
1529
|
+
return a(d);
|
|
1526
1530
|
}
|
|
1527
|
-
function
|
|
1528
|
-
function P(
|
|
1529
|
-
var A =
|
|
1530
|
-
if (!
|
|
1531
|
+
function R() {
|
|
1532
|
+
function P(d, _, M, z, F) {
|
|
1533
|
+
var A = d[_];
|
|
1534
|
+
if (!p(A)) {
|
|
1531
1535
|
var T = X(A);
|
|
1532
|
-
return new
|
|
1536
|
+
return new v("Invalid " + z + " `" + F + "` of type " + ("`" + T + "` supplied to `" + M + "`, expected a single ReactElement."));
|
|
1533
1537
|
}
|
|
1534
1538
|
return null;
|
|
1535
1539
|
}
|
|
1536
1540
|
return a(P);
|
|
1537
1541
|
}
|
|
1538
|
-
function
|
|
1539
|
-
function P(
|
|
1540
|
-
var A =
|
|
1542
|
+
function u() {
|
|
1543
|
+
function P(d, _, M, z, F) {
|
|
1544
|
+
var A = d[_];
|
|
1541
1545
|
if (!e.isValidElementType(A)) {
|
|
1542
1546
|
var T = X(A);
|
|
1543
|
-
return new
|
|
1547
|
+
return new v("Invalid " + z + " `" + F + "` of type " + ("`" + T + "` supplied to `" + M + "`, expected a single ReactElement type."));
|
|
1544
1548
|
}
|
|
1545
1549
|
return null;
|
|
1546
1550
|
}
|
|
1547
1551
|
return a(P);
|
|
1548
1552
|
}
|
|
1549
1553
|
function w(P) {
|
|
1550
|
-
function
|
|
1554
|
+
function d(_, M, z, F, A) {
|
|
1551
1555
|
if (!(_[M] instanceof P)) {
|
|
1552
|
-
var T = P.name ||
|
|
1553
|
-
return new
|
|
1556
|
+
var T = P.name || S, q = me(_[M]);
|
|
1557
|
+
return new v("Invalid " + F + " `" + A + "` of type " + ("`" + q + "` supplied to `" + z + "`, expected ") + ("instance of `" + T + "`."));
|
|
1554
1558
|
}
|
|
1555
1559
|
return null;
|
|
1556
1560
|
}
|
|
1557
|
-
return a(
|
|
1561
|
+
return a(d);
|
|
1558
1562
|
}
|
|
1559
|
-
function
|
|
1563
|
+
function f(P) {
|
|
1560
1564
|
if (!Array.isArray(P))
|
|
1561
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
1565
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1562
1566
|
"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])."
|
|
1563
|
-
) :
|
|
1564
|
-
function
|
|
1565
|
-
for (var T = _[M],
|
|
1566
|
-
if (O(T, P[
|
|
1567
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), l;
|
|
1568
|
+
function d(_, M, z, F, A) {
|
|
1569
|
+
for (var T = _[M], q = 0; q < P.length; q++)
|
|
1570
|
+
if (O(T, P[q]))
|
|
1567
1571
|
return null;
|
|
1568
1572
|
var N = JSON.stringify(P, function(B, D) {
|
|
1569
1573
|
var oe = V(D);
|
|
1570
1574
|
return oe === "symbol" ? String(D) : D;
|
|
1571
1575
|
});
|
|
1572
|
-
return new
|
|
1576
|
+
return new v("Invalid " + F + " `" + A + "` of value `" + String(T) + "` " + ("supplied to `" + z + "`, expected one of " + N + "."));
|
|
1573
1577
|
}
|
|
1574
|
-
return a(
|
|
1578
|
+
return a(d);
|
|
1575
1579
|
}
|
|
1576
|
-
function
|
|
1577
|
-
function
|
|
1580
|
+
function y(P) {
|
|
1581
|
+
function d(_, M, z, F, A) {
|
|
1578
1582
|
if (typeof P != "function")
|
|
1579
|
-
return new
|
|
1580
|
-
var T = _[M],
|
|
1581
|
-
if (
|
|
1582
|
-
return new
|
|
1583
|
+
return new v("Property `" + A + "` of component `" + z + "` has invalid PropType notation inside objectOf.");
|
|
1584
|
+
var T = _[M], q = X(T);
|
|
1585
|
+
if (q !== "object")
|
|
1586
|
+
return new v("Invalid " + F + " `" + A + "` of type " + ("`" + q + "` supplied to `" + z + "`, expected an object."));
|
|
1583
1587
|
for (var N in T)
|
|
1584
1588
|
if (n(T, N)) {
|
|
1585
|
-
var
|
|
1586
|
-
if (
|
|
1587
|
-
return
|
|
1589
|
+
var $ = P(T, N, z, F, A + "." + N, r);
|
|
1590
|
+
if ($ instanceof Error)
|
|
1591
|
+
return $;
|
|
1588
1592
|
}
|
|
1589
1593
|
return null;
|
|
1590
1594
|
}
|
|
1591
|
-
return a(
|
|
1595
|
+
return a(d);
|
|
1592
1596
|
}
|
|
1593
1597
|
function C(P) {
|
|
1594
1598
|
if (!Array.isArray(P))
|
|
1595
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1596
|
-
for (var
|
|
1597
|
-
var _ = P[
|
|
1599
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), l;
|
|
1600
|
+
for (var d = 0; d < P.length; d++) {
|
|
1601
|
+
var _ = P[d];
|
|
1598
1602
|
if (typeof _ != "function")
|
|
1599
|
-
return
|
|
1600
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ie(_) + " at index " +
|
|
1603
|
+
return i(
|
|
1604
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ie(_) + " at index " + d + "."
|
|
1601
1605
|
), l;
|
|
1602
1606
|
}
|
|
1603
|
-
function M(z, F, A, T,
|
|
1604
|
-
for (var N = [],
|
|
1605
|
-
var B = P[
|
|
1607
|
+
function M(z, F, A, T, q) {
|
|
1608
|
+
for (var N = [], $ = 0; $ < P.length; $++) {
|
|
1609
|
+
var B = P[$], D = B(z, F, A, T, q, r);
|
|
1606
1610
|
if (D == null)
|
|
1607
1611
|
return null;
|
|
1608
1612
|
D.data && n(D.data, "expectedType") && N.push(D.data.expectedType);
|
|
1609
1613
|
}
|
|
1610
1614
|
var oe = N.length > 0 ? ", expected one of type [" + N.join(", ") + "]" : "";
|
|
1611
|
-
return new
|
|
1615
|
+
return new v("Invalid " + T + " `" + q + "` supplied to " + ("`" + A + "`" + oe + "."));
|
|
1612
1616
|
}
|
|
1613
1617
|
return a(M);
|
|
1614
1618
|
}
|
|
1615
|
-
function
|
|
1616
|
-
function P(
|
|
1617
|
-
return H(
|
|
1619
|
+
function W() {
|
|
1620
|
+
function P(d, _, M, z, F) {
|
|
1621
|
+
return H(d[_]) ? null : new v("Invalid " + z + " `" + F + "` supplied to " + ("`" + M + "`, expected a ReactNode."));
|
|
1618
1622
|
}
|
|
1619
1623
|
return a(P);
|
|
1620
1624
|
}
|
|
1621
|
-
function
|
|
1622
|
-
return new
|
|
1623
|
-
(P || "React class") + ": " +
|
|
1625
|
+
function L(P, d, _, M, z) {
|
|
1626
|
+
return new v(
|
|
1627
|
+
(P || "React class") + ": " + d + " type `" + _ + "." + M + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + z + "`."
|
|
1624
1628
|
);
|
|
1625
1629
|
}
|
|
1626
1630
|
function G(P) {
|
|
1627
|
-
function
|
|
1628
|
-
var T = _[M],
|
|
1629
|
-
if (
|
|
1630
|
-
return new
|
|
1631
|
+
function d(_, M, z, F, A) {
|
|
1632
|
+
var T = _[M], q = X(T);
|
|
1633
|
+
if (q !== "object")
|
|
1634
|
+
return new v("Invalid " + F + " `" + A + "` of type `" + q + "` " + ("supplied to `" + z + "`, expected `object`."));
|
|
1631
1635
|
for (var N in P) {
|
|
1632
|
-
var
|
|
1633
|
-
if (typeof
|
|
1634
|
-
return
|
|
1635
|
-
var B =
|
|
1636
|
+
var $ = P[N];
|
|
1637
|
+
if (typeof $ != "function")
|
|
1638
|
+
return L(z, F, A, N, V($));
|
|
1639
|
+
var B = $(T, N, z, F, A + "." + N, r);
|
|
1636
1640
|
if (B)
|
|
1637
1641
|
return B;
|
|
1638
1642
|
}
|
|
1639
1643
|
return null;
|
|
1640
1644
|
}
|
|
1641
|
-
return a(
|
|
1645
|
+
return a(d);
|
|
1642
1646
|
}
|
|
1643
1647
|
function k(P) {
|
|
1644
|
-
function
|
|
1645
|
-
var T = _[M],
|
|
1646
|
-
if (
|
|
1647
|
-
return new
|
|
1648
|
+
function d(_, M, z, F, A) {
|
|
1649
|
+
var T = _[M], q = X(T);
|
|
1650
|
+
if (q !== "object")
|
|
1651
|
+
return new v("Invalid " + F + " `" + A + "` of type `" + q + "` " + ("supplied to `" + z + "`, expected `object`."));
|
|
1648
1652
|
var N = t({}, _[M], P);
|
|
1649
|
-
for (var
|
|
1650
|
-
var B = P[
|
|
1651
|
-
if (n(P,
|
|
1652
|
-
return
|
|
1653
|
+
for (var $ in N) {
|
|
1654
|
+
var B = P[$];
|
|
1655
|
+
if (n(P, $) && typeof B != "function")
|
|
1656
|
+
return L(z, F, A, $, V(B));
|
|
1653
1657
|
if (!B)
|
|
1654
|
-
return new
|
|
1655
|
-
"Invalid " + F + " `" + A + "` key `" +
|
|
1658
|
+
return new v(
|
|
1659
|
+
"Invalid " + F + " `" + A + "` key `" + $ + "` supplied to `" + z + "`.\nBad object: " + JSON.stringify(_[M], null, " ") + `
|
|
1656
1660
|
Valid keys: ` + JSON.stringify(Object.keys(P), null, " ")
|
|
1657
1661
|
);
|
|
1658
|
-
var D = B(T,
|
|
1662
|
+
var D = B(T, $, z, F, A + "." + $, r);
|
|
1659
1663
|
if (D)
|
|
1660
1664
|
return D;
|
|
1661
1665
|
}
|
|
1662
1666
|
return null;
|
|
1663
1667
|
}
|
|
1664
|
-
return a(
|
|
1668
|
+
return a(d);
|
|
1665
1669
|
}
|
|
1666
1670
|
function H(P) {
|
|
1667
1671
|
switch (typeof P) {
|
|
@@ -1674,12 +1678,12 @@ Valid keys: ` + JSON.stringify(Object.keys(P), null, " ")
|
|
|
1674
1678
|
case "object":
|
|
1675
1679
|
if (Array.isArray(P))
|
|
1676
1680
|
return P.every(H);
|
|
1677
|
-
if (P === null ||
|
|
1681
|
+
if (P === null || p(P))
|
|
1678
1682
|
return !0;
|
|
1679
|
-
var
|
|
1680
|
-
if (
|
|
1681
|
-
var _ =
|
|
1682
|
-
if (
|
|
1683
|
+
var d = h(P);
|
|
1684
|
+
if (d) {
|
|
1685
|
+
var _ = d.call(P), M;
|
|
1686
|
+
if (d !== P.entries) {
|
|
1683
1687
|
for (; !(M = _.next()).done; )
|
|
1684
1688
|
if (!H(M.value))
|
|
1685
1689
|
return !1;
|
|
@@ -1696,41 +1700,41 @@ Valid keys: ` + JSON.stringify(Object.keys(P), null, " ")
|
|
|
1696
1700
|
return !1;
|
|
1697
1701
|
}
|
|
1698
1702
|
}
|
|
1699
|
-
function J(P,
|
|
1700
|
-
return P === "symbol" ? !0 :
|
|
1703
|
+
function J(P, d) {
|
|
1704
|
+
return P === "symbol" ? !0 : d ? d["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && d instanceof Symbol : !1;
|
|
1701
1705
|
}
|
|
1702
1706
|
function X(P) {
|
|
1703
|
-
var
|
|
1704
|
-
return Array.isArray(P) ? "array" : P instanceof RegExp ? "object" : J(
|
|
1707
|
+
var d = typeof P;
|
|
1708
|
+
return Array.isArray(P) ? "array" : P instanceof RegExp ? "object" : J(d, P) ? "symbol" : d;
|
|
1705
1709
|
}
|
|
1706
1710
|
function V(P) {
|
|
1707
1711
|
if (typeof P > "u" || P === null)
|
|
1708
1712
|
return "" + P;
|
|
1709
|
-
var
|
|
1710
|
-
if (
|
|
1713
|
+
var d = X(P);
|
|
1714
|
+
if (d === "object") {
|
|
1711
1715
|
if (P instanceof Date)
|
|
1712
1716
|
return "date";
|
|
1713
1717
|
if (P instanceof RegExp)
|
|
1714
1718
|
return "regexp";
|
|
1715
1719
|
}
|
|
1716
|
-
return
|
|
1720
|
+
return d;
|
|
1717
1721
|
}
|
|
1718
1722
|
function ie(P) {
|
|
1719
|
-
var
|
|
1720
|
-
switch (
|
|
1723
|
+
var d = V(P);
|
|
1724
|
+
switch (d) {
|
|
1721
1725
|
case "array":
|
|
1722
1726
|
case "object":
|
|
1723
|
-
return "an " +
|
|
1727
|
+
return "an " + d;
|
|
1724
1728
|
case "boolean":
|
|
1725
1729
|
case "date":
|
|
1726
1730
|
case "regexp":
|
|
1727
|
-
return "a " +
|
|
1731
|
+
return "a " + d;
|
|
1728
1732
|
default:
|
|
1729
|
-
return
|
|
1733
|
+
return d;
|
|
1730
1734
|
}
|
|
1731
1735
|
}
|
|
1732
1736
|
function me(P) {
|
|
1733
|
-
return !P.constructor || !P.constructor.name ?
|
|
1737
|
+
return !P.constructor || !P.constructor.name ? S : P.constructor.name;
|
|
1734
1738
|
}
|
|
1735
1739
|
return E.checkPropTypes = o, E.resetWarningCache = o.resetWarningCache, E.PropTypes = E, E;
|
|
1736
1740
|
}, fr;
|
|
@@ -1745,19 +1749,19 @@ function ea() {
|
|
|
1745
1749
|
function r() {
|
|
1746
1750
|
}
|
|
1747
1751
|
return r.resetWarningCache = t, dr = function() {
|
|
1748
|
-
function n(l,
|
|
1752
|
+
function n(l, p, c, x, m, h) {
|
|
1749
1753
|
if (h !== e) {
|
|
1750
|
-
var
|
|
1754
|
+
var S = new Error(
|
|
1751
1755
|
"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"
|
|
1752
1756
|
);
|
|
1753
|
-
throw
|
|
1757
|
+
throw S.name = "Invariant Violation", S;
|
|
1754
1758
|
}
|
|
1755
1759
|
}
|
|
1756
1760
|
n.isRequired = n;
|
|
1757
1761
|
function o() {
|
|
1758
1762
|
return n;
|
|
1759
1763
|
}
|
|
1760
|
-
var
|
|
1764
|
+
var i = {
|
|
1761
1765
|
array: n,
|
|
1762
1766
|
bigint: n,
|
|
1763
1767
|
bool: n,
|
|
@@ -1780,7 +1784,7 @@ function ea() {
|
|
|
1780
1784
|
checkPropTypes: r,
|
|
1781
1785
|
resetWarningCache: t
|
|
1782
1786
|
};
|
|
1783
|
-
return
|
|
1787
|
+
return i.PropTypes = i, i;
|
|
1784
1788
|
}, dr;
|
|
1785
1789
|
}
|
|
1786
1790
|
var Ur;
|
|
@@ -1799,22 +1803,22 @@ function tr() {
|
|
|
1799
1803
|
Gr = 1, Object.defineProperty(Ke, "__esModule", {
|
|
1800
1804
|
value: !0
|
|
1801
1805
|
}), Ke.dontSetMe = o, Ke.findInArray = e, Ke.int = n, Ke.isFunction = t, Ke.isNum = r;
|
|
1802
|
-
function e(
|
|
1803
|
-
for (let
|
|
1804
|
-
if (l.apply(l, [
|
|
1806
|
+
function e(i, l) {
|
|
1807
|
+
for (let p = 0, c = i.length; p < c; p++)
|
|
1808
|
+
if (l.apply(l, [i[p], p, i])) return i[p];
|
|
1805
1809
|
}
|
|
1806
|
-
function t(
|
|
1807
|
-
return typeof
|
|
1810
|
+
function t(i) {
|
|
1811
|
+
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Function]";
|
|
1808
1812
|
}
|
|
1809
|
-
function r(
|
|
1810
|
-
return typeof
|
|
1813
|
+
function r(i) {
|
|
1814
|
+
return typeof i == "number" && !isNaN(i);
|
|
1811
1815
|
}
|
|
1812
|
-
function n(
|
|
1813
|
-
return parseInt(
|
|
1816
|
+
function n(i) {
|
|
1817
|
+
return parseInt(i, 10);
|
|
1814
1818
|
}
|
|
1815
|
-
function o(
|
|
1816
|
-
if (
|
|
1817
|
-
return new Error(`Invalid prop ${l} passed to ${
|
|
1819
|
+
function o(i, l, p) {
|
|
1820
|
+
if (i[l])
|
|
1821
|
+
return new Error(`Invalid prop ${l} passed to ${p} - do not set this, set it on the child.`);
|
|
1818
1822
|
}
|
|
1819
1823
|
return Ke;
|
|
1820
1824
|
}
|
|
@@ -1826,24 +1830,24 @@ function ta() {
|
|
|
1826
1830
|
}), Ze.browserPrefixToKey = r, Ze.browserPrefixToStyle = n, Ze.default = void 0, Ze.getPrefix = t;
|
|
1827
1831
|
const e = ["Moz", "Webkit", "O", "ms"];
|
|
1828
1832
|
function t() {
|
|
1829
|
-
let
|
|
1833
|
+
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1830
1834
|
if (typeof window > "u") return "";
|
|
1831
1835
|
const l = window.document?.documentElement?.style;
|
|
1832
|
-
if (!l ||
|
|
1833
|
-
for (let
|
|
1834
|
-
if (r(
|
|
1836
|
+
if (!l || i in l) return "";
|
|
1837
|
+
for (let p = 0; p < e.length; p++)
|
|
1838
|
+
if (r(i, e[p]) in l) return e[p];
|
|
1835
1839
|
return "";
|
|
1836
1840
|
}
|
|
1837
|
-
function r(
|
|
1838
|
-
return l ? `${l}${o(
|
|
1841
|
+
function r(i, l) {
|
|
1842
|
+
return l ? `${l}${o(i)}` : i;
|
|
1839
1843
|
}
|
|
1840
|
-
function n(
|
|
1841
|
-
return l ? `-${l.toLowerCase()}-${
|
|
1844
|
+
function n(i, l) {
|
|
1845
|
+
return l ? `-${l.toLowerCase()}-${i}` : i;
|
|
1842
1846
|
}
|
|
1843
|
-
function o(
|
|
1844
|
-
let l = "",
|
|
1845
|
-
for (let
|
|
1846
|
-
|
|
1847
|
+
function o(i) {
|
|
1848
|
+
let l = "", p = !0;
|
|
1849
|
+
for (let c = 0; c < i.length; c++)
|
|
1850
|
+
p ? (l += i[c].toUpperCase(), p = !1) : i[c] === "-" ? p = !0 : l += i[c];
|
|
1847
1851
|
return l;
|
|
1848
1852
|
}
|
|
1849
1853
|
return Ze.default = t(), Ze;
|
|
@@ -1853,139 +1857,139 @@ function Pr() {
|
|
|
1853
1857
|
if (Jr) return ge;
|
|
1854
1858
|
Jr = 1, Object.defineProperty(ge, "__esModule", {
|
|
1855
1859
|
value: !0
|
|
1856
|
-
}), ge.addClassName =
|
|
1860
|
+
}), ge.addClassName = u, ge.addEvent = l, ge.addUserSelectStyles = g, ge.createCSSTransform = E, ge.createSVGTransform = O, ge.getTouch = a, ge.getTouchIdentifier = s, ge.getTranslation = v, ge.innerHeight = m, ge.innerWidth = h, ge.matchesSelector = o, ge.matchesSelectorAndParentsTo = i, ge.offsetXYFromParent = S, ge.outerHeight = c, ge.outerWidth = x, ge.removeClassName = w, ge.removeEvent = p, ge.scheduleRemoveUserSelectStyles = b;
|
|
1857
1861
|
var e = tr(), t = r(ta());
|
|
1858
|
-
function r(
|
|
1859
|
-
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(),
|
|
1860
|
-
return (r = function(
|
|
1861
|
-
if (!G &&
|
|
1862
|
-
var k, H, J = { __proto__: null, default:
|
|
1863
|
-
if (
|
|
1864
|
-
if (k = G ?
|
|
1865
|
-
if (k.has(
|
|
1866
|
-
k.set(
|
|
1862
|
+
function r(f, y) {
|
|
1863
|
+
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap();
|
|
1864
|
+
return (r = function(L, G) {
|
|
1865
|
+
if (!G && L && L.__esModule) return L;
|
|
1866
|
+
var k, H, J = { __proto__: null, default: L };
|
|
1867
|
+
if (L === null || typeof L != "object" && typeof L != "function") return J;
|
|
1868
|
+
if (k = G ? W : C) {
|
|
1869
|
+
if (k.has(L)) return k.get(L);
|
|
1870
|
+
k.set(L, J);
|
|
1867
1871
|
}
|
|
1868
|
-
for (const X in
|
|
1872
|
+
for (const X in L) X !== "default" && {}.hasOwnProperty.call(L, X) && ((H = (k = Object.defineProperty) && Object.getOwnPropertyDescriptor(L, X)) && (H.get || H.set) ? k(J, X, H) : J[X] = L[X]);
|
|
1869
1873
|
return J;
|
|
1870
|
-
})(
|
|
1874
|
+
})(f, y);
|
|
1871
1875
|
}
|
|
1872
1876
|
let n = "";
|
|
1873
|
-
function o(
|
|
1877
|
+
function o(f, y) {
|
|
1874
1878
|
return n || (n = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(C) {
|
|
1875
|
-
return (0, e.isFunction)(
|
|
1876
|
-
})), (0, e.isFunction)(
|
|
1879
|
+
return (0, e.isFunction)(f[C]);
|
|
1880
|
+
})), (0, e.isFunction)(f[n]) ? f[n](y) : !1;
|
|
1877
1881
|
}
|
|
1878
|
-
function
|
|
1879
|
-
let
|
|
1882
|
+
function i(f, y, C) {
|
|
1883
|
+
let W = f;
|
|
1880
1884
|
do {
|
|
1881
|
-
if (o(
|
|
1882
|
-
if (
|
|
1883
|
-
|
|
1884
|
-
} while (
|
|
1885
|
+
if (o(W, y)) return !0;
|
|
1886
|
+
if (W === C) return !1;
|
|
1887
|
+
W = W.parentNode;
|
|
1888
|
+
} while (W);
|
|
1885
1889
|
return !1;
|
|
1886
1890
|
}
|
|
1887
|
-
function l(
|
|
1888
|
-
if (!
|
|
1889
|
-
const
|
|
1891
|
+
function l(f, y, C, W) {
|
|
1892
|
+
if (!f) return;
|
|
1893
|
+
const L = {
|
|
1890
1894
|
capture: !0,
|
|
1891
|
-
|
|
1895
|
+
...W
|
|
1892
1896
|
};
|
|
1893
|
-
|
|
1897
|
+
f.addEventListener ? f.addEventListener(y, C, L) : f.attachEvent ? f.attachEvent("on" + y, C) : f["on" + y] = C;
|
|
1894
1898
|
}
|
|
1895
|
-
function
|
|
1896
|
-
if (!
|
|
1897
|
-
const
|
|
1899
|
+
function p(f, y, C, W) {
|
|
1900
|
+
if (!f) return;
|
|
1901
|
+
const L = {
|
|
1898
1902
|
capture: !0,
|
|
1899
|
-
|
|
1903
|
+
...W
|
|
1900
1904
|
};
|
|
1901
|
-
|
|
1905
|
+
f.removeEventListener ? f.removeEventListener(y, C, L) : f.detachEvent ? f.detachEvent("on" + y, C) : f["on" + y] = null;
|
|
1902
1906
|
}
|
|
1903
|
-
function
|
|
1904
|
-
let
|
|
1905
|
-
const C =
|
|
1906
|
-
return
|
|
1907
|
+
function c(f) {
|
|
1908
|
+
let y = f.clientHeight;
|
|
1909
|
+
const C = f.ownerDocument.defaultView.getComputedStyle(f);
|
|
1910
|
+
return y += (0, e.int)(C.borderTopWidth), y += (0, e.int)(C.borderBottomWidth), y;
|
|
1907
1911
|
}
|
|
1908
|
-
function
|
|
1909
|
-
let
|
|
1910
|
-
const C =
|
|
1911
|
-
return
|
|
1912
|
+
function x(f) {
|
|
1913
|
+
let y = f.clientWidth;
|
|
1914
|
+
const C = f.ownerDocument.defaultView.getComputedStyle(f);
|
|
1915
|
+
return y += (0, e.int)(C.borderLeftWidth), y += (0, e.int)(C.borderRightWidth), y;
|
|
1912
1916
|
}
|
|
1913
|
-
function m(
|
|
1914
|
-
let
|
|
1915
|
-
const C =
|
|
1916
|
-
return
|
|
1917
|
+
function m(f) {
|
|
1918
|
+
let y = f.clientHeight;
|
|
1919
|
+
const C = f.ownerDocument.defaultView.getComputedStyle(f);
|
|
1920
|
+
return y -= (0, e.int)(C.paddingTop), y -= (0, e.int)(C.paddingBottom), y;
|
|
1917
1921
|
}
|
|
1918
|
-
function h(
|
|
1919
|
-
let
|
|
1920
|
-
const C =
|
|
1921
|
-
return
|
|
1922
|
+
function h(f) {
|
|
1923
|
+
let y = f.clientWidth;
|
|
1924
|
+
const C = f.ownerDocument.defaultView.getComputedStyle(f);
|
|
1925
|
+
return y -= (0, e.int)(C.paddingLeft), y -= (0, e.int)(C.paddingRight), y;
|
|
1922
1926
|
}
|
|
1923
|
-
function
|
|
1924
|
-
const
|
|
1927
|
+
function S(f, y, C) {
|
|
1928
|
+
const L = y === y.ownerDocument.body ? {
|
|
1925
1929
|
left: 0,
|
|
1926
1930
|
top: 0
|
|
1927
|
-
} :
|
|
1931
|
+
} : y.getBoundingClientRect(), G = (f.clientX + y.scrollLeft - L.left) / C, k = (f.clientY + y.scrollTop - L.top) / C;
|
|
1928
1932
|
return {
|
|
1929
1933
|
x: G,
|
|
1930
1934
|
y: k
|
|
1931
1935
|
};
|
|
1932
1936
|
}
|
|
1933
|
-
function E(
|
|
1934
|
-
const C =
|
|
1937
|
+
function E(f, y) {
|
|
1938
|
+
const C = v(f, y, "px");
|
|
1935
1939
|
return {
|
|
1936
1940
|
[(0, t.browserPrefixToKey)("transform", t.default)]: C
|
|
1937
1941
|
};
|
|
1938
1942
|
}
|
|
1939
|
-
function O(
|
|
1940
|
-
return
|
|
1943
|
+
function O(f, y) {
|
|
1944
|
+
return v(f, y, "");
|
|
1941
1945
|
}
|
|
1942
|
-
function
|
|
1946
|
+
function v(f, y, C) {
|
|
1943
1947
|
let {
|
|
1944
|
-
x:
|
|
1945
|
-
y:
|
|
1946
|
-
} =
|
|
1947
|
-
if (
|
|
1948
|
-
const k = `${typeof
|
|
1948
|
+
x: W,
|
|
1949
|
+
y: L
|
|
1950
|
+
} = f, G = `translate(${W}${C},${L}${C})`;
|
|
1951
|
+
if (y) {
|
|
1952
|
+
const k = `${typeof y.x == "string" ? y.x : y.x + C}`, H = `${typeof y.y == "string" ? y.y : y.y + C}`;
|
|
1949
1953
|
G = `translate(${k}, ${H})` + G;
|
|
1950
1954
|
}
|
|
1951
1955
|
return G;
|
|
1952
1956
|
}
|
|
1953
|
-
function a(
|
|
1954
|
-
return
|
|
1957
|
+
function a(f, y) {
|
|
1958
|
+
return f.targetTouches && (0, e.findInArray)(f.targetTouches, (C) => y === C.identifier) || f.changedTouches && (0, e.findInArray)(f.changedTouches, (C) => y === C.identifier);
|
|
1955
1959
|
}
|
|
1956
|
-
function
|
|
1957
|
-
if (
|
|
1958
|
-
if (
|
|
1960
|
+
function s(f) {
|
|
1961
|
+
if (f.targetTouches && f.targetTouches[0]) return f.targetTouches[0].identifier;
|
|
1962
|
+
if (f.changedTouches && f.changedTouches[0]) return f.changedTouches[0].identifier;
|
|
1959
1963
|
}
|
|
1960
|
-
function g(
|
|
1961
|
-
if (!
|
|
1962
|
-
let
|
|
1963
|
-
|
|
1964
|
-
`,
|
|
1965
|
-
`,
|
|
1964
|
+
function g(f) {
|
|
1965
|
+
if (!f) return;
|
|
1966
|
+
let y = f.getElementById("react-draggable-style-el");
|
|
1967
|
+
y || (y = f.createElement("style"), y.type = "text/css", y.id = "react-draggable-style-el", y.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1968
|
+
`, y.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1969
|
+
`, f.getElementsByTagName("head")[0].appendChild(y)), f.body && u(f.body, "react-draggable-transparent-selection");
|
|
1966
1970
|
}
|
|
1967
|
-
function b(
|
|
1971
|
+
function b(f) {
|
|
1968
1972
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1969
|
-
|
|
1970
|
-
}) :
|
|
1973
|
+
R(f);
|
|
1974
|
+
}) : R(f);
|
|
1971
1975
|
}
|
|
1972
|
-
function
|
|
1973
|
-
if (
|
|
1976
|
+
function R(f) {
|
|
1977
|
+
if (f)
|
|
1974
1978
|
try {
|
|
1975
|
-
if (
|
|
1976
|
-
|
|
1979
|
+
if (f.body && w(f.body, "react-draggable-transparent-selection"), f.selection)
|
|
1980
|
+
f.selection.empty();
|
|
1977
1981
|
else {
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1982
|
+
const y = (f.defaultView || window).getSelection();
|
|
1983
|
+
y && y.type !== "Caret" && y.removeAllRanges();
|
|
1980
1984
|
}
|
|
1981
1985
|
} catch {
|
|
1982
1986
|
}
|
|
1983
1987
|
}
|
|
1984
|
-
function
|
|
1985
|
-
|
|
1988
|
+
function u(f, y) {
|
|
1989
|
+
f.classList ? f.classList.add(y) : f.className.match(new RegExp(`(?:^|\\s)${y}(?!\\S)`)) || (f.className += ` ${y}`);
|
|
1986
1990
|
}
|
|
1987
|
-
function w(
|
|
1988
|
-
|
|
1991
|
+
function w(f, y) {
|
|
1992
|
+
f.classList ? f.classList.remove(y) : f.className = f.className.replace(new RegExp(`(?:^|\\s)${y}(?!\\S)`, "g"), "");
|
|
1989
1993
|
}
|
|
1990
1994
|
return ge;
|
|
1991
1995
|
}
|
|
@@ -1994,81 +1998,81 @@ function Wn() {
|
|
|
1994
1998
|
if (Kr) return He;
|
|
1995
1999
|
Kr = 1, Object.defineProperty(He, "__esModule", {
|
|
1996
2000
|
value: !0
|
|
1997
|
-
}), He.canDragX = o, He.canDragY =
|
|
2001
|
+
}), He.canDragX = o, He.canDragY = i, He.createCoreData = p, He.createDraggableData = c, He.getBoundPosition = r, He.getControlPosition = l, He.snapToGrid = n;
|
|
1998
2002
|
var e = tr(), t = Pr();
|
|
1999
|
-
function r(h,
|
|
2000
|
-
if (!h.props.bounds) return [
|
|
2003
|
+
function r(h, S, E) {
|
|
2004
|
+
if (!h.props.bounds) return [S, E];
|
|
2001
2005
|
let {
|
|
2002
2006
|
bounds: O
|
|
2003
2007
|
} = h.props;
|
|
2004
|
-
O = typeof O == "string" ? O :
|
|
2005
|
-
const
|
|
2008
|
+
O = typeof O == "string" ? O : x(O);
|
|
2009
|
+
const v = m(h);
|
|
2006
2010
|
if (typeof O == "string") {
|
|
2007
2011
|
const {
|
|
2008
2012
|
ownerDocument: a
|
|
2009
|
-
} =
|
|
2013
|
+
} = v, s = a.defaultView;
|
|
2010
2014
|
let g;
|
|
2011
|
-
if (O === "parent" ? g =
|
|
2015
|
+
if (O === "parent" ? g = v.parentNode : g = v.getRootNode().querySelector(O), !(g instanceof s.HTMLElement))
|
|
2012
2016
|
throw new Error('Bounds selector "' + O + '" could not find an element.');
|
|
2013
|
-
const b = g,
|
|
2017
|
+
const b = g, R = s.getComputedStyle(v), u = s.getComputedStyle(b);
|
|
2014
2018
|
O = {
|
|
2015
|
-
left: -
|
|
2016
|
-
top: -
|
|
2017
|
-
right: (0, t.innerWidth)(b) - (0, t.outerWidth)(
|
|
2018
|
-
bottom: (0, t.innerHeight)(b) - (0, t.outerHeight)(
|
|
2019
|
+
left: -v.offsetLeft + (0, e.int)(u.paddingLeft) + (0, e.int)(R.marginLeft),
|
|
2020
|
+
top: -v.offsetTop + (0, e.int)(u.paddingTop) + (0, e.int)(R.marginTop),
|
|
2021
|
+
right: (0, t.innerWidth)(b) - (0, t.outerWidth)(v) - v.offsetLeft + (0, e.int)(u.paddingRight) - (0, e.int)(R.marginRight),
|
|
2022
|
+
bottom: (0, t.innerHeight)(b) - (0, t.outerHeight)(v) - v.offsetTop + (0, e.int)(u.paddingBottom) - (0, e.int)(R.marginBottom)
|
|
2019
2023
|
};
|
|
2020
2024
|
}
|
|
2021
|
-
return (0, e.isNum)(O.right) && (
|
|
2025
|
+
return (0, e.isNum)(O.right) && (S = Math.min(S, O.right)), (0, e.isNum)(O.bottom) && (E = Math.min(E, O.bottom)), (0, e.isNum)(O.left) && (S = Math.max(S, O.left)), (0, e.isNum)(O.top) && (E = Math.max(E, O.top)), [S, E];
|
|
2022
2026
|
}
|
|
2023
|
-
function n(h,
|
|
2024
|
-
const O = Math.round(
|
|
2025
|
-
return [O,
|
|
2027
|
+
function n(h, S, E) {
|
|
2028
|
+
const O = Math.round(S / h[0]) * h[0], v = Math.round(E / h[1]) * h[1];
|
|
2029
|
+
return [O, v];
|
|
2026
2030
|
}
|
|
2027
2031
|
function o(h) {
|
|
2028
2032
|
return h.props.axis === "both" || h.props.axis === "x";
|
|
2029
2033
|
}
|
|
2030
|
-
function
|
|
2034
|
+
function i(h) {
|
|
2031
2035
|
return h.props.axis === "both" || h.props.axis === "y";
|
|
2032
2036
|
}
|
|
2033
|
-
function l(h,
|
|
2034
|
-
const O = typeof
|
|
2035
|
-
if (typeof
|
|
2036
|
-
const
|
|
2037
|
+
function l(h, S, E) {
|
|
2038
|
+
const O = typeof S == "number" ? (0, t.getTouch)(h, S) : null;
|
|
2039
|
+
if (typeof S == "number" && !O) return null;
|
|
2040
|
+
const v = m(E), a = E.props.offsetParent || v.offsetParent || v.ownerDocument.body;
|
|
2037
2041
|
return (0, t.offsetXYFromParent)(O || h, a, E.props.scale);
|
|
2038
2042
|
}
|
|
2039
|
-
function
|
|
2040
|
-
const O = !(0, e.isNum)(h.lastX),
|
|
2043
|
+
function p(h, S, E) {
|
|
2044
|
+
const O = !(0, e.isNum)(h.lastX), v = m(h);
|
|
2041
2045
|
return O ? {
|
|
2042
|
-
node:
|
|
2046
|
+
node: v,
|
|
2043
2047
|
deltaX: 0,
|
|
2044
2048
|
deltaY: 0,
|
|
2045
|
-
lastX:
|
|
2049
|
+
lastX: S,
|
|
2046
2050
|
lastY: E,
|
|
2047
|
-
x:
|
|
2051
|
+
x: S,
|
|
2048
2052
|
y: E
|
|
2049
2053
|
} : {
|
|
2050
|
-
node:
|
|
2051
|
-
deltaX:
|
|
2054
|
+
node: v,
|
|
2055
|
+
deltaX: S - h.lastX,
|
|
2052
2056
|
deltaY: E - h.lastY,
|
|
2053
2057
|
lastX: h.lastX,
|
|
2054
2058
|
lastY: h.lastY,
|
|
2055
|
-
x:
|
|
2059
|
+
x: S,
|
|
2056
2060
|
y: E
|
|
2057
2061
|
};
|
|
2058
2062
|
}
|
|
2059
|
-
function
|
|
2063
|
+
function c(h, S) {
|
|
2060
2064
|
const E = h.props.scale;
|
|
2061
2065
|
return {
|
|
2062
|
-
node:
|
|
2063
|
-
x: h.state.x +
|
|
2064
|
-
y: h.state.y +
|
|
2065
|
-
deltaX:
|
|
2066
|
-
deltaY:
|
|
2066
|
+
node: S.node,
|
|
2067
|
+
x: h.state.x + S.deltaX / E,
|
|
2068
|
+
y: h.state.y + S.deltaY / E,
|
|
2069
|
+
deltaX: S.deltaX / E,
|
|
2070
|
+
deltaY: S.deltaY / E,
|
|
2067
2071
|
lastX: h.state.x,
|
|
2068
2072
|
lastY: h.state.y
|
|
2069
2073
|
};
|
|
2070
2074
|
}
|
|
2071
|
-
function
|
|
2075
|
+
function x(h) {
|
|
2072
2076
|
return {
|
|
2073
2077
|
left: h.left,
|
|
2074
2078
|
top: h.top,
|
|
@@ -2077,10 +2081,10 @@ function Wn() {
|
|
|
2077
2081
|
};
|
|
2078
2082
|
}
|
|
2079
2083
|
function m(h) {
|
|
2080
|
-
const
|
|
2081
|
-
if (!
|
|
2084
|
+
const S = h.findDOMNode();
|
|
2085
|
+
if (!S)
|
|
2082
2086
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
2083
|
-
return
|
|
2087
|
+
return S;
|
|
2084
2088
|
}
|
|
2085
2089
|
return He;
|
|
2086
2090
|
}
|
|
@@ -2100,42 +2104,42 @@ function ra() {
|
|
|
2100
2104
|
Qr = 1, Object.defineProperty(bt, "__esModule", {
|
|
2101
2105
|
value: !0
|
|
2102
2106
|
}), bt.default = void 0;
|
|
2103
|
-
var e =
|
|
2104
|
-
function
|
|
2105
|
-
return
|
|
2107
|
+
var e = c(Ee), t = p(/* @__PURE__ */ er()), r = p(mn), n = Pr(), o = Wn(), i = tr(), l = p(qn());
|
|
2108
|
+
function p(v) {
|
|
2109
|
+
return v && v.__esModule ? v : { default: v };
|
|
2106
2110
|
}
|
|
2107
|
-
function
|
|
2108
|
-
if (typeof WeakMap == "function") var
|
|
2109
|
-
return (
|
|
2110
|
-
if (!
|
|
2111
|
-
var
|
|
2112
|
-
if (b === null || typeof b != "object" && typeof b != "function") return
|
|
2113
|
-
if (
|
|
2114
|
-
if (
|
|
2115
|
-
|
|
2111
|
+
function c(v, a) {
|
|
2112
|
+
if (typeof WeakMap == "function") var s = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap();
|
|
2113
|
+
return (c = function(b, R) {
|
|
2114
|
+
if (!R && b && b.__esModule) return b;
|
|
2115
|
+
var u, w, f = { __proto__: null, default: b };
|
|
2116
|
+
if (b === null || typeof b != "object" && typeof b != "function") return f;
|
|
2117
|
+
if (u = R ? g : s) {
|
|
2118
|
+
if (u.has(b)) return u.get(b);
|
|
2119
|
+
u.set(b, f);
|
|
2116
2120
|
}
|
|
2117
|
-
for (const
|
|
2118
|
-
return
|
|
2119
|
-
})(
|
|
2121
|
+
for (const y in b) y !== "default" && {}.hasOwnProperty.call(b, y) && ((w = (u = Object.defineProperty) && Object.getOwnPropertyDescriptor(b, y)) && (w.get || w.set) ? u(f, y, w) : f[y] = b[y]);
|
|
2122
|
+
return f;
|
|
2123
|
+
})(v, a);
|
|
2120
2124
|
}
|
|
2121
|
-
function v
|
|
2122
|
-
return (a = m(a)) in
|
|
2125
|
+
function x(v, a, s) {
|
|
2126
|
+
return (a = m(a)) in v ? Object.defineProperty(v, a, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : v[a] = s, v;
|
|
2123
2127
|
}
|
|
2124
|
-
function m(
|
|
2125
|
-
var a = h(
|
|
2128
|
+
function m(v) {
|
|
2129
|
+
var a = h(v, "string");
|
|
2126
2130
|
return typeof a == "symbol" ? a : a + "";
|
|
2127
2131
|
}
|
|
2128
|
-
function h(
|
|
2129
|
-
if (typeof
|
|
2130
|
-
var
|
|
2131
|
-
if (
|
|
2132
|
-
var g =
|
|
2132
|
+
function h(v, a) {
|
|
2133
|
+
if (typeof v != "object" || !v) return v;
|
|
2134
|
+
var s = v[Symbol.toPrimitive];
|
|
2135
|
+
if (s !== void 0) {
|
|
2136
|
+
var g = s.call(v, a);
|
|
2133
2137
|
if (typeof g != "object") return g;
|
|
2134
2138
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2135
2139
|
}
|
|
2136
|
-
return (a === "string" ? String : Number)(
|
|
2140
|
+
return (a === "string" ? String : Number)(v);
|
|
2137
2141
|
}
|
|
2138
|
-
const
|
|
2142
|
+
const S = {
|
|
2139
2143
|
touch: {
|
|
2140
2144
|
start: "touchstart",
|
|
2141
2145
|
move: "touchmove",
|
|
@@ -2147,73 +2151,73 @@ function ra() {
|
|
|
2147
2151
|
stop: "mouseup"
|
|
2148
2152
|
}
|
|
2149
2153
|
};
|
|
2150
|
-
let E =
|
|
2154
|
+
let E = S.mouse, O = class extends e.Component {
|
|
2151
2155
|
constructor() {
|
|
2152
|
-
super(...arguments),
|
|
2156
|
+
super(...arguments), x(this, "dragging", !1), x(this, "lastX", NaN), x(this, "lastY", NaN), x(this, "touchIdentifier", null), x(this, "mounted", !1), x(this, "handleDragStart", (a) => {
|
|
2153
2157
|
if (this.props.onMouseDown(a), !this.props.allowAnyClick && typeof a.button == "number" && a.button !== 0) return !1;
|
|
2154
|
-
const
|
|
2155
|
-
if (!
|
|
2158
|
+
const s = this.findDOMNode();
|
|
2159
|
+
if (!s || !s.ownerDocument || !s.ownerDocument.body)
|
|
2156
2160
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
2157
2161
|
const {
|
|
2158
2162
|
ownerDocument: g
|
|
2159
|
-
} =
|
|
2160
|
-
if (this.props.disabled || !(a.target instanceof g.defaultView.Node) || this.props.handle && !(0, n.matchesSelectorAndParentsTo)(a.target, this.props.handle,
|
|
2163
|
+
} = s;
|
|
2164
|
+
if (this.props.disabled || !(a.target instanceof g.defaultView.Node) || this.props.handle && !(0, n.matchesSelectorAndParentsTo)(a.target, this.props.handle, s) || this.props.cancel && (0, n.matchesSelectorAndParentsTo)(a.target, this.props.cancel, s))
|
|
2161
2165
|
return;
|
|
2162
2166
|
a.type === "touchstart" && !this.props.allowMobileScroll && a.preventDefault();
|
|
2163
2167
|
const b = (0, n.getTouchIdentifier)(a);
|
|
2164
2168
|
this.touchIdentifier = b;
|
|
2165
|
-
const
|
|
2166
|
-
if (
|
|
2169
|
+
const R = (0, o.getControlPosition)(a, b, this);
|
|
2170
|
+
if (R == null) return;
|
|
2167
2171
|
const {
|
|
2168
|
-
x:
|
|
2172
|
+
x: u,
|
|
2169
2173
|
y: w
|
|
2170
|
-
} =
|
|
2171
|
-
(0, l.default)("DraggableCore: handleDragStart: %j",
|
|
2172
|
-
}),
|
|
2173
|
-
const
|
|
2174
|
-
if (
|
|
2174
|
+
} = R, f = (0, o.createCoreData)(this, u, w);
|
|
2175
|
+
(0, l.default)("DraggableCore: handleDragStart: %j", f), (0, l.default)("calling", this.props.onStart), !(this.props.onStart(a, f) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, n.addUserSelectStyles)(g), this.dragging = !0, this.lastX = u, this.lastY = w, (0, n.addEvent)(g, E.move, this.handleDrag), (0, n.addEvent)(g, E.stop, this.handleDragStop));
|
|
2176
|
+
}), x(this, "handleDrag", (a) => {
|
|
2177
|
+
const s = (0, o.getControlPosition)(a, this.touchIdentifier, this);
|
|
2178
|
+
if (s == null) return;
|
|
2175
2179
|
let {
|
|
2176
2180
|
x: g,
|
|
2177
2181
|
y: b
|
|
2178
|
-
} =
|
|
2182
|
+
} = s;
|
|
2179
2183
|
if (Array.isArray(this.props.grid)) {
|
|
2180
|
-
let w = g - this.lastX,
|
|
2181
|
-
if ([w,
|
|
2182
|
-
g = this.lastX + w, b = this.lastY +
|
|
2184
|
+
let w = g - this.lastX, f = b - this.lastY;
|
|
2185
|
+
if ([w, f] = (0, o.snapToGrid)(this.props.grid, w, f), !w && !f) return;
|
|
2186
|
+
g = this.lastX + w, b = this.lastY + f;
|
|
2183
2187
|
}
|
|
2184
|
-
const
|
|
2185
|
-
if ((0, l.default)("DraggableCore: handleDrag: %j",
|
|
2188
|
+
const R = (0, o.createCoreData)(this, g, b);
|
|
2189
|
+
if ((0, l.default)("DraggableCore: handleDrag: %j", R), this.props.onDrag(a, R) === !1 || this.mounted === !1) {
|
|
2186
2190
|
try {
|
|
2187
2191
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
2188
2192
|
} catch {
|
|
2189
|
-
const
|
|
2190
|
-
|
|
2193
|
+
const f = document.createEvent("MouseEvents");
|
|
2194
|
+
f.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(f);
|
|
2191
2195
|
}
|
|
2192
2196
|
return;
|
|
2193
2197
|
}
|
|
2194
2198
|
this.lastX = g, this.lastY = b;
|
|
2195
|
-
}),
|
|
2199
|
+
}), x(this, "handleDragStop", (a) => {
|
|
2196
2200
|
if (!this.dragging) return;
|
|
2197
|
-
const
|
|
2198
|
-
if (
|
|
2201
|
+
const s = (0, o.getControlPosition)(a, this.touchIdentifier, this);
|
|
2202
|
+
if (s == null) return;
|
|
2199
2203
|
let {
|
|
2200
2204
|
x: g,
|
|
2201
2205
|
y: b
|
|
2202
|
-
} =
|
|
2206
|
+
} = s;
|
|
2203
2207
|
if (Array.isArray(this.props.grid)) {
|
|
2204
|
-
let
|
|
2205
|
-
[
|
|
2208
|
+
let f = g - this.lastX || 0, y = b - this.lastY || 0;
|
|
2209
|
+
[f, y] = (0, o.snapToGrid)(this.props.grid, f, y), g = this.lastX + f, b = this.lastY + y;
|
|
2206
2210
|
}
|
|
2207
|
-
const
|
|
2208
|
-
if (this.props.onStop(a,
|
|
2211
|
+
const R = (0, o.createCoreData)(this, g, b);
|
|
2212
|
+
if (this.props.onStop(a, R) === !1 || this.mounted === !1) return !1;
|
|
2209
2213
|
const w = this.findDOMNode();
|
|
2210
|
-
w && this.props.enableUserSelectHack && (0, n.scheduleRemoveUserSelectStyles)(w.ownerDocument), (0, l.default)("DraggableCore: handleDragStop: %j",
|
|
2211
|
-
}),
|
|
2214
|
+
w && this.props.enableUserSelectHack && (0, n.scheduleRemoveUserSelectStyles)(w.ownerDocument), (0, l.default)("DraggableCore: handleDragStop: %j", R), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, w && ((0, l.default)("DraggableCore: Removing handlers"), (0, n.removeEvent)(w.ownerDocument, E.move, this.handleDrag), (0, n.removeEvent)(w.ownerDocument, E.stop, this.handleDragStop));
|
|
2215
|
+
}), x(this, "onMouseDown", (a) => (E = S.mouse, this.handleDragStart(a))), x(this, "onMouseUp", (a) => (E = S.mouse, this.handleDragStop(a))), x(this, "onTouchStart", (a) => (E = S.touch, this.handleDragStart(a))), x(this, "onTouchEnd", (a) => (E = S.touch, this.handleDragStop(a)));
|
|
2212
2216
|
}
|
|
2213
2217
|
componentDidMount() {
|
|
2214
2218
|
this.mounted = !0;
|
|
2215
2219
|
const a = this.findDOMNode();
|
|
2216
|
-
a && (0, n.addEvent)(a,
|
|
2220
|
+
a && (0, n.addEvent)(a, S.touch.start, this.onTouchStart, {
|
|
2217
2221
|
passive: !1
|
|
2218
2222
|
});
|
|
2219
2223
|
}
|
|
@@ -2222,11 +2226,11 @@ function ra() {
|
|
|
2222
2226
|
const a = this.findDOMNode();
|
|
2223
2227
|
if (a) {
|
|
2224
2228
|
const {
|
|
2225
|
-
ownerDocument:
|
|
2229
|
+
ownerDocument: s
|
|
2226
2230
|
} = a;
|
|
2227
|
-
(0, n.removeEvent)(
|
|
2231
|
+
(0, n.removeEvent)(s, S.mouse.move, this.handleDrag), (0, n.removeEvent)(s, S.touch.move, this.handleDrag), (0, n.removeEvent)(s, S.mouse.stop, this.handleDragStop), (0, n.removeEvent)(s, S.touch.stop, this.handleDragStop), (0, n.removeEvent)(a, S.touch.start, this.onTouchStart, {
|
|
2228
2232
|
passive: !1
|
|
2229
|
-
}), this.props.enableUserSelectHack && (0, n.scheduleRemoveUserSelectStyles)(
|
|
2233
|
+
}), this.props.enableUserSelectHack && (0, n.scheduleRemoveUserSelectStyles)(s);
|
|
2230
2234
|
}
|
|
2231
2235
|
}
|
|
2232
2236
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
@@ -2247,7 +2251,7 @@ function ra() {
|
|
|
2247
2251
|
});
|
|
2248
2252
|
}
|
|
2249
2253
|
};
|
|
2250
|
-
return bt.default = O,
|
|
2254
|
+
return bt.default = O, x(O, "displayName", "DraggableCore"), x(O, "propTypes", {
|
|
2251
2255
|
/**
|
|
2252
2256
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
2253
2257
|
* By default, we only accept the left button.
|
|
@@ -2279,8 +2283,8 @@ function ra() {
|
|
|
2279
2283
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
2280
2284
|
* instead of using the parent node.
|
|
2281
2285
|
*/
|
|
2282
|
-
offsetParent: function(
|
|
2283
|
-
if (
|
|
2286
|
+
offsetParent: function(v, a) {
|
|
2287
|
+
if (v[a] && v[a].nodeType !== 1)
|
|
2284
2288
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
2285
2289
|
},
|
|
2286
2290
|
/**
|
|
@@ -2374,10 +2378,10 @@ function ra() {
|
|
|
2374
2378
|
/**
|
|
2375
2379
|
* These properties should be defined on the child, not here.
|
|
2376
2380
|
*/
|
|
2377
|
-
className:
|
|
2378
|
-
style:
|
|
2379
|
-
transform:
|
|
2380
|
-
}),
|
|
2381
|
+
className: i.dontSetMe,
|
|
2382
|
+
style: i.dontSetMe,
|
|
2383
|
+
transform: i.dontSetMe
|
|
2384
|
+
}), x(O, "defaultProps", {
|
|
2381
2385
|
allowAnyClick: !1,
|
|
2382
2386
|
// by default only accept left click
|
|
2383
2387
|
allowMobileScroll: !1,
|
|
@@ -2402,103 +2406,103 @@ function na() {
|
|
|
2402
2406
|
}), Object.defineProperty(e, "DraggableCore", {
|
|
2403
2407
|
enumerable: !0,
|
|
2404
2408
|
get: function() {
|
|
2405
|
-
return
|
|
2409
|
+
return c.default;
|
|
2406
2410
|
}
|
|
2407
2411
|
}), e.default = void 0;
|
|
2408
|
-
var t = h(Ee), r = m(/* @__PURE__ */ er()), n = m(mn), o = gr,
|
|
2409
|
-
function m(
|
|
2410
|
-
return
|
|
2411
|
-
}
|
|
2412
|
-
function h(
|
|
2413
|
-
if (typeof WeakMap == "function") var b = /* @__PURE__ */ new WeakMap(),
|
|
2414
|
-
return (h = function(
|
|
2415
|
-
if (!w &&
|
|
2416
|
-
var
|
|
2417
|
-
if (
|
|
2418
|
-
if (
|
|
2419
|
-
if (
|
|
2420
|
-
|
|
2412
|
+
var t = h(Ee), r = m(/* @__PURE__ */ er()), n = m(mn), o = gr, i = Pr(), l = Wn(), p = tr(), c = m(ra()), x = m(qn());
|
|
2413
|
+
function m(s) {
|
|
2414
|
+
return s && s.__esModule ? s : { default: s };
|
|
2415
|
+
}
|
|
2416
|
+
function h(s, g) {
|
|
2417
|
+
if (typeof WeakMap == "function") var b = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap();
|
|
2418
|
+
return (h = function(u, w) {
|
|
2419
|
+
if (!w && u && u.__esModule) return u;
|
|
2420
|
+
var f, y, C = { __proto__: null, default: u };
|
|
2421
|
+
if (u === null || typeof u != "object" && typeof u != "function") return C;
|
|
2422
|
+
if (f = w ? R : b) {
|
|
2423
|
+
if (f.has(u)) return f.get(u);
|
|
2424
|
+
f.set(u, C);
|
|
2421
2425
|
}
|
|
2422
|
-
for (const
|
|
2426
|
+
for (const W in u) W !== "default" && {}.hasOwnProperty.call(u, W) && ((y = (f = Object.defineProperty) && Object.getOwnPropertyDescriptor(u, W)) && (y.get || y.set) ? f(C, W, y) : C[W] = u[W]);
|
|
2423
2427
|
return C;
|
|
2424
|
-
})(
|
|
2428
|
+
})(s, g);
|
|
2425
2429
|
}
|
|
2426
|
-
function
|
|
2427
|
-
return
|
|
2430
|
+
function S() {
|
|
2431
|
+
return S = Object.assign ? Object.assign.bind() : function(s) {
|
|
2428
2432
|
for (var g = 1; g < arguments.length; g++) {
|
|
2429
2433
|
var b = arguments[g];
|
|
2430
|
-
for (var
|
|
2434
|
+
for (var R in b) ({}).hasOwnProperty.call(b, R) && (s[R] = b[R]);
|
|
2431
2435
|
}
|
|
2432
|
-
return
|
|
2433
|
-
},
|
|
2436
|
+
return s;
|
|
2437
|
+
}, S.apply(null, arguments);
|
|
2434
2438
|
}
|
|
2435
|
-
function E(
|
|
2436
|
-
return (g = O(g)) in
|
|
2439
|
+
function E(s, g, b) {
|
|
2440
|
+
return (g = O(g)) in s ? Object.defineProperty(s, g, { value: b, enumerable: !0, configurable: !0, writable: !0 }) : s[g] = b, s;
|
|
2437
2441
|
}
|
|
2438
|
-
function O(
|
|
2439
|
-
var g =
|
|
2442
|
+
function O(s) {
|
|
2443
|
+
var g = v(s, "string");
|
|
2440
2444
|
return typeof g == "symbol" ? g : g + "";
|
|
2441
2445
|
}
|
|
2442
|
-
function
|
|
2443
|
-
if (typeof
|
|
2444
|
-
var b =
|
|
2446
|
+
function v(s, g) {
|
|
2447
|
+
if (typeof s != "object" || !s) return s;
|
|
2448
|
+
var b = s[Symbol.toPrimitive];
|
|
2445
2449
|
if (b !== void 0) {
|
|
2446
|
-
var
|
|
2447
|
-
if (typeof
|
|
2450
|
+
var R = b.call(s, g);
|
|
2451
|
+
if (typeof R != "object") return R;
|
|
2448
2452
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2449
2453
|
}
|
|
2450
|
-
return (g === "string" ? String : Number)(
|
|
2454
|
+
return (g === "string" ? String : Number)(s);
|
|
2451
2455
|
}
|
|
2452
2456
|
class a extends t.Component {
|
|
2453
2457
|
// React 16.3+
|
|
2454
2458
|
// Arity (props, state)
|
|
2455
2459
|
static getDerivedStateFromProps(g, b) {
|
|
2456
2460
|
let {
|
|
2457
|
-
position:
|
|
2461
|
+
position: R
|
|
2458
2462
|
} = g, {
|
|
2459
|
-
prevPropsPosition:
|
|
2463
|
+
prevPropsPosition: u
|
|
2460
2464
|
} = b;
|
|
2461
|
-
return
|
|
2462
|
-
position:
|
|
2463
|
-
prevPropsPosition:
|
|
2465
|
+
return R && (!u || R.x !== u.x || R.y !== u.y) ? ((0, x.default)("Draggable: getDerivedStateFromProps %j", {
|
|
2466
|
+
position: R,
|
|
2467
|
+
prevPropsPosition: u
|
|
2464
2468
|
}), {
|
|
2465
|
-
x:
|
|
2466
|
-
y:
|
|
2469
|
+
x: R.x,
|
|
2470
|
+
y: R.y,
|
|
2467
2471
|
prevPropsPosition: {
|
|
2468
|
-
...
|
|
2472
|
+
...R
|
|
2469
2473
|
}
|
|
2470
2474
|
}) : null;
|
|
2471
2475
|
}
|
|
2472
2476
|
constructor(g) {
|
|
2473
|
-
super(g), E(this, "onDragStart", (b,
|
|
2474
|
-
if ((0,
|
|
2477
|
+
super(g), E(this, "onDragStart", (b, R) => {
|
|
2478
|
+
if ((0, x.default)("Draggable: onDragStart: %j", R), this.props.onStart(b, (0, l.createDraggableData)(this, R)) === !1) return !1;
|
|
2475
2479
|
this.setState({
|
|
2476
2480
|
dragging: !0,
|
|
2477
2481
|
dragged: !0
|
|
2478
2482
|
});
|
|
2479
|
-
}), E(this, "onDrag", (b,
|
|
2483
|
+
}), E(this, "onDrag", (b, R) => {
|
|
2480
2484
|
if (!this.state.dragging) return !1;
|
|
2481
|
-
(0,
|
|
2482
|
-
const
|
|
2483
|
-
x:
|
|
2484
|
-
y:
|
|
2485
|
+
(0, x.default)("Draggable: onDrag: %j", R);
|
|
2486
|
+
const u = (0, l.createDraggableData)(this, R), w = {
|
|
2487
|
+
x: u.x,
|
|
2488
|
+
y: u.y,
|
|
2485
2489
|
slackX: 0,
|
|
2486
2490
|
slackY: 0
|
|
2487
2491
|
};
|
|
2488
2492
|
if (this.props.bounds) {
|
|
2489
2493
|
const {
|
|
2490
|
-
x,
|
|
2494
|
+
x: y,
|
|
2491
2495
|
y: C
|
|
2492
2496
|
} = w;
|
|
2493
2497
|
w.x += this.state.slackX, w.y += this.state.slackY;
|
|
2494
|
-
const [
|
|
2495
|
-
w.x =
|
|
2498
|
+
const [W, L] = (0, l.getBoundPosition)(this, w.x, w.y);
|
|
2499
|
+
w.x = W, w.y = L, w.slackX = this.state.slackX + (y - w.x), w.slackY = this.state.slackY + (C - w.y), u.x = w.x, u.y = w.y, u.deltaX = w.x - this.state.x, u.deltaY = w.y - this.state.y;
|
|
2496
2500
|
}
|
|
2497
|
-
if (this.props.onDrag(b,
|
|
2501
|
+
if (this.props.onDrag(b, u) === !1) return !1;
|
|
2498
2502
|
this.setState(w);
|
|
2499
|
-
}), E(this, "onDragStop", (b,
|
|
2500
|
-
if (!this.state.dragging || this.props.onStop(b, (0, l.createDraggableData)(this,
|
|
2501
|
-
(0,
|
|
2503
|
+
}), E(this, "onDragStop", (b, R) => {
|
|
2504
|
+
if (!this.state.dragging || this.props.onStop(b, (0, l.createDraggableData)(this, R)) === !1) return !1;
|
|
2505
|
+
(0, x.default)("Draggable: onDragStop: %j", R);
|
|
2502
2506
|
const w = {
|
|
2503
2507
|
dragging: !1,
|
|
2504
2508
|
slackX: 0,
|
|
@@ -2506,10 +2510,10 @@ function na() {
|
|
|
2506
2510
|
};
|
|
2507
2511
|
if (!!this.props.position) {
|
|
2508
2512
|
const {
|
|
2509
|
-
x,
|
|
2513
|
+
x: y,
|
|
2510
2514
|
y: C
|
|
2511
2515
|
} = this.props.position;
|
|
2512
|
-
w.x =
|
|
2516
|
+
w.x = y, w.y = C;
|
|
2513
2517
|
}
|
|
2514
2518
|
this.setState(w);
|
|
2515
2519
|
}), this.state = {
|
|
@@ -2549,36 +2553,36 @@ function na() {
|
|
|
2549
2553
|
const {
|
|
2550
2554
|
axis: g,
|
|
2551
2555
|
bounds: b,
|
|
2552
|
-
children:
|
|
2553
|
-
defaultPosition:
|
|
2556
|
+
children: R,
|
|
2557
|
+
defaultPosition: u,
|
|
2554
2558
|
defaultClassName: w,
|
|
2555
|
-
defaultClassNameDragging:
|
|
2556
|
-
defaultClassNameDragged:
|
|
2559
|
+
defaultClassNameDragging: f,
|
|
2560
|
+
defaultClassNameDragged: y,
|
|
2557
2561
|
position: C,
|
|
2558
|
-
positionOffset:
|
|
2559
|
-
scale:
|
|
2562
|
+
positionOffset: W,
|
|
2563
|
+
scale: L,
|
|
2560
2564
|
...G
|
|
2561
2565
|
} = this.props;
|
|
2562
2566
|
let k = {}, H = null;
|
|
2563
|
-
const X = !!!C || this.state.dragging, V = C ||
|
|
2567
|
+
const X = !!!C || this.state.dragging, V = C || u, ie = {
|
|
2564
2568
|
// Set left if horizontal drag is enabled
|
|
2565
2569
|
x: (0, l.canDragX)(this) && X ? this.state.x : V.x,
|
|
2566
2570
|
// Set top if vertical drag is enabled
|
|
2567
2571
|
y: (0, l.canDragY)(this) && X ? this.state.y : V.y
|
|
2568
2572
|
};
|
|
2569
|
-
this.state.isElementSVG ? H = (0,
|
|
2570
|
-
const me = (0, o.clsx)(
|
|
2571
|
-
[
|
|
2572
|
-
[
|
|
2573
|
+
this.state.isElementSVG ? H = (0, i.createSVGTransform)(ie, W) : k = (0, i.createCSSTransform)(ie, W);
|
|
2574
|
+
const me = (0, o.clsx)(R.props.className || "", w, {
|
|
2575
|
+
[f]: this.state.dragging,
|
|
2576
|
+
[y]: this.state.dragged
|
|
2573
2577
|
});
|
|
2574
|
-
return /* @__PURE__ */ t.createElement(
|
|
2578
|
+
return /* @__PURE__ */ t.createElement(c.default, S({}, G, {
|
|
2575
2579
|
onStart: this.onDragStart,
|
|
2576
2580
|
onDrag: this.onDrag,
|
|
2577
2581
|
onStop: this.onDragStop
|
|
2578
|
-
}), /* @__PURE__ */ t.cloneElement(t.Children.only(
|
|
2582
|
+
}), /* @__PURE__ */ t.cloneElement(t.Children.only(R), {
|
|
2579
2583
|
className: me,
|
|
2580
2584
|
style: {
|
|
2581
|
-
...
|
|
2585
|
+
...R.props.style,
|
|
2582
2586
|
...k
|
|
2583
2587
|
},
|
|
2584
2588
|
transform: H
|
|
@@ -2587,7 +2591,7 @@ function na() {
|
|
|
2587
2591
|
}
|
|
2588
2592
|
e.default = a, E(a, "displayName", "Draggable"), E(a, "propTypes", {
|
|
2589
2593
|
// Accepts all props <DraggableCore> accepts.
|
|
2590
|
-
...
|
|
2594
|
+
...c.default.propTypes,
|
|
2591
2595
|
/**
|
|
2592
2596
|
* `axis` determines which axis the draggable can move.
|
|
2593
2597
|
*
|
|
@@ -2689,11 +2693,11 @@ function na() {
|
|
|
2689
2693
|
/**
|
|
2690
2694
|
* These properties should be defined on the child, not here.
|
|
2691
2695
|
*/
|
|
2692
|
-
className:
|
|
2693
|
-
style:
|
|
2694
|
-
transform:
|
|
2696
|
+
className: p.dontSetMe,
|
|
2697
|
+
style: p.dontSetMe,
|
|
2698
|
+
transform: p.dontSetMe
|
|
2695
2699
|
}), E(a, "defaultProps", {
|
|
2696
|
-
...
|
|
2700
|
+
...c.default.defaultProps,
|
|
2697
2701
|
axis: "both",
|
|
2698
2702
|
bounds: !1,
|
|
2699
2703
|
defaultClassName: "react-draggable",
|
|
@@ -2720,51 +2724,51 @@ function Cr() {
|
|
|
2720
2724
|
var oa = Cr(), xt = { exports: {} }, wt = {}, qt = {}, rn;
|
|
2721
2725
|
function aa() {
|
|
2722
2726
|
if (rn) return qt;
|
|
2723
|
-
rn = 1, qt.__esModule = !0, qt.cloneElement =
|
|
2727
|
+
rn = 1, qt.__esModule = !0, qt.cloneElement = p;
|
|
2724
2728
|
var e = t(Ee);
|
|
2725
|
-
function t(
|
|
2726
|
-
return
|
|
2729
|
+
function t(c) {
|
|
2730
|
+
return c && c.__esModule ? c : { default: c };
|
|
2727
2731
|
}
|
|
2728
|
-
function r(
|
|
2729
|
-
var m = Object.keys(
|
|
2732
|
+
function r(c, x) {
|
|
2733
|
+
var m = Object.keys(c);
|
|
2730
2734
|
if (Object.getOwnPropertySymbols) {
|
|
2731
|
-
var h = Object.getOwnPropertySymbols(
|
|
2732
|
-
|
|
2733
|
-
return Object.getOwnPropertyDescriptor(
|
|
2735
|
+
var h = Object.getOwnPropertySymbols(c);
|
|
2736
|
+
x && (h = h.filter(function(S) {
|
|
2737
|
+
return Object.getOwnPropertyDescriptor(c, S).enumerable;
|
|
2734
2738
|
})), m.push.apply(m, h);
|
|
2735
2739
|
}
|
|
2736
2740
|
return m;
|
|
2737
2741
|
}
|
|
2738
|
-
function n(
|
|
2739
|
-
for (var
|
|
2740
|
-
var m = arguments[
|
|
2741
|
-
|
|
2742
|
-
o(
|
|
2743
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
2744
|
-
Object.defineProperty(
|
|
2742
|
+
function n(c) {
|
|
2743
|
+
for (var x = 1; x < arguments.length; x++) {
|
|
2744
|
+
var m = arguments[x] != null ? arguments[x] : {};
|
|
2745
|
+
x % 2 ? r(Object(m), !0).forEach(function(h) {
|
|
2746
|
+
o(c, h, m[h]);
|
|
2747
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(c, Object.getOwnPropertyDescriptors(m)) : r(Object(m)).forEach(function(h) {
|
|
2748
|
+
Object.defineProperty(c, h, Object.getOwnPropertyDescriptor(m, h));
|
|
2745
2749
|
});
|
|
2746
2750
|
}
|
|
2747
|
-
return
|
|
2751
|
+
return c;
|
|
2748
2752
|
}
|
|
2749
|
-
function o(
|
|
2750
|
-
return (
|
|
2753
|
+
function o(c, x, m) {
|
|
2754
|
+
return (x = i(x)) in c ? Object.defineProperty(c, x, { value: m, enumerable: !0, configurable: !0, writable: !0 }) : c[x] = m, c;
|
|
2751
2755
|
}
|
|
2752
|
-
function
|
|
2753
|
-
var
|
|
2754
|
-
return typeof
|
|
2756
|
+
function i(c) {
|
|
2757
|
+
var x = l(c, "string");
|
|
2758
|
+
return typeof x == "symbol" ? x : x + "";
|
|
2755
2759
|
}
|
|
2756
|
-
function l(
|
|
2757
|
-
if (typeof
|
|
2758
|
-
var m =
|
|
2760
|
+
function l(c, x) {
|
|
2761
|
+
if (typeof c != "object" || !c) return c;
|
|
2762
|
+
var m = c[Symbol.toPrimitive];
|
|
2759
2763
|
if (m !== void 0) {
|
|
2760
|
-
var h = m.call(
|
|
2764
|
+
var h = m.call(c, x);
|
|
2761
2765
|
if (typeof h != "object") return h;
|
|
2762
2766
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2763
2767
|
}
|
|
2764
|
-
return (
|
|
2768
|
+
return (x === "string" ? String : Number)(c);
|
|
2765
2769
|
}
|
|
2766
|
-
function
|
|
2767
|
-
return
|
|
2770
|
+
function p(c, x) {
|
|
2771
|
+
return x.style && c.props.style && (x.style = n(n({}, c.props.style), x.style)), x.className && c.props.className && (x.className = `${c.props.className} ${x.className}`), /* @__PURE__ */ e.default.cloneElement(c, x);
|
|
2768
2772
|
}
|
|
2769
2773
|
return qt;
|
|
2770
2774
|
}
|
|
@@ -2817,8 +2821,8 @@ function $n() {
|
|
|
2817
2821
|
height: function() {
|
|
2818
2822
|
for (var r = arguments.length, n = new Array(r), o = 0; o < r; o++)
|
|
2819
2823
|
n[o] = arguments[o];
|
|
2820
|
-
const [
|
|
2821
|
-
return
|
|
2824
|
+
const [i] = n;
|
|
2825
|
+
return i.axis === "both" || i.axis === "y" ? e.default.number.isRequired(...n) : e.default.number(...n);
|
|
2822
2826
|
},
|
|
2823
2827
|
/*
|
|
2824
2828
|
* Customize cursor resize handle
|
|
@@ -2871,8 +2875,8 @@ function $n() {
|
|
|
2871
2875
|
width: function() {
|
|
2872
2876
|
for (var r = arguments.length, n = new Array(r), o = 0; o < r; o++)
|
|
2873
2877
|
n[o] = arguments[o];
|
|
2874
|
-
const [
|
|
2875
|
-
return
|
|
2878
|
+
const [i] = n;
|
|
2879
|
+
return i.axis === "both" || i.axis === "x" ? e.default.number.isRequired(...n) : e.default.number(...n);
|
|
2876
2880
|
}
|
|
2877
2881
|
}, St;
|
|
2878
2882
|
}
|
|
@@ -2880,86 +2884,86 @@ var on;
|
|
|
2880
2884
|
function Hn() {
|
|
2881
2885
|
if (on) return wt;
|
|
2882
2886
|
on = 1, wt.__esModule = !0, wt.default = void 0;
|
|
2883
|
-
var e =
|
|
2887
|
+
var e = i(Ee), t = Cr(), r = aa(), n = $n();
|
|
2884
2888
|
const o = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
|
|
2885
|
-
function
|
|
2886
|
-
if (typeof WeakMap == "function") var
|
|
2887
|
-
return (
|
|
2888
|
-
if (!
|
|
2889
|
-
var
|
|
2890
|
-
if (b === null || typeof b != "object" && typeof b != "function") return
|
|
2891
|
-
if (
|
|
2892
|
-
if (
|
|
2893
|
-
|
|
2889
|
+
function i(v, a) {
|
|
2890
|
+
if (typeof WeakMap == "function") var s = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap();
|
|
2891
|
+
return (i = function(b, R) {
|
|
2892
|
+
if (!R && b && b.__esModule) return b;
|
|
2893
|
+
var u, w, f = { __proto__: null, default: b };
|
|
2894
|
+
if (b === null || typeof b != "object" && typeof b != "function") return f;
|
|
2895
|
+
if (u = R ? g : s) {
|
|
2896
|
+
if (u.has(b)) return u.get(b);
|
|
2897
|
+
u.set(b, f);
|
|
2894
2898
|
}
|
|
2895
|
-
for (const
|
|
2896
|
-
return
|
|
2897
|
-
})(
|
|
2899
|
+
for (const y in b) y !== "default" && {}.hasOwnProperty.call(b, y) && ((w = (u = Object.defineProperty) && Object.getOwnPropertyDescriptor(b, y)) && (w.get || w.set) ? u(f, y, w) : f[y] = b[y]);
|
|
2900
|
+
return f;
|
|
2901
|
+
})(v, a);
|
|
2898
2902
|
}
|
|
2899
2903
|
function l() {
|
|
2900
|
-
return l = Object.assign ? Object.assign.bind() : function(
|
|
2904
|
+
return l = Object.assign ? Object.assign.bind() : function(v) {
|
|
2901
2905
|
for (var a = 1; a < arguments.length; a++) {
|
|
2902
|
-
var
|
|
2903
|
-
for (var g in
|
|
2906
|
+
var s = arguments[a];
|
|
2907
|
+
for (var g in s) ({}).hasOwnProperty.call(s, g) && (v[g] = s[g]);
|
|
2904
2908
|
}
|
|
2905
|
-
return
|
|
2909
|
+
return v;
|
|
2906
2910
|
}, l.apply(null, arguments);
|
|
2907
2911
|
}
|
|
2908
|
-
function
|
|
2909
|
-
if (
|
|
2910
|
-
var
|
|
2912
|
+
function p(v, a) {
|
|
2913
|
+
if (v == null) return {};
|
|
2914
|
+
var s, g, b = c(v, a);
|
|
2911
2915
|
if (Object.getOwnPropertySymbols) {
|
|
2912
|
-
var
|
|
2913
|
-
for (g = 0; g <
|
|
2916
|
+
var R = Object.getOwnPropertySymbols(v);
|
|
2917
|
+
for (g = 0; g < R.length; g++) s = R[g], a.indexOf(s) === -1 && {}.propertyIsEnumerable.call(v, s) && (b[s] = v[s]);
|
|
2914
2918
|
}
|
|
2915
2919
|
return b;
|
|
2916
2920
|
}
|
|
2917
|
-
function
|
|
2918
|
-
if (
|
|
2919
|
-
var
|
|
2920
|
-
for (var g in
|
|
2921
|
+
function c(v, a) {
|
|
2922
|
+
if (v == null) return {};
|
|
2923
|
+
var s = {};
|
|
2924
|
+
for (var g in v) if ({}.hasOwnProperty.call(v, g)) {
|
|
2921
2925
|
if (a.indexOf(g) !== -1) continue;
|
|
2922
|
-
|
|
2926
|
+
s[g] = v[g];
|
|
2923
2927
|
}
|
|
2924
|
-
return
|
|
2928
|
+
return s;
|
|
2925
2929
|
}
|
|
2926
|
-
function v
|
|
2927
|
-
var
|
|
2930
|
+
function x(v, a) {
|
|
2931
|
+
var s = Object.keys(v);
|
|
2928
2932
|
if (Object.getOwnPropertySymbols) {
|
|
2929
|
-
var g = Object.getOwnPropertySymbols(
|
|
2933
|
+
var g = Object.getOwnPropertySymbols(v);
|
|
2930
2934
|
a && (g = g.filter(function(b) {
|
|
2931
|
-
return Object.getOwnPropertyDescriptor(
|
|
2932
|
-
})),
|
|
2935
|
+
return Object.getOwnPropertyDescriptor(v, b).enumerable;
|
|
2936
|
+
})), s.push.apply(s, g);
|
|
2933
2937
|
}
|
|
2934
|
-
return
|
|
2938
|
+
return s;
|
|
2935
2939
|
}
|
|
2936
|
-
function m(
|
|
2940
|
+
function m(v) {
|
|
2937
2941
|
for (var a = 1; a < arguments.length; a++) {
|
|
2938
|
-
var
|
|
2939
|
-
a % 2 ?
|
|
2940
|
-
h(
|
|
2941
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
2942
|
-
Object.defineProperty(
|
|
2942
|
+
var s = arguments[a] != null ? arguments[a] : {};
|
|
2943
|
+
a % 2 ? x(Object(s), !0).forEach(function(g) {
|
|
2944
|
+
h(v, g, s[g]);
|
|
2945
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(v, Object.getOwnPropertyDescriptors(s)) : x(Object(s)).forEach(function(g) {
|
|
2946
|
+
Object.defineProperty(v, g, Object.getOwnPropertyDescriptor(s, g));
|
|
2943
2947
|
});
|
|
2944
2948
|
}
|
|
2945
|
-
return
|
|
2949
|
+
return v;
|
|
2946
2950
|
}
|
|
2947
|
-
function h(
|
|
2948
|
-
return (a =
|
|
2951
|
+
function h(v, a, s) {
|
|
2952
|
+
return (a = S(a)) in v ? Object.defineProperty(v, a, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : v[a] = s, v;
|
|
2949
2953
|
}
|
|
2950
|
-
function
|
|
2951
|
-
var a = E(
|
|
2954
|
+
function S(v) {
|
|
2955
|
+
var a = E(v, "string");
|
|
2952
2956
|
return typeof a == "symbol" ? a : a + "";
|
|
2953
2957
|
}
|
|
2954
|
-
function E(
|
|
2955
|
-
if (typeof
|
|
2956
|
-
var
|
|
2957
|
-
if (
|
|
2958
|
-
var g =
|
|
2958
|
+
function E(v, a) {
|
|
2959
|
+
if (typeof v != "object" || !v) return v;
|
|
2960
|
+
var s = v[Symbol.toPrimitive];
|
|
2961
|
+
if (s !== void 0) {
|
|
2962
|
+
var g = s.call(v, a);
|
|
2959
2963
|
if (typeof g != "object") return g;
|
|
2960
2964
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2961
2965
|
}
|
|
2962
|
-
return (a === "string" ? String : Number)(
|
|
2966
|
+
return (a === "string" ? String : Number)(v);
|
|
2963
2967
|
}
|
|
2964
2968
|
let O = class extends e.Component {
|
|
2965
2969
|
constructor() {
|
|
@@ -2972,20 +2976,20 @@ function Hn() {
|
|
|
2972
2976
|
this.lastHandleRect = this.slack = this.lastSize = null;
|
|
2973
2977
|
}
|
|
2974
2978
|
// Clamp width and height within provided constraints
|
|
2975
|
-
runConstraints(a,
|
|
2979
|
+
runConstraints(a, s) {
|
|
2976
2980
|
const {
|
|
2977
2981
|
minConstraints: g,
|
|
2978
2982
|
maxConstraints: b,
|
|
2979
|
-
lockAspectRatio:
|
|
2983
|
+
lockAspectRatio: R
|
|
2980
2984
|
} = this.props;
|
|
2981
|
-
if (!g && !b && !
|
|
2982
|
-
if (
|
|
2983
|
-
const C = this.props.width / this.props.height,
|
|
2984
|
-
Math.abs(
|
|
2985
|
+
if (!g && !b && !R) return [a, s];
|
|
2986
|
+
if (R) {
|
|
2987
|
+
const C = this.props.width / this.props.height, W = a - this.props.width, L = s - this.props.height;
|
|
2988
|
+
Math.abs(W) > Math.abs(L * C) ? s = a / C : a = s * C;
|
|
2985
2989
|
}
|
|
2986
|
-
const [
|
|
2987
|
-
let [
|
|
2988
|
-
return a +=
|
|
2990
|
+
const [u, w] = [a, s];
|
|
2991
|
+
let [f, y] = this.slack || [0, 0];
|
|
2992
|
+
return a += f, s += y, g && (a = Math.max(g[0], a), s = Math.max(g[1], s)), b && (a = Math.min(b[0], a), s = Math.min(b[1], s)), this.slack = [f + (u - a), y + (w - s)], [a, s];
|
|
2989
2993
|
}
|
|
2990
2994
|
/**
|
|
2991
2995
|
* Wrapper around drag events to provide more useful data.
|
|
@@ -2993,29 +2997,29 @@ function Hn() {
|
|
|
2993
2997
|
* @param {String} handlerName Handler name to wrap.
|
|
2994
2998
|
* @return {Function} Handler function.
|
|
2995
2999
|
*/
|
|
2996
|
-
resizeHandler(a,
|
|
3000
|
+
resizeHandler(a, s) {
|
|
2997
3001
|
return (g, b) => {
|
|
2998
3002
|
let {
|
|
2999
|
-
node:
|
|
3000
|
-
deltaX:
|
|
3003
|
+
node: R,
|
|
3004
|
+
deltaX: u,
|
|
3001
3005
|
deltaY: w
|
|
3002
3006
|
} = b;
|
|
3003
3007
|
a === "onResizeStart" && this.resetData();
|
|
3004
|
-
const
|
|
3005
|
-
if (!
|
|
3006
|
-
const C =
|
|
3008
|
+
const f = (this.props.axis === "both" || this.props.axis === "x") && s !== "n" && s !== "s", y = (this.props.axis === "both" || this.props.axis === "y") && s !== "e" && s !== "w";
|
|
3009
|
+
if (!f && !y) return;
|
|
3010
|
+
const C = s[0], W = s[s.length - 1], L = R.getBoundingClientRect();
|
|
3007
3011
|
if (this.lastHandleRect != null) {
|
|
3008
|
-
if (
|
|
3009
|
-
const V =
|
|
3010
|
-
|
|
3012
|
+
if (W === "w") {
|
|
3013
|
+
const V = L.left - this.lastHandleRect.left;
|
|
3014
|
+
u += V;
|
|
3011
3015
|
}
|
|
3012
3016
|
if (C === "n") {
|
|
3013
|
-
const V =
|
|
3017
|
+
const V = L.top - this.lastHandleRect.top;
|
|
3014
3018
|
w += V;
|
|
3015
3019
|
}
|
|
3016
3020
|
}
|
|
3017
|
-
this.lastHandleRect =
|
|
3018
|
-
let G = this.props.width + (
|
|
3021
|
+
this.lastHandleRect = L, W === "w" && (u = -u), C === "n" && (w = -w);
|
|
3022
|
+
let G = this.props.width + (f ? u / this.props.transformScale : 0), k = this.props.height + (y ? w / this.props.transformScale : 0);
|
|
3019
3023
|
[G, k] = this.runConstraints(G, k), a === "onResizeStop" && this.lastSize && ({
|
|
3020
3024
|
width: G,
|
|
3021
3025
|
height: k
|
|
@@ -3027,57 +3031,57 @@ function Hn() {
|
|
|
3027
3031
|
});
|
|
3028
3032
|
const J = typeof this.props[a] == "function" ? this.props[a] : null;
|
|
3029
3033
|
J && !(a === "onResize" && !H) && (g.persist?.(), J(g, {
|
|
3030
|
-
node:
|
|
3034
|
+
node: R,
|
|
3031
3035
|
size: {
|
|
3032
3036
|
width: G,
|
|
3033
3037
|
height: k
|
|
3034
3038
|
},
|
|
3035
|
-
handle:
|
|
3039
|
+
handle: s
|
|
3036
3040
|
})), a === "onResizeStop" && this.resetData();
|
|
3037
3041
|
};
|
|
3038
3042
|
}
|
|
3039
3043
|
// Render a resize handle given an axis & DOM ref. Ref *must* be attached for
|
|
3040
3044
|
// the underlying draggable library to work properly.
|
|
3041
|
-
renderResizeHandle(a,
|
|
3045
|
+
renderResizeHandle(a, s) {
|
|
3042
3046
|
const {
|
|
3043
3047
|
handle: g
|
|
3044
3048
|
} = this.props;
|
|
3045
3049
|
if (!g)
|
|
3046
3050
|
return /* @__PURE__ */ e.createElement("span", {
|
|
3047
3051
|
className: `react-resizable-handle react-resizable-handle-${a}`,
|
|
3048
|
-
ref:
|
|
3052
|
+
ref: s
|
|
3049
3053
|
});
|
|
3050
3054
|
if (typeof g == "function")
|
|
3051
|
-
return g(a,
|
|
3052
|
-
const b = typeof g.type == "string",
|
|
3053
|
-
ref:
|
|
3055
|
+
return g(a, s);
|
|
3056
|
+
const b = typeof g.type == "string", R = m({
|
|
3057
|
+
ref: s
|
|
3054
3058
|
}, b ? {} : {
|
|
3055
3059
|
handleAxis: a
|
|
3056
3060
|
});
|
|
3057
|
-
return /* @__PURE__ */ e.cloneElement(g,
|
|
3061
|
+
return /* @__PURE__ */ e.cloneElement(g, R);
|
|
3058
3062
|
}
|
|
3059
3063
|
render() {
|
|
3060
3064
|
const a = this.props, {
|
|
3061
|
-
children:
|
|
3065
|
+
children: s,
|
|
3062
3066
|
className: g,
|
|
3063
3067
|
draggableOpts: b,
|
|
3064
|
-
width:
|
|
3065
|
-
height:
|
|
3068
|
+
width: R,
|
|
3069
|
+
height: u,
|
|
3066
3070
|
handle: w,
|
|
3067
|
-
handleSize:
|
|
3068
|
-
lockAspectRatio:
|
|
3071
|
+
handleSize: f,
|
|
3072
|
+
lockAspectRatio: y,
|
|
3069
3073
|
axis: C,
|
|
3070
|
-
minConstraints:
|
|
3071
|
-
maxConstraints:
|
|
3074
|
+
minConstraints: W,
|
|
3075
|
+
maxConstraints: L,
|
|
3072
3076
|
onResize: G,
|
|
3073
3077
|
onResizeStop: k,
|
|
3074
3078
|
onResizeStart: H,
|
|
3075
3079
|
resizeHandles: J,
|
|
3076
3080
|
transformScale: X
|
|
3077
|
-
} = a, V =
|
|
3078
|
-
return (0, r.cloneElement)(
|
|
3081
|
+
} = a, V = p(a, o);
|
|
3082
|
+
return (0, r.cloneElement)(s, m(m({}, V), {}, {
|
|
3079
3083
|
className: `${g ? `${g} ` : ""}react-resizable`,
|
|
3080
|
-
children: [...e.Children.toArray(
|
|
3084
|
+
children: [...e.Children.toArray(s.props.children), ...J.map((ie) => {
|
|
3081
3085
|
const me = this.handleRefs[ie] ?? (this.handleRefs[ie] = /* @__PURE__ */ e.createRef());
|
|
3082
3086
|
return /* @__PURE__ */ e.createElement(t.DraggableCore, l({}, b, {
|
|
3083
3087
|
nodeRef: me,
|
|
@@ -3104,154 +3108,154 @@ var Rt = {}, an;
|
|
|
3104
3108
|
function sa() {
|
|
3105
3109
|
if (an) return Rt;
|
|
3106
3110
|
an = 1, Rt.__esModule = !0, Rt.default = void 0;
|
|
3107
|
-
var e = l(Ee), t =
|
|
3111
|
+
var e = l(Ee), t = i(/* @__PURE__ */ er()), r = i(Hn()), n = $n();
|
|
3108
3112
|
const o = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
|
|
3109
|
-
function
|
|
3113
|
+
function i(a) {
|
|
3110
3114
|
return a && a.__esModule ? a : { default: a };
|
|
3111
3115
|
}
|
|
3112
|
-
function l(a,
|
|
3116
|
+
function l(a, s) {
|
|
3113
3117
|
if (typeof WeakMap == "function") var g = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap();
|
|
3114
|
-
return (l = function(
|
|
3115
|
-
if (!
|
|
3116
|
-
var w,
|
|
3117
|
-
if (
|
|
3118
|
-
if (w =
|
|
3119
|
-
if (w.has(
|
|
3120
|
-
w.set(
|
|
3118
|
+
return (l = function(R, u) {
|
|
3119
|
+
if (!u && R && R.__esModule) return R;
|
|
3120
|
+
var w, f, y = { __proto__: null, default: R };
|
|
3121
|
+
if (R === null || typeof R != "object" && typeof R != "function") return y;
|
|
3122
|
+
if (w = u ? b : g) {
|
|
3123
|
+
if (w.has(R)) return w.get(R);
|
|
3124
|
+
w.set(R, y);
|
|
3121
3125
|
}
|
|
3122
|
-
for (const C in
|
|
3123
|
-
return
|
|
3124
|
-
})(a,
|
|
3126
|
+
for (const C in R) C !== "default" && {}.hasOwnProperty.call(R, C) && ((f = (w = Object.defineProperty) && Object.getOwnPropertyDescriptor(R, C)) && (f.get || f.set) ? w(y, C, f) : y[C] = R[C]);
|
|
3127
|
+
return y;
|
|
3128
|
+
})(a, s);
|
|
3125
3129
|
}
|
|
3126
|
-
function
|
|
3127
|
-
return
|
|
3128
|
-
for (var
|
|
3129
|
-
var g = arguments[
|
|
3130
|
+
function p() {
|
|
3131
|
+
return p = Object.assign ? Object.assign.bind() : function(a) {
|
|
3132
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
3133
|
+
var g = arguments[s];
|
|
3130
3134
|
for (var b in g) ({}).hasOwnProperty.call(g, b) && (a[b] = g[b]);
|
|
3131
3135
|
}
|
|
3132
3136
|
return a;
|
|
3133
|
-
},
|
|
3137
|
+
}, p.apply(null, arguments);
|
|
3134
3138
|
}
|
|
3135
|
-
function
|
|
3139
|
+
function c(a, s) {
|
|
3136
3140
|
var g = Object.keys(a);
|
|
3137
3141
|
if (Object.getOwnPropertySymbols) {
|
|
3138
3142
|
var b = Object.getOwnPropertySymbols(a);
|
|
3139
|
-
|
|
3140
|
-
return Object.getOwnPropertyDescriptor(a,
|
|
3143
|
+
s && (b = b.filter(function(R) {
|
|
3144
|
+
return Object.getOwnPropertyDescriptor(a, R).enumerable;
|
|
3141
3145
|
})), g.push.apply(g, b);
|
|
3142
3146
|
}
|
|
3143
3147
|
return g;
|
|
3144
3148
|
}
|
|
3145
|
-
function
|
|
3146
|
-
for (var
|
|
3147
|
-
var g = arguments[
|
|
3148
|
-
|
|
3149
|
+
function x(a) {
|
|
3150
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
3151
|
+
var g = arguments[s] != null ? arguments[s] : {};
|
|
3152
|
+
s % 2 ? c(Object(g), !0).forEach(function(b) {
|
|
3149
3153
|
m(a, b, g[b]);
|
|
3150
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(g)) :
|
|
3154
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(g)) : c(Object(g)).forEach(function(b) {
|
|
3151
3155
|
Object.defineProperty(a, b, Object.getOwnPropertyDescriptor(g, b));
|
|
3152
3156
|
});
|
|
3153
3157
|
}
|
|
3154
3158
|
return a;
|
|
3155
3159
|
}
|
|
3156
|
-
function m(a,
|
|
3157
|
-
return (
|
|
3160
|
+
function m(a, s, g) {
|
|
3161
|
+
return (s = h(s)) in a ? Object.defineProperty(a, s, { value: g, enumerable: !0, configurable: !0, writable: !0 }) : a[s] = g, a;
|
|
3158
3162
|
}
|
|
3159
3163
|
function h(a) {
|
|
3160
|
-
var
|
|
3161
|
-
return typeof
|
|
3164
|
+
var s = S(a, "string");
|
|
3165
|
+
return typeof s == "symbol" ? s : s + "";
|
|
3162
3166
|
}
|
|
3163
|
-
function
|
|
3167
|
+
function S(a, s) {
|
|
3164
3168
|
if (typeof a != "object" || !a) return a;
|
|
3165
3169
|
var g = a[Symbol.toPrimitive];
|
|
3166
3170
|
if (g !== void 0) {
|
|
3167
|
-
var b = g.call(a,
|
|
3171
|
+
var b = g.call(a, s);
|
|
3168
3172
|
if (typeof b != "object") return b;
|
|
3169
3173
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3170
3174
|
}
|
|
3171
|
-
return (
|
|
3175
|
+
return (s === "string" ? String : Number)(a);
|
|
3172
3176
|
}
|
|
3173
|
-
function E(a,
|
|
3177
|
+
function E(a, s) {
|
|
3174
3178
|
if (a == null) return {};
|
|
3175
|
-
var g, b,
|
|
3179
|
+
var g, b, R = O(a, s);
|
|
3176
3180
|
if (Object.getOwnPropertySymbols) {
|
|
3177
|
-
var
|
|
3178
|
-
for (b = 0; b <
|
|
3181
|
+
var u = Object.getOwnPropertySymbols(a);
|
|
3182
|
+
for (b = 0; b < u.length; b++) g = u[b], s.indexOf(g) === -1 && {}.propertyIsEnumerable.call(a, g) && (R[g] = a[g]);
|
|
3179
3183
|
}
|
|
3180
|
-
return
|
|
3184
|
+
return R;
|
|
3181
3185
|
}
|
|
3182
|
-
function O(a,
|
|
3186
|
+
function O(a, s) {
|
|
3183
3187
|
if (a == null) return {};
|
|
3184
3188
|
var g = {};
|
|
3185
3189
|
for (var b in a) if ({}.hasOwnProperty.call(a, b)) {
|
|
3186
|
-
if (
|
|
3190
|
+
if (s.indexOf(b) !== -1) continue;
|
|
3187
3191
|
g[b] = a[b];
|
|
3188
3192
|
}
|
|
3189
3193
|
return g;
|
|
3190
3194
|
}
|
|
3191
|
-
let
|
|
3195
|
+
let v = class extends e.Component {
|
|
3192
3196
|
constructor() {
|
|
3193
3197
|
super(...arguments), this.state = {
|
|
3194
3198
|
width: this.props.width,
|
|
3195
3199
|
height: this.props.height,
|
|
3196
3200
|
propsWidth: this.props.width,
|
|
3197
3201
|
propsHeight: this.props.height
|
|
3198
|
-
}, this.onResize = (
|
|
3202
|
+
}, this.onResize = (s, g) => {
|
|
3199
3203
|
const {
|
|
3200
3204
|
size: b
|
|
3201
3205
|
} = g;
|
|
3202
|
-
this.props.onResize ? (
|
|
3206
|
+
this.props.onResize ? (s.persist?.(), this.setState(b, () => this.props.onResize && this.props.onResize(s, g))) : this.setState(b);
|
|
3203
3207
|
};
|
|
3204
3208
|
}
|
|
3205
|
-
static getDerivedStateFromProps(
|
|
3206
|
-
return g.propsWidth !==
|
|
3207
|
-
width:
|
|
3208
|
-
height:
|
|
3209
|
-
propsWidth:
|
|
3210
|
-
propsHeight:
|
|
3209
|
+
static getDerivedStateFromProps(s, g) {
|
|
3210
|
+
return g.propsWidth !== s.width || g.propsHeight !== s.height ? {
|
|
3211
|
+
width: s.width,
|
|
3212
|
+
height: s.height,
|
|
3213
|
+
propsWidth: s.width,
|
|
3214
|
+
propsHeight: s.height
|
|
3211
3215
|
} : null;
|
|
3212
3216
|
}
|
|
3213
3217
|
render() {
|
|
3214
|
-
const
|
|
3218
|
+
const s = this.props, {
|
|
3215
3219
|
handle: g,
|
|
3216
3220
|
handleSize: b,
|
|
3217
|
-
onResize:
|
|
3218
|
-
onResizeStart:
|
|
3221
|
+
onResize: R,
|
|
3222
|
+
onResizeStart: u,
|
|
3219
3223
|
onResizeStop: w,
|
|
3220
|
-
draggableOpts:
|
|
3221
|
-
minConstraints:
|
|
3224
|
+
draggableOpts: f,
|
|
3225
|
+
minConstraints: y,
|
|
3222
3226
|
maxConstraints: C,
|
|
3223
|
-
lockAspectRatio:
|
|
3224
|
-
axis:
|
|
3227
|
+
lockAspectRatio: W,
|
|
3228
|
+
axis: L,
|
|
3225
3229
|
width: G,
|
|
3226
3230
|
height: k,
|
|
3227
3231
|
resizeHandles: H,
|
|
3228
3232
|
style: J,
|
|
3229
3233
|
transformScale: X
|
|
3230
|
-
} =
|
|
3234
|
+
} = s, V = E(s, o);
|
|
3231
3235
|
return /* @__PURE__ */ e.createElement(r.default, {
|
|
3232
|
-
axis:
|
|
3233
|
-
draggableOpts:
|
|
3236
|
+
axis: L,
|
|
3237
|
+
draggableOpts: f,
|
|
3234
3238
|
handle: g,
|
|
3235
3239
|
handleSize: b,
|
|
3236
3240
|
height: this.state.height,
|
|
3237
|
-
lockAspectRatio:
|
|
3241
|
+
lockAspectRatio: W,
|
|
3238
3242
|
maxConstraints: C,
|
|
3239
|
-
minConstraints:
|
|
3240
|
-
onResizeStart:
|
|
3243
|
+
minConstraints: y,
|
|
3244
|
+
onResizeStart: u,
|
|
3241
3245
|
onResize: this.onResize,
|
|
3242
3246
|
onResizeStop: w,
|
|
3243
3247
|
resizeHandles: H,
|
|
3244
3248
|
transformScale: X,
|
|
3245
3249
|
width: this.state.width
|
|
3246
|
-
}, /* @__PURE__ */ e.createElement("div",
|
|
3247
|
-
style:
|
|
3250
|
+
}, /* @__PURE__ */ e.createElement("div", p({}, V, {
|
|
3251
|
+
style: x(x({}, J), {}, {
|
|
3248
3252
|
width: this.state.width + "px",
|
|
3249
3253
|
height: this.state.height + "px"
|
|
3250
3254
|
})
|
|
3251
3255
|
})));
|
|
3252
3256
|
}
|
|
3253
3257
|
};
|
|
3254
|
-
return Rt.default =
|
|
3258
|
+
return Rt.default = v, v.propTypes = x(x({}, n.resizableProps), {}, {
|
|
3255
3259
|
children: t.default.element
|
|
3256
3260
|
}), Rt;
|
|
3257
3261
|
}
|
|
@@ -3268,29 +3272,29 @@ function ln(e) {
|
|
|
3268
3272
|
cols: r,
|
|
3269
3273
|
containerWidth: n,
|
|
3270
3274
|
margin: o,
|
|
3271
|
-
containerPadding:
|
|
3275
|
+
containerPadding: i,
|
|
3272
3276
|
rowHeight: l,
|
|
3273
|
-
maxRows:
|
|
3274
|
-
isDraggable:
|
|
3275
|
-
isResizable:
|
|
3277
|
+
maxRows: p,
|
|
3278
|
+
isDraggable: c,
|
|
3279
|
+
isResizable: x,
|
|
3276
3280
|
isBounded: m,
|
|
3277
3281
|
static: h,
|
|
3278
|
-
useCSSTransforms:
|
|
3282
|
+
useCSSTransforms: S = !0,
|
|
3279
3283
|
usePercentages: E = !1,
|
|
3280
3284
|
transformScale: O = 1,
|
|
3281
|
-
positionStrategy:
|
|
3285
|
+
positionStrategy: v,
|
|
3282
3286
|
dragThreshold: a = 0,
|
|
3283
|
-
droppingPosition:
|
|
3287
|
+
droppingPosition: s,
|
|
3284
3288
|
className: g = "",
|
|
3285
3289
|
style: b,
|
|
3286
|
-
handle:
|
|
3287
|
-
cancel:
|
|
3290
|
+
handle: R = "",
|
|
3291
|
+
cancel: u = "",
|
|
3288
3292
|
x: w,
|
|
3289
|
-
y:
|
|
3290
|
-
w:
|
|
3293
|
+
y: f,
|
|
3294
|
+
w: y,
|
|
3291
3295
|
h: C,
|
|
3292
|
-
minW:
|
|
3293
|
-
maxW:
|
|
3296
|
+
minW: W = 1,
|
|
3297
|
+
maxW: L = 1 / 0,
|
|
3294
3298
|
minH: G = 1,
|
|
3295
3299
|
maxH: k = 1 / 0,
|
|
3296
3300
|
i: H,
|
|
@@ -3300,12 +3304,12 @@ function ln(e) {
|
|
|
3300
3304
|
layoutItem: ie,
|
|
3301
3305
|
layout: me = [],
|
|
3302
3306
|
onDragStart: P,
|
|
3303
|
-
onDrag:
|
|
3307
|
+
onDrag: d,
|
|
3304
3308
|
onDragStop: _,
|
|
3305
3309
|
onResizeStart: M,
|
|
3306
3310
|
onResize: z,
|
|
3307
3311
|
onResizeStop: F
|
|
3308
|
-
} = e, [A, T] = Re(!1), [
|
|
3312
|
+
} = e, [A, T] = Re(!1), [q, N] = Re(!1), $ = ne(null), B = ne({ left: 0, top: 0 }), D = ne({
|
|
3309
3313
|
top: 0,
|
|
3310
3314
|
left: 0,
|
|
3311
3315
|
width: 0,
|
|
@@ -3317,17 +3321,17 @@ function ln(e) {
|
|
|
3317
3321
|
const je = ne(null), ye = ne(null), Pe = ne(!1), ot = ne({ x: 0, y: 0 }), de = ne(!1), le = we(
|
|
3318
3322
|
() => ({
|
|
3319
3323
|
cols: r,
|
|
3320
|
-
containerPadding:
|
|
3324
|
+
containerPadding: i,
|
|
3321
3325
|
containerWidth: n,
|
|
3322
3326
|
margin: o,
|
|
3323
|
-
maxRows:
|
|
3327
|
+
maxRows: p,
|
|
3324
3328
|
rowHeight: l
|
|
3325
3329
|
}),
|
|
3326
|
-
[r,
|
|
3330
|
+
[r, i, n, o, p, l]
|
|
3327
3331
|
), Ce = we(
|
|
3328
3332
|
() => ({
|
|
3329
3333
|
cols: r,
|
|
3330
|
-
maxRows:
|
|
3334
|
+
maxRows: p,
|
|
3331
3335
|
containerWidth: n,
|
|
3332
3336
|
containerHeight: 0,
|
|
3333
3337
|
// Auto-height grids don't have a fixed container height
|
|
@@ -3337,7 +3341,7 @@ function ln(e) {
|
|
|
3337
3341
|
// This prevents the context from changing when layout changes, avoiding callback recreation
|
|
3338
3342
|
layout: []
|
|
3339
3343
|
}),
|
|
3340
|
-
[r,
|
|
3344
|
+
[r, p, n, l, o]
|
|
3341
3345
|
), xe = fe(
|
|
3342
3346
|
() => ({
|
|
3343
3347
|
...Ce,
|
|
@@ -3348,20 +3352,20 @@ function ln(e) {
|
|
|
3348
3352
|
() => ie ?? {
|
|
3349
3353
|
i: H,
|
|
3350
3354
|
x: w,
|
|
3351
|
-
y:
|
|
3352
|
-
w:
|
|
3355
|
+
y: f,
|
|
3356
|
+
w: y,
|
|
3353
3357
|
h: C,
|
|
3354
|
-
minW:
|
|
3355
|
-
maxW:
|
|
3358
|
+
minW: W,
|
|
3359
|
+
maxW: L,
|
|
3356
3360
|
minH: G,
|
|
3357
3361
|
maxH: k
|
|
3358
3362
|
},
|
|
3359
|
-
[ie, H, w,
|
|
3363
|
+
[ie, H, w, f, y, C, W, L, G, k]
|
|
3360
3364
|
), Et = fe(
|
|
3361
3365
|
(Z) => {
|
|
3362
|
-
if (
|
|
3363
|
-
return
|
|
3364
|
-
if (
|
|
3366
|
+
if (v?.calcStyle)
|
|
3367
|
+
return v.calcStyle(Z);
|
|
3368
|
+
if (S)
|
|
3365
3369
|
return wn(Z);
|
|
3366
3370
|
const Q = fo(Z);
|
|
3367
3371
|
return E ? {
|
|
@@ -3370,7 +3374,7 @@ function ln(e) {
|
|
|
3370
3374
|
width: zr(Z.width / n)
|
|
3371
3375
|
} : Q;
|
|
3372
3376
|
},
|
|
3373
|
-
[
|
|
3377
|
+
[v, S, E, n]
|
|
3374
3378
|
), qe = fe(
|
|
3375
3379
|
(Z, { node: Q }) => {
|
|
3376
3380
|
if (!P) return;
|
|
@@ -3378,9 +3382,9 @@ function ln(e) {
|
|
|
3378
3382
|
if (!he) return;
|
|
3379
3383
|
const ae = he.getBoundingClientRect(), ve = Q.getBoundingClientRect(), Oe = ve.left / O, Te = ae.left / O, De = ve.top / O, Ne = ae.top / O;
|
|
3380
3384
|
let ke;
|
|
3381
|
-
if (
|
|
3385
|
+
if (v?.calcDragPosition) {
|
|
3382
3386
|
const U = Z;
|
|
3383
|
-
ke =
|
|
3387
|
+
ke = v.calcDragPosition(
|
|
3384
3388
|
U.clientX,
|
|
3385
3389
|
U.clientY,
|
|
3386
3390
|
U.clientX - ve.left,
|
|
@@ -3421,7 +3425,7 @@ function ln(e) {
|
|
|
3421
3425
|
P,
|
|
3422
3426
|
O,
|
|
3423
3427
|
le,
|
|
3424
|
-
|
|
3428
|
+
v,
|
|
3425
3429
|
a,
|
|
3426
3430
|
V,
|
|
3427
3431
|
Ae,
|
|
@@ -3430,7 +3434,7 @@ function ln(e) {
|
|
|
3430
3434
|
]
|
|
3431
3435
|
), at = fe(
|
|
3432
3436
|
(Z, { node: Q, deltaX: he, deltaY: ae }) => {
|
|
3433
|
-
if (!
|
|
3437
|
+
if (!d || !A) return;
|
|
3434
3438
|
const ve = Z;
|
|
3435
3439
|
if (Pe.current && !de.current) {
|
|
3436
3440
|
const Je = ve.clientX - ot.current.x, I = ve.clientY - ot.current.y;
|
|
@@ -3461,7 +3465,7 @@ function ln(e) {
|
|
|
3461
3465
|
if (Je) {
|
|
3462
3466
|
const I = Je.clientHeight - ut(C, l, o[1]);
|
|
3463
3467
|
Oe = Ht(Oe, 0, I);
|
|
3464
|
-
const U = ft(le), Y = n - ut(
|
|
3468
|
+
const U = ft(le), Y = n - ut(y, U, o[0]);
|
|
3465
3469
|
Te = Ht(Te, 0, Y);
|
|
3466
3470
|
}
|
|
3467
3471
|
}
|
|
@@ -3474,14 +3478,14 @@ function ln(e) {
|
|
|
3474
3478
|
Ne.y,
|
|
3475
3479
|
xe()
|
|
3476
3480
|
);
|
|
3477
|
-
|
|
3481
|
+
d(H, ke, Ve, {
|
|
3478
3482
|
e: Z,
|
|
3479
3483
|
node: Q,
|
|
3480
3484
|
newPosition: De
|
|
3481
3485
|
});
|
|
3482
3486
|
},
|
|
3483
3487
|
[
|
|
3484
|
-
|
|
3488
|
+
d,
|
|
3485
3489
|
P,
|
|
3486
3490
|
A,
|
|
3487
3491
|
a,
|
|
@@ -3491,7 +3495,7 @@ function ln(e) {
|
|
|
3491
3495
|
o,
|
|
3492
3496
|
le,
|
|
3493
3497
|
n,
|
|
3494
|
-
|
|
3498
|
+
y,
|
|
3495
3499
|
H,
|
|
3496
3500
|
V,
|
|
3497
3501
|
Ae,
|
|
@@ -3579,95 +3583,95 @@ function ln(e) {
|
|
|
3579
3583
|
), st = fe(
|
|
3580
3584
|
(Z, Q) => {
|
|
3581
3585
|
N(!0);
|
|
3582
|
-
const he = yt(le, w,
|
|
3586
|
+
const he = yt(le, w, f, y, C), ae = {
|
|
3583
3587
|
...Q,
|
|
3584
3588
|
handle: Q.handle
|
|
3585
3589
|
};
|
|
3586
3590
|
Ie(Z, ae, he, "onResizeStart");
|
|
3587
3591
|
},
|
|
3588
|
-
[Ie, le, w,
|
|
3592
|
+
[Ie, le, w, f, y, C]
|
|
3589
3593
|
), it = fe(
|
|
3590
3594
|
(Z, Q) => {
|
|
3591
|
-
const he = yt(le, w,
|
|
3595
|
+
const he = yt(le, w, f, y, C), ae = {
|
|
3592
3596
|
...Q,
|
|
3593
3597
|
handle: Q.handle
|
|
3594
3598
|
};
|
|
3595
3599
|
Ie(Z, ae, he, "onResize");
|
|
3596
3600
|
},
|
|
3597
|
-
[Ie, le, w,
|
|
3601
|
+
[Ie, le, w, f, y, C]
|
|
3598
3602
|
), Ue = fe(
|
|
3599
3603
|
(Z, Q) => {
|
|
3600
3604
|
N(!1), D.current = { top: 0, left: 0, width: 0, height: 0 };
|
|
3601
|
-
const he = yt(le, w,
|
|
3605
|
+
const he = yt(le, w, f, y, C), ae = {
|
|
3602
3606
|
...Q,
|
|
3603
3607
|
handle: Q.handle
|
|
3604
3608
|
};
|
|
3605
3609
|
Ie(Z, ae, he, "onResizeStop");
|
|
3606
3610
|
},
|
|
3607
|
-
[Ie, le, w,
|
|
3611
|
+
[Ie, le, w, f, y, C]
|
|
3608
3612
|
);
|
|
3609
3613
|
We(() => {
|
|
3610
|
-
if (!
|
|
3611
|
-
const Z =
|
|
3614
|
+
if (!s) return;
|
|
3615
|
+
const Z = $.current;
|
|
3612
3616
|
if (!Z) return;
|
|
3613
3617
|
const Q = oe.current || {
|
|
3614
3618
|
left: 0,
|
|
3615
3619
|
top: 0
|
|
3616
|
-
}, he = A && (
|
|
3620
|
+
}, he = A && (s.left !== Q.left || s.top !== Q.top);
|
|
3617
3621
|
if (A) {
|
|
3618
3622
|
if (he) {
|
|
3619
|
-
const ae =
|
|
3623
|
+
const ae = s.left - B.current.left, ve = s.top - B.current.top, Oe = {
|
|
3620
3624
|
node: Z,
|
|
3621
3625
|
deltaX: ae,
|
|
3622
3626
|
deltaY: ve,
|
|
3623
3627
|
lastX: B.current.left,
|
|
3624
3628
|
lastY: B.current.top,
|
|
3625
|
-
x:
|
|
3626
|
-
y:
|
|
3629
|
+
x: s.left,
|
|
3630
|
+
y: s.top
|
|
3627
3631
|
};
|
|
3628
3632
|
ye.current?.(
|
|
3629
|
-
|
|
3633
|
+
s.e,
|
|
3630
3634
|
Oe
|
|
3631
3635
|
);
|
|
3632
3636
|
}
|
|
3633
3637
|
} else {
|
|
3634
3638
|
const ae = {
|
|
3635
3639
|
node: Z,
|
|
3636
|
-
deltaX:
|
|
3637
|
-
deltaY:
|
|
3640
|
+
deltaX: s.left,
|
|
3641
|
+
deltaY: s.top,
|
|
3638
3642
|
lastX: 0,
|
|
3639
3643
|
lastY: 0,
|
|
3640
|
-
x:
|
|
3641
|
-
y:
|
|
3644
|
+
x: s.left,
|
|
3645
|
+
y: s.top
|
|
3642
3646
|
};
|
|
3643
3647
|
je.current?.(
|
|
3644
|
-
|
|
3648
|
+
s.e,
|
|
3645
3649
|
ae
|
|
3646
3650
|
);
|
|
3647
3651
|
}
|
|
3648
|
-
oe.current =
|
|
3649
|
-
}, [
|
|
3652
|
+
oe.current = s;
|
|
3653
|
+
}, [s, A, H]);
|
|
3650
3654
|
const $e = yt(
|
|
3651
3655
|
le,
|
|
3652
3656
|
w,
|
|
3653
|
-
|
|
3654
|
-
|
|
3657
|
+
f,
|
|
3658
|
+
y,
|
|
3655
3659
|
C,
|
|
3656
3660
|
A ? B.current : null,
|
|
3657
|
-
|
|
3661
|
+
q ? D.current : null
|
|
3658
3662
|
), dt = Ee.Children.only(t), pt = yt(le, 0, 0, 1, 1), Pt = [
|
|
3659
3663
|
pt.width,
|
|
3660
3664
|
pt.height
|
|
3661
3665
|
], Ct = [1 / 0, 1 / 0], Me = dt.props, rr = Me.className, Ot = Me.style;
|
|
3662
3666
|
let Ge = Ee.cloneElement(dt, {
|
|
3663
|
-
ref:
|
|
3667
|
+
ref: $,
|
|
3664
3668
|
className: gr("react-grid-item", rr, g, {
|
|
3665
3669
|
static: h,
|
|
3666
|
-
resizing:
|
|
3667
|
-
"react-draggable":
|
|
3670
|
+
resizing: q,
|
|
3671
|
+
"react-draggable": c,
|
|
3668
3672
|
"react-draggable-dragging": A,
|
|
3669
|
-
dropping: !!
|
|
3670
|
-
cssTransforms:
|
|
3673
|
+
dropping: !!s,
|
|
3674
|
+
cssTransforms: S
|
|
3671
3675
|
}),
|
|
3672
3676
|
style: {
|
|
3673
3677
|
...b,
|
|
@@ -3679,8 +3683,8 @@ function ln(e) {
|
|
|
3679
3683
|
return Ge = /* @__PURE__ */ j.jsx(
|
|
3680
3684
|
la.Resizable,
|
|
3681
3685
|
{
|
|
3682
|
-
draggableOpts: { disabled: !
|
|
3683
|
-
className:
|
|
3686
|
+
draggableOpts: { disabled: !x },
|
|
3687
|
+
className: x ? void 0 : "react-resizable-hide",
|
|
3684
3688
|
width: $e.width,
|
|
3685
3689
|
height: $e.height,
|
|
3686
3690
|
minConstraints: Pt,
|
|
@@ -3696,14 +3700,14 @@ function ln(e) {
|
|
|
3696
3700
|
), Ge = /* @__PURE__ */ j.jsx(
|
|
3697
3701
|
oa.DraggableCore,
|
|
3698
3702
|
{
|
|
3699
|
-
disabled: !
|
|
3703
|
+
disabled: !c,
|
|
3700
3704
|
onStart: qe,
|
|
3701
3705
|
onDrag: at,
|
|
3702
3706
|
onStop: Xe,
|
|
3703
|
-
handle:
|
|
3704
|
-
cancel: ".react-resizable-handle" + (
|
|
3707
|
+
handle: R,
|
|
3708
|
+
cancel: ".react-resizable-handle" + (u ? "," + u : ""),
|
|
3705
3709
|
scale: O,
|
|
3706
|
-
nodeRef:
|
|
3710
|
+
nodeRef: $,
|
|
3707
3711
|
children: Ge
|
|
3708
3712
|
}
|
|
3709
3713
|
), Ge;
|
|
@@ -3718,24 +3722,24 @@ function ca(e, t) {
|
|
|
3718
3722
|
const r = Ee.Children.toArray(e), n = Ee.Children.toArray(t);
|
|
3719
3723
|
if (r.length !== n.length) return !1;
|
|
3720
3724
|
for (let o = 0; o < r.length; o++) {
|
|
3721
|
-
const
|
|
3722
|
-
if (
|
|
3725
|
+
const i = r[o], l = n[o];
|
|
3726
|
+
if (i?.key !== l?.key) return !1;
|
|
3723
3727
|
}
|
|
3724
3728
|
return !0;
|
|
3725
3729
|
}
|
|
3726
3730
|
function un(e, t, r, n) {
|
|
3727
|
-
const o = [],
|
|
3728
|
-
Ee.Children.forEach(t, (
|
|
3729
|
-
if (!Ee.isValidElement(
|
|
3730
|
-
const
|
|
3731
|
-
|
|
3732
|
-
const
|
|
3733
|
-
if (
|
|
3734
|
-
o.push(nt(
|
|
3731
|
+
const o = [], i = /* @__PURE__ */ new Set();
|
|
3732
|
+
Ee.Children.forEach(t, (p) => {
|
|
3733
|
+
if (!Ee.isValidElement(p) || p.key === null) return;
|
|
3734
|
+
const c = String(p.key);
|
|
3735
|
+
i.add(c);
|
|
3736
|
+
const x = e.find((m) => m.i === c);
|
|
3737
|
+
if (x)
|
|
3738
|
+
o.push(nt(x));
|
|
3735
3739
|
else {
|
|
3736
|
-
const h =
|
|
3740
|
+
const h = p.props["data-grid"];
|
|
3737
3741
|
h ? o.push({
|
|
3738
|
-
i:
|
|
3742
|
+
i: c,
|
|
3739
3743
|
x: h.x ?? 0,
|
|
3740
3744
|
y: h.y ?? 0,
|
|
3741
3745
|
w: h.w ?? 1,
|
|
@@ -3750,7 +3754,7 @@ function un(e, t, r, n) {
|
|
|
3750
3754
|
resizeHandles: h.resizeHandles,
|
|
3751
3755
|
isBounded: h.isBounded
|
|
3752
3756
|
}) : o.push({
|
|
3753
|
-
i:
|
|
3757
|
+
i: c,
|
|
3754
3758
|
x: 0,
|
|
3755
3759
|
y: Vt(o),
|
|
3756
3760
|
w: 1,
|
|
@@ -3769,38 +3773,38 @@ function ua(e) {
|
|
|
3769
3773
|
// Composable config interfaces
|
|
3770
3774
|
gridConfig: n,
|
|
3771
3775
|
dragConfig: o,
|
|
3772
|
-
resizeConfig:
|
|
3776
|
+
resizeConfig: i,
|
|
3773
3777
|
dropConfig: l,
|
|
3774
|
-
positionStrategy:
|
|
3775
|
-
compactor:
|
|
3776
|
-
constraints:
|
|
3778
|
+
positionStrategy: p = So,
|
|
3779
|
+
compactor: c,
|
|
3780
|
+
constraints: x = xn,
|
|
3777
3781
|
// Layout data
|
|
3778
3782
|
layout: m = [],
|
|
3779
3783
|
droppingItem: h,
|
|
3780
3784
|
// Container props
|
|
3781
|
-
autoSize:
|
|
3785
|
+
autoSize: S = !0,
|
|
3782
3786
|
className: E = "",
|
|
3783
3787
|
style: O = {},
|
|
3784
|
-
innerRef:
|
|
3788
|
+
innerRef: v,
|
|
3785
3789
|
// Callbacks
|
|
3786
3790
|
onLayoutChange: a = Be,
|
|
3787
|
-
onDragStart:
|
|
3791
|
+
onDragStart: s = Be,
|
|
3788
3792
|
onDrag: g = Be,
|
|
3789
3793
|
onDragStop: b = Be,
|
|
3790
|
-
onResizeStart:
|
|
3791
|
-
onResize:
|
|
3794
|
+
onResizeStart: R = Be,
|
|
3795
|
+
onResize: u = Be,
|
|
3792
3796
|
onResizeStop: w = Be,
|
|
3793
|
-
onDrop:
|
|
3794
|
-
onDropDragOver:
|
|
3797
|
+
onDrop: f = Be,
|
|
3798
|
+
onDropDragOver: y = Be
|
|
3795
3799
|
} = e, C = we(
|
|
3796
3800
|
() => ({ ...Ro, ...n }),
|
|
3797
3801
|
[n]
|
|
3798
|
-
),
|
|
3802
|
+
), W = we(
|
|
3799
3803
|
() => ({ ...Eo, ...o }),
|
|
3800
3804
|
[o]
|
|
3801
|
-
),
|
|
3802
|
-
() => ({ ...Po, ...
|
|
3803
|
-
[
|
|
3805
|
+
), L = we(
|
|
3806
|
+
() => ({ ...Po, ...i }),
|
|
3807
|
+
[i]
|
|
3804
3808
|
), G = we(
|
|
3805
3809
|
() => ({ ...Co, ...l }),
|
|
3806
3810
|
[l]
|
|
@@ -3808,32 +3812,32 @@ function ua(e) {
|
|
|
3808
3812
|
enabled: ie,
|
|
3809
3813
|
bounded: me,
|
|
3810
3814
|
handle: P,
|
|
3811
|
-
cancel:
|
|
3815
|
+
cancel: d,
|
|
3812
3816
|
threshold: _
|
|
3813
|
-
} =
|
|
3817
|
+
} = W, {
|
|
3814
3818
|
enabled: M,
|
|
3815
3819
|
handles: z,
|
|
3816
3820
|
handleComponent: F
|
|
3817
|
-
} =
|
|
3821
|
+
} = L, {
|
|
3818
3822
|
enabled: A,
|
|
3819
3823
|
defaultItem: T,
|
|
3820
|
-
onDragOver:
|
|
3821
|
-
} = G, N =
|
|
3824
|
+
onDragOver: q
|
|
3825
|
+
} = G, N = c ?? Rr("vertical"), $ = N.type, B = N.allowOverlap, D = N.preventCollision ?? !1, oe = we(
|
|
3822
3826
|
() => h ?? {
|
|
3823
3827
|
i: "__dropping-elem__",
|
|
3824
3828
|
...T
|
|
3825
3829
|
},
|
|
3826
3830
|
[h, T]
|
|
3827
|
-
), ze =
|
|
3831
|
+
), ze = p.type === "transform", je = p.scale, ye = V ?? X, [Pe, ot] = Re(!1), [de, le] = Re(
|
|
3828
3832
|
() => un(m, t, k, N)
|
|
3829
3833
|
), [Ce, xe] = Re(null), [Ae, Et] = Re(!1), [qe, at] = Re(
|
|
3830
3834
|
null
|
|
3831
|
-
), [Xe, Ie] = Re(), st = ne(null), it = ne(null), Ue = ne(null), $e = ne(0), dt = ne(de), pt = ne(m), Pt = ne(t), Ct = ne(
|
|
3835
|
+
), [Xe, Ie] = Re(), st = ne(null), it = ne(null), Ue = ne(null), $e = ne(0), dt = ne(de), pt = ne(m), Pt = ne(t), Ct = ne($), Me = ne(de);
|
|
3832
3836
|
Me.current = de, We(() => {
|
|
3833
3837
|
ot(!0), Fe(de, m) || a(de);
|
|
3834
3838
|
}, []), We(() => {
|
|
3835
3839
|
if (Ce || qe) return;
|
|
3836
|
-
const I = !Fe(m, pt.current), U = !ca(t, Pt.current), Y =
|
|
3840
|
+
const I = !Fe(m, pt.current), U = !ca(t, Pt.current), Y = $ !== Ct.current;
|
|
3837
3841
|
if (I || U || Y) {
|
|
3838
3842
|
const se = un(
|
|
3839
3843
|
I ? m : de,
|
|
@@ -3843,12 +3847,12 @@ function ua(e) {
|
|
|
3843
3847
|
);
|
|
3844
3848
|
Fe(se, de) || le(se);
|
|
3845
3849
|
}
|
|
3846
|
-
pt.current = m, Pt.current = t, Ct.current =
|
|
3850
|
+
pt.current = m, Pt.current = t, Ct.current = $;
|
|
3847
3851
|
}, [
|
|
3848
3852
|
m,
|
|
3849
3853
|
t,
|
|
3850
3854
|
k,
|
|
3851
|
-
|
|
3855
|
+
$,
|
|
3852
3856
|
N,
|
|
3853
3857
|
Ce,
|
|
3854
3858
|
qe,
|
|
@@ -3861,10 +3865,10 @@ function ua(e) {
|
|
|
3861
3865
|
}
|
|
3862
3866
|
}, [de, Ce, a, oe.i]);
|
|
3863
3867
|
const rr = we(() => {
|
|
3864
|
-
if (!
|
|
3868
|
+
if (!S) return;
|
|
3865
3869
|
const I = Vt(de), U = ye[1];
|
|
3866
3870
|
return I * H + (I - 1) * X[1] + U * 2 + "px";
|
|
3867
|
-
}, [
|
|
3871
|
+
}, [S, de, H, X, ye]), Ot = fe(
|
|
3868
3872
|
(I, U, Y, K) => {
|
|
3869
3873
|
const se = Me.current, ee = et(se, I);
|
|
3870
3874
|
if (!ee) return;
|
|
@@ -3875,9 +3879,9 @@ function ua(e) {
|
|
|
3875
3879
|
y: ee.y,
|
|
3876
3880
|
i: I
|
|
3877
3881
|
};
|
|
3878
|
-
st.current = nt(ee), Ue.current = se, xe(ce),
|
|
3882
|
+
st.current = nt(ee), Ue.current = se, xe(ce), s(se, ee, ee, null, K.e, K.node);
|
|
3879
3883
|
},
|
|
3880
|
-
[
|
|
3884
|
+
[s]
|
|
3881
3885
|
), Ge = fe(
|
|
3882
3886
|
(I, U, Y, K) => {
|
|
3883
3887
|
const se = Me.current, ee = st.current, ce = et(se, I);
|
|
@@ -3895,13 +3899,13 @@ function ua(e) {
|
|
|
3895
3899
|
Y,
|
|
3896
3900
|
!0,
|
|
3897
3901
|
D,
|
|
3898
|
-
|
|
3902
|
+
$,
|
|
3899
3903
|
k,
|
|
3900
3904
|
B
|
|
3901
3905
|
);
|
|
3902
3906
|
g(ue, ee, ce, be, K.e, K.node), le(N.compact(ue, k)), xe(be);
|
|
3903
3907
|
},
|
|
3904
|
-
[D,
|
|
3908
|
+
[D, $, k, B, N, g]
|
|
3905
3909
|
), Dt = fe(
|
|
3906
3910
|
(I, U, Y, K) => {
|
|
3907
3911
|
if (!Ce) return;
|
|
@@ -3914,7 +3918,7 @@ function ua(e) {
|
|
|
3914
3918
|
Y,
|
|
3915
3919
|
!0,
|
|
3916
3920
|
D,
|
|
3917
|
-
|
|
3921
|
+
$,
|
|
3918
3922
|
k,
|
|
3919
3923
|
B
|
|
3920
3924
|
), ue = N.compact(be, k);
|
|
@@ -3925,7 +3929,7 @@ function ua(e) {
|
|
|
3925
3929
|
[
|
|
3926
3930
|
Ce,
|
|
3927
3931
|
D,
|
|
3928
|
-
|
|
3932
|
+
$,
|
|
3929
3933
|
k,
|
|
3930
3934
|
B,
|
|
3931
3935
|
N,
|
|
@@ -3935,9 +3939,9 @@ function ua(e) {
|
|
|
3935
3939
|
), Z = fe(
|
|
3936
3940
|
(I, U, Y, K) => {
|
|
3937
3941
|
const se = Me.current, ee = et(se, I);
|
|
3938
|
-
ee && (it.current = nt(ee), Ue.current = se, Et(!0),
|
|
3942
|
+
ee && (it.current = nt(ee), Ue.current = se, Et(!0), R(se, ee, ee, null, K.e, K.node));
|
|
3939
3943
|
},
|
|
3940
|
-
[
|
|
3944
|
+
[R]
|
|
3941
3945
|
), Q = fe(
|
|
3942
3946
|
(I, U, Y, K) => {
|
|
3943
3947
|
const se = Me.current, ee = it.current, { handle: ce } = K;
|
|
@@ -3958,7 +3962,7 @@ function ua(e) {
|
|
|
3958
3962
|
Se,
|
|
3959
3963
|
!0,
|
|
3960
3964
|
D,
|
|
3961
|
-
|
|
3965
|
+
$,
|
|
3962
3966
|
k,
|
|
3963
3967
|
B
|
|
3964
3968
|
));
|
|
@@ -3970,7 +3974,7 @@ function ua(e) {
|
|
|
3970
3974
|
i: I,
|
|
3971
3975
|
static: !0
|
|
3972
3976
|
};
|
|
3973
|
-
|
|
3977
|
+
u(
|
|
3974
3978
|
ht,
|
|
3975
3979
|
ee,
|
|
3976
3980
|
Ye,
|
|
@@ -3979,7 +3983,7 @@ function ua(e) {
|
|
|
3979
3983
|
K.node
|
|
3980
3984
|
), le(N.compact(ht, k)), xe(jt);
|
|
3981
3985
|
},
|
|
3982
|
-
[D,
|
|
3986
|
+
[D, $, k, B, N, u]
|
|
3983
3987
|
), he = fe(
|
|
3984
3988
|
(I, U, Y, K) => {
|
|
3985
3989
|
const se = Me.current, ee = it.current, ce = et(se, I), be = N.compact(se, k);
|
|
@@ -4012,7 +4016,7 @@ function ua(e) {
|
|
|
4012
4016
|
cn
|
|
4013
4017
|
))
|
|
4014
4018
|
return !1;
|
|
4015
|
-
const U =
|
|
4019
|
+
const U = q ? q(I.nativeEvent) : y(I);
|
|
4016
4020
|
if (U === !1)
|
|
4017
4021
|
return qe && ae(), !1;
|
|
4018
4022
|
const {
|
|
@@ -4065,8 +4069,8 @@ function ua(e) {
|
|
|
4065
4069
|
qe,
|
|
4066
4070
|
Xe,
|
|
4067
4071
|
oe,
|
|
4068
|
-
|
|
4069
|
-
|
|
4072
|
+
q,
|
|
4073
|
+
y,
|
|
4070
4074
|
ae,
|
|
4071
4075
|
je,
|
|
4072
4076
|
k,
|
|
@@ -4087,9 +4091,9 @@ function ua(e) {
|
|
|
4087
4091
|
(I) => {
|
|
4088
4092
|
I.preventDefault(), I.stopPropagation();
|
|
4089
4093
|
const U = Me.current, Y = U.find((K) => K.i === oe.i);
|
|
4090
|
-
$e.current = 0, ae(),
|
|
4094
|
+
$e.current = 0, ae(), f(U, Y, I.nativeEvent);
|
|
4091
4095
|
},
|
|
4092
|
-
[oe.i, ae,
|
|
4096
|
+
[oe.i, ae, f]
|
|
4093
4097
|
), Ne = fe(
|
|
4094
4098
|
(I, U) => {
|
|
4095
4099
|
if (!I || !I.key) return null;
|
|
@@ -4105,7 +4109,7 @@ function ua(e) {
|
|
|
4105
4109
|
containerPadding: ye,
|
|
4106
4110
|
maxRows: J,
|
|
4107
4111
|
rowHeight: H,
|
|
4108
|
-
cancel:
|
|
4112
|
+
cancel: d,
|
|
4109
4113
|
handle: P,
|
|
4110
4114
|
onDragStart: Ot,
|
|
4111
4115
|
onDrag: Ge,
|
|
@@ -4119,7 +4123,7 @@ function ua(e) {
|
|
|
4119
4123
|
useCSSTransforms: ze && Pe,
|
|
4120
4124
|
usePercentages: !Pe,
|
|
4121
4125
|
transformScale: je,
|
|
4122
|
-
positionStrategy:
|
|
4126
|
+
positionStrategy: p,
|
|
4123
4127
|
dragThreshold: _,
|
|
4124
4128
|
w: Y.w,
|
|
4125
4129
|
h: Y.h,
|
|
@@ -4134,7 +4138,7 @@ function ua(e) {
|
|
|
4134
4138
|
droppingPosition: U ? Xe : void 0,
|
|
4135
4139
|
resizeHandles: ee,
|
|
4136
4140
|
resizeHandle: be,
|
|
4137
|
-
constraints:
|
|
4141
|
+
constraints: x,
|
|
4138
4142
|
layoutItem: Y,
|
|
4139
4143
|
layout: de,
|
|
4140
4144
|
children: I
|
|
@@ -4150,7 +4154,7 @@ function ua(e) {
|
|
|
4150
4154
|
ye,
|
|
4151
4155
|
J,
|
|
4152
4156
|
H,
|
|
4153
|
-
|
|
4157
|
+
d,
|
|
4154
4158
|
P,
|
|
4155
4159
|
Ot,
|
|
4156
4160
|
Ge,
|
|
@@ -4164,12 +4168,12 @@ function ua(e) {
|
|
|
4164
4168
|
ze,
|
|
4165
4169
|
Pe,
|
|
4166
4170
|
je,
|
|
4167
|
-
|
|
4171
|
+
p,
|
|
4168
4172
|
_,
|
|
4169
4173
|
Xe,
|
|
4170
4174
|
z,
|
|
4171
4175
|
F,
|
|
4172
|
-
|
|
4176
|
+
x
|
|
4173
4177
|
]
|
|
4174
4178
|
), ke = () => Ce ? /* @__PURE__ */ j.jsx(
|
|
4175
4179
|
ln,
|
|
@@ -4191,7 +4195,7 @@ function ua(e) {
|
|
|
4191
4195
|
isBounded: !1,
|
|
4192
4196
|
useCSSTransforms: ze,
|
|
4193
4197
|
transformScale: je,
|
|
4194
|
-
constraints:
|
|
4198
|
+
constraints: x,
|
|
4195
4199
|
layout: de,
|
|
4196
4200
|
children: /* @__PURE__ */ j.jsx("div", {})
|
|
4197
4201
|
}
|
|
@@ -4202,7 +4206,7 @@ function ua(e) {
|
|
|
4202
4206
|
return /* @__PURE__ */ j.jsxs(
|
|
4203
4207
|
"div",
|
|
4204
4208
|
{
|
|
4205
|
-
ref:
|
|
4209
|
+
ref: v,
|
|
4206
4210
|
className: Ve,
|
|
4207
4211
|
style: Je,
|
|
4208
4212
|
onDrop: A ? De : void 0,
|
|
@@ -4235,16 +4239,16 @@ function pa(e, t, r, n) {
|
|
|
4235
4239
|
const o = [];
|
|
4236
4240
|
Ee.Children.forEach(t, (l) => {
|
|
4237
4241
|
if (!Ee.isValidElement(l) || l.key === null) return;
|
|
4238
|
-
const
|
|
4239
|
-
if (
|
|
4242
|
+
const p = String(l.key), c = e.find((x) => x.i === p);
|
|
4243
|
+
if (c)
|
|
4240
4244
|
o.push({
|
|
4241
|
-
...
|
|
4242
|
-
i:
|
|
4245
|
+
...c,
|
|
4246
|
+
i: p
|
|
4243
4247
|
});
|
|
4244
4248
|
else {
|
|
4245
4249
|
const m = l.props["data-grid"];
|
|
4246
4250
|
m ? o.push({
|
|
4247
|
-
i:
|
|
4251
|
+
i: p,
|
|
4248
4252
|
x: m.x ?? 0,
|
|
4249
4253
|
y: m.y ?? 0,
|
|
4250
4254
|
w: m.w ?? 1,
|
|
@@ -4259,7 +4263,7 @@ function pa(e, t, r, n) {
|
|
|
4259
4263
|
resizeHandles: m.resizeHandles,
|
|
4260
4264
|
isBounded: m.isBounded
|
|
4261
4265
|
}) : o.push({
|
|
4262
|
-
i:
|
|
4266
|
+
i: p,
|
|
4263
4267
|
x: 0,
|
|
4264
4268
|
y: Vt(o),
|
|
4265
4269
|
w: 1,
|
|
@@ -4267,8 +4271,8 @@ function pa(e, t, r, n) {
|
|
|
4267
4271
|
});
|
|
4268
4272
|
}
|
|
4269
4273
|
});
|
|
4270
|
-
const
|
|
4271
|
-
return n.compact(
|
|
4274
|
+
const i = yr(o, { cols: r });
|
|
4275
|
+
return n.compact(i, r);
|
|
4272
4276
|
}
|
|
4273
4277
|
function ha(e) {
|
|
4274
4278
|
const {
|
|
@@ -4276,64 +4280,64 @@ function ha(e) {
|
|
|
4276
4280
|
width: r,
|
|
4277
4281
|
breakpoint: n,
|
|
4278
4282
|
breakpoints: o = fa,
|
|
4279
|
-
cols:
|
|
4283
|
+
cols: i = da,
|
|
4280
4284
|
layouts: l = {},
|
|
4281
|
-
rowHeight:
|
|
4282
|
-
maxRows:
|
|
4283
|
-
margin:
|
|
4285
|
+
rowHeight: p = 150,
|
|
4286
|
+
maxRows: c = 1 / 0,
|
|
4287
|
+
margin: x = [10, 10],
|
|
4284
4288
|
containerPadding: m = null,
|
|
4285
4289
|
compactor: h,
|
|
4286
|
-
onBreakpointChange:
|
|
4290
|
+
onBreakpointChange: S = pr,
|
|
4287
4291
|
onLayoutChange: E = pr,
|
|
4288
4292
|
onWidthChange: O = pr,
|
|
4289
|
-
...
|
|
4290
|
-
} = e, a = h ?? Rr("vertical"),
|
|
4293
|
+
...v
|
|
4294
|
+
} = e, a = h ?? Rr("vertical"), s = a.type, g = a.allowOverlap, b = we(() => n ?? Mr(o, r), []), R = we(() => Nr(b, i), [b, i]), u = we(() => ar(
|
|
4291
4295
|
l,
|
|
4292
4296
|
o,
|
|
4293
4297
|
b,
|
|
4294
4298
|
b,
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
), []), [w,
|
|
4299
|
+
R,
|
|
4300
|
+
s
|
|
4301
|
+
), []), [w, f] = Re(b), [y, C] = Re(R), [W, L] = Re(u), [G, k] = Re(l), H = ne(r), J = ne(n), X = ne(o), V = ne(i), ie = ne(l), me = ne(s), P = ne(G);
|
|
4298
4302
|
We(() => {
|
|
4299
4303
|
P.current = G;
|
|
4300
4304
|
}, [G]);
|
|
4301
|
-
const
|
|
4305
|
+
const d = we(() => Fe(l, ie.current) ? null : ar(
|
|
4302
4306
|
l,
|
|
4303
4307
|
o,
|
|
4304
4308
|
w,
|
|
4305
4309
|
w,
|
|
4306
|
-
|
|
4310
|
+
y,
|
|
4307
4311
|
a
|
|
4308
|
-
), [l, o, w,
|
|
4312
|
+
), [l, o, w, y, a]), _ = d ?? W;
|
|
4309
4313
|
We(() => {
|
|
4310
|
-
|
|
4311
|
-
}, [
|
|
4312
|
-
if (
|
|
4313
|
-
const T = a.compact(Qe(_),
|
|
4314
|
+
d !== null && (L(d), k(l), P.current = l, ie.current = l);
|
|
4315
|
+
}, [d, l]), We(() => {
|
|
4316
|
+
if (s !== me.current) {
|
|
4317
|
+
const T = a.compact(Qe(_), y), q = {
|
|
4314
4318
|
...P.current,
|
|
4315
4319
|
[w]: T
|
|
4316
4320
|
};
|
|
4317
|
-
|
|
4321
|
+
L(T), k(q), P.current = q, E(T, q), me.current = s;
|
|
4318
4322
|
}
|
|
4319
4323
|
}, [
|
|
4320
|
-
|
|
4324
|
+
s,
|
|
4321
4325
|
a,
|
|
4322
4326
|
_,
|
|
4323
|
-
|
|
4327
|
+
y,
|
|
4324
4328
|
g,
|
|
4325
4329
|
w,
|
|
4326
4330
|
E
|
|
4327
4331
|
]), We(() => {
|
|
4328
|
-
const T = r !== H.current,
|
|
4332
|
+
const T = r !== H.current, q = n !== J.current, N = !Fe(
|
|
4329
4333
|
o,
|
|
4330
4334
|
X.current
|
|
4331
|
-
),
|
|
4332
|
-
if (T ||
|
|
4333
|
-
const B = n ?? Mr(o, r), D = Nr(B,
|
|
4334
|
-
if (oe !== B || N ||
|
|
4335
|
+
), $ = !Fe(i, V.current);
|
|
4336
|
+
if (T || q || N || $) {
|
|
4337
|
+
const B = n ?? Mr(o, r), D = Nr(B, i), oe = w;
|
|
4338
|
+
if (oe !== B || N || $) {
|
|
4335
4339
|
const ye = { ...P.current };
|
|
4336
|
-
ye[oe] || (ye[oe] = Qe(
|
|
4340
|
+
ye[oe] || (ye[oe] = Qe(W));
|
|
4337
4341
|
let Pe = ar(
|
|
4338
4342
|
ye,
|
|
4339
4343
|
o,
|
|
@@ -4347,32 +4351,32 @@ function ha(e) {
|
|
|
4347
4351
|
t,
|
|
4348
4352
|
D,
|
|
4349
4353
|
a
|
|
4350
|
-
), ye[B] = Pe,
|
|
4354
|
+
), ye[B] = Pe, f(B), C(D), L(Pe), k(ye), P.current = ye, S(B, D), E(Pe, ye);
|
|
4351
4355
|
}
|
|
4352
4356
|
const ze = At(
|
|
4353
|
-
|
|
4357
|
+
x,
|
|
4354
4358
|
B
|
|
4355
4359
|
), je = m ? At(
|
|
4356
4360
|
m,
|
|
4357
4361
|
B
|
|
4358
4362
|
) : null;
|
|
4359
|
-
O(r, ze, D, je), H.current = r, J.current = n, X.current = o, V.current =
|
|
4363
|
+
O(r, ze, D, je), H.current = r, J.current = n, X.current = o, V.current = i;
|
|
4360
4364
|
}
|
|
4361
4365
|
}, [
|
|
4362
4366
|
r,
|
|
4363
4367
|
n,
|
|
4364
4368
|
o,
|
|
4365
|
-
|
|
4369
|
+
i,
|
|
4366
4370
|
w,
|
|
4367
|
-
|
|
4368
|
-
|
|
4371
|
+
y,
|
|
4372
|
+
W,
|
|
4369
4373
|
t,
|
|
4370
4374
|
a,
|
|
4371
|
-
|
|
4375
|
+
s,
|
|
4372
4376
|
g,
|
|
4373
|
-
|
|
4377
|
+
x,
|
|
4374
4378
|
m,
|
|
4375
|
-
|
|
4379
|
+
S,
|
|
4376
4380
|
E,
|
|
4377
4381
|
O
|
|
4378
4382
|
]);
|
|
@@ -4382,29 +4386,29 @@ function ha(e) {
|
|
|
4382
4386
|
...P.current,
|
|
4383
4387
|
[w]: T
|
|
4384
4388
|
};
|
|
4385
|
-
|
|
4389
|
+
L(T), k(N), P.current = N, E(T, N);
|
|
4386
4390
|
},
|
|
4387
4391
|
[w, E]
|
|
4388
4392
|
), z = we(() => At(
|
|
4389
|
-
|
|
4393
|
+
x,
|
|
4390
4394
|
w
|
|
4391
|
-
), [
|
|
4395
|
+
), [x, w]), F = we(() => m === null ? null : At(
|
|
4392
4396
|
m,
|
|
4393
4397
|
w
|
|
4394
4398
|
), [m, w]), A = we(
|
|
4395
4399
|
() => ({
|
|
4396
|
-
cols:
|
|
4397
|
-
rowHeight:
|
|
4398
|
-
maxRows:
|
|
4400
|
+
cols: y,
|
|
4401
|
+
rowHeight: p,
|
|
4402
|
+
maxRows: c,
|
|
4399
4403
|
margin: z,
|
|
4400
4404
|
containerPadding: F
|
|
4401
4405
|
}),
|
|
4402
|
-
[
|
|
4406
|
+
[y, p, c, z, F]
|
|
4403
4407
|
);
|
|
4404
4408
|
return /* @__PURE__ */ j.jsx(
|
|
4405
4409
|
ua,
|
|
4406
4410
|
{
|
|
4407
|
-
...
|
|
4411
|
+
...v,
|
|
4408
4412
|
width: r,
|
|
4409
4413
|
gridConfig: A,
|
|
4410
4414
|
compactor: a,
|
|
@@ -4437,7 +4441,7 @@ const ma = [
|
|
|
4437
4441
|
persistLayoutKey: n = "dashboard-layout",
|
|
4438
4442
|
onRefresh: o
|
|
4439
4443
|
}) => {
|
|
4440
|
-
const { width:
|
|
4444
|
+
const { width: i, containerRef: l, mounted: p } = Go(), [c, x] = Le.useState(!1), [m, h] = Le.useState(!1), S = Gn(), E = Le.useRef(null), O = Le.useCallback(() => {
|
|
4441
4445
|
o && (h(!0), o(), setTimeout(() => h(!1), 600));
|
|
4442
4446
|
}, [o]);
|
|
4443
4447
|
Le.useEffect(() => {
|
|
@@ -4446,72 +4450,79 @@ const ma = [
|
|
|
4446
4450
|
E.current && clearInterval(E.current);
|
|
4447
4451
|
};
|
|
4448
4452
|
}, [e.refreshInterval, o, O]);
|
|
4449
|
-
const [
|
|
4453
|
+
const [v, a] = Le.useState(() => {
|
|
4450
4454
|
if (typeof window < "u" && n) {
|
|
4451
|
-
const
|
|
4452
|
-
if (
|
|
4455
|
+
const u = localStorage.getItem(n);
|
|
4456
|
+
if (u)
|
|
4453
4457
|
try {
|
|
4454
|
-
return JSON.parse(
|
|
4458
|
+
return JSON.parse(u);
|
|
4455
4459
|
} catch (w) {
|
|
4456
4460
|
console.error("Failed to parse saved layout:", w);
|
|
4457
4461
|
}
|
|
4458
4462
|
}
|
|
4459
4463
|
return {
|
|
4460
|
-
lg: e.widgets?.map((
|
|
4461
|
-
i:
|
|
4462
|
-
x:
|
|
4463
|
-
y:
|
|
4464
|
-
w:
|
|
4465
|
-
h:
|
|
4464
|
+
lg: e.widgets?.map((u, w) => ({
|
|
4465
|
+
i: u.id || `widget-${w}`,
|
|
4466
|
+
x: u.layout?.x || w % 4 * 3,
|
|
4467
|
+
y: u.layout?.y || Math.floor(w / 4) * 4,
|
|
4468
|
+
w: u.layout?.w || 3,
|
|
4469
|
+
h: u.layout?.h || 4
|
|
4466
4470
|
})) || []
|
|
4467
4471
|
};
|
|
4468
|
-
}),
|
|
4469
|
-
(
|
|
4470
|
-
a(w), r?.(
|
|
4472
|
+
}), s = Le.useCallback(
|
|
4473
|
+
(u, w) => {
|
|
4474
|
+
a(w), r?.(u);
|
|
4471
4475
|
},
|
|
4472
4476
|
[r]
|
|
4473
4477
|
), g = Le.useCallback(() => {
|
|
4474
|
-
typeof window < "u" && n && localStorage.setItem(n, JSON.stringify(
|
|
4475
|
-
}, [
|
|
4476
|
-
const
|
|
4477
|
-
lg: e.widgets?.map((w,
|
|
4478
|
-
i: w.id || `widget-${
|
|
4479
|
-
x: w.layout?.x ||
|
|
4480
|
-
y: w.layout?.y || Math.floor(
|
|
4478
|
+
typeof window < "u" && n && localStorage.setItem(n, JSON.stringify(v)), x(!1);
|
|
4479
|
+
}, [v, n]), b = Le.useCallback(() => {
|
|
4480
|
+
const u = {
|
|
4481
|
+
lg: e.widgets?.map((w, f) => ({
|
|
4482
|
+
i: w.id || `widget-${f}`,
|
|
4483
|
+
x: w.layout?.x || f % 4 * 3,
|
|
4484
|
+
y: w.layout?.y || Math.floor(f / 4) * 4,
|
|
4481
4485
|
w: w.layout?.w || 3,
|
|
4482
4486
|
h: w.layout?.h || 4
|
|
4483
4487
|
})) || []
|
|
4484
4488
|
};
|
|
4485
|
-
a(
|
|
4486
|
-
}, [e.widgets, n]),
|
|
4487
|
-
if (
|
|
4488
|
-
const w =
|
|
4489
|
+
a(u), typeof window < "u" && n && localStorage.removeItem(n);
|
|
4490
|
+
}, [e.widgets, n]), R = Le.useCallback((u) => {
|
|
4491
|
+
if (u.component) return u.component;
|
|
4492
|
+
const w = u.type, f = u.options || {};
|
|
4489
4493
|
if (w === "bar" || w === "line" || w === "area" || w === "pie" || w === "donut") {
|
|
4490
|
-
const
|
|
4494
|
+
const y = u.data || f.data, C = Array.isArray(y) ? y : y?.items || [], W = f.xField || "name", L = f.yField || "value";
|
|
4491
4495
|
return {
|
|
4492
4496
|
type: "chart",
|
|
4493
4497
|
chartType: w,
|
|
4494
|
-
data:
|
|
4495
|
-
xAxisKey:
|
|
4496
|
-
series: [{ dataKey:
|
|
4498
|
+
data: C,
|
|
4499
|
+
xAxisKey: W,
|
|
4500
|
+
series: [{ dataKey: L }],
|
|
4497
4501
|
colors: ma,
|
|
4498
4502
|
className: "h-full"
|
|
4499
4503
|
};
|
|
4500
4504
|
}
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4505
|
+
if (w === "table") {
|
|
4506
|
+
const y = u.data || f.data;
|
|
4507
|
+
return {
|
|
4508
|
+
type: "data-table",
|
|
4509
|
+
...f,
|
|
4510
|
+
data: y?.items || [],
|
|
4511
|
+
searchable: !1,
|
|
4512
|
+
pagination: !1,
|
|
4513
|
+
className: "border-0"
|
|
4514
|
+
};
|
|
4515
|
+
}
|
|
4516
|
+
return {
|
|
4517
|
+
...u,
|
|
4518
|
+
...f
|
|
4519
|
+
};
|
|
4509
4520
|
}, []);
|
|
4510
4521
|
return /* @__PURE__ */ j.jsxs("div", { ref: l, className: _e("w-full", t), "data-testid": "grid-layout", children: [
|
|
4511
|
-
|
|
4522
|
+
S && /* @__PURE__ */ j.jsx(ga, { editMode: c }),
|
|
4512
4523
|
/* @__PURE__ */ j.jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
4513
4524
|
/* @__PURE__ */ j.jsx("h2", { className: "text-2xl font-bold", children: e.title || "Dashboard" }),
|
|
4514
|
-
/* @__PURE__ */ j.jsx("div", { className: "flex gap-2", children:
|
|
4525
|
+
/* @__PURE__ */ j.jsx("div", { className: "flex gap-2", children: c ? /* @__PURE__ */ j.jsxs(j.Fragment, { children: [
|
|
4515
4526
|
/* @__PURE__ */ j.jsxs(lt, { onClick: g, size: "sm", variant: "default", children: [
|
|
4516
4527
|
/* @__PURE__ */ j.jsx(Jn, { className: "h-4 w-4 mr-2" }),
|
|
4517
4528
|
"Save Layout"
|
|
@@ -4520,7 +4531,7 @@ const ma = [
|
|
|
4520
4531
|
/* @__PURE__ */ j.jsx(Kn, { className: "h-4 w-4 mr-2" }),
|
|
4521
4532
|
"Reset"
|
|
4522
4533
|
] }),
|
|
4523
|
-
/* @__PURE__ */ j.jsx(lt, { onClick: () =>
|
|
4534
|
+
/* @__PURE__ */ j.jsx(lt, { onClick: () => x(!1), size: "sm", variant: "ghost", children: "Cancel" })
|
|
4524
4535
|
] }) : /* @__PURE__ */ j.jsxs(j.Fragment, { children: [
|
|
4525
4536
|
o && /* @__PURE__ */ j.jsxs(
|
|
4526
4537
|
lt,
|
|
@@ -4536,40 +4547,40 @@ const ma = [
|
|
|
4536
4547
|
]
|
|
4537
4548
|
}
|
|
4538
4549
|
),
|
|
4539
|
-
/* @__PURE__ */ j.jsxs(lt, { onClick: () =>
|
|
4550
|
+
/* @__PURE__ */ j.jsxs(lt, { onClick: () => x(!0), size: "sm", variant: "outline", children: [
|
|
4540
4551
|
/* @__PURE__ */ j.jsx(Zn, { className: "h-4 w-4 mr-2" }),
|
|
4541
4552
|
"Edit Layout"
|
|
4542
4553
|
] })
|
|
4543
4554
|
] }) })
|
|
4544
4555
|
] }),
|
|
4545
|
-
|
|
4556
|
+
p && /* @__PURE__ */ j.jsx(
|
|
4546
4557
|
ha,
|
|
4547
4558
|
{
|
|
4548
4559
|
className: "layout",
|
|
4549
|
-
width:
|
|
4550
|
-
layouts:
|
|
4560
|
+
width: i,
|
|
4561
|
+
layouts: v,
|
|
4551
4562
|
breakpoints: { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 },
|
|
4552
4563
|
cols: { lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 },
|
|
4553
4564
|
rowHeight: 60,
|
|
4554
|
-
dragConfig: { enabled:
|
|
4555
|
-
resizeConfig: { enabled:
|
|
4556
|
-
onLayoutChange:
|
|
4557
|
-
children: e.widgets?.map((
|
|
4558
|
-
const
|
|
4565
|
+
dragConfig: { enabled: c, handle: ".drag-handle" },
|
|
4566
|
+
resizeConfig: { enabled: c },
|
|
4567
|
+
onLayoutChange: s,
|
|
4568
|
+
children: e.widgets?.map((u, w) => {
|
|
4569
|
+
const f = u.id || `widget-${w}`, y = R(u), C = u.type === "metric";
|
|
4559
4570
|
return /* @__PURE__ */ j.jsx("div", { className: "h-full", children: C ? /* @__PURE__ */ j.jsxs("div", { className: "h-full w-full relative", children: [
|
|
4560
|
-
|
|
4561
|
-
/* @__PURE__ */ j.jsx($t, { schema:
|
|
4571
|
+
c && /* @__PURE__ */ j.jsx("div", { className: "drag-handle absolute top-2 right-2 z-10 cursor-move p-1 bg-background/80 rounded border border-border", children: /* @__PURE__ */ j.jsx(Or, { className: "h-4 w-4" }) }),
|
|
4572
|
+
/* @__PURE__ */ j.jsx($t, { schema: y, className: "h-full w-full" })
|
|
4562
4573
|
] }) : /* @__PURE__ */ j.jsxs(Ft, { className: _e(
|
|
4563
4574
|
"h-full overflow-hidden border-border/50 shadow-sm transition-all",
|
|
4564
4575
|
"bg-card/50 backdrop-blur-sm",
|
|
4565
|
-
|
|
4576
|
+
c && "ring-2 ring-primary/20"
|
|
4566
4577
|
), children: [
|
|
4567
|
-
|
|
4568
|
-
/* @__PURE__ */ j.jsx(Ut, { className: "text-base font-medium tracking-tight truncate", title:
|
|
4569
|
-
|
|
4578
|
+
u.title && /* @__PURE__ */ j.jsxs(Xt, { className: "pb-2 border-b border-border/40 bg-muted/20 flex flex-row items-center justify-between", children: [
|
|
4579
|
+
/* @__PURE__ */ j.jsx(Ut, { className: "text-base font-medium tracking-tight truncate", title: u.title, children: u.title }),
|
|
4580
|
+
c && /* @__PURE__ */ j.jsx("div", { className: "drag-handle cursor-move p-1 hover:bg-muted/40 rounded", children: /* @__PURE__ */ j.jsx(Or, { className: "h-4 w-4" }) })
|
|
4570
4581
|
] }),
|
|
4571
|
-
/* @__PURE__ */ j.jsx(Gt, { className: "p-0 h-full", children: /* @__PURE__ */ j.jsx("div", { className: _e("h-full w-full overflow-auto p-4"), children: /* @__PURE__ */ j.jsx($t, { schema:
|
|
4572
|
-
] }) },
|
|
4582
|
+
/* @__PURE__ */ j.jsx(Gt, { className: "p-0 h-full", children: /* @__PURE__ */ j.jsx("div", { className: _e("h-full w-full overflow-auto p-4"), children: /* @__PURE__ */ j.jsx($t, { schema: y }) }) })
|
|
4583
|
+
] }) }, f);
|
|
4573
4584
|
})
|
|
4574
4585
|
}
|
|
4575
4586
|
)
|
|
@@ -4580,24 +4591,24 @@ const ma = [
|
|
|
4580
4591
|
trend: r,
|
|
4581
4592
|
icon: n,
|
|
4582
4593
|
className: o,
|
|
4583
|
-
description:
|
|
4594
|
+
description: i,
|
|
4584
4595
|
...l
|
|
4585
4596
|
}) => {
|
|
4586
|
-
const
|
|
4597
|
+
const p = we(() => {
|
|
4587
4598
|
if (typeof n == "string") {
|
|
4588
|
-
const
|
|
4589
|
-
return
|
|
4599
|
+
const c = fn[n];
|
|
4600
|
+
return c ? /* @__PURE__ */ j.jsx(c, { className: "h-4 w-4 text-muted-foreground" }) : null;
|
|
4590
4601
|
}
|
|
4591
4602
|
return n;
|
|
4592
4603
|
}, [n]);
|
|
4593
4604
|
return /* @__PURE__ */ j.jsxs(Ft, { className: _e("h-full", o), ...l, children: [
|
|
4594
4605
|
/* @__PURE__ */ j.jsxs(Xt, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
4595
4606
|
/* @__PURE__ */ j.jsx(Ut, { className: "text-sm font-medium", children: e }),
|
|
4596
|
-
|
|
4607
|
+
p && /* @__PURE__ */ j.jsx("div", { className: "h-4 w-4 text-muted-foreground", children: p })
|
|
4597
4608
|
] }),
|
|
4598
4609
|
/* @__PURE__ */ j.jsxs(Gt, { children: [
|
|
4599
4610
|
/* @__PURE__ */ j.jsx("div", { className: "text-2xl font-bold", children: t }),
|
|
4600
|
-
(r ||
|
|
4611
|
+
(r || i) && /* @__PURE__ */ j.jsxs("p", { className: "text-xs text-muted-foreground flex items-center mt-1", children: [
|
|
4601
4612
|
r && /* @__PURE__ */ j.jsxs("span", { className: _e(
|
|
4602
4613
|
"flex items-center mr-2",
|
|
4603
4614
|
r.direction === "up" && "text-green-500",
|
|
@@ -4610,7 +4621,7 @@ const ma = [
|
|
|
4610
4621
|
r.value,
|
|
4611
4622
|
"%"
|
|
4612
4623
|
] }),
|
|
4613
|
-
|
|
4624
|
+
i || r?.label
|
|
4614
4625
|
] })
|
|
4615
4626
|
] })
|
|
4616
4627
|
] });
|
|
@@ -4620,19 +4631,19 @@ const ma = [
|
|
|
4620
4631
|
icon: r,
|
|
4621
4632
|
trend: n,
|
|
4622
4633
|
trendValue: o,
|
|
4623
|
-
description:
|
|
4634
|
+
description: i,
|
|
4624
4635
|
className: l,
|
|
4625
|
-
...
|
|
4636
|
+
...p
|
|
4626
4637
|
}) => {
|
|
4627
|
-
const
|
|
4628
|
-
return /* @__PURE__ */ j.jsxs(Ft, { className: _e("h-full", l), ...
|
|
4638
|
+
const c = r && fn[r];
|
|
4639
|
+
return /* @__PURE__ */ j.jsxs(Ft, { className: _e("h-full", l), ...p, children: [
|
|
4629
4640
|
/* @__PURE__ */ j.jsxs(Xt, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
4630
4641
|
/* @__PURE__ */ j.jsx(Ut, { className: "text-sm font-medium", children: e }),
|
|
4631
|
-
|
|
4642
|
+
c && /* @__PURE__ */ j.jsx(c, { className: "h-4 w-4 text-muted-foreground" })
|
|
4632
4643
|
] }),
|
|
4633
4644
|
/* @__PURE__ */ j.jsxs(Gt, { children: [
|
|
4634
4645
|
/* @__PURE__ */ j.jsx("div", { className: "text-2xl font-bold", children: t }),
|
|
4635
|
-
(n || o ||
|
|
4646
|
+
(n || o || i) && /* @__PURE__ */ j.jsxs("p", { className: "text-xs text-muted-foreground flex items-center mt-1", children: [
|
|
4636
4647
|
n && o && /* @__PURE__ */ j.jsxs("span", { className: _e(
|
|
4637
4648
|
"flex items-center mr-2",
|
|
4638
4649
|
n === "up" && "text-green-500",
|
|
@@ -4644,7 +4655,7 @@ const ma = [
|
|
|
4644
4655
|
n === "neutral" && /* @__PURE__ */ j.jsx(gn, { className: "h-3 w-3 mr-1" }),
|
|
4645
4656
|
o
|
|
4646
4657
|
] }),
|
|
4647
|
-
|
|
4658
|
+
i
|
|
4648
4659
|
] })
|
|
4649
4660
|
] })
|
|
4650
4661
|
] });
|