iflow-engine-base 3.10.8 → 3.11.1

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,11 +1,11 @@
1
1
  import * as j from "three";
2
- import { Loader as hs, FileLoader as ds, ShapePath as fs, Vector4 as Qt, Vector3 as ei, Curve as ps, BufferGeometry as gs, BufferAttribute as ms } from "three";
3
- import * as ys from "opentype.js";
2
+ import { Loader as vs, FileLoader as xs, ShapePath as Cs, DefaultLoadingManager as bs, Vector4 as Qt, Vector3 as ri, Curve as Es, BufferGeometry as ws, BufferAttribute as Ss } from "three";
3
+ import * as Ts from "opentype.js";
4
4
  var It = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
- function En(o) {
5
+ function _n(o) {
6
6
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
7
7
  }
8
- function vs(o) {
8
+ function As(o) {
9
9
  if (Object.prototype.hasOwnProperty.call(o, "__esModule")) return o;
10
10
  var e = o.default;
11
11
  if (typeof e == "function") {
@@ -29,12 +29,12 @@ function vs(o) {
29
29
  });
30
30
  }), t;
31
31
  }
32
- var Xt = { exports: {} }, xs = Xt.exports, yi;
33
- function Cs() {
34
- return yi || (yi = 1, (function(o, e) {
32
+ var Xt = { exports: {} }, _s = Xt.exports, bi;
33
+ function Is() {
34
+ return bi || (bi = 1, (function(o, e) {
35
35
  (function(t, r) {
36
36
  o.exports = r();
37
- })(xs, function() {
37
+ })(_s, function() {
38
38
  var t = function() {
39
39
  function r(h) {
40
40
  return a.appendChild(h.dom), h;
@@ -74,10 +74,10 @@ function Cs() {
74
74
  });
75
75
  })(Xt)), Xt.exports;
76
76
  }
77
- var bs = Cs();
78
- const Es = /* @__PURE__ */ En(bs);
77
+ var ks = Is();
78
+ const Bs = /* @__PURE__ */ _n(ks);
79
79
  var Je = /* @__PURE__ */ ((o) => (o.ModelLoadStart = "model-load-start", o.ModelLoadProgress = "model-load-progress", o.ModelLoaded = "model-loaded", o.ModelLoadError = "model-load-error", o.RenderStart = "render-start", o.RenderEnd = "render-end", o.CameraChanged = "camera-changed", o.CameraReset = "camera-reset", o.SelectionChanged = "selection-changed", o.HoverChanged = "hover-changed", o.EntityClick = "entity-click", o.LayerVisibilityChanged = "layer-visibility-changed", o.LayerColorChanged = "layer-color-changed", o.ViewZoomChanged = "view-zoom-changed", o.ViewPanChanged = "view-pan-changed", o.ToolActivated = "tool-activated", o.ToolDeactivated = "tool-deactivated", o.Error = "error", o.Warning = "warning", o))(Je || {});
80
- class ws {
80
+ class Ms {
81
81
  listeners = /* @__PURE__ */ new Map();
82
82
  onceListeners = /* @__PURE__ */ new Map();
83
83
  debugMode = !1;
@@ -189,7 +189,7 @@ class ws {
189
189
  this.removeAllListeners(), this.listeners.clear(), this.onceListeners.clear(), this.debugMode && console.log("[EventModule2d] Disposed");
190
190
  }
191
191
  }
192
- const Ss = `
192
+ const Ls = `
193
193
  varying vec2 vWorldPos;
194
194
 
195
195
  void main() {
@@ -197,7 +197,7 @@ const Ss = `
197
197
  vWorldPos = worldPosition.xy;
198
198
  gl_Position = projectionMatrix * viewMatrix * worldPosition;
199
199
  }
200
- `, Ts = `
200
+ `, Rs = `
201
201
  precision highp float;
202
202
 
203
203
  varying vec2 vWorldPos;
@@ -253,7 +253,7 @@ const Ss = `
253
253
  gl_FragColor = vec4(color, alpha);
254
254
  }
255
255
  `;
256
- class As {
256
+ class Ns {
257
257
  scene;
258
258
  camera;
259
259
  container;
@@ -306,8 +306,8 @@ class As {
306
306
  createGridMesh() {
307
307
  this.gridGeometry = new j.PlaneGeometry(1, 1, 1, 1), this.gridMaterial = new j.ShaderMaterial({
308
308
  uniforms: this.gridUniforms,
309
- vertexShader: Ss,
310
- fragmentShader: Ts,
309
+ vertexShader: Ls,
310
+ fragmentShader: Rs,
311
311
  transparent: !0,
312
312
  depthWrite: !1,
313
313
  depthTest: !1,
@@ -396,7 +396,7 @@ class As {
396
396
  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;
397
397
  }
398
398
  }
399
- class _s {
399
+ class Ds {
400
400
  engine;
401
401
  scene;
402
402
  options;
@@ -429,7 +429,7 @@ class _s {
429
429
  * 创建网格辅助(自适应网格)
430
430
  */
431
431
  createGrid(e = 1e3, t = 50) {
432
- this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.adaptiveGrid = new As(
432
+ this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.adaptiveGrid = new Ns(
433
433
  this.scene,
434
434
  this.engine.cameraModule2d.orthographicCamera,
435
435
  this.engine.renderModule2d.container
@@ -531,7 +531,7 @@ class _s {
531
531
  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();
532
532
  }
533
533
  }
534
- class Is {
534
+ class Ps {
535
535
  engine;
536
536
  isFree;
537
537
  // 高亮模型
@@ -547,7 +547,7 @@ class Is {
547
547
  this.engine = e, this.isFree = !0, this.highlightModels = [], this.hideModels = [], this.translucentModels = [], this.highlightHoverModels = [], this.models = [];
548
548
  }
549
549
  }
550
- class ks {
550
+ class Us {
551
551
  engine;
552
552
  orthographicCamera;
553
553
  container;
@@ -779,8 +779,8 @@ class ks {
779
779
  this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.orthographicCamera = null;
780
780
  }
781
781
  }
782
- const Bs = "iflowbim.cn", Ms = 512, Ls = 128, Rs = 150, Ns = 38, zt = 290, lr = 190;
783
- class Ds {
782
+ const Vs = "iflowbim.cn", Os = 512, Fs = 128, zs = 150, Ks = 38, zt = 290, ur = 190;
783
+ class Hs {
784
784
  THREE;
785
785
  text;
786
786
  scene;
@@ -790,7 +790,7 @@ class Ds {
790
790
  size;
791
791
  viewportWidth = 0;
792
792
  viewportHeight = 0;
793
- constructor(e, t = Bs) {
793
+ constructor(e, t = Vs) {
794
794
  this.THREE = e, this.text = t, this.scene = new e.Scene(), this.camera = new e.OrthographicCamera(0, 1, 1, 0, -10, 10), this.material = new e.SpriteMaterial({
795
795
  map: new e.CanvasTexture(this.createTextTexture()),
796
796
  transparent: !0,
@@ -813,7 +813,7 @@ class Ds {
813
813
  }
814
814
  createTextTexture() {
815
815
  const e = document.createElement("canvas");
816
- e.width = Ms, e.height = Ls;
816
+ e.width = Os, e.height = Fs;
817
817
  const t = e.getContext("2d");
818
818
  return t && (t.clearRect(0, 0, e.width, e.height), t.textAlign = "center", t.textBaseline = "middle", t.font = "600 54px Arial, Helvetica, sans-serif", t.lineWidth = 3, t.strokeStyle = "rgba(0, 0, 0, 0.20)", t.fillStyle = "rgba(255, 255, 255, 0.24)", t.strokeText(this.text, e.width / 2, e.height / 2), t.fillText(this.text, e.width / 2, e.height / 2)), e;
819
819
  }
@@ -821,13 +821,13 @@ class Ds {
821
821
  if (e === this.viewportWidth && t === this.viewportHeight)
822
822
  return;
823
823
  this.viewportWidth = e, this.viewportHeight = t, this.camera.left = -e / 2, this.camera.right = e / 2, this.camera.top = t / 2, this.camera.bottom = -t / 2, this.camera.updateProjectionMatrix();
824
- const r = Math.ceil(e / zt) + 2, n = Math.ceil(t / lr) + 2, s = r * n;
824
+ const r = Math.ceil(e / zt) + 2, n = Math.ceil(t / ur) + 2, s = r * n;
825
825
  this.ensureSpriteCount(s);
826
826
  let a = 0;
827
- const i = -e / 2 - zt / 2, l = -t / 2 - lr / 2;
827
+ const i = -e / 2 - zt / 2, l = -t / 2 - ur / 2;
828
828
  for (let c = 0; c < n; c += 1)
829
829
  for (let p = 0; p < r; p += 1) {
830
- const b = this.sprites[a], x = i + p * zt + c % 2 * (zt / 2), h = l + c * lr;
830
+ const b = this.sprites[a], x = i + p * zt + c % 2 * (zt / 2), h = l + c * ur;
831
831
  b.position.set(x, h, 0), b.visible = !0, a += 1;
832
832
  }
833
833
  for (let c = a; c < this.sprites.length; c += 1)
@@ -836,11 +836,11 @@ class Ds {
836
836
  ensureSpriteCount(e) {
837
837
  for (; this.sprites.length < e; ) {
838
838
  const t = new this.THREE.Sprite(this.material);
839
- t.scale.set(Rs, Ns, 1), t.rotation.z = -0.32, t.renderOrder = 999999, this.scene.add(t), this.sprites.push(t);
839
+ t.scale.set(zs, Ks, 1), t.rotation.z = -0.32, t.renderOrder = 999999, this.scene.add(t), this.sprites.push(t);
840
840
  }
841
841
  }
842
842
  }
843
- class Ps {
843
+ class Gs {
844
844
  engine;
845
845
  renderer;
846
846
  container;
@@ -851,7 +851,7 @@ class Ps {
851
851
  alpha = !1;
852
852
  precision = "highp";
853
853
  constructor(e, t, r) {
854
- this.engine = e, this.container = t, this.options = r, this.watermark = new Ds(j), this.renderer = this.createRenderer(), this.handleResize();
854
+ this.engine = e, this.container = t, this.options = r, this.watermark = new Hs(j), this.renderer = this.createRenderer(), this.handleResize();
855
855
  }
856
856
  /**
857
857
  * 创建 WebGL 渲染器
@@ -979,7 +979,7 @@ class Ps {
979
979
  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;
980
980
  }
981
981
  }
982
- class Us extends j.EventDispatcher {
982
+ class Ws extends j.EventDispatcher {
983
983
  object;
984
984
  domElement;
985
985
  enabled = !0;
@@ -1189,7 +1189,7 @@ class Us extends j.EventDispatcher {
1189
1189
  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));
1190
1190
  }
1191
1191
  }
1192
- class Vs {
1192
+ class js {
1193
1193
  engine;
1194
1194
  panControls;
1195
1195
  isActive = !0;
@@ -1206,7 +1206,7 @@ class Vs {
1206
1206
  * 创建 2D 平移控制器
1207
1207
  */
1208
1208
  createPanControls() {
1209
- const e = new Us(
1209
+ const e = new Ws(
1210
1210
  this.engine.camera,
1211
1211
  this.engine.renderer.domElement
1212
1212
  );
@@ -1322,7 +1322,7 @@ class Vs {
1322
1322
  this.panControls.dispose(), this.panControls = null;
1323
1323
  }
1324
1324
  }
1325
- class Os extends hs {
1325
+ class qs extends vs {
1326
1326
  /**
1327
1327
  * Constructs a new font loader.
1328
1328
  *
@@ -1341,7 +1341,7 @@ class Os extends hs {
1341
1341
  * @param {onErrorCallback} onError - Executed when errors occur.
1342
1342
  */
1343
1343
  load(e, t, r, n) {
1344
- const s = this, a = new ds(this.manager);
1344
+ const s = this, a = new xs(this.manager);
1345
1345
  a.setPath(this.path), a.setRequestHeader(this.requestHeader), a.setWithCredentials(this.withCredentials), a.load(e, function(i) {
1346
1346
  const l = s.parse(JSON.parse(i));
1347
1347
  t && t(l);
@@ -1354,10 +1354,10 @@ class Os extends hs {
1354
1354
  * @return {Font} The font.
1355
1355
  */
1356
1356
  parse(e) {
1357
- return new Fs(e);
1357
+ return new Ys(e);
1358
1358
  }
1359
1359
  }
1360
- class Fs {
1360
+ class Ys {
1361
1361
  /**
1362
1362
  * Constructs a new font.
1363
1363
  *
@@ -1376,13 +1376,13 @@ class Fs {
1376
1376
  * @return {Array<Shape>} An array of shapes representing the text.
1377
1377
  */
1378
1378
  generateShapes(e, t = 100, r = "ltr") {
1379
- const n = [], s = zs(e, t, this.data, r);
1379
+ const n = [], s = $s(e, t, this.data, r);
1380
1380
  for (let a = 0, i = s.length; a < i; a++)
1381
1381
  n.push(...s[a].toShapes());
1382
1382
  return n;
1383
1383
  }
1384
1384
  }
1385
- function zs(o, e, t, r) {
1385
+ function $s(o, e, t, r) {
1386
1386
  const n = Array.from(o), s = e / t.resolution, a = (t.boundingBox.yMax - t.boundingBox.yMin + t.underlineThickness) * s, i = [];
1387
1387
  let l = 0, c = 0;
1388
1388
  (r == "rtl" || r == "tb") && n.reverse();
@@ -1392,19 +1392,19 @@ function zs(o, e, t, r) {
1392
1392
  `)
1393
1393
  l = 0, c -= a;
1394
1394
  else {
1395
- const x = Ks(b, s, l, c, t);
1395
+ const x = Zs(b, s, l, c, t);
1396
1396
  r == "tb" ? (l = 0, c += t.ascender * s) : l += x.offsetX, i.push(x.path);
1397
1397
  }
1398
1398
  }
1399
1399
  return i;
1400
1400
  }
1401
- function Ks(o, e, t, r, n) {
1401
+ function Zs(o, e, t, r, n) {
1402
1402
  const s = n.glyphs[o] || n.glyphs["?"];
1403
1403
  if (!s) {
1404
1404
  console.error('THREE.Font: character "' + o + '" does not exists in font family ' + n.familyName + ".");
1405
1405
  return;
1406
1406
  }
1407
- const a = new fs();
1407
+ const a = new Cs();
1408
1408
  let i, l, c, p, b, x, h, m;
1409
1409
  if (s.o) {
1410
1410
  const d = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
@@ -1436,12 +1436,12 @@ class Le {
1436
1436
  }
1437
1437
  /** 从 ArrayBuffer 解析字体,生成 typeface.json。 */
1438
1438
  static fromArrayBuffer(e, t) {
1439
- const r = ys.parse(e);
1439
+ const r = Ts.parse(e);
1440
1440
  return Le._convert(r, t?.chars);
1441
1441
  }
1442
1442
  /** 将 typeface.json 转为 Three.js Font 对象,可直接用于文字几何。 */
1443
1443
  static toThreeFont(e) {
1444
- return new Os().parse(e);
1444
+ return new qs().parse(e);
1445
1445
  }
1446
1446
  static _convert(e, t) {
1447
1447
  const r = {}, n = e.unitsPerEm, s = (b) => Math.round(b), a = (b) => {
@@ -1582,10 +1582,10 @@ class Le {
1582
1582
  function Kt(o) {
1583
1583
  throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
1584
1584
  }
1585
- var cr = { exports: {} };
1586
- var vi;
1587
- function Hs() {
1588
- return vi || (vi = 1, (function(o, e) {
1585
+ var hr = { exports: {} };
1586
+ var Ei;
1587
+ function Xs() {
1588
+ return Ei || (Ei = 1, (function(o, e) {
1589
1589
  (function(t) {
1590
1590
  o.exports = t();
1591
1591
  })(function() {
@@ -3884,53 +3884,56 @@ function Hs() {
3884
3884
  }).call(this, typeof It < "u" ? It : typeof self < "u" ? self : typeof window < "u" ? window : {});
3885
3885
  }, {}] }, {}, [10])(10);
3886
3886
  });
3887
- })(cr)), cr.exports;
3887
+ })(hr)), hr.exports;
3888
3888
  }
3889
- var Gs = Hs();
3890
- const wn = /* @__PURE__ */ En(Gs);
3891
- function Sn(o) {
3889
+ var Qs = Xs();
3890
+ const In = /* @__PURE__ */ _n(Qs);
3891
+ function kn(o) {
3892
3892
  const e = String(o ?? "").trim().toLowerCase(), t = e.lastIndexOf(".");
3893
3893
  return t >= 0 ? e.slice(t) : "";
3894
3894
  }
3895
- function Ws(o) {
3896
- return Ys(o.webkitRelativePath || o.name);
3895
+ function Js(o) {
3896
+ return ra(o.webkitRelativePath || o.name);
3897
3897
  }
3898
- function js(o) {
3898
+ function ea(o) {
3899
3899
  const e = URL.createObjectURL(o);
3900
3900
  return {
3901
3901
  url: e,
3902
3902
  name: o.name,
3903
- extension: Sn(o.name),
3903
+ extension: kn(o.name),
3904
3904
  revoke: () => URL.revokeObjectURL(e)
3905
3905
  };
3906
3906
  }
3907
- async function qs(o, e = "package.zip") {
3908
- const t = new wn();
3907
+ async function ta(o, e = "package.zip") {
3908
+ const t = new In();
3909
3909
  o.forEach((s) => {
3910
- t.file(Ws(s), s);
3910
+ t.file(Js(s), s);
3911
3911
  });
3912
3912
  const r = await t.generateAsync({ type: "blob" }), n = URL.createObjectURL(r);
3913
3913
  return {
3914
3914
  url: n,
3915
3915
  name: e,
3916
- extension: Sn(e),
3916
+ extension: kn(e),
3917
3917
  revoke: () => URL.revokeObjectURL(n)
3918
3918
  };
3919
3919
  }
3920
- function Ys(o) {
3920
+ function ra(o) {
3921
3921
  return String(o).replace(/\\/g, "/").replace(/^\/+/, "").replace(/\/+/g, "/");
3922
3922
  }
3923
- const $s = "__BIM_ENGINE_SDK_ASSET_BASE__", Zs = "https://unpkg.com/iflow-engine-base@3.9.20/dist/";
3924
- function Xs() {
3923
+ const ia = "__BIM_ENGINE_SDK_ASSET_BASE__", na = "__BIM_ENGINE_SDK_ASSET_FILE_MAP__", sa = "__BIM_ENGINE_SDK_ASSET_FILE_SESSION__", aa = "https://unpkg.com/iflow-engine-base@3.9.20/dist/", oi = "https://__bim_engine_sdk_asset__/";
3924
+ function li() {
3925
3925
  return typeof globalThis < "u" ? globalThis : null;
3926
3926
  }
3927
- function si(o) {
3927
+ function ir(o) {
3928
3928
  return o.endsWith("/") ? o : `${o}/`;
3929
3929
  }
3930
- function Tn(o) {
3930
+ function nr(o) {
3931
+ return String(o).replace(/\\/g, "/").replace(/^\/+/, "").replace(/\/+/g, "/");
3932
+ }
3933
+ function Bn(o) {
3931
3934
  return /^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(o) || /^(?:data|blob):/i.test(o);
3932
3935
  }
3933
- function Qs(o) {
3936
+ function oa(o) {
3934
3937
  return o.startsWith("./") || o.startsWith("../");
3935
3938
  }
3936
3939
  function Jt(o, e) {
@@ -3940,27 +3943,68 @@ function Jt(o, e) {
3940
3943
  return null;
3941
3944
  }
3942
3945
  }
3943
- function An() {
3946
+ function la(o) {
3947
+ return o.startsWith(oi);
3948
+ }
3949
+ function ci() {
3950
+ const e = li()?.[sa];
3951
+ return typeof e == "string" && e ? `${oi}${e}/` : null;
3952
+ }
3953
+ function ca(o) {
3954
+ return `${ci() ?? oi}${nr(o)}`;
3955
+ }
3956
+ function Mn() {
3957
+ const e = li()?.[na];
3958
+ return e instanceof Map ? e : null;
3959
+ }
3960
+ function Ln(o) {
3961
+ const e = Mn();
3962
+ if (!e)
3963
+ return null;
3964
+ const t = nr(o);
3965
+ return e.get(t) ?? e.get(t.toLowerCase()) ?? null;
3966
+ }
3967
+ function wi(o) {
3968
+ const e = Mn();
3969
+ if (!e)
3970
+ return !1;
3971
+ const t = nr(o).replace(/\/?$/, "/").toLowerCase();
3972
+ for (const r of e.keys())
3973
+ if (r.toLowerCase().startsWith(t))
3974
+ return !0;
3975
+ return !1;
3976
+ }
3977
+ function ua(o) {
3978
+ if (!la(o))
3979
+ return null;
3980
+ const e = ci();
3981
+ if (!e || !o.startsWith(e))
3982
+ return null;
3983
+ const t = o.slice(e.length);
3984
+ return Ln(t);
3985
+ }
3986
+ bs.setURLModifier((o) => ua(o) ?? o);
3987
+ function Rn() {
3944
3988
  return typeof document < "u" && document.baseURI ? document.baseURI : typeof location < "u" && location.href ? location.href : null;
3945
3989
  }
3946
- function Js(o, e) {
3947
- const t = si(o);
3948
- if (Tn(t))
3990
+ function ha(o, e) {
3991
+ const t = ir(o);
3992
+ if (Bn(t))
3949
3993
  return t;
3950
- const r = er(e) || ea() || An();
3994
+ const r = er(e) || da() || Rn();
3951
3995
  return Jt(t, r || void 0) || t;
3952
3996
  }
3953
3997
  function er(o) {
3954
3998
  if (!o)
3955
3999
  return null;
3956
4000
  try {
3957
- const e = An(), t = Jt(o, e || void 0) || o, r = new URL(".", t), n = r.pathname.replace(/\\/g, "/");
3958
- return n.endsWith("/chunks/") ? new URL("../", r).toString() : e && /\/src\//.test(n) ? si(e) : r.toString();
4001
+ const e = Rn(), t = Jt(o, e || void 0) || o, r = new URL(".", t), n = r.pathname.replace(/\\/g, "/");
4002
+ return n.endsWith("/chunks/") ? new URL("../", r).toString() : e && /\/src\//.test(n) ? ir(e) : r.toString();
3959
4003
  } catch {
3960
4004
  return null;
3961
4005
  }
3962
4006
  }
3963
- function ea() {
4007
+ function da() {
3964
4008
  if (typeof document > "u")
3965
4009
  return null;
3966
4010
  const o = document.currentScript;
@@ -3974,22 +4018,33 @@ function ea() {
3974
4018
  }
3975
4019
  return null;
3976
4020
  }
3977
- function ta(o) {
3978
- const t = Xs()?.[$s];
3979
- return typeof t == "string" && t.length > 0 ? Js(t, o) : si(Zs);
4021
+ function fa(o) {
4022
+ const e = ci();
4023
+ if (e)
4024
+ return e;
4025
+ const r = li()?.[ia];
4026
+ return typeof r == "string" && r.length > 0 ? ha(r, o) : ir(aa);
3980
4027
  }
3981
4028
  function pt(o, e) {
3982
- if (Tn(o))
4029
+ if (Bn(o))
3983
4030
  return o;
3984
- if (Qs(o)) {
3985
- const n = Jt(o, er(e) || void 0);
3986
- if (n)
3987
- return n;
3988
- }
3989
- const t = o.replace(/^\/+/, ""), r = ta(e);
3990
- return Jt(t, r) || t;
4031
+ const t = nr(o), r = Ln(t);
4032
+ if (r && !o.endsWith("/"))
4033
+ return r;
4034
+ if (o.endsWith("/") || wi(t)) {
4035
+ const s = ca(t);
4036
+ if (wi(t))
4037
+ return o.endsWith("/") ? ir(s) : s;
4038
+ }
4039
+ if (oa(o)) {
4040
+ const s = Jt(o, er(e) || void 0);
4041
+ if (s)
4042
+ return s;
4043
+ }
4044
+ const n = fa(e);
4045
+ return Jt(t, n) || t;
3991
4046
  }
3992
- class ra {
4047
+ class pa {
3993
4048
  panel = null;
3994
4049
  listEl = null;
3995
4050
  isVisible = !1;
@@ -4136,14 +4191,14 @@ class ra {
4136
4191
  this.panel?.remove(), this.panel = null, this.listEl = null;
4137
4192
  }
4138
4193
  }
4139
- class _n {
4194
+ class Nn {
4140
4195
  engine;
4141
4196
  layerMap = /* @__PURE__ */ new Map();
4142
4197
  panelUI = null;
4143
4198
  constructor(e) {
4144
4199
  this.engine = e;
4145
4200
  const t = document.getElementById(e?.options?.containerId ?? "") ?? e?.container ?? null;
4146
- t && (this.panelUI = new ra(t, this));
4201
+ t && (this.panelUI = new pa(t, this));
4147
4202
  }
4148
4203
  // ─── 数据 ──────────────────────────────────────────────
4149
4204
  _loadLayers(e = this.engine.dwgData?.layers ?? []) {
@@ -4279,18 +4334,18 @@ function Ct(o) {
4279
4334
  max: o.boundingBox?.max.clone() ?? new j.Vector3()
4280
4335
  }) : { min: new j.Vector3(), max: new j.Vector3() };
4281
4336
  }
4282
- function ti(o, e, t) {
4337
+ function ii(o, e, t) {
4283
4338
  const r = new j.Vector3(o[0] ?? 0, o[1] ?? 0, o[2] ?? 0), n = new j.Euler(0, 0, t ?? 0), s = new j.Vector3(e[0] ?? 1, e[1] ?? 1, e[2] ?? 1), a = new j.Quaternion().setFromEuler(n);
4284
4339
  return new j.Matrix4().compose(r, a, s);
4285
4340
  }
4286
- function ia(o) {
4287
- return Array.isArray(o?.transformMatrix) && o.transformMatrix.length === 16 ? new j.Matrix4().fromArray(o.transformMatrix) : ti(
4341
+ function ga(o) {
4342
+ return Array.isArray(o?.transformMatrix) && o.transformMatrix.length === 16 ? new j.Matrix4().fromArray(o.transformMatrix) : ii(
4288
4343
  o.position ?? [0, 0, 0],
4289
4344
  o.scale ?? [1, 1, 1],
4290
4345
  o.rotation ?? 0
4291
4346
  );
4292
4347
  }
4293
- function In(o) {
4348
+ function Dn(o) {
4294
4349
  if (o.length === 0)
4295
4350
  return { min: new j.Vector3(), max: new j.Vector3() };
4296
4351
  const e = new j.Vector3(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY), t = new j.Vector3(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
@@ -4301,7 +4356,7 @@ function In(o) {
4301
4356
  max: t
4302
4357
  };
4303
4358
  }
4304
- class xi {
4359
+ class Si {
4305
4360
  constructor(e) {
4306
4361
  this.geometryFactory = e;
4307
4362
  }
@@ -4345,7 +4400,7 @@ class xi {
4345
4400
  for (const n of e)
4346
4401
  if (n?.visible !== !1) {
4347
4402
  if (n.type === "INSERT") {
4348
- const s = this.getBlockItems(n.blockId, r + 1), a = t.clone().multiply(ia(n)), i = this.getClipPolygon(n, t);
4403
+ const s = this.getBlockItems(n.blockId, r + 1), a = t.clone().multiply(ga(n)), i = this.getClipPolygon(n, t);
4349
4404
  for (const l of s) {
4350
4405
  const c = this.cloneRenderItem(l, a, n), p = i ? this.clipRenderItem(c, i) : c;
4351
4406
  p && (yield p);
@@ -4559,7 +4614,7 @@ class xi {
4559
4614
  };
4560
4615
  }
4561
4616
  }
4562
- class na {
4617
+ class ma {
4563
4618
  zipObjectUrls = [];
4564
4619
  /** 加载新版 manifest 分包数据,并返回 Loader 可消费的 DWGData 结构。 */
4565
4620
  async load(e) {
@@ -4705,7 +4760,7 @@ class na {
4705
4760
  const t = await fetch(e);
4706
4761
  if (!t.ok)
4707
4762
  throw new Error(`HTTP error! status: ${t.status}`);
4708
- const r = await wn.loadAsync(await t.arrayBuffer()), n = this.findZipManifestPath(r), s = await this.fetchZipJson(r, n);
4763
+ const r = await In.loadAsync(await t.arrayBuffer()), n = this.findZipManifestPath(r), s = await this.fetchZipJson(r, n);
4709
4764
  if (!this.isSplitManifest(s))
4710
4765
  throw new Error("[LoaderModule2d] Expected split CAD manifest data in .2d package.");
4711
4766
  const a = this.getZipBasePath(n);
@@ -4782,7 +4837,7 @@ class na {
4782
4837
  this.zipObjectUrls.forEach((e) => URL.revokeObjectURL(e)), this.zipObjectUrls = [];
4783
4838
  }
4784
4839
  }
4785
- function kn(o, e, t) {
4840
+ function Pn(o, e, t) {
4786
4841
  const r = t.length - o - 1;
4787
4842
  if (e >= t[r])
4788
4843
  return r - 1;
@@ -4793,7 +4848,7 @@ function kn(o, e, t) {
4793
4848
  e < t[a] ? s = a : n = a, a = Math.floor((n + s) / 2);
4794
4849
  return a;
4795
4850
  }
4796
- function sa(o, e, t, r) {
4851
+ function ya(o, e, t, r) {
4797
4852
  const n = [], s = [], a = [];
4798
4853
  n[0] = 1;
4799
4854
  for (let i = 1; i <= t; ++i) {
@@ -4807,15 +4862,15 @@ function sa(o, e, t, r) {
4807
4862
  }
4808
4863
  return n;
4809
4864
  }
4810
- function aa(o, e, t, r) {
4811
- const n = kn(o, r, e), s = sa(n, r, o, e), a = new Qt(0, 0, 0, 0);
4865
+ function va(o, e, t, r) {
4866
+ const n = Pn(o, r, e), s = ya(n, r, o, e), a = new Qt(0, 0, 0, 0);
4812
4867
  for (let i = 0; i <= o; ++i) {
4813
4868
  const l = t[n - o + i], c = s[i], p = l.w * c;
4814
4869
  a.x += l.x * p, a.y += l.y * p, a.z += l.z * p, a.w += l.w * c;
4815
4870
  }
4816
4871
  return a;
4817
4872
  }
4818
- function oa(o, e, t, r, n) {
4873
+ function xa(o, e, t, r, n) {
4819
4874
  const s = [];
4820
4875
  for (let b = 0; b <= t; ++b)
4821
4876
  s[b] = 0;
@@ -4866,8 +4921,8 @@ function oa(o, e, t, r, n) {
4866
4921
  }
4867
4922
  return a;
4868
4923
  }
4869
- function la(o, e, t, r, n) {
4870
- const s = n < o ? n : o, a = [], i = kn(o, r, e), l = oa(i, r, o, s, e), c = [];
4924
+ function Ca(o, e, t, r, n) {
4925
+ const s = n < o ? n : o, a = [], i = Pn(o, r, e), l = xa(i, r, o, s, e), c = [];
4871
4926
  for (let p = 0; p < t.length; ++p) {
4872
4927
  const b = t[p].clone(), x = b.w;
4873
4928
  b.x *= x, b.y *= x, b.z *= x, c[p] = b;
@@ -4882,7 +4937,7 @@ function la(o, e, t, r, n) {
4882
4937
  a[p] = new Qt(0, 0, 0);
4883
4938
  return a;
4884
4939
  }
4885
- function ca(o, e) {
4940
+ function ba(o, e) {
4886
4941
  let t = 1;
4887
4942
  for (let n = 2; n <= o; ++n)
4888
4943
  t *= n;
@@ -4893,26 +4948,26 @@ function ca(o, e) {
4893
4948
  r *= n;
4894
4949
  return t / r;
4895
4950
  }
4896
- function ua(o) {
4951
+ function Ea(o) {
4897
4952
  const e = o.length, t = [], r = [];
4898
4953
  for (let s = 0; s < e; ++s) {
4899
4954
  const a = o[s];
4900
- t[s] = new ei(a.x, a.y, a.z), r[s] = a.w;
4955
+ t[s] = new ri(a.x, a.y, a.z), r[s] = a.w;
4901
4956
  }
4902
4957
  const n = [];
4903
4958
  for (let s = 0; s < e; ++s) {
4904
4959
  const a = t[s].clone();
4905
4960
  for (let i = 1; i <= s; ++i)
4906
- a.sub(n[s - i].clone().multiplyScalar(ca(s, i) * r[i]));
4961
+ a.sub(n[s - i].clone().multiplyScalar(ba(s, i) * r[i]));
4907
4962
  n[s] = a.divideScalar(r[0]);
4908
4963
  }
4909
4964
  return n;
4910
4965
  }
4911
- function ha(o, e, t, r, n) {
4912
- const s = la(o, e, t, r, n);
4913
- return ua(s);
4966
+ function wa(o, e, t, r, n) {
4967
+ const s = Ca(o, e, t, r, n);
4968
+ return Ea(s);
4914
4969
  }
4915
- class da extends ps {
4970
+ class Sa extends Es {
4916
4971
  /**
4917
4972
  * Constructs a new NURBS curve.
4918
4973
  *
@@ -4938,8 +4993,8 @@ class da extends ps {
4938
4993
  * @param {Vector3} [optionalTarget] - The optional target vector the result is written to.
4939
4994
  * @return {Vector3} The position on the curve.
4940
4995
  */
4941
- getPoint(e, t = new ei()) {
4942
- const r = t, n = this.knots[this.startKnot] + e * (this.knots[this.endKnot] - this.knots[this.startKnot]), s = aa(this.degree, this.knots, this.controlPoints, n);
4996
+ getPoint(e, t = new ri()) {
4997
+ const r = t, n = this.knots[this.startKnot] + e * (this.knots[this.endKnot] - this.knots[this.startKnot]), s = va(this.degree, this.knots, this.controlPoints, n);
4943
4998
  return s.w !== 1 && s.divideScalar(s.w), r.set(s.x, s.y, s.z);
4944
4999
  }
4945
5000
  /**
@@ -4949,8 +5004,8 @@ class da extends ps {
4949
5004
  * @param {Vector3} [optionalTarget] - The optional target vector the result is written to.
4950
5005
  * @return {Vector3} The tangent vector.
4951
5006
  */
4952
- getTangent(e, t = new ei()) {
4953
- const r = t, n = this.knots[0] + e * (this.knots[this.knots.length - 1] - this.knots[0]), s = ha(this.degree, this.knots, this.controlPoints, n, 1);
5007
+ getTangent(e, t = new ri()) {
5008
+ const r = t, n = this.knots[0] + e * (this.knots[this.knots.length - 1] - this.knots[0]), s = wa(this.degree, this.knots, this.controlPoints, n, 1);
4954
5009
  return r.copy(s[1]).normalize(), r;
4955
5010
  }
4956
5011
  toJSON() {
@@ -4962,7 +5017,7 @@ class da extends ps {
4962
5017
  }
4963
5018
  }
4964
5019
  function Bt(o, e = !1) {
4965
- const t = o[0].index !== null, r = new Set(Object.keys(o[0].attributes)), n = new Set(Object.keys(o[0].morphAttributes)), s = {}, a = {}, i = o[0].morphTargetsRelative, l = new gs();
5020
+ const t = o[0].index !== null, r = new Set(Object.keys(o[0].attributes)), n = new Set(Object.keys(o[0].morphAttributes)), s = {}, a = {}, i = o[0].morphTargetsRelative, l = new ws();
4966
5021
  let c = 0;
4967
5022
  for (let p = 0; p < o.length; ++p) {
4968
5023
  const b = o[p];
@@ -5006,7 +5061,7 @@ function Bt(o, e = !1) {
5006
5061
  l.setIndex(b);
5007
5062
  }
5008
5063
  for (const p in s) {
5009
- const b = Ci(s[p]);
5064
+ const b = Ti(s[p]);
5010
5065
  if (!b)
5011
5066
  return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + p + " attribute."), null;
5012
5067
  l.setAttribute(p, b);
@@ -5019,7 +5074,7 @@ function Bt(o, e = !1) {
5019
5074
  const h = [];
5020
5075
  for (let d = 0; d < a[p].length; ++d)
5021
5076
  h.push(a[p][d][x]);
5022
- const m = Ci(h);
5077
+ const m = Ti(h);
5023
5078
  if (!m)
5024
5079
  return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + p + " morphAttribute."), null;
5025
5080
  l.morphAttributes[p].push(m);
@@ -5027,7 +5082,7 @@ function Bt(o, e = !1) {
5027
5082
  }
5028
5083
  return l;
5029
5084
  }
5030
- function Ci(o) {
5085
+ function Ti(o) {
5031
5086
  let e, t, r, n = -1, s = 0;
5032
5087
  for (let c = 0; c < o.length; ++c) {
5033
5088
  const p = o[c];
@@ -5041,7 +5096,7 @@ function Ci(o) {
5041
5096
  return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
5042
5097
  s += p.count * t;
5043
5098
  }
5044
- const a = new e(s), i = new ms(a, t, r);
5099
+ const a = new e(s), i = new Ss(a, t, r);
5045
5100
  let l = 0;
5046
5101
  for (let c = 0; c < o.length; ++c) {
5047
5102
  const p = o[c];
@@ -5058,8 +5113,8 @@ function Ci(o) {
5058
5113
  }
5059
5114
  return n !== void 0 && (i.gpuType = n), i;
5060
5115
  }
5061
- const Be = 1e-8, bi = 1e-3, fa = 8421504;
5062
- class pa {
5116
+ const Be = 1e-8, Ai = 1e-3, Ta = 8421504;
5117
+ class Aa {
5063
5118
  constructor(e) {
5064
5119
  this.engine = e;
5065
5120
  }
@@ -5072,7 +5127,7 @@ class pa {
5072
5127
  if (this.isSolidFill(e))
5073
5128
  return this.createSolidItems(e, t, r);
5074
5129
  const s = this.createPatternLineItem(e, t, r);
5075
- return s ? [s] : (this.warnUnknownPatternFallback(e), this.createSolidItems(e, t, r, fa));
5130
+ return s ? [s] : (this.warnUnknownPatternFallback(e), this.createSolidItems(e, t, r, Ta));
5076
5131
  }
5077
5132
  /** 只有明确的 SOLID 才作为实心面;patternType=SolidFill 在当前导出数据里不可靠。 */
5078
5133
  isSolidFill(e) {
@@ -5272,15 +5327,15 @@ class pa {
5272
5327
  const x = this.createPatternFamilySegments(e, b, l, r.holes, c, p, s - a);
5273
5328
  x.forEach(([h, m]) => {
5274
5329
  n.push(
5275
- new j.Vector3(h.x, h.y, bi),
5276
- new j.Vector3(m.x, m.y, bi)
5330
+ new j.Vector3(h.x, h.y, Ai),
5331
+ new j.Vector3(m.x, m.y, Ai)
5277
5332
  );
5278
5333
  }), a += x.length;
5279
5334
  }
5280
5335
  }
5281
5336
  if (n.length === 0) return null;
5282
5337
  n.forEach((l) => l.applyMatrix4(t));
5283
- const i = In(n);
5338
+ const i = Dn(n);
5284
5339
  return {
5285
5340
  kind: "line",
5286
5341
  layer: e.layer ?? "0",
@@ -5440,9 +5495,9 @@ class pa {
5440
5495
  }), r;
5441
5496
  }
5442
5497
  }
5443
- class Ei {
5498
+ class _i {
5444
5499
  constructor(e, t) {
5445
- this.engine = e, this.textFactory = t, this.hatchRenderer = new pa(e);
5500
+ this.engine = e, this.textFactory = t, this.hatchRenderer = new Aa(e);
5446
5501
  }
5447
5502
  hatchRenderer;
5448
5503
  /** 根据实体类型分发到线、文字、填充、图片等具体几何生成逻辑。 */
@@ -5556,7 +5611,7 @@ class Ei {
5556
5611
  return new j.Vector4(l.x, l.y, l.z, Number.isFinite(p) ? p : 1);
5557
5612
  });
5558
5613
  let a = (e.length - 1) * 2;
5559
- const i = new da(r, n, s).getPoints(a);
5614
+ const i = new Sa(r, n, s).getPoints(a);
5560
5615
  return t.closed === !0 && i.length > 1 && i.push(i[0].clone()), i;
5561
5616
  }
5562
5617
  /** 在缺少 knots 的数据里生成首尾夹紧的均匀节点向量。 */
@@ -5634,7 +5689,7 @@ class Ei {
5634
5689
  }];
5635
5690
  }
5636
5691
  }
5637
- class ga {
5692
+ class _a {
5638
5693
  constructor(e, t, r = e.modelGroup, n = {}) {
5639
5694
  this.model = t, this.targetGroup = r, this.options = n;
5640
5695
  }
@@ -5725,7 +5780,7 @@ class ga {
5725
5780
  const c = this.targetGroup.children.length - 1;
5726
5781
  let p = 0;
5727
5782
  e.forEach((b, x) => {
5728
- const h = In(b.points);
5783
+ const h = Dn(b.points);
5729
5784
  this.pushNodeMap(x, {
5730
5785
  indexes: [c, p, p + b.points.length * 3],
5731
5786
  object: i,
@@ -5866,7 +5921,7 @@ class ga {
5866
5921
  return Array.from(new Set([...e, ...t].filter((r) => !!r)));
5867
5922
  }
5868
5923
  }
5869
- class wi {
5924
+ class Ii {
5870
5925
  constructor(e, t) {
5871
5926
  this.engine = e, this.font = t;
5872
5927
  }
@@ -5880,7 +5935,7 @@ class wi {
5880
5935
  const a = [...e.position ?? [0, 0, 0]];
5881
5936
  a[1] = a[1] - (e.height ?? 0);
5882
5937
  const i = this.resolveWidthScale(e), l = new j.Vector3(a[0] ?? 0, a[1] ?? 0, a[2] ?? 0).applyMatrix4(t), c = 1.4 * e.scale;
5883
- s.applyMatrix4(t.clone().multiply(ti(a, [i * 1.4, 1 * c, 1 * c], e.rotation ?? 0)));
5938
+ s.applyMatrix4(t.clone().multiply(ii(a, [i * 1.4, 1 * c, 1 * c], e.rotation ?? 0)));
5884
5939
  const p = Ct(s), b = [{
5885
5940
  kind: "text",
5886
5941
  layer: e.layer,
@@ -5948,16 +6003,16 @@ class wi {
5948
6003
  const r = t.max.x - t.min.x, n = t.max.y - t.min.y;
5949
6004
  if (r <= 0 || n <= 0) return null;
5950
6005
  const s = new j.PlaneGeometry(r, n);
5951
- return s.applyMatrix4(ti([(t.min.x + t.max.x) / 2, (t.min.y + t.max.y) / 2, 0], [1, 1, 1], 0)), s;
6006
+ return s.applyMatrix4(ii([(t.min.x + t.max.x) / 2, (t.min.y + t.max.y) / 2, 0], [1, 1, 1], 0)), s;
5952
6007
  }
5953
6008
  }
5954
- class ma {
6009
+ class Ia {
5955
6010
  engine;
5956
6011
  data = null;
5957
6012
  enableValidation = !0;
5958
6013
  model = this.createEmptyModel();
5959
6014
  font = null;
5960
- dataSource = new na();
6015
+ dataSource = new ma();
5961
6016
  lastBuildOptions = {};
5962
6017
  activeWorkspace = { type: "model", name: "模型" };
5963
6018
  workspaceCache = /* @__PURE__ */ new Map();
@@ -5990,7 +6045,7 @@ class ma {
5990
6045
  if (e.length === 0)
5991
6046
  return;
5992
6047
  this.revokeLocalModelResource();
5993
- const r = e.length === 1 ? js(e[0]) : await qs(e, `${this.getLocalModelName(e)}.2d`);
6048
+ const r = e.length === 1 ? ea(e[0]) : await ta(e, `${this.getLocalModelName(e)}.2d`);
5994
6049
  this.localModelResource = r;
5995
6050
  try {
5996
6051
  await this.loadModel(r.url, t);
@@ -6087,7 +6142,7 @@ class ma {
6087
6142
  async buildScene(e, t = {}) {
6088
6143
  const r = this.createEmptyModel();
6089
6144
  r.layers = e.layers, this.model = r, this._emitProgress(30, "加载字体..."), this.font = await this.loadFont(e), this._emitProgress(45, "生成图元...");
6090
- const n = new wi(this.engine, this.font), s = new Ei(this.engine, n), a = new xi(s);
6145
+ const n = new Ii(this.engine, this.font), s = new _i(this.engine, n), a = new Si(s);
6091
6146
  a.setBlocks(e.blocks ?? []);
6092
6147
  const i = e.tiles ?? [];
6093
6148
  await this.buildTilesIntoGroup(i, this.engine.modelGroup, a, t);
@@ -6106,7 +6161,7 @@ class ma {
6106
6161
  n.name = `workspace:layout:${t.id}`, n.visible = !1, this.engine.modelGroup.add(n);
6107
6162
  const s = this.createEmptyModel();
6108
6163
  s.layers = e.layers, this.model = s, this.font || (this._emitProgress(30, "加载字体..."), this.font = await this.loadFont(e));
6109
- const a = new wi(this.engine, this.font), i = new Ei(this.engine, a), l = new xi(i);
6164
+ const a = new Ii(this.engine, this.font), i = new _i(this.engine, a), l = new Si(i);
6110
6165
  l.setBlocks(e.blocks ?? []);
6111
6166
  const c = new j.Group();
6112
6167
  c.name = `layout-viewports:${t.id}`, n.add(c), await this.buildViewportGroups(e, t, c, l, r);
@@ -6148,7 +6203,7 @@ class ma {
6148
6203
  for (let l = 0; l < e.length; l += 1) {
6149
6204
  const c = e[l], p = this.createTileGroup(c, n.namePrefix);
6150
6205
  t.add(p);
6151
- const b = new ga(this.engine, this.model, p, {
6206
+ const b = new _a(this.engine, this.model, p, {
6152
6207
  interactive: n.interactive ?? !0
6153
6208
  }), x = /* @__PURE__ */ new Set();
6154
6209
  let h = 0, m = 0;
@@ -6412,7 +6467,7 @@ class ma {
6412
6467
  s && e ? this.engine.cameraModule2d?.fitToExtents(e) : s && this.engine.fitToView();
6413
6468
  } catch {
6414
6469
  }
6415
- this.engine.layerManager || (this.engine.layerManager = new _n(this.engine)), this.engine.layerManager._loadLayers();
6470
+ this.engine.layerManager || (this.engine.layerManager = new Nn(this.engine)), this.engine.layerManager._loadLayers();
6416
6471
  const r = this.engine.scene?.background, n = r instanceof j.Color ? r.getHex() : this.engine.options?.backgroundColor ?? 1710618;
6417
6472
  this.engine.modelToolModule2d?.updateColorsForBackground(n), this.engine.layerManager.refresh(), this.engine.events?.trigger(Je.ModelLoaded, {});
6418
6473
  }
@@ -6482,7 +6537,7 @@ class ma {
6482
6537
  return (e[0]?.webkitRelativePath || e[0]?.name || "model").replace(/\\/g, "/").split("/").filter(Boolean)[0]?.replace(/\.[^.]+$/, "") || "model";
6483
6538
  }
6484
6539
  }
6485
- class Bn {
6540
+ class Un {
6486
6541
  /**
6487
6542
  * 构造函数
6488
6543
  * @param camera - Three.js 相机对象(用于投影计算)
@@ -6594,7 +6649,7 @@ class Bn {
6594
6649
  this.scene = e;
6595
6650
  }
6596
6651
  }
6597
- class ya {
6652
+ class ka {
6598
6653
  engine;
6599
6654
  pickBoxElementIds = [];
6600
6655
  worldToScreen;
@@ -6602,7 +6657,7 @@ class ya {
6602
6657
  maxHoverLineCoordinateCount = 3e4;
6603
6658
  maxHoverMeshVertexCount = 3e4;
6604
6659
  constructor(e) {
6605
- this.engine = e, this.pickBoxElementIds = [], this.worldToScreen = new Bn(e.camera, e.renderer, e.scene);
6660
+ this.engine = e, this.pickBoxElementIds = [], this.worldToScreen = new Un(e.camera, e.renderer, e.scene);
6606
6661
  }
6607
6662
  init() {
6608
6663
  this.pickBoxElementIds = [];
@@ -6731,7 +6786,7 @@ class ya {
6731
6786
  return e.distanceTo(l);
6732
6787
  }
6733
6788
  }
6734
- class va {
6789
+ class Ba {
6735
6790
  engine;
6736
6791
  // 小组件容器
6737
6792
  widgetContainer = null;
@@ -6758,7 +6813,7 @@ class va {
6758
6813
  // 是否启用状态
6759
6814
  enabled = !1;
6760
6815
  constructor(e) {
6761
- this.engine = e, this.worldToScreen = new Bn(e.camera, e.renderer, e.scene), this.initWidget();
6816
+ this.engine = e, this.worldToScreen = new Un(e.camera, e.renderer, e.scene), this.initWidget();
6762
6817
  let t = this;
6763
6818
  this.engine.controlModule2d.panControls.addEventListener("change", () => {
6764
6819
  t.updateViewPoint();
@@ -6899,7 +6954,7 @@ class va {
6899
6954
  return Math.atan2(e.clientX - r, n - e.clientY);
6900
6955
  }
6901
6956
  }
6902
- class xa {
6957
+ class Ma {
6903
6958
  engine;
6904
6959
  enabled = !1;
6905
6960
  constructor(e) {
@@ -6952,7 +7007,7 @@ class xa {
6952
7007
  return e?.object ?? e?.group?.children?.[e.indexes?.[0]] ?? this.engine.modelGroup?.children?.[e.indexes?.[0]];
6953
7008
  }
6954
7009
  }
6955
- class Ca {
7010
+ class La {
6956
7011
  engine;
6957
7012
  highlightMaterial;
6958
7013
  hideMaterial;
@@ -7212,7 +7267,7 @@ class Ca {
7212
7267
  return !0;
7213
7268
  }
7214
7269
  }
7215
- function ba(o) {
7270
+ function Ra(o) {
7216
7271
  const e = {
7217
7272
  mouseMoveFrame: null,
7218
7273
  latestMouseMoveEvent: null,
@@ -7322,7 +7377,7 @@ function ba(o) {
7322
7377
  }
7323
7378
  return e;
7324
7379
  }
7325
- class Ea {
7380
+ class Na {
7326
7381
  el;
7327
7382
  xEl;
7328
7383
  yEl;
@@ -7341,8 +7396,8 @@ class Ea {
7341
7396
  this.el.parentElement?.removeChild(this.el);
7342
7397
  }
7343
7398
  }
7344
- var Mn = /* @__PURE__ */ ((o) => (o.ModelLoadStart = "model-load-start", o.ModelLoadProgress = "model-load-progress", o.ModelLoaded = "model-loaded", o.ModelError = "model-error", o.SelectionChanged = "selection-changed", o.HoverChanged = "hover-changed", o.Click = "click", o.MouseMove = "mouse-move", o.CameraChanged = "camera-changed", o.CameraIdle = "camera-idle", o.EngineFree = "engine-free", o.EngineBusy = "engine-busy", o.MeasureChanged = "measure-changed", o.MeasureClick = "measure-click", o.SectionMove = "section-move", o))(Mn || {});
7345
- class wa {
7399
+ var Vn = /* @__PURE__ */ ((o) => (o.ModelLoadStart = "model-load-start", o.ModelLoadProgress = "model-load-progress", o.ModelLoaded = "model-loaded", o.ModelError = "model-error", o.SelectionChanged = "selection-changed", o.HoverChanged = "hover-changed", o.Click = "click", o.MouseMove = "mouse-move", o.CameraChanged = "camera-changed", o.CameraIdle = "camera-idle", o.EngineFree = "engine-free", o.EngineBusy = "engine-busy", o.MeasureChanged = "measure-changed", o.MeasureClick = "measure-click", o.SectionMove = "section-move", o))(Vn || {});
7400
+ class Da {
7346
7401
  engine;
7347
7402
  behavior;
7348
7403
  mouseCoordUI = null;
@@ -7352,7 +7407,7 @@ class wa {
7352
7407
  init() {
7353
7408
  this.behavior = this.engine.handelBehaved2d, this.behavior.init(this);
7354
7409
  const e = this.engine.container;
7355
- e && this.engine.options?.showMouseCoordinates !== !1 && (this.mouseCoordUI = new Ea(e));
7410
+ e && this.engine.options?.showMouseCoordinates !== !1 && (this.mouseCoordUI = new Na(e));
7356
7411
  }
7357
7412
  active() {
7358
7413
  this.behavior.active();
@@ -7394,7 +7449,7 @@ class wa {
7394
7449
  handleMouseClick(e) {
7395
7450
  if (this.canHandleElementInteraction())
7396
7451
  if (e.catch != null && this.isModelInteractive(e.catch.id)) {
7397
- this.engine.modelToolModule2d.highlightModel([e.catch.id]), this.engine.events.trigger(Mn.Click, e.catch.id);
7452
+ this.engine.modelToolModule2d.highlightModel([e.catch.id]), this.engine.events.trigger(Vn.Click, e.catch.id);
7398
7453
  let t = new CustomEvent("D2ElementClick", {
7399
7454
  detail: { id: e.catch.id }
7400
7455
  });
@@ -7419,7 +7474,7 @@ class wa {
7419
7474
  this.mouseCoordUI?.dispose(), this.mouseCoordUI = null;
7420
7475
  }
7421
7476
  }
7422
- class Sa {
7477
+ class Pa {
7423
7478
  overlay;
7424
7479
  hLine;
7425
7480
  vLine;
@@ -7462,7 +7517,7 @@ class Sa {
7462
7517
  this.canvas.removeEventListener("mousemove", this.onMouseMove), this.canvas.removeEventListener("mouseenter", this.onMouseEnter), this.canvas.removeEventListener("mouseleave", this.onMouseLeave), this.canvas.style.cursor = "", this.overlay.parentElement?.removeChild(this.overlay);
7463
7518
  }
7464
7519
  }
7465
- const Si = [
7520
+ const ki = [
7466
7521
  { action: "search", label: "搜索" },
7467
7522
  { action: "hideElement", label: "隐藏元素", dividerBefore: !0 },
7468
7523
  { action: "showAll", label: "显示全部" },
@@ -7473,7 +7528,7 @@ const Si = [
7473
7528
  { action: "linkElement2d3d", label: "模型联动", dividerBefore: !0 },
7474
7529
  { action: "linkView2d3d", label: "视角关联" }
7475
7530
  ];
7476
- class Ta {
7531
+ class Ua {
7477
7532
  menu;
7478
7533
  container;
7479
7534
  canvas;
@@ -7497,8 +7552,8 @@ class Ta {
7497
7552
  }
7498
7553
  /** 按初始化配置解析菜单项顺序和显隐,未传配置时保持默认菜单。 */
7499
7554
  resolveMenuItems(e) {
7500
- return !e || e.length === 0 ? Si : e.filter((t) => t.visible !== !1).map((t) => {
7501
- const r = Si.find((n) => n.action === t.action);
7555
+ return !e || e.length === 0 ? ki : e.filter((t) => t.visible !== !1).map((t) => {
7556
+ const r = ki.find((n) => n.action === t.action);
7502
7557
  return {
7503
7558
  action: t.action,
7504
7559
  label: t.label ?? r?.label ?? t.action,
@@ -7546,7 +7601,7 @@ class Ta {
7546
7601
  this.canvas.removeEventListener("contextmenu", this.onContextMenu), document.removeEventListener("mousedown", this.onDocMouseDown), document.removeEventListener("keydown", this.onEscape), this.menu.parentElement?.removeChild(this.menu);
7547
7602
  }
7548
7603
  }
7549
- class Aa {
7604
+ class Va {
7550
7605
  overlay = null;
7551
7606
  textEl = null;
7552
7607
  barEl = null;
@@ -7681,14 +7736,14 @@ class Aa {
7681
7736
  this.overlay?.remove(), this.overlay = null, this.textEl = null, this.barEl = null, this.pctEl = null;
7682
7737
  }
7683
7738
  }
7684
- const _a = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
7739
+ const Oa = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
7685
7740
  <circle cx="6.5" cy="6.5" r="4.5" stroke="currentColor" stroke-width="1.5"/>
7686
7741
  <line x1="10" y1="10" x2="14" y2="14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
7687
- </svg>`, Ia = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
7742
+ </svg>`, Fa = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
7688
7743
  <line x1="1" y1="1" x2="11" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
7689
7744
  <line x1="11" y1="1" x2="1" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
7690
7745
  </svg>`;
7691
- class ka {
7746
+ class za {
7692
7747
  manager;
7693
7748
  wrapper;
7694
7749
  input;
@@ -7707,7 +7762,7 @@ class ka {
7707
7762
  return e.className = "engine-2d-search", e.innerHTML = `
7708
7763
  <div class="engine-2d-search__box">
7709
7764
  <div class="engine-2d-search__input-row">
7710
- <span class="engine-2d-search__icon">${_a}</span>
7765
+ <span class="engine-2d-search__icon">${Oa}</span>
7711
7766
  <input
7712
7767
  class="engine-2d-search__input"
7713
7768
  type="text"
@@ -7715,7 +7770,7 @@ class ka {
7715
7770
  autocomplete="off"
7716
7771
  spellcheck="false"
7717
7772
  />
7718
- <button class="engine-2d-search__clear" title="清除">${Ia}</button>
7773
+ <button class="engine-2d-search__clear" title="清除">${Fa}</button>
7719
7774
  </div>
7720
7775
  <div class="engine-2d-search__divider"></div>
7721
7776
  <div class="engine-2d-search__status"></div>
@@ -7821,13 +7876,13 @@ class ka {
7821
7876
  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);
7822
7877
  }
7823
7878
  }
7824
- class Ba {
7879
+ class Ka {
7825
7880
  engine;
7826
7881
  searchUI = null;
7827
7882
  constructor(e) {
7828
7883
  this.engine = e;
7829
7884
  const t = document.getElementById(e?.options?.containerId ?? "") ?? e?.container ?? null;
7830
- t && (this.searchUI = new ka(t, this));
7885
+ t && (this.searchUI = new za(t, this));
7831
7886
  }
7832
7887
  /** 只查询已加载的文字实体,支持连续包含和按字符顺序的模糊匹配。 */
7833
7888
  search(e) {
@@ -7901,7 +7956,7 @@ class Ba {
7901
7956
  this.searchUI?.dispose(), this.searchUI = null;
7902
7957
  }
7903
7958
  }
7904
- const Ti = {
7959
+ const Bi = {
7905
7960
  dark: {
7906
7961
  /* 背景 */
7907
7962
  "--e2d-bg": "#1e1f22",
@@ -8004,14 +8059,14 @@ const Ti = {
8004
8059
  "--e2d-coord-label": "rgba(0,0,0,0.50)"
8005
8060
  }
8006
8061
  };
8007
- class Ma {
8062
+ class Ha {
8008
8063
  container;
8009
8064
  current;
8010
8065
  constructor(e, t = "dark") {
8011
8066
  this.container = e, this.current = t, this._apply(t);
8012
8067
  }
8013
8068
  _apply(e) {
8014
- const t = Ti[e];
8069
+ const t = Bi[e];
8015
8070
  for (const [r, n] of Object.entries(t))
8016
8071
  this.container.style.setProperty(r, n);
8017
8072
  this.container.setAttribute("data-e2d-theme", e);
@@ -8026,18 +8081,18 @@ class Ma {
8026
8081
  this.setTheme(this.current === "dark" ? "light" : "dark");
8027
8082
  }
8028
8083
  dispose() {
8029
- for (const e of Object.keys(Ti[this.current]))
8084
+ for (const e of Object.keys(Bi[this.current]))
8030
8085
  this.container.style.removeProperty(e);
8031
8086
  this.container.removeAttribute("data-e2d-theme");
8032
8087
  }
8033
8088
  }
8034
- const Ai = {
8089
+ const Mi = {
8035
8090
  precision: 3,
8036
8091
  unit: "m",
8037
8092
  areaUnit: "m²",
8038
8093
  scale: 1
8039
8094
  };
8040
- class ai {
8095
+ class ui {
8041
8096
  manager;
8042
8097
  points = [];
8043
8098
  constructor(e) {
@@ -8072,7 +8127,7 @@ class ai {
8072
8127
  this.clearAllPoints();
8073
8128
  }
8074
8129
  }
8075
- class La extends ai {
8130
+ class Ga extends ui {
8076
8131
  /** 两点完成一条距离测量。 */
8077
8132
  handleClick(e) {
8078
8133
  super.handleClick(e), this.points.length === 2 && (this.manager.addMeasurement("distance", this.points), this.clearAllPoints());
@@ -8081,7 +8136,7 @@ class La extends ai {
8081
8136
  this.points.length === 1 && this.manager.drawPreview("distance", [this.points[0], e]);
8082
8137
  }
8083
8138
  }
8084
- class Ra extends ai {
8139
+ class Wa extends ui {
8085
8140
  /** 三点及以上可以闭合面积,双击或 Enter 结束。 */
8086
8141
  handleClick(e) {
8087
8142
  super.handleClick(e), this.manager.drawPreview("area", this.points);
@@ -8094,7 +8149,7 @@ class Ra extends ai {
8094
8149
  e.length >= 3 && this.manager.addMeasurement("area", e), this.clearAllPoints();
8095
8150
  }
8096
8151
  }
8097
- class Na extends ai {
8152
+ class ja extends ui {
8098
8153
  /** 三点完成角度测量,第二个点作为角点。 */
8099
8154
  handleClick(e) {
8100
8155
  super.handleClick(e), this.points.length === 3 && (this.manager.addMeasurement("angle", this.points), this.clearAllPoints());
@@ -8103,7 +8158,7 @@ class Na extends ai {
8103
8158
  this.points.length >= 2 && this.manager.drawPreview("angle", [...this.points, e]);
8104
8159
  }
8105
8160
  }
8106
- class Da {
8161
+ class qa {
8107
8162
  distanceMeasure;
8108
8163
  areaMeasure;
8109
8164
  angleMeasure;
@@ -8115,7 +8170,7 @@ class Da {
8115
8170
  engine;
8116
8171
  container;
8117
8172
  annotationContainer;
8118
- setting = { ...Ai };
8173
+ setting = { ...Mi };
8119
8174
  isActive = !1;
8120
8175
  currentTool = null;
8121
8176
  previewRecord = null;
@@ -8123,7 +8178,7 @@ class Da {
8123
8178
  hasDraggedAfterMouseDown = !1;
8124
8179
  currentWorkspaceKey = "model";
8125
8180
  constructor(e) {
8126
- this.engine = e, this.container = e.container, this.distanceMeasure = new La(this), this.areaMeasure = new Ra(this), this.angleMeasure = new Na(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);
8181
+ this.engine = e, this.container = e.container, this.distanceMeasure = new Ga(this), this.areaMeasure = new Wa(this), this.angleMeasure = new ja(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);
8127
8182
  }
8128
8183
  /** 开启 2D 测量事件;只停用图元点选,不停用 pan/zoom 视图控制。 */
8129
8184
  active() {
@@ -8370,19 +8425,19 @@ class Da {
8370
8425
  return e === "distance" ? this.annotationData.distanceAnnotation : e === "area" ? this.annotationData.areaAnnotation : this.annotationData.angleAnnotation;
8371
8426
  }
8372
8427
  normalizePrecision(e) {
8373
- return Number.isFinite(e) ? Math.max(0, Math.min(8, Math.round(e))) : Ai.precision;
8428
+ return Number.isFinite(e) ? Math.max(0, Math.min(8, Math.round(e))) : Mi.precision;
8374
8429
  }
8375
8430
  createId() {
8376
8431
  return `measure-2d-${Date.now()}-${Math.random().toString(16).slice(2)}`;
8377
8432
  }
8378
8433
  }
8379
- const ur = {
8434
+ const dr = {
8380
8435
  stroke: "#ff4d4f",
8381
8436
  fill: "rgba(255, 77, 79, 0.08)",
8382
8437
  strokeWidth: 2,
8383
8438
  fontSize: 16,
8384
8439
  cloudRadius: 10
8385
- }, Pa = {
8440
+ }, Ya = {
8386
8441
  none: pt("/assets/icon/选择.svg", import.meta.url),
8387
8442
  line: pt("/assets/icon/线.svg", import.meta.url),
8388
8443
  arrow: pt("/assets/icon/箭头.svg", import.meta.url),
@@ -8391,8 +8446,8 @@ const ur = {
8391
8446
  polygon: pt("/assets/icon/面积.svg", import.meta.url),
8392
8447
  text: pt("/assets/icon/文字.svg", import.meta.url),
8393
8448
  cloudline: pt("/assets/icon/云线.svg", import.meta.url)
8394
- }, Ua = "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>'), Va = "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>');
8395
- class Oa {
8449
+ }, $a = "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>'), Za = "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>');
8450
+ class Xa {
8396
8451
  engine;
8397
8452
  container;
8398
8453
  layer;
@@ -8401,7 +8456,7 @@ class Oa {
8401
8456
  records = [];
8402
8457
  isActive = !1;
8403
8458
  currentType = null;
8404
- style = { ...ur };
8459
+ style = { ...dr };
8405
8460
  draft = null;
8406
8461
  draftStart = null;
8407
8462
  polygonPoints = [];
@@ -8572,7 +8627,7 @@ class Oa {
8572
8627
  { type: "cloudline", title: "云线,双击或 Enter 结束" },
8573
8628
  { type: "text", title: "文字" }
8574
8629
  ].forEach((l) => {
8575
- const c = this.createIconButton(l.title, Pa[l.type]);
8630
+ const c = this.createIconButton(l.title, Ya[l.type]);
8576
8631
  c.onclick = () => {
8577
8632
  this.active(), this.setDrawType(l.type);
8578
8633
  }, l.type !== "none" && (this.buttons[l.type] = c), e.appendChild(c);
@@ -8583,15 +8638,15 @@ class Oa {
8583
8638
  }, e.appendChild(r);
8584
8639
  const n = document.createElement("input");
8585
8640
  n.type = "number", n.min = "1", n.max = "20", n.value = `${this.style.strokeWidth}`, n.title = "线宽", n.onchange = () => {
8586
- this.style.strokeWidth = this.normalizeNumber(n.valueAsNumber, 1, 20, ur.strokeWidth);
8641
+ this.style.strokeWidth = this.normalizeNumber(n.valueAsNumber, 1, 20, dr.strokeWidth);
8587
8642
  }, e.appendChild(n);
8588
8643
  const s = document.createElement("input");
8589
8644
  s.type = "number", s.min = "10", s.max = "72", s.value = `${this.style.fontSize}`, s.title = "字号", s.onchange = () => {
8590
- this.style.fontSize = this.normalizeNumber(s.valueAsNumber, 10, 72, ur.fontSize);
8645
+ this.style.fontSize = this.normalizeNumber(s.valueAsNumber, 10, 72, dr.fontSize);
8591
8646
  }, e.appendChild(s), e.appendChild(this.createDivider());
8592
- const a = this.createIconButton("清空", Ua);
8647
+ const a = this.createIconButton("清空", $a);
8593
8648
  a.onclick = () => this.clearAll(), e.appendChild(a);
8594
- const i = this.createIconButton("关闭", Va);
8649
+ const i = this.createIconButton("关闭", Za);
8595
8650
  return i.onclick = () => {
8596
8651
  this.hideToolbar(), this.disActive();
8597
8652
  }, e.appendChild(i), e;
@@ -8792,7 +8847,7 @@ class Oa {
8792
8847
  return `markup-2d-${Date.now()}-${Math.random().toString(16).slice(2)}`;
8793
8848
  }
8794
8849
  }
8795
- class Fa {
8850
+ class Qa {
8796
8851
  container;
8797
8852
  labelContainer;
8798
8853
  projectCoordinate;
@@ -8991,11 +9046,11 @@ class Fa {
8991
9046
  e.stopImmediatePropagation();
8992
9047
  };
8993
9048
  }
8994
- class za {
9049
+ class Ja {
8995
9050
  engine;
8996
9051
  manager;
8997
9052
  constructor(e) {
8998
- this.engine = e, this.manager = new Fa({
9053
+ this.engine = e, this.manager = new Qa({
8999
9054
  container: e.container,
9000
9055
  className: "bim-engine-label-container bim-engine-label-container-2d",
9001
9056
  projectCoordinate: (t) => this.projectCoordinate(t),
@@ -9058,7 +9113,7 @@ class za {
9058
9113
  return { x: r.x, y: r.y, z: 0 };
9059
9114
  }
9060
9115
  }
9061
- class Ka {
9116
+ class eo {
9062
9117
  engine;
9063
9118
  mainViewPort = null;
9064
9119
  constructor(e) {
@@ -9094,7 +9149,7 @@ class Ka {
9094
9149
  };
9095
9150
  }
9096
9151
  }
9097
- class Ha {
9152
+ class to {
9098
9153
  constructor(e, t) {
9099
9154
  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(Je.ModelLoaded, () => this.refresh()) ?? (() => {
9100
9155
  }), this.refresh();
@@ -9133,10 +9188,10 @@ class Ha {
9133
9188
  this.unsubscribe(), this.el.remove();
9134
9189
  }
9135
9190
  }
9136
- const Ga = "3.10.8", Wa = {
9137
- version: Ga
9138
- }, Mt = Wa.version;
9139
- function oi() {
9191
+ const ro = "3.11.1", io = {
9192
+ version: ro
9193
+ }, Mt = io.version;
9194
+ function hi() {
9140
9195
  const o = globalThis.crypto?.subtle;
9141
9196
  if (!o)
9142
9197
  throw new Error("[BimEngine] Web Crypto API is required for secure sdkAuth credentials mode");
@@ -9148,38 +9203,38 @@ function Lt(o) {
9148
9203
  function Rt(o) {
9149
9204
  return o.buffer.slice(o.byteOffset, o.byteOffset + o.byteLength);
9150
9205
  }
9151
- function _i(o) {
9206
+ function Li(o) {
9152
9207
  let e = "";
9153
9208
  return o.forEach((t) => {
9154
9209
  e += String.fromCharCode(t);
9155
9210
  }), btoa(e);
9156
9211
  }
9157
- function ja(o) {
9212
+ function no(o) {
9158
9213
  const e = o.getUTCFullYear(), t = String(o.getUTCMonth() + 1).padStart(2, "0"), r = String(o.getUTCDate()).padStart(2, "0");
9159
9214
  return `${e}${t}${r}`;
9160
9215
  }
9161
- async function qa(o) {
9162
- const e = await oi().digest("SHA-256", Rt(Lt(o)));
9216
+ async function so(o) {
9217
+ const e = await hi().digest("SHA-256", Rt(Lt(o)));
9163
9218
  return Array.from(new Uint8Array(e)).map((t) => t.toString(16).padStart(2, "0")).join("");
9164
9219
  }
9165
- async function Ya(o, e) {
9166
- const t = oi(), r = await t.importKey("raw", Rt(o), { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]);
9220
+ async function ao(o, e) {
9221
+ const t = hi(), r = await t.importKey("raw", Rt(o), { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]);
9167
9222
  return t.sign("HMAC", r, Rt(Lt(e)));
9168
9223
  }
9169
- function $a(o) {
9224
+ function oo(o) {
9170
9225
  return Lt(
9171
9226
  [o.appId, o.engineType, o.requestDate, String(o.timestamp), o.nonce].join("|")
9172
9227
  );
9173
9228
  }
9174
- async function Za(o) {
9175
- const e = oi(), t = /* @__PURE__ */ new Date(), r = t.getTime(), n = ja(t), s = globalThis.crypto.randomUUID(), a = globalThis.crypto.getRandomValues(new Uint8Array(12)), i = await qa(o.appSecret), l = await Ya(Lt(i), n), c = await e.importKey("raw", l, "AES-GCM", !1, ["encrypt"]), p = JSON.stringify({
9229
+ async function lo(o) {
9230
+ const e = hi(), t = /* @__PURE__ */ new Date(), r = t.getTime(), n = no(t), s = globalThis.crypto.randomUUID(), a = globalThis.crypto.getRandomValues(new Uint8Array(12)), i = await so(o.appSecret), l = await ao(Lt(i), n), c = await e.importKey("raw", l, "AES-GCM", !1, ["encrypt"]), p = JSON.stringify({
9176
9231
  appKey: o.appKey,
9177
9232
  appSecret: o.appSecret
9178
9233
  }), b = await e.encrypt(
9179
9234
  {
9180
9235
  name: "AES-GCM",
9181
9236
  iv: a,
9182
- additionalData: Rt($a({
9237
+ additionalData: Rt(oo({
9183
9238
  appId: o.appId,
9184
9239
  engineType: o.engineType,
9185
9240
  requestDate: n,
@@ -9197,14 +9252,14 @@ async function Za(o) {
9197
9252
  requestDate: n,
9198
9253
  timestamp: r,
9199
9254
  nonce: s,
9200
- iv: _i(a),
9201
- cipherText: _i(new Uint8Array(b)),
9255
+ iv: Li(a),
9256
+ cipherText: Li(new Uint8Array(b)),
9202
9257
  sdkVersion: o.sdkVersion,
9203
9258
  origin: o.origin,
9204
9259
  product: o.product
9205
9260
  };
9206
9261
  }
9207
- const hr = /* @__PURE__ */ new Map();
9262
+ const fr = /* @__PURE__ */ new Map();
9208
9263
  function tr(o) {
9209
9264
  return o.replace(/\/+$/, "");
9210
9265
  }
@@ -9213,7 +9268,7 @@ function rr(o) {
9213
9268
  if (typeof window < "u" && typeof window.location?.origin == "string")
9214
9269
  return window.location.origin;
9215
9270
  }
9216
- function Xa(o, e) {
9271
+ function co(o, e) {
9217
9272
  return JSON.stringify({
9218
9273
  endpoint: tr(o.endpoint),
9219
9274
  token: o.token ?? "",
@@ -9226,7 +9281,7 @@ function Xa(o, e) {
9226
9281
  sdkVersion: Mt
9227
9282
  });
9228
9283
  }
9229
- async function ri(o, e, t) {
9284
+ async function ni(o, e, t) {
9230
9285
  const r = typeof AbortController < "u" ? new AbortController() : void 0, n = r ? setTimeout(() => r.abort(), t) : void 0;
9231
9286
  try {
9232
9287
  const s = await fetch(o, {
@@ -9246,8 +9301,8 @@ async function ri(o, e, t) {
9246
9301
  n != null && clearTimeout(n);
9247
9302
  }
9248
9303
  }
9249
- async function Qa(o, e) {
9250
- const t = await ri(`${tr(o.endpoint)}/oauth/sdk-verify`, {
9304
+ async function uo(o, e) {
9305
+ const t = await ni(`${tr(o.endpoint)}/oauth/sdk-verify`, {
9251
9306
  sdkToken: o.token,
9252
9307
  engineType: e,
9253
9308
  sdkVersion: Mt,
@@ -9256,8 +9311,8 @@ async function Qa(o, e) {
9256
9311
  }, o.timeoutMs ?? 8e3);
9257
9312
  return t.sdkToken = o.token, t;
9258
9313
  }
9259
- async function Ja(o, e) {
9260
- const t = await Za({
9314
+ async function ho(o, e) {
9315
+ const t = await lo({
9261
9316
  appId: o.appId,
9262
9317
  appKey: o.appKey,
9263
9318
  appSecret: o.appSecret,
@@ -9265,11 +9320,11 @@ async function Ja(o, e) {
9265
9320
  sdkVersion: Mt,
9266
9321
  origin: rr(o.origin),
9267
9322
  product: o.product
9268
- }), r = await ri(
9323
+ }), r = await ni(
9269
9324
  `${tr(o.endpoint)}/oauth/sdk-token/secure`,
9270
9325
  t,
9271
9326
  o.timeoutMs ?? 8e3
9272
- ), n = await ri(`${tr(o.endpoint)}/oauth/sdk-verify`, {
9327
+ ), n = await ni(`${tr(o.endpoint)}/oauth/sdk-verify`, {
9273
9328
  sdkToken: r.sdkToken,
9274
9329
  engineType: e,
9275
9330
  sdkVersion: Mt,
@@ -9278,7 +9333,7 @@ async function Ja(o, e) {
9278
9333
  }, o.timeoutMs ?? 8e3);
9279
9334
  return n.sdkToken = r.sdkToken, n;
9280
9335
  }
9281
- async function eo(o, e) {
9336
+ async function fo(o, e) {
9282
9337
  const t = o?.sdkAuth;
9283
9338
  if (!t)
9284
9339
  return null;
@@ -9286,44 +9341,44 @@ async function eo(o, e) {
9286
9341
  throw new Error("[BimEngine] sdkAuth.endpoint is required");
9287
9342
  if (!t.token && !(t.appId && t.appKey && t.appSecret))
9288
9343
  return null;
9289
- const r = Xa(t, e), n = hr.get(r);
9344
+ const r = co(t, e), n = fr.get(r);
9290
9345
  if (n) {
9291
9346
  const a = await n;
9292
9347
  return o && (o.__sdkAuthSession = a), a;
9293
9348
  }
9294
- const s = (t.token ? Qa(t, e) : Ja(t, e)).then((a) => {
9349
+ const s = (t.token ? uo(t, e) : ho(t, e)).then((a) => {
9295
9350
  if (a.authorized !== !0)
9296
9351
  throw new Error("[BimEngine] SDK authorization rejected");
9297
9352
  return o && (o.__sdkAuthSession = a), a;
9298
9353
  }).catch((a) => {
9299
- throw hr.delete(r), a;
9354
+ throw fr.delete(r), a;
9300
9355
  });
9301
- return hr.set(r, s), s;
9356
+ return fr.set(r, s), s;
9302
9357
  }
9303
- function to(o) {
9358
+ function po(o) {
9304
9359
  return o instanceof Uint8Array || ArrayBuffer.isView(o) && o.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in o && o.BYTES_PER_ELEMENT === 1;
9305
9360
  }
9306
- function Ii(o) {
9361
+ function Ri(o) {
9307
9362
  if (typeof o != "number")
9308
9363
  throw new TypeError("number expected, got " + typeof o);
9309
9364
  if (!Number.isSafeInteger(o) || o < 0)
9310
9365
  throw new RangeError("positive integer expected, got " + o);
9311
9366
  }
9312
9367
  function Qe(o, e, t = "") {
9313
- const r = to(o), n = o?.length, s = e !== void 0;
9368
+ const r = po(o), n = o?.length, s = e !== void 0;
9314
9369
  if (!r || s && n !== e) {
9315
9370
  const a = t && `"${t}" `, i = s ? ` of length ${e}` : "", l = r ? `length=${n}` : `type=${typeof o}`, c = a + "expected Uint8Array" + i + ", got " + l;
9316
9371
  throw r ? new RangeError(c) : new TypeError(c);
9317
9372
  }
9318
9373
  return o;
9319
9374
  }
9320
- function ki(o, e = !0) {
9375
+ function Ni(o, e = !0) {
9321
9376
  if (o.destroyed)
9322
9377
  throw new Error("Hash instance has been destroyed");
9323
9378
  if (e && o.finished)
9324
9379
  throw new Error("Hash#digest() has already been called");
9325
9380
  }
9326
- function ro(o, e, t = !1) {
9381
+ function go(o, e, t = !1) {
9327
9382
  Qe(o, void 0, "output");
9328
9383
  const r = e.outputLen;
9329
9384
  if (o.length < r)
@@ -9331,7 +9386,7 @@ function ro(o, e, t = !1) {
9331
9386
  if (t && !Nt(o))
9332
9387
  throw new Error("invalid output, must be aligned");
9333
9388
  }
9334
- function io(o) {
9389
+ function mo(o) {
9335
9390
  return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);
9336
9391
  }
9337
9392
  function xt(o) {
@@ -9341,15 +9396,15 @@ function vt(...o) {
9341
9396
  for (let e = 0; e < o.length; e++)
9342
9397
  o[e].fill(0);
9343
9398
  }
9344
- function ir(o) {
9399
+ function sr(o) {
9345
9400
  return new DataView(o.buffer, o.byteOffset, o.byteLength);
9346
9401
  }
9347
- const li = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, Ln = (o) => o << 24 & 4278190080 | o << 8 & 16711680 | o >>> 8 & 65280 | o >>> 24 & 255, Re = li ? (o) => o : (o) => Ln(o) >>> 0, no = (o) => {
9402
+ const di = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, On = (o) => o << 24 & 4278190080 | o << 8 & 16711680 | o >>> 8 & 65280 | o >>> 24 & 255, Re = di ? (o) => o : (o) => On(o) >>> 0, yo = (o) => {
9348
9403
  for (let e = 0; e < o.length; e++)
9349
- o[e] = Ln(o[e]);
9404
+ o[e] = On(o[e]);
9350
9405
  return o;
9351
- }, ci = li ? (o) => o : no;
9352
- function so(o, e) {
9406
+ }, fi = di ? (o) => o : yo;
9407
+ function vo(o, e) {
9353
9408
  if (o.length !== e.length)
9354
9409
  return !1;
9355
9410
  let t = 0;
@@ -9357,11 +9412,11 @@ function so(o, e) {
9357
9412
  t |= o[r] ^ e[r];
9358
9413
  return t === 0;
9359
9414
  }
9360
- function ao(o, e, t) {
9415
+ function xo(o, e, t) {
9361
9416
  const r = e, n = t || (() => []), s = (i, l) => r(l, ...n(i)).update(i).digest(), a = r(new Uint8Array(o), ...n(new Uint8Array(0)));
9362
9417
  return s.outputLen = a.outputLen, s.blockLen = a.blockLen, s.create = (i, ...l) => r(i, ...l), s;
9363
9418
  }
9364
- const oo = /* @__NO_SIDE_EFFECTS__ */ (o, e) => {
9419
+ const Co = /* @__NO_SIDE_EFFECTS__ */ (o, e) => {
9365
9420
  function t(r, ...n) {
9366
9421
  if (Qe(r, void 0, "key"), o.nonceLength !== void 0) {
9367
9422
  const p = n[0];
@@ -9392,7 +9447,7 @@ const oo = /* @__NO_SIDE_EFFECTS__ */ (o, e) => {
9392
9447
  }
9393
9448
  return Object.assign(t, o), t;
9394
9449
  };
9395
- function lo(o, e, t = !0) {
9450
+ function bo(o, e, t = !0) {
9396
9451
  if (e === void 0)
9397
9452
  return new Uint8Array(o);
9398
9453
  if (Qe(e, void 0, "output"), e.length !== o)
@@ -9401,9 +9456,9 @@ function lo(o, e, t = !0) {
9401
9456
  throw new Error("invalid output, must be aligned");
9402
9457
  return e;
9403
9458
  }
9404
- function co(o, e, t) {
9405
- Ii(o), Ii(e);
9406
- const r = new Uint8Array(16), n = ir(r);
9459
+ function Eo(o, e, t) {
9460
+ Ri(o), Ri(e);
9461
+ const r = new Uint8Array(16), n = sr(r);
9407
9462
  return n.setBigUint64(0, BigInt(e), t), n.setBigUint64(8, BigInt(o), t), r;
9408
9463
  }
9409
9464
  function Nt(o) {
@@ -9412,7 +9467,7 @@ function Nt(o) {
9412
9467
  function Dt(o) {
9413
9468
  return Uint8Array.from(Qe(o));
9414
9469
  }
9415
- const St = 16, Rn = /* @__PURE__ */ new Uint8Array(16), _t = /* @__PURE__ */ xt(Rn), uo = 225, ho = (o, e, t, r) => {
9470
+ const St = 16, Fn = /* @__PURE__ */ new Uint8Array(16), _t = /* @__PURE__ */ xt(Fn), wo = 225, So = (o, e, t, r) => {
9416
9471
  const n = r & 1;
9417
9472
  return {
9418
9473
  s3: t << 31 | r >>> 1,
@@ -9420,11 +9475,11 @@ const St = 16, Rn = /* @__PURE__ */ new Uint8Array(16), _t = /* @__PURE__ */ xt(
9420
9475
  s1: o << 31 | e >>> 1,
9421
9476
  // NIST SP 800-38D §6.3 applies `V >> 1` and XORs R on carry. In this
9422
9477
  // 4x32-bit split, R = 0xe1 || 0^120 lives in the top byte of s0.
9423
- s0: o >>> 1 ^ uo << 24 & -(n & 1)
9478
+ s0: o >>> 1 ^ wo << 24 & -(n & 1)
9424
9479
  // reduce % poly
9425
9480
  };
9426
- }, Ht = (o) => (o >>> 0 & 255) << 24 | (o >>> 8 & 255) << 16 | (o >>> 16 & 255) << 8 | o >>> 24 & 255 | 0, fo = (o) => o > 64 * 1024 ? 8 : o > 1024 ? 4 : 2;
9427
- class po {
9481
+ }, Ht = (o) => (o >>> 0 & 255) << 24 | (o >>> 8 & 255) << 16 | (o >>> 16 & 255) << 8 | o >>> 24 & 255 | 0, To = (o) => o > 64 * 1024 ? 8 : o > 1024 ? 4 : 2;
9482
+ class Ao {
9428
9483
  blockLen = St;
9429
9484
  outputLen = St;
9430
9485
  s0 = 0;
@@ -9439,12 +9494,12 @@ class po {
9439
9494
  // We select bits per window adaptively based on expectedLength
9440
9495
  constructor(e, t) {
9441
9496
  Qe(e, 16, "key"), e = Dt(e);
9442
- const r = ir(e);
9497
+ const r = sr(e);
9443
9498
  let n = r.getUint32(0, !1), s = r.getUint32(4, !1), a = r.getUint32(8, !1), i = r.getUint32(12, !1);
9444
9499
  const l = [];
9445
9500
  for (let m = 0; m < 128; m++)
9446
- l.push({ s0: Ht(n), s1: Ht(s), s2: Ht(a), s3: Ht(i) }), { s0: n, s1: s, s2: a, s3: i } = ho(n, s, a, i);
9447
- const c = fo(t || 1024);
9501
+ l.push({ s0: Ht(n), s1: Ht(s), s2: Ht(a), s3: Ht(i) }), { s0: n, s1: s, s2: a, s3: i } = So(n, s, a, i);
9502
+ const c = To(t || 1024);
9448
9503
  if (![1, 2, 4, 8].includes(c))
9449
9504
  throw new Error("ghash: invalid window size, expected 2, 4 or 8");
9450
9505
  this.W = c;
@@ -9479,11 +9534,11 @@ class po {
9479
9534
  this.s0 = l, this.s1 = c, this.s2 = p, this.s3 = b;
9480
9535
  }
9481
9536
  update(e) {
9482
- ki(this), Qe(e), e = Dt(e);
9537
+ Ni(this), Qe(e), e = Dt(e);
9483
9538
  const t = xt(e), r = Math.floor(e.length / St), n = e.length % St;
9484
9539
  for (let s = 0; s < r; s++)
9485
9540
  this._updateBlock(Re(t[s * 4 + 0]), Re(t[s * 4 + 1]), Re(t[s * 4 + 2]), Re(t[s * 4 + 3]));
9486
- return n && (Rn.set(e.subarray(r * St)), this._updateBlock(Re(_t[0]), Re(_t[1]), Re(_t[2]), Re(_t[3])), vt(_t)), this;
9541
+ return n && (Fn.set(e.subarray(r * St)), this._updateBlock(Re(_t[0]), Re(_t[1]), Re(_t[2]), Re(_t[3])), vt(_t)), this;
9487
9542
  }
9488
9543
  destroy() {
9489
9544
  this.destroyed = !0;
@@ -9492,32 +9547,32 @@ class po {
9492
9547
  t.s0 = 0, t.s1 = 0, t.s2 = 0, t.s3 = 0;
9493
9548
  }
9494
9549
  digestInto(e) {
9495
- ki(this), ro(e, this, !0), this.finished = !0;
9550
+ Ni(this), go(e, this, !0), this.finished = !0;
9496
9551
  const { s0: t, s1: r, s2: n, s3: s } = this, a = xt(e);
9497
- a[0] = t, a[1] = r, a[2] = n, a[3] = s, ci(a);
9552
+ a[0] = t, a[1] = r, a[2] = n, a[3] = s, fi(a);
9498
9553
  }
9499
9554
  digest() {
9500
9555
  const e = new Uint8Array(St);
9501
9556
  return this.digestInto(e), this.destroy(), e;
9502
9557
  }
9503
9558
  }
9504
- const Bi = /* @__PURE__ */ ao(16, (o, e) => new po(o, e), (o) => [o.length]), ii = 16, go = 4, Gt = /* @__PURE__ */ new Uint8Array(ii), mo = 283;
9505
- function yo(o) {
9559
+ const Di = /* @__PURE__ */ xo(16, (o, e) => new Ao(o, e), (o) => [o.length]), si = 16, _o = 4, Gt = /* @__PURE__ */ new Uint8Array(si), Io = 283;
9560
+ function ko(o) {
9506
9561
  if (![16, 24, 32].includes(o.length))
9507
9562
  throw new Error('"aes key" expected Uint8Array of length 16/24/32, got length=' + o.length);
9508
9563
  }
9509
- function ui(o) {
9510
- return o << 1 ^ mo & -(o >> 7);
9564
+ function pi(o) {
9565
+ return o << 1 ^ Io & -(o >> 7);
9511
9566
  }
9512
- function Mi(o, e) {
9567
+ function Pi(o, e) {
9513
9568
  let t = 0;
9514
9569
  for (; e > 0; e >>= 1)
9515
- t ^= o & -(e & 1), o = ui(o);
9570
+ t ^= o & -(e & 1), o = pi(o);
9516
9571
  return t;
9517
9572
  }
9518
- const vo = /* @__PURE__ */ (() => {
9573
+ const Bo = /* @__PURE__ */ (() => {
9519
9574
  const o = new Uint8Array(256);
9520
- for (let t = 0, r = 1; t < 256; t++, r ^= ui(r))
9575
+ for (let t = 0, r = 1; t < 256; t++, r ^= pi(r))
9521
9576
  o[t] = r;
9522
9577
  const e = new Uint8Array(256);
9523
9578
  e[0] = 99;
@@ -9526,11 +9581,11 @@ const vo = /* @__PURE__ */ (() => {
9526
9581
  r |= r << 8, e[o[t]] = (r ^ r >> 4 ^ r >> 5 ^ r >> 6 ^ r >> 7 ^ 99) & 255;
9527
9582
  }
9528
9583
  return vt(o), e;
9529
- })(), xo = (o) => o << 24 | o >>> 8, dr = (o) => o << 8 | o >>> 24;
9530
- function Co(o, e) {
9584
+ })(), Mo = (o) => o << 24 | o >>> 8, pr = (o) => o << 8 | o >>> 24;
9585
+ function Lo(o, e) {
9531
9586
  if (o.length !== 256)
9532
9587
  throw new Error("Wrong sbox length");
9533
- const t = new Uint32Array(256).map((c, p) => e(o[p])), r = t.map(dr), n = r.map(dr), s = n.map(dr), a = new Uint32Array(256 * 256), i = new Uint32Array(256 * 256), l = new Uint16Array(256 * 256);
9588
+ const t = new Uint32Array(256).map((c, p) => e(o[p])), r = t.map(pr), n = r.map(pr), s = n.map(pr), a = new Uint32Array(256 * 256), i = new Uint32Array(256 * 256), l = new Uint16Array(256 * 256);
9534
9589
  for (let c = 0; c < 256; c++)
9535
9590
  for (let p = 0; p < 256; p++) {
9536
9591
  const b = c * 256 + p;
@@ -9538,23 +9593,23 @@ function Co(o, e) {
9538
9593
  }
9539
9594
  return { sbox: o, sbox2: l, T0: t, T1: r, T2: n, T3: s, T01: a, T23: i };
9540
9595
  }
9541
- const Nn = /* @__PURE__ */ Co(vo, (o) => Mi(o, 3) << 24 | o << 16 | o << 8 | Mi(o, 2)), bo = /* @__PURE__ */ (() => {
9596
+ const zn = /* @__PURE__ */ Lo(Bo, (o) => Pi(o, 3) << 24 | o << 16 | o << 8 | Pi(o, 2)), Ro = /* @__PURE__ */ (() => {
9542
9597
  const o = new Uint8Array(16);
9543
- for (let e = 0, t = 1; e < 16; e++, t = ui(t))
9598
+ for (let e = 0, t = 1; e < 16; e++, t = pi(t))
9544
9599
  o[e] = t;
9545
9600
  return o;
9546
9601
  })();
9547
- function Eo(o) {
9602
+ function No(o) {
9548
9603
  Qe(o);
9549
9604
  const e = o.length;
9550
- yo(o);
9551
- const { sbox2: t } = Nn, r = [];
9552
- (!li || !Nt(o)) && r.push(o = Dt(o));
9553
- const n = ci(xt(o)), s = n.length, a = (l) => kt(t, l, l, l, l), i = new Uint32Array(e + 28);
9605
+ ko(o);
9606
+ const { sbox2: t } = zn, r = [];
9607
+ (!di || !Nt(o)) && r.push(o = Dt(o));
9608
+ const n = fi(xt(o)), s = n.length, a = (l) => kt(t, l, l, l, l), i = new Uint32Array(e + 28);
9554
9609
  i.set(n);
9555
9610
  for (let l = s; l < i.length; l++) {
9556
9611
  let c = i[l - 1];
9557
- l % s === 0 ? c = a(xo(c)) ^ bo[l / s - 1] : s > 6 && l % s === 4 && (c = a(c)), i[l] = i[l - s] ^ c;
9612
+ l % s === 0 ? c = a(Mo(c)) ^ Ro[l / s - 1] : s > 6 && l % s === 4 && (c = a(c)), i[l] = i[l - s] ^ c;
9558
9613
  }
9559
9614
  return vt(...r), i;
9560
9615
  }
@@ -9564,8 +9619,8 @@ function Wt(o, e, t, r, n, s) {
9564
9619
  function kt(o, e, t, r, n) {
9565
9620
  return o[e & 255 | t & 65280] | o[r >>> 16 & 255 | n >>> 16 & 65280] << 16;
9566
9621
  }
9567
- function Li(o, e, t, r, n) {
9568
- const { sbox2: s, T01: a, T23: i } = Nn;
9622
+ function Ui(o, e, t, r, n) {
9623
+ const { sbox2: s, T01: a, T23: i } = zn;
9569
9624
  let l = 0;
9570
9625
  e ^= o[l++], t ^= o[l++], r ^= o[l++], n ^= o[l++];
9571
9626
  const c = o.length / 4 - 2;
@@ -9577,48 +9632,48 @@ function Li(o, e, t, r, n) {
9577
9632
  return { s0: p, s1: b, s2: x, s3: h };
9578
9633
  }
9579
9634
  function jt(o, e, t, r, n) {
9580
- Qe(t, ii, "nonce"), Qe(r), n = lo(r.length, n);
9581
- const s = t, a = xt(s), i = ir(s), l = xt(r), c = xt(n), p = e ? 0 : 12, b = r.length;
9582
- let x = i.getUint32(p, e), { s0: h, s1: m, s2: d, s3: y } = Li(o, Re(a[0]), Re(a[1]), Re(a[2]), Re(a[3]));
9635
+ Qe(t, si, "nonce"), Qe(r), n = bo(r.length, n);
9636
+ const s = t, a = xt(s), i = sr(s), l = xt(r), c = xt(n), p = e ? 0 : 12, b = r.length;
9637
+ let x = i.getUint32(p, e), { s0: h, s1: m, s2: d, s3: y } = Ui(o, Re(a[0]), Re(a[1]), Re(a[2]), Re(a[3]));
9583
9638
  for (let v = 0; v + 4 <= l.length; v += 4)
9584
- c[v + 0] = l[v + 0] ^ Re(h), c[v + 1] = l[v + 1] ^ Re(m), c[v + 2] = l[v + 2] ^ Re(d), c[v + 3] = l[v + 3] ^ Re(y), x = x + 1 >>> 0, i.setUint32(p, x, e), { s0: h, s1: m, s2: d, s3: y } = Li(o, Re(a[0]), Re(a[1]), Re(a[2]), Re(a[3]));
9585
- const u = ii * Math.floor(l.length / go);
9639
+ c[v + 0] = l[v + 0] ^ Re(h), c[v + 1] = l[v + 1] ^ Re(m), c[v + 2] = l[v + 2] ^ Re(d), c[v + 3] = l[v + 3] ^ Re(y), x = x + 1 >>> 0, i.setUint32(p, x, e), { s0: h, s1: m, s2: d, s3: y } = Ui(o, Re(a[0]), Re(a[1]), Re(a[2]), Re(a[3]));
9640
+ const u = si * Math.floor(l.length / _o);
9586
9641
  if (u < b) {
9587
9642
  const v = new Uint32Array([h, m, d, y]);
9588
- ci(v);
9589
- const E = io(v);
9643
+ fi(v);
9644
+ const E = mo(v);
9590
9645
  for (let T = u, _ = 0; T < b; T++, _++)
9591
9646
  n[T] = r[T] ^ E[_];
9592
9647
  vt(v);
9593
9648
  }
9594
9649
  return n;
9595
9650
  }
9596
- function wo(o, e, t, r, n) {
9651
+ function Do(o, e, t, r, n) {
9597
9652
  const s = n ? n.length : 0, a = o.create(t, r.length + s);
9598
9653
  n && a.update(n);
9599
- const i = co(8 * r.length, 8 * s, e);
9654
+ const i = Eo(8 * r.length, 8 * s, e);
9600
9655
  a.update(r), a.update(i);
9601
9656
  const l = a.digest();
9602
9657
  return vt(i), l;
9603
9658
  }
9604
- const So = /* @__PURE__ */ oo({ blockSize: 16, nonceLength: 12, tagLength: 16, varSizeNonce: !0 }, function(e, t, r) {
9659
+ const Po = /* @__PURE__ */ Co({ blockSize: 16, nonceLength: 12, tagLength: 16, varSizeNonce: !0 }, function(e, t, r) {
9605
9660
  if (t.length < 8)
9606
9661
  throw new Error("aes/gcm: invalid nonce length");
9607
9662
  const n = 16;
9608
9663
  function s(i, l, c) {
9609
- const p = wo(Bi, !1, i, c, r);
9664
+ const p = Do(Di, !1, i, c, r);
9610
9665
  for (let b = 0; b < l.length; b++)
9611
9666
  p[b] ^= l[b];
9612
9667
  return p;
9613
9668
  }
9614
9669
  function a() {
9615
- const i = Eo(e), l = Gt.slice(), c = Gt.slice();
9670
+ const i = No(e), l = Gt.slice(), c = Gt.slice();
9616
9671
  if (jt(i, !1, c, c, l), t.length === 12)
9617
9672
  c.set(t);
9618
9673
  else {
9619
9674
  const b = Gt.slice();
9620
- ir(b).setBigUint64(8, BigInt(t.length * 8), !1);
9621
- const h = Bi.create(l).update(t).update(b);
9675
+ sr(b).setBigUint64(8, BigInt(t.length * 8), !1);
9676
+ const h = Di.create(l).update(t).update(b);
9622
9677
  h.digestInto(c), h.destroy();
9623
9678
  }
9624
9679
  const p = jt(i, !1, c, Gt);
@@ -9635,28 +9690,28 @@ const So = /* @__PURE__ */ oo({ blockSize: 16, nonceLength: 12, tagLength: 16, v
9635
9690
  const { xk: l, authKey: c, counter: p, tagMask: b } = a(), x = [l, c, b, p];
9636
9691
  Nt(i) || x.push(i = Dt(i));
9637
9692
  const h = i.subarray(0, -n), m = i.subarray(-n), d = s(c, b, h);
9638
- if (x.push(d), !so(d, m))
9693
+ if (x.push(d), !vo(d, m))
9639
9694
  throw vt(...x), new Error("aes/gcm: invalid ghash tag");
9640
9695
  const y = jt(l, !1, p, h);
9641
9696
  return vt(...x), y;
9642
9697
  }
9643
9698
  };
9644
9699
  });
9645
- var fr, Ri;
9700
+ var gr, Vi;
9646
9701
  function xe() {
9647
- return Ri || (Ri = 1, fr = {
9702
+ return Vi || (Vi = 1, gr = {
9648
9703
  // default options
9649
9704
  options: {
9650
9705
  usePureJavaScript: !1
9651
9706
  }
9652
- }), fr;
9707
+ }), gr;
9653
9708
  }
9654
- var pr = { exports: {} }, gr, Ni;
9655
- function To() {
9656
- if (Ni) return gr;
9657
- Ni = 1;
9709
+ var mr = { exports: {} }, yr, Oi;
9710
+ function Uo() {
9711
+ if (Oi) return yr;
9712
+ Oi = 1;
9658
9713
  var o = {};
9659
- gr = o;
9714
+ yr = o;
9660
9715
  var e = {};
9661
9716
  o.encode = function(r, n, s) {
9662
9717
  if (typeof n != "string")
@@ -9725,13 +9780,13 @@ function To() {
9725
9780
  b += n[l[s]];
9726
9781
  return b;
9727
9782
  }
9728
- return gr;
9783
+ return yr;
9729
9784
  }
9730
- var Di;
9785
+ var Fi;
9731
9786
  function we() {
9732
- if (Di) return pr.exports;
9733
- Di = 1;
9734
- var o = xe(), e = To(), t = pr.exports = o.util = o.util || {};
9787
+ if (Fi) return mr.exports;
9788
+ Fi = 1;
9789
+ var o = xe(), e = Uo(), t = mr.exports = o.util = o.util || {};
9735
9790
  (function() {
9736
9791
  if (typeof process < "u" && process.nextTick && !process.browser) {
9737
9792
  t.nextTick = process.nextTick, typeof setImmediate == "function" ? t.setImmediate = setImmediate : t.setImmediate = t.nextTick;
@@ -10488,14 +10543,14 @@ function we() {
10488
10543
  return Math.max(G, Y.length);
10489
10544
  }, 0);
10490
10545
  }
10491
- }, pr.exports;
10546
+ }, mr.exports;
10492
10547
  }
10493
- var mr, Pi;
10494
- function hi() {
10495
- if (Pi) return mr;
10496
- Pi = 1;
10548
+ var vr, zi;
10549
+ function gi() {
10550
+ if (zi) return vr;
10551
+ zi = 1;
10497
10552
  var o = xe();
10498
- we(), mr = o.cipher = o.cipher || {}, o.cipher.algorithms = o.cipher.algorithms || {}, o.cipher.createCipher = function(t, r) {
10553
+ we(), vr = o.cipher = o.cipher || {}, o.cipher.algorithms = o.cipher.algorithms || {}, o.cipher.createCipher = function(t, r) {
10499
10554
  var n = t;
10500
10555
  if (typeof n == "string" && (n = o.cipher.getAlgorithm(n), n && (n = n())), !n)
10501
10556
  throw new Error("Unsupported algorithm: " + t);
@@ -10539,15 +10594,15 @@ function hi() {
10539
10594
  });
10540
10595
  var r = {};
10541
10596
  return r.decrypt = this._decrypt, r.overflow = this._input.length() % this.blockSize, !(!this._decrypt && this.mode.pad && !this.mode.pad(this._input, r) || (this._finish = !0, this.update(), this._decrypt && this.mode.unpad && !this.mode.unpad(this.output, r)) || this.mode.afterFinish && !this.mode.afterFinish(this.output, r));
10542
- }, mr;
10597
+ }, vr;
10543
10598
  }
10544
- var yr = { exports: {} }, Ui;
10545
- function Dn() {
10546
- if (Ui) return yr.exports;
10547
- Ui = 1;
10599
+ var xr = { exports: {} }, Ki;
10600
+ function Kn() {
10601
+ if (Ki) return xr.exports;
10602
+ Ki = 1;
10548
10603
  var o = xe();
10549
10604
  we(), o.cipher = o.cipher || {};
10550
- var e = yr.exports = o.cipher.modes = o.cipher.modes || {};
10605
+ var e = xr.exports = o.cipher.modes = o.cipher.modes || {};
10551
10606
  e.ecb = function(s) {
10552
10607
  s = s || {}, this.name = "ECB", this.cipher = s.cipher, this.blockSize = s.blockSize || 16, this._ints = this.blockSize / 4, this._inBlock = new Array(this._ints), this._outBlock = new Array(this._ints);
10553
10608
  }, e.ecb.prototype.start = function(s) {
@@ -10883,14 +10938,14 @@ function Dn() {
10883
10938
  function n(s) {
10884
10939
  return [s / 4294967296 | 0, s & 4294967295];
10885
10940
  }
10886
- return yr.exports;
10941
+ return xr.exports;
10887
10942
  }
10888
- var vr, Vi;
10943
+ var Cr, Hi;
10889
10944
  function bt() {
10890
- if (Vi) return vr;
10891
- Vi = 1;
10945
+ if (Hi) return Cr;
10946
+ Hi = 1;
10892
10947
  var o = xe();
10893
- hi(), Dn(), we(), vr = o.aes = o.aes || {}, o.aes.startEncrypting = function(h, m, d, y) {
10948
+ gi(), Kn(), we(), Cr = o.aes = o.aes || {}, o.aes.startEncrypting = function(h, m, d, y) {
10894
10949
  var u = x({
10895
10950
  key: h,
10896
10951
  output: d,
@@ -11023,30 +11078,30 @@ function bt() {
11023
11078
  E instanceof o.util.ByteBuffer && (T = E, E = {}), E = E || {}, E.output = T, E.iv = v, u.call(y, E);
11024
11079
  }, y;
11025
11080
  }
11026
- return vr;
11081
+ return Cr;
11027
11082
  }
11028
- var xr = { exports: {} }, Cr = { exports: {} }, br = { exports: {} }, Oi;
11083
+ var br = { exports: {} }, Er = { exports: {} }, wr = { exports: {} }, Gi;
11029
11084
  function Et() {
11030
- if (Oi) return br.exports;
11031
- Oi = 1;
11085
+ if (Gi) return wr.exports;
11086
+ Gi = 1;
11032
11087
  var o = xe();
11033
11088
  o.pki = o.pki || {};
11034
- var e = br.exports = o.pki.oids = o.oids = o.oids || {};
11089
+ var e = wr.exports = o.pki.oids = o.oids = o.oids || {};
11035
11090
  function t(n, s) {
11036
11091
  e[n] = s, e[s] = n;
11037
11092
  }
11038
11093
  function r(n, s) {
11039
11094
  e[n] = s;
11040
11095
  }
11041
- return t("1.2.840.113549.1.1.1", "rsaEncryption"), t("1.2.840.113549.1.1.4", "md5WithRSAEncryption"), t("1.2.840.113549.1.1.5", "sha1WithRSAEncryption"), t("1.2.840.113549.1.1.7", "RSAES-OAEP"), t("1.2.840.113549.1.1.8", "mgf1"), t("1.2.840.113549.1.1.9", "pSpecified"), t("1.2.840.113549.1.1.10", "RSASSA-PSS"), t("1.2.840.113549.1.1.11", "sha256WithRSAEncryption"), t("1.2.840.113549.1.1.12", "sha384WithRSAEncryption"), t("1.2.840.113549.1.1.13", "sha512WithRSAEncryption"), t("1.3.101.112", "EdDSA25519"), t("1.2.840.10040.4.3", "dsa-with-sha1"), t("1.3.14.3.2.7", "desCBC"), t("1.3.14.3.2.26", "sha1"), t("1.3.14.3.2.29", "sha1WithRSASignature"), t("2.16.840.1.101.3.4.2.1", "sha256"), t("2.16.840.1.101.3.4.2.2", "sha384"), t("2.16.840.1.101.3.4.2.3", "sha512"), t("2.16.840.1.101.3.4.2.4", "sha224"), t("2.16.840.1.101.3.4.2.5", "sha512-224"), t("2.16.840.1.101.3.4.2.6", "sha512-256"), t("1.2.840.113549.2.2", "md2"), t("1.2.840.113549.2.5", "md5"), t("1.2.840.113549.1.7.1", "data"), t("1.2.840.113549.1.7.2", "signedData"), t("1.2.840.113549.1.7.3", "envelopedData"), t("1.2.840.113549.1.7.4", "signedAndEnvelopedData"), t("1.2.840.113549.1.7.5", "digestedData"), t("1.2.840.113549.1.7.6", "encryptedData"), t("1.2.840.113549.1.9.1", "emailAddress"), t("1.2.840.113549.1.9.2", "unstructuredName"), t("1.2.840.113549.1.9.3", "contentType"), t("1.2.840.113549.1.9.4", "messageDigest"), t("1.2.840.113549.1.9.5", "signingTime"), t("1.2.840.113549.1.9.6", "counterSignature"), t("1.2.840.113549.1.9.7", "challengePassword"), t("1.2.840.113549.1.9.8", "unstructuredAddress"), t("1.2.840.113549.1.9.14", "extensionRequest"), t("1.2.840.113549.1.9.20", "friendlyName"), t("1.2.840.113549.1.9.21", "localKeyId"), t("1.2.840.113549.1.9.22.1", "x509Certificate"), t("1.2.840.113549.1.12.10.1.1", "keyBag"), t("1.2.840.113549.1.12.10.1.2", "pkcs8ShroudedKeyBag"), t("1.2.840.113549.1.12.10.1.3", "certBag"), t("1.2.840.113549.1.12.10.1.4", "crlBag"), t("1.2.840.113549.1.12.10.1.5", "secretBag"), t("1.2.840.113549.1.12.10.1.6", "safeContentsBag"), t("1.2.840.113549.1.5.13", "pkcs5PBES2"), t("1.2.840.113549.1.5.12", "pkcs5PBKDF2"), t("1.2.840.113549.1.12.1.1", "pbeWithSHAAnd128BitRC4"), t("1.2.840.113549.1.12.1.2", "pbeWithSHAAnd40BitRC4"), t("1.2.840.113549.1.12.1.3", "pbeWithSHAAnd3-KeyTripleDES-CBC"), t("1.2.840.113549.1.12.1.4", "pbeWithSHAAnd2-KeyTripleDES-CBC"), t("1.2.840.113549.1.12.1.5", "pbeWithSHAAnd128BitRC2-CBC"), t("1.2.840.113549.1.12.1.6", "pbewithSHAAnd40BitRC2-CBC"), t("1.2.840.113549.2.7", "hmacWithSHA1"), t("1.2.840.113549.2.8", "hmacWithSHA224"), t("1.2.840.113549.2.9", "hmacWithSHA256"), t("1.2.840.113549.2.10", "hmacWithSHA384"), t("1.2.840.113549.2.11", "hmacWithSHA512"), t("1.2.840.113549.3.7", "des-EDE3-CBC"), t("2.16.840.1.101.3.4.1.2", "aes128-CBC"), t("2.16.840.1.101.3.4.1.22", "aes192-CBC"), t("2.16.840.1.101.3.4.1.42", "aes256-CBC"), t("2.5.4.3", "commonName"), t("2.5.4.4", "surname"), t("2.5.4.5", "serialNumber"), t("2.5.4.6", "countryName"), t("2.5.4.7", "localityName"), t("2.5.4.8", "stateOrProvinceName"), t("2.5.4.9", "streetAddress"), t("2.5.4.10", "organizationName"), t("2.5.4.11", "organizationalUnitName"), t("2.5.4.12", "title"), t("2.5.4.13", "description"), t("2.5.4.15", "businessCategory"), t("2.5.4.17", "postalCode"), t("2.5.4.42", "givenName"), t("2.5.4.65", "pseudonym"), t("1.3.6.1.4.1.311.60.2.1.2", "jurisdictionOfIncorporationStateOrProvinceName"), t("1.3.6.1.4.1.311.60.2.1.3", "jurisdictionOfIncorporationCountryName"), t("2.16.840.1.113730.1.1", "nsCertType"), t("2.16.840.1.113730.1.13", "nsComment"), r("2.5.29.1", "authorityKeyIdentifier"), r("2.5.29.2", "keyAttributes"), r("2.5.29.3", "certificatePolicies"), r("2.5.29.4", "keyUsageRestriction"), r("2.5.29.5", "policyMapping"), r("2.5.29.6", "subtreesConstraint"), r("2.5.29.7", "subjectAltName"), r("2.5.29.8", "issuerAltName"), r("2.5.29.9", "subjectDirectoryAttributes"), r("2.5.29.10", "basicConstraints"), r("2.5.29.11", "nameConstraints"), r("2.5.29.12", "policyConstraints"), r("2.5.29.13", "basicConstraints"), t("2.5.29.14", "subjectKeyIdentifier"), t("2.5.29.15", "keyUsage"), r("2.5.29.16", "privateKeyUsagePeriod"), t("2.5.29.17", "subjectAltName"), t("2.5.29.18", "issuerAltName"), t("2.5.29.19", "basicConstraints"), r("2.5.29.20", "cRLNumber"), r("2.5.29.21", "cRLReason"), r("2.5.29.22", "expirationDate"), r("2.5.29.23", "instructionCode"), r("2.5.29.24", "invalidityDate"), r("2.5.29.25", "cRLDistributionPoints"), r("2.5.29.26", "issuingDistributionPoint"), r("2.5.29.27", "deltaCRLIndicator"), r("2.5.29.28", "issuingDistributionPoint"), r("2.5.29.29", "certificateIssuer"), r("2.5.29.30", "nameConstraints"), t("2.5.29.31", "cRLDistributionPoints"), t("2.5.29.32", "certificatePolicies"), r("2.5.29.33", "policyMappings"), r("2.5.29.34", "policyConstraints"), t("2.5.29.35", "authorityKeyIdentifier"), r("2.5.29.36", "policyConstraints"), t("2.5.29.37", "extKeyUsage"), r("2.5.29.46", "freshestCRL"), r("2.5.29.54", "inhibitAnyPolicy"), t("1.3.6.1.4.1.11129.2.4.2", "timestampList"), t("1.3.6.1.5.5.7.1.1", "authorityInfoAccess"), t("1.3.6.1.5.5.7.3.1", "serverAuth"), t("1.3.6.1.5.5.7.3.2", "clientAuth"), t("1.3.6.1.5.5.7.3.3", "codeSigning"), t("1.3.6.1.5.5.7.3.4", "emailProtection"), t("1.3.6.1.5.5.7.3.8", "timeStamping"), br.exports;
11096
+ return t("1.2.840.113549.1.1.1", "rsaEncryption"), t("1.2.840.113549.1.1.4", "md5WithRSAEncryption"), t("1.2.840.113549.1.1.5", "sha1WithRSAEncryption"), t("1.2.840.113549.1.1.7", "RSAES-OAEP"), t("1.2.840.113549.1.1.8", "mgf1"), t("1.2.840.113549.1.1.9", "pSpecified"), t("1.2.840.113549.1.1.10", "RSASSA-PSS"), t("1.2.840.113549.1.1.11", "sha256WithRSAEncryption"), t("1.2.840.113549.1.1.12", "sha384WithRSAEncryption"), t("1.2.840.113549.1.1.13", "sha512WithRSAEncryption"), t("1.3.101.112", "EdDSA25519"), t("1.2.840.10040.4.3", "dsa-with-sha1"), t("1.3.14.3.2.7", "desCBC"), t("1.3.14.3.2.26", "sha1"), t("1.3.14.3.2.29", "sha1WithRSASignature"), t("2.16.840.1.101.3.4.2.1", "sha256"), t("2.16.840.1.101.3.4.2.2", "sha384"), t("2.16.840.1.101.3.4.2.3", "sha512"), t("2.16.840.1.101.3.4.2.4", "sha224"), t("2.16.840.1.101.3.4.2.5", "sha512-224"), t("2.16.840.1.101.3.4.2.6", "sha512-256"), t("1.2.840.113549.2.2", "md2"), t("1.2.840.113549.2.5", "md5"), t("1.2.840.113549.1.7.1", "data"), t("1.2.840.113549.1.7.2", "signedData"), t("1.2.840.113549.1.7.3", "envelopedData"), t("1.2.840.113549.1.7.4", "signedAndEnvelopedData"), t("1.2.840.113549.1.7.5", "digestedData"), t("1.2.840.113549.1.7.6", "encryptedData"), t("1.2.840.113549.1.9.1", "emailAddress"), t("1.2.840.113549.1.9.2", "unstructuredName"), t("1.2.840.113549.1.9.3", "contentType"), t("1.2.840.113549.1.9.4", "messageDigest"), t("1.2.840.113549.1.9.5", "signingTime"), t("1.2.840.113549.1.9.6", "counterSignature"), t("1.2.840.113549.1.9.7", "challengePassword"), t("1.2.840.113549.1.9.8", "unstructuredAddress"), t("1.2.840.113549.1.9.14", "extensionRequest"), t("1.2.840.113549.1.9.20", "friendlyName"), t("1.2.840.113549.1.9.21", "localKeyId"), t("1.2.840.113549.1.9.22.1", "x509Certificate"), t("1.2.840.113549.1.12.10.1.1", "keyBag"), t("1.2.840.113549.1.12.10.1.2", "pkcs8ShroudedKeyBag"), t("1.2.840.113549.1.12.10.1.3", "certBag"), t("1.2.840.113549.1.12.10.1.4", "crlBag"), t("1.2.840.113549.1.12.10.1.5", "secretBag"), t("1.2.840.113549.1.12.10.1.6", "safeContentsBag"), t("1.2.840.113549.1.5.13", "pkcs5PBES2"), t("1.2.840.113549.1.5.12", "pkcs5PBKDF2"), t("1.2.840.113549.1.12.1.1", "pbeWithSHAAnd128BitRC4"), t("1.2.840.113549.1.12.1.2", "pbeWithSHAAnd40BitRC4"), t("1.2.840.113549.1.12.1.3", "pbeWithSHAAnd3-KeyTripleDES-CBC"), t("1.2.840.113549.1.12.1.4", "pbeWithSHAAnd2-KeyTripleDES-CBC"), t("1.2.840.113549.1.12.1.5", "pbeWithSHAAnd128BitRC2-CBC"), t("1.2.840.113549.1.12.1.6", "pbewithSHAAnd40BitRC2-CBC"), t("1.2.840.113549.2.7", "hmacWithSHA1"), t("1.2.840.113549.2.8", "hmacWithSHA224"), t("1.2.840.113549.2.9", "hmacWithSHA256"), t("1.2.840.113549.2.10", "hmacWithSHA384"), t("1.2.840.113549.2.11", "hmacWithSHA512"), t("1.2.840.113549.3.7", "des-EDE3-CBC"), t("2.16.840.1.101.3.4.1.2", "aes128-CBC"), t("2.16.840.1.101.3.4.1.22", "aes192-CBC"), t("2.16.840.1.101.3.4.1.42", "aes256-CBC"), t("2.5.4.3", "commonName"), t("2.5.4.4", "surname"), t("2.5.4.5", "serialNumber"), t("2.5.4.6", "countryName"), t("2.5.4.7", "localityName"), t("2.5.4.8", "stateOrProvinceName"), t("2.5.4.9", "streetAddress"), t("2.5.4.10", "organizationName"), t("2.5.4.11", "organizationalUnitName"), t("2.5.4.12", "title"), t("2.5.4.13", "description"), t("2.5.4.15", "businessCategory"), t("2.5.4.17", "postalCode"), t("2.5.4.42", "givenName"), t("2.5.4.65", "pseudonym"), t("1.3.6.1.4.1.311.60.2.1.2", "jurisdictionOfIncorporationStateOrProvinceName"), t("1.3.6.1.4.1.311.60.2.1.3", "jurisdictionOfIncorporationCountryName"), t("2.16.840.1.113730.1.1", "nsCertType"), t("2.16.840.1.113730.1.13", "nsComment"), r("2.5.29.1", "authorityKeyIdentifier"), r("2.5.29.2", "keyAttributes"), r("2.5.29.3", "certificatePolicies"), r("2.5.29.4", "keyUsageRestriction"), r("2.5.29.5", "policyMapping"), r("2.5.29.6", "subtreesConstraint"), r("2.5.29.7", "subjectAltName"), r("2.5.29.8", "issuerAltName"), r("2.5.29.9", "subjectDirectoryAttributes"), r("2.5.29.10", "basicConstraints"), r("2.5.29.11", "nameConstraints"), r("2.5.29.12", "policyConstraints"), r("2.5.29.13", "basicConstraints"), t("2.5.29.14", "subjectKeyIdentifier"), t("2.5.29.15", "keyUsage"), r("2.5.29.16", "privateKeyUsagePeriod"), t("2.5.29.17", "subjectAltName"), t("2.5.29.18", "issuerAltName"), t("2.5.29.19", "basicConstraints"), r("2.5.29.20", "cRLNumber"), r("2.5.29.21", "cRLReason"), r("2.5.29.22", "expirationDate"), r("2.5.29.23", "instructionCode"), r("2.5.29.24", "invalidityDate"), r("2.5.29.25", "cRLDistributionPoints"), r("2.5.29.26", "issuingDistributionPoint"), r("2.5.29.27", "deltaCRLIndicator"), r("2.5.29.28", "issuingDistributionPoint"), r("2.5.29.29", "certificateIssuer"), r("2.5.29.30", "nameConstraints"), t("2.5.29.31", "cRLDistributionPoints"), t("2.5.29.32", "certificatePolicies"), r("2.5.29.33", "policyMappings"), r("2.5.29.34", "policyConstraints"), t("2.5.29.35", "authorityKeyIdentifier"), r("2.5.29.36", "policyConstraints"), t("2.5.29.37", "extKeyUsage"), r("2.5.29.46", "freshestCRL"), r("2.5.29.54", "inhibitAnyPolicy"), t("1.3.6.1.4.1.11129.2.4.2", "timestampList"), t("1.3.6.1.5.5.7.1.1", "authorityInfoAccess"), t("1.3.6.1.5.5.7.3.1", "serverAuth"), t("1.3.6.1.5.5.7.3.2", "clientAuth"), t("1.3.6.1.5.5.7.3.3", "codeSigning"), t("1.3.6.1.5.5.7.3.4", "emailProtection"), t("1.3.6.1.5.5.7.3.8", "timeStamping"), wr.exports;
11042
11097
  }
11043
- var Fi;
11098
+ var Wi;
11044
11099
  function dt() {
11045
- if (Fi) return Cr.exports;
11046
- Fi = 1;
11100
+ if (Wi) return Er.exports;
11101
+ Wi = 1;
11047
11102
  var o = xe();
11048
11103
  we(), Et();
11049
- var e = Cr.exports = o.asn1 = o.asn1 || {};
11104
+ var e = Er.exports = o.asn1 = o.asn1 || {};
11050
11105
  e.Class = {
11051
11106
  UNIVERSAL: 0,
11052
11107
  APPLICATION: 64,
@@ -11514,22 +11569,22 @@ function dt() {
11514
11569
  else a.type === e.Type.PRINTABLESTRING || a.type === e.Type.IA5String ? c += a.value : s.test(a.value) ? c += "0x" + o.util.bytesToHex(a.value) : a.value.length === 0 ? c += "[null]" : c += a.value;
11515
11570
  }
11516
11571
  return c;
11517
- }, Cr.exports;
11572
+ }, Er.exports;
11518
11573
  }
11519
- var Er = { exports: {} }, wr, zi;
11574
+ var Sr = { exports: {} }, Tr, ji;
11520
11575
  function gt() {
11521
- if (zi) return wr;
11522
- zi = 1;
11576
+ if (ji) return Tr;
11577
+ ji = 1;
11523
11578
  var o = xe();
11524
- return wr = o.md = o.md || {}, o.md.algorithms = o.md.algorithms || {}, wr;
11579
+ return Tr = o.md = o.md || {}, o.md.algorithms = o.md.algorithms || {}, Tr;
11525
11580
  }
11526
- var Ki;
11581
+ var qi;
11527
11582
  function Pt() {
11528
- if (Ki) return Er.exports;
11529
- Ki = 1;
11583
+ if (qi) return Sr.exports;
11584
+ qi = 1;
11530
11585
  var o = xe();
11531
11586
  gt(), we();
11532
- var e = Er.exports = o.hmac = o.hmac || {};
11587
+ var e = Sr.exports = o.hmac = o.hmac || {};
11533
11588
  return e.create = function() {
11534
11589
  var t = null, r = null, n = null, s = null, a = {};
11535
11590
  return a.start = function(i, l) {
@@ -11570,15 +11625,15 @@ function Pt() {
11570
11625
  var i = r.digest().bytes();
11571
11626
  return r.start(), r.update(s), r.update(i), r.digest();
11572
11627
  }, a.digest = a.getMac, a;
11573
- }, Er.exports;
11628
+ }, Sr.exports;
11574
11629
  }
11575
- var Sr = { exports: {} }, Hi;
11576
- function di() {
11577
- if (Hi) return Sr.exports;
11578
- Hi = 1;
11630
+ var Ar = { exports: {} }, Yi;
11631
+ function mi() {
11632
+ if (Yi) return Ar.exports;
11633
+ Yi = 1;
11579
11634
  var o = xe();
11580
11635
  gt(), we();
11581
- var e = Sr.exports = o.md5 = o.md5 || {};
11636
+ var e = Ar.exports = o.md5 = o.md5 || {};
11582
11637
  o.md.md5 = o.md.algorithms.md5 = e, e.create = function() {
11583
11638
  a || i();
11584
11639
  var c = null, p = o.util.createBuffer(), b = new Array(16), x = {
@@ -11777,15 +11832,15 @@ function di() {
11777
11832
  c.h0 = c.h0 + h | 0, c.h1 = c.h1 + m | 0, c.h2 = c.h2 + d | 0, c.h3 = c.h3 + y | 0, T -= 64;
11778
11833
  }
11779
11834
  }
11780
- return Sr.exports;
11835
+ return Ar.exports;
11781
11836
  }
11782
- var Tr = { exports: {} }, Gi;
11837
+ var _r = { exports: {} }, $i;
11783
11838
  function Tt() {
11784
- if (Gi) return Tr.exports;
11785
- Gi = 1;
11839
+ if ($i) return _r.exports;
11840
+ $i = 1;
11786
11841
  var o = xe();
11787
11842
  we();
11788
- var e = Tr.exports = o.pem = o.pem || {};
11843
+ var e = _r.exports = o.pem = o.pem || {};
11789
11844
  e.encode = function(n, s) {
11790
11845
  s = s || {};
11791
11846
  var a = "-----BEGIN " + n.type + `-----\r
@@ -11869,14 +11924,14 @@ function Tt() {
11869
11924
  function r(n) {
11870
11925
  return n.replace(/^\s+/, "");
11871
11926
  }
11872
- return Tr.exports;
11927
+ return _r.exports;
11873
11928
  }
11874
- var Ar = { exports: {} }, _r, Wi;
11875
- function nr() {
11876
- if (Wi) return _r;
11877
- Wi = 1;
11929
+ var Ir = { exports: {} }, kr, Zi;
11930
+ function ar() {
11931
+ if (Zi) return kr;
11932
+ Zi = 1;
11878
11933
  var o = xe();
11879
- hi(), Dn(), we(), _r = o.des = o.des || {}, o.des.startEncrypting = function(h, m, d, y) {
11934
+ gi(), Kn(), we(), kr = o.des = o.des || {}, o.des.startEncrypting = function(h, m, d, y) {
11880
11935
  var u = x({
11881
11936
  key: h,
11882
11937
  output: d,
@@ -11970,20 +12025,20 @@ function nr() {
11970
12025
  E instanceof o.util.ByteBuffer && (T = E, E = {}), E = E || {}, E.output = T, E.iv = v, u.call(y, E);
11971
12026
  }, y;
11972
12027
  }
11973
- return _r;
12028
+ return kr;
11974
12029
  }
11975
- const Ao = {}, _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12030
+ const Vo = {}, Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11976
12031
  __proto__: null,
11977
- default: Ao
11978
- }, Symbol.toStringTag, { value: "Module" })), fi = /* @__PURE__ */ vs(_o);
11979
- var Ir, ji;
11980
- function pi() {
11981
- if (ji) return Ir;
11982
- ji = 1;
12032
+ default: Vo
12033
+ }, Symbol.toStringTag, { value: "Module" })), yi = /* @__PURE__ */ As(Oo);
12034
+ var Br, Xi;
12035
+ function vi() {
12036
+ if (Xi) return Br;
12037
+ Xi = 1;
11983
12038
  var o = xe();
11984
12039
  Pt(), gt(), we();
11985
12040
  var e = o.pkcs5 = o.pkcs5 || {}, t;
11986
- return o.util.isNodejs && !o.options.usePureJavaScript && (t = fi), Ir = o.pbkdf2 = e.pbkdf2 = function(r, n, s, a, i, l) {
12041
+ return o.util.isNodejs && !o.options.usePureJavaScript && (t = yi), Br = o.pbkdf2 = e.pbkdf2 = function(r, n, s, a, i, l) {
11987
12042
  if (typeof i == "function" && (l = i, i = null), o.util.isNodejs && !o.options.usePureJavaScript && t.pbkdf2 && (i === null || typeof i != "object") && (t.pbkdf2Sync.length > 4 || !i || i === "sha1"))
11988
12043
  return typeof i != "string" && (i = "sha1"), r = Buffer.from(r, "binary"), n = Buffer.from(n, "binary"), l ? t.pbkdf2Sync.length === 4 ? t.pbkdf2(r, n, s, a, function(w, g) {
11989
12044
  if (w)
@@ -12030,15 +12085,15 @@ function pi() {
12030
12085
  m += v < b ? d : d.substr(0, x), ++v, T();
12031
12086
  }
12032
12087
  T();
12033
- }, Ir;
12088
+ }, Br;
12034
12089
  }
12035
- var qt = { exports: {} }, kr = { exports: {} }, qi;
12036
- function Pn() {
12037
- if (qi) return kr.exports;
12038
- qi = 1;
12090
+ var qt = { exports: {} }, Mr = { exports: {} }, Qi;
12091
+ function Hn() {
12092
+ if (Qi) return Mr.exports;
12093
+ Qi = 1;
12039
12094
  var o = xe();
12040
12095
  gt(), we();
12041
- var e = kr.exports = o.sha256 = o.sha256 || {};
12096
+ var e = Mr.exports = o.sha256 = o.sha256 || {};
12042
12097
  o.md.sha256 = o.md.algorithms.sha256 = e, e.create = function() {
12043
12098
  r || s();
12044
12099
  var i = null, l = o.util.createBuffer(), c = new Array(64), p = {
@@ -12176,17 +12231,17 @@ function Pn() {
12176
12231
  i.h0 = i.h0 + u | 0, i.h1 = i.h1 + v | 0, i.h2 = i.h2 + E | 0, i.h3 = i.h3 + T | 0, i.h4 = i.h4 + _ | 0, i.h5 = i.h5 + w | 0, i.h6 = i.h6 + g | 0, i.h7 = i.h7 + f | 0, k -= 64;
12177
12232
  }
12178
12233
  }
12179
- return kr.exports;
12234
+ return Mr.exports;
12180
12235
  }
12181
- var Br = { exports: {} }, Yi;
12182
- function Un() {
12183
- if (Yi) return Br.exports;
12184
- Yi = 1;
12236
+ var Lr = { exports: {} }, Ji;
12237
+ function Gn() {
12238
+ if (Ji) return Lr.exports;
12239
+ Ji = 1;
12185
12240
  var o = xe();
12186
12241
  we();
12187
12242
  var e = null;
12188
- o.util.isNodejs && !o.options.usePureJavaScript && !process.versions["node-webkit"] && (e = fi);
12189
- var t = Br.exports = o.prng = o.prng || {};
12243
+ o.util.isNodejs && !o.options.usePureJavaScript && !process.versions["node-webkit"] && (e = yi);
12244
+ var t = Lr.exports = o.prng = o.prng || {};
12190
12245
  return t.create = function(r) {
12191
12246
  for (var n = {
12192
12247
  plugin: r,
@@ -12320,14 +12375,14 @@ function Un() {
12320
12375
  x.addEventListener("message", h);
12321
12376
  }
12322
12377
  }, n;
12323
- }, Br.exports;
12378
+ }, Lr.exports;
12324
12379
  }
12325
- var $i;
12380
+ var en;
12326
12381
  function ht() {
12327
- if ($i) return qt.exports;
12328
- $i = 1;
12382
+ if (en) return qt.exports;
12383
+ en = 1;
12329
12384
  var o = xe();
12330
- return bt(), Pn(), Un(), we(), (function() {
12385
+ return bt(), Hn(), Gn(), we(), (function() {
12331
12386
  if (o.random && o.random.getBytes) {
12332
12387
  qt.exports = o.random;
12333
12388
  return;
@@ -12381,10 +12436,10 @@ function ht() {
12381
12436
  })(typeof jQuery < "u" ? jQuery : null);
12382
12437
  })(), qt.exports;
12383
12438
  }
12384
- var Mr, Zi;
12385
- function Vn() {
12386
- if (Zi) return Mr;
12387
- Zi = 1;
12439
+ var Rr, tn;
12440
+ function Wn() {
12441
+ if (tn) return Rr;
12442
+ tn = 1;
12388
12443
  var o = xe();
12389
12444
  we();
12390
12445
  var e = [
@@ -12649,7 +12704,7 @@ function Vn() {
12649
12704
  }, n = function(a, i) {
12650
12705
  return (a & 65535) >> i | a << 16 - i & 65535;
12651
12706
  };
12652
- Mr = o.rc2 = o.rc2 || {}, o.rc2.expandKey = function(a, i) {
12707
+ Rr = o.rc2 = o.rc2 || {}, o.rc2.expandKey = function(a, i) {
12653
12708
  typeof a == "string" && (a = o.util.createBuffer(a)), i = i || 128;
12654
12709
  var l = a, c = a.length(), p = i, b = Math.ceil(p / 8), x = 255 >> (p & 7), h;
12655
12710
  for (h = c; h < 128; h++)
@@ -12755,14 +12810,14 @@ function Vn() {
12755
12810
  return c.start(i, l), c;
12756
12811
  }, o.rc2.createDecryptionCipher = function(a, i) {
12757
12812
  return s(a, i, !1);
12758
- }, Mr;
12813
+ }, Rr;
12759
12814
  }
12760
- var Lr, Xi;
12761
- function sr() {
12762
- if (Xi) return Lr;
12763
- Xi = 1;
12815
+ var Nr, rn;
12816
+ function or() {
12817
+ if (rn) return Nr;
12818
+ rn = 1;
12764
12819
  var o = xe();
12765
- Lr = o.jsbn = o.jsbn || {};
12820
+ Nr = o.jsbn = o.jsbn || {};
12766
12821
  var e;
12767
12822
  function t(M, D, K) {
12768
12823
  this.data = [], M != null && (typeof M == "number" ? this.fromNumber(M, D, K) : D == null && typeof M != "string" ? this.fromString(M, 256) : this.fromString(M, D));
@@ -12954,9 +13009,9 @@ function sr() {
12954
13009
  var rt = nt * (1 << this.F1) + (Ze > 1 ? ue.data[Ze - 2] >> this.F2 : 0), ft = this.FV / rt, Ot = (1 << this.F1) / rt, ct = 1 << this.F2, ut = K.t, Ft = ut - Ze, mt = D ?? r();
12955
13010
  for (ue.dlShiftTo(Ft, mt), K.compareTo(mt) >= 0 && (K.data[K.t++] = 1, K.subTo(mt, K)), t.ONE.dlShiftTo(Ze, mt), mt.subTo(ue, ue); ue.t < Ze; ) ue.data[ue.t++] = 0;
12956
13011
  for (; --Ft >= 0; ) {
12957
- var or = K.data[--ut] == nt ? this.DM : Math.floor(K.data[ut] * ft + (K.data[ut - 1] + ct) * Ot);
12958
- if ((K.data[ut] += ue.am(0, or, K, Ft, 0, Ze)) < or)
12959
- for (ue.dlShiftTo(Ft, mt), K.subTo(mt, K); K.data[ut] < --or; ) K.subTo(mt, K);
13012
+ var cr = K.data[--ut] == nt ? this.DM : Math.floor(K.data[ut] * ft + (K.data[ut - 1] + ct) * Ot);
13013
+ if ((K.data[ut] += ue.am(0, cr, K, Ft, 0, Ze)) < cr)
13014
+ for (ue.dlShiftTo(Ft, mt), K.subTo(mt, K); K.data[ut] < --cr; ) K.subTo(mt, K);
12960
13015
  }
12961
13016
  D != null && (K.drShiftTo(Ze, D), ge != fe && t.ZERO.subTo(D, D)), K.t = Ze, K.clamp(), Ae > 0 && K.rShiftTo(Ae, K), ge < 0 && t.ZERO.subTo(K, K);
12962
13017
  }
@@ -13265,10 +13320,10 @@ function sr() {
13265
13320
  M.squareTo(D);
13266
13321
  }
13267
13322
  ke.prototype.convert = Ne, ke.prototype.revert = Ne, ke.prototype.mulTo = Ye, ke.prototype.sqrTo = $e;
13268
- function $n(M) {
13323
+ function rs(M) {
13269
13324
  return this.exp(M, new ke());
13270
13325
  }
13271
- function Zn(M, D, K) {
13326
+ function is(M, D, K) {
13272
13327
  var X = Math.min(this.t + M.t, D);
13273
13328
  for (K.s = 0, K.t = X; X > 0; ) K.data[--X] = 0;
13274
13329
  var se;
@@ -13276,7 +13331,7 @@ function sr() {
13276
13331
  for (se = Math.min(M.t, D); X < se; ++X) this.am(0, M.data[X], K, X, 0, D - X);
13277
13332
  K.clamp();
13278
13333
  }
13279
- function Xn(M, D, K) {
13334
+ function ns(M, D, K) {
13280
13335
  --D;
13281
13336
  var X = K.t = this.t + M.t - D;
13282
13337
  for (K.s = 0; --X >= 0; ) K.data[X] = 0;
@@ -13287,27 +13342,27 @@ function sr() {
13287
13342
  function wt(M) {
13288
13343
  this.r2 = r(), this.q3 = r(), t.ONE.dlShiftTo(2 * M.t, this.r2), this.mu = this.r2.divide(M), this.m = M;
13289
13344
  }
13290
- function Qn(M) {
13345
+ function ss(M) {
13291
13346
  if (M.s < 0 || M.t > 2 * this.m.t) return M.mod(this.m);
13292
13347
  if (M.compareTo(this.m) < 0) return M;
13293
13348
  var D = r();
13294
13349
  return M.copyTo(D), this.reduce(D), D;
13295
13350
  }
13296
- function Jn(M) {
13351
+ function as(M) {
13297
13352
  return M;
13298
13353
  }
13299
- function es(M) {
13354
+ function os(M) {
13300
13355
  for (M.drShiftTo(this.m.t - 1, this.r2), M.t > this.m.t + 1 && (M.t = this.m.t + 1, M.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); M.compareTo(this.r2) < 0; ) M.dAddOffset(1, this.m.t + 1);
13301
13356
  for (M.subTo(this.r2, M); M.compareTo(this.m) >= 0; ) M.subTo(this.m, M);
13302
13357
  }
13303
- function ts(M, D) {
13358
+ function ls(M, D) {
13304
13359
  M.squareTo(D), this.reduce(D);
13305
13360
  }
13306
- function rs(M, D, K) {
13361
+ function cs(M, D, K) {
13307
13362
  M.multiplyTo(D, K), this.reduce(K);
13308
13363
  }
13309
- wt.prototype.convert = Qn, wt.prototype.revert = Jn, wt.prototype.reduce = es, wt.prototype.mulTo = rs, wt.prototype.sqrTo = ts;
13310
- function is(M, D) {
13364
+ wt.prototype.convert = ss, wt.prototype.revert = as, wt.prototype.reduce = os, wt.prototype.mulTo = cs, wt.prototype.sqrTo = ls;
13365
+ function us(M, D) {
13311
13366
  var K = M.bitLength(), X, se = y(1), ue;
13312
13367
  if (K <= 0) return se;
13313
13368
  K < 18 ? X = 1 : K < 48 ? X = 3 : K < 144 ? X = 4 : K < 768 ? X = 5 : X = 6, K < 8 ? ue = new ie(D) : D.isEven() ? ue = new wt(D) : ue = new te(D);
@@ -13333,7 +13388,7 @@ function sr() {
13333
13388
  }
13334
13389
  return ue.revert(se);
13335
13390
  }
13336
- function ns(M) {
13391
+ function hs(M) {
13337
13392
  var D = this.s < 0 ? this.negate() : this.clone(), K = M.s < 0 ? M.negate() : M.clone();
13338
13393
  if (D.compareTo(K) < 0) {
13339
13394
  var X = D;
@@ -13345,7 +13400,7 @@ function sr() {
13345
13400
  (se = D.getLowestSetBit()) > 0 && D.rShiftTo(se, D), (se = K.getLowestSetBit()) > 0 && K.rShiftTo(se, K), D.compareTo(K) >= 0 ? (D.subTo(K, D), D.rShiftTo(1, D)) : (K.subTo(D, K), K.rShiftTo(1, K));
13346
13401
  return ue > 0 && K.lShiftTo(ue, K), K;
13347
13402
  }
13348
- function ss(M) {
13403
+ function ds(M) {
13349
13404
  if (M <= 0) return 0;
13350
13405
  var D = this.DV % M, K = this.s < 0 ? M - 1 : 0;
13351
13406
  if (this.t > 0)
@@ -13353,7 +13408,7 @@ function sr() {
13353
13408
  else for (var X = this.t - 1; X >= 0; --X) K = (D * K + this.data[X]) % M;
13354
13409
  return K;
13355
13410
  }
13356
- function as(M) {
13411
+ function fs(M) {
13357
13412
  if (this.signum() == 0)
13358
13413
  return t.ZERO;
13359
13414
  var D = M.isEven();
@@ -13371,8 +13426,8 @@ function sr() {
13371
13426
  else return fe;
13372
13427
  return fe.signum() < 0 ? fe.add(M) : fe;
13373
13428
  }
13374
- var lt = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], os = (1 << 26) / lt[lt.length - 1];
13375
- function ls(M) {
13429
+ var lt = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], ps = (1 << 26) / lt[lt.length - 1];
13430
+ function gs(M) {
13376
13431
  var D, K = this.abs();
13377
13432
  if (K.t == 1 && K.data[0] <= lt[lt.length - 1]) {
13378
13433
  for (D = 0; D < lt.length; ++D)
@@ -13381,15 +13436,15 @@ function sr() {
13381
13436
  }
13382
13437
  if (K.isEven()) return !1;
13383
13438
  for (D = 1; D < lt.length; ) {
13384
- for (var X = lt[D], se = D + 1; se < lt.length && X < os; ) X *= lt[se++];
13439
+ for (var X = lt[D], se = D + 1; se < lt.length && X < ps; ) X *= lt[se++];
13385
13440
  for (X = K.modInt(X); D < se; ) if (X % lt[D++] == 0) return !1;
13386
13441
  }
13387
13442
  return K.millerRabin(M);
13388
13443
  }
13389
- function cs(M) {
13444
+ function ms(M) {
13390
13445
  var D = this.subtract(t.ONE), K = D.getLowestSetBit();
13391
13446
  if (K <= 0) return !1;
13392
- for (var X = D.shiftRight(K), se = us(), ue, ge = 0; ge < M; ++ge) {
13447
+ for (var X = D.shiftRight(K), se = ys(), ue, ge = 0; ge < M; ++ge) {
13393
13448
  do
13394
13449
  ue = new t(this.bitLength(), se);
13395
13450
  while (ue.compareTo(t.ONE) <= 0 || ue.compareTo(D) >= 0);
@@ -13402,7 +13457,7 @@ function sr() {
13402
13457
  }
13403
13458
  return !0;
13404
13459
  }
13405
- function us() {
13460
+ function ys() {
13406
13461
  return {
13407
13462
  // x is an array to fill with bytes
13408
13463
  nextBytes: function(M) {
@@ -13411,15 +13466,15 @@ function sr() {
13411
13466
  }
13412
13467
  };
13413
13468
  }
13414
- return t.prototype.chunkSize = O, t.prototype.toRadix = Q, t.prototype.fromRadix = re, t.prototype.fromNumber = Z, t.prototype.bitwiseTo = ve, t.prototype.changeBit = At, t.prototype.addTo = Ve, t.prototype.dMultiply = je, t.prototype.dAddOffset = qe, t.prototype.multiplyLowerTo = Zn, t.prototype.multiplyUpperTo = Xn, t.prototype.modInt = ss, t.prototype.millerRabin = cs, t.prototype.clone = C, t.prototype.intValue = R, t.prototype.byteValue = W, t.prototype.shortValue = F, t.prototype.signum = z, t.prototype.toByteArray = ne, t.prototype.equals = he, t.prototype.min = oe, t.prototype.max = pe, t.prototype.and = be, t.prototype.or = Te, t.prototype.xor = Ce, t.prototype.andNot = De, t.prototype.not = Ie, t.prototype.shiftLeft = Xe, t.prototype.shiftRight = et, t.prototype.getLowestSetBit = st, t.prototype.bitCount = tt, t.prototype.testBit = ot, t.prototype.setBit = Vt, t.prototype.clearBit = Pe, t.prototype.flipBit = Ue, t.prototype.add = Oe, t.prototype.subtract = Fe, t.prototype.multiply = ze, t.prototype.divide = He, t.prototype.remainder = Ge, t.prototype.divideAndRemainder = We, t.prototype.modPow = is, t.prototype.modInverse = as, t.prototype.pow = $n, t.prototype.gcd = ns, t.prototype.isProbablePrime = ls, t.prototype.square = Ke, Lr;
13469
+ return t.prototype.chunkSize = O, t.prototype.toRadix = Q, t.prototype.fromRadix = re, t.prototype.fromNumber = Z, t.prototype.bitwiseTo = ve, t.prototype.changeBit = At, t.prototype.addTo = Ve, t.prototype.dMultiply = je, t.prototype.dAddOffset = qe, t.prototype.multiplyLowerTo = is, t.prototype.multiplyUpperTo = ns, t.prototype.modInt = ds, t.prototype.millerRabin = ms, t.prototype.clone = C, t.prototype.intValue = R, t.prototype.byteValue = W, t.prototype.shortValue = F, t.prototype.signum = z, t.prototype.toByteArray = ne, t.prototype.equals = he, t.prototype.min = oe, t.prototype.max = pe, t.prototype.and = be, t.prototype.or = Te, t.prototype.xor = Ce, t.prototype.andNot = De, t.prototype.not = Ie, t.prototype.shiftLeft = Xe, t.prototype.shiftRight = et, t.prototype.getLowestSetBit = st, t.prototype.bitCount = tt, t.prototype.testBit = ot, t.prototype.setBit = Vt, t.prototype.clearBit = Pe, t.prototype.flipBit = Ue, t.prototype.add = Oe, t.prototype.subtract = Fe, t.prototype.multiply = ze, t.prototype.divide = He, t.prototype.remainder = Ge, t.prototype.divideAndRemainder = We, t.prototype.modPow = us, t.prototype.modInverse = fs, t.prototype.pow = rs, t.prototype.gcd = hs, t.prototype.isProbablePrime = gs, t.prototype.square = Ke, Nr;
13415
13470
  }
13416
- var Rr = { exports: {} }, Nr = { exports: {} }, Qi;
13471
+ var Dr = { exports: {} }, Pr = { exports: {} }, nn;
13417
13472
  function Ut() {
13418
- if (Qi) return Nr.exports;
13419
- Qi = 1;
13473
+ if (nn) return Pr.exports;
13474
+ nn = 1;
13420
13475
  var o = xe();
13421
13476
  gt(), we();
13422
- var e = Nr.exports = o.sha1 = o.sha1 || {};
13477
+ var e = Pr.exports = o.sha1 = o.sha1 || {};
13423
13478
  o.md.sha1 = o.md.algorithms.sha1 = e, e.create = function() {
13424
13479
  r || n();
13425
13480
  var a = null, i = o.util.createBuffer(), l = new Array(80), c = {
@@ -13492,15 +13547,15 @@ function Ut() {
13492
13547
  a.h0 = a.h0 + p | 0, a.h1 = a.h1 + b | 0, a.h2 = a.h2 + x | 0, a.h3 = a.h3 + h | 0, a.h4 = a.h4 + m | 0, u -= 64;
13493
13548
  }
13494
13549
  }
13495
- return Nr.exports;
13550
+ return Pr.exports;
13496
13551
  }
13497
- var Ji;
13498
- function On() {
13499
- if (Ji) return Rr.exports;
13500
- Ji = 1;
13552
+ var sn;
13553
+ function jn() {
13554
+ if (sn) return Dr.exports;
13555
+ sn = 1;
13501
13556
  var o = xe();
13502
13557
  we(), ht(), Ut();
13503
- var e = Rr.exports = o.pkcs1 = o.pkcs1 || {};
13558
+ var e = Dr.exports = o.pkcs1 = o.pkcs1 || {};
13504
13559
  e.encode_rsa_oaep = function(r, n, s) {
13505
13560
  var a, i, l, c;
13506
13561
  typeof s == "string" ? (a = s, i = arguments[3] || void 0, l = arguments[4] || void 0) : s && (a = s.label || void 0, i = s.seed || void 0, l = s.md || void 0, s.mgf1 && s.mgf1.md && (c = s.mgf1.md)), l ? l.start() : l = o.md.sha1.create(), c || (c = l);
@@ -13555,14 +13610,14 @@ function On() {
13555
13610
  }
13556
13611
  return a.substring(0, n);
13557
13612
  }
13558
- return Rr.exports;
13613
+ return Dr.exports;
13559
13614
  }
13560
- var Yt = { exports: {} }, en;
13561
- function Fn() {
13562
- if (en) return Yt.exports;
13563
- en = 1;
13615
+ var Yt = { exports: {} }, an;
13616
+ function qn() {
13617
+ if (an) return Yt.exports;
13618
+ an = 1;
13564
13619
  var o = xe();
13565
- return we(), sr(), ht(), (function() {
13620
+ return we(), or(), ht(), (function() {
13566
13621
  if (o.prime) {
13567
13622
  Yt.exports = o.prime;
13568
13623
  return;
@@ -13650,15 +13705,15 @@ function Fn() {
13650
13705
  }
13651
13706
  })(), Yt.exports;
13652
13707
  }
13653
- var Dr, tn;
13654
- function ar() {
13655
- if (tn) return Dr;
13656
- tn = 1;
13708
+ var Ur, on;
13709
+ function lr() {
13710
+ if (on) return Ur;
13711
+ on = 1;
13657
13712
  var o = xe();
13658
- if (dt(), sr(), Et(), On(), Fn(), ht(), we(), typeof e > "u")
13713
+ if (dt(), or(), Et(), jn(), qn(), ht(), we(), typeof e > "u")
13659
13714
  var e = o.jsbn.BigInteger;
13660
- var t = o.util.isNodejs ? fi : null, r = o.asn1, n = o.util;
13661
- o.pki = o.pki || {}, Dr = o.pki.rsa = o.rsa = o.rsa || {};
13715
+ var t = o.util.isNodejs ? yi : null, r = o.asn1, n = o.util;
13716
+ o.pki = o.pki || {}, Ur = o.pki.rsa = o.rsa = o.rsa || {};
13662
13717
  var s = o.pki, a = [6, 4, 2, 4, 2, 4, 6, 2], i = {
13663
13718
  // PrivateKeyInfo
13664
13719
  name: "PrivateKeyInfo",
@@ -14506,17 +14561,17 @@ function ar() {
14506
14561
  k[L] = f.charCodeAt(L);
14507
14562
  return k;
14508
14563
  }
14509
- return Dr;
14564
+ return Ur;
14510
14565
  }
14511
- var Pr, rn;
14512
- function zn() {
14513
- if (rn) return Pr;
14514
- rn = 1;
14566
+ var Vr, ln;
14567
+ function Yn() {
14568
+ if (ln) return Vr;
14569
+ ln = 1;
14515
14570
  var o = xe();
14516
- if (bt(), dt(), nr(), gt(), Et(), pi(), Tt(), ht(), Vn(), ar(), we(), typeof e > "u")
14571
+ if (bt(), dt(), ar(), gt(), Et(), vi(), Tt(), ht(), Wn(), lr(), we(), typeof e > "u")
14517
14572
  var e = o.jsbn.BigInteger;
14518
14573
  var t = o.asn1, r = o.pki = o.pki || {};
14519
- Pr = r.pbe = o.pbe = o.pbe || {};
14574
+ Vr = r.pbe = o.pbe = o.pbe || {};
14520
14575
  var n = r.oids, s = {
14521
14576
  name: "EncryptedPrivateKeyInfo",
14522
14577
  tagClass: t.Class.UNIVERSAL,
@@ -15087,15 +15142,15 @@ function zn() {
15087
15142
  ])
15088
15143
  ), y;
15089
15144
  }
15090
- return Pr;
15145
+ return Vr;
15091
15146
  }
15092
- var Ur = { exports: {} }, Vr = { exports: {} }, nn;
15093
- function Kn() {
15094
- if (nn) return Vr.exports;
15095
- nn = 1;
15147
+ var Or = { exports: {} }, Fr = { exports: {} }, cn;
15148
+ function $n() {
15149
+ if (cn) return Fr.exports;
15150
+ cn = 1;
15096
15151
  var o = xe();
15097
15152
  dt(), we();
15098
- var e = o.asn1, t = Vr.exports = o.pkcs7asn1 = o.pkcs7asn1 || {};
15153
+ var e = o.asn1, t = Fr.exports = o.pkcs7asn1 = o.pkcs7asn1 || {};
15099
15154
  o.pkcs7 = o.pkcs7 || {}, o.pkcs7.asn1 = t;
15100
15155
  var r = {
15101
15156
  name: "ContentInfo",
@@ -15382,15 +15437,15 @@ function Kn() {
15382
15437
  constructed: !1,
15383
15438
  capture: "encKey"
15384
15439
  }]
15385
- }, Vr.exports;
15440
+ }, Fr.exports;
15386
15441
  }
15387
- var Or = { exports: {} }, Fr = { exports: {} }, sn;
15388
- function Hn() {
15389
- if (sn) return Fr.exports;
15390
- sn = 1;
15442
+ var zr = { exports: {} }, Kr = { exports: {} }, un;
15443
+ function Zn() {
15444
+ if (un) return Kr.exports;
15445
+ un = 1;
15391
15446
  var o = xe();
15392
15447
  we(), o.mgf = o.mgf || {};
15393
- var e = Fr.exports = o.mgf.mgf1 = o.mgf1 = o.mgf1 || {};
15448
+ var e = Kr.exports = o.mgf.mgf1 = o.mgf1 = o.mgf1 || {};
15394
15449
  return e.create = function(t) {
15395
15450
  var r = {
15396
15451
  /**
@@ -15409,22 +15464,22 @@ function Hn() {
15409
15464
  }
15410
15465
  };
15411
15466
  return r;
15412
- }, Fr.exports;
15467
+ }, Kr.exports;
15413
15468
  }
15414
- var zr, an;
15415
- function Io() {
15416
- if (an) return zr;
15417
- an = 1;
15469
+ var Hr, hn;
15470
+ function Fo() {
15471
+ if (hn) return Hr;
15472
+ hn = 1;
15418
15473
  var o = xe();
15419
- return Hn(), zr = o.mgf = o.mgf || {}, o.mgf.mgf1 = o.mgf1, zr;
15474
+ return Zn(), Hr = o.mgf = o.mgf || {}, o.mgf.mgf1 = o.mgf1, Hr;
15420
15475
  }
15421
- var Kr = { exports: {} }, on;
15422
- function gi() {
15423
- if (on) return Kr.exports;
15424
- on = 1;
15476
+ var Gr = { exports: {} }, dn;
15477
+ function xi() {
15478
+ if (dn) return Gr.exports;
15479
+ dn = 1;
15425
15480
  var o = xe();
15426
15481
  ht(), we();
15427
- var e = Kr.exports = o.pss = o.pss || {};
15482
+ var e = Gr.exports = o.pss = o.pss || {};
15428
15483
  return e.create = function(t) {
15429
15484
  arguments.length === 3 && (t = {
15430
15485
  md: arguments[0],
@@ -15482,15 +15537,15 @@ function gi() {
15482
15537
  var k = r.digest().getBytes();
15483
15538
  return v === k;
15484
15539
  }, c;
15485
- }, Kr.exports;
15540
+ }, Gr.exports;
15486
15541
  }
15487
- var ln;
15488
- function mi() {
15489
- if (ln) return Or.exports;
15490
- ln = 1;
15542
+ var fn;
15543
+ function Ci() {
15544
+ if (fn) return zr.exports;
15545
+ fn = 1;
15491
15546
  var o = xe();
15492
- bt(), dt(), nr(), gt(), Io(), Et(), Tt(), gi(), ar(), we();
15493
- var e = o.asn1, t = Or.exports = o.pki = o.pki || {}, r = t.oids, n = {};
15547
+ bt(), dt(), ar(), gt(), Fo(), Et(), Tt(), xi(), lr(), we();
15548
+ var e = o.asn1, t = zr.exports = o.pki = o.pki || {}, r = t.oids, n = {};
15494
15549
  n.CN = r.commonName, n.commonName = "CN", n.C = r.countryName, n.countryName = "C", n.L = r.localityName, n.localityName = "L", n.ST = r.stateOrProvinceName, n.stateOrProvinceName = "ST", n.O = r.organizationName, n.organizationName = "O", n.OU = r.organizationalUnitName, n.organizationalUnitName = "OU", n.E = r.emailAddress, n.emailAddress = "E";
15495
15550
  var s = o.pki.rsa.publicKeyValidator, a = {
15496
15551
  name: "Certificate",
@@ -16920,15 +16975,15 @@ function mi() {
16920
16975
  H = !1, ++V;
16921
16976
  } while (g.length > 0);
16922
16977
  return !0;
16923
- }, Or.exports;
16978
+ }, zr.exports;
16924
16979
  }
16925
- var cn;
16926
- function Gn() {
16927
- if (cn) return Ur.exports;
16928
- cn = 1;
16980
+ var pn;
16981
+ function Xn() {
16982
+ if (pn) return Or.exports;
16983
+ pn = 1;
16929
16984
  var o = xe();
16930
- dt(), Pt(), Et(), Kn(), zn(), ht(), ar(), Ut(), we(), mi();
16931
- var e = o.asn1, t = o.pki, r = Ur.exports = o.pkcs12 = o.pkcs12 || {}, n = {
16985
+ dt(), Pt(), Et(), $n(), Yn(), ht(), lr(), Ut(), we(), Ci();
16986
+ var e = o.asn1, t = o.pki, r = Or.exports = o.pkcs12 = o.pkcs12 || {}, n = {
16932
16987
  name: "ContentInfo",
16933
16988
  tagClass: e.Class.UNIVERSAL,
16934
16989
  type: e.Type.SEQUENCE,
@@ -17626,15 +17681,15 @@ function Gn() {
17626
17681
  ]),
17627
17682
  J
17628
17683
  ]);
17629
- }, r.generateKey = o.pbe.generatePkcs12Key, Ur.exports;
17684
+ }, r.generateKey = o.pbe.generatePkcs12Key, Or.exports;
17630
17685
  }
17631
- var un;
17632
- function Wn() {
17633
- if (un) return Ar.exports;
17634
- un = 1;
17686
+ var gn;
17687
+ function Qn() {
17688
+ if (gn) return Ir.exports;
17689
+ gn = 1;
17635
17690
  var o = xe();
17636
- dt(), Et(), zn(), Tt(), pi(), Gn(), gi(), ar(), we(), mi();
17637
- var e = o.asn1, t = Ar.exports = o.pki = o.pki || {};
17691
+ dt(), Et(), Yn(), Tt(), vi(), Xn(), xi(), lr(), we(), Ci();
17692
+ var e = o.asn1, t = Ir.exports = o.pki = o.pki || {};
17638
17693
  return t.pemToDer = function(r) {
17639
17694
  var n = o.pem.decode(r)[0];
17640
17695
  if (n.procType && n.procType.type === "ENCRYPTED")
@@ -17662,14 +17717,14 @@ function Wn() {
17662
17717
  body: e.toDer(r).getBytes()
17663
17718
  };
17664
17719
  return o.pem.encode(s, { maxline: n });
17665
- }, Ar.exports;
17720
+ }, Ir.exports;
17666
17721
  }
17667
- var Hr, hn;
17668
- function jn() {
17669
- if (hn) return Hr;
17670
- hn = 1;
17722
+ var Wr, mn;
17723
+ function Jn() {
17724
+ if (mn) return Wr;
17725
+ mn = 1;
17671
17726
  var o = xe();
17672
- dt(), Pt(), di(), Tt(), Wn(), ht(), Ut(), we();
17727
+ dt(), Pt(), mi(), Tt(), Qn(), ht(), Ut(), we();
17673
17728
  var e = function(B, U, P, N) {
17674
17729
  var S = o.util.createBuffer(), C = B.length >> 1, R = C + (B.length & 1), W = B.substr(0, R), F = B.substr(C, R), O = o.util.createBuffer(), z = o.hmac.create();
17675
17730
  P = U + P;
@@ -18950,18 +19005,18 @@ function jn() {
18950
19005
  description: i.Alert.Description.close_notify
18951
19006
  })), i.flush(R)), R.closed(R)), R.reset(z);
18952
19007
  }, R;
18953
- }, Hr = o.tls = o.tls || {};
19008
+ }, Wr = o.tls = o.tls || {};
18954
19009
  for (var ye in i)
18955
19010
  typeof i[ye] != "function" && (o.tls[ye] = i[ye]);
18956
- return o.tls.prf_tls1 = e, o.tls.hmac_sha1 = t, o.tls.createSessionCache = i.createSessionCache, o.tls.createConnection = i.createConnection, Hr;
19011
+ return o.tls.prf_tls1 = e, o.tls.hmac_sha1 = t, o.tls.createSessionCache = i.createSessionCache, o.tls.createConnection = i.createConnection, Wr;
18957
19012
  }
18958
- var dn;
18959
- function ko() {
18960
- if (dn) return xr.exports;
18961
- dn = 1;
19013
+ var yn;
19014
+ function zo() {
19015
+ if (yn) return br.exports;
19016
+ yn = 1;
18962
19017
  var o = xe();
18963
- bt(), jn();
18964
- var e = xr.exports = o.tls;
19018
+ bt(), Jn();
19019
+ var e = br.exports = o.tls;
18965
19020
  e.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA = {
18966
19021
  id: [0, 47],
18967
19022
  name: "TLS_RSA_WITH_AES_128_CBC_SHA",
@@ -19027,15 +19082,15 @@ function ko() {
19027
19082
  var b = o.hmac.create();
19028
19083
  return b.start("SHA1", l), b.update(c), c = b.digest().getBytes(), b.start(null, null), b.update(p), p = b.digest().getBytes(), c === p;
19029
19084
  }
19030
- return xr.exports;
19085
+ return br.exports;
19031
19086
  }
19032
- var Gr = { exports: {} }, fn;
19033
- function qn() {
19034
- if (fn) return Gr.exports;
19035
- fn = 1;
19087
+ var jr = { exports: {} }, vn;
19088
+ function es() {
19089
+ if (vn) return jr.exports;
19090
+ vn = 1;
19036
19091
  var o = xe();
19037
19092
  gt(), we();
19038
- var e = Gr.exports = o.sha512 = o.sha512 || {};
19093
+ var e = jr.exports = o.sha512 = o.sha512 || {};
19039
19094
  o.md.sha512 = o.md.algorithms.sha512 = e;
19040
19095
  var t = o.sha384 = o.sha512.sha384 = o.sha512.sha384 || {};
19041
19096
  t.create = function() {
@@ -19258,12 +19313,12 @@ function qn() {
19258
19313
  ce = c[0][1] + k, c[0][0] = c[0][0] + f + (ce / 4294967296 >>> 0) >>> 0, c[0][1] = ce >>> 0, ce = c[1][1] + H, c[1][0] = c[1][0] + L + (ce / 4294967296 >>> 0) >>> 0, c[1][1] = ce >>> 0, ce = c[2][1] + V, c[2][0] = c[2][0] + I + (ce / 4294967296 >>> 0) >>> 0, c[2][1] = ce >>> 0, ce = c[3][1] + G, c[3][0] = c[3][0] + A + (ce / 4294967296 >>> 0) >>> 0, c[3][1] = ce >>> 0, ce = c[4][1] + q, c[4][0] = c[4][0] + Y + (ce / 4294967296 >>> 0) >>> 0, c[4][1] = ce >>> 0, ce = c[5][1] + ee, c[5][0] = c[5][0] + ie + (ce / 4294967296 >>> 0) >>> 0, c[5][1] = ce >>> 0, ce = c[6][1] + $, c[6][0] = c[6][0] + le + (ce / 4294967296 >>> 0) >>> 0, c[6][1] = ce >>> 0, ce = c[7][1] + de, c[7][0] = c[7][0] + J + (ce / 4294967296 >>> 0) >>> 0, c[7][1] = ce >>> 0, P -= 128;
19259
19314
  }
19260
19315
  }
19261
- return Gr.exports;
19316
+ return jr.exports;
19262
19317
  }
19263
- var $t = {}, pn;
19264
- function Bo() {
19265
- if (pn) return $t;
19266
- pn = 1;
19318
+ var $t = {}, xn;
19319
+ function Ko() {
19320
+ if (xn) return $t;
19321
+ xn = 1;
19267
19322
  var o = xe();
19268
19323
  dt();
19269
19324
  var e = o.asn1;
@@ -19350,17 +19405,17 @@ function Bo() {
19350
19405
  ]
19351
19406
  }, $t;
19352
19407
  }
19353
- var Wr, gn;
19354
- function Mo() {
19355
- if (gn) return Wr;
19356
- gn = 1;
19408
+ var qr, Cn;
19409
+ function Ho() {
19410
+ if (Cn) return qr;
19411
+ Cn = 1;
19357
19412
  var o = xe();
19358
- sr(), ht(), qn(), we();
19359
- var e = Bo(), t = e.publicKeyValidator, r = e.privateKeyValidator;
19413
+ or(), ht(), es(), we();
19414
+ var e = Ko(), t = e.publicKeyValidator, r = e.privateKeyValidator;
19360
19415
  if (typeof n > "u")
19361
19416
  var n = o.jsbn.BigInteger;
19362
19417
  var s = o.util.ByteBuffer, a = typeof Buffer > "u" ? Uint8Array : Buffer;
19363
- o.pki = o.pki || {}, Wr = o.pki.ed25519 = o.ed25519 = o.ed25519 || {};
19418
+ o.pki = o.pki || {}, qr = o.pki.ed25519 = o.ed25519 = o.ed25519 || {};
19364
19419
  var i = o.ed25519;
19365
19420
  i.constants = {}, i.constants.PUBLIC_KEY_BYTE_LENGTH = 32, i.constants.PRIVATE_KEY_BYTE_LENGTH = 64, i.constants.SEED_BYTE_LENGTH = 32, i.constants.SIGN_BYTE_LENGTH = 64, i.constants.HASH_BYTE_LENGTH = 64, i.generateKeyPair = function(U) {
19366
19421
  U = U || {};
@@ -19815,14 +19870,14 @@ function Mo() {
19815
19870
  var S, C, R = 0, W = 0, F = 0, O = 0, z = 0, Q = 0, re = 0, Z = 0, ne = 0, he = 0, oe = 0, pe = 0, ve = 0, me = 0, be = 0, Se = 0, Te = 0, _e = 0, Ce = 0, Me = 0, De = 0, Ie = 0, Xe = 0, et = 0, it = 0, st = 0, at = 0, tt = 0, ot = 0, At = 0, Vt = 0, Pe = N[0], Ue = N[1], Ve = N[2], Oe = N[3], Fe = N[4], ze = N[5], Ke = N[6], He = N[7], Ge = N[8], We = N[9], je = N[10], qe = N[11], ke = N[12], Ne = N[13], Ye = N[14], $e = N[15];
19816
19871
  S = P[0], R += S * Pe, W += S * Ue, F += S * Ve, O += S * Oe, z += S * Fe, Q += S * ze, re += S * Ke, Z += S * He, ne += S * Ge, he += S * We, oe += S * je, pe += S * qe, ve += S * ke, me += S * Ne, be += S * Ye, Se += S * $e, S = P[1], W += S * Pe, F += S * Ue, O += S * Ve, z += S * Oe, Q += S * Fe, re += S * ze, Z += S * Ke, ne += S * He, he += S * Ge, oe += S * We, pe += S * je, ve += S * qe, me += S * ke, be += S * Ne, Se += S * Ye, Te += S * $e, S = P[2], F += S * Pe, O += S * Ue, z += S * Ve, Q += S * Oe, re += S * Fe, Z += S * ze, ne += S * Ke, he += S * He, oe += S * Ge, pe += S * We, ve += S * je, me += S * qe, be += S * ke, Se += S * Ne, Te += S * Ye, _e += S * $e, S = P[3], O += S * Pe, z += S * Ue, Q += S * Ve, re += S * Oe, Z += S * Fe, ne += S * ze, he += S * Ke, oe += S * He, pe += S * Ge, ve += S * We, me += S * je, be += S * qe, Se += S * ke, Te += S * Ne, _e += S * Ye, Ce += S * $e, S = P[4], z += S * Pe, Q += S * Ue, re += S * Ve, Z += S * Oe, ne += S * Fe, he += S * ze, oe += S * Ke, pe += S * He, ve += S * Ge, me += S * We, be += S * je, Se += S * qe, Te += S * ke, _e += S * Ne, Ce += S * Ye, Me += S * $e, S = P[5], Q += S * Pe, re += S * Ue, Z += S * Ve, ne += S * Oe, he += S * Fe, oe += S * ze, pe += S * Ke, ve += S * He, me += S * Ge, be += S * We, Se += S * je, Te += S * qe, _e += S * ke, Ce += S * Ne, Me += S * Ye, De += S * $e, S = P[6], re += S * Pe, Z += S * Ue, ne += S * Ve, he += S * Oe, oe += S * Fe, pe += S * ze, ve += S * Ke, me += S * He, be += S * Ge, Se += S * We, Te += S * je, _e += S * qe, Ce += S * ke, Me += S * Ne, De += S * Ye, Ie += S * $e, S = P[7], Z += S * Pe, ne += S * Ue, he += S * Ve, oe += S * Oe, pe += S * Fe, ve += S * ze, me += S * Ke, be += S * He, Se += S * Ge, Te += S * We, _e += S * je, Ce += S * qe, Me += S * ke, De += S * Ne, Ie += S * Ye, Xe += S * $e, S = P[8], ne += S * Pe, he += S * Ue, oe += S * Ve, pe += S * Oe, ve += S * Fe, me += S * ze, be += S * Ke, Se += S * He, Te += S * Ge, _e += S * We, Ce += S * je, Me += S * qe, De += S * ke, Ie += S * Ne, Xe += S * Ye, et += S * $e, S = P[9], he += S * Pe, oe += S * Ue, pe += S * Ve, ve += S * Oe, me += S * Fe, be += S * ze, Se += S * Ke, Te += S * He, _e += S * Ge, Ce += S * We, Me += S * je, De += S * qe, Ie += S * ke, Xe += S * Ne, et += S * Ye, it += S * $e, S = P[10], oe += S * Pe, pe += S * Ue, ve += S * Ve, me += S * Oe, be += S * Fe, Se += S * ze, Te += S * Ke, _e += S * He, Ce += S * Ge, Me += S * We, De += S * je, Ie += S * qe, Xe += S * ke, et += S * Ne, it += S * Ye, st += S * $e, S = P[11], pe += S * Pe, ve += S * Ue, me += S * Ve, be += S * Oe, Se += S * Fe, Te += S * ze, _e += S * Ke, Ce += S * He, Me += S * Ge, De += S * We, Ie += S * je, Xe += S * qe, et += S * ke, it += S * Ne, st += S * Ye, at += S * $e, S = P[12], ve += S * Pe, me += S * Ue, be += S * Ve, Se += S * Oe, Te += S * Fe, _e += S * ze, Ce += S * Ke, Me += S * He, De += S * Ge, Ie += S * We, Xe += S * je, et += S * qe, it += S * ke, st += S * Ne, at += S * Ye, tt += S * $e, S = P[13], me += S * Pe, be += S * Ue, Se += S * Ve, Te += S * Oe, _e += S * Fe, Ce += S * ze, Me += S * Ke, De += S * He, Ie += S * Ge, Xe += S * We, et += S * je, it += S * qe, st += S * ke, at += S * Ne, tt += S * Ye, ot += S * $e, S = P[14], be += S * Pe, Se += S * Ue, Te += S * Ve, _e += S * Oe, Ce += S * Fe, Me += S * ze, De += S * Ke, Ie += S * He, Xe += S * Ge, et += S * We, it += S * je, st += S * qe, at += S * ke, tt += S * Ne, ot += S * Ye, At += S * $e, S = P[15], Se += S * Pe, Te += S * Ue, _e += S * Ve, Ce += S * Oe, Me += S * Fe, De += S * ze, Ie += S * Ke, Xe += S * He, et += S * Ge, it += S * We, st += S * je, at += S * qe, tt += S * ke, ot += S * Ne, At += S * Ye, Vt += S * $e, R += 38 * Te, W += 38 * _e, F += 38 * Ce, O += 38 * Me, z += 38 * De, Q += 38 * Ie, re += 38 * Xe, Z += 38 * et, ne += 38 * it, he += 38 * st, oe += 38 * at, pe += 38 * tt, ve += 38 * ot, me += 38 * At, be += 38 * Vt, C = 1, S = R + C + 65535, C = Math.floor(S / 65536), R = S - C * 65536, S = W + C + 65535, C = Math.floor(S / 65536), W = S - C * 65536, S = F + C + 65535, C = Math.floor(S / 65536), F = S - C * 65536, S = O + C + 65535, C = Math.floor(S / 65536), O = S - C * 65536, S = z + C + 65535, C = Math.floor(S / 65536), z = S - C * 65536, S = Q + C + 65535, C = Math.floor(S / 65536), Q = S - C * 65536, S = re + C + 65535, C = Math.floor(S / 65536), re = S - C * 65536, S = Z + C + 65535, C = Math.floor(S / 65536), Z = S - C * 65536, S = ne + C + 65535, C = Math.floor(S / 65536), ne = S - C * 65536, S = he + C + 65535, C = Math.floor(S / 65536), he = S - C * 65536, S = oe + C + 65535, C = Math.floor(S / 65536), oe = S - C * 65536, S = pe + C + 65535, C = Math.floor(S / 65536), pe = S - C * 65536, S = ve + C + 65535, C = Math.floor(S / 65536), ve = S - C * 65536, S = me + C + 65535, C = Math.floor(S / 65536), me = S - C * 65536, S = be + C + 65535, C = Math.floor(S / 65536), be = S - C * 65536, S = Se + C + 65535, C = Math.floor(S / 65536), Se = S - C * 65536, R += C - 1 + 37 * (C - 1), C = 1, S = R + C + 65535, C = Math.floor(S / 65536), R = S - C * 65536, S = W + C + 65535, C = Math.floor(S / 65536), W = S - C * 65536, S = F + C + 65535, C = Math.floor(S / 65536), F = S - C * 65536, S = O + C + 65535, C = Math.floor(S / 65536), O = S - C * 65536, S = z + C + 65535, C = Math.floor(S / 65536), z = S - C * 65536, S = Q + C + 65535, C = Math.floor(S / 65536), Q = S - C * 65536, S = re + C + 65535, C = Math.floor(S / 65536), re = S - C * 65536, S = Z + C + 65535, C = Math.floor(S / 65536), Z = S - C * 65536, S = ne + C + 65535, C = Math.floor(S / 65536), ne = S - C * 65536, S = he + C + 65535, C = Math.floor(S / 65536), he = S - C * 65536, S = oe + C + 65535, C = Math.floor(S / 65536), oe = S - C * 65536, S = pe + C + 65535, C = Math.floor(S / 65536), pe = S - C * 65536, S = ve + C + 65535, C = Math.floor(S / 65536), ve = S - C * 65536, S = me + C + 65535, C = Math.floor(S / 65536), me = S - C * 65536, S = be + C + 65535, C = Math.floor(S / 65536), be = S - C * 65536, S = Se + C + 65535, C = Math.floor(S / 65536), Se = S - C * 65536, R += C - 1 + 37 * (C - 1), U[0] = R, U[1] = W, U[2] = F, U[3] = O, U[4] = z, U[5] = Q, U[6] = re, U[7] = Z, U[8] = ne, U[9] = he, U[10] = oe, U[11] = pe, U[12] = ve, U[13] = me, U[14] = be, U[15] = Se;
19817
19872
  }
19818
- return Wr;
19873
+ return qr;
19819
19874
  }
19820
- var jr, mn;
19821
- function Lo() {
19822
- if (mn) return jr;
19823
- mn = 1;
19875
+ var Yr, bn;
19876
+ function Go() {
19877
+ if (bn) return Yr;
19878
+ bn = 1;
19824
19879
  var o = xe();
19825
- we(), ht(), sr(), jr = o.kem = o.kem || {};
19880
+ we(), ht(), or(), Yr = o.kem = o.kem || {};
19826
19881
  var e = o.jsbn.BigInteger;
19827
19882
  o.kem.rsa = {}, o.kem.rsa.create = function(r, n) {
19828
19883
  n = n || {};
@@ -19859,14 +19914,14 @@ function Lo() {
19859
19914
  return c.truncate(c.length() - l), c.getBytes();
19860
19915
  };
19861
19916
  }
19862
- return jr;
19917
+ return Yr;
19863
19918
  }
19864
- var qr, yn;
19865
- function Ro() {
19866
- if (yn) return qr;
19867
- yn = 1;
19919
+ var $r, En;
19920
+ function Wo() {
19921
+ if (En) return $r;
19922
+ En = 1;
19868
19923
  var o = xe();
19869
- we(), qr = o.log = o.log || {}, o.log.levels = [
19924
+ we(), $r = o.log = o.log || {}, o.log.levels = [
19870
19925
  "none",
19871
19926
  "error",
19872
19927
  "warning",
@@ -19979,19 +20034,19 @@ function Ro() {
19979
20034
  b == "true" && o.log.lock(r);
19980
20035
  }
19981
20036
  }
19982
- return o.log.consoleLogger = r, qr;
20037
+ return o.log.consoleLogger = r, $r;
19983
20038
  }
19984
- var Yr, vn;
19985
- function No() {
19986
- return vn || (vn = 1, Yr = gt(), di(), Ut(), Pn(), qn()), Yr;
20039
+ var Zr, wn;
20040
+ function jo() {
20041
+ return wn || (wn = 1, Zr = gt(), mi(), Ut(), Hn(), es()), Zr;
19987
20042
  }
19988
- var $r = { exports: {} }, xn;
19989
- function Do() {
19990
- if (xn) return $r.exports;
19991
- xn = 1;
20043
+ var Xr = { exports: {} }, Sn;
20044
+ function qo() {
20045
+ if (Sn) return Xr.exports;
20046
+ Sn = 1;
19992
20047
  var o = xe();
19993
- bt(), dt(), nr(), Et(), Tt(), Kn(), ht(), we(), mi();
19994
- var e = o.asn1, t = $r.exports = o.pkcs7 = o.pkcs7 || {};
20048
+ bt(), dt(), ar(), Et(), Tt(), $n(), ht(), we(), Ci();
20049
+ var e = o.asn1, t = Xr.exports = o.pkcs7 = o.pkcs7 || {};
19995
20050
  t.messageFromPem = function(h) {
19996
20051
  var m = o.pem.decode(h)[0];
19997
20052
  if (m.type !== "PKCS7") {
@@ -20794,15 +20849,15 @@ function Do() {
20794
20849
  h.content = m.output;
20795
20850
  }
20796
20851
  }
20797
- return $r.exports;
20852
+ return Xr.exports;
20798
20853
  }
20799
- var Zr = { exports: {} }, Cn;
20800
- function Po() {
20801
- if (Cn) return Zr.exports;
20802
- Cn = 1;
20854
+ var Qr = { exports: {} }, Tn;
20855
+ function Yo() {
20856
+ if (Tn) return Qr.exports;
20857
+ Tn = 1;
20803
20858
  var o = xe();
20804
- bt(), Pt(), di(), Ut(), we();
20805
- var e = Zr.exports = o.ssh = o.ssh || {};
20859
+ bt(), Pt(), mi(), Ut(), we();
20860
+ var e = Qr.exports = o.ssh = o.ssh || {};
20806
20861
  e.privateKeyToPutty = function(s, a, i) {
20807
20862
  i = i || "", a = a || "";
20808
20863
  var l = "ssh-rsa", c = a === "" ? "none" : "aes256-cbc", p = "PuTTY-User-Key-File-2: " + l + `\r
@@ -20882,18 +20937,18 @@ Private-MAC: ` + g.digest().toHex() + `\r
20882
20937
  s.update(arguments[i]);
20883
20938
  return s.digest();
20884
20939
  }
20885
- return Zr.exports;
20940
+ return Qr.exports;
20886
20941
  }
20887
- var Xr, bn;
20888
- function Uo() {
20889
- return bn || (bn = 1, Xr = xe(), bt(), ko(), dt(), hi(), nr(), Mo(), Pt(), Lo(), Ro(), No(), Hn(), pi(), Tt(), On(), Gn(), Do(), Wn(), Fn(), Un(), gi(), ht(), Vn(), Po(), jn(), we()), Xr;
20942
+ var Jr, An;
20943
+ function $o() {
20944
+ return An || (An = 1, Jr = xe(), bt(), zo(), dt(), gi(), ar(), Ho(), Pt(), Go(), Wo(), jo(), Zn(), vi(), Tt(), jn(), Xn(), qo(), Qn(), qn(), Gn(), xi(), ht(), Wn(), Yo(), Jn(), we()), Jr;
20890
20945
  }
20891
- var ni = Uo();
20892
- const Vo = "evtrsa1", Qr = /* @__PURE__ */ new Map();
20893
- function Yn(o) {
20946
+ var ai = $o();
20947
+ const Zo = "evtrsa1", ei = /* @__PURE__ */ new Map();
20948
+ function ts(o) {
20894
20949
  return o.replace(/\/+$/, "");
20895
20950
  }
20896
- function Oo(o) {
20951
+ function Xo(o) {
20897
20952
  return new TextEncoder().encode(o);
20898
20953
  }
20899
20954
  function Zt(o) {
@@ -20902,7 +20957,7 @@ function Zt(o) {
20902
20957
  e += String.fromCharCode(t);
20903
20958
  }), btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
20904
20959
  }
20905
- async function Fo(o, e) {
20960
+ async function Qo(o, e) {
20906
20961
  const t = typeof AbortController < "u" ? new AbortController() : void 0, r = t ? setTimeout(() => t.abort(), e) : void 0;
20907
20962
  try {
20908
20963
  const n = await fetch(o, {
@@ -20921,65 +20976,65 @@ async function Fo(o, e) {
20921
20976
  r != null && clearTimeout(r);
20922
20977
  }
20923
20978
  }
20924
- function Jr(o) {
20979
+ function ti(o) {
20925
20980
  const e = globalThis.crypto;
20926
20981
  if (!e?.getRandomValues)
20927
20982
  throw new Error("[BimEngine] crypto.getRandomValues is required to encrypt viewToken");
20928
20983
  return e.getRandomValues(new Uint8Array(o));
20929
20984
  }
20930
- function zo(o) {
20985
+ function Jo(o) {
20931
20986
  let e = "";
20932
20987
  return o.forEach((t) => {
20933
20988
  e += String.fromCharCode(t);
20934
20989
  }), e;
20935
20990
  }
20936
- function Ko(o) {
20991
+ function el(o) {
20937
20992
  const e = new Uint8Array(o.length);
20938
20993
  for (let t = 0; t < o.length; t += 1)
20939
20994
  e[t] = o.charCodeAt(t) & 255;
20940
20995
  return e;
20941
20996
  }
20942
- async function Ho(o, e) {
20943
- const t = `${Yn(o)}/models/view-token/public-key`, r = await Fo(t, e);
20997
+ async function tl(o, e) {
20998
+ const t = `${ts(o)}/models/view-token/public-key`, r = await Qo(t, e);
20944
20999
  if (r.algorithm !== "RSA-OAEP-256" || !r.publicKey)
20945
21000
  throw new Error("[BimEngine] OpenAPI returned an invalid viewToken public key");
20946
- return ni.pki.publicKeyFromPem(r.publicKey);
21001
+ return ai.pki.publicKeyFromPem(r.publicKey);
20947
21002
  }
20948
- function Go(o, e) {
20949
- const t = Yn(o), r = Qr.get(t);
21003
+ function rl(o, e) {
21004
+ const t = ts(o), r = ei.get(t);
20950
21005
  if (r)
20951
21006
  return r;
20952
- const n = Ho(o, e).catch((s) => {
20953
- throw Qr.delete(t), s;
21007
+ const n = tl(o, e).catch((s) => {
21008
+ throw ei.delete(t), s;
20954
21009
  });
20955
- return Qr.set(t, n), n;
21010
+ return ei.set(t, n), n;
20956
21011
  }
20957
- async function Wo(o, e, t) {
20958
- const r = await Go(o, t), n = Jr(32), s = Jr(12), a = Jr(16), i = JSON.stringify({
21012
+ async function il(o, e, t) {
21013
+ const r = await rl(o, t), n = ti(32), s = ti(12), a = ti(16), i = JSON.stringify({
20959
21014
  viewToken: e,
20960
21015
  timestamp: Date.now(),
20961
21016
  nonce: Zt(a)
20962
21017
  }), l = r.encrypt(
20963
- zo(n),
21018
+ Jo(n),
20964
21019
  "RSA-OAEP",
20965
21020
  {
20966
- md: ni.md.sha256.create(),
21021
+ md: ai.md.sha256.create(),
20967
21022
  mgf1: {
20968
- md: ni.md.sha256.create()
21023
+ md: ai.md.sha256.create()
20969
21024
  }
20970
21025
  }
20971
- ), c = So(n, s).encrypt(Oo(i));
21026
+ ), c = Po(n, s).encrypt(Xo(i));
20972
21027
  return [
20973
- Vo,
20974
- Zt(Ko(l)),
21028
+ Zo,
21029
+ Zt(el(l)),
20975
21030
  Zt(s),
20976
21031
  Zt(c)
20977
21032
  ].join(".");
20978
21033
  }
20979
- function jo(o) {
21034
+ function nl(o) {
20980
21035
  return o.replace(/\/+$/, "");
20981
21036
  }
20982
- async function qo(o, e, t) {
21037
+ async function sl(o, e, t) {
20983
21038
  const r = typeof AbortController < "u" ? new AbortController() : void 0, n = r ? setTimeout(() => r.abort(), t) : void 0;
20984
21039
  try {
20985
21040
  const s = await fetch(o, {
@@ -20999,7 +21054,7 @@ async function qo(o, e, t) {
20999
21054
  n != null && clearTimeout(n);
21000
21055
  }
21001
21056
  }
21002
- function Yo(o) {
21057
+ function al(o) {
21003
21058
  switch (o) {
21004
21059
  case "2d":
21005
21060
  return "cad_model";
@@ -21014,7 +21069,7 @@ function Yo(o) {
21014
21069
  return "model";
21015
21070
  }
21016
21071
  }
21017
- function $o(o) {
21072
+ function ol(o) {
21018
21073
  return {
21019
21074
  models: [
21020
21075
  {
@@ -21024,37 +21079,37 @@ function $o(o) {
21024
21079
  ]
21025
21080
  };
21026
21081
  }
21027
- function Zo(o, e) {
21082
+ function ll(o, e) {
21028
21083
  return {
21029
21084
  applicationId: 0,
21030
21085
  engineType: e,
21031
- assetCategory: Yo(e),
21086
+ assetCategory: al(e),
21032
21087
  url: o,
21033
21088
  urls: [o],
21034
- info: e === "gis" ? $o(o) : void 0
21089
+ info: e === "gis" ? ol(o) : void 0
21035
21090
  };
21036
21091
  }
21037
- async function Xo(o, e, t) {
21092
+ async function cl(o, e, t) {
21038
21093
  const r = o?.sdkAuth;
21039
21094
  if (!r?.endpoint)
21040
- return Zo(e, t);
21095
+ return ll(e, t);
21041
21096
  let n;
21042
- (r.token || r.appId && r.appKey && r.appSecret) && (n = (await eo(o, t))?.sdkToken);
21097
+ (r.token || r.appId && r.appKey && r.appSecret) && (n = (await fo(o, t))?.sdkToken);
21043
21098
  const a = {
21044
- viewToken: await Wo(
21099
+ viewToken: await il(
21045
21100
  r.endpoint,
21046
21101
  e,
21047
21102
  r.timeoutMs ?? 8e3
21048
21103
  ),
21049
21104
  engineType: t
21050
21105
  };
21051
- return n && (a.sdkToken = n), qo(
21052
- `${jo(r.endpoint)}/models/view-token/resolve`,
21106
+ return n && (a.sdkToken = n), sl(
21107
+ `${nl(r.endpoint)}/models/view-token/resolve`,
21053
21108
  a,
21054
21109
  r.timeoutMs ?? 8e3
21055
21110
  );
21056
21111
  }
21057
- class Qo {
21112
+ class ul {
21058
21113
  // 配置选项
21059
21114
  options;
21060
21115
  container = null;
@@ -21113,13 +21168,13 @@ class Qo {
21113
21168
  ]
21114
21169
  }, this.enablePerformanceMonitoring = e.enablePerformanceMonitoring ?? !1, this.container = document.getElementById(e.containerId), !this.container)
21115
21170
  throw new Error(`Container ${e.containerId} not found`);
21116
- this.initialize(), this.handelBehaved2d = ba(this), this.interactionModule2d = new wa(this), this.interactionModule2d.init(), this.interactionModule2d.active();
21171
+ this.initialize(), this.handelBehaved2d = Ra(this), this.interactionModule2d = new Da(this), this.interactionModule2d.init(), this.interactionModule2d.active();
21117
21172
  }
21118
21173
  /**
21119
21174
  * 初始化引擎
21120
21175
  */
21121
21176
  initialize() {
21122
- this.events = new ws(!1), this.sceneModule2d = new _s(this, this.options), this.scene = this.sceneModule2d.scene, this.cameraModule2d = new ks(this, this.container), this.camera = this.cameraModule2d.orthographicCamera, this.renderModule2d = new Ps(this, this.container, this.options), this.renderer = this.renderModule2d.renderer, this.controlModule2d = new Vs(this), this.loaderModule2d = new ma(this), this.themeManager = new Ma(this.container), this.layerManager = new _n(this), this.searchManager = new Ba(this), this.measure = new Da(this), this.markup = new Oa(this), this.label = new za(this), this.viewCube = new Ka(this), this.octreeBox2d = new ya(this), this.modelToolModule2d = new Ca(this), this.engineStatus2d = new Is(this), this.linkView2d3d = new va(this), this.linkElement2d3d = new xa(this), this.sceneModule2d.initGrid(), this.cadCursorUI = new Sa(this.container, this.renderer.domElement, this.options.cursorStyle ?? "short-crosshair"), this.cadCursorUI.setBackgroundColor(this.options.backgroundColor ?? 1710618), this.loadingUI = new Aa(this.container, this.options.loadingStyle), this.events.on(Je.ModelLoadStart, () => this.loadingUI.show("正在加载...", 0)), this.events.on(Je.ModelLoadProgress, (e) => this.loadingUI.update(e.text, e.progress)), this.events.on(Je.ModelLoaded, () => this.loadingUI.hide()), this.events.on(Je.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 Ha(this.container, this), this.contextMenuUI = new Ta(
21177
+ this.events = new Ms(!1), this.sceneModule2d = new Ds(this, this.options), this.scene = this.sceneModule2d.scene, this.cameraModule2d = new Us(this, this.container), this.camera = this.cameraModule2d.orthographicCamera, this.renderModule2d = new Gs(this, this.container, this.options), this.renderer = this.renderModule2d.renderer, this.controlModule2d = new js(this), this.loaderModule2d = new Ia(this), this.themeManager = new Ha(this.container), this.layerManager = new Nn(this), this.searchManager = new Ka(this), this.measure = new qa(this), this.markup = new Xa(this), this.label = new Ja(this), this.viewCube = new eo(this), this.octreeBox2d = new ka(this), this.modelToolModule2d = new La(this), this.engineStatus2d = new Ps(this), this.linkView2d3d = new Ba(this), this.linkElement2d3d = new Ma(this), this.sceneModule2d.initGrid(), this.cadCursorUI = new Pa(this.container, this.renderer.domElement, this.options.cursorStyle ?? "short-crosshair"), this.cadCursorUI.setBackgroundColor(this.options.backgroundColor ?? 1710618), this.loadingUI = new Va(this.container, this.options.loadingStyle), this.events.on(Je.ModelLoadStart, () => this.loadingUI.show("正在加载...", 0)), this.events.on(Je.ModelLoadProgress, (e) => this.loadingUI.update(e.text, e.progress)), this.events.on(Je.ModelLoaded, () => this.loadingUI.hide()), this.events.on(Je.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 to(this.container, this), this.contextMenuUI = new Ua(
21123
21178
  this.container,
21124
21179
  this.renderer.domElement,
21125
21180
  (e) => {
@@ -21162,7 +21217,7 @@ class Qo {
21162
21217
  };
21163
21218
  /** 初始化 stats.js 性能监视器,showStats 优先控制可视面板,旧配置 enablePerformanceMonitoring 继续兼容。 */
21164
21219
  initStatsMonitor() {
21165
- !(this.options.showStats ?? this.enablePerformanceMonitoring) || !this.container || (this.stats = new Es(), 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));
21220
+ !(this.options.showStats ?? this.enablePerformanceMonitoring) || !this.container || (this.stats = new Bs(), 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));
21166
21221
  }
21167
21222
  /**
21168
21223
  * 更新性能统计
@@ -21190,7 +21245,7 @@ class Qo {
21190
21245
  return await this.loaderModule2d.loadModelFile(e, t), {};
21191
21246
  }
21192
21247
  async loadModelByViewToken(e, t) {
21193
- const r = await Xo(
21248
+ const r = await cl(
21194
21249
  this.options,
21195
21250
  e,
21196
21251
  "2d"
@@ -21397,11 +21452,11 @@ class Qo {
21397
21452
  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");
21398
21453
  }
21399
21454
  }
21400
- function el(o) {
21401
- return new Qo(o);
21455
+ function dl(o) {
21456
+ return new ul(o);
21402
21457
  }
21403
21458
  export {
21404
- Qo as EngineKernel2d,
21405
- el as createEngine2d,
21406
- el as default
21459
+ ul as EngineKernel2d,
21460
+ dl as createEngine2d,
21461
+ dl as default
21407
21462
  };