iflow-engine-base 3.9.205 → 3.9.222

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.
@@ -1,19 +1,43 @@
1
- import { V as X, E as gt, Q as yt, M as Me, a as we, b as se, B as Ee, F as ye, S as vt, c as Ge, m as ze, d as wt, P as bt, C as pe, e as xt, f as Mt, N as kt, T as _t, L as Ze, g as ge, h as Te, D as Ae, i as Et, j as Re, k as at, G as Se, l as Ct, n as St, A as Tt, o as At, O as It, W as Lt, p as Pt, q as Ue, r as Dt, I as zt, R as Rt } from "./three-vendor-Dbcwwhki.js";
2
- import { F as qe, W as lt, L as Bt, r as Nt } from "./sdk-runtime-cY1Wn7o-.js";
1
+ import { V as X, E as gt, Q as yt, M as Me, a as we, b as se, B as Ee, F as ye, S as vt, c as Ge, m as ze, d as wt, P as bt, C as pe, e as xt, f as Mt, N as kt, T as _t, L as Ze, g as ge, h as Te, D as Ae, i as Et, j as Re, k as at, G as Se, l as Ct, n as St, A as Tt, o as At, O as It, p as Lt, W as Pt, q as Dt, r as Ue, s as zt, I as Rt, R as Bt } from "./three-vendor-Drr85AIk.js";
2
+ import { F as qe, C as Nt, W as lt, L as Ot, r as Wt } from "./sdk-runtime-WxFsGvNA.js";
3
3
  import { r as _e } from "./sdk-assets-1SXx8Tbf.js";
4
4
  var Oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
- function ht(A) {
6
- return A && A.__esModule && Object.prototype.hasOwnProperty.call(A, "default") ? A.default : A;
5
+ function ht(T) {
6
+ return T && T.__esModule && Object.prototype.hasOwnProperty.call(T, "default") ? T.default : T;
7
7
  }
8
- function We(A) {
9
- throw new Error('Could not dynamically require "' + A + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
8
+ function Vi(T) {
9
+ if (Object.prototype.hasOwnProperty.call(T, "__esModule")) return T;
10
+ var e = T.default;
11
+ if (typeof e == "function") {
12
+ var t = function i() {
13
+ var n = !1;
14
+ try {
15
+ n = this instanceof i;
16
+ } catch {
17
+ }
18
+ return n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
19
+ };
20
+ t.prototype = e.prototype;
21
+ } else t = {};
22
+ return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(T).forEach(function(i) {
23
+ var n = Object.getOwnPropertyDescriptor(T, i);
24
+ Object.defineProperty(t, i, n.get ? n : {
25
+ enumerable: !0,
26
+ get: function() {
27
+ return T[i];
28
+ }
29
+ });
30
+ }), t;
31
+ }
32
+ function We(T) {
33
+ throw new Error('Could not dynamically require "' + T + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
10
34
  }
11
35
  var Ve = { exports: {} };
12
36
  var Je;
13
- function Ot() {
14
- return Je || (Je = 1, (function(A, e) {
37
+ function jt() {
38
+ return Je || (Je = 1, (function(T, e) {
15
39
  (function(t) {
16
- A.exports = t();
40
+ T.exports = t();
17
41
  })(function() {
18
42
  return (function t(i, n, s) {
19
43
  function r(h, u) {
@@ -130,16 +154,16 @@ function Ot() {
130
154
  y && !l || (Q.crc32 = d.crc32, Q.compressedSize = d.compressedSize, Q.uncompressedSize = d.uncompressedSize);
131
155
  var I = 0;
132
156
  y && (I |= 8), P || !z && !p || (I |= 2048);
133
- var T = 0, J = 0;
134
- te && (T |= 16), m === "UNIX" ? (J = 798, T |= (function(Z, le) {
157
+ var A = 0, J = 0;
158
+ te && (A |= 16), m === "UNIX" ? (J = 798, A |= (function(Z, le) {
135
159
  var ue = Z;
136
160
  return Z || (ue = le ? 16893 : 33204), (65535 & ue) << 16;
137
- })(_.unixPermissions, te)) : (J = 20, T |= (function(Z) {
161
+ })(_.unixPermissions, te)) : (J = 20, A |= (function(Z) {
138
162
  return 63 & (Z || 0);
139
163
  })(_.dosPermissions)), M = F.getUTCHours(), M <<= 6, M |= F.getUTCMinutes(), M <<= 5, M |= F.getUTCSeconds() / 2, E = F.getUTCFullYear() - 1980, E <<= 4, E |= F.getUTCMonth() + 1, E <<= 5, E |= F.getUTCDate(), z && (ee = s(1, 1) + s(u(j), 4) + D, B += "up" + s(ee.length, 2) + ee), p && (U = s(1, 1) + s(u(q), 4) + k, B += "uc" + s(U.length, 2) + U);
140
164
  var $ = "";
141
165
  return $ += `
142
- \0`, $ += s(I, 2), $ += N.magic, $ += s(M, 2), $ += s(E, 2), $ += s(Q.crc32, 4), $ += s(Q.compressedSize, 4), $ += s(Q.uncompressedSize, 4), $ += s(j.length, 2), $ += s(B.length, 2), { fileRecord: g.LOCAL_FILE_HEADER + $ + j + B, dirRecord: g.CENTRAL_FILE_HEADER + s(J, 2) + $ + s(q.length, 2) + "\0\0\0\0" + s(T, 4) + s(f, 4) + j + B + q };
166
+ \0`, $ += s(I, 2), $ += N.magic, $ += s(M, 2), $ += s(E, 2), $ += s(Q.crc32, 4), $ += s(Q.compressedSize, 4), $ += s(Q.uncompressedSize, 4), $ += s(j.length, 2), $ += s(B.length, 2), { fileRecord: g.LOCAL_FILE_HEADER + $ + j + B, dirRecord: g.CENTRAL_FILE_HEADER + s(J, 2) + $ + s(q.length, 2) + "\0\0\0\0" + s(A, 4) + s(f, 4) + j + B + q };
143
167
  }
144
168
  var o = t("../utils"), a = t("../stream/GenericWorker"), h = t("../utf8"), u = t("../crc32"), g = t("../signature");
145
169
  function v(d, y, l, f) {
@@ -1377,7 +1401,7 @@ function Ot() {
1377
1401
  var R = c.state, L = R.pending;
1378
1402
  L > c.avail_out && (L = c.avail_out), L !== 0 && (r.arraySet(c.output, R.pending_buf, R.pending_out, L, c.next_out), c.next_out += L, R.pending_out += L, c.total_out += L, c.avail_out -= L, R.pending -= L, R.pending === 0 && (R.pending_out = 0));
1379
1403
  }
1380
- function T(c, R) {
1404
+ function A(c, R) {
1381
1405
  o._tr_flush_block(c, 0 <= c.block_start ? c.block_start : -1, c.strstart - c.block_start, R), c.block_start = c.strstart, I(c.strm);
1382
1406
  }
1383
1407
  function J(c, R) {
@@ -1426,9 +1450,9 @@ function Ot() {
1426
1450
  c.strstart++;
1427
1451
  } else c.strstart += c.match_length, c.match_length = 0, c.ins_h = c.window[c.strstart], c.ins_h = (c.ins_h << c.hash_shift ^ c.window[c.strstart + 1]) & c.hash_mask;
1428
1452
  else x = o._tr_tally(c, 0, c.window[c.strstart]), c.lookahead--, c.strstart++;
1429
- if (x && (T(c, !1), c.strm.avail_out === 0)) return p;
1453
+ if (x && (A(c, !1), c.strm.avail_out === 0)) return p;
1430
1454
  }
1431
- return c.insert = c.strstart < D - 1 ? c.strstart : D - 1, R === v ? (T(c, !0), c.strm.avail_out === 0 ? ee : U) : c.last_lit && (T(c, !1), c.strm.avail_out === 0) ? p : B;
1455
+ return c.insert = c.strstart < D - 1 ? c.strstart : D - 1, R === v ? (A(c, !0), c.strm.avail_out === 0 ? ee : U) : c.last_lit && (A(c, !1), c.strm.avail_out === 0) ? p : B;
1432
1456
  }
1433
1457
  function ie(c, R) {
1434
1458
  for (var L, x, b; ; ) {
@@ -1438,12 +1462,12 @@ function Ot() {
1438
1462
  }
1439
1463
  if (L = 0, c.lookahead >= D && (c.ins_h = (c.ins_h << c.hash_shift ^ c.window[c.strstart + D - 1]) & c.hash_mask, L = c.prev[c.strstart & c.w_mask] = c.head[c.ins_h], c.head[c.ins_h] = c.strstart), c.prev_length = c.match_length, c.prev_match = c.match_start, c.match_length = D - 1, L !== 0 && c.prev_length < c.max_lazy_match && c.strstart - L <= c.w_size - q && (c.match_length = Z(c, L), c.match_length <= 5 && (c.strategy === 1 || c.match_length === D && 4096 < c.strstart - c.match_start) && (c.match_length = D - 1)), c.prev_length >= D && c.match_length <= c.prev_length) {
1440
1464
  for (b = c.strstart + c.lookahead - D, x = o._tr_tally(c, c.strstart - 1 - c.prev_match, c.prev_length - D), c.lookahead -= c.prev_length - 1, c.prev_length -= 2; ++c.strstart <= b && (c.ins_h = (c.ins_h << c.hash_shift ^ c.window[c.strstart + D - 1]) & c.hash_mask, L = c.prev[c.strstart & c.w_mask] = c.head[c.ins_h], c.head[c.ins_h] = c.strstart), --c.prev_length != 0; ) ;
1441
- if (c.match_available = 0, c.match_length = D - 1, c.strstart++, x && (T(c, !1), c.strm.avail_out === 0)) return p;
1465
+ if (c.match_available = 0, c.match_length = D - 1, c.strstart++, x && (A(c, !1), c.strm.avail_out === 0)) return p;
1442
1466
  } else if (c.match_available) {
1443
- if ((x = o._tr_tally(c, 0, c.window[c.strstart - 1])) && T(c, !1), c.strstart++, c.lookahead--, c.strm.avail_out === 0) return p;
1467
+ if ((x = o._tr_tally(c, 0, c.window[c.strstart - 1])) && A(c, !1), c.strstart++, c.lookahead--, c.strm.avail_out === 0) return p;
1444
1468
  } else c.match_available = 1, c.strstart++, c.lookahead--;
1445
1469
  }
1446
- return c.match_available && (x = o._tr_tally(c, 0, c.window[c.strstart - 1]), c.match_available = 0), c.insert = c.strstart < D - 1 ? c.strstart : D - 1, R === v ? (T(c, !0), c.strm.avail_out === 0 ? ee : U) : c.last_lit && (T(c, !1), c.strm.avail_out === 0) ? p : B;
1470
+ return c.match_available && (x = o._tr_tally(c, 0, c.window[c.strstart - 1]), c.match_available = 0), c.insert = c.strstart < D - 1 ? c.strstart : D - 1, R === v ? (A(c, !0), c.strm.avail_out === 0 ? ee : U) : c.last_lit && (A(c, !1), c.strm.avail_out === 0) ? p : B;
1447
1471
  }
1448
1472
  function re(c, R, L, x, b) {
1449
1473
  this.good_length = c, this.max_lazy = R, this.nice_length = L, this.max_chain = x, this.func = b;
@@ -1478,9 +1502,9 @@ function Ot() {
1478
1502
  }
1479
1503
  c.strstart += c.lookahead, c.lookahead = 0;
1480
1504
  var x = c.block_start + L;
1481
- if ((c.strstart === 0 || c.strstart >= x) && (c.lookahead = c.strstart - x, c.strstart = x, T(c, !1), c.strm.avail_out === 0) || c.strstart - c.block_start >= c.w_size - q && (T(c, !1), c.strm.avail_out === 0)) return p;
1505
+ if ((c.strstart === 0 || c.strstart >= x) && (c.lookahead = c.strstart - x, c.strstart = x, A(c, !1), c.strm.avail_out === 0) || c.strstart - c.block_start >= c.w_size - q && (A(c, !1), c.strm.avail_out === 0)) return p;
1482
1506
  }
1483
- return c.insert = 0, R === v ? (T(c, !0), c.strm.avail_out === 0 ? ee : U) : (c.strstart > c.block_start && (T(c, !1), c.strm.avail_out), p);
1507
+ return c.insert = 0, R === v ? (A(c, !0), c.strm.avail_out === 0 ? ee : U) : (c.strstart > c.block_start && (A(c, !1), c.strm.avail_out), p);
1484
1508
  }), new re(4, 4, 8, 4, ue), new re(4, 5, 16, 8, ue), new re(4, 6, 32, 32, ue), new re(4, 4, 16, 16, ie), new re(8, 16, 32, 32, ie), new re(8, 16, 128, 128, ie), new re(8, 32, 128, 256, ie), new re(32, 128, 258, 1024, ie), new re(32, 258, 258, 4096, ie)], n.deflateInit = function(c, R) {
1485
1509
  return ve(c, R, w, 15, 8, 0);
1486
1510
  }, n.deflateInit2 = ve, n.deflateReset = be, n.deflateResetKeep = he, n.deflateSetHeader = function(c, R) {
@@ -1531,9 +1555,9 @@ function Ot() {
1531
1555
  if (V === g) return p;
1532
1556
  break;
1533
1557
  }
1534
- if (S.match_length = 0, Y = o._tr_tally(S, 0, S.window[S.strstart]), S.lookahead--, S.strstart++, Y && (T(S, !1), S.strm.avail_out === 0)) return p;
1558
+ if (S.match_length = 0, Y = o._tr_tally(S, 0, S.window[S.strstart]), S.lookahead--, S.strstart++, Y && (A(S, !1), S.strm.avail_out === 0)) return p;
1535
1559
  }
1536
- return S.insert = 0, V === v ? (T(S, !0), S.strm.avail_out === 0 ? ee : U) : S.last_lit && (T(S, !1), S.strm.avail_out === 0) ? p : B;
1560
+ return S.insert = 0, V === v ? (A(S, !0), S.strm.avail_out === 0 ? ee : U) : S.last_lit && (A(S, !1), S.strm.avail_out === 0) ? p : B;
1537
1561
  })(x, R) : x.strategy === 3 ? (function(S, V) {
1538
1562
  for (var Y, G, K, oe, ne = S.window; ; ) {
1539
1563
  if (S.lookahead <= H) {
@@ -1547,9 +1571,9 @@ function Ot() {
1547
1571
  while (G === ne[++K] && G === ne[++K] && G === ne[++K] && G === ne[++K] && G === ne[++K] && G === ne[++K] && G === ne[++K] && G === ne[++K] && K < oe);
1548
1572
  S.match_length = H - (oe - K), S.match_length > S.lookahead && (S.match_length = S.lookahead);
1549
1573
  }
1550
- if (S.match_length >= D ? (Y = o._tr_tally(S, 1, S.match_length - D), S.lookahead -= S.match_length, S.strstart += S.match_length, S.match_length = 0) : (Y = o._tr_tally(S, 0, S.window[S.strstart]), S.lookahead--, S.strstart++), Y && (T(S, !1), S.strm.avail_out === 0)) return p;
1574
+ if (S.match_length >= D ? (Y = o._tr_tally(S, 1, S.match_length - D), S.lookahead -= S.match_length, S.strstart += S.match_length, S.match_length = 0) : (Y = o._tr_tally(S, 0, S.window[S.strstart]), S.lookahead--, S.strstart++), Y && (A(S, !1), S.strm.avail_out === 0)) return p;
1551
1575
  }
1552
- return S.insert = 0, V === v ? (T(S, !0), S.strm.avail_out === 0 ? ee : U) : S.last_lit && (T(S, !1), S.strm.avail_out === 0) ? p : B;
1576
+ return S.insert = 0, V === v ? (A(S, !0), S.strm.avail_out === 0 ? ee : U) : S.last_lit && (A(S, !1), S.strm.avail_out === 0) ? p : B;
1553
1577
  })(x, R) : s[x.level].func(x, R);
1554
1578
  if (W !== ee && W !== U || (x.status = 666), W === p || W === ee) return c.avail_out === 0 && (x.last_flush = -1), d;
1555
1579
  if (W === B && (R === 1 ? o._tr_align(x) : R !== 5 && (o._tr_stored_block(x, 0, 0, !1), R === 3 && (Q(x.head), x.lookahead === 0 && (x.strstart = 0, x.block_start = 0, x.insert = 0))), I(c), c.avail_out === 0)) return x.last_flush = -1, d;
@@ -1686,21 +1710,21 @@ function Ot() {
1686
1710
  n.inflateReset = E, n.inflateReset2 = _, n.inflateResetKeep = M, n.inflateInit = function(k) {
1687
1711
  return N(k, 15);
1688
1712
  }, n.inflateInit2 = N, n.inflate = function(k, z) {
1689
- var p, B, ee, U, te, F, Q, I, T, J, $, Z, le, ue, ie, re, de, he, be, ve, c, R, L, x, b = 0, C = new s.Buf8(4), O = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
1713
+ var p, B, ee, U, te, F, Q, I, A, J, $, Z, le, ue, ie, re, de, he, be, ve, c, R, L, x, b = 0, C = new s.Buf8(4), O = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
1690
1714
  if (!k || !k.state || !k.output || !k.input && k.avail_in !== 0) return d;
1691
- (p = k.state).mode === 12 && (p.mode = 13), te = k.next_out, ee = k.output, Q = k.avail_out, U = k.next_in, B = k.input, F = k.avail_in, I = p.hold, T = p.bits, J = F, $ = Q, R = v;
1715
+ (p = k.state).mode === 12 && (p.mode = 13), te = k.next_out, ee = k.output, Q = k.avail_out, U = k.next_in, B = k.input, F = k.avail_in, I = p.hold, A = p.bits, J = F, $ = Q, R = v;
1692
1716
  e: for (; ; ) switch (p.mode) {
1693
1717
  case y:
1694
1718
  if (p.wrap === 0) {
1695
1719
  p.mode = 13;
1696
1720
  break;
1697
1721
  }
1698
- for (; T < 16; ) {
1722
+ for (; A < 16; ) {
1699
1723
  if (F === 0) break e;
1700
- F--, I += B[U++] << T, T += 8;
1724
+ F--, I += B[U++] << A, A += 8;
1701
1725
  }
1702
1726
  if (2 & p.wrap && I === 35615) {
1703
- C[p.check = 0] = 255 & I, C[1] = I >>> 8 & 255, p.check = o(p.check, C, 2, 0), T = I = 0, p.mode = 2;
1727
+ C[p.check = 0] = 255 & I, C[1] = I >>> 8 & 255, p.check = o(p.check, C, 2, 0), A = I = 0, p.mode = 2;
1704
1728
  break;
1705
1729
  }
1706
1730
  if (p.flags = 0, p.head && (p.head.done = !1), !(1 & p.wrap) || (((255 & I) << 8) + (I >> 8)) % 31) {
@@ -1711,17 +1735,17 @@ function Ot() {
1711
1735
  k.msg = "unknown compression method", p.mode = 30;
1712
1736
  break;
1713
1737
  }
1714
- if (T -= 4, c = 8 + (15 & (I >>>= 4)), p.wbits === 0) p.wbits = c;
1738
+ if (A -= 4, c = 8 + (15 & (I >>>= 4)), p.wbits === 0) p.wbits = c;
1715
1739
  else if (c > p.wbits) {
1716
1740
  k.msg = "invalid window size", p.mode = 30;
1717
1741
  break;
1718
1742
  }
1719
- p.dmax = 1 << c, k.adler = p.check = 1, p.mode = 512 & I ? 10 : 12, T = I = 0;
1743
+ p.dmax = 1 << c, k.adler = p.check = 1, p.mode = 512 & I ? 10 : 12, A = I = 0;
1720
1744
  break;
1721
1745
  case 2:
1722
- for (; T < 16; ) {
1746
+ for (; A < 16; ) {
1723
1747
  if (F === 0) break e;
1724
- F--, I += B[U++] << T, T += 8;
1748
+ F--, I += B[U++] << A, A += 8;
1725
1749
  }
1726
1750
  if (p.flags = I, (255 & p.flags) != 8) {
1727
1751
  k.msg = "unknown compression method", p.mode = 30;
@@ -1731,26 +1755,26 @@ function Ot() {
1731
1755
  k.msg = "unknown header flags set", p.mode = 30;
1732
1756
  break;
1733
1757
  }
1734
- p.head && (p.head.text = I >> 8 & 1), 512 & p.flags && (C[0] = 255 & I, C[1] = I >>> 8 & 255, p.check = o(p.check, C, 2, 0)), T = I = 0, p.mode = 3;
1758
+ p.head && (p.head.text = I >> 8 & 1), 512 & p.flags && (C[0] = 255 & I, C[1] = I >>> 8 & 255, p.check = o(p.check, C, 2, 0)), A = I = 0, p.mode = 3;
1735
1759
  case 3:
1736
- for (; T < 32; ) {
1760
+ for (; A < 32; ) {
1737
1761
  if (F === 0) break e;
1738
- F--, I += B[U++] << T, T += 8;
1762
+ F--, I += B[U++] << A, A += 8;
1739
1763
  }
1740
- p.head && (p.head.time = I), 512 & p.flags && (C[0] = 255 & I, C[1] = I >>> 8 & 255, C[2] = I >>> 16 & 255, C[3] = I >>> 24 & 255, p.check = o(p.check, C, 4, 0)), T = I = 0, p.mode = 4;
1764
+ p.head && (p.head.time = I), 512 & p.flags && (C[0] = 255 & I, C[1] = I >>> 8 & 255, C[2] = I >>> 16 & 255, C[3] = I >>> 24 & 255, p.check = o(p.check, C, 4, 0)), A = I = 0, p.mode = 4;
1741
1765
  case 4:
1742
- for (; T < 16; ) {
1766
+ for (; A < 16; ) {
1743
1767
  if (F === 0) break e;
1744
- F--, I += B[U++] << T, T += 8;
1768
+ F--, I += B[U++] << A, A += 8;
1745
1769
  }
1746
- p.head && (p.head.xflags = 255 & I, p.head.os = I >> 8), 512 & p.flags && (C[0] = 255 & I, C[1] = I >>> 8 & 255, p.check = o(p.check, C, 2, 0)), T = I = 0, p.mode = 5;
1770
+ p.head && (p.head.xflags = 255 & I, p.head.os = I >> 8), 512 & p.flags && (C[0] = 255 & I, C[1] = I >>> 8 & 255, p.check = o(p.check, C, 2, 0)), A = I = 0, p.mode = 5;
1747
1771
  case 5:
1748
1772
  if (1024 & p.flags) {
1749
- for (; T < 16; ) {
1773
+ for (; A < 16; ) {
1750
1774
  if (F === 0) break e;
1751
- F--, I += B[U++] << T, T += 8;
1775
+ F--, I += B[U++] << A, A += 8;
1752
1776
  }
1753
- p.length = I, p.head && (p.head.extra_len = I), 512 & p.flags && (C[0] = 255 & I, C[1] = I >>> 8 & 255, p.check = o(p.check, C, 2, 0)), T = I = 0;
1777
+ p.length = I, p.head && (p.head.extra_len = I), 512 & p.flags && (C[0] = 255 & I, C[1] = I >>> 8 & 255, p.check = o(p.check, C, 2, 0)), A = I = 0;
1754
1778
  } else p.head && (p.head.extra = null);
1755
1779
  p.mode = 6;
1756
1780
  case 6:
@@ -1772,45 +1796,45 @@ function Ot() {
1772
1796
  p.mode = 9;
1773
1797
  case 9:
1774
1798
  if (512 & p.flags) {
1775
- for (; T < 16; ) {
1799
+ for (; A < 16; ) {
1776
1800
  if (F === 0) break e;
1777
- F--, I += B[U++] << T, T += 8;
1801
+ F--, I += B[U++] << A, A += 8;
1778
1802
  }
1779
1803
  if (I !== (65535 & p.check)) {
1780
1804
  k.msg = "header crc mismatch", p.mode = 30;
1781
1805
  break;
1782
1806
  }
1783
- T = I = 0;
1807
+ A = I = 0;
1784
1808
  }
1785
1809
  p.head && (p.head.hcrc = p.flags >> 9 & 1, p.head.done = !0), k.adler = p.check = 0, p.mode = 12;
1786
1810
  break;
1787
1811
  case 10:
1788
- for (; T < 32; ) {
1812
+ for (; A < 32; ) {
1789
1813
  if (F === 0) break e;
1790
- F--, I += B[U++] << T, T += 8;
1814
+ F--, I += B[U++] << A, A += 8;
1791
1815
  }
1792
- k.adler = p.check = m(I), T = I = 0, p.mode = 11;
1816
+ k.adler = p.check = m(I), A = I = 0, p.mode = 11;
1793
1817
  case 11:
1794
- if (p.havedict === 0) return k.next_out = te, k.avail_out = Q, k.next_in = U, k.avail_in = F, p.hold = I, p.bits = T, 2;
1818
+ if (p.havedict === 0) return k.next_out = te, k.avail_out = Q, k.next_in = U, k.avail_in = F, p.hold = I, p.bits = A, 2;
1795
1819
  k.adler = p.check = 1, p.mode = 12;
1796
1820
  case 12:
1797
1821
  if (z === 5 || z === 6) break e;
1798
1822
  case 13:
1799
1823
  if (p.last) {
1800
- I >>>= 7 & T, T -= 7 & T, p.mode = 27;
1824
+ I >>>= 7 & A, A -= 7 & A, p.mode = 27;
1801
1825
  break;
1802
1826
  }
1803
- for (; T < 3; ) {
1827
+ for (; A < 3; ) {
1804
1828
  if (F === 0) break e;
1805
- F--, I += B[U++] << T, T += 8;
1829
+ F--, I += B[U++] << A, A += 8;
1806
1830
  }
1807
- switch (p.last = 1 & I, T -= 1, 3 & (I >>>= 1)) {
1831
+ switch (p.last = 1 & I, A -= 1, 3 & (I >>>= 1)) {
1808
1832
  case 0:
1809
1833
  p.mode = 14;
1810
1834
  break;
1811
1835
  case 1:
1812
1836
  if (H(p), p.mode = 20, z !== 6) break;
1813
- I >>>= 2, T -= 2;
1837
+ I >>>= 2, A -= 2;
1814
1838
  break e;
1815
1839
  case 2:
1816
1840
  p.mode = 17;
@@ -1818,18 +1842,18 @@ function Ot() {
1818
1842
  case 3:
1819
1843
  k.msg = "invalid block type", p.mode = 30;
1820
1844
  }
1821
- I >>>= 2, T -= 2;
1845
+ I >>>= 2, A -= 2;
1822
1846
  break;
1823
1847
  case 14:
1824
- for (I >>>= 7 & T, T -= 7 & T; T < 32; ) {
1848
+ for (I >>>= 7 & A, A -= 7 & A; A < 32; ) {
1825
1849
  if (F === 0) break e;
1826
- F--, I += B[U++] << T, T += 8;
1850
+ F--, I += B[U++] << A, A += 8;
1827
1851
  }
1828
1852
  if ((65535 & I) != (I >>> 16 ^ 65535)) {
1829
1853
  k.msg = "invalid stored block lengths", p.mode = 30;
1830
1854
  break;
1831
1855
  }
1832
- if (p.length = 65535 & I, T = I = 0, p.mode = 15, z === 6) break e;
1856
+ if (p.length = 65535 & I, A = I = 0, p.mode = 15, z === 6) break e;
1833
1857
  case 15:
1834
1858
  p.mode = 16;
1835
1859
  case 16:
@@ -1841,22 +1865,22 @@ function Ot() {
1841
1865
  p.mode = 12;
1842
1866
  break;
1843
1867
  case 17:
1844
- for (; T < 14; ) {
1868
+ for (; A < 14; ) {
1845
1869
  if (F === 0) break e;
1846
- F--, I += B[U++] << T, T += 8;
1870
+ F--, I += B[U++] << A, A += 8;
1847
1871
  }
1848
- if (p.nlen = 257 + (31 & I), I >>>= 5, T -= 5, p.ndist = 1 + (31 & I), I >>>= 5, T -= 5, p.ncode = 4 + (15 & I), I >>>= 4, T -= 4, 286 < p.nlen || 30 < p.ndist) {
1872
+ if (p.nlen = 257 + (31 & I), I >>>= 5, A -= 5, p.ndist = 1 + (31 & I), I >>>= 5, A -= 5, p.ncode = 4 + (15 & I), I >>>= 4, A -= 4, 286 < p.nlen || 30 < p.ndist) {
1849
1873
  k.msg = "too many length or distance symbols", p.mode = 30;
1850
1874
  break;
1851
1875
  }
1852
1876
  p.have = 0, p.mode = 18;
1853
1877
  case 18:
1854
1878
  for (; p.have < p.ncode; ) {
1855
- for (; T < 3; ) {
1879
+ for (; A < 3; ) {
1856
1880
  if (F === 0) break e;
1857
- F--, I += B[U++] << T, T += 8;
1881
+ F--, I += B[U++] << A, A += 8;
1858
1882
  }
1859
- p.lens[O[p.have++]] = 7 & I, I >>>= 3, T -= 3;
1883
+ p.lens[O[p.have++]] = 7 & I, I >>>= 3, A -= 3;
1860
1884
  }
1861
1885
  for (; p.have < 19; ) p.lens[O[p.have++]] = 0;
1862
1886
  if (p.lencode = p.lendyn, p.lenbits = 7, L = { bits: p.lenbits }, R = h(0, p.lens, 0, 19, p.lencode, 0, p.work, L), p.lenbits = L.bits, R) {
@@ -1866,34 +1890,34 @@ function Ot() {
1866
1890
  p.have = 0, p.mode = 19;
1867
1891
  case 19:
1868
1892
  for (; p.have < p.nlen + p.ndist; ) {
1869
- for (; re = (b = p.lencode[I & (1 << p.lenbits) - 1]) >>> 16 & 255, de = 65535 & b, !((ie = b >>> 24) <= T); ) {
1893
+ for (; re = (b = p.lencode[I & (1 << p.lenbits) - 1]) >>> 16 & 255, de = 65535 & b, !((ie = b >>> 24) <= A); ) {
1870
1894
  if (F === 0) break e;
1871
- F--, I += B[U++] << T, T += 8;
1895
+ F--, I += B[U++] << A, A += 8;
1872
1896
  }
1873
- if (de < 16) I >>>= ie, T -= ie, p.lens[p.have++] = de;
1897
+ if (de < 16) I >>>= ie, A -= ie, p.lens[p.have++] = de;
1874
1898
  else {
1875
1899
  if (de === 16) {
1876
- for (x = ie + 2; T < x; ) {
1900
+ for (x = ie + 2; A < x; ) {
1877
1901
  if (F === 0) break e;
1878
- F--, I += B[U++] << T, T += 8;
1902
+ F--, I += B[U++] << A, A += 8;
1879
1903
  }
1880
- if (I >>>= ie, T -= ie, p.have === 0) {
1904
+ if (I >>>= ie, A -= ie, p.have === 0) {
1881
1905
  k.msg = "invalid bit length repeat", p.mode = 30;
1882
1906
  break;
1883
1907
  }
1884
- c = p.lens[p.have - 1], Z = 3 + (3 & I), I >>>= 2, T -= 2;
1908
+ c = p.lens[p.have - 1], Z = 3 + (3 & I), I >>>= 2, A -= 2;
1885
1909
  } else if (de === 17) {
1886
- for (x = ie + 3; T < x; ) {
1910
+ for (x = ie + 3; A < x; ) {
1887
1911
  if (F === 0) break e;
1888
- F--, I += B[U++] << T, T += 8;
1912
+ F--, I += B[U++] << A, A += 8;
1889
1913
  }
1890
- T -= ie, c = 0, Z = 3 + (7 & (I >>>= ie)), I >>>= 3, T -= 3;
1914
+ A -= ie, c = 0, Z = 3 + (7 & (I >>>= ie)), I >>>= 3, A -= 3;
1891
1915
  } else {
1892
- for (x = ie + 7; T < x; ) {
1916
+ for (x = ie + 7; A < x; ) {
1893
1917
  if (F === 0) break e;
1894
- F--, I += B[U++] << T, T += 8;
1918
+ F--, I += B[U++] << A, A += 8;
1895
1919
  }
1896
- T -= ie, c = 0, Z = 11 + (127 & (I >>>= ie)), I >>>= 7, T -= 7;
1920
+ A -= ie, c = 0, Z = 11 + (127 & (I >>>= ie)), I >>>= 7, A -= 7;
1897
1921
  }
1898
1922
  if (p.have + Z > p.nlen + p.ndist) {
1899
1923
  k.msg = "invalid bit length repeat", p.mode = 30;
@@ -1920,21 +1944,21 @@ function Ot() {
1920
1944
  p.mode = 21;
1921
1945
  case 21:
1922
1946
  if (6 <= F && 258 <= Q) {
1923
- k.next_out = te, k.avail_out = Q, k.next_in = U, k.avail_in = F, p.hold = I, p.bits = T, a(k, $), te = k.next_out, ee = k.output, Q = k.avail_out, U = k.next_in, B = k.input, F = k.avail_in, I = p.hold, T = p.bits, p.mode === 12 && (p.back = -1);
1947
+ k.next_out = te, k.avail_out = Q, k.next_in = U, k.avail_in = F, p.hold = I, p.bits = A, a(k, $), te = k.next_out, ee = k.output, Q = k.avail_out, U = k.next_in, B = k.input, F = k.avail_in, I = p.hold, A = p.bits, p.mode === 12 && (p.back = -1);
1924
1948
  break;
1925
1949
  }
1926
- for (p.back = 0; re = (b = p.lencode[I & (1 << p.lenbits) - 1]) >>> 16 & 255, de = 65535 & b, !((ie = b >>> 24) <= T); ) {
1950
+ for (p.back = 0; re = (b = p.lencode[I & (1 << p.lenbits) - 1]) >>> 16 & 255, de = 65535 & b, !((ie = b >>> 24) <= A); ) {
1927
1951
  if (F === 0) break e;
1928
- F--, I += B[U++] << T, T += 8;
1952
+ F--, I += B[U++] << A, A += 8;
1929
1953
  }
1930
1954
  if (re && (240 & re) == 0) {
1931
- for (he = ie, be = re, ve = de; re = (b = p.lencode[ve + ((I & (1 << he + be) - 1) >> he)]) >>> 16 & 255, de = 65535 & b, !(he + (ie = b >>> 24) <= T); ) {
1955
+ for (he = ie, be = re, ve = de; re = (b = p.lencode[ve + ((I & (1 << he + be) - 1) >> he)]) >>> 16 & 255, de = 65535 & b, !(he + (ie = b >>> 24) <= A); ) {
1932
1956
  if (F === 0) break e;
1933
- F--, I += B[U++] << T, T += 8;
1957
+ F--, I += B[U++] << A, A += 8;
1934
1958
  }
1935
- I >>>= he, T -= he, p.back += he;
1959
+ I >>>= he, A -= he, p.back += he;
1936
1960
  }
1937
- if (I >>>= ie, T -= ie, p.back += ie, p.length = de, re === 0) {
1961
+ if (I >>>= ie, A -= ie, p.back += ie, p.length = de, re === 0) {
1938
1962
  p.mode = 26;
1939
1963
  break;
1940
1964
  }
@@ -1949,37 +1973,37 @@ function Ot() {
1949
1973
  p.extra = 15 & re, p.mode = 22;
1950
1974
  case 22:
1951
1975
  if (p.extra) {
1952
- for (x = p.extra; T < x; ) {
1976
+ for (x = p.extra; A < x; ) {
1953
1977
  if (F === 0) break e;
1954
- F--, I += B[U++] << T, T += 8;
1978
+ F--, I += B[U++] << A, A += 8;
1955
1979
  }
1956
- p.length += I & (1 << p.extra) - 1, I >>>= p.extra, T -= p.extra, p.back += p.extra;
1980
+ p.length += I & (1 << p.extra) - 1, I >>>= p.extra, A -= p.extra, p.back += p.extra;
1957
1981
  }
1958
1982
  p.was = p.length, p.mode = 23;
1959
1983
  case 23:
1960
- for (; re = (b = p.distcode[I & (1 << p.distbits) - 1]) >>> 16 & 255, de = 65535 & b, !((ie = b >>> 24) <= T); ) {
1984
+ for (; re = (b = p.distcode[I & (1 << p.distbits) - 1]) >>> 16 & 255, de = 65535 & b, !((ie = b >>> 24) <= A); ) {
1961
1985
  if (F === 0) break e;
1962
- F--, I += B[U++] << T, T += 8;
1986
+ F--, I += B[U++] << A, A += 8;
1963
1987
  }
1964
1988
  if ((240 & re) == 0) {
1965
- for (he = ie, be = re, ve = de; re = (b = p.distcode[ve + ((I & (1 << he + be) - 1) >> he)]) >>> 16 & 255, de = 65535 & b, !(he + (ie = b >>> 24) <= T); ) {
1989
+ for (he = ie, be = re, ve = de; re = (b = p.distcode[ve + ((I & (1 << he + be) - 1) >> he)]) >>> 16 & 255, de = 65535 & b, !(he + (ie = b >>> 24) <= A); ) {
1966
1990
  if (F === 0) break e;
1967
- F--, I += B[U++] << T, T += 8;
1991
+ F--, I += B[U++] << A, A += 8;
1968
1992
  }
1969
- I >>>= he, T -= he, p.back += he;
1993
+ I >>>= he, A -= he, p.back += he;
1970
1994
  }
1971
- if (I >>>= ie, T -= ie, p.back += ie, 64 & re) {
1995
+ if (I >>>= ie, A -= ie, p.back += ie, 64 & re) {
1972
1996
  k.msg = "invalid distance code", p.mode = 30;
1973
1997
  break;
1974
1998
  }
1975
1999
  p.offset = de, p.extra = 15 & re, p.mode = 24;
1976
2000
  case 24:
1977
2001
  if (p.extra) {
1978
- for (x = p.extra; T < x; ) {
2002
+ for (x = p.extra; A < x; ) {
1979
2003
  if (F === 0) break e;
1980
- F--, I += B[U++] << T, T += 8;
2004
+ F--, I += B[U++] << A, A += 8;
1981
2005
  }
1982
- p.offset += I & (1 << p.extra) - 1, I >>>= p.extra, T -= p.extra, p.back += p.extra;
2006
+ p.offset += I & (1 << p.extra) - 1, I >>>= p.extra, A -= p.extra, p.back += p.extra;
1983
2007
  }
1984
2008
  if (p.offset > p.dmax) {
1985
2009
  k.msg = "invalid distance too far back", p.mode = 30;
@@ -2004,28 +2028,28 @@ function Ot() {
2004
2028
  break;
2005
2029
  case 27:
2006
2030
  if (p.wrap) {
2007
- for (; T < 32; ) {
2031
+ for (; A < 32; ) {
2008
2032
  if (F === 0) break e;
2009
- F--, I |= B[U++] << T, T += 8;
2033
+ F--, I |= B[U++] << A, A += 8;
2010
2034
  }
2011
2035
  if ($ -= Q, k.total_out += $, p.total += $, $ && (k.adler = p.check = p.flags ? o(p.check, ee, $, te - $) : r(p.check, ee, $, te - $)), $ = Q, (p.flags ? I : m(I)) !== p.check) {
2012
2036
  k.msg = "incorrect data check", p.mode = 30;
2013
2037
  break;
2014
2038
  }
2015
- T = I = 0;
2039
+ A = I = 0;
2016
2040
  }
2017
2041
  p.mode = 28;
2018
2042
  case 28:
2019
2043
  if (p.wrap && p.flags) {
2020
- for (; T < 32; ) {
2044
+ for (; A < 32; ) {
2021
2045
  if (F === 0) break e;
2022
- F--, I += B[U++] << T, T += 8;
2046
+ F--, I += B[U++] << A, A += 8;
2023
2047
  }
2024
2048
  if (I !== (4294967295 & p.total)) {
2025
2049
  k.msg = "incorrect length check", p.mode = 30;
2026
2050
  break;
2027
2051
  }
2028
- T = I = 0;
2052
+ A = I = 0;
2029
2053
  }
2030
2054
  p.mode = 29;
2031
2055
  case 29:
@@ -2040,7 +2064,7 @@ function Ot() {
2040
2064
  default:
2041
2065
  return d;
2042
2066
  }
2043
- return k.next_out = te, k.avail_out = Q, k.next_in = U, k.avail_in = F, p.hold = I, p.bits = T, (p.wsize || $ !== k.avail_out && p.mode < 30 && (p.mode < 27 || z !== 4)) && q(k, k.output, k.next_out, $ - k.avail_out) ? (p.mode = 31, -4) : (J -= k.avail_in, $ -= k.avail_out, k.total_in += J, k.total_out += $, p.total += $, p.wrap && $ && (k.adler = p.check = p.flags ? o(p.check, ee, $, k.next_out - $) : r(p.check, ee, $, k.next_out - $)), k.data_type = p.bits + (p.last ? 64 : 0) + (p.mode === 12 ? 128 : 0) + (p.mode === 20 || p.mode === 15 ? 256 : 0), (J == 0 && $ === 0 || z === 4) && R === v && (R = -5), R);
2067
+ return k.next_out = te, k.avail_out = Q, k.next_in = U, k.avail_in = F, p.hold = I, p.bits = A, (p.wsize || $ !== k.avail_out && p.mode < 30 && (p.mode < 27 || z !== 4)) && q(k, k.output, k.next_out, $ - k.avail_out) ? (p.mode = 31, -4) : (J -= k.avail_in, $ -= k.avail_out, k.total_in += J, k.total_out += $, p.total += $, p.wrap && $ && (k.adler = p.check = p.flags ? o(p.check, ee, $, k.next_out - $) : r(p.check, ee, $, k.next_out - $)), k.data_type = p.bits + (p.last ? 64 : 0) + (p.mode === 12 ? 128 : 0) + (p.mode === 20 || p.mode === 15 ? 256 : 0), (J == 0 && $ === 0 || z === 4) && R === v && (R = -5), R);
2044
2068
  }, n.inflateEnd = function(k) {
2045
2069
  if (!k || !k.state) return d;
2046
2070
  var z = k.state;
@@ -2055,7 +2079,7 @@ function Ot() {
2055
2079
  }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, i, n) {
2056
2080
  var s = t("../utils/common"), r = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], o = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], a = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], h = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
2057
2081
  i.exports = function(u, g, v, d, y, l, f, m) {
2058
- var w, M, E, _, N, P, j, D, H, q = m.bits, k = 0, z = 0, p = 0, B = 0, ee = 0, U = 0, te = 0, F = 0, Q = 0, I = 0, T = null, J = 0, $ = new s.Buf16(16), Z = new s.Buf16(16), le = null, ue = 0;
2082
+ var w, M, E, _, N, P, j, D, H, q = m.bits, k = 0, z = 0, p = 0, B = 0, ee = 0, U = 0, te = 0, F = 0, Q = 0, I = 0, A = null, J = 0, $ = new s.Buf16(16), Z = new s.Buf16(16), le = null, ue = 0;
2059
2083
  for (k = 0; k <= 15; k++) $[k] = 0;
2060
2084
  for (z = 0; z < d; z++) $[g[v + z]]++;
2061
2085
  for (ee = q, B = 15; 1 <= B && $[B] === 0; B--) ;
@@ -2065,9 +2089,9 @@ function Ot() {
2065
2089
  if (0 < F && (u === 0 || B !== 1)) return -1;
2066
2090
  for (Z[1] = 0, k = 1; k < 15; k++) Z[k + 1] = Z[k] + $[k];
2067
2091
  for (z = 0; z < d; z++) g[v + z] !== 0 && (f[Z[g[v + z]]++] = z);
2068
- if (P = u === 0 ? (T = le = f, 19) : u === 1 ? (T = r, J -= 257, le = o, ue -= 257, 256) : (T = a, le = h, -1), k = p, N = l, te = z = I = 0, E = -1, _ = (Q = 1 << (U = ee)) - 1, u === 1 && 852 < Q || u === 2 && 592 < Q) return 1;
2092
+ if (P = u === 0 ? (A = le = f, 19) : u === 1 ? (A = r, J -= 257, le = o, ue -= 257, 256) : (A = a, le = h, -1), k = p, N = l, te = z = I = 0, E = -1, _ = (Q = 1 << (U = ee)) - 1, u === 1 && 852 < Q || u === 2 && 592 < Q) return 1;
2069
2093
  for (; ; ) {
2070
- for (j = k - te, H = f[z] < P ? (D = 0, f[z]) : f[z] > P ? (D = le[ue + f[z]], T[J + f[z]]) : (D = 96, 0), w = 1 << k - te, p = M = 1 << U; y[N + (I >> te) + (M -= w)] = j << 24 | D << 16 | H | 0, M !== 0; ) ;
2094
+ for (j = k - te, H = f[z] < P ? (D = 0, f[z]) : f[z] > P ? (D = le[ue + f[z]], A[J + f[z]]) : (D = 96, 0), w = 1 << k - te, p = M = 1 << U; y[N + (I >> te) + (M -= w)] = j << 24 | D << 16 | H | 0, M !== 0; ) ;
2071
2095
  for (w = 1 << k - 1; I & w; ) w >>= 1;
2072
2096
  if (w !== 0 ? (I &= w - 1, I += w) : I = 0, z++, --$[k] == 0) {
2073
2097
  if (k === B) break;
@@ -2105,7 +2129,7 @@ function Ot() {
2105
2129
  function I(b, C) {
2106
2130
  this.dyn_tree = b, this.max_code = 0, this.stat_desc = C;
2107
2131
  }
2108
- function T(b) {
2132
+ function A(b) {
2109
2133
  return b < 256 ? z[b] : z[256 + (b >>> 7)];
2110
2134
  }
2111
2135
  function J(b, C) {
@@ -2149,7 +2173,7 @@ function Ot() {
2149
2173
  }
2150
2174
  function be(b, C, O) {
2151
2175
  var W, S, V, Y, G = 0;
2152
- if (b.last_lit !== 0) for (; W = b.pending_buf[b.d_buf + 2 * G] << 8 | b.pending_buf[b.d_buf + 2 * G + 1], S = b.pending_buf[b.l_buf + G], G++, W === 0 ? Z(b, S, C) : (Z(b, (V = p[S]) + g + 1, C), (Y = P[V]) !== 0 && $(b, S -= B[V], Y), Z(b, V = T(--W), O), (Y = j[V]) !== 0 && $(b, W -= F[V], Y)), G < b.last_lit; ) ;
2176
+ if (b.last_lit !== 0) for (; W = b.pending_buf[b.d_buf + 2 * G] << 8 | b.pending_buf[b.d_buf + 2 * G + 1], S = b.pending_buf[b.l_buf + G], G++, W === 0 ? Z(b, S, C) : (Z(b, (V = p[S]) + g + 1, C), (Y = P[V]) !== 0 && $(b, S -= B[V], Y), Z(b, V = A(--W), O), (Y = j[V]) !== 0 && $(b, W -= F[V], Y)), G < b.last_lit; ) ;
2153
2177
  Z(b, M, C);
2154
2178
  }
2155
2179
  function ve(b, C) {
@@ -2222,7 +2246,7 @@ function Ot() {
2222
2246
  R(G, G.dyn_ltree, K - 1), R(G, G.dyn_dtree, oe - 1);
2223
2247
  })(b, b.l_desc.max_code + 1, b.d_desc.max_code + 1, Y + 1), be(b, b.dyn_ltree, b.dyn_dtree)), ie(b), W && re(b);
2224
2248
  }, n._tr_tally = function(b, C, O) {
2225
- return b.pending_buf[b.d_buf + 2 * b.last_lit] = C >>> 8 & 255, b.pending_buf[b.d_buf + 2 * b.last_lit + 1] = 255 & C, b.pending_buf[b.l_buf + b.last_lit] = 255 & O, b.last_lit++, C === 0 ? b.dyn_ltree[2 * O]++ : (b.matches++, C--, b.dyn_ltree[2 * (p[O] + g + 1)]++, b.dyn_dtree[2 * T(C)]++), b.last_lit === b.lit_bufsize - 1;
2249
+ return b.pending_buf[b.d_buf + 2 * b.last_lit] = C >>> 8 & 255, b.pending_buf[b.d_buf + 2 * b.last_lit + 1] = 255 & C, b.pending_buf[b.l_buf + b.last_lit] = 255 & O, b.last_lit++, C === 0 ? b.dyn_ltree[2 * O]++ : (b.matches++, C--, b.dyn_ltree[2 * (p[O] + g + 1)]++, b.dyn_dtree[2 * A(C)]++), b.last_lit === b.lit_bufsize - 1;
2226
2250
  }, n._tr_align = function(b) {
2227
2251
  $(b, 2, 3), Z(b, M, q), (function(C) {
2228
2252
  C.bi_valid === 16 ? (J(C, C.bi_buf), C.bi_buf = 0, C.bi_valid = 0) : 8 <= C.bi_valid && (C.pending_buf[C.pending++] = 255 & C.bi_buf, C.bi_buf >>= 8, C.bi_valid -= 8);
@@ -2312,14 +2336,14 @@ function Ot() {
2312
2336
  });
2313
2337
  })(Ve)), Ve.exports;
2314
2338
  }
2315
- var Wt = Ot();
2316
- const jt = /* @__PURE__ */ ht(Wt);
2317
- var je = { exports: {} }, Ut = je.exports, Qe;
2318
- function Ft() {
2319
- return Qe || (Qe = 1, (function(A, e) {
2339
+ var Ut = jt();
2340
+ const Ft = /* @__PURE__ */ ht(Ut);
2341
+ var je = { exports: {} }, Vt = je.exports, Qe;
2342
+ function Ht() {
2343
+ return Qe || (Qe = 1, (function(T, e) {
2320
2344
  (function(t, i) {
2321
- A.exports = i();
2322
- })(Ut, function() {
2345
+ T.exports = i();
2346
+ })(Vt, function() {
2323
2347
  var t = function() {
2324
2348
  function i(d) {
2325
2349
  return r.appendChild(d.dom), d;
@@ -2359,9 +2383,9 @@ function Ft() {
2359
2383
  });
2360
2384
  })(je)), je.exports;
2361
2385
  }
2362
- var Vt = Ft();
2363
- const Ht = /* @__PURE__ */ ht(Vt);
2364
- class Gt {
2386
+ var Gt = Ht();
2387
+ const Zt = /* @__PURE__ */ ht(Gt);
2388
+ class $t {
2365
2389
  panel = null;
2366
2390
  listEl = null;
2367
2391
  isVisible = !1;
@@ -2515,7 +2539,7 @@ class ct {
2515
2539
  constructor(e) {
2516
2540
  this.engine = e;
2517
2541
  const t = document.getElementById(e?.options?.containerId ?? "") ?? e?.container ?? null;
2518
- t && (this.panelUI = new Gt(t, this));
2542
+ t && (this.panelUI = new $t(t, this));
2519
2543
  }
2520
2544
  // ─── 数据 ──────────────────────────────────────────────
2521
2545
  _loadLayers(e = this.engine.dwgData?.layers ?? []) {
@@ -2642,8 +2666,8 @@ class ct {
2642
2666
  this.panelUI?.dispose(), this.panelUI = null, this.layerMap.clear();
2643
2667
  }
2644
2668
  }
2645
- var fe = /* @__PURE__ */ ((A) => (A.ModelLoadStart = "model-load-start", A.ModelLoadProgress = "model-load-progress", A.ModelLoaded = "model-loaded", A.ModelLoadError = "model-load-error", A.RenderStart = "render-start", A.RenderEnd = "render-end", A.CameraChanged = "camera-changed", A.CameraReset = "camera-reset", A.SelectionChanged = "selection-changed", A.HoverChanged = "hover-changed", A.EntityClick = "entity-click", A.LayerVisibilityChanged = "layer-visibility-changed", A.LayerColorChanged = "layer-color-changed", A.ViewZoomChanged = "view-zoom-changed", A.ViewPanChanged = "view-pan-changed", A.ToolActivated = "tool-activated", A.ToolDeactivated = "tool-deactivated", A.Error = "error", A.Warning = "warning", A))(fe || {});
2646
- class Zt {
2669
+ var fe = /* @__PURE__ */ ((T) => (T.ModelLoadStart = "model-load-start", T.ModelLoadProgress = "model-load-progress", T.ModelLoaded = "model-loaded", T.ModelLoadError = "model-load-error", T.RenderStart = "render-start", T.RenderEnd = "render-end", T.CameraChanged = "camera-changed", T.CameraReset = "camera-reset", T.SelectionChanged = "selection-changed", T.HoverChanged = "hover-changed", T.EntityClick = "entity-click", T.LayerVisibilityChanged = "layer-visibility-changed", T.LayerColorChanged = "layer-color-changed", T.ViewZoomChanged = "view-zoom-changed", T.ViewPanChanged = "view-pan-changed", T.ToolActivated = "tool-activated", T.ToolDeactivated = "tool-deactivated", T.Error = "error", T.Warning = "warning", T))(fe || {});
2670
+ class Yt {
2647
2671
  listeners = /* @__PURE__ */ new Map();
2648
2672
  onceListeners = /* @__PURE__ */ new Map();
2649
2673
  debugMode = !1;
@@ -2755,31 +2779,31 @@ class Zt {
2755
2779
  this.removeAllListeners(), this.listeners.clear(), this.onceListeners.clear(), this.debugMode && console.log("[EventModule2d] Disposed");
2756
2780
  }
2757
2781
  }
2758
- function Ce(A) {
2759
- return Array.isArray(A) ? new X(A[0] ?? 0, A[1] ?? 0, A[2] ?? 0) : new X(A?.x ?? 0, A?.y ?? 0, A?.z ?? 0);
2782
+ function Ce(T) {
2783
+ return Array.isArray(T) ? new X(T[0] ?? 0, T[1] ?? 0, T[2] ?? 0) : new X(T?.x ?? 0, T?.y ?? 0, T?.z ?? 0);
2760
2784
  }
2761
- function Ie(A) {
2762
- return A ? (A.computeBoundingBox(), {
2763
- min: A.boundingBox?.min.clone() ?? new X(),
2764
- max: A.boundingBox?.max.clone() ?? new X()
2785
+ function Ie(T) {
2786
+ return T ? (T.computeBoundingBox(), {
2787
+ min: T.boundingBox?.min.clone() ?? new X(),
2788
+ max: T.boundingBox?.max.clone() ?? new X()
2765
2789
  }) : { min: new X(), max: new X() };
2766
2790
  }
2767
- function $e(A, e, t) {
2768
- const i = new X(A[0] ?? 0, A[1] ?? 0, A[2] ?? 0), n = new gt(0, 0, t ?? 0), s = new X(e[0] ?? 1, e[1] ?? 1, e[2] ?? 1), r = new yt().setFromEuler(n);
2791
+ function $e(T, e, t) {
2792
+ const i = new X(T[0] ?? 0, T[1] ?? 0, T[2] ?? 0), n = new gt(0, 0, t ?? 0), s = new X(e[0] ?? 1, e[1] ?? 1, e[2] ?? 1), r = new yt().setFromEuler(n);
2769
2793
  return new Me().compose(i, r, s);
2770
2794
  }
2771
- function $t(A) {
2772
- return Array.isArray(A?.transformMatrix) && A.transformMatrix.length === 16 ? new Me().fromArray(A.transformMatrix) : $e(
2773
- A.position ?? [0, 0, 0],
2774
- A.scale ?? [1, 1, 1],
2775
- A.rotation ?? 0
2795
+ function Xt(T) {
2796
+ return Array.isArray(T?.transformMatrix) && T.transformMatrix.length === 16 ? new Me().fromArray(T.transformMatrix) : $e(
2797
+ T.position ?? [0, 0, 0],
2798
+ T.scale ?? [1, 1, 1],
2799
+ T.rotation ?? 0
2776
2800
  );
2777
2801
  }
2778
- function dt(A) {
2779
- if (A.length === 0)
2802
+ function dt(T) {
2803
+ if (T.length === 0)
2780
2804
  return { min: new X(), max: new X() };
2781
2805
  const e = new X(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY), t = new X(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
2782
- return A.forEach((i) => {
2806
+ return T.forEach((i) => {
2783
2807
  e.x = Math.min(e.x, i.x), e.y = Math.min(e.y, i.y), e.z = Math.min(e.z, i.z), t.x = Math.max(t.x, i.x), t.y = Math.max(t.y, i.y), t.z = Math.max(t.z, i.z);
2784
2808
  }), {
2785
2809
  min: e,
@@ -2830,7 +2854,7 @@ class et {
2830
2854
  for (const n of e)
2831
2855
  if (n?.visible !== !1) {
2832
2856
  if (n.type === "INSERT") {
2833
- const s = this.getBlockItems(n.blockId, i + 1), r = t.clone().multiply($t(n)), o = this.getClipPolygon(n, t);
2857
+ const s = this.getBlockItems(n.blockId, i + 1), r = t.clone().multiply(Xt(n)), o = this.getClipPolygon(n, t);
2834
2858
  for (const a of s) {
2835
2859
  const h = this.cloneRenderItem(a, r, n), u = o ? this.clipRenderItem(h, o) : h;
2836
2860
  u && (yield u);
@@ -3044,7 +3068,7 @@ class et {
3044
3068
  };
3045
3069
  }
3046
3070
  }
3047
- class Yt {
3071
+ class Kt {
3048
3072
  zipObjectUrls = [];
3049
3073
  /** 加载新版 manifest 分包数据,并返回 Loader 可消费的 DWGData 结构。 */
3050
3074
  async load(e) {
@@ -3190,7 +3214,7 @@ class Yt {
3190
3214
  const t = await fetch(e);
3191
3215
  if (!t.ok)
3192
3216
  throw new Error(`HTTP error! status: ${t.status}`);
3193
- const i = await jt.loadAsync(await t.arrayBuffer()), n = this.findZipManifestPath(i), s = await this.fetchZipJson(i, n);
3217
+ const i = await Ft.loadAsync(await t.arrayBuffer()), n = this.findZipManifestPath(i), s = await this.fetchZipJson(i, n);
3194
3218
  if (!this.isSplitManifest(s))
3195
3219
  throw new Error("[LoaderModule2d] Expected split CAD manifest data in .2d package.");
3196
3220
  const r = this.getZipBasePath(n);
@@ -3267,8 +3291,8 @@ class Yt {
3267
3291
  this.zipObjectUrls.forEach((e) => URL.revokeObjectURL(e)), this.zipObjectUrls = [];
3268
3292
  }
3269
3293
  }
3270
- const ae = 1e-8, tt = 1e-3, Xt = 8421504;
3271
- class Kt {
3294
+ const ae = 1e-8, tt = 1e-3, qt = 8421504;
3295
+ class Jt {
3272
3296
  constructor(e) {
3273
3297
  this.engine = e;
3274
3298
  }
@@ -3281,7 +3305,7 @@ class Kt {
3281
3305
  if (this.isSolidFill(e))
3282
3306
  return this.createSolidItems(e, t, i);
3283
3307
  const s = this.createPatternLineItem(e, t, i);
3284
- return s ? [s] : (this.warnUnknownPatternFallback(e), this.createSolidItems(e, t, i, Xt));
3308
+ return s ? [s] : (this.warnUnknownPatternFallback(e), this.createSolidItems(e, t, i, qt));
3285
3309
  }
3286
3310
  /** 只有明确的 SOLID 才作为实心面;patternType=SolidFill 在当前导出数据里不可靠。 */
3287
3311
  isSolidFill(e) {
@@ -3651,7 +3675,7 @@ class Kt {
3651
3675
  }
3652
3676
  class it {
3653
3677
  constructor(e, t) {
3654
- this.engine = e, this.textFactory = t, this.hatchRenderer = new Kt(e);
3678
+ this.engine = e, this.textFactory = t, this.hatchRenderer = new Jt(e);
3655
3679
  }
3656
3680
  hatchRenderer;
3657
3681
  /** 根据实体类型分发到线、文字、填充、图片等具体几何生成逻辑。 */
@@ -3843,7 +3867,7 @@ class it {
3843
3867
  }];
3844
3868
  }
3845
3869
  }
3846
- class qt {
3870
+ class Qt {
3847
3871
  constructor(e, t, i = e.modelGroup, n = {}) {
3848
3872
  this.model = t, this.targetGroup = i, this.options = n;
3849
3873
  }
@@ -4160,13 +4184,13 @@ class nt {
4160
4184
  return s.applyMatrix4($e([(t.min.x + t.max.x) / 2, (t.min.y + t.max.y) / 2, 0], [1, 1, 1], 0)), s;
4161
4185
  }
4162
4186
  }
4163
- class Jt {
4187
+ class ei {
4164
4188
  engine;
4165
4189
  data = null;
4166
4190
  enableValidation = !0;
4167
4191
  model = this.createEmptyModel();
4168
4192
  font = null;
4169
- dataSource = new Yt();
4193
+ dataSource = new Kt();
4170
4194
  lastBuildOptions = {};
4171
4195
  activeWorkspace = { type: "model", name: "模型" };
4172
4196
  workspaceCache = /* @__PURE__ */ new Map();
@@ -4344,7 +4368,7 @@ class Jt {
4344
4368
  for (let a = 0; a < e.length; a += 1) {
4345
4369
  const h = e[a], u = this.createTileGroup(h, n.namePrefix);
4346
4370
  t.add(u);
4347
- const g = new qt(this.engine, this.model, u, {
4371
+ const g = new Qt(this.engine, this.model, u, {
4348
4372
  interactive: n.interactive ?? !0
4349
4373
  }), v = /* @__PURE__ */ new Set();
4350
4374
  let d = 0, y = 0;
@@ -4669,9 +4693,9 @@ class Jt {
4669
4693
  this.clear();
4670
4694
  }
4671
4695
  }
4672
- const Qt = "3.9.205", ei = {
4673
- version: Qt
4674
- }, ti = ei.version, ii = `
4696
+ const ti = "3.9.222", ii = {
4697
+ version: ti
4698
+ }, ni = ii.version, si = `
4675
4699
  varying vec2 vWorldPos;
4676
4700
 
4677
4701
  void main() {
@@ -4679,7 +4703,7 @@ const Qt = "3.9.205", ei = {
4679
4703
  vWorldPos = worldPosition.xy;
4680
4704
  gl_Position = projectionMatrix * viewMatrix * worldPosition;
4681
4705
  }
4682
- `, ni = `
4706
+ `, ri = `
4683
4707
  precision highp float;
4684
4708
 
4685
4709
  varying vec2 vWorldPos;
@@ -4735,7 +4759,7 @@ const Qt = "3.9.205", ei = {
4735
4759
  gl_FragColor = vec4(color, alpha);
4736
4760
  }
4737
4761
  `;
4738
- class si {
4762
+ class oi {
4739
4763
  scene;
4740
4764
  camera;
4741
4765
  container;
@@ -4788,8 +4812,8 @@ class si {
4788
4812
  createGridMesh() {
4789
4813
  this.gridGeometry = new at(1, 1, 1, 1), this.gridMaterial = new Ct({
4790
4814
  uniforms: this.gridUniforms,
4791
- vertexShader: ii,
4792
- fragmentShader: ni,
4815
+ vertexShader: si,
4816
+ fragmentShader: ri,
4793
4817
  transparent: !0,
4794
4818
  depthWrite: !1,
4795
4819
  depthTest: !1,
@@ -4878,7 +4902,7 @@ class si {
4878
4902
  this.stopMonitoring(), this.teardownResizeObserver(), this.gridMesh && this.gridGroup.remove(this.gridMesh), this.gridGeometry && (this.gridGeometry.dispose(), this.gridGeometry = void 0), this.gridMaterial && (this.gridMaterial.dispose(), this.gridMaterial = void 0), this.gridMesh = void 0;
4879
4903
  }
4880
4904
  }
4881
- class ri {
4905
+ class ai {
4882
4906
  engine;
4883
4907
  scene;
4884
4908
  options;
@@ -4911,7 +4935,7 @@ class ri {
4911
4935
  * 创建网格辅助(自适应网格)
4912
4936
  */
4913
4937
  createGrid(e = 1e3, t = 50) {
4914
- this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.adaptiveGrid = new si(
4938
+ this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.adaptiveGrid = new oi(
4915
4939
  this.scene,
4916
4940
  this.engine.cameraModule2d.orthographicCamera,
4917
4941
  this.engine.renderModule2d.container
@@ -5013,7 +5037,7 @@ class ri {
5013
5037
  this.clearScene(), this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.axesHelper && (this.scene.remove(this.axesHelper), this.axesHelper = void 0), this.scene.clear();
5014
5038
  }
5015
5039
  }
5016
- class oi {
5040
+ class li {
5017
5041
  engine;
5018
5042
  isFree;
5019
5043
  // 高亮模型
@@ -5029,7 +5053,7 @@ class oi {
5029
5053
  this.engine = e, this.isFree = !0, this.highlightModels = [], this.hideModels = [], this.translucentModels = [], this.highlightHoverModels = [], this.models = [];
5030
5054
  }
5031
5055
  }
5032
- class ai {
5056
+ class hi {
5033
5057
  engine;
5034
5058
  orthographicCamera;
5035
5059
  container;
@@ -5261,23 +5285,24 @@ class ai {
5261
5285
  this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.orthographicCamera = null;
5262
5286
  }
5263
5287
  }
5264
- class li {
5288
+ class ci {
5265
5289
  engine;
5266
5290
  renderer;
5267
5291
  container;
5268
5292
  options;
5293
+ watermark;
5269
5294
  // 渲染配置
5270
5295
  antialias = !0;
5271
5296
  alpha = !1;
5272
5297
  precision = "highp";
5273
5298
  constructor(e, t, i) {
5274
- this.engine = e, this.container = t, this.options = i, this.renderer = this.createRenderer(), this.handleResize();
5299
+ this.engine = e, this.container = t, this.options = i, this.watermark = new Nt(Lt), this.renderer = this.createRenderer(), this.handleResize();
5275
5300
  }
5276
5301
  /**
5277
5302
  * 创建 WebGL 渲染器
5278
5303
  */
5279
5304
  createRenderer() {
5280
- const e = new Lt({
5305
+ const e = new Pt({
5281
5306
  antialias: this.antialias,
5282
5307
  alpha: this.alpha,
5283
5308
  precision: this.precision
@@ -5291,7 +5316,7 @@ class li {
5291
5316
  */
5292
5317
  render(e, t) {
5293
5318
  const i = performance.now();
5294
- this.engine.events && this.engine.events.trigger("render-start"), this.renderer.render(e, t);
5319
+ this.engine.events && this.engine.events.trigger("render-start"), this.renderer.render(e, t), this.drawWatermark();
5295
5320
  const n = performance.now() - i;
5296
5321
  this.engine.events && this.engine.events.trigger("render-end", { renderTime: n });
5297
5322
  }
@@ -5366,6 +5391,12 @@ class li {
5366
5391
  clear(e = !0, t = !0, i = !1) {
5367
5392
  this.renderer.clear(e, t, i);
5368
5393
  }
5394
+ /**
5395
+ * 将水印绘制到当前 WebGL canvas,供主循环和截图的强制渲染复用。
5396
+ */
5397
+ drawWatermark() {
5398
+ this.watermark.render(this.renderer);
5399
+ }
5369
5400
  /**
5370
5401
  * 获取渲染器信息
5371
5402
  * @returns 渲染器信息
@@ -5390,10 +5421,10 @@ class li {
5390
5421
  * 销毁渲染模块
5391
5422
  */
5392
5423
  dispose() {
5393
- window.removeEventListener("resize", this.onWindowResize.bind(this)), this.renderer.dispose(), this.container.contains(this.renderer.domElement) && this.container.removeChild(this.renderer.domElement), this.renderer = null;
5424
+ window.removeEventListener("resize", this.onWindowResize.bind(this)), this.watermark.dispose(), this.renderer.dispose(), this.container.contains(this.renderer.domElement) && this.container.removeChild(this.renderer.domElement), this.renderer = null;
5394
5425
  }
5395
5426
  }
5396
- class hi extends Pt {
5427
+ class di extends Dt {
5397
5428
  object;
5398
5429
  domElement;
5399
5430
  enabled = !0;
@@ -5603,7 +5634,7 @@ class hi extends Pt {
5603
5634
  this.enabled = !1, this.domElement.removeEventListener("mousedown", this.onMouseDown.bind(this)), this.domElement.removeEventListener("mousemove", this.onMouseMove.bind(this)), this.domElement.removeEventListener("mouseup", this.onMouseUp.bind(this)), this.domElement.removeEventListener("mouseleave", this.onMouseUp.bind(this)), this.domElement.removeEventListener("wheel", this.onWheel.bind(this)), this.domElement.removeEventListener("dblclick", this.onDoubleClick.bind(this)), this.domElement.removeEventListener("click", this.onClick.bind(this)), this.domElement.removeEventListener("touchstart", this.onTouchStart.bind(this)), this.domElement.removeEventListener("touchmove", this.onTouchMove.bind(this)), this.domElement.removeEventListener("touchend", this.onTouchEnd.bind(this));
5604
5635
  }
5605
5636
  }
5606
- class ci {
5637
+ class ui {
5607
5638
  engine;
5608
5639
  panControls;
5609
5640
  isActive = !0;
@@ -5620,7 +5651,7 @@ class ci {
5620
5651
  * 创建 2D 平移控制器
5621
5652
  */
5622
5653
  createPanControls() {
5623
- const e = new hi(
5654
+ const e = new di(
5624
5655
  this.engine.camera,
5625
5656
  this.engine.renderer.domElement
5626
5657
  );
@@ -5736,7 +5767,7 @@ class ci {
5736
5767
  this.panControls.dispose(), this.panControls = null;
5737
5768
  }
5738
5769
  }
5739
- class di {
5770
+ class pi {
5740
5771
  engine;
5741
5772
  pickBoxElementIds = [];
5742
5773
  worldToScreen;
@@ -5817,7 +5848,7 @@ class di {
5817
5848
  const s = new Ee();
5818
5849
  return Object.keys(i.attributes).forEach((r) => {
5819
5850
  const o = i.getAttribute(r), a = o.itemSize, h = o.array, u = n.start * a, g = (n.start + n.count) * a;
5820
- s.setAttribute(r, new Dt(h.slice(u, g), a, o.normalized));
5851
+ s.setAttribute(r, new zt(h.slice(u, g), a, o.normalized));
5821
5852
  }), s;
5822
5853
  }
5823
5854
  /** 获取鼠标射线经过的 octree 节点内元素。 */
@@ -5873,7 +5904,7 @@ class di {
5873
5904
  return e.distanceTo(a);
5874
5905
  }
5875
5906
  }
5876
- class ui {
5907
+ class fi {
5877
5908
  engine;
5878
5909
  // 小组件容器
5879
5910
  widgetContainer = null;
@@ -6041,7 +6072,7 @@ class ui {
6041
6072
  return Math.atan2(e.clientX - i, n - e.clientY);
6042
6073
  }
6043
6074
  }
6044
- class pi {
6075
+ class mi {
6045
6076
  engine;
6046
6077
  enabled = !1;
6047
6078
  constructor(e) {
@@ -6094,7 +6125,7 @@ class pi {
6094
6125
  return e?.object ?? e?.group?.children?.[e.indexes?.[0]] ?? this.engine.modelGroup?.children?.[e.indexes?.[0]];
6095
6126
  }
6096
6127
  }
6097
- class fi {
6128
+ class gi {
6098
6129
  engine;
6099
6130
  highlightMaterial;
6100
6131
  hideMaterial;
@@ -6127,7 +6158,7 @@ class fi {
6127
6158
  }
6128
6159
  /** 拆分合并网格,让单个子几何可以通过 materialIndex 独立高亮或隐藏。 */
6129
6160
  split_merge_model(e) {
6130
- if (e.isSplit || e instanceof zt)
6161
+ if (e.isSplit || e instanceof Rt)
6131
6162
  return;
6132
6163
  const t = e.materialClone.clone(), i = Array.isArray(e.geometrys) && e.geometrys.length > 0 ? ze(e.geometrys, !0) : e.geometry;
6133
6164
  i.groups.forEach((n) => {
@@ -6354,7 +6385,7 @@ class fi {
6354
6385
  return !0;
6355
6386
  }
6356
6387
  }
6357
- function mi(A) {
6388
+ function yi(T) {
6358
6389
  const e = {
6359
6390
  mouseMoveFrame: null,
6360
6391
  latestMouseMoveEvent: null,
@@ -6376,9 +6407,9 @@ function mi(A) {
6376
6407
  }, e.render = function() {
6377
6408
  e.self && e.self.render != null && e.self.render();
6378
6409
  }, e.active = function() {
6379
- A.renderer.domElement.addEventListener("mousedown", o), A.renderer.domElement.addEventListener("mouseup", h), A.renderer.domElement.addEventListener("mousemove", a), A.renderer.domElement.addEventListener("touchstart", g, { passive: !1 }), A.renderer.domElement.addEventListener("touchend", d, { passive: !1 }), A.renderer.domElement.addEventListener("touchmove", v, { passive: !1 }), window.addEventListener("keydown", t), window.addEventListener("keyup", i);
6410
+ T.renderer.domElement.addEventListener("mousedown", o), T.renderer.domElement.addEventListener("mouseup", h), T.renderer.domElement.addEventListener("mousemove", a), T.renderer.domElement.addEventListener("touchstart", g, { passive: !1 }), T.renderer.domElement.addEventListener("touchend", d, { passive: !1 }), T.renderer.domElement.addEventListener("touchmove", v, { passive: !1 }), window.addEventListener("keydown", t), window.addEventListener("keyup", i);
6380
6411
  }, e.disActive = function() {
6381
- A.renderer.domElement.removeEventListener("mousedown", o), A.renderer.domElement.removeEventListener("mouseup", h), A.renderer.domElement.removeEventListener("mousemove", a), A.renderer.domElement.removeEventListener("touchstart", g), A.renderer.domElement.removeEventListener("touchend", d), A.renderer.domElement.removeEventListener("touchmove", v), window.removeEventListener("keydown", t), window.removeEventListener("keyup", i), e.mouseMoveFrame != null && (cancelAnimationFrame(e.mouseMoveFrame), e.mouseMoveFrame = null, e.latestMouseMoveEvent = null);
6412
+ T.renderer.domElement.removeEventListener("mousedown", o), T.renderer.domElement.removeEventListener("mouseup", h), T.renderer.domElement.removeEventListener("mousemove", a), T.renderer.domElement.removeEventListener("touchstart", g), T.renderer.domElement.removeEventListener("touchend", d), T.renderer.domElement.removeEventListener("touchmove", v), window.removeEventListener("keydown", t), window.removeEventListener("keyup", i), e.mouseMoveFrame != null && (cancelAnimationFrame(e.mouseMoveFrame), e.mouseMoveFrame = null, e.latestMouseMoveEvent = null);
6382
6413
  };
6383
6414
  function t(l) {
6384
6415
  (l.keyCode === 8 || l.keyCode === 46) && e.self && e.self.handelKeyDeleteDown != null && e.self.handelKeyDeleteDown(), l.keyCode === 27 && e.self && e.self.handelKeyEscDown != null && e.self.handelKeyEscDown(), l.keyCode === 13 && e.self && e.self.handelKeyEnterDown != null && e.self.handelKeyEnterDown(), l.keyCode === 32 && e.self && e.self.handelKeySpaceDown != null && e.self.handelKeySpaceDown(), l.key === "Control" && e.self && e.self.handelKeyCtrlDown != null && e.self.handelKeyCtrlDown(), l.key === "Delete" && e.self && e.self.handelKeyDeleteDown != null && e.self.handelKeyDeleteDown(), l.key === "Shift" && e.self && e.self.handelKeyShiftDown != null && e.self.handelKeyShiftDown(), l.key === "Meta" && e.self && e.self.handelKeyMetaDown != null && e.self.handelKeyMetaDown();
@@ -6387,12 +6418,12 @@ function mi(A) {
6387
6418
  l.key === "Alt" && e.self && e.self.handelKeyAltUp != null && e.self.handelKeyAltUp(), l.key === "Tab" && e.self && e.self.handelKeyTabUp != null && e.self.handelKeyTabUp(), l.key === "Control" && e.self && e.self.handelKeyCtrlUp != null && e.self.handelKeyCtrlUp(), l.key === "Shift" && e.self && e.self.handelKeyShiftUp != null && e.self.handelKeyShiftUp(), l.key === "Meta" && e.self && e.self.handelKeyMetaUp != null && e.self.handelKeyMetaUp(), l.key === "Command" && e.self && e.self.handelKeyCommandUp != null && e.self.handelKeyCommandUp(), l.key === "Windows" && e.self && e.self.handelKeyWindowsUp != null && e.self.handelKeyWindowsUp();
6388
6419
  }
6389
6420
  function n(l) {
6390
- const f = new se(), m = A.renderer.domElement.clientWidth, w = A.renderer.domElement.clientHeight;
6421
+ const f = new se(), m = T.renderer.domElement.clientWidth, w = T.renderer.domElement.clientHeight;
6391
6422
  return f.x = l.offsetX / m * 2 - 1, f.y = -(l.offsetY / w) * 2 + 1, f;
6392
6423
  }
6393
6424
  function s(l) {
6394
- const f = new Rt(), m = n(l);
6395
- return f.setFromCamera(m, A.camera), f;
6425
+ const f = new Bt(), m = n(l);
6426
+ return f.setFromCamera(m, T.camera), f;
6396
6427
  }
6397
6428
  function r(l, f = !1) {
6398
6429
  const m = s(l);
@@ -6402,7 +6433,7 @@ function mi(A) {
6402
6433
  }
6403
6434
  }
6404
6435
  function o(l) {
6405
- l.button === 0 && (e.mouseDownTime = Date.now(), e.mouseDownPosition = new X(l.offsetX, l.offsetY, 0), e.self && e.self.handleMouseDown != null && (A.engineStatus.isFree = !0, r(l, !0), l.catch != null && A.controlModule.orbitControls.origin.set(l.catch.point.x, l.catch.point.y, l.catch.point.z), e.self.handleMouseDown(l)));
6436
+ l.button === 0 && (e.mouseDownTime = Date.now(), e.mouseDownPosition = new X(l.offsetX, l.offsetY, 0), e.self && e.self.handleMouseDown != null && (T.engineStatus.isFree = !0, r(l, !0), l.catch != null && T.controlModule.orbitControls.origin.set(l.catch.point.x, l.catch.point.y, l.catch.point.z), e.self.handleMouseDown(l)));
6406
6437
  }
6407
6438
  function a(l) {
6408
6439
  e.latestMouseMoveEvent = l, e.mouseMoveFrame == null && (e.mouseMoveFrame = requestAnimationFrame(() => {
@@ -6422,7 +6453,7 @@ function mi(A) {
6422
6453
  const f = l.touches[0] || l.changedTouches[0];
6423
6454
  if (!f)
6424
6455
  return null;
6425
- const w = A.renderer.domElement.getBoundingClientRect(), M = f.clientX - w.left, E = f.clientY - w.top;
6456
+ const w = T.renderer.domElement.getBoundingClientRect(), M = f.clientX - w.left, E = f.clientY - w.top;
6426
6457
  return {
6427
6458
  offsetX: M,
6428
6459
  offsetY: E,
@@ -6454,9 +6485,9 @@ function mi(A) {
6454
6485
  f && h(f);
6455
6486
  }
6456
6487
  function y(l, f) {
6457
- if (A.isModelSpaceActive?.() === !1 && A.isElementLink2d3dEnabled?.() !== !0)
6488
+ if (T.isModelSpaceActive?.() === !1 && T.isElementLink2d3dEnabled?.() !== !0)
6458
6489
  return null;
6459
- var m = A.octreeBox2d.pick2d(l, f);
6490
+ var m = T.octreeBox2d.pick2d(l, f);
6460
6491
  return m == null ? null : {
6461
6492
  point: null,
6462
6493
  id: m
@@ -6464,7 +6495,7 @@ function mi(A) {
6464
6495
  }
6465
6496
  return e;
6466
6497
  }
6467
- class gi {
6498
+ class vi {
6468
6499
  el;
6469
6500
  xEl;
6470
6501
  yEl;
@@ -6483,8 +6514,8 @@ class gi {
6483
6514
  this.el.parentElement?.removeChild(this.el);
6484
6515
  }
6485
6516
  }
6486
- var ut = /* @__PURE__ */ ((A) => (A.ModelLoadStart = "model-load-start", A.ModelLoadProgress = "model-load-progress", A.ModelLoaded = "model-loaded", A.ModelError = "model-error", A.SelectionChanged = "selection-changed", A.HoverChanged = "hover-changed", A.Click = "click", A.MouseMove = "mouse-move", A.CameraChanged = "camera-changed", A.CameraIdle = "camera-idle", A.EngineFree = "engine-free", A.EngineBusy = "engine-busy", A.MeasureChanged = "measure-changed", A.MeasureClick = "measure-click", A.SectionMove = "section-move", A))(ut || {});
6487
- class yi {
6517
+ var ut = /* @__PURE__ */ ((T) => (T.ModelLoadStart = "model-load-start", T.ModelLoadProgress = "model-load-progress", T.ModelLoaded = "model-loaded", T.ModelError = "model-error", T.SelectionChanged = "selection-changed", T.HoverChanged = "hover-changed", T.Click = "click", T.MouseMove = "mouse-move", T.CameraChanged = "camera-changed", T.CameraIdle = "camera-idle", T.EngineFree = "engine-free", T.EngineBusy = "engine-busy", T.MeasureChanged = "measure-changed", T.MeasureClick = "measure-click", T.SectionMove = "section-move", T))(ut || {});
6518
+ class wi {
6488
6519
  engine;
6489
6520
  behavior;
6490
6521
  mouseCoordUI = null;
@@ -6494,7 +6525,7 @@ class yi {
6494
6525
  init() {
6495
6526
  this.behavior = this.engine.handelBehaved2d, this.behavior.init(this);
6496
6527
  const e = this.engine.container;
6497
- e && this.engine.options?.showMouseCoordinates !== !1 && (this.mouseCoordUI = new gi(e));
6528
+ e && this.engine.options?.showMouseCoordinates !== !1 && (this.mouseCoordUI = new vi(e));
6498
6529
  }
6499
6530
  active() {
6500
6531
  this.behavior.active();
@@ -6561,7 +6592,7 @@ class yi {
6561
6592
  this.mouseCoordUI?.dispose(), this.mouseCoordUI = null;
6562
6593
  }
6563
6594
  }
6564
- class vi {
6595
+ class bi {
6565
6596
  overlay;
6566
6597
  hLine;
6567
6598
  vLine;
@@ -6615,7 +6646,7 @@ const st = [
6615
6646
  { action: "linkElement2d3d", label: "模型联动", dividerBefore: !0 },
6616
6647
  { action: "linkView2d3d", label: "视角关联" }
6617
6648
  ];
6618
- class wi {
6649
+ class xi {
6619
6650
  menu;
6620
6651
  container;
6621
6652
  canvas;
@@ -6688,7 +6719,7 @@ class wi {
6688
6719
  this.canvas.removeEventListener("contextmenu", this.onContextMenu), document.removeEventListener("mousedown", this.onDocMouseDown), document.removeEventListener("keydown", this.onEscape), this.menu.parentElement?.removeChild(this.menu);
6689
6720
  }
6690
6721
  }
6691
- class bi {
6722
+ class Mi {
6692
6723
  overlay = null;
6693
6724
  textEl = null;
6694
6725
  barEl = null;
@@ -6823,14 +6854,14 @@ class bi {
6823
6854
  this.overlay?.remove(), this.overlay = null, this.textEl = null, this.barEl = null, this.pctEl = null;
6824
6855
  }
6825
6856
  }
6826
- const xi = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
6857
+ const ki = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
6827
6858
  <circle cx="6.5" cy="6.5" r="4.5" stroke="currentColor" stroke-width="1.5"/>
6828
6859
  <line x1="10" y1="10" x2="14" y2="14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
6829
- </svg>`, Mi = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
6860
+ </svg>`, _i = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
6830
6861
  <line x1="1" y1="1" x2="11" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
6831
6862
  <line x1="11" y1="1" x2="1" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
6832
6863
  </svg>`;
6833
- class ki {
6864
+ class Ei {
6834
6865
  manager;
6835
6866
  wrapper;
6836
6867
  input;
@@ -6849,7 +6880,7 @@ class ki {
6849
6880
  return e.className = "engine-2d-search", e.innerHTML = `
6850
6881
  <div class="engine-2d-search__box">
6851
6882
  <div class="engine-2d-search__input-row">
6852
- <span class="engine-2d-search__icon">${xi}</span>
6883
+ <span class="engine-2d-search__icon">${ki}</span>
6853
6884
  <input
6854
6885
  class="engine-2d-search__input"
6855
6886
  type="text"
@@ -6857,7 +6888,7 @@ class ki {
6857
6888
  autocomplete="off"
6858
6889
  spellcheck="false"
6859
6890
  />
6860
- <button class="engine-2d-search__clear" title="清除">${Mi}</button>
6891
+ <button class="engine-2d-search__clear" title="清除">${_i}</button>
6861
6892
  </div>
6862
6893
  <div class="engine-2d-search__divider"></div>
6863
6894
  <div class="engine-2d-search__status"></div>
@@ -6963,13 +6994,13 @@ class ki {
6963
6994
  this.input.removeEventListener("input", this.onInput), this.input.removeEventListener("keydown", this.onKeyDown), this.clearBtn.removeEventListener("click", this.onClear), document.removeEventListener("mousedown", this.onDocMouseDown), document.removeEventListener("keydown", this.onEscape), this.wrapper.parentElement?.removeChild(this.wrapper), this.debounceTimer !== null && clearTimeout(this.debounceTimer);
6964
6995
  }
6965
6996
  }
6966
- class _i {
6997
+ class Ci {
6967
6998
  engine;
6968
6999
  searchUI = null;
6969
7000
  constructor(e) {
6970
7001
  this.engine = e;
6971
7002
  const t = document.getElementById(e?.options?.containerId ?? "") ?? e?.container ?? null;
6972
- t && (this.searchUI = new ki(t, this));
7003
+ t && (this.searchUI = new Ei(t, this));
6973
7004
  }
6974
7005
  /** 只查询已加载的文字实体,支持连续包含和按字符顺序的模糊匹配。 */
6975
7006
  search(e) {
@@ -7146,7 +7177,7 @@ const rt = {
7146
7177
  "--e2d-coord-label": "rgba(0,0,0,0.50)"
7147
7178
  }
7148
7179
  };
7149
- class Ei {
7180
+ class Si {
7150
7181
  container;
7151
7182
  current;
7152
7183
  constructor(e, t = "dark") {
@@ -7214,7 +7245,7 @@ class Ye {
7214
7245
  this.clearAllPoints();
7215
7246
  }
7216
7247
  }
7217
- class Ci extends Ye {
7248
+ class Ti extends Ye {
7218
7249
  /** 两点完成一条距离测量。 */
7219
7250
  handleClick(e) {
7220
7251
  super.handleClick(e), this.points.length === 2 && (this.manager.addMeasurement("distance", this.points), this.clearAllPoints());
@@ -7223,7 +7254,7 @@ class Ci extends Ye {
7223
7254
  this.points.length === 1 && this.manager.drawPreview("distance", [this.points[0], e]);
7224
7255
  }
7225
7256
  }
7226
- class Si extends Ye {
7257
+ class Ai extends Ye {
7227
7258
  /** 三点及以上可以闭合面积,双击或 Enter 结束。 */
7228
7259
  handleClick(e) {
7229
7260
  super.handleClick(e), this.manager.drawPreview("area", this.points);
@@ -7236,7 +7267,7 @@ class Si extends Ye {
7236
7267
  e.length >= 3 && this.manager.addMeasurement("area", e), this.clearAllPoints();
7237
7268
  }
7238
7269
  }
7239
- class Ti extends Ye {
7270
+ class Ii extends Ye {
7240
7271
  /** 三点完成角度测量,第二个点作为角点。 */
7241
7272
  handleClick(e) {
7242
7273
  super.handleClick(e), this.points.length === 3 && (this.manager.addMeasurement("angle", this.points), this.clearAllPoints());
@@ -7245,7 +7276,7 @@ class Ti extends Ye {
7245
7276
  this.points.length >= 2 && this.manager.drawPreview("angle", [...this.points, e]);
7246
7277
  }
7247
7278
  }
7248
- class Ai {
7279
+ class Li {
7249
7280
  distanceMeasure;
7250
7281
  areaMeasure;
7251
7282
  angleMeasure;
@@ -7265,7 +7296,7 @@ class Ai {
7265
7296
  hasDraggedAfterMouseDown = !1;
7266
7297
  currentWorkspaceKey = "model";
7267
7298
  constructor(e) {
7268
- this.engine = e, this.container = e.container, this.distanceMeasure = new Ci(this), this.areaMeasure = new Si(this), this.angleMeasure = new Ti(this), this.annotationContainer = document.createElement("div"), this.annotationContainer.className = "annotation-container", this.annotationContainer.style.pointerEvents = "none", this.annotationContainer.style.zIndex = "20", this.container.appendChild(this.annotationContainer);
7299
+ this.engine = e, this.container = e.container, this.distanceMeasure = new Ti(this), this.areaMeasure = new Ai(this), this.angleMeasure = new Ii(this), this.annotationContainer = document.createElement("div"), this.annotationContainer.className = "annotation-container", this.annotationContainer.style.pointerEvents = "none", this.annotationContainer.style.zIndex = "20", this.container.appendChild(this.annotationContainer);
7269
7300
  }
7270
7301
  /** 开启 2D 测量事件;只停用图元点选,不停用 pan/zoom 视图控制。 */
7271
7302
  active() {
@@ -7524,7 +7555,7 @@ const He = {
7524
7555
  strokeWidth: 2,
7525
7556
  fontSize: 16,
7526
7557
  cloudRadius: 10
7527
- }, Ii = {
7558
+ }, Pi = {
7528
7559
  none: _e("/assets/icon/选择.svg", import.meta.url),
7529
7560
  line: _e("/assets/icon/线.svg", import.meta.url),
7530
7561
  arrow: _e("/assets/icon/箭头.svg", import.meta.url),
@@ -7533,8 +7564,8 @@ const He = {
7533
7564
  polygon: _e("/assets/icon/面积.svg", import.meta.url),
7534
7565
  text: _e("/assets/icon/文字.svg", import.meta.url),
7535
7566
  cloudline: _e("/assets/icon/云线.svg", import.meta.url)
7536
- }, Li = "data:image/svg+xml;utf8," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#1f2937" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M6 6l1 16h10l1-16"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>'), Pi = "data:image/svg+xml;utf8," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#1f2937" stroke-width="2" stroke-linecap="round"><path d="M6 6l12 12"/><path d="M18 6L6 18"/></svg>');
7537
- class Di {
7567
+ }, Di = "data:image/svg+xml;utf8," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#1f2937" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M6 6l1 16h10l1-16"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>'), zi = "data:image/svg+xml;utf8," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#1f2937" stroke-width="2" stroke-linecap="round"><path d="M6 6l12 12"/><path d="M18 6L6 18"/></svg>');
7568
+ class Ri {
7538
7569
  engine;
7539
7570
  container;
7540
7571
  layer;
@@ -7714,7 +7745,7 @@ class Di {
7714
7745
  { type: "cloudline", title: "云线,双击或 Enter 结束" },
7715
7746
  { type: "text", title: "文字" }
7716
7747
  ].forEach((a) => {
7717
- const h = this.createIconButton(a.title, Ii[a.type]);
7748
+ const h = this.createIconButton(a.title, Pi[a.type]);
7718
7749
  h.onclick = () => {
7719
7750
  this.active(), this.setDrawType(a.type);
7720
7751
  }, a.type !== "none" && (this.buttons[a.type] = h), e.appendChild(h);
@@ -7731,9 +7762,9 @@ class Di {
7731
7762
  s.type = "number", s.min = "10", s.max = "72", s.value = `${this.style.fontSize}`, s.title = "字号", s.onchange = () => {
7732
7763
  this.style.fontSize = this.normalizeNumber(s.valueAsNumber, 10, 72, He.fontSize);
7733
7764
  }, e.appendChild(s), e.appendChild(this.createDivider());
7734
- const r = this.createIconButton("清空", Li);
7765
+ const r = this.createIconButton("清空", Di);
7735
7766
  r.onclick = () => this.clearAll(), e.appendChild(r);
7736
- const o = this.createIconButton("关闭", Pi);
7767
+ const o = this.createIconButton("关闭", zi);
7737
7768
  return o.onclick = () => {
7738
7769
  this.hideToolbar(), this.disActive();
7739
7770
  }, e.appendChild(o), e;
@@ -7934,11 +7965,11 @@ class Di {
7934
7965
  return `markup-2d-${Date.now()}-${Math.random().toString(16).slice(2)}`;
7935
7966
  }
7936
7967
  }
7937
- class zi {
7968
+ class Bi {
7938
7969
  engine;
7939
7970
  manager;
7940
7971
  constructor(e) {
7941
- this.engine = e, this.manager = new Bt({
7972
+ this.engine = e, this.manager = new Ot({
7942
7973
  container: e.container,
7943
7974
  className: "bim-engine-label-container bim-engine-label-container-2d",
7944
7975
  projectCoordinate: (t) => this.projectCoordinate(t),
@@ -8001,7 +8032,7 @@ class zi {
8001
8032
  return { x: i.x, y: i.y, z: 0 };
8002
8033
  }
8003
8034
  }
8004
- class Ri {
8035
+ class Ni {
8005
8036
  engine;
8006
8037
  mainViewPort = null;
8007
8038
  constructor(e) {
@@ -8037,7 +8068,7 @@ class Ri {
8037
8068
  };
8038
8069
  }
8039
8070
  }
8040
- class Bi {
8071
+ class Oi {
8041
8072
  constructor(e, t) {
8042
8073
  this.container = e, this.engine = t, this.el = document.createElement("div"), this.el.className = "engine-2d-workspace-tabs", this.container.appendChild(this.el), this.unsubscribe = this.engine.events?.on(fe.ModelLoaded, () => this.refresh()) ?? (() => {
8043
8074
  }), this.refresh();
@@ -8076,7 +8107,7 @@ class Bi {
8076
8107
  this.unsubscribe(), this.el.remove();
8077
8108
  }
8078
8109
  }
8079
- class Ni {
8110
+ class Wi {
8080
8111
  // 配置选项
8081
8112
  options;
8082
8113
  container = null;
@@ -8121,7 +8152,7 @@ class Ni {
8121
8152
  renderer = null;
8122
8153
  // 数据
8123
8154
  dwgData = null;
8124
- version = ti;
8155
+ version = ni;
8125
8156
  constructor(e) {
8126
8157
  if (this.options = e, this.options.backgroundColor = this.options.backgroundColor ?? 1710618, this.options.enablePerformanceMonitoring = this.options.enablePerformanceMonitoring ?? !1, this.options.showMouseCoordinates = this.options.showMouseCoordinates ?? !1, this.options.loadingStyle = this.options.loadingStyle ?? 2, this.options.contextMenu = this.options.contextMenu ?? {
8127
8158
  items: [
@@ -8135,13 +8166,13 @@ class Ni {
8135
8166
  ]
8136
8167
  }, this.enablePerformanceMonitoring = e.enablePerformanceMonitoring ?? !1, this.container = document.getElementById(e.containerId), !this.container)
8137
8168
  throw new Error(`Container ${e.containerId} not found`);
8138
- this.initialize(), this.handelBehaved2d = mi(this), this.interactionModule2d = new yi(this), this.interactionModule2d.init(), this.interactionModule2d.active();
8169
+ this.initialize(), this.handelBehaved2d = yi(this), this.interactionModule2d = new wi(this), this.interactionModule2d.init(), this.interactionModule2d.active();
8139
8170
  }
8140
8171
  /**
8141
8172
  * 初始化引擎
8142
8173
  */
8143
8174
  initialize() {
8144
- this.events = new Zt(!1), this.sceneModule2d = new ri(this, this.options), this.scene = this.sceneModule2d.scene, this.cameraModule2d = new ai(this, this.container), this.camera = this.cameraModule2d.orthographicCamera, this.renderModule2d = new li(this, this.container, this.options), this.renderer = this.renderModule2d.renderer, this.controlModule2d = new ci(this), this.loaderModule2d = new Jt(this), this.themeManager = new Ei(this.container), this.layerManager = new ct(this), this.searchManager = new _i(this), this.measure = new Ai(this), this.markup = new Di(this), this.label = new zi(this), this.viewCube = new Ri(this), this.octreeBox2d = new di(this), this.modelToolModule2d = new fi(this), this.engineStatus2d = new oi(this), this.linkView2d3d = new ui(this), this.linkElement2d3d = new pi(this), this.sceneModule2d.initGrid(), this.cadCursorUI = new vi(this.container, this.renderer.domElement, this.options.cursorStyle ?? "short-crosshair"), this.cadCursorUI.setBackgroundColor(this.options.backgroundColor ?? 1710618), this.loadingUI = new bi(this.container, this.options.loadingStyle), this.events.on(fe.ModelLoadStart, () => this.loadingUI.show("正在加载...", 0)), this.events.on(fe.ModelLoadProgress, (e) => this.loadingUI.update(e.text, e.progress)), this.events.on(fe.ModelLoaded, () => this.loadingUI.hide()), this.events.on(fe.ModelLoadError, () => this.loadingUI.hide()), this.versionEl = document.createElement("div"), this.versionEl.className = "engine-2d-version-text", this.updateVersionDisplay(), this.container.appendChild(this.versionEl), this.workspaceTabsUI = new Bi(this.container, this), this.contextMenuUI = new wi(
8175
+ this.events = new Yt(!1), this.sceneModule2d = new ai(this, this.options), this.scene = this.sceneModule2d.scene, this.cameraModule2d = new hi(this, this.container), this.camera = this.cameraModule2d.orthographicCamera, this.renderModule2d = new ci(this, this.container, this.options), this.renderer = this.renderModule2d.renderer, this.controlModule2d = new ui(this), this.loaderModule2d = new ei(this), this.themeManager = new Si(this.container), this.layerManager = new ct(this), this.searchManager = new Ci(this), this.measure = new Li(this), this.markup = new Ri(this), this.label = new Bi(this), this.viewCube = new Ni(this), this.octreeBox2d = new pi(this), this.modelToolModule2d = new gi(this), this.engineStatus2d = new li(this), this.linkView2d3d = new fi(this), this.linkElement2d3d = new mi(this), this.sceneModule2d.initGrid(), this.cadCursorUI = new bi(this.container, this.renderer.domElement, this.options.cursorStyle ?? "short-crosshair"), this.cadCursorUI.setBackgroundColor(this.options.backgroundColor ?? 1710618), this.loadingUI = new Mi(this.container, this.options.loadingStyle), this.events.on(fe.ModelLoadStart, () => this.loadingUI.show("正在加载...", 0)), this.events.on(fe.ModelLoadProgress, (e) => this.loadingUI.update(e.text, e.progress)), this.events.on(fe.ModelLoaded, () => this.loadingUI.hide()), this.events.on(fe.ModelLoadError, () => this.loadingUI.hide()), this.versionEl = document.createElement("div"), this.versionEl.className = "engine-2d-version-text", this.updateVersionDisplay(), this.container.appendChild(this.versionEl), this.workspaceTabsUI = new Oi(this.container, this), this.contextMenuUI = new xi(
8145
8176
  this.container,
8146
8177
  this.renderer.domElement,
8147
8178
  (e) => {
@@ -8180,11 +8211,11 @@ class Ni {
8180
8211
  * 动画循环
8181
8212
  */
8182
8213
  animate = () => {
8183
- this.isRendering && (this.animationId = requestAnimationFrame(this.animate), this.stats?.begin(), this.controlModule2d.update(), this.camera?.updateMatrixWorld(!0), this.measure?.update(), this.markup?.update(), this.label?.update(), this.scene && this.camera && this.renderer && this.renderer.render(this.scene, this.camera), this.enablePerformanceMonitoring && this.updatePerformanceStats(), this.stats?.end());
8214
+ this.isRendering && (this.animationId = requestAnimationFrame(this.animate), this.stats?.begin(), this.controlModule2d.update(), this.camera?.updateMatrixWorld(!0), this.measure?.update(), this.markup?.update(), this.label?.update(), this.scene && this.camera && this.renderer && (this.renderer.render(this.scene, this.camera), this.renderModule2d?.drawWatermark()), this.enablePerformanceMonitoring && this.updatePerformanceStats(), this.stats?.end());
8184
8215
  };
8185
8216
  /** 初始化 stats.js 性能监视器,showStats 优先控制可视面板,旧配置 enablePerformanceMonitoring 继续兼容。 */
8186
8217
  initStatsMonitor() {
8187
- !(this.options.showStats ?? this.enablePerformanceMonitoring) || !this.container || (this.stats = new Ht(), this.stats.showPanel(0), this.stats.dom.className = "engine-2d-stats-monitor", this.stats.dom.style.position = "absolute", this.stats.dom.style.top = "0px", this.stats.dom.style.left = "0px", this.stats.dom.style.zIndex = "1000", this.container.appendChild(this.stats.dom));
8218
+ !(this.options.showStats ?? this.enablePerformanceMonitoring) || !this.container || (this.stats = new Zt(), this.stats.showPanel(0), this.stats.dom.className = "engine-2d-stats-monitor", this.stats.dom.style.position = "absolute", this.stats.dom.style.top = "0px", this.stats.dom.style.left = "0px", this.stats.dom.style.zIndex = "1000", this.container.appendChild(this.stats.dom));
8188
8219
  }
8189
8220
  /**
8190
8221
  * 更新性能统计
@@ -8209,7 +8240,7 @@ class Ni {
8209
8240
  * 通过 viewToken 向 OpenAPI 解析真实加载地址,再复用现有 2D URL 加载逻辑。
8210
8241
  */
8211
8242
  async loadModelByViewToken(e, t) {
8212
- const i = await Nt(
8243
+ const i = await Wt(
8213
8244
  this.options,
8214
8245
  e,
8215
8246
  "2d"
@@ -8369,9 +8400,9 @@ class Ni {
8369
8400
  return console.error("[EngineKernel2d] Renderer or scene module not initialized"), null;
8370
8401
  const t = this.renderer.domElement, i = e?.format || "png", n = e?.quality || 0.92, s = `image/${i === "jpeg" ? "jpeg" : i}`, r = e?.transparent ?? !1, o = e?.hideGrid ?? !0, a = e?.hideAxes ?? !0, h = this.scene?.background ?? null;
8371
8402
  let u = !1, g = !1;
8372
- this.sceneModule2d.adaptiveGrid && (u = this.sceneModule2d.adaptiveGrid.gridGroup?.visible ?? !1, o && this.sceneModule2d.adaptiveGrid.setVisible(!1)), this.sceneModule2d.axesHelper && (g = this.sceneModule2d.axesHelper.visible ?? !1, a && this.sceneModule2d.setAxesVisible(!1)), r && this.scene && (this.scene.background = null), this.scene && this.camera && this.renderer.render(this.scene, this.camera);
8403
+ this.sceneModule2d.adaptiveGrid && (u = this.sceneModule2d.adaptiveGrid.gridGroup?.visible ?? !1, o && this.sceneModule2d.adaptiveGrid.setVisible(!1)), this.sceneModule2d.axesHelper && (g = this.sceneModule2d.axesHelper.visible ?? !1, a && this.sceneModule2d.setAxesVisible(!1)), r && this.scene && (this.scene.background = null), this.scene && this.camera && (this.renderer.render(this.scene, this.camera), this.renderModule2d?.drawWatermark());
8373
8404
  const v = t.toDataURL(s, n);
8374
- this.scene && (this.scene.background = h), this.sceneModule2d.adaptiveGrid && o && this.sceneModule2d.adaptiveGrid.setVisible(u), this.sceneModule2d.axesHelper && a && this.sceneModule2d.setAxesVisible(g), this.scene && this.camera && this.renderer.render(this.scene, this.camera);
8405
+ this.scene && (this.scene.background = h), this.sceneModule2d.adaptiveGrid && o && this.sceneModule2d.adaptiveGrid.setVisible(u), this.sceneModule2d.axesHelper && a && this.sceneModule2d.setAxesVisible(g), this.scene && this.camera && (this.renderer.render(this.scene, this.camera), this.renderModule2d?.drawWatermark());
8375
8406
  const d = {
8376
8407
  dataURL: v
8377
8408
  };
@@ -8392,13 +8423,13 @@ class Ni {
8392
8423
  return console.error("[EngineKernel2d] Renderer or scene module not initialized"), null;
8393
8424
  const t = this.renderer.domElement, i = e?.format || "png", n = e?.quality || 0.92, s = `image/${i === "jpeg" ? "jpeg" : i}`, r = e?.transparent ?? !1, o = e?.hideGrid ?? !0, a = e?.hideAxes ?? !0, h = this.scene?.background ?? null;
8394
8425
  let u = !1, g = !1;
8395
- this.sceneModule2d.adaptiveGrid && (u = this.sceneModule2d.adaptiveGrid.gridGroup?.visible ?? !1, o && this.sceneModule2d.adaptiveGrid.setVisible(!1)), this.sceneModule2d.axesHelper && (g = this.sceneModule2d.axesHelper.visible ?? !1, a && this.sceneModule2d.setAxesVisible(!1)), r && this.scene && (this.scene.background = null), this.scene && this.camera && this.renderer.render(this.scene, this.camera);
8426
+ this.sceneModule2d.adaptiveGrid && (u = this.sceneModule2d.adaptiveGrid.gridGroup?.visible ?? !1, o && this.sceneModule2d.adaptiveGrid.setVisible(!1)), this.sceneModule2d.axesHelper && (g = this.sceneModule2d.axesHelper.visible ?? !1, a && this.sceneModule2d.setAxesVisible(!1)), r && this.scene && (this.scene.background = null), this.scene && this.camera && (this.renderer.render(this.scene, this.camera), this.renderModule2d?.drawWatermark());
8396
8427
  const v = t.toDataURL(s, n), d = await new Promise((l) => {
8397
8428
  t.toBlob((f) => {
8398
8429
  f && l(f);
8399
8430
  }, s, n);
8400
8431
  }), y = URL.createObjectURL(d);
8401
- if (this.scene && (this.scene.background = h), this.sceneModule2d.adaptiveGrid && o && this.sceneModule2d.adaptiveGrid.setVisible(u), this.sceneModule2d.axesHelper && a && this.sceneModule2d.setAxesVisible(g), this.scene && this.camera && this.renderer.render(this.scene, this.camera), e?.download) {
8432
+ if (this.scene && (this.scene.background = h), this.sceneModule2d.adaptiveGrid && o && this.sceneModule2d.adaptiveGrid.setVisible(u), this.sceneModule2d.axesHelper && a && this.sceneModule2d.setAxesVisible(g), this.scene && this.camera && (this.renderer.render(this.scene, this.camera), this.renderModule2d?.drawWatermark()), e?.download) {
8402
8433
  const l = e.filename || `capture-${Date.now()}.${i}`, f = document.createElement("a");
8403
8434
  f.href = y, f.download = l, f.style.display = "none", document.body.appendChild(f), f.click(), f.remove(), console.log(`[EngineKernel2d] Image captured and downloaded: ${l}`);
8404
8435
  } else
@@ -8416,16 +8447,17 @@ class Ni {
8416
8447
  console.log("[EngineKernel2d] Disposing engine..."), this.stopRendering(), this.cadCursorUI?.dispose(), this.contextMenuUI?.dispose(), this.loadingUI?.dispose(), this.workspaceTabsUI?.dispose(), this.versionEl?.parentElement?.removeChild(this.versionEl), this.searchManager?.dispose(), this.measure?.dispose(), this.markup?.dispose(), this.label?.dispose(), this.themeManager?.dispose(), this.loaderModule2d?.dispose(), this.controlModule2d?.dispose(), this.renderModule2d?.dispose(), this.cameraModule2d?.dispose(), this.sceneModule2d?.dispose(), this.events?.dispose(), this.stats?.dom?.parentElement && this.stats.dom.parentElement.removeChild(this.stats.dom), this.scene = null, this.camera = null, this.renderer = null, this.dwgData = null, this.stats = void 0, this.versionEl = null, console.log("[EngineKernel2d] Engine disposed");
8417
8448
  }
8418
8449
  }
8419
- const Ui = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8450
+ const Hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8420
8451
  __proto__: null,
8421
- EngineKernel2d: Ni
8452
+ EngineKernel2d: Wi
8422
8453
  }, Symbol.toStringTag, { value: "Module" }));
8423
8454
  export {
8424
- ti as E,
8425
- jt as J,
8426
- Jt as L,
8427
- Ht as S,
8428
- Ui as a,
8455
+ ni as E,
8456
+ Ft as J,
8457
+ ei as L,
8458
+ Zt as S,
8459
+ Vi as a,
8460
+ Hi as b,
8429
8461
  Oe as c,
8430
8462
  ht as g
8431
8463
  };