build-dxf 0.0.22 → 0.0.24
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/package.json +1 -1
- package/src/build.js +1371 -986
- package/src/index.css +1 -1
- package/src/index3.js +713 -693
- package/src/selectLocalFile.js +4 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +40 -13
- package/src/utils/DxfSystem/components/LineAnalysis.d.ts +77 -0
- package/src/utils/DxfSystem/components/ThreeVJia.d.ts +45 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection.d.ts +10 -7
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +7 -19
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +2 -1
- package/src/utils/Quadtree/Box2.d.ts +6 -0
- package/src/utils/Quadtree/LineSegment.d.ts +17 -0
package/src/index3.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import * as m from "three";
|
|
2
|
-
import { i as
|
|
3
|
-
import { C as
|
|
2
|
+
import { i as ht, n as ut, r as Ue, t as qe, c as Pe, d as pt, e as gt, f as De, g as Q, _ as Ze, u as vt, h as fe, j as Be, w as ft, k as yt, l as wt, p as bt, m as xt, o as Ct, T as Ne, q as Oe, s as Et, v as Mt, x as Re, y as Ie, z as Le, A as Lt, B as kt, L as ye, D as It, b as Ke, E as re, S as Pt } from "./selectLocalFile.js";
|
|
3
|
+
import { C as Ae, P as _, L as B, B as Ye, E as Xe, b as Fe, Q as ze, u as Dt, W as At, T as St } 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
|
|
8
|
-
function
|
|
7
|
+
import { watch as J, ref as S, defineComponent as ce, computed as P, createElementBlock as O, openBlock as I, normalizeClass as V, unref as f, renderSlot as be, createVNode as F, Transition as xe, withCtx as j, withDirectives as $e, createElementVNode as k, normalizeStyle as Se, createTextVNode as Y, toDisplayString as de, vShow as et, shallowReactive as _t, onMounted as tt, createBlock as ge, createCommentVNode as q, resolveDynamicComponent as Bt, Fragment as ve, withModifiers as Nt, nextTick as we, isVNode as nt, render as Te, toRaw as Ot, onUnmounted as Rt, renderList as ke, createStaticVNode as Kt, TransitionGroup as Ft, createApp as zt } from "vue";
|
|
8
|
+
function st(d) {
|
|
9
9
|
var e;
|
|
10
|
-
const t =
|
|
10
|
+
const t = Ue(d);
|
|
11
11
|
return (e = t?.$el) != null ? e : t;
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function
|
|
15
|
-
let e, t, n,
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
13
|
+
const ot = Pe ? window : void 0;
|
|
14
|
+
function Tt(...d) {
|
|
15
|
+
let e, t, n, s;
|
|
16
|
+
if (ht(d[0]) || Array.isArray(d[0]) ? ([t, n, s] = d, e = ot) : [e, t, n, s] = d, !e)
|
|
17
|
+
return ut;
|
|
18
18
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
}, r = (c, h,
|
|
22
|
-
a(), c &&
|
|
19
|
+
const o = [], a = () => {
|
|
20
|
+
o.forEach((c) => c()), o.length = 0;
|
|
21
|
+
}, r = (c, h, y, u) => (c.addEventListener(h, y, u), () => c.removeEventListener(h, y, u)), l = J(() => [st(e), Ue(s)], ([c, h]) => {
|
|
22
|
+
a(), c && o.push(...t.flatMap((y) => n.map((u) => r(c, y, u, h))));
|
|
23
23
|
}, { immediate: !0, flush: "post" }), i = () => {
|
|
24
24
|
l(), a();
|
|
25
25
|
};
|
|
26
26
|
return qe(i), i;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function jt(d, e = !1) {
|
|
29
29
|
const t = S(), n = () => t.value = !!d();
|
|
30
|
-
return n(),
|
|
30
|
+
return n(), pt(n, e), t;
|
|
31
31
|
}
|
|
32
32
|
const je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ve = "__vueuse_ssr_handlers__";
|
|
33
33
|
je[Ve] = je[Ve] || {};
|
|
34
|
-
var Ge = Object.getOwnPropertySymbols,
|
|
34
|
+
var Ge = Object.getOwnPropertySymbols, Vt = Object.prototype.hasOwnProperty, Gt = Object.prototype.propertyIsEnumerable, Qt = (d, e) => {
|
|
35
35
|
var t = {};
|
|
36
36
|
for (var n in d)
|
|
37
|
-
|
|
37
|
+
Vt.call(d, n) && e.indexOf(n) < 0 && (t[n] = d[n]);
|
|
38
38
|
if (d != null && Ge)
|
|
39
39
|
for (var n of Ge(d))
|
|
40
|
-
e.indexOf(n) < 0 &&
|
|
40
|
+
e.indexOf(n) < 0 && Gt.call(d, n) && (t[n] = d[n]);
|
|
41
41
|
return t;
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
const n = t, { window:
|
|
43
|
+
function Ht(d, e, t = {}) {
|
|
44
|
+
const n = t, { window: s = ot } = n, o = Qt(n, ["window"]);
|
|
45
45
|
let a;
|
|
46
|
-
const r =
|
|
46
|
+
const r = jt(() => s && "ResizeObserver" in s), l = () => {
|
|
47
47
|
a && (a.disconnect(), a = void 0);
|
|
48
|
-
}, i =
|
|
49
|
-
l(), r.value &&
|
|
48
|
+
}, i = J(() => st(d), (h) => {
|
|
49
|
+
l(), r.value && s && h && (a = new ResizeObserver(e), a.observe(h, o));
|
|
50
50
|
}, { immediate: !0, flush: "post" }), c = () => {
|
|
51
51
|
l(), i();
|
|
52
52
|
};
|
|
@@ -59,15 +59,15 @@ var Qe;
|
|
|
59
59
|
(function(d) {
|
|
60
60
|
d.UP = "UP", d.RIGHT = "RIGHT", d.DOWN = "DOWN", d.LEFT = "LEFT", d.NONE = "NONE";
|
|
61
61
|
})(Qe || (Qe = {}));
|
|
62
|
-
var
|
|
62
|
+
var Wt = Object.defineProperty, He = Object.getOwnPropertySymbols, Jt = Object.prototype.hasOwnProperty, Ut = Object.prototype.propertyIsEnumerable, We = (d, e, t) => e in d ? Wt(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t, qt = (d, e) => {
|
|
63
63
|
for (var t in e || (e = {}))
|
|
64
|
-
|
|
64
|
+
Jt.call(e, t) && We(d, t, e[t]);
|
|
65
65
|
if (He)
|
|
66
66
|
for (var t of He(e))
|
|
67
|
-
|
|
67
|
+
Ut.call(e, t) && We(d, t, e[t]);
|
|
68
68
|
return d;
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const Zt = {
|
|
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],
|
|
@@ -93,12 +93,12 @@ const Jt = {
|
|
|
93
93
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
94
94
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
95
95
|
};
|
|
96
|
-
|
|
97
|
-
linear:
|
|
98
|
-
},
|
|
99
|
-
const
|
|
96
|
+
qt({
|
|
97
|
+
linear: gt
|
|
98
|
+
}, Zt);
|
|
99
|
+
const Yt = (d) => d, Xt = {
|
|
100
100
|
esc: "Escape"
|
|
101
|
-
},
|
|
101
|
+
}, $t = De({
|
|
102
102
|
value: {
|
|
103
103
|
type: [String, Number],
|
|
104
104
|
default: ""
|
|
@@ -129,13 +129,13 @@ const qt = (d) => d, Zt = {
|
|
|
129
129
|
badgeClass: {
|
|
130
130
|
type: String
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), en = ce({
|
|
133
133
|
name: "ElBadge"
|
|
134
|
-
}),
|
|
135
|
-
...
|
|
136
|
-
props:
|
|
134
|
+
}), tn = /* @__PURE__ */ ce({
|
|
135
|
+
...en,
|
|
136
|
+
props: $t,
|
|
137
137
|
setup(d, { expose: e }) {
|
|
138
|
-
const t = d, n =
|
|
138
|
+
const t = d, n = vt("badge"), s = P(() => t.isDot ? "" : fe(t.value) && fe(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), o = P(() => {
|
|
139
139
|
var a, r, l, i, c;
|
|
140
140
|
return [
|
|
141
141
|
{
|
|
@@ -147,32 +147,32 @@ const qt = (d) => d, Zt = {
|
|
|
147
147
|
];
|
|
148
148
|
});
|
|
149
149
|
return e({
|
|
150
|
-
content:
|
|
151
|
-
}), (a, r) => (I(),
|
|
152
|
-
class:
|
|
150
|
+
content: s
|
|
151
|
+
}), (a, r) => (I(), O("div", {
|
|
152
|
+
class: V(f(n).b())
|
|
153
153
|
}, [
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
name: `${
|
|
154
|
+
be(a.$slots, "default"),
|
|
155
|
+
F(xe, {
|
|
156
|
+
name: `${f(n).namespace.value}-zoom-in-center`,
|
|
157
157
|
persisted: ""
|
|
158
158
|
}, {
|
|
159
|
-
default:
|
|
159
|
+
default: j(() => [
|
|
160
160
|
$e(k("sup", {
|
|
161
|
-
class:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
class: V([
|
|
162
|
+
f(n).e("content"),
|
|
163
|
+
f(n).em("content", a.type),
|
|
164
|
+
f(n).is("fixed", !!a.$slots.default),
|
|
165
|
+
f(n).is("dot", a.isDot),
|
|
166
|
+
f(n).is("hide-zero", !a.showZero && t.value === 0),
|
|
167
167
|
a.badgeClass
|
|
168
168
|
]),
|
|
169
|
-
style:
|
|
169
|
+
style: Se(f(o))
|
|
170
170
|
}, [
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
be(a.$slots, "content", { value: f(s) }, () => [
|
|
172
|
+
Y(de(f(s)), 1)
|
|
173
173
|
])
|
|
174
174
|
], 6), [
|
|
175
|
-
[et, !a.hidden && (
|
|
175
|
+
[et, !a.hidden && (f(s) || a.isDot || a.$slots.content)]
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
178
|
_: 3
|
|
@@ -180,8 +180,8 @@ const qt = (d) => d, Zt = {
|
|
|
180
180
|
], 2));
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
|
-
var
|
|
184
|
-
const
|
|
183
|
+
var nn = /* @__PURE__ */ Ze(tn, [["__file", "badge.vue"]]);
|
|
184
|
+
const sn = ft(nn), on = De({
|
|
185
185
|
a11y: {
|
|
186
186
|
type: Boolean,
|
|
187
187
|
default: !0
|
|
@@ -189,7 +189,7 @@ const tn = vt(en), nn = De({
|
|
|
189
189
|
locale: {
|
|
190
190
|
type: Q(Object)
|
|
191
191
|
},
|
|
192
|
-
size:
|
|
192
|
+
size: wt,
|
|
193
193
|
button: {
|
|
194
194
|
type: Q(Object)
|
|
195
195
|
},
|
|
@@ -217,17 +217,17 @@ const tn = vt(en), nn = De({
|
|
|
217
217
|
type: String,
|
|
218
218
|
default: "el"
|
|
219
219
|
},
|
|
220
|
-
...
|
|
220
|
+
...yt
|
|
221
221
|
}), T = {};
|
|
222
222
|
ce({
|
|
223
223
|
name: "ElConfigProvider",
|
|
224
|
-
props:
|
|
224
|
+
props: on,
|
|
225
225
|
setup(d, { slots: e }) {
|
|
226
|
-
const t =
|
|
227
|
-
return
|
|
228
|
-
var
|
|
229
|
-
Object.assign(T, (
|
|
230
|
-
}, { immediate: !0, deep: !0 }), () =>
|
|
226
|
+
const t = bt(d);
|
|
227
|
+
return J(() => d.message, (n) => {
|
|
228
|
+
var s, o;
|
|
229
|
+
Object.assign(T, (o = (s = t?.value) == null ? void 0 : s.message) != null ? o : {}, n ?? {});
|
|
230
|
+
}, { immediate: !0, deep: !0 }), () => be(e, "default", { config: t?.value });
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
const at = [
|
|
@@ -236,7 +236,7 @@ const at = [
|
|
|
236
236
|
"info",
|
|
237
237
|
"warning",
|
|
238
238
|
"error"
|
|
239
|
-
], N =
|
|
239
|
+
], N = Yt({
|
|
240
240
|
customClass: "",
|
|
241
241
|
dangerouslyUseHTMLString: !1,
|
|
242
242
|
duration: 3e3,
|
|
@@ -252,7 +252,7 @@ const at = [
|
|
|
252
252
|
grouping: !1,
|
|
253
253
|
repeatNum: 1,
|
|
254
254
|
appendTo: Pe ? document.body : void 0
|
|
255
|
-
}),
|
|
255
|
+
}), an = De({
|
|
256
256
|
customClass: {
|
|
257
257
|
type: String,
|
|
258
258
|
default: N.customClass
|
|
@@ -266,7 +266,7 @@ const at = [
|
|
|
266
266
|
default: N.duration
|
|
267
267
|
},
|
|
268
268
|
icon: {
|
|
269
|
-
type:
|
|
269
|
+
type: xt,
|
|
270
270
|
default: N.icon
|
|
271
271
|
},
|
|
272
272
|
id: {
|
|
@@ -314,119 +314,119 @@ const at = [
|
|
|
314
314
|
type: Number,
|
|
315
315
|
default: N.repeatNum
|
|
316
316
|
}
|
|
317
|
-
}),
|
|
317
|
+
}), rn = {
|
|
318
318
|
destroy: () => !0
|
|
319
|
-
}, H =
|
|
320
|
-
const e = H.findIndex((
|
|
319
|
+
}, H = _t([]), dn = (d) => {
|
|
320
|
+
const e = H.findIndex((s) => s.id === d), t = H[e];
|
|
321
321
|
let n;
|
|
322
322
|
return e > 0 && (n = H[e - 1]), { current: t, prev: n };
|
|
323
|
-
},
|
|
324
|
-
const { prev: e } =
|
|
323
|
+
}, ln = (d) => {
|
|
324
|
+
const { prev: e } = dn(d);
|
|
325
325
|
return e ? e.vm.exposed.bottom.value : 0;
|
|
326
|
-
},
|
|
326
|
+
}, cn = (d, e) => H.findIndex((n) => n.id === d) > 0 ? 16 : e, mn = ce({
|
|
327
327
|
name: "ElMessage"
|
|
328
|
-
}),
|
|
329
|
-
...
|
|
330
|
-
props:
|
|
331
|
-
emits:
|
|
328
|
+
}), hn = /* @__PURE__ */ ce({
|
|
329
|
+
...mn,
|
|
330
|
+
props: an,
|
|
331
|
+
emits: rn,
|
|
332
332
|
setup(d, { expose: e, emit: t }) {
|
|
333
|
-
const n = d, { Close:
|
|
333
|
+
const n = d, { Close: s } = Et, o = S(!1), { ns: a, zIndex: r } = Ct("message"), { currentZIndex: l, nextZIndex: i } = r, c = S(), h = S(!1), y = S(0);
|
|
334
334
|
let u;
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
return { [a.bm("icon",
|
|
338
|
-
}), E = P(() => n.icon || Ne[n.type] || ""),
|
|
335
|
+
const v = P(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), g = P(() => {
|
|
336
|
+
const b = n.type;
|
|
337
|
+
return { [a.bm("icon", b)]: b && Ne[b] };
|
|
338
|
+
}), E = P(() => n.icon || Ne[n.type] || ""), x = P(() => ln(n.id)), D = P(() => cn(n.id, n.offset) + x.value), z = P(() => y.value + D.value), me = P(() => ({
|
|
339
339
|
top: `${D.value}px`,
|
|
340
340
|
zIndex: l.value
|
|
341
341
|
}));
|
|
342
|
-
function
|
|
343
|
-
n.duration !== 0 && ({ stop: u } =
|
|
344
|
-
|
|
342
|
+
function Z() {
|
|
343
|
+
n.duration !== 0 && ({ stop: u } = Mt(() => {
|
|
344
|
+
A();
|
|
345
345
|
}, n.duration));
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function G() {
|
|
348
348
|
u?.();
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
h.value = !1,
|
|
352
|
-
var
|
|
353
|
-
|
|
350
|
+
function A() {
|
|
351
|
+
h.value = !1, we(() => {
|
|
352
|
+
var b;
|
|
353
|
+
o.value || ((b = n.onClose) == null || b.call(n), t("destroy"));
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
356
|
+
function M({ code: b }) {
|
|
357
|
+
b === Xt.esc && A();
|
|
358
358
|
}
|
|
359
359
|
return tt(() => {
|
|
360
|
-
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
}),
|
|
364
|
-
|
|
360
|
+
Z(), i(), h.value = !0;
|
|
361
|
+
}), J(() => n.repeatNum, () => {
|
|
362
|
+
G(), Z();
|
|
363
|
+
}), Tt(document, "keydown", M), Ht(c, () => {
|
|
364
|
+
y.value = c.value.getBoundingClientRect().height;
|
|
365
365
|
}), e({
|
|
366
366
|
visible: h,
|
|
367
|
-
bottom:
|
|
368
|
-
close:
|
|
369
|
-
}), (
|
|
370
|
-
name:
|
|
371
|
-
onBeforeEnter: (
|
|
372
|
-
onBeforeLeave:
|
|
373
|
-
onAfterLeave: (
|
|
367
|
+
bottom: z,
|
|
368
|
+
close: A
|
|
369
|
+
}), (b, K) => (I(), ge(xe, {
|
|
370
|
+
name: f(a).b("fade"),
|
|
371
|
+
onBeforeEnter: (W) => o.value = !0,
|
|
372
|
+
onBeforeLeave: b.onClose,
|
|
373
|
+
onAfterLeave: (W) => b.$emit("destroy"),
|
|
374
374
|
persisted: ""
|
|
375
375
|
}, {
|
|
376
|
-
default:
|
|
376
|
+
default: j(() => [
|
|
377
377
|
$e(k("div", {
|
|
378
|
-
id:
|
|
378
|
+
id: b.id,
|
|
379
379
|
ref_key: "messageRef",
|
|
380
380
|
ref: c,
|
|
381
|
-
class:
|
|
382
|
-
|
|
383
|
-
{ [
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
381
|
+
class: V([
|
|
382
|
+
f(a).b(),
|
|
383
|
+
{ [f(a).m(b.type)]: b.type },
|
|
384
|
+
f(a).is("closable", b.showClose),
|
|
385
|
+
f(a).is("plain", b.plain),
|
|
386
|
+
b.customClass
|
|
387
387
|
]),
|
|
388
|
-
style:
|
|
388
|
+
style: Se(f(me)),
|
|
389
389
|
role: "alert",
|
|
390
|
-
onMouseenter:
|
|
391
|
-
onMouseleave:
|
|
390
|
+
onMouseenter: G,
|
|
391
|
+
onMouseleave: Z
|
|
392
392
|
}, [
|
|
393
|
-
|
|
393
|
+
b.repeatNum > 1 ? (I(), ge(f(sn), {
|
|
394
394
|
key: 0,
|
|
395
|
-
value:
|
|
396
|
-
type:
|
|
397
|
-
class:
|
|
398
|
-
}, null, 8, ["value", "type", "class"])) :
|
|
399
|
-
|
|
395
|
+
value: b.repeatNum,
|
|
396
|
+
type: f(v),
|
|
397
|
+
class: V(f(a).e("badge"))
|
|
398
|
+
}, null, 8, ["value", "type", "class"])) : q("v-if", !0),
|
|
399
|
+
f(E) ? (I(), ge(f(Oe), {
|
|
400
400
|
key: 1,
|
|
401
|
-
class:
|
|
401
|
+
class: V([f(a).e("icon"), f(g)])
|
|
402
402
|
}, {
|
|
403
|
-
default:
|
|
404
|
-
(I(),
|
|
403
|
+
default: j(() => [
|
|
404
|
+
(I(), ge(Bt(f(E))))
|
|
405
405
|
]),
|
|
406
406
|
_: 1
|
|
407
|
-
}, 8, ["class"])) :
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
}, 8, ["class"])) : q("v-if", !0),
|
|
408
|
+
be(b.$slots, "default", {}, () => [
|
|
409
|
+
b.dangerouslyUseHTMLString ? (I(), O(ve, { key: 1 }, [
|
|
410
|
+
q(" Caution here, message could've been compromised, never use user's input as message "),
|
|
411
411
|
k("p", {
|
|
412
|
-
class:
|
|
413
|
-
innerHTML:
|
|
412
|
+
class: V(f(a).e("content")),
|
|
413
|
+
innerHTML: b.message
|
|
414
414
|
}, null, 10, ["innerHTML"])
|
|
415
|
-
], 2112)) : (I(),
|
|
415
|
+
], 2112)) : (I(), O("p", {
|
|
416
416
|
key: 0,
|
|
417
|
-
class:
|
|
418
|
-
},
|
|
417
|
+
class: V(f(a).e("content"))
|
|
418
|
+
}, de(b.message), 3))
|
|
419
419
|
]),
|
|
420
|
-
|
|
420
|
+
b.showClose ? (I(), ge(f(Oe), {
|
|
421
421
|
key: 2,
|
|
422
|
-
class:
|
|
423
|
-
onClick:
|
|
422
|
+
class: V(f(a).e("closeBtn")),
|
|
423
|
+
onClick: Nt(A, ["stop"])
|
|
424
424
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
|
|
425
|
+
default: j(() => [
|
|
426
|
+
F(f(s))
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
|
-
}, 8, ["class", "onClick"])) :
|
|
429
|
+
}, 8, ["class", "onClick"])) : q("v-if", !0)
|
|
430
430
|
], 46, ["id"]), [
|
|
431
431
|
[et, h.value]
|
|
432
432
|
])
|
|
@@ -435,41 +435,41 @@ const at = [
|
|
|
435
435
|
}, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]));
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
|
-
var
|
|
439
|
-
let
|
|
438
|
+
var un = /* @__PURE__ */ Ze(hn, [["__file", "message.vue"]]);
|
|
439
|
+
let pn = 1;
|
|
440
440
|
const it = (d) => {
|
|
441
|
-
const e = !d ||
|
|
441
|
+
const e = !d || Re(d) || nt(d) || Ie(d) ? { message: d } : d, t = {
|
|
442
442
|
...N,
|
|
443
443
|
...e
|
|
444
444
|
};
|
|
445
445
|
if (!t.appendTo)
|
|
446
446
|
t.appendTo = document.body;
|
|
447
|
-
else if (
|
|
447
|
+
else if (Re(t.appendTo)) {
|
|
448
448
|
let n = document.querySelector(t.appendTo);
|
|
449
|
-
|
|
449
|
+
Lt(n) || (n = document.body), t.appendTo = n;
|
|
450
450
|
}
|
|
451
|
-
return Le(T.grouping) && !t.grouping && (t.grouping = T.grouping),
|
|
452
|
-
},
|
|
451
|
+
return Le(T.grouping) && !t.grouping && (t.grouping = T.grouping), fe(T.duration) && t.duration === 3e3 && (t.duration = T.duration), fe(T.offset) && t.offset === 16 && (t.offset = T.offset), Le(T.showClose) && !t.showClose && (t.showClose = T.showClose), Le(T.plain) && !t.plain && (t.plain = T.plain), t;
|
|
452
|
+
}, gn = (d) => {
|
|
453
453
|
const e = H.indexOf(d);
|
|
454
454
|
if (e === -1)
|
|
455
455
|
return;
|
|
456
456
|
H.splice(e, 1);
|
|
457
457
|
const { handler: t } = d;
|
|
458
458
|
t.close();
|
|
459
|
-
},
|
|
460
|
-
const n = `message_${
|
|
459
|
+
}, vn = ({ appendTo: d, ...e }, t) => {
|
|
460
|
+
const n = `message_${pn++}`, s = e.onClose, o = document.createElement("div"), a = {
|
|
461
461
|
...e,
|
|
462
462
|
id: n,
|
|
463
463
|
onClose: () => {
|
|
464
|
-
|
|
464
|
+
s?.(), gn(c);
|
|
465
465
|
},
|
|
466
466
|
onDestroy: () => {
|
|
467
|
-
Te(null,
|
|
467
|
+
Te(null, o);
|
|
468
468
|
}
|
|
469
|
-
}, r =
|
|
469
|
+
}, r = F(un, a, Ie(a.message) || nt(a.message) ? {
|
|
470
470
|
default: Ie(a.message) ? a.message : () => a.message
|
|
471
471
|
} : null);
|
|
472
|
-
r.appContext = t || le._context, Te(r,
|
|
472
|
+
r.appContext = t || le._context, Te(r, o), d.appendChild(o.firstElementChild);
|
|
473
473
|
const l = r.component, c = {
|
|
474
474
|
id: n,
|
|
475
475
|
vnode: r,
|
|
@@ -488,17 +488,17 @@ const it = (d) => {
|
|
|
488
488
|
} };
|
|
489
489
|
const t = it(d);
|
|
490
490
|
if (t.grouping && H.length) {
|
|
491
|
-
const
|
|
491
|
+
const s = H.find(({ vnode: o }) => {
|
|
492
492
|
var a;
|
|
493
|
-
return ((a =
|
|
493
|
+
return ((a = o.props) == null ? void 0 : a.message) === t.message;
|
|
494
494
|
});
|
|
495
|
-
if (
|
|
496
|
-
return
|
|
495
|
+
if (s)
|
|
496
|
+
return s.props.repeatNum += 1, s.props.type = t.type, s.handler;
|
|
497
497
|
}
|
|
498
|
-
if (
|
|
498
|
+
if (fe(T.max) && H.length >= T.max)
|
|
499
499
|
return { close: () => {
|
|
500
500
|
} };
|
|
501
|
-
const n =
|
|
501
|
+
const n = vn(t, e);
|
|
502
502
|
return H.push(n), n.handler;
|
|
503
503
|
};
|
|
504
504
|
at.forEach((d) => {
|
|
@@ -507,15 +507,15 @@ at.forEach((d) => {
|
|
|
507
507
|
return le({ ...n, type: d }, t);
|
|
508
508
|
};
|
|
509
509
|
});
|
|
510
|
-
function
|
|
510
|
+
function fn(d) {
|
|
511
511
|
const e = [...H];
|
|
512
512
|
for (const t of e)
|
|
513
513
|
(!d || d === t.props.type) && t.handler.close();
|
|
514
514
|
}
|
|
515
|
-
le.closeAll =
|
|
515
|
+
le.closeAll = fn;
|
|
516
516
|
le._context = null;
|
|
517
|
-
const L =
|
|
518
|
-
class
|
|
517
|
+
const L = kt(le, "$message");
|
|
518
|
+
class R extends Ae {
|
|
519
519
|
_renderer;
|
|
520
520
|
get renderer() {
|
|
521
521
|
return this._renderer || (this._renderer = this.parent?.findComponentByName("Renderer")), this._renderer;
|
|
@@ -582,9 +582,9 @@ class O extends Se {
|
|
|
582
582
|
*/
|
|
583
583
|
createCursor(e) {
|
|
584
584
|
return (t, n) => {
|
|
585
|
-
const
|
|
585
|
+
const s = this.domElement.style.cursor;
|
|
586
586
|
this.domElement.style.cursor = e, this.addEventRecord("clear", () => {
|
|
587
|
-
this.domElement.style.cursor =
|
|
587
|
+
this.domElement.style.cursor = s ?? "default";
|
|
588
588
|
}), t(n);
|
|
589
589
|
};
|
|
590
590
|
}
|
|
@@ -603,15 +603,15 @@ class O extends Se {
|
|
|
603
603
|
* @returns
|
|
604
604
|
*/
|
|
605
605
|
createPointerMove(e) {
|
|
606
|
-
const t = this.editor, n = new
|
|
607
|
-
let
|
|
606
|
+
const t = this.editor, n = new _();
|
|
607
|
+
let s = null, o = null, a = null;
|
|
608
608
|
const r = t.addEventListener("pointerPositionChange", () => {
|
|
609
|
-
const l =
|
|
610
|
-
if (
|
|
611
|
-
const i = Math.abs(l.x -
|
|
612
|
-
i > c ? n.set(l.x,
|
|
613
|
-
} else if (
|
|
614
|
-
const i =
|
|
609
|
+
const l = _.from(t.pointerPosition);
|
|
610
|
+
if (s && t.eventInput.isKeyDown("shift")) {
|
|
611
|
+
const i = Math.abs(l.x - s.x), c = Math.abs(l.y - s.y);
|
|
612
|
+
i > c ? n.set(l.x, s.y) : n.set(s.x, l.y), e(n, !1);
|
|
613
|
+
} else if (o && a && t.eventInput.isKeyDown("alt")) {
|
|
614
|
+
const i = o.projectPoint(l, !1), c = a.projectPoint(l, !1);
|
|
615
615
|
i && c ? l.distance(i) < l.distance(c) ? n.copy(i) : n.copy(c) : i ? n.copy(i) : c && n.copy(c), e(n, !1);
|
|
616
616
|
} else {
|
|
617
617
|
const { point: i, find: c } = t.renderManager.adsorption();
|
|
@@ -623,7 +623,7 @@ class O extends Se {
|
|
|
623
623
|
r();
|
|
624
624
|
},
|
|
625
625
|
setBaseLine(l, i) {
|
|
626
|
-
if (
|
|
626
|
+
if (o = l, s = i, l && i) {
|
|
627
627
|
const c = l.normal();
|
|
628
628
|
a = new B(
|
|
629
629
|
i.clone().add(c.clone().multiplyScalar(10)),
|
|
@@ -634,7 +634,7 @@ class O extends Se {
|
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
class
|
|
637
|
+
class yn extends R {
|
|
638
638
|
static name = "DrawLine";
|
|
639
639
|
container = new m.Group();
|
|
640
640
|
interruptKeys = ["escape"];
|
|
@@ -651,7 +651,7 @@ class vn extends O {
|
|
|
651
651
|
* @param next
|
|
652
652
|
*/
|
|
653
653
|
selectPoint(e) {
|
|
654
|
-
let t = this.parent?.findComponentByName("Editor"), n = null,
|
|
654
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, s = null, o = [], a = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 65280 })), r = t.domContainer.domElement, l = new ye([], 16711935), i = new ye([
|
|
655
655
|
new m.Vector3(-1e4, 0, 0),
|
|
656
656
|
new m.Vector3(1e4, 0, 0),
|
|
657
657
|
new m.Vector3(0, -1e4, 0),
|
|
@@ -664,31 +664,31 @@ class vn extends O {
|
|
|
664
664
|
linewidth: 0.1
|
|
665
665
|
}), this.container.add(l);
|
|
666
666
|
const c = () => {
|
|
667
|
-
l.setPoint(...
|
|
668
|
-
}, h = new m.Vector3(),
|
|
669
|
-
h.set(u.x, u.y, 0), this.dispatchEvent({ type: "pointerMove", point: h }),
|
|
667
|
+
l.setPoint(...o, n, s), i.position.copy(s), this.container.add(i), i.computeLineDistances();
|
|
668
|
+
}, h = new m.Vector3(), y = this.createPointerMove((u, v) => {
|
|
669
|
+
h.set(u.x, u.y, 0), this.dispatchEvent({ type: "pointerMove", point: h }), v ? (a.position.set(u.x, u.y, 0), this.container.add(a), r.style.cursor = "none") : (a.removeFromParent(), r.style.cursor = "crosshair"), n && s && (c(), s.copy(h));
|
|
670
670
|
});
|
|
671
671
|
this.addEventRecord(
|
|
672
672
|
"clear",
|
|
673
|
-
() =>
|
|
673
|
+
() => y.destroy(),
|
|
674
674
|
t.eventInput.addEventListener("codeChange", async () => {
|
|
675
675
|
if (t.eventInput.isKeyDown("mouse_0")) {
|
|
676
676
|
if (!n) {
|
|
677
|
-
n = h.clone(),
|
|
677
|
+
n = h.clone(), s = h.clone(), c(), y.setBaseLine(null, _.from(n));
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
|
-
|
|
681
|
-
const u = new B(
|
|
682
|
-
|
|
680
|
+
s = h.clone(), o.push(n.clone(), s.clone());
|
|
681
|
+
const u = new B(_.from(n), _.from(s));
|
|
682
|
+
y.setBaseLine(u, u.end), n.copy(s), c();
|
|
683
683
|
} else if (t.eventInput.isOnlyKeyDowns(this.withdrawalKeys)) {
|
|
684
|
-
if (
|
|
684
|
+
if (o.length) {
|
|
685
685
|
const { point: u } = t.renderManager.adsorption();
|
|
686
|
-
if (
|
|
687
|
-
const
|
|
688
|
-
|
|
686
|
+
if (o.pop(), s?.copy(u), n?.copy(o.pop()), c(), o.length >= 2) {
|
|
687
|
+
const v = new B(_.from(o[o.length - 2]), _.from(o[o.length - 1]));
|
|
688
|
+
y.setBaseLine(v, v.end);
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
|
-
} else t.eventInput.isKeyDowns(this.confirmKeys) && e(
|
|
691
|
+
} else t.eventInput.isKeyDowns(this.confirmKeys) && e(o);
|
|
692
692
|
}),
|
|
693
693
|
function() {
|
|
694
694
|
l.removeFromParent(), a.removeFromParent(), i.removeFromParent();
|
|
@@ -700,8 +700,8 @@ class vn extends O {
|
|
|
700
700
|
*/
|
|
701
701
|
end(e, t) {
|
|
702
702
|
const n = [];
|
|
703
|
-
for (let
|
|
704
|
-
n.push(new B(
|
|
703
|
+
for (let s = 0; s < t.length; s += 2)
|
|
704
|
+
n.push(new B(_.from(t[s]), _.from(t[s + 1])));
|
|
705
705
|
e(n);
|
|
706
706
|
}
|
|
707
707
|
/** 执行完成
|
|
@@ -723,7 +723,7 @@ class vn extends O {
|
|
|
723
723
|
return this.completed(e), e;
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
|
-
class _e extends
|
|
726
|
+
class _e extends R {
|
|
727
727
|
static name = "Default";
|
|
728
728
|
container = new m.Group();
|
|
729
729
|
onAddFromParent() {
|
|
@@ -776,8 +776,8 @@ class _e extends O {
|
|
|
776
776
|
* @param next
|
|
777
777
|
*/
|
|
778
778
|
start() {
|
|
779
|
-
const e = this.editor, t = e.eventInput, n = new m.Mesh(),
|
|
780
|
-
let
|
|
779
|
+
const e = this.editor, t = e.eventInput, n = new m.Mesh(), s = e.domContainer.domElement;
|
|
780
|
+
let o = null;
|
|
781
781
|
n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new m.MeshBasicMaterial({ color: 55561 });
|
|
782
782
|
const a = () => {
|
|
783
783
|
const r = e.pointerPosition.clone(), l = e.pointerPosition.clone(), i = new m.Mesh();
|
|
@@ -787,14 +787,14 @@ class _e extends O {
|
|
|
787
787
|
opacity: 0.5
|
|
788
788
|
});
|
|
789
789
|
const c = () => {
|
|
790
|
-
const u = Math.min(r.x, l.x),
|
|
790
|
+
const u = Math.min(r.x, l.x), v = Math.max(r.x, l.x), g = Math.min(r.y, l.y), E = Math.max(r.y, l.y), x = [
|
|
791
791
|
u,
|
|
792
792
|
E,
|
|
793
793
|
0,
|
|
794
|
-
|
|
794
|
+
v,
|
|
795
795
|
g,
|
|
796
796
|
0,
|
|
797
|
-
|
|
797
|
+
v,
|
|
798
798
|
E,
|
|
799
799
|
0,
|
|
800
800
|
u,
|
|
@@ -803,19 +803,19 @@ class _e extends O {
|
|
|
803
803
|
u,
|
|
804
804
|
g,
|
|
805
805
|
0,
|
|
806
|
-
|
|
806
|
+
v,
|
|
807
807
|
g,
|
|
808
808
|
0
|
|
809
809
|
];
|
|
810
|
-
i.geometry = e.renderManager.createGeometry({ position:
|
|
810
|
+
i.geometry = e.renderManager.createGeometry({ position: x }, x.length / 3);
|
|
811
811
|
}, h = () => {
|
|
812
812
|
l.copy(e.pointerPosition), c();
|
|
813
|
-
},
|
|
814
|
-
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup",
|
|
815
|
-
const u = Math.min(r.x, l.x),
|
|
816
|
-
this.removeSelectLineAll(), D.forEach((
|
|
813
|
+
}, y = () => {
|
|
814
|
+
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", y), i.removeFromParent();
|
|
815
|
+
const u = Math.min(r.x, l.x), v = Math.max(r.x, l.x), g = Math.min(r.y, l.y), E = Math.max(r.y, l.y), x = new Ye(u, v, g, E), D = e.renderManager.quadtree.queryBox(x);
|
|
816
|
+
this.removeSelectLineAll(), D.forEach((z) => this.addSelectLine(z.line)), this.updateSelectLinesGeometry();
|
|
817
817
|
};
|
|
818
|
-
document.addEventListener("mousemove", h), document.addEventListener("mouseup",
|
|
818
|
+
document.addEventListener("mousemove", h), document.addEventListener("mouseup", y);
|
|
819
819
|
};
|
|
820
820
|
this.addEventRecord(
|
|
821
821
|
"clear",
|
|
@@ -824,22 +824,22 @@ class _e extends O {
|
|
|
824
824
|
const { line: r } = e.renderManager.adsorption();
|
|
825
825
|
if (r) {
|
|
826
826
|
const l = r.expandToRectangle(0.025, "bothSides");
|
|
827
|
-
n.geometry = e.renderManager.createGeometry({ position: l.createGeometry() }, 6), this.container.add(n),
|
|
827
|
+
n.geometry = e.renderManager.createGeometry({ position: l.createGeometry() }, 6), this.container.add(n), s.style.cursor = "pointer", o = r;
|
|
828
828
|
} else
|
|
829
|
-
n.removeFromParent(),
|
|
829
|
+
n.removeFromParent(), s.style.cursor = "default", o = null;
|
|
830
830
|
}),
|
|
831
831
|
t.addEventListener("codeChange", () => {
|
|
832
832
|
if (t.isKeyDown("mouse_0")) {
|
|
833
|
-
if (!
|
|
833
|
+
if (!o) return a();
|
|
834
834
|
if (t.isKeyDown("alt"))
|
|
835
|
-
return this.removeSelectLine(
|
|
836
|
-
t.isKeyDown("control") || this.removeSelectLineAll(), this.addSelectLine(
|
|
835
|
+
return this.removeSelectLine(o);
|
|
836
|
+
t.isKeyDown("control") || this.removeSelectLineAll(), this.addSelectLine(o);
|
|
837
837
|
} else if (t.isKeyDown("mouse_1")) {
|
|
838
|
-
if (!
|
|
839
|
-
this.removeSelectLine(
|
|
838
|
+
if (!o) return;
|
|
839
|
+
this.removeSelectLine(o);
|
|
840
840
|
} else if (t.isKeyDown("mouse_2")) {
|
|
841
|
-
if (!
|
|
842
|
-
this.addSelectLine(
|
|
841
|
+
if (!o) return;
|
|
842
|
+
this.addSelectLine(o);
|
|
843
843
|
} else t.isKeyDowns(["control", "z"]) ? e.commandManager.rollback() : t.isKeyDowns(["control", "y"]) && e.commandManager.revokeRollback();
|
|
844
844
|
}),
|
|
845
845
|
function() {
|
|
@@ -854,7 +854,7 @@ class _e extends O {
|
|
|
854
854
|
this.canceEventRecord("clear"), this.removeSelectLineAll(), this.updateSelectLinesGeometry();
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
|
-
class
|
|
857
|
+
class wn extends Xe {
|
|
858
858
|
list = [];
|
|
859
859
|
rollbacklist = [];
|
|
860
860
|
revokeRollbacklist = [];
|
|
@@ -882,7 +882,7 @@ class fn extends Xe {
|
|
|
882
882
|
return this.revokeRollbacklist.push(e), this;
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
class
|
|
885
|
+
class bn extends Xe {
|
|
886
886
|
commandFlowMap = /* @__PURE__ */ new Map();
|
|
887
887
|
lock = !1;
|
|
888
888
|
abortController = null;
|
|
@@ -909,7 +909,7 @@ class yn extends Xe {
|
|
|
909
909
|
*/
|
|
910
910
|
addCommandFlow(e) {
|
|
911
911
|
if (this.commandFlowMap.has(e)) throw new Error(`${e} 命令已经存在`);
|
|
912
|
-
const t = new
|
|
912
|
+
const t = new wn();
|
|
913
913
|
return this.commandFlowMap.set(e, t), t;
|
|
914
914
|
}
|
|
915
915
|
executionPromise = null;
|
|
@@ -926,25 +926,25 @@ class yn extends Xe {
|
|
|
926
926
|
currentName: this.currentName
|
|
927
927
|
}), this.executionPromise && await this.executionPromise, this.executionPromise = null, this.lock)
|
|
928
928
|
throw new Error("命令管理器已被 " + this.currentName + " 命令锁定,无法启动新的命令流,请退出或等待命令执行结束");
|
|
929
|
-
const
|
|
930
|
-
if (!
|
|
929
|
+
const s = this.commandFlowMap.get(e);
|
|
930
|
+
if (!s)
|
|
931
931
|
throw new Error(`命令流 ${e} 不存在`);
|
|
932
|
-
this.lock = !0, this.abortController = new AbortController(), this.currentName = e,
|
|
932
|
+
this.lock = !0, this.abortController = new AbortController(), this.currentName = e, s.dispatchEvent({ type: "started" }), this.dispatchEvent({ type: "started", name: e });
|
|
933
933
|
try {
|
|
934
|
-
for (let
|
|
935
|
-
const a =
|
|
936
|
-
if (
|
|
934
|
+
for (let o = n; o < s.list.length; o++) {
|
|
935
|
+
const a = s.list[o];
|
|
936
|
+
if (s.dispatchEvent({ type: "executing", index: o }), this.dispatchEvent({ type: "executing", name: e, index: o }), t = await new Promise((r) => {
|
|
937
937
|
this.resolve = r, a(r, t);
|
|
938
938
|
}), this.abortController.signal.aborted) {
|
|
939
|
-
|
|
939
|
+
s.dispatchEvent({ type: "executionInterrupt", index: o }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: o }), this.dispatchEvent({ type: "cancel", name: e });
|
|
940
940
|
break;
|
|
941
941
|
} else
|
|
942
|
-
|
|
942
|
+
s.dispatchEvent({ type: "executionCompleted", index: o, data: t }), this.dispatchEvent({ type: "executionCompleted", name: e, index: o, data: t });
|
|
943
943
|
}
|
|
944
|
-
} catch (
|
|
945
|
-
console.error(
|
|
944
|
+
} catch (o) {
|
|
945
|
+
console.error(o);
|
|
946
946
|
} finally {
|
|
947
|
-
this.abortController && !this.abortController.signal.aborted && (
|
|
947
|
+
this.abortController && !this.abortController.signal.aborted && (s.dispatchEvent({ type: "completed", data: t }), this.dispatchEvent({ type: "completed", name: e, data: t }), s.writeOperationList && (this.operationList.push({ name: e, data: t }), this.rollbackList.length = 0)), this.lock = !1, this.abortController = null, this.currentName = null, s.dispatchEvent({ type: "finally" }), this.dispatchEvent({ type: "finally", name: e }), this.executionResolve && (this.executionResolve(null), this.executionResolve = null);
|
|
948
948
|
}
|
|
949
949
|
return t;
|
|
950
950
|
}
|
|
@@ -962,7 +962,7 @@ class yn extends Xe {
|
|
|
962
962
|
if (!e) return !1;
|
|
963
963
|
const t = this.commandFlowMap.get(e.name);
|
|
964
964
|
if (!t) return !1;
|
|
965
|
-
const n = t.rollbacklist.reduce((
|
|
965
|
+
const n = t.rollbacklist.reduce((s, o) => o(s), e.data);
|
|
966
966
|
return this.dispatchEvent({ type: "rollback", name: e.name }), this.rollbackList.push({
|
|
967
967
|
data: n,
|
|
968
968
|
name: e.name
|
|
@@ -980,70 +980,69 @@ class yn extends Xe {
|
|
|
980
980
|
if (!e) return !1;
|
|
981
981
|
const t = this.commandFlowMap.get(e.name);
|
|
982
982
|
if (!t) return !1;
|
|
983
|
-
const n = t.revokeRollbacklist.reduce((
|
|
983
|
+
const n = t.revokeRollbacklist.reduce((s, o) => o(s), e.data);
|
|
984
984
|
return this.dispatchEvent({ type: "revokeRollback", name: e.name }), this.operationList.push({ name: e.name, data: n }), !0;
|
|
985
985
|
} catch (e) {
|
|
986
986
|
throw new Error(`撤回回滚失败:${e}`);
|
|
987
987
|
}
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
const
|
|
991
|
-
__proto__: null,
|
|
992
|
-
default: wn
|
|
993
|
-
}, Symbol.toStringTag, { value: "Module" })), Cn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M639.999191%20893.597594c-0.999994-54.699654-36.39977-101.099361-85.39946-118.399252-6.39996-2.199986-10.599933-8.299948-10.599933-14.999905V263.801573c0-6.699958%204.199973-12.799919%2010.599933-14.999905%2049.09969-17.299891%2084.399467-63.599598%2085.39946-118.399252C641.299183%2059.902862%20583.399549%200.503237%20512.899994%200.00324%20441.800444-0.496757%20384.000809%2057.00288%20384.000809%20128.002431c0%2055.699648%2035.599775%20103.099349%2085.299461%20120.699238%206.39996%202.299985%2010.699932%208.299948%2010.699932%2015.099904v496.396864c0%206.799957-4.299973%2012.799919-10.699932%2015.099904-49.699686%2017.599889-85.299461%2064.999589-85.299461%20120.699238%200%2070.999551%2057.799635%20128.499188%20128.899185%20127.999191%2070.499555-0.499997%20128.399189-59.899622%20127.099197-130.399176zM448.000404%20128.002431c0-35.299777%2028.699819-63.999596%2063.999596-63.999595s63.999596%2028.699819%2063.999596%2063.999595-28.699819%2063.999596-63.999596%2063.999596-63.999596-28.699819-63.999596-63.999596z%20m0%20767.995148c0-35.299777%2028.699819-63.999596%2063.999596-63.999596s63.999596%2028.699819%2063.999596%2063.999596-28.699819%2063.999596-63.999596%2063.999595-63.999596-28.699819-63.999596-63.999595z'%3e%3c/path%3e%3c/svg%3e", xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
990
|
+
const xn = "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%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5569'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M522.1888%20811.3152a412.1088%20412.1088%200%200%200-114.5344-269.7728l-244.48%20269.7728h359.0144zM450.816%20493.824c83.5072%2085.3504%20132.7104%20197.4784%20136.5504%20317.4912h417.5872v63.232H18.9952L676.1472%20149.4016l48.9472%2041.7792-274.2784%20302.6432z'%20%3e%3c/path%3e%3c/svg%3e", Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
994
991
|
__proto__: null,
|
|
995
|
-
default:
|
|
996
|
-
}, Symbol.toStringTag, { value: "Module" })), En = "data:image/svg+xml,%
|
|
992
|
+
default: xn
|
|
993
|
+
}, Symbol.toStringTag, { value: "Module" })), En = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M639.999191%20893.597594c-0.999994-54.699654-36.39977-101.099361-85.39946-118.399252-6.39996-2.199986-10.599933-8.299948-10.599933-14.999905V263.801573c0-6.699958%204.199973-12.799919%2010.599933-14.999905%2049.09969-17.299891%2084.399467-63.599598%2085.39946-118.399252C641.299183%2059.902862%20583.399549%200.503237%20512.899994%200.00324%20441.800444-0.496757%20384.000809%2057.00288%20384.000809%20128.002431c0%2055.699648%2035.599775%20103.099349%2085.299461%20120.699238%206.39996%202.299985%2010.699932%208.299948%2010.699932%2015.099904v496.396864c0%206.799957-4.299973%2012.799919-10.699932%2015.099904-49.699686%2017.599889-85.299461%2064.999589-85.299461%20120.699238%200%2070.999551%2057.799635%20128.499188%20128.899185%20127.999191%2070.499555-0.499997%20128.399189-59.899622%20127.099197-130.399176zM448.000404%20128.002431c0-35.299777%2028.699819-63.999596%2063.999596-63.999595s63.999596%2028.699819%2063.999596%2063.999595-28.699819%2063.999596-63.999596%2063.999596-63.999596-28.699819-63.999596-63.999596z%20m0%20767.995148c0-35.299777%2028.699819-63.999596%2063.999596-63.999596s63.999596%2028.699819%2063.999596%2063.999596-28.699819%2063.999596-63.999596%2063.999595-63.999596-28.699819-63.999596-63.999595z'%3e%3c/path%3e%3c/svg%3e", Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
997
994
|
__proto__: null,
|
|
998
995
|
default: En
|
|
999
|
-
}, Symbol.toStringTag, { value: "Module" })), Ln = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='
|
|
996
|
+
}, Symbol.toStringTag, { value: "Module" })), Ln = "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%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8193'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M426.666667%20255.872c0%2031.232-8.405333%2060.544-23.04%2085.76L512%20451.498667l287.061333-287.061334a85.333333%2085.333333%200%200%201%20120.661334%200l-516.693334%20516.693334a170.666667%20170.666667%200%201%201-60.330666-60.330667l108.970666-108.970667-108.970666-108.970666A170.666667%20170.666667%200%201%201%20426.666667%20255.872z%20m-85.333334%200a85.333333%2085.333333%200%201%200-170.666666%200%2085.333333%2085.333333%200%200%200%20170.666666%200z%20m578.389334%20603.392a85.333333%2085.333333%200%200%201-120.661334%200l-226.858666-226.858667%2060.373333-60.330666%20287.146667%20287.146666zM682.666667%20469.205333h85.333333v85.333334h-85.333333v-85.333334z%20m170.666666%200h85.333334v85.333334h-85.333334v-85.333334z%20m-597.333333%200h85.333333v85.333334H256v-85.333334z%20m-170.666667%200h85.333334v85.333334H85.333333v-85.333334z%20m170.666667%20384a85.333333%2085.333333%200%201%200%200-170.666666%2085.333333%2085.333333%200%200%200%200%20170.666666z'%3e%3c/path%3e%3c/svg%3e", kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1000
997
|
__proto__: null,
|
|
1001
998
|
default: Ln
|
|
1002
|
-
}, Symbol.toStringTag, { value: "Module" })), In = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='
|
|
999
|
+
}, Symbol.toStringTag, { value: "Module" })), In = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M909.050991%20169.476903l-217.554898%200%200-31.346939c0-39.5866-32.205493-71.792093-71.793116-71.792093L408.15591%2066.337871c-39.5866%200-71.792093%2032.205493-71.792093%2071.792093l0%2031.346939L113.349581%20169.476903c-11.013845%200-19.942191%208.940626-19.942191%2019.954471s8.928347%2019.954471%2019.942191%2019.954471l84.264149%200%200%20640.687918c0%2060.479443%2049.203632%20109.683075%20109.683075%20109.683075l416.474366%200c60.479443%200%20109.683075-49.203632%20109.683075-109.683075L833.454246%20209.385844l75.595722%200c11.012821%200%2019.942191-8.940626%2019.942191-19.954471S920.063813%20169.476903%20909.050991%20169.476903zM376.2482%20138.130987c0-17.593703%2014.314007-31.907711%2031.907711-31.907711l211.547067%200c17.593703%200%2031.907711%2014.314007%2031.907711%2031.907711l0%2031.346939L376.2482%20169.477926%20376.2482%20138.130987zM793.569864%20850.074785c0%2038.486546-31.312146%2069.798692-69.798692%2069.798692L307.297828%20919.873478c-38.486546%200-69.798692-31.312146-69.798692-69.798692L237.499136%20211.042577l556.070728%200L793.569864%20850.074785zM510.662539%20861.276918c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L530.61701%20294.912753c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191L490.708068%20841.334727C490.708068%20852.347548%20499.649717%20861.276918%20510.662539%20861.276918zM374.562814%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L394.517285%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C354.608344%20792.519951%20363.549993%20801.449321%20374.562814%20801.449321zM649.832182%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L669.786653%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C629.877711%20792.519951%20638.81936%20801.449321%20649.832182%20801.449321z'%20%3e%3c/path%3e%3c/svg%3e", Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1003
1000
|
__proto__: null,
|
|
1004
1001
|
default: In
|
|
1005
|
-
}, Symbol.toStringTag, { value: "Module" })), Dn = "data:image/svg+xml,%
|
|
1002
|
+
}, Symbol.toStringTag, { value: "Module" })), Dn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M220.451548%20913.518482V318.145854c0-27.62038%2022.505495-50.125874%2050.125875-50.125874H865.95005c27.62038%200%2050.125874%2022.505495%2050.125874%2050.125874v218.917083h59.332667V318.145854c0-60.355644-49.102897-109.458541-109.458541-109.458541h-39.896104v-99.228772C826.053946%2049.102897%20776.951049%200%20716.595405%200H121.222777C60.867133%200%2011.764236%2049.102897%2011.764236%20109.458541V705.854146c0%2060.355644%2049.102897%20109.458541%20109.458541%20109.458541h39.896104v99.228772c0%2060.355644%2049.102897%20109.458541%20109.458542%20109.458541h257.790209v-59.332667H269.554446c-26.597403-1.022977-49.102897-23.528472-49.102898-51.148851z%20m-59.332667-595.372628v436.811189h-39.896104c-27.62038%200-50.125874-22.505495-50.125874-50.125874V109.458541c0-27.62038%2022.505495-50.125874%2050.125874-50.125874H716.595405c27.62038%200%2050.125874%2022.505495%2050.125874%2050.125874v99.228772H269.554446c-59.332667%200-108.435564%2049.102897-108.435565%20109.458541z'%20%3e%3c/path%3e%3cpath%20d='M902.777223%20854.185814l98.205794-98.205794c15.344655-15.344655%2015.344655-40.919081%200-56.263736s-40.919081-15.344655-56.263736%200L846.513487%20797.922078%20747.284715%20699.716284c-15.344655-15.344655-40.919081-15.344655-56.263736%200s-15.344655%2040.919081%200%2056.263736l98.205794%2098.205794-98.205794%2098.205794c-15.344655%2015.344655-15.344655%2040.919081%200%2056.263737s40.919081%2015.344655%2056.263736%200l98.205794-98.205795%2098.205795%2098.205795c15.344655%2015.344655%2040.919081%2015.344655%2056.263736%200s15.344655-40.919081%200-56.263737l-97.182817-98.205794z'%20%3e%3c/path%3e%3c/svg%3e", An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1006
1003
|
__proto__: null,
|
|
1007
1004
|
default: Dn
|
|
1008
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1005
|
+
}, Symbol.toStringTag, { value: "Module" })), Sn = "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='1757902601497'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9801'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M761.344%20119.296H226.816c-18.944%200-39.424%2011.776-39.424%2030.72V921.6h614.4V148.48c0.512-18.944-22.016-29.184-40.448-29.184z%20m-537.6%20768c-2.048%200-2.048%200%200%200L221.696%20163.84c0-5.12%205.12-10.24%2010.24-10.24h522.24c8.704%200%2013.824%205.12%2013.824%2013.824v720.384s0%201.536-1.536%201.536h-15.36V194.56c0-16.896-8.704-24.064-29.184-24.064H266.24c-18.944%200-27.136%208.704-27.136%2024.064v692.736h-15.36z%20m49.152%200V204.8H716.8v682.496H272.896z'%20p-id='9802'%3e%3c/path%3e%3cpath%20d='M648.704%20508.416c-16.896%200-32.256%2013.824-32.256%2032.256%200%2016.896%2013.824%2032.256%2032.256%2032.256s32.256-13.824%2032.256-32.256c0-16.896-13.824-32.256-32.256-32.256z'%20p-id='9803'%3e%3c/path%3e%3c/svg%3e", _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1009
1006
|
__proto__: null,
|
|
1010
|
-
default:
|
|
1011
|
-
}, Symbol.toStringTag, { value: "Module" })), Bn = "data:image/svg+xml,%
|
|
1007
|
+
default: Sn
|
|
1008
|
+
}, Symbol.toStringTag, { value: "Module" })), Bn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M491.80027198%20557.44938977c-10.0998647-15.14979706-20.19972802-25.24966037-35.34952507-35.34952507-15.14979706-10.0998647-30.29959271-15.14979706-50.49932211-15.14979704-55.54925309%200-100.99864286%2045.44938977-100.99864287%20100.99864285%200%2015.14979706%205.04993234%2035.34952507%2015.14979568%2050.49932212%2010.0998647%2015.14979706%2020.19972802%2030.29959271%2035.34952506%2035.34952508%2015.14979706%2010.0998647%2035.34952507%2015.14979706%2050.49932213%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864287%200-15.14979706-5.04993234-35.34952507-15.14979568-50.49932074z%20m-85.84884718%20100.99864286h-15.14979706c-20.19972802-5.04993234-30.29959271-20.19972802-35.34952507-35.34952507V612.99864286c0-30.29959271%2025.24966037-50.49932212%2050.49932213-50.49932074h10.09986469c15.14979706%205.04993234%2030.29959271%2015.14979706%2035.34952507%2035.34952507v15.14979567c5.04993234%2025.24966037-20.19972802%2045.44938977-45.44938976%2045.44938977z'%3e%3c/path%3e%3cpath%20d='M390.80162774%20658.44803263l-40.39945604%2040.39945743-227.24694747%20222.19701373-35.34952506-35.34952508%20227.24694745-227.24694608%2040.39945605-40.39945743c5.04993234%2020.19972802%2020.19972802%2035.34952507%2035.34952507%2040.39945743zM648.34816793%20405.9514248l-40.39945742%2040.3994574-116.14843853%20116.14843992-40.39945742%2035.34952507c-5.04993234-20.19972802-20.19972802-30.29959271-35.34952507-35.34952507l40.39945742-40.39945742%20116.14843853-111.09850756%2035.34952507-35.34952507c10.0998647%2015.14979706%2020.19972802%2025.24966037%2040.39945742%2030.29959273zM926.09443614%20133.25508894L749.34681078%20310.00271428l-40.3994574%2040.39945742c-5.04993234-20.19972802-15.14979706-35.34952507-30.29959272-40.39945742l35.34952506-40.39945742%20176.74762534-176.74762535%2035.34952508%2040.39945743z'%20%3e%3c/path%3e%3cpath%20d='M749.34681078%20310.00271428c-10.0998647-15.14979706-20.19972802-30.29959271-35.34952506-35.34952506-15.14979706-10.0998647-35.34952507-15.14979706-55.54925309-15.14979706-55.54925309%200-100.99864286%2045.44938977-100.99864286%20100.99864286%200%2020.19972802%205.04993234%2040.39945743%2015.14979567%2055.54925447%2010.0998647%2015.14979706%2020.19972802%2025.24966037%2035.34952507%2035.34952507%2015.14979706%2010.0998647%2030.29959271%2015.14979706%2050.49932212%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864286%200-25.24966037-5.04993234-40.39945743-10.09986471-55.54925309z%20m-90.89877815%2095.94871052h-10.0998647c-20.19972802-5.04993234-35.34952507-15.14979706-40.39945742-35.34952509%200-5.04993234-5.04993234-10.0998647-5.04993234-15.14979704%200-30.29959271%2025.24966037-50.49932212%2050.49932212-50.49932074%205.04993234%200%2010.0998647%200%2015.14979704%205.04993235%2015.14979706%205.04993234%2030.29959271%2020.19972802%2030.29959273%2040.39945742v10.09986332c10.0998647%2025.24966037-15.14979706%2045.44938977-40.39945743%2045.44938978z'%20%3e%3c/path%3e%3c/svg%3e", Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1012
1009
|
__proto__: null,
|
|
1013
1010
|
default: Bn
|
|
1014
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1011
|
+
}, Symbol.toStringTag, { value: "Module" })), On = "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='1757902422799'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1735'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M843.2%20726.4c-20.2%200-39.2%205.2-55.8%2014.3L283.8%20237.2c9-16.5%2014.1-35.4%2014.1-55.5%200-64.2-52.3-116.5-116.5-116.5S65%20117.4%2065%20181.6s52.3%20116.5%20116.5%20116.5c20.2%200%2039.2-5.2%2055.8-14.2l503.5%20503.5c-9%2016.5-14.1%2035.4-14.1%2055.5%200%2064.2%2052.3%20116.5%20116.5%20116.5s116.5-52.3%20116.5-116.5-52.3-116.5-116.5-116.5zM181.4%20232.1c-27.8%200-50.5-22.6-50.5-50.5s22.6-50.5%2050.5-50.5%2050.5%2022.6%2050.5%2050.5-22.6%2050.5-50.5%2050.5z%20m661.8%20661.3c-27.8%200-50.5-22.6-50.5-50.5%200-27.8%2022.6-50.5%2050.5-50.5s50.5%2022.6%2050.5%2050.5c0%2027.8-22.7%2050.5-50.5%2050.5z'%20fill='%23231815'%20p-id='1736'%3e%3c/path%3e%3c/svg%3e", Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1015
1012
|
__proto__: null,
|
|
1016
|
-
default:
|
|
1017
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1013
|
+
default: On
|
|
1014
|
+
}, Symbol.toStringTag, { value: "Module" })), Kn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M114.176%2046.528h618.496c37.312%200.064%2067.584%2030.336%2067.648%2067.648v618.56c0%2037.248-30.336%2067.584-67.648%2067.584H114.176A67.776%2067.776%200%200%201%2046.528%20732.8V114.176c0-37.312%2030.336-67.648%2067.648-67.648z%20m2.176%20686.208l616.32-2.24-2.176-616.32-614.144%202.176v616.32zM907.648%20291.2l2.176%20616.32H291.264a34.88%2034.88%200%201%200%200%2069.888h618.56c37.312%200%2067.648-30.336%2067.648-67.648V291.264a34.88%2034.88%200%201%200-69.824%200z'%20%3e%3c/path%3e%3c/svg%3e", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1018
1015
|
__proto__: null,
|
|
1019
|
-
default:
|
|
1020
|
-
}, Symbol.toStringTag, { value: "Module" })), zn = "data:image/svg+xml,%3csvg%20viewBox='0%200%
|
|
1016
|
+
default: Kn
|
|
1017
|
+
}, Symbol.toStringTag, { value: "Module" })), zn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201029%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M788.17984%2016l-55.424%2060.672%20116.48%20106.56H418.13184a410.816%20410.816%200%201%200%200%20821.632h547.712v-82.176H418.13184a328.64%20328.64%200%200%201%200-657.28l441.792-0.128-124.8%2098.368%2050.752%2064.512%20243.328-191.488L788.17984%2016z'%3e%3c/path%3e%3c/svg%3e", Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1021
1018
|
__proto__: null,
|
|
1022
1019
|
default: zn
|
|
1023
|
-
}, Symbol.toStringTag, { value: "Module" })), jn = "data:image/svg+xml,%
|
|
1020
|
+
}, Symbol.toStringTag, { value: "Module" })), jn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201048%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M310.04722%20451.334244A49.95122%2049.95122%200%200%201%20239.416195%20521.990244L27.473171%20310.04722a49.95122%2049.95122%200%200%201%200-70.631025L239.416195%2027.473171a49.95122%2049.95122%200%200%201%2070.631025%2070.631024l-126.651318%20126.626342L649.365854%20224.780488c220.709463%200%20399.609756%20178.900293%20399.609756%20399.609756s-178.900293%20399.609756-399.609756%20399.609756H124.878049a49.95122%2049.95122%200%201%201%200-99.902439h524.487805c165.513366%200%20299.707317-134.193951%20299.707317-299.707317s-134.193951-299.707317-299.707317-299.707317H183.395902l126.651318%20126.651317z'%3e%3c/path%3e%3c/svg%3e", Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1024
1021
|
__proto__: null,
|
|
1025
1022
|
default: jn
|
|
1026
|
-
}, 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%
|
|
1023
|
+
}, 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%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='11576'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M102.4%20302.08c5.12%205.12%2015.36%2010.24%2025.6%2010.24s15.36-5.12%2025.6-10.24l174.08-174.08c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-20.48-5.12-40.96-5.12-51.2%2010.24l-148.48%20153.6-71.68-76.8C51.2%20158.72%2040.96%20158.72%2035.84%20158.72c-10.24%200-15.36%205.12-25.6%2010.24-5.12%205.12-10.24%2010.24-10.24%2020.48s5.12%2015.36%2010.24%2025.6L102.4%20302.08zM276.48%20409.6l-148.48%20153.6-71.68-71.68C51.2%20486.4%2040.96%20481.28%2035.84%20481.28c-10.24%200-15.36%205.12-25.6%2010.24-5.12%2010.24-10.24%2015.36-10.24%2025.6s5.12%2015.36%2010.24%2025.6L102.4%20629.76c5.12%205.12%2015.36%2010.24%2025.6%2010.24s15.36-5.12%2025.6-10.24L322.56%20460.8c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-10.24-10.24-30.72-10.24-46.08%200z%20m0%20327.68l-148.48%20153.6L56.32%20819.2c-5.12-5.12-15.36-10.24-25.6-10.24s-15.36%205.12-25.6%2010.24c0%205.12-5.12%2015.36-5.12%2025.6s5.12%2015.36%2010.24%2025.6L102.4%20957.44c5.12%205.12%2015.36%2010.24%2025.6%2010.24h5.12c10.24%200%2015.36-5.12%2025.6-10.24l174.08-174.08c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-25.6-5.12-40.96-5.12-56.32%205.12zM1024%20153.6c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-61.44-25.6-61.44-56.32%200-30.72%2025.6-56.32%2056.32-56.32h455.68c35.84-5.12%2066.56%2020.48%2066.56%2056.32z%20m0%20358.4c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-56.32-25.6-56.32-56.32s25.6-56.32%2056.32-56.32h455.68c35.84%200%2061.44%2025.6%2061.44%2056.32z%20m-5.12%20358.4c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-56.32-25.6-56.32-56.32%200-30.72%2025.6-56.32%2056.32-56.32h455.68c35.84%200%2061.44%2025.6%2061.44%2056.32z%20m0%200'%20%3e%3c/path%3e%3c/svg%3e", Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1027
1024
|
__proto__: null,
|
|
1028
1025
|
default: Gn
|
|
1029
|
-
}, Symbol.toStringTag, { value: "Module" })), Hn = "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%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='
|
|
1026
|
+
}, Symbol.toStringTag, { value: "Module" })), Hn = "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='1757902488735'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3957'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M520.416%20179.392c-12.384%200-22.4%204.672-22.4%2010.432l-0.032%20139.136c0%205.76%2010.016%2010.432%2022.368%2010.432%2012.352%200%2022.368-4.672%2022.368-10.432l0.064-139.136c0-5.76-10.016-10.432-22.4-10.432M520.32%20623.04c-12.352%200-22.368%204.64-22.368%2010.4l-0.032%20139.168c0%205.76%2010.016%2010.432%2022.368%2010.432%2012.352%200%2022.368-4.672%2022.368-10.432l0.064-139.168c0-5.76-10.016-10.4-22.4-10.4M800.256%20458.72l-139.168-0.064c-5.76%200-10.432%2010.016-10.432%2022.4%200%2012.352%204.672%2022.368%2010.432%2022.368l139.168%200.032c5.76%200%2010.4-10.016%2010.4-22.368%200-12.352-4.64-22.368-10.4-22.4zM352.256%20458.72l-139.168-0.064c-5.76%200-10.432%2010.016-10.432%2022.4%200%2012.352%204.672%2022.368%2010.432%2022.368l139.168%200.032c5.76%200%2010.4-10.016%2010.4-22.368%200-12.352-4.64-22.368-10.4-22.4M801.568%20748.672l-72.544-72.544%2073.792-23.2a4.416%204.416%200%200%200%200.096-8.384l-183.136-62.4a4.416%204.416%200%200%200-5.6%205.568l62.464%20183.168a4.416%204.416%200%200%200%208.352-0.064l23.36-73.6%2072.32%2072.32a14.752%2014.752%200%200%200%2020.896-20.864M510.688%20382.112c49.952%200%2092.8%2040.832%2092.8%2092.8%200%2051.968-42.848%2092.8-92.8%2092.8-49.984%200-92.8-40.832-92.8-92.8%200-51.968%2042.816-92.8%2092.8-92.8z'%20p-id='3958'%3e%3c/path%3e%3c/svg%3e", Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1030
1027
|
__proto__: null,
|
|
1031
1028
|
default: Hn
|
|
1032
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1029
|
+
}, Symbol.toStringTag, { value: "Module" })), Jn = "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%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='10587'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M64.21%20703.88h888.34M64.21%20667.88h888.34v72H64.21z'%3e%3c/path%3e%3cpath%20d='M509.58%20102.72v566.13M473.58%20102.72h72v566.14h-72z'%3e%3c/path%3e%3c/svg%3e", Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1033
1030
|
__proto__: null,
|
|
1034
|
-
default:
|
|
1035
|
-
}, Symbol.toStringTag, { value: "Module" })), qn = "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='
|
|
1031
|
+
default: Jn
|
|
1032
|
+
}, Symbol.toStringTag, { value: "Module" })), qn = "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='1759051895215'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1800'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M272.5888%20886.784v70.8608H203.2128V886.784h69.376z%20m416.256-256.6144l270.6944%20152.5248-270.6944%20148.1216v-114.8928H64.4608v-70.8608h624.384v-114.8928z%20m-416.256-26.88v70.912H203.2128v-70.912h69.376z%20m0-141.7216V532.48H203.2128V461.568h69.376z%20m-34.7136-398.336L385.024%20319.7952H272.5888V390.656H203.2128V319.8464H90.7776l147.0976-256.6656z'%20fill='%23444444'%20p-id='1801'%3e%3c/path%3e%3cpath%20d='M566.272%2073.3184l173.2608%20264.192V512h71.8848V337.5104l173.2608-264.192H898.048l-122.2656%20197.2224-122.88-197.2224H566.272z'%20fill='%230077FF'%20p-id='1802'%3e%3c/path%3e%3c/svg%3e", Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1036
1033
|
__proto__: null,
|
|
1037
1034
|
default: qn
|
|
1038
|
-
}, Symbol.toStringTag, { value: "Module" })), Yn = "data:image/
|
|
1039
|
-
|
|
1035
|
+
}, Symbol.toStringTag, { value: "Module" })), Yn = "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", Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1036
|
+
__proto__: null,
|
|
1037
|
+
default: Yn
|
|
1038
|
+
}, Symbol.toStringTag, { value: "Module" })), $n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAKdUlEQVR4AeydbZrUKBRGq2YjOjvpWYntStSVjK5EdzLOSsr7arBLOkkBAcLHmacwlQQInMsZUvdP/3Xhv+oEbrfbk5XYz1P1gfLAC4KwCCCwQwBBduBwCwIIwhqAwA4BBNmBwy0IFBQEuBDonwCC9B9DZlCQAIIUhEvX/RNAkP5jyAwKEkCQgnDpun8CfQrSP3dm0AkBBOkkUAzzHAIIcg53ntoJAQTpJFAM8xwCCHIOd57aCQEE8QLFKQTuCSDIPQ2+Q8AjgCAeEE4hcE8AQe5p8B0CHgEE8YBwCoF7AghyT6Psd3rvkACCdBg0hlyPAILUY82TOiSAIB0GjSHXI4Ag9VjzpA4JIEiHQXs9ZK6UIoAgpcjS7xAEEGSIMDKJUgQQpBRZ+h2CAIIMEUYmUYoAgpQiO0q/k88DQSZfAEx/nwCC7PPh7uQEEGTyBcD09wkgyD4f7k5OAEEmXwBnTr+HZyNID1FijKcRQBAP/e12e2vl2cqHUsUe+c5K7OddqfG4fmMHNEN9BPGifL1ev9ulN1Y+FizP1nfsR21Kjun/2AHNUB9BVqJsknyyy1qMdpji89nm/HmKmUZOEkE2gNmCkSTaTTZqDHP5m831/TCz+TWRbP8iyA5KWzh/2+2RJfluc/zH5shngwCCbIC5u6wFNKIkmhM7x12g174iyBqVu2v2f1gtpBFft97b3L7dTZWvKwQQZAWKf8kWkn7Aqvi3ej1HjsDIIUggKJNEu8gImS0yVoExV7XXgugqZZXAIoleuVbvd3CRjFVkkBAkEphJ0mtmi4xVZKxVHUFEIb70ltnSrkfGKj7OFwRJgGa7iBacfpPomNBD9Sb8KE9EjiCJ4EwSZbVUEnuo1gw5DqCuKsiBcTbZ1CTRLtJyZouM1cGVgyAHAS6StPiqRcbqYGzVHEFE4WAxSVrLbJGxOhhT1xxBHInjx1YyW9rNyFgdj+fPHhDkJ4bj/9guooWp3yQ6Hu8wvQd+lKeze9VyFEFeTeyMCyaJsloqZzxez0QOUchYECQjTHVlkmgXOSOzRcZKAchcECQzUHW3SFLzVYuMlcAXKAhSAKq6NElqZbbIWAl4oYIghcAu3ZbObGmXImO1wC5xQJCHVNMr2C6iBazfJDqmd7Tdkh/l22yy3EGQLBi3OzFJlNVS2a6Udgc50rhFtUKQKFxplU0S7SI5M1tkrNJCEd0KQaKRpTVYJMnxqkXGKi0ESa0QJAlbWiOT5Ghmi4xVGvrkVgiSjC654UtmK64L7T5krOKYHa6NIIcRxnVgu4gWun6T6BjTmB/lMbQy1UWQTCBjujFJlNVSCW2GHKGkMtdDkMxAQ7szSbSLhGS2yFiFQi1QD0EKQA3tcpFk71WLjFUozEL1EKQQ2NBuTZKtzNahjFXo86m3TwBB9vnUuutntrSrkLGqRX/nOQiyA6fWLdtFJIR+k+iox/KjXBQaKAjSQBA0BJNEWS0V5BCQRgqCNBIIDcMk+WRFkuiU0gABBGkgCJ0NYarhIshU4WaysQQQJJYY9acigCBThZvJxhJAkFhi1J+KAIJMFe7WJ9ve+BCkvZgwooYIIEhDwWAo7RFAkPZiwogaIoAgDQWDobRHAEHaiwkjKkEgsU8ESQRHszkIIMgccWaWiQQQJBEczeYggCBzxJlZJhJAkERwNJuDQIggc5BglhBYIZBNkNvt9kSBQStrYGWtJ13KJsjy9K92pFwuMDiXgS3DPJ/cguQZFb1AoBECCNJIIBhGmwROFqRNKIwKAo4AgjgSHCGwQgBBVqBwCQKOAII4EhwhsEIAQVagcAkCjsC4grgZcoTAAQIIcgAeTccngCDjx5gZHiCAIAfg0XR8ArkF0V9KolwuMDiXQTZzswlyvV71ByenKMy1/VjnMiSbILkGRD8QaIkAgrQUDcbSHAEEaS4kDKglAgjSUjQYS3MEEKStkDCaxgggSGMBYThtEUCQtuLBaBojgCCNBYThtEUAQdqKB6NpjACCNBaQcsOh5xQCCJJCjTbTEECQaULNRFMIIEgKNdpMQwBBpgk1E00hgCAp1GjzJ4GBzxBk4OAyteMEEOQ4Q3oYmACCNBTc2+32bOVDQ0OafigI0sgSMDGebCj/Wvlo39/akU8DBBCkgSAsQuiP7rjR/Ldcc+fTHs+eOIKcHIFFBO0c/ki+Lvf865xXJIAgFWFvPEpy6PXKv63XrA9I4mOpe44gdXn/8TRb/FtyuHrP9uWdFT4nEUCQk8CbHFr8Ko9GoB/tZLYeUSp0H0EKgd3r1uTQK5V2j71q9/ckiV657q/x/RiBoNYIEoQpXyWTQwv9PmMV2jmZrVBSGeshSEaYj7pa5IjZOfwuyWz5RAqfI0hhwF73kkOvV97l4FPtPmS2gnEdr4ggxxkG9WC7x1E53HP0w57MlqNR+IgghQGre5NDi1pFpzmKfrST2cpB8kEfaYI86JTbLwRMDr1Safd4uZjnmyTRK1ee3uhllQCCrGLJc9Hk0AJOyViFDoDMViipxHoIkgjuUbNFjhI7h/9oMls+kYznCJIRpteV5NDrlXc5+6l2KTJb2bH+6hBBfnHI+q/tHrXkcONWAoDMlqOR8dicIBnndkpXJocWq0rt5+tHO5mtzNQRJCNQk0OvVNo9MvYa1ZUk0StXVCMqbxNAkG02UXdMDi3Mkhmr0PGQ2QolFVAPQQIgPaqyyHHmzuEPkcyWTyTxHEESwXnNJIder7zLp51qNyOzlQH/TIJkwPW6C9s9WpPDDVKJAjJbjkbiEUESwamZyaFFqKLTFot+tJPZOhAZBEmEZ3LolUq7R2IP1ZpJEr1yVXvgSA9CkIRomhxacC1krEJHT2YrlJRXD0E8II9OFzl62Dn8qZDZ8okEnCNIACSviuTQ69Xd5S6+atcjsxUZKgSJAGa7R69yuFkqoUBmy9EIOCJIACRVMTm0uFR02nPRj3YyW4ERRJAAUCaHXqm0ewTU7qKKJNErVxeDPXOQCPKAvsmhhdRTxurBjH7fJrP1G8X2FwTZZnNZ5Dh359gZX4ZbZLYeQESQfUCSQ69X+7X6vavdkczWTvwQZAOO7R6jy+FmrsQDmS1HwzsiiAdEpyaHFo2KTmco+tFOZmsl0giyAsUuvbHysWD5bH3HftSm5JhixzNFfQRZCfP1ev10LVjskV+sxH6+5B6T31/sgGaojyAzRJk5JhNAkGR0NJyBAILMEGXmmEwAQZLR0XAGAggyQ5Trz3GYJyLIMKFkIiUIIEgJqvQ5DAEEGSaUTKQEAQQpQZU+hyGAIMOEcpaJ1J0ngtTlzdM6I4AgnQWM4dYlgCB1efO0zgggSGcBY7h1CSBIXd48rWUCK2NDkBUoXIKAI4AgjgRHCKwQQJAVKFyCgCOAII4ERwisEECQFShcgoAjkEsQ1x9HCAxFAEGGCieTyU0AQXITpb+hCCDIUOFkMrkJIEhuovQ3FIEOBBmKN5PpjACCdBYwhluXAILU5c3TOiOAIJ0FjOHWJYAgdXnztM4IzC1IZ8FiuPUJIEh95jyxIwII0lGwGGp9AghSnzlP7IgAgnQULIZanwCCFGJOt2MQ+AEAAP//U3PGlQAAAAZJREFUAwA3ILMm/jaVEAAAAABJRU5ErkJggg==", es = new m.TextureLoader(), ts = es.load($n);
|
|
1039
|
+
class ns extends Ae {
|
|
1040
1040
|
static name = "RenderManager";
|
|
1041
1041
|
container = new m.Group();
|
|
1042
1042
|
lines = [];
|
|
1043
|
-
pointVirtualGrid = new
|
|
1043
|
+
pointVirtualGrid = new Fe();
|
|
1044
1044
|
quadtree = new ze(new Ye());
|
|
1045
|
-
|
|
1046
|
-
verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: $n, color: 58111, transparent: !0 }));
|
|
1045
|
+
verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: ts, color: 58111, transparent: !0 }));
|
|
1047
1046
|
onAddFromParent() {
|
|
1048
1047
|
const e = this.dxfLineModel;
|
|
1049
1048
|
this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new m.LineBasicMaterial({
|
|
@@ -1063,7 +1062,7 @@ class eo extends Se {
|
|
|
1063
1062
|
return;
|
|
1064
1063
|
} else
|
|
1065
1064
|
this.updatedMode = "dxf";
|
|
1066
|
-
this.pointVirtualGrid = new
|
|
1065
|
+
this.pointVirtualGrid = new Fe();
|
|
1067
1066
|
const e = this.dxf.box.clone().expansion(Math.max(this.dxf.box.width, this.dxf.box.height) * 2);
|
|
1068
1067
|
(e.width === 0 || e.height === 0) && e.set(-200, -200, 200, 200), this.quadtree = new ze(e), this.lines.length = 0, this.dxf.lineSegments.forEach((t) => {
|
|
1069
1068
|
t.userData.isDoor || this.addLine(t.clone());
|
|
@@ -1084,10 +1083,7 @@ class eo extends Se {
|
|
|
1084
1083
|
line: e,
|
|
1085
1084
|
userData: void 0
|
|
1086
1085
|
};
|
|
1087
|
-
e.userData.quadtreeNode = t, this.quadtree.insert(t)
|
|
1088
|
-
type: "addLine",
|
|
1089
|
-
data: [e]
|
|
1090
|
-
});
|
|
1086
|
+
e.userData.quadtreeNode = t, this.quadtree.insert(t);
|
|
1091
1087
|
}
|
|
1092
1088
|
/**
|
|
1093
1089
|
* 批量添加
|
|
@@ -1097,16 +1093,12 @@ class eo extends Se {
|
|
|
1097
1093
|
for (let t = 0; t < e.length; t++) {
|
|
1098
1094
|
const n = e[t];
|
|
1099
1095
|
this.lines.push(n), this.pointVirtualGrid.insert(n.start, n), this.pointVirtualGrid.insert(n.end, n);
|
|
1100
|
-
const
|
|
1096
|
+
const s = {
|
|
1101
1097
|
line: n,
|
|
1102
1098
|
userData: void 0
|
|
1103
1099
|
};
|
|
1104
|
-
n.userData.quadtreeNode =
|
|
1100
|
+
n.userData.quadtreeNode = s, this.quadtree.insert(s);
|
|
1105
1101
|
}
|
|
1106
|
-
this.actionHistory.add({
|
|
1107
|
-
type: "addLine",
|
|
1108
|
-
data: [...e]
|
|
1109
|
-
});
|
|
1110
1102
|
}
|
|
1111
1103
|
/** 移除线段
|
|
1112
1104
|
* @param line
|
|
@@ -1114,25 +1106,35 @@ class eo extends Se {
|
|
|
1114
1106
|
removeLine(e) {
|
|
1115
1107
|
e.userData.quadtreeNode && this.quadtree.remove(e.userData.quadtreeNode), this.pointVirtualGrid.remove(e.start), this.pointVirtualGrid.remove(e.end);
|
|
1116
1108
|
const t = this.lines.indexOf(e);
|
|
1117
|
-
this.lines.splice(t, 1), this.draw()
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1109
|
+
this.lines.splice(t, 1), this.draw();
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* 删除
|
|
1113
|
+
* @param lines
|
|
1114
|
+
*/
|
|
1115
|
+
removeLines(e) {
|
|
1116
|
+
for (let t = 0; t < e.length; t++) {
|
|
1117
|
+
const n = e[t];
|
|
1118
|
+
n.userData.quadtreeNode && this.quadtree.remove(n.userData.quadtreeNode), this.pointVirtualGrid.remove(n.start), this.pointVirtualGrid.remove(n.end);
|
|
1119
|
+
const s = this.lines.indexOf(n);
|
|
1120
|
+
this.lines.splice(s, 1);
|
|
1121
|
+
}
|
|
1122
|
+
this.draw();
|
|
1121
1123
|
}
|
|
1122
1124
|
/**
|
|
1123
1125
|
* 绘制
|
|
1124
1126
|
*/
|
|
1125
1127
|
draw(e = !0) {
|
|
1126
1128
|
this.container.clear();
|
|
1127
|
-
const t = [], n = [],
|
|
1128
|
-
this.lines.forEach((
|
|
1129
|
-
if (
|
|
1130
|
-
|
|
1131
|
-
}),
|
|
1132
|
-
const l =
|
|
1133
|
-
|
|
1134
|
-
}),
|
|
1135
|
-
const a =
|
|
1129
|
+
const t = [], n = [], s = [];
|
|
1130
|
+
this.lines.forEach((o) => {
|
|
1131
|
+
if (o.points.forEach((a) => {
|
|
1132
|
+
o.userData.isDoor ? n.push(a.x, a.y, 0) : t.push(a.x, a.y, 0);
|
|
1133
|
+
}), o.userData.isWindow && o.userData.drawWindow && o.userData.drawWindow.forEach(({ width: a, p: r }) => {
|
|
1134
|
+
const l = _.from(r), i = o.direction(), c = l.clone().add(i.clone().multiplyScalar(a * 0.5)), h = l.clone().add(i.clone().multiplyScalar(-a * 0.5));
|
|
1135
|
+
s.push(c.x, c.y, 1e-3), s.push(h.x, h.y, 1e-3);
|
|
1136
|
+
}), o.userData.isVerticalReferenceLine) {
|
|
1137
|
+
const a = o.center;
|
|
1136
1138
|
this.verticalReferenceLineFlag.position.set(a.x, a.y, 0), this.container.add(this.verticalReferenceLineFlag);
|
|
1137
1139
|
}
|
|
1138
1140
|
}), t.length && this.renderer.createLineSegments({
|
|
@@ -1143,9 +1145,9 @@ class eo extends Se {
|
|
|
1143
1145
|
position: n
|
|
1144
1146
|
}, n.length / 3, {
|
|
1145
1147
|
color: 16776960
|
|
1146
|
-
}, this.container),
|
|
1147
|
-
position:
|
|
1148
|
-
},
|
|
1148
|
+
}, this.container), s.length && this.renderer.createLineSegments({
|
|
1149
|
+
position: s
|
|
1150
|
+
}, s.length / 3, {
|
|
1149
1151
|
color: 16711935
|
|
1150
1152
|
}, this.container), e && this.synchronizeDxf();
|
|
1151
1153
|
}
|
|
@@ -1154,17 +1156,17 @@ class eo extends Se {
|
|
|
1154
1156
|
* @returns
|
|
1155
1157
|
*/
|
|
1156
1158
|
adsorption(e = 0.04, t = this.pointVirtualGrid, n = this.quadtree) {
|
|
1157
|
-
const
|
|
1159
|
+
const s = this.parent?.findComponentByName("Editor"), o = _.from(s.pointerPosition), a = t.queryCircle(o, e).sort((l, i) => l.point.distance(o) - i.point.distance(o));
|
|
1158
1160
|
if (a.length) return {
|
|
1159
1161
|
point: new m.Vector3(a[0].point.x, a[0].point.y, 0),
|
|
1160
1162
|
find: !0,
|
|
1161
1163
|
mode: "point",
|
|
1162
1164
|
line: a[0].userData
|
|
1163
1165
|
};
|
|
1164
|
-
let r = n.queryCircle(
|
|
1166
|
+
let r = n.queryCircle(o, e);
|
|
1165
1167
|
if (r.length) {
|
|
1166
|
-
let l = r.map((i) => i.line.projectPoint(
|
|
1167
|
-
return l.sort((i, c) => i && c ? i.distance(
|
|
1168
|
+
let l = r.map((i) => i.line.projectPoint(o));
|
|
1169
|
+
return l.sort((i, c) => i && c ? i.distance(o) - c.distance(o) : 0), r = r.filter((i, c) => !!l[c]), l = l.filter((i, c) => !!l[c]), {
|
|
1168
1170
|
point: new m.Vector3(l[0].x, l[0].y, 0),
|
|
1169
1171
|
find: !0,
|
|
1170
1172
|
mode: "line",
|
|
@@ -1172,7 +1174,7 @@ class eo extends Se {
|
|
|
1172
1174
|
};
|
|
1173
1175
|
}
|
|
1174
1176
|
return {
|
|
1175
|
-
point: new m.Vector3(
|
|
1177
|
+
point: new m.Vector3(s.pointerPosition.x, s.pointerPosition.y, 0),
|
|
1176
1178
|
find: !1
|
|
1177
1179
|
};
|
|
1178
1180
|
}
|
|
@@ -1181,8 +1183,8 @@ class eo extends Se {
|
|
|
1181
1183
|
*/
|
|
1182
1184
|
createGeometry(e, t) {
|
|
1183
1185
|
const n = new m.BufferGeometry();
|
|
1184
|
-
return Object.keys(e).forEach((
|
|
1185
|
-
n.setAttribute("position", new m.BufferAttribute(new Float32Array(e[
|
|
1186
|
+
return Object.keys(e).forEach((s) => {
|
|
1187
|
+
n.setAttribute("position", new m.BufferAttribute(new Float32Array(e[s]), e[s].length / t));
|
|
1186
1188
|
}), n;
|
|
1187
1189
|
}
|
|
1188
1190
|
/**
|
|
@@ -1190,20 +1192,21 @@ class eo extends Se {
|
|
|
1190
1192
|
*/
|
|
1191
1193
|
toJson() {
|
|
1192
1194
|
return this.lines.map((e) => {
|
|
1193
|
-
const t = e.userData, n = t.drawWindow,
|
|
1195
|
+
const t = e.userData, n = t.drawWindow, s = this.quadtree.queryLineSegment(e).filter((o) => o.line !== e && !o.userData?.isDoor).map((o) => ({ index: this.lines.indexOf(o.line) }));
|
|
1194
1196
|
return {
|
|
1195
1197
|
start: e.start.toJson(this.dxf.originalZAverage),
|
|
1196
1198
|
end: e.end.toJson(this.dxf.originalZAverage),
|
|
1197
|
-
insetionArr:
|
|
1199
|
+
insetionArr: s,
|
|
1198
1200
|
isDoor: t.isDoor,
|
|
1199
1201
|
doorDirectConnection: t.isDoor,
|
|
1200
1202
|
length: e.length(),
|
|
1201
1203
|
isWindow: t.isWindow,
|
|
1202
1204
|
isVerticalReferenceLine: t.isVerticalReferenceLine,
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1205
|
+
wallWidth: e.userData.wallWidth,
|
|
1206
|
+
drawWindow: n && n.map((o) => ({
|
|
1207
|
+
p: { x: o.p.x, y: o.p.y, z: o.p.z },
|
|
1208
|
+
width: o.width,
|
|
1209
|
+
full: o.full
|
|
1207
1210
|
}))
|
|
1208
1211
|
};
|
|
1209
1212
|
});
|
|
@@ -1244,7 +1247,7 @@ class eo extends Se {
|
|
|
1244
1247
|
return this.parent?.findComponentByName("DxfLineModel");
|
|
1245
1248
|
}
|
|
1246
1249
|
}
|
|
1247
|
-
class
|
|
1250
|
+
class ss extends R {
|
|
1248
1251
|
static name = "DrawDoorLine";
|
|
1249
1252
|
container = new m.Group();
|
|
1250
1253
|
interruptKeys = ["escape"];
|
|
@@ -1252,18 +1255,18 @@ class to extends O {
|
|
|
1252
1255
|
commandName = "draw-door-line";
|
|
1253
1256
|
onAddFromParent(e) {
|
|
1254
1257
|
super.onAddFromParent(e);
|
|
1255
|
-
const t = e.findComponentByName("Editor"), n = t.eventInput,
|
|
1258
|
+
const t = e.findComponentByName("Editor"), n = t.eventInput, s = t.commandManager;
|
|
1256
1259
|
this.editor.container.add(this.container);
|
|
1257
|
-
const
|
|
1258
|
-
n.addKeyCombination(this.commandName, this.shortcutKeys),
|
|
1259
|
-
n.isKeyCombination(this.commandName) && await
|
|
1260
|
+
const o = 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));
|
|
1261
|
+
n.addKeyCombination(this.commandName, this.shortcutKeys), o.addEventListener("finally", this.createFinally()), o.addEventListener("completed", (a) => this.completed(a.data)), n.addCancelDefaultBehavior(() => n.isOnlyKeyDowns(this.shortcutKeys)), n.addEventListener("codeChange", async () => {
|
|
1262
|
+
n.isKeyCombination(this.commandName) && await s.start(this.commandName);
|
|
1260
1263
|
});
|
|
1261
1264
|
}
|
|
1262
1265
|
/** 选择点
|
|
1263
1266
|
* @param next
|
|
1264
1267
|
*/
|
|
1265
1268
|
selectPoint(e) {
|
|
1266
|
-
let t = this.parent?.findComponentByName("Editor"), n = null,
|
|
1269
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, s = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 65280 })), o = new ye([], 16711935), a = new ye([
|
|
1267
1270
|
new m.Vector3(-1e4, 0, 0),
|
|
1268
1271
|
new m.Vector3(1e4, 0, 0),
|
|
1269
1272
|
new m.Vector3(0, -1e4, 0),
|
|
@@ -1274,13 +1277,13 @@ class to extends O {
|
|
|
1274
1277
|
dashSize: 0.1,
|
|
1275
1278
|
gapSize: 0.1,
|
|
1276
1279
|
linewidth: 0.1
|
|
1277
|
-
}), this.container.add(
|
|
1280
|
+
}), this.container.add(o);
|
|
1278
1281
|
let r = null;
|
|
1279
1282
|
this.addEventRecord(
|
|
1280
1283
|
"clear",
|
|
1281
1284
|
t.addEventListener("pointerPositionChange", () => {
|
|
1282
1285
|
const { point: l, find: i } = t.renderManager.adsorption();
|
|
1283
|
-
n &&
|
|
1286
|
+
n && o.setPoint(n, l), this.dispatchEvent({ type: "pointerMove", point: l }), i ? (s.position.set(l.x, l.y, 0), this.container.add(s), this.domElement.style.cursor = "none", r = l.clone()) : (r = null, s.removeFromParent(), this.domElement.style.cursor = "no-drop");
|
|
1284
1287
|
}),
|
|
1285
1288
|
t.eventInput.addEventListener("codeChange", async () => {
|
|
1286
1289
|
if (t.eventInput.isKeyDown("mouse_0") && r) {
|
|
@@ -1292,7 +1295,7 @@ class to extends O {
|
|
|
1292
1295
|
}
|
|
1293
1296
|
}),
|
|
1294
1297
|
function() {
|
|
1295
|
-
|
|
1298
|
+
o.removeFromParent(), s.removeFromParent(), a.removeFromParent();
|
|
1296
1299
|
}
|
|
1297
1300
|
);
|
|
1298
1301
|
}
|
|
@@ -1303,21 +1306,21 @@ class to extends O {
|
|
|
1303
1306
|
*/
|
|
1304
1307
|
end(e, t) {
|
|
1305
1308
|
const n = [];
|
|
1306
|
-
for (let
|
|
1307
|
-
const
|
|
1309
|
+
for (let s = 0; s < t.length; s += 2) {
|
|
1310
|
+
const o = _.from(t[s]), a = _.from(t[s + 1]), r = this.renderManager.quadtree.queryCircle(o, 1e-3)[0].line, l = this.renderManager.quadtree.queryCircle(a, 1e-3)[0].line;
|
|
1308
1311
|
let i = null;
|
|
1309
1312
|
r === l && (i = {
|
|
1310
1313
|
oldLine: r,
|
|
1311
1314
|
newLine1: new B(
|
|
1312
1315
|
r.start,
|
|
1313
|
-
r.start.distance(
|
|
1316
|
+
r.start.distance(o) < r.start.distance(a) ? o.clone() : a.clone()
|
|
1314
1317
|
),
|
|
1315
1318
|
newLine2: new B(
|
|
1316
1319
|
r.end,
|
|
1317
|
-
r.end.distance(
|
|
1320
|
+
r.end.distance(o) < r.end.distance(a) ? o.clone() : a.clone()
|
|
1318
1321
|
)
|
|
1319
1322
|
});
|
|
1320
|
-
const c = new B(
|
|
1323
|
+
const c = new B(o, a);
|
|
1321
1324
|
c.userData.isDoor = !0, c.userData.doorDirectConnection = !0, n.push({
|
|
1322
1325
|
line: c,
|
|
1323
1326
|
option: i
|
|
@@ -1348,7 +1351,7 @@ class to extends O {
|
|
|
1348
1351
|
return this.completed(e), e;
|
|
1349
1352
|
}
|
|
1350
1353
|
}
|
|
1351
|
-
class
|
|
1354
|
+
class os extends R {
|
|
1352
1355
|
static name = "DrawWindow";
|
|
1353
1356
|
container = new m.Group();
|
|
1354
1357
|
interruptKeys = ["escape"];
|
|
@@ -1363,24 +1366,24 @@ class no extends O {
|
|
|
1363
1366
|
* @param next
|
|
1364
1367
|
*/
|
|
1365
1368
|
selectPointStart(e) {
|
|
1366
|
-
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })),
|
|
1369
|
+
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
|
|
1367
1370
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1368
|
-
const { point:
|
|
1369
|
-
this.dispatchEvent({ type: "pointerMove", point:
|
|
1371
|
+
const { point: o, line: a, find: r } = this.editor.renderManager.adsorption();
|
|
1372
|
+
this.dispatchEvent({ type: "pointerMove", point: o }), r ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
1370
1373
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1371
|
-
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line:
|
|
1374
|
+
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: s }));
|
|
1372
1375
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
1373
1376
|
}
|
|
1374
1377
|
/** 选择结束点
|
|
1375
1378
|
* @param next
|
|
1376
1379
|
*/
|
|
1377
1380
|
selectPointEnd(e, { point: t, line: n }) {
|
|
1378
|
-
let
|
|
1379
|
-
this.addEventRecord("clear").add(() =>
|
|
1381
|
+
let s = null, o = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
1382
|
+
this.addEventRecord("clear").add(() => o.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1380
1383
|
const { point: a, find: r, line: l } = this.editor.renderManager.adsorption();
|
|
1381
|
-
this.dispatchEvent({ type: "pointerMove", point: a }), r && l === n ? (this.domElement.style.cursor = "none",
|
|
1384
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), r && l === n ? (this.domElement.style.cursor = "none", o.position.copy(a), s = a.clone(), this.container.add(o)) : (this.domElement.style.cursor = "no-drop", s = null, o.removeFromParent());
|
|
1382
1385
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1383
|
-
this.eventInput.isKeyDown("mouse_0") &&
|
|
1386
|
+
this.eventInput.isKeyDown("mouse_0") && s && e({ line: n, start: t, end: s });
|
|
1384
1387
|
}));
|
|
1385
1388
|
}
|
|
1386
1389
|
/**
|
|
@@ -1388,13 +1391,13 @@ class no extends O {
|
|
|
1388
1391
|
* @param next
|
|
1389
1392
|
* @param points
|
|
1390
1393
|
*/
|
|
1391
|
-
end(e, { start: t, end: n, line:
|
|
1392
|
-
const
|
|
1394
|
+
end(e, { start: t, end: n, line: s }) {
|
|
1395
|
+
const o = new B(_.from(t), _.from(n)), a = o.center, r = o.length(), l = {
|
|
1393
1396
|
p: new m.Vector3(a.x, a.y, 0),
|
|
1394
1397
|
width: r,
|
|
1395
|
-
full: Math.abs(r -
|
|
1398
|
+
full: Math.abs(r - s.length()) < 0.01
|
|
1396
1399
|
};
|
|
1397
|
-
e({ line:
|
|
1400
|
+
e({ line: s, doorDataItem: l });
|
|
1398
1401
|
}
|
|
1399
1402
|
/** 执行完成
|
|
1400
1403
|
*/
|
|
@@ -1407,8 +1410,8 @@ class no extends O {
|
|
|
1407
1410
|
rollback(e) {
|
|
1408
1411
|
const { doorDataItem: t, line: n } = e;
|
|
1409
1412
|
if (n.userData.drawWindow) {
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1413
|
+
const s = n.userData.drawWindow.indexOf(t);
|
|
1414
|
+
s !== -1 && (n.userData.drawWindow.splice(s, 1), n.userData.drawWindow.length === 0 && (delete n.userData.drawWindow, delete n.userData.isWindow), this.renderManager.draw());
|
|
1412
1415
|
}
|
|
1413
1416
|
return e;
|
|
1414
1417
|
}
|
|
@@ -1420,20 +1423,22 @@ class no extends O {
|
|
|
1420
1423
|
return this.completed(e), e;
|
|
1421
1424
|
}
|
|
1422
1425
|
}
|
|
1423
|
-
class
|
|
1426
|
+
class X extends R {
|
|
1424
1427
|
static name = "VerticalCorrection";
|
|
1425
1428
|
container = new m.Group();
|
|
1426
1429
|
shortcutKeys = ["control", "c"];
|
|
1427
1430
|
shortcutKeys2 = ["control", "shift", "c"];
|
|
1431
|
+
shortcutKeys3 = ["shift", "c"];
|
|
1428
1432
|
static commandName = "verticalCorrection";
|
|
1429
1433
|
recursion = !1;
|
|
1434
|
+
axisAlignment = !1;
|
|
1430
1435
|
onAddFromParent(e) {
|
|
1431
1436
|
super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
|
|
1432
|
-
const t = this.commandManager.addCommandFlow(
|
|
1437
|
+
const t = this.commandManager.addCommandFlow(X.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalCorrection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1433
1438
|
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), t.addEventListener("started", () => {
|
|
1434
1439
|
!this.eventInput.isOnlyKeyDowns(this.shortcutKeys) && !this.eventInput.isOnlyKeyDowns(this.shortcutKeys2) && (this.recursion = !1);
|
|
1435
1440
|
}), this.eventInput.addEventListener("codeChange", async () => {
|
|
1436
|
-
this.eventInput.isOnlyKeyDowns(this.shortcutKeys) ? (this.recursion = !1, this.commandManager.start(
|
|
1441
|
+
this.eventInput.isOnlyKeyDowns(this.shortcutKeys) ? (this.recursion = !1, this.axisAlignment = !1, this.commandManager.start(X.commandName, [...this.default.selectLines])) : this.eventInput.isOnlyKeyDowns(this.shortcutKeys2) ? (this.recursion = !0, this.axisAlignment = !1, this.commandManager.start(X.commandName, [...this.default.selectLines])) : this.eventInput.isOnlyKeyDowns(this.shortcutKeys3) && (this.axisAlignment = !0, this.commandManager.start(X.commandName, [...this.default.selectLines]));
|
|
1437
1442
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys) || this.eventInput.isOnlyKeyDowns(this.shortcutKeys2));
|
|
1438
1443
|
}
|
|
1439
1444
|
/**
|
|
@@ -1443,18 +1448,6 @@ class de extends O {
|
|
|
1443
1448
|
Array.isArray(t) ? t.length !== 1 ? (L({ message: "请选择一条线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1444
1449
|
}
|
|
1445
1450
|
/**
|
|
1446
|
-
* 线段是否为结尾线段
|
|
1447
|
-
* @param line
|
|
1448
|
-
*/
|
|
1449
|
-
lineIsPathEnd(e) {
|
|
1450
|
-
for (let t = 0; t < e.points.length; t++) {
|
|
1451
|
-
const n = e.points[t];
|
|
1452
|
-
if (this.renderManager.pointVirtualGrid.queryPoint(n).filter((s) => !s.point.equal(n)).length === 0) return !0;
|
|
1453
|
-
}
|
|
1454
|
-
return !1;
|
|
1455
|
-
}
|
|
1456
|
-
/**
|
|
1457
|
-
*
|
|
1458
1451
|
* @param line0
|
|
1459
1452
|
* @param line1
|
|
1460
1453
|
*/
|
|
@@ -1462,7 +1455,6 @@ class de extends O {
|
|
|
1462
1455
|
return !!(e.start.equal(t.start) || e.start.equal(t.end) || e.end.equal(t.start) || e.end.equal(t.end));
|
|
1463
1456
|
}
|
|
1464
1457
|
/**
|
|
1465
|
-
*
|
|
1466
1458
|
* @param line
|
|
1467
1459
|
* @param newStartPoint
|
|
1468
1460
|
* @param newEndPoint
|
|
@@ -1471,41 +1463,41 @@ class de extends O {
|
|
|
1471
1463
|
* @param id
|
|
1472
1464
|
* @returns
|
|
1473
1465
|
*/
|
|
1474
|
-
setLinePoint(e, t, n,
|
|
1466
|
+
setLinePoint(e, t, n, s = "all", o = [], a = Dt()) {
|
|
1475
1467
|
if (e.userData.setLinePointUUid === a) return [];
|
|
1476
1468
|
e.userData.setLinePointUUid = a;
|
|
1477
1469
|
let r = [], l = [];
|
|
1478
|
-
(
|
|
1470
|
+
(s === "start" || s === "all") && (r = this.renderManager.pointVirtualGrid.queryPoint(e.start).filter((y) => y.userData !== e)), (s === "end" || s === "all") && (l = this.renderManager.pointVirtualGrid.queryPoint(e.end).filter((y) => y.userData !== e));
|
|
1479
1471
|
const i = e.clone();
|
|
1480
1472
|
let c = "";
|
|
1481
|
-
t && (e.start.equal(t) || (c = "start"),
|
|
1473
|
+
t && (e.start.equal(t) || (c = "start"), o.push({
|
|
1482
1474
|
point: e.start,
|
|
1483
1475
|
oldPoint: e.start.clone(),
|
|
1484
1476
|
newPoint: t,
|
|
1485
1477
|
line: e
|
|
1486
|
-
}), e.start.copy(t)), n && (e.end.equal(n) || (c = c === "start" ? "all" : "end"),
|
|
1478
|
+
}), e.start.copy(t)), n && (e.end.equal(n) || (c = c === "start" ? "all" : "end"), o.push({
|
|
1487
1479
|
point: e.end,
|
|
1488
1480
|
oldPoint: e.end.clone(),
|
|
1489
1481
|
newPoint: n,
|
|
1490
1482
|
line: e
|
|
1491
1483
|
}), e.end.copy(n));
|
|
1492
|
-
const h = (
|
|
1493
|
-
|
|
1494
|
-
const { point: E, userData:
|
|
1495
|
-
if (
|
|
1484
|
+
const h = (y, u, v) => {
|
|
1485
|
+
y.forEach((g) => {
|
|
1486
|
+
const { point: E, userData: x } = g, D = x.start === E ? "start" : "end";
|
|
1487
|
+
if (x.directionEqual(i))
|
|
1496
1488
|
if (D === "start") {
|
|
1497
|
-
const
|
|
1498
|
-
if (
|
|
1489
|
+
const z = e.projectPoint(x.end, !1);
|
|
1490
|
+
if (z) return this.setLinePoint(x, u, z, "end", o, a);
|
|
1499
1491
|
} else {
|
|
1500
|
-
const
|
|
1501
|
-
if (
|
|
1492
|
+
const z = e.projectPoint(x.start, !1);
|
|
1493
|
+
if (z) return this.setLinePoint(x, z, u, "start", o, a);
|
|
1502
1494
|
}
|
|
1503
|
-
(c === "all" ||
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1495
|
+
(c === "all" || v === c) && this.setLinePoint(
|
|
1496
|
+
x,
|
|
1497
|
+
x.start === E ? u : x.start,
|
|
1498
|
+
x.end === E ? u : x.end,
|
|
1499
|
+
x.start === E ? "end" : "start",
|
|
1500
|
+
o,
|
|
1509
1501
|
a
|
|
1510
1502
|
);
|
|
1511
1503
|
});
|
|
@@ -1524,43 +1516,43 @@ class de extends O {
|
|
|
1524
1516
|
*/
|
|
1525
1517
|
correction(e, t = [], n = /* @__PURE__ */ new Set()) {
|
|
1526
1518
|
n.add(e);
|
|
1527
|
-
const
|
|
1528
|
-
const [h,
|
|
1529
|
-
return c.sameEndpoint(e) ? h.push(c) :
|
|
1519
|
+
const s = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: i }) => !(i === e || i.userData.isDoor || n.has(i))).map((i) => i.line), o = e.direction(), [a, r] = s.reduce((i, c) => {
|
|
1520
|
+
const [h, y] = i;
|
|
1521
|
+
return c.sameEndpoint(e) ? h.push(c) : y.push(c), i;
|
|
1530
1522
|
}, [[], []]);
|
|
1531
1523
|
a.forEach((i) => {
|
|
1532
|
-
const c = i.direction(), h =
|
|
1524
|
+
const c = i.direction(), h = o.angleBetween(c, "angle");
|
|
1533
1525
|
if (Math.abs(90 - h) > 45) return !1;
|
|
1534
|
-
const u = e.sameEndpointAsStart(i) ? e.start : e.end,
|
|
1535
|
-
|
|
1536
|
-
|
|
1526
|
+
const u = e.sameEndpointAsStart(i) ? e.start : e.end, v = i.sameEndpointAsStart(e) ? i.end : i.start, g = new B(
|
|
1527
|
+
v.clone().add(o.clone().multiplyScalar(1)),
|
|
1528
|
+
v.clone().add(o.clone().multiplyScalar(-1))
|
|
1537
1529
|
), E = g.projectPoint(u, !1);
|
|
1538
1530
|
if (E) {
|
|
1539
|
-
const
|
|
1531
|
+
const x = [];
|
|
1540
1532
|
this.setLinePoint(
|
|
1541
1533
|
i,
|
|
1542
|
-
i.start ===
|
|
1543
|
-
i.end ===
|
|
1544
|
-
i.start ===
|
|
1545
|
-
|
|
1546
|
-
), t.push(
|
|
1534
|
+
i.start === v ? E : i.start,
|
|
1535
|
+
i.end === v ? E : i.end,
|
|
1536
|
+
i.start === v ? "start" : "end",
|
|
1537
|
+
x
|
|
1538
|
+
), t.push(x);
|
|
1547
1539
|
}
|
|
1548
1540
|
return n.add(i), !1;
|
|
1549
|
-
}),
|
|
1541
|
+
}), o.copy(e.direction());
|
|
1550
1542
|
const l = (i, c, h) => {
|
|
1551
|
-
const
|
|
1552
|
-
if (
|
|
1543
|
+
const y = e.projectPoint(c);
|
|
1544
|
+
if (y) i.copy(y);
|
|
1553
1545
|
else {
|
|
1554
1546
|
const u = new B(
|
|
1555
|
-
c.clone().add(
|
|
1556
|
-
c.clone().add(
|
|
1557
|
-
),
|
|
1558
|
-
if (
|
|
1547
|
+
c.clone().add(o.clone().multiplyScalar(1)),
|
|
1548
|
+
c.clone().add(o.clone().multiplyScalar(-1))
|
|
1549
|
+
), v = u.projectPoint(i, !1);
|
|
1550
|
+
if (v) {
|
|
1559
1551
|
const g = [];
|
|
1560
1552
|
this.setLinePoint(
|
|
1561
1553
|
h,
|
|
1562
|
-
h.start === c ?
|
|
1563
|
-
h.end === c ?
|
|
1554
|
+
h.start === c ? v : h.start,
|
|
1555
|
+
h.end === c ? v : h.end,
|
|
1564
1556
|
h.start === c ? "start" : "end",
|
|
1565
1557
|
g
|
|
1566
1558
|
), t.push(g);
|
|
@@ -1576,53 +1568,65 @@ class de extends O {
|
|
|
1576
1568
|
const c = e.getIntersection(i);
|
|
1577
1569
|
if (c) {
|
|
1578
1570
|
const h = new B(
|
|
1579
|
-
i.start.clone().add(
|
|
1580
|
-
i.start.clone().add(
|
|
1581
|
-
),
|
|
1582
|
-
if (
|
|
1571
|
+
i.start.clone().add(o.clone().multiplyScalar(1)),
|
|
1572
|
+
i.start.clone().add(o.clone().multiplyScalar(-1))
|
|
1573
|
+
), y = h.projectPoint(c, !1);
|
|
1574
|
+
if (y) {
|
|
1583
1575
|
const g = [];
|
|
1584
|
-
this.setLinePoint(i,
|
|
1576
|
+
this.setLinePoint(i, y, i.end, "start", g), t.push(g);
|
|
1585
1577
|
}
|
|
1586
1578
|
const u = new B(
|
|
1587
|
-
i.end.clone().add(
|
|
1588
|
-
i.end.clone().add(
|
|
1589
|
-
),
|
|
1590
|
-
if (
|
|
1579
|
+
i.end.clone().add(o.clone().multiplyScalar(1)),
|
|
1580
|
+
i.end.clone().add(o.clone().multiplyScalar(-1))
|
|
1581
|
+
), v = u.projectPoint(c, !1);
|
|
1582
|
+
if (v) {
|
|
1591
1583
|
const g = [];
|
|
1592
|
-
this.setLinePoint(i, i.start,
|
|
1584
|
+
this.setLinePoint(i, i.start, v, "end", g), t.push(g);
|
|
1593
1585
|
}
|
|
1594
1586
|
}
|
|
1595
1587
|
}
|
|
1596
|
-
}), this.recursion &&
|
|
1588
|
+
}), this.recursion && s.forEach((i) => this.correction(i, t, n)), t;
|
|
1589
|
+
}
|
|
1590
|
+
/** 轴对齐垂直修正
|
|
1591
|
+
* @param targettLine
|
|
1592
|
+
* @returns
|
|
1593
|
+
*/
|
|
1594
|
+
axisAlignmentCorrection(e) {
|
|
1595
|
+
const t = [...this.renderManager.lines];
|
|
1596
|
+
return { newLines: B.axisAlignmentCorrection(t, e), oldLines: t };
|
|
1597
1597
|
}
|
|
1598
1598
|
/** 开始
|
|
1599
1599
|
* @param next
|
|
1600
1600
|
*/
|
|
1601
1601
|
verticalCorrection(e, t) {
|
|
1602
|
-
|
|
1602
|
+
const n = performance.now();
|
|
1603
|
+
e(this.axisAlignment ? this.axisAlignmentCorrection(t[0]) : this.correction(t[0])), console.log("处理时间:", performance.now() - n, "ms");
|
|
1603
1604
|
}
|
|
1604
1605
|
/** 执行完成
|
|
1605
1606
|
* @param data
|
|
1606
1607
|
*/
|
|
1607
1608
|
completed(e) {
|
|
1608
|
-
e.forEach((t) => {
|
|
1609
|
+
Array.isArray(e) ? e.forEach((t) => {
|
|
1609
1610
|
t.forEach((n) => {
|
|
1610
|
-
const { line:
|
|
1611
|
-
a.copy(
|
|
1611
|
+
const { line: s, newPoint: o, point: a } = n;
|
|
1612
|
+
a.copy(o), this.renderManager.removeLine(s), this.renderManager.addLine(s);
|
|
1612
1613
|
});
|
|
1613
|
-
}), this.renderManager.draw();
|
|
1614
|
+
}) : (this.renderManager.removeLines(e.oldLines), this.renderManager.addLines(e.newLines)), this.renderManager.draw();
|
|
1614
1615
|
}
|
|
1615
1616
|
/** 回滚操作
|
|
1616
1617
|
* @param data
|
|
1617
1618
|
*/
|
|
1618
1619
|
rollback(e) {
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1620
|
+
if (Array.isArray(e))
|
|
1621
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
1622
|
+
const n = e[t];
|
|
1623
|
+
for (let s = n.length - 1; s >= 0; s--) {
|
|
1624
|
+
const o = n[s], { line: a, oldPoint: r, point: l } = o;
|
|
1625
|
+
l.copy(r), this.renderManager.removeLine(a), this.renderManager.addLine(a);
|
|
1626
|
+
}
|
|
1624
1627
|
}
|
|
1625
|
-
|
|
1628
|
+
else
|
|
1629
|
+
this.renderManager.removeLines(e.newLines), this.renderManager.addLines(e.oldLines);
|
|
1626
1630
|
return this.renderManager.draw(), e;
|
|
1627
1631
|
}
|
|
1628
1632
|
/** 撤回回滚
|
|
@@ -1633,15 +1637,15 @@ class de extends O {
|
|
|
1633
1637
|
return this.completed(e), e;
|
|
1634
1638
|
}
|
|
1635
1639
|
}
|
|
1636
|
-
class
|
|
1640
|
+
class $ extends R {
|
|
1637
1641
|
static name = "MergeLine";
|
|
1638
1642
|
shortcutKeys = ["control", "g"];
|
|
1639
1643
|
static commandName = "merge-line";
|
|
1640
1644
|
onAddFromParent(e) {
|
|
1641
1645
|
super.onAddFromParent(e);
|
|
1642
|
-
const t = e.findComponentByType(_e), n = this.commandManager.addCommandFlow(
|
|
1643
|
-
n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (
|
|
1644
|
-
t?.selectLines.length === 2 && this.eventInput.isKeyCombination(
|
|
1646
|
+
const t = e.findComponentByType(_e), n = this.commandManager.addCommandFlow($.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.mergeLine.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1647
|
+
n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (s) => this.completed(s.data)), this.eventInput.addKeyCombination($.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1648
|
+
t?.selectLines.length === 2 && this.eventInput.isKeyCombination($.commandName) && await this.commandManager.start($.commandName, [...this.default.selectLines]);
|
|
1645
1649
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1646
1650
|
}
|
|
1647
1651
|
/**
|
|
@@ -1655,14 +1659,14 @@ class Y extends O {
|
|
|
1655
1659
|
* @todo 合并所有
|
|
1656
1660
|
*/
|
|
1657
1661
|
mergeLine(e, t) {
|
|
1658
|
-
const n = t[0],
|
|
1659
|
-
for (let
|
|
1660
|
-
const a = n.points[
|
|
1661
|
-
for (let r = 0; r <
|
|
1662
|
-
const l =
|
|
1662
|
+
const n = t[0], s = t[1];
|
|
1663
|
+
for (let o = 0; o < n.points.length; o++) {
|
|
1664
|
+
const a = n.points[o];
|
|
1665
|
+
for (let r = 0; r < s.points.length; r++) {
|
|
1666
|
+
const l = s.points[r];
|
|
1663
1667
|
if (a.equal(l)) {
|
|
1664
|
-
const i = n.points[(
|
|
1665
|
-
return e({ line1: n, line2:
|
|
1668
|
+
const i = n.points[(o + 1) % 2], c = s.points[(r + 1) % 2], h = new B(i, c);
|
|
1669
|
+
return e({ line1: n, line2: s, newLine: h }), L({ message: "已合并", type: "success" });
|
|
1666
1670
|
}
|
|
1667
1671
|
}
|
|
1668
1672
|
}
|
|
@@ -1688,13 +1692,13 @@ class Y extends O {
|
|
|
1688
1692
|
return this.completed(e), e;
|
|
1689
1693
|
}
|
|
1690
1694
|
}
|
|
1691
|
-
class
|
|
1695
|
+
class ee extends R {
|
|
1692
1696
|
static name = "DeleteSelectLine";
|
|
1693
1697
|
shortcutKeys = ["Delete"];
|
|
1694
1698
|
static commandName = "deleteSelectLine";
|
|
1695
1699
|
onAddFromParent(e) {
|
|
1696
|
-
super.onAddFromParent(e), this.commandManager.addCommandFlow(
|
|
1697
|
-
this.eventInput.isKeyCombination(
|
|
1700
|
+
super.onAddFromParent(e), this.commandManager.addCommandFlow(ee.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.delete.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this)).addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ee.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1701
|
+
this.eventInput.isKeyCombination(ee.commandName) && await this.commandManager.start(ee.commandName, [...this.default.selectLines]);
|
|
1698
1702
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1699
1703
|
}
|
|
1700
1704
|
/**
|
|
@@ -1723,15 +1727,15 @@ class X extends O {
|
|
|
1723
1727
|
return e.forEach((t) => this.renderManager.removeLine(t)), e;
|
|
1724
1728
|
}
|
|
1725
1729
|
}
|
|
1726
|
-
class
|
|
1730
|
+
class te extends R {
|
|
1727
1731
|
static name = "ConnectionLine";
|
|
1728
1732
|
shortcutKeys = ["Shift", "L"];
|
|
1729
1733
|
static commandName = "connectionLine";
|
|
1730
1734
|
onAddFromParent(e) {
|
|
1731
1735
|
super.onAddFromParent(e);
|
|
1732
|
-
const t = this.commandManager.addCommandFlow(
|
|
1733
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1734
|
-
this.eventInput.isKeyCombination(
|
|
1736
|
+
const t = this.commandManager.addCommandFlow(te.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1737
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(te.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1738
|
+
this.eventInput.isKeyCombination(te.commandName) && await this.commandManager.start(te.commandName, [...this.default.selectLines]);
|
|
1735
1739
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1736
1740
|
}
|
|
1737
1741
|
/**
|
|
@@ -1744,14 +1748,14 @@ class $ extends O {
|
|
|
1744
1748
|
* @param next
|
|
1745
1749
|
*/
|
|
1746
1750
|
connection(e, t) {
|
|
1747
|
-
let n,
|
|
1751
|
+
let n, s, o = 1 / 0;
|
|
1748
1752
|
for (let a = 0; a < 2; a++)
|
|
1749
1753
|
for (let r = 0; r < 2; r++) {
|
|
1750
1754
|
const l = t[0].points[a], i = t[1].points[r], c = l.distance(i);
|
|
1751
|
-
c <
|
|
1755
|
+
c < o && (n = l, s = i, o = c);
|
|
1752
1756
|
}
|
|
1753
|
-
if (n &&
|
|
1754
|
-
const a = new B(n.clone(),
|
|
1757
|
+
if (n && s) {
|
|
1758
|
+
const a = new B(n.clone(), s.clone());
|
|
1755
1759
|
e(a), L({ message: "连接成功", type: "success" });
|
|
1756
1760
|
} else this.cancel();
|
|
1757
1761
|
}
|
|
@@ -1776,15 +1780,15 @@ class $ extends O {
|
|
|
1776
1780
|
return this.completed(e), e;
|
|
1777
1781
|
}
|
|
1778
1782
|
}
|
|
1779
|
-
class
|
|
1783
|
+
class ne extends R {
|
|
1780
1784
|
static name = "IntersectionConnectionLine";
|
|
1781
1785
|
shortcutKeys = ["control", "Shift", "L"];
|
|
1782
1786
|
static commandName = "intersectionConnectionLine";
|
|
1783
1787
|
onAddFromParent(e) {
|
|
1784
1788
|
super.onAddFromParent(e);
|
|
1785
|
-
const t = this.commandManager.addCommandFlow(
|
|
1786
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1787
|
-
this.eventInput.isKeyCombination(
|
|
1789
|
+
const t = this.commandManager.addCommandFlow(ne.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1790
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ne.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1791
|
+
this.eventInput.isKeyCombination(ne.commandName) && await this.commandManager.start(ne.commandName, [...this.default.selectLines]);
|
|
1788
1792
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1789
1793
|
}
|
|
1790
1794
|
/**
|
|
@@ -1797,26 +1801,26 @@ class ee extends O {
|
|
|
1797
1801
|
* @param next
|
|
1798
1802
|
*/
|
|
1799
1803
|
connection(e, t) {
|
|
1800
|
-
const n = t[0],
|
|
1801
|
-
if (!
|
|
1802
|
-
const a = n.points.map((c) => c.clone()), r =
|
|
1803
|
-
n.start.distance(
|
|
1804
|
-
const l = n.points.map((c) => c.clone()), i =
|
|
1805
|
-
e({ line1: n, line2:
|
|
1804
|
+
const n = t[0], s = t[1], o = t[0].getIntersection(t[1]);
|
|
1805
|
+
if (!o) return;
|
|
1806
|
+
const a = n.points.map((c) => c.clone()), r = s.points.map((c) => c.clone());
|
|
1807
|
+
n.start.distance(o) < n.end.distance(o) ? n.start.copy(o) : n.end.copy(o), s.start.distance(o) < s.end.distance(o) ? s.start.copy(o) : s.end.copy(o);
|
|
1808
|
+
const l = n.points.map((c) => c.clone()), i = s.points.map((c) => c.clone());
|
|
1809
|
+
e({ line1: n, line2: s, oldLine1: a, oldLine2: r, newLine1: l, newLine2: i }), L({ message: "连接成功", type: "success" });
|
|
1806
1810
|
}
|
|
1807
1811
|
/** 执行完成
|
|
1808
1812
|
* @param next
|
|
1809
1813
|
* @param selectLines
|
|
1810
1814
|
*/
|
|
1811
|
-
completed({ line1: e, line2: t, newLine1: n, newLine2:
|
|
1812
|
-
this.renderManager.removeLine(e), this.renderManager.removeLine(t), e.set(...n), t.set(...
|
|
1815
|
+
completed({ line1: e, line2: t, newLine1: n, newLine2: s }) {
|
|
1816
|
+
this.renderManager.removeLine(e), this.renderManager.removeLine(t), e.set(...n), t.set(...s), this.renderManager.addLines([e, t]), this.renderManager.draw();
|
|
1813
1817
|
}
|
|
1814
1818
|
/** 回滚操作
|
|
1815
1819
|
* @param data
|
|
1816
1820
|
*/
|
|
1817
1821
|
rollback(e) {
|
|
1818
|
-
const { line1: t, line2: n, oldLine1:
|
|
1819
|
-
return this.renderManager.removeLine(t), this.renderManager.removeLine(n), t.set(...
|
|
1822
|
+
const { line1: t, line2: n, oldLine1: s, oldLine2: o } = e;
|
|
1823
|
+
return this.renderManager.removeLine(t), this.renderManager.removeLine(n), t.set(...s), n.set(...o), this.renderManager.addLines([t, n]), this.renderManager.draw(), e;
|
|
1820
1824
|
}
|
|
1821
1825
|
/** 撤回回滚
|
|
1822
1826
|
* @param lines
|
|
@@ -1826,15 +1830,15 @@ class ee extends O {
|
|
|
1826
1830
|
return this.completed(e), e;
|
|
1827
1831
|
}
|
|
1828
1832
|
}
|
|
1829
|
-
class
|
|
1833
|
+
class se extends R {
|
|
1830
1834
|
static name = "DeleteSelectWindow";
|
|
1831
1835
|
shortcutKeys = ["Q", "Delete"];
|
|
1832
1836
|
static commandName = "deleteSelectWindow";
|
|
1833
1837
|
onAddFromParent(e) {
|
|
1834
1838
|
super.onAddFromParent(e);
|
|
1835
|
-
const t = this.commandManager.addCommandFlow(
|
|
1836
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1837
|
-
this.eventInput.isKeyCombination(
|
|
1839
|
+
const t = this.commandManager.addCommandFlow(se.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1840
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(se.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1841
|
+
this.eventInput.isKeyCombination(se.commandName) && await this.commandManager.start(se.commandName, [...this.default.selectLines]);
|
|
1838
1842
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1839
1843
|
}
|
|
1840
1844
|
/**
|
|
@@ -1847,13 +1851,13 @@ class te extends O {
|
|
|
1847
1851
|
* @param next
|
|
1848
1852
|
*/
|
|
1849
1853
|
end(e, t) {
|
|
1850
|
-
let n = !1,
|
|
1851
|
-
t.forEach((
|
|
1852
|
-
|
|
1853
|
-
line:
|
|
1854
|
-
drawDoorData:
|
|
1854
|
+
let n = !1, s = [];
|
|
1855
|
+
t.forEach((o) => {
|
|
1856
|
+
o.userData.isWindow && (s.push({
|
|
1857
|
+
line: o,
|
|
1858
|
+
drawDoorData: o.userData.drawDoorData
|
|
1855
1859
|
}), n = !0);
|
|
1856
|
-
}), n && L({ message: "删除窗户成功", type: "success" }), e(
|
|
1860
|
+
}), n && L({ message: "删除窗户成功", type: "success" }), e(s);
|
|
1857
1861
|
}
|
|
1858
1862
|
/**
|
|
1859
1863
|
* 完成
|
|
@@ -1883,16 +1887,16 @@ class te extends O {
|
|
|
1883
1887
|
return this.completed(e), e;
|
|
1884
1888
|
}
|
|
1885
1889
|
}
|
|
1886
|
-
class
|
|
1890
|
+
class oe extends R {
|
|
1887
1891
|
static name = "SelectAll";
|
|
1888
1892
|
container = new m.Group();
|
|
1889
1893
|
shortcutKeys = ["control", "a"];
|
|
1890
1894
|
static commandName = "selectAll";
|
|
1891
1895
|
onAddFromParent(e) {
|
|
1892
1896
|
super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
|
|
1893
|
-
const t = this.commandManager.addCommandFlow(
|
|
1894
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1895
|
-
this.eventInput.isKeyCombination(
|
|
1897
|
+
const t = this.commandManager.addCommandFlow(oe.commandName).add(this.createInterrupt()).add(this.selectAll.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1898
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(oe.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1899
|
+
this.eventInput.isKeyCombination(oe.commandName) && await this.commandManager.start(oe.commandName);
|
|
1896
1900
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1897
1901
|
}
|
|
1898
1902
|
/** 开始
|
|
@@ -1920,15 +1924,15 @@ class ne extends O {
|
|
|
1920
1924
|
return this.completed(e), e;
|
|
1921
1925
|
}
|
|
1922
1926
|
}
|
|
1923
|
-
class
|
|
1927
|
+
class ae extends R {
|
|
1924
1928
|
static name = "ViewAngle";
|
|
1925
1929
|
shortcutKeys = ["r"];
|
|
1926
1930
|
static commandName = "viewAngle";
|
|
1927
1931
|
onAddFromParent(e) {
|
|
1928
1932
|
super.onAddFromParent(e);
|
|
1929
|
-
const t = this.commandManager.addCommandFlow(
|
|
1930
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(
|
|
1931
|
-
this.eventInput.isKeyCombination(
|
|
1933
|
+
const t = this.commandManager.addCommandFlow(ae.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
|
|
1934
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ae.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1935
|
+
this.eventInput.isKeyCombination(ae.commandName) && await this.commandManager.start(ae.commandName, [...this.default.selectLines]);
|
|
1932
1936
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1933
1937
|
}
|
|
1934
1938
|
/**
|
|
@@ -1943,36 +1947,36 @@ class oe extends O {
|
|
|
1943
1947
|
* @param selectLines
|
|
1944
1948
|
*/
|
|
1945
1949
|
viewAngle(e, t) {
|
|
1946
|
-
const [n,
|
|
1950
|
+
const [n, s] = t, o = Math.min(0.5, n.length(), s.length());
|
|
1947
1951
|
let a, r, l, i = 0, c = 0;
|
|
1948
|
-
n.sameEndpointAsStart(
|
|
1949
|
-
function h(
|
|
1950
|
-
const
|
|
1951
|
-
let
|
|
1952
|
-
return
|
|
1952
|
+
n.sameEndpointAsStart(s) ? (a = n.start, r = n.end) : (a = n.end, r = n.start), s.sameEndpointAsStart(n) ? l = s.end : l = s.start;
|
|
1953
|
+
function h(A, M) {
|
|
1954
|
+
const b = M.x - A.x, K = M.y - A.y;
|
|
1955
|
+
let W = Math.atan2(K, b) * (180 / Math.PI);
|
|
1956
|
+
return W < 0 && (W += 360), W;
|
|
1953
1957
|
}
|
|
1954
|
-
const
|
|
1955
|
-
function
|
|
1956
|
-
for (let
|
|
1957
|
-
const
|
|
1958
|
-
E.push(
|
|
1958
|
+
const y = h(a, r), u = h(a, l), v = Math.min(y, u), g = Math.max(y, u), E = [];
|
|
1959
|
+
function x(A, M) {
|
|
1960
|
+
for (let b = A; b <= M; b++) {
|
|
1961
|
+
const K = Math.cos(b * Math.PI / 180) * o + a.x, W = Math.sin(b * Math.PI / 180) * o + a.y, he = Math.cos((b + 1) * Math.PI / 180) * o + a.x, Ce = Math.sin((b + 1) * Math.PI / 180) * o + a.y;
|
|
1962
|
+
E.push(K, W, 0, he, Ce, 0);
|
|
1959
1963
|
}
|
|
1960
1964
|
}
|
|
1961
|
-
g -
|
|
1965
|
+
g - v > 180 ? (x(0, v), x(g, 360), i = 360 - (g - v), c = (g + i / 2) % 360) : (x(v, g), i = g - v, c = v + i / 2);
|
|
1962
1966
|
const D = new m.LineSegments();
|
|
1963
1967
|
D.geometry = this.renderManager.createGeometry({
|
|
1964
1968
|
position: E
|
|
1965
1969
|
}, E.length / 3), D.material = new m.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(D);
|
|
1966
|
-
const
|
|
1970
|
+
const z = Math.cos(c * Math.PI / 180) * o + a.x, me = Math.sin(c * Math.PI / 180) * o + a.y, Z = this.renderer.createText(Number(i.toFixed(2)), new m.Vector3(z, me, 0), {
|
|
1967
1971
|
textShadow: "0px 0px 2px #000"
|
|
1968
1972
|
}, this.renderManager.container);
|
|
1969
|
-
let
|
|
1970
|
-
this.addEventRecord("clear").add(() => D.removeFromParent()).add(() =>
|
|
1971
|
-
this.eventInput.isOnlyKeyDown("enter") ? e() : this.eventInput.isOnlyKeyDown("mouse_0") && (
|
|
1973
|
+
let G = 0;
|
|
1974
|
+
this.addEventRecord("clear").add(() => D.removeFromParent()).add(() => Z.removeFromParent()).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1975
|
+
this.eventInput.isOnlyKeyDown("enter") ? e() : this.eventInput.isOnlyKeyDown("mouse_0") && (G++, G === 1 ? setTimeout(() => G = 0, 500) : G === 2 && (e(), G = 0));
|
|
1972
1976
|
}));
|
|
1973
1977
|
}
|
|
1974
1978
|
}
|
|
1975
|
-
class rt extends
|
|
1979
|
+
class rt extends R {
|
|
1976
1980
|
static name = "ClippingLine";
|
|
1977
1981
|
container = new m.Group();
|
|
1978
1982
|
shortcutKeys = ["control", "x"];
|
|
@@ -1987,24 +1991,24 @@ class rt extends O {
|
|
|
1987
1991
|
* @param next
|
|
1988
1992
|
*/
|
|
1989
1993
|
selectPointStart(e) {
|
|
1990
|
-
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })),
|
|
1994
|
+
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
|
|
1991
1995
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1992
|
-
const { point:
|
|
1993
|
-
this.dispatchEvent({ type: "pointerMove", point:
|
|
1996
|
+
const { point: o, line: a, find: r } = this.editor.renderManager.adsorption();
|
|
1997
|
+
this.dispatchEvent({ type: "pointerMove", point: o }), r ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
1994
1998
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1995
|
-
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line:
|
|
1999
|
+
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: s }));
|
|
1996
2000
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
1997
2001
|
}
|
|
1998
2002
|
/** 选择结束点
|
|
1999
2003
|
* @param next
|
|
2000
2004
|
*/
|
|
2001
2005
|
selectPointEnd(e, { point: t, line: n }) {
|
|
2002
|
-
let
|
|
2003
|
-
this.addEventRecord("clear").add(() =>
|
|
2006
|
+
let s = null, o = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
2007
|
+
this.addEventRecord("clear").add(() => o.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2004
2008
|
const { point: a, find: r, line: l } = this.editor.renderManager.adsorption();
|
|
2005
|
-
this.dispatchEvent({ type: "pointerMove", point: a }), r && l === n ? (this.domElement.style.cursor = "none",
|
|
2009
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), r && l === n ? (this.domElement.style.cursor = "none", o.position.copy(a), s = a.clone(), this.container.add(o)) : (this.domElement.style.cursor = "no-drop", s = null, o.removeFromParent());
|
|
2006
2010
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2007
|
-
this.eventInput.isKeyDown("mouse_0") &&
|
|
2011
|
+
this.eventInput.isKeyDown("mouse_0") && s && e({ line: n, start: t, end: s });
|
|
2008
2012
|
}));
|
|
2009
2013
|
}
|
|
2010
2014
|
/**
|
|
@@ -2012,17 +2016,17 @@ class rt extends O {
|
|
|
2012
2016
|
* @param next
|
|
2013
2017
|
* @param points
|
|
2014
2018
|
*/
|
|
2015
|
-
end(e, { start: t, end: n, line:
|
|
2016
|
-
const
|
|
2019
|
+
end(e, { start: t, end: n, line: s }) {
|
|
2020
|
+
const o = _.from(t), a = _.from(n);
|
|
2017
2021
|
e({
|
|
2018
|
-
oldLine:
|
|
2022
|
+
oldLine: s,
|
|
2019
2023
|
newLine1: new B(
|
|
2020
|
-
|
|
2021
|
-
|
|
2024
|
+
s.start,
|
|
2025
|
+
s.start.distance(o) < s.start.distance(a) ? o.clone() : a.clone()
|
|
2022
2026
|
),
|
|
2023
2027
|
newLine2: new B(
|
|
2024
|
-
|
|
2025
|
-
|
|
2028
|
+
s.end,
|
|
2029
|
+
s.end.distance(o) < s.end.distance(a) ? o.clone() : a.clone()
|
|
2026
2030
|
)
|
|
2027
2031
|
});
|
|
2028
2032
|
}
|
|
@@ -2045,15 +2049,15 @@ class rt extends O {
|
|
|
2045
2049
|
return this.completed(e), e;
|
|
2046
2050
|
}
|
|
2047
2051
|
}
|
|
2048
|
-
class
|
|
2052
|
+
class ie extends R {
|
|
2049
2053
|
static name = "VerticalReferenceLine";
|
|
2050
2054
|
shortcutKeys = ["v"];
|
|
2051
2055
|
static commandName = "VerticalReferenceLine";
|
|
2052
2056
|
onAddFromParent(e) {
|
|
2053
2057
|
super.onAddFromParent(e);
|
|
2054
|
-
const t = this.commandManager.addCommandFlow(
|
|
2055
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(
|
|
2056
|
-
this.eventInput.isKeyCombination(
|
|
2058
|
+
const t = this.commandManager.addCommandFlow(ie.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalReferenceLine.bind(this));
|
|
2059
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ie.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
2060
|
+
this.eventInput.isKeyCombination(ie.commandName) && await this.commandManager.start(ie.commandName, [...this.default.selectLines]);
|
|
2057
2061
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
2058
2062
|
}
|
|
2059
2063
|
/**
|
|
@@ -2073,67 +2077,67 @@ class se extends O {
|
|
|
2073
2077
|
}), t[0].userData.isVerticalReferenceLine = !0, e(), this.renderManager.draw();
|
|
2074
2078
|
}
|
|
2075
2079
|
}
|
|
2076
|
-
const
|
|
2080
|
+
const as = {
|
|
2077
2081
|
key: 0,
|
|
2078
2082
|
class: "mt-[5px] text-[#ccc] text-[11px] absolute left-[10px] bottom-[10px] rounded-[8px] min-w-[150px] bg-black/15 p-[10px]"
|
|
2079
|
-
},
|
|
2083
|
+
}, is = { class: "text-start max-w-[150px]" }, rs = { class: "inline-block ml-[10px] text-[var(--color-primary)]" }, ds = {
|
|
2080
2084
|
key: 0,
|
|
2081
2085
|
class: "p-[5px] max-w-[200px]"
|
|
2082
|
-
},
|
|
2086
|
+
}, ls = { class: "text-[14px] flex flex-col" }, cs = ["onClick"], ms = { class: "flex flex-row items-center" }, hs = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, us = ["src"], ps = { class: "text-wrap" }, gs = {
|
|
2083
2087
|
key: 1,
|
|
2084
2088
|
class: "text-[#999]"
|
|
2085
|
-
},
|
|
2089
|
+
}, vs = {
|
|
2086
2090
|
style: { "--el-color-primary": "var(--primary-color)" },
|
|
2087
2091
|
class: "flex flex-row items-center justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
2088
|
-
},
|
|
2092
|
+
}, fs = {
|
|
2089
2093
|
key: 0,
|
|
2090
2094
|
class: "flex flex-row items-center flex-wrap justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
2091
|
-
},
|
|
2095
|
+
}, ys = { class: "flex-wrap border-t-1 border-t-[#eee] mt-[5px] pt-[5px] flex items-center gap-[10px]" }, ws = ["onClick", "title"], bs = ["src"], xs = /* @__PURE__ */ ce({
|
|
2092
2096
|
__name: "EditorTool",
|
|
2093
2097
|
props: {
|
|
2094
2098
|
dxfSystem: {},
|
|
2095
2099
|
permission: {}
|
|
2096
2100
|
},
|
|
2097
2101
|
setup(d) {
|
|
2098
|
-
function e(
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2102
|
+
function e(C, p, w = h.value.getBoundingClientRect(), U = y.value.getBoundingClientRect()) {
|
|
2103
|
+
const ue = w.width - U.width, pe = 0, Me = w.height - U.height;
|
|
2104
|
+
C = Math.max(0, Math.min(C, ue)), p = Math.max(pe, Math.min(p, Me)), A.value = { left: C, top: p };
|
|
2101
2105
|
}
|
|
2102
|
-
function t(
|
|
2103
|
-
|
|
2106
|
+
function t(C) {
|
|
2107
|
+
v.value === C.command || v.value !== "default" || x.commandManager.start(C.command);
|
|
2104
2108
|
}
|
|
2105
|
-
function n(
|
|
2106
|
-
if (
|
|
2107
|
-
localStorage.setItem("lines", JSON.stringify(
|
|
2109
|
+
function n(C) {
|
|
2110
|
+
if (C) {
|
|
2111
|
+
localStorage.setItem("lines", JSON.stringify(C));
|
|
2108
2112
|
try {
|
|
2109
|
-
g.Dxf.set(
|
|
2110
|
-
} catch (
|
|
2111
|
-
console.log(
|
|
2113
|
+
g.Dxf.set(C), g.Dxf.lineOffset();
|
|
2114
|
+
} catch (p) {
|
|
2115
|
+
console.log(p);
|
|
2112
2116
|
}
|
|
2113
2117
|
}
|
|
2114
2118
|
}
|
|
2115
|
-
async function
|
|
2116
|
-
const
|
|
2117
|
-
Array.isArray(
|
|
2119
|
+
async function s() {
|
|
2120
|
+
const C = await Pt.json();
|
|
2121
|
+
Array.isArray(C) && (localStorage.removeItem("orbitControls"), n(C));
|
|
2118
2122
|
}
|
|
2119
|
-
function
|
|
2123
|
+
function o({ offsetX: C, offsetY: p }) {
|
|
2120
2124
|
E.mouseMoveEventProxylock = !0;
|
|
2121
|
-
const
|
|
2125
|
+
const w = document.body.style.cursor;
|
|
2122
2126
|
document.body.style.cursor = "move";
|
|
2123
|
-
const U = (
|
|
2124
|
-
const
|
|
2127
|
+
const U = (ue) => {
|
|
2128
|
+
const pe = h.value.getBoundingClientRect(), Me = y.value.getBoundingClientRect();
|
|
2125
2129
|
e(
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2130
|
+
ue.pageX - pe.left - C,
|
|
2131
|
+
ue.pageY - pe.top - p,
|
|
2132
|
+
pe,
|
|
2129
2133
|
Me
|
|
2130
|
-
),
|
|
2134
|
+
), ue.stopPropagation(), document.body.style.cursor = "move";
|
|
2131
2135
|
}, Ee = () => {
|
|
2132
|
-
document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup", Ee), document.body.style.cursor =
|
|
2136
|
+
document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup", Ee), document.body.style.cursor = w, E.mouseMoveEventProxylock = !1;
|
|
2133
2137
|
};
|
|
2134
2138
|
document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Ee);
|
|
2135
2139
|
}
|
|
2136
|
-
const a = d, r = S(!0), l = S(!0), i = S(!0), c = S(!1), h = S(),
|
|
2140
|
+
const a = d, r = S(!0), l = S(!0), i = S(!0), c = S(!1), h = S(), y = S(), u = S(!0), v = S(""), g = Ot(a.dxfSystem), E = g.findComponentByType(It), x = g.findComponentByType(dt), D = g.findComponentByType(_e), z = g.findComponentByType(At), me = g.findComponentByType(St), Z = S(0), G = S(0), A = S({ left: 10, top: 100 }), M = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": Cn, "./assets/images/connection.svg": Mn, "./assets/images/cutLine.svg": kn, "./assets/images/deleteSelectLine.svg": Pn, "./assets/images/deleteSelectWindow.svg": An, "./assets/images/door.svg": _n, "./assets/images/intersectionConnection.svg": Nn, "./assets/images/line.svg": Rn, "./assets/images/mergeLine.svg": Fn, "./assets/images/revokeRollback.svg": Tn, "./assets/images/rollback.svg": Vn, "./assets/images/selectAll.svg": Qn, "./assets/images/selectPoint.svg": Wn, "./assets/images/verticalCorrection.svg": Un, "./assets/images/verticalLine.svg": Zn, "./assets/images/window.svg": Xn }), b = S(!1), K = S(0), W = S(!1), he = new ResizeObserver(() => e(A.value.left, A.value.top)), Ce = [
|
|
2137
2141
|
{ name: "开启绘制线段命令", shortcut: "Ctrl + L" },
|
|
2138
2142
|
{ name: "开启绘制门线命令", shortcut: "Ctrl + M" },
|
|
2139
2143
|
{ name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
|
|
@@ -2153,7 +2157,7 @@ const oo = {
|
|
|
2153
2157
|
{ name: "取消命令", shortcut: "Esc" },
|
|
2154
2158
|
{ name: "回滚操作", shortcut: "Ctrl + Z" },
|
|
2155
2159
|
{ name: "取消回滚操作", shortcut: "Ctrl + Y" }
|
|
2156
|
-
],
|
|
2160
|
+
], lt = [
|
|
2157
2161
|
{
|
|
2158
2162
|
command: "default",
|
|
2159
2163
|
name: "默认",
|
|
@@ -2195,197 +2199,201 @@ const oo = {
|
|
|
2195
2199
|
src: M["./assets/images/cutLine.svg"].default,
|
|
2196
2200
|
shortcut: "Ctrl + X"
|
|
2197
2201
|
}
|
|
2198
|
-
],
|
|
2202
|
+
], ct = [
|
|
2199
2203
|
{
|
|
2200
2204
|
command: "",
|
|
2201
2205
|
name: "操作回滚",
|
|
2202
2206
|
src: M["./assets/images/rollback.svg"].default,
|
|
2203
|
-
show: P(() =>
|
|
2207
|
+
show: P(() => Z.value !== 0),
|
|
2204
2208
|
shortcut: "Ctrl + Z",
|
|
2205
2209
|
action() {
|
|
2206
|
-
|
|
2210
|
+
x.commandManager.rollback();
|
|
2207
2211
|
}
|
|
2208
2212
|
},
|
|
2209
2213
|
{
|
|
2210
2214
|
command: "",
|
|
2211
2215
|
name: "撤销操作回滚",
|
|
2212
2216
|
src: M["./assets/images/revokeRollback.svg"].default,
|
|
2213
|
-
show: P(() =>
|
|
2217
|
+
show: P(() => G.value !== 0),
|
|
2214
2218
|
shortcut: "Ctrl + Y",
|
|
2215
2219
|
class: "rotateY-[180deg]",
|
|
2216
2220
|
action() {
|
|
2217
|
-
|
|
2221
|
+
x.commandManager.revokeRollback();
|
|
2218
2222
|
}
|
|
2219
2223
|
},
|
|
2220
2224
|
{
|
|
2221
|
-
command:
|
|
2225
|
+
command: $.commandName,
|
|
2222
2226
|
name: "合并",
|
|
2223
2227
|
src: M["./assets/images/mergeLine.svg"].default,
|
|
2224
|
-
show: P(() =>
|
|
2228
|
+
show: P(() => K.value === 2),
|
|
2225
2229
|
shortcut: "Ctrl + G"
|
|
2226
2230
|
},
|
|
2227
2231
|
{
|
|
2228
|
-
command:
|
|
2232
|
+
command: te.commandName,
|
|
2229
2233
|
name: "两点连接",
|
|
2230
|
-
show: P(() =>
|
|
2234
|
+
show: P(() => K.value === 2),
|
|
2231
2235
|
src: M["./assets/images/connection.svg"].default,
|
|
2232
2236
|
shortcut: "Shift + L"
|
|
2233
2237
|
},
|
|
2234
2238
|
{
|
|
2235
|
-
command:
|
|
2239
|
+
command: ne.commandName,
|
|
2236
2240
|
name: "延长线交点连接",
|
|
2237
|
-
show: P(() =>
|
|
2241
|
+
show: P(() => K.value === 2),
|
|
2238
2242
|
src: M["./assets/images/intersectionConnection.svg"].default,
|
|
2239
2243
|
shortcut: "Ctrl + Shift + L"
|
|
2240
2244
|
},
|
|
2241
2245
|
{
|
|
2242
|
-
command:
|
|
2246
|
+
command: X.commandName,
|
|
2243
2247
|
name: "线段垂直纠正",
|
|
2244
|
-
show: P(() =>
|
|
2248
|
+
show: P(() => K.value === 1),
|
|
2245
2249
|
src: M["./assets/images/verticalCorrection.svg"].default,
|
|
2246
|
-
shortcut:
|
|
2250
|
+
shortcut: `
|
|
2251
|
+
Ctrl + C 垂直纠正
|
|
2252
|
+
Ctrl + Shift + C 全部垂直纠正
|
|
2253
|
+
Shift + C 轴对齐垂直纠正
|
|
2254
|
+
`
|
|
2247
2255
|
},
|
|
2248
2256
|
{
|
|
2249
|
-
command:
|
|
2257
|
+
command: ie.commandName,
|
|
2250
2258
|
name: "y轴垂直基准线",
|
|
2251
2259
|
show: P(
|
|
2252
|
-
() =>
|
|
2260
|
+
() => K.value === 1 && !D.selectLines[0].userData.isDoor
|
|
2253
2261
|
),
|
|
2254
2262
|
src: M["./assets/images/verticalLine.svg"].default,
|
|
2255
2263
|
shortcut: "V"
|
|
2256
2264
|
},
|
|
2257
2265
|
{
|
|
2258
|
-
command:
|
|
2266
|
+
command: ae.commandName,
|
|
2259
2267
|
name: "角度显示",
|
|
2260
|
-
show: P(() =>
|
|
2268
|
+
show: P(() => K.value === 2 && D.selectLines[0].sameEndpoint(D.selectLines[1])),
|
|
2261
2269
|
src: M["./assets/images/angle.svg"].default,
|
|
2262
2270
|
shortcut: "r"
|
|
2263
2271
|
},
|
|
2264
2272
|
{
|
|
2265
|
-
command:
|
|
2273
|
+
command: oe.commandName,
|
|
2266
2274
|
name: "全选",
|
|
2267
|
-
show: P(() =>
|
|
2275
|
+
show: P(() => K.value !== x.renderManager.lines.length),
|
|
2268
2276
|
src: M["./assets/images/selectAll.svg"].default,
|
|
2269
2277
|
shortcut: "Ctrl + A"
|
|
2270
2278
|
},
|
|
2271
2279
|
{
|
|
2272
|
-
command:
|
|
2280
|
+
command: se.commandName,
|
|
2273
2281
|
name: "清除窗户",
|
|
2274
|
-
show: P(() =>
|
|
2282
|
+
show: P(() => W.value),
|
|
2275
2283
|
src: M["./assets/images/deleteSelectWindow.svg"].default,
|
|
2276
2284
|
shortcut: "Q + Delete"
|
|
2277
2285
|
},
|
|
2278
2286
|
{
|
|
2279
|
-
command:
|
|
2287
|
+
command: ee.commandName,
|
|
2280
2288
|
name: "删除",
|
|
2281
|
-
show: P(() =>
|
|
2289
|
+
show: P(() => K.value > 0),
|
|
2282
2290
|
src: M["./assets/images/deleteSelectLine.svg"].default,
|
|
2283
2291
|
shortcut: "Delete"
|
|
2284
2292
|
}
|
|
2285
2293
|
];
|
|
2286
|
-
|
|
2287
|
-
localStorage.setItem("toolBarExpand", u.value + ""), u.value &&
|
|
2288
|
-
}),
|
|
2289
|
-
const
|
|
2290
|
-
|
|
2294
|
+
J(A, () => localStorage.setItem("editorToolPosition", JSON.stringify(A.value))), J(b, () => localStorage.setItem("showShortcutKey", b.value + "")), J(u, () => {
|
|
2295
|
+
localStorage.setItem("toolBarExpand", u.value + ""), u.value && we(() => e(A.value.left, A.value.top));
|
|
2296
|
+
}), J(r, () => g.Variable.set("originalLineVisible", r.value)), J(l, () => g.Variable.set("dxfVisible", l.value)), J(i, () => g.Variable.set("whiteModelVisible", i.value)), g.Variable.addEventListener("isLook", (C) => c.value = C.value), g.Variable.addEventListener("originalLineVisible", (C) => r.value = C.value), g.Variable.addEventListener("dxfVisible", (C) => l.value = C.value), g.Variable.addEventListener("whiteModelVisible", (C) => i.value = C.value);
|
|
2297
|
+
const mt = x.commandManager.addEventListener("started", (C) => {
|
|
2298
|
+
v.value = C.name;
|
|
2291
2299
|
});
|
|
2292
|
-
return localStorage.getItem("showShortcutKey") && (
|
|
2293
|
-
|
|
2294
|
-
if (
|
|
2295
|
-
const { left:
|
|
2296
|
-
e(
|
|
2300
|
+
return localStorage.getItem("showShortcutKey") && (b.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (u.value = localStorage.getItem("toolBarExpand") === "true"), tt(() => {
|
|
2301
|
+
y.value.style.display = "none", setTimeout(() => {
|
|
2302
|
+
if (y.value.style.display = "block", localStorage.getItem("editorToolPosition")) {
|
|
2303
|
+
const { left: C, top: p } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
|
|
2304
|
+
e(C, p), we(() => he.observe(h.value));
|
|
2297
2305
|
} else
|
|
2298
|
-
|
|
2306
|
+
we(() => he.observe(h.value));
|
|
2299
2307
|
}, 100), D.addEventListener("selectLineChange", () => {
|
|
2300
|
-
|
|
2301
|
-
}), ["rollback", "completed", "revokeRollback"].forEach((
|
|
2302
|
-
|
|
2308
|
+
K.value = D.selectLines.length, W.value = D.selectLines.some((C) => C.userData.isWindow);
|
|
2309
|
+
}), ["rollback", "completed", "revokeRollback"].forEach((C) => {
|
|
2310
|
+
x.commandManager.addEventListener(C, () => {
|
|
2303
2311
|
setTimeout(() => {
|
|
2304
|
-
|
|
2312
|
+
Z.value = x.commandManager.operationList.length, G.value = x.commandManager.rollbackList.length;
|
|
2305
2313
|
});
|
|
2306
2314
|
});
|
|
2307
2315
|
});
|
|
2308
|
-
}),
|
|
2309
|
-
E.mouseMoveEventProxylock = !1,
|
|
2310
|
-
}), (
|
|
2316
|
+
}), Rt(() => {
|
|
2317
|
+
E.mouseMoveEventProxylock = !1, mt(), he.disconnect();
|
|
2318
|
+
}), (C, p) => (I(), O("div", {
|
|
2311
2319
|
ref_key: "elRef",
|
|
2312
2320
|
ref: h,
|
|
2313
2321
|
class: "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[20] flex flex-row justify-between p-[5px] box-border select-none pointer-events-[all]"
|
|
2314
2322
|
}, [
|
|
2315
|
-
|
|
2316
|
-
default:
|
|
2317
|
-
|
|
2318
|
-
(I(),
|
|
2323
|
+
F(xe, null, {
|
|
2324
|
+
default: j(() => [
|
|
2325
|
+
b.value ? (I(), O("div", as, [
|
|
2326
|
+
(I(), O(ve, null, ke(Ce, (w) => k("div", {
|
|
2319
2327
|
class: "p-[4px_0px] flex justify-between text-right border-b-1 border-b-[rgba(255,255,255,0.1)] last-of-type:border-b-0",
|
|
2320
|
-
key:
|
|
2328
|
+
key: w.name
|
|
2321
2329
|
}, [
|
|
2322
|
-
k("p",
|
|
2323
|
-
k("span",
|
|
2330
|
+
k("p", is, de(w.name), 1),
|
|
2331
|
+
k("span", rs, de(w.shortcut), 1)
|
|
2324
2332
|
])), 64))
|
|
2325
|
-
])) :
|
|
2333
|
+
])) : q("", !0)
|
|
2326
2334
|
]),
|
|
2327
2335
|
_: 1
|
|
2328
2336
|
}),
|
|
2329
2337
|
k("div", {
|
|
2330
2338
|
ref_key: "toolBarRef",
|
|
2331
|
-
ref:
|
|
2332
|
-
style:
|
|
2333
|
-
class:
|
|
2334
|
-
onMousedown:
|
|
2339
|
+
ref: y,
|
|
2340
|
+
style: Se({ left: A.value.left + "px", top: A.value.top + "px" }),
|
|
2341
|
+
class: V(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": u.value }]),
|
|
2342
|
+
onMousedown: p[10] || (p[10] = (w) => w.stopPropagation())
|
|
2335
2343
|
}, [
|
|
2336
2344
|
k("div", {
|
|
2337
|
-
onMousedown:
|
|
2338
|
-
class:
|
|
2345
|
+
onMousedown: o,
|
|
2346
|
+
class: V([{ "border-b-[#eee] border-b-1": u.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
|
|
2339
2347
|
}, [
|
|
2340
|
-
|
|
2348
|
+
p[12] || (p[12] = Kt('<div class="flex flex-row" data-v-09e4c536><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-09e4c536><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-09e4c536><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-09e4c536></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-09e4c536>绘制工具</h5></div>', 1)),
|
|
2341
2349
|
k("div", {
|
|
2342
|
-
onMousedown:
|
|
2343
|
-
onClick:
|
|
2350
|
+
onMousedown: p[0] || (p[0] = (w) => w.stopPropagation()),
|
|
2351
|
+
onClick: p[1] || (p[1] = (w) => u.value = !u.value),
|
|
2344
2352
|
class: "cursor-pointer flex items-center p-[0px_5px]"
|
|
2345
2353
|
}, [
|
|
2346
|
-
(I(),
|
|
2354
|
+
(I(), O("svg", {
|
|
2347
2355
|
fill: "#666",
|
|
2348
|
-
class:
|
|
2356
|
+
class: V([{ "rotate-90": u.value }, "transition-all"]),
|
|
2349
2357
|
viewBox: "0 0 1024 1024",
|
|
2350
2358
|
version: "1.1",
|
|
2351
2359
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2352
2360
|
width: "12",
|
|
2353
2361
|
height: "12"
|
|
2354
|
-
},
|
|
2362
|
+
}, p[11] || (p[11] = [
|
|
2355
2363
|
k("path", { d: "M315.050667 938.666667a60.757333 60.757333 0 0 0 41.813333-16.298667L750.933333 551.338667a53.418667 53.418667 0 0 0 0-78.677334L356.864 101.632a61.696 61.696 0 0 0-83.541333 0 53.418667 53.418667 0 0 0-0.256 78.677333L625.408 512 273.066667 843.690667a53.418667 53.418667 0 0 0 0 78.677333 60.757333 60.757333 0 0 0 41.984 16.298667z" }, null, -1)
|
|
2356
2364
|
]), 2))
|
|
2357
2365
|
], 32)
|
|
2358
2366
|
], 34),
|
|
2359
|
-
u.value ? (I(),
|
|
2360
|
-
k("ul",
|
|
2361
|
-
(I(),
|
|
2362
|
-
key:
|
|
2367
|
+
u.value ? (I(), O("div", ds, [
|
|
2368
|
+
k("ul", ls, [
|
|
2369
|
+
(I(), O(ve, null, ke(lt, (w) => (I(), O(ve, {
|
|
2370
|
+
key: w.command
|
|
2363
2371
|
}, [
|
|
2364
|
-
|
|
2372
|
+
w.show ? (I(), O("li", {
|
|
2365
2373
|
key: 0,
|
|
2366
|
-
onClick: (U) => t(
|
|
2367
|
-
class:
|
|
2368
|
-
"!bg-[var(--primary-color)] text-[#fff]":
|
|
2369
|
-
"!cursor-no-drop":
|
|
2374
|
+
onClick: (U) => t(w),
|
|
2375
|
+
class: V([{
|
|
2376
|
+
"!bg-[var(--primary-color)] text-[#fff]": v.value === w.command,
|
|
2377
|
+
"!cursor-no-drop": v.value !== w.command && v.value !== "default"
|
|
2370
2378
|
}, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
|
|
2371
2379
|
}, [
|
|
2372
|
-
k("div",
|
|
2373
|
-
k("div",
|
|
2380
|
+
k("div", ms, [
|
|
2381
|
+
k("div", hs, [
|
|
2374
2382
|
k("img", {
|
|
2375
2383
|
class: "size-[14px]",
|
|
2376
|
-
src:
|
|
2384
|
+
src: w.src,
|
|
2377
2385
|
alt: "",
|
|
2378
2386
|
srcset: ""
|
|
2379
|
-
}, null, 8,
|
|
2387
|
+
}, null, 8, us)
|
|
2380
2388
|
]),
|
|
2381
|
-
k("span",
|
|
2389
|
+
k("span", ps, de(w.name), 1)
|
|
2382
2390
|
]),
|
|
2383
|
-
|
|
2391
|
+
v.value === w.command ? (I(), O("div", {
|
|
2384
2392
|
key: 0,
|
|
2385
2393
|
title: "取消命令(Esc)",
|
|
2386
2394
|
class: "active:scale-[0.7] transition-all",
|
|
2387
|
-
onClick:
|
|
2388
|
-
},
|
|
2395
|
+
onClick: p[2] || (p[2] = (U) => (f(x).cancelCommand(), U.stopPropagation()))
|
|
2396
|
+
}, p[13] || (p[13] = [
|
|
2389
2397
|
k("svg", {
|
|
2390
2398
|
fill: "#fff",
|
|
2391
2399
|
width: "16",
|
|
@@ -2397,105 +2405,117 @@ const oo = {
|
|
|
2397
2405
|
k("path", { d: "M511.104 0C228.821333 0 0 228.821333 0 511.104c0 282.282667 228.821333 511.104 511.104 511.104 282.282667 0 511.104-228.842667 511.104-511.104C1022.208 228.821333 793.386667 0 511.104 0zM511.104 898.496c-213.973333 0-387.434667-173.44-387.434667-387.413333 0-213.952 173.44-387.413333 387.434667-387.413333 213.952 0 387.392 173.44 387.392 387.413333C898.496 725.056 725.056 898.496 511.104 898.496z" }),
|
|
2398
2406
|
k("path", { d: "M236.437333 463.914667l549.333333 0 0 96.874667-549.333333 0 0-96.874667Z" })
|
|
2399
2407
|
], -1)
|
|
2400
|
-
]))) :
|
|
2401
|
-
], 10,
|
|
2408
|
+
]))) : w.shortcut ? (I(), O("div", gs, de(w.shortcut), 1)) : q("", !0)
|
|
2409
|
+
], 10, cs)) : q("", !0)
|
|
2402
2410
|
], 64))), 64))
|
|
2403
2411
|
]),
|
|
2404
|
-
k("div",
|
|
2405
|
-
|
|
2412
|
+
k("div", vs, [
|
|
2413
|
+
F(f(Ke), {
|
|
2406
2414
|
size: "small",
|
|
2407
|
-
modelValue:
|
|
2408
|
-
"onUpdate:modelValue":
|
|
2415
|
+
modelValue: b.value,
|
|
2416
|
+
"onUpdate:modelValue": p[3] || (p[3] = (w) => b.value = w),
|
|
2409
2417
|
label: "快捷键提示"
|
|
2410
2418
|
}, null, 8, ["modelValue"]),
|
|
2411
|
-
|
|
2419
|
+
F(f(Ke), {
|
|
2412
2420
|
size: "small",
|
|
2413
2421
|
modelValue: l.value,
|
|
2414
|
-
"onUpdate:modelValue":
|
|
2422
|
+
"onUpdate:modelValue": p[4] || (p[4] = (w) => l.value = w),
|
|
2415
2423
|
label: "dxf"
|
|
2416
2424
|
}, null, 8, ["modelValue"])
|
|
2417
2425
|
]),
|
|
2418
|
-
|
|
2419
|
-
|
|
2426
|
+
C.permission === "admin" ? (I(), O("div", fs, [
|
|
2427
|
+
F(f(re), {
|
|
2420
2428
|
style: { padding: "5px", "font-size": "10px" },
|
|
2421
2429
|
size: "small",
|
|
2422
2430
|
type: "success",
|
|
2423
|
-
onClick:
|
|
2431
|
+
onClick: s
|
|
2424
2432
|
}, {
|
|
2425
|
-
default:
|
|
2426
|
-
|
|
2433
|
+
default: j(() => p[14] || (p[14] = [
|
|
2434
|
+
Y(" 选择文件 ", -1)
|
|
2427
2435
|
])),
|
|
2428
2436
|
_: 1,
|
|
2429
|
-
__: [
|
|
2437
|
+
__: [14]
|
|
2430
2438
|
}),
|
|
2431
|
-
|
|
2439
|
+
F(f(re), {
|
|
2432
2440
|
style: { padding: "5px", "font-size": "10px" },
|
|
2433
2441
|
size: "small",
|
|
2434
2442
|
type: "primary",
|
|
2435
|
-
onClick:
|
|
2443
|
+
onClick: p[5] || (p[5] = (w) => f(g).Dxf.downloadOriginalData("json.json"))
|
|
2436
2444
|
}, {
|
|
2437
|
-
default:
|
|
2438
|
-
|
|
2445
|
+
default: j(() => p[15] || (p[15] = [
|
|
2446
|
+
Y(" 下载Json ", -1)
|
|
2439
2447
|
])),
|
|
2440
2448
|
_: 1,
|
|
2441
|
-
__: [
|
|
2449
|
+
__: [15]
|
|
2442
2450
|
}),
|
|
2443
|
-
|
|
2451
|
+
F(f(re), {
|
|
2444
2452
|
style: { padding: "5px", "font-size": "10px" },
|
|
2445
2453
|
size: "small",
|
|
2446
2454
|
type: "primary",
|
|
2447
|
-
onClick:
|
|
2455
|
+
onClick: p[6] || (p[6] = (w) => f(g).AngleCorrectionDxf.download("test.dxf"))
|
|
2448
2456
|
}, {
|
|
2449
|
-
default:
|
|
2450
|
-
|
|
2457
|
+
default: j(() => p[16] || (p[16] = [
|
|
2458
|
+
Y(" 下载DXF ", -1)
|
|
2451
2459
|
])),
|
|
2452
2460
|
_: 1,
|
|
2453
|
-
__: [
|
|
2461
|
+
__: [16]
|
|
2454
2462
|
}),
|
|
2455
|
-
|
|
2463
|
+
F(f(re), {
|
|
2456
2464
|
style: { padding: "5px", "font-size": "10px" },
|
|
2457
2465
|
size: "small",
|
|
2458
2466
|
type: "primary",
|
|
2459
|
-
onClick:
|
|
2467
|
+
onClick: p[7] || (p[7] = (w) => f(g).AngleCorrectionDxf.downloadImage("dxf.jpg"))
|
|
2460
2468
|
}, {
|
|
2461
|
-
default:
|
|
2462
|
-
|
|
2469
|
+
default: j(() => p[17] || (p[17] = [
|
|
2470
|
+
Y(" 下载JPG ", -1)
|
|
2463
2471
|
])),
|
|
2464
2472
|
_: 1,
|
|
2465
|
-
__: [
|
|
2473
|
+
__: [17]
|
|
2466
2474
|
}),
|
|
2467
|
-
|
|
2475
|
+
F(f(re), {
|
|
2468
2476
|
style: { padding: "5px", "font-size": "10px" },
|
|
2469
2477
|
size: "small",
|
|
2470
2478
|
type: "primary",
|
|
2471
|
-
onClick:
|
|
2479
|
+
onClick: p[8] || (p[8] = (w) => f(z).downloadGltf("test.glb", !0))
|
|
2472
2480
|
}, {
|
|
2473
|
-
default:
|
|
2474
|
-
|
|
2481
|
+
default: j(() => p[18] || (p[18] = [
|
|
2482
|
+
Y(" 下载白膜 ", -1)
|
|
2475
2483
|
])),
|
|
2476
2484
|
_: 1,
|
|
2477
|
-
__: [
|
|
2485
|
+
__: [18]
|
|
2486
|
+
}),
|
|
2487
|
+
F(f(re), {
|
|
2488
|
+
style: { padding: "5px", "font-size": "10px" },
|
|
2489
|
+
size: "small",
|
|
2490
|
+
type: "primary",
|
|
2491
|
+
onClick: p[9] || (p[9] = (w) => f(me).download())
|
|
2492
|
+
}, {
|
|
2493
|
+
default: j(() => p[19] || (p[19] = [
|
|
2494
|
+
Y(" 下载三维家JSON ", -1)
|
|
2495
|
+
])),
|
|
2496
|
+
_: 1,
|
|
2497
|
+
__: [19]
|
|
2478
2498
|
})
|
|
2479
|
-
])) :
|
|
2480
|
-
|
|
2481
|
-
default:
|
|
2482
|
-
k("div",
|
|
2483
|
-
|
|
2484
|
-
default:
|
|
2485
|
-
(I(),
|
|
2486
|
-
onClick: (U) =>
|
|
2487
|
-
title: `${
|
|
2488
|
-
class:
|
|
2489
|
-
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !
|
|
2490
|
-
[
|
|
2499
|
+
])) : q("", !0),
|
|
2500
|
+
F(xe, null, {
|
|
2501
|
+
default: j(() => [
|
|
2502
|
+
k("div", ys, [
|
|
2503
|
+
F(Ft, null, {
|
|
2504
|
+
default: j(() => [
|
|
2505
|
+
(I(), O(ve, null, ke(ct, (w) => k("div", {
|
|
2506
|
+
onClick: (U) => w.show.value && v.value === "default" && (w.action ? w.action() : f(x).commandManager.start(w.command, [...f(D).selectLines])),
|
|
2507
|
+
title: `${w.name}(${w.shortcut})`,
|
|
2508
|
+
class: V(["size-[20px] flex justify-center items-center relative overflow-hidden active:scale-[0.8] border-1 border-[#ccc] rounded-[4px] transition-all cursor-pointer", {
|
|
2509
|
+
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !w.show.value || v.value !== "default",
|
|
2510
|
+
[w.class ?? ""]: !0
|
|
2491
2511
|
}]),
|
|
2492
|
-
key:
|
|
2512
|
+
key: w.command
|
|
2493
2513
|
}, [
|
|
2494
2514
|
k("img", {
|
|
2495
2515
|
class: "size-[14px]",
|
|
2496
|
-
src:
|
|
2497
|
-
}, null, 8,
|
|
2498
|
-
], 10,
|
|
2516
|
+
src: w.src
|
|
2517
|
+
}, null, 8, bs)
|
|
2518
|
+
], 10, ws)), 64))
|
|
2499
2519
|
]),
|
|
2500
2520
|
_: 1
|
|
2501
2521
|
})
|
|
@@ -2503,17 +2523,17 @@ const oo = {
|
|
|
2503
2523
|
]),
|
|
2504
2524
|
_: 1
|
|
2505
2525
|
})
|
|
2506
|
-
])) :
|
|
2526
|
+
])) : q("", !0)
|
|
2507
2527
|
], 38)
|
|
2508
2528
|
], 512));
|
|
2509
2529
|
}
|
|
2510
|
-
}),
|
|
2530
|
+
}), Cs = (d, e) => {
|
|
2511
2531
|
const t = d.__vccOpts || d;
|
|
2512
|
-
for (const [n,
|
|
2513
|
-
t[n] =
|
|
2532
|
+
for (const [n, s] of e)
|
|
2533
|
+
t[n] = s;
|
|
2514
2534
|
return t;
|
|
2515
|
-
},
|
|
2516
|
-
let dt = class extends
|
|
2535
|
+
}, Es = /* @__PURE__ */ Cs(xs, [["__scopeId", "data-v-09e4c536"]]);
|
|
2536
|
+
let dt = class extends Ae {
|
|
2517
2537
|
static name = "Editor";
|
|
2518
2538
|
container = new m.Group();
|
|
2519
2539
|
get renderer() {
|
|
@@ -2537,7 +2557,7 @@ let dt = class extends Se {
|
|
|
2537
2557
|
get domContainer() {
|
|
2538
2558
|
return this.parent?.findComponentByName("DomContainer");
|
|
2539
2559
|
}
|
|
2540
|
-
commandManager = new
|
|
2560
|
+
commandManager = new bn();
|
|
2541
2561
|
plane = new m.Mesh(new m.PlaneGeometry(2e3, 2e3, 2, 2));
|
|
2542
2562
|
app;
|
|
2543
2563
|
domElement = document.createElement("div");
|
|
@@ -2567,20 +2587,20 @@ let dt = class extends Se {
|
|
|
2567
2587
|
this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), this.domContainer.domElement.parentElement.appendChild(this.imgEl), n());
|
|
2568
2588
|
});
|
|
2569
2589
|
setTimeout(() => {
|
|
2570
|
-
this.app =
|
|
2590
|
+
this.app = zt(Es, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
|
|
2571
2591
|
}), e.AngleCorrectionDxf.addEventListener("lineOffset", async () => {
|
|
2572
2592
|
this.imgEl.src && URL.revokeObjectURL(this.imgEl.src), setTimeout(async () => {
|
|
2573
2593
|
this.imgEl.src = URL.createObjectURL(await e.AngleCorrectionDxf.toDxfImageBlob("Centimeters", "image/png", "transparent"));
|
|
2574
2594
|
});
|
|
2575
|
-
}), this.domEventRegister.addEventListener("mousedown", (
|
|
2576
|
-
|
|
2595
|
+
}), this.domEventRegister.addEventListener("mousedown", (s) => {
|
|
2596
|
+
s.x < this.imgWidth + 10 && s.x > 10 && s.y < this.imgWidth && s.y > 10 && Object.assign(this.imgEl.style, {
|
|
2577
2597
|
width: `${Math.min(this.imgWidth * 10, this.renderer.width * 0.9)}px`,
|
|
2578
2598
|
height: `${Math.min(this.imgWidth * 10, this.renderer.height * 0.9)}px`,
|
|
2579
2599
|
background: "rgba(0,0,0,1)",
|
|
2580
2600
|
zIndex: 100
|
|
2581
2601
|
});
|
|
2582
|
-
}), this.domEventRegister.addEventListener("mousemove", (
|
|
2583
|
-
|
|
2602
|
+
}), this.domEventRegister.addEventListener("mousemove", (s) => {
|
|
2603
|
+
s.x < this.imgWidth + 10 && s.x > 10 && s.y < this.imgWidth && s.y > 10 || Object.assign(this.imgEl.style, {
|
|
2584
2604
|
width: `${this.imgWidth}px`,
|
|
2585
2605
|
height: `${this.imgWidth}px`,
|
|
2586
2606
|
background: "rgba(255,255,255,0.2)",
|
|
@@ -2603,20 +2623,20 @@ let dt = class extends Se {
|
|
|
2603
2623
|
* 打开编辑器
|
|
2604
2624
|
*/
|
|
2605
2625
|
openEdit() {
|
|
2606
|
-
const e = this.renderer, t = this.domEventRegister, n = this.dxf,
|
|
2607
|
-
this.container.position.z = n.originalZAverage, e.scene.add(this.container),
|
|
2626
|
+
const e = this.renderer, t = this.domEventRegister, n = this.dxf, s = e.orbitControls, o = e.camera, a = n.box.center, r = e.camera.position.clone(), l = s?.target?.clone(), i = new m.Vector2(), c = new m.Raycaster(), h = this.coords, y = this.pointerPosition;
|
|
2627
|
+
this.container.position.z = n.originalZAverage, e.scene.add(this.container), s && (o.position.set(a.x, a.y, 15), s.target.set(a.x, a.y, 0), s.enableRotate = !1);
|
|
2608
2628
|
const u = () => {
|
|
2609
2629
|
e.renderer.getSize(i);
|
|
2610
|
-
const
|
|
2611
|
-
h.set(
|
|
2630
|
+
const v = t.pointer.x / i.x * 2 - 1, g = -(t.pointer.y / i.y * 2 - 1);
|
|
2631
|
+
h.set(v, g), c.setFromCamera(h, e.camera.children.length ? e.camera.children[0] : e.camera);
|
|
2612
2632
|
const E = c.intersectObject(this.plane);
|
|
2613
|
-
E.length && (
|
|
2633
|
+
E.length && (y.copy(E[0].point), this.dispatchEvent({
|
|
2614
2634
|
type: "pointerPositionChange",
|
|
2615
|
-
position:
|
|
2635
|
+
position: y
|
|
2616
2636
|
}));
|
|
2617
2637
|
};
|
|
2618
2638
|
t.addEventListener("mousemove", u), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
|
|
2619
|
-
t.removeEventListener("mousemove", u),
|
|
2639
|
+
t.removeEventListener("mousemove", u), s && (o.position.copy(r), s.enableRotate = !0, s.target.copy(l));
|
|
2620
2640
|
};
|
|
2621
2641
|
}
|
|
2622
2642
|
/**
|
|
@@ -2629,7 +2649,7 @@ let dt = class extends Se {
|
|
|
2629
2649
|
super.destroy(), this.exitEdit(), this.renderer.scene.remove(this.container), this.domElement.remove(), this.app?.unmount();
|
|
2630
2650
|
}
|
|
2631
2651
|
};
|
|
2632
|
-
class
|
|
2652
|
+
class Ms extends R {
|
|
2633
2653
|
static name = "PointDrag";
|
|
2634
2654
|
container = new m.Group();
|
|
2635
2655
|
interruptKeys = ["escape"];
|
|
@@ -2644,12 +2664,12 @@ class Eo extends O {
|
|
|
2644
2664
|
* @param next
|
|
2645
2665
|
*/
|
|
2646
2666
|
selectPoint(e) {
|
|
2647
|
-
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })),
|
|
2667
|
+
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
|
|
2648
2668
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2649
|
-
const { point:
|
|
2650
|
-
this.dispatchEvent({ type: "pointerMove", point:
|
|
2669
|
+
const { point: o, line: a, find: r, mode: l } = this.editor.renderManager.adsorption();
|
|
2670
|
+
this.dispatchEvent({ type: "pointerMove", point: o }), r && l === "point" ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
2651
2671
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2652
|
-
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line:
|
|
2672
|
+
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: s }));
|
|
2653
2673
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
2654
2674
|
}
|
|
2655
2675
|
/** 拖拽点
|
|
@@ -2659,32 +2679,32 @@ class Eo extends O {
|
|
|
2659
2679
|
*/
|
|
2660
2680
|
drag(e, { point: t, line: n }) {
|
|
2661
2681
|
this.domElement.style.cursor = "crosshair";
|
|
2662
|
-
const
|
|
2682
|
+
const s = n.start.equal(_.from(t)) ? "start" : "end", o = s == "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 ye([o, a], 16711935), l = new m.Mesh(new m.SphereGeometry(0.03), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
2663
2683
|
this.container.add(r), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2664
2684
|
let { point: i, find: c } = this.editor.renderManager.adsorption(), h = "none";
|
|
2665
2685
|
if (i) {
|
|
2666
2686
|
if (this.dispatchEvent({ type: "pointerMove", point: i }), this.eventInput.isKeyDown("shift")) {
|
|
2667
|
-
const
|
|
2668
|
-
i.set(
|
|
2687
|
+
const y = n.projectPoint(_.from(i), !1);
|
|
2688
|
+
i.set(y?.x ?? i.x, y?.y ?? i.y, 0), c = !0, h = "crosshair";
|
|
2669
2689
|
}
|
|
2670
|
-
c ? (l.position.copy(i), this.container.add(l)) : (l.removeFromParent(), h = "crosshair"), a.copy(i), r.setPoint(
|
|
2690
|
+
c ? (l.position.copy(i), this.container.add(l)) : (l.removeFromParent(), h = "crosshair"), a.copy(i), r.setPoint(o, a), this.domElement.style.cursor = h;
|
|
2671
2691
|
}
|
|
2672
2692
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2673
|
-
this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: a, oldPoint:
|
|
2693
|
+
this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: a, oldPoint: s === "end" ? n.end.clone() : n.start.clone(), line: n, mode: s }));
|
|
2674
2694
|
})).add(() => l.removeFromParent()).add(() => r.removeFromParent());
|
|
2675
2695
|
}
|
|
2676
2696
|
/** 执行完成
|
|
2677
2697
|
*/
|
|
2678
2698
|
completed(e) {
|
|
2679
|
-
const { line: t, point: n, mode:
|
|
2680
|
-
this.renderManager.removeLine(t),
|
|
2699
|
+
const { line: t, point: n, mode: s } = e;
|
|
2700
|
+
this.renderManager.removeLine(t), s === "end" ? t.end.set(n.x, n.y) : s === "start" && t.start.set(n.x, n.y), this.renderManager.addLine(t), this.renderManager.draw();
|
|
2681
2701
|
}
|
|
2682
2702
|
/** 回滚操作
|
|
2683
2703
|
* @param data
|
|
2684
2704
|
*/
|
|
2685
2705
|
rollback(e) {
|
|
2686
|
-
const { line: t, oldPoint: n, mode:
|
|
2687
|
-
return
|
|
2706
|
+
const { line: t, oldPoint: n, mode: s } = e;
|
|
2707
|
+
return s === "end" ? t.end.set(n.x, n.y) : s === "start" && t.start.set(n.x, n.y), this.renderManager.addLine(t), this.renderManager.draw(), e;
|
|
2688
2708
|
}
|
|
2689
2709
|
/** 撤回回滚
|
|
2690
2710
|
* @param lines
|
|
@@ -2694,15 +2714,15 @@ class Eo extends O {
|
|
|
2694
2714
|
return this.completed(e), e;
|
|
2695
2715
|
}
|
|
2696
2716
|
}
|
|
2697
|
-
function
|
|
2698
|
-
d.addComponent(new dt(e.viewPermission)), d.addComponent(new
|
|
2717
|
+
function Je(d, e = {}) {
|
|
2718
|
+
d.addComponent(new dt(e.viewPermission)), d.addComponent(new ns()), d.addComponent(new _e()), d.addComponent(new yn()), d.addComponent(new ss()), d.addComponent(new os()), d.addComponent(new Ms()), d.addComponent(new ee()), d.addComponent(new $()), d.addComponent(new X()), d.addComponent(new te()), d.addComponent(new ne()), d.addComponent(new se()), d.addComponent(new oe()), d.addComponent(new ae()), d.addComponent(new ie()), d.addComponent(new rt());
|
|
2699
2719
|
}
|
|
2700
|
-
const
|
|
2720
|
+
const _s = Object.assign(Je, {
|
|
2701
2721
|
create(d = {}) {
|
|
2702
|
-
return (e) =>
|
|
2722
|
+
return (e) => Je(e, d);
|
|
2703
2723
|
}
|
|
2704
2724
|
});
|
|
2705
2725
|
export {
|
|
2706
|
-
|
|
2707
|
-
|
|
2726
|
+
_s as Editor,
|
|
2727
|
+
Je as Editor_
|
|
2708
2728
|
};
|