build-dxf 0.0.20-24 → 0.0.20-25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index3.js CHANGED
@@ -1,29 +1,29 @@
1
1
  import * as m from "three";
2
- import { i as ct, n as mt, r as qe, t as Ue, c as Pe, d as ht, e as ut, f as Ae, g as Q, _ as Ze, u as pt, h as ye, j as _e, w as gt, k as vt, l as ft, p as yt, m as wt, o as bt, T as Ne, q as Oe, s as Ct, v as xt, x as Re, y as De, z as ke, A as Et, B as Mt, L as we, D as Lt, b as Ke, E as ge, S as kt } from "./selectLocalFile.js";
3
- import { C as Ee, L as ce, P as W, B as Ye, E as Xe, b as Fe, Q as ze, W as It } from "./build.js";
2
+ import { i as ct, n as mt, r as Ue, t as qe, c as Pe, d as ht, e as ut, f as Ae, g as Q, _ as Ze, u as pt, h as ye, j as _e, w as gt, k as vt, l as ft, p as yt, m as wt, o as bt, T as Ne, q as Oe, s as Ct, v as xt, x as Re, y as De, z as ke, A as Et, B as Mt, L as we, D as Lt, b as Ke, E as ge, S as kt } from "./selectLocalFile.js";
3
+ import { C as Ee, L as ce, P as J, B as Ye, E as Xe, b as Fe, Q as ze, W as It } from "./build.js";
4
4
  import "clipper-lib";
5
5
  import "dxf-writer";
6
6
  import "three/addons/controls/OrbitControls.js";
7
- import { watch as J, ref as S, defineComponent as me, computed as B, createElementBlock as O, openBlock as P, normalizeClass as T, unref as g, renderSlot as Ce, createVNode as F, Transition as xe, withCtx as j, withDirectives as $e, createElementVNode as I, normalizeStyle as Se, createTextVNode as se, toDisplayString as ie, vShow as et, shallowReactive as Dt, onMounted as tt, createBlock as ve, createCommentVNode as Z, resolveDynamicComponent as Pt, Fragment as fe, withModifiers as At, nextTick as be, isVNode as nt, render as Te, toRaw as St, onUnmounted as Bt, renderList as Ie, createStaticVNode as _t, TransitionGroup as Nt, createApp as Ot } from "vue";
7
+ import { watch as W, ref as S, defineComponent as me, computed as B, createElementBlock as O, openBlock as P, normalizeClass as T, unref as g, renderSlot as Ce, createVNode as F, Transition as xe, withCtx as j, withDirectives as $e, createElementVNode as I, normalizeStyle as Se, createTextVNode as ae, toDisplayString as ie, vShow as et, shallowReactive as Dt, onMounted as tt, createBlock as ve, createCommentVNode as Z, resolveDynamicComponent as Pt, Fragment as fe, withModifiers as At, nextTick as be, isVNode as nt, render as Te, toRaw as St, onUnmounted as Bt, renderList as Ie, createStaticVNode as _t, TransitionGroup as Nt, createApp as Ot } from "vue";
8
8
  function ot(i) {
9
9
  var e;
10
- const t = qe(i);
10
+ const t = Ue(i);
11
11
  return (e = t?.$el) != null ? e : t;
12
12
  }
13
- const at = Pe ? window : void 0;
13
+ const st = Pe ? window : void 0;
14
14
  function Rt(...i) {
15
15
  let e, t, n, o;
16
- if (ct(i[0]) || Array.isArray(i[0]) ? ([t, n, o] = i, e = at) : [e, t, n, o] = i, !e)
16
+ if (ct(i[0]) || Array.isArray(i[0]) ? ([t, n, o] = i, e = st) : [e, t, n, o] = i, !e)
17
17
  return mt;
18
18
  Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
19
- const a = [], s = () => {
20
- a.forEach((c) => c()), a.length = 0;
21
- }, r = (c, h, y, w) => (c.addEventListener(h, y, w), () => c.removeEventListener(h, y, w)), l = J(() => [ot(e), qe(o)], ([c, h]) => {
22
- s(), c && a.push(...t.flatMap((y) => n.map((w) => r(c, y, w, h))));
19
+ const s = [], a = () => {
20
+ s.forEach((c) => c()), s.length = 0;
21
+ }, r = (c, h, y, w) => (c.addEventListener(h, y, w), () => c.removeEventListener(h, y, w)), l = W(() => [ot(e), Ue(o)], ([c, h]) => {
22
+ a(), c && s.push(...t.flatMap((y) => n.map((w) => r(c, y, w, h))));
23
23
  }, { immediate: !0, flush: "post" }), d = () => {
24
- l(), s();
24
+ l(), a();
25
25
  };
26
- return Ue(d), d;
26
+ return qe(d), d;
27
27
  }
28
28
  function Kt(i, e = !1) {
29
29
  const t = S(), n = () => t.value = !!i();
@@ -41,16 +41,16 @@ var Ge = Object.getOwnPropertySymbols, Ft = Object.prototype.hasOwnProperty, zt
41
41
  return t;
42
42
  };
43
43
  function Vt(i, e, t = {}) {
44
- const n = t, { window: o = at } = n, a = Tt(n, ["window"]);
45
- let s;
44
+ const n = t, { window: o = st } = n, s = Tt(n, ["window"]);
45
+ let a;
46
46
  const r = Kt(() => o && "ResizeObserver" in o), l = () => {
47
- s && (s.disconnect(), s = void 0);
48
- }, d = J(() => ot(i), (h) => {
49
- l(), r.value && o && h && (s = new ResizeObserver(e), s.observe(h, a));
47
+ a && (a.disconnect(), a = void 0);
48
+ }, d = W(() => ot(i), (h) => {
49
+ l(), r.value && o && h && (a = new ResizeObserver(e), a.observe(h, s));
50
50
  }, { immediate: !0, flush: "post" }), c = () => {
51
51
  l(), d();
52
52
  };
53
- return Ue(c), {
53
+ return qe(c), {
54
54
  isSupported: r,
55
55
  stop: c
56
56
  };
@@ -59,15 +59,15 @@ var Qe;
59
59
  (function(i) {
60
60
  i.UP = "UP", i.RIGHT = "RIGHT", i.DOWN = "DOWN", i.LEFT = "LEFT", i.NONE = "NONE";
61
61
  })(Qe || (Qe = {}));
62
- var jt = Object.defineProperty, He = Object.getOwnPropertySymbols, Gt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Je = (i, e, t) => e in i ? jt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Ht = (i, e) => {
62
+ var jt = Object.defineProperty, He = Object.getOwnPropertySymbols, Gt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, We = (i, e, t) => e in i ? jt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Ht = (i, e) => {
63
63
  for (var t in e || (e = {}))
64
- Gt.call(e, t) && Je(i, t, e[t]);
64
+ Gt.call(e, t) && We(i, t, e[t]);
65
65
  if (He)
66
66
  for (var t of He(e))
67
- Qt.call(e, t) && Je(i, t, e[t]);
67
+ Qt.call(e, t) && We(i, t, e[t]);
68
68
  return i;
69
69
  };
70
- const Jt = {
70
+ const Wt = {
71
71
  easeInSine: [0.12, 0, 0.39, 0],
72
72
  easeOutSine: [0.61, 1, 0.88, 1],
73
73
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -95,10 +95,10 @@ const Jt = {
95
95
  };
96
96
  Ht({
97
97
  linear: ut
98
- }, Jt);
99
- const Wt = (i) => i, qt = {
98
+ }, Wt);
99
+ const Jt = (i) => i, Ut = {
100
100
  esc: "Escape"
101
- }, Ut = Ae({
101
+ }, qt = Ae({
102
102
  value: {
103
103
  type: [String, Number],
104
104
  default: ""
@@ -133,14 +133,14 @@ const Wt = (i) => i, qt = {
133
133
  name: "ElBadge"
134
134
  }), Yt = /* @__PURE__ */ me({
135
135
  ...Zt,
136
- props: Ut,
136
+ props: qt,
137
137
  setup(i, { expose: e }) {
138
- const t = i, n = pt("badge"), o = B(() => t.isDot ? "" : ye(t.value) && ye(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), a = B(() => {
139
- var s, r, l, d, c;
138
+ const t = i, n = pt("badge"), o = B(() => t.isDot ? "" : ye(t.value) && ye(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), s = B(() => {
139
+ var a, r, l, d, c;
140
140
  return [
141
141
  {
142
142
  backgroundColor: t.color,
143
- marginRight: _e(-((r = (s = t.offset) == null ? void 0 : s[0]) != null ? r : 0)),
143
+ marginRight: _e(-((r = (a = t.offset) == null ? void 0 : a[0]) != null ? r : 0)),
144
144
  marginTop: _e((d = (l = t.offset) == null ? void 0 : l[1]) != null ? d : 0)
145
145
  },
146
146
  (c = t.badgeStyle) != null ? c : {}
@@ -148,10 +148,10 @@ const Wt = (i) => i, qt = {
148
148
  });
149
149
  return e({
150
150
  content: o
151
- }), (s, r) => (P(), O("div", {
151
+ }), (a, r) => (P(), O("div", {
152
152
  class: T(g(n).b())
153
153
  }, [
154
- Ce(s.$slots, "default"),
154
+ Ce(a.$slots, "default"),
155
155
  F(xe, {
156
156
  name: `${g(n).namespace.value}-zoom-in-center`,
157
157
  persisted: ""
@@ -160,19 +160,19 @@ const Wt = (i) => i, qt = {
160
160
  $e(I("sup", {
161
161
  class: T([
162
162
  g(n).e("content"),
163
- g(n).em("content", s.type),
164
- g(n).is("fixed", !!s.$slots.default),
165
- g(n).is("dot", s.isDot),
166
- g(n).is("hide-zero", !s.showZero && t.value === 0),
167
- s.badgeClass
163
+ g(n).em("content", a.type),
164
+ g(n).is("fixed", !!a.$slots.default),
165
+ g(n).is("dot", a.isDot),
166
+ g(n).is("hide-zero", !a.showZero && t.value === 0),
167
+ a.badgeClass
168
168
  ]),
169
- style: Se(g(a))
169
+ style: Se(g(s))
170
170
  }, [
171
- Ce(s.$slots, "content", { value: g(o) }, () => [
172
- se(ie(g(o)), 1)
171
+ Ce(a.$slots, "content", { value: g(o) }, () => [
172
+ ae(ie(g(o)), 1)
173
173
  ])
174
174
  ], 6), [
175
- [et, !s.hidden && (g(o) || s.isDot || s.$slots.content)]
175
+ [et, !a.hidden && (g(o) || a.isDot || a.$slots.content)]
176
176
  ])
177
177
  ]),
178
178
  _: 3
@@ -224,19 +224,19 @@ me({
224
224
  props: en,
225
225
  setup(i, { slots: e }) {
226
226
  const t = yt(i);
227
- return J(() => i.message, (n) => {
228
- var o, a;
229
- Object.assign(z, (a = (o = t?.value) == null ? void 0 : o.message) != null ? a : {}, n ?? {});
227
+ return W(() => i.message, (n) => {
228
+ var o, s;
229
+ Object.assign(z, (s = (o = t?.value) == null ? void 0 : o.message) != null ? s : {}, n ?? {});
230
230
  }, { immediate: !0, deep: !0 }), () => Ce(e, "default", { config: t?.value });
231
231
  }
232
232
  });
233
- const st = [
233
+ const at = [
234
234
  "primary",
235
235
  "success",
236
236
  "info",
237
237
  "warning",
238
238
  "error"
239
- ], N = Wt({
239
+ ], N = Jt({
240
240
  customClass: "",
241
241
  dangerouslyUseHTMLString: !1,
242
242
  duration: 3e3,
@@ -291,7 +291,7 @@ const st = [
291
291
  },
292
292
  type: {
293
293
  type: String,
294
- values: st,
294
+ values: at,
295
295
  default: N.type
296
296
  },
297
297
  plain: {
@@ -320,22 +320,22 @@ const st = [
320
320
  const e = H.findIndex((o) => o.id === i), t = H[e];
321
321
  let n;
322
322
  return e > 0 && (n = H[e - 1]), { current: t, prev: n };
323
- }, an = (i) => {
323
+ }, sn = (i) => {
324
324
  const { prev: e } = on(i);
325
325
  return e ? e.vm.exposed.bottom.value : 0;
326
- }, sn = (i, e) => H.findIndex((n) => n.id === i) > 0 ? 16 : e, rn = me({
326
+ }, an = (i, e) => H.findIndex((n) => n.id === i) > 0 ? 16 : e, rn = me({
327
327
  name: "ElMessage"
328
328
  }), dn = /* @__PURE__ */ me({
329
329
  ...rn,
330
330
  props: tn,
331
331
  emits: nn,
332
332
  setup(i, { expose: e, emit: t }) {
333
- const n = i, { Close: o } = Ct, a = S(!1), { ns: s, zIndex: r } = bt("message"), { currentZIndex: l, nextZIndex: d } = r, c = S(), h = S(!1), y = S(0);
333
+ const n = i, { Close: o } = Ct, s = S(!1), { ns: a, zIndex: r } = bt("message"), { currentZIndex: l, nextZIndex: d } = r, c = S(), h = S(!1), y = S(0);
334
334
  let w;
335
335
  const b = B(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), f = B(() => {
336
336
  const p = n.type;
337
- return { [s.bm("icon", p)]: p && Ne[p] };
338
- }), M = B(() => n.icon || Ne[n.type] || ""), L = B(() => an(n.id)), A = B(() => sn(n.id, n.offset) + L.value), G = B(() => y.value + A.value), E = B(() => ({
337
+ return { [a.bm("icon", p)]: p && Ne[p] };
338
+ }), M = B(() => n.icon || Ne[n.type] || ""), L = B(() => sn(n.id)), A = B(() => an(n.id, n.offset) + L.value), G = B(() => y.value + A.value), E = B(() => ({
339
339
  top: `${A.value}px`,
340
340
  zIndex: l.value
341
341
  }));
@@ -350,15 +350,15 @@ const st = [
350
350
  function x() {
351
351
  h.value = !1, be(() => {
352
352
  var p;
353
- a.value || ((p = n.onClose) == null || p.call(n), t("destroy"));
353
+ s.value || ((p = n.onClose) == null || p.call(n), t("destroy"));
354
354
  });
355
355
  }
356
356
  function _({ code: p }) {
357
- p === qt.esc && x();
357
+ p === Ut.esc && x();
358
358
  }
359
359
  return tt(() => {
360
360
  K(), d(), h.value = !0;
361
- }), J(() => n.repeatNum, () => {
361
+ }), W(() => n.repeatNum, () => {
362
362
  k(), K();
363
363
  }), Rt(document, "keydown", _), Vt(c, () => {
364
364
  y.value = c.value.getBoundingClientRect().height;
@@ -366,9 +366,9 @@ const st = [
366
366
  visible: h,
367
367
  bottom: G,
368
368
  close: x
369
- }), (p, q) => (P(), ve(xe, {
370
- name: g(s).b("fade"),
371
- onBeforeEnter: (R) => a.value = !0,
369
+ }), (p, U) => (P(), ve(xe, {
370
+ name: g(a).b("fade"),
371
+ onBeforeEnter: (R) => s.value = !0,
372
372
  onBeforeLeave: p.onClose,
373
373
  onAfterLeave: (R) => p.$emit("destroy"),
374
374
  persisted: ""
@@ -379,10 +379,10 @@ const st = [
379
379
  ref_key: "messageRef",
380
380
  ref: c,
381
381
  class: T([
382
- g(s).b(),
383
- { [g(s).m(p.type)]: p.type },
384
- g(s).is("closable", p.showClose),
385
- g(s).is("plain", p.plain),
382
+ g(a).b(),
383
+ { [g(a).m(p.type)]: p.type },
384
+ g(a).is("closable", p.showClose),
385
+ g(a).is("plain", p.plain),
386
386
  p.customClass
387
387
  ]),
388
388
  style: Se(g(E)),
@@ -394,11 +394,11 @@ const st = [
394
394
  key: 0,
395
395
  value: p.repeatNum,
396
396
  type: g(b),
397
- class: T(g(s).e("badge"))
397
+ class: T(g(a).e("badge"))
398
398
  }, null, 8, ["value", "type", "class"])) : Z("v-if", !0),
399
399
  g(M) ? (P(), ve(g(Oe), {
400
400
  key: 1,
401
- class: T([g(s).e("icon"), g(f)])
401
+ class: T([g(a).e("icon"), g(f)])
402
402
  }, {
403
403
  default: j(() => [
404
404
  (P(), ve(Pt(g(M))))
@@ -409,17 +409,17 @@ const st = [
409
409
  p.dangerouslyUseHTMLString ? (P(), O(fe, { key: 1 }, [
410
410
  Z(" Caution here, message could've been compromised, never use user's input as message "),
411
411
  I("p", {
412
- class: T(g(s).e("content")),
412
+ class: T(g(a).e("content")),
413
413
  innerHTML: p.message
414
414
  }, null, 10, ["innerHTML"])
415
415
  ], 2112)) : (P(), O("p", {
416
416
  key: 0,
417
- class: T(g(s).e("content"))
417
+ class: T(g(a).e("content"))
418
418
  }, ie(p.message), 3))
419
419
  ]),
420
420
  p.showClose ? (P(), ve(g(Oe), {
421
421
  key: 2,
422
- class: T(g(s).e("closeBtn")),
422
+ class: T(g(a).e("closeBtn")),
423
423
  onClick: At(x, ["stop"])
424
424
  }, {
425
425
  default: j(() => [
@@ -457,19 +457,19 @@ const it = (i) => {
457
457
  const { handler: t } = i;
458
458
  t.close();
459
459
  }, hn = ({ appendTo: i, ...e }, t) => {
460
- const n = `message_${cn++}`, o = e.onClose, a = document.createElement("div"), s = {
460
+ const n = `message_${cn++}`, o = e.onClose, s = document.createElement("div"), a = {
461
461
  ...e,
462
462
  id: n,
463
463
  onClose: () => {
464
464
  o?.(), mn(c);
465
465
  },
466
466
  onDestroy: () => {
467
- Te(null, a);
467
+ Te(null, s);
468
468
  }
469
- }, r = F(ln, s, De(s.message) || nt(s.message) ? {
470
- default: De(s.message) ? s.message : () => s.message
469
+ }, r = F(ln, a, De(a.message) || nt(a.message) ? {
470
+ default: De(a.message) ? a.message : () => a.message
471
471
  } : null);
472
- r.appContext = t || le._context, Te(r, a), i.appendChild(a.firstElementChild);
472
+ r.appContext = t || le._context, Te(r, s), i.appendChild(s.firstElementChild);
473
473
  const l = r.component, c = {
474
474
  id: n,
475
475
  vnode: r,
@@ -488,9 +488,9 @@ const it = (i) => {
488
488
  } };
489
489
  const t = it(i);
490
490
  if (t.grouping && H.length) {
491
- const o = H.find(({ vnode: a }) => {
492
- var s;
493
- return ((s = a.props) == null ? void 0 : s.message) === t.message;
491
+ const o = H.find(({ vnode: s }) => {
492
+ var a;
493
+ return ((a = s.props) == null ? void 0 : a.message) === t.message;
494
494
  });
495
495
  if (o)
496
496
  return o.props.repeatNum += 1, o.props.type = t.type, o.handler;
@@ -501,7 +501,7 @@ const it = (i) => {
501
501
  const n = hn(t, e);
502
502
  return H.push(n), n.handler;
503
503
  };
504
- st.forEach((i) => {
504
+ at.forEach((i) => {
505
505
  le[i] = (e = {}, t) => {
506
506
  const n = it(e);
507
507
  return le({ ...n, type: i }, t);
@@ -615,7 +615,7 @@ class pn extends V {
615
615
  * @param next
616
616
  */
617
617
  selectPoint(e) {
618
- let t = this.parent?.findComponentByName("Editor"), n = null, o = null, a = [], s = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), r = t.domContainer.domElement, l = new we([], 16711935), d = new we([
618
+ let t = this.parent?.findComponentByName("Editor"), n = null, o = null, s = [], a = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), r = t.domContainer.domElement, l = new we([], 16711935), d = new we([
619
619
  new m.Vector3(-1e4, 0, 0),
620
620
  new m.Vector3(1e4, 0, 0),
621
621
  new m.Vector3(0, -1e4, 0),
@@ -628,13 +628,13 @@ class pn extends V {
628
628
  linewidth: 0.1
629
629
  }), this.container.add(l);
630
630
  const c = () => {
631
- l.setPoint(...a, n, o), d.position.copy(o), this.container.add(d), d.computeLineDistances();
631
+ l.setPoint(...s, n, o), d.position.copy(o), this.container.add(d), d.computeLineDistances();
632
632
  }, h = new m.Vector3();
633
633
  this.addEventRecord(
634
634
  "clear",
635
635
  t.addEventListener("pointerPositionChange", () => {
636
636
  const { point: y, find: w } = t.renderManager.adsorption();
637
- if (this.dispatchEvent({ type: "pointerMove", point: y }), w ? (s.position.set(y.x, y.y, 0), this.container.add(s), r.style.cursor = "none") : (s.removeFromParent(), r.style.cursor = "crosshair"), h.copy(y), !!(n && o)) {
637
+ if (this.dispatchEvent({ type: "pointerMove", point: y }), w ? (a.position.set(y.x, y.y, 0), this.container.add(a), r.style.cursor = "none") : (a.removeFromParent(), r.style.cursor = "crosshair"), h.copy(y), !!(n && o)) {
638
638
  if (t.eventInput.isKeyDown("shift")) {
639
639
  const b = Math.abs(t.pointerPosition.x - n.x), f = Math.abs(t.pointerPosition.y - n.y);
640
640
  b > f ? o.set(t.pointerPosition.x, n.y, 0) : o.set(n.x, t.pointerPosition.y, 0), c(), h.copy(o);
@@ -649,16 +649,16 @@ class pn extends V {
649
649
  n = h.clone(), o = h.clone(), c();
650
650
  return;
651
651
  }
652
- o = h.clone(), a.push(n.clone(), o.clone()), n.copy(o), c();
652
+ o = h.clone(), s.push(n.clone(), o.clone()), n.copy(o), c();
653
653
  } else if (t.eventInput.isOnlyKeyDowns(this.withdrawalKeys)) {
654
- if (a.length) {
654
+ if (s.length) {
655
655
  const { point: y } = t.renderManager.adsorption();
656
- a.pop(), o?.copy(y), n?.copy(a.pop()), c();
656
+ s.pop(), o?.copy(y), n?.copy(s.pop()), c();
657
657
  }
658
- } else t.eventInput.isKeyDowns(this.confirmKeys) && e(a);
658
+ } else t.eventInput.isKeyDowns(this.confirmKeys) && e(s);
659
659
  }),
660
660
  function() {
661
- l.removeFromParent(), s.removeFromParent(), d.removeFromParent();
661
+ l.removeFromParent(), a.removeFromParent(), d.removeFromParent();
662
662
  }
663
663
  );
664
664
  }
@@ -668,7 +668,7 @@ class pn extends V {
668
668
  end(e, t) {
669
669
  const n = [];
670
670
  for (let o = 0; o < t.length; o += 2)
671
- n.push(new ce(W.from(t[o]), W.from(t[o + 1])));
671
+ n.push(new ce(J.from(t[o]), J.from(t[o + 1])));
672
672
  e(n);
673
673
  }
674
674
  /** 执行完成
@@ -748,9 +748,9 @@ class Be extends Ee {
748
748
  */
749
749
  start() {
750
750
  const e = this.editor, t = e.eventInput, n = new m.Mesh(), o = e.domContainer.domElement;
751
- let a = null;
751
+ let s = null;
752
752
  n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new m.MeshBasicMaterial({ color: 55561 });
753
- const s = () => {
753
+ const a = () => {
754
754
  const r = e.pointerPosition.clone(), l = e.pointerPosition.clone(), d = new m.Mesh();
755
755
  this.container.add(d), d.position.z = 0.05, d.material = new m.MeshBasicMaterial({
756
756
  color: 16777215,
@@ -795,22 +795,22 @@ class Be extends Ee {
795
795
  const { line: r } = e.renderManager.adsorption(0.04);
796
796
  if (r) {
797
797
  const l = r.expandToRectangle(0.025, "bothSides");
798
- n.geometry = e.renderManager.createGeometry({ position: l.createGeometry() }, 6), this.container.add(n), o.style.cursor = "pointer", a = r;
798
+ n.geometry = e.renderManager.createGeometry({ position: l.createGeometry() }, 6), this.container.add(n), o.style.cursor = "pointer", s = r;
799
799
  } else
800
- n.removeFromParent(), o.style.cursor = "default", a = null;
800
+ n.removeFromParent(), o.style.cursor = "default", s = null;
801
801
  }),
802
802
  t.addEventListener("codeChange", () => {
803
803
  if (t.isKeyDown("mouse_0")) {
804
- if (!a) return s();
804
+ if (!s) return a();
805
805
  if (t.isKeyDown("alt"))
806
- return this.removeSelectLine(a);
807
- t.isKeyDown("control") || this.removeSelectLineAll(), this.addSelectLine(a);
806
+ return this.removeSelectLine(s);
807
+ t.isKeyDown("control") || this.removeSelectLineAll(), this.addSelectLine(s);
808
808
  } else if (t.isKeyDown("mouse_1")) {
809
- if (!a) return;
810
- this.removeSelectLine(a);
809
+ if (!s) return;
810
+ this.removeSelectLine(s);
811
811
  } else if (t.isKeyDown("mouse_2")) {
812
- if (!a) return;
813
- this.addSelectLine(a);
812
+ if (!s) return;
813
+ this.addSelectLine(s);
814
814
  } else t.isKeyDowns(["control", "z"]) ? e.commandManager.rollback() : t.isKeyDowns(["control", "y"]) && e.commandManager.revokeRollback();
815
815
  }),
816
816
  function() {
@@ -902,18 +902,18 @@ class vn extends Xe {
902
902
  throw new Error(`命令流 ${e} 不存在`);
903
903
  this.lock = !0, this.abortController = new AbortController(), this.currentName = e, o.dispatchEvent({ type: "started" }), this.dispatchEvent({ type: "started", name: e });
904
904
  try {
905
- for (let a = n; a < o.list.length; a++) {
906
- const s = o.list[a];
907
- if (o.dispatchEvent({ type: "executing", index: a }), this.dispatchEvent({ type: "executing", name: e, index: a }), t = await new Promise((r) => {
908
- this.resolve = r, s(r, t);
905
+ for (let s = n; s < o.list.length; s++) {
906
+ const a = o.list[s];
907
+ if (o.dispatchEvent({ type: "executing", index: s }), this.dispatchEvent({ type: "executing", name: e, index: s }), t = await new Promise((r) => {
908
+ this.resolve = r, a(r, t);
909
909
  }), this.abortController.signal.aborted) {
910
- o.dispatchEvent({ type: "executionInterrupt", index: a }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: a }), this.dispatchEvent({ type: "cancel", name: e });
910
+ o.dispatchEvent({ type: "executionInterrupt", index: s }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: s }), this.dispatchEvent({ type: "cancel", name: e });
911
911
  break;
912
912
  } else
913
- o.dispatchEvent({ type: "executionCompleted", index: a, data: t }), this.dispatchEvent({ type: "executionCompleted", name: e, index: a, data: t });
913
+ o.dispatchEvent({ type: "executionCompleted", index: s, data: t }), this.dispatchEvent({ type: "executionCompleted", name: e, index: s, data: t });
914
914
  }
915
- } catch (a) {
916
- console.error(a);
915
+ } catch (s) {
916
+ console.error(s);
917
917
  } finally {
918
918
  this.abortController && !this.abortController.signal.aborted && (o.dispatchEvent({ type: "completed", data: t }), this.dispatchEvent({ type: "completed", name: e, data: t }), o.writeOperationList && (this.operationList.push({ name: e, data: t }), this.rollbackList.length = 0)), this.lock = !1, this.abortController = null, this.currentName = null, o.dispatchEvent({ type: "finally" }), this.dispatchEvent({ type: "finally", name: e }), this.executionResolve && (this.executionResolve(null), this.executionResolve = null);
919
919
  }
@@ -933,7 +933,7 @@ class vn extends Xe {
933
933
  if (!e) return !1;
934
934
  const t = this.commandFlowMap.get(e.name);
935
935
  if (!t) return !1;
936
- const n = t.rollbacklist.reduce((o, a) => a(o), e.data);
936
+ const n = t.rollbacklist.reduce((o, s) => s(o), e.data);
937
937
  return this.dispatchEvent({ type: "rollback", name: e.name }), this.rollbackList.push({
938
938
  data: n,
939
939
  name: e.name
@@ -951,7 +951,7 @@ class vn extends Xe {
951
951
  if (!e) return !1;
952
952
  const t = this.commandFlowMap.get(e.name);
953
953
  if (!t) return !1;
954
- const n = t.revokeRollbacklist.reduce((o, a) => a(o), e.data);
954
+ const n = t.revokeRollbacklist.reduce((o, s) => s(o), e.data);
955
955
  return this.dispatchEvent({ type: "revokeRollback", name: e.name }), this.operationList.push({ name: e.name, data: n }), !0;
956
956
  } catch (e) {
957
957
  throw new Error(`撤回回滚失败:${e}`);
@@ -1000,15 +1000,15 @@ const fn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
1000
1000
  }, Symbol.toStringTag, { value: "Module" })), Gn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902547951'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5129'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M59.355%2091.776v867.881h867.881V91.776H59.356zM897.31%20929.73H89.282V121.703h808.027V929.73z'%20fill=''%20p-id='5130'%3e%3c/path%3e%3cpath%20d='M833.964%20185.048H152.627v681.337h681.337V185.048z%20m-355.632%20651.41H182.554V532.2h295.778v304.257z%20m0-334.184H182.554V214.975h295.778v287.299z%20m325.705%20334.184H508.259V532.2h295.778v304.257z%20m0-334.184H508.259V214.975h295.778v287.299z'%20fill=''%20p-id='5131'%3e%3c/path%3e%3c/svg%3e", Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1001
1001
  __proto__: null,
1002
1002
  default: Gn
1003
- }, Symbol.toStringTag,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VjskV+sxH6+5B6T31/sgGaojyAzRJk5JhNAkGR0NJyBAILMEGXmmEwAQZLR0XAGAggyQ5Trz3GYJyLIMKFkIiUIIEgJqvQ5DAEEGSaUTKQEAQQpQZU+hyGAIMOEcpaJ1J0ngtTlzdM6I4AgnQWM4dYlgCB1efO0zgggSGcBY7h1CSBIXd48rWUCK2NDkBUoXIKAI4AgjgRHCKwQQJAVKFyCgCOAII4ERwisEECQFShcgoAjkEsQ1x9HCAxFAEGGCieTyU0AQXITpb+hCCDIUOFkMrkJIEhuovQ3FIEOBBmKN5PpjACCdBYwhluXAILU5c3TOiOAIJ0FjOHWJYAgdXnztM4IzC1IZ8FiuPUJIEh95jyxIwII0lGwGGp9AghSnzlP7IgAgnQULIZanwCCFGJOt2MQ+AEAAP//U3PGlQAAAAZJREFUAwA3ILMm/jaVEAAAAABJRU5ErkJggg==", Jn = new m.TextureLoader(), Wn = Jn.load(Hn);
1004
- class qn extends Ee {
1003
+ }, Symbol.toStringTag, { value: "Module" })), Hn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAKdUlEQVR4AeydbZrUKBRGq2YjOjvpWYntStSVjK5EdzLOSsr7arBLOkkBAcLHmacwlQQInMsZUvdP/3Xhv+oEbrfbk5XYz1P1gfLAC4KwCCCwQwBBduBwCwIIwhqAwA4BBNmBwy0IFBQEuBDonwCC9B9DZlCQAIIUhEvX/RNAkP5jyAwKEkCQgnDpun8CfQrSP3dm0AkBBOkkUAzzHAIIcg53ntoJAQTpJFAM8xwCCHIOd57aCQEE8QLFKQTuCSDIPQ2+Q8AjgCAeEE4hcE8AQe5p8B0CHgEE8YBwCoF7AghyT6Psd3rvkACCdBg0hlyPAILUY82TOiSAIB0GjSHXI4Ag9VjzpA4JIEiHQXs9ZK6UIoAgpcjS7xAEEGSIMDKJUgQQpBRZ+h2CAIIMEUYmUYoAgpQiO0q/k88DQSZfAEx/nwCC7PPh7uQEEGTyBcD09wkgyD4f7k5O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RJCNQk0OvVNo9MvYa1ZUk0StXVCMqbxNAkG02UXdMDi3Mkhmr0PGQ2QolFVAPQQIgPaqyyHHmzuEPkcyWTyTxHEESwXnNJIder7zLp51qNyOzlQH/TIJkwPW6C9s9WpPDDVKJAjJbjkbiEUESwamZyaFFqKLTFot+tJPZOhAZBEmEZ3LolUq7R2IP1ZpJEr1yVXvgSA9CkIRomhxacC1krEJHT2YrlJRXD0E8II9OFzl62Dn8qZDZ8okEnCNIACSviuTQ69Xd5S6+atcjsxUZKgSJAGa7R69yuFkqoUBmy9EIOCJIACRVMTm0uFR02nPRj3YyW4ERRJAAUCaHXqm0ewTU7qKKJNErVxeDPXOQCPKAvsmhhdRTxurBjH7fJrP1G8X2FwTZZnNZ5Dh359gZX4ZbZLYeQESQfUCSQ69X+7X6vavdkczWTvwQZAOO7R6jy+FmrsQDmS1HwzsiiAdEpyaHFo2KTmco+tFOZmsl0giyAsUuvbHysWD5bH3HftSm5JhixzNFfQRZCfP1ev10LVjskV+sxH6+5B6T31/sgGaojyAzRJk5JhNAkGR0NJyBAILMEGXmmEwAQZLR0XAGAggyQ5Trz3GYJyLIMKFkIiUIIEgJqvQ5DAEEGSaUTKQEAQQpQZU+hyGAIMOEcpaJ1J0ngtTlzdM6I4AgnQWM4dYlgCB1efO0zgggSGcBY7h1CSBIXd48rWUCK2NDkBUoXIKAI4AgjgRHCKwQQJAVKFyCgCOAII4ERwisEECQFShcgoAjkEsQ1x9HCAxFAEGGCieTyU0AQXITpb+hCCDIUOFkMrkJIEhuovQ3FIEOBBmKN5PpjACCdBYwhluXAILU5c3TOiOAIJ0FjOHWJYAgdXnztM4IzC1IZ8FiuPUJIEh95jyxIwII0lGwGGp9AghSnzlP7IgAgnQULIZanwCCFGJOt2MQ+AEAAP//U3PGlQAAAAZJREFUAwA3ILMm/jaVEAAAAABJRU5ErkJggg==", Wn = new m.TextureLoader(), Jn = Wn.load(Hn);
1004
+ class Un extends Ee {
1005
1005
  static name = "RenderManager";
1006
1006
  container = new m.Group();
1007
1007
  lines = [];
1008
1008
  pointVirtualGrid = new Fe();
1009
1009
  quadtree = new ze(new Ye());
1010
1010
  actionHistory = /* @__PURE__ */ new Set();
1011
- verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: Wn, color: 58111, transparent: !0 }));
1011
+ verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: Jn, color: 58111, transparent: !0 }));
1012
1012
  onAddFromParent() {
1013
1013
  const e = this.dxfLineModel;
1014
1014
  this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new m.LineBasicMaterial({
@@ -1090,15 +1090,15 @@ class qn extends Ee {
1090
1090
  draw(e = !0) {
1091
1091
  this.container.clear();
1092
1092
  const t = [], n = [], o = [];
1093
- this.lines.forEach((a) => {
1094
- if (a.points.forEach((s) => {
1095
- a.userData.isDoor ? n.push(s.x, s.y, 0) : t.push(s.x, s.y, 0);
1096
- }), a.userData.isWindow && a.userData.drawWindow && a.userData.drawWindow.forEach(({ width: s, p: r }) => {
1097
- const l = W.from(r), d = a.direction(), c = l.clone().add(d.clone().multiplyScalar(s * 0.5)), h = l.clone().add(d.clone().multiplyScalar(-s * 0.5));
1093
+ this.lines.forEach((s) => {
1094
+ if (s.points.forEach((a) => {
1095
+ s.userData.isDoor ? n.push(a.x, a.y, 0) : t.push(a.x, a.y, 0);
1096
+ }), s.userData.isWindow && s.userData.drawWindow && s.userData.drawWindow.forEach(({ width: a, p: r }) => {
1097
+ const l = J.from(r), d = s.direction(), c = l.clone().add(d.clone().multiplyScalar(a * 0.5)), h = l.clone().add(d.clone().multiplyScalar(-a * 0.5));
1098
1098
  o.push(c.x, c.y, 1e-3), o.push(h.x, h.y, 1e-3);
1099
- }), a.userData.isVerticalReferenceLine) {
1100
- const s = a.center;
1101
- this.verticalReferenceLineFlag.position.set(s.x, s.y, 0), this.container.add(this.verticalReferenceLineFlag);
1099
+ }), s.userData.isVerticalReferenceLine) {
1100
+ const a = s.center;
1101
+ this.verticalReferenceLineFlag.position.set(a.x, a.y, 0), this.container.add(this.verticalReferenceLineFlag);
1102
1102
  }
1103
1103
  }), t.length && this.renderer.createLineSegments({
1104
1104
  position: t
@@ -1119,17 +1119,17 @@ class qn extends Ee {
1119
1119
  * @returns
1120
1120
  */
1121
1121
  adsorption(e = 0.1, t = this.pointVirtualGrid, n = this.quadtree) {
1122
- const o = this.parent?.findComponentByName("Editor"), a = W.from(o.pointerPosition), s = t.queryCircle(a, e).sort((l, d) => l.point.distance(a) - d.point.distance(a));
1123
- if (s.length) return {
1124
- point: new m.Vector3(s[0].point.x, s[0].point.y, 0),
1122
+ const o = this.parent?.findComponentByName("Editor"), s = J.from(o.pointerPosition), a = t.queryCircle(s, e).sort((l, d) => l.point.distance(s) - d.point.distance(s));
1123
+ if (a.length) return {
1124
+ point: new m.Vector3(a[0].point.x, a[0].point.y, 0),
1125
1125
  find: !0,
1126
1126
  mode: "point",
1127
- line: s[0].userData
1127
+ line: a[0].userData
1128
1128
  };
1129
- let r = n.queryCircle(a, e);
1129
+ let r = n.queryCircle(s, e);
1130
1130
  if (r.length) {
1131
- let l = r.map((d) => d.line.projectPoint(a));
1132
- return l.sort((d, c) => d && c ? d.distance(a) - c.distance(a) : 0), r = r.filter((d, c) => !!l[c]), l = l.filter((d, c) => !!l[c]), {
1131
+ let l = r.map((d) => d.line.projectPoint(s));
1132
+ return l.sort((d, c) => d && c ? d.distance(s) - c.distance(s) : 0), r = r.filter((d, c) => !!l[c]), l = l.filter((d, c) => !!l[c]), {
1133
1133
  point: new m.Vector3(l[0].x, l[0].y, 0),
1134
1134
  find: !0,
1135
1135
  mode: "line",
@@ -1155,7 +1155,7 @@ class qn extends Ee {
1155
1155
  */
1156
1156
  toJson() {
1157
1157
  return this.lines.map((e) => {
1158
- const t = e.userData, n = t.drawWindow, o = this.quadtree.queryLineSegment(e).filter((a) => a.line !== e && !a.userData?.isDoor).map((a) => ({ index: this.lines.indexOf(a.line) }));
1158
+ const t = e.userData, n = t.drawWindow, o = this.quadtree.queryLineSegment(e).filter((s) => s.line !== e && !s.userData?.isDoor).map((s) => ({ index: this.lines.indexOf(s.line) }));
1159
1159
  return {
1160
1160
  start: e.start.toJson(this.dxf.originalZAverage),
1161
1161
  end: e.end.toJson(this.dxf.originalZAverage),
@@ -1165,10 +1165,10 @@ class qn extends Ee {
1165
1165
  length: e.length(),
1166
1166
  isWindow: t.isWindow,
1167
1167
  isVerticalReferenceLine: t.isVerticalReferenceLine,
1168
- drawWindow: n && n.map((a) => ({
1169
- p: { x: a.p.x, y: a.p.y, z: a.p.z },
1170
- width: a.width,
1171
- full: a.full
1168
+ drawWindow: n && n.map((s) => ({
1169
+ p: { x: s.p.x, y: s.p.y, z: s.p.z },
1170
+ width: s.width,
1171
+ full: s.full
1172
1172
  }))
1173
1173
  };
1174
1174
  });
@@ -1209,7 +1209,7 @@ class qn extends Ee {
1209
1209
  return this.parent?.findComponentByName("DxfLineModel");
1210
1210
  }
1211
1211
  }
1212
- class Un extends V {
1212
+ class qn extends V {
1213
1213
  static name = "DrawDoorLine";
1214
1214
  container = new m.Group();
1215
1215
  interruptKeys = ["escape"];
@@ -1219,8 +1219,8 @@ class Un extends V {
1219
1219
  super.onAddFromParent(e);
1220
1220
  const t = e.findComponentByName("Editor"), n = t.eventInput, o = t.commandManager;
1221
1221
  this.editor.container.add(this.container);
1222
- const a = this.commandManager.addCommandFlow("draw-door-line").add(this.createInterrupt()).add(this.createCursor("no-drop")).add(this.selectPoint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1223
- n.addKeyCombination(this.commandName, this.shortcutKeys), a.addEventListener("finally", this.createFinally()), a.addEventListener("completed", (s) => this.completed(s.data)), n.addCancelDefaultBehavior(() => n.isOnlyKeyDowns(this.shortcutKeys)), n.addEventListener("codeChange", async () => {
1222
+ const s = this.commandManager.addCommandFlow("draw-door-line").add(this.createInterrupt()).add(this.createCursor("no-drop")).add(this.selectPoint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1223
+ n.addKeyCombination(this.commandName, this.shortcutKeys), s.addEventListener("finally", this.createFinally()), s.addEventListener("completed", (a) => this.completed(a.data)), n.addCancelDefaultBehavior(() => n.isOnlyKeyDowns(this.shortcutKeys)), n.addEventListener("codeChange", async () => {
1224
1224
  n.isKeyCombination(this.commandName) && await o.start(this.commandName);
1225
1225
  });
1226
1226
  }
@@ -1228,24 +1228,24 @@ class Un extends V {
1228
1228
  * @param next
1229
1229
  */
1230
1230
  selectPoint(e) {
1231
- let t = this.parent?.findComponentByName("Editor"), n = null, o = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), a = new we([], 16711935), s = new we([
1231
+ let t = this.parent?.findComponentByName("Editor"), n = null, o = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), s = new we([], 16711935), a = new we([
1232
1232
  new m.Vector3(-1e4, 0, 0),
1233
1233
  new m.Vector3(1e4, 0, 0),
1234
1234
  new m.Vector3(0, -1e4, 0),
1235
1235
  new m.Vector3(0, 1e4, 0)
1236
1236
  ], 16711935);
1237
- s.material = new m.LineDashedMaterial({
1237
+ a.material = new m.LineDashedMaterial({
1238
1238
  color: 4235007,
1239
1239
  dashSize: 0.1,
1240
1240
  gapSize: 0.1,
1241
1241
  linewidth: 0.1
1242
- }), this.container.add(a);
1242
+ }), this.container.add(s);
1243
1243
  let r = null;
1244
1244
  this.addEventRecord(
1245
1245
  "clear",
1246
1246
  t.addEventListener("pointerPositionChange", () => {
1247
1247
  const { point: l, find: d } = t.renderManager.adsorption(0.05);
1248
- n && a.setPoint(n, l), this.dispatchEvent({ type: "pointerMove", point: l }), d ? (o.position.set(l.x, l.y, 0), this.container.add(o), this.domElement.style.cursor = "none", r = l.clone()) : (r = null, o.removeFromParent(), this.domElement.style.cursor = "no-drop");
1248
+ n && s.setPoint(n, l), this.dispatchEvent({ type: "pointerMove", point: l }), d ? (o.position.set(l.x, l.y, 0), this.container.add(o), this.domElement.style.cursor = "none", r = l.clone()) : (r = null, o.removeFromParent(), this.domElement.style.cursor = "no-drop");
1249
1249
  }),
1250
1250
  t.eventInput.addEventListener("codeChange", async () => {
1251
1251
  if (t.eventInput.isKeyDown("mouse_0") && r) {
@@ -1257,7 +1257,7 @@ class Un extends V {
1257
1257
  }
1258
1258
  }),
1259
1259
  function() {
1260
- a.removeFromParent(), o.removeFromParent(), s.removeFromParent();
1260
+ s.removeFromParent(), o.removeFromParent(), a.removeFromParent();
1261
1261
  }
1262
1262
  );
1263
1263
  }
@@ -1269,8 +1269,8 @@ class Un extends V {
1269
1269
  end(e, t) {
1270
1270
  const n = [];
1271
1271
  for (let o = 0; o < t.length; o += 2) {
1272
- const a = new ce(W.from(t[o]), W.from(t[o + 1]));
1273
- a.userData.isDoor = !0, a.userData.doorDirectConnection = !0, n.push(a);
1272
+ const s = new ce(J.from(t[o]), J.from(t[o + 1]));
1273
+ s.userData.isDoor = !0, s.userData.doorDirectConnection = !0, n.push(s);
1274
1274
  }
1275
1275
  e(n);
1276
1276
  }
@@ -1310,8 +1310,8 @@ class Zn extends V {
1310
1310
  selectPointStart(e) {
1311
1311
  let t = null, n = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
1312
1312
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
1313
- const { point: a, line: s, find: r } = this.editor.renderManager.adsorption();
1314
- this.dispatchEvent({ type: "pointerMove", point: a }), r ? (this.domElement.style.cursor = "none", n.position.copy(a), o = s, t = a.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
1313
+ const { point: s, line: a, find: r } = this.editor.renderManager.adsorption();
1314
+ this.dispatchEvent({ type: "pointerMove", point: s }), r ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
1315
1315
  })).add(this.eventInput.addEventListener("codeChange", () => {
1316
1316
  this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: o }));
1317
1317
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
@@ -1320,10 +1320,10 @@ class Zn extends V {
1320
1320
  * @param next
1321
1321
  */
1322
1322
  selectPointEnd(e, { point: t, line: n }) {
1323
- let o = null, a = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 }));
1324
- this.addEventRecord("clear").add(() => a.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
1325
- const { point: s, find: r, line: l } = this.editor.renderManager.adsorption();
1326
- this.dispatchEvent({ type: "pointerMove", point: s }), r && l === n ? (this.domElement.style.cursor = "none", a.position.copy(s), o = s.clone(), this.container.add(a)) : (this.domElement.style.cursor = "no-drop", o = null, a.removeFromParent());
1323
+ let o = null, s = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 }));
1324
+ this.addEventRecord("clear").add(() => s.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
1325
+ const { point: a, find: r, line: l } = this.editor.renderManager.adsorption();
1326
+ this.dispatchEvent({ type: "pointerMove", point: a }), r && l === n ? (this.domElement.style.cursor = "none", s.position.copy(a), o = a.clone(), this.container.add(s)) : (this.domElement.style.cursor = "no-drop", o = null, s.removeFromParent());
1327
1327
  })).add(this.eventInput.addEventListener("codeChange", () => {
1328
1328
  this.eventInput.isKeyDown("mouse_0") && o && e({ line: n, start: t, end: o });
1329
1329
  }));
@@ -1334,8 +1334,8 @@ class Zn extends V {
1334
1334
  * @param points
1335
1335
  */
1336
1336
  end(e, { start: t, end: n, line: o }) {
1337
- const a = new ce(W.from(t), W.from(n)), s = a.center, r = a.length(), l = {
1338
- p: new m.Vector3(s.x, s.y, 0),
1337
+ const s = new ce(J.from(t), J.from(n)), a = s.center, r = s.length(), l = {
1338
+ p: new m.Vector3(a.x, a.y, 0),
1339
1339
  width: r,
1340
1340
  full: Math.abs(r - o.length()) < 0.01
1341
1341
  };
@@ -1394,7 +1394,7 @@ class de extends V {
1394
1394
  lineIsPathEnd(e) {
1395
1395
  for (let t = 0; t < e.points.length; t++) {
1396
1396
  const n = e.points[t];
1397
- if (this.renderManager.pointVirtualGrid.queryPoint(n).filter((a) => !a.point.equal(n)).length === 0) return !0;
1397
+ if (this.renderManager.pointVirtualGrid.queryPoint(n).filter((s) => !s.point.equal(n)).length === 0) return !0;
1398
1398
  }
1399
1399
  return !1;
1400
1400
  }
@@ -1412,7 +1412,7 @@ class de extends V {
1412
1412
  * @param point2
1413
1413
  */
1414
1414
  getSamePointAll(e, t) {
1415
- const n = this.renderManager.pointVirtualGrid.queryPoint(e), o = n.filter((a) => t !== a.userData && a.userData?.directionEqual(t));
1415
+ const n = this.renderManager.pointVirtualGrid.queryPoint(e), o = n.filter((s) => t !== s.userData && s.userData?.directionEqual(t));
1416
1416
  return {
1417
1417
  queryList: n,
1418
1418
  parallelList: o
@@ -1426,9 +1426,9 @@ class de extends V {
1426
1426
  */
1427
1427
  setLine(e, t, n, o = []) {
1428
1428
  e.direction();
1429
- const a = e.start.equal(t) ? e.start : e.end, s = e.start.equal(t) ? e.end : e.start;
1430
- e.clone().set(a, s);
1431
- const { queryList: r, parallelList: l } = this.getSamePointAll(a, e);
1429
+ const s = e.start.equal(t) ? e.start : e.end, a = e.start.equal(t) ? e.end : e.start;
1430
+ e.clone().set(s, a);
1431
+ const { queryList: r, parallelList: l } = this.getSamePointAll(s, e);
1432
1432
  r.forEach((d) => {
1433
1433
  });
1434
1434
  }
@@ -1445,19 +1445,19 @@ class de extends V {
1445
1445
  correction(e, t, n = [], o = /* @__PURE__ */ new Set()) {
1446
1446
  if (o.has(e)) return;
1447
1447
  o.add(e);
1448
- const a = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: d }) => !(d === e || d.userData.isDoor || o.has(d))).map((d) => d.line), s = e.direction(), [r, l] = a.reduce((d, c) => {
1448
+ const s = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: d }) => !(d === e || d.userData.isDoor || o.has(d))).map((d) => d.line), a = e.direction(), [r, l] = s.reduce((d, c) => {
1449
1449
  const [h, y] = d;
1450
1450
  return t && (c.start.equal(t) || c.end.equal(t)) || (e.sameEndpoint(c) ? h.push(c) : y.push(c)), d;
1451
1451
  }, [[], []]);
1452
1452
  return r.filter((d) => {
1453
- const c = d.direction(), h = s.angleBetween(c, "angle");
1453
+ const c = d.direction(), h = a.angleBetween(c, "angle");
1454
1454
  if (Math.abs(90 - h) > 20) return !1;
1455
1455
  const w = e.sameEndpointAsStart(d) ? e.start : e.end, b = d.sameEndpointAsStart(e) ? d.end : d.start;
1456
1456
  if (o.has(b))
1457
1457
  return !1;
1458
1458
  const f = new ce(
1459
- b.clone().add(s.clone().multiplyScalar(1)),
1460
- b.clone().add(s.clone().multiplyScalar(-1))
1459
+ b.clone().add(a.clone().multiplyScalar(1)),
1460
+ b.clone().add(a.clone().multiplyScalar(-1))
1461
1461
  ), M = f.projectPoint(w, !1);
1462
1462
  if (M) {
1463
1463
  const { queryList: L, parallelList: A } = this.getSamePointAll(b, d), G = L.map((E) => {
@@ -1477,8 +1477,8 @@ class de extends V {
1477
1477
  x.add(E);
1478
1478
  const _ = E.sameEndpointAsStart(K) ? E.end : E.start, p = k.projectPoint(_, !1);
1479
1479
  if (p) {
1480
- const { queryList: q, parallelList: R } = this.getSamePointAll(_, E);
1481
- if (K = E.clone(), q.forEach((Y) => {
1480
+ const { queryList: U, parallelList: R } = this.getSamePointAll(_, E);
1481
+ if (K = E.clone(), U.forEach((Y) => {
1482
1482
  const he = {
1483
1483
  point: Y.point,
1484
1484
  oldPoint: Y.point.clone(),
@@ -1497,7 +1497,7 @@ class de extends V {
1497
1497
  G.map((E) => E.point.copy(E.newPoint)), n.push(G);
1498
1498
  }
1499
1499
  return !1;
1500
- }), this.recursion && a.forEach((d) => this.correction(d, void 0, n, o)), n;
1500
+ }), this.recursion && s.forEach((d) => this.correction(d, void 0, n, o)), n;
1501
1501
  }
1502
1502
  /** 开始
1503
1503
  * @param next
@@ -1511,8 +1511,8 @@ class de extends V {
1511
1511
  completed(e) {
1512
1512
  e.forEach((t) => {
1513
1513
  t.forEach((n) => {
1514
- const { line: o, newPoint: a, point: s } = n;
1515
- s.copy(a), this.renderManager.removeLine(o), this.renderManager.addLine(o);
1514
+ const { line: o, newPoint: s, point: a } = n;
1515
+ a.copy(s), this.renderManager.removeLine(o), this.renderManager.addLine(o);
1516
1516
  });
1517
1517
  }), this.renderManager.draw();
1518
1518
  }
@@ -1523,8 +1523,8 @@ class de extends V {
1523
1523
  for (let t = e.length - 1; t >= 0; t--) {
1524
1524
  const n = e[t];
1525
1525
  for (let o = n.length - 1; o >= 0; o--) {
1526
- const a = n[o], { line: s, oldPoint: r, point: l } = a;
1527
- l.copy(r), this.renderManager.removeLine(s), this.renderManager.addLine(s);
1526
+ const s = n[o], { line: a, oldPoint: r, point: l } = s;
1527
+ l.copy(r), this.renderManager.removeLine(a), this.renderManager.addLine(a);
1528
1528
  }
1529
1529
  }
1530
1530
  return this.renderManager.draw(), e;
@@ -1560,12 +1560,12 @@ class X extends V {
1560
1560
  */
1561
1561
  mergeLine(e, t) {
1562
1562
  const n = t[0], o = t[1];
1563
- for (let a = 0; a < n.points.length; a++) {
1564
- const s = n.points[a];
1563
+ for (let s = 0; s < n.points.length; s++) {
1564
+ const a = n.points[s];
1565
1565
  for (let r = 0; r < o.points.length; r++) {
1566
1566
  const l = o.points[r];
1567
- if (s.equal(l)) {
1568
- const d = n.points[(a + 1) % 2], c = o.points[(r + 1) % 2], h = new ce(d, c);
1567
+ if (a.equal(l)) {
1568
+ const d = n.points[(s + 1) % 2], c = o.points[(r + 1) % 2], h = new ce(d, c);
1569
1569
  return e({ line1: n, line2: o, newLine: h }), D({ message: "已合并", type: "success" });
1570
1570
  }
1571
1571
  }
@@ -1648,15 +1648,15 @@ class ee extends V {
1648
1648
  * @param next
1649
1649
  */
1650
1650
  connection(e, t) {
1651
- let n, o, a = 1 / 0;
1652
- for (let s = 0; s < 2; s++)
1651
+ let n, o, s = 1 / 0;
1652
+ for (let a = 0; a < 2; a++)
1653
1653
  for (let r = 0; r < 2; r++) {
1654
- const l = t[0].points[s], d = t[1].points[r], c = l.distance(d);
1655
- c < a && (n = l, o = d, a = c);
1654
+ const l = t[0].points[a], d = t[1].points[r], c = l.distance(d);
1655
+ c < s && (n = l, o = d, s = c);
1656
1656
  }
1657
1657
  if (n && o) {
1658
- const s = new ce(n.clone(), o.clone());
1659
- e(s), D({ message: "连接成功", type: "success" });
1658
+ const a = new ce(n.clone(), o.clone());
1659
+ e(a), D({ message: "连接成功", type: "success" });
1660
1660
  } else this.cancel();
1661
1661
  }
1662
1662
  /** 成功
@@ -1701,12 +1701,12 @@ class te extends V {
1701
1701
  * @param next
1702
1702
  */
1703
1703
  connection(e, t) {
1704
- const n = t[0], o = t[1], a = t[0].getIntersection(t[1]);
1705
- if (!a) return;
1706
- const s = n.points.map((c) => c.clone()), r = o.points.map((c) => c.clone());
1707
- n.start.distance(a) < n.end.distance(a) ? n.start.copy(a) : n.end.copy(a), o.start.distance(a) < o.end.distance(a) ? o.start.copy(a) : o.end.copy(a);
1704
+ const n = t[0], o = t[1], s = t[0].getIntersection(t[1]);
1705
+ if (!s) return;
1706
+ const a = n.points.map((c) => c.clone()), r = o.points.map((c) => c.clone());
1707
+ n.start.distance(s) < n.end.distance(s) ? n.start.copy(s) : n.end.copy(s), o.start.distance(s) < o.end.distance(s) ? o.start.copy(s) : o.end.copy(s);
1708
1708
  const l = n.points.map((c) => c.clone()), d = o.points.map((c) => c.clone());
1709
- e({ line1: n, line2: o, oldLine1: s, oldLine2: r, newLine1: l, newLine2: d }), D({ message: "连接成功", type: "success" });
1709
+ e({ line1: n, line2: o, oldLine1: a, oldLine2: r, newLine1: l, newLine2: d }), D({ message: "连接成功", type: "success" });
1710
1710
  }
1711
1711
  /** 执行完成
1712
1712
  * @param next
@@ -1719,8 +1719,8 @@ class te extends V {
1719
1719
  * @param data
1720
1720
  */
1721
1721
  rollback(e) {
1722
- const { line1: t, line2: n, oldLine1: o, oldLine2: a } = e;
1723
- return this.renderManager.removeLine(t), this.renderManager.removeLine(n), t.set(...o), n.set(...a), this.renderManager.addLines([t, n]), this.renderManager.draw(), e;
1722
+ const { line1: t, line2: n, oldLine1: o, oldLine2: s } = e;
1723
+ return this.renderManager.removeLine(t), this.renderManager.removeLine(n), t.set(...o), n.set(...s), this.renderManager.addLines([t, n]), this.renderManager.draw(), e;
1724
1724
  }
1725
1725
  /** 撤回回滚
1726
1726
  * @param lines
@@ -1752,10 +1752,10 @@ class ne extends V {
1752
1752
  */
1753
1753
  end(e, t) {
1754
1754
  let n = !1, o = [];
1755
- t.forEach((a) => {
1756
- a.userData.isWindow && (o.push({
1757
- line: a,
1758
- drawDoorData: a.userData.drawDoorData
1755
+ t.forEach((s) => {
1756
+ s.userData.isWindow && (o.push({
1757
+ line: s,
1758
+ drawDoorData: s.userData.drawDoorData
1759
1759
  }), n = !0);
1760
1760
  }), n && D({ message: "删除窗户成功", type: "success" }), e(o);
1761
1761
  }
@@ -1824,15 +1824,15 @@ class oe extends V {
1824
1824
  return this.completed(e), e;
1825
1825
  }
1826
1826
  }
1827
- class ae extends V {
1827
+ class se extends V {
1828
1828
  static name = "ViewAngle";
1829
1829
  shortcutKeys = ["r"];
1830
1830
  static commandName = "viewAngle";
1831
1831
  onAddFromParent(e) {
1832
1832
  super.onAddFromParent(e);
1833
- const t = this.commandManager.addCommandFlow(ae.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
1834
- t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ae.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1835
- this.eventInput.isKeyCombination(ae.commandName) && await this.commandManager.start(ae.commandName, [...this.default.selectLines]);
1833
+ const t = this.commandManager.addCommandFlow(se.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
1834
+ t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(se.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1835
+ this.eventInput.isKeyCombination(se.commandName) && await this.commandManager.start(se.commandName, [...this.default.selectLines]);
1836
1836
  }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
1837
1837
  }
1838
1838
  /**
@@ -1847,19 +1847,19 @@ class ae extends V {
1847
1847
  * @param selectLines
1848
1848
  */
1849
1849
  viewAngle(e, t) {
1850
- const [n, o] = t, a = Math.min(0.5, n.length(), o.length());
1851
- let s, r, l, d = 0, c = 0;
1852
- n.sameEndpointAsStart(o) ? (s = n.start, r = n.end) : (s = n.end, r = n.start), o.sameEndpointAsStart(n) ? l = o.end : l = o.start;
1850
+ const [n, o] = t, s = Math.min(0.5, n.length(), o.length());
1851
+ let a, r, l, d = 0, c = 0;
1852
+ n.sameEndpointAsStart(o) ? (a = n.start, r = n.end) : (a = n.end, r = n.start), o.sameEndpointAsStart(n) ? l = o.end : l = o.start;
1853
1853
  function h(x, _) {
1854
- const p = _.x - x.x, q = _.y - x.y;
1855
- let R = Math.atan2(q, p) * (180 / Math.PI);
1854
+ const p = _.x - x.x, U = _.y - x.y;
1855
+ let R = Math.atan2(U, p) * (180 / Math.PI);
1856
1856
  return R < 0 && (R += 360), R;
1857
1857
  }
1858
- const y = h(s, r), w = h(s, l), b = Math.min(y, w), f = Math.max(y, w), M = [];
1858
+ const y = h(a, r), w = h(a, l), b = Math.min(y, w), f = Math.max(y, w), M = [];
1859
1859
  function L(x, _) {
1860
1860
  for (let p = x; p <= _; p++) {
1861
- const q = Math.cos(p * Math.PI / 180) * a + s.x, R = Math.sin(p * Math.PI / 180) * a + s.y, Y = Math.cos((p + 1) * Math.PI / 180) * a + s.x, he = Math.sin((p + 1) * Math.PI / 180) * a + s.y;
1862
- M.push(q, R, 0, Y, he, 0);
1861
+ const U = Math.cos(p * Math.PI / 180) * s + a.x, R = Math.sin(p * Math.PI / 180) * s + a.y, Y = Math.cos((p + 1) * Math.PI / 180) * s + a.x, he = Math.sin((p + 1) * Math.PI / 180) * s + a.y;
1862
+ M.push(U, R, 0, Y, he, 0);
1863
1863
  }
1864
1864
  }
1865
1865
  f - b > 180 ? (L(0, b), L(f, 360), d = 360 - (f - b), c = (f + d / 2) % 360) : (L(b, f), d = f - b, c = b + d / 2);
@@ -1867,7 +1867,7 @@ class ae extends V {
1867
1867
  A.geometry = this.renderManager.createGeometry({
1868
1868
  position: M
1869
1869
  }, M.length / 3), A.material = new m.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(A);
1870
- const G = Math.cos(c * Math.PI / 180) * a + s.x, E = Math.sin(c * Math.PI / 180) * a + s.y, K = this.renderer.createText(Number(d.toFixed(2)), new m.Vector3(G, E, 0), {
1870
+ const G = Math.cos(c * Math.PI / 180) * s + a.x, E = Math.sin(c * Math.PI / 180) * s + a.y, K = this.renderer.createText(Number(d.toFixed(2)), new m.Vector3(G, E, 0), {
1871
1871
  textShadow: "0px 0px 2px #000"
1872
1872
  }, this.renderManager.container);
1873
1873
  let k = 0;
@@ -1882,7 +1882,7 @@ const Yn = {
1882
1882
  }, Xn = { class: "text-start max-w-[150px]" }, $n = { class: "inline-block ml-[10px] text-[var(--color-primary)]" }, eo = {
1883
1883
  key: 0,
1884
1884
  class: "p-[5px] max-w-[200px]"
1885
- }, to = { class: "text-[14px] flex flex-col" }, no = ["onClick"], oo = { class: "flex flex-row items-center" }, ao = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, so = ["src"], io = { class: "text-wrap" }, ro = {
1885
+ }, to = { class: "text-[14px] flex flex-col" }, no = ["onClick"], oo = { class: "flex flex-row items-center" }, so = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, ao = ["src"], io = { class: "text-wrap" }, ro = {
1886
1886
  key: 1,
1887
1887
  class: "text-[#999]"
1888
1888
  }, lo = {
@@ -1898,8 +1898,8 @@ const Yn = {
1898
1898
  permission: {}
1899
1899
  },
1900
1900
  setup(i) {
1901
- function e(C, u, v = h.value.getBoundingClientRect(), U = y.value.getBoundingClientRect()) {
1902
- const ue = v.width - U.width, pe = 0, Le = v.height - U.height;
1901
+ function e(C, u, v = h.value.getBoundingClientRect(), q = y.value.getBoundingClientRect()) {
1902
+ const ue = v.width - q.width, pe = 0, Le = v.height - q.height;
1903
1903
  C = Math.max(0, Math.min(C, ue)), u = Math.max(pe, Math.min(u, Le)), k.value = { left: C, top: u };
1904
1904
  }
1905
1905
  function t(C) {
@@ -1919,11 +1919,11 @@ const Yn = {
1919
1919
  const C = await kt.json();
1920
1920
  Array.isArray(C) && (localStorage.removeItem("orbitControls"), n(C));
1921
1921
  }
1922
- function a({ offsetX: C, offsetY: u }) {
1922
+ function s({ offsetX: C, offsetY: u }) {
1923
1923
  M.mouseMoveEventProxylock = !0;
1924
1924
  const v = document.body.style.cursor;
1925
1925
  document.body.style.cursor = "move";
1926
- const U = (ue) => {
1926
+ const q = (ue) => {
1927
1927
  const pe = h.value.getBoundingClientRect(), Le = y.value.getBoundingClientRect();
1928
1928
  e(
1929
1929
  ue.pageX - pe.left - C,
@@ -1932,11 +1932,11 @@ const Yn = {
1932
1932
  Le
1933
1933
  ), ue.stopPropagation(), document.body.style.cursor = "move";
1934
1934
  }, Me = () => {
1935
- document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup", Me), document.body.style.cursor = v, M.mouseMoveEventProxylock = !1;
1935
+ document.body.removeEventListener("mousemove", q), document.removeEventListener("mouseup", Me), document.body.style.cursor = v, M.mouseMoveEventProxylock = !1;
1936
1936
  };
1937
- document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Me);
1937
+ document.body.addEventListener("mousemove", q), document.addEventListener("mouseup", Me);
1938
1938
  }
1939
- const s = i, r = S(!0), l = S(!0), d = S(!0), c = S(!1), h = S(), y = S(), w = S(!0), b = S(""), f = St(s.dxfSystem), M = f.findComponentByType(Lt), L = f.findComponentByType(rt), A = f.findComponentByType(Be), G = f.findComponentByType(It), E = S(0), K = S(0), k = S({ left: 10, top: 10 }), x = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": yn, "./assets/images/connection.svg": bn, "./assets/images/deleteSelectLine.svg": xn, "./assets/images/deleteSelectWindow.svg": Mn, "./assets/images/door.svg": kn, "./assets/images/intersectionConnection.svg": Dn, "./assets/images/line.svg": An, "./assets/images/mergeLine.svg": Bn, "./assets/images/revokeRollback.svg": Nn, "./assets/images/rollback.svg": Rn, "./assets/images/selectAll.svg": Fn, "./assets/images/selectPoint.svg": Tn, "./assets/images/verticalCorrection.svg": jn, "./assets/images/window.svg": Qn }), _ = S(!1), p = S(0), q = S(!1), R = new ResizeObserver(() => e(k.value.left, k.value.top)), Y = [
1939
+ const a = i, r = S(!0), l = S(!0), d = S(!0), c = S(!1), h = S(), y = S(), w = S(!0), b = S(""), f = St(a.dxfSystem), M = f.findComponentByType(Lt), L = f.findComponentByType(rt), A = f.findComponentByType(Be), G = f.findComponentByType(It), E = S(0), K = S(0), k = S({ left: 10, top: 10 }), x = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": yn, "./assets/images/connection.svg": bn, "./assets/images/deleteSelectLine.svg": xn, "./assets/images/deleteSelectWindow.svg": Mn, "./assets/images/door.svg": kn, "./assets/images/intersectionConnection.svg": Dn, "./assets/images/line.svg": An, "./assets/images/mergeLine.svg": Bn, "./assets/images/revokeRollback.svg": Nn, "./assets/images/rollback.svg": Rn, "./assets/images/selectAll.svg": Fn, "./assets/images/selectPoint.svg": Tn, "./assets/images/verticalCorrection.svg": jn, "./assets/images/window.svg": Qn }), _ = S(!1), p = S(0), U = S(!1), R = new ResizeObserver(() => e(k.value.left, k.value.top)), Y = [
1940
1940
  { name: "开启绘制线段命令", shortcut: "Ctrl + L" },
1941
1941
  { name: "开启绘制门线命令", shortcut: "Ctrl + M" },
1942
1942
  { name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
@@ -2042,7 +2042,7 @@ const Yn = {
2042
2042
  shortcut: "Ctrl + C 或 Ctrl + Shift + C"
2043
2043
  },
2044
2044
  {
2045
- command: ae.commandName,
2045
+ command: se.commandName,
2046
2046
  name: "角度显示",
2047
2047
  show: B(() => p.value === 2 && A.selectLines[0].sameEndpoint(A.selectLines[1])),
2048
2048
  src: x["./assets/images/angle.svg"].default,
@@ -2058,7 +2058,7 @@ const Yn = {
2058
2058
  {
2059
2059
  command: ne.commandName,
2060
2060
  name: "清除窗户",
2061
- show: B(() => q.value),
2061
+ show: B(() => U.value),
2062
2062
  src: x["./assets/images/deleteSelectWindow.svg"].default,
2063
2063
  shortcut: "Q + Delete"
2064
2064
  },
@@ -2070,9 +2070,9 @@ const Yn = {
2070
2070
  shortcut: "Delete"
2071
2071
  }
2072
2072
  ];
2073
- J(k, () => localStorage.setItem("editorToolPosition", JSON.stringify(k.value))), J(_, () => localStorage.setItem("showShortcutKey", _.value + "")), J(w, () => {
2073
+ W(k, () => localStorage.setItem("editorToolPosition", JSON.stringify(k.value))), W(_, () => localStorage.setItem("showShortcutKey", _.value + "")), W(w, () => {
2074
2074
  localStorage.setItem("toolBarExpand", w.value + ""), w.value && be(() => e(k.value.left, k.value.top));
2075
- }), J(r, () => f.Variable.set("originalLineVisible", r.value)), J(l, () => f.Variable.set("dxfVisible", l.value)), J(d, () => f.Variable.set("whiteModelVisible", d.value)), f.Variable.addEventListener("isLook", (C) => c.value = C.value), f.Variable.addEventListener("originalLineVisible", (C) => r.value = C.value), f.Variable.addEventListener("dxfVisible", (C) => l.value = C.value), f.Variable.addEventListener("whiteModelVisible", (C) => d.value = C.value);
2075
+ }), W(r, () => f.Variable.set("originalLineVisible", r.value)), W(l, () => f.Variable.set("dxfVisible", l.value)), W(d, () => f.Variable.set("whiteModelVisible", d.value)), f.Variable.addEventListener("isLook", (C) => c.value = C.value), f.Variable.addEventListener("originalLineVisible", (C) => r.value = C.value), f.Variable.addEventListener("dxfVisible", (C) => l.value = C.value), f.Variable.addEventListener("whiteModelVisible", (C) => d.value = C.value);
2076
2076
  const lt = L.commandManager.addEventListener("started", (C) => {
2077
2077
  b.value = C.name;
2078
2078
  });
@@ -2084,7 +2084,7 @@ const Yn = {
2084
2084
  } else
2085
2085
  be(() => R.observe(h.value));
2086
2086
  }, 100), A.addEventListener("selectLineChange", () => {
2087
- p.value = A.selectLines.length, q.value = A.selectLines.some((C) => C.userData.isWindow);
2087
+ p.value = A.selectLines.length, U.value = A.selectLines.some((C) => C.userData.isWindow);
2088
2088
  }), ["rollback", "completed", "revokeRollback"].forEach((C) => {
2089
2089
  L.commandManager.addEventListener(C, () => {
2090
2090
  setTimeout(() => {
@@ -2121,7 +2121,7 @@ const Yn = {
2121
2121
  onMousedown: u[9] || (u[9] = (v) => v.stopPropagation())
2122
2122
  }, [
2123
2123
  I("div", {
2124
- onMousedown: a,
2124
+ onMousedown: s,
2125
2125
  class: T([{ "border-b-[#eee] border-b-1": w.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
2126
2126
  }, [
2127
2127
  u[11] || (u[11] = _t('<div class="flex flex-row" data-v-304aacf0><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-304aacf0><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-304aacf0><path d="M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" data-v-304aacf0></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-304aacf0>绘制工具</h5></div>', 1)),
@@ -2150,20 +2150,20 @@ const Yn = {
2150
2150
  }, [
2151
2151
  v.show ? (P(), O("li", {
2152
2152
  key: 0,
2153
- onClick: (U) => t(v),
2153
+ onClick: (q) => t(v),
2154
2154
  class: T([{
2155
2155
  "!bg-[var(--primary-color)] text-[#fff]": b.value === v.command,
2156
2156
  "!cursor-no-drop": b.value !== v.command && b.value !== "default"
2157
2157
  }, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
2158
2158
  }, [
2159
2159
  I("div", oo, [
2160
- I("div", ao, [
2160
+ I("div", so, [
2161
2161
  I("img", {
2162
2162
  class: "size-[14px]",
2163
2163
  src: v.src,
2164
2164
  alt: "",
2165
2165
  srcset: ""
2166
- }, null, 8, so)
2166
+ }, null, 8, ao)
2167
2167
  ]),
2168
2168
  I("span", io, ie(v.name), 1)
2169
2169
  ]),
@@ -2171,7 +2171,7 @@ const Yn = {
2171
2171
  key: 0,
2172
2172
  title: "取消命令(Esc)",
2173
2173
  class: "active:scale-[0.7] transition-all",
2174
- onClick: u[2] || (u[2] = (U) => (g(L).cancelCommand(), U.stopPropagation()))
2174
+ onClick: u[2] || (u[2] = (q) => (g(L).cancelCommand(), q.stopPropagation()))
2175
2175
  }, u[12] || (u[12] = [
2176
2176
  I("svg", {
2177
2177
  fill: "#fff",
@@ -2210,7 +2210,7 @@ const Yn = {
2210
2210
  onClick: o
2211
2211
  }, {
2212
2212
  default: j(() => u[13] || (u[13] = [
2213
- se(" 选择文件 ", -1)
2213
+ ae(" 选择文件 ", -1)
2214
2214
  ])),
2215
2215
  _: 1,
2216
2216
  __: [13]
@@ -2222,7 +2222,7 @@ const Yn = {
2222
2222
  onClick: u[5] || (u[5] = (v) => console.log(g(f).Dxf.originalData))
2223
2223
  }, {
2224
2224
  default: j(() => u[14] || (u[14] = [
2225
- se(" 打印Json ", -1)
2225
+ ae(" 打印Json ", -1)
2226
2226
  ])),
2227
2227
  _: 1,
2228
2228
  __: [14]
@@ -2234,7 +2234,7 @@ const Yn = {
2234
2234
  onClick: u[6] || (u[6] = (v) => g(f).Dxf.download("test.dxf"))
2235
2235
  }, {
2236
2236
  default: j(() => u[15] || (u[15] = [
2237
- se(" 下载DXF ", -1)
2237
+ ae(" 下载DXF ", -1)
2238
2238
  ])),
2239
2239
  _: 1,
2240
2240
  __: [15]
@@ -2246,7 +2246,7 @@ const Yn = {
2246
2246
  onClick: u[7] || (u[7] = (v) => g(f).AngleCorrectionDxf.downloadImage("dxf.jpg"))
2247
2247
  }, {
2248
2248
  default: j(() => u[16] || (u[16] = [
2249
- se(" 下载JPG ", -1)
2249
+ ae(" 下载JPG ", -1)
2250
2250
  ])),
2251
2251
  _: 1,
2252
2252
  __: [16]
@@ -2258,7 +2258,7 @@ const Yn = {
2258
2258
  onClick: u[8] || (u[8] = (v) => g(G).downloadGltf("test.glb", !0))
2259
2259
  }, {
2260
2260
  default: j(() => u[17] || (u[17] = [
2261
- se(" 下载白膜 ", -1)
2261
+ ae(" 下载白膜 ", -1)
2262
2262
  ])),
2263
2263
  _: 1,
2264
2264
  __: [17]
@@ -2270,7 +2270,7 @@ const Yn = {
2270
2270
  F(Nt, null, {
2271
2271
  default: j(() => [
2272
2272
  (P(), O(fe, null, Ie(dt, (v) => I("div", {
2273
- onClick: (U) => v.show.value && b.value === "default" && (v.action ? v.action() : g(L).commandManager.start(v.command, [...g(A).selectLines])),
2273
+ onClick: (q) => v.show.value && b.value === "default" && (v.action ? v.action() : g(L).commandManager.start(v.command, [...g(A).selectLines])),
2274
2274
  title: `${v.name}(${v.shortcut})`,
2275
2275
  class: T(["size-[20px] flex justify-center items-center relative overflow-hidden active:scale-[0.8] border-1 border-[#ccc] rounded-[4px] transition-all cursor-pointer", {
2276
2276
  "opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !v.show.value || b.value !== "default",
@@ -2329,18 +2329,46 @@ let rt = class extends Ee {
2329
2329
  app;
2330
2330
  domElement = document.createElement("div");
2331
2331
  viewPermission;
2332
+ imgEl = document.createElement("img");
2333
+ imgWidth = 80;
2332
2334
  constructor(e) {
2333
- super(), this.viewPermission = e;
2335
+ super(), this.viewPermission = e, Object.assign(this.imgEl.style, {
2336
+ position: "absolute",
2337
+ left: "5px",
2338
+ top: "5px",
2339
+ width: `${this.imgWidth}px`,
2340
+ height: `${this.imgWidth}px`,
2341
+ borderRadius: "10px",
2342
+ objectFit: "contain",
2343
+ background: "rgba(255,255,255,0.2)",
2344
+ pointerEvents: "none",
2345
+ cursor: "pointer",
2346
+ transition: "all 0.25s"
2347
+ }), this.imgEl.addEventListener("mousedown", (t) => t.stopPropagation()), this.imgEl.addEventListener("mouseup", (t) => t.stopPropagation()), this.imgEl.addEventListener("mousemove", (t) => t.stopPropagation()), this.imgEl.draggable = !1;
2334
2348
  }
2335
- onAddFromParent() {
2349
+ onAddFromParent(e) {
2336
2350
  setTimeout(() => this.openEdit(), 10);
2337
- const e = new m.GridHelper(200, 100, 6710886, 4473924);
2338
- e.rotation.x = Math.PI * 0.5, e.position.z = -0.01, this.container.add(e), this.container.add(this.plane), this.plane.visible = !1;
2339
- const t = this.addEventListener("update", () => {
2340
- this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), t());
2351
+ const t = new m.GridHelper(200, 100, 6710886, 4473924);
2352
+ t.rotation.x = Math.PI * 0.5, t.position.z = -0.01, this.container.add(t), this.container.add(this.plane), this.plane.visible = !1;
2353
+ const n = this.addEventListener("update", () => {
2354
+ this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), this.domContainer.domElement.parentElement.appendChild(this.imgEl), n());
2341
2355
  });
2342
2356
  setTimeout(() => {
2343
2357
  this.app = Ot(vo, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
2358
+ }), e.AngleCorrectionDxf.addEventListener("lineOffset", async () => {
2359
+ this.imgEl.src && URL.revokeObjectURL(this.imgEl.src), setTimeout(async () => {
2360
+ this.imgEl.src = URL.createObjectURL(await e.AngleCorrectionDxf.toDxfImageBlob("Centimeters", "image/png", "transparent"));
2361
+ });
2362
+ }), this.domEventRegister.addEventListener("mousemove", (o) => {
2363
+ o.x < this.imgWidth + 10 && o.x > 10 && o.y < this.imgWidth && o.y > 10 ? Object.assign(this.imgEl.style, {
2364
+ width: `${Math.min(this.imgWidth * 10, this.renderer.width * 0.9)}px`,
2365
+ height: `${Math.min(this.imgWidth * 10, this.renderer.height * 0.9)}px`,
2366
+ background: "rgba(0,0,0,1)"
2367
+ }) : Object.assign(this.imgEl.style, {
2368
+ width: `${this.imgWidth}px`,
2369
+ height: `${this.imgWidth}px`,
2370
+ background: "rgba(255,255,255,0.2)"
2371
+ });
2344
2372
  });
2345
2373
  }
2346
2374
  /**
@@ -2358,8 +2386,8 @@ let rt = class extends Ee {
2358
2386
  * 打开编辑器
2359
2387
  */
2360
2388
  openEdit() {
2361
- const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls, a = e.camera, s = n.box.center, r = e.camera.position.clone(), l = o?.target?.clone(), d = new m.Vector2(), c = new m.Raycaster(), h = this.coords, y = this.pointerPosition;
2362
- this.container.position.z = n.originalZAverage, e.scene.add(this.container), o && (a.position.set(s.x, s.y, 15), o.target.set(s.x, s.y, 0), o.enableRotate = !1);
2389
+ const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls, s = e.camera, a = n.box.center, r = e.camera.position.clone(), l = o?.target?.clone(), d = new m.Vector2(), c = new m.Raycaster(), h = this.coords, y = this.pointerPosition;
2390
+ this.container.position.z = n.originalZAverage, e.scene.add(this.container), o && (s.position.set(a.x, a.y, 15), o.target.set(a.x, a.y, 0), o.enableRotate = !1);
2363
2391
  const w = () => {
2364
2392
  e.renderer.getSize(d);
2365
2393
  const b = t.pointer.x / d.x * 2 - 1, f = -(t.pointer.y / d.y * 2 - 1);
@@ -2371,7 +2399,7 @@ let rt = class extends Ee {
2371
2399
  }));
2372
2400
  };
2373
2401
  t.addEventListener("mousemove", w), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
2374
- t.removeEventListener("mousemove", w), o && (a.position.copy(r), o.enableRotate = !0, o.target.copy(l));
2402
+ t.removeEventListener("mousemove", w), o && (s.position.copy(r), o.enableRotate = !0, o.target.copy(l));
2375
2403
  };
2376
2404
  }
2377
2405
  /**
@@ -2401,8 +2429,8 @@ class fo extends V {
2401
2429
  selectPoint(e) {
2402
2430
  let t = null, n = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
2403
2431
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
2404
- const { point: a, line: s, find: r, mode: l } = this.editor.renderManager.adsorption();
2405
- this.dispatchEvent({ type: "pointerMove", point: a }), r && l === "point" ? (this.domElement.style.cursor = "none", n.position.copy(a), o = s, t = a.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2432
+ const { point: s, line: a, find: r, mode: l } = this.editor.renderManager.adsorption();
2433
+ this.dispatchEvent({ type: "pointerMove", point: s }), r && l === "point" ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2406
2434
  })).add(this.eventInput.addEventListener("codeChange", () => {
2407
2435
  this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: o }));
2408
2436
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
@@ -2414,18 +2442,18 @@ class fo extends V {
2414
2442
  */
2415
2443
  drag(e, { point: t, line: n }) {
2416
2444
  this.domElement.style.cursor = "crosshair";
2417
- const o = n.start.equal(W.from(t)) ? "start" : "end", a = o == "start" ? new m.Vector3(n.end.x, n.end.y, 0) : new m.Vector3(n.start.x, n.start.y, 0), s = t.clone(), r = new we([a, s], 16711935), l = new m.Mesh(new m.SphereGeometry(0.03), new m.MeshBasicMaterial({ color: 16711935 }));
2445
+ const o = n.start.equal(J.from(t)) ? "start" : "end", s = o == "start" ? new m.Vector3(n.end.x, n.end.y, 0) : new m.Vector3(n.start.x, n.start.y, 0), a = t.clone(), r = new we([s, a], 16711935), l = new m.Mesh(new m.SphereGeometry(0.03), new m.MeshBasicMaterial({ color: 16711935 }));
2418
2446
  this.container.add(r), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
2419
2447
  let { point: d, find: c } = this.editor.renderManager.adsorption(), h = "none";
2420
2448
  if (d) {
2421
2449
  if (this.dispatchEvent({ type: "pointerMove", point: d }), this.eventInput.isKeyDown("shift")) {
2422
- const y = n.projectPoint(W.from(d), !1);
2450
+ const y = n.projectPoint(J.from(d), !1);
2423
2451
  d.set(y?.x ?? d.x, y?.y ?? d.y, 0), c = !0, h = "crosshair";
2424
2452
  }
2425
- c ? (l.position.copy(d), this.container.add(l)) : (l.removeFromParent(), h = "crosshair"), s.copy(d), r.setPoint(a, s), this.domElement.style.cursor = h;
2453
+ c ? (l.position.copy(d), this.container.add(l)) : (l.removeFromParent(), h = "crosshair"), a.copy(d), r.setPoint(s, a), this.domElement.style.cursor = h;
2426
2454
  }
2427
2455
  })).add(this.eventInput.addEventListener("codeChange", () => {
2428
- this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: s, oldPoint: o === "end" ? n.end.clone() : n.start.clone(), line: n, mode: o }));
2456
+ this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: a, oldPoint: o === "end" ? n.end.clone() : n.start.clone(), line: n, mode: o }));
2429
2457
  })).add(() => l.removeFromParent()).add(() => r.removeFromParent());
2430
2458
  }
2431
2459
  /** 执行完成
@@ -2477,15 +2505,15 @@ class re extends V {
2477
2505
  }), t[0].userData.isVerticalReferenceLine = !0, e(), this.renderManager.draw();
2478
2506
  }
2479
2507
  }
2480
- function We(i, e = {}) {
2481
- i.addComponent(new rt(e.viewPermission)), i.addComponent(new qn()), i.addComponent(new Be()), i.addComponent(new pn()), i.addComponent(new Un()), i.addComponent(new Zn()), i.addComponent(new fo()), i.addComponent(new $()), i.addComponent(new X()), i.addComponent(new de()), i.addComponent(new ee()), i.addComponent(new te()), i.addComponent(new ne()), i.addComponent(new oe()), i.addComponent(new ae()), i.addComponent(new re());
2508
+ function Je(i, e = {}) {
2509
+ i.addComponent(new rt(e.viewPermission)), i.addComponent(new Un()), i.addComponent(new Be()), i.addComponent(new pn()), i.addComponent(new qn()), i.addComponent(new Zn()), i.addComponent(new fo()), i.addComponent(new $()), i.addComponent(new X()), i.addComponent(new de()), i.addComponent(new ee()), i.addComponent(new te()), i.addComponent(new ne()), i.addComponent(new oe()), i.addComponent(new se()), i.addComponent(new re());
2482
2510
  }
2483
- const Lo = Object.assign(We, {
2511
+ const Lo = Object.assign(Je, {
2484
2512
  create(i = {}) {
2485
- return (e) => We(e, i);
2513
+ return (e) => Je(e, i);
2486
2514
  }
2487
2515
  });
2488
2516
  export {
2489
2517
  Lo as Editor,
2490
- We as Editor_
2518
+ Je as Editor_
2491
2519
  };