archgine 1.0.18 → 1.0.19

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.
@@ -3999,7 +3999,7 @@ Ss.__DOMHandler = mi;
3999
3999
  Ss.normalizeLineEndings = Hc;
4000
4000
  Ss.DOMParser = Vc;
4001
4001
  var Fy = Ss.DOMParser;
4002
- const Uy = "1.0.18";
4002
+ const Uy = "1.0.19";
4003
4003
  function qy() {
4004
4004
  return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
4005
4005
  }
@@ -28,9 +28,7 @@ export declare class App<Config extends IAppConfig> extends Application<Config>
28
28
  trans2LoadingScene(): void;
29
29
  running(): void;
30
30
  clearAssetLabels(typ?: string): void;
31
- clearFillByIds(ids?: string[]): void;
32
31
  clearSelected(): void;
33
- clearStrokeByIds(ids?: string[]): void;
34
32
  fontZoomIn(): void;
35
33
  fontZoomOut(): void;
36
34
  getLegend(): any[];
@@ -39,9 +37,13 @@ export declare class App<Config extends IAppConfig> extends Application<Config>
39
37
  selectByIds(ids: string | string[]): void;
40
38
  targetByIds(id: string | string[]): void;
41
39
  setAssetLabel(id: string, label: string): void;
40
+ clearFill(): void;
41
+ clearFillByIds(ids?: string[]): void;
42
42
  setFillByIds(ids: string[], c: string): void;
43
- setSkeletons(skeletons: string[]): void;
43
+ clearStroke(): void;
44
+ clearStrokeByIds(ids?: string[]): void;
44
45
  setStrokeByIds(ids: string[], c: string): void;
46
+ setSkeletons(skeletons: string[]): void;
45
47
  socialDistanceEnableChanged(v: boolean): void;
46
48
  fullscreen(): void;
47
49
  saveCameraPosition(): void;
@@ -51,4 +53,5 @@ export declare class App<Config extends IAppConfig> extends Application<Config>
51
53
  zoomOut(): void;
52
54
  zoomToSelectEnableChanged(v: boolean): void;
53
55
  setAssetType(assetType: string, conflictLayers?: string[]): void;
56
+ getAssetIdsByType(assetType: string): string[];
54
57
  }
@@ -6,13 +6,16 @@ export interface IApp {
6
6
  load(url: string, layers?: string[], lv?: number, skeletons?: string[]): any;
7
7
  setSkeletons(skeletons: string[]): void;
8
8
  getLayers(lv?: number): any[];
9
+ getAssetIdsByType(assetType: string): string[];
9
10
  setAssetType(assetType: string, conflictLayers?: string[]): void;
10
11
  updateLayersVisibility(ids: string[], visible?: boolean): void;
11
12
  selectByIds(ids: string | string[]): void;
12
13
  targetByIds(id: string | string[]): void;
13
14
  setFillByIds(ids: string[], c: string): void;
15
+ clearFill(): void;
14
16
  clearFillByIds(ids?: string[]): void;
15
17
  setStrokeByIds(ids: string[], c: string): void;
18
+ clearStroke(): void;
16
19
  clearStrokeByIds(ids?: string[]): void;
17
20
  getLegend(): any[];
18
21
  setAssetLabel(id: string, label: string): void;
@@ -50,9 +50,11 @@ export declare class SvgApp<Config extends ISvgAppConfig> extends EventDispatche
50
50
  targetByIds(ids: string | string[]): void;
51
51
  setViewAreaLimit(v: number): void;
52
52
  setAssetType(assetType: string, conflictLayers?: string[]): void;
53
- getAssetsIdByType(assetType: string): string[];
53
+ getAssetIdsByType(assetType: string): string[];
54
+ clearFill(): void;
54
55
  clearFillByIds(ids?: string[]): void;
55
56
  setFillByIds(ids: string[], c: string): void;
57
+ clearStroke(): void;
56
58
  clearStrokeByIds(ids?: string[]): void;
57
59
  setStrokeByIds(ids: string[], c: string): void;
58
60
  getLegend(): Array<TLegend>;
package/lib/index.mjs CHANGED
@@ -3995,7 +3995,7 @@ tu.__DOMHandler = Us;
3995
3995
  tu.normalizeLineEndings = fp;
3996
3996
  tu.DOMParser = pp;
3997
3997
  var pv = tu.DOMParser;
3998
- const dv = "1.0.18";
3998
+ const dv = "1.0.19";
3999
3999
  function gv() {
4000
4000
  return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
4001
4001
  }
@@ -5740,7 +5740,7 @@ Za.exports;
5740
5740
  for (; N-- && G < j; ) {
5741
5741
  F += s;
5742
5742
  for (var lt = -1, rt = i[F]; ++lt < q; ) {
5743
- var ct = U[lt], dt = ct.iteratee, Me = ct.type, le = dt(rt);
5743
+ var ft = U[lt], dt = ft.iteratee, Me = ft.type, le = dt(rt);
5744
5744
  if (Me == yt)
5745
5745
  rt = le;
5746
5746
  else if (!le) {
@@ -5972,12 +5972,12 @@ Za.exports;
5972
5972
  return j;
5973
5973
  y.set(i, A), xc(i) ? i.forEach(function(rt) {
5974
5974
  A.add(We(rt, s, o, rt, i, y));
5975
- }) : yc(i) && i.forEach(function(rt, ct) {
5976
- A.set(ct, We(rt, s, o, ct, i, y));
5975
+ }) : yc(i) && i.forEach(function(rt, ft) {
5976
+ A.set(ft, We(rt, s, o, ft, i, y));
5977
5977
  });
5978
5978
  var it = F ? N ? so : no : N ? me : Xt, lt = U ? e : it(i);
5979
- return ke(lt || i, function(rt, ct) {
5980
- lt && (ct = rt, rt = i[ct]), rs(A, ct, We(rt, s, o, ct, i, y));
5979
+ return ke(lt || i, function(rt, ft) {
5980
+ lt && (ft = rt, rt = i[ft]), rs(A, ft, We(rt, s, o, ft, i, y));
5981
5981
  }), A;
5982
5982
  }
5983
5983
  function b0(i) {
@@ -6742,11 +6742,11 @@ Za.exports;
6742
6742
  function Ea(i, s, o, h, p, y, A, _, N, F) {
6743
6743
  var U = s & tt, q = s & D, G = s & k, j = s & (W | X), it = s & z, lt = G ? e : os(i);
6744
6744
  function rt() {
6745
- for (var ct = arguments.length, dt = O(ct), Me = ct; Me--; )
6745
+ for (var ft = arguments.length, dt = O(ft), Me = ft; Me--; )
6746
6746
  dt[Me] = arguments[Me];
6747
6747
  if (j)
6748
6748
  var le = dn(rt), Oe = cd(dt, le);
6749
- if (h && (dt = Dh(dt, h, p, j)), y && (dt = Nh(dt, y, A, j)), ct -= Oe, j && ct < F) {
6749
+ if (h && (dt = Dh(dt, h, p, j)), y && (dt = Nh(dt, y, A, j)), ft -= Oe, j && ft < F) {
6750
6750
  var kt = nr(dt, le);
6751
6751
  return Fh(
6752
6752
  i,
@@ -6758,11 +6758,11 @@ Za.exports;
6758
6758
  kt,
6759
6759
  _,
6760
6760
  N,
6761
- F - ct
6761
+ F - ft
6762
6762
  );
6763
6763
  }
6764
6764
  var je = q ? o : this, Li = G ? je[i] : i;
6765
- return ct = dt.length, _ ? dt = xg(dt, _) : it && ct > 1 && dt.reverse(), U && N < ct && (dt.length = N), this && this !== jt && this instanceof rt && (Li = lt || os(Li)), Li.apply(je, dt);
6765
+ return ft = dt.length, _ ? dt = xg(dt, _) : it && ft > 1 && dt.reverse(), U && N < ft && (dt.length = N), this && this !== jt && this instanceof rt && (Li = lt || os(Li)), Li.apply(je, dt);
6766
6766
  }
6767
6767
  return rt;
6768
6768
  }
@@ -6914,8 +6914,8 @@ Za.exports;
6914
6914
  break;
6915
6915
  }
6916
6916
  if (j) {
6917
- if (!Su(s, function(ct, dt) {
6918
- if (!Qn(j, dt) && (it === ct || p(it, ct, o, h, y)))
6917
+ if (!Su(s, function(ft, dt) {
6918
+ if (!Qn(j, dt) && (it === ft || p(it, ft, o, h, y)))
6919
6919
  return j.push(dt);
6920
6920
  })) {
6921
6921
  G = !1;
@@ -6979,10 +6979,10 @@ Za.exports;
6979
6979
  y.set(i, s), y.set(s, i);
6980
6980
  for (var rt = A; ++q < N; ) {
6981
6981
  G = _[q];
6982
- var ct = i[G], dt = s[G];
6982
+ var ft = i[G], dt = s[G];
6983
6983
  if (h)
6984
- var Me = A ? h(dt, ct, G, s, i, y) : h(ct, dt, G, i, s, y);
6985
- if (!(Me === e ? ct === dt || p(ct, dt, o, h, y) : Me)) {
6984
+ var Me = A ? h(dt, ft, G, s, i, y) : h(ft, dt, G, i, s, y);
6985
+ if (!(Me === e ? ft === dt || p(ft, dt, o, h, y) : Me)) {
6986
6986
  lt = !1;
6987
6987
  break;
6988
6988
  }
@@ -7806,7 +7806,7 @@ Za.exports;
7806
7806
  return h = p = e, F = kt, A = i.apply(Li, je), A;
7807
7807
  }
7808
7808
  function it(kt) {
7809
- return F = kt, _ = hs(ct, s), U ? j(kt) : A;
7809
+ return F = kt, _ = hs(ft, s), U ? j(kt) : A;
7810
7810
  }
7811
7811
  function lt(kt) {
7812
7812
  var je = kt - N, Li = kt - F, Ic = s - je;
@@ -7816,11 +7816,11 @@ Za.exports;
7816
7816
  var je = kt - N, Li = kt - F;
7817
7817
  return N === e || je >= s || je < 0 || q && Li >= y;
7818
7818
  }
7819
- function ct() {
7819
+ function ft() {
7820
7820
  var kt = Na();
7821
7821
  if (rt(kt))
7822
7822
  return dt(kt);
7823
- _ = hs(ct, lt(kt));
7823
+ _ = hs(ft, lt(kt));
7824
7824
  }
7825
7825
  function dt(kt) {
7826
7826
  return _ = e, G && h ? j(kt) : (h = p = e, A);
@@ -7837,9 +7837,9 @@ Za.exports;
7837
7837
  if (_ === e)
7838
7838
  return it(N);
7839
7839
  if (q)
7840
- return Th(_), _ = hs(ct, s), j(N);
7840
+ return Th(_), _ = hs(ft, s), j(N);
7841
7841
  }
7842
- return _ === e && (_ = hs(ct, s)), A;
7842
+ return _ === e && (_ = hs(ft, s)), A;
7843
7843
  }
7844
7844
  return Oe.cancel = Me, Oe.flush = le, Oe;
7845
7845
  }
@@ -8385,9 +8385,9 @@ Za.exports;
8385
8385
  "g"
8386
8386
  ), j = "//# sourceURL=" + (bt.call(s, "sourceURL") ? (s.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++Yp + "]") + `
8387
8387
  `;
8388
- i.replace(G, function(rt, ct, dt, Me, le, Oe) {
8389
- return dt || (dt = Me), q += i.slice(F, Oe).replace(xu, dd), ct && (_ = !0, q += `' +
8390
- __e(` + ct + `) +
8388
+ i.replace(G, function(rt, ft, dt, Me, le, Oe) {
8389
+ return dt || (dt = Me), q += i.slice(F, Oe).replace(xu, dd), ft && (_ = !0, q += `' +
8390
+ __e(` + ft + `) +
8391
8391
  '`), le && (N = !0, q += `';
8392
8392
  ` + le + `;
8393
8393
  __p += '`), dt && (q += `' +
@@ -8708,8 +8708,8 @@ function print() { __p += __j.call(arguments, '') }
8708
8708
  }, pi(pt.prototype, function(i, s) {
8709
8709
  var o = /^(?:filter|find|map|reject)|While$/.test(s), h = /^(?:head|last)$/.test(s), p = m[h ? "take" + (s == "last" ? "Right" : "") : s], y = h || /^find/.test(s);
8710
8710
  p && (m.prototype[s] = function() {
8711
- var A = this.__wrapped__, _ = h ? [1] : arguments, N = A instanceof pt, F = _[0], U = N || at(A), q = function(ct) {
8712
- var dt = p.apply(m, rr([ct], _));
8711
+ var A = this.__wrapped__, _ = h ? [1] : arguments, N = A instanceof pt, F = _[0], U = N || at(A), q = function(ft) {
8712
+ var dt = p.apply(m, rr([ft], _));
8713
8713
  return h && G ? dt[0] : dt;
8714
8714
  };
8715
8715
  U && o && typeof F == "function" && F.length != 1 && (N = U = !1);
@@ -8748,7 +8748,7 @@ function print() { __p += __j.call(arguments, '') }
8748
8748
  }).call(ps);
8749
8749
  })(Za, Za.exports);
8750
8750
  var Pv = Za.exports;
8751
- const ft = /* @__PURE__ */ Uf(Pv), Lr = new L();
8751
+ const ct = /* @__PURE__ */ Uf(Pv), Lr = new L();
8752
8752
  class _t {
8753
8753
  isBox2 = !0;
8754
8754
  min;
@@ -8873,7 +8873,7 @@ class _t {
8873
8873
  }
8874
8874
  setFromMinMaxString(t, e = " ") {
8875
8875
  if (this.makeEmpty(), !(t != null && t.length)) return this;
8876
- let r = t.split(e), a = ft.map(r, (u) => parseFloat(u));
8876
+ let r = t.split(e), a = ct.map(r, (u) => parseFloat(u));
8877
8877
  for (let u = 0, l = a.length; u < l; u += 2)
8878
8878
  this.expandByPoint(Lr.fromArray(a, u));
8879
8879
  return this;
@@ -8944,7 +8944,7 @@ function Lo(n) {
8944
8944
  }
8945
8945
  function $v(n, t = new _t()) {
8946
8946
  if (!n) return t;
8947
- let e = n.split(" "), r = ft.map(e, (a) => parseFloat(a));
8947
+ let e = n.split(" "), r = ct.map(e, (a) => parseFloat(a));
8948
8948
  return (r == null ? void 0 : r.length) !== 4 || (t.min.set(r[0], r[1]), t.max.set(r[0] + r[2], r[1] + r[3])), t;
8949
8949
  }
8950
8950
  function Gv(n = new _t()) {
@@ -10778,7 +10778,7 @@ class bi extends mt.window.Path2D {
10778
10778
  return new t(this).copy(this);
10779
10779
  }
10780
10780
  copy(t) {
10781
- return this.vertices = ft.cloneDeep(t.vertices), this.commands = ft.cloneDeep(t.commands), this;
10781
+ return this.vertices = ct.cloneDeep(t.vertices), this.commands = ct.cloneDeep(t.commands), this;
10782
10782
  }
10783
10783
  // @ts-ignore
10784
10784
  rebuild(t) {
@@ -11121,7 +11121,7 @@ class bl extends gr {
11121
11121
  return this.userData || {};
11122
11122
  }
11123
11123
  getAttr(t) {
11124
- const e = PE + ft.capitalize(t);
11124
+ const e = PE + ct.capitalize(t);
11125
11125
  return cf(this[e]) ? this[e]() : this.userData[t];
11126
11126
  }
11127
11127
  getAttrKey() {
@@ -11319,7 +11319,7 @@ class Vi {
11319
11319
  return u.clearRect(0, 0, a.width, a.height), u.strokeStyle = Ee.darkGray, u.lineWidth = l, u.setLineDash([l * 3, l]), u.strokeRect(0, 0, r.size.x, r.size.y), r.image = a, Vi.set(t, r), r;
11320
11320
  }
11321
11321
  // debug
11322
- static DEBUG_DisplayCachedTexture = ft.throttle((t = 80, e = 0.8) => {
11322
+ static DEBUG_DisplayCachedTexture = ct.throttle((t = 80, e = 0.8) => {
11323
11323
  let r = FE();
11324
11324
  if (r || (r = UE(t, e)), !r) throw new Error("dom not found");
11325
11325
  kE(r, this.cached);
@@ -11790,7 +11790,7 @@ class wp extends bl {
11790
11790
  }
11791
11791
  getBoundingPoints() {
11792
11792
  let t = [];
11793
- return this.points && (t = ft.cloneDeep(this.points)), this.boundingBox && this.boundingBox.validate() && !this.boundingBox.isEmpty() && t.push(this.boundingBox.min, this.boundingBox.max), t;
11793
+ return this.points && (t = ct.cloneDeep(this.points)), this.boundingBox && this.boundingBox.validate() && !this.boundingBox.isEmpty() && t.push(this.boundingBox.min, this.boundingBox.max), t;
11794
11794
  }
11795
11795
  generateFeatureKey() {
11796
11796
  !this.points || !this.points.length || (this.featureKey = ce.hashStr(L.getStrings(this.points)));
@@ -11905,7 +11905,7 @@ class wl extends bl {
11905
11905
  return new t(this.userData).copy(this);
11906
11906
  }
11907
11907
  copy(t) {
11908
- return this.visible = t.visible, this.wireframe = t.wireframe, this.fill = t.fill, this.stroke = t.stroke, this.lineWidth = t.lineWidth, this.lineDash = t.lineDash ? ft.cloneDeep(t.lineDash) : void 0, this.lineDashOffset = t.lineDashOffset, this.lineCap = t.lineCap, this.map = t.map, this;
11908
+ return this.visible = t.visible, this.wireframe = t.wireframe, this.fill = t.fill, this.stroke = t.stroke, this.lineWidth = t.lineWidth, this.lineDash = t.lineDash ? ct.cloneDeep(t.lineDash) : void 0, this.lineDashOffset = t.lineDashOffset, this.lineCap = t.lineCap, this.map = t.map, this;
11909
11909
  }
11910
11910
  generateFeatureKey() {
11911
11911
  const t = [];
@@ -12372,12 +12372,12 @@ class jE extends be {
12372
12372
  class tb extends be {
12373
12373
  type = "style";
12374
12374
  constructor(t, e) {
12375
- super(t, e), ft.replace(Array.from(e.childNodes).map((u) => u.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, "").replace(/@import.*;/g, ""), /(?!\u3000)\s+/gm, " ").split("}").forEach((u) => {
12376
- const l = ft.trim(u);
12375
+ super(t, e), ct.replace(Array.from(e.childNodes).map((u) => u.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, "").replace(/@import.*;/g, ""), /(?!\u3000)\s+/gm, " ").split("}").forEach((u) => {
12376
+ const l = ct.trim(u);
12377
12377
  if (!l) return;
12378
12378
  const c = l.split("{"), f = c[0].split(","), g = c[1].split(";");
12379
12379
  f.forEach((x) => {
12380
- const E = ft.trim(x);
12380
+ const E = ct.trim(x);
12381
12381
  if (!E) return;
12382
12382
  const b = this.root.styles[E] || {};
12383
12383
  g.forEach((T) => {
@@ -13088,7 +13088,7 @@ class Cb extends be {
13088
13088
  symbolId;
13089
13089
  cachedElement;
13090
13090
  constructor(t, e) {
13091
- super(t, e), this.symbolId = ft.replace(this.getHrefAttribute().toString() || "", "#", ""), this.cachedElement || (this.cachedElement = this.getHrefAttribute().getDefinition());
13091
+ super(t, e), this.symbolId = ct.replace(this.getHrefAttribute().toString() || "", "#", ""), this.cachedElement || (this.cachedElement = this.getHrefAttribute().getDefinition());
13092
13092
  }
13093
13093
  }
13094
13094
  class Sb extends be {
@@ -13113,7 +13113,7 @@ class Db extends be {
13113
13113
  getTextFromNode(t) {
13114
13114
  const e = t || this.node, r = Array.from(e.parentNode.childNodes), a = r.indexOf(e), u = r.length - 1;
13115
13115
  let l = (e.textContent || "").replace(/(?!\u3000)\s+/gm, " ");
13116
- return a === 0 && (l = ft.trimStart(l)), a === u && (l = ft.trimEnd(l)), l;
13116
+ return a === 0 && (l = ct.trimStart(l)), a === u && (l = ct.trimEnd(l)), l;
13117
13117
  }
13118
13118
  getFontSize() {
13119
13119
  var e;
@@ -13220,7 +13220,7 @@ function Pb(n) {
13220
13220
  const u = /([^:]+):\s*([^;]+);?/g;
13221
13221
  let l;
13222
13222
  for (; (l = u.exec(a)) !== null; ) {
13223
- const c = ft.camelCase(l[1].trim()), f = l[2].trim();
13223
+ const c = ct.camelCase(l[1].trim()), f = l[2].trim();
13224
13224
  Wr[r][c] = f;
13225
13225
  }
13226
13226
  }
@@ -13268,11 +13268,11 @@ function Os(n, t, e, r, a) {
13268
13268
  }
13269
13269
  function Mf(n, t, e) {
13270
13270
  let r = {};
13271
- return t && (Wr[t == null ? void 0 : t.class] && ft.merge(r, Wr[t.class]), Of(n, t, r)), Wr[e.class] && ft.merge(r, Wr[e.class]), Of(n, e, r), r;
13271
+ return t && (Wr[t == null ? void 0 : t.class] && ct.merge(r, Wr[t.class]), Of(n, t, r)), Wr[e.class] && ct.merge(r, Wr[e.class]), Of(n, e, r), r;
13272
13272
  }
13273
13273
  function Of(n, t, e) {
13274
- t.style && ft.merge(e, t.style);
13275
- let r = parseFloat(ft.get(t, "stroke-width") || "") || 0;
13274
+ t.style && ct.merge(e, t.style);
13275
+ let r = parseFloat(ct.get(t, "stroke-width") || "") || 0;
13276
13276
  return r > 0 && (e.strokeWidth = Fb(n, r)), e;
13277
13277
  }
13278
13278
  const Rb = new _t(), za = new L();
@@ -13303,7 +13303,7 @@ function Ub(n, t, e) {
13303
13303
  return f[0].path = T, If(t, e, f);
13304
13304
  r = new il({ name: e.id, userData: { id: e.id, tag: t } });
13305
13305
  for (let I = 0, S = T.length; I < S; I++) {
13306
- let D = ft.cloneDeep(f);
13306
+ let D = ct.cloneDeep(f);
13307
13307
  D[0].path = T[I];
13308
13308
  const k = If(t, e, D);
13309
13309
  r.add(k), k.updateMatrix();
@@ -13340,9 +13340,9 @@ function kb(n) {
13340
13340
  }
13341
13341
  function qb(n, t, e) {
13342
13342
  var u, l;
13343
- let r, a = ft.get(e, "xlink:href");
13344
- if (ft.startsWith(a, "#") && (a = a.substring(1)), (u = n.defs) != null && u.symbol && ((l = n.defs) != null && l.symbol[a]))
13345
- return r = n.defs.symbol[a].clone(), ft.merge(r.userData, { id: e.id, tag: t }), r;
13343
+ let r, a = ct.get(e, "xlink:href");
13344
+ if (ct.startsWith(a, "#") && (a = a.substring(1)), (u = n.defs) != null && u.symbol && ((l = n.defs) != null && l.symbol[a]))
13345
+ return r = n.defs.symbol[a].clone(), ct.merge(r.userData, { id: e.id, tag: t }), r;
13346
13346
  }
13347
13347
  function If(n, t, e) {
13348
13348
  return new _p({
@@ -13355,7 +13355,7 @@ function If(n, t, e) {
13355
13355
  });
13356
13356
  }
13357
13357
  function Hb(n, t) {
13358
- let e = ft.get(t, "#text");
13358
+ let e = ct.get(t, "#text");
13359
13359
  if (e)
13360
13360
  return new QE({
13361
13361
  text: e,
@@ -13465,8 +13465,8 @@ function Kb(n) {
13465
13465
  }
13466
13466
  const Qb = 100;
13467
13467
  function Bp(n, t = !1) {
13468
- n = ft.trim(n), n = n.replace(new RegExp(" ", "g"), ",").replace(new RegExp("M", "g"), "|M");
13469
- const e = ft.split(n, "|");
13468
+ n = ct.trim(n), n = n.replace(new RegExp(" ", "g"), ",").replace(new RegExp("M", "g"), "|M");
13469
+ const e = ct.split(n, "|");
13470
13470
  if (e != null && e.length && e[0] === "" && e.shift(), !t || e.length <= Qb * 2) {
13471
13471
  let l = [];
13472
13472
  for (let c = 0, f = e.length; c < f; c++) {
@@ -13483,8 +13483,8 @@ function Bp(n, t = !1) {
13483
13483
  let f = /M\s*(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)/g.exec(e[l]);
13484
13484
  f && (f == null ? void 0 : f.length) > 3 && r.push({ x: parseFloat(f[1]), y: parseFloat(f[3]), cms: e[l] });
13485
13485
  }
13486
- r = ft.sortBy(r, (l) => L.getLength({ x: l.x, y: l.y }));
13487
- let a = ft.chunk(r, Math.floor(r.length / 10)), u = [];
13486
+ r = ct.sortBy(r, (l) => L.getLength({ x: l.x, y: l.y }));
13487
+ let a = ct.chunk(r, Math.floor(r.length / 10)), u = [];
13488
13488
  for (let l = 0, c = a.length; l < c; l++) {
13489
13489
  let f = [];
13490
13490
  for (let g = 0, x = a[l].length; g < x; g++) {
@@ -13823,7 +13823,7 @@ class rA {
13823
13823
  return;
13824
13824
  }
13825
13825
  let r = t.getAttribute("class");
13826
- r || (r = ""), e ? r = "selected" : r = ft.replace(r, "selected", "").trim(), t.setAttribute("class", r);
13826
+ r || (r = ""), e ? r = "selected" : r = ct.replace(r, "selected", "").trim(), t.setAttribute("class", r);
13827
13827
  }
13828
13828
  _getSymbolBox(t) {
13829
13829
  var f;
@@ -14017,13 +14017,20 @@ class Lp extends ex {
14017
14017
  const r = tA(t), a = this.chef.getElementById(r);
14018
14018
  return a && this.chef.getElementsMap(a, e), e;
14019
14019
  }
14020
- getAssetsIdByType(t) {
14021
- if (t === this.assetType && this.assetElementsMap) return ft.keys(this.assetElementsMap);
14020
+ getAssetIdsByType(t) {
14021
+ if (t === this.assetType && this.assetElementsMap) return ct.keys(this.assetElementsMap);
14022
14022
  const e = this.setAssetElementsMap(t);
14023
- return ft.keys(e);
14023
+ return ct.keys(e);
14024
+ }
14025
+ clearFillOrStroke(t = "fill") {
14026
+ const e = ct.keys(this.assetElementsMap);
14027
+ let r;
14028
+ for (let a = 0, u = e.length; a < u; a++)
14029
+ r = this.assetElementsMap[e[a]], !(!r || !r.hasAttribute(t)) && (r.removeAttribute(t), t === "stroke" && r.removeAttribute("stroke-width"));
14030
+ this.clearLegendBy(t);
14024
14031
  }
14025
14032
  clearFillOrStrokeByIds(t, e = "fill") {
14026
- const r = ft.keys(this.assetElementsMap);
14033
+ const r = ct.keys(this.assetElementsMap);
14027
14034
  let a;
14028
14035
  for (let u = 0, l = r.length; u < l; u++)
14029
14036
  t != null && t.length && !t.includes(r[u]) || (a = this.assetElementsMap[r[u]], !(!a || !a.hasAttribute(e)) && (a.removeAttribute(e), e === "stroke" && a.removeAttribute("stroke-width")));
@@ -14031,7 +14038,7 @@ class Lp extends ex {
14031
14038
  }
14032
14039
  setFillOrStrokeByIds(t, e, r = "fill") {
14033
14040
  if (!this.assetElementsMap) return;
14034
- const a = ft.keys(this.assetElementsMap);
14041
+ const a = ct.keys(this.assetElementsMap);
14035
14042
  let u;
14036
14043
  for (let l = 0, c = a.length; l < c; l++)
14037
14044
  t.includes(a[l]) && (u = this.assetElementsMap[a[l]], u && (u.setAttribute(r, e), r === "stroke" && u.setAttribute("stroke-width", "7"), this.addLegend(r, e, a[l])));
@@ -14072,7 +14079,7 @@ class Lp extends ex {
14072
14079
  }
14073
14080
  clearAssetLabels(t) {
14074
14081
  if (!t) return;
14075
- const e = this.getAssetLabelsMap(t), r = ft.keys(e);
14082
+ const e = this.getAssetLabelsMap(t), r = ct.keys(e);
14076
14083
  if (r != null && r.length)
14077
14084
  for (let a = 0, u = r.length; a < u; a++) {
14078
14085
  const l = e[r[a]];
@@ -14156,7 +14163,7 @@ class Lp extends ex {
14156
14163
  // }
14157
14164
  selectByIds(t, e = !1) {
14158
14165
  Array.isArray(t) || (t = [t]), e || this.clearSelected();
14159
- const r = ft.uniq(ft.map(this.selectedList, (a) => a.getAttribute("id") || ""));
14166
+ const r = ct.uniq(ct.map(this.selectedList, (a) => a.getAttribute("id") || ""));
14160
14167
  for (let a = t.length - 1; a >= 0; a--)
14161
14168
  r.includes(t[a]) ? (this.clearSelectedById(t[a]), t.splice(a, 1)) : Object.hasOwnProperty.bind(this, t[a]) && this.selectedList.push(this.assetElementsMap[t[a]]);
14162
14169
  this.selectedList.forEach((a) => {
@@ -15951,7 +15958,7 @@ class mA extends gr {
15951
15958
  const u = await new _l().loadAsync(t);
15952
15959
  this.mainScene = new Lp(this.params), this.mainScene.bind(u), this.view.setByBox(this.mainScene.viewBox);
15953
15960
  const l = this.mainScene.getLayers(r);
15954
- return e != null && e.length || (e = ft.map(l, "label")), this.mainScene.showDefaultLayers(e, !0), a != null && a.length && this.setSkeletons(a), this.trans2MainScene(), this.bindAssetsEvents(), console.log("svgApp.load: ", l), l;
15961
+ return e != null && e.length || (e = ct.map(l, "label")), this.mainScene.showDefaultLayers(e, !0), a != null && a.length && this.setSkeletons(a), this.trans2MainScene(), this.bindAssetsEvents(), console.log("svgApp.load: ", l), l;
15955
15962
  }
15956
15963
  setSkeletons(t) {
15957
15964
  this.mainScene.setSkeletonLayers(t);
@@ -15977,8 +15984,11 @@ class mA extends gr {
15977
15984
  setAssetType(t, e) {
15978
15985
  this.mainScene.setAssetType(t, e);
15979
15986
  }
15980
- getAssetsIdByType(t) {
15981
- return this.mainScene.getAssetsIdByType(t);
15987
+ getAssetIdsByType(t) {
15988
+ return this.mainScene.getAssetIdsByType(t);
15989
+ }
15990
+ clearFill() {
15991
+ this.mainScene.clearFillOrStroke("fill");
15982
15992
  }
15983
15993
  clearFillByIds(t) {
15984
15994
  this.mainScene.clearFillOrStrokeByIds(t, "fill");
@@ -15986,6 +15996,9 @@ class mA extends gr {
15986
15996
  setFillByIds(t, e) {
15987
15997
  this.mainScene.setFillOrStrokeByIds(t, e, "fill");
15988
15998
  }
15999
+ clearStroke() {
16000
+ this.mainScene.clearFillOrStroke("stroke");
16001
+ }
15989
16002
  clearStrokeByIds(t) {
15990
16003
  this.mainScene.clearFillOrStrokeByIds(t, "stroke");
15991
16004
  }