halo-fe 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +1399 -1366
- package/esm/drivers/IDisposable.d.ts +4 -0
- package/esm/drivers/cdns/index.d.ts +1 -2
- package/esm/drivers/encoders/index.d.ts +1 -2
- package/esm/drivers/excels/index.d.ts +2 -3
- package/esm/drivers/explainers/index.d.ts +1 -2
- package/esm/drivers/factories/Factories.d.ts +55 -0
- package/esm/drivers/factories/implement/CdnFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/EncoderFactory.d.ts +17 -0
- package/esm/drivers/factories/implement/ExcelFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/ExplainerFactory.d.ts +6 -0
- package/esm/drivers/factories/implement/FeatureFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/HasherFactory.d.ts +11 -0
- package/esm/drivers/factories/implement/HttpFactory.d.ts +18 -0
- package/esm/drivers/factories/implement/ProviderFactory.d.ts +18 -0
- package/esm/drivers/factories/implement/SignerFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/SsoFactory.d.ts +17 -0
- package/esm/drivers/factories/implement/TaskFactory.d.ts +9 -0
- package/esm/drivers/factories/implement/VideoFactory.d.ts +3 -0
- package/esm/drivers/factories/implement/VoiceFactory.d.ts +6 -0
- package/esm/drivers/factories/implement/index.d.ts +11 -0
- package/esm/drivers/factories/index.d.ts +5 -26
- package/esm/drivers/features/index.d.ts +2 -3
- package/esm/drivers/hashers/index.d.ts +2 -3
- package/esm/drivers/https/index.d.ts +2 -3
- package/esm/drivers/providers/index.d.ts +2 -3
- package/esm/drivers/signers/index.d.ts +2 -3
- package/esm/drivers/ssos/index.d.ts +2 -3
- package/esm/drivers/tasks/ITask.d.ts +12 -0
- package/esm/drivers/tasks/Task.d.ts +10 -0
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +11 -0
- package/esm/drivers/tasks/index.d.ts +2 -0
- package/esm/helpers/ArrayHelper.d.ts +6 -5
- package/esm/helpers/DomHelper.d.ts +4 -0
- package/esm/helpers/HtmlHelper.d.ts +4 -0
- package/esm/helpers/MathHelper.d.ts +16 -12
- package/esm/helpers/StringHelper.d.ts +4 -4
- package/esm/svcs/SvcFactory.d.ts +1 -1
- package/esm/svcs/index.d.ts +2 -1
- package/package.json +5 -5
package/dist/main.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var r = (c, e, t) =>
|
1
|
+
var dt = Object.defineProperty;
|
2
|
+
var ht = (c, e, t) => e in c ? dt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
|
3
|
+
var r = (c, e, t) => ht(c, typeof e != "symbol" ? e + "" : e, t);
|
4
4
|
import { l as Le } from "./vendor-@monaco-editor-DKC4UNw_.js";
|
5
5
|
import { h as X } from "./vendor-moment-h96o7c8I.js";
|
6
|
-
import { defineAsyncComponent as
|
7
|
-
import { _ as
|
8
|
-
import { b as
|
9
|
-
import { _ as
|
10
|
-
import { F as
|
6
|
+
import { defineAsyncComponent as gt, reactive as ft, defineComponent as le, ref as R, onMounted as Pe, onUnmounted as Oe, openBlock as Q, createElementBlock as Z, normalizeStyle as fe, unref as D, renderSlot as pe, toRefs as ae, watch as K, createBlock as pt, withCtx as _e, createElementVNode as he, normalizeClass as qe, toDisplayString as et, createCommentVNode as tt, mergeModels as Ye, useModel as mt, nextTick as Qe, withDirectives as yt, vShow as vt, createVNode as bt, createStaticVNode as wt, computed as xt } from "vue";
|
7
|
+
import { _ as St } from "./vendor-underscore.string-vrHhfBaT.js";
|
8
|
+
import { b as kt } from "./vendor-clone-NGbTzSwJ.js";
|
9
|
+
import { _ as Fe } from "./vendor-underscore-DVTek3G4.js";
|
10
|
+
import { F as Et } from "./vendor-file-saver-DKXzEV2Q.js";
|
11
11
|
import { C as be } from "./vendor-crypto-js-DWn5nTKL.js";
|
12
12
|
import { x as Ie } from "./vendor-xlsx-js-style-DMPNZPOx.js";
|
13
|
-
let we = {},
|
13
|
+
let we = {}, Ct = (c) => {
|
14
14
|
we = c;
|
15
|
-
},
|
15
|
+
}, Ql = () => new Promise((c, e) => {
|
16
16
|
import("echarts").then((t) => {
|
17
17
|
c(t);
|
18
18
|
});
|
@@ -62,7 +62,7 @@ r(b, "getUniqueId", () => {
|
|
62
62
|
}), /**
|
63
63
|
* 填充字符串到指定长度,使用pad填充
|
64
64
|
*/
|
65
|
-
r(b, "padLeft", (e, t, l) =>
|
65
|
+
r(b, "padLeft", (e, t, l) => St.pad(e, t, l)), /**
|
66
66
|
* 去掉头部字符串
|
67
67
|
*/
|
68
68
|
r(b, "trimStart", (e, t) => {
|
@@ -111,14 +111,6 @@ r(b, "containsIgnoreCase", (e, t) => {
|
|
111
111
|
return !0;
|
112
112
|
}
|
113
113
|
return !1;
|
114
|
-
}), /**
|
115
|
-
* 从html中提取纯文本
|
116
|
-
*/
|
117
|
-
r(b, "getTextFromHtml", (e) => {
|
118
|
-
if (!e)
|
119
|
-
return null;
|
120
|
-
let t = new RegExp("<.+?>", "g");
|
121
|
-
return e.replace(t, "");
|
122
114
|
}), /**
|
123
115
|
* 判断是否是数字类型,这样支持0
|
124
116
|
*/
|
@@ -187,8 +179,11 @@ r(b, "getBetween", (e, t, l) => {
|
|
187
179
|
return null;
|
188
180
|
let n = s + t.length, i = e.substring(n), o = i.indexOf(l);
|
189
181
|
return o == -1 ? null : i.substring(0, o);
|
190
|
-
})
|
191
|
-
|
182
|
+
}), /**
|
183
|
+
* 填充字符串到指定长度,使用pad填充
|
184
|
+
*/
|
185
|
+
r(b, "padStart", (e, t, l) => e.padStart(t, l));
|
186
|
+
let V = b;
|
192
187
|
const ce = class ce {
|
193
188
|
/**
|
194
189
|
* 净化对象,返回不带默认属性的对象
|
@@ -256,7 +251,7 @@ r(ce, "copy", (e, t = null) => {
|
|
256
251
|
* 对对象进行深度克隆,同时可以移除Proxy对象
|
257
252
|
*/
|
258
253
|
r(ce, "clone", (e, t = null) => {
|
259
|
-
let l =
|
254
|
+
let l = kt(e, !0);
|
260
255
|
if (t == null)
|
261
256
|
return l;
|
262
257
|
if (L.isArray(e))
|
@@ -281,7 +276,7 @@ r(ce, "addProperties", (e, t, l) => {
|
|
281
276
|
}
|
282
277
|
});
|
283
278
|
let ie = ce;
|
284
|
-
class
|
279
|
+
class Ae {
|
285
280
|
/**
|
286
281
|
* 从指定字典中提取忽略大小写的key的值
|
287
282
|
*/
|
@@ -320,7 +315,7 @@ class Re {
|
|
320
315
|
}
|
321
316
|
// #endregion
|
322
317
|
}
|
323
|
-
const
|
318
|
+
const M = class M {
|
324
319
|
/**
|
325
320
|
* 获取指定地址路由对象
|
326
321
|
*/
|
@@ -449,7 +444,7 @@ const F = class F {
|
|
449
444
|
*/
|
450
445
|
static serialize(e, t = !0) {
|
451
446
|
let l = (n) => t ? encodeURIComponent(n) : n;
|
452
|
-
return
|
447
|
+
return Ae.join(e, l, "=", "&");
|
453
448
|
}
|
454
449
|
//endregion
|
455
450
|
//region 编码和解码
|
@@ -470,7 +465,7 @@ const F = class F {
|
|
470
465
|
/**
|
471
466
|
* 处理键值对的值
|
472
467
|
*/
|
473
|
-
r(
|
468
|
+
r(M, "handleQueryValue", (e, t) => {
|
474
469
|
let l = "";
|
475
470
|
if (e == null)
|
476
471
|
return l;
|
@@ -478,13 +473,13 @@ r(F, "handleQueryValue", (e, t) => {
|
|
478
473
|
if (e.length > 0)
|
479
474
|
for (let s = 0; s < e.length; s++) {
|
480
475
|
let n = ie.clone(t);
|
481
|
-
n.push(""), l +=
|
476
|
+
n.push(""), l += M.handleQueryValue(e[s], n);
|
482
477
|
}
|
483
478
|
} else if (e instanceof Object) {
|
484
479
|
let s = Object.keys(e);
|
485
480
|
for (let n of s) {
|
486
481
|
let i = ie.clone(t);
|
487
|
-
i.push(n), l +=
|
482
|
+
i.push(n), l += M.handleQueryValue(e[n], i);
|
488
483
|
}
|
489
484
|
} else {
|
490
485
|
let s = "";
|
@@ -497,27 +492,27 @@ r(F, "handleQueryValue", (e, t) => {
|
|
497
492
|
}), /**
|
498
493
|
* 自动根据后面路径,决定是否要合并Url
|
499
494
|
*/
|
500
|
-
r(
|
495
|
+
r(M, "concatUrl", (e, t) => M.httpOrHttps(t) ? t : e + t), /**
|
501
496
|
* 合并路径和查询对象(自动编码,并支持覆盖现有参数),得到完整URL地址,并会省略默认值
|
502
497
|
* ? 对url参数不编码,只对 queryObj 参数编码,防止用户的参数被改成编码形式
|
503
498
|
* ? 目前,对Url参数对象和目标对象都编码,因为源对象属性是经过解码的
|
504
499
|
*/
|
505
|
-
r(
|
500
|
+
r(M, "getUrl", (e, t = null) => {
|
506
501
|
if (e == null)
|
507
502
|
return null;
|
508
503
|
if (t == null)
|
509
504
|
return e;
|
510
|
-
let l =
|
511
|
-
return
|
505
|
+
let l = M.deserialize(e), s = ie.mergeTo(l, t);
|
506
|
+
return M.getPath(e) + "?" + M.getQuery(s);
|
512
507
|
}), /**
|
513
508
|
* 获取超链接配置对象
|
514
509
|
*/
|
515
|
-
r(
|
510
|
+
r(M, "getAnchor", (e, t = null) => {
|
516
511
|
let l = { href: null, target: null };
|
517
|
-
return
|
512
|
+
return M.httpOrHttps(e) ? (l.href = e, l.target = "_blank", l) : (l.href = M.getUrl(e, t), l);
|
518
513
|
});
|
519
|
-
let $ =
|
520
|
-
class
|
514
|
+
let $ = M;
|
515
|
+
class Dt {
|
521
516
|
/**
|
522
517
|
* 根据动态加载的组件对象,得到组件集合
|
523
518
|
*/
|
@@ -527,11 +522,11 @@ class At {
|
|
527
522
|
return s;
|
528
523
|
for (let i = 0; i < n.length; i++) {
|
529
524
|
const o = n[i];
|
530
|
-
let a =
|
525
|
+
let a = V.trim(o, t, ".vue"), d = (l ? l + "-" : "") + V.getDashName(a), h = e[o];
|
531
526
|
if (h.default)
|
532
527
|
s[d] = h.default;
|
533
528
|
else {
|
534
|
-
let g =
|
529
|
+
let g = gt(h);
|
535
530
|
s[d] = g;
|
536
531
|
}
|
537
532
|
}
|
@@ -549,7 +544,7 @@ class At {
|
|
549
544
|
/**
|
550
545
|
* 获取部分自定义组件名称
|
551
546
|
*/
|
552
|
-
r(
|
547
|
+
r(Dt, "getName", (e, t) => {
|
553
548
|
if (!e)
|
554
549
|
return null;
|
555
550
|
let l = $.getPath(e);
|
@@ -557,6 +552,7 @@ r(At, "getName", (e, t) => {
|
|
557
552
|
});
|
558
553
|
const k = class k {
|
559
554
|
};
|
555
|
+
//#region 分片
|
560
556
|
/**
|
561
557
|
* 获取指定数组分成每片指定长度后的集合
|
562
558
|
*/
|
@@ -567,7 +563,8 @@ r(k, "getChunks", (e, t) => {
|
|
567
563
|
l.push(n);
|
568
564
|
}
|
569
565
|
return l;
|
570
|
-
}), //#
|
566
|
+
}), //#endregion
|
567
|
+
//#region 交集差集
|
571
568
|
/**
|
572
569
|
* 取两个集合的交集
|
573
570
|
*/
|
@@ -615,13 +612,20 @@ r(k, "same", (e, t) => {
|
|
615
612
|
if (l[n] != s[n])
|
616
613
|
return !1;
|
617
614
|
return !0;
|
618
|
-
}),
|
615
|
+
}), //#region 求值
|
616
|
+
/**
|
619
617
|
* 求最大值,数据类型的比较函数要自己转换为数值类型
|
620
618
|
*/
|
621
|
-
r(k, "max", (e, t) =>
|
619
|
+
r(k, "max", (e, t) => Fe.max(e, t)), /**
|
622
620
|
* 求最小值,数据类型的比较函数要自己转换为数值类型
|
623
621
|
*/
|
624
|
-
r(k, "min", (e, t) =>
|
622
|
+
r(k, "min", (e, t) => Fe.min(e, t)), /**
|
623
|
+
* 求平均值
|
624
|
+
*/
|
625
|
+
r(k, "avg", (e, t, l = null) => {
|
626
|
+
let n = k.sum(e, t) / e.length;
|
627
|
+
return l == null ? n : parseFloat(n.toFixed(l));
|
628
|
+
}), /**
|
625
629
|
* 求和
|
626
630
|
*/
|
627
631
|
r(k, "sum", (e, t, l = null) => {
|
@@ -629,13 +633,8 @@ r(k, "sum", (e, t, l = null) => {
|
|
629
633
|
for (let i = 0; i < e.length; i++)
|
630
634
|
s += t(e[i]);
|
631
635
|
return l == null ? s : parseFloat(s.toFixed(l));
|
632
|
-
}),
|
633
|
-
|
634
|
-
*/
|
635
|
-
r(k, "avg", (e, t, l = null) => {
|
636
|
-
let n = k.sum(e, t) / e.length;
|
637
|
-
return l == null ? n : parseFloat(n.toFixed(l));
|
638
|
-
}), /**
|
636
|
+
}), //#endregion
|
637
|
+
/**
|
639
638
|
* 对数组元素根据指定函数进行去重,并返回去重后的值的新数组 n=>n.value
|
640
639
|
*/
|
641
640
|
r(k, "distinct", (e, t) => {
|
@@ -676,7 +675,7 @@ r(k, "split", (e, t, l = null) => {
|
|
676
675
|
* 合并多个数组中的每一项到新的二维数组中,没值的元素被有值的元素代替
|
677
676
|
*/
|
678
677
|
r(k, "combine", (...e) => {
|
679
|
-
let t = [], l =
|
678
|
+
let t = [], l = Fe.max(e, (s) => s.length);
|
680
679
|
for (let s = 0; s < l.length; s++) {
|
681
680
|
let n = [], i;
|
682
681
|
for (let o = 0; o < e.length; o++) {
|
@@ -714,17 +713,26 @@ r(k, "remove", (e, t) => {
|
|
714
713
|
k.remove(e, t[l]);
|
715
714
|
else
|
716
715
|
e.splice(e.indexOf(t), 1);
|
717
|
-
}),
|
716
|
+
}), //#region 排序
|
717
|
+
/**
|
718
718
|
* 按照指定函数对数组排序
|
719
|
+
* order: asc desc null
|
719
720
|
*/
|
720
|
-
r(k, "orderBy", (e, t, l =
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
721
|
+
r(k, "orderBy", (e, t, l = null) => {
|
722
|
+
if (t == null || l == null || e.length == 0 || e.length == 1)
|
723
|
+
return e;
|
724
|
+
t instanceof Function && (t = [t]);
|
725
|
+
let s = e.sort((i, o) => {
|
726
|
+
let a = t[0], u = a(i) - a(o);
|
727
|
+
if (u != 0)
|
728
|
+
return u;
|
729
|
+
let d = t[1];
|
730
|
+
return d == null ? u : d(i) - d(o);
|
731
|
+
}), n;
|
732
|
+
return l == "asc" ? n = s : n = s.reverse(), n;
|
733
|
+
}), //#endregion
|
734
|
+
//#region 分组
|
735
|
+
/**
|
728
736
|
* 分组
|
729
737
|
*/
|
730
738
|
r(k, "groupByArray", (e, t) => {
|
@@ -746,7 +754,7 @@ r(k, "groupBy", (e, t, l = null) => {
|
|
746
754
|
}), s;
|
747
755
|
});
|
748
756
|
let xe = k;
|
749
|
-
class
|
757
|
+
class N {
|
750
758
|
/**
|
751
759
|
* 根据字符串Ascii码得到固定颜色字典
|
752
760
|
*/
|
@@ -777,7 +785,7 @@ class q {
|
|
777
785
|
let t = "";
|
778
786
|
for (let l = 0; l < e.length; l++) {
|
779
787
|
let s = e[l];
|
780
|
-
|
788
|
+
V.isNullOrEmpty(s) || (t += s, l != e.length - 1 && (t += " "));
|
781
789
|
}
|
782
790
|
return t;
|
783
791
|
}
|
@@ -962,12 +970,11 @@ class q {
|
|
962
970
|
let s = l.offsetWidth;
|
963
971
|
return l.remove(), s;
|
964
972
|
}
|
965
|
-
//#endregion
|
966
973
|
}
|
967
974
|
/**
|
968
975
|
* 添加类
|
969
976
|
*/
|
970
|
-
r(
|
977
|
+
r(N, "addClass", (e, t, l = null) => {
|
971
978
|
let s;
|
972
979
|
if (t == null || t == "") {
|
973
980
|
if (l == null || l == "")
|
@@ -979,7 +986,7 @@ r(q, "addClass", (e, t, l = null) => {
|
|
979
986
|
}), /**
|
980
987
|
* 删除类
|
981
988
|
*/
|
982
|
-
r(
|
989
|
+
r(N, "removeClass", (e, t, l = null) => {
|
983
990
|
if (t == null || t == "")
|
984
991
|
return;
|
985
992
|
let s = [];
|
@@ -997,7 +1004,7 @@ r(q, "removeClass", (e, t, l = null) => {
|
|
997
1004
|
/**
|
998
1005
|
* 获取dom宽度或高度
|
999
1006
|
*/
|
1000
|
-
r(
|
1007
|
+
r(N, "getWidthOrHeight", (e, t, l = null) => {
|
1001
1008
|
let s = 0, n = [];
|
1002
1009
|
e instanceof Array && n.push(...e), e instanceof HTMLCollection ? n.push(...e) : n.push(e);
|
1003
1010
|
for (let i = 0; i < n.length; i++) {
|
@@ -1008,6 +1015,13 @@ r(q, "getWidthOrHeight", (e, t, l = null) => {
|
|
1008
1015
|
s += a[t], l && (s += l(o));
|
1009
1016
|
}
|
1010
1017
|
return s;
|
1018
|
+
}), //#endregion
|
1019
|
+
/**
|
1020
|
+
* 判断选择器内容是否溢出
|
1021
|
+
*/
|
1022
|
+
r(N, "isEllipsis", (e) => {
|
1023
|
+
let t = document.querySelector(e);
|
1024
|
+
return t.clientWidth < t.scrollWidth;
|
1011
1025
|
});
|
1012
1026
|
class ne {
|
1013
1027
|
}
|
@@ -1056,7 +1070,7 @@ r(re, "save", (e, t) => {
|
|
1056
1070
|
for (; s--; )
|
1057
1071
|
n[s] = l.charCodeAt(s);
|
1058
1072
|
let i = new Blob([n]);
|
1059
|
-
|
1073
|
+
Et.saveAs(i, t);
|
1060
1074
|
}), /**
|
1061
1075
|
* 获取文件扩展名
|
1062
1076
|
*/
|
@@ -1077,33 +1091,42 @@ r(re, "isImage", (e) => {
|
|
1077
1091
|
return [".png", ".jpg", ".jpeg", ".bmp", ".gif"].indexOf(t) > -1;
|
1078
1092
|
});
|
1079
1093
|
let Ue = re;
|
1080
|
-
class
|
1094
|
+
class Xe {
|
1081
1095
|
}
|
1082
1096
|
/**
|
1083
1097
|
* 获取Html内容
|
1084
1098
|
*/
|
1085
|
-
r(
|
1086
|
-
|
1099
|
+
r(Xe, "getHtml", (e) => L.isNumber(e) ? e : e && e.replace(/\n/g, "<br/>")), /**
|
1100
|
+
* 获取Html中的文字
|
1101
|
+
*/
|
1102
|
+
r(Xe, "getText", (e) => {
|
1103
|
+
if (!e)
|
1104
|
+
return null;
|
1105
|
+
if (!L.isString(e))
|
1106
|
+
return e;
|
1107
|
+
let t = new RegExp("<[^<>]+>", "g");
|
1108
|
+
return e.replace(t, "");
|
1109
|
+
});
|
1110
|
+
class Ot {
|
1087
1111
|
}
|
1088
1112
|
/**
|
1089
1113
|
* 获取base64图片地址
|
1090
1114
|
*/
|
1091
|
-
r(
|
1115
|
+
r(Ot, "base64", (e) => "data:image/png;base64," + e);
|
1092
1116
|
const U = class U {
|
1093
|
-
/**
|
1094
|
-
* 生成指定范围内的随机数
|
1095
|
-
*/
|
1096
|
-
static random(e, t) {
|
1097
|
-
let l = e + Math.random() * (t - e);
|
1098
|
-
var s = parseInt(l.toString());
|
1099
|
-
return s;
|
1100
|
-
}
|
1101
1117
|
/**
|
1102
1118
|
* 获取最大值
|
1103
1119
|
*/
|
1104
1120
|
static max(...e) {
|
1105
1121
|
return Math.max(...e);
|
1106
1122
|
}
|
1123
|
+
/**
|
1124
|
+
* 生成指定范围内的随机数
|
1125
|
+
*/
|
1126
|
+
static random(e, t) {
|
1127
|
+
let l = e + Math.random() * (t - e);
|
1128
|
+
return parseInt(l.toString());
|
1129
|
+
}
|
1107
1130
|
/**
|
1108
1131
|
* 获取在指定范围内的值
|
1109
1132
|
*/
|
@@ -1113,7 +1136,20 @@ const U = class U {
|
|
1113
1136
|
let s = Math.max(e, t);
|
1114
1137
|
return s = Math.min(s, l), s;
|
1115
1138
|
}
|
1139
|
+
/**
|
1140
|
+
* 尝试把任意类型转成数字,转换不成功返回原值
|
1141
|
+
*/
|
1142
|
+
static getNumber(e) {
|
1143
|
+
if (e == null)
|
1144
|
+
return null;
|
1145
|
+
try {
|
1146
|
+
return new Date(e).getTime();
|
1147
|
+
} catch {
|
1148
|
+
}
|
1149
|
+
return e;
|
1150
|
+
}
|
1116
1151
|
};
|
1152
|
+
//#region 分页
|
1117
1153
|
/**
|
1118
1154
|
* 过滤某一页数据
|
1119
1155
|
*/
|
@@ -1123,13 +1159,17 @@ r(U, "filterPage", (e, t, l) => {
|
|
1123
1159
|
}), /**
|
1124
1160
|
* 总页数
|
1125
1161
|
*/
|
1126
|
-
r(U, "pageCount", (e, t) => Math.ceil(e / t)),
|
1162
|
+
r(U, "pageCount", (e, t) => Math.ceil(e / t)), //#endregion
|
1163
|
+
//#region 求值
|
1164
|
+
/**
|
1127
1165
|
* 四舍五入
|
1128
1166
|
*/
|
1129
1167
|
r(U, "round", (e, t) => e.toFixed(t)), /**
|
1130
1168
|
* 天花板函数
|
1131
1169
|
*/
|
1132
|
-
r(U, "ceil", (e) => Math.ceil(e)),
|
1170
|
+
r(U, "ceil", (e) => Math.ceil(e)), //#endregion
|
1171
|
+
//#region 进度
|
1172
|
+
/**
|
1133
1173
|
* 获取百分比
|
1134
1174
|
*/
|
1135
1175
|
r(U, "getPercentage", (e, t) => {
|
@@ -1143,7 +1183,8 @@ r(U, "getPercentage", (e, t) => {
|
|
1143
1183
|
r(U, "getPercentageText", (e, t) => U.getPercentage(e, t).toFixed(2)), /**
|
1144
1184
|
* 获取进度文本
|
1145
1185
|
*/
|
1146
|
-
r(U, "getProgressText", (e, t) => `${e ?? "-"}/${t ?? "-"}`),
|
1186
|
+
r(U, "getProgressText", (e, t) => `${e ?? "-"}/${t ?? "-"}`), //#endregion
|
1187
|
+
/**
|
1147
1188
|
* 获取大小
|
1148
1189
|
*/
|
1149
1190
|
r(U, "size", (e) => {
|
@@ -1164,12 +1205,12 @@ r(U, "size", (e) => {
|
|
1164
1205
|
throw new Error("暂未支持比TB更大的大小");
|
1165
1206
|
});
|
1166
1207
|
let Se = U;
|
1167
|
-
class
|
1208
|
+
class Tt {
|
1168
1209
|
}
|
1169
1210
|
/**
|
1170
1211
|
* 加载乾坤子应用
|
1171
1212
|
*/
|
1172
|
-
r(
|
1213
|
+
r(Tt, "load", function(e, t, l, s) {
|
1173
1214
|
});
|
1174
1215
|
const Ee = class Ee {
|
1175
1216
|
};
|
@@ -1224,7 +1265,7 @@ r(Y, "loadPathAsync", async (e, t) => {
|
|
1224
1265
|
* 通过注入DOM标签异步加载脚本或样式表
|
1225
1266
|
*/
|
1226
1267
|
r(Y, "loadAsync", async (e) => {
|
1227
|
-
let t =
|
1268
|
+
let t = V.getArray(e), l = [];
|
1228
1269
|
for (let s = 0; s < t.length; s++) {
|
1229
1270
|
let n = new Promise((i, o) => {
|
1230
1271
|
let a = t[s], u = Y.getOuterTagByUrl(a);
|
@@ -1560,7 +1601,7 @@ r(G, "canStorage", (e) => {
|
|
1560
1601
|
let t = JSON.stringify(e).length / 1024;
|
1561
1602
|
return G.getLeftStorage() > t;
|
1562
1603
|
});
|
1563
|
-
let
|
1604
|
+
let W = G;
|
1564
1605
|
class Ge {
|
1565
1606
|
}
|
1566
1607
|
/**
|
@@ -1631,7 +1672,7 @@ class oe {
|
|
1631
1672
|
* 把json字符串合并到目标对象上
|
1632
1673
|
*/
|
1633
1674
|
static mergeTo(e, t) {
|
1634
|
-
if (
|
1675
|
+
if (V.isNullOrEmpty(t))
|
1635
1676
|
return;
|
1636
1677
|
let l = JSON.parse(t);
|
1637
1678
|
Object.keys(l).forEach((n) => {
|
@@ -1653,24 +1694,24 @@ function ze(c, e, t, l) {
|
|
1653
1694
|
`;
|
1654
1695
|
for (let n = 0; n < c.length; n++) {
|
1655
1696
|
let i = c[n], o = l(i);
|
1656
|
-
o.type == "array" ? (o.remark && (s +=
|
1657
|
-
`), s += Me(2 * t, o.key) + "[", s += ze(i[e], e, t + 1, l), s += "]", n != c.length - 1 && (s += ",")) : o.type == "object" ? (o.remark && (s +=
|
1697
|
+
o.type == "array" ? (o.remark && (s += Re(2 * t) + "//" + o.remark + `
|
1698
|
+
`), s += Me(2 * t, o.key) + "[", s += ze(i[e], e, t + 1, l), s += "]", n != c.length - 1 && (s += ",")) : o.type == "object" ? (o.remark && (s += Re(2 * t) + "//" + o.remark + `
|
1658
1699
|
`), s += Me(2 * t, o.key), s += ze(i[e], e, t + 1, l), n != c.length - 1 && (s += ",")) : (s += Me(2 * t, o.key), o.type == "string" ? s += '""' : o.type == "date" ? s += `"${te.getDateTimeString()}"` : o.type == "int" || o.type == "number" ? s += "0" : o.type == "boolean" ? s += "false" : s += null, n != c.length - 1 && (s += ","), o.remark && (s += " //" + o.remark)), s += `
|
1659
1700
|
`;
|
1660
1701
|
}
|
1661
|
-
return s +=
|
1702
|
+
return s += Re(2 * (t - 1)), s += "}", s;
|
1662
1703
|
}
|
1663
|
-
function
|
1704
|
+
function Re(c) {
|
1664
1705
|
let e = "";
|
1665
1706
|
for (let t = 0; t < c; t++)
|
1666
1707
|
e += " ";
|
1667
1708
|
return e;
|
1668
1709
|
}
|
1669
1710
|
function Me(c, e) {
|
1670
|
-
let t =
|
1711
|
+
let t = Re(c);
|
1671
1712
|
return t += '"' + e + '": ', t;
|
1672
1713
|
}
|
1673
|
-
class
|
1714
|
+
class It {
|
1674
1715
|
/**
|
1675
1716
|
* 获取浏览器默认语言
|
1676
1717
|
*/
|
@@ -1678,7 +1719,7 @@ class jt {
|
|
1678
1719
|
return navigator.language == "zh-CN" ? "zh-cn" : "en";
|
1679
1720
|
}
|
1680
1721
|
}
|
1681
|
-
class
|
1722
|
+
class Rt {
|
1682
1723
|
/**
|
1683
1724
|
* 清空对象中的空值
|
1684
1725
|
*/
|
@@ -1694,375 +1735,122 @@ class Bt {
|
|
1694
1735
|
return this.clean(e), $.serialize(e, t);
|
1695
1736
|
}
|
1696
1737
|
}
|
1697
|
-
class
|
1738
|
+
class st {
|
1698
1739
|
constructor() {
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1740
|
+
/**
|
1741
|
+
* 实体数据
|
1742
|
+
*/
|
1743
|
+
r(this, "data");
|
1744
|
+
/**
|
1745
|
+
* 数据体
|
1746
|
+
*/
|
1747
|
+
r(this, "body");
|
1748
|
+
/**
|
1749
|
+
* 请求头
|
1750
|
+
*/
|
1751
|
+
r(this, "headers", {});
|
1752
|
+
/**
|
1753
|
+
* 内容类型
|
1754
|
+
*/
|
1755
|
+
r(this, "contentType");
|
1706
1756
|
}
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1757
|
+
/**
|
1758
|
+
* 获取指定Key的值
|
1759
|
+
*/
|
1760
|
+
getHeader(e) {
|
1761
|
+
if (this.headers == null)
|
1762
|
+
return null;
|
1763
|
+
let t = ie.getKey(this.headers, e);
|
1764
|
+
return t ? this.headers[t] : null;
|
1710
1765
|
}
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1766
|
+
/**
|
1767
|
+
* 添加请求头
|
1768
|
+
*/
|
1769
|
+
addHeaders(e) {
|
1770
|
+
if (e != null)
|
1771
|
+
for (let t in e)
|
1772
|
+
this.headers[t] = e[t];
|
1718
1773
|
}
|
1719
1774
|
}
|
1720
|
-
class
|
1775
|
+
class nt extends st {
|
1721
1776
|
constructor() {
|
1722
1777
|
super(...arguments);
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1778
|
+
/**
|
1779
|
+
* 请求路径
|
1780
|
+
*/
|
1781
|
+
r(this, "path");
|
1782
|
+
/**
|
1783
|
+
* 请求方法
|
1784
|
+
*/
|
1785
|
+
r(this, "method");
|
1786
|
+
/**
|
1787
|
+
* 实际请求地址
|
1788
|
+
*/
|
1789
|
+
r(this, "url");
|
1730
1790
|
}
|
1731
1791
|
}
|
1732
|
-
class
|
1792
|
+
class Je {
|
1733
1793
|
constructor() {
|
1734
|
-
|
1735
|
-
r(this, "
|
1736
|
-
r(this, "
|
1737
|
-
//通过cdn引入样式文件,并且打包文件中不会包括样式文件
|
1738
|
-
"element-plus": "/element-plus/2.7.5/index.css",
|
1739
|
-
// 加载monaco cdn压缩资源包,可以大幅减少本地请求数量
|
1740
|
-
//首次加载4.11s
|
1741
|
-
//不能使用,偶发404:https://cdn.staticfile.net/monaco-editor/0.45.0/min/vs
|
1742
|
-
"monaco-editor": "https://cdn.jsdelivr.net/npm/monaco-editor@0.50.0/min/vs",
|
1743
|
-
quill: "/quill/2.0.2/quill.snow.min.css",
|
1744
|
-
"fort-awesome": "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"
|
1745
|
-
});
|
1794
|
+
r(this, "type");
|
1795
|
+
r(this, "onRequest");
|
1796
|
+
r(this, "onResponse");
|
1746
1797
|
}
|
1747
|
-
|
1748
|
-
|
1798
|
+
//#endregion
|
1799
|
+
async get(e, t) {
|
1800
|
+
return (await this.sendGet(e, t)).data;
|
1749
1801
|
}
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
super(...arguments);
|
1754
|
-
r(this, "type", "BootCdn");
|
1755
|
-
r(this, "mappings", {
|
1756
|
-
"element-plus": "/ajax/libs/element-plus/2.4.4/index.css",
|
1757
|
-
"monaco-editor": "/ajax/libs/monaco-editor/0.45.0/min/vs",
|
1758
|
-
quill: "/ajax/libs/quill/1.3.7/quill.snow.min.css"
|
1759
|
-
});
|
1802
|
+
async sendGet(e, t) {
|
1803
|
+
let l = $.getUrl(e, t), s = this.getRequest("GET", l);
|
1804
|
+
return await this.send(s);
|
1760
1805
|
}
|
1761
|
-
|
1762
|
-
this.
|
1806
|
+
async post(e, t) {
|
1807
|
+
return (await this.sendPost(e, t)).data;
|
1763
1808
|
}
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
super(...arguments);
|
1768
|
-
r(this, "type", "Local");
|
1769
|
-
r(this, "mappings", {
|
1770
|
-
//引入本地样式文件,会导致始终打包进打包文件
|
1771
|
-
//后续可以改进为:发包后,单独存放静态样式文件,框架加载时,自动通过异步方式加载样式文件
|
1772
|
-
//为了同时让下游同时支持CDN引入和本地引入样式表文件,所以需要把element-plus的样式文件,独立打包到一个文件中,让下游:
|
1773
|
-
//1. 启用CDN时,能够使用CDN加载,而不加载本地element-plus的样式文件
|
1774
|
-
//2. 不启用CDN时,采用本地打包方式,支持载入本地element-plus样式表文件
|
1775
|
-
//所以,上游包,必须同时包含独立的element-plus样式表文件
|
1776
|
-
//复制包内的样式表文件,方便cdn方式不加载样式表 和 未启用cdn方式加载 样式表
|
1777
|
-
"element-plus": "element-plus/dist/index.css",
|
1778
|
-
quill: "quill/dist/quill.snow.css",
|
1779
|
-
"fort-awesome": "@fortawesome/fontawesome-free/css/all.min.css"
|
1780
|
-
});
|
1809
|
+
async sendPost(e, t) {
|
1810
|
+
let l = this.getRequest("POST", e, t);
|
1811
|
+
return await this.send(l);
|
1781
1812
|
}
|
1782
|
-
|
1783
|
-
this.
|
1813
|
+
async patch(e) {
|
1814
|
+
return (await this.sendPatch(e)).data;
|
1784
1815
|
}
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
|
-
super(...arguments);
|
1789
|
-
r(this, "type", "Unpkg");
|
1790
|
-
r(this, "mappings", {
|
1791
|
-
//首次加载很不稳定: 30s+, 稳定后: 首次加载2.5s(使用https加载,可以防止本地http访问外部http资源时的请求警告)
|
1792
|
-
"monaco-editor": ["/monaco-editor@0.49.0/min/vs"]
|
1793
|
-
});
|
1816
|
+
async sendPatch(e, t) {
|
1817
|
+
let l = this.getRequest("PATCH", e);
|
1818
|
+
return await this.send(l);
|
1794
1819
|
}
|
1795
|
-
|
1796
|
-
|
1820
|
+
/**
|
1821
|
+
* 获取请求消息
|
1822
|
+
*/
|
1823
|
+
getRequest(e, t, l = null) {
|
1824
|
+
let s = new nt();
|
1825
|
+
return s.path = t, s.method = e, s.body = oe.stringifyWithString(l), s;
|
1797
1826
|
}
|
1798
1827
|
}
|
1799
|
-
class
|
1828
|
+
class Ze extends st {
|
1800
1829
|
constructor() {
|
1830
|
+
super(...arguments);
|
1801
1831
|
/**
|
1802
|
-
*
|
1803
|
-
* 或者使用:Record<string, string>
|
1832
|
+
* 是否成功
|
1804
1833
|
*/
|
1805
|
-
r(this, "
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
t == null && (t = e);
|
1823
|
-
let s = this.instances[e];
|
1824
|
-
return s != null || (s = await this.create(t), l != null && l(s), this.instances[e] = s), Promise.resolve(s);
|
1825
|
-
}
|
1826
|
-
}
|
1827
|
-
class Mt extends H {
|
1828
|
-
getInstances() {
|
1829
|
-
return [new $t(), new Nt(), new Pt(), new Ft(), new qt()];
|
1830
|
-
}
|
1831
|
-
/**
|
1832
|
-
* 获取指定CDN实例
|
1833
|
-
*/
|
1834
|
-
async create(e, t) {
|
1835
|
-
let l = await super.create(e);
|
1836
|
-
return l.open(t), l;
|
1837
|
-
}
|
1838
|
-
}
|
1839
|
-
class Vt {
|
1840
|
-
constructor() {
|
1841
|
-
r(this, "type");
|
1842
|
-
}
|
1843
|
-
encode(e) {
|
1844
|
-
let t;
|
1845
|
-
return typeof e == "object" ? t = JSON.stringify(e) : t = e, this.encodeString(t);
|
1846
|
-
}
|
1847
|
-
decodeObj(e) {
|
1848
|
-
let t = this.decode(e);
|
1849
|
-
return JSON.parse(t);
|
1850
|
-
}
|
1851
|
-
}
|
1852
|
-
class zt extends Vt {
|
1853
|
-
constructor() {
|
1854
|
-
super(...arguments);
|
1855
|
-
r(this, "type", "Base64");
|
1856
|
-
}
|
1857
|
-
open(t) {
|
1858
|
-
}
|
1859
|
-
encodeString(t) {
|
1860
|
-
let l = be.enc.Utf8.parse(t);
|
1861
|
-
return be.enc.Base64.stringify(l);
|
1862
|
-
}
|
1863
|
-
decode(t) {
|
1864
|
-
let l = be.enc.Base64.parse(t);
|
1865
|
-
return be.enc.Utf8.stringify(l);
|
1866
|
-
}
|
1867
|
-
}
|
1868
|
-
class Kt extends H {
|
1869
|
-
getInstances() {
|
1870
|
-
return [new zt()];
|
1871
|
-
}
|
1872
|
-
/**
|
1873
|
-
* 创建执行类型的Hash实例
|
1874
|
-
*/
|
1875
|
-
async create(e, t) {
|
1876
|
-
let l = await super.create(e);
|
1877
|
-
return l.open(null), l;
|
1878
|
-
}
|
1879
|
-
/**
|
1880
|
-
* 获取Base64 编码器对象
|
1881
|
-
*/
|
1882
|
-
async getBase64() {
|
1883
|
-
return await this.createIfAbsent("Base64");
|
1884
|
-
}
|
1885
|
-
}
|
1886
|
-
class Wt {
|
1887
|
-
constructor() {
|
1888
|
-
r(this, "type", "xlsx");
|
1889
|
-
}
|
1890
|
-
open(e) {
|
1891
|
-
}
|
1892
|
-
export(e, t) {
|
1893
|
-
if (!t)
|
1894
|
-
throw new Error("Excel名称不能为空");
|
1895
|
-
e || (e = []);
|
1896
|
-
let l;
|
1897
|
-
e.length > 0 ? l = Object.keys(e[0]) : l = [];
|
1898
|
-
let s = [], n = [];
|
1899
|
-
if (l.forEach((d) => {
|
1900
|
-
n.push(d);
|
1901
|
-
}), s.push(n), e.length > 0)
|
1902
|
-
for (let d = 0; d < e.length; d++) {
|
1903
|
-
let h = e[d], g = [];
|
1904
|
-
Object.keys(h).forEach((m) => {
|
1905
|
-
g.push(h[m]);
|
1906
|
-
}), s.push(g);
|
1907
|
-
}
|
1908
|
-
let i = Ie.utils.book_new(), o = Ie.utils.json_to_sheet(s, { skipHeader: !0 });
|
1909
|
-
Ie.utils.book_append_sheet(i, o, "abc");
|
1910
|
-
let a = 65;
|
1911
|
-
for (let d = 0; d < l.length; d++) {
|
1912
|
-
let g = `${String.fromCharCode(a + d)}1`;
|
1913
|
-
o[g].s = {
|
1914
|
-
alignment: { horizontal: "center" },
|
1915
|
-
font: { bold: !0, color: { rgb: "000000" } },
|
1916
|
-
fill: { fgColor: { rgb: "409eff" } }
|
1917
|
-
};
|
1918
|
-
}
|
1919
|
-
let u = [];
|
1920
|
-
l.forEach((d) => {
|
1921
|
-
let h = e[0][d], g = { wpx: 50 };
|
1922
|
-
typeof h == "string" && (g.wpx = 100), u.push(g);
|
1923
|
-
}), o["!cols"] = u, Ie.writeFile(i, t);
|
1924
|
-
}
|
1925
|
-
}
|
1926
|
-
class Jt extends H {
|
1927
|
-
getInstances() {
|
1928
|
-
return [new Wt()];
|
1929
|
-
}
|
1930
|
-
/**
|
1931
|
-
* 获取Excel实例
|
1932
|
-
*/
|
1933
|
-
async create(e, t) {
|
1934
|
-
let l = await super.create(e);
|
1935
|
-
return l.open(t), l;
|
1936
|
-
}
|
1937
|
-
}
|
1938
|
-
class Yt {
|
1939
|
-
constructor() {
|
1940
|
-
r(this, "type", "Json");
|
1941
|
-
}
|
1942
|
-
}
|
1943
|
-
class Qt extends Yt {
|
1944
|
-
}
|
1945
|
-
class Xt extends H {
|
1946
|
-
getInstances() {
|
1947
|
-
return [new Qt()];
|
1948
|
-
}
|
1949
|
-
}
|
1950
|
-
class st {
|
1951
|
-
constructor() {
|
1952
|
-
/**
|
1953
|
-
* 实体数据
|
1954
|
-
*/
|
1955
|
-
r(this, "data");
|
1956
|
-
/**
|
1957
|
-
* 数据体
|
1958
|
-
*/
|
1959
|
-
r(this, "body");
|
1960
|
-
/**
|
1961
|
-
* 请求头
|
1962
|
-
*/
|
1963
|
-
r(this, "headers", {});
|
1964
|
-
/**
|
1965
|
-
* 内容类型
|
1966
|
-
*/
|
1967
|
-
r(this, "contentType");
|
1968
|
-
}
|
1969
|
-
/**
|
1970
|
-
* 获取指定Key的值
|
1971
|
-
*/
|
1972
|
-
getHeader(e) {
|
1973
|
-
if (this.headers == null)
|
1974
|
-
return null;
|
1975
|
-
let t = ie.getKey(this.headers, e);
|
1976
|
-
return t ? this.headers[t] : null;
|
1977
|
-
}
|
1978
|
-
/**
|
1979
|
-
* 添加请求头
|
1980
|
-
*/
|
1981
|
-
addHeaders(e) {
|
1982
|
-
if (e != null)
|
1983
|
-
for (let t in e)
|
1984
|
-
this.headers[t] = e[t];
|
1985
|
-
}
|
1986
|
-
}
|
1987
|
-
class nt extends st {
|
1988
|
-
constructor() {
|
1989
|
-
super(...arguments);
|
1990
|
-
/**
|
1991
|
-
* 请求路径
|
1992
|
-
*/
|
1993
|
-
r(this, "path");
|
1994
|
-
/**
|
1995
|
-
* 请求方法
|
1996
|
-
*/
|
1997
|
-
r(this, "method");
|
1998
|
-
/**
|
1999
|
-
* 实际请求地址
|
2000
|
-
*/
|
2001
|
-
r(this, "url");
|
2002
|
-
}
|
2003
|
-
}
|
2004
|
-
class Ye {
|
2005
|
-
constructor() {
|
2006
|
-
r(this, "type");
|
2007
|
-
r(this, "onRequest");
|
2008
|
-
r(this, "onResponse");
|
2009
|
-
}
|
2010
|
-
//#endregion
|
2011
|
-
async get(e, t) {
|
2012
|
-
return (await this.sendGet(e, t)).data;
|
2013
|
-
}
|
2014
|
-
async sendGet(e, t) {
|
2015
|
-
let l = $.getUrl(e, t), s = this.getRequest("GET", l);
|
2016
|
-
return await this.send(s);
|
2017
|
-
}
|
2018
|
-
async post(e, t) {
|
2019
|
-
return (await this.sendPost(e, t)).data;
|
2020
|
-
}
|
2021
|
-
async sendPost(e, t) {
|
2022
|
-
let l = this.getRequest("POST", e, t);
|
2023
|
-
return await this.send(l);
|
2024
|
-
}
|
2025
|
-
async patch(e) {
|
2026
|
-
return (await this.sendPatch(e)).data;
|
2027
|
-
}
|
2028
|
-
async sendPatch(e, t) {
|
2029
|
-
let l = this.getRequest("PATCH", e);
|
2030
|
-
return await this.send(l);
|
2031
|
-
}
|
2032
|
-
/**
|
2033
|
-
* 获取请求消息
|
2034
|
-
*/
|
2035
|
-
getRequest(e, t, l = null) {
|
2036
|
-
let s = new nt();
|
2037
|
-
return s.path = t, s.method = e, s.body = oe.stringifyWithString(l), s;
|
2038
|
-
}
|
2039
|
-
}
|
2040
|
-
class Ze extends st {
|
2041
|
-
constructor() {
|
2042
|
-
super(...arguments);
|
2043
|
-
/**
|
2044
|
-
* 是否成功
|
2045
|
-
*/
|
2046
|
-
r(this, "success");
|
2047
|
-
/**
|
2048
|
-
* 错误消息
|
2049
|
-
*/
|
2050
|
-
r(this, "message");
|
2051
|
-
/**
|
2052
|
-
* 请求耗时(ms)
|
2053
|
-
*/
|
2054
|
-
r(this, "elapsed");
|
2055
|
-
/**
|
2056
|
-
* 响应状态码
|
2057
|
-
*/
|
2058
|
-
r(this, "status");
|
2059
|
-
/**
|
2060
|
-
* 对应的请求信息
|
2061
|
-
*/
|
2062
|
-
r(this, "request");
|
1834
|
+
r(this, "success");
|
1835
|
+
/**
|
1836
|
+
* 错误消息
|
1837
|
+
*/
|
1838
|
+
r(this, "message");
|
1839
|
+
/**
|
1840
|
+
* 请求耗时(ms)
|
1841
|
+
*/
|
1842
|
+
r(this, "elapsed");
|
1843
|
+
/**
|
1844
|
+
* 响应状态码
|
1845
|
+
*/
|
1846
|
+
r(this, "status");
|
1847
|
+
/**
|
1848
|
+
* 对应的请求信息
|
1849
|
+
*/
|
1850
|
+
r(this, "request");
|
2063
1851
|
}
|
2064
1852
|
}
|
2065
|
-
class
|
1853
|
+
class Lt extends Je {
|
2066
1854
|
constructor() {
|
2067
1855
|
super(...arguments);
|
2068
1856
|
r(this, "type", "Default");
|
@@ -2072,7 +1860,7 @@ class Gt extends Ye {
|
|
2072
1860
|
oe.mergeTo(this, t);
|
2073
1861
|
}
|
2074
1862
|
send(t) {
|
2075
|
-
return
|
1863
|
+
return V.isNullOrEmpty(t.url) && (t.url = this.baseUrl + t.path), new Promise(async (l, s) => {
|
2076
1864
|
var o;
|
2077
1865
|
await ((o = this.onRequest) == null ? void 0 : o.call(this, t));
|
2078
1866
|
let n = (/* @__PURE__ */ new Date()).getTime(), i = new XMLHttpRequest();
|
@@ -2104,7 +1892,7 @@ class Gt extends Ye {
|
|
2104
1892
|
});
|
2105
1893
|
}
|
2106
1894
|
}
|
2107
|
-
class
|
1895
|
+
class At extends Je {
|
2108
1896
|
constructor() {
|
2109
1897
|
super(...arguments);
|
2110
1898
|
//#region 属性
|
@@ -2134,7 +1922,7 @@ class Zt extends Ye {
|
|
2134
1922
|
* 危险操作,会暴露敏感信息
|
2135
1923
|
*/
|
2136
1924
|
async open(t) {
|
2137
|
-
oe.mergeTo(this, t), this.requester = await
|
1925
|
+
oe.mergeTo(this, t), this.requester = await P.http.getDefault(), this.hasher = await P.hasher.create("Sha256");
|
2138
1926
|
}
|
2139
1927
|
//#endregion
|
2140
1928
|
/**
|
@@ -2146,37 +1934,65 @@ class Zt extends Ye {
|
|
2146
1934
|
hash_type: "sha256",
|
2147
1935
|
timestamp: parseInt((l / 1e3).toString())
|
2148
1936
|
};
|
2149
|
-
|
1937
|
+
V.isNullOrEmpty(t.body) || (s.jsonBody = t.body);
|
2150
1938
|
let n = $.deserialize(t.path);
|
2151
1939
|
for (let g in n)
|
2152
1940
|
s[g] = n[g];
|
2153
1941
|
let i = $.getPath(t.path);
|
2154
|
-
s =
|
2155
|
-
let o =
|
2156
|
-
s.sign = u.toLowerCase(), delete s.jsonBody, s =
|
1942
|
+
s = Ae.sort(s);
|
1943
|
+
let o = Rt.signDictionary(s, !1), a = `POST${i}?${o}${this.appSecret}`, u = await this.hasher.compute(a);
|
1944
|
+
s.sign = u.toLowerCase(), delete s.jsonBody, s = Ae.sort(s);
|
2157
1945
|
let d = $.serialize(s);
|
2158
1946
|
return t.url = $.concatUrl(this.baseUrl, i + "?" + d), await this.requester.send(t);
|
2159
1947
|
}
|
2160
1948
|
}
|
2161
|
-
class
|
1949
|
+
class H {
|
2162
1950
|
constructor() {
|
2163
|
-
super(...arguments);
|
2164
|
-
//#region 属性
|
2165
|
-
r(this, "type", "Halo");
|
2166
|
-
/**
|
2167
|
-
* 基准地址
|
2168
|
-
*/
|
2169
|
-
r(this, "baseUrl", null);
|
2170
|
-
/**
|
2171
|
-
* 当前用户信息
|
2172
|
-
*/
|
2173
|
-
r(this, "user");
|
2174
|
-
/**
|
2175
|
-
* 请求语言
|
2176
|
-
*/
|
2177
|
-
r(this, "language");
|
2178
1951
|
/**
|
2179
|
-
*
|
1952
|
+
* 实例集合
|
1953
|
+
* 或者使用:Record<string, string>
|
1954
|
+
*/
|
1955
|
+
r(this, "instances", {});
|
1956
|
+
}
|
1957
|
+
/**
|
1958
|
+
* 创建指定类型驱动
|
1959
|
+
*/
|
1960
|
+
async create(e, t) {
|
1961
|
+
if (!e)
|
1962
|
+
throw new Error("驱动类型不能为空");
|
1963
|
+
let s = this.getInstances().find((n) => n.type.toLowerCase() == e.toLowerCase());
|
1964
|
+
if (s == null)
|
1965
|
+
throw new Error(`未实现的驱动类型:${e}`);
|
1966
|
+
return s;
|
1967
|
+
}
|
1968
|
+
/**
|
1969
|
+
* 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
|
1970
|
+
*/
|
1971
|
+
async createIfAbsent(e, t = null, l = null) {
|
1972
|
+
t == null && (t = e);
|
1973
|
+
let s = this.instances[e];
|
1974
|
+
return s != null || (s = await this.create(t), l != null && l(s), this.instances[e] = s), Promise.resolve(s);
|
1975
|
+
}
|
1976
|
+
}
|
1977
|
+
class Ut extends Je {
|
1978
|
+
constructor() {
|
1979
|
+
super(...arguments);
|
1980
|
+
//#region 属性
|
1981
|
+
r(this, "type", "Halo");
|
1982
|
+
/**
|
1983
|
+
* 基准地址
|
1984
|
+
*/
|
1985
|
+
r(this, "baseUrl", null);
|
1986
|
+
/**
|
1987
|
+
* 当前用户信息
|
1988
|
+
*/
|
1989
|
+
r(this, "user");
|
1990
|
+
/**
|
1991
|
+
* 请求语言
|
1992
|
+
*/
|
1993
|
+
r(this, "language");
|
1994
|
+
/**
|
1995
|
+
* 当前环境
|
2180
1996
|
*/
|
2181
1997
|
r(this, "env");
|
2182
1998
|
/**
|
@@ -2202,7 +2018,7 @@ class Ht extends Ye {
|
|
2202
2018
|
* 开启
|
2203
2019
|
*/
|
2204
2020
|
async open(t) {
|
2205
|
-
oe.mergeTo(this, t), this.http = await
|
2021
|
+
oe.mergeTo(this, t), this.http = await P.http.getDefault(), this.user != null && (this.sso = await P.sso.create(this.user.type)), this.signer = await P.signer.createIfAbsent("default"), this.onRequest == null && (this.onRequest = this.beforeRequest);
|
2206
2022
|
}
|
2207
2023
|
//#endregion
|
2208
2024
|
/**
|
@@ -2246,9 +2062,9 @@ class Ht extends Ye {
|
|
2246
2062
|
return Promise.reject(t);
|
2247
2063
|
}
|
2248
2064
|
}
|
2249
|
-
class
|
2065
|
+
class jt extends H {
|
2250
2066
|
getInstances() {
|
2251
|
-
return [new
|
2067
|
+
return [new Lt(), new At(), new Ut()];
|
2252
2068
|
}
|
2253
2069
|
/**
|
2254
2070
|
* 获取默认请求器
|
@@ -2264,923 +2080,1159 @@ class _t extends H {
|
|
2264
2080
|
return await this.createIfAbsent("Halo");
|
2265
2081
|
}
|
2266
2082
|
}
|
2267
|
-
class
|
2083
|
+
class Bt {
|
2268
2084
|
constructor() {
|
2269
2085
|
r(this, "type");
|
2270
2086
|
}
|
2087
|
+
encode(e) {
|
2088
|
+
let t;
|
2089
|
+
return typeof e == "object" ? t = JSON.stringify(e) : t = e, this.encodeString(t);
|
2090
|
+
}
|
2091
|
+
decodeObj(e) {
|
2092
|
+
let t = this.decode(e);
|
2093
|
+
return JSON.parse(t);
|
2094
|
+
}
|
2271
2095
|
}
|
2272
|
-
class
|
2096
|
+
class $t extends Bt {
|
2273
2097
|
constructor() {
|
2274
2098
|
super(...arguments);
|
2275
|
-
r(this, "type", "
|
2276
|
-
}
|
2277
|
-
async open(t) {
|
2278
|
-
}
|
2279
|
-
callback(t) {
|
2099
|
+
r(this, "type", "Base64");
|
2280
2100
|
}
|
2281
|
-
|
2282
|
-
let a = `${t}.${l}.${s ?? ""}.${n}.${i}`;
|
2283
|
-
return (await ct.compute(a)).toUpperCase();
|
2101
|
+
open(t) {
|
2284
2102
|
}
|
2285
|
-
|
2286
|
-
|
2103
|
+
encodeString(t) {
|
2104
|
+
let l = be.enc.Utf8.parse(t);
|
2105
|
+
return be.enc.Base64.stringify(l);
|
2287
2106
|
}
|
2288
|
-
|
2107
|
+
decode(t) {
|
2108
|
+
let l = be.enc.Base64.parse(t);
|
2109
|
+
return be.enc.Utf8.stringify(l);
|
2289
2110
|
}
|
2290
2111
|
}
|
2291
|
-
class
|
2112
|
+
class Nt extends H {
|
2292
2113
|
getInstances() {
|
2293
|
-
return [new
|
2114
|
+
return [new $t()];
|
2294
2115
|
}
|
2295
2116
|
/**
|
2296
|
-
*
|
2117
|
+
* 创建执行类型的Hash实例
|
2297
2118
|
*/
|
2298
2119
|
async create(e, t) {
|
2299
2120
|
let l = await super.create(e);
|
2300
|
-
return
|
2121
|
+
return l.open(null), l;
|
2122
|
+
}
|
2123
|
+
/**
|
2124
|
+
* 获取Base64 编码器对象
|
2125
|
+
*/
|
2126
|
+
async getBase64() {
|
2127
|
+
return await this.createIfAbsent("Base64");
|
2301
2128
|
}
|
2302
2129
|
}
|
2303
|
-
|
2130
|
+
class Te {
|
2304
2131
|
constructor() {
|
2305
|
-
|
2306
|
-
r(this, "
|
2307
|
-
|
2308
|
-
open(e) {
|
2309
|
-
}
|
2310
|
-
//#endregion
|
2311
|
-
async login(e) {
|
2312
|
-
return N.post(`/user/login?type=${this.type}`, e).then(async (t) => (await (await W.getProvider().getDefault("user")).saveAsync("sso", t.data), Promise.resolve(t)));
|
2313
|
-
}
|
2314
|
-
loginUrl(e) {
|
2315
|
-
return "";
|
2132
|
+
r(this, "type");
|
2133
|
+
r(this, "baseUrl");
|
2134
|
+
r(this, "mappings");
|
2316
2135
|
}
|
2317
|
-
|
2318
|
-
let
|
2319
|
-
return
|
2136
|
+
getPath(e) {
|
2137
|
+
let t = Ae.getValueIgnoreCase(e, this.mappings);
|
2138
|
+
return $.httpOrHttps(t) ? t : this.baseUrl + t;
|
2320
2139
|
}
|
2321
|
-
|
2322
|
-
let
|
2323
|
-
|
2140
|
+
async loadPathAsync(e, t) {
|
2141
|
+
let l = this.baseUrl + e;
|
2142
|
+
await Be.loadPathAsync(l, t);
|
2324
2143
|
}
|
2325
|
-
|
2326
|
-
|
2144
|
+
async loadAsync(e) {
|
2145
|
+
let t = V.getArray(e), l = [];
|
2146
|
+
for (let s = 0; s < t.length; s++) {
|
2147
|
+
let n = this.getPath(t[s]);
|
2148
|
+
l.push(n);
|
2149
|
+
}
|
2150
|
+
await Be.loadAsync(l);
|
2327
2151
|
}
|
2328
|
-
}
|
2329
|
-
|
2330
|
-
let De = Ne;
|
2331
|
-
class sl {
|
2152
|
+
}
|
2153
|
+
class Pt extends Te {
|
2332
2154
|
constructor() {
|
2333
|
-
|
2334
|
-
r(this, "
|
2335
|
-
r(this, "
|
2336
|
-
|
2337
|
-
|
2338
|
-
this.url = e.url, this.app_id = e.app_id;
|
2339
|
-
}
|
2340
|
-
async login(e) {
|
2341
|
-
K.setObject("sso", e);
|
2342
|
-
}
|
2343
|
-
loginUrl(e) {
|
2344
|
-
let t = encodeURIComponent(e);
|
2345
|
-
return `${this.url}/oauth2/authorize?client_id=${this.app_id}&redirect_uri=${t}&response_type=code`;
|
2346
|
-
}
|
2347
|
-
getUser() {
|
2348
|
-
return K.getObject(De.loginKey);
|
2349
|
-
}
|
2350
|
-
getAuth(e, t, l, s) {
|
2351
|
-
return `${this.type} ${e} ${t} ${l} pc`;
|
2155
|
+
super(...arguments);
|
2156
|
+
r(this, "type", "Jsdelivr");
|
2157
|
+
r(this, "mappings", {
|
2158
|
+
"monaco-editor": "/npm/monaco-editor@0.49.0/min/vs"
|
2159
|
+
});
|
2352
2160
|
}
|
2353
|
-
|
2354
|
-
|
2161
|
+
open(t) {
|
2162
|
+
this.baseUrl = "https://cdn.jsdelivr.net";
|
2355
2163
|
}
|
2356
2164
|
}
|
2357
|
-
class
|
2165
|
+
class qt extends Te {
|
2358
2166
|
constructor() {
|
2359
|
-
|
2360
|
-
|
2361
|
-
|
2167
|
+
super(...arguments);
|
2168
|
+
r(this, "type", "StaticFile");
|
2169
|
+
r(this, "mappings", {
|
2170
|
+
//通过cdn引入样式文件,并且打包文件中不会包括样式文件
|
2171
|
+
"element-plus": "/element-plus/2.7.5/index.css",
|
2172
|
+
// 加载monaco cdn压缩资源包,可以大幅减少本地请求数量
|
2173
|
+
//首次加载4.11s
|
2174
|
+
//不能使用,偶发404:https://cdn.staticfile.net/monaco-editor/0.45.0/min/vs
|
2175
|
+
"monaco-editor": "https://cdn.jsdelivr.net/npm/monaco-editor@0.50.0/min/vs",
|
2176
|
+
quill: "/quill/2.0.2/quill.snow.min.css",
|
2177
|
+
"fort-awesome": "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"
|
2178
|
+
});
|
2362
2179
|
}
|
2363
|
-
|
2180
|
+
open(t) {
|
2181
|
+
this.baseUrl = "https://cdn.staticfile.net";
|
2364
2182
|
}
|
2365
|
-
|
2366
|
-
|
2183
|
+
}
|
2184
|
+
class Ft extends Te {
|
2185
|
+
constructor() {
|
2186
|
+
super(...arguments);
|
2187
|
+
r(this, "type", "BootCdn");
|
2188
|
+
r(this, "mappings", {
|
2189
|
+
"element-plus": "/ajax/libs/element-plus/2.4.4/index.css",
|
2190
|
+
"monaco-editor": "/ajax/libs/monaco-editor/0.45.0/min/vs",
|
2191
|
+
quill: "/ajax/libs/quill/1.3.7/quill.snow.min.css"
|
2192
|
+
});
|
2367
2193
|
}
|
2368
|
-
|
2369
|
-
|
2194
|
+
open(t) {
|
2195
|
+
this.baseUrl = "https://cdn.bootcdn.net";
|
2370
2196
|
}
|
2371
|
-
|
2372
|
-
|
2197
|
+
}
|
2198
|
+
class Mt extends Te {
|
2199
|
+
constructor() {
|
2200
|
+
super(...arguments);
|
2201
|
+
r(this, "type", "Local");
|
2202
|
+
r(this, "mappings", {
|
2203
|
+
//引入本地样式文件,会导致始终打包进打包文件
|
2204
|
+
//后续可以改进为:发包后,单独存放静态样式文件,框架加载时,自动通过异步方式加载样式文件
|
2205
|
+
//为了同时让下游同时支持CDN引入和本地引入样式表文件,所以需要把element-plus的样式文件,独立打包到一个文件中,让下游:
|
2206
|
+
//1. 启用CDN时,能够使用CDN加载,而不加载本地element-plus的样式文件
|
2207
|
+
//2. 不启用CDN时,采用本地打包方式,支持载入本地element-plus样式表文件
|
2208
|
+
//所以,上游包,必须同时包含独立的element-plus样式表文件
|
2209
|
+
//复制包内的样式表文件,方便cdn方式不加载样式表 和 未启用cdn方式加载 样式表
|
2210
|
+
"element-plus": "element-plus/dist/index.css",
|
2211
|
+
quill: "quill/dist/quill.snow.css",
|
2212
|
+
"fort-awesome": "@fortawesome/fontawesome-free/css/all.min.css"
|
2213
|
+
});
|
2373
2214
|
}
|
2374
|
-
|
2215
|
+
open(t) {
|
2216
|
+
this.baseUrl = t;
|
2375
2217
|
}
|
2376
2218
|
}
|
2377
|
-
class
|
2219
|
+
class Vt extends Te {
|
2378
2220
|
constructor() {
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2221
|
+
super(...arguments);
|
2222
|
+
r(this, "type", "Unpkg");
|
2223
|
+
r(this, "mappings", {
|
2224
|
+
//首次加载很不稳定: 30s+, 稳定后: 首次加载2.5s(使用https加载,可以防止本地http访问外部http资源时的请求警告)
|
2225
|
+
"monaco-editor": ["/monaco-editor@0.49.0/min/vs"]
|
2226
|
+
});
|
2382
2227
|
}
|
2383
|
-
|
2228
|
+
open(t) {
|
2229
|
+
this.baseUrl = "https://unpkg.com";
|
2384
2230
|
}
|
2385
|
-
|
2386
|
-
|
2231
|
+
}
|
2232
|
+
class zt extends H {
|
2233
|
+
getInstances() {
|
2234
|
+
return [new Pt(), new qt(), new Ft(), new Mt(), new Vt()];
|
2387
2235
|
}
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
return { userId: "", token: e, secret: "" };
|
2236
|
+
/**
|
2237
|
+
* 获取指定CDN实例
|
2238
|
+
*/
|
2239
|
+
async create(e, t) {
|
2240
|
+
let l = await super.create(e);
|
2241
|
+
return l.open(t), l;
|
2395
2242
|
}
|
2396
|
-
|
2397
|
-
|
2243
|
+
}
|
2244
|
+
class Kt {
|
2245
|
+
constructor() {
|
2246
|
+
r(this, "type", "Json");
|
2398
2247
|
}
|
2399
|
-
|
2248
|
+
}
|
2249
|
+
class Wt extends Kt {
|
2250
|
+
}
|
2251
|
+
class Jt extends H {
|
2252
|
+
getInstances() {
|
2253
|
+
return [new Wt()];
|
2400
2254
|
}
|
2401
2255
|
}
|
2402
|
-
class
|
2256
|
+
class Yt {
|
2403
2257
|
constructor() {
|
2404
|
-
r(this, "type", "
|
2405
|
-
r(this, "http");
|
2258
|
+
r(this, "type", "xlsx");
|
2406
2259
|
}
|
2407
2260
|
open(e) {
|
2408
2261
|
}
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
2412
|
-
|
2413
|
-
|
2414
|
-
|
2415
|
-
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
|
-
|
2420
|
-
|
2421
|
-
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
|
2430
|
-
|
2431
|
-
|
2432
|
-
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2465
|
-
|
2466
|
-
|
2262
|
+
export(e, t) {
|
2263
|
+
if (!t)
|
2264
|
+
throw new Error("Excel名称不能为空");
|
2265
|
+
e || (e = []);
|
2266
|
+
let l;
|
2267
|
+
e.length > 0 ? l = Object.keys(e[0]) : l = [];
|
2268
|
+
let s = [], n = [];
|
2269
|
+
if (l.forEach((d) => {
|
2270
|
+
n.push(d);
|
2271
|
+
}), s.push(n), e.length > 0)
|
2272
|
+
for (let d = 0; d < e.length; d++) {
|
2273
|
+
let h = e[d], g = [];
|
2274
|
+
Object.keys(h).forEach((m) => {
|
2275
|
+
g.push(h[m]);
|
2276
|
+
}), s.push(g);
|
2277
|
+
}
|
2278
|
+
let i = Ie.utils.book_new(), o = Ie.utils.json_to_sheet(s, { skipHeader: !0 });
|
2279
|
+
Ie.utils.book_append_sheet(i, o, "abc");
|
2280
|
+
let a = 65;
|
2281
|
+
for (let d = 0; d < l.length; d++) {
|
2282
|
+
let g = `${String.fromCharCode(a + d)}1`;
|
2283
|
+
o[g].s = {
|
2284
|
+
alignment: { horizontal: "center" },
|
2285
|
+
font: { bold: !0, color: { rgb: "000000" } },
|
2286
|
+
fill: { fgColor: { rgb: "409eff" } }
|
2287
|
+
};
|
2288
|
+
}
|
2289
|
+
let u = [];
|
2290
|
+
l.forEach((d) => {
|
2291
|
+
let h = e[0][d], g = { wpx: 50 };
|
2292
|
+
typeof h == "string" && (g.wpx = 100), u.push(g);
|
2293
|
+
}), o["!cols"] = u, Ie.writeFile(i, t);
|
2294
|
+
}
|
2295
|
+
}
|
2296
|
+
class Qt extends H {
|
2297
|
+
getInstances() {
|
2298
|
+
return [new Yt()];
|
2299
|
+
}
|
2300
|
+
/**
|
2301
|
+
* 获取Excel实例
|
2302
|
+
*/
|
2303
|
+
async create(e, t) {
|
2304
|
+
let l = await super.create(e);
|
2305
|
+
return l.open(t), l;
|
2306
|
+
}
|
2307
|
+
}
|
2308
|
+
class Xt {
|
2309
|
+
constructor() {
|
2310
|
+
r(this, "type", "Sort");
|
2311
|
+
}
|
2312
|
+
open(e) {
|
2313
|
+
}
|
2314
|
+
add(e, t, l, s) {
|
2315
|
+
this.resort(e, t, l);
|
2316
|
+
}
|
2317
|
+
insert(e, t, l, s, n) {
|
2318
|
+
this.resort(e, t, l);
|
2319
|
+
}
|
2320
|
+
//复制时,自动往后排序
|
2321
|
+
copy(e, t, l) {
|
2322
|
+
this.resort(e, t, l);
|
2323
|
+
}
|
2324
|
+
//重新排序
|
2325
|
+
resort(e, t, l) {
|
2326
|
+
let s = l[e.name];
|
2327
|
+
for (let n = 0; n < s.length; n++) {
|
2328
|
+
let i = s[n];
|
2329
|
+
i[t.name] = (n + 1) * 10;
|
2330
|
+
}
|
2331
|
+
}
|
2332
|
+
}
|
2333
|
+
class Gt {
|
2334
|
+
constructor() {
|
2335
|
+
r(this, "type", "I18N");
|
2336
|
+
}
|
2337
|
+
open(e) {
|
2338
|
+
}
|
2339
|
+
add(e, t, l, s) {
|
2340
|
+
}
|
2341
|
+
insert(e, t, l, s, n) {
|
2342
|
+
}
|
2343
|
+
copy(e, t, l) {
|
2344
|
+
}
|
2345
|
+
}
|
2346
|
+
class Zt {
|
2347
|
+
constructor() {
|
2348
|
+
r(this, "type", "Expression");
|
2349
|
+
}
|
2350
|
+
open(e) {
|
2351
|
+
}
|
2352
|
+
add(e, t, l, s) {
|
2353
|
+
}
|
2354
|
+
insert(e, t, l, s, n) {
|
2355
|
+
}
|
2356
|
+
copy(e, t, l) {
|
2357
|
+
}
|
2358
|
+
}
|
2359
|
+
class Ht extends H {
|
2360
|
+
getInstances() {
|
2361
|
+
return [new Xt(), new Gt(), new Zt()];
|
2362
|
+
}
|
2363
|
+
/**
|
2364
|
+
* 获取指定特征实例
|
2365
|
+
*/
|
2366
|
+
async create(e, t) {
|
2367
|
+
let l = await super.create(e);
|
2368
|
+
return l.open(null), l;
|
2369
|
+
}
|
2370
|
+
}
|
2371
|
+
class rt {
|
2372
|
+
constructor() {
|
2373
|
+
r(this, "type");
|
2374
|
+
}
|
2375
|
+
}
|
2376
|
+
class _t extends rt {
|
2377
|
+
constructor() {
|
2378
|
+
super(...arguments);
|
2379
|
+
r(this, "type", "Sha256");
|
2380
|
+
}
|
2381
|
+
open(t) {
|
2382
|
+
}
|
2383
|
+
async compute(t) {
|
2384
|
+
let s = new TextEncoder().encode(t), n = await crypto.subtle.digest("SHA-256", s);
|
2385
|
+
return Array.from(new Uint8Array(n)).map((a) => a.toString(16).padStart(2, "0")).join("");
|
2386
|
+
}
|
2387
|
+
}
|
2388
|
+
class el extends rt {
|
2389
|
+
constructor() {
|
2390
|
+
super(...arguments);
|
2391
|
+
r(this, "type", "Md5");
|
2392
|
+
}
|
2393
|
+
open(t) {
|
2394
|
+
}
|
2395
|
+
compute(t) {
|
2396
|
+
let l = be.MD5(t).toString();
|
2397
|
+
return Promise.resolve(l);
|
2398
|
+
}
|
2399
|
+
}
|
2400
|
+
class tl extends H {
|
2401
|
+
getInstances() {
|
2402
|
+
return [new _t(), new el()];
|
2403
|
+
}
|
2404
|
+
async create(e, t) {
|
2405
|
+
let l = await super.create(e);
|
2406
|
+
return l.open(null), l;
|
2407
|
+
}
|
2408
|
+
/**
|
2409
|
+
* 获取MD5 Hash对象
|
2410
|
+
*/
|
2411
|
+
async getMd5() {
|
2412
|
+
return await this.createIfAbsent("Md5");
|
2413
|
+
}
|
2414
|
+
}
|
2415
|
+
class ll {
|
2416
|
+
constructor() {
|
2417
|
+
r(this, "type");
|
2418
|
+
}
|
2419
|
+
createAsync(e) {
|
2420
|
+
return Promise.resolve(void 0);
|
2421
|
+
}
|
2422
|
+
deleteAsync(e) {
|
2423
|
+
return Promise.resolve(void 0);
|
2424
|
+
}
|
2425
|
+
getAsync(e) {
|
2426
|
+
return Promise.resolve(void 0);
|
2427
|
+
}
|
2428
|
+
insertAsync(e, t) {
|
2429
|
+
return Promise.resolve(void 0);
|
2430
|
+
}
|
2431
|
+
openAsync(e) {
|
2432
|
+
return Promise.resolve(0);
|
2433
|
+
}
|
2434
|
+
saveAsync(e, t) {
|
2435
|
+
return Promise.resolve(void 0);
|
2436
|
+
}
|
2437
|
+
updateAsync(e, t) {
|
2438
|
+
return Promise.resolve(void 0);
|
2439
|
+
}
|
2440
|
+
commit() {
|
2441
|
+
}
|
2442
|
+
dispose() {
|
2443
|
+
}
|
2444
|
+
}
|
2445
|
+
const de = class de extends ll {
|
2446
|
+
constructor() {
|
2447
|
+
super(...arguments);
|
2448
|
+
r(this, "type", "IndexedDb");
|
2449
|
+
r(this, "database", null);
|
2450
|
+
r(this, "store", null);
|
2451
|
+
r(this, "objectStoreNames", null);
|
2452
|
+
}
|
2453
|
+
/**
|
2454
|
+
* 进行数据库初始化 或 从现有数据库中得到最新版本号(数据库首次初始化和open是版本号升级时,会触发升级事件)
|
2455
|
+
*/
|
2456
|
+
async openAsync(t) {
|
2457
|
+
return this.database = t, new Promise((l, s) => {
|
2458
|
+
let n = indexedDB.open(t);
|
2459
|
+
n.onsuccess = (i) => {
|
2460
|
+
let o = i.target.result;
|
2461
|
+
de.version = o.version, this.objectStoreNames = o.objectStoreNames, l(de.version);
|
2462
|
+
}, n.onerror = (i) => {
|
2463
|
+
s(i.target);
|
2464
|
+
};
|
2465
|
+
});
|
2466
|
+
}
|
2467
|
+
/**
|
2468
|
+
* 保证创建存储Store
|
2469
|
+
*/
|
2470
|
+
async createAsync(t) {
|
2471
|
+
return this.store = t, this.objectStoreNames.contains(t) ? Promise.resolve(!0) : new Promise((l, s) => {
|
2472
|
+
let n = indexedDB.open(this.database, ++de.version);
|
2473
|
+
n.onupgradeneeded = (i) => {
|
2474
|
+
let o = i.target.result;
|
2475
|
+
o.objectStoreNames.contains(this.store) || o.createObjectStore(this.store);
|
2476
|
+
}, n.onsuccess = (i) => {
|
2477
|
+
l(i);
|
2478
|
+
}, n.onerror = (i) => {
|
2479
|
+
s(i);
|
2480
|
+
};
|
2481
|
+
});
|
2482
|
+
}
|
2483
|
+
/**
|
2484
|
+
* 打开数据库(不升级,用于执行命令)
|
2485
|
+
*/
|
2486
|
+
async openDbAsync() {
|
2487
|
+
return new Promise((t, l) => {
|
2488
|
+
let s = indexedDB.open(this.database, de.version);
|
2489
|
+
s.onsuccess = (n) => {
|
2490
|
+
let i = n.target.result;
|
2491
|
+
t(i);
|
2492
|
+
}, s.onerror = (n) => {
|
2493
|
+
l(n.target);
|
2494
|
+
};
|
2495
|
+
});
|
2496
|
+
}
|
2497
|
+
/**
|
2498
|
+
* 查询数据
|
2499
|
+
*/
|
2500
|
+
async getAsync(t) {
|
2501
|
+
let l = await this.openDbAsync();
|
2502
|
+
return new Promise((s, n) => {
|
2503
|
+
if (t == null) {
|
2504
|
+
s(null);
|
2505
|
+
return;
|
2506
|
+
}
|
2507
|
+
let i = l.transaction(this.store, "readonly");
|
2508
|
+
i.oncomplete = (u) => {
|
2509
|
+
l.close();
|
2510
|
+
}, i.onerror = (u) => {
|
2511
|
+
n(u);
|
2512
|
+
};
|
2513
|
+
let a = i.objectStore(this.store).get(t);
|
2514
|
+
a.onsuccess = (u) => {
|
2515
|
+
let d = u.target.result;
|
2516
|
+
s(d);
|
2517
|
+
}, a.onerror = (u) => {
|
2518
|
+
n(u.target);
|
2519
|
+
};
|
2520
|
+
});
|
2521
|
+
}
|
2522
|
+
/**
|
2523
|
+
* 添加数据
|
2524
|
+
*/
|
2525
|
+
async insertAsync(t, l) {
|
2526
|
+
if (t == null || Object.is(t, NaN))
|
2527
|
+
return;
|
2528
|
+
let s = await this.openDbAsync();
|
2529
|
+
return new Promise((n, i) => {
|
2530
|
+
let o = s.transaction(this.store, "readwrite");
|
2531
|
+
o.oncomplete = (d) => {
|
2532
|
+
s.close();
|
2533
|
+
}, o.onerror = (d) => {
|
2534
|
+
i(d);
|
2535
|
+
};
|
2536
|
+
let u = o.objectStore(this.store).add(l, t);
|
2537
|
+
u.onsuccess = (d) => {
|
2538
|
+
let h = d.target.result;
|
2539
|
+
n(h);
|
2540
|
+
}, u.onerror = (d) => {
|
2541
|
+
let h = d.target.error;
|
2542
|
+
i(h.message);
|
2543
|
+
};
|
2467
2544
|
});
|
2468
2545
|
}
|
2469
|
-
//#endregion
|
2470
2546
|
/**
|
2471
|
-
*
|
2547
|
+
* 修改数据
|
2472
2548
|
*/
|
2473
|
-
async
|
2474
|
-
this.background = ue.background, this.theme = ue.theme, this.layout = ue.layout, this.language = ue.language, this.font = ue.font;
|
2475
|
-
for (let t = 0; t < e.length; t++) {
|
2476
|
-
let l = e[t], s = await this.getConfig(l.type);
|
2477
|
-
this[l.type] = s ?? l.content;
|
2478
|
-
}
|
2479
|
-
q.removeClass(document.documentElement, ue.theme), q.addClass(document.documentElement, this.theme), je.emit("theme", this.theme), q.addClass(document.documentElement, this.layout), this.setBackground(this.background), q.addStyle(document.documentElement, "font-family", this.font);
|
2549
|
+
async updateAsync(t, l) {
|
2480
2550
|
}
|
2481
2551
|
/**
|
2482
|
-
*
|
2552
|
+
* 保存数据,支持代理对象保存
|
2483
2553
|
*/
|
2484
|
-
|
2485
|
-
|
2486
|
-
if (s != null) {
|
2487
|
-
s.schema = l;
|
2554
|
+
async saveAsync(t, l) {
|
2555
|
+
if (t == null || Object.is(t, NaN))
|
2488
2556
|
return;
|
2489
|
-
|
2490
|
-
|
2491
|
-
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
2495
|
-
|
2496
|
-
|
2557
|
+
let s = await this.openDbAsync();
|
2558
|
+
return new Promise((n, i) => {
|
2559
|
+
let o = s.transaction(this.store, "readwrite");
|
2560
|
+
o.oncomplete = (h) => {
|
2561
|
+
s.close();
|
2562
|
+
}, o.onerror = (h) => {
|
2563
|
+
i(h);
|
2564
|
+
};
|
2565
|
+
let a = ie.clone(l), d = o.objectStore(this.store).put(a, t);
|
2566
|
+
d.onsuccess = (h) => {
|
2567
|
+
let g = h.target.result;
|
2568
|
+
n(g);
|
2569
|
+
}, d.onerror = (h) => {
|
2570
|
+
let g = h.target.error;
|
2571
|
+
i(g.message);
|
2572
|
+
};
|
2573
|
+
});
|
2497
2574
|
}
|
2498
2575
|
/**
|
2499
|
-
*
|
2576
|
+
* 删除数据
|
2500
2577
|
*/
|
2501
|
-
async
|
2502
|
-
|
2578
|
+
async deleteAsync(t) {
|
2579
|
+
if (t == null || Object.is(t, NaN))
|
2580
|
+
return;
|
2581
|
+
let l = await this.openDbAsync();
|
2582
|
+
return new Promise((s, n) => {
|
2583
|
+
let i = l.transaction(this.store, "readwrite");
|
2584
|
+
i.oncomplete = (u) => {
|
2585
|
+
l.close();
|
2586
|
+
}, i.onerror = (u) => {
|
2587
|
+
n(u);
|
2588
|
+
};
|
2589
|
+
let a = i.objectStore(this.store).delete(t);
|
2590
|
+
a.onsuccess = (u) => {
|
2591
|
+
let d = u.target.result;
|
2592
|
+
s(d);
|
2593
|
+
}, a.onerror = (u) => {
|
2594
|
+
let d = u.target.error.message;
|
2595
|
+
n(d);
|
2596
|
+
};
|
2597
|
+
});
|
2503
2598
|
}
|
2504
2599
|
/**
|
2505
|
-
*
|
2600
|
+
* 提交事务
|
2506
2601
|
*/
|
2507
|
-
|
2508
|
-
let t = `url("/default/backgrounds/${e}") center / cover no-repeat`, l = this.layout == "desktop" ? "unset" : 0.05, s = document.createElement("style");
|
2509
|
-
s.innerText = `html::before{content:'';width:100%;height:100%;position:absolute;background:${t};opacity:${l};`, document.head.appendChild(s), this.background = e;
|
2602
|
+
commit() {
|
2510
2603
|
}
|
2511
2604
|
/**
|
2512
|
-
*
|
2605
|
+
* 关闭连接
|
2513
2606
|
*/
|
2514
|
-
|
2515
|
-
if (t) {
|
2516
|
-
let l = await this.getConfig(e);
|
2517
|
-
if (l)
|
2518
|
-
return Promise.resolve(l);
|
2519
|
-
}
|
2520
|
-
return N.get(`/user/config?type=${e}`).then((l) => {
|
2521
|
-
let s = l.data ? JSON.parse(l.data) : null;
|
2522
|
-
return Promise.resolve(s);
|
2523
|
-
});
|
2607
|
+
dispose() {
|
2524
2608
|
}
|
2525
|
-
|
2526
|
-
|
2527
|
-
|
2528
|
-
|
2529
|
-
|
2609
|
+
};
|
2610
|
+
/**
|
2611
|
+
* 静态版本,保证所有数据库实例拿到最新版本信息
|
2612
|
+
*/
|
2613
|
+
r(de, "version", null);
|
2614
|
+
let Ke = de;
|
2615
|
+
class sl extends H {
|
2616
|
+
constructor() {
|
2617
|
+
super(...arguments);
|
2618
|
+
r(this, "_default");
|
2619
|
+
}
|
2620
|
+
getInstances() {
|
2621
|
+
return [new Ke()];
|
2530
2622
|
}
|
2531
2623
|
/**
|
2532
|
-
*
|
2624
|
+
* 获取指定类型的提供程序
|
2533
2625
|
*/
|
2534
|
-
async
|
2535
|
-
|
2626
|
+
async create(t, l) {
|
2627
|
+
let s = await super.create(t);
|
2628
|
+
return await s.openAsync(l), s;
|
2536
2629
|
}
|
2537
2630
|
/**
|
2538
|
-
*
|
2631
|
+
* 获取并开启默认驱动程序
|
2539
2632
|
*/
|
2540
|
-
|
2541
|
-
|
2542
|
-
return this.language || e || "zh-cn";
|
2633
|
+
async getDefault(t) {
|
2634
|
+
return this._default != null ? this._default : (this._default = await this.create("IndexedDb", "halo"), t != null && await this._default.createAsync(t), this._default);
|
2543
2635
|
}
|
2544
2636
|
}
|
2545
|
-
class
|
2637
|
+
class nl {
|
2546
2638
|
constructor() {
|
2547
|
-
|
2548
|
-
* 环境变量
|
2549
|
-
*/
|
2550
|
-
r(this, "env");
|
2551
|
-
}
|
2552
|
-
/**
|
2553
|
-
* 使用环境变量
|
2554
|
-
*/
|
2555
|
-
useEnv(e) {
|
2556
|
-
this.env = e, this.env.base = M.trimEnd(e.VITE_ROOT, "/");
|
2639
|
+
r(this, "type");
|
2557
2640
|
}
|
2558
2641
|
}
|
2559
|
-
class
|
2642
|
+
class rl extends nl {
|
2560
2643
|
constructor() {
|
2561
|
-
|
2644
|
+
super(...arguments);
|
2645
|
+
r(this, "type", "Default");
|
2562
2646
|
}
|
2563
|
-
|
2564
|
-
* 手动添加日志
|
2565
|
-
*/
|
2566
|
-
add(e, t, l, s = null) {
|
2567
|
-
let n = te.getTimeString();
|
2568
|
-
this.logs.unshift({ time: n, code: e, message: t, stack: l, elapsed: s });
|
2647
|
+
async open(t) {
|
2569
2648
|
}
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2574
|
-
|
2649
|
+
callback(t) {
|
2650
|
+
}
|
2651
|
+
async getSign(t, l, s, n, i) {
|
2652
|
+
let a = `${t}.${l}.${s ?? ""}.${n}.${i}`;
|
2653
|
+
return (await it.compute(a)).toUpperCase();
|
2654
|
+
}
|
2655
|
+
loginUrl(t) {
|
2656
|
+
return "";
|
2657
|
+
}
|
2658
|
+
dispose() {
|
2659
|
+
}
|
2660
|
+
}
|
2661
|
+
class il extends H {
|
2662
|
+
getInstances() {
|
2663
|
+
return [new rl()];
|
2575
2664
|
}
|
2576
2665
|
/**
|
2577
|
-
*
|
2666
|
+
* 获取指定签名实例
|
2578
2667
|
*/
|
2579
|
-
|
2580
|
-
|
2668
|
+
async create(e, t) {
|
2669
|
+
let l = await super.create(e);
|
2670
|
+
return await l.open(null), l;
|
2581
2671
|
}
|
2582
2672
|
}
|
2583
|
-
class
|
2673
|
+
const Ne = class Ne {
|
2584
2674
|
constructor() {
|
2585
|
-
|
2586
|
-
|
2587
|
-
this[t] = e[t];
|
2675
|
+
//#region 属性
|
2676
|
+
r(this, "type", "Bearer");
|
2588
2677
|
}
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2678
|
+
open(e) {
|
2679
|
+
}
|
2680
|
+
//#endregion
|
2681
|
+
async login(e) {
|
2682
|
+
return q.post(`/user/login?type=${this.type}`, e).then(async (t) => (await (await P.provider.getDefault("user")).saveAsync("sso", t.data), Promise.resolve(t)));
|
2683
|
+
}
|
2684
|
+
loginUrl(e) {
|
2685
|
+
return "";
|
2686
|
+
}
|
2687
|
+
getUser() {
|
2688
|
+
let e = W.getObject("sso");
|
2689
|
+
return { userId: e.userId, token: e.token, secret: e.userSecret };
|
2690
|
+
}
|
2691
|
+
getAuth(e, t, l, s = "", n = "") {
|
2692
|
+
let i = `${this.type} ${e} ${t} ${l} ${s}`;
|
2693
|
+
return n && (i += " " + n), i;
|
2694
|
+
}
|
2695
|
+
logout() {
|
2696
|
+
W.remove(Ne.loginKey), W.remove("sso");
|
2697
|
+
}
|
2698
|
+
};
|
2699
|
+
r(Ne, "loginKey", "user");
|
2700
|
+
let De = Ne;
|
2701
|
+
class ol {
|
2592
2702
|
constructor() {
|
2593
|
-
|
2594
|
-
r(this, "
|
2595
|
-
r(this, "
|
2596
|
-
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
|
2612
|
-
r(this, "fonts", null);
|
2613
|
-
r(this, "ssos", []);
|
2614
|
-
//SSO信息
|
2615
|
-
r(this, "size", "default");
|
2616
|
-
//前端默认尺寸
|
2617
|
-
r(this, "watermark", null);
|
2618
|
-
r(this, "app");
|
2619
|
-
r(this, "env");
|
2620
|
-
/**
|
2621
|
-
* 中心库
|
2622
|
-
*/
|
2623
|
-
r(this, "central");
|
2624
|
-
/**
|
2625
|
-
* 业务库
|
2626
|
-
*/
|
2627
|
-
r(this, "business");
|
2628
|
-
r(this, "upload", null);
|
2629
|
-
r(this, "version", null);
|
2703
|
+
r(this, "type", "Nio");
|
2704
|
+
r(this, "url");
|
2705
|
+
r(this, "app_id");
|
2706
|
+
}
|
2707
|
+
open(e) {
|
2708
|
+
this.url = e.url, this.app_id = e.app_id;
|
2709
|
+
}
|
2710
|
+
async login(e) {
|
2711
|
+
W.setObject("sso", e);
|
2712
|
+
}
|
2713
|
+
loginUrl(e) {
|
2714
|
+
let t = encodeURIComponent(e);
|
2715
|
+
return `${this.url}/oauth2/authorize?client_id=${this.app_id}&redirect_uri=${t}&response_type=code`;
|
2716
|
+
}
|
2717
|
+
getUser() {
|
2718
|
+
return W.getObject(De.loginKey);
|
2719
|
+
}
|
2720
|
+
getAuth(e, t, l, s) {
|
2721
|
+
return `${this.type} ${e} ${t} ${l} pc`;
|
2630
2722
|
}
|
2631
|
-
|
2632
|
-
|
2633
|
-
* 系统初始化
|
2634
|
-
*/
|
2635
|
-
async init() {
|
2636
|
-
this.loaded || (await this.load(), this.loaded = !0);
|
2723
|
+
logout() {
|
2724
|
+
W.remove("sso");
|
2637
2725
|
}
|
2638
|
-
|
2639
|
-
|
2640
|
-
|
2641
|
-
|
2642
|
-
|
2643
|
-
|
2644
|
-
|
2645
|
-
|
2726
|
+
}
|
2727
|
+
class al {
|
2728
|
+
constructor() {
|
2729
|
+
r(this, "type", "WeiXin");
|
2730
|
+
}
|
2731
|
+
open(e) {
|
2732
|
+
}
|
2733
|
+
async login(e) {
|
2734
|
+
}
|
2735
|
+
loginUrl(e) {
|
2736
|
+
return "";
|
2737
|
+
}
|
2738
|
+
getUser() {
|
2739
|
+
return { userId: "", token: "", secret: "" };
|
2740
|
+
}
|
2741
|
+
getAuth(e, t, l, s) {
|
2742
|
+
return "";
|
2743
|
+
}
|
2744
|
+
logout() {
|
2646
2745
|
}
|
2647
2746
|
}
|
2648
|
-
class
|
2747
|
+
class ul {
|
2649
2748
|
constructor() {
|
2650
|
-
|
2651
|
-
/**
|
2652
|
-
* socket连接对象
|
2653
|
-
*/
|
2654
|
-
r(this, "socket", null);
|
2655
|
-
/**
|
2656
|
-
* 是否已连接(空表示不需连接)
|
2657
|
-
*/
|
2658
|
-
r(this, "connected", null);
|
2659
|
-
/**
|
2660
|
-
* 是否需要自动重新连接
|
2661
|
-
*/
|
2662
|
-
r(this, "reconnect", !1);
|
2663
|
-
/**
|
2664
|
-
* 消息处理程序
|
2665
|
-
*/
|
2666
|
-
r(this, "handler", null);
|
2749
|
+
r(this, "type", "Anonymous");
|
2667
2750
|
}
|
2668
|
-
|
2669
|
-
/**
|
2670
|
-
* 登录后,连接Socket
|
2671
|
-
*/
|
2672
|
-
async connect() {
|
2673
|
-
if (!ke.api.ws)
|
2674
|
-
return;
|
2675
|
-
if (this.socket == null || this.reconnect) {
|
2676
|
-
let t = ke.api.ws, l = new nt();
|
2677
|
-
l.path = t, l.method = "GET", await N.onRequest(l);
|
2678
|
-
let s = l.getHeader("Authorization"), n = $.encode(s), i = `${t}?authorization=${n}`;
|
2679
|
-
this.socket = new WebSocket(i);
|
2680
|
-
}
|
2681
|
-
let e;
|
2682
|
-
this.socket.onopen = (t) => {
|
2683
|
-
clearTimeout(e), this.connected = !0;
|
2684
|
-
}, this.socket.onmessage = (t) => {
|
2685
|
-
this.handler && this.handler(t);
|
2686
|
-
}, this.socket.onerror = (t) => {
|
2687
|
-
this.reconnect = !0, console.warn(`Socket连接失败:${ke.api.ws}`);
|
2688
|
-
}, this.socket.onclose = (t) => {
|
2689
|
-
this.connected = !1, this.reconnect && (e = setTimeout(async () => await this.connect(), 1e3));
|
2690
|
-
};
|
2751
|
+
open(e) {
|
2691
2752
|
}
|
2692
|
-
|
2693
|
-
* 订阅并替换Socket事件处理程序
|
2694
|
-
*/
|
2695
|
-
subscribe(e = null) {
|
2696
|
-
this.handler = e;
|
2753
|
+
async login(e) {
|
2697
2754
|
}
|
2698
|
-
|
2699
|
-
|
2700
|
-
*/
|
2701
|
-
unsubscribe() {
|
2702
|
-
this.handler = null;
|
2755
|
+
loginUrl(e) {
|
2756
|
+
return "";
|
2703
2757
|
}
|
2704
|
-
|
2705
|
-
|
2706
|
-
|
2707
|
-
|
2708
|
-
|
2758
|
+
getUser() {
|
2759
|
+
let e = W.get("anonymous");
|
2760
|
+
if (!e) {
|
2761
|
+
let t = V.getUniqueId();
|
2762
|
+
W.set("anonymous", t), e = t;
|
2763
|
+
}
|
2764
|
+
return { userId: "", token: e, secret: "" };
|
2765
|
+
}
|
2766
|
+
getAuth(e, t, l, s) {
|
2767
|
+
return `Anonymous ${e} pc`;
|
2768
|
+
}
|
2769
|
+
logout() {
|
2709
2770
|
}
|
2710
2771
|
}
|
2711
|
-
class
|
2772
|
+
class cl {
|
2712
2773
|
constructor() {
|
2713
|
-
|
2714
|
-
|
2715
|
-
* 用户信息
|
2716
|
-
*/
|
2717
|
-
r(this, "user", null);
|
2718
|
-
/**
|
2719
|
-
* 接口返回的菜单信息(空:菜单未加载 空数组:匿名用户已加载菜单,但是无菜单;防止未登录状态每次跳转路由都加载菜单)
|
2720
|
-
*/
|
2721
|
-
r(this, "menus", null);
|
2722
|
-
r(this, "menusFlat", null);
|
2723
|
-
/**
|
2724
|
-
* 是否调试人
|
2725
|
-
*/
|
2726
|
-
r(this, "debugger", null);
|
2727
|
-
/**
|
2728
|
-
* 当前访问环境
|
2729
|
-
*/
|
2730
|
-
r(this, "env", null);
|
2774
|
+
r(this, "type", "Secret");
|
2775
|
+
r(this, "http");
|
2731
2776
|
}
|
2732
|
-
|
2733
|
-
/**
|
2734
|
-
* 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
|
2735
|
-
*/
|
2736
|
-
async getSso() {
|
2737
|
-
return await (await Je.getDefault("user")).getAsync("sso");
|
2777
|
+
open(e) {
|
2738
2778
|
}
|
2739
|
-
|
2740
|
-
|
2741
|
-
|
2742
|
-
|
2743
|
-
return N.get("/user/info").then(async ({ data: e }) => {
|
2744
|
-
await B.init(e.configs);
|
2745
|
-
let t = He.env.VITE_CDN == "true" ? "StaticFile" : "Local", l = He.env.VITE_BASE, s = await it.create(t, l);
|
2746
|
-
this.user = e, this.debugger = e.debugger;
|
2747
|
-
let n = B.language == "en" ? null : B.language, i = {
|
2748
|
-
paths: { vs: s.getPath("monaco-editor") },
|
2749
|
-
//加载monaco cdn压缩资源包,可以大幅减少本地请求数量
|
2750
|
-
"vs/nls": { availableLanguages: { "*": n } }
|
2751
|
-
//设置编辑器默认语言
|
2752
|
-
};
|
2753
|
-
return Le.config(i), Promise.resolve(e);
|
2779
|
+
async login(e) {
|
2780
|
+
return q.post(`/user/login?type=${this.type}`, e).then((t) => {
|
2781
|
+
let l = t.data;
|
2782
|
+
return W.setObject("sso", l), Promise.resolve(t);
|
2754
2783
|
});
|
2755
2784
|
}
|
2756
|
-
|
2757
|
-
|
2758
|
-
*/
|
2759
|
-
async getAnonymous() {
|
2760
|
-
await B.init([]);
|
2785
|
+
loginUrl(e) {
|
2786
|
+
return "";
|
2761
2787
|
}
|
2762
|
-
|
2763
|
-
|
2764
|
-
|
2765
|
-
getMenuByUrl(e) {
|
2766
|
-
let t = $.getPath(e);
|
2767
|
-
return this.menusFlat.find((s) => s.url.split("?")[0] == t);
|
2788
|
+
getUser() {
|
2789
|
+
let e = W.getObject(De.loginKey);
|
2790
|
+
return { userId: e.userId, token: e.token, secret: e.userSecret };
|
2768
2791
|
}
|
2769
|
-
|
2770
|
-
|
2771
|
-
*/
|
2772
|
-
async loadMenus() {
|
2773
|
-
return N.get("/user/menu").then(({ data: e }) => (this.menus = e, this.menusFlat = $e.getFlat(e, "children"), Promise.resolve(e)));
|
2792
|
+
getAuth(e, t, l, s) {
|
2793
|
+
return `${this.type} ${e} ${t} ${l} pc`;
|
2774
2794
|
}
|
2775
|
-
|
2776
|
-
* 退出登录
|
2777
|
-
*/
|
2778
|
-
async logout() {
|
2779
|
-
return N.post("/user/logout").then(async () => {
|
2780
|
-
this.user = null, this.menus = null;
|
2781
|
-
let e = await this.getSso();
|
2782
|
-
return (await ut.create(e.type)).logout(), ml.disconnect(), Promise.resolve();
|
2783
|
-
});
|
2795
|
+
logout() {
|
2784
2796
|
}
|
2785
2797
|
}
|
2786
|
-
class
|
2798
|
+
class dl {
|
2787
2799
|
constructor() {
|
2788
2800
|
//#region 属性
|
2789
2801
|
/**
|
2790
|
-
*
|
2802
|
+
* 默认背景
|
2791
2803
|
*/
|
2792
|
-
r(this, "
|
2793
|
-
apps: !1,
|
2794
|
-
envs: !1
|
2795
|
-
});
|
2804
|
+
r(this, "background");
|
2796
2805
|
/**
|
2797
|
-
*
|
2806
|
+
* 当前主题
|
2798
2807
|
*/
|
2799
|
-
r(this, "
|
2800
|
-
apps: !1,
|
2801
|
-
envs: !1
|
2802
|
-
});
|
2808
|
+
r(this, "theme");
|
2803
2809
|
/**
|
2804
|
-
*
|
2810
|
+
* 当前布局方式
|
2805
2811
|
*/
|
2806
|
-
r(this, "
|
2812
|
+
r(this, "layout");
|
2807
2813
|
/**
|
2808
|
-
*
|
2814
|
+
* 当前语言
|
2809
2815
|
*/
|
2810
|
-
r(this, "
|
2816
|
+
r(this, "language");
|
2817
|
+
/**
|
2818
|
+
* 字体
|
2819
|
+
*/
|
2820
|
+
r(this, "font");
|
2821
|
+
/**
|
2822
|
+
* 文件布局方式
|
2823
|
+
*/
|
2824
|
+
r(this, "fileLayout");
|
2825
|
+
/**
|
2826
|
+
* 编辑器架构配置
|
2827
|
+
*/
|
2828
|
+
r(this, "editor", {
|
2829
|
+
/**
|
2830
|
+
* 编辑器架构集合
|
2831
|
+
*/
|
2832
|
+
schemas: [],
|
2833
|
+
/**
|
2834
|
+
* 智能提示是否注册信息,防止重复注册
|
2835
|
+
*/
|
2836
|
+
completions: {}
|
2837
|
+
});
|
2811
2838
|
}
|
2812
2839
|
//#endregion
|
2813
2840
|
/**
|
2814
|
-
*
|
2841
|
+
* 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
|
2815
2842
|
*/
|
2816
|
-
async
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2843
|
+
async init(e) {
|
2844
|
+
this.background = ue.background, this.theme = ue.theme, this.layout = ue.layout, this.language = ue.language, this.font = ue.font;
|
2845
|
+
for (let t = 0; t < e.length; t++) {
|
2846
|
+
let l = e[t], s = await this.getConfig(l.type);
|
2847
|
+
this[l.type] = s ?? l.content;
|
2848
|
+
}
|
2849
|
+
N.removeClass(document.documentElement, ue.theme), N.addClass(document.documentElement, this.theme), je.emit("theme", this.theme), N.addClass(document.documentElement, this.layout), this.setBackground(this.background), N.addStyle(document.documentElement, "font-family", this.font);
|
2823
2850
|
}
|
2824
2851
|
/**
|
2825
|
-
*
|
2852
|
+
* 尝试添加架构
|
2826
2853
|
*/
|
2827
|
-
|
2828
|
-
|
2829
|
-
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2854
|
+
tryAddSchema(e, t, l) {
|
2855
|
+
let s = this.editor.schemas.find((n) => n.fileMatch == t);
|
2856
|
+
if (s != null) {
|
2857
|
+
s.schema = l;
|
2858
|
+
return;
|
2859
|
+
}
|
2860
|
+
s = {
|
2861
|
+
uri: e,
|
2862
|
+
//必须。也用于防止 重复创建或者覆盖 架构对象
|
2863
|
+
fileMatch: [t],
|
2864
|
+
//VIP:匹配到的路径,将会自动使用该schema
|
2865
|
+
schema: l
|
2866
|
+
}, this.editor.schemas.push(s);
|
2834
2867
|
}
|
2835
|
-
}
|
2836
|
-
let B = new ol(), ls = vt(new fl()), He = new al(), pl = new ul(), ue = new dl(), ml = new hl(), yl = new gl();
|
2837
|
-
class vl extends H {
|
2838
2868
|
/**
|
2839
|
-
*
|
2869
|
+
* 获取本地配置
|
2840
2870
|
*/
|
2841
|
-
|
2842
|
-
return
|
2871
|
+
async getConfig(e) {
|
2872
|
+
return await (await P.provider.getDefault("config")).getAsync(e);
|
2843
2873
|
}
|
2844
2874
|
/**
|
2845
|
-
*
|
2875
|
+
* 设置背景
|
2846
2876
|
*/
|
2847
|
-
|
2848
|
-
let
|
2849
|
-
|
2850
|
-
}
|
2851
|
-
}
|
2852
|
-
class bl {
|
2853
|
-
constructor() {
|
2854
|
-
r(this, "type", "Sort");
|
2855
|
-
}
|
2856
|
-
open(e) {
|
2857
|
-
}
|
2858
|
-
add(e, t, l, s) {
|
2859
|
-
this.resort(e, t, l);
|
2860
|
-
}
|
2861
|
-
insert(e, t, l, s, n) {
|
2862
|
-
this.resort(e, t, l);
|
2863
|
-
}
|
2864
|
-
//复制时,自动往后排序
|
2865
|
-
copy(e, t, l) {
|
2866
|
-
this.resort(e, t, l);
|
2877
|
+
setBackground(e) {
|
2878
|
+
let t = `url("/default/backgrounds/${e}") center / cover no-repeat`, l = this.layout == "desktop" ? "unset" : 0.05, s = document.createElement("style");
|
2879
|
+
s.innerText = `html::before{content:'';width:100%;height:100%;position:absolute;background:${t};opacity:${l};`, document.head.appendChild(s), this.background = e;
|
2867
2880
|
}
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
2881
|
+
/**
|
2882
|
+
* 加载用户配置
|
2883
|
+
*/
|
2884
|
+
async loadConfig(e, t = !0) {
|
2885
|
+
if (t) {
|
2886
|
+
let l = await this.getConfig(e);
|
2887
|
+
if (l)
|
2888
|
+
return Promise.resolve(l);
|
2874
2889
|
}
|
2890
|
+
return q.get(`/user/config?type=${e}`).then((l) => {
|
2891
|
+
let s = l.data ? JSON.parse(l.data) : null;
|
2892
|
+
return Promise.resolve(s);
|
2893
|
+
});
|
2875
2894
|
}
|
2876
|
-
|
2877
|
-
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
open(e) {
|
2882
|
-
}
|
2883
|
-
add(e, t, l, s) {
|
2895
|
+
/**
|
2896
|
+
* 全量保存用户配置
|
2897
|
+
*/
|
2898
|
+
async saveConfig(e, t, l = !0) {
|
2899
|
+
return l && await (await P.provider.getDefault("config")).saveAsync(e, t), q.post(`/user/config?type=${e}`, t).then((s) => Promise.resolve(!0));
|
2884
2900
|
}
|
2885
|
-
|
2901
|
+
/**
|
2902
|
+
* 部分保存用户配置
|
2903
|
+
*/
|
2904
|
+
async patchConfig(e, t) {
|
2905
|
+
return q.patch(`/user/config?type=${e}`, t).then((l) => Promise.resolve(!0));
|
2886
2906
|
}
|
2887
|
-
|
2907
|
+
/**
|
2908
|
+
* 获取当前语言
|
2909
|
+
*/
|
2910
|
+
getLanguage() {
|
2911
|
+
let e = It.getLanguage();
|
2912
|
+
return this.language || e || "zh-cn";
|
2888
2913
|
}
|
2889
2914
|
}
|
2890
|
-
class
|
2915
|
+
class hl {
|
2891
2916
|
constructor() {
|
2892
|
-
|
2893
|
-
|
2894
|
-
|
2895
|
-
|
2896
|
-
add(e, t, l, s) {
|
2897
|
-
}
|
2898
|
-
insert(e, t, l, s, n) {
|
2899
|
-
}
|
2900
|
-
copy(e, t, l) {
|
2901
|
-
}
|
2902
|
-
}
|
2903
|
-
class Sl extends H {
|
2904
|
-
getInstances() {
|
2905
|
-
return [new bl(), new wl(), new xl()];
|
2917
|
+
/**
|
2918
|
+
* 环境变量
|
2919
|
+
*/
|
2920
|
+
r(this, "env");
|
2906
2921
|
}
|
2907
2922
|
/**
|
2908
|
-
*
|
2923
|
+
* 使用环境变量
|
2909
2924
|
*/
|
2910
|
-
|
2911
|
-
|
2912
|
-
return l.open(null), l;
|
2925
|
+
useEnv(e) {
|
2926
|
+
this.env = e, this.env.base = V.trimEnd(e.VITE_ROOT, "/");
|
2913
2927
|
}
|
2914
2928
|
}
|
2915
|
-
class
|
2929
|
+
class gl {
|
2916
2930
|
constructor() {
|
2917
|
-
r(this, "
|
2931
|
+
r(this, "logs", []);
|
2918
2932
|
}
|
2919
|
-
|
2920
|
-
|
2921
|
-
|
2922
|
-
|
2923
|
-
|
2933
|
+
/**
|
2934
|
+
* 手动添加日志
|
2935
|
+
*/
|
2936
|
+
add(e, t, l, s = null) {
|
2937
|
+
let n = te.getTimeString();
|
2938
|
+
this.logs.unshift({ time: n, code: e, message: t, stack: l, elapsed: s });
|
2924
2939
|
}
|
2925
|
-
|
2940
|
+
/**
|
2941
|
+
* 删除日志
|
2942
|
+
*/
|
2943
|
+
remove(e) {
|
2944
|
+
this.logs.splice(e, 1);
|
2926
2945
|
}
|
2927
|
-
|
2928
|
-
|
2929
|
-
|
2946
|
+
/**
|
2947
|
+
* 清空日志
|
2948
|
+
*/
|
2949
|
+
clear() {
|
2950
|
+
this.logs = [];
|
2930
2951
|
}
|
2931
2952
|
}
|
2932
|
-
class
|
2953
|
+
class fl {
|
2933
2954
|
constructor() {
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
open(t) {
|
2938
|
-
}
|
2939
|
-
compute(t) {
|
2940
|
-
let l = be.MD5(t).toString();
|
2941
|
-
return Promise.resolve(l);
|
2955
|
+
let e = window._setting ?? window.setting;
|
2956
|
+
for (let t in e)
|
2957
|
+
this[t] = e[t];
|
2942
2958
|
}
|
2943
2959
|
}
|
2944
|
-
|
2945
|
-
|
2946
|
-
|
2960
|
+
let ke = new fl();
|
2961
|
+
class pl {
|
2962
|
+
constructor() {
|
2963
|
+
//#region 属性
|
2964
|
+
r(this, "loaded", !1);
|
2965
|
+
r(this, "particles", !1);
|
2966
|
+
r(this, "home", "/");
|
2967
|
+
r(this, "background", null);
|
2968
|
+
//前端默认背景
|
2969
|
+
r(this, "font", "Consolas");
|
2970
|
+
//前端默认字体
|
2971
|
+
r(this, "language", navigator.language.toLowerCase());
|
2972
|
+
//前端默认语言
|
2973
|
+
r(this, "layout", "side");
|
2974
|
+
//前端默认布局
|
2975
|
+
r(this, "theme", "dark");
|
2976
|
+
//前端默认主题
|
2977
|
+
r(this, "themes", []);
|
2978
|
+
r(this, "layouts", []);
|
2979
|
+
r(this, "backgrounds", []);
|
2980
|
+
r(this, "locales", []);
|
2981
|
+
//本地化语言集合
|
2982
|
+
r(this, "fonts", null);
|
2983
|
+
r(this, "ssos", []);
|
2984
|
+
//SSO信息
|
2985
|
+
r(this, "size", "default");
|
2986
|
+
//前端默认尺寸
|
2987
|
+
r(this, "watermark", null);
|
2988
|
+
r(this, "app");
|
2989
|
+
r(this, "env");
|
2990
|
+
/**
|
2991
|
+
* 中心库
|
2992
|
+
*/
|
2993
|
+
r(this, "central");
|
2994
|
+
/**
|
2995
|
+
* 业务库
|
2996
|
+
*/
|
2997
|
+
r(this, "business");
|
2998
|
+
r(this, "upload", null);
|
2999
|
+
r(this, "version", null);
|
2947
3000
|
}
|
2948
|
-
|
2949
|
-
|
2950
|
-
|
3001
|
+
//#endregion
|
3002
|
+
/**
|
3003
|
+
* 系统初始化
|
3004
|
+
*/
|
3005
|
+
async init() {
|
3006
|
+
this.loaded || (await this.load(), this.loaded = !0);
|
2951
3007
|
}
|
2952
3008
|
/**
|
2953
|
-
*
|
3009
|
+
* 加载设置
|
2954
3010
|
*/
|
2955
|
-
async
|
2956
|
-
return
|
3011
|
+
async load() {
|
3012
|
+
return q.get("/app/setting").then(({ data: e }) => (Object.keys(e).forEach((t) => {
|
3013
|
+
let l = e[t];
|
3014
|
+
l && (this[t] = l);
|
3015
|
+
}), N.addClass(document.documentElement, this.theme, ke.web.theme), je.emits({ theme: this.theme }), Promise.resolve(e))).catch((e) => Promise.reject(e));
|
2957
3016
|
}
|
2958
3017
|
}
|
2959
|
-
class
|
3018
|
+
class ml {
|
2960
3019
|
constructor() {
|
2961
|
-
|
2962
|
-
|
2963
|
-
|
2964
|
-
|
2965
|
-
|
2966
|
-
|
2967
|
-
|
2968
|
-
|
2969
|
-
|
2970
|
-
|
2971
|
-
|
2972
|
-
|
2973
|
-
|
2974
|
-
|
2975
|
-
|
2976
|
-
|
2977
|
-
|
2978
|
-
saveAsync(e, t) {
|
2979
|
-
return Promise.resolve(void 0);
|
2980
|
-
}
|
2981
|
-
updateAsync(e, t) {
|
2982
|
-
return Promise.resolve(void 0);
|
2983
|
-
}
|
2984
|
-
commit() {
|
2985
|
-
}
|
2986
|
-
dispose() {
|
3020
|
+
//#region 属性
|
3021
|
+
/**
|
3022
|
+
* socket连接对象
|
3023
|
+
*/
|
3024
|
+
r(this, "socket", null);
|
3025
|
+
/**
|
3026
|
+
* 是否已连接(空表示不需连接)
|
3027
|
+
*/
|
3028
|
+
r(this, "connected", null);
|
3029
|
+
/**
|
3030
|
+
* 是否需要自动重新连接
|
3031
|
+
*/
|
3032
|
+
r(this, "reconnect", !1);
|
3033
|
+
/**
|
3034
|
+
* 消息处理程序
|
3035
|
+
*/
|
3036
|
+
r(this, "handler", null);
|
2987
3037
|
}
|
2988
|
-
|
2989
|
-
|
2990
|
-
|
2991
|
-
|
2992
|
-
|
2993
|
-
|
2994
|
-
|
2995
|
-
|
3038
|
+
//#endregion
|
3039
|
+
/**
|
3040
|
+
* 登录后,连接Socket
|
3041
|
+
*/
|
3042
|
+
async connect() {
|
3043
|
+
if (!ke.api.ws)
|
3044
|
+
return;
|
3045
|
+
if (this.socket == null || this.reconnect) {
|
3046
|
+
let t = ke.api.ws, l = new nt();
|
3047
|
+
l.path = t, l.method = "GET", await q.onRequest(l);
|
3048
|
+
let s = l.getHeader("Authorization"), n = $.encode(s), i = `${t}?authorization=${n}`;
|
3049
|
+
this.socket = new WebSocket(i);
|
3050
|
+
}
|
3051
|
+
let e;
|
3052
|
+
this.socket.onopen = (t) => {
|
3053
|
+
clearTimeout(e), this.connected = !0;
|
3054
|
+
}, this.socket.onmessage = (t) => {
|
3055
|
+
this.handler && this.handler(t);
|
3056
|
+
}, this.socket.onerror = (t) => {
|
3057
|
+
this.reconnect = !0, console.warn(`Socket连接失败:${ke.api.ws}`);
|
3058
|
+
}, this.socket.onclose = (t) => {
|
3059
|
+
this.connected = !1, this.reconnect && (e = setTimeout(async () => await this.connect(), 1e3));
|
3060
|
+
};
|
2996
3061
|
}
|
2997
3062
|
/**
|
2998
|
-
*
|
3063
|
+
* 订阅并替换Socket事件处理程序
|
2999
3064
|
*/
|
3000
|
-
|
3001
|
-
|
3002
|
-
let n = indexedDB.open(t);
|
3003
|
-
n.onsuccess = (i) => {
|
3004
|
-
let o = i.target.result;
|
3005
|
-
de.version = o.version, this.objectStoreNames = o.objectStoreNames, l(de.version);
|
3006
|
-
}, n.onerror = (i) => {
|
3007
|
-
s(i.target);
|
3008
|
-
};
|
3009
|
-
});
|
3065
|
+
subscribe(e = null) {
|
3066
|
+
this.handler = e;
|
3010
3067
|
}
|
3011
3068
|
/**
|
3012
|
-
*
|
3069
|
+
* 取消订阅Socket事件处理程序,防止内存泄漏
|
3013
3070
|
*/
|
3014
|
-
|
3015
|
-
|
3016
|
-
let n = indexedDB.open(this.database, ++de.version);
|
3017
|
-
n.onupgradeneeded = (i) => {
|
3018
|
-
let o = i.target.result;
|
3019
|
-
o.objectStoreNames.contains(this.store) || o.createObjectStore(this.store);
|
3020
|
-
}, n.onsuccess = (i) => {
|
3021
|
-
l(i);
|
3022
|
-
}, n.onerror = (i) => {
|
3023
|
-
s(i);
|
3024
|
-
};
|
3025
|
-
});
|
3071
|
+
unsubscribe() {
|
3072
|
+
this.handler = null;
|
3026
3073
|
}
|
3027
3074
|
/**
|
3028
|
-
*
|
3075
|
+
* 退出时断开连接
|
3029
3076
|
*/
|
3030
|
-
|
3031
|
-
|
3032
|
-
|
3033
|
-
|
3034
|
-
|
3035
|
-
|
3036
|
-
|
3037
|
-
|
3038
|
-
|
3039
|
-
|
3077
|
+
disconnect() {
|
3078
|
+
this.socket.close(), this.reconnect = !1, this.connected = null, this.handler = null;
|
3079
|
+
}
|
3080
|
+
}
|
3081
|
+
class yl {
|
3082
|
+
constructor() {
|
3083
|
+
//#region 属性
|
3084
|
+
/**
|
3085
|
+
* 用户信息
|
3086
|
+
*/
|
3087
|
+
r(this, "user", null);
|
3088
|
+
/**
|
3089
|
+
* 接口返回的菜单信息(空:菜单未加载 空数组:匿名用户已加载菜单,但是无菜单;防止未登录状态每次跳转路由都加载菜单)
|
3090
|
+
*/
|
3091
|
+
r(this, "menus", null);
|
3092
|
+
r(this, "menusFlat", null);
|
3093
|
+
/**
|
3094
|
+
* 是否调试人
|
3095
|
+
*/
|
3096
|
+
r(this, "debugger", null);
|
3097
|
+
/**
|
3098
|
+
* 当前访问环境
|
3099
|
+
*/
|
3100
|
+
r(this, "env", null);
|
3040
3101
|
}
|
3102
|
+
//#endregion
|
3041
3103
|
/**
|
3042
|
-
*
|
3104
|
+
* 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
|
3043
3105
|
*/
|
3044
|
-
async
|
3045
|
-
|
3046
|
-
return new Promise((s, n) => {
|
3047
|
-
if (t == null) {
|
3048
|
-
s(null);
|
3049
|
-
return;
|
3050
|
-
}
|
3051
|
-
let i = l.transaction(this.store, "readonly");
|
3052
|
-
i.oncomplete = (u) => {
|
3053
|
-
l.close();
|
3054
|
-
}, i.onerror = (u) => {
|
3055
|
-
n(u);
|
3056
|
-
};
|
3057
|
-
let a = i.objectStore(this.store).get(t);
|
3058
|
-
a.onsuccess = (u) => {
|
3059
|
-
let d = u.target.result;
|
3060
|
-
s(d);
|
3061
|
-
}, a.onerror = (u) => {
|
3062
|
-
n(u.target);
|
3063
|
-
};
|
3064
|
-
});
|
3106
|
+
async getSso() {
|
3107
|
+
return await (await P.provider.getDefault("user")).getAsync("sso");
|
3065
3108
|
}
|
3066
3109
|
/**
|
3067
|
-
*
|
3110
|
+
* 登录后,获取用户信息
|
3068
3111
|
*/
|
3069
|
-
async
|
3070
|
-
|
3071
|
-
|
3072
|
-
|
3073
|
-
|
3074
|
-
let
|
3075
|
-
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3079
|
-
};
|
3080
|
-
let u = o.objectStore(this.store).add(l, t);
|
3081
|
-
u.onsuccess = (d) => {
|
3082
|
-
let h = d.target.result;
|
3083
|
-
n(h);
|
3084
|
-
}, u.onerror = (d) => {
|
3085
|
-
let h = d.target.error;
|
3086
|
-
i(h.message);
|
3112
|
+
async loadInfo() {
|
3113
|
+
return q.get("/user/info").then(async ({ data: e }) => {
|
3114
|
+
await B.init(e.configs);
|
3115
|
+
let t = He.env.VITE_CDN == "true" ? "StaticFile" : "Local", l = He.env.VITE_BASE, s = await P.cdn.create(t, l);
|
3116
|
+
this.user = e, this.debugger = e.debugger;
|
3117
|
+
let n = B.language == "en" ? null : B.language, i = {
|
3118
|
+
paths: { vs: s.getPath("monaco-editor") },
|
3119
|
+
//加载monaco cdn压缩资源包,可以大幅减少本地请求数量
|
3120
|
+
"vs/nls": { availableLanguages: { "*": n } }
|
3121
|
+
//设置编辑器默认语言
|
3087
3122
|
};
|
3123
|
+
return Le.config(i), Promise.resolve(e);
|
3088
3124
|
});
|
3089
3125
|
}
|
3090
3126
|
/**
|
3091
|
-
*
|
3127
|
+
* 未登录,获取匿名登录信息
|
3092
3128
|
*/
|
3093
|
-
async
|
3129
|
+
async getAnonymous() {
|
3130
|
+
await B.init([]);
|
3094
3131
|
}
|
3095
3132
|
/**
|
3096
|
-
*
|
3133
|
+
* 根据路径获取路由
|
3097
3134
|
*/
|
3098
|
-
|
3099
|
-
|
3100
|
-
|
3101
|
-
let s = await this.openDbAsync();
|
3102
|
-
return new Promise((n, i) => {
|
3103
|
-
let o = s.transaction(this.store, "readwrite");
|
3104
|
-
o.oncomplete = (h) => {
|
3105
|
-
s.close();
|
3106
|
-
}, o.onerror = (h) => {
|
3107
|
-
i(h);
|
3108
|
-
};
|
3109
|
-
let a = ie.clone(l), d = o.objectStore(this.store).put(a, t);
|
3110
|
-
d.onsuccess = (h) => {
|
3111
|
-
let g = h.target.result;
|
3112
|
-
n(g);
|
3113
|
-
}, d.onerror = (h) => {
|
3114
|
-
let g = h.target.error;
|
3115
|
-
i(g.message);
|
3116
|
-
};
|
3117
|
-
});
|
3135
|
+
getMenuByUrl(e) {
|
3136
|
+
let t = $.getPath(e);
|
3137
|
+
return this.menusFlat.find((s) => s.url.split("?")[0] == t);
|
3118
3138
|
}
|
3119
3139
|
/**
|
3120
|
-
*
|
3140
|
+
* 加载服务端路由
|
3121
3141
|
*/
|
3122
|
-
async
|
3123
|
-
|
3124
|
-
|
3125
|
-
|
3126
|
-
|
3127
|
-
|
3128
|
-
|
3129
|
-
|
3130
|
-
|
3131
|
-
|
3132
|
-
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3136
|
-
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3142
|
+
async loadMenus() {
|
3143
|
+
return q.get("/user/menu").then(({ data: e }) => (this.menus = e, this.menusFlat = $e.getFlat(e, "children"), Promise.resolve(e)));
|
3144
|
+
}
|
3145
|
+
/**
|
3146
|
+
* 退出登录
|
3147
|
+
*/
|
3148
|
+
async logout() {
|
3149
|
+
return q.post("/user/logout").then(async () => {
|
3150
|
+
this.user = null, this.menus = null;
|
3151
|
+
let e = await this.getSso();
|
3152
|
+
return (await P.sso.create(e.type)).logout(), wl.disconnect(), Promise.resolve();
|
3153
|
+
});
|
3154
|
+
}
|
3155
|
+
}
|
3156
|
+
class vl {
|
3157
|
+
constructor() {
|
3158
|
+
//#region 属性
|
3159
|
+
/**
|
3160
|
+
* 加载完毕状态记录
|
3161
|
+
*/
|
3162
|
+
r(this, "loaded", {
|
3163
|
+
apps: !1,
|
3164
|
+
envs: !1
|
3141
3165
|
});
|
3166
|
+
/**
|
3167
|
+
* 是否加载中状态,用于并发场景 防止重复拉取接口
|
3168
|
+
*/
|
3169
|
+
r(this, "loading", {
|
3170
|
+
apps: !1,
|
3171
|
+
envs: !1
|
3172
|
+
});
|
3173
|
+
/**
|
3174
|
+
* 应用集合,存储到Store中,防止每一个Driver实例重复加载
|
3175
|
+
*/
|
3176
|
+
r(this, "apps", []);
|
3177
|
+
/**
|
3178
|
+
* 环境集合,存储到Store中,防止每一个Driver实例重复加载
|
3179
|
+
*/
|
3180
|
+
r(this, "envs", []);
|
3142
3181
|
}
|
3182
|
+
//#endregion
|
3143
3183
|
/**
|
3144
|
-
*
|
3184
|
+
* 加载应用选项
|
3145
3185
|
*/
|
3146
|
-
|
3186
|
+
async loadApps(e = !1) {
|
3187
|
+
if (!this.loading.apps && !(!e && this.loaded.apps))
|
3188
|
+
return this.loading.apps = !0, q.post("/app/options").then((t) => {
|
3189
|
+
this.apps = t.data, this.loaded.apps = !0;
|
3190
|
+
}).finally(() => {
|
3191
|
+
this.loading.apps = !1;
|
3192
|
+
});
|
3147
3193
|
}
|
3148
3194
|
/**
|
3149
|
-
*
|
3195
|
+
* 加载环境选项
|
3150
3196
|
*/
|
3151
|
-
|
3197
|
+
async loadEnvs(e = !1) {
|
3198
|
+
if (!this.loading.envs && (this.loading.envs = !0, !(!e && this.loaded.envs)))
|
3199
|
+
return q.post("/env/options").then((t) => {
|
3200
|
+
this.envs = t.data, this.loaded.envs = !0;
|
3201
|
+
}).finally(() => {
|
3202
|
+
this.loading.envs = !1;
|
3203
|
+
});
|
3152
3204
|
}
|
3153
|
-
}
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
r(de, "version", null);
|
3158
|
-
let Ke = de;
|
3159
|
-
class Ol extends H {
|
3160
|
-
constructor() {
|
3161
|
-
super(...arguments);
|
3162
|
-
r(this, "_default");
|
3205
|
+
}
|
3206
|
+
class Xl {
|
3207
|
+
static() {
|
3208
|
+
debugger;
|
3163
3209
|
}
|
3164
|
-
|
3165
|
-
|
3210
|
+
/**
|
3211
|
+
* 获取路由服务
|
3212
|
+
*/
|
3213
|
+
static get getRouter() {
|
3214
|
+
return null;
|
3166
3215
|
}
|
3216
|
+
}
|
3217
|
+
let B = new dl(), Gl = ft(new vl()), He = new hl(), bl = new gl(), ue = new pl(), wl = new ml(), xl = new yl();
|
3218
|
+
class Sl extends H {
|
3167
3219
|
/**
|
3168
|
-
*
|
3220
|
+
* @extends {getInstances}
|
3169
3221
|
*/
|
3170
|
-
|
3171
|
-
|
3172
|
-
return await s.openAsync(l), s;
|
3222
|
+
getInstances() {
|
3223
|
+
return [new cl(), new ol(), new al(), new De(), new ul()];
|
3173
3224
|
}
|
3174
3225
|
/**
|
3175
|
-
*
|
3226
|
+
* 获取指定SSO实例
|
3176
3227
|
*/
|
3177
|
-
async
|
3178
|
-
|
3228
|
+
async create(e, t) {
|
3229
|
+
let l = ue.ssos.find((i) => i.type.toUpperCase() == e.toUpperCase()), s = { url: l == null ? void 0 : l.url, app_id: l == null ? void 0 : l.appId }, n = await super.create(e);
|
3230
|
+
return n.open(s), n;
|
3179
3231
|
}
|
3180
3232
|
}
|
3181
3233
|
const Ce = class Ce {
|
3182
3234
|
/**
|
3183
|
-
*
|
3235
|
+
* 并缓存工厂实例
|
3184
3236
|
*/
|
3185
3237
|
static create(e, t) {
|
3186
3238
|
let l = Ce.mappings[e];
|
@@ -3189,64 +3241,64 @@ const Ce = class Ce {
|
|
3189
3241
|
//#endregion
|
3190
3242
|
//#region 工厂实例
|
3191
3243
|
/**
|
3192
|
-
|
3244
|
+
*CDN工厂
|
3193
3245
|
*/
|
3194
|
-
static
|
3195
|
-
return this.create("CdnFactory",
|
3246
|
+
static get cdn() {
|
3247
|
+
return this.create("CdnFactory", zt);
|
3196
3248
|
}
|
3197
3249
|
/**
|
3198
|
-
|
3250
|
+
*编码器工厂
|
3199
3251
|
*/
|
3200
|
-
static
|
3201
|
-
return this.create("EncoderFactory",
|
3252
|
+
static get encoder() {
|
3253
|
+
return this.create("EncoderFactory", Nt);
|
3202
3254
|
}
|
3203
3255
|
/**
|
3204
|
-
|
3256
|
+
*Excel工厂
|
3205
3257
|
*/
|
3206
|
-
static
|
3207
|
-
return this.create("ExcelFactory",
|
3258
|
+
static get excel() {
|
3259
|
+
return this.create("ExcelFactory", Qt);
|
3208
3260
|
}
|
3209
3261
|
/**
|
3210
|
-
|
3262
|
+
*Explainer工厂
|
3211
3263
|
*/
|
3212
|
-
static
|
3213
|
-
return this.create("ExplainerFactory",
|
3264
|
+
static get explainer() {
|
3265
|
+
return this.create("ExplainerFactory", Jt);
|
3214
3266
|
}
|
3215
3267
|
/**
|
3216
|
-
|
3268
|
+
*特征工厂
|
3217
3269
|
*/
|
3218
|
-
static
|
3219
|
-
return this.create("FeatureFactory",
|
3270
|
+
static get feature() {
|
3271
|
+
return this.create("FeatureFactory", Ht);
|
3220
3272
|
}
|
3221
3273
|
/**
|
3222
|
-
|
3274
|
+
*哈希工厂
|
3223
3275
|
*/
|
3224
|
-
static
|
3225
|
-
return this.create("HasherFactory",
|
3276
|
+
static get hasher() {
|
3277
|
+
return this.create("HasherFactory", tl);
|
3226
3278
|
}
|
3227
3279
|
/**
|
3228
|
-
|
3280
|
+
*提供程序工厂
|
3229
3281
|
*/
|
3230
|
-
static
|
3231
|
-
return this.create("ProviderFactory",
|
3282
|
+
static get provider() {
|
3283
|
+
return this.create("ProviderFactory", sl);
|
3232
3284
|
}
|
3233
3285
|
/**
|
3234
|
-
|
3286
|
+
*Http请求工厂
|
3235
3287
|
*/
|
3236
|
-
static
|
3237
|
-
return this.create("HttpFactory",
|
3288
|
+
static get http() {
|
3289
|
+
return this.create("HttpFactory", jt);
|
3238
3290
|
}
|
3239
3291
|
/**
|
3240
|
-
|
3292
|
+
*签名工厂
|
3241
3293
|
*/
|
3242
|
-
static
|
3243
|
-
return this.create("SignerFactory",
|
3294
|
+
static get signer() {
|
3295
|
+
return this.create("SignerFactory", il);
|
3244
3296
|
}
|
3245
3297
|
/**
|
3246
|
-
|
3298
|
+
*SSO工厂
|
3247
3299
|
*/
|
3248
|
-
static
|
3249
|
-
return this.create("SsoFactory",
|
3300
|
+
static get sso() {
|
3301
|
+
return this.create("SsoFactory", Sl);
|
3250
3302
|
}
|
3251
3303
|
//#endregion
|
3252
3304
|
};
|
@@ -3256,11 +3308,11 @@ const Ce = class Ce {
|
|
3256
3308
|
*/
|
3257
3309
|
r(Ce, "mappings", {});
|
3258
3310
|
let We = Ce;
|
3259
|
-
const
|
3260
|
-
let
|
3261
|
-
|
3311
|
+
const P = We;
|
3312
|
+
let kl = {}, q = {}, it = {}, El = async () => {
|
3313
|
+
kl = await P.encoder.getBase64(), q = await P.http.getHalo(), it = await P.hasher.getMd5();
|
3262
3314
|
};
|
3263
|
-
class
|
3315
|
+
class Zl {
|
3264
3316
|
/**
|
3265
3317
|
* 初始化,并绑定自动关闭上下文菜单事件
|
3266
3318
|
*/
|
@@ -3277,7 +3329,7 @@ class is {
|
|
3277
3329
|
* 根据鼠标事件,显示右键上下文弹窗
|
3278
3330
|
*/
|
3279
3331
|
r(this, "show", (e) => {
|
3280
|
-
let l =
|
3332
|
+
let l = N.parentAbsolute(this.container).getBoundingClientRect(), s = e.clientX - l.left, n = e.clientY - l.top - 2;
|
3281
3333
|
this.container.style.display = "block", this.container.style.left = s + "px", this.container.style.top = n + "px";
|
3282
3334
|
});
|
3283
3335
|
/**
|
@@ -3299,7 +3351,7 @@ class is {
|
|
3299
3351
|
}
|
3300
3352
|
}
|
3301
3353
|
}
|
3302
|
-
class
|
3354
|
+
class Hl {
|
3303
3355
|
constructor() {
|
3304
3356
|
r(this, "events", {});
|
3305
3357
|
/**
|
@@ -3421,7 +3473,7 @@ class os {
|
|
3421
3473
|
clearTimeout(this.timer);
|
3422
3474
|
}
|
3423
3475
|
}
|
3424
|
-
class
|
3476
|
+
class ot {
|
3425
3477
|
constructor(e, t) {
|
3426
3478
|
/**
|
3427
3479
|
* 距窗口左边的距离
|
@@ -3434,7 +3486,7 @@ class dt {
|
|
3434
3486
|
this.x = e, this.y = t;
|
3435
3487
|
}
|
3436
3488
|
}
|
3437
|
-
class
|
3489
|
+
class Cl extends ot {
|
3438
3490
|
constructor() {
|
3439
3491
|
super(...arguments);
|
3440
3492
|
/**
|
@@ -3443,7 +3495,7 @@ class Rl extends dt {
|
|
3443
3495
|
r(this, "affix");
|
3444
3496
|
}
|
3445
3497
|
}
|
3446
|
-
class
|
3498
|
+
class _l extends ot {
|
3447
3499
|
constructor(t, l, s, n) {
|
3448
3500
|
super(t, l);
|
3449
3501
|
r(this, "width");
|
@@ -3451,7 +3503,7 @@ class as extends dt {
|
|
3451
3503
|
this.width = s, this.height = n;
|
3452
3504
|
}
|
3453
3505
|
}
|
3454
|
-
class
|
3506
|
+
class at {
|
3455
3507
|
constructor() {
|
3456
3508
|
//#region 大小调整
|
3457
3509
|
r(this, "resizeObserver", null);
|
@@ -3530,7 +3582,7 @@ class ht {
|
|
3530
3582
|
return;
|
3531
3583
|
this.dragElement = e;
|
3532
3584
|
let l = !1, s = (o) => (l = !0, o.preventDefault(), t.init(o)), n = (o) => {
|
3533
|
-
let a = new
|
3585
|
+
let a = new Cl(), u = t.range;
|
3534
3586
|
if (u == null)
|
3535
3587
|
a.x = o.clientX, a.y = o.clientY;
|
3536
3588
|
else {
|
@@ -3581,15 +3633,15 @@ class ht {
|
|
3581
3633
|
}
|
3582
3634
|
//#endregion
|
3583
3635
|
}
|
3584
|
-
const
|
3636
|
+
const Dl = /* @__PURE__ */ le({
|
3585
3637
|
__name: "Fill",
|
3586
3638
|
emits: ["resize"],
|
3587
3639
|
setup(c, { emit: e }) {
|
3588
|
-
let t = e, l =
|
3589
|
-
let d =
|
3590
|
-
n.value =
|
3640
|
+
let t = e, l = R(), s = R(), n = R(), i = new at(), o = () => {
|
3641
|
+
let d = N.siblings(l.value);
|
3642
|
+
n.value = N.getHeight(d);
|
3591
3643
|
}, a = () => {
|
3592
|
-
s.value =
|
3644
|
+
s.value = N.getHeight(l.value), t("resize", s.value);
|
3593
3645
|
}, u = () => {
|
3594
3646
|
a();
|
3595
3647
|
};
|
@@ -3606,7 +3658,7 @@ const Ul = /* @__PURE__ */ le({
|
|
3606
3658
|
pe(d.$slots, "default")
|
3607
3659
|
], 4));
|
3608
3660
|
}
|
3609
|
-
}),
|
3661
|
+
}), es = /* @__PURE__ */ le({
|
3610
3662
|
__name: "Code",
|
3611
3663
|
props: {
|
3612
3664
|
config: { default: {} },
|
@@ -3615,7 +3667,7 @@ const Ul = /* @__PURE__ */ le({
|
|
3615
3667
|
},
|
3616
3668
|
emits: ["mounted", "change", "scroll", "update:modelValue"],
|
3617
3669
|
setup(c, { expose: e, emit: t }) {
|
3618
|
-
let l = t, s = c, { config: n, border: i, modelValue: o } = ae(s), a = null, u = null, d = null, h =
|
3670
|
+
let l = t, s = c, { config: n, border: i, modelValue: o } = ae(s), a = null, u = null, d = null, h = R(), g = (f) => f == "en" ? null : f, m = (f) => f == "default" ? null : "vs-dark", E = (f) => {
|
3619
3671
|
if (B.editor.completions[f])
|
3620
3672
|
return;
|
3621
3673
|
let S = a.languages.getLanguages().find((C) => C.id == f);
|
@@ -3627,25 +3679,25 @@ const Ul = /* @__PURE__ */ le({
|
|
3627
3679
|
});
|
3628
3680
|
}, j = (f, S) => a.languages.registerCompletionItemProvider(S, {
|
3629
3681
|
provideCompletionItems: (C, T) => {
|
3630
|
-
let
|
3682
|
+
let A = C.getWordUntilPosition(T), z = {
|
3631
3683
|
startLineNumber: T.lineNumber,
|
3632
3684
|
endLineNumber: T.lineNumber,
|
3633
|
-
startColumn:
|
3634
|
-
endColumn:
|
3685
|
+
startColumn: A.startColumn,
|
3686
|
+
endColumn: A.endColumn
|
3635
3687
|
}, _ = [];
|
3636
3688
|
const ee = ["builtinFunctions", "keywords", "operators"];
|
3637
3689
|
for (let me = 0; me < ee.length; me++) {
|
3638
3690
|
const ye = ee[me];
|
3639
3691
|
let p = f.language[ye];
|
3640
3692
|
p && p.forEach((y) => {
|
3641
|
-
let I = y.toLowerCase(),
|
3693
|
+
let I = y.toLowerCase(), F = {
|
3642
3694
|
label: I,
|
3643
3695
|
kind: null,
|
3644
3696
|
insertText: I,
|
3645
|
-
range:
|
3697
|
+
range: z,
|
3646
3698
|
documentation: y
|
3647
3699
|
};
|
3648
|
-
ye == "keywords" ? (
|
3700
|
+
ye == "keywords" ? (F.kind = a.languages.CompletionItemKind.Keyword, F.detail = "关键词") : ye == "operators" ? (F.kind = a.languages.CompletionItemKind.Operator, F.insertText += " ", F.detail = "操作符") : (F.kind = a.languages.CompletionItemKind.Function, F.insertText += "()", F.detail = "函数"), _.push(F);
|
3649
3701
|
});
|
3650
3702
|
}
|
3651
3703
|
return { suggestions: _ };
|
@@ -3653,7 +3705,7 @@ const Ul = /* @__PURE__ */ le({
|
|
3653
3705
|
}), J = () => {
|
3654
3706
|
var T;
|
3655
3707
|
let f = null;
|
3656
|
-
n.value.schema && (f = n.value.category + "/" +
|
3708
|
+
n.value.schema && (f = n.value.category + "/" + V.getUniqueId(), B.tryAddSchema(f, n.value.category, n.value.schema));
|
3657
3709
|
let S = {
|
3658
3710
|
validate: !0,
|
3659
3711
|
allowComments: !0,
|
@@ -3682,11 +3734,11 @@ const Ul = /* @__PURE__ */ le({
|
|
3682
3734
|
//根据父元素自动布局
|
3683
3735
|
model: d
|
3684
3736
|
};
|
3685
|
-
u = a.editor.create(h.value, C), (T = n.value.scrollTop) != null && T.value && u.setScrollTop(n.value.scrollTop.value), u.onDidScrollChange((
|
3686
|
-
l("scroll",
|
3687
|
-
}), u.onDidChangeModelContent((
|
3688
|
-
let
|
3689
|
-
l("update:modelValue",
|
3737
|
+
u = a.editor.create(h.value, C), (T = n.value.scrollTop) != null && T.value && u.setScrollTop(n.value.scrollTop.value), u.onDidScrollChange((A) => {
|
3738
|
+
l("scroll", A.scrollTop);
|
3739
|
+
}), u.onDidChangeModelContent((A) => {
|
3740
|
+
let z = u.getValue();
|
3741
|
+
l("update:modelValue", z), l("change", z);
|
3690
3742
|
});
|
3691
3743
|
};
|
3692
3744
|
Pe(async () => {
|
@@ -3697,44 +3749,44 @@ const Ul = /* @__PURE__ */ le({
|
|
3697
3749
|
}, w = () => u;
|
3698
3750
|
return Oe(() => {
|
3699
3751
|
d == null || d.dispose(), u == null || u.dispose();
|
3700
|
-
}),
|
3752
|
+
}), K(() => B.theme, (f, S) => {
|
3701
3753
|
let v = m(f);
|
3702
3754
|
a.editor.setTheme(v);
|
3703
|
-
}),
|
3755
|
+
}), K(() => B.language, (f, S) => {
|
3704
3756
|
Le.config({ "vs/nls": { availableLanguages: { "*": g(f) } } });
|
3705
|
-
}),
|
3757
|
+
}), K(() => o.value, (f, S) => {
|
3706
3758
|
if (!u)
|
3707
3759
|
return;
|
3708
3760
|
let v = u.getValue();
|
3709
3761
|
f != v && u.setValue(f ?? "");
|
3710
|
-
}),
|
3762
|
+
}), K(() => n.value.language, (f, S) => {
|
3711
3763
|
if (!u)
|
3712
3764
|
return;
|
3713
3765
|
let v = u.getModel();
|
3714
3766
|
a.editor.setModelLanguage(v, f), E(f);
|
3715
|
-
}), e({ layout: se, getEditor: w }), (f, S) => (Q(),
|
3767
|
+
}), e({ layout: se, getEditor: w }), (f, S) => (Q(), pt(Dl, null, {
|
3716
3768
|
default: _e(() => [
|
3717
3769
|
he("div", {
|
3718
3770
|
ref_key: "monacoEditorRef",
|
3719
3771
|
ref: h,
|
3720
|
-
class:
|
3772
|
+
class: qe(["ha-code", { border: D(i) }])
|
3721
3773
|
}, null, 2)
|
3722
3774
|
]),
|
3723
3775
|
_: 1
|
3724
3776
|
}));
|
3725
3777
|
}
|
3726
|
-
}),
|
3778
|
+
}), Ol = (c, e) => {
|
3727
3779
|
const t = c.__vccOpts || c;
|
3728
3780
|
for (const [l, s] of e)
|
3729
3781
|
t[l] = s;
|
3730
3782
|
return t;
|
3731
|
-
},
|
3732
|
-
function
|
3733
|
-
return Q(), Z("div",
|
3783
|
+
}, Tl = {}, Il = { class: "ha-col" };
|
3784
|
+
function Rl(c, e) {
|
3785
|
+
return Q(), Z("div", Il, [
|
3734
3786
|
pe(c.$slots, "default")
|
3735
3787
|
]);
|
3736
3788
|
}
|
3737
|
-
const
|
3789
|
+
const ts = /* @__PURE__ */ Ol(Tl, [["render", Rl]]), ls = /* @__PURE__ */ le({
|
3738
3790
|
__name: "Compare",
|
3739
3791
|
props: {
|
3740
3792
|
inline: { type: Boolean, default: !1 },
|
@@ -3744,7 +3796,7 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3744
3796
|
},
|
3745
3797
|
emits: ["update:modelValue", "update:original", "change"],
|
3746
3798
|
setup(c, { emit: e }) {
|
3747
|
-
let t = e, l = c, { inline: s, language: n, original: i, modelValue: o } = ae(l), a = null, u = null, d = null, h = null, g = null, m = null, E =
|
3799
|
+
let t = e, l = c, { inline: s, language: n, original: i, modelValue: o } = ae(l), a = null, u = null, d = null, h = null, g = null, m = null, E = R(), j = R(), J = (w) => {
|
3748
3800
|
u = w.editor.createModel(i.value, n.value), d = w.editor.createModel(o.value, n.value), a = w.editor.createDiffEditor(E.value, {
|
3749
3801
|
originalEditable: !0,
|
3750
3802
|
automaticLayout: !0,
|
@@ -3761,17 +3813,17 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3761
3813
|
}, se = (w) => w == "default" ? null : "vs-dark";
|
3762
3814
|
return Le.init().then((w) => {
|
3763
3815
|
m = w, J(w);
|
3764
|
-
}),
|
3816
|
+
}), K(() => B.theme, (w, f) => {
|
3765
3817
|
let S = se(w);
|
3766
3818
|
m.editor.setTheme(S);
|
3767
|
-
}),
|
3819
|
+
}), K(() => n.value, (w, f) => {
|
3768
3820
|
u && m.editor.setModelLanguage(u, w), d && m.editor.setModelLanguage(d, w);
|
3769
|
-
}),
|
3821
|
+
}), K(() => i.value, (w, f) => {
|
3770
3822
|
if (!u)
|
3771
3823
|
return;
|
3772
3824
|
let S = u.getValue();
|
3773
3825
|
w != S && u.setValue(w ?? "");
|
3774
|
-
}),
|
3826
|
+
}), K(() => o.value, (w, f) => {
|
3775
3827
|
if (!d)
|
3776
3828
|
return;
|
3777
3829
|
let S = d.getValue();
|
@@ -3783,7 +3835,7 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3783
3835
|
style: fe(D(j))
|
3784
3836
|
}, null, 4));
|
3785
3837
|
}
|
3786
|
-
}),
|
3838
|
+
}), ss = /* @__PURE__ */ le({
|
3787
3839
|
__name: "Container",
|
3788
3840
|
props: {
|
3789
3841
|
container: { type: Boolean, default: !0 }
|
@@ -3791,15 +3843,15 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3791
3843
|
setup(c) {
|
3792
3844
|
let e = c, { container: t } = ae(e);
|
3793
3845
|
return (l, s) => (Q(), Z("div", {
|
3794
|
-
class:
|
3846
|
+
class: qe({ "ha-container": D(t) })
|
3795
3847
|
}, [
|
3796
3848
|
pe(l.$slots, "default")
|
3797
3849
|
], 2));
|
3798
3850
|
}
|
3799
|
-
}),
|
3851
|
+
}), Ll = { class: "ha-empty" }, Al = { class: "empty-message" }, Ul = {
|
3800
3852
|
key: 0,
|
3801
3853
|
class: "empty-content"
|
3802
|
-
},
|
3854
|
+
}, ns = /* @__PURE__ */ le({
|
3803
3855
|
__name: "Empty",
|
3804
3856
|
props: {
|
3805
3857
|
message: { type: String, default: "暂无数据" },
|
@@ -3807,20 +3859,20 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3807
3859
|
},
|
3808
3860
|
setup(c) {
|
3809
3861
|
let e = c, { message: t, hasData: l } = ae(e);
|
3810
|
-
return (s, n) => (Q(), Z("div",
|
3811
|
-
he("div",
|
3812
|
-
D(l) ? (Q(), Z("div",
|
3862
|
+
return (s, n) => (Q(), Z("div", Ll, [
|
3863
|
+
he("div", Al, et(D(t)), 1),
|
3864
|
+
D(l) ? (Q(), Z("div", Ul, [
|
3813
3865
|
pe(s.$slots, "default")
|
3814
3866
|
])) : tt("", !0)
|
3815
3867
|
]));
|
3816
3868
|
}
|
3817
|
-
}),
|
3869
|
+
}), rs = /* @__PURE__ */ le({
|
3818
3870
|
__name: "Progress",
|
3819
3871
|
props: {
|
3820
3872
|
modelValue: Boolean
|
3821
3873
|
},
|
3822
3874
|
setup(c) {
|
3823
|
-
let e = c, { modelValue: t } = ae(e), l =
|
3875
|
+
let e = c, { modelValue: t } = ae(e), l = R(!0), s = R(0), n = null, i = () => {
|
3824
3876
|
s.value = 0, l.value = !0, n = setInterval(() => {
|
3825
3877
|
if (s.value < 100) {
|
3826
3878
|
s.value++;
|
@@ -3840,7 +3892,7 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3840
3892
|
t.value && i();
|
3841
3893
|
}), Oe(() => {
|
3842
3894
|
clearInterval(n);
|
3843
|
-
}),
|
3895
|
+
}), K(() => t.value, (a, u) => {
|
3844
3896
|
a ? i() : o();
|
3845
3897
|
}), (a, u) => D(l) ? (Q(), Z("div", {
|
3846
3898
|
key: 0,
|
@@ -3848,25 +3900,25 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3848
3900
|
style: fe({ width: D(s) + "%" })
|
3849
3901
|
}, null, 4)) : tt("", !0);
|
3850
3902
|
}
|
3851
|
-
}),
|
3852
|
-
|
3853
|
-
],
|
3903
|
+
}), jl = { class: "ha-rich-text" }, Bl = /* @__PURE__ */ wt('<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), $l = [
|
3904
|
+
Bl
|
3905
|
+
], is = /* @__PURE__ */ le({
|
3854
3906
|
__name: "RichText",
|
3855
|
-
props: /* @__PURE__ */
|
3907
|
+
props: /* @__PURE__ */ Ye({
|
3856
3908
|
options: {}
|
3857
3909
|
}, {
|
3858
3910
|
modelValue: {},
|
3859
3911
|
modelModifiers: {}
|
3860
3912
|
}),
|
3861
|
-
emits: /* @__PURE__ */
|
3913
|
+
emits: /* @__PURE__ */ Ye(["change", "scroll"], ["update:modelValue"]),
|
3862
3914
|
setup(c, { expose: e, emit: t }) {
|
3863
|
-
let l = t, s = c, { options: n } = ae(s), i =
|
3864
|
-
let C = te.getDateString(), T = getSelection(),
|
3865
|
-
if (
|
3866
|
-
|
3915
|
+
let l = t, s = c, { options: n } = ae(s), i = mt(c, "modelValue"), o = null, a = null, u = null, d = !1, h = !1, g = R(), m = R(), E = R(), j = R(!1), J = R({ style: null, options: { scrollTop: 0 } }), se = (v) => {
|
3916
|
+
let C = te.getDateString(), T = getSelection(), A = T.getRangeAt(0), z = A.startContainer;
|
3917
|
+
if (z.nodeName == "#text")
|
3918
|
+
z.insertData(A.startOffset, C), A.setStart(z, A.startOffset + C.length), T.removeAllRanges(), T.addRange(A);
|
3867
3919
|
else {
|
3868
3920
|
let _ = document.createTextNode(C);
|
3869
|
-
|
3921
|
+
z.appendChild(_);
|
3870
3922
|
let ee = document.createRange();
|
3871
3923
|
ee.selectNodeContents(_), ee.setStart(_, ee.startOffset + C.length), T.removeAllRanges(), T.addRange(ee);
|
3872
3924
|
}
|
@@ -3876,9 +3928,9 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3876
3928
|
return;
|
3877
3929
|
}
|
3878
3930
|
u = v, l("scroll", v);
|
3879
|
-
}, f = () => `height: calc(100% - ${
|
3931
|
+
}, f = () => `height: calc(100% - ${N.getHeight(m.value)}px)`;
|
3880
3932
|
return (async () => {
|
3881
|
-
await (await
|
3933
|
+
await (await P.cdn.createIfAbsent("Default")).loadAsync("Quill"), import("quill").then((C) => {
|
3882
3934
|
let T = C.default;
|
3883
3935
|
o = new T(g.value, {
|
3884
3936
|
modules: {
|
@@ -3888,30 +3940,30 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3888
3940
|
}
|
3889
3941
|
},
|
3890
3942
|
theme: "snow"
|
3891
|
-
}), j.value = !0,
|
3943
|
+
}), j.value = !0, Qe(() => {
|
3892
3944
|
J.value.style = f();
|
3893
|
-
}), n.value.readonly && o.disable(), a = g.value.querySelector(".ql-editor"), a.innerHTML = i.value, J.value.options.scrollTop = n.value.scrollTop, o.on("text-change", (
|
3945
|
+
}), n.value.readonly && o.disable(), a = g.value.querySelector(".ql-editor"), a.innerHTML = i.value, J.value.options.scrollTop = n.value.scrollTop, o.on("text-change", (A, z, _) => {
|
3894
3946
|
a.innerHTML != i.value && (d = !0, i.value = a.innerHTML);
|
3895
|
-
}), a.addEventListener("paste", (
|
3947
|
+
}), a.addEventListener("paste", (A) => {
|
3896
3948
|
h = !0;
|
3897
3949
|
});
|
3898
3950
|
});
|
3899
3951
|
})(), Oe(() => {
|
3900
3952
|
o = null;
|
3901
|
-
}),
|
3953
|
+
}), K(() => i.value, (v, C) => {
|
3902
3954
|
a.innerHTML != v && (a.innerHTML = v);
|
3903
|
-
}),
|
3904
|
-
v != null && (u == null ? void 0 : u.scrollTop) != v &&
|
3955
|
+
}), K(() => n.value.scrollTop, (v, C) => {
|
3956
|
+
v != null && (u == null ? void 0 : u.scrollTop) != v && Qe(() => {
|
3905
3957
|
J.value.options.scrollTop = v;
|
3906
3958
|
});
|
3907
|
-
}), e({}), (v, C) => (Q(), Z("div",
|
3908
|
-
|
3959
|
+
}), e({}), (v, C) => (Q(), Z("div", jl, [
|
3960
|
+
yt(he("div", {
|
3909
3961
|
ref_key: "toolbarRef",
|
3910
3962
|
ref: m
|
3911
|
-
},
|
3912
|
-
[
|
3963
|
+
}, $l, 512), [
|
3964
|
+
[vt, D(j)]
|
3913
3965
|
]),
|
3914
|
-
|
3966
|
+
bt(D(Nl), {
|
3915
3967
|
ref_key: "scrollerRef",
|
3916
3968
|
ref: E,
|
3917
3969
|
class: "ql-body",
|
@@ -3929,32 +3981,32 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3929
3981
|
}, 8, ["options", "onScroll", "style"])
|
3930
3982
|
]));
|
3931
3983
|
}
|
3932
|
-
}),
|
3984
|
+
}), os = /* @__PURE__ */ le({
|
3933
3985
|
__name: "Row",
|
3934
3986
|
props: {
|
3935
3987
|
gap: {},
|
3936
3988
|
direction: {}
|
3937
3989
|
},
|
3938
3990
|
setup(c) {
|
3939
|
-
let e = c, { gap: t, direction: l } = ae(e), s =
|
3991
|
+
let e = c, { gap: t, direction: l } = ae(e), s = xt(() => {
|
3940
3992
|
let n = { gap: null };
|
3941
3993
|
return t.value && (n.gap = t.value + "px"), n;
|
3942
3994
|
});
|
3943
3995
|
return (n, i) => (Q(), Z("div", {
|
3944
|
-
class:
|
3996
|
+
class: qe(["ha-row", D(l)]),
|
3945
3997
|
style: fe(D(s))
|
3946
3998
|
}, [
|
3947
3999
|
pe(n.$slots, "default")
|
3948
4000
|
], 6));
|
3949
4001
|
}
|
3950
|
-
}),
|
4002
|
+
}), Nl = /* @__PURE__ */ le({
|
3951
4003
|
__name: "Scroller",
|
3952
4004
|
props: {
|
3953
4005
|
options: {}
|
3954
4006
|
},
|
3955
4007
|
emits: ["scroll"],
|
3956
4008
|
setup(c, { expose: e, emit: t }) {
|
3957
|
-
let l = t, s = c, { options: n } = ae(s), i =
|
4009
|
+
let l = t, s = c, { options: n } = ae(s), i = R(), o = R(), a = R(), u = R(), d = R(!1), h = null, g = null, m = new at(), E = R({ top: null, height: null }), j = (p) => {
|
3958
4010
|
if (g == 0)
|
3959
4011
|
return 0;
|
3960
4012
|
let y = g - h;
|
@@ -3974,8 +4026,8 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3974
4026
|
let y = h * p;
|
3975
4027
|
return Se.between(y, 80, 500);
|
3976
4028
|
}, f = (p, y) => {
|
3977
|
-
let I = j(p),
|
3978
|
-
return Se.between(
|
4029
|
+
let I = j(p), F = (h - y) * I;
|
4030
|
+
return Se.between(F, 0, h - y);
|
3979
4031
|
}, S = (p) => {
|
3980
4032
|
let y = w();
|
3981
4033
|
return { top: f(p, y), height: y };
|
@@ -3988,35 +4040,35 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
3988
4040
|
E.value.top = I * y;
|
3989
4041
|
let ge = (g - h) * y;
|
3990
4042
|
n.value.scrollTop = ge, o.value.scrollTop != ge && (o.value.scrollTop = ge);
|
3991
|
-
},
|
4043
|
+
}, A = () => {
|
3992
4044
|
let p = n.value.scrollTop;
|
3993
4045
|
E.value = S(p), C(p);
|
3994
|
-
},
|
3995
|
-
h =
|
4046
|
+
}, z = (p) => {
|
4047
|
+
h = N.getHeight(o.value), g = o.value.scrollHeight;
|
3996
4048
|
let y = w();
|
3997
4049
|
E.value.height = y, E.value.top = f(n.value.scrollTop, y);
|
3998
4050
|
}, _ = (p) => {
|
3999
4051
|
let y = p.target;
|
4000
4052
|
return parseInt(y.style.top);
|
4001
|
-
}, ee = (p, y, I,
|
4002
|
-
let ge = p.y - y.y,
|
4003
|
-
T(
|
4053
|
+
}, ee = (p, y, I, F) => {
|
4054
|
+
let ge = p.y - y.y, ut = I + ge, ct = J(ut);
|
4055
|
+
T(ct);
|
4004
4056
|
}, me = (p) => {
|
4005
4057
|
d.value = !0;
|
4006
4058
|
}, ye = (p) => {
|
4007
4059
|
d.value = !1;
|
4008
4060
|
};
|
4009
4061
|
return Pe(() => {
|
4010
|
-
|
4062
|
+
A(), m.scroll(o.value, se), m.drag(u.value, { init: _, handler: ee }), m.observe(o.value, z), m.mouseDown(u.value, me, ye);
|
4011
4063
|
}), Oe(() => {
|
4012
4064
|
m.dispose();
|
4013
|
-
}),
|
4065
|
+
}), K(() => n.value.scrollTop, (p, y) => {
|
4014
4066
|
let I = j(p);
|
4015
4067
|
T(I);
|
4016
|
-
}), e({ scrollTo: C, update:
|
4068
|
+
}), e({ scrollTo: C, update: A }), (p, y) => (Q(), Z("div", {
|
4017
4069
|
ref_key: "scrollerRef",
|
4018
4070
|
ref: i,
|
4019
|
-
class:
|
4071
|
+
class: qe(["ha-scroller", { hover: D(d) }])
|
4020
4072
|
}, [
|
4021
4073
|
he("div", {
|
4022
4074
|
ref_key: "containerRef",
|
@@ -4042,95 +4094,76 @@ const cs = /* @__PURE__ */ jl(Bl, [["render", Nl]]), ds = /* @__PURE__ */ le({
|
|
4042
4094
|
], 2));
|
4043
4095
|
}
|
4044
4096
|
});
|
4045
|
-
let
|
4046
|
-
|
4047
|
-
let e = await
|
4048
|
-
await
|
4097
|
+
let as = async (c) => {
|
4098
|
+
Ct(c), await El();
|
4099
|
+
let e = await xl.getSso(), t = { baseUrl: ke.api.url, language: B.language, user: e, platform: "pc" }, l = oe.stringify(t);
|
4100
|
+
await q.open(l), q.onResponse = (s) => {
|
4049
4101
|
let n = s.data;
|
4050
|
-
return
|
4102
|
+
return bl.add(n.code, n.message, n.stack, n.elapsed), Promise.resolve();
|
4051
4103
|
};
|
4052
4104
|
};
|
4053
4105
|
export {
|
4054
4106
|
xe as ArrayHelper,
|
4055
|
-
|
4056
|
-
|
4057
|
-
|
4058
|
-
|
4059
|
-
|
4060
|
-
Rl as DragEvent,
|
4061
|
-
W as DriverFactory,
|
4062
|
-
Kt as EncoderFactory,
|
4107
|
+
It as BrowserHelper,
|
4108
|
+
Dt as ComponentHelper,
|
4109
|
+
Ae as DictionaryHelper,
|
4110
|
+
N as DomHelper,
|
4111
|
+
Cl as DragEvent,
|
4063
4112
|
ne as EventHelper,
|
4064
|
-
|
4065
|
-
|
4066
|
-
Xt as ExplainerFactory,
|
4067
|
-
Sl as FeatureFactory,
|
4113
|
+
at as EventUtility,
|
4114
|
+
P as Factories,
|
4068
4115
|
Ue as FileHelper,
|
4069
|
-
|
4070
|
-
|
4071
|
-
|
4072
|
-
|
4073
|
-
|
4074
|
-
|
4075
|
-
|
4076
|
-
|
4077
|
-
|
4078
|
-
|
4079
|
-
|
4080
|
-
|
4081
|
-
Lt as HtmlHelper,
|
4082
|
-
_t as HttpFactory,
|
4116
|
+
es as HaCode,
|
4117
|
+
ts as HaCol,
|
4118
|
+
ls as HaCompare,
|
4119
|
+
ss as HaContainer,
|
4120
|
+
ns as HaEmpty,
|
4121
|
+
Dl as HaFill,
|
4122
|
+
rs as HaProgress,
|
4123
|
+
is as HaRichText,
|
4124
|
+
os as HaRow,
|
4125
|
+
Nl as HaScroller,
|
4126
|
+
Ut as HaloHttp,
|
4127
|
+
Xe as HtmlHelper,
|
4083
4128
|
nt as HttpRequest,
|
4084
4129
|
Ze as HttpResponse,
|
4085
|
-
|
4130
|
+
Ot as ImageHelper,
|
4086
4131
|
oe as JsonHelper,
|
4087
|
-
|
4132
|
+
Hl as KeyboardUtility,
|
4088
4133
|
Se as MathHelper,
|
4089
|
-
|
4134
|
+
Tt as MicroHelper,
|
4090
4135
|
je as MountHelper,
|
4091
|
-
|
4136
|
+
Zl as MouseUtility,
|
4092
4137
|
ie as ObjectHelper,
|
4093
|
-
|
4094
|
-
|
4095
|
-
as as Range,
|
4138
|
+
ot as Position,
|
4139
|
+
_l as Range,
|
4096
4140
|
Be as ScriptHelper,
|
4097
4141
|
Ge as ScrollHelper,
|
4098
|
-
|
4099
|
-
|
4100
|
-
|
4101
|
-
|
4102
|
-
M as StringHelper,
|
4142
|
+
Rt as SignHelper,
|
4143
|
+
W as StorageHelper,
|
4144
|
+
V as StringHelper,
|
4145
|
+
Xl as SvcFactory,
|
4103
4146
|
ve as TaskHelper,
|
4104
4147
|
te as TimeHelper,
|
4105
4148
|
$e as TreeHelper,
|
4106
4149
|
L as TypeHelper,
|
4107
4150
|
$ as UrlHelper,
|
4108
|
-
|
4109
|
-
it as cdnFactory,
|
4151
|
+
kl as base64,
|
4110
4152
|
B as configSvc,
|
4111
|
-
|
4112
|
-
|
4113
|
-
Tl as encoderFactory,
|
4153
|
+
as as createFe,
|
4154
|
+
Gl as driverSvc,
|
4114
4155
|
He as envSvc,
|
4115
|
-
|
4116
|
-
|
4117
|
-
|
4118
|
-
|
4119
|
-
N as http,
|
4120
|
-
at as httpFactory,
|
4121
|
-
Ll as initDriver,
|
4122
|
-
It as initMessenger,
|
4123
|
-
ts as loadEcharts,
|
4156
|
+
q as http,
|
4157
|
+
El as initDriver,
|
4158
|
+
Ct as initMessenger,
|
4159
|
+
Ql as loadEcharts,
|
4124
4160
|
Le as loader,
|
4125
|
-
|
4126
|
-
|
4161
|
+
bl as logSvc,
|
4162
|
+
it as md5,
|
4127
4163
|
we as messenger,
|
4128
4164
|
X as moment,
|
4129
|
-
Je as providerFactory,
|
4130
4165
|
ke as settingRepo,
|
4131
4166
|
ue as settingSvc,
|
4132
|
-
|
4133
|
-
|
4134
|
-
ut as ssoFactory,
|
4135
|
-
yl as userSvc
|
4167
|
+
wl as socketSvc,
|
4168
|
+
xl as userSvc
|
4136
4169
|
};
|