react-sync-board 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-sync-board.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import g, { useContext as _e, useDebugValue as
|
|
5
|
-
function
|
|
1
|
+
var zr = Object.defineProperty;
|
|
2
|
+
var Yr = (e, t, r) => t in e ? zr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var Pt = (e, t, r) => (Yr(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import g, { useContext as _e, useDebugValue as Br, useRef as Re, useMemo as ft, useEffect as Pe, useCallback as rr, memo as nr } from "react";
|
|
5
|
+
function Nr(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
8
|
var Ie = {}, Xr = {
|
|
@@ -22,11 +22,11 @@ var Ie = {}, Xr = {
|
|
|
22
22
|
* This source code is licensed under the MIT license found in the
|
|
23
23
|
* LICENSE file in the root directory of this source tree.
|
|
24
24
|
*/
|
|
25
|
-
var
|
|
26
|
-
function
|
|
27
|
-
if (
|
|
25
|
+
var Mt;
|
|
26
|
+
function Ur() {
|
|
27
|
+
if (Mt)
|
|
28
28
|
return Ee;
|
|
29
|
-
|
|
29
|
+
Mt = 1;
|
|
30
30
|
var e = g, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
31
31
|
function a(u, l, d) {
|
|
32
32
|
var f, c = {}, h = null, S = null;
|
|
@@ -50,9 +50,9 @@ var we = {};
|
|
|
50
50
|
* This source code is licensed under the MIT license found in the
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
var
|
|
54
|
-
function
|
|
55
|
-
return
|
|
53
|
+
var Dt;
|
|
54
|
+
function Wr() {
|
|
55
|
+
return Dt || (Dt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
56
|
var e = g, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), u = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), v = Symbol.iterator, E = "@@iterator";
|
|
57
57
|
function O(i) {
|
|
58
58
|
if (i === null || typeof i != "object")
|
|
@@ -61,26 +61,26 @@ function Ur() {
|
|
|
61
61
|
return typeof b == "function" ? b : null;
|
|
62
62
|
}
|
|
63
63
|
var y = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
64
|
-
function
|
|
64
|
+
function x(i) {
|
|
65
65
|
{
|
|
66
|
-
for (var b = arguments.length, I = new Array(b > 1 ? b - 1 : 0),
|
|
67
|
-
I[
|
|
68
|
-
|
|
66
|
+
for (var b = arguments.length, I = new Array(b > 1 ? b - 1 : 0), j = 1; j < b; j++)
|
|
67
|
+
I[j - 1] = arguments[j];
|
|
68
|
+
C("error", i, I);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function C(i, b, I) {
|
|
72
72
|
{
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
var W = I.map(function(
|
|
76
|
-
return String(
|
|
73
|
+
var j = y.ReactDebugCurrentFrame, X = j.getStackAddendum();
|
|
74
|
+
X !== "" && (b += "%s", I = I.concat([X]));
|
|
75
|
+
var W = I.map(function(N) {
|
|
76
|
+
return String(N);
|
|
77
77
|
});
|
|
78
78
|
W.unshift("Warning: " + b), Function.prototype.apply.call(console[i], console, W);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
var p = !1, _ = !1, m = !1, w = !1, R = !1, T;
|
|
82
82
|
T = Symbol.for("react.module.reference");
|
|
83
|
-
function
|
|
83
|
+
function D(i) {
|
|
84
84
|
return !!(typeof i == "string" || typeof i == "function" || i === n || i === s || R || i === o || i === d || i === f || w || i === S || p || _ || m || typeof i == "object" && i !== null && (i.$$typeof === h || i.$$typeof === c || i.$$typeof === a || i.$$typeof === u || i.$$typeof === l || // This needs to include all possible module reference object
|
|
85
85
|
// types supported by any Flight configuration anywhere since
|
|
86
86
|
// we don't know which Flight build this will end up being used
|
|
@@ -88,19 +88,19 @@ function Ur() {
|
|
|
88
88
|
i.$$typeof === T || i.getModuleId !== void 0));
|
|
89
89
|
}
|
|
90
90
|
function M(i, b, I) {
|
|
91
|
-
var
|
|
92
|
-
if (
|
|
93
|
-
return
|
|
94
|
-
var
|
|
95
|
-
return
|
|
91
|
+
var j = i.displayName;
|
|
92
|
+
if (j)
|
|
93
|
+
return j;
|
|
94
|
+
var X = b.displayName || b.name || "";
|
|
95
|
+
return X !== "" ? I + "(" + X + ")" : I;
|
|
96
96
|
}
|
|
97
97
|
function A(i) {
|
|
98
98
|
return i.displayName || "Context";
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Y(i) {
|
|
101
101
|
if (i == null)
|
|
102
102
|
return null;
|
|
103
|
-
if (typeof i.tag == "number" &&
|
|
103
|
+
if (typeof i.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
|
|
104
104
|
return i.displayName || i.name || null;
|
|
105
105
|
if (typeof i == "string")
|
|
106
106
|
return i;
|
|
@@ -129,12 +129,12 @@ function Ur() {
|
|
|
129
129
|
case l:
|
|
130
130
|
return M(i, i.render, "ForwardRef");
|
|
131
131
|
case c:
|
|
132
|
-
var
|
|
133
|
-
return
|
|
132
|
+
var j = i.displayName || null;
|
|
133
|
+
return j !== null ? j : Y(i.type) || "Memo";
|
|
134
134
|
case h: {
|
|
135
|
-
var
|
|
135
|
+
var X = i, W = X._payload, N = X._init;
|
|
136
136
|
try {
|
|
137
|
-
return
|
|
137
|
+
return Y(N(W));
|
|
138
138
|
} catch {
|
|
139
139
|
return null;
|
|
140
140
|
}
|
|
@@ -142,14 +142,14 @@ function Ur() {
|
|
|
142
142
|
}
|
|
143
143
|
return null;
|
|
144
144
|
}
|
|
145
|
-
var U = Object.assign,
|
|
145
|
+
var U = Object.assign, G = 0, P, $, B, V, L, F, H;
|
|
146
146
|
function te() {
|
|
147
147
|
}
|
|
148
148
|
te.__reactDisabledLog = !0;
|
|
149
149
|
function Q() {
|
|
150
150
|
{
|
|
151
|
-
if (
|
|
152
|
-
P = console.log, $ = console.info,
|
|
151
|
+
if (G === 0) {
|
|
152
|
+
P = console.log, $ = console.info, B = console.warn, V = console.error, L = console.group, F = console.groupCollapsed, H = console.groupEnd;
|
|
153
153
|
var i = {
|
|
154
154
|
configurable: !0,
|
|
155
155
|
enumerable: !0,
|
|
@@ -166,12 +166,12 @@ function Ur() {
|
|
|
166
166
|
groupEnd: i
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
G++;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
function ne() {
|
|
173
173
|
{
|
|
174
|
-
if (
|
|
174
|
+
if (G--, G === 0) {
|
|
175
175
|
var i = {
|
|
176
176
|
configurable: !0,
|
|
177
177
|
enumerable: !0,
|
|
@@ -185,7 +185,7 @@ function Ur() {
|
|
|
185
185
|
value: $
|
|
186
186
|
}),
|
|
187
187
|
warn: U({}, i, {
|
|
188
|
-
value:
|
|
188
|
+
value: B
|
|
189
189
|
}),
|
|
190
190
|
error: U({}, i, {
|
|
191
191
|
value: V
|
|
@@ -201,7 +201,7 @@ function Ur() {
|
|
|
201
201
|
})
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
|
|
204
|
+
G < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
var ie = y.ReactCurrentDispatcher, me;
|
|
@@ -210,102 +210,102 @@ function Ur() {
|
|
|
210
210
|
if (me === void 0)
|
|
211
211
|
try {
|
|
212
212
|
throw Error();
|
|
213
|
-
} catch (
|
|
214
|
-
var
|
|
215
|
-
me =
|
|
213
|
+
} catch (X) {
|
|
214
|
+
var j = X.stack.trim().match(/\n( *(at )?)/);
|
|
215
|
+
me = j && j[1] || "";
|
|
216
216
|
}
|
|
217
217
|
return `
|
|
218
218
|
` + me + i;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
var Ke = !1,
|
|
221
|
+
var Ke = !1, De;
|
|
222
222
|
{
|
|
223
|
-
var
|
|
224
|
-
|
|
223
|
+
var gr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
224
|
+
De = new gr();
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function vt(i, b) {
|
|
227
227
|
if (!i || Ke)
|
|
228
228
|
return "";
|
|
229
229
|
{
|
|
230
|
-
var I =
|
|
230
|
+
var I = De.get(i);
|
|
231
231
|
if (I !== void 0)
|
|
232
232
|
return I;
|
|
233
233
|
}
|
|
234
|
-
var
|
|
234
|
+
var j;
|
|
235
235
|
Ke = !0;
|
|
236
|
-
var
|
|
236
|
+
var X = Error.prepareStackTrace;
|
|
237
237
|
Error.prepareStackTrace = void 0;
|
|
238
238
|
var W;
|
|
239
239
|
W = ie.current, ie.current = null, Q();
|
|
240
240
|
try {
|
|
241
241
|
if (b) {
|
|
242
|
-
var
|
|
242
|
+
var N = function() {
|
|
243
243
|
throw Error();
|
|
244
244
|
};
|
|
245
|
-
if (Object.defineProperty(
|
|
245
|
+
if (Object.defineProperty(N.prototype, "props", {
|
|
246
246
|
set: function() {
|
|
247
247
|
throw Error();
|
|
248
248
|
}
|
|
249
249
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
250
250
|
try {
|
|
251
|
-
Reflect.construct(
|
|
251
|
+
Reflect.construct(N, []);
|
|
252
252
|
} catch (ae) {
|
|
253
|
-
|
|
253
|
+
j = ae;
|
|
254
254
|
}
|
|
255
|
-
Reflect.construct(i, [],
|
|
255
|
+
Reflect.construct(i, [], N);
|
|
256
256
|
} else {
|
|
257
257
|
try {
|
|
258
|
-
|
|
258
|
+
N.call();
|
|
259
259
|
} catch (ae) {
|
|
260
|
-
|
|
260
|
+
j = ae;
|
|
261
261
|
}
|
|
262
|
-
i.call(
|
|
262
|
+
i.call(N.prototype);
|
|
263
263
|
}
|
|
264
264
|
} else {
|
|
265
265
|
try {
|
|
266
266
|
throw Error();
|
|
267
267
|
} catch (ae) {
|
|
268
|
-
|
|
268
|
+
j = ae;
|
|
269
269
|
}
|
|
270
270
|
i();
|
|
271
271
|
}
|
|
272
272
|
} catch (ae) {
|
|
273
|
-
if (ae &&
|
|
273
|
+
if (ae && j && typeof ae.stack == "string") {
|
|
274
274
|
for (var z = ae.stack.split(`
|
|
275
|
-
`), ee =
|
|
276
|
-
`), q = z.length - 1,
|
|
277
|
-
|
|
278
|
-
for (; q >= 1 &&
|
|
279
|
-
if (z[q] !== ee[
|
|
280
|
-
if (q !== 1 ||
|
|
275
|
+
`), ee = j.stack.split(`
|
|
276
|
+
`), q = z.length - 1, J = ee.length - 1; q >= 1 && J >= 0 && z[q] !== ee[J]; )
|
|
277
|
+
J--;
|
|
278
|
+
for (; q >= 1 && J >= 0; q--, J--)
|
|
279
|
+
if (z[q] !== ee[J]) {
|
|
280
|
+
if (q !== 1 || J !== 1)
|
|
281
281
|
do
|
|
282
|
-
if (q--,
|
|
282
|
+
if (q--, J--, J < 0 || z[q] !== ee[J]) {
|
|
283
283
|
var re = `
|
|
284
284
|
` + z[q].replace(" at new ", " at ");
|
|
285
|
-
return i.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", i.displayName)), typeof i == "function" &&
|
|
285
|
+
return i.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", i.displayName)), typeof i == "function" && De.set(i, re), re;
|
|
286
286
|
}
|
|
287
|
-
while (q >= 1 &&
|
|
287
|
+
while (q >= 1 && J >= 0);
|
|
288
288
|
break;
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
} finally {
|
|
292
|
-
Ke = !1, ie.current = W, ne(), Error.prepareStackTrace =
|
|
292
|
+
Ke = !1, ie.current = W, ne(), Error.prepareStackTrace = X;
|
|
293
293
|
}
|
|
294
|
-
var ve = i ? i.displayName || i.name : "",
|
|
295
|
-
return typeof i == "function" &&
|
|
294
|
+
var ve = i ? i.displayName || i.name : "", kt = ve ? ge(ve) : "";
|
|
295
|
+
return typeof i == "function" && De.set(i, kt), kt;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
return
|
|
297
|
+
function hr(i, b, I) {
|
|
298
|
+
return vt(i, !1);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function vr(i) {
|
|
301
301
|
var b = i.prototype;
|
|
302
302
|
return !!(b && b.isReactComponent);
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function je(i, b, I) {
|
|
305
305
|
if (i == null)
|
|
306
306
|
return "";
|
|
307
307
|
if (typeof i == "function")
|
|
308
|
-
return
|
|
308
|
+
return vt(i, vr(i));
|
|
309
309
|
if (typeof i == "string")
|
|
310
310
|
return ge(i);
|
|
311
311
|
switch (i) {
|
|
@@ -317,78 +317,78 @@ function Ur() {
|
|
|
317
317
|
if (typeof i == "object")
|
|
318
318
|
switch (i.$$typeof) {
|
|
319
319
|
case l:
|
|
320
|
-
return
|
|
320
|
+
return hr(i.render);
|
|
321
321
|
case c:
|
|
322
|
-
return
|
|
322
|
+
return je(i.type, b, I);
|
|
323
323
|
case h: {
|
|
324
|
-
var
|
|
324
|
+
var j = i, X = j._payload, W = j._init;
|
|
325
325
|
try {
|
|
326
|
-
return
|
|
326
|
+
return je(W(X), b, I);
|
|
327
327
|
} catch {
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
return "";
|
|
332
332
|
}
|
|
333
|
-
var $e = Object.prototype.hasOwnProperty,
|
|
333
|
+
var $e = Object.prototype.hasOwnProperty, yt = {}, St = y.ReactDebugCurrentFrame;
|
|
334
334
|
function Ae(i) {
|
|
335
335
|
if (i) {
|
|
336
|
-
var b = i._owner, I =
|
|
337
|
-
|
|
336
|
+
var b = i._owner, I = je(i.type, i._source, b ? b.type : null);
|
|
337
|
+
St.setExtraStackFrame(I);
|
|
338
338
|
} else
|
|
339
|
-
|
|
339
|
+
St.setExtraStackFrame(null);
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function yr(i, b, I, j, X) {
|
|
342
342
|
{
|
|
343
343
|
var W = Function.call.bind($e);
|
|
344
|
-
for (var
|
|
345
|
-
if (W(i,
|
|
344
|
+
for (var N in i)
|
|
345
|
+
if (W(i, N)) {
|
|
346
346
|
var z = void 0;
|
|
347
347
|
try {
|
|
348
|
-
if (typeof i[
|
|
349
|
-
var ee = Error((
|
|
348
|
+
if (typeof i[N] != "function") {
|
|
349
|
+
var ee = Error((j || "React class") + ": " + I + " type `" + N + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[N] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
350
350
|
throw ee.name = "Invariant Violation", ee;
|
|
351
351
|
}
|
|
352
|
-
z = i[
|
|
352
|
+
z = i[N](b, N, j, I, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
353
353
|
} catch (q) {
|
|
354
354
|
z = q;
|
|
355
355
|
}
|
|
356
|
-
z && !(z instanceof Error) && (Ae(
|
|
356
|
+
z && !(z instanceof Error) && (Ae(X), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", j || "React class", I, N, typeof z), Ae(null)), z instanceof Error && !(z.message in yt) && (yt[z.message] = !0, Ae(X), x("Failed %s type: %s", I, z.message), Ae(null));
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
var
|
|
360
|
+
var Sr = Array.isArray;
|
|
361
361
|
function He(i) {
|
|
362
|
-
return
|
|
362
|
+
return Sr(i);
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function _r(i) {
|
|
365
365
|
{
|
|
366
366
|
var b = typeof Symbol == "function" && Symbol.toStringTag, I = b && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
|
367
367
|
return I;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function br(i) {
|
|
371
371
|
try {
|
|
372
|
-
return
|
|
372
|
+
return _t(i), !1;
|
|
373
373
|
} catch {
|
|
374
374
|
return !0;
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function _t(i) {
|
|
378
378
|
return "" + i;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
if (
|
|
382
|
-
return
|
|
380
|
+
function bt(i) {
|
|
381
|
+
if (br(i))
|
|
382
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _r(i)), _t(i);
|
|
383
383
|
}
|
|
384
|
-
var be = y.ReactCurrentOwner,
|
|
384
|
+
var be = y.ReactCurrentOwner, Er = {
|
|
385
385
|
key: !0,
|
|
386
386
|
ref: !0,
|
|
387
387
|
__self: !0,
|
|
388
388
|
__source: !0
|
|
389
|
-
},
|
|
389
|
+
}, Et, wt, qe;
|
|
390
390
|
qe = {};
|
|
391
|
-
function
|
|
391
|
+
function wr(i) {
|
|
392
392
|
if ($e.call(i, "ref")) {
|
|
393
393
|
var b = Object.getOwnPropertyDescriptor(i, "ref").get;
|
|
394
394
|
if (b && b.isReactWarning)
|
|
@@ -396,7 +396,7 @@ function Ur() {
|
|
|
396
396
|
}
|
|
397
397
|
return i.ref !== void 0;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function xr(i) {
|
|
400
400
|
if ($e.call(i, "key")) {
|
|
401
401
|
var b = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
402
402
|
if (b && b.isReactWarning)
|
|
@@ -406,14 +406,14 @@ function Ur() {
|
|
|
406
406
|
}
|
|
407
407
|
function Cr(i, b) {
|
|
408
408
|
if (typeof i.ref == "string" && be.current && b && be.current.stateNode !== b) {
|
|
409
|
-
var I =
|
|
410
|
-
qe[I] || (
|
|
409
|
+
var I = Y(be.current.type);
|
|
410
|
+
qe[I] || (x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Y(be.current.type), i.ref), qe[I] = !0);
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Rr(i, b) {
|
|
414
414
|
{
|
|
415
415
|
var I = function() {
|
|
416
|
-
|
|
416
|
+
Et || (Et = !0, x("%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)", b));
|
|
417
417
|
};
|
|
418
418
|
I.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
419
419
|
get: I,
|
|
@@ -421,10 +421,10 @@ function Ur() {
|
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Ir(i, b) {
|
|
425
425
|
{
|
|
426
426
|
var I = function() {
|
|
427
|
-
|
|
427
|
+
wt || (wt = !0, x("%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)", b));
|
|
428
428
|
};
|
|
429
429
|
I.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
|
430
430
|
get: I,
|
|
@@ -432,7 +432,7 @@ function Ur() {
|
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
var
|
|
435
|
+
var Or = function(i, b, I, j, X, W, N) {
|
|
436
436
|
var z = {
|
|
437
437
|
// This tag allows us to uniquely identify this as a React Element
|
|
438
438
|
$$typeof: t,
|
|
@@ -440,7 +440,7 @@ function Ur() {
|
|
|
440
440
|
type: i,
|
|
441
441
|
key: b,
|
|
442
442
|
ref: I,
|
|
443
|
-
props:
|
|
443
|
+
props: N,
|
|
444
444
|
// Record the component responsible for creating this element.
|
|
445
445
|
_owner: W
|
|
446
446
|
};
|
|
@@ -453,39 +453,39 @@ function Ur() {
|
|
|
453
453
|
configurable: !1,
|
|
454
454
|
enumerable: !1,
|
|
455
455
|
writable: !1,
|
|
456
|
-
value:
|
|
456
|
+
value: j
|
|
457
457
|
}), Object.defineProperty(z, "_source", {
|
|
458
458
|
configurable: !1,
|
|
459
459
|
enumerable: !1,
|
|
460
460
|
writable: !1,
|
|
461
|
-
value:
|
|
461
|
+
value: X
|
|
462
462
|
}), Object.freeze && (Object.freeze(z.props), Object.freeze(z)), z;
|
|
463
463
|
};
|
|
464
|
-
function
|
|
464
|
+
function Tr(i, b, I, j, X) {
|
|
465
465
|
{
|
|
466
|
-
var W,
|
|
467
|
-
I !== void 0 && (
|
|
466
|
+
var W, N = {}, z = null, ee = null;
|
|
467
|
+
I !== void 0 && (bt(I), z = "" + I), xr(b) && (bt(b.key), z = "" + b.key), wr(b) && (ee = b.ref, Cr(b, X));
|
|
468
468
|
for (W in b)
|
|
469
|
-
$e.call(b, W) && !
|
|
469
|
+
$e.call(b, W) && !Er.hasOwnProperty(W) && (N[W] = b[W]);
|
|
470
470
|
if (i && i.defaultProps) {
|
|
471
471
|
var q = i.defaultProps;
|
|
472
472
|
for (W in q)
|
|
473
|
-
|
|
473
|
+
N[W] === void 0 && (N[W] = q[W]);
|
|
474
474
|
}
|
|
475
475
|
if (z || ee) {
|
|
476
|
-
var
|
|
477
|
-
z &&
|
|
476
|
+
var J = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
|
477
|
+
z && Rr(N, J), ee && Ir(N, J);
|
|
478
478
|
}
|
|
479
|
-
return
|
|
479
|
+
return Or(i, z, ee, X, j, be.current, N);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
var Ge = y.ReactCurrentOwner,
|
|
482
|
+
var Ge = y.ReactCurrentOwner, xt = y.ReactDebugCurrentFrame;
|
|
483
483
|
function he(i) {
|
|
484
484
|
if (i) {
|
|
485
|
-
var b = i._owner, I =
|
|
486
|
-
|
|
485
|
+
var b = i._owner, I = je(i.type, i._source, b ? b.type : null);
|
|
486
|
+
xt.setExtraStackFrame(I);
|
|
487
487
|
} else
|
|
488
|
-
|
|
488
|
+
xt.setExtraStackFrame(null);
|
|
489
489
|
}
|
|
490
490
|
var Je;
|
|
491
491
|
Je = !1;
|
|
@@ -495,7 +495,7 @@ function Ur() {
|
|
|
495
495
|
function Ct() {
|
|
496
496
|
{
|
|
497
497
|
if (Ge.current) {
|
|
498
|
-
var i =
|
|
498
|
+
var i = Y(Ge.current.type);
|
|
499
499
|
if (i)
|
|
500
500
|
return `
|
|
501
501
|
|
|
@@ -504,7 +504,7 @@ Check the render method of \`` + i + "`.";
|
|
|
504
504
|
return "";
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function kr(i) {
|
|
508
508
|
{
|
|
509
509
|
if (i !== void 0) {
|
|
510
510
|
var b = i.fileName.replace(/^.*[\\\/]/, ""), I = i.lineNumber;
|
|
@@ -515,8 +515,8 @@ Check your code at ` + b + ":" + I + ".";
|
|
|
515
515
|
return "";
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
var
|
|
519
|
-
function
|
|
518
|
+
var Rt = {};
|
|
519
|
+
function Pr(i) {
|
|
520
520
|
{
|
|
521
521
|
var b = Ct();
|
|
522
522
|
if (!b) {
|
|
@@ -528,39 +528,39 @@ Check the top-level render call using <` + I + ">.");
|
|
|
528
528
|
return b;
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function It(i, b) {
|
|
532
532
|
{
|
|
533
533
|
if (!i._store || i._store.validated || i.key != null)
|
|
534
534
|
return;
|
|
535
535
|
i._store.validated = !0;
|
|
536
|
-
var I =
|
|
537
|
-
if (
|
|
536
|
+
var I = Pr(b);
|
|
537
|
+
if (Rt[I])
|
|
538
538
|
return;
|
|
539
|
-
|
|
540
|
-
var
|
|
541
|
-
i && i._owner && i._owner !== Ge.current && (
|
|
539
|
+
Rt[I] = !0;
|
|
540
|
+
var j = "";
|
|
541
|
+
i && i._owner && i._owner !== Ge.current && (j = " It was passed a child from " + Y(i._owner.type) + "."), he(i), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', I, j), he(null);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function Ot(i, b) {
|
|
545
545
|
{
|
|
546
546
|
if (typeof i != "object")
|
|
547
547
|
return;
|
|
548
548
|
if (He(i))
|
|
549
549
|
for (var I = 0; I < i.length; I++) {
|
|
550
|
-
var
|
|
551
|
-
Ze(
|
|
550
|
+
var j = i[I];
|
|
551
|
+
Ze(j) && It(j, b);
|
|
552
552
|
}
|
|
553
553
|
else if (Ze(i))
|
|
554
554
|
i._store && (i._store.validated = !0);
|
|
555
555
|
else if (i) {
|
|
556
|
-
var
|
|
557
|
-
if (typeof
|
|
558
|
-
for (var W =
|
|
559
|
-
Ze(
|
|
556
|
+
var X = O(i);
|
|
557
|
+
if (typeof X == "function" && X !== i.entries)
|
|
558
|
+
for (var W = X.call(i), N; !(N = W.next()).done; )
|
|
559
|
+
Ze(N.value) && It(N.value, b);
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Mr(i) {
|
|
564
564
|
{
|
|
565
565
|
var b = i.type;
|
|
566
566
|
if (b == null || typeof b == "string")
|
|
@@ -575,74 +575,74 @@ Check the top-level render call using <` + I + ">.");
|
|
|
575
575
|
else
|
|
576
576
|
return;
|
|
577
577
|
if (I) {
|
|
578
|
-
var
|
|
579
|
-
|
|
578
|
+
var j = Y(b);
|
|
579
|
+
yr(I, i.props, "prop", j, i);
|
|
580
580
|
} else if (b.PropTypes !== void 0 && !Je) {
|
|
581
581
|
Je = !0;
|
|
582
|
-
var
|
|
583
|
-
|
|
582
|
+
var X = Y(b);
|
|
583
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", X || "Unknown");
|
|
584
584
|
}
|
|
585
|
-
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved &&
|
|
585
|
+
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function Dr(i) {
|
|
589
589
|
{
|
|
590
590
|
for (var b = Object.keys(i.props), I = 0; I < b.length; I++) {
|
|
591
|
-
var
|
|
592
|
-
if (
|
|
593
|
-
he(i),
|
|
591
|
+
var j = b[I];
|
|
592
|
+
if (j !== "children" && j !== "key") {
|
|
593
|
+
he(i), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", j), he(null);
|
|
594
594
|
break;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
i.ref !== null && (he(i),
|
|
597
|
+
i.ref !== null && (he(i), x("Invalid attribute `ref` supplied to `React.Fragment`."), he(null));
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Tt(i, b, I, j, X, W) {
|
|
601
601
|
{
|
|
602
|
-
var
|
|
603
|
-
if (!
|
|
602
|
+
var N = D(i);
|
|
603
|
+
if (!N) {
|
|
604
604
|
var z = "";
|
|
605
605
|
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (z += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
606
|
-
var ee =
|
|
606
|
+
var ee = kr(X);
|
|
607
607
|
ee ? z += ee : z += Ct();
|
|
608
608
|
var q;
|
|
609
|
-
i === null ? q = "null" : He(i) ? q = "array" : i !== void 0 && i.$$typeof === t ? (q = "<" + (
|
|
609
|
+
i === null ? q = "null" : He(i) ? q = "array" : i !== void 0 && i.$$typeof === t ? (q = "<" + (Y(i.type) || "Unknown") + " />", z = " Did you accidentally export a JSX literal instead of a component?") : q = typeof i, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, z);
|
|
610
610
|
}
|
|
611
|
-
var
|
|
612
|
-
if (
|
|
613
|
-
return
|
|
614
|
-
if (
|
|
611
|
+
var J = Tr(i, b, I, X, W);
|
|
612
|
+
if (J == null)
|
|
613
|
+
return J;
|
|
614
|
+
if (N) {
|
|
615
615
|
var re = b.children;
|
|
616
616
|
if (re !== void 0)
|
|
617
|
-
if (
|
|
617
|
+
if (j)
|
|
618
618
|
if (He(re)) {
|
|
619
619
|
for (var ve = 0; ve < re.length; ve++)
|
|
620
|
-
|
|
620
|
+
Ot(re[ve], i);
|
|
621
621
|
Object.freeze && Object.freeze(re);
|
|
622
622
|
} else
|
|
623
|
-
|
|
623
|
+
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
624
624
|
else
|
|
625
|
-
|
|
625
|
+
Ot(re, i);
|
|
626
626
|
}
|
|
627
|
-
return i === n ?
|
|
627
|
+
return i === n ? Dr(J) : Mr(J), J;
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function jr(i, b, I) {
|
|
631
|
-
return
|
|
631
|
+
return Tt(i, b, I, !0);
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
return
|
|
633
|
+
function $r(i, b, I) {
|
|
634
|
+
return Tt(i, b, I, !1);
|
|
635
635
|
}
|
|
636
|
-
var
|
|
637
|
-
we.Fragment = n, we.jsx =
|
|
636
|
+
var Ar = $r, Lr = jr;
|
|
637
|
+
we.Fragment = n, we.jsx = Ar, we.jsxs = Lr;
|
|
638
638
|
}()), we;
|
|
639
639
|
}
|
|
640
640
|
(function(e) {
|
|
641
|
-
process.env.NODE_ENV === "production" ? e.exports =
|
|
641
|
+
process.env.NODE_ENV === "production" ? e.exports = Ur() : e.exports = Wr();
|
|
642
642
|
})(Xr);
|
|
643
|
-
const
|
|
644
|
-
let
|
|
645
|
-
class
|
|
643
|
+
const Vr = Ie.Fragment, k = Ie.jsx, le = Ie.jsxs;
|
|
644
|
+
let Fr = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, r) => (r &= 63, r < 36 ? t += r.toString(36) : r < 62 ? t += (r - 26).toString(36).toUpperCase() : r > 62 ? t += "-" : t += "_", t), "");
|
|
645
|
+
class Kr {
|
|
646
646
|
constructor(t, r, n = null) {
|
|
647
647
|
this._socket = t, this.userId = n, this.room = r, this.toUnregister = [
|
|
648
648
|
() => {
|
|
@@ -669,7 +669,7 @@ class Fr {
|
|
|
669
669
|
* @returns the result of the call.
|
|
670
670
|
*/
|
|
671
671
|
async _callServerRPC(t, r) {
|
|
672
|
-
const n =
|
|
672
|
+
const n = Fr();
|
|
673
673
|
return new Promise((o, s) => {
|
|
674
674
|
this._socket.once(`${this.room}._result.${n}`, (a) => {
|
|
675
675
|
a.hasOwnProperty("ok") ? o(a.ok) : s(a.err);
|
|
@@ -738,7 +738,7 @@ class Fr {
|
|
|
738
738
|
return await this._callServerRPC("call", { name: t, params: r });
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
const
|
|
741
|
+
const Hr = ({
|
|
742
742
|
socket: e,
|
|
743
743
|
room: t,
|
|
744
744
|
onJoined: r = () => {
|
|
@@ -747,7 +747,7 @@ const Kr = ({
|
|
|
747
747
|
},
|
|
748
748
|
userId: o = null
|
|
749
749
|
}) => {
|
|
750
|
-
const s = new
|
|
750
|
+
const s = new Kr(e, t, o);
|
|
751
751
|
return new Promise((a) => {
|
|
752
752
|
let u = !0;
|
|
753
753
|
e.on(`${t}.isMaster`, () => {
|
|
@@ -761,7 +761,7 @@ const Kr = ({
|
|
|
761
761
|
});
|
|
762
762
|
}), e.emit("joinSuperSocket", { room: t, userId: o });
|
|
763
763
|
});
|
|
764
|
-
},
|
|
764
|
+
}, at = g.createContext(), qr = () => /* @__PURE__ */ k(
|
|
765
765
|
"div",
|
|
766
766
|
{
|
|
767
767
|
style: {
|
|
@@ -775,14 +775,14 @@ const Kr = ({
|
|
|
775
775
|
},
|
|
776
776
|
children: /* @__PURE__ */ k("h2", { children: "🌀 Loading..." })
|
|
777
777
|
}
|
|
778
|
-
),
|
|
778
|
+
), or = ({
|
|
779
779
|
socket: e,
|
|
780
780
|
room: t,
|
|
781
781
|
channel: r = "default",
|
|
782
|
-
LoadingComponent: n =
|
|
782
|
+
LoadingComponent: n = qr,
|
|
783
783
|
children: o
|
|
784
784
|
}) => {
|
|
785
|
-
const [s, a] = g.useState(!1), [u, l] = g.useState(!1), [d, f] = g.useState(null), c = g.useRef(null), h = g.useRef(!1), S = _e(
|
|
785
|
+
const [s, a] = g.useState(!1), [u, l] = g.useState(!1), [d, f] = g.useState(null), c = g.useRef(null), h = g.useRef(!1), S = _e(at), v = g.useRef(!1);
|
|
786
786
|
return g.useEffect(() => (h.current = !0, () => {
|
|
787
787
|
h.current = !1;
|
|
788
788
|
}), []), g.useEffect(() => {
|
|
@@ -794,7 +794,7 @@ const Kr = ({
|
|
|
794
794
|
return e.on("disconnect", E), () => {
|
|
795
795
|
e.off("disconnect", E);
|
|
796
796
|
};
|
|
797
|
-
}, [r, e]), g.useEffect(() => e ? (e.connected || e.connect(), console.log(`Try to connect to wire ${t} on channel ${r}`), v.current || (v.current = !0,
|
|
797
|
+
}, [r, e]), g.useEffect(() => e ? (e.connected || e.connect(), console.log(`Try to connect to wire ${t} on channel ${r}`), v.current || (v.current = !0, Hr({
|
|
798
798
|
socket: e,
|
|
799
799
|
room: t,
|
|
800
800
|
onMaster: () => {
|
|
@@ -807,13 +807,13 @@ const Kr = ({
|
|
|
807
807
|
var E;
|
|
808
808
|
(E = c.current) == null || E.leave();
|
|
809
809
|
}) : null, [r, t, e]), !s || !d ? /* @__PURE__ */ k(n, {}) : /* @__PURE__ */ k(
|
|
810
|
-
|
|
810
|
+
at.Provider,
|
|
811
811
|
{
|
|
812
812
|
value: { ...S, [r]: { wire: d, joined: s, isMaster: u, room: t } },
|
|
813
813
|
children: o
|
|
814
814
|
}
|
|
815
815
|
);
|
|
816
|
-
},
|
|
816
|
+
}, Xe = (e = "default") => (_e(at) || {})[e], jt = (e) => {
|
|
817
817
|
let t;
|
|
818
818
|
const r = /* @__PURE__ */ new Set(), n = (l, d) => {
|
|
819
819
|
const f = typeof l == "function" ? l(t) : l;
|
|
@@ -828,14 +828,14 @@ const Kr = ({
|
|
|
828
828
|
} };
|
|
829
829
|
return t = e(n, o, u), u;
|
|
830
830
|
}, Ue = (e) => e ? jt(e) : jt;
|
|
831
|
-
var
|
|
831
|
+
var ct = {}, Gr = {
|
|
832
832
|
get exports() {
|
|
833
|
-
return
|
|
833
|
+
return ct;
|
|
834
834
|
},
|
|
835
835
|
set exports(e) {
|
|
836
|
-
|
|
836
|
+
ct = e;
|
|
837
837
|
}
|
|
838
|
-
}, Qe = {}, Ye = {},
|
|
838
|
+
}, Qe = {}, Ye = {}, Jr = {
|
|
839
839
|
get exports() {
|
|
840
840
|
return Ye;
|
|
841
841
|
},
|
|
@@ -852,11 +852,11 @@ var at = {}, qr = {
|
|
|
852
852
|
* This source code is licensed under the MIT license found in the
|
|
853
853
|
* LICENSE file in the root directory of this source tree.
|
|
854
854
|
*/
|
|
855
|
-
var
|
|
856
|
-
function
|
|
857
|
-
if (
|
|
855
|
+
var $t;
|
|
856
|
+
function Zr() {
|
|
857
|
+
if ($t)
|
|
858
858
|
return et;
|
|
859
|
-
|
|
859
|
+
$t = 1;
|
|
860
860
|
var e = g;
|
|
861
861
|
function t(c, h) {
|
|
862
862
|
return c === h && (c !== 0 || 1 / c === 1 / h) || c !== c && h !== h;
|
|
@@ -898,33 +898,33 @@ var tt = {};
|
|
|
898
898
|
* This source code is licensed under the MIT license found in the
|
|
899
899
|
* LICENSE file in the root directory of this source tree.
|
|
900
900
|
*/
|
|
901
|
-
var
|
|
902
|
-
function
|
|
903
|
-
return
|
|
901
|
+
var At;
|
|
902
|
+
function Qr() {
|
|
903
|
+
return At || (At = 1, process.env.NODE_ENV !== "production" && function() {
|
|
904
904
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
905
905
|
var e = g, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
906
|
-
function r(
|
|
906
|
+
function r(C) {
|
|
907
907
|
{
|
|
908
908
|
for (var p = arguments.length, _ = new Array(p > 1 ? p - 1 : 0), m = 1; m < p; m++)
|
|
909
909
|
_[m - 1] = arguments[m];
|
|
910
|
-
n("error",
|
|
910
|
+
n("error", C, _);
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
function n(
|
|
913
|
+
function n(C, p, _) {
|
|
914
914
|
{
|
|
915
915
|
var m = t.ReactDebugCurrentFrame, w = m.getStackAddendum();
|
|
916
916
|
w !== "" && (p += "%s", _ = _.concat([w]));
|
|
917
917
|
var R = _.map(function(T) {
|
|
918
918
|
return String(T);
|
|
919
919
|
});
|
|
920
|
-
R.unshift("Warning: " + p), Function.prototype.apply.call(console[
|
|
920
|
+
R.unshift("Warning: " + p), Function.prototype.apply.call(console[C], console, R);
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
function o(
|
|
924
|
-
return
|
|
923
|
+
function o(C, p) {
|
|
924
|
+
return C === p && (C !== 0 || 1 / C === 1 / p) || C !== C && p !== p;
|
|
925
925
|
}
|
|
926
926
|
var s = typeof Object.is == "function" ? Object.is : o, a = e.useState, u = e.useEffect, l = e.useLayoutEffect, d = e.useDebugValue, f = !1, c = !1;
|
|
927
|
-
function h(
|
|
927
|
+
function h(C, p, _) {
|
|
928
928
|
f || e.startTransition !== void 0 && (f = !0, r("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."));
|
|
929
929
|
var m = p();
|
|
930
930
|
if (!c) {
|
|
@@ -936,25 +936,25 @@ function Zr() {
|
|
|
936
936
|
value: m,
|
|
937
937
|
getSnapshot: p
|
|
938
938
|
}
|
|
939
|
-
}), T = R[0].inst,
|
|
939
|
+
}), T = R[0].inst, D = R[1];
|
|
940
940
|
return l(function() {
|
|
941
|
-
T.value = m, T.getSnapshot = p, S(T) &&
|
|
941
|
+
T.value = m, T.getSnapshot = p, S(T) && D({
|
|
942
942
|
inst: T
|
|
943
943
|
});
|
|
944
|
-
}, [
|
|
945
|
-
S(T) &&
|
|
944
|
+
}, [C, m, p]), u(function() {
|
|
945
|
+
S(T) && D({
|
|
946
946
|
inst: T
|
|
947
947
|
});
|
|
948
948
|
var M = function() {
|
|
949
|
-
S(T) &&
|
|
949
|
+
S(T) && D({
|
|
950
950
|
inst: T
|
|
951
951
|
});
|
|
952
952
|
};
|
|
953
|
-
return
|
|
954
|
-
}, [
|
|
953
|
+
return C(M);
|
|
954
|
+
}, [C]), d(m), m;
|
|
955
955
|
}
|
|
956
|
-
function S(
|
|
957
|
-
var p =
|
|
956
|
+
function S(C) {
|
|
957
|
+
var p = C.getSnapshot, _ = C.value;
|
|
958
958
|
try {
|
|
959
959
|
var m = p();
|
|
960
960
|
return !s(_, m);
|
|
@@ -962,18 +962,18 @@ function Zr() {
|
|
|
962
962
|
return !0;
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
|
-
function v(
|
|
965
|
+
function v(C, p, _) {
|
|
966
966
|
return p();
|
|
967
967
|
}
|
|
968
|
-
var E = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", O = !E, y = O ? v : h,
|
|
969
|
-
tt.useSyncExternalStore =
|
|
968
|
+
var E = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", O = !E, y = O ? v : h, x = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : y;
|
|
969
|
+
tt.useSyncExternalStore = x, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
970
970
|
}()), tt;
|
|
971
971
|
}
|
|
972
|
-
var
|
|
973
|
-
function
|
|
974
|
-
return
|
|
975
|
-
process.env.NODE_ENV === "production" ? e.exports =
|
|
976
|
-
}(
|
|
972
|
+
var Lt;
|
|
973
|
+
function sr() {
|
|
974
|
+
return Lt || (Lt = 1, function(e) {
|
|
975
|
+
process.env.NODE_ENV === "production" ? e.exports = Zr() : e.exports = Qr();
|
|
976
|
+
}(Jr)), Ye;
|
|
977
977
|
}
|
|
978
978
|
/**
|
|
979
979
|
* @license React
|
|
@@ -984,12 +984,12 @@ function or() {
|
|
|
984
984
|
* This source code is licensed under the MIT license found in the
|
|
985
985
|
* LICENSE file in the root directory of this source tree.
|
|
986
986
|
*/
|
|
987
|
-
var
|
|
988
|
-
function
|
|
989
|
-
if (
|
|
987
|
+
var zt;
|
|
988
|
+
function en() {
|
|
989
|
+
if (zt)
|
|
990
990
|
return Qe;
|
|
991
|
-
|
|
992
|
-
var e = g, t =
|
|
991
|
+
zt = 1;
|
|
992
|
+
var e = g, t = sr();
|
|
993
993
|
function r(d, f) {
|
|
994
994
|
return d === f && (d !== 0 || 1 / d === 1 / f) || d !== d && f !== f;
|
|
995
995
|
}
|
|
@@ -1003,20 +1003,20 @@ function Qr() {
|
|
|
1003
1003
|
E = v.current;
|
|
1004
1004
|
v = u(function() {
|
|
1005
1005
|
function y(m) {
|
|
1006
|
-
if (!
|
|
1007
|
-
if (
|
|
1006
|
+
if (!x) {
|
|
1007
|
+
if (x = !0, C = m, m = h(m), S !== void 0 && E.hasValue) {
|
|
1008
1008
|
var w = E.value;
|
|
1009
1009
|
if (S(w, m))
|
|
1010
1010
|
return p = w;
|
|
1011
1011
|
}
|
|
1012
1012
|
return p = m;
|
|
1013
1013
|
}
|
|
1014
|
-
if (w = p, n(
|
|
1014
|
+
if (w = p, n(C, m))
|
|
1015
1015
|
return w;
|
|
1016
1016
|
var R = h(m);
|
|
1017
|
-
return S !== void 0 && S(w, R) ? w : (
|
|
1017
|
+
return S !== void 0 && S(w, R) ? w : (C = m, p = R);
|
|
1018
1018
|
}
|
|
1019
|
-
var
|
|
1019
|
+
var x = !1, C, p, _ = c === void 0 ? null : c;
|
|
1020
1020
|
return [function() {
|
|
1021
1021
|
return y(f());
|
|
1022
1022
|
}, _ === null ? void 0 : function() {
|
|
@@ -1039,11 +1039,11 @@ var rt = {};
|
|
|
1039
1039
|
* This source code is licensed under the MIT license found in the
|
|
1040
1040
|
* LICENSE file in the root directory of this source tree.
|
|
1041
1041
|
*/
|
|
1042
|
-
var
|
|
1043
|
-
function
|
|
1044
|
-
return
|
|
1042
|
+
var Yt;
|
|
1043
|
+
function tn() {
|
|
1044
|
+
return Yt || (Yt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1045
1045
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
1046
|
-
var e = g, t =
|
|
1046
|
+
var e = g, t = sr();
|
|
1047
1047
|
function r(f, c) {
|
|
1048
1048
|
return f === c && (f !== 0 || 1 / f === 1 / c) || f !== f && c !== c;
|
|
1049
1049
|
}
|
|
@@ -1058,26 +1058,26 @@ function en() {
|
|
|
1058
1058
|
var _ = !1, m, w, R = function(A) {
|
|
1059
1059
|
if (!_) {
|
|
1060
1060
|
_ = !0, m = A;
|
|
1061
|
-
var
|
|
1061
|
+
var Y = S(A);
|
|
1062
1062
|
if (v !== void 0 && O.hasValue) {
|
|
1063
1063
|
var U = O.value;
|
|
1064
|
-
if (v(U,
|
|
1064
|
+
if (v(U, Y))
|
|
1065
1065
|
return w = U, U;
|
|
1066
1066
|
}
|
|
1067
|
-
return w =
|
|
1067
|
+
return w = Y, Y;
|
|
1068
1068
|
}
|
|
1069
|
-
var
|
|
1070
|
-
if (n(
|
|
1069
|
+
var G = m, P = w;
|
|
1070
|
+
if (n(G, A))
|
|
1071
1071
|
return P;
|
|
1072
1072
|
var $ = S(A);
|
|
1073
1073
|
return v !== void 0 && v(P, $) ? P : (m = A, w = $, $);
|
|
1074
|
-
}, T = h === void 0 ? null : h,
|
|
1074
|
+
}, T = h === void 0 ? null : h, D = function() {
|
|
1075
1075
|
return R(c());
|
|
1076
1076
|
}, M = T === null ? void 0 : function() {
|
|
1077
1077
|
return R(T());
|
|
1078
1078
|
};
|
|
1079
|
-
return [
|
|
1080
|
-
}, [c, h, S, v]),
|
|
1079
|
+
return [D, M];
|
|
1080
|
+
}, [c, h, S, v]), x = y[0], C = y[1], p = o(f, x, C);
|
|
1081
1081
|
return a(function() {
|
|
1082
1082
|
O.hasValue = !0, O.value = p;
|
|
1083
1083
|
}, [p]), l(p), p;
|
|
@@ -1086,44 +1086,44 @@ function en() {
|
|
|
1086
1086
|
}()), rt;
|
|
1087
1087
|
}
|
|
1088
1088
|
(function(e) {
|
|
1089
|
-
process.env.NODE_ENV === "production" ? e.exports =
|
|
1090
|
-
})(
|
|
1091
|
-
const
|
|
1089
|
+
process.env.NODE_ENV === "production" ? e.exports = en() : e.exports = tn();
|
|
1090
|
+
})(Gr);
|
|
1091
|
+
const rn = /* @__PURE__ */ Nr(ct), { useSyncExternalStoreWithSelector: nn } = rn;
|
|
1092
1092
|
function We(e, t = e.getState, r) {
|
|
1093
|
-
const n =
|
|
1093
|
+
const n = nn(
|
|
1094
1094
|
e.subscribe,
|
|
1095
1095
|
e.getState,
|
|
1096
1096
|
e.getServerState || e.getState,
|
|
1097
1097
|
t,
|
|
1098
1098
|
r
|
|
1099
1099
|
);
|
|
1100
|
-
return
|
|
1100
|
+
return Br(n), n;
|
|
1101
1101
|
}
|
|
1102
1102
|
const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e, t) ? e : e.parentNode ? Oe(e.parentNode, t) : !1, ze = ([e, t], [r, n]) => {
|
|
1103
1103
|
const o = Math.abs(e - r), s = Math.abs(t - n);
|
|
1104
1104
|
return Math.hypot(o, s);
|
|
1105
|
-
},
|
|
1105
|
+
}, ir = (e, t, r) => {
|
|
1106
1106
|
const n = r * Math.PI / 180, o = e * Math.cos(n) - t * Math.sin(n), s = e * Math.sin(n) + t * Math.cos(n);
|
|
1107
1107
|
return [o, s];
|
|
1108
|
-
},
|
|
1108
|
+
}, ut = ([e, t], { scale: r, rotate: n, translateX: o, translateY: s }) => {
|
|
1109
1109
|
const a = (e - o) / r, u = (t - s) / r;
|
|
1110
|
-
return
|
|
1110
|
+
return ir(a, u, -n);
|
|
1111
1111
|
}, Be = ([e, t], { scale: r, rotate: n, translateX: o, translateY: s }) => {
|
|
1112
|
-
const [a, u] =
|
|
1112
|
+
const [a, u] = ir(e, t, n);
|
|
1113
1113
|
return [a * r + o, u * r + s];
|
|
1114
|
-
},
|
|
1114
|
+
}, Bt = (e, t, r, n) => {
|
|
1115
1115
|
const o = e.x, s = e.y, a = t.x, u = t.y, l = r.x, d = r.y, f = a - o, c = u - s, h = o - l, S = s - d, v = f * f + c * c, E = 2 * (h * f + S * c), O = h * h + S * S - n * n, y = E * E - 4 * v * O;
|
|
1116
1116
|
if (y < 0)
|
|
1117
1117
|
return [];
|
|
1118
|
-
const
|
|
1119
|
-
return
|
|
1120
|
-
},
|
|
1118
|
+
const x = (-E + Math.sqrt(y)) / (2 * v), C = (-E - Math.sqrt(y)) / (2 * v), p = [];
|
|
1119
|
+
return x >= 0 && x <= 1 && p.push({ x: o + x * f, y: s + x * c }), C >= 0 && C <= 1 && p.push({ x: o + C * f, y: s + C * c }), p;
|
|
1120
|
+
}, dt = (e, t) => e.x > t.left && e.x < t.left + t.width && e.y > t.top && e.y < t.top + t.height, on = (e, t) => Array.from(e.querySelectorAll(".corner")).every((n) => {
|
|
1121
1121
|
const { top: o, left: s } = n.getBoundingClientRect();
|
|
1122
|
-
return
|
|
1123
|
-
}),
|
|
1122
|
+
return dt({ x: s, y: o }, t);
|
|
1123
|
+
}), sn = (e, t) => {
|
|
1124
1124
|
const r = t.getBoundingClientRect();
|
|
1125
|
-
return
|
|
1126
|
-
},
|
|
1125
|
+
return on(e, r);
|
|
1126
|
+
}, Ne = (e, t) => {
|
|
1127
1127
|
try {
|
|
1128
1128
|
const r = document.getElementById(`${e}__${t}`);
|
|
1129
1129
|
return r || console.error(`Missing item ${t}`), r;
|
|
@@ -1143,9 +1143,9 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
|
|
|
1143
1143
|
JSON.stringify(e == null ? void 0 : e.dataset),
|
|
1144
1144
|
(n = e == null ? void 0 : e.dataset) == null ? void 0 : n.id
|
|
1145
1145
|
), t;
|
|
1146
|
-
},
|
|
1146
|
+
}, an = (e, t) => {
|
|
1147
1147
|
const r = e.reduce((n, o) => {
|
|
1148
|
-
const s =
|
|
1148
|
+
const s = Ne(t, o);
|
|
1149
1149
|
if (!s)
|
|
1150
1150
|
return n || null;
|
|
1151
1151
|
const { left: a, right: u, top: l, bottom: d } = s.getBoundingClientRect();
|
|
@@ -1158,32 +1158,32 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
|
|
|
1158
1158
|
}, f.left = Math.min(a, f.left), f.top = Math.min(l, f.top), f.right = Math.max(u, f.right), f.bottom = Math.max(d, f.bottom), f;
|
|
1159
1159
|
}, null);
|
|
1160
1160
|
return r && (r.width = r.right - r.left, r.height = r.bottom - r.top, r);
|
|
1161
|
-
},
|
|
1161
|
+
}, ar = (e, t, r = null) => (r === null && (r = /* @__PURE__ */ new Set()), !Array.isArray(t) || t.length === 0 ? [] : t.map((n) => r.has(n) ? [] : (r.add(n), e[n] ? [
|
|
1162
1162
|
n,
|
|
1163
|
-
...
|
|
1163
|
+
...ar(
|
|
1164
1164
|
e,
|
|
1165
1165
|
e[n].linkedItems,
|
|
1166
1166
|
r
|
|
1167
1167
|
)
|
|
1168
|
-
] : [])).flat()),
|
|
1169
|
-
const n = new Set(
|
|
1168
|
+
] : [])).flat()), Nt = (e, t, r) => {
|
|
1169
|
+
const n = new Set(ar(e, r));
|
|
1170
1170
|
return t.filter((o) => n.has(o));
|
|
1171
|
-
},
|
|
1171
|
+
}, cn = ({ x: e, y: t, width: r, height: n }, { type: o = "grid", size: s = 1, offset: a = { x: 0, y: 0 } }) => {
|
|
1172
1172
|
const [u, l] = [
|
|
1173
1173
|
e + r / 2 - a.x,
|
|
1174
1174
|
t + n / 2 - a.y
|
|
1175
1175
|
];
|
|
1176
|
-
let d, f, c, h, S, v, E, O, y,
|
|
1177
|
-
const
|
|
1176
|
+
let d, f, c, h, S, v, E, O, y, x;
|
|
1177
|
+
const C = s / 1.1547;
|
|
1178
1178
|
switch (o) {
|
|
1179
1179
|
case "grid":
|
|
1180
1180
|
d = Math.round(u / s) * s, f = Math.round(l / s) * s;
|
|
1181
1181
|
break;
|
|
1182
1182
|
case "hexH":
|
|
1183
|
-
c = 2 *
|
|
1183
|
+
c = 2 * C, h = 3 * s, S = Math.round(u / c) * c, E = Math.round(l / h) * h, v = S > u ? S - C : S + C, O = E > l ? E - 1.5 * s : E + 1.5 * s, y = Math.hypot(S - u, E - l), x = Math.hypot(v - u, O - l), y < x ? (d = S, f = E) : (d = v, f = O);
|
|
1184
1184
|
break;
|
|
1185
1185
|
case "hexV":
|
|
1186
|
-
c = 3 * s, h = 2 *
|
|
1186
|
+
c = 3 * s, h = 2 * C, S = Math.round(u / c) * c, E = Math.round(l / h) * h, v = S > u ? S - 1.5 * s : S + 1.5 * s, O = E > l ? E - C : E + C, y = Math.hypot(S - u, E - l), x = Math.hypot(v - u, O - l), y < x ? (d = S, f = E) : (d = v, f = O);
|
|
1187
1187
|
break;
|
|
1188
1188
|
default:
|
|
1189
1189
|
d = e + r / 2, f = t + n / 2;
|
|
@@ -1223,13 +1223,13 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
|
|
|
1223
1223
|
"#007a4b",
|
|
1224
1224
|
"#bf0daa",
|
|
1225
1225
|
"#af0ad8"
|
|
1226
|
-
],
|
|
1226
|
+
], Ut = () => Xt[Math.floor(Math.random() * Xt.length)], un = !1, pt = ({ wire: e, storeName: t, noSync: r = [], defaultValue: n }, o) => (s, a, u) => {
|
|
1227
1227
|
s({ ready: !1 });
|
|
1228
1228
|
const l = [];
|
|
1229
1229
|
(async () => {
|
|
1230
1230
|
try {
|
|
1231
1231
|
const S = await e.call(`${t}_getValue`);
|
|
1232
|
-
|
|
1232
|
+
un && console.log("init from peer with value", S), s((v) => ({ ...v, ...S }));
|
|
1233
1233
|
} catch {
|
|
1234
1234
|
n !== void 0 && s(n);
|
|
1235
1235
|
}
|
|
@@ -1289,7 +1289,7 @@ function Ve(e, t) {
|
|
|
1289
1289
|
return !1;
|
|
1290
1290
|
return !0;
|
|
1291
1291
|
}
|
|
1292
|
-
const
|
|
1292
|
+
const cr = g.createContext(), ln = (e, t) => ({
|
|
1293
1293
|
items: {},
|
|
1294
1294
|
getItems: () => t().items,
|
|
1295
1295
|
setItems: (r) => e({ items: r }),
|
|
@@ -1308,7 +1308,7 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1308
1308
|
});
|
|
1309
1309
|
}), { items: s };
|
|
1310
1310
|
})
|
|
1311
|
-
}),
|
|
1311
|
+
}), fn = (e, t) => ({
|
|
1312
1312
|
itemIds: [],
|
|
1313
1313
|
setItemIds: (r) => e({ itemIds: r }),
|
|
1314
1314
|
getItemIds: () => t().itemIds,
|
|
@@ -1327,7 +1327,7 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1327
1327
|
updateManyItemIds: (r) => e((n) => ({
|
|
1328
1328
|
items: n.itemIds.map((o, s) => r[s] !== void 0 ? r[s] : o)
|
|
1329
1329
|
}))
|
|
1330
|
-
}),
|
|
1330
|
+
}), dn = (e, t) => ({
|
|
1331
1331
|
removeItemsById: (r) => e((n) => ({
|
|
1332
1332
|
itemIds: n.itemIds.filter((o) => !r.includes(o)),
|
|
1333
1333
|
items: Object.fromEntries(
|
|
@@ -1360,25 +1360,25 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1360
1360
|
itemIds: s
|
|
1361
1361
|
};
|
|
1362
1362
|
})
|
|
1363
|
-
}),
|
|
1363
|
+
}), pn = (e, t) => ({
|
|
1364
1364
|
boardConfig: {},
|
|
1365
1365
|
getBoardConfig: () => t().boardConfig,
|
|
1366
1366
|
setBoardConfig: (r) => e({ boardConfig: r }),
|
|
1367
1367
|
updateBoardConfig: (r) => e((n) => ({ boardConfig: { ...n.boardConfig, ...r } }))
|
|
1368
|
-
}),
|
|
1368
|
+
}), mn = (e, t) => ({
|
|
1369
1369
|
session: {},
|
|
1370
1370
|
getSessionInfo: () => t().session,
|
|
1371
1371
|
setSessionInfo: (r) => e({ session: r }),
|
|
1372
1372
|
updateSessionInfo: (r) => e((n) => ({ session: { ...n.session, ...r } }))
|
|
1373
|
-
}),
|
|
1374
|
-
const { wire: n } =
|
|
1373
|
+
}), Wt = ({ storeName: e, children: t, defaultValue: r }) => {
|
|
1374
|
+
const { wire: n } = Xe("room"), [o, s] = g.useState(!1), [a] = g.useState(
|
|
1375
1375
|
() => Ue(
|
|
1376
|
-
|
|
1377
|
-
...un(...u),
|
|
1376
|
+
pt({ wire: n, storeName: e, defaultValue: r }, (...u) => ({
|
|
1378
1377
|
...ln(...u),
|
|
1379
1378
|
...fn(...u),
|
|
1380
1379
|
...dn(...u),
|
|
1381
|
-
...pn(...u)
|
|
1380
|
+
...pn(...u),
|
|
1381
|
+
...mn(...u)
|
|
1382
1382
|
}))
|
|
1383
1383
|
)
|
|
1384
1384
|
);
|
|
@@ -1386,11 +1386,11 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1386
1386
|
const u = a.subscribe((l) => {
|
|
1387
1387
|
l.ready && (u(), s(!0));
|
|
1388
1388
|
});
|
|
1389
|
-
}, [a]), o ? /* @__PURE__ */ k(
|
|
1389
|
+
}, [a]), o ? /* @__PURE__ */ k(cr.Provider, { value: a, children: t }) : null;
|
|
1390
1390
|
}, oe = (e, t) => {
|
|
1391
|
-
const r = _e(
|
|
1391
|
+
const r = _e(cr);
|
|
1392
1392
|
return We(r, e, t || Ve);
|
|
1393
|
-
},
|
|
1393
|
+
}, os = () => {
|
|
1394
1394
|
const [e, t] = oe((n) => [
|
|
1395
1395
|
n.itemIds,
|
|
1396
1396
|
n.items
|
|
@@ -1399,7 +1399,7 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1399
1399
|
() => e.map((n) => t[n]),
|
|
1400
1400
|
[e, t]
|
|
1401
1401
|
);
|
|
1402
|
-
},
|
|
1402
|
+
}, ss = () => {
|
|
1403
1403
|
const [e, t, r] = oe((a) => [
|
|
1404
1404
|
a.items,
|
|
1405
1405
|
a.itemIds,
|
|
@@ -1411,19 +1411,19 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1411
1411
|
o(a);
|
|
1412
1412
|
});
|
|
1413
1413
|
}, [e, t, r]), n;
|
|
1414
|
-
},
|
|
1414
|
+
}, ur = 5e4, lr = g.createContext(), gn = (e, t) => ({
|
|
1415
1415
|
config: {
|
|
1416
1416
|
itemTemplates: {},
|
|
1417
1417
|
actions: {},
|
|
1418
1418
|
uid: null,
|
|
1419
1419
|
itemExtent: { x: 0, y: 0, radius: 0 },
|
|
1420
1420
|
boardWrapperRect: {},
|
|
1421
|
-
boardSize:
|
|
1421
|
+
boardSize: ur
|
|
1422
1422
|
},
|
|
1423
1423
|
// TODO optimize when same values as before
|
|
1424
1424
|
updateConfiguration: (r) => e((n) => ({ config: { ...n.config, ...r } })),
|
|
1425
1425
|
getConfiguration: () => t().config
|
|
1426
|
-
}),
|
|
1426
|
+
}), hn = (e, t) => ({
|
|
1427
1427
|
boardState: {
|
|
1428
1428
|
movingItems: !1,
|
|
1429
1429
|
selecting: !1,
|
|
@@ -1437,7 +1437,7 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1437
1437
|
// TODO optimize when same values as before
|
|
1438
1438
|
updateBoardState: (r) => e((n) => ({ boardState: { ...n.boardState, ...r } })),
|
|
1439
1439
|
getBoardState: () => t().boardState
|
|
1440
|
-
}),
|
|
1440
|
+
}), vn = (e, t) => ({
|
|
1441
1441
|
interactions: {},
|
|
1442
1442
|
getInteractions: () => t().interactions,
|
|
1443
1443
|
register: (r, n) => e((o) => {
|
|
@@ -1459,7 +1459,7 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1459
1459
|
setTimeout(() => o(n), 0);
|
|
1460
1460
|
});
|
|
1461
1461
|
}
|
|
1462
|
-
}),
|
|
1462
|
+
}), yn = (e, t) => ({
|
|
1463
1463
|
selection: [],
|
|
1464
1464
|
setSelection: (r) => e((n) => JSON.stringify(n.selection) !== JSON.stringify(r) ? { selection: r } : {}),
|
|
1465
1465
|
getSelection: () => t().selection,
|
|
@@ -1479,36 +1479,36 @@ const ar = g.createContext(), un = (e, t) => ({
|
|
|
1479
1479
|
const o = n.selectionBox;
|
|
1480
1480
|
return !o || !r || o.top !== r.top || o.left !== r.left || o.width !== r.width || o.height !== r.height ? { selectionBox: r } : {};
|
|
1481
1481
|
})
|
|
1482
|
-
}),
|
|
1482
|
+
}), Vt = ({ children: e }) => {
|
|
1483
1483
|
const [t] = g.useState(
|
|
1484
1484
|
() => Ue((...r) => ({
|
|
1485
|
-
...mn(...r),
|
|
1486
1485
|
...gn(...r),
|
|
1487
1486
|
...hn(...r),
|
|
1488
|
-
...vn(...r)
|
|
1487
|
+
...vn(...r),
|
|
1488
|
+
...yn(...r)
|
|
1489
1489
|
}))
|
|
1490
1490
|
);
|
|
1491
|
-
return /* @__PURE__ */ k(
|
|
1491
|
+
return /* @__PURE__ */ k(lr.Provider, { value: t, children: e });
|
|
1492
1492
|
}, Z = (e, t) => {
|
|
1493
|
-
const r = _e(
|
|
1493
|
+
const r = _e(lr);
|
|
1494
1494
|
return We(r, e, t || Ve);
|
|
1495
|
-
},
|
|
1495
|
+
}, is = () => {
|
|
1496
1496
|
const [e] = Z((t) => [t.selection]);
|
|
1497
1497
|
return e;
|
|
1498
|
-
},
|
|
1498
|
+
}, as = () => {
|
|
1499
1499
|
const [e] = Z((t) => [t.getSelection]);
|
|
1500
1500
|
return e;
|
|
1501
1501
|
};
|
|
1502
|
-
function
|
|
1502
|
+
function mt(e) {
|
|
1503
1503
|
const t = Re(e);
|
|
1504
|
-
return t.current = e,
|
|
1504
|
+
return t.current = e, ft(() => Object.freeze({
|
|
1505
1505
|
get current() {
|
|
1506
1506
|
return t.current;
|
|
1507
1507
|
}
|
|
1508
1508
|
}), []);
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1511
|
-
const t =
|
|
1510
|
+
function Sn(e) {
|
|
1511
|
+
const t = mt(e);
|
|
1512
1512
|
Pe(
|
|
1513
1513
|
() => () => {
|
|
1514
1514
|
t.current();
|
|
@@ -1517,11 +1517,11 @@ function yn(e) {
|
|
|
1517
1517
|
[]
|
|
1518
1518
|
);
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function gt(e, t, r, n = 0) {
|
|
1521
1521
|
const o = Re(), s = Re(), a = Re(), u = () => {
|
|
1522
1522
|
o.current && (clearTimeout(o.current), o.current = void 0), s.current && (clearTimeout(s.current), s.current = void 0);
|
|
1523
1523
|
};
|
|
1524
|
-
return
|
|
1524
|
+
return Sn(u), ft(
|
|
1525
1525
|
() => {
|
|
1526
1526
|
const l = () => {
|
|
1527
1527
|
if (!a.current)
|
|
@@ -1540,7 +1540,9 @@ function mt(e, t, r, n = 0) {
|
|
|
1540
1540
|
[r, n, ...t]
|
|
1541
1541
|
);
|
|
1542
1542
|
}
|
|
1543
|
-
const
|
|
1543
|
+
const _n = 100, bn = 1e3, En = 0.8;
|
|
1544
|
+
let nt = !1;
|
|
1545
|
+
const wn = ({
|
|
1544
1546
|
x: e,
|
|
1545
1547
|
y: t,
|
|
1546
1548
|
scale: r,
|
|
@@ -1550,7 +1552,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1550
1552
|
boardSize: a
|
|
1551
1553
|
}) => {
|
|
1552
1554
|
let [u, l] = [e, t];
|
|
1553
|
-
const d =
|
|
1555
|
+
const d = ut(
|
|
1554
1556
|
[s.width / 2, s.height / 2],
|
|
1555
1557
|
{ translateX: u, translateY: l, scale: r, rotate: n }
|
|
1556
1558
|
), f = {
|
|
@@ -1559,37 +1561,37 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1559
1561
|
}, c = {
|
|
1560
1562
|
x: a / 2,
|
|
1561
1563
|
y: a / 2
|
|
1562
|
-
}, h = ze(d, [f.x, f.y]), S = Math.min(s.width, s.height), v = o.radius + S / 2 / r -
|
|
1564
|
+
}, h = ze(d, [f.x, f.y]), S = Math.min(s.width, s.height), v = o.radius + S / 2 / r - _n / r;
|
|
1563
1565
|
if (h > v) {
|
|
1564
|
-
const y =
|
|
1566
|
+
const y = Bt(
|
|
1565
1567
|
{ x: d[0], y: d[1] },
|
|
1566
1568
|
f,
|
|
1567
1569
|
f,
|
|
1568
1570
|
v - 1 / r
|
|
1569
|
-
)[0], [
|
|
1571
|
+
)[0], [x, C] = Be([-y.x, -y.y], {
|
|
1570
1572
|
translateX: s.width / 2,
|
|
1571
1573
|
translateY: s.height / 2,
|
|
1572
1574
|
scale: r,
|
|
1573
1575
|
rotate: n
|
|
1574
1576
|
});
|
|
1575
|
-
u =
|
|
1577
|
+
u = x, l = C;
|
|
1576
1578
|
}
|
|
1577
1579
|
const E = ze(d, [c.x, c.y]), O = a / 2 - ze([0, 0], [s.width, s.height]) / r;
|
|
1578
1580
|
if (E > O) {
|
|
1579
|
-
const y =
|
|
1581
|
+
const y = Bt(
|
|
1580
1582
|
{ x: d[0], y: d[1] },
|
|
1581
1583
|
c,
|
|
1582
1584
|
c,
|
|
1583
1585
|
O - 1 / r
|
|
1584
1586
|
)[0];
|
|
1585
1587
|
if (y) {
|
|
1586
|
-
const [
|
|
1588
|
+
const [x, C] = Be([-y.x, -y.y], {
|
|
1587
1589
|
translateX: s.width / 2,
|
|
1588
1590
|
translateY: s.height / 2,
|
|
1589
1591
|
scale: r,
|
|
1590
1592
|
rotate: n
|
|
1591
1593
|
});
|
|
1592
|
-
u =
|
|
1594
|
+
u = x, l = C;
|
|
1593
1595
|
}
|
|
1594
1596
|
}
|
|
1595
1597
|
return [u, l];
|
|
@@ -1610,7 +1612,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1610
1612
|
const { translateX: p, translateY: _, scale: m, rotate: w } = e();
|
|
1611
1613
|
return { translateX: p, translateY: _, scale: m, rotate: w };
|
|
1612
1614
|
}, [e]), l = g.useCallback(
|
|
1613
|
-
(p, _) =>
|
|
1615
|
+
(p, _) => ut([p, _], e()),
|
|
1614
1616
|
[e]
|
|
1615
1617
|
), d = g.useCallback(
|
|
1616
1618
|
(p, _) => Be([p, _], e()),
|
|
@@ -1618,7 +1620,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1618
1620
|
), f = g.useCallback(
|
|
1619
1621
|
(p, _) => {
|
|
1620
1622
|
const { scale: m, rotate: w } = e();
|
|
1621
|
-
return
|
|
1623
|
+
return ut([p, _], {
|
|
1622
1624
|
translateX: 0,
|
|
1623
1625
|
translateY: 0,
|
|
1624
1626
|
rotate: w,
|
|
@@ -1630,26 +1632,28 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1630
1632
|
(p) => {
|
|
1631
1633
|
const { itemExtent: _, boardWrapperRect: m, boardSize: w } = n(), R = e(), {
|
|
1632
1634
|
translateX: T,
|
|
1633
|
-
translateY:
|
|
1635
|
+
translateY: D,
|
|
1634
1636
|
scale: M,
|
|
1635
1637
|
rotate: A
|
|
1636
1638
|
} = {
|
|
1637
1639
|
...R,
|
|
1638
1640
|
...p(R)
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
|
|
1641
|
+
};
|
|
1642
|
+
nt && console.log("New expected values: ", T, D, M, A);
|
|
1643
|
+
const Y = c(M);
|
|
1644
|
+
let [U, G] = [T, D];
|
|
1645
|
+
(T !== R.translateX || D !== R.translateY) && ([U, G] = wn({
|
|
1642
1646
|
x: T,
|
|
1643
|
-
y:
|
|
1644
|
-
scale:
|
|
1647
|
+
y: D,
|
|
1648
|
+
scale: Y,
|
|
1645
1649
|
rotate: A,
|
|
1646
1650
|
itemExtent: _,
|
|
1647
1651
|
boardWrapperRect: m,
|
|
1648
1652
|
boardSize: w
|
|
1649
|
-
})), t({
|
|
1653
|
+
})), nt && console.log("New fixed values: ", U, G, Y, A), t({
|
|
1650
1654
|
translateX: U,
|
|
1651
|
-
translateY:
|
|
1652
|
-
scale:
|
|
1655
|
+
translateY: G,
|
|
1656
|
+
scale: Y,
|
|
1653
1657
|
rotate: A
|
|
1654
1658
|
});
|
|
1655
1659
|
},
|
|
@@ -1674,18 +1678,18 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1674
1678
|
x: m.left + m.width / 2,
|
|
1675
1679
|
y: m.top + m.height / 2
|
|
1676
1680
|
});
|
|
1677
|
-
const R = e(), T = c(R.scale * _),
|
|
1681
|
+
const R = e(), T = c(R.scale * _), D = w.x - m.left, M = w.y - m.top, A = D - (D - R.translateX) * T / R.scale, Y = M - (M - R.translateY) * T / R.scale;
|
|
1678
1682
|
h((U) => ({
|
|
1679
1683
|
...U,
|
|
1680
1684
|
translateX: A,
|
|
1681
|
-
translateY:
|
|
1685
|
+
translateY: Y,
|
|
1682
1686
|
scale: T
|
|
1683
1687
|
}));
|
|
1684
1688
|
},
|
|
1685
1689
|
[c, e, n, h]
|
|
1686
1690
|
), E = g.useCallback(
|
|
1687
1691
|
({ x: p, y: _, radius: m }) => {
|
|
1688
|
-
const { rotate: w } = e(), { boardWrapperRect: R, boardSize: T } = n(),
|
|
1692
|
+
const { rotate: w } = e(), { boardWrapperRect: R, boardSize: T } = n(), D = R.width / (m * 2), M = R.height / (m * 2), A = c(Math.min(D, M) * En), [Y, U] = Be(
|
|
1689
1693
|
[-T / 2 - p, -T / 2 - _],
|
|
1690
1694
|
{
|
|
1691
1695
|
translateX: R.width / 2,
|
|
@@ -1694,7 +1698,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1694
1698
|
rotate: w
|
|
1695
1699
|
}
|
|
1696
1700
|
);
|
|
1697
|
-
h((
|
|
1701
|
+
h((G) => ({ ...G, translateX: Y, translateY: U, scale: A }));
|
|
1698
1702
|
},
|
|
1699
1703
|
[c, e, n, h]
|
|
1700
1704
|
), O = g.useCallback(() => {
|
|
@@ -1708,13 +1712,13 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1708
1712
|
};
|
|
1709
1713
|
}, [l, n]), y = g.useCallback(() => {
|
|
1710
1714
|
const p = a(), { boardSize: _, uid: m } = n(), w = p.reduce(
|
|
1711
|
-
(T,
|
|
1712
|
-
const M =
|
|
1713
|
-
return M && (T.left = Math.min(
|
|
1714
|
-
|
|
1715
|
+
(T, D) => {
|
|
1716
|
+
const M = Ne(m, D.id);
|
|
1717
|
+
return M && (T.left = Math.min(D.x, T.left), T.top = Math.min(D.y, T.top), T.right = Math.max(
|
|
1718
|
+
D.x + M.offsetWidth,
|
|
1715
1719
|
T.right
|
|
1716
1720
|
), T.bottom = Math.max(
|
|
1717
|
-
|
|
1721
|
+
D.y + M.offsetHeight,
|
|
1718
1722
|
T.bottom
|
|
1719
1723
|
)), T;
|
|
1720
1724
|
},
|
|
@@ -1730,36 +1734,38 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1730
1734
|
};
|
|
1731
1735
|
R.radius = Math.max(
|
|
1732
1736
|
ze([R.x, R.y], [w.left, w.top]),
|
|
1733
|
-
|
|
1737
|
+
bn
|
|
1734
1738
|
), o({ itemExtent: R });
|
|
1735
|
-
}, [n, a, o]),
|
|
1739
|
+
}, [n, a, o]), x = g.useCallback(
|
|
1736
1740
|
(p) => {
|
|
1737
1741
|
let _ = () => p;
|
|
1738
1742
|
typeof p == "function" && (_ = p), h((m) => ({ ...m, rotate: _(m.rotate) })), y(), E(r);
|
|
1739
1743
|
},
|
|
1740
1744
|
[r, h, y, E]
|
|
1741
|
-
),
|
|
1745
|
+
), C = gt(
|
|
1742
1746
|
() => y(),
|
|
1743
1747
|
[y],
|
|
1744
1748
|
200
|
|
1745
1749
|
);
|
|
1746
1750
|
return g.useEffect(() => {
|
|
1747
|
-
window.debugUpdateExtent = () => y(), window.debugDisplayExtent = () => console.log(n().itemExtent)
|
|
1751
|
+
window.debugUpdateExtent = () => y(), window.debugDisplayExtent = () => console.log(n().itemExtent), window.debugSetDebug = () => {
|
|
1752
|
+
nt = !0;
|
|
1753
|
+
};
|
|
1748
1754
|
}, [n, y]), {
|
|
1749
1755
|
setDim: h,
|
|
1750
|
-
rotateBoard:
|
|
1756
|
+
rotateBoard: x,
|
|
1751
1757
|
moveBoard: S,
|
|
1752
1758
|
getDim: u,
|
|
1753
1759
|
zoomTo: v,
|
|
1754
1760
|
zoomToCenter: v,
|
|
1755
1761
|
zoomToExtent: E,
|
|
1756
1762
|
getCenter: O,
|
|
1757
|
-
updateItemExtent:
|
|
1763
|
+
updateItemExtent: C,
|
|
1758
1764
|
vectorFromWrapperToBoard: f,
|
|
1759
1765
|
fromWrapperToBoard: l,
|
|
1760
1766
|
fromBoardToWrapper: d
|
|
1761
1767
|
};
|
|
1762
|
-
},
|
|
1768
|
+
}, Ft = (e) => {
|
|
1763
1769
|
const [t, r, n] = Z(
|
|
1764
1770
|
({ register: a, unregister: u, callInteractions: l }) => [
|
|
1765
1771
|
a,
|
|
@@ -1778,8 +1784,8 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1778
1784
|
[n, e]
|
|
1779
1785
|
);
|
|
1780
1786
|
return { register: o, call: s };
|
|
1781
|
-
},
|
|
1782
|
-
const { call: e } =
|
|
1787
|
+
}, ht = () => {
|
|
1788
|
+
const { call: e } = Ft("place"), { call: t } = Ft("delete"), { getCenter: r, updateItemExtent: n } = Me(), [o, s, a, u] = Z((P) => [
|
|
1783
1789
|
P.clear,
|
|
1784
1790
|
P.reverse,
|
|
1785
1791
|
P.unselect,
|
|
@@ -1798,7 +1804,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1798
1804
|
({
|
|
1799
1805
|
getItems: P,
|
|
1800
1806
|
getItemIds: $,
|
|
1801
|
-
setItemIds:
|
|
1807
|
+
setItemIds: B,
|
|
1802
1808
|
updateItems: V,
|
|
1803
1809
|
moveItems: L,
|
|
1804
1810
|
removeItemsById: F,
|
|
@@ -1808,7 +1814,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1808
1814
|
}) => ({
|
|
1809
1815
|
getItems: P,
|
|
1810
1816
|
getItemIds: $,
|
|
1811
|
-
setItemIds:
|
|
1817
|
+
setItemIds: B,
|
|
1812
1818
|
updateItems: V,
|
|
1813
1819
|
moveItems: L,
|
|
1814
1820
|
removeItemsById: F,
|
|
@@ -1817,61 +1823,61 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1817
1823
|
setItemList: Q
|
|
1818
1824
|
})
|
|
1819
1825
|
), y = g.useCallback(
|
|
1820
|
-
(P, $,
|
|
1826
|
+
(P, $, B = !1) => {
|
|
1821
1827
|
let V = $;
|
|
1822
1828
|
typeof $ == "object" && (V = () => $);
|
|
1823
1829
|
const L = d().filter((Q) => P.includes(Q)), F = l(), H = L.map((Q) => {
|
|
1824
1830
|
const ne = F[Q];
|
|
1825
|
-
return
|
|
1831
|
+
return B ? [Q, V(ne)] : [Q, V({ ...ne })];
|
|
1826
1832
|
}).filter(([, Q]) => Q);
|
|
1827
1833
|
if (H.length === 0)
|
|
1828
1834
|
return;
|
|
1829
1835
|
const te = Object.fromEntries(H);
|
|
1830
|
-
c(te,
|
|
1836
|
+
c(te, B), n();
|
|
1831
1837
|
},
|
|
1832
1838
|
[d, l, n, c]
|
|
1833
|
-
),
|
|
1839
|
+
), x = g.useCallback(
|
|
1834
1840
|
(P) => {
|
|
1835
1841
|
O(P), o(), n();
|
|
1836
1842
|
},
|
|
1837
1843
|
[o, O, n]
|
|
1838
|
-
),
|
|
1839
|
-
(P, $,
|
|
1840
|
-
y([P], $,
|
|
1844
|
+
), C = g.useCallback(
|
|
1845
|
+
(P, $, B = !1) => {
|
|
1846
|
+
y([P], $, B);
|
|
1841
1847
|
},
|
|
1842
1848
|
[y]
|
|
1843
1849
|
), p = g.useCallback(
|
|
1844
1850
|
(P, $) => {
|
|
1845
1851
|
h(
|
|
1846
|
-
|
|
1852
|
+
Nt(l(), d(), P),
|
|
1847
1853
|
$
|
|
1848
1854
|
);
|
|
1849
1855
|
},
|
|
1850
1856
|
[d, l, h]
|
|
1851
1857
|
), _ = g.useCallback(
|
|
1852
1858
|
(P) => {
|
|
1853
|
-
const $ = d(),
|
|
1859
|
+
const $ = d(), B = $.filter((L) => !P.includes(L)), V = $.filter(
|
|
1854
1860
|
(L) => P.includes(L)
|
|
1855
1861
|
);
|
|
1856
|
-
f([...
|
|
1862
|
+
f([...B, ...V]);
|
|
1857
1863
|
},
|
|
1858
1864
|
[d, f]
|
|
1859
1865
|
), m = g.useCallback(
|
|
1860
|
-
(P, { type: $, size:
|
|
1866
|
+
(P, { type: $, size: B } = {}) => {
|
|
1861
1867
|
const { uid: V } = u();
|
|
1862
1868
|
y(
|
|
1863
1869
|
P,
|
|
1864
1870
|
(L) => {
|
|
1865
|
-
const F =
|
|
1871
|
+
const F = Ne(V, L.id);
|
|
1866
1872
|
if (!F)
|
|
1867
1873
|
return;
|
|
1868
1874
|
const H = {
|
|
1869
1875
|
type: $ || "grid",
|
|
1870
|
-
size:
|
|
1876
|
+
size: B || 1,
|
|
1871
1877
|
offset: { x: 0, y: 0 },
|
|
1872
1878
|
...L.grid
|
|
1873
1879
|
};
|
|
1874
|
-
return
|
|
1880
|
+
return cn(
|
|
1875
1881
|
{
|
|
1876
1882
|
x: L.x,
|
|
1877
1883
|
y: L.y,
|
|
@@ -1887,12 +1893,12 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1887
1893
|
[u, y]
|
|
1888
1894
|
), w = g.useCallback(
|
|
1889
1895
|
(P, $) => {
|
|
1890
|
-
const
|
|
1896
|
+
const B = Nt(
|
|
1891
1897
|
l(),
|
|
1892
1898
|
d(),
|
|
1893
1899
|
P
|
|
1894
1900
|
);
|
|
1895
|
-
_(
|
|
1901
|
+
_(B), y(B, { moving: !1 }, !0), m(B, $), e(P), n();
|
|
1896
1902
|
},
|
|
1897
1903
|
[
|
|
1898
1904
|
y,
|
|
@@ -1910,17 +1916,17 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1910
1916
|
[f]
|
|
1911
1917
|
), T = g.useCallback(
|
|
1912
1918
|
(P) => {
|
|
1913
|
-
const $ = d(),
|
|
1919
|
+
const $ = d(), B = $.filter(
|
|
1914
1920
|
(L) => P.includes(L)
|
|
1915
|
-
), V = $.map((L) => P.includes(L) ?
|
|
1921
|
+
), V = $.map((L) => P.includes(L) ? B.pop() : L);
|
|
1916
1922
|
f(V), s();
|
|
1917
1923
|
},
|
|
1918
1924
|
[d, s, f]
|
|
1919
|
-
),
|
|
1925
|
+
), D = g.useCallback(
|
|
1920
1926
|
(P, $) => {
|
|
1921
|
-
const
|
|
1927
|
+
const B = l(), V = Object.fromEntries(
|
|
1922
1928
|
$.map((H, te) => {
|
|
1923
|
-
const Q =
|
|
1929
|
+
const Q = B[P[te]];
|
|
1924
1930
|
return [
|
|
1925
1931
|
H,
|
|
1926
1932
|
{
|
|
@@ -1943,7 +1949,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1943
1949
|
[l, y, d, f]
|
|
1944
1950
|
), M = g.useCallback(
|
|
1945
1951
|
(P, $) => {
|
|
1946
|
-
const
|
|
1952
|
+
const B = r(), V = P.map((L, F) => !L.x || !L.y ? { ...L, x: B.x + 2 * F, y: B.y + 2 * F } : L);
|
|
1947
1953
|
E(V, $), w(P.map(({ id: L }) => L));
|
|
1948
1954
|
},
|
|
1949
1955
|
[r, E, w]
|
|
@@ -1952,7 +1958,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1952
1958
|
M([P], $);
|
|
1953
1959
|
},
|
|
1954
1960
|
[M]
|
|
1955
|
-
),
|
|
1961
|
+
), Y = g.useCallback(
|
|
1956
1962
|
(P) => {
|
|
1957
1963
|
a(P), S(P), t(P);
|
|
1958
1964
|
},
|
|
@@ -1960,11 +1966,11 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1960
1966
|
), U = g.useCallback(
|
|
1961
1967
|
(P) => {
|
|
1962
1968
|
const $ = l();
|
|
1963
|
-
return P.map((
|
|
1969
|
+
return P.map((B) => $[B]);
|
|
1964
1970
|
},
|
|
1965
1971
|
[l]
|
|
1966
|
-
),
|
|
1967
|
-
({ target: P, clientX: $, clientY:
|
|
1972
|
+
), G = g.useCallback(
|
|
1973
|
+
({ target: P, clientX: $, clientY: B }, { returnLocked: V = !1, passLocked: L = !1 } = {}) => {
|
|
1968
1974
|
if (["INPUT", "TEXTAREA"].includes(P.tagName))
|
|
1969
1975
|
return null;
|
|
1970
1976
|
const F = Oe(P, "item");
|
|
@@ -1975,8 +1981,8 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1975
1981
|
return V ? F : null;
|
|
1976
1982
|
if (ye(P, "passthrough")) {
|
|
1977
1983
|
const H = d(), { uid: te } = u(), Q = H.reduce((ne, ie) => {
|
|
1978
|
-
const me =
|
|
1979
|
-
return
|
|
1984
|
+
const me = Ne(te, ie), ge = me.getBoundingClientRect();
|
|
1985
|
+
return dt({ x: $, y: B }, ge) && ne.unshift(me), ne;
|
|
1980
1986
|
}, []);
|
|
1981
1987
|
for (let ne = 0; ne < Q.length; ne += 1) {
|
|
1982
1988
|
const ie = Q[ne];
|
|
@@ -1996,19 +2002,19 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
|
|
|
1996
2002
|
updateItemOrder: R,
|
|
1997
2003
|
moveItems: p,
|
|
1998
2004
|
placeItems: w,
|
|
1999
|
-
updateItem:
|
|
2000
|
-
swapItems:
|
|
2005
|
+
updateItem: C,
|
|
2006
|
+
swapItems: D,
|
|
2001
2007
|
reverseItemsOrder: T,
|
|
2002
|
-
setItemList:
|
|
2008
|
+
setItemList: x,
|
|
2003
2009
|
pushItem: A,
|
|
2004
2010
|
pushItems: M,
|
|
2005
|
-
removeItems:
|
|
2011
|
+
removeItems: Y,
|
|
2006
2012
|
getItemList: v,
|
|
2007
|
-
findElementUnderPointer:
|
|
2013
|
+
findElementUnderPointer: G,
|
|
2008
2014
|
getItems: U
|
|
2009
2015
|
};
|
|
2010
2016
|
};
|
|
2011
|
-
var
|
|
2017
|
+
var xn = function e(t, r) {
|
|
2012
2018
|
if (t === r)
|
|
2013
2019
|
return !0;
|
|
2014
2020
|
if (t && r && typeof t == "object" && typeof r == "object") {
|
|
@@ -2071,18 +2077,18 @@ var wn = function e(t, r) {
|
|
|
2071
2077
|
return t !== t && r !== r;
|
|
2072
2078
|
};
|
|
2073
2079
|
function Cn(e, t, r, n = 0) {
|
|
2074
|
-
Pe(
|
|
2080
|
+
Pe(gt(e, t, r, n), t);
|
|
2075
2081
|
}
|
|
2076
|
-
const
|
|
2082
|
+
const Rn = (e, t) => {
|
|
2077
2083
|
if (e.type in t) {
|
|
2078
2084
|
const r = t[e.type].defaultActions;
|
|
2079
2085
|
return typeof r == "function" ? r(e) : r;
|
|
2080
2086
|
}
|
|
2081
2087
|
return [];
|
|
2082
|
-
},
|
|
2083
|
-
const { actions: r =
|
|
2088
|
+
}, Kt = (e, t) => {
|
|
2089
|
+
const { actions: r = Rn(e, t) } = e;
|
|
2084
2090
|
return r.map((n) => typeof n == "string" ? { name: n } : n);
|
|
2085
|
-
},
|
|
2091
|
+
}, cs = () => {
|
|
2086
2092
|
const [e, t] = oe((c) => [
|
|
2087
2093
|
c.items,
|
|
2088
2094
|
c.getItems
|
|
@@ -2103,17 +2109,17 @@ const xn = (e, t) => {
|
|
|
2103
2109
|
return [S, S.map((v) => h[v])];
|
|
2104
2110
|
},
|
|
2105
2111
|
[t, o]
|
|
2106
|
-
), f =
|
|
2112
|
+
), f = rr(() => {
|
|
2107
2113
|
const [c, h] = d();
|
|
2108
2114
|
if (c.length > 0) {
|
|
2109
2115
|
if (!u.current)
|
|
2110
2116
|
return;
|
|
2111
2117
|
const S = h.reduce((v, E) => {
|
|
2112
|
-
const O =
|
|
2118
|
+
const O = Kt(E, r);
|
|
2113
2119
|
return v.filter(
|
|
2114
|
-
(y) => O.some((
|
|
2120
|
+
(y) => O.some((x) => xn(y, x))
|
|
2115
2121
|
);
|
|
2116
|
-
},
|
|
2122
|
+
}, Kt(h[0], r));
|
|
2117
2123
|
l(() => {
|
|
2118
2124
|
a(S);
|
|
2119
2125
|
});
|
|
@@ -2129,30 +2135,30 @@ const xn = (e, t) => {
|
|
|
2129
2135
|
), {
|
|
2130
2136
|
availableActions: s
|
|
2131
2137
|
};
|
|
2132
|
-
},
|
|
2138
|
+
}, us = () => {
|
|
2133
2139
|
const [e] = Z((t) => [t.selectionBox]);
|
|
2134
2140
|
return e;
|
|
2135
2141
|
};
|
|
2136
2142
|
let pe = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, r) => (r &= 63, r < 36 ? t += r.toString(36) : r < 62 ? t += (r - 26).toString(36).toUpperCase() : r > 62 ? t += "-" : t += "_", t), "");
|
|
2137
|
-
const
|
|
2143
|
+
const fr = g.createContext(), lt = (e) => {
|
|
2138
2144
|
localStorage.setItem("user", JSON.stringify(e));
|
|
2139
|
-
},
|
|
2145
|
+
}, In = () => {
|
|
2140
2146
|
if (localStorage.user) {
|
|
2141
2147
|
const t = {
|
|
2142
2148
|
name: "Player",
|
|
2143
|
-
color:
|
|
2149
|
+
color: Ut(),
|
|
2144
2150
|
uid: pe(),
|
|
2145
2151
|
...JSON.parse(localStorage.user)
|
|
2146
2152
|
};
|
|
2147
|
-
return
|
|
2153
|
+
return lt(t), t;
|
|
2148
2154
|
}
|
|
2149
2155
|
const e = {
|
|
2150
2156
|
name: "Player",
|
|
2151
|
-
color:
|
|
2157
|
+
color: Ut(),
|
|
2152
2158
|
uid: pe()
|
|
2153
2159
|
};
|
|
2154
|
-
return
|
|
2155
|
-
},
|
|
2160
|
+
return lt(e), e;
|
|
2161
|
+
}, On = (e) => (t, r) => ({
|
|
2156
2162
|
isSpaceMaster: !1,
|
|
2157
2163
|
users: {},
|
|
2158
2164
|
getUser: () => r().users[e],
|
|
@@ -2174,7 +2180,7 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2174
2180
|
id: n,
|
|
2175
2181
|
uid: s.users[n].uid
|
|
2176
2182
|
};
|
|
2177
|
-
return a.id === e &&
|
|
2183
|
+
return a.id === e && lt(a), setTimeout(() => r().electSpaceMaster(), 100), {
|
|
2178
2184
|
users: {
|
|
2179
2185
|
...s.users,
|
|
2180
2186
|
[n]: a
|
|
@@ -2197,22 +2203,22 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2197
2203
|
s < o.timestamp && (o.id = a, o.timestamp = s);
|
|
2198
2204
|
}), t({ isSpaceMaster: o.id === e });
|
|
2199
2205
|
}
|
|
2200
|
-
}),
|
|
2206
|
+
}), Tn = (e) => ({
|
|
2201
2207
|
cursors: {},
|
|
2202
2208
|
moveCursor: (t, r) => e((n) => ({ cursors: { ...n.cursors, [t]: r } })),
|
|
2203
2209
|
removeCursor: (t) => e((r) => {
|
|
2204
2210
|
const n = { ...r.cursors };
|
|
2205
2211
|
return delete n[t], { cursors: n };
|
|
2206
2212
|
})
|
|
2207
|
-
}),
|
|
2208
|
-
const { wire: r, isMaster: n } =
|
|
2213
|
+
}), dr = ({ storeName: e, children: t }) => {
|
|
2214
|
+
const { wire: r, isMaster: n } = Xe("room"), [o, s] = g.useState(null), [a, u] = g.useState(!1), l = g.useRef(!1);
|
|
2209
2215
|
return g.useEffect(() => {
|
|
2210
2216
|
let d = !0;
|
|
2211
2217
|
const f = [];
|
|
2212
2218
|
if (!o && !l.current)
|
|
2213
2219
|
return l.current = !0, (() => {
|
|
2214
2220
|
const h = Ue(
|
|
2215
|
-
|
|
2221
|
+
pt(
|
|
2216
2222
|
{
|
|
2217
2223
|
wire: r,
|
|
2218
2224
|
storeName: e,
|
|
@@ -2224,8 +2230,8 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2224
2230
|
]
|
|
2225
2231
|
},
|
|
2226
2232
|
(...v) => ({
|
|
2227
|
-
...
|
|
2228
|
-
...
|
|
2233
|
+
...On(r.userId)(...v),
|
|
2234
|
+
...Tn(...v)
|
|
2229
2235
|
})
|
|
2230
2236
|
)
|
|
2231
2237
|
), S = h.subscribe((v) => {
|
|
@@ -2237,7 +2243,7 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2237
2243
|
}, [o, e, r, r.userId]), g.useEffect(() => {
|
|
2238
2244
|
if (o)
|
|
2239
2245
|
return o.getState().addUser({
|
|
2240
|
-
...
|
|
2246
|
+
...In(),
|
|
2241
2247
|
id: r.userId
|
|
2242
2248
|
}), u(!0), () => {
|
|
2243
2249
|
o.getState().removeUser(r.userId);
|
|
@@ -2253,11 +2259,11 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2253
2259
|
}
|
|
2254
2260
|
}, [n, o, r]), g.useEffect(() => {
|
|
2255
2261
|
n && o && o.getState().updateCurrentUser({ isMaster: n });
|
|
2256
|
-
}, [n, o, r]), a ? /* @__PURE__ */ k(
|
|
2262
|
+
}, [n, o, r]), a ? /* @__PURE__ */ k(fr.Provider, { value: o, children: t }) : null;
|
|
2257
2263
|
}, Se = (e, t) => {
|
|
2258
|
-
const r = _e(
|
|
2264
|
+
const r = _e(fr);
|
|
2259
2265
|
return We(r, e, t || Ve);
|
|
2260
|
-
},
|
|
2266
|
+
}, ls = () => {
|
|
2261
2267
|
const [e, t, r, n, o] = Se((u) => [
|
|
2262
2268
|
u.isSpaceMaster,
|
|
2263
2269
|
u.getUser(),
|
|
@@ -2276,7 +2282,7 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2276
2282
|
localUsers: a,
|
|
2277
2283
|
joinSpace: o
|
|
2278
2284
|
};
|
|
2279
|
-
},
|
|
2285
|
+
}, fs = () => {
|
|
2280
2286
|
const [e, t, r] = oe(
|
|
2281
2287
|
(o) => [o.boardConfig, o.getBoardConfig, o.setBoardConfig]
|
|
2282
2288
|
), n = g.useCallback(
|
|
@@ -2289,10 +2295,10 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2289
2295
|
[t, r]
|
|
2290
2296
|
);
|
|
2291
2297
|
return [e, n];
|
|
2292
|
-
},
|
|
2298
|
+
}, ds = () => {
|
|
2293
2299
|
const [e] = Z((t) => [t.boardState]);
|
|
2294
2300
|
return e;
|
|
2295
|
-
},
|
|
2301
|
+
}, ps = () => {
|
|
2296
2302
|
const [e, t, r, n] = oe((o) => [
|
|
2297
2303
|
o.getSessionInfo,
|
|
2298
2304
|
o.setSessionInfo,
|
|
@@ -2300,13 +2306,13 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2300
2306
|
o.session
|
|
2301
2307
|
]);
|
|
2302
2308
|
return { getSessionInfo: e, setSessionInfo: t, sessionInfo: n, updateSessionInfo: r };
|
|
2303
|
-
},
|
|
2309
|
+
}, pr = g.createContext(), kn = ({ user: { name: e, uid: t, color: r }, content: n }) => ({
|
|
2304
2310
|
type: "message",
|
|
2305
2311
|
user: { name: e, uid: t, color: r },
|
|
2306
2312
|
content: n,
|
|
2307
2313
|
uid: pe(),
|
|
2308
2314
|
timestamp: new Date().toISOString()
|
|
2309
|
-
}),
|
|
2315
|
+
}), Pn = (e, t) => ({
|
|
2310
2316
|
messages: [],
|
|
2311
2317
|
setMessages: (r) => e({
|
|
2312
2318
|
messages: r.map((n) => ({
|
|
@@ -2321,34 +2327,34 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2321
2327
|
]
|
|
2322
2328
|
})),
|
|
2323
2329
|
sendMessage: (r, n) => {
|
|
2324
|
-
const o =
|
|
2330
|
+
const o = kn({
|
|
2325
2331
|
user: r,
|
|
2326
2332
|
content: n
|
|
2327
2333
|
});
|
|
2328
2334
|
o && t().addMessage(o);
|
|
2329
2335
|
}
|
|
2330
|
-
}),
|
|
2336
|
+
}), Ht = ({
|
|
2331
2337
|
storeName: e,
|
|
2332
2338
|
children: t,
|
|
2333
2339
|
defaultValue: r = []
|
|
2334
2340
|
}) => {
|
|
2335
|
-
const { wire: n } =
|
|
2341
|
+
const { wire: n } = Xe("room"), [o] = g.useState(
|
|
2336
2342
|
() => Ue(
|
|
2337
|
-
|
|
2343
|
+
pt(
|
|
2338
2344
|
{ wire: n, storeName: e, defaultValue: r, noSync: ["sendMessage"] },
|
|
2339
2345
|
(...s) => ({
|
|
2340
|
-
...
|
|
2346
|
+
...Pn(...s)
|
|
2341
2347
|
})
|
|
2342
2348
|
)
|
|
2343
2349
|
)
|
|
2344
2350
|
);
|
|
2345
|
-
return /* @__PURE__ */ k(
|
|
2346
|
-
},
|
|
2347
|
-
const r = _e(
|
|
2351
|
+
return /* @__PURE__ */ k(pr.Provider, { value: o, children: t });
|
|
2352
|
+
}, Mn = (e, t) => {
|
|
2353
|
+
const r = _e(pr);
|
|
2348
2354
|
return We(r, e, t || Ve);
|
|
2349
|
-
},
|
|
2350
|
-
},
|
|
2351
|
-
const t = Se((a) => a.getUser()), [r, n, o] =
|
|
2355
|
+
}, Dn = () => {
|
|
2356
|
+
}, ms = (e = Dn) => {
|
|
2357
|
+
const t = Se((a) => a.getUser()), [r, n, o] = Mn((a) => [
|
|
2352
2358
|
a.messages,
|
|
2353
2359
|
a.setMessages,
|
|
2354
2360
|
a.sendMessage
|
|
@@ -2363,12 +2369,12 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2363
2369
|
[t, o]
|
|
2364
2370
|
);
|
|
2365
2371
|
return { messages: r, setMessages: n, sendMessage: s };
|
|
2366
|
-
},
|
|
2372
|
+
}, qt = ({ children: e, session: t }) => {
|
|
2367
2373
|
const r = Se((n) => n.joinSpace);
|
|
2368
2374
|
return g.useEffect(() => (r(t), () => {
|
|
2369
2375
|
r(null);
|
|
2370
2376
|
}), [r, t]), e;
|
|
2371
|
-
},
|
|
2377
|
+
}, gs = ({
|
|
2372
2378
|
socket: e,
|
|
2373
2379
|
room: t,
|
|
2374
2380
|
session: r,
|
|
@@ -2381,74 +2387,74 @@ const lr = g.createContext(), ut = (e) => {
|
|
|
2381
2387
|
itemIds: n.map(({ id: c }) => c),
|
|
2382
2388
|
items: Object.fromEntries(n.map((c) => [c.id, c]))
|
|
2383
2389
|
}));
|
|
2384
|
-
return
|
|
2385
|
-
|
|
2390
|
+
return Xe("room") ? /* @__PURE__ */ k(
|
|
2391
|
+
Ht,
|
|
2386
2392
|
{
|
|
2387
2393
|
storeName: `${l}_messages`,
|
|
2388
2394
|
defaultValue: o,
|
|
2389
|
-
children: /* @__PURE__ */ k(
|
|
2390
|
-
|
|
2395
|
+
children: /* @__PURE__ */ k(Vt, { children: /* @__PURE__ */ k(
|
|
2396
|
+
Wt,
|
|
2391
2397
|
{
|
|
2392
2398
|
storeName: `${l}_item`,
|
|
2393
2399
|
defaultValue: d,
|
|
2394
|
-
children: /* @__PURE__ */ k(
|
|
2400
|
+
children: /* @__PURE__ */ k(qt, { ...a, session: l })
|
|
2395
2401
|
}
|
|
2396
2402
|
) })
|
|
2397
2403
|
}
|
|
2398
2404
|
) : /* @__PURE__ */ k(
|
|
2399
|
-
|
|
2405
|
+
or,
|
|
2400
2406
|
{
|
|
2401
2407
|
room: u,
|
|
2402
2408
|
channel: "room",
|
|
2403
2409
|
socket: e,
|
|
2404
2410
|
LoadingComponent: s,
|
|
2405
|
-
children: /* @__PURE__ */ k(
|
|
2406
|
-
|
|
2411
|
+
children: /* @__PURE__ */ k(dr, { storeName: `${u}_users`, children: /* @__PURE__ */ k(
|
|
2412
|
+
Ht,
|
|
2407
2413
|
{
|
|
2408
2414
|
storeName: `${l}_messages`,
|
|
2409
2415
|
defaultValue: o,
|
|
2410
|
-
children: /* @__PURE__ */ k(
|
|
2411
|
-
|
|
2416
|
+
children: /* @__PURE__ */ k(Vt, { children: /* @__PURE__ */ k(
|
|
2417
|
+
Wt,
|
|
2412
2418
|
{
|
|
2413
2419
|
storeName: `${l}_item`,
|
|
2414
2420
|
defaultValue: d,
|
|
2415
|
-
children: /* @__PURE__ */ k(
|
|
2421
|
+
children: /* @__PURE__ */ k(qt, { ...a, session: l })
|
|
2416
2422
|
}
|
|
2417
2423
|
) })
|
|
2418
2424
|
}
|
|
2419
2425
|
) })
|
|
2420
2426
|
}
|
|
2421
2427
|
);
|
|
2422
|
-
},
|
|
2428
|
+
}, hs = ({ socket: e, room: t, children: r, LoadingComponent: n }) => {
|
|
2423
2429
|
const [o] = g.useState(t || pe());
|
|
2424
2430
|
return /* @__PURE__ */ k(
|
|
2425
|
-
|
|
2431
|
+
or,
|
|
2426
2432
|
{
|
|
2427
2433
|
room: o,
|
|
2428
2434
|
channel: "room",
|
|
2429
2435
|
socket: e,
|
|
2430
2436
|
LoadingComponent: n,
|
|
2431
|
-
children: /* @__PURE__ */ k(
|
|
2437
|
+
children: /* @__PURE__ */ k(dr, { storeName: `${o}_users`, children: r })
|
|
2432
2438
|
}
|
|
2433
2439
|
);
|
|
2434
2440
|
};
|
|
2435
|
-
let jn = { data: "" },
|
|
2441
|
+
let jn = { data: "" }, $n = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || jn, An = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, Ln = /\/\*[^]*?\*\/| +/g, Gt = /\n+/g, fe = (e, t) => {
|
|
2436
2442
|
let r = "", n = "", o = "";
|
|
2437
2443
|
for (let s in e) {
|
|
2438
2444
|
let a = e[s];
|
|
2439
2445
|
s[0] == "@" ? s[1] == "i" ? r = s + " " + a + ";" : n += s[1] == "f" ? fe(a, s) : s + "{" + fe(a, s[1] == "k" ? "" : t) + "}" : typeof a == "object" ? n += fe(a, t ? t.replace(/([^,])+/g, (u) => s.replace(/(^:.*)|([^,])+/g, (l) => /&/.test(l) ? l.replace(/&/g, u) : u ? u + " " + l : l)) : s) : a != null && (s = /^--/.test(s) ? s : s.replace(/[A-Z]/g, "-$&").toLowerCase(), o += fe.p ? fe.p(s, a) : s + ":" + a + ";");
|
|
2440
2446
|
}
|
|
2441
2447
|
return r + (t && o ? t + "{" + o + "}" : o) + n;
|
|
2442
|
-
}, ce = {},
|
|
2448
|
+
}, ce = {}, mr = (e) => {
|
|
2443
2449
|
if (typeof e == "object") {
|
|
2444
2450
|
let t = "";
|
|
2445
2451
|
for (let r in e)
|
|
2446
|
-
t += r +
|
|
2452
|
+
t += r + mr(e[r]);
|
|
2447
2453
|
return t;
|
|
2448
2454
|
}
|
|
2449
2455
|
return e;
|
|
2450
|
-
},
|
|
2451
|
-
let s =
|
|
2456
|
+
}, zn = (e, t, r, n, o) => {
|
|
2457
|
+
let s = mr(e), a = ce[s] || (ce[s] = ((l) => {
|
|
2452
2458
|
let d = 0, f = 11;
|
|
2453
2459
|
for (; d < l.length; )
|
|
2454
2460
|
f = 101 * f + l.charCodeAt(d++) >>> 0;
|
|
@@ -2457,8 +2463,8 @@ let jn = { data: "" }, Dn = (e) => typeof window == "object" ? ((e ? e.querySele
|
|
|
2457
2463
|
if (!ce[a]) {
|
|
2458
2464
|
let l = s !== e ? e : ((d) => {
|
|
2459
2465
|
let f, c, h = [{}];
|
|
2460
|
-
for (; f =
|
|
2461
|
-
f[4] ? h.shift() : f[3] ? (c = f[3].replace(
|
|
2466
|
+
for (; f = An.exec(d.replace(Ln, "")); )
|
|
2467
|
+
f[4] ? h.shift() : f[3] ? (c = f[3].replace(Gt, " ").trim(), h.unshift(h[0][c] = h[0][c] || {})) : h[0][f[1]] = f[2].replace(Gt, " ").trim();
|
|
2462
2468
|
return h[0];
|
|
2463
2469
|
})(e);
|
|
2464
2470
|
ce[a] = fe(o ? { ["@keyframes " + a]: l } : l, r ? "" : "." + a);
|
|
@@ -2467,7 +2473,7 @@ let jn = { data: "" }, Dn = (e) => typeof window == "object" ? ((e ? e.querySele
|
|
|
2467
2473
|
return r && (ce.g = ce[a]), ((l, d, f, c) => {
|
|
2468
2474
|
c ? d.data = d.data.replace(c, l) : d.data.indexOf(l) === -1 && (d.data = f ? l + d.data : d.data + l);
|
|
2469
2475
|
})(ce[a], t, n, u), a;
|
|
2470
|
-
},
|
|
2476
|
+
}, Yn = (e, t, r) => e.reduce((n, o, s) => {
|
|
2471
2477
|
let a = t[s];
|
|
2472
2478
|
if (a && a.call) {
|
|
2473
2479
|
let u = a(r), l = u && u.props && u.props.className || /^go/.test(u) && u;
|
|
@@ -2477,14 +2483,14 @@ let jn = { data: "" }, Dn = (e) => typeof window == "object" ? ((e ? e.querySele
|
|
|
2477
2483
|
}, "");
|
|
2478
2484
|
function K(e) {
|
|
2479
2485
|
let t = this || {}, r = e.call ? e(t.p) : e;
|
|
2480
|
-
return
|
|
2486
|
+
return zn(r.unshift ? r.raw ? Yn(r, [].slice.call(arguments, 1), t.p) : r.reduce((n, o) => Object.assign(n, o && o.call ? o(t.p) : o), {}) : r, $n(t.target), t.g, t.o, t.k);
|
|
2481
2487
|
}
|
|
2482
2488
|
K.bind({ g: 1 });
|
|
2483
2489
|
K.bind({ k: 1 });
|
|
2484
|
-
function
|
|
2490
|
+
function Bn(e, t, r, n) {
|
|
2485
2491
|
fe.p = t;
|
|
2486
2492
|
}
|
|
2487
|
-
var
|
|
2493
|
+
var Nn = function e(t, r) {
|
|
2488
2494
|
if (t === r)
|
|
2489
2495
|
return !0;
|
|
2490
2496
|
if (t && r && typeof t == "object" && typeof r == "object") {
|
|
@@ -2519,7 +2525,7 @@ var Bn = function e(t, r) {
|
|
|
2519
2525
|
}
|
|
2520
2526
|
return t !== t && r !== r;
|
|
2521
2527
|
};
|
|
2522
|
-
const
|
|
2528
|
+
const ot = () => {
|
|
2523
2529
|
const e = navigator.userAgent.toLowerCase();
|
|
2524
2530
|
return /mac os ?x 10/.test(e);
|
|
2525
2531
|
}, Xn = () => {
|
|
@@ -2531,34 +2537,34 @@ const nt = () => {
|
|
|
2531
2537
|
), t.close();
|
|
2532
2538
|
const r = t.body.firstElementChild.offsetHeight;
|
|
2533
2539
|
return document.body.removeChild(e), r;
|
|
2534
|
-
},
|
|
2540
|
+
}, Un = Xn(), Wn = 800, Jt = (e, t) => {
|
|
2535
2541
|
const r = Object.keys(e).map((n) => Number(n)).find((n) => n !== t);
|
|
2536
2542
|
return e[r];
|
|
2537
|
-
},
|
|
2543
|
+
}, Zt = ([e, t], [r, n]) => {
|
|
2538
2544
|
const o = Math.abs(e - r), s = Math.abs(t - n);
|
|
2539
2545
|
return Math.hypot(o, s);
|
|
2540
2546
|
}, de = () => {
|
|
2541
|
-
},
|
|
2547
|
+
}, Vn = (e) => (t) => {
|
|
2542
2548
|
const { event: r } = t;
|
|
2543
2549
|
return r.isPropagationStopped() ? null : e(t);
|
|
2544
|
-
},
|
|
2550
|
+
}, Fn = (e) => async (...t) => {
|
|
2545
2551
|
try {
|
|
2546
2552
|
await e(...t);
|
|
2547
2553
|
} catch (r) {
|
|
2548
2554
|
console.error(r);
|
|
2549
2555
|
}
|
|
2550
2556
|
};
|
|
2551
|
-
class
|
|
2557
|
+
class Kn {
|
|
2552
2558
|
constructor() {
|
|
2553
|
-
|
|
2559
|
+
Pt(this, "lastPromise", Promise.resolve(!0));
|
|
2554
2560
|
}
|
|
2555
2561
|
add(t, ...r) {
|
|
2556
2562
|
return new Promise((n, o) => {
|
|
2557
|
-
this.lastPromise = this.lastPromise.then(() =>
|
|
2563
|
+
this.lastPromise = this.lastPromise.then(() => Vn(Fn(t))(...r)).then(n).catch(o);
|
|
2558
2564
|
});
|
|
2559
2565
|
}
|
|
2560
2566
|
}
|
|
2561
|
-
const se = new
|
|
2567
|
+
const se = new Kn(), Fe = ({
|
|
2562
2568
|
children: e,
|
|
2563
2569
|
onDrag: t = de,
|
|
2564
2570
|
onDragStart: r = de,
|
|
@@ -2576,60 +2582,60 @@ const se = new Fn(), Fe = ({
|
|
|
2576
2582
|
mainPointer: void 0
|
|
2577
2583
|
}), h = (y) => {
|
|
2578
2584
|
const {
|
|
2579
|
-
deltaX:
|
|
2580
|
-
deltaY:
|
|
2585
|
+
deltaX: x,
|
|
2586
|
+
deltaY: C,
|
|
2581
2587
|
clientX: p,
|
|
2582
2588
|
clientY: _,
|
|
2583
2589
|
deltaMode: m,
|
|
2584
2590
|
ctrlKey: w,
|
|
2585
2591
|
altKey: R,
|
|
2586
2592
|
metaKey: T,
|
|
2587
|
-
target:
|
|
2593
|
+
target: D
|
|
2588
2594
|
} = y;
|
|
2589
|
-
if (!(R || w && !
|
|
2590
|
-
if (
|
|
2595
|
+
if (!(R || w && !ot()))
|
|
2596
|
+
if (ot() && !w)
|
|
2591
2597
|
se.add(o, {
|
|
2592
|
-
deltaX: -2 *
|
|
2593
|
-
deltaY: -2 *
|
|
2598
|
+
deltaX: -2 * x,
|
|
2599
|
+
deltaY: -2 * C,
|
|
2594
2600
|
button: 1,
|
|
2595
2601
|
ctrlKey: w,
|
|
2596
2602
|
metaKey: T,
|
|
2597
|
-
target:
|
|
2603
|
+
target: D,
|
|
2598
2604
|
event: y
|
|
2599
2605
|
});
|
|
2600
2606
|
else {
|
|
2601
|
-
if (l === void 0 || !
|
|
2607
|
+
if (l === void 0 || !C)
|
|
2602
2608
|
return;
|
|
2603
|
-
let M =
|
|
2609
|
+
let M = C;
|
|
2604
2610
|
switch (m) {
|
|
2605
2611
|
case 1:
|
|
2606
|
-
M *=
|
|
2612
|
+
M *= Un;
|
|
2607
2613
|
break;
|
|
2608
2614
|
case 2:
|
|
2609
|
-
M *=
|
|
2615
|
+
M *= Wn;
|
|
2610
2616
|
break;
|
|
2611
2617
|
}
|
|
2612
|
-
|
|
2618
|
+
ot() && (M *= 2), se.add(l, { scale: M, clientX: p, clientY: _, event: y });
|
|
2613
2619
|
}
|
|
2614
2620
|
}, S = (y) => {
|
|
2615
2621
|
const {
|
|
2616
|
-
target:
|
|
2617
|
-
button:
|
|
2622
|
+
target: x,
|
|
2623
|
+
button: C,
|
|
2618
2624
|
clientX: p,
|
|
2619
2625
|
clientY: _,
|
|
2620
2626
|
pointerId: m,
|
|
2621
2627
|
altKey: w,
|
|
2622
2628
|
ctrlKey: R,
|
|
2623
2629
|
metaKey: T,
|
|
2624
|
-
isPrimary:
|
|
2630
|
+
isPrimary: D
|
|
2625
2631
|
} = y;
|
|
2626
|
-
if (c.current.pointers[m] = { clientX: p, clientY: _ },
|
|
2632
|
+
if (c.current.pointers[m] = { clientX: p, clientY: _ }, D && (c.current.mainPointer = void 0), c.current.mainPointer !== void 0) {
|
|
2627
2633
|
if (c.current.mainPointer !== m)
|
|
2628
2634
|
try {
|
|
2629
|
-
const { clientX: M, clientY: A } =
|
|
2635
|
+
const { clientX: M, clientY: A } = Jt(
|
|
2630
2636
|
c.current.pointers,
|
|
2631
2637
|
m
|
|
2632
|
-
),
|
|
2638
|
+
), Y = (M + p) / 2, U = (A + _) / 2, G = Zt(
|
|
2633
2639
|
[M, A],
|
|
2634
2640
|
[p, _]
|
|
2635
2641
|
);
|
|
@@ -2639,10 +2645,10 @@ const se = new Fn(), Fe = ({
|
|
|
2639
2645
|
gestureStart: !1,
|
|
2640
2646
|
startX: p,
|
|
2641
2647
|
startY: _,
|
|
2642
|
-
prevX:
|
|
2648
|
+
prevX: Y,
|
|
2643
2649
|
prevY: U,
|
|
2644
|
-
startDistance:
|
|
2645
|
-
prevDistance:
|
|
2650
|
+
startDistance: G,
|
|
2651
|
+
prevDistance: G
|
|
2646
2652
|
});
|
|
2647
2653
|
} catch (M) {
|
|
2648
2654
|
console.log("Error while getting other pointer. Ignoring", M), c.current.mainPointer;
|
|
@@ -2657,11 +2663,11 @@ const se = new Fn(), Fe = ({
|
|
|
2657
2663
|
startY: _,
|
|
2658
2664
|
prevX: p,
|
|
2659
2665
|
prevY: _,
|
|
2660
|
-
currentButton:
|
|
2666
|
+
currentButton: C,
|
|
2661
2667
|
pointerDownEvent: y,
|
|
2662
2668
|
startDistance: 0,
|
|
2663
2669
|
prevDistance: 0,
|
|
2664
|
-
target:
|
|
2670
|
+
target: x,
|
|
2665
2671
|
timeStart: Date.now(),
|
|
2666
2672
|
longTapTimeout: setTimeout(async () => {
|
|
2667
2673
|
c.current.noTap = !0, se.add(a, {
|
|
@@ -2670,21 +2676,21 @@ const se = new Fn(), Fe = ({
|
|
|
2670
2676
|
altKey: w,
|
|
2671
2677
|
ctrlKey: R,
|
|
2672
2678
|
metaKey: T,
|
|
2673
|
-
target:
|
|
2679
|
+
target: x,
|
|
2674
2680
|
event: y
|
|
2675
2681
|
});
|
|
2676
2682
|
}, 750)
|
|
2677
2683
|
});
|
|
2678
2684
|
try {
|
|
2679
|
-
|
|
2685
|
+
x.setPointerCapture(m);
|
|
2680
2686
|
} catch (M) {
|
|
2681
2687
|
console.log("Fail to capture pointer", M);
|
|
2682
2688
|
}
|
|
2683
2689
|
}, v = (y) => {
|
|
2684
2690
|
if (c.current.pressed) {
|
|
2685
2691
|
const {
|
|
2686
|
-
pointerId:
|
|
2687
|
-
clientX:
|
|
2692
|
+
pointerId: x,
|
|
2693
|
+
clientX: C,
|
|
2688
2694
|
clientY: p,
|
|
2689
2695
|
altKey: _,
|
|
2690
2696
|
shiftKey: m,
|
|
@@ -2692,27 +2698,27 @@ const se = new Fn(), Fe = ({
|
|
|
2692
2698
|
metaKey: R,
|
|
2693
2699
|
buttons: T
|
|
2694
2700
|
} = y;
|
|
2695
|
-
c.current.pointers[
|
|
2696
|
-
clientX:
|
|
2701
|
+
c.current.pointers[x] = {
|
|
2702
|
+
clientX: C,
|
|
2697
2703
|
clientY: p
|
|
2698
2704
|
}, c.current.moving = !0;
|
|
2699
|
-
const
|
|
2700
|
-
let M, A,
|
|
2701
|
-
if (
|
|
2702
|
-
const { clientX: $, clientY:
|
|
2705
|
+
const D = Object.keys(c.current.pointers).length === 2;
|
|
2706
|
+
let M, A, Y = 0;
|
|
2707
|
+
if (D) {
|
|
2708
|
+
const { clientX: $, clientY: B } = Jt(
|
|
2703
2709
|
c.current.pointers,
|
|
2704
|
-
|
|
2710
|
+
x
|
|
2705
2711
|
);
|
|
2706
|
-
M = ($ +
|
|
2707
|
-
[$,
|
|
2708
|
-
[
|
|
2712
|
+
M = ($ + C) / 2, A = (B + p) / 2, Y = Zt(
|
|
2713
|
+
[$, B],
|
|
2714
|
+
[C, p]
|
|
2709
2715
|
);
|
|
2710
2716
|
} else
|
|
2711
|
-
M =
|
|
2717
|
+
M = C, A = p;
|
|
2712
2718
|
let U = m || _ || w || R || T !== 1;
|
|
2713
2719
|
d !== "drag" && (U = !U);
|
|
2714
|
-
const
|
|
2715
|
-
if (
|
|
2720
|
+
const G = !U, P = U;
|
|
2721
|
+
if (G) {
|
|
2716
2722
|
c.current.gestureStart || (f.current.style.cursor = "move", c.current.gestureStart = !0, clearTimeout(c.current.longTapTimeout), se.add(r, {
|
|
2717
2723
|
deltaX: 0,
|
|
2718
2724
|
deltaY: 0,
|
|
@@ -2730,10 +2736,10 @@ const se = new Fn(), Fe = ({
|
|
|
2730
2736
|
target: c.current.target,
|
|
2731
2737
|
event: c.current.pointerDownEvent
|
|
2732
2738
|
}));
|
|
2733
|
-
const $ = M - c.current.prevX,
|
|
2739
|
+
const $ = M - c.current.prevX, B = A - c.current.prevY, V = M - c.current.startX, L = A - c.current.startY;
|
|
2734
2740
|
se.add(t, {
|
|
2735
2741
|
deltaX: $,
|
|
2736
|
-
deltaY:
|
|
2742
|
+
deltaY: B,
|
|
2737
2743
|
startX: c.current.startX,
|
|
2738
2744
|
startY: c.current.startY,
|
|
2739
2745
|
clientX: M,
|
|
@@ -2751,10 +2757,10 @@ const se = new Fn(), Fe = ({
|
|
|
2751
2757
|
}
|
|
2752
2758
|
if (P) {
|
|
2753
2759
|
c.current.gestureStart || (f.current.style.cursor = "move", c.current.gestureStart = !0, clearTimeout(c.current.longTapTimeout));
|
|
2754
|
-
const $ = M - c.current.prevX,
|
|
2760
|
+
const $ = M - c.current.prevX, B = A - c.current.prevY, { target: V } = c.current;
|
|
2755
2761
|
if (se.add(o, {
|
|
2756
2762
|
deltaX: $,
|
|
2757
|
-
deltaY:
|
|
2763
|
+
deltaY: B,
|
|
2758
2764
|
button: c.current.currentButton,
|
|
2759
2765
|
altKey: _,
|
|
2760
2766
|
shiftKey: m,
|
|
@@ -2762,22 +2768,22 @@ const se = new Fn(), Fe = ({
|
|
|
2762
2768
|
metaKey: R,
|
|
2763
2769
|
target: V,
|
|
2764
2770
|
event: y
|
|
2765
|
-
}),
|
|
2766
|
-
const L = c.current.prevDistance -
|
|
2771
|
+
}), Y !== c.current.prevDistance && l) {
|
|
2772
|
+
const L = c.current.prevDistance - Y;
|
|
2767
2773
|
Math.abs(L) > 0 && (se.add(l, {
|
|
2768
2774
|
scale: L * 3,
|
|
2769
2775
|
clientX: M,
|
|
2770
2776
|
clientY: A,
|
|
2771
2777
|
event: y
|
|
2772
|
-
}), c.current.prevDistance =
|
|
2778
|
+
}), c.current.prevDistance = Y);
|
|
2773
2779
|
}
|
|
2774
2780
|
}
|
|
2775
2781
|
c.current.prevX = M, c.current.prevY = A;
|
|
2776
2782
|
}
|
|
2777
2783
|
}, E = (y) => {
|
|
2778
2784
|
const {
|
|
2779
|
-
clientX:
|
|
2780
|
-
clientY:
|
|
2785
|
+
clientX: x,
|
|
2786
|
+
clientY: C,
|
|
2781
2787
|
altKey: p,
|
|
2782
2788
|
shiftKey: _,
|
|
2783
2789
|
ctrlKey: m,
|
|
@@ -2787,9 +2793,9 @@ const se = new Fn(), Fe = ({
|
|
|
2787
2793
|
} = y;
|
|
2788
2794
|
if (c.current.pointers[T]) {
|
|
2789
2795
|
if (delete c.current.pointers[T], c.current.mainPointer !== T) {
|
|
2790
|
-
const { clientX:
|
|
2796
|
+
const { clientX: D, clientY: M } = c.current.pointers[c.current.mainPointer];
|
|
2791
2797
|
Object.assign(c.current, {
|
|
2792
|
-
prevX:
|
|
2798
|
+
prevX: D,
|
|
2793
2799
|
prevY: M,
|
|
2794
2800
|
prevDistance: 0,
|
|
2795
2801
|
startDistance: 0
|
|
@@ -2802,28 +2808,28 @@ const se = new Fn(), Fe = ({
|
|
|
2802
2808
|
);
|
|
2803
2809
|
try {
|
|
2804
2810
|
c.current.target.setPointerCapture(c.current.mainPointer);
|
|
2805
|
-
const { clientX:
|
|
2811
|
+
const { clientX: D, clientY: M } = c.current.pointers[c.current.mainPointer];
|
|
2806
2812
|
Object.assign(c.current, {
|
|
2807
|
-
prevX:
|
|
2813
|
+
prevX: D,
|
|
2808
2814
|
prevY: M,
|
|
2809
2815
|
prevDistance: 0,
|
|
2810
2816
|
startDistance: 0
|
|
2811
2817
|
});
|
|
2812
2818
|
return;
|
|
2813
|
-
} catch (
|
|
2814
|
-
console.log("Fails to set pointer capture",
|
|
2819
|
+
} catch (D) {
|
|
2820
|
+
console.log("Fails to set pointer capture", D), c.current.mainPointer = void 0, delete c.current.pointers[Object.keys(c.current.pointers)[0]];
|
|
2815
2821
|
}
|
|
2816
2822
|
}
|
|
2817
2823
|
if (c.current.mainPointer = void 0, c.current.pressed = !1, clearTimeout(c.current.longTapTimeout), c.current.moving)
|
|
2818
2824
|
c.current.moving = !1, se.add(n, {
|
|
2819
|
-
deltaX:
|
|
2820
|
-
deltaY:
|
|
2825
|
+
deltaX: x - c.current.prevX,
|
|
2826
|
+
deltaY: C - c.current.prevY,
|
|
2821
2827
|
startX: c.current.startX,
|
|
2822
2828
|
startY: c.current.startY,
|
|
2823
|
-
clientX:
|
|
2824
|
-
clientY:
|
|
2825
|
-
distanceX:
|
|
2826
|
-
distanceY:
|
|
2829
|
+
clientX: x,
|
|
2830
|
+
clientY: C,
|
|
2831
|
+
distanceX: x - c.current.startX,
|
|
2832
|
+
distanceY: C - c.current.startY,
|
|
2827
2833
|
button: c.current.currentButton,
|
|
2828
2834
|
altKey: p,
|
|
2829
2835
|
shiftKey: _,
|
|
@@ -2832,10 +2838,10 @@ const se = new Fn(), Fe = ({
|
|
|
2832
2838
|
event: y
|
|
2833
2839
|
}), f.current.style.cursor = "auto";
|
|
2834
2840
|
else {
|
|
2835
|
-
const
|
|
2836
|
-
c.current.noTap ? c.current.noTap = !1 : c.current.timeStart -
|
|
2837
|
-
clientX:
|
|
2838
|
-
clientY:
|
|
2841
|
+
const D = Date.now();
|
|
2842
|
+
c.current.noTap ? c.current.noTap = !1 : c.current.timeStart - D < 300 && se.add(s, {
|
|
2843
|
+
clientX: x,
|
|
2844
|
+
clientY: C,
|
|
2839
2845
|
altKey: p,
|
|
2840
2846
|
shiftKey: _,
|
|
2841
2847
|
ctrlKey: m,
|
|
@@ -2857,10 +2863,10 @@ const se = new Fn(), Fe = ({
|
|
|
2857
2863
|
onPointerLeave: E,
|
|
2858
2864
|
onPointerCancel: E,
|
|
2859
2865
|
onDoubleClick: (y) => {
|
|
2860
|
-
const { clientX:
|
|
2866
|
+
const { clientX: x, clientY: C, altKey: p, shiftKey: _, ctrlKey: m, metaKey: w, target: R } = y;
|
|
2861
2867
|
se.add(u, {
|
|
2862
|
-
clientX:
|
|
2863
|
-
clientY:
|
|
2868
|
+
clientX: x,
|
|
2869
|
+
clientY: C,
|
|
2864
2870
|
altKey: p,
|
|
2865
2871
|
shiftKey: _,
|
|
2866
2872
|
ctrlKey: m,
|
|
@@ -2874,7 +2880,7 @@ const se = new Fn(), Fe = ({
|
|
|
2874
2880
|
children: e
|
|
2875
2881
|
}
|
|
2876
2882
|
);
|
|
2877
|
-
},
|
|
2883
|
+
}, st = ({ onResize: e, ...t }) => {
|
|
2878
2884
|
const [r] = Z((o) => [o.getBoardState]);
|
|
2879
2885
|
return /* @__PURE__ */ k(Fe, { onDrag: ({ deltaX: o, deltaY: s, event: a }) => {
|
|
2880
2886
|
a.stopPropagation();
|
|
@@ -2884,36 +2890,36 @@ const se = new Fn(), Fe = ({
|
|
|
2884
2890
|
height: s / u
|
|
2885
2891
|
});
|
|
2886
2892
|
}, children: /* @__PURE__ */ k("div", { ...t }) });
|
|
2887
|
-
},
|
|
2893
|
+
}, Hn = K`
|
|
2888
2894
|
display: inline-block;
|
|
2889
2895
|
transition: transform 150ms;
|
|
2890
2896
|
user-select: none;
|
|
2891
2897
|
padding: 2px;
|
|
2892
2898
|
box-sizing: border-box;
|
|
2893
|
-
`,
|
|
2899
|
+
`, qn = K`
|
|
2894
2900
|
border: 2px dashed #db5034;
|
|
2895
2901
|
padding: 0px;
|
|
2896
2902
|
cursor: pointer;
|
|
2897
|
-
`,
|
|
2903
|
+
`, xe = K`
|
|
2898
2904
|
position: absolute;
|
|
2899
2905
|
width: 0px;
|
|
2900
2906
|
height: 0px;
|
|
2901
|
-
`,
|
|
2907
|
+
`, Gn = K`
|
|
2902
2908
|
top: 0;
|
|
2903
2909
|
left: 0;
|
|
2904
|
-
`,
|
|
2910
|
+
`, Jn = K`
|
|
2905
2911
|
top: 0;
|
|
2906
2912
|
right: 0;
|
|
2907
|
-
`,
|
|
2913
|
+
`, Zn = K`
|
|
2908
2914
|
bottom: 0;
|
|
2909
2915
|
left: 0;
|
|
2910
|
-
`,
|
|
2916
|
+
`, Qn = K`
|
|
2911
2917
|
bottom: 0;
|
|
2912
2918
|
right: 0;
|
|
2913
|
-
`,
|
|
2919
|
+
`, eo = K`
|
|
2914
2920
|
top: 50%;
|
|
2915
2921
|
left: 50%;
|
|
2916
|
-
`,
|
|
2922
|
+
`, it = K`
|
|
2917
2923
|
position: absolute;
|
|
2918
2924
|
|
|
2919
2925
|
width: 10px;
|
|
@@ -2921,19 +2927,19 @@ const se = new Fn(), Fe = ({
|
|
|
2921
2927
|
border: 2px solid #db5034;
|
|
2922
2928
|
background-color: #db5034;
|
|
2923
2929
|
cursor: move;
|
|
2924
|
-
`,
|
|
2930
|
+
`, to = K`
|
|
2925
2931
|
cursor: ew-resize;
|
|
2926
2932
|
right: -6px;
|
|
2927
2933
|
top: calc(50% - 5px);
|
|
2928
|
-
`,
|
|
2934
|
+
`, ro = K`
|
|
2929
2935
|
cursor: ns-resize;
|
|
2930
2936
|
bottom: -6px;
|
|
2931
2937
|
left: calc(50% - 5px);
|
|
2932
|
-
`,
|
|
2938
|
+
`, no = K`
|
|
2933
2939
|
cursor: nwse-resize;
|
|
2934
2940
|
bottom: -6px;
|
|
2935
2941
|
right: -6px;
|
|
2936
|
-
`,
|
|
2942
|
+
`, oo = ({ onReload: e }) => /* @__PURE__ */ le(
|
|
2937
2943
|
"div",
|
|
2938
2944
|
{
|
|
2939
2945
|
className: `syncboard-error-item ${K({
|
|
@@ -2950,7 +2956,7 @@ const se = new Fn(), Fe = ({
|
|
|
2950
2956
|
]
|
|
2951
2957
|
}
|
|
2952
2958
|
);
|
|
2953
|
-
class
|
|
2959
|
+
class so extends g.Component {
|
|
2954
2960
|
constructor(t) {
|
|
2955
2961
|
super(t), this.state = { hasError: !1, itemId: t.itemId }, this.onReload = this.onReload.bind(this);
|
|
2956
2962
|
}
|
|
@@ -2972,9 +2978,9 @@ class oo extends g.Component {
|
|
|
2972
2978
|
return this.state.hasError ? /* @__PURE__ */ k(t, { onReload: this.onReload }) : this.props.children;
|
|
2973
2979
|
}
|
|
2974
2980
|
}
|
|
2975
|
-
const
|
|
2981
|
+
const io = (e) => {
|
|
2976
2982
|
e.target.className = "";
|
|
2977
|
-
},
|
|
2983
|
+
}, ao = ({
|
|
2978
2984
|
width: e,
|
|
2979
2985
|
height: t,
|
|
2980
2986
|
actualWidth: r,
|
|
@@ -2999,11 +3005,11 @@ const so = (e) => {
|
|
|
2999
3005
|
width: (a + e).toFixed(1),
|
|
3000
3006
|
height: (u + t).toFixed(1)
|
|
3001
3007
|
};
|
|
3002
|
-
},
|
|
3008
|
+
}, co = {
|
|
3003
3009
|
w: !0,
|
|
3004
3010
|
h: !0,
|
|
3005
3011
|
b: !0
|
|
3006
|
-
},
|
|
3012
|
+
}, uo = ({
|
|
3007
3013
|
setState: e,
|
|
3008
3014
|
state: { type: t, rotation: r = 0, id: n, locked: o, extraClasses: s, ...a } = {},
|
|
3009
3015
|
animate: u = "hvr-pop",
|
|
@@ -3014,8 +3020,8 @@ const so = (e) => {
|
|
|
3014
3020
|
var w;
|
|
3015
3021
|
const c = g.useRef(null), [h] = Z((R) => [R.config.uid]), {
|
|
3016
3022
|
component: S = () => null,
|
|
3017
|
-
resizeDirections: v =
|
|
3018
|
-
resize: E =
|
|
3023
|
+
resizeDirections: v = co,
|
|
3024
|
+
resize: E = ao
|
|
3019
3025
|
} = d[t], O = g.useCallback(
|
|
3020
3026
|
(R, T = !1) => e(n, R, T),
|
|
3021
3027
|
[e, n]
|
|
@@ -3023,26 +3029,26 @@ const so = (e) => {
|
|
|
3023
3029
|
g.useEffect(() => {
|
|
3024
3030
|
c.current.className = u;
|
|
3025
3031
|
}, [u]);
|
|
3026
|
-
const y = ["item", n,
|
|
3027
|
-
o && y.push("locked"), l && (y.push("selected"), y.push(
|
|
3028
|
-
const
|
|
3032
|
+
const y = ["item", n, Hn];
|
|
3033
|
+
o && y.push("locked"), l && (y.push("selected"), y.push(qn));
|
|
3034
|
+
const x = y.join(" "), C = ({ width: R = 0, height: T = 0, keepRatio: D }) => {
|
|
3029
3035
|
O((M) => {
|
|
3030
|
-
const { offsetWidth: A, offsetHeight:
|
|
3036
|
+
const { offsetWidth: A, offsetHeight: Y } = c.current;
|
|
3031
3037
|
return E({
|
|
3032
3038
|
prevState: M,
|
|
3033
3039
|
width: R,
|
|
3034
3040
|
height: T,
|
|
3035
|
-
actualHeight:
|
|
3041
|
+
actualHeight: Y,
|
|
3036
3042
|
actualWidth: A,
|
|
3037
|
-
keepRatio:
|
|
3043
|
+
keepRatio: D
|
|
3038
3044
|
});
|
|
3039
3045
|
});
|
|
3040
3046
|
}, p = ({ width: R }) => {
|
|
3041
|
-
|
|
3047
|
+
C({ width: R });
|
|
3042
3048
|
}, _ = ({ height: R }) => {
|
|
3043
|
-
|
|
3049
|
+
C({ height: R });
|
|
3044
3050
|
}, m = ({ width: R }) => {
|
|
3045
|
-
|
|
3051
|
+
C({ height: R, width: R, keepRatio: !0 });
|
|
3046
3052
|
};
|
|
3047
3053
|
return /* @__PURE__ */ k(
|
|
3048
3054
|
"div",
|
|
@@ -3050,49 +3056,49 @@ const so = (e) => {
|
|
|
3050
3056
|
style: { transform: `rotate(${r}deg` },
|
|
3051
3057
|
"data-id": n,
|
|
3052
3058
|
id: `${h}__${n}`,
|
|
3053
|
-
className:
|
|
3059
|
+
className: x,
|
|
3054
3060
|
children: /* @__PURE__ */ le(
|
|
3055
3061
|
"div",
|
|
3056
3062
|
{
|
|
3057
3063
|
style: { display: "flex" },
|
|
3058
3064
|
ref: c,
|
|
3059
|
-
onAnimationEnd:
|
|
3065
|
+
onAnimationEnd: io,
|
|
3060
3066
|
onKeyDown: (R) => R.stopPropagation(),
|
|
3061
3067
|
onKeyUp: (R) => R.stopPropagation(),
|
|
3062
3068
|
children: [
|
|
3063
3069
|
/* @__PURE__ */ k(
|
|
3064
|
-
|
|
3070
|
+
so,
|
|
3065
3071
|
{
|
|
3066
3072
|
itemId: n,
|
|
3067
3073
|
state: a,
|
|
3068
|
-
ErrorComponent: ((w = d == null ? void 0 : d.error) == null ? void 0 : w.component) ||
|
|
3074
|
+
ErrorComponent: ((w = d == null ? void 0 : d.error) == null ? void 0 : w.component) || oo,
|
|
3069
3075
|
children: /* @__PURE__ */ k(S, { ...a, id: n, setState: O })
|
|
3070
3076
|
}
|
|
3071
3077
|
),
|
|
3072
|
-
/* @__PURE__ */ k("div", { className: `corner ${
|
|
3073
|
-
/* @__PURE__ */ k("div", { className: `corner ${
|
|
3074
|
-
/* @__PURE__ */ k("div", { className: `corner ${
|
|
3075
|
-
/* @__PURE__ */ k("div", { className: `corner ${
|
|
3076
|
-
/* @__PURE__ */ k("div", { className: `center ${
|
|
3077
|
-
f && /* @__PURE__ */ le(
|
|
3078
|
+
/* @__PURE__ */ k("div", { className: `corner ${xe} ${Gn}` }),
|
|
3079
|
+
/* @__PURE__ */ k("div", { className: `corner ${xe} ${Jn}` }),
|
|
3080
|
+
/* @__PURE__ */ k("div", { className: `corner ${xe} ${Qn}` }),
|
|
3081
|
+
/* @__PURE__ */ k("div", { className: `corner ${xe} ${Zn}` }),
|
|
3082
|
+
/* @__PURE__ */ k("div", { className: `center ${xe} ${eo}` }),
|
|
3083
|
+
f && /* @__PURE__ */ le(Vr, { children: [
|
|
3078
3084
|
v.b && /* @__PURE__ */ k(
|
|
3079
|
-
|
|
3085
|
+
st,
|
|
3080
3086
|
{
|
|
3081
|
-
className: `${
|
|
3087
|
+
className: `${it} ${no}`,
|
|
3082
3088
|
onResize: m
|
|
3083
3089
|
}
|
|
3084
3090
|
),
|
|
3085
3091
|
v.h && /* @__PURE__ */ k(
|
|
3086
|
-
|
|
3092
|
+
st,
|
|
3087
3093
|
{
|
|
3088
|
-
className: `${
|
|
3094
|
+
className: `${it} ${ro}`,
|
|
3089
3095
|
onResize: _
|
|
3090
3096
|
}
|
|
3091
3097
|
),
|
|
3092
3098
|
v.w && /* @__PURE__ */ k(
|
|
3093
|
-
|
|
3099
|
+
st,
|
|
3094
3100
|
{
|
|
3095
|
-
className: `${
|
|
3101
|
+
className: `${it} ${to}`,
|
|
3096
3102
|
onResize: p
|
|
3097
3103
|
}
|
|
3098
3104
|
)
|
|
@@ -3102,8 +3108,8 @@ const so = (e) => {
|
|
|
3102
3108
|
)
|
|
3103
3109
|
}
|
|
3104
3110
|
);
|
|
3105
|
-
},
|
|
3106
|
-
|
|
3111
|
+
}, lo = nr(
|
|
3112
|
+
uo,
|
|
3107
3113
|
({
|
|
3108
3114
|
state: e,
|
|
3109
3115
|
setState: t,
|
|
@@ -3114,11 +3120,11 @@ const so = (e) => {
|
|
|
3114
3120
|
setState: s,
|
|
3115
3121
|
isSelected: a,
|
|
3116
3122
|
showResizeHandle: u
|
|
3117
|
-
}) => r === a && n === u && t === s &&
|
|
3118
|
-
),
|
|
3123
|
+
}) => r === a && n === u && t === s && Nn(e, o)
|
|
3124
|
+
), fo = (e) => e, po = ({ state: e = {}, getCurrentUser: t, className: r, ...n }) => {
|
|
3119
3125
|
if (!n.itemMap[e.type])
|
|
3120
3126
|
return null;
|
|
3121
|
-
const { stateHook: o =
|
|
3127
|
+
const { stateHook: o = fo } = n.itemMap[e.type], {
|
|
3122
3128
|
x: s = 0,
|
|
3123
3129
|
y: a = 0,
|
|
3124
3130
|
layer: u = 0,
|
|
@@ -3134,7 +3140,7 @@ const so = (e) => {
|
|
|
3134
3140
|
zIndex: f
|
|
3135
3141
|
},
|
|
3136
3142
|
children: /* @__PURE__ */ k(
|
|
3137
|
-
|
|
3143
|
+
lo,
|
|
3138
3144
|
{
|
|
3139
3145
|
...n,
|
|
3140
3146
|
showResizeHandle: n.isSelected && n.showResizeHandle,
|
|
@@ -3143,8 +3149,8 @@ const so = (e) => {
|
|
|
3143
3149
|
)
|
|
3144
3150
|
}
|
|
3145
3151
|
);
|
|
3146
|
-
},
|
|
3147
|
-
const { updateItem: e } =
|
|
3152
|
+
}, mo = nr(po), go = () => {
|
|
3153
|
+
const { updateItem: e } = ht(), [t, r] = oe((d) => [
|
|
3148
3154
|
d.itemIds,
|
|
3149
3155
|
d.items
|
|
3150
3156
|
]), [n, o, s, a] = Z(
|
|
@@ -3162,7 +3168,7 @@ const so = (e) => {
|
|
|
3162
3168
|
lineHeight: 0
|
|
3163
3169
|
});
|
|
3164
3170
|
return t.map((d) => /* @__PURE__ */ k(
|
|
3165
|
-
|
|
3171
|
+
mo,
|
|
3166
3172
|
{
|
|
3167
3173
|
state: r[d],
|
|
3168
3174
|
setState: e,
|
|
@@ -3176,21 +3182,21 @@ const so = (e) => {
|
|
|
3176
3182
|
d
|
|
3177
3183
|
));
|
|
3178
3184
|
};
|
|
3179
|
-
function
|
|
3180
|
-
const t = Re(e), r =
|
|
3185
|
+
function ho(e = !1) {
|
|
3186
|
+
const t = Re(e), r = rr(() => t.current, []);
|
|
3181
3187
|
return Pe(() => (t.current = !0, () => {
|
|
3182
3188
|
t.current = !1;
|
|
3183
3189
|
}), []), r;
|
|
3184
3190
|
}
|
|
3185
|
-
function
|
|
3191
|
+
function vo(e, ...t) {
|
|
3186
3192
|
e && e.addEventListener && e.addEventListener(...t);
|
|
3187
3193
|
}
|
|
3188
|
-
function
|
|
3194
|
+
function yo(e, ...t) {
|
|
3189
3195
|
e && e.removeEventListener && e.removeEventListener(...t);
|
|
3190
3196
|
}
|
|
3191
|
-
const
|
|
3197
|
+
const So = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
3192
3198
|
function ue(e, ...t) {
|
|
3193
|
-
const r =
|
|
3199
|
+
const r = ho(), n = mt(t[1]), o = ft(
|
|
3194
3200
|
() => (
|
|
3195
3201
|
// as some event listeners designed to be used through `this`
|
|
3196
3202
|
// it is better to make listener a conventional function as it
|
|
@@ -3204,28 +3210,28 @@ function ue(e, ...t) {
|
|
|
3204
3210
|
[]
|
|
3205
3211
|
);
|
|
3206
3212
|
Pe(() => {
|
|
3207
|
-
const s = e &&
|
|
3213
|
+
const s = e && So(e, "current") ? e.current : e;
|
|
3208
3214
|
if (!s)
|
|
3209
3215
|
return;
|
|
3210
3216
|
const a = t.slice(2);
|
|
3211
|
-
return
|
|
3217
|
+
return vo(s, t[0], o, ...a), () => yo(s, t[0], o, ...a);
|
|
3212
3218
|
}, [e, t[0]]);
|
|
3213
3219
|
}
|
|
3214
|
-
const
|
|
3220
|
+
const _o = K({
|
|
3215
3221
|
zIndex: 210,
|
|
3216
3222
|
position: "absolute",
|
|
3217
3223
|
backgroundColor: "hsla(0, 40%, 50%, 10%)",
|
|
3218
3224
|
border: "2px solid hsl(0, 55%, 40%)"
|
|
3219
|
-
}),
|
|
3225
|
+
}), bo = (e, t, r = !1) => {
|
|
3220
3226
|
const n = t.getElementsByClassName("selector");
|
|
3221
3227
|
if (!n.length)
|
|
3222
3228
|
return [];
|
|
3223
3229
|
const o = n[0];
|
|
3224
3230
|
return Array.from(t.getElementsByClassName("item")).filter((s) => {
|
|
3225
3231
|
const a = Te(s), u = e[a];
|
|
3226
|
-
return !u || !r && u.locked ? !1 :
|
|
3232
|
+
return !u || !r && u.locked ? !1 : sn(s, o);
|
|
3227
3233
|
}).map((s) => Te(s));
|
|
3228
|
-
},
|
|
3234
|
+
}, Eo = ({ children: e, moveFirst: t }) => {
|
|
3229
3235
|
const [
|
|
3230
3236
|
r,
|
|
3231
3237
|
n,
|
|
@@ -3241,7 +3247,7 @@ const So = K({
|
|
|
3241
3247
|
m.getConfiguration,
|
|
3242
3248
|
m.getBoardState,
|
|
3243
3249
|
m.updateBoardState
|
|
3244
|
-
]), { findElementUnderPointer: l } =
|
|
3250
|
+
]), { findElementUnderPointer: l } = ht(), [d] = oe((m) => [m.getItems]), [f, c] = g.useState({}), [, h] = g.useTransition(), [S, v] = g.useState(!1), E = g.useRef(null), O = g.useRef({
|
|
3245
3251
|
moving: !1
|
|
3246
3252
|
});
|
|
3247
3253
|
return ue(document, "keydown", (m) => {
|
|
@@ -3252,7 +3258,7 @@ const So = K({
|
|
|
3252
3258
|
n();
|
|
3253
3259
|
}), [n]), g.useEffect(() => {
|
|
3254
3260
|
if (O.current.moving) {
|
|
3255
|
-
const m = d(), { boardWrapper: w } = a(), R =
|
|
3261
|
+
const m = d(), { boardWrapper: w } = a(), R = bo(m, w, S);
|
|
3256
3262
|
h(() => {
|
|
3257
3263
|
o(R);
|
|
3258
3264
|
});
|
|
@@ -3267,8 +3273,8 @@ const So = K({
|
|
|
3267
3273
|
},
|
|
3268
3274
|
onDrag: ({ distanceY: m, distanceX: w, startX: R, startY: T }) => {
|
|
3269
3275
|
if (O.current.moving) {
|
|
3270
|
-
const { top:
|
|
3271
|
-
w > 0 ? (O.current.left = A, O.current.width = w) : (O.current.left = A + w, O.current.width = -w), m > 0 ? (O.current.top =
|
|
3276
|
+
const { top: D, left: M } = E.current.getBoundingClientRect(), A = R - M, Y = T - D;
|
|
3277
|
+
w > 0 ? (O.current.left = A, O.current.width = w) : (O.current.left = A + w, O.current.width = -w), m > 0 ? (O.current.top = Y, O.current.height = m) : (O.current.top = Y + m, O.current.height = -m), c({ ...O.current, moving: !0 });
|
|
3272
3278
|
}
|
|
3273
3279
|
},
|
|
3274
3280
|
onDragEnd: () => {
|
|
@@ -3277,17 +3283,17 @@ const So = K({
|
|
|
3277
3283
|
}), O.current.moving = !1, c({ moving: !1 }), E.current.style.cursor = "auto");
|
|
3278
3284
|
},
|
|
3279
3285
|
onTap: (m) => {
|
|
3280
|
-
const { target: w, ctrlKey: R, metaKey: T } = m,
|
|
3281
|
-
if (!
|
|
3286
|
+
const { target: w, ctrlKey: R, metaKey: T } = m, D = l(m);
|
|
3287
|
+
if (!D && Oe(w, "board"))
|
|
3282
3288
|
n();
|
|
3283
3289
|
else {
|
|
3284
|
-
const M = Te(
|
|
3290
|
+
const M = Te(D);
|
|
3285
3291
|
if (!M) {
|
|
3286
3292
|
n();
|
|
3287
3293
|
return;
|
|
3288
3294
|
}
|
|
3289
3295
|
const A = r();
|
|
3290
|
-
|
|
3296
|
+
D && !A.includes(M) && (R || T ? s([M]) : o([M]));
|
|
3291
3297
|
}
|
|
3292
3298
|
},
|
|
3293
3299
|
onLongTap: ({ target: m }) => {
|
|
@@ -3307,15 +3313,15 @@ const So = K({
|
|
|
3307
3313
|
height: `${f.height}px`,
|
|
3308
3314
|
width: `${f.width}px`
|
|
3309
3315
|
},
|
|
3310
|
-
className: `selector ${
|
|
3316
|
+
className: `selector ${_o}`
|
|
3311
3317
|
}
|
|
3312
3318
|
),
|
|
3313
3319
|
e
|
|
3314
3320
|
] })
|
|
3315
3321
|
}
|
|
3316
3322
|
);
|
|
3317
|
-
},
|
|
3318
|
-
const { moveItems: t, placeItems: r, findElementUnderPointer: n } =
|
|
3323
|
+
}, wo = ({ children: e }) => {
|
|
3324
|
+
const { moveItems: t, placeItems: r, findElementUnderPointer: n } = ht(), { vectorFromWrapperToBoard: o } = Me(), [s, a, u, l, d] = Z((y) => [
|
|
3319
3325
|
y.select,
|
|
3320
3326
|
y.setSelection,
|
|
3321
3327
|
y.getSelection,
|
|
@@ -3324,20 +3330,20 @@ const So = K({
|
|
|
3324
3330
|
]), [f] = oe((y) => [y.getBoardConfig]), c = g.useRef({}), h = g.useRef({
|
|
3325
3331
|
items: []
|
|
3326
3332
|
}), S = (y) => {
|
|
3327
|
-
const { ctrlKey:
|
|
3333
|
+
const { ctrlKey: x, metaKey: C, event: p } = y, _ = n(y);
|
|
3328
3334
|
if (_) {
|
|
3329
3335
|
p.stopPropagation();
|
|
3330
3336
|
const m = u();
|
|
3331
3337
|
h.current.items = m;
|
|
3332
3338
|
const w = Te(_);
|
|
3333
|
-
m.includes(w) || (
|
|
3339
|
+
m.includes(w) || (x || C ? (h.current.items = [...m, w], s([w])) : (h.current.items = [w], a([w]))), Object.assign(c.current, {
|
|
3334
3340
|
moving: !0
|
|
3335
3341
|
});
|
|
3336
3342
|
}
|
|
3337
|
-
}, v = ({ deltaX: y, deltaY:
|
|
3343
|
+
}, v = ({ deltaX: y, deltaY: x, event: C }) => {
|
|
3338
3344
|
if (c.current.moving) {
|
|
3339
|
-
|
|
3340
|
-
const { movingItems: p } = l(), [_, m] = o(y,
|
|
3345
|
+
C.stopPropagation();
|
|
3346
|
+
const { movingItems: p } = l(), [_, m] = o(y, x);
|
|
3341
3347
|
t(
|
|
3342
3348
|
h.current.items,
|
|
3343
3349
|
{
|
|
@@ -3349,19 +3355,19 @@ const So = K({
|
|
|
3349
3355
|
}
|
|
3350
3356
|
}, E = () => {
|
|
3351
3357
|
if (c.current.moving) {
|
|
3352
|
-
const { gridSize: y = 1 } = f(),
|
|
3358
|
+
const { gridSize: y = 1 } = f(), x = y || 1;
|
|
3353
3359
|
c.current = { moving: !1 }, r(h.current.items, {
|
|
3354
3360
|
type: "grid",
|
|
3355
|
-
size:
|
|
3361
|
+
size: x
|
|
3356
3362
|
}), d({ movingItems: !1 });
|
|
3357
3363
|
}
|
|
3358
3364
|
};
|
|
3359
3365
|
return ue(document, "keydown", (y) => {
|
|
3360
3366
|
if (["INPUT", "TEXTAREA"].includes(y.target.tagName))
|
|
3361
3367
|
return;
|
|
3362
|
-
const
|
|
3363
|
-
if (
|
|
3364
|
-
const { gridSize:
|
|
3368
|
+
const x = u();
|
|
3369
|
+
if (x.length) {
|
|
3370
|
+
const { gridSize: C = 1 } = f();
|
|
3365
3371
|
let p = 0, _ = 0;
|
|
3366
3372
|
switch (y.key) {
|
|
3367
3373
|
case "ArrowLeft":
|
|
@@ -3381,20 +3387,20 @@ const So = K({
|
|
|
3381
3387
|
y.shiftKey && (p *= 5, _ *= 5), (y.ctrlKey || y.altKey || y.metaKey) && (p /= 10, _ /= 10);
|
|
3382
3388
|
const [m, w] = o(p, _);
|
|
3383
3389
|
t(
|
|
3384
|
-
|
|
3390
|
+
x,
|
|
3385
3391
|
{
|
|
3386
3392
|
x: m,
|
|
3387
3393
|
y: w
|
|
3388
3394
|
},
|
|
3389
3395
|
!0
|
|
3390
|
-
), r(
|
|
3396
|
+
), r(x, {
|
|
3391
3397
|
type: "grid",
|
|
3392
|
-
size:
|
|
3398
|
+
size: C || 1
|
|
3393
3399
|
}), y.preventDefault();
|
|
3394
3400
|
}
|
|
3395
3401
|
}
|
|
3396
3402
|
}), /* @__PURE__ */ k(Fe, { onDragStart: S, onDrag: v, onDragEnd: E, children: e });
|
|
3397
|
-
},
|
|
3403
|
+
}, xo = (e) => {
|
|
3398
3404
|
const t = g.useRef({ hover: !1, x: 0, y: 0 });
|
|
3399
3405
|
return ue(e.current, "mousemove", (n) => {
|
|
3400
3406
|
const { clientX: o, clientY: s } = n;
|
|
@@ -3404,7 +3410,7 @@ const So = K({
|
|
|
3404
3410
|
}), ue(e.current, "mouseleave", () => {
|
|
3405
3411
|
t.current.hover = !1;
|
|
3406
3412
|
}), g.useCallback(() => t.current, []);
|
|
3407
|
-
}, Co = [...Array(5).keys()].map((e) => `Digit${e + 1}`),
|
|
3413
|
+
}, Co = [...Array(5).keys()].map((e) => `Digit${e + 1}`), Ro = () => {
|
|
3408
3414
|
const [e, t] = g.useState({}), [r, n] = Z((o) => [
|
|
3409
3415
|
o.getBoardState,
|
|
3410
3416
|
o.updateBoardState
|
|
@@ -3418,7 +3424,7 @@ const So = K({
|
|
|
3418
3424
|
})) : e[s] && n(e[s]), o.preventDefault();
|
|
3419
3425
|
}
|
|
3420
3426
|
}), null;
|
|
3421
|
-
},
|
|
3427
|
+
}, Io = ({ children: e, moveFirst: t = !1 }) => {
|
|
3422
3428
|
const r = g.useRef(null), [
|
|
3423
3429
|
n,
|
|
3424
3430
|
o,
|
|
@@ -3436,8 +3442,8 @@ const So = K({
|
|
|
3436
3442
|
p.getConfiguration,
|
|
3437
3443
|
p.updateBoardState,
|
|
3438
3444
|
p.getSelection
|
|
3439
|
-
]), { zoomToCenter: l, zoomToExtent: d, moveBoard: f } = Me(), [c, h] = g.useState(!1), S = g.useRef({}), v =
|
|
3440
|
-
|
|
3445
|
+
]), { zoomToCenter: l, zoomToExtent: d, moveBoard: f } = Me(), [c, h] = g.useState(!1), S = g.useRef({}), v = xo(r);
|
|
3446
|
+
Ro();
|
|
3441
3447
|
const E = g.useCallback(() => {
|
|
3442
3448
|
const { itemExtent: p } = s();
|
|
3443
3449
|
d(p);
|
|
@@ -3456,7 +3462,7 @@ const So = K({
|
|
|
3456
3462
|
})), clearTimeout(S.current.pan), S.current.pan = setTimeout(() => {
|
|
3457
3463
|
a({ panning: !1 });
|
|
3458
3464
|
}, 200), a({ panning: !0 });
|
|
3459
|
-
},
|
|
3465
|
+
}, x = (p) => {
|
|
3460
3466
|
if (["INPUT", "TEXTAREA"].includes(p.target.tagName))
|
|
3461
3467
|
return;
|
|
3462
3468
|
let _ = 0, m = 0, w = 1;
|
|
@@ -3484,16 +3490,16 @@ const So = K({
|
|
|
3484
3490
|
const R = u();
|
|
3485
3491
|
if (w === 1 && R.length)
|
|
3486
3492
|
return;
|
|
3487
|
-
p.shiftKey && (_ *= 5, m *= 5), (p.ctrlKey || p.altKey || p.metaKey) && (_ /= 5, m /= 5), f(({ translateX: T, translateY:
|
|
3493
|
+
p.shiftKey && (_ *= 5, m *= 5), (p.ctrlKey || p.altKey || p.metaKey) && (_ /= 5, m /= 5), f(({ translateX: T, translateY: D }) => ({
|
|
3488
3494
|
translateX: T + _,
|
|
3489
|
-
translateY:
|
|
3495
|
+
translateY: D + m
|
|
3490
3496
|
})), l({ factor: w }), p.preventDefault();
|
|
3491
3497
|
}
|
|
3492
3498
|
p.key === " " && !p.repeat && v().hover && l({ factor: 3, to: v() });
|
|
3493
|
-
},
|
|
3499
|
+
}, C = (p) => {
|
|
3494
3500
|
["INPUT", "TEXTAREA"].includes(p.target.tagName) || p.key === " " && v().hover && l({ factor: 1 / 3, to: v() });
|
|
3495
3501
|
};
|
|
3496
|
-
return ue(document, "keydown",
|
|
3502
|
+
return ue(document, "keydown", x), ue(document, "keyup", C), /* @__PURE__ */ k(
|
|
3497
3503
|
Fe,
|
|
3498
3504
|
{
|
|
3499
3505
|
onPan: y,
|
|
@@ -3514,7 +3520,7 @@ const So = K({
|
|
|
3514
3520
|
)
|
|
3515
3521
|
}
|
|
3516
3522
|
);
|
|
3517
|
-
},
|
|
3523
|
+
}, Oo = K({
|
|
3518
3524
|
position: "absolute",
|
|
3519
3525
|
top: 0,
|
|
3520
3526
|
left: 0,
|
|
@@ -3522,7 +3528,7 @@ const So = K({
|
|
|
3522
3528
|
backgroundColor: "hsla(0, 40%, 50%, 0%)",
|
|
3523
3529
|
border: "2px dashed hsl(20, 55%, 40%)",
|
|
3524
3530
|
pointerEvents: "none"
|
|
3525
|
-
}),
|
|
3531
|
+
}), To = () => {
|
|
3526
3532
|
const [
|
|
3527
3533
|
e,
|
|
3528
3534
|
t,
|
|
@@ -3547,19 +3553,19 @@ const So = K({
|
|
|
3547
3553
|
n(null);
|
|
3548
3554
|
return;
|
|
3549
3555
|
}
|
|
3550
|
-
const v =
|
|
3556
|
+
const v = an(c, S);
|
|
3551
3557
|
if (!v) {
|
|
3552
3558
|
n(null);
|
|
3553
3559
|
return;
|
|
3554
3560
|
}
|
|
3555
|
-
const { left: E, top: O, width: y, height:
|
|
3561
|
+
const { left: E, top: O, width: y, height: x } = v, C = {
|
|
3556
3562
|
left: E - h.left,
|
|
3557
3563
|
top: O - h.top,
|
|
3558
|
-
height:
|
|
3564
|
+
height: x,
|
|
3559
3565
|
width: y
|
|
3560
3566
|
};
|
|
3561
|
-
n(
|
|
3562
|
-
}, [o, t, n]), f =
|
|
3567
|
+
n(C);
|
|
3568
|
+
}, [o, t, n]), f = gt(d, [d], 300);
|
|
3563
3569
|
return g.useEffect(() => {
|
|
3564
3570
|
d(), f();
|
|
3565
3571
|
}, [
|
|
@@ -3578,16 +3584,16 @@ const So = K({
|
|
|
3578
3584
|
height: `${r.height}px`,
|
|
3579
3585
|
width: `${r.width}px`
|
|
3580
3586
|
},
|
|
3581
|
-
className: `selection ${
|
|
3587
|
+
className: `selection ${Oo}`
|
|
3582
3588
|
}
|
|
3583
3589
|
);
|
|
3584
|
-
},
|
|
3590
|
+
}, ko = () => {
|
|
3585
3591
|
const [e] = Z((t) => [t.boardState.movingItems]);
|
|
3586
|
-
return e ? null : /* @__PURE__ */ k(
|
|
3587
|
-
},
|
|
3592
|
+
return e ? null : /* @__PURE__ */ k(To, {});
|
|
3593
|
+
}, Po = typeof window < "u" && typeof navigator < "u" && typeof document < "u";
|
|
3588
3594
|
let Le;
|
|
3589
|
-
function
|
|
3590
|
-
if (!
|
|
3595
|
+
function Mo() {
|
|
3596
|
+
if (!Po)
|
|
3591
3597
|
return;
|
|
3592
3598
|
if (Le)
|
|
3593
3599
|
return Le;
|
|
@@ -3609,8 +3615,8 @@ function Po() {
|
|
|
3609
3615
|
}
|
|
3610
3616
|
}, Le;
|
|
3611
3617
|
}
|
|
3612
|
-
function
|
|
3613
|
-
const n = r &&
|
|
3618
|
+
function Do(e, t, r = !0) {
|
|
3619
|
+
const n = r && Mo(), o = mt(t), s = e && "current" in e ? e.current : e;
|
|
3614
3620
|
Pe(() => {
|
|
3615
3621
|
const a = e && "current" in e ? e.current : e;
|
|
3616
3622
|
if (!n || !a)
|
|
@@ -3624,7 +3630,7 @@ function Mo(e, t, r = !0) {
|
|
|
3624
3630
|
};
|
|
3625
3631
|
}, [s, n]);
|
|
3626
3632
|
}
|
|
3627
|
-
function
|
|
3633
|
+
function Qt(e, t, r) {
|
|
3628
3634
|
return Math.min(Math.max(e, r), t);
|
|
3629
3635
|
}
|
|
3630
3636
|
class jo extends Error {
|
|
@@ -3632,25 +3638,25 @@ class jo extends Error {
|
|
|
3632
3638
|
super(`Failed to parse color: "${t}"`);
|
|
3633
3639
|
}
|
|
3634
3640
|
}
|
|
3635
|
-
var
|
|
3636
|
-
function
|
|
3641
|
+
var Ce = jo;
|
|
3642
|
+
function $o(e) {
|
|
3637
3643
|
if (typeof e != "string")
|
|
3638
|
-
throw new
|
|
3644
|
+
throw new Ce(e);
|
|
3639
3645
|
if (e.trim().toLowerCase() === "transparent")
|
|
3640
3646
|
return [0, 0, 0, 0];
|
|
3641
3647
|
let t = e.trim();
|
|
3642
|
-
t =
|
|
3643
|
-
const r =
|
|
3648
|
+
t = Uo.test(e) ? zo(e) : e;
|
|
3649
|
+
const r = Yo.exec(t);
|
|
3644
3650
|
if (r) {
|
|
3645
3651
|
const a = Array.from(r).slice(1);
|
|
3646
3652
|
return [...a.slice(0, 3).map((u) => parseInt(ke(u, 2), 16)), parseInt(ke(a[3] || "f", 2), 16) / 255];
|
|
3647
3653
|
}
|
|
3648
|
-
const n =
|
|
3654
|
+
const n = Bo.exec(t);
|
|
3649
3655
|
if (n) {
|
|
3650
3656
|
const a = Array.from(n).slice(1);
|
|
3651
3657
|
return [...a.slice(0, 3).map((u) => parseInt(u, 16)), parseInt(a[3] || "ff", 16) / 255];
|
|
3652
3658
|
}
|
|
3653
|
-
const o =
|
|
3659
|
+
const o = No.exec(t);
|
|
3654
3660
|
if (o) {
|
|
3655
3661
|
const a = Array.from(o).slice(1);
|
|
3656
3662
|
return [...a.slice(0, 3).map((u) => parseInt(u, 10)), parseFloat(a[3] || "1")];
|
|
@@ -3658,63 +3664,63 @@ function Do(e) {
|
|
|
3658
3664
|
const s = Xo.exec(t);
|
|
3659
3665
|
if (s) {
|
|
3660
3666
|
const [a, u, l, d] = Array.from(s).slice(1).map(parseFloat);
|
|
3661
|
-
if (
|
|
3662
|
-
throw new
|
|
3663
|
-
if (
|
|
3664
|
-
throw new
|
|
3665
|
-
return [...
|
|
3667
|
+
if (Qt(0, 100, u) !== u)
|
|
3668
|
+
throw new Ce(e);
|
|
3669
|
+
if (Qt(0, 100, l) !== l)
|
|
3670
|
+
throw new Ce(e);
|
|
3671
|
+
return [...Wo(a, u, l), Number.isNaN(d) ? 1 : d];
|
|
3666
3672
|
}
|
|
3667
|
-
throw new
|
|
3673
|
+
throw new Ce(e);
|
|
3668
3674
|
}
|
|
3669
|
-
function
|
|
3675
|
+
function Ao(e) {
|
|
3670
3676
|
let t = 5381, r = e.length;
|
|
3671
3677
|
for (; r; )
|
|
3672
3678
|
t = t * 33 ^ e.charCodeAt(--r);
|
|
3673
3679
|
return (t >>> 0) % 2341;
|
|
3674
3680
|
}
|
|
3675
|
-
const
|
|
3676
|
-
const r =
|
|
3681
|
+
const er = (e) => parseInt(e.replace(/_/g, ""), 36), Lo = "1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e, t) => {
|
|
3682
|
+
const r = er(t.substring(0, 3)), n = er(t.substring(3)).toString(16);
|
|
3677
3683
|
let o = "";
|
|
3678
3684
|
for (let s = 0; s < 6 - n.length; s++)
|
|
3679
3685
|
o += "0";
|
|
3680
3686
|
return e[r] = `${o}${n}`, e;
|
|
3681
3687
|
}, {});
|
|
3682
|
-
function
|
|
3683
|
-
const t = e.toLowerCase().trim(), r = Ao
|
|
3688
|
+
function zo(e) {
|
|
3689
|
+
const t = e.toLowerCase().trim(), r = Lo[Ao(t)];
|
|
3684
3690
|
if (!r)
|
|
3685
|
-
throw new
|
|
3691
|
+
throw new Ce(e);
|
|
3686
3692
|
return `#${r}`;
|
|
3687
3693
|
}
|
|
3688
|
-
const ke = (e, t) => Array.from(Array(t)).map(() => e).join(""),
|
|
3694
|
+
const ke = (e, t) => Array.from(Array(t)).map(() => e).join(""), Yo = new RegExp(`^#${ke("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), Bo = new RegExp(`^#${ke("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), No = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${ke(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), Xo = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, Uo = /^[a-z]+$/i, tr = (e) => Math.round(e * 255), Wo = (e, t, r) => {
|
|
3689
3695
|
let n = r / 100;
|
|
3690
3696
|
if (t === 0)
|
|
3691
|
-
return [n, n, n].map(
|
|
3697
|
+
return [n, n, n].map(tr);
|
|
3692
3698
|
const o = (e % 360 + 360) % 360 / 60, s = (1 - Math.abs(2 * n - 1)) * (t / 100), a = s * (1 - Math.abs(o % 2 - 1));
|
|
3693
3699
|
let u = 0, l = 0, d = 0;
|
|
3694
3700
|
o >= 0 && o < 1 ? (u = s, l = a) : o >= 1 && o < 2 ? (u = a, l = s) : o >= 2 && o < 3 ? (l = s, d = a) : o >= 3 && o < 4 ? (l = a, d = s) : o >= 4 && o < 5 ? (u = a, d = s) : o >= 5 && o < 6 && (u = s, d = a);
|
|
3695
3701
|
const f = n - s / 2, c = u + f, h = l + f, S = d + f;
|
|
3696
|
-
return [c, h, S].map(
|
|
3702
|
+
return [c, h, S].map(tr);
|
|
3697
3703
|
};
|
|
3698
|
-
function
|
|
3704
|
+
function Vo(e) {
|
|
3699
3705
|
if (e === "transparent")
|
|
3700
3706
|
return 0;
|
|
3701
3707
|
function t(s) {
|
|
3702
3708
|
const a = s / 255;
|
|
3703
3709
|
return a <= 0.03928 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
|
|
3704
3710
|
}
|
|
3705
|
-
const [r, n, o] =
|
|
3711
|
+
const [r, n, o] = $o(e);
|
|
3706
3712
|
return 0.2126 * t(r) + 0.7152 * t(n) + 0.0722 * t(o);
|
|
3707
3713
|
}
|
|
3708
|
-
function
|
|
3709
|
-
return
|
|
3714
|
+
function Fo(e) {
|
|
3715
|
+
return Vo(e) > 0.179;
|
|
3710
3716
|
}
|
|
3711
|
-
const
|
|
3717
|
+
const Ko = K({
|
|
3712
3718
|
display: "flex",
|
|
3713
3719
|
flexDirection: "row",
|
|
3714
3720
|
alignItems: "center",
|
|
3715
3721
|
zIndex: 210,
|
|
3716
3722
|
pointerEvents: "none"
|
|
3717
|
-
}),
|
|
3723
|
+
}), Ho = K({
|
|
3718
3724
|
fontWeight: "bold",
|
|
3719
3725
|
padding: "0 0.5em",
|
|
3720
3726
|
borderRadius: "2px",
|
|
@@ -3725,9 +3731,9 @@ const Fo = K({
|
|
|
3725
3731
|
marginTop: "1.7em",
|
|
3726
3732
|
whitespace: "nowrap",
|
|
3727
3733
|
pointerEvents: "none"
|
|
3728
|
-
}),
|
|
3729
|
-
const n =
|
|
3730
|
-
return /* @__PURE__ */ le("div", { className:
|
|
3734
|
+
}), qo = ({ color: e = "#666", size: t = 40, text: r }) => {
|
|
3735
|
+
const n = Fo(e) ? "#222" : "#EEE";
|
|
3736
|
+
return /* @__PURE__ */ le("div", { className: Ko, children: [
|
|
3731
3737
|
/* @__PURE__ */ le(
|
|
3732
3738
|
"svg",
|
|
3733
3739
|
{
|
|
@@ -3767,27 +3773,27 @@ const Fo = K({
|
|
|
3767
3773
|
color: n,
|
|
3768
3774
|
backgroundColor: e
|
|
3769
3775
|
},
|
|
3770
|
-
className:
|
|
3776
|
+
className: Ho,
|
|
3771
3777
|
children: r
|
|
3772
3778
|
}
|
|
3773
3779
|
)
|
|
3774
3780
|
] });
|
|
3775
|
-
},
|
|
3781
|
+
}, Go = g.memo(qo), Jo = K({
|
|
3776
3782
|
top: 0,
|
|
3777
3783
|
left: 0,
|
|
3778
3784
|
zIndex: 210,
|
|
3779
3785
|
position: "fixed",
|
|
3780
3786
|
pointerEvents: "none"
|
|
3781
|
-
}),
|
|
3787
|
+
}), Zo = ({ pos: e, ...t }) => /* @__PURE__ */ k(
|
|
3782
3788
|
"div",
|
|
3783
3789
|
{
|
|
3784
|
-
className:
|
|
3790
|
+
className: Jo,
|
|
3785
3791
|
style: {
|
|
3786
3792
|
transform: `translate(${e.x - 6}px, ${e.y - 15}px)`
|
|
3787
3793
|
},
|
|
3788
|
-
children: /* @__PURE__ */ k(
|
|
3794
|
+
children: /* @__PURE__ */ k(Go, { ...t })
|
|
3789
3795
|
}
|
|
3790
|
-
),
|
|
3796
|
+
), Qo = ({ children: e }) => {
|
|
3791
3797
|
const [t] = Z((v) => [
|
|
3792
3798
|
v.getConfiguration,
|
|
3793
3799
|
v.boardState.scale
|
|
@@ -3814,14 +3820,14 @@ const Fo = K({
|
|
|
3814
3820
|
return /* @__PURE__ */ le("div", { onPointerMove: c, onPointerLeave: h, children: [
|
|
3815
3821
|
e,
|
|
3816
3822
|
Object.entries(S).map(([v, E]) => {
|
|
3817
|
-
const [O, y] = n(E.x, E.y),
|
|
3823
|
+
const [O, y] = n(E.x, E.y), x = {
|
|
3818
3824
|
x: O + f.left,
|
|
3819
3825
|
y: y + f.top
|
|
3820
3826
|
};
|
|
3821
|
-
return
|
|
3822
|
-
|
|
3827
|
+
return dt(x, f) ? /* @__PURE__ */ k(
|
|
3828
|
+
Zo,
|
|
3823
3829
|
{
|
|
3824
|
-
pos:
|
|
3830
|
+
pos: x,
|
|
3825
3831
|
text: u[v].name,
|
|
3826
3832
|
color: u[v].color
|
|
3827
3833
|
},
|
|
@@ -3829,19 +3835,19 @@ const Fo = K({
|
|
|
3829
3835
|
) : null;
|
|
3830
3836
|
})
|
|
3831
3837
|
] });
|
|
3832
|
-
},
|
|
3838
|
+
}, es = ({ children: e }) => e, ts = {
|
|
3833
3839
|
overflow: "hidden",
|
|
3834
3840
|
position: "absolute",
|
|
3835
3841
|
inset: 0
|
|
3836
|
-
},
|
|
3842
|
+
}, vs = ({
|
|
3837
3843
|
moveFirst: e = !0,
|
|
3838
3844
|
style: t,
|
|
3839
3845
|
wrapperStyle: r,
|
|
3840
3846
|
itemTemplates: n = {},
|
|
3841
|
-
boardSize: o =
|
|
3847
|
+
boardSize: o = ur,
|
|
3842
3848
|
children: s,
|
|
3843
3849
|
showResizeHandle: a = !1,
|
|
3844
|
-
Wrapper: u =
|
|
3850
|
+
Wrapper: u = es
|
|
3845
3851
|
}) => {
|
|
3846
3852
|
const l = g.useRef(null), [d, f] = Z((v) => [
|
|
3847
3853
|
v.config.uid,
|
|
@@ -3878,12 +3884,12 @@ const Fo = K({
|
|
|
3878
3884
|
f({
|
|
3879
3885
|
boardWrapperRect: l.current.getBoundingClientRect()
|
|
3880
3886
|
}), c(), setTimeout(c, 2e3);
|
|
3881
|
-
}, [f, c]),
|
|
3887
|
+
}, [f, c]), Do(l, () => {
|
|
3882
3888
|
l.current && f({
|
|
3883
3889
|
boardWrapperRect: l.current.getBoundingClientRect()
|
|
3884
3890
|
});
|
|
3885
3891
|
});
|
|
3886
|
-
const S = K({ ...
|
|
3892
|
+
const S = K({ ...ts, ...r });
|
|
3887
3893
|
return /* @__PURE__ */ le(
|
|
3888
3894
|
"div",
|
|
3889
3895
|
{
|
|
@@ -3891,7 +3897,7 @@ const Fo = K({
|
|
|
3891
3897
|
id: d,
|
|
3892
3898
|
className: `sync-board ${S}`,
|
|
3893
3899
|
children: [
|
|
3894
|
-
/* @__PURE__ */ k(
|
|
3900
|
+
/* @__PURE__ */ k(Qo, { children: /* @__PURE__ */ k(Eo, { moveFirst: e, children: /* @__PURE__ */ k(Io, { moveFirst: e, children: /* @__PURE__ */ k(wo, { moveFirst: e, children: /* @__PURE__ */ k(u, { children: /* @__PURE__ */ le(
|
|
3895
3901
|
"div",
|
|
3896
3902
|
{
|
|
3897
3903
|
onContextMenu: (v) => {
|
|
@@ -3900,35 +3906,35 @@ const Fo = K({
|
|
|
3900
3906
|
style: h,
|
|
3901
3907
|
className: "board",
|
|
3902
3908
|
children: [
|
|
3903
|
-
/* @__PURE__ */ k(
|
|
3909
|
+
/* @__PURE__ */ k(go, {}),
|
|
3904
3910
|
s
|
|
3905
3911
|
]
|
|
3906
3912
|
}
|
|
3907
3913
|
) }) }) }) }) }),
|
|
3908
|
-
/* @__PURE__ */ k(
|
|
3914
|
+
/* @__PURE__ */ k(ko, {})
|
|
3909
3915
|
]
|
|
3910
3916
|
}
|
|
3911
3917
|
);
|
|
3912
3918
|
};
|
|
3913
|
-
|
|
3919
|
+
Bn(g.createElement);
|
|
3914
3920
|
export {
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3921
|
+
vs as Board,
|
|
3922
|
+
gs as BoardWrapper,
|
|
3923
|
+
hs as RoomWrapper,
|
|
3924
|
+
cs as useAvailableActions,
|
|
3925
|
+
fs as useBoardConfig,
|
|
3920
3926
|
Me as useBoardPosition,
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3927
|
+
ds as useBoardState,
|
|
3928
|
+
ss as useDebouncedItems,
|
|
3929
|
+
as as useGetSelectedItems,
|
|
3930
|
+
ht as useItemActions,
|
|
3931
|
+
Ft as useItemInteraction,
|
|
3932
|
+
os as useItems,
|
|
3933
|
+
ms as useMessage,
|
|
3934
|
+
is as useSelectedItems,
|
|
3935
|
+
us as useSelectionBox,
|
|
3936
|
+
ps as useSessionInfo,
|
|
3937
|
+
ls as useUsers,
|
|
3938
|
+
Xe as useWire
|
|
3933
3939
|
};
|
|
3934
3940
|
//# sourceMappingURL=react-sync-board.js.map
|