@ninesstudios/whiteboard 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/whiteboard.es.js +446 -421
- package/dist/whiteboard.es.js.map +1 -1
- package/dist/whiteboard.umd.js +16 -16
- package/dist/whiteboard.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/whiteboard.es.js
CHANGED
|
@@ -95,42 +95,42 @@ function No() {
|
|
|
95
95
|
process.env.NODE_ENV !== "production" && (function() {
|
|
96
96
|
var t = Se, r = Xn(), n = 60103, i = 60106;
|
|
97
97
|
e.Fragment = 60107;
|
|
98
|
-
var a = 60108, l = 60114, u = 60109, p = 60110, c = 60112, v = 60113, b = 60120, s = 60115, S = 60116,
|
|
98
|
+
var a = 60108, l = 60114, u = 60109, p = 60110, c = 60112, v = 60113, b = 60120, s = 60115, S = 60116, g = 60121, y = 60122, E = 60117, C = 60129, O = 60131;
|
|
99
99
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
100
100
|
var T = Symbol.for;
|
|
101
|
-
n = T("react.element"), i = T("react.portal"), e.Fragment = T("react.fragment"), a = T("react.strict_mode"), l = T("react.profiler"), u = T("react.provider"), p = T("react.context"), c = T("react.forward_ref"), v = T("react.suspense"), b = T("react.suspense_list"), s = T("react.memo"), S = T("react.lazy"),
|
|
101
|
+
n = T("react.element"), i = T("react.portal"), e.Fragment = T("react.fragment"), a = T("react.strict_mode"), l = T("react.profiler"), u = T("react.provider"), p = T("react.context"), c = T("react.forward_ref"), v = T("react.suspense"), b = T("react.suspense_list"), s = T("react.memo"), S = T("react.lazy"), g = T("react.block"), y = T("react.server.block"), E = T("react.fundamental"), T("react.scope"), T("react.opaque.id"), C = T("react.debug_trace_mode"), T("react.offscreen"), O = T("react.legacy_hidden");
|
|
102
102
|
}
|
|
103
103
|
var A = typeof Symbol == "function" && Symbol.iterator, x = "@@iterator";
|
|
104
104
|
function I(d) {
|
|
105
105
|
if (d === null || typeof d != "object")
|
|
106
106
|
return null;
|
|
107
|
-
var
|
|
108
|
-
return typeof
|
|
107
|
+
var k = A && d[A] || d[x];
|
|
108
|
+
return typeof k == "function" ? k : null;
|
|
109
109
|
}
|
|
110
110
|
var $ = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
111
111
|
function j(d) {
|
|
112
112
|
{
|
|
113
|
-
for (var
|
|
113
|
+
for (var k = arguments.length, L = new Array(k > 1 ? k - 1 : 0), B = 1; B < k; B++)
|
|
114
114
|
L[B - 1] = arguments[B];
|
|
115
115
|
F("error", d, L);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
function F(d,
|
|
118
|
+
function F(d, k, L) {
|
|
119
119
|
{
|
|
120
120
|
var B = $.ReactDebugCurrentFrame, J = B.getStackAddendum();
|
|
121
|
-
J !== "" && (
|
|
121
|
+
J !== "" && (k += "%s", L = L.concat([J]));
|
|
122
122
|
var Z = L.map(function(K) {
|
|
123
123
|
return "" + K;
|
|
124
124
|
});
|
|
125
|
-
Z.unshift("Warning: " +
|
|
125
|
+
Z.unshift("Warning: " + k), Function.prototype.apply.call(console[d], console, Z);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
var R = !1;
|
|
129
129
|
function Q(d) {
|
|
130
|
-
return !!(typeof d == "string" || typeof d == "function" || d === e.Fragment || d === l || d === C || d === a || d === v || d === b || d === O || R || typeof d == "object" && d !== null && (d.$$typeof === S || d.$$typeof === s || d.$$typeof === u || d.$$typeof === p || d.$$typeof === c || d.$$typeof === E || d.$$typeof ===
|
|
130
|
+
return !!(typeof d == "string" || typeof d == "function" || d === e.Fragment || d === l || d === C || d === a || d === v || d === b || d === O || R || typeof d == "object" && d !== null && (d.$$typeof === S || d.$$typeof === s || d.$$typeof === u || d.$$typeof === p || d.$$typeof === c || d.$$typeof === E || d.$$typeof === g || d[0] === y));
|
|
131
131
|
}
|
|
132
|
-
function ue(d,
|
|
133
|
-
var B =
|
|
132
|
+
function ue(d, k, L) {
|
|
133
|
+
var B = k.displayName || k.name || "";
|
|
134
134
|
return d.displayName || (B !== "" ? L + "(" + B + ")" : L);
|
|
135
135
|
}
|
|
136
136
|
function pe(d) {
|
|
@@ -160,8 +160,8 @@ function No() {
|
|
|
160
160
|
if (typeof d == "object")
|
|
161
161
|
switch (d.$$typeof) {
|
|
162
162
|
case p:
|
|
163
|
-
var
|
|
164
|
-
return pe(
|
|
163
|
+
var k = d;
|
|
164
|
+
return pe(k) + ".Consumer";
|
|
165
165
|
case u:
|
|
166
166
|
var L = d;
|
|
167
167
|
return pe(L._context) + ".Provider";
|
|
@@ -169,7 +169,7 @@ function No() {
|
|
|
169
169
|
return ue(d, d.render, "ForwardRef");
|
|
170
170
|
case s:
|
|
171
171
|
return ve(d.type);
|
|
172
|
-
case
|
|
172
|
+
case g:
|
|
173
173
|
return ve(d._render);
|
|
174
174
|
case S: {
|
|
175
175
|
var B = d, J = B._payload, Z = B._init;
|
|
@@ -245,7 +245,7 @@ function No() {
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
var Ue = $.ReactCurrentDispatcher, qe;
|
|
248
|
-
function Ie(d,
|
|
248
|
+
function Ie(d, k, L) {
|
|
249
249
|
{
|
|
250
250
|
if (qe === void 0)
|
|
251
251
|
try {
|
|
@@ -263,7 +263,7 @@ function No() {
|
|
|
263
263
|
var et = typeof WeakMap == "function" ? WeakMap : Map;
|
|
264
264
|
De = new et();
|
|
265
265
|
}
|
|
266
|
-
function Y(d,
|
|
266
|
+
function Y(d, k) {
|
|
267
267
|
if (!d || je)
|
|
268
268
|
return "";
|
|
269
269
|
{
|
|
@@ -278,7 +278,7 @@ function No() {
|
|
|
278
278
|
var Z;
|
|
279
279
|
Z = Ue.current, Ue.current = null, Qe();
|
|
280
280
|
try {
|
|
281
|
-
if (
|
|
281
|
+
if (k) {
|
|
282
282
|
var K = function() {
|
|
283
283
|
throw Error();
|
|
284
284
|
};
|
|
@@ -334,14 +334,14 @@ function No() {
|
|
|
334
334
|
var Ge = d ? d.displayName || d.name : "", qt = Ge ? Ie(Ge) : "";
|
|
335
335
|
return typeof d == "function" && De.set(d, qt), qt;
|
|
336
336
|
}
|
|
337
|
-
function Ce(d,
|
|
337
|
+
function Ce(d, k, L) {
|
|
338
338
|
return Y(d, !1);
|
|
339
339
|
}
|
|
340
340
|
function V(d) {
|
|
341
|
-
var
|
|
342
|
-
return !!(
|
|
341
|
+
var k = d.prototype;
|
|
342
|
+
return !!(k && k.isReactComponent);
|
|
343
343
|
}
|
|
344
|
-
function be(d,
|
|
344
|
+
function be(d, k, L) {
|
|
345
345
|
if (d == null)
|
|
346
346
|
return "";
|
|
347
347
|
if (typeof d == "function")
|
|
@@ -359,13 +359,13 @@ function No() {
|
|
|
359
359
|
case c:
|
|
360
360
|
return Ce(d.render);
|
|
361
361
|
case s:
|
|
362
|
-
return be(d.type,
|
|
363
|
-
case
|
|
362
|
+
return be(d.type, k, L);
|
|
363
|
+
case g:
|
|
364
364
|
return Ce(d._render);
|
|
365
365
|
case S: {
|
|
366
366
|
var B = d, J = B._payload, Z = B._init;
|
|
367
367
|
try {
|
|
368
|
-
return be(Z(J),
|
|
368
|
+
return be(Z(J), k, L);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -375,12 +375,12 @@ function No() {
|
|
|
375
375
|
var Pe = {}, ze = $.ReactDebugCurrentFrame;
|
|
376
376
|
function gt(d) {
|
|
377
377
|
if (d) {
|
|
378
|
-
var
|
|
378
|
+
var k = d._owner, L = be(d.type, d._source, k ? k.type : null);
|
|
379
379
|
ze.setExtraStackFrame(L);
|
|
380
380
|
} else
|
|
381
381
|
ze.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function Xt(d,
|
|
383
|
+
function Xt(d, k, L, B, J) {
|
|
384
384
|
{
|
|
385
385
|
var Z = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
386
386
|
for (var K in d)
|
|
@@ -391,7 +391,7 @@ function No() {
|
|
|
391
391
|
var le = Error((B || "React class") + ": " + L + " type `" + K + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof d[K] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
392
|
throw le.name = "Invariant Violation", le;
|
|
393
393
|
}
|
|
394
|
-
q = d[K](
|
|
394
|
+
q = d[K](k, K, B, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (ie) {
|
|
396
396
|
q = ie;
|
|
397
397
|
}
|
|
@@ -407,27 +407,27 @@ function No() {
|
|
|
407
407
|
}, At, It;
|
|
408
408
|
function Bt(d) {
|
|
409
409
|
if (bt.call(d, "ref")) {
|
|
410
|
-
var
|
|
411
|
-
if (
|
|
410
|
+
var k = Object.getOwnPropertyDescriptor(d, "ref").get;
|
|
411
|
+
if (k && k.isReactWarning)
|
|
412
412
|
return !1;
|
|
413
413
|
}
|
|
414
414
|
return d.ref !== void 0;
|
|
415
415
|
}
|
|
416
416
|
function wt(d) {
|
|
417
417
|
if (bt.call(d, "key")) {
|
|
418
|
-
var
|
|
419
|
-
if (
|
|
418
|
+
var k = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
419
|
+
if (k && k.isReactWarning)
|
|
420
420
|
return !1;
|
|
421
421
|
}
|
|
422
422
|
return d.key !== void 0;
|
|
423
423
|
}
|
|
424
|
-
function Ut(d,
|
|
424
|
+
function Ut(d, k) {
|
|
425
425
|
typeof d.ref == "string" && me.current;
|
|
426
426
|
}
|
|
427
|
-
function ae(d,
|
|
427
|
+
function ae(d, k) {
|
|
428
428
|
{
|
|
429
429
|
var L = function() {
|
|
430
|
-
At || (At = !0, j("%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://reactjs.org/link/special-props)",
|
|
430
|
+
At || (At = !0, j("%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://reactjs.org/link/special-props)", k));
|
|
431
431
|
};
|
|
432
432
|
L.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
433
433
|
get: L,
|
|
@@ -435,10 +435,10 @@ function No() {
|
|
|
435
435
|
});
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
function Dt(d,
|
|
438
|
+
function Dt(d, k) {
|
|
439
439
|
{
|
|
440
440
|
var L = function() {
|
|
441
|
-
It || (It = !0, j("%s: `ref` 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://reactjs.org/link/special-props)",
|
|
441
|
+
It || (It = !0, j("%s: `ref` 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://reactjs.org/link/special-props)", k));
|
|
442
442
|
};
|
|
443
443
|
L.isReactWarning = !0, Object.defineProperty(d, "ref", {
|
|
444
444
|
get: L,
|
|
@@ -446,13 +446,13 @@ function No() {
|
|
|
446
446
|
});
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
var lr = function(d,
|
|
449
|
+
var lr = function(d, k, L, B, J, Z, K) {
|
|
450
450
|
var q = {
|
|
451
451
|
// This tag allows us to uniquely identify this as a React Element
|
|
452
452
|
$$typeof: n,
|
|
453
453
|
// Built-in properties that belong on the element
|
|
454
454
|
type: d,
|
|
455
|
-
key:
|
|
455
|
+
key: k,
|
|
456
456
|
ref: L,
|
|
457
457
|
props: K,
|
|
458
458
|
// Record the component responsible for creating this element.
|
|
@@ -475,12 +475,12 @@ function No() {
|
|
|
475
475
|
value: J
|
|
476
476
|
}), Object.freeze && (Object.freeze(q.props), Object.freeze(q)), q;
|
|
477
477
|
};
|
|
478
|
-
function ut(d,
|
|
478
|
+
function ut(d, k, L, B, J) {
|
|
479
479
|
{
|
|
480
480
|
var Z, K = {}, q = null, le = null;
|
|
481
|
-
L !== void 0 && (q = "" + L), wt(
|
|
482
|
-
for (Z in
|
|
483
|
-
bt.call(
|
|
481
|
+
L !== void 0 && (q = "" + L), wt(k) && (q = "" + k.key), Bt(k) && (le = k.ref, Ut(k, J));
|
|
482
|
+
for (Z in k)
|
|
483
|
+
bt.call(k, Z) && !Nt.hasOwnProperty(Z) && (K[Z] = k[Z]);
|
|
484
484
|
if (d && d.defaultProps) {
|
|
485
485
|
var ie = d.defaultProps;
|
|
486
486
|
for (Z in ie)
|
|
@@ -496,7 +496,7 @@ function No() {
|
|
|
496
496
|
var xt = $.ReactCurrentOwner, zt = $.ReactDebugCurrentFrame;
|
|
497
497
|
function Le(d) {
|
|
498
498
|
if (d) {
|
|
499
|
-
var
|
|
499
|
+
var k = d._owner, L = be(d.type, d._source, k ? k.type : null);
|
|
500
500
|
zt.setExtraStackFrame(L);
|
|
501
501
|
} else
|
|
502
502
|
zt.setExtraStackFrame(null);
|
|
@@ -524,22 +524,22 @@ Check the render method of \`` + d + "`.";
|
|
|
524
524
|
var ft = {};
|
|
525
525
|
function St(d) {
|
|
526
526
|
{
|
|
527
|
-
var
|
|
528
|
-
if (!
|
|
527
|
+
var k = Lt();
|
|
528
|
+
if (!k) {
|
|
529
529
|
var L = typeof d == "string" ? d : d.displayName || d.name;
|
|
530
|
-
L && (
|
|
530
|
+
L && (k = `
|
|
531
531
|
|
|
532
532
|
Check the top-level render call using <` + L + ">.");
|
|
533
533
|
}
|
|
534
|
-
return
|
|
534
|
+
return k;
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
function dt(d,
|
|
537
|
+
function dt(d, k) {
|
|
538
538
|
{
|
|
539
539
|
if (!d._store || d._store.validated || d.key != null)
|
|
540
540
|
return;
|
|
541
541
|
d._store.validated = !0;
|
|
542
|
-
var L = St(
|
|
542
|
+
var L = St(k);
|
|
543
543
|
if (ft[L])
|
|
544
544
|
return;
|
|
545
545
|
ft[L] = !0;
|
|
@@ -547,14 +547,14 @@ Check the top-level render call using <` + L + ">.");
|
|
|
547
547
|
d && d._owner && d._owner !== xt.current && (B = " It was passed a child from " + ve(d._owner.type) + "."), Le(d), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, B), Le(null);
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
function ht(d,
|
|
550
|
+
function ht(d, k) {
|
|
551
551
|
{
|
|
552
552
|
if (typeof d != "object")
|
|
553
553
|
return;
|
|
554
554
|
if (Array.isArray(d))
|
|
555
555
|
for (var L = 0; L < d.length; L++) {
|
|
556
556
|
var B = d[L];
|
|
557
|
-
rt(B) && dt(B,
|
|
557
|
+
rt(B) && dt(B, k);
|
|
558
558
|
}
|
|
559
559
|
else if (rt(d))
|
|
560
560
|
d._store && (d._store.validated = !0);
|
|
@@ -562,39 +562,39 @@ Check the top-level render call using <` + L + ">.");
|
|
|
562
562
|
var J = I(d);
|
|
563
563
|
if (typeof J == "function" && J !== d.entries)
|
|
564
564
|
for (var Z = J.call(d), K; !(K = Z.next()).done; )
|
|
565
|
-
rt(K.value) && dt(K.value,
|
|
565
|
+
rt(K.value) && dt(K.value, k);
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
function Ct(d) {
|
|
570
570
|
{
|
|
571
|
-
var
|
|
572
|
-
if (
|
|
571
|
+
var k = d.type;
|
|
572
|
+
if (k == null || typeof k == "string")
|
|
573
573
|
return;
|
|
574
574
|
var L;
|
|
575
|
-
if (typeof
|
|
576
|
-
L =
|
|
577
|
-
else if (typeof
|
|
575
|
+
if (typeof k == "function")
|
|
576
|
+
L = k.propTypes;
|
|
577
|
+
else if (typeof k == "object" && (k.$$typeof === c || // Note: Memo only checks outer props here.
|
|
578
578
|
// Inner props are checked in the reconciler.
|
|
579
|
-
|
|
580
|
-
L =
|
|
579
|
+
k.$$typeof === s))
|
|
580
|
+
L = k.propTypes;
|
|
581
581
|
else
|
|
582
582
|
return;
|
|
583
583
|
if (L) {
|
|
584
|
-
var B = ve(
|
|
584
|
+
var B = ve(k);
|
|
585
585
|
Xt(L, d.props, "prop", B, d);
|
|
586
|
-
} else if (
|
|
586
|
+
} else if (k.PropTypes !== void 0 && !tt) {
|
|
587
587
|
tt = !0;
|
|
588
|
-
var J = ve(
|
|
588
|
+
var J = ve(k);
|
|
589
589
|
j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", J || "Unknown");
|
|
590
590
|
}
|
|
591
|
-
typeof
|
|
591
|
+
typeof k.getDefaultProps == "function" && !k.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
function _t(d) {
|
|
595
595
|
{
|
|
596
|
-
for (var
|
|
597
|
-
var B =
|
|
596
|
+
for (var k = Object.keys(d.props), L = 0; L < k.length; L++) {
|
|
597
|
+
var B = k[L];
|
|
598
598
|
if (B !== "children" && B !== "key") {
|
|
599
599
|
Le(d), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", B), Le(null);
|
|
600
600
|
break;
|
|
@@ -603,7 +603,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
603
603
|
d.ref !== null && (Le(d), j("Invalid attribute `ref` supplied to `React.Fragment`."), Le(null));
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
function pt(d,
|
|
606
|
+
function pt(d, k, L, B, J, Z) {
|
|
607
607
|
{
|
|
608
608
|
var K = Q(d);
|
|
609
609
|
if (!K) {
|
|
@@ -614,11 +614,11 @@ Check the top-level render call using <` + L + ">.");
|
|
|
614
614
|
var ie;
|
|
615
615
|
d === null ? ie = "null" : Array.isArray(d) ? ie = "array" : d !== void 0 && d.$$typeof === n ? (ie = "<" + (ve(d.type) || "Unknown") + " />", q = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof d, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, q);
|
|
616
616
|
}
|
|
617
|
-
var he = ut(d,
|
|
617
|
+
var he = ut(d, k, L, J, Z);
|
|
618
618
|
if (he == null)
|
|
619
619
|
return he;
|
|
620
620
|
if (K) {
|
|
621
|
-
var We =
|
|
621
|
+
var We = k.children;
|
|
622
622
|
if (We !== void 0)
|
|
623
623
|
if (B)
|
|
624
624
|
if (Array.isArray(We)) {
|
|
@@ -633,11 +633,11 @@ Check the top-level render call using <` + L + ">.");
|
|
|
633
633
|
return d === e.Fragment ? _t(he) : Ct(he), he;
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
function Wt(d,
|
|
637
|
-
return pt(d,
|
|
636
|
+
function Wt(d, k, L) {
|
|
637
|
+
return pt(d, k, L, !0);
|
|
638
638
|
}
|
|
639
|
-
function Ht(d,
|
|
640
|
-
return pt(d,
|
|
639
|
+
function Ht(d, k, L) {
|
|
640
|
+
return pt(d, k, L, !1);
|
|
641
641
|
}
|
|
642
642
|
var Ot = Ht, ur = Wt;
|
|
643
643
|
e.jsx = Ot, e.jsxs = ur;
|
|
@@ -668,7 +668,7 @@ function Io() {
|
|
|
668
668
|
}
|
|
669
669
|
var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, i = e.useEffect, a = e.useLayoutEffect, l = e.useDebugValue;
|
|
670
670
|
function u(b, s) {
|
|
671
|
-
var S = s(),
|
|
671
|
+
var S = s(), g = n({ inst: { value: S, getSnapshot: s } }), y = g[0].inst, E = g[1];
|
|
672
672
|
return a(
|
|
673
673
|
function() {
|
|
674
674
|
y.value = S, y.getSnapshot = s, p(y) && E({ inst: y });
|
|
@@ -712,29 +712,29 @@ var yr = {};
|
|
|
712
712
|
var on;
|
|
713
713
|
function Do() {
|
|
714
714
|
return on || (on = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
715
|
-
function e(S,
|
|
716
|
-
return S ===
|
|
715
|
+
function e(S, g) {
|
|
716
|
+
return S === g && (S !== 0 || 1 / S === 1 / g) || S !== S && g !== g;
|
|
717
717
|
}
|
|
718
|
-
function t(S,
|
|
718
|
+
function t(S, g) {
|
|
719
719
|
v || i.startTransition === void 0 || (v = !0, console.error(
|
|
720
720
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
721
721
|
));
|
|
722
|
-
var y =
|
|
722
|
+
var y = g();
|
|
723
723
|
if (!b) {
|
|
724
|
-
var E =
|
|
724
|
+
var E = g();
|
|
725
725
|
a(y, E) || (console.error(
|
|
726
726
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
727
727
|
), b = !0);
|
|
728
728
|
}
|
|
729
729
|
E = l({
|
|
730
|
-
inst: { value: y, getSnapshot:
|
|
730
|
+
inst: { value: y, getSnapshot: g }
|
|
731
731
|
});
|
|
732
732
|
var C = E[0].inst, O = E[1];
|
|
733
733
|
return p(
|
|
734
734
|
function() {
|
|
735
|
-
C.value = y, C.getSnapshot =
|
|
735
|
+
C.value = y, C.getSnapshot = g, r(C) && O({ inst: C });
|
|
736
736
|
},
|
|
737
|
-
[S, y,
|
|
737
|
+
[S, y, g]
|
|
738
738
|
), u(
|
|
739
739
|
function() {
|
|
740
740
|
return r(C) && O({ inst: C }), S(function() {
|
|
@@ -745,17 +745,17 @@ function Do() {
|
|
|
745
745
|
), c(y), y;
|
|
746
746
|
}
|
|
747
747
|
function r(S) {
|
|
748
|
-
var
|
|
748
|
+
var g = S.getSnapshot;
|
|
749
749
|
S = S.value;
|
|
750
750
|
try {
|
|
751
|
-
var y =
|
|
751
|
+
var y = g();
|
|
752
752
|
return !a(S, y);
|
|
753
753
|
} catch {
|
|
754
754
|
return !0;
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
function n(S,
|
|
758
|
-
return
|
|
757
|
+
function n(S, g) {
|
|
758
|
+
return g();
|
|
759
759
|
}
|
|
760
760
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
761
761
|
var i = Se, a = typeof Object.is == "function" ? Object.is : e, l = i.useState, u = i.useEffect, p = i.useLayoutEffect, c = i.useDebugValue, v = !1, b = !1, s = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : t;
|
|
@@ -787,12 +787,12 @@ function zo() {
|
|
|
787
787
|
}
|
|
788
788
|
var n = typeof Object.is == "function" ? Object.is : r, i = t.useSyncExternalStore, a = e.useRef, l = e.useEffect, u = e.useMemo, p = e.useDebugValue;
|
|
789
789
|
return mr.useSyncExternalStoreWithSelector = function(c, v, b, s, S) {
|
|
790
|
-
var
|
|
791
|
-
if (
|
|
790
|
+
var g = a(null);
|
|
791
|
+
if (g.current === null) {
|
|
792
792
|
var y = { hasValue: !1, value: null };
|
|
793
|
-
|
|
794
|
-
} else y =
|
|
795
|
-
|
|
793
|
+
g.current = y;
|
|
794
|
+
} else y = g.current;
|
|
795
|
+
g = u(
|
|
796
796
|
function() {
|
|
797
797
|
function C(I) {
|
|
798
798
|
if (!O) {
|
|
@@ -819,7 +819,7 @@ function zo() {
|
|
|
819
819
|
},
|
|
820
820
|
[v, b, s, S]
|
|
821
821
|
);
|
|
822
|
-
var E = i(c,
|
|
822
|
+
var E = i(c, g[0], g[1]);
|
|
823
823
|
return l(
|
|
824
824
|
function() {
|
|
825
825
|
y.hasValue = !0, y.value = E;
|
|
@@ -847,12 +847,12 @@ function Lo() {
|
|
|
847
847
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
848
848
|
var t = Se, r = zr(), n = typeof Object.is == "function" ? Object.is : e, i = r.useSyncExternalStore, a = t.useRef, l = t.useEffect, u = t.useMemo, p = t.useDebugValue;
|
|
849
849
|
gr.useSyncExternalStoreWithSelector = function(c, v, b, s, S) {
|
|
850
|
-
var
|
|
851
|
-
if (
|
|
850
|
+
var g = a(null);
|
|
851
|
+
if (g.current === null) {
|
|
852
852
|
var y = { hasValue: !1, value: null };
|
|
853
|
-
|
|
854
|
-
} else y =
|
|
855
|
-
|
|
853
|
+
g.current = y;
|
|
854
|
+
} else y = g.current;
|
|
855
|
+
g = u(
|
|
856
856
|
function() {
|
|
857
857
|
function C(I) {
|
|
858
858
|
if (!O) {
|
|
@@ -880,7 +880,7 @@ function Lo() {
|
|
|
880
880
|
},
|
|
881
881
|
[v, b, s, S]
|
|
882
882
|
);
|
|
883
|
-
var E = i(c,
|
|
883
|
+
var E = i(c, g[0], g[1]);
|
|
884
884
|
return l(
|
|
885
885
|
function() {
|
|
886
886
|
y.hasValue = !0, y.value = E;
|
|
@@ -950,7 +950,7 @@ function qo(e = st) {
|
|
|
950
950
|
getServerState: v,
|
|
951
951
|
stabilityCheck: b,
|
|
952
952
|
noopCheck: s
|
|
953
|
-
} = t(), S = $e(!0),
|
|
953
|
+
} = t(), S = $e(!0), g = se({
|
|
954
954
|
[n.name](E) {
|
|
955
955
|
const C = n(E);
|
|
956
956
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -994,7 +994,7 @@ Selectors that return the entire state are almost certainly a mistake, as they w
|
|
|
994
994
|
}
|
|
995
995
|
return C;
|
|
996
996
|
}
|
|
997
|
-
}[n.name], [n, b, l]), y = Hn(c.addNestedSub, p.getState, v || p.getState,
|
|
997
|
+
}[n.name], [n, b, l]), y = Hn(c.addNestedSub, p.getState, v || p.getState, g, a);
|
|
998
998
|
return Oo(y), y;
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
@@ -1012,7 +1012,7 @@ var dn;
|
|
|
1012
1012
|
function Go() {
|
|
1013
1013
|
if (dn) return te;
|
|
1014
1014
|
dn = 1;
|
|
1015
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, p = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, s = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115,
|
|
1015
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, p = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, s = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, E = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
|
|
1016
1016
|
function T(x) {
|
|
1017
1017
|
if (typeof x == "object" && x !== null) {
|
|
1018
1018
|
var I = x.$$typeof;
|
|
@@ -1030,7 +1030,7 @@ function Go() {
|
|
|
1030
1030
|
switch (x = x && x.$$typeof, x) {
|
|
1031
1031
|
case u:
|
|
1032
1032
|
case v:
|
|
1033
|
-
case
|
|
1033
|
+
case g:
|
|
1034
1034
|
case S:
|
|
1035
1035
|
case l:
|
|
1036
1036
|
return x;
|
|
@@ -1046,7 +1046,7 @@ function Go() {
|
|
|
1046
1046
|
function A(x) {
|
|
1047
1047
|
return T(x) === c;
|
|
1048
1048
|
}
|
|
1049
|
-
return te.AsyncMode = p, te.ConcurrentMode = c, te.ContextConsumer = u, te.ContextProvider = l, te.Element = t, te.ForwardRef = v, te.Fragment = n, te.Lazy =
|
|
1049
|
+
return te.AsyncMode = p, te.ConcurrentMode = c, te.ContextConsumer = u, te.ContextProvider = l, te.Element = t, te.ForwardRef = v, te.Fragment = n, te.Lazy = g, te.Memo = S, te.Portal = r, te.Profiler = a, te.StrictMode = i, te.Suspense = b, te.isAsyncMode = function(x) {
|
|
1050
1050
|
return A(x) || T(x) === p;
|
|
1051
1051
|
}, te.isConcurrentMode = A, te.isContextConsumer = function(x) {
|
|
1052
1052
|
return T(x) === u;
|
|
@@ -1059,7 +1059,7 @@ function Go() {
|
|
|
1059
1059
|
}, te.isFragment = function(x) {
|
|
1060
1060
|
return T(x) === n;
|
|
1061
1061
|
}, te.isLazy = function(x) {
|
|
1062
|
-
return T(x) ===
|
|
1062
|
+
return T(x) === g;
|
|
1063
1063
|
}, te.isMemo = function(x) {
|
|
1064
1064
|
return T(x) === S;
|
|
1065
1065
|
}, te.isPortal = function(x) {
|
|
@@ -1071,7 +1071,7 @@ function Go() {
|
|
|
1071
1071
|
}, te.isSuspense = function(x) {
|
|
1072
1072
|
return T(x) === b;
|
|
1073
1073
|
}, te.isValidElementType = function(x) {
|
|
1074
|
-
return typeof x == "string" || typeof x == "function" || x === n || x === c || x === a || x === i || x === b || x === s || typeof x == "object" && x !== null && (x.$$typeof ===
|
|
1074
|
+
return typeof x == "string" || typeof x == "function" || x === n || x === c || x === a || x === i || x === b || x === s || typeof x == "object" && x !== null && (x.$$typeof === g || x.$$typeof === S || x.$$typeof === l || x.$$typeof === u || x.$$typeof === v || x.$$typeof === E || x.$$typeof === C || x.$$typeof === O || x.$$typeof === y);
|
|
1075
1075
|
}, te.typeOf = T, te;
|
|
1076
1076
|
}
|
|
1077
1077
|
var re = {};
|
|
@@ -1086,10 +1086,10 @@ var re = {};
|
|
|
1086
1086
|
var hn;
|
|
1087
1087
|
function Ko() {
|
|
1088
1088
|
return hn || (hn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1089
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, p = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, s = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115,
|
|
1089
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, p = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, s = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, E = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
|
|
1090
1090
|
function T(Y) {
|
|
1091
1091
|
return typeof Y == "string" || typeof Y == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1092
|
-
Y === n || Y === c || Y === a || Y === i || Y === b || Y === s || typeof Y == "object" && Y !== null && (Y.$$typeof ===
|
|
1092
|
+
Y === n || Y === c || Y === a || Y === i || Y === b || Y === s || typeof Y == "object" && Y !== null && (Y.$$typeof === g || Y.$$typeof === S || Y.$$typeof === l || Y.$$typeof === u || Y.$$typeof === v || Y.$$typeof === E || Y.$$typeof === C || Y.$$typeof === O || Y.$$typeof === y);
|
|
1093
1093
|
}
|
|
1094
1094
|
function A(Y) {
|
|
1095
1095
|
if (typeof Y == "object" && Y !== null) {
|
|
@@ -1110,7 +1110,7 @@ function Ko() {
|
|
|
1110
1110
|
switch (be) {
|
|
1111
1111
|
case u:
|
|
1112
1112
|
case v:
|
|
1113
|
-
case
|
|
1113
|
+
case g:
|
|
1114
1114
|
case S:
|
|
1115
1115
|
case l:
|
|
1116
1116
|
return be;
|
|
@@ -1123,7 +1123,7 @@ function Ko() {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
|
-
var x = p, I = c, $ = u, j = l, F = t, R = v, Q = n, ue =
|
|
1126
|
+
var x = p, I = c, $ = u, j = l, F = t, R = v, Q = n, ue = g, pe = S, ve = r, we = a, Re = i, Me = b, ke = !1;
|
|
1127
1127
|
function Fe(Y) {
|
|
1128
1128
|
return ke || (ke = !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.")), Ne(Y) || A(Y) === p;
|
|
1129
1129
|
}
|
|
@@ -1146,7 +1146,7 @@ function Ko() {
|
|
|
1146
1146
|
return A(Y) === n;
|
|
1147
1147
|
}
|
|
1148
1148
|
function Ue(Y) {
|
|
1149
|
-
return A(Y) ===
|
|
1149
|
+
return A(Y) === g;
|
|
1150
1150
|
}
|
|
1151
1151
|
function qe(Y) {
|
|
1152
1152
|
return A(Y) === S;
|
|
@@ -1209,30 +1209,30 @@ function Zo() {
|
|
|
1209
1209
|
type: !0
|
|
1210
1210
|
}, a = {};
|
|
1211
1211
|
a[e.ForwardRef] = n, a[e.Memo] = i;
|
|
1212
|
-
function l(
|
|
1213
|
-
return e.isMemo(
|
|
1212
|
+
function l(g) {
|
|
1213
|
+
return e.isMemo(g) ? i : a[g.$$typeof] || t;
|
|
1214
1214
|
}
|
|
1215
1215
|
var u = Object.defineProperty, p = Object.getOwnPropertyNames, c = Object.getOwnPropertySymbols, v = Object.getOwnPropertyDescriptor, b = Object.getPrototypeOf, s = Object.prototype;
|
|
1216
|
-
function S(
|
|
1216
|
+
function S(g, y, E) {
|
|
1217
1217
|
if (typeof y != "string") {
|
|
1218
1218
|
if (s) {
|
|
1219
1219
|
var C = b(y);
|
|
1220
|
-
C && C !== s && S(
|
|
1220
|
+
C && C !== s && S(g, C, E);
|
|
1221
1221
|
}
|
|
1222
1222
|
var O = p(y);
|
|
1223
1223
|
c && (O = O.concat(c(y)));
|
|
1224
|
-
for (var T = l(
|
|
1224
|
+
for (var T = l(g), A = l(y), x = 0; x < O.length; ++x) {
|
|
1225
1225
|
var I = O[x];
|
|
1226
1226
|
if (!r[I] && !(E && E[I]) && !(A && A[I]) && !(T && T[I])) {
|
|
1227
1227
|
var $ = v(y, I);
|
|
1228
1228
|
try {
|
|
1229
|
-
u(
|
|
1229
|
+
u(g, I, $);
|
|
1230
1230
|
} catch {
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
return
|
|
1235
|
+
return g;
|
|
1236
1236
|
}
|
|
1237
1237
|
return br = S, br;
|
|
1238
1238
|
}
|
|
@@ -1251,8 +1251,8 @@ var yn;
|
|
|
1251
1251
|
function Qo() {
|
|
1252
1252
|
if (yn) return ne;
|
|
1253
1253
|
yn = 1;
|
|
1254
|
-
var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.server_context"), p = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), s = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"),
|
|
1255
|
-
|
|
1254
|
+
var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.server_context"), p = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), s = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), g;
|
|
1255
|
+
g = Symbol.for("react.module.reference");
|
|
1256
1256
|
function y(E) {
|
|
1257
1257
|
if (typeof E == "object" && E !== null) {
|
|
1258
1258
|
var C = E.$$typeof;
|
|
@@ -1312,7 +1312,7 @@ function Qo() {
|
|
|
1312
1312
|
}, ne.isSuspenseList = function(E) {
|
|
1313
1313
|
return y(E) === v;
|
|
1314
1314
|
}, ne.isValidElementType = function(E) {
|
|
1315
|
-
return typeof E == "string" || typeof E == "function" || E === r || E === i || E === n || E === c || E === v || E === S || typeof E == "object" && E !== null && (E.$$typeof === s || E.$$typeof === b || E.$$typeof === a || E.$$typeof === l || E.$$typeof === p || E.$$typeof ===
|
|
1315
|
+
return typeof E == "string" || typeof E == "function" || E === r || E === i || E === n || E === c || E === v || E === S || typeof E == "object" && E !== null && (E.$$typeof === s || E.$$typeof === b || E.$$typeof === a || E.$$typeof === l || E.$$typeof === p || E.$$typeof === g || E.getModuleId !== void 0);
|
|
1316
1316
|
}, ne.typeOf = y, ne;
|
|
1317
1317
|
}
|
|
1318
1318
|
var oe = {};
|
|
@@ -1328,10 +1328,10 @@ var oe = {};
|
|
|
1328
1328
|
var mn;
|
|
1329
1329
|
function ei() {
|
|
1330
1330
|
return mn || (mn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1331
|
-
var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.server_context"), p = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), s = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"),
|
|
1331
|
+
var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.server_context"), p = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), s = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), g = !1, y = !1, E = !1, C = !1, O = !1, T;
|
|
1332
1332
|
T = Symbol.for("react.module.reference");
|
|
1333
1333
|
function A(V) {
|
|
1334
|
-
return !!(typeof V == "string" || typeof V == "function" || V === r || V === i || O || V === n || V === c || V === v || C || V === S ||
|
|
1334
|
+
return !!(typeof V == "string" || typeof V == "function" || V === r || V === i || O || V === n || V === c || V === v || C || V === S || g || y || E || typeof V == "object" && V !== null && (V.$$typeof === s || V.$$typeof === b || V.$$typeof === a || V.$$typeof === l || V.$$typeof === p || // This needs to include all possible module reference object
|
|
1335
1335
|
// types supported by any Flight configuration anywhere since
|
|
1336
1336
|
// we don't know which Flight build this will end up being used
|
|
1337
1337
|
// with.
|
|
@@ -1471,7 +1471,7 @@ function ni(e, t) {
|
|
|
1471
1471
|
n.notify();
|
|
1472
1472
|
}
|
|
1473
1473
|
function p() {
|
|
1474
|
-
|
|
1474
|
+
g.onStateChange && g.onStateChange();
|
|
1475
1475
|
}
|
|
1476
1476
|
function c() {
|
|
1477
1477
|
return a;
|
|
@@ -1488,7 +1488,7 @@ function ni(e, t) {
|
|
|
1488
1488
|
function S() {
|
|
1489
1489
|
a && (a = !1, b());
|
|
1490
1490
|
}
|
|
1491
|
-
const
|
|
1491
|
+
const g = {
|
|
1492
1492
|
addNestedSub: l,
|
|
1493
1493
|
notifyNestedSubs: u,
|
|
1494
1494
|
handleChangeWrapper: p,
|
|
@@ -1497,7 +1497,7 @@ function ni(e, t) {
|
|
|
1497
1497
|
tryUnsubscribe: S,
|
|
1498
1498
|
getListeners: () => n
|
|
1499
1499
|
};
|
|
1500
|
-
return
|
|
1500
|
+
return g;
|
|
1501
1501
|
}
|
|
1502
1502
|
const oi = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", ii = oi ? Je.useLayoutEffect : Je.useEffect;
|
|
1503
1503
|
function ai({
|
|
@@ -1881,8 +1881,8 @@ function mi() {
|
|
|
1881
1881
|
if (b !== fe) {
|
|
1882
1882
|
var s = u[b];
|
|
1883
1883
|
if (s === void 0 && !Pt(u, b)) return !0;
|
|
1884
|
-
var S = p[b],
|
|
1885
|
-
if (
|
|
1884
|
+
var S = p[b], g = S && S[fe];
|
|
1885
|
+
if (g ? g.t !== s : !Qn(S, s)) return !0;
|
|
1886
1886
|
}
|
|
1887
1887
|
}
|
|
1888
1888
|
var y = !!u[fe];
|
|
@@ -1903,7 +1903,7 @@ function mi() {
|
|
|
1903
1903
|
pi("ES5", { J: function(l, u) {
|
|
1904
1904
|
var p = Array.isArray(l), c = (function(b, s) {
|
|
1905
1905
|
if (b) {
|
|
1906
|
-
for (var S = Array(s.length),
|
|
1906
|
+
for (var S = Array(s.length), g = 0; g < s.length; g++) Object.defineProperty(S, "" + g, e(g, !0));
|
|
1907
1907
|
return S;
|
|
1908
1908
|
}
|
|
1909
1909
|
var y = to(s);
|
|
@@ -1920,16 +1920,16 @@ function mi() {
|
|
|
1920
1920
|
if (v && typeof v == "object") {
|
|
1921
1921
|
var b = v[fe];
|
|
1922
1922
|
if (b) {
|
|
1923
|
-
var s = b.t, S = b.k,
|
|
1923
|
+
var s = b.t, S = b.k, g = b.R, y = b.i;
|
|
1924
1924
|
if (y === 4) mt(S, (function(A) {
|
|
1925
|
-
A !== fe && (s[A] !== void 0 || Pt(s, A) ?
|
|
1925
|
+
A !== fe && (s[A] !== void 0 || Pt(s, A) ? g[A] || c(S[A]) : (g[A] = !0, ot(b)));
|
|
1926
1926
|
})), mt(s, (function(A) {
|
|
1927
|
-
S[A] !== void 0 || Pt(S, A) || (
|
|
1927
|
+
S[A] !== void 0 || Pt(S, A) || (g[A] = !1, ot(b));
|
|
1928
1928
|
}));
|
|
1929
1929
|
else if (y === 5) {
|
|
1930
|
-
if (n(b) && (ot(b),
|
|
1931
|
-
else for (var C = s.length; C < S.length; C++)
|
|
1932
|
-
for (var O = Math.min(S.length, s.length), T = 0; T < O; T++) S.hasOwnProperty(T) || (
|
|
1930
|
+
if (n(b) && (ot(b), g.length = !0), S.length < s.length) for (var E = S.length; E < s.length; E++) g[E] = !1;
|
|
1931
|
+
else for (var C = s.length; C < S.length; C++) g[C] = !0;
|
|
1932
|
+
for (var O = Math.min(S.length, s.length), T = 0; T < O; T++) S.hasOwnProperty(T) || (g[T] = !0), g[T] === void 0 && c(S[T]);
|
|
1933
1933
|
}
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
@@ -2037,8 +2037,8 @@ var Ei = (function() {
|
|
|
2037
2037
|
}
|
|
2038
2038
|
if (!i || typeof i != "object") {
|
|
2039
2039
|
if ((c = a(i)) === void 0 && (c = i), c === eo && (c = void 0), n.D && Fr(c, !0), l) {
|
|
2040
|
-
var S = [],
|
|
2041
|
-
He("Patches").M(i, c, S,
|
|
2040
|
+
var S = [], g = [];
|
|
2041
|
+
He("Patches").M(i, c, S, g), l(S, g);
|
|
2042
2042
|
}
|
|
2043
2043
|
return c;
|
|
2044
2044
|
}
|
|
@@ -2266,7 +2266,7 @@ function oo(e, t, r) {
|
|
|
2266
2266
|
type: yt.REPLACE
|
|
2267
2267
|
});
|
|
2268
2268
|
}
|
|
2269
|
-
function
|
|
2269
|
+
function g() {
|
|
2270
2270
|
var y, E = b;
|
|
2271
2271
|
return y = {
|
|
2272
2272
|
/**
|
|
@@ -2300,7 +2300,7 @@ function oo(e, t, r) {
|
|
|
2300
2300
|
subscribe: b,
|
|
2301
2301
|
getState: v,
|
|
2302
2302
|
replaceReducer: S
|
|
2303
|
-
}, n[Tn] =
|
|
2303
|
+
}, n[Tn] = g, n;
|
|
2304
2304
|
}
|
|
2305
2305
|
function Rn(e) {
|
|
2306
2306
|
typeof console < "u" && typeof console.error == "function" && console.error(e);
|
|
@@ -2356,8 +2356,8 @@ function ki(e) {
|
|
|
2356
2356
|
var b = Ri(c, r, v, l);
|
|
2357
2357
|
b && Rn(b);
|
|
2358
2358
|
}
|
|
2359
|
-
for (var s = !1, S = {},
|
|
2360
|
-
var y = a[
|
|
2359
|
+
for (var s = !1, S = {}, g = 0; g < a.length; g++) {
|
|
2360
|
+
var y = a[g], E = r[y], C = c[y], O = E(C, v);
|
|
2361
2361
|
if (typeof O > "u") {
|
|
2362
2362
|
var T = v && v.type;
|
|
2363
2363
|
throw new Error(process.env.NODE_ENV === "production" ? Ee(14) : "When called with an action of type " + (T ? '"' + String(T) + '"' : "(unknown type)") + ', the slice reducer for key "' + y + '" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.');
|
|
@@ -2721,15 +2721,15 @@ function uo(e, t, r, n, i, a) {
|
|
|
2721
2721
|
for (var c in n)
|
|
2722
2722
|
p[c] = !0;
|
|
2723
2723
|
var v = t.length > 0, b = function(S) {
|
|
2724
|
-
var
|
|
2724
|
+
var g = a ? a + "." + S : S;
|
|
2725
2725
|
if (v) {
|
|
2726
2726
|
var y = t.some(function(C) {
|
|
2727
|
-
return C instanceof RegExp ? C.test(
|
|
2727
|
+
return C instanceof RegExp ? C.test(g) : g === C;
|
|
2728
2728
|
});
|
|
2729
2729
|
if (y)
|
|
2730
2730
|
return "continue";
|
|
2731
2731
|
}
|
|
2732
|
-
var E = uo(e, t, r.children[S], n[S], u,
|
|
2732
|
+
var E = uo(e, t, r.children[S], n[S], u, g);
|
|
2733
2733
|
if (E.wasMutated)
|
|
2734
2734
|
return { value: E };
|
|
2735
2735
|
};
|
|
@@ -2755,14 +2755,14 @@ function Qi(e) {
|
|
|
2755
2755
|
return function(p) {
|
|
2756
2756
|
var c = p.getState, v = c(), b = u(v), s;
|
|
2757
2757
|
return function(S) {
|
|
2758
|
-
return function(
|
|
2758
|
+
return function(g) {
|
|
2759
2759
|
var y = co(a, "ImmutableStateInvariantMiddleware");
|
|
2760
2760
|
y.measureTime(function() {
|
|
2761
2761
|
v = c(), s = b.detectMutations(), b = u(v), An(!s.wasMutated, "A state mutation was detected between dispatches, in the path '" + (s.path || "") + "'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
|
|
2762
2762
|
});
|
|
2763
|
-
var E = S(
|
|
2763
|
+
var E = S(g);
|
|
2764
2764
|
return y.measureTime(function() {
|
|
2765
|
-
v = c(), s = b.detectMutations(), b = u(v), s.wasMutated && An(!s.wasMutated, "A state mutation was detected inside a dispatch, in the path: " + (s.path || "") + ". Take a look at the reducer(s) handling the action " + Gi(
|
|
2765
|
+
v = c(), s = b.detectMutations(), b = u(v), s.wasMutated && An(!s.wasMutated, "A state mutation was detected inside a dispatch, in the path: " + (s.path || "") + ". Take a look at the reducer(s) handling the action " + Gi(g) + ". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
|
|
2766
2766
|
}), y.warnIfExceeded(), E;
|
|
2767
2767
|
};
|
|
2768
2768
|
};
|
|
@@ -2799,7 +2799,7 @@ function Ir(e, t, r, n, i, a) {
|
|
|
2799
2799
|
if (typeof C == "object" && (l = Ir(C, O, r, n, i, a), l))
|
|
2800
2800
|
return { value: l };
|
|
2801
2801
|
}, v = 0, b = u; v < b.length; v++) {
|
|
2802
|
-
var s = b[v], S = s[0],
|
|
2802
|
+
var s = b[v], S = s[0], g = s[1], y = c(S, g);
|
|
2803
2803
|
if (typeof y == "object")
|
|
2804
2804
|
return y.value;
|
|
2805
2805
|
}
|
|
@@ -2824,7 +2824,7 @@ function ea(e) {
|
|
|
2824
2824
|
};
|
|
2825
2825
|
};
|
|
2826
2826
|
};
|
|
2827
|
-
var t = e.isSerializable, r = t === void 0 ? fo : t, n = e.getEntries, i = e.ignoredActions, a = i === void 0 ? [] : i, l = e.ignoredActionPaths, u = l === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : l, p = e.ignoredPaths, c = p === void 0 ? [] : p, v = e.warnAfter, b = v === void 0 ? 32 : v, s = e.ignoreState, S = s === void 0 ? !1 : s,
|
|
2827
|
+
var t = e.isSerializable, r = t === void 0 ? fo : t, n = e.getEntries, i = e.ignoredActions, a = i === void 0 ? [] : i, l = e.ignoredActionPaths, u = l === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : l, p = e.ignoredPaths, c = p === void 0 ? [] : p, v = e.warnAfter, b = v === void 0 ? 32 : v, s = e.ignoreState, S = s === void 0 ? !1 : s, g = e.ignoreActions, y = g === void 0 ? !1 : g, E = e.disableCache, C = E === void 0 ? !1 : E, O = !C && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;
|
|
2828
2828
|
return function(T) {
|
|
2829
2829
|
return function(A) {
|
|
2830
2830
|
return function(x) {
|
|
@@ -2887,14 +2887,14 @@ function na(e) {
|
|
|
2887
2887
|
S = ki(i);
|
|
2888
2888
|
else
|
|
2889
2889
|
throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
|
|
2890
|
-
var
|
|
2891
|
-
if (typeof
|
|
2890
|
+
var g = l;
|
|
2891
|
+
if (typeof g == "function" && (g = g(t), !Or && !Array.isArray(g)))
|
|
2892
2892
|
throw new Error("when using a middleware builder function, an array of middleware must be returned");
|
|
2893
|
-
if (!Or &&
|
|
2893
|
+
if (!Or && g.some(function(A) {
|
|
2894
2894
|
return typeof A != "function";
|
|
2895
2895
|
}))
|
|
2896
2896
|
throw new Error("each middleware provided to configureStore must be a function");
|
|
2897
|
-
var y = Ni.apply(void 0,
|
|
2897
|
+
var y = Ni.apply(void 0, g), E = ir;
|
|
2898
2898
|
p && (E = Vi(it({
|
|
2899
2899
|
trace: !Or
|
|
2900
2900
|
}, typeof p == "object" && p)));
|
|
@@ -2953,34 +2953,34 @@ function ia(e, t, r, n) {
|
|
|
2953
2953
|
b === void 0 && (b = p());
|
|
2954
2954
|
var S = Mt([
|
|
2955
2955
|
a[s.type]
|
|
2956
|
-
], l.filter(function(
|
|
2957
|
-
var y =
|
|
2956
|
+
], l.filter(function(g) {
|
|
2957
|
+
var y = g.matcher;
|
|
2958
2958
|
return y(s);
|
|
2959
|
-
}).map(function(
|
|
2960
|
-
var y =
|
|
2959
|
+
}).map(function(g) {
|
|
2960
|
+
var y = g.reducer;
|
|
2961
2961
|
return y;
|
|
2962
2962
|
}));
|
|
2963
|
-
return S.filter(function(
|
|
2964
|
-
return !!
|
|
2965
|
-
}).length === 0 && (S = [u]), S.reduce(function(
|
|
2963
|
+
return S.filter(function(g) {
|
|
2964
|
+
return !!g;
|
|
2965
|
+
}).length === 0 && (S = [u]), S.reduce(function(g, y) {
|
|
2966
2966
|
if (y)
|
|
2967
|
-
if (ct(
|
|
2968
|
-
var E =
|
|
2969
|
-
return C === void 0 ?
|
|
2967
|
+
if (ct(g)) {
|
|
2968
|
+
var E = g, C = y(E, s);
|
|
2969
|
+
return C === void 0 ? g : C;
|
|
2970
2970
|
} else {
|
|
2971
|
-
if (Ze(
|
|
2972
|
-
return ro(
|
|
2971
|
+
if (Ze(g))
|
|
2972
|
+
return ro(g, function(O) {
|
|
2973
2973
|
return y(O, s);
|
|
2974
2974
|
});
|
|
2975
|
-
var C = y(
|
|
2975
|
+
var C = y(g, s);
|
|
2976
2976
|
if (C === void 0) {
|
|
2977
|
-
if (
|
|
2978
|
-
return
|
|
2977
|
+
if (g === null)
|
|
2978
|
+
return g;
|
|
2979
2979
|
throw Error("A case reducer on a non-draftable value must not return undefined");
|
|
2980
2980
|
}
|
|
2981
2981
|
return C;
|
|
2982
2982
|
}
|
|
2983
|
-
return
|
|
2983
|
+
return g;
|
|
2984
2984
|
}, b);
|
|
2985
2985
|
}
|
|
2986
2986
|
return v.getInitialState = p, v;
|
|
@@ -2994,16 +2994,16 @@ function sa(e) {
|
|
|
2994
2994
|
typeof process < "u" && process.env.NODE_ENV === "development" && e.initialState === void 0 && console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
|
|
2995
2995
|
var r = typeof e.initialState == "function" ? e.initialState : Ar(e.initialState), n = e.reducers || {}, i = Object.keys(n), a = {}, l = {}, u = {};
|
|
2996
2996
|
i.forEach(function(v) {
|
|
2997
|
-
var b = n[v], s = aa(t, v), S,
|
|
2998
|
-
"reducer" in b ? (S = b.reducer,
|
|
2997
|
+
var b = n[v], s = aa(t, v), S, g;
|
|
2998
|
+
"reducer" in b ? (S = b.reducer, g = b.prepare) : S = b, a[v] = S, l[s] = S, u[v] = g ? at(s, g) : at(s);
|
|
2999
2999
|
});
|
|
3000
3000
|
function p() {
|
|
3001
3001
|
process.env.NODE_ENV !== "production" && typeof e.extraReducers == "object" && (Dn || (Dn = !0, console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice")));
|
|
3002
|
-
var v = typeof e.extraReducers == "function" ? po(e.extraReducers) : [e.extraReducers], b = v[0], s = b === void 0 ? {} : b, S = v[1],
|
|
3002
|
+
var v = typeof e.extraReducers == "function" ? po(e.extraReducers) : [e.extraReducers], b = v[0], s = b === void 0 ? {} : b, S = v[1], g = S === void 0 ? [] : S, y = v[2], E = y === void 0 ? void 0 : y, C = it(it({}, s), l);
|
|
3003
3003
|
return ia(r, function(O) {
|
|
3004
3004
|
for (var T in C)
|
|
3005
3005
|
O.addCase(T, C[T]);
|
|
3006
|
-
for (var A = 0, x =
|
|
3006
|
+
for (var A = 0, x = g; A < x.length; A++) {
|
|
3007
3007
|
var I = x[A];
|
|
3008
3008
|
O.addMatcher(I.matcher, I.reducer);
|
|
3009
3009
|
}
|
|
@@ -3079,11 +3079,11 @@ var ca = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", la
|
|
|
3079
3079
|
requestStatus: "pending"
|
|
3080
3080
|
})
|
|
3081
3081
|
};
|
|
3082
|
-
}), l = at(t + "/rejected", function(v, b, s, S,
|
|
3082
|
+
}), l = at(t + "/rejected", function(v, b, s, S, g) {
|
|
3083
3083
|
return {
|
|
3084
3084
|
payload: S,
|
|
3085
3085
|
error: (n && n.serializeError || fa)(v || "Rejected"),
|
|
3086
|
-
meta: _r(it({},
|
|
3086
|
+
meta: _r(it({}, g || {}), {
|
|
3087
3087
|
arg: s,
|
|
3088
3088
|
requestId: b,
|
|
3089
3089
|
rejectedWithValue: !!S,
|
|
@@ -3119,7 +3119,7 @@ var ca = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", la
|
|
|
3119
3119
|
);
|
|
3120
3120
|
function c(v) {
|
|
3121
3121
|
return function(b, s, S) {
|
|
3122
|
-
var
|
|
3122
|
+
var g = n != null && n.idGenerator ? n.idGenerator(v) : la(), y = new p(), E;
|
|
3123
3123
|
function C(T) {
|
|
3124
3124
|
E = T, y.abort();
|
|
3125
3125
|
}
|
|
@@ -3145,13 +3145,13 @@ var ca = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", la
|
|
|
3145
3145
|
message: E || "Aborted"
|
|
3146
3146
|
});
|
|
3147
3147
|
});
|
|
3148
|
-
}), b(a(
|
|
3148
|
+
}), b(a(g, v, (A = n == null ? void 0 : n.getPendingMeta) == null ? void 0 : A.call(n, { requestId: g, arg: v }, { getState: s, extra: S }))), [4, Promise.race([
|
|
3149
3149
|
$,
|
|
3150
3150
|
Promise.resolve(r(v, {
|
|
3151
3151
|
dispatch: b,
|
|
3152
3152
|
getState: s,
|
|
3153
3153
|
extra: S,
|
|
3154
|
-
requestId:
|
|
3154
|
+
requestId: g,
|
|
3155
3155
|
signal: y.signal,
|
|
3156
3156
|
abort: C,
|
|
3157
3157
|
rejectWithValue: function(Q, ue) {
|
|
@@ -3163,13 +3163,13 @@ var ca = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", la
|
|
|
3163
3163
|
})).then(function(Q) {
|
|
3164
3164
|
if (Q instanceof jr)
|
|
3165
3165
|
throw Q;
|
|
3166
|
-
return Q instanceof zn ? i(Q.payload,
|
|
3166
|
+
return Q instanceof zn ? i(Q.payload, g, v, Q.meta) : i(Q, g, v);
|
|
3167
3167
|
})
|
|
3168
3168
|
])];
|
|
3169
3169
|
case 3:
|
|
3170
3170
|
return x = R.sent(), [3, 5];
|
|
3171
3171
|
case 4:
|
|
3172
|
-
return j = R.sent(), x = j instanceof jr ? l(null,
|
|
3172
|
+
return j = R.sent(), x = j instanceof jr ? l(null, g, v, j.payload, j.meta) : l(j, g, v), [3, 5];
|
|
3173
3173
|
case 5:
|
|
3174
3174
|
return F = n && !n.dispatchConditionRejection && l.match(x) && x.meta.condition, F || b(x), [2, x];
|
|
3175
3175
|
}
|
|
@@ -3178,7 +3178,7 @@ var ca = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", la
|
|
|
3178
3178
|
})();
|
|
3179
3179
|
return Object.assign(O, {
|
|
3180
3180
|
abort: C,
|
|
3181
|
-
requestId:
|
|
3181
|
+
requestId: g,
|
|
3182
3182
|
arg: v,
|
|
3183
3183
|
unwrap: function() {
|
|
3184
3184
|
return O.then(da);
|
|
@@ -3413,7 +3413,7 @@ const Hr = sa({
|
|
|
3413
3413
|
const v = p - l, b = c - u;
|
|
3414
3414
|
if (v <= 0 || b <= 0)
|
|
3415
3415
|
return;
|
|
3416
|
-
const s = r - i * 2, S = n - i * 2,
|
|
3416
|
+
const s = r - i * 2, S = n - i * 2, g = s / v, y = S / b, E = Math.min(g, y, 5), C = (l + p) / 2, O = (u + c) / 2, T = r / 2 - C * E, A = n / 2 - O * E;
|
|
3417
3417
|
e.viewport.zoom = Math.max(0.1, E), e.viewport.panX = T, e.viewport.panY = A;
|
|
3418
3418
|
},
|
|
3419
3419
|
setLocked(e, t) {
|
|
@@ -3459,6 +3459,7 @@ const Hr = sa({
|
|
|
3459
3459
|
"hexagon",
|
|
3460
3460
|
"octagon",
|
|
3461
3461
|
"arrow",
|
|
3462
|
+
"image",
|
|
3462
3463
|
"text"
|
|
3463
3464
|
]), Pa = /* @__PURE__ */ new Set([
|
|
3464
3465
|
// shapes / pencil
|
|
@@ -3492,7 +3493,7 @@ const Hr = sa({
|
|
|
3492
3493
|
}, Wn = (e) => {
|
|
3493
3494
|
if (!e || typeof e != "object") return !1;
|
|
3494
3495
|
const t = (r) => Object.prototype.hasOwnProperty.call(e, r);
|
|
3495
|
-
return !!(t("text") || t("fontSize") || t("fontColor") || t("textColor") || t("strokeColor") || t("fillColor") || t("lineWidth") || t("x") || t("y") || t("width") || t("height") || t("centerX") || t("centerY") || t("radius") || t("size") || t("startX") || t("startY") || t("endX") || t("endY") || t("points"));
|
|
3496
|
+
return !!(t("text") || t("fontSize") || t("fontColor") || t("textColor") || t("strokeColor") || t("fillColor") || t("lineWidth") || t("x") || t("y") || t("width") || t("height") || t("centerX") || t("centerY") || t("radius") || t("size") || t("startX") || t("startY") || t("endX") || t("endY") || t("points") || t("src"));
|
|
3496
3497
|
}, Ra = (e) => (t) => (r) => (n) => {
|
|
3497
3498
|
var a;
|
|
3498
3499
|
const i = r(n);
|
|
@@ -3710,7 +3711,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
3710
3711
|
}, us = ({ mode: e = "user", onImageUpload: t }) => {
|
|
3711
3712
|
const r = Wr(), { t: n, language: i, changeLanguage: a } = cr(), l = _e(
|
|
3712
3713
|
(F) => F.whiteboard.toolbar.selectedTool
|
|
3713
|
-
), u = _e((F) => F.whiteboard.lock.isLocked), [p, c] = ce(!1), [v, b] = ce(!1), [s, S] = ce(!1),
|
|
3714
|
+
), u = _e((F) => F.whiteboard.lock.isLocked), [p, c] = ce(!1), [v, b] = ce(!1), [s, S] = ce(!1), g = $e(null), y = $e(null), E = $e(null), C = $e(null), O = $e(null), T = async (F) => {
|
|
3714
3715
|
var Q;
|
|
3715
3716
|
const R = (Q = F.target.files) == null ? void 0 : Q[0];
|
|
3716
3717
|
if (R) {
|
|
@@ -3763,7 +3764,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
3763
3764
|
xe(() => {
|
|
3764
3765
|
const F = (R) => {
|
|
3765
3766
|
const Q = R.target;
|
|
3766
|
-
|
|
3767
|
+
g.current && !g.current.contains(Q) && y.current && !y.current.contains(Q) && c(!1), C.current && !C.current.contains(Q) && E.current && !E.current.contains(Q) && b(!1);
|
|
3767
3768
|
};
|
|
3768
3769
|
return document.addEventListener("mousedown", F), () => document.removeEventListener("mousedown", F);
|
|
3769
3770
|
}, []);
|
|
@@ -3872,7 +3873,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
3872
3873
|
children: /* @__PURE__ */ h.jsx(ns, {})
|
|
3873
3874
|
}
|
|
3874
3875
|
),
|
|
3875
|
-
p && /* @__PURE__ */ h.jsxs("div", { className: "wb-shapes-popup", ref:
|
|
3876
|
+
p && /* @__PURE__ */ h.jsxs("div", { className: "wb-shapes-popup", ref: g, children: [
|
|
3876
3877
|
/* @__PURE__ */ h.jsx("div", { className: "wb-shapes-popup-header", children: n("moreShapes") }),
|
|
3877
3878
|
/* @__PURE__ */ h.jsx("div", { className: "wb-shapes-popup-grid", children: I.map((F) => /* @__PURE__ */ h.jsx(
|
|
3878
3879
|
"button",
|
|
@@ -3967,15 +3968,15 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
3967
3968
|
(s) => s.whiteboard.toolProperties
|
|
3968
3969
|
), a = _e(
|
|
3969
3970
|
(s) => s.whiteboard.selectedElementIds || []
|
|
3970
|
-
), l = _e((s) => s.whiteboard.elements), u = a.length > 0 ? l.find((s) => s.id === a[0]) : null, p = (s, S,
|
|
3971
|
-
t(ma({ tool: s, property: S, value:
|
|
3971
|
+
), l = _e((s) => s.whiteboard.elements), u = a.length > 0 ? l.find((s) => s.id === a[0]) : null, p = (s, S, g) => {
|
|
3972
|
+
t(ma({ tool: s, property: S, value: g }));
|
|
3972
3973
|
}, c = (s, S) => {
|
|
3973
3974
|
if (a.length > 0) {
|
|
3974
|
-
const
|
|
3975
|
+
const g = a.map((y) => ({
|
|
3975
3976
|
id: y,
|
|
3976
3977
|
updates: { [s]: S }
|
|
3977
3978
|
}));
|
|
3978
|
-
t(vo(
|
|
3979
|
+
t(vo(g));
|
|
3979
3980
|
}
|
|
3980
3981
|
}, v = () => {
|
|
3981
3982
|
a.forEach((s) => {
|
|
@@ -4100,7 +4101,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4100
4101
|
{
|
|
4101
4102
|
type: "color",
|
|
4102
4103
|
value: u.strokeColor,
|
|
4103
|
-
onChange: (
|
|
4104
|
+
onChange: (g) => c("strokeColor", g.target.value)
|
|
4104
4105
|
}
|
|
4105
4106
|
)
|
|
4106
4107
|
] }),
|
|
@@ -4111,7 +4112,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4111
4112
|
{
|
|
4112
4113
|
type: "color",
|
|
4113
4114
|
value: u.fillColor,
|
|
4114
|
-
onChange: (
|
|
4115
|
+
onChange: (g) => c("fillColor", g.target.value)
|
|
4115
4116
|
}
|
|
4116
4117
|
)
|
|
4117
4118
|
] }),
|
|
@@ -4122,9 +4123,9 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4122
4123
|
{
|
|
4123
4124
|
className: "stroke-width-selector",
|
|
4124
4125
|
value: u.lineWidth,
|
|
4125
|
-
onChange: (
|
|
4126
|
+
onChange: (g) => c(
|
|
4126
4127
|
"lineWidth",
|
|
4127
|
-
parseInt(
|
|
4128
|
+
parseInt(g.target.value)
|
|
4128
4129
|
),
|
|
4129
4130
|
children: [
|
|
4130
4131
|
/* @__PURE__ */ h.jsx("option", { value: "1", children: "1 px" }),
|
|
@@ -4144,7 +4145,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4144
4145
|
{
|
|
4145
4146
|
type: "color",
|
|
4146
4147
|
value: u.strokeColor,
|
|
4147
|
-
onChange: (
|
|
4148
|
+
onChange: (g) => c("strokeColor", g.target.value)
|
|
4148
4149
|
}
|
|
4149
4150
|
)
|
|
4150
4151
|
] }),
|
|
@@ -4155,9 +4156,9 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4155
4156
|
{
|
|
4156
4157
|
className: "brush-size-selector",
|
|
4157
4158
|
value: u.lineWidth,
|
|
4158
|
-
onChange: (
|
|
4159
|
+
onChange: (g) => c(
|
|
4159
4160
|
"lineWidth",
|
|
4160
|
-
parseInt(
|
|
4161
|
+
parseInt(g.target.value)
|
|
4161
4162
|
),
|
|
4162
4163
|
children: [
|
|
4163
4164
|
/* @__PURE__ */ h.jsx("option", { value: "1", children: "1 px" }),
|
|
@@ -4363,7 +4364,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4363
4364
|
] });
|
|
4364
4365
|
}, wo = Fn(({ watermark: e, isLocked: t, lockText: r, onLockChange: n, isWatermarkEnabled: i, watermarkText: a, mode: l, initialElements: u, onAfterMount: p, onImageUpload: c }, v) => {
|
|
4365
4366
|
var Jr;
|
|
4366
|
-
const b = $e(null), s = Wr(), S = Gn(),
|
|
4367
|
+
const b = $e(null), s = Wr(), S = Gn(), g = _e((o) => o.whiteboard.grid), y = _e(
|
|
4367
4368
|
(o) => o.whiteboard.toolbar.selectedTool
|
|
4368
4369
|
), E = _e((o) => o.whiteboard.elements), C = _e((o) => o.whiteboard.viewport), O = _e(
|
|
4369
4370
|
(o) => o.whiteboard.toolProperties
|
|
@@ -4443,176 +4444,187 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4443
4444
|
}, 0);
|
|
4444
4445
|
}, []);
|
|
4445
4446
|
const xt = se(
|
|
4446
|
-
(o, f,
|
|
4447
|
-
const w = o.canvas, _ = w.width, P = w.height,
|
|
4447
|
+
(o, f, m) => {
|
|
4448
|
+
const w = o.canvas, _ = w.width, P = w.height, N = Math.floor(-C.panX / C.zoom / f) * f, M = Math.floor(-C.panY / C.zoom / f) * f, D = Math.ceil(
|
|
4448
4449
|
(_ / C.zoom - C.panX / C.zoom) / f
|
|
4449
4450
|
) * f, X = Math.ceil(
|
|
4450
4451
|
(P / C.zoom - C.panY / C.zoom) / f
|
|
4451
4452
|
) * f;
|
|
4452
|
-
o.strokeStyle =
|
|
4453
|
-
for (let W =
|
|
4454
|
-
o.beginPath(), o.moveTo(W,
|
|
4455
|
-
for (let W =
|
|
4456
|
-
o.beginPath(), o.moveTo(
|
|
4453
|
+
o.strokeStyle = m, o.lineWidth = 0.5 / C.zoom;
|
|
4454
|
+
for (let W = N; W <= D; W += f)
|
|
4455
|
+
o.beginPath(), o.moveTo(W, M), o.lineTo(W, X), o.stroke();
|
|
4456
|
+
for (let W = M; W <= X; W += f)
|
|
4457
|
+
o.beginPath(), o.moveTo(N, W), o.lineTo(D, W), o.stroke();
|
|
4457
4458
|
},
|
|
4458
4459
|
[C]
|
|
4459
|
-
), zt = se((o, f,
|
|
4460
|
-
const w = Math.min(f.x,
|
|
4461
|
-
o.strokeStyle = "#0066cc", o.lineWidth = 1, o.setLineDash([5, 5]), o.strokeRect(w, _, P,
|
|
4460
|
+
), zt = se((o, f, m) => {
|
|
4461
|
+
const w = Math.min(f.x, m.x), _ = Math.min(f.y, m.y), P = Math.abs(m.x - f.x), N = Math.abs(m.y - f.y);
|
|
4462
|
+
o.strokeStyle = "#0066cc", o.lineWidth = 1, o.setLineDash([5, 5]), o.strokeRect(w, _, P, N), o.fillStyle = "rgba(0, 102, 204, 0.1)", o.fillRect(w, _, P, N), o.setLineDash([]);
|
|
4462
4463
|
}, []), Le = se((o, f) => {
|
|
4463
4464
|
const {
|
|
4464
|
-
x:
|
|
4465
|
+
x: m = 0,
|
|
4465
4466
|
y: w = 0,
|
|
4466
4467
|
width: _ = 0,
|
|
4467
4468
|
height: P = 0,
|
|
4468
|
-
fillColor:
|
|
4469
|
-
strokeColor:
|
|
4469
|
+
fillColor: N = "#000",
|
|
4470
|
+
strokeColor: M = "#000",
|
|
4470
4471
|
lineWidth: D = 2
|
|
4471
4472
|
} = f;
|
|
4472
|
-
o.fillStyle =
|
|
4473
|
+
o.fillStyle = N, o.fillRect(m, w, _, P), o.strokeStyle = M, o.lineWidth = D, o.strokeRect(m, w, _, P);
|
|
4473
4474
|
}, []), tt = se((o, f) => {
|
|
4474
4475
|
const {
|
|
4475
|
-
centerX:
|
|
4476
|
+
centerX: m = 0,
|
|
4476
4477
|
centerY: w = 0,
|
|
4477
4478
|
radius: _ = 0,
|
|
4478
4479
|
fillColor: P = "#000",
|
|
4479
|
-
strokeColor:
|
|
4480
|
-
lineWidth:
|
|
4480
|
+
strokeColor: N = "#000",
|
|
4481
|
+
lineWidth: M = 2
|
|
4481
4482
|
} = f;
|
|
4482
|
-
o.beginPath(), o.arc(
|
|
4483
|
+
o.beginPath(), o.arc(m, w, _, 0, Math.PI * 2), o.fillStyle = P, o.fill(), o.strokeStyle = N, o.lineWidth = M, o.stroke();
|
|
4483
4484
|
}, []), rt = se((o, f) => {
|
|
4484
|
-
const { points:
|
|
4485
|
-
if (!(
|
|
4486
|
-
o.strokeStyle = w, o.lineWidth = _, o.lineCap = "round", o.lineJoin = "round", o.beginPath(), o.moveTo(
|
|
4487
|
-
for (let P = 1; P <
|
|
4488
|
-
|
|
4485
|
+
const { points: m = [], strokeColor: w = "#000", lineWidth: _ = 2 } = f;
|
|
4486
|
+
if (!(m.length < 2)) {
|
|
4487
|
+
o.strokeStyle = w, o.lineWidth = _, o.lineCap = "round", o.lineJoin = "round", o.beginPath(), o.moveTo(m[0].x, m[0].y);
|
|
4488
|
+
for (let P = 1; P < m.length; P++)
|
|
4489
|
+
m[P] && o.lineTo(m[P].x, m[P].y);
|
|
4489
4490
|
o.stroke();
|
|
4490
4491
|
}
|
|
4491
4492
|
}, []), Lt = se((o, f) => {
|
|
4492
|
-
const { x:
|
|
4493
|
-
o.font = `${P}px sans-serif`, o.fillStyle =
|
|
4493
|
+
const { x: m = 0, y: w = 0, text: _ = "", fontSize: P = 16, fontColor: N = "#000" } = f;
|
|
4494
|
+
o.font = `${P}px sans-serif`, o.fillStyle = N, o.textBaseline = "top", o.fillText(_, m, w);
|
|
4494
4495
|
}, []), Et = se((o, f) => {
|
|
4495
4496
|
const {
|
|
4496
|
-
x:
|
|
4497
|
+
x: m = 0,
|
|
4497
4498
|
y: w = 0,
|
|
4498
4499
|
width: _ = 0,
|
|
4499
4500
|
height: P = 0,
|
|
4500
|
-
fillColor:
|
|
4501
|
-
strokeColor:
|
|
4501
|
+
fillColor: N = "#fff",
|
|
4502
|
+
strokeColor: M = "#000",
|
|
4502
4503
|
lineWidth: D = 2
|
|
4503
4504
|
} = f;
|
|
4504
|
-
o.beginPath(), o.moveTo(
|
|
4505
|
+
o.beginPath(), o.moveTo(m + _ / 2, w), o.lineTo(m + _, w + P), o.lineTo(m, w + P), o.closePath(), o.fillStyle = N, o.fill(), o.strokeStyle = M, o.lineWidth = D, o.stroke();
|
|
4505
4506
|
}, []), ft = se((o, f) => {
|
|
4506
4507
|
const {
|
|
4507
|
-
x:
|
|
4508
|
+
x: m = 0,
|
|
4508
4509
|
y: w = 0,
|
|
4509
4510
|
width: _ = 0,
|
|
4510
4511
|
height: P = 0,
|
|
4511
|
-
fillColor:
|
|
4512
|
-
strokeColor:
|
|
4512
|
+
fillColor: N = "#fff",
|
|
4513
|
+
strokeColor: M = "#000",
|
|
4513
4514
|
lineWidth: D = 2
|
|
4514
4515
|
} = f;
|
|
4515
|
-
o.beginPath(), o.moveTo(
|
|
4516
|
+
o.beginPath(), o.moveTo(m + _ / 2, w), o.lineTo(m + _, w + P / 2), o.lineTo(m + _ / 2, w + P), o.lineTo(m, w + P / 2), o.closePath(), o.fillStyle = N, o.fill(), o.strokeStyle = M, o.lineWidth = D, o.stroke();
|
|
4516
4517
|
}, []), St = se((o, f) => {
|
|
4517
4518
|
const {
|
|
4518
|
-
centerX:
|
|
4519
|
+
centerX: m = 0,
|
|
4519
4520
|
centerY: w = 0,
|
|
4520
4521
|
size: _ = 0,
|
|
4521
4522
|
fillColor: P = "#ffff00",
|
|
4522
|
-
strokeColor:
|
|
4523
|
-
lineWidth:
|
|
4523
|
+
strokeColor: N = "#000",
|
|
4524
|
+
lineWidth: M = 2
|
|
4524
4525
|
} = f, D = 5, X = _, W = _ / 2;
|
|
4525
4526
|
o.beginPath();
|
|
4526
4527
|
for (let z = 0; z < D * 2; z++) {
|
|
4527
|
-
const U = z % 2 === 0 ? X : W, H = Math.PI / D * z - Math.PI / 2, G =
|
|
4528
|
+
const U = z % 2 === 0 ? X : W, H = Math.PI / D * z - Math.PI / 2, G = m + Math.cos(H) * U, ee = w + Math.sin(H) * U;
|
|
4528
4529
|
z === 0 ? o.moveTo(G, ee) : o.lineTo(G, ee);
|
|
4529
4530
|
}
|
|
4530
|
-
o.closePath(), o.fillStyle = P, o.fill(), o.strokeStyle =
|
|
4531
|
+
o.closePath(), o.fillStyle = P, o.fill(), o.strokeStyle = N, o.lineWidth = M, o.stroke();
|
|
4531
4532
|
}, []), dt = se((o, f) => {
|
|
4532
4533
|
const {
|
|
4533
|
-
centerX:
|
|
4534
|
+
centerX: m = 0,
|
|
4534
4535
|
centerY: w = 0,
|
|
4535
4536
|
size: _ = 0,
|
|
4536
4537
|
fillColor: P = "#ff6b6b",
|
|
4537
|
-
strokeColor:
|
|
4538
|
-
lineWidth:
|
|
4538
|
+
strokeColor: N = "#000",
|
|
4539
|
+
lineWidth: M = 2
|
|
4539
4540
|
} = f;
|
|
4540
4541
|
o.beginPath();
|
|
4541
4542
|
const D = w - _ / 2;
|
|
4542
|
-
o.moveTo(
|
|
4543
|
-
|
|
4543
|
+
o.moveTo(m, D + _ / 4), o.bezierCurveTo(
|
|
4544
|
+
m - _ / 2,
|
|
4544
4545
|
D,
|
|
4545
|
-
|
|
4546
|
+
m - _,
|
|
4546
4547
|
D + _ / 2,
|
|
4547
|
-
|
|
4548
|
+
m,
|
|
4548
4549
|
w + _ / 2
|
|
4549
4550
|
), o.bezierCurveTo(
|
|
4550
|
-
|
|
4551
|
+
m + _,
|
|
4551
4552
|
D + _ / 2,
|
|
4552
|
-
|
|
4553
|
+
m + _ / 2,
|
|
4553
4554
|
D,
|
|
4554
|
-
|
|
4555
|
+
m,
|
|
4555
4556
|
D + _ / 4
|
|
4556
|
-
), o.fillStyle = P, o.fill(), o.strokeStyle =
|
|
4557
|
+
), o.fillStyle = P, o.fill(), o.strokeStyle = N, o.lineWidth = M, o.stroke();
|
|
4557
4558
|
}, []), ht = se((o, f) => {
|
|
4558
4559
|
const {
|
|
4559
|
-
x:
|
|
4560
|
+
x: m = 0,
|
|
4560
4561
|
y: w = 0,
|
|
4561
4562
|
width: _ = 0,
|
|
4562
4563
|
height: P = 0,
|
|
4563
|
-
fillColor:
|
|
4564
|
-
strokeColor:
|
|
4564
|
+
fillColor: N = "#fff",
|
|
4565
|
+
strokeColor: M = "#000",
|
|
4565
4566
|
lineWidth: D = 2
|
|
4566
|
-
} = f, X =
|
|
4567
|
+
} = f, X = m + _ / 2, W = w + P / 2, z = _ / 2, U = P / 2;
|
|
4567
4568
|
o.beginPath();
|
|
4568
4569
|
for (let H = 0; H < 6; H++) {
|
|
4569
4570
|
const G = Math.PI / 3 * H - Math.PI / 2, ee = X + Math.cos(G) * z, ye = W + Math.sin(G) * U;
|
|
4570
4571
|
H === 0 ? o.moveTo(ee, ye) : o.lineTo(ee, ye);
|
|
4571
4572
|
}
|
|
4572
|
-
o.closePath(), o.fillStyle =
|
|
4573
|
+
o.closePath(), o.fillStyle = N, o.fill(), o.strokeStyle = M, o.lineWidth = D, o.stroke();
|
|
4573
4574
|
}, []), Ct = se((o, f) => {
|
|
4574
4575
|
const {
|
|
4575
|
-
x:
|
|
4576
|
+
x: m = 0,
|
|
4576
4577
|
y: w = 0,
|
|
4577
4578
|
width: _ = 0,
|
|
4578
4579
|
height: P = 0,
|
|
4579
|
-
fillColor:
|
|
4580
|
-
strokeColor:
|
|
4580
|
+
fillColor: N = "#fff",
|
|
4581
|
+
strokeColor: M = "#000",
|
|
4581
4582
|
lineWidth: D = 2
|
|
4582
|
-
} = f, X =
|
|
4583
|
+
} = f, X = m + _ / 2, W = w + P / 2, z = _ / 2, U = P / 2;
|
|
4583
4584
|
o.beginPath();
|
|
4584
4585
|
for (let H = 0; H < 8; H++) {
|
|
4585
4586
|
const G = Math.PI / 4 * H - Math.PI / 2, ee = X + Math.cos(G) * z, ye = W + Math.sin(G) * U;
|
|
4586
4587
|
H === 0 ? o.moveTo(ee, ye) : o.lineTo(ee, ye);
|
|
4587
4588
|
}
|
|
4588
|
-
o.closePath(), o.fillStyle =
|
|
4589
|
+
o.closePath(), o.fillStyle = N, o.fill(), o.strokeStyle = M, o.lineWidth = D, o.stroke();
|
|
4589
4590
|
}, []), _t = se((o, f) => {
|
|
4590
4591
|
const {
|
|
4591
|
-
startX:
|
|
4592
|
+
startX: m = 0,
|
|
4592
4593
|
startY: w = 0,
|
|
4593
4594
|
endX: _ = 0,
|
|
4594
4595
|
endY: P = 0,
|
|
4595
|
-
fillColor:
|
|
4596
|
-
strokeColor:
|
|
4596
|
+
fillColor: N = "#000",
|
|
4597
|
+
strokeColor: M = "#000",
|
|
4597
4598
|
lineWidth: D = 2
|
|
4598
|
-
} = f, X = 15, W = Math.atan2(P - w, _ -
|
|
4599
|
-
o.beginPath(), o.moveTo(
|
|
4599
|
+
} = f, X = 15, W = Math.atan2(P - w, _ - m);
|
|
4600
|
+
o.beginPath(), o.moveTo(m, w), o.lineTo(_, P), o.strokeStyle = M, o.lineWidth = D, o.stroke(), o.beginPath(), o.moveTo(_, P), o.lineTo(
|
|
4600
4601
|
_ - X * Math.cos(W - Math.PI / 6),
|
|
4601
4602
|
P - X * Math.sin(W - Math.PI / 6)
|
|
4602
4603
|
), o.lineTo(
|
|
4603
4604
|
_ - X * Math.cos(W + Math.PI / 6),
|
|
4604
4605
|
P - X * Math.sin(W + Math.PI / 6)
|
|
4605
|
-
), o.closePath(), o.fillStyle =
|
|
4606
|
+
), o.closePath(), o.fillStyle = N, o.fill();
|
|
4606
4607
|
}, []), pt = $e({}), Wt = $e(null), Ht = se((o, f) => {
|
|
4607
|
-
const { x:
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4608
|
+
const { x: m = 0, y: w = 0, width: _ = 0, height: P = 0, src: N = "" } = f;
|
|
4609
|
+
try {
|
|
4610
|
+
if (pt.current[N]) {
|
|
4611
|
+
const M = pt.current[N];
|
|
4612
|
+
if (M.complete && M.naturalWidth > 0)
|
|
4613
|
+
try {
|
|
4614
|
+
o.drawImage(M, m, w, _, P);
|
|
4615
|
+
} catch (D) {
|
|
4616
|
+
console.error("Failed to draw cached image:", D);
|
|
4617
|
+
}
|
|
4618
|
+
} else {
|
|
4619
|
+
const M = new Image();
|
|
4620
|
+
M.onload = () => {
|
|
4621
|
+
pt.current[N] = M, Wt.current && Wt.current();
|
|
4622
|
+
}, M.onerror = (D) => {
|
|
4623
|
+
console.error("Failed to load image:", N, D);
|
|
4624
|
+
}, M.src = N, pt.current[N] = M;
|
|
4625
|
+
}
|
|
4626
|
+
} catch (M) {
|
|
4627
|
+
console.error("Error in drawImage:", M);
|
|
4616
4628
|
}
|
|
4617
4629
|
}, []), Ot = se(
|
|
4618
4630
|
(o, f) => {
|
|
@@ -4674,11 +4686,11 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4674
4686
|
if (!o) return;
|
|
4675
4687
|
const f = document.createElement("canvas");
|
|
4676
4688
|
f.width = o.width, f.height = o.height;
|
|
4677
|
-
const
|
|
4678
|
-
if (!
|
|
4679
|
-
|
|
4680
|
-
Ot(
|
|
4681
|
-
}),
|
|
4689
|
+
const m = f.getContext("2d");
|
|
4690
|
+
if (!m) return;
|
|
4691
|
+
m.fillStyle = "#ffffff", m.fillRect(0, 0, f.width, f.height), m.save(), m.translate(C.panX, C.panY), m.scale(C.zoom, C.zoom), E.forEach((P) => {
|
|
4692
|
+
Ot(m, P);
|
|
4693
|
+
}), m.restore();
|
|
4682
4694
|
const w = f.toDataURL("image/png"), _ = document.createElement("a");
|
|
4683
4695
|
_.download = `whiteboard-${Date.now()}.png`, _.href = w, _.click();
|
|
4684
4696
|
}, [C, E, Ot]), d = se(() => {
|
|
@@ -4690,22 +4702,22 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4690
4702
|
padding: 50
|
|
4691
4703
|
})
|
|
4692
4704
|
);
|
|
4693
|
-
}, [s]),
|
|
4705
|
+
}, [s]), k = se(() => {
|
|
4694
4706
|
s(ya());
|
|
4695
|
-
}, [s]), L = (o, f,
|
|
4696
|
-
const
|
|
4707
|
+
}, [s]), L = (o, f, m, w, _, P) => {
|
|
4708
|
+
const N = o - m, M = f - w, D = _ - m, X = P - w, W = N * D + M * X, z = D * D + X * X;
|
|
4697
4709
|
let U = -1;
|
|
4698
4710
|
z !== 0 && (U = W / z);
|
|
4699
4711
|
let H, G;
|
|
4700
|
-
U < 0 ? (H =
|
|
4712
|
+
U < 0 ? (H = m, G = w) : U > 1 ? (H = _, G = P) : (H = m + U * D, G = w + U * X);
|
|
4701
4713
|
const ee = o - H, ye = f - G;
|
|
4702
4714
|
return Math.sqrt(ee * ee + ye * ye);
|
|
4703
4715
|
}, B = se(
|
|
4704
4716
|
(o, f) => {
|
|
4705
|
-
for (let
|
|
4706
|
-
const w = E[
|
|
4717
|
+
for (let m = E.length - 1; m >= 0; m--) {
|
|
4718
|
+
const w = E[m], _ = w.x ?? 0, P = w.y ?? 0, N = w.width ?? 0, M = w.height ?? 0, D = w.centerX ?? 0, X = w.centerY ?? 0, W = w.radius ?? 0;
|
|
4707
4719
|
if (w.type === "rectangle") {
|
|
4708
|
-
if (o >= _ && o <= _ +
|
|
4720
|
+
if (o >= _ && o <= _ + N && f >= P && f <= P + M)
|
|
4709
4721
|
return w;
|
|
4710
4722
|
} else if (w.type === "circle") {
|
|
4711
4723
|
if (Math.sqrt(
|
|
@@ -4732,7 +4744,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4732
4744
|
if (o >= _ && o <= _ + H && f >= P && f <= P + G)
|
|
4733
4745
|
return w;
|
|
4734
4746
|
} else if (w.type === "triangle" || w.type === "diamond" || w.type === "hexagon" || w.type === "octagon") {
|
|
4735
|
-
if (o >= _ && o <= _ +
|
|
4747
|
+
if (o >= _ && o <= _ + N && f >= P && f <= P + M)
|
|
4736
4748
|
return w;
|
|
4737
4749
|
} else if (w.type === "star" || w.type === "heart") {
|
|
4738
4750
|
const z = Math.sqrt(
|
|
@@ -4751,50 +4763,50 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4751
4763
|
ee
|
|
4752
4764
|
) <= 10)
|
|
4753
4765
|
return w;
|
|
4754
|
-
} else if (w.type === "image" && o >= _ && o <= _ +
|
|
4766
|
+
} else if (w.type === "image" && o >= _ && o <= _ + N && f >= P && f <= P + M)
|
|
4755
4767
|
return w;
|
|
4756
4768
|
}
|
|
4757
4769
|
return null;
|
|
4758
4770
|
},
|
|
4759
4771
|
[E]
|
|
4760
4772
|
), J = se((o) => {
|
|
4761
|
-
let f = 0,
|
|
4773
|
+
let f = 0, m = 0, w = 0, _ = 0;
|
|
4762
4774
|
if (o.type === "rectangle" || o.type === "image" || o.type === "text" || o.type === "triangle" || o.type === "diamond" || o.type === "hexagon" || o.type === "octagon")
|
|
4763
|
-
if (f = o.x ?? 0,
|
|
4775
|
+
if (f = o.x ?? 0, m = o.y ?? 0, o.type === "text") {
|
|
4764
4776
|
const P = o.fontSize || 16;
|
|
4765
4777
|
w = (o.text || "").length * P * 0.6, _ = P;
|
|
4766
4778
|
} else
|
|
4767
4779
|
w = o.width ?? 0, _ = o.height ?? 0;
|
|
4768
4780
|
else if (o.type === "circle") {
|
|
4769
4781
|
const P = o.radius ?? 0;
|
|
4770
|
-
f = (o.centerX ?? 0) - P,
|
|
4782
|
+
f = (o.centerX ?? 0) - P, m = (o.centerY ?? 0) - P, w = P * 2, _ = P * 2;
|
|
4771
4783
|
} else if (o.type === "star" || o.type === "heart") {
|
|
4772
4784
|
const P = o.size ?? 0;
|
|
4773
|
-
f = (o.centerX ?? 0) - P,
|
|
4785
|
+
f = (o.centerX ?? 0) - P, m = (o.centerY ?? 0) - P, w = P * 2, _ = P * 2;
|
|
4774
4786
|
} else if (o.type === "pencil" && o.points && o.points.length > 0) {
|
|
4775
|
-
const P = Math.min(...o.points.map((X) => X.x)),
|
|
4776
|
-
f = P,
|
|
4787
|
+
const P = Math.min(...o.points.map((X) => X.x)), N = Math.max(...o.points.map((X) => X.x)), M = Math.min(...o.points.map((X) => X.y)), D = Math.max(...o.points.map((X) => X.y));
|
|
4788
|
+
f = P, m = M, w = N - P, _ = D - M;
|
|
4777
4789
|
} else if (o.type === "arrow")
|
|
4778
4790
|
return null;
|
|
4779
|
-
return { x: f, y:
|
|
4791
|
+
return { x: f, y: m, w, h: _ };
|
|
4780
4792
|
}, []), Z = se((o) => {
|
|
4781
4793
|
const f = [];
|
|
4782
4794
|
if (o.type === "arrow")
|
|
4783
4795
|
return f.push({ type: "start", x: o.startX ?? 0, y: o.startY ?? 0 }), f.push({ type: "end", x: o.endX ?? 0, y: o.endY ?? 0 }), f;
|
|
4784
|
-
const
|
|
4785
|
-
if (!
|
|
4786
|
-
const { x: w, y: _, w: P, h:
|
|
4787
|
-
return f.push({ type: "nw", x: w, y: _ }), f.push({ type: "ne", x: w + P, y: _ }), f.push({ type: "se", x: w + P, y: _ +
|
|
4788
|
-
}, [J]), K = se((o, f,
|
|
4789
|
-
const _ = Z(
|
|
4790
|
-
for (const
|
|
4791
|
-
if (Math.abs(o -
|
|
4792
|
-
return
|
|
4796
|
+
const m = J(o);
|
|
4797
|
+
if (!m) return [];
|
|
4798
|
+
const { x: w, y: _, w: P, h: N } = m;
|
|
4799
|
+
return f.push({ type: "nw", x: w, y: _ }), f.push({ type: "ne", x: w + P, y: _ }), f.push({ type: "se", x: w + P, y: _ + N }), f.push({ type: "sw", x: w, y: _ + N }), f.push({ type: "n", x: w + P / 2, y: _ }), f.push({ type: "s", x: w + P / 2, y: _ + N }), f.push({ type: "e", x: w + P, y: _ + N / 2 }), f.push({ type: "w", x: w, y: _ + N / 2 }), f;
|
|
4800
|
+
}, [J]), K = se((o, f, m, w) => {
|
|
4801
|
+
const _ = Z(m), P = 10 / w;
|
|
4802
|
+
for (const N of _)
|
|
4803
|
+
if (Math.abs(o - N.x) <= P && Math.abs(f - N.y) <= P)
|
|
4804
|
+
return N.type;
|
|
4793
4805
|
return null;
|
|
4794
4806
|
}, [Z]), q = se((o, f) => {
|
|
4795
4807
|
o.strokeStyle = "#0066cc", o.lineWidth = 1 / C.zoom, o.setLineDash([5 / C.zoom, 5 / C.zoom]);
|
|
4796
|
-
const
|
|
4797
|
-
|
|
4808
|
+
const m = J(f);
|
|
4809
|
+
m ? o.strokeRect(m.x - 4 / C.zoom, m.y - 4 / C.zoom, m.w + 8 / C.zoom, m.h + 8 / C.zoom) : f.type, o.setLineDash([]);
|
|
4798
4810
|
const w = Z(f), _ = 8 / C.zoom;
|
|
4799
4811
|
o.fillStyle = "#ffffff", o.strokeStyle = "#0066cc", o.lineWidth = 1 / C.zoom;
|
|
4800
4812
|
for (const P of w)
|
|
@@ -4803,11 +4815,24 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4803
4815
|
const o = b.current;
|
|
4804
4816
|
if (!o) return;
|
|
4805
4817
|
const f = o.getContext("2d");
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4818
|
+
if (f)
|
|
4819
|
+
try {
|
|
4820
|
+
f.clearRect(0, 0, o.width, o.height), f.save(), f.translate(C.panX, C.panY), f.scale(C.zoom, C.zoom), g.enabled && xt(f, g.size, g.color), E.forEach((m) => {
|
|
4821
|
+
try {
|
|
4822
|
+
Ot(f, m), T.includes(m.id) && q(f, m);
|
|
4823
|
+
} catch (w) {
|
|
4824
|
+
console.error("Error drawing element:", m.id, w);
|
|
4825
|
+
}
|
|
4826
|
+
}), wt && ae && (f.fillStyle = "rgba(0, 102, 204, 0.1)", f.strokeStyle = "#0066cc", f.lineWidth = 1 / C.zoom, f.fillRect(ae.startX, ae.startY, ae.width, ae.height), f.strokeRect(ae.startX, ae.startY, ae.width, ae.height)), f.restore();
|
|
4827
|
+
} catch (m) {
|
|
4828
|
+
console.error("Error redrawing canvas:", m);
|
|
4829
|
+
try {
|
|
4830
|
+
f.restore();
|
|
4831
|
+
} catch {
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4809
4834
|
}, [
|
|
4810
|
-
|
|
4835
|
+
g,
|
|
4811
4836
|
xt,
|
|
4812
4837
|
E,
|
|
4813
4838
|
Ot,
|
|
@@ -4824,13 +4849,13 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4824
4849
|
if (!o) return;
|
|
4825
4850
|
const f = o.parentElement;
|
|
4826
4851
|
if (!f) return;
|
|
4827
|
-
const
|
|
4852
|
+
const m = () => {
|
|
4828
4853
|
const _ = f.getBoundingClientRect();
|
|
4829
4854
|
o.width = _.width, o.height = _.height, le();
|
|
4830
4855
|
};
|
|
4831
|
-
|
|
4856
|
+
m();
|
|
4832
4857
|
const w = new ResizeObserver(() => {
|
|
4833
|
-
|
|
4858
|
+
m();
|
|
4834
4859
|
});
|
|
4835
4860
|
return w.observe(f), () => {
|
|
4836
4861
|
w.disconnect();
|
|
@@ -4838,10 +4863,10 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4838
4863
|
}, [le]), xe(() => {
|
|
4839
4864
|
le();
|
|
4840
4865
|
}, [le]), xe(() => {
|
|
4841
|
-
const o = (
|
|
4842
|
-
|
|
4843
|
-
}, f = (
|
|
4844
|
-
|
|
4866
|
+
const o = (m) => {
|
|
4867
|
+
m.target.tagName === "INPUT" || m.target.tagName === "TEXTAREA" || m.code === "Space" && !m.repeat && (m.preventDefault(), Fe(!0));
|
|
4868
|
+
}, f = (m) => {
|
|
4869
|
+
m.target.tagName === "INPUT" || m.target.tagName === "TEXTAREA" || m.code === "Space" && (m.preventDefault(), Fe(!1), Ae(!1), Be(!1));
|
|
4845
4870
|
};
|
|
4846
4871
|
return window.addEventListener("keydown", o), window.addEventListener("keyup", f), () => {
|
|
4847
4872
|
window.removeEventListener("keydown", o), window.removeEventListener("keyup", f);
|
|
@@ -4862,11 +4887,11 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4862
4887
|
if (le(), f.save(), f.translate(C.panX, C.panY), f.scale(C.zoom, C.zoom), y === "pointer")
|
|
4863
4888
|
zt(f, j, R);
|
|
4864
4889
|
else if (y === "rectangle") {
|
|
4865
|
-
const
|
|
4890
|
+
const m = Math.min(j.x, R.x), w = Math.min(j.y, R.y), _ = Math.abs(R.x - j.x), P = Math.abs(R.y - j.y);
|
|
4866
4891
|
Le(f, {
|
|
4867
4892
|
id: "preview",
|
|
4868
4893
|
type: "rectangle",
|
|
4869
|
-
x:
|
|
4894
|
+
x: m,
|
|
4870
4895
|
y: w,
|
|
4871
4896
|
width: _,
|
|
4872
4897
|
height: P,
|
|
@@ -4874,13 +4899,13 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4874
4899
|
lineWidth: O.rectangle.lineWidth
|
|
4875
4900
|
});
|
|
4876
4901
|
} else if (y === "circle") {
|
|
4877
|
-
const
|
|
4902
|
+
const m = j.x, w = j.y, _ = Math.sqrt(
|
|
4878
4903
|
Math.pow(R.x - j.x, 2) + Math.pow(R.y - j.y, 2)
|
|
4879
4904
|
);
|
|
4880
4905
|
tt(f, {
|
|
4881
4906
|
id: "preview",
|
|
4882
4907
|
type: "circle",
|
|
4883
|
-
centerX:
|
|
4908
|
+
centerX: m,
|
|
4884
4909
|
centerY: w,
|
|
4885
4910
|
radius: _,
|
|
4886
4911
|
strokeColor: O.circle.strokeColor,
|
|
@@ -4896,11 +4921,11 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4896
4921
|
lineWidth: O.pencil.lineWidth
|
|
4897
4922
|
});
|
|
4898
4923
|
else if (y === "triangle") {
|
|
4899
|
-
const
|
|
4924
|
+
const m = Math.min(j.x, R.x), w = Math.min(j.y, R.y), _ = Math.abs(R.x - j.x), P = Math.abs(R.y - j.y);
|
|
4900
4925
|
Et(f, {
|
|
4901
4926
|
id: "preview",
|
|
4902
4927
|
type: "triangle",
|
|
4903
|
-
x:
|
|
4928
|
+
x: m,
|
|
4904
4929
|
y: w,
|
|
4905
4930
|
width: _,
|
|
4906
4931
|
height: P,
|
|
@@ -4908,11 +4933,11 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4908
4933
|
lineWidth: O.triangle.lineWidth
|
|
4909
4934
|
});
|
|
4910
4935
|
} else if (y === "diamond") {
|
|
4911
|
-
const
|
|
4936
|
+
const m = Math.min(j.x, R.x), w = Math.min(j.y, R.y), _ = Math.abs(R.x - j.x), P = Math.abs(R.y - j.y);
|
|
4912
4937
|
ft(f, {
|
|
4913
4938
|
id: "preview",
|
|
4914
4939
|
type: "diamond",
|
|
4915
|
-
x:
|
|
4940
|
+
x: m,
|
|
4916
4941
|
y: w,
|
|
4917
4942
|
width: _,
|
|
4918
4943
|
height: P,
|
|
@@ -4920,37 +4945,37 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4920
4945
|
lineWidth: O.diamond.lineWidth
|
|
4921
4946
|
});
|
|
4922
4947
|
} else if (y === "star") {
|
|
4923
|
-
const
|
|
4948
|
+
const m = j.x, w = j.y, _ = Math.sqrt(
|
|
4924
4949
|
Math.pow(R.x - j.x, 2) + Math.pow(R.y - j.y, 2)
|
|
4925
4950
|
);
|
|
4926
4951
|
St(f, {
|
|
4927
4952
|
id: "preview",
|
|
4928
4953
|
type: "star",
|
|
4929
|
-
centerX:
|
|
4954
|
+
centerX: m,
|
|
4930
4955
|
centerY: w,
|
|
4931
4956
|
size: _,
|
|
4932
4957
|
fillColor: O.star.fillColor,
|
|
4933
4958
|
lineWidth: O.star.lineWidth
|
|
4934
4959
|
});
|
|
4935
4960
|
} else if (y === "heart") {
|
|
4936
|
-
const
|
|
4961
|
+
const m = j.x, w = j.y, _ = Math.sqrt(
|
|
4937
4962
|
Math.pow(R.x - j.x, 2) + Math.pow(R.y - j.y, 2)
|
|
4938
4963
|
);
|
|
4939
4964
|
dt(f, {
|
|
4940
4965
|
id: "preview",
|
|
4941
4966
|
type: "heart",
|
|
4942
|
-
centerX:
|
|
4967
|
+
centerX: m,
|
|
4943
4968
|
centerY: w,
|
|
4944
4969
|
size: _,
|
|
4945
4970
|
fillColor: O.heart.fillColor,
|
|
4946
4971
|
lineWidth: O.heart.lineWidth
|
|
4947
4972
|
});
|
|
4948
4973
|
} else if (y === "hexagon") {
|
|
4949
|
-
const
|
|
4974
|
+
const m = Math.min(j.x, R.x), w = Math.min(j.y, R.y), _ = Math.abs(R.x - j.x), P = Math.abs(R.y - j.y);
|
|
4950
4975
|
ht(f, {
|
|
4951
4976
|
id: "preview",
|
|
4952
4977
|
type: "hexagon",
|
|
4953
|
-
x:
|
|
4978
|
+
x: m,
|
|
4954
4979
|
y: w,
|
|
4955
4980
|
width: _,
|
|
4956
4981
|
height: P,
|
|
@@ -4958,11 +4983,11 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
4958
4983
|
lineWidth: O.hexagon.lineWidth
|
|
4959
4984
|
});
|
|
4960
4985
|
} else if (y === "octagon") {
|
|
4961
|
-
const
|
|
4986
|
+
const m = Math.min(j.x, R.x), w = Math.min(j.y, R.y), _ = Math.abs(R.x - j.x), P = Math.abs(R.y - j.y);
|
|
4962
4987
|
Ct(f, {
|
|
4963
4988
|
id: "preview",
|
|
4964
4989
|
type: "octagon",
|
|
4965
|
-
x:
|
|
4990
|
+
x: m,
|
|
4966
4991
|
y: w,
|
|
4967
4992
|
width: _,
|
|
4968
4993
|
height: P,
|
|
@@ -5005,7 +5030,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5005
5030
|
const he = (o) => {
|
|
5006
5031
|
const f = b.current;
|
|
5007
5032
|
if (!f) return;
|
|
5008
|
-
const
|
|
5033
|
+
const m = f.getBoundingClientRect(), w = o.clientX - m.left, _ = o.clientY - m.top;
|
|
5009
5034
|
if (Ie)
|
|
5010
5035
|
return;
|
|
5011
5036
|
if (ke) {
|
|
@@ -5013,26 +5038,26 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5013
5038
|
return;
|
|
5014
5039
|
}
|
|
5015
5040
|
if (x) return;
|
|
5016
|
-
const { x: P, y:
|
|
5041
|
+
const { x: P, y: N } = ie(w, _);
|
|
5017
5042
|
if (y === "pointer") {
|
|
5018
|
-
const
|
|
5043
|
+
const M = B(P, N);
|
|
5019
5044
|
let D = null;
|
|
5020
5045
|
if (T.length === 1) {
|
|
5021
5046
|
const X = T[0], W = E.find((z) => z.id === X);
|
|
5022
5047
|
if (W) {
|
|
5023
|
-
const z = K(P,
|
|
5048
|
+
const z = K(P, N, W, C.zoom);
|
|
5024
5049
|
z && (D = { element: W, handle: z });
|
|
5025
5050
|
}
|
|
5026
5051
|
}
|
|
5027
5052
|
if (D) {
|
|
5028
|
-
Xt(!0), bt(D.handle), At({ x: P, y:
|
|
5053
|
+
Xt(!0), bt(D.handle), At({ x: P, y: N }), Bt(JSON.parse(JSON.stringify(D.element)));
|
|
5029
5054
|
return;
|
|
5030
5055
|
}
|
|
5031
|
-
if (
|
|
5032
|
-
const X = T.includes(
|
|
5056
|
+
if (M) {
|
|
5057
|
+
const X = T.includes(M.id);
|
|
5033
5058
|
let W = T;
|
|
5034
|
-
if (o.shiftKey ? (X ? W = T.filter((z) => z !==
|
|
5035
|
-
we(!0), F({ x: P, y:
|
|
5059
|
+
if (o.shiftKey ? (X ? W = T.filter((z) => z !== M.id) : W = [...T, M.id], s(Ke(W))) : X || (W = [M.id], s(Ke(W))), W.length > 0) {
|
|
5060
|
+
we(!0), F({ x: P, y: N });
|
|
5036
5061
|
const z = {};
|
|
5037
5062
|
W.forEach((U) => {
|
|
5038
5063
|
const H = E.find((G) => G.id === U);
|
|
@@ -5045,27 +5070,27 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5045
5070
|
Dt({ startX: X, startY: W, width: 0, height: 0 });
|
|
5046
5071
|
}
|
|
5047
5072
|
} else if (y === "text") {
|
|
5048
|
-
const
|
|
5073
|
+
const M = Date.now().toString();
|
|
5049
5074
|
s(
|
|
5050
5075
|
Oe({
|
|
5051
|
-
id:
|
|
5076
|
+
id: M,
|
|
5052
5077
|
type: "text",
|
|
5053
5078
|
x: P,
|
|
5054
|
-
y:
|
|
5079
|
+
y: N,
|
|
5055
5080
|
text: "Text",
|
|
5056
5081
|
fontSize: O.text.fontSize,
|
|
5057
5082
|
fontColor: O.text.fontColor
|
|
5058
5083
|
})
|
|
5059
|
-
), s(Ve("pointer")), s(Ke([
|
|
5084
|
+
), s(Ve("pointer")), s(Ke([M])), be(M), Ce("Text"), et({ x: P, y: N }), je(!0);
|
|
5060
5085
|
} else if (y === "eraser") {
|
|
5061
|
-
const
|
|
5062
|
-
|
|
5086
|
+
const M = B(P, N);
|
|
5087
|
+
M && s(ga(M.id));
|
|
5063
5088
|
} else
|
|
5064
|
-
s(Ke([])), $(!0), F({ x: P, y:
|
|
5089
|
+
s(Ke([])), $(!0), F({ x: P, y: N }), Q({ x: P, y: N }), y === "pencil" && pe([{ x: P, y: N }]);
|
|
5065
5090
|
}, We = (o) => {
|
|
5066
5091
|
const f = b.current;
|
|
5067
5092
|
if (!f) return;
|
|
5068
|
-
const
|
|
5093
|
+
const m = f.getBoundingClientRect(), w = o.clientX - m.left, _ = o.clientY - m.top;
|
|
5069
5094
|
if (Ne) {
|
|
5070
5095
|
s(
|
|
5071
5096
|
ba({
|
|
@@ -5076,31 +5101,31 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5076
5101
|
return;
|
|
5077
5102
|
}
|
|
5078
5103
|
if (Xe) {
|
|
5079
|
-
const
|
|
5104
|
+
const M = Ue.y - _, X = Ue.initialZoom * (1 + M * 5e-3);
|
|
5080
5105
|
s(wa(X));
|
|
5081
5106
|
return;
|
|
5082
5107
|
}
|
|
5083
5108
|
if (x) return;
|
|
5084
|
-
const { x: P, y:
|
|
5109
|
+
const { x: P, y: N } = ie(w, _);
|
|
5085
5110
|
if (wt && ae) {
|
|
5086
|
-
const
|
|
5087
|
-
Dt({ ...ae, width:
|
|
5111
|
+
const M = P - ae.startX, D = N - ae.startY;
|
|
5112
|
+
Dt({ ...ae, width: M, height: D });
|
|
5088
5113
|
return;
|
|
5089
5114
|
}
|
|
5090
5115
|
if (ve && T.length > 0) {
|
|
5091
|
-
const
|
|
5116
|
+
const M = P - j.x, D = N - j.y, X = [];
|
|
5092
5117
|
T.forEach((W) => {
|
|
5093
5118
|
const z = Re[W];
|
|
5094
5119
|
if (!z) return;
|
|
5095
5120
|
let U = {};
|
|
5096
5121
|
if (z.type === "rectangle")
|
|
5097
5122
|
U = {
|
|
5098
|
-
x: (z.x ?? 0) +
|
|
5123
|
+
x: (z.x ?? 0) + M,
|
|
5099
5124
|
y: (z.y ?? 0) + D
|
|
5100
5125
|
};
|
|
5101
5126
|
else if (z.type === "circle")
|
|
5102
5127
|
U = {
|
|
5103
|
-
centerX: (z.centerX ?? 0) +
|
|
5128
|
+
centerX: (z.centerX ?? 0) + M,
|
|
5104
5129
|
centerY: (z.centerY ?? 0) + D
|
|
5105
5130
|
};
|
|
5106
5131
|
else if (z.type === "pencil") {
|
|
@@ -5108,26 +5133,26 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5108
5133
|
if (H.length === 0) return;
|
|
5109
5134
|
U = {
|
|
5110
5135
|
points: H.map((G) => ({
|
|
5111
|
-
x: G.x +
|
|
5136
|
+
x: G.x + M,
|
|
5112
5137
|
y: G.y + D
|
|
5113
5138
|
}))
|
|
5114
5139
|
};
|
|
5115
5140
|
} else z.type === "text" ? U = {
|
|
5116
|
-
x: (z.x ?? 0) +
|
|
5141
|
+
x: (z.x ?? 0) + M,
|
|
5117
5142
|
y: (z.y ?? 0) + D
|
|
5118
5143
|
} : z.type === "triangle" || z.type === "diamond" || z.type === "hexagon" || z.type === "octagon" ? U = {
|
|
5119
|
-
x: (z.x ?? 0) +
|
|
5144
|
+
x: (z.x ?? 0) + M,
|
|
5120
5145
|
y: (z.y ?? 0) + D
|
|
5121
5146
|
} : z.type === "star" || z.type === "heart" ? U = {
|
|
5122
|
-
centerX: (z.centerX ?? 0) +
|
|
5147
|
+
centerX: (z.centerX ?? 0) + M,
|
|
5123
5148
|
centerY: (z.centerY ?? 0) + D
|
|
5124
5149
|
} : z.type === "arrow" ? U = {
|
|
5125
|
-
startX: (z.startX ?? 0) +
|
|
5150
|
+
startX: (z.startX ?? 0) + M,
|
|
5126
5151
|
startY: (z.startY ?? 0) + D,
|
|
5127
|
-
endX: (z.endX ?? 0) +
|
|
5152
|
+
endX: (z.endX ?? 0) + M,
|
|
5128
5153
|
endY: (z.endY ?? 0) + D
|
|
5129
5154
|
} : z.type === "image" && (U = {
|
|
5130
|
-
x: (z.x ?? 0) +
|
|
5155
|
+
x: (z.x ?? 0) + M,
|
|
5131
5156
|
y: (z.y ?? 0) + D
|
|
5132
5157
|
});
|
|
5133
5158
|
X.push({ id: W, updates: U });
|
|
@@ -5135,16 +5160,16 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5135
5160
|
return;
|
|
5136
5161
|
}
|
|
5137
5162
|
if (gt && It && Nt && me) {
|
|
5138
|
-
let
|
|
5139
|
-
const D = P - Nt.x, X =
|
|
5163
|
+
let M = {};
|
|
5164
|
+
const D = P - Nt.x, X = N - Nt.y, W = It;
|
|
5140
5165
|
if (W.type === "arrow")
|
|
5141
|
-
me === "start" ?
|
|
5166
|
+
me === "start" ? M = { startX: (W.startX ?? 0) + D, startY: (W.startY ?? 0) + X } : me === "end" && (M = { endX: (W.endX ?? 0) + D, endY: (W.endY ?? 0) + X });
|
|
5142
5167
|
else if (W.type === "circle" || W.type === "star" || W.type === "heart") {
|
|
5143
5168
|
const z = W.radius || W.size || 0, U = me.includes("e"), H = me.includes("s"), G = me.includes("w"), ee = me.includes("n");
|
|
5144
5169
|
let ye = 0;
|
|
5145
5170
|
U && (ye += D), G && (ye -= D), H && (ye += X), ee && (ye -= X);
|
|
5146
5171
|
const Yt = Math.max(5, z + ye);
|
|
5147
|
-
W.type === "circle" ?
|
|
5172
|
+
W.type === "circle" ? M = { radius: Yt } : M = { size: Yt };
|
|
5148
5173
|
} else if (W.type === "pencil" && W.points) {
|
|
5149
5174
|
const z = J(W);
|
|
5150
5175
|
if (z) {
|
|
@@ -5152,7 +5177,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5152
5177
|
let ye = U, Yt = H, fr = G, dr = ee;
|
|
5153
5178
|
me.includes("e") && (fr = Math.max(5, G + D)), me.includes("w") && (fr = Math.max(5, G - D), ye = U + D), me.includes("s") && (dr = Math.max(5, ee + X)), me.includes("n") && (dr = Math.max(5, ee - X), Yt = H + X);
|
|
5154
5179
|
const Co = fr / G, _o = dr / ee;
|
|
5155
|
-
|
|
5180
|
+
M = { points: W.points.map((Zr) => ({
|
|
5156
5181
|
x: ye + (Zr.x - U) * Co,
|
|
5157
5182
|
y: Yt + (Zr.y - H) * _o
|
|
5158
5183
|
})) };
|
|
@@ -5167,12 +5192,12 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5167
5192
|
const ee = (W.height ?? 0) - X;
|
|
5168
5193
|
ee > 5 && (G = ee, U = (W.y ?? 0) + X);
|
|
5169
5194
|
}
|
|
5170
|
-
|
|
5195
|
+
M = { x: z, y: U, width: H, height: G };
|
|
5171
5196
|
}
|
|
5172
|
-
Object.keys(
|
|
5197
|
+
Object.keys(M).length > 0 && s(tr({ id: W.id, updates: M }));
|
|
5173
5198
|
return;
|
|
5174
5199
|
}
|
|
5175
|
-
I && (Q({ x: P, y:
|
|
5200
|
+
I && (Q({ x: P, y: N }), y === "pencil" && pe((M) => [...M, { x: P, y: N }]));
|
|
5176
5201
|
}, Ge = () => {
|
|
5177
5202
|
if (Ne || Xe) {
|
|
5178
5203
|
Ae(!1), Be(!1);
|
|
@@ -5183,24 +5208,24 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5183
5208
|
return;
|
|
5184
5209
|
}
|
|
5185
5210
|
if (ve && we(!1), wt && ae) {
|
|
5186
|
-
const o = ae.width > 0 ? ae.startX : ae.startX + ae.width, f = ae.height > 0 ? ae.startY : ae.startY + ae.height,
|
|
5211
|
+
const o = ae.width > 0 ? ae.startX : ae.startX + ae.width, f = ae.height > 0 ? ae.startY : ae.startY + ae.height, m = Math.abs(ae.width), w = Math.abs(ae.height), _ = [];
|
|
5187
5212
|
E.forEach((P) => {
|
|
5188
|
-
const
|
|
5189
|
-
|
|
5213
|
+
const N = J(P);
|
|
5214
|
+
N && N.x < o + m && N.x + N.w > o && N.y < f + w && N.y + N.h > f && _.push(P.id);
|
|
5190
5215
|
}), _.length > 0 && s(Ke(_));
|
|
5191
5216
|
}
|
|
5192
5217
|
if ($(!1), we(!1), Xt(!1), Ut(!1), Dt(null), bt(null), Bt(null), pe([]), F({ x: 0, y: 0 }), Me({}), At(null), Ae(!1), !!I) {
|
|
5193
5218
|
if (y === "pointer")
|
|
5194
5219
|
le();
|
|
5195
5220
|
else if (y === "rectangle") {
|
|
5196
|
-
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y),
|
|
5197
|
-
|
|
5221
|
+
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y), m = Math.abs(R.x - j.x), w = Math.abs(R.y - j.y);
|
|
5222
|
+
m > 0 && w > 0 && s(
|
|
5198
5223
|
Oe({
|
|
5199
5224
|
id: Date.now().toString(),
|
|
5200
5225
|
type: "rectangle",
|
|
5201
5226
|
x: o,
|
|
5202
5227
|
y: f,
|
|
5203
|
-
width:
|
|
5228
|
+
width: m,
|
|
5204
5229
|
height: w,
|
|
5205
5230
|
strokeColor: O.rectangle.strokeColor,
|
|
5206
5231
|
fillColor: O.rectangle.fillColor,
|
|
@@ -5208,16 +5233,16 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5208
5233
|
})
|
|
5209
5234
|
);
|
|
5210
5235
|
} else if (y === "circle") {
|
|
5211
|
-
const o = j.x, f = j.y,
|
|
5236
|
+
const o = j.x, f = j.y, m = Math.sqrt(
|
|
5212
5237
|
Math.pow(R.x - j.x, 2) + Math.pow(R.y - j.y, 2)
|
|
5213
5238
|
);
|
|
5214
|
-
|
|
5239
|
+
m > 0 && s(
|
|
5215
5240
|
Oe({
|
|
5216
5241
|
id: Date.now().toString(),
|
|
5217
5242
|
type: "circle",
|
|
5218
5243
|
centerX: o,
|
|
5219
5244
|
centerY: f,
|
|
5220
|
-
radius:
|
|
5245
|
+
radius: m,
|
|
5221
5246
|
strokeColor: O.circle.strokeColor,
|
|
5222
5247
|
fillColor: O.circle.fillColor,
|
|
5223
5248
|
lineWidth: O.circle.lineWidth
|
|
@@ -5234,14 +5259,14 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5234
5259
|
})
|
|
5235
5260
|
), pe([]);
|
|
5236
5261
|
else if (y === "triangle") {
|
|
5237
|
-
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y),
|
|
5238
|
-
|
|
5262
|
+
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y), m = Math.abs(R.x - j.x), w = Math.abs(R.y - j.y);
|
|
5263
|
+
m > 0 && w > 0 && s(
|
|
5239
5264
|
Oe({
|
|
5240
5265
|
id: Date.now().toString(),
|
|
5241
5266
|
type: "triangle",
|
|
5242
5267
|
x: o,
|
|
5243
5268
|
y: f,
|
|
5244
|
-
width:
|
|
5269
|
+
width: m,
|
|
5245
5270
|
height: w,
|
|
5246
5271
|
strokeColor: O.triangle.strokeColor,
|
|
5247
5272
|
fillColor: O.triangle.fillColor,
|
|
@@ -5249,14 +5274,14 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5249
5274
|
})
|
|
5250
5275
|
);
|
|
5251
5276
|
} else if (y === "diamond") {
|
|
5252
|
-
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y),
|
|
5253
|
-
|
|
5277
|
+
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y), m = Math.abs(R.x - j.x), w = Math.abs(R.y - j.y);
|
|
5278
|
+
m > 0 && w > 0 && s(
|
|
5254
5279
|
Oe({
|
|
5255
5280
|
id: Date.now().toString(),
|
|
5256
5281
|
type: "diamond",
|
|
5257
5282
|
x: o,
|
|
5258
5283
|
y: f,
|
|
5259
|
-
width:
|
|
5284
|
+
width: m,
|
|
5260
5285
|
height: w,
|
|
5261
5286
|
strokeColor: O.diamond.strokeColor,
|
|
5262
5287
|
fillColor: O.diamond.fillColor,
|
|
@@ -5264,46 +5289,46 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5264
5289
|
})
|
|
5265
5290
|
);
|
|
5266
5291
|
} else if (y === "star") {
|
|
5267
|
-
const o = j.x, f = j.y,
|
|
5292
|
+
const o = j.x, f = j.y, m = Math.sqrt(
|
|
5268
5293
|
Math.pow(R.x - j.x, 2) + Math.pow(R.y - j.y, 2)
|
|
5269
5294
|
);
|
|
5270
|
-
|
|
5295
|
+
m > 0 && s(
|
|
5271
5296
|
Oe({
|
|
5272
5297
|
id: Date.now().toString(),
|
|
5273
5298
|
type: "star",
|
|
5274
5299
|
centerX: o,
|
|
5275
5300
|
centerY: f,
|
|
5276
|
-
size:
|
|
5301
|
+
size: m,
|
|
5277
5302
|
strokeColor: O.star.strokeColor,
|
|
5278
5303
|
fillColor: O.star.fillColor,
|
|
5279
5304
|
lineWidth: O.star.lineWidth
|
|
5280
5305
|
})
|
|
5281
5306
|
);
|
|
5282
5307
|
} else if (y === "heart") {
|
|
5283
|
-
const o = j.x, f = j.y,
|
|
5308
|
+
const o = j.x, f = j.y, m = Math.sqrt(
|
|
5284
5309
|
Math.pow(R.x - j.x, 2) + Math.pow(R.y - j.y, 2)
|
|
5285
5310
|
);
|
|
5286
|
-
|
|
5311
|
+
m > 0 && s(
|
|
5287
5312
|
Oe({
|
|
5288
5313
|
id: Date.now().toString(),
|
|
5289
5314
|
type: "heart",
|
|
5290
5315
|
centerX: o,
|
|
5291
5316
|
centerY: f,
|
|
5292
|
-
size:
|
|
5317
|
+
size: m,
|
|
5293
5318
|
strokeColor: O.heart.strokeColor,
|
|
5294
5319
|
fillColor: O.heart.fillColor,
|
|
5295
5320
|
lineWidth: O.heart.lineWidth
|
|
5296
5321
|
})
|
|
5297
5322
|
);
|
|
5298
5323
|
} else if (y === "hexagon") {
|
|
5299
|
-
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y),
|
|
5300
|
-
|
|
5324
|
+
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y), m = Math.abs(R.x - j.x), w = Math.abs(R.y - j.y);
|
|
5325
|
+
m > 0 && w > 0 && s(
|
|
5301
5326
|
Oe({
|
|
5302
5327
|
id: Date.now().toString(),
|
|
5303
5328
|
type: "hexagon",
|
|
5304
5329
|
x: o,
|
|
5305
5330
|
y: f,
|
|
5306
|
-
width:
|
|
5331
|
+
width: m,
|
|
5307
5332
|
height: w,
|
|
5308
5333
|
strokeColor: O.hexagon.strokeColor,
|
|
5309
5334
|
fillColor: O.hexagon.fillColor,
|
|
@@ -5311,14 +5336,14 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5311
5336
|
})
|
|
5312
5337
|
);
|
|
5313
5338
|
} else if (y === "octagon") {
|
|
5314
|
-
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y),
|
|
5315
|
-
|
|
5339
|
+
const o = Math.min(j.x, R.x), f = Math.min(j.y, R.y), m = Math.abs(R.x - j.x), w = Math.abs(R.y - j.y);
|
|
5340
|
+
m > 0 && w > 0 && s(
|
|
5316
5341
|
Oe({
|
|
5317
5342
|
id: Date.now().toString(),
|
|
5318
5343
|
type: "octagon",
|
|
5319
5344
|
x: o,
|
|
5320
5345
|
y: f,
|
|
5321
|
-
width:
|
|
5346
|
+
width: m,
|
|
5322
5347
|
height: w,
|
|
5323
5348
|
strokeColor: O.octagon.strokeColor,
|
|
5324
5349
|
fillColor: O.octagon.fillColor,
|
|
@@ -5345,8 +5370,8 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5345
5370
|
}
|
|
5346
5371
|
}, qt = (o) => {
|
|
5347
5372
|
ke && o.preventDefault();
|
|
5348
|
-
}, Ye = (o, f,
|
|
5349
|
-
be(o.id), Ce(o.text || ""), et({ x: o.x || f, y: o.y ||
|
|
5373
|
+
}, Ye = (o, f, m) => {
|
|
5374
|
+
be(o.id), Ce(o.text || ""), et({ x: o.x || f, y: o.y || m }), ze.current = o.text || "", je(!0);
|
|
5350
5375
|
}, xo = () => {
|
|
5351
5376
|
if (ke)
|
|
5352
5377
|
return Ne ? "grabbing" : Xe ? "ns-resize" : "grab";
|
|
@@ -5369,41 +5394,41 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5369
5394
|
}
|
|
5370
5395
|
const f = document.getElementById("wb-canvas-container");
|
|
5371
5396
|
if (!f) return;
|
|
5372
|
-
const
|
|
5373
|
-
let P = !1,
|
|
5374
|
-
if (
|
|
5375
|
-
const
|
|
5397
|
+
const m = f.querySelector(".wb-toolbar"), w = f.querySelector(".wb-prop-tools"), _ = f.querySelector(".wb-lock-indicator");
|
|
5398
|
+
let P = !1, N = !1;
|
|
5399
|
+
if (m) {
|
|
5400
|
+
const M = m.getBoundingClientRect();
|
|
5376
5401
|
if (w) {
|
|
5377
5402
|
const D = w.getBoundingClientRect();
|
|
5378
|
-
|
|
5403
|
+
M.bottom > D.top - 10 && (P = !0);
|
|
5379
5404
|
}
|
|
5380
5405
|
if (_) {
|
|
5381
5406
|
const D = _.getBoundingClientRect();
|
|
5382
|
-
|
|
5407
|
+
M.top < D.bottom + 10 && (N = !0);
|
|
5383
5408
|
}
|
|
5384
5409
|
}
|
|
5385
|
-
Gr({ propTools: P, lockIndicator:
|
|
5410
|
+
Gr({ propTools: P, lockIndicator: N });
|
|
5386
5411
|
};
|
|
5387
5412
|
return o(), window.addEventListener("resize", o), () => {
|
|
5388
5413
|
window.removeEventListener("resize", o);
|
|
5389
5414
|
};
|
|
5390
5415
|
}, [y, x, T]);
|
|
5391
|
-
const Kr = async (o, f,
|
|
5416
|
+
const Kr = async (o, f, m) => {
|
|
5392
5417
|
try {
|
|
5393
5418
|
let w = "";
|
|
5394
5419
|
c ? w = await c(o) : w = URL.createObjectURL(o);
|
|
5395
5420
|
const _ = new Image();
|
|
5396
5421
|
_.onload = () => {
|
|
5397
|
-
const P = _.width / _.height,
|
|
5422
|
+
const P = _.width / _.height, N = 200, M = N / P;
|
|
5398
5423
|
s(
|
|
5399
5424
|
Oe({
|
|
5400
5425
|
id: Date.now().toString(),
|
|
5401
5426
|
type: "image",
|
|
5402
|
-
x: f -
|
|
5427
|
+
x: f - N / 2,
|
|
5403
5428
|
// Center at coordinates
|
|
5404
|
-
y:
|
|
5405
|
-
width:
|
|
5406
|
-
height:
|
|
5429
|
+
y: m - M / 2,
|
|
5430
|
+
width: N,
|
|
5431
|
+
height: M,
|
|
5407
5432
|
src: w
|
|
5408
5433
|
})
|
|
5409
5434
|
);
|
|
@@ -5415,13 +5440,13 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5415
5440
|
xe(() => {
|
|
5416
5441
|
const o = (f) => {
|
|
5417
5442
|
if (!(f.target.tagName === "INPUT" || f.target.tagName === "TEXTAREA") && !x && f.clipboardData && f.clipboardData.files.length > 0) {
|
|
5418
|
-
const
|
|
5419
|
-
if (
|
|
5443
|
+
const m = f.clipboardData.files[0];
|
|
5444
|
+
if (m.type.startsWith("image/")) {
|
|
5420
5445
|
f.preventDefault();
|
|
5421
5446
|
const w = b.current;
|
|
5422
5447
|
if (w) {
|
|
5423
|
-
const _ = w.getBoundingClientRect(), P = _.width / 2,
|
|
5424
|
-
Kr(
|
|
5448
|
+
const _ = w.getBoundingClientRect(), P = _.width / 2, N = _.height / 2, { x: M, y: D } = ie(P, N);
|
|
5449
|
+
Kr(m, M, D);
|
|
5425
5450
|
}
|
|
5426
5451
|
}
|
|
5427
5452
|
}
|
|
@@ -5434,10 +5459,10 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5434
5459
|
if (o.preventDefault(), !x && o.dataTransfer.files && o.dataTransfer.files.length > 0) {
|
|
5435
5460
|
const f = o.dataTransfer.files[0];
|
|
5436
5461
|
if (f.type.startsWith("image/")) {
|
|
5437
|
-
const
|
|
5438
|
-
if (
|
|
5439
|
-
const w =
|
|
5440
|
-
Kr(f,
|
|
5462
|
+
const m = b.current;
|
|
5463
|
+
if (m) {
|
|
5464
|
+
const w = m.getBoundingClientRect(), _ = o.clientX - w.left, P = o.clientY - w.top, { x: N, y: M } = ie(_, P);
|
|
5465
|
+
Kr(f, N, M);
|
|
5441
5466
|
}
|
|
5442
5467
|
}
|
|
5443
5468
|
}
|
|
@@ -5462,8 +5487,8 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5462
5487
|
if (x) return;
|
|
5463
5488
|
const f = b.current;
|
|
5464
5489
|
if (!f) return;
|
|
5465
|
-
const
|
|
5466
|
-
|
|
5490
|
+
const m = f.getBoundingClientRect(), w = o.clientX - m.left, _ = o.clientY - m.top, { x: P, y: N } = ie(w, _), M = B(P, N);
|
|
5491
|
+
M && M.type === "text" && Ye(M, P, N);
|
|
5467
5492
|
},
|
|
5468
5493
|
onContextMenu: qt,
|
|
5469
5494
|
style: { cursor: xo() }
|
|
@@ -5519,7 +5544,7 @@ const ls = ({ onClose: e, onConfirm: t }) => {
|
|
|
5519
5544
|
{
|
|
5520
5545
|
onFitToView: d,
|
|
5521
5546
|
onExport: ur,
|
|
5522
|
-
onToggleGrid:
|
|
5547
|
+
onToggleGrid: k
|
|
5523
5548
|
}
|
|
5524
5549
|
),
|
|
5525
5550
|
/* @__PURE__ */ h.jsx(us, { mode: l, onImageUpload: c }),
|