halo-fe 1.0.26 → 1.0.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +1314 -1082
- package/dist/style.css +1 -1
- package/esm/coms/@types/SocketProgressProps.d.ts +8 -0
- package/esm/coms/controls/@types/CodeProps.d.ts +1 -1
- package/esm/coms/controls/Code.vue.d.ts +1 -1
- package/esm/coms/index.d.ts +1 -0
- package/esm/coms/layouts/Row.vue.d.ts +6 -2
- package/esm/coms/texts/@types/DanceProps.d.ts +14 -0
- package/esm/coms/texts/@types/index.d.ts +2 -0
- package/esm/coms/texts/Dance.vue.d.ts +5 -0
- package/esm/coms/texts/index.d.ts +2 -0
- package/esm/drivers/builders/BuilderFactory.d.ts +1 -0
- package/esm/drivers/cdns/Cdn.d.ts +6 -6
- package/esm/drivers/cdns/CdnFactory.d.ts +1 -0
- package/esm/drivers/encoders/Encoder.d.ts +1 -1
- package/esm/drivers/encoders/EncoderFactory.d.ts +1 -0
- package/esm/drivers/excels/ExcelFactory.d.ts +1 -0
- package/esm/drivers/explainers/ExplainerFactory.d.ts +1 -0
- package/esm/drivers/features/Feature.d.ts +9 -0
- package/esm/drivers/features/FeatureFactory.d.ts +1 -0
- package/esm/drivers/features/implements/ExpressionFeature.d.ts +2 -3
- package/esm/drivers/features/implements/I18NFeature.d.ts +2 -3
- package/esm/drivers/features/implements/SortFeature.d.ts +2 -3
- package/esm/drivers/hashers/HasherFactory.d.ts +1 -0
- package/esm/drivers/https/Http.d.ts +1 -1
- package/esm/drivers/https/HttpFactory.d.ts +1 -0
- package/esm/drivers/https/implements/FeiShuHttp.d.ts +8 -0
- package/esm/drivers/i18ns/I18n.d.ts +1 -1
- package/esm/drivers/i18ns/I18nFactory.d.ts +1 -0
- package/esm/drivers/i18ns/II18n.d.ts +1 -1
- package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +1 -1
- package/esm/drivers/messengers/MessengerFactory.d.ts +1 -0
- package/esm/drivers/providers/ProviderFactory.d.ts +1 -0
- package/esm/drivers/signers/SignerFactory.d.ts +1 -0
- package/esm/drivers/sockets/SocketFactory.d.ts +1 -0
- package/esm/drivers/sockets/entities/SocketResponse.d.ts +18 -2
- package/esm/drivers/sockets/entities/index.d.ts +1 -1
- package/esm/drivers/ssos/SsoFactory.d.ts +1 -0
- package/esm/drivers/tasks/TaskFactory.d.ts +1 -0
- package/esm/drivers/templates/ITemplate.d.ts +1 -1
- package/esm/drivers/templates/Template.d.ts +1 -1
- package/esm/drivers/templates/TemplateFactory.d.ts +1 -0
- package/esm/drivers/templates/implement/LiquidTemplate.d.ts +1 -1
- package/esm/drivers/util/UtilFactory.d.ts +2 -2
- package/esm/drivers/util/implements/ObjectUtil.d.ts +21 -1
- package/esm/drivers/util/implements/TimeUtil.d.ts +1 -1
- package/esm/drivers/util/index.d.ts +1 -2
- package/esm/drivers/utilities/UtilityFactory.d.ts +1 -0
- package/esm/drivers/videos/VideoFactory.d.ts +1 -0
- package/esm/drivers/voices/VoiceFactory.d.ts +1 -0
- package/esm/factory/Factory.d.ts +11 -3
- package/esm/factory/IFactory.d.ts +13 -4
- package/esm/repos/RepoFactory.d.ts +3 -3
- package/esm/repos/entities/KeyboardType.d.ts +8 -0
- package/esm/repos/entities/index.d.ts +2 -0
- package/esm/repos/implements/ModuleRepo.d.ts +36 -0
- package/esm/repos/index.d.ts +4 -3
- package/package.json +5 -5
package/dist/main.js
CHANGED
@@ -1,20 +1,24 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var n = (c, i, e) =>
|
4
|
-
import { reactive as
|
5
|
-
import { L as
|
1
|
+
var at = Object.defineProperty;
|
2
|
+
var ut = (c, i, e) => i in c ? at(c, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[i] = e;
|
3
|
+
var n = (c, i, e) => ut(c, typeof i != "symbol" ? i + "" : i, e);
|
4
|
+
import { reactive as _e, defineAsyncComponent as ct, watch as W, defineComponent as B, toRefs as z, openBlock as C, createElementBlock as T, createElementVNode as S, toDisplayString as N, unref as f, renderSlot as Q, createCommentVNode as ye, ref as H, onMounted as oe, onUnmounted as ae, normalizeStyle as ee, normalizeClass as ce, createTextVNode as Pe, createBlock as Fe, withCtx as ue, mergeModels as Ue, useModel as Ne, nextTick as Oe, withDirectives as dt, createStaticVNode as pt, vShow as ht, createVNode as re, isRef as ve, Fragment as qe, renderList as Ve, computed as ge } from "vue";
|
5
|
+
import { L as gt } from "./assets/liquidjs-C2HVw1Ra.js";
|
6
6
|
import { _ as be } from "./assets/underscore-B0BCaBxV.js";
|
7
|
-
import { F as
|
8
|
-
import { a as
|
9
|
-
import { _ as
|
7
|
+
import { F as ft } from "./assets/file-saver-Cnua3zoa.js";
|
8
|
+
import { a as yt } from "./assets/clone-DtpAsLoe.js";
|
9
|
+
import { _ as mt } from "./assets/underscore.string-oDfap0sE.js";
|
10
10
|
import { h as K } from "./assets/moment-h96o7c8I.js";
|
11
11
|
class D {
|
12
12
|
constructor() {
|
13
13
|
//#region 属性
|
14
14
|
/**
|
15
|
-
*
|
15
|
+
* 工厂类型,可用于异常提示
|
16
16
|
*/
|
17
|
-
n(this, "
|
17
|
+
n(this, "type");
|
18
|
+
/**
|
19
|
+
* 当前驱动子类型名称和子类型的映射关系,用于快速实例化
|
20
|
+
*/
|
21
|
+
n(this, "types", {});
|
18
22
|
/**
|
19
23
|
* 实例缓存集合
|
20
24
|
* 或者使用:Record<string, string>
|
@@ -38,7 +42,9 @@ class D {
|
|
38
42
|
open() {
|
39
43
|
}
|
40
44
|
register(i) {
|
41
|
-
|
45
|
+
let e = Object.keys(i);
|
46
|
+
for (let t of e)
|
47
|
+
this.types[t] = i[t];
|
42
48
|
}
|
43
49
|
//#endregion
|
44
50
|
//#region 创建并缓存
|
@@ -68,11 +74,11 @@ class D {
|
|
68
74
|
*/
|
69
75
|
create(i) {
|
70
76
|
if (i == null)
|
71
|
-
throw new Error(
|
72
|
-
let t = this.types
|
77
|
+
throw new Error(`${this.type} 工厂驱动类型不能为空`);
|
78
|
+
let t = Object.keys(this.types).find((s) => s.toLowerCase() == i.toLowerCase());
|
73
79
|
if (t == null)
|
74
|
-
throw new Error(`${this.
|
75
|
-
return t;
|
80
|
+
throw new Error(`${this.type} 工厂未找到 ${i} 类型的驱动`);
|
81
|
+
return new this.types[t]();
|
76
82
|
}
|
77
83
|
//#endregion
|
78
84
|
//#region 加载
|
@@ -81,11 +87,11 @@ class D {
|
|
81
87
|
*/
|
82
88
|
async loadDriverAsync(i) {
|
83
89
|
let e = { conditions: [{ name: "Id", value: i }] };
|
84
|
-
return
|
90
|
+
return _.post("/ctl_driver/set", e).then((t) => Promise.resolve(t.data[0]));
|
85
91
|
}
|
86
92
|
//#endregion
|
87
93
|
}
|
88
|
-
class
|
94
|
+
class We {
|
89
95
|
constructor() {
|
90
96
|
n(this, "type");
|
91
97
|
}
|
@@ -158,11 +164,11 @@ class d {
|
|
158
164
|
return y.util.sign;
|
159
165
|
}
|
160
166
|
}
|
161
|
-
class
|
167
|
+
class vt extends We {
|
162
168
|
constructor() {
|
163
169
|
super(...arguments);
|
164
170
|
//#region 属性
|
165
|
-
n(this, "type", "
|
171
|
+
n(this, "type", "Module");
|
166
172
|
//#endregion
|
167
173
|
//#region 默认行
|
168
174
|
/**
|
@@ -176,6 +182,7 @@ class mt extends Ne {
|
|
176
182
|
}
|
177
183
|
return t;
|
178
184
|
});
|
185
|
+
//#endregion
|
179
186
|
//#region 展开
|
180
187
|
/**
|
181
188
|
* 展开数据和架构信息
|
@@ -186,23 +193,35 @@ class mt extends Ne {
|
|
186
193
|
for (let r = 0; r < e.length; r++) {
|
187
194
|
let s = e[r], l = t[s.name];
|
188
195
|
if (l != null)
|
189
|
-
for (let
|
190
|
-
|
196
|
+
for (let o of l)
|
197
|
+
o[`Old_${s.key}`] = o[s.key];
|
191
198
|
}
|
192
199
|
return t;
|
193
200
|
});
|
201
|
+
//#endregion
|
202
|
+
//#region 触发事件
|
203
|
+
/**
|
204
|
+
* 触发键盘事件
|
205
|
+
* 统一封装,方便重构
|
206
|
+
*/
|
207
|
+
n(this, "triggerKeyboardHandler", (e, t, r) => {
|
208
|
+
if (e == null || e.keyboardHandler == null)
|
209
|
+
return !1;
|
210
|
+
e.keyboardHandler(t, r);
|
211
|
+
});
|
194
212
|
}
|
195
213
|
//#endregion
|
214
|
+
//#region 提示
|
196
215
|
/**
|
197
216
|
* 更新提示内容
|
198
217
|
*/
|
199
218
|
updateTooltipByFields(e, t, r) {
|
200
219
|
if (r.length != 0)
|
201
220
|
for (let s of r) {
|
202
|
-
let l = s.control.tooltip,
|
221
|
+
let l = s.control.tooltip, o = `${e}.${s.name}.tooltip`;
|
203
222
|
for (let p of l.fields)
|
204
|
-
|
205
|
-
let
|
223
|
+
o += `.${t[p]}`;
|
224
|
+
let a = fe(o), u = d.json.deserialize(a);
|
206
225
|
u == null ? (l.title = null, l.content = null) : (l.title = u.title, l.content = d.json.serializeWithoutString(u.content));
|
207
226
|
}
|
208
227
|
}
|
@@ -214,25 +233,25 @@ class mt extends Ne {
|
|
214
233
|
if (e == null)
|
215
234
|
return [];
|
216
235
|
for (let s of e) {
|
217
|
-
for (let
|
218
|
-
let
|
219
|
-
if (
|
236
|
+
for (let o of s.fields) {
|
237
|
+
let a = (r = o.control.tooltip) == null ? void 0 : r.fields;
|
238
|
+
if (a != null && a.length > 0) {
|
220
239
|
let u = t[s.name];
|
221
240
|
for (let p of u)
|
222
|
-
this.updateTooltipByFields(s.name, p, [
|
241
|
+
this.updateTooltipByFields(s.name, p, [o]);
|
223
242
|
}
|
224
243
|
}
|
225
244
|
if (s.show != null) {
|
226
|
-
let
|
227
|
-
for (let
|
228
|
-
let u =
|
229
|
-
|
245
|
+
let o = [];
|
246
|
+
for (let a of s.show) {
|
247
|
+
let u = a.name ?? a, p = s.fields.find((h) => h.name == u);
|
248
|
+
o.push(p);
|
230
249
|
}
|
231
|
-
s.show =
|
250
|
+
s.show = o;
|
232
251
|
}
|
233
|
-
s.search = s.fields.filter((
|
252
|
+
s.search = s.fields.filter((o) => o.search != null);
|
234
253
|
let l = s.key.name ?? s.key;
|
235
|
-
s.key = s.fields.find((
|
254
|
+
s.key = s.fields.find((o) => o.name == l);
|
236
255
|
}
|
237
256
|
return e;
|
238
257
|
}
|
@@ -251,7 +270,7 @@ class mt extends Ne {
|
|
251
270
|
}
|
252
271
|
//#endregion
|
253
272
|
}
|
254
|
-
class
|
273
|
+
class bt extends We {
|
255
274
|
constructor() {
|
256
275
|
super(...arguments);
|
257
276
|
//#region 属性
|
@@ -301,7 +320,7 @@ class vt extends Ne {
|
|
301
320
|
*/
|
302
321
|
async loadAppsAsync(e = !1) {
|
303
322
|
if (!this.loading.apps && !(!e && this.loaded.apps))
|
304
|
-
return this.loading.apps = !0,
|
323
|
+
return this.loading.apps = !0, _.post("/app/options").then((t) => {
|
305
324
|
this.apps = t.data, this.loaded.apps = !0;
|
306
325
|
}).finally(() => {
|
307
326
|
this.loading.apps = !1;
|
@@ -312,7 +331,7 @@ class vt extends Ne {
|
|
312
331
|
*/
|
313
332
|
async loadEnvsAsync(e = !1) {
|
314
333
|
if (!this.loading.envs && (this.loading.envs = !0, !(!e && this.loaded.envs)))
|
315
|
-
return
|
334
|
+
return _.post("/env/options").then((t) => {
|
316
335
|
this.envs = t.data, this.loaded.envs = !0;
|
317
336
|
}).finally(() => {
|
318
337
|
this.loading.envs = !1;
|
@@ -327,7 +346,7 @@ class vt extends Ne {
|
|
327
346
|
let s = {
|
328
347
|
conditions: [{ name: "App", value: e }, { name: "Env", value: t }, { name: "Kind", value: r }]
|
329
348
|
};
|
330
|
-
return
|
349
|
+
return _.post("/app/driver", s).then((l) => Promise.resolve(l.data));
|
331
350
|
}
|
332
351
|
//#endregion
|
333
352
|
//#region 语言
|
@@ -335,19 +354,19 @@ class vt extends Ne {
|
|
335
354
|
* 查询代码语言和文本语言映射关系
|
336
355
|
*/
|
337
356
|
async loadCodeLanguageAsync(e = !1) {
|
338
|
-
let t = () => this.codeLanguages != null && !e ? Promise.resolve(this.codeLanguages) :
|
357
|
+
let t = () => this.codeLanguages != null && !e ? Promise.resolve(this.codeLanguages) : _.post("/code/language").then((s) => (this.codeLanguages = s.data, this.codeLanguages));
|
339
358
|
return await this.task.concurrent(t);
|
340
359
|
}
|
341
360
|
/**
|
342
361
|
* 查询驱动程序和文本语言映射关系
|
343
362
|
*/
|
344
363
|
async loadDriverLanguageAsync(e = !1) {
|
345
|
-
let t = () => this.providerLanguages != null && !e ? Promise.resolve(this.providerLanguages) :
|
364
|
+
let t = () => this.providerLanguages != null && !e ? Promise.resolve(this.providerLanguages) : _.post("/driver/language").then((s) => (this.providerLanguages = s.data, this.providerLanguages));
|
346
365
|
return await this.task.concurrent(t);
|
347
366
|
}
|
348
367
|
//#endregion
|
349
368
|
}
|
350
|
-
class
|
369
|
+
class wt {
|
351
370
|
constructor() {
|
352
371
|
n(this, "type", "Setting");
|
353
372
|
//#endregion
|
@@ -362,15 +381,19 @@ class bt {
|
|
362
381
|
this[e] = i[e];
|
363
382
|
}
|
364
383
|
}
|
365
|
-
class
|
384
|
+
class kt extends D {
|
366
385
|
open() {
|
367
|
-
super.open(), super.
|
386
|
+
super.open(), super.register({
|
387
|
+
Module: vt,
|
388
|
+
Query: bt,
|
389
|
+
Setting: wt
|
390
|
+
});
|
368
391
|
}
|
369
392
|
/**
|
370
|
-
*
|
393
|
+
* 模块仓储
|
371
394
|
*/
|
372
|
-
get
|
373
|
-
return this.createWithCache("
|
395
|
+
get module() {
|
396
|
+
return this.createWithCache("Module");
|
374
397
|
}
|
375
398
|
/**
|
376
399
|
* 查询仓储
|
@@ -387,10 +410,11 @@ class wt extends D {
|
|
387
410
|
return this.createWithCache("Setting");
|
388
411
|
}
|
389
412
|
}
|
390
|
-
|
391
|
-
|
413
|
+
var xt = /* @__PURE__ */ ((c) => (c[c.ctrlS = 0] = "ctrlS", c[c.ctrlEnter = 1] = "ctrlEnter", c))(xt || {});
|
414
|
+
let At = {}, St = {}, ze = {}, _t = async () => {
|
415
|
+
At = y.repo.module, St = _e(y.repo.query), ze = y.repo.setting;
|
392
416
|
};
|
393
|
-
class
|
417
|
+
class Ct {
|
394
418
|
constructor() {
|
395
419
|
/**
|
396
420
|
* 默认背景
|
@@ -418,17 +442,17 @@ class St {
|
|
418
442
|
n(this, "cdn", "Local");
|
419
443
|
}
|
420
444
|
}
|
421
|
-
class
|
445
|
+
class Tt {
|
422
446
|
constructor() {
|
423
447
|
/**
|
424
448
|
* 用户应用配置
|
425
449
|
*/
|
426
|
-
n(this, "app", new
|
450
|
+
n(this, "app", new Ct());
|
427
451
|
}
|
428
452
|
}
|
429
|
-
class
|
453
|
+
class Ke {
|
430
454
|
}
|
431
|
-
class
|
455
|
+
class Je extends Ke {
|
432
456
|
constructor() {
|
433
457
|
super(...arguments);
|
434
458
|
//#region 属性
|
@@ -436,7 +460,7 @@ class We extends qe {
|
|
436
460
|
/**
|
437
461
|
* 用户系统配置
|
438
462
|
*/
|
439
|
-
n(this, "sys", new
|
463
|
+
n(this, "sys", new Tt());
|
440
464
|
/**
|
441
465
|
* 文件布局方式
|
442
466
|
*/
|
@@ -468,11 +492,11 @@ class We extends qe {
|
|
468
492
|
*/
|
469
493
|
n(this, "bindAsync", async (e) => {
|
470
494
|
for (let s of e) {
|
471
|
-
let
|
472
|
-
d.object.addProperties(this, [s.kind, s.type],
|
495
|
+
let o = await this.getAsync(s.kind, s.type) ?? s.content;
|
496
|
+
d.object.addProperties(this, [s.kind, s.type], o);
|
473
497
|
}
|
474
498
|
let t = this.sys.app, r = document.documentElement;
|
475
|
-
d.dom.removeClass(r,
|
499
|
+
d.dom.removeClass(r, Qe.theme), d.dom.addClass(r, t.theme), d.mount.emit("theme", t.theme), d.dom.addClass(r, t.layout), this.setBackground(t.background), d.dom.addStyle(r, "font-family", t.font);
|
476
500
|
});
|
477
501
|
}
|
478
502
|
/**
|
@@ -515,10 +539,10 @@ class We extends qe {
|
|
515
539
|
r.classList.remove(t.layout), r.classList.add(s), t.layout = s;
|
516
540
|
let l = e.theme;
|
517
541
|
d.dom.removeClass(r, t.theme), d.dom.addClass(r, l), t.theme = l, d.mount.emit("theme", l);
|
518
|
-
let
|
519
|
-
this.setBackground(
|
520
|
-
let
|
521
|
-
t.font =
|
542
|
+
let o = e.background;
|
543
|
+
this.setBackground(o), d.mount.emit("background", o);
|
544
|
+
let a = e.font;
|
545
|
+
t.font = a, d.dom.addStyle(r, "font-family", a);
|
522
546
|
}
|
523
547
|
//#region 配置
|
524
548
|
/**
|
@@ -530,19 +554,19 @@ class We extends qe {
|
|
530
554
|
if (s)
|
531
555
|
return Promise.resolve(s);
|
532
556
|
}
|
533
|
-
return
|
557
|
+
return _.get(`/config/query?kind=${e}&type=${t}`).then((s) => Promise.resolve(s.data));
|
534
558
|
}
|
535
559
|
/**
|
536
560
|
* 全量保存用户配置
|
537
561
|
*/
|
538
562
|
async saveAsync(e, t, r, s = !0) {
|
539
|
-
return s && await (await y.provider.getDefaultAsync(e)).saveAsync(e, t, r),
|
563
|
+
return s && await (await y.provider.getDefaultAsync(e)).saveAsync(e, t, r), _.post(`/config/save?kind=${e}&type=${t}`, r).then((l) => Promise.resolve(!0));
|
540
564
|
}
|
541
565
|
/**
|
542
566
|
* 部分保存用户配置
|
543
567
|
*/
|
544
568
|
async patchAsync(e, t, r) {
|
545
|
-
return
|
569
|
+
return _.patchAsync(`/config/save?kind=${e}&type=${t}`, r).then((s) => Promise.resolve(!0));
|
546
570
|
}
|
547
571
|
//#endregion
|
548
572
|
/**
|
@@ -553,7 +577,7 @@ class We extends qe {
|
|
553
577
|
return this.sys.app.language || e || "zh-cn";
|
554
578
|
}
|
555
579
|
}
|
556
|
-
class
|
580
|
+
class Et {
|
557
581
|
constructor() {
|
558
582
|
/**
|
559
583
|
* 环境变量
|
@@ -567,7 +591,7 @@ class Ct {
|
|
567
591
|
this.env = i, this.env.base = d.string.trimEnd(i.VITE_ROOT, "/");
|
568
592
|
}
|
569
593
|
}
|
570
|
-
class
|
594
|
+
class $t {
|
571
595
|
constructor() {
|
572
596
|
/**
|
573
597
|
* 日志集合
|
@@ -594,7 +618,7 @@ class Tt {
|
|
594
618
|
this.logs = [];
|
595
619
|
}
|
596
620
|
}
|
597
|
-
class
|
621
|
+
class jt {
|
598
622
|
constructor() {
|
599
623
|
//#region 属性
|
600
624
|
n(this, "loaded", !1);
|
@@ -656,13 +680,13 @@ class Et {
|
|
656
680
|
/**
|
657
681
|
* 加载设置
|
658
682
|
*/
|
659
|
-
n(this, "load", async () =>
|
683
|
+
n(this, "load", async () => _.get("/app/setting").then(({ data: i }) => {
|
660
684
|
let e = Object.keys(i);
|
661
685
|
for (let t of e) {
|
662
686
|
let r = i[t];
|
663
687
|
r && (this[t] = r);
|
664
688
|
}
|
665
|
-
return d.dom.addClass(document.documentElement, this.theme,
|
689
|
+
return d.dom.addClass(document.documentElement, this.theme, ze.web.theme), d.mount.emits({ theme: this.theme }), Promise.resolve(i);
|
666
690
|
}).catch((i) => Promise.reject(i)));
|
667
691
|
}
|
668
692
|
//#endregion
|
@@ -673,7 +697,7 @@ class Et {
|
|
673
697
|
this.loaded || (await this.load(), this.loaded = !0);
|
674
698
|
}
|
675
699
|
}
|
676
|
-
class
|
700
|
+
class Dt {
|
677
701
|
constructor() {
|
678
702
|
//#region 属性
|
679
703
|
/**
|
@@ -715,7 +739,7 @@ class $t {
|
|
715
739
|
* 登录后,获取用户信息
|
716
740
|
*/
|
717
741
|
async loadInfo() {
|
718
|
-
return
|
742
|
+
return _.get("/user/info").then(async ({ data: i }) => (await Z.bindAsync(i.configs), this.user = i, this.debugger = i.debugger, Promise.resolve(i)));
|
719
743
|
}
|
720
744
|
//#endregion
|
721
745
|
//#region 菜单
|
@@ -730,7 +754,7 @@ class $t {
|
|
730
754
|
* 加载服务端路由
|
731
755
|
*/
|
732
756
|
async loadMenus() {
|
733
|
-
return
|
757
|
+
return _.get("/user/menu").then(({ data: i }) => (this.menus = i, this.menusFlat = d.tree.getFlat(i, "children"), Promise.resolve(i)));
|
734
758
|
}
|
735
759
|
//#endregion
|
736
760
|
//#region 加载
|
@@ -738,7 +762,7 @@ class $t {
|
|
738
762
|
* 加载用户选项
|
739
763
|
*/
|
740
764
|
async loadUsers(i) {
|
741
|
-
return
|
765
|
+
return _.post("/sys_user/options", i).then(({ data: e }) => Promise.resolve(e));
|
742
766
|
}
|
743
767
|
//#endregion
|
744
768
|
//#region 退出
|
@@ -746,15 +770,15 @@ class $t {
|
|
746
770
|
* 退出登录
|
747
771
|
*/
|
748
772
|
async logout() {
|
749
|
-
return
|
773
|
+
return _.post("/user/logout").then(async () => {
|
750
774
|
this.user = null, this.menus = null;
|
751
775
|
let i = await this.getSso();
|
752
|
-
return await (await y.sso.createAsync(i.type)).logout(),
|
776
|
+
return await (await y.sso.createAsync(i.type)).logout(), je.dispose(), Promise.resolve();
|
753
777
|
});
|
754
778
|
}
|
755
779
|
//#endregion
|
756
780
|
}
|
757
|
-
class
|
781
|
+
class Xe extends Ke {
|
758
782
|
constructor() {
|
759
783
|
super(...arguments);
|
760
784
|
//#region 属性
|
@@ -769,16 +793,16 @@ class ze extends qe {
|
|
769
793
|
if (!e)
|
770
794
|
return;
|
771
795
|
let r = { id: e, schema: t };
|
772
|
-
return
|
796
|
+
return _.get("/provider/schema", r).then(({ data: s }) => Promise.resolve(s));
|
773
797
|
}
|
774
798
|
//#endregion
|
775
799
|
}
|
776
|
-
class
|
800
|
+
class Ht extends D {
|
777
801
|
open() {
|
778
|
-
super.open(), super.
|
779
|
-
|
780
|
-
|
781
|
-
|
802
|
+
super.open(), super.register({
|
803
|
+
Config: Je,
|
804
|
+
Driver: Xe
|
805
|
+
});
|
782
806
|
}
|
783
807
|
static() {
|
784
808
|
debugger;
|
@@ -790,8 +814,8 @@ class jt extends D {
|
|
790
814
|
return super.createWithCache("Config");
|
791
815
|
}
|
792
816
|
}
|
793
|
-
let
|
794
|
-
},
|
817
|
+
let kl = () => {
|
818
|
+
}, Qe = _e(new jt()), Z = new Je(), xl = _e(new Xe()), Al = new Et(), Le = new $t(), Ut = new Dt();
|
795
819
|
class y {
|
796
820
|
//#endregion
|
797
821
|
//#region 驱动工厂
|
@@ -805,103 +829,103 @@ class y {
|
|
805
829
|
* CDN工厂
|
806
830
|
*/
|
807
831
|
static get cdn() {
|
808
|
-
return this.create(
|
832
|
+
return this.create(qt);
|
809
833
|
}
|
810
834
|
/**
|
811
835
|
* 编码器工厂
|
812
836
|
*/
|
813
837
|
static get encoder() {
|
814
|
-
return this.create(
|
838
|
+
return this.create(zt);
|
815
839
|
}
|
816
840
|
/**
|
817
841
|
* Excel工厂
|
818
842
|
*/
|
819
843
|
static get excel() {
|
820
|
-
return this.create(
|
844
|
+
return this.create(Xt);
|
821
845
|
}
|
822
846
|
/**
|
823
847
|
* Explainer工厂
|
824
848
|
*/
|
825
849
|
static get explainer() {
|
826
|
-
return this.create(
|
850
|
+
return this.create(Gt);
|
827
851
|
}
|
828
852
|
/**
|
829
853
|
* 特征工厂
|
830
854
|
*/
|
831
855
|
static get feature() {
|
832
|
-
return this.create(
|
856
|
+
return this.create(rr);
|
833
857
|
}
|
834
858
|
/**
|
835
859
|
* 哈希工厂
|
836
860
|
*/
|
837
861
|
static get hasher() {
|
838
|
-
return this.create(
|
862
|
+
return this.create(nr);
|
839
863
|
}
|
840
864
|
/**
|
841
865
|
* Http请求工厂
|
842
866
|
*/
|
843
867
|
static get http() {
|
844
|
-
return this.create(
|
868
|
+
return this.create(cr);
|
845
869
|
}
|
846
870
|
/**
|
847
871
|
* 多语言工厂
|
848
872
|
*/
|
849
873
|
static get i18n() {
|
850
|
-
return this.create(
|
874
|
+
return this.create(hr);
|
851
875
|
}
|
852
876
|
/**
|
853
877
|
* 消息提示请求工厂
|
854
878
|
*/
|
855
879
|
static get messenger() {
|
856
|
-
return this.create(
|
880
|
+
return this.create(yr);
|
857
881
|
}
|
858
882
|
/**
|
859
883
|
* 提供程序工厂
|
860
884
|
*/
|
861
885
|
static get provider() {
|
862
|
-
return this.create(
|
886
|
+
return this.create(Mt);
|
863
887
|
}
|
864
888
|
/**
|
865
889
|
* 签名工厂
|
866
890
|
*/
|
867
891
|
static get signer() {
|
868
|
-
return this.create(
|
892
|
+
return this.create(br);
|
869
893
|
}
|
870
894
|
/**
|
871
895
|
* 通信工厂
|
872
896
|
*/
|
873
897
|
static get socket() {
|
874
|
-
return this.create(
|
898
|
+
return this.create(xr);
|
875
899
|
}
|
876
900
|
/**
|
877
901
|
* SSO工厂
|
878
902
|
*/
|
879
903
|
static get sso() {
|
880
|
-
return this.create(
|
904
|
+
return this.create($r);
|
881
905
|
}
|
882
906
|
/**
|
883
907
|
* Task工厂
|
884
908
|
*/
|
885
909
|
static get task() {
|
886
|
-
return this.create(
|
910
|
+
return this.create(Hr);
|
887
911
|
}
|
888
912
|
/**
|
889
913
|
* 模板工厂
|
890
914
|
*/
|
891
915
|
static get template() {
|
892
|
-
return this.create(
|
916
|
+
return this.create(Lr);
|
893
917
|
}
|
894
918
|
/**
|
895
919
|
* 工具工厂
|
896
920
|
*/
|
897
921
|
static get util() {
|
898
|
-
return this.create(
|
922
|
+
return this.create(Rr);
|
899
923
|
}
|
900
924
|
/**
|
901
925
|
* 工具类工厂
|
902
926
|
*/
|
903
927
|
static get utility() {
|
904
|
-
return this.create(
|
928
|
+
return this.create(ds);
|
905
929
|
}
|
906
930
|
//#endregion
|
907
931
|
//#region 仓储工厂
|
@@ -909,7 +933,7 @@ class y {
|
|
909
933
|
* 仓储工厂
|
910
934
|
*/
|
911
935
|
static get repo() {
|
912
|
-
return this.create(
|
936
|
+
return this.create(kt);
|
913
937
|
}
|
914
938
|
//#endregion
|
915
939
|
//#region 服务工厂
|
@@ -917,7 +941,7 @@ class y {
|
|
917
941
|
* 服务工厂
|
918
942
|
*/
|
919
943
|
static get svc() {
|
920
|
-
return this.create(
|
944
|
+
return this.create(Ht);
|
921
945
|
}
|
922
946
|
//#endregion
|
923
947
|
//#region 创建
|
@@ -940,7 +964,7 @@ class me {
|
|
940
964
|
n(this, "type");
|
941
965
|
}
|
942
966
|
}
|
943
|
-
class
|
967
|
+
class Ot extends me {
|
944
968
|
constructor() {
|
945
969
|
super(...arguments);
|
946
970
|
n(this, "type", "Json");
|
@@ -952,31 +976,31 @@ class Ht extends me {
|
|
952
976
|
return d.json.serialize(e.rows, !0);
|
953
977
|
}
|
954
978
|
}
|
955
|
-
class
|
979
|
+
class Lt extends me {
|
956
980
|
constructor() {
|
957
981
|
super(...arguments);
|
958
982
|
n(this, "type", "Mongo");
|
959
983
|
}
|
960
984
|
insert(e) {
|
961
985
|
let { name: t, columns: r, rows: s } = e, l = "";
|
962
|
-
for (let
|
963
|
-
let
|
964
|
-
l += `db.${t}.insert(${u})`,
|
986
|
+
for (let o = 0; o < s.length; o++) {
|
987
|
+
let a = s[o], u = d.json.serialize(a, !0);
|
988
|
+
l += `db.${t}.insert(${u})`, o != s.length - 1 && (l += `\r
|
965
989
|
`);
|
966
990
|
}
|
967
991
|
return l;
|
968
992
|
}
|
969
993
|
update(e) {
|
970
|
-
let { name: t, columns: r, rows: s } = e, l = "",
|
971
|
-
for (let
|
972
|
-
let u = s[
|
973
|
-
l += `db.${t}.update(${h},{$set:${g})`,
|
994
|
+
let { name: t, columns: r, rows: s } = e, l = "", o = r.filter((a) => a.key).map((a) => a.name);
|
995
|
+
for (let a = 0; a < s.length; a++) {
|
996
|
+
let u = s[a], p = d.object.extract(u, o), h = d.json.serialize(p, !0), g = d.json.serialize(u, !0);
|
997
|
+
l += `db.${t}.update(${h},{$set:${g})`, a != s.length - 1 && (l += `\r
|
974
998
|
`);
|
975
999
|
}
|
976
1000
|
return l;
|
977
1001
|
}
|
978
1002
|
}
|
979
|
-
class
|
1003
|
+
class Ce {
|
980
1004
|
constructor() {
|
981
1005
|
//#region 属性
|
982
1006
|
n(this, "type");
|
@@ -992,7 +1016,7 @@ class $e {
|
|
992
1016
|
}
|
993
1017
|
//#endregion
|
994
1018
|
}
|
995
|
-
const
|
1019
|
+
const te = class te extends Ce {
|
996
1020
|
constructor() {
|
997
1021
|
super(...arguments);
|
998
1022
|
//#region 属性
|
@@ -1033,8 +1057,8 @@ const ee = class ee extends $e {
|
|
1033
1057
|
return await super.openAsync(e), new Promise((t, r) => {
|
1034
1058
|
let s = indexedDB.open(this.database);
|
1035
1059
|
s.onsuccess = (l) => {
|
1036
|
-
let
|
1037
|
-
|
1060
|
+
let o = l.target.result;
|
1061
|
+
te.version = o.version, this.objectStoreNames = o.objectStoreNames, t(te.version);
|
1038
1062
|
}, s.onerror = (l) => {
|
1039
1063
|
r(l.target);
|
1040
1064
|
};
|
@@ -1045,10 +1069,10 @@ const ee = class ee extends $e {
|
|
1045
1069
|
*/
|
1046
1070
|
async createAsync(e) {
|
1047
1071
|
return e == null ? Promise.resolve() : this.objectStoreNames.contains(e) ? Promise.resolve(!0) : new Promise((t, r) => {
|
1048
|
-
let s = indexedDB.open(this.database, ++
|
1072
|
+
let s = indexedDB.open(this.database, ++te.version);
|
1049
1073
|
s.onupgradeneeded = (l) => {
|
1050
|
-
let
|
1051
|
-
|
1074
|
+
let o = l.target.result;
|
1075
|
+
o.objectStoreNames.contains(e) || o.createObjectStore(e);
|
1052
1076
|
}, s.onsuccess = (l) => {
|
1053
1077
|
t(l);
|
1054
1078
|
}, s.onerror = (l) => {
|
@@ -1061,7 +1085,7 @@ const ee = class ee extends $e {
|
|
1061
1085
|
*/
|
1062
1086
|
async openDbAsync() {
|
1063
1087
|
return new Promise((e, t) => {
|
1064
|
-
let r = indexedDB.open(this.database,
|
1088
|
+
let r = indexedDB.open(this.database, te.version);
|
1065
1089
|
r.onsuccess = (s) => {
|
1066
1090
|
let l = s.target.result;
|
1067
1091
|
e(l);
|
@@ -1075,12 +1099,12 @@ const ee = class ee extends $e {
|
|
1075
1099
|
*/
|
1076
1100
|
async openTransAsync(e, t, r) {
|
1077
1101
|
return new Promise((s, l) => {
|
1078
|
-
let
|
1079
|
-
|
1102
|
+
let o = r.transaction(e, t);
|
1103
|
+
o.oncomplete = (a) => {
|
1080
1104
|
r.close();
|
1081
|
-
},
|
1082
|
-
l(
|
1083
|
-
}, s(
|
1105
|
+
}, o.onerror = (a) => {
|
1106
|
+
l(a);
|
1107
|
+
}, s(o);
|
1084
1108
|
});
|
1085
1109
|
}
|
1086
1110
|
//#endregion
|
@@ -1104,11 +1128,11 @@ const ee = class ee extends $e {
|
|
1104
1128
|
}
|
1105
1129
|
async getKeysAsync(e) {
|
1106
1130
|
return e == null ? Promise.resolve() : new Promise(async (t, r) => {
|
1107
|
-
let s = await this.openDbAsync(),
|
1108
|
-
|
1131
|
+
let s = await this.openDbAsync(), a = (await this.openTransAsync(e, "readonly", s)).objectStore(e).getAllKeys();
|
1132
|
+
a.onsuccess = (u) => {
|
1109
1133
|
let p = u.target.result;
|
1110
1134
|
t(p);
|
1111
|
-
},
|
1135
|
+
}, a.onerror = (u) => {
|
1112
1136
|
r(u.target);
|
1113
1137
|
};
|
1114
1138
|
});
|
@@ -1122,14 +1146,14 @@ const ee = class ee extends $e {
|
|
1122
1146
|
if (t == null || Object.is(t, NaN))
|
1123
1147
|
return;
|
1124
1148
|
let s = await this.openDbAsync();
|
1125
|
-
return new Promise(async (l,
|
1149
|
+
return new Promise(async (l, o) => {
|
1126
1150
|
let p = (await this.openTransAsync(e, "readwrite", s)).objectStore(e).add(r, t);
|
1127
1151
|
p.onsuccess = (h) => {
|
1128
1152
|
let g = h.target.result;
|
1129
1153
|
l(g);
|
1130
1154
|
}, p.onerror = (h) => {
|
1131
1155
|
let g = h.target.error;
|
1132
|
-
|
1156
|
+
o(g.message);
|
1133
1157
|
};
|
1134
1158
|
});
|
1135
1159
|
}
|
@@ -1150,14 +1174,14 @@ const ee = class ee extends $e {
|
|
1150
1174
|
if (t == null || Object.is(t, NaN))
|
1151
1175
|
return;
|
1152
1176
|
let s = await this.openDbAsync();
|
1153
|
-
return new Promise(async (l,
|
1154
|
-
let
|
1177
|
+
return new Promise(async (l, o) => {
|
1178
|
+
let a = await this.openTransAsync(e, "readwrite", s), u = d.object.clone(r), h = a.objectStore(e).put(u, t);
|
1155
1179
|
h.onsuccess = (g) => {
|
1156
1180
|
let m = g.target.result;
|
1157
1181
|
l(m);
|
1158
1182
|
}, h.onerror = (g) => {
|
1159
1183
|
let m = g.target.error;
|
1160
|
-
|
1184
|
+
o(m.message);
|
1161
1185
|
};
|
1162
1186
|
});
|
1163
1187
|
}
|
@@ -1178,9 +1202,9 @@ const ee = class ee extends $e {
|
|
1178
1202
|
/**
|
1179
1203
|
* 静态版本,保证所有数据库实例拿到最新版本信息
|
1180
1204
|
*/
|
1181
|
-
n(
|
1182
|
-
let ke =
|
1183
|
-
class
|
1205
|
+
n(te, "version", null);
|
1206
|
+
let ke = te;
|
1207
|
+
class Rt extends Ce {
|
1184
1208
|
constructor() {
|
1185
1209
|
super(...arguments);
|
1186
1210
|
//#region 属性
|
@@ -1251,7 +1275,7 @@ class Ot extends $e {
|
|
1251
1275
|
}
|
1252
1276
|
//#endregion
|
1253
1277
|
}
|
1254
|
-
class
|
1278
|
+
class It extends Ce {
|
1255
1279
|
constructor() {
|
1256
1280
|
super(...arguments);
|
1257
1281
|
//#region 属性
|
@@ -1294,13 +1318,18 @@ class Lt extends $e {
|
|
1294
1318
|
}
|
1295
1319
|
//#endregion
|
1296
1320
|
}
|
1297
|
-
class
|
1321
|
+
class Mt extends D {
|
1298
1322
|
constructor() {
|
1299
1323
|
super(...arguments);
|
1324
|
+
n(this, "type", "Provider");
|
1300
1325
|
n(this, "_default");
|
1301
1326
|
}
|
1302
1327
|
open() {
|
1303
|
-
super.open(), super.
|
1328
|
+
super.open(), super.register({
|
1329
|
+
IndexedDb: ke,
|
1330
|
+
Storage: Rt,
|
1331
|
+
Cookie: It
|
1332
|
+
});
|
1304
1333
|
}
|
1305
1334
|
/**
|
1306
1335
|
* 获取默认驱动程序,并自动决定创建指定名称的仓储
|
@@ -1319,7 +1348,7 @@ class Rt extends D {
|
|
1319
1348
|
return super.create("Storage");
|
1320
1349
|
}
|
1321
1350
|
}
|
1322
|
-
class
|
1351
|
+
class Re {
|
1323
1352
|
/**
|
1324
1353
|
* 获取实际SQL字段名称
|
1325
1354
|
*/
|
@@ -1336,55 +1365,64 @@ class Pe {
|
|
1336
1365
|
return e == "number" || e == "boolean" ? i : e == "object" || e == "string" ? `'${(e == "object" ? d.json.serialize(i) : i).replace(/'/g, "''")}'` : i;
|
1337
1366
|
}
|
1338
1367
|
}
|
1339
|
-
class
|
1368
|
+
class xe extends me {
|
1340
1369
|
constructor() {
|
1341
1370
|
super(...arguments);
|
1342
1371
|
n(this, "type", "Sql");
|
1343
1372
|
}
|
1344
1373
|
insert(e) {
|
1345
|
-
let { name: t, columns: r, rows: s } = e, l = e.getIdentity(),
|
1374
|
+
let { name: t, columns: r, rows: s } = e, l = e.getIdentity(), o = "", p = r.filter((h) => !h.identity).map((h) => Re.getSqlName(h.name)).join(", ");
|
1346
1375
|
for (let h = 0; h < s.length; h++) {
|
1347
1376
|
let g = s[h];
|
1348
|
-
|
1349
|
-
`,
|
1350
|
-
`,
|
1351
|
-
`,
|
1377
|
+
o += `INSERT INTO ${t}\r
|
1378
|
+
`, o += `(${p})\r
|
1379
|
+
`, o += `VALUES\r
|
1380
|
+
`, o += "(";
|
1352
1381
|
let m = Object.keys(g);
|
1353
|
-
for (let
|
1354
|
-
let
|
1355
|
-
if (l != null && l.name ==
|
1382
|
+
for (let k = 0; k < m.length; k++) {
|
1383
|
+
let O = m[k];
|
1384
|
+
if (l != null && l.name == O)
|
1356
1385
|
continue;
|
1357
|
-
let
|
1358
|
-
|
1386
|
+
let P = g[O];
|
1387
|
+
o += `${Re.getValue(P)}`, k != m.length - 1 && (o += ", ");
|
1359
1388
|
}
|
1360
|
-
|
1389
|
+
o += ")", h != s.length - 1 && (o += `\r
|
1361
1390
|
\r
|
1362
1391
|
`);
|
1363
1392
|
}
|
1364
|
-
return
|
1393
|
+
return o;
|
1365
1394
|
}
|
1366
1395
|
update(e) {
|
1367
1396
|
return "";
|
1368
1397
|
}
|
1369
1398
|
}
|
1370
|
-
class
|
1399
|
+
class Bt extends me {
|
1371
1400
|
constructor() {
|
1372
1401
|
super(...arguments);
|
1373
1402
|
n(this, "type", "MySql");
|
1374
1403
|
}
|
1375
1404
|
insert(e) {
|
1376
|
-
return new
|
1405
|
+
return new xe().insert(e);
|
1377
1406
|
}
|
1378
1407
|
update(e) {
|
1379
|
-
return new
|
1408
|
+
return new xe().update(e);
|
1380
1409
|
}
|
1381
1410
|
}
|
1382
1411
|
class Pt extends D {
|
1412
|
+
constructor() {
|
1413
|
+
super(...arguments);
|
1414
|
+
n(this, "type", "Builder");
|
1415
|
+
}
|
1383
1416
|
open() {
|
1384
|
-
super.open(), super.
|
1417
|
+
super.open(), super.register({
|
1418
|
+
Json: Ot,
|
1419
|
+
Mongo: Lt,
|
1420
|
+
MySql: Bt,
|
1421
|
+
Sql: xe
|
1422
|
+
});
|
1385
1423
|
}
|
1386
1424
|
}
|
1387
|
-
class
|
1425
|
+
class Sl {
|
1388
1426
|
constructor() {
|
1389
1427
|
/**
|
1390
1428
|
* 表名
|
@@ -1406,7 +1444,7 @@ class xl {
|
|
1406
1444
|
return this.columns == null || this.columns.length == 0 ? null : this.columns.find((e) => e.identity);
|
1407
1445
|
}
|
1408
1446
|
}
|
1409
|
-
class
|
1447
|
+
class Ye {
|
1410
1448
|
constructor() {
|
1411
1449
|
/**
|
1412
1450
|
* 任务实例,用于控制并发
|
@@ -1418,12 +1456,12 @@ class Je {
|
|
1418
1456
|
n(this, "loadAsync", async (i) => {
|
1419
1457
|
let e = d.string.getArray(i), t = [];
|
1420
1458
|
for (let s of e) {
|
1421
|
-
let l = new Promise((
|
1459
|
+
let l = new Promise((o, a) => {
|
1422
1460
|
let u = d.dom.getByUrl(s);
|
1423
|
-
u != null ?
|
1424
|
-
|
1461
|
+
u != null ? o(u) : (u = d.dom.createByUrl(s), document.head.appendChild(u), u.onload = (p) => {
|
1462
|
+
o(u);
|
1425
1463
|
}, u.onerror = (p) => {
|
1426
|
-
|
1464
|
+
a(p);
|
1427
1465
|
let h;
|
1428
1466
|
throw p instanceof Event ? h = `${p.type}, 耗时: ${p.timeStamp}` : h = p, new Error(`脚本: ${s} 加载出错: ${h}`);
|
1429
1467
|
});
|
@@ -1438,6 +1476,15 @@ class Je {
|
|
1438
1476
|
async openAsync(i) {
|
1439
1477
|
this.task = y.task.create("Memory"), this.task.taskLimit = 1;
|
1440
1478
|
}
|
1479
|
+
//#endregion
|
1480
|
+
async getCrypto() {
|
1481
|
+
}
|
1482
|
+
async getECharts() {
|
1483
|
+
}
|
1484
|
+
async getElementPlus() {
|
1485
|
+
}
|
1486
|
+
async getFortAwesome() {
|
1487
|
+
}
|
1441
1488
|
async getMonaco(i = null) {
|
1442
1489
|
let e = window.monaco;
|
1443
1490
|
if (e)
|
@@ -1446,16 +1493,22 @@ class Je {
|
|
1446
1493
|
if (window.monaco)
|
1447
1494
|
return Promise.resolve();
|
1448
1495
|
await new Promise(async (s, l) => {
|
1449
|
-
let
|
1450
|
-
await this.loadFilesAsync(i,
|
1451
|
-
let
|
1452
|
-
|
1496
|
+
let o = ["/loader.js"];
|
1497
|
+
await this.loadFilesAsync(i, o);
|
1498
|
+
let a = window.require;
|
1499
|
+
a.config({ paths: { vs: i } }), a(["vs/editor/editor.main"], (u) => {
|
1453
1500
|
s(u);
|
1454
1501
|
});
|
1455
1502
|
});
|
1456
1503
|
};
|
1457
1504
|
return await this.task.concurrent(t), e = window.monaco, e;
|
1458
1505
|
}
|
1506
|
+
async getQuill() {
|
1507
|
+
}
|
1508
|
+
async getWeiXin() {
|
1509
|
+
}
|
1510
|
+
async getXlsx() {
|
1511
|
+
}
|
1459
1512
|
//#region 加载
|
1460
1513
|
/**
|
1461
1514
|
* 使用并发限制顺序加载资源,并防止monaco-editor的define函数冲突
|
@@ -1480,7 +1533,7 @@ class Je {
|
|
1480
1533
|
}
|
1481
1534
|
//#endregion
|
1482
1535
|
}
|
1483
|
-
class
|
1536
|
+
class Ft extends Ye {
|
1484
1537
|
constructor() {
|
1485
1538
|
super(...arguments);
|
1486
1539
|
//#region 属性
|
@@ -1518,7 +1571,7 @@ class Mt extends Je {
|
|
1518
1571
|
return await super.loadFilesAsync("/assets/xlsx-js-style@1.2.0", e), window.XLSX;
|
1519
1572
|
}
|
1520
1573
|
}
|
1521
|
-
class
|
1574
|
+
class Nt extends Ye {
|
1522
1575
|
constructor() {
|
1523
1576
|
super(...arguments);
|
1524
1577
|
//#region 属性
|
@@ -1567,22 +1620,31 @@ class Bt extends Je {
|
|
1567
1620
|
return await super.loadFilesAsync(`${this.jdCdn}/xlsx-js-style@1.2.0`, e), window.XLSX;
|
1568
1621
|
}
|
1569
1622
|
}
|
1570
|
-
class
|
1623
|
+
class qt extends D {
|
1624
|
+
constructor() {
|
1625
|
+
super(...arguments);
|
1626
|
+
n(this, "type", "Cdn");
|
1627
|
+
}
|
1571
1628
|
open() {
|
1572
|
-
super.open(), super.
|
1629
|
+
super.open(), super.register({
|
1630
|
+
Local: Ft,
|
1631
|
+
Third: Nt
|
1632
|
+
});
|
1573
1633
|
}
|
1574
1634
|
/**
|
1575
1635
|
* 获取指定CDN实例
|
1576
1636
|
*/
|
1577
|
-
async createAsync(
|
1578
|
-
let
|
1579
|
-
return await
|
1637
|
+
async createAsync(e, t) {
|
1638
|
+
let r = await super.createAsync(e);
|
1639
|
+
return await r.openAsync(t), r;
|
1580
1640
|
}
|
1581
1641
|
}
|
1582
|
-
class
|
1642
|
+
class Ge {
|
1583
1643
|
constructor() {
|
1584
1644
|
n(this, "type");
|
1585
1645
|
}
|
1646
|
+
openAsync(i) {
|
1647
|
+
}
|
1586
1648
|
encode(i) {
|
1587
1649
|
let e;
|
1588
1650
|
return typeof i == "object" ? e = JSON.stringify(i) : e = i, this.encodeString(e);
|
@@ -1592,7 +1654,7 @@ class Qe {
|
|
1592
1654
|
return JSON.parse(e);
|
1593
1655
|
}
|
1594
1656
|
}
|
1595
|
-
class
|
1657
|
+
class Vt extends Ge {
|
1596
1658
|
constructor() {
|
1597
1659
|
super(...arguments);
|
1598
1660
|
//#region 属性
|
@@ -1614,7 +1676,7 @@ class Nt extends Qe {
|
|
1614
1676
|
return this.crypto.enc.Utf8.stringify(t);
|
1615
1677
|
}
|
1616
1678
|
}
|
1617
|
-
class
|
1679
|
+
class Wt extends Ge {
|
1618
1680
|
constructor() {
|
1619
1681
|
super(...arguments);
|
1620
1682
|
n(this, "type", "Url");
|
@@ -1626,16 +1688,23 @@ class Vt extends Qe {
|
|
1626
1688
|
return decodeURIComponent(e);
|
1627
1689
|
}
|
1628
1690
|
}
|
1629
|
-
class
|
1691
|
+
class zt extends D {
|
1692
|
+
constructor() {
|
1693
|
+
super(...arguments);
|
1694
|
+
n(this, "type", "Encoder");
|
1695
|
+
}
|
1630
1696
|
open() {
|
1631
|
-
super.open(), super.
|
1697
|
+
super.open(), super.register({
|
1698
|
+
Base64: Vt,
|
1699
|
+
Url: Wt
|
1700
|
+
});
|
1632
1701
|
}
|
1633
1702
|
/**
|
1634
1703
|
* 创建执行类型的Hash实例
|
1635
1704
|
*/
|
1636
|
-
async createAsync(
|
1637
|
-
let
|
1638
|
-
return await
|
1705
|
+
async createAsync(e, t) {
|
1706
|
+
let r = await super.createAsync(e);
|
1707
|
+
return await r.openAsync(null), r;
|
1639
1708
|
}
|
1640
1709
|
/**
|
1641
1710
|
* 获取Base64 编码器对象
|
@@ -1647,12 +1716,12 @@ class qt extends D {
|
|
1647
1716
|
return this.createWithCache("Url");
|
1648
1717
|
}
|
1649
1718
|
}
|
1650
|
-
class
|
1719
|
+
class Kt {
|
1651
1720
|
constructor() {
|
1652
1721
|
n(this, "type");
|
1653
1722
|
}
|
1654
1723
|
}
|
1655
|
-
class
|
1724
|
+
class Jt extends Kt {
|
1656
1725
|
constructor() {
|
1657
1726
|
super(...arguments);
|
1658
1727
|
//#region 属性
|
@@ -1677,16 +1746,16 @@ class zt extends Wt {
|
|
1677
1746
|
}), s.push(l), e.length > 0)
|
1678
1747
|
for (let h = 0; h < e.length; h++) {
|
1679
1748
|
let g = e[h], m = [];
|
1680
|
-
Object.keys(g).forEach((
|
1681
|
-
m.push(g[
|
1749
|
+
Object.keys(g).forEach((k) => {
|
1750
|
+
m.push(g[k]);
|
1682
1751
|
}), s.push(m);
|
1683
1752
|
}
|
1684
|
-
let
|
1685
|
-
this.xlsx.utils.book_append_sheet(
|
1753
|
+
let o = this.xlsx.utils.book_new(), a = this.xlsx.utils.json_to_sheet(s, { skipHeader: !0 });
|
1754
|
+
this.xlsx.utils.book_append_sheet(o, a, "abc");
|
1686
1755
|
let u = 65;
|
1687
1756
|
for (let h = 0; h < r.length; h++) {
|
1688
1757
|
let m = `${String.fromCharCode(u + h)}1`;
|
1689
|
-
|
1758
|
+
a[m].s = {
|
1690
1759
|
alignment: { horizontal: "center" },
|
1691
1760
|
font: { bold: !0, color: { rgb: "000000" } },
|
1692
1761
|
fill: { fgColor: { rgb: "409eff" } }
|
@@ -1696,102 +1765,127 @@ class zt extends Wt {
|
|
1696
1765
|
r.forEach((h) => {
|
1697
1766
|
let g = e[0][h], m = { wpx: 50 };
|
1698
1767
|
typeof g == "string" && (m.wpx = 100), p.push(m);
|
1699
|
-
}),
|
1768
|
+
}), a["!cols"] = p, this.xlsx.writeFile(o, t);
|
1700
1769
|
}
|
1701
1770
|
}
|
1702
|
-
class
|
1771
|
+
class Xt extends D {
|
1772
|
+
constructor() {
|
1773
|
+
super(...arguments);
|
1774
|
+
n(this, "type", "Excel");
|
1775
|
+
}
|
1703
1776
|
open() {
|
1704
|
-
super.
|
1777
|
+
super.open(), super.register({
|
1778
|
+
Xlsx: Jt
|
1779
|
+
});
|
1705
1780
|
}
|
1706
1781
|
/**
|
1707
1782
|
* 获取Excel实例
|
1708
1783
|
*/
|
1709
|
-
async createAsync(
|
1710
|
-
let
|
1711
|
-
return await
|
1784
|
+
async createAsync(e, t) {
|
1785
|
+
let r = await super.createAsync(e);
|
1786
|
+
return await r.openAsync(t), r;
|
1712
1787
|
}
|
1713
1788
|
}
|
1714
|
-
class
|
1789
|
+
class Qt {
|
1715
1790
|
constructor() {
|
1716
1791
|
n(this, "type", "Json");
|
1717
1792
|
}
|
1718
1793
|
}
|
1719
|
-
class
|
1794
|
+
class Yt extends Qt {
|
1720
1795
|
}
|
1721
|
-
class
|
1796
|
+
class Gt extends D {
|
1797
|
+
constructor() {
|
1798
|
+
super(...arguments);
|
1799
|
+
n(this, "type", "Explainer");
|
1800
|
+
}
|
1722
1801
|
open() {
|
1723
|
-
super.open(), super.
|
1802
|
+
super.open(), super.register({
|
1803
|
+
Json: Yt
|
1804
|
+
});
|
1724
1805
|
}
|
1725
1806
|
}
|
1726
|
-
class
|
1807
|
+
class Te {
|
1727
1808
|
constructor() {
|
1728
|
-
n(this, "type"
|
1809
|
+
n(this, "type");
|
1729
1810
|
}
|
1730
1811
|
openAsync(i) {
|
1812
|
+
return d.json.mergeTo(this, i), Promise.resolve();
|
1731
1813
|
}
|
1732
|
-
|
1733
|
-
|
1814
|
+
}
|
1815
|
+
class Zt extends Te {
|
1816
|
+
constructor() {
|
1817
|
+
super(...arguments);
|
1818
|
+
n(this, "type", "Sort");
|
1734
1819
|
}
|
1735
|
-
|
1736
|
-
this.resort(
|
1820
|
+
add(e, t, r, s) {
|
1821
|
+
this.resort(e, t, r);
|
1822
|
+
}
|
1823
|
+
insert(e, t, r, s, l) {
|
1824
|
+
this.resort(e, t, r);
|
1737
1825
|
}
|
1738
1826
|
//复制时,自动往后排序
|
1739
|
-
copy(
|
1740
|
-
this.resort(
|
1827
|
+
copy(e, t, r) {
|
1828
|
+
this.resort(e, t, r);
|
1741
1829
|
}
|
1742
1830
|
//重新排序
|
1743
|
-
resort(
|
1744
|
-
let
|
1745
|
-
for (let
|
1746
|
-
let
|
1747
|
-
|
1831
|
+
resort(e, t, r) {
|
1832
|
+
let s = r[e.name];
|
1833
|
+
for (let l = 0; l < s.length; l++) {
|
1834
|
+
let o = s[l];
|
1835
|
+
o[t.name] = (l + 1) * 10;
|
1748
1836
|
}
|
1749
1837
|
}
|
1750
1838
|
}
|
1751
|
-
class
|
1839
|
+
class er extends Te {
|
1752
1840
|
constructor() {
|
1841
|
+
super(...arguments);
|
1753
1842
|
n(this, "type", "I18N");
|
1754
1843
|
}
|
1755
|
-
|
1756
|
-
}
|
1757
|
-
add(i, e, t, r) {
|
1844
|
+
add(e, t, r, s) {
|
1758
1845
|
}
|
1759
|
-
insert(
|
1846
|
+
insert(e, t, r, s, l) {
|
1760
1847
|
}
|
1761
|
-
copy(
|
1848
|
+
copy(e, t, r) {
|
1762
1849
|
}
|
1763
1850
|
}
|
1764
|
-
class
|
1851
|
+
class tr extends Te {
|
1765
1852
|
constructor() {
|
1853
|
+
super(...arguments);
|
1766
1854
|
n(this, "type", "Expression");
|
1767
1855
|
}
|
1768
|
-
|
1769
|
-
}
|
1770
|
-
add(i, e, t, r) {
|
1856
|
+
add(e, t, r, s) {
|
1771
1857
|
}
|
1772
|
-
insert(
|
1858
|
+
insert(e, t, r, s, l) {
|
1773
1859
|
}
|
1774
|
-
copy(
|
1860
|
+
copy(e, t, r) {
|
1775
1861
|
}
|
1776
1862
|
}
|
1777
|
-
class
|
1863
|
+
class rr extends D {
|
1864
|
+
constructor() {
|
1865
|
+
super(...arguments);
|
1866
|
+
n(this, "type", "Feature");
|
1867
|
+
}
|
1778
1868
|
open() {
|
1779
|
-
super.open(), super.
|
1869
|
+
super.open(), super.register({
|
1870
|
+
Sort: Zt,
|
1871
|
+
I18N: er,
|
1872
|
+
Expression: tr
|
1873
|
+
});
|
1780
1874
|
}
|
1781
1875
|
/**
|
1782
1876
|
* 获取指定特征实例
|
1783
1877
|
*/
|
1784
|
-
async createAsync(
|
1785
|
-
let
|
1786
|
-
return await
|
1878
|
+
async createAsync(e, t) {
|
1879
|
+
let r = await super.createAsync(e);
|
1880
|
+
return await r.openAsync(null), r;
|
1787
1881
|
}
|
1788
1882
|
}
|
1789
|
-
class
|
1883
|
+
class Ze {
|
1790
1884
|
constructor() {
|
1791
1885
|
n(this, "type");
|
1792
1886
|
}
|
1793
1887
|
}
|
1794
|
-
class
|
1888
|
+
class sr extends Ze {
|
1795
1889
|
constructor() {
|
1796
1890
|
super(...arguments);
|
1797
1891
|
//#region 属性
|
@@ -1799,7 +1893,7 @@ class tr extends Ye {
|
|
1799
1893
|
//#endregion
|
1800
1894
|
n(this, "compute", async (e) => {
|
1801
1895
|
let r = new TextEncoder().encode(e), s = await crypto.subtle.digest("SHA-256", r);
|
1802
|
-
return Array.from(new Uint8Array(s)).map((
|
1896
|
+
return Array.from(new Uint8Array(s)).map((a) => a.toString(16).padStart(2, "0")).join("");
|
1803
1897
|
});
|
1804
1898
|
}
|
1805
1899
|
//#endregion
|
@@ -1807,7 +1901,7 @@ class tr extends Ye {
|
|
1807
1901
|
async openAsync(e) {
|
1808
1902
|
}
|
1809
1903
|
}
|
1810
|
-
class
|
1904
|
+
class lr extends Ze {
|
1811
1905
|
constructor() {
|
1812
1906
|
super(...arguments);
|
1813
1907
|
//#region 属性
|
@@ -1825,13 +1919,20 @@ class rr extends Ye {
|
|
1825
1919
|
this.crypto = await le.getCrypto();
|
1826
1920
|
}
|
1827
1921
|
}
|
1828
|
-
class
|
1922
|
+
class nr extends D {
|
1923
|
+
constructor() {
|
1924
|
+
super(...arguments);
|
1925
|
+
n(this, "type", "Hasher");
|
1926
|
+
}
|
1829
1927
|
open() {
|
1830
|
-
super.open(), super.
|
1928
|
+
super.open(), super.register({
|
1929
|
+
Sha256: sr,
|
1930
|
+
Md5: lr
|
1931
|
+
});
|
1831
1932
|
}
|
1832
|
-
async createAsync(
|
1833
|
-
let
|
1834
|
-
return await
|
1933
|
+
async createAsync(e, t) {
|
1934
|
+
let r = await super.createAsync(e);
|
1935
|
+
return await r.openAsync(null), r;
|
1835
1936
|
}
|
1836
1937
|
/**
|
1837
1938
|
* 获取MD5 Hash对象
|
@@ -1840,7 +1941,7 @@ class sr extends D {
|
|
1840
1941
|
return this.createWithCacheAsync("Md5");
|
1841
1942
|
}
|
1842
1943
|
}
|
1843
|
-
class
|
1944
|
+
class et {
|
1844
1945
|
constructor() {
|
1845
1946
|
/**
|
1846
1947
|
* 请求唯一标识
|
@@ -1902,7 +2003,7 @@ class Xe {
|
|
1902
2003
|
}
|
1903
2004
|
//#endregion
|
1904
2005
|
}
|
1905
|
-
class
|
2006
|
+
class tt extends et {
|
1906
2007
|
constructor() {
|
1907
2008
|
super();
|
1908
2009
|
/**
|
@@ -1920,7 +2021,7 @@ class Ge extends Xe {
|
|
1920
2021
|
this.id = d.string.getUniqueId(8);
|
1921
2022
|
}
|
1922
2023
|
}
|
1923
|
-
class
|
2024
|
+
class ir {
|
1924
2025
|
constructor() {
|
1925
2026
|
n(this, "request");
|
1926
2027
|
n(this, "model");
|
@@ -1929,7 +2030,7 @@ class lr {
|
|
1929
2030
|
n(this, "time");
|
1930
2031
|
}
|
1931
2032
|
}
|
1932
|
-
class
|
2033
|
+
class Ee {
|
1933
2034
|
constructor() {
|
1934
2035
|
//#region 属性
|
1935
2036
|
n(this, "type");
|
@@ -1966,7 +2067,7 @@ class je {
|
|
1966
2067
|
* 获取请求消息
|
1967
2068
|
*/
|
1968
2069
|
n(this, "getRequest", async (i, e, t, r = null) => {
|
1969
|
-
let s = new
|
2070
|
+
let s = new tt();
|
1970
2071
|
return s.method = i, s.contentType = e, s.path = t, s.body = d.json.serializeWithoutString(r), s;
|
1971
2072
|
});
|
1972
2073
|
}
|
@@ -1993,14 +2094,14 @@ class je {
|
|
1993
2094
|
}
|
1994
2095
|
//#endregion
|
1995
2096
|
//#region 准备
|
1996
|
-
prepareAsync(i, e) {
|
1997
|
-
if (i.prepare(), e == null ||
|
2097
|
+
async prepareAsync(i, e) {
|
2098
|
+
if (i.prepare(), e == null || e.length == 0)
|
1998
2099
|
return;
|
1999
|
-
let t = this.encoder.encode(e), r = d.time.getTimestamp(), s = d.time.formatDateTime(/* @__PURE__ */ new Date()), l = new
|
2000
|
-
l.request = i, l.model = e, l.encoded = t, l.timestamp = r, l.time = s, i.path = this.template.
|
2100
|
+
let t = this.encoder.encode(e), r = d.time.getTimestamp(), s = d.time.formatDateTime(/* @__PURE__ */ new Date()), l = new ir();
|
2101
|
+
l.request = i, l.model = e, l.encoded = t, l.timestamp = r, l.time = s, i.path = await this.template.renderAsync(i.path, l), i.body = await this.template.renderAsync(i.body, l);
|
2001
2102
|
}
|
2002
2103
|
}
|
2003
|
-
class
|
2104
|
+
class Ie extends et {
|
2004
2105
|
constructor() {
|
2005
2106
|
super(...arguments);
|
2006
2107
|
//#region 附加信息
|
@@ -2031,7 +2132,7 @@ class Me extends Xe {
|
|
2031
2132
|
n(this, "request");
|
2032
2133
|
}
|
2033
2134
|
}
|
2034
|
-
class
|
2135
|
+
class or extends Ee {
|
2035
2136
|
constructor() {
|
2036
2137
|
super(...arguments);
|
2037
2138
|
//#region 属性
|
@@ -2049,8 +2150,8 @@ class nr extends je {
|
|
2049
2150
|
if (t.status == 0)
|
2050
2151
|
t.message = `网络异常,请检查接口访问是否正常: ${e.method} ${e.url} ${l}`;
|
2051
2152
|
else {
|
2052
|
-
let
|
2053
|
-
t.message = `接口加载异常: ${e.method}${
|
2153
|
+
let o = t.status ? `(${t.status})` : "";
|
2154
|
+
t.message = `接口加载异常: ${e.method}${o} ${e.url} ${l}`;
|
2054
2155
|
}
|
2055
2156
|
}
|
2056
2157
|
return await ((s = this.onResponse) == null ? void 0 : s.call(this, t)), t;
|
@@ -2074,7 +2175,7 @@ class nr extends je {
|
|
2074
2175
|
* 使用Fetch发送请求,谷歌插件场景专用
|
2075
2176
|
*/
|
2076
2177
|
async sendWithFetch(e) {
|
2077
|
-
let t = new
|
2178
|
+
let t = new Ie();
|
2078
2179
|
t.request = e, t.id = e.id;
|
2079
2180
|
let r = {
|
2080
2181
|
method: e.method,
|
@@ -2093,32 +2194,32 @@ class nr extends je {
|
|
2093
2194
|
* 使用XmlHttpRequest发送请求
|
2094
2195
|
*/
|
2095
2196
|
sendWithXmlHttpRequest(e) {
|
2096
|
-
let t = new
|
2197
|
+
let t = new Ie();
|
2097
2198
|
return t.request = e, t.id = e.id, new Promise(async (r, s) => {
|
2098
2199
|
let l = new XMLHttpRequest();
|
2099
2200
|
if (l.open(e.method, e.url), e.headers != null)
|
2100
|
-
for (let
|
2101
|
-
let
|
2102
|
-
l.setRequestHeader(
|
2201
|
+
for (let o in e.headers) {
|
2202
|
+
let a = e.headers[o];
|
2203
|
+
l.setRequestHeader(o, a);
|
2103
2204
|
}
|
2104
2205
|
l.onreadystatechange = async () => {
|
2105
2206
|
if (l.readyState == 4) {
|
2106
2207
|
t.status = l.status, t.body = l.responseText;
|
2107
|
-
let
|
2108
|
-
`),
|
2109
|
-
for (let u = 0; u <
|
2110
|
-
let p =
|
2111
|
-
h == null || h == "" || (
|
2208
|
+
let o = l.getAllResponseHeaders().split(`\r
|
2209
|
+
`), a = {};
|
2210
|
+
for (let u = 0; u < o.length; u++) {
|
2211
|
+
let p = o[u].split(": "), h = p.shift();
|
2212
|
+
h == null || h == "" || (a[h] = p.join(": "));
|
2112
2213
|
}
|
2113
|
-
t.headers =
|
2214
|
+
t.headers = a, t.contentType = t.getHeader("content-type"), t.ok = l.status == 200, r(t);
|
2114
2215
|
}
|
2115
|
-
}, l.onerror = async (
|
2116
|
-
t.ok = !1, t.message =
|
2216
|
+
}, l.onerror = async (o) => {
|
2217
|
+
t.ok = !1, t.message = o.type, t.status = l.status, t.body = l.responseText, r(t);
|
2117
2218
|
}, l.send(e.body);
|
2118
2219
|
});
|
2119
2220
|
}
|
2120
2221
|
}
|
2121
|
-
class
|
2222
|
+
class ar extends Ee {
|
2122
2223
|
constructor() {
|
2123
2224
|
super(...arguments);
|
2124
2225
|
//#region 属性
|
@@ -2162,16 +2263,16 @@ class ir extends je {
|
|
2162
2263
|
let l = d.url.deserialize(e.path);
|
2163
2264
|
for (let g in l)
|
2164
2265
|
s[g] = l[g];
|
2165
|
-
let
|
2266
|
+
let o = d.url.getPath(e.path);
|
2166
2267
|
s = d.dictionary.sort(s);
|
2167
|
-
let
|
2268
|
+
let a = d.sign.signDictionary(s, !1), u = `POST${o}?${a}${this.appSecret}`, p = await this.hasher.compute(u);
|
2168
2269
|
s.sign = p.toLowerCase(), delete s.jsonBody, s = d.dictionary.sort(s);
|
2169
2270
|
let h = d.url.serialize(s);
|
2170
|
-
e.url = d.url.concatUrl(this.baseUrl,
|
2271
|
+
e.url = d.url.concatUrl(this.baseUrl, o + "?" + h);
|
2171
2272
|
});
|
2172
2273
|
}
|
2173
2274
|
}
|
2174
|
-
class
|
2275
|
+
class ur extends Ee {
|
2175
2276
|
constructor() {
|
2176
2277
|
super(...arguments);
|
2177
2278
|
//#region 属性
|
@@ -2218,8 +2319,8 @@ class ar extends je {
|
|
2218
2319
|
if (this.user == null)
|
2219
2320
|
r = this.platform;
|
2220
2321
|
else {
|
2221
|
-
let l = d.time.getTimestamp(),
|
2222
|
-
r = this.sso.getAuth(this.user.identity.token, l,
|
2322
|
+
let l = d.time.getTimestamp(), o = await this.signer.getSign(this.user.userId, e.url, e.body, l, this.user.secret);
|
2323
|
+
r = this.sso.getAuth(this.user.identity.token, l, o, this.platform, this.env);
|
2223
2324
|
}
|
2224
2325
|
let s = {};
|
2225
2326
|
s.Authorization = r, e.getHeader("Accept-Language") || (s["Accept-Language"] = this.language), e.addHeaders(s);
|
@@ -2230,16 +2331,24 @@ class ar extends je {
|
|
2230
2331
|
n(this, "handleError", (e) => {
|
2231
2332
|
if (e instanceof Object) {
|
2232
2333
|
let t = e.message;
|
2233
|
-
e.message == "Network Error" && (d.url.httpOrHttps(e.config.url) ? t = "接口网络错误: " + e.config.url : t = "接口网络错误: " + e.config.baseURL + e.config.url),
|
2334
|
+
e.message == "Network Error" && (d.url.httpOrHttps(e.config.url) ? t = "接口网络错误: " + e.config.url : t = "接口网络错误: " + e.config.baseURL + e.config.url), ie.error(t);
|
2234
2335
|
} else
|
2235
|
-
|
2336
|
+
ie.error(e.message);
|
2236
2337
|
return Promise.reject(e);
|
2237
2338
|
});
|
2238
2339
|
}
|
2239
2340
|
}
|
2240
|
-
class
|
2341
|
+
class cr extends D {
|
2342
|
+
constructor() {
|
2343
|
+
super(...arguments);
|
2344
|
+
n(this, "type", "Http");
|
2345
|
+
}
|
2241
2346
|
open() {
|
2242
|
-
super.open(), super.
|
2347
|
+
super.open(), super.register({
|
2348
|
+
Default: or,
|
2349
|
+
Mk: ar,
|
2350
|
+
Halo: ur
|
2351
|
+
});
|
2243
2352
|
}
|
2244
2353
|
/**
|
2245
2354
|
* 获取默认请求器
|
@@ -2255,7 +2364,7 @@ class or extends D {
|
|
2255
2364
|
return this.createWithCache("Halo");
|
2256
2365
|
}
|
2257
2366
|
}
|
2258
|
-
class
|
2367
|
+
class dr {
|
2259
2368
|
constructor() {
|
2260
2369
|
//#region 属性
|
2261
2370
|
n(this, "type");
|
@@ -2288,12 +2397,12 @@ class ur {
|
|
2288
2397
|
});
|
2289
2398
|
n(this, "t_table", (i) => this.t(`_business.Ctl_Table.Title.${i}`));
|
2290
2399
|
n(this, "t_field", (i, e) => {
|
2291
|
-
let r = `_business.
|
2400
|
+
let r = `_business.Ctl_Field.Label.${i}.${e}`;
|
2292
2401
|
return this.t(r);
|
2293
2402
|
});
|
2294
|
-
n(this, "t_enum", (i, e) => this.t(`_business.
|
2295
|
-
n(this, "t_field_placeholder", (i, e) => this.t("common.please_input") + this.t(`_business.
|
2296
|
-
n(this, "t_field_choose_placeholder", (i, e) => this.t("common.please_choose") + this.t(`_business.
|
2403
|
+
n(this, "t_enum", (i, e) => this.t(`_business.Ctl_Option.Text.${i}.${e}`));
|
2404
|
+
n(this, "t_field_placeholder", (i, e) => this.t("common.please_input") + this.t(`_business.Ctl_Field.Label.${i}.${e}`));
|
2405
|
+
n(this, "t_field_choose_placeholder", (i, e) => this.t("common.please_choose") + this.t(`_business.Ctl_Field.Label.${i}.${e}`));
|
2297
2406
|
n(this, "t_sys", (i) => this.t(`sys.${i}`));
|
2298
2407
|
n(this, "t_title", () => this.t("sys.title"));
|
2299
2408
|
//#endregion
|
@@ -2327,7 +2436,7 @@ class ur {
|
|
2327
2436
|
this.lang = i;
|
2328
2437
|
return;
|
2329
2438
|
}
|
2330
|
-
await this.
|
2439
|
+
await this.loadAsync(i), this.lang = i, this.loaded.push(i);
|
2331
2440
|
});
|
2332
2441
|
}
|
2333
2442
|
//#endregion
|
@@ -2337,7 +2446,7 @@ class ur {
|
|
2337
2446
|
}
|
2338
2447
|
//#endregion
|
2339
2448
|
}
|
2340
|
-
class
|
2449
|
+
class pr extends dr {
|
2341
2450
|
constructor() {
|
2342
2451
|
super(...arguments);
|
2343
2452
|
n(this, "type", "Default");
|
@@ -2352,25 +2461,25 @@ class cr extends ur {
|
|
2352
2461
|
let t = this.messages[this.lang], r = e.split(".");
|
2353
2462
|
return d.json.hasKey(t, r);
|
2354
2463
|
});
|
2355
|
-
n(this, "
|
2464
|
+
n(this, "loadAsync", async (e) => {
|
2356
2465
|
e == null && (e = this.lang);
|
2357
2466
|
let t = new Promise(async (s) => {
|
2358
2467
|
let l = { conditions: [{ name: "lang", value: e }] };
|
2359
|
-
return
|
2360
|
-
for (let
|
2361
|
-
let u = `${e}.${
|
2362
|
-
d.object.addProperties(this.messages, u,
|
2468
|
+
return _.post("/i18n/set", l).then(({ data: o }) => {
|
2469
|
+
for (let a of o) {
|
2470
|
+
let u = `${e}.${a.Kind}.${a.Key}`.split(".");
|
2471
|
+
d.object.addProperties(this.messages, u, a.Value);
|
2363
2472
|
}
|
2364
|
-
s(
|
2473
|
+
s(o);
|
2365
2474
|
});
|
2366
2475
|
}), r = new Promise((s) => {
|
2367
2476
|
let l = { conditions: [{ name: "lang", value: e }] };
|
2368
|
-
|
2369
|
-
for (let
|
2370
|
-
let u = `${e}._business.${
|
2371
|
-
d.object.addProperties(this.messages, u,
|
2477
|
+
_.post("/i18n_business/set", l).then(({ data: o }) => {
|
2478
|
+
for (let a of o) {
|
2479
|
+
let u = `${e}._business.${a.Table}.${a.Field}.${a.Key}`.split(".");
|
2480
|
+
d.object.addProperties(this.messages, u, a.Value);
|
2372
2481
|
}
|
2373
|
-
s(
|
2482
|
+
s(o);
|
2374
2483
|
});
|
2375
2484
|
});
|
2376
2485
|
await Promise.all([t, r]);
|
@@ -2381,19 +2490,25 @@ class cr extends ur {
|
|
2381
2490
|
await super.openAsync(e);
|
2382
2491
|
}
|
2383
2492
|
}
|
2384
|
-
class
|
2493
|
+
class hr extends D {
|
2494
|
+
constructor() {
|
2495
|
+
super(...arguments);
|
2496
|
+
n(this, "type", "I18n");
|
2497
|
+
}
|
2385
2498
|
//#region 开启
|
2386
2499
|
open() {
|
2387
|
-
super.open(), super.
|
2500
|
+
super.open(), super.register({
|
2501
|
+
Default: pr
|
2502
|
+
});
|
2388
2503
|
}
|
2389
2504
|
//#endregion
|
2390
2505
|
}
|
2391
|
-
class
|
2506
|
+
class gr {
|
2392
2507
|
constructor() {
|
2393
2508
|
n(this, "type");
|
2394
2509
|
}
|
2395
2510
|
}
|
2396
|
-
class
|
2511
|
+
class fr extends gr {
|
2397
2512
|
constructor() {
|
2398
2513
|
super(...arguments);
|
2399
2514
|
n(this, "type", "Console");
|
@@ -2420,9 +2535,15 @@ class hr extends pr {
|
|
2420
2535
|
console.warn(e);
|
2421
2536
|
}
|
2422
2537
|
}
|
2423
|
-
class
|
2538
|
+
class yr extends D {
|
2539
|
+
constructor() {
|
2540
|
+
super(...arguments);
|
2541
|
+
n(this, "type", "Messenger");
|
2542
|
+
}
|
2424
2543
|
open() {
|
2425
|
-
super.open(), super.
|
2544
|
+
super.open(), super.register({
|
2545
|
+
Console: fr
|
2546
|
+
});
|
2426
2547
|
}
|
2427
2548
|
/**
|
2428
2549
|
* 获取控制台消息提示类型
|
@@ -2431,18 +2552,18 @@ class gr extends D {
|
|
2431
2552
|
return await super.create("Console");
|
2432
2553
|
}
|
2433
2554
|
}
|
2434
|
-
class
|
2555
|
+
class mr {
|
2435
2556
|
constructor() {
|
2436
2557
|
n(this, "type");
|
2437
2558
|
}
|
2438
2559
|
}
|
2439
|
-
class
|
2560
|
+
class vr extends mr {
|
2440
2561
|
constructor() {
|
2441
2562
|
super(...arguments);
|
2442
2563
|
n(this, "type", "Default");
|
2443
2564
|
n(this, "getSign", async (e, t, r, s, l) => {
|
2444
|
-
let
|
2445
|
-
return (await
|
2565
|
+
let a = `${e}.${t}.${r ?? ""}.${s}.${l}`;
|
2566
|
+
return (await it.compute(a)).toUpperCase();
|
2446
2567
|
});
|
2447
2568
|
}
|
2448
2569
|
async openAsync(e) {
|
@@ -2455,19 +2576,25 @@ class yr extends fr {
|
|
2455
2576
|
dispose() {
|
2456
2577
|
}
|
2457
2578
|
}
|
2458
|
-
class
|
2579
|
+
class br extends D {
|
2580
|
+
constructor() {
|
2581
|
+
super(...arguments);
|
2582
|
+
n(this, "type", "Signer");
|
2583
|
+
}
|
2459
2584
|
open() {
|
2460
|
-
super.open(), super.
|
2585
|
+
super.open(), super.register({
|
2586
|
+
Default: vr
|
2587
|
+
});
|
2461
2588
|
}
|
2462
2589
|
/**
|
2463
2590
|
* 获取指定签名实例
|
2464
2591
|
*/
|
2465
|
-
async createAsync(
|
2466
|
-
let
|
2467
|
-
return await
|
2592
|
+
async createAsync(e, t) {
|
2593
|
+
let r = await super.createAsync(e);
|
2594
|
+
return await r.openAsync(null), r;
|
2468
2595
|
}
|
2469
2596
|
}
|
2470
|
-
class
|
2597
|
+
class wr {
|
2471
2598
|
constructor() {
|
2472
2599
|
//#region 属性
|
2473
2600
|
/**
|
@@ -2487,8 +2614,8 @@ class vr {
|
|
2487
2614
|
await this.send(s);
|
2488
2615
|
let l = this.subscribed[i];
|
2489
2616
|
l == null && (l = {}, this.subscribed[i] = l);
|
2490
|
-
let
|
2491
|
-
|
2617
|
+
let o = l[e];
|
2618
|
+
o == null && (o = [], l[e] = o), o.push(...r);
|
2492
2619
|
}
|
2493
2620
|
async resubscribe() {
|
2494
2621
|
let i = Object.keys(this.subscribed);
|
@@ -2496,8 +2623,8 @@ class vr {
|
|
2496
2623
|
for (let e of i) {
|
2497
2624
|
let t = this.subscribed[e], r = Object.keys(t);
|
2498
2625
|
for (let s of r) {
|
2499
|
-
let l = t[s],
|
2500
|
-
await this.send(
|
2626
|
+
let l = t[s], o = { kind: "socket", type: "subscribe", data: { win: e, kind: s, types: l } };
|
2627
|
+
await this.send(o);
|
2501
2628
|
}
|
2502
2629
|
}
|
2503
2630
|
}
|
@@ -2506,7 +2633,7 @@ class vr {
|
|
2506
2633
|
await this.send(e), delete this.subscribed[i];
|
2507
2634
|
}
|
2508
2635
|
}
|
2509
|
-
class
|
2636
|
+
class kr extends wr {
|
2510
2637
|
constructor() {
|
2511
2638
|
super(...arguments);
|
2512
2639
|
//#region 属性
|
@@ -2535,8 +2662,8 @@ class br extends vr {
|
|
2535
2662
|
//#endregion
|
2536
2663
|
async connect() {
|
2537
2664
|
if (this.reconnect = !0, this.socket == null || this.reconnect) {
|
2538
|
-
let t = new
|
2539
|
-
t.path = this.url, t.method = "GET", await
|
2665
|
+
let t = new tt();
|
2666
|
+
t.path = this.url, t.method = "GET", await _.prepareAsync(t);
|
2540
2667
|
let r = t.getHeader("Authorization"), s = d.url.encode(r), l = `${this.url}?authorization=${s}`;
|
2541
2668
|
this.socket = new WebSocket(l);
|
2542
2669
|
}
|
@@ -2565,9 +2692,15 @@ class br extends vr {
|
|
2565
2692
|
this.socket.close(), this.reconnect = !1, this.connected = null, this.handler = null;
|
2566
2693
|
}
|
2567
2694
|
}
|
2568
|
-
class
|
2695
|
+
class xr extends D {
|
2696
|
+
constructor() {
|
2697
|
+
super(...arguments);
|
2698
|
+
n(this, "type", "Socket");
|
2699
|
+
}
|
2569
2700
|
open() {
|
2570
|
-
super.open(), super.
|
2701
|
+
super.open(), super.register({
|
2702
|
+
Default: kr
|
2703
|
+
});
|
2571
2704
|
}
|
2572
2705
|
/**
|
2573
2706
|
* 默认通信对象
|
@@ -2576,7 +2709,7 @@ class wr extends D {
|
|
2576
2709
|
return super.createWithCache("Default");
|
2577
2710
|
}
|
2578
2711
|
}
|
2579
|
-
class
|
2712
|
+
class _l {
|
2580
2713
|
constructor() {
|
2581
2714
|
//#region 进度
|
2582
2715
|
/**
|
@@ -2614,7 +2747,51 @@ class kl {
|
|
2614
2747
|
this.ok = !1, this.errored++, this.handled++, this.current = i, this.message = e;
|
2615
2748
|
}
|
2616
2749
|
}
|
2617
|
-
class
|
2750
|
+
class Cl {
|
2751
|
+
/**
|
2752
|
+
* 初始化并设置数据
|
2753
|
+
*/
|
2754
|
+
constructor(i, e, t) {
|
2755
|
+
/**
|
2756
|
+
* 是否执行成功
|
2757
|
+
*/
|
2758
|
+
n(this, "ok");
|
2759
|
+
/**
|
2760
|
+
* 异常消息
|
2761
|
+
*/
|
2762
|
+
n(this, "message");
|
2763
|
+
/**
|
2764
|
+
* 耗时
|
2765
|
+
*/
|
2766
|
+
n(this, "elapsed");
|
2767
|
+
/**
|
2768
|
+
* 消息类别
|
2769
|
+
*/
|
2770
|
+
n(this, "kind");
|
2771
|
+
/**
|
2772
|
+
* 消息类型
|
2773
|
+
*/
|
2774
|
+
n(this, "type");
|
2775
|
+
/**
|
2776
|
+
* 数据体
|
2777
|
+
*/
|
2778
|
+
n(this, "data");
|
2779
|
+
this.kind = i, this.type = e, this.data = t;
|
2780
|
+
}
|
2781
|
+
/**
|
2782
|
+
* 成功输出
|
2783
|
+
*/
|
2784
|
+
onOk(i) {
|
2785
|
+
this.ok = !0, this.message = i;
|
2786
|
+
}
|
2787
|
+
/**
|
2788
|
+
* 异常输出
|
2789
|
+
*/
|
2790
|
+
onError(i) {
|
2791
|
+
this.ok = !1, this.message = i;
|
2792
|
+
}
|
2793
|
+
}
|
2794
|
+
class Ar {
|
2618
2795
|
constructor() {
|
2619
2796
|
//#region 属性
|
2620
2797
|
n(this, "type", "Bearer");
|
@@ -2630,7 +2807,7 @@ class xr {
|
|
2630
2807
|
}
|
2631
2808
|
//#endregion
|
2632
2809
|
async login(i) {
|
2633
|
-
return
|
2810
|
+
return _.post(`/user/login?type=${this.type}`, i).then(async (e) => (await this.provider.saveAsync("user", "sso", e.data), _.user = e.data, _.sso = await y.sso.createAsync(e.data.type), Promise.resolve(e)));
|
2634
2811
|
}
|
2635
2812
|
loginUrl(i) {
|
2636
2813
|
return "";
|
@@ -2646,7 +2823,7 @@ class xr {
|
|
2646
2823
|
await this.provider.deleteAsync("user", "user"), await this.provider.deleteAsync("user", "sso");
|
2647
2824
|
}
|
2648
2825
|
}
|
2649
|
-
class
|
2826
|
+
class Sr {
|
2650
2827
|
constructor() {
|
2651
2828
|
//#region 属性
|
2652
2829
|
n(this, "type", "Nio");
|
@@ -2664,7 +2841,7 @@ class kr {
|
|
2664
2841
|
}
|
2665
2842
|
//#endregion
|
2666
2843
|
async login(i) {
|
2667
|
-
await this.provider.saveAsync("user", "sso", i),
|
2844
|
+
await this.provider.saveAsync("user", "sso", i), _.user = i, _.sso = await y.sso.createAsync(i.type);
|
2668
2845
|
}
|
2669
2846
|
loginUrl(i) {
|
2670
2847
|
let e = encodeURIComponent(i);
|
@@ -2680,7 +2857,7 @@ class kr {
|
|
2680
2857
|
await this.provider.deleteAsync("user", "user"), await this.provider.deleteAsync("user", "sso");
|
2681
2858
|
}
|
2682
2859
|
}
|
2683
|
-
class
|
2860
|
+
class rt {
|
2684
2861
|
constructor() {
|
2685
2862
|
/**
|
2686
2863
|
* 用户标识
|
@@ -2700,7 +2877,7 @@ class Ze {
|
|
2700
2877
|
n(this, "identity");
|
2701
2878
|
}
|
2702
2879
|
}
|
2703
|
-
class
|
2880
|
+
class _r {
|
2704
2881
|
constructor() {
|
2705
2882
|
n(this, "type", "WeiXin");
|
2706
2883
|
}
|
@@ -2712,7 +2889,7 @@ class Ar {
|
|
2712
2889
|
return "";
|
2713
2890
|
}
|
2714
2891
|
async getUser() {
|
2715
|
-
let i = new
|
2892
|
+
let i = new rt();
|
2716
2893
|
return i.userId = "", i;
|
2717
2894
|
}
|
2718
2895
|
getAuth(i, e, t, r) {
|
@@ -2722,12 +2899,12 @@ class Ar {
|
|
2722
2899
|
return Promise.resolve();
|
2723
2900
|
}
|
2724
2901
|
}
|
2725
|
-
class
|
2902
|
+
class Cr {
|
2726
2903
|
constructor() {
|
2727
2904
|
n(this, "type");
|
2728
2905
|
}
|
2729
2906
|
}
|
2730
|
-
class
|
2907
|
+
class Tr extends Cr {
|
2731
2908
|
constructor() {
|
2732
2909
|
super(...arguments);
|
2733
2910
|
//#region 属性
|
@@ -2752,7 +2929,7 @@ class _r extends Sr {
|
|
2752
2929
|
let r = d.string.getUniqueId();
|
2753
2930
|
await this.provider.saveAsync("anonymous", "anonymous", r), e = r;
|
2754
2931
|
}
|
2755
|
-
let t = new
|
2932
|
+
let t = new rt();
|
2756
2933
|
return t.identity = { token: e }, t;
|
2757
2934
|
}
|
2758
2935
|
getAuth(e, t, r, s) {
|
@@ -2762,7 +2939,7 @@ class _r extends Sr {
|
|
2762
2939
|
await this.provider.deleteAsync("anonymous", "anonymous");
|
2763
2940
|
}
|
2764
2941
|
}
|
2765
|
-
class
|
2942
|
+
class Er {
|
2766
2943
|
constructor() {
|
2767
2944
|
//#region 属性
|
2768
2945
|
n(this, "type", "Secret");
|
@@ -2776,7 +2953,7 @@ class Cr {
|
|
2776
2953
|
this.provider = await y.provider.getDefaultAsync("user");
|
2777
2954
|
}
|
2778
2955
|
async login(i) {
|
2779
|
-
return
|
2956
|
+
return _.post(`/user/login?type=${this.type}`, i).then(async (e) => {
|
2780
2957
|
let t = e.data;
|
2781
2958
|
return await this.provider.saveAsync("user", "sso", t), Promise.resolve(e);
|
2782
2959
|
});
|
@@ -2794,22 +2971,32 @@ class Cr {
|
|
2794
2971
|
await this.provider.deleteAsync("user");
|
2795
2972
|
}
|
2796
2973
|
}
|
2797
|
-
class
|
2974
|
+
class $r extends D {
|
2975
|
+
constructor() {
|
2976
|
+
super(...arguments);
|
2977
|
+
n(this, "type", "Sso");
|
2978
|
+
}
|
2798
2979
|
/**
|
2799
2980
|
* 获取实例
|
2800
2981
|
*/
|
2801
2982
|
open() {
|
2802
|
-
super.open(), super.
|
2983
|
+
super.open(), super.register({
|
2984
|
+
Secret: Er,
|
2985
|
+
Nio: Sr,
|
2986
|
+
WeiXin: _r,
|
2987
|
+
Bearer: Ar,
|
2988
|
+
Anonymous: Tr
|
2989
|
+
});
|
2803
2990
|
}
|
2804
2991
|
/**
|
2805
2992
|
* 获取指定SSO实例
|
2806
2993
|
*/
|
2807
|
-
async createAsync(
|
2808
|
-
let
|
2809
|
-
return await
|
2994
|
+
async createAsync(e, t) {
|
2995
|
+
let r = Qe.ssos.find((o) => o.type.toUpperCase() == e.toUpperCase()), s = { url: r == null ? void 0 : r.url, app_id: r == null ? void 0 : r.appId }, l = await super.createAsync(e);
|
2996
|
+
return await l.openAsync(s), l;
|
2810
2997
|
}
|
2811
2998
|
}
|
2812
|
-
class
|
2999
|
+
class jr {
|
2813
3000
|
constructor() {
|
2814
3001
|
//#region 属性
|
2815
3002
|
n(this, "type");
|
@@ -2817,7 +3004,7 @@ class Er {
|
|
2817
3004
|
}
|
2818
3005
|
//#endregion
|
2819
3006
|
}
|
2820
|
-
class
|
3007
|
+
class Dr extends jr {
|
2821
3008
|
constructor() {
|
2822
3009
|
super(...arguments);
|
2823
3010
|
//#region 属性
|
@@ -2846,7 +3033,7 @@ class $r extends Er {
|
|
2846
3033
|
async execute(e, t, r) {
|
2847
3034
|
if (e.length == 0)
|
2848
3035
|
return;
|
2849
|
-
let s = d.array.getChunksByCount(e, t), l = d.array.create(s, (
|
3036
|
+
let s = d.array.getChunksByCount(e, t), l = d.array.create(s, (o, a) => r(o, a));
|
2850
3037
|
await Promise.all(l);
|
2851
3038
|
}
|
2852
3039
|
async frequency(e, t, r, s) {
|
@@ -2881,57 +3068,72 @@ class $r extends Er {
|
|
2881
3068
|
clearInterval(this.intervalTimeout), clearTimeout(this.lastDebounceTimeout);
|
2882
3069
|
}
|
2883
3070
|
}
|
2884
|
-
class
|
3071
|
+
class Hr extends D {
|
3072
|
+
constructor() {
|
3073
|
+
super(...arguments);
|
3074
|
+
n(this, "type", "Task");
|
3075
|
+
}
|
2885
3076
|
open() {
|
2886
|
-
super.open(), super.
|
3077
|
+
super.open(), super.register({
|
3078
|
+
Memory: Dr
|
3079
|
+
});
|
2887
3080
|
}
|
2888
3081
|
}
|
2889
|
-
class
|
3082
|
+
class Ur {
|
2890
3083
|
constructor() {
|
2891
3084
|
n(this, "type");
|
2892
3085
|
}
|
2893
3086
|
}
|
2894
|
-
class
|
3087
|
+
class Or extends Ur {
|
2895
3088
|
constructor() {
|
2896
3089
|
super(...arguments);
|
2897
3090
|
n(this, "type", "Liquid");
|
2898
3091
|
}
|
2899
|
-
async
|
2900
|
-
let r = new
|
3092
|
+
async renderAsync(e, t) {
|
3093
|
+
let r = new gt(), s = r.parse(e);
|
2901
3094
|
return await r.render(s, t);
|
2902
3095
|
}
|
2903
3096
|
}
|
2904
|
-
class
|
3097
|
+
class Lr extends D {
|
3098
|
+
constructor() {
|
3099
|
+
super(...arguments);
|
3100
|
+
n(this, "type", "Template");
|
3101
|
+
}
|
2905
3102
|
open() {
|
2906
|
-
super.open(), super.
|
3103
|
+
super.open(), super.register({
|
3104
|
+
Liquid: Or
|
3105
|
+
});
|
2907
3106
|
}
|
2908
3107
|
}
|
2909
|
-
class
|
3108
|
+
class Rr extends D {
|
3109
|
+
constructor() {
|
3110
|
+
super(...arguments);
|
3111
|
+
n(this, "type", "Util");
|
3112
|
+
}
|
2910
3113
|
open() {
|
2911
|
-
super.open(), super.
|
2912
|
-
|
2913
|
-
|
2914
|
-
|
2915
|
-
Pr,
|
2916
|
-
|
2917
|
-
|
2918
|
-
|
2919
|
-
|
2920
|
-
|
2921
|
-
|
2922
|
-
|
2923
|
-
|
2924
|
-
|
2925
|
-
|
2926
|
-
|
2927
|
-
|
2928
|
-
|
2929
|
-
|
2930
|
-
Yr,
|
2931
|
-
|
2932
|
-
|
2933
|
-
|
2934
|
-
];
|
3114
|
+
super.open(), super.register({
|
3115
|
+
Array: Ir,
|
3116
|
+
Browser: rs,
|
3117
|
+
Component: Mr,
|
3118
|
+
Dictionary: Pr,
|
3119
|
+
Dom: Br,
|
3120
|
+
Event: Fr,
|
3121
|
+
File: Nr,
|
3122
|
+
Html: qr,
|
3123
|
+
Image: Vr,
|
3124
|
+
Json: ts,
|
3125
|
+
Math: Wr,
|
3126
|
+
Micro: zr,
|
3127
|
+
Mount: Kr,
|
3128
|
+
Object: Jr,
|
3129
|
+
Scroll: Zr,
|
3130
|
+
Sign: ls,
|
3131
|
+
String: Xr,
|
3132
|
+
Task: Qr,
|
3133
|
+
Time: Yr,
|
3134
|
+
Tree: Gr,
|
3135
|
+
Url: ss
|
3136
|
+
});
|
2935
3137
|
}
|
2936
3138
|
get array() {
|
2937
3139
|
return super.createWithCache("array");
|
@@ -2984,9 +3186,6 @@ class Or extends D {
|
|
2984
3186
|
get task() {
|
2985
3187
|
return super.createWithCache("task");
|
2986
3188
|
}
|
2987
|
-
get type() {
|
2988
|
-
return super.createWithCache("type");
|
2989
|
-
}
|
2990
3189
|
get time() {
|
2991
3190
|
return super.createWithCache("time");
|
2992
3191
|
}
|
@@ -3000,12 +3199,12 @@ class Or extends D {
|
|
3000
3199
|
return super.createWithCache("sign");
|
3001
3200
|
}
|
3002
3201
|
}
|
3003
|
-
class
|
3202
|
+
class U {
|
3004
3203
|
constructor() {
|
3005
3204
|
n(this, "type");
|
3006
3205
|
}
|
3007
3206
|
}
|
3008
|
-
class
|
3207
|
+
class Ir extends U {
|
3009
3208
|
constructor() {
|
3010
3209
|
super(...arguments);
|
3011
3210
|
n(this, "type", "array");
|
@@ -3033,11 +3232,11 @@ class Lr extends H {
|
|
3033
3232
|
n(this, "except", (e, t, r = null) => {
|
3034
3233
|
let s = t instanceof Array ? t : [t], l = [];
|
3035
3234
|
if (r == null)
|
3036
|
-
l = e.filter((
|
3235
|
+
l = e.filter((o) => s.indexOf(o) == -1);
|
3037
3236
|
else
|
3038
|
-
for (let
|
3039
|
-
let
|
3040
|
-
s.find((p) => r(
|
3237
|
+
for (let o = 0; o < e.length; o++) {
|
3238
|
+
let a = e[o];
|
3239
|
+
s.find((p) => r(a, p)) || l.push(a);
|
3041
3240
|
}
|
3042
3241
|
return l;
|
3043
3242
|
});
|
@@ -3063,8 +3262,8 @@ class Lr extends H {
|
|
3063
3262
|
*/
|
3064
3263
|
n(this, "sum", (e, t, r = null) => {
|
3065
3264
|
let s = 0;
|
3066
|
-
for (let
|
3067
|
-
s += t(e[
|
3265
|
+
for (let o = 0; o < e.length; o++)
|
3266
|
+
s += t(e[o]);
|
3068
3267
|
return r == null ? s : parseFloat(s.toFixed(r));
|
3069
3268
|
});
|
3070
3269
|
//#endregion
|
@@ -3081,11 +3280,11 @@ class Lr extends H {
|
|
3081
3280
|
if (!r)
|
3082
3281
|
return e;
|
3083
3282
|
for (let l = 0; l < e.length; l++) {
|
3084
|
-
let
|
3085
|
-
if (
|
3086
|
-
for (let
|
3087
|
-
let u = t[
|
3088
|
-
|
3283
|
+
let o = e[l];
|
3284
|
+
if (o)
|
3285
|
+
for (let a = 0; a < t.length; a++) {
|
3286
|
+
let u = t[a];
|
3287
|
+
o[u].toString().toUpperCase().includes(r.toUpperCase()) && s.push(o);
|
3089
3288
|
}
|
3090
3289
|
}
|
3091
3290
|
return s;
|
@@ -3120,9 +3319,9 @@ class Lr extends H {
|
|
3120
3319
|
if (!e || e.length == 0 || !t || t.length == 0)
|
3121
3320
|
return [];
|
3122
3321
|
let l = [];
|
3123
|
-
return e.forEach((
|
3124
|
-
let
|
3125
|
-
|
3322
|
+
return e.forEach((o) => {
|
3323
|
+
let a = t.find((u) => u[r] == o);
|
3324
|
+
a || (a = { [r]: o, [s]: o }), l.push(a);
|
3126
3325
|
}), l;
|
3127
3326
|
});
|
3128
3327
|
//#endregion
|
@@ -3145,15 +3344,15 @@ class Lr extends H {
|
|
3145
3344
|
n(this, "combine", (...e) => {
|
3146
3345
|
let t = [], r = be.max(e, (s) => s.length);
|
3147
3346
|
for (let s = 0; s < r.length; s++) {
|
3148
|
-
let l = [],
|
3149
|
-
for (let
|
3150
|
-
let u = e[
|
3151
|
-
u != null && (
|
3347
|
+
let l = [], o;
|
3348
|
+
for (let a = 0; a < e.length; a++) {
|
3349
|
+
let u = e[a][s];
|
3350
|
+
u != null && (o = u);
|
3152
3351
|
break;
|
3153
3352
|
}
|
3154
|
-
for (let
|
3155
|
-
let u = e[
|
3156
|
-
u != null ? l.push(u) : l.push(
|
3353
|
+
for (let a = 0; a < e.length; a++) {
|
3354
|
+
let u = e[a][s];
|
3355
|
+
u != null ? l.push(u) : l.push(o);
|
3157
3356
|
}
|
3158
3357
|
t.push(l);
|
3159
3358
|
}
|
@@ -3187,9 +3386,9 @@ class Lr extends H {
|
|
3187
3386
|
* 删除执行数组中的指定对象或者集合
|
3188
3387
|
*/
|
3189
3388
|
n(this, "remove", (e, t) => {
|
3190
|
-
if (d.
|
3389
|
+
if (d.object.isNumber(t))
|
3191
3390
|
e.splice(t, 1);
|
3192
|
-
else if (d.
|
3391
|
+
else if (d.object.isArray(t))
|
3193
3392
|
for (let r = 0; r < t.length; r++)
|
3194
3393
|
d.array.remove(e, t[r]);
|
3195
3394
|
else
|
@@ -3211,12 +3410,12 @@ class Lr extends H {
|
|
3211
3410
|
if (t == null || r == null || e == null || e.length == 0 || e.length == 1)
|
3212
3411
|
return e;
|
3213
3412
|
t instanceof Function && (t = [t]);
|
3214
|
-
let s = e.sort((
|
3215
|
-
let u = t[0], p = u(
|
3413
|
+
let s = e.sort((o, a) => {
|
3414
|
+
let u = t[0], p = u(o) - u(a);
|
3216
3415
|
if (p != 0)
|
3217
3416
|
return p;
|
3218
3417
|
let h = t[1];
|
3219
|
-
return h == null ? p : h(
|
3418
|
+
return h == null ? p : h(o) - h(a);
|
3220
3419
|
}), l;
|
3221
3420
|
return r == "asc" ? l = s : l = s.reverse(), l;
|
3222
3421
|
});
|
@@ -3228,12 +3427,12 @@ class Lr extends H {
|
|
3228
3427
|
n(this, "groupBy", (e, t, r = null) => {
|
3229
3428
|
let s = {};
|
3230
3429
|
if (e.forEach((l) => {
|
3231
|
-
let
|
3232
|
-
s[
|
3430
|
+
let o = t(l);
|
3431
|
+
s[o] == null && (s[o] = []), s[o].push(l);
|
3233
3432
|
}), r) {
|
3234
3433
|
let l = Object.keys(s);
|
3235
|
-
for (let
|
3236
|
-
s[
|
3434
|
+
for (let o of l)
|
3435
|
+
s[o] = r(s[o]);
|
3237
3436
|
}
|
3238
3437
|
return s;
|
3239
3438
|
});
|
@@ -3243,8 +3442,8 @@ class Lr extends H {
|
|
3243
3442
|
n(this, "groupByArray", (e, t) => {
|
3244
3443
|
let r = [];
|
3245
3444
|
return e.forEach((s) => {
|
3246
|
-
let l = t(s),
|
3247
|
-
|
3445
|
+
let l = t(s), o = r.find((a) => a.key == l);
|
3446
|
+
o == null && (o = { key: l, value: [] }, r.push(o)), o.value.push(s);
|
3248
3447
|
}), r;
|
3249
3448
|
});
|
3250
3449
|
}
|
@@ -3254,8 +3453,8 @@ class Lr extends H {
|
|
3254
3453
|
getChunksByCount(e, t) {
|
3255
3454
|
let r = [], s = d.math.ceil(e.length / t);
|
3256
3455
|
for (let l = 0; l < e.length; l += s) {
|
3257
|
-
let
|
3258
|
-
r.push(
|
3456
|
+
let o = this.getRange(e, l, s);
|
3457
|
+
r.push(o);
|
3259
3458
|
}
|
3260
3459
|
return r;
|
3261
3460
|
}
|
@@ -3266,7 +3465,7 @@ class Lr extends H {
|
|
3266
3465
|
*/
|
3267
3466
|
getRange(e, t, r = null) {
|
3268
3467
|
let s = r == null ? e.length : t + r;
|
3269
|
-
return e.filter((
|
3468
|
+
return e.filter((o, a) => a >= t && a < s);
|
3270
3469
|
}
|
3271
3470
|
/**
|
3272
3471
|
* 获取最后length个元素
|
@@ -3288,8 +3487,8 @@ class Lr extends H {
|
|
3288
3487
|
create(e, t) {
|
3289
3488
|
let r = [];
|
3290
3489
|
for (let s = 0; s < e.length; s++) {
|
3291
|
-
let l = e[s],
|
3292
|
-
r.push(
|
3490
|
+
let l = e[s], o = t(l, s);
|
3491
|
+
r.push(o);
|
3293
3492
|
}
|
3294
3493
|
return r;
|
3295
3494
|
}
|
@@ -3312,7 +3511,7 @@ class Lr extends H {
|
|
3312
3511
|
}
|
3313
3512
|
//#endregion
|
3314
3513
|
}
|
3315
|
-
class
|
3514
|
+
class Mr extends U {
|
3316
3515
|
constructor() {
|
3317
3516
|
super(...arguments);
|
3318
3517
|
n(this, "type", "component");
|
@@ -3333,13 +3532,13 @@ class Rr extends H {
|
|
3333
3532
|
let s = {}, l = Object.keys(e);
|
3334
3533
|
if (l.length == 0)
|
3335
3534
|
return s;
|
3336
|
-
for (let
|
3337
|
-
const
|
3338
|
-
let u = d.string.trim(
|
3535
|
+
for (let o = 0; o < l.length; o++) {
|
3536
|
+
const a = l[o];
|
3537
|
+
let u = d.string.trim(a, t, ".vue"), h = (r ? r + "-" : "") + d.string.getDashName(u), g = e[a];
|
3339
3538
|
if (g.default)
|
3340
3539
|
s[h] = g.default;
|
3341
3540
|
else {
|
3342
|
-
let m =
|
3541
|
+
let m = ct(g);
|
3343
3542
|
s[h] = m;
|
3344
3543
|
}
|
3345
3544
|
}
|
@@ -3354,7 +3553,7 @@ class Rr extends H {
|
|
3354
3553
|
}, 100);
|
3355
3554
|
}
|
3356
3555
|
}
|
3357
|
-
class
|
3556
|
+
class Br extends U {
|
3358
3557
|
constructor() {
|
3359
3558
|
super(...arguments);
|
3360
3559
|
n(this, "type", "dom");
|
@@ -3384,8 +3583,8 @@ class Ir extends H {
|
|
3384
3583
|
} else
|
3385
3584
|
s.push(e);
|
3386
3585
|
for (let l = 0; l < s.length; l++) {
|
3387
|
-
let
|
3388
|
-
r !=
|
3586
|
+
let o = s[l];
|
3587
|
+
r != o && o.classList.remove(t);
|
3389
3588
|
}
|
3390
3589
|
});
|
3391
3590
|
//#endregion
|
@@ -3396,12 +3595,12 @@ class Ir extends H {
|
|
3396
3595
|
n(this, "getWidthOrHeight", (e, t, r = null) => {
|
3397
3596
|
let s = 0, l = [];
|
3398
3597
|
e instanceof Array && l.push(...e), e instanceof HTMLCollection ? l.push(...e) : l.push(e);
|
3399
|
-
for (let
|
3400
|
-
let
|
3401
|
-
if (!
|
3598
|
+
for (let o = 0; o < l.length; o++) {
|
3599
|
+
let a = l[o];
|
3600
|
+
if (!a || !a.getBoundingClientRect)
|
3402
3601
|
continue;
|
3403
|
-
let u =
|
3404
|
-
s += u[t], r && (s += r(
|
3602
|
+
let u = a.getBoundingClientRect();
|
3603
|
+
s += u[t], r && (s += r(a));
|
3405
3604
|
}
|
3406
3605
|
return s;
|
3407
3606
|
});
|
@@ -3450,16 +3649,16 @@ class Ir extends H {
|
|
3450
3649
|
getColors(e) {
|
3451
3650
|
let t = {}, r = 0;
|
3452
3651
|
for (let s = 0; s < e.length; s++) {
|
3453
|
-
let l = e[s],
|
3454
|
-
for (let
|
3455
|
-
|
3456
|
-
|
3652
|
+
let l = e[s], o = 0;
|
3653
|
+
for (let a = 0; a < l.length; a++)
|
3654
|
+
o += l.charCodeAt(a);
|
3655
|
+
o > r && (r = o);
|
3457
3656
|
}
|
3458
3657
|
for (let s = 0; s < e.length; s++) {
|
3459
|
-
let l = e[s],
|
3658
|
+
let l = e[s], o = 0;
|
3460
3659
|
for (let g = 0; g < l.length; g++)
|
3461
|
-
|
3462
|
-
let
|
3660
|
+
o += l.charCodeAt(g);
|
3661
|
+
let a = o / r, u = 255 * a, p = 255 * (1 - a), h = 255 * (1 - a);
|
3463
3662
|
t[l] = `rgb(${u}, ${p}, ${h})`;
|
3464
3663
|
}
|
3465
3664
|
return t;
|
@@ -3505,8 +3704,8 @@ class Ir extends H {
|
|
3505
3704
|
siblings(e) {
|
3506
3705
|
let r = e.parentElement.children, s = [];
|
3507
3706
|
for (let l = 0; l < r.length; l++) {
|
3508
|
-
let
|
3509
|
-
|
3707
|
+
let o = r[l];
|
3708
|
+
o != e && s.push(o);
|
3510
3709
|
}
|
3511
3710
|
return s;
|
3512
3711
|
}
|
@@ -3583,8 +3782,8 @@ class Ir extends H {
|
|
3583
3782
|
*/
|
3584
3783
|
getAvailableHeight(e) {
|
3585
3784
|
return this.getWidthOrHeight(e, "height", (r) => {
|
3586
|
-
let s = getComputedStyle(r), l = parseFloat(s.paddingTop) + parseFloat(s.paddingBottom),
|
3587
|
-
return -(l +
|
3785
|
+
let s = getComputedStyle(r), l = parseFloat(s.paddingTop) + parseFloat(s.paddingBottom), o = parseFloat(s.borderTopWidth) + parseFloat(s.borderBottomWidth);
|
3786
|
+
return -(l + o);
|
3588
3787
|
});
|
3589
3788
|
}
|
3590
3789
|
//#endregion
|
@@ -3592,19 +3791,19 @@ class Ir extends H {
|
|
3592
3791
|
* 获取指定元素在视口内的位置
|
3593
3792
|
*/
|
3594
3793
|
getViewportStyle(e, t, r, s, l) {
|
3595
|
-
let
|
3596
|
-
if (!
|
3794
|
+
let o = e.querySelector(r);
|
3795
|
+
if (!o)
|
3597
3796
|
return null;
|
3598
|
-
let
|
3797
|
+
let a = {}, u = e.getBoundingClientRect(), p = s.getBoundingClientRect(), g = e.querySelector(t).getBoundingClientRect(), m = o.getBoundingClientRect(), k = p.height - g.top;
|
3599
3798
|
if (l == "right") {
|
3600
|
-
|
3601
|
-
let
|
3602
|
-
m.height > p.height ?
|
3799
|
+
a.left = `${u.left + u.width}px`;
|
3800
|
+
let O;
|
3801
|
+
m.height > p.height ? O = p.height : O = m.height, a.height = `${O}px`, O + g.top > p.height ? (a.top = "initial", a.bottom = "0px") : a.top = `${u.top}px`;
|
3603
3802
|
} else if (l == "bottom")
|
3604
|
-
|
3803
|
+
k -= g.height, a.left = `${u.left}px`, a.top = `${u.top + u.height}px`, k < m.height ? a.height = `${k}px` : a.height = `${m.height}px`;
|
3605
3804
|
else
|
3606
3805
|
throw new Error(`暂未支持的position:${l}`);
|
3607
|
-
return
|
3806
|
+
return a;
|
3608
3807
|
}
|
3609
3808
|
//#region 索引
|
3610
3809
|
/**
|
@@ -3616,7 +3815,7 @@ class Ir extends H {
|
|
3616
3815
|
return 0;
|
3617
3816
|
let r = [];
|
3618
3817
|
for (let l = 0; l < t.length; l++) {
|
3619
|
-
let
|
3818
|
+
let o = t[l], a = getComputedStyle(o), u = a.zIndex == "auto" ? 0 : a.zIndex;
|
3620
3819
|
r.push(u);
|
3621
3820
|
}
|
3622
3821
|
return Math.max(...r);
|
@@ -3627,8 +3826,8 @@ class Ir extends H {
|
|
3627
3826
|
* 判断当前鼠标位置是否在指定范围之内
|
3628
3827
|
*/
|
3629
3828
|
inRange(e, t, r, s, l) {
|
3630
|
-
let
|
3631
|
-
return
|
3829
|
+
let o = e.x >= t && e.x <= t + s, a = e.y >= r && e.y <= r + l;
|
3830
|
+
return o && a;
|
3632
3831
|
}
|
3633
3832
|
//#endregion
|
3634
3833
|
//#region 创建
|
@@ -3680,7 +3879,7 @@ class Ir extends H {
|
|
3680
3879
|
}
|
3681
3880
|
//#endregion
|
3682
3881
|
}
|
3683
|
-
class Pr extends
|
3882
|
+
class Pr extends U {
|
3684
3883
|
constructor() {
|
3685
3884
|
super(...arguments);
|
3686
3885
|
n(this, "type", "dictionary");
|
@@ -3718,10 +3917,10 @@ class Pr extends H {
|
|
3718
3917
|
let l = "";
|
3719
3918
|
if (e == null)
|
3720
3919
|
return l;
|
3721
|
-
let
|
3722
|
-
for (let
|
3723
|
-
let u = a
|
3724
|
-
l = l.concat(u).concat(r).concat(p),
|
3920
|
+
let o = Object.keys(e);
|
3921
|
+
for (let a = 0; a < o.length; a++) {
|
3922
|
+
let u = o[a], p = t == null ? e[u] : t(e[u]);
|
3923
|
+
l = l.concat(u).concat(r).concat(p), a != o.length - 1 && (l += s);
|
3725
3924
|
}
|
3726
3925
|
return l;
|
3727
3926
|
}
|
@@ -3738,8 +3937,8 @@ class Pr extends H {
|
|
3738
3937
|
if (s.length == 0)
|
3739
3938
|
return r;
|
3740
3939
|
for (let l of s) {
|
3741
|
-
let
|
3742
|
-
t != null && t(
|
3940
|
+
let o = e[l], a = { key: l, value: o };
|
3941
|
+
t != null && t(a), r.push(a);
|
3743
3942
|
}
|
3744
3943
|
return r;
|
3745
3944
|
}
|
@@ -3757,7 +3956,7 @@ class Pr extends H {
|
|
3757
3956
|
}
|
3758
3957
|
//#endregion
|
3759
3958
|
}
|
3760
|
-
class
|
3959
|
+
class Fr extends U {
|
3761
3960
|
constructor() {
|
3762
3961
|
super(...arguments);
|
3763
3962
|
n(this, "type", "event");
|
@@ -3803,7 +4002,7 @@ class Mr extends H {
|
|
3803
4002
|
});
|
3804
4003
|
}
|
3805
4004
|
}
|
3806
|
-
class
|
4005
|
+
class Nr extends U {
|
3807
4006
|
constructor() {
|
3808
4007
|
super(...arguments);
|
3809
4008
|
n(this, "type", "file");
|
@@ -3814,8 +4013,8 @@ class Br extends H {
|
|
3814
4013
|
let r = window.atob(e), s = r.length, l = new Uint8Array(s);
|
3815
4014
|
for (; s--; )
|
3816
4015
|
l[s] = r.charCodeAt(s);
|
3817
|
-
let
|
3818
|
-
|
4016
|
+
let o = new Blob([l]);
|
4017
|
+
ft.saveAs(o, t);
|
3819
4018
|
});
|
3820
4019
|
/**
|
3821
4020
|
* 获取文件扩展名
|
@@ -3840,28 +4039,28 @@ class Br extends H {
|
|
3840
4039
|
});
|
3841
4040
|
}
|
3842
4041
|
}
|
3843
|
-
class
|
4042
|
+
class qr extends U {
|
3844
4043
|
constructor() {
|
3845
4044
|
super(...arguments);
|
3846
4045
|
n(this, "type", "html");
|
3847
4046
|
/**
|
3848
4047
|
* 获取Html内容
|
3849
4048
|
*/
|
3850
|
-
n(this, "getHtml", (e) => d.
|
4049
|
+
n(this, "getHtml", (e) => d.object.isNumber(e) ? e : e && e.replace(/\n/g, "<br/>"));
|
3851
4050
|
/**
|
3852
4051
|
* 获取Html中的文字
|
3853
4052
|
*/
|
3854
4053
|
n(this, "getText", (e) => {
|
3855
4054
|
if (!e)
|
3856
4055
|
return null;
|
3857
|
-
if (!d.
|
4056
|
+
if (!d.object.isString(e))
|
3858
4057
|
return e;
|
3859
4058
|
let t = new RegExp("<[^<>]+>", "g");
|
3860
4059
|
return e.replace(t, "");
|
3861
4060
|
});
|
3862
4061
|
}
|
3863
4062
|
}
|
3864
|
-
class
|
4063
|
+
class Vr extends U {
|
3865
4064
|
constructor() {
|
3866
4065
|
super(...arguments);
|
3867
4066
|
n(this, "type", "image");
|
@@ -3871,7 +4070,7 @@ class Nr extends H {
|
|
3871
4070
|
n(this, "base64", (e) => "data:image/png;base64," + e);
|
3872
4071
|
}
|
3873
4072
|
}
|
3874
|
-
class
|
4073
|
+
class Wr extends U {
|
3875
4074
|
constructor() {
|
3876
4075
|
super(...arguments);
|
3877
4076
|
n(this, "type", "math");
|
@@ -3881,7 +4080,7 @@ class Vr extends H {
|
|
3881
4080
|
*/
|
3882
4081
|
n(this, "filterPage", (e, t, r) => {
|
3883
4082
|
let s = (t - 1) * r, l = t * r;
|
3884
|
-
return e.filter((
|
4083
|
+
return e.filter((a, u) => u >= s && u < l);
|
3885
4084
|
});
|
3886
4085
|
/**
|
3887
4086
|
* 总页数
|
@@ -3928,8 +4127,8 @@ class Vr extends H {
|
|
3928
4127
|
let l = s * 1024;
|
3929
4128
|
if (e < l)
|
3930
4129
|
return this.round(e / s, 2) + "GB";
|
3931
|
-
let
|
3932
|
-
if (e <
|
4130
|
+
let o = l * 1024;
|
4131
|
+
if (e < o)
|
3933
4132
|
return this.round(e / l, 2) + "TB";
|
3934
4133
|
throw new Error("暂未支持比TB更大的大小");
|
3935
4134
|
});
|
@@ -3969,7 +4168,7 @@ class Vr extends H {
|
|
3969
4168
|
return e;
|
3970
4169
|
}
|
3971
4170
|
}
|
3972
|
-
class
|
4171
|
+
class zr extends U {
|
3973
4172
|
constructor() {
|
3974
4173
|
super(...arguments);
|
3975
4174
|
n(this, "type", "micro");
|
@@ -3980,7 +4179,7 @@ class qr extends H {
|
|
3980
4179
|
});
|
3981
4180
|
}
|
3982
4181
|
}
|
3983
|
-
class
|
4182
|
+
class Kr extends U {
|
3984
4183
|
constructor() {
|
3985
4184
|
super(...arguments);
|
3986
4185
|
n(this, "type", "mount");
|
@@ -4002,10 +4201,34 @@ class Wr extends H {
|
|
4002
4201
|
});
|
4003
4202
|
}
|
4004
4203
|
}
|
4005
|
-
class
|
4204
|
+
class Jr extends U {
|
4006
4205
|
constructor() {
|
4007
4206
|
super(...arguments);
|
4008
4207
|
n(this, "type", "object");
|
4208
|
+
//#region 判断
|
4209
|
+
/**
|
4210
|
+
* 判断输入类型是否是字符串类型 null -> false
|
4211
|
+
*/
|
4212
|
+
n(this, "isString", (e) => Object.prototype.toString.call(e) == "[object String]");
|
4213
|
+
/**
|
4214
|
+
* 判断输入类型是否是Object类型
|
4215
|
+
*/
|
4216
|
+
n(this, "isObject", (e) => Object.prototype.toString.call(e) == "[object Object]");
|
4217
|
+
/**
|
4218
|
+
* 判断输入类型是否是Array类型
|
4219
|
+
*/
|
4220
|
+
n(this, "isArray", (e) => Object.prototype.toString.call(e) == "[object Array]");
|
4221
|
+
/**
|
4222
|
+
* 判断输入类型是否是Number类型,null -> false
|
4223
|
+
*/
|
4224
|
+
n(this, "isNumber", (e) => {
|
4225
|
+
let t = Object.prototype.toString.call(e);
|
4226
|
+
return t == "[object Number]" || t == "[object BigInt]";
|
4227
|
+
});
|
4228
|
+
/**
|
4229
|
+
* 判断输入类型是否是isBoolean类型
|
4230
|
+
*/
|
4231
|
+
n(this, "isBoolean", (e) => Object.prototype.toString.call(e) == "[object Boolean]");
|
4009
4232
|
//#endregion
|
4010
4233
|
//#region 复制
|
4011
4234
|
/**
|
@@ -4013,16 +4236,16 @@ class zr extends H {
|
|
4013
4236
|
*/
|
4014
4237
|
n(this, "copy", (e, t = null) => {
|
4015
4238
|
let r = [];
|
4016
|
-
d.
|
4239
|
+
d.object.isObject(e) && r.push(e);
|
4017
4240
|
let s = [];
|
4018
4241
|
for (let l = 0; l < r.length; l++) {
|
4019
|
-
let
|
4020
|
-
Object.keys(
|
4021
|
-
let p =
|
4022
|
-
t && t[u] ?
|
4023
|
-
}), s.push(
|
4242
|
+
let o = r[l], a = {};
|
4243
|
+
Object.keys(o).forEach((u) => {
|
4244
|
+
let p = o[u];
|
4245
|
+
t && t[u] ? a[u] = t[u]() : a[u] = p;
|
4246
|
+
}), s.push(a);
|
4024
4247
|
}
|
4025
|
-
return d.
|
4248
|
+
return d.object.isObject(e) ? s[0] : s;
|
4026
4249
|
});
|
4027
4250
|
//#endregion
|
4028
4251
|
//#region 赋值
|
@@ -4032,20 +4255,21 @@ class zr extends H {
|
|
4032
4255
|
n(this, "addProperties", (e, t, r) => {
|
4033
4256
|
let s = e;
|
4034
4257
|
for (let l = 0; l < t.length; l++) {
|
4035
|
-
let
|
4036
|
-
l == t.length - 1 ? s[
|
4258
|
+
let o = t[l];
|
4259
|
+
l == t.length - 1 ? s[o] = r : (s[o] || (s[o] = {}), s = s[o]);
|
4037
4260
|
}
|
4038
4261
|
});
|
4039
4262
|
}
|
4263
|
+
//#endregion
|
4040
4264
|
//#region 净化
|
4041
4265
|
/**
|
4042
|
-
*
|
4266
|
+
* 净化对象,只清除默认值属性
|
4043
4267
|
*/
|
4044
4268
|
pure(e) {
|
4045
4269
|
let t = {}, r = Object.keys(e);
|
4046
4270
|
for (let s = 0; s < r.length; s++) {
|
4047
|
-
let l = r[s],
|
4048
|
-
|
4271
|
+
let l = r[s], o = e[l];
|
4272
|
+
o != null && (d.object.isObject(o) ? t[l] = this.pure(o) : t[l] = e[l]);
|
4049
4273
|
}
|
4050
4274
|
return t;
|
4051
4275
|
}
|
@@ -4057,8 +4281,8 @@ class zr extends H {
|
|
4057
4281
|
filter(e, t, r) {
|
4058
4282
|
let s = [];
|
4059
4283
|
return Object.keys(e).forEach((l) => {
|
4060
|
-
let
|
4061
|
-
t(
|
4284
|
+
let o = { key: l, value: e[l] };
|
4285
|
+
t(o) && s.push(r(o));
|
4062
4286
|
}), s;
|
4063
4287
|
}
|
4064
4288
|
/**
|
@@ -4080,8 +4304,8 @@ class zr extends H {
|
|
4080
4304
|
toObject(e, t, r) {
|
4081
4305
|
let s = {};
|
4082
4306
|
for (let l = 0; l < e.length; l++) {
|
4083
|
-
let
|
4084
|
-
s[t(
|
4307
|
+
let o = e[l];
|
4308
|
+
s[t(o)] = r(o);
|
4085
4309
|
}
|
4086
4310
|
return s;
|
4087
4311
|
}
|
@@ -4091,13 +4315,13 @@ class zr extends H {
|
|
4091
4315
|
* 对对象进行深度克隆,同时可以移除Proxy对象
|
4092
4316
|
*/
|
4093
4317
|
clone(e, t = null) {
|
4094
|
-
let r =
|
4318
|
+
let r = yt(e, !0);
|
4095
4319
|
if (t == null)
|
4096
4320
|
return r;
|
4097
|
-
if (d.
|
4321
|
+
if (d.object.isArray(e))
|
4098
4322
|
for (let s = 0; s < r.length; s++)
|
4099
4323
|
t(r[s]);
|
4100
|
-
else d.
|
4324
|
+
else d.object.isObject(e) && t(r);
|
4101
4325
|
return r;
|
4102
4326
|
}
|
4103
4327
|
//#endregion
|
@@ -4106,7 +4330,7 @@ class zr extends H {
|
|
4106
4330
|
* 合并来源对象到目标对象上
|
4107
4331
|
*/
|
4108
4332
|
mergeTo(e, t) {
|
4109
|
-
return e == null ? t : t == null ? e : d.
|
4333
|
+
return e == null ? t : t == null ? e : d.object.isArray(t) ? t.slice() : (Object.keys(t).forEach((s) => {
|
4110
4334
|
let l = t[s];
|
4111
4335
|
typeof l == "object" ? e[s] = this.mergeTo(e[s], l) : e[s] = l;
|
4112
4336
|
}), e);
|
@@ -4129,7 +4353,7 @@ class zr extends H {
|
|
4129
4353
|
}
|
4130
4354
|
//#endregion
|
4131
4355
|
}
|
4132
|
-
class
|
4356
|
+
class Xr extends U {
|
4133
4357
|
constructor() {
|
4134
4358
|
super(...arguments);
|
4135
4359
|
n(this, "type", "string");
|
@@ -4146,7 +4370,7 @@ class Kr extends H {
|
|
4146
4370
|
/**
|
4147
4371
|
* 填充字符串到指定长度,使用pad填充
|
4148
4372
|
*/
|
4149
|
-
n(this, "padLeft", (e, t, r) =>
|
4373
|
+
n(this, "padLeft", (e, t, r) => mt.pad(e, t, r));
|
4150
4374
|
/**
|
4151
4375
|
* 填充字符串到指定长度,使用pad填充
|
4152
4376
|
*/
|
@@ -4219,7 +4443,7 @@ class Kr extends H {
|
|
4219
4443
|
if (!e)
|
4220
4444
|
return !1;
|
4221
4445
|
let t = JSON.parse(e);
|
4222
|
-
return d.
|
4446
|
+
return d.object.isObject(t);
|
4223
4447
|
} catch {
|
4224
4448
|
return !1;
|
4225
4449
|
}
|
@@ -4285,8 +4509,8 @@ class Kr extends H {
|
|
4285
4509
|
let s = e.indexOf(t);
|
4286
4510
|
if (s == -1)
|
4287
4511
|
return null;
|
4288
|
-
let l = s + t.length,
|
4289
|
-
return
|
4512
|
+
let l = s + t.length, o = e.substring(l), a = o.indexOf(r);
|
4513
|
+
return a == -1 ? null : o.substring(0, a);
|
4290
4514
|
});
|
4291
4515
|
//#endregion
|
4292
4516
|
//#region 格式化
|
@@ -4300,8 +4524,8 @@ class Kr extends H {
|
|
4300
4524
|
typeof t == "string" ? r.push(t) : r.push(...t);
|
4301
4525
|
let s = e;
|
4302
4526
|
for (let l = 0; l < r.length; l++) {
|
4303
|
-
let
|
4304
|
-
s = s.replace(`{${l}}`,
|
4527
|
+
let o = r[l];
|
4528
|
+
s = s.replace(`{${l}}`, o);
|
4305
4529
|
}
|
4306
4530
|
return s;
|
4307
4531
|
});
|
@@ -4328,7 +4552,7 @@ class Kr extends H {
|
|
4328
4552
|
}
|
4329
4553
|
//#endregion
|
4330
4554
|
}
|
4331
|
-
class
|
4555
|
+
class Qr extends U {
|
4332
4556
|
constructor() {
|
4333
4557
|
super(...arguments);
|
4334
4558
|
n(this, "type", "task");
|
@@ -4381,41 +4605,12 @@ class Jr extends H {
|
|
4381
4605
|
});
|
4382
4606
|
}
|
4383
4607
|
}
|
4384
|
-
class
|
4385
|
-
constructor() {
|
4386
|
-
super(...arguments);
|
4387
|
-
n(this, "type", "type");
|
4388
|
-
/**
|
4389
|
-
* 判断输入类型是否是字符串类型 null -> false
|
4390
|
-
*/
|
4391
|
-
n(this, "isString", (e) => Object.prototype.toString.call(e) == "[object String]");
|
4392
|
-
/**
|
4393
|
-
* 判断输入类型是否是Object类型
|
4394
|
-
*/
|
4395
|
-
n(this, "isObject", (e) => Object.prototype.toString.call(e) == "[object Object]");
|
4396
|
-
/**
|
4397
|
-
* 判断输入类型是否是Array类型
|
4398
|
-
*/
|
4399
|
-
n(this, "isArray", (e) => Object.prototype.toString.call(e) == "[object Array]");
|
4400
|
-
/**
|
4401
|
-
* 判断输入类型是否是Number类型,null -> false
|
4402
|
-
*/
|
4403
|
-
n(this, "isNumber", (e) => {
|
4404
|
-
let t = Object.prototype.toString.call(e);
|
4405
|
-
return t == "[object Number]" || t == "[object BigInt]";
|
4406
|
-
});
|
4407
|
-
/**
|
4408
|
-
* 判断输入类型是否是isBoolean类型
|
4409
|
-
*/
|
4410
|
-
n(this, "isBoolean", (e) => Object.prototype.toString.call(e) == "[object Boolean]");
|
4411
|
-
}
|
4412
|
-
}
|
4413
|
-
class Al {
|
4608
|
+
class Tl {
|
4414
4609
|
constructor() {
|
4415
4610
|
n(this, "value");
|
4416
4611
|
}
|
4417
4612
|
}
|
4418
|
-
class Yr extends
|
4613
|
+
class Yr extends U {
|
4419
4614
|
constructor() {
|
4420
4615
|
super(...arguments);
|
4421
4616
|
n(this, "type", "time");
|
@@ -4497,7 +4692,7 @@ class Yr extends H {
|
|
4497
4692
|
});
|
4498
4693
|
}
|
4499
4694
|
}
|
4500
|
-
class
|
4695
|
+
class Gr extends U {
|
4501
4696
|
constructor() {
|
4502
4697
|
super(...arguments);
|
4503
4698
|
n(this, "type", "tree");
|
@@ -4507,13 +4702,13 @@ class Xr extends H {
|
|
4507
4702
|
n(this, "getById", (e, t, r, s) => {
|
4508
4703
|
if (!r)
|
4509
4704
|
return null;
|
4510
|
-
let l = r.find((
|
4705
|
+
let l = r.find((o) => o[t] == e) || null;
|
4511
4706
|
if (l != null)
|
4512
4707
|
return l;
|
4513
|
-
for (let
|
4514
|
-
let
|
4515
|
-
if (
|
4516
|
-
l =
|
4708
|
+
for (let o = 0; o < r.length; o++) {
|
4709
|
+
let a = this.getById(e, t, r[o][s], s);
|
4710
|
+
if (a != null) {
|
4711
|
+
l = a;
|
4517
4712
|
break;
|
4518
4713
|
}
|
4519
4714
|
}
|
@@ -4523,26 +4718,26 @@ class Xr extends H {
|
|
4523
4718
|
* 树节点
|
4524
4719
|
*/
|
4525
4720
|
n(this, "getByIds", (e, t, r, s) => {
|
4526
|
-
let l = d.array.distinct(e, (
|
4527
|
-
return l.forEach((
|
4528
|
-
let u = this.getById(
|
4529
|
-
|
4530
|
-
}),
|
4721
|
+
let l = d.array.distinct(e, (a) => a), o = [];
|
4722
|
+
return l.forEach((a) => {
|
4723
|
+
let u = this.getById(a, t, r, s);
|
4724
|
+
o.push(u);
|
4725
|
+
}), o;
|
4531
4726
|
});
|
4532
4727
|
/**
|
4533
4728
|
* 找出指定层级集合中,指定对象的下一个对象
|
4534
4729
|
*/
|
4535
4730
|
n(this, "getNextById", (e, t, r, s) => {
|
4536
|
-
let l = this.getById(e, t, r, s),
|
4537
|
-
if (
|
4731
|
+
let l = this.getById(e, t, r, s), o = this.getParentsById(e, t, r, s);
|
4732
|
+
if (o.length == 0) {
|
4538
4733
|
if (r.length == 1)
|
4539
4734
|
return null;
|
4540
4735
|
let h = r.indexOf(l);
|
4541
4736
|
return h == r.length - 1 ? r[h - 1] : r[h + 1];
|
4542
4737
|
}
|
4543
|
-
let
|
4738
|
+
let a = o[o.length - 1], u = a[s];
|
4544
4739
|
if (u.length == 1)
|
4545
|
-
return
|
4740
|
+
return a;
|
4546
4741
|
let p = u.indexOf(l);
|
4547
4742
|
return p == u.length - 1 ? u[p - 1] : u[p + 1];
|
4548
4743
|
});
|
@@ -4564,22 +4759,22 @@ class Xr extends H {
|
|
4564
4759
|
* 从树结构数据中,递归获取指定主键的父元素集合
|
4565
4760
|
*/
|
4566
4761
|
n(this, "getParentsById", (e, t, r, s, l = !1) => {
|
4567
|
-
let
|
4568
|
-
return r == null ||
|
4762
|
+
let o = [];
|
4763
|
+
return r == null || st(e, t, r, s, o, l), o;
|
4569
4764
|
});
|
4570
4765
|
/**
|
4571
4766
|
* 获取当前节点的所有孩子节点的集合
|
4572
4767
|
*/
|
4573
4768
|
n(this, "getChildrenById", (e, t, r, s, l = !1) => {
|
4574
|
-
let
|
4575
|
-
return l &&
|
4769
|
+
let o = this.getById(e, t, r, s), a = [];
|
4770
|
+
return l && a.push(o), Ae(o, s, a), a;
|
4576
4771
|
});
|
4577
4772
|
/**
|
4578
4773
|
* 获取当前节点的所有孩子节点的集合
|
4579
4774
|
*/
|
4580
4775
|
n(this, "getChildren", (e, t, r = !1) => {
|
4581
4776
|
let s = [];
|
4582
|
-
return r && s.push(e),
|
4777
|
+
return r && s.push(e), Ae(e, t, s), s;
|
4583
4778
|
});
|
4584
4779
|
/**
|
4585
4780
|
* 搜索指定文本的树结构
|
@@ -4588,13 +4783,13 @@ class Xr extends H {
|
|
4588
4783
|
let l = [];
|
4589
4784
|
if (!t)
|
4590
4785
|
return l;
|
4591
|
-
let
|
4786
|
+
let o = e ? e.toUpperCase() : "", a = d.object.isString(s) ? [s] : s;
|
4592
4787
|
for (let u of t) {
|
4593
4788
|
let p = !1, h = this.getChildren(u, r, !0);
|
4594
4789
|
for (let g of h) {
|
4595
|
-
for (let m of
|
4596
|
-
let
|
4597
|
-
if ((
|
4790
|
+
for (let m of a) {
|
4791
|
+
let k = g[m];
|
4792
|
+
if ((k ? k.toUpperCase() : "").indexOf(o) > -1) {
|
4598
4793
|
p = !0;
|
4599
4794
|
break;
|
4600
4795
|
}
|
@@ -4613,13 +4808,13 @@ class Xr extends H {
|
|
4613
4808
|
* 删除指定子元素
|
4614
4809
|
*/
|
4615
4810
|
n(this, "removeById", (e, t, r, s) => {
|
4616
|
-
let l = this.getById(e, t, r, s),
|
4617
|
-
if (
|
4811
|
+
let l = this.getById(e, t, r, s), o = this.getParentsById(e, t, r, s);
|
4812
|
+
if (o.length == 0) {
|
4618
4813
|
d.array.remove(r, l);
|
4619
4814
|
return;
|
4620
4815
|
}
|
4621
|
-
let
|
4622
|
-
d.array.remove(
|
4816
|
+
let a = o[o.length - 1];
|
4817
|
+
d.array.remove(a[s], l);
|
4623
4818
|
});
|
4624
4819
|
/**
|
4625
4820
|
* 获取树结构扁平化后的节点信息
|
@@ -4627,10 +4822,10 @@ class Xr extends H {
|
|
4627
4822
|
n(this, "getFlat", (e, t) => {
|
4628
4823
|
let r = [...e];
|
4629
4824
|
for (let s = 0; s < e.length; s++) {
|
4630
|
-
let
|
4631
|
-
if (
|
4632
|
-
let
|
4633
|
-
r.push(...
|
4825
|
+
let o = e[s][t];
|
4826
|
+
if (o.length > 0) {
|
4827
|
+
let a = this.getFlat(o, t);
|
4828
|
+
r.push(...a);
|
4634
4829
|
}
|
4635
4830
|
}
|
4636
4831
|
return r;
|
@@ -4640,10 +4835,10 @@ class Xr extends H {
|
|
4640
4835
|
*/
|
4641
4836
|
n(this, "map", (e, t, r, s) => {
|
4642
4837
|
let l = [];
|
4643
|
-
for (let
|
4644
|
-
let
|
4838
|
+
for (let o = 0; o < e.length; o++) {
|
4839
|
+
let a = e[o], u = s(a);
|
4645
4840
|
l.push(u);
|
4646
|
-
let p =
|
4841
|
+
let p = a[t];
|
4647
4842
|
if (p && p.length > 0) {
|
4648
4843
|
let h = this.map(p, t, r, s);
|
4649
4844
|
u[r] = h;
|
@@ -4653,28 +4848,28 @@ class Xr extends H {
|
|
4653
4848
|
});
|
4654
4849
|
}
|
4655
4850
|
}
|
4656
|
-
function
|
4851
|
+
function st(c, i, e, t, r, s) {
|
4657
4852
|
for (let l = 0; l < e.length; l++) {
|
4658
|
-
let
|
4659
|
-
if (
|
4660
|
-
s && r.push(
|
4853
|
+
let o = e[l];
|
4854
|
+
if (o[i] == c) {
|
4855
|
+
s && r.push(o);
|
4661
4856
|
break;
|
4662
4857
|
} else
|
4663
|
-
d.tree.getById(c, i,
|
4858
|
+
d.tree.getById(c, i, o[t], t) != null && (r.push(o), st(c, i, o[t], t, r, s));
|
4664
4859
|
}
|
4665
4860
|
return r;
|
4666
4861
|
}
|
4667
|
-
function
|
4862
|
+
function Ae(c, i, e) {
|
4668
4863
|
let t = c[i];
|
4669
4864
|
if (!t || t.length == 0)
|
4670
4865
|
return e;
|
4671
4866
|
for (let r = 0; r < t.length; r++) {
|
4672
4867
|
let s = t[r];
|
4673
|
-
e.push(s),
|
4868
|
+
e.push(s), Ae(s, i, e);
|
4674
4869
|
}
|
4675
4870
|
return e;
|
4676
4871
|
}
|
4677
|
-
class
|
4872
|
+
class Zr extends U {
|
4678
4873
|
constructor() {
|
4679
4874
|
super(...arguments);
|
4680
4875
|
n(this, "type", "scroll");
|
@@ -4697,7 +4892,7 @@ class Gr extends H {
|
|
4697
4892
|
});
|
4698
4893
|
}
|
4699
4894
|
}
|
4700
|
-
class
|
4895
|
+
class es {
|
4701
4896
|
constructor() {
|
4702
4897
|
/**
|
4703
4898
|
* 是否美化
|
@@ -4705,7 +4900,7 @@ class Zr {
|
|
4705
4900
|
n(this, "beautify", !1);
|
4706
4901
|
}
|
4707
4902
|
}
|
4708
|
-
class
|
4903
|
+
class ts extends U {
|
4709
4904
|
constructor() {
|
4710
4905
|
super(...arguments);
|
4711
4906
|
n(this, "type", "json");
|
@@ -4732,13 +4927,13 @@ class es extends H {
|
|
4732
4927
|
serialize(e, t) {
|
4733
4928
|
if (e == null)
|
4734
4929
|
return null;
|
4735
|
-
t == null && (t = new
|
4930
|
+
t == null && (t = new es());
|
4736
4931
|
let s = (typeof t == "boolean" ? t : t.beautify) ? 2 : null, l;
|
4737
4932
|
if (typeof e == "string") {
|
4738
|
-
let
|
4739
|
-
if (
|
4933
|
+
let a = this.deserialize(e);
|
4934
|
+
if (a == null)
|
4740
4935
|
return e;
|
4741
|
-
l =
|
4936
|
+
l = a;
|
4742
4937
|
} else
|
4743
4938
|
l = e;
|
4744
4939
|
return JSON.stringify(l, null, s);
|
@@ -4795,10 +4990,10 @@ class es extends H {
|
|
4795
4990
|
return null;
|
4796
4991
|
let s = e;
|
4797
4992
|
for (let l of r) {
|
4798
|
-
let
|
4799
|
-
if (
|
4993
|
+
let o = s[l];
|
4994
|
+
if (o == null)
|
4800
4995
|
return null;
|
4801
|
-
s =
|
4996
|
+
s = o;
|
4802
4997
|
}
|
4803
4998
|
return s;
|
4804
4999
|
}
|
@@ -4830,11 +5025,11 @@ class es extends H {
|
|
4830
5025
|
return "{}";
|
4831
5026
|
let l = `{
|
4832
5027
|
`;
|
4833
|
-
for (let
|
4834
|
-
let
|
5028
|
+
for (let o = 0; o < e.length; o++) {
|
5029
|
+
let a = e[o], u = s(a);
|
4835
5030
|
u.type == "array" ? (u.remark && (l += this.fillSpace(2 * r) + "//" + u.remark + `
|
4836
|
-
`), l += this.fillKey(2 * r, u.key) + "[", l += this.buildObjectLevel(
|
4837
|
-
`), l += this.fillKey(2 * r, u.key), l += this.buildObjectLevel(
|
5031
|
+
`), l += this.fillKey(2 * r, u.key) + "[", l += this.buildObjectLevel(a[t], t, r + 1, s), l += "]", o != e.length - 1 && (l += ",")) : u.type == "object" ? (u.remark && (l += this.fillSpace(2 * r) + "//" + u.remark + `
|
5032
|
+
`), l += this.fillKey(2 * r, u.key), l += this.buildObjectLevel(a[t], t, r + 1, s), o != e.length - 1 && (l += ",")) : (l += this.fillKey(2 * r, u.key), u.type == "string" ? l += '""' : u.type == "date" ? l += `"${d.time.getDateTimeString()}"` : u.type == "int" || u.type == "number" ? l += "0" : u.type == "boolean" ? l += "false" : l += null, o != e.length - 1 && (l += ","), u.remark && (l += " //" + u.remark)), l += `
|
4838
5033
|
`;
|
4839
5034
|
}
|
4840
5035
|
return l += this.fillSpace(2 * (r - 1)), l += "}", l;
|
@@ -4857,7 +5052,7 @@ class es extends H {
|
|
4857
5052
|
}
|
4858
5053
|
//#endregion
|
4859
5054
|
}
|
4860
|
-
class
|
5055
|
+
class rs extends U {
|
4861
5056
|
constructor() {
|
4862
5057
|
super(...arguments);
|
4863
5058
|
n(this, "type", "browser");
|
@@ -4869,7 +5064,7 @@ class ts extends H {
|
|
4869
5064
|
return navigator.language == "zh-CN" ? "zh-cn" : "en";
|
4870
5065
|
}
|
4871
5066
|
}
|
4872
|
-
class
|
5067
|
+
class ss extends U {
|
4873
5068
|
constructor() {
|
4874
5069
|
super(...arguments);
|
4875
5070
|
n(this, "type", "url");
|
@@ -4889,13 +5084,13 @@ class rs extends H {
|
|
4889
5084
|
} else if (e instanceof Object) {
|
4890
5085
|
let s = Object.keys(e);
|
4891
5086
|
for (let l of s) {
|
4892
|
-
let
|
4893
|
-
|
5087
|
+
let o = d.object.clone(t);
|
5088
|
+
o.push(l), r += this.handleQueryValue(e[l], o);
|
4894
5089
|
}
|
4895
5090
|
} else {
|
4896
5091
|
let s = "";
|
4897
|
-
for (let
|
4898
|
-
|
5092
|
+
for (let o = 0; o < t.length; o++)
|
5093
|
+
o > 0 && (s += "["), s += t[o], o > 0 && (s += "]");
|
4899
5094
|
let l = encodeURIComponent(e);
|
4900
5095
|
l = l.replace(/'/g, "%27"), l = l.replace(/%20/g, "+"), l = l.replace(/%5B/g, "["), l = l.replace(/%5D/g, "]"), l = l.replace(/%2C/g, ","), l = l.replace(/%3A/g, ":"), l = l.replace(/%24/g, "$"), r += `&${s}=${l}`;
|
4901
5096
|
}
|
@@ -4941,12 +5136,12 @@ class rs extends H {
|
|
4941
5136
|
getToUrl(e, t = !0) {
|
4942
5137
|
let r = {};
|
4943
5138
|
if (!this.getRoute(e).query.m) {
|
4944
|
-
let
|
4945
|
-
|
5139
|
+
let o = this.getQueryParam(location.search, "m");
|
5140
|
+
o && (r.m = o);
|
4946
5141
|
}
|
4947
5142
|
if (t) {
|
4948
|
-
let
|
4949
|
-
|
5143
|
+
let o = location.pathname + location.search;
|
5144
|
+
o && (r.return_url = o);
|
4950
5145
|
}
|
4951
5146
|
return this.getUrl(e, r);
|
4952
5147
|
}
|
@@ -4999,8 +5194,8 @@ class rs extends H {
|
|
4999
5194
|
return null;
|
5000
5195
|
let t = "", r = Object.keys(e);
|
5001
5196
|
for (let l of r) {
|
5002
|
-
let
|
5003
|
-
t +=
|
5197
|
+
let o = [l], a = this.handleQueryValue(e[l], o);
|
5198
|
+
t += a;
|
5004
5199
|
}
|
5005
5200
|
return t.substring(1);
|
5006
5201
|
}
|
@@ -5044,7 +5239,7 @@ class rs extends H {
|
|
5044
5239
|
deserializeQs(e, t = !0) {
|
5045
5240
|
let r = {}, s = e.split("&");
|
5046
5241
|
for (let l = 0; l < s.length; l++) {
|
5047
|
-
let
|
5242
|
+
let o = s[l], a = o.indexOf("="), u = o.substring(0, a), p = o.substring(a + 1);
|
5048
5243
|
r[u] = t ? decodeURIComponent(p) : p;
|
5049
5244
|
}
|
5050
5245
|
return r;
|
@@ -5072,7 +5267,7 @@ class rs extends H {
|
|
5072
5267
|
return e ? e.indexOf("http://") > -1 || e.indexOf("https://") > -1 : !1;
|
5073
5268
|
}
|
5074
5269
|
}
|
5075
|
-
class
|
5270
|
+
class ls extends U {
|
5076
5271
|
constructor() {
|
5077
5272
|
super(...arguments);
|
5078
5273
|
n(this, "type", "sign");
|
@@ -5092,7 +5287,7 @@ class ss extends H {
|
|
5092
5287
|
return this.clean(e), d.url.serialize(e, t);
|
5093
5288
|
}
|
5094
5289
|
}
|
5095
|
-
class
|
5290
|
+
class lt {
|
5096
5291
|
constructor(i, e) {
|
5097
5292
|
/**
|
5098
5293
|
* 距窗口左边的距离
|
@@ -5105,7 +5300,7 @@ class tt {
|
|
5105
5300
|
this.x = i, this.y = e;
|
5106
5301
|
}
|
5107
5302
|
}
|
5108
|
-
class
|
5303
|
+
class ns extends lt {
|
5109
5304
|
constructor() {
|
5110
5305
|
super(...arguments);
|
5111
5306
|
/**
|
@@ -5114,7 +5309,7 @@ class ls extends tt {
|
|
5114
5309
|
n(this, "affix");
|
5115
5310
|
}
|
5116
5311
|
}
|
5117
|
-
class
|
5312
|
+
class El extends lt {
|
5118
5313
|
constructor(e, t, r, s) {
|
5119
5314
|
super(e, t);
|
5120
5315
|
n(this, "width");
|
@@ -5127,7 +5322,7 @@ class se {
|
|
5127
5322
|
n(this, "type");
|
5128
5323
|
}
|
5129
5324
|
}
|
5130
|
-
class
|
5325
|
+
class $e extends se {
|
5131
5326
|
constructor() {
|
5132
5327
|
super();
|
5133
5328
|
//#region 大小调整
|
@@ -5206,13 +5401,13 @@ class De extends se {
|
|
5206
5401
|
if (e == null)
|
5207
5402
|
return;
|
5208
5403
|
this.dragElement = e;
|
5209
|
-
let r = !1, s = (
|
5210
|
-
let u = new
|
5404
|
+
let r = !1, s = (a) => (r = !0, a.preventDefault(), t.init(a)), l = (a) => {
|
5405
|
+
let u = new ns(), p = t.range;
|
5211
5406
|
if (p == null)
|
5212
|
-
u.x =
|
5407
|
+
u.x = a.clientX, u.y = a.clientY;
|
5213
5408
|
else {
|
5214
|
-
let { x: h, y: g, width: m, height:
|
5215
|
-
|
5409
|
+
let { x: h, y: g, width: m, height: k } = p;
|
5410
|
+
a.clientX < h ? u.x = h : a.clientX > h + m ? u.x = h + m : u.x = a.clientX, a.clientY < g ? u.y = g : a.clientY > g + k ? u.y = g + k : u.y = a.clientY;
|
5216
5411
|
}
|
5217
5412
|
if (t.affix) {
|
5218
5413
|
if (t.range == null)
|
@@ -5220,12 +5415,12 @@ class De extends se {
|
|
5220
5415
|
let h = p.x + p.width, g = p.y + p.height;
|
5221
5416
|
u.x <= t.affix ? u.affix = "left" : u.x >= h - t.affix ? u.affix = "right" : u.y >= p.y && u.y <= p.y + t.affix ? u.affix = "top" : u.y >= g - t.affix && u.y <= g && (u.affix = "bottom");
|
5222
5417
|
}
|
5223
|
-
t.handler(u, this.dragStart, this.dragStartData, r,
|
5224
|
-
},
|
5225
|
-
window.removeEventListener("mousemove", l), window.removeEventListener("mouseup",
|
5418
|
+
t.handler(u, this.dragStart, this.dragStartData, r, a), r = !1;
|
5419
|
+
}, o = (a) => {
|
5420
|
+
window.removeEventListener("mousemove", l), window.removeEventListener("mouseup", o), t.end != null && t.end(a);
|
5226
5421
|
};
|
5227
|
-
this.dragMouseDownHandler = (
|
5228
|
-
this.dragStart =
|
5422
|
+
this.dragMouseDownHandler = (a) => {
|
5423
|
+
this.dragStart = a, this.dragStartData = s(a), window.addEventListener("mousemove", l), window.addEventListener("mouseup", o);
|
5229
5424
|
}, this.dragElement.addEventListener("mousedown", this.dragMouseDownHandler);
|
5230
5425
|
}
|
5231
5426
|
/**
|
@@ -5270,18 +5465,18 @@ class De extends se {
|
|
5270
5465
|
}
|
5271
5466
|
//#endregion
|
5272
5467
|
}
|
5273
|
-
class
|
5468
|
+
class is extends se {
|
5274
5469
|
constructor() {
|
5275
5470
|
super(...arguments);
|
5276
5471
|
n(this, "events", {});
|
5277
5472
|
/**
|
5278
5473
|
* 注册事件
|
5279
5474
|
*/
|
5280
|
-
n(this, "add", (e, t, r, s, l,
|
5281
|
-
let
|
5282
|
-
|
5475
|
+
n(this, "add", (e, t, r, s, l, o) => {
|
5476
|
+
let a = this.events[s];
|
5477
|
+
a || (a = function(u) {
|
5283
5478
|
r(u) && (t && t(u), l && u.preventDefault());
|
5284
|
-
}, this.events[s] =
|
5479
|
+
}, this.events[s] = a), e.addEventListener(o, a);
|
5285
5480
|
});
|
5286
5481
|
/**
|
5287
5482
|
* 移除事件
|
@@ -5336,8 +5531,8 @@ class ns extends se {
|
|
5336
5531
|
this.keydown(e, t, (l) => {
|
5337
5532
|
if (l.key != r)
|
5338
5533
|
return !1;
|
5339
|
-
let
|
5340
|
-
return this.lastKeyTime =
|
5534
|
+
let o = (/* @__PURE__ */ new Date()).getTime(), a = o - this.lastKeyTime;
|
5535
|
+
return this.lastKeyTime = o, a < 200 && this.isKeyLastUp;
|
5341
5536
|
}, "double" + r, s), this.keyup(e, () => {
|
5342
5537
|
this.isKeyLastUp = !0;
|
5343
5538
|
}, (l) => l.key == r ? !0 : (this.isKeyLastUp = !1, !1), "double" + r + ".keyup");
|
@@ -5393,7 +5588,7 @@ class ns extends se {
|
|
5393
5588
|
clearTimeout(this.timer);
|
5394
5589
|
}
|
5395
5590
|
}
|
5396
|
-
class
|
5591
|
+
class os extends se {
|
5397
5592
|
/**
|
5398
5593
|
* 对比数据变动
|
5399
5594
|
*/
|
@@ -5440,7 +5635,7 @@ class as extends se {
|
|
5440
5635
|
}
|
5441
5636
|
}
|
5442
5637
|
}
|
5443
|
-
class
|
5638
|
+
class us extends se {
|
5444
5639
|
constructor() {
|
5445
5640
|
super(...arguments);
|
5446
5641
|
//#region 属性
|
@@ -5541,14 +5736,14 @@ const ne = class ne extends se {
|
|
5541
5736
|
s == null && (s = [], ne.opened[e] = s);
|
5542
5737
|
let l = await y.provider.getDefaultAsync(e);
|
5543
5738
|
this.key = t;
|
5544
|
-
let
|
5545
|
-
if (
|
5739
|
+
let o = await l.getAsync(e, this.key);
|
5740
|
+
if (o == null) {
|
5546
5741
|
let u = (await l.getKeysAsync(e)).filter((p) => isNaN(p) && !s.includes(p));
|
5547
|
-
u.length > 0 && (this.oldKey = u[0],
|
5742
|
+
u.length > 0 && (this.oldKey = u[0], o = await l.replaceEntityAsync(e, this.oldKey, this.key));
|
5548
5743
|
}
|
5549
|
-
return s.includes(this.key) || s.push(this.key),
|
5744
|
+
return s.includes(this.key) || s.push(this.key), o != null && d.object.mergeTo(r, o), W(() => JSON.stringify(r), (a, u) => {
|
5550
5745
|
l != null && this.task.debounce(async () => {
|
5551
|
-
let p = JSON.parse(
|
5746
|
+
let p = JSON.parse(a), h = JSON.parse(u);
|
5552
5747
|
this.form = p, await this.saveAsync(p), this.handler != null && await this.handler(p, h);
|
5553
5748
|
}, 500);
|
5554
5749
|
}, { deep: !0 }), this.provider = l, l;
|
@@ -5577,15 +5772,15 @@ const ne = class ne extends se {
|
|
5577
5772
|
let t = ne.opened[this.kind], r = t.indexOf(this.key);
|
5578
5773
|
if (t.splice(r, 1), this.oldKey != null) {
|
5579
5774
|
let s = `/config/delete?kind=${this.kind}&type=${this.oldKey}`;
|
5580
|
-
await
|
5775
|
+
await _.post(s);
|
5581
5776
|
}
|
5582
5777
|
if (e == !0) {
|
5583
5778
|
await this.provider.deleteAsync(this.kind, this.key);
|
5584
5779
|
let s = `/config/delete?kind=${this.kind}&type=${this.key}`;
|
5585
|
-
await
|
5780
|
+
await _.post(s);
|
5586
5781
|
} else if (this.form != null) {
|
5587
5782
|
let s = `/config/save?kind=${this.kind}&type=${this.key}`;
|
5588
|
-
await
|
5783
|
+
await _.post(s, this.form);
|
5589
5784
|
}
|
5590
5785
|
}
|
5591
5786
|
//#endregion
|
@@ -5596,8 +5791,8 @@ const ne = class ne extends se {
|
|
5596
5791
|
* 使用静态对象记录各自工具类开启的窗口,保证同一个kind工具类,被窗口多开时,能够杜绝异步方法导致的变量不一致问题
|
5597
5792
|
*/
|
5598
5793
|
n(ne, "opened", {});
|
5599
|
-
let
|
5600
|
-
class
|
5794
|
+
let Se = ne;
|
5795
|
+
class cs extends se {
|
5601
5796
|
/**
|
5602
5797
|
* 初始化
|
5603
5798
|
*/
|
@@ -5605,61 +5800,69 @@ class us extends se {
|
|
5605
5800
|
super();
|
5606
5801
|
}
|
5607
5802
|
}
|
5608
|
-
class
|
5803
|
+
class ds extends D {
|
5804
|
+
constructor() {
|
5805
|
+
super(...arguments);
|
5806
|
+
n(this, "type", "Utility");
|
5807
|
+
}
|
5609
5808
|
/**
|
5610
5809
|
* 创建固定工具
|
5611
5810
|
*/
|
5612
|
-
affix(
|
5613
|
-
return new
|
5811
|
+
affix(e, t) {
|
5812
|
+
return new cs(e, t);
|
5614
5813
|
}
|
5615
5814
|
/**
|
5616
5815
|
* 创建对比工具
|
5617
5816
|
*/
|
5618
5817
|
delta() {
|
5619
|
-
return new
|
5818
|
+
return new os();
|
5620
5819
|
}
|
5621
5820
|
/**
|
5622
5821
|
* 创建事件工具
|
5623
5822
|
*/
|
5624
5823
|
event() {
|
5625
|
-
return new
|
5824
|
+
return new $e();
|
5626
5825
|
}
|
5627
5826
|
/**
|
5628
5827
|
* 创建键盘工具
|
5629
5828
|
*/
|
5630
5829
|
keyboard() {
|
5631
|
-
return new
|
5830
|
+
return new is();
|
5632
5831
|
}
|
5633
5832
|
/**
|
5634
5833
|
* 创建鼠标工具
|
5635
5834
|
*/
|
5636
|
-
mouse(
|
5637
|
-
return new as(
|
5835
|
+
mouse(e, t = null) {
|
5836
|
+
return new as(e, t);
|
5638
5837
|
}
|
5639
5838
|
/**
|
5640
5839
|
* 创建随机工具
|
5641
5840
|
*/
|
5642
5841
|
random() {
|
5643
|
-
return new
|
5842
|
+
return new us();
|
5644
5843
|
}
|
5645
5844
|
/**
|
5646
5845
|
* 创建保存工具
|
5647
5846
|
*/
|
5648
5847
|
save() {
|
5649
|
-
return new
|
5848
|
+
return new Se();
|
5650
5849
|
}
|
5651
5850
|
}
|
5652
|
-
class
|
5851
|
+
class $l extends D {
|
5852
|
+
constructor() {
|
5853
|
+
super(...arguments);
|
5854
|
+
n(this, "type", "Video");
|
5855
|
+
}
|
5653
5856
|
open() {
|
5654
|
-
super.open()
|
5857
|
+
super.open();
|
5655
5858
|
}
|
5656
5859
|
}
|
5657
|
-
class
|
5860
|
+
class nt {
|
5658
5861
|
constructor() {
|
5659
5862
|
n(this, "type");
|
5660
5863
|
}
|
5661
5864
|
}
|
5662
|
-
class
|
5865
|
+
class ps extends nt {
|
5663
5866
|
constructor() {
|
5664
5867
|
super(...arguments);
|
5665
5868
|
n(this, "type", "Tencent");
|
@@ -5680,7 +5883,7 @@ class ds extends rt {
|
|
5680
5883
|
startRecord() {
|
5681
5884
|
}
|
5682
5885
|
}
|
5683
|
-
class
|
5886
|
+
class hs extends nt {
|
5684
5887
|
constructor() {
|
5685
5888
|
super(...arguments);
|
5686
5889
|
n(this, "type", "Default");
|
@@ -5694,19 +5897,26 @@ class ps extends rt {
|
|
5694
5897
|
return "";
|
5695
5898
|
}
|
5696
5899
|
}
|
5697
|
-
class
|
5900
|
+
class jl extends D {
|
5901
|
+
constructor() {
|
5902
|
+
super(...arguments);
|
5903
|
+
n(this, "type", "Voice");
|
5904
|
+
}
|
5698
5905
|
open() {
|
5699
|
-
super.open(), super.
|
5906
|
+
super.open(), super.register({
|
5907
|
+
Default: hs,
|
5908
|
+
Tencent: ps
|
5909
|
+
});
|
5700
5910
|
}
|
5701
5911
|
}
|
5702
|
-
let
|
5912
|
+
let gs = {}, le = {}, _ = {}, Me = {}, it = {}, je = {}, fs = {}, ie = {}, ys = async (c) => {
|
5703
5913
|
let e = await (await y.provider.getDefaultAsync("sys")).getAsync("sys", "app");
|
5704
|
-
(e == null ? void 0 : e.cdn) != null && (c.cdn = e.cdn), le = await y.cdn.createWithCacheAsync(c.cdn),
|
5914
|
+
(e == null ? void 0 : e.cdn) != null && (c.cdn = e.cdn), le = await y.cdn.createWithCacheAsync(c.cdn), gs = await y.encoder.getBase64(), _ = y.http.halo, je = y.socket.default, Me = await y.i18n.createWithCacheAsync("Default", async (t) => {
|
5705
5915
|
let r = (e == null ? void 0 : e.language) ?? d.browser.getLanguage(), s = d.json.serialize({ lang: r });
|
5706
|
-
await t.openAsync(s), fe = t.t,
|
5707
|
-
}),
|
5708
|
-
}, fe = {},
|
5709
|
-
class
|
5916
|
+
await t.openAsync(s), fe = t.t, ms = t.t_exists, vs = t.t_sys, bs = t.t_enum, ws = t.t_field, ks = t.t_field_choose_placeholder, xs = t.t_field_placeholder, As = t.t_table, Ss = t.t_module, _s = t.t_menu;
|
5917
|
+
}), Me.addMessages(c.lang), it = await y.hasher.getMd5(), fs = y.template.create("Liquid"), c.messenger == null ? ie = await y.messenger.getConsole() : ie = c.messenger;
|
5918
|
+
}, fe = {}, ms = {}, vs = {}, bs = {}, ws = {}, ks = {}, xs = {}, As = {}, Ss = {}, _s = {};
|
5919
|
+
class Cs {
|
5710
5920
|
constructor() {
|
5711
5921
|
/**
|
5712
5922
|
* 消息发送对象
|
@@ -5730,10 +5940,10 @@ class _s {
|
|
5730
5940
|
n(this, "cdn", "Local");
|
5731
5941
|
}
|
5732
5942
|
}
|
5733
|
-
const
|
5943
|
+
const Ts = { class: "ha-empty" }, Es = { class: "empty-message" }, $s = {
|
5734
5944
|
key: 0,
|
5735
5945
|
class: "empty-content"
|
5736
|
-
},
|
5946
|
+
}, Dl = /* @__PURE__ */ B({
|
5737
5947
|
__name: "Empty",
|
5738
5948
|
props: {
|
5739
5949
|
message: { type: String, default: "暂无数据" },
|
@@ -5741,54 +5951,54 @@ const Cs = { class: "ha-empty" }, Ts = { class: "empty-message" }, Es = {
|
|
5741
5951
|
},
|
5742
5952
|
setup(c) {
|
5743
5953
|
let i = c, { message: e, hasData: t } = z(i);
|
5744
|
-
return (r, s) => (
|
5745
|
-
|
5746
|
-
f(t) ? (
|
5747
|
-
|
5954
|
+
return (r, s) => (C(), T("div", Ts, [
|
5955
|
+
S("div", Es, N(f(e)), 1),
|
5956
|
+
f(t) ? (C(), T("div", $s, [
|
5957
|
+
Q(r.$slots, "default")
|
5748
5958
|
])) : ye("", !0)
|
5749
5959
|
]));
|
5750
5960
|
}
|
5751
|
-
}),
|
5961
|
+
}), js = /* @__PURE__ */ B({
|
5752
5962
|
__name: "Fill",
|
5753
5963
|
emits: ["resize"],
|
5754
5964
|
setup(c, { emit: i }) {
|
5755
|
-
let e = i, t =
|
5965
|
+
let e = i, t = H(), r = H(), s = H(), l = new $e(), o = () => {
|
5756
5966
|
let p = d.dom.siblings(t.value);
|
5757
5967
|
s.value = d.dom.getHeight(p);
|
5758
|
-
},
|
5968
|
+
}, a = () => {
|
5759
5969
|
r.value = d.dom.getHeight(t.value), e("resize", r.value);
|
5760
5970
|
}, u = () => {
|
5761
|
-
|
5971
|
+
a();
|
5762
5972
|
};
|
5763
5973
|
return oe(() => {
|
5764
|
-
|
5765
|
-
}),
|
5974
|
+
o(), a(), l.resize(t.value, u);
|
5975
|
+
}), ae(() => {
|
5766
5976
|
l.dispose();
|
5767
|
-
}), (p, h) => (
|
5977
|
+
}), (p, h) => (C(), T("div", {
|
5768
5978
|
class: "ha-fill",
|
5769
5979
|
ref_key: "fillRef",
|
5770
5980
|
ref: t,
|
5771
|
-
style:
|
5981
|
+
style: ee({ height: `calc(100% - ${f(s)}px)` })
|
5772
5982
|
}, [
|
5773
|
-
|
5983
|
+
Q(p.$slots, "default")
|
5774
5984
|
], 4));
|
5775
5985
|
}
|
5776
|
-
}),
|
5986
|
+
}), Ds = /* @__PURE__ */ B({
|
5777
5987
|
__name: "Scroller",
|
5778
5988
|
props: {
|
5779
5989
|
options: {}
|
5780
5990
|
},
|
5781
5991
|
emits: ["scroll"],
|
5782
5992
|
setup(c, { expose: i, emit: e }) {
|
5783
|
-
let t = e, r = c, { options: s } = z(r), l =
|
5993
|
+
let t = e, r = c, { options: s } = z(r), l = H(), o = H(), a = H(), u = H(), p = H(!1), h = null, g = null, m = new $e(), k = H({ top: null, height: null }), O = (b) => {
|
5784
5994
|
if (g == 0)
|
5785
5995
|
return 0;
|
5786
5996
|
let w = g - h;
|
5787
5997
|
return b / w;
|
5788
|
-
},
|
5789
|
-
let w = h -
|
5998
|
+
}, P = (b) => {
|
5999
|
+
let w = h - k.value.height;
|
5790
6000
|
return b / w;
|
5791
|
-
},
|
6001
|
+
}, X = () => {
|
5792
6002
|
if (g == 0)
|
5793
6003
|
return 80;
|
5794
6004
|
let b = h / g;
|
@@ -5796,97 +6006,97 @@ const Cs = { class: "ha-empty" }, Ts = { class: "empty-message" }, Es = {
|
|
5796
6006
|
return 0;
|
5797
6007
|
let w = h * b;
|
5798
6008
|
return d.math.between(w, 80, 500);
|
5799
|
-
},
|
5800
|
-
let
|
5801
|
-
return d.math.between(
|
5802
|
-
},
|
5803
|
-
let w =
|
5804
|
-
return { top:
|
5805
|
-
},
|
6009
|
+
}, Y = (b, w) => {
|
6010
|
+
let E = O(b), q = (h - w) * E;
|
6011
|
+
return d.math.between(q, 0, h - w);
|
6012
|
+
}, $ = (b) => {
|
6013
|
+
let w = X();
|
6014
|
+
return { top: Y(b, w), height: w };
|
6015
|
+
}, F = (b) => {
|
5806
6016
|
}, A = (b) => {
|
5807
|
-
let w =
|
6017
|
+
let w = O(b);
|
5808
6018
|
R(w);
|
5809
6019
|
}, R = (b) => {
|
5810
|
-
let w = d.math.between(b, 0, 1),
|
5811
|
-
|
6020
|
+
let w = d.math.between(b, 0, 1), E = h - k.value.height;
|
6021
|
+
k.value.top = E * w;
|
5812
6022
|
let V = (g - h) * w;
|
5813
|
-
s.value.scrollTop = V,
|
6023
|
+
s.value.scrollTop = V, o.value.scrollTop != V && (o.value.scrollTop = V);
|
5814
6024
|
}, J = (b) => {
|
5815
|
-
let w = b.target,
|
5816
|
-
R(
|
6025
|
+
let w = b.target, E = O(w.scrollTop);
|
6026
|
+
R(E), t("scroll", w);
|
5817
6027
|
}, v = () => {
|
5818
6028
|
let b = s.value.scrollTop;
|
5819
|
-
|
5820
|
-
},
|
5821
|
-
h = d.dom.getHeight(
|
5822
|
-
let w =
|
5823
|
-
|
5824
|
-
},
|
6029
|
+
k.value = $(b), A(b);
|
6030
|
+
}, x = (b) => {
|
6031
|
+
h = d.dom.getHeight(o.value), g = o.value.scrollHeight;
|
6032
|
+
let w = X();
|
6033
|
+
k.value.height = w, k.value.top = Y(s.value.scrollTop, w);
|
6034
|
+
}, j = (b) => {
|
5825
6035
|
let w = b.target;
|
5826
6036
|
return parseInt(w.style.top);
|
5827
|
-
},
|
5828
|
-
let V = b.y - w.y, pe =
|
6037
|
+
}, M = (b, w, E, q) => {
|
6038
|
+
let V = b.y - w.y, pe = E + V, G = P(pe);
|
5829
6039
|
R(G);
|
5830
6040
|
}, I = (b) => {
|
5831
6041
|
p.value = !0;
|
5832
|
-
},
|
6042
|
+
}, L = (b) => {
|
5833
6043
|
p.value = !1;
|
5834
6044
|
};
|
5835
6045
|
return oe(() => {
|
5836
|
-
v(), m.scroll(
|
5837
|
-
}),
|
6046
|
+
v(), m.scroll(o.value, J), m.drag(u.value, { init: j, handler: M }), m.observe(o.value, x), m.mouseDown(u.value, I, L);
|
6047
|
+
}), ae(() => {
|
5838
6048
|
m.dispose();
|
5839
|
-
}),
|
5840
|
-
let
|
5841
|
-
R(
|
5842
|
-
}), i({ scrollTo: A, update: v }), (b, w) => (
|
6049
|
+
}), W(() => s.value.scrollTop, (b, w) => {
|
6050
|
+
let E = O(b);
|
6051
|
+
R(E);
|
6052
|
+
}), i({ scrollTo: A, update: v }), (b, w) => (C(), T("div", {
|
5843
6053
|
ref_key: "scrollerRef",
|
5844
6054
|
ref: l,
|
5845
6055
|
class: ce(["ha-scroller", { hover: f(p) }])
|
5846
6056
|
}, [
|
5847
|
-
|
6057
|
+
S("div", {
|
5848
6058
|
ref_key: "containerRef",
|
5849
|
-
ref:
|
6059
|
+
ref: o,
|
5850
6060
|
class: "scroller-container"
|
5851
6061
|
}, [
|
5852
|
-
|
6062
|
+
Q(b.$slots, "default")
|
5853
6063
|
], 512),
|
5854
|
-
|
6064
|
+
S("div", {
|
5855
6065
|
ref_key: "trackRef",
|
5856
|
-
ref:
|
6066
|
+
ref: a,
|
5857
6067
|
class: "scroller-track",
|
5858
6068
|
onClick: w[0] || (w[0] = //@ts-ignore
|
5859
|
-
(...
|
6069
|
+
(...E) => f(F) && f(F)(...E))
|
5860
6070
|
}, [
|
5861
|
-
|
6071
|
+
S("div", {
|
5862
6072
|
ref_key: "thumbRef",
|
5863
6073
|
ref: u,
|
5864
6074
|
class: "scroller-thumb",
|
5865
|
-
style:
|
5866
|
-
},
|
6075
|
+
style: ee({ top: `${f(k).top}px`, height: `${f(k).height}px` })
|
6076
|
+
}, N(f(s).scrollTop), 5)
|
5867
6077
|
], 512)
|
5868
6078
|
], 2));
|
5869
6079
|
}
|
5870
|
-
}),
|
6080
|
+
}), Hl = /* @__PURE__ */ B({
|
5871
6081
|
__name: "Timer",
|
5872
6082
|
emits: ["change"],
|
5873
6083
|
setup(c, { expose: i, emit: e }) {
|
5874
|
-
let t = e, r = -8 * 60 * 60 * 1e3, s =
|
6084
|
+
let t = e, r = -8 * 60 * 60 * 1e3, s = H(r), l = null, o = 5, a = () => {
|
5875
6085
|
l == null && (l = setInterval(() => {
|
5876
|
-
s.value +=
|
5877
|
-
},
|
6086
|
+
s.value += o, t("change", s.value);
|
6087
|
+
}, o));
|
5878
6088
|
}, u = () => {
|
5879
|
-
h(),
|
6089
|
+
h(), a();
|
5880
6090
|
}, p = () => {
|
5881
6091
|
clearInterval(l), l = null;
|
5882
6092
|
}, h = () => {
|
5883
6093
|
clearInterval(l), s.value = r;
|
5884
6094
|
};
|
5885
|
-
return
|
6095
|
+
return ae(() => {
|
5886
6096
|
clearInterval(l);
|
5887
|
-
}), i({ restart: u, start:
|
5888
|
-
|
5889
|
-
|
6097
|
+
}), i({ restart: u, start: a, stop: p, reset: h }), (g, m) => (C(), T("span", null, [
|
6098
|
+
Q(g.$slots, "default"),
|
6099
|
+
Pe(N(f(d).time.format(f(s), "HH:mm:ss SSS")), 1)
|
5890
6100
|
]));
|
5891
6101
|
}
|
5892
6102
|
}), de = (c, i) => {
|
@@ -5894,13 +6104,13 @@ const Cs = { class: "ha-empty" }, Ts = { class: "empty-message" }, Es = {
|
|
5894
6104
|
for (const [t, r] of i)
|
5895
6105
|
e[t] = r;
|
5896
6106
|
return e;
|
5897
|
-
},
|
5898
|
-
function
|
5899
|
-
return
|
5900
|
-
|
6107
|
+
}, Hs = {}, Us = { class: "ha-card" };
|
6108
|
+
function Os(c, i) {
|
6109
|
+
return C(), T("div", Us, [
|
6110
|
+
Q(c.$slots, "default")
|
5901
6111
|
]);
|
5902
6112
|
}
|
5903
|
-
const
|
6113
|
+
const Be = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ B({
|
5904
6114
|
__name: "Code",
|
5905
6115
|
props: {
|
5906
6116
|
options: { default: {} },
|
@@ -5909,77 +6119,77 @@ const we = /* @__PURE__ */ de(Ds, [["render", Us]]), $l = /* @__PURE__ */ F({
|
|
5909
6119
|
},
|
5910
6120
|
emits: ["mounted", "change", "scroll", "update:modelValue"],
|
5911
6121
|
setup(c, { expose: i, emit: e }) {
|
5912
|
-
let t = e, r = c, { options: s, border: l, modelValue:
|
6122
|
+
let t = e, r = c, { options: s, border: l, modelValue: o } = z(r), a = null, u = null, p = null, h = { completion: null, hover: null }, g = H(), { app: m } = Z.sys, k = (v, x) => {
|
5913
6123
|
h.completion != null && h.completion.dispose();
|
5914
|
-
let
|
5915
|
-
h.completion =
|
5916
|
-
},
|
5917
|
-
provideCompletionItems: (
|
5918
|
-
let
|
5919
|
-
for (let
|
5920
|
-
let
|
5921
|
-
label:
|
5922
|
-
kind:
|
5923
|
-
insertText:
|
5924
|
-
detail:
|
6124
|
+
let j = d.array.distinct(x, (M) => M);
|
6125
|
+
h.completion = O(v, j);
|
6126
|
+
}, O = (v, x) => v == null || a == null ? null : a.languages.registerCompletionItemProvider(v, {
|
6127
|
+
provideCompletionItems: (M, I) => {
|
6128
|
+
let L = M.getWordUntilPosition(I), b = new a.Range(I.lineNumber, L.startColumn, I.lineNumber, L.endColumn), w = [];
|
6129
|
+
for (let E = 0; E < x.length; E++) {
|
6130
|
+
let q = x[E], V = {
|
6131
|
+
label: q,
|
6132
|
+
kind: a.languages.CompletionItemKind.Keyword,
|
6133
|
+
insertText: q,
|
6134
|
+
detail: q,
|
5925
6135
|
range: b
|
5926
6136
|
};
|
5927
6137
|
w.push(V);
|
5928
6138
|
}
|
5929
6139
|
return { suggestions: w };
|
5930
6140
|
}
|
5931
|
-
}),
|
5932
|
-
let
|
5933
|
-
if (
|
6141
|
+
}), P = async (v) => {
|
6142
|
+
let x = Z.editor.intelli;
|
6143
|
+
if (x[v] != null)
|
5934
6144
|
return;
|
5935
|
-
let
|
5936
|
-
if (
|
6145
|
+
let j = a.languages.getLanguages().find((L) => L.id == v);
|
6146
|
+
if (j == null)
|
5937
6147
|
return;
|
5938
|
-
let
|
5939
|
-
if (
|
6148
|
+
let M = j.loader;
|
6149
|
+
if (M == null)
|
5940
6150
|
return;
|
5941
|
-
let I = await
|
5942
|
-
|
5943
|
-
},
|
5944
|
-
const
|
5945
|
-
return
|
5946
|
-
provideCompletionItems: (I,
|
5947
|
-
let b = I.getWordUntilPosition(
|
5948
|
-
for (let
|
5949
|
-
let V =
|
6151
|
+
let I = await M();
|
6152
|
+
x[v] || (X(v, I), Y(v, I), x[v] = !0);
|
6153
|
+
}, X = (v, x) => {
|
6154
|
+
const j = ["builtinFunctions", "keywords", "operators"];
|
6155
|
+
return a.languages.registerCompletionItemProvider(v, {
|
6156
|
+
provideCompletionItems: (I, L) => {
|
6157
|
+
let b = I.getWordUntilPosition(L), w = new a.Range(L.lineNumber, b.startColumn, L.lineNumber, b.endColumn), E = [];
|
6158
|
+
for (let q of j) {
|
6159
|
+
let V = x.language[q];
|
5950
6160
|
if (V == null)
|
5951
6161
|
continue;
|
5952
|
-
let pe =
|
5953
|
-
|
5954
|
-
for (let
|
5955
|
-
let
|
5956
|
-
label:
|
5957
|
-
documentation:
|
6162
|
+
let pe = $(q), G, he;
|
6163
|
+
q == "keywords" ? (G = a.languages.CompletionItemKind.Keyword, he = " ") : q == "operators" ? (G = a.languages.CompletionItemKind.Operator, he = " ") : (G = a.languages.CompletionItemKind.Function, he = "()");
|
6164
|
+
for (let De of V) {
|
6165
|
+
let He = De.toLowerCase(), ot = {
|
6166
|
+
label: He,
|
6167
|
+
documentation: De,
|
5958
6168
|
range: w,
|
5959
6169
|
kind: G,
|
5960
|
-
insertText:
|
6170
|
+
insertText: He + he,
|
5961
6171
|
detail: pe
|
5962
6172
|
};
|
5963
|
-
|
6173
|
+
E.push(ot);
|
5964
6174
|
}
|
5965
6175
|
}
|
5966
|
-
return { suggestions:
|
6176
|
+
return { suggestions: E };
|
5967
6177
|
}
|
5968
6178
|
});
|
5969
|
-
},
|
5970
|
-
const
|
5971
|
-
return
|
5972
|
-
provideHover: (I,
|
5973
|
-
let b = I.getWordAtPosition(
|
6179
|
+
}, Y = (v, x) => {
|
6180
|
+
const j = ["builtinFunctions", "keywords", "operators"];
|
6181
|
+
return a.languages.registerHoverProvider(v, {
|
6182
|
+
provideHover: (I, L) => {
|
6183
|
+
let b = I.getWordAtPosition(L);
|
5974
6184
|
if (!b)
|
5975
6185
|
return null;
|
5976
|
-
for (let w of
|
5977
|
-
let
|
5978
|
-
if (
|
6186
|
+
for (let w of j) {
|
6187
|
+
let E = x.language[w];
|
6188
|
+
if (E == null || E.find((G) => G == b.word.toUpperCase()) == null)
|
5979
6189
|
continue;
|
5980
|
-
let V =
|
6190
|
+
let V = $(w);
|
5981
6191
|
return {
|
5982
|
-
range: new
|
6192
|
+
range: new a.Range(L.lineNumber, L.lineNumber, b.startColumn, b.endColumn),
|
5983
6193
|
contents: [
|
5984
6194
|
{ value: "**" + b.word + "**" },
|
5985
6195
|
{ value: V }
|
@@ -5989,15 +6199,15 @@ const we = /* @__PURE__ */ de(Ds, [["render", Us]]), $l = /* @__PURE__ */ F({
|
|
5989
6199
|
return null;
|
5990
6200
|
}
|
5991
6201
|
});
|
5992
|
-
},
|
5993
|
-
let
|
5994
|
-
return v == "keywords" ?
|
5995
|
-
},
|
6202
|
+
}, $ = (v) => {
|
6203
|
+
let x;
|
6204
|
+
return v == "keywords" ? x = "关键词" : v == "operators" ? x = "操作符" : x = "函数", x;
|
6205
|
+
}, F = (v) => v == "default" ? null : "vs-dark", A = async () => {
|
5996
6206
|
if (g.value == null)
|
5997
6207
|
return;
|
5998
6208
|
let v = null;
|
5999
6209
|
s.value.schema && (v = s.value.category + "/" + d.string.getUniqueId(), Z.tryAddSchema(v, s.value.category, s.value.schema));
|
6000
|
-
let
|
6210
|
+
let x = {
|
6001
6211
|
validate: !0,
|
6002
6212
|
allowComments: !0,
|
6003
6213
|
//允许配置注释
|
@@ -6006,10 +6216,10 @@ const we = /* @__PURE__ */ de(Ds, [["render", Us]]), $l = /* @__PURE__ */ F({
|
|
6006
6216
|
trailingCommas: "ignore"
|
6007
6217
|
//允许末尾逗号
|
6008
6218
|
};
|
6009
|
-
|
6010
|
-
let
|
6011
|
-
p =
|
6012
|
-
let
|
6219
|
+
a.languages.json.jsonDefaults.setDiagnosticsOptions(x), await P(s.value.language);
|
6220
|
+
let j = v ? a.Uri.parse(v) : null;
|
6221
|
+
p = a.editor.createModel(o.value, s.value.language, j);
|
6222
|
+
let M = {
|
6013
6223
|
tabSize: 2,
|
6014
6224
|
//Tab缩进大小
|
6015
6225
|
detectIndentation: !1,
|
@@ -6020,55 +6230,55 @@ const we = /* @__PURE__ */ de(Ds, [["render", Us]]), $l = /* @__PURE__ */ F({
|
|
6020
6230
|
//默认已启用代码图
|
6021
6231
|
scrollbar: { verticalScrollbarSize: 0 },
|
6022
6232
|
//关闭最右侧垂直滚动条
|
6023
|
-
theme:
|
6233
|
+
theme: F(m.theme),
|
6024
6234
|
automaticLayout: !0,
|
6025
6235
|
//根据父元素自动布局
|
6026
6236
|
model: p
|
6027
6237
|
};
|
6028
|
-
u =
|
6238
|
+
u = a.editor.create(g.value, M), s.value.scrollTop && u.setScrollTop(s.value.scrollTop);
|
6029
6239
|
let I = s.value.selection;
|
6030
6240
|
if (I) {
|
6031
|
-
let
|
6241
|
+
let L = {
|
6032
6242
|
startLineNumber: I.startLine,
|
6033
6243
|
endLineNumber: I.endLine,
|
6034
6244
|
startColumn: I.startColumn,
|
6035
6245
|
endColumn: I.endColumn
|
6036
6246
|
};
|
6037
|
-
u.setSelection(
|
6247
|
+
u.setSelection(L);
|
6038
6248
|
}
|
6039
|
-
u.onDidScrollChange((
|
6040
|
-
s.value.scrollTop =
|
6041
|
-
}), u.onDidChangeModelContent((
|
6249
|
+
u.onDidScrollChange((L) => {
|
6250
|
+
s.value.scrollTop = L.scrollTop, t("scroll", L.scrollTop);
|
6251
|
+
}), u.onDidChangeModelContent((L) => {
|
6042
6252
|
let b = u.getValue();
|
6043
6253
|
t("update:modelValue", b), t("change", b);
|
6044
6254
|
});
|
6045
6255
|
};
|
6046
6256
|
oe(async () => {
|
6047
|
-
|
6048
|
-
}),
|
6257
|
+
a = await le.getMonaco(), await A(), t("mounted", a, u);
|
6258
|
+
}), ae(() => {
|
6049
6259
|
var v;
|
6050
6260
|
p == null || p.dispose(), u == null || u.dispose(), (v = h.completion) == null || v.dispose();
|
6051
6261
|
});
|
6052
6262
|
let R = () => {
|
6053
6263
|
u == null || u.layout();
|
6054
6264
|
}, J = () => u;
|
6055
|
-
return
|
6056
|
-
let
|
6057
|
-
|
6058
|
-
}),
|
6059
|
-
}),
|
6265
|
+
return W(() => m.theme, (v, x) => {
|
6266
|
+
let j = F(v);
|
6267
|
+
a.editor.setTheme(j);
|
6268
|
+
}), W(() => m.language, (v, x) => {
|
6269
|
+
}), W(() => o.value, (v, x) => {
|
6060
6270
|
if (!u)
|
6061
6271
|
return;
|
6062
|
-
let
|
6063
|
-
v !=
|
6064
|
-
}),
|
6272
|
+
let j = u.getValue();
|
6273
|
+
v != j && u.setValue(v ?? "");
|
6274
|
+
}), W(() => s.value.language, async (v, x) => {
|
6065
6275
|
if (!u)
|
6066
6276
|
return;
|
6067
|
-
let
|
6068
|
-
|
6069
|
-
}), i({ layout: R, getEditor: J, registerIntelli:
|
6070
|
-
default:
|
6071
|
-
|
6277
|
+
let j = u.getModel();
|
6278
|
+
a.editor.setModelLanguage(j, v), await P(v);
|
6279
|
+
}), i({ layout: R, getEditor: J, registerIntelli: k }), (v, x) => (C(), Fe(js, null, {
|
6280
|
+
default: ue(() => [
|
6281
|
+
S("div", {
|
6072
6282
|
ref_key: "editorRef",
|
6073
6283
|
ref: g,
|
6074
6284
|
class: ce(["ha-code", { border: f(l) }])
|
@@ -6077,7 +6287,7 @@ const we = /* @__PURE__ */ de(Ds, [["render", Us]]), $l = /* @__PURE__ */ F({
|
|
6077
6287
|
_: 1
|
6078
6288
|
}));
|
6079
6289
|
}
|
6080
|
-
}),
|
6290
|
+
}), Ol = /* @__PURE__ */ B({
|
6081
6291
|
__name: "Compare",
|
6082
6292
|
props: {
|
6083
6293
|
inline: { type: Boolean, default: !1 },
|
@@ -6087,128 +6297,128 @@ const we = /* @__PURE__ */ de(Ds, [["render", Us]]), $l = /* @__PURE__ */ F({
|
|
6087
6297
|
},
|
6088
6298
|
emits: ["update:modelValue", "update:original", "change"],
|
6089
6299
|
setup(c, { emit: i }) {
|
6090
|
-
let e = i, t = c, { inline: r, language: s, original: l, modelValue:
|
6091
|
-
u =
|
6300
|
+
let e = i, t = c, { inline: r, language: s, original: l, modelValue: o } = z(t), a = null, u = null, p = null, h = null, g = null, m = null, k = H(), O = H(), { app: P } = Z.sys, X = ($) => $ == "default" ? null : "vs-dark", Y = ($) => {
|
6301
|
+
u = $.editor.createModel(l.value, s.value), p = $.editor.createModel(o.value, s.value), a = $.editor.createDiffEditor(k.value, {
|
6092
6302
|
originalEditable: !0,
|
6093
6303
|
automaticLayout: !0,
|
6094
6304
|
renderSideBySide: !r.value,
|
6095
6305
|
//是否启用行内模式
|
6096
|
-
theme:
|
6097
|
-
}),
|
6306
|
+
theme: X(P.theme)
|
6307
|
+
}), a.setModel({ original: u, modified: p }), h = a.getOriginalEditor(), h.onDidChangeModelContent((F) => {
|
6098
6308
|
let A = h.getValue();
|
6099
6309
|
e("update:original", A), e("change", A);
|
6100
|
-
}), g =
|
6310
|
+
}), g = a.getModifiedEditor(), g.onDidChangeModelContent((F) => {
|
6101
6311
|
let A = g.getValue();
|
6102
6312
|
e("update:modelValue", A);
|
6103
6313
|
});
|
6104
6314
|
};
|
6105
6315
|
return oe(async () => {
|
6106
|
-
m = await le.getMonaco(),
|
6107
|
-
}),
|
6108
|
-
let A =
|
6316
|
+
m = await le.getMonaco(), Y(m);
|
6317
|
+
}), W(() => P.theme, ($, F) => {
|
6318
|
+
let A = X($);
|
6109
6319
|
m.editor.setTheme(A);
|
6110
|
-
}),
|
6111
|
-
u && m.editor.setModelLanguage(u,
|
6112
|
-
}),
|
6320
|
+
}), W(() => s.value, ($, F) => {
|
6321
|
+
u && m.editor.setModelLanguage(u, $), p && m.editor.setModelLanguage(p, $);
|
6322
|
+
}), W(() => l.value, ($, F) => {
|
6113
6323
|
if (!u)
|
6114
6324
|
return;
|
6115
6325
|
let A = u.getValue();
|
6116
|
-
|
6117
|
-
}),
|
6326
|
+
$ != A && u.setValue($ ?? "");
|
6327
|
+
}), W(() => o.value, ($, F) => {
|
6118
6328
|
if (!p)
|
6119
6329
|
return;
|
6120
6330
|
let A = p.getValue();
|
6121
|
-
|
6122
|
-
}), (
|
6331
|
+
$ != A && p.setValue($ ?? "");
|
6332
|
+
}), ($, F) => (C(), T("div", {
|
6123
6333
|
ref_key: "compareRef",
|
6124
|
-
ref:
|
6334
|
+
ref: k,
|
6125
6335
|
class: "ha-compare",
|
6126
|
-
style:
|
6336
|
+
style: ee(f(O))
|
6127
6337
|
}, null, 4));
|
6128
6338
|
}
|
6129
|
-
}),
|
6130
|
-
function
|
6131
|
-
return
|
6132
|
-
|
6339
|
+
}), Ls = {}, Rs = { class: "ha-input" };
|
6340
|
+
function Is(c, i) {
|
6341
|
+
return C(), T("div", Rs, i[0] || (i[0] = [
|
6342
|
+
S("input", { type: "text" }, null, -1)
|
6133
6343
|
]));
|
6134
6344
|
}
|
6135
|
-
const
|
6136
|
-
function
|
6137
|
-
return
|
6345
|
+
const Ll = /* @__PURE__ */ de(Ls, [["render", Is]]), Ms = {}, Bs = { class: "ha-option" };
|
6346
|
+
function Ps(c, i) {
|
6347
|
+
return C(), T("div", Bs, "选项");
|
6138
6348
|
}
|
6139
|
-
const
|
6349
|
+
const Fs = /* @__PURE__ */ de(Ms, [["render", Ps]]), Ns = { class: "ha-rich-text" }, Rl = /* @__PURE__ */ B({
|
6140
6350
|
__name: "RichText",
|
6141
|
-
props: /* @__PURE__ */
|
6351
|
+
props: /* @__PURE__ */ Ue({
|
6142
6352
|
options: {}
|
6143
6353
|
}, {
|
6144
6354
|
modelValue: {},
|
6145
6355
|
modelModifiers: {}
|
6146
6356
|
}),
|
6147
|
-
emits: /* @__PURE__ */
|
6357
|
+
emits: /* @__PURE__ */ Ue(["change", "scroll"], ["update:modelValue"]),
|
6148
6358
|
setup(c, { expose: i, emit: e }) {
|
6149
|
-
let t = e, r = c, { options: s } = z(r), l =
|
6150
|
-
let R = d.time.getDateString(), J = getSelection(), v = J.getRangeAt(0),
|
6151
|
-
if (
|
6152
|
-
|
6359
|
+
let t = e, r = c, { options: s } = z(r), l = Ne(c, "modelValue"), o, a = null, u = null, p = !1, h = !1, g = H(), m = H(), k = H(), O = H(!1), P = H({ style: null, options: { scrollTop: 0 } }), X = (A) => {
|
6360
|
+
let R = d.time.getDateString(), J = getSelection(), v = J.getRangeAt(0), x = v.startContainer;
|
6361
|
+
if (x.nodeName == "#text")
|
6362
|
+
x.insertData(v.startOffset, R), v.setStart(x, v.startOffset + R.length), J.removeAllRanges(), J.addRange(v);
|
6153
6363
|
else {
|
6154
|
-
let
|
6155
|
-
|
6156
|
-
let
|
6157
|
-
|
6364
|
+
let j = document.createTextNode(R);
|
6365
|
+
x.appendChild(j);
|
6366
|
+
let M = document.createRange();
|
6367
|
+
M.selectNodeContents(j), M.setStart(j, M.startOffset + R.length), J.removeAllRanges(), J.addRange(M);
|
6158
6368
|
}
|
6159
|
-
},
|
6160
|
-
if (
|
6369
|
+
}, Y = (A) => {
|
6370
|
+
if (a.scrollTop = A.scrollTop, p || h) {
|
6161
6371
|
p = !1, h = !1;
|
6162
6372
|
return;
|
6163
6373
|
}
|
6164
6374
|
u = A, t("scroll", A);
|
6165
|
-
},
|
6375
|
+
}, $ = () => `height: calc(100% - ${d.dom.getHeight(m.value)}px)`, F = async () => {
|
6166
6376
|
let A = await le.getQuill();
|
6167
|
-
|
6377
|
+
o = new A(g.value, {
|
6168
6378
|
modules: {
|
6169
6379
|
toolbar: {
|
6170
6380
|
container: m.value,
|
6171
|
-
handlers: { date:
|
6381
|
+
handlers: { date: X }
|
6172
6382
|
}
|
6173
6383
|
},
|
6174
6384
|
theme: "snow"
|
6175
|
-
}),
|
6176
|
-
|
6177
|
-
}), s.value.readonly &&
|
6178
|
-
|
6179
|
-
}),
|
6385
|
+
}), O.value = !0, Oe(() => {
|
6386
|
+
P.value.style = $();
|
6387
|
+
}), s.value.readonly && o.disable(), a = g.value.querySelector(".ql-editor"), a.innerHTML = l.value, P.value.options.scrollTop = s.value.scrollTop, o.on("text-change", (R, J, v) => {
|
6388
|
+
a.innerHTML != l.value && (p = !0, l.value = a.innerHTML);
|
6389
|
+
}), a.addEventListener("paste", (R) => {
|
6180
6390
|
h = !0;
|
6181
6391
|
});
|
6182
6392
|
};
|
6183
6393
|
return oe(() => {
|
6184
|
-
|
6185
|
-
}),
|
6186
|
-
|
6187
|
-
}),
|
6188
|
-
|
6189
|
-
}),
|
6190
|
-
A != null && (u == null ? void 0 : u.scrollTop) != A &&
|
6191
|
-
|
6394
|
+
F();
|
6395
|
+
}), ae(() => {
|
6396
|
+
o = null;
|
6397
|
+
}), W(() => l.value, (A, R) => {
|
6398
|
+
a && a.innerHTML != A && (a.innerHTML = A);
|
6399
|
+
}), W(() => s.value.scrollTop, (A, R) => {
|
6400
|
+
A != null && (u == null ? void 0 : u.scrollTop) != A && Oe(() => {
|
6401
|
+
P.value.options.scrollTop = A;
|
6192
6402
|
});
|
6193
|
-
}), i({}), (A, R) => (
|
6194
|
-
|
6403
|
+
}), i({}), (A, R) => (C(), T("div", Ns, [
|
6404
|
+
dt(S("div", {
|
6195
6405
|
ref_key: "toolbarRef",
|
6196
6406
|
ref: m
|
6197
6407
|
}, R[0] || (R[0] = [
|
6198
|
-
|
6408
|
+
pt('<div class="ql-formats"><button class="ql-bold" data-toggle="tooltip" data-placement="bottom" title="Bold"></button><button class="ql-italic" data-toggle="tooltip" data-placement="bottom" title="Italic <ctrl+i>"></button><button class="ql-date" data-toggle="tooltip" data-placement="bottom" title="Date"></button><button class="ql-underline" data-toggle="tooltip" data-placement="bottom" title="Underline"></button><button class="ql-strike" data-toggle="tooltip" data-placement="bottom" title="Strike"></button></div><div class="ql-formats"><button class="ql-list" data-toggle="tooltip" data-placement="bottom" value="ordered"></button><button class="ql-list" data-toggle="tooltip" data-placement="bottom" value="bullet"></button><select class="ql-color"><option selected></option><option value="#e60000"></option><option value="#ff9900"></option><option value="#ffff00"></option><option value="#008a00"></option><option value="#0066cc"></option><option value="#9933ff"></option><option value="#ffffff"></option><option value="#facccc"></option><option value="#ffebcc"></option><option value="#ffffcc"></option><option value="#cce8cc"></option><option value="#cce0f5"></option><option value="#ebd6ff"></option><option value="#bbbbbb"></option><option value="#f06666"></option><option value="#ffc266"></option><option value="#ffff66"></option><option value="#66b966"></option><option value="#66a3e0"></option><option value="#c285ff"></option><option value="#888888"></option><option value="#a10000"></option><option value="#b26b00"></option><option value="#b2b200"></option><option value="#006100"></option><option value="#0047b2"></option><option value="#6b24b2"></option><option value="#444444"></option><option value="#5c0000"></option><option value="#663d00"></option><option value="#666600"></option><option value="#003700"></option><option value="#002966"></option><option value="#3d1466"></option></select><select class="ql-background"><option selected></option><option value="#e60000"></option><option value="#ff9900"></option><option value="#ffff00"></option><option value="#008a00"></option><option value="#0066cc"></option><option value="#9933ff"></option><option value="#ffffff"></option><option value="#facccc"></option><option value="#ffebcc"></option><option value="#ffffcc"></option><option value="#cce8cc"></option><option value="#cce0f5"></option><option value="#ebd6ff"></option><option value="#bbbbbb"></option><option value="#f06666"></option><option value="#ffc266"></option><option value="#ffff66"></option><option value="#66b966"></option><option value="#66a3e0"></option><option value="#c285ff"></option><option value="#888888"></option><option value="#a10000"></option><option value="#b26b00"></option><option value="#b2b200"></option><option value="#006100"></option><option value="#0047b2"></option><option value="#6b24b2"></option><option value="#444444"></option><option value="#5c0000"></option><option value="#663d00"></option><option value="#666600"></option><option value="#003700"></option><option value="#002966"></option><option value="#3d1466"></option></select></div><div class="ql-formats"><button class="ql-code-block" data-toggle="tooltip" data-placement="bottom" title="Code"></button><button class="ql-blockquote" data-toggle="tooltip" data-placement="bottom" title="Block quote"></button><button class="ql-link" data-toggle="tooltip" data-placement="bottom" title="Link"></button></div><div class="ql-formats"><button class="ql-header" data-toggle="tooltip" data-placement="bottom" value="1"></button><button class="ql-header" data-toggle="tooltip" data-placement="bottom" value="2"></button><select class="ql-align"><option selected></option><option value="center"></option><option value="right"></option><option value="justify"></option></select></div><div class="ql-formats"><select class="ql-size"><option value="small"></option><option selected></option><option value="large"></option><option value="huge"></option></select><select class="ql-header"><option value=""></option><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option></select></div><div class="ql-formats"><select class="ql-font"><option selected></option><option value="serif"></option><option value="monospace"></option></select></div><div class="ql-formats"><button class="ql-image" data-toggle="tooltip" data-placement="bottom" title="Image"></button><button class="ql-video" data-toggle="tooltip" data-placement="bottom" title="Video"></button><button class="ql-clean" data-toggle="tooltip" data-placement="bottom" title="Clean"></button></div>', 7)
|
6199
6409
|
]), 512), [
|
6200
|
-
[
|
6410
|
+
[ht, f(O)]
|
6201
6411
|
]),
|
6202
|
-
|
6412
|
+
re(f(Ds), {
|
6203
6413
|
ref_key: "scrollerRef",
|
6204
|
-
ref:
|
6414
|
+
ref: k,
|
6205
6415
|
class: "ql-body",
|
6206
|
-
options: f(
|
6207
|
-
onScroll: f(
|
6208
|
-
style:
|
6416
|
+
options: f(P).options,
|
6417
|
+
onScroll: f(Y),
|
6418
|
+
style: ee(f(P).style)
|
6209
6419
|
}, {
|
6210
|
-
default:
|
6211
|
-
|
6420
|
+
default: ue(() => [
|
6421
|
+
S("div", {
|
6212
6422
|
ref_key: "editorRef",
|
6213
6423
|
ref: g
|
6214
6424
|
}, null, 512)
|
@@ -6217,17 +6427,17 @@ const Bs = /* @__PURE__ */ de(Is, [["render", Ms]]), Fs = { class: "ha-rich-text
|
|
6217
6427
|
}, 8, ["options", "onScroll", "style"])
|
6218
6428
|
]));
|
6219
6429
|
}
|
6220
|
-
}),
|
6221
|
-
function
|
6222
|
-
return
|
6223
|
-
|
6224
|
-
|
6225
|
-
|
6430
|
+
}), qs = {}, Vs = { class: "ha-select" };
|
6431
|
+
function Ws(c, i) {
|
6432
|
+
return C(), T("div", Vs, i[0] || (i[0] = [
|
6433
|
+
S("div", { class: "select-title" }, "头", -1),
|
6434
|
+
S("div", { class: "select-body" }, [
|
6435
|
+
S("input", { type: "text" })
|
6226
6436
|
], -1)
|
6227
6437
|
]));
|
6228
6438
|
}
|
6229
|
-
const
|
6230
|
-
class
|
6439
|
+
const we = /* @__PURE__ */ de(qs, [["render", Ws]]);
|
6440
|
+
class Il {
|
6231
6441
|
/**
|
6232
6442
|
* 初始化
|
6233
6443
|
*/
|
@@ -6251,7 +6461,7 @@ class Ul {
|
|
6251
6461
|
this.startLine = i, this.endLine = e, this.startColumn = t, this.endColumn = r;
|
6252
6462
|
}
|
6253
6463
|
}
|
6254
|
-
const
|
6464
|
+
const zs = { class: "ha-condition" }, Ks = /* @__PURE__ */ B({
|
6255
6465
|
__name: "Condition",
|
6256
6466
|
props: {
|
6257
6467
|
name: {},
|
@@ -6260,79 +6470,81 @@ const Ws = { class: "ha-condition" }, zs = /* @__PURE__ */ F({
|
|
6260
6470
|
},
|
6261
6471
|
setup(c) {
|
6262
6472
|
let i = c, { name: e, operator: t, value: r } = z(i);
|
6263
|
-
return (s, l) => (
|
6264
|
-
|
6473
|
+
return (s, l) => (C(), T("div", zs, [
|
6474
|
+
re(f(we), {
|
6265
6475
|
modelValue: f(e),
|
6266
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
6476
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => ve(e) ? e.value = o : e = o)
|
6267
6477
|
}, null, 8, ["modelValue"]),
|
6268
|
-
|
6478
|
+
re(f(we), {
|
6269
6479
|
modelValue: f(t),
|
6270
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
6480
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => ve(t) ? t.value = o : t = o)
|
6271
6481
|
}, {
|
6272
|
-
default:
|
6273
|
-
|
6482
|
+
default: ue(() => [
|
6483
|
+
re(f(Fs))
|
6274
6484
|
]),
|
6275
6485
|
_: 1
|
6276
6486
|
}, 8, ["modelValue"]),
|
6277
|
-
|
6487
|
+
re(f(we), {
|
6278
6488
|
modelValue: f(r),
|
6279
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
6489
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => ve(r) ? r.value = o : r = o)
|
6280
6490
|
}, null, 8, ["modelValue"])
|
6281
6491
|
]));
|
6282
6492
|
}
|
6283
|
-
}),
|
6493
|
+
}), Js = { class: "ha-condition-group" }, Ml = /* @__PURE__ */ B({
|
6284
6494
|
__name: "Index",
|
6285
6495
|
props: {
|
6286
6496
|
conditions: {}
|
6287
6497
|
},
|
6288
6498
|
setup(c) {
|
6289
6499
|
let i = c, { conditions: e } = z(i);
|
6290
|
-
return (t, r) => (
|
6291
|
-
(
|
6500
|
+
return (t, r) => (C(), T("div", Js, [
|
6501
|
+
(C(!0), T(qe, null, Ve(f(e), (s) => (C(), Fe(f(Ks), {
|
6292
6502
|
name: s.name,
|
6293
6503
|
operator: s.operator,
|
6294
6504
|
value: s.value
|
6295
6505
|
}, null, 8, ["name", "operator", "value"]))), 256))
|
6296
6506
|
]));
|
6297
6507
|
}
|
6298
|
-
}),
|
6508
|
+
}), Xs = {}, Qs = { class: "ha-col" };
|
6299
6509
|
function Ys(c, i) {
|
6300
|
-
return
|
6301
|
-
|
6510
|
+
return C(), T("div", Qs, [
|
6511
|
+
Q(c.$slots, "default")
|
6302
6512
|
]);
|
6303
6513
|
}
|
6304
|
-
const
|
6514
|
+
const Bl = /* @__PURE__ */ de(Xs, [["render", Ys]]), Pl = /* @__PURE__ */ B({
|
6305
6515
|
__name: "Container",
|
6306
6516
|
props: {
|
6307
6517
|
container: { type: Boolean, default: !0 }
|
6308
6518
|
},
|
6309
6519
|
setup(c) {
|
6310
6520
|
let i = c, { container: e } = z(i);
|
6311
|
-
return (t, r) => (
|
6521
|
+
return (t, r) => (C(), T("div", {
|
6312
6522
|
class: ce({ "ha-container": f(e) })
|
6313
6523
|
}, [
|
6314
|
-
|
6524
|
+
Q(t.$slots, "default")
|
6315
6525
|
], 2));
|
6316
6526
|
}
|
6317
|
-
}),
|
6527
|
+
}), Fl = /* @__PURE__ */ B({
|
6318
6528
|
__name: "Row",
|
6319
6529
|
props: {
|
6320
6530
|
gap: {},
|
6321
6531
|
direction: {}
|
6322
6532
|
},
|
6323
|
-
setup(c) {
|
6324
|
-
let
|
6325
|
-
let
|
6326
|
-
return
|
6327
|
-
});
|
6328
|
-
return (s,
|
6329
|
-
|
6330
|
-
|
6533
|
+
setup(c, { expose: i }) {
|
6534
|
+
let e = c, { gap: t, direction: r } = z(e), s = H(), l = ge(() => {
|
6535
|
+
let o = { gap: null };
|
6536
|
+
return t.value && (o.gap = t.value + "px"), o;
|
6537
|
+
});
|
6538
|
+
return i({ ref: s }), (o, a) => (C(), T("div", {
|
6539
|
+
ref_key: "rowRef",
|
6540
|
+
ref: s,
|
6541
|
+
class: ce(["ha-row", f(r)]),
|
6542
|
+
style: ee(f(l))
|
6331
6543
|
}, [
|
6332
|
-
|
6544
|
+
Q(o.$slots, "default")
|
6333
6545
|
], 6));
|
6334
6546
|
}
|
6335
|
-
}),
|
6547
|
+
}), Nl = /* @__PURE__ */ B({
|
6336
6548
|
__name: "Index",
|
6337
6549
|
props: {
|
6338
6550
|
modelValue: { type: Boolean },
|
@@ -6340,7 +6552,7 @@ const Ll = /* @__PURE__ */ de(Js, [["render", Ys]]), Rl = /* @__PURE__ */ F({
|
|
6340
6552
|
},
|
6341
6553
|
emits: ["update:modelValue"],
|
6342
6554
|
setup(c) {
|
6343
|
-
let i =
|
6555
|
+
let i = Ne(c, "modelValue"), e = H(!0), t = H(0), r = null, s = () => {
|
6344
6556
|
t.value = 0, e.value = !0, r = setInterval(() => {
|
6345
6557
|
if (t.value < 100) {
|
6346
6558
|
t.value++;
|
@@ -6350,7 +6562,7 @@ const Ll = /* @__PURE__ */ de(Js, [["render", Ys]]), Rl = /* @__PURE__ */ F({
|
|
6350
6562
|
}, 50);
|
6351
6563
|
}, l = () => {
|
6352
6564
|
clearInterval(r);
|
6353
|
-
let
|
6565
|
+
let o = 100 - t.value, a = 200, u = 20, p = o / (a / u), h = setInterval(() => {
|
6354
6566
|
t.value += p, !(t.value < 100) && (t.value = 100, clearInterval(h), setTimeout(() => {
|
6355
6567
|
e.value = !1;
|
6356
6568
|
}, 200));
|
@@ -6358,68 +6570,71 @@ const Ll = /* @__PURE__ */ de(Js, [["render", Ys]]), Rl = /* @__PURE__ */ F({
|
|
6358
6570
|
};
|
6359
6571
|
return oe(() => {
|
6360
6572
|
i.value && s();
|
6361
|
-
}),
|
6573
|
+
}), ae(() => {
|
6362
6574
|
clearInterval(r);
|
6363
|
-
}),
|
6364
|
-
|
6365
|
-
}), (
|
6575
|
+
}), W(() => i.value, (o, a) => {
|
6576
|
+
o ? s() : l();
|
6577
|
+
}), (o, a) => f(e) ? (C(), T("div", {
|
6366
6578
|
key: 0,
|
6367
6579
|
class: "ha-progress",
|
6368
|
-
style:
|
6580
|
+
style: ee({ width: f(t) + "%" })
|
6369
6581
|
}, null, 4)) : ye("", !0);
|
6370
6582
|
}
|
6371
|
-
}),
|
6583
|
+
}), Gs = { class: "progress-tip success" }, Zs = { class: "progress-tip error" }, el = { class: "progress-bar" }, tl = { class: "progress-info" }, rl = { key: 0 }, sl = { class: "progress-text" }, ql = /* @__PURE__ */ B({
|
6372
6584
|
__name: "SocketProgress",
|
6373
6585
|
props: {
|
6586
|
+
title: {},
|
6587
|
+
current: {},
|
6374
6588
|
progress: {}
|
6375
6589
|
},
|
6376
6590
|
setup(c) {
|
6377
|
-
let i = c, {
|
6378
|
-
return (
|
6591
|
+
let i = c, { title: e, current: t, progress: r } = z(i), s = ge(() => d.math.getPercentage(r.value.handled, r.value.total)), l = ge(() => `${r.value.handled ?? "-"}/${r.value.total ?? "-"}`), o = ge(() => d.math.getPercentageText(r.value.handled, r.value.total));
|
6592
|
+
return (a, u) => (C(), T("div", {
|
6379
6593
|
class: ce(["ha-socket-progress", {
|
6380
|
-
error: f(
|
6381
|
-
warning: f(
|
6594
|
+
error: f(r).errored > 0 && f(r).errored == f(r).handled,
|
6595
|
+
warning: f(r).errored > 0 && f(r).errored < f(r).handled
|
6382
6596
|
}])
|
6383
6597
|
}, [
|
6384
|
-
|
6385
|
-
default:
|
6386
|
-
|
6387
|
-
|
6388
|
-
|
6389
|
-
})) : ye("", !0),
|
6390
|
-
te(f(we), { class: "progress-tips" }, {
|
6391
|
-
default: ie(() => [
|
6392
|
-
_("div", Xs, "进度:" + W(f(r)), 1),
|
6393
|
-
_("div", Gs, "成功:" + W(f(e).succeed ?? "-"), 1),
|
6394
|
-
_("div", Zs, "异常:" + W(f(e).errored ?? "-"), 1),
|
6395
|
-
Y(l.$slots, "default")
|
6598
|
+
re(f(Be), { class: "progress-tips" }, {
|
6599
|
+
default: ue(() => [
|
6600
|
+
S("div", Gs, "成功:" + N(f(r).succeed ?? "-"), 1),
|
6601
|
+
S("div", Zs, "异常:" + N(f(r).errored ?? "-"), 1),
|
6602
|
+
Q(a.$slots, "default")
|
6396
6603
|
]),
|
6397
6604
|
_: 3
|
6398
6605
|
}),
|
6399
|
-
|
6400
|
-
default:
|
6401
|
-
|
6402
|
-
|
6403
|
-
|
6404
|
-
|
6405
|
-
|
6406
|
-
|
6407
|
-
|
6408
|
-
|
6606
|
+
re(f(Be), { class: "progress-chart" }, {
|
6607
|
+
default: ue(() => {
|
6608
|
+
var p;
|
6609
|
+
return [
|
6610
|
+
S("div", el, [
|
6611
|
+
S("div", {
|
6612
|
+
class: "progress-percentage",
|
6613
|
+
style: ee({ width: f(s) + "%" })
|
6614
|
+
}, null, 4),
|
6615
|
+
S("div", tl, [
|
6616
|
+
S("div", null, N(f(e)) + ":" + N(((p = f(r).current) == null ? void 0 : p[f(t)]) ?? "-"), 1),
|
6617
|
+
f(r).elapsed ? (C(), T("div", rl, "耗时:" + N(f(d).math.round(f(r).elapsed / 1e3, 2)) + "s", 1)) : ye("", !0),
|
6618
|
+
S("div", null, "进度:" + N(f(l)), 1)
|
6619
|
+
])
|
6620
|
+
]),
|
6621
|
+
S("div", sl, N(f(o)) + "%", 1)
|
6622
|
+
];
|
6623
|
+
}),
|
6409
6624
|
_: 1
|
6410
6625
|
})
|
6411
6626
|
], 2));
|
6412
6627
|
}
|
6413
|
-
}),
|
6628
|
+
}), ll = {
|
6414
6629
|
key: 0,
|
6415
6630
|
class: "ha-spinner is-error"
|
6416
|
-
},
|
6631
|
+
}, nl = { class: "spinner-title" }, il = {
|
6417
6632
|
key: 0,
|
6418
6633
|
class: "spinner-content"
|
6419
|
-
},
|
6634
|
+
}, ol = { class: "stack" }, al = {
|
6420
6635
|
key: 1,
|
6421
6636
|
class: "ha-spinner is-loading"
|
6422
|
-
},
|
6637
|
+
}, ul = { class: "spinner-loading" }, cl = { class: "spinner-text" }, Vl = /* @__PURE__ */ B({
|
6423
6638
|
__name: "Spinner",
|
6424
6639
|
props: {
|
6425
6640
|
title: { type: String },
|
@@ -6432,172 +6647,189 @@ const Ll = /* @__PURE__ */ de(Js, [["render", Ys]]), Rl = /* @__PURE__ */ F({
|
|
6432
6647
|
let e = i, t = c, { title: r, content: s } = z(t), l = () => {
|
6433
6648
|
e("retry");
|
6434
6649
|
};
|
6435
|
-
return (
|
6436
|
-
|
6437
|
-
|
6438
|
-
|
6650
|
+
return (o, a) => f(r) || f(s) ? (C(), T("div", ll, [
|
6651
|
+
S("div", nl, [
|
6652
|
+
Pe(N(f(r)), 1),
|
6653
|
+
S("a", {
|
6439
6654
|
class: "retry",
|
6440
|
-
onClick:
|
6655
|
+
onClick: a[0] || (a[0] = //@ts-ignore
|
6441
6656
|
(...u) => f(l) && f(l)(...u))
|
6442
|
-
},
|
6657
|
+
}, N(f(fe)("common.retry")), 1)
|
6443
6658
|
]),
|
6444
|
-
f(s) ? (
|
6445
|
-
|
6659
|
+
f(s) ? (C(), T("div", il, [
|
6660
|
+
S("div", ol, N(f(s)), 1)
|
6446
6661
|
])) : ye("", !0)
|
6447
|
-
])) : (
|
6448
|
-
|
6449
|
-
|
6450
|
-
|
6451
|
-
|
6452
|
-
|
6453
|
-
|
6662
|
+
])) : (C(), T("div", al, [
|
6663
|
+
S("div", ul, [
|
6664
|
+
a[1] || (a[1] = S("div", { class: "spinner-dots" }, [
|
6665
|
+
S("i"),
|
6666
|
+
S("i"),
|
6667
|
+
S("i"),
|
6668
|
+
S("i")
|
6454
6669
|
], -1)),
|
6455
|
-
|
6670
|
+
S("div", cl, N(f(fe)("common.loading")) + "...", 1)
|
6456
6671
|
])
|
6457
6672
|
]));
|
6458
6673
|
}
|
6459
|
-
}),
|
6674
|
+
}), dl = { class: "ha-tab" }, Wl = /* @__PURE__ */ B({
|
6460
6675
|
__name: "Tab",
|
6461
6676
|
props: {
|
6462
6677
|
mode: {},
|
6463
6678
|
destroy: { type: Boolean }
|
6464
6679
|
},
|
6465
6680
|
setup(c) {
|
6466
|
-
return z(c), (e, t) => (
|
6467
|
-
|
6468
|
-
|
6681
|
+
return z(c), (e, t) => (C(), T("div", dl, t[0] || (t[0] = [
|
6682
|
+
S("div", { class: "tab-header" }, null, -1),
|
6683
|
+
S("div", { class: "tab-body" }, null, -1)
|
6469
6684
|
])));
|
6470
6685
|
}
|
6686
|
+
}), pl = { class: "ha-dance" }, zl = /* @__PURE__ */ B({
|
6687
|
+
__name: "Dance",
|
6688
|
+
props: {
|
6689
|
+
text: {},
|
6690
|
+
delay: { default: 0 }
|
6691
|
+
},
|
6692
|
+
setup(c) {
|
6693
|
+
let i = c, { text: e, delay: t } = z(i);
|
6694
|
+
return (r, s) => (C(), T("div", pl, [
|
6695
|
+
(C(!0), T(qe, null, Ve(f(e), (l, o) => (C(), T("div", {
|
6696
|
+
class: "char",
|
6697
|
+
style: ee({ animationDelay: `${f(t) + o * 0.1}s` })
|
6698
|
+
}, N(l), 5))), 256))
|
6699
|
+
]));
|
6700
|
+
}
|
6471
6701
|
});
|
6472
|
-
let
|
6473
|
-
c == null && (c = new
|
6474
|
-
let i = await
|
6475
|
-
await
|
6702
|
+
let Kl = async (c) => {
|
6703
|
+
c == null && (c = new Cs()), await ys(c), await _t();
|
6704
|
+
let i = await Ut.getSso(), e = Z.sys.app, t = { baseUrl: c.baseUrl, language: e.language, user: i, platform: "pc" }, r = d.json.serialize(t);
|
6705
|
+
await _.openAsync(r);
|
6476
6706
|
let s = { url: c.socketUrl }, l = d.json.serialize(s);
|
6477
|
-
await
|
6478
|
-
let { data:
|
6479
|
-
return a
|
6707
|
+
await je.openAsync(l), _.onResponse = async (o) => {
|
6708
|
+
let { ok: a, status: u, data: p } = o;
|
6709
|
+
return a == !1 ? (Le.add(u.toString(), o.message, "网络错误", o.elapsed), ie.error(o.message), Promise.reject(o)) : p.code == null || (Le.add(p.code, p.message, p.stack, p.elapsed), p.code == "Ok") ? Promise.resolve() : (ie.error(p.message), Promise.reject(p));
|
6480
6710
|
};
|
6481
6711
|
};
|
6482
6712
|
export {
|
6483
|
-
|
6484
|
-
|
6713
|
+
Ir as ArrayUtil,
|
6714
|
+
rs as BrowserUtil,
|
6485
6715
|
Pt as BuilderFactory,
|
6486
|
-
|
6487
|
-
|
6488
|
-
|
6489
|
-
|
6490
|
-
|
6716
|
+
Ye as Cdn,
|
6717
|
+
qt as CdnFactory,
|
6718
|
+
Mr as ComponentUtil,
|
6719
|
+
Cs as CreateFeOptions,
|
6720
|
+
os as DeltaUtility,
|
6491
6721
|
Pr as DictionaryUtil,
|
6492
|
-
|
6493
|
-
|
6494
|
-
|
6495
|
-
|
6496
|
-
|
6497
|
-
|
6498
|
-
|
6722
|
+
Br as DomUtil,
|
6723
|
+
ns as DragEvent,
|
6724
|
+
zt as EncoderFactory,
|
6725
|
+
Fr as EventUtil,
|
6726
|
+
$e as EventUtility,
|
6727
|
+
Xt as ExcelFactory,
|
6728
|
+
Gt as ExplainerFactory,
|
6499
6729
|
y as Factories,
|
6500
6730
|
D as Factory,
|
6501
|
-
|
6502
|
-
|
6503
|
-
|
6504
|
-
|
6505
|
-
|
6506
|
-
|
6507
|
-
|
6508
|
-
|
6509
|
-
|
6510
|
-
|
6511
|
-
|
6512
|
-
|
6513
|
-
|
6514
|
-
|
6515
|
-
|
6516
|
-
|
6517
|
-
|
6518
|
-
|
6519
|
-
|
6520
|
-
|
6521
|
-
|
6522
|
-
|
6523
|
-
|
6524
|
-
|
6525
|
-
|
6526
|
-
|
6527
|
-
|
6528
|
-
|
6529
|
-
|
6530
|
-
|
6531
|
-
|
6532
|
-
|
6533
|
-
|
6534
|
-
|
6535
|
-
|
6536
|
-
|
6537
|
-
|
6731
|
+
rr as FeatureFactory,
|
6732
|
+
Nr as FileUtil,
|
6733
|
+
Be as HaCard,
|
6734
|
+
Ul as HaCode,
|
6735
|
+
Bl as HaCol,
|
6736
|
+
Ol as HaCompare,
|
6737
|
+
Ks as HaCondition,
|
6738
|
+
Ml as HaConditionGroup,
|
6739
|
+
Pl as HaContainer,
|
6740
|
+
zl as HaDance,
|
6741
|
+
Dl as HaEmpty,
|
6742
|
+
js as HaFill,
|
6743
|
+
Ll as HaInput,
|
6744
|
+
Fs as HaOption,
|
6745
|
+
Nl as HaProgress,
|
6746
|
+
Rl as HaRichText,
|
6747
|
+
Fl as HaRow,
|
6748
|
+
Ds as HaScroller,
|
6749
|
+
we as HaSelect,
|
6750
|
+
ql as HaSocketProgress,
|
6751
|
+
Vl as HaSpinner,
|
6752
|
+
Wl as HaTab,
|
6753
|
+
Hl as HaTimer,
|
6754
|
+
ur as HaloHttp,
|
6755
|
+
nr as HasherFactory,
|
6756
|
+
qr as HtmlUtil,
|
6757
|
+
cr as HttpFactory,
|
6758
|
+
tt as HttpRequest,
|
6759
|
+
Ie as HttpResponse,
|
6760
|
+
hr as I18nFactory,
|
6761
|
+
Vr as ImageUtil,
|
6762
|
+
ts as JsonUtil,
|
6763
|
+
xt as KeyboardType,
|
6764
|
+
is as KeyboardUtility,
|
6765
|
+
Wr as MathUtil,
|
6766
|
+
gr as Messenger,
|
6767
|
+
yr as MessengerFactory,
|
6768
|
+
zr as MicroUtil,
|
6769
|
+
Kr as MountUtil,
|
6538
6770
|
as as MouseUtility,
|
6539
|
-
|
6540
|
-
|
6541
|
-
|
6542
|
-
|
6543
|
-
|
6544
|
-
|
6545
|
-
|
6546
|
-
|
6547
|
-
|
6548
|
-
|
6549
|
-
|
6550
|
-
|
6551
|
-
|
6552
|
-
|
6553
|
-
|
6554
|
-
|
6555
|
-
|
6556
|
-
|
6557
|
-
|
6558
|
-
|
6559
|
-
|
6560
|
-
|
6561
|
-
|
6771
|
+
Jr as ObjectUtil,
|
6772
|
+
lt as Position,
|
6773
|
+
Mt as ProviderFactory,
|
6774
|
+
Sl as ProviderTable,
|
6775
|
+
us as RandomUtility,
|
6776
|
+
Il as Range,
|
6777
|
+
El as Rect,
|
6778
|
+
Tl as Ref,
|
6779
|
+
kt as RepoFactory,
|
6780
|
+
Se as SaveUtility,
|
6781
|
+
Zr as ScrollUtil,
|
6782
|
+
ls as SignUtil,
|
6783
|
+
br as SignerFactory,
|
6784
|
+
xr as SocketFactory,
|
6785
|
+
_l as SocketProgress,
|
6786
|
+
Cl as SocketResponse,
|
6787
|
+
Re as SqlHelper,
|
6788
|
+
$r as SsoFactory,
|
6789
|
+
rt as SsoUser,
|
6790
|
+
Xr as StringUtil,
|
6791
|
+
Ht as SvcFactory,
|
6792
|
+
Hr as TaskFactory,
|
6793
|
+
Qr as TaskUtil,
|
6794
|
+
Lr as TemplateFactory,
|
6562
6795
|
Yr as TimeUtil,
|
6563
|
-
|
6564
|
-
|
6565
|
-
|
6566
|
-
|
6567
|
-
cs as UtilityFactory,
|
6796
|
+
Gr as TreeUtil,
|
6797
|
+
ss as UrlUtil,
|
6798
|
+
Rr as UtilFactory,
|
6799
|
+
ds as UtilityFactory,
|
6568
6800
|
d as Utils,
|
6569
|
-
|
6570
|
-
|
6571
|
-
|
6801
|
+
$l as VideoFactory,
|
6802
|
+
jl as VoiceFactory,
|
6803
|
+
gs as base64,
|
6572
6804
|
le as cdn,
|
6573
6805
|
Z as configSvc,
|
6574
|
-
|
6575
|
-
|
6576
|
-
|
6577
|
-
|
6578
|
-
|
6579
|
-
|
6580
|
-
|
6581
|
-
|
6582
|
-
|
6583
|
-
|
6584
|
-
|
6806
|
+
Kl as createFe,
|
6807
|
+
xl as driverSvc,
|
6808
|
+
Al as envSvc,
|
6809
|
+
_ as http,
|
6810
|
+
Me as i18n,
|
6811
|
+
ys as initDriverAsync,
|
6812
|
+
_t as initRepoAsync,
|
6813
|
+
kl as initSvcAsync,
|
6814
|
+
Le as logSvc,
|
6815
|
+
it as md5,
|
6816
|
+
ie as messenger,
|
6817
|
+
At as moduleRepo,
|
6585
6818
|
K as moment,
|
6586
|
-
|
6587
|
-
|
6588
|
-
|
6589
|
-
|
6590
|
-
He as socket,
|
6819
|
+
St as queryRepo,
|
6820
|
+
ze as settingRepo,
|
6821
|
+
Qe as settingSvc,
|
6822
|
+
je as socket,
|
6591
6823
|
fe as t,
|
6592
|
-
|
6593
|
-
|
6594
|
-
|
6595
|
-
|
6824
|
+
bs as t_enum,
|
6825
|
+
ms as t_exists,
|
6826
|
+
ws as t_field,
|
6827
|
+
ks as t_field_choose_placeholder,
|
6596
6828
|
xs as t_field_placeholder,
|
6597
|
-
|
6598
|
-
|
6599
|
-
|
6600
|
-
|
6601
|
-
|
6602
|
-
|
6829
|
+
_s as t_menu,
|
6830
|
+
Ss as t_module,
|
6831
|
+
vs as t_sys,
|
6832
|
+
As as t_table,
|
6833
|
+
fs as template,
|
6834
|
+
Ut as userSvc
|
6603
6835
|
};
|