@netless/appliance-plugin 1.1.33 → 1.1.34-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/READMA.zh-CN.md +40 -23
- package/README.md +40 -23
- package/cdn/cdn.js +1 -1
- package/cdn/{fullWorker-CQ9UVK.js → fullWorker-A-oik2.js} +1 -1
- package/cdn/{subWorker-D9-qHB.js → subWorker-hEAHPy.js} +1 -1
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/fullWorker.js +1 -1
- package/dist/{index-BrdMbdqX.mjs → index-B5PYiw1o.mjs} +681 -674
- package/dist/{index-BZIAL5Sa.mjs → index-D5lBaSz6.mjs} +1 -1
- package/dist/index-DjSg1GK5.js +1 -0
- package/dist/{index-BqijH7W9.js → index-DzxY6N7c.js} +1 -1
- package/dist/{index-DjWYcZGp.js → index-Ni5Bad0a.js} +1 -1
- package/dist/{index-BH2WeNgx.mjs → index-p4HeEgIq.mjs} +1 -1
- package/dist/plugin/baseApplianceManager.d.ts +2 -1
- package/dist/plugin/utils.d.ts +8 -0
- package/dist/subWorker.js +1 -1
- package/package.json +1 -1
- package/dist/index-2kLb6nSb.js +0 -1
|
@@ -13,9 +13,9 @@ import m, { useContext as Ce, useState as ae, useMemo as J, useEffect as ge, use
|
|
|
13
13
|
import Ln, { createPortal as Yr } from "react-dom";
|
|
14
14
|
import vt from "react-draggable";
|
|
15
15
|
import { Resizable as Ur } from "re-resizable";
|
|
16
|
-
const
|
|
17
|
-
var ne = /* @__PURE__ */ ((r) => (r.selector = "selector", r.clicker = "clicker", r.laserPointer = "laserPointer", r.pencil = "pencil", r.rectangle = "rectangle", r.ellipse = "ellipse", r.shape = "shape", r.eraser = "eraser", r.pencilEraser = "pencilEraser", r.text = "text", r.straight = "straight", r.arrow = "arrow", r.hand = "hand", r.laserPen = "laserPen", r))(ne || {}), me = /* @__PURE__ */ ((r) => (r.Normal = "Normal", r.Stroke = "Stroke", r.Dotted = "Dotted", r.LongDotted = "LongDotted", r))(me || {}),
|
|
18
|
-
const
|
|
16
|
+
const TI = "/fullWorker.js", NI = "/subWorker.js";
|
|
17
|
+
var ne = /* @__PURE__ */ ((r) => (r.selector = "selector", r.clicker = "clicker", r.laserPointer = "laserPointer", r.pencil = "pencil", r.rectangle = "rectangle", r.ellipse = "ellipse", r.shape = "shape", r.eraser = "eraser", r.pencilEraser = "pencilEraser", r.text = "text", r.straight = "straight", r.arrow = "arrow", r.hand = "hand", r.laserPen = "laserPen", r))(ne || {}), me = /* @__PURE__ */ ((r) => (r.Normal = "Normal", r.Stroke = "Stroke", r.Dotted = "Dotted", r.LongDotted = "LongDotted", r))(me || {}), Ke = /* @__PURE__ */ ((r) => (r.Triangle = "triangle", r.Rhombus = "rhombus", r.Pentagram = "pentagram", r.SpeechBalloon = "speechBalloon", r.Star = "star", r.Polygon = "polygon", r))(Ke || {}), W = /* @__PURE__ */ ((r) => (r.None = "None", r.ShowFloatBar = "ShowFloatBar", r.ZIndexFloatBar = "ZIndexFloatBar", r.DeleteNode = "DeleteNode", r.CopyNode = "CopyNode", r.ZIndexNode = "ZIndexNode", r.ZIndexBackgroundSVG = "ZIndexBackgroundSVG", r.RotateNode = "RotateNode", r.SetColorNode = "SetColorNode", r.TranslateNode = "TranslateNode", r.ScaleNode = "ScaleNode", r.OriginalEvent = "OriginalEvent", r.CreateScene = "CreateScene", r.ActiveCursor = "ActiveCursor", r.MoveCursor = "MoveCursor", r.CommandEditor = "CommandEditor", r.SetEditorData = "SetEditorData", r.SetFontStyle = "SetFontStyle", r.SetPoint = "SetPoint", r.SetLock = "SetLock", r.SetShapeOpt = "SetShapeOpt", r.CameraChange = "CameraChange", r.ActiveMethod = "ActiveMethod", r.HidFloatBarBtn = "HidFloatBarBtn", r))(W || {}), te = /* @__PURE__ */ ((r) => (r.MainEngine = "MainEngine", r.Cursor = "Cursor", r.BindMainView = "BindMainView", r))(te || {}), Br = /* @__PURE__ */ ((r) => (r[r.MainView = 0] = "MainView", r[r.Plugin = 1] = "Plugin", r[r.Both = 2] = "Both", r))(Br || {}), Ji = /* @__PURE__ */ ((r) => (r.longPencil = "longPencil", r))(Ji || {}), T = /* @__PURE__ */ ((r) => (r[r.Pencil = 1] = "Pencil", r[r.Eraser = 2] = "Eraser", r[r.PencilEraser = 3] = "PencilEraser", r[r.BitMapEraser = 4] = "BitMapEraser", r[r.Selector = 5] = "Selector", r[r.Clicker = 6] = "Clicker", r[r.Arrow = 7] = "Arrow", r[r.Hand = 8] = "Hand", r[r.LaserPen = 9] = "LaserPen", r[r.Text = 10] = "Text", r[r.Straight = 11] = "Straight", r[r.Rectangle = 12] = "Rectangle", r[r.Ellipse = 13] = "Ellipse", r[r.Star = 14] = "Star", r[r.Triangle = 15] = "Triangle", r[r.Rhombus = 16] = "Rhombus", r[r.Polygon = 17] = "Polygon", r[r.SpeechBalloon = 18] = "SpeechBalloon", r[r.Image = 19] = "Image", r[r.BackgroundSVG = 20] = "BackgroundSVG", r))(T || {}), q = /* @__PURE__ */ ((r) => (r[r.Local = 1] = "Local", r[r.Service = 2] = "Service", r[r.Worker = 3] = "Worker", r))(q || {}), x = /* @__PURE__ */ ((r) => (r[r.Pending = 0] = "Pending", r[r.Start = 1] = "Start", r[r.Doing = 2] = "Doing", r[r.Done = 3] = "Done", r[r.Unwritable = 4] = "Unwritable", r))(x || {}), R = /* @__PURE__ */ ((r) => (r[r.None = 0] = "None", r[r.Init = 1] = "Init", r[r.UpdateCamera = 2] = "UpdateCamera", r[r.UpdateTools = 3] = "UpdateTools", r[r.CreateWork = 4] = "CreateWork", r[r.DrawWork = 5] = "DrawWork", r[r.FullWork = 6] = "FullWork", r[r.UpdateNode = 7] = "UpdateNode", r[r.RemoveNode = 8] = "RemoveNode", r[r.Clear = 9] = "Clear", r[r.Select = 10] = "Select", r[r.Destroy = 11] = "Destroy", r[r.Snapshot = 12] = "Snapshot", r[r.BoundingBox = 13] = "BoundingBox", r[r.Cursor = 14] = "Cursor", r[r.TextUpdate = 15] = "TextUpdate", r[r.GetTextActive = 16] = "GetTextActive", r[r.TasksQueue = 17] = "TasksQueue", r[r.CursorHover = 18] = "CursorHover", r[r.CursorBlur = 19] = "CursorBlur", r[r.Console = 20] = "Console", r[r.GetImageBitMap = 23] = "GetImageBitMap", r[r.AuthWriter = 24] = "AuthWriter", r[r.AuthReader = 25] = "AuthReader", r[r.AuthClear = 26] = "AuthClear", r[r.AuthPage = 27] = "AuthPage", r[r.GetVNodeInfo = 28] = "GetVNodeInfo", r[r.UpdateDpr = 29] = "UpdateDpr", r[r.SetFontFace = 30] = "SetFontFace", r[r.ReportError = 31] = "ReportError", r[r.ReportLog = 32] = "ReportLog", r[r.BackgroundSVGUpdate = 33] = "BackgroundSVGUpdate", r[r.BackgroundSVGDelete = 34] = "BackgroundSVGDelete", r))(R || {}), et = /* @__PURE__ */ ((r) => (r[r.None = 0] = "None", r[r.Bg = 1] = "Bg", r[r.ServiceFloat = 2] = "ServiceFloat", r[r.Float = 3] = "Float", r[r.TopFloat = 4] = "TopFloat", r))(et || {}), Qt = /* @__PURE__ */ ((r) => (r[r.Cursor = 1] = "Cursor", r[r.TextCreate = 2] = "TextCreate", r))(Qt || {}), Lt = /* @__PURE__ */ ((r) => (r[r.Top = 1] = "Top", r[r.Bottom = 2] = "Bottom", r))(Lt || {}), Fe = /* @__PURE__ */ ((r) => (r[r.none = 1] = "none", r[r.all = 2] = "all", r[r.both = 3] = "both", r[r.proportional = 4] = "proportional", r))(Fe || {}), Gt = /* @__PURE__ */ ((r) => (r[r.inside = 0] = "inside", r[r.outside = 1] = "outside", r[r.intersect = 2] = "intersect", r))(Gt || {}), Ae = /* @__PURE__ */ ((r) => (r.renderPage = "renderPage", r.addPage = "addPage", r.deletePage = "deletePage", r.addElement = "addElement", r.deleteElement = "deleteElement", r.clearPage = "clearPage", r.clearViewScenePath = "clearViewScenePath", r.clearView = "clearView", r.syncUndoStack = "syncUndoStack", r.syncRedoStack = "syncRedoStack", r))(Ae || {}), _e = /* @__PURE__ */ ((r) => (r.setAuth = "setAuth", r.setShow = "addShow", r.setHide = "setHide", r.setClear = "setClear", r))(_e || {}), Zt = /* @__PURE__ */ ((r) => (r.Image = "image", r.Iconify = "iconify", r))(Zt || {}), $t = /* @__PURE__ */ ((r) => (r.url = "url", r.markmap = "markmap", r))($t || {});
|
|
18
|
+
const vI = "cursorhover", Xi = 20, pe = "mainView", Wr = {
|
|
19
19
|
linear: (r) => r,
|
|
20
20
|
easeInQuad: (r) => r * r,
|
|
21
21
|
easeOutQuad: (r) => r * (2 - r),
|
|
@@ -511,16 +511,16 @@ var Bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
511
511
|
function Pn(r) {
|
|
512
512
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
513
513
|
}
|
|
514
|
-
var Vr = typeof Bt == "object" && Bt && Bt.Object === Object && Bt, Ki = Vr, Qr = Ki, Gr = typeof self == "object" && self && self.Object === Object && self, Zr = Qr || Gr || Function("return this")(), He = Zr, $r = He, Hr = $r.Symbol, Ot = Hr, ii = Ot, qi = Object.prototype, Jr = qi.hasOwnProperty, Xr = qi.toString,
|
|
514
|
+
var Vr = typeof Bt == "object" && Bt && Bt.Object === Object && Bt, Ki = Vr, Qr = Ki, Gr = typeof self == "object" && self && self.Object === Object && self, Zr = Qr || Gr || Function("return this")(), He = Zr, $r = He, Hr = $r.Symbol, Ot = Hr, ii = Ot, qi = Object.prototype, Jr = qi.hasOwnProperty, Xr = qi.toString, At = ii ? ii.toStringTag : void 0;
|
|
515
515
|
function Kr(r) {
|
|
516
|
-
var n = Jr.call(r,
|
|
516
|
+
var n = Jr.call(r, At), e = r[At];
|
|
517
517
|
try {
|
|
518
|
-
r[
|
|
518
|
+
r[At] = void 0;
|
|
519
519
|
var t = !0;
|
|
520
520
|
} catch {
|
|
521
521
|
}
|
|
522
522
|
var i = Xr.call(r);
|
|
523
|
-
return t && (n ? r[
|
|
523
|
+
return t && (n ? r[At] = e : delete r[At]), i;
|
|
524
524
|
}
|
|
525
525
|
var qr = Kr, _r = Object.prototype, eo = _r.toString;
|
|
526
526
|
function to(r) {
|
|
@@ -571,7 +571,7 @@ function xo(r, n) {
|
|
|
571
571
|
var e = this.__data__, t = ko(e, r);
|
|
572
572
|
return t < 0 ? (++this.size, e.push([r, n])) : e[t][1] = n, this;
|
|
573
573
|
}
|
|
574
|
-
var jo = xo, Do = uo, zo = mo,
|
|
574
|
+
var jo = xo, Do = uo, zo = mo, Ao = No, bo = So, Eo = jo;
|
|
575
575
|
function Ct(r) {
|
|
576
576
|
var n = -1, e = r == null ? 0 : r.length;
|
|
577
577
|
for (this.clear(); ++n < e; ) {
|
|
@@ -581,8 +581,8 @@ function Ct(r) {
|
|
|
581
581
|
}
|
|
582
582
|
Ct.prototype.clear = Do;
|
|
583
583
|
Ct.prototype.delete = zo;
|
|
584
|
-
Ct.prototype.get =
|
|
585
|
-
Ct.prototype.has =
|
|
584
|
+
Ct.prototype.get = Ao;
|
|
585
|
+
Ct.prototype.has = bo;
|
|
586
586
|
Ct.prototype.set = Eo;
|
|
587
587
|
var rn = Ct, Lo = rn;
|
|
588
588
|
function Po() {
|
|
@@ -661,10 +661,10 @@ function zs(r) {
|
|
|
661
661
|
var n = this.has(r) && delete this.__data__[r];
|
|
662
662
|
return this.size -= n ? 1 : 0, n;
|
|
663
663
|
}
|
|
664
|
-
var
|
|
664
|
+
var As = zs, bs = on, Es = "__lodash_hash_undefined__", Ls = Object.prototype, Ps = Ls.hasOwnProperty;
|
|
665
665
|
function Os(r) {
|
|
666
666
|
var n = this.__data__;
|
|
667
|
-
if (
|
|
667
|
+
if (bs) {
|
|
668
668
|
var e = n[r];
|
|
669
669
|
return e === Es ? void 0 : e;
|
|
670
670
|
}
|
|
@@ -680,7 +680,7 @@ function Gs(r, n) {
|
|
|
680
680
|
var e = this.__data__;
|
|
681
681
|
return this.size += this.has(r) ? 0 : 1, e[r] = Vs && n === void 0 ? Qs : n, this;
|
|
682
682
|
}
|
|
683
|
-
var Zs = Gs, $s = Ds, Hs =
|
|
683
|
+
var Zs = Gs, $s = Ds, Hs = As, Js = Rs, Xs = Fs, Ks = Zs;
|
|
684
684
|
function St(r) {
|
|
685
685
|
var n = -1, e = r == null ? 0 : r.length;
|
|
686
686
|
for (this.clear(); ++n < e; ) {
|
|
@@ -753,13 +753,13 @@ function ja(r, n) {
|
|
|
753
753
|
}
|
|
754
754
|
return e.set(r, n), this.size = e.size, this;
|
|
755
755
|
}
|
|
756
|
-
var Da = ja, za = rn,
|
|
756
|
+
var Da = ja, za = rn, Aa = Oo, ba = Yo, Ea = Bo, La = Fo, Pa = Da;
|
|
757
757
|
function xt(r) {
|
|
758
758
|
var n = this.__data__ = new za(r);
|
|
759
759
|
this.size = n.size;
|
|
760
760
|
}
|
|
761
|
-
xt.prototype.clear =
|
|
762
|
-
xt.prototype.delete =
|
|
761
|
+
xt.prototype.clear = Aa;
|
|
762
|
+
xt.prototype.delete = ba;
|
|
763
763
|
xt.prototype.get = Ea;
|
|
764
764
|
xt.prototype.has = La;
|
|
765
765
|
xt.prototype.set = Pa;
|
|
@@ -832,9 +832,9 @@ var gc = dc, fc = 9007199254740991;
|
|
|
832
832
|
function Mc(r) {
|
|
833
833
|
return typeof r == "number" && r > -1 && r % 1 == 0 && r <= fc;
|
|
834
834
|
}
|
|
835
|
-
var cr = Mc, pc = Rt, yc = cr, Ic = yt, mc = "[object Arguments]", wc = "[object Array]", Tc = "[object Boolean]", Nc = "[object Date]", vc = "[object Error]", Cc = "[object Function]", Sc = "[object Map]", kc = "[object Number]", xc = "[object Object]", jc = "[object RegExp]", Dc = "[object Set]", zc = "[object String]",
|
|
835
|
+
var cr = Mc, pc = Rt, yc = cr, Ic = yt, mc = "[object Arguments]", wc = "[object Array]", Tc = "[object Boolean]", Nc = "[object Date]", vc = "[object Error]", Cc = "[object Function]", Sc = "[object Map]", kc = "[object Number]", xc = "[object Object]", jc = "[object RegExp]", Dc = "[object Set]", zc = "[object String]", Ac = "[object WeakMap]", bc = "[object ArrayBuffer]", Ec = "[object DataView]", Lc = "[object Float32Array]", Pc = "[object Float64Array]", Oc = "[object Int8Array]", Rc = "[object Int16Array]", Yc = "[object Int32Array]", Uc = "[object Uint8Array]", Bc = "[object Uint8ClampedArray]", Wc = "[object Uint16Array]", Fc = "[object Uint32Array]", we = {};
|
|
836
836
|
we[Lc] = we[Pc] = we[Oc] = we[Rc] = we[Yc] = we[Uc] = we[Bc] = we[Wc] = we[Fc] = !0;
|
|
837
|
-
we[mc] = we[wc] = we[
|
|
837
|
+
we[mc] = we[wc] = we[bc] = we[Tc] = we[Ec] = we[Nc] = we[vc] = we[Cc] = we[Sc] = we[kc] = we[xc] = we[jc] = we[Dc] = we[zc] = we[Ac] = !1;
|
|
838
838
|
function Vc(r) {
|
|
839
839
|
return Ic(r) && yc(r.length) && !!we[pc(r)];
|
|
840
840
|
}
|
|
@@ -907,11 +907,11 @@ function jl(r) {
|
|
|
907
907
|
n.push(e);
|
|
908
908
|
return n;
|
|
909
909
|
}
|
|
910
|
-
var Dl = jl, zl = ut,
|
|
910
|
+
var Dl = jl, zl = ut, Al = Un, bl = Dl, El = Object.prototype, Ll = El.hasOwnProperty;
|
|
911
911
|
function Pl(r) {
|
|
912
912
|
if (!zl(r))
|
|
913
|
-
return
|
|
914
|
-
var n =
|
|
913
|
+
return bl(r);
|
|
914
|
+
var n = Al(r), e = [];
|
|
915
915
|
for (var t in r)
|
|
916
916
|
t == "constructor" && (n || !Ll.call(r, t)) || e.push(t);
|
|
917
917
|
return e;
|
|
@@ -990,7 +990,7 @@ var Su = Cu, ku = Mr, xu = fr, ju = Fn;
|
|
|
990
990
|
function Du(r) {
|
|
991
991
|
return ku(r, ju, xu);
|
|
992
992
|
}
|
|
993
|
-
var zu = Du,
|
|
993
|
+
var zu = Du, Au = It, bu = He, Eu = Au(bu, "DataView"), Lu = Eu, Pu = It, Ou = He, Ru = Pu(Ou, "Promise"), Yu = Ru, Uu = It, Bu = He, Wu = Uu(Bu, "Set"), pr = Wu, Fu = It, Vu = He, Qu = Fu(Vu, "WeakMap"), Gu = Qu, Nn = Lu, vn = Rn, Cn = Yu, Sn = pr, kn = Gu, yr = Rt, jt = er, fi = "[object Map]", Zu = "[object Object]", Mi = "[object Promise]", pi = "[object Set]", yi = "[object WeakMap]", Ii = "[object DataView]", $u = jt(Nn), Hu = jt(vn), Ju = jt(Cn), Xu = jt(Sn), Ku = jt(kn), gt = yr;
|
|
994
994
|
(Nn && gt(new Nn(new ArrayBuffer(1))) != Ii || vn && gt(new vn()) != fi || Cn && gt(Cn.resolve()) != Mi || Sn && gt(new Sn()) != pi || kn && gt(new kn()) != yi) && (gt = function(r) {
|
|
995
995
|
var n = yr(r), e = n == Zu ? r.constructor : void 0, t = e ? jt(e) : "";
|
|
996
996
|
if (t)
|
|
@@ -1037,7 +1037,7 @@ function fh(r, n) {
|
|
|
1037
1037
|
var e = n ? gh(r.buffer) : r.buffer;
|
|
1038
1038
|
return new r.constructor(e, r.byteOffset, r.length);
|
|
1039
1039
|
}
|
|
1040
|
-
var Mh = fh, ph = Zn, yh = ah, Ih = uh, mh = dh, wh = Mh, Th = "[object Boolean]", Nh = "[object Date]", vh = "[object Map]", Ch = "[object Number]", Sh = "[object RegExp]", kh = "[object Set]", xh = "[object String]", jh = "[object Symbol]", Dh = "[object ArrayBuffer]", zh = "[object DataView]",
|
|
1040
|
+
var Mh = fh, ph = Zn, yh = ah, Ih = uh, mh = dh, wh = Mh, Th = "[object Boolean]", Nh = "[object Date]", vh = "[object Map]", Ch = "[object Number]", Sh = "[object RegExp]", kh = "[object Set]", xh = "[object String]", jh = "[object Symbol]", Dh = "[object ArrayBuffer]", zh = "[object DataView]", Ah = "[object Float32Array]", bh = "[object Float64Array]", Eh = "[object Int8Array]", Lh = "[object Int16Array]", Ph = "[object Int32Array]", Oh = "[object Uint8Array]", Rh = "[object Uint8ClampedArray]", Yh = "[object Uint16Array]", Uh = "[object Uint32Array]";
|
|
1041
1041
|
function Bh(r, n, e) {
|
|
1042
1042
|
var t = r.constructor;
|
|
1043
1043
|
switch (n) {
|
|
@@ -1048,8 +1048,8 @@ function Bh(r, n, e) {
|
|
|
1048
1048
|
return new t(+r);
|
|
1049
1049
|
case zh:
|
|
1050
1050
|
return yh(r, e);
|
|
1051
|
-
case bh:
|
|
1052
1051
|
case Ah:
|
|
1052
|
+
case bh:
|
|
1053
1053
|
case Eh:
|
|
1054
1054
|
case Lh:
|
|
1055
1055
|
case Ph:
|
|
@@ -1096,15 +1096,15 @@ function cd(r) {
|
|
|
1096
1096
|
return sd(r) && od(r) == ad;
|
|
1097
1097
|
}
|
|
1098
1098
|
var ld = cd, ud = ld, hd = ln, ki = Yn, xi = ki && ki.isSet, dd = xi ? hd(xi) : ud, mr = dd;
|
|
1099
|
-
const
|
|
1100
|
-
var gd = Oa, fd = Ya, Md = rr, pd = xl, yd = Ql, Id = Gl, md = $l, wd = ru, Td = yu, Nd = Su, vd = zu, Cd = Gn, Sd = th, kd = Wh, xd = Jh, jd = cn, Dd = ar, zd = rd,
|
|
1099
|
+
const CI = /* @__PURE__ */ Pn(mr);
|
|
1100
|
+
var gd = Oa, fd = Ya, Md = rr, pd = xl, yd = Ql, Id = Gl, md = $l, wd = ru, Td = yu, Nd = Su, vd = zu, Cd = Gn, Sd = th, kd = Wh, xd = Jh, jd = cn, Dd = ar, zd = rd, Ad = ut, bd = mr, Ed = Wn, Ld = Fn, Pd = 1, Od = 2, Rd = 4, wr = "[object Arguments]", Yd = "[object Array]", Ud = "[object Boolean]", Bd = "[object Date]", Wd = "[object Error]", Tr = "[object Function]", Fd = "[object GeneratorFunction]", Vd = "[object Map]", Qd = "[object Number]", Nr = "[object Object]", Gd = "[object RegExp]", Zd = "[object Set]", $d = "[object String]", Hd = "[object Symbol]", Jd = "[object WeakMap]", Xd = "[object ArrayBuffer]", Kd = "[object DataView]", qd = "[object Float32Array]", _d = "[object Float64Array]", eg = "[object Int8Array]", tg = "[object Int16Array]", ng = "[object Int32Array]", ig = "[object Uint8Array]", rg = "[object Uint8ClampedArray]", og = "[object Uint16Array]", sg = "[object Uint32Array]", Ie = {};
|
|
1101
1101
|
Ie[wr] = Ie[Yd] = Ie[Xd] = Ie[Kd] = Ie[Ud] = Ie[Bd] = Ie[qd] = Ie[_d] = Ie[eg] = Ie[tg] = Ie[ng] = Ie[Vd] = Ie[Qd] = Ie[Nr] = Ie[Gd] = Ie[Zd] = Ie[$d] = Ie[Hd] = Ie[ig] = Ie[rg] = Ie[og] = Ie[sg] = !0;
|
|
1102
1102
|
Ie[Wd] = Ie[Tr] = Ie[Jd] = !1;
|
|
1103
1103
|
function Ht(r, n, e, t, i, o) {
|
|
1104
1104
|
var s, a = n & Pd, c = n & Od, l = n & Rd;
|
|
1105
1105
|
if (e && (s = i ? e(r, t, i, o) : e(r)), s !== void 0)
|
|
1106
1106
|
return s;
|
|
1107
|
-
if (!
|
|
1107
|
+
if (!Ad(r))
|
|
1108
1108
|
return r;
|
|
1109
1109
|
var h = jd(r);
|
|
1110
1110
|
if (h) {
|
|
@@ -1127,7 +1127,7 @@ function Ht(r, n, e, t, i, o) {
|
|
|
1127
1127
|
var M = o.get(r);
|
|
1128
1128
|
if (M)
|
|
1129
1129
|
return M;
|
|
1130
|
-
o.set(r, s),
|
|
1130
|
+
o.set(r, s), bd(r) ? r.forEach(function(w) {
|
|
1131
1131
|
s.add(Ht(w, n, e, w, r, o));
|
|
1132
1132
|
}) : zd(r) && r.forEach(function(w, p) {
|
|
1133
1133
|
s.set(p, Ht(w, n, e, p, r, o));
|
|
@@ -1142,7 +1142,7 @@ function hg(r) {
|
|
|
1142
1142
|
return cg(r, lg | ug);
|
|
1143
1143
|
}
|
|
1144
1144
|
var dg = hg;
|
|
1145
|
-
const un = /* @__PURE__ */ Pn(dg), vr = "1.1.
|
|
1145
|
+
const un = /* @__PURE__ */ Pn(dg), vr = "1.1.34-beta.0", gg = "@netless/appliance-plugin", ji = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
|
|
1146
1146
|
if (typeof window < "u") {
|
|
1147
1147
|
let r = window.__netlessUA || "";
|
|
1148
1148
|
r += ` ${gg}@${vr}`, window.__netlessUA = r;
|
|
@@ -1221,7 +1221,7 @@ function $n(r) {
|
|
|
1221
1221
|
function _t(r) {
|
|
1222
1222
|
return Or(JSON.stringify(r));
|
|
1223
1223
|
}
|
|
1224
|
-
const ze = Object.keys,
|
|
1224
|
+
const ze = Object.keys, rt = "++", $ = "selector", fg = "all";
|
|
1225
1225
|
var Mg = "__lodash_hash_undefined__";
|
|
1226
1226
|
function pg(r) {
|
|
1227
1227
|
return this.__data__.set(r, Mg), this;
|
|
@@ -1250,7 +1250,7 @@ function Sg(r, n) {
|
|
|
1250
1250
|
return r.has(n);
|
|
1251
1251
|
}
|
|
1252
1252
|
var Jn = Sg, kg = Hn, xg = Cg, jg = Jn, Dg = 1, zg = 2;
|
|
1253
|
-
function
|
|
1253
|
+
function Ag(r, n, e, t, i, o) {
|
|
1254
1254
|
var s = e & Dg, a = r.length, c = n.length;
|
|
1255
1255
|
if (a != c && !(s && c > a))
|
|
1256
1256
|
return !1;
|
|
@@ -1283,7 +1283,7 @@ function bg(r, n, e, t, i, o) {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
return o.delete(r), o.delete(n), g;
|
|
1285
1285
|
}
|
|
1286
|
-
var
|
|
1286
|
+
var bg = Ag;
|
|
1287
1287
|
function Eg(r) {
|
|
1288
1288
|
var n = -1, e = Array(r.size);
|
|
1289
1289
|
return r.forEach(function(t, i) {
|
|
@@ -1297,7 +1297,7 @@ function Pg(r) {
|
|
|
1297
1297
|
e[++n] = t;
|
|
1298
1298
|
}), e;
|
|
1299
1299
|
}
|
|
1300
|
-
var Xn = Pg, Di = Ot, zi = Ir, Og = On, Rg =
|
|
1300
|
+
var Xn = Pg, Di = Ot, zi = Ir, Og = On, Rg = bg, Yg = Lg, Ug = Xn, Bg = 1, Wg = 2, Fg = "[object Boolean]", Vg = "[object Date]", Qg = "[object Error]", Gg = "[object Map]", Zg = "[object Number]", $g = "[object RegExp]", Hg = "[object Set]", Jg = "[object String]", Xg = "[object Symbol]", Kg = "[object ArrayBuffer]", qg = "[object DataView]", Ai = Di ? Di.prototype : void 0, pn = Ai ? Ai.valueOf : void 0;
|
|
1301
1301
|
function _g(r, n, e, t, i, o, s) {
|
|
1302
1302
|
switch (e) {
|
|
1303
1303
|
case qg:
|
|
@@ -1333,14 +1333,14 @@ function _g(r, n, e, t, i, o, s) {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
return !1;
|
|
1335
1335
|
}
|
|
1336
|
-
var
|
|
1336
|
+
var SI = _g;
|
|
1337
1337
|
function Yt(r, n, e) {
|
|
1338
1338
|
return "#" + ((r << 16) + (n << 8) + e).toString(16).padStart(6, "0");
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function be(r, n = 1) {
|
|
1341
1341
|
return "rgba(" + parseInt("0x" + r.slice(1, 3)) + "," + parseInt("0x" + r.slice(3, 5)) + "," + parseInt("0x" + r.slice(5, 7)) + "," + n + ")";
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function bt(r, n, e, t = 1) {
|
|
1344
1344
|
return `rgba(${r},${n},${e},${t})`;
|
|
1345
1345
|
}
|
|
1346
1346
|
function hn(r) {
|
|
@@ -1390,7 +1390,7 @@ I(Ue, "proxyToRaw", /* @__PURE__ */ new WeakMap()), I(Ue, "interceptors", {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
});
|
|
1392
1392
|
let ft = Ue;
|
|
1393
|
-
const
|
|
1393
|
+
const bi = 5;
|
|
1394
1394
|
class ef {
|
|
1395
1395
|
constructor(n) {
|
|
1396
1396
|
I(this, "internalMsgEmitter");
|
|
@@ -1454,8 +1454,8 @@ class ef {
|
|
|
1454
1454
|
workId: n,
|
|
1455
1455
|
msgType: R.UpdateNode
|
|
1456
1456
|
}).forEach((v) => {
|
|
1457
|
-
var
|
|
1458
|
-
(
|
|
1457
|
+
var b;
|
|
1458
|
+
(b = this.control.worker) == null || b.taskBatchData.delete(v);
|
|
1459
1459
|
}), (S = this.control.worker) == null || S.taskBatchData.add({
|
|
1460
1460
|
workId: n,
|
|
1461
1461
|
msgType: R.UpdateNode,
|
|
@@ -1899,14 +1899,14 @@ var Df = jf;
|
|
|
1899
1899
|
function zf(r) {
|
|
1900
1900
|
return r !== r;
|
|
1901
1901
|
}
|
|
1902
|
-
var
|
|
1903
|
-
function
|
|
1902
|
+
var Af = zf;
|
|
1903
|
+
function bf(r, n, e) {
|
|
1904
1904
|
for (var t = e - 1, i = r.length; ++t < i; )
|
|
1905
1905
|
if (r[t] === n)
|
|
1906
1906
|
return t;
|
|
1907
1907
|
return -1;
|
|
1908
1908
|
}
|
|
1909
|
-
var Ef =
|
|
1909
|
+
var Ef = bf, Lf = Df, Pf = Af, Of = Ef;
|
|
1910
1910
|
function Rf(r, n, e) {
|
|
1911
1911
|
return n === n ? Of(r, n, e) : Lf(r, Pf, e);
|
|
1912
1912
|
}
|
|
@@ -2002,11 +2002,11 @@ var SM = CM, kM = Bn, xM = yt;
|
|
|
2002
2002
|
function jM(r) {
|
|
2003
2003
|
return xM(r) && kM(r);
|
|
2004
2004
|
}
|
|
2005
|
-
var DM = jM, zM = hr,
|
|
2006
|
-
|
|
2007
|
-
return
|
|
2005
|
+
var DM = jM, zM = hr, AM = xf, bM = SM, EM = DM;
|
|
2006
|
+
AM(function(r) {
|
|
2007
|
+
return bM(zM(r, EM));
|
|
2008
2008
|
});
|
|
2009
|
-
function
|
|
2009
|
+
function kI(r, n) {
|
|
2010
2010
|
if (r && n) {
|
|
2011
2011
|
const e = Math.min(r.x, n.x), t = Math.min(r.y, n.y), i = Math.max(r.x + r.w, n.x + n.w), o = Math.max(r.y + r.h, n.y + n.h), s = i - e, a = o - t;
|
|
2012
2012
|
return { x: e, y: t, w: s, h: a };
|
|
@@ -2034,10 +2034,10 @@ function jr(r, n = 0) {
|
|
|
2034
2034
|
t = Math.min(t, c - n), i = Math.min(i, l - n), o = Math.max(o, c + n), s = Math.max(s, l + n);
|
|
2035
2035
|
}), e.x = t, e.y = i, e.w = o - t, e.h = s - i, e;
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2037
|
+
function xI(r, n) {
|
|
2038
2038
|
return !(r.x + r.w < n.x || r.x > n.x + n.w || r.y + r.h < n.y || r.y > n.y + n.h);
|
|
2039
2039
|
}
|
|
2040
|
-
function
|
|
2040
|
+
function jI(r, n = 10) {
|
|
2041
2041
|
return {
|
|
2042
2042
|
x: Math.floor(r.x - n),
|
|
2043
2043
|
y: Math.floor(r.y - n),
|
|
@@ -2045,7 +2045,7 @@ function xI(r, n = 10) {
|
|
|
2045
2045
|
h: Math.ceil(r.h + n * 2)
|
|
2046
2046
|
};
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2048
|
+
function DI(r, n) {
|
|
2049
2049
|
return {
|
|
2050
2050
|
x: r.x + n[0],
|
|
2051
2051
|
y: r.y + n[1],
|
|
@@ -2057,11 +2057,11 @@ function LM(r, n) {
|
|
|
2057
2057
|
const e = new U(r.x, r.y), t = new U(r.x + r.w, r.y), i = new U(r.x + r.w, r.y + r.h), o = new U(r.x, r.y + r.h), s = new U(r.x + r.w / 2, r.y + r.h / 2), a = Math.PI * n / 180, c = U.RotWith(e, s, a), l = U.RotWith(t, s, a), h = U.RotWith(i, s, a), u = U.RotWith(o, s, a);
|
|
2058
2058
|
return [c, l, h, u];
|
|
2059
2059
|
}
|
|
2060
|
-
function
|
|
2060
|
+
function zI(r, n) {
|
|
2061
2061
|
const e = LM(r, n);
|
|
2062
2062
|
return jr(e);
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2064
|
+
function AI(r, n, e) {
|
|
2065
2065
|
const t = new U(r.x, r.y), i = new U(r.x + r.w, r.y), o = new U(r.x + r.w, r.y + r.h), s = new U(r.x, r.y + r.h), a = new U(e[0], e[1]), c = new U(n[0], n[1]), l = U.ScaleWOrigin(t, c, a), h = U.ScaleWOrigin(i, c, a), u = U.ScaleWOrigin(o, c, a), g = U.ScaleWOrigin(s, c, a);
|
|
2066
2066
|
return jr([l, h, u, g]);
|
|
2067
2067
|
}
|
|
@@ -2072,21 +2072,21 @@ function bI(r, n, e) {
|
|
|
2072
2072
|
r[i] = a.x, r[i + 1] = a.y;
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2075
|
+
function EI(r, n, e) {
|
|
2076
2076
|
const t = new U(n[0], n[1]);
|
|
2077
2077
|
for (let i = 0; i < r.length; i += 2) {
|
|
2078
2078
|
const o = new U(r[i], r[i + 1]), s = Math.PI * e / 180, a = U.RotWith(o, t, s);
|
|
2079
2079
|
r[i] = a.x, r[i + 1] = a.y;
|
|
2080
2080
|
}
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2082
|
+
function LI(r, n, e, t = [0, 0]) {
|
|
2083
2083
|
const i = new U(n[0], n[1]);
|
|
2084
2084
|
for (let o = 0; o < r.length; o += 3) {
|
|
2085
2085
|
const s = new U(r[o], r[o + 1]), a = new U(e[0], e[1]), c = U.ScaleWOrigin(s, a, i);
|
|
2086
2086
|
r[o] = c.x + t[0], r[o + 1] = c.y + t[1];
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
|
-
function
|
|
2089
|
+
function PI(r, n, e, t = [0, 0]) {
|
|
2090
2090
|
const i = new U(n[0], n[1]);
|
|
2091
2091
|
for (let o = 0; o < r.length; o += 2) {
|
|
2092
2092
|
const s = new U(r[o], r[o + 1]), a = new U(e[0], e[1]), c = U.ScaleWOrigin(s, a, i);
|
|
@@ -2096,38 +2096,38 @@ function LI(r, n, e, t = [0, 0]) {
|
|
|
2096
2096
|
function PM(r, n) {
|
|
2097
2097
|
return r[0] >= n.x && r[0] <= n.x + n.w && r[1] >= n.y && r[1] <= n.y + n.h;
|
|
2098
2098
|
}
|
|
2099
|
-
function
|
|
2099
|
+
function OI(r, n) {
|
|
2100
2100
|
const e = r <= n ? 1 : r / n, t = n <= r ? 1 : n / r;
|
|
2101
2101
|
return [e, t];
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2103
|
+
function RI(r) {
|
|
2104
2104
|
for (const n of r)
|
|
2105
2105
|
if (isNaN(n) || n === 1 / 0 || n === -1 / 0)
|
|
2106
2106
|
return !1;
|
|
2107
2107
|
return !0;
|
|
2108
2108
|
}
|
|
2109
|
-
function
|
|
2109
|
+
function YI(r) {
|
|
2110
2110
|
return r !== Math.floor(r);
|
|
2111
2111
|
}
|
|
2112
|
-
function
|
|
2112
|
+
function UI(r) {
|
|
2113
2113
|
const n = r.toString();
|
|
2114
2114
|
return n.indexOf(".") !== -1 ? n.split(".")[1].length : 0;
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2116
|
+
function BI(r, n) {
|
|
2117
2117
|
for (; n !== 0; )
|
|
2118
2118
|
[r, n] = [n, r % n];
|
|
2119
2119
|
return r;
|
|
2120
2120
|
}
|
|
2121
|
-
function
|
|
2121
|
+
function WI(r) {
|
|
2122
2122
|
return `${tn(r.x)},${tn(r.y)} `;
|
|
2123
2123
|
}
|
|
2124
|
-
function
|
|
2124
|
+
function FI(r, n) {
|
|
2125
2125
|
return `${tn((r.x + n.x) / 2)},${tn((r.y + n.y) / 2)} `;
|
|
2126
2126
|
}
|
|
2127
2127
|
function tn(r) {
|
|
2128
2128
|
return +r.toFixed(4);
|
|
2129
2129
|
}
|
|
2130
|
-
const
|
|
2130
|
+
const it = async (r, n, e = !1) => {
|
|
2131
2131
|
let t, i;
|
|
2132
2132
|
return new Promise(function(o) {
|
|
2133
2133
|
if (e && requestIdleCallback)
|
|
@@ -2156,8 +2156,8 @@ const ot = async (r, n, e = !1) => {
|
|
|
2156
2156
|
}).catch(function() {
|
|
2157
2157
|
r();
|
|
2158
2158
|
});
|
|
2159
|
-
}, Nt = (r) => Math.max(1, (window.devicePixelRatio || 1) / 1),
|
|
2160
|
-
function
|
|
2159
|
+
}, Nt = (r) => Math.max(1, (window.devicePixelRatio || 1) / 1), VI = (r, n) => r.x + r.w < n.x || r.x > n.x + n.w || r.y + r.h < n.y || r.y > n.y + n.h ? Gt.outside : r.x >= n.x && r.y >= n.y && r.x + r.w <= n.x + n.w && r.y + r.h <= n.y + n.h ? Gt.inside : Gt.intersect;
|
|
2160
|
+
function QI(r) {
|
|
2161
2161
|
let n = 0;
|
|
2162
2162
|
for (let e = 0; e < r.length; e++) {
|
|
2163
2163
|
const t = r.charCodeAt(e);
|
|
@@ -2241,13 +2241,13 @@ class RM {
|
|
|
2241
2241
|
return Vt((n = this.plugin) == null ? void 0 : n.attributes[this.globalUndoRedoStackSpace]) || {};
|
|
2242
2242
|
}
|
|
2243
2243
|
getUidFromKey(n) {
|
|
2244
|
-
return n.split(
|
|
2244
|
+
return n.split(rt).length === 2 && n.split(rt)[0] || this.uid;
|
|
2245
2245
|
}
|
|
2246
2246
|
isLocalId(n) {
|
|
2247
|
-
return n.split(
|
|
2247
|
+
return n.split(rt).length === 1;
|
|
2248
2248
|
}
|
|
2249
2249
|
getLocalId(n) {
|
|
2250
|
-
return n.split(
|
|
2250
|
+
return n.split(rt)[1];
|
|
2251
2251
|
}
|
|
2252
2252
|
isSelector(n) {
|
|
2253
2253
|
return this.getLocalId(n) === $;
|
|
@@ -2285,11 +2285,13 @@ const Re = class Re extends RM {
|
|
|
2285
2285
|
"onObjectsLimit",
|
|
2286
2286
|
(p) => p(o, y)
|
|
2287
2287
|
)), !y) {
|
|
2288
|
-
this.control.
|
|
2289
|
-
`exceeds the limit of ${o} components, current: ${i}`
|
|
2288
|
+
this.control.logger.error(
|
|
2289
|
+
`[Appliance]: exceeds the limit of ${o} components, current: ${i}`
|
|
2290
2290
|
), (M = this.control.room) == null || M.disconnect().then(() => {
|
|
2291
2291
|
var p, f, N, S, C;
|
|
2292
|
-
(N = (f = (p = this.control.room) == null ? void 0 : p.callbacks) == null ? void 0 : f.listeners) != null && N.map.onKickedWithReason && (
|
|
2292
|
+
(N = (f = (p = this.control.room) == null ? void 0 : p.callbacks) == null ? void 0 : f.listeners) != null && N.map.onKickedWithReason && (this.control.logger.info(
|
|
2293
|
+
"[Appliance]: onKickedWithReason callback is called"
|
|
2294
|
+
), (C = (S = this.control.room) == null ? void 0 : S.callbacks) == null || C.dispatch(
|
|
2293
2295
|
"onKickedWithReason",
|
|
2294
2296
|
(k) => k("kickByAdmin")
|
|
2295
2297
|
));
|
|
@@ -2521,10 +2523,10 @@ const Re = class Re extends RM {
|
|
|
2521
2523
|
return c;
|
|
2522
2524
|
}
|
|
2523
2525
|
transformKey(e) {
|
|
2524
|
-
return this.uid +
|
|
2526
|
+
return this.uid + rt + e;
|
|
2525
2527
|
}
|
|
2526
2528
|
isOwn(e) {
|
|
2527
|
-
return e.split(
|
|
2529
|
+
return e.split(rt)[0] === this.uid;
|
|
2528
2530
|
}
|
|
2529
2531
|
dispatch(e) {
|
|
2530
2532
|
var w;
|
|
@@ -2547,7 +2549,7 @@ const Re = class Re extends RM {
|
|
|
2547
2549
|
switch (t) {
|
|
2548
2550
|
case R.Clear:
|
|
2549
2551
|
const p = {};
|
|
2550
|
-
d && this.storage[y] && this.storage[y][d] ? (delete this.storage[y][d], this.setState(p, { isSync: M, viewId: y, scenePath: d })) : this.storage[y] && (delete this.storage[y], this.setState(p, { isSync: M, viewId: y, scenePath: "" })),
|
|
2552
|
+
d && this.storage[y] && this.storage[y][d] ? (delete this.storage[y][d], this.setState(p, { isSync: M, viewId: y, scenePath: d })) : this.storage[y] && (delete this.storage[y], this.setState(p, { isSync: M, viewId: y, scenePath: "" })), it(
|
|
2551
2553
|
() => {
|
|
2552
2554
|
var k, v;
|
|
2553
2555
|
(k = this.control.pluginManager) == null || k.dispatchPluginEvent(
|
|
@@ -2584,8 +2586,8 @@ const Re = class Re extends RM {
|
|
|
2584
2586
|
const k = this.isLocalId(i.toString()) ? this.transformKey(i) : i, v = this.storage[y] && this.storage[y][d] && this.storage[y][d][k] || void 0;
|
|
2585
2587
|
if (v != null && v.ops || (v == null ? void 0 : v.type) === R.FullWork)
|
|
2586
2588
|
return;
|
|
2587
|
-
const
|
|
2588
|
-
i && P && E &&
|
|
2589
|
+
const b = s ? ((v == null ? void 0 : v.op) || []).slice(0, s).concat(u) : u || (v == null ? void 0 : v.op), P = c || (v == null ? void 0 : v.toolsType), E = a || (v == null ? void 0 : v.opt), O = h || (v == null ? void 0 : v.updateNodeOpt);
|
|
2590
|
+
i && P && E && b && (this.control.renderControl.isUsePageAuth(y) && this.control.renderControl.addRenderPageElementId({
|
|
2589
2591
|
viewId: y,
|
|
2590
2592
|
scenePath: d,
|
|
2591
2593
|
elementId: k.toString()
|
|
@@ -2598,7 +2600,7 @@ const Re = class Re extends RM {
|
|
|
2598
2600
|
updateNodeOpt: O,
|
|
2599
2601
|
toolsType: P,
|
|
2600
2602
|
opt: E,
|
|
2601
|
-
op:
|
|
2603
|
+
op: b,
|
|
2602
2604
|
index: s
|
|
2603
2605
|
},
|
|
2604
2606
|
{ isSync: M, viewId: y, scenePath: d }
|
|
@@ -2607,7 +2609,7 @@ const Re = class Re extends RM {
|
|
|
2607
2609
|
break;
|
|
2608
2610
|
case R.FullWork:
|
|
2609
2611
|
if (d && i) {
|
|
2610
|
-
const k = this.isLocalId(i.toString()) ? this.transformKey(i) : i, v = this.storage[y] && this.storage[y][d] && this.storage[y][d][k] || void 0,
|
|
2612
|
+
const k = this.isLocalId(i.toString()) ? this.transformKey(i) : i, v = this.storage[y] && this.storage[y][d] && this.storage[y][d][k] || void 0, b = h || (v == null ? void 0 : v.updateNodeOpt), P = c || (v == null ? void 0 : v.toolsType), E = a || (v == null ? void 0 : v.opt), O = o || (v == null ? void 0 : v.ops);
|
|
2611
2613
|
P && E && (this.control.renderControl.isUsePageAuth(y) && this.control.renderControl.addRenderPageElementId({
|
|
2612
2614
|
viewId: y,
|
|
2613
2615
|
scenePath: d,
|
|
@@ -2616,14 +2618,14 @@ const Re = class Re extends RM {
|
|
|
2616
2618
|
k.toString(),
|
|
2617
2619
|
{
|
|
2618
2620
|
type: R.FullWork,
|
|
2619
|
-
updateNodeOpt:
|
|
2621
|
+
updateNodeOpt: b,
|
|
2620
2622
|
workId: k,
|
|
2621
2623
|
toolsType: P,
|
|
2622
2624
|
opt: E,
|
|
2623
2625
|
ops: O
|
|
2624
2626
|
},
|
|
2625
2627
|
{ isSync: M, viewId: y, scenePath: d }
|
|
2626
|
-
),
|
|
2628
|
+
), it(
|
|
2627
2629
|
() => {
|
|
2628
2630
|
var z, L;
|
|
2629
2631
|
(z = this.control.pluginManager) == null || z.dispatchPluginEvent(
|
|
@@ -2650,7 +2652,7 @@ const Re = class Re extends RM {
|
|
|
2650
2652
|
"syncStorage",
|
|
2651
2653
|
y,
|
|
2652
2654
|
d
|
|
2653
|
-
), this.control.isUseSimple ||
|
|
2655
|
+
), this.control.isUseSimple || it(
|
|
2654
2656
|
() => {
|
|
2655
2657
|
var v;
|
|
2656
2658
|
(v = this.control.miniMapManager) == null || v.updateMiniMapCamera(y);
|
|
@@ -2667,10 +2669,10 @@ const Re = class Re extends RM {
|
|
|
2667
2669
|
isSync: M,
|
|
2668
2670
|
viewId: y,
|
|
2669
2671
|
scenePath: d
|
|
2670
|
-
}), this.control.isUseSimple ||
|
|
2672
|
+
}), this.control.isUseSimple || it(
|
|
2671
2673
|
() => {
|
|
2672
|
-
var
|
|
2673
|
-
(
|
|
2674
|
+
var b;
|
|
2675
|
+
(b = this.control.miniMapManager) == null || b.updateMiniMapCamera(y);
|
|
2674
2676
|
},
|
|
2675
2677
|
this.syncInterval,
|
|
2676
2678
|
this.control.hasPolyfillMethod("requestIdleCallback")
|
|
@@ -2725,14 +2727,12 @@ const Re = class Re extends RM {
|
|
|
2725
2727
|
}
|
|
2726
2728
|
runSyncService(e) {
|
|
2727
2729
|
if (!this.control.renderControl.isWritable) {
|
|
2728
|
-
this.control.
|
|
2729
|
-
"The current state is not writable and synchronization cannot be synchronized"
|
|
2730
|
-
) : console.error(
|
|
2731
|
-
"The current state is not writable and synchronization cannot be synchronized"
|
|
2730
|
+
this.control.logger.error(
|
|
2731
|
+
"[Appliance]: The current state is not writable and synchronization cannot be synchronized"
|
|
2732
2732
|
);
|
|
2733
2733
|
return;
|
|
2734
2734
|
}
|
|
2735
|
-
this.asyncClockState || (this.asyncClockState = !0, e.isSync ? (this.asyncClockState = !1, this.syncSerivice(e)) :
|
|
2735
|
+
this.asyncClockState || (this.asyncClockState = !0, e.isSync ? (this.asyncClockState = !1, this.syncSerivice(e)) : it(
|
|
2736
2736
|
() => {
|
|
2737
2737
|
this.asyncClockState = !1, this.syncSerivice(e);
|
|
2738
2738
|
},
|
|
@@ -2827,7 +2827,7 @@ const Re = class Re extends RM {
|
|
|
2827
2827
|
(o = this.plugin) == null || o.updateAttributes([this.namespace, e, t], i);
|
|
2828
2828
|
}
|
|
2829
2829
|
keyTransformWorkId(e) {
|
|
2830
|
-
const t = e.split(
|
|
2830
|
+
const t = e.split(rt);
|
|
2831
2831
|
return t.length === 2 ? t[1] : e;
|
|
2832
2832
|
}
|
|
2833
2833
|
destroy() {
|
|
@@ -2846,7 +2846,7 @@ const Re = class Re extends RM {
|
|
|
2846
2846
|
};
|
|
2847
2847
|
}
|
|
2848
2848
|
dispatchUndoTicker(e) {
|
|
2849
|
-
const { viewId: t, undoTickerId: i, data: o, syncType: s, operation: a } = e, c = a ===
|
|
2849
|
+
const { viewId: t, undoTickerId: i, data: o, syncType: s, operation: a } = e, c = a === Ae.syncUndoStack ? "undoStack" : "redoStack", l = s === "delete" ? void 0 : this.transformToSerializableUndoStackItemData(o);
|
|
2850
2850
|
if (this.plugin)
|
|
2851
2851
|
if (this.plugin.getAttributesValue([this.globalUndoRedoStackSpace]))
|
|
2852
2852
|
if (this.plugin.getAttributesValue([this.globalUndoRedoStackSpace, t]))
|
|
@@ -2927,10 +2927,10 @@ const Re = class Re extends RM {
|
|
|
2927
2927
|
return s;
|
|
2928
2928
|
}
|
|
2929
2929
|
dispatchPageAuth(e, t = !0) {
|
|
2930
|
-
var l, h, u, g, M, d, y, w, p, f, N, S, C, k, v,
|
|
2930
|
+
var l, h, u, g, M, d, y, w, p, f, N, S, C, k, v, b, P, E, O, z, L, j, F, X, Y, Q, _, ce, ie, K, H, fe, Je, Xe, ht, ot, st, mt;
|
|
2931
2931
|
const { operation: i, viewId: o, scenePath: s, pageId: a, pageData: c } = e;
|
|
2932
2932
|
switch (i) {
|
|
2933
|
-
case
|
|
2933
|
+
case Ae.addPage: {
|
|
2934
2934
|
if (!o || !s || !a)
|
|
2935
2935
|
return;
|
|
2936
2936
|
const Ee = [this.authSpace];
|
|
@@ -2956,7 +2956,7 @@ const Re = class Re extends RM {
|
|
|
2956
2956
|
) : (M = this.plugin) == null || M.updateAttributes(Ee, se(B)));
|
|
2957
2957
|
return;
|
|
2958
2958
|
}
|
|
2959
|
-
case
|
|
2959
|
+
case Ae.renderPage: {
|
|
2960
2960
|
if (!o || !s || !(c != null && c.render))
|
|
2961
2961
|
return;
|
|
2962
2962
|
this.authStorage.pageAuth && this.authStorage.pageAuth[o] && this.authStorage.pageAuth[o][s] && c.render !== this.authStorage.pageAuth[o][s].render && (this.authStorage.pageAuth[o][s].render = c.render, t && ((d = this.plugin) == null || d.updateAttributes(
|
|
@@ -2965,7 +2965,7 @@ const Re = class Re extends RM {
|
|
|
2965
2965
|
)));
|
|
2966
2966
|
return;
|
|
2967
2967
|
}
|
|
2968
|
-
case
|
|
2968
|
+
case Ae.deletePage: {
|
|
2969
2969
|
if (!o || !s || !a)
|
|
2970
2970
|
return;
|
|
2971
2971
|
(N = (f = (p = (w = (y = this.authStorage) == null ? void 0 : y.pageAuth) == null ? void 0 : w[o]) == null ? void 0 : p[s]) == null ? void 0 : f.pages) != null && N[a] && (delete this.authStorage.pageAuth[o][s].pages[a], t && ((S = this.plugin) == null || S.updateAttributes(
|
|
@@ -2974,16 +2974,16 @@ const Re = class Re extends RM {
|
|
|
2974
2974
|
)));
|
|
2975
2975
|
return;
|
|
2976
2976
|
}
|
|
2977
|
-
case
|
|
2977
|
+
case Ae.clearPage: {
|
|
2978
2978
|
if (!o || !s || !a)
|
|
2979
2979
|
return;
|
|
2980
|
-
(P = (
|
|
2980
|
+
(P = (b = (v = (k = (C = this.authStorage) == null ? void 0 : C.pageAuth) == null ? void 0 : k[o]) == null ? void 0 : v[s]) == null ? void 0 : b.pages) != null && P[a] && (delete this.authStorage.pageAuth[o][s].pages[a], t && ((E = this.plugin) == null || E.updateAttributes(
|
|
2981
2981
|
[this.authSpace, "pageAuth", o, s, "pages", a],
|
|
2982
2982
|
{}
|
|
2983
2983
|
)));
|
|
2984
2984
|
return;
|
|
2985
2985
|
}
|
|
2986
|
-
case
|
|
2986
|
+
case Ae.addElement: {
|
|
2987
2987
|
if (!o || !s || !a || !(c != null && c.elementId))
|
|
2988
2988
|
return;
|
|
2989
2989
|
(F = (j = (L = (z = (O = this.authStorage) == null ? void 0 : O.pageAuth) == null ? void 0 : z[o]) == null ? void 0 : L[s]) == null ? void 0 : j.pages) != null && F[a] && (this.authStorage.pageAuth[o][s].pages[a][c.elementId] = !0, t && ((X = this.plugin) == null || X.updateAttributes(
|
|
@@ -3000,7 +3000,7 @@ const Re = class Re extends RM {
|
|
|
3000
3000
|
)));
|
|
3001
3001
|
return;
|
|
3002
3002
|
}
|
|
3003
|
-
case
|
|
3003
|
+
case Ae.deleteElement: {
|
|
3004
3004
|
if (!o || !s || !a || !(c != null && c.elementId))
|
|
3005
3005
|
return;
|
|
3006
3006
|
(K = (ie = (ce = (_ = (Q = (Y = this.authStorage) == null ? void 0 : Y.pageAuth) == null ? void 0 : Q[o]) == null ? void 0 : _[s]) == null ? void 0 : ce.pages) == null ? void 0 : ie[a]) != null && K[c.elementId] && (delete this.authStorage.pageAuth[o][s].pages[a][c.elementId], t && ((H = this.plugin) == null || H.updateAttributes(
|
|
@@ -3017,7 +3017,7 @@ const Re = class Re extends RM {
|
|
|
3017
3017
|
)));
|
|
3018
3018
|
return;
|
|
3019
3019
|
}
|
|
3020
|
-
case
|
|
3020
|
+
case Ae.clearViewScenePath: {
|
|
3021
3021
|
if (!o || !s)
|
|
3022
3022
|
return;
|
|
3023
3023
|
(Xe = (Je = (fe = this.authStorage) == null ? void 0 : fe.pageAuth) == null ? void 0 : Je[o]) != null && Xe[s] && (delete this.authStorage.pageAuth[o][s], t && ((ht = this.plugin) == null || ht.updateAttributes(
|
|
@@ -3026,10 +3026,10 @@ const Re = class Re extends RM {
|
|
|
3026
3026
|
)));
|
|
3027
3027
|
return;
|
|
3028
3028
|
}
|
|
3029
|
-
case
|
|
3029
|
+
case Ae.clearView: {
|
|
3030
3030
|
if (!o)
|
|
3031
3031
|
return;
|
|
3032
|
-
(
|
|
3032
|
+
(st = (ot = this.authStorage) == null ? void 0 : ot.pageAuth) != null && st[o] && (delete this.authStorage.pageAuth[o], t && ((mt = this.plugin) == null || mt.updateAttributes(
|
|
3033
3033
|
[this.authSpace, "pageAuth", o],
|
|
3034
3034
|
void 0
|
|
3035
3035
|
)));
|
|
@@ -3038,11 +3038,11 @@ const Re = class Re extends RM {
|
|
|
3038
3038
|
}
|
|
3039
3039
|
}
|
|
3040
3040
|
dispatchRenderAuth(e, t = !0) {
|
|
3041
|
-
var l, h, u, g, M, d, y, w, p, f, N, S, C, k, v,
|
|
3041
|
+
var l, h, u, g, M, d, y, w, p, f, N, S, C, k, v, b, P, E, O, z;
|
|
3042
3042
|
const { operation: i, viewId: o, uid: s, renderData: a, isClear: c } = e;
|
|
3043
3043
|
if (o)
|
|
3044
3044
|
switch (i) {
|
|
3045
|
-
case
|
|
3045
|
+
case _e.setAuth: {
|
|
3046
3046
|
if (!a || a.render === void 0 && a.hide === void 0 && a.clear === void 0) {
|
|
3047
3047
|
this.authStorage.renderAuth && this.authStorage.renderAuth[o] && (delete this.authStorage.renderAuth[o], t && ((l = this.plugin) == null || l.updateAttributes(
|
|
3048
3048
|
[this.authSpace, "renderAuth", o],
|
|
@@ -3085,7 +3085,7 @@ const Re = class Re extends RM {
|
|
|
3085
3085
|
));
|
|
3086
3086
|
return;
|
|
3087
3087
|
}
|
|
3088
|
-
case
|
|
3088
|
+
case _e.setShow: {
|
|
3089
3089
|
if (!s)
|
|
3090
3090
|
return;
|
|
3091
3091
|
const L = [this.authSpace];
|
|
@@ -3103,7 +3103,7 @@ const Re = class Re extends RM {
|
|
|
3103
3103
|
) : (f = this.plugin) == null || f.updateAttributes(L, !0));
|
|
3104
3104
|
return;
|
|
3105
3105
|
}
|
|
3106
|
-
case
|
|
3106
|
+
case _e.setHide: {
|
|
3107
3107
|
if (!s)
|
|
3108
3108
|
return;
|
|
3109
3109
|
const L = [this.authSpace];
|
|
@@ -3118,10 +3118,10 @@ const Re = class Re extends RM {
|
|
|
3118
3118
|
) : L.length === 2 ? (k = this.plugin) == null || k.updateAttributes(L, se(j)) : L.length === 3 ? (v = this.plugin) == null || v.updateAttributes(
|
|
3119
3119
|
L,
|
|
3120
3120
|
se(j[o])
|
|
3121
|
-
) : (
|
|
3121
|
+
) : (b = this.plugin) == null || b.updateAttributes(L, !0));
|
|
3122
3122
|
return;
|
|
3123
3123
|
}
|
|
3124
|
-
case
|
|
3124
|
+
case _e.setClear: {
|
|
3125
3125
|
if (!s)
|
|
3126
3126
|
return;
|
|
3127
3127
|
const L = [this.authSpace];
|
|
@@ -3311,10 +3311,10 @@ class UM {
|
|
|
3311
3311
|
t && e.includes(t) && this.cursorInfoMap.delete(t);
|
|
3312
3312
|
}
|
|
3313
3313
|
getKey(n, e) {
|
|
3314
|
-
return `${n}${
|
|
3314
|
+
return `${n}${rt}${e}`;
|
|
3315
3315
|
}
|
|
3316
3316
|
getUidAndviewId(n) {
|
|
3317
|
-
const [e, t] = n.split(
|
|
3317
|
+
const [e, t] = n.split(rt);
|
|
3318
3318
|
return { uid: e, viewId: t };
|
|
3319
3319
|
}
|
|
3320
3320
|
runAnimation() {
|
|
@@ -3546,7 +3546,7 @@ class Ze {
|
|
|
3546
3546
|
(o = this.mainEngine) == null || o.runAnimation();
|
|
3547
3547
|
}
|
|
3548
3548
|
collectForServiceWorker(n) {
|
|
3549
|
-
|
|
3549
|
+
it(
|
|
3550
3550
|
() => {
|
|
3551
3551
|
n.forEach((e) => {
|
|
3552
3552
|
var t;
|
|
@@ -3735,12 +3735,12 @@ class BM extends Ze {
|
|
|
3735
3735
|
x: M.x - d.x,
|
|
3736
3736
|
y: M.y - d.y
|
|
3737
3737
|
});
|
|
3738
|
-
for (const
|
|
3738
|
+
for (const b of s) {
|
|
3739
3739
|
const P = (v = (k = this.serviceColloctor) == null ? void 0 : k.getStorageData(
|
|
3740
3740
|
o.id,
|
|
3741
3741
|
o.focusScenePath
|
|
3742
|
-
)) == null ? void 0 : v[
|
|
3743
|
-
P && a.set(
|
|
3742
|
+
)) == null ? void 0 : v[b];
|
|
3743
|
+
P && a.set(b, P);
|
|
3744
3744
|
}
|
|
3745
3745
|
return {
|
|
3746
3746
|
copyStores: a,
|
|
@@ -3757,7 +3757,7 @@ class BM extends Ze {
|
|
|
3757
3757
|
l.y + g
|
|
3758
3758
|
] || [g / u, g / u], d = [], y = [];
|
|
3759
3759
|
for (const [S, C] of t.entries()) {
|
|
3760
|
-
const v = (this.serviceColloctor.isLocalId(S) ? S : this.serviceColloctor.getLocalId(S.toString())) + "-" + a,
|
|
3760
|
+
const v = (this.serviceColloctor.isLocalId(S) ? S : this.serviceColloctor.getLocalId(S.toString())) + "-" + a, b = { useAnimation: !1 };
|
|
3761
3761
|
if (C.toolsType === T.Text && C.opt) {
|
|
3762
3762
|
const P = C.opt;
|
|
3763
3763
|
if (P && P.boxPoint && P.text) {
|
|
@@ -3812,7 +3812,7 @@ class BM extends Ze {
|
|
|
3812
3812
|
}
|
|
3813
3813
|
y.push({
|
|
3814
3814
|
...C,
|
|
3815
|
-
updateNodeOpt:
|
|
3815
|
+
updateNodeOpt: b,
|
|
3816
3816
|
type: R.FullWork,
|
|
3817
3817
|
workId: v,
|
|
3818
3818
|
viewId: o,
|
|
@@ -3820,7 +3820,7 @@ class BM extends Ze {
|
|
|
3820
3820
|
}), d.push([
|
|
3821
3821
|
{
|
|
3822
3822
|
...C,
|
|
3823
|
-
updateNodeOpt:
|
|
3823
|
+
updateNodeOpt: b,
|
|
3824
3824
|
workId: v,
|
|
3825
3825
|
msgType: R.FullWork,
|
|
3826
3826
|
dataType: q.Local,
|
|
@@ -3885,8 +3885,8 @@ class WM extends Ze {
|
|
|
3885
3885
|
if (!S)
|
|
3886
3886
|
continue;
|
|
3887
3887
|
const C = S.toString(), k = this.serviceColloctor.isLocalId(C), v = k ? this.serviceColloctor.transformKey(S) : C;
|
|
3888
|
-
let
|
|
3889
|
-
!k && this.serviceColloctor.isOwn(
|
|
3888
|
+
let b = C;
|
|
3889
|
+
!k && this.serviceColloctor.isOwn(b) && (b = this.serviceColloctor.getLocalId(b));
|
|
3890
3890
|
const P = (N = (f = y == null ? void 0 : y[c]) == null ? void 0 : f[M]) == null ? void 0 : N[v];
|
|
3891
3891
|
if (P) {
|
|
3892
3892
|
const E = P.updateNodeOpt || {};
|
|
@@ -3905,7 +3905,7 @@ class WM extends Ze {
|
|
|
3905
3905
|
}
|
|
3906
3906
|
if (P.toolsType === T.Text && P.opt && l !== x.Start) {
|
|
3907
3907
|
this.setTextColor(
|
|
3908
|
-
|
|
3908
|
+
b,
|
|
3909
3909
|
un(P),
|
|
3910
3910
|
E,
|
|
3911
3911
|
c
|
|
@@ -3927,7 +3927,7 @@ class WM extends Ze {
|
|
|
3927
3927
|
}
|
|
3928
3928
|
h && (E.thickness = h, p.strokeWidth = h), u && (p.strokeType = u, E.strokeType = u, E.lineCap = this.control.getLineCap(u), E.lineDash = this.control.getLineDash(u));
|
|
3929
3929
|
const O = {
|
|
3930
|
-
workId:
|
|
3930
|
+
workId: b,
|
|
3931
3931
|
msgType: R.UpdateNode,
|
|
3932
3932
|
dataType: q.Local,
|
|
3933
3933
|
updateNodeOpt: E,
|
|
@@ -3942,7 +3942,7 @@ class WM extends Ze {
|
|
|
3942
3942
|
w.push([
|
|
3943
3943
|
O,
|
|
3944
3944
|
{
|
|
3945
|
-
workId:
|
|
3945
|
+
workId: b,
|
|
3946
3946
|
msgType: R.UpdateNode,
|
|
3947
3947
|
emitEventType: this.emitEventType
|
|
3948
3948
|
}
|
|
@@ -4065,13 +4065,13 @@ class FM extends Ze {
|
|
|
4065
4065
|
return F > X ? 1 : L < j ? -1 : 0;
|
|
4066
4066
|
}));
|
|
4067
4067
|
}
|
|
4068
|
-
const
|
|
4069
|
-
|
|
4068
|
+
const b = C.updateNodeOpt || {};
|
|
4069
|
+
b.zIndexLayer = i;
|
|
4070
4070
|
const P = {
|
|
4071
4071
|
workId: w,
|
|
4072
4072
|
msgType: R.UpdateNode,
|
|
4073
4073
|
dataType: q.Local,
|
|
4074
|
-
updateNodeOpt:
|
|
4074
|
+
updateNodeOpt: b,
|
|
4075
4075
|
emitEventType: this.emitEventType,
|
|
4076
4076
|
willRefreshSelector: !0,
|
|
4077
4077
|
willSyncService: !0,
|
|
@@ -4082,13 +4082,13 @@ class FM extends Ze {
|
|
|
4082
4082
|
const O = (j = this.serviceColloctor) == null ? void 0 : j.isLocalId(E);
|
|
4083
4083
|
let z = O && ((F = this.serviceColloctor) == null ? void 0 : F.transformKey(E)) || E;
|
|
4084
4084
|
const L = (Y = (X = l == null ? void 0 : l[o]) == null ? void 0 : X[a]) == null ? void 0 : Y[z];
|
|
4085
|
-
L && (!O && ((Q = this.serviceColloctor) != null && Q.isOwn(z)) && (z = this.serviceColloctor.getLocalId(z)),
|
|
4085
|
+
L && (!O && ((Q = this.serviceColloctor) != null && Q.isOwn(z)) && (z = this.serviceColloctor.getLocalId(z)), b.zIndex = k, L != null && L.opt && (L.opt.zIndex = k));
|
|
4086
4086
|
})), g.length && (i === Lt.Top ? (this.addMaxLayerForBackgroundSVG(o), v = this.getMaxZIndexForBackgroundSVG(o)) : (this.addMinLayerForBackgroundSVG(o), v = this.getMinZIndexForBackgroundSVG(o)), g.forEach((E) => {
|
|
4087
4087
|
var j, F, X, Y, Q;
|
|
4088
4088
|
const O = (j = this.serviceColloctor) == null ? void 0 : j.isLocalId(E);
|
|
4089
4089
|
let z = O && ((F = this.serviceColloctor) == null ? void 0 : F.transformKey(E)) || E;
|
|
4090
4090
|
const L = (Y = (X = l == null ? void 0 : l[o]) == null ? void 0 : X[a]) == null ? void 0 : Y[z];
|
|
4091
|
-
L && (!O && ((Q = this.serviceColloctor) != null && Q.isOwn(z)) && (z = this.serviceColloctor.getLocalId(z)),
|
|
4091
|
+
L && (!O && ((Q = this.serviceColloctor) != null && Q.isOwn(z)) && (z = this.serviceColloctor.getLocalId(z)), b.zIndexForBackgroundSVG = v, L != null && L.opt && (L.opt.zIndex = v));
|
|
4092
4092
|
})), P.willSerializeData = !0, h.push([
|
|
4093
4093
|
P,
|
|
4094
4094
|
{
|
|
@@ -4142,16 +4142,16 @@ class VM extends Ze {
|
|
|
4142
4142
|
a
|
|
4143
4143
|
);
|
|
4144
4144
|
if (s === x.Start && (this.cachePosition = v), this.cachePosition) {
|
|
4145
|
-
const
|
|
4146
|
-
|
|
4145
|
+
const b = k.updateNodeOpt || {};
|
|
4146
|
+
b.translate = [
|
|
4147
4147
|
v[0] - this.cachePosition[0],
|
|
4148
4148
|
v[1] - this.cachePosition[1]
|
|
4149
|
-
],
|
|
4149
|
+
], b.workState = s, this.control.cursor.isEnableCursor ? b.useAnimation = !1 : (b.uid = this.serviceColloctor.uid, s === x.Start ? b.useAnimation = !1 : s === x.Done && (b.useAnimation = !0));
|
|
4150
4150
|
const P = {
|
|
4151
4151
|
workId: p,
|
|
4152
4152
|
msgType: R.UpdateNode,
|
|
4153
4153
|
dataType: q.Local,
|
|
4154
|
-
updateNodeOpt:
|
|
4154
|
+
updateNodeOpt: b,
|
|
4155
4155
|
emitEventType: this.emitEventType,
|
|
4156
4156
|
willSyncService: !0,
|
|
4157
4157
|
textUpdateForWoker: !0,
|
|
@@ -4242,7 +4242,7 @@ class GM extends Ze {
|
|
|
4242
4242
|
return { key: e, textInfo: o };
|
|
4243
4243
|
}
|
|
4244
4244
|
async collect(e, t) {
|
|
4245
|
-
var f, N, S, C, k, v,
|
|
4245
|
+
var f, N, S, C, k, v, b;
|
|
4246
4246
|
if (!this.serviceColloctor || !this.mainEngine)
|
|
4247
4247
|
return;
|
|
4248
4248
|
const {
|
|
@@ -4287,7 +4287,7 @@ class GM extends Ze {
|
|
|
4287
4287
|
if (this.targetText.size && o !== x.Start && h) {
|
|
4288
4288
|
const Y = [];
|
|
4289
4289
|
for (const [_, ce] of this.targetText.entries()) {
|
|
4290
|
-
const { opt: ie } = ce, K = Math.floor(ie.fontSize * h[0]), H = this.cacheTextInfo.get(_), fe = !H && ie.fontSize !== K || H && H.fontSize !== K || !1, Je = (
|
|
4290
|
+
const { opt: ie } = ce, K = Math.floor(ie.fontSize * h[0]), H = this.cacheTextInfo.get(_), fe = !H && ie.fontSize !== K || H && H.fontSize !== K || !1, Je = (b = this.control.textEditorManager.get(_)) == null ? void 0 : b.opt;
|
|
4291
4291
|
if (fe && Je && ie.boxSize && ie.boxPoint) {
|
|
4292
4292
|
const Xe = this.setTextStyle(
|
|
4293
4293
|
_,
|
|
@@ -4361,10 +4361,10 @@ class ZM extends Ze {
|
|
|
4361
4361
|
const C = h.pop();
|
|
4362
4362
|
if (!C)
|
|
4363
4363
|
continue;
|
|
4364
|
-
const k = C.toString(), v = this.serviceColloctor.isLocalId(k),
|
|
4364
|
+
const k = C.toString(), v = this.serviceColloctor.isLocalId(k), b = v && this.serviceColloctor.transformKey(C) || k;
|
|
4365
4365
|
let P = k;
|
|
4366
4366
|
!v && this.serviceColloctor.isOwn(P) && (P = this.serviceColloctor.getLocalId(P));
|
|
4367
|
-
const E = (w = (y = u == null ? void 0 : u[a]) == null ? void 0 : y[l]) == null ? void 0 : w[
|
|
4367
|
+
const E = (w = (y = u == null ? void 0 : u[a]) == null ? void 0 : y[l]) == null ? void 0 : w[b];
|
|
4368
4368
|
if (E && P === $) {
|
|
4369
4369
|
if (((p = E.selectIds) == null ? void 0 : p.length) === 1) {
|
|
4370
4370
|
const O = E.selectIds[0];
|
|
@@ -4454,10 +4454,10 @@ class HM extends Ze {
|
|
|
4454
4454
|
), this.control.textEditorManager.UndoTickerId = y;
|
|
4455
4455
|
const w = [];
|
|
4456
4456
|
for (; g.length; ) {
|
|
4457
|
-
const
|
|
4458
|
-
if (!
|
|
4457
|
+
const b = g.pop();
|
|
4458
|
+
if (!b)
|
|
4459
4459
|
continue;
|
|
4460
|
-
const P =
|
|
4460
|
+
const P = b.toString(), E = this.serviceColloctor.isLocalId(P), O = E ? this.serviceColloctor.transformKey(b) : P;
|
|
4461
4461
|
let z = P;
|
|
4462
4462
|
!E && this.serviceColloctor.isOwn(z) && (z = this.serviceColloctor.getLocalId(z));
|
|
4463
4463
|
const L = (N = (f = M == null ? void 0 : M[c]) == null ? void 0 : f[u]) == null ? void 0 : N[O];
|
|
@@ -4492,14 +4492,14 @@ class HM extends Ze {
|
|
|
4492
4492
|
}
|
|
4493
4493
|
}
|
|
4494
4494
|
const p = await Promise.all(w);
|
|
4495
|
-
for (const
|
|
4496
|
-
if (
|
|
4497
|
-
const { key: P, textInfo: E } =
|
|
4495
|
+
for (const b of p)
|
|
4496
|
+
if (b) {
|
|
4497
|
+
const { key: P, textInfo: E } = b;
|
|
4498
4498
|
E && (E.canSync = !0, E.canWorker = !0, this.control.textEditorManager.updateForViewEdited(P, E));
|
|
4499
4499
|
}
|
|
4500
4500
|
Object.keys(d).length && (this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this.timerId = setTimeout(() => {
|
|
4501
|
-
var
|
|
4502
|
-
this.timerId = void 0, (
|
|
4501
|
+
var b;
|
|
4502
|
+
this.timerId = void 0, (b = this.control.room) == null || b.setMemberState(d);
|
|
4503
4503
|
}, 0));
|
|
4504
4504
|
}
|
|
4505
4505
|
}
|
|
@@ -5033,16 +5033,16 @@ class ep extends _M {
|
|
|
5033
5033
|
}
|
|
5034
5034
|
async useBackgroundThread() {
|
|
5035
5035
|
console.info("use background thread");
|
|
5036
|
-
const { BackgroundThreadManagerImpl: e } = await import("./index-
|
|
5036
|
+
const { BackgroundThreadManagerImpl: e } = await import("./index-p4HeEgIq.mjs");
|
|
5037
5037
|
this.backgroundThreadManager = new e(this);
|
|
5038
5038
|
}
|
|
5039
5039
|
async useMainThread() {
|
|
5040
5040
|
console.info("no OffscreenCanvas"), this.control.hasExtendFontFaces && await document.fonts.ready.then(() => {
|
|
5041
|
-
this.control.
|
|
5042
|
-
"set font faces in main thread success"
|
|
5041
|
+
this.control.logger.info(
|
|
5042
|
+
"[Appliance]: set font faces in main thread success"
|
|
5043
5043
|
);
|
|
5044
5044
|
});
|
|
5045
|
-
const { MainThreadManagerImpl: e } = await import("./index-
|
|
5045
|
+
const { MainThreadManagerImpl: e } = await import("./index-D5lBaSz6.mjs");
|
|
5046
5046
|
this.mainThread = new e(this);
|
|
5047
5047
|
}
|
|
5048
5048
|
async on() {
|
|
@@ -5111,13 +5111,11 @@ class ep extends _M {
|
|
|
5111
5111
|
}
|
|
5112
5112
|
}), this.control.hasExtendFontFaces) {
|
|
5113
5113
|
const e = this.control.extendFontFaces, t = [], i = [];
|
|
5114
|
-
this.control.room && this.control.
|
|
5115
|
-
`load before font faces ${JSON.stringify(e)}`
|
|
5114
|
+
this.control.room && this.control.logger.info(
|
|
5115
|
+
`[Appliance]: load before font faces ${JSON.stringify(e)}`
|
|
5116
5116
|
), await new Promise(async (o) => {
|
|
5117
5117
|
this.setFontFacesResolve.resolve = o, this.setFontFacesResolve.timer = setTimeout(() => {
|
|
5118
|
-
this.setFontFacesResolve.resolve && (this.control.
|
|
5119
|
-
"set font faces timeout"
|
|
5120
|
-
) : console.warn("set font faces timeout"), this.setFontFacesResolve.resolve(!1));
|
|
5118
|
+
this.setFontFacesResolve.resolve && (this.control.logger.warn("[Appliance]: set font faces timeout"), this.setFontFacesResolve.resolve(!1));
|
|
5121
5119
|
}, this.control.loadFontFacesTimeout);
|
|
5122
5120
|
try {
|
|
5123
5121
|
for (const s of e) {
|
|
@@ -5128,22 +5126,16 @@ class ep extends _M {
|
|
|
5128
5126
|
s.fontFamily,
|
|
5129
5127
|
s.src,
|
|
5130
5128
|
a
|
|
5131
|
-
) ||
|
|
5132
|
-
`Failed to save font ${s.fontFamily} to IndexedDB, but continuing with font loading`
|
|
5133
|
-
)
|
|
5134
|
-
`Failed to save font ${s.fontFamily} to IndexedDB, but continuing with font loading`
|
|
5135
|
-
)))), a && a.byteLength > 0 ? (i.push({
|
|
5129
|
+
) || this.control.logger.warn(
|
|
5130
|
+
`[Appliance]: Failed to save font ${s.fontFamily} to IndexedDB, but continuing with font loading`
|
|
5131
|
+
))), a && a.byteLength > 0 ? (i.push({
|
|
5136
5132
|
fontFamily: s.fontFamily,
|
|
5137
5133
|
buffer: a
|
|
5138
|
-
}), t.push(a)) : this.control.
|
|
5139
|
-
`Font ${s.fontFamily} could not be loaded from any source`
|
|
5140
|
-
) : console.warn(
|
|
5141
|
-
`Font ${s.fontFamily} could not be loaded from any source`
|
|
5134
|
+
}), t.push(a)) : this.control.logger.warn(
|
|
5135
|
+
`[Appliance]: Font ${s.fontFamily} could not be loaded from any source`
|
|
5142
5136
|
);
|
|
5143
5137
|
}
|
|
5144
|
-
this.control.
|
|
5145
|
-
"load end font faces"
|
|
5146
|
-
), i.length ? this.fullWorker.postMessage(
|
|
5138
|
+
this.control.logger.info("[Appliance]: load end font faces"), i.length ? this.fullWorker.postMessage(
|
|
5147
5139
|
/* @__PURE__ */ new Set([
|
|
5148
5140
|
{
|
|
5149
5141
|
type: R.SetFontFace,
|
|
@@ -5153,16 +5145,16 @@ class ep extends _M {
|
|
|
5153
5145
|
t
|
|
5154
5146
|
) : this.setFontFacesResolve.resolve(!0);
|
|
5155
5147
|
} catch (s) {
|
|
5156
|
-
this.setFontFacesResolve.timer && (clearTimeout(this.setFontFacesResolve.timer), this.setFontFacesResolve.timer = void 0), this.setFontFacesResolve.resolve && (this.setFontFacesResolve.resolve(!1), this.control.
|
|
5157
|
-
`set font faces error: ${s}`
|
|
5158
|
-
)
|
|
5148
|
+
this.setFontFacesResolve.timer && (clearTimeout(this.setFontFacesResolve.timer), this.setFontFacesResolve.timer = void 0), this.setFontFacesResolve.resolve && (this.setFontFacesResolve.resolve(!1), this.control.logger.error(
|
|
5149
|
+
`[Appliance]: set font faces error: ${s}`
|
|
5150
|
+
));
|
|
5159
5151
|
}
|
|
5160
5152
|
}).then((o) => {
|
|
5161
|
-
this.setFontFacesResolve.resolve = void 0, this.setFontFacesResolve.timer = void 0,
|
|
5162
|
-
"set font faces in web worker success"
|
|
5163
|
-
) : this.control.
|
|
5164
|
-
"set font faces in web worker error"
|
|
5165
|
-
)
|
|
5153
|
+
this.setFontFacesResolve.resolve = void 0, this.setFontFacesResolve.timer = void 0, o ? this.control.logger.info(
|
|
5154
|
+
"[Appliance]: set font faces in web worker success"
|
|
5155
|
+
) : this.control.logger.error(
|
|
5156
|
+
"[Appliance]: set font faces in web worker error"
|
|
5157
|
+
);
|
|
5166
5158
|
});
|
|
5167
5159
|
}
|
|
5168
5160
|
}
|
|
@@ -5191,9 +5183,9 @@ class ep extends _M {
|
|
|
5191
5183
|
throw new Error("Invalid font data format: not a valid font file");
|
|
5192
5184
|
return i;
|
|
5193
5185
|
} catch (t) {
|
|
5194
|
-
this.control.
|
|
5195
|
-
`Failed to load font from ${e}: ${t}`
|
|
5196
|
-
)
|
|
5186
|
+
this.control.logger.error(
|
|
5187
|
+
`[Appliance]: Failed to load font from ${e}: ${t instanceof Error ? t.message : String(t)}`
|
|
5188
|
+
);
|
|
5197
5189
|
return;
|
|
5198
5190
|
}
|
|
5199
5191
|
}
|
|
@@ -5268,7 +5260,7 @@ class ep extends _M {
|
|
|
5268
5260
|
op: C,
|
|
5269
5261
|
canTextEdit: k,
|
|
5270
5262
|
points: v,
|
|
5271
|
-
selectorColor:
|
|
5263
|
+
selectorColor: b,
|
|
5272
5264
|
canRotate: P,
|
|
5273
5265
|
scaleType: E,
|
|
5274
5266
|
textOpt: O,
|
|
@@ -5288,17 +5280,15 @@ class ep extends _M {
|
|
|
5288
5280
|
isSubWorker: Je,
|
|
5289
5281
|
updateNodeOpt: Xe,
|
|
5290
5282
|
setFontFaceResult: ht,
|
|
5291
|
-
failedFonts:
|
|
5292
|
-
reportString:
|
|
5283
|
+
failedFonts: ot,
|
|
5284
|
+
reportString: st,
|
|
5293
5285
|
index: mt,
|
|
5294
5286
|
imageElement: Ee
|
|
5295
5287
|
} = c;
|
|
5296
5288
|
if (l === R.SetFontFace) {
|
|
5297
|
-
ht && this.setFontFacesResolve.resolve && (
|
|
5298
|
-
"set font face has failed fonts: " +
|
|
5299
|
-
)
|
|
5300
|
-
"set font face has failed fonts: " + tt.join(", ")
|
|
5301
|
-
)), this.setFontFacesResolve.resolve(ht));
|
|
5289
|
+
ht && this.setFontFacesResolve.resolve && (ot && ot.length > 0 && this.control.logger.info(
|
|
5290
|
+
"[Appliance]: set font face has failed fonts: " + ot.join(", ")
|
|
5291
|
+
), this.setFontFacesResolve.resolve(ht));
|
|
5302
5292
|
return;
|
|
5303
5293
|
}
|
|
5304
5294
|
if (!j)
|
|
@@ -5307,7 +5297,7 @@ class ep extends _M {
|
|
|
5307
5297
|
switch (l) {
|
|
5308
5298
|
case R.Select: {
|
|
5309
5299
|
const B = h != null && h.length ? { ...g, selectIds: h, canvasHeight: f, canvasWidth: N, points: v } : void 0;
|
|
5310
|
-
B && (u != null && u.strokeColor) && (B.selectorColor = u.strokeColor), B &&
|
|
5300
|
+
B && (u != null && u.strokeColor) && (B.selectorColor = u.strokeColor), B && b && (B.selectorColor = b), B && M && (B.strokeColor = M), B && (u != null && u.fillColor) && (B.fillColor = u.fillColor), B && d && (B.fillColor = d), B && We(P) && (B.canRotate = P), B && E && (B.scaleType = E), B && k && (B.canTextEdit = k), B && O && (B.textOpt = O), B && We(X) && (B.canLock = X), B && We(Y) && (B.isLocked = Y), B && Q && (B.shapeOpt = Q), B && _ && (B.toolsTypes = _), B && ce && (B.thickness = ce), B && ie && (B.strokeType = ie), B && We(K) && (B.useStroke = K), j && this.viewContainerManager.showFloatBar(j, !!B, B), y && ((i = this.collector) == null || i.dispatch({
|
|
5311
5301
|
type: l,
|
|
5312
5302
|
selectIds: h,
|
|
5313
5303
|
opt: u,
|
|
@@ -5431,14 +5421,11 @@ class ep extends _M {
|
|
|
5431
5421
|
break;
|
|
5432
5422
|
case R.ReportError:
|
|
5433
5423
|
case R.ReportLog:
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
) :
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
) : this.control.room ? this.control.room.logger.info(
|
|
5440
|
-
Ke
|
|
5441
|
-
) : console.log("[MasterControlForWorker] reportLog", Ke));
|
|
5424
|
+
st && (l === R.ReportError ? this.control.logger.error(
|
|
5425
|
+
`[Appliance]: [MasterControlForWorker] reportError ${st}`
|
|
5426
|
+
) : this.control.logger.info(
|
|
5427
|
+
`[Appliance]: [MasterControlForWorker] reportLog ${st}`
|
|
5428
|
+
));
|
|
5442
5429
|
break;
|
|
5443
5430
|
default:
|
|
5444
5431
|
t = !0;
|
|
@@ -5479,13 +5466,13 @@ class ep extends _M {
|
|
|
5479
5466
|
const k = a.scenePath || this.viewContainerManager.getCurScenePath(f);
|
|
5480
5467
|
switch (c) {
|
|
5481
5468
|
case R.None: {
|
|
5482
|
-
N &&
|
|
5469
|
+
N && it(
|
|
5483
5470
|
() => {
|
|
5484
5471
|
this.setLockSentEventCursor(!1);
|
|
5485
5472
|
},
|
|
5486
5473
|
this.maxLastSyncTime,
|
|
5487
5474
|
this.control.hasPolyfillMethod("requestIdleCallback")
|
|
5488
|
-
), C && Number(C) &&
|
|
5475
|
+
), C && Number(C) && it(
|
|
5489
5476
|
() => {
|
|
5490
5477
|
this.foceUndoTickerEnd(Number(C), f);
|
|
5491
5478
|
},
|
|
@@ -5607,7 +5594,9 @@ class ep extends _M {
|
|
|
5607
5594
|
}), this.willSelectorWorkId = u.toString();
|
|
5608
5595
|
}
|
|
5609
5596
|
} catch (h) {
|
|
5610
|
-
|
|
5597
|
+
this.control.logger.error(
|
|
5598
|
+
`[Appliance]: [MasterControlForWorker] onLocalEventEnd error: ${h instanceof Error ? h.message : String(h)}`
|
|
5599
|
+
);
|
|
5611
5600
|
}
|
|
5612
5601
|
this.delayWorkStateToDoneResolve = void 0, c.length = 0;
|
|
5613
5602
|
}
|
|
@@ -5763,7 +5752,7 @@ class ep extends _M {
|
|
|
5763
5752
|
}, 0));
|
|
5764
5753
|
break;
|
|
5765
5754
|
}
|
|
5766
|
-
this.isLocalWorkActive && this.viewContainerManager.focuedViewId === i && this.publicMsgEmitter.emit("workState", e, i),
|
|
5755
|
+
this.isLocalWorkActive && this.viewContainerManager.focuedViewId === i && this.publicMsgEmitter.emit("workState", e, i), it(
|
|
5767
5756
|
() => {
|
|
5768
5757
|
var u;
|
|
5769
5758
|
(u = this.control.pluginManager) == null || u.dispatchPluginEvent(
|
|
@@ -5889,9 +5878,9 @@ class ep extends _M {
|
|
|
5889
5878
|
return;
|
|
5890
5879
|
v.isRunBackgroundThread = !0;
|
|
5891
5880
|
}
|
|
5892
|
-
if (v.dataType = q.Service, v.viewId = s, v.scenePath = a, v.useAnimation = this.smoothSync && ((S = v.updateNodeOpt) == null ? void 0 : S.useAnimation) || !1, v.selectIds && (v.selectIds = v.selectIds.map((
|
|
5881
|
+
if (v.dataType = q.Service, v.viewId = s, v.scenePath = a, v.useAnimation = this.smoothSync && ((S = v.updateNodeOpt) == null ? void 0 : S.useAnimation) || !1, v.selectIds && (v.selectIds = v.selectIds.map((b) => {
|
|
5893
5882
|
var P, E;
|
|
5894
|
-
return (P = this.collector) != null && P.isOwn(
|
|
5883
|
+
return (P = this.collector) != null && P.isOwn(b) ? (E = this.collector) == null ? void 0 : E.getLocalId(b) : b;
|
|
5895
5884
|
})), v && v.toolsType === T.Text || (o == null ? void 0 : o.toolsType) === T.Text) {
|
|
5896
5885
|
this.control.textEditorManager.onServiceDerive(v);
|
|
5897
5886
|
return;
|
|
@@ -7012,7 +7001,7 @@ class np {
|
|
|
7012
7001
|
const g = o && this.cloneElementIds(t, c, o, s) || /* @__PURE__ */ new Set();
|
|
7013
7002
|
u.pages.set(s, g), a.set(c, u), this.pageAuth.set(t, a), e && this.pageAuthEffect(t), this.isLocalRender = !1, (h = this.control.collector) == null || h.dispatchPageAuth(
|
|
7014
7003
|
{
|
|
7015
|
-
operation:
|
|
7004
|
+
operation: Ae.addPage,
|
|
7016
7005
|
viewId: t,
|
|
7017
7006
|
scenePath: c,
|
|
7018
7007
|
pageId: s,
|
|
@@ -7043,7 +7032,7 @@ class np {
|
|
|
7043
7032
|
}
|
|
7044
7033
|
(a = this.control.collector) == null || a.dispatchPageAuth(
|
|
7045
7034
|
{
|
|
7046
|
-
operation:
|
|
7035
|
+
operation: Ae.deletePage,
|
|
7047
7036
|
viewId: e,
|
|
7048
7037
|
scenePath: i,
|
|
7049
7038
|
pageId: n
|
|
@@ -7055,7 +7044,7 @@ class np {
|
|
|
7055
7044
|
var i;
|
|
7056
7045
|
this.pageAuth.get(n) && (this.pageAuth.delete(n), e && ((i = this.control.collector) == null || i.dispatchPageAuth(
|
|
7057
7046
|
{
|
|
7058
|
-
operation:
|
|
7047
|
+
operation: Ae.clearView,
|
|
7059
7048
|
viewId: n
|
|
7060
7049
|
},
|
|
7061
7050
|
e
|
|
@@ -7080,7 +7069,7 @@ class np {
|
|
|
7080
7069
|
}
|
|
7081
7070
|
t && s && ((c = this.control.collector) == null || c.dispatchPageAuth(
|
|
7082
7071
|
{
|
|
7083
|
-
operation:
|
|
7072
|
+
operation: Ae.clearPage,
|
|
7084
7073
|
viewId: n,
|
|
7085
7074
|
scenePath: e,
|
|
7086
7075
|
pageId: s
|
|
@@ -7119,7 +7108,7 @@ class np {
|
|
|
7119
7108
|
}
|
|
7120
7109
|
t && this.pageAuthEffect(i), e && l && ((u = this.control.collector) == null || u.dispatchPageAuth(
|
|
7121
7110
|
{
|
|
7122
|
-
operation:
|
|
7111
|
+
operation: Ae.addElement,
|
|
7123
7112
|
viewId: i,
|
|
7124
7113
|
scenePath: s,
|
|
7125
7114
|
pageId: l,
|
|
@@ -7146,7 +7135,7 @@ class np {
|
|
|
7146
7135
|
}
|
|
7147
7136
|
t && this.pageAuthEffect(i), e && l && ((u = this.control.collector) == null || u.dispatchPageAuth(
|
|
7148
7137
|
{
|
|
7149
|
-
operation:
|
|
7138
|
+
operation: Ae.deleteElement,
|
|
7150
7139
|
viewId: i,
|
|
7151
7140
|
scenePath: s,
|
|
7152
7141
|
pageId: l,
|
|
@@ -7165,7 +7154,7 @@ class np {
|
|
|
7165
7154
|
const s = o.get(e);
|
|
7166
7155
|
s && (s.render = t), e === this.control.viewContainerManager.getCurScenePath(n) && this.pageAuthEffect(n), i || (this.isLocalRender = !0), i && (this.isLocalRender = !1, (a = this.control.collector) == null || a.dispatchPageAuth(
|
|
7167
7156
|
{
|
|
7168
|
-
operation:
|
|
7157
|
+
operation: Ae.renderPage,
|
|
7169
7158
|
viewId: n,
|
|
7170
7159
|
scenePath: e,
|
|
7171
7160
|
pageData: {
|
|
@@ -7278,7 +7267,7 @@ class np {
|
|
|
7278
7267
|
this.renderUids.delete(e);
|
|
7279
7268
|
i && ((s = this.control.collector) == null || s.dispatchRenderAuth(
|
|
7280
7269
|
{
|
|
7281
|
-
operation:
|
|
7270
|
+
operation: _e.setAuth,
|
|
7282
7271
|
viewId: e,
|
|
7283
7272
|
renderData: o
|
|
7284
7273
|
},
|
|
@@ -7291,10 +7280,10 @@ class np {
|
|
|
7291
7280
|
let s;
|
|
7292
7281
|
switch (t) {
|
|
7293
7282
|
case "show":
|
|
7294
|
-
o ? (o.render || (o.render = /* @__PURE__ */ new Set()), Be(o.render) && o.render.add(e), Be(o.hide) && o.hide.delete(e)) : this.renderUids.set(n, { render: /* @__PURE__ */ new Set([e]) }), s =
|
|
7283
|
+
o ? (o.render || (o.render = /* @__PURE__ */ new Set()), Be(o.render) && o.render.add(e), Be(o.hide) && o.hide.delete(e)) : this.renderUids.set(n, { render: /* @__PURE__ */ new Set([e]) }), s = _e.setShow;
|
|
7295
7284
|
break;
|
|
7296
7285
|
case "hide":
|
|
7297
|
-
o ? (o.hide || (o.hide = /* @__PURE__ */ new Set()), Be(o.hide) && o.hide.add(e), Be(o.render) && o.render.delete(e)) : this.renderUids.set(n, { hide: /* @__PURE__ */ new Set([e]) }), s =
|
|
7286
|
+
o ? (o.hide || (o.hide = /* @__PURE__ */ new Set()), Be(o.hide) && o.hide.add(e), Be(o.render) && o.render.delete(e)) : this.renderUids.set(n, { hide: /* @__PURE__ */ new Set([e]) }), s = _e.setHide;
|
|
7298
7287
|
break;
|
|
7299
7288
|
}
|
|
7300
7289
|
o ? this.renderUids.set(n, o) : this.renderUids.delete(n), i && s && ((a = this.control.collector) == null || a.dispatchRenderAuth(
|
|
@@ -7311,7 +7300,7 @@ class np {
|
|
|
7311
7300
|
const o = this.renderUids.get(n);
|
|
7312
7301
|
t ? o ? (o.clear || (o.clear = /* @__PURE__ */ new Set()), Be(o.clear) && o.clear.add(e)) : this.renderUids.set(n, { clear: /* @__PURE__ */ new Set([e]) }) : o && Be(o.clear) && o.clear.has(e) && o.clear.delete(e), o ? this.renderUids.set(n, o) : this.renderUids.delete(n), i && ((s = this.control.collector) == null || s.dispatchRenderAuth(
|
|
7313
7302
|
{
|
|
7314
|
-
operation:
|
|
7303
|
+
operation: _e.setClear,
|
|
7315
7304
|
viewId: n,
|
|
7316
7305
|
uid: e,
|
|
7317
7306
|
isClear: t
|
|
@@ -7354,7 +7343,7 @@ class np {
|
|
|
7354
7343
|
destoryByViewId(n, e = !1) {
|
|
7355
7344
|
var t;
|
|
7356
7345
|
this.renderUids.has(n) && (this.renderUids.delete(n), e || (t = this.control.collector) == null || t.dispatchRenderAuth({
|
|
7357
|
-
operation:
|
|
7346
|
+
operation: _e.setAuth,
|
|
7358
7347
|
viewId: n
|
|
7359
7348
|
})), this.pageAuth.has(n) && this.control.renderControl.delViewPage(n, !e);
|
|
7360
7349
|
}
|
|
@@ -7540,7 +7529,7 @@ class ip {
|
|
|
7540
7529
|
e && (this.maps.delete(e), this.control.viewContainerManager.setActiveMiniMap(e, !1));
|
|
7541
7530
|
}
|
|
7542
7531
|
}
|
|
7543
|
-
class
|
|
7532
|
+
class GI {
|
|
7544
7533
|
constructor() {
|
|
7545
7534
|
I(this, "control");
|
|
7546
7535
|
I(this, "_listeners", {});
|
|
@@ -7581,10 +7570,44 @@ class rp {
|
|
|
7581
7570
|
});
|
|
7582
7571
|
}
|
|
7583
7572
|
}
|
|
7573
|
+
function op(r) {
|
|
7574
|
+
return r instanceof TouchEvent || r instanceof window.TouchEvent || (r == null ? void 0 : r.touches) && (r == null ? void 0 : r.touches.length) || (r == null ? void 0 : r.changedTouches) && (r == null ? void 0 : r.changedTouches.length);
|
|
7575
|
+
}
|
|
7576
|
+
function Jt(r) {
|
|
7577
|
+
return op(r) && (r.touches && r.touches.length === 1 || r.changedTouches && r.changedTouches.length === 1);
|
|
7578
|
+
}
|
|
7579
|
+
function Dr(r) {
|
|
7580
|
+
return r.touches && r.touches.length ? {
|
|
7581
|
+
x: r.touches[0].pageX,
|
|
7582
|
+
y: r.touches[0].pageY
|
|
7583
|
+
} : r.changedTouches && r.changedTouches.length ? {
|
|
7584
|
+
x: r.changedTouches[0].pageX,
|
|
7585
|
+
y: r.changedTouches[0].pageY
|
|
7586
|
+
} : {
|
|
7587
|
+
x: r.pageX,
|
|
7588
|
+
y: r.pageY
|
|
7589
|
+
};
|
|
7590
|
+
}
|
|
7591
|
+
class sp {
|
|
7592
|
+
constructor(n) {
|
|
7593
|
+
I(this, "_logger");
|
|
7594
|
+
this._logger = n;
|
|
7595
|
+
}
|
|
7596
|
+
error(...n) {
|
|
7597
|
+
this._logger ? this._logger.error(...n) : console.error(...n);
|
|
7598
|
+
}
|
|
7599
|
+
info(...n) {
|
|
7600
|
+
this._logger ? this._logger.info(...n) : console.info(...n);
|
|
7601
|
+
}
|
|
7602
|
+
warn(...n) {
|
|
7603
|
+
this._logger ? this._logger.warn(...n) : console.warn(...n);
|
|
7604
|
+
}
|
|
7605
|
+
}
|
|
7584
7606
|
const lt = class lt {
|
|
7585
7607
|
constructor(n) {
|
|
7586
7608
|
I(this, "version", vr);
|
|
7587
7609
|
I(this, "plugin");
|
|
7610
|
+
I(this, "logger");
|
|
7588
7611
|
I(this, "room");
|
|
7589
7612
|
I(this, "play");
|
|
7590
7613
|
I(this, "collector");
|
|
@@ -7651,15 +7674,17 @@ const lt = class lt {
|
|
|
7651
7674
|
var t, i;
|
|
7652
7675
|
(t = this.worker) == null || t.updateCamera(n, e), this.isUseSimple || (i = this.miniMapManager) == null || i.updateViewCamera(n, e);
|
|
7653
7676
|
});
|
|
7654
|
-
var
|
|
7677
|
+
var a, c;
|
|
7655
7678
|
const { displayer: e, plugin: t, options: i } = n;
|
|
7656
|
-
this.plugin = t, this.room = G(e) ? e : void 0, this.play = En(e) ? e : void 0
|
|
7657
|
-
|
|
7679
|
+
this.plugin = t, this.room = G(e) ? e : void 0, this.play = En(e) ? e : void 0;
|
|
7680
|
+
let o;
|
|
7681
|
+
this.room && (o = (a = this.room) == null ? void 0 : a.logger, this._disableDeviceInputs = this.room.disableDeviceInputs, this._disableEraseImage = this.room.disableEraseImage, this._disableEraseText = !1), this.pluginOptions = i, ((c = i.extras) == null ? void 0 : c.useWorker) === "mainThread" ? this._disableUseWorker = !0 : this._disableUseWorker = ji !== "worker", this.roomMember = new YM();
|
|
7682
|
+
const s = {
|
|
7658
7683
|
control: this,
|
|
7659
7684
|
internalMsgEmitter: lt.InternalMsgEmitter,
|
|
7660
7685
|
publicMsgEmitter: lt.PublicMsgEmitter
|
|
7661
7686
|
};
|
|
7662
|
-
this.cursor = new UM(
|
|
7687
|
+
this.cursor = new UM(s), this.textEditorManager = new ef(s), this.worker = new ep(s), this.hotkeyManager = new tp(s), this.renderControl = new np(s), this.pluginManager = new rp(s), this.isUseSimple || (this.miniMapManager = new ip(s)), this.logger = new sp(o);
|
|
7663
7688
|
}
|
|
7664
7689
|
hasPolyfillMethod(n) {
|
|
7665
7690
|
return this._isPolyfill[n];
|
|
@@ -7807,11 +7832,11 @@ const lt = class lt {
|
|
|
7807
7832
|
case ne.rectangle:
|
|
7808
7833
|
return n.rectangleCompleteToSelector && (this.hasSwitchToSelectorEffect = !0), T.Rectangle;
|
|
7809
7834
|
case ne.shape:
|
|
7810
|
-
if (n.shapeCompleteToSelector && (this.hasSwitchToSelectorEffect = !0), n.shapeType ===
|
|
7835
|
+
if (n.shapeCompleteToSelector && (this.hasSwitchToSelectorEffect = !0), n.shapeType === Ke.Pentagram || n.shapeType === Ke.Star)
|
|
7811
7836
|
return T.Star;
|
|
7812
|
-
if (n.shapeType ===
|
|
7837
|
+
if (n.shapeType === Ke.Polygon || n.shapeType === Ke.Triangle || n.shapeType === Ke.Rhombus)
|
|
7813
7838
|
return T.Polygon;
|
|
7814
|
-
if (n.shapeType ===
|
|
7839
|
+
if (n.shapeType === Ke.SpeechBalloon)
|
|
7815
7840
|
return T.SpeechBalloon;
|
|
7816
7841
|
break;
|
|
7817
7842
|
}
|
|
@@ -7825,7 +7850,7 @@ const lt = class lt {
|
|
|
7825
7850
|
toolsOpt: {}
|
|
7826
7851
|
};
|
|
7827
7852
|
const t = {
|
|
7828
|
-
strokeColor:
|
|
7853
|
+
strokeColor: bt(
|
|
7829
7854
|
e.strokeColor[0],
|
|
7830
7855
|
e.strokeColor[1],
|
|
7831
7856
|
e.strokeColor[2],
|
|
@@ -7836,12 +7861,12 @@ const lt = class lt {
|
|
|
7836
7861
|
};
|
|
7837
7862
|
switch (n) {
|
|
7838
7863
|
case T.Text:
|
|
7839
|
-
t.fontFamily = window.getComputedStyle(document.documentElement).getPropertyValue("font-family"), t.fontSize = (e == null ? void 0 : e.textSizeOverride) || (e == null ? void 0 : e.textSize) || Number(window.getComputedStyle(document.body).fontSize), t.textAlign = (e == null ? void 0 : e.textAlign) || "left", t.verticalAlign = (e == null ? void 0 : e.verticalAlign) || "middle", t.fontColor = (e == null ? void 0 : e.textColor) &&
|
|
7864
|
+
t.fontFamily = window.getComputedStyle(document.documentElement).getPropertyValue("font-family"), t.fontSize = (e == null ? void 0 : e.textSizeOverride) || (e == null ? void 0 : e.textSize) || Number(window.getComputedStyle(document.body).fontSize), t.textAlign = (e == null ? void 0 : e.textAlign) || "left", t.verticalAlign = (e == null ? void 0 : e.verticalAlign) || "middle", t.fontColor = (e == null ? void 0 : e.textColor) && bt(
|
|
7840
7865
|
e.textColor[0],
|
|
7841
7866
|
e.textColor[1],
|
|
7842
7867
|
e.textColor[2],
|
|
7843
7868
|
e.textOpacity || 1
|
|
7844
|
-
) || t.strokeColor || "rgba(0,0,0,1)", t.fontBgColor = Array.isArray(e == null ? void 0 : e.textBgColor) &&
|
|
7869
|
+
) || t.strokeColor || "rgba(0,0,0,1)", t.fontBgColor = Array.isArray(e == null ? void 0 : e.textBgColor) && bt(
|
|
7845
7870
|
e.textBgColor[0],
|
|
7846
7871
|
e.textBgColor[1],
|
|
7847
7872
|
e.textBgColor[2],
|
|
@@ -7881,7 +7906,7 @@ const lt = class lt {
|
|
|
7881
7906
|
case T.SpeechBalloon: {
|
|
7882
7907
|
e != null && e.strokeType && (e == null ? void 0 : e.strokeType) === me.Stroke ? t.strokeType = me.Normal : t.strokeType = (e == null ? void 0 : e.strokeType) || me.Normal;
|
|
7883
7908
|
const i = t.strokeType;
|
|
7884
|
-
t.lineCap = this.getLineCap(i), t.lineDash = this.getLineDash(i), n === T.Star && (e.shapeType ===
|
|
7909
|
+
t.lineCap = this.getLineCap(i), t.lineDash = this.getLineDash(i), n === T.Star && (e.shapeType === Ke.Pentagram ? (t.vertices = 10, t.innerVerticeStep = 2, t.innerRatio = 0.4) : e != null && e.vertices && (e != null && e.innerVerticeStep) && (e != null && e.innerRatio) && (t.vertices = e.vertices, t.innerVerticeStep = e.innerVerticeStep, t.innerRatio = e.innerRatio)), n === T.Polygon && (e.shapeType === Ke.Triangle ? t.vertices = 3 : e.shapeType === Ke.Rhombus ? t.vertices = 4 : e.vertices && (t.vertices = e.vertices)), t.fillColor = (e == null ? void 0 : e.fillColor) && bt(
|
|
7885
7910
|
e.fillColor[0],
|
|
7886
7911
|
e.fillColor[1],
|
|
7887
7912
|
e.fillColor[2],
|
|
@@ -8110,7 +8135,7 @@ const lt = class lt {
|
|
|
8110
8135
|
insertIconify(n, e) {
|
|
8111
8136
|
var i;
|
|
8112
8137
|
if (this.viewContainerManager.getView(n) && this.room) {
|
|
8113
|
-
const o = this.room.state.memberState, s =
|
|
8138
|
+
const o = this.room.state.memberState, s = bt(
|
|
8114
8139
|
o.strokeColor[0],
|
|
8115
8140
|
o.strokeColor[1],
|
|
8116
8141
|
o.strokeColor[2],
|
|
@@ -8335,7 +8360,7 @@ I(he, "proxyToRaw", /* @__PURE__ */ new WeakMap()), I(he, "proxyCallbacks", /* @
|
|
|
8335
8360
|
}
|
|
8336
8361
|
});
|
|
8337
8362
|
let zn = he;
|
|
8338
|
-
const
|
|
8363
|
+
const nt = class nt {
|
|
8339
8364
|
constructor(n) {
|
|
8340
8365
|
I(this, "emitter", new Tn());
|
|
8341
8366
|
I(this, "undoStack");
|
|
@@ -8362,20 +8387,20 @@ const rt = class rt {
|
|
|
8362
8387
|
).length;
|
|
8363
8388
|
this.emitter.emitAsync("onCanUndoStepsUpdate", e, this.viewId), this.emitter.emitAsync("onCanRedoStepsUpdate", t, this.viewId);
|
|
8364
8389
|
}
|
|
8365
|
-
},
|
|
8390
|
+
}, nt.waitTime));
|
|
8366
8391
|
const { control: e, internalMsgEmitter: t, viewId: i, enableGlobal: o } = n;
|
|
8367
|
-
this.control = e, this.emitter = t,
|
|
8392
|
+
this.control = e, this.emitter = t, nt.MaxStackLength = this.control.pluginOptions.extras.undoRedo.maxStackLength || Se.undoRedo.maxStackLength;
|
|
8368
8393
|
const s = new zn(), a = [], c = [];
|
|
8369
8394
|
this.undoStack = s.createProxy(
|
|
8370
8395
|
a,
|
|
8371
8396
|
(l) => {
|
|
8372
|
-
this.control.renderControl.isWritable && this.handleArrayChange(l,
|
|
8397
|
+
this.control.renderControl.isWritable && this.handleArrayChange(l, Ae.syncUndoStack);
|
|
8373
8398
|
},
|
|
8374
8399
|
Dn.Undo
|
|
8375
8400
|
), this.redoStack = s.createProxy(
|
|
8376
8401
|
c,
|
|
8377
8402
|
(l) => {
|
|
8378
|
-
this.control.renderControl.isWritable && this.handleArrayChange(l,
|
|
8403
|
+
this.control.renderControl.isWritable && this.handleArrayChange(l, Ae.syncRedoStack);
|
|
8379
8404
|
},
|
|
8380
8405
|
Dn.Redo
|
|
8381
8406
|
), this.room = e.room, this.worker = e.worker, this.isTicking = !1, this.viewId = i, this.enableGlobal = o;
|
|
@@ -8436,7 +8461,7 @@ const rt = class rt {
|
|
|
8436
8461
|
id: `${n}-${this.uid}`,
|
|
8437
8462
|
data: se(c),
|
|
8438
8463
|
scenePath: t
|
|
8439
|
-
}), this.undoStack.length >
|
|
8464
|
+
}), this.undoStack.length > nt.MaxStackLength && this.undoStack.shift(), i && this.emitter.emitAsync(
|
|
8440
8465
|
"onCanUndoStepsUpdate",
|
|
8441
8466
|
this.undoStack.length,
|
|
8442
8467
|
this.viewId
|
|
@@ -8528,7 +8553,7 @@ const rt = class rt {
|
|
|
8528
8553
|
id: `${this.undoTickerId}-${this.uid}`,
|
|
8529
8554
|
data: se(c),
|
|
8530
8555
|
scenePath: n
|
|
8531
|
-
}), this.undoStack.length >
|
|
8556
|
+
}), this.undoStack.length > nt.MaxStackLength && this.undoStack.shift()) : c.size && !l.size && (e = {
|
|
8532
8557
|
id: `${this.undoTickerId}-${this.uid}`,
|
|
8533
8558
|
data: se(c),
|
|
8534
8559
|
scenePath: n
|
|
@@ -8695,7 +8720,7 @@ const rt = class rt {
|
|
|
8695
8720
|
return !!e.includes(t);
|
|
8696
8721
|
}
|
|
8697
8722
|
refreshPlugin(n, e = !1) {
|
|
8698
|
-
var a, c, l, h, u, g, M, d, y, w, p, f, N, S, C, k, v,
|
|
8723
|
+
var a, c, l, h, u, g, M, d, y, w, p, f, N, S, C, k, v, b, P, E, O;
|
|
8699
8724
|
let t;
|
|
8700
8725
|
const { scenePath: i } = n, o = n.data;
|
|
8701
8726
|
if (!o || !this.collector)
|
|
@@ -8814,7 +8839,7 @@ const rt = class rt {
|
|
|
8814
8839
|
});
|
|
8815
8840
|
} else if (!e && Array.isArray(j) && j.length === 2) {
|
|
8816
8841
|
const Q = j[0];
|
|
8817
|
-
if ((
|
|
8842
|
+
if ((b = Q.updateNodeOpt) != null && b.useAnimation && (Q.updateNodeOpt.useAnimation = !1), ((P = this.collector) == null ? void 0 : P.getLocalId(z.key)) === $ && ((E = this.collector) != null && E.isOwn(z.key))) {
|
|
8818
8843
|
const _ = Q.selectIds;
|
|
8819
8844
|
if (_) {
|
|
8820
8845
|
const ce = Y.filter(
|
|
@@ -8848,26 +8873,8 @@ const rt = class rt {
|
|
|
8848
8873
|
}
|
|
8849
8874
|
}
|
|
8850
8875
|
};
|
|
8851
|
-
I(
|
|
8852
|
-
let
|
|
8853
|
-
function op(r) {
|
|
8854
|
-
return r instanceof TouchEvent || r instanceof window.TouchEvent || (r == null ? void 0 : r.touches) && (r == null ? void 0 : r.touches.length) || (r == null ? void 0 : r.changedTouches) && (r == null ? void 0 : r.changedTouches.length);
|
|
8855
|
-
}
|
|
8856
|
-
function Jt(r) {
|
|
8857
|
-
return op(r) && (r.touches && r.touches.length === 1 || r.changedTouches && r.changedTouches.length === 1);
|
|
8858
|
-
}
|
|
8859
|
-
function Dr(r) {
|
|
8860
|
-
return r.touches && r.touches.length ? {
|
|
8861
|
-
x: r.touches[0].pageX,
|
|
8862
|
-
y: r.touches[0].pageY
|
|
8863
|
-
} : r.changedTouches && r.changedTouches.length ? {
|
|
8864
|
-
x: r.changedTouches[0].pageX,
|
|
8865
|
-
y: r.changedTouches[0].pageY
|
|
8866
|
-
} : {
|
|
8867
|
-
x: r.pageX,
|
|
8868
|
-
y: r.pageY
|
|
8869
|
-
};
|
|
8870
|
-
}
|
|
8876
|
+
I(nt, "sdkCallBack"), I(nt, "MaxStackLength", Se.undoRedo.maxStackLength), I(nt, "waitTime", 100);
|
|
8877
|
+
let An = nt;
|
|
8871
8878
|
class Et {
|
|
8872
8879
|
constructor(n) {
|
|
8873
8880
|
I(this, "internalMsgEmitter");
|
|
@@ -9017,7 +9024,7 @@ class Et {
|
|
|
9017
9024
|
imageBitmap: C,
|
|
9018
9025
|
isClear: k,
|
|
9019
9026
|
isUnClose: v,
|
|
9020
|
-
drawCanvas:
|
|
9027
|
+
drawCanvas: b,
|
|
9021
9028
|
clearCanvas: P,
|
|
9022
9029
|
viewId: E
|
|
9023
9030
|
} = N, O = (e = this.getView(E)) == null ? void 0 : e.displayer;
|
|
@@ -9031,35 +9038,35 @@ class Et {
|
|
|
9031
9038
|
} = O, Y = Math.floor(S.w * z), Q = Math.floor(S.h * z), _ = S.x * z, ce = S.y * z;
|
|
9032
9039
|
if (k) {
|
|
9033
9040
|
switch (P) {
|
|
9034
|
-
case
|
|
9041
|
+
case et.TopFloat:
|
|
9035
9042
|
(i = (t = X == null ? void 0 : X.current) == null ? void 0 : t.getContext("2d")) == null || i.clearRect(_, ce, Y, Q);
|
|
9036
9043
|
break;
|
|
9037
|
-
case
|
|
9044
|
+
case et.Float:
|
|
9038
9045
|
(s = (o = j.current) == null ? void 0 : o.getContext("2d")) == null || s.clearRect(_, ce, Y, Q);
|
|
9039
9046
|
break;
|
|
9040
|
-
case
|
|
9047
|
+
case et.ServiceFloat:
|
|
9041
9048
|
(c = (a = F.current) == null ? void 0 : a.getContext("2d")) == null || c.clearRect(_, ce, Y, Q);
|
|
9042
9049
|
break;
|
|
9043
|
-
case
|
|
9050
|
+
case et.Bg:
|
|
9044
9051
|
(h = (l = L.current) == null ? void 0 : l.getContext("2d")) == null || h.clearRect(_, ce, Y, Q);
|
|
9045
9052
|
break;
|
|
9046
9053
|
}
|
|
9047
9054
|
continue;
|
|
9048
9055
|
}
|
|
9049
|
-
if (
|
|
9050
|
-
switch (
|
|
9051
|
-
case
|
|
9056
|
+
if (b && C)
|
|
9057
|
+
switch (b) {
|
|
9058
|
+
case et.TopFloat:
|
|
9052
9059
|
(g = (u = X == null ? void 0 : X.current) == null ? void 0 : u.getContext("2d")) == null || g.drawImage(C, 0, 0, Y, Q, _, ce, Y, Q);
|
|
9053
9060
|
break;
|
|
9054
|
-
case
|
|
9061
|
+
case et.Float: {
|
|
9055
9062
|
(d = (M = j.current) == null ? void 0 : M.getContext("2d")) == null || d.drawImage(C, 0, 0, Y, Q, _, ce, Y, Q);
|
|
9056
9063
|
break;
|
|
9057
9064
|
}
|
|
9058
|
-
case
|
|
9065
|
+
case et.ServiceFloat: {
|
|
9059
9066
|
(w = (y = F.current) == null ? void 0 : y.getContext("2d")) == null || w.drawImage(C, 0, 0, Y, Q, _, ce, Y, Q);
|
|
9060
9067
|
break;
|
|
9061
9068
|
}
|
|
9062
|
-
case
|
|
9069
|
+
case et.Bg: {
|
|
9063
9070
|
(f = (p = L.current) == null ? void 0 : p.getContext("2d")) == null || f.drawImage(C, 0, 0, Y, Q, _, ce, Y, Q);
|
|
9064
9071
|
break;
|
|
9065
9072
|
}
|
|
@@ -9295,7 +9302,7 @@ class zr {
|
|
|
9295
9302
|
viewId: t,
|
|
9296
9303
|
enableGlobal: !!this.control.pluginOptions.extras.undoRedo.enableGlobal
|
|
9297
9304
|
};
|
|
9298
|
-
this.commiter = new
|
|
9305
|
+
this.commiter = new An(i), this.cursorMouseMoveFun = (o) => {
|
|
9299
9306
|
const s = this.getPoint(o);
|
|
9300
9307
|
this.cacheCursorPoint && le(s, this.cacheCursorPoint) || (this.cacheCursorPoint = s, s && this.worker.sendCursorEvent(s, this.viewId));
|
|
9301
9308
|
}, this.cursorMouseMoveDebounced = Pt(
|
|
@@ -9443,7 +9450,7 @@ class zr {
|
|
|
9443
9450
|
}), !0) : !1;
|
|
9444
9451
|
}
|
|
9445
9452
|
}
|
|
9446
|
-
class
|
|
9453
|
+
class ap extends zr {
|
|
9447
9454
|
constructor(e, t, i) {
|
|
9448
9455
|
super(t, i, e);
|
|
9449
9456
|
I(this, "_viewId");
|
|
@@ -9456,7 +9463,7 @@ class sp extends zr {
|
|
|
9456
9463
|
this._viewId = e;
|
|
9457
9464
|
}
|
|
9458
9465
|
}
|
|
9459
|
-
class
|
|
9466
|
+
class Ar extends zr {
|
|
9460
9467
|
constructor(n, e) {
|
|
9461
9468
|
super(n, e, pe);
|
|
9462
9469
|
}
|
|
@@ -9470,25 +9477,25 @@ class br extends zr {
|
|
|
9470
9477
|
super.destroy(), this.control.cursor.destroy();
|
|
9471
9478
|
}
|
|
9472
9479
|
}
|
|
9473
|
-
const
|
|
9474
|
-
Container:
|
|
9475
|
-
BackgroundBox:
|
|
9476
|
-
BackgroundSvgBox:
|
|
9477
|
-
BackgroundSnapshotContent:
|
|
9478
|
-
BackgroundSnapshotBox:
|
|
9479
|
-
CanvasBox:
|
|
9480
|
-
FloatCanvas:
|
|
9481
|
-
TopFloatCanvas:
|
|
9482
|
-
CanvasBoxSub:
|
|
9483
|
-
SnapshotBox:
|
|
9484
|
-
FloatBar:
|
|
9485
|
-
RotateBtn:
|
|
9486
|
-
ResizeBtn:
|
|
9487
|
-
CursorBox:
|
|
9488
|
-
TextEditorContainer:
|
|
9489
|
-
ResizeTowBox:
|
|
9490
|
-
FloatBarBtn:
|
|
9491
|
-
},
|
|
9480
|
+
const cp = "index-module__Container__nLsM3", lp = "index-module__BackgroundBox__zfthZ", up = "index-module__BackgroundSvgBox__Fv1ay", hp = "index-module__BackgroundSnapshotContent__NFLAl", dp = "index-module__BackgroundSnapshotBox__NEM-C", gp = "index-module__CanvasBox__j2Xe-", fp = "index-module__FloatCanvas__d1YR7", Mp = "index-module__TopFloatCanvas__7IaCw", pp = "index-module__CanvasBoxSub__hcMeK", yp = "index-module__SnapshotBox__--eeE", Ip = "index-module__FloatBar__cm-EL", mp = "index-module__RotateBtn__HSSkf", wp = "index-module__ResizeBtn__yjvda", Tp = "index-module__CursorBox__2UHvI", Np = "index-module__TextEditorContainer__Qm8KC", vp = "index-module__ResizeTowBox__HOllX", Cp = "index-module__FloatBarBtn__FJrOG", De = {
|
|
9481
|
+
Container: cp,
|
|
9482
|
+
BackgroundBox: lp,
|
|
9483
|
+
BackgroundSvgBox: up,
|
|
9484
|
+
BackgroundSnapshotContent: hp,
|
|
9485
|
+
BackgroundSnapshotBox: dp,
|
|
9486
|
+
CanvasBox: gp,
|
|
9487
|
+
FloatCanvas: fp,
|
|
9488
|
+
TopFloatCanvas: Mp,
|
|
9489
|
+
CanvasBoxSub: pp,
|
|
9490
|
+
SnapshotBox: yp,
|
|
9491
|
+
FloatBar: Ip,
|
|
9492
|
+
RotateBtn: mp,
|
|
9493
|
+
ResizeBtn: wp,
|
|
9494
|
+
CursorBox: Tp,
|
|
9495
|
+
TextEditorContainer: Np,
|
|
9496
|
+
ResizeTowBox: vp,
|
|
9497
|
+
FloatBarBtn: Cp
|
|
9498
|
+
}, Sp = {
|
|
9492
9499
|
delete: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDZ2NmEyIDIgMCAwIDEtMiAySDZhMiAyIDAgMCAxLTItMlY2aDBtMS0yYTIgMiAwIDAgMSAyLTJoMmEyIDIgMCAwIDEgMiAyaDBNMyA0aDEwIiBzdHJva2U9IiM0NDRFNjAiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==",
|
|
9493
9500
|
duplicate: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgc3Ryb2tlPSIjNDQ0RTYwIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik0xMSAySDZhMSAxIDAgMCAwLTEgMXY4YTEgMSAwIDAgMCAxIDFoNmExIDEgMCAwIDAgMS0xVjRoMGwtMi0yeiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PHBhdGggZD0iTTExIDJ2MWExIDEgMCAwIDAgMSAxaDFsLTItMnoiLz48cGF0aCBkPSJNOSAxNEg0YTEgMSAwIDAgMS0xLTFWNWgwIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48L2c+PC9zdmc+",
|
|
9494
9501
|
"layer-pressed": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE2IDEwLTYgNCA2IDQgNi00em0tNiA4IDYgNCA2LTQiIHN0cm9rZT0iIzMzODFGRiIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+",
|
|
@@ -9526,9 +9533,9 @@ const ap = "index-module__Container__nLsM3", cp = "index-module__BackgroundBox__
|
|
|
9526
9533
|
"speechBallon-placement": "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTU3NiAyMTMuMzMzMzMzbDIyLjYxMzMzMyAyMi42MTMzMzRhMzIgMzIgMCAwIDAgMC00NS4yMjY2NjdMNTc2IDIxMy4zMzMzMzN6IG0tNjIuNzItMTA3Ljk0NjY2NmEzMiAzMiAwIDEgMC00NS4yMjY2NjcgNDUuMjI2NjY2bDQ1LjIyNjY2Ny00NS4yMjY2NjZ6IG0tNDUuMjI2NjY3IDE3MC42NjY2NjZhMzIgMzIgMCAwIDAgNDUuMjI2NjY3IDQ1LjIyNjY2N2wtNDUuMjI2NjY3LTQ1LjIyNjY2N3pNNDQ4IDgxMC42NjY2NjdsLTIyLjYxMzMzMy0yMi42MTMzMzRhMzIgMzIgMCAwIDAgMCA0NS4yMjY2NjdsMjIuNjEzMzMzLTIyLjYxMzMzM3ogbTEwNy45NDY2NjctNjIuNzJhMzIgMzIgMCAxIDAtNDUuMjI2NjY3LTQ1LjIyNjY2N2w0NS4yMjY2NjcgNDUuMjI2NjY3eiBtLTQ1LjIyNjY2NyAxNzAuNjY2NjY2YTMyIDMyIDAgMSAwIDQ1LjIyNjY2Ny00NS4yMjY2NjZsLTQ1LjIyNjY2NyA0NS4yMjY2NjZ6TTgxMC42NjY2NjcgNTc2bC0yMi42MTMzMzQgMjIuNjEzMzMzYTMyIDMyIDAgMCAwIDQ1LjIyNjY2NyAwTDgxMC42NjY2NjcgNTc2eiBtMTA3Ljk0NjY2Ni02Mi43MmEzMiAzMiAwIDEgMC00NS4yMjY2NjYtNDUuMjI2NjY3bDQ1LjIyNjY2NiA0NS4yMjY2Njd6IG0tMTcwLjY2NjY2Ni00NS4yMjY2NjdhMzIgMzIgMCAxIDAtNDUuMjI2NjY3IDQ1LjIyNjY2N2w0NS4yMjY2NjctNDUuMjI2NjY3ek0yMTMuMzMzMzMzIDQ0OGwyMi42MTMzMzQtMjIuNjEzMzMzYTMyIDMyIDAgMCAwLTQ1LjIyNjY2NyAwbDIyLjYxMzMzMyAyMi42MTMzMzN6IG02Mi43MiAxMDcuOTQ2NjY3YTMyIDMyIDAgMCAwIDQ1LjIyNjY2Ny00NS4yMjY2NjdsLTQ1LjIyNjY2NyA0NS4yMjY2Njd6IG0tMTcwLjY2NjY2Ni00NS4yMjY2NjdhMzIgMzIgMCAxIDAgNDUuMjI2NjY2IDQ1LjIyNjY2N2wtNDUuMjI2NjY2LTQ1LjIyNjY2N3pNMzA5LjMzMzMzMyAyMTMuMzMzMzMzQTc0LjY2NjY2NyA3NC42NjY2NjcgMCAwIDEgMjM0LjY2NjY2NyAyODh2NjRBMTM4LjY2NjY2NyAxMzguNjY2NjY3IDAgMCAwIDM3My4zMzMzMzMgMjEzLjMzMzMzM2gtNjR6TTIzNC42NjY2NjcgMjg4QTc0LjY2NjY2NyA3NC42NjY2NjcgMCAwIDEgMTYwIDIxMy4zMzMzMzNoLTY0QTEzOC42NjY2NjcgMTM4LjY2NjY2NyAwIDAgMCAyMzQuNjY2NjY3IDM1MnYtNjR6TTE2MCAyMTMuMzMzMzMzYzAtNDEuMjE2IDMzLjQ1MDY2Ny03NC42NjY2NjcgNzQuNjY2NjY3LTc0LjY2NjY2NnYtNjRBMTM4LjY2NjY2NyAxMzguNjY2NjY3IDAgMCAwIDk2IDIxMy4zMzMzMzNoNjR6TTIzNC42NjY2NjcgMTM4LjY2NjY2N2M0MS4yMTYgMCA3NC42NjY2NjcgMzMuNDUwNjY3IDc0LjY2NjY2NiA3NC42NjY2NjZoNjRBMTM4LjY2NjY2NyAxMzguNjY2NjY3IDAgMCAwIDIzNC42NjY2NjcgNzQuNjY2NjY3djY0ek0zNDEuMzMzMzMzIDI0NS4zMzMzMzNoMjM0LjY2NjY2N3YtNjRIMzQxLjMzMzMzM3Y2NHogbTI1Ny4yOC01NC42MTMzMzNsLTg1LjMzMzMzMy04NS4zMzMzMzMtNDUuMjI2NjY3IDQ1LjIyNjY2NiA4NS4zMzMzMzQgODUuMzMzMzM0IDQ1LjIyNjY2Ni00NS4yMjY2Njd6IG0tNDUuMjI2NjY2IDBsLTg1LjMzMzMzNCA4NS4zMzMzMzMgNDUuMjI2NjY3IDQ1LjIyNjY2NyA4NS4zMzMzMzMtODUuMzMzMzMzLTQ1LjIyNjY2Ni00NS4yMjY2Njd6TTY1MC42NjY2NjcgODEwLjY2NjY2N2ExMzguNjY2NjY3IDEzOC42NjY2NjcgMCAwIDAgMTM4LjY2NjY2NiAxMzguNjY2NjY2di02NEE3NC42NjY2NjcgNzQuNjY2NjY3IDAgMCAxIDcxNC42NjY2NjcgODEwLjY2NjY2N2gtNjR6IG0xMzguNjY2NjY2IDEzOC42NjY2NjZBMTM4LjY2NjY2NyAxMzguNjY2NjY3IDAgMCAwIDkyOCA4MTAuNjY2NjY3aC02NGE3NC42NjY2NjcgNzQuNjY2NjY3IDAgMCAxLTc0LjY2NjY2NyA3NC42NjY2NjZ2NjR6TTkyOCA4MTAuNjY2NjY3YTEzOC42NjY2NjcgMTM4LjY2NjY2NyAwIDAgMC0xMzguNjY2NjY3LTEzOC42NjY2Njd2NjRjNDEuMjE2IDAgNzQuNjY2NjY3IDMzLjQ1MDY2NyA3NC42NjY2NjcgNzQuNjY2NjY3aDY0eiBtLTEzOC42NjY2NjctMTM4LjY2NjY2N0ExMzguNjY2NjY3IDEzOC42NjY2NjcgMCAwIDAgNjUwLjY2NjY2NyA4MTAuNjY2NjY3aDY0YzAtNDEuMjE2IDMzLjQ1MDY2Ny03NC42NjY2NjcgNzQuNjY2NjY2LTc0LjY2NjY2N3YtNjR6IG0tMTA2LjY2NjY2NiAxMDYuNjY2NjY3aC0yMzQuNjY2NjY3djY0SDY4Mi42NjY2Njd2LTY0eiBtLTIxMi4wNTMzMzQgNTQuNjEzMzMzbDg1LjMzMzMzNC04NS4zMzMzMzMtNDUuMjI2NjY3LTQ1LjIyNjY2Ny04NS4zMzMzMzMgODUuMzMzMzMzIDQ1LjIyNjY2NiA0NS4yMjY2Njd6IG0tNDUuMjI2NjY2IDBsODUuMzMzMzMzIDg1LjMzMzMzMyA0NS4yMjY2NjctNDUuMjI2NjY2LTg1LjMzMzMzNC04NS4zMzMzMzQtNDUuMjI2NjY2IDQ1LjIyNjY2N3pNNjcyIDIzNC42NjY2NjdBMTM4LjY2NjY2NyAxMzguNjY2NjY3IDAgMCAwIDgxMC42NjY2NjcgMzczLjMzMzMzM3YtNjRhNzQuNjY2NjY3IDc0LjY2NjY2NyAwIDAgMS03NC42NjY2NjctNzQuNjY2NjY2aC02NHpNODEwLjY2NjY2NyAzNzMuMzMzMzMzYTEzOC42NjY2NjcgMTM4LjY2NjY2NyAwIDAgMCAxMzguNjY2NjY2LTEzOC42NjY2NjZoLTY0QTc0LjY2NjY2NyA3NC42NjY2NjcgMCAwIDEgODEwLjY2NjY2NyAzMDkuMzMzMzMzdjY0eiBtMTM4LjY2NjY2Ni0xMzguNjY2NjY2QTEzOC42NjY2NjcgMTM4LjY2NjY2NyAwIDAgMCA4MTAuNjY2NjY3IDk2djY0YzQxLjIxNiAwIDc0LjY2NjY2NyAzMy40NTA2NjcgNzQuNjY2NjY2IDc0LjY2NjY2N2g2NHpNODEwLjY2NjY2NyA5NmExMzguNjY2NjY3IDEzOC42NjY2NjcgMCAwIDAtMTM4LjY2NjY2NyAxMzguNjY2NjY3aDY0YzAtNDEuMjE2IDMzLjQ1MDY2Ny03NC42NjY2NjcgNzQuNjY2NjY3LTc0LjY2NjY2N3YtNjR6TTc3OC42NjY2NjcgMzQxLjMzMzMzM3YyMzQuNjY2NjY3aDY0VjM0MS4zMzMzMzNoLTY0eiBtNTQuNjEzMzMzIDI1Ny4yOGw4NS4zMzMzMzMtODUuMzMzMzMzLTQ1LjIyNjY2Ni00NS4yMjY2NjctODUuMzMzMzM0IDg1LjMzMzMzNCA0NS4yMjY2NjcgNDUuMjI2NjY2eiBtMC00NS4yMjY2NjZsLTg1LjMzMzMzMy04NS4zMzMzMzQtNDUuMjI2NjY3IDQ1LjIyNjY2NyA4NS4zMzMzMzMgODUuMzMzMzMzIDQ1LjIyNjY2Ny00NS4yMjY2NjZ6TTEzOC42NjY2NjcgNzg5LjMzMzMzM2MwLTQxLjIxNiAzMy40NTA2NjctNzQuNjY2NjY3IDc0LjY2NjY2Ni03NC42NjY2NjZ2LTY0YTEzOC42NjY2NjcgMTM4LjY2NjY2NyAwIDAgMC0xMzguNjY2NjY2IDEzOC42NjY2NjZoNjR6TTIxMy4zMzMzMzMgNzE0LjY2NjY2N2M0MS4yMTYgMCA3NC42NjY2NjcgMzMuNDUwNjY3IDc0LjY2NjY2NyA3NC42NjY2NjZoNjRBMTM4LjY2NjY2NyAxMzguNjY2NjY3IDAgMCAwIDIxMy4zMzMzMzMgNjUwLjY2NjY2N3Y2NHogbTc0LjY2NjY2NyA3NC42NjY2NjZBNzQuNjY2NjY3IDc0LjY2NjY2NyAwIDAgMSAyMTMuMzMzMzMzIDg2NHY2NGExMzguNjY2NjY3IDEzOC42NjY2NjcgMCAwIDAgMTM4LjY2NjY2Ny0xMzguNjY2NjY3aC02NHpNMjEzLjMzMzMzMyA4NjRhNzQuNjY2NjY3IDc0LjY2NjY2NyAwIDAgMS03NC42NjY2NjYtNzQuNjY2NjY3aC02NEExMzguNjY2NjY3IDEzOC42NjY2NjcgMCAwIDAgMjEzLjMzMzMzMyA5Mjh2LTY0ek0yNDUuMzMzMzMzIDY4Mi42NjY2Njd2LTIzNC42NjY2NjdoLTY0VjY4Mi42NjY2NjdoNjR6IG0tNTQuNjEzMzMzLTIxMi4wNTMzMzRsODUuMzMzMzMzIDg1LjMzMzMzNCA0NS4yMjY2NjctNDUuMjI2NjY3LTg1LjMzMzMzMy04NS4zMzMzMzMtNDUuMjI2NjY3IDQ1LjIyNjY2NnogbTAtNDUuMjI2NjY2bC04NS4zMzMzMzMgODUuMzMzMzMzIDQ1LjIyNjY2NiA0NS4yMjY2NjcgODUuMzMzMzM0LTg1LjMzMzMzNC00NS4yMjY2NjctNDUuMjI2NjY2eiIgIGZpbGw9IiM0NDRFNjAiPjwvcGF0aD48L3N2Zz4="
|
|
9527
9534
|
};
|
|
9528
9535
|
function Le(r) {
|
|
9529
|
-
return
|
|
9536
|
+
return Sp[r];
|
|
9530
9537
|
}
|
|
9531
|
-
const
|
|
9538
|
+
const kp = (r) => {
|
|
9532
9539
|
const { workIds: n, mananger: e } = r;
|
|
9533
9540
|
return /* @__PURE__ */ m.createElement(
|
|
9534
9541
|
"div",
|
|
@@ -9548,7 +9555,7 @@ const Sp = (r) => {
|
|
|
9548
9555
|
},
|
|
9549
9556
|
/* @__PURE__ */ m.createElement("img", { alt: "icon", src: Le("delete") })
|
|
9550
9557
|
);
|
|
9551
|
-
},
|
|
9558
|
+
}, xp = (r) => {
|
|
9552
9559
|
const { workIds: n, viewId: e } = r;
|
|
9553
9560
|
return /* @__PURE__ */ m.createElement(
|
|
9554
9561
|
"div",
|
|
@@ -9567,7 +9574,7 @@ const Sp = (r) => {
|
|
|
9567
9574
|
}, Yi = (r) => {
|
|
9568
9575
|
const { icon: n, onPointerUpHandler: e } = r;
|
|
9569
9576
|
return /* @__PURE__ */ m.createElement("div", { className: "button normal-button", onPointerUp: e }, /* @__PURE__ */ m.createElement("img", { src: Le(n) }));
|
|
9570
|
-
},
|
|
9577
|
+
}, jp = (r) => {
|
|
9571
9578
|
const { open: n, setOpen: e, floatBarRef: t } = r, { floatBarData: i, mananger: o } = Ce(Te), [s, a] = ae([]), c = J(() => {
|
|
9572
9579
|
if (t != null && t.current && ee(i == null ? void 0 : i.y) && (o != null && o.height)) {
|
|
9573
9580
|
if (t.current.offsetTop && t.current.offsetTop + i.y > 180) {
|
|
@@ -9626,7 +9633,7 @@ const Sp = (r) => {
|
|
|
9626
9633
|
);
|
|
9627
9634
|
}, Ut = (r) => {
|
|
9628
9635
|
r.stopPropagation(), r.nativeEvent.stopImmediatePropagation();
|
|
9629
|
-
},
|
|
9636
|
+
}, Dp = () => /* @__PURE__ */ m.createElement(
|
|
9630
9637
|
"svg",
|
|
9631
9638
|
{
|
|
9632
9639
|
style: { marginLeft: "2px" },
|
|
@@ -9641,7 +9648,7 @@ const Sp = (r) => {
|
|
|
9641
9648
|
fill: "#000000"
|
|
9642
9649
|
}
|
|
9643
9650
|
)
|
|
9644
|
-
),
|
|
9651
|
+
), br = (r) => {
|
|
9645
9652
|
const { activeColor: n, onPointerUpHandler: e } = r;
|
|
9646
9653
|
return /* @__PURE__ */ m.createElement(
|
|
9647
9654
|
"div",
|
|
@@ -9663,7 +9670,7 @@ const Sp = (r) => {
|
|
|
9663
9670
|
"div",
|
|
9664
9671
|
{
|
|
9665
9672
|
className: "circle",
|
|
9666
|
-
style: { backgroundColor:
|
|
9673
|
+
style: { backgroundColor: be(n, 1) }
|
|
9667
9674
|
}
|
|
9668
9675
|
)
|
|
9669
9676
|
);
|
|
@@ -9701,7 +9708,7 @@ const Sp = (r) => {
|
|
|
9701
9708
|
{
|
|
9702
9709
|
className: "range-color",
|
|
9703
9710
|
style: {
|
|
9704
|
-
background: `linear-gradient(to right, ${
|
|
9711
|
+
background: `linear-gradient(to right, ${be(e, 0)}, ${be(e, 1)})`
|
|
9705
9712
|
}
|
|
9706
9713
|
}
|
|
9707
9714
|
),
|
|
@@ -9720,14 +9727,14 @@ const Sp = (r) => {
|
|
|
9720
9727
|
{
|
|
9721
9728
|
className: "circle",
|
|
9722
9729
|
style: {
|
|
9723
|
-
backgroundColor:
|
|
9730
|
+
backgroundColor: be(e, n)
|
|
9724
9731
|
},
|
|
9725
9732
|
onPointerUp: Ut
|
|
9726
9733
|
}
|
|
9727
9734
|
)
|
|
9728
9735
|
))
|
|
9729
9736
|
);
|
|
9730
|
-
},
|
|
9737
|
+
}, zp = (r) => {
|
|
9731
9738
|
const { min: n, max: e, activeNumber: t, setActiveNumber: i, color: o } = r, [s, a] = ae({ x: 108, y: 0 }), c = xe(0);
|
|
9732
9739
|
if (ge(() => {
|
|
9733
9740
|
const M = Math.ceil((t - n) / (e - n) * 100) + 8;
|
|
@@ -9791,7 +9798,7 @@ const Sp = (r) => {
|
|
|
9791
9798
|
)
|
|
9792
9799
|
))
|
|
9793
9800
|
);
|
|
9794
|
-
},
|
|
9801
|
+
}, Ap = (r) => {
|
|
9795
9802
|
const { useStroke: n, color: e, activeStrokeType: t, setStrokeType: i } = r;
|
|
9796
9803
|
return /* @__PURE__ */ m.createElement("div", { className: "stroke-type-box" }, !!n && /* @__PURE__ */ m.createElement(
|
|
9797
9804
|
"div",
|
|
@@ -9856,7 +9863,7 @@ const Sp = (r) => {
|
|
|
9856
9863
|
activeColor: c,
|
|
9857
9864
|
setCurOpacity: (f, N, S) => {
|
|
9858
9865
|
u(f);
|
|
9859
|
-
const C =
|
|
9866
|
+
const C = be(N, f);
|
|
9860
9867
|
i != null && i.strokeColor && a({ strokeColor: C }), re.emitMethod(
|
|
9861
9868
|
te.MainEngine,
|
|
9862
9869
|
W.SetColorNode,
|
|
@@ -9876,7 +9883,7 @@ const Sp = (r) => {
|
|
|
9876
9883
|
s == null ? void 0 : s.viewId,
|
|
9877
9884
|
a
|
|
9878
9885
|
]), d = J(() => c && i && i.thickness ? /* @__PURE__ */ m.createElement(
|
|
9879
|
-
|
|
9886
|
+
zp,
|
|
9880
9887
|
{
|
|
9881
9888
|
key: "strokeThickness",
|
|
9882
9889
|
min: Math.min(
|
|
@@ -9910,7 +9917,7 @@ const Sp = (r) => {
|
|
|
9910
9917
|
s == null ? void 0 : s.viewId,
|
|
9911
9918
|
a
|
|
9912
9919
|
]), y = J(() => c && i && (i != null && i.strokeType) ? /* @__PURE__ */ m.createElement(
|
|
9913
|
-
|
|
9920
|
+
Ap,
|
|
9914
9921
|
{
|
|
9915
9922
|
key: "strokeType",
|
|
9916
9923
|
useStroke: i == null ? void 0 : i.useStroke,
|
|
@@ -9951,7 +9958,7 @@ const Sp = (r) => {
|
|
|
9951
9958
|
activeColor: c,
|
|
9952
9959
|
onPointerUpHandler: (C) => {
|
|
9953
9960
|
C.stopPropagation(), l(S);
|
|
9954
|
-
const k =
|
|
9961
|
+
const k = be(S, h);
|
|
9955
9962
|
i != null && i.strokeColor && (i.strokeColor = k, a({ strokeColor: k })), re.emitMethod(
|
|
9956
9963
|
te.MainEngine,
|
|
9957
9964
|
W.SetColorNode,
|
|
@@ -9983,7 +9990,7 @@ const Sp = (r) => {
|
|
|
9983
9990
|
"div",
|
|
9984
9991
|
{
|
|
9985
9992
|
className: "color-bar-ring",
|
|
9986
|
-
style: { backgroundColor:
|
|
9993
|
+
style: { backgroundColor: be(c, h) }
|
|
9987
9994
|
},
|
|
9988
9995
|
/* @__PURE__ */ m.createElement("div", { className: "circle" })
|
|
9989
9996
|
) : null, [c, h]);
|
|
@@ -9998,7 +10005,7 @@ const Sp = (r) => {
|
|
|
9998
10005
|
p,
|
|
9999
10006
|
w
|
|
10000
10007
|
);
|
|
10001
|
-
},
|
|
10008
|
+
}, Ep = (r) => {
|
|
10002
10009
|
const { open: n, setOpen: e, floatBarRef: t } = r, { floatBarData: i, floatBarColors: o, mananger: s, setFloatBarData: a } = Ce(Te), [c, l] = ae(), [h, u] = ae(1);
|
|
10003
10010
|
ge(() => {
|
|
10004
10011
|
if (i != null && i.fillColor) {
|
|
@@ -10024,13 +10031,13 @@ const Sp = (r) => {
|
|
|
10024
10031
|
activeColor: c,
|
|
10025
10032
|
setCurOpacity: (w, p, f) => {
|
|
10026
10033
|
u(w);
|
|
10027
|
-
const N =
|
|
10034
|
+
const N = be(p, w);
|
|
10028
10035
|
i != null && i.fillColor && (i.fillColor = N, a({ fillColor: N })), re.emitMethod(
|
|
10029
10036
|
te.MainEngine,
|
|
10030
10037
|
W.SetColorNode,
|
|
10031
10038
|
{
|
|
10032
10039
|
workIds: [$],
|
|
10033
|
-
fillColor: c &&
|
|
10040
|
+
fillColor: c && be(p, w),
|
|
10034
10041
|
workState: f,
|
|
10035
10042
|
viewId: s == null ? void 0 : s.viewId
|
|
10036
10043
|
}
|
|
@@ -10047,7 +10054,7 @@ const Sp = (r) => {
|
|
|
10047
10054
|
}
|
|
10048
10055
|
},
|
|
10049
10056
|
/* @__PURE__ */ m.createElement(
|
|
10050
|
-
|
|
10057
|
+
br,
|
|
10051
10058
|
{
|
|
10052
10059
|
activeColor: c,
|
|
10053
10060
|
onPointerUpHandler: (w) => {
|
|
@@ -10076,7 +10083,7 @@ const Sp = (r) => {
|
|
|
10076
10083
|
activeColor: c,
|
|
10077
10084
|
onPointerUpHandler: (N) => {
|
|
10078
10085
|
N.cancelable && N.preventDefault(), N.stopPropagation(), l(f);
|
|
10079
|
-
const S =
|
|
10086
|
+
const S = be(f, h);
|
|
10080
10087
|
i != null && i.fillColor && (i.fillColor = S, a({ fillColor: S })), re.emitMethod(
|
|
10081
10088
|
te.MainEngine,
|
|
10082
10089
|
W.SetColorNode,
|
|
@@ -10103,7 +10110,7 @@ const Sp = (r) => {
|
|
|
10103
10110
|
a,
|
|
10104
10111
|
h
|
|
10105
10112
|
]), y = J(() => {
|
|
10106
|
-
const w = c && c !== "transparent" &&
|
|
10113
|
+
const w = c && c !== "transparent" && be(c, h) || "transparent";
|
|
10107
10114
|
return /* @__PURE__ */ m.createElement("div", { className: "color-bar-fill" }, /* @__PURE__ */ m.createElement("div", { className: "circle", style: { backgroundColor: w } }));
|
|
10108
10115
|
}, [c, h]);
|
|
10109
10116
|
return /* @__PURE__ */ m.createElement(
|
|
@@ -10117,7 +10124,7 @@ const Sp = (r) => {
|
|
|
10117
10124
|
y,
|
|
10118
10125
|
d
|
|
10119
10126
|
);
|
|
10120
|
-
},
|
|
10127
|
+
}, Lp = (r) => {
|
|
10121
10128
|
const {
|
|
10122
10129
|
open: n,
|
|
10123
10130
|
setOpen: e,
|
|
@@ -10149,7 +10156,7 @@ const Sp = (r) => {
|
|
|
10149
10156
|
activeColor: h,
|
|
10150
10157
|
setCurOpacity: (f, N, S) => {
|
|
10151
10158
|
M(f);
|
|
10152
|
-
const C =
|
|
10159
|
+
const C = be(N, f);
|
|
10153
10160
|
l != null && l.textOpt && (l.textOpt.fontColor = C, c({ textOpt: l.textOpt })), re.emitMethod(
|
|
10154
10161
|
te.MainEngine,
|
|
10155
10162
|
W.SetColorNode,
|
|
@@ -10189,7 +10196,7 @@ const Sp = (r) => {
|
|
|
10189
10196
|
activeColor: h,
|
|
10190
10197
|
onPointerUpHandler: (C) => {
|
|
10191
10198
|
C.stopPropagation(), u(S);
|
|
10192
|
-
const k =
|
|
10199
|
+
const k = be(S, g);
|
|
10193
10200
|
l != null && l.textOpt && (l.textOpt.fontColor = k, c({ textOpt: l.textOpt })), re.emitMethod(
|
|
10194
10201
|
te.MainEngine,
|
|
10195
10202
|
W.SetColorNode,
|
|
@@ -10217,7 +10224,7 @@ const Sp = (r) => {
|
|
|
10217
10224
|
a == null ? void 0 : a.viewId,
|
|
10218
10225
|
d
|
|
10219
10226
|
]), p = J(() => {
|
|
10220
|
-
const f = h && h !== "transparent" &&
|
|
10227
|
+
const f = h && h !== "transparent" && be(h, g) || "transparent";
|
|
10221
10228
|
return /* @__PURE__ */ m.createElement("div", { className: "color-bar" }, /* @__PURE__ */ m.createElement("div", { className: "color-bar-color", style: { backgroundColor: f } }));
|
|
10222
10229
|
}, [h, g]);
|
|
10223
10230
|
return /* @__PURE__ */ m.createElement(
|
|
@@ -10232,7 +10239,7 @@ const Sp = (r) => {
|
|
|
10232
10239
|
p,
|
|
10233
10240
|
w
|
|
10234
10241
|
);
|
|
10235
|
-
},
|
|
10242
|
+
}, Pp = (r) => {
|
|
10236
10243
|
const {
|
|
10237
10244
|
open: n,
|
|
10238
10245
|
setOpen: e,
|
|
@@ -10264,13 +10271,13 @@ const Sp = (r) => {
|
|
|
10264
10271
|
activeColor: h,
|
|
10265
10272
|
setCurOpacity: (f, N, S) => {
|
|
10266
10273
|
M(f);
|
|
10267
|
-
const C =
|
|
10274
|
+
const C = be(N, f);
|
|
10268
10275
|
l != null && l.textOpt && (l.textOpt.fontBgColor = C, c({ textOpt: l.textOpt })), re.emitMethod(
|
|
10269
10276
|
te.MainEngine,
|
|
10270
10277
|
W.SetColorNode,
|
|
10271
10278
|
{
|
|
10272
10279
|
workIds: i || [$],
|
|
10273
|
-
fontBgColor: h &&
|
|
10280
|
+
fontBgColor: h && be(N, f),
|
|
10274
10281
|
workState: S,
|
|
10275
10282
|
viewId: a == null ? void 0 : a.viewId
|
|
10276
10283
|
}
|
|
@@ -10294,7 +10301,7 @@ const Sp = (r) => {
|
|
|
10294
10301
|
}
|
|
10295
10302
|
},
|
|
10296
10303
|
/* @__PURE__ */ m.createElement(
|
|
10297
|
-
|
|
10304
|
+
br,
|
|
10298
10305
|
{
|
|
10299
10306
|
activeColor: h,
|
|
10300
10307
|
onPointerUpHandler: (f) => {
|
|
@@ -10323,14 +10330,14 @@ const Sp = (r) => {
|
|
|
10323
10330
|
activeColor: h,
|
|
10324
10331
|
onPointerUpHandler: (C) => {
|
|
10325
10332
|
C.stopPropagation(), u(S);
|
|
10326
|
-
const k =
|
|
10333
|
+
const k = be(S, g);
|
|
10327
10334
|
l != null && l.textOpt && (l.textOpt.fontBgColor = k, c({ textOpt: l.textOpt })), re.emitMethod(
|
|
10328
10335
|
te.MainEngine,
|
|
10329
10336
|
W.SetColorNode,
|
|
10330
10337
|
{
|
|
10331
10338
|
workIds: i || [$],
|
|
10332
10339
|
workState: x.Done,
|
|
10333
|
-
fontBgColor:
|
|
10340
|
+
fontBgColor: be(S, g),
|
|
10334
10341
|
viewId: a == null ? void 0 : a.viewId
|
|
10335
10342
|
}
|
|
10336
10343
|
);
|
|
@@ -10351,7 +10358,7 @@ const Sp = (r) => {
|
|
|
10351
10358
|
a == null ? void 0 : a.viewId,
|
|
10352
10359
|
d
|
|
10353
10360
|
]), p = J(() => {
|
|
10354
|
-
const f = h && h !== "transparent" &&
|
|
10361
|
+
const f = h && h !== "transparent" && be(h, g) || "transparent";
|
|
10355
10362
|
return /* @__PURE__ */ m.createElement("div", { className: "color-bar", style: { marginTop: 0 } }, /* @__PURE__ */ m.createElement("div", { className: "color-bar-color", style: { backgroundColor: f } }));
|
|
10356
10363
|
}, [h, g]);
|
|
10357
10364
|
return /* @__PURE__ */ m.createElement(
|
|
@@ -10362,11 +10369,11 @@ const Sp = (r) => {
|
|
|
10362
10369
|
f.stopPropagation(), f.nativeEvent.stopImmediatePropagation(), e(!n);
|
|
10363
10370
|
}
|
|
10364
10371
|
},
|
|
10365
|
-
/* @__PURE__ */ m.createElement(
|
|
10372
|
+
/* @__PURE__ */ m.createElement(Dp, null),
|
|
10366
10373
|
p,
|
|
10367
10374
|
w
|
|
10368
10375
|
);
|
|
10369
|
-
},
|
|
10376
|
+
}, Op = (r) => {
|
|
10370
10377
|
const { bold: n, setBold: e, workIds: t, viewId: i } = r, o = (s) => {
|
|
10371
10378
|
const a = n === "bold" ? "normal" : "bold";
|
|
10372
10379
|
s == null || s.stopPropagation(), e(a), re.emitMethod(
|
|
@@ -10376,7 +10383,7 @@ const Sp = (r) => {
|
|
|
10376
10383
|
);
|
|
10377
10384
|
};
|
|
10378
10385
|
return /* @__PURE__ */ m.createElement("div", { className: "font-style-button", onPointerUp: o }, /* @__PURE__ */ m.createElement("img", { alt: "icon", src: Le(n === "bold" ? "bold-active" : "bold") }));
|
|
10379
|
-
},
|
|
10386
|
+
}, Rp = (r) => {
|
|
10380
10387
|
const { underline: n, setUnderline: e, workIds: t, viewId: i } = r, o = (s) => {
|
|
10381
10388
|
const a = !n;
|
|
10382
10389
|
s == null || s.stopPropagation(), e(a), re.emitMethod(
|
|
@@ -10392,7 +10399,7 @@ const Sp = (r) => {
|
|
|
10392
10399
|
src: Le(n ? "underline-active" : "underline")
|
|
10393
10400
|
}
|
|
10394
10401
|
));
|
|
10395
|
-
},
|
|
10402
|
+
}, Yp = (r) => {
|
|
10396
10403
|
const { lineThrough: n, setLineThrough: e, workIds: t, viewId: i } = r, o = (s) => {
|
|
10397
10404
|
const a = !n;
|
|
10398
10405
|
s == null || s.stopPropagation(), e(a), re.emitMethod(
|
|
@@ -10408,7 +10415,7 @@ const Sp = (r) => {
|
|
|
10408
10415
|
src: Le(n ? "line-through-active" : "line-through")
|
|
10409
10416
|
}
|
|
10410
10417
|
));
|
|
10411
|
-
},
|
|
10418
|
+
}, Up = (r) => {
|
|
10412
10419
|
const { italic: n, setItalic: e, workIds: t, viewId: i } = r, o = (s) => {
|
|
10413
10420
|
const a = n === "italic" ? "normal" : "italic";
|
|
10414
10421
|
s == null || s.stopPropagation(), e(a), re.emitMethod(
|
|
@@ -10424,7 +10431,7 @@ const Sp = (r) => {
|
|
|
10424
10431
|
src: Le(n === "italic" ? "italic-active" : "italic")
|
|
10425
10432
|
}
|
|
10426
10433
|
));
|
|
10427
|
-
},
|
|
10434
|
+
}, Bp = (r) => {
|
|
10428
10435
|
const {
|
|
10429
10436
|
open: n,
|
|
10430
10437
|
setOpen: e,
|
|
@@ -10456,7 +10463,7 @@ const Sp = (r) => {
|
|
|
10456
10463
|
}
|
|
10457
10464
|
},
|
|
10458
10465
|
/* @__PURE__ */ m.createElement(
|
|
10459
|
-
|
|
10466
|
+
Op,
|
|
10460
10467
|
{
|
|
10461
10468
|
workIds: i || [$],
|
|
10462
10469
|
bold: l,
|
|
@@ -10465,7 +10472,7 @@ const Sp = (r) => {
|
|
|
10465
10472
|
}
|
|
10466
10473
|
),
|
|
10467
10474
|
/* @__PURE__ */ m.createElement(
|
|
10468
|
-
|
|
10475
|
+
Rp,
|
|
10469
10476
|
{
|
|
10470
10477
|
workIds: i || [$],
|
|
10471
10478
|
underline: M,
|
|
@@ -10474,7 +10481,7 @@ const Sp = (r) => {
|
|
|
10474
10481
|
}
|
|
10475
10482
|
),
|
|
10476
10483
|
/* @__PURE__ */ m.createElement(
|
|
10477
|
-
|
|
10484
|
+
Yp,
|
|
10478
10485
|
{
|
|
10479
10486
|
workIds: i || [$],
|
|
10480
10487
|
lineThrough: y,
|
|
@@ -10483,7 +10490,7 @@ const Sp = (r) => {
|
|
|
10483
10490
|
}
|
|
10484
10491
|
),
|
|
10485
10492
|
/* @__PURE__ */ m.createElement(
|
|
10486
|
-
|
|
10493
|
+
Up,
|
|
10487
10494
|
{
|
|
10488
10495
|
workIds: i || [$],
|
|
10489
10496
|
italic: u,
|
|
@@ -10518,7 +10525,7 @@ const Sp = (r) => {
|
|
|
10518
10525
|
),
|
|
10519
10526
|
f
|
|
10520
10527
|
);
|
|
10521
|
-
},
|
|
10528
|
+
}, qe = Object.freeze([
|
|
10522
10529
|
12,
|
|
10523
10530
|
14,
|
|
10524
10531
|
18,
|
|
@@ -10542,7 +10549,7 @@ const Sp = (r) => {
|
|
|
10542
10549
|
"right",
|
|
10543
10550
|
"rightTop",
|
|
10544
10551
|
"rightBottom"
|
|
10545
|
-
],
|
|
10552
|
+
], Wp = /* @__PURE__ */ new Map([
|
|
10546
10553
|
[
|
|
10547
10554
|
"selector",
|
|
10548
10555
|
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKeSURBVHgB3VTLi1JhFD86zlQ4ysxSXAy1GWYZzMxmYAhHagRB/QN8FLqPFq4FIQhXkS6kTQ4t2ilIKEWgSS0SmVpIm0BdaBJSaOP78XU+PXey6+saburAD+73uL/feX0H4H81GQdj7D7ilrCGFRonk3c6nXvhcJiFQiGWy+Xy/X7/WbPZ1K1KkBOsl0qlO36/n+3t7Q1hs9kYF+WC3W73MTpxc1lBmej7KuJaoVDInZ6eqsWXDw4OwGKxwPHx8Se1Wn1Wr9cjW1tbOTxi9D9bJCJHXEFslsvlR263+246nYZZptPpQK/Xg8lkSvZ6vbNGo5EgQRCLiSPhIqpoNHobo3keCARgkalUKjg5ORlGuL+/n8T6PVAqlefjYmKRdYQSsZ3P5z8aDAYVLGFarRbi8fhbhUKhx2VPEJGP3eEbfTrs4MUwr4EU49FYrVbweDy1SqXyipy95FaI7g8QXS6SyWReHx4e2ubVBc+HtTk6OjqvVqtvvF7vi0gkUiSByyyJ21BGwpswJ2Vmsxlw/0Kj0bxMJBJJl8vFPWkhGogLQoeyMhEJo2jGUzYRjcPh+Op0Oq2pVOoHkXE0SahF/w+E+3KYNEaX2pSyiSiKxeJTFPiGyyriO6FKEUgSESLp4ht4bzQaf4pFYrHYO/ysEXGNyJtjKRqM/zNNhFuf0B7vst3dXdjZ2Yn4fL4vRFwn8jaMGqYPU179LBEGf3bZcNNutwPOtScwKnCLPJ9KLMWEh7mNuIFdVsNXzbBNP+D6Ou1vwAqm8hqMWlmbzWYf4mz6HAwGzbjWwGgqrEklmucJT+UGCfG3wiPjueeNwGvB0zkAid7OMmF8CyOck/I6NJcR4KZYcM6J2vCbUGhvyQIA0gonzCEZkQud9Fcd9W/bL57cJu3lkjuNAAAAAElFTkSuQmCC"
|
|
@@ -10563,7 +10570,7 @@ const Sp = (r) => {
|
|
|
10563
10570
|
"shape",
|
|
10564
10571
|
"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDBweCIgaGVpZ2h0PSI0MHB4IiB2aWV3Qm94PSIwIDAgNDAgNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDYwLjEgKDg4MTMzKSAtIGh0dHBzOi8vc2tldGNoLmNvbSAtLT4KICAgIDx0aXRsZT5zaGFwZS1jdXJzb3I8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz4KICAgICAgICA8cGF0aCBkPSJNMjAsMjEuNSBDMjAuMjQ1NDU5OSwyMS41IDIwLjQ0OTYwODQsMjEuNjc2ODc1MiAyMC40OTE5NDQzLDIxLjkxMDEyNDQgTDIwLjUsMjIgTDIwLjUsMjcgQzIwLjUsMjcuMjc2MTQyNCAyMC4yNzYxNDI0LDI3LjUgMjAsMjcuNSBDMTkuNzU0NTQwMSwyNy41IDE5LjU1MDM5MTYsMjcuMzIzMTI0OCAxOS41MDgwNTU3LDI3LjA4OTg3NTYgTDE5LjUsMjcgTDE5LjUsMjIgQzE5LjUsMjEuNzIzODU3NiAxOS43MjM4NTc2LDIxLjUgMjAsMjEuNSBaIE0yNywxOS41IEMyNy4yNzYxNDI0LDE5LjUgMjcuNSwxOS43MjM4NTc2IDI3LjUsMjAgQzI3LjUsMjAuMjQ1NDU5OSAyNy4zMjMxMjQ4LDIwLjQ0OTYwODQgMjcuMDg5ODc1NiwyMC40OTE5NDQzIEwyNywyMC41IEwyMiwyMC41IEMyMS43MjM4NTc2LDIwLjUgMjEuNSwyMC4yNzYxNDI0IDIxLjUsMjAgQzIxLjUsMTkuNzU0NTQwMSAyMS42NzY4NzUyLDE5LjU1MDM5MTYgMjEuOTEwMTI0NCwxOS41MDgwNTU3IEwyMiwxOS41IEwyNywxOS41IFogTTE4LDE5LjUgQzE4LjI3NjE0MjQsMTkuNSAxOC41LDE5LjcyMzg1NzYgMTguNSwyMCBDMTguNSwyMC4yNDU0NTk5IDE4LjMyMzEyNDgsMjAuNDQ5NjA4NCAxOC4wODk4NzU2LDIwLjQ5MTk0NDMgTDE4LDIwLjUgTDEzLDIwLjUgQzEyLjcyMzg1NzYsMjAuNSAxMi41LDIwLjI3NjE0MjQgMTIuNSwyMCBDMTIuNSwxOS43NTQ1NDAxIDEyLjY3Njg3NTIsMTkuNTUwMzkxNiAxMi45MTAxMjQ0LDE5LjUwODA1NTcgTDEzLDE5LjUgTDE4LDE5LjUgWiBNMjAsMTIuNSBDMjAuMjQ1NDU5OSwxMi41IDIwLjQ0OTYwODQsMTIuNjc2ODc1MiAyMC40OTE5NDQzLDEyLjkxMDEyNDQgTDIwLjUsMTMgTDIwLjUsMTggQzIwLjUsMTguMjc2MTQyNCAyMC4yNzYxNDI0LDE4LjUgMjAsMTguNSBDMTkuNzU0NTQwMSwxOC41IDE5LjU1MDM5MTYsMTguMzIzMTI0OCAxOS41MDgwNTU3LDE4LjA4OTg3NTYgTDE5LjUsMTggTDE5LjUsMTMgQzE5LjUsMTIuNzIzODU3NiAxOS43MjM4NTc2LDEyLjUgMjAsMTIuNSBaIiBpZD0icGF0aC0xIj48L3BhdGg+CiAgICAgICAgPGZpbHRlciB4PSItNjQuNiUiIHk9Ii01OS41JSIgd2lkdGg9IjIyOS4zJSIgaGVpZ2h0PSIyNDYuMSUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9ImZpbHRlci0yIj4KICAgICAgICAgICAgPGZlTW9ycGhvbG9neSByYWRpdXM9IjEiIG9wZXJhdG9yPSJkaWxhdGUiIGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJzaGFkb3dTcHJlYWRPdXRlcjEiPjwvZmVNb3JwaG9sb2d5PgogICAgICAgICAgICA8ZmVPZmZzZXQgZHg9IjAiIGR5PSIyIiBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSI+PC9mZU9mZnNldD4KICAgICAgICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIgaW49InNoYWRvd09mZnNldE91dGVyMSIgcmVzdWx0PSJzaGFkb3dCbHVyT3V0ZXIxIj48L2ZlR2F1c3NpYW5CbHVyPgogICAgICAgICAgICA8ZmVDb21wb3NpdGUgaW49InNoYWRvd0JsdXJPdXRlcjEiIGluMj0iU291cmNlQWxwaGEiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSI+PC9mZUNvbXBvc2l0ZT4KICAgICAgICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgICAwIDAgMCAwIDAgICAwIDAgMCAwIDAgIDAgMCAwIDAuMTYgMCIgdHlwZT0ibWF0cml4IiBpbj0ic2hhZG93Qmx1ck91dGVyMSI+PC9mZUNvbG9yTWF0cml4PgogICAgICAgIDwvZmlsdGVyPgogICAgPC9kZWZzPgogICAgPGcgaWQ9Iumhtemdoi00IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iV2hpdGVib2FyZC1HdWlkZWxpbmVzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzQ0LjAwMDAwMCwgLTc1MS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9InNoYXBlLWN1cnNvciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzQ0LjAwMDAwMCwgNzUxLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9ouWkh+S7vS00NCIgZmlsbD0iI0ZGRkZGRiIgb3BhY2l0eT0iMC4wMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiByeD0iMiI+PC9yZWN0PgogICAgICAgICAgICAgICAgPGcgaWQ9IuW9oueKtue7k+WQiCIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgICAgICAgICA8dXNlIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjEiIGZpbHRlcj0idXJsKCNmaWx0ZXItMikiIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIHN0cm9rZT0iI0ZGRkZGRiIgc3Ryb2tlLXdpZHRoPSIxIiBkPSJNMjAsMjEgQzIwLjQ4NTQxMDMsMjEgMjAuODk4MDg1LDIxLjM0Nzk5OTMgMjAuOTg5OTQ3OSwyMS44NjU0ODc3IEwyMSwyMiBMMjEsMjcgQzIxLDI3LjU1MjI4NDcgMjAuNTUyMjg0NywyOCAyMCwyOCBDMTkuNTE0NTg5NywyOCAxOS4xMDE5MTUsMjcuNjUyMDAwNyAxOS4wMTAwNTIxLDI3LjEzNDUxMjMgTDE5LDI3IEwxOSwyMiBDMTksMjEuNDQ3NzE1MyAxOS40NDc3MTUzLDIxIDIwLDIxIFogTTI3LDE5IEMyNy41NTIyODQ3LDE5IDI4LDE5LjQ0NzcxNTMgMjgsMjAgQzI4LDIwLjQ4NTQxMDMgMjcuNjUyMDAwNywyMC44OTgwODUgMjcuMTM0NTEyMywyMC45ODk5NDc5IEwyNywyMSBMMjIsMjEgQzIxLjQ0NzcxNTMsMjEgMjEsMjAuNTUyMjg0NyAyMSwyMCBDMjEsMTkuNTE0NTg5NyAyMS4zNDc5OTkzLDE5LjEwMTkxNSAyMS44NjU0ODc3LDE5LjAxMDA1MjEgTDIyLDE5IEwyNywxOSBaIE0xOCwxOSBDMTguNTUyMjg0NywxOSAxOSwxOS40NDc3MTUzIDE5LDIwIEMxOSwyMC40ODU0MTAzIDE4LjY1MjAwMDcsMjAuODk4MDg1IDE4LjEzNDUxMjMsMjAuOTg5OTQ3OSBMMTgsMjEgTDEzLDIxIEMxMi40NDc3MTUzLDIxIDEyLDIwLjU1MjI4NDcgMTIsMjAgQzEyLDE5LjUxNDU4OTcgMTIuMzQ3OTk5MywxOS4xMDE5MTUgMTIuODY1NDg3NywxOS4wMTAwNTIxIEwxMywxOSBMMTgsMTkgWiBNMjAsMTIgQzIwLjQ4NTQxMDMsMTIgMjAuODk4MDg1LDEyLjM0Nzk5OTMgMjAuOTg5OTQ3OSwxMi44NjU0ODc3IEwyMSwxMyBMMjEsMTggQzIxLDE4LjU1MjI4NDcgMjAuNTUyMjg0NywxOSAyMCwxOSBDMTkuNTE0NTg5NywxOSAxOS4xMDE5MTUsMTguNjUyMDAwNyAxOS4wMTAwNTIxLDE4LjEzNDUxMjMgTDE5LDE4IEwxOSwxMyBDMTksMTIuNDQ3NzE1MyAxOS40NDc3MTUzLDEyIDIwLDEyIFoiIGZpbGw9IiMyMTIzMjQiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PC9wYXRoPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgZmlsbD0iI0ZGRkZGRiIgeD0iMTguNSIgeT0iMTciIHdpZHRoPSIzIiBoZWlnaHQ9IjYiPjwvcmVjdD4KICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIGZpbGw9IiNGRkZGRkYiIHg9IjE3IiB5PSIxOC41IiB3aWR0aD0iNiIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjAsMjEuNSBDMjAuMjQ1NDU5OSwyMS41IDIwLjQ0OTYwODQsMjEuNjc2ODc1MiAyMC40OTE5NDQzLDIxLjkxMDEyNDQgTDIwLjUsMjIgTDIwLjUsMjcgQzIwLjUsMjcuMjc2MTQyNCAyMC4yNzYxNDI0LDI3LjUgMjAsMjcuNSBDMTkuNzU0NTQwMSwyNy41IDE5LjU1MDM5MTYsMjcuMzIzMTI0OCAxOS41MDgwNTU3LDI3LjA4OTg3NTYgTDE5LjUsMjcgTDE5LjUsMjIgQzE5LjUsMjEuNzIzODU3NiAxOS43MjM4NTc2LDIxLjUgMjAsMjEuNSBaIE0yNywxOS41IEMyNy4yNzYxNDI0LDE5LjUgMjcuNSwxOS43MjM4NTc2IDI3LjUsMjAgQzI3LjUsMjAuMjQ1NDU5OSAyNy4zMjMxMjQ4LDIwLjQ0OTYwODQgMjcuMDg5ODc1NiwyMC40OTE5NDQzIEwyNywyMC41IEwyMiwyMC41IEMyMS43MjM4NTc2LDIwLjUgMjEuNSwyMC4yNzYxNDI0IDIxLjUsMjAgQzIxLjUsMTkuNzU0NTQwMSAyMS42NzY4NzUyLDE5LjU1MDM5MTYgMjEuOTEwMTI0NCwxOS41MDgwNTU3IEwyMiwxOS41IEwyNywxOS41IFogTTE4LDE5LjUgQzE4LjI3NjE0MjQsMTkuNSAxOC41LDE5LjcyMzg1NzYgMTguNSwyMCBDMTguNSwyMC4yNDU0NTk5IDE4LjMyMzEyNDgsMjAuNDQ5NjA4NCAxOC4wODk4NzU2LDIwLjQ5MTk0NDMgTDE4LDIwLjUgTDEzLDIwLjUgQzEyLjcyMzg1NzYsMjAuNSAxMi41LDIwLjI3NjE0MjQgMTIuNSwyMCBDMTIuNSwxOS43NTQ1NDAxIDEyLjY3Njg3NTIsMTkuNTUwMzkxNiAxMi45MTAxMjQ0LDE5LjUwODA1NTcgTDEzLDE5LjUgTDE4LDE5LjUgWiBNMjAsMTIuNSBDMjAuMjQ1NDU5OSwxMi41IDIwLjQ0OTYwODQsMTIuNjc2ODc1MiAyMC40OTE5NDQzLDEyLjkxMDEyNDQgTDIwLjUsMTMgTDIwLjUsMTggQzIwLjUsMTguMjc2MTQyNCAyMC4yNzYxNDI0LDE4LjUgMjAsMTguNSBDMTkuNzU0NTQwMSwxOC41IDE5LjU1MDM5MTYsMTguMzIzMTI0OCAxOS41MDgwNTU3LDE4LjA4OTg3NTYgTDE5LjUsMTggTDE5LjUsMTMgQzE5LjUsMTIuNzIzODU3NiAxOS43MjM4NTc2LDEyLjUgMjAsMTIuNSBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjMjEyMzI0IiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"
|
|
10565
10572
|
]
|
|
10566
|
-
]),
|
|
10573
|
+
]), Fp = (r) => {
|
|
10567
10574
|
const { style: n, onClickHandler: e } = r;
|
|
10568
10575
|
return /* @__PURE__ */ m.createElement(
|
|
10569
10576
|
"div",
|
|
@@ -10574,7 +10581,7 @@ const Sp = (r) => {
|
|
|
10574
10581
|
t.stopPropagation(), t.nativeEvent.stopImmediatePropagation();
|
|
10575
10582
|
}
|
|
10576
10583
|
},
|
|
10577
|
-
|
|
10584
|
+
qe.map((t) => /* @__PURE__ */ m.createElement(
|
|
10578
10585
|
"div",
|
|
10579
10586
|
{
|
|
10580
10587
|
className: "font-size-btn",
|
|
@@ -10586,14 +10593,14 @@ const Sp = (r) => {
|
|
|
10586
10593
|
t
|
|
10587
10594
|
))
|
|
10588
10595
|
);
|
|
10589
|
-
},
|
|
10596
|
+
}, Vp = (r) => {
|
|
10590
10597
|
const n = xe(null), {
|
|
10591
10598
|
open: e,
|
|
10592
10599
|
setOpen: t,
|
|
10593
10600
|
textOpt: i,
|
|
10594
10601
|
workIds: o,
|
|
10595
10602
|
floatBarRef: s
|
|
10596
|
-
} = r, { mananger: a, floatBarData: c } = Ce(Te), [l, h] = ae(0), u =
|
|
10603
|
+
} = r, { mananger: a, floatBarData: c } = Ce(Te), [l, h] = ae(0), u = qe.length - 1;
|
|
10597
10604
|
ge(() => {
|
|
10598
10605
|
i != null && i.fontSize && (h(i.fontSize), n.current && (n.current.value = i.fontSize.toString()));
|
|
10599
10606
|
}, [i == null ? void 0 : i.fontSize]);
|
|
@@ -10609,7 +10616,7 @@ const Sp = (r) => {
|
|
|
10609
10616
|
}
|
|
10610
10617
|
}, [s == null ? void 0 : s.current, c, a]);
|
|
10611
10618
|
function M(p) {
|
|
10612
|
-
h(p), p && p >=
|
|
10619
|
+
h(p), p && p >= qe[0] && p <= qe[u] && re.emitMethod(
|
|
10613
10620
|
te.MainEngine,
|
|
10614
10621
|
W.SetFontStyle,
|
|
10615
10622
|
{
|
|
@@ -10622,8 +10629,8 @@ const Sp = (r) => {
|
|
|
10622
10629
|
const d = (p) => {
|
|
10623
10630
|
var f;
|
|
10624
10631
|
(f = n.current) == null || f.blur(), t(!1), w(p);
|
|
10625
|
-
}, y = J(() => e ? /* @__PURE__ */ m.createElement(
|
|
10626
|
-
p >
|
|
10632
|
+
}, y = J(() => e ? /* @__PURE__ */ m.createElement(Fp, { onClickHandler: d, style: g }) : null, [e, d, g]), w = (p) => {
|
|
10633
|
+
p > qe[u] && (p = qe[u]), p < qe[0] && (p = qe[0]), M(p);
|
|
10627
10634
|
};
|
|
10628
10635
|
return /* @__PURE__ */ m.createElement(
|
|
10629
10636
|
"div",
|
|
@@ -10667,7 +10674,7 @@ const Sp = (r) => {
|
|
|
10667
10674
|
{
|
|
10668
10675
|
className: "font-size-add",
|
|
10669
10676
|
onPointerUp: () => {
|
|
10670
|
-
w(l +
|
|
10677
|
+
w(l + qe[0]);
|
|
10671
10678
|
}
|
|
10672
10679
|
}
|
|
10673
10680
|
), /* @__PURE__ */ m.createElement(
|
|
@@ -10675,13 +10682,13 @@ const Sp = (r) => {
|
|
|
10675
10682
|
{
|
|
10676
10683
|
className: "font-size-cut",
|
|
10677
10684
|
onPointerUp: () => {
|
|
10678
|
-
w(l -
|
|
10685
|
+
w(l - qe[0]);
|
|
10679
10686
|
}
|
|
10680
10687
|
}
|
|
10681
10688
|
)),
|
|
10682
10689
|
y
|
|
10683
10690
|
);
|
|
10684
|
-
},
|
|
10691
|
+
}, Qp = (r) => {
|
|
10685
10692
|
const { workIds: n, mananger: e, islocked: t } = r;
|
|
10686
10693
|
return /* @__PURE__ */ m.createElement(
|
|
10687
10694
|
"div",
|
|
@@ -10701,7 +10708,7 @@ const Sp = (r) => {
|
|
|
10701
10708
|
},
|
|
10702
10709
|
/* @__PURE__ */ m.createElement("img", { alt: "icon", src: Le(t ? "unlock-new" : "lock-new") })
|
|
10703
10710
|
);
|
|
10704
|
-
},
|
|
10711
|
+
}, bn = (r) => {
|
|
10705
10712
|
const { icon: n, min: e, max: t, step: i, value: o, onInputHandler: s } = r, [a, c] = ae(0), l = xe(null), h = (u) => {
|
|
10706
10713
|
u > t && (u = t), u < e && (u = e), c(u), s(u), l.current && (l.current.value = u.toString());
|
|
10707
10714
|
};
|
|
@@ -10751,10 +10758,10 @@ const Sp = (r) => {
|
|
|
10751
10758
|
}
|
|
10752
10759
|
}
|
|
10753
10760
|
)));
|
|
10754
|
-
},
|
|
10761
|
+
}, Gp = (r) => {
|
|
10755
10762
|
const { icon: n, min: e, max: t, step: i, value: o, onInputHandler: s } = r;
|
|
10756
10763
|
return /* @__PURE__ */ m.createElement("div", { className: "button input-button" }, /* @__PURE__ */ m.createElement("img", { src: Le(n) }), /* @__PURE__ */ m.createElement(
|
|
10757
|
-
|
|
10764
|
+
Zp,
|
|
10758
10765
|
{
|
|
10759
10766
|
min: e,
|
|
10760
10767
|
max: t,
|
|
@@ -10763,7 +10770,7 @@ const Sp = (r) => {
|
|
|
10763
10770
|
onInputHandler: s
|
|
10764
10771
|
}
|
|
10765
10772
|
));
|
|
10766
|
-
},
|
|
10773
|
+
}, Zp = (r) => {
|
|
10767
10774
|
const { value: n, min: e, max: t, onInputHandler: i } = r, [o, s] = ae({ x: 0, y: 0 });
|
|
10768
10775
|
ge(() => {
|
|
10769
10776
|
s({ x: n * 100, y: 0 });
|
|
@@ -10806,7 +10813,7 @@ const Sp = (r) => {
|
|
|
10806
10813
|
/* @__PURE__ */ m.createElement("div", { className: "circle", onPointerUp: Ut })
|
|
10807
10814
|
))
|
|
10808
10815
|
);
|
|
10809
|
-
},
|
|
10816
|
+
}, $p = (r) => {
|
|
10810
10817
|
const { icon: n, value: e, onChangeHandler: t, style: i } = r, [o, s] = ae(0), [a, c] = ae(), l = xe(null), h = pt(
|
|
10811
10818
|
(M) => {
|
|
10812
10819
|
M >= wt.length && (M = 0), M < 0 && (M = wt.length - 1), s(M), t(wt[M]), c(!1), l.current && (l.current.value = wt[M]);
|
|
@@ -10822,7 +10829,7 @@ const Sp = (r) => {
|
|
|
10822
10829
|
e && (s(wt.indexOf(e)), l.current && (l.current.value = e));
|
|
10823
10830
|
}, [e]);
|
|
10824
10831
|
const g = J(() => a ? /* @__PURE__ */ m.createElement(
|
|
10825
|
-
|
|
10832
|
+
Hp,
|
|
10826
10833
|
{
|
|
10827
10834
|
options: wt,
|
|
10828
10835
|
onClickHandler: h,
|
|
@@ -10857,7 +10864,7 @@ const Sp = (r) => {
|
|
|
10857
10864
|
}
|
|
10858
10865
|
}
|
|
10859
10866
|
)), g);
|
|
10860
|
-
},
|
|
10867
|
+
}, Hp = (r) => {
|
|
10861
10868
|
const { options: n, style: e, onClickHandler: t } = r;
|
|
10862
10869
|
return /* @__PURE__ */ m.createElement("div", { className: "select-option-menu", style: e }, n.map((i, o) => /* @__PURE__ */ m.createElement(
|
|
10863
10870
|
"div",
|
|
@@ -10870,7 +10877,7 @@ const Sp = (r) => {
|
|
|
10870
10877
|
},
|
|
10871
10878
|
i
|
|
10872
10879
|
)));
|
|
10873
|
-
},
|
|
10880
|
+
}, Jp = (r) => {
|
|
10874
10881
|
const { innerRatio: n, innerVerticeStep: e, vertices: t, mananger: i, setShapeOpt: o } = r, s = (l) => {
|
|
10875
10882
|
o({ vertices: l }), re.emitMethod(
|
|
10876
10883
|
te.MainEngine,
|
|
@@ -10906,7 +10913,7 @@ const Sp = (r) => {
|
|
|
10906
10913
|
);
|
|
10907
10914
|
};
|
|
10908
10915
|
return /* @__PURE__ */ m.createElement(m.Fragment, null, /* @__PURE__ */ m.createElement(
|
|
10909
|
-
|
|
10916
|
+
bn,
|
|
10910
10917
|
{
|
|
10911
10918
|
value: t,
|
|
10912
10919
|
icon: "polygon-vertex",
|
|
@@ -10916,7 +10923,7 @@ const Sp = (r) => {
|
|
|
10916
10923
|
onInputHandler: s
|
|
10917
10924
|
}
|
|
10918
10925
|
), /* @__PURE__ */ m.createElement(
|
|
10919
|
-
|
|
10926
|
+
bn,
|
|
10920
10927
|
{
|
|
10921
10928
|
value: e,
|
|
10922
10929
|
icon: "star-innerVertex",
|
|
@@ -10926,7 +10933,7 @@ const Sp = (r) => {
|
|
|
10926
10933
|
onInputHandler: a
|
|
10927
10934
|
}
|
|
10928
10935
|
), /* @__PURE__ */ m.createElement(
|
|
10929
|
-
|
|
10936
|
+
Gp,
|
|
10930
10937
|
{
|
|
10931
10938
|
value: n,
|
|
10932
10939
|
icon: "star-innerRatio",
|
|
@@ -10936,7 +10943,7 @@ const Sp = (r) => {
|
|
|
10936
10943
|
onInputHandler: c
|
|
10937
10944
|
}
|
|
10938
10945
|
));
|
|
10939
|
-
},
|
|
10946
|
+
}, Xp = (r) => {
|
|
10940
10947
|
const { mananger: n, vertices: e, setShapeOpt: t } = r, i = (o) => {
|
|
10941
10948
|
t({ vertices: o }), re.emitMethod(
|
|
10942
10949
|
te.MainEngine,
|
|
@@ -10950,7 +10957,7 @@ const Sp = (r) => {
|
|
|
10950
10957
|
);
|
|
10951
10958
|
};
|
|
10952
10959
|
return /* @__PURE__ */ m.createElement(
|
|
10953
|
-
|
|
10960
|
+
bn,
|
|
10954
10961
|
{
|
|
10955
10962
|
value: e,
|
|
10956
10963
|
icon: "polygon-vertex",
|
|
@@ -10960,7 +10967,7 @@ const Sp = (r) => {
|
|
|
10960
10967
|
onInputHandler: i
|
|
10961
10968
|
}
|
|
10962
10969
|
);
|
|
10963
|
-
},
|
|
10970
|
+
}, Kp = (r) => {
|
|
10964
10971
|
const { mananger: n, placement: e, setShapeOpt: t } = r, i = (o) => {
|
|
10965
10972
|
t({ placement: o }), re.emitMethod(
|
|
10966
10973
|
te.MainEngine,
|
|
@@ -10974,7 +10981,7 @@ const Sp = (r) => {
|
|
|
10974
10981
|
);
|
|
10975
10982
|
};
|
|
10976
10983
|
return /* @__PURE__ */ m.createElement(
|
|
10977
|
-
|
|
10984
|
+
$p,
|
|
10978
10985
|
{
|
|
10979
10986
|
value: e,
|
|
10980
10987
|
icon: "speechBallon-placement",
|
|
@@ -10991,7 +10998,7 @@ const Sp = (r) => {
|
|
|
10991
10998
|
},
|
|
10992
10999
|
/* @__PURE__ */ m.createElement("img", { src: Le(n) })
|
|
10993
11000
|
);
|
|
10994
|
-
},
|
|
11001
|
+
}, qp = (r) => {
|
|
10995
11002
|
const { toolsTypes: n, style: e, mananger: t, shapeOpt: i, setShapeOpt: o } = r, [s, a] = ae();
|
|
10996
11003
|
ge(() => {
|
|
10997
11004
|
n.includes(T.Polygon) ? a(T.Polygon) : n.includes(T.Star) ? a(T.Star) : a(T.SpeechBalloon);
|
|
@@ -10999,14 +11006,14 @@ const Sp = (r) => {
|
|
|
10999
11006
|
const c = (g) => {
|
|
11000
11007
|
a(g);
|
|
11001
11008
|
}, l = J(() => s === T.Polygon && t && i.vertices ? /* @__PURE__ */ m.createElement(
|
|
11002
|
-
|
|
11009
|
+
Xp,
|
|
11003
11010
|
{
|
|
11004
11011
|
vertices: i.vertices,
|
|
11005
11012
|
mananger: t,
|
|
11006
11013
|
setShapeOpt: o
|
|
11007
11014
|
}
|
|
11008
11015
|
) : null, [t, s, i, o]), h = J(() => s === T.Star && t && i.vertices && i.innerVerticeStep && i.innerRatio ? /* @__PURE__ */ m.createElement(
|
|
11009
|
-
|
|
11016
|
+
Jp,
|
|
11010
11017
|
{
|
|
11011
11018
|
mananger: t,
|
|
11012
11019
|
vertices: i.vertices,
|
|
@@ -11015,7 +11022,7 @@ const Sp = (r) => {
|
|
|
11015
11022
|
setShapeOpt: o
|
|
11016
11023
|
}
|
|
11017
11024
|
) : null, [t, s, i, o]), u = J(() => s === T.SpeechBalloon && t && i.placement ? /* @__PURE__ */ m.createElement(
|
|
11018
|
-
|
|
11025
|
+
Kp,
|
|
11019
11026
|
{
|
|
11020
11027
|
mananger: t,
|
|
11021
11028
|
placement: i.placement,
|
|
@@ -11059,7 +11066,7 @@ const Sp = (r) => {
|
|
|
11059
11066
|
) || null),
|
|
11060
11067
|
/* @__PURE__ */ m.createElement("div", { className: "shapeOpt-sub-menu-content" }, l, h, u)
|
|
11061
11068
|
);
|
|
11062
|
-
},
|
|
11069
|
+
}, _p = (r) => {
|
|
11063
11070
|
const {
|
|
11064
11071
|
open: n,
|
|
11065
11072
|
setOpen: e,
|
|
@@ -11082,7 +11089,7 @@ const Sp = (r) => {
|
|
|
11082
11089
|
},
|
|
11083
11090
|
[c, o]
|
|
11084
11091
|
), g = J(() => n && i && a && o ? /* @__PURE__ */ m.createElement(
|
|
11085
|
-
|
|
11092
|
+
qp,
|
|
11086
11093
|
{
|
|
11087
11094
|
shapeOpt: o,
|
|
11088
11095
|
style: h,
|
|
@@ -11118,12 +11125,12 @@ const Sp = (r) => {
|
|
|
11118
11125
|
), [u, g] = m.useState(), M = xe(null);
|
|
11119
11126
|
ge(() => {
|
|
11120
11127
|
var E, O, z, L;
|
|
11121
|
-
const v = {},
|
|
11122
|
-
if (i &&
|
|
11128
|
+
const v = {}, b = (a == null ? void 0 : a.w) || ((E = n == null ? void 0 : n.boxSize) == null ? void 0 : E[0]) || 0, P = (a == null ? void 0 : a.h) || ((O = n == null ? void 0 : n.boxSize) == null ? void 0 : O[1]) || 0;
|
|
11129
|
+
if (i && b && P && (c != null && c.width) && (c != null && c.height)) {
|
|
11123
11130
|
if (i.y < 60 ? i.y + P < c.height - 60 ? v.bottom = -120 : i.y + P < c.height ? v.bottom = -58 : i.y > 0 ? v.top = 62 : v.top = -i.y + 62 : v.top = 0, i.x < 0)
|
|
11124
11131
|
v.left = -i.x + 3;
|
|
11125
|
-
else if (i.x + (((z = M.current) == null ? void 0 : z.offsetWidth) ||
|
|
11126
|
-
const j = c.width - (((L = M.current) == null ? void 0 : L.offsetWidth) ||
|
|
11132
|
+
else if (i.x + (((z = M.current) == null ? void 0 : z.offsetWidth) || b) > c.width) {
|
|
11133
|
+
const j = c.width - (((L = M.current) == null ? void 0 : L.offsetWidth) || b) - i.x;
|
|
11127
11134
|
v.left = j;
|
|
11128
11135
|
}
|
|
11129
11136
|
g(v);
|
|
@@ -11140,7 +11147,7 @@ const Sp = (r) => {
|
|
|
11140
11147
|
n == null ? void 0 : n.boxSize
|
|
11141
11148
|
]);
|
|
11142
11149
|
const d = J(() => a != null && a.fillColor ? /* @__PURE__ */ m.createElement(
|
|
11143
|
-
|
|
11150
|
+
Ep,
|
|
11144
11151
|
{
|
|
11145
11152
|
floatBarRef: M,
|
|
11146
11153
|
open: l === 3,
|
|
@@ -11164,7 +11171,7 @@ const Sp = (r) => {
|
|
|
11164
11171
|
}
|
|
11165
11172
|
}
|
|
11166
11173
|
) : null, [a == null ? void 0 : a.strokeColor, l, M]), w = J(() => n != null && n.fontColor && (c != null && c.viewId) ? /* @__PURE__ */ m.createElement(
|
|
11167
|
-
|
|
11174
|
+
Lp,
|
|
11168
11175
|
{
|
|
11169
11176
|
floatBarRef: M,
|
|
11170
11177
|
open: l === 4,
|
|
@@ -11178,7 +11185,7 @@ const Sp = (r) => {
|
|
|
11178
11185
|
workIds: e
|
|
11179
11186
|
}
|
|
11180
11187
|
) : null, [n, l, e, c, M]), p = J(() => n != null && n.fontBgColor && (c != null && c.viewId) ? /* @__PURE__ */ m.createElement(
|
|
11181
|
-
|
|
11188
|
+
Pp,
|
|
11182
11189
|
{
|
|
11183
11190
|
floatBarRef: M,
|
|
11184
11191
|
open: l === 5,
|
|
@@ -11192,7 +11199,7 @@ const Sp = (r) => {
|
|
|
11192
11199
|
workIds: e
|
|
11193
11200
|
}
|
|
11194
11201
|
) : null, [n, l, e, c, M]), f = J(() => n && (c != null && c.viewId) ? /* @__PURE__ */ m.createElement(
|
|
11195
|
-
|
|
11202
|
+
Bp,
|
|
11196
11203
|
{
|
|
11197
11204
|
floatBarRef: M,
|
|
11198
11205
|
open: l === 6,
|
|
@@ -11207,7 +11214,7 @@ const Sp = (r) => {
|
|
|
11207
11214
|
style: u
|
|
11208
11215
|
}
|
|
11209
11216
|
) : null, [n, l, e, c, u, M]), N = J(() => n && (c != null && c.viewId) ? /* @__PURE__ */ m.createElement(
|
|
11210
|
-
|
|
11217
|
+
Vp,
|
|
11211
11218
|
{
|
|
11212
11219
|
open: l === 7,
|
|
11213
11220
|
setOpen: (v) => {
|
|
@@ -11221,7 +11228,7 @@ const Sp = (r) => {
|
|
|
11221
11228
|
floatBarRef: M
|
|
11222
11229
|
}
|
|
11223
11230
|
) : null, [n, l, e, c, M]), S = J(() => t ? null : /* @__PURE__ */ m.createElement(
|
|
11224
|
-
|
|
11231
|
+
jp,
|
|
11225
11232
|
{
|
|
11226
11233
|
open: l === 1,
|
|
11227
11234
|
setOpen: (v) => {
|
|
@@ -11233,14 +11240,14 @@ const Sp = (r) => {
|
|
|
11233
11240
|
floatBarRef: M
|
|
11234
11241
|
}
|
|
11235
11242
|
), [t, l, M]), C = J(() => a != null && a.canLock && c ? /* @__PURE__ */ m.createElement(
|
|
11236
|
-
|
|
11243
|
+
Qp,
|
|
11237
11244
|
{
|
|
11238
11245
|
workIds: e,
|
|
11239
11246
|
mananger: c,
|
|
11240
11247
|
islocked: a.isLocked
|
|
11241
11248
|
}
|
|
11242
11249
|
) : null, [a, c, e]), k = J(() => c && (c != null && c.viewId) && u && (a != null && a.shapeOpt) && (a != null && a.toolsTypes) ? /* @__PURE__ */ m.createElement(
|
|
11243
|
-
|
|
11250
|
+
_p,
|
|
11244
11251
|
{
|
|
11245
11252
|
open: l === 8,
|
|
11246
11253
|
setOpen: (v) => {
|
|
@@ -11255,9 +11262,9 @@ const Sp = (r) => {
|
|
|
11255
11262
|
shapeOpt: a.shapeOpt
|
|
11256
11263
|
}
|
|
11257
11264
|
) : null, [a, c, l, u, e, M]);
|
|
11258
|
-
return /* @__PURE__ */ m.createElement("div", { className: "appliance-plugin-floatbtns", style: u, ref: M }, c && !o && /* @__PURE__ */ m.createElement(
|
|
11265
|
+
return /* @__PURE__ */ m.createElement("div", { className: "appliance-plugin-floatbtns", style: u, ref: M }, c && !o && /* @__PURE__ */ m.createElement(kp, { workIds: e, mananger: c }), S, C, !!(c != null && c.viewId) && !s && /* @__PURE__ */ m.createElement(xp, { workIds: e, viewId: c.viewId }), k, f, N, w, p, y, d);
|
|
11259
11266
|
}
|
|
11260
|
-
),
|
|
11267
|
+
), ey = (r) => {
|
|
11261
11268
|
const { data: n, workId: e, updateOptInfo: t, handlePointerDown: i, handlePointerUp: o } = r, { opt: s, scale: a, translate: c, x: l, y: h } = n, u = xe(null), { floatBarData: g } = Ce(Te), M = J(() => {
|
|
11262
11269
|
const {
|
|
11263
11270
|
fontSize: w,
|
|
@@ -11268,7 +11275,7 @@ const Sp = (r) => {
|
|
|
11268
11275
|
textAlign: C,
|
|
11269
11276
|
strokeColor: k,
|
|
11270
11277
|
lineHeight: v,
|
|
11271
|
-
bold:
|
|
11278
|
+
bold: b,
|
|
11272
11279
|
italic: P
|
|
11273
11280
|
} = s, E = v || w * 1.2, O = {
|
|
11274
11281
|
fontSize: `${w}px`,
|
|
@@ -11280,7 +11287,7 @@ const Sp = (r) => {
|
|
|
11280
11287
|
pointerEvents: "none",
|
|
11281
11288
|
paddingRight: `${P === "italic" ? Math.round(w * 0.3) : 5}px`
|
|
11282
11289
|
};
|
|
11283
|
-
return p && (O.fontFamily = `${p}`), (S || f) && (O.textDecoration = `${S && "line-through" || ""}${f && " underline" || ""}`), C && (O.textAlign = `${C}`),
|
|
11290
|
+
return p && (O.fontFamily = `${p}`), (S || f) && (O.textDecoration = `${S && "line-through" || ""}${f && " underline" || ""}`), C && (O.textAlign = `${C}`), b && (O.fontWeight = `${b}`), P && (O.fontStyle = `${P}`), O;
|
|
11284
11291
|
}, [s]), d = J(() => {
|
|
11285
11292
|
const w = [];
|
|
11286
11293
|
if (s.text) {
|
|
@@ -11336,7 +11343,7 @@ const Sp = (r) => {
|
|
|
11336
11343
|
},
|
|
11337
11344
|
/* @__PURE__ */ m.createElement("div", { className: "editor", ref: u, style: M }, d)
|
|
11338
11345
|
);
|
|
11339
|
-
},
|
|
11346
|
+
}, ty = (r) => {
|
|
11340
11347
|
const { mananger: n } = Ce(Te), e = J(() => {
|
|
11341
11348
|
var i;
|
|
11342
11349
|
const t = (o) => {
|
|
@@ -11358,7 +11365,7 @@ const Sp = (r) => {
|
|
|
11358
11365
|
return r.editors.forEach((s, a) => {
|
|
11359
11366
|
if (r.selectIds && r.selectIds.includes(a)) {
|
|
11360
11367
|
const c = /* @__PURE__ */ m.createElement(
|
|
11361
|
-
|
|
11368
|
+
ey,
|
|
11362
11369
|
{
|
|
11363
11370
|
key: a,
|
|
11364
11371
|
workId: a,
|
|
@@ -11375,7 +11382,7 @@ const Sp = (r) => {
|
|
|
11375
11382
|
return null;
|
|
11376
11383
|
}, [r.editors, r.selectIds, n]);
|
|
11377
11384
|
return /* @__PURE__ */ m.createElement(m.Fragment, null, e);
|
|
11378
|
-
},
|
|
11385
|
+
}, ny = (r) => {
|
|
11379
11386
|
const { position: n, textOpt: e, workIds: t, noLayer: i, noCopy: o, noDelete: s, style: a } = r, c = xe(null);
|
|
11380
11387
|
return /* @__PURE__ */ m.createElement("div", { className: De.FloatBarBtn, ref: c, style: a }, /* @__PURE__ */ m.createElement(
|
|
11381
11388
|
Er,
|
|
@@ -11388,7 +11395,7 @@ const Sp = (r) => {
|
|
|
11388
11395
|
noDelete: s
|
|
11389
11396
|
}
|
|
11390
11397
|
));
|
|
11391
|
-
},
|
|
11398
|
+
}, iy = (r) => {
|
|
11392
11399
|
const {
|
|
11393
11400
|
data: n,
|
|
11394
11401
|
workId: e,
|
|
@@ -11406,7 +11413,7 @@ const Sp = (r) => {
|
|
|
11406
11413
|
lineThrough: C,
|
|
11407
11414
|
textAlign: k,
|
|
11408
11415
|
lineHeight: v,
|
|
11409
|
-
bold:
|
|
11416
|
+
bold: b,
|
|
11410
11417
|
italic: P
|
|
11411
11418
|
} = g, E = xe(null), O = J(() => {
|
|
11412
11419
|
const V = p, B = v || V * 1.2, Z = {
|
|
@@ -11418,9 +11425,9 @@ const Sp = (r) => {
|
|
|
11418
11425
|
paddingRight: `${P === "italic" ? Math.round(V * 0.3) : 5}px`,
|
|
11419
11426
|
borderWidth: 0
|
|
11420
11427
|
};
|
|
11421
|
-
return f && (Z.fontFamily = `${f}`), (C || N) && (Z.textDecoration = `${C && "line-through" || ""} ${N && " underline" || ""}`), k && (Z.textAlign = `${k}`),
|
|
11428
|
+
return f && (Z.fontFamily = `${f}`), (C || N) && (Z.textDecoration = `${C && "line-through" || ""} ${N && " underline" || ""}`), k && (Z.textAlign = `${k}`), b && (Z.fontWeight = `${b}`), P && (Z.fontStyle = `${P}`), Z;
|
|
11422
11429
|
}, [
|
|
11423
|
-
|
|
11430
|
+
b,
|
|
11424
11431
|
S,
|
|
11425
11432
|
f,
|
|
11426
11433
|
p,
|
|
@@ -11476,8 +11483,8 @@ const Sp = (r) => {
|
|
|
11476
11483
|
const Y = J(() => {
|
|
11477
11484
|
const V = `scale(${M || 1}) ${d && "translate(" + d[0] + "px," + d[1] + "px)" || ""}`;
|
|
11478
11485
|
return {
|
|
11479
|
-
left: `${y -
|
|
11480
|
-
top: `${w -
|
|
11486
|
+
left: `${y - bi * (M || 1)}px`,
|
|
11487
|
+
top: `${w - bi * (M || 1)}px`,
|
|
11481
11488
|
zIndex: 2,
|
|
11482
11489
|
transform: V,
|
|
11483
11490
|
transformOrigin: "left top",
|
|
@@ -11518,7 +11525,7 @@ const Sp = (r) => {
|
|
|
11518
11525
|
height: g.boxSize[1] * M
|
|
11519
11526
|
};
|
|
11520
11527
|
return /* @__PURE__ */ m.createElement(
|
|
11521
|
-
|
|
11528
|
+
ny,
|
|
11522
11529
|
{
|
|
11523
11530
|
position: Z,
|
|
11524
11531
|
style: oe,
|
|
@@ -11731,10 +11738,10 @@ const Sp = (r) => {
|
|
|
11731
11738
|
function ht() {
|
|
11732
11739
|
z.current = !0, s();
|
|
11733
11740
|
}
|
|
11734
|
-
function
|
|
11741
|
+
function ot() {
|
|
11735
11742
|
z.current = !1, Xe();
|
|
11736
11743
|
}
|
|
11737
|
-
function
|
|
11744
|
+
function st() {
|
|
11738
11745
|
Xe(), s();
|
|
11739
11746
|
}
|
|
11740
11747
|
const mt = pt(() => {
|
|
@@ -11796,13 +11803,13 @@ const Sp = (r) => {
|
|
|
11796
11803
|
onTouchEnd: X,
|
|
11797
11804
|
onInput: Xe,
|
|
11798
11805
|
onCompositionStart: ht,
|
|
11799
|
-
onCompositionUpdate:
|
|
11800
|
-
onCompositionEnd:
|
|
11806
|
+
onCompositionUpdate: st,
|
|
11807
|
+
onCompositionEnd: ot,
|
|
11801
11808
|
dangerouslySetInnerHTML: { __html: Q }
|
|
11802
11809
|
}
|
|
11803
11810
|
)
|
|
11804
11811
|
));
|
|
11805
|
-
},
|
|
11812
|
+
}, ry = (r) => {
|
|
11806
11813
|
const n = xe(null), { mananger: e } = Ce(Te), t = xe(), i = pt(
|
|
11807
11814
|
(s) => {
|
|
11808
11815
|
var u, g;
|
|
@@ -11905,7 +11912,7 @@ const Sp = (r) => {
|
|
|
11905
11912
|
return r.editors.forEach((M, d) => {
|
|
11906
11913
|
g.push(
|
|
11907
11914
|
/* @__PURE__ */ m.createElement(
|
|
11908
|
-
|
|
11915
|
+
iy,
|
|
11909
11916
|
{
|
|
11910
11917
|
key: d,
|
|
11911
11918
|
workId: d,
|
|
@@ -11930,7 +11937,7 @@ const Sp = (r) => {
|
|
|
11930
11937
|
i
|
|
11931
11938
|
]);
|
|
11932
11939
|
return /* @__PURE__ */ m.createElement("div", { className: `${r.className}`, ref: n }, o);
|
|
11933
|
-
},
|
|
11940
|
+
}, oy = () => {
|
|
11934
11941
|
const { floatBarData: r } = Ce(Te);
|
|
11935
11942
|
return /* @__PURE__ */ m.createElement(
|
|
11936
11943
|
"div",
|
|
@@ -11995,7 +12002,7 @@ const Sp = (r) => {
|
|
|
11995
12002
|
}
|
|
11996
12003
|
)
|
|
11997
12004
|
);
|
|
11998
|
-
},
|
|
12005
|
+
}, sy = () => {
|
|
11999
12006
|
const { floatBarData: r, mananger: n } = Ce(Te), [e, t] = ae(), [i, o] = ae();
|
|
12000
12007
|
ge(() => {
|
|
12001
12008
|
const c = [];
|
|
@@ -12048,7 +12055,7 @@ const Sp = (r) => {
|
|
|
12048
12055
|
s,
|
|
12049
12056
|
a
|
|
12050
12057
|
);
|
|
12051
|
-
},
|
|
12058
|
+
}, ay = () => {
|
|
12052
12059
|
const { floatBarData: r } = Ce(Te);
|
|
12053
12060
|
return /* @__PURE__ */ m.createElement(
|
|
12054
12061
|
"div",
|
|
@@ -12085,7 +12092,7 @@ const Sp = (r) => {
|
|
|
12085
12092
|
}
|
|
12086
12093
|
)
|
|
12087
12094
|
);
|
|
12088
|
-
},
|
|
12095
|
+
}, cy = () => {
|
|
12089
12096
|
const { floatBarData: r } = Ce(Te);
|
|
12090
12097
|
return /* @__PURE__ */ m.createElement(
|
|
12091
12098
|
"div",
|
|
@@ -12104,7 +12111,7 @@ const Sp = (r) => {
|
|
|
12104
12111
|
}
|
|
12105
12112
|
)
|
|
12106
12113
|
);
|
|
12107
|
-
},
|
|
12114
|
+
}, ly = (r) => {
|
|
12108
12115
|
const { className: n } = r, { floatBarData: e, angle: t, setAngle: i, setOperationType: o, mananger: s } = Ce(Te), [a, c] = ae(
|
|
12109
12116
|
x.Pending
|
|
12110
12117
|
), [l, h] = ae(), [u, g] = ae(!1), [M, d] = ae(new ve()), [y, w] = ae(new ve()), [p, f] = ae(!1), N = xe(0), S = xe(null), C = (E) => {
|
|
@@ -12170,7 +12177,7 @@ const Sp = (r) => {
|
|
|
12170
12177
|
viewId: s == null ? void 0 : s.viewId
|
|
12171
12178
|
}
|
|
12172
12179
|
);
|
|
12173
|
-
},
|
|
12180
|
+
}, b = (E, O) => {
|
|
12174
12181
|
if (s != null && s.control.worker.isBusy) {
|
|
12175
12182
|
f(!0), k(E, O);
|
|
12176
12183
|
return;
|
|
@@ -12209,7 +12216,7 @@ const Sp = (r) => {
|
|
|
12209
12216
|
position: l,
|
|
12210
12217
|
onStart: v,
|
|
12211
12218
|
onDrag: P,
|
|
12212
|
-
onStop:
|
|
12219
|
+
onStop: b
|
|
12213
12220
|
},
|
|
12214
12221
|
/* @__PURE__ */ m.createElement(
|
|
12215
12222
|
"div",
|
|
@@ -12240,7 +12247,7 @@ const Sp = (r) => {
|
|
|
12240
12247
|
)
|
|
12241
12248
|
)
|
|
12242
12249
|
);
|
|
12243
|
-
},
|
|
12250
|
+
}, uy = m.memo(
|
|
12244
12251
|
(r) => {
|
|
12245
12252
|
const { editors: n, canSelectorSwitch: e } = r, { floatBarData: t, setOperationType: i, mananger: o, isNoPointerEvents: s } = Ce(Te), [a, c] = ae(), [l, h] = ae(!1), u = xe(0), g = xe(), M = xe(x.Pending), d = J(() => !!((t == null ? void 0 : t.scaleType) === Fe.none && (t != null && t.canLock)), [t]), y = J(() => t && t.w && t.h ? {
|
|
12246
12253
|
position: "absolute",
|
|
@@ -12257,9 +12264,9 @@ const Sp = (r) => {
|
|
|
12257
12264
|
return;
|
|
12258
12265
|
}
|
|
12259
12266
|
h(!1);
|
|
12260
|
-
}, p = (v,
|
|
12267
|
+
}, p = (v, b) => {
|
|
12261
12268
|
u.current && (clearTimeout(u.current), u.current = 0);
|
|
12262
|
-
const P = { x:
|
|
12269
|
+
const P = { x: b.x, y: b.y };
|
|
12263
12270
|
i(W.None), M.current = x.Done, c(P), re.emitMethod(
|
|
12264
12271
|
te.MainEngine,
|
|
12265
12272
|
W.TranslateNode,
|
|
@@ -12297,25 +12304,25 @@ const Sp = (r) => {
|
|
|
12297
12304
|
viewId: o == null ? void 0 : o.viewId
|
|
12298
12305
|
}
|
|
12299
12306
|
));
|
|
12300
|
-
}, N = (v,
|
|
12307
|
+
}, N = (v, b) => {
|
|
12301
12308
|
var O;
|
|
12302
12309
|
o != null && o.control.worker.isBusy && h(!0);
|
|
12303
12310
|
const P = M.current, E = g.current;
|
|
12304
|
-
if (p(v,
|
|
12311
|
+
if (p(v, b), g.current && (g.current = void 0), P === x.Start && (n != null && n.size) && E) {
|
|
12305
12312
|
const z = (O = o == null ? void 0 : o.control.viewContainerManager.getView(
|
|
12306
12313
|
o.viewId
|
|
12307
12314
|
)) == null ? void 0 : O.focusScenePath;
|
|
12308
12315
|
z && (o == null || o.control.worker.blurSelector(o.viewId, z));
|
|
12309
12316
|
}
|
|
12310
12317
|
o == null || o.focusElement();
|
|
12311
|
-
}, S = (v,
|
|
12318
|
+
}, S = (v, b) => {
|
|
12312
12319
|
if (o != null && o.control.worker.isBusy) {
|
|
12313
|
-
h(!0), p(v,
|
|
12320
|
+
h(!0), p(v, b);
|
|
12314
12321
|
return;
|
|
12315
12322
|
}
|
|
12316
12323
|
if (u.current)
|
|
12317
12324
|
return;
|
|
12318
|
-
const P = { x:
|
|
12325
|
+
const P = { x: b.x, y: b.y };
|
|
12319
12326
|
c(P), u.current = setTimeout(() => {
|
|
12320
12327
|
u.current = 0, (P.x !== (a == null ? void 0 : a.x) || P.y !== (a == null ? void 0 : a.y)) && (g.current && (g.current = void 0), M.current = x.Doing, re.emitMethod(
|
|
12321
12328
|
te.MainEngine,
|
|
@@ -12343,7 +12350,7 @@ const Sp = (r) => {
|
|
|
12343
12350
|
onStop: N
|
|
12344
12351
|
},
|
|
12345
12352
|
/* @__PURE__ */ m.createElement("div", { style: y }, /* @__PURE__ */ m.createElement(
|
|
12346
|
-
|
|
12353
|
+
hy,
|
|
12347
12354
|
{
|
|
12348
12355
|
editors: n,
|
|
12349
12356
|
selectIds: (t == null ? void 0 : t.selectIds) || [],
|
|
@@ -12354,7 +12361,7 @@ const Sp = (r) => {
|
|
|
12354
12361
|
);
|
|
12355
12362
|
},
|
|
12356
12363
|
(r, n) => !!le(r, n)
|
|
12357
|
-
),
|
|
12364
|
+
), hy = m.memo(
|
|
12358
12365
|
(r) => {
|
|
12359
12366
|
const {
|
|
12360
12367
|
editors: n,
|
|
@@ -12363,7 +12370,7 @@ const Sp = (r) => {
|
|
|
12363
12370
|
handleTextEditorPointerUp: i
|
|
12364
12371
|
} = r;
|
|
12365
12372
|
return n ? /* @__PURE__ */ m.createElement(
|
|
12366
|
-
|
|
12373
|
+
ty,
|
|
12367
12374
|
{
|
|
12368
12375
|
editors: n,
|
|
12369
12376
|
selectIds: e || [],
|
|
@@ -12373,7 +12380,7 @@ const Sp = (r) => {
|
|
|
12373
12380
|
) : null;
|
|
12374
12381
|
},
|
|
12375
12382
|
(r, n) => !(!le(r.editors, n.editors) || !le(r.selectIds, n.selectIds))
|
|
12376
|
-
),
|
|
12383
|
+
), dy = (r) => {
|
|
12377
12384
|
const { className: n } = r, [e, t] = ae({ x: 0, y: 0, h: 0, w: 0 }), [i, o] = ae(), [s, a] = ae(), [c, l] = ae(), { floatBarData: h, mananger: u, isNoPointerEvents: g, setOperationType: M } = Ce(Te), [d, y] = ae(), [w, p] = ae(!1), f = xe(0);
|
|
12378
12385
|
ge(() => {
|
|
12379
12386
|
if (h && u) {
|
|
@@ -12506,7 +12513,7 @@ const Sp = (r) => {
|
|
|
12506
12513
|
)
|
|
12507
12514
|
), K = k(ie, O);
|
|
12508
12515
|
return X && (_[1] = K[1] - j[1]), F && (_[0] = K[0] - j[0]), { scale: Q, translate: _ };
|
|
12509
|
-
},
|
|
12516
|
+
}, b = (O, z) => {
|
|
12510
12517
|
if (f.current && (clearTimeout(f.current), f.current = 0), u != null && u.control.worker.isBusy) {
|
|
12511
12518
|
p(!0);
|
|
12512
12519
|
return;
|
|
@@ -12591,7 +12598,7 @@ const Sp = (r) => {
|
|
|
12591
12598
|
topLeft: !0
|
|
12592
12599
|
},
|
|
12593
12600
|
lockAspectRatio: (h == null ? void 0 : h.scaleType) === Fe.proportional,
|
|
12594
|
-
onResizeStart:
|
|
12601
|
+
onResizeStart: b,
|
|
12595
12602
|
onResize: P,
|
|
12596
12603
|
onResizeStop: E
|
|
12597
12604
|
}
|
|
@@ -12627,11 +12634,11 @@ const Sp = (r) => {
|
|
|
12627
12634
|
d.current && (clearTimeout(d.current), d.current = 0), o(W.None), u(x.Done);
|
|
12628
12635
|
const v = { x: k.x, y: k.y };
|
|
12629
12636
|
if (l(v), s != null && s.control.viewContainerManager) {
|
|
12630
|
-
const
|
|
12637
|
+
const b = s.control.viewContainerManager.transformToScenePoint(
|
|
12631
12638
|
[v.x, v.y],
|
|
12632
12639
|
s.viewId
|
|
12633
12640
|
), P = t.get(n);
|
|
12634
|
-
P && i === "start" ? P[0] =
|
|
12641
|
+
P && i === "start" ? P[0] = b : P && i === "end" && (P[1] = b), re.emitMethod(
|
|
12635
12642
|
te.MainEngine,
|
|
12636
12643
|
W.SetPoint,
|
|
12637
12644
|
{
|
|
@@ -12668,11 +12675,11 @@ const Sp = (r) => {
|
|
|
12668
12675
|
const v = { x: k.x, y: k.y };
|
|
12669
12676
|
l(v), d.current = setTimeout(() => {
|
|
12670
12677
|
if (d.current = 0, (v.x !== (k == null ? void 0 : k.x) || v.y !== (k == null ? void 0 : k.y)) && (s != null && s.control.viewContainerManager)) {
|
|
12671
|
-
const
|
|
12678
|
+
const b = s.control.viewContainerManager.transformToScenePoint(
|
|
12672
12679
|
[v.x, v.y],
|
|
12673
12680
|
s.viewId
|
|
12674
12681
|
), P = t.get(n);
|
|
12675
|
-
P && i === "start" ? P[0] =
|
|
12682
|
+
P && i === "start" ? P[0] = b : P && i === "end" && (P[1] = b), u(x.Doing), re.emitMethod(
|
|
12676
12683
|
te.MainEngine,
|
|
12677
12684
|
W.SetPoint,
|
|
12678
12685
|
{
|
|
@@ -12704,7 +12711,7 @@ const Sp = (r) => {
|
|
|
12704
12711
|
}
|
|
12705
12712
|
)
|
|
12706
12713
|
);
|
|
12707
|
-
},
|
|
12714
|
+
}, gy = (r) => {
|
|
12708
12715
|
const { className: n } = r, { floatBarData: e, mananger: t } = Ce(Te), [i, o] = ae(), [s, a] = ae(), [c, l] = ae(
|
|
12709
12716
|
/* @__PURE__ */ new Map()
|
|
12710
12717
|
);
|
|
@@ -12742,9 +12749,9 @@ const Sp = (r) => {
|
|
|
12742
12749
|
}
|
|
12743
12750
|
) : null, [s, e == null ? void 0 : e.selectIds, c]);
|
|
12744
12751
|
return /* @__PURE__ */ m.createElement("div", { className: `${n}` }, h, u);
|
|
12745
|
-
},
|
|
12752
|
+
}, fy = m.forwardRef(
|
|
12746
12753
|
(r, n) => {
|
|
12747
|
-
const { floatBarData: e, operationType: t } = Ce(Te), i = J(() => (e == null ? void 0 : e.scaleType) !== Fe.all || t === W.RotateNode ? null : /* @__PURE__ */ m.createElement(
|
|
12754
|
+
const { floatBarData: e, operationType: t } = Ce(Te), i = J(() => (e == null ? void 0 : e.scaleType) !== Fe.all || t === W.RotateNode ? null : /* @__PURE__ */ m.createElement(oy, null), [e, t]), o = J(() => (e == null ? void 0 : e.scaleType) !== Fe.both || t === W.RotateNode ? null : /* @__PURE__ */ m.createElement(sy, null), [e, t]), s = J(() => (e == null ? void 0 : e.scaleType) !== Fe.proportional || t === W.RotateNode ? null : /* @__PURE__ */ m.createElement(ay, null), [e, t]), a = J(() => (e == null ? void 0 : e.scaleType) === Fe.none && (e != null && e.canLock) ? /* @__PURE__ */ m.createElement(cy, null) : null, [e]);
|
|
12748
12755
|
return /* @__PURE__ */ m.createElement(
|
|
12749
12756
|
"div",
|
|
12750
12757
|
{
|
|
@@ -12763,7 +12770,7 @@ const Sp = (r) => {
|
|
|
12763
12770
|
r.children
|
|
12764
12771
|
);
|
|
12765
12772
|
}
|
|
12766
|
-
),
|
|
12773
|
+
), My = m.memo(
|
|
12767
12774
|
(r) => {
|
|
12768
12775
|
const { isHide: n, operationType: e, floatBarData: t } = r;
|
|
12769
12776
|
return n && e === W.None && ee(t == null ? void 0 : t.x) && ee(t == null ? void 0 : t.y) && ee(t == null ? void 0 : t.w) && ee(t == null ? void 0 : t.h) ? /* @__PURE__ */ m.createElement(
|
|
@@ -12788,30 +12795,30 @@ const Sp = (r) => {
|
|
|
12788
12795
|
) : null;
|
|
12789
12796
|
},
|
|
12790
12797
|
(r, n) => !!le(r, n)
|
|
12791
|
-
),
|
|
12798
|
+
), py = m.forwardRef(
|
|
12792
12799
|
(r, n) => {
|
|
12793
12800
|
const { floatBarData: e, operationType: t, mananger: i } = Ce(Te), { editors: o, isHide: s, canSelectorSwitch: a } = r, c = J(() => {
|
|
12794
12801
|
var u;
|
|
12795
|
-
return e != null && e.canRotate && ((u = e == null ? void 0 : e.selectIds) == null ? void 0 : u.length) === 1 && (t === W.None || t === W.RotateNode) ? /* @__PURE__ */ m.createElement(
|
|
12796
|
-
}, [e, t]), l = J(() => ((e == null ? void 0 : e.scaleType) === Fe.all || (e == null ? void 0 : e.scaleType) === Fe.proportional) && (t === W.None || t === W.ScaleNode) && ee(e == null ? void 0 : e.x) && ee(e == null ? void 0 : e.y) ? /* @__PURE__ */ m.createElement(
|
|
12802
|
+
return e != null && e.canRotate && ((u = e == null ? void 0 : e.selectIds) == null ? void 0 : u.length) === 1 && (t === W.None || t === W.RotateNode) ? /* @__PURE__ */ m.createElement(ly, { className: De.RotateBtn }) : null;
|
|
12803
|
+
}, [e, t]), l = J(() => ((e == null ? void 0 : e.scaleType) === Fe.all || (e == null ? void 0 : e.scaleType) === Fe.proportional) && (t === W.None || t === W.ScaleNode) && ee(e == null ? void 0 : e.x) && ee(e == null ? void 0 : e.y) ? /* @__PURE__ */ m.createElement(dy, { className: De.ResizeBtn }) : null, [
|
|
12797
12804
|
e == null ? void 0 : e.scaleType,
|
|
12798
12805
|
t,
|
|
12799
12806
|
e == null ? void 0 : e.x,
|
|
12800
12807
|
e == null ? void 0 : e.y
|
|
12801
|
-
]), h = J(() => (e == null ? void 0 : e.scaleType) === Fe.both && (t === W.None || t === W.SetPoint) ? /* @__PURE__ */ m.createElement(
|
|
12808
|
+
]), h = J(() => (e == null ? void 0 : e.scaleType) === Fe.both && (t === W.None || t === W.SetPoint) ? /* @__PURE__ */ m.createElement(gy, { className: De.ResizeTowBox }) : null, [e == null ? void 0 : e.scaleType, t]);
|
|
12802
12809
|
return /* @__PURE__ */ m.createElement(
|
|
12803
12810
|
"div",
|
|
12804
12811
|
{
|
|
12805
12812
|
className: De.FloatBar,
|
|
12806
12813
|
onPointerOver: (u) => (Ut(u), i == null || i.control.worker.blurCursor(i.viewId), !1)
|
|
12807
12814
|
},
|
|
12808
|
-
/* @__PURE__ */ m.createElement(
|
|
12809
|
-
/* @__PURE__ */ m.createElement(
|
|
12815
|
+
/* @__PURE__ */ m.createElement(fy, { ref: n }),
|
|
12816
|
+
/* @__PURE__ */ m.createElement(uy, { editors: o, canSelectorSwitch: a }),
|
|
12810
12817
|
c,
|
|
12811
12818
|
l,
|
|
12812
12819
|
h,
|
|
12813
12820
|
/* @__PURE__ */ m.createElement(
|
|
12814
|
-
|
|
12821
|
+
My,
|
|
12815
12822
|
{
|
|
12816
12823
|
isHide: s,
|
|
12817
12824
|
operationType: t,
|
|
@@ -12820,11 +12827,11 @@ const Sp = (r) => {
|
|
|
12820
12827
|
)
|
|
12821
12828
|
);
|
|
12822
12829
|
}
|
|
12823
|
-
),
|
|
12824
|
-
|
|
12830
|
+
), yy = m.memo(
|
|
12831
|
+
py,
|
|
12825
12832
|
(r, n) => !!le(r, n)
|
|
12826
12833
|
);
|
|
12827
|
-
class
|
|
12834
|
+
class Iy extends m.Component {
|
|
12828
12835
|
constructor(e) {
|
|
12829
12836
|
super(e);
|
|
12830
12837
|
I(this, "renderAvatar", (e) => {
|
|
@@ -12880,7 +12887,7 @@ class yy extends m.Component {
|
|
|
12880
12887
|
);
|
|
12881
12888
|
});
|
|
12882
12889
|
I(this, "renderCursor", (e) => {
|
|
12883
|
-
const t =
|
|
12890
|
+
const t = Wp.get(e);
|
|
12884
12891
|
return t && this.props.isEnableCursor ? /* @__PURE__ */ m.createElement(
|
|
12885
12892
|
"img",
|
|
12886
12893
|
{
|
|
@@ -13035,7 +13042,7 @@ class yy extends m.Component {
|
|
|
13035
13042
|
}
|
|
13036
13043
|
}
|
|
13037
13044
|
}
|
|
13038
|
-
const
|
|
13045
|
+
const my = (r) => {
|
|
13039
13046
|
var s;
|
|
13040
13047
|
const { className: n, info: e, isEnableCursor: t } = r, { roomMember: i, ...o } = e || {};
|
|
13041
13048
|
return /* @__PURE__ */ m.createElement(
|
|
@@ -13048,14 +13055,14 @@ const Iy = (r) => {
|
|
|
13048
13055
|
} : { display: "none" }
|
|
13049
13056
|
},
|
|
13050
13057
|
i && /* @__PURE__ */ m.createElement(
|
|
13051
|
-
|
|
13058
|
+
Iy,
|
|
13052
13059
|
{
|
|
13053
13060
|
roomMember: i,
|
|
13054
13061
|
isEnableCursor: t
|
|
13055
13062
|
}
|
|
13056
13063
|
)
|
|
13057
13064
|
);
|
|
13058
|
-
},
|
|
13065
|
+
}, wy = (r) => {
|
|
13059
13066
|
const { className: n, manager: e } = r, [t, i] = ae();
|
|
13060
13067
|
ge(() => (e.internalMsgEmitter.on(
|
|
13061
13068
|
[te.Cursor, e.viewId],
|
|
@@ -13074,7 +13081,7 @@ const Iy = (r) => {
|
|
|
13074
13081
|
const a = t.map((c) => {
|
|
13075
13082
|
var l;
|
|
13076
13083
|
return c.roomMember ? /* @__PURE__ */ m.createElement(
|
|
13077
|
-
|
|
13084
|
+
my,
|
|
13078
13085
|
{
|
|
13079
13086
|
key: (l = c.roomMember) == null ? void 0 : l.memberId,
|
|
13080
13087
|
className: n,
|
|
@@ -13087,7 +13094,7 @@ const Iy = (r) => {
|
|
|
13087
13094
|
}
|
|
13088
13095
|
return null;
|
|
13089
13096
|
}, [t]);
|
|
13090
|
-
},
|
|
13097
|
+
}, Ty = (r) => {
|
|
13091
13098
|
const { viewId: n, miniMapCanvas: e, highlightColor: t, miniMapManager: i, contianer: o } = r, [s, a] = ae();
|
|
13092
13099
|
ge(() => (c(), i.listener.addListener(
|
|
13093
13100
|
[n, "viewCameraUpate"],
|
|
@@ -13180,7 +13187,7 @@ const Iy = (r) => {
|
|
|
13180
13187
|
}
|
|
13181
13188
|
)
|
|
13182
13189
|
);
|
|
13183
|
-
},
|
|
13190
|
+
}, Ny = (r) => {
|
|
13184
13191
|
const { miniMapManager: n, active: e, className: t } = r, i = J(() => {
|
|
13185
13192
|
const o = n.maps;
|
|
13186
13193
|
if (e) {
|
|
@@ -13191,7 +13198,7 @@ const Iy = (r) => {
|
|
|
13191
13198
|
const h = n.highlightColor;
|
|
13192
13199
|
return Yr(
|
|
13193
13200
|
/* @__PURE__ */ m.createElement(
|
|
13194
|
-
|
|
13201
|
+
Ty,
|
|
13195
13202
|
{
|
|
13196
13203
|
viewId: e,
|
|
13197
13204
|
...l,
|
|
@@ -13385,7 +13392,7 @@ class qn extends m.Component {
|
|
|
13385
13392
|
}
|
|
13386
13393
|
},
|
|
13387
13394
|
this.state.showFloatBar && /* @__PURE__ */ m.createElement(
|
|
13388
|
-
|
|
13395
|
+
yy,
|
|
13389
13396
|
{
|
|
13390
13397
|
ref: this.props.refs.floatBarRef,
|
|
13391
13398
|
editors: this.state.editors,
|
|
@@ -13394,7 +13401,7 @@ class qn extends m.Component {
|
|
|
13394
13401
|
}
|
|
13395
13402
|
) || null,
|
|
13396
13403
|
((c = this.state.editors) == null ? void 0 : c.size) && /* @__PURE__ */ m.createElement(
|
|
13397
|
-
|
|
13404
|
+
ry,
|
|
13398
13405
|
{
|
|
13399
13406
|
className: De.TextEditorContainer,
|
|
13400
13407
|
showFloatBtns: this.showTextFloatBar && e && this.state.showFloatBarBtn || !1,
|
|
@@ -13403,13 +13410,13 @@ class qn extends m.Component {
|
|
|
13403
13410
|
}
|
|
13404
13411
|
) || null
|
|
13405
13412
|
), /* @__PURE__ */ m.createElement(
|
|
13406
|
-
|
|
13413
|
+
wy,
|
|
13407
13414
|
{
|
|
13408
13415
|
className: De.CursorBox,
|
|
13409
13416
|
manager: this.props.mananger
|
|
13410
13417
|
}
|
|
13411
13418
|
), !this.props.mananger.control.isUseSimple && /* @__PURE__ */ m.createElement(
|
|
13412
|
-
|
|
13419
|
+
Ny,
|
|
13413
13420
|
{
|
|
13414
13421
|
className: De.MiniMapBox,
|
|
13415
13422
|
active: this.state.activeMiniMapViewId,
|
|
@@ -13418,7 +13425,7 @@ class qn extends m.Component {
|
|
|
13418
13425
|
));
|
|
13419
13426
|
}
|
|
13420
13427
|
}
|
|
13421
|
-
class
|
|
13428
|
+
class vy extends Ar {
|
|
13422
13429
|
constructor(e, t) {
|
|
13423
13430
|
super(e, t);
|
|
13424
13431
|
I(this, "width", 1e3);
|
|
@@ -13490,7 +13497,7 @@ class Ny extends br {
|
|
|
13490
13497
|
), this.control.room && this.bindDisplayerEvent(this.eventTragetElement), this;
|
|
13491
13498
|
}
|
|
13492
13499
|
}
|
|
13493
|
-
class
|
|
13500
|
+
class Cy extends ap {
|
|
13494
13501
|
constructor(e, t, i) {
|
|
13495
13502
|
super(e, t, i);
|
|
13496
13503
|
I(this, "dpr", Nt());
|
|
@@ -13601,7 +13608,7 @@ class Qe extends Et {
|
|
|
13601
13608
|
const t = e.divElement;
|
|
13602
13609
|
if (!t || !e.focusScenePath || !(e.focusScenePath || e.scenePath))
|
|
13603
13610
|
return;
|
|
13604
|
-
const o = new
|
|
13611
|
+
const o = new vy(
|
|
13605
13612
|
this.control,
|
|
13606
13613
|
ke.InternalMsgEmitter
|
|
13607
13614
|
), s = e.size.width || o.width, a = e.size.height || o.height, l = {
|
|
@@ -13707,7 +13714,7 @@ class Qe extends Et {
|
|
|
13707
13714
|
}, 0);
|
|
13708
13715
|
});
|
|
13709
13716
|
}
|
|
13710
|
-
const a = new
|
|
13717
|
+
const a = new Cy(
|
|
13711
13718
|
t,
|
|
13712
13719
|
this.control,
|
|
13713
13720
|
ke.InternalMsgEmitter
|
|
@@ -14042,43 +14049,43 @@ class ct extends ke {
|
|
|
14042
14049
|
}), this.viewContainerManager.listenerWindowManager(this.windowManager);
|
|
14043
14050
|
}
|
|
14044
14051
|
}
|
|
14045
|
-
const
|
|
14052
|
+
const A = class A extends Zi {
|
|
14046
14053
|
constructor() {
|
|
14047
14054
|
super(...arguments);
|
|
14048
14055
|
I(this, "onPhaseChanged", (e) => {
|
|
14049
14056
|
var t;
|
|
14050
|
-
e === $i.Reconnecting && ((t =
|
|
14057
|
+
e === $i.Reconnecting && ((t = A.currentManager) == null || t.setSnapshootData());
|
|
14051
14058
|
});
|
|
14052
14059
|
I(this, "updateRoomWritable", () => {
|
|
14053
14060
|
var e;
|
|
14054
|
-
(e =
|
|
14061
|
+
(e = A.currentManager) == null || e.onWritableChange(
|
|
14055
14062
|
this.displayer.isWritable
|
|
14056
14063
|
);
|
|
14057
14064
|
});
|
|
14058
14065
|
I(this, "roomStateChangeListener", async (e) => {
|
|
14059
14066
|
var t, i;
|
|
14060
|
-
e != null && e.roomMembers && ((t =
|
|
14067
|
+
e != null && e.roomMembers && ((t = A.currentManager) == null || t.onRoomMembersChange(
|
|
14061
14068
|
e.roomMembers
|
|
14062
|
-
)), !(G(this.displayer) && !this.displayer.isWritable) && e.memberState && ((i =
|
|
14069
|
+
)), !(G(this.displayer) && !this.displayer.isWritable) && e.memberState && ((i = A.currentManager) == null || i.onMemberChange(
|
|
14063
14070
|
e.memberState
|
|
14064
14071
|
));
|
|
14065
14072
|
});
|
|
14066
14073
|
}
|
|
14067
14074
|
static async getInstance(e, t) {
|
|
14068
14075
|
var w;
|
|
14069
|
-
t.options && (((w = t.options.extras) == null ? void 0 : w.useWorker) === "mainThread" && (t.options.cdn.fullWorkerUrl = "", t.options.cdn.subWorkerUrl = ""), (t.options.extras && t.options.extras.useWorker !== "mainThread" || !t.options.extras) && !t.options.cdn.fullWorkerUrl && !t.options.cdn.subWorkerUrl &&
|
|
14070
|
-
"[ApplianceMultiPlugin] you must adaptor options cdn fullWorkerUrl and subWorkerUrl"
|
|
14076
|
+
t.options && (((w = t.options.extras) == null ? void 0 : w.useWorker) === "mainThread" && (t.options.cdn.fullWorkerUrl = "", t.options.cdn.subWorkerUrl = ""), (t.options.extras && t.options.extras.useWorker !== "mainThread" || !t.options.extras) && !t.options.cdn.fullWorkerUrl && !t.options.cdn.subWorkerUrl && A.logger.error(
|
|
14077
|
+
"[Appliance]: [ApplianceMultiPlugin] you must adaptor options cdn fullWorkerUrl and subWorkerUrl"
|
|
14071
14078
|
));
|
|
14072
14079
|
const i = e.displayer, o = i.callbacks.on, s = i.callbacks.off, a = i.callbacks.once, c = e.cleanCurrentScene, l = e.mainView.setMemberState;
|
|
14073
14080
|
let h;
|
|
14074
|
-
G(i) && (h = i.setWritable), t != null && t.logger && (
|
|
14081
|
+
G(i) && (h = i.setWritable), t != null && t.logger && (A.logger = t.logger);
|
|
14075
14082
|
let u = i.getInvisiblePlugin(
|
|
14076
|
-
|
|
14083
|
+
A.kind
|
|
14077
14084
|
);
|
|
14078
|
-
u || (u = await
|
|
14085
|
+
u || (u = await A.createApplianceMultiPlugin(
|
|
14079
14086
|
i,
|
|
14080
|
-
|
|
14081
|
-
)), i && u &&
|
|
14087
|
+
A.kind
|
|
14088
|
+
)), i && u && A.createCurrentManager(
|
|
14082
14089
|
e,
|
|
14083
14090
|
{
|
|
14084
14091
|
cdn: t.options.cdn,
|
|
@@ -14092,54 +14099,54 @@ const b = class b extends Zi {
|
|
|
14092
14099
|
const g = {
|
|
14093
14100
|
displayer: i,
|
|
14094
14101
|
windowManager: e,
|
|
14095
|
-
currentManager:
|
|
14102
|
+
currentManager: A.currentManager,
|
|
14096
14103
|
maxScreenshotWidth: 10 * 1024,
|
|
14097
14104
|
maxScreenshotHeight: 10 * 1024,
|
|
14098
14105
|
getBoundingRectAsync: async function(p) {
|
|
14099
14106
|
var S;
|
|
14100
|
-
|
|
14107
|
+
A.logger.info(
|
|
14101
14108
|
"[ApplianceMultiPlugin] getBoundingRectAsync"
|
|
14102
14109
|
);
|
|
14103
|
-
const f = (e.mainView || i).getBoundingRect(p), N = await ((S =
|
|
14110
|
+
const f = (e.mainView || i).getBoundingRect(p), N = await ((S = A.currentManager) == null ? void 0 : S.getBoundingRect(p));
|
|
14104
14111
|
return !f.width || !f.height ? N : Kn(f, N);
|
|
14105
14112
|
},
|
|
14106
14113
|
screenshotToCanvasAsync: async function(p, f, N, S, C, k) {
|
|
14107
14114
|
var z;
|
|
14108
|
-
|
|
14115
|
+
A.logger.info(
|
|
14109
14116
|
"[ApplianceMultiPlugin] screenshotToCanvasAsync"
|
|
14110
14117
|
);
|
|
14111
|
-
let v = N,
|
|
14112
|
-
v > this.maxScreenshotWidth && (P = this.maxScreenshotWidth / v * P, v = this.maxScreenshotWidth),
|
|
14118
|
+
let v = N, b = S, P = C.scale;
|
|
14119
|
+
v > this.maxScreenshotWidth && (P = this.maxScreenshotWidth / v * P, v = this.maxScreenshotWidth), b > this.maxScreenshotHeight && (P = Math.min(this.maxScreenshotHeight / b * P, P), b = this.maxScreenshotHeight), C.scale = P;
|
|
14113
14120
|
const E = document.createElement("canvas"), O = E.getContext("2d");
|
|
14114
|
-
E.width = v * (k || 1), E.height =
|
|
14121
|
+
E.width = v * (k || 1), E.height = b * (k || 1), O && ((e.mainView || i).screenshotToCanvas(
|
|
14115
14122
|
O,
|
|
14116
14123
|
f,
|
|
14117
14124
|
v,
|
|
14118
|
-
|
|
14125
|
+
b,
|
|
14119
14126
|
C,
|
|
14120
14127
|
k
|
|
14121
14128
|
), p.drawImage(
|
|
14122
14129
|
E,
|
|
14123
14130
|
Math.floor((N - v) / 2),
|
|
14124
|
-
Math.floor((S -
|
|
14131
|
+
Math.floor((S - b) / 2),
|
|
14125
14132
|
v * (k || 1),
|
|
14126
|
-
|
|
14133
|
+
b * (k || 1),
|
|
14127
14134
|
0,
|
|
14128
14135
|
0,
|
|
14129
14136
|
v,
|
|
14130
|
-
|
|
14131
|
-
), E.remove()),
|
|
14137
|
+
b
|
|
14138
|
+
), E.remove()), A.currentManager && await ((z = A.currentManager) == null ? void 0 : z.screenshotToCanvas(
|
|
14132
14139
|
p,
|
|
14133
14140
|
f,
|
|
14134
14141
|
v,
|
|
14135
|
-
|
|
14142
|
+
b,
|
|
14136
14143
|
C,
|
|
14137
14144
|
Math.floor((N - v) / 2),
|
|
14138
|
-
Math.floor((S -
|
|
14145
|
+
Math.floor((S - b) / 2)
|
|
14139
14146
|
));
|
|
14140
14147
|
},
|
|
14141
14148
|
scenePreviewAsync: async function(p, f, N, S, C) {
|
|
14142
|
-
|
|
14149
|
+
A.logger.info(
|
|
14143
14150
|
"[ApplianceMultiPlugin] scenePreviewAsync"
|
|
14144
14151
|
), (e.mainView || i).scenePreview(
|
|
14145
14152
|
p,
|
|
@@ -14149,13 +14156,13 @@ const b = class b extends Zi {
|
|
|
14149
14156
|
C
|
|
14150
14157
|
);
|
|
14151
14158
|
const k = document.createElement("img");
|
|
14152
|
-
k.className = "appliance-plugin-fill-scene-snapshot-img", f.append(k), getComputedStyle(f).position || (f.style.position = "relative"),
|
|
14159
|
+
k.className = "appliance-plugin-fill-scene-snapshot-img", f.append(k), getComputedStyle(f).position || (f.style.position = "relative"), A.currentManager && await A.currentManager.scenePreview(
|
|
14153
14160
|
p,
|
|
14154
14161
|
k
|
|
14155
14162
|
);
|
|
14156
14163
|
},
|
|
14157
14164
|
fillSceneSnapshotAsync: async function(p, f, N, S, C) {
|
|
14158
|
-
|
|
14165
|
+
A.logger.info(
|
|
14159
14166
|
"[ApplianceMultiPlugin] fillSceneSnapshotAsync"
|
|
14160
14167
|
), f.innerHTML = "", (e.mainView || i).fillSceneSnapshot(
|
|
14161
14168
|
p,
|
|
@@ -14165,20 +14172,20 @@ const b = class b extends Zi {
|
|
|
14165
14172
|
C
|
|
14166
14173
|
);
|
|
14167
14174
|
const k = N || e.mainView.size.width, v = S || e.mainView.size.height;
|
|
14168
|
-
let
|
|
14169
|
-
|
|
14175
|
+
let b = await this.getBoundingRectAsync(p);
|
|
14176
|
+
b || (b = {
|
|
14170
14177
|
originX: 0,
|
|
14171
14178
|
originY: 0,
|
|
14172
14179
|
width: k,
|
|
14173
14180
|
height: v
|
|
14174
14181
|
});
|
|
14175
|
-
let P = Math.max(
|
|
14182
|
+
let P = Math.max(b == null ? void 0 : b.width, k), E = Math.max(b == null ? void 0 : b.height, v), O = 1;
|
|
14176
14183
|
const z = P > k && Math.min(k / P, O) || O, L = E > v && Math.min(v / E, O) || O;
|
|
14177
14184
|
z <= L ? (P = z < 1 && k || P, E = Math.floor(E * z) + 1, O = z) : z > L && (E = L < 1 && v || E, P = Math.floor(P * L) + 1, O = L);
|
|
14178
14185
|
const j = {
|
|
14179
14186
|
scale: O,
|
|
14180
|
-
centerX:
|
|
14181
|
-
centerY:
|
|
14187
|
+
centerX: b.originX + b.width / 2,
|
|
14188
|
+
centerY: b.originY + b.height / 2
|
|
14182
14189
|
}, F = document.createElement("canvas"), X = F.getContext("2d");
|
|
14183
14190
|
F.width = P, F.height = E, X && await this.screenshotToCanvasAsync(
|
|
14184
14191
|
X,
|
|
@@ -14196,23 +14203,23 @@ const b = class b extends Zi {
|
|
|
14196
14203
|
}, f.append(Y), getComputedStyle(f).position || (f.style.position = "relative");
|
|
14197
14204
|
},
|
|
14198
14205
|
_callbacksOn: function(p, f) {
|
|
14199
|
-
|
|
14206
|
+
A.logger.info(
|
|
14200
14207
|
`[ApplianceMultiPlugin] callbacks ${p}`
|
|
14201
14208
|
), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && G(i) && i.isWritable ? ct.InternalMsgEmitter.on(p, f) : o.call(i.callbacks, p, f);
|
|
14202
14209
|
},
|
|
14203
14210
|
_callbacksOnce: function(p, f) {
|
|
14204
|
-
|
|
14211
|
+
A.logger.info(
|
|
14205
14212
|
`[ApplianceMultiPlugin] callbacks ${p}`
|
|
14206
14213
|
), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && G(i) && i.isWritable ? ct.InternalMsgEmitter.on(p, f) : a.call(i.callbacks, p, f);
|
|
14207
14214
|
},
|
|
14208
14215
|
_callbacksOff: function(p, f) {
|
|
14209
|
-
|
|
14216
|
+
A.logger.info(
|
|
14210
14217
|
`[ApplianceMultiPlugin] callbacks ${p}`
|
|
14211
14218
|
), (p === "onCanUndoStepsUpdate" || p === "onCanRedoStepsUpdate") && G(i) && i.isWritable ? ct.InternalMsgEmitter.off(p, f) : s.call(i.callbacks, p, f);
|
|
14212
14219
|
},
|
|
14213
14220
|
canRedoSteps() {
|
|
14214
|
-
if (
|
|
14215
|
-
const p =
|
|
14221
|
+
if (A.logger.info("[ApplianceMultiPlugin] canRedoSteps"), A.currentManager && G(i) && !i.disableSerialization) {
|
|
14222
|
+
const p = A.currentManager.viewContainerManager.focuedView, f = p == null ? void 0 : p.focusScenePath;
|
|
14216
14223
|
if (p && f)
|
|
14217
14224
|
return p.displayer.commiter.redoStack.filter(
|
|
14218
14225
|
(N) => N.scenePath === f
|
|
@@ -14221,8 +14228,8 @@ const b = class b extends Zi {
|
|
|
14221
14228
|
return 0;
|
|
14222
14229
|
},
|
|
14223
14230
|
canUndoSteps() {
|
|
14224
|
-
if (
|
|
14225
|
-
const p =
|
|
14231
|
+
if (A.logger.info("[ApplianceMultiPlugin] canUndoSteps"), A.currentManager && G(i) && !i.disableSerialization) {
|
|
14232
|
+
const p = A.currentManager.viewContainerManager.focuedView, f = p == null ? void 0 : p.focusScenePath;
|
|
14226
14233
|
if (p && f)
|
|
14227
14234
|
return p.displayer.commiter.undoStack.filter(
|
|
14228
14235
|
(C) => C.scenePath === f
|
|
@@ -14231,29 +14238,29 @@ const b = class b extends Zi {
|
|
|
14231
14238
|
return 0;
|
|
14232
14239
|
},
|
|
14233
14240
|
undo: function() {
|
|
14234
|
-
return
|
|
14241
|
+
return A.logger.info("[ApplianceMultiPlugin] undo"), A.currentManager && G(i) && !i.disableSerialization && i.isWritable ? A.currentManager.viewContainerManager.undo() : 0;
|
|
14235
14242
|
},
|
|
14236
14243
|
redo: function() {
|
|
14237
|
-
return
|
|
14244
|
+
return A.logger.info("[ApplianceMultiPlugin] redo"), A.currentManager && G(i) && !i.disableSerialization && i.isWritable ? A.currentManager.viewContainerManager.redo() : 0;
|
|
14238
14245
|
},
|
|
14239
14246
|
cleanCurrentScene: function() {
|
|
14240
|
-
|
|
14247
|
+
A.logger.info(
|
|
14241
14248
|
"[ApplianceMultiPlugin] cleanCurrentScene"
|
|
14242
|
-
),
|
|
14249
|
+
), A.currentManager && G(i) && i.isWritable && (A.currentManager.cleanCurrentScene(), c.call(e));
|
|
14243
14250
|
},
|
|
14244
14251
|
insertImage: function(p) {
|
|
14245
|
-
if (
|
|
14246
|
-
const f =
|
|
14247
|
-
|
|
14252
|
+
if (A.logger.info("[ApplianceMultiPlugin] insertImage"), A.currentManager && G(i) && i.isWritable) {
|
|
14253
|
+
const f = A.currentManager.viewContainerManager.focuedViewId || pe;
|
|
14254
|
+
A.currentManager.worker.insertImage(
|
|
14248
14255
|
f,
|
|
14249
14256
|
p
|
|
14250
14257
|
);
|
|
14251
14258
|
}
|
|
14252
14259
|
},
|
|
14253
14260
|
lockImage: function(p, f) {
|
|
14254
|
-
if (
|
|
14255
|
-
const N =
|
|
14256
|
-
|
|
14261
|
+
if (A.logger.info("[ApplianceMultiPlugin] lockImage"), A.currentManager && G(i) && i.isWritable) {
|
|
14262
|
+
const N = A.currentManager.viewContainerManager.focuedViewId || pe;
|
|
14263
|
+
A.currentManager.worker.lockImage(
|
|
14257
14264
|
N,
|
|
14258
14265
|
p,
|
|
14259
14266
|
f
|
|
@@ -14261,11 +14268,11 @@ const b = class b extends Zi {
|
|
|
14261
14268
|
}
|
|
14262
14269
|
},
|
|
14263
14270
|
completeImageUpload: function(p, f) {
|
|
14264
|
-
if (
|
|
14271
|
+
if (A.logger.info(
|
|
14265
14272
|
"[ApplianceMultiPlugin] completeImageUpload"
|
|
14266
|
-
),
|
|
14267
|
-
const N =
|
|
14268
|
-
|
|
14273
|
+
), A.currentManager && G(i) && i.isWritable) {
|
|
14274
|
+
const N = A.currentManager.viewContainerManager.focuedViewId || pe;
|
|
14275
|
+
A.currentManager.worker.completeImageUpload(
|
|
14269
14276
|
N,
|
|
14270
14277
|
p,
|
|
14271
14278
|
f
|
|
@@ -14273,16 +14280,16 @@ const b = class b extends Zi {
|
|
|
14273
14280
|
}
|
|
14274
14281
|
},
|
|
14275
14282
|
getImagesInformation: function(p) {
|
|
14276
|
-
return
|
|
14283
|
+
return A.logger.info(
|
|
14277
14284
|
"[ApplianceMultiPlugin] completeImageUpload"
|
|
14278
|
-
),
|
|
14285
|
+
), A.currentManager && G(i) && i.isWritable ? A.currentManager.worker.getImagesInformation(
|
|
14279
14286
|
p
|
|
14280
14287
|
) : [];
|
|
14281
14288
|
},
|
|
14282
14289
|
insertText: function(p, f, N) {
|
|
14283
|
-
if (
|
|
14284
|
-
const S =
|
|
14285
|
-
return
|
|
14290
|
+
if (A.logger.info("[ApplianceMultiPlugin] insertText"), A.currentManager && G(i) && i.isWritable) {
|
|
14291
|
+
const S = A.currentManager.viewContainerManager.focuedViewId || pe;
|
|
14292
|
+
return A.currentManager.textEditorManager.insertText(
|
|
14286
14293
|
S,
|
|
14287
14294
|
p,
|
|
14288
14295
|
f,
|
|
@@ -14291,12 +14298,12 @@ const b = class b extends Zi {
|
|
|
14291
14298
|
}
|
|
14292
14299
|
},
|
|
14293
14300
|
updateText: function(p, f) {
|
|
14294
|
-
|
|
14301
|
+
A.logger.info("[ApplianceMultiPlugin] updateText"), A.currentManager && G(i) && i.isWritable && A.currentManager.textEditorManager.updateText(
|
|
14295
14302
|
p,
|
|
14296
14303
|
f
|
|
14297
14304
|
);
|
|
14298
14305
|
},
|
|
14299
|
-
callbacks: () => (
|
|
14306
|
+
callbacks: () => (A.logger.info(
|
|
14300
14307
|
"[ApplianceMultiPlugin] callbacks bind"
|
|
14301
14308
|
), {
|
|
14302
14309
|
...i.callbacks,
|
|
@@ -14305,18 +14312,18 @@ const b = class b extends Zi {
|
|
|
14305
14312
|
off: g._callbacksOff.bind(g)
|
|
14306
14313
|
}),
|
|
14307
14314
|
destroy() {
|
|
14308
|
-
|
|
14315
|
+
A.currentManager && (A.logger.info("[ApplianceMultiPlugin] destroy"), A.currentManager.destroy(), A.currentManager = void 0);
|
|
14309
14316
|
},
|
|
14310
14317
|
setMemberState(p) {
|
|
14311
14318
|
var N;
|
|
14312
|
-
|
|
14319
|
+
A.logger.info(
|
|
14313
14320
|
`[ApplianceMultiPlugin] setMemberState ${JSON.stringify(p)}`
|
|
14314
14321
|
);
|
|
14315
14322
|
const f = Object.keys(p);
|
|
14316
14323
|
if (G(i) && i.isWritable) {
|
|
14317
14324
|
if (f.includes("currentApplianceName"))
|
|
14318
14325
|
if (p.currentApplianceName && p.currentApplianceName === ne.laserPen) {
|
|
14319
|
-
if ((N =
|
|
14326
|
+
if ((N = A.currentManager) != null && N.isUseSimple)
|
|
14320
14327
|
throw new Error(
|
|
14321
14328
|
"[ApplianceMultiPlugin] laserPen must be not support in simple mode"
|
|
14322
14329
|
);
|
|
@@ -14333,92 +14340,92 @@ const b = class b extends Zi {
|
|
|
14333
14340
|
);
|
|
14334
14341
|
},
|
|
14335
14342
|
createMiniMap: async function(p, f) {
|
|
14336
|
-
if (
|
|
14343
|
+
if (A.logger.info(
|
|
14337
14344
|
"[ApplianceMultiPlugin] createMiniMap"
|
|
14338
|
-
),
|
|
14339
|
-
return
|
|
14345
|
+
), A.currentManager && G(i) && i.isWritable)
|
|
14346
|
+
return A.currentManager.createMiniMap(p, f);
|
|
14340
14347
|
},
|
|
14341
14348
|
destroyMiniMap: async function(p) {
|
|
14342
|
-
if (
|
|
14349
|
+
if (A.logger.info(
|
|
14343
14350
|
"[ApplianceMultiPlugin] destroyeMiniMap"
|
|
14344
|
-
),
|
|
14345
|
-
return
|
|
14351
|
+
), A.currentManager && G(i) && i.isWritable)
|
|
14352
|
+
return A.currentManager.destroyMiniMap(p);
|
|
14346
14353
|
},
|
|
14347
14354
|
filterRenderByUid(p, f, N) {
|
|
14348
|
-
if (
|
|
14355
|
+
if (A.logger.info(
|
|
14349
14356
|
"[ApplianceMultiPlugin] filterRenderByUid"
|
|
14350
|
-
),
|
|
14351
|
-
return
|
|
14357
|
+
), A.currentManager && G(i) && i.isWritable)
|
|
14358
|
+
return A.currentManager.filterRenderByUid(
|
|
14352
14359
|
p,
|
|
14353
14360
|
f,
|
|
14354
14361
|
N
|
|
14355
14362
|
);
|
|
14356
14363
|
},
|
|
14357
14364
|
cancelFilterRender(p, f) {
|
|
14358
|
-
if (
|
|
14365
|
+
if (A.logger.info(
|
|
14359
14366
|
"[ApplianceMultiPlugin] filterRenderByUid"
|
|
14360
|
-
),
|
|
14361
|
-
return
|
|
14367
|
+
), A.currentManager && G(i) && i.isWritable)
|
|
14368
|
+
return A.currentManager.cancelFilterRender(
|
|
14362
14369
|
p,
|
|
14363
14370
|
f
|
|
14364
14371
|
);
|
|
14365
14372
|
},
|
|
14366
14373
|
addListener: (p, f) => {
|
|
14367
|
-
|
|
14374
|
+
A.logger.info(
|
|
14368
14375
|
`[ApplianceMultiPlugin] addListener ${p}`
|
|
14369
14376
|
), ct.PublicMsgEmitter.on(p, f);
|
|
14370
14377
|
},
|
|
14371
14378
|
removeListener: (p, f) => {
|
|
14372
|
-
|
|
14379
|
+
A.logger.info(
|
|
14373
14380
|
`[ApplianceMultiPlugin] removeListener ${p}`
|
|
14374
14381
|
), ct.PublicMsgEmitter.off(p, f);
|
|
14375
14382
|
},
|
|
14376
14383
|
usePlugin: (p) => {
|
|
14377
14384
|
var f;
|
|
14378
|
-
|
|
14385
|
+
A.logger.info(
|
|
14379
14386
|
"[ApplianceMultiPlugin] usePlugin",
|
|
14380
14387
|
p.kind
|
|
14381
|
-
), (f =
|
|
14388
|
+
), (f = A.currentManager) == null || f.usePlugin(p);
|
|
14382
14389
|
},
|
|
14383
14390
|
getDisableDeviceInputs() {
|
|
14384
|
-
if (
|
|
14385
|
-
return
|
|
14391
|
+
if (A.currentManager && G(i))
|
|
14392
|
+
return A.currentManager.disableDeviceInputs;
|
|
14386
14393
|
},
|
|
14387
14394
|
setDisableDeviceInputs(p) {
|
|
14388
|
-
|
|
14395
|
+
A.logger.info(
|
|
14389
14396
|
`[ApplianceMultiPlugin] setDisableDeviceInputs ${p}`
|
|
14390
|
-
),
|
|
14397
|
+
), A.currentManager && G(i) && (A.currentManager.disableDeviceInputs = p);
|
|
14391
14398
|
},
|
|
14392
14399
|
getDisableCameraTransform() {
|
|
14393
|
-
if (
|
|
14394
|
-
return
|
|
14400
|
+
if (A.currentManager && G(i))
|
|
14401
|
+
return A.currentManager.disableCameraTransform;
|
|
14395
14402
|
},
|
|
14396
14403
|
setDisableCameraTransform(p) {
|
|
14397
|
-
|
|
14404
|
+
A.logger.info(
|
|
14398
14405
|
`[ApplianceMultiPlugin] setDisableCameraTransform ${p}`
|
|
14399
|
-
),
|
|
14406
|
+
), A.currentManager && G(i) && (A.currentManager.disableCameraTransform = p);
|
|
14400
14407
|
},
|
|
14401
14408
|
getDisableEraseImage() {
|
|
14402
|
-
if (
|
|
14403
|
-
return
|
|
14409
|
+
if (A.currentManager && G(i))
|
|
14410
|
+
return A.currentManager.disableEraseImage;
|
|
14404
14411
|
},
|
|
14405
14412
|
setDisableEraseImage(p) {
|
|
14406
|
-
|
|
14413
|
+
A.logger.info(
|
|
14407
14414
|
`[ApplianceMultiPlugin] setDisableEraseImage ${p}`
|
|
14408
|
-
),
|
|
14415
|
+
), A.currentManager && G(i) && (A.currentManager.disableEraseImage = p);
|
|
14409
14416
|
},
|
|
14410
14417
|
setWritable: async function(p) {
|
|
14411
14418
|
var f;
|
|
14412
|
-
|
|
14419
|
+
A.logger.info(
|
|
14413
14420
|
`[ApplianceMultiPlugin] setWritable ${p}`
|
|
14414
|
-
), G(i) && h && (await ((f =
|
|
14421
|
+
), G(i) && h && (await ((f = A.currentManager) == null ? void 0 : f.setWritable(p)), await h.call(i, p));
|
|
14415
14422
|
},
|
|
14416
14423
|
requestIdleCallback: (p, f) => {
|
|
14417
14424
|
const N = (f == null ? void 0 : f.timeout) || 0, S = performance.now();
|
|
14418
14425
|
let C;
|
|
14419
14426
|
const k = new MessageChannel();
|
|
14420
14427
|
let v;
|
|
14421
|
-
const
|
|
14428
|
+
const b = (P) => {
|
|
14422
14429
|
try {
|
|
14423
14430
|
p({
|
|
14424
14431
|
didTimeout: P,
|
|
@@ -14428,7 +14435,7 @@ const b = class b extends Zi {
|
|
|
14428
14435
|
}
|
|
14429
14436
|
});
|
|
14430
14437
|
} catch (E) {
|
|
14431
|
-
|
|
14438
|
+
A.logger.error(
|
|
14432
14439
|
"[ApplianceMultiPlugin] requestIdleCallback error:",
|
|
14433
14440
|
E
|
|
14434
14441
|
);
|
|
@@ -14438,27 +14445,27 @@ const b = class b extends Zi {
|
|
|
14438
14445
|
};
|
|
14439
14446
|
return k.port1.onmessage = () => {
|
|
14440
14447
|
C = requestAnimationFrame(() => {
|
|
14441
|
-
N > 0 && performance.now() - S >= N ?
|
|
14448
|
+
N > 0 && performance.now() - S >= N ? b(!0) : b(!1);
|
|
14442
14449
|
});
|
|
14443
14450
|
}, k.port2.postMessage(null), N > 0 && (v = setTimeout(() => {
|
|
14444
|
-
|
|
14451
|
+
b(!0);
|
|
14445
14452
|
}, N)), v || C || 0;
|
|
14446
14453
|
},
|
|
14447
14454
|
cancelIdleCallback: (p) => {
|
|
14448
14455
|
try {
|
|
14449
14456
|
clearTimeout(p), cancelAnimationFrame(p);
|
|
14450
14457
|
} catch (f) {
|
|
14451
|
-
|
|
14458
|
+
A.logger.error(
|
|
14452
14459
|
"[ApplianceMultiPlugin] cancelIdleCallback error:",
|
|
14453
14460
|
f
|
|
14454
14461
|
);
|
|
14455
14462
|
}
|
|
14456
14463
|
},
|
|
14457
14464
|
injectMethodToObject: (p, f) => {
|
|
14458
|
-
if (
|
|
14465
|
+
if (A.logger.info(
|
|
14459
14466
|
`[ApplianceMultiPlugin] injectMethodToObject ${f}`
|
|
14460
14467
|
), typeof p[f] == "function" || typeof p[f] > "u") {
|
|
14461
|
-
(f === "requestIdleCallback" || f === "cancelIdleCallback") &&
|
|
14468
|
+
(f === "requestIdleCallback" || f === "cancelIdleCallback") && A.currentManager && A.currentManager.registerPolyfillMethod(
|
|
14462
14469
|
f
|
|
14463
14470
|
), p[f] = g[f];
|
|
14464
14471
|
return;
|
|
@@ -14466,20 +14473,20 @@ const b = class b extends Zi {
|
|
|
14466
14473
|
f === "callbacks" && (p.callbacks.on = g._callbacksOn.bind(g), p.callbacks.off = g._callbacksOff.bind(g), p.callbacks.once = g._callbacksOnce.bind(g));
|
|
14467
14474
|
},
|
|
14468
14475
|
blurText: () => {
|
|
14469
|
-
|
|
14476
|
+
A.logger.info("[ApplianceMultiPlugin] blurText"), A.currentManager && G(i) && i.isWritable && A.currentManager.textEditorManager.checkEmptyTextBlur();
|
|
14470
14477
|
},
|
|
14471
14478
|
hasElements: (p, f) => {
|
|
14472
14479
|
var N;
|
|
14473
|
-
if (
|
|
14480
|
+
if (A.logger.info(
|
|
14474
14481
|
`[ApplianceMultiPlugin] hasElements ${p}`
|
|
14475
|
-
),
|
|
14482
|
+
), A.currentManager && G(i) && i.isWritable) {
|
|
14476
14483
|
let S = p;
|
|
14477
14484
|
if (!S) {
|
|
14478
|
-
const C =
|
|
14485
|
+
const C = A.currentManager.viewContainerManager.focuedView;
|
|
14479
14486
|
S = C == null ? void 0 : C.focusScenePath;
|
|
14480
14487
|
}
|
|
14481
14488
|
if (S) {
|
|
14482
|
-
const C = (N =
|
|
14489
|
+
const C = (N = A.currentManager.collector) == null ? void 0 : N.getScenePathData(
|
|
14483
14490
|
S
|
|
14484
14491
|
);
|
|
14485
14492
|
if (C) {
|
|
@@ -14495,16 +14502,16 @@ const b = class b extends Zi {
|
|
|
14495
14502
|
},
|
|
14496
14503
|
getElements: (p, f) => {
|
|
14497
14504
|
var N;
|
|
14498
|
-
if (
|
|
14505
|
+
if (A.logger.info(
|
|
14499
14506
|
`[ApplianceMultiPlugin] getElements ${p}`
|
|
14500
|
-
),
|
|
14507
|
+
), A.currentManager && G(i) && i.isWritable) {
|
|
14501
14508
|
let S = p;
|
|
14502
14509
|
if (!S) {
|
|
14503
|
-
const C =
|
|
14510
|
+
const C = A.currentManager.viewContainerManager.focuedView;
|
|
14504
14511
|
S = C == null ? void 0 : C.focusScenePath;
|
|
14505
14512
|
}
|
|
14506
14513
|
if (S) {
|
|
14507
|
-
const C = (N =
|
|
14514
|
+
const C = (N = A.currentManager.collector) == null ? void 0 : N.getScenePathData(
|
|
14508
14515
|
S
|
|
14509
14516
|
), k = C && Object.values(C) || [];
|
|
14510
14517
|
return C && k.length > 0 && f ? k.filter(
|
|
@@ -14515,43 +14522,43 @@ const b = class b extends Zi {
|
|
|
14515
14522
|
}
|
|
14516
14523
|
},
|
|
14517
14524
|
stopDraw: (p) => {
|
|
14518
|
-
if (
|
|
14525
|
+
if (A.logger.info(
|
|
14519
14526
|
`[ApplianceMultiPlugin] stopDraw ${p}`
|
|
14520
|
-
),
|
|
14521
|
-
return
|
|
14527
|
+
), A.currentManager && G(i))
|
|
14528
|
+
return A.currentManager.stopDraw(p);
|
|
14522
14529
|
},
|
|
14523
14530
|
setViewLocalScenePathChange: async (p, f) => {
|
|
14524
|
-
|
|
14531
|
+
A.logger.info(
|
|
14525
14532
|
`[ApplianceMultiPlugin] setViewLocalScenePathChange ${p} ${f}`
|
|
14526
|
-
),
|
|
14533
|
+
), A.currentManager && await A.currentManager.setViewLocalScenePathChange(
|
|
14527
14534
|
f,
|
|
14528
14535
|
p
|
|
14529
14536
|
);
|
|
14530
14537
|
},
|
|
14531
14538
|
insertMarkmap: async (p, f) => {
|
|
14532
|
-
if (
|
|
14539
|
+
if (A.logger.info(
|
|
14533
14540
|
`[ApplianceMultiPlugin] insertMarkmap: ${p}, info: ${JSON.stringify(f)}`
|
|
14534
|
-
),
|
|
14535
|
-
return
|
|
14541
|
+
), A.currentManager && A.currentManager.isUseBackgroundThread)
|
|
14542
|
+
return A.currentManager.worker.insertBackgroundMarkMap(
|
|
14536
14543
|
p,
|
|
14537
14544
|
f
|
|
14538
14545
|
);
|
|
14539
14546
|
},
|
|
14540
14547
|
updateMarkmap: async (p, f, N) => {
|
|
14541
|
-
if (
|
|
14548
|
+
if (A.logger.info(
|
|
14542
14549
|
`[ApplianceMultiPlugin] updateMarkmap: ${p}, markmapId: ${f}, info: ${JSON.stringify(N)}`
|
|
14543
|
-
),
|
|
14544
|
-
return
|
|
14550
|
+
), A.currentManager && A.currentManager.isUseBackgroundThread)
|
|
14551
|
+
return A.currentManager.worker.updateBackgroundMarkMap(
|
|
14545
14552
|
p,
|
|
14546
14553
|
f,
|
|
14547
14554
|
N
|
|
14548
14555
|
);
|
|
14549
14556
|
},
|
|
14550
14557
|
insertBackgroundImage: async (p, f) => {
|
|
14551
|
-
if (
|
|
14558
|
+
if (A.logger.info(
|
|
14552
14559
|
`[ApplianceMultiPlugin] insertBackgroundImage: ${p}, info: ${JSON.stringify(f)}`
|
|
14553
|
-
),
|
|
14554
|
-
return
|
|
14560
|
+
), A.currentManager && A.currentManager.isUseBackgroundThread)
|
|
14561
|
+
return A.currentManager.worker.insertBackgroundSVG(
|
|
14555
14562
|
p,
|
|
14556
14563
|
f
|
|
14557
14564
|
);
|
|
@@ -14615,16 +14622,16 @@ const b = class b extends Zi {
|
|
|
14615
14622
|
get() {
|
|
14616
14623
|
return g.getDisableEraseImage();
|
|
14617
14624
|
}
|
|
14618
|
-
}), u &&
|
|
14625
|
+
}), u && A.currentManager && (A.currentManager.bindPlugin(u), u.init(i)), e._appliancePlugin = y, e._appliancePlugin;
|
|
14619
14626
|
}
|
|
14620
14627
|
static onCreate(e) {
|
|
14621
|
-
e &&
|
|
14628
|
+
e && A.currentManager && (A.currentManager.bindPlugin(
|
|
14622
14629
|
e
|
|
14623
14630
|
), e.init(e.displayer));
|
|
14624
14631
|
}
|
|
14625
14632
|
static async createApplianceMultiPlugin(e, t) {
|
|
14626
14633
|
try {
|
|
14627
|
-
await e.createInvisiblePlugin(
|
|
14634
|
+
await e.createInvisiblePlugin(A, {});
|
|
14628
14635
|
} catch (o) {
|
|
14629
14636
|
if (!e.isWritable) {
|
|
14630
14637
|
await e.setWritable(!0);
|
|
@@ -14634,7 +14641,7 @@ const b = class b extends Zi {
|
|
|
14634
14641
|
throw o;
|
|
14635
14642
|
}
|
|
14636
14643
|
let i = e.getInvisiblePlugin(t);
|
|
14637
|
-
return i || (i = await
|
|
14644
|
+
return i || (i = await A.createApplianceMultiPlugin(e, t)), i;
|
|
14638
14645
|
}
|
|
14639
14646
|
// static onDestroy(plugin: ApplianceMultiPlugin) {}
|
|
14640
14647
|
get isReplay() {
|
|
@@ -14646,9 +14653,9 @@ const b = class b extends Zi {
|
|
|
14646
14653
|
init(e) {
|
|
14647
14654
|
var i, o;
|
|
14648
14655
|
const t = e.state;
|
|
14649
|
-
(i =
|
|
14656
|
+
(i = A.currentManager) == null || i.onRoomMembersChange(
|
|
14650
14657
|
t.roomMembers
|
|
14651
|
-
), G(e) && ((o =
|
|
14658
|
+
), G(e) && ((o = A.currentManager) == null || o.onMemberChange(
|
|
14652
14659
|
t.memberState
|
|
14653
14660
|
)), this.displayer.callbacks.on(
|
|
14654
14661
|
this.callbackName,
|
|
@@ -14660,52 +14667,52 @@ const b = class b extends Zi {
|
|
|
14660
14667
|
}
|
|
14661
14668
|
destroy() {
|
|
14662
14669
|
var e;
|
|
14663
|
-
|
|
14670
|
+
A.logger.info("[ApplianceMultiPlugin] passive destroy"), (e = A.currentManager) == null || e.destroy(), A.currentManager = void 0;
|
|
14664
14671
|
}
|
|
14665
14672
|
};
|
|
14666
14673
|
// 组件类型,该组件的唯一识别符。应该取一个独特的名字,以和其他组件区分。
|
|
14667
|
-
I(
|
|
14674
|
+
I(A, "kind", "appliance-multi-plugin"), I(A, "currentManager"), I(A, "logger", {
|
|
14668
14675
|
info: console.log,
|
|
14669
14676
|
warn: console.warn,
|
|
14670
14677
|
error: console.error
|
|
14671
|
-
}), I(
|
|
14672
|
-
|
|
14678
|
+
}), I(A, "createCurrentManager", (e, t, i) => {
|
|
14679
|
+
A.currentManager && A.currentManager.destroy();
|
|
14673
14680
|
const o = {
|
|
14674
14681
|
plugin: i,
|
|
14675
14682
|
displayer: e.displayer,
|
|
14676
14683
|
options: t
|
|
14677
14684
|
}, s = new ct(o);
|
|
14678
|
-
if (
|
|
14685
|
+
if (A.logger.info(
|
|
14679
14686
|
"[ApplianceMultiPlugin] refresh ApplianceMultiManager object"
|
|
14680
|
-
), s.setWindowManager(e),
|
|
14687
|
+
), s.setWindowManager(e), A.currentManager = s, e.room) {
|
|
14681
14688
|
const a = s.hasOffscreenCanvas;
|
|
14682
14689
|
e.room.logger.info(
|
|
14683
|
-
`[ApplianceMultiPlugin] use ${a ? "worker" : "mainThread"}`
|
|
14690
|
+
`[Appliance]: [ApplianceMultiPlugin] use ${a ? "worker" : "mainThread"}`
|
|
14684
14691
|
);
|
|
14685
14692
|
}
|
|
14686
14693
|
});
|
|
14687
|
-
let Bi =
|
|
14688
|
-
var
|
|
14689
|
-
return
|
|
14690
|
-
},
|
|
14691
|
-
function
|
|
14692
|
-
for (var n = r.length; n-- &&
|
|
14694
|
+
let Bi = A;
|
|
14695
|
+
var Sy = He, ky = function() {
|
|
14696
|
+
return Sy.Date.now();
|
|
14697
|
+
}, xy = ky, jy = /\s/;
|
|
14698
|
+
function Dy(r) {
|
|
14699
|
+
for (var n = r.length; n-- && jy.test(r.charAt(n)); )
|
|
14693
14700
|
;
|
|
14694
14701
|
return n;
|
|
14695
14702
|
}
|
|
14696
|
-
var
|
|
14697
|
-
function
|
|
14698
|
-
return r && r.slice(0,
|
|
14703
|
+
var zy = Dy, Ay = zy, by = /^\s+/;
|
|
14704
|
+
function Ey(r) {
|
|
14705
|
+
return r && r.slice(0, Ay(r) + 1).replace(by, "");
|
|
14699
14706
|
}
|
|
14700
|
-
var
|
|
14701
|
-
function
|
|
14702
|
-
return typeof r == "symbol" ||
|
|
14707
|
+
var Ly = Ey, Py = Rt, Oy = yt, Ry = "[object Symbol]";
|
|
14708
|
+
function Yy(r) {
|
|
14709
|
+
return typeof r == "symbol" || Oy(r) && Py(r) == Ry;
|
|
14703
14710
|
}
|
|
14704
|
-
var
|
|
14705
|
-
function
|
|
14711
|
+
var Uy = Yy, By = Ly, Wi = ut, Wy = Uy, Fi = NaN, Fy = /^[-+]0x[0-9a-f]+$/i, Vy = /^0b[01]+$/i, Qy = /^0o[0-7]+$/i, Gy = parseInt;
|
|
14712
|
+
function Zy(r) {
|
|
14706
14713
|
if (typeof r == "number")
|
|
14707
14714
|
return r;
|
|
14708
|
-
if (
|
|
14715
|
+
if (Wy(r))
|
|
14709
14716
|
return Fi;
|
|
14710
14717
|
if (Wi(r)) {
|
|
14711
14718
|
var n = typeof r.valueOf == "function" ? r.valueOf() : r;
|
|
@@ -14713,30 +14720,30 @@ function Gy(r) {
|
|
|
14713
14720
|
}
|
|
14714
14721
|
if (typeof r != "string")
|
|
14715
14722
|
return r === 0 ? r : +r;
|
|
14716
|
-
r =
|
|
14717
|
-
var e =
|
|
14718
|
-
return e ||
|
|
14723
|
+
r = By(r);
|
|
14724
|
+
var e = Vy.test(r);
|
|
14725
|
+
return e || Qy.test(r) ? Gy(r.slice(2), e ? 2 : 8) : Fy.test(r) ? Fi : +r;
|
|
14719
14726
|
}
|
|
14720
|
-
var
|
|
14721
|
-
function
|
|
14727
|
+
var $y = Zy, Hy = ut, mn = xy, Vi = $y, Jy = "Expected a function", Xy = Math.max, Ky = Math.min;
|
|
14728
|
+
function qy(r, n, e) {
|
|
14722
14729
|
var t, i, o, s, a, c, l = 0, h = !1, u = !1, g = !0;
|
|
14723
14730
|
if (typeof r != "function")
|
|
14724
|
-
throw new TypeError(
|
|
14725
|
-
n = Vi(n) || 0,
|
|
14731
|
+
throw new TypeError(Jy);
|
|
14732
|
+
n = Vi(n) || 0, Hy(e) && (h = !!e.leading, u = "maxWait" in e, o = u ? Xy(Vi(e.maxWait) || 0, n) : o, g = "trailing" in e ? !!e.trailing : g);
|
|
14726
14733
|
function M(k) {
|
|
14727
|
-
var v = t,
|
|
14728
|
-
return t = i = void 0, l = k, s = r.apply(
|
|
14734
|
+
var v = t, b = i;
|
|
14735
|
+
return t = i = void 0, l = k, s = r.apply(b, v), s;
|
|
14729
14736
|
}
|
|
14730
14737
|
function d(k) {
|
|
14731
14738
|
return l = k, a = setTimeout(p, n), h ? M(k) : s;
|
|
14732
14739
|
}
|
|
14733
14740
|
function y(k) {
|
|
14734
|
-
var v = k - c,
|
|
14735
|
-
return u ?
|
|
14741
|
+
var v = k - c, b = k - l, P = n - v;
|
|
14742
|
+
return u ? Ky(P, o - b) : P;
|
|
14736
14743
|
}
|
|
14737
14744
|
function w(k) {
|
|
14738
|
-
var v = k - c,
|
|
14739
|
-
return c === void 0 || v >= n || v < 0 || u &&
|
|
14745
|
+
var v = k - c, b = k - l;
|
|
14746
|
+
return c === void 0 || v >= n || v < 0 || u && b >= o;
|
|
14740
14747
|
}
|
|
14741
14748
|
function p() {
|
|
14742
14749
|
var k = mn();
|
|
@@ -14765,20 +14772,20 @@ function Ky(r, n, e) {
|
|
|
14765
14772
|
}
|
|
14766
14773
|
return C.cancel = N, C.flush = S, C;
|
|
14767
14774
|
}
|
|
14768
|
-
var
|
|
14769
|
-
function
|
|
14775
|
+
var _y = qy, eI = _y, tI = ut, nI = "Expected a function";
|
|
14776
|
+
function iI(r, n, e) {
|
|
14770
14777
|
var t = !0, i = !0;
|
|
14771
14778
|
if (typeof r != "function")
|
|
14772
|
-
throw new TypeError(
|
|
14773
|
-
return
|
|
14779
|
+
throw new TypeError(nI);
|
|
14780
|
+
return tI(e) && (t = "leading" in e ? !!e.leading : t, i = "trailing" in e ? !!e.trailing : i), eI(r, n, {
|
|
14774
14781
|
leading: t,
|
|
14775
14782
|
maxWait: n,
|
|
14776
14783
|
trailing: i
|
|
14777
14784
|
});
|
|
14778
14785
|
}
|
|
14779
|
-
var
|
|
14780
|
-
const
|
|
14781
|
-
class
|
|
14786
|
+
var rI = iI;
|
|
14787
|
+
const oI = /* @__PURE__ */ Pn(rI);
|
|
14788
|
+
class sI extends Ar {
|
|
14782
14789
|
constructor(e, t) {
|
|
14783
14790
|
super(e, t);
|
|
14784
14791
|
I(this, "width", 1e3);
|
|
@@ -14837,7 +14844,7 @@ class oI extends br {
|
|
|
14837
14844
|
), this.control.room && this.bindDisplayerEvent(this.eventTragetElement)), this;
|
|
14838
14845
|
}
|
|
14839
14846
|
}
|
|
14840
|
-
class
|
|
14847
|
+
class tt extends Et {
|
|
14841
14848
|
constructor(e) {
|
|
14842
14849
|
super(e);
|
|
14843
14850
|
I(this, "focuedViewId");
|
|
@@ -14848,24 +14855,24 @@ class it extends Et {
|
|
|
14848
14855
|
bindMainView() {
|
|
14849
14856
|
if (!this.control.divMainView)
|
|
14850
14857
|
return;
|
|
14851
|
-
const e = new
|
|
14858
|
+
const e = new sI(
|
|
14852
14859
|
this.control,
|
|
14853
14860
|
ke.InternalMsgEmitter
|
|
14854
14861
|
), { width: t, height: i, dpr: o } = e, s = {
|
|
14855
14862
|
dpr: o,
|
|
14856
14863
|
originalPoint: [t / 2, i / 2],
|
|
14857
14864
|
offscreenCanvasOpt: {
|
|
14858
|
-
...
|
|
14865
|
+
...tt.defaultScreenCanvasOpt,
|
|
14859
14866
|
width: t,
|
|
14860
14867
|
height: i
|
|
14861
14868
|
},
|
|
14862
14869
|
layerOpt: {
|
|
14863
|
-
...
|
|
14870
|
+
...tt.defaultLayerOpt,
|
|
14864
14871
|
width: t,
|
|
14865
14872
|
height: i
|
|
14866
14873
|
},
|
|
14867
14874
|
cameraOpt: {
|
|
14868
|
-
...
|
|
14875
|
+
...tt.defaultCameraOpt,
|
|
14869
14876
|
width: t,
|
|
14870
14877
|
height: i
|
|
14871
14878
|
}
|
|
@@ -14890,22 +14897,22 @@ class it extends Et {
|
|
|
14890
14897
|
const t = this.getView(e);
|
|
14891
14898
|
if (t) {
|
|
14892
14899
|
const { width: o, height: s, dpr: a } = t.displayer;
|
|
14893
|
-
(i = this.control.pluginOptions.extras.canvasOpt) != null && i.contextType && (
|
|
14900
|
+
(i = this.control.pluginOptions.extras.canvasOpt) != null && i.contextType && (tt.defaultScreenCanvasOpt.contextType = this.control.pluginOptions.extras.canvasOpt.contextType);
|
|
14894
14901
|
const c = {
|
|
14895
14902
|
dpr: a,
|
|
14896
14903
|
originalPoint: [o / 2, s / 2],
|
|
14897
14904
|
offscreenCanvasOpt: {
|
|
14898
|
-
...
|
|
14905
|
+
...tt.defaultScreenCanvasOpt,
|
|
14899
14906
|
width: o,
|
|
14900
14907
|
height: s
|
|
14901
14908
|
},
|
|
14902
14909
|
layerOpt: {
|
|
14903
|
-
...
|
|
14910
|
+
...tt.defaultLayerOpt,
|
|
14904
14911
|
width: o,
|
|
14905
14912
|
height: s
|
|
14906
14913
|
},
|
|
14907
14914
|
cameraOpt: {
|
|
14908
|
-
...
|
|
14915
|
+
...tt.defaultCameraOpt,
|
|
14909
14916
|
width: o,
|
|
14910
14917
|
height: s
|
|
14911
14918
|
}
|
|
@@ -14947,7 +14954,7 @@ class Ge extends ke {
|
|
|
14947
14954
|
super(e);
|
|
14948
14955
|
I(this, "viewContainerManager");
|
|
14949
14956
|
I(this, "divMainView");
|
|
14950
|
-
I(this, "onCameraChange",
|
|
14957
|
+
I(this, "onCameraChange", oI(
|
|
14951
14958
|
(e) => {
|
|
14952
14959
|
var i;
|
|
14953
14960
|
const t = this.viewContainerManager.mainView;
|
|
@@ -14961,7 +14968,7 @@ class Ge extends ke {
|
|
|
14961
14968
|
internalMsgEmitter: Ge.InternalMsgEmitter,
|
|
14962
14969
|
publicMsgEmitter: Ge.PublicMsgEmitter
|
|
14963
14970
|
};
|
|
14964
|
-
this.viewContainerManager = new
|
|
14971
|
+
this.viewContainerManager = new tt(t);
|
|
14965
14972
|
}
|
|
14966
14973
|
init() {
|
|
14967
14974
|
Ge.InternalMsgEmitter.on(
|
|
@@ -15142,9 +15149,9 @@ const D = class D extends Zi {
|
|
|
15142
15149
|
);
|
|
15143
15150
|
let S = w, C = p, k = f.scale;
|
|
15144
15151
|
S > this.maxScreenshotWidth && (k = this.maxScreenshotWidth / S * k, S = this.maxScreenshotWidth), C > this.maxScreenshotHeight && (k = Math.min(this.maxScreenshotHeight / C * k, k), C = this.maxScreenshotHeight), f.scale = k;
|
|
15145
|
-
const v = document.createElement("canvas"),
|
|
15146
|
-
v.width = S * (N || 1), v.height = C * (N || 1),
|
|
15147
|
-
|
|
15152
|
+
const v = document.createElement("canvas"), b = v.getContext("2d");
|
|
15153
|
+
v.width = S * (N || 1), v.height = C * (N || 1), b && (e.screenshotToCanvas(
|
|
15154
|
+
b,
|
|
15148
15155
|
y,
|
|
15149
15156
|
S,
|
|
15150
15157
|
C,
|
|
@@ -15193,11 +15200,11 @@ const D = class D extends Zi {
|
|
|
15193
15200
|
width: N,
|
|
15194
15201
|
height: S
|
|
15195
15202
|
});
|
|
15196
|
-
let k = Math.max(C == null ? void 0 : C.width, N), v = Math.max(C == null ? void 0 : C.height, S),
|
|
15197
|
-
const P = k > N && Math.min(N / k,
|
|
15198
|
-
P <= E ? (k = P < 1 && N || k, v = Math.floor(v * P) + 1,
|
|
15203
|
+
let k = Math.max(C == null ? void 0 : C.width, N), v = Math.max(C == null ? void 0 : C.height, S), b = 1;
|
|
15204
|
+
const P = k > N && Math.min(N / k, b) || b, E = v > S && Math.min(S / v, b) || b;
|
|
15205
|
+
P <= E ? (k = P < 1 && N || k, v = Math.floor(v * P) + 1, b = P) : P > E && (v = E < 1 && S || v, k = Math.floor(k * E) + 1, b = E);
|
|
15199
15206
|
const O = {
|
|
15200
|
-
scale:
|
|
15207
|
+
scale: b,
|
|
15201
15208
|
centerX: C.originX + C.width / 2,
|
|
15202
15209
|
centerY: C.originY + C.height / 2
|
|
15203
15210
|
}, z = document.createElement("canvas"), L = z.getContext("2d");
|
|
@@ -15435,8 +15442,8 @@ const D = class D extends Zi {
|
|
|
15435
15442
|
d({
|
|
15436
15443
|
didTimeout: k,
|
|
15437
15444
|
timeRemaining: () => {
|
|
15438
|
-
const
|
|
15439
|
-
return Math.max(0, w -
|
|
15445
|
+
const b = performance.now() - p;
|
|
15446
|
+
return Math.max(0, w - b);
|
|
15440
15447
|
}
|
|
15441
15448
|
});
|
|
15442
15449
|
} catch (v) {
|
|
@@ -15689,7 +15696,7 @@ I(D, "kind", "appliance-single-plugin"), I(D, "cursorAdapter"), I(D, "currentMan
|
|
|
15689
15696
|
), D.currentManager = s, G(e)) {
|
|
15690
15697
|
const a = s.hasOffscreenCanvas, c = s.isUseOffscreenTransfer, l = s.pluginOptions, h = s.isUseSimple;
|
|
15691
15698
|
e.logger.info(
|
|
15692
|
-
`[ApplianceSinglePlugin] use ${a ? "worker" : "mainThread"}, isUseSimple: ${h} ${c ? "offscreenTransfer" : ""}, options: ${JSON.stringify(l)}`
|
|
15699
|
+
`[Appliance]: [ApplianceSinglePlugin] use ${a ? "worker" : "mainThread"}, isUseSimple: ${h} ${c ? "offscreenTransfer" : ""}, options: ${JSON.stringify(l)}`
|
|
15693
15700
|
);
|
|
15694
15701
|
}
|
|
15695
15702
|
});
|
|
@@ -15718,80 +15725,80 @@ const Tt = class Tt extends m.Component {
|
|
|
15718
15725
|
I(Tt, "emiter");
|
|
15719
15726
|
let Gi = Tt;
|
|
15720
15727
|
export {
|
|
15721
|
-
|
|
15728
|
+
jI as $,
|
|
15722
15729
|
Su as A,
|
|
15723
15730
|
Oa as B,
|
|
15724
|
-
|
|
15731
|
+
bg as C,
|
|
15725
15732
|
Se as D,
|
|
15726
15733
|
W as E,
|
|
15727
|
-
|
|
15734
|
+
SI as F,
|
|
15728
15735
|
Gn as G,
|
|
15729
15736
|
ar as H,
|
|
15730
15737
|
Jc as I,
|
|
15731
15738
|
cn as J,
|
|
15732
15739
|
$ as K,
|
|
15733
15740
|
Wt as L,
|
|
15734
|
-
|
|
15735
|
-
|
|
15736
|
-
|
|
15741
|
+
bt as M,
|
|
15742
|
+
rt as N,
|
|
15743
|
+
OI as O,
|
|
15737
15744
|
ve as P,
|
|
15738
15745
|
$n as Q,
|
|
15739
|
-
|
|
15746
|
+
QI as R,
|
|
15740
15747
|
fg as S,
|
|
15741
|
-
|
|
15742
|
-
|
|
15748
|
+
bi as T,
|
|
15749
|
+
AI as U,
|
|
15743
15750
|
Et as V,
|
|
15744
|
-
|
|
15745
|
-
|
|
15751
|
+
RI as W,
|
|
15752
|
+
CI as X,
|
|
15746
15753
|
pe as Y,
|
|
15747
|
-
|
|
15754
|
+
et as Z,
|
|
15748
15755
|
Rt as _,
|
|
15749
15756
|
R as a,
|
|
15750
|
-
|
|
15751
|
-
|
|
15752
|
-
|
|
15757
|
+
YI as a0,
|
|
15758
|
+
UI as a1,
|
|
15759
|
+
BI as a2,
|
|
15753
15760
|
PM as a3,
|
|
15754
|
-
|
|
15755
|
-
|
|
15761
|
+
vI as a4,
|
|
15762
|
+
it as a5,
|
|
15756
15763
|
Xi as a6,
|
|
15757
|
-
|
|
15758
|
-
|
|
15764
|
+
TI as a7,
|
|
15765
|
+
NI as a8,
|
|
15759
15766
|
Bi as a9,
|
|
15760
15767
|
Qi as aa,
|
|
15761
15768
|
Gi as ab,
|
|
15762
15769
|
ne as ac,
|
|
15763
|
-
|
|
15770
|
+
Ke as ad,
|
|
15764
15771
|
te as ae,
|
|
15765
15772
|
Br as af,
|
|
15766
15773
|
Ji as ag,
|
|
15767
15774
|
Qt as ah,
|
|
15768
15775
|
Lt as ai,
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15776
|
+
Ae as aj,
|
|
15777
|
+
_e as ak,
|
|
15778
|
+
GI as al,
|
|
15772
15779
|
q as b,
|
|
15773
15780
|
T as c,
|
|
15774
15781
|
$t as d,
|
|
15775
|
-
|
|
15776
|
-
|
|
15782
|
+
FI as e,
|
|
15783
|
+
kI as f,
|
|
15777
15784
|
Pn as g,
|
|
15778
|
-
|
|
15785
|
+
VI as h,
|
|
15779
15786
|
yt as i,
|
|
15780
15787
|
Gt as j,
|
|
15781
15788
|
un as k,
|
|
15782
15789
|
U as l,
|
|
15783
|
-
|
|
15784
|
-
|
|
15785
|
-
|
|
15786
|
-
|
|
15787
|
-
|
|
15790
|
+
PI as m,
|
|
15791
|
+
DI as n,
|
|
15792
|
+
zI as o,
|
|
15793
|
+
WI as p,
|
|
15794
|
+
EI as q,
|
|
15788
15795
|
bI as r,
|
|
15789
|
-
|
|
15796
|
+
LI as s,
|
|
15790
15797
|
Zt as t,
|
|
15791
15798
|
Fe as u,
|
|
15792
15799
|
x as v,
|
|
15793
15800
|
me as w,
|
|
15794
15801
|
_t as x,
|
|
15795
15802
|
jr as y,
|
|
15796
|
-
|
|
15803
|
+
xI as z
|
|
15797
15804
|
};
|