@das-fed/utils 1.0.9 → 6.3.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/api-services/index.d.ts +2 -1
  2. package/api-services/index.js +3 -2
  3. package/api-services/modules/app-manage.js +1 -1
  4. package/api-services/modules/authentication.js +1 -1
  5. package/api-services/modules/bems.js +1 -1
  6. package/api-services/modules/contract.js +1 -1
  7. package/api-services/modules/duty-manage.js +1 -1
  8. package/api-services/modules/enterpriseright.js +1 -1
  9. package/api-services/modules/file.d.ts +1 -1
  10. package/api-services/modules/file.js +355 -342
  11. package/api-services/modules/gateway-edge.js +1 -1
  12. package/api-services/modules/iot.js +1 -1
  13. package/api-services/modules/justauth.js +1 -1
  14. package/api-services/modules/knowledge.js +1 -1
  15. package/api-services/modules/link.js +1 -1
  16. package/api-services/modules/permission.js +1 -1
  17. package/api-services/modules/platformManage.js +1 -1
  18. package/api-services/modules/portal.js +1 -1
  19. package/api-services/modules/space-manage.js +1 -1
  20. package/api-services/modules/super-admin.js +1 -1
  21. package/api-services/modules/supplier.js +1 -1
  22. package/api-services/modules/supplychain-manage.js +1 -1
  23. package/api-services/modules/systemConfiguration.js +1 -1
  24. package/api-services/modules/tool.js +1 -1
  25. package/api-services/src/create-service.d.ts +1 -1
  26. package/api-services/src/create-service.js +2 -3234
  27. package/common-info/{setInfoFromUrl.d.ts → getInfoFromUrl.d.ts} +1 -1
  28. package/common-info/{setInfoFromUrl.js → getInfoFromUrl.js} +26 -29
  29. package/common-info/index.d.ts +17 -6
  30. package/common-info/index.js +82 -131
  31. package/{api-services/src/sso.js → common-info/set-personal-info.js} +754 -667
  32. package/common-tools/get-url-params.d.ts +21 -8
  33. package/common-tools/get-url-params.js +26 -15
  34. package/common-tools/index.d.ts +2 -0
  35. package/common-tools/index.js +2 -0
  36. package/common-tools/obj-tools.d.ts +1 -1
  37. package/common-tools/platform-tools.d.ts +18 -0
  38. package/common-tools/platform-tools.js +15 -0
  39. package/common-tools/setHtmlMinWH.js +8 -4
  40. package/common-tools/update-fav-icon.d.ts +10 -0
  41. package/common-tools/update-fav-icon.js +22 -0
  42. package/create-api-service/index.d.ts +1 -0
  43. package/create-api-service/index.js +3492 -0
  44. package/create-api-service/proxy-sso.d.ts +3 -0
  45. package/create-api-service/proxy-sso.js +21 -0
  46. package/create-api-service/sso.d.ts +23 -0
  47. package/create-api-service/sso.js +1969 -0
  48. package/curring-http/index.d.ts +3 -2
  49. package/curring-http/index.js +2872 -2662
  50. package/dimple-canvas/index.d.ts +1 -0
  51. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +1 -0
  52. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +2244 -2265
  53. package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +4 -3
  54. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +2 -1
  55. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +2 -1
  56. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +2 -1
  57. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +2 -1
  58. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +1079 -1051
  59. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +2 -1
  60. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +3 -2
  61. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +2 -1
  62. package/dimple-canvas/use-dimple-canvas/index.d.ts +2 -1
  63. package/directive/auth.js +21 -21
  64. package/directive/clickOutside.d.ts +3 -2
  65. package/directive/hoverInside.d.ts +2 -1
  66. package/dom-check-in/index.js +5 -5
  67. package/hooks/popup-manager/use-zindex.js +8 -8
  68. package/hooks/use-get-auth/apis.d.ts +4 -0
  69. package/hooks/use-get-auth/apis.js +8 -0
  70. package/hooks/use-get-auth/index.d.ts +9 -0
  71. package/hooks/use-get-auth/index.js +57 -0
  72. package/nextTiken/index.d.ts +3 -4
  73. package/nextTiken/index.js +34 -46
  74. package/package.json +7 -4
  75. package/pinyin-first-character/index.js +19792 -20877
  76. package/process-engine-info/index.d.ts +5 -2
  77. package/process-engine-info/index.js +11 -6
  78. package/style/index.js +1 -1
  79. package/style/style.d.ts +2 -1
  80. package/style/style.js +1 -1
  81. package/token-tools/index.d.ts +10 -7
  82. package/token-tools/index.js +44 -59
  83. package/use-low-code/index.d.ts +1 -0
  84. package/use-low-code/index.js +70 -0
  85. package/use-low-code/low-code-iframe.vue.d.ts +2 -0
  86. package/use-low-code/style.css +1 -0
  87. package/webSocket-service/index.d.ts +2 -1
  88. package/with-install/index.d.ts +2 -1
  89. package/api-services/src/sso.d.ts +0 -29
  90. package/api-services/src/util.d.ts +0 -1
  91. package/api-services/src/util.js +0 -1466
  92. package/common-info/set-common-info.d.ts +0 -45
  93. package/common-info/set-common-info.js +0 -103
  94. package/common-tools/throttled.d.ts +0 -7
  95. package/common-tools/throttled.js +0 -10
  96. package/micro-app/globalData.d.ts +0 -3
  97. package/micro-app/globalData.js +0 -11
  98. package/micro-app/index.d.ts +0 -5
  99. package/micro-app/index.js +0 -3699
  100. package/panel/index.d.ts +0 -31
  101. package/panel/index.js +0 -37
  102. package/set-personal-info/index.js +0 -1468
  103. /package/{set-personal-info/index.d.ts → common-info/set-personal-info.d.ts} +0 -0
@@ -1,456 +1,469 @@
1
- import { createService as _ } from "@das-fed/utils/api-services";
2
- import { ref as U } from "vue";
3
- const C = "v1";
4
- _(`/api/iot/${C}`);
5
- _(`/api/iot-device/thingmodel/${C}`), _(`/api/iot-device/devicemanage/${C}`), _(`/api/iot-device/product/${C}`), _(`/api/iot-device/product-storage/${C}`);
6
- _(`/api/device-relation/deviceproject/${C}`), _(`/api/device-relation/devicerule/${C}`), _(`/api/device-relation/project/${C}`);
7
- const X = _(`/api/oss/minio/${C}`), re = _(`/api/progress/accessor/${C}`);
8
- let ne = (l = 21) => {
9
- let f = "", m = crypto.getRandomValues(new Uint8Array(l));
1
+ import { iotMinio as G, iotProgress as te } from "@das-fed/utils/api-services/modules/iot";
2
+ import { ref as C } from "vue";
3
+ import { getConfig as Q } from "@das-fed/utils/config";
4
+ let re = (l = 21) => {
5
+ let v = "", $ = crypto.getRandomValues(new Uint8Array(l));
10
6
  for (; l--; ) {
11
- let c = m[l] & 63;
12
- c < 36 ? f += c.toString(36) : c < 62 ? f += (c - 26).toString(36).toUpperCase() : c < 63 ? f += "_" : f += "-";
7
+ let c = $[l] & 63;
8
+ c < 36 ? v += c.toString(36) : c < 62 ? v += (c - 26).toString(36).toUpperCase() : c < 63 ? v += "_" : v += "-";
13
9
  }
14
- return f;
10
+ return v;
15
11
  };
16
- var ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
17
- function ie(l) {
12
+ var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
13
+ function ne(l) {
18
14
  return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
19
15
  }
20
- var se = { exports: {} };
21
- (function(l, f) {
22
- (function(m, c) {
16
+ var ee = { exports: {} };
17
+ (function(l, v) {
18
+ (function($, c) {
23
19
  l.exports = c();
24
- })(ae, function() {
25
- var m = 1e3, c = 6e4, k = 36e5, y = "millisecond", D = "second", M = "minute", j = "hour", w = "day", P = "week", S = "month", W = "quarter", x = "year", Y = "date", J = "Invalid Date", V = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, G = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Q = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
26
- var t = ["th", "st", "nd", "rd"], e = s % 100;
27
- return "[" + s + (t[(e - 20) % 10] || t[e] || t[0]) + "]";
28
- } }, E = function(s, t, e) {
29
- var n = String(s);
30
- return !n || n.length >= t ? s : "" + Array(t + 1 - n.length).join(e) + s;
31
- }, z = { s: E, z: function(s) {
32
- var t = -s.utcOffset(), e = Math.abs(t), n = Math.floor(e / 60), r = e % 60;
33
- return (t <= 0 ? "+" : "-") + E(n, 2, "0") + ":" + E(r, 2, "0");
34
- }, m: function s(t, e) {
35
- if (t.date() < e.date())
36
- return -s(e, t);
37
- var n = 12 * (e.year() - t.year()) + (e.month() - t.month()), r = t.clone().add(n, S), a = e - r < 0, i = t.clone().add(n + (a ? -1 : 1), S);
38
- return +(-(n + (e - r) / (a ? r - i : i - r)) || 0);
39
- }, a: function(s) {
40
- return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
41
- }, p: function(s) {
42
- return { M: S, y: x, w: P, d: w, D: Y, h: j, m: M, s: D, ms: y, Q: W }[s] || String(s || "").toLowerCase().replace(/s$/, "");
43
- }, u: function(s) {
44
- return s === void 0;
45
- } }, I = "en", R = {};
46
- R[I] = Q;
47
- var K = "$isDayjsObject", Z = function(s) {
48
- return s instanceof v || !(!s || !s[K]);
49
- }, d = function s(t, e, n) {
50
- var r;
51
- if (!t)
20
+ })(se, function() {
21
+ var $ = 1e3, c = 6e4, j = 36e5, M = "millisecond", T = "second", b = "minute", _ = "hour", y = "day", Y = "week", D = "month", R = "quarter", k = "year", P = "date", B = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Z = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, F = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t) {
22
+ var r = ["th", "st", "nd", "rd"], e = t % 100;
23
+ return "[" + t + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
24
+ } }, E = function(t, r, e) {
25
+ var n = String(t);
26
+ return !n || n.length >= r ? t : "" + Array(r + 1 - n.length).join(e) + t;
27
+ }, z = { s: E, z: function(t) {
28
+ var r = -t.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), s = e % 60;
29
+ return (r <= 0 ? "+" : "-") + E(n, 2, "0") + ":" + E(s, 2, "0");
30
+ }, m: function t(r, e) {
31
+ if (r.date() < e.date())
32
+ return -t(e, r);
33
+ var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), s = r.clone().add(n, D), i = e - s < 0, u = r.clone().add(n + (i ? -1 : 1), D);
34
+ return +(-(n + (e - s) / (i ? s - u : u - s)) || 0);
35
+ }, a: function(t) {
36
+ return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
37
+ }, p: function(t) {
38
+ return { M: D, y: k, w: Y, d: y, D: P, h: _, m: b, s: T, ms: M, Q: R }[t] || String(t || "").toLowerCase().replace(/s$/, "");
39
+ }, u: function(t) {
40
+ return t === void 0;
41
+ } }, I = "en", H = {};
42
+ H[I] = F;
43
+ var W = "$isDayjsObject", J = function(t) {
44
+ return t instanceof h || !(!t || !t[W]);
45
+ }, f = function t(r, e, n) {
46
+ var s;
47
+ if (!r)
52
48
  return I;
53
- if (typeof t == "string") {
54
- var a = t.toLowerCase();
55
- R[a] && (r = a), e && (R[a] = e, r = a);
56
- var i = t.split("-");
57
- if (!r && i.length > 1)
58
- return s(i[0]);
49
+ if (typeof r == "string") {
50
+ var i = r.toLowerCase();
51
+ H[i] && (s = i), e && (H[i] = e, s = i);
52
+ var u = r.split("-");
53
+ if (!s && u.length > 1)
54
+ return t(u[0]);
59
55
  } else {
60
- var p = t.name;
61
- R[p] = t, r = p;
56
+ var d = r.name;
57
+ H[d] = r, s = d;
62
58
  }
63
- return !n && r && (I = r), r || !n && I;
64
- }, o = function(s, t) {
65
- if (Z(s))
66
- return s.clone();
67
- var e = typeof t == "object" ? t : {};
68
- return e.date = s, e.args = arguments, new v(e);
69
- }, u = z;
70
- u.l = d, u.i = Z, u.w = function(s, t) {
71
- return o(s, { locale: t.$L, utc: t.$u, x: t.$x, $offset: t.$offset });
59
+ return !n && s && (I = s), s || !n && I;
60
+ }, a = function(t, r) {
61
+ if (J(t))
62
+ return t.clone();
63
+ var e = typeof r == "object" ? r : {};
64
+ return e.date = t, e.args = arguments, new h(e);
65
+ }, o = z;
66
+ o.l = f, o.i = J, o.w = function(t, r) {
67
+ return a(t, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
72
68
  };
73
- var v = function() {
74
- function s(e) {
75
- this.$L = d(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[K] = !0;
69
+ var h = function() {
70
+ function t(e) {
71
+ this.$L = f(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[W] = !0;
76
72
  }
77
- var t = s.prototype;
78
- return t.parse = function(e) {
73
+ var r = t.prototype;
74
+ return r.parse = function(e) {
79
75
  this.$d = function(n) {
80
- var r = n.date, a = n.utc;
81
- if (r === null)
76
+ var s = n.date, i = n.utc;
77
+ if (s === null)
82
78
  return /* @__PURE__ */ new Date(NaN);
83
- if (u.u(r))
79
+ if (o.u(s))
84
80
  return /* @__PURE__ */ new Date();
85
- if (r instanceof Date)
86
- return new Date(r);
87
- if (typeof r == "string" && !/Z$/i.test(r)) {
88
- var i = r.match(V);
89
- if (i) {
90
- var p = i[2] - 1 || 0, h = (i[7] || "0").substring(0, 3);
91
- return a ? new Date(Date.UTC(i[1], p, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, h)) : new Date(i[1], p, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, h);
81
+ if (s instanceof Date)
82
+ return new Date(s);
83
+ if (typeof s == "string" && !/Z$/i.test(s)) {
84
+ var u = s.match(q);
85
+ if (u) {
86
+ var d = u[2] - 1 || 0, p = (u[7] || "0").substring(0, 3);
87
+ return i ? new Date(Date.UTC(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, p)) : new Date(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, p);
92
88
  }
93
89
  }
94
- return new Date(r);
90
+ return new Date(s);
95
91
  }(e), this.init();
96
- }, t.init = function() {
92
+ }, r.init = function() {
97
93
  var e = this.$d;
98
94
  this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
99
- }, t.$utils = function() {
100
- return u;
101
- }, t.isValid = function() {
102
- return this.$d.toString() !== J;
103
- }, t.isSame = function(e, n) {
104
- var r = o(e);
105
- return this.startOf(n) <= r && r <= this.endOf(n);
106
- }, t.isAfter = function(e, n) {
107
- return o(e) < this.startOf(n);
108
- }, t.isBefore = function(e, n) {
109
- return this.endOf(n) < o(e);
110
- }, t.$g = function(e, n, r) {
111
- return u.u(e) ? this[n] : this.set(r, e);
112
- }, t.unix = function() {
95
+ }, r.$utils = function() {
96
+ return o;
97
+ }, r.isValid = function() {
98
+ return this.$d.toString() !== B;
99
+ }, r.isSame = function(e, n) {
100
+ var s = a(e);
101
+ return this.startOf(n) <= s && s <= this.endOf(n);
102
+ }, r.isAfter = function(e, n) {
103
+ return a(e) < this.startOf(n);
104
+ }, r.isBefore = function(e, n) {
105
+ return this.endOf(n) < a(e);
106
+ }, r.$g = function(e, n, s) {
107
+ return o.u(e) ? this[n] : this.set(s, e);
108
+ }, r.unix = function() {
113
109
  return Math.floor(this.valueOf() / 1e3);
114
- }, t.valueOf = function() {
110
+ }, r.valueOf = function() {
115
111
  return this.$d.getTime();
116
- }, t.startOf = function(e, n) {
117
- var r = this, a = !!u.u(n) || n, i = u.p(e), p = function(N, T) {
118
- var B = u.w(r.$u ? Date.UTC(r.$y, T, N) : new Date(r.$y, T, N), r);
119
- return a ? B : B.endOf(w);
120
- }, h = function(N, T) {
121
- return u.w(r.toDate()[N].apply(r.toDate("s"), (a ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(T)), r);
122
- }, $ = this.$W, g = this.$M, b = this.$D, L = "set" + (this.$u ? "UTC" : "");
123
- switch (i) {
124
- case x:
125
- return a ? p(1, 0) : p(31, 11);
126
- case S:
127
- return a ? p(1, g) : p(0, g + 1);
128
- case P:
129
- var O = this.$locale().weekStart || 0, H = ($ < O ? $ + 7 : $) - O;
130
- return p(a ? b - H : b + (6 - H), g);
131
- case w:
132
- case Y:
133
- return h(L + "Hours", 0);
134
- case j:
135
- return h(L + "Minutes", 1);
136
- case M:
137
- return h(L + "Seconds", 2);
112
+ }, r.startOf = function(e, n) {
113
+ var s = this, i = !!o.u(n) || n, u = o.p(e), d = function(L, x) {
114
+ var N = o.w(s.$u ? Date.UTC(s.$y, x, L) : new Date(s.$y, x, L), s);
115
+ return i ? N : N.endOf(y);
116
+ }, p = function(L, x) {
117
+ return o.w(s.toDate()[L].apply(s.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(x)), s);
118
+ }, m = this.$W, g = this.$M, w = this.$D, A = "set" + (this.$u ? "UTC" : "");
119
+ switch (u) {
120
+ case k:
121
+ return i ? d(1, 0) : d(31, 11);
138
122
  case D:
139
- return h(L + "Milliseconds", 3);
123
+ return i ? d(1, g) : d(0, g + 1);
124
+ case Y:
125
+ var O = this.$locale().weekStart || 0, U = (m < O ? m + 7 : m) - O;
126
+ return d(i ? w - U : w + (6 - U), g);
127
+ case y:
128
+ case P:
129
+ return p(A + "Hours", 0);
130
+ case _:
131
+ return p(A + "Minutes", 1);
132
+ case b:
133
+ return p(A + "Seconds", 2);
134
+ case T:
135
+ return p(A + "Milliseconds", 3);
140
136
  default:
141
137
  return this.clone();
142
138
  }
143
- }, t.endOf = function(e) {
139
+ }, r.endOf = function(e) {
144
140
  return this.startOf(e, !1);
145
- }, t.$set = function(e, n) {
146
- var r, a = u.p(e), i = "set" + (this.$u ? "UTC" : ""), p = (r = {}, r[w] = i + "Date", r[Y] = i + "Date", r[S] = i + "Month", r[x] = i + "FullYear", r[j] = i + "Hours", r[M] = i + "Minutes", r[D] = i + "Seconds", r[y] = i + "Milliseconds", r)[a], h = a === w ? this.$D + (n - this.$W) : n;
147
- if (a === S || a === x) {
148
- var $ = this.clone().set(Y, 1);
149
- $.$d[p](h), $.init(), this.$d = $.set(Y, Math.min(this.$D, $.daysInMonth())).$d;
141
+ }, r.$set = function(e, n) {
142
+ var s, i = o.p(e), u = "set" + (this.$u ? "UTC" : ""), d = (s = {}, s[y] = u + "Date", s[P] = u + "Date", s[D] = u + "Month", s[k] = u + "FullYear", s[_] = u + "Hours", s[b] = u + "Minutes", s[T] = u + "Seconds", s[M] = u + "Milliseconds", s)[i], p = i === y ? this.$D + (n - this.$W) : n;
143
+ if (i === D || i === k) {
144
+ var m = this.clone().set(P, 1);
145
+ m.$d[d](p), m.init(), this.$d = m.set(P, Math.min(this.$D, m.daysInMonth())).$d;
150
146
  } else
151
- p && this.$d[p](h);
147
+ d && this.$d[d](p);
152
148
  return this.init(), this;
153
- }, t.set = function(e, n) {
149
+ }, r.set = function(e, n) {
154
150
  return this.clone().$set(e, n);
155
- }, t.get = function(e) {
156
- return this[u.p(e)]();
157
- }, t.add = function(e, n) {
158
- var r, a = this;
151
+ }, r.get = function(e) {
152
+ return this[o.p(e)]();
153
+ }, r.add = function(e, n) {
154
+ var s, i = this;
159
155
  e = Number(e);
160
- var i = u.p(n), p = function(g) {
161
- var b = o(a);
162
- return u.w(b.date(b.date() + Math.round(g * e)), a);
156
+ var u = o.p(n), d = function(g) {
157
+ var w = a(i);
158
+ return o.w(w.date(w.date() + Math.round(g * e)), i);
163
159
  };
164
- if (i === S)
165
- return this.set(S, this.$M + e);
166
- if (i === x)
167
- return this.set(x, this.$y + e);
168
- if (i === w)
169
- return p(1);
170
- if (i === P)
171
- return p(7);
172
- var h = (r = {}, r[M] = c, r[j] = k, r[D] = m, r)[i] || 1, $ = this.$d.getTime() + e * h;
173
- return u.w($, this);
174
- }, t.subtract = function(e, n) {
160
+ if (u === D)
161
+ return this.set(D, this.$M + e);
162
+ if (u === k)
163
+ return this.set(k, this.$y + e);
164
+ if (u === y)
165
+ return d(1);
166
+ if (u === Y)
167
+ return d(7);
168
+ var p = (s = {}, s[b] = c, s[_] = j, s[T] = $, s)[u] || 1, m = this.$d.getTime() + e * p;
169
+ return o.w(m, this);
170
+ }, r.subtract = function(e, n) {
175
171
  return this.add(-1 * e, n);
176
- }, t.format = function(e) {
177
- var n = this, r = this.$locale();
172
+ }, r.format = function(e) {
173
+ var n = this, s = this.$locale();
178
174
  if (!this.isValid())
179
- return r.invalidDate || J;
180
- var a = e || "YYYY-MM-DDTHH:mm:ssZ", i = u.z(this), p = this.$H, h = this.$m, $ = this.$M, g = r.weekdays, b = r.months, L = r.meridiem, O = function(T, B, q, F) {
181
- return T && (T[B] || T(n, a)) || q[B].slice(0, F);
182
- }, H = function(T) {
183
- return u.s(p % 12 || 12, T, "0");
184
- }, N = L || function(T, B, q) {
185
- var F = T < 12 ? "AM" : "PM";
186
- return q ? F.toLowerCase() : F;
175
+ return s.invalidDate || B;
176
+ var i = e || "YYYY-MM-DDTHH:mm:ssZ", u = o.z(this), d = this.$H, p = this.$m, m = this.$M, g = s.weekdays, w = s.months, A = s.meridiem, O = function(x, N, K, V) {
177
+ return x && (x[N] || x(n, i)) || K[N].slice(0, V);
178
+ }, U = function(x) {
179
+ return o.s(d % 12 || 12, x, "0");
180
+ }, L = A || function(x, N, K) {
181
+ var V = x < 12 ? "AM" : "PM";
182
+ return K ? V.toLowerCase() : V;
187
183
  };
188
- return a.replace(G, function(T, B) {
189
- return B || function(q) {
190
- switch (q) {
184
+ return i.replace(Z, function(x, N) {
185
+ return N || function(K) {
186
+ switch (K) {
191
187
  case "YY":
192
188
  return String(n.$y).slice(-2);
193
189
  case "YYYY":
194
- return u.s(n.$y, 4, "0");
190
+ return o.s(n.$y, 4, "0");
195
191
  case "M":
196
- return $ + 1;
192
+ return m + 1;
197
193
  case "MM":
198
- return u.s($ + 1, 2, "0");
194
+ return o.s(m + 1, 2, "0");
199
195
  case "MMM":
200
- return O(r.monthsShort, $, b, 3);
196
+ return O(s.monthsShort, m, w, 3);
201
197
  case "MMMM":
202
- return O(b, $);
198
+ return O(w, m);
203
199
  case "D":
204
200
  return n.$D;
205
201
  case "DD":
206
- return u.s(n.$D, 2, "0");
202
+ return o.s(n.$D, 2, "0");
207
203
  case "d":
208
204
  return String(n.$W);
209
205
  case "dd":
210
- return O(r.weekdaysMin, n.$W, g, 2);
206
+ return O(s.weekdaysMin, n.$W, g, 2);
211
207
  case "ddd":
212
- return O(r.weekdaysShort, n.$W, g, 3);
208
+ return O(s.weekdaysShort, n.$W, g, 3);
213
209
  case "dddd":
214
210
  return g[n.$W];
215
211
  case "H":
216
- return String(p);
212
+ return String(d);
217
213
  case "HH":
218
- return u.s(p, 2, "0");
214
+ return o.s(d, 2, "0");
219
215
  case "h":
220
- return H(1);
216
+ return U(1);
221
217
  case "hh":
222
- return H(2);
218
+ return U(2);
223
219
  case "a":
224
- return N(p, h, !0);
220
+ return L(d, p, !0);
225
221
  case "A":
226
- return N(p, h, !1);
222
+ return L(d, p, !1);
227
223
  case "m":
228
- return String(h);
224
+ return String(p);
229
225
  case "mm":
230
- return u.s(h, 2, "0");
226
+ return o.s(p, 2, "0");
231
227
  case "s":
232
228
  return String(n.$s);
233
229
  case "ss":
234
- return u.s(n.$s, 2, "0");
230
+ return o.s(n.$s, 2, "0");
235
231
  case "SSS":
236
- return u.s(n.$ms, 3, "0");
232
+ return o.s(n.$ms, 3, "0");
237
233
  case "Z":
238
- return i;
234
+ return u;
239
235
  }
240
236
  return null;
241
- }(T) || i.replace(":", "");
237
+ }(x) || u.replace(":", "");
242
238
  });
243
- }, t.utcOffset = function() {
239
+ }, r.utcOffset = function() {
244
240
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
245
- }, t.diff = function(e, n, r) {
246
- var a, i = this, p = u.p(n), h = o(e), $ = (h.utcOffset() - this.utcOffset()) * c, g = this - h, b = function() {
247
- return u.m(i, h);
241
+ }, r.diff = function(e, n, s) {
242
+ var i, u = this, d = o.p(n), p = a(e), m = (p.utcOffset() - this.utcOffset()) * c, g = this - p, w = function() {
243
+ return o.m(u, p);
248
244
  };
249
- switch (p) {
250
- case x:
251
- a = b() / 12;
245
+ switch (d) {
246
+ case k:
247
+ i = w() / 12;
252
248
  break;
253
- case S:
254
- a = b();
249
+ case D:
250
+ i = w();
255
251
  break;
256
- case W:
257
- a = b() / 3;
252
+ case R:
253
+ i = w() / 3;
258
254
  break;
259
- case P:
260
- a = (g - $) / 6048e5;
255
+ case Y:
256
+ i = (g - m) / 6048e5;
261
257
  break;
262
- case w:
263
- a = (g - $) / 864e5;
258
+ case y:
259
+ i = (g - m) / 864e5;
264
260
  break;
265
- case j:
266
- a = g / k;
261
+ case _:
262
+ i = g / j;
267
263
  break;
268
- case M:
269
- a = g / c;
264
+ case b:
265
+ i = g / c;
270
266
  break;
271
- case D:
272
- a = g / m;
267
+ case T:
268
+ i = g / $;
273
269
  break;
274
270
  default:
275
- a = g;
271
+ i = g;
276
272
  }
277
- return r ? a : u.a(a);
278
- }, t.daysInMonth = function() {
279
- return this.endOf(S).$D;
280
- }, t.$locale = function() {
281
- return R[this.$L];
282
- }, t.locale = function(e, n) {
273
+ return s ? i : o.a(i);
274
+ }, r.daysInMonth = function() {
275
+ return this.endOf(D).$D;
276
+ }, r.$locale = function() {
277
+ return H[this.$L];
278
+ }, r.locale = function(e, n) {
283
279
  if (!e)
284
280
  return this.$L;
285
- var r = this.clone(), a = d(e, n, !0);
286
- return a && (r.$L = a), r;
287
- }, t.clone = function() {
288
- return u.w(this.$d, this);
289
- }, t.toDate = function() {
281
+ var s = this.clone(), i = f(e, n, !0);
282
+ return i && (s.$L = i), s;
283
+ }, r.clone = function() {
284
+ return o.w(this.$d, this);
285
+ }, r.toDate = function() {
290
286
  return new Date(this.valueOf());
291
- }, t.toJSON = function() {
287
+ }, r.toJSON = function() {
292
288
  return this.isValid() ? this.toISOString() : null;
293
- }, t.toISOString = function() {
289
+ }, r.toISOString = function() {
294
290
  return this.$d.toISOString();
295
- }, t.toString = function() {
291
+ }, r.toString = function() {
296
292
  return this.$d.toUTCString();
297
- }, s;
298
- }(), A = v.prototype;
299
- return o.prototype = A, [["$ms", y], ["$s", D], ["$m", M], ["$H", j], ["$W", w], ["$M", S], ["$y", x], ["$D", Y]].forEach(function(s) {
300
- A[s[1]] = function(t) {
301
- return this.$g(t, s[0], s[1]);
293
+ }, t;
294
+ }(), S = h.prototype;
295
+ return a.prototype = S, [["$ms", M], ["$s", T], ["$m", b], ["$H", _], ["$W", y], ["$M", D], ["$y", k], ["$D", P]].forEach(function(t) {
296
+ S[t[1]] = function(r) {
297
+ return this.$g(r, t[0], t[1]);
302
298
  };
303
- }), o.extend = function(s, t) {
304
- return s.$i || (s(t, v, o), s.$i = !0), o;
305
- }, o.locale = d, o.isDayjs = Z, o.unix = function(s) {
306
- return o(1e3 * s);
307
- }, o.en = R[I], o.Ls = R, o.p = {}, o;
299
+ }), a.extend = function(t, r) {
300
+ return t.$i || (t(r, h, a), t.$i = !0), a;
301
+ }, a.locale = f, a.isDayjs = J, a.unix = function(t) {
302
+ return a(1e3 * t);
303
+ }, a.en = H[I], a.Ls = H, a.p = {}, a;
308
304
  });
309
- })(se);
310
- var oe = se.exports;
311
- const ue = /* @__PURE__ */ ie(oe), ee = () => {
312
- let f = { ...(window == null ? void 0 : window.config) || {} };
313
- f.rootContainer || (f.rootContainer = "#app"), f.baseURL || (f.baseURL = location.origin), f.ossBaseURL || (f.ossBaseURL = "/oss"), f.ossBaseURL.startsWith("/") && (f.ossBaseURL = `${f.baseURL}/oss`), f.ssoBaseURL || (f.ssoBaseURL = f.baseURL);
314
- let { microAppName: m, publicPath: c, mainAppName: k } = f;
315
- return m && !0 && !c && (c = `/${m}/`.replace(/\/\//g, "/")), c || (c = "/"), f.publicPath = c, f.autoOssBucket || (f.autoOssBucket = k || m), f;
316
- }, ce = X.get("token"), le = X.post("putObject", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), fe = X.post("upload-objects", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), de = re.get("progress"), $e = () => {
317
- let l = U(!1), f = U(""), m = U(0), c = U("normal"), k = U(!1), y, D = U(""), M = U(""), j = U(""), w = U(""), P = U(!1), S = U(""), W = "", x;
318
- const Y = () => {
319
- M.value = "", j.value = "", w.value = "", P.value = !1, S.value = "";
320
- }, J = async () => {
321
- const [d, o] = await ce().run();
322
- return d ? { stauts: !1 } : { status: !0, data: o };
323
- }, V = (d) => new Promise((o, u) => {
324
- const A = [];
325
- let s = 0;
326
- for (; s < d.size; ) {
327
- const e = d.slice(s, s + 1048576);
328
- A.push(e), s += 1048576;
305
+ })(ee);
306
+ var ae = ee.exports;
307
+ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), le = G.post("upload-objects", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), ce = te.get("progress"), ve = () => {
308
+ let l = C(!1), v = C(""), $ = C(0), c = C("normal"), j = C(!1), M, T = C(""), b = C(""), _ = C(""), y = C(""), Y = C(!1), D = C(""), R = "", k;
309
+ const P = () => {
310
+ b.value = "", _.value = "", y.value = "", Y.value = !1, D.value = "";
311
+ }, B = async () => {
312
+ const [f, a] = await oe().run();
313
+ return f ? { stauts: !1 } : { status: !0, data: a };
314
+ }, q = (f) => new Promise((a, o) => {
315
+ const S = [];
316
+ let t = 0;
317
+ for (; t < f.size; ) {
318
+ const e = f.slice(t, t + 1048576);
319
+ S.push(e), t += 1048576;
329
320
  }
330
- const t = new Blob(A, { type: d.type });
331
- o(t);
332
- }), G = async (d, o, u, v = !0, A = "", s = !1) => {
333
- W = A, v && (c.value = "normal", m.value = 0, f.value = "导入进度", l.value = !0, D.value = ""), x = o;
334
- const t = await J();
335
- if (!t.status)
321
+ const r = new Blob(S, { type: f.type });
322
+ a(r);
323
+ }), Z = async (f, a, o, h = !0, S = "", t = !1) => {
324
+ var A;
325
+ R = S, h && (c.value = "normal", $.value = 0, v.value = "导入进度", l.value = !0, T.value = ""), k = a;
326
+ const r = await B();
327
+ if (!r.status)
336
328
  return;
337
- let e = t.data, n = null, { autoContentType: r, bucketName: a, importFileName: i } = u;
338
- const p = s ? fe : le;
339
- if (s) {
340
- let L = [];
341
- await o.forEach(async (O) => {
342
- let H = await V(O);
343
- L.push(H);
344
- }), n = new FormData(), n.append("accessKeyId", e.accessKeyId), n.append("secretAccessKey", e.secretAccessKey), n.append("sessionToken", e.sessionToken), n.append("bucketName", a), o.forEach((O, H) => {
345
- n.append("file", L[H]);
346
- }), i.forEach((O) => {
347
- n.append("filePaths", O);
329
+ let e = r.data, n = null, { autoContentType: s, bucketName: i, importFileName: u } = o;
330
+ const d = t ? le : ue;
331
+ if (t) {
332
+ let O = [];
333
+ await a.forEach(async (U) => {
334
+ let L = await q(U);
335
+ O.push(L);
336
+ }), n = new FormData(), n.append("accessKeyId", e.accessKeyId), n.append("secretAccessKey", e.secretAccessKey), n.append("sessionToken", e.sessionToken), n.append("bucketName", i), a.forEach((U, L) => {
337
+ n.append("file", O[L]);
338
+ }), u.forEach((U) => {
339
+ n.append("filePaths", U);
348
340
  });
349
341
  } else {
350
- const L = await V(o);
342
+ const O = await q(a);
351
343
  n = {
352
344
  accessKeyId: e.accessKeyId,
353
345
  secretAccessKey: e.secretAccessKey,
354
346
  sessionToken: e.sessionToken,
355
- file: L,
356
- bucketName: a,
357
- filePath: i,
358
- autoContentType: r
347
+ file: O,
348
+ bucketName: i,
349
+ filePath: u,
350
+ autoContentType: s
359
351
  };
360
352
  }
361
- const [h, $] = await p(n).run();
362
- if (h)
353
+ const [p, m] = await d(n).run();
354
+ if (p)
363
355
  return;
364
- const g = await he($.data), b = await (d == null ? void 0 : d(g));
365
- if (v) {
366
- if (!b.status) {
356
+ const g = await de(m.data), w = await (f == null ? void 0 : f(g));
357
+ if (h) {
358
+ if (!w.status) {
367
359
  l.value = !1, c.value = "error";
368
360
  return;
369
361
  }
370
- f.value = "导入进度", l.value = !0, z(b.taskId, "import", "");
362
+ v.value = "导入进度", l.value = !0, z(w.taskId, "import", "");
371
363
  } else {
372
- if (!b.status)
364
+ if (!w.status)
373
365
  return;
374
- c.value = "success";
366
+ c.value = "success", (A = window.DasMessage) == null || A.success({
367
+ message: "导入成功",
368
+ grouping: !0,
369
+ repeatNum: 1
370
+ });
375
371
  }
376
- }, Q = async (d, o = "", u = "") => {
377
- c.value = "normal", m.value = 0, f.value = u || "导出进度", l.value = !0;
378
- const v = await (d == null ? void 0 : d());
379
- if (!v.status) {
372
+ }, F = async (f, a = "", o = "") => {
373
+ c.value = "normal", $.value = 0, v.value = o || "导出进度", l.value = !0;
374
+ const h = await (f == null ? void 0 : f());
375
+ if (!h.status) {
380
376
  l.value = !1, c.value = "error";
381
377
  return;
382
378
  }
383
- z(v.taskId, "action", "");
384
- }, E = async (d, o = "", u = "") => {
385
- c.value = "normal", m.value = 0, f.value = "导出进度", l.value = !0;
386
- const v = await (d == null ? void 0 : d());
387
- if (!v.status) {
379
+ z(h.taskId, "action", "");
380
+ }, E = async (f, a = "", o = "", h = !0) => {
381
+ h && (c.value = "normal", $.value = 0, v.value = "导出进度", l.value = !0);
382
+ const S = await (f == null ? void 0 : f());
383
+ if (!S.status) {
388
384
  l.value = !1, c.value = "error";
389
385
  return;
390
386
  }
391
- ue().format("YYYYMMDDHHmmss") + "", z(v.taskId, "export", o || "", u);
392
- }, z = async (d, o, u, v = "") => {
393
- k.value = !0, R(d, o, u, v), y = setTimeout(() => {
387
+ ie().format("YYYYMMDDHHmmss") + "", z(S.taskId, "export", a || "", o);
388
+ }, z = async (f, a, o, h = "") => {
389
+ j.value = !0, H(f, a, o, h), M = setTimeout(() => {
394
390
  }, 50);
395
391
  }, I = () => {
396
- clearTimeout(y), y = null, l.value = !1;
397
- }, R = async (d, o = "export", u, v = "") => {
398
- var e, n;
399
- const [A, s] = await de("", {
400
- url: `progress/${d}`
392
+ clearTimeout(M), M = null, l.value = !1;
393
+ }, H = async (f, a = "export", o, h = "") => {
394
+ var e, n, s;
395
+ const [S, t] = await ce("", {
396
+ url: `progress/${f}`
401
397
  }).run();
402
- if (A) {
403
- k.value = !1;
398
+ if (S) {
399
+ j.value = !1;
404
400
  return;
405
401
  }
406
- m.value = s.percentage;
407
- const t = o == "export" ? "导出" : "导入";
408
- if (m.value == 100)
409
- if (D.value = s, k.value = !1, I(), o == "export")
410
- s.status == 1 ? (c.value = "success", te(`${ee().baseURL}/oss${s.filePath}`, u, v), k.value = !1) : s.status == 2 && (w.value = s.message || `${t}失败`);
411
- else if (o == "import") {
412
- if (s.filePath) {
402
+ $.value = t.percentage;
403
+ const r = a == "export" ? "导出" : "导入";
404
+ if ($.value == 100)
405
+ if (T.value = t, j.value = !1, I(), a == "export")
406
+ t.status == 1 ? (c.value = "success", X(`${Q().baseURL}/oss${t.filePath}`, o, h), j.value = !1) : t.status == 2 && (y.value = t.message || `${r}失败`, (e = window.DasMessage) == null || e.error({
407
+ message: t.message || `${r}失败`,
408
+ grouping: !0,
409
+ repeatNum: 1
410
+ }));
411
+ else if (a == "import") {
412
+ if (t.filePath) {
413
413
  c.value = "error";
414
- const r = (e = x.name) == null ? void 0 : e.match(/(.*?)(\.[^.]*$|$)/), a = r.length ? r[2] : "";
415
- P.value = !0;
416
- const i = (n = s.filePath) == null ? void 0 : n.replace(/(.*\/)*([^.]+).*/gi, "$2");
417
- M.value = W || `${i}${a}`, j.value = x.sizeText, w.value = "部分数据校验不通过,请下载附件并修改,重新导入!", S.value = `${ee().baseURL}/oss${s.filePath}`;
414
+ const i = (n = k.name) == null ? void 0 : n.match(/(.*?)(\.[^.]*$|$)/), u = i.length ? i[2] : "";
415
+ Y.value = !0;
416
+ const d = (s = t.filePath) == null ? void 0 : s.replace(/(.*\/)*([^.]+).*/gi, "$2");
417
+ b.value = R || `${d}${u}`, _.value = k.sizeText, y.value = "部分数据校验不通过,请下载附件并修改,重新导入!", D.value = `${Q().baseURL}/oss${t.filePath}`;
418
418
  }
419
- K(s.status, t, s.message);
419
+ W(t.status, r, t.message);
420
420
  } else
421
- o == "action" && (c.value = "success");
421
+ a == "action" && (c.value = "success");
422
422
  else
423
- y && s.status != 2 ? y = setTimeout(() => {
424
- R(d, o, u, v);
425
- }, 50) : (D.value = s, k.value = !1, K(s.status, t, s.message), I(), P.value = !0, w.value = (s == null ? void 0 : s.message) || "");
426
- }, K = (d, o, u) => {
427
- d == 1 ? (c.value = "success", M.value = "", j.value = "", w.value = "") : d == 2 ? (c.value = "error", w.value = u || "部分数据校验不通过,请下载附件并修改,重新导入!") : d == 3 && (c.value = "error");
423
+ M && t.status != 2 ? M = setTimeout(() => {
424
+ H(f, a, o, h);
425
+ }, 50) : (T.value = t, j.value = !1, W(t.status, r, t.message), I(), Y.value = !0, y.value = (t == null ? void 0 : t.message) || "");
426
+ }, W = (f, a, o) => {
427
+ var h, S, t;
428
+ f == 1 ? (c.value = "success", (h = window.DasMessage) == null || h.success({
429
+ message: `${a}成功`,
430
+ grouping: !0,
431
+ repeatNum: 1
432
+ }), b.value = "", _.value = "", y.value = "") : f == 2 ? (c.value = "error", (S = window.DasMessage) == null || S.error({
433
+ message: o || `${a}失败`,
434
+ grouping: !0,
435
+ repeatNum: 1
436
+ }), y.value = o || "部分数据校验不通过,请下载附件并修改,重新导入!") : f == 3 && (c.value = "error", (t = window.DasMessage) == null || t.error({
437
+ message: `部分${a}失败`,
438
+ grouping: !0,
439
+ repeatNum: 1
440
+ }));
428
441
  };
429
442
  return {
430
443
  showProgressDialog: l,
431
- progressTitle: f,
432
- percent: m,
444
+ progressTitle: v,
445
+ percent: $,
433
446
  progressStatus: c,
434
- progressLoading: k,
435
- progressResult: D,
436
- errorFileName: M,
437
- errorFileSize: j,
438
- errorMessage: w,
439
- errorImport: P,
440
- errorFilePath: S,
441
- fileImport: G,
447
+ progressLoading: j,
448
+ progressResult: T,
449
+ errorFileName: b,
450
+ errorFileSize: _,
451
+ errorMessage: y,
452
+ errorImport: Y,
453
+ errorFilePath: D,
454
+ fileImport: Z,
442
455
  fileExport: E,
443
- fileAction: Q,
444
- generateUniqueName: (d) => {
445
- const o = d == null ? void 0 : d.match(/(.*?)(\.[^.]*$|$)/), u = o.length ? o[2] : "";
446
- return `${o.length ? o[1] : d}${ne()}${u}`;
456
+ fileAction: F,
457
+ generateUniqueName: (f) => {
458
+ const a = f == null ? void 0 : f.match(/(.*?)(\.[^.]*$|$)/), o = a.length ? a[2] : "";
459
+ return `${a.length ? a[1] : f}${re()}${o}`;
447
460
  },
448
- downloadFile: te,
449
- resetStataus: Y,
461
+ downloadFile: X,
462
+ resetStataus: P,
450
463
  checkProgress: z
451
464
  };
452
- }, pe = (l) => {
453
- let f = l == null ? void 0 : l.toLocaleLowerCase();
465
+ }, fe = (l) => {
466
+ let v = l == null ? void 0 : l.toLocaleLowerCase();
454
467
  return {
455
468
  excel: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
456
469
  pdf: "application/pdf",
@@ -477,28 +490,28 @@ const ue = /* @__PURE__ */ ie(oe), ee = () => {
477
490
  crt: "application/x-x509-ca-cert",
478
491
  der: "application/x-x509-ca-cert",
479
492
  cer: "application/pkix-cert"
480
- }[f];
481
- }, te = (l, f, m = "excel") => {
493
+ }[v];
494
+ }, X = (l, v, $ = "excel") => {
482
495
  const c = new XMLHttpRequest();
483
- c.open("get", l), c.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), c.responseType = "blob", c.onload = function(k) {
484
- const y = new Blob([this.response], {
485
- type: pe(m)
486
- }), D = URL.createObjectURL(y);
496
+ c.open("get", l), c.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), c.responseType = "blob", c.onload = function(j) {
497
+ const M = new Blob([this.response], {
498
+ type: fe($)
499
+ }), T = URL.createObjectURL(M);
487
500
  if (window.navigator.msSaveOrOpenBlob)
488
- navigator.msSaveBlob(y, f);
501
+ navigator.msSaveBlob(M, v);
489
502
  else {
490
- const M = document.createElement("a");
491
- M.href = D, M.download = f, M.click(), window.URL.revokeObjectURL(D);
503
+ const b = document.createElement("a");
504
+ b.href = T, b.download = v, b.click(), window.URL.revokeObjectURL(T);
492
505
  }
493
506
  }, c.send();
494
- }, he = (l) => new Promise((f, m) => {
507
+ }, de = (l) => new Promise((v, $) => {
495
508
  var c = new FileReader();
496
- c.onload = function(k) {
497
- let y = "";
498
- typeof c.result == "string" && (y = JSON.parse(c.result)), f(y);
509
+ c.onload = function(j) {
510
+ let M = "";
511
+ typeof c.result == "string" && (M = JSON.parse(c.result)), v(M);
499
512
  }, c.readAsText(l);
500
513
  });
501
514
  export {
502
- te as downloadFile,
503
- $e as useFile
515
+ X as downloadFile,
516
+ ve as useFile
504
517
  };