nhanh-pure-function 3.0.0 → 3.0.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.
package/dist/index.es.js CHANGED
@@ -1,72 +1,72 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".nhanh-pure-function{--nhanh: 2233}.no-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
2
2
  var it = Object.defineProperty;
3
- var Q = (n) => {
3
+ var tt = (n) => {
4
4
  throw TypeError(n);
5
5
  };
6
- var st = (n, e, t) => e in n ? it(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
7
- var E = (n, e, t) => st(n, typeof e != "symbol" ? e + "" : e, t), tt = (n, e, t) => e.has(n) || Q("Cannot " + t);
8
- var c = (n, e, t) => (tt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), h = (n, e, t) => e.has(n) ? Q("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), m = (n, e, t, o) => (tt(n, e, "write to private field"), o ? o.call(n, t) : e.set(n, t), t);
9
- function vt(n, e = 500) {
10
- let t, o = !0;
11
- function r(i) {
12
- if (!o) return;
13
- t || (t = i);
14
- let s = Math.min((i - t) / e, 1);
15
- n(s), i - t < e && requestAnimationFrame(r);
6
+ var st = (n, t, e) => t in n ? it(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
7
+ var F = (n, t, e) => st(n, typeof t != "symbol" ? t + "" : t, e), et = (n, t, e) => t.has(n) || tt("Cannot " + e);
8
+ var a = (n, t, e) => (et(n, t, "read from private field"), e ? e.call(n) : t.get(n)), h = (n, t, e) => t.has(n) ? tt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), f = (n, t, e, r) => (et(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e);
9
+ function vt(n, t = 500) {
10
+ let e, r = !0;
11
+ function o(i) {
12
+ if (!r) return;
13
+ e || (e = i);
14
+ let s = Math.min((i - e) / t, 1);
15
+ n(s), i - e < t && requestAnimationFrame(o);
16
16
  }
17
- return requestAnimationFrame(r), () => o = !1;
17
+ return requestAnimationFrame(o), () => r = !1;
18
18
  }
19
- function bt(n, e, t, o, r = 2) {
20
- let i = n, s = !1, a = 1, u = n, l = e, d = t;
21
- const f = () => {
22
- const x = (l - u) / d;
23
- return Number(x.toFixed(r));
19
+ function bt(n, t, e, r, o = 2) {
20
+ let i = n, s = !1, c = 1, u = n, l = t, m = e;
21
+ const d = () => {
22
+ const w = (l - u) / m;
23
+ return Number(w.toFixed(o));
24
24
  };
25
- let w = f();
26
- const L = (x) => Math.min(Math.max(x, u), l), A = (x) => Number(x.toFixed(r)), B = (x, X, H) => {
27
- const I = [];
28
- return x >= X && I.push("最小值必须小于最大值"), H <= 0 && I.push("分段数必须为正数"), I;
29
- }, rt = (x, X, H) => {
30
- const I = B(x, X, H);
31
- return I.length > 0 ? (console.error(`参数更新失败: ${I.join("; ")}`), !1) : (u = x, l = X, d = H, w = f(), i = L(i), !0);
32
- }, J = () => {
33
- s && (a = i >= l ? -1 : i <= u ? 1 : a, i = L(i + w * a), o(A(i)), requestAnimationFrame(J));
25
+ let g = d();
26
+ const y = (w) => Math.min(Math.max(w, u), l), E = (w) => Number(w.toFixed(o)), T = (w, W, V) => {
27
+ const R = [];
28
+ return w >= W && R.push("最小值必须小于最大值"), V <= 0 ? R.push("分段数必须为正数") : d() == 0 && R.push("数值精度过低,致使动画步长为 0"), R;
29
+ }, k = (w, W, V) => {
30
+ const R = T(w, W, V);
31
+ return R.length > 0 ? (console.error(`参数更新失败: ${R.join("; ")}`), !1) : (u = w, l = W, m = V, g = d(), i = y(i), !0);
32
+ }, H = () => {
33
+ s && (c = i >= l ? -1 : i <= u ? 1 : c, i = y(i + g * c), r(E(i)), requestAnimationFrame(H));
34
34
  };
35
35
  return {
36
36
  /** 启动/继续动画 */
37
- play(x = i) {
38
- if (i = L(x), B(u, l, d).length)
39
- return console.warn("配置参数错误", this.getParams());
40
- s || (s = !0, J());
37
+ play(w = i) {
38
+ if (i = y(w), T(u, l, m).length)
39
+ return console.error("配置参数错误", this.getParams());
40
+ s || (s = !0, H());
41
41
  },
42
42
  /** 暂停动画 */
43
43
  pause() {
44
44
  s = !1;
45
45
  },
46
46
  /** 获取当前值 */
47
- getCurrent: () => A(i),
47
+ getCurrent: () => E(i),
48
48
  /** 是否正在运行 */
49
49
  isPlaying: () => s,
50
50
  /** 更新参数(不中断动画) */
51
- updateParams: rt,
51
+ updateParams: k,
52
52
  /** 获取当前参数 */
53
- getParams: () => ({ min: u, max: l, steps: d, precision: r, stepSize: w })
53
+ getParams: () => ({ min: u, max: l, steps: m, precision: o, stepSize: g })
54
54
  };
55
55
  }
56
- function _t(n, e, t, o, r = 2) {
57
- if (t <= 0) return;
58
- const i = (f) => Number(f.toFixed(r)), s = e - n, a = i(Math.abs(s) / t);
59
- if (a === 0) return;
56
+ function _t(n, t, e, r, o = 2) {
57
+ if (e <= 0) return console.error("动画步数 必须为正数");
58
+ const i = (d) => Number(d.toFixed(o)), s = t - n, c = i(Math.abs(s) / e);
59
+ if (c === 0) return console.error("数值精度过低,致使动画步长为 0");
60
60
  const u = Math.sign(s);
61
61
  let l = n;
62
- const d = () => {
63
- l = i(l + a * u), (u > 0 ? l < e : l > e) ? (o(l), requestAnimationFrame(d)) : o(e);
62
+ const m = () => {
63
+ l = i(l + c * u), (u > 0 ? l < t : l > t) ? (r(l), requestAnimationFrame(m)) : r(t);
64
64
  };
65
- d();
65
+ m();
66
66
  }
67
- function Et(n, e = "image/png") {
67
+ function Mt(n, t = "image/png") {
68
68
  try {
69
- let t, o = e;
69
+ let e, r = t;
70
70
  if (n instanceof File)
71
71
  return URL.createObjectURL(n);
72
72
  if (typeof n == "string") {
@@ -75,80 +75,80 @@ function Et(n, e = "image/png") {
75
75
  if (s) {
76
76
  if (!s[2])
77
77
  return console.error("无效的数据 URL:缺少 base64 编码声明");
78
- if (o = s[1] || o, i = s[3], !i)
78
+ if (r = s[1] || r, i = s[3], !i)
79
79
  return console.error("数据 URL 包含空有效负载");
80
80
  }
81
81
  i = i.replace(/[^A-Za-z0-9+/=]/g, "");
82
- const a = atob(i);
83
- t = new Uint8Array(a.length);
84
- for (let u = 0; u < a.length; u++)
85
- t[u] = a.charCodeAt(u);
82
+ const c = atob(i);
83
+ e = new Uint8Array(c.length);
84
+ for (let u = 0; u < c.length; u++)
85
+ e[u] = c.charCodeAt(u);
86
86
  } else if (n instanceof ArrayBuffer)
87
- t = new Uint8Array(n);
87
+ e = new Uint8Array(n);
88
88
  else if (n instanceof Uint8Array)
89
- t = n;
89
+ e = n;
90
90
  else
91
91
  return console.error(
92
92
  "不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array"
93
93
  );
94
- const r = new Blob([t], { type: o });
95
- return URL.createObjectURL(r);
96
- } catch (t) {
94
+ const o = new Blob([e], { type: r });
95
+ return URL.createObjectURL(o);
96
+ } catch (e) {
97
97
  return console.error(
98
98
  "数据到 ImageURL 的转换失败:",
99
- t.message,
100
- t.stack || "没有可用的堆栈跟踪"
99
+ e.message,
100
+ e.stack || "没有可用的堆栈跟踪"
101
101
  ), null;
102
102
  }
103
103
  }
104
- function Mt(n, e = 10) {
105
- let t = 0, o = e;
106
- function r() {
107
- if (o > 0)
108
- o--, requestAnimationFrame(r);
104
+ function Et(n, t = 10) {
105
+ let e = 0, r = t;
106
+ function o() {
107
+ if (r > 0)
108
+ r--, requestAnimationFrame(o);
109
109
  else {
110
- const s = (+/* @__PURE__ */ new Date() - t) / e, a = 1e3 / s;
111
- n(Number(a.toFixed(2)), Number(s.toFixed(2)));
110
+ const s = (+/* @__PURE__ */ new Date() - e) / t, c = 1e3 / s;
111
+ n(Number(c.toFixed(2)), Number(s.toFixed(2)));
112
112
  }
113
113
  }
114
114
  requestAnimationFrame(() => {
115
- t = +/* @__PURE__ */ new Date(), r();
115
+ e = +/* @__PURE__ */ new Date(), o();
116
116
  });
117
117
  }
118
118
  function Ft(n) {
119
- const e = () => Promise.resolve(), t = (a) => (console.error(a), Promise.reject(a));
120
- function o() {
121
- return navigator.clipboard.writeText(n).then(e).catch(t);
122
- }
119
+ const t = () => Promise.resolve(), e = (c) => (console.error(c), Promise.reject(c));
123
120
  function r() {
124
- const a = document.createElement("div");
125
- a.innerText = n, document.body.appendChild(a);
121
+ return navigator.clipboard.writeText(n).then(t).catch(e);
122
+ }
123
+ function o() {
124
+ const c = document.createElement("div");
125
+ c.innerText = n, document.body.appendChild(c);
126
126
  const u = document.createRange();
127
- u.selectNodeContents(a);
127
+ u.selectNodeContents(c);
128
128
  const l = window.getSelection();
129
- let d = !1;
130
- return l && (l.removeAllRanges(), l.addRange(u), d = document.execCommand("copy")), document.body.removeChild(a), d ? Promise.resolve() : Promise.reject();
129
+ let m = !1;
130
+ return l && (l.removeAllRanges(), l.addRange(u), m = document.execCommand("copy")), document.body.removeChild(c), m ? Promise.resolve() : Promise.reject();
131
131
  }
132
132
  function i() {
133
- const a = document.createElement("textarea");
134
- a.value = n, document.body.appendChild(a), a.select(), a.setSelectionRange(0, n.length);
133
+ const c = document.createElement("textarea");
134
+ c.value = n, document.body.appendChild(c), c.select(), c.setSelectionRange(0, n.length);
135
135
  let u = !1;
136
- return document.activeElement === a && (u = document.execCommand("Copy", !0)), document.body.removeChild(a), u ? Promise.resolve() : Promise.reject();
136
+ return document.activeElement === c && (u = document.execCommand("Copy", !0)), document.body.removeChild(c), u ? Promise.resolve() : Promise.reject();
137
137
  }
138
138
  function s() {
139
- return r().then(e).catch(() => {
140
- i().then(e).catch(() => t("复制方式尽皆失效"));
139
+ return o().then(t).catch(() => {
140
+ i().then(t).catch(() => e("复制方式尽皆失效"));
141
141
  });
142
142
  }
143
- return navigator.clipboard ? o().catch(s) : s();
143
+ return navigator.clipboard ? r().catch(s) : s();
144
144
  }
145
145
  class ct {
146
146
  /** 请使用静态方法 */
147
147
  constructor() {
148
148
  }
149
149
  /** 添加已有窗口 */
150
- static add(e, t) {
151
- this.keys.set(e, t);
150
+ static add(t, e) {
151
+ this.keys.set(t, e);
152
152
  }
153
153
  /**
154
154
  * 根据键打开或聚焦窗口
@@ -158,15 +158,15 @@ class ct {
158
158
  * @param windowFeatures 新窗口的特性
159
159
  * @returns 返回已打开或新打开的窗口
160
160
  */
161
- static open(e, t, o, r) {
162
- const i = this.keys.get(e);
161
+ static open(t, e, r, o) {
162
+ const i = this.keys.get(t);
163
163
  if (i && !i.closed)
164
164
  return i.focus(), i;
165
165
  {
166
- const s = window.open(t, o, r);
166
+ const s = window.open(e, r, o);
167
167
  if (s)
168
- return this.keys.set(e, s), s;
169
- console.error("window.open failed: 可能是浏览器阻止了弹出窗口"), this.keys.delete(e);
168
+ return this.keys.set(t, s), s;
169
+ console.error("window.open failed: 可能是浏览器阻止了弹出窗口"), this.keys.delete(t);
170
170
  }
171
171
  }
172
172
  /**
@@ -174,35 +174,35 @@ class ct {
174
174
  * @param key 窗口的唯一键
175
175
  * @returns 如果窗口打开则返回true,否则返回false
176
176
  */
177
- static isOpen(e) {
178
- const t = this.keys.get(e);
179
- return t != null && t.closed && this.keys.delete(e), this.keys.has(e);
177
+ static isOpen(t) {
178
+ const e = this.keys.get(t);
179
+ return e != null && e.closed && this.keys.delete(t), this.keys.has(t);
180
180
  }
181
181
  /**
182
182
  * 获取与指定键关联的窗口
183
183
  * @param key 窗口的唯一键
184
184
  * @returns 返回对应的窗口,如果窗口已关闭则返回undefined
185
185
  */
186
- static getWindow(e) {
187
- if (this.isOpen(e)) return this.keys.get(e);
186
+ static getWindow(t) {
187
+ if (this.isOpen(t)) return this.keys.get(t);
188
188
  }
189
189
  /**
190
190
  * 关闭与指定键关联的窗口
191
191
  * @param key 窗口的唯一键
192
192
  */
193
- static close(e) {
194
- const t = this.keys.get(e);
195
- t && (t.close(), this.keys.delete(e));
193
+ static close(t) {
194
+ const e = this.keys.get(t);
195
+ e && (e.close(), this.keys.delete(t));
196
196
  }
197
197
  /**
198
198
  * 关闭所有打开的窗口并清空Map
199
199
  */
200
200
  static closeAll() {
201
- this.keys.forEach((e, t) => e.close()), this.keys.clear();
201
+ this.keys.forEach((t, e) => t.close()), this.keys.clear();
202
202
  }
203
203
  }
204
204
  // 存储键与对应窗口的Map
205
- E(ct, "keys", /* @__PURE__ */ new Map());
205
+ F(ct, "keys", /* @__PURE__ */ new Map());
206
206
  const at = {
207
207
  /* 常见扩展名映射 */
208
208
  ".mp3": "audio/mpeg",
@@ -267,7 +267,7 @@ const at = {
267
267
  ".eot": "application/vnd.ms-fontobject",
268
268
  ".map": "application/json"
269
269
  // 可根据需要继续扩展
270
- }, V = {
270
+ }, K = {
271
271
  image: [
272
272
  ".jpg",
273
273
  ".jpeg",
@@ -447,7 +447,7 @@ const at = {
447
447
  ".awk",
448
448
  ".php"
449
449
  ]
450
- }, et = [
450
+ }, nt = [
451
451
  "",
452
452
  "万",
453
453
  "亿",
@@ -465,38 +465,38 @@ const at = {
465
465
  function Ct(n) {
466
466
  return n.charAt(0).toUpperCase() + n.slice(1);
467
467
  }
468
- function Pt(n, e, t = 2) {
469
- return !Number.isFinite(n) || !Number.isFinite(e) || !Number.isFinite(t) ? (console.error("所有参数必须是有限的数字"), "") : e === 0 ? (console.error("分母不能为零"), "") : t < 0 ? (console.error("小数位数不能为负数"), "") : (n / e * 100).toFixed(t) + "%";
468
+ function Lt(n, t, e = 2) {
469
+ return !Number.isFinite(n) || !Number.isFinite(t) || !Number.isFinite(e) ? (console.error("所有参数必须是有限的数字"), "") : t === 0 ? (console.error("分母不能为零"), "") : e < 0 ? (console.error("小数位数不能为负数"), "") : (n / t * 100).toFixed(e) + "%";
470
470
  }
471
- function Lt(n) {
472
- const t = n.toString().split("."), o = t[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
473
- return t.length > 1 ? o + "." + t[1] : o;
471
+ function Tt(n) {
472
+ const e = n.toString().split("."), r = e[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
473
+ return e.length > 1 ? r + "." + e[1] : r;
474
474
  }
475
- function Ut(n, e) {
476
- const t = {
475
+ function Pt(n, t) {
476
+ const e = {
477
477
  join: !0,
478
478
  suffix: "",
479
479
  decimalPlaces: 2
480
- }, { join: o, suffix: r, decimalPlaces: i } = {
481
- ...t,
482
- ...e || {}
480
+ }, { join: r, suffix: o, decimalPlaces: i } = {
481
+ ...e,
482
+ ...t || {}
483
483
  }, s = Number(n);
484
- if (isNaN(s)) return o ? `0${r}` : [0, r];
485
- const a = Math.abs(s), u = s >= 0, l = Math.max(0, Math.floor(Math.log10(a) / 4)), d = Math.pow(1e4, l), f = a / d, w = (u ? 1 : -1) * parseFloat(f.toFixed(Math.max(0, i)));
486
- return o ? `${w}${et[l]}${r}` : [w, et[l] + r];
484
+ if (isNaN(s)) return r ? `0${o}` : [0, o];
485
+ const c = Math.abs(s), u = s >= 0, l = Math.max(0, Math.floor(Math.log10(c) / 4)), m = Math.pow(1e4, l), d = c / m, g = (u ? 1 : -1) * parseFloat(d.toFixed(Math.max(0, i)));
486
+ return r ? `${g}${nt[l]}${o}` : [g, nt[l] + o];
487
487
  }
488
- function Tt(n) {
489
- const e = ["B", "KB", "MB", "GB", "TB", "PB"];
490
- let t = 0;
488
+ function Ut(n) {
489
+ const t = ["B", "KB", "MB", "GB", "TB", "PB"];
490
+ let e = 0;
491
491
  for (; n > 1024; )
492
- n /= 1024, t++;
493
- return `${Math.round(n * 100) / 100} ${e[t]}`;
492
+ n /= 1024, e++;
493
+ return `${Math.round(n * 100) / 100} ${t[e]}`;
494
494
  }
495
- function jt(n, e = "YYYY-MM-DD hh:mm:ss", t = !0) {
496
- const o = new Date(n);
497
- if (isNaN(o.getTime()))
495
+ function Rt(n, t = "YYYY-MM-DD hh:mm:ss", e = !0) {
496
+ const r = new Date(n);
497
+ if (isNaN(r.getTime()))
498
498
  return console.error("Invalid date"), "";
499
- const r = {
499
+ const o = {
500
500
  YYYY: (i) => i.getFullYear(),
501
501
  MM: (i) => i.getMonth() + 1,
502
502
  // Adjust for 0-based month
@@ -506,53 +506,85 @@ function jt(n, e = "YYYY-MM-DD hh:mm:ss", t = !0) {
506
506
  ss: (i) => i.getSeconds(),
507
507
  ms: (i) => i.getMilliseconds()
508
508
  };
509
- return e.replace(/YYYY|MM|DD|hh|mm|ss|ms/g, (i) => {
510
- const s = r[i](o);
511
- return t ? String(s).padStart(2, "0") : String(s);
509
+ return t.replace(/YYYY|MM|DD|hh|mm|ss|ms/g, (i) => {
510
+ const s = o[i](r);
511
+ return e ? String(s).padStart(2, "0") : String(s);
512
512
  });
513
513
  }
514
- function Z(n, e = "file") {
515
- if (!n || (n = String(n).trim(), n === "")) return e;
516
- const t = n.split("/");
517
- return t[t.length - 1].split("?")[0];
514
+ function J(n, t = "file") {
515
+ if (!n || (n = String(n).trim(), n === "")) return t;
516
+ const e = n.split("/");
517
+ return e[e.length - 1].split("?")[0];
518
518
  }
519
- function Rt(n, e) {
520
- return n = n.replace(/([^a-zA-Z][a-z])/g, (t) => t.toUpperCase()), e ? n.replace(/[^a-zA-Z]+/g, "") : n;
519
+ function jt(n, t) {
520
+ return n = n.replace(/([^a-zA-Z][a-z])/g, (e) => e.toUpperCase()), t ? n.replace(/[^a-zA-Z]+/g, "") : n;
521
521
  }
522
- function At(n, e, t = ",") {
523
- const o = new RegExp(
524
- `(^|${t})${e}(${t}|$)`,
522
+ function It(n, t, e = ",") {
523
+ const r = new RegExp(
524
+ `(^|${e})${t}(${e}|$)`,
525
525
  "g"
526
526
  );
527
- return n.replace(o, function(r, i, s) {
528
- return i === s ? t : "";
527
+ return n.replace(r, function(o, i, s) {
528
+ return i === s ? e : "";
529
529
  });
530
530
  }
531
- function It(n) {
531
+ function At(n) {
532
532
  return !(n === null || typeof n != "object" || Array.isArray(n));
533
533
  }
534
- function lt(n, e = 2) {
535
- return Array.isArray(n) && n.length >= e && n.every((t) => typeof t == "number" && Number.isFinite(t));
534
+ function lt(n, t = 2) {
535
+ if (Array.isArray(n) && n.length >= t) {
536
+ for (let r = 0; r < n.length; r++)
537
+ if (typeof n[r] != "number" || !Number.isFinite(n[r])) return !1;
538
+ } else return !1;
539
+ return !0;
540
+ }
541
+ function St(n, t = 1, e = 2) {
542
+ if (Array.isArray(n) && n.length >= t) {
543
+ for (let o = 0; o < n.length; o++)
544
+ if (!lt(n[o], e)) return !1;
545
+ } else return !1;
546
+ return !0;
536
547
  }
537
- function kt(n, e = 1, t = 2) {
538
- return Array.isArray(n) && n.length >= e && n.every((o) => lt(o, t));
548
+ function kt(n, t, e) {
549
+ return Math.abs(n - t) <= e;
539
550
  }
540
- function St(n, e, t) {
541
- return Math.abs(n - e) <= t;
551
+ function Dt(n, t) {
552
+ let e = !1;
553
+ const { x: r, y: o } = n, i = t.length;
554
+ for (let s = 0, c = i - 1; s < i; c = s++) {
555
+ const u = t[s].x, l = t[s].y, m = t[c].x, d = t[c].y;
556
+ l > o != d > o && r < (m - u) * (o - l) / (d - l) + u && (e = !e);
557
+ }
558
+ return e;
542
559
  }
543
- function Dt(n, e) {
544
- let t = !1;
545
- const { x: o, y: r } = n, i = e.length;
546
- for (let s = 0, a = i - 1; s < i; a = s++) {
547
- const u = e[s].x, l = e[s].y, d = e[a].x, f = e[a].y;
548
- l > r != f > r && o < (d - u) * (r - l) / (f - l) + u && (t = !t);
560
+ function zt(n, t, e, r) {
561
+ const o = Math.min(n[0], t[0]), i = Math.max(n[0], t[0]), s = Math.min(n[1], t[1]), c = Math.max(n[1], t[1]), u = [
562
+ [o, s],
563
+ // 左上
564
+ [i, s],
565
+ // 右上
566
+ [i, c],
567
+ // 右下
568
+ [o, c]
569
+ // 左下
570
+ ], l = r[1] - e[1], m = e[0] - r[0], d = r[0] * e[1] - e[0] * r[1];
571
+ if (l === 0 && m === 0) {
572
+ const [T, k] = e;
573
+ return T >= o && T <= i && k >= s && k <= c;
549
574
  }
550
- return t;
575
+ const g = 1e-10;
576
+ let y = !1, E = !1;
577
+ for (const [T, k] of u) {
578
+ const H = l * T + m * k + d;
579
+ if (Math.abs(H) < g || (H > g ? y = !0 : E = !0, y && E))
580
+ return !0;
581
+ }
582
+ return y && E;
551
583
  }
552
- function nt(n) {
584
+ function rt(n) {
553
585
  return Array.isArray(n) ? "array" : n === null ? "null" : typeof n;
554
586
  }
555
- function zt(n) {
587
+ function Ot(n) {
556
588
  return [
557
589
  "https:",
558
590
  // HTTPS协议,用于安全地浏览网页
@@ -574,51 +606,51 @@ function zt(n) {
574
606
  // Remote Desktop Protocol,用于安全的远程桌面连接
575
607
  "vpn:"
576
608
  // VPN协议,用于创建安全的网络连接
577
- ].some((t) => n.startsWith(t));
609
+ ].some((e) => n.startsWith(e));
578
610
  }
579
- function Ot(n) {
580
- return new Promise((e, t) => {
611
+ function Nt(n) {
612
+ return new Promise((t, e) => {
581
613
  if (typeof n != "string" || n.trim() === "" || !n.includes("://")) {
582
- t(new Error("Invalid URL: Must be a non-empty string"));
614
+ e(new Error("Invalid URL: Must be a non-empty string"));
583
615
  return;
584
616
  }
585
617
  try {
586
618
  new XMLHttpRequest().open("HEAD", n, !0);
587
619
  } catch (i) {
588
- t(new Error(`Invalid URL format: ${i.message}`));
620
+ e(new Error(`Invalid URL format: ${i.message}`));
589
621
  return;
590
622
  }
591
- const o = new XMLHttpRequest();
592
- o.open("HEAD", n, !0);
593
- const r = (i) => {
594
- t(new Error(`Request failed: ${i.type}`));
623
+ const r = new XMLHttpRequest();
624
+ r.open("HEAD", n, !0);
625
+ const o = (i) => {
626
+ e(new Error(`Request failed: ${i.type}`));
595
627
  };
596
- o.onreadystatechange = function() {
597
- o.readyState === XMLHttpRequest.DONE && (o.status === 0 ? t(new Error("Network error or CORS blocked")) : o.status >= 200 && o.status < 300 ? e(!0) : t(new Error(`HTTP Error: ${o.status}`)));
598
- }, o.onerror = r, o.onabort = r, o.ontimeout = r;
628
+ r.onreadystatechange = function() {
629
+ r.readyState === XMLHttpRequest.DONE && (r.status === 0 ? e(new Error("Network error or CORS blocked")) : r.status >= 200 && r.status < 300 ? t(!0) : e(new Error(`HTTP Error: ${r.status}`)));
630
+ }, r.onerror = o, r.onabort = o, r.ontimeout = o;
599
631
  try {
600
- o.send();
632
+ r.send();
601
633
  } catch (i) {
602
- t(new Error(`Request send failed: ${i.message}`));
634
+ e(new Error(`Request send failed: ${i.message}`));
603
635
  }
604
636
  });
605
637
  }
606
- const C = class C {
638
+ const P = class P {
607
639
  constructor() {
608
- if (new.target === C)
640
+ if (new.target === P)
609
641
  throw new Error("请直接使用静态方法,而不是实例化此类");
610
642
  }
611
- static check(e, t) {
612
- if (!e || typeof e != "string")
613
- return console.error("Invalid URL provided"), t ? !1 : "unknown";
614
- const o = Z(e).toLowerCase();
615
- if (t) {
616
- if (!V.hasOwnProperty(t))
617
- return console.error(`Unknown file type: ${t}`), "unknown";
618
- const r = V[t];
619
- return C._checkExtension(o, r);
643
+ static check(t, e) {
644
+ if (!t || typeof t != "string")
645
+ return console.error("Invalid URL provided"), e ? !1 : "unknown";
646
+ const r = J(t).toLowerCase();
647
+ if (e) {
648
+ if (!K.hasOwnProperty(e))
649
+ return console.error(`Unknown file type: ${e}`), "unknown";
650
+ const o = K[e];
651
+ return P._checkExtension(r, o);
620
652
  }
621
- return C._detectFileType(o);
653
+ return P._detectFileType(r);
622
654
  }
623
655
  /**
624
656
  * 静态方法,用于解析地址信息
@@ -628,10 +660,10 @@ const C = class C {
628
660
  * @param {string} url - 以逗号分隔的URL字符串,每个URL代表一个资源的位置
629
661
  * @returns {Array} - 包含每个URL及其相关信息(名称和类型)的对象数组
630
662
  */
631
- static parseAddresses(e) {
632
- return !e || typeof e != "string" ? (console.error("Invalid URL provided"), []) : e.split(",").map((t) => {
633
- const o = Z(t), r = this.check(t);
634
- return { url: t, name: o, type: r };
663
+ static parseAddresses(t) {
664
+ return !t || typeof t != "string" ? (console.error("Invalid URL provided"), []) : t.split(",").map((e) => {
665
+ const r = J(e), o = this.check(e);
666
+ return { url: e, name: r, type: o };
635
667
  });
636
668
  }
637
669
  /**
@@ -640,12 +672,12 @@ const C = class C {
640
672
  * @param {string} [accept] - 可接受的 MIME 类型模式(如 "image/*, text/plain")
641
673
  * @returns {boolean} - 如果类型匹配,则返回 true,否则返回 false
642
674
  */
643
- static matchesMimeType(e, t) {
644
- if (!t) return !0;
645
- if (typeof e != "string" || typeof t != "string") return !1;
646
- const o = C._normalizeType(e), r = t.split(",").map((a) => C._normalizeType(a.trim())), [i, s = "*"] = o.split("/");
647
- return r.some((a) => {
648
- const [u, l = "*"] = a.split("/");
675
+ static matchesMimeType(t, e) {
676
+ if (!e) return !0;
677
+ if (typeof t != "string" || typeof e != "string") return !1;
678
+ const r = P._normalizeType(t), o = e.split(",").map((c) => P._normalizeType(c.trim())), [i, s = "*"] = r.split("/");
679
+ return o.some((c) => {
680
+ const [u, l = "*"] = c.split("/");
649
681
  return (u === "*" || i === "*" || u === i) && (l === "*" || s === "*" || l === s);
650
682
  });
651
683
  }
@@ -657,8 +689,8 @@ const C = class C {
657
689
  * @param {string} type - 文件类型或MIME类型字符串
658
690
  * @returns {string} 标准化的MIME类型字符串,如果无法识别则返回原始输入
659
691
  */
660
- static _normalizeType(e) {
661
- return e.startsWith(".") && !e.includes("/") ? at[e.toLowerCase()] || e : e.includes("/") ? e : `${e}/*`;
692
+ static _normalizeType(t) {
693
+ return t.startsWith(".") && !t.includes("/") ? at[t.toLowerCase()] || t : t.includes("/") ? t : `${t}/*`;
662
694
  }
663
695
  /**
664
696
  * 检查URL是否具有任何指定的文件扩展名
@@ -666,198 +698,201 @@ const C = class C {
666
698
  * @param {string[]} validExtensions - 有效文件扩展名的数组
667
699
  * @returns {boolean} - 如果URL具有任何指定的文件扩展名,则返回true,否则返回false
668
700
  */
669
- static _checkExtension(e, t) {
670
- return t.some((o) => e.endsWith(o));
701
+ static _checkExtension(t, e) {
702
+ return e.some((r) => t.endsWith(r));
671
703
  }
672
704
  /**
673
705
  * 检测文件URL的类型
674
706
  * @param {string} url - 文件的URL
675
707
  * @returns {string} - 如果URL与任何已知类型匹配,则返回文件类型,否则返回"unknown"
676
708
  */
677
- static _detectFileType(e) {
678
- for (const [t, o] of C.cachedEntries)
679
- if (o.some((r) => e.endsWith(r)))
680
- return t;
709
+ static _detectFileType(t) {
710
+ for (const [e, r] of P.cachedEntries)
711
+ if (r.some((o) => t.endsWith(o)))
712
+ return e;
681
713
  return "unknown";
682
714
  }
683
715
  };
684
716
  // 缓存文件扩展名的条目,以提高性能
685
- E(C, "cachedEntries", Object.entries(V));
686
- let ot = C;
687
- function Nt(n) {
717
+ F(P, "cachedEntries", Object.entries(K));
718
+ let ot = P;
719
+ function qt(n) {
688
720
  if (typeof n != "function")
689
721
  return console.error("非函数:", n);
690
- const e = function(t) {
691
- t.didTimeout || t.timeRemaining() <= 0 ? requestIdleCallback(e) : n();
722
+ const t = function(e) {
723
+ e.didTimeout || e.timeRemaining() <= 0 ? requestIdleCallback(t) : n();
692
724
  };
693
- requestIdleCallback(e);
725
+ requestIdleCallback(t);
694
726
  }
695
- function qt(n, e) {
696
- const t = +/* @__PURE__ */ new Date();
697
- return new Promise((o, r) => {
727
+ function Yt(n, t) {
728
+ const e = +/* @__PURE__ */ new Date();
729
+ return new Promise((r, o) => {
698
730
  const i = () => {
699
- if (+/* @__PURE__ */ new Date() - t >= e) return r("超时");
700
- if (n()) return o("完成");
731
+ if (+/* @__PURE__ */ new Date() - e >= t) return o("超时");
732
+ if (n()) return r("完成");
701
733
  requestIdleCallback(i);
702
734
  };
703
735
  i();
704
736
  });
705
737
  }
706
- function K(n, e, t = [], o = +/* @__PURE__ */ new Date()) {
707
- if (o < +/* @__PURE__ */ new Date() - 50) {
738
+ function Q(n, t, e = [], r = +/* @__PURE__ */ new Date()) {
739
+ if (r < +/* @__PURE__ */ new Date() - 50) {
708
740
  console.error("_MergeObjects 合并异常:疑似死循环");
709
741
  return;
710
742
  }
711
- const r = nt(n), i = nt(e);
712
- if (r != i) return e;
713
- if (r == "object" || r == "array") {
714
- if (t.some(([s, a]) => s == n && a == e)) return n;
715
- if (t.push([n, e]), r == "object") {
716
- for (const s in e)
717
- if (Object.prototype.hasOwnProperty.call(e, s)) {
718
- const a = e[s], u = n[s], l = K(
743
+ const o = rt(n), i = rt(t);
744
+ if (o != i) return t;
745
+ if (o == "object" || o == "array") {
746
+ if (e.some(([s, c]) => s == n && c == t)) return n;
747
+ if (e.push([n, t]), o == "object") {
748
+ for (const s in t)
749
+ if (Object.prototype.hasOwnProperty.call(t, s)) {
750
+ const c = t[s], u = n[s], l = Q(
719
751
  u,
720
- a,
721
- t,
722
- o
752
+ c,
753
+ e,
754
+ r
723
755
  );
724
756
  n[s] = l;
725
757
  }
726
758
  return n;
727
- } else if (r == "array")
728
- return e.forEach((s, a) => {
729
- const u = s, l = n[a], d = K(
759
+ } else if (o == "array")
760
+ return t.forEach((s, c) => {
761
+ const u = s, l = n[c], m = Q(
730
762
  l,
731
763
  u,
732
- t,
733
- o
764
+ e,
765
+ r
734
766
  );
735
- n[a] = d;
767
+ n[c] = m;
736
768
  }), n;
737
- } else return e;
769
+ } else return t;
738
770
  }
739
771
  function $t(n = "") {
740
- return n + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
741
- const t = Math.random() * 16 | 0;
742
- return (e === "x" ? t : t & 3 | 8).toString(16);
772
+ return n + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
773
+ const e = Math.random() * 16 | 0;
774
+ return (t === "x" ? e : e & 3 | 8).toString(16);
743
775
  });
744
776
  }
745
- function ut(n, e) {
746
- let t;
747
- return function(...o) {
748
- clearTimeout(t), t = setTimeout(() => {
749
- n(...o), t = void 0;
750
- }, e);
777
+ function ut(n, t) {
778
+ let e;
779
+ return function(...r) {
780
+ clearTimeout(e), e = setTimeout(() => {
781
+ n(...r), e = void 0;
782
+ }, t);
751
783
  };
752
784
  }
753
- function Yt(n, e) {
754
- let t = -1 / 0;
755
- return function(...o) {
756
- const r = performance.now();
757
- if (r - t > e) {
758
- t = r;
785
+ function Xt(n, t) {
786
+ let e = -1 / 0;
787
+ return function(...r) {
788
+ const o = performance.now();
789
+ if (o - e > t) {
790
+ e = o;
759
791
  try {
760
- n(...o);
792
+ n(...r);
761
793
  } catch (i) {
762
794
  console.error("Throttled function execution failed:", i);
763
795
  }
764
796
  }
765
797
  };
766
798
  }
767
- function Bt(n, e) {
768
- const t = e.split(".");
769
- return t.reduce((o, r, i) => (r in o || (i === t.length - 1 ? o[r] = void 0 : o[r] = {}), o[r]), n);
799
+ function Bt(n, t, e) {
800
+ if (!n || !t) return n;
801
+ const r = t.split(".");
802
+ return r.reduce((o, i, s) => o.hasOwnProperty(i) ? o[i] : s === r.length - 1 ? o[i] = e : o[i] = {}, n);
770
803
  }
771
- function Xt(n, e) {
772
- const t = e.split(".");
773
- return t.reduce((o, r, i) => o.hasOwnProperty(r) ? o[r] : o[r] = i == t.length - 1 ? void 0 : {}, n);
804
+ function Ht(n, t) {
805
+ if (!n || !t) return n;
806
+ const e = t.split(".");
807
+ return e.reduce((r, o, i) => r.hasOwnProperty(o) ? r[o] : i == e.length - 1 ? void 0 : {}, n);
774
808
  }
775
- function Ht(n, e, t) {
776
- const o = e.split(".");
777
- return o.reduce((r, i, s) => (s === o.length - 1 && (r[i] = t), r[i]), n);
809
+ function Wt(n, t, e) {
810
+ if (!n || !t) return n;
811
+ const r = t.split(".");
812
+ return r.reduce((o, i, s) => (s === r.length - 1 && (o[i] = e), o.hasOwnProperty(i) ? o[i] : o[i] = {}), n);
778
813
  }
779
- function Wt(n) {
780
- return n.map((e, t) => n.slice(t).concat(n.slice(0, t)));
814
+ function Vt(n) {
815
+ return n.map((t, e) => n.slice(e).concat(n.slice(0, e)));
781
816
  }
782
817
  function Gt(n) {
783
- const e = window.structuredClone, t = (o) => o === null || typeof o != "object" ? o : K(Array.isArray(o) ? [] : {}, o);
818
+ const t = window.structuredClone, e = (r) => r === null || typeof r != "object" ? r : Q(Array.isArray(r) ? [] : {}, r);
784
819
  try {
785
- return e ? e(n) : t(n);
786
- } catch (o) {
787
- return console.error("structuredClone error:", o), e && t(n);
820
+ return t ? t(n) : e(n);
821
+ } catch (r) {
822
+ return console.error("structuredClone error:", r), t && e(n);
788
823
  }
789
824
  }
790
- function Vt(n, e, t = 30) {
825
+ function Zt(n, t, e = 30) {
791
826
  if (typeof n != "function")
792
827
  return console.error("第一个参数必须是一个函数。");
793
- if (!Array.isArray(e))
828
+ if (!Array.isArray(t))
794
829
  return console.error("第二个参数必须是一个数组。");
795
- let o = [], r = 0;
796
- const i = (s, a) => {
797
- for (const [u, l] of a)
830
+ let r = [], o = 0;
831
+ const i = (s, c) => {
832
+ for (const [u, l] of c)
798
833
  if (s >= u)
799
834
  return l;
800
835
  return "black";
801
836
  };
802
837
  return function(...s) {
803
- const a = performance.now(), u = n(...s), l = performance.now() - a;
804
- o.push(l), o.length > t && o.shift(), r = o.reduce((w, L) => w + L, 0) / o.length || 0;
805
- const d = i(l, e), f = i(r, e);
838
+ const c = performance.now(), u = n(...s), l = performance.now() - c;
839
+ r.push(l), r.length > e && r.shift(), o = r.reduce((g, y) => g + y, 0) / r.length || 0;
840
+ const m = i(l, t), d = i(o, t);
806
841
  return console.log(
807
842
  `%c单次耗时:${l.toFixed(2)}ms
808
- %c平均耗时(${o.length}次):${r.toFixed(2)}ms`,
809
- `color: ${d}; padding: 2px 0;`,
810
- `color: ${f}; padding: 2px 0;`
843
+ %c平均耗时(${r.length}次):${o.toFixed(2)}ms`,
844
+ `color: ${m}; padding: 2px 0;`,
845
+ `color: ${d}; padding: 2px 0;`
811
846
  ), u;
812
847
  };
813
848
  }
814
- function Zt(n) {
815
- const e = Date.now();
816
- let t = performance.now();
817
- for (; Date.now() - e < n; ) {
818
- t = Math.sin(t) * 1e6, (t > 1e6 || t < -1e6) && (t = 0);
849
+ function Kt(n) {
850
+ const t = Date.now();
851
+ let e = performance.now();
852
+ for (; Date.now() - t < n; ) {
853
+ e = Math.sin(e) * 1e6, (e > 1e6 || e < -1e6) && (e = 0);
819
854
  try {
820
- const o = t.toString().substring(0, 8);
821
- history.replaceState(null, "", `#${o}`);
855
+ const r = e.toString().substring(0, 8);
856
+ history.replaceState(null, "", `#${r}`);
822
857
  } catch {
823
858
  }
824
859
  }
825
- return Date.now() - e;
860
+ return Date.now() - t;
826
861
  }
827
- function Kt(n) {
828
- const e = ut(n, 100);
829
- let t = 0, o = 0;
830
- return function(r) {
831
- const i = r.target;
862
+ function Jt(n) {
863
+ const t = ut(n, 100);
864
+ let e = 0, r = 0;
865
+ return function(o) {
866
+ const i = o.target;
832
867
  if (!i || !(i instanceof Element)) return;
833
868
  const {
834
869
  scrollTop: s,
835
- scrollHeight: a,
870
+ scrollHeight: c,
836
871
  clientHeight: u,
837
872
  scrollLeft: l,
838
- scrollWidth: d,
839
- clientWidth: f
873
+ scrollWidth: m,
874
+ clientWidth: d
840
875
  } = i;
841
- function w() {
842
- if (t == s) return;
843
- const A = t > s;
844
- if (t = s, A) return;
845
- a - s - u <= 1 && e("vertical");
876
+ function g() {
877
+ if (e == s) return;
878
+ const E = e > s;
879
+ if (e = s, E) return;
880
+ c - s - u <= 1 && t("vertical");
846
881
  }
847
- function L() {
848
- if (o == l) return;
849
- const A = o > l;
850
- if (o = l, A) return;
851
- d - l - f <= 1 && e("horizontal");
882
+ function y() {
883
+ if (r == l) return;
884
+ const E = r > l;
885
+ if (r = l, E) return;
886
+ m - l - d <= 1 && t("horizontal");
852
887
  }
853
- w(), L();
888
+ g(), y();
854
889
  };
855
890
  }
856
- function Jt(n, e, t) {
857
- const { isClickAllowed: o, uiLibrary: r = ["naiveUI", "ElementPlus", "Element"] } = t || {}, i = function(u) {
891
+ function Qt(n, t, e) {
892
+ const { isClickAllowed: r, uiLibrary: o = ["naiveUI", "ElementPlus", "Element"] } = e || {}, i = function(u) {
858
893
  const l = [];
859
- for (const d in u)
860
- Object.hasOwnProperty.call(u, d) && r.includes(d) && l.push(...u[d]);
894
+ for (const m in u)
895
+ Object.hasOwnProperty.call(u, m) && o.includes(m) && l.push(...u[m]);
861
896
  return l;
862
897
  }({
863
898
  naiveUI: [
@@ -869,37 +904,37 @@ function Jt(n, e, t) {
869
904
  Element: [".el-popper"]
870
905
  });
871
906
  function s() {
872
- e(), document.removeEventListener("mousedown", a);
907
+ t(), document.removeEventListener("mousedown", c);
873
908
  }
874
- function a(u) {
875
- if (o) {
876
- const f = o(u);
877
- if (f) return;
878
- if (f === !1) return s();
909
+ function c(u) {
910
+ if (r) {
911
+ const d = r(u);
912
+ if (d) return;
913
+ if (d === !1) return s();
879
914
  }
880
915
  const l = u.target;
881
916
  if (!(l instanceof Element) || !l.isConnected) return;
882
- n.concat(i).some((f) => !!(l != null && l.closest(f))) || s();
917
+ n.concat(i).some((d) => !!(l != null && l.closest(d))) || s();
883
918
  }
884
919
  requestAnimationFrame(
885
- () => document.addEventListener("mousedown", a)
920
+ () => document.addEventListener("mousedown", c)
886
921
  );
887
922
  }
888
- var y, U, T, S, D, M, F, P, z;
889
- class Qt {
923
+ var v, j, I, z, O, C, L, U, N;
924
+ class te {
890
925
  constructor() {
891
- h(this, y);
892
- h(this, U, !1);
893
- h(this, T, {});
894
- h(this, S, 0);
895
- h(this, D, 0);
896
- h(this, M, 0);
897
- h(this, F, 0);
898
- h(this, P);
899
- h(this, z);
926
+ h(this, v);
927
+ h(this, j, !1);
928
+ h(this, I, {});
929
+ h(this, z, 0);
930
+ h(this, O, 0);
931
+ h(this, C, 0);
932
+ h(this, L, 0);
933
+ h(this, U);
934
+ h(this, N);
900
935
  }
901
- init(e, t) {
902
- m(this, y, e), m(this, P, t == null ? void 0 : t.limit), m(this, z, t == null ? void 0 : t.dragDom), m(this, T, {
936
+ init(t, e) {
937
+ f(this, v, t), f(this, U, e == null ? void 0 : e.limit), f(this, N, e == null ? void 0 : e.dragDom), f(this, I, {
903
938
  mousedown: this.mousedown.bind(this),
904
939
  mousemove: this.mousemove.bind(this),
905
940
  mouseup: this.mouseup.bind(this)
@@ -908,47 +943,47 @@ class Qt {
908
943
  finish() {
909
944
  this.bindOrUnbindEvent("unbind");
910
945
  }
911
- bindOrUnbindEvent(e) {
912
- const t = e === "bind" ? "addEventListener" : "removeEventListener";
913
- if (!c(this, y)) return console.error("No DOM");
914
- c(this, y)[t]("mousedown", c(this, T).mousedown), document[t]("mousemove", c(this, T).mousemove), document[t]("mouseup", c(this, T).mouseup);
946
+ bindOrUnbindEvent(t) {
947
+ const e = t === "bind" ? "addEventListener" : "removeEventListener";
948
+ if (!a(this, v)) return console.error("No DOM");
949
+ a(this, v)[e]("mousedown", a(this, I).mousedown), document[e]("mousemove", a(this, I).mousemove), document[e]("mouseup", a(this, I).mouseup);
915
950
  }
916
951
  alterLocation() {
917
- if (!c(this, y)) return console.error("No DOM");
918
- c(this, P) && (m(this, M, Math.min(c(this, M), c(this, P).max.top)), m(this, M, Math.max(c(this, M), c(this, P).min.top)), m(this, F, Math.min(c(this, F), c(this, P).max.left)), m(this, F, Math.max(c(this, F), c(this, P).min.left))), c(this, y).style.setProperty("--top", c(this, M) + "px"), c(this, y).style.setProperty("--left", c(this, F) + "px");
952
+ if (!a(this, v)) return console.error("No DOM");
953
+ a(this, U) && (f(this, C, Math.min(a(this, C), a(this, U).max.top)), f(this, C, Math.max(a(this, C), a(this, U).min.top)), f(this, L, Math.min(a(this, L), a(this, U).max.left)), f(this, L, Math.max(a(this, L), a(this, U).min.left))), a(this, v).style.setProperty("--top", a(this, C) + "px"), a(this, v).style.setProperty("--left", a(this, L) + "px");
919
954
  }
920
- mousedown(e) {
921
- if (!c(this, y)) return console.error("No DOM");
922
- if (c(this, z) && e.target != c(this, z)) return;
923
- document.body.classList.add("no-select"), m(this, U, !0);
924
- const t = c(this, y).getBoundingClientRect(), { pageX: o, pageY: r } = e;
925
- m(this, S, o), m(this, D, r), m(this, M, t.y), m(this, F, t.x);
955
+ mousedown(t) {
956
+ if (!a(this, v)) return console.error("No DOM");
957
+ if (a(this, N) && t.target != a(this, N)) return;
958
+ document.body.classList.add("no-select"), f(this, j, !0);
959
+ const e = a(this, v).getBoundingClientRect(), { pageX: r, pageY: o } = t;
960
+ f(this, z, r), f(this, O, o), f(this, C, e.y), f(this, L, e.x);
926
961
  }
927
- mousemove(e) {
928
- const { pageX: t, pageY: o } = e;
929
- c(this, U) && (m(this, M, c(this, M) + (o - c(this, D))), m(this, F, c(this, F) + (t - c(this, S))), m(this, S, t), m(this, D, o), this.alterLocation());
962
+ mousemove(t) {
963
+ const { pageX: e, pageY: r } = t;
964
+ a(this, j) && (f(this, C, a(this, C) + (r - a(this, O))), f(this, L, a(this, L) + (e - a(this, z))), f(this, z, e), f(this, O, r), this.alterLocation());
930
965
  }
931
966
  mouseup() {
932
- c(this, U) && (m(this, U, !1), document.body.classList.remove("no-select"));
967
+ a(this, j) && (f(this, j, !1), document.body.classList.remove("no-select"));
933
968
  }
934
969
  }
935
- y = new WeakMap(), U = new WeakMap(), T = new WeakMap(), S = new WeakMap(), D = new WeakMap(), M = new WeakMap(), F = new WeakMap(), P = new WeakMap(), z = new WeakMap();
936
- var v, j, R, O, N, b, _, g, q, $;
937
- class te {
970
+ v = new WeakMap(), j = new WeakMap(), I = new WeakMap(), z = new WeakMap(), O = new WeakMap(), C = new WeakMap(), L = new WeakMap(), U = new WeakMap(), N = new WeakMap();
971
+ var b, A, S, q, Y, _, M, x, $, X;
972
+ class ee {
938
973
  constructor() {
939
- h(this, v);
940
- h(this, j, !1);
941
- h(this, R, {});
942
- h(this, O, 0);
943
- h(this, N, 0);
944
- h(this, b, 0);
974
+ h(this, b);
975
+ h(this, A, !1);
976
+ h(this, S, {});
977
+ h(this, q, 0);
978
+ h(this, Y, 0);
945
979
  h(this, _, 0);
946
- h(this, g);
947
- h(this, q);
980
+ h(this, M, 0);
981
+ h(this, x);
948
982
  h(this, $);
983
+ h(this, X);
949
984
  }
950
- init(e, t = {}) {
951
- m(this, v, e), m(this, g, t.limit), m(this, q, t.update_move), m(this, $, t.update_up), m(this, R, {
985
+ init(t, e = {}) {
986
+ f(this, b, t), f(this, x, e.limit), f(this, $, e.update_move), f(this, X, e.update_up), f(this, S, {
952
987
  mousedown: this.mousedown.bind(this),
953
988
  mousemove: this.mousemove.bind(this),
954
989
  mouseup: this.mouseup.bind(this)
@@ -957,216 +992,229 @@ class te {
957
992
  finish() {
958
993
  this.bindOrUnbindEvent("unbind");
959
994
  }
960
- bindOrUnbindEvent(e) {
961
- const t = e === "bind" ? "addEventListener" : "removeEventListener";
962
- if (!c(this, v)) return console.error("No DOM");
963
- c(this, v)[t]("mousedown", c(this, R).mousedown), document[t]("mousemove", c(this, R).mousemove), document[t]("mouseup", c(this, R).mouseup);
995
+ bindOrUnbindEvent(t) {
996
+ const e = t === "bind" ? "addEventListener" : "removeEventListener";
997
+ if (!a(this, b)) return console.error("No DOM");
998
+ a(this, b)[e]("mousedown", a(this, S).mousedown), document[e]("mousemove", a(this, S).mousemove), document[e]("mouseup", a(this, S).mouseup);
964
999
  }
965
1000
  updateValue() {
966
- const e = {
967
- top: c(this, b),
968
- left: c(this, _),
1001
+ const t = {
1002
+ top: a(this, _),
1003
+ left: a(this, M),
969
1004
  percentage: { top: 0, left: 0 }
970
1005
  };
971
- if (c(this, g)) {
972
- const t = (o) => c(this, g) ? (e[o] - c(this, g).min[o]) / (c(this, g).max[o] - c(this, g).min[o]) : 0;
973
- e.percentage = {
974
- top: t("top") || 0,
975
- left: t("left") || 0
1006
+ if (a(this, x)) {
1007
+ const e = (r) => a(this, x) ? (t[r] - a(this, x).min[r]) / (a(this, x).max[r] - a(this, x).min[r]) : 0;
1008
+ t.percentage = {
1009
+ top: e("top") || 0,
1010
+ left: e("left") || 0
976
1011
  };
977
1012
  }
978
- return e;
1013
+ return t;
979
1014
  }
980
1015
  alterLocation() {
981
- if (!c(this, v)) return console.error("No DOM");
982
- c(this, g) && (m(this, b, Math.min(c(this, b), c(this, g).max.top)), m(this, b, Math.max(c(this, b), c(this, g).min.top)), m(this, _, Math.min(c(this, _), c(this, g).max.left)), m(this, _, Math.max(c(this, _), c(this, g).min.left))), c(this, q) && c(this, q).call(this, this.updateValue()), c(this, v).style.setProperty("--top", c(this, b) + "px"), c(this, v).style.setProperty("--left", c(this, _) + "px");
1016
+ if (!a(this, b)) return console.error("No DOM");
1017
+ a(this, x) && (f(this, _, Math.min(a(this, _), a(this, x).max.top)), f(this, _, Math.max(a(this, _), a(this, x).min.top)), f(this, M, Math.min(a(this, M), a(this, x).max.left)), f(this, M, Math.max(a(this, M), a(this, x).min.left))), a(this, $) && a(this, $).call(this, this.updateValue()), a(this, b).style.setProperty("--top", a(this, _) + "px"), a(this, b).style.setProperty("--left", a(this, M) + "px");
983
1018
  }
984
- mousedown(e) {
985
- if (!c(this, v)) return console.error("No DOM");
986
- document.body.classList.add("no-select"), m(this, j, !0);
987
- const t = c(this, v).getBoundingClientRect();
988
- m(this, N, t.y), m(this, O, t.x);
989
- const { pageX: o, pageY: r } = e;
990
- m(this, b, r - c(this, N)), m(this, _, o - c(this, O)), this.alterLocation();
1019
+ mousedown(t) {
1020
+ if (!a(this, b)) return console.error("No DOM");
1021
+ document.body.classList.add("no-select"), f(this, A, !0);
1022
+ const e = a(this, b).getBoundingClientRect();
1023
+ f(this, Y, e.y), f(this, q, e.x);
1024
+ const { pageX: r, pageY: o } = t;
1025
+ f(this, _, o - a(this, Y)), f(this, M, r - a(this, q)), this.alterLocation();
991
1026
  }
992
- mousemove(e) {
993
- const { pageX: t, pageY: o } = e;
994
- c(this, j) && (m(this, b, o - c(this, N)), m(this, _, t - c(this, O)), this.alterLocation());
1027
+ mousemove(t) {
1028
+ const { pageX: e, pageY: r } = t;
1029
+ a(this, A) && (f(this, _, r - a(this, Y)), f(this, M, e - a(this, q)), this.alterLocation());
995
1030
  }
996
1031
  mouseup() {
997
- c(this, j) && (m(this, j, !1), document.body.classList.remove("no-select"), c(this, $) && c(this, $).call(this, this.updateValue()));
1032
+ a(this, A) && (f(this, A, !1), document.body.classList.remove("no-select"), a(this, X) && a(this, X).call(this, this.updateValue()));
998
1033
  }
999
1034
  }
1000
- v = new WeakMap(), j = new WeakMap(), R = new WeakMap(), O = new WeakMap(), N = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), q = new WeakMap(), $ = new WeakMap();
1035
+ b = new WeakMap(), A = new WeakMap(), S = new WeakMap(), q = new WeakMap(), Y = new WeakMap(), _ = new WeakMap(), M = new WeakMap(), x = new WeakMap(), $ = new WeakMap(), X = new WeakMap();
1001
1036
  function mt(n) {
1002
- const e = n || document.documentElement;
1003
- return e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : Promise.reject("No Fullscreen API");
1037
+ const t = n || document.documentElement;
1038
+ return t.requestFullscreen ? t.requestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.msRequestFullscreen ? t.msRequestFullscreen() : Promise.reject("No Fullscreen API");
1004
1039
  }
1005
- function dt() {
1040
+ function ft() {
1006
1041
  const n = document;
1007
1042
  return document.exitFullscreen ? document.exitFullscreen() : n.mozCancelFullScreen ? n.mozCancelFullScreen() : n.webkitExitFullscreen ? n.webkitExitFullscreen() : n.msExitFullscreen ? n.msExitFullscreen() : Promise.reject("No ExitFullscreen API");
1008
1043
  }
1009
- function ft(n) {
1010
- const e = document, t = document.fullscreenElement || e.webkitFullscreenElement || e.mozFullScreenElement || e.msFullscreenElement;
1011
- return n ? n == t : document.documentElement == t || screen.width == window.innerWidth && screen.height == window.innerHeight;
1044
+ function dt(n) {
1045
+ const t = document, e = document.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement;
1046
+ return n ? n == e : document.documentElement == e || screen.width == window.innerWidth && screen.height == window.innerHeight;
1012
1047
  }
1013
- function ee(n) {
1048
+ function ne(n) {
1014
1049
  return function() {
1015
- ft(n) ? dt() : mt(n);
1050
+ dt(n) ? ft() : mt(n);
1016
1051
  };
1017
1052
  }
1018
- function ne(n, e) {
1053
+ function re(n, t) {
1019
1054
  if (typeof n == "number") return n;
1020
1055
  if (/px/.test(n)) return Number(n.replace(/px/, "")) || 0;
1021
- const t = document.createElement("div");
1022
- t.style.width = n, e = e || document.body, e.appendChild(t);
1023
- const o = t.getBoundingClientRect().width;
1024
- return e.removeChild(t), o;
1056
+ const e = document.createElement("div");
1057
+ e.style.width = n, t = t || document.body, t.appendChild(e);
1058
+ const r = e.getBoundingClientRect().width;
1059
+ return t.removeChild(e), r;
1025
1060
  }
1026
- function oe(n, e) {
1061
+ function oe(n, t) {
1027
1062
  if (!n) return;
1028
- let t, o;
1029
- if (typeof e == "string") {
1030
- const i = document.querySelector(e);
1063
+ let e, r;
1064
+ if (typeof t == "string") {
1065
+ const i = document.querySelector(t);
1031
1066
  if (!i) return;
1032
1067
  const s = i.getBoundingClientRect();
1033
- t = s.width, o = s.height;
1034
- } else if (Array.isArray(e))
1035
- t = e[0], o = e[1];
1068
+ e = s.width, r = s.height;
1069
+ } else if (Array.isArray(t))
1070
+ e = t[0], r = t[1];
1036
1071
  else {
1037
- const i = e.getBoundingClientRect();
1038
- t = i.width, o = i.height;
1072
+ const i = t.getBoundingClientRect();
1073
+ e = i.width, r = i.height;
1039
1074
  }
1040
- const r = t / o;
1041
- return r > n ? [n * o, o] : r < n ? [t, t / n] : [t, o];
1075
+ const o = e / r;
1076
+ return o > n ? [n * r, r] : o < n ? [e, e / n] : [e, r];
1042
1077
  }
1043
- function re(n, e = 5e3) {
1044
- return new Promise((t, o) => {
1045
- const r = new Image();
1046
- r.src = n;
1078
+ function ie(n, t = 5e3) {
1079
+ return new Promise((e, r) => {
1080
+ const o = new Image();
1081
+ o.src = n;
1047
1082
  const i = setTimeout(() => {
1048
- o(new Error("图片加载超时")), r.onload = null, r.onerror = null;
1049
- }, e);
1050
- r.onload = () => {
1083
+ r(new Error("图片加载超时")), o.onload = null, o.onerror = null;
1084
+ }, t);
1085
+ o.onload = () => {
1051
1086
  clearTimeout(i);
1052
- const s = r.naturalWidth, a = r.naturalHeight, u = s / a;
1053
- t([r, u]);
1054
- }, r.onerror = () => {
1055
- clearTimeout(i), o(new Error("图片加载失败"));
1056
- }, r.crossOrigin = "Anonymous";
1087
+ const s = o.naturalWidth, c = o.naturalHeight, u = s / c;
1088
+ e([o, u]);
1089
+ }, o.onerror = () => {
1090
+ clearTimeout(i), r(new Error("图片加载失败"));
1091
+ }, o.crossOrigin = "Anonymous";
1057
1092
  });
1058
1093
  }
1059
- function ie(n) {
1060
- return new Promise((e, t) => {
1061
- fetch(n).then((o) => e(o.text())).catch((o) => {
1062
- console.error("Error fetching :", o), t(o);
1094
+ function se(n) {
1095
+ return new Promise((t, e) => {
1096
+ fetch(n).then((r) => t(r.text())).catch((r) => {
1097
+ console.error("Error fetching :", r), e(r);
1063
1098
  });
1064
1099
  });
1065
1100
  }
1066
- function ht(n, e) {
1067
- return new Promise((t, o) => {
1101
+ function ht(n, t) {
1102
+ return new Promise((e, r) => {
1068
1103
  try {
1069
- e = e || Z(n, "downloaded_file"), fetch(n).then((r) => (r.ok || o(`文件下载失败,状态码: ${r.status}`), r.blob())).then((r) => {
1070
- const i = URL.createObjectURL(r), s = document.createElement("a");
1071
- s.href = i, s.download = decodeURIComponent(e), document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(i), t(r);
1072
- }).catch(o);
1073
- } catch (r) {
1074
- o(r);
1104
+ t = t || J(n, "downloaded_file"), fetch(n).then((o) => (o.ok || r(`文件下载失败,状态码: ${o.status}`), o.blob())).then((o) => {
1105
+ const i = URL.createObjectURL(o), s = document.createElement("a");
1106
+ s.href = i, s.download = decodeURIComponent(t), document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(i), e(o);
1107
+ }).catch(r);
1108
+ } catch (o) {
1109
+ r(o);
1075
1110
  }
1076
1111
  });
1077
1112
  }
1078
- function se(n, e, t) {
1079
- if (!t) {
1080
- let i = e.replace(/^[^.]+./, "");
1081
- i = i == e ? "text/plain" : "application/" + i, t = { type: i };
1113
+ function ce(n, t, e) {
1114
+ if (!e) {
1115
+ let i = t.replace(/^[^.]+./, "");
1116
+ i = i == t ? "text/plain" : "application/" + i, e = { type: i };
1082
1117
  }
1083
- const o = new Blob(n, t), r = URL.createObjectURL(o);
1084
- ht(r, e);
1118
+ const r = new Blob(n, e), o = URL.createObjectURL(r);
1119
+ ht(o, t);
1085
1120
  }
1086
- const pt = Math.PI / 2, W = Math.PI / 180, G = 6378137, gt = 85.05112878;
1087
- function ce(n, e) {
1088
- const t = Math.max(Math.min(n, 180), -180), o = Math.max(Math.min(e, gt), -85.05112878), r = t * W * G, i = o * W, s = Math.log(Math.tan(Math.PI / 4 + i / 2)) * G;
1089
- return [r, s];
1121
+ const pt = Math.PI / 2, G = Math.PI / 180, Z = 6378137, gt = 85.05112878;
1122
+ function ae(n, t) {
1123
+ const e = Math.max(Math.min(n, 180), -180), r = Math.max(Math.min(t, gt), -85.05112878), o = e * G * Z, i = r * G, s = Math.log(Math.tan(Math.PI / 4 + i / 2)) * Z;
1124
+ return [o, s];
1090
1125
  }
1091
- function ae(n, e) {
1092
- const t = n / G / W, o = (2 * Math.atan(Math.exp(e / G)) - pt) / W;
1093
- return [t, o];
1126
+ function le(n, t) {
1127
+ const e = n / Z / G, r = (2 * Math.atan(Math.exp(t / Z)) - pt) / G;
1128
+ return [e, r];
1094
1129
  }
1095
- function le(n, e, t) {
1096
- const [o, r] = n, [i, s] = e, [a, u] = t, l = (a - i) ** 2 + (u - s) ** 2;
1097
- if (l === 0) return Math.sqrt((o - i) ** 2 + (r - s) ** 2);
1098
- let d = ((o - i) * (a - i) + (r - s) * (u - s)) / l;
1099
- return d = Math.max(0, Math.min(1, d)), Math.sqrt(
1100
- (o - (i + d * (a - i))) ** 2 + (r - (s + d * (u - s))) ** 2
1130
+ function ue(n, t, e) {
1131
+ const [r, o] = n, [i, s] = t, [c, u] = e, l = (c - i) ** 2 + (u - s) ** 2;
1132
+ if (l === 0) return Math.sqrt((r - i) ** 2 + (o - s) ** 2);
1133
+ let m = ((r - i) * (c - i) + (o - s) * (u - s)) / l;
1134
+ return m = Math.max(0, Math.min(1, m)), Math.sqrt(
1135
+ (r - (i + m * (c - i))) ** 2 + (o - (s + m * (u - s))) ** 2
1101
1136
  );
1102
1137
  }
1103
- function ue(n, e, t, o, r) {
1104
- const i = n + t * Math.cos(o), s = e + t * Math.sin(o), a = n + t * Math.cos(r), u = e + t * Math.sin(r);
1138
+ function me(n, t, e, r, o, i = 1, s = 1) {
1139
+ const c = n + e * Math.cos(r) * i, u = t + e * Math.sin(r) * s, l = n + e * Math.cos(o) * i, m = t + e * Math.sin(o) * s;
1105
1140
  return [
1106
- [i, s],
1107
- [a, u]
1141
+ [c, u],
1142
+ [l, m]
1108
1143
  ];
1109
1144
  }
1110
- function me(n, e, t, o) {
1111
- return Math.sqrt(Math.pow(t - n, 2) + Math.pow(o - e, 2));
1145
+ function fe(n, t, e, r) {
1146
+ return Math.sqrt(Math.pow(e - n, 2) + Math.pow(r - t, 2));
1147
+ }
1148
+ function de(n, t, e, r) {
1149
+ const o = (n + e) / 2, i = (t + r) / 2;
1150
+ return { x: o, y: i };
1112
1151
  }
1113
- function de(n, e, t, o) {
1114
- const r = (n + t) / 2, i = (e + o) / 2;
1115
- return { x: r, y: i };
1152
+ function he(n, t, e, r) {
1153
+ const [o, i] = n, [s, c] = t;
1154
+ let u = 1 / 0;
1155
+ if (s !== 0) {
1156
+ const l = s > 0 ? (e - o) / s : -o / s;
1157
+ l > 0 && (u = Math.min(u, l));
1158
+ }
1159
+ if (c !== 0) {
1160
+ const l = c > 0 ? (r - i) / c : -i / c;
1161
+ l > 0 && (u = Math.min(u, l));
1162
+ }
1163
+ return u === 1 / 0 ? n : [o + s * u, i + c * u];
1116
1164
  }
1117
- class k {
1118
- constructor(e, t) {
1119
- E(this, "resolve");
1120
- E(this, "reject");
1121
- this.resolve = e, this.reject = t;
1165
+ class D {
1166
+ constructor(t, e) {
1167
+ F(this, "resolve");
1168
+ F(this, "reject");
1169
+ this.resolve = t, this.reject = e;
1122
1170
  }
1123
- run(e) {
1124
- var t, o;
1125
- return e instanceof Promise ? e.then((r) => {
1171
+ run(t) {
1172
+ var e, r;
1173
+ return t instanceof Promise ? t.then((o) => {
1126
1174
  var i;
1127
- return (i = this.resolve) == null || i.call(this), r;
1128
- }).catch((r) => {
1175
+ return (i = this.resolve) == null || i.call(this), o;
1176
+ }).catch((o) => {
1129
1177
  var i;
1130
- return (i = this.reject) == null || i.call(this), Promise.reject(r);
1131
- }) : e ? (t = this.resolve) == null || t.call(this) : (o = this.reject) == null || o.call(this), e;
1178
+ return (i = this.reject) == null || i.call(this), Promise.reject(o);
1179
+ }) : t ? (e = this.resolve) == null || e.call(this) : (r = this.reject) == null || r.call(this), t;
1132
1180
  }
1133
1181
  }
1134
- class xt extends k {
1135
- constructor(e) {
1136
- super(), this.resolve = e;
1182
+ class xt extends D {
1183
+ constructor(t) {
1184
+ super(), this.resolve = t;
1137
1185
  }
1138
- warning(...e) {
1139
- const t = () => {
1140
- var o, r;
1141
- return (r = (o = Y.tips).warning) == null ? void 0 : r.call(o, ...e);
1186
+ warning(...t) {
1187
+ const e = () => {
1188
+ var r, o;
1189
+ return (o = (r = B.tips).warning) == null ? void 0 : o.call(r, ...t);
1142
1190
  };
1143
- return new k(this.resolve, t);
1191
+ return new D(this.resolve, e);
1144
1192
  }
1145
- error(...e) {
1146
- const t = () => {
1147
- var o, r;
1148
- return (r = (o = Y.tips).error) == null ? void 0 : r.call(o, ...e);
1193
+ error(...t) {
1194
+ const e = () => {
1195
+ var r, o;
1196
+ return (o = (r = B.tips).error) == null ? void 0 : o.call(r, ...t);
1149
1197
  };
1150
- return new k(this.resolve, t);
1198
+ return new D(this.resolve, e);
1151
1199
  }
1152
1200
  }
1153
- class wt extends k {
1154
- constructor(e) {
1155
- super(), this.reject = e;
1201
+ class wt extends D {
1202
+ constructor(t) {
1203
+ super(), this.reject = t;
1156
1204
  }
1157
- info(...e) {
1158
- const t = () => {
1159
- var o, r;
1160
- return (r = (o = Y.tips).info) == null ? void 0 : r.call(o, ...e);
1205
+ info(...t) {
1206
+ const e = () => {
1207
+ var r, o;
1208
+ return (o = (r = B.tips).info) == null ? void 0 : o.call(r, ...t);
1161
1209
  };
1162
- return new k(t, this.reject);
1210
+ return new D(e, this.reject);
1163
1211
  }
1164
- success(...e) {
1165
- const t = () => {
1166
- var o, r;
1167
- return (r = (o = Y.tips).success) == null ? void 0 : r.call(o, ...e);
1212
+ success(...t) {
1213
+ const e = () => {
1214
+ var r, o;
1215
+ return (o = (r = B.tips).success) == null ? void 0 : o.call(r, ...t);
1168
1216
  };
1169
- return new k(t, this.reject);
1217
+ return new D(e, this.reject);
1170
1218
  }
1171
1219
  }
1172
1220
  const p = class p {
@@ -1178,95 +1226,97 @@ const p = class p {
1178
1226
  if (new.target === p)
1179
1227
  throw new Error("请直接使用静态方法,而不是实例化此类");
1180
1228
  }
1181
- static register(e, t) {
1182
- if (typeof t != "function")
1229
+ static register(t, e) {
1230
+ if (typeof e != "function")
1183
1231
  return console.error("TipHandler must be a function");
1184
- p.tips[e] = t;
1232
+ p.tips[t] = e;
1185
1233
  }
1186
- static resolveTip(e) {
1187
- return function(...t) {
1188
- const o = () => {
1189
- var r, i;
1190
- return (i = (r = p.tips)[e]) == null ? void 0 : i.call(r, ...t);
1234
+ static resolveTip(t) {
1235
+ return function(...e) {
1236
+ const r = () => {
1237
+ var o, i;
1238
+ return (i = (o = p.tips)[t]) == null ? void 0 : i.call(o, ...e);
1191
1239
  };
1192
- return new xt(o);
1240
+ return new xt(r);
1193
1241
  };
1194
1242
  }
1195
- static rejectTip(e) {
1196
- return function(...t) {
1197
- const o = () => {
1198
- var r, i;
1199
- return (i = (r = p.tips)[e]) == null ? void 0 : i.call(r, ...t);
1243
+ static rejectTip(t) {
1244
+ return function(...e) {
1245
+ const r = () => {
1246
+ var o, i;
1247
+ return (i = (o = p.tips)[t]) == null ? void 0 : i.call(o, ...e);
1200
1248
  };
1201
- return new wt(o);
1249
+ return new wt(r);
1202
1250
  };
1203
1251
  }
1204
1252
  };
1205
- E(p, "tips", {
1253
+ F(p, "tips", {
1206
1254
  info: void 0,
1207
1255
  success: void 0,
1208
1256
  warning: void 0,
1209
1257
  error: void 0
1210
- }), E(p, "info", p.resolveTip("info")), E(p, "success", p.resolveTip("success")), E(p, "warning", p.rejectTip("warning")), E(p, "error", p.rejectTip("error"));
1211
- let Y = p;
1258
+ }), F(p, "info", p.resolveTip("info")), F(p, "success", p.resolveTip("success")), F(p, "warning", p.rejectTip("warning")), F(p, "error", p.rejectTip("error"));
1259
+ let B = p;
1212
1260
  export {
1213
1261
  bt as _Animate_CreateOscillator,
1214
1262
  _t as _Animate_NumericTransition,
1215
1263
  vt as _Animate_Schedule,
1216
- Et as _Blob_ConvertDataToImageUrl,
1264
+ Mt as _Blob_ConvertDataToImageUrl,
1217
1265
  Ft as _Browser_CopyToClipboard,
1218
- Mt as _Browser_GetFrameRate,
1266
+ Et as _Browser_GetFrameRate,
1219
1267
  ct as _Browser_KeyedWindowManager,
1220
1268
  oe as _Element_CalculateCanvasSize,
1221
- Jt as _Element_CloseOnOutsideClick,
1222
- Qt as _Element_Drag,
1269
+ Qt as _Element_CloseOnOutsideClick,
1270
+ te as _Element_Drag,
1223
1271
  mt as _Element_EnterFullscreen,
1224
- dt as _Element_ExitFullscreen,
1225
- ee as _Element_Fullscreen,
1226
- ne as _Element_GetOtherSizeInPixels,
1227
- ft as _Element_IsFullscreen,
1228
- re as _Element_LoadImage,
1229
- te as _Element_LocalDrag,
1230
- Kt as _Element_ScrollEndListener,
1231
- se as _File_CreateAndDownload,
1272
+ ft as _Element_ExitFullscreen,
1273
+ ne as _Element_Fullscreen,
1274
+ re as _Element_GetOtherSizeInPixels,
1275
+ dt as _Element_IsFullscreen,
1276
+ ie as _Element_LoadImage,
1277
+ ee as _Element_LocalDrag,
1278
+ Jt as _Element_ScrollEndListener,
1279
+ ce as _File_CreateAndDownload,
1232
1280
  ht as _File_Download,
1233
- ie as _File_Read,
1234
- Rt as _Format_CamelCase,
1281
+ se as _File_Read,
1282
+ jt as _Format_CamelCase,
1235
1283
  Ct as _Format_CapitalizeFirstLetter,
1236
- At as _Format_ExcludeSubstring,
1237
- Tt as _Format_FileSize,
1238
- Z as _Format_HrefName,
1239
- Lt as _Format_NumberWithCommas,
1240
- Ut as _Format_NumberWithUnit,
1241
- Pt as _Format_Percentage,
1242
- jt as _Format_Timestamp,
1243
- me as _Math_CalculateDistance2D,
1244
- ue as _Math_GetArcPoints,
1284
+ It as _Format_ExcludeSubstring,
1285
+ Ut as _Format_FileSize,
1286
+ J as _Format_HrefName,
1287
+ Tt as _Format_NumberWithCommas,
1288
+ Pt as _Format_NumberWithUnit,
1289
+ Lt as _Format_Percentage,
1290
+ Rt as _Format_Timestamp,
1291
+ fe as _Math_CalculateDistance2D,
1292
+ me as _Math_GetArcPoints,
1293
+ he as _Math_GetBoundaryIntersection,
1245
1294
  de as _Math_GetMidpoint,
1246
- ce as _Math_LngLatToPlane,
1247
- ae as _Math_PlaneToLngLat,
1248
- le as _Math_PointToLineDistance,
1249
- Y as _Tip,
1295
+ ae as _Math_LngLatToPlane,
1296
+ le as _Math_PlaneToLngLat,
1297
+ ue as _Math_PointToLineDistance,
1298
+ B as _Tip,
1250
1299
  Gt as _Utility_Clone,
1251
1300
  ut as _Utility_Debounce,
1252
- Nt as _Utility_ExecuteWhenIdle,
1301
+ qt as _Utility_ExecuteWhenIdle,
1253
1302
  $t as _Utility_GenerateUUID,
1254
- Xt as _Utility_GetTargetByPath,
1303
+ Ht as _Utility_GetTargetByPath,
1255
1304
  Bt as _Utility_InitTargetByPath,
1256
- K as _Utility_MergeObjects,
1257
- Wt as _Utility_RotateList,
1258
- Zt as _Utility_Sleep,
1259
- Yt as _Utility_Throttle,
1260
- Vt as _Utility_TimeConsumption,
1261
- Ht as _Utility_UpdateTargetByPath,
1262
- qt as _Utility_WaitForCondition,
1263
- Ot as _Valid_CheckConnectionWithXHR,
1264
- nt as _Valid_DataType,
1305
+ Q as _Utility_MergeObjects,
1306
+ Vt as _Utility_RotateList,
1307
+ Wt as _Utility_SetTargetByPath,
1308
+ Kt as _Utility_Sleep,
1309
+ Xt as _Utility_Throttle,
1310
+ Zt as _Utility_TimeConsumption,
1311
+ Yt as _Utility_WaitForCondition,
1312
+ Nt as _Valid_CheckConnectionWithXHR,
1313
+ rt as _Valid_DataType,
1314
+ zt as _Valid_DoesInfiniteLineIntersectRectangle,
1265
1315
  ot as _Valid_FileTypeChecker,
1266
- kt as _Valid_Is2DNumberArray,
1267
- St as _Valid_IsInMargin,
1316
+ St as _Valid_Is2DNumberArray,
1317
+ kt as _Valid_IsInMargin,
1268
1318
  lt as _Valid_IsNumberArray,
1269
- It as _Valid_IsObject,
1319
+ At as _Valid_IsObject,
1270
1320
  Dt as _Valid_IsPointInPolygon,
1271
- zt as _Valid_IsSecureContext
1321
+ Ot as _Valid_IsSecureContext
1272
1322
  };