halo-fe 1.0.27 → 1.0.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +1008 -857
- package/esm/coms/controls/@types/CodeProps.d.ts +1 -1
- package/esm/coms/controls/Code.vue.d.ts +1 -1
- 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/HttpFactory.d.ts +1 -0
- package/esm/drivers/i18ns/I18nFactory.d.ts +1 -0
- 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/ssos/SsoFactory.d.ts +1 -0
- package/esm/drivers/tasks/TaskFactory.d.ts +1 -0
- package/esm/drivers/templates/TemplateFactory.d.ts +1 -0
- package/esm/drivers/util/UtilFactory.d.ts +2 -2
- package/esm/drivers/util/implements/ObjectUtil.d.ts +20 -0
- 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/package.json +1 -1
package/dist/main.js
CHANGED
@@ -1,20 +1,24 @@
|
|
1
1
|
var at = Object.defineProperty;
|
2
|
-
var
|
3
|
-
var n = (c, i, e) =>
|
4
|
-
import { reactive as _e, defineAsyncComponent as
|
5
|
-
import { L as
|
6
|
-
import { _ as
|
7
|
-
import { F as
|
8
|
-
import { a as
|
9
|
-
import { _ as
|
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
|
+
import { _ as be } from "./assets/underscore-B0BCaBxV.js";
|
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 加载
|
@@ -85,7 +91,7 @@ class D {
|
|
85
91
|
}
|
86
92
|
//#endregion
|
87
93
|
}
|
88
|
-
class
|
94
|
+
class We {
|
89
95
|
constructor() {
|
90
96
|
n(this, "type");
|
91
97
|
}
|
@@ -158,7 +164,7 @@ 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 属性
|
@@ -187,8 +193,8 @@ class mt extends qe {
|
|
187
193
|
for (let r = 0; r < e.length; r++) {
|
188
194
|
let s = e[r], l = t[s.name];
|
189
195
|
if (l != null)
|
190
|
-
for (let
|
191
|
-
|
196
|
+
for (let o of l)
|
197
|
+
o[`Old_${s.key}`] = o[s.key];
|
192
198
|
}
|
193
199
|
return t;
|
194
200
|
});
|
@@ -212,10 +218,10 @@ class mt extends qe {
|
|
212
218
|
updateTooltipByFields(e, t, r) {
|
213
219
|
if (r.length != 0)
|
214
220
|
for (let s of r) {
|
215
|
-
let l = s.control.tooltip,
|
221
|
+
let l = s.control.tooltip, o = `${e}.${s.name}.tooltip`;
|
216
222
|
for (let p of l.fields)
|
217
|
-
|
218
|
-
let
|
223
|
+
o += `.${t[p]}`;
|
224
|
+
let a = fe(o), u = d.json.deserialize(a);
|
219
225
|
u == null ? (l.title = null, l.content = null) : (l.title = u.title, l.content = d.json.serializeWithoutString(u.content));
|
220
226
|
}
|
221
227
|
}
|
@@ -227,25 +233,25 @@ class mt extends qe {
|
|
227
233
|
if (e == null)
|
228
234
|
return [];
|
229
235
|
for (let s of e) {
|
230
|
-
for (let
|
231
|
-
let
|
232
|
-
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) {
|
233
239
|
let u = t[s.name];
|
234
240
|
for (let p of u)
|
235
|
-
this.updateTooltipByFields(s.name, p, [
|
241
|
+
this.updateTooltipByFields(s.name, p, [o]);
|
236
242
|
}
|
237
243
|
}
|
238
244
|
if (s.show != null) {
|
239
|
-
let
|
240
|
-
for (let
|
241
|
-
let u =
|
242
|
-
|
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);
|
243
249
|
}
|
244
|
-
s.show =
|
250
|
+
s.show = o;
|
245
251
|
}
|
246
|
-
s.search = s.fields.filter((
|
252
|
+
s.search = s.fields.filter((o) => o.search != null);
|
247
253
|
let l = s.key.name ?? s.key;
|
248
|
-
s.key = s.fields.find((
|
254
|
+
s.key = s.fields.find((o) => o.name == l);
|
249
255
|
}
|
250
256
|
return e;
|
251
257
|
}
|
@@ -264,7 +270,7 @@ class mt extends qe {
|
|
264
270
|
}
|
265
271
|
//#endregion
|
266
272
|
}
|
267
|
-
class
|
273
|
+
class bt extends We {
|
268
274
|
constructor() {
|
269
275
|
super(...arguments);
|
270
276
|
//#region 属性
|
@@ -375,9 +381,13 @@ class wt {
|
|
375
381
|
this[e] = i[e];
|
376
382
|
}
|
377
383
|
}
|
378
|
-
class
|
384
|
+
class kt extends D {
|
379
385
|
open() {
|
380
|
-
super.open(), super.
|
386
|
+
super.open(), super.register({
|
387
|
+
Module: vt,
|
388
|
+
Query: bt,
|
389
|
+
Setting: wt
|
390
|
+
});
|
381
391
|
}
|
382
392
|
/**
|
383
393
|
* 模块仓储
|
@@ -400,11 +410,11 @@ class bt extends D {
|
|
400
410
|
return this.createWithCache("Setting");
|
401
411
|
}
|
402
412
|
}
|
403
|
-
var
|
404
|
-
let
|
405
|
-
|
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;
|
406
416
|
};
|
407
|
-
class
|
417
|
+
class Ct {
|
408
418
|
constructor() {
|
409
419
|
/**
|
410
420
|
* 默认背景
|
@@ -432,17 +442,17 @@ class _t {
|
|
432
442
|
n(this, "cdn", "Local");
|
433
443
|
}
|
434
444
|
}
|
435
|
-
class
|
445
|
+
class Tt {
|
436
446
|
constructor() {
|
437
447
|
/**
|
438
448
|
* 用户应用配置
|
439
449
|
*/
|
440
|
-
n(this, "app", new
|
450
|
+
n(this, "app", new Ct());
|
441
451
|
}
|
442
452
|
}
|
443
|
-
class
|
453
|
+
class Ke {
|
444
454
|
}
|
445
|
-
class
|
455
|
+
class Je extends Ke {
|
446
456
|
constructor() {
|
447
457
|
super(...arguments);
|
448
458
|
//#region 属性
|
@@ -450,7 +460,7 @@ class Ke extends ze {
|
|
450
460
|
/**
|
451
461
|
* 用户系统配置
|
452
462
|
*/
|
453
|
-
n(this, "sys", new
|
463
|
+
n(this, "sys", new Tt());
|
454
464
|
/**
|
455
465
|
* 文件布局方式
|
456
466
|
*/
|
@@ -482,8 +492,8 @@ class Ke extends ze {
|
|
482
492
|
*/
|
483
493
|
n(this, "bindAsync", async (e) => {
|
484
494
|
for (let s of e) {
|
485
|
-
let
|
486
|
-
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);
|
487
497
|
}
|
488
498
|
let t = this.sys.app, r = document.documentElement;
|
489
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);
|
@@ -529,10 +539,10 @@ class Ke extends ze {
|
|
529
539
|
r.classList.remove(t.layout), r.classList.add(s), t.layout = s;
|
530
540
|
let l = e.theme;
|
531
541
|
d.dom.removeClass(r, t.theme), d.dom.addClass(r, l), t.theme = l, d.mount.emit("theme", l);
|
532
|
-
let
|
533
|
-
this.setBackground(
|
534
|
-
let
|
535
|
-
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);
|
536
546
|
}
|
537
547
|
//#region 配置
|
538
548
|
/**
|
@@ -567,7 +577,7 @@ class Ke extends ze {
|
|
567
577
|
return this.sys.app.language || e || "zh-cn";
|
568
578
|
}
|
569
579
|
}
|
570
|
-
class
|
580
|
+
class Et {
|
571
581
|
constructor() {
|
572
582
|
/**
|
573
583
|
* 环境变量
|
@@ -581,7 +591,7 @@ class Tt {
|
|
581
591
|
this.env = i, this.env.base = d.string.trimEnd(i.VITE_ROOT, "/");
|
582
592
|
}
|
583
593
|
}
|
584
|
-
class
|
594
|
+
class $t {
|
585
595
|
constructor() {
|
586
596
|
/**
|
587
597
|
* 日志集合
|
@@ -608,7 +618,7 @@ class Et {
|
|
608
618
|
this.logs = [];
|
609
619
|
}
|
610
620
|
}
|
611
|
-
class
|
621
|
+
class jt {
|
612
622
|
constructor() {
|
613
623
|
//#region 属性
|
614
624
|
n(this, "loaded", !1);
|
@@ -676,7 +686,7 @@ class $t {
|
|
676
686
|
let r = i[t];
|
677
687
|
r && (this[t] = r);
|
678
688
|
}
|
679
|
-
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);
|
680
690
|
}).catch((i) => Promise.reject(i)));
|
681
691
|
}
|
682
692
|
//#endregion
|
@@ -687,7 +697,7 @@ class $t {
|
|
687
697
|
this.loaded || (await this.load(), this.loaded = !0);
|
688
698
|
}
|
689
699
|
}
|
690
|
-
class
|
700
|
+
class Dt {
|
691
701
|
constructor() {
|
692
702
|
//#region 属性
|
693
703
|
/**
|
@@ -763,12 +773,12 @@ class jt {
|
|
763
773
|
return _.post("/user/logout").then(async () => {
|
764
774
|
this.user = null, this.menus = null;
|
765
775
|
let i = await this.getSso();
|
766
|
-
return await (await y.sso.createAsync(i.type)).logout(),
|
776
|
+
return await (await y.sso.createAsync(i.type)).logout(), je.dispose(), Promise.resolve();
|
767
777
|
});
|
768
778
|
}
|
769
779
|
//#endregion
|
770
780
|
}
|
771
|
-
class
|
781
|
+
class Xe extends Ke {
|
772
782
|
constructor() {
|
773
783
|
super(...arguments);
|
774
784
|
//#region 属性
|
@@ -787,12 +797,12 @@ class Je extends ze {
|
|
787
797
|
}
|
788
798
|
//#endregion
|
789
799
|
}
|
790
|
-
class
|
800
|
+
class Ht extends D {
|
791
801
|
open() {
|
792
|
-
super.open(), super.
|
793
|
-
|
794
|
-
|
795
|
-
|
802
|
+
super.open(), super.register({
|
803
|
+
Config: Je,
|
804
|
+
Driver: Xe
|
805
|
+
});
|
796
806
|
}
|
797
807
|
static() {
|
798
808
|
debugger;
|
@@ -805,7 +815,7 @@ class Dt extends D {
|
|
805
815
|
}
|
806
816
|
}
|
807
817
|
let kl = () => {
|
808
|
-
}, Qe = _e(new
|
818
|
+
}, Qe = _e(new jt()), Z = new Je(), xl = _e(new Xe()), Al = new Et(), Le = new $t(), Ut = new Dt();
|
809
819
|
class y {
|
810
820
|
//#endregion
|
811
821
|
//#region 驱动工厂
|
@@ -819,97 +829,97 @@ class y {
|
|
819
829
|
* CDN工厂
|
820
830
|
*/
|
821
831
|
static get cdn() {
|
822
|
-
return this.create(
|
832
|
+
return this.create(qt);
|
823
833
|
}
|
824
834
|
/**
|
825
835
|
* 编码器工厂
|
826
836
|
*/
|
827
837
|
static get encoder() {
|
828
|
-
return this.create(
|
838
|
+
return this.create(zt);
|
829
839
|
}
|
830
840
|
/**
|
831
841
|
* Excel工厂
|
832
842
|
*/
|
833
843
|
static get excel() {
|
834
|
-
return this.create(
|
844
|
+
return this.create(Xt);
|
835
845
|
}
|
836
846
|
/**
|
837
847
|
* Explainer工厂
|
838
848
|
*/
|
839
849
|
static get explainer() {
|
840
|
-
return this.create(
|
850
|
+
return this.create(Gt);
|
841
851
|
}
|
842
852
|
/**
|
843
853
|
* 特征工厂
|
844
854
|
*/
|
845
855
|
static get feature() {
|
846
|
-
return this.create(
|
856
|
+
return this.create(rr);
|
847
857
|
}
|
848
858
|
/**
|
849
859
|
* 哈希工厂
|
850
860
|
*/
|
851
861
|
static get hasher() {
|
852
|
-
return this.create(
|
862
|
+
return this.create(nr);
|
853
863
|
}
|
854
864
|
/**
|
855
865
|
* Http请求工厂
|
856
866
|
*/
|
857
867
|
static get http() {
|
858
|
-
return this.create(
|
868
|
+
return this.create(cr);
|
859
869
|
}
|
860
870
|
/**
|
861
871
|
* 多语言工厂
|
862
872
|
*/
|
863
873
|
static get i18n() {
|
864
|
-
return this.create(
|
874
|
+
return this.create(hr);
|
865
875
|
}
|
866
876
|
/**
|
867
877
|
* 消息提示请求工厂
|
868
878
|
*/
|
869
879
|
static get messenger() {
|
870
|
-
return this.create(
|
880
|
+
return this.create(yr);
|
871
881
|
}
|
872
882
|
/**
|
873
883
|
* 提供程序工厂
|
874
884
|
*/
|
875
885
|
static get provider() {
|
876
|
-
return this.create(
|
886
|
+
return this.create(Mt);
|
877
887
|
}
|
878
888
|
/**
|
879
889
|
* 签名工厂
|
880
890
|
*/
|
881
891
|
static get signer() {
|
882
|
-
return this.create(
|
892
|
+
return this.create(br);
|
883
893
|
}
|
884
894
|
/**
|
885
895
|
* 通信工厂
|
886
896
|
*/
|
887
897
|
static get socket() {
|
888
|
-
return this.create(
|
898
|
+
return this.create(xr);
|
889
899
|
}
|
890
900
|
/**
|
891
901
|
* SSO工厂
|
892
902
|
*/
|
893
903
|
static get sso() {
|
894
|
-
return this.create(
|
904
|
+
return this.create($r);
|
895
905
|
}
|
896
906
|
/**
|
897
907
|
* Task工厂
|
898
908
|
*/
|
899
909
|
static get task() {
|
900
|
-
return this.create(
|
910
|
+
return this.create(Hr);
|
901
911
|
}
|
902
912
|
/**
|
903
913
|
* 模板工厂
|
904
914
|
*/
|
905
915
|
static get template() {
|
906
|
-
return this.create(
|
916
|
+
return this.create(Lr);
|
907
917
|
}
|
908
918
|
/**
|
909
919
|
* 工具工厂
|
910
920
|
*/
|
911
921
|
static get util() {
|
912
|
-
return this.create(
|
922
|
+
return this.create(Rr);
|
913
923
|
}
|
914
924
|
/**
|
915
925
|
* 工具类工厂
|
@@ -923,7 +933,7 @@ class y {
|
|
923
933
|
* 仓储工厂
|
924
934
|
*/
|
925
935
|
static get repo() {
|
926
|
-
return this.create(
|
936
|
+
return this.create(kt);
|
927
937
|
}
|
928
938
|
//#endregion
|
929
939
|
//#region 服务工厂
|
@@ -931,7 +941,7 @@ class y {
|
|
931
941
|
* 服务工厂
|
932
942
|
*/
|
933
943
|
static get svc() {
|
934
|
-
return this.create(
|
944
|
+
return this.create(Ht);
|
935
945
|
}
|
936
946
|
//#endregion
|
937
947
|
//#region 创建
|
@@ -954,7 +964,7 @@ class me {
|
|
954
964
|
n(this, "type");
|
955
965
|
}
|
956
966
|
}
|
957
|
-
class
|
967
|
+
class Ot extends me {
|
958
968
|
constructor() {
|
959
969
|
super(...arguments);
|
960
970
|
n(this, "type", "Json");
|
@@ -966,25 +976,25 @@ class Ut extends me {
|
|
966
976
|
return d.json.serialize(e.rows, !0);
|
967
977
|
}
|
968
978
|
}
|
969
|
-
class
|
979
|
+
class Lt extends me {
|
970
980
|
constructor() {
|
971
981
|
super(...arguments);
|
972
982
|
n(this, "type", "Mongo");
|
973
983
|
}
|
974
984
|
insert(e) {
|
975
985
|
let { name: t, columns: r, rows: s } = e, l = "";
|
976
|
-
for (let
|
977
|
-
let
|
978
|
-
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
|
979
989
|
`);
|
980
990
|
}
|
981
991
|
return l;
|
982
992
|
}
|
983
993
|
update(e) {
|
984
|
-
let { name: t, columns: r, rows: s } = e, l = "",
|
985
|
-
for (let
|
986
|
-
let u = s[
|
987
|
-
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
|
988
998
|
`);
|
989
999
|
}
|
990
1000
|
return l;
|
@@ -1047,8 +1057,8 @@ const te = class te extends Ce {
|
|
1047
1057
|
return await super.openAsync(e), new Promise((t, r) => {
|
1048
1058
|
let s = indexedDB.open(this.database);
|
1049
1059
|
s.onsuccess = (l) => {
|
1050
|
-
let
|
1051
|
-
te.version =
|
1060
|
+
let o = l.target.result;
|
1061
|
+
te.version = o.version, this.objectStoreNames = o.objectStoreNames, t(te.version);
|
1052
1062
|
}, s.onerror = (l) => {
|
1053
1063
|
r(l.target);
|
1054
1064
|
};
|
@@ -1061,8 +1071,8 @@ const te = class te extends Ce {
|
|
1061
1071
|
return e == null ? Promise.resolve() : this.objectStoreNames.contains(e) ? Promise.resolve(!0) : new Promise((t, r) => {
|
1062
1072
|
let s = indexedDB.open(this.database, ++te.version);
|
1063
1073
|
s.onupgradeneeded = (l) => {
|
1064
|
-
let
|
1065
|
-
|
1074
|
+
let o = l.target.result;
|
1075
|
+
o.objectStoreNames.contains(e) || o.createObjectStore(e);
|
1066
1076
|
}, s.onsuccess = (l) => {
|
1067
1077
|
t(l);
|
1068
1078
|
}, s.onerror = (l) => {
|
@@ -1089,12 +1099,12 @@ const te = class te extends Ce {
|
|
1089
1099
|
*/
|
1090
1100
|
async openTransAsync(e, t, r) {
|
1091
1101
|
return new Promise((s, l) => {
|
1092
|
-
let
|
1093
|
-
|
1102
|
+
let o = r.transaction(e, t);
|
1103
|
+
o.oncomplete = (a) => {
|
1094
1104
|
r.close();
|
1095
|
-
},
|
1096
|
-
l(
|
1097
|
-
}, s(
|
1105
|
+
}, o.onerror = (a) => {
|
1106
|
+
l(a);
|
1107
|
+
}, s(o);
|
1098
1108
|
});
|
1099
1109
|
}
|
1100
1110
|
//#endregion
|
@@ -1118,11 +1128,11 @@ const te = class te extends Ce {
|
|
1118
1128
|
}
|
1119
1129
|
async getKeysAsync(e) {
|
1120
1130
|
return e == null ? Promise.resolve() : new Promise(async (t, r) => {
|
1121
|
-
let s = await this.openDbAsync(),
|
1122
|
-
|
1131
|
+
let s = await this.openDbAsync(), a = (await this.openTransAsync(e, "readonly", s)).objectStore(e).getAllKeys();
|
1132
|
+
a.onsuccess = (u) => {
|
1123
1133
|
let p = u.target.result;
|
1124
1134
|
t(p);
|
1125
|
-
},
|
1135
|
+
}, a.onerror = (u) => {
|
1126
1136
|
r(u.target);
|
1127
1137
|
};
|
1128
1138
|
});
|
@@ -1136,14 +1146,14 @@ const te = class te extends Ce {
|
|
1136
1146
|
if (t == null || Object.is(t, NaN))
|
1137
1147
|
return;
|
1138
1148
|
let s = await this.openDbAsync();
|
1139
|
-
return new Promise(async (l,
|
1149
|
+
return new Promise(async (l, o) => {
|
1140
1150
|
let p = (await this.openTransAsync(e, "readwrite", s)).objectStore(e).add(r, t);
|
1141
1151
|
p.onsuccess = (h) => {
|
1142
1152
|
let g = h.target.result;
|
1143
1153
|
l(g);
|
1144
1154
|
}, p.onerror = (h) => {
|
1145
1155
|
let g = h.target.error;
|
1146
|
-
|
1156
|
+
o(g.message);
|
1147
1157
|
};
|
1148
1158
|
});
|
1149
1159
|
}
|
@@ -1164,14 +1174,14 @@ const te = class te extends Ce {
|
|
1164
1174
|
if (t == null || Object.is(t, NaN))
|
1165
1175
|
return;
|
1166
1176
|
let s = await this.openDbAsync();
|
1167
|
-
return new Promise(async (l,
|
1168
|
-
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);
|
1169
1179
|
h.onsuccess = (g) => {
|
1170
1180
|
let m = g.target.result;
|
1171
1181
|
l(m);
|
1172
1182
|
}, h.onerror = (g) => {
|
1173
1183
|
let m = g.target.error;
|
1174
|
-
|
1184
|
+
o(m.message);
|
1175
1185
|
};
|
1176
1186
|
});
|
1177
1187
|
}
|
@@ -1194,7 +1204,7 @@ const te = class te extends Ce {
|
|
1194
1204
|
*/
|
1195
1205
|
n(te, "version", null);
|
1196
1206
|
let ke = te;
|
1197
|
-
class
|
1207
|
+
class Rt extends Ce {
|
1198
1208
|
constructor() {
|
1199
1209
|
super(...arguments);
|
1200
1210
|
//#region 属性
|
@@ -1265,7 +1275,7 @@ class Lt extends Ce {
|
|
1265
1275
|
}
|
1266
1276
|
//#endregion
|
1267
1277
|
}
|
1268
|
-
class
|
1278
|
+
class It extends Ce {
|
1269
1279
|
constructor() {
|
1270
1280
|
super(...arguments);
|
1271
1281
|
//#region 属性
|
@@ -1308,13 +1318,18 @@ class Rt extends Ce {
|
|
1308
1318
|
}
|
1309
1319
|
//#endregion
|
1310
1320
|
}
|
1311
|
-
class
|
1321
|
+
class Mt extends D {
|
1312
1322
|
constructor() {
|
1313
1323
|
super(...arguments);
|
1324
|
+
n(this, "type", "Provider");
|
1314
1325
|
n(this, "_default");
|
1315
1326
|
}
|
1316
1327
|
open() {
|
1317
|
-
super.open(), super.
|
1328
|
+
super.open(), super.register({
|
1329
|
+
IndexedDb: ke,
|
1330
|
+
Storage: Rt,
|
1331
|
+
Cookie: It
|
1332
|
+
});
|
1318
1333
|
}
|
1319
1334
|
/**
|
1320
1335
|
* 获取默认驱动程序,并自动决定创建指定名称的仓储
|
@@ -1333,7 +1348,7 @@ class It extends D {
|
|
1333
1348
|
return super.create("Storage");
|
1334
1349
|
}
|
1335
1350
|
}
|
1336
|
-
class
|
1351
|
+
class Re {
|
1337
1352
|
/**
|
1338
1353
|
* 获取实际SQL字段名称
|
1339
1354
|
*/
|
@@ -1356,32 +1371,32 @@ class xe extends me {
|
|
1356
1371
|
n(this, "type", "Sql");
|
1357
1372
|
}
|
1358
1373
|
insert(e) {
|
1359
|
-
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(", ");
|
1360
1375
|
for (let h = 0; h < s.length; h++) {
|
1361
1376
|
let g = s[h];
|
1362
|
-
|
1363
|
-
`,
|
1364
|
-
`,
|
1365
|
-
`,
|
1377
|
+
o += `INSERT INTO ${t}\r
|
1378
|
+
`, o += `(${p})\r
|
1379
|
+
`, o += `VALUES\r
|
1380
|
+
`, o += "(";
|
1366
1381
|
let m = Object.keys(g);
|
1367
1382
|
for (let k = 0; k < m.length; k++) {
|
1368
1383
|
let O = m[k];
|
1369
1384
|
if (l != null && l.name == O)
|
1370
1385
|
continue;
|
1371
|
-
let
|
1372
|
-
|
1386
|
+
let P = g[O];
|
1387
|
+
o += `${Re.getValue(P)}`, k != m.length - 1 && (o += ", ");
|
1373
1388
|
}
|
1374
|
-
|
1389
|
+
o += ")", h != s.length - 1 && (o += `\r
|
1375
1390
|
\r
|
1376
1391
|
`);
|
1377
1392
|
}
|
1378
|
-
return
|
1393
|
+
return o;
|
1379
1394
|
}
|
1380
1395
|
update(e) {
|
1381
1396
|
return "";
|
1382
1397
|
}
|
1383
1398
|
}
|
1384
|
-
class
|
1399
|
+
class Bt extends me {
|
1385
1400
|
constructor() {
|
1386
1401
|
super(...arguments);
|
1387
1402
|
n(this, "type", "MySql");
|
@@ -1394,8 +1409,17 @@ class Mt extends me {
|
|
1394
1409
|
}
|
1395
1410
|
}
|
1396
1411
|
class Pt extends D {
|
1412
|
+
constructor() {
|
1413
|
+
super(...arguments);
|
1414
|
+
n(this, "type", "Builder");
|
1415
|
+
}
|
1397
1416
|
open() {
|
1398
|
-
super.open(), super.
|
1417
|
+
super.open(), super.register({
|
1418
|
+
Json: Ot,
|
1419
|
+
Mongo: Lt,
|
1420
|
+
MySql: Bt,
|
1421
|
+
Sql: xe
|
1422
|
+
});
|
1399
1423
|
}
|
1400
1424
|
}
|
1401
1425
|
class Sl {
|
@@ -1432,12 +1456,12 @@ class Ye {
|
|
1432
1456
|
n(this, "loadAsync", async (i) => {
|
1433
1457
|
let e = d.string.getArray(i), t = [];
|
1434
1458
|
for (let s of e) {
|
1435
|
-
let l = new Promise((
|
1459
|
+
let l = new Promise((o, a) => {
|
1436
1460
|
let u = d.dom.getByUrl(s);
|
1437
|
-
u != null ?
|
1438
|
-
|
1461
|
+
u != null ? o(u) : (u = d.dom.createByUrl(s), document.head.appendChild(u), u.onload = (p) => {
|
1462
|
+
o(u);
|
1439
1463
|
}, u.onerror = (p) => {
|
1440
|
-
|
1464
|
+
a(p);
|
1441
1465
|
let h;
|
1442
1466
|
throw p instanceof Event ? h = `${p.type}, 耗时: ${p.timeStamp}` : h = p, new Error(`脚本: ${s} 加载出错: ${h}`);
|
1443
1467
|
});
|
@@ -1452,6 +1476,15 @@ class Ye {
|
|
1452
1476
|
async openAsync(i) {
|
1453
1477
|
this.task = y.task.create("Memory"), this.task.taskLimit = 1;
|
1454
1478
|
}
|
1479
|
+
//#endregion
|
1480
|
+
async getCrypto() {
|
1481
|
+
}
|
1482
|
+
async getECharts() {
|
1483
|
+
}
|
1484
|
+
async getElementPlus() {
|
1485
|
+
}
|
1486
|
+
async getFortAwesome() {
|
1487
|
+
}
|
1455
1488
|
async getMonaco(i = null) {
|
1456
1489
|
let e = window.monaco;
|
1457
1490
|
if (e)
|
@@ -1460,16 +1493,22 @@ class Ye {
|
|
1460
1493
|
if (window.monaco)
|
1461
1494
|
return Promise.resolve();
|
1462
1495
|
await new Promise(async (s, l) => {
|
1463
|
-
let
|
1464
|
-
await this.loadFilesAsync(i,
|
1465
|
-
let
|
1466
|
-
|
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) => {
|
1467
1500
|
s(u);
|
1468
1501
|
});
|
1469
1502
|
});
|
1470
1503
|
};
|
1471
1504
|
return await this.task.concurrent(t), e = window.monaco, e;
|
1472
1505
|
}
|
1506
|
+
async getQuill() {
|
1507
|
+
}
|
1508
|
+
async getWeiXin() {
|
1509
|
+
}
|
1510
|
+
async getXlsx() {
|
1511
|
+
}
|
1473
1512
|
//#region 加载
|
1474
1513
|
/**
|
1475
1514
|
* 使用并发限制顺序加载资源,并防止monaco-editor的define函数冲突
|
@@ -1494,7 +1533,7 @@ class Ye {
|
|
1494
1533
|
}
|
1495
1534
|
//#endregion
|
1496
1535
|
}
|
1497
|
-
class
|
1536
|
+
class Ft extends Ye {
|
1498
1537
|
constructor() {
|
1499
1538
|
super(...arguments);
|
1500
1539
|
//#region 属性
|
@@ -1532,7 +1571,7 @@ class Bt extends Ye {
|
|
1532
1571
|
return await super.loadFilesAsync("/assets/xlsx-js-style@1.2.0", e), window.XLSX;
|
1533
1572
|
}
|
1534
1573
|
}
|
1535
|
-
class
|
1574
|
+
class Nt extends Ye {
|
1536
1575
|
constructor() {
|
1537
1576
|
super(...arguments);
|
1538
1577
|
//#region 属性
|
@@ -1581,22 +1620,31 @@ class Ft extends Ye {
|
|
1581
1620
|
return await super.loadFilesAsync(`${this.jdCdn}/xlsx-js-style@1.2.0`, e), window.XLSX;
|
1582
1621
|
}
|
1583
1622
|
}
|
1584
|
-
class
|
1623
|
+
class qt extends D {
|
1624
|
+
constructor() {
|
1625
|
+
super(...arguments);
|
1626
|
+
n(this, "type", "Cdn");
|
1627
|
+
}
|
1585
1628
|
open() {
|
1586
|
-
super.open(), super.
|
1629
|
+
super.open(), super.register({
|
1630
|
+
Local: Ft,
|
1631
|
+
Third: Nt
|
1632
|
+
});
|
1587
1633
|
}
|
1588
1634
|
/**
|
1589
1635
|
* 获取指定CDN实例
|
1590
1636
|
*/
|
1591
|
-
async createAsync(
|
1592
|
-
let
|
1593
|
-
return await
|
1637
|
+
async createAsync(e, t) {
|
1638
|
+
let r = await super.createAsync(e);
|
1639
|
+
return await r.openAsync(t), r;
|
1594
1640
|
}
|
1595
1641
|
}
|
1596
|
-
class
|
1642
|
+
class Ge {
|
1597
1643
|
constructor() {
|
1598
1644
|
n(this, "type");
|
1599
1645
|
}
|
1646
|
+
openAsync(i) {
|
1647
|
+
}
|
1600
1648
|
encode(i) {
|
1601
1649
|
let e;
|
1602
1650
|
return typeof i == "object" ? e = JSON.stringify(i) : e = i, this.encodeString(e);
|
@@ -1606,7 +1654,7 @@ class Xe {
|
|
1606
1654
|
return JSON.parse(e);
|
1607
1655
|
}
|
1608
1656
|
}
|
1609
|
-
class Vt extends
|
1657
|
+
class Vt extends Ge {
|
1610
1658
|
constructor() {
|
1611
1659
|
super(...arguments);
|
1612
1660
|
//#region 属性
|
@@ -1628,7 +1676,7 @@ class Vt extends Xe {
|
|
1628
1676
|
return this.crypto.enc.Utf8.stringify(t);
|
1629
1677
|
}
|
1630
1678
|
}
|
1631
|
-
class
|
1679
|
+
class Wt extends Ge {
|
1632
1680
|
constructor() {
|
1633
1681
|
super(...arguments);
|
1634
1682
|
n(this, "type", "Url");
|
@@ -1640,16 +1688,23 @@ class qt extends Xe {
|
|
1640
1688
|
return decodeURIComponent(e);
|
1641
1689
|
}
|
1642
1690
|
}
|
1643
|
-
class
|
1691
|
+
class zt extends D {
|
1692
|
+
constructor() {
|
1693
|
+
super(...arguments);
|
1694
|
+
n(this, "type", "Encoder");
|
1695
|
+
}
|
1644
1696
|
open() {
|
1645
|
-
super.open(), super.
|
1697
|
+
super.open(), super.register({
|
1698
|
+
Base64: Vt,
|
1699
|
+
Url: Wt
|
1700
|
+
});
|
1646
1701
|
}
|
1647
1702
|
/**
|
1648
1703
|
* 创建执行类型的Hash实例
|
1649
1704
|
*/
|
1650
|
-
async createAsync(
|
1651
|
-
let
|
1652
|
-
return await
|
1705
|
+
async createAsync(e, t) {
|
1706
|
+
let r = await super.createAsync(e);
|
1707
|
+
return await r.openAsync(null), r;
|
1653
1708
|
}
|
1654
1709
|
/**
|
1655
1710
|
* 获取Base64 编码器对象
|
@@ -1661,12 +1716,12 @@ class Wt extends D {
|
|
1661
1716
|
return this.createWithCache("Url");
|
1662
1717
|
}
|
1663
1718
|
}
|
1664
|
-
class
|
1719
|
+
class Kt {
|
1665
1720
|
constructor() {
|
1666
1721
|
n(this, "type");
|
1667
1722
|
}
|
1668
1723
|
}
|
1669
|
-
class
|
1724
|
+
class Jt extends Kt {
|
1670
1725
|
constructor() {
|
1671
1726
|
super(...arguments);
|
1672
1727
|
//#region 属性
|
@@ -1695,12 +1750,12 @@ class Kt extends zt {
|
|
1695
1750
|
m.push(g[k]);
|
1696
1751
|
}), s.push(m);
|
1697
1752
|
}
|
1698
|
-
let
|
1699
|
-
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");
|
1700
1755
|
let u = 65;
|
1701
1756
|
for (let h = 0; h < r.length; h++) {
|
1702
1757
|
let m = `${String.fromCharCode(u + h)}1`;
|
1703
|
-
|
1758
|
+
a[m].s = {
|
1704
1759
|
alignment: { horizontal: "center" },
|
1705
1760
|
font: { bold: !0, color: { rgb: "000000" } },
|
1706
1761
|
fill: { fgColor: { rgb: "409eff" } }
|
@@ -1710,19 +1765,25 @@ class Kt extends zt {
|
|
1710
1765
|
r.forEach((h) => {
|
1711
1766
|
let g = e[0][h], m = { wpx: 50 };
|
1712
1767
|
typeof g == "string" && (m.wpx = 100), p.push(m);
|
1713
|
-
}),
|
1768
|
+
}), a["!cols"] = p, this.xlsx.writeFile(o, t);
|
1714
1769
|
}
|
1715
1770
|
}
|
1716
|
-
class
|
1771
|
+
class Xt extends D {
|
1772
|
+
constructor() {
|
1773
|
+
super(...arguments);
|
1774
|
+
n(this, "type", "Excel");
|
1775
|
+
}
|
1717
1776
|
open() {
|
1718
|
-
super.
|
1777
|
+
super.open(), super.register({
|
1778
|
+
Xlsx: Jt
|
1779
|
+
});
|
1719
1780
|
}
|
1720
1781
|
/**
|
1721
1782
|
* 获取Excel实例
|
1722
1783
|
*/
|
1723
|
-
async createAsync(
|
1724
|
-
let
|
1725
|
-
return await
|
1784
|
+
async createAsync(e, t) {
|
1785
|
+
let r = await super.createAsync(e);
|
1786
|
+
return await r.openAsync(t), r;
|
1726
1787
|
}
|
1727
1788
|
}
|
1728
1789
|
class Qt {
|
@@ -1732,80 +1793,99 @@ class Qt {
|
|
1732
1793
|
}
|
1733
1794
|
class Yt extends Qt {
|
1734
1795
|
}
|
1735
|
-
class
|
1796
|
+
class Gt extends D {
|
1797
|
+
constructor() {
|
1798
|
+
super(...arguments);
|
1799
|
+
n(this, "type", "Explainer");
|
1800
|
+
}
|
1736
1801
|
open() {
|
1737
|
-
super.open(), super.
|
1802
|
+
super.open(), super.register({
|
1803
|
+
Json: Yt
|
1804
|
+
});
|
1738
1805
|
}
|
1739
1806
|
}
|
1740
|
-
class
|
1807
|
+
class Te {
|
1741
1808
|
constructor() {
|
1742
|
-
n(this, "type"
|
1809
|
+
n(this, "type");
|
1743
1810
|
}
|
1744
1811
|
openAsync(i) {
|
1812
|
+
return d.json.mergeTo(this, i), Promise.resolve();
|
1745
1813
|
}
|
1746
|
-
|
1747
|
-
|
1814
|
+
}
|
1815
|
+
class Zt extends Te {
|
1816
|
+
constructor() {
|
1817
|
+
super(...arguments);
|
1818
|
+
n(this, "type", "Sort");
|
1819
|
+
}
|
1820
|
+
add(e, t, r, s) {
|
1821
|
+
this.resort(e, t, r);
|
1748
1822
|
}
|
1749
|
-
insert(
|
1750
|
-
this.resort(
|
1823
|
+
insert(e, t, r, s, l) {
|
1824
|
+
this.resort(e, t, r);
|
1751
1825
|
}
|
1752
1826
|
//复制时,自动往后排序
|
1753
|
-
copy(
|
1754
|
-
this.resort(
|
1827
|
+
copy(e, t, r) {
|
1828
|
+
this.resort(e, t, r);
|
1755
1829
|
}
|
1756
1830
|
//重新排序
|
1757
|
-
resort(
|
1758
|
-
let
|
1759
|
-
for (let
|
1760
|
-
let
|
1761
|
-
|
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;
|
1762
1836
|
}
|
1763
1837
|
}
|
1764
1838
|
}
|
1765
|
-
class
|
1839
|
+
class er extends Te {
|
1766
1840
|
constructor() {
|
1841
|
+
super(...arguments);
|
1767
1842
|
n(this, "type", "I18N");
|
1768
1843
|
}
|
1769
|
-
|
1770
|
-
}
|
1771
|
-
add(i, e, t, r) {
|
1844
|
+
add(e, t, r, s) {
|
1772
1845
|
}
|
1773
|
-
insert(
|
1846
|
+
insert(e, t, r, s, l) {
|
1774
1847
|
}
|
1775
|
-
copy(
|
1848
|
+
copy(e, t, r) {
|
1776
1849
|
}
|
1777
1850
|
}
|
1778
|
-
class
|
1851
|
+
class tr extends Te {
|
1779
1852
|
constructor() {
|
1853
|
+
super(...arguments);
|
1780
1854
|
n(this, "type", "Expression");
|
1781
1855
|
}
|
1782
|
-
|
1856
|
+
add(e, t, r, s) {
|
1783
1857
|
}
|
1784
|
-
|
1858
|
+
insert(e, t, r, s, l) {
|
1785
1859
|
}
|
1786
|
-
|
1787
|
-
}
|
1788
|
-
copy(i, e, t) {
|
1860
|
+
copy(e, t, r) {
|
1789
1861
|
}
|
1790
1862
|
}
|
1791
|
-
class
|
1863
|
+
class rr extends D {
|
1864
|
+
constructor() {
|
1865
|
+
super(...arguments);
|
1866
|
+
n(this, "type", "Feature");
|
1867
|
+
}
|
1792
1868
|
open() {
|
1793
|
-
super.open(), super.
|
1869
|
+
super.open(), super.register({
|
1870
|
+
Sort: Zt,
|
1871
|
+
I18N: er,
|
1872
|
+
Expression: tr
|
1873
|
+
});
|
1794
1874
|
}
|
1795
1875
|
/**
|
1796
1876
|
* 获取指定特征实例
|
1797
1877
|
*/
|
1798
|
-
async createAsync(
|
1799
|
-
let
|
1800
|
-
return await
|
1878
|
+
async createAsync(e, t) {
|
1879
|
+
let r = await super.createAsync(e);
|
1880
|
+
return await r.openAsync(null), r;
|
1801
1881
|
}
|
1802
1882
|
}
|
1803
|
-
class
|
1883
|
+
class Ze {
|
1804
1884
|
constructor() {
|
1805
1885
|
n(this, "type");
|
1806
1886
|
}
|
1807
1887
|
}
|
1808
|
-
class
|
1888
|
+
class sr extends Ze {
|
1809
1889
|
constructor() {
|
1810
1890
|
super(...arguments);
|
1811
1891
|
//#region 属性
|
@@ -1813,7 +1893,7 @@ class rr extends Ge {
|
|
1813
1893
|
//#endregion
|
1814
1894
|
n(this, "compute", async (e) => {
|
1815
1895
|
let r = new TextEncoder().encode(e), s = await crypto.subtle.digest("SHA-256", r);
|
1816
|
-
return Array.from(new Uint8Array(s)).map((
|
1896
|
+
return Array.from(new Uint8Array(s)).map((a) => a.toString(16).padStart(2, "0")).join("");
|
1817
1897
|
});
|
1818
1898
|
}
|
1819
1899
|
//#endregion
|
@@ -1821,7 +1901,7 @@ class rr extends Ge {
|
|
1821
1901
|
async openAsync(e) {
|
1822
1902
|
}
|
1823
1903
|
}
|
1824
|
-
class
|
1904
|
+
class lr extends Ze {
|
1825
1905
|
constructor() {
|
1826
1906
|
super(...arguments);
|
1827
1907
|
//#region 属性
|
@@ -1839,13 +1919,20 @@ class sr extends Ge {
|
|
1839
1919
|
this.crypto = await le.getCrypto();
|
1840
1920
|
}
|
1841
1921
|
}
|
1842
|
-
class
|
1922
|
+
class nr extends D {
|
1923
|
+
constructor() {
|
1924
|
+
super(...arguments);
|
1925
|
+
n(this, "type", "Hasher");
|
1926
|
+
}
|
1843
1927
|
open() {
|
1844
|
-
super.open(), super.
|
1928
|
+
super.open(), super.register({
|
1929
|
+
Sha256: sr,
|
1930
|
+
Md5: lr
|
1931
|
+
});
|
1845
1932
|
}
|
1846
|
-
async createAsync(
|
1847
|
-
let
|
1848
|
-
return await
|
1933
|
+
async createAsync(e, t) {
|
1934
|
+
let r = await super.createAsync(e);
|
1935
|
+
return await r.openAsync(null), r;
|
1849
1936
|
}
|
1850
1937
|
/**
|
1851
1938
|
* 获取MD5 Hash对象
|
@@ -1854,7 +1941,7 @@ class lr extends D {
|
|
1854
1941
|
return this.createWithCacheAsync("Md5");
|
1855
1942
|
}
|
1856
1943
|
}
|
1857
|
-
class
|
1944
|
+
class et {
|
1858
1945
|
constructor() {
|
1859
1946
|
/**
|
1860
1947
|
* 请求唯一标识
|
@@ -1916,7 +2003,7 @@ class Ze {
|
|
1916
2003
|
}
|
1917
2004
|
//#endregion
|
1918
2005
|
}
|
1919
|
-
class
|
2006
|
+
class tt extends et {
|
1920
2007
|
constructor() {
|
1921
2008
|
super();
|
1922
2009
|
/**
|
@@ -1934,7 +2021,7 @@ class et extends Ze {
|
|
1934
2021
|
this.id = d.string.getUniqueId(8);
|
1935
2022
|
}
|
1936
2023
|
}
|
1937
|
-
class
|
2024
|
+
class ir {
|
1938
2025
|
constructor() {
|
1939
2026
|
n(this, "request");
|
1940
2027
|
n(this, "model");
|
@@ -1943,7 +2030,7 @@ class nr {
|
|
1943
2030
|
n(this, "time");
|
1944
2031
|
}
|
1945
2032
|
}
|
1946
|
-
class
|
2033
|
+
class Ee {
|
1947
2034
|
constructor() {
|
1948
2035
|
//#region 属性
|
1949
2036
|
n(this, "type");
|
@@ -1980,7 +2067,7 @@ class Te {
|
|
1980
2067
|
* 获取请求消息
|
1981
2068
|
*/
|
1982
2069
|
n(this, "getRequest", async (i, e, t, r = null) => {
|
1983
|
-
let s = new
|
2070
|
+
let s = new tt();
|
1984
2071
|
return s.method = i, s.contentType = e, s.path = t, s.body = d.json.serializeWithoutString(r), s;
|
1985
2072
|
});
|
1986
2073
|
}
|
@@ -2010,11 +2097,11 @@ class Te {
|
|
2010
2097
|
async prepareAsync(i, e) {
|
2011
2098
|
if (i.prepare(), e == null || e.length == 0)
|
2012
2099
|
return;
|
2013
|
-
let t = this.encoder.encode(e), r = d.time.getTimestamp(), s = d.time.formatDateTime(/* @__PURE__ */ new Date()), l = new
|
2100
|
+
let t = this.encoder.encode(e), r = d.time.getTimestamp(), s = d.time.formatDateTime(/* @__PURE__ */ new Date()), l = new ir();
|
2014
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);
|
2015
2102
|
}
|
2016
2103
|
}
|
2017
|
-
class
|
2104
|
+
class Ie extends et {
|
2018
2105
|
constructor() {
|
2019
2106
|
super(...arguments);
|
2020
2107
|
//#region 附加信息
|
@@ -2045,7 +2132,7 @@ class Re extends Ze {
|
|
2045
2132
|
n(this, "request");
|
2046
2133
|
}
|
2047
2134
|
}
|
2048
|
-
class
|
2135
|
+
class or extends Ee {
|
2049
2136
|
constructor() {
|
2050
2137
|
super(...arguments);
|
2051
2138
|
//#region 属性
|
@@ -2063,8 +2150,8 @@ class ir extends Te {
|
|
2063
2150
|
if (t.status == 0)
|
2064
2151
|
t.message = `网络异常,请检查接口访问是否正常: ${e.method} ${e.url} ${l}`;
|
2065
2152
|
else {
|
2066
|
-
let
|
2067
|
-
t.message = `接口加载异常: ${e.method}${
|
2153
|
+
let o = t.status ? `(${t.status})` : "";
|
2154
|
+
t.message = `接口加载异常: ${e.method}${o} ${e.url} ${l}`;
|
2068
2155
|
}
|
2069
2156
|
}
|
2070
2157
|
return await ((s = this.onResponse) == null ? void 0 : s.call(this, t)), t;
|
@@ -2088,7 +2175,7 @@ class ir extends Te {
|
|
2088
2175
|
* 使用Fetch发送请求,谷歌插件场景专用
|
2089
2176
|
*/
|
2090
2177
|
async sendWithFetch(e) {
|
2091
|
-
let t = new
|
2178
|
+
let t = new Ie();
|
2092
2179
|
t.request = e, t.id = e.id;
|
2093
2180
|
let r = {
|
2094
2181
|
method: e.method,
|
@@ -2107,32 +2194,32 @@ class ir extends Te {
|
|
2107
2194
|
* 使用XmlHttpRequest发送请求
|
2108
2195
|
*/
|
2109
2196
|
sendWithXmlHttpRequest(e) {
|
2110
|
-
let t = new
|
2197
|
+
let t = new Ie();
|
2111
2198
|
return t.request = e, t.id = e.id, new Promise(async (r, s) => {
|
2112
2199
|
let l = new XMLHttpRequest();
|
2113
2200
|
if (l.open(e.method, e.url), e.headers != null)
|
2114
|
-
for (let
|
2115
|
-
let
|
2116
|
-
l.setRequestHeader(
|
2201
|
+
for (let o in e.headers) {
|
2202
|
+
let a = e.headers[o];
|
2203
|
+
l.setRequestHeader(o, a);
|
2117
2204
|
}
|
2118
2205
|
l.onreadystatechange = async () => {
|
2119
2206
|
if (l.readyState == 4) {
|
2120
2207
|
t.status = l.status, t.body = l.responseText;
|
2121
|
-
let
|
2122
|
-
`),
|
2123
|
-
for (let u = 0; u <
|
2124
|
-
let p =
|
2125
|
-
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(": "));
|
2126
2213
|
}
|
2127
|
-
t.headers =
|
2214
|
+
t.headers = a, t.contentType = t.getHeader("content-type"), t.ok = l.status == 200, r(t);
|
2128
2215
|
}
|
2129
|
-
}, l.onerror = async (
|
2130
|
-
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);
|
2131
2218
|
}, l.send(e.body);
|
2132
2219
|
});
|
2133
2220
|
}
|
2134
2221
|
}
|
2135
|
-
class ar extends
|
2222
|
+
class ar extends Ee {
|
2136
2223
|
constructor() {
|
2137
2224
|
super(...arguments);
|
2138
2225
|
//#region 属性
|
@@ -2176,16 +2263,16 @@ class ar extends Te {
|
|
2176
2263
|
let l = d.url.deserialize(e.path);
|
2177
2264
|
for (let g in l)
|
2178
2265
|
s[g] = l[g];
|
2179
|
-
let
|
2266
|
+
let o = d.url.getPath(e.path);
|
2180
2267
|
s = d.dictionary.sort(s);
|
2181
|
-
let
|
2268
|
+
let a = d.sign.signDictionary(s, !1), u = `POST${o}?${a}${this.appSecret}`, p = await this.hasher.compute(u);
|
2182
2269
|
s.sign = p.toLowerCase(), delete s.jsonBody, s = d.dictionary.sort(s);
|
2183
2270
|
let h = d.url.serialize(s);
|
2184
|
-
e.url = d.url.concatUrl(this.baseUrl,
|
2271
|
+
e.url = d.url.concatUrl(this.baseUrl, o + "?" + h);
|
2185
2272
|
});
|
2186
2273
|
}
|
2187
2274
|
}
|
2188
|
-
class
|
2275
|
+
class ur extends Ee {
|
2189
2276
|
constructor() {
|
2190
2277
|
super(...arguments);
|
2191
2278
|
//#region 属性
|
@@ -2232,8 +2319,8 @@ class or extends Te {
|
|
2232
2319
|
if (this.user == null)
|
2233
2320
|
r = this.platform;
|
2234
2321
|
else {
|
2235
|
-
let l = d.time.getTimestamp(),
|
2236
|
-
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);
|
2237
2324
|
}
|
2238
2325
|
let s = {};
|
2239
2326
|
s.Authorization = r, e.getHeader("Accept-Language") || (s["Accept-Language"] = this.language), e.addHeaders(s);
|
@@ -2251,9 +2338,17 @@ class or extends Te {
|
|
2251
2338
|
});
|
2252
2339
|
}
|
2253
2340
|
}
|
2254
|
-
class
|
2341
|
+
class cr extends D {
|
2342
|
+
constructor() {
|
2343
|
+
super(...arguments);
|
2344
|
+
n(this, "type", "Http");
|
2345
|
+
}
|
2255
2346
|
open() {
|
2256
|
-
super.open(), super.
|
2347
|
+
super.open(), super.register({
|
2348
|
+
Default: or,
|
2349
|
+
Mk: ar,
|
2350
|
+
Halo: ur
|
2351
|
+
});
|
2257
2352
|
}
|
2258
2353
|
/**
|
2259
2354
|
* 获取默认请求器
|
@@ -2269,7 +2364,7 @@ class ur extends D {
|
|
2269
2364
|
return this.createWithCache("Halo");
|
2270
2365
|
}
|
2271
2366
|
}
|
2272
|
-
class
|
2367
|
+
class dr {
|
2273
2368
|
constructor() {
|
2274
2369
|
//#region 属性
|
2275
2370
|
n(this, "type");
|
@@ -2351,7 +2446,7 @@ class cr {
|
|
2351
2446
|
}
|
2352
2447
|
//#endregion
|
2353
2448
|
}
|
2354
|
-
class
|
2449
|
+
class pr extends dr {
|
2355
2450
|
constructor() {
|
2356
2451
|
super(...arguments);
|
2357
2452
|
n(this, "type", "Default");
|
@@ -2370,21 +2465,21 @@ class dr extends cr {
|
|
2370
2465
|
e == null && (e = this.lang);
|
2371
2466
|
let t = new Promise(async (s) => {
|
2372
2467
|
let l = { conditions: [{ name: "lang", value: e }] };
|
2373
|
-
return _.post("/i18n/set", l).then(({ data:
|
2374
|
-
for (let
|
2375
|
-
let u = `${e}.${
|
2376
|
-
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);
|
2377
2472
|
}
|
2378
|
-
s(
|
2473
|
+
s(o);
|
2379
2474
|
});
|
2380
2475
|
}), r = new Promise((s) => {
|
2381
2476
|
let l = { conditions: [{ name: "lang", value: e }] };
|
2382
|
-
_.post("/i18n_business/set", l).then(({ data:
|
2383
|
-
for (let
|
2384
|
-
let u = `${e}._business.${
|
2385
|
-
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);
|
2386
2481
|
}
|
2387
|
-
s(
|
2482
|
+
s(o);
|
2388
2483
|
});
|
2389
2484
|
});
|
2390
2485
|
await Promise.all([t, r]);
|
@@ -2395,19 +2490,25 @@ class dr extends cr {
|
|
2395
2490
|
await super.openAsync(e);
|
2396
2491
|
}
|
2397
2492
|
}
|
2398
|
-
class
|
2493
|
+
class hr extends D {
|
2494
|
+
constructor() {
|
2495
|
+
super(...arguments);
|
2496
|
+
n(this, "type", "I18n");
|
2497
|
+
}
|
2399
2498
|
//#region 开启
|
2400
2499
|
open() {
|
2401
|
-
super.open(), super.
|
2500
|
+
super.open(), super.register({
|
2501
|
+
Default: pr
|
2502
|
+
});
|
2402
2503
|
}
|
2403
2504
|
//#endregion
|
2404
2505
|
}
|
2405
|
-
class
|
2506
|
+
class gr {
|
2406
2507
|
constructor() {
|
2407
2508
|
n(this, "type");
|
2408
2509
|
}
|
2409
2510
|
}
|
2410
|
-
class
|
2511
|
+
class fr extends gr {
|
2411
2512
|
constructor() {
|
2412
2513
|
super(...arguments);
|
2413
2514
|
n(this, "type", "Console");
|
@@ -2434,9 +2535,15 @@ class gr extends hr {
|
|
2434
2535
|
console.warn(e);
|
2435
2536
|
}
|
2436
2537
|
}
|
2437
|
-
class
|
2538
|
+
class yr extends D {
|
2539
|
+
constructor() {
|
2540
|
+
super(...arguments);
|
2541
|
+
n(this, "type", "Messenger");
|
2542
|
+
}
|
2438
2543
|
open() {
|
2439
|
-
super.open(), super.
|
2544
|
+
super.open(), super.register({
|
2545
|
+
Console: fr
|
2546
|
+
});
|
2440
2547
|
}
|
2441
2548
|
/**
|
2442
2549
|
* 获取控制台消息提示类型
|
@@ -2445,18 +2552,18 @@ class fr extends D {
|
|
2445
2552
|
return await super.create("Console");
|
2446
2553
|
}
|
2447
2554
|
}
|
2448
|
-
class
|
2555
|
+
class mr {
|
2449
2556
|
constructor() {
|
2450
2557
|
n(this, "type");
|
2451
2558
|
}
|
2452
2559
|
}
|
2453
|
-
class
|
2560
|
+
class vr extends mr {
|
2454
2561
|
constructor() {
|
2455
2562
|
super(...arguments);
|
2456
2563
|
n(this, "type", "Default");
|
2457
2564
|
n(this, "getSign", async (e, t, r, s, l) => {
|
2458
|
-
let
|
2459
|
-
return (await
|
2565
|
+
let a = `${e}.${t}.${r ?? ""}.${s}.${l}`;
|
2566
|
+
return (await it.compute(a)).toUpperCase();
|
2460
2567
|
});
|
2461
2568
|
}
|
2462
2569
|
async openAsync(e) {
|
@@ -2469,16 +2576,22 @@ class mr extends yr {
|
|
2469
2576
|
dispose() {
|
2470
2577
|
}
|
2471
2578
|
}
|
2472
|
-
class
|
2579
|
+
class br extends D {
|
2580
|
+
constructor() {
|
2581
|
+
super(...arguments);
|
2582
|
+
n(this, "type", "Signer");
|
2583
|
+
}
|
2473
2584
|
open() {
|
2474
|
-
super.open(), super.
|
2585
|
+
super.open(), super.register({
|
2586
|
+
Default: vr
|
2587
|
+
});
|
2475
2588
|
}
|
2476
2589
|
/**
|
2477
2590
|
* 获取指定签名实例
|
2478
2591
|
*/
|
2479
|
-
async createAsync(
|
2480
|
-
let
|
2481
|
-
return await
|
2592
|
+
async createAsync(e, t) {
|
2593
|
+
let r = await super.createAsync(e);
|
2594
|
+
return await r.openAsync(null), r;
|
2482
2595
|
}
|
2483
2596
|
}
|
2484
2597
|
class wr {
|
@@ -2501,8 +2614,8 @@ class wr {
|
|
2501
2614
|
await this.send(s);
|
2502
2615
|
let l = this.subscribed[i];
|
2503
2616
|
l == null && (l = {}, this.subscribed[i] = l);
|
2504
|
-
let
|
2505
|
-
|
2617
|
+
let o = l[e];
|
2618
|
+
o == null && (o = [], l[e] = o), o.push(...r);
|
2506
2619
|
}
|
2507
2620
|
async resubscribe() {
|
2508
2621
|
let i = Object.keys(this.subscribed);
|
@@ -2510,8 +2623,8 @@ class wr {
|
|
2510
2623
|
for (let e of i) {
|
2511
2624
|
let t = this.subscribed[e], r = Object.keys(t);
|
2512
2625
|
for (let s of r) {
|
2513
|
-
let l = t[s],
|
2514
|
-
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);
|
2515
2628
|
}
|
2516
2629
|
}
|
2517
2630
|
}
|
@@ -2520,7 +2633,7 @@ class wr {
|
|
2520
2633
|
await this.send(e), delete this.subscribed[i];
|
2521
2634
|
}
|
2522
2635
|
}
|
2523
|
-
class
|
2636
|
+
class kr extends wr {
|
2524
2637
|
constructor() {
|
2525
2638
|
super(...arguments);
|
2526
2639
|
//#region 属性
|
@@ -2549,7 +2662,7 @@ class br extends wr {
|
|
2549
2662
|
//#endregion
|
2550
2663
|
async connect() {
|
2551
2664
|
if (this.reconnect = !0, this.socket == null || this.reconnect) {
|
2552
|
-
let t = new
|
2665
|
+
let t = new tt();
|
2553
2666
|
t.path = this.url, t.method = "GET", await _.prepareAsync(t);
|
2554
2667
|
let r = t.getHeader("Authorization"), s = d.url.encode(r), l = `${this.url}?authorization=${s}`;
|
2555
2668
|
this.socket = new WebSocket(l);
|
@@ -2579,9 +2692,15 @@ class br extends wr {
|
|
2579
2692
|
this.socket.close(), this.reconnect = !1, this.connected = null, this.handler = null;
|
2580
2693
|
}
|
2581
2694
|
}
|
2582
|
-
class
|
2695
|
+
class xr extends D {
|
2696
|
+
constructor() {
|
2697
|
+
super(...arguments);
|
2698
|
+
n(this, "type", "Socket");
|
2699
|
+
}
|
2583
2700
|
open() {
|
2584
|
-
super.open(), super.
|
2701
|
+
super.open(), super.register({
|
2702
|
+
Default: kr
|
2703
|
+
});
|
2585
2704
|
}
|
2586
2705
|
/**
|
2587
2706
|
* 默认通信对象
|
@@ -2672,7 +2791,7 @@ class Cl {
|
|
2672
2791
|
this.ok = !1, this.message = i;
|
2673
2792
|
}
|
2674
2793
|
}
|
2675
|
-
class
|
2794
|
+
class Ar {
|
2676
2795
|
constructor() {
|
2677
2796
|
//#region 属性
|
2678
2797
|
n(this, "type", "Bearer");
|
@@ -2704,7 +2823,7 @@ class xr {
|
|
2704
2823
|
await this.provider.deleteAsync("user", "user"), await this.provider.deleteAsync("user", "sso");
|
2705
2824
|
}
|
2706
2825
|
}
|
2707
|
-
class
|
2826
|
+
class Sr {
|
2708
2827
|
constructor() {
|
2709
2828
|
//#region 属性
|
2710
2829
|
n(this, "type", "Nio");
|
@@ -2738,7 +2857,7 @@ class Ar {
|
|
2738
2857
|
await this.provider.deleteAsync("user", "user"), await this.provider.deleteAsync("user", "sso");
|
2739
2858
|
}
|
2740
2859
|
}
|
2741
|
-
class
|
2860
|
+
class rt {
|
2742
2861
|
constructor() {
|
2743
2862
|
/**
|
2744
2863
|
* 用户标识
|
@@ -2758,7 +2877,7 @@ class tt {
|
|
2758
2877
|
n(this, "identity");
|
2759
2878
|
}
|
2760
2879
|
}
|
2761
|
-
class
|
2880
|
+
class _r {
|
2762
2881
|
constructor() {
|
2763
2882
|
n(this, "type", "WeiXin");
|
2764
2883
|
}
|
@@ -2770,7 +2889,7 @@ class Sr {
|
|
2770
2889
|
return "";
|
2771
2890
|
}
|
2772
2891
|
async getUser() {
|
2773
|
-
let i = new
|
2892
|
+
let i = new rt();
|
2774
2893
|
return i.userId = "", i;
|
2775
2894
|
}
|
2776
2895
|
getAuth(i, e, t, r) {
|
@@ -2780,12 +2899,12 @@ class Sr {
|
|
2780
2899
|
return Promise.resolve();
|
2781
2900
|
}
|
2782
2901
|
}
|
2783
|
-
class
|
2902
|
+
class Cr {
|
2784
2903
|
constructor() {
|
2785
2904
|
n(this, "type");
|
2786
2905
|
}
|
2787
2906
|
}
|
2788
|
-
class
|
2907
|
+
class Tr extends Cr {
|
2789
2908
|
constructor() {
|
2790
2909
|
super(...arguments);
|
2791
2910
|
//#region 属性
|
@@ -2810,7 +2929,7 @@ class Cr extends _r {
|
|
2810
2929
|
let r = d.string.getUniqueId();
|
2811
2930
|
await this.provider.saveAsync("anonymous", "anonymous", r), e = r;
|
2812
2931
|
}
|
2813
|
-
let t = new
|
2932
|
+
let t = new rt();
|
2814
2933
|
return t.identity = { token: e }, t;
|
2815
2934
|
}
|
2816
2935
|
getAuth(e, t, r, s) {
|
@@ -2820,7 +2939,7 @@ class Cr extends _r {
|
|
2820
2939
|
await this.provider.deleteAsync("anonymous", "anonymous");
|
2821
2940
|
}
|
2822
2941
|
}
|
2823
|
-
class
|
2942
|
+
class Er {
|
2824
2943
|
constructor() {
|
2825
2944
|
//#region 属性
|
2826
2945
|
n(this, "type", "Secret");
|
@@ -2852,22 +2971,32 @@ class Tr {
|
|
2852
2971
|
await this.provider.deleteAsync("user");
|
2853
2972
|
}
|
2854
2973
|
}
|
2855
|
-
class
|
2974
|
+
class $r extends D {
|
2975
|
+
constructor() {
|
2976
|
+
super(...arguments);
|
2977
|
+
n(this, "type", "Sso");
|
2978
|
+
}
|
2856
2979
|
/**
|
2857
2980
|
* 获取实例
|
2858
2981
|
*/
|
2859
2982
|
open() {
|
2860
|
-
super.open(), super.
|
2983
|
+
super.open(), super.register({
|
2984
|
+
Secret: Er,
|
2985
|
+
Nio: Sr,
|
2986
|
+
WeiXin: _r,
|
2987
|
+
Bearer: Ar,
|
2988
|
+
Anonymous: Tr
|
2989
|
+
});
|
2861
2990
|
}
|
2862
2991
|
/**
|
2863
2992
|
* 获取指定SSO实例
|
2864
2993
|
*/
|
2865
|
-
async createAsync(
|
2866
|
-
let
|
2867
|
-
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;
|
2868
2997
|
}
|
2869
2998
|
}
|
2870
|
-
class
|
2999
|
+
class jr {
|
2871
3000
|
constructor() {
|
2872
3001
|
//#region 属性
|
2873
3002
|
n(this, "type");
|
@@ -2875,7 +3004,7 @@ class $r {
|
|
2875
3004
|
}
|
2876
3005
|
//#endregion
|
2877
3006
|
}
|
2878
|
-
class
|
3007
|
+
class Dr extends jr {
|
2879
3008
|
constructor() {
|
2880
3009
|
super(...arguments);
|
2881
3010
|
//#region 属性
|
@@ -2904,7 +3033,7 @@ class jr extends $r {
|
|
2904
3033
|
async execute(e, t, r) {
|
2905
3034
|
if (e.length == 0)
|
2906
3035
|
return;
|
2907
|
-
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));
|
2908
3037
|
await Promise.all(l);
|
2909
3038
|
}
|
2910
3039
|
async frequency(e, t, r, s) {
|
@@ -2939,57 +3068,72 @@ class jr extends $r {
|
|
2939
3068
|
clearInterval(this.intervalTimeout), clearTimeout(this.lastDebounceTimeout);
|
2940
3069
|
}
|
2941
3070
|
}
|
2942
|
-
class
|
3071
|
+
class Hr extends D {
|
3072
|
+
constructor() {
|
3073
|
+
super(...arguments);
|
3074
|
+
n(this, "type", "Task");
|
3075
|
+
}
|
2943
3076
|
open() {
|
2944
|
-
super.open(), super.
|
3077
|
+
super.open(), super.register({
|
3078
|
+
Memory: Dr
|
3079
|
+
});
|
2945
3080
|
}
|
2946
3081
|
}
|
2947
|
-
class
|
3082
|
+
class Ur {
|
2948
3083
|
constructor() {
|
2949
3084
|
n(this, "type");
|
2950
3085
|
}
|
2951
3086
|
}
|
2952
|
-
class
|
3087
|
+
class Or extends Ur {
|
2953
3088
|
constructor() {
|
2954
3089
|
super(...arguments);
|
2955
3090
|
n(this, "type", "Liquid");
|
2956
3091
|
}
|
2957
3092
|
async renderAsync(e, t) {
|
2958
|
-
let r = new
|
3093
|
+
let r = new gt(), s = r.parse(e);
|
2959
3094
|
return await r.render(s, t);
|
2960
3095
|
}
|
2961
3096
|
}
|
2962
|
-
class
|
3097
|
+
class Lr extends D {
|
3098
|
+
constructor() {
|
3099
|
+
super(...arguments);
|
3100
|
+
n(this, "type", "Template");
|
3101
|
+
}
|
2963
3102
|
open() {
|
2964
|
-
super.open(), super.
|
3103
|
+
super.open(), super.register({
|
3104
|
+
Liquid: Or
|
3105
|
+
});
|
2965
3106
|
}
|
2966
3107
|
}
|
2967
|
-
class
|
3108
|
+
class Rr extends D {
|
3109
|
+
constructor() {
|
3110
|
+
super(...arguments);
|
3111
|
+
n(this, "type", "Util");
|
3112
|
+
}
|
2968
3113
|
open() {
|
2969
|
-
super.open(), super.
|
2970
|
-
|
2971
|
-
rs,
|
2972
|
-
|
2973
|
-
Pr,
|
2974
|
-
|
2975
|
-
|
2976
|
-
|
2977
|
-
|
2978
|
-
Vr,
|
2979
|
-
ts,
|
2980
|
-
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2984
|
-
Zr,
|
2985
|
-
ls,
|
2986
|
-
|
2987
|
-
Qr,
|
2988
|
-
|
2989
|
-
Gr,
|
2990
|
-
|
2991
|
-
|
2992
|
-
];
|
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
|
+
});
|
2993
3137
|
}
|
2994
3138
|
get array() {
|
2995
3139
|
return super.createWithCache("array");
|
@@ -3042,9 +3186,6 @@ class Lr extends D {
|
|
3042
3186
|
get task() {
|
3043
3187
|
return super.createWithCache("task");
|
3044
3188
|
}
|
3045
|
-
get type() {
|
3046
|
-
return super.createWithCache("type");
|
3047
|
-
}
|
3048
3189
|
get time() {
|
3049
3190
|
return super.createWithCache("time");
|
3050
3191
|
}
|
@@ -3058,12 +3199,12 @@ class Lr extends D {
|
|
3058
3199
|
return super.createWithCache("sign");
|
3059
3200
|
}
|
3060
3201
|
}
|
3061
|
-
class
|
3202
|
+
class U {
|
3062
3203
|
constructor() {
|
3063
3204
|
n(this, "type");
|
3064
3205
|
}
|
3065
3206
|
}
|
3066
|
-
class
|
3207
|
+
class Ir extends U {
|
3067
3208
|
constructor() {
|
3068
3209
|
super(...arguments);
|
3069
3210
|
n(this, "type", "array");
|
@@ -3091,11 +3232,11 @@ class Rr extends H {
|
|
3091
3232
|
n(this, "except", (e, t, r = null) => {
|
3092
3233
|
let s = t instanceof Array ? t : [t], l = [];
|
3093
3234
|
if (r == null)
|
3094
|
-
l = e.filter((
|
3235
|
+
l = e.filter((o) => s.indexOf(o) == -1);
|
3095
3236
|
else
|
3096
|
-
for (let
|
3097
|
-
let
|
3098
|
-
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);
|
3099
3240
|
}
|
3100
3241
|
return l;
|
3101
3242
|
});
|
@@ -3104,11 +3245,11 @@ class Rr extends H {
|
|
3104
3245
|
/**
|
3105
3246
|
* 求最大值,数据类型的比较函数要自己转换为数值类型
|
3106
3247
|
*/
|
3107
|
-
n(this, "max", (e, t) =>
|
3248
|
+
n(this, "max", (e, t) => be.max(e, t));
|
3108
3249
|
/**
|
3109
3250
|
* 求最小值,数据类型的比较函数要自己转换为数值类型
|
3110
3251
|
*/
|
3111
|
-
n(this, "min", (e, t) =>
|
3252
|
+
n(this, "min", (e, t) => be.min(e, t));
|
3112
3253
|
/**
|
3113
3254
|
* 求平均值
|
3114
3255
|
*/
|
@@ -3121,8 +3262,8 @@ class Rr extends H {
|
|
3121
3262
|
*/
|
3122
3263
|
n(this, "sum", (e, t, r = null) => {
|
3123
3264
|
let s = 0;
|
3124
|
-
for (let
|
3125
|
-
s += t(e[
|
3265
|
+
for (let o = 0; o < e.length; o++)
|
3266
|
+
s += t(e[o]);
|
3126
3267
|
return r == null ? s : parseFloat(s.toFixed(r));
|
3127
3268
|
});
|
3128
3269
|
//#endregion
|
@@ -3139,11 +3280,11 @@ class Rr extends H {
|
|
3139
3280
|
if (!r)
|
3140
3281
|
return e;
|
3141
3282
|
for (let l = 0; l < e.length; l++) {
|
3142
|
-
let
|
3143
|
-
if (
|
3144
|
-
for (let
|
3145
|
-
let u = t[
|
3146
|
-
|
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);
|
3147
3288
|
}
|
3148
3289
|
}
|
3149
3290
|
return s;
|
@@ -3178,9 +3319,9 @@ class Rr extends H {
|
|
3178
3319
|
if (!e || e.length == 0 || !t || t.length == 0)
|
3179
3320
|
return [];
|
3180
3321
|
let l = [];
|
3181
|
-
return e.forEach((
|
3182
|
-
let
|
3183
|
-
|
3322
|
+
return e.forEach((o) => {
|
3323
|
+
let a = t.find((u) => u[r] == o);
|
3324
|
+
a || (a = { [r]: o, [s]: o }), l.push(a);
|
3184
3325
|
}), l;
|
3185
3326
|
});
|
3186
3327
|
//#endregion
|
@@ -3201,17 +3342,17 @@ class Rr extends H {
|
|
3201
3342
|
* 合并多个数组中的每一项到新的二维数组中,没值的元素被有值的元素代替
|
3202
3343
|
*/
|
3203
3344
|
n(this, "combine", (...e) => {
|
3204
|
-
let t = [], r =
|
3345
|
+
let t = [], r = be.max(e, (s) => s.length);
|
3205
3346
|
for (let s = 0; s < r.length; s++) {
|
3206
|
-
let l = [],
|
3207
|
-
for (let
|
3208
|
-
let u = e[
|
3209
|
-
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);
|
3210
3351
|
break;
|
3211
3352
|
}
|
3212
|
-
for (let
|
3213
|
-
let u = e[
|
3214
|
-
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);
|
3215
3356
|
}
|
3216
3357
|
t.push(l);
|
3217
3358
|
}
|
@@ -3245,9 +3386,9 @@ class Rr extends H {
|
|
3245
3386
|
* 删除执行数组中的指定对象或者集合
|
3246
3387
|
*/
|
3247
3388
|
n(this, "remove", (e, t) => {
|
3248
|
-
if (d.
|
3389
|
+
if (d.object.isNumber(t))
|
3249
3390
|
e.splice(t, 1);
|
3250
|
-
else if (d.
|
3391
|
+
else if (d.object.isArray(t))
|
3251
3392
|
for (let r = 0; r < t.length; r++)
|
3252
3393
|
d.array.remove(e, t[r]);
|
3253
3394
|
else
|
@@ -3269,12 +3410,12 @@ class Rr extends H {
|
|
3269
3410
|
if (t == null || r == null || e == null || e.length == 0 || e.length == 1)
|
3270
3411
|
return e;
|
3271
3412
|
t instanceof Function && (t = [t]);
|
3272
|
-
let s = e.sort((
|
3273
|
-
let u = t[0], p = u(
|
3413
|
+
let s = e.sort((o, a) => {
|
3414
|
+
let u = t[0], p = u(o) - u(a);
|
3274
3415
|
if (p != 0)
|
3275
3416
|
return p;
|
3276
3417
|
let h = t[1];
|
3277
|
-
return h == null ? p : h(
|
3418
|
+
return h == null ? p : h(o) - h(a);
|
3278
3419
|
}), l;
|
3279
3420
|
return r == "asc" ? l = s : l = s.reverse(), l;
|
3280
3421
|
});
|
@@ -3286,12 +3427,12 @@ class Rr extends H {
|
|
3286
3427
|
n(this, "groupBy", (e, t, r = null) => {
|
3287
3428
|
let s = {};
|
3288
3429
|
if (e.forEach((l) => {
|
3289
|
-
let
|
3290
|
-
s[
|
3430
|
+
let o = t(l);
|
3431
|
+
s[o] == null && (s[o] = []), s[o].push(l);
|
3291
3432
|
}), r) {
|
3292
3433
|
let l = Object.keys(s);
|
3293
|
-
for (let
|
3294
|
-
s[
|
3434
|
+
for (let o of l)
|
3435
|
+
s[o] = r(s[o]);
|
3295
3436
|
}
|
3296
3437
|
return s;
|
3297
3438
|
});
|
@@ -3301,8 +3442,8 @@ class Rr extends H {
|
|
3301
3442
|
n(this, "groupByArray", (e, t) => {
|
3302
3443
|
let r = [];
|
3303
3444
|
return e.forEach((s) => {
|
3304
|
-
let l = t(s),
|
3305
|
-
|
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);
|
3306
3447
|
}), r;
|
3307
3448
|
});
|
3308
3449
|
}
|
@@ -3312,8 +3453,8 @@ class Rr extends H {
|
|
3312
3453
|
getChunksByCount(e, t) {
|
3313
3454
|
let r = [], s = d.math.ceil(e.length / t);
|
3314
3455
|
for (let l = 0; l < e.length; l += s) {
|
3315
|
-
let
|
3316
|
-
r.push(
|
3456
|
+
let o = this.getRange(e, l, s);
|
3457
|
+
r.push(o);
|
3317
3458
|
}
|
3318
3459
|
return r;
|
3319
3460
|
}
|
@@ -3324,7 +3465,7 @@ class Rr extends H {
|
|
3324
3465
|
*/
|
3325
3466
|
getRange(e, t, r = null) {
|
3326
3467
|
let s = r == null ? e.length : t + r;
|
3327
|
-
return e.filter((
|
3468
|
+
return e.filter((o, a) => a >= t && a < s);
|
3328
3469
|
}
|
3329
3470
|
/**
|
3330
3471
|
* 获取最后length个元素
|
@@ -3346,8 +3487,8 @@ class Rr extends H {
|
|
3346
3487
|
create(e, t) {
|
3347
3488
|
let r = [];
|
3348
3489
|
for (let s = 0; s < e.length; s++) {
|
3349
|
-
let l = e[s],
|
3350
|
-
r.push(
|
3490
|
+
let l = e[s], o = t(l, s);
|
3491
|
+
r.push(o);
|
3351
3492
|
}
|
3352
3493
|
return r;
|
3353
3494
|
}
|
@@ -3370,7 +3511,7 @@ class Rr extends H {
|
|
3370
3511
|
}
|
3371
3512
|
//#endregion
|
3372
3513
|
}
|
3373
|
-
class
|
3514
|
+
class Mr extends U {
|
3374
3515
|
constructor() {
|
3375
3516
|
super(...arguments);
|
3376
3517
|
n(this, "type", "component");
|
@@ -3391,13 +3532,13 @@ class Ir extends H {
|
|
3391
3532
|
let s = {}, l = Object.keys(e);
|
3392
3533
|
if (l.length == 0)
|
3393
3534
|
return s;
|
3394
|
-
for (let
|
3395
|
-
const
|
3396
|
-
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];
|
3397
3538
|
if (g.default)
|
3398
3539
|
s[h] = g.default;
|
3399
3540
|
else {
|
3400
|
-
let m =
|
3541
|
+
let m = ct(g);
|
3401
3542
|
s[h] = m;
|
3402
3543
|
}
|
3403
3544
|
}
|
@@ -3412,7 +3553,7 @@ class Ir extends H {
|
|
3412
3553
|
}, 100);
|
3413
3554
|
}
|
3414
3555
|
}
|
3415
|
-
class
|
3556
|
+
class Br extends U {
|
3416
3557
|
constructor() {
|
3417
3558
|
super(...arguments);
|
3418
3559
|
n(this, "type", "dom");
|
@@ -3442,8 +3583,8 @@ class Mr extends H {
|
|
3442
3583
|
} else
|
3443
3584
|
s.push(e);
|
3444
3585
|
for (let l = 0; l < s.length; l++) {
|
3445
|
-
let
|
3446
|
-
r !=
|
3586
|
+
let o = s[l];
|
3587
|
+
r != o && o.classList.remove(t);
|
3447
3588
|
}
|
3448
3589
|
});
|
3449
3590
|
//#endregion
|
@@ -3454,12 +3595,12 @@ class Mr extends H {
|
|
3454
3595
|
n(this, "getWidthOrHeight", (e, t, r = null) => {
|
3455
3596
|
let s = 0, l = [];
|
3456
3597
|
e instanceof Array && l.push(...e), e instanceof HTMLCollection ? l.push(...e) : l.push(e);
|
3457
|
-
for (let
|
3458
|
-
let
|
3459
|
-
if (!
|
3598
|
+
for (let o = 0; o < l.length; o++) {
|
3599
|
+
let a = l[o];
|
3600
|
+
if (!a || !a.getBoundingClientRect)
|
3460
3601
|
continue;
|
3461
|
-
let u =
|
3462
|
-
s += u[t], r && (s += r(
|
3602
|
+
let u = a.getBoundingClientRect();
|
3603
|
+
s += u[t], r && (s += r(a));
|
3463
3604
|
}
|
3464
3605
|
return s;
|
3465
3606
|
});
|
@@ -3508,16 +3649,16 @@ class Mr extends H {
|
|
3508
3649
|
getColors(e) {
|
3509
3650
|
let t = {}, r = 0;
|
3510
3651
|
for (let s = 0; s < e.length; s++) {
|
3511
|
-
let l = e[s],
|
3512
|
-
for (let
|
3513
|
-
|
3514
|
-
|
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);
|
3515
3656
|
}
|
3516
3657
|
for (let s = 0; s < e.length; s++) {
|
3517
|
-
let l = e[s],
|
3658
|
+
let l = e[s], o = 0;
|
3518
3659
|
for (let g = 0; g < l.length; g++)
|
3519
|
-
|
3520
|
-
let
|
3660
|
+
o += l.charCodeAt(g);
|
3661
|
+
let a = o / r, u = 255 * a, p = 255 * (1 - a), h = 255 * (1 - a);
|
3521
3662
|
t[l] = `rgb(${u}, ${p}, ${h})`;
|
3522
3663
|
}
|
3523
3664
|
return t;
|
@@ -3563,8 +3704,8 @@ class Mr extends H {
|
|
3563
3704
|
siblings(e) {
|
3564
3705
|
let r = e.parentElement.children, s = [];
|
3565
3706
|
for (let l = 0; l < r.length; l++) {
|
3566
|
-
let
|
3567
|
-
|
3707
|
+
let o = r[l];
|
3708
|
+
o != e && s.push(o);
|
3568
3709
|
}
|
3569
3710
|
return s;
|
3570
3711
|
}
|
@@ -3641,8 +3782,8 @@ class Mr extends H {
|
|
3641
3782
|
*/
|
3642
3783
|
getAvailableHeight(e) {
|
3643
3784
|
return this.getWidthOrHeight(e, "height", (r) => {
|
3644
|
-
let s = getComputedStyle(r), l = parseFloat(s.paddingTop) + parseFloat(s.paddingBottom),
|
3645
|
-
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);
|
3646
3787
|
});
|
3647
3788
|
}
|
3648
3789
|
//#endregion
|
@@ -3650,19 +3791,19 @@ class Mr extends H {
|
|
3650
3791
|
* 获取指定元素在视口内的位置
|
3651
3792
|
*/
|
3652
3793
|
getViewportStyle(e, t, r, s, l) {
|
3653
|
-
let
|
3654
|
-
if (!
|
3794
|
+
let o = e.querySelector(r);
|
3795
|
+
if (!o)
|
3655
3796
|
return null;
|
3656
|
-
let
|
3797
|
+
let a = {}, u = e.getBoundingClientRect(), p = s.getBoundingClientRect(), g = e.querySelector(t).getBoundingClientRect(), m = o.getBoundingClientRect(), k = p.height - g.top;
|
3657
3798
|
if (l == "right") {
|
3658
|
-
|
3799
|
+
a.left = `${u.left + u.width}px`;
|
3659
3800
|
let O;
|
3660
|
-
m.height > p.height ? O = p.height : O = m.height,
|
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`;
|
3661
3802
|
} else if (l == "bottom")
|
3662
|
-
k -= g.height,
|
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`;
|
3663
3804
|
else
|
3664
3805
|
throw new Error(`暂未支持的position:${l}`);
|
3665
|
-
return
|
3806
|
+
return a;
|
3666
3807
|
}
|
3667
3808
|
//#region 索引
|
3668
3809
|
/**
|
@@ -3674,7 +3815,7 @@ class Mr extends H {
|
|
3674
3815
|
return 0;
|
3675
3816
|
let r = [];
|
3676
3817
|
for (let l = 0; l < t.length; l++) {
|
3677
|
-
let
|
3818
|
+
let o = t[l], a = getComputedStyle(o), u = a.zIndex == "auto" ? 0 : a.zIndex;
|
3678
3819
|
r.push(u);
|
3679
3820
|
}
|
3680
3821
|
return Math.max(...r);
|
@@ -3685,8 +3826,8 @@ class Mr extends H {
|
|
3685
3826
|
* 判断当前鼠标位置是否在指定范围之内
|
3686
3827
|
*/
|
3687
3828
|
inRange(e, t, r, s, l) {
|
3688
|
-
let
|
3689
|
-
return
|
3829
|
+
let o = e.x >= t && e.x <= t + s, a = e.y >= r && e.y <= r + l;
|
3830
|
+
return o && a;
|
3690
3831
|
}
|
3691
3832
|
//#endregion
|
3692
3833
|
//#region 创建
|
@@ -3738,7 +3879,7 @@ class Mr extends H {
|
|
3738
3879
|
}
|
3739
3880
|
//#endregion
|
3740
3881
|
}
|
3741
|
-
class Pr extends
|
3882
|
+
class Pr extends U {
|
3742
3883
|
constructor() {
|
3743
3884
|
super(...arguments);
|
3744
3885
|
n(this, "type", "dictionary");
|
@@ -3776,10 +3917,10 @@ class Pr extends H {
|
|
3776
3917
|
let l = "";
|
3777
3918
|
if (e == null)
|
3778
3919
|
return l;
|
3779
|
-
let
|
3780
|
-
for (let
|
3781
|
-
let u = a
|
3782
|
-
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);
|
3783
3924
|
}
|
3784
3925
|
return l;
|
3785
3926
|
}
|
@@ -3796,8 +3937,8 @@ class Pr extends H {
|
|
3796
3937
|
if (s.length == 0)
|
3797
3938
|
return r;
|
3798
3939
|
for (let l of s) {
|
3799
|
-
let
|
3800
|
-
t != null && t(
|
3940
|
+
let o = e[l], a = { key: l, value: o };
|
3941
|
+
t != null && t(a), r.push(a);
|
3801
3942
|
}
|
3802
3943
|
return r;
|
3803
3944
|
}
|
@@ -3815,7 +3956,7 @@ class Pr extends H {
|
|
3815
3956
|
}
|
3816
3957
|
//#endregion
|
3817
3958
|
}
|
3818
|
-
class
|
3959
|
+
class Fr extends U {
|
3819
3960
|
constructor() {
|
3820
3961
|
super(...arguments);
|
3821
3962
|
n(this, "type", "event");
|
@@ -3861,7 +4002,7 @@ class Br extends H {
|
|
3861
4002
|
});
|
3862
4003
|
}
|
3863
4004
|
}
|
3864
|
-
class
|
4005
|
+
class Nr extends U {
|
3865
4006
|
constructor() {
|
3866
4007
|
super(...arguments);
|
3867
4008
|
n(this, "type", "file");
|
@@ -3872,8 +4013,8 @@ class Fr extends H {
|
|
3872
4013
|
let r = window.atob(e), s = r.length, l = new Uint8Array(s);
|
3873
4014
|
for (; s--; )
|
3874
4015
|
l[s] = r.charCodeAt(s);
|
3875
|
-
let
|
3876
|
-
|
4016
|
+
let o = new Blob([l]);
|
4017
|
+
ft.saveAs(o, t);
|
3877
4018
|
});
|
3878
4019
|
/**
|
3879
4020
|
* 获取文件扩展名
|
@@ -3898,28 +4039,28 @@ class Fr extends H {
|
|
3898
4039
|
});
|
3899
4040
|
}
|
3900
4041
|
}
|
3901
|
-
class
|
4042
|
+
class qr extends U {
|
3902
4043
|
constructor() {
|
3903
4044
|
super(...arguments);
|
3904
4045
|
n(this, "type", "html");
|
3905
4046
|
/**
|
3906
4047
|
* 获取Html内容
|
3907
4048
|
*/
|
3908
|
-
n(this, "getHtml", (e) => d.
|
4049
|
+
n(this, "getHtml", (e) => d.object.isNumber(e) ? e : e && e.replace(/\n/g, "<br/>"));
|
3909
4050
|
/**
|
3910
4051
|
* 获取Html中的文字
|
3911
4052
|
*/
|
3912
4053
|
n(this, "getText", (e) => {
|
3913
4054
|
if (!e)
|
3914
4055
|
return null;
|
3915
|
-
if (!d.
|
4056
|
+
if (!d.object.isString(e))
|
3916
4057
|
return e;
|
3917
4058
|
let t = new RegExp("<[^<>]+>", "g");
|
3918
4059
|
return e.replace(t, "");
|
3919
4060
|
});
|
3920
4061
|
}
|
3921
4062
|
}
|
3922
|
-
class Vr extends
|
4063
|
+
class Vr extends U {
|
3923
4064
|
constructor() {
|
3924
4065
|
super(...arguments);
|
3925
4066
|
n(this, "type", "image");
|
@@ -3929,7 +4070,7 @@ class Vr extends H {
|
|
3929
4070
|
n(this, "base64", (e) => "data:image/png;base64," + e);
|
3930
4071
|
}
|
3931
4072
|
}
|
3932
|
-
class
|
4073
|
+
class Wr extends U {
|
3933
4074
|
constructor() {
|
3934
4075
|
super(...arguments);
|
3935
4076
|
n(this, "type", "math");
|
@@ -3939,7 +4080,7 @@ class qr extends H {
|
|
3939
4080
|
*/
|
3940
4081
|
n(this, "filterPage", (e, t, r) => {
|
3941
4082
|
let s = (t - 1) * r, l = t * r;
|
3942
|
-
return e.filter((
|
4083
|
+
return e.filter((a, u) => u >= s && u < l);
|
3943
4084
|
});
|
3944
4085
|
/**
|
3945
4086
|
* 总页数
|
@@ -3986,8 +4127,8 @@ class qr extends H {
|
|
3986
4127
|
let l = s * 1024;
|
3987
4128
|
if (e < l)
|
3988
4129
|
return this.round(e / s, 2) + "GB";
|
3989
|
-
let
|
3990
|
-
if (e <
|
4130
|
+
let o = l * 1024;
|
4131
|
+
if (e < o)
|
3991
4132
|
return this.round(e / l, 2) + "TB";
|
3992
4133
|
throw new Error("暂未支持比TB更大的大小");
|
3993
4134
|
});
|
@@ -4027,7 +4168,7 @@ class qr extends H {
|
|
4027
4168
|
return e;
|
4028
4169
|
}
|
4029
4170
|
}
|
4030
|
-
class
|
4171
|
+
class zr extends U {
|
4031
4172
|
constructor() {
|
4032
4173
|
super(...arguments);
|
4033
4174
|
n(this, "type", "micro");
|
@@ -4038,7 +4179,7 @@ class Wr extends H {
|
|
4038
4179
|
});
|
4039
4180
|
}
|
4040
4181
|
}
|
4041
|
-
class
|
4182
|
+
class Kr extends U {
|
4042
4183
|
constructor() {
|
4043
4184
|
super(...arguments);
|
4044
4185
|
n(this, "type", "mount");
|
@@ -4060,10 +4201,34 @@ class zr extends H {
|
|
4060
4201
|
});
|
4061
4202
|
}
|
4062
4203
|
}
|
4063
|
-
class
|
4204
|
+
class Jr extends U {
|
4064
4205
|
constructor() {
|
4065
4206
|
super(...arguments);
|
4066
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]");
|
4067
4232
|
//#endregion
|
4068
4233
|
//#region 复制
|
4069
4234
|
/**
|
@@ -4071,16 +4236,16 @@ class Kr extends H {
|
|
4071
4236
|
*/
|
4072
4237
|
n(this, "copy", (e, t = null) => {
|
4073
4238
|
let r = [];
|
4074
|
-
d.
|
4239
|
+
d.object.isObject(e) && r.push(e);
|
4075
4240
|
let s = [];
|
4076
4241
|
for (let l = 0; l < r.length; l++) {
|
4077
|
-
let
|
4078
|
-
Object.keys(
|
4079
|
-
let p =
|
4080
|
-
t && t[u] ?
|
4081
|
-
}), 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);
|
4082
4247
|
}
|
4083
|
-
return d.
|
4248
|
+
return d.object.isObject(e) ? s[0] : s;
|
4084
4249
|
});
|
4085
4250
|
//#endregion
|
4086
4251
|
//#region 赋值
|
@@ -4090,11 +4255,12 @@ class Kr extends H {
|
|
4090
4255
|
n(this, "addProperties", (e, t, r) => {
|
4091
4256
|
let s = e;
|
4092
4257
|
for (let l = 0; l < t.length; l++) {
|
4093
|
-
let
|
4094
|
-
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]);
|
4095
4260
|
}
|
4096
4261
|
});
|
4097
4262
|
}
|
4263
|
+
//#endregion
|
4098
4264
|
//#region 净化
|
4099
4265
|
/**
|
4100
4266
|
* 净化对象,只清除默认值属性
|
@@ -4102,8 +4268,8 @@ class Kr extends H {
|
|
4102
4268
|
pure(e) {
|
4103
4269
|
let t = {}, r = Object.keys(e);
|
4104
4270
|
for (let s = 0; s < r.length; s++) {
|
4105
|
-
let l = r[s],
|
4106
|
-
|
4271
|
+
let l = r[s], o = e[l];
|
4272
|
+
o != null && (d.object.isObject(o) ? t[l] = this.pure(o) : t[l] = e[l]);
|
4107
4273
|
}
|
4108
4274
|
return t;
|
4109
4275
|
}
|
@@ -4115,8 +4281,8 @@ class Kr extends H {
|
|
4115
4281
|
filter(e, t, r) {
|
4116
4282
|
let s = [];
|
4117
4283
|
return Object.keys(e).forEach((l) => {
|
4118
|
-
let
|
4119
|
-
t(
|
4284
|
+
let o = { key: l, value: e[l] };
|
4285
|
+
t(o) && s.push(r(o));
|
4120
4286
|
}), s;
|
4121
4287
|
}
|
4122
4288
|
/**
|
@@ -4138,8 +4304,8 @@ class Kr extends H {
|
|
4138
4304
|
toObject(e, t, r) {
|
4139
4305
|
let s = {};
|
4140
4306
|
for (let l = 0; l < e.length; l++) {
|
4141
|
-
let
|
4142
|
-
s[t(
|
4307
|
+
let o = e[l];
|
4308
|
+
s[t(o)] = r(o);
|
4143
4309
|
}
|
4144
4310
|
return s;
|
4145
4311
|
}
|
@@ -4149,13 +4315,13 @@ class Kr extends H {
|
|
4149
4315
|
* 对对象进行深度克隆,同时可以移除Proxy对象
|
4150
4316
|
*/
|
4151
4317
|
clone(e, t = null) {
|
4152
|
-
let r =
|
4318
|
+
let r = yt(e, !0);
|
4153
4319
|
if (t == null)
|
4154
4320
|
return r;
|
4155
|
-
if (d.
|
4321
|
+
if (d.object.isArray(e))
|
4156
4322
|
for (let s = 0; s < r.length; s++)
|
4157
4323
|
t(r[s]);
|
4158
|
-
else d.
|
4324
|
+
else d.object.isObject(e) && t(r);
|
4159
4325
|
return r;
|
4160
4326
|
}
|
4161
4327
|
//#endregion
|
@@ -4164,7 +4330,7 @@ class Kr extends H {
|
|
4164
4330
|
* 合并来源对象到目标对象上
|
4165
4331
|
*/
|
4166
4332
|
mergeTo(e, t) {
|
4167
|
-
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) => {
|
4168
4334
|
let l = t[s];
|
4169
4335
|
typeof l == "object" ? e[s] = this.mergeTo(e[s], l) : e[s] = l;
|
4170
4336
|
}), e);
|
@@ -4187,7 +4353,7 @@ class Kr extends H {
|
|
4187
4353
|
}
|
4188
4354
|
//#endregion
|
4189
4355
|
}
|
4190
|
-
class
|
4356
|
+
class Xr extends U {
|
4191
4357
|
constructor() {
|
4192
4358
|
super(...arguments);
|
4193
4359
|
n(this, "type", "string");
|
@@ -4204,7 +4370,7 @@ class Jr extends H {
|
|
4204
4370
|
/**
|
4205
4371
|
* 填充字符串到指定长度,使用pad填充
|
4206
4372
|
*/
|
4207
|
-
n(this, "padLeft", (e, t, r) =>
|
4373
|
+
n(this, "padLeft", (e, t, r) => mt.pad(e, t, r));
|
4208
4374
|
/**
|
4209
4375
|
* 填充字符串到指定长度,使用pad填充
|
4210
4376
|
*/
|
@@ -4277,7 +4443,7 @@ class Jr extends H {
|
|
4277
4443
|
if (!e)
|
4278
4444
|
return !1;
|
4279
4445
|
let t = JSON.parse(e);
|
4280
|
-
return d.
|
4446
|
+
return d.object.isObject(t);
|
4281
4447
|
} catch {
|
4282
4448
|
return !1;
|
4283
4449
|
}
|
@@ -4343,8 +4509,8 @@ class Jr extends H {
|
|
4343
4509
|
let s = e.indexOf(t);
|
4344
4510
|
if (s == -1)
|
4345
4511
|
return null;
|
4346
|
-
let l = s + t.length,
|
4347
|
-
return
|
4512
|
+
let l = s + t.length, o = e.substring(l), a = o.indexOf(r);
|
4513
|
+
return a == -1 ? null : o.substring(0, a);
|
4348
4514
|
});
|
4349
4515
|
//#endregion
|
4350
4516
|
//#region 格式化
|
@@ -4358,8 +4524,8 @@ class Jr extends H {
|
|
4358
4524
|
typeof t == "string" ? r.push(t) : r.push(...t);
|
4359
4525
|
let s = e;
|
4360
4526
|
for (let l = 0; l < r.length; l++) {
|
4361
|
-
let
|
4362
|
-
s = s.replace(`{${l}}`,
|
4527
|
+
let o = r[l];
|
4528
|
+
s = s.replace(`{${l}}`, o);
|
4363
4529
|
}
|
4364
4530
|
return s;
|
4365
4531
|
});
|
@@ -4386,7 +4552,7 @@ class Jr extends H {
|
|
4386
4552
|
}
|
4387
4553
|
//#endregion
|
4388
4554
|
}
|
4389
|
-
class Qr extends
|
4555
|
+
class Qr extends U {
|
4390
4556
|
constructor() {
|
4391
4557
|
super(...arguments);
|
4392
4558
|
n(this, "type", "task");
|
@@ -4439,41 +4605,12 @@ class Qr extends H {
|
|
4439
4605
|
});
|
4440
4606
|
}
|
4441
4607
|
}
|
4442
|
-
class Yr extends H {
|
4443
|
-
constructor() {
|
4444
|
-
super(...arguments);
|
4445
|
-
n(this, "type", "type");
|
4446
|
-
/**
|
4447
|
-
* 判断输入类型是否是字符串类型 null -> false
|
4448
|
-
*/
|
4449
|
-
n(this, "isString", (e) => Object.prototype.toString.call(e) == "[object String]");
|
4450
|
-
/**
|
4451
|
-
* 判断输入类型是否是Object类型
|
4452
|
-
*/
|
4453
|
-
n(this, "isObject", (e) => Object.prototype.toString.call(e) == "[object Object]");
|
4454
|
-
/**
|
4455
|
-
* 判断输入类型是否是Array类型
|
4456
|
-
*/
|
4457
|
-
n(this, "isArray", (e) => Object.prototype.toString.call(e) == "[object Array]");
|
4458
|
-
/**
|
4459
|
-
* 判断输入类型是否是Number类型,null -> false
|
4460
|
-
*/
|
4461
|
-
n(this, "isNumber", (e) => {
|
4462
|
-
let t = Object.prototype.toString.call(e);
|
4463
|
-
return t == "[object Number]" || t == "[object BigInt]";
|
4464
|
-
});
|
4465
|
-
/**
|
4466
|
-
* 判断输入类型是否是isBoolean类型
|
4467
|
-
*/
|
4468
|
-
n(this, "isBoolean", (e) => Object.prototype.toString.call(e) == "[object Boolean]");
|
4469
|
-
}
|
4470
|
-
}
|
4471
4608
|
class Tl {
|
4472
4609
|
constructor() {
|
4473
4610
|
n(this, "value");
|
4474
4611
|
}
|
4475
4612
|
}
|
4476
|
-
class
|
4613
|
+
class Yr extends U {
|
4477
4614
|
constructor() {
|
4478
4615
|
super(...arguments);
|
4479
4616
|
n(this, "type", "time");
|
@@ -4555,7 +4692,7 @@ class Xr extends H {
|
|
4555
4692
|
});
|
4556
4693
|
}
|
4557
4694
|
}
|
4558
|
-
class Gr extends
|
4695
|
+
class Gr extends U {
|
4559
4696
|
constructor() {
|
4560
4697
|
super(...arguments);
|
4561
4698
|
n(this, "type", "tree");
|
@@ -4565,13 +4702,13 @@ class Gr extends H {
|
|
4565
4702
|
n(this, "getById", (e, t, r, s) => {
|
4566
4703
|
if (!r)
|
4567
4704
|
return null;
|
4568
|
-
let l = r.find((
|
4705
|
+
let l = r.find((o) => o[t] == e) || null;
|
4569
4706
|
if (l != null)
|
4570
4707
|
return l;
|
4571
|
-
for (let
|
4572
|
-
let
|
4573
|
-
if (
|
4574
|
-
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;
|
4575
4712
|
break;
|
4576
4713
|
}
|
4577
4714
|
}
|
@@ -4581,26 +4718,26 @@ class Gr extends H {
|
|
4581
4718
|
* 树节点
|
4582
4719
|
*/
|
4583
4720
|
n(this, "getByIds", (e, t, r, s) => {
|
4584
|
-
let l = d.array.distinct(e, (
|
4585
|
-
return l.forEach((
|
4586
|
-
let u = this.getById(
|
4587
|
-
|
4588
|
-
}),
|
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;
|
4589
4726
|
});
|
4590
4727
|
/**
|
4591
4728
|
* 找出指定层级集合中,指定对象的下一个对象
|
4592
4729
|
*/
|
4593
4730
|
n(this, "getNextById", (e, t, r, s) => {
|
4594
|
-
let l = this.getById(e, t, r, s),
|
4595
|
-
if (
|
4731
|
+
let l = this.getById(e, t, r, s), o = this.getParentsById(e, t, r, s);
|
4732
|
+
if (o.length == 0) {
|
4596
4733
|
if (r.length == 1)
|
4597
4734
|
return null;
|
4598
4735
|
let h = r.indexOf(l);
|
4599
4736
|
return h == r.length - 1 ? r[h - 1] : r[h + 1];
|
4600
4737
|
}
|
4601
|
-
let
|
4738
|
+
let a = o[o.length - 1], u = a[s];
|
4602
4739
|
if (u.length == 1)
|
4603
|
-
return
|
4740
|
+
return a;
|
4604
4741
|
let p = u.indexOf(l);
|
4605
4742
|
return p == u.length - 1 ? u[p - 1] : u[p + 1];
|
4606
4743
|
});
|
@@ -4622,15 +4759,15 @@ class Gr extends H {
|
|
4622
4759
|
* 从树结构数据中,递归获取指定主键的父元素集合
|
4623
4760
|
*/
|
4624
4761
|
n(this, "getParentsById", (e, t, r, s, l = !1) => {
|
4625
|
-
let
|
4626
|
-
return r == null ||
|
4762
|
+
let o = [];
|
4763
|
+
return r == null || st(e, t, r, s, o, l), o;
|
4627
4764
|
});
|
4628
4765
|
/**
|
4629
4766
|
* 获取当前节点的所有孩子节点的集合
|
4630
4767
|
*/
|
4631
4768
|
n(this, "getChildrenById", (e, t, r, s, l = !1) => {
|
4632
|
-
let
|
4633
|
-
return l &&
|
4769
|
+
let o = this.getById(e, t, r, s), a = [];
|
4770
|
+
return l && a.push(o), Ae(o, s, a), a;
|
4634
4771
|
});
|
4635
4772
|
/**
|
4636
4773
|
* 获取当前节点的所有孩子节点的集合
|
@@ -4646,13 +4783,13 @@ class Gr extends H {
|
|
4646
4783
|
let l = [];
|
4647
4784
|
if (!t)
|
4648
4785
|
return l;
|
4649
|
-
let
|
4786
|
+
let o = e ? e.toUpperCase() : "", a = d.object.isString(s) ? [s] : s;
|
4650
4787
|
for (let u of t) {
|
4651
4788
|
let p = !1, h = this.getChildren(u, r, !0);
|
4652
4789
|
for (let g of h) {
|
4653
|
-
for (let m of
|
4790
|
+
for (let m of a) {
|
4654
4791
|
let k = g[m];
|
4655
|
-
if ((k ? k.toUpperCase() : "").indexOf(
|
4792
|
+
if ((k ? k.toUpperCase() : "").indexOf(o) > -1) {
|
4656
4793
|
p = !0;
|
4657
4794
|
break;
|
4658
4795
|
}
|
@@ -4671,13 +4808,13 @@ class Gr extends H {
|
|
4671
4808
|
* 删除指定子元素
|
4672
4809
|
*/
|
4673
4810
|
n(this, "removeById", (e, t, r, s) => {
|
4674
|
-
let l = this.getById(e, t, r, s),
|
4675
|
-
if (
|
4811
|
+
let l = this.getById(e, t, r, s), o = this.getParentsById(e, t, r, s);
|
4812
|
+
if (o.length == 0) {
|
4676
4813
|
d.array.remove(r, l);
|
4677
4814
|
return;
|
4678
4815
|
}
|
4679
|
-
let
|
4680
|
-
d.array.remove(
|
4816
|
+
let a = o[o.length - 1];
|
4817
|
+
d.array.remove(a[s], l);
|
4681
4818
|
});
|
4682
4819
|
/**
|
4683
4820
|
* 获取树结构扁平化后的节点信息
|
@@ -4685,10 +4822,10 @@ class Gr extends H {
|
|
4685
4822
|
n(this, "getFlat", (e, t) => {
|
4686
4823
|
let r = [...e];
|
4687
4824
|
for (let s = 0; s < e.length; s++) {
|
4688
|
-
let
|
4689
|
-
if (
|
4690
|
-
let
|
4691
|
-
r.push(...
|
4825
|
+
let o = e[s][t];
|
4826
|
+
if (o.length > 0) {
|
4827
|
+
let a = this.getFlat(o, t);
|
4828
|
+
r.push(...a);
|
4692
4829
|
}
|
4693
4830
|
}
|
4694
4831
|
return r;
|
@@ -4698,10 +4835,10 @@ class Gr extends H {
|
|
4698
4835
|
*/
|
4699
4836
|
n(this, "map", (e, t, r, s) => {
|
4700
4837
|
let l = [];
|
4701
|
-
for (let
|
4702
|
-
let
|
4838
|
+
for (let o = 0; o < e.length; o++) {
|
4839
|
+
let a = e[o], u = s(a);
|
4703
4840
|
l.push(u);
|
4704
|
-
let p =
|
4841
|
+
let p = a[t];
|
4705
4842
|
if (p && p.length > 0) {
|
4706
4843
|
let h = this.map(p, t, r, s);
|
4707
4844
|
u[r] = h;
|
@@ -4711,14 +4848,14 @@ class Gr extends H {
|
|
4711
4848
|
});
|
4712
4849
|
}
|
4713
4850
|
}
|
4714
|
-
function
|
4851
|
+
function st(c, i, e, t, r, s) {
|
4715
4852
|
for (let l = 0; l < e.length; l++) {
|
4716
|
-
let
|
4717
|
-
if (
|
4718
|
-
s && r.push(
|
4853
|
+
let o = e[l];
|
4854
|
+
if (o[i] == c) {
|
4855
|
+
s && r.push(o);
|
4719
4856
|
break;
|
4720
4857
|
} else
|
4721
|
-
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));
|
4722
4859
|
}
|
4723
4860
|
return r;
|
4724
4861
|
}
|
@@ -4732,7 +4869,7 @@ function Ae(c, i, e) {
|
|
4732
4869
|
}
|
4733
4870
|
return e;
|
4734
4871
|
}
|
4735
|
-
class Zr extends
|
4872
|
+
class Zr extends U {
|
4736
4873
|
constructor() {
|
4737
4874
|
super(...arguments);
|
4738
4875
|
n(this, "type", "scroll");
|
@@ -4763,7 +4900,7 @@ class es {
|
|
4763
4900
|
n(this, "beautify", !1);
|
4764
4901
|
}
|
4765
4902
|
}
|
4766
|
-
class ts extends
|
4903
|
+
class ts extends U {
|
4767
4904
|
constructor() {
|
4768
4905
|
super(...arguments);
|
4769
4906
|
n(this, "type", "json");
|
@@ -4793,10 +4930,10 @@ class ts extends H {
|
|
4793
4930
|
t == null && (t = new es());
|
4794
4931
|
let s = (typeof t == "boolean" ? t : t.beautify) ? 2 : null, l;
|
4795
4932
|
if (typeof e == "string") {
|
4796
|
-
let
|
4797
|
-
if (
|
4933
|
+
let a = this.deserialize(e);
|
4934
|
+
if (a == null)
|
4798
4935
|
return e;
|
4799
|
-
l =
|
4936
|
+
l = a;
|
4800
4937
|
} else
|
4801
4938
|
l = e;
|
4802
4939
|
return JSON.stringify(l, null, s);
|
@@ -4853,10 +4990,10 @@ class ts extends H {
|
|
4853
4990
|
return null;
|
4854
4991
|
let s = e;
|
4855
4992
|
for (let l of r) {
|
4856
|
-
let
|
4857
|
-
if (
|
4993
|
+
let o = s[l];
|
4994
|
+
if (o == null)
|
4858
4995
|
return null;
|
4859
|
-
s =
|
4996
|
+
s = o;
|
4860
4997
|
}
|
4861
4998
|
return s;
|
4862
4999
|
}
|
@@ -4888,11 +5025,11 @@ class ts extends H {
|
|
4888
5025
|
return "{}";
|
4889
5026
|
let l = `{
|
4890
5027
|
`;
|
4891
|
-
for (let
|
4892
|
-
let
|
5028
|
+
for (let o = 0; o < e.length; o++) {
|
5029
|
+
let a = e[o], u = s(a);
|
4893
5030
|
u.type == "array" ? (u.remark && (l += this.fillSpace(2 * r) + "//" + u.remark + `
|
4894
|
-
`), l += this.fillKey(2 * r, u.key) + "[", l += this.buildObjectLevel(
|
4895
|
-
`), 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 += `
|
4896
5033
|
`;
|
4897
5034
|
}
|
4898
5035
|
return l += this.fillSpace(2 * (r - 1)), l += "}", l;
|
@@ -4915,7 +5052,7 @@ class ts extends H {
|
|
4915
5052
|
}
|
4916
5053
|
//#endregion
|
4917
5054
|
}
|
4918
|
-
class rs extends
|
5055
|
+
class rs extends U {
|
4919
5056
|
constructor() {
|
4920
5057
|
super(...arguments);
|
4921
5058
|
n(this, "type", "browser");
|
@@ -4927,7 +5064,7 @@ class rs extends H {
|
|
4927
5064
|
return navigator.language == "zh-CN" ? "zh-cn" : "en";
|
4928
5065
|
}
|
4929
5066
|
}
|
4930
|
-
class ss extends
|
5067
|
+
class ss extends U {
|
4931
5068
|
constructor() {
|
4932
5069
|
super(...arguments);
|
4933
5070
|
n(this, "type", "url");
|
@@ -4947,13 +5084,13 @@ class ss extends H {
|
|
4947
5084
|
} else if (e instanceof Object) {
|
4948
5085
|
let s = Object.keys(e);
|
4949
5086
|
for (let l of s) {
|
4950
|
-
let
|
4951
|
-
|
5087
|
+
let o = d.object.clone(t);
|
5088
|
+
o.push(l), r += this.handleQueryValue(e[l], o);
|
4952
5089
|
}
|
4953
5090
|
} else {
|
4954
5091
|
let s = "";
|
4955
|
-
for (let
|
4956
|
-
|
5092
|
+
for (let o = 0; o < t.length; o++)
|
5093
|
+
o > 0 && (s += "["), s += t[o], o > 0 && (s += "]");
|
4957
5094
|
let l = encodeURIComponent(e);
|
4958
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}`;
|
4959
5096
|
}
|
@@ -4999,12 +5136,12 @@ class ss extends H {
|
|
4999
5136
|
getToUrl(e, t = !0) {
|
5000
5137
|
let r = {};
|
5001
5138
|
if (!this.getRoute(e).query.m) {
|
5002
|
-
let
|
5003
|
-
|
5139
|
+
let o = this.getQueryParam(location.search, "m");
|
5140
|
+
o && (r.m = o);
|
5004
5141
|
}
|
5005
5142
|
if (t) {
|
5006
|
-
let
|
5007
|
-
|
5143
|
+
let o = location.pathname + location.search;
|
5144
|
+
o && (r.return_url = o);
|
5008
5145
|
}
|
5009
5146
|
return this.getUrl(e, r);
|
5010
5147
|
}
|
@@ -5057,8 +5194,8 @@ class ss extends H {
|
|
5057
5194
|
return null;
|
5058
5195
|
let t = "", r = Object.keys(e);
|
5059
5196
|
for (let l of r) {
|
5060
|
-
let
|
5061
|
-
t +=
|
5197
|
+
let o = [l], a = this.handleQueryValue(e[l], o);
|
5198
|
+
t += a;
|
5062
5199
|
}
|
5063
5200
|
return t.substring(1);
|
5064
5201
|
}
|
@@ -5102,7 +5239,7 @@ class ss extends H {
|
|
5102
5239
|
deserializeQs(e, t = !0) {
|
5103
5240
|
let r = {}, s = e.split("&");
|
5104
5241
|
for (let l = 0; l < s.length; l++) {
|
5105
|
-
let
|
5242
|
+
let o = s[l], a = o.indexOf("="), u = o.substring(0, a), p = o.substring(a + 1);
|
5106
5243
|
r[u] = t ? decodeURIComponent(p) : p;
|
5107
5244
|
}
|
5108
5245
|
return r;
|
@@ -5130,7 +5267,7 @@ class ss extends H {
|
|
5130
5267
|
return e ? e.indexOf("http://") > -1 || e.indexOf("https://") > -1 : !1;
|
5131
5268
|
}
|
5132
5269
|
}
|
5133
|
-
class ls extends
|
5270
|
+
class ls extends U {
|
5134
5271
|
constructor() {
|
5135
5272
|
super(...arguments);
|
5136
5273
|
n(this, "type", "sign");
|
@@ -5150,7 +5287,7 @@ class ls extends H {
|
|
5150
5287
|
return this.clean(e), d.url.serialize(e, t);
|
5151
5288
|
}
|
5152
5289
|
}
|
5153
|
-
class
|
5290
|
+
class lt {
|
5154
5291
|
constructor(i, e) {
|
5155
5292
|
/**
|
5156
5293
|
* 距窗口左边的距离
|
@@ -5163,7 +5300,7 @@ class st {
|
|
5163
5300
|
this.x = i, this.y = e;
|
5164
5301
|
}
|
5165
5302
|
}
|
5166
|
-
class ns extends
|
5303
|
+
class ns extends lt {
|
5167
5304
|
constructor() {
|
5168
5305
|
super(...arguments);
|
5169
5306
|
/**
|
@@ -5172,7 +5309,7 @@ class ns extends st {
|
|
5172
5309
|
n(this, "affix");
|
5173
5310
|
}
|
5174
5311
|
}
|
5175
|
-
class El extends
|
5312
|
+
class El extends lt {
|
5176
5313
|
constructor(e, t, r, s) {
|
5177
5314
|
super(e, t);
|
5178
5315
|
n(this, "width");
|
@@ -5185,7 +5322,7 @@ class se {
|
|
5185
5322
|
n(this, "type");
|
5186
5323
|
}
|
5187
5324
|
}
|
5188
|
-
class
|
5325
|
+
class $e extends se {
|
5189
5326
|
constructor() {
|
5190
5327
|
super();
|
5191
5328
|
//#region 大小调整
|
@@ -5264,13 +5401,13 @@ class Ee extends se {
|
|
5264
5401
|
if (e == null)
|
5265
5402
|
return;
|
5266
5403
|
this.dragElement = e;
|
5267
|
-
let r = !1, s = (
|
5404
|
+
let r = !1, s = (a) => (r = !0, a.preventDefault(), t.init(a)), l = (a) => {
|
5268
5405
|
let u = new ns(), p = t.range;
|
5269
5406
|
if (p == null)
|
5270
|
-
u.x =
|
5407
|
+
u.x = a.clientX, u.y = a.clientY;
|
5271
5408
|
else {
|
5272
5409
|
let { x: h, y: g, width: m, height: k } = p;
|
5273
|
-
|
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;
|
5274
5411
|
}
|
5275
5412
|
if (t.affix) {
|
5276
5413
|
if (t.range == null)
|
@@ -5278,12 +5415,12 @@ class Ee extends se {
|
|
5278
5415
|
let h = p.x + p.width, g = p.y + p.height;
|
5279
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");
|
5280
5417
|
}
|
5281
|
-
t.handler(u, this.dragStart, this.dragStartData, r,
|
5282
|
-
},
|
5283
|
-
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);
|
5284
5421
|
};
|
5285
|
-
this.dragMouseDownHandler = (
|
5286
|
-
this.dragStart =
|
5422
|
+
this.dragMouseDownHandler = (a) => {
|
5423
|
+
this.dragStart = a, this.dragStartData = s(a), window.addEventListener("mousemove", l), window.addEventListener("mouseup", o);
|
5287
5424
|
}, this.dragElement.addEventListener("mousedown", this.dragMouseDownHandler);
|
5288
5425
|
}
|
5289
5426
|
/**
|
@@ -5335,11 +5472,11 @@ class is extends se {
|
|
5335
5472
|
/**
|
5336
5473
|
* 注册事件
|
5337
5474
|
*/
|
5338
|
-
n(this, "add", (e, t, r, s, l,
|
5339
|
-
let
|
5340
|
-
|
5475
|
+
n(this, "add", (e, t, r, s, l, o) => {
|
5476
|
+
let a = this.events[s];
|
5477
|
+
a || (a = function(u) {
|
5341
5478
|
r(u) && (t && t(u), l && u.preventDefault());
|
5342
|
-
}, this.events[s] =
|
5479
|
+
}, this.events[s] = a), e.addEventListener(o, a);
|
5343
5480
|
});
|
5344
5481
|
/**
|
5345
5482
|
* 移除事件
|
@@ -5394,8 +5531,8 @@ class is extends se {
|
|
5394
5531
|
this.keydown(e, t, (l) => {
|
5395
5532
|
if (l.key != r)
|
5396
5533
|
return !1;
|
5397
|
-
let
|
5398
|
-
return this.lastKeyTime =
|
5534
|
+
let o = (/* @__PURE__ */ new Date()).getTime(), a = o - this.lastKeyTime;
|
5535
|
+
return this.lastKeyTime = o, a < 200 && this.isKeyLastUp;
|
5399
5536
|
}, "double" + r, s), this.keyup(e, () => {
|
5400
5537
|
this.isKeyLastUp = !0;
|
5401
5538
|
}, (l) => l.key == r ? !0 : (this.isKeyLastUp = !1, !1), "double" + r + ".keyup");
|
@@ -5451,14 +5588,14 @@ class is extends se {
|
|
5451
5588
|
clearTimeout(this.timer);
|
5452
5589
|
}
|
5453
5590
|
}
|
5454
|
-
class
|
5591
|
+
class os extends se {
|
5455
5592
|
/**
|
5456
5593
|
* 对比数据变动
|
5457
5594
|
*/
|
5458
5595
|
delta(i, e, t, r) {
|
5459
5596
|
}
|
5460
5597
|
}
|
5461
|
-
class
|
5598
|
+
class as extends se {
|
5462
5599
|
/**
|
5463
5600
|
* 初始化,并绑定自动关闭上下文菜单事件
|
5464
5601
|
*/
|
@@ -5599,14 +5736,14 @@ const ne = class ne extends se {
|
|
5599
5736
|
s == null && (s = [], ne.opened[e] = s);
|
5600
5737
|
let l = await y.provider.getDefaultAsync(e);
|
5601
5738
|
this.key = t;
|
5602
|
-
let
|
5603
|
-
if (
|
5739
|
+
let o = await l.getAsync(e, this.key);
|
5740
|
+
if (o == null) {
|
5604
5741
|
let u = (await l.getKeysAsync(e)).filter((p) => isNaN(p) && !s.includes(p));
|
5605
|
-
u.length > 0 && (this.oldKey = u[0],
|
5742
|
+
u.length > 0 && (this.oldKey = u[0], o = await l.replaceEntityAsync(e, this.oldKey, this.key));
|
5606
5743
|
}
|
5607
|
-
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) => {
|
5608
5745
|
l != null && this.task.debounce(async () => {
|
5609
|
-
let p = JSON.parse(
|
5746
|
+
let p = JSON.parse(a), h = JSON.parse(u);
|
5610
5747
|
this.form = p, await this.saveAsync(p), this.handler != null && await this.handler(p, h);
|
5611
5748
|
}, 500);
|
5612
5749
|
}, { deep: !0 }), this.provider = l, l;
|
@@ -5664,23 +5801,27 @@ class cs extends se {
|
|
5664
5801
|
}
|
5665
5802
|
}
|
5666
5803
|
class ds extends D {
|
5804
|
+
constructor() {
|
5805
|
+
super(...arguments);
|
5806
|
+
n(this, "type", "Utility");
|
5807
|
+
}
|
5667
5808
|
/**
|
5668
5809
|
* 创建固定工具
|
5669
5810
|
*/
|
5670
|
-
affix(
|
5671
|
-
return new cs(
|
5811
|
+
affix(e, t) {
|
5812
|
+
return new cs(e, t);
|
5672
5813
|
}
|
5673
5814
|
/**
|
5674
5815
|
* 创建对比工具
|
5675
5816
|
*/
|
5676
5817
|
delta() {
|
5677
|
-
return new
|
5818
|
+
return new os();
|
5678
5819
|
}
|
5679
5820
|
/**
|
5680
5821
|
* 创建事件工具
|
5681
5822
|
*/
|
5682
5823
|
event() {
|
5683
|
-
return new
|
5824
|
+
return new $e();
|
5684
5825
|
}
|
5685
5826
|
/**
|
5686
5827
|
* 创建键盘工具
|
@@ -5691,8 +5832,8 @@ class ds extends D {
|
|
5691
5832
|
/**
|
5692
5833
|
* 创建鼠标工具
|
5693
5834
|
*/
|
5694
|
-
mouse(
|
5695
|
-
return new
|
5835
|
+
mouse(e, t = null) {
|
5836
|
+
return new as(e, t);
|
5696
5837
|
}
|
5697
5838
|
/**
|
5698
5839
|
* 创建随机工具
|
@@ -5708,16 +5849,20 @@ class ds extends D {
|
|
5708
5849
|
}
|
5709
5850
|
}
|
5710
5851
|
class $l extends D {
|
5852
|
+
constructor() {
|
5853
|
+
super(...arguments);
|
5854
|
+
n(this, "type", "Video");
|
5855
|
+
}
|
5711
5856
|
open() {
|
5712
|
-
super.open()
|
5857
|
+
super.open();
|
5713
5858
|
}
|
5714
5859
|
}
|
5715
|
-
class
|
5860
|
+
class nt {
|
5716
5861
|
constructor() {
|
5717
5862
|
n(this, "type");
|
5718
5863
|
}
|
5719
5864
|
}
|
5720
|
-
class ps extends
|
5865
|
+
class ps extends nt {
|
5721
5866
|
constructor() {
|
5722
5867
|
super(...arguments);
|
5723
5868
|
n(this, "type", "Tencent");
|
@@ -5738,7 +5883,7 @@ class ps extends lt {
|
|
5738
5883
|
startRecord() {
|
5739
5884
|
}
|
5740
5885
|
}
|
5741
|
-
class hs extends
|
5886
|
+
class hs extends nt {
|
5742
5887
|
constructor() {
|
5743
5888
|
super(...arguments);
|
5744
5889
|
n(this, "type", "Default");
|
@@ -5753,17 +5898,24 @@ class hs extends lt {
|
|
5753
5898
|
}
|
5754
5899
|
}
|
5755
5900
|
class jl extends D {
|
5901
|
+
constructor() {
|
5902
|
+
super(...arguments);
|
5903
|
+
n(this, "type", "Voice");
|
5904
|
+
}
|
5756
5905
|
open() {
|
5757
|
-
super.open(), super.
|
5906
|
+
super.open(), super.register({
|
5907
|
+
Default: hs,
|
5908
|
+
Tencent: ps
|
5909
|
+
});
|
5758
5910
|
}
|
5759
5911
|
}
|
5760
|
-
let gs = {}, le = {}, _ = {},
|
5912
|
+
let gs = {}, le = {}, _ = {}, Me = {}, it = {}, je = {}, fs = {}, ie = {}, ys = async (c) => {
|
5761
5913
|
let e = await (await y.provider.getDefaultAsync("sys")).getAsync("sys", "app");
|
5762
|
-
(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,
|
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) => {
|
5763
5915
|
let r = (e == null ? void 0 : e.language) ?? d.browser.getLanguage(), s = d.json.serialize({ lang: r });
|
5764
|
-
await t.openAsync(s), fe = t.t, ms = t.t_exists, vs = t.t_sys,
|
5765
|
-
}),
|
5766
|
-
}, fe = {}, ms = {}, vs = {},
|
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 = {};
|
5767
5919
|
class Cs {
|
5768
5920
|
constructor() {
|
5769
5921
|
/**
|
@@ -5791,7 +5943,7 @@ class Cs {
|
|
5791
5943
|
const Ts = { class: "ha-empty" }, Es = { class: "empty-message" }, $s = {
|
5792
5944
|
key: 0,
|
5793
5945
|
class: "empty-content"
|
5794
|
-
}, Dl = /* @__PURE__ */
|
5946
|
+
}, Dl = /* @__PURE__ */ B({
|
5795
5947
|
__name: "Empty",
|
5796
5948
|
props: {
|
5797
5949
|
message: { type: String, default: "暂无数据" },
|
@@ -5802,25 +5954,25 @@ const Ts = { class: "ha-empty" }, Es = { class: "empty-message" }, $s = {
|
|
5802
5954
|
return (r, s) => (C(), T("div", Ts, [
|
5803
5955
|
S("div", Es, N(f(e)), 1),
|
5804
5956
|
f(t) ? (C(), T("div", $s, [
|
5805
|
-
|
5957
|
+
Q(r.$slots, "default")
|
5806
5958
|
])) : ye("", !0)
|
5807
5959
|
]));
|
5808
5960
|
}
|
5809
|
-
}), js = /* @__PURE__ */
|
5961
|
+
}), js = /* @__PURE__ */ B({
|
5810
5962
|
__name: "Fill",
|
5811
5963
|
emits: ["resize"],
|
5812
5964
|
setup(c, { emit: i }) {
|
5813
|
-
let e = i, t =
|
5965
|
+
let e = i, t = H(), r = H(), s = H(), l = new $e(), o = () => {
|
5814
5966
|
let p = d.dom.siblings(t.value);
|
5815
5967
|
s.value = d.dom.getHeight(p);
|
5816
|
-
},
|
5968
|
+
}, a = () => {
|
5817
5969
|
r.value = d.dom.getHeight(t.value), e("resize", r.value);
|
5818
5970
|
}, u = () => {
|
5819
|
-
|
5971
|
+
a();
|
5820
5972
|
};
|
5821
|
-
return
|
5822
|
-
|
5823
|
-
}),
|
5973
|
+
return oe(() => {
|
5974
|
+
o(), a(), l.resize(t.value, u);
|
5975
|
+
}), ae(() => {
|
5824
5976
|
l.dispose();
|
5825
5977
|
}), (p, h) => (C(), T("div", {
|
5826
5978
|
class: "ha-fill",
|
@@ -5828,92 +5980,92 @@ const Ts = { class: "ha-empty" }, Es = { class: "empty-message" }, $s = {
|
|
5828
5980
|
ref: t,
|
5829
5981
|
style: ee({ height: `calc(100% - ${f(s)}px)` })
|
5830
5982
|
}, [
|
5831
|
-
|
5983
|
+
Q(p.$slots, "default")
|
5832
5984
|
], 4));
|
5833
5985
|
}
|
5834
|
-
}), Ds = /* @__PURE__ */
|
5986
|
+
}), Ds = /* @__PURE__ */ B({
|
5835
5987
|
__name: "Scroller",
|
5836
5988
|
props: {
|
5837
5989
|
options: {}
|
5838
5990
|
},
|
5839
5991
|
emits: ["scroll"],
|
5840
5992
|
setup(c, { expose: i, emit: e }) {
|
5841
|
-
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) => {
|
5842
5994
|
if (g == 0)
|
5843
5995
|
return 0;
|
5844
|
-
let
|
5845
|
-
return
|
5846
|
-
},
|
5847
|
-
let
|
5848
|
-
return
|
5849
|
-
},
|
5996
|
+
let w = g - h;
|
5997
|
+
return b / w;
|
5998
|
+
}, P = (b) => {
|
5999
|
+
let w = h - k.value.height;
|
6000
|
+
return b / w;
|
6001
|
+
}, X = () => {
|
5850
6002
|
if (g == 0)
|
5851
6003
|
return 80;
|
5852
|
-
let
|
5853
|
-
if (
|
6004
|
+
let b = h / g;
|
6005
|
+
if (b == 1)
|
5854
6006
|
return 0;
|
5855
|
-
let
|
5856
|
-
return d.math.between(
|
5857
|
-
},
|
5858
|
-
let E = O(
|
5859
|
-
return d.math.between(
|
5860
|
-
}, $ = (
|
5861
|
-
let
|
5862
|
-
return { top:
|
5863
|
-
}, F = (
|
5864
|
-
}, A = (
|
5865
|
-
let
|
5866
|
-
R(
|
5867
|
-
}, R = (
|
5868
|
-
let
|
5869
|
-
k.value.top = E *
|
5870
|
-
let
|
5871
|
-
s.value.scrollTop =
|
5872
|
-
}, J = (
|
5873
|
-
let
|
5874
|
-
R(E), t("scroll",
|
6007
|
+
let w = h * b;
|
6008
|
+
return d.math.between(w, 80, 500);
|
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) => {
|
6016
|
+
}, A = (b) => {
|
6017
|
+
let w = O(b);
|
6018
|
+
R(w);
|
6019
|
+
}, R = (b) => {
|
6020
|
+
let w = d.math.between(b, 0, 1), E = h - k.value.height;
|
6021
|
+
k.value.top = E * w;
|
6022
|
+
let V = (g - h) * w;
|
6023
|
+
s.value.scrollTop = V, o.value.scrollTop != V && (o.value.scrollTop = V);
|
6024
|
+
}, J = (b) => {
|
6025
|
+
let w = b.target, E = O(w.scrollTop);
|
6026
|
+
R(E), t("scroll", w);
|
5875
6027
|
}, v = () => {
|
5876
|
-
let
|
5877
|
-
k.value = $(
|
5878
|
-
}, x = (
|
5879
|
-
h = d.dom.getHeight(
|
5880
|
-
let
|
5881
|
-
k.value.height =
|
5882
|
-
}, j = (
|
5883
|
-
let
|
5884
|
-
return parseInt(
|
5885
|
-
}, M = (
|
5886
|
-
let
|
6028
|
+
let b = s.value.scrollTop;
|
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) => {
|
6035
|
+
let w = b.target;
|
6036
|
+
return parseInt(w.style.top);
|
6037
|
+
}, M = (b, w, E, q) => {
|
6038
|
+
let V = b.y - w.y, pe = E + V, G = P(pe);
|
5887
6039
|
R(G);
|
5888
|
-
}, I = (
|
6040
|
+
}, I = (b) => {
|
5889
6041
|
p.value = !0;
|
5890
|
-
}, L = (
|
6042
|
+
}, L = (b) => {
|
5891
6043
|
p.value = !1;
|
5892
6044
|
};
|
5893
|
-
return
|
5894
|
-
v(), m.scroll(
|
5895
|
-
}),
|
6045
|
+
return oe(() => {
|
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(() => {
|
5896
6048
|
m.dispose();
|
5897
|
-
}), W(() => s.value.scrollTop, (
|
5898
|
-
let E = O(
|
6049
|
+
}), W(() => s.value.scrollTop, (b, w) => {
|
6050
|
+
let E = O(b);
|
5899
6051
|
R(E);
|
5900
|
-
}), i({ scrollTo: A, update: v }), (
|
6052
|
+
}), i({ scrollTo: A, update: v }), (b, w) => (C(), T("div", {
|
5901
6053
|
ref_key: "scrollerRef",
|
5902
6054
|
ref: l,
|
5903
6055
|
class: ce(["ha-scroller", { hover: f(p) }])
|
5904
6056
|
}, [
|
5905
6057
|
S("div", {
|
5906
6058
|
ref_key: "containerRef",
|
5907
|
-
ref:
|
6059
|
+
ref: o,
|
5908
6060
|
class: "scroller-container"
|
5909
6061
|
}, [
|
5910
|
-
|
6062
|
+
Q(b.$slots, "default")
|
5911
6063
|
], 512),
|
5912
6064
|
S("div", {
|
5913
6065
|
ref_key: "trackRef",
|
5914
|
-
ref:
|
6066
|
+
ref: a,
|
5915
6067
|
class: "scroller-track",
|
5916
|
-
onClick:
|
6068
|
+
onClick: w[0] || (w[0] = //@ts-ignore
|
5917
6069
|
(...E) => f(F) && f(F)(...E))
|
5918
6070
|
}, [
|
5919
6071
|
S("div", {
|
@@ -5925,25 +6077,25 @@ const Ts = { class: "ha-empty" }, Es = { class: "empty-message" }, $s = {
|
|
5925
6077
|
], 512)
|
5926
6078
|
], 2));
|
5927
6079
|
}
|
5928
|
-
}), Hl = /* @__PURE__ */
|
6080
|
+
}), Hl = /* @__PURE__ */ B({
|
5929
6081
|
__name: "Timer",
|
5930
6082
|
emits: ["change"],
|
5931
6083
|
setup(c, { expose: i, emit: e }) {
|
5932
|
-
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 = () => {
|
5933
6085
|
l == null && (l = setInterval(() => {
|
5934
|
-
s.value +=
|
5935
|
-
},
|
6086
|
+
s.value += o, t("change", s.value);
|
6087
|
+
}, o));
|
5936
6088
|
}, u = () => {
|
5937
|
-
h(),
|
6089
|
+
h(), a();
|
5938
6090
|
}, p = () => {
|
5939
6091
|
clearInterval(l), l = null;
|
5940
6092
|
}, h = () => {
|
5941
6093
|
clearInterval(l), s.value = r;
|
5942
6094
|
};
|
5943
|
-
return
|
6095
|
+
return ae(() => {
|
5944
6096
|
clearInterval(l);
|
5945
|
-
}), i({ restart: u, start:
|
5946
|
-
|
6097
|
+
}), i({ restart: u, start: a, stop: p, reset: h }), (g, m) => (C(), T("span", null, [
|
6098
|
+
Q(g.$slots, "default"),
|
5947
6099
|
Pe(N(f(d).time.format(f(s), "HH:mm:ss SSS")), 1)
|
5948
6100
|
]));
|
5949
6101
|
}
|
@@ -5955,10 +6107,10 @@ const Ts = { class: "ha-empty" }, Es = { class: "empty-message" }, $s = {
|
|
5955
6107
|
}, Hs = {}, Us = { class: "ha-card" };
|
5956
6108
|
function Os(c, i) {
|
5957
6109
|
return C(), T("div", Us, [
|
5958
|
-
|
6110
|
+
Q(c.$slots, "default")
|
5959
6111
|
]);
|
5960
6112
|
}
|
5961
|
-
const
|
6113
|
+
const Be = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ B({
|
5962
6114
|
__name: "Code",
|
5963
6115
|
props: {
|
5964
6116
|
options: { default: {} },
|
@@ -5967,80 +6119,80 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
5967
6119
|
},
|
5968
6120
|
emits: ["mounted", "change", "scroll", "update:modelValue"],
|
5969
6121
|
setup(c, { expose: i, emit: e }) {
|
5970
|
-
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) => {
|
5971
6123
|
h.completion != null && h.completion.dispose();
|
5972
6124
|
let j = d.array.distinct(x, (M) => M);
|
5973
6125
|
h.completion = O(v, j);
|
5974
|
-
}, O = (v, x) => v == null ||
|
6126
|
+
}, O = (v, x) => v == null || a == null ? null : a.languages.registerCompletionItemProvider(v, {
|
5975
6127
|
provideCompletionItems: (M, I) => {
|
5976
|
-
let L = M.getWordUntilPosition(I),
|
6128
|
+
let L = M.getWordUntilPosition(I), b = new a.Range(I.lineNumber, L.startColumn, I.lineNumber, L.endColumn), w = [];
|
5977
6129
|
for (let E = 0; E < x.length; E++) {
|
5978
|
-
let
|
5979
|
-
label:
|
5980
|
-
kind:
|
5981
|
-
insertText:
|
5982
|
-
detail:
|
5983
|
-
range:
|
6130
|
+
let q = x[E], V = {
|
6131
|
+
label: q,
|
6132
|
+
kind: a.languages.CompletionItemKind.Keyword,
|
6133
|
+
insertText: q,
|
6134
|
+
detail: q,
|
6135
|
+
range: b
|
5984
6136
|
};
|
5985
|
-
|
6137
|
+
w.push(V);
|
5986
6138
|
}
|
5987
|
-
return { suggestions:
|
6139
|
+
return { suggestions: w };
|
5988
6140
|
}
|
5989
|
-
}),
|
6141
|
+
}), P = async (v) => {
|
5990
6142
|
let x = Z.editor.intelli;
|
5991
6143
|
if (x[v] != null)
|
5992
6144
|
return;
|
5993
|
-
let j =
|
6145
|
+
let j = a.languages.getLanguages().find((L) => L.id == v);
|
5994
6146
|
if (j == null)
|
5995
6147
|
return;
|
5996
6148
|
let M = j.loader;
|
5997
6149
|
if (M == null)
|
5998
6150
|
return;
|
5999
6151
|
let I = await M();
|
6000
|
-
x[v] || (
|
6001
|
-
},
|
6152
|
+
x[v] || (X(v, I), Y(v, I), x[v] = !0);
|
6153
|
+
}, X = (v, x) => {
|
6002
6154
|
const j = ["builtinFunctions", "keywords", "operators"];
|
6003
|
-
return
|
6155
|
+
return a.languages.registerCompletionItemProvider(v, {
|
6004
6156
|
provideCompletionItems: (I, L) => {
|
6005
|
-
let
|
6006
|
-
for (let
|
6007
|
-
let
|
6008
|
-
if (
|
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];
|
6160
|
+
if (V == null)
|
6009
6161
|
continue;
|
6010
|
-
let pe = $(
|
6011
|
-
|
6012
|
-
for (let
|
6013
|
-
let
|
6014
|
-
label:
|
6015
|
-
documentation:
|
6016
|
-
range:
|
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,
|
6168
|
+
range: w,
|
6017
6169
|
kind: G,
|
6018
|
-
insertText:
|
6170
|
+
insertText: He + he,
|
6019
6171
|
detail: pe
|
6020
6172
|
};
|
6021
|
-
E.push(
|
6173
|
+
E.push(ot);
|
6022
6174
|
}
|
6023
6175
|
}
|
6024
6176
|
return { suggestions: E };
|
6025
6177
|
}
|
6026
6178
|
});
|
6027
|
-
},
|
6179
|
+
}, Y = (v, x) => {
|
6028
6180
|
const j = ["builtinFunctions", "keywords", "operators"];
|
6029
|
-
return
|
6181
|
+
return a.languages.registerHoverProvider(v, {
|
6030
6182
|
provideHover: (I, L) => {
|
6031
|
-
let
|
6032
|
-
if (!
|
6183
|
+
let b = I.getWordAtPosition(L);
|
6184
|
+
if (!b)
|
6033
6185
|
return null;
|
6034
|
-
for (let
|
6035
|
-
let E = x.language[
|
6036
|
-
if (E == null || E.find((G) => G ==
|
6186
|
+
for (let w of j) {
|
6187
|
+
let E = x.language[w];
|
6188
|
+
if (E == null || E.find((G) => G == b.word.toUpperCase()) == null)
|
6037
6189
|
continue;
|
6038
|
-
let
|
6190
|
+
let V = $(w);
|
6039
6191
|
return {
|
6040
|
-
range: new
|
6192
|
+
range: new a.Range(L.lineNumber, L.lineNumber, b.startColumn, b.endColumn),
|
6041
6193
|
contents: [
|
6042
|
-
{ value: "**" +
|
6043
|
-
{ value:
|
6194
|
+
{ value: "**" + b.word + "**" },
|
6195
|
+
{ value: V }
|
6044
6196
|
]
|
6045
6197
|
};
|
6046
6198
|
}
|
@@ -6064,9 +6216,9 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
6064
6216
|
trailingCommas: "ignore"
|
6065
6217
|
//允许末尾逗号
|
6066
6218
|
};
|
6067
|
-
|
6068
|
-
let j = v ?
|
6069
|
-
p =
|
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);
|
6070
6222
|
let M = {
|
6071
6223
|
tabSize: 2,
|
6072
6224
|
//Tab缩进大小
|
@@ -6083,7 +6235,7 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
6083
6235
|
//根据父元素自动布局
|
6084
6236
|
model: p
|
6085
6237
|
};
|
6086
|
-
u =
|
6238
|
+
u = a.editor.create(g.value, M), s.value.scrollTop && u.setScrollTop(s.value.scrollTop);
|
6087
6239
|
let I = s.value.selection;
|
6088
6240
|
if (I) {
|
6089
6241
|
let L = {
|
@@ -6097,13 +6249,13 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
6097
6249
|
u.onDidScrollChange((L) => {
|
6098
6250
|
s.value.scrollTop = L.scrollTop, t("scroll", L.scrollTop);
|
6099
6251
|
}), u.onDidChangeModelContent((L) => {
|
6100
|
-
let
|
6101
|
-
t("update:modelValue",
|
6252
|
+
let b = u.getValue();
|
6253
|
+
t("update:modelValue", b), t("change", b);
|
6102
6254
|
});
|
6103
6255
|
};
|
6104
|
-
|
6105
|
-
|
6106
|
-
}),
|
6256
|
+
oe(async () => {
|
6257
|
+
a = await le.getMonaco(), await A(), t("mounted", a, u);
|
6258
|
+
}), ae(() => {
|
6107
6259
|
var v;
|
6108
6260
|
p == null || p.dispose(), u == null || u.dispose(), (v = h.completion) == null || v.dispose();
|
6109
6261
|
});
|
@@ -6112,9 +6264,9 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
6112
6264
|
}, J = () => u;
|
6113
6265
|
return W(() => m.theme, (v, x) => {
|
6114
6266
|
let j = F(v);
|
6115
|
-
|
6267
|
+
a.editor.setTheme(j);
|
6116
6268
|
}), W(() => m.language, (v, x) => {
|
6117
|
-
}), W(() =>
|
6269
|
+
}), W(() => o.value, (v, x) => {
|
6118
6270
|
if (!u)
|
6119
6271
|
return;
|
6120
6272
|
let j = u.getValue();
|
@@ -6123,8 +6275,8 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
6123
6275
|
if (!u)
|
6124
6276
|
return;
|
6125
6277
|
let j = u.getModel();
|
6126
|
-
|
6127
|
-
}), i({ layout: R, getEditor: J, registerIntelli: k }), (v, x) => (C(),
|
6278
|
+
a.editor.setModelLanguage(j, v), await P(v);
|
6279
|
+
}), i({ layout: R, getEditor: J, registerIntelli: k }), (v, x) => (C(), Fe(js, null, {
|
6128
6280
|
default: ue(() => [
|
6129
6281
|
S("div", {
|
6130
6282
|
ref_key: "editorRef",
|
@@ -6135,7 +6287,7 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
6135
6287
|
_: 1
|
6136
6288
|
}));
|
6137
6289
|
}
|
6138
|
-
}), Ol = /* @__PURE__ */
|
6290
|
+
}), Ol = /* @__PURE__ */ B({
|
6139
6291
|
__name: "Compare",
|
6140
6292
|
props: {
|
6141
6293
|
inline: { type: Boolean, default: !1 },
|
@@ -6145,25 +6297,25 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
6145
6297
|
},
|
6146
6298
|
emits: ["update:modelValue", "update:original", "change"],
|
6147
6299
|
setup(c, { emit: i }) {
|
6148
|
-
let e = i, t = c, { inline: r, language: s, original: l, modelValue:
|
6149
|
-
u = $.editor.createModel(l.value, s.value), p = $.editor.createModel(
|
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, {
|
6150
6302
|
originalEditable: !0,
|
6151
6303
|
automaticLayout: !0,
|
6152
6304
|
renderSideBySide: !r.value,
|
6153
6305
|
//是否启用行内模式
|
6154
|
-
theme:
|
6155
|
-
}),
|
6306
|
+
theme: X(P.theme)
|
6307
|
+
}), a.setModel({ original: u, modified: p }), h = a.getOriginalEditor(), h.onDidChangeModelContent((F) => {
|
6156
6308
|
let A = h.getValue();
|
6157
6309
|
e("update:original", A), e("change", A);
|
6158
|
-
}), g =
|
6310
|
+
}), g = a.getModifiedEditor(), g.onDidChangeModelContent((F) => {
|
6159
6311
|
let A = g.getValue();
|
6160
6312
|
e("update:modelValue", A);
|
6161
6313
|
});
|
6162
6314
|
};
|
6163
|
-
return
|
6164
|
-
m = await le.getMonaco(),
|
6165
|
-
}), W(() =>
|
6166
|
-
let A =
|
6315
|
+
return oe(async () => {
|
6316
|
+
m = await le.getMonaco(), Y(m);
|
6317
|
+
}), W(() => P.theme, ($, F) => {
|
6318
|
+
let A = X($);
|
6167
6319
|
m.editor.setTheme(A);
|
6168
6320
|
}), W(() => s.value, ($, F) => {
|
6169
6321
|
u && m.editor.setModelLanguage(u, $), p && m.editor.setModelLanguage(p, $);
|
@@ -6172,7 +6324,7 @@ const Me = /* @__PURE__ */ de(Hs, [["render", Os]]), Ul = /* @__PURE__ */ P({
|
|
6172
6324
|
return;
|
6173
6325
|
let A = u.getValue();
|
6174
6326
|
$ != A && u.setValue($ ?? "");
|
6175
|
-
}), W(() =>
|
6327
|
+
}), W(() => o.value, ($, F) => {
|
6176
6328
|
if (!p)
|
6177
6329
|
return;
|
6178
6330
|
let A = p.getValue();
|
@@ -6190,21 +6342,21 @@ function Is(c, i) {
|
|
6190
6342
|
S("input", { type: "text" }, null, -1)
|
6191
6343
|
]));
|
6192
6344
|
}
|
6193
|
-
const Ll = /* @__PURE__ */ de(Ls, [["render", Is]]), Ms = {},
|
6194
|
-
function
|
6195
|
-
return C(), T("div",
|
6345
|
+
const Ll = /* @__PURE__ */ de(Ls, [["render", Is]]), Ms = {}, Bs = { class: "ha-option" };
|
6346
|
+
function Ps(c, i) {
|
6347
|
+
return C(), T("div", Bs, "选项");
|
6196
6348
|
}
|
6197
|
-
const Fs = /* @__PURE__ */ de(Ms, [["render",
|
6349
|
+
const Fs = /* @__PURE__ */ de(Ms, [["render", Ps]]), Ns = { class: "ha-rich-text" }, Rl = /* @__PURE__ */ B({
|
6198
6350
|
__name: "RichText",
|
6199
|
-
props: /* @__PURE__ */
|
6351
|
+
props: /* @__PURE__ */ Ue({
|
6200
6352
|
options: {}
|
6201
6353
|
}, {
|
6202
6354
|
modelValue: {},
|
6203
6355
|
modelModifiers: {}
|
6204
6356
|
}),
|
6205
|
-
emits: /* @__PURE__ */
|
6357
|
+
emits: /* @__PURE__ */ Ue(["change", "scroll"], ["update:modelValue"]),
|
6206
6358
|
setup(c, { expose: i, emit: e }) {
|
6207
|
-
let t = e, r = c, { options: s } = z(r), l =
|
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) => {
|
6208
6360
|
let R = d.time.getDateString(), J = getSelection(), v = J.getRangeAt(0), x = v.startContainer;
|
6209
6361
|
if (x.nodeName == "#text")
|
6210
6362
|
x.insertData(v.startOffset, R), v.setStart(x, v.startOffset + R.length), J.removeAllRanges(), J.addRange(v);
|
@@ -6214,56 +6366,56 @@ const Fs = /* @__PURE__ */ de(Ms, [["render", Bs]]), Ns = { class: "ha-rich-text
|
|
6214
6366
|
let M = document.createRange();
|
6215
6367
|
M.selectNodeContents(j), M.setStart(j, M.startOffset + R.length), J.removeAllRanges(), J.addRange(M);
|
6216
6368
|
}
|
6217
|
-
},
|
6218
|
-
if (
|
6369
|
+
}, Y = (A) => {
|
6370
|
+
if (a.scrollTop = A.scrollTop, p || h) {
|
6219
6371
|
p = !1, h = !1;
|
6220
6372
|
return;
|
6221
6373
|
}
|
6222
6374
|
u = A, t("scroll", A);
|
6223
6375
|
}, $ = () => `height: calc(100% - ${d.dom.getHeight(m.value)}px)`, F = async () => {
|
6224
6376
|
let A = await le.getQuill();
|
6225
|
-
|
6377
|
+
o = new A(g.value, {
|
6226
6378
|
modules: {
|
6227
6379
|
toolbar: {
|
6228
6380
|
container: m.value,
|
6229
|
-
handlers: { date:
|
6381
|
+
handlers: { date: X }
|
6230
6382
|
}
|
6231
6383
|
},
|
6232
6384
|
theme: "snow"
|
6233
|
-
}), O.value = !0,
|
6234
|
-
|
6235
|
-
}), s.value.readonly &&
|
6236
|
-
|
6237
|
-
}),
|
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) => {
|
6238
6390
|
h = !0;
|
6239
6391
|
});
|
6240
6392
|
};
|
6241
|
-
return
|
6393
|
+
return oe(() => {
|
6242
6394
|
F();
|
6243
|
-
}),
|
6244
|
-
|
6395
|
+
}), ae(() => {
|
6396
|
+
o = null;
|
6245
6397
|
}), W(() => l.value, (A, R) => {
|
6246
|
-
|
6398
|
+
a && a.innerHTML != A && (a.innerHTML = A);
|
6247
6399
|
}), W(() => s.value.scrollTop, (A, R) => {
|
6248
|
-
A != null && (u == null ? void 0 : u.scrollTop) != A &&
|
6249
|
-
|
6400
|
+
A != null && (u == null ? void 0 : u.scrollTop) != A && Oe(() => {
|
6401
|
+
P.value.options.scrollTop = A;
|
6250
6402
|
});
|
6251
6403
|
}), i({}), (A, R) => (C(), T("div", Ns, [
|
6252
|
-
|
6404
|
+
dt(S("div", {
|
6253
6405
|
ref_key: "toolbarRef",
|
6254
6406
|
ref: m
|
6255
6407
|
}, R[0] || (R[0] = [
|
6256
|
-
|
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)
|
6257
6409
|
]), 512), [
|
6258
|
-
[
|
6410
|
+
[ht, f(O)]
|
6259
6411
|
]),
|
6260
6412
|
re(f(Ds), {
|
6261
6413
|
ref_key: "scrollerRef",
|
6262
6414
|
ref: k,
|
6263
6415
|
class: "ql-body",
|
6264
|
-
options: f(
|
6265
|
-
onScroll: f(
|
6266
|
-
style: ee(f(
|
6416
|
+
options: f(P).options,
|
6417
|
+
onScroll: f(Y),
|
6418
|
+
style: ee(f(P).style)
|
6267
6419
|
}, {
|
6268
6420
|
default: ue(() => [
|
6269
6421
|
S("div", {
|
@@ -6275,16 +6427,16 @@ const Fs = /* @__PURE__ */ de(Ms, [["render", Bs]]), Ns = { class: "ha-rich-text
|
|
6275
6427
|
}, 8, ["options", "onScroll", "style"])
|
6276
6428
|
]));
|
6277
6429
|
}
|
6278
|
-
}),
|
6430
|
+
}), qs = {}, Vs = { class: "ha-select" };
|
6279
6431
|
function Ws(c, i) {
|
6280
|
-
return C(), T("div",
|
6432
|
+
return C(), T("div", Vs, i[0] || (i[0] = [
|
6281
6433
|
S("div", { class: "select-title" }, "头", -1),
|
6282
6434
|
S("div", { class: "select-body" }, [
|
6283
6435
|
S("input", { type: "text" })
|
6284
6436
|
], -1)
|
6285
6437
|
]));
|
6286
6438
|
}
|
6287
|
-
const
|
6439
|
+
const we = /* @__PURE__ */ de(qs, [["render", Ws]]);
|
6288
6440
|
class Il {
|
6289
6441
|
/**
|
6290
6442
|
* 初始化
|
@@ -6309,7 +6461,7 @@ class Il {
|
|
6309
6461
|
this.startLine = i, this.endLine = e, this.startColumn = t, this.endColumn = r;
|
6310
6462
|
}
|
6311
6463
|
}
|
6312
|
-
const zs = { class: "ha-condition" }, Ks = /* @__PURE__ */
|
6464
|
+
const zs = { class: "ha-condition" }, Ks = /* @__PURE__ */ B({
|
6313
6465
|
__name: "Condition",
|
6314
6466
|
props: {
|
6315
6467
|
name: {},
|
@@ -6319,26 +6471,26 @@ const zs = { class: "ha-condition" }, Ks = /* @__PURE__ */ P({
|
|
6319
6471
|
setup(c) {
|
6320
6472
|
let i = c, { name: e, operator: t, value: r } = z(i);
|
6321
6473
|
return (s, l) => (C(), T("div", zs, [
|
6322
|
-
re(f(
|
6474
|
+
re(f(we), {
|
6323
6475
|
modelValue: f(e),
|
6324
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
6476
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => ve(e) ? e.value = o : e = o)
|
6325
6477
|
}, null, 8, ["modelValue"]),
|
6326
|
-
re(f(
|
6478
|
+
re(f(we), {
|
6327
6479
|
modelValue: f(t),
|
6328
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
6480
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => ve(t) ? t.value = o : t = o)
|
6329
6481
|
}, {
|
6330
6482
|
default: ue(() => [
|
6331
6483
|
re(f(Fs))
|
6332
6484
|
]),
|
6333
6485
|
_: 1
|
6334
6486
|
}, 8, ["modelValue"]),
|
6335
|
-
re(f(
|
6487
|
+
re(f(we), {
|
6336
6488
|
modelValue: f(r),
|
6337
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
6489
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => ve(r) ? r.value = o : r = o)
|
6338
6490
|
}, null, 8, ["modelValue"])
|
6339
6491
|
]));
|
6340
6492
|
}
|
6341
|
-
}), Js = { class: "ha-condition-group" }, Ml = /* @__PURE__ */
|
6493
|
+
}), Js = { class: "ha-condition-group" }, Ml = /* @__PURE__ */ B({
|
6342
6494
|
__name: "Index",
|
6343
6495
|
props: {
|
6344
6496
|
conditions: {}
|
@@ -6346,20 +6498,20 @@ const zs = { class: "ha-condition" }, Ks = /* @__PURE__ */ P({
|
|
6346
6498
|
setup(c) {
|
6347
6499
|
let i = c, { conditions: e } = z(i);
|
6348
6500
|
return (t, r) => (C(), T("div", Js, [
|
6349
|
-
(C(!0), T(
|
6501
|
+
(C(!0), T(qe, null, Ve(f(e), (s) => (C(), Fe(f(Ks), {
|
6350
6502
|
name: s.name,
|
6351
6503
|
operator: s.operator,
|
6352
6504
|
value: s.value
|
6353
6505
|
}, null, 8, ["name", "operator", "value"]))), 256))
|
6354
6506
|
]));
|
6355
6507
|
}
|
6356
|
-
}),
|
6357
|
-
function
|
6358
|
-
return C(), T("div",
|
6359
|
-
|
6508
|
+
}), Xs = {}, Qs = { class: "ha-col" };
|
6509
|
+
function Ys(c, i) {
|
6510
|
+
return C(), T("div", Qs, [
|
6511
|
+
Q(c.$slots, "default")
|
6360
6512
|
]);
|
6361
6513
|
}
|
6362
|
-
const
|
6514
|
+
const Bl = /* @__PURE__ */ de(Xs, [["render", Ys]]), Pl = /* @__PURE__ */ B({
|
6363
6515
|
__name: "Container",
|
6364
6516
|
props: {
|
6365
6517
|
container: { type: Boolean, default: !0 }
|
@@ -6369,30 +6521,30 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6369
6521
|
return (t, r) => (C(), T("div", {
|
6370
6522
|
class: ce({ "ha-container": f(e) })
|
6371
6523
|
}, [
|
6372
|
-
|
6524
|
+
Q(t.$slots, "default")
|
6373
6525
|
], 2));
|
6374
6526
|
}
|
6375
|
-
}), Fl = /* @__PURE__ */
|
6527
|
+
}), Fl = /* @__PURE__ */ B({
|
6376
6528
|
__name: "Row",
|
6377
6529
|
props: {
|
6378
6530
|
gap: {},
|
6379
6531
|
direction: {}
|
6380
6532
|
},
|
6381
6533
|
setup(c, { expose: i }) {
|
6382
|
-
let e = c, { gap: t, direction: r } = z(e), s =
|
6383
|
-
let
|
6384
|
-
return t.value && (
|
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;
|
6385
6537
|
});
|
6386
|
-
return i({ ref: s }), (
|
6538
|
+
return i({ ref: s }), (o, a) => (C(), T("div", {
|
6387
6539
|
ref_key: "rowRef",
|
6388
6540
|
ref: s,
|
6389
6541
|
class: ce(["ha-row", f(r)]),
|
6390
6542
|
style: ee(f(l))
|
6391
6543
|
}, [
|
6392
|
-
|
6544
|
+
Q(o.$slots, "default")
|
6393
6545
|
], 6));
|
6394
6546
|
}
|
6395
|
-
}), Nl = /* @__PURE__ */
|
6547
|
+
}), Nl = /* @__PURE__ */ B({
|
6396
6548
|
__name: "Index",
|
6397
6549
|
props: {
|
6398
6550
|
modelValue: { type: Boolean },
|
@@ -6400,7 +6552,7 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6400
6552
|
},
|
6401
6553
|
emits: ["update:modelValue"],
|
6402
6554
|
setup(c) {
|
6403
|
-
let i =
|
6555
|
+
let i = Ne(c, "modelValue"), e = H(!0), t = H(0), r = null, s = () => {
|
6404
6556
|
t.value = 0, e.value = !0, r = setInterval(() => {
|
6405
6557
|
if (t.value < 100) {
|
6406
6558
|
t.value++;
|
@@ -6410,25 +6562,25 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6410
6562
|
}, 50);
|
6411
6563
|
}, l = () => {
|
6412
6564
|
clearInterval(r);
|
6413
|
-
let
|
6565
|
+
let o = 100 - t.value, a = 200, u = 20, p = o / (a / u), h = setInterval(() => {
|
6414
6566
|
t.value += p, !(t.value < 100) && (t.value = 100, clearInterval(h), setTimeout(() => {
|
6415
6567
|
e.value = !1;
|
6416
6568
|
}, 200));
|
6417
6569
|
}, u);
|
6418
6570
|
};
|
6419
|
-
return
|
6571
|
+
return oe(() => {
|
6420
6572
|
i.value && s();
|
6421
|
-
}),
|
6573
|
+
}), ae(() => {
|
6422
6574
|
clearInterval(r);
|
6423
|
-
}), W(() => i.value, (
|
6424
|
-
|
6425
|
-
}), (
|
6575
|
+
}), W(() => i.value, (o, a) => {
|
6576
|
+
o ? s() : l();
|
6577
|
+
}), (o, a) => f(e) ? (C(), T("div", {
|
6426
6578
|
key: 0,
|
6427
6579
|
class: "ha-progress",
|
6428
6580
|
style: ee({ width: f(t) + "%" })
|
6429
6581
|
}, null, 4)) : ye("", !0);
|
6430
6582
|
}
|
6431
|
-
}), 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" },
|
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({
|
6432
6584
|
__name: "SocketProgress",
|
6433
6585
|
props: {
|
6434
6586
|
title: {},
|
@@ -6436,22 +6588,22 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6436
6588
|
progress: {}
|
6437
6589
|
},
|
6438
6590
|
setup(c) {
|
6439
|
-
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 ?? "-"}`),
|
6440
|
-
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", {
|
6441
6593
|
class: ce(["ha-socket-progress", {
|
6442
6594
|
error: f(r).errored > 0 && f(r).errored == f(r).handled,
|
6443
6595
|
warning: f(r).errored > 0 && f(r).errored < f(r).handled
|
6444
6596
|
}])
|
6445
6597
|
}, [
|
6446
|
-
re(f(
|
6598
|
+
re(f(Be), { class: "progress-tips" }, {
|
6447
6599
|
default: ue(() => [
|
6448
6600
|
S("div", Gs, "成功:" + N(f(r).succeed ?? "-"), 1),
|
6449
6601
|
S("div", Zs, "异常:" + N(f(r).errored ?? "-"), 1),
|
6450
|
-
|
6602
|
+
Q(a.$slots, "default")
|
6451
6603
|
]),
|
6452
6604
|
_: 3
|
6453
6605
|
}),
|
6454
|
-
re(f(
|
6606
|
+
re(f(Be), { class: "progress-chart" }, {
|
6455
6607
|
default: ue(() => {
|
6456
6608
|
var p;
|
6457
6609
|
return [
|
@@ -6466,7 +6618,7 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6466
6618
|
S("div", null, "进度:" + N(f(l)), 1)
|
6467
6619
|
])
|
6468
6620
|
]),
|
6469
|
-
S("div", sl, N(f(
|
6621
|
+
S("div", sl, N(f(o)) + "%", 1)
|
6470
6622
|
];
|
6471
6623
|
}),
|
6472
6624
|
_: 1
|
@@ -6479,10 +6631,10 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6479
6631
|
}, nl = { class: "spinner-title" }, il = {
|
6480
6632
|
key: 0,
|
6481
6633
|
class: "spinner-content"
|
6482
|
-
},
|
6634
|
+
}, ol = { class: "stack" }, al = {
|
6483
6635
|
key: 1,
|
6484
6636
|
class: "ha-spinner is-loading"
|
6485
|
-
}, ul = { class: "spinner-loading" }, cl = { class: "spinner-text" },
|
6637
|
+
}, ul = { class: "spinner-loading" }, cl = { class: "spinner-text" }, Vl = /* @__PURE__ */ B({
|
6486
6638
|
__name: "Spinner",
|
6487
6639
|
props: {
|
6488
6640
|
title: { type: String },
|
@@ -6495,21 +6647,21 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6495
6647
|
let e = i, t = c, { title: r, content: s } = z(t), l = () => {
|
6496
6648
|
e("retry");
|
6497
6649
|
};
|
6498
|
-
return (
|
6650
|
+
return (o, a) => f(r) || f(s) ? (C(), T("div", ll, [
|
6499
6651
|
S("div", nl, [
|
6500
6652
|
Pe(N(f(r)), 1),
|
6501
6653
|
S("a", {
|
6502
6654
|
class: "retry",
|
6503
|
-
onClick:
|
6655
|
+
onClick: a[0] || (a[0] = //@ts-ignore
|
6504
6656
|
(...u) => f(l) && f(l)(...u))
|
6505
6657
|
}, N(f(fe)("common.retry")), 1)
|
6506
6658
|
]),
|
6507
6659
|
f(s) ? (C(), T("div", il, [
|
6508
|
-
S("div",
|
6660
|
+
S("div", ol, N(f(s)), 1)
|
6509
6661
|
])) : ye("", !0)
|
6510
|
-
])) : (C(), T("div",
|
6662
|
+
])) : (C(), T("div", al, [
|
6511
6663
|
S("div", ul, [
|
6512
|
-
|
6664
|
+
a[1] || (a[1] = S("div", { class: "spinner-dots" }, [
|
6513
6665
|
S("i"),
|
6514
6666
|
S("i"),
|
6515
6667
|
S("i"),
|
@@ -6519,7 +6671,7 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6519
6671
|
])
|
6520
6672
|
]));
|
6521
6673
|
}
|
6522
|
-
}), dl = { class: "ha-tab" }, Wl = /* @__PURE__ */
|
6674
|
+
}), dl = { class: "ha-tab" }, Wl = /* @__PURE__ */ B({
|
6523
6675
|
__name: "Tab",
|
6524
6676
|
props: {
|
6525
6677
|
mode: {},
|
@@ -6531,7 +6683,7 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6531
6683
|
S("div", { class: "tab-body" }, null, -1)
|
6532
6684
|
])));
|
6533
6685
|
}
|
6534
|
-
}), pl = { class: "ha-dance" }, zl = /* @__PURE__ */
|
6686
|
+
}), pl = { class: "ha-dance" }, zl = /* @__PURE__ */ B({
|
6535
6687
|
__name: "Dance",
|
6536
6688
|
props: {
|
6537
6689
|
text: {},
|
@@ -6540,51 +6692,51 @@ const Pl = /* @__PURE__ */ de(Qs, [["render", Xs]]), Bl = /* @__PURE__ */ P({
|
|
6540
6692
|
setup(c) {
|
6541
6693
|
let i = c, { text: e, delay: t } = z(i);
|
6542
6694
|
return (r, s) => (C(), T("div", pl, [
|
6543
|
-
(C(!0), T(
|
6695
|
+
(C(!0), T(qe, null, Ve(f(e), (l, o) => (C(), T("div", {
|
6544
6696
|
class: "char",
|
6545
|
-
style: ee({ animationDelay: `${f(t) +
|
6697
|
+
style: ee({ animationDelay: `${f(t) + o * 0.1}s` })
|
6546
6698
|
}, N(l), 5))), 256))
|
6547
6699
|
]));
|
6548
6700
|
}
|
6549
6701
|
});
|
6550
6702
|
let Kl = async (c) => {
|
6551
|
-
c == null && (c = new Cs()), await ys(c), await
|
6552
|
-
let i = await
|
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);
|
6553
6705
|
await _.openAsync(r);
|
6554
6706
|
let s = { url: c.socketUrl }, l = d.json.serialize(s);
|
6555
|
-
await
|
6556
|
-
let { ok:
|
6557
|
-
return
|
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));
|
6558
6710
|
};
|
6559
6711
|
};
|
6560
6712
|
export {
|
6561
|
-
|
6713
|
+
Ir as ArrayUtil,
|
6562
6714
|
rs as BrowserUtil,
|
6563
6715
|
Pt as BuilderFactory,
|
6564
6716
|
Ye as Cdn,
|
6565
|
-
|
6566
|
-
|
6717
|
+
qt as CdnFactory,
|
6718
|
+
Mr as ComponentUtil,
|
6567
6719
|
Cs as CreateFeOptions,
|
6568
|
-
|
6720
|
+
os as DeltaUtility,
|
6569
6721
|
Pr as DictionaryUtil,
|
6570
|
-
|
6722
|
+
Br as DomUtil,
|
6571
6723
|
ns as DragEvent,
|
6572
|
-
|
6573
|
-
|
6574
|
-
|
6575
|
-
|
6576
|
-
|
6724
|
+
zt as EncoderFactory,
|
6725
|
+
Fr as EventUtil,
|
6726
|
+
$e as EventUtility,
|
6727
|
+
Xt as ExcelFactory,
|
6728
|
+
Gt as ExplainerFactory,
|
6577
6729
|
y as Factories,
|
6578
6730
|
D as Factory,
|
6579
|
-
|
6580
|
-
|
6581
|
-
|
6731
|
+
rr as FeatureFactory,
|
6732
|
+
Nr as FileUtil,
|
6733
|
+
Be as HaCard,
|
6582
6734
|
Ul as HaCode,
|
6583
|
-
|
6735
|
+
Bl as HaCol,
|
6584
6736
|
Ol as HaCompare,
|
6585
6737
|
Ks as HaCondition,
|
6586
6738
|
Ml as HaConditionGroup,
|
6587
|
-
|
6739
|
+
Pl as HaContainer,
|
6588
6740
|
zl as HaDance,
|
6589
6741
|
Dl as HaEmpty,
|
6590
6742
|
js as HaFill,
|
@@ -6594,57 +6746,56 @@ export {
|
|
6594
6746
|
Rl as HaRichText,
|
6595
6747
|
Fl as HaRow,
|
6596
6748
|
Ds as HaScroller,
|
6597
|
-
|
6598
|
-
|
6599
|
-
|
6749
|
+
we as HaSelect,
|
6750
|
+
ql as HaSocketProgress,
|
6751
|
+
Vl as HaSpinner,
|
6600
6752
|
Wl as HaTab,
|
6601
6753
|
Hl as HaTimer,
|
6602
|
-
|
6603
|
-
|
6604
|
-
|
6605
|
-
|
6606
|
-
|
6607
|
-
|
6608
|
-
|
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,
|
6609
6761
|
Vr as ImageUtil,
|
6610
6762
|
ts as JsonUtil,
|
6611
|
-
|
6763
|
+
xt as KeyboardType,
|
6612
6764
|
is as KeyboardUtility,
|
6613
|
-
|
6614
|
-
|
6615
|
-
|
6616
|
-
|
6617
|
-
|
6618
|
-
|
6619
|
-
|
6620
|
-
|
6621
|
-
|
6765
|
+
Wr as MathUtil,
|
6766
|
+
gr as Messenger,
|
6767
|
+
yr as MessengerFactory,
|
6768
|
+
zr as MicroUtil,
|
6769
|
+
Kr as MountUtil,
|
6770
|
+
as as MouseUtility,
|
6771
|
+
Jr as ObjectUtil,
|
6772
|
+
lt as Position,
|
6773
|
+
Mt as ProviderFactory,
|
6622
6774
|
Sl as ProviderTable,
|
6623
6775
|
us as RandomUtility,
|
6624
6776
|
Il as Range,
|
6625
6777
|
El as Rect,
|
6626
6778
|
Tl as Ref,
|
6627
|
-
|
6779
|
+
kt as RepoFactory,
|
6628
6780
|
Se as SaveUtility,
|
6629
6781
|
Zr as ScrollUtil,
|
6630
6782
|
ls as SignUtil,
|
6631
|
-
|
6632
|
-
|
6783
|
+
br as SignerFactory,
|
6784
|
+
xr as SocketFactory,
|
6633
6785
|
_l as SocketProgress,
|
6634
6786
|
Cl as SocketResponse,
|
6635
|
-
|
6636
|
-
|
6637
|
-
|
6638
|
-
|
6639
|
-
|
6640
|
-
|
6787
|
+
Re as SqlHelper,
|
6788
|
+
$r as SsoFactory,
|
6789
|
+
rt as SsoUser,
|
6790
|
+
Xr as StringUtil,
|
6791
|
+
Ht as SvcFactory,
|
6792
|
+
Hr as TaskFactory,
|
6641
6793
|
Qr as TaskUtil,
|
6642
|
-
|
6643
|
-
|
6794
|
+
Lr as TemplateFactory,
|
6795
|
+
Yr as TimeUtil,
|
6644
6796
|
Gr as TreeUtil,
|
6645
|
-
Yr as TypeUtil,
|
6646
6797
|
ss as UrlUtil,
|
6647
|
-
|
6798
|
+
Rr as UtilFactory,
|
6648
6799
|
ds as UtilityFactory,
|
6649
6800
|
d as Utils,
|
6650
6801
|
$l as VideoFactory,
|
@@ -6656,23 +6807,23 @@ export {
|
|
6656
6807
|
xl as driverSvc,
|
6657
6808
|
Al as envSvc,
|
6658
6809
|
_ as http,
|
6659
|
-
|
6810
|
+
Me as i18n,
|
6660
6811
|
ys as initDriverAsync,
|
6661
|
-
|
6812
|
+
_t as initRepoAsync,
|
6662
6813
|
kl as initSvcAsync,
|
6663
|
-
|
6664
|
-
|
6814
|
+
Le as logSvc,
|
6815
|
+
it as md5,
|
6665
6816
|
ie as messenger,
|
6666
|
-
|
6817
|
+
At as moduleRepo,
|
6667
6818
|
K as moment,
|
6668
|
-
|
6669
|
-
|
6819
|
+
St as queryRepo,
|
6820
|
+
ze as settingRepo,
|
6670
6821
|
Qe as settingSvc,
|
6671
|
-
|
6822
|
+
je as socket,
|
6672
6823
|
fe as t,
|
6673
|
-
|
6824
|
+
bs as t_enum,
|
6674
6825
|
ms as t_exists,
|
6675
|
-
|
6826
|
+
ws as t_field,
|
6676
6827
|
ks as t_field_choose_placeholder,
|
6677
6828
|
xs as t_field_placeholder,
|
6678
6829
|
_s as t_menu,
|
@@ -6680,5 +6831,5 @@ export {
|
|
6680
6831
|
vs as t_sys,
|
6681
6832
|
As as t_table,
|
6682
6833
|
fs as template,
|
6683
|
-
|
6834
|
+
Ut as userSvc
|
6684
6835
|
};
|