build-dxf 0.0.20-25 → 0.0.20-26
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.d.ts +2 -0
- package/src/build.js +265 -256
- package/src/index.css +1 -1
- package/src/index3.js +716 -600
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ClippingLine.d.ts +45 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawDoorLine.d.ts +2 -4
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection copy.d.ts +82 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection.d.ts +7 -18
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalReferenceLine.d.ts +1 -1
- package/src/utils/PointVirtualGrid/index.d.ts +8 -0
package/src/index3.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import * as m from "three";
|
|
2
|
-
import { i as
|
|
3
|
-
import { C as
|
|
2
|
+
import { i as mt, n as ht, r as Je, t as qe, c as De, d as ut, e as pt, f as Ae, g as G, _ as Ze, u as gt, h as ve, j as Be, w as vt, k as ft, l as yt, p as wt, m as bt, o as Ct, T as Ne, q as Re, s as xt, v as Et, x as Oe, y as Pe, z as ke, A as Mt, B as Lt, L as fe, D as kt, b as Fe, E as ue, S as It } from "./selectLocalFile.js";
|
|
3
|
+
import { C as Ce, L as W, P as V, B as Ye, E as Xe, b as Ke, Q as ze, u as Pt, W as Dt } 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
|
|
7
|
+
import { watch as H, ref as A, defineComponent as ce, computed as P, createElementBlock as B, openBlock as I, normalizeClass as z, unref as p, renderSlot as we, createVNode as F, Transition as be, withCtx as T, withDirectives as $e, createElementVNode as k, normalizeStyle as _e, createTextVNode as ie, toDisplayString as re, vShow as et, shallowReactive as At, onMounted as tt, createBlock as pe, createCommentVNode as J, resolveDynamicComponent as _t, Fragment as ge, withModifiers as St, nextTick as ye, isVNode as nt, render as Te, toRaw as Bt, onUnmounted as Nt, renderList as Ie, createStaticVNode as Rt, TransitionGroup as Ot, createApp as Ft } from "vue";
|
|
8
8
|
function ot(i) {
|
|
9
9
|
var e;
|
|
10
|
-
const t =
|
|
10
|
+
const t = Je(i);
|
|
11
11
|
return (e = t?.$el) != null ? e : t;
|
|
12
12
|
}
|
|
13
|
-
const st =
|
|
14
|
-
function
|
|
13
|
+
const st = De ? window : void 0;
|
|
14
|
+
function Kt(...i) {
|
|
15
15
|
let e, t, n, o;
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
16
|
+
if (mt(i[0]) || Array.isArray(i[0]) ? ([t, n, o] = i, e = st) : [e, t, n, o] = i, !e)
|
|
17
|
+
return ht;
|
|
18
18
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
19
19
|
const s = [], a = () => {
|
|
20
20
|
s.forEach((c) => c()), s.length = 0;
|
|
21
|
-
}, r = (c, h,
|
|
22
|
-
a(), c && s.push(...t.flatMap((
|
|
21
|
+
}, r = (c, h, f, y) => (c.addEventListener(h, f, y), () => c.removeEventListener(h, f, y)), l = H(() => [ot(e), Je(o)], ([c, h]) => {
|
|
22
|
+
a(), c && s.push(...t.flatMap((f) => n.map((y) => r(c, f, y, h))));
|
|
23
23
|
}, { immediate: !0, flush: "post" }), d = () => {
|
|
24
24
|
l(), a();
|
|
25
25
|
};
|
|
26
26
|
return qe(d), d;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const t =
|
|
30
|
-
return n(),
|
|
28
|
+
function zt(i, e = !1) {
|
|
29
|
+
const t = A(), n = () => t.value = !!i();
|
|
30
|
+
return n(), ut(n, e), t;
|
|
31
31
|
}
|
|
32
32
|
const Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, je = "__vueuse_ssr_handlers__";
|
|
33
33
|
Ve[je] = Ve[je] || {};
|
|
34
|
-
var Ge = Object.getOwnPropertySymbols,
|
|
34
|
+
var Ge = Object.getOwnPropertySymbols, Tt = Object.prototype.hasOwnProperty, Vt = Object.prototype.propertyIsEnumerable, jt = (i, e) => {
|
|
35
35
|
var t = {};
|
|
36
36
|
for (var n in i)
|
|
37
|
-
|
|
37
|
+
Tt.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]);
|
|
38
38
|
if (i != null && Ge)
|
|
39
39
|
for (var n of Ge(i))
|
|
40
|
-
e.indexOf(n) < 0 &&
|
|
40
|
+
e.indexOf(n) < 0 && Vt.call(i, n) && (t[n] = i[n]);
|
|
41
41
|
return t;
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
const n = t, { window: o = st } = n, s =
|
|
43
|
+
function Gt(i, e, t = {}) {
|
|
44
|
+
const n = t, { window: o = st } = n, s = jt(n, ["window"]);
|
|
45
45
|
let a;
|
|
46
|
-
const r =
|
|
46
|
+
const r = zt(() => o && "ResizeObserver" in o), l = () => {
|
|
47
47
|
a && (a.disconnect(), a = void 0);
|
|
48
|
-
}, d =
|
|
48
|
+
}, d = H(() => ot(i), (h) => {
|
|
49
49
|
l(), r.value && o && h && (a = new ResizeObserver(e), a.observe(h, s));
|
|
50
50
|
}, { immediate: !0, flush: "post" }), c = () => {
|
|
51
51
|
l(), d();
|
|
@@ -59,15 +59,15 @@ var Qe;
|
|
|
59
59
|
(function(i) {
|
|
60
60
|
i.UP = "UP", i.RIGHT = "RIGHT", i.DOWN = "DOWN", i.LEFT = "LEFT", i.NONE = "NONE";
|
|
61
61
|
})(Qe || (Qe = {}));
|
|
62
|
-
var
|
|
62
|
+
var Qt = Object.defineProperty, He = Object.getOwnPropertySymbols, Ht = Object.prototype.hasOwnProperty, Wt = Object.prototype.propertyIsEnumerable, We = (i, e, t) => e in i ? Qt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Ut = (i, e) => {
|
|
63
63
|
for (var t in e || (e = {}))
|
|
64
|
-
|
|
64
|
+
Ht.call(e, t) && We(i, t, e[t]);
|
|
65
65
|
if (He)
|
|
66
66
|
for (var t of He(e))
|
|
67
|
-
|
|
67
|
+
Wt.call(e, t) && We(i, t, e[t]);
|
|
68
68
|
return i;
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const Jt = {
|
|
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 Wt = {
|
|
|
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
|
+
Ut({
|
|
97
|
+
linear: pt
|
|
98
|
+
}, Jt);
|
|
99
|
+
const qt = (i) => i, Zt = {
|
|
100
100
|
esc: "Escape"
|
|
101
|
-
},
|
|
101
|
+
}, Yt = Ae({
|
|
102
102
|
value: {
|
|
103
103
|
type: [String, Number],
|
|
104
104
|
default: ""
|
|
@@ -120,59 +120,59 @@ const Jt = (i) => i, Ut = {
|
|
|
120
120
|
},
|
|
121
121
|
color: String,
|
|
122
122
|
badgeStyle: {
|
|
123
|
-
type:
|
|
123
|
+
type: G([String, Object, Array])
|
|
124
124
|
},
|
|
125
125
|
offset: {
|
|
126
|
-
type:
|
|
126
|
+
type: G(Array),
|
|
127
127
|
default: [0, 0]
|
|
128
128
|
},
|
|
129
129
|
badgeClass: {
|
|
130
130
|
type: String
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), Xt = ce({
|
|
133
133
|
name: "ElBadge"
|
|
134
|
-
}),
|
|
135
|
-
...
|
|
136
|
-
props:
|
|
134
|
+
}), $t = /* @__PURE__ */ ce({
|
|
135
|
+
...Xt,
|
|
136
|
+
props: Yt,
|
|
137
137
|
setup(i, { expose: e }) {
|
|
138
|
-
const t = i, n =
|
|
138
|
+
const t = i, n = gt("badge"), o = P(() => t.isDot ? "" : ve(t.value) && ve(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), s = P(() => {
|
|
139
139
|
var a, r, l, d, c;
|
|
140
140
|
return [
|
|
141
141
|
{
|
|
142
142
|
backgroundColor: t.color,
|
|
143
|
-
marginRight:
|
|
144
|
-
marginTop:
|
|
143
|
+
marginRight: Be(-((r = (a = t.offset) == null ? void 0 : a[0]) != null ? r : 0)),
|
|
144
|
+
marginTop: Be((d = (l = t.offset) == null ? void 0 : l[1]) != null ? d : 0)
|
|
145
145
|
},
|
|
146
146
|
(c = t.badgeStyle) != null ? c : {}
|
|
147
147
|
];
|
|
148
148
|
});
|
|
149
149
|
return e({
|
|
150
150
|
content: o
|
|
151
|
-
}), (a, r) => (
|
|
152
|
-
class:
|
|
151
|
+
}), (a, r) => (I(), B("div", {
|
|
152
|
+
class: z(p(n).b())
|
|
153
153
|
}, [
|
|
154
|
-
|
|
155
|
-
F(
|
|
156
|
-
name: `${
|
|
154
|
+
we(a.$slots, "default"),
|
|
155
|
+
F(be, {
|
|
156
|
+
name: `${p(n).namespace.value}-zoom-in-center`,
|
|
157
157
|
persisted: ""
|
|
158
158
|
}, {
|
|
159
|
-
default:
|
|
160
|
-
$e(
|
|
161
|
-
class:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
default: T(() => [
|
|
160
|
+
$e(k("sup", {
|
|
161
|
+
class: z([
|
|
162
|
+
p(n).e("content"),
|
|
163
|
+
p(n).em("content", a.type),
|
|
164
|
+
p(n).is("fixed", !!a.$slots.default),
|
|
165
|
+
p(n).is("dot", a.isDot),
|
|
166
|
+
p(n).is("hide-zero", !a.showZero && t.value === 0),
|
|
167
167
|
a.badgeClass
|
|
168
168
|
]),
|
|
169
|
-
style:
|
|
169
|
+
style: _e(p(s))
|
|
170
170
|
}, [
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
we(a.$slots, "content", { value: p(o) }, () => [
|
|
172
|
+
ie(re(p(o)), 1)
|
|
173
173
|
])
|
|
174
174
|
], 6), [
|
|
175
|
-
[et, !a.hidden && (
|
|
175
|
+
[et, !a.hidden && (p(o) || a.isDot || a.$slots.content)]
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
178
|
_: 3
|
|
@@ -180,54 +180,54 @@ const Jt = (i) => i, Ut = {
|
|
|
180
180
|
], 2));
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
|
-
var
|
|
184
|
-
const
|
|
183
|
+
var en = /* @__PURE__ */ Ze($t, [["__file", "badge.vue"]]);
|
|
184
|
+
const tn = vt(en), nn = Ae({
|
|
185
185
|
a11y: {
|
|
186
186
|
type: Boolean,
|
|
187
187
|
default: !0
|
|
188
188
|
},
|
|
189
189
|
locale: {
|
|
190
|
-
type:
|
|
190
|
+
type: G(Object)
|
|
191
191
|
},
|
|
192
|
-
size:
|
|
192
|
+
size: yt,
|
|
193
193
|
button: {
|
|
194
|
-
type:
|
|
194
|
+
type: G(Object)
|
|
195
195
|
},
|
|
196
196
|
card: {
|
|
197
|
-
type:
|
|
197
|
+
type: G(Object)
|
|
198
198
|
},
|
|
199
199
|
dialog: {
|
|
200
|
-
type:
|
|
200
|
+
type: G(Object)
|
|
201
201
|
},
|
|
202
202
|
link: {
|
|
203
|
-
type:
|
|
203
|
+
type: G(Object)
|
|
204
204
|
},
|
|
205
205
|
experimentalFeatures: {
|
|
206
|
-
type:
|
|
206
|
+
type: G(Object)
|
|
207
207
|
},
|
|
208
208
|
keyboardNavigation: {
|
|
209
209
|
type: Boolean,
|
|
210
210
|
default: !0
|
|
211
211
|
},
|
|
212
212
|
message: {
|
|
213
|
-
type:
|
|
213
|
+
type: G(Object)
|
|
214
214
|
},
|
|
215
215
|
zIndex: Number,
|
|
216
216
|
namespace: {
|
|
217
217
|
type: String,
|
|
218
218
|
default: "el"
|
|
219
219
|
},
|
|
220
|
-
...
|
|
221
|
-
}),
|
|
222
|
-
|
|
220
|
+
...ft
|
|
221
|
+
}), K = {};
|
|
222
|
+
ce({
|
|
223
223
|
name: "ElConfigProvider",
|
|
224
|
-
props:
|
|
224
|
+
props: nn,
|
|
225
225
|
setup(i, { slots: e }) {
|
|
226
|
-
const t =
|
|
227
|
-
return
|
|
226
|
+
const t = wt(i);
|
|
227
|
+
return H(() => i.message, (n) => {
|
|
228
228
|
var o, s;
|
|
229
|
-
Object.assign(
|
|
230
|
-
}, { immediate: !0, deep: !0 }), () =>
|
|
229
|
+
Object.assign(K, (s = (o = t?.value) == null ? void 0 : o.message) != null ? s : {}, n ?? {});
|
|
230
|
+
}, { immediate: !0, deep: !0 }), () => we(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
|
-
],
|
|
239
|
+
], S = qt({
|
|
240
240
|
customClass: "",
|
|
241
241
|
dangerouslyUseHTMLString: !1,
|
|
242
242
|
duration: 3e3,
|
|
@@ -251,182 +251,182 @@ const at = [
|
|
|
251
251
|
zIndex: 0,
|
|
252
252
|
grouping: !1,
|
|
253
253
|
repeatNum: 1,
|
|
254
|
-
appendTo:
|
|
255
|
-
}),
|
|
254
|
+
appendTo: De ? document.body : void 0
|
|
255
|
+
}), on = Ae({
|
|
256
256
|
customClass: {
|
|
257
257
|
type: String,
|
|
258
|
-
default:
|
|
258
|
+
default: S.customClass
|
|
259
259
|
},
|
|
260
260
|
dangerouslyUseHTMLString: {
|
|
261
261
|
type: Boolean,
|
|
262
|
-
default:
|
|
262
|
+
default: S.dangerouslyUseHTMLString
|
|
263
263
|
},
|
|
264
264
|
duration: {
|
|
265
265
|
type: Number,
|
|
266
|
-
default:
|
|
266
|
+
default: S.duration
|
|
267
267
|
},
|
|
268
268
|
icon: {
|
|
269
|
-
type:
|
|
270
|
-
default:
|
|
269
|
+
type: bt,
|
|
270
|
+
default: S.icon
|
|
271
271
|
},
|
|
272
272
|
id: {
|
|
273
273
|
type: String,
|
|
274
|
-
default:
|
|
274
|
+
default: S.id
|
|
275
275
|
},
|
|
276
276
|
message: {
|
|
277
|
-
type:
|
|
277
|
+
type: G([
|
|
278
278
|
String,
|
|
279
279
|
Object,
|
|
280
280
|
Function
|
|
281
281
|
]),
|
|
282
|
-
default:
|
|
282
|
+
default: S.message
|
|
283
283
|
},
|
|
284
284
|
onClose: {
|
|
285
|
-
type:
|
|
286
|
-
default:
|
|
285
|
+
type: G(Function),
|
|
286
|
+
default: S.onClose
|
|
287
287
|
},
|
|
288
288
|
showClose: {
|
|
289
289
|
type: Boolean,
|
|
290
|
-
default:
|
|
290
|
+
default: S.showClose
|
|
291
291
|
},
|
|
292
292
|
type: {
|
|
293
293
|
type: String,
|
|
294
294
|
values: at,
|
|
295
|
-
default:
|
|
295
|
+
default: S.type
|
|
296
296
|
},
|
|
297
297
|
plain: {
|
|
298
298
|
type: Boolean,
|
|
299
|
-
default:
|
|
299
|
+
default: S.plain
|
|
300
300
|
},
|
|
301
301
|
offset: {
|
|
302
302
|
type: Number,
|
|
303
|
-
default:
|
|
303
|
+
default: S.offset
|
|
304
304
|
},
|
|
305
305
|
zIndex: {
|
|
306
306
|
type: Number,
|
|
307
|
-
default:
|
|
307
|
+
default: S.zIndex
|
|
308
308
|
},
|
|
309
309
|
grouping: {
|
|
310
310
|
type: Boolean,
|
|
311
|
-
default:
|
|
311
|
+
default: S.grouping
|
|
312
312
|
},
|
|
313
313
|
repeatNum: {
|
|
314
314
|
type: Number,
|
|
315
|
-
default:
|
|
315
|
+
default: S.repeatNum
|
|
316
316
|
}
|
|
317
|
-
}),
|
|
317
|
+
}), sn = {
|
|
318
318
|
destroy: () => !0
|
|
319
|
-
},
|
|
320
|
-
const e =
|
|
319
|
+
}, Q = At([]), an = (i) => {
|
|
320
|
+
const e = Q.findIndex((o) => o.id === i), t = Q[e];
|
|
321
321
|
let n;
|
|
322
|
-
return e > 0 && (n =
|
|
323
|
-
},
|
|
324
|
-
const { prev: e } =
|
|
322
|
+
return e > 0 && (n = Q[e - 1]), { current: t, prev: n };
|
|
323
|
+
}, rn = (i) => {
|
|
324
|
+
const { prev: e } = an(i);
|
|
325
325
|
return e ? e.vm.exposed.bottom.value : 0;
|
|
326
|
-
},
|
|
326
|
+
}, dn = (i, e) => Q.findIndex((n) => n.id === i) > 0 ? 16 : e, ln = ce({
|
|
327
327
|
name: "ElMessage"
|
|
328
|
-
}),
|
|
329
|
-
...
|
|
330
|
-
props:
|
|
331
|
-
emits:
|
|
328
|
+
}), cn = /* @__PURE__ */ ce({
|
|
329
|
+
...ln,
|
|
330
|
+
props: on,
|
|
331
|
+
emits: sn,
|
|
332
332
|
setup(i, { expose: e, emit: t }) {
|
|
333
|
-
const n = i, { Close: o } =
|
|
334
|
-
let
|
|
335
|
-
const b =
|
|
336
|
-
const
|
|
337
|
-
return { [a.bm("icon",
|
|
338
|
-
}),
|
|
339
|
-
top: `${
|
|
333
|
+
const n = i, { Close: o } = xt, s = A(!1), { ns: a, zIndex: r } = Ct("message"), { currentZIndex: l, nextZIndex: d } = r, c = A(), h = A(!1), f = A(0);
|
|
334
|
+
let y;
|
|
335
|
+
const b = P(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), w = P(() => {
|
|
336
|
+
const g = n.type;
|
|
337
|
+
return { [a.bm("icon", g)]: g && Ne[g] };
|
|
338
|
+
}), E = P(() => n.icon || Ne[n.type] || ""), C = P(() => rn(n.id)), D = P(() => dn(n.id, n.offset) + C.value), R = P(() => f.value + D.value), ae = P(() => ({
|
|
339
|
+
top: `${D.value}px`,
|
|
340
340
|
zIndex: l.value
|
|
341
341
|
}));
|
|
342
|
-
function
|
|
343
|
-
n.duration !== 0 && ({ stop:
|
|
344
|
-
|
|
342
|
+
function q() {
|
|
343
|
+
n.duration !== 0 && ({ stop: y } = Et(() => {
|
|
344
|
+
M();
|
|
345
345
|
}, n.duration));
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
|
|
347
|
+
function _() {
|
|
348
|
+
y?.();
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
h.value = !1,
|
|
352
|
-
var
|
|
353
|
-
s.value || ((
|
|
350
|
+
function M() {
|
|
351
|
+
h.value = !1, ye(() => {
|
|
352
|
+
var g;
|
|
353
|
+
s.value || ((g = n.onClose) == null || g.call(n), t("destroy"));
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
356
|
+
function O({ code: g }) {
|
|
357
|
+
g === Zt.esc && M();
|
|
358
358
|
}
|
|
359
359
|
return tt(() => {
|
|
360
|
-
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
}),
|
|
364
|
-
|
|
360
|
+
q(), d(), h.value = !0;
|
|
361
|
+
}), H(() => n.repeatNum, () => {
|
|
362
|
+
_(), q();
|
|
363
|
+
}), Kt(document, "keydown", O), Gt(c, () => {
|
|
364
|
+
f.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: R,
|
|
368
|
+
close: M
|
|
369
|
+
}), (g, Z) => (I(), pe(be, {
|
|
370
|
+
name: p(a).b("fade"),
|
|
371
|
+
onBeforeEnter: (j) => s.value = !0,
|
|
372
|
+
onBeforeLeave: g.onClose,
|
|
373
|
+
onAfterLeave: (j) => g.$emit("destroy"),
|
|
374
374
|
persisted: ""
|
|
375
375
|
}, {
|
|
376
|
-
default:
|
|
377
|
-
$e(
|
|
378
|
-
id:
|
|
376
|
+
default: T(() => [
|
|
377
|
+
$e(k("div", {
|
|
378
|
+
id: g.id,
|
|
379
379
|
ref_key: "messageRef",
|
|
380
380
|
ref: c,
|
|
381
|
-
class:
|
|
382
|
-
|
|
383
|
-
{ [
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
381
|
+
class: z([
|
|
382
|
+
p(a).b(),
|
|
383
|
+
{ [p(a).m(g.type)]: g.type },
|
|
384
|
+
p(a).is("closable", g.showClose),
|
|
385
|
+
p(a).is("plain", g.plain),
|
|
386
|
+
g.customClass
|
|
387
387
|
]),
|
|
388
|
-
style:
|
|
388
|
+
style: _e(p(ae)),
|
|
389
389
|
role: "alert",
|
|
390
|
-
onMouseenter:
|
|
391
|
-
onMouseleave:
|
|
390
|
+
onMouseenter: _,
|
|
391
|
+
onMouseleave: q
|
|
392
392
|
}, [
|
|
393
|
-
|
|
393
|
+
g.repeatNum > 1 ? (I(), pe(p(tn), {
|
|
394
394
|
key: 0,
|
|
395
|
-
value:
|
|
396
|
-
type:
|
|
397
|
-
class:
|
|
398
|
-
}, null, 8, ["value", "type", "class"])) :
|
|
399
|
-
|
|
395
|
+
value: g.repeatNum,
|
|
396
|
+
type: p(b),
|
|
397
|
+
class: z(p(a).e("badge"))
|
|
398
|
+
}, null, 8, ["value", "type", "class"])) : J("v-if", !0),
|
|
399
|
+
p(E) ? (I(), pe(p(Re), {
|
|
400
400
|
key: 1,
|
|
401
|
-
class:
|
|
401
|
+
class: z([p(a).e("icon"), p(w)])
|
|
402
402
|
}, {
|
|
403
|
-
default:
|
|
404
|
-
(
|
|
403
|
+
default: T(() => [
|
|
404
|
+
(I(), pe(_t(p(E))))
|
|
405
405
|
]),
|
|
406
406
|
_: 1
|
|
407
|
-
}, 8, ["class"])) :
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
class:
|
|
413
|
-
innerHTML:
|
|
407
|
+
}, 8, ["class"])) : J("v-if", !0),
|
|
408
|
+
we(g.$slots, "default", {}, () => [
|
|
409
|
+
g.dangerouslyUseHTMLString ? (I(), B(ge, { key: 1 }, [
|
|
410
|
+
J(" Caution here, message could've been compromised, never use user's input as message "),
|
|
411
|
+
k("p", {
|
|
412
|
+
class: z(p(a).e("content")),
|
|
413
|
+
innerHTML: g.message
|
|
414
414
|
}, null, 10, ["innerHTML"])
|
|
415
|
-
], 2112)) : (
|
|
415
|
+
], 2112)) : (I(), B("p", {
|
|
416
416
|
key: 0,
|
|
417
|
-
class:
|
|
418
|
-
},
|
|
417
|
+
class: z(p(a).e("content"))
|
|
418
|
+
}, re(g.message), 3))
|
|
419
419
|
]),
|
|
420
|
-
|
|
420
|
+
g.showClose ? (I(), pe(p(Re), {
|
|
421
421
|
key: 2,
|
|
422
|
-
class:
|
|
423
|
-
onClick:
|
|
422
|
+
class: z(p(a).e("closeBtn")),
|
|
423
|
+
onClick: St(M, ["stop"])
|
|
424
424
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
F(
|
|
425
|
+
default: T(() => [
|
|
426
|
+
F(p(o))
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
|
-
}, 8, ["class", "onClick"])) :
|
|
429
|
+
}, 8, ["class", "onClick"])) : J("v-if", !0)
|
|
430
430
|
], 46, ["id"]), [
|
|
431
431
|
[et, h.value]
|
|
432
432
|
])
|
|
@@ -435,39 +435,39 @@ const at = [
|
|
|
435
435
|
}, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]));
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
|
-
var
|
|
439
|
-
let
|
|
438
|
+
var mn = /* @__PURE__ */ Ze(cn, [["__file", "message.vue"]]);
|
|
439
|
+
let hn = 1;
|
|
440
440
|
const it = (i) => {
|
|
441
|
-
const e = !i ||
|
|
442
|
-
...
|
|
441
|
+
const e = !i || Oe(i) || nt(i) || Pe(i) ? { message: i } : i, t = {
|
|
442
|
+
...S,
|
|
443
443
|
...e
|
|
444
444
|
};
|
|
445
445
|
if (!t.appendTo)
|
|
446
446
|
t.appendTo = document.body;
|
|
447
|
-
else if (
|
|
447
|
+
else if (Oe(t.appendTo)) {
|
|
448
448
|
let n = document.querySelector(t.appendTo);
|
|
449
|
-
|
|
449
|
+
Mt(n) || (n = document.body), t.appendTo = n;
|
|
450
450
|
}
|
|
451
|
-
return ke(
|
|
452
|
-
},
|
|
453
|
-
const e =
|
|
451
|
+
return ke(K.grouping) && !t.grouping && (t.grouping = K.grouping), ve(K.duration) && t.duration === 3e3 && (t.duration = K.duration), ve(K.offset) && t.offset === 16 && (t.offset = K.offset), ke(K.showClose) && !t.showClose && (t.showClose = K.showClose), ke(K.plain) && !t.plain && (t.plain = K.plain), t;
|
|
452
|
+
}, un = (i) => {
|
|
453
|
+
const e = Q.indexOf(i);
|
|
454
454
|
if (e === -1)
|
|
455
455
|
return;
|
|
456
|
-
|
|
456
|
+
Q.splice(e, 1);
|
|
457
457
|
const { handler: t } = i;
|
|
458
458
|
t.close();
|
|
459
|
-
},
|
|
460
|
-
const n = `message_${
|
|
459
|
+
}, pn = ({ appendTo: i, ...e }, t) => {
|
|
460
|
+
const n = `message_${hn++}`, o = e.onClose, s = document.createElement("div"), a = {
|
|
461
461
|
...e,
|
|
462
462
|
id: n,
|
|
463
463
|
onClose: () => {
|
|
464
|
-
o?.(),
|
|
464
|
+
o?.(), un(c);
|
|
465
465
|
},
|
|
466
466
|
onDestroy: () => {
|
|
467
467
|
Te(null, s);
|
|
468
468
|
}
|
|
469
|
-
}, r = F(
|
|
470
|
-
default:
|
|
469
|
+
}, r = F(mn, a, Pe(a.message) || nt(a.message) ? {
|
|
470
|
+
default: Pe(a.message) ? a.message : () => a.message
|
|
471
471
|
} : null);
|
|
472
472
|
r.appContext = t || le._context, Te(r, s), i.appendChild(s.firstElementChild);
|
|
473
473
|
const l = r.component, c = {
|
|
@@ -483,23 +483,23 @@ const it = (i) => {
|
|
|
483
483
|
};
|
|
484
484
|
return c;
|
|
485
485
|
}, le = (i = {}, e) => {
|
|
486
|
-
if (!
|
|
486
|
+
if (!De)
|
|
487
487
|
return { close: () => {
|
|
488
488
|
} };
|
|
489
489
|
const t = it(i);
|
|
490
|
-
if (t.grouping &&
|
|
491
|
-
const o =
|
|
490
|
+
if (t.grouping && Q.length) {
|
|
491
|
+
const o = Q.find(({ vnode: s }) => {
|
|
492
492
|
var a;
|
|
493
493
|
return ((a = s.props) == null ? void 0 : a.message) === t.message;
|
|
494
494
|
});
|
|
495
495
|
if (o)
|
|
496
496
|
return o.props.repeatNum += 1, o.props.type = t.type, o.handler;
|
|
497
497
|
}
|
|
498
|
-
if (
|
|
498
|
+
if (ve(K.max) && Q.length >= K.max)
|
|
499
499
|
return { close: () => {
|
|
500
500
|
} };
|
|
501
|
-
const n =
|
|
502
|
-
return
|
|
501
|
+
const n = pn(t, e);
|
|
502
|
+
return Q.push(n), n.handler;
|
|
503
503
|
};
|
|
504
504
|
at.forEach((i) => {
|
|
505
505
|
le[i] = (e = {}, t) => {
|
|
@@ -507,15 +507,15 @@ at.forEach((i) => {
|
|
|
507
507
|
return le({ ...n, type: i }, t);
|
|
508
508
|
};
|
|
509
509
|
});
|
|
510
|
-
function
|
|
511
|
-
const e = [...
|
|
510
|
+
function gn(i) {
|
|
511
|
+
const e = [...Q];
|
|
512
512
|
for (const t of e)
|
|
513
513
|
(!i || i === t.props.type) && t.handler.close();
|
|
514
514
|
}
|
|
515
|
-
le.closeAll =
|
|
515
|
+
le.closeAll = gn;
|
|
516
516
|
le._context = null;
|
|
517
|
-
const
|
|
518
|
-
class
|
|
517
|
+
const L = Lt(le, "$message");
|
|
518
|
+
class N extends Ce {
|
|
519
519
|
_renderer;
|
|
520
520
|
get renderer() {
|
|
521
521
|
return this._renderer || (this._renderer = this.parent?.findComponentByName("Renderer")), this._renderer;
|
|
@@ -598,7 +598,7 @@ class V extends Ee {
|
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
class
|
|
601
|
+
class vn extends N {
|
|
602
602
|
static name = "DrawLine";
|
|
603
603
|
container = new m.Group();
|
|
604
604
|
interruptKeys = ["escape"];
|
|
@@ -615,7 +615,7 @@ class pn extends V {
|
|
|
615
615
|
* @param next
|
|
616
616
|
*/
|
|
617
617
|
selectPoint(e) {
|
|
618
|
-
let t = this.parent?.findComponentByName("Editor"), n = null, o = null, s = [], a = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), r = t.domContainer.domElement, l = new
|
|
618
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, o = null, s = [], a = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), r = t.domContainer.domElement, l = new fe([], 16711935), d = new fe([
|
|
619
619
|
new m.Vector3(-1e4, 0, 0),
|
|
620
620
|
new m.Vector3(1e4, 0, 0),
|
|
621
621
|
new m.Vector3(0, -1e4, 0),
|
|
@@ -633,11 +633,11 @@ class pn extends V {
|
|
|
633
633
|
this.addEventRecord(
|
|
634
634
|
"clear",
|
|
635
635
|
t.addEventListener("pointerPositionChange", () => {
|
|
636
|
-
const { point:
|
|
637
|
-
if (this.dispatchEvent({ type: "pointerMove", point:
|
|
636
|
+
const { point: f, find: y } = t.renderManager.adsorption();
|
|
637
|
+
if (this.dispatchEvent({ type: "pointerMove", point: f }), y ? (a.position.set(f.x, f.y, 0), this.container.add(a), r.style.cursor = "none") : (a.removeFromParent(), r.style.cursor = "crosshair"), h.copy(f), !!(n && o)) {
|
|
638
638
|
if (t.eventInput.isKeyDown("shift")) {
|
|
639
|
-
const b = Math.abs(t.pointerPosition.x - n.x),
|
|
640
|
-
b >
|
|
639
|
+
const b = Math.abs(t.pointerPosition.x - n.x), w = Math.abs(t.pointerPosition.y - n.y);
|
|
640
|
+
b > w ? o.set(t.pointerPosition.x, n.y, 0) : o.set(n.x, t.pointerPosition.y, 0), c(), h.copy(o);
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
643
|
o.set(t.pointerPosition.x, t.pointerPosition.y, 0), c();
|
|
@@ -652,8 +652,8 @@ class pn extends V {
|
|
|
652
652
|
o = h.clone(), s.push(n.clone(), o.clone()), n.copy(o), c();
|
|
653
653
|
} else if (t.eventInput.isOnlyKeyDowns(this.withdrawalKeys)) {
|
|
654
654
|
if (s.length) {
|
|
655
|
-
const { point:
|
|
656
|
-
s.pop(), o?.copy(
|
|
655
|
+
const { point: f } = t.renderManager.adsorption();
|
|
656
|
+
s.pop(), o?.copy(f), n?.copy(s.pop()), c();
|
|
657
657
|
}
|
|
658
658
|
} else t.eventInput.isKeyDowns(this.confirmKeys) && e(s);
|
|
659
659
|
}),
|
|
@@ -668,7 +668,7 @@ class pn extends V {
|
|
|
668
668
|
end(e, t) {
|
|
669
669
|
const n = [];
|
|
670
670
|
for (let o = 0; o < t.length; o += 2)
|
|
671
|
-
n.push(new
|
|
671
|
+
n.push(new W(V.from(t[o]), V.from(t[o + 1])));
|
|
672
672
|
e(n);
|
|
673
673
|
}
|
|
674
674
|
/** 执行完成
|
|
@@ -690,7 +690,7 @@ class pn extends V {
|
|
|
690
690
|
return this.completed(e), e;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
class
|
|
693
|
+
class Se extends Ce {
|
|
694
694
|
static name = "Default";
|
|
695
695
|
get editor() {
|
|
696
696
|
return this.parent?.findComponentByName("Editor");
|
|
@@ -758,35 +758,35 @@ class Be extends Ee {
|
|
|
758
758
|
opacity: 0.5
|
|
759
759
|
});
|
|
760
760
|
const c = () => {
|
|
761
|
-
const
|
|
762
|
-
|
|
763
|
-
|
|
761
|
+
const y = Math.min(r.x, l.x), b = Math.max(r.x, l.x), w = Math.min(r.y, l.y), E = Math.max(r.y, l.y), C = [
|
|
762
|
+
y,
|
|
763
|
+
E,
|
|
764
764
|
0,
|
|
765
765
|
b,
|
|
766
|
-
|
|
766
|
+
w,
|
|
767
767
|
0,
|
|
768
768
|
b,
|
|
769
|
-
|
|
769
|
+
E,
|
|
770
770
|
0,
|
|
771
|
-
|
|
772
|
-
|
|
771
|
+
y,
|
|
772
|
+
E,
|
|
773
773
|
0,
|
|
774
|
+
y,
|
|
774
775
|
w,
|
|
775
|
-
f,
|
|
776
776
|
0,
|
|
777
777
|
b,
|
|
778
|
-
|
|
778
|
+
w,
|
|
779
779
|
0
|
|
780
780
|
];
|
|
781
|
-
d.geometry = e.renderManager.createGeometry({ position:
|
|
781
|
+
d.geometry = e.renderManager.createGeometry({ position: C }, C.length / 3);
|
|
782
782
|
}, h = () => {
|
|
783
783
|
l.copy(e.pointerPosition), c();
|
|
784
|
-
},
|
|
785
|
-
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup",
|
|
786
|
-
const
|
|
787
|
-
this.removeSelectLineAll(),
|
|
784
|
+
}, f = () => {
|
|
785
|
+
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", f), d.removeFromParent();
|
|
786
|
+
const y = Math.min(r.x, l.x), b = Math.max(r.x, l.x), w = Math.min(r.y, l.y), E = Math.max(r.y, l.y), C = new Ye(y, b, w, E), D = e.renderManager.quadtree.queryBox(C);
|
|
787
|
+
this.removeSelectLineAll(), D.forEach((R) => this.addSelectLine(R.line)), this.updateSelectLinesGeometry();
|
|
788
788
|
};
|
|
789
|
-
document.addEventListener("mousemove", h), document.addEventListener("mouseup",
|
|
789
|
+
document.addEventListener("mousemove", h), document.addEventListener("mouseup", f);
|
|
790
790
|
};
|
|
791
791
|
this.addEventRecord(
|
|
792
792
|
"clear",
|
|
@@ -825,7 +825,7 @@ class Be extends Ee {
|
|
|
825
825
|
this.canceEventRecord("clear"), this.removeSelectLineAll(), this.updateSelectLinesGeometry();
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
class
|
|
828
|
+
class fn extends Xe {
|
|
829
829
|
list = [];
|
|
830
830
|
rollbacklist = [];
|
|
831
831
|
revokeRollbacklist = [];
|
|
@@ -853,7 +853,7 @@ class gn extends Xe {
|
|
|
853
853
|
return this.revokeRollbacklist.push(e), this;
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
class
|
|
856
|
+
class yn extends Xe {
|
|
857
857
|
commandFlowMap = /* @__PURE__ */ new Map();
|
|
858
858
|
lock = !1;
|
|
859
859
|
abortController = null;
|
|
@@ -880,7 +880,7 @@ class vn extends Xe {
|
|
|
880
880
|
*/
|
|
881
881
|
addCommandFlow(e) {
|
|
882
882
|
if (this.commandFlowMap.has(e)) throw new Error(`${e} 命令已经存在`);
|
|
883
|
-
const t = new
|
|
883
|
+
const t = new fn();
|
|
884
884
|
return this.commandFlowMap.set(e, t), t;
|
|
885
885
|
}
|
|
886
886
|
executionPromise = null;
|
|
@@ -958,57 +958,63 @@ class vn extends Xe {
|
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
const
|
|
962
|
-
__proto__: null,
|
|
963
|
-
default: fn
|
|
964
|
-
}, Symbol.toStringTag, { value: "Module" })), wn = "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", bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
961
|
+
const wn = "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", bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
965
962
|
__proto__: null,
|
|
966
963
|
default: wn
|
|
967
|
-
}, 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='
|
|
964
|
+
}, 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({
|
|
968
965
|
__proto__: null,
|
|
969
966
|
default: Cn
|
|
970
|
-
}, 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='
|
|
967
|
+
}, Symbol.toStringTag, { value: "Module" })), En = "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", Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
971
968
|
__proto__: null,
|
|
972
969
|
default: En
|
|
973
|
-
}, Symbol.toStringTag, { value: "Module" })), Ln = "data:image/svg+xml,%
|
|
970
|
+
}, 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='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", kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
974
971
|
__proto__: null,
|
|
975
972
|
default: Ln
|
|
976
|
-
}, 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='
|
|
973
|
+
}, 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='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", Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
977
974
|
__proto__: null,
|
|
978
975
|
default: In
|
|
979
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
980
|
-
__proto__: null,
|
|
981
|
-
default: Pn
|
|
982
|
-
}, Symbol.toStringTag, { value: "Module" })), Sn = "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", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
976
|
+
}, Symbol.toStringTag, { value: "Module" })), Dn = "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", An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
983
977
|
__proto__: null,
|
|
984
|
-
default:
|
|
985
|
-
}, Symbol.toStringTag, { value: "Module" })), _n = "data:image/svg+xml,%3csvg%20viewBox='0%200%
|
|
978
|
+
default: Dn
|
|
979
|
+
}, Symbol.toStringTag, { value: "Module" })), _n = "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", Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
986
980
|
__proto__: null,
|
|
987
981
|
default: _n
|
|
988
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
982
|
+
}, Symbol.toStringTag, { value: "Module" })), Bn = "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", Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
989
983
|
__proto__: null,
|
|
990
|
-
default:
|
|
991
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
984
|
+
default: Bn
|
|
985
|
+
}, Symbol.toStringTag, { value: "Module" })), Rn = "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", On = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
992
986
|
__proto__: null,
|
|
993
|
-
default:
|
|
994
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
987
|
+
default: Rn
|
|
988
|
+
}, Symbol.toStringTag, { value: "Module" })), Fn = "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", Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
989
|
+
__proto__: null,
|
|
990
|
+
default: Fn
|
|
991
|
+
}, Symbol.toStringTag, { value: "Module" })), zn = "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", Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
995
992
|
__proto__: null,
|
|
996
993
|
default: zn
|
|
997
|
-
}, Symbol.toStringTag, { value: "Module" })), Vn = "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='
|
|
994
|
+
}, Symbol.toStringTag, { value: "Module" })), Vn = "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", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
998
995
|
__proto__: null,
|
|
999
996
|
default: Vn
|
|
1000
|
-
}, Symbol.toStringTag, { value: "Module" })), Gn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='
|
|
997
|
+
}, Symbol.toStringTag, { value: "Module" })), Gn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='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", Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1001
998
|
__proto__: null,
|
|
1002
999
|
default: Gn
|
|
1003
|
-
}, Symbol.toStringTag, { value: "Module" })), Hn = "data:image/
|
|
1004
|
-
|
|
1000
|
+
}, 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='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", Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1001
|
+
__proto__: null,
|
|
1002
|
+
default: Hn
|
|
1003
|
+
}, Symbol.toStringTag, { value: "Module" })), Un = "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", Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1004
|
+
__proto__: null,
|
|
1005
|
+
default: Un
|
|
1006
|
+
}, 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='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", Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1007
|
+
__proto__: null,
|
|
1008
|
+
default: qn
|
|
1009
|
+
}, Symbol.toStringTag, { value: "Module" })), Yn = "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==", Xn = new m.TextureLoader(), $n = Xn.load(Yn);
|
|
1010
|
+
class eo extends Ce {
|
|
1005
1011
|
static name = "RenderManager";
|
|
1006
1012
|
container = new m.Group();
|
|
1007
1013
|
lines = [];
|
|
1008
|
-
pointVirtualGrid = new
|
|
1014
|
+
pointVirtualGrid = new Ke();
|
|
1009
1015
|
quadtree = new ze(new Ye());
|
|
1010
1016
|
actionHistory = /* @__PURE__ */ new Set();
|
|
1011
|
-
verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map:
|
|
1017
|
+
verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: $n, color: 58111, transparent: !0 }));
|
|
1012
1018
|
onAddFromParent() {
|
|
1013
1019
|
const e = this.dxfLineModel;
|
|
1014
1020
|
this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new m.LineBasicMaterial({
|
|
@@ -1028,10 +1034,10 @@ class Un extends Ee {
|
|
|
1028
1034
|
return;
|
|
1029
1035
|
} else
|
|
1030
1036
|
this.updatedMode = "dxf";
|
|
1031
|
-
this.pointVirtualGrid = new
|
|
1037
|
+
this.pointVirtualGrid = new Ke();
|
|
1032
1038
|
const e = this.dxf.box.clone().expansion(Math.max(this.dxf.box.width, this.dxf.box.height) * 2);
|
|
1033
1039
|
(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) => {
|
|
1034
|
-
t.userData.isDoor
|
|
1040
|
+
t.userData.isDoor || this.addLine(t.clone());
|
|
1035
1041
|
}), this.dxf.doorLineSegment.forEach((t) => {
|
|
1036
1042
|
const n = t.clone();
|
|
1037
1043
|
n.userData = {
|
|
@@ -1094,7 +1100,7 @@ class Un extends Ee {
|
|
|
1094
1100
|
if (s.points.forEach((a) => {
|
|
1095
1101
|
s.userData.isDoor ? n.push(a.x, a.y, 0) : t.push(a.x, a.y, 0);
|
|
1096
1102
|
}), s.userData.isWindow && s.userData.drawWindow && s.userData.drawWindow.forEach(({ width: a, p: r }) => {
|
|
1097
|
-
const l =
|
|
1103
|
+
const l = V.from(r), d = s.direction(), c = l.clone().add(d.clone().multiplyScalar(a * 0.5)), h = l.clone().add(d.clone().multiplyScalar(-a * 0.5));
|
|
1098
1104
|
o.push(c.x, c.y, 1e-3), o.push(h.x, h.y, 1e-3);
|
|
1099
1105
|
}), s.userData.isVerticalReferenceLine) {
|
|
1100
1106
|
const a = s.center;
|
|
@@ -1119,7 +1125,7 @@ class Un extends Ee {
|
|
|
1119
1125
|
* @returns
|
|
1120
1126
|
*/
|
|
1121
1127
|
adsorption(e = 0.1, t = this.pointVirtualGrid, n = this.quadtree) {
|
|
1122
|
-
const o = this.parent?.findComponentByName("Editor"), s =
|
|
1128
|
+
const o = this.parent?.findComponentByName("Editor"), s = V.from(o.pointerPosition), a = t.queryCircle(s, e).sort((l, d) => l.point.distance(s) - d.point.distance(s));
|
|
1123
1129
|
if (a.length) return {
|
|
1124
1130
|
point: new m.Vector3(a[0].point.x, a[0].point.y, 0),
|
|
1125
1131
|
find: !0,
|
|
@@ -1209,7 +1215,7 @@ class Un extends Ee {
|
|
|
1209
1215
|
return this.parent?.findComponentByName("DxfLineModel");
|
|
1210
1216
|
}
|
|
1211
1217
|
}
|
|
1212
|
-
class
|
|
1218
|
+
class to extends N {
|
|
1213
1219
|
static name = "DrawDoorLine";
|
|
1214
1220
|
container = new m.Group();
|
|
1215
1221
|
interruptKeys = ["escape"];
|
|
@@ -1228,7 +1234,7 @@ class qn extends V {
|
|
|
1228
1234
|
* @param next
|
|
1229
1235
|
*/
|
|
1230
1236
|
selectPoint(e) {
|
|
1231
|
-
let t = this.parent?.findComponentByName("Editor"), n = null, o = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), s = new
|
|
1237
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, o = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 65280 })), s = new fe([], 16711935), a = new fe([
|
|
1232
1238
|
new m.Vector3(-1e4, 0, 0),
|
|
1233
1239
|
new m.Vector3(1e4, 0, 0),
|
|
1234
1240
|
new m.Vector3(0, -1e4, 0),
|
|
@@ -1269,31 +1275,51 @@ class qn extends V {
|
|
|
1269
1275
|
end(e, t) {
|
|
1270
1276
|
const n = [];
|
|
1271
1277
|
for (let o = 0; o < t.length; o += 2) {
|
|
1272
|
-
const s =
|
|
1273
|
-
|
|
1278
|
+
const s = V.from(t[o]), a = V.from(t[o + 1]), r = this.renderManager.quadtree.queryCircle(s, 1e-3)[0].line, l = this.renderManager.quadtree.queryCircle(a, 1e-3)[0].line;
|
|
1279
|
+
let d = null;
|
|
1280
|
+
r === l && (d = {
|
|
1281
|
+
oldLine: r,
|
|
1282
|
+
newLine1: new W(
|
|
1283
|
+
r.start,
|
|
1284
|
+
r.start.distance(s) < r.start.distance(a) ? s.clone() : a.clone()
|
|
1285
|
+
),
|
|
1286
|
+
newLine2: new W(
|
|
1287
|
+
r.end,
|
|
1288
|
+
r.end.distance(s) < r.end.distance(a) ? s.clone() : a.clone()
|
|
1289
|
+
)
|
|
1290
|
+
});
|
|
1291
|
+
const c = new W(s, a);
|
|
1292
|
+
c.userData.isDoor = !0, c.userData.doorDirectConnection = !0, n.push({
|
|
1293
|
+
line: c,
|
|
1294
|
+
option: d
|
|
1295
|
+
});
|
|
1274
1296
|
}
|
|
1275
1297
|
e(n);
|
|
1276
1298
|
}
|
|
1277
1299
|
/** 执行完成
|
|
1278
1300
|
*/
|
|
1279
1301
|
completed(e) {
|
|
1280
|
-
|
|
1302
|
+
e.forEach(({ line: t, option: n }) => {
|
|
1303
|
+
this.renderManager.addLine(t), n && (this.renderManager.removeLine(n.oldLine), this.renderManager.addLines([n.newLine1, n.newLine2]));
|
|
1304
|
+
}), this.renderManager.draw();
|
|
1281
1305
|
}
|
|
1282
1306
|
/** 回滚操作
|
|
1283
1307
|
* @param data
|
|
1284
1308
|
*/
|
|
1285
1309
|
rollback(e) {
|
|
1286
|
-
return e.forEach((
|
|
1310
|
+
return e.forEach(({ line: t, option: n }) => {
|
|
1311
|
+
this.renderManager.removeLine(t), n && (this.renderManager.addLine(n.oldLine), this.renderManager.removeLine(n.newLine1), this.renderManager.removeLine(n.newLine2));
|
|
1312
|
+
}), this.renderManager.draw(), e;
|
|
1287
1313
|
}
|
|
1288
1314
|
/** 撤回回滚
|
|
1289
|
-
* @param
|
|
1315
|
+
* @param data
|
|
1290
1316
|
* @returns
|
|
1291
1317
|
*/
|
|
1292
1318
|
revokeRollback(e) {
|
|
1293
1319
|
return this.completed(e), e;
|
|
1294
1320
|
}
|
|
1295
1321
|
}
|
|
1296
|
-
class
|
|
1322
|
+
class no extends N {
|
|
1297
1323
|
static name = "DrawWindow";
|
|
1298
1324
|
container = new m.Group();
|
|
1299
1325
|
interruptKeys = ["escape"];
|
|
@@ -1334,7 +1360,7 @@ class Zn extends V {
|
|
|
1334
1360
|
* @param points
|
|
1335
1361
|
*/
|
|
1336
1362
|
end(e, { start: t, end: n, line: o }) {
|
|
1337
|
-
const s = new
|
|
1363
|
+
const s = new W(V.from(t), V.from(n)), a = s.center, r = s.length(), l = {
|
|
1338
1364
|
p: new m.Vector3(a.x, a.y, 0),
|
|
1339
1365
|
width: r,
|
|
1340
1366
|
full: Math.abs(r - o.length()) < 0.01
|
|
@@ -1365,7 +1391,7 @@ class Zn extends V {
|
|
|
1365
1391
|
return this.completed(e), e;
|
|
1366
1392
|
}
|
|
1367
1393
|
}
|
|
1368
|
-
class de extends
|
|
1394
|
+
class de extends N {
|
|
1369
1395
|
static name = "VerticalCorrection";
|
|
1370
1396
|
container = new m.Group();
|
|
1371
1397
|
shortcutKeys = ["control", "c"];
|
|
@@ -1385,7 +1411,7 @@ class de extends V {
|
|
|
1385
1411
|
* 进入命令约束
|
|
1386
1412
|
*/
|
|
1387
1413
|
constraint(e, t) {
|
|
1388
|
-
Array.isArray(t) ? t.length !== 1 ? (
|
|
1414
|
+
Array.isArray(t) ? t.length !== 1 ? (L({ message: "请选择一条线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1389
1415
|
}
|
|
1390
1416
|
/**
|
|
1391
1417
|
* 线段是否为结尾线段
|
|
@@ -1406,31 +1432,56 @@ class de extends V {
|
|
|
1406
1432
|
isTowLineSegmentConnect(e, t) {
|
|
1407
1433
|
return !!(e.start.equal(t.start) || e.start.equal(t.end) || e.end.equal(t.start) || e.end.equal(t.end));
|
|
1408
1434
|
}
|
|
1409
|
-
/**
|
|
1410
|
-
* 获取所有相同点的位置信息
|
|
1411
|
-
* @param point
|
|
1412
|
-
* @param point2
|
|
1413
|
-
*/
|
|
1414
|
-
getSamePointAll(e, t) {
|
|
1415
|
-
const n = this.renderManager.pointVirtualGrid.queryPoint(e), o = n.filter((s) => t !== s.userData && s.userData?.directionEqual(t));
|
|
1416
|
-
return {
|
|
1417
|
-
queryList: n,
|
|
1418
|
-
parallelList: o
|
|
1419
|
-
};
|
|
1420
|
-
}
|
|
1421
1435
|
/**
|
|
1422
1436
|
*
|
|
1423
1437
|
* @param line
|
|
1424
|
-
* @param
|
|
1425
|
-
* @param
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1438
|
+
* @param newStartPoint
|
|
1439
|
+
* @param newEndPoint
|
|
1440
|
+
* @param mode 需要匹配的点
|
|
1441
|
+
* @param record
|
|
1442
|
+
* @param id
|
|
1443
|
+
* @returns
|
|
1444
|
+
*/
|
|
1445
|
+
setLinePoint(e, t, n, o = "all", s = [], a = Pt()) {
|
|
1446
|
+
if (e.userData.setLinePointUUid === a) return s;
|
|
1447
|
+
e.userData.setLinePointUUid = a;
|
|
1448
|
+
let r = [], l = [];
|
|
1449
|
+
(o === "start" || o === "all") && (r = this.renderManager.pointVirtualGrid.queryPoint(e.start).filter((f) => f.userData !== e)), (o === "end" || o === "all") && (l = this.renderManager.pointVirtualGrid.queryPoint(e.end).filter((f) => f.userData !== e));
|
|
1450
|
+
const d = e.clone();
|
|
1451
|
+
let c = "";
|
|
1452
|
+
t && (e.start.equal(t) || (c = "start"), s.push({
|
|
1453
|
+
point: e.start,
|
|
1454
|
+
oldPoint: e.start.clone(),
|
|
1455
|
+
newPoint: t,
|
|
1456
|
+
line: e
|
|
1457
|
+
}), e.start.copy(t)), n && (e.end.equal(n) || (c = c === "start" ? "all" : "end"), s.push({
|
|
1458
|
+
point: e.end,
|
|
1459
|
+
oldPoint: e.end.clone(),
|
|
1460
|
+
newPoint: n,
|
|
1461
|
+
line: e
|
|
1462
|
+
}), e.end.copy(n));
|
|
1463
|
+
const h = (f, y, b) => {
|
|
1464
|
+
f.forEach((w) => {
|
|
1465
|
+
const { point: E, userData: C } = w, D = C.start === E ? "start" : "end";
|
|
1466
|
+
if (C.directionEqual(d))
|
|
1467
|
+
if (D === "start") {
|
|
1468
|
+
const R = e.projectPoint(C.end, !1);
|
|
1469
|
+
if (R) return this.setLinePoint(C, y, R, "end", s, a);
|
|
1470
|
+
} else {
|
|
1471
|
+
const R = e.projectPoint(C.start, !1);
|
|
1472
|
+
if (R) return this.setLinePoint(C, R, y, "start", s, a);
|
|
1473
|
+
}
|
|
1474
|
+
(c === "all" || b === c) && this.setLinePoint(
|
|
1475
|
+
C,
|
|
1476
|
+
C.start === E ? y : C.start,
|
|
1477
|
+
C.end === E ? y : C.end,
|
|
1478
|
+
C.start === E ? "end" : "start",
|
|
1479
|
+
s,
|
|
1480
|
+
a
|
|
1481
|
+
);
|
|
1482
|
+
});
|
|
1483
|
+
};
|
|
1484
|
+
return h(r, e.start, "start"), h(l, e.end, "end"), s;
|
|
1434
1485
|
}
|
|
1435
1486
|
/** 修正2
|
|
1436
1487
|
* 第一步:确定需要修复的线段
|
|
@@ -1446,55 +1497,27 @@ class de extends V {
|
|
|
1446
1497
|
if (o.has(e)) return;
|
|
1447
1498
|
o.add(e);
|
|
1448
1499
|
const s = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: d }) => !(d === e || d.userData.isDoor || o.has(d))).map((d) => d.line), a = e.direction(), [r, l] = s.reduce((d, c) => {
|
|
1449
|
-
const [h,
|
|
1450
|
-
return t && (c.start.equal(t) || c.end.equal(t)) || (e.sameEndpoint(c) ? h.push(c) :
|
|
1500
|
+
const [h, f] = d;
|
|
1501
|
+
return t && (c.start.equal(t) || c.end.equal(t)) || (e.sameEndpoint(c) ? h.push(c) : f.push(c)), d;
|
|
1451
1502
|
}, [[], []]);
|
|
1452
1503
|
return r.filter((d) => {
|
|
1453
1504
|
const c = d.direction(), h = a.angleBetween(c, "angle");
|
|
1454
1505
|
if (Math.abs(90 - h) > 20) return !1;
|
|
1455
|
-
const
|
|
1506
|
+
const y = e.sameEndpointAsStart(d) ? e.start : e.end, b = d.sameEndpointAsStart(e) ? d.end : d.start;
|
|
1456
1507
|
if (o.has(b))
|
|
1457
1508
|
return !1;
|
|
1458
|
-
const
|
|
1509
|
+
const w = new W(
|
|
1459
1510
|
b.clone().add(a.clone().multiplyScalar(1)),
|
|
1460
1511
|
b.clone().add(a.clone().multiplyScalar(-1))
|
|
1461
|
-
),
|
|
1462
|
-
if (
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
return o.add(E.point), K;
|
|
1471
|
-
});
|
|
1472
|
-
if (A.length) {
|
|
1473
|
-
let E = A[0].userData, K = d, k = d.clone();
|
|
1474
|
-
k.start.equal(b) ? k.start.copy(M) : k.end.copy(M);
|
|
1475
|
-
const x = /* @__PURE__ */ new Set();
|
|
1476
|
-
for (; E && !x.has(E); ) {
|
|
1477
|
-
x.add(E);
|
|
1478
|
-
const _ = E.sameEndpointAsStart(K) ? E.end : E.start, p = k.projectPoint(_, !1);
|
|
1479
|
-
if (p) {
|
|
1480
|
-
const { queryList: U, parallelList: R } = this.getSamePointAll(_, E);
|
|
1481
|
-
if (K = E.clone(), U.forEach((Y) => {
|
|
1482
|
-
const he = {
|
|
1483
|
-
point: Y.point,
|
|
1484
|
-
oldPoint: Y.point.clone(),
|
|
1485
|
-
newPoint: p,
|
|
1486
|
-
line: Y.userData
|
|
1487
|
-
};
|
|
1488
|
-
G.push(he);
|
|
1489
|
-
}), R.length) {
|
|
1490
|
-
E = R[0].userData;
|
|
1491
|
-
continue;
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
E = null;
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
G.map((E) => E.point.copy(E.newPoint)), n.push(G);
|
|
1512
|
+
), E = w.projectPoint(y, !1);
|
|
1513
|
+
if (E) {
|
|
1514
|
+
const C = this.setLinePoint(
|
|
1515
|
+
d,
|
|
1516
|
+
d.start === b ? E : d.start,
|
|
1517
|
+
d.end === b ? E : d.end,
|
|
1518
|
+
d.start === b ? "start" : "end"
|
|
1519
|
+
);
|
|
1520
|
+
n.push(C);
|
|
1498
1521
|
}
|
|
1499
1522
|
return !1;
|
|
1500
1523
|
}), this.recursion && s.forEach((d) => this.correction(d, void 0, n, o)), n;
|
|
@@ -1537,22 +1560,22 @@ class de extends V {
|
|
|
1537
1560
|
return this.completed(e), e;
|
|
1538
1561
|
}
|
|
1539
1562
|
}
|
|
1540
|
-
class
|
|
1563
|
+
class Y extends N {
|
|
1541
1564
|
static name = "MergeLine";
|
|
1542
1565
|
shortcutKeys = ["control", "g"];
|
|
1543
1566
|
static commandName = "merge-line";
|
|
1544
1567
|
onAddFromParent(e) {
|
|
1545
1568
|
super.onAddFromParent(e);
|
|
1546
|
-
const t = e.findComponentByType(
|
|
1547
|
-
n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (o) => this.completed(o.data)), this.eventInput.addKeyCombination(
|
|
1548
|
-
t?.selectLines.length === 2 && this.eventInput.isKeyCombination(
|
|
1569
|
+
const t = e.findComponentByType(Se), n = this.commandManager.addCommandFlow(Y.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.mergeLine.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1570
|
+
n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (o) => this.completed(o.data)), this.eventInput.addKeyCombination(Y.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1571
|
+
t?.selectLines.length === 2 && this.eventInput.isKeyCombination(Y.commandName) && await this.commandManager.start(Y.commandName, [...this.default.selectLines]);
|
|
1549
1572
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1550
1573
|
}
|
|
1551
1574
|
/**
|
|
1552
1575
|
* 进入命令约束
|
|
1553
1576
|
*/
|
|
1554
1577
|
constraint(e, t) {
|
|
1555
|
-
Array.isArray(t) ? t.length !== 2 ? (
|
|
1578
|
+
Array.isArray(t) ? t.length !== 2 ? (L({ message: "未执行线段合并,请选择两条线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1556
1579
|
}
|
|
1557
1580
|
/** 开始
|
|
1558
1581
|
* @param next
|
|
@@ -1565,12 +1588,12 @@ class X extends V {
|
|
|
1565
1588
|
for (let r = 0; r < o.points.length; r++) {
|
|
1566
1589
|
const l = o.points[r];
|
|
1567
1590
|
if (a.equal(l)) {
|
|
1568
|
-
const d = n.points[(s + 1) % 2], c = o.points[(r + 1) % 2], h = new
|
|
1569
|
-
return e({ line1: n, line2: o, newLine: h }),
|
|
1591
|
+
const d = n.points[(s + 1) % 2], c = o.points[(r + 1) % 2], h = new W(d, c);
|
|
1592
|
+
return e({ line1: n, line2: o, newLine: h }), L({ message: "已合并", type: "success" });
|
|
1570
1593
|
}
|
|
1571
1594
|
}
|
|
1572
1595
|
}
|
|
1573
|
-
|
|
1596
|
+
L({ message: "合并失败,两条线未找到共用点", type: "warning" }), this.commandManager.cancel();
|
|
1574
1597
|
}
|
|
1575
1598
|
/** 执行完成
|
|
1576
1599
|
* @param data
|
|
@@ -1592,26 +1615,26 @@ class X extends V {
|
|
|
1592
1615
|
return this.completed(e), e;
|
|
1593
1616
|
}
|
|
1594
1617
|
}
|
|
1595
|
-
class
|
|
1618
|
+
class X extends N {
|
|
1596
1619
|
static name = "DeleteSelectLine";
|
|
1597
1620
|
shortcutKeys = ["Delete"];
|
|
1598
1621
|
static commandName = "deleteSelectLine";
|
|
1599
1622
|
onAddFromParent(e) {
|
|
1600
|
-
super.onAddFromParent(e), this.commandManager.addCommandFlow(
|
|
1601
|
-
this.eventInput.isKeyCombination(
|
|
1623
|
+
super.onAddFromParent(e), this.commandManager.addCommandFlow(X.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(X.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1624
|
+
this.eventInput.isKeyCombination(X.commandName) && await this.commandManager.start(X.commandName, [...this.default.selectLines]);
|
|
1602
1625
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1603
1626
|
}
|
|
1604
1627
|
/**
|
|
1605
1628
|
* 进入命令约束
|
|
1606
1629
|
*/
|
|
1607
1630
|
constraint(e, t) {
|
|
1608
|
-
Array.isArray(t) ? t.length === 0 ? (
|
|
1631
|
+
Array.isArray(t) ? t.length === 0 ? (L({ message: "请选择线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1609
1632
|
}
|
|
1610
1633
|
/** 开始
|
|
1611
1634
|
* @param next
|
|
1612
1635
|
*/
|
|
1613
1636
|
delete(e, t) {
|
|
1614
|
-
t.forEach((n) => this.renderManager.removeLine(n)),
|
|
1637
|
+
t.forEach((n) => this.renderManager.removeLine(n)), L({ message: "删除成功", type: "success" }), e(t);
|
|
1615
1638
|
}
|
|
1616
1639
|
/** 回滚操作
|
|
1617
1640
|
* @param data
|
|
@@ -1627,22 +1650,22 @@ class $ extends V {
|
|
|
1627
1650
|
return e.forEach((t) => this.renderManager.removeLine(t)), e;
|
|
1628
1651
|
}
|
|
1629
1652
|
}
|
|
1630
|
-
class
|
|
1653
|
+
class $ extends N {
|
|
1631
1654
|
static name = "ConnectionLine";
|
|
1632
1655
|
shortcutKeys = ["Shift", "L"];
|
|
1633
1656
|
static commandName = "connectionLine";
|
|
1634
1657
|
onAddFromParent(e) {
|
|
1635
1658
|
super.onAddFromParent(e);
|
|
1636
|
-
const t = this.commandManager.addCommandFlow(
|
|
1637
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1638
|
-
this.eventInput.isKeyCombination(
|
|
1659
|
+
const t = this.commandManager.addCommandFlow($.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1660
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination($.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1661
|
+
this.eventInput.isKeyCombination($.commandName) && await this.commandManager.start($.commandName, [...this.default.selectLines]);
|
|
1639
1662
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1640
1663
|
}
|
|
1641
1664
|
/**
|
|
1642
1665
|
* 进入命令约束
|
|
1643
1666
|
*/
|
|
1644
1667
|
constraint(e, t) {
|
|
1645
|
-
Array.isArray(t) ? t.length !== 2 ? (
|
|
1668
|
+
Array.isArray(t) ? t.length !== 2 ? (L({ message: "请选择2条线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1646
1669
|
}
|
|
1647
1670
|
/** 连接
|
|
1648
1671
|
* @param next
|
|
@@ -1655,8 +1678,8 @@ class ee extends V {
|
|
|
1655
1678
|
c < s && (n = l, o = d, s = c);
|
|
1656
1679
|
}
|
|
1657
1680
|
if (n && o) {
|
|
1658
|
-
const a = new
|
|
1659
|
-
e(a),
|
|
1681
|
+
const a = new W(n.clone(), o.clone());
|
|
1682
|
+
e(a), L({ message: "连接成功", type: "success" });
|
|
1660
1683
|
} else this.cancel();
|
|
1661
1684
|
}
|
|
1662
1685
|
/** 成功
|
|
@@ -1680,22 +1703,22 @@ class ee extends V {
|
|
|
1680
1703
|
return this.completed(e), e;
|
|
1681
1704
|
}
|
|
1682
1705
|
}
|
|
1683
|
-
class
|
|
1706
|
+
class ee extends N {
|
|
1684
1707
|
static name = "IntersectionConnectionLine";
|
|
1685
1708
|
shortcutKeys = ["control", "Shift", "L"];
|
|
1686
1709
|
static commandName = "intersectionConnectionLine";
|
|
1687
1710
|
onAddFromParent(e) {
|
|
1688
1711
|
super.onAddFromParent(e);
|
|
1689
|
-
const t = this.commandManager.addCommandFlow(
|
|
1690
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1691
|
-
this.eventInput.isKeyCombination(
|
|
1712
|
+
const t = this.commandManager.addCommandFlow(ee.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1713
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ee.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1714
|
+
this.eventInput.isKeyCombination(ee.commandName) && await this.commandManager.start(ee.commandName, [...this.default.selectLines]);
|
|
1692
1715
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1693
1716
|
}
|
|
1694
1717
|
/**
|
|
1695
1718
|
* 进入命令约束
|
|
1696
1719
|
*/
|
|
1697
1720
|
constraint(e, t) {
|
|
1698
|
-
Array.isArray(t) ? t.length !== 2 ? (
|
|
1721
|
+
Array.isArray(t) ? t.length !== 2 ? (L({ message: "请选择2条线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1699
1722
|
}
|
|
1700
1723
|
/** 开始
|
|
1701
1724
|
* @param next
|
|
@@ -1706,7 +1729,7 @@ class te extends V {
|
|
|
1706
1729
|
const a = n.points.map((c) => c.clone()), r = o.points.map((c) => c.clone());
|
|
1707
1730
|
n.start.distance(s) < n.end.distance(s) ? n.start.copy(s) : n.end.copy(s), o.start.distance(s) < o.end.distance(s) ? o.start.copy(s) : o.end.copy(s);
|
|
1708
1731
|
const l = n.points.map((c) => c.clone()), d = o.points.map((c) => c.clone());
|
|
1709
|
-
e({ line1: n, line2: o, oldLine1: a, oldLine2: r, newLine1: l, newLine2: d }),
|
|
1732
|
+
e({ line1: n, line2: o, oldLine1: a, oldLine2: r, newLine1: l, newLine2: d }), L({ message: "连接成功", type: "success" });
|
|
1710
1733
|
}
|
|
1711
1734
|
/** 执行完成
|
|
1712
1735
|
* @param next
|
|
@@ -1730,22 +1753,22 @@ class te extends V {
|
|
|
1730
1753
|
return this.completed(e), e;
|
|
1731
1754
|
}
|
|
1732
1755
|
}
|
|
1733
|
-
class
|
|
1756
|
+
class te extends N {
|
|
1734
1757
|
static name = "DeleteSelectWindow";
|
|
1735
1758
|
shortcutKeys = ["Q", "Delete"];
|
|
1736
1759
|
static commandName = "deleteSelectWindow";
|
|
1737
1760
|
onAddFromParent(e) {
|
|
1738
1761
|
super.onAddFromParent(e);
|
|
1739
|
-
const t = this.commandManager.addCommandFlow(
|
|
1740
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1741
|
-
this.eventInput.isKeyCombination(
|
|
1762
|
+
const t = this.commandManager.addCommandFlow(te.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1763
|
+
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 () => {
|
|
1764
|
+
this.eventInput.isKeyCombination(te.commandName) && await this.commandManager.start(te.commandName, [...this.default.selectLines]);
|
|
1742
1765
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1743
1766
|
}
|
|
1744
1767
|
/**
|
|
1745
1768
|
* 进入命令约束
|
|
1746
1769
|
*/
|
|
1747
1770
|
constraint(e, t) {
|
|
1748
|
-
Array.isArray(t) ? t.some((n) => n.userData.isWindow) ? e(t) : (
|
|
1771
|
+
Array.isArray(t) ? t.some((n) => n.userData.isWindow) ? e(t) : (L({ message: "请选择有窗户线段", type: "warning" }), this.cancel()) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1749
1772
|
}
|
|
1750
1773
|
/** 开始
|
|
1751
1774
|
* @param next
|
|
@@ -1757,7 +1780,7 @@ class ne extends V {
|
|
|
1757
1780
|
line: s,
|
|
1758
1781
|
drawDoorData: s.userData.drawDoorData
|
|
1759
1782
|
}), n = !0);
|
|
1760
|
-
}), n &&
|
|
1783
|
+
}), n && L({ message: "删除窗户成功", type: "success" }), e(o);
|
|
1761
1784
|
}
|
|
1762
1785
|
/**
|
|
1763
1786
|
* 完成
|
|
@@ -1787,16 +1810,16 @@ class ne extends V {
|
|
|
1787
1810
|
return this.completed(e), e;
|
|
1788
1811
|
}
|
|
1789
1812
|
}
|
|
1790
|
-
class
|
|
1813
|
+
class ne extends N {
|
|
1791
1814
|
static name = "SelectAll";
|
|
1792
1815
|
container = new m.Group();
|
|
1793
1816
|
shortcutKeys = ["control", "a"];
|
|
1794
1817
|
static commandName = "selectAll";
|
|
1795
1818
|
onAddFromParent(e) {
|
|
1796
1819
|
super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
|
|
1797
|
-
const t = this.commandManager.addCommandFlow(
|
|
1798
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1799
|
-
this.eventInput.isKeyCombination(
|
|
1820
|
+
const t = this.commandManager.addCommandFlow(ne.commandName).add(this.createInterrupt()).add(this.selectAll.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1821
|
+
t.writeOperationList = !1, 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 () => {
|
|
1822
|
+
this.eventInput.isKeyCombination(ne.commandName) && await this.commandManager.start(ne.commandName);
|
|
1800
1823
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1801
1824
|
}
|
|
1802
1825
|
/** 开始
|
|
@@ -1824,22 +1847,22 @@ class oe extends V {
|
|
|
1824
1847
|
return this.completed(e), e;
|
|
1825
1848
|
}
|
|
1826
1849
|
}
|
|
1827
|
-
class
|
|
1850
|
+
class oe extends N {
|
|
1828
1851
|
static name = "ViewAngle";
|
|
1829
1852
|
shortcutKeys = ["r"];
|
|
1830
1853
|
static commandName = "viewAngle";
|
|
1831
1854
|
onAddFromParent(e) {
|
|
1832
1855
|
super.onAddFromParent(e);
|
|
1833
|
-
const t = this.commandManager.addCommandFlow(
|
|
1834
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(
|
|
1835
|
-
this.eventInput.isKeyCombination(
|
|
1856
|
+
const t = this.commandManager.addCommandFlow(oe.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
|
|
1857
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(oe.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1858
|
+
this.eventInput.isKeyCombination(oe.commandName) && await this.commandManager.start(oe.commandName, [...this.default.selectLines]);
|
|
1836
1859
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1837
1860
|
}
|
|
1838
1861
|
/**
|
|
1839
1862
|
* 进入命令约束
|
|
1840
1863
|
*/
|
|
1841
1864
|
constraint(e, t) {
|
|
1842
|
-
Array.isArray(t) ? t.length !== 2 || !t[0].sameEndpoint(t[1]) ? (
|
|
1865
|
+
Array.isArray(t) ? t.length !== 2 || !t[0].sameEndpoint(t[1]) ? (L({ message: "请选择两条具有端点相交的线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1843
1866
|
}
|
|
1844
1867
|
/**
|
|
1845
1868
|
*
|
|
@@ -1850,93 +1873,194 @@ class se extends V {
|
|
|
1850
1873
|
const [n, o] = t, s = Math.min(0.5, n.length(), o.length());
|
|
1851
1874
|
let a, r, l, d = 0, c = 0;
|
|
1852
1875
|
n.sameEndpointAsStart(o) ? (a = n.start, r = n.end) : (a = n.end, r = n.start), o.sameEndpointAsStart(n) ? l = o.end : l = o.start;
|
|
1853
|
-
function h(
|
|
1854
|
-
const
|
|
1855
|
-
let
|
|
1856
|
-
return
|
|
1876
|
+
function h(M, O) {
|
|
1877
|
+
const g = O.x - M.x, Z = O.y - M.y;
|
|
1878
|
+
let j = Math.atan2(Z, g) * (180 / Math.PI);
|
|
1879
|
+
return j < 0 && (j += 360), j;
|
|
1857
1880
|
}
|
|
1858
|
-
const
|
|
1859
|
-
function
|
|
1860
|
-
for (let
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1881
|
+
const f = h(a, r), y = h(a, l), b = Math.min(f, y), w = Math.max(f, y), E = [];
|
|
1882
|
+
function C(M, O) {
|
|
1883
|
+
for (let g = M; g <= O; g++) {
|
|
1884
|
+
const Z = Math.cos(g * Math.PI / 180) * s + a.x, j = Math.sin(g * Math.PI / 180) * s + a.y, xe = Math.cos((g + 1) * Math.PI / 180) * s + a.x, Ee = Math.sin((g + 1) * Math.PI / 180) * s + a.y;
|
|
1885
|
+
E.push(Z, j, 0, xe, Ee, 0);
|
|
1863
1886
|
}
|
|
1864
1887
|
}
|
|
1865
|
-
|
|
1866
|
-
const
|
|
1867
|
-
|
|
1868
|
-
position:
|
|
1869
|
-
},
|
|
1870
|
-
const
|
|
1888
|
+
w - b > 180 ? (C(0, b), C(w, 360), d = 360 - (w - b), c = (w + d / 2) % 360) : (C(b, w), d = w - b, c = b + d / 2);
|
|
1889
|
+
const D = new m.LineSegments();
|
|
1890
|
+
D.geometry = this.renderManager.createGeometry({
|
|
1891
|
+
position: E
|
|
1892
|
+
}, E.length / 3), D.material = new m.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(D);
|
|
1893
|
+
const R = Math.cos(c * Math.PI / 180) * s + a.x, ae = Math.sin(c * Math.PI / 180) * s + a.y, q = this.renderer.createText(Number(d.toFixed(2)), new m.Vector3(R, ae, 0), {
|
|
1871
1894
|
textShadow: "0px 0px 2px #000"
|
|
1872
1895
|
}, this.renderManager.container);
|
|
1873
|
-
let
|
|
1874
|
-
this.addEventRecord("clear").add(() =>
|
|
1875
|
-
this.eventInput.isOnlyKeyDown("enter") ? e() : this.eventInput.isOnlyKeyDown("mouse_0") && (
|
|
1896
|
+
let _ = 0;
|
|
1897
|
+
this.addEventRecord("clear").add(() => D.removeFromParent()).add(() => q.removeFromParent()).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1898
|
+
this.eventInput.isOnlyKeyDown("enter") ? e() : this.eventInput.isOnlyKeyDown("mouse_0") && (_++, _ === 1 ? setTimeout(() => _ = 0, 500) : _ === 2 && (e(), _ = 0));
|
|
1876
1899
|
}));
|
|
1877
1900
|
}
|
|
1878
1901
|
}
|
|
1879
|
-
|
|
1902
|
+
class rt extends N {
|
|
1903
|
+
static name = "ClippingLine";
|
|
1904
|
+
container = new m.Group();
|
|
1905
|
+
shortcutKeys = ["control", "x"];
|
|
1906
|
+
commandName = "clippingLine";
|
|
1907
|
+
static commandName = "clippingLine";
|
|
1908
|
+
onAddFromParent(e) {
|
|
1909
|
+
super.onAddFromParent(e), this.editor.container.add(this.container);
|
|
1910
|
+
const t = this.commandManager.addCommandFlow(this.commandName).add(this.createInterrupt()).add(this.createCursor("no-drop")).add(this.selectPointStart.bind(this)).add(this.selectPointEnd.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1911
|
+
t.addEventListener("finally", this.createFinally(["selectPointStart"])), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(this.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => this.eventInput.isKeyCombination(this.commandName) && await this.commandManager.start(this.commandName)), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1912
|
+
}
|
|
1913
|
+
/** 选择开始点
|
|
1914
|
+
* @param next
|
|
1915
|
+
*/
|
|
1916
|
+
selectPointStart(e) {
|
|
1917
|
+
let t = null, n = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
|
|
1918
|
+
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1919
|
+
const { point: s, line: a, find: r } = this.editor.renderManager.adsorption();
|
|
1920
|
+
this.dispatchEvent({ type: "pointerMove", point: s }), r ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
1921
|
+
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1922
|
+
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: o }));
|
|
1923
|
+
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
1924
|
+
}
|
|
1925
|
+
/** 选择结束点
|
|
1926
|
+
* @param next
|
|
1927
|
+
*/
|
|
1928
|
+
selectPointEnd(e, { point: t, line: n }) {
|
|
1929
|
+
let o = null, s = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
1930
|
+
this.addEventRecord("clear").add(() => s.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1931
|
+
const { point: a, find: r, line: l } = this.editor.renderManager.adsorption();
|
|
1932
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), r && l === n ? (this.domElement.style.cursor = "none", s.position.copy(a), o = a.clone(), this.container.add(s)) : (this.domElement.style.cursor = "no-drop", o = null, s.removeFromParent());
|
|
1933
|
+
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1934
|
+
this.eventInput.isKeyDown("mouse_0") && o && e({ line: n, start: t, end: o });
|
|
1935
|
+
}));
|
|
1936
|
+
}
|
|
1937
|
+
/**
|
|
1938
|
+
* 结束处理
|
|
1939
|
+
* @param next
|
|
1940
|
+
* @param points
|
|
1941
|
+
*/
|
|
1942
|
+
end(e, { start: t, end: n, line: o }) {
|
|
1943
|
+
const s = V.from(t), a = V.from(n);
|
|
1944
|
+
e({
|
|
1945
|
+
oldLine: o,
|
|
1946
|
+
newLine1: new W(
|
|
1947
|
+
o.start,
|
|
1948
|
+
o.start.distance(s) < o.start.distance(a) ? s.clone() : a.clone()
|
|
1949
|
+
),
|
|
1950
|
+
newLine2: new W(
|
|
1951
|
+
o.end,
|
|
1952
|
+
o.end.distance(s) < o.end.distance(a) ? s.clone() : a.clone()
|
|
1953
|
+
)
|
|
1954
|
+
});
|
|
1955
|
+
}
|
|
1956
|
+
/** 执行完成
|
|
1957
|
+
*/
|
|
1958
|
+
completed(e) {
|
|
1959
|
+
this.renderManager.removeLine(e.oldLine), this.renderManager.addLines([e.newLine1, e.newLine2]), this.renderManager.draw();
|
|
1960
|
+
}
|
|
1961
|
+
/** 回滚操作
|
|
1962
|
+
* @param data
|
|
1963
|
+
*/
|
|
1964
|
+
rollback(e) {
|
|
1965
|
+
return this.renderManager.addLine(e.oldLine), this.renderManager.removeLine(e.newLine1), this.renderManager.removeLine(e.newLine2), e;
|
|
1966
|
+
}
|
|
1967
|
+
/** 撤回回滚
|
|
1968
|
+
* @param data
|
|
1969
|
+
* @returns
|
|
1970
|
+
*/
|
|
1971
|
+
revokeRollback(e) {
|
|
1972
|
+
return this.completed(e), e;
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
class se extends N {
|
|
1976
|
+
static name = "VerticalReferenceLine";
|
|
1977
|
+
shortcutKeys = ["v"];
|
|
1978
|
+
static commandName = "VerticalReferenceLine";
|
|
1979
|
+
onAddFromParent(e) {
|
|
1980
|
+
super.onAddFromParent(e);
|
|
1981
|
+
const t = this.commandManager.addCommandFlow(se.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalReferenceLine.bind(this));
|
|
1982
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(se.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1983
|
+
this.eventInput.isKeyCombination(se.commandName) && await this.commandManager.start(se.commandName, [...this.default.selectLines]);
|
|
1984
|
+
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* 进入命令约束
|
|
1988
|
+
*/
|
|
1989
|
+
constraint(e, t) {
|
|
1990
|
+
Array.isArray(t) ? t.length !== 1 ? (L({ message: "请选择一条墙壁线段", type: "warning" }), this.cancel()) : t[0].userData.isDoor ? (L({ message: "请选择一条墙壁线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1991
|
+
}
|
|
1992
|
+
/**
|
|
1993
|
+
*
|
|
1994
|
+
* @param next
|
|
1995
|
+
* @param selectLines
|
|
1996
|
+
*/
|
|
1997
|
+
verticalReferenceLine(e, t) {
|
|
1998
|
+
this.renderManager.lines.forEach((n) => {
|
|
1999
|
+
delete n.userData.isVerticalReferenceLine;
|
|
2000
|
+
}), t[0].userData.isVerticalReferenceLine = !0, e(), this.renderManager.draw();
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
const oo = {
|
|
1880
2004
|
key: 0,
|
|
1881
2005
|
class: "mt-[5px] text-[#ccc] text-[11px] absolute left-[10px] bottom-[10px] rounded-[8px] min-w-[150px] bg-black/15 p-[10px]"
|
|
1882
|
-
},
|
|
2006
|
+
}, so = { class: "text-start max-w-[150px]" }, ao = { class: "inline-block ml-[10px] text-[var(--color-primary)]" }, io = {
|
|
1883
2007
|
key: 0,
|
|
1884
2008
|
class: "p-[5px] max-w-[200px]"
|
|
1885
|
-
},
|
|
2009
|
+
}, ro = { class: "text-[14px] flex flex-col" }, lo = ["onClick"], co = { class: "flex flex-row items-center" }, mo = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, ho = ["src"], uo = { class: "text-wrap" }, po = {
|
|
1886
2010
|
key: 1,
|
|
1887
2011
|
class: "text-[#999]"
|
|
1888
|
-
},
|
|
2012
|
+
}, go = {
|
|
1889
2013
|
style: { "--el-color-primary": "var(--primary-color)" },
|
|
1890
2014
|
class: "flex flex-row items-center justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
1891
|
-
},
|
|
2015
|
+
}, vo = {
|
|
1892
2016
|
key: 0,
|
|
1893
2017
|
class: "flex flex-row items-center flex-wrap justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
1894
|
-
},
|
|
2018
|
+
}, fo = { class: "flex-wrap border-t-1 border-t-[#eee] mt-[5px] pt-[5px] flex items-center gap-[10px]" }, yo = ["onClick", "title"], wo = ["src"], bo = /* @__PURE__ */ ce({
|
|
1895
2019
|
__name: "EditorTool",
|
|
1896
2020
|
props: {
|
|
1897
2021
|
dxfSystem: {},
|
|
1898
2022
|
permission: {}
|
|
1899
2023
|
},
|
|
1900
2024
|
setup(i) {
|
|
1901
|
-
function e(
|
|
1902
|
-
const
|
|
1903
|
-
|
|
2025
|
+
function e(x, u, v = h.value.getBoundingClientRect(), U = f.value.getBoundingClientRect()) {
|
|
2026
|
+
const me = v.width - U.width, he = 0, Le = v.height - U.height;
|
|
2027
|
+
x = Math.max(0, Math.min(x, me)), u = Math.max(he, Math.min(u, Le)), _.value = { left: x, top: u };
|
|
1904
2028
|
}
|
|
1905
|
-
function t(
|
|
1906
|
-
b.value ===
|
|
2029
|
+
function t(x) {
|
|
2030
|
+
b.value === x.command || b.value !== "default" || C.commandManager.start(x.command);
|
|
1907
2031
|
}
|
|
1908
|
-
function n(
|
|
1909
|
-
if (
|
|
1910
|
-
localStorage.setItem("lines", JSON.stringify(
|
|
2032
|
+
function n(x) {
|
|
2033
|
+
if (x) {
|
|
2034
|
+
localStorage.setItem("lines", JSON.stringify(x));
|
|
1911
2035
|
try {
|
|
1912
|
-
|
|
2036
|
+
w.Dxf.set(x), w.Dxf.lineOffset();
|
|
1913
2037
|
} catch (u) {
|
|
1914
2038
|
console.log(u);
|
|
1915
2039
|
}
|
|
1916
2040
|
}
|
|
1917
2041
|
}
|
|
1918
2042
|
async function o() {
|
|
1919
|
-
const
|
|
1920
|
-
Array.isArray(
|
|
2043
|
+
const x = await It.json();
|
|
2044
|
+
Array.isArray(x) && (localStorage.removeItem("orbitControls"), n(x));
|
|
1921
2045
|
}
|
|
1922
|
-
function s({ offsetX:
|
|
1923
|
-
|
|
2046
|
+
function s({ offsetX: x, offsetY: u }) {
|
|
2047
|
+
E.mouseMoveEventProxylock = !0;
|
|
1924
2048
|
const v = document.body.style.cursor;
|
|
1925
2049
|
document.body.style.cursor = "move";
|
|
1926
|
-
const
|
|
1927
|
-
const
|
|
2050
|
+
const U = (me) => {
|
|
2051
|
+
const he = h.value.getBoundingClientRect(), Le = f.value.getBoundingClientRect();
|
|
1928
2052
|
e(
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
2053
|
+
me.pageX - he.left - x,
|
|
2054
|
+
me.pageY - he.top - u,
|
|
2055
|
+
he,
|
|
1932
2056
|
Le
|
|
1933
|
-
),
|
|
2057
|
+
), me.stopPropagation(), document.body.style.cursor = "move";
|
|
1934
2058
|
}, Me = () => {
|
|
1935
|
-
document.body.removeEventListener("mousemove",
|
|
2059
|
+
document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup", Me), document.body.style.cursor = v, E.mouseMoveEventProxylock = !1;
|
|
1936
2060
|
};
|
|
1937
|
-
document.body.addEventListener("mousemove",
|
|
2061
|
+
document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Me);
|
|
1938
2062
|
}
|
|
1939
|
-
const a = i, r =
|
|
2063
|
+
const a = i, r = A(!0), l = A(!0), d = A(!0), c = A(!1), h = A(), f = A(), y = A(!0), b = A(""), w = Bt(a.dxfSystem), E = w.findComponentByType(kt), C = w.findComponentByType(dt), D = w.findComponentByType(Se), R = w.findComponentByType(Dt), ae = A(0), q = A(0), _ = A({ left: 10, top: 100 }), M = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": bn, "./assets/images/connection.svg": xn, "./assets/images/cutLine.svg": Mn, "./assets/images/deleteSelectLine.svg": kn, "./assets/images/deleteSelectWindow.svg": Pn, "./assets/images/door.svg": An, "./assets/images/intersectionConnection.svg": Sn, "./assets/images/line.svg": Nn, "./assets/images/mergeLine.svg": On, "./assets/images/revokeRollback.svg": Kn, "./assets/images/rollback.svg": Tn, "./assets/images/selectAll.svg": jn, "./assets/images/selectPoint.svg": Qn, "./assets/images/verticalCorrection.svg": Wn, "./assets/images/verticalLine.svg": Jn, "./assets/images/window.svg": Zn }), O = A(!1), g = A(0), Z = A(!1), j = new ResizeObserver(() => e(_.value.left, _.value.top)), xe = [
|
|
1940
2064
|
{ name: "开启绘制线段命令", shortcut: "Ctrl + L" },
|
|
1941
2065
|
{ name: "开启绘制门线命令", shortcut: "Ctrl + M" },
|
|
1942
2066
|
{ name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
|
|
@@ -1956,7 +2080,7 @@ const Yn = {
|
|
|
1956
2080
|
{ name: "取消命令", shortcut: "Esc" },
|
|
1957
2081
|
{ name: "回滚操作", shortcut: "Ctrl + Z" },
|
|
1958
2082
|
{ name: "取消回滚操作", shortcut: "Ctrl + Y" }
|
|
1959
|
-
],
|
|
2083
|
+
], Ee = [
|
|
1960
2084
|
{
|
|
1961
2085
|
command: "default",
|
|
1962
2086
|
name: "默认",
|
|
@@ -1966,7 +2090,7 @@ const Yn = {
|
|
|
1966
2090
|
{
|
|
1967
2091
|
command: "draw-line",
|
|
1968
2092
|
name: "绘制线段",
|
|
1969
|
-
src:
|
|
2093
|
+
src: M["./assets/images/line.svg"].default,
|
|
1970
2094
|
show: !0,
|
|
1971
2095
|
shortcut: "Ctrl + L"
|
|
1972
2096
|
},
|
|
@@ -1974,206 +2098,222 @@ const Yn = {
|
|
|
1974
2098
|
command: "draw-door-line",
|
|
1975
2099
|
name: "绘制门线",
|
|
1976
2100
|
show: !0,
|
|
1977
|
-
src:
|
|
2101
|
+
src: M["./assets/images/door.svg"].default,
|
|
1978
2102
|
shortcut: "Ctrl + M"
|
|
1979
2103
|
},
|
|
1980
2104
|
{
|
|
1981
2105
|
command: "draw-window-line",
|
|
1982
2106
|
name: "绘制窗户线",
|
|
1983
2107
|
show: !0,
|
|
1984
|
-
src:
|
|
2108
|
+
src: M["./assets/images/window.svg"].default,
|
|
1985
2109
|
shortcut: "Ctrl + Q"
|
|
1986
2110
|
},
|
|
1987
2111
|
{
|
|
1988
2112
|
command: "point",
|
|
1989
2113
|
name: "点修改",
|
|
1990
2114
|
show: !0,
|
|
1991
|
-
src:
|
|
2115
|
+
src: M["./assets/images/selectPoint.svg"].default,
|
|
1992
2116
|
shortcut: "Ctrl + P"
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
command: rt.commandName,
|
|
2120
|
+
name: "裁剪线段",
|
|
2121
|
+
show: !0,
|
|
2122
|
+
src: M["./assets/images/cutLine.svg"].default,
|
|
2123
|
+
shortcut: "Ctrl + X"
|
|
1993
2124
|
}
|
|
1994
|
-
],
|
|
2125
|
+
], lt = [
|
|
1995
2126
|
{
|
|
1996
2127
|
command: "",
|
|
1997
2128
|
name: "操作回滚",
|
|
1998
|
-
src:
|
|
1999
|
-
show:
|
|
2129
|
+
src: M["./assets/images/rollback.svg"].default,
|
|
2130
|
+
show: P(() => ae.value !== 0),
|
|
2000
2131
|
shortcut: "Ctrl + Z",
|
|
2001
2132
|
action() {
|
|
2002
|
-
|
|
2133
|
+
C.commandManager.rollback();
|
|
2003
2134
|
}
|
|
2004
2135
|
},
|
|
2005
2136
|
{
|
|
2006
2137
|
command: "",
|
|
2007
2138
|
name: "撤销操作回滚",
|
|
2008
|
-
src:
|
|
2009
|
-
show:
|
|
2139
|
+
src: M["./assets/images/revokeRollback.svg"].default,
|
|
2140
|
+
show: P(() => q.value !== 0),
|
|
2010
2141
|
shortcut: "Ctrl + Y",
|
|
2011
2142
|
class: "rotateY-[180deg]",
|
|
2012
2143
|
action() {
|
|
2013
|
-
|
|
2144
|
+
C.commandManager.revokeRollback();
|
|
2014
2145
|
}
|
|
2015
2146
|
},
|
|
2016
2147
|
{
|
|
2017
|
-
command:
|
|
2148
|
+
command: Y.commandName,
|
|
2018
2149
|
name: "合并",
|
|
2019
|
-
src:
|
|
2020
|
-
show:
|
|
2150
|
+
src: M["./assets/images/mergeLine.svg"].default,
|
|
2151
|
+
show: P(() => g.value === 2),
|
|
2021
2152
|
shortcut: "Ctrl + G"
|
|
2022
2153
|
},
|
|
2023
2154
|
{
|
|
2024
|
-
command:
|
|
2155
|
+
command: $.commandName,
|
|
2025
2156
|
name: "两点连接",
|
|
2026
|
-
show:
|
|
2027
|
-
src:
|
|
2157
|
+
show: P(() => g.value === 2),
|
|
2158
|
+
src: M["./assets/images/connection.svg"].default,
|
|
2028
2159
|
shortcut: "Shift + L"
|
|
2029
2160
|
},
|
|
2030
2161
|
{
|
|
2031
|
-
command:
|
|
2162
|
+
command: ee.commandName,
|
|
2032
2163
|
name: "延长线交点连接",
|
|
2033
|
-
show:
|
|
2034
|
-
src:
|
|
2164
|
+
show: P(() => g.value === 2),
|
|
2165
|
+
src: M["./assets/images/intersectionConnection.svg"].default,
|
|
2035
2166
|
shortcut: "Ctrl + Shift + L"
|
|
2036
2167
|
},
|
|
2037
2168
|
{
|
|
2038
2169
|
command: de.commandName,
|
|
2039
2170
|
name: "线段垂直纠正",
|
|
2040
|
-
show:
|
|
2041
|
-
src:
|
|
2171
|
+
show: P(() => g.value === 1),
|
|
2172
|
+
src: M["./assets/images/verticalCorrection.svg"].default,
|
|
2042
2173
|
shortcut: "Ctrl + C 或 Ctrl + Shift + C"
|
|
2043
2174
|
},
|
|
2044
2175
|
{
|
|
2045
2176
|
command: se.commandName,
|
|
2177
|
+
name: "y轴垂直基准线",
|
|
2178
|
+
show: P(
|
|
2179
|
+
() => g.value === 1 && !D.selectLines[0].userData.isDoor
|
|
2180
|
+
),
|
|
2181
|
+
src: M["./assets/images/verticalLine.svg"].default,
|
|
2182
|
+
shortcut: "V"
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
command: oe.commandName,
|
|
2046
2186
|
name: "角度显示",
|
|
2047
|
-
show:
|
|
2048
|
-
src:
|
|
2187
|
+
show: P(() => g.value === 2 && D.selectLines[0].sameEndpoint(D.selectLines[1])),
|
|
2188
|
+
src: M["./assets/images/angle.svg"].default,
|
|
2049
2189
|
shortcut: "r"
|
|
2050
2190
|
},
|
|
2051
2191
|
{
|
|
2052
|
-
command:
|
|
2192
|
+
command: ne.commandName,
|
|
2053
2193
|
name: "全选",
|
|
2054
|
-
show:
|
|
2055
|
-
src:
|
|
2194
|
+
show: P(() => g.value !== C.renderManager.lines.length),
|
|
2195
|
+
src: M["./assets/images/selectAll.svg"].default,
|
|
2056
2196
|
shortcut: "Ctrl + A"
|
|
2057
2197
|
},
|
|
2058
2198
|
{
|
|
2059
|
-
command:
|
|
2199
|
+
command: te.commandName,
|
|
2060
2200
|
name: "清除窗户",
|
|
2061
|
-
show:
|
|
2062
|
-
src:
|
|
2201
|
+
show: P(() => Z.value),
|
|
2202
|
+
src: M["./assets/images/deleteSelectWindow.svg"].default,
|
|
2063
2203
|
shortcut: "Q + Delete"
|
|
2064
2204
|
},
|
|
2065
2205
|
{
|
|
2066
|
-
command:
|
|
2206
|
+
command: X.commandName,
|
|
2067
2207
|
name: "删除",
|
|
2068
|
-
show:
|
|
2069
|
-
src:
|
|
2208
|
+
show: P(() => g.value > 0),
|
|
2209
|
+
src: M["./assets/images/deleteSelectLine.svg"].default,
|
|
2070
2210
|
shortcut: "Delete"
|
|
2071
2211
|
}
|
|
2072
2212
|
];
|
|
2073
|
-
|
|
2074
|
-
localStorage.setItem("toolBarExpand",
|
|
2075
|
-
}),
|
|
2076
|
-
const
|
|
2077
|
-
b.value =
|
|
2213
|
+
H(_, () => localStorage.setItem("editorToolPosition", JSON.stringify(_.value))), H(O, () => localStorage.setItem("showShortcutKey", O.value + "")), H(y, () => {
|
|
2214
|
+
localStorage.setItem("toolBarExpand", y.value + ""), y.value && ye(() => e(_.value.left, _.value.top));
|
|
2215
|
+
}), H(r, () => w.Variable.set("originalLineVisible", r.value)), H(l, () => w.Variable.set("dxfVisible", l.value)), H(d, () => w.Variable.set("whiteModelVisible", d.value)), w.Variable.addEventListener("isLook", (x) => c.value = x.value), w.Variable.addEventListener("originalLineVisible", (x) => r.value = x.value), w.Variable.addEventListener("dxfVisible", (x) => l.value = x.value), w.Variable.addEventListener("whiteModelVisible", (x) => d.value = x.value);
|
|
2216
|
+
const ct = C.commandManager.addEventListener("started", (x) => {
|
|
2217
|
+
b.value = x.name;
|
|
2078
2218
|
});
|
|
2079
|
-
return localStorage.getItem("showShortcutKey") && (
|
|
2080
|
-
|
|
2081
|
-
if (
|
|
2082
|
-
const { left:
|
|
2083
|
-
e(
|
|
2219
|
+
return localStorage.getItem("showShortcutKey") && (O.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (y.value = localStorage.getItem("toolBarExpand") === "true"), tt(() => {
|
|
2220
|
+
f.value.style.display = "none", setTimeout(() => {
|
|
2221
|
+
if (f.value.style.display = "block", localStorage.getItem("editorToolPosition")) {
|
|
2222
|
+
const { left: x, top: u } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
|
|
2223
|
+
e(x, u), ye(() => j.observe(h.value));
|
|
2084
2224
|
} else
|
|
2085
|
-
|
|
2086
|
-
}, 100),
|
|
2087
|
-
|
|
2088
|
-
}), ["rollback", "completed", "revokeRollback"].forEach((
|
|
2089
|
-
|
|
2225
|
+
ye(() => j.observe(h.value));
|
|
2226
|
+
}, 100), D.addEventListener("selectLineChange", () => {
|
|
2227
|
+
g.value = D.selectLines.length, Z.value = D.selectLines.some((x) => x.userData.isWindow);
|
|
2228
|
+
}), ["rollback", "completed", "revokeRollback"].forEach((x) => {
|
|
2229
|
+
C.commandManager.addEventListener(x, () => {
|
|
2090
2230
|
setTimeout(() => {
|
|
2091
|
-
|
|
2231
|
+
ae.value = C.commandManager.operationList.length, q.value = C.commandManager.rollbackList.length;
|
|
2092
2232
|
});
|
|
2093
2233
|
});
|
|
2094
2234
|
});
|
|
2095
|
-
}),
|
|
2096
|
-
|
|
2097
|
-
}), (
|
|
2235
|
+
}), Nt(() => {
|
|
2236
|
+
E.mouseMoveEventProxylock = !1, ct(), j.disconnect();
|
|
2237
|
+
}), (x, u) => (I(), B("div", {
|
|
2098
2238
|
ref_key: "elRef",
|
|
2099
2239
|
ref: h,
|
|
2100
2240
|
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]"
|
|
2101
2241
|
}, [
|
|
2102
|
-
F(
|
|
2103
|
-
default:
|
|
2104
|
-
|
|
2105
|
-
(
|
|
2242
|
+
F(be, null, {
|
|
2243
|
+
default: T(() => [
|
|
2244
|
+
O.value ? (I(), B("div", oo, [
|
|
2245
|
+
(I(), B(ge, null, Ie(xe, (v) => k("div", {
|
|
2106
2246
|
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",
|
|
2107
2247
|
key: v.name
|
|
2108
2248
|
}, [
|
|
2109
|
-
|
|
2110
|
-
|
|
2249
|
+
k("p", so, re(v.name), 1),
|
|
2250
|
+
k("span", ao, re(v.shortcut), 1)
|
|
2111
2251
|
])), 64))
|
|
2112
|
-
])) :
|
|
2252
|
+
])) : J("", !0)
|
|
2113
2253
|
]),
|
|
2114
2254
|
_: 1
|
|
2115
2255
|
}),
|
|
2116
|
-
|
|
2256
|
+
k("div", {
|
|
2117
2257
|
ref_key: "toolBarRef",
|
|
2118
|
-
ref:
|
|
2119
|
-
style:
|
|
2120
|
-
class:
|
|
2258
|
+
ref: f,
|
|
2259
|
+
style: _e({ left: _.value.left + "px", top: _.value.top + "px" }),
|
|
2260
|
+
class: z(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": y.value }]),
|
|
2121
2261
|
onMousedown: u[9] || (u[9] = (v) => v.stopPropagation())
|
|
2122
2262
|
}, [
|
|
2123
|
-
|
|
2263
|
+
k("div", {
|
|
2124
2264
|
onMousedown: s,
|
|
2125
|
-
class:
|
|
2265
|
+
class: z([{ "border-b-[#eee] border-b-1": y.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
|
|
2126
2266
|
}, [
|
|
2127
|
-
u[11] || (u[11] =
|
|
2128
|
-
|
|
2267
|
+
u[11] || (u[11] = Rt('<div class="flex flex-row" data-v-205ff80d><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-205ff80d><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-205ff80d><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-205ff80d></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-205ff80d>绘制工具</h5></div>', 1)),
|
|
2268
|
+
k("div", {
|
|
2129
2269
|
onMousedown: u[0] || (u[0] = (v) => v.stopPropagation()),
|
|
2130
|
-
onClick: u[1] || (u[1] = (v) =>
|
|
2270
|
+
onClick: u[1] || (u[1] = (v) => y.value = !y.value),
|
|
2131
2271
|
class: "cursor-pointer flex items-center p-[0px_5px]"
|
|
2132
2272
|
}, [
|
|
2133
|
-
(
|
|
2273
|
+
(I(), B("svg", {
|
|
2134
2274
|
fill: "#666",
|
|
2135
|
-
class:
|
|
2275
|
+
class: z([{ "rotate-90": y.value }, "transition-all"]),
|
|
2136
2276
|
viewBox: "0 0 1024 1024",
|
|
2137
2277
|
version: "1.1",
|
|
2138
2278
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2139
2279
|
width: "12",
|
|
2140
2280
|
height: "12"
|
|
2141
2281
|
}, u[10] || (u[10] = [
|
|
2142
|
-
|
|
2282
|
+
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)
|
|
2143
2283
|
]), 2))
|
|
2144
2284
|
], 32)
|
|
2145
2285
|
], 34),
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
(
|
|
2286
|
+
y.value ? (I(), B("div", io, [
|
|
2287
|
+
k("ul", ro, [
|
|
2288
|
+
(I(), B(ge, null, Ie(Ee, (v) => (I(), B(ge, {
|
|
2149
2289
|
key: v.command
|
|
2150
2290
|
}, [
|
|
2151
|
-
v.show ? (
|
|
2291
|
+
v.show ? (I(), B("li", {
|
|
2152
2292
|
key: 0,
|
|
2153
|
-
onClick: (
|
|
2154
|
-
class:
|
|
2293
|
+
onClick: (U) => t(v),
|
|
2294
|
+
class: z([{
|
|
2155
2295
|
"!bg-[var(--primary-color)] text-[#fff]": b.value === v.command,
|
|
2156
2296
|
"!cursor-no-drop": b.value !== v.command && b.value !== "default"
|
|
2157
2297
|
}, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
|
|
2158
2298
|
}, [
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2299
|
+
k("div", co, [
|
|
2300
|
+
k("div", mo, [
|
|
2301
|
+
k("img", {
|
|
2162
2302
|
class: "size-[14px]",
|
|
2163
2303
|
src: v.src,
|
|
2164
2304
|
alt: "",
|
|
2165
2305
|
srcset: ""
|
|
2166
|
-
}, null, 8,
|
|
2306
|
+
}, null, 8, ho)
|
|
2167
2307
|
]),
|
|
2168
|
-
|
|
2308
|
+
k("span", uo, re(v.name), 1)
|
|
2169
2309
|
]),
|
|
2170
|
-
b.value === v.command ? (
|
|
2310
|
+
b.value === v.command ? (I(), B("div", {
|
|
2171
2311
|
key: 0,
|
|
2172
2312
|
title: "取消命令(Esc)",
|
|
2173
2313
|
class: "active:scale-[0.7] transition-all",
|
|
2174
|
-
onClick: u[2] || (u[2] = (
|
|
2314
|
+
onClick: u[2] || (u[2] = (U) => (p(C).cancelCommand(), U.stopPropagation()))
|
|
2175
2315
|
}, u[12] || (u[12] = [
|
|
2176
|
-
|
|
2316
|
+
k("svg", {
|
|
2177
2317
|
fill: "#fff",
|
|
2178
2318
|
width: "16",
|
|
2179
2319
|
height: "16",
|
|
@@ -2181,108 +2321,108 @@ const Yn = {
|
|
|
2181
2321
|
version: "1.1",
|
|
2182
2322
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2183
2323
|
}, [
|
|
2184
|
-
|
|
2185
|
-
|
|
2324
|
+
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" }),
|
|
2325
|
+
k("path", { d: "M236.437333 463.914667l549.333333 0 0 96.874667-549.333333 0 0-96.874667Z" })
|
|
2186
2326
|
], -1)
|
|
2187
|
-
]))) : v.shortcut ? (
|
|
2188
|
-
], 10,
|
|
2327
|
+
]))) : v.shortcut ? (I(), B("div", po, re(v.shortcut), 1)) : J("", !0)
|
|
2328
|
+
], 10, lo)) : J("", !0)
|
|
2189
2329
|
], 64))), 64))
|
|
2190
2330
|
]),
|
|
2191
|
-
|
|
2192
|
-
F(
|
|
2331
|
+
k("div", go, [
|
|
2332
|
+
F(p(Fe), {
|
|
2193
2333
|
size: "small",
|
|
2194
|
-
modelValue:
|
|
2195
|
-
"onUpdate:modelValue": u[3] || (u[3] = (v) =>
|
|
2334
|
+
modelValue: O.value,
|
|
2335
|
+
"onUpdate:modelValue": u[3] || (u[3] = (v) => O.value = v),
|
|
2196
2336
|
label: "快捷键提示"
|
|
2197
2337
|
}, null, 8, ["modelValue"]),
|
|
2198
|
-
F(
|
|
2338
|
+
F(p(Fe), {
|
|
2199
2339
|
size: "small",
|
|
2200
2340
|
modelValue: l.value,
|
|
2201
2341
|
"onUpdate:modelValue": u[4] || (u[4] = (v) => l.value = v),
|
|
2202
2342
|
label: "dxf"
|
|
2203
2343
|
}, null, 8, ["modelValue"])
|
|
2204
2344
|
]),
|
|
2205
|
-
|
|
2206
|
-
F(
|
|
2345
|
+
x.permission === "admin" ? (I(), B("div", vo, [
|
|
2346
|
+
F(p(ue), {
|
|
2207
2347
|
style: { padding: "5px", "font-size": "10px" },
|
|
2208
2348
|
size: "small",
|
|
2209
2349
|
type: "success",
|
|
2210
2350
|
onClick: o
|
|
2211
2351
|
}, {
|
|
2212
|
-
default:
|
|
2213
|
-
|
|
2352
|
+
default: T(() => u[13] || (u[13] = [
|
|
2353
|
+
ie(" 选择文件 ", -1)
|
|
2214
2354
|
])),
|
|
2215
2355
|
_: 1,
|
|
2216
2356
|
__: [13]
|
|
2217
2357
|
}),
|
|
2218
|
-
F(
|
|
2358
|
+
F(p(ue), {
|
|
2219
2359
|
style: { padding: "5px", "font-size": "10px" },
|
|
2220
2360
|
size: "small",
|
|
2221
2361
|
type: "primary",
|
|
2222
|
-
onClick: u[5] || (u[5] = (v) => console.log(
|
|
2362
|
+
onClick: u[5] || (u[5] = (v) => console.log(p(w).Dxf.originalData))
|
|
2223
2363
|
}, {
|
|
2224
|
-
default:
|
|
2225
|
-
|
|
2364
|
+
default: T(() => u[14] || (u[14] = [
|
|
2365
|
+
ie(" 打印Json ", -1)
|
|
2226
2366
|
])),
|
|
2227
2367
|
_: 1,
|
|
2228
2368
|
__: [14]
|
|
2229
2369
|
}),
|
|
2230
|
-
F(
|
|
2370
|
+
F(p(ue), {
|
|
2231
2371
|
style: { padding: "5px", "font-size": "10px" },
|
|
2232
2372
|
size: "small",
|
|
2233
2373
|
type: "primary",
|
|
2234
|
-
onClick: u[6] || (u[6] = (v) =>
|
|
2374
|
+
onClick: u[6] || (u[6] = (v) => p(w).Dxf.download("test.dxf"))
|
|
2235
2375
|
}, {
|
|
2236
|
-
default:
|
|
2237
|
-
|
|
2376
|
+
default: T(() => u[15] || (u[15] = [
|
|
2377
|
+
ie(" 下载DXF ", -1)
|
|
2238
2378
|
])),
|
|
2239
2379
|
_: 1,
|
|
2240
2380
|
__: [15]
|
|
2241
2381
|
}),
|
|
2242
|
-
F(
|
|
2382
|
+
F(p(ue), {
|
|
2243
2383
|
style: { padding: "5px", "font-size": "10px" },
|
|
2244
2384
|
size: "small",
|
|
2245
2385
|
type: "primary",
|
|
2246
|
-
onClick: u[7] || (u[7] = (v) =>
|
|
2386
|
+
onClick: u[7] || (u[7] = (v) => p(w).AngleCorrectionDxf.downloadImage("dxf.jpg"))
|
|
2247
2387
|
}, {
|
|
2248
|
-
default:
|
|
2249
|
-
|
|
2388
|
+
default: T(() => u[16] || (u[16] = [
|
|
2389
|
+
ie(" 下载JPG ", -1)
|
|
2250
2390
|
])),
|
|
2251
2391
|
_: 1,
|
|
2252
2392
|
__: [16]
|
|
2253
2393
|
}),
|
|
2254
|
-
F(
|
|
2394
|
+
F(p(ue), {
|
|
2255
2395
|
style: { padding: "5px", "font-size": "10px" },
|
|
2256
2396
|
size: "small",
|
|
2257
2397
|
type: "primary",
|
|
2258
|
-
onClick: u[8] || (u[8] = (v) =>
|
|
2398
|
+
onClick: u[8] || (u[8] = (v) => p(R).downloadGltf("test.glb", !0))
|
|
2259
2399
|
}, {
|
|
2260
|
-
default:
|
|
2261
|
-
|
|
2400
|
+
default: T(() => u[17] || (u[17] = [
|
|
2401
|
+
ie(" 下载白膜 ", -1)
|
|
2262
2402
|
])),
|
|
2263
2403
|
_: 1,
|
|
2264
2404
|
__: [17]
|
|
2265
2405
|
})
|
|
2266
|
-
])) :
|
|
2267
|
-
F(
|
|
2268
|
-
default:
|
|
2269
|
-
|
|
2270
|
-
F(
|
|
2271
|
-
default:
|
|
2272
|
-
(
|
|
2273
|
-
onClick: (
|
|
2406
|
+
])) : J("", !0),
|
|
2407
|
+
F(be, null, {
|
|
2408
|
+
default: T(() => [
|
|
2409
|
+
k("div", fo, [
|
|
2410
|
+
F(Ot, null, {
|
|
2411
|
+
default: T(() => [
|
|
2412
|
+
(I(), B(ge, null, Ie(lt, (v) => k("div", {
|
|
2413
|
+
onClick: (U) => v.show.value && b.value === "default" && (v.action ? v.action() : p(C).commandManager.start(v.command, [...p(D).selectLines])),
|
|
2274
2414
|
title: `${v.name}(${v.shortcut})`,
|
|
2275
|
-
class:
|
|
2415
|
+
class: z(["size-[20px] flex justify-center items-center relative overflow-hidden active:scale-[0.8] border-1 border-[#ccc] rounded-[4px] transition-all cursor-pointer", {
|
|
2276
2416
|
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !v.show.value || b.value !== "default",
|
|
2277
2417
|
[v.class ?? ""]: !0
|
|
2278
2418
|
}]),
|
|
2279
2419
|
key: v.command
|
|
2280
2420
|
}, [
|
|
2281
|
-
|
|
2421
|
+
k("img", {
|
|
2282
2422
|
class: "size-[14px]",
|
|
2283
2423
|
src: v.src
|
|
2284
|
-
}, null, 8,
|
|
2285
|
-
], 10,
|
|
2424
|
+
}, null, 8, wo)
|
|
2425
|
+
], 10, yo)), 64))
|
|
2286
2426
|
]),
|
|
2287
2427
|
_: 1
|
|
2288
2428
|
})
|
|
@@ -2290,17 +2430,17 @@ const Yn = {
|
|
|
2290
2430
|
]),
|
|
2291
2431
|
_: 1
|
|
2292
2432
|
})
|
|
2293
|
-
])) :
|
|
2433
|
+
])) : J("", !0)
|
|
2294
2434
|
], 38)
|
|
2295
2435
|
], 512));
|
|
2296
2436
|
}
|
|
2297
|
-
}),
|
|
2437
|
+
}), Co = (i, e) => {
|
|
2298
2438
|
const t = i.__vccOpts || i;
|
|
2299
2439
|
for (const [n, o] of e)
|
|
2300
2440
|
t[n] = o;
|
|
2301
2441
|
return t;
|
|
2302
|
-
},
|
|
2303
|
-
let
|
|
2442
|
+
}, xo = /* @__PURE__ */ Co(bo, [["__scopeId", "data-v-205ff80d"]]);
|
|
2443
|
+
let dt = class extends Ce {
|
|
2304
2444
|
static name = "Editor";
|
|
2305
2445
|
container = new m.Group();
|
|
2306
2446
|
get renderer() {
|
|
@@ -2324,7 +2464,7 @@ let rt = class extends Ee {
|
|
|
2324
2464
|
get domContainer() {
|
|
2325
2465
|
return this.parent?.findComponentByName("DomContainer");
|
|
2326
2466
|
}
|
|
2327
|
-
commandManager = new
|
|
2467
|
+
commandManager = new yn();
|
|
2328
2468
|
plane = new m.Mesh(new m.PlaneGeometry(2e3, 2e3, 2, 2));
|
|
2329
2469
|
app;
|
|
2330
2470
|
domElement = document.createElement("div");
|
|
@@ -2354,20 +2494,24 @@ let rt = class extends Ee {
|
|
|
2354
2494
|
this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), this.domContainer.domElement.parentElement.appendChild(this.imgEl), n());
|
|
2355
2495
|
});
|
|
2356
2496
|
setTimeout(() => {
|
|
2357
|
-
this.app =
|
|
2497
|
+
this.app = Ft(xo, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
|
|
2358
2498
|
}), e.AngleCorrectionDxf.addEventListener("lineOffset", async () => {
|
|
2359
2499
|
this.imgEl.src && URL.revokeObjectURL(this.imgEl.src), setTimeout(async () => {
|
|
2360
2500
|
this.imgEl.src = URL.createObjectURL(await e.AngleCorrectionDxf.toDxfImageBlob("Centimeters", "image/png", "transparent"));
|
|
2361
2501
|
});
|
|
2362
|
-
}), this.domEventRegister.addEventListener("
|
|
2363
|
-
o.x < this.imgWidth + 10 && o.x > 10 && o.y < this.imgWidth && o.y > 10
|
|
2502
|
+
}), this.domEventRegister.addEventListener("mousedown", (o) => {
|
|
2503
|
+
o.x < this.imgWidth + 10 && o.x > 10 && o.y < this.imgWidth && o.y > 10 && Object.assign(this.imgEl.style, {
|
|
2364
2504
|
width: `${Math.min(this.imgWidth * 10, this.renderer.width * 0.9)}px`,
|
|
2365
2505
|
height: `${Math.min(this.imgWidth * 10, this.renderer.height * 0.9)}px`,
|
|
2366
|
-
background: "rgba(0,0,0,1)"
|
|
2367
|
-
|
|
2506
|
+
background: "rgba(0,0,0,1)",
|
|
2507
|
+
zIndex: 100
|
|
2508
|
+
});
|
|
2509
|
+
}), this.domEventRegister.addEventListener("mousemove", (o) => {
|
|
2510
|
+
o.x < this.imgWidth + 10 && o.x > 10 && o.y < this.imgWidth && o.y > 10 || Object.assign(this.imgEl.style, {
|
|
2368
2511
|
width: `${this.imgWidth}px`,
|
|
2369
2512
|
height: `${this.imgWidth}px`,
|
|
2370
|
-
background: "rgba(255,255,255,0.2)"
|
|
2513
|
+
background: "rgba(255,255,255,0.2)",
|
|
2514
|
+
zIndex: 0
|
|
2371
2515
|
});
|
|
2372
2516
|
});
|
|
2373
2517
|
}
|
|
@@ -2386,20 +2530,20 @@ let rt = class extends Ee {
|
|
|
2386
2530
|
* 打开编辑器
|
|
2387
2531
|
*/
|
|
2388
2532
|
openEdit() {
|
|
2389
|
-
const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls, s = e.camera, a = n.box.center, r = e.camera.position.clone(), l = o?.target?.clone(), d = new m.Vector2(), c = new m.Raycaster(), h = this.coords,
|
|
2533
|
+
const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls, s = e.camera, a = n.box.center, r = e.camera.position.clone(), l = o?.target?.clone(), d = new m.Vector2(), c = new m.Raycaster(), h = this.coords, f = this.pointerPosition;
|
|
2390
2534
|
this.container.position.z = n.originalZAverage, e.scene.add(this.container), o && (s.position.set(a.x, a.y, 15), o.target.set(a.x, a.y, 0), o.enableRotate = !1);
|
|
2391
|
-
const
|
|
2535
|
+
const y = () => {
|
|
2392
2536
|
e.renderer.getSize(d);
|
|
2393
|
-
const b = t.pointer.x / d.x * 2 - 1,
|
|
2394
|
-
h.set(b,
|
|
2395
|
-
const
|
|
2396
|
-
|
|
2537
|
+
const b = t.pointer.x / d.x * 2 - 1, w = -(t.pointer.y / d.y * 2 - 1);
|
|
2538
|
+
h.set(b, w), c.setFromCamera(h, e.camera.children.length ? e.camera.children[0] : e.camera);
|
|
2539
|
+
const E = c.intersectObject(this.plane);
|
|
2540
|
+
E.length && (f.copy(E[0].point), this.dispatchEvent({
|
|
2397
2541
|
type: "pointerPositionChange",
|
|
2398
|
-
position:
|
|
2542
|
+
position: f
|
|
2399
2543
|
}));
|
|
2400
2544
|
};
|
|
2401
|
-
t.addEventListener("mousemove",
|
|
2402
|
-
t.removeEventListener("mousemove",
|
|
2545
|
+
t.addEventListener("mousemove", y), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
|
|
2546
|
+
t.removeEventListener("mousemove", y), o && (s.position.copy(r), o.enableRotate = !0, o.target.copy(l));
|
|
2403
2547
|
};
|
|
2404
2548
|
}
|
|
2405
2549
|
/**
|
|
@@ -2412,7 +2556,7 @@ let rt = class extends Ee {
|
|
|
2412
2556
|
super.destroy(), this.exitEdit(), this.renderer.scene.remove(this.container), this.domElement.remove(), this.app?.unmount();
|
|
2413
2557
|
}
|
|
2414
2558
|
};
|
|
2415
|
-
class
|
|
2559
|
+
class Eo extends N {
|
|
2416
2560
|
static name = "PointDrag";
|
|
2417
2561
|
container = new m.Group();
|
|
2418
2562
|
interruptKeys = ["escape"];
|
|
@@ -2442,13 +2586,13 @@ class fo extends V {
|
|
|
2442
2586
|
*/
|
|
2443
2587
|
drag(e, { point: t, line: n }) {
|
|
2444
2588
|
this.domElement.style.cursor = "crosshair";
|
|
2445
|
-
const o = n.start.equal(
|
|
2589
|
+
const o = n.start.equal(V.from(t)) ? "start" : "end", s = o == "start" ? new m.Vector3(n.end.x, n.end.y, 0) : new m.Vector3(n.start.x, n.start.y, 0), a = t.clone(), r = new fe([s, a], 16711935), l = new m.Mesh(new m.SphereGeometry(0.03), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
2446
2590
|
this.container.add(r), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2447
2591
|
let { point: d, find: c } = this.editor.renderManager.adsorption(), h = "none";
|
|
2448
2592
|
if (d) {
|
|
2449
2593
|
if (this.dispatchEvent({ type: "pointerMove", point: d }), this.eventInput.isKeyDown("shift")) {
|
|
2450
|
-
const
|
|
2451
|
-
d.set(
|
|
2594
|
+
const f = n.projectPoint(V.from(d), !1);
|
|
2595
|
+
d.set(f?.x ?? d.x, f?.y ?? d.y, 0), c = !0, h = "crosshair";
|
|
2452
2596
|
}
|
|
2453
2597
|
c ? (l.position.copy(d), this.container.add(l)) : (l.removeFromParent(), h = "crosshair"), a.copy(d), r.setPoint(s, a), this.domElement.style.cursor = h;
|
|
2454
2598
|
}
|
|
@@ -2477,43 +2621,15 @@ class fo extends V {
|
|
|
2477
2621
|
return this.completed(e), e;
|
|
2478
2622
|
}
|
|
2479
2623
|
}
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
shortcutKeys = ["v"];
|
|
2483
|
-
static commandName = "VerticalReferenceLine";
|
|
2484
|
-
onAddFromParent(e) {
|
|
2485
|
-
super.onAddFromParent(e);
|
|
2486
|
-
const t = this.commandManager.addCommandFlow(re.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalReferenceLine.bind(this));
|
|
2487
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(re.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
2488
|
-
this.eventInput.isKeyCombination(re.commandName) && await this.commandManager.start(re.commandName, [...this.default.selectLines]);
|
|
2489
|
-
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
2490
|
-
}
|
|
2491
|
-
/**
|
|
2492
|
-
* 进入命令约束
|
|
2493
|
-
*/
|
|
2494
|
-
constraint(e, t) {
|
|
2495
|
-
Array.isArray(t) ? t.length !== 1 ? (D({ message: "请选择一条线段", type: "warning" }), this.cancel()) : e(t) : (D({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
2496
|
-
}
|
|
2497
|
-
/**
|
|
2498
|
-
*
|
|
2499
|
-
* @param next
|
|
2500
|
-
* @param selectLines
|
|
2501
|
-
*/
|
|
2502
|
-
verticalReferenceLine(e, t) {
|
|
2503
|
-
this.renderManager.lines.forEach((n) => {
|
|
2504
|
-
delete n.userData.isVerticalReferenceLine;
|
|
2505
|
-
}), t[0].userData.isVerticalReferenceLine = !0, e(), this.renderManager.draw();
|
|
2506
|
-
}
|
|
2507
|
-
}
|
|
2508
|
-
function Je(i, e = {}) {
|
|
2509
|
-
i.addComponent(new rt(e.viewPermission)), i.addComponent(new Un()), i.addComponent(new Be()), i.addComponent(new pn()), i.addComponent(new qn()), i.addComponent(new Zn()), i.addComponent(new fo()), i.addComponent(new $()), i.addComponent(new X()), i.addComponent(new de()), i.addComponent(new ee()), i.addComponent(new te()), i.addComponent(new ne()), i.addComponent(new oe()), i.addComponent(new se()), i.addComponent(new re());
|
|
2624
|
+
function Ue(i, e = {}) {
|
|
2625
|
+
i.addComponent(new dt(e.viewPermission)), i.addComponent(new eo()), i.addComponent(new Se()), i.addComponent(new vn()), i.addComponent(new to()), i.addComponent(new no()), i.addComponent(new Eo()), i.addComponent(new X()), i.addComponent(new Y()), i.addComponent(new de()), i.addComponent(new $()), i.addComponent(new ee()), i.addComponent(new te()), i.addComponent(new ne()), i.addComponent(new oe()), i.addComponent(new se()), i.addComponent(new rt());
|
|
2510
2626
|
}
|
|
2511
|
-
const
|
|
2627
|
+
const _o = Object.assign(Ue, {
|
|
2512
2628
|
create(i = {}) {
|
|
2513
|
-
return (e) =>
|
|
2629
|
+
return (e) => Ue(e, i);
|
|
2514
2630
|
}
|
|
2515
2631
|
});
|
|
2516
2632
|
export {
|
|
2517
|
-
|
|
2518
|
-
|
|
2633
|
+
_o as Editor,
|
|
2634
|
+
Ue as Editor_
|
|
2519
2635
|
};
|