@xtctwins/tctwins-bimx-engine 0.3.13 → 0.3.15

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.
Files changed (37) hide show
  1. package/dist/{AnnotationTool-k3W4xmw6.mjs → AnnotationTool-B6og2Glz.mjs} +2 -2
  2. package/dist/BIMX_Viewer_Lib.es.js +1 -1
  3. package/dist/BIMX_Viewer_Lib.umd.js +119 -119
  4. package/dist/{CameraViewTool-CuXnJa74.mjs → CameraViewTool-DHsH_nT2.mjs} +1 -1
  5. package/dist/{CommentTool-CUtaZc7Y.mjs → CommentTool-FNv2gMNk.mjs} +1 -1
  6. package/dist/{HiddenTool-CzJ19mP1.mjs → HiddenTool-BDSk2sdn.mjs} +1 -1
  7. package/dist/{InspectorTool-BTH82K8b.mjs → InspectorTool-1sTEP0Ws.mjs} +3 -3
  8. package/dist/{MeasureTool-BvPkIvmX.mjs → MeasureTool-GbBIX0Yk.mjs} +3 -3
  9. package/dist/{MouseTool-CiywjpW3.mjs → MouseTool-BteU7vCT.mjs} +1 -1
  10. package/dist/{NavigateTool-CDlYpMXl.mjs → NavigateTool-BG3JKhQg.mjs} +1 -1
  11. package/dist/{OperateTool-NMIYz2YN.mjs → OperateTool-D3gf6bCT.mjs} +1 -1
  12. package/dist/{RoamTool-BkwJBBAg.mjs → RoamTool-V9vWQIDB.mjs} +1 -1
  13. package/dist/{ScreenShotTool-BP-xDRKf.mjs → ScreenShotTool-DwZpoH2C.mjs} +2 -2
  14. package/dist/{SectionTool-mt4iqa1I.mjs → SectionTool-DMFA7ztx.mjs} +3 -3
  15. package/dist/SettingTool-dR6DkE24.mjs +1787 -0
  16. package/dist/{StructureTree-C8C435JY.mjs → StructureTree-w9pdtGNu.mjs} +3 -3
  17. package/dist/{alert-B9Uw8l52.mjs → alert-CbVefMZQ.mjs} +1 -1
  18. package/dist/{index-B_IMYBaJ.mjs → index-DpV5VBf5.mjs} +31017 -30228
  19. package/dist/{panel.vue_vue_type_style_index_0_lang-BswWCo8x.mjs → panel.vue_vue_type_style_index_0_lang-CcDA1fsF.mjs} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/{tallPanel-CnTIaRU-.mjs → tallPanel-Br-fRsqc.mjs} +1 -1
  22. package/package.json +2 -2
  23. package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +1 -1
  24. package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +1 -1
  25. package/types/components/BCFComponents/commentInput.vue.d.ts +1 -1
  26. package/types/components/BCFComponents/commentsView.vue.d.ts +4 -4
  27. package/types/components/BCFComponents/imageView.vue.d.ts +1 -1
  28. package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +1 -1
  29. package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +1 -1
  30. package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +4 -4
  31. package/types/i18n/index.d.ts +8 -0
  32. package/types/i18n/locales/en-US.d.ts +2 -0
  33. package/types/i18n/locales/zh-CN.d.ts +2 -0
  34. package/types/store/bcfReflect.d.ts +1 -1
  35. package/types/utils/eventBus.d.ts +1 -1
  36. package/types/viewerManager/initial/viewerInitial.d.ts +1 -0
  37. package/dist/SettingTool-DieHq4VO.mjs +0 -1745
@@ -1,1745 +0,0 @@
1
- import { ao as re, an as Z, m as Me, az as he, am as xe, b as ze, ap as je, j as ue, aq as De, B as dt, u as Le, au as Je, i as Ue, x as Se, a as Ze, ar as qe, E as ye, aA as at, J as yt, aB as Qe, o as Be, N as Pe, z as ct, aC as Vt, A as ge, w as _e, l as $e, aD as vt, y as Ke, aE as it, aF as pt, W as wt, av as mt, c as St, g as Re, h as Fe, aG as kt, aH as st, F as xt, O as Et, G as Nt, T as ot, H as pe, aI as Ee, I as Ne, K as Ct, aJ as Bt, v as It, L as Tt, a0 as Mt, M as $t } from "./index-B_IMYBaJ.mjs";
2
- import { _ as Pt } from "./panel.vue_vue_type_style_index_0_lang-BswWCo8x.mjs";
3
- import { ArrowDown as At, Minus as zt, ArrowUp as Lt, Plus as Ut, Loading as Ft } from "@element-plus/icons-vue";
4
- import { defineComponent as Te, ref as Y, reactive as et, computed as k, watch as Ve, onMounted as We, onUpdated as Ot, openBlock as h, createElementBlock as P, withModifiers as tt, normalizeClass as j, unref as t, withDirectives as ut, withKeys as Ge, renderSlot as be, createVNode as R, withCtx as ne, createBlock as q, createCommentVNode as X, createSlots as Rt, nextTick as Ae, watchEffect as Kt, shallowRef as ft, inject as Wt, toRefs as He, normalizeStyle as me, createElementVNode as r, toDisplayString as A, h as Yt, provide as Xt, Fragment as we, renderList as Ie, resolveDynamicComponent as Ce, onBeforeUnmount as jt, createTextVNode as fe } from "vue";
5
- import { T as Gt } from "./timer-DoTiGoWP.mjs";
6
- const Ht = ze({
7
- /**
8
- * @description same as `id` in native input
9
- */
10
- id: {
11
- type: String,
12
- default: void 0
13
- },
14
- /**
15
- * @description incremental step
16
- */
17
- step: {
18
- type: Number,
19
- default: 1
20
- },
21
- /**
22
- * @description whether input value can only be multiple of step
23
- */
24
- stepStrictly: Boolean,
25
- /**
26
- * @description the maximum allowed value
27
- */
28
- max: {
29
- type: Number,
30
- default: Number.MAX_SAFE_INTEGER
31
- },
32
- /**
33
- * @description the minimum allowed value
34
- */
35
- min: {
36
- type: Number,
37
- default: Number.MIN_SAFE_INTEGER
38
- },
39
- /**
40
- * @description binding value
41
- */
42
- modelValue: { type: [Number, null] },
43
- /**
44
- * @description same as `readonly` in native input
45
- */
46
- readonly: Boolean,
47
- /**
48
- * @description whether the component is disabled
49
- */
50
- disabled: {
51
- type: Boolean,
52
- default: void 0
53
- },
54
- /**
55
- * @description size of the component
56
- */
57
- size: je,
58
- /**
59
- * @description whether to enable the control buttons
60
- */
61
- controls: {
62
- type: Boolean,
63
- default: !0
64
- },
65
- /**
66
- * @description position of the control buttons
67
- */
68
- controlsPosition: {
69
- type: String,
70
- default: "",
71
- values: ["", "right"]
72
- },
73
- /**
74
- * @description value should be set when input box is cleared
75
- */
76
- valueOnClear: {
77
- type: ue([
78
- String,
79
- Number,
80
- null
81
- ]),
82
- validator: (e) => e === null || Z(e) || ["min", "max"].includes(e),
83
- default: null
84
- },
85
- /**
86
- * @description same as `name` in native input
87
- */
88
- name: String,
89
- /**
90
- * @description same as `placeholder` in native input
91
- */
92
- placeholder: String,
93
- /**
94
- * @description precision of input value
95
- */
96
- precision: {
97
- type: Number,
98
- validator: (e) => e >= 0 && e === Number.parseInt(`${e}`, 10)
99
- },
100
- /**
101
- * @description whether to trigger form validation
102
- */
103
- validateEvent: {
104
- type: Boolean,
105
- default: !0
106
- },
107
- ...De(["ariaLabel"]),
108
- /**
109
- * @description native input mode for virtual keyboards
110
- */
111
- inputmode: {
112
- type: ue(String),
113
- default: void 0
114
- },
115
- /**
116
- * @description alignment for the inner input text
117
- */
118
- align: {
119
- type: ue(String),
120
- default: "center"
121
- },
122
- /**
123
- * @description whether to disable scientific notation input (e.g. 'e', 'E')
124
- */
125
- disabledScientific: Boolean,
126
- /**
127
- * @description specifies the format of the value presented in the input
128
- */
129
- formatter: { type: Function },
130
- /**
131
- * @description specifies the value extracted from the formatted input
132
- */
133
- parser: { type: Function },
134
- /**
135
- * @description same as `tabindex` in native input
136
- */
137
- tabindex: {
138
- type: [String, Number],
139
- default: 0
140
- }
141
- }), Dt = {
142
- [xe]: (e, a) => a !== e,
143
- blur: (e) => e instanceof FocusEvent,
144
- focus: (e) => e instanceof FocusEvent,
145
- [he]: (e) => Z(e) || Me(e),
146
- [re]: (e) => Z(e) || Me(e)
147
- }, Jt = ["aria-label"], Zt = ["aria-label"];
148
- var qt = /* @__PURE__ */ Te({
149
- name: "ElInputNumber",
150
- __name: "input-number",
151
- props: Ht,
152
- emits: Dt,
153
- setup(e, { expose: a, emit: u }) {
154
- const n = e, b = u, { t: v } = dt(), g = Le("input-number"), m = Y(), f = et({
155
- currentValue: n.modelValue,
156
- userInput: null
157
- }), { formItem: s } = Je(), x = k(() => Z(n.modelValue) && n.modelValue <= n.min), z = k(() => Z(n.modelValue) && n.modelValue >= n.max), I = k(() => {
158
- const i = D(n.step);
159
- return Ue(n.precision) ? Math.max(D(n.modelValue), i) : (i > n.precision && Se("InputNumber", "precision should not be less than the decimal places of step"), n.precision);
160
- }), G = k(() => n.controls && n.controlsPosition === "right"), H = Ze(), L = qe(), F = k(() => {
161
- if (f.userInput !== null) return f.userInput;
162
- let i = f.currentValue;
163
- if (Me(i)) return "";
164
- if (Z(i)) {
165
- if (Number.isNaN(i)) return "";
166
- Ue(n.precision) || (i = i.toFixed(n.precision));
167
- }
168
- return i;
169
- }), p = (i, d) => {
170
- if (Ue(d) && (d = I.value), d === 0) return Math.round(i);
171
- let w = String(i);
172
- const C = w.indexOf(".");
173
- if (C === -1 || !w.replace(".", "").split("")[C + d]) return i;
174
- const ee = w.length;
175
- return w.charAt(ee - 1) === "5" && (w = `${w.slice(0, Math.max(0, ee - 1))}6`), Number.parseFloat(Number(w).toFixed(d));
176
- }, D = (i) => {
177
- if (Me(i)) return 0;
178
- const d = i.toString(), w = d.indexOf(".");
179
- let C = 0;
180
- return w !== -1 && (C = d.length - w - 1), C;
181
- }, K = (i, d = 1) => Z(i) ? i >= Number.MAX_SAFE_INTEGER && d === 1 ? (Se("InputNumber", "The value has reached the maximum safe integer limit."), i) : i <= Number.MIN_SAFE_INTEGER && d === -1 ? (Se("InputNumber", "The value has reached the minimum safe integer limit."), i) : p(i + n.step * d) : f.currentValue, ie = (i) => {
182
- const d = ct(i), w = Vt(i);
183
- if (n.disabledScientific && ["e", "E"].includes(w)) {
184
- i.preventDefault();
185
- return;
186
- }
187
- switch (d) {
188
- case ge.up:
189
- i.preventDefault(), y();
190
- break;
191
- case ge.down:
192
- i.preventDefault(), E();
193
- }
194
- }, y = () => {
195
- if (n.readonly || L.value || z.value) return;
196
- const i = Number(F.value) || 0, d = K(i);
197
- U(d), b(he, f.currentValue), se();
198
- }, E = () => {
199
- if (n.readonly || L.value || x.value) return;
200
- const i = Number(F.value) || 0, d = K(i, -1);
201
- U(d), b(he, f.currentValue), se();
202
- }, J = (i, d) => {
203
- const { max: w, min: C, step: ee, precision: te, stepStrictly: oe, valueOnClear: le } = n;
204
- w < C && Qe("InputNumber", "min should not be greater than max.");
205
- let $ = i ? Number.parseFloat(String(i)) : Number(i);
206
- if (Me(i) || Number.isNaN($)) return null;
207
- if (i === "") {
208
- if (le === null) return null;
209
- $ = Be(le) ? {
210
- min: C,
211
- max: w
212
- }[le] : le;
213
- }
214
- return oe && ($ = p(Math.round(p($ / ee)) * ee, te), $ !== i && d && b("update:modelValue", $)), Ue(te) || ($ = p($, te)), ($ > w || $ < C) && ($ = $ > w ? w : C, d && b("update:modelValue", $)), $;
215
- }, U = (i, d = !0) => {
216
- var ee;
217
- const w = f.currentValue, C = J(i);
218
- if (!d) {
219
- b(re, C);
220
- return;
221
- }
222
- f.userInput = null, !(w === C && i) && (b(re, C), w !== C && b(xe, C, w), n.validateEvent && ((ee = s == null ? void 0 : s.validate) == null || ee.call(s, "change").catch(Pe)), f.currentValue = C);
223
- }, _ = (i) => {
224
- f.userInput = i;
225
- let d = i === "" ? null : Number.parseFloat(i);
226
- Number.isNaN(d) && (d = null), b(he, d), U(d, !1);
227
- }, de = (i) => {
228
- const d = i !== "" ? Number.parseFloat(i) : "";
229
- (Z(d) && !Number.isNaN(d) || n.formatter && Number.isNaN(d) || d === "") && U(d), se(), f.userInput = null;
230
- }, N = () => {
231
- var i, d;
232
- (d = (i = m.value) == null ? void 0 : i.focus) == null || d.call(i);
233
- }, T = () => {
234
- var i, d;
235
- (d = (i = m.value) == null ? void 0 : i.blur) == null || d.call(i);
236
- }, M = (i) => {
237
- b("focus", i);
238
- }, ce = (i) => {
239
- var d, w, C;
240
- f.userInput = null, f.currentValue === null && ((d = m.value) != null && d.input) && (m.value.input.value = ((w = n.formatter) == null ? void 0 : w.call(n, "")) ?? ""), b("blur", i), n.validateEvent && ((C = s == null ? void 0 : s.validate) == null || C.call(s, "blur").catch(Pe));
241
- }, se = () => {
242
- f.currentValue !== n.modelValue && (f.currentValue = n.modelValue);
243
- }, ve = (i) => {
244
- document.activeElement === i.target && i.preventDefault();
245
- };
246
- return Ve(() => n.modelValue, (i, d) => {
247
- const w = J(i, !0);
248
- f.userInput === null && w !== d && (f.currentValue = w);
249
- }, { immediate: !0 }), Ve(() => n.precision, () => {
250
- f.currentValue = J(n.modelValue);
251
- }), We(() => {
252
- var ee;
253
- const { min: i, max: d, modelValue: w } = n, C = (ee = m.value) == null ? void 0 : ee.input;
254
- if (C.setAttribute("role", "spinbutton"), Number.isFinite(d) ? C.setAttribute("aria-valuemax", String(d)) : C.removeAttribute("aria-valuemax"), Number.isFinite(i) ? C.setAttribute("aria-valuemin", String(i)) : C.removeAttribute("aria-valuemin"), C.setAttribute("aria-valuenow", f.currentValue || f.currentValue === 0 ? String(f.currentValue) : ""), C.setAttribute("aria-disabled", String(L.value)), !Z(w) && w != null) {
255
- let te = Number(w);
256
- Number.isNaN(te) && (te = null), b(re, te);
257
- }
258
- C.addEventListener("wheel", ve, { passive: !1 });
259
- }), Ot(() => {
260
- var i, d;
261
- (d = (i = m.value) == null ? void 0 : i.input) == null || d.setAttribute("aria-valuenow", `${f.currentValue ?? ""}`);
262
- }), a({
263
- /** @description get focus the input component */
264
- focus: N,
265
- /** @description remove focus the input component */
266
- blur: T
267
- }), (i, d) => (h(), P("div", {
268
- class: j([
269
- t(g).b(),
270
- t(g).m(t(H)),
271
- t(g).is("disabled", t(L)),
272
- t(g).is("without-controls", !e.controls),
273
- t(g).is("controls-right", G.value),
274
- t(g).is(e.align, !!e.align)
275
- ]),
276
- onDragstart: d[0] || (d[0] = tt(() => {
277
- }, ["prevent"]))
278
- }, [
279
- e.controls ? ut((h(), P("span", {
280
- key: 0,
281
- role: "button",
282
- "aria-label": t(v)("el.inputNumber.decrease"),
283
- class: j([t(g).e("decrease"), t(g).is("disabled", x.value)]),
284
- onKeydown: Ge(E, ["enter"])
285
- }, [be(i.$slots, "decrease-icon", {}, () => [R(t(ye), null, {
286
- default: ne(() => [G.value ? (h(), q(t(At), { key: 0 })) : (h(), q(t(zt), { key: 1 }))]),
287
- _: 1
288
- })])], 42, Jt)), [[t(at), E]]) : X("v-if", !0),
289
- e.controls ? ut((h(), P("span", {
290
- key: 1,
291
- role: "button",
292
- "aria-label": t(v)("el.inputNumber.increase"),
293
- class: j([t(g).e("increase"), t(g).is("disabled", z.value)]),
294
- onKeydown: Ge(y, ["enter"])
295
- }, [be(i.$slots, "increase-icon", {}, () => [R(t(ye), null, {
296
- default: ne(() => [G.value ? (h(), q(t(Lt), { key: 0 })) : (h(), q(t(Ut), { key: 1 }))]),
297
- _: 1
298
- })])], 42, Zt)), [[t(at), y]]) : X("v-if", !0),
299
- R(t(yt), {
300
- id: e.id,
301
- ref_key: "input",
302
- ref: m,
303
- type: e.formatter ? "text" : "number",
304
- step: e.step,
305
- "model-value": F.value,
306
- placeholder: e.placeholder,
307
- readonly: e.readonly,
308
- disabled: t(L),
309
- size: t(H),
310
- max: e.max,
311
- min: e.min,
312
- name: e.name,
313
- "aria-label": e.ariaLabel,
314
- "validate-event": !1,
315
- inputmode: e.inputmode,
316
- formatter: e.formatter,
317
- parser: e.parser,
318
- tabindex: e.tabindex,
319
- onKeydown: ie,
320
- onBlur: ce,
321
- onFocus: M,
322
- onInput: _,
323
- onChange: de
324
- }, Rt({ _: 2 }, [i.$slots.prefix ? {
325
- name: "prefix",
326
- fn: ne(() => [be(i.$slots, "prefix")]),
327
- key: "0"
328
- } : void 0, i.$slots.suffix ? {
329
- name: "suffix",
330
- fn: ne(() => [be(i.$slots, "suffix")]),
331
- key: "1"
332
- } : void 0]), 1032, [
333
- "id",
334
- "type",
335
- "step",
336
- "model-value",
337
- "placeholder",
338
- "readonly",
339
- "disabled",
340
- "size",
341
- "max",
342
- "min",
343
- "name",
344
- "aria-label",
345
- "inputmode",
346
- "formatter",
347
- "parser",
348
- "tabindex"
349
- ])
350
- ], 34));
351
- }
352
- }), Qt = qt;
353
- const _t = _e(Qt), gt = Symbol("sliderContextKey"), el = ze({
354
- /**
355
- * @description binding value
356
- */
357
- modelValue: {
358
- type: ue([Number, Array]),
359
- default: 0
360
- },
361
- id: {
362
- type: String,
363
- default: void 0
364
- },
365
- /**
366
- * @description minimum value
367
- */
368
- min: {
369
- type: Number,
370
- default: 0
371
- },
372
- /**
373
- * @description maximum value
374
- */
375
- max: {
376
- type: Number,
377
- default: 100
378
- },
379
- /**
380
- * @description step size, can be a number or `'mark'` to restrict values to marks. When set to `'mark'`, the `marks` attribute must be set
381
- */
382
- step: {
383
- type: ue([Number, String]),
384
- default: 1
385
- },
386
- /**
387
- * @description whether to display an input box, works when `range` is false and `step` is not `'mark'`
388
- */
389
- showInput: Boolean,
390
- /**
391
- * @description whether to display control buttons when `show-input` is true
392
- */
393
- showInputControls: {
394
- type: Boolean,
395
- default: !0
396
- },
397
- /**
398
- * @description size of the slider wrapper, will not work in vertical mode
399
- */
400
- size: je,
401
- /**
402
- * @description size of the input box, when set `size`, the default is the value of `size`
403
- */
404
- inputSize: je,
405
- /**
406
- * @description whether to display breakpoints
407
- */
408
- showStops: Boolean,
409
- /**
410
- * @description whether to display tooltip value
411
- */
412
- showTooltip: {
413
- type: Boolean,
414
- default: !0
415
- },
416
- /**
417
- * @description format to display tooltip value
418
- */
419
- formatTooltip: {
420
- type: ue(Function),
421
- default: void 0
422
- },
423
- /**
424
- * @description whether Slider is disabled
425
- */
426
- disabled: {
427
- type: Boolean,
428
- default: void 0
429
- },
430
- /**
431
- * @description whether to select a range
432
- */
433
- range: Boolean,
434
- /**
435
- * @description vertical mode
436
- */
437
- vertical: Boolean,
438
- /**
439
- * @description slider height, required in vertical mode
440
- */
441
- height: String,
442
- /**
443
- * @description when `range` is true, screen reader label for the start of the range
444
- */
445
- rangeStartLabel: {
446
- type: String,
447
- default: void 0
448
- },
449
- /**
450
- * @description when `range` is true, screen reader label for the end of the range
451
- */
452
- rangeEndLabel: {
453
- type: String,
454
- default: void 0
455
- },
456
- /**
457
- * @description format to display the `aria-valuenow` attribute for screen readers
458
- */
459
- formatValueText: {
460
- type: ue(Function),
461
- default: void 0
462
- },
463
- /**
464
- * @description custom class name for the tooltip
465
- */
466
- tooltipClass: {
467
- type: ue([
468
- String,
469
- Array,
470
- Object,
471
- Boolean
472
- ]),
473
- default: void 0
474
- },
475
- /**
476
- * @description position of Tooltip
477
- */
478
- placement: {
479
- type: String,
480
- values: vt,
481
- default: "top"
482
- },
483
- /**
484
- * @description marks, type of key must be `number` and must in closed interval `[min, max]`, each mark can custom style
485
- */
486
- marks: { type: ue(Object) },
487
- /**
488
- * @description whether to trigger form validation
489
- */
490
- validateEvent: {
491
- type: Boolean,
492
- default: !0
493
- },
494
- /**
495
- * @description when slider tooltip inactive and `persistent` is `false` , popconfirm will be destroyed. `persistent` always be `false` when `show-tooltip ` is `false`
496
- */
497
- persistent: {
498
- type: Boolean,
499
- default: !0
500
- },
501
- ...De(["ariaLabel"])
502
- }), Xe = (e) => Z(e) || $e(e) && e.every(Z), tl = {
503
- [re]: Xe,
504
- [he]: Xe,
505
- [xe]: Xe
506
- }, ll = (e, a, u) => {
507
- const n = Y();
508
- return We(async () => {
509
- e.range ? ($e(e.modelValue) ? (a.firstValue = Math.max(e.min, e.modelValue[0]), a.secondValue = Math.min(e.max, e.modelValue[1])) : (a.firstValue = e.min, a.secondValue = e.max), a.oldValue = [a.firstValue, a.secondValue]) : (!Z(e.modelValue) || Number.isNaN(e.modelValue) ? a.firstValue = e.min : a.firstValue = Math.min(e.max, Math.max(e.min, e.modelValue)), a.oldValue = a.firstValue), Ke(window, "resize", u), await Ae(), u();
510
- }), { sliderWrapper: n };
511
- }, nl = (e) => {
512
- const a = k(() => e.marks ? Object.keys(e.marks).map(Number.parseFloat).sort((u, n) => u - n).filter((u) => u <= e.max && u >= e.min).map((u) => ({
513
- point: u,
514
- position: (u - e.min) * 100 / (e.max - e.min),
515
- mark: e.marks[u]
516
- })) : []);
517
- return Kt(() => {
518
- if (e.step === "mark" && !e.marks && Se("ElSlider", "marks prop must be provided when step is mark"), e.marks) {
519
- const u = Object.keys(e.marks), n = a.value.map((v) => v.point), b = u.filter((v) => {
520
- const g = Number.parseFloat(v);
521
- return Number.isNaN(g) || !n.includes(g);
522
- });
523
- b.length > 0 && Se("ElSlider", `Some marks keys are invalid (not a number or out of [min, max]): [${b.map((v) => `'${v}'`).join(", ")}] and will be ignored.`);
524
- }
525
- }), a;
526
- }, al = (e, a, u) => {
527
- const { formItem: n } = Je(), b = ft(), v = Y(), g = Y(), m = {
528
- firstButton: v,
529
- secondButton: g
530
- }, f = qe(), s = k(() => Math.min(a.firstValue, a.secondValue)), x = k(() => Math.max(a.firstValue, a.secondValue)), z = k(() => e.range ? `${100 * (x.value - s.value) / (e.max - e.min)}%` : `${100 * (a.firstValue - e.min) / (e.max - e.min)}%`), I = k(() => e.range ? `${100 * (s.value - e.min) / (e.max - e.min)}%` : "0%"), G = k(() => e.vertical ? { height: e.height } : {}), H = k(() => e.vertical ? {
531
- height: z.value,
532
- bottom: I.value
533
- } : {
534
- width: z.value,
535
- left: I.value
536
- }), L = () => {
537
- b.value && (a.sliderSize = b.value.getBoundingClientRect()[e.vertical ? "height" : "width"]);
538
- }, F = (N) => {
539
- const T = e.min + N * (e.max - e.min) / 100;
540
- if (!e.range) return v;
541
- let M;
542
- return Math.abs(s.value - T) < Math.abs(x.value - T) ? M = a.firstValue < a.secondValue ? "firstButton" : "secondButton" : M = a.firstValue > a.secondValue ? "firstButton" : "secondButton", m[M];
543
- }, p = (N) => {
544
- const T = F(N);
545
- return T.value.setPosition(N), T;
546
- }, D = (N) => {
547
- a.firstValue = N ?? e.min, ie(e.range ? [s.value, x.value] : N ?? e.min);
548
- }, K = (N) => {
549
- a.secondValue = N, e.range && ie([s.value, x.value]);
550
- }, ie = (N) => {
551
- u(re, N), u(he, N);
552
- }, y = async () => {
553
- await Ae(), u(xe, e.range ? [s.value, x.value] : e.modelValue);
554
- }, E = (N) => {
555
- var M, ce, se, ve;
556
- if (f.value || a.dragging) return;
557
- L();
558
- let T = 0;
559
- if (e.vertical) {
560
- const i = ((ce = (M = N.touches) == null ? void 0 : M.item(0)) == null ? void 0 : ce.clientY) ?? N.clientY;
561
- T = (b.value.getBoundingClientRect().bottom - i) / a.sliderSize * 100;
562
- } else T = ((((ve = (se = N.touches) == null ? void 0 : se.item(0)) == null ? void 0 : ve.clientX) ?? N.clientX) - b.value.getBoundingClientRect().left) / a.sliderSize * 100;
563
- if (!(T < 0 || T > 100))
564
- return p(T);
565
- };
566
- return {
567
- elFormItem: n,
568
- slider: b,
569
- firstButton: v,
570
- secondButton: g,
571
- sliderDisabled: f,
572
- minValue: s,
573
- maxValue: x,
574
- runwayStyle: G,
575
- barStyle: H,
576
- resetSize: L,
577
- setPosition: p,
578
- emitChange: y,
579
- onSliderWrapperPrevent: (N) => {
580
- var T, M;
581
- ((T = m.firstButton.value) != null && T.dragging || (M = m.secondButton.value) != null && M.dragging) && N.preventDefault();
582
- },
583
- onSliderClick: (N) => {
584
- E(N) && y();
585
- },
586
- onSliderDown: async (N) => {
587
- const T = E(N);
588
- T && (await Ae(), T.value.onButtonDown(N));
589
- },
590
- onSliderMarkerDown: (N) => {
591
- f.value || a.dragging || p(N) && y();
592
- },
593
- setFirstValue: D,
594
- setSecondValue: K
595
- };
596
- }, il = (e, a, u, n) => ({
597
- stops: k(() => {
598
- if (!e.showStops || e.min > e.max) return [];
599
- if (e.step === "mark" || e.step === 0)
600
- return e.step === 0 && Se("ElSlider", "step should not be 0."), [];
601
- const g = Math.ceil((e.max - e.min) / e.step), m = 100 * e.step / (e.max - e.min), f = Array.from({ length: g - 1 }).map((s, x) => (x + 1) * m);
602
- return e.range ? f.filter((s) => s < 100 * (u.value - e.min) / (e.max - e.min) || s > 100 * (n.value - e.min) / (e.max - e.min)) : f.filter((s) => s > 100 * (a.firstValue - e.min) / (e.max - e.min));
603
- }),
604
- getStopStyle: (g) => e.vertical ? { bottom: `${g}%` } : { left: `${g}%` }
605
- }), sl = (e, a, u, n, b, v) => {
606
- const g = (s) => {
607
- b(re, s), b(he, s);
608
- }, m = () => e.range ? ![u.value, n.value].every((s, x) => s === a.oldValue[x]) : e.modelValue !== a.oldValue, f = () => {
609
- var x, z;
610
- e.min > e.max && Qe("Slider", "min should not be greater than max.");
611
- const s = e.modelValue;
612
- e.range && $e(s) ? s[1] < e.min ? g([e.min, e.min]) : s[0] > e.max ? g([e.max, e.max]) : s[0] < e.min ? g([e.min, s[1]]) : s[1] > e.max ? g([s[0], e.max]) : (a.firstValue = s[0], a.secondValue = s[1], m() && (e.validateEvent && ((x = v == null ? void 0 : v.validate) == null || x.call(v, "change").catch(Pe)), a.oldValue = s.slice())) : !e.range && Z(s) && !Number.isNaN(s) && (s < e.min ? g(e.min) : s > e.max ? g(e.max) : (a.firstValue = s, m() && (e.validateEvent && ((z = v == null ? void 0 : v.validate) == null || z.call(v, "change").catch(Pe)), a.oldValue = s)));
613
- };
614
- f(), Ve(() => a.dragging, (s) => {
615
- s || f();
616
- }), Ve(() => e.modelValue, (s, x) => {
617
- a.dragging || $e(s) && $e(x) && s.every((z, I) => z === x[I]) && a.firstValue === s[0] && a.secondValue === s[1] || f();
618
- }, { deep: !0 }), Ve(() => [e.min, e.max], () => {
619
- f();
620
- });
621
- }, ol = (e, a, u) => {
622
- const n = Y(), b = Y(!1), v = k(() => a.value instanceof Function);
623
- return {
624
- tooltip: n,
625
- tooltipVisible: b,
626
- formatValue: k(() => v.value && a.value(e.modelValue) || e.modelValue),
627
- displayTooltip: it(() => {
628
- u.value && (b.value = !0);
629
- }, 50),
630
- hideTooltip: it(() => {
631
- u.value && (b.value = !1);
632
- }, 50)
633
- };
634
- }, ul = (e, a, u) => {
635
- const { disabled: n, min: b, max: v, step: g, showTooltip: m, persistent: f, precision: s, sliderSize: x, formatTooltip: z, emitChange: I, resetSize: G, updateDragging: H, markList: L } = Wt(gt), { tooltip: F, tooltipVisible: p, formatValue: D, displayTooltip: K, hideTooltip: ie } = ol(e, z, m), y = Y(), E = k(() => `${(e.modelValue - b.value) / (v.value - b.value) * 100}%`), J = k(() => e.vertical ? { bottom: E.value } : { left: E.value }), U = k(() => g.value === "mark" && L.value.length > 0), _ = () => {
636
- a.hovering = !0, K();
637
- }, de = () => {
638
- a.hovering = !1, a.dragging || ie();
639
- }, N = (V) => {
640
- n.value || (V.preventDefault(), te(V), window.addEventListener("mousemove", oe), window.addEventListener("touchmove", oe), window.addEventListener("mouseup", le), window.addEventListener("touchend", le), window.addEventListener("contextmenu", le), y.value.focus());
641
- }, T = (V) => {
642
- n.value || (a.newPosition = Number.parseFloat(E.value) + V / (v.value - b.value) * 100, $(a.newPosition), I());
643
- }, M = (V) => {
644
- if (n.value || !L.value.length) return;
645
- const B = e.modelValue, W = Number.EPSILON, ae = Math.abs(V);
646
- let S;
647
- if (V > 0) {
648
- const c = L.value.findIndex((l) => l.point > B + W);
649
- if (c !== -1) {
650
- const l = Math.min(c + ae - 1, L.value.length - 1);
651
- S = L.value[l].point;
652
- }
653
- } else {
654
- let c = -1;
655
- for (let l = L.value.length - 1; l >= 0; l--) if (L.value[l].point < B - W) {
656
- c = l;
657
- break;
658
- }
659
- if (c !== -1) {
660
- const l = Math.max(c - (ae - 1), 0);
661
- S = L.value[l].point;
662
- }
663
- }
664
- if (S !== void 0 && S !== B) {
665
- const c = (S - b.value) / (v.value - b.value) * 100;
666
- $(c), I();
667
- }
668
- }, ce = () => {
669
- U.value ? M(-1) : Z(g.value) && T(-g.value);
670
- }, se = () => {
671
- U.value ? M(1) : Z(g.value) && T(g.value);
672
- }, ve = () => {
673
- U.value ? M(-4) : Z(g.value) && T(-g.value * 4);
674
- }, i = () => {
675
- U.value ? M(4) : Z(g.value) && T(g.value * 4);
676
- }, d = () => {
677
- n.value || ($(0), I());
678
- }, w = () => {
679
- n.value || ($(100), I());
680
- }, C = (V) => {
681
- const B = ct(V);
682
- let W = !0;
683
- switch (B) {
684
- case ge.left:
685
- case ge.down:
686
- ce();
687
- break;
688
- case ge.right:
689
- case ge.up:
690
- se();
691
- break;
692
- case ge.home:
693
- d();
694
- break;
695
- case ge.end:
696
- w();
697
- break;
698
- case ge.pageDown:
699
- ve();
700
- break;
701
- case ge.pageUp:
702
- i();
703
- break;
704
- default:
705
- W = !1;
706
- }
707
- W && V.preventDefault();
708
- }, ee = (V) => {
709
- let B, W;
710
- return V.type.startsWith("touch") ? (W = V.touches[0].clientY, B = V.touches[0].clientX) : (W = V.clientY, B = V.clientX), {
711
- clientX: B,
712
- clientY: W
713
- };
714
- }, te = (V) => {
715
- a.dragging = !0, a.isClick = !0;
716
- const { clientX: B, clientY: W } = ee(V);
717
- e.vertical ? a.startY = W : a.startX = B, a.startPosition = Number.parseFloat(E.value), a.newPosition = a.startPosition;
718
- }, oe = (V) => {
719
- if (a.dragging) {
720
- a.isClick = !1, K(), G();
721
- let B;
722
- const { clientX: W, clientY: ae } = ee(V);
723
- e.vertical ? (a.currentY = ae, B = (a.startY - a.currentY) / x.value * 100) : (a.currentX = W, B = (a.currentX - a.startX) / x.value * 100), a.newPosition = a.startPosition + B, $(a.newPosition);
724
- }
725
- }, le = () => {
726
- a.dragging && (setTimeout(() => {
727
- a.dragging = !1, a.hovering || ie(), a.isClick || $(a.newPosition), I();
728
- }, 0), window.removeEventListener("mousemove", oe), window.removeEventListener("touchmove", oe), window.removeEventListener("mouseup", le), window.removeEventListener("touchend", le), window.removeEventListener("contextmenu", le));
729
- }, $ = async (V) => {
730
- if (V === null || Number.isNaN(+V)) return;
731
- V = pt(V, 0, 100);
732
- let B;
733
- if (g.value === "mark")
734
- L.value.length === 0 ? B = V <= 50 ? b.value : v.value : B = L.value.reduce((W, ae) => Math.abs(ae.position - V) < Math.abs(W.position - V) ? ae : W).point;
735
- else {
736
- const W = Math.floor((v.value - b.value) / g.value), ae = W * g.value / (v.value - b.value) * 100, S = ae + (100 - ae) / 2;
737
- if (V < ae) {
738
- const c = ae / W, l = Math.round(V / c);
739
- B = b.value + l * g.value;
740
- } else V < S ? B = b.value + W * g.value : B = v.value;
741
- B = Number.parseFloat(B.toFixed(s.value));
742
- }
743
- B !== e.modelValue && u(re, B), !a.dragging && e.modelValue !== a.oldValue && (a.oldValue = e.modelValue), await Ae(), a.dragging && K(), F.value.updatePopper();
744
- };
745
- return Ve(() => a.dragging, (V) => {
746
- H(V);
747
- }), Ke(y, "touchstart", N, { passive: !1 }), {
748
- disabled: n,
749
- button: y,
750
- tooltip: F,
751
- tooltipVisible: p,
752
- showTooltip: m,
753
- persistent: f,
754
- wrapperStyle: J,
755
- formatValue: D,
756
- handleMouseEnter: _,
757
- handleMouseLeave: de,
758
- onButtonDown: N,
759
- onKeyDown: C,
760
- setPosition: $
761
- };
762
- }, rl = ze({
763
- modelValue: {
764
- type: Number,
765
- default: 0
766
- },
767
- vertical: Boolean,
768
- tooltipClass: {
769
- type: ue([
770
- String,
771
- Array,
772
- Object,
773
- Boolean
774
- ]),
775
- default: void 0
776
- },
777
- placement: {
778
- type: String,
779
- values: vt,
780
- default: "top"
781
- }
782
- }), dl = { [re]: (e) => Z(e) }, cl = ["tabindex"];
783
- var vl = /* @__PURE__ */ Te({
784
- name: "ElSliderButton",
785
- __name: "button",
786
- props: rl,
787
- emits: dl,
788
- setup(e, { expose: a, emit: u }) {
789
- const n = e, b = u, v = Le("slider"), g = et({
790
- hovering: !1,
791
- dragging: !1,
792
- isClick: !1,
793
- startX: 0,
794
- currentX: 0,
795
- startY: 0,
796
- currentY: 0,
797
- startPosition: 0,
798
- newPosition: 0,
799
- oldValue: n.modelValue
800
- }), m = k(() => z.value ? I.value : !1), { disabled: f, button: s, tooltip: x, showTooltip: z, persistent: I, tooltipVisible: G, wrapperStyle: H, formatValue: L, handleMouseEnter: F, handleMouseLeave: p, onButtonDown: D, onKeyDown: K, setPosition: ie } = ul(n, g, b), { hovering: y, dragging: E } = He(g);
801
- return a({
802
- onButtonDown: D,
803
- onKeyDown: K,
804
- setPosition: ie,
805
- hovering: y,
806
- dragging: E
807
- }), (J, U) => (h(), P("div", {
808
- ref_key: "button",
809
- ref: s,
810
- class: j([t(v).e("button-wrapper"), {
811
- hover: t(y),
812
- dragging: t(E)
813
- }]),
814
- style: me(t(H)),
815
- tabindex: t(f) ? void 0 : 0,
816
- onMouseenter: U[0] || (U[0] = (..._) => t(F) && t(F)(..._)),
817
- onMouseleave: U[1] || (U[1] = (..._) => t(p) && t(p)(..._)),
818
- onMousedown: U[2] || (U[2] = (..._) => t(D) && t(D)(..._)),
819
- onFocus: U[3] || (U[3] = (..._) => t(F) && t(F)(..._)),
820
- onBlur: U[4] || (U[4] = (..._) => t(p) && t(p)(..._)),
821
- onKeydown: U[5] || (U[5] = (..._) => t(K) && t(K)(..._))
822
- }, [R(t(wt), {
823
- ref_key: "tooltip",
824
- ref: x,
825
- visible: t(G),
826
- placement: J.placement,
827
- "fallback-placements": [
828
- "top",
829
- "bottom",
830
- "right",
831
- "left"
832
- ],
833
- "stop-popper-mouse-event": !1,
834
- "popper-class": J.tooltipClass,
835
- disabled: !t(z),
836
- persistent: m.value
837
- }, {
838
- content: ne(() => [r("span", null, A(t(L)), 1)]),
839
- default: ne(() => [r("div", { class: j([t(v).e("button"), {
840
- hover: t(y),
841
- dragging: t(E)
842
- }]) }, null, 2)]),
843
- _: 1
844
- }, 8, [
845
- "visible",
846
- "placement",
847
- "popper-class",
848
- "disabled",
849
- "persistent"
850
- ])], 46, cl));
851
- }
852
- }), rt = vl;
853
- const ml = ze({ mark: {
854
- type: ue([String, Object]),
855
- default: void 0
856
- } });
857
- var fl = Te({
858
- name: "ElSliderMarker",
859
- props: ml,
860
- setup(e) {
861
- const a = Le("slider"), u = k(() => Be(e.mark) ? e.mark : e.mark.label), n = k(() => Be(e.mark) ? void 0 : e.mark.style);
862
- return () => Yt("div", {
863
- class: a.e("marks-text"),
864
- style: n.value
865
- }, u.value);
866
- }
867
- });
868
- const gl = [
869
- "id",
870
- "role",
871
- "aria-label",
872
- "aria-labelledby"
873
- ], bl = { key: 1 };
874
- var hl = /* @__PURE__ */ Te({
875
- name: "ElSlider",
876
- __name: "slider",
877
- props: el,
878
- emits: tl,
879
- setup(e, { expose: a, emit: u }) {
880
- const n = e, b = u, v = Le("slider"), { t: g } = dt(), m = et({
881
- firstValue: 0,
882
- secondValue: 0,
883
- oldValue: 0,
884
- dragging: !1,
885
- sliderSize: 1
886
- }), { elFormItem: f, slider: s, firstButton: x, secondButton: z, sliderDisabled: I, minValue: G, maxValue: H, runwayStyle: L, barStyle: F, resetSize: p, emitChange: D, onSliderWrapperPrevent: K, onSliderClick: ie, onSliderDown: y, onSliderMarkerDown: E, setFirstValue: J, setSecondValue: U } = al(n, m, b), { stops: _, getStopStyle: de } = il(n, m, G, H), { inputId: N, isLabeledByFormItem: T } = mt(n, { formItemContext: f }), M = Ze(), ce = k(() => n.inputSize || M.value), se = k(() => n.showInput && !n.range && n.step !== "mark"), ve = k(() => n.ariaLabel || g("el.slider.defaultLabel", {
887
- min: n.min,
888
- max: n.max
889
- })), i = k(() => n.range ? n.rangeStartLabel || g("el.slider.defaultRangeStartLabel") : ve.value), d = k(() => n.formatValueText ? n.formatValueText(V.value) : `${V.value}`), w = k(() => n.rangeEndLabel || g("el.slider.defaultRangeEndLabel")), C = k(() => n.formatValueText ? n.formatValueText(B.value) : `${B.value}`), ee = k(() => [
890
- v.b(),
891
- v.m(M.value),
892
- v.is("vertical", n.vertical),
893
- { [v.m("with-input")]: se.value }
894
- ]), te = nl(n);
895
- sl(n, m, G, H, b, f);
896
- const oe = k(() => Z(n.step) ? n.step : 1), le = k(() => {
897
- const S = Z(n.step) ? n.step : 1, c = [
898
- n.min,
899
- n.max,
900
- S
901
- ].map((l) => {
902
- const O = `${l}`.split(".")[1];
903
- return O ? O.length : 0;
904
- });
905
- return Math.max.apply(null, c);
906
- }), { sliderWrapper: $ } = ll(n, m, p), { firstValue: V, secondValue: B, sliderSize: W } = He(m), ae = (S) => {
907
- m.dragging = S;
908
- };
909
- return Ke($, "touchstart", K, { passive: !1 }), Ke($, "touchmove", K, { passive: !1 }), Xt(gt, {
910
- ...He(n),
911
- sliderSize: W,
912
- disabled: I,
913
- precision: le,
914
- markList: te,
915
- emitChange: D,
916
- resetSize: p,
917
- updateDragging: ae
918
- }), a({ onSliderClick: ie }), (S, c) => {
919
- var l, O;
920
- return h(), P("div", {
921
- id: S.range ? t(N) : void 0,
922
- ref_key: "sliderWrapper",
923
- ref: $,
924
- class: j(ee.value),
925
- role: S.range ? "group" : void 0,
926
- "aria-label": S.range && !t(T) ? ve.value : void 0,
927
- "aria-labelledby": S.range && t(T) ? (l = t(f)) == null ? void 0 : l.labelId : void 0
928
- }, [r("div", {
929
- ref_key: "slider",
930
- ref: s,
931
- class: j([
932
- t(v).e("runway"),
933
- { "show-input": se.value },
934
- t(v).is("disabled", t(I))
935
- ]),
936
- style: me(t(L)),
937
- onMousedown: c[0] || (c[0] = (...Q) => t(y) && t(y)(...Q)),
938
- onTouchstartPassive: c[1] || (c[1] = (...Q) => t(y) && t(y)(...Q))
939
- }, [
940
- r("div", {
941
- class: j(t(v).e("bar")),
942
- style: me(t(F))
943
- }, null, 6),
944
- R(rt, {
945
- id: S.range ? void 0 : t(N),
946
- ref_key: "firstButton",
947
- ref: x,
948
- "model-value": t(V),
949
- vertical: S.vertical,
950
- "tooltip-class": S.tooltipClass,
951
- placement: S.placement,
952
- role: "slider",
953
- "aria-label": S.range || !t(T) ? i.value : void 0,
954
- "aria-labelledby": !S.range && t(T) ? (O = t(f)) == null ? void 0 : O.labelId : void 0,
955
- "aria-valuemin": S.min,
956
- "aria-valuemax": S.range ? t(B) : S.max,
957
- "aria-valuenow": t(V),
958
- "aria-valuetext": d.value,
959
- "aria-orientation": S.vertical ? "vertical" : "horizontal",
960
- "aria-disabled": t(I),
961
- "onUpdate:modelValue": t(J)
962
- }, null, 8, [
963
- "id",
964
- "model-value",
965
- "vertical",
966
- "tooltip-class",
967
- "placement",
968
- "aria-label",
969
- "aria-labelledby",
970
- "aria-valuemin",
971
- "aria-valuemax",
972
- "aria-valuenow",
973
- "aria-valuetext",
974
- "aria-orientation",
975
- "aria-disabled",
976
- "onUpdate:modelValue"
977
- ]),
978
- S.range ? (h(), q(rt, {
979
- key: 0,
980
- ref_key: "secondButton",
981
- ref: z,
982
- "model-value": t(B),
983
- vertical: S.vertical,
984
- "tooltip-class": S.tooltipClass,
985
- placement: S.placement,
986
- role: "slider",
987
- "aria-label": w.value,
988
- "aria-valuemin": t(V),
989
- "aria-valuemax": S.max,
990
- "aria-valuenow": t(B),
991
- "aria-valuetext": C.value,
992
- "aria-orientation": S.vertical ? "vertical" : "horizontal",
993
- "aria-disabled": t(I),
994
- "onUpdate:modelValue": t(U)
995
- }, null, 8, [
996
- "model-value",
997
- "vertical",
998
- "tooltip-class",
999
- "placement",
1000
- "aria-label",
1001
- "aria-valuemin",
1002
- "aria-valuemax",
1003
- "aria-valuenow",
1004
- "aria-valuetext",
1005
- "aria-orientation",
1006
- "aria-disabled",
1007
- "onUpdate:modelValue"
1008
- ])) : X("v-if", !0),
1009
- S.showStops ? (h(), P("div", bl, [(h(!0), P(we, null, Ie(t(_), (Q, ke) => (h(), P("div", {
1010
- key: ke,
1011
- class: j(t(v).e("stop")),
1012
- style: me(t(de)(Q))
1013
- }, null, 6))), 128))])) : X("v-if", !0),
1014
- t(te).length > 0 ? (h(), P(we, { key: 2 }, [r("div", null, [(h(!0), P(we, null, Ie(t(te), (Q, ke) => (h(), P("div", {
1015
- key: ke,
1016
- style: me(t(de)(Q.position)),
1017
- class: j([t(v).e("stop"), t(v).e("marks-stop")])
1018
- }, null, 6))), 128))]), r("div", { class: j(t(v).e("marks")) }, [(h(!0), P(we, null, Ie(t(te), (Q, ke) => (h(), q(t(fl), {
1019
- key: ke,
1020
- mark: Q.mark,
1021
- style: me(t(de)(Q.position)),
1022
- onMousedown: tt((lt) => t(E)(Q.position), ["stop"])
1023
- }, null, 8, [
1024
- "mark",
1025
- "style",
1026
- "onMousedown"
1027
- ]))), 128))], 2)], 64)) : X("v-if", !0)
1028
- ], 38), se.value ? (h(), q(t(_t), {
1029
- key: 0,
1030
- ref: "input",
1031
- "model-value": t(V),
1032
- class: j(t(v).e("input")),
1033
- step: oe.value,
1034
- disabled: t(I),
1035
- controls: S.showInputControls,
1036
- min: S.min,
1037
- max: S.max,
1038
- precision: le.value,
1039
- size: ce.value,
1040
- "onUpdate:modelValue": t(J),
1041
- onChange: t(D)
1042
- }, null, 8, [
1043
- "model-value",
1044
- "class",
1045
- "step",
1046
- "disabled",
1047
- "controls",
1048
- "min",
1049
- "max",
1050
- "precision",
1051
- "size",
1052
- "onUpdate:modelValue",
1053
- "onChange"
1054
- ])) : X("v-if", !0)], 10, gl);
1055
- };
1056
- }
1057
- }), yl = hl;
1058
- const Vl = _e(yl), pl = (e) => ["", ...St].includes(e), wl = ze({
1059
- /**
1060
- * @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type
1061
- */
1062
- modelValue: {
1063
- type: [
1064
- Boolean,
1065
- String,
1066
- Number
1067
- ],
1068
- default: !1
1069
- },
1070
- /**
1071
- * @description whether Switch is disabled
1072
- */
1073
- disabled: {
1074
- type: Boolean,
1075
- default: void 0
1076
- },
1077
- /**
1078
- * @description whether Switch is in loading state
1079
- */
1080
- loading: Boolean,
1081
- /**
1082
- * @description size of Switch
1083
- */
1084
- size: {
1085
- type: String,
1086
- validator: pl
1087
- },
1088
- /**
1089
- * @description width of Switch
1090
- */
1091
- width: {
1092
- type: [String, Number],
1093
- default: ""
1094
- },
1095
- /**
1096
- * @description whether icon or text is displayed inside dot, only the first character will be rendered for text
1097
- */
1098
- inlinePrompt: Boolean,
1099
- /**
1100
- * @description component of the icon displayed in action when in `off` state
1101
- */
1102
- inactiveActionIcon: { type: Fe },
1103
- /**
1104
- * @description component of the icon displayed in action when in `on` state
1105
- */
1106
- activeActionIcon: { type: Fe },
1107
- /**
1108
- * @description component of the icon displayed when in `on` state, overrides `active-text`
1109
- */
1110
- activeIcon: { type: Fe },
1111
- /**
1112
- * @description component of the icon displayed when in `off` state, overrides `inactive-text`
1113
- */
1114
- inactiveIcon: { type: Fe },
1115
- /**
1116
- * @description text displayed when in `on` state
1117
- */
1118
- activeText: {
1119
- type: String,
1120
- default: ""
1121
- },
1122
- /**
1123
- * @description text displayed when in `off` state
1124
- */
1125
- inactiveText: {
1126
- type: String,
1127
- default: ""
1128
- },
1129
- /**
1130
- * @description switch value when in `on` state
1131
- */
1132
- activeValue: {
1133
- type: [
1134
- Boolean,
1135
- String,
1136
- Number
1137
- ],
1138
- default: !0
1139
- },
1140
- /**
1141
- * @description switch value when in `off` state
1142
- */
1143
- inactiveValue: {
1144
- type: [
1145
- Boolean,
1146
- String,
1147
- Number
1148
- ],
1149
- default: !1
1150
- },
1151
- /**
1152
- * @description input name of Switch
1153
- */
1154
- name: {
1155
- type: String,
1156
- default: ""
1157
- },
1158
- /**
1159
- * @description whether to trigger form validation
1160
- */
1161
- validateEvent: {
1162
- type: Boolean,
1163
- default: !0
1164
- },
1165
- /**
1166
- * @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching
1167
- */
1168
- beforeChange: { type: ue(Function) },
1169
- /**
1170
- * @description id for input
1171
- */
1172
- id: String,
1173
- /**
1174
- * @description tabindex for input
1175
- */
1176
- tabindex: { type: [String, Number] },
1177
- ...De(["ariaLabel"])
1178
- }), Sl = {
1179
- [re]: (e) => Re(e) || Be(e) || Z(e),
1180
- [xe]: (e) => Re(e) || Be(e) || Z(e),
1181
- [he]: (e) => Re(e) || Be(e) || Z(e)
1182
- }, kl = [
1183
- "id",
1184
- "aria-checked",
1185
- "aria-disabled",
1186
- "aria-label",
1187
- "name",
1188
- "true-value",
1189
- "false-value",
1190
- "disabled",
1191
- "tabindex"
1192
- ], xl = ["aria-hidden"], El = { key: 1 }, Nl = { key: 1 }, Cl = ["aria-hidden"], Oe = "ElSwitch";
1193
- var Bl = /* @__PURE__ */ Te({
1194
- name: Oe,
1195
- __name: "switch",
1196
- props: wl,
1197
- emits: Sl,
1198
- setup(e, { expose: a, emit: u }) {
1199
- const n = e, b = u, { formItem: v } = Je(), g = Ze(), m = Le("switch"), { inputId: f } = mt(n, { formItemContext: v }), s = qe(k(() => {
1200
- if (n.loading) return !0;
1201
- })), x = Y(n.modelValue !== !1), z = ft(), I = k(() => [
1202
- m.b(),
1203
- m.m(g.value),
1204
- m.is("disabled", s.value),
1205
- m.is("checked", p.value)
1206
- ]), G = k(() => [
1207
- m.e("label"),
1208
- m.em("label", "left"),
1209
- m.is("active", !p.value)
1210
- ]), H = k(() => [
1211
- m.e("label"),
1212
- m.em("label", "right"),
1213
- m.is("active", p.value)
1214
- ]), L = k(() => ({ width: kt(n.width) }));
1215
- Ve(() => n.modelValue, () => {
1216
- x.value = !0;
1217
- });
1218
- const F = k(() => x.value ? n.modelValue : !1), p = k(() => F.value === n.activeValue);
1219
- [n.activeValue, n.inactiveValue].includes(F.value) || (Se(Oe, "model-value must be active-value or inactive-value"), b(re, n.inactiveValue), b(xe, n.inactiveValue), b(he, n.inactiveValue)), Ve(p, (y) => {
1220
- var E;
1221
- z.value.checked = y, n.validateEvent && ((E = v == null ? void 0 : v.validate) == null || E.call(v, "change").catch(Pe));
1222
- });
1223
- const D = () => {
1224
- const y = p.value ? n.inactiveValue : n.activeValue;
1225
- b(re, y), b(xe, y), b(he, y), Ae(() => {
1226
- z.value.checked = p.value;
1227
- });
1228
- }, K = () => {
1229
- if (s.value) return;
1230
- const { beforeChange: y } = n;
1231
- if (!y) {
1232
- D();
1233
- return;
1234
- }
1235
- const E = y();
1236
- [st(E), Re(E)].includes(!0) || Qe(Oe, "beforeChange must return type `Promise<boolean>` or `boolean`"), st(E) ? E.then((J) => {
1237
- J && D();
1238
- }).catch((J) => {
1239
- Se(Oe, `some error occurred: ${J}`);
1240
- }) : E && D();
1241
- }, ie = () => {
1242
- var y, E;
1243
- (E = (y = z.value) == null ? void 0 : y.focus) == null || E.call(y);
1244
- };
1245
- return We(() => {
1246
- z.value.checked = p.value;
1247
- }), a({
1248
- /**
1249
- * @description manual focus to the switch component
1250
- **/
1251
- focus: ie,
1252
- /**
1253
- * @description whether Switch is checked
1254
- */
1255
- checked: p
1256
- }), (y, E) => (h(), P("div", {
1257
- class: j(I.value),
1258
- onClick: tt(K, ["prevent"])
1259
- }, [
1260
- r("input", {
1261
- id: t(f),
1262
- ref_key: "input",
1263
- ref: z,
1264
- class: j(t(m).e("input")),
1265
- type: "checkbox",
1266
- role: "switch",
1267
- "aria-checked": p.value,
1268
- "aria-disabled": t(s),
1269
- "aria-label": e.ariaLabel,
1270
- name: e.name,
1271
- "true-value": e.activeValue,
1272
- "false-value": e.inactiveValue,
1273
- disabled: t(s),
1274
- tabindex: e.tabindex,
1275
- onChange: D,
1276
- onKeydown: Ge(K, ["enter"])
1277
- }, null, 42, kl),
1278
- !e.inlinePrompt && (e.inactiveIcon || e.inactiveText || y.$slots.inactive) ? (h(), P("span", {
1279
- key: 0,
1280
- class: j(G.value)
1281
- }, [be(y.$slots, "inactive", {}, () => [e.inactiveIcon ? (h(), q(t(ye), { key: 0 }, {
1282
- default: ne(() => [(h(), q(Ce(e.inactiveIcon)))]),
1283
- _: 1
1284
- })) : X("v-if", !0), !e.inactiveIcon && e.inactiveText ? (h(), P("span", {
1285
- key: 1,
1286
- "aria-hidden": p.value
1287
- }, A(e.inactiveText), 9, xl)) : X("v-if", !0)])], 2)) : X("v-if", !0),
1288
- r("span", {
1289
- class: j(t(m).e("core")),
1290
- style: me(L.value)
1291
- }, [e.inlinePrompt ? (h(), P("div", {
1292
- key: 0,
1293
- class: j(t(m).e("inner"))
1294
- }, [p.value ? (h(), P("div", {
1295
- key: 1,
1296
- class: j(t(m).e("inner-wrapper"))
1297
- }, [be(y.$slots, "active", {}, () => [e.activeIcon ? (h(), q(t(ye), { key: 0 }, {
1298
- default: ne(() => [(h(), q(Ce(e.activeIcon)))]),
1299
- _: 1
1300
- })) : X("v-if", !0), !e.activeIcon && e.activeText ? (h(), P("span", Nl, A(e.activeText), 1)) : X("v-if", !0)])], 2)) : (h(), P("div", {
1301
- key: 0,
1302
- class: j(t(m).e("inner-wrapper"))
1303
- }, [be(y.$slots, "inactive", {}, () => [e.inactiveIcon ? (h(), q(t(ye), { key: 0 }, {
1304
- default: ne(() => [(h(), q(Ce(e.inactiveIcon)))]),
1305
- _: 1
1306
- })) : X("v-if", !0), !e.inactiveIcon && e.inactiveText ? (h(), P("span", El, A(e.inactiveText), 1)) : X("v-if", !0)])], 2))], 2)) : X("v-if", !0), r("div", { class: j(t(m).e("action")) }, [e.loading ? (h(), q(t(ye), {
1307
- key: 0,
1308
- class: j(t(m).is("loading"))
1309
- }, {
1310
- default: ne(() => [R(t(Ft))]),
1311
- _: 1
1312
- }, 8, ["class"])) : p.value ? be(y.$slots, "active-action", { key: 1 }, () => [e.activeActionIcon ? (h(), q(t(ye), { key: 0 }, {
1313
- default: ne(() => [(h(), q(Ce(e.activeActionIcon)))]),
1314
- _: 1
1315
- })) : X("v-if", !0)]) : p.value ? X("v-if", !0) : be(y.$slots, "inactive-action", { key: 2 }, () => [e.inactiveActionIcon ? (h(), q(t(ye), { key: 0 }, {
1316
- default: ne(() => [(h(), q(Ce(e.inactiveActionIcon)))]),
1317
- _: 1
1318
- })) : X("v-if", !0)])], 2)], 6),
1319
- !e.inlinePrompt && (e.activeIcon || e.activeText || y.$slots.active) ? (h(), P("span", {
1320
- key: 1,
1321
- class: j(H.value)
1322
- }, [be(y.$slots, "active", {}, () => [e.activeIcon ? (h(), q(t(ye), { key: 0 }, {
1323
- default: ne(() => [(h(), q(Ce(e.activeIcon)))]),
1324
- _: 1
1325
- })) : X("v-if", !0), !e.activeIcon && e.activeText ? (h(), P("span", {
1326
- key: 1,
1327
- "aria-hidden": !p.value
1328
- }, A(e.activeText), 9, Cl)) : X("v-if", !0)])], 2)) : X("v-if", !0)
1329
- ], 2));
1330
- }
1331
- }), Il = Bl;
1332
- const Tl = _e(Il), Ml = { style: { height: "var(--setting-content-height)" } }, $l = { class: "setting-title" }, Pl = {
1333
- key: 0,
1334
- class: "color-list"
1335
- }, Al = ["onClick"], zl = { class: "setting-effect" }, Ll = { class: "setting-effect" }, Ul = { class: "light-slider" }, Fl = {
1336
- key: 1,
1337
- class: "setting-title"
1338
- }, Ol = {
1339
- key: 2,
1340
- class: "setting-effect"
1341
- }, Rl = { class: "setting-title" }, Kl = { class: "setting-effect" }, Wl = { class: "setting-effect" }, Yl = { class: "setting-effect" }, Xl = { class: "setting-effect" }, jl = { class: "setting-effect" }, Gl = { class: "setting-effect" }, Hl = {
1342
- key: 1,
1343
- class: "setting_panel"
1344
- }, Dl = { class: "setting-title-box" }, Jl = { class: "setting-title" }, Zl = { class: "setting-title-icon" }, ql = { class: "setting-color-box" }, Ql = { class: "setting-color-list" }, _l = ["onClick"], en = { class: "setting-config-box" }, tn = { class: "setting-switch-item" }, ln = { class: "setting-switch-item" }, nn = { class: "setting-switch-item" }, an = { class: "setting-switch-item" }, sn = { class: "setting-switch-item" }, on = { class: "setting-switch-item" }, un = { class: "setting-switch-item" }, rn = { class: "setting-switch-item" }, dn = { class: "light-slider" }, cn = { class: "setting-switch-item" }, vn = { class: "speed-slider" }, mn = /* @__PURE__ */ Te({
1345
- __name: "SettingTool",
1346
- props: {
1347
- instruction: {},
1348
- componentId: {}
1349
- },
1350
- emits: ["closePanel", "emitHandler"],
1351
- setup(e, { emit: a }) {
1352
- const u = xt(), n = Et(), b = Nt(), v = e, g = Y(0);
1353
- We(() => {
1354
- b.setReadyById(v.componentId), ot.currentTheme == "blue" ? g.value = 240 : ot.currentTheme == "light-gray" && (g.value = 202);
1355
- });
1356
- let m;
1357
- const f = Y(!1), s = Y(!1), x = Y(!1), z = Y(!1), I = Y(!1), G = Y(!0), H = Y(!1), L = Y(!1), F = Y(1), p = Y(50), D = Y(!1), K = Y(!1), ie = new Gt(5), y = Y(!1);
1358
- Ve(
1359
- () => b.isToolActive(v.componentId),
1360
- (c) => {
1361
- c === !1 ? (ie.stop(), D.value && ce()) : y.value || (y.value = !0);
1362
- }
1363
- );
1364
- const E = Y(50), J = Y(["亮"]), U = Y(["亮", "暗"]), _ = {
1365
- 亮: "setting.spaceEffects.bright",
1366
- 暗: "setting.spaceEffects.dark"
1367
- }, de = Y("linear-gradient(180deg, #fffefb 0%, #daebff 100%)"), N = a;
1368
- k({
1369
- get: () => n.locale,
1370
- set: (c) => n.setLocale(c)
1371
- });
1372
- const T = () => {
1373
- m = window.bimViewer, m.viewer.scene.on("aabb", () => {
1374
- V(H.value), W(!0);
1375
- });
1376
- }, M = () => {
1377
- y.value && (D.value = !0, ie.start(() => {
1378
- ce();
1379
- }));
1380
- }, ce = () => {
1381
- var l, O;
1382
- let c;
1383
- pe("isMobile") ? c = {
1384
- backgroundColor: ((l = Ee.find((Q) => Q.id == F.value)) == null ? void 0 : l.name) ?? "渐变蓝",
1385
- showEdges: x.value,
1386
- lightIntensity: p.value,
1387
- skyBox: z.value,
1388
- orthoMode: I.value,
1389
- modelType2D: G.value,
1390
- yAxisDown: f.value,
1391
- zAxisUp: s.value,
1392
- showSpace: H.value,
1393
- spaceEffect: K.value,
1394
- touchDollySpeed: E.value
1395
- } : c = {
1396
- backgroundColor: ((O = Ee.find((Q) => Q.id == F.value)) == null ? void 0 : O.name) ?? "渐变蓝",
1397
- showEdges: x.value,
1398
- lightIntensity: p.value,
1399
- skyBox: z.value,
1400
- orthoMode: I.value,
1401
- modelType2D: G.value,
1402
- yAxisDown: f.value,
1403
- zAxisUp: s.value,
1404
- showSpace: H.value,
1405
- spaceEffect: J.value[0],
1406
- touchDollySpeed: E.value
1407
- }, ve({
1408
- isTool: !0,
1409
- event_target: "SettingTool",
1410
- event_name: "saveSetting",
1411
- content: {
1412
- newSets: c
1413
- }
1414
- }), D.value = !1;
1415
- }, se = (c) => {
1416
- const l = c.lastSet, O = Ee.find((Q) => Q.name == l.backgroundColor);
1417
- F.value = O ? O.id : 1, ee(O ?? Ee[0]), x.value = l.showEdges, oe(x.value), p.value = l.lightIntensity, te(p.value), I.value = l.orthoMode, $(I.value), G.value = l.modelType2D, le(G.value), H.value = l.showSpace, V(H.value), pe("isMobile") ? (K.value = typeof l.spaceEffect == "string" ? l.spaceEffect == "亮" : typeof l.spaceEffect == "boolean" ? l.spaceEffect : !0, W(K.value)) : (J.value = [l.spaceEffect], B(J.value[0])), f.value = l.yAxisDown, f.value && C(), s.value = l.zAxisUp, s.value && w(), E.value = l.touchDollySpeed ?? 50, pe("isMobile") ? S(E.value) : (z.value = l.skyBox, ae(z.value)), D.value = !1;
1418
- };
1419
- Ne.on("BimViewer", T), Ne.on("lastSetsContent", se), jt(() => {
1420
- Ne.off("BimViewer", T), Ne.off("lastSetsContent", se);
1421
- });
1422
- const ve = (c) => {
1423
- N("emitHandler", c);
1424
- }, i = (c) => {
1425
- c && c.target.id != "setting_back" || (Ne.emit("hideToolbar", !1), N("closePanel"), d(!1));
1426
- }, d = (c = !L.value) => {
1427
- L.value = c;
1428
- }, w = () => {
1429
- M(), s.value && (f.value = !1), window.bimViewer.setWorldAxisZUp(s.value), $(I.value);
1430
- }, C = () => {
1431
- M(), f.value && (s.value = !1), window.bimViewer.setWorldAxisYDown(f.value), $(I.value);
1432
- }, ee = (c) => {
1433
- M(), F.value = c.id, de.value = c.color, Ne.emit("changeBackgroundColor", c.color);
1434
- }, te = (c) => {
1435
- M(), m.setLightIntensity(c);
1436
- }, oe = (c) => {
1437
- M(), m.setAllObjectsEdges(c), c || m.setObjectsEdges(Mt.entityState.edgesObjectIds, !0);
1438
- }, le = (c) => {
1439
- M(), m.SetThreeDModeActive(c), pe("isMobile") && (window.bimViewer.navCubeMode.visible = !1);
1440
- }, $ = (c) => {
1441
- M(), m.SetOrthoModeActive(c);
1442
- }, V = (c) => {
1443
- M(), m.SetShowSpaceModeActive(c), B(K.value ? 1 : 2);
1444
- }, B = (c) => {
1445
- M(), c == "亮" ? window.bimViewer.setSpaceMaterialColor(1) : window.bimViewer.setSpaceMaterialColor(2), J.value = U.value.includes(c) ? [c] : [];
1446
- }, W = (c = !K.value) => {
1447
- M(), window.bimViewer.setSpaceMaterialColor(c ? 2 : 1);
1448
- }, ae = (c) => {
1449
- M(), m.SetSkyBoxToolActive(c);
1450
- }, S = (c) => {
1451
- M(), c == 0 ? m.viewer.cameraControl.customTouchDollyRate = 0.05 / 50 : m.viewer.cameraControl.customTouchDollyRate = c / 50;
1452
- };
1453
- return (c, l) => {
1454
- const O = Tl, Q = Vl, ke = It, lt = Bt, nt = Ct, bt = Pt, ht = Tt;
1455
- return h(), P(we, null, [
1456
- t(pe)("isMobile") ? X("", !0) : (h(), q(bt, {
1457
- key: 0,
1458
- class: "setting_contaier",
1459
- width: g.value,
1460
- panelTitle: t(u)("setting.title"),
1461
- "click-handle": i,
1462
- style: { height: "var(--setting-panel-height)" }
1463
- }, {
1464
- default: ne(() => [
1465
- r("div", Ml, [
1466
- R(nt, null, {
1467
- default: ne(() => [
1468
- r("div", $l, A(t(u)("setting.effect")), 1),
1469
- r("div", {
1470
- class: "setting-effect",
1471
- onClick: l[0] || (l[0] = (o) => d())
1472
- }, [
1473
- fe(A(t(u)("setting.bgColor")) + " ", 1),
1474
- r("div", {
1475
- class: "choose-color",
1476
- style: me({ background: de.value })
1477
- }, null, 4)
1478
- ]),
1479
- L.value ? (h(), P("div", Pl, [
1480
- (h(!0), P(we, null, Ie(t(Ee), (o) => (h(), P("div", {
1481
- key: o.id,
1482
- class: j(["color-item", { "color-item-active": F.value === o.id }]),
1483
- onClick: (Ye) => ee(o)
1484
- }, [
1485
- r("div", {
1486
- class: "bg",
1487
- style: me({ background: o.color, border: o.id === 4 ? "1px solid #F1F1F1" : "none" })
1488
- }, null, 4),
1489
- fe(" " + A(t(u)(o.label || o.name)), 1)
1490
- ], 10, Al))), 128))
1491
- ])) : X("", !0),
1492
- r("div", zl, [
1493
- fe(A(t(u)("setting.showEdges")) + " ", 1),
1494
- R(O, {
1495
- modelValue: x.value,
1496
- "onUpdate:modelValue": l[1] || (l[1] = (o) => x.value = o),
1497
- style: { "--el-switch-on-color": "#0065fc" },
1498
- onChange: l[2] || (l[2] = (o) => oe())
1499
- }, null, 8, ["modelValue"])
1500
- ]),
1501
- r("div", Ll, [
1502
- fe(A(t(u)("setting.lightIntensity")) + " ", 1),
1503
- r("div", Ul, [
1504
- R(Q, {
1505
- modelValue: p.value,
1506
- "onUpdate:modelValue": l[3] || (l[3] = (o) => p.value = o),
1507
- onInput: l[4] || (l[4] = (o) => te(p.value))
1508
- }, null, 8, ["modelValue"])
1509
- ])
1510
- ]),
1511
- t(pe)("skyboxImg") ? (h(), P("div", Fl, A(t(u)("setting.appearance")), 1)) : X("", !0),
1512
- t(pe)("skyboxImg") ? (h(), P("div", Ol, [
1513
- fe(A(t(u)("setting.skybox")) + " ", 1),
1514
- R(O, {
1515
- modelValue: z.value,
1516
- "onUpdate:modelValue": l[5] || (l[5] = (o) => z.value = o),
1517
- style: { "--el-switch-on-color": "#0065fc" },
1518
- onChange: l[6] || (l[6] = (o) => ae())
1519
- }, null, 8, ["modelValue"])
1520
- ])) : X("", !0),
1521
- r("div", Rl, A(t(u)("setting.modelViewSwitch")), 1),
1522
- r("div", Kl, [
1523
- fe(A(t(u)("setting.perspective")) + " ", 1),
1524
- R(O, {
1525
- modelValue: I.value,
1526
- "onUpdate:modelValue": l[7] || (l[7] = (o) => I.value = o),
1527
- style: { "--el-switch-on-color": "#0065fc" },
1528
- onChange: l[8] || (l[8] = (o) => $())
1529
- }, null, 8, ["modelValue"])
1530
- ]),
1531
- r("div", Wl, [
1532
- fe(A(t(u)("setting.mode2d3d")) + " ", 1),
1533
- R(O, {
1534
- modelValue: G.value,
1535
- "onUpdate:modelValue": l[9] || (l[9] = (o) => G.value = o),
1536
- style: { "--el-switch-on-color": "#0065fc" },
1537
- onChange: l[10] || (l[10] = (o) => le())
1538
- }, null, 8, ["modelValue"])
1539
- ]),
1540
- r("div", Yl, [
1541
- r("div", null, A(t(u)("setting.modelInvert")), 1),
1542
- r("div", null, [
1543
- R(O, {
1544
- modelValue: f.value,
1545
- "onUpdate:modelValue": l[11] || (l[11] = (o) => f.value = o),
1546
- style: { "--el-switch-on-color": "#0065fc" },
1547
- onChange: l[12] || (l[12] = (o) => C())
1548
- }, null, 8, ["modelValue"])
1549
- ])
1550
- ]),
1551
- r("div", Xl, [
1552
- r("div", null, A(t(u)("setting.zAxisUp")), 1),
1553
- r("div", null, [
1554
- R(O, {
1555
- modelValue: s.value,
1556
- "onUpdate:modelValue": l[13] || (l[13] = (o) => s.value = o),
1557
- style: { "--el-switch-on-color": "#0065fc" },
1558
- onChange: l[14] || (l[14] = (o) => w())
1559
- }, null, 8, ["modelValue"])
1560
- ])
1561
- ]),
1562
- r("div", jl, [
1563
- fe(A(t(u)("setting.modelSpace")) + " ", 1),
1564
- R(O, {
1565
- modelValue: H.value,
1566
- "onUpdate:modelValue": l[15] || (l[15] = (o) => H.value = o),
1567
- style: { "--el-switch-on-color": "#0065fc" },
1568
- onChange: l[16] || (l[16] = (o) => V())
1569
- }, null, 8, ["modelValue"])
1570
- ]),
1571
- r("div", Gl, [
1572
- fe(A(t(u)("setting.spaceEffect")) + " ", 1),
1573
- R(lt, {
1574
- modelValue: J.value,
1575
- "onUpdate:modelValue": l[17] || (l[17] = (o) => J.value = o),
1576
- size: "small"
1577
- }, {
1578
- default: ne(() => [
1579
- (h(!0), P(we, null, Ie(U.value, (o) => (h(), q(ke, {
1580
- key: o,
1581
- label: o,
1582
- onChange: (Ye) => B(o)
1583
- }, {
1584
- default: ne(() => [
1585
- fe(A(t(u)(_[o])), 1)
1586
- ]),
1587
- _: 2
1588
- }, 1032, ["label", "onChange"]))), 128))
1589
- ]),
1590
- _: 1
1591
- }, 8, ["modelValue"])
1592
- ])
1593
- ]),
1594
- _: 1
1595
- })
1596
- ])
1597
- ]),
1598
- _: 1
1599
- }, 8, ["width", "panelTitle"])),
1600
- t(pe)("isMobile") ? (h(), P("div", Hl, [
1601
- r("div", Dl, [
1602
- r("div", Jl, A(t(u)("setting.title")), 1),
1603
- r("div", Zl, [
1604
- R(ht, {
1605
- width: 0.4,
1606
- "size-type": "rem",
1607
- "click-handle": i
1608
- })
1609
- ])
1610
- ]),
1611
- r("div", ql, [
1612
- r("div", Ql, [
1613
- (h(!0), P(we, null, Ie(t(Ee), (o, Ye) => (h(), P("div", {
1614
- key: Ye,
1615
- class: j(["setting-color-item", {
1616
- "setting-color-item-active": F.value === o.id
1617
- }]),
1618
- onClick: (fn) => ee(o)
1619
- }, [
1620
- r("div", {
1621
- class: "setting-color-icon",
1622
- style: me({
1623
- background: o.color,
1624
- border: o.id === F.value ? "0.02rem solid #0065FC" : ""
1625
- })
1626
- }, null, 4),
1627
- r("div", {
1628
- class: "setting-color-name",
1629
- style: me({ color: o.id === F.value ? "#0065FC" : "" })
1630
- }, A(t(u)(o.label || o.name)), 5)
1631
- ], 10, _l))), 128))
1632
- ])
1633
- ]),
1634
- r("div", en, [
1635
- R(nt, { height: "230" }, {
1636
- default: ne(() => [
1637
- r("div", tn, [
1638
- r("div", null, A(t(u)("setting.showEdges")), 1),
1639
- r("div", null, [
1640
- R(O, {
1641
- modelValue: x.value,
1642
- "onUpdate:modelValue": l[18] || (l[18] = (o) => x.value = o),
1643
- size: "small",
1644
- onChange: l[19] || (l[19] = (o) => oe())
1645
- }, null, 8, ["modelValue"])
1646
- ])
1647
- ]),
1648
- r("div", ln, [
1649
- r("div", null, A(t(u)("setting.perspective")), 1),
1650
- r("div", null, [
1651
- R(O, {
1652
- modelValue: I.value,
1653
- "onUpdate:modelValue": l[20] || (l[20] = (o) => I.value = o),
1654
- size: "small",
1655
- onChange: l[21] || (l[21] = (o) => $())
1656
- }, null, 8, ["modelValue"])
1657
- ])
1658
- ]),
1659
- r("div", nn, [
1660
- r("div", null, A(t(u)("setting.mode2d3d")), 1),
1661
- r("div", null, [
1662
- R(O, {
1663
- modelValue: G.value,
1664
- "onUpdate:modelValue": l[22] || (l[22] = (o) => G.value = o),
1665
- size: "small",
1666
- onChange: l[23] || (l[23] = (o) => le())
1667
- }, null, 8, ["modelValue"])
1668
- ])
1669
- ]),
1670
- r("div", an, [
1671
- r("div", null, A(t(u)("setting.modelInvert")), 1),
1672
- r("div", null, [
1673
- R(O, {
1674
- modelValue: f.value,
1675
- "onUpdate:modelValue": l[24] || (l[24] = (o) => f.value = o),
1676
- size: "small",
1677
- onChange: l[25] || (l[25] = (o) => C())
1678
- }, null, 8, ["modelValue"])
1679
- ])
1680
- ]),
1681
- r("div", sn, [
1682
- r("div", null, A(t(u)("setting.zAxisUp")), 1),
1683
- r("div", null, [
1684
- R(O, {
1685
- modelValue: s.value,
1686
- "onUpdate:modelValue": l[26] || (l[26] = (o) => s.value = o),
1687
- size: "small",
1688
- onChange: l[27] || (l[27] = (o) => w())
1689
- }, null, 8, ["modelValue"])
1690
- ])
1691
- ]),
1692
- r("div", on, [
1693
- r("div", null, A(t(u)("setting.modelSpace")), 1),
1694
- r("div", null, [
1695
- R(O, {
1696
- modelValue: H.value,
1697
- "onUpdate:modelValue": l[28] || (l[28] = (o) => H.value = o),
1698
- size: "small",
1699
- onChange: l[29] || (l[29] = (o) => V())
1700
- }, null, 8, ["modelValue"])
1701
- ])
1702
- ]),
1703
- r("div", un, [
1704
- r("div", null, A(t(u)("setting.spaceEffect")), 1),
1705
- r("div", null, [
1706
- R(O, {
1707
- modelValue: K.value,
1708
- "onUpdate:modelValue": l[30] || (l[30] = (o) => K.value = o),
1709
- size: "small",
1710
- onChange: l[31] || (l[31] = (o) => W())
1711
- }, null, 8, ["modelValue"])
1712
- ])
1713
- ]),
1714
- r("div", rn, [
1715
- r("div", null, A(t(u)("setting.lightIntensity")), 1),
1716
- r("div", dn, [
1717
- R(Q, {
1718
- modelValue: p.value,
1719
- "onUpdate:modelValue": l[32] || (l[32] = (o) => p.value = o),
1720
- onInput: l[33] || (l[33] = (o) => te(p.value))
1721
- }, null, 8, ["modelValue"])
1722
- ])
1723
- ]),
1724
- r("div", cn, [
1725
- r("div", null, A(t(u)("setting.zoomSpeed")), 1),
1726
- r("div", vn, [
1727
- R(Q, {
1728
- modelValue: E.value,
1729
- "onUpdate:modelValue": l[34] || (l[34] = (o) => E.value = o),
1730
- onInput: l[35] || (l[35] = (o) => S(E.value))
1731
- }, null, 8, ["modelValue"])
1732
- ])
1733
- ])
1734
- ]),
1735
- _: 1
1736
- })
1737
- ])
1738
- ])) : X("", !0)
1739
- ], 64);
1740
- };
1741
- }
1742
- }), pn = /* @__PURE__ */ $t(mn, [["__scopeId", "data-v-178d373f"]]);
1743
- export {
1744
- pn as default
1745
- };