@netless/appliance-plugin 1.1.5 → 1.1.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/cdn.js +1 -1
- package/cdn/{fullWorker-XdMBFp.js → fullWorker-Bn23ql.js} +1 -1
- package/cdn/{subWorker-ChVI4C.js → subWorker-BHGGPo.js} +1 -1
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/core/renderCotrol.d.ts +2 -0
- package/dist/fullWorker.js +1 -1
- package/dist/{index-CcOhAM6h.js → index--nNSULzs.js} +1 -1
- package/dist/{index-Dkg_PdHZ.mjs → index-DK7rOQ8d.mjs} +500 -484
- package/dist/index-Jd0URiCw.js +1 -0
- package/dist/{index-CDANfmmw.mjs → index-f9cCJCDG.mjs} +1 -1
- package/dist/plugin/baseApplianceManager.d.ts +1 -0
- package/dist/plugin/types.d.ts +26 -1
- package/dist/subWorker.js +1 -1
- package/dist/undo/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/index-VnPTZ-8D.js +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var Gs = Object.defineProperty;
|
|
2
2
|
var Zs = (a, o, t) => o in a ? Gs(a, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[o] = t;
|
|
3
3
|
var g = (a, o, t) => Zs(a, typeof o != "symbol" ? o + "" : o, t);
|
|
4
|
-
import { toJS as Lo, autorun as
|
|
5
|
-
import { Path as
|
|
4
|
+
import { toJS as Lo, autorun as si, isRoom as lt, isPlayer as Bo, InvisiblePlugin as qi, RoomPhase as Ki } from "white-web-sdk";
|
|
5
|
+
import { Path as he, Group as Yt, Rect as ni, Polyline as le, Ellipse as Js, Sprite as Xs, Label as qs, Scene as Ks } from "spritejs";
|
|
6
6
|
import { decompress as _s, compress as tn } from "lz-string";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { cloneDeep as ht, isEqual as pt, isSet as Rt, isNumber as et, isBoolean as Et, debounce as _i, clone as
|
|
10
|
-
import S, { useContext as Ct, useState as st, useMemo as X, useEffect as ft, useRef as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
7
|
+
import Vo from "lineclip";
|
|
8
|
+
import jo from "eventemitter2";
|
|
9
|
+
import { cloneDeep as ht, isEqual as pt, isSet as Rt, isNumber as et, isBoolean as Et, debounce as _i, clone as ri, throttle as jt } from "lodash";
|
|
10
|
+
import S, { useContext as Ct, useState as st, useMemo as X, useEffect as ft, useRef as ze, useCallback as en } from "react";
|
|
11
|
+
import Fo, { createPortal as on } from "react-dom";
|
|
12
|
+
import be from "react-draggable";
|
|
13
13
|
import { Resizable as sn } from "re-resizable";
|
|
14
14
|
const Yy = "/fullWorker.js", Wy = "/subWorker.js";
|
|
15
|
-
var nt = /* @__PURE__ */ ((a) => (a.selector = "selector", a.clicker = "clicker", a.laserPointer = "laserPointer", a.pencil = "pencil", a.rectangle = "rectangle", a.ellipse = "ellipse", a.shape = "shape", a.eraser = "eraser", a.pencilEraser = "pencilEraser", a.text = "text", a.straight = "straight", a.arrow = "arrow", a.hand = "hand", a.laserPen = "laserPen", a))(nt || {}), _ = /* @__PURE__ */ ((a) => (a.Normal = "Normal", a.Stroke = "Stroke", a.Dotted = "Dotted", a.LongDotted = "LongDotted", a))(_ || {}),
|
|
15
|
+
var nt = /* @__PURE__ */ ((a) => (a.selector = "selector", a.clicker = "clicker", a.laserPointer = "laserPointer", a.pencil = "pencil", a.rectangle = "rectangle", a.ellipse = "ellipse", a.shape = "shape", a.eraser = "eraser", a.pencilEraser = "pencilEraser", a.text = "text", a.straight = "straight", a.arrow = "arrow", a.hand = "hand", a.laserPen = "laserPen", a))(nt || {}), _ = /* @__PURE__ */ ((a) => (a.Normal = "Normal", a.Stroke = "Stroke", a.Dotted = "Dotted", a.LongDotted = "LongDotted", a))(_ || {}), qt = /* @__PURE__ */ ((a) => (a.Triangle = "triangle", a.Rhombus = "rhombus", a.Pentagram = "pentagram", a.SpeechBalloon = "speechBalloon", a.Star = "star", a.Polygon = "polygon", a))(qt || {}), R = /* @__PURE__ */ ((a) => (a.None = "None", a.ShowFloatBar = "ShowFloatBar", a.ZIndexFloatBar = "ZIndexFloatBar", a.DeleteNode = "DeleteNode", a.CopyNode = "CopyNode", a.ZIndexActive = "ZIndexActive", a.ZIndexNode = "ZIndexNode", a.RotateNode = "RotateNode", a.SetColorNode = "SetColorNode", a.TranslateNode = "TranslateNode", a.ScaleNode = "ScaleNode", a.OriginalEvent = "OriginalEvent", a.CreateScene = "CreateScene", a.ActiveCursor = "ActiveCursor", a.MoveCursor = "MoveCursor", a.CommandEditor = "CommandEditor", a.SetEditorData = "SetEditorData", a.SetFontStyle = "SetFontStyle", a.SetPoint = "SetPoint", a.SetLock = "SetLock", a.SetShapeOpt = "SetShapeOpt", a.CameraChange = "CameraChange", a.ActiveMethod = "ActiveMethod", a))(R || {}), Z = /* @__PURE__ */ ((a) => (a.DisplayState = "DisplayState", a.MainEngine = "MainEngine", a.Cursor = "Cursor", a.BindMainView = "BindMainView", a))(Z || {}), nn = /* @__PURE__ */ ((a) => (a[a.MainView = 0] = "MainView", a[a.Plugin = 1] = "Plugin", a[a.Both = 2] = "Both", a))(nn || {}), C = /* @__PURE__ */ ((a) => (a[a.Pencil = 1] = "Pencil", a[a.Eraser = 2] = "Eraser", a[a.PencilEraser = 3] = "PencilEraser", a[a.BitMapEraser = 4] = "BitMapEraser", a[a.Selector = 5] = "Selector", a[a.Clicker = 6] = "Clicker", a[a.Arrow = 7] = "Arrow", a[a.Hand = 8] = "Hand", a[a.LaserPen = 9] = "LaserPen", a[a.Text = 10] = "Text", a[a.Straight = 11] = "Straight", a[a.Rectangle = 12] = "Rectangle", a[a.Ellipse = 13] = "Ellipse", a[a.Star = 14] = "Star", a[a.Triangle = 15] = "Triangle", a[a.Rhombus = 16] = "Rhombus", a[a.Polygon = 17] = "Polygon", a[a.SpeechBalloon = 18] = "SpeechBalloon", a[a.Image = 19] = "Image", a))(C || {}), F = /* @__PURE__ */ ((a) => (a[a.Local = 1] = "Local", a[a.Service = 2] = "Service", a[a.Worker = 3] = "Worker", a))(F || {}), L = /* @__PURE__ */ ((a) => (a[a.Pending = 0] = "Pending", a[a.Start = 1] = "Start", a[a.Doing = 2] = "Doing", a[a.Done = 3] = "Done", a[a.Unwritable = 4] = "Unwritable", a))(L || {}), z = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.Init = 1] = "Init", a[a.UpdateCamera = 2] = "UpdateCamera", a[a.UpdateTools = 3] = "UpdateTools", a[a.CreateWork = 4] = "CreateWork", a[a.DrawWork = 5] = "DrawWork", a[a.FullWork = 6] = "FullWork", a[a.UpdateNode = 7] = "UpdateNode", a[a.RemoveNode = 8] = "RemoveNode", a[a.Clear = 9] = "Clear", a[a.Select = 10] = "Select", a[a.Destroy = 11] = "Destroy", a[a.Snapshot = 12] = "Snapshot", a[a.BoundingBox = 13] = "BoundingBox", a[a.Cursor = 14] = "Cursor", a[a.TextUpdate = 15] = "TextUpdate", a[a.GetTextActive = 16] = "GetTextActive", a[a.TasksQueue = 17] = "TasksQueue", a[a.CursorHover = 18] = "CursorHover", a[a.CursorBlur = 19] = "CursorBlur", a[a.Console = 20] = "Console", a[a.PriorityWorker = 21] = "PriorityWorker", a[a.PriorityMainThreadWorker = 22] = "PriorityMainThreadWorker", a[a.GetImageBitMap = 23] = "GetImageBitMap", a[a.AuthWriter = 24] = "AuthWriter", a[a.AuthReader = 25] = "AuthReader", a[a.AuthClear = 26] = "AuthClear", a[a.AuthPage = 27] = "AuthPage", a))(z || {}), ee = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.Bg = 1] = "Bg", a[a.ServiceFloat = 2] = "ServiceFloat", a[a.Float = 3] = "Float", a[a.TopFloat = 4] = "TopFloat", a))(ee || {}), Xe = /* @__PURE__ */ ((a) => (a[a.Cursor = 1] = "Cursor", a[a.TextCreate = 2] = "TextCreate", a))(Xe || {}), Te = /* @__PURE__ */ ((a) => (a[a.Top = 1] = "Top", a[a.Bottom = 2] = "Bottom", a))(Te || {}), ut = /* @__PURE__ */ ((a) => (a[a.none = 1] = "none", a[a.all = 2] = "all", a[a.both = 3] = "both", a[a.proportional = 4] = "proportional", a))(ut || {}), rn = /* @__PURE__ */ ((a) => (a[a.Pending = 0] = "Pending", a[a.Start = 1] = "Start", a[a.Doing = 2] = "Doing", a[a.Done = 3] = "Done", a[a.Unwritable = 4] = "Unwritable", a))(rn || {}), qe = /* @__PURE__ */ ((a) => (a[a.inside = 0] = "inside", a[a.outside = 1] = "outside", a[a.intersect = 2] = "intersect", a))(qe || {}), Dt = /* @__PURE__ */ ((a) => (a.renderPage = "renderPage", a.addPage = "addPage", a.deletePage = "deletePage", a.addElement = "addElement", a.deleteElement = "deleteElement", a.clearPage = "clearPage", a.clearViewScenePath = "clearViewScenePath", a.clearView = "clearView", a))(Dt || {}), Kt = /* @__PURE__ */ ((a) => (a.setAuth = "setAuth", a.setShow = "addShow", a.setHide = "setHide", a.setClear = "setClear", a))(Kt || {});
|
|
16
16
|
const an = {
|
|
17
17
|
linear: (a) => a,
|
|
18
18
|
easeInQuad: (a) => a * a,
|
|
@@ -494,38 +494,38 @@ class V extends k {
|
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
var $e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
497
|
-
function
|
|
497
|
+
function Pe(a) {
|
|
498
498
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
499
499
|
}
|
|
500
|
-
var ln = typeof $e == "object" && $e && $e.Object === Object && $e, ts = ln, hn = ts, un = typeof self == "object" && self && self.Object === Object && self, dn = hn || un || Function("return this")(),
|
|
500
|
+
var ln = typeof $e == "object" && $e && $e.Object === Object && $e, ts = ln, hn = ts, un = typeof self == "object" && self && self.Object === Object && self, dn = hn || un || Function("return this")(), Jt = dn, pn = Jt, fn = pn.Symbol, fo = fn, ai = fo, es = Object.prototype, gn = es.hasOwnProperty, Mn = es.toString, Re = ai ? ai.toStringTag : void 0;
|
|
501
501
|
function yn(a) {
|
|
502
|
-
var o = gn.call(a,
|
|
502
|
+
var o = gn.call(a, Re), t = a[Re];
|
|
503
503
|
try {
|
|
504
|
-
a[
|
|
504
|
+
a[Re] = void 0;
|
|
505
505
|
var e = !0;
|
|
506
506
|
} catch {
|
|
507
507
|
}
|
|
508
508
|
var i = Mn.call(a);
|
|
509
|
-
return e && (o ? a[
|
|
509
|
+
return e && (o ? a[Re] = t : delete a[Re]), i;
|
|
510
510
|
}
|
|
511
511
|
var wn = yn, mn = Object.prototype, In = mn.toString;
|
|
512
512
|
function vn(a) {
|
|
513
513
|
return In.call(a);
|
|
514
514
|
}
|
|
515
|
-
var Nn = vn,
|
|
515
|
+
var Nn = vn, ci = fo, Tn = wn, Sn = Nn, Cn = "[object Null]", kn = "[object Undefined]", li = ci ? ci.toStringTag : void 0;
|
|
516
516
|
function xn(a) {
|
|
517
|
-
return a == null ? a === void 0 ? kn : Cn :
|
|
517
|
+
return a == null ? a === void 0 ? kn : Cn : li && li in Object(a) ? Tn(a) : Sn(a);
|
|
518
518
|
}
|
|
519
|
-
var
|
|
519
|
+
var we = xn;
|
|
520
520
|
function zn(a) {
|
|
521
521
|
return a != null && typeof a == "object";
|
|
522
522
|
}
|
|
523
|
-
var se = zn, bn =
|
|
523
|
+
var se = zn, bn = we, Pn = se, Ln = "[object Number]";
|
|
524
524
|
function jn(a) {
|
|
525
525
|
return typeof a == "number" || Pn(a) && bn(a) == Ln;
|
|
526
526
|
}
|
|
527
527
|
var Dn = jn;
|
|
528
|
-
const ie = /* @__PURE__ */
|
|
528
|
+
const ie = /* @__PURE__ */ Pe(Dn);
|
|
529
529
|
function An() {
|
|
530
530
|
this.__data__ = [], this.size = 0;
|
|
531
531
|
}
|
|
@@ -533,7 +533,7 @@ var En = An;
|
|
|
533
533
|
function On(a, o) {
|
|
534
534
|
return a === o || a !== a && o !== o;
|
|
535
535
|
}
|
|
536
|
-
var
|
|
536
|
+
var Ho = On, Rn = Ho;
|
|
537
537
|
function Yn(a, o) {
|
|
538
538
|
for (var t = a.length; t--; )
|
|
539
539
|
if (Rn(a[t][0], o))
|
|
@@ -563,19 +563,19 @@ function qn(a, o) {
|
|
|
563
563
|
return e < 0 ? (++this.size, t.push([a, o])) : t[e][1] = o, this;
|
|
564
564
|
}
|
|
565
565
|
var Kn = qn, _n = En, tr = Fn, er = Qn, or = Jn, ir = Kn;
|
|
566
|
-
function
|
|
566
|
+
function Le(a) {
|
|
567
567
|
var o = -1, t = a == null ? 0 : a.length;
|
|
568
568
|
for (this.clear(); ++o < t; ) {
|
|
569
569
|
var e = a[o];
|
|
570
570
|
this.set(e[0], e[1]);
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
var Mo =
|
|
573
|
+
Le.prototype.clear = _n;
|
|
574
|
+
Le.prototype.delete = tr;
|
|
575
|
+
Le.prototype.get = er;
|
|
576
|
+
Le.prototype.has = or;
|
|
577
|
+
Le.prototype.set = ir;
|
|
578
|
+
var Mo = Le, sr = Mo;
|
|
579
579
|
function nr() {
|
|
580
580
|
this.__data__ = new sr(), this.size = 0;
|
|
581
581
|
}
|
|
@@ -597,19 +597,19 @@ function pr(a) {
|
|
|
597
597
|
var o = typeof a;
|
|
598
598
|
return a != null && (o == "object" || o == "function");
|
|
599
599
|
}
|
|
600
|
-
var
|
|
600
|
+
var ue = pr, fr = we, gr = ue, Mr = "[object AsyncFunction]", yr = "[object Function]", wr = "[object GeneratorFunction]", mr = "[object Proxy]";
|
|
601
601
|
function Ir(a) {
|
|
602
602
|
if (!gr(a))
|
|
603
603
|
return !1;
|
|
604
604
|
var o = fr(a);
|
|
605
605
|
return o == yr || o == wr || o == Mr || o == mr;
|
|
606
606
|
}
|
|
607
|
-
var os = Ir, vr =
|
|
607
|
+
var os = Ir, vr = Jt, Nr = vr["__core-js_shared__"], Tr = Nr, Co = Tr, hi = function() {
|
|
608
608
|
var a = /[^.]+$/.exec(Co && Co.keys && Co.keys.IE_PROTO || "");
|
|
609
609
|
return a ? "Symbol(src)_1." + a : "";
|
|
610
610
|
}();
|
|
611
611
|
function Sr(a) {
|
|
612
|
-
return !!
|
|
612
|
+
return !!hi && hi in a;
|
|
613
613
|
}
|
|
614
614
|
var Cr = Sr, kr = Function.prototype, xr = kr.toString;
|
|
615
615
|
function zr(a) {
|
|
@@ -625,7 +625,7 @@ function zr(a) {
|
|
|
625
625
|
}
|
|
626
626
|
return "";
|
|
627
627
|
}
|
|
628
|
-
var is = zr, br = os, Pr = Cr, Lr =
|
|
628
|
+
var is = zr, br = os, Pr = Cr, Lr = ue, jr = is, Dr = /[\\^$.*+?()[\]{}|]/g, Ar = /^\[object .+?Constructor\]$/, Er = Function.prototype, Or = Object.prototype, Rr = Er.toString, Yr = Or.hasOwnProperty, Wr = RegExp(
|
|
629
629
|
"^" + Rr.call(Yr).replace(Dr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
630
630
|
);
|
|
631
631
|
function Ur(a) {
|
|
@@ -643,9 +643,9 @@ function Qr(a, o) {
|
|
|
643
643
|
var t = $r(a, o);
|
|
644
644
|
return Hr(t) ? t : void 0;
|
|
645
645
|
}
|
|
646
|
-
var
|
|
646
|
+
var me = Qr, Gr = me, Zr = Jt, Jr = Gr(Zr, "Map"), $o = Jr, Xr = me, qr = Xr(Object, "create"), yo = qr, ui = yo;
|
|
647
647
|
function Kr() {
|
|
648
|
-
this.__data__ =
|
|
648
|
+
this.__data__ = ui ? ui(null) : {}, this.size = 0;
|
|
649
649
|
}
|
|
650
650
|
var _r = Kr;
|
|
651
651
|
function ta(a) {
|
|
@@ -672,24 +672,24 @@ function ga(a, o) {
|
|
|
672
672
|
return this.size += this.has(a) ? 0 : 1, t[a] = pa && o === void 0 ? fa : o, this;
|
|
673
673
|
}
|
|
674
674
|
var Ma = ga, ya = _r, wa = ea, ma = aa, Ia = da, va = Ma;
|
|
675
|
-
function
|
|
675
|
+
function je(a) {
|
|
676
676
|
var o = -1, t = a == null ? 0 : a.length;
|
|
677
677
|
for (this.clear(); ++o < t; ) {
|
|
678
678
|
var e = a[o];
|
|
679
679
|
this.set(e[0], e[1]);
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
var Na =
|
|
682
|
+
je.prototype.clear = ya;
|
|
683
|
+
je.prototype.delete = wa;
|
|
684
|
+
je.prototype.get = ma;
|
|
685
|
+
je.prototype.has = Ia;
|
|
686
|
+
je.prototype.set = va;
|
|
687
|
+
var Na = je, di = Na, Ta = Mo, Sa = $o;
|
|
688
688
|
function Ca() {
|
|
689
689
|
this.size = 0, this.__data__ = {
|
|
690
|
-
hash: new
|
|
690
|
+
hash: new di(),
|
|
691
691
|
map: new (Sa || Ta)(),
|
|
692
|
-
string: new
|
|
692
|
+
string: new di()
|
|
693
693
|
};
|
|
694
694
|
}
|
|
695
695
|
var ka = Ca;
|
|
@@ -721,19 +721,19 @@ function Ba(a, o) {
|
|
|
721
721
|
return t.set(a, o), this.size += t.size == e ? 0 : 1, this;
|
|
722
722
|
}
|
|
723
723
|
var Va = Ba, Fa = ka, Ha = Da, $a = Oa, Qa = Wa, Ga = Va;
|
|
724
|
-
function
|
|
724
|
+
function De(a) {
|
|
725
725
|
var o = -1, t = a == null ? 0 : a.length;
|
|
726
726
|
for (this.clear(); ++o < t; ) {
|
|
727
727
|
var e = a[o];
|
|
728
728
|
this.set(e[0], e[1]);
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
var ss =
|
|
731
|
+
De.prototype.clear = Fa;
|
|
732
|
+
De.prototype.delete = Ha;
|
|
733
|
+
De.prototype.get = $a;
|
|
734
|
+
De.prototype.has = Qa;
|
|
735
|
+
De.prototype.set = Ga;
|
|
736
|
+
var ss = De, Za = Mo, Ja = $o, Xa = ss, qa = 200;
|
|
737
737
|
function Ka(a, o) {
|
|
738
738
|
var t = this.__data__;
|
|
739
739
|
if (t instanceof Za) {
|
|
@@ -745,37 +745,37 @@ function Ka(a, o) {
|
|
|
745
745
|
return t.set(a, o), this.size = t.size, this;
|
|
746
746
|
}
|
|
747
747
|
var _a = Ka, tc = Mo, ec = rr, oc = cr, ic = hr, sc = dr, nc = _a;
|
|
748
|
-
function
|
|
748
|
+
function Ae(a) {
|
|
749
749
|
var o = this.__data__ = new tc(a);
|
|
750
750
|
this.size = o.size;
|
|
751
751
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
var ns =
|
|
752
|
+
Ae.prototype.clear = ec;
|
|
753
|
+
Ae.prototype.delete = oc;
|
|
754
|
+
Ae.prototype.get = ic;
|
|
755
|
+
Ae.prototype.has = sc;
|
|
756
|
+
Ae.prototype.set = nc;
|
|
757
|
+
var ns = Ae;
|
|
758
758
|
function rc(a, o) {
|
|
759
759
|
for (var t = -1, e = a == null ? 0 : a.length; ++t < e && o(a[t], t, a) !== !1; )
|
|
760
760
|
;
|
|
761
761
|
return a;
|
|
762
762
|
}
|
|
763
|
-
var ac = rc, cc =
|
|
763
|
+
var ac = rc, cc = me, lc = function() {
|
|
764
764
|
try {
|
|
765
765
|
var a = cc(Object, "defineProperty");
|
|
766
766
|
return a({}, "", {}), a;
|
|
767
767
|
} catch {
|
|
768
768
|
}
|
|
769
|
-
}(), hc = lc,
|
|
769
|
+
}(), hc = lc, pi = hc;
|
|
770
770
|
function uc(a, o, t) {
|
|
771
|
-
o == "__proto__" &&
|
|
771
|
+
o == "__proto__" && pi ? pi(a, o, {
|
|
772
772
|
configurable: !0,
|
|
773
773
|
enumerable: !0,
|
|
774
774
|
value: t,
|
|
775
775
|
writable: !0
|
|
776
776
|
}) : a[o] = t;
|
|
777
777
|
}
|
|
778
|
-
var rs = uc, dc = rs, pc =
|
|
778
|
+
var rs = uc, dc = rs, pc = Ho, fc = Object.prototype, gc = fc.hasOwnProperty;
|
|
779
779
|
function Mc(a, o, t) {
|
|
780
780
|
var e = a[o];
|
|
781
781
|
(!(gc.call(a, o) && pc(e, t)) || t === void 0 && !(o in a)) && dc(a, o, t);
|
|
@@ -796,13 +796,13 @@ function Ic(a, o) {
|
|
|
796
796
|
e[t] = o(t);
|
|
797
797
|
return e;
|
|
798
798
|
}
|
|
799
|
-
var vc = Ic, Nc =
|
|
799
|
+
var vc = Ic, Nc = we, Tc = se, Sc = "[object Arguments]";
|
|
800
800
|
function Cc(a) {
|
|
801
801
|
return Tc(a) && Nc(a) == Sc;
|
|
802
802
|
}
|
|
803
|
-
var kc = Cc,
|
|
803
|
+
var kc = Cc, fi = kc, xc = se, cs = Object.prototype, zc = cs.hasOwnProperty, bc = cs.propertyIsEnumerable, Pc = fi(/* @__PURE__ */ function() {
|
|
804
804
|
return arguments;
|
|
805
|
-
}()) ?
|
|
805
|
+
}()) ? fi : function(a) {
|
|
806
806
|
return xc(a) && zc.call(a, "callee") && !bc.call(a, "callee");
|
|
807
807
|
}, Lc = Pc, jc = Array.isArray, Io = jc, _e = { exports: {} };
|
|
808
808
|
function Dc() {
|
|
@@ -811,10 +811,10 @@ function Dc() {
|
|
|
811
811
|
var Ac = Dc;
|
|
812
812
|
_e.exports;
|
|
813
813
|
(function(a, o) {
|
|
814
|
-
var t =
|
|
814
|
+
var t = Jt, e = Ac, i = o && !o.nodeType && o, s = i && !0 && a && !a.nodeType && a, n = s && s.exports === i, r = n ? t.Buffer : void 0, c = r ? r.isBuffer : void 0, l = c || e;
|
|
815
815
|
a.exports = l;
|
|
816
816
|
})(_e, _e.exports);
|
|
817
|
-
var
|
|
817
|
+
var Qo = _e.exports, Ec = 9007199254740991, Oc = /^(?:0|[1-9]\d*)$/;
|
|
818
818
|
function Rc(a, o) {
|
|
819
819
|
var t = typeof a;
|
|
820
820
|
return o = o ?? Ec, !!o && (t == "number" || t != "symbol" && Oc.test(a)) && a > -1 && a % 1 == 0 && a < o;
|
|
@@ -823,7 +823,7 @@ var Yc = Rc, Wc = 9007199254740991;
|
|
|
823
823
|
function Uc(a) {
|
|
824
824
|
return typeof a == "number" && a > -1 && a % 1 == 0 && a <= Wc;
|
|
825
825
|
}
|
|
826
|
-
var ls = Uc, Bc =
|
|
826
|
+
var ls = Uc, Bc = we, Vc = ls, Fc = se, Hc = "[object Arguments]", $c = "[object Array]", Qc = "[object Boolean]", Gc = "[object Date]", Zc = "[object Error]", Jc = "[object Function]", Xc = "[object Map]", qc = "[object Number]", Kc = "[object Object]", _c = "[object RegExp]", tl = "[object Set]", el = "[object String]", ol = "[object WeakMap]", il = "[object ArrayBuffer]", sl = "[object DataView]", nl = "[object Float32Array]", rl = "[object Float64Array]", al = "[object Int8Array]", cl = "[object Int16Array]", ll = "[object Int32Array]", hl = "[object Uint8Array]", ul = "[object Uint8ClampedArray]", dl = "[object Uint16Array]", pl = "[object Uint32Array]", wt = {};
|
|
827
827
|
wt[nl] = wt[rl] = wt[al] = wt[cl] = wt[ll] = wt[hl] = wt[ul] = wt[dl] = wt[pl] = !0;
|
|
828
828
|
wt[Hc] = wt[$c] = wt[il] = wt[Qc] = wt[sl] = wt[Gc] = wt[Zc] = wt[Jc] = wt[Xc] = wt[qc] = wt[Kc] = wt[_c] = wt[tl] = wt[el] = wt[ol] = !1;
|
|
829
829
|
function fl(a) {
|
|
@@ -835,7 +835,7 @@ function Ml(a) {
|
|
|
835
835
|
return a(o);
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
var
|
|
838
|
+
var Go = Ml, to = { exports: {} };
|
|
839
839
|
to.exports;
|
|
840
840
|
(function(a, o) {
|
|
841
841
|
var t = ts, e = o && !o.nodeType && o, i = e && !0 && a && !a.nodeType && a, s = i && i.exports === e, n = s && t.process, r = function() {
|
|
@@ -847,7 +847,7 @@ to.exports;
|
|
|
847
847
|
}();
|
|
848
848
|
a.exports = r;
|
|
849
849
|
})(to, to.exports);
|
|
850
|
-
var
|
|
850
|
+
var Zo = to.exports, yl = gl, wl = Go, gi = Zo, Mi = gi && gi.isTypedArray, ml = Mi ? wl(Mi) : yl, hs = ml, Il = vc, vl = Lc, Nl = Io, Tl = Qo, Sl = Yc, Cl = hs, kl = Object.prototype, xl = kl.hasOwnProperty;
|
|
851
851
|
function zl(a, o) {
|
|
852
852
|
var t = Nl(a), e = !t && vl(a), i = !t && !e && Tl(a), s = !t && !e && !i && Cl(a), n = t || e || i || s, r = n ? Il(a.length, String) : [], c = r.length;
|
|
853
853
|
for (var l in a)
|
|
@@ -863,13 +863,13 @@ function Pl(a) {
|
|
|
863
863
|
var o = a && a.constructor, t = typeof o == "function" && o.prototype || bl;
|
|
864
864
|
return a === t;
|
|
865
865
|
}
|
|
866
|
-
var
|
|
866
|
+
var Jo = Pl;
|
|
867
867
|
function Ll(a, o) {
|
|
868
868
|
return function(t) {
|
|
869
869
|
return a(o(t));
|
|
870
870
|
};
|
|
871
871
|
}
|
|
872
|
-
var ds = Ll, jl = ds, Dl = jl(Object.keys, Object), Al = Dl, El =
|
|
872
|
+
var ds = Ll, jl = ds, Dl = jl(Object.keys, Object), Al = Dl, El = Jo, Ol = Al, Rl = Object.prototype, Yl = Rl.hasOwnProperty;
|
|
873
873
|
function Wl(a) {
|
|
874
874
|
if (!El(a))
|
|
875
875
|
return Ol(a);
|
|
@@ -886,7 +886,7 @@ var ps = Fl, Hl = us, $l = Ul, Ql = ps;
|
|
|
886
886
|
function Gl(a) {
|
|
887
887
|
return Ql(a) ? Hl(a) : $l(a);
|
|
888
888
|
}
|
|
889
|
-
var
|
|
889
|
+
var Xo = Gl, Zl = mo, Jl = Xo;
|
|
890
890
|
function Xl(a, o) {
|
|
891
891
|
return a && Zl(o, Jl(o), a);
|
|
892
892
|
}
|
|
@@ -898,7 +898,7 @@ function Kl(a) {
|
|
|
898
898
|
o.push(t);
|
|
899
899
|
return o;
|
|
900
900
|
}
|
|
901
|
-
var _l = Kl, th =
|
|
901
|
+
var _l = Kl, th = ue, eh = Jo, oh = _l, ih = Object.prototype, sh = ih.hasOwnProperty;
|
|
902
902
|
function nh(a) {
|
|
903
903
|
if (!th(a))
|
|
904
904
|
return oh(a);
|
|
@@ -911,14 +911,14 @@ var rh = nh, ah = us, ch = rh, lh = ps;
|
|
|
911
911
|
function hh(a) {
|
|
912
912
|
return lh(a) ? ah(a, !0) : ch(a);
|
|
913
913
|
}
|
|
914
|
-
var
|
|
914
|
+
var qo = hh, uh = mo, dh = qo;
|
|
915
915
|
function ph(a, o) {
|
|
916
916
|
return a && uh(o, dh(o), a);
|
|
917
917
|
}
|
|
918
918
|
var fh = ph, eo = { exports: {} };
|
|
919
919
|
eo.exports;
|
|
920
920
|
(function(a, o) {
|
|
921
|
-
var t =
|
|
921
|
+
var t = Jt, e = o && !o.nodeType && o, i = e && !0 && a && !a.nodeType && a, s = i && i.exports === e, n = s ? t.Buffer : void 0, r = n ? n.allocUnsafe : void 0;
|
|
922
922
|
function c(l, h) {
|
|
923
923
|
if (h)
|
|
924
924
|
return l.slice();
|
|
@@ -946,11 +946,11 @@ var mh = wh;
|
|
|
946
946
|
function Ih() {
|
|
947
947
|
return [];
|
|
948
948
|
}
|
|
949
|
-
var fs = Ih, vh = mh, Nh = fs, Th = Object.prototype, Sh = Th.propertyIsEnumerable,
|
|
950
|
-
return a == null ? [] : (a = Object(a), vh(
|
|
949
|
+
var fs = Ih, vh = mh, Nh = fs, Th = Object.prototype, Sh = Th.propertyIsEnumerable, yi = Object.getOwnPropertySymbols, Ch = yi ? function(a) {
|
|
950
|
+
return a == null ? [] : (a = Object(a), vh(yi(a), function(o) {
|
|
951
951
|
return Sh.call(a, o);
|
|
952
952
|
}));
|
|
953
|
-
} : Nh,
|
|
953
|
+
} : Nh, Ko = Ch, kh = mo, xh = Ko;
|
|
954
954
|
function zh(a, o) {
|
|
955
955
|
return kh(a, xh(a), o);
|
|
956
956
|
}
|
|
@@ -960,7 +960,7 @@ function Ph(a, o) {
|
|
|
960
960
|
a[i + t] = o[t];
|
|
961
961
|
return a;
|
|
962
962
|
}
|
|
963
|
-
var gs = Ph, Lh = ds, jh = Lh(Object.getPrototypeOf, Object), Ms = jh, Dh = gs, Ah = Ms, Eh =
|
|
963
|
+
var gs = Ph, Lh = ds, jh = Lh(Object.getPrototypeOf, Object), Ms = jh, Dh = gs, Ah = Ms, Eh = Ko, Oh = fs, Rh = Object.getOwnPropertySymbols, Yh = Rh ? function(a) {
|
|
964
964
|
for (var o = []; a; )
|
|
965
965
|
Dh(o, Eh(a)), a = Ah(a);
|
|
966
966
|
return o;
|
|
@@ -973,43 +973,43 @@ function $h(a, o, t) {
|
|
|
973
973
|
var e = o(a);
|
|
974
974
|
return Hh(a) ? e : Fh(e, t(a));
|
|
975
975
|
}
|
|
976
|
-
var ws = $h, Qh = ws, Gh =
|
|
976
|
+
var ws = $h, Qh = ws, Gh = Ko, Zh = Xo;
|
|
977
977
|
function Jh(a) {
|
|
978
978
|
return Qh(a, Zh, Gh);
|
|
979
979
|
}
|
|
980
|
-
var ms = Jh, Xh = ws, qh = ys, Kh =
|
|
980
|
+
var ms = Jh, Xh = ws, qh = ys, Kh = qo;
|
|
981
981
|
function _h(a) {
|
|
982
982
|
return Xh(a, Kh, qh);
|
|
983
983
|
}
|
|
984
|
-
var tu = _h, eu =
|
|
985
|
-
(
|
|
986
|
-
var o = Is(a), t = o == yu ? a.constructor : void 0, e = t ?
|
|
984
|
+
var tu = _h, eu = me, ou = Jt, iu = eu(ou, "DataView"), su = iu, nu = me, ru = Jt, au = nu(ru, "Promise"), cu = au, lu = me, hu = Jt, uu = lu(hu, "Set"), du = uu, pu = me, fu = Jt, gu = pu(fu, "WeakMap"), Mu = gu, Do = su, Ao = $o, Eo = cu, Oo = du, Ro = Mu, Is = we, Ee = is, wi = "[object Map]", yu = "[object Object]", mi = "[object Promise]", Ii = "[object Set]", vi = "[object WeakMap]", Ni = "[object DataView]", wu = Ee(Do), mu = Ee(Ao), Iu = Ee(Eo), vu = Ee(Oo), Nu = Ee(Ro), fe = Is;
|
|
985
|
+
(Do && fe(new Do(new ArrayBuffer(1))) != Ni || Ao && fe(new Ao()) != wi || Eo && fe(Eo.resolve()) != mi || Oo && fe(new Oo()) != Ii || Ro && fe(new Ro()) != vi) && (fe = function(a) {
|
|
986
|
+
var o = Is(a), t = o == yu ? a.constructor : void 0, e = t ? Ee(t) : "";
|
|
987
987
|
if (e)
|
|
988
988
|
switch (e) {
|
|
989
989
|
case wu:
|
|
990
|
-
return
|
|
990
|
+
return Ni;
|
|
991
991
|
case mu:
|
|
992
|
-
return yi;
|
|
993
|
-
case Iu:
|
|
994
992
|
return wi;
|
|
995
|
-
case
|
|
993
|
+
case Iu:
|
|
996
994
|
return mi;
|
|
997
|
-
case
|
|
995
|
+
case vu:
|
|
998
996
|
return Ii;
|
|
997
|
+
case Nu:
|
|
998
|
+
return vi;
|
|
999
999
|
}
|
|
1000
1000
|
return o;
|
|
1001
1001
|
});
|
|
1002
|
-
var vo =
|
|
1002
|
+
var vo = fe, Tu = Object.prototype, Su = Tu.hasOwnProperty;
|
|
1003
1003
|
function Cu(a) {
|
|
1004
1004
|
var o = a.length, t = new a.constructor(o);
|
|
1005
1005
|
return o && typeof a[0] == "string" && Su.call(a, "index") && (t.index = a.index, t.input = a.input), t;
|
|
1006
1006
|
}
|
|
1007
|
-
var ku = Cu, xu =
|
|
1007
|
+
var ku = Cu, xu = Jt, zu = xu.Uint8Array, vs = zu, Ti = vs;
|
|
1008
1008
|
function bu(a) {
|
|
1009
1009
|
var o = new a.constructor(a.byteLength);
|
|
1010
|
-
return new
|
|
1010
|
+
return new Ti(o).set(new Ti(a)), o;
|
|
1011
1011
|
}
|
|
1012
|
-
var
|
|
1012
|
+
var _o = bu, Pu = _o;
|
|
1013
1013
|
function Lu(a, o) {
|
|
1014
1014
|
var t = o ? Pu(a.buffer) : a.buffer;
|
|
1015
1015
|
return new a.constructor(t, a.byteOffset, a.byteLength);
|
|
@@ -1019,16 +1019,16 @@ function Au(a) {
|
|
|
1019
1019
|
var o = new a.constructor(a.source, Du.exec(a));
|
|
1020
1020
|
return o.lastIndex = a.lastIndex, o;
|
|
1021
1021
|
}
|
|
1022
|
-
var Eu = Au,
|
|
1022
|
+
var Eu = Au, Si = fo, Ci = Si ? Si.prototype : void 0, ki = Ci ? Ci.valueOf : void 0;
|
|
1023
1023
|
function Ou(a) {
|
|
1024
|
-
return
|
|
1024
|
+
return ki ? Object(ki.call(a)) : {};
|
|
1025
1025
|
}
|
|
1026
|
-
var Ru = Ou, Yu =
|
|
1026
|
+
var Ru = Ou, Yu = _o;
|
|
1027
1027
|
function Wu(a, o) {
|
|
1028
1028
|
var t = o ? Yu(a.buffer) : a.buffer;
|
|
1029
1029
|
return new a.constructor(t, a.byteOffset, a.length);
|
|
1030
1030
|
}
|
|
1031
|
-
var Uu = Wu, Bu =
|
|
1031
|
+
var Uu = Wu, Bu = _o, Vu = ju, Fu = Eu, Hu = Ru, $u = Uu, Qu = "[object Boolean]", Gu = "[object Date]", Zu = "[object Map]", Ju = "[object Number]", Xu = "[object RegExp]", qu = "[object Set]", Ku = "[object String]", _u = "[object Symbol]", td = "[object ArrayBuffer]", ed = "[object DataView]", od = "[object Float32Array]", id = "[object Float64Array]", sd = "[object Int8Array]", nd = "[object Int16Array]", rd = "[object Int32Array]", ad = "[object Uint8Array]", cd = "[object Uint8ClampedArray]", ld = "[object Uint16Array]", hd = "[object Uint32Array]";
|
|
1032
1032
|
function ud(a, o, t) {
|
|
1033
1033
|
var e = a.constructor;
|
|
1034
1034
|
switch (o) {
|
|
@@ -1062,19 +1062,19 @@ function ud(a, o, t) {
|
|
|
1062
1062
|
return Hu(a);
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
|
-
var dd = ud, pd =
|
|
1065
|
+
var dd = ud, pd = ue, xi = Object.create, fd = /* @__PURE__ */ function() {
|
|
1066
1066
|
function a() {
|
|
1067
1067
|
}
|
|
1068
1068
|
return function(o) {
|
|
1069
1069
|
if (!pd(o))
|
|
1070
1070
|
return {};
|
|
1071
|
-
if (
|
|
1072
|
-
return
|
|
1071
|
+
if (xi)
|
|
1072
|
+
return xi(o);
|
|
1073
1073
|
a.prototype = o;
|
|
1074
1074
|
var t = new a();
|
|
1075
1075
|
return a.prototype = void 0, t;
|
|
1076
1076
|
};
|
|
1077
|
-
}(), gd = fd, Md = gd, yd = Ms, wd =
|
|
1077
|
+
}(), gd = fd, Md = gd, yd = Ms, wd = Jo;
|
|
1078
1078
|
function md(a) {
|
|
1079
1079
|
return typeof a.constructor == "function" && !wd(a) ? Md(yd(a)) : {};
|
|
1080
1080
|
}
|
|
@@ -1082,13 +1082,13 @@ var Id = md, vd = vo, Nd = se, Td = "[object Map]";
|
|
|
1082
1082
|
function Sd(a) {
|
|
1083
1083
|
return Nd(a) && vd(a) == Td;
|
|
1084
1084
|
}
|
|
1085
|
-
var Cd = Sd, kd = Cd, xd =
|
|
1085
|
+
var Cd = Sd, kd = Cd, xd = Go, zi = Zo, bi = zi && zi.isMap, zd = bi ? xd(bi) : kd, bd = zd, Pd = vo, Ld = se, jd = "[object Set]";
|
|
1086
1086
|
function Dd(a) {
|
|
1087
1087
|
return Ld(a) && Pd(a) == jd;
|
|
1088
1088
|
}
|
|
1089
|
-
var Ad = Dd, Ed = Ad, Od =
|
|
1090
|
-
const Uy = /* @__PURE__ */
|
|
1091
|
-
var Yd = ns, Wd = ac, Ud = as, Bd = ql, Vd = fh, Fd = gh, Hd = yh, $d = bh, Qd = Vh, Gd = ms, Zd = tu, Jd = vo, Xd = ku, qd = dd, Kd = Id, _d = Io, tp =
|
|
1089
|
+
var Ad = Dd, Ed = Ad, Od = Go, Pi = Zo, Li = Pi && Pi.isSet, Rd = Li ? Od(Li) : Ed, Ns = Rd;
|
|
1090
|
+
const Uy = /* @__PURE__ */ Pe(Ns);
|
|
1091
|
+
var Yd = ns, Wd = ac, Ud = as, Bd = ql, Vd = fh, Fd = gh, Hd = yh, $d = bh, Qd = Vh, Gd = ms, Zd = tu, Jd = vo, Xd = ku, qd = dd, Kd = Id, _d = Io, tp = Qo, ep = bd, op = ue, ip = Ns, sp = Xo, np = qo, rp = 1, ap = 2, cp = 4, Ts = "[object Arguments]", lp = "[object Array]", hp = "[object Boolean]", up = "[object Date]", dp = "[object Error]", Ss = "[object Function]", pp = "[object GeneratorFunction]", fp = "[object Map]", gp = "[object Number]", Cs = "[object Object]", Mp = "[object RegExp]", yp = "[object Set]", wp = "[object String]", mp = "[object Symbol]", Ip = "[object WeakMap]", vp = "[object ArrayBuffer]", Np = "[object DataView]", Tp = "[object Float32Array]", Sp = "[object Float64Array]", Cp = "[object Int8Array]", kp = "[object Int16Array]", xp = "[object Int32Array]", zp = "[object Uint8Array]", bp = "[object Uint8ClampedArray]", Pp = "[object Uint16Array]", Lp = "[object Uint32Array]", yt = {};
|
|
1092
1092
|
yt[Ts] = yt[lp] = yt[vp] = yt[Np] = yt[hp] = yt[up] = yt[Tp] = yt[Sp] = yt[Cp] = yt[kp] = yt[xp] = yt[fp] = yt[gp] = yt[Cs] = yt[Mp] = yt[yp] = yt[wp] = yt[mp] = yt[zp] = yt[bp] = yt[Pp] = yt[Lp] = !0;
|
|
1093
1093
|
yt[dp] = yt[Ss] = yt[Ip] = !1;
|
|
1094
1094
|
function Ke(a, o, t, e, i, s) {
|
|
@@ -1133,12 +1133,12 @@ function Op(a) {
|
|
|
1133
1133
|
return Dp(a, Ap | Ep);
|
|
1134
1134
|
}
|
|
1135
1135
|
var Rp = Op;
|
|
1136
|
-
const
|
|
1136
|
+
const de = /* @__PURE__ */ Pe(Rp), ks = "1.1.6-beta.0", Yp = "@netless/appliance-plugin", xs = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
|
|
1137
1137
|
if (typeof window < "u") {
|
|
1138
1138
|
let a = window.__netlessUA || "";
|
|
1139
1139
|
a += ` ${Yp}@${ks}_${xs}`, window.__netlessUA = a;
|
|
1140
1140
|
}
|
|
1141
|
-
const
|
|
1141
|
+
const Ft = {
|
|
1142
1142
|
syncOpt: {
|
|
1143
1143
|
interval: 500
|
|
1144
1144
|
},
|
|
@@ -1160,24 +1160,24 @@ const Vt = {
|
|
|
1160
1160
|
useBitMap: !0
|
|
1161
1161
|
}
|
|
1162
1162
|
};
|
|
1163
|
-
function
|
|
1163
|
+
function ae(a, o = !0) {
|
|
1164
1164
|
const t = a.length;
|
|
1165
1165
|
if (t < 2)
|
|
1166
1166
|
return "";
|
|
1167
1167
|
let e = a[0], i = a[1];
|
|
1168
1168
|
if (t === 2)
|
|
1169
|
-
return `M${
|
|
1169
|
+
return `M${Ie(e)}L${Ie(i)}`;
|
|
1170
1170
|
let s = "";
|
|
1171
1171
|
for (let n = 2, r = t - 1; n < r; n++)
|
|
1172
|
-
e = a[n], i = a[n + 1], s +=
|
|
1173
|
-
return o ? `M${
|
|
1172
|
+
e = a[n], i = a[n + 1], s += ve(e, i);
|
|
1173
|
+
return o ? `M${ve(a[0], a[1])}Q${Ie(a[1])}${ve(
|
|
1174
1174
|
a[1],
|
|
1175
1175
|
a[2]
|
|
1176
|
-
)}T${s}${
|
|
1176
|
+
)}T${s}${ve(a[t - 1], a[0])}${ve(a[0], a[1])}Z` : `M${Ie(a[0])}Q${Ie(a[1])}${ve(a[1], a[2])}${a.length > 3 ? "T" : ""}${s}L${Ie(a[t - 1])}`;
|
|
1177
1177
|
}
|
|
1178
1178
|
const Wt = class Wt {
|
|
1179
1179
|
constructor(o) {
|
|
1180
|
-
g(this, "syncUnitTime",
|
|
1180
|
+
g(this, "syncUnitTime", Ft.syncOpt.interval);
|
|
1181
1181
|
g(this, "vNodes");
|
|
1182
1182
|
g(this, "drawLayer");
|
|
1183
1183
|
g(this, "fullLayer");
|
|
@@ -1247,11 +1247,11 @@ const Wt = class Wt {
|
|
|
1247
1247
|
for (const c of e) {
|
|
1248
1248
|
const { thickness: l, op: h } = c;
|
|
1249
1249
|
for (const u of h) {
|
|
1250
|
-
const d = u.map((v, w) => w % 2 ? v - i[1] : v - i[0]), p = this.computEraserPoints(d, l), f =
|
|
1250
|
+
const d = u.map((v, w) => w % 2 ? v - i[1] : v - i[0]), p = this.computEraserPoints(d, l), f = ae(p, !0), M = {
|
|
1251
1251
|
pos: [0, 0],
|
|
1252
1252
|
d: f,
|
|
1253
1253
|
fillColor: "rgba(0,0,0,1)"
|
|
1254
|
-
}, y = new
|
|
1254
|
+
}, y = new he(M);
|
|
1255
1255
|
n && (y.addEventListener("beforerender", ({ detail: v }) => {
|
|
1256
1256
|
const w = v.context;
|
|
1257
1257
|
r ? w.blendFuncSeparate(w.ZERO, w.ZERO, w.ZERO, w.ZERO) : w.globalCompositeOperation = "destination-out";
|
|
@@ -1315,26 +1315,26 @@ const Wt = class Wt {
|
|
|
1315
1315
|
var w;
|
|
1316
1316
|
const { node: t, opt: e, vNodes: i, willSerializeData: s, targetNode: n } = o, { zIndex: r, translate: c, angle: l, originPoint: h, scenePoint: u, scale: d, pointMap: p, thickness: f } = e;
|
|
1317
1317
|
let M;
|
|
1318
|
-
const y = n &&
|
|
1318
|
+
const y = n && de(n) || i.get(t.name);
|
|
1319
1319
|
if (!y) return;
|
|
1320
1320
|
ie(r) && (t.setAttribute("zIndex", r), y.opt.zIndex = r);
|
|
1321
1321
|
const v = t.parent;
|
|
1322
1322
|
if (v) {
|
|
1323
1323
|
if (h && d && n) {
|
|
1324
1324
|
const m = [y.op[0], y.op[1]];
|
|
1325
|
-
|
|
1325
|
+
ei(y.op, u, d, c);
|
|
1326
1326
|
const T = [y.op[0], y.op[1]], I = [T[0] - m[0], T[1] - m[1]];
|
|
1327
1327
|
if (y.centerPos = [y.centerPos[0] + I[0], y.centerPos[1] + I[1]], y.opt.translate = void 0, y.opt.scale = void 0, y.opt.eraserlines)
|
|
1328
1328
|
for (const N of Object.values(y.opt.eraserlines)) {
|
|
1329
1329
|
const { op: x, thickness: b } = N;
|
|
1330
1330
|
N.thickness = b * Math.max(d[0], d[1]);
|
|
1331
1331
|
for (let D = 0; D < x.length; D++)
|
|
1332
|
-
|
|
1332
|
+
oi(x[D], u, d, c);
|
|
1333
1333
|
}
|
|
1334
1334
|
} else if (c)
|
|
1335
1335
|
if (t.setAttribute("translate", c), y.opt.translate = c, n) {
|
|
1336
1336
|
const m = [c[0] * v.worldScaling[0], c[1] * v.worldScaling[1]];
|
|
1337
|
-
M =
|
|
1337
|
+
M = Yo(y.rect, m), y.rect = M;
|
|
1338
1338
|
} else {
|
|
1339
1339
|
const m = Wt.getRectFromLayer(v, t.name);
|
|
1340
1340
|
y.rect = m || y.rect;
|
|
@@ -1404,7 +1404,7 @@ let Y = Wt;
|
|
|
1404
1404
|
function Fe(a) {
|
|
1405
1405
|
return JSON.parse(_s(a));
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function Ht(a) {
|
|
1408
1408
|
return tn(JSON.stringify(a));
|
|
1409
1409
|
}
|
|
1410
1410
|
const Pt = Object.keys;
|
|
@@ -1502,7 +1502,7 @@ class zs extends Y {
|
|
|
1502
1502
|
this.tmpPoints.map((u) => {
|
|
1503
1503
|
c.push(u.x, u.y, u.z);
|
|
1504
1504
|
}), this.syncTimestamp = 0, delete this.workOptions.syncUnitTime;
|
|
1505
|
-
const l =
|
|
1505
|
+
const l = Ht(c);
|
|
1506
1506
|
return (h = this.vNodes) == null || h.setInfo(e, {
|
|
1507
1507
|
rect: n,
|
|
1508
1508
|
op: c,
|
|
@@ -1574,7 +1574,7 @@ class zs extends Y {
|
|
|
1574
1574
|
const { pos: N, points: x } = i[I], { ps: b, rect: D } = this.computDrawPoints(x);
|
|
1575
1575
|
let E;
|
|
1576
1576
|
const j = x.length === 1;
|
|
1577
|
-
l === _.Stroke || j ? E =
|
|
1577
|
+
l === _.Stroke || j ? E = ae(b, !0) : E = ae(b, !1);
|
|
1578
1578
|
const A = {
|
|
1579
1579
|
pos: N,
|
|
1580
1580
|
d: E,
|
|
@@ -1605,7 +1605,7 @@ class zs extends Y {
|
|
|
1605
1605
|
size: [(y.w - 2 * Y.SafeBorderPadding) / m[0], (y.h - 2 * Y.SafeBorderPadding) / m[1]],
|
|
1606
1606
|
zIndex: u
|
|
1607
1607
|
});
|
|
1608
|
-
const N = v.map((x) => (x.pos = [x.pos[0] - this.centerPos[0], x.pos[1] - this.centerPos[1]], new
|
|
1608
|
+
const N = v.map((x) => (x.pos = [x.pos[0] - this.centerPos[0], x.pos[1] - this.centerPos[1]], new he(x)));
|
|
1609
1609
|
T.append(...N), I && T.seal(), M && this.drawEraserlines({
|
|
1610
1610
|
group: T,
|
|
1611
1611
|
eraserlines: M,
|
|
@@ -1918,7 +1918,7 @@ class bs extends Y {
|
|
|
1918
1918
|
this.tmpPoints.forEach((r) => {
|
|
1919
1919
|
i.push(r.x, r.y);
|
|
1920
1920
|
});
|
|
1921
|
-
const s =
|
|
1921
|
+
const s = Ht(i);
|
|
1922
1922
|
return {
|
|
1923
1923
|
rect: e && {
|
|
1924
1924
|
x: e.x * this.fullLayer.worldScaling[0] + this.fullLayer.worldPosition[0],
|
|
@@ -1998,9 +1998,9 @@ class bs extends Y {
|
|
|
1998
1998
|
async draw(t) {
|
|
1999
1999
|
const { attrs: e, tasks: i, isDot: s, layer: n } = t, { duration: r } = this.workOptions;
|
|
2000
2000
|
for (const c of i) {
|
|
2001
|
-
const l = new
|
|
2001
|
+
const l = new he(), { pos: h, points: u } = c;
|
|
2002
2002
|
let d;
|
|
2003
|
-
s ? d =
|
|
2003
|
+
s ? d = ae(u, !0) : d = ae(u, !1), l.attr({
|
|
2004
2004
|
...e,
|
|
2005
2005
|
pos: h,
|
|
2006
2006
|
d
|
|
@@ -2066,7 +2066,7 @@ class bs extends Y {
|
|
|
2066
2066
|
}), i.length && i.forEach((s) => s.remove()), e;
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
|
-
const
|
|
2069
|
+
const Se = class Se extends Y {
|
|
2070
2070
|
constructor(t, e) {
|
|
2071
2071
|
super(t);
|
|
2072
2072
|
g(this, "canRotate", !1);
|
|
@@ -2089,7 +2089,7 @@ const Te = class Te extends Y {
|
|
|
2089
2089
|
super.setWorkOptions(t);
|
|
2090
2090
|
}
|
|
2091
2091
|
createEraserRect(t) {
|
|
2092
|
-
const e = t[0] * this.worldScaling[0] + this.worldPosition[0], i = t[1] * this.worldScaling[1] + this.worldPosition[1], { width: s, height: n } =
|
|
2092
|
+
const e = t[0] * this.worldScaling[0] + this.worldPosition[0], i = t[1] * this.worldScaling[1] + this.worldPosition[1], { width: s, height: n } = Se.eraserSizes[this.workOptions.thickness];
|
|
2093
2093
|
this.eraserRect = {
|
|
2094
2094
|
x: e - s * 0.5,
|
|
2095
2095
|
y: i - n * 0.5,
|
|
@@ -2100,7 +2100,7 @@ const Te = class Te extends Y {
|
|
|
2100
2100
|
computRectCenterPoints() {
|
|
2101
2101
|
const t = this.tmpPoints.slice(-2);
|
|
2102
2102
|
if (this.tmpPoints.length === 4) {
|
|
2103
|
-
const e = new k(this.tmpPoints[0], this.tmpPoints[1]), i = new k(this.tmpPoints[2], this.tmpPoints[3]), s = k.Sub(i, e).uni(), n = k.Dist(e, i), { width: r, height: c } =
|
|
2103
|
+
const e = new k(this.tmpPoints[0], this.tmpPoints[1]), i = new k(this.tmpPoints[2], this.tmpPoints[3]), s = k.Sub(i, e).uni(), n = k.Dist(e, i), { width: r, height: c } = Se.eraserSizes[this.workOptions.thickness], l = Math.min(r, c), h = Math.round(n / l);
|
|
2104
2104
|
if (h > 1) {
|
|
2105
2105
|
const u = [];
|
|
2106
2106
|
for (let d = 0; d < h; d++) {
|
|
@@ -2113,7 +2113,7 @@ const Te = class Te extends Y {
|
|
|
2113
2113
|
return t;
|
|
2114
2114
|
}
|
|
2115
2115
|
isNear(t, e) {
|
|
2116
|
-
const i = new k(t[0], t[1]), s = new k(e[0], e[1]), { width: n, height: r } =
|
|
2116
|
+
const i = new k(t[0], t[1]), s = new k(e[0], e[1]), { width: n, height: r } = Se.eraserSizes[this.workOptions.thickness];
|
|
2117
2117
|
return k.Dist(i, s) < Math.hypot(n, r) * 0.5;
|
|
2118
2118
|
}
|
|
2119
2119
|
remove(t) {
|
|
@@ -2127,7 +2127,7 @@ const Te = class Te extends Y {
|
|
|
2127
2127
|
l.push(d), c.push(new V(d.x, d.y));
|
|
2128
2128
|
}
|
|
2129
2129
|
const h = c.length && Mt(c) || n.rect;
|
|
2130
|
-
co(h, this.eraserRect) && (l.length > 1 ?
|
|
2130
|
+
co(h, this.eraserRect) && (l.length > 1 ? Vo.polyline(l.map((d) => d.XY), this.eraserPolyline).length && i.add(n.name) : i.add(n.name), s = gt(s, h));
|
|
2131
2131
|
}
|
|
2132
2132
|
return i.forEach((n) => {
|
|
2133
2133
|
var c;
|
|
@@ -2194,13 +2194,13 @@ const Te = class Te extends Y {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
};
|
|
2196
2196
|
// 来源于white-sdk
|
|
2197
|
-
g(
|
|
2197
|
+
g(Se, "eraserSizes", Object.freeze([
|
|
2198
2198
|
Object.freeze({ width: 18, height: 26 }),
|
|
2199
2199
|
Object.freeze({ width: 26, height: 34 }),
|
|
2200
2200
|
Object.freeze({ width: 34, height: 50 })
|
|
2201
2201
|
]));
|
|
2202
|
-
let oo =
|
|
2203
|
-
const
|
|
2202
|
+
let oo = Se;
|
|
2203
|
+
const _t = "++", H = "selector", ko = "all";
|
|
2204
2204
|
var Wp = "__lodash_hash_undefined__";
|
|
2205
2205
|
function Up(a) {
|
|
2206
2206
|
return this.__data__.set(a, Wp), this;
|
|
@@ -2276,7 +2276,7 @@ function af(a) {
|
|
|
2276
2276
|
t[++o] = e;
|
|
2277
2277
|
}), t;
|
|
2278
2278
|
}
|
|
2279
|
-
var cf = af,
|
|
2279
|
+
var cf = af, ji = fo, Di = vs, lf = Ho, hf = Ps, uf = rf, df = cf, pf = 1, ff = 2, gf = "[object Boolean]", Mf = "[object Date]", yf = "[object Error]", wf = "[object Map]", mf = "[object Number]", If = "[object RegExp]", vf = "[object Set]", Nf = "[object String]", Tf = "[object Symbol]", Sf = "[object ArrayBuffer]", Cf = "[object DataView]", Ai = ji ? ji.prototype : void 0, xo = Ai ? Ai.valueOf : void 0;
|
|
2280
2280
|
function kf(a, o, t, e, i, s, n) {
|
|
2281
2281
|
switch (t) {
|
|
2282
2282
|
case Cf:
|
|
@@ -2284,7 +2284,7 @@ function kf(a, o, t, e, i, s, n) {
|
|
|
2284
2284
|
return !1;
|
|
2285
2285
|
a = a.buffer, o = o.buffer;
|
|
2286
2286
|
case Sf:
|
|
2287
|
-
return !(a.byteLength != o.byteLength || !s(new
|
|
2287
|
+
return !(a.byteLength != o.byteLength || !s(new Di(a), new Di(o)));
|
|
2288
2288
|
case gf:
|
|
2289
2289
|
case Mf:
|
|
2290
2290
|
case mf:
|
|
@@ -2312,9 +2312,9 @@ function kf(a, o, t, e, i, s, n) {
|
|
|
2312
2312
|
}
|
|
2313
2313
|
return !1;
|
|
2314
2314
|
}
|
|
2315
|
-
var xf = kf,
|
|
2315
|
+
var xf = kf, Ei = ms, zf = 1, bf = Object.prototype, Pf = bf.hasOwnProperty;
|
|
2316
2316
|
function Lf(a, o, t, e, i, s) {
|
|
2317
|
-
var n = t & zf, r =
|
|
2317
|
+
var n = t & zf, r = Ei(a), c = r.length, l = Ei(o), h = l.length;
|
|
2318
2318
|
if (c != h && !n)
|
|
2319
2319
|
return !1;
|
|
2320
2320
|
for (var u = c; u--; ) {
|
|
@@ -2344,20 +2344,20 @@ function Lf(a, o, t, e, i, s) {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
return s.delete(a), s.delete(o), M;
|
|
2346
2346
|
}
|
|
2347
|
-
var jf = Lf, zo = ns, Df = Ps, Af = xf, Ef = jf,
|
|
2347
|
+
var jf = Lf, zo = ns, Df = Ps, Af = xf, Ef = jf, Oi = vo, Ri = Io, Yi = Qo, Of = hs, Rf = 1, Wi = "[object Arguments]", Ui = "[object Array]", Qe = "[object Object]", Yf = Object.prototype, Bi = Yf.hasOwnProperty;
|
|
2348
2348
|
function Wf(a, o, t, e, i, s) {
|
|
2349
|
-
var n =
|
|
2350
|
-
c = c ==
|
|
2349
|
+
var n = Ri(a), r = Ri(o), c = n ? Ui : Oi(a), l = r ? Ui : Oi(o);
|
|
2350
|
+
c = c == Wi ? Qe : c, l = l == Wi ? Qe : l;
|
|
2351
2351
|
var h = c == Qe, u = l == Qe, d = c == l;
|
|
2352
|
-
if (d &&
|
|
2353
|
-
if (!
|
|
2352
|
+
if (d && Yi(a)) {
|
|
2353
|
+
if (!Yi(o))
|
|
2354
2354
|
return !1;
|
|
2355
2355
|
n = !0, h = !1;
|
|
2356
2356
|
}
|
|
2357
2357
|
if (d && !h)
|
|
2358
2358
|
return s || (s = new zo()), n || Of(a) ? Df(a, o, t, e, i, s) : Af(a, o, c, t, e, i, s);
|
|
2359
2359
|
if (!(t & Rf)) {
|
|
2360
|
-
var p = h &&
|
|
2360
|
+
var p = h && Bi.call(a, "__wrapped__"), f = u && Bi.call(o, "__wrapped__");
|
|
2361
2361
|
if (p || f) {
|
|
2362
2362
|
var M = p ? a.value() : a, y = f ? o.value() : o;
|
|
2363
2363
|
return s || (s = new zo()), i(M, y, t, e, s);
|
|
@@ -2365,16 +2365,16 @@ function Wf(a, o, t, e, i, s) {
|
|
|
2365
2365
|
}
|
|
2366
2366
|
return d ? (s || (s = new zo()), Ef(a, o, t, e, i, s)) : !1;
|
|
2367
2367
|
}
|
|
2368
|
-
var Uf = Wf, Bf = Uf,
|
|
2368
|
+
var Uf = Wf, Bf = Uf, Vi = se;
|
|
2369
2369
|
function Ls(a, o, t, e, i) {
|
|
2370
|
-
return a === o ? !0 : a == null || o == null || !
|
|
2370
|
+
return a === o ? !0 : a == null || o == null || !Vi(a) && !Vi(o) ? a !== a && o !== o : Bf(a, o, t, e, Ls, i);
|
|
2371
2371
|
}
|
|
2372
2372
|
var Vf = Ls, Ff = Vf;
|
|
2373
2373
|
function Hf(a, o) {
|
|
2374
2374
|
return Ff(a, o);
|
|
2375
2375
|
}
|
|
2376
2376
|
var $f = Hf;
|
|
2377
|
-
const
|
|
2377
|
+
const Ye = /* @__PURE__ */ Pe($f), po = class po extends Y {
|
|
2378
2378
|
constructor(t) {
|
|
2379
2379
|
super(t);
|
|
2380
2380
|
g(this, "toolsType", C.Selector);
|
|
@@ -2431,7 +2431,7 @@ const Re = /* @__PURE__ */ be($f), po = class po extends Y {
|
|
|
2431
2431
|
zIndex: 9999
|
|
2432
2432
|
}), l = [];
|
|
2433
2433
|
if (r) {
|
|
2434
|
-
const h = new
|
|
2434
|
+
const h = new ni({
|
|
2435
2435
|
normalize: !0,
|
|
2436
2436
|
pos: [e.w / 2, e.h / 2],
|
|
2437
2437
|
lineWidth: 1,
|
|
@@ -2446,7 +2446,7 @@ const Re = /* @__PURE__ */ be($f), po = class po extends Y {
|
|
|
2446
2446
|
const d = [
|
|
2447
2447
|
h.rect.x + h.rect.w / 2 - e.x,
|
|
2448
2448
|
h.rect.y + h.rect.h / 2 - e.y
|
|
2449
|
-
], p = new
|
|
2449
|
+
], p = new ni({
|
|
2450
2450
|
normalize: !0,
|
|
2451
2451
|
pos: d,
|
|
2452
2452
|
lineWidth: 1,
|
|
@@ -2499,7 +2499,7 @@ const Re = /* @__PURE__ */ be($f), po = class po extends Y {
|
|
|
2499
2499
|
return { type: z.None };
|
|
2500
2500
|
this.updateTempPoints(e);
|
|
2501
2501
|
const n = this.computSelector();
|
|
2502
|
-
if (this.selectIds &&
|
|
2502
|
+
if (this.selectIds && Ye(this.selectIds, n.selectIds))
|
|
2503
2503
|
return { type: z.None };
|
|
2504
2504
|
this.selectIds = n.selectIds;
|
|
2505
2505
|
const r = n.intersectRect;
|
|
@@ -2584,7 +2584,7 @@ const Re = /* @__PURE__ */ be($f), po = class po extends Y {
|
|
|
2584
2584
|
}
|
|
2585
2585
|
if (r) {
|
|
2586
2586
|
const h = r.name;
|
|
2587
|
-
if (!
|
|
2587
|
+
if (!Ye(this.oldSelectRect, r.rect)) {
|
|
2588
2588
|
const u = /* @__PURE__ */ new Map([[h, r]]);
|
|
2589
2589
|
this.getSelecteorInfo(u), this.draw(e, this.fullLayer, {
|
|
2590
2590
|
intersectRect: r.rect,
|
|
@@ -2734,7 +2734,7 @@ const Re = /* @__PURE__ */ be($f), po = class po extends Y {
|
|
|
2734
2734
|
break;
|
|
2735
2735
|
}
|
|
2736
2736
|
const b = x && [d[0] - x[0], d[1] - x[1]] || [0, 0];
|
|
2737
|
-
if (!
|
|
2737
|
+
if (!Ye(b, [0, 0]))
|
|
2738
2738
|
return await this.updateSelector({ ...t, updateSelectorOpt: {}, offset: b });
|
|
2739
2739
|
}
|
|
2740
2740
|
this.getSelecteorInfo(u), this.draw(H, l, {
|
|
@@ -2763,7 +2763,7 @@ const Re = /* @__PURE__ */ be($f), po = class po extends Y {
|
|
|
2763
2763
|
};
|
|
2764
2764
|
}
|
|
2765
2765
|
getRightServiceId(t) {
|
|
2766
|
-
return t.replace(
|
|
2766
|
+
return t.replace(_t, "-");
|
|
2767
2767
|
}
|
|
2768
2768
|
selectServiceNode(t, e, i) {
|
|
2769
2769
|
const { selectIds: s } = e, n = this.getRightServiceId(t), r = this.getSelectorRect(this.fullLayer, n);
|
|
@@ -2811,7 +2811,7 @@ const Re = /* @__PURE__ */ be($f), po = class po extends Y {
|
|
|
2811
2811
|
const e = this.oldSelectRect;
|
|
2812
2812
|
this.selectIds = [];
|
|
2813
2813
|
const i = (n = this.workId) == null ? void 0 : n.toString(), s = [t[0] * this.fullLayer.worldScaling[0] + this.fullLayer.worldPosition[0], t[1] * this.fullLayer.worldScaling[0] + this.fullLayer.worldPosition[1]];
|
|
2814
|
-
if (this.selectSingleTool(s, i, !0), this.oldSelectRect && !
|
|
2814
|
+
if (this.selectSingleTool(s, i, !0), this.oldSelectRect && !Ye(e, this.oldSelectRect))
|
|
2815
2815
|
return {
|
|
2816
2816
|
type: z.CursorHover,
|
|
2817
2817
|
dataType: F.Local,
|
|
@@ -2893,7 +2893,7 @@ class js extends Y {
|
|
|
2893
2893
|
};
|
|
2894
2894
|
const e = this.fullLayer, i = this.draw({ workId: t, layer: e });
|
|
2895
2895
|
this.oldRect = i;
|
|
2896
|
-
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n =
|
|
2896
|
+
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n = Ht(s);
|
|
2897
2897
|
return (r = this.vNodes) == null || r.setInfo(t, {
|
|
2898
2898
|
rect: i,
|
|
2899
2899
|
op: s,
|
|
@@ -2931,7 +2931,7 @@ class js extends Y {
|
|
|
2931
2931
|
strokeColor: s,
|
|
2932
2932
|
lineWidth: 0,
|
|
2933
2933
|
normalize: !1
|
|
2934
|
-
}, D = new
|
|
2934
|
+
}, D = new le(b);
|
|
2935
2935
|
if (x.append(D), !w && M && y) {
|
|
2936
2936
|
const E = {
|
|
2937
2937
|
points: M,
|
|
@@ -2942,7 +2942,7 @@ class js extends Y {
|
|
|
2942
2942
|
lineCap: u === _.Normal ? void 0 : "round",
|
|
2943
2943
|
lineWidth: n,
|
|
2944
2944
|
normalize: !1
|
|
2945
|
-
}, j = new
|
|
2945
|
+
}, j = new le(E);
|
|
2946
2946
|
x.append(j);
|
|
2947
2947
|
}
|
|
2948
2948
|
if (d && this.drawEraserlines({
|
|
@@ -3084,7 +3084,7 @@ class Ds extends Y {
|
|
|
3084
3084
|
};
|
|
3085
3085
|
const e = this.fullLayer, i = this.draw({ workId: t, layer: e, isDrawing: !1 });
|
|
3086
3086
|
this.oldRect = i;
|
|
3087
|
-
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n =
|
|
3087
|
+
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n = Ht(s);
|
|
3088
3088
|
return (r = this.vNodes) == null || r.setInfo(t, {
|
|
3089
3089
|
rect: i,
|
|
3090
3090
|
op: s,
|
|
@@ -3126,7 +3126,7 @@ class Ds extends Y {
|
|
|
3126
3126
|
h && (T.scale = h), u && (T.rotate = u), d && (T.translate = d);
|
|
3127
3127
|
const I = new Yt(T);
|
|
3128
3128
|
if (s) {
|
|
3129
|
-
const b = new
|
|
3129
|
+
const b = new he({
|
|
3130
3130
|
d: "M-4,0H4M0,-4V4",
|
|
3131
3131
|
normalize: !0,
|
|
3132
3132
|
pos: [0, 0],
|
|
@@ -3277,7 +3277,7 @@ class As extends Y {
|
|
|
3277
3277
|
};
|
|
3278
3278
|
const e = this.transformData(), i = this.fullLayer, s = this.draw({ ps: e, workId: t, layer: i, isDrawing: !1 });
|
|
3279
3279
|
this.oldRect = s;
|
|
3280
|
-
const n = e.flat(1), r =
|
|
3280
|
+
const n = e.flat(1), r = Ht(n);
|
|
3281
3281
|
return (c = this.vNodes) == null || c.setInfo(t, {
|
|
3282
3282
|
rect: s,
|
|
3283
3283
|
op: n,
|
|
@@ -3324,12 +3324,12 @@ class As extends Y {
|
|
|
3324
3324
|
scale: d,
|
|
3325
3325
|
rotate: p,
|
|
3326
3326
|
translate: f
|
|
3327
|
-
}), D = new
|
|
3327
|
+
}), D = new le({
|
|
3328
3328
|
...N,
|
|
3329
3329
|
pos: [0, 0]
|
|
3330
3330
|
});
|
|
3331
3331
|
if (b.appendChild(D), s) {
|
|
3332
|
-
const E = new
|
|
3332
|
+
const E = new he({
|
|
3333
3333
|
d: "M-4,0H4M0,-4V4",
|
|
3334
3334
|
normalize: !0,
|
|
3335
3335
|
pos: [0, 0],
|
|
@@ -3449,7 +3449,7 @@ class Es extends Y {
|
|
|
3449
3449
|
};
|
|
3450
3450
|
const e = this.fullLayer, i = this.draw({ workId: t, layer: e, isDrawing: !1 });
|
|
3451
3451
|
this.oldRect = i;
|
|
3452
|
-
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n =
|
|
3452
|
+
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n = Ht(s);
|
|
3453
3453
|
return (r = this.vNodes) == null || r.setInfo(t, {
|
|
3454
3454
|
rect: i,
|
|
3455
3455
|
op: s,
|
|
@@ -3489,7 +3489,7 @@ class Es extends Y {
|
|
|
3489
3489
|
p && (x.scale = p), f && (x.rotate = f), M && (x.translate = M);
|
|
3490
3490
|
const b = new Yt(x);
|
|
3491
3491
|
if (s) {
|
|
3492
|
-
const j = new
|
|
3492
|
+
const j = new he({
|
|
3493
3493
|
d: "M-4,0H4M0,-4V4",
|
|
3494
3494
|
normalize: !0,
|
|
3495
3495
|
pos: [0, 0],
|
|
@@ -3499,7 +3499,7 @@ class Es extends Y {
|
|
|
3499
3499
|
});
|
|
3500
3500
|
b.append(j);
|
|
3501
3501
|
}
|
|
3502
|
-
const D = new
|
|
3502
|
+
const D = new le({
|
|
3503
3503
|
...N,
|
|
3504
3504
|
pos: [0, 0]
|
|
3505
3505
|
});
|
|
@@ -3624,7 +3624,7 @@ class Os extends Y {
|
|
|
3624
3624
|
};
|
|
3625
3625
|
const e = this.fullLayer, i = this.draw({ workId: t, layer: e, isDrawing: !1 });
|
|
3626
3626
|
this.oldRect = i;
|
|
3627
|
-
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n =
|
|
3627
|
+
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n = Ht(s);
|
|
3628
3628
|
return (r = this.vNodes) == null || r.setInfo(t, {
|
|
3629
3629
|
rect: i,
|
|
3630
3630
|
op: s,
|
|
@@ -3664,7 +3664,7 @@ class Os extends Y {
|
|
|
3664
3664
|
u && (I.scale = u), d && (I.rotate = d), p && (I.translate = p);
|
|
3665
3665
|
const N = new Yt(I);
|
|
3666
3666
|
if (s) {
|
|
3667
|
-
const D = new
|
|
3667
|
+
const D = new he({
|
|
3668
3668
|
d: "M-4,0H4M0,-4V4",
|
|
3669
3669
|
normalize: !0,
|
|
3670
3670
|
pos: [0, 0],
|
|
@@ -3674,7 +3674,7 @@ class Os extends Y {
|
|
|
3674
3674
|
});
|
|
3675
3675
|
N.append(D);
|
|
3676
3676
|
}
|
|
3677
|
-
const x = new
|
|
3677
|
+
const x = new le({
|
|
3678
3678
|
...T,
|
|
3679
3679
|
pos: [0, 0]
|
|
3680
3680
|
});
|
|
@@ -3745,12 +3745,12 @@ class Os extends Y {
|
|
|
3745
3745
|
return e.tagName === "GROUP" && (p = e.children[0]), n && (p.setAttribute("strokeColor", n), d != null && d.strokeColor && (d.strokeColor = n)), r && (r === "transparent" ? p.setAttribute("fillColor", "rgba(0,0,0,0)") : p.setAttribute("fillColor", r), d != null && d.fillColor && (d.fillColor = r)), c === C.Polygon && l && (d.vertices = l), h && (u != null && u.opt) && ((f = u.opt) != null && f.strokeType) && (u.opt.strokeType = h), u && s.setInfo(e.name, { ...u, opt: d }), Y.updateNodeOpt(t);
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
|
-
class
|
|
3748
|
+
class Gt {
|
|
3749
3749
|
static bezier(o, t) {
|
|
3750
3750
|
const e = [];
|
|
3751
3751
|
for (let i = 0; i < t.length; i += 4) {
|
|
3752
3752
|
const s = t[i], n = t[i + 1], r = t[i + 2], c = t[i + 3];
|
|
3753
|
-
s && n && r && c ? e.push(...
|
|
3753
|
+
s && n && r && c ? e.push(...Gt.getBezierPoints(o, s, n, r, c)) : s && n && r ? e.push(...Gt.getBezierPoints(o, s, n, r)) : s && n ? e.push(...Gt.getBezierPoints(o, s, n)) : s && e.push(s);
|
|
3754
3754
|
}
|
|
3755
3755
|
return e;
|
|
3756
3756
|
}
|
|
@@ -3768,7 +3768,7 @@ class Qt {
|
|
|
3768
3768
|
static getBezierPoints(o = 10, t, e, i, s) {
|
|
3769
3769
|
let n = null;
|
|
3770
3770
|
const r = [];
|
|
3771
|
-
!i && !s ? n =
|
|
3771
|
+
!i && !s ? n = Gt.oneBezier : i && !s ? n = Gt.twoBezier : i && s && (n = Gt.threeBezier);
|
|
3772
3772
|
for (let c = 0; c < o; c++)
|
|
3773
3773
|
n && r.push(n(c / o, t, e, i, s));
|
|
3774
3774
|
return s ? r.push(s) : i && r.push(i), r;
|
|
@@ -3865,7 +3865,7 @@ class Rs extends Y {
|
|
|
3865
3865
|
};
|
|
3866
3866
|
const e = this.fullLayer, i = this.draw({ workId: t, layer: e, isDrawing: !1 });
|
|
3867
3867
|
this.oldRect = i;
|
|
3868
|
-
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n =
|
|
3868
|
+
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n = Ht(s);
|
|
3869
3869
|
return (r = this.vNodes) == null || r.setInfo(t, {
|
|
3870
3870
|
rect: i,
|
|
3871
3871
|
op: s,
|
|
@@ -3904,7 +3904,7 @@ class Rs extends Y {
|
|
|
3904
3904
|
size: [M.w, M.h]
|
|
3905
3905
|
};
|
|
3906
3906
|
h && (m.scale = h), u && (m.rotate = u), d && (m.translate = d);
|
|
3907
|
-
const T = new Yt(m), I = new
|
|
3907
|
+
const T = new Yt(m), I = new le({
|
|
3908
3908
|
...w,
|
|
3909
3909
|
pos: [0, 0]
|
|
3910
3910
|
});
|
|
@@ -3972,7 +3972,7 @@ class Rs extends Y {
|
|
|
3972
3972
|
}
|
|
3973
3973
|
}
|
|
3974
3974
|
computDrawPoints(t, e) {
|
|
3975
|
-
const i = Mt(this.tmpPoints), s = this.transformControlPoints(e), n = Math.floor(i.w * 0.1), r = Math.floor(i.h * 0.1), c = [], l = k.Add(s[0], new k(0, r, 0)), h = k.Add(s[0], new k(n, 0, 0)), u =
|
|
3975
|
+
const i = Mt(this.tmpPoints), s = this.transformControlPoints(e), n = Math.floor(i.w * 0.1), r = Math.floor(i.h * 0.1), c = [], l = k.Add(s[0], new k(0, r, 0)), h = k.Add(s[0], new k(n, 0, 0)), u = Gt.getBezierPoints(10, l, s[0], h), d = k.Sub(s[1], new k(n, 0, 0)), p = k.Add(s[1], new k(0, r, 0)), f = Gt.getBezierPoints(10, d, s[1], p), M = k.Sub(s[2], new k(0, r, 0)), y = k.Sub(s[2], new k(n, 0, 0)), v = Gt.getBezierPoints(10, M, s[2], y), w = k.Add(s[3], new k(n, 0, 0)), m = k.Sub(s[3], new k(0, r, 0)), T = Gt.getBezierPoints(10, w, s[3], m), I = n * (1 - this.ratio) * 10, N = r * (1 - this.ratio) * 10;
|
|
3976
3976
|
switch (e) {
|
|
3977
3977
|
case "bottom": {
|
|
3978
3978
|
const D = k.Sub(s[2], new k(n * 5 - I / 2, 0, 0)), E = k.Sub(s[2], new k(n * 5, -N, 0)), j = k.Sub(s[2], new k(n * 5 + I / 2, 0, 0));
|
|
@@ -4083,12 +4083,12 @@ class Rs extends Y {
|
|
|
4083
4083
|
return e.tagName === "GROUP" && (p = e.children[0]), n && (p.setAttribute("strokeColor", n), d != null && d.strokeColor && (d.strokeColor = n)), r && (r === "transparent" ? p.setAttribute("fillColor", "rgba(0,0,0,0)") : p.setAttribute("fillColor", r), d != null && d.fillColor && (d.fillColor = r)), c === C.SpeechBalloon && l && (d.placement = l), h && (u != null && u.opt) && ((f = u.opt) != null && f.strokeType) && (u.opt.strokeType = h), u && s.setInfo(e.name, { ...u, opt: d }), Y.updateNodeOpt(t);
|
|
4084
4084
|
}
|
|
4085
4085
|
}
|
|
4086
|
-
var Qf =
|
|
4086
|
+
var Qf = we, Gf = se, Zf = "[object Boolean]";
|
|
4087
4087
|
function Jf(a) {
|
|
4088
4088
|
return a === !0 || a === !1 || Gf(a) && Qf(a) == Zf;
|
|
4089
4089
|
}
|
|
4090
4090
|
var Xf = Jf;
|
|
4091
|
-
const
|
|
4091
|
+
const We = /* @__PURE__ */ Pe(Xf);
|
|
4092
4092
|
class Ve extends Y {
|
|
4093
4093
|
constructor(t) {
|
|
4094
4094
|
super(t);
|
|
@@ -4178,20 +4178,20 @@ class Ve extends Y {
|
|
|
4178
4178
|
return e !== !1 || i && Math.abs(i) % 90 > 0 ? ut.proportional : ut.all;
|
|
4179
4179
|
}
|
|
4180
4180
|
static updateNodeOpt(t) {
|
|
4181
|
-
const { node: e, opt: i, vNodes: s, targetNode: n } = t, { translate: r, originPoint: c, scenePoint: l, scale: h, angle: u, isLocked: d, zIndex: p } = i, f = n &&
|
|
4181
|
+
const { node: e, opt: i, vNodes: s, targetNode: n } = t, { translate: r, originPoint: c, scenePoint: l, scale: h, angle: u, isLocked: d, zIndex: p } = i, f = n && de(n) || s.get(e.name);
|
|
4182
4182
|
if (!f) return;
|
|
4183
4183
|
const M = e.parent;
|
|
4184
4184
|
if (M) {
|
|
4185
|
-
if (ie(p) && (e.setAttribute("zIndex", p), f.opt.zIndex = p),
|
|
4185
|
+
if (ie(p) && (e.setAttribute("zIndex", p), f.opt.zIndex = p), We(d) && (f.opt.locked = d), c && l && h && r) {
|
|
4186
4186
|
const { centerX: y, centerY: v, width: w, height: m, uniformScale: T } = f.opt, I = T !== !1 ? [h[0], h[0]] : h, N = [y, v], x = [y, v];
|
|
4187
|
-
|
|
4187
|
+
ei(x, l, I, r);
|
|
4188
4188
|
const b = [x[0] - N[0], x[1] - N[1]];
|
|
4189
4189
|
if (f.centerPos = [f.centerPos[0] + b[0], f.centerPos[1] + b[1]], f.opt.width = Math.round(w * I[0]), f.opt.height = Math.round(m * I[1]), f.opt.centerX = x[0], f.opt.centerY = x[1], f.opt.eraserlines)
|
|
4190
4190
|
for (const D of Object.values(f.opt.eraserlines)) {
|
|
4191
4191
|
const { op: E, thickness: j } = D;
|
|
4192
4192
|
D.thickness = j * Math.max(h[0], h[1]);
|
|
4193
4193
|
for (let A = 0; A < E.length; A++)
|
|
4194
|
-
|
|
4194
|
+
oi(E[A], l, h, r);
|
|
4195
4195
|
}
|
|
4196
4196
|
} else if (r) {
|
|
4197
4197
|
if (f.opt.centerX = f.opt.centerX + r[0], f.opt.centerY = f.opt.centerY + r[1], f.centerPos = [f.centerPos[0] + r[0], f.centerPos[1] + r[1]], f.opt.eraserlines)
|
|
@@ -4268,7 +4268,7 @@ class Ys extends Y {
|
|
|
4268
4268
|
};
|
|
4269
4269
|
const e = this.fullLayer, i = this.draw({ workId: t, layer: e });
|
|
4270
4270
|
this.oldRect = i;
|
|
4271
|
-
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n =
|
|
4271
|
+
const s = this.tmpPoints.map((c) => [...c.XY, 0]).flat(1), n = Ht(s);
|
|
4272
4272
|
return (r = this.vNodes) == null || r.setInfo(t, {
|
|
4273
4273
|
rect: i,
|
|
4274
4274
|
op: s,
|
|
@@ -4309,7 +4309,7 @@ class Ys extends Y {
|
|
|
4309
4309
|
lineWidth: u === _.Normal || v ? 0 : n
|
|
4310
4310
|
};
|
|
4311
4311
|
c && (T.scale = c), l && (T.rotate = l), h && (T.translate = h);
|
|
4312
|
-
const I = new
|
|
4312
|
+
const I = new he(T);
|
|
4313
4313
|
if (m.append(I), d && this.drawEraserlines({
|
|
4314
4314
|
group: m,
|
|
4315
4315
|
eraserlines: d,
|
|
@@ -4337,7 +4337,7 @@ class Ys extends Y {
|
|
|
4337
4337
|
computFullPoints(t, e) {
|
|
4338
4338
|
const i = k.Sub(this.tmpPoints[1], this.tmpPoints[0]).uni(), s = k.Per(i).mul(t / 2), n = V.Sub(this.tmpPoints[0], s), r = V.Add(this.tmpPoints[0], s), c = V.Sub(this.tmpPoints[1], s), l = V.Add(this.tmpPoints[1], s), h = V.GetSemicircleStroke(this.tmpPoints[1], c, -1, 8), u = V.GetSemicircleStroke(this.tmpPoints[0], r, -1, 8), d = [n, c, ...h, l, r, ...u];
|
|
4339
4339
|
let p;
|
|
4340
|
-
return e !== _.Normal ? p =
|
|
4340
|
+
return e !== _.Normal ? p = ae(this.tmpPoints, !1) : p = ae(d, !0), {
|
|
4341
4341
|
d: p,
|
|
4342
4342
|
rect: Mt(d),
|
|
4343
4343
|
isDot: !1,
|
|
@@ -4347,7 +4347,7 @@ class Ys extends Y {
|
|
|
4347
4347
|
computDotPoints(t) {
|
|
4348
4348
|
const e = V.GetDotStroke(this.tmpPoints[0], t / 2, 8);
|
|
4349
4349
|
return {
|
|
4350
|
-
d:
|
|
4350
|
+
d: ae(e, !0),
|
|
4351
4351
|
rect: Mt(e),
|
|
4352
4352
|
isDot: !0,
|
|
4353
4353
|
pos: this.tmpPoints[0].XY
|
|
@@ -4395,7 +4395,7 @@ class Ys extends Y {
|
|
|
4395
4395
|
}) : (e.setAttribute("strokeColor", n), e.setAttribute("fillColor", n)), (l = c == null ? void 0 : c.opt) != null && l.strokeColor && (c.opt.strokeColor = n)), r && (c != null && c.opt) && ((h = c.opt) != null && h.strokeType) && (c.opt.strokeType = r), c && s.setInfo(e.name, c), Y.updateNodeOpt(t);
|
|
4396
4396
|
}
|
|
4397
4397
|
}
|
|
4398
|
-
const
|
|
4398
|
+
const re = class re extends Y {
|
|
4399
4399
|
constructor(t) {
|
|
4400
4400
|
super(t);
|
|
4401
4401
|
g(this, "canRotate", !1);
|
|
@@ -4441,7 +4441,7 @@ const ne = class ne extends Y {
|
|
|
4441
4441
|
h: Math.floor(f.h * u[1]) + 2
|
|
4442
4442
|
};
|
|
4443
4443
|
if (this.replace(i, e, p), s && i && this.workOptions.text) {
|
|
4444
|
-
const y = await
|
|
4444
|
+
const y = await re.createLabels(this.workOptions, i, M), { labels: v, maxWidth: w } = y;
|
|
4445
4445
|
p.append(...v), M.w = Math.ceil(Math.max(w * i.worldScaling[0], M.w));
|
|
4446
4446
|
}
|
|
4447
4447
|
return l && this.drawEraserlines({
|
|
@@ -4478,7 +4478,7 @@ const ne = class ne extends Y {
|
|
|
4478
4478
|
const i = this.workId.toString(), { fontColor: s, fontBgColor: n, bold: r, italic: c, lineThrough: l, underline: h, zIndex: u } = t, d = (f = this.vNodes) == null ? void 0 : f.get(i);
|
|
4479
4479
|
if (!d)
|
|
4480
4480
|
return;
|
|
4481
|
-
s && (d.opt.fontColor = s), n && (d.opt.fontBgColor = n), r && (d.opt.bold = r), c && (d.opt.italic = c),
|
|
4481
|
+
s && (d.opt.fontColor = s), n && (d.opt.fontBgColor = n), r && (d.opt.bold = r), c && (d.opt.italic = c), We(l) && (d.opt.lineThrough = l), We(h) && (d.opt.underline = h), ie(u) && (d.opt.zIndex = u), this.oldRect = d.rect;
|
|
4482
4482
|
const p = await this.draw({
|
|
4483
4483
|
workId: i,
|
|
4484
4484
|
layer: this.fullLayer,
|
|
@@ -4503,11 +4503,11 @@ const ne = class ne extends Y {
|
|
|
4503
4503
|
return i >= 0.2 && i < 1 ? s = i * e : i <= 2 && i >= 1 ? s = i * e * 1.6 : i > 2 && i <= 3 ? s = i * e * 1.4 : i > 3 && i <= 4 ? s = i * e * 0.8 : i > 4 && (s = i * e * 0.6), Math.floor(s * 1e3) / 1e3;
|
|
4504
4504
|
}
|
|
4505
4505
|
static getSafetySnippetFontLength(t) {
|
|
4506
|
-
return Math.floor(
|
|
4506
|
+
return Math.floor(re.textImageSnippetSize * 3 / 4 / t) || 1;
|
|
4507
4507
|
}
|
|
4508
4508
|
static async createLabels(t, e, i) {
|
|
4509
4509
|
var j;
|
|
4510
|
-
const s = [], { x: n, y: r } = i, { width: c, height: l } = (j = e.parent) == null ? void 0 : j.parent, h = Fe(t.text), u = h.length, { fontSize: d, lineHeight: p, bold: f, textAlign: M, italic: y, fontFamily: v, verticalAlign: w, fontColor: m, fontBgColor: T, underline: I, lineThrough: N } = t, x =
|
|
4510
|
+
const s = [], { x: n, y: r } = i, { width: c, height: l } = (j = e.parent) == null ? void 0 : j.parent, h = Fe(t.text), u = h.length, { fontSize: d, lineHeight: p, bold: f, textAlign: M, italic: y, fontFamily: v, verticalAlign: w, fontColor: m, fontBgColor: T, underline: I, lineThrough: N } = t, x = re.getSafetySnippetRatio(e) || 1, b = Math.floor(d * x), D = re.getSafetySnippetFontLength(b);
|
|
4511
4511
|
let E = 0;
|
|
4512
4512
|
for (let A = 0; A < u; A++) {
|
|
4513
4513
|
const P = h[A], O = p || b * 1.5;
|
|
@@ -4538,9 +4538,9 @@ const ne = class ne extends Y {
|
|
|
4538
4538
|
}, W = new qs(ct), rt = await W.textImageReady;
|
|
4539
4539
|
let dt = !0;
|
|
4540
4540
|
if (rt) {
|
|
4541
|
-
const St = rt.rect && rt.rect[2],
|
|
4542
|
-
if (St &&
|
|
4543
|
-
const vt = St / x, mt =
|
|
4541
|
+
const St = rt.rect && rt.rect[2], Xt = rt.rect && rt.rect[3];
|
|
4542
|
+
if (St && Xt) {
|
|
4543
|
+
const vt = St / x, mt = Xt / x;
|
|
4544
4544
|
G = vt + G, y === "italic" && (f === "bold" ? G = G - Q * d * 1.2 : G = G - Q * d), ((J[0] + tt[0] + vt) * e.worldScaling[0] + n <= 0 || (J[0] + tt[0]) * e.worldScaling[0] + n >= c || (J[1] + tt[1] + mt) * e.worldScaling[1] + r <= 0 || (J[1] + tt[1]) * e.worldScaling[1] + r >= l) && (W.disconnect(), dt = !1), dt && q.push(W);
|
|
4545
4545
|
}
|
|
4546
4546
|
}
|
|
@@ -4557,7 +4557,7 @@ const ne = class ne extends Y {
|
|
|
4557
4557
|
points: [0, 0, Math.ceil($[0]), 0],
|
|
4558
4558
|
strokeColor: m,
|
|
4559
4559
|
className: "underline"
|
|
4560
|
-
}, dt = new
|
|
4560
|
+
}, dt = new le(rt);
|
|
4561
4561
|
q.push(dt);
|
|
4562
4562
|
}
|
|
4563
4563
|
if (N) {
|
|
@@ -4568,7 +4568,7 @@ const ne = class ne extends Y {
|
|
|
4568
4568
|
points: [0, 0, Math.ceil($[0]), 0],
|
|
4569
4569
|
strokeColor: m,
|
|
4570
4570
|
className: "lineThrough"
|
|
4571
|
-
}, rt = new
|
|
4571
|
+
}, rt = new le(W);
|
|
4572
4572
|
q.push(rt);
|
|
4573
4573
|
}
|
|
4574
4574
|
const it = {
|
|
@@ -4598,7 +4598,7 @@ const ne = class ne extends Y {
|
|
|
4598
4598
|
fontSize: v,
|
|
4599
4599
|
textInfos: w,
|
|
4600
4600
|
zIndex: m
|
|
4601
|
-
} = i, T = n &&
|
|
4601
|
+
} = i, T = n && de(n) || s.get(e.name);
|
|
4602
4602
|
if (!T || !e.parent) return;
|
|
4603
4603
|
const N = T.opt;
|
|
4604
4604
|
if (ie(m) && (e.setAttribute("zIndex", m), T.opt.zIndex = m), c && N.fontColor && (N.fontColor = c, e.children.forEach((x) => {
|
|
@@ -4607,21 +4607,21 @@ const ne = class ne extends Y {
|
|
|
4607
4607
|
});
|
|
4608
4608
|
})), r && N.fontBgColor && (N.fontBgColor = r, e.children.forEach((x) => {
|
|
4609
4609
|
x.tagName === "GROUP" && x.setAttribute("bgcolor", r);
|
|
4610
|
-
})), p && (N.bold = p), f && (N.italic = f),
|
|
4610
|
+
})), p && (N.bold = p), f && (N.italic = f), We(M) && (N.lineThrough = M), We(y) && (N.underline = y), v && (N.fontSize = v), h && u && d && n && N.boxPoint) {
|
|
4611
4611
|
const x = w == null ? void 0 : w.get(e.name);
|
|
4612
4612
|
if (x) {
|
|
4613
4613
|
const { fontSize: j, boxSize: A } = x;
|
|
4614
4614
|
N.boxSize = A || N.boxSize, N.fontSize = j || N.fontSize;
|
|
4615
4615
|
}
|
|
4616
4616
|
const b = [N.boxPoint[0], N.boxPoint[1]];
|
|
4617
|
-
|
|
4617
|
+
ei(N.boxPoint, u, d, l);
|
|
4618
4618
|
const D = [T.op[0], T.op[1]], E = [D[0] - b[0], D[1] - b[1]];
|
|
4619
4619
|
if (T.centerPos = [T.centerPos[0] + E[0], T.centerPos[1] + E[1]], T.opt.eraserlines)
|
|
4620
4620
|
for (const j of Object.values(T.opt.eraserlines)) {
|
|
4621
4621
|
const { op: A, thickness: P } = j;
|
|
4622
4622
|
j.thickness = P * Math.max(d[0], d[1]);
|
|
4623
4623
|
for (let O = 0; O < A.length; O++)
|
|
4624
|
-
|
|
4624
|
+
oi(A[O], u, d, l);
|
|
4625
4625
|
}
|
|
4626
4626
|
} else if (l && N.boxPoint && (N.boxPoint = [N.boxPoint[0] + l[0], N.boxPoint[1] + l[1]], T.centerPos = [T.centerPos[0] + l[0], T.centerPos[1] + l[1]], T.opt.eraserlines))
|
|
4627
4627
|
for (const x of Object.values(T.opt.eraserlines)) {
|
|
@@ -4658,9 +4658,9 @@ const ne = class ne extends Y {
|
|
|
4658
4658
|
}
|
|
4659
4659
|
};
|
|
4660
4660
|
// 4k
|
|
4661
|
-
g(
|
|
4662
|
-
let no =
|
|
4663
|
-
const
|
|
4661
|
+
g(re, "textImageSnippetSize", 1024 * 4), g(re, "SafeBorderPadding", 30);
|
|
4662
|
+
let no = re;
|
|
4663
|
+
const Ce = class Ce extends Y {
|
|
4664
4664
|
constructor(t, e) {
|
|
4665
4665
|
super(t);
|
|
4666
4666
|
g(this, "canRotate", !1);
|
|
@@ -4678,7 +4678,7 @@ const Se = class Se extends Y {
|
|
|
4678
4678
|
consumeService() {
|
|
4679
4679
|
}
|
|
4680
4680
|
createEraserRect(t) {
|
|
4681
|
-
const e = t[0] * this.worldScaling[0] + this.worldPosition[0], i = t[1] * this.worldScaling[1] + this.worldPosition[1], { width: s, height: n } =
|
|
4681
|
+
const e = t[0] * this.worldScaling[0] + this.worldPosition[0], i = t[1] * this.worldScaling[1] + this.worldPosition[1], { width: s, height: n } = Ce.eraserSizes[this.workOptions.thickness];
|
|
4682
4682
|
this.eraserRect = {
|
|
4683
4683
|
x: e - s * 0.5,
|
|
4684
4684
|
y: i - n * 0.5,
|
|
@@ -4689,7 +4689,7 @@ const Se = class Se extends Y {
|
|
|
4689
4689
|
computRectCenterPoints() {
|
|
4690
4690
|
const t = this.tmpPoints.slice(-2);
|
|
4691
4691
|
if (this.tmpPoints.length === 4) {
|
|
4692
|
-
const e = new k(this.tmpPoints[0], this.tmpPoints[1]), i = new k(this.tmpPoints[2], this.tmpPoints[3]), s = k.Sub(i, e).uni(), n = k.Dist(e, i), { width: r, height: c } =
|
|
4692
|
+
const e = new k(this.tmpPoints[0], this.tmpPoints[1]), i = new k(this.tmpPoints[2], this.tmpPoints[3]), s = k.Sub(i, e).uni(), n = k.Dist(e, i), { width: r, height: c } = Ce.eraserSizes[this.workOptions.thickness], l = Math.min(r, c), h = Math.round(n / l);
|
|
4693
4693
|
if (h > 1) {
|
|
4694
4694
|
const u = [];
|
|
4695
4695
|
for (let d = 0; d < h; d++) {
|
|
@@ -4702,7 +4702,7 @@ const Se = class Se extends Y {
|
|
|
4702
4702
|
return t;
|
|
4703
4703
|
}
|
|
4704
4704
|
isNear(t, e) {
|
|
4705
|
-
const i = new k(t[0], t[1]), s = new k(e[0], e[1]), { width: n, height: r } =
|
|
4705
|
+
const i = new k(t[0], t[1]), s = new k(e[0], e[1]), { width: n, height: r } = Ce.eraserSizes[this.workOptions.thickness];
|
|
4706
4706
|
return k.Dist(i, s) < Math.hypot(n, r) * 0.5;
|
|
4707
4707
|
}
|
|
4708
4708
|
cutPolyline(t, e) {
|
|
@@ -4766,7 +4766,7 @@ const Se = class Se extends Y {
|
|
|
4766
4766
|
const f = d.length && Mt(d) || c.rect;
|
|
4767
4767
|
if (co(f, this.eraserRect)) {
|
|
4768
4768
|
if (p.length > 1) {
|
|
4769
|
-
const M =
|
|
4769
|
+
const M = Vo.polyline(p.map((y) => y.XY), this.eraserPolyline);
|
|
4770
4770
|
if (M.length && (i.add(c.name), !u)) {
|
|
4771
4771
|
const y = this.translateIntersect(M), v = this.cutPolyline(y, p);
|
|
4772
4772
|
for (let w = 0; w < v.length; w++) {
|
|
@@ -4851,7 +4851,7 @@ const Se = class Se extends Y {
|
|
|
4851
4851
|
getCanEraserNodeMap(t) {
|
|
4852
4852
|
var e;
|
|
4853
4853
|
if (this.serviceWork) {
|
|
4854
|
-
const i =
|
|
4854
|
+
const i = de(t), s = this.serviceWork.selectorWorkShapes, n = this.serviceWork.workShapes;
|
|
4855
4855
|
for (const r of s.values())
|
|
4856
4856
|
if ((e = r.selectIds) != null && e.length)
|
|
4857
4857
|
for (const c of r.selectIds)
|
|
@@ -4864,13 +4864,13 @@ const Se = class Se extends Y {
|
|
|
4864
4864
|
}
|
|
4865
4865
|
};
|
|
4866
4866
|
// 来源于white-sdk
|
|
4867
|
-
g(
|
|
4867
|
+
g(Ce, "eraserSizes", Object.freeze([
|
|
4868
4868
|
Object.freeze({ width: 18, height: 26 }),
|
|
4869
4869
|
Object.freeze({ width: 26, height: 34 }),
|
|
4870
4870
|
Object.freeze({ width: 34, height: 50 })
|
|
4871
4871
|
]));
|
|
4872
|
-
let ro =
|
|
4873
|
-
const
|
|
4872
|
+
let ro = Ce;
|
|
4873
|
+
const Be = class Be extends Y {
|
|
4874
4874
|
constructor(t) {
|
|
4875
4875
|
super(t);
|
|
4876
4876
|
g(this, "canRotate", !1);
|
|
@@ -4882,7 +4882,7 @@ const Ue = class Ue extends Y {
|
|
|
4882
4882
|
g(this, "worldScaling");
|
|
4883
4883
|
g(this, "eraserRect");
|
|
4884
4884
|
g(this, "eraserPolyline");
|
|
4885
|
-
g(this, "syncUnitTime",
|
|
4885
|
+
g(this, "syncUnitTime", Ft.syncOpt.interval);
|
|
4886
4886
|
g(this, "syncIndex", 0);
|
|
4887
4887
|
g(this, "syncTimestamp");
|
|
4888
4888
|
this.workOptions = t.toolsOpt, this.worldPosition = this.fullLayer.worldPosition, this.worldScaling = this.fullLayer.worldScaling, this.syncTimestamp = 0;
|
|
@@ -4922,7 +4922,7 @@ const Ue = class Ue extends Y {
|
|
|
4922
4922
|
return;
|
|
4923
4923
|
const e = this.worldPosition;
|
|
4924
4924
|
let i = Mt(this.tmpPoints, t);
|
|
4925
|
-
i =
|
|
4925
|
+
i = Yo(i, e), i = tg(i, this.worldScaling, e);
|
|
4926
4926
|
const { nodeRange: s } = this.vNodes.getRectIntersectRange(i);
|
|
4927
4927
|
if (!s.size)
|
|
4928
4928
|
return;
|
|
@@ -4938,7 +4938,7 @@ const Ue = class Ue extends Y {
|
|
|
4938
4938
|
this.tmpPoints.length === 1 && n.length === 0 && n.push([this.tmpPoints[0].XY, this.tmpPoints[0].XY]);
|
|
4939
4939
|
const c = /* @__PURE__ */ new Map();
|
|
4940
4940
|
for (const [l, h] of s.entries()) {
|
|
4941
|
-
let u =
|
|
4941
|
+
let u = Yo(h.rect, [-e[0], -e[1]]);
|
|
4942
4942
|
u = {
|
|
4943
4943
|
x: u.x / this.worldScaling[0],
|
|
4944
4944
|
y: u.y / this.worldScaling[1],
|
|
@@ -4947,12 +4947,12 @@ const Ue = class Ue extends Y {
|
|
|
4947
4947
|
};
|
|
4948
4948
|
const d = [u.x, u.y, u.x + u.w, u.y + u.h], p = [], f = [];
|
|
4949
4949
|
for (const y of n)
|
|
4950
|
-
|
|
4950
|
+
Vo.polyline(y, d, p);
|
|
4951
4951
|
if (p.length && h.opt)
|
|
4952
4952
|
for (const y of p) {
|
|
4953
4953
|
const v = [];
|
|
4954
4954
|
for (let w = 0; w < y.length; w++)
|
|
4955
|
-
w !== 0 &&
|
|
4955
|
+
w !== 0 && Ye(y[w], y[w - 1]) || v.push(...y[w]);
|
|
4956
4956
|
f.push(v);
|
|
4957
4957
|
}
|
|
4958
4958
|
h.opt.eraserlines || (h.opt.eraserlines = []), h.opt.eraserlines && (h.opt.eraserlines.push({ op: f, thickness: t }), c.set(l, h));
|
|
@@ -5002,7 +5002,7 @@ const Ue = class Ue extends Y {
|
|
|
5002
5002
|
type: z.None,
|
|
5003
5003
|
...this.baseConsumeResult
|
|
5004
5004
|
};
|
|
5005
|
-
const { thickness: i } = this.workOptions, { width: s, height: n } =
|
|
5005
|
+
const { thickness: i } = this.workOptions, { width: s, height: n } = Be.eraserSizes[i], r = Math.max(s, n) / this.worldScaling[0], c = this.tmpPoints.length, l = this.tmpPoints[this.tmpPoints.length - 1], h = this.updateTempPoints(e, r), u = this.tmpPoints[this.tmpPoints.length - 1];
|
|
5006
5006
|
if (c === this.tmpPoints.length && u.equalsXY(l.x, l.y))
|
|
5007
5007
|
return {
|
|
5008
5008
|
type: z.None,
|
|
@@ -5063,7 +5063,7 @@ const Ue = class Ue extends Y {
|
|
|
5063
5063
|
type: z.None,
|
|
5064
5064
|
...this.baseConsumeResult
|
|
5065
5065
|
};
|
|
5066
|
-
const { thickness: i } = this.workOptions, { width: s, height: n } =
|
|
5066
|
+
const { thickness: i } = this.workOptions, { width: s, height: n } = Be.eraserSizes[i], r = Math.max(s, n) / this.worldScaling[0], c = this.getChangeNodes(r);
|
|
5067
5067
|
if (!(c != null && c.size))
|
|
5068
5068
|
return {
|
|
5069
5069
|
type: z.FullWork,
|
|
@@ -5074,7 +5074,7 @@ const Ue = class Ue extends Y {
|
|
|
5074
5074
|
this.tmpPoints.map((u) => {
|
|
5075
5075
|
l.push(u.x, u.y, r / 2);
|
|
5076
5076
|
});
|
|
5077
|
-
const h =
|
|
5077
|
+
const h = Ht(l);
|
|
5078
5078
|
return {
|
|
5079
5079
|
...this.baseConsumeResult,
|
|
5080
5080
|
type: z.FullWork,
|
|
@@ -5089,12 +5089,12 @@ const Ue = class Ue extends Y {
|
|
|
5089
5089
|
}
|
|
5090
5090
|
};
|
|
5091
5091
|
// 来源于white-sdk
|
|
5092
|
-
g(
|
|
5092
|
+
g(Be, "eraserSizes", Object.freeze([
|
|
5093
5093
|
Object.freeze({ width: 18, height: 26 }),
|
|
5094
5094
|
Object.freeze({ width: 26, height: 34 }),
|
|
5095
5095
|
Object.freeze({ width: 34, height: 50 })
|
|
5096
5096
|
]));
|
|
5097
|
-
let ao =
|
|
5097
|
+
let ao = Be;
|
|
5098
5098
|
function qf(a) {
|
|
5099
5099
|
switch (a) {
|
|
5100
5100
|
case C.Arrow:
|
|
@@ -5186,7 +5186,7 @@ function gt(a, o) {
|
|
|
5186
5186
|
}
|
|
5187
5187
|
return o || a;
|
|
5188
5188
|
}
|
|
5189
|
-
function
|
|
5189
|
+
function ti(a, o) {
|
|
5190
5190
|
if (a && o) {
|
|
5191
5191
|
const t = Math.min(a.originX, o.originX), e = Math.min(a.originY, o.originY), i = Math.max(a.originX + a.width, o.originX + o.width), s = Math.max(a.originY + a.height, o.originY + o.height), n = i - t, r = s - e;
|
|
5192
5192
|
return { originX: t, originY: e, width: n, height: r };
|
|
@@ -5204,7 +5204,7 @@ function Mt(a, o = 0) {
|
|
|
5204
5204
|
function co(a, o) {
|
|
5205
5205
|
return !(a.x + a.w < o.x || a.x > o.x + o.w || a.y + a.h < o.y || a.y > o.y + o.h);
|
|
5206
5206
|
}
|
|
5207
|
-
function
|
|
5207
|
+
function Yo(a, o) {
|
|
5208
5208
|
return {
|
|
5209
5209
|
x: a.x + o[0],
|
|
5210
5210
|
y: a.y + o[1],
|
|
@@ -5238,14 +5238,14 @@ function og(a, o, t) {
|
|
|
5238
5238
|
a[i] = r.x, a[i + 1] = r.y;
|
|
5239
5239
|
}
|
|
5240
5240
|
}
|
|
5241
|
-
function
|
|
5241
|
+
function ei(a, o, t, e = [0, 0]) {
|
|
5242
5242
|
const i = new k(o[0], o[1]);
|
|
5243
5243
|
for (let s = 0; s < a.length; s += 3) {
|
|
5244
5244
|
const n = new k(a[s], a[s + 1]), r = new k(t[0], t[1]), c = k.ScaleWOrigin(n, r, i);
|
|
5245
5245
|
a[s] = c.x + e[0], a[s + 1] = c.y + e[1];
|
|
5246
5246
|
}
|
|
5247
5247
|
}
|
|
5248
|
-
function
|
|
5248
|
+
function oi(a, o, t, e = [0, 0]) {
|
|
5249
5249
|
const i = new k(o[0], o[1]);
|
|
5250
5250
|
for (let s = 0; s < a.length; s += 2) {
|
|
5251
5251
|
const n = new k(a[s], a[s + 1]), r = new k(t[0], t[1]), c = k.ScaleWOrigin(n, r, i);
|
|
@@ -5273,16 +5273,16 @@ const sg = (a) => {
|
|
|
5273
5273
|
}
|
|
5274
5274
|
return !1;
|
|
5275
5275
|
};
|
|
5276
|
-
function
|
|
5276
|
+
function Ie(a) {
|
|
5277
5277
|
return `${lo(a.x)},${lo(a.y)} `;
|
|
5278
5278
|
}
|
|
5279
|
-
function
|
|
5279
|
+
function ve(a, o) {
|
|
5280
5280
|
return `${lo((a.x + o.x) / 2)},${lo((a.y + o.y) / 2)} `;
|
|
5281
5281
|
}
|
|
5282
5282
|
function lo(a) {
|
|
5283
5283
|
return +a.toFixed(4);
|
|
5284
5284
|
}
|
|
5285
|
-
const
|
|
5285
|
+
const Zt = (a, o) => new Promise(function(t) {
|
|
5286
5286
|
window.requestIdleCallback ? requestIdleCallback(() => {
|
|
5287
5287
|
t(1);
|
|
5288
5288
|
}, { timeout: o }) : setTimeout(() => {
|
|
@@ -5292,7 +5292,7 @@ const Gt = (a, o) => new Promise(function(t) {
|
|
|
5292
5292
|
a();
|
|
5293
5293
|
}, () => {
|
|
5294
5294
|
a();
|
|
5295
|
-
}),
|
|
5295
|
+
}), ce = (a) => {
|
|
5296
5296
|
const o = (a == null ? void 0 : a.webkitBackingStorePixelRatio) || (a == null ? void 0 : a.mozBackingStorePixelRatio) || (a == null ? void 0 : a.msBackingStorePixelRatio) || (a == null ? void 0 : a.oBackingStorePixelRatio) || (a == null ? void 0 : a.backingStorePixelRatio) || 1;
|
|
5297
5297
|
return Math.max(1, (window.devicePixelRatio || 1) / o);
|
|
5298
5298
|
}, Vy = (a, o) => a.x + a.w < o.x || a.x > o.x + o.w || a.y + a.h < o.y || a.y > o.y + o.h ? qe.outside : a.x >= o.x && a.y >= o.y && a.x + a.w <= o.x + o.w && a.y + a.h <= o.y + o.h ? qe.inside : qe.intersect;
|
|
@@ -5320,13 +5320,13 @@ class rg {
|
|
|
5320
5320
|
return Lo((o = this.plugin) == null ? void 0 : o.attributes[this.authSpace]) || {};
|
|
5321
5321
|
}
|
|
5322
5322
|
getUidFromKey(o) {
|
|
5323
|
-
return o.split(
|
|
5323
|
+
return o.split(_t).length === 2 && o.split(_t)[0] || this.uid;
|
|
5324
5324
|
}
|
|
5325
5325
|
isLocalId(o) {
|
|
5326
|
-
return o.split(
|
|
5326
|
+
return o.split(_t).length === 1;
|
|
5327
5327
|
}
|
|
5328
5328
|
getLocalId(o) {
|
|
5329
|
-
return o.split(
|
|
5329
|
+
return o.split(_t)[1];
|
|
5330
5330
|
}
|
|
5331
5331
|
isSelector(o) {
|
|
5332
5332
|
return this.getLocalId(o) === H;
|
|
@@ -5372,7 +5372,7 @@ const At = class At extends rg {
|
|
|
5372
5372
|
return !!(i && Object.keys(i).find((s) => this.isOwn(s) && this.getLocalId(s) === H));
|
|
5373
5373
|
}
|
|
5374
5374
|
addStorageStateListener(t) {
|
|
5375
|
-
this.stateDisposer =
|
|
5375
|
+
this.stateDisposer = si(async () => {
|
|
5376
5376
|
var c;
|
|
5377
5377
|
const e = this.getNamespaceData(), { diffView: i, diffScenePath: s, diffData: n } = this.diffFunByView(this.serviceStorage, e);
|
|
5378
5378
|
this.serviceStorage = e;
|
|
@@ -5514,10 +5514,10 @@ const At = class At extends rg {
|
|
|
5514
5514
|
return c;
|
|
5515
5515
|
}
|
|
5516
5516
|
transformKey(t) {
|
|
5517
|
-
return this.uid +
|
|
5517
|
+
return this.uid + _t + t;
|
|
5518
5518
|
}
|
|
5519
5519
|
isOwn(t) {
|
|
5520
|
-
return t.split(
|
|
5520
|
+
return t.split(_t)[0] === this.uid;
|
|
5521
5521
|
}
|
|
5522
5522
|
dispatch(t) {
|
|
5523
5523
|
const { type: e, workId: i, ops: s, index: n, opt: r, toolsType: c, removeIds: l, updateNodeOpt: h, op: u, selectIds: d, isSync: p, scenePath: f, viewId: M } = t;
|
|
@@ -5525,7 +5525,7 @@ const At = class At extends rg {
|
|
|
5525
5525
|
switch (e) {
|
|
5526
5526
|
case z.Clear:
|
|
5527
5527
|
const y = {};
|
|
5528
|
-
f && this.storage[M] && this.storage[M][f] ? (delete this.storage[M][f], this.setState(y, { isSync: p, viewId: M, scenePath: f })) : this.storage[M] && (delete this.storage[M], this.setState(y, { isSync: p, viewId: M, scenePath: "" })),
|
|
5528
|
+
f && this.storage[M] && this.storage[M][f] ? (delete this.storage[M][f], this.setState(y, { isSync: p, viewId: M, scenePath: f })) : this.storage[M] && (delete this.storage[M], this.setState(y, { isSync: p, viewId: M, scenePath: "" })), Zt(() => {
|
|
5529
5529
|
var I;
|
|
5530
5530
|
(I = this.control.miniMapManager) == null || I.updateMiniMapCamera(M);
|
|
5531
5531
|
}, At.syncInterval);
|
|
@@ -5581,7 +5581,7 @@ const At = class At extends rg {
|
|
|
5581
5581
|
toolsType: b,
|
|
5582
5582
|
opt: D,
|
|
5583
5583
|
ops: E
|
|
5584
|
-
}, { isSync: p, viewId: M, scenePath: f }),
|
|
5584
|
+
}, { isSync: p, viewId: M, scenePath: f }), Zt(() => {
|
|
5585
5585
|
var j;
|
|
5586
5586
|
(j = this.control.miniMapManager) == null || j.updateMiniMapCamera(M);
|
|
5587
5587
|
}, At.syncInterval));
|
|
@@ -5596,7 +5596,7 @@ const At = class At extends rg {
|
|
|
5596
5596
|
scenePath: f,
|
|
5597
5597
|
elementId: N
|
|
5598
5598
|
}), this.updateValue(N, void 0, { isSync: p, viewId: M, scenePath: f }));
|
|
5599
|
-
}),
|
|
5599
|
+
}), Zt(() => {
|
|
5600
5600
|
var N;
|
|
5601
5601
|
(N = this.control.miniMapManager) == null || N.updateMiniMapCamera(M);
|
|
5602
5602
|
}, At.syncInterval));
|
|
@@ -5605,7 +5605,7 @@ const At = class At extends rg {
|
|
|
5605
5605
|
case z.UpdateNode:
|
|
5606
5606
|
if (f && i && (h || s || r)) {
|
|
5607
5607
|
const I = this.isLocalId(i.toString()) ? this.transformKey(i) : i, N = this.storage[M] && this.storage[M][f] && this.storage[M][f][I] || void 0;
|
|
5608
|
-
N && (N.updateNodeOpt = h, (s || u) && (N.ops = s, N.op = u), r && (N.opt = r), N.type = z.FullWork, this.updateValue(I.toString(), N, { isSync: p, viewId: M, scenePath: f }),
|
|
5608
|
+
N && (N.updateNodeOpt = h, (s || u) && (N.ops = s, N.op = u), r && (N.opt = r), N.type = z.FullWork, this.updateValue(I.toString(), N, { isSync: p, viewId: M, scenePath: f }), Zt(() => {
|
|
5609
5609
|
var x;
|
|
5610
5610
|
(x = this.control.miniMapManager) == null || x.updateMiniMapCamera(M);
|
|
5611
5611
|
}, At.syncInterval));
|
|
@@ -5651,7 +5651,7 @@ const At = class At extends rg {
|
|
|
5651
5651
|
}
|
|
5652
5652
|
runSyncService(t) {
|
|
5653
5653
|
this.asyncClockState || (this.asyncClockState = !0, setTimeout(() => {
|
|
5654
|
-
t.isSync ? (this.asyncClockState = !1, this.syncSerivice(t.isAfterUpdate)) :
|
|
5654
|
+
t.isSync ? (this.asyncClockState = !1, this.syncSerivice(t.isAfterUpdate)) : Zt(() => {
|
|
5655
5655
|
this.asyncClockState = !1, this.syncSerivice(t.isAfterUpdate);
|
|
5656
5656
|
}, At.syncInterval);
|
|
5657
5657
|
}, t != null && t.isSync ? 0 : At.syncInterval));
|
|
@@ -5732,14 +5732,14 @@ const At = class At extends rg {
|
|
|
5732
5732
|
s || (this.serviceStorage[t][e] = i), (n = this.plugin) == null || n.updateAttributes([this.namespace, t, e], i);
|
|
5733
5733
|
}
|
|
5734
5734
|
keyTransformWorkId(t) {
|
|
5735
|
-
const e = t.split(
|
|
5735
|
+
const e = t.split(_t);
|
|
5736
5736
|
return e.length === 2 ? e[1] : t;
|
|
5737
5737
|
}
|
|
5738
5738
|
destroy() {
|
|
5739
5739
|
this.removeStorageStateListener(), this.serviceStorage = {}, this.storage = {}, this.removeAuthStateListener(), this.authStorage = {};
|
|
5740
5740
|
}
|
|
5741
5741
|
dispatchPageAuth(t, e = !0) {
|
|
5742
|
-
var l, h, u, d, p, f, M, y, v, w, m, T, I, N, x, b, D, E, j, A, P, O, ot, tt, $, J, Q, G, q, at, Tt, it, ct, W, rt, dt, St,
|
|
5742
|
+
var l, h, u, d, p, f, M, y, v, w, m, T, I, N, x, b, D, E, j, A, P, O, ot, tt, $, J, Q, G, q, at, Tt, it, ct, W, rt, dt, St, Xt;
|
|
5743
5743
|
const { operation: i, viewId: s, scenePath: n, pageId: r, pageData: c } = t;
|
|
5744
5744
|
switch (i) {
|
|
5745
5745
|
case Dt.addPage: {
|
|
@@ -5752,11 +5752,11 @@ const At = class At extends rg {
|
|
|
5752
5752
|
render: (c == null ? void 0 : c.render) || "localSelf",
|
|
5753
5753
|
pages: {}
|
|
5754
5754
|
}, Object.keys(mt[s][n].pages).length && vt.push("pages", r);
|
|
5755
|
-
const
|
|
5755
|
+
const pe = {};
|
|
5756
5756
|
if (c != null && c.elementIds)
|
|
5757
|
-
for (const
|
|
5758
|
-
|
|
5759
|
-
mt[s][n].pages[r] =
|
|
5757
|
+
for (const zt of c.elementIds.keys())
|
|
5758
|
+
pe[zt] = !0;
|
|
5759
|
+
mt[s][n].pages[r] = pe, e && (vt.length === 1 ? (l = this.plugin) == null || l.updateAttributes(vt, ht(this.authStorage)) : vt.length === 2 ? (h = this.plugin) == null || h.updateAttributes(vt, ht(mt)) : vt.length === 3 ? (u = this.plugin) == null || u.updateAttributes(vt, ht(mt[s])) : vt.length === 4 ? (d = this.plugin) == null || d.updateAttributes(vt, ht(mt[s][n])) : (p = this.plugin) == null || p.updateAttributes(vt, ht(pe)));
|
|
5760
5760
|
return;
|
|
5761
5761
|
}
|
|
5762
5762
|
case Dt.renderPage: {
|
|
@@ -5798,7 +5798,7 @@ const At = class At extends rg {
|
|
|
5798
5798
|
case Dt.clearView: {
|
|
5799
5799
|
if (!s)
|
|
5800
5800
|
return;
|
|
5801
|
-
(St = (dt = this.authStorage) == null ? void 0 : dt.pageAuth) != null && St[s] && (delete this.authStorage.pageAuth[s], e && ((
|
|
5801
|
+
(St = (dt = this.authStorage) == null ? void 0 : dt.pageAuth) != null && St[s] && (delete this.authStorage.pageAuth[s], e && ((Xt = this.plugin) == null || Xt.updateAttributes([this.authSpace, "pageAuth", s], void 0)));
|
|
5802
5802
|
return;
|
|
5803
5803
|
}
|
|
5804
5804
|
}
|
|
@@ -5808,7 +5808,7 @@ const At = class At extends rg {
|
|
|
5808
5808
|
const { operation: i, viewId: s, uid: n, renderData: r, isClear: c } = t;
|
|
5809
5809
|
if (s)
|
|
5810
5810
|
switch (i) {
|
|
5811
|
-
case
|
|
5811
|
+
case Kt.setAuth: {
|
|
5812
5812
|
if (!r || r.render === void 0 && r.hide === void 0 && r.clear === void 0) {
|
|
5813
5813
|
this.authStorage.renderAuth && this.authStorage.renderAuth[s] && (delete this.authStorage.renderAuth[s], e && ((l = this.plugin) == null || l.updateAttributes([this.authSpace, "renderAuth", s], void 0)));
|
|
5814
5814
|
return;
|
|
@@ -5842,7 +5842,7 @@ const At = class At extends rg {
|
|
|
5842
5842
|
e && (P.length === 1 ? (h = this.plugin) == null || h.updateAttributes(P, ht(this.authStorage)) : P.length === 2 ? (u = this.plugin) == null || u.updateAttributes(P, ht(O)) : (d = this.plugin) == null || d.updateAttributes(P, ht(O[s])));
|
|
5843
5843
|
return;
|
|
5844
5844
|
}
|
|
5845
|
-
case
|
|
5845
|
+
case Kt.setShow: {
|
|
5846
5846
|
if (!n)
|
|
5847
5847
|
return;
|
|
5848
5848
|
const P = [this.authSpace];
|
|
@@ -5851,7 +5851,7 @@ const At = class At extends rg {
|
|
|
5851
5851
|
Object.keys(O).length && P.push(s), O[s] = O[s] || {}, this.authStorage.renderAuth = O, Object.keys(O[s]).length && P.push("render"), O[s].render = O[s].render || {}, O[s].render !== !0 && (Object.keys(O[s].render).length && P.push(n), O[s].render[n] = !0), O[s].hide !== !0 && ((p = O[s].hide) != null && p[n]) && (delete O[s].hide[n], e && ((f = this.plugin) == null || f.updateAttributes([this.authSpace, "renderAuth", s, "hide", n], void 0))), e && (P.length === 1 ? (M = this.plugin) == null || M.updateAttributes(P, ht(this.authStorage)) : P.length === 2 ? (y = this.plugin) == null || y.updateAttributes(P, ht(O)) : P.length === 3 ? (v = this.plugin) == null || v.updateAttributes(P, ht(O[s])) : (w = this.plugin) == null || w.updateAttributes(P, !0));
|
|
5852
5852
|
return;
|
|
5853
5853
|
}
|
|
5854
|
-
case
|
|
5854
|
+
case Kt.setHide: {
|
|
5855
5855
|
if (!n)
|
|
5856
5856
|
return;
|
|
5857
5857
|
const P = [this.authSpace];
|
|
@@ -5860,7 +5860,7 @@ const At = class At extends rg {
|
|
|
5860
5860
|
Object.keys(O).length && P.push(s), O[s] = O[s] || {}, this.authStorage.renderAuth = O, Object.keys(O[s]).length && P.push("hide"), O[s].hide = O[s].hide || {}, O[s].hide !== !0 && (Object.keys(O[s].hide).length && P.push(n), O[s].hide[n] = !0), O[s].render !== !0 && ((m = O[s].render) != null && m[n]) && (delete O[s].render[n], e && ((T = this.plugin) == null || T.updateAttributes([this.authSpace, "renderAuth", s, "render", n], void 0))), e && (P.length === 1 ? (I = this.plugin) == null || I.updateAttributes(P, ht(this.authStorage)) : P.length === 2 ? (N = this.plugin) == null || N.updateAttributes(P, ht(O)) : P.length === 3 ? (x = this.plugin) == null || x.updateAttributes(P, ht(O[s])) : (b = this.plugin) == null || b.updateAttributes(P, !0));
|
|
5861
5861
|
return;
|
|
5862
5862
|
}
|
|
5863
|
-
case
|
|
5863
|
+
case Kt.setClear: {
|
|
5864
5864
|
if (!n)
|
|
5865
5865
|
return;
|
|
5866
5866
|
const P = [this.authSpace];
|
|
@@ -5872,7 +5872,7 @@ const At = class At extends rg {
|
|
|
5872
5872
|
}
|
|
5873
5873
|
}
|
|
5874
5874
|
addAuthStateListener(t) {
|
|
5875
|
-
this.authDisposer =
|
|
5875
|
+
this.authDisposer = si(async () => {
|
|
5876
5876
|
const e = this.getAuthSpaceData(), { renderAuth: i, pageAuth: s } = e;
|
|
5877
5877
|
let n, r;
|
|
5878
5878
|
pt(i, this.authStorage.renderAuth) || (n = this.diffAuthFun(this.authStorage.renderAuth || {}, i || {}), this.authStorage.renderAuth = i), pt(s, this.authStorage.pageAuth) || (r = this.diffAuthPageFun(this.authStorage.pageAuth || {}, s || {}), this.authStorage.pageAuth = s), (n || r) && t(n, r);
|
|
@@ -5935,7 +5935,7 @@ const At = class At extends rg {
|
|
|
5935
5935
|
}
|
|
5936
5936
|
};
|
|
5937
5937
|
g(At, "namespace", "PluginState"), g(At, "authSpace", "PluginAuth"), g(At, "syncInterval", 500);
|
|
5938
|
-
let
|
|
5938
|
+
let Wo = At;
|
|
5939
5939
|
class ag {
|
|
5940
5940
|
constructor() {
|
|
5941
5941
|
g(this, "roomMembers", []);
|
|
@@ -5976,7 +5976,7 @@ class ag {
|
|
|
5976
5976
|
this.onChangeHooks.clear();
|
|
5977
5977
|
}
|
|
5978
5978
|
}
|
|
5979
|
-
var
|
|
5979
|
+
var te = /* @__PURE__ */ ((a) => (a[a.Text = 1] = "Text", a[a.Shape = 2] = "Shape", a))(te || {});
|
|
5980
5980
|
const Fy = "cursorhover", Hy = 20, kt = "mainView", Ot = class Ot {
|
|
5981
5981
|
createProxy(o) {
|
|
5982
5982
|
const t = new Proxy(o, {
|
|
@@ -6011,7 +6011,7 @@ g(Ot, "proxyToRaw", /* @__PURE__ */ new WeakMap()), g(Ot, "interceptors", {
|
|
|
6011
6011
|
return Ot.proxyToRaw.get(this).clear();
|
|
6012
6012
|
}
|
|
6013
6013
|
});
|
|
6014
|
-
let
|
|
6014
|
+
let ge = Ot;
|
|
6015
6015
|
class cg {
|
|
6016
6016
|
constructor(o) {
|
|
6017
6017
|
g(this, "internalMsgEmitter");
|
|
@@ -6023,13 +6023,13 @@ class cg {
|
|
|
6023
6023
|
const { control: t, internalMsgEmitter: e } = o;
|
|
6024
6024
|
this.control = t, this.internalMsgEmitter = e;
|
|
6025
6025
|
const i = /* @__PURE__ */ new Map();
|
|
6026
|
-
this.proxyMap = new
|
|
6027
|
-
const s = this, n =
|
|
6028
|
-
|
|
6026
|
+
this.proxyMap = new ge();
|
|
6027
|
+
const s = this, n = ge.interceptors.set;
|
|
6028
|
+
ge.interceptors.set = function(c, l) {
|
|
6029
6029
|
return s.interceptors.set(c, l), n.call(this, c, l);
|
|
6030
6030
|
};
|
|
6031
|
-
const r =
|
|
6032
|
-
|
|
6031
|
+
const r = ge.interceptors.delete;
|
|
6032
|
+
ge.interceptors.delete = function(c, l) {
|
|
6033
6033
|
return s.interceptors.delete(c, l), r.call(this, c);
|
|
6034
6034
|
}, this.editors = this.proxyMap.createProxy(i);
|
|
6035
6035
|
}
|
|
@@ -6068,7 +6068,7 @@ class cg {
|
|
|
6068
6068
|
scenePath: i,
|
|
6069
6069
|
willRefresh: !0
|
|
6070
6070
|
// willSyncService: canSync
|
|
6071
|
-
}), (T = this.control.worker) == null || T.runAnimation()), s &&
|
|
6071
|
+
}), (T = this.control.worker) == null || T.runAnimation()), s && Zt(() => {
|
|
6072
6072
|
var I;
|
|
6073
6073
|
(I = this.collector) == null || I.dispatch({
|
|
6074
6074
|
type: z.UpdateNode,
|
|
@@ -6078,7 +6078,7 @@ class cg {
|
|
|
6078
6078
|
viewId: e,
|
|
6079
6079
|
scenePath: i
|
|
6080
6080
|
});
|
|
6081
|
-
}, this.control.worker.maxLastSyncTime)) : r ===
|
|
6081
|
+
}, this.control.worker.maxLastSyncTime)) : r === te.Text && (s && ((y = this.collector) == null || y.dispatch({
|
|
6082
6082
|
type: c.text && z.FullWork || z.CreateWork,
|
|
6083
6083
|
workId: o,
|
|
6084
6084
|
toolsType: C.Text,
|
|
@@ -6115,7 +6115,7 @@ class cg {
|
|
|
6115
6115
|
viewId: e,
|
|
6116
6116
|
scenePath: i,
|
|
6117
6117
|
willRefresh: !0
|
|
6118
|
-
}), (c = this.control.worker) == null || c.runAnimation()), s &&
|
|
6118
|
+
}), (c = this.control.worker) == null || c.runAnimation()), s && Zt(() => {
|
|
6119
6119
|
var l;
|
|
6120
6120
|
(l = this.collector) == null || l.dispatch({
|
|
6121
6121
|
type: z.RemoveNode,
|
|
@@ -6168,7 +6168,7 @@ class cg {
|
|
|
6168
6168
|
h: c && c[1] || 0,
|
|
6169
6169
|
opt: n.opt,
|
|
6170
6170
|
scale: o.scale,
|
|
6171
|
-
type:
|
|
6171
|
+
type: te.Text,
|
|
6172
6172
|
viewId: t,
|
|
6173
6173
|
scenePath: h,
|
|
6174
6174
|
canWorker: !1,
|
|
@@ -6194,7 +6194,7 @@ class cg {
|
|
|
6194
6194
|
w: h && h[0] || 0,
|
|
6195
6195
|
h: h && h[1] || 0,
|
|
6196
6196
|
opt: e,
|
|
6197
|
-
type:
|
|
6197
|
+
type: te.Text,
|
|
6198
6198
|
canWorker: !0,
|
|
6199
6199
|
canSync: !1,
|
|
6200
6200
|
dataType: r,
|
|
@@ -6292,14 +6292,14 @@ class cg {
|
|
|
6292
6292
|
}
|
|
6293
6293
|
class lg {
|
|
6294
6294
|
constructor(o) {
|
|
6295
|
-
g(this, "expirationTime",
|
|
6295
|
+
g(this, "expirationTime", Ft.cursor.expirationTime);
|
|
6296
6296
|
g(this, "internalMsgEmitter");
|
|
6297
6297
|
g(this, "control");
|
|
6298
6298
|
g(this, "eventName", "applianc-cursor");
|
|
6299
6299
|
g(this, "displayer");
|
|
6300
6300
|
g(this, "roomMember");
|
|
6301
6301
|
g(this, "animationId");
|
|
6302
|
-
g(this, "maxLastSyncTime",
|
|
6302
|
+
g(this, "maxLastSyncTime", Ft.syncOpt.interval);
|
|
6303
6303
|
g(this, "willSendEventWorkers", []);
|
|
6304
6304
|
g(this, "willConsumeEventWorkers", /* @__PURE__ */ new Map());
|
|
6305
6305
|
g(this, "sendEventTimerId");
|
|
@@ -6339,10 +6339,10 @@ class lg {
|
|
|
6339
6339
|
e && t.includes(e) && this.cursorInfoMap.delete(e);
|
|
6340
6340
|
}
|
|
6341
6341
|
getKey(o, t) {
|
|
6342
|
-
return `${o}${
|
|
6342
|
+
return `${o}${_t}${t}`;
|
|
6343
6343
|
}
|
|
6344
6344
|
getUidAndviewId(o) {
|
|
6345
|
-
const [t, e] = o.split(
|
|
6345
|
+
const [t, e] = o.split(_t);
|
|
6346
6346
|
return { uid: t, viewId: e };
|
|
6347
6347
|
}
|
|
6348
6348
|
runAnimation() {
|
|
@@ -6492,7 +6492,7 @@ class lg {
|
|
|
6492
6492
|
(o = this.displayer) == null || o.removeMagixEventListener(this.eventName), this.stopAnimation();
|
|
6493
6493
|
}
|
|
6494
6494
|
}
|
|
6495
|
-
class
|
|
6495
|
+
class $t {
|
|
6496
6496
|
constructor() {
|
|
6497
6497
|
g(this, "useEmtMsg");
|
|
6498
6498
|
g(this, "emtType");
|
|
@@ -6501,7 +6501,7 @@ class Ht {
|
|
|
6501
6501
|
}
|
|
6502
6502
|
static dispatch(o, t, e) {
|
|
6503
6503
|
var i;
|
|
6504
|
-
(i =
|
|
6504
|
+
(i = xt.InternalMsgEmitter) == null || i.emit([o, t], e);
|
|
6505
6505
|
}
|
|
6506
6506
|
get serviceColloctor() {
|
|
6507
6507
|
return this.control.collector;
|
|
@@ -6526,7 +6526,7 @@ class Ht {
|
|
|
6526
6526
|
(s = this.mainEngine) == null || s.runAnimation();
|
|
6527
6527
|
}
|
|
6528
6528
|
collectForServiceWorker(o) {
|
|
6529
|
-
|
|
6529
|
+
Zt(() => {
|
|
6530
6530
|
o.forEach((t) => {
|
|
6531
6531
|
var e;
|
|
6532
6532
|
(e = this.serviceColloctor) == null || e.dispatch(t);
|
|
@@ -6538,15 +6538,15 @@ class Ht {
|
|
|
6538
6538
|
if (this.lastEmtData) {
|
|
6539
6539
|
this.useEmtMsg = !0;
|
|
6540
6540
|
const t = { ...this.lastEmtData, workState: L.Done };
|
|
6541
|
-
this.collect(t, !0), (o =
|
|
6541
|
+
this.collect(t, !0), (o = xt.InternalMsgEmitter) == null || o.emit(R.ActiveMethod, !1);
|
|
6542
6542
|
}
|
|
6543
6543
|
}
|
|
6544
6544
|
recover() {
|
|
6545
6545
|
var o;
|
|
6546
|
-
this.useEmtMsg &&
|
|
6546
|
+
this.useEmtMsg && xt.InternalMsgEmitter.hasListeners(R.ActiveMethod) && ((o = xt.InternalMsgEmitter) == null || o.emit(R.ActiveMethod, !0));
|
|
6547
6547
|
}
|
|
6548
6548
|
}
|
|
6549
|
-
class hg extends
|
|
6549
|
+
class hg extends $t {
|
|
6550
6550
|
constructor() {
|
|
6551
6551
|
super(...arguments);
|
|
6552
6552
|
g(this, "lastEmtData");
|
|
@@ -6624,7 +6624,7 @@ class hg extends Ht {
|
|
|
6624
6624
|
y: T[1],
|
|
6625
6625
|
opt: w,
|
|
6626
6626
|
scale: ((v = h.cameraOpt) == null ? void 0 : v.scale) || 1,
|
|
6627
|
-
type:
|
|
6627
|
+
type: te.Text,
|
|
6628
6628
|
isActive: !1,
|
|
6629
6629
|
viewId: r,
|
|
6630
6630
|
scenePath: c
|
|
@@ -6689,7 +6689,7 @@ class hg extends Ht {
|
|
|
6689
6689
|
y: x[1],
|
|
6690
6690
|
opt: I,
|
|
6691
6691
|
scale: ((M = c.cameraOpt) == null ? void 0 : M.scale) || 1,
|
|
6692
|
-
type:
|
|
6692
|
+
type: te.Text,
|
|
6693
6693
|
isActive: !1,
|
|
6694
6694
|
viewId: s,
|
|
6695
6695
|
scenePath: n
|
|
@@ -6709,7 +6709,7 @@ class hg extends Ht {
|
|
|
6709
6709
|
const I = Fe(v.ops).map((x, b) => {
|
|
6710
6710
|
const D = b % 3;
|
|
6711
6711
|
return D === 0 ? x + d[0] : D === 1 ? x + d[1] : x;
|
|
6712
|
-
}), N =
|
|
6712
|
+
}), N = Ht(I);
|
|
6713
6713
|
v.ops = N;
|
|
6714
6714
|
}
|
|
6715
6715
|
f.push({
|
|
@@ -6754,7 +6754,7 @@ function Ze(a) {
|
|
|
6754
6754
|
function Je(a) {
|
|
6755
6755
|
return a === "transparent";
|
|
6756
6756
|
}
|
|
6757
|
-
class ug extends
|
|
6757
|
+
class ug extends $t {
|
|
6758
6758
|
constructor() {
|
|
6759
6759
|
super(...arguments);
|
|
6760
6760
|
g(this, "lastEmtData");
|
|
@@ -6802,7 +6802,7 @@ class ug extends Ht {
|
|
|
6802
6802
|
v.textBgColor = [E, j, A], v.textBgOpacity = P;
|
|
6803
6803
|
}
|
|
6804
6804
|
if (x.toolsType === C.Text && x.opt && l !== L.Start) {
|
|
6805
|
-
this.setTextColor(N,
|
|
6805
|
+
this.setTextColor(N, de(x), b, c), l === L.Done && (this.undoTickerId = void 0);
|
|
6806
6806
|
continue;
|
|
6807
6807
|
}
|
|
6808
6808
|
}
|
|
@@ -6844,7 +6844,7 @@ class ug extends Ht {
|
|
|
6844
6844
|
}, 0);
|
|
6845
6845
|
}
|
|
6846
6846
|
}
|
|
6847
|
-
class dg extends
|
|
6847
|
+
class dg extends $t {
|
|
6848
6848
|
constructor() {
|
|
6849
6849
|
super(...arguments);
|
|
6850
6850
|
g(this, "lastEmtData");
|
|
@@ -6906,7 +6906,7 @@ class dg extends Ht {
|
|
|
6906
6906
|
const f = p.toString(), M = this.serviceColloctor.isLocalId(f), y = M ? this.serviceColloctor.transformKey(p) : f;
|
|
6907
6907
|
let v = f;
|
|
6908
6908
|
!M && this.serviceColloctor.isOwn(v) && (v = this.serviceColloctor.getLocalId(v));
|
|
6909
|
-
const w =
|
|
6909
|
+
const w = de(l[s][r][y]);
|
|
6910
6910
|
let m;
|
|
6911
6911
|
if (w && v === H) {
|
|
6912
6912
|
if (w.selectIds) {
|
|
@@ -6927,7 +6927,7 @@ class dg extends Ht {
|
|
|
6927
6927
|
willSyncService: !0,
|
|
6928
6928
|
viewId: s
|
|
6929
6929
|
}, N = /* @__PURE__ */ new Map();
|
|
6930
|
-
i ===
|
|
6930
|
+
i === Te.Top ? (this.addMaxLayer(s), m = this.getMaxZIndex(s)) : (this.addMinLayer(s), m = this.getMinZIndex(s)), u.forEach((x) => {
|
|
6931
6931
|
var j, A, P;
|
|
6932
6932
|
const b = (j = this.serviceColloctor) == null ? void 0 : j.isLocalId(x);
|
|
6933
6933
|
let D = b && ((A = this.serviceColloctor) == null ? void 0 : A.transformKey(x)) || x;
|
|
@@ -6951,7 +6951,7 @@ class dg extends Ht {
|
|
|
6951
6951
|
}
|
|
6952
6952
|
}
|
|
6953
6953
|
}
|
|
6954
|
-
class pg extends
|
|
6954
|
+
class pg extends $t {
|
|
6955
6955
|
constructor() {
|
|
6956
6956
|
super(...arguments);
|
|
6957
6957
|
g(this, "lastEmtData");
|
|
@@ -7004,7 +7004,7 @@ class pg extends Ht {
|
|
|
7004
7004
|
n === L.Start ? this.mainEngine.unWritable() : n === L.Done && (this.mainEngine.abled(), this.lastEmtData = void 0), d.length && this.collectForLocalWorker(d, e);
|
|
7005
7005
|
}
|
|
7006
7006
|
}
|
|
7007
|
-
class fg extends
|
|
7007
|
+
class fg extends $t {
|
|
7008
7008
|
constructor() {
|
|
7009
7009
|
super(...arguments);
|
|
7010
7010
|
g(this, "lastEmtData");
|
|
@@ -7042,7 +7042,7 @@ class fg extends Ht {
|
|
|
7042
7042
|
}, void 0]), this.mainEngine.internalMsgEmitter.emit("addUndoTicker", u, i), this.collectForLocalWorker(l));
|
|
7043
7043
|
}
|
|
7044
7044
|
}
|
|
7045
|
-
class gg extends
|
|
7045
|
+
class gg extends $t {
|
|
7046
7046
|
constructor() {
|
|
7047
7047
|
super(...arguments);
|
|
7048
7048
|
g(this, "lastEmtData");
|
|
@@ -7087,7 +7087,7 @@ class gg extends Ht {
|
|
|
7087
7087
|
let J = $;
|
|
7088
7088
|
!tt && ((I = this.serviceColloctor) != null && I.isOwn($)) && (J = this.serviceColloctor.getLocalId($));
|
|
7089
7089
|
const Q = this.control.textEditorManager.get(J);
|
|
7090
|
-
Q && s === L.Start && this.targetText.set(J,
|
|
7090
|
+
Q && s === L.Start && this.targetText.set(J, de(Q));
|
|
7091
7091
|
}
|
|
7092
7092
|
}
|
|
7093
7093
|
if (this.targetText.size && s !== L.Start && h) {
|
|
@@ -7254,7 +7254,7 @@ class gg extends Ht {
|
|
|
7254
7254
|
// }
|
|
7255
7255
|
// }
|
|
7256
7256
|
}
|
|
7257
|
-
class Mg extends
|
|
7257
|
+
class Mg extends $t {
|
|
7258
7258
|
constructor() {
|
|
7259
7259
|
super(...arguments);
|
|
7260
7260
|
g(this, "lastEmtData");
|
|
@@ -7313,7 +7313,7 @@ class Mg extends Ht {
|
|
|
7313
7313
|
function yg(a) {
|
|
7314
7314
|
switch (a) {
|
|
7315
7315
|
case C.Text:
|
|
7316
|
-
return
|
|
7316
|
+
return te.Text;
|
|
7317
7317
|
case C.SpeechBalloon:
|
|
7318
7318
|
case C.Star:
|
|
7319
7319
|
case C.Ellipse:
|
|
@@ -7321,10 +7321,10 @@ function yg(a) {
|
|
|
7321
7321
|
case C.Triangle:
|
|
7322
7322
|
case C.Rhombus:
|
|
7323
7323
|
case C.Polygon:
|
|
7324
|
-
return
|
|
7324
|
+
return te.Shape;
|
|
7325
7325
|
}
|
|
7326
7326
|
}
|
|
7327
|
-
class wg extends
|
|
7327
|
+
class wg extends $t {
|
|
7328
7328
|
constructor() {
|
|
7329
7329
|
super(...arguments);
|
|
7330
7330
|
g(this, "lastEmtData");
|
|
@@ -7333,7 +7333,7 @@ class wg extends Ht {
|
|
|
7333
7333
|
}
|
|
7334
7334
|
async setTextStyle(t, e, i, s) {
|
|
7335
7335
|
const { bold: n, underline: r, lineThrough: c, italic: l, fontSize: h } = i;
|
|
7336
|
-
if (e.toolsType && yg(e.toolsType) ===
|
|
7336
|
+
if (e.toolsType && yg(e.toolsType) === te.Text) {
|
|
7337
7337
|
e.opt && (n && (e.opt.bold = n), Et(r) && (e.opt.underline = r), Et(c) && (e.opt.lineThrough = c), l && (e.opt.italic = l), h && (e.opt.fontSize = h));
|
|
7338
7338
|
const d = await this.control.textEditorManager.updateTextControllerWithEffectAsync({
|
|
7339
7339
|
workId: t,
|
|
@@ -7396,7 +7396,7 @@ class wg extends Ht {
|
|
|
7396
7396
|
}, 0));
|
|
7397
7397
|
}
|
|
7398
7398
|
}
|
|
7399
|
-
class mg extends
|
|
7399
|
+
class mg extends $t {
|
|
7400
7400
|
constructor() {
|
|
7401
7401
|
super(...arguments);
|
|
7402
7402
|
g(this, "lastEmtData");
|
|
@@ -7441,7 +7441,7 @@ class mg extends Ht {
|
|
|
7441
7441
|
s === L.Start ? this.mainEngine.unWritable() : s === L.Done && this.mainEngine.abled(), h.length && this.collectForLocalWorker(h);
|
|
7442
7442
|
}
|
|
7443
7443
|
}
|
|
7444
|
-
class Ig extends
|
|
7444
|
+
class Ig extends $t {
|
|
7445
7445
|
constructor() {
|
|
7446
7446
|
super(...arguments);
|
|
7447
7447
|
g(this, "lastEmtData");
|
|
@@ -7486,7 +7486,7 @@ class Ig extends Ht {
|
|
|
7486
7486
|
this.mainEngine.internalMsgEmitter.emit("addUndoTicker", u, s), h.length && this.collectForLocalWorker(h);
|
|
7487
7487
|
}
|
|
7488
7488
|
}
|
|
7489
|
-
class vg extends
|
|
7489
|
+
class vg extends $t {
|
|
7490
7490
|
constructor() {
|
|
7491
7491
|
super(...arguments);
|
|
7492
7492
|
g(this, "lastEmtData");
|
|
@@ -7591,13 +7591,13 @@ class K {
|
|
|
7591
7591
|
}), this;
|
|
7592
7592
|
}
|
|
7593
7593
|
static emitMethod(o, t, e) {
|
|
7594
|
-
|
|
7594
|
+
$t.dispatch(o, t, e);
|
|
7595
7595
|
}
|
|
7596
7596
|
static activeListener(o) {
|
|
7597
|
-
|
|
7597
|
+
xt.InternalMsgEmitter.on(R.ActiveMethod, o);
|
|
7598
7598
|
}
|
|
7599
7599
|
static unmountActiveListener(o) {
|
|
7600
|
-
|
|
7600
|
+
xt.InternalMsgEmitter.off(R.ActiveMethod, o);
|
|
7601
7601
|
}
|
|
7602
7602
|
}
|
|
7603
7603
|
class Ng {
|
|
@@ -7682,7 +7682,7 @@ class Tg {
|
|
|
7682
7682
|
g(this, "scene");
|
|
7683
7683
|
g(this, "cameraOpt");
|
|
7684
7684
|
this.viewId = o, this.opt = t, this.manager = e, this.scene = this.createScene({ ...t.canvasOpt, container: t.container });
|
|
7685
|
-
const i =
|
|
7685
|
+
const i = Ft.bufferSize.full, s = Ft.bufferSize.sub;
|
|
7686
7686
|
this.subLocalLayer = this.createLayer("subLocalLayer", this.scene, { ...t.layerOpt, bufferSize: this.viewId === kt ? i : s });
|
|
7687
7687
|
const n = {
|
|
7688
7688
|
thread: this
|
|
@@ -7786,7 +7786,7 @@ class Sg {
|
|
|
7786
7786
|
g(this, "thread");
|
|
7787
7787
|
g(this, "workShapes", /* @__PURE__ */ new Map());
|
|
7788
7788
|
g(this, "tmpOpt");
|
|
7789
|
-
g(this, "syncUnitTime",
|
|
7789
|
+
g(this, "syncUnitTime", Ft.syncOpt.interval);
|
|
7790
7790
|
g(this, "drawCount", 0);
|
|
7791
7791
|
this.thread = o.thread;
|
|
7792
7792
|
}
|
|
@@ -7876,7 +7876,7 @@ const Cg = async (a, o) => {
|
|
|
7876
7876
|
class kg {
|
|
7877
7877
|
constructor() {
|
|
7878
7878
|
/** 异步同步时间间隔 */
|
|
7879
|
-
g(this, "maxLastSyncTime",
|
|
7879
|
+
g(this, "maxLastSyncTime", Ft.syncOpt.interval);
|
|
7880
7880
|
}
|
|
7881
7881
|
/** 设置当前选中的工具配置数据 */
|
|
7882
7882
|
setCurrentToolsData(o) {
|
|
@@ -7987,7 +7987,7 @@ class xg extends kg {
|
|
|
7987
7987
|
}
|
|
7988
7988
|
async useMainThread() {
|
|
7989
7989
|
console.info("no OffscreenCanvas");
|
|
7990
|
-
const { MainThreadManagerImpl: t } = await import("./index-
|
|
7990
|
+
const { MainThreadManagerImpl: t } = await import("./index-f9cCJCDG.mjs");
|
|
7991
7991
|
this.mainThread = new t(this);
|
|
7992
7992
|
}
|
|
7993
7993
|
async on() {
|
|
@@ -8209,7 +8209,7 @@ class xg extends kg {
|
|
|
8209
8209
|
break;
|
|
8210
8210
|
}
|
|
8211
8211
|
}
|
|
8212
|
-
e &&
|
|
8212
|
+
e && Zt(() => {
|
|
8213
8213
|
this.collectorAsyncData(t);
|
|
8214
8214
|
}, this.maxLastSyncTime);
|
|
8215
8215
|
}
|
|
@@ -8224,7 +8224,7 @@ class xg extends kg {
|
|
|
8224
8224
|
const I = r.scenePath || this.viewContainerManager.getCurScenePath(w);
|
|
8225
8225
|
switch (c) {
|
|
8226
8226
|
case z.None: {
|
|
8227
|
-
m &&
|
|
8227
|
+
m && Zt(() => {
|
|
8228
8228
|
this.setLockSentEventCursor(!1);
|
|
8229
8229
|
}, this.maxLastSyncTime);
|
|
8230
8230
|
break;
|
|
@@ -8269,7 +8269,7 @@ class xg extends kg {
|
|
|
8269
8269
|
break;
|
|
8270
8270
|
}
|
|
8271
8271
|
}
|
|
8272
|
-
T &&
|
|
8272
|
+
T && Zt(() => {
|
|
8273
8273
|
this.collectorAsyncData(T);
|
|
8274
8274
|
}, this.maxLastSyncTime);
|
|
8275
8275
|
}
|
|
@@ -8291,7 +8291,7 @@ class xg extends kg {
|
|
|
8291
8291
|
y: t[1],
|
|
8292
8292
|
scale: (n == null ? void 0 : n.scale) || 1,
|
|
8293
8293
|
opt: p,
|
|
8294
|
-
type:
|
|
8294
|
+
type: te.Text,
|
|
8295
8295
|
isActive: !0,
|
|
8296
8296
|
viewId: e,
|
|
8297
8297
|
scenePath: s
|
|
@@ -8972,7 +8972,7 @@ class xg extends kg {
|
|
|
8972
8972
|
return;
|
|
8973
8973
|
}
|
|
8974
8974
|
const c = Date.now();
|
|
8975
|
-
|
|
8975
|
+
xt.InternalMsgEmitter.emit("addUndoTicker", c, t);
|
|
8976
8976
|
const l = { ...e };
|
|
8977
8977
|
this.zIndexNodeMethod && (this.zIndexNodeMethod.addMaxLayer(t), l.zIndex = this.zIndexNodeMethod.getMaxZIndex(t)), this.taskBatchData.add({
|
|
8978
8978
|
msgType: z.FullWork,
|
|
@@ -8999,7 +8999,7 @@ class xg extends kg {
|
|
|
8999
8999
|
for (const [h, u] of Object.entries(l))
|
|
9000
9000
|
if (u && u.toolsType === C.Image && u.opt.uuid === e) {
|
|
9001
9001
|
const d = Date.now();
|
|
9002
|
-
|
|
9002
|
+
xt.InternalMsgEmitter.emit("addUndoTicker", d, t);
|
|
9003
9003
|
const p = (r = this.collector) != null && r.isOwn(h) ? (c = this.collector) == null ? void 0 : c.getLocalId(h) : h, f = { ...u.opt, locked: i };
|
|
9004
9004
|
this.taskBatchData.add({
|
|
9005
9005
|
msgType: z.FullWork,
|
|
@@ -9144,7 +9144,7 @@ class xg extends kg {
|
|
|
9144
9144
|
}), this.control.hasOffscreenCanvas() ? this.fullWorker.postMessage(i) : (n = this.mainThread) == null || n.consume(i);
|
|
9145
9145
|
}
|
|
9146
9146
|
}
|
|
9147
|
-
var zg =
|
|
9147
|
+
var zg = Jt, bg = function() {
|
|
9148
9148
|
return zg.Date.now();
|
|
9149
9149
|
}, Pg = bg, Lg = /\s/;
|
|
9150
9150
|
function jg(a) {
|
|
@@ -9156,32 +9156,32 @@ var Dg = jg, Ag = Dg, Eg = /^\s+/;
|
|
|
9156
9156
|
function Og(a) {
|
|
9157
9157
|
return a && a.slice(0, Ag(a) + 1).replace(Eg, "");
|
|
9158
9158
|
}
|
|
9159
|
-
var Rg = Og, Yg =
|
|
9159
|
+
var Rg = Og, Yg = we, Wg = se, Ug = "[object Symbol]";
|
|
9160
9160
|
function Bg(a) {
|
|
9161
9161
|
return typeof a == "symbol" || Wg(a) && Yg(a) == Ug;
|
|
9162
9162
|
}
|
|
9163
|
-
var Vg = Bg, Fg = Rg,
|
|
9163
|
+
var Vg = Bg, Fg = Rg, Fi = ue, Hg = Vg, Hi = NaN, $g = /^[-+]0x[0-9a-f]+$/i, Qg = /^0b[01]+$/i, Gg = /^0o[0-7]+$/i, Zg = parseInt;
|
|
9164
9164
|
function Jg(a) {
|
|
9165
9165
|
if (typeof a == "number")
|
|
9166
9166
|
return a;
|
|
9167
9167
|
if (Hg(a))
|
|
9168
|
-
return
|
|
9169
|
-
if (
|
|
9168
|
+
return Hi;
|
|
9169
|
+
if (Fi(a)) {
|
|
9170
9170
|
var o = typeof a.valueOf == "function" ? a.valueOf() : a;
|
|
9171
|
-
a =
|
|
9171
|
+
a = Fi(o) ? o + "" : o;
|
|
9172
9172
|
}
|
|
9173
9173
|
if (typeof a != "string")
|
|
9174
9174
|
return a === 0 ? a : +a;
|
|
9175
9175
|
a = Fg(a);
|
|
9176
9176
|
var t = Qg.test(a);
|
|
9177
|
-
return t || Gg.test(a) ? Zg(a.slice(2), t ? 2 : 8) : $g.test(a) ?
|
|
9177
|
+
return t || Gg.test(a) ? Zg(a.slice(2), t ? 2 : 8) : $g.test(a) ? Hi : +a;
|
|
9178
9178
|
}
|
|
9179
|
-
var Xg = Jg, qg =
|
|
9179
|
+
var Xg = Jg, qg = ue, bo = Pg, $i = Xg, Kg = "Expected a function", _g = Math.max, tM = Math.min;
|
|
9180
9180
|
function eM(a, o, t) {
|
|
9181
9181
|
var e, i, s, n, r, c, l = 0, h = !1, u = !1, d = !0;
|
|
9182
9182
|
if (typeof a != "function")
|
|
9183
9183
|
throw new TypeError(Kg);
|
|
9184
|
-
o =
|
|
9184
|
+
o = $i(o) || 0, qg(t) && (h = !!t.leading, u = "maxWait" in t, s = u ? _g($i(t.maxWait) || 0, o) : s, d = "trailing" in t ? !!t.trailing : d);
|
|
9185
9185
|
function p(N) {
|
|
9186
9186
|
var x = e, b = i;
|
|
9187
9187
|
return e = i = void 0, l = N, n = a.apply(b, x), n;
|
|
@@ -9224,7 +9224,7 @@ function eM(a, o, t) {
|
|
|
9224
9224
|
}
|
|
9225
9225
|
return I.cancel = m, I.flush = T, I;
|
|
9226
9226
|
}
|
|
9227
|
-
var oM = eM, iM = oM, sM =
|
|
9227
|
+
var oM = eM, iM = oM, sM = ue, nM = "Expected a function";
|
|
9228
9228
|
function rM(a, o, t) {
|
|
9229
9229
|
var e = !0, i = !0;
|
|
9230
9230
|
if (typeof a != "function")
|
|
@@ -9236,7 +9236,7 @@ function rM(a, o, t) {
|
|
|
9236
9236
|
});
|
|
9237
9237
|
}
|
|
9238
9238
|
var aM = rM;
|
|
9239
|
-
const ho = /* @__PURE__ */
|
|
9239
|
+
const ho = /* @__PURE__ */ Pe(aM);
|
|
9240
9240
|
class cM {
|
|
9241
9241
|
constructor(o) {
|
|
9242
9242
|
g(this, "internalMsgEmitter");
|
|
@@ -9395,13 +9395,14 @@ class lM {
|
|
|
9395
9395
|
g(this, "control");
|
|
9396
9396
|
g(this, "roomMemberManager");
|
|
9397
9397
|
g(this, "worker");
|
|
9398
|
+
g(this, "publicMsgEmitter");
|
|
9398
9399
|
g(this, "renderUids", /* @__PURE__ */ new Map());
|
|
9399
9400
|
g(this, "pageAuth", /* @__PURE__ */ new Map());
|
|
9400
9401
|
g(this, "isLocalRender", !1);
|
|
9401
9402
|
g(this, "isCurWritable", !1);
|
|
9402
|
-
var
|
|
9403
|
-
const { control: t } = o;
|
|
9404
|
-
this.control = t, this.roomMemberManager = t.roomMember, this.worker = t.worker, this.isCurWritable = ((
|
|
9403
|
+
var i;
|
|
9404
|
+
const { control: t, publicMsgEmitter: e } = o;
|
|
9405
|
+
this.control = t, this.publicMsgEmitter = e, this.roomMemberManager = t.roomMember, this.worker = t.worker, this.isCurWritable = ((i = this.control.room) == null ? void 0 : i.isWritable) || !1;
|
|
9405
9406
|
}
|
|
9406
9407
|
onWritableChange(o) {
|
|
9407
9408
|
this.isCurWritable = o;
|
|
@@ -9665,7 +9666,7 @@ class lM {
|
|
|
9665
9666
|
} else
|
|
9666
9667
|
this.renderUids.delete(t);
|
|
9667
9668
|
i && ((n = this.control.collector) == null || n.dispatchRenderAuth({
|
|
9668
|
-
operation:
|
|
9669
|
+
operation: Kt.setAuth,
|
|
9669
9670
|
viewId: t,
|
|
9670
9671
|
renderData: s
|
|
9671
9672
|
}, i)), this.renderEffect(t);
|
|
@@ -9676,10 +9677,10 @@ class lM {
|
|
|
9676
9677
|
let n;
|
|
9677
9678
|
switch (e) {
|
|
9678
9679
|
case "show":
|
|
9679
|
-
s ? (s.render || (s.render = /* @__PURE__ */ new Set()), Rt(s.render) && s.render.add(t), Rt(s.hide) && s.hide.delete(t)) : this.renderUids.set(o, { render: /* @__PURE__ */ new Set([t]) }), n =
|
|
9680
|
+
s ? (s.render || (s.render = /* @__PURE__ */ new Set()), Rt(s.render) && s.render.add(t), Rt(s.hide) && s.hide.delete(t)) : this.renderUids.set(o, { render: /* @__PURE__ */ new Set([t]) }), n = Kt.setShow;
|
|
9680
9681
|
break;
|
|
9681
9682
|
case "hide":
|
|
9682
|
-
s ? (s.hide || (s.hide = /* @__PURE__ */ new Set()), Rt(s.hide) && s.hide.add(t), Rt(s.render) && s.render.delete(t)) : this.renderUids.set(o, { hide: /* @__PURE__ */ new Set([t]) }), n =
|
|
9683
|
+
s ? (s.hide || (s.hide = /* @__PURE__ */ new Set()), Rt(s.hide) && s.hide.add(t), Rt(s.render) && s.render.delete(t)) : this.renderUids.set(o, { hide: /* @__PURE__ */ new Set([t]) }), n = Kt.setHide;
|
|
9683
9684
|
break;
|
|
9684
9685
|
}
|
|
9685
9686
|
s ? this.renderUids.set(o, s) : this.renderUids.delete(o), i && n && ((r = this.control.collector) == null || r.dispatchRenderAuth({
|
|
@@ -9692,7 +9693,7 @@ class lM {
|
|
|
9692
9693
|
var n;
|
|
9693
9694
|
const s = this.renderUids.get(o);
|
|
9694
9695
|
e ? s ? (s.clear || (s.clear = /* @__PURE__ */ new Set()), Rt(s.clear) && s.clear.add(t)) : this.renderUids.set(o, { clear: /* @__PURE__ */ new Set([t]) }) : s && Rt(s.clear) && s.clear.has(t) && s.clear.delete(t), s ? this.renderUids.set(o, s) : this.renderUids.delete(o), i && ((n = this.control.collector) == null || n.dispatchRenderAuth({
|
|
9695
|
-
operation:
|
|
9696
|
+
operation: Kt.setClear,
|
|
9696
9697
|
viewId: o,
|
|
9697
9698
|
uid: t,
|
|
9698
9699
|
isClear: e
|
|
@@ -9700,7 +9701,7 @@ class lM {
|
|
|
9700
9701
|
}
|
|
9701
9702
|
syncRenderUids(o, t, e, i) {
|
|
9702
9703
|
const s = t === !0 ? !0 : t && Object.keys(t) ? new Set(Object.keys(t)) : void 0, n = e === !0 ? !0 : e && Object.keys(e) ? new Set(Object.keys(e)) : void 0, r = i === !0 ? !0 : i && Object.keys(i) ? new Set(Object.keys(i)) : void 0;
|
|
9703
|
-
s || n || r ? this.renderUids.set(o, { render: s, hide: n, clear: r }) : this.renderUids.delete(o), this.renderEffect(o);
|
|
9704
|
+
s || n || r ? this.renderUids.set(o, { render: s, hide: n, clear: r }) : this.renderUids.delete(o), this.renderEffect(o), this.publicMsgEmitter.emit("syncRenderUids", o, { render: s, hide: n, clear: r });
|
|
9704
9705
|
}
|
|
9705
9706
|
syncPageAuth(o, t, e = !1) {
|
|
9706
9707
|
let i = !1;
|
|
@@ -9722,14 +9723,14 @@ class lM {
|
|
|
9722
9723
|
d.size && s.set(n, p);
|
|
9723
9724
|
}
|
|
9724
9725
|
}
|
|
9725
|
-
s.size && this.pageAuth.set(o, s);
|
|
9726
|
+
s.size && (this.pageAuth.set(o, s), this.publicMsgEmitter.emit("syncPageAuth", o, s));
|
|
9726
9727
|
}
|
|
9727
9728
|
(e || i) && this.pageAuthEffect(o);
|
|
9728
9729
|
}
|
|
9729
9730
|
destoryByViewId(o, t = !1) {
|
|
9730
9731
|
var e;
|
|
9731
9732
|
this.renderUids.has(o) && (this.renderUids.delete(o), t || (e = this.control.collector) == null || e.dispatchRenderAuth({
|
|
9732
|
-
operation:
|
|
9733
|
+
operation: Kt.setAuth,
|
|
9733
9734
|
viewId: o
|
|
9734
9735
|
})), this.pageAuth.has(o) && this.control.renderControl.delViewPage(o, !t);
|
|
9735
9736
|
}
|
|
@@ -9857,7 +9858,7 @@ class hM {
|
|
|
9857
9858
|
height: e.height / e.scale
|
|
9858
9859
|
};
|
|
9859
9860
|
let n = await this.control.getBoundingRect(i) || s;
|
|
9860
|
-
n =
|
|
9861
|
+
n = ti(n, s) || s;
|
|
9861
9862
|
let r = n.width, c = n.height, l = 1;
|
|
9862
9863
|
const h = r > e.width && Math.min(e.width / r, l) || l, u = c > e.height && Math.min(e.height / c, l) || l;
|
|
9863
9864
|
return h <= u ? (r = h < 1 && e.width || r, c = Math.floor(c * h) + 1, l = h) : h > u && (c = u < 1 && e.height || c, r = Math.floor(r * u) + 1, l = u), {
|
|
@@ -9881,7 +9882,7 @@ class hM {
|
|
|
9881
9882
|
t && (this.maps.delete(t), this.control.viewContainerManager.setActiveMiniMap(t, !1));
|
|
9882
9883
|
}
|
|
9883
9884
|
}
|
|
9884
|
-
const
|
|
9885
|
+
const Me = class Me {
|
|
9885
9886
|
constructor(o) {
|
|
9886
9887
|
g(this, "version", ks);
|
|
9887
9888
|
g(this, "plugin");
|
|
@@ -9933,10 +9934,11 @@ const Be = class Be {
|
|
|
9933
9934
|
(e = this.worker) == null || e.updateCamera(o, t), this.miniMapManager.updateViewCamera(o, t);
|
|
9934
9935
|
});
|
|
9935
9936
|
const { displayer: t, plugin: e, options: i } = o;
|
|
9936
|
-
this.plugin = e, this.room = lt(t) ? t : void 0, this.play =
|
|
9937
|
+
this.plugin = e, this.room = lt(t) ? t : void 0, this.play = Bo(t) ? t : void 0, this.pluginOptions = i, this.roomMember = new ag();
|
|
9937
9938
|
const s = {
|
|
9938
9939
|
control: this,
|
|
9939
|
-
internalMsgEmitter:
|
|
9940
|
+
internalMsgEmitter: Me.InternalMsgEmitter,
|
|
9941
|
+
publicMsgEmitter: Me.PublicMsgEmitter
|
|
9940
9942
|
};
|
|
9941
9943
|
this.cursor = new lg(s), this.textEditorManager = new cg(s), this.worker = new xg(s), this.hotkeyManager = new cM(s), this.renderControl = new lM(s), this.miniMapManager = new hM(s);
|
|
9942
9944
|
}
|
|
@@ -9949,7 +9951,7 @@ const Be = class Be {
|
|
|
9949
9951
|
}
|
|
9950
9952
|
bindPlugin(o) {
|
|
9951
9953
|
var t, e;
|
|
9952
|
-
this.plugin = o, this.collector && (this.collector.removeStorageStateListener(), this.collector.removeAuthStateListener()), this.collector = new
|
|
9954
|
+
this.plugin = o, this.collector && (this.collector.removeStorageStateListener(), this.collector.removeAuthStateListener()), this.collector = new Wo(this, o, (e = (t = this.pluginOptions) == null ? void 0 : t.syncOpt) == null ? void 0 : e.interval), this.activePlugin();
|
|
9953
9955
|
}
|
|
9954
9956
|
/** 销毁 */
|
|
9955
9957
|
destroy() {
|
|
@@ -9959,7 +9961,7 @@ const Be = class Be {
|
|
|
9959
9961
|
/** 清空当前获焦路径下的所有内容 */
|
|
9960
9962
|
cleanCurrentScene() {
|
|
9961
9963
|
const o = Date.now(), t = this.worker.getLocalWorkViewId() || this.viewContainerManager.focuedViewId;
|
|
9962
|
-
t && (
|
|
9964
|
+
t && (Me.InternalMsgEmitter.emit("addUndoTicker", o, t), this.worker.clearViewScenePath(t, !1, !0));
|
|
9963
9965
|
}
|
|
9964
9966
|
/** 监听读写状态变更 */
|
|
9965
9967
|
onWritableChange(o) {
|
|
@@ -9992,11 +9994,11 @@ const Be = class Be {
|
|
|
9992
9994
|
case nt.rectangle:
|
|
9993
9995
|
return o.rectangleCompleteToSelector && (this.hasSwitchToSelectorEffect = !0), C.Rectangle;
|
|
9994
9996
|
case nt.shape:
|
|
9995
|
-
if (o.shapeCompleteToSelector && (this.hasSwitchToSelectorEffect = !0), o.shapeType ===
|
|
9997
|
+
if (o.shapeCompleteToSelector && (this.hasSwitchToSelectorEffect = !0), o.shapeType === qt.Pentagram || o.shapeType === qt.Star)
|
|
9996
9998
|
return C.Star;
|
|
9997
|
-
if (o.shapeType ===
|
|
9999
|
+
if (o.shapeType === qt.Polygon || o.shapeType === qt.Triangle || o.shapeType === qt.Rhombus)
|
|
9998
10000
|
return C.Polygon;
|
|
9999
|
-
if (o.shapeType ===
|
|
10001
|
+
if (o.shapeType === qt.SpeechBalloon)
|
|
10000
10002
|
return C.SpeechBalloon;
|
|
10001
10003
|
break;
|
|
10002
10004
|
}
|
|
@@ -10038,7 +10040,7 @@ const Be = class Be {
|
|
|
10038
10040
|
case C.Star:
|
|
10039
10041
|
case C.Polygon:
|
|
10040
10042
|
case C.SpeechBalloon:
|
|
10041
|
-
t != null && t.strokeType && (t == null ? void 0 : t.strokeType) === _.Stroke ? e.strokeType = _.Normal : e.strokeType = (t == null ? void 0 : t.strokeType) || _.Normal, o === C.Star && (t.shapeType ===
|
|
10043
|
+
t != null && t.strokeType && (t == null ? void 0 : t.strokeType) === _.Stroke ? e.strokeType = _.Normal : e.strokeType = (t == null ? void 0 : t.strokeType) || _.Normal, o === C.Star && (t.shapeType === qt.Pentagram ? (e.vertices = 10, e.innerVerticeStep = 2, e.innerRatio = 0.4) : t != null && t.vertices && (t != null && t.innerVerticeStep) && (t != null && t.innerRatio) && (e.vertices = t.vertices, e.innerVerticeStep = t.innerVerticeStep, e.innerRatio = t.innerRatio)), o === C.Polygon && (t.shapeType === qt.Triangle ? e.vertices = 3 : t.shapeType === qt.Rhombus ? e.vertices = 4 : t.vertices && (e.vertices = t.vertices)), e.fillColor = (t == null ? void 0 : t.fillColor) && Ge(t.fillColor[0], t.fillColor[1], t.fillColor[2], t == null ? void 0 : t.fillOpacity) || "transparent", o === C.SpeechBalloon && (e.placement = t.placement || "bottomLeft");
|
|
10042
10044
|
break;
|
|
10043
10045
|
}
|
|
10044
10046
|
return {
|
|
@@ -10191,11 +10193,11 @@ const Be = class Be {
|
|
|
10191
10193
|
this.miniMapManager.destroyMiniMap(o);
|
|
10192
10194
|
}
|
|
10193
10195
|
};
|
|
10194
|
-
g(
|
|
10195
|
-
let
|
|
10196
|
-
const
|
|
10196
|
+
g(Me, "InternalMsgEmitter", new jo()), g(Me, "PublicMsgEmitter", new jo());
|
|
10197
|
+
let xt = Me;
|
|
10198
|
+
const ye = class ye {
|
|
10197
10199
|
constructor(o) {
|
|
10198
|
-
g(this, "emitter", new
|
|
10200
|
+
g(this, "emitter", new jo());
|
|
10199
10201
|
g(this, "undoStack");
|
|
10200
10202
|
g(this, "redoStack");
|
|
10201
10203
|
g(this, "worker");
|
|
@@ -10214,7 +10216,7 @@ const ge = class ge {
|
|
|
10214
10216
|
const e = this.redoStack.filter((i) => i.scenePath === o).length;
|
|
10215
10217
|
t === 0 && e === 0 && this.tickStartStorerCache && this.scenePath === o && (t = 1), this.emitter.emit("onCanUndoStepsUpdate", t), this.emitter.emit("onCanRedoStepsUpdate", e);
|
|
10216
10218
|
}
|
|
10217
|
-
},
|
|
10219
|
+
}, ye.waitTime));
|
|
10218
10220
|
const { control: t, internalMsgEmitter: e, viewId: i } = o;
|
|
10219
10221
|
this.control = t, this.emitter = e, this.undoStack = [], this.redoStack = [], this.room = t.room, this.worker = t.worker, this.isTicking = !1, this.viewId = i;
|
|
10220
10222
|
}
|
|
@@ -10247,7 +10249,7 @@ const ge = class ge {
|
|
|
10247
10249
|
type: 2,
|
|
10248
10250
|
data: ht(r),
|
|
10249
10251
|
scenePath: e
|
|
10250
|
-
}), this.undoStack.length >
|
|
10252
|
+
}), this.undoStack.length > ye.MaxStackLength && this.undoStack.shift(), this.emitter.emit("onCanUndoStepsUpdate", this.undoStack.length)), this.redoStack.length && (this.redoStack.length = 0, this.emitter.emit("onCanRedoStepsUpdate", this.redoStack.length)), this.isTicking = !1, this.scenePath = void 0, this.tickStartStorerCache = void 0, this.undoTickerId = void 0, this.excludeIds.clear();
|
|
10251
10253
|
}
|
|
10252
10254
|
}
|
|
10253
10255
|
undo(o) {
|
|
@@ -10482,12 +10484,12 @@ const ge = class ge {
|
|
|
10482
10484
|
}
|
|
10483
10485
|
}
|
|
10484
10486
|
};
|
|
10485
|
-
g(
|
|
10486
|
-
let uo =
|
|
10487
|
+
g(ye, "sdkCallBack"), g(ye, "MaxStackLength", 20), g(ye, "waitTime", 100);
|
|
10488
|
+
let uo = ye;
|
|
10487
10489
|
function uM(a) {
|
|
10488
10490
|
return a instanceof TouchEvent || a instanceof window.TouchEvent || (a == null ? void 0 : a.touches) && (a == null ? void 0 : a.touches.length) || (a == null ? void 0 : a.changedTouches) && (a == null ? void 0 : a.changedTouches.length);
|
|
10489
10491
|
}
|
|
10490
|
-
function
|
|
10492
|
+
function xe(a) {
|
|
10491
10493
|
return uM(a) && (a.touches && a.touches.length === 1 || a.changedTouches && a.changedTouches.length === 1);
|
|
10492
10494
|
}
|
|
10493
10495
|
function Vs(a) {
|
|
@@ -10502,7 +10504,7 @@ function Vs(a) {
|
|
|
10502
10504
|
y: a.pageY
|
|
10503
10505
|
};
|
|
10504
10506
|
}
|
|
10505
|
-
class
|
|
10507
|
+
class Ue {
|
|
10506
10508
|
constructor(o) {
|
|
10507
10509
|
g(this, "internalMsgEmitter");
|
|
10508
10510
|
g(this, "control");
|
|
@@ -10539,7 +10541,7 @@ class We {
|
|
|
10539
10541
|
}
|
|
10540
10542
|
validator(o, t, e) {
|
|
10541
10543
|
var n;
|
|
10542
|
-
const i =
|
|
10544
|
+
const i = ri(o[t]), s = ri(e);
|
|
10543
10545
|
t === "focusScenePath" && e && !pt(i, s) && (this.control.internalSceneChange(o.id, s), (n = this.focuedView) == null || n.displayer.commiter.onChangeScene()), t === "cameraOpt" && !pt(i, s) && this.control.internalCameraChange(o.id, s);
|
|
10544
10546
|
}
|
|
10545
10547
|
destroyAppView(o, t = !1) {
|
|
@@ -10639,16 +10641,16 @@ class We {
|
|
|
10639
10641
|
const { dpr: A, canvasBgRef: P, canvasFloatRef: O, canvasServiceFloatRef: ot, canvasTopRef: tt } = j, $ = Math.floor(T.w * A), J = Math.floor(T.h * A), Q = T.x * A, G = T.y * A;
|
|
10640
10642
|
if (N) {
|
|
10641
10643
|
switch (D) {
|
|
10642
|
-
case
|
|
10644
|
+
case ee.TopFloat:
|
|
10643
10645
|
(i = (e = tt.current) == null ? void 0 : e.getContext("2d")) == null || i.clearRect(Q, G, $, J);
|
|
10644
10646
|
break;
|
|
10645
|
-
case
|
|
10647
|
+
case ee.Float:
|
|
10646
10648
|
(n = (s = O.current) == null ? void 0 : s.getContext("2d")) == null || n.clearRect(Q, G, $, J);
|
|
10647
10649
|
break;
|
|
10648
|
-
case
|
|
10650
|
+
case ee.ServiceFloat:
|
|
10649
10651
|
(c = (r = ot.current) == null ? void 0 : r.getContext("2d")) == null || c.clearRect(Q, G, $, J);
|
|
10650
10652
|
break;
|
|
10651
|
-
case
|
|
10653
|
+
case ee.Bg:
|
|
10652
10654
|
(h = (l = P.current) == null ? void 0 : l.getContext("2d")) == null || h.clearRect(Q, G, $, J);
|
|
10653
10655
|
break;
|
|
10654
10656
|
}
|
|
@@ -10656,18 +10658,18 @@ class We {
|
|
|
10656
10658
|
}
|
|
10657
10659
|
if (b && I)
|
|
10658
10660
|
switch (b) {
|
|
10659
|
-
case
|
|
10661
|
+
case ee.TopFloat:
|
|
10660
10662
|
(d = (u = tt.current) == null ? void 0 : u.getContext("2d")) == null || d.drawImage(I, 0, 0, $, J, Q, G, $, J);
|
|
10661
10663
|
break;
|
|
10662
|
-
case
|
|
10664
|
+
case ee.Float: {
|
|
10663
10665
|
(f = (p = O.current) == null ? void 0 : p.getContext("2d")) == null || f.drawImage(I, 0, 0, $, J, Q, G, $, J);
|
|
10664
10666
|
break;
|
|
10665
10667
|
}
|
|
10666
|
-
case
|
|
10668
|
+
case ee.ServiceFloat: {
|
|
10667
10669
|
(y = (M = ot.current) == null ? void 0 : M.getContext("2d")) == null || y.drawImage(I, 0, 0, $, J, Q, G, $, J);
|
|
10668
10670
|
break;
|
|
10669
10671
|
}
|
|
10670
|
-
case
|
|
10672
|
+
case ee.Bg: {
|
|
10671
10673
|
(w = (v = P.current) == null ? void 0 : v.getContext("2d")) == null || w.drawImage(I, 0, 0, $, J, Q, G, $, J);
|
|
10672
10674
|
break;
|
|
10673
10675
|
}
|
|
@@ -10693,14 +10695,14 @@ class We {
|
|
|
10693
10695
|
i && i.setActiveMiniMap(t && o || void 0);
|
|
10694
10696
|
}
|
|
10695
10697
|
}
|
|
10696
|
-
g(
|
|
10698
|
+
g(Ue, "defaultCameraOpt", {
|
|
10697
10699
|
centerX: 0,
|
|
10698
10700
|
centerY: 0,
|
|
10699
10701
|
scale: 1
|
|
10700
|
-
}), g(
|
|
10702
|
+
}), g(Ue, "defaultScreenCanvasOpt", {
|
|
10701
10703
|
autoRender: !1,
|
|
10702
10704
|
contextType: "webgl2"
|
|
10703
|
-
}), g(
|
|
10705
|
+
}), g(Ue, "defaultLayerOpt", {
|
|
10704
10706
|
offscreen: !0,
|
|
10705
10707
|
handleEvent: !1,
|
|
10706
10708
|
depth: !1
|
|
@@ -10736,7 +10738,7 @@ class dM {
|
|
|
10736
10738
|
g(this, "touchstart", (o) => {
|
|
10737
10739
|
var t;
|
|
10738
10740
|
if (this.active) {
|
|
10739
|
-
if (!
|
|
10741
|
+
if (!xe(o)) {
|
|
10740
10742
|
this.control.worker.unWritable(), this.viewId && this.control.worker.removeDrawingWork(this.viewId);
|
|
10741
10743
|
return;
|
|
10742
10744
|
}
|
|
@@ -10753,7 +10755,7 @@ class dM {
|
|
|
10753
10755
|
});
|
|
10754
10756
|
g(this, "touchmove", (o) => {
|
|
10755
10757
|
if (this.active) {
|
|
10756
|
-
if (!
|
|
10758
|
+
if (!xe(o)) {
|
|
10757
10759
|
this.control.worker.unWritable(), this.control.worker.removeDrawingWork(this.viewId);
|
|
10758
10760
|
return;
|
|
10759
10761
|
}
|
|
@@ -10765,7 +10767,7 @@ class dM {
|
|
|
10765
10767
|
});
|
|
10766
10768
|
g(this, "touchend", (o) => {
|
|
10767
10769
|
if (this.active) {
|
|
10768
|
-
if (!
|
|
10770
|
+
if (!xe(o) || !this.control.worker.isAbled()) {
|
|
10769
10771
|
this.control.worker.unWritable(), this.control.worker.removeDrawingWork(this.viewId);
|
|
10770
10772
|
return;
|
|
10771
10773
|
}
|
|
@@ -10902,7 +10904,7 @@ class Fs {
|
|
|
10902
10904
|
g(this, "touchstart", (o) => {
|
|
10903
10905
|
var e;
|
|
10904
10906
|
if (!this.active) return;
|
|
10905
|
-
if (!
|
|
10907
|
+
if (!xe(o)) {
|
|
10906
10908
|
this.control.worker.unWritable(), this.viewId && this.control.worker.removeDrawingWork(this.viewId);
|
|
10907
10909
|
return;
|
|
10908
10910
|
}
|
|
@@ -10916,7 +10918,7 @@ class Fs {
|
|
|
10916
10918
|
});
|
|
10917
10919
|
g(this, "touchmove", (o) => {
|
|
10918
10920
|
if (!this.active) return;
|
|
10919
|
-
if (!
|
|
10921
|
+
if (!xe(o)) {
|
|
10920
10922
|
this.control.worker.unWritable(), this.viewId && this.control.worker.removeDrawingWork(this.viewId);
|
|
10921
10923
|
return;
|
|
10922
10924
|
}
|
|
@@ -10925,7 +10927,7 @@ class Fs {
|
|
|
10925
10927
|
});
|
|
10926
10928
|
g(this, "touchend", (o) => {
|
|
10927
10929
|
if (!this.active) return;
|
|
10928
|
-
if (!
|
|
10930
|
+
if (!xe(o) || !this.control.worker.isAbled()) {
|
|
10929
10931
|
this.control.worker.removeDrawingWork(this.viewId);
|
|
10930
10932
|
return;
|
|
10931
10933
|
}
|
|
@@ -11127,7 +11129,7 @@ const xM = (a) => {
|
|
|
11127
11129
|
},
|
|
11128
11130
|
/* @__PURE__ */ S.createElement("img", { alt: "icon", src: bt("duplicate") })
|
|
11129
11131
|
);
|
|
11130
|
-
},
|
|
11132
|
+
}, Qi = (a) => {
|
|
11131
11133
|
const { icon: o, onClickHandler: t, onTouchEndHandler: e } = a;
|
|
11132
11134
|
return /* @__PURE__ */ S.createElement("div", { className: "button normal-button", onClick: t, onTouchEnd: e }, /* @__PURE__ */ S.createElement("img", { src: bt(o) }));
|
|
11133
11135
|
}, bM = (a) => {
|
|
@@ -11142,40 +11144,40 @@ const xM = (a) => {
|
|
|
11142
11144
|
}
|
|
11143
11145
|
}
|
|
11144
11146
|
}, [e == null ? void 0 : e.current, i, s]), l = X(() => o ? /* @__PURE__ */ S.createElement("div", { className: "image-layer-menu", style: c }, /* @__PURE__ */ S.createElement(
|
|
11145
|
-
|
|
11147
|
+
Qi,
|
|
11146
11148
|
{
|
|
11147
11149
|
icon: "to-top",
|
|
11148
11150
|
onClickHandler: (d) => {
|
|
11149
11151
|
d.cancelable && d.preventDefault(), d.stopPropagation(), K.emitMethod(
|
|
11150
11152
|
Z.MainEngine,
|
|
11151
11153
|
R.ZIndexNode,
|
|
11152
|
-
{ workIds: [H], layer:
|
|
11154
|
+
{ workIds: [H], layer: Te.Top, viewId: s == null ? void 0 : s.viewId }
|
|
11153
11155
|
);
|
|
11154
11156
|
},
|
|
11155
11157
|
onTouchEndHandler: (d) => {
|
|
11156
11158
|
d.stopPropagation(), K.emitMethod(
|
|
11157
11159
|
Z.MainEngine,
|
|
11158
11160
|
R.ZIndexNode,
|
|
11159
|
-
{ workIds: [H], layer:
|
|
11161
|
+
{ workIds: [H], layer: Te.Top, viewId: s == null ? void 0 : s.viewId }
|
|
11160
11162
|
);
|
|
11161
11163
|
}
|
|
11162
11164
|
}
|
|
11163
11165
|
), /* @__PURE__ */ S.createElement(
|
|
11164
|
-
|
|
11166
|
+
Qi,
|
|
11165
11167
|
{
|
|
11166
11168
|
icon: "to-bottom",
|
|
11167
11169
|
onClickHandler: (d) => {
|
|
11168
11170
|
d.cancelable && d.preventDefault(), d.stopPropagation(), K.emitMethod(
|
|
11169
11171
|
Z.MainEngine,
|
|
11170
11172
|
R.ZIndexNode,
|
|
11171
|
-
{ workIds: [H], layer:
|
|
11173
|
+
{ workIds: [H], layer: Te.Bottom, viewId: s == null ? void 0 : s.viewId }
|
|
11172
11174
|
);
|
|
11173
11175
|
},
|
|
11174
11176
|
onTouchEndHandler: (d) => {
|
|
11175
11177
|
d.stopPropagation(), K.emitMethod(
|
|
11176
11178
|
Z.MainEngine,
|
|
11177
11179
|
R.ZIndexNode,
|
|
11178
|
-
{ workIds: [H], layer:
|
|
11180
|
+
{ workIds: [H], layer: Te.Bottom, viewId: s == null ? void 0 : s.viewId }
|
|
11179
11181
|
);
|
|
11180
11182
|
}
|
|
11181
11183
|
}
|
|
@@ -11255,7 +11257,7 @@ const xM = (a) => {
|
|
|
11255
11257
|
}
|
|
11256
11258
|
),
|
|
11257
11259
|
/* @__PURE__ */ S.createElement("div", { className: "range-opacity" }, /* @__PURE__ */ S.createElement(
|
|
11258
|
-
|
|
11260
|
+
be,
|
|
11259
11261
|
{
|
|
11260
11262
|
bounds: "parent",
|
|
11261
11263
|
axis: "x",
|
|
@@ -11316,7 +11318,7 @@ const xM = (a) => {
|
|
|
11316
11318
|
}
|
|
11317
11319
|
),
|
|
11318
11320
|
/* @__PURE__ */ S.createElement("div", { className: "range-opacity" }, /* @__PURE__ */ S.createElement(
|
|
11319
|
-
|
|
11321
|
+
be,
|
|
11320
11322
|
{
|
|
11321
11323
|
bounds: "parent",
|
|
11322
11324
|
axis: "x",
|
|
@@ -11955,7 +11957,7 @@ const xM = (a) => {
|
|
|
11955
11957
|
80,
|
|
11956
11958
|
144,
|
|
11957
11959
|
288
|
|
11958
|
-
]),
|
|
11960
|
+
]), Ne = [
|
|
11959
11961
|
"top",
|
|
11960
11962
|
"topLeft",
|
|
11961
11963
|
"topRight",
|
|
@@ -11998,7 +12000,7 @@ const xM = (a) => {
|
|
|
11998
12000
|
))
|
|
11999
12001
|
);
|
|
12000
12002
|
}, FM = (a) => {
|
|
12001
|
-
const o =
|
|
12003
|
+
const o = ze(null), { open: t, setOpen: e, textOpt: i, workIds: s, floatBarRef: n } = a, { mananger: r, floatBarData: c } = Ct(Nt), [l, h] = st(0), [u, d] = st(), p = Ut.length - 1;
|
|
12002
12004
|
ft(() => {
|
|
12003
12005
|
i != null && i.fontSize && (h(i.fontSize), o.current && (o.current.value = i.fontSize.toString()));
|
|
12004
12006
|
}, [i == null ? void 0 : i.fontSize]);
|
|
@@ -12122,8 +12124,8 @@ const xM = (a) => {
|
|
|
12122
12124
|
},
|
|
12123
12125
|
/* @__PURE__ */ S.createElement("img", { alt: "icon", src: bt(e ? "unlock-new" : "lock-new") })
|
|
12124
12126
|
);
|
|
12125
|
-
},
|
|
12126
|
-
const { icon: o, min: t, max: e, step: i, value: s, onInputHandler: n } = a, [r, c] = st(0), l =
|
|
12127
|
+
}, Uo = (a) => {
|
|
12128
|
+
const { icon: o, min: t, max: e, step: i, value: s, onInputHandler: n } = a, [r, c] = st(0), l = ze(null), h = (u) => {
|
|
12127
12129
|
u > e && (u = e), u < t && (u = t), c(u), n(u), l.current && (l.current.value = u.toString());
|
|
12128
12130
|
};
|
|
12129
12131
|
return ft(() => {
|
|
@@ -12232,7 +12234,7 @@ const xM = (a) => {
|
|
|
12232
12234
|
},
|
|
12233
12235
|
/* @__PURE__ */ S.createElement("div", { className: "range-number-color" }),
|
|
12234
12236
|
/* @__PURE__ */ S.createElement("div", { className: "range-number" }, /* @__PURE__ */ S.createElement(
|
|
12235
|
-
|
|
12237
|
+
be,
|
|
12236
12238
|
{
|
|
12237
12239
|
bounds: "parent",
|
|
12238
12240
|
axis: "x",
|
|
@@ -12245,8 +12247,8 @@ const xM = (a) => {
|
|
|
12245
12247
|
))
|
|
12246
12248
|
);
|
|
12247
12249
|
}, GM = (a) => {
|
|
12248
|
-
const { icon: o, value: t, onChangeHandler: e, style: i } = a, [s, n] = st(0), [r, c] = st(), l =
|
|
12249
|
-
p >=
|
|
12250
|
+
const { icon: o, value: t, onChangeHandler: e, style: i } = a, [s, n] = st(0), [r, c] = st(), l = ze(null), h = en((p) => {
|
|
12251
|
+
p >= Ne.length && (p = 0), p < 0 && (p = Ne.length - 1), n(p), e(Ne[p]), c(!1), l.current && (l.current.value = Ne[p]);
|
|
12250
12252
|
}, [e]), u = X(() => {
|
|
12251
12253
|
if (i && i.bottom) {
|
|
12252
12254
|
const p = {};
|
|
@@ -12254,9 +12256,9 @@ const xM = (a) => {
|
|
|
12254
12256
|
}
|
|
12255
12257
|
}, [i]);
|
|
12256
12258
|
ft(() => {
|
|
12257
|
-
t && (n(
|
|
12259
|
+
t && (n(Ne.indexOf(t)), l.current && (l.current.value = t));
|
|
12258
12260
|
}, [t]);
|
|
12259
|
-
const d = X(() => r ? /* @__PURE__ */ S.createElement(ZM, { options:
|
|
12261
|
+
const d = X(() => r ? /* @__PURE__ */ S.createElement(ZM, { options: Ne, onClickHandler: h, style: u }) : null, [r, h, u]);
|
|
12260
12262
|
return /* @__PURE__ */ S.createElement("div", { className: "button input-button" }, /* @__PURE__ */ S.createElement("img", { src: bt(o) }), /* @__PURE__ */ S.createElement(
|
|
12261
12263
|
"input",
|
|
12262
12264
|
{
|
|
@@ -12358,7 +12360,7 @@ const xM = (a) => {
|
|
|
12358
12360
|
}
|
|
12359
12361
|
);
|
|
12360
12362
|
};
|
|
12361
|
-
return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(
|
|
12363
|
+
return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(Uo, { value: i, icon: "polygon-vertex", min: 3, max: 100, step: 1, onInputHandler: s }), /* @__PURE__ */ S.createElement(Uo, { value: e, icon: "star-innerVertex", min: 1, max: 100, step: 1, onInputHandler: n }), /* @__PURE__ */ S.createElement($M, { value: t, icon: "star-innerRatio", min: 0.1, max: 1, step: 0.1, onInputHandler: r }));
|
|
12362
12364
|
}, XM = (a) => {
|
|
12363
12365
|
const { mananger: o, vertices: t } = a, e = (i) => {
|
|
12364
12366
|
K.emitMethod(
|
|
@@ -12372,7 +12374,7 @@ const xM = (a) => {
|
|
|
12372
12374
|
}
|
|
12373
12375
|
);
|
|
12374
12376
|
};
|
|
12375
|
-
return /* @__PURE__ */ S.createElement(
|
|
12377
|
+
return /* @__PURE__ */ S.createElement(Uo, { value: t, icon: "polygon-vertex", min: 3, max: 100, step: 1, onInputHandler: e });
|
|
12376
12378
|
}, qM = (a) => {
|
|
12377
12379
|
const { mananger: o, placement: t } = a, e = (i) => {
|
|
12378
12380
|
K.emitMethod(
|
|
@@ -12444,7 +12446,7 @@ const xM = (a) => {
|
|
|
12444
12446
|
const { textOpt: o, workIds: t, noLayer: e, position: i } = a, { floatBarData: s, mananger: n } = Ct(Nt), [r, c] = S.useState(
|
|
12445
12447
|
0
|
|
12446
12448
|
/* none */
|
|
12447
|
-
), [l, h] = S.useState(), u =
|
|
12449
|
+
), [l, h] = S.useState(), u = ze(null);
|
|
12448
12450
|
ft(() => {
|
|
12449
12451
|
var b, D, E, j;
|
|
12450
12452
|
const I = {}, N = (s == null ? void 0 : s.w) || ((b = o == null ? void 0 : o.boxSize) == null ? void 0 : b[0]) || 0, x = (s == null ? void 0 : s.h) || ((D = o == null ? void 0 : o.boxSize) == null ? void 0 : D[1]) || 0;
|
|
@@ -12585,7 +12587,7 @@ const xM = (a) => {
|
|
|
12585
12587
|
);
|
|
12586
12588
|
}, ey = S.memo(
|
|
12587
12589
|
(a) => {
|
|
12588
|
-
const { data: o, left: t, top: e, workId: i, updateOptInfo: s } = a, { opt: n, scale: r, translate: c } = o, l =
|
|
12590
|
+
const { data: o, left: t, top: e, workId: i, updateOptInfo: s } = a, { opt: n, scale: r, translate: c } = o, l = ze(null);
|
|
12589
12591
|
ft(() => {
|
|
12590
12592
|
var D, E;
|
|
12591
12593
|
if ((D = l.current) != null && D.offsetWidth && ((E = l.current) != null && E.offsetHeight)) {
|
|
@@ -12673,7 +12675,7 @@ const xM = (a) => {
|
|
|
12673
12675
|
bold: D,
|
|
12674
12676
|
italic: E,
|
|
12675
12677
|
boxSize: j
|
|
12676
|
-
} = d, A =
|
|
12678
|
+
} = d, A = ze(null), P = X(() => {
|
|
12677
12679
|
const it = v, ct = b || it * 1.2, W = {
|
|
12678
12680
|
fontSize: `${it}px`,
|
|
12679
12681
|
lineHeight: `${ct}px`,
|
|
@@ -12777,8 +12779,8 @@ const xM = (a) => {
|
|
|
12777
12779
|
function G(it, ct) {
|
|
12778
12780
|
const W = window == null ? void 0 : window.getSelection();
|
|
12779
12781
|
if (W != null && W.rangeCount && it && W && W.anchorNode) {
|
|
12780
|
-
const rt = W.anchorOffset, dt = W.anchorNode.textContent || "", St = dt.slice(0, rt) || "",
|
|
12781
|
-
q(vt,
|
|
12782
|
+
const rt = W.anchorOffset, dt = W.anchorNode.textContent || "", St = dt.slice(0, rt) || "", Xt = dt.slice(rt) || "", vt = St.concat(it) || "";
|
|
12783
|
+
q(vt, Xt, ct);
|
|
12782
12784
|
}
|
|
12783
12785
|
}
|
|
12784
12786
|
function q(it, ct, W) {
|
|
@@ -12787,34 +12789,34 @@ const xM = (a) => {
|
|
|
12787
12789
|
const dt = it.split(/\n/);
|
|
12788
12790
|
let St = rt.anchorNode.parentNode;
|
|
12789
12791
|
St === W && (St = rt.anchorNode);
|
|
12790
|
-
const
|
|
12791
|
-
let mt,
|
|
12792
|
-
for (;
|
|
12793
|
-
const
|
|
12794
|
-
if (
|
|
12795
|
-
if (
|
|
12796
|
-
let
|
|
12797
|
-
dt.length === 1 && (
|
|
12792
|
+
const Xt = [...W.childNodes], vt = [];
|
|
12793
|
+
let mt, pe = rt.anchorOffset;
|
|
12794
|
+
for (; Xt.length; ) {
|
|
12795
|
+
const zt = Xt.pop();
|
|
12796
|
+
if (zt) {
|
|
12797
|
+
if (zt === St) {
|
|
12798
|
+
let Qt = dt[0];
|
|
12799
|
+
dt.length === 1 && (pe = dt[0].length, Qt = dt[0].concat(ct)), St.nodeName === "#text" ? (St.textContent = Qt, mt = St) : St.nodeName === "DIV" && (St.innerText = Qt, mt = St.childNodes[0]);
|
|
12798
12800
|
break;
|
|
12799
12801
|
}
|
|
12800
|
-
vt.push(
|
|
12802
|
+
vt.push(zt), W.removeChild(zt);
|
|
12801
12803
|
}
|
|
12802
12804
|
}
|
|
12803
12805
|
if (dt.length > 1)
|
|
12804
|
-
for (let
|
|
12805
|
-
let
|
|
12806
|
-
const
|
|
12807
|
-
d.fontBgColor && (
|
|
12806
|
+
for (let zt = 1; zt < dt.length; zt++) {
|
|
12807
|
+
let Qt = dt[zt];
|
|
12808
|
+
const Oe = document.createElement("div");
|
|
12809
|
+
d.fontBgColor && (Oe.style.backgroundColor = d.fontBgColor), zt === dt.length - 1 && (pe = Qt.length, Qt = Qt.concat(ct)), Qt === "" ? Oe.innerHTML = "<br/>" : Oe.innerText = Qt, W.appendChild(Oe), zt === dt.length - 1 && (mt = Oe.childNodes[0]);
|
|
12808
12810
|
}
|
|
12809
12811
|
if (vt.length) {
|
|
12810
12812
|
vt.reverse();
|
|
12811
|
-
for (const
|
|
12812
|
-
W.appendChild(
|
|
12813
|
+
for (const zt of vt)
|
|
12814
|
+
W.appendChild(zt);
|
|
12813
12815
|
}
|
|
12814
12816
|
if (mt && mt.nodeName === "#text") {
|
|
12815
12817
|
rt.deleteFromDocument();
|
|
12816
|
-
const
|
|
12817
|
-
|
|
12818
|
+
const zt = document.createRange(), Qt = Math.min(pe, (mt == null ? void 0 : mt.length) || 0);
|
|
12819
|
+
zt.setStart(mt, Qt), zt.collapse(!0), rt.removeAllRanges(), rt.addRange(zt);
|
|
12818
12820
|
}
|
|
12819
12821
|
}
|
|
12820
12822
|
function at(it) {
|
|
@@ -12923,7 +12925,7 @@ class iy extends Qs {
|
|
|
12923
12925
|
handleKeyUp(t) {
|
|
12924
12926
|
const e = this.getInnerText(t.nativeEvent.target), i = this.props.activeTextId;
|
|
12925
12927
|
if (i) {
|
|
12926
|
-
const s = this.props.manager.control.textEditorManager.get(i), n =
|
|
12928
|
+
const s = this.props.manager.control.textEditorManager.get(i), n = Ht(e), r = L.Doing, c = [t.nativeEvent.target.offsetWidth, t.nativeEvent.target.offsetHeight];
|
|
12927
12929
|
(!s || s && (s.opt.text !== n || !pt(s.opt.boxSize, c) || !pt(s.opt.workState, r))) && this.updateOptInfo({
|
|
12928
12930
|
activeTextId: i,
|
|
12929
12931
|
update: {
|
|
@@ -13137,7 +13139,7 @@ const sy = () => {
|
|
|
13137
13139
|
);
|
|
13138
13140
|
}, 100, { leading: !1 });
|
|
13139
13141
|
return /* @__PURE__ */ S.createElement(
|
|
13140
|
-
|
|
13142
|
+
be,
|
|
13141
13143
|
{
|
|
13142
13144
|
disabled: p,
|
|
13143
13145
|
handle: ".appliance-plugin-rotate-mouse-pointer",
|
|
@@ -13216,7 +13218,7 @@ const sy = () => {
|
|
|
13216
13218
|
));
|
|
13217
13219
|
}, 100, { leading: !1 }), v = X(() => !!((o == null ? void 0 : o.scaleType) === ut.none && (o != null && o.canLock)), [o]), w = jt((m) => (m.stopPropagation(), m.cancelable && m.preventDefault(), (r == null ? void 0 : r.x) === (o == null ? void 0 : o.x) && (r == null ? void 0 : r.y) === (o == null ? void 0 : o.y) && i(m), !1), 100, { leading: !1 });
|
|
13218
13220
|
return /* @__PURE__ */ S.createElement(
|
|
13219
|
-
|
|
13221
|
+
be,
|
|
13220
13222
|
{
|
|
13221
13223
|
disabled: u,
|
|
13222
13224
|
position: l,
|
|
@@ -13423,7 +13425,7 @@ const sy = () => {
|
|
|
13423
13425
|
onResizeStop: N
|
|
13424
13426
|
}
|
|
13425
13427
|
);
|
|
13426
|
-
},
|
|
13428
|
+
}, Gi = (a) => {
|
|
13427
13429
|
const { id: o, pos: t, pointMap: e, type: i } = a, { setOperationType: s, mananger: n, floatBarData: r } = Ct(Nt), [c, l] = st({ x: 0, y: 0 }), [h, u] = st(L.Pending), [d, p] = st(!1);
|
|
13428
13430
|
ft(() => (K.activeListener(f), () => {
|
|
13429
13431
|
K.unmountActiveListener(f);
|
|
@@ -13480,7 +13482,7 @@ const sy = () => {
|
|
|
13480
13482
|
}
|
|
13481
13483
|
}, 100, { leading: !1 });
|
|
13482
13484
|
return /* @__PURE__ */ S.createElement(
|
|
13483
|
-
|
|
13485
|
+
be,
|
|
13484
13486
|
{
|
|
13485
13487
|
disabled: d,
|
|
13486
13488
|
position: c,
|
|
@@ -13514,7 +13516,7 @@ const sy = () => {
|
|
|
13514
13516
|
}
|
|
13515
13517
|
d[0] && s({ x: d[0][0], y: d[0][1] }), d[1] && r({ x: d[1][0], y: d[1][1] });
|
|
13516
13518
|
}, [e, t == null ? void 0 : t.points, t == null ? void 0 : t.selectIds, c]);
|
|
13517
|
-
const h = X(() => i && (t != null && t.selectIds) ? /* @__PURE__ */ S.createElement(
|
|
13519
|
+
const h = X(() => i && (t != null && t.selectIds) ? /* @__PURE__ */ S.createElement(Gi, { pos: i, type: "start", id: t.selectIds[0], pointMap: c }) : null, [i, t == null ? void 0 : t.selectIds, c]), u = X(() => n && (t != null && t.selectIds) ? /* @__PURE__ */ S.createElement(Gi, { pos: n, type: "end", id: t.selectIds[0], pointMap: c }) : null, [n, t == null ? void 0 : t.selectIds, c]);
|
|
13518
13520
|
return /* @__PURE__ */ S.createElement("div", { className: `${o}` }, h, u);
|
|
13519
13521
|
}, dy = S.forwardRef((a, o) => {
|
|
13520
13522
|
const { floatBarData: t, operationType: e } = Ct(Nt), i = X(() => (t == null ? void 0 : t.scaleType) !== ut.all || e === R.RotateNode ? null : /* @__PURE__ */ S.createElement(sy, null), [t, e]), s = X(() => (t == null ? void 0 : t.scaleType) !== ut.both || e === R.RotateNode ? null : /* @__PURE__ */ S.createElement(ny, null), [t, e]), n = X(() => (t == null ? void 0 : t.scaleType) !== ut.proportional || e === R.RotateNode ? null : /* @__PURE__ */ S.createElement(ry, null), [t, e]), r = X(() => (t == null ? void 0 : t.scaleType) === ut.none && (t != null && t.canLock) ? /* @__PURE__ */ S.createElement(ay, null) : null, [t]);
|
|
@@ -13785,7 +13787,7 @@ const Iy = (a) => {
|
|
|
13785
13787
|
setFloatBarData: () => {
|
|
13786
13788
|
}
|
|
13787
13789
|
});
|
|
13788
|
-
class
|
|
13790
|
+
class ii extends S.Component {
|
|
13789
13791
|
constructor(t) {
|
|
13790
13792
|
var e, i;
|
|
13791
13793
|
super(t);
|
|
@@ -13808,7 +13810,7 @@ class oi extends S.Component {
|
|
|
13808
13810
|
};
|
|
13809
13811
|
}
|
|
13810
13812
|
get editors() {
|
|
13811
|
-
return
|
|
13813
|
+
return de(this.props.mananger.control.textEditorManager.filterEditor(this.props.mananger.viewId));
|
|
13812
13814
|
}
|
|
13813
13815
|
componentDidMount() {
|
|
13814
13816
|
this.props.mananger.vDom = this, this.props.mananger.mountView(), this.setState({ dpr: this.props.mananger.dpr });
|
|
@@ -13914,7 +13916,7 @@ class Sy extends Fs {
|
|
|
13914
13916
|
setCanvassStyle() {
|
|
13915
13917
|
if (this.eventTragetElement) {
|
|
13916
13918
|
const t = this.eventTragetElement.offsetWidth || this.width, e = this.eventTragetElement.offsetHeight || this.height;
|
|
13917
|
-
t && e && this.canvasContainerRef.current && (t !== this.width || e !== this.height) && (this.dpr =
|
|
13919
|
+
t && e && this.canvasContainerRef.current && (t !== this.width || e !== this.height) && (this.dpr = ce(), this.width = t, this.height = e, this.canvasContainerRef.current.style.width = `${t}px`, this.canvasContainerRef.current.style.height = `${e}px`), t && e && this.snapshotContainerRef && this.snapshotContainerRef.current && (t !== this.width || e !== this.height) && (this.dpr = ce(), this.width = t, this.height = e), t && e && this.canvasBgRef.current && (t !== this.width || e !== this.height) && (this.dpr = ce(this.canvasBgRef.current.getContext("2d")), this.width = t, this.height = e, this.canvasBgRef.current.width = t * this.dpr, this.canvasBgRef.current.height = e * this.dpr, this.canvasFloatRef.current && (this.canvasFloatRef.current.width = t * this.dpr, this.canvasFloatRef.current.height = e * this.dpr), this.canvasServiceFloatRef.current && (this.canvasServiceFloatRef.current.width = t * this.dpr, this.canvasServiceFloatRef.current.height = e * this.dpr), this.canvasTopRef.current && (this.canvasTopRef.current.width = t * this.dpr, this.canvasTopRef.current.height = e * this.dpr));
|
|
13918
13920
|
}
|
|
13919
13921
|
}
|
|
13920
13922
|
destroy() {
|
|
@@ -13929,7 +13931,7 @@ class Sy extends Fs {
|
|
|
13929
13931
|
}
|
|
13930
13932
|
createMainViewDisplayer(t) {
|
|
13931
13933
|
const e = document.createElement("div");
|
|
13932
|
-
return e.className = "appliance-plugin-main-view-displayer", t.appendChild(e), this.eventTragetElement = t.children[0], this.containerOffset = this.getContainerOffset(this.eventTragetElement, this.containerOffset), this.bindToolsClass(),
|
|
13934
|
+
return e.className = "appliance-plugin-main-view-displayer", t.appendChild(e), this.eventTragetElement = t.children[0], this.containerOffset = this.getContainerOffset(this.eventTragetElement, this.containerOffset), this.bindToolsClass(), Fo.render(/* @__PURE__ */ S.createElement(ii, { viewId: this.viewId, mananger: this, refs: {
|
|
13933
13935
|
canvasServiceFloatRef: this.canvasServiceFloatRef,
|
|
13934
13936
|
canvasFloatRef: this.canvasFloatRef,
|
|
13935
13937
|
canvasBgRef: this.canvasBgRef,
|
|
@@ -13962,10 +13964,10 @@ class Cy extends dM {
|
|
|
13962
13964
|
if (this.eventTragetElement) {
|
|
13963
13965
|
if (this.canvasContainerRef.current) {
|
|
13964
13966
|
const t = this.eventTragetElement.offsetWidth || this.width, e = this.eventTragetElement.offsetHeight || this.height;
|
|
13965
|
-
t && e && (t !== this.width || e !== this.height) && (this.width = t, this.height = e, this.dpr =
|
|
13967
|
+
t && e && (t !== this.width || e !== this.height) && (this.width = t, this.height = e, this.dpr = ce(), this.canvasContainerRef.current.style.width = `${t}px`, this.canvasContainerRef.current.style.height = `${e}px`);
|
|
13966
13968
|
}
|
|
13967
13969
|
if (this.canvasBgRef.current) {
|
|
13968
|
-
this.dpr =
|
|
13970
|
+
this.dpr = ce(this.canvasBgRef.current.getContext("2d"));
|
|
13969
13971
|
const t = this.eventTragetElement.offsetWidth || this.width, e = this.eventTragetElement.offsetHeight || this.height;
|
|
13970
13972
|
t && e && (t !== this.width || e !== this.height) && (this.width = t, this.height = e, this.canvasBgRef.current.width = t * this.dpr, this.canvasBgRef.current.height = e * this.dpr, this.canvasFloatRef.current && (this.canvasFloatRef.current.width = t * this.dpr, this.canvasFloatRef.current.height = e * this.dpr), this.canvasServiceFloatRef.current && (this.canvasServiceFloatRef.current.width = t * this.dpr, this.canvasServiceFloatRef.current.height = e * this.dpr), this.canvasTopRef.current && (this.canvasTopRef.current.width = t * this.dpr, this.canvasTopRef.current.height = e * this.dpr));
|
|
13971
13973
|
}
|
|
@@ -13973,7 +13975,7 @@ class Cy extends dM {
|
|
|
13973
13975
|
}
|
|
13974
13976
|
createAppViewDisplayer(t, e) {
|
|
13975
13977
|
const i = document.createElement("div");
|
|
13976
|
-
return i.className = "appliance-plugin-app-view-displayer", e.appendChild(i), this.eventTragetElement = e.children[0], this.containerOffset = this.getContainerOffset(this.eventTragetElement, this.containerOffset), this.bindToolsClass(),
|
|
13978
|
+
return i.className = "appliance-plugin-app-view-displayer", e.appendChild(i), this.eventTragetElement = e.children[0], this.containerOffset = this.getContainerOffset(this.eventTragetElement, this.containerOffset), this.bindToolsClass(), Fo.render(/* @__PURE__ */ S.createElement(ii, { viewId: t, mananger: this, refs: {
|
|
13977
13979
|
canvasServiceFloatRef: this.canvasServiceFloatRef,
|
|
13978
13980
|
canvasFloatRef: this.canvasFloatRef,
|
|
13979
13981
|
canvasBgRef: this.canvasBgRef,
|
|
@@ -13984,7 +13986,7 @@ class Cy extends dM {
|
|
|
13984
13986
|
} }), i), this.control.room && this.bindDisplayerEvent(this.eventTragetElement), this;
|
|
13985
13987
|
}
|
|
13986
13988
|
}
|
|
13987
|
-
class Bt extends
|
|
13989
|
+
class Bt extends Ue {
|
|
13988
13990
|
constructor(t) {
|
|
13989
13991
|
super(t);
|
|
13990
13992
|
g(this, "focuedViewId");
|
|
@@ -14024,7 +14026,7 @@ class Bt extends We {
|
|
|
14024
14026
|
const e = t.divElement;
|
|
14025
14027
|
if (!e || !t.focusScenePath || !(t.focusScenePath || t.scenePath))
|
|
14026
14028
|
return;
|
|
14027
|
-
const s = new Sy(this.control,
|
|
14029
|
+
const s = new Sy(this.control, xt.InternalMsgEmitter), n = t.size.width || s.width, r = t.size.height || s.height, l = {
|
|
14028
14030
|
dpr: s.dpr,
|
|
14029
14031
|
originalPoint: [n / 2, r / 2],
|
|
14030
14032
|
offscreenCanvasOpt: {
|
|
@@ -14105,7 +14107,7 @@ class Bt extends We {
|
|
|
14105
14107
|
}, 0);
|
|
14106
14108
|
});
|
|
14107
14109
|
}
|
|
14108
|
-
const r = new Cy(e, this.control,
|
|
14110
|
+
const r = new Cy(e, this.control, xt.InternalMsgEmitter), c = i.size.width || r.width, l = i.size.height || r.height, u = {
|
|
14109
14111
|
dpr: r.dpr,
|
|
14110
14112
|
originalPoint: [c / 2, l / 2],
|
|
14111
14113
|
offscreenCanvasOpt: {
|
|
@@ -14260,14 +14262,15 @@ class Bt extends We {
|
|
|
14260
14262
|
this.control.hotkeyManager.onActiveHotkey(t);
|
|
14261
14263
|
}
|
|
14262
14264
|
}
|
|
14263
|
-
class
|
|
14265
|
+
class ne extends xt {
|
|
14264
14266
|
constructor(t) {
|
|
14265
14267
|
super(t);
|
|
14266
14268
|
g(this, "windowManager");
|
|
14267
14269
|
g(this, "viewContainerManager");
|
|
14268
14270
|
const e = {
|
|
14269
14271
|
control: this,
|
|
14270
|
-
internalMsgEmitter:
|
|
14272
|
+
internalMsgEmitter: xt.InternalMsgEmitter,
|
|
14273
|
+
publicMsgEmitter: xt.PublicMsgEmitter
|
|
14271
14274
|
};
|
|
14272
14275
|
this.viewContainerManager = new Bt(e);
|
|
14273
14276
|
}
|
|
@@ -14337,7 +14340,7 @@ class ve extends zt {
|
|
|
14337
14340
|
}
|
|
14338
14341
|
});
|
|
14339
14342
|
for (const [l, h] of n.entries())
|
|
14340
|
-
|
|
14343
|
+
xt.InternalMsgEmitter.emit("excludeIds", [...h], l);
|
|
14341
14344
|
}), this.room && this.roomMember.onUidChangeHook((t) => {
|
|
14342
14345
|
var e, i;
|
|
14343
14346
|
if ((e = this.collector) != null && e.serviceStorage) {
|
|
@@ -14372,12 +14375,12 @@ class ve extends zt {
|
|
|
14372
14375
|
}), this.viewContainerManager.listenerWindowManager(this.windowManager);
|
|
14373
14376
|
}
|
|
14374
14377
|
}
|
|
14375
|
-
const B = class B extends
|
|
14378
|
+
const B = class B extends qi {
|
|
14376
14379
|
constructor() {
|
|
14377
14380
|
super(...arguments);
|
|
14378
14381
|
g(this, "onPhaseChanged", (t) => {
|
|
14379
14382
|
var e;
|
|
14380
|
-
t ===
|
|
14383
|
+
t === Ki.Reconnecting && ((e = B.currentManager) == null || e.setSnapshootData());
|
|
14381
14384
|
});
|
|
14382
14385
|
g(this, "updateRoomWritable", () => {
|
|
14383
14386
|
var t;
|
|
@@ -14391,7 +14394,7 @@ const B = class B extends Xi {
|
|
|
14391
14394
|
static async getInstance(t, e) {
|
|
14392
14395
|
!e.options.cdn.fullWorkerUrl && !e.options.cdn.subWorkerUrl && B.logger.error("[ApplianceMultiPlugin] you must adaptor options cdn fullWorkerUrl and subWorkerUrl");
|
|
14393
14396
|
const i = t.displayer, s = i.callbacks.on, n = i.callbacks.off, r = i.callbacks.once, c = t.cleanCurrentScene, l = t.mainView.setMemberState;
|
|
14394
|
-
e != null && e.logger && (B.logger = e.logger), e.options && (B.options = { ...
|
|
14397
|
+
e != null && e.logger && (B.logger = e.logger), e.options && (B.options = { ...Ft, ...e.options });
|
|
14395
14398
|
let h = i.getInvisiblePlugin(B.kind);
|
|
14396
14399
|
h || (h = await B.createApplianceMultiPlugin(i, B.kind)), i && h && B.createCurrentManager(t, B.options, h), h && B.currentManager && (B.currentManager.bindPlugin(h), h.init(i));
|
|
14397
14400
|
const u = {
|
|
@@ -14404,7 +14407,7 @@ const B = class B extends Xi {
|
|
|
14404
14407
|
var v;
|
|
14405
14408
|
B.logger.info("[ApplianceMultiPlugin] getBoundingRectAsync");
|
|
14406
14409
|
const M = (t.mainView || i).getBoundingRect(f), y = await ((v = B.currentManager) == null ? void 0 : v.getBoundingRect(f));
|
|
14407
|
-
return !M.width || !M.height ? y :
|
|
14410
|
+
return !M.width || !M.height ? y : ti(M, y);
|
|
14408
14411
|
},
|
|
14409
14412
|
screenshotToCanvasAsync: async function(f, M, y, v, w, m) {
|
|
14410
14413
|
var D;
|
|
@@ -14446,13 +14449,13 @@ const B = class B extends Xi {
|
|
|
14446
14449
|
}, M.append(O), getComputedStyle(M).position || (M.style.position = "relative");
|
|
14447
14450
|
},
|
|
14448
14451
|
_callbacksOn: function(f, M) {
|
|
14449
|
-
B.logger.info(`[ApplianceMultiPlugin] callbacks ${f}`), (f === "onCanUndoStepsUpdate" || f === "onCanRedoStepsUpdate") && lt(i) && i.isWritable ?
|
|
14452
|
+
B.logger.info(`[ApplianceMultiPlugin] callbacks ${f}`), (f === "onCanUndoStepsUpdate" || f === "onCanRedoStepsUpdate") && lt(i) && i.isWritable ? ne.InternalMsgEmitter.on(f, M) : s.call(i.callbacks, f, M);
|
|
14450
14453
|
},
|
|
14451
14454
|
_callbacksOnce: function(f, M) {
|
|
14452
|
-
B.logger.info(`[ApplianceMultiPlugin] callbacks ${f}`), (f === "onCanUndoStepsUpdate" || f === "onCanRedoStepsUpdate") && lt(i) && i.isWritable ?
|
|
14455
|
+
B.logger.info(`[ApplianceMultiPlugin] callbacks ${f}`), (f === "onCanUndoStepsUpdate" || f === "onCanRedoStepsUpdate") && lt(i) && i.isWritable ? ne.InternalMsgEmitter.on(f, M) : r.call(i.callbacks, f, M);
|
|
14453
14456
|
},
|
|
14454
14457
|
_callbacksOff: function(f, M) {
|
|
14455
|
-
B.logger.info(`[ApplianceMultiPlugin] callbacks ${f}`), (f === "onCanUndoStepsUpdate" || f === "onCanRedoStepsUpdate") && lt(i) && i.isWritable ?
|
|
14458
|
+
B.logger.info(`[ApplianceMultiPlugin] callbacks ${f}`), (f === "onCanUndoStepsUpdate" || f === "onCanRedoStepsUpdate") && lt(i) && i.isWritable ? ne.InternalMsgEmitter.off(f, M) : n.call(i.callbacks, f, M);
|
|
14456
14459
|
},
|
|
14457
14460
|
canRedoSteps() {
|
|
14458
14461
|
if (B.logger.info("[ApplianceMultiPlugin] canRedoSteps"), B.currentManager && lt(i) && !i.disableSerialization) {
|
|
@@ -14527,6 +14530,12 @@ const B = class B extends Xi {
|
|
|
14527
14530
|
cancelFilterRender(f, M) {
|
|
14528
14531
|
if (B.logger.info("[ApplianceMultiPlugin] filterRenderByUid"), B.currentManager && lt(i) && i.isWritable)
|
|
14529
14532
|
return B.currentManager.cancelFilterRender(f, M);
|
|
14533
|
+
},
|
|
14534
|
+
addListener: (f, M) => {
|
|
14535
|
+
B.logger.info(`[ApplianceMultiPlugin] addListener ${f}`), ne.PublicMsgEmitter.on(f, M);
|
|
14536
|
+
},
|
|
14537
|
+
removeListener: (f, M) => {
|
|
14538
|
+
B.logger.info(`[ApplianceMultiPlugin] removeListener ${f}`), ne.PublicMsgEmitter.off(f, M);
|
|
14530
14539
|
}
|
|
14531
14540
|
}, d = (f, M) => {
|
|
14532
14541
|
if (B.logger.info(`[ApplianceMultiPlugin] injectMethodToObject ${M}`), typeof f[M] == "function" || typeof f[M] > "u") {
|
|
@@ -14543,9 +14552,9 @@ const B = class B extends Xi {
|
|
|
14543
14552
|
get() {
|
|
14544
14553
|
return u.canRedoSteps();
|
|
14545
14554
|
}
|
|
14546
|
-
}),
|
|
14555
|
+
}), ne.InternalMsgEmitter.on("onCanUndoStepsUpdate", (f) => {
|
|
14547
14556
|
t.emitter.emit("canUndoStepsChange", f);
|
|
14548
|
-
}),
|
|
14557
|
+
}), ne.InternalMsgEmitter.on("onCanRedoStepsUpdate", (f) => {
|
|
14549
14558
|
t.emitter.emit("canRedoStepsChange", f);
|
|
14550
14559
|
});
|
|
14551
14560
|
const p = {
|
|
@@ -14575,7 +14584,7 @@ const B = class B extends Xi {
|
|
|
14575
14584
|
}
|
|
14576
14585
|
// static onDestroy(plugin: ApplianceMultiPlugin) {}
|
|
14577
14586
|
get isReplay() {
|
|
14578
|
-
return
|
|
14587
|
+
return Bo(this.displayer);
|
|
14579
14588
|
}
|
|
14580
14589
|
get callbackName() {
|
|
14581
14590
|
return this.isReplay ? "onPlayerStateChanged" : "onRoomStateChanged";
|
|
@@ -14595,16 +14604,16 @@ g(B, "kind", "appliance-multi-plugin"), g(B, "currentManager"), g(B, "logger", {
|
|
|
14595
14604
|
info: console.log,
|
|
14596
14605
|
warn: console.warn,
|
|
14597
14606
|
error: console.error
|
|
14598
|
-
}), g(B, "options",
|
|
14607
|
+
}), g(B, "options", Ft), g(B, "createCurrentManager", (t, e, i) => {
|
|
14599
14608
|
B.currentManager && B.currentManager.destroy();
|
|
14600
14609
|
const s = {
|
|
14601
14610
|
plugin: i,
|
|
14602
14611
|
displayer: t.displayer,
|
|
14603
14612
|
options: e
|
|
14604
|
-
}, n = new
|
|
14613
|
+
}, n = new ne(s);
|
|
14605
14614
|
B.logger.info("[ApplianceMultiPlugin] refresh ApplianceMultiManager object"), n.setWindowManager(t), B.currentManager = n;
|
|
14606
14615
|
});
|
|
14607
|
-
let
|
|
14616
|
+
let Zi = B;
|
|
14608
14617
|
class ky extends Fs {
|
|
14609
14618
|
constructor(t, e) {
|
|
14610
14619
|
super(t, e);
|
|
@@ -14628,11 +14637,11 @@ class ky extends Fs {
|
|
|
14628
14637
|
setCanvassStyle() {
|
|
14629
14638
|
if (this.eventTragetElement) {
|
|
14630
14639
|
const t = this.eventTragetElement.offsetWidth, e = this.eventTragetElement.offsetHeight;
|
|
14631
|
-
t && e && this.canvasContainerRef.current && (t !== this.width || e !== this.height) && (this.dpr =
|
|
14640
|
+
t && e && this.canvasContainerRef.current && (t !== this.width || e !== this.height) && (this.dpr = ce()), t && e && this.canvasContainerRef.current && (t !== this.width || e !== this.height) && (this.dpr = ce(), this.width = t, this.height = e), t && e && this.canvasBgRef.current && (t !== this.width || e !== this.height) && (this.dpr = ce(this.canvasBgRef.current.getContext("2d")), this.width = t, this.height = e, this.canvasBgRef.current.width = t * this.dpr, this.canvasBgRef.current.height = e * this.dpr, this.canvasFloatRef.current && (this.canvasFloatRef.current.width = t * this.dpr, this.canvasFloatRef.current.height = e * this.dpr), this.canvasServiceFloatRef.current && (this.canvasServiceFloatRef.current.width = t * this.dpr, this.canvasServiceFloatRef.current.height = e * this.dpr), this.canvasTopRef.current && (this.canvasTopRef.current.width = t * this.dpr, this.canvasTopRef.current.height = e * this.dpr));
|
|
14632
14641
|
}
|
|
14633
14642
|
}
|
|
14634
14643
|
createMainViewDisplayer(t) {
|
|
14635
|
-
return this.vDom || (this.containerOffset = this.getContainerOffset(t, this.containerOffset), this.eventTragetElement = t.parentElement.children[0], t.innerHTML = "",
|
|
14644
|
+
return this.vDom || (this.containerOffset = this.getContainerOffset(t, this.containerOffset), this.eventTragetElement = t.parentElement.children[0], t.innerHTML = "", Fo.render(/* @__PURE__ */ S.createElement(ii, { viewId: this.viewId, mananger: this, refs: {
|
|
14636
14645
|
canvasServiceFloatRef: this.canvasServiceFloatRef,
|
|
14637
14646
|
canvasFloatRef: this.canvasFloatRef,
|
|
14638
14647
|
canvasBgRef: this.canvasBgRef,
|
|
@@ -14644,7 +14653,7 @@ class ky extends Fs {
|
|
|
14644
14653
|
} }), t), this.control.room && this.bindDisplayerEvent(this.eventTragetElement)), this;
|
|
14645
14654
|
}
|
|
14646
14655
|
}
|
|
14647
|
-
class
|
|
14656
|
+
class oe extends Ue {
|
|
14648
14657
|
constructor(t) {
|
|
14649
14658
|
super(t);
|
|
14650
14659
|
g(this, "focuedViewId");
|
|
@@ -14655,23 +14664,23 @@ class ee extends We {
|
|
|
14655
14664
|
bindMainView() {
|
|
14656
14665
|
if (!this.control.divMainView)
|
|
14657
14666
|
return;
|
|
14658
|
-
const t = new ky(this.control,
|
|
14667
|
+
const t = new ky(this.control, xt.InternalMsgEmitter);
|
|
14659
14668
|
this.focuedViewId = kt;
|
|
14660
14669
|
const { width: e, height: i, dpr: s } = t, n = {
|
|
14661
14670
|
dpr: s,
|
|
14662
14671
|
originalPoint: [e / 2, i / 2],
|
|
14663
14672
|
offscreenCanvasOpt: {
|
|
14664
|
-
...
|
|
14673
|
+
...oe.defaultScreenCanvasOpt,
|
|
14665
14674
|
width: e,
|
|
14666
14675
|
height: i
|
|
14667
14676
|
},
|
|
14668
14677
|
layerOpt: {
|
|
14669
|
-
...
|
|
14678
|
+
...oe.defaultLayerOpt,
|
|
14670
14679
|
width: e,
|
|
14671
14680
|
height: i
|
|
14672
14681
|
},
|
|
14673
14682
|
cameraOpt: {
|
|
14674
|
-
...
|
|
14683
|
+
...oe.defaultCameraOpt,
|
|
14675
14684
|
width: e,
|
|
14676
14685
|
height: i
|
|
14677
14686
|
}
|
|
@@ -14696,22 +14705,22 @@ class ee extends We {
|
|
|
14696
14705
|
const e = this.getView(t);
|
|
14697
14706
|
if (e) {
|
|
14698
14707
|
const { width: s, height: n, dpr: r } = e.displayer;
|
|
14699
|
-
(i = this.control.pluginOptions.canvasOpt) != null && i.contextType && (
|
|
14708
|
+
(i = this.control.pluginOptions.canvasOpt) != null && i.contextType && (oe.defaultScreenCanvasOpt.contextType = this.control.pluginOptions.canvasOpt.contextType);
|
|
14700
14709
|
const c = {
|
|
14701
14710
|
dpr: r,
|
|
14702
14711
|
originalPoint: [s / 2, n / 2],
|
|
14703
14712
|
offscreenCanvasOpt: {
|
|
14704
|
-
...
|
|
14713
|
+
...oe.defaultScreenCanvasOpt,
|
|
14705
14714
|
width: s,
|
|
14706
14715
|
height: n
|
|
14707
14716
|
},
|
|
14708
14717
|
layerOpt: {
|
|
14709
|
-
...
|
|
14718
|
+
...oe.defaultLayerOpt,
|
|
14710
14719
|
width: s,
|
|
14711
14720
|
height: n
|
|
14712
14721
|
},
|
|
14713
14722
|
cameraOpt: {
|
|
14714
|
-
...
|
|
14723
|
+
...oe.defaultCameraOpt,
|
|
14715
14724
|
width: s,
|
|
14716
14725
|
height: n
|
|
14717
14726
|
}
|
|
@@ -14737,7 +14746,7 @@ class ee extends We {
|
|
|
14737
14746
|
}
|
|
14738
14747
|
}
|
|
14739
14748
|
}
|
|
14740
|
-
class
|
|
14749
|
+
class Vt extends xt {
|
|
14741
14750
|
constructor(t) {
|
|
14742
14751
|
super(t);
|
|
14743
14752
|
g(this, "viewContainerManager");
|
|
@@ -14749,12 +14758,13 @@ class oe extends zt {
|
|
|
14749
14758
|
}, 20, { leading: !1 }));
|
|
14750
14759
|
const e = {
|
|
14751
14760
|
control: this,
|
|
14752
|
-
internalMsgEmitter:
|
|
14761
|
+
internalMsgEmitter: Vt.InternalMsgEmitter,
|
|
14762
|
+
publicMsgEmitter: Vt.PublicMsgEmitter
|
|
14753
14763
|
};
|
|
14754
|
-
this.viewContainerManager = new
|
|
14764
|
+
this.viewContainerManager = new oe(e);
|
|
14755
14765
|
}
|
|
14756
14766
|
init() {
|
|
14757
|
-
|
|
14767
|
+
Vt.InternalMsgEmitter.on(Z.BindMainView, (t) => {
|
|
14758
14768
|
this.divMainView = t, this.plugin && !this.viewContainerManager.mainView && this.viewContainerManager.bindMainView();
|
|
14759
14769
|
});
|
|
14760
14770
|
}
|
|
@@ -14808,7 +14818,7 @@ class oe extends zt {
|
|
|
14808
14818
|
}
|
|
14809
14819
|
});
|
|
14810
14820
|
for (const [l, h] of n.entries())
|
|
14811
|
-
|
|
14821
|
+
xt.InternalMsgEmitter.emit("excludeIds", [...h], l);
|
|
14812
14822
|
}), this.room && (this.roomMember.onUidChangeHook((t) => {
|
|
14813
14823
|
var e, i, s, n;
|
|
14814
14824
|
if ((e = this.collector) != null && e.serviceStorage) {
|
|
@@ -14840,12 +14850,12 @@ class oe extends zt {
|
|
|
14840
14850
|
await this.worker.init();
|
|
14841
14851
|
}
|
|
14842
14852
|
}
|
|
14843
|
-
const U = class U extends
|
|
14853
|
+
const U = class U extends qi {
|
|
14844
14854
|
constructor() {
|
|
14845
14855
|
super(...arguments);
|
|
14846
14856
|
g(this, "onPhaseChanged", (t) => {
|
|
14847
14857
|
var e;
|
|
14848
|
-
t ===
|
|
14858
|
+
t === Ki.Reconnecting && ((e = U.currentManager) == null || e.setSnapshootData());
|
|
14849
14859
|
});
|
|
14850
14860
|
g(this, "updateRoomWritable", () => {
|
|
14851
14861
|
var t;
|
|
@@ -14853,12 +14863,12 @@ const U = class U extends Xi {
|
|
|
14853
14863
|
});
|
|
14854
14864
|
g(this, "roomStateChangeListener", async (t) => {
|
|
14855
14865
|
var e, i;
|
|
14856
|
-
U.currentManager instanceof
|
|
14866
|
+
U.currentManager instanceof Vt && (t.cameraState && U.currentManager.onCameraChange(t.cameraState), t.sceneState && U.currentManager.onSceneChange(t.sceneState.scenePath, kt)), t != null && t.roomMembers && ((e = U.currentManager) == null || e.onRoomMembersChange(t.roomMembers)), !(lt(this.displayer) && !this.displayer.isWritable) && t.memberState && ((i = U.currentManager) == null || i.onMemberChange(t.memberState));
|
|
14857
14867
|
});
|
|
14858
14868
|
}
|
|
14859
14869
|
static async getInstance(t, e) {
|
|
14860
14870
|
const i = t.callbacks.on, s = t.callbacks.off, n = t.callbacks.once, r = t.cleanCurrentScene.bind(t), c = t.setMemberState.bind(t);
|
|
14861
|
-
e != null && e.logger && (U.logger = e.logger), e.options && (U.options = { ...
|
|
14871
|
+
e != null && e.logger && (U.logger = e.logger), e.options && (U.options = { ...Ft, ...e.options });
|
|
14862
14872
|
let l = t.getInvisiblePlugin(U.kind);
|
|
14863
14873
|
l || (l = await U.createAppliancePlugin(t, U.kind)), t && l && U.createCurrentManager(
|
|
14864
14874
|
t,
|
|
@@ -14875,7 +14885,7 @@ const U = class U extends Xi {
|
|
|
14875
14885
|
var y;
|
|
14876
14886
|
U.logger.info("[ApplianceSinglePlugin] getBoundingRectAsync");
|
|
14877
14887
|
const f = t.getBoundingRect(p), M = await ((y = U.currentManager) == null ? void 0 : y.getBoundingRect(p));
|
|
14878
|
-
return !f.width || !f.height ? M :
|
|
14888
|
+
return !f.width || !f.height ? M : ti(f, M);
|
|
14879
14889
|
},
|
|
14880
14890
|
screenshotToCanvasAsync: async function(p, f, M, y, v, w) {
|
|
14881
14891
|
var b;
|
|
@@ -14918,13 +14928,13 @@ const U = class U extends Xi {
|
|
|
14918
14928
|
}, f.append(P), getComputedStyle(f).position || (f.style.position = "relative");
|
|
14919
14929
|
},
|
|
14920
14930
|
_callbacksOn: function(p, f) {
|
|
14921
|
-
U.logger.info(`[ApplianceSinglePlugin] callbacks ${p}`), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && lt(t) && t.isWritable ?
|
|
14931
|
+
U.logger.info(`[ApplianceSinglePlugin] callbacks ${p}`), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && lt(t) && t.isWritable ? Vt.InternalMsgEmitter.on(p, f) : i.call(t.callbacks, p, f);
|
|
14922
14932
|
},
|
|
14923
14933
|
_callbacksOnce: function(p, f) {
|
|
14924
|
-
U.logger.info(`[ApplianceSinglePlugin] callbacks ${p}`), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && lt(t) && t.isWritable ?
|
|
14934
|
+
U.logger.info(`[ApplianceSinglePlugin] callbacks ${p}`), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && lt(t) && t.isWritable ? Vt.InternalMsgEmitter.on(p, f) : n.call(t.callbacks, p, f);
|
|
14925
14935
|
},
|
|
14926
14936
|
_callbacksOff: function(p, f) {
|
|
14927
|
-
U.logger.info(`[ApplianceSinglePlugin] callbacks ${p}`), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && lt(t) && t.isWritable ?
|
|
14937
|
+
U.logger.info(`[ApplianceSinglePlugin] callbacks ${p}`), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && lt(t) && t.isWritable ? Vt.InternalMsgEmitter.off(p, f) : s.call(t.callbacks, p, f);
|
|
14928
14938
|
},
|
|
14929
14939
|
canRedoSteps() {
|
|
14930
14940
|
if (U.logger.info("[ApplianceSinglePlugin] canRedoSteps"), U.currentManager && lt(t) && !t.disableSerialization) {
|
|
@@ -14999,6 +15009,12 @@ const U = class U extends Xi {
|
|
|
14999
15009
|
cancelFilterRender(p, f) {
|
|
15000
15010
|
if (U.logger.info("[ApplianceSinglePlugin] filterRenderByUid"), U.currentManager && lt(t) && t.isWritable)
|
|
15001
15011
|
return U.currentManager.cancelFilterRender(p, f);
|
|
15012
|
+
},
|
|
15013
|
+
addListener: (p, f) => {
|
|
15014
|
+
U.logger.info(`[ApplianceSinglePlugin] addListener ${p}`), Vt.PublicMsgEmitter.on(p, f);
|
|
15015
|
+
},
|
|
15016
|
+
removeListener: (p, f) => {
|
|
15017
|
+
U.logger.info(`[ApplianceSinglePlugin] removeListener ${p}`), Vt.PublicMsgEmitter.off(p, f);
|
|
15002
15018
|
}
|
|
15003
15019
|
}, u = (p, f) => {
|
|
15004
15020
|
if (U.logger.info(`[ApplianceSinglePlugin] injectMethodToObject ${f}`), typeof p[f] == "function" || typeof p[f] > "u") {
|
|
@@ -15060,7 +15076,7 @@ const U = class U extends Xi {
|
|
|
15060
15076
|
}
|
|
15061
15077
|
}
|
|
15062
15078
|
get isReplay() {
|
|
15063
|
-
return
|
|
15079
|
+
return Bo(this.displayer);
|
|
15064
15080
|
}
|
|
15065
15081
|
get callbackName() {
|
|
15066
15082
|
return this.isReplay ? "onPlayerStateChanged" : "onRoomStateChanged";
|
|
@@ -15080,75 +15096,75 @@ g(U, "kind", "appliance-aids-single-plugin"), g(U, "cursorAdapter"), g(U, "curre
|
|
|
15080
15096
|
info: console.log,
|
|
15081
15097
|
warn: console.warn,
|
|
15082
15098
|
error: console.error
|
|
15083
|
-
}), g(U, "options",
|
|
15099
|
+
}), g(U, "options", Ft), g(U, "createCurrentManager", (t, e, i) => {
|
|
15084
15100
|
U.currentManager && U.currentManager.destroy();
|
|
15085
15101
|
const s = {
|
|
15086
15102
|
plugin: i,
|
|
15087
15103
|
displayer: t,
|
|
15088
15104
|
options: e
|
|
15089
|
-
}, n = new
|
|
15105
|
+
}, n = new Vt(s);
|
|
15090
15106
|
n.init(), U.logger.info("[ApplianceSinglePlugin] refresh ApplianceSingleManager object"), U.currentManager = n;
|
|
15091
15107
|
});
|
|
15092
|
-
let
|
|
15093
|
-
const
|
|
15108
|
+
let Ji = U;
|
|
15109
|
+
const ke = class ke extends S.Component {
|
|
15094
15110
|
constructor() {
|
|
15095
15111
|
super(...arguments);
|
|
15096
15112
|
g(this, "mainViewRef", null);
|
|
15097
15113
|
}
|
|
15098
15114
|
componentDidMount() {
|
|
15099
|
-
|
|
15115
|
+
ke.emiter || (ke.emiter = Vt.InternalMsgEmitter), ke.emiter.emit(Z.BindMainView, this.mainViewRef);
|
|
15100
15116
|
}
|
|
15101
15117
|
render() {
|
|
15102
15118
|
return /* @__PURE__ */ S.createElement(S.Fragment, null, this.props.children, /* @__PURE__ */ S.createElement("div", { className: "appliance-plugin-main-view-displayer", ref: (t) => this.mainViewRef = t }));
|
|
15103
15119
|
}
|
|
15104
15120
|
};
|
|
15105
|
-
g(
|
|
15106
|
-
let
|
|
15121
|
+
g(ke, "emiter");
|
|
15122
|
+
let Xi = ke;
|
|
15107
15123
|
export {
|
|
15108
|
-
|
|
15124
|
+
Zi as A,
|
|
15109
15125
|
nt as B,
|
|
15110
15126
|
Fy as C,
|
|
15111
|
-
|
|
15127
|
+
Ft as D,
|
|
15112
15128
|
C as E,
|
|
15113
15129
|
_ as F,
|
|
15114
|
-
|
|
15130
|
+
qt as G,
|
|
15115
15131
|
nn as H,
|
|
15116
15132
|
Z as I,
|
|
15117
|
-
|
|
15133
|
+
ee as J,
|
|
15118
15134
|
Xe as K,
|
|
15119
|
-
|
|
15135
|
+
Te as L,
|
|
15120
15136
|
kt as M,
|
|
15121
15137
|
ut as N,
|
|
15122
15138
|
rn as O,
|
|
15123
15139
|
Dt as P,
|
|
15124
|
-
|
|
15125
|
-
|
|
15140
|
+
Kt as Q,
|
|
15141
|
+
_t as S,
|
|
15126
15142
|
Hy as T,
|
|
15127
|
-
|
|
15143
|
+
Ue as V,
|
|
15128
15144
|
L as a,
|
|
15129
15145
|
By as b,
|
|
15130
|
-
|
|
15146
|
+
de as c,
|
|
15131
15147
|
co as d,
|
|
15132
15148
|
gt as e,
|
|
15133
15149
|
Uy as f,
|
|
15134
15150
|
qf as g,
|
|
15135
15151
|
F as h,
|
|
15136
|
-
|
|
15152
|
+
We as i,
|
|
15137
15153
|
Kf as j,
|
|
15138
15154
|
z as k,
|
|
15139
15155
|
H as l,
|
|
15140
|
-
|
|
15156
|
+
Ht as m,
|
|
15141
15157
|
ig as n,
|
|
15142
15158
|
ho as o,
|
|
15143
15159
|
R as p,
|
|
15144
15160
|
Vy as q,
|
|
15145
15161
|
qe as r,
|
|
15146
|
-
|
|
15162
|
+
Ye as s,
|
|
15147
15163
|
Fe as t,
|
|
15148
15164
|
ie as u,
|
|
15149
15165
|
ko as v,
|
|
15150
15166
|
Yy as w,
|
|
15151
15167
|
Wy as x,
|
|
15152
|
-
|
|
15153
|
-
|
|
15168
|
+
Ji as y,
|
|
15169
|
+
Xi as z
|
|
15154
15170
|
};
|