@363045841yyt/klinechart 0.5.3 → 0.5.5-alpha.0
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/README.md +140 -140
- package/dist/index.cjs +9 -9
- package/dist/index.js +1109 -1035
- package/dist/klinechart.css +1 -1
- package/dist/mock-stock-data.json +1 -0
- package/dist/src/components/KLineChart.vue.d.ts +2 -0
- package/dist/src/plugin/types.d.ts +12 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, markRaw as d, nextTick as f, normalizeClass as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, reactive as v, ref as y, renderList as b, resolveDynamicComponent as x, shallowRef as S, toDisplayString as C, unref as w, watch as T, withCtx as E, withModifiers as D } from "vue";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
|
-
var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescriptor, j = Object.getOwnPropertyNames, M = Object.getPrototypeOf, N = Object.prototype.hasOwnProperty, ee = (e, t) => () => (e && (t = e(e = 0)), t), P = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports),
|
|
3
|
+
var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescriptor, j = Object.getOwnPropertyNames, M = Object.getPrototypeOf, N = Object.prototype.hasOwnProperty, ee = (e, t) => () => (e && (t = e(e = 0)), t), P = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), te = (e, t) => {
|
|
4
4
|
let n = {};
|
|
5
5
|
for (var r in e) k(n, r, {
|
|
6
6
|
get: e[r],
|
|
7
7
|
enumerable: !0
|
|
8
8
|
});
|
|
9
9
|
return t || k(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
10
|
-
},
|
|
10
|
+
}, ne = (e, t, n, r) => {
|
|
11
11
|
if (t && typeof t == "object" || typeof t == "function") for (var i = j(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !N.call(e, s) && s !== n && k(e, s, {
|
|
12
12
|
get: ((e) => t[e]).bind(null, s),
|
|
13
13
|
enumerable: !(r = A(t, s)) || r.enumerable
|
|
14
14
|
});
|
|
15
15
|
return e;
|
|
16
|
-
},
|
|
16
|
+
}, re = (e, t, n) => (n = e == null ? {} : O(M(e)), ne(t || !e || !e.__esModule ? k(n, "default", {
|
|
17
17
|
value: e,
|
|
18
18
|
enumerable: !0
|
|
19
|
-
}) : n, e)),
|
|
19
|
+
}) : n, e)), ie = (e) => N.call(e, "module.exports") ? e["module.exports"] : ne(k({}, "__esModule", { value: !0 }), e), F = class {
|
|
20
20
|
listeners = /* @__PURE__ */ new Map();
|
|
21
21
|
on(e, t) {
|
|
22
22
|
this.listeners.has(e) || this.listeners.set(e, /* @__PURE__ */ new Set()), this.listeners.get(e).add(t);
|
|
@@ -50,84 +50,84 @@ var O = Object.create, k = Object.defineProperty, A = Object.getOwnPropertyDescr
|
|
|
50
50
|
};
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/helpers/bind.js
|
|
53
|
-
function
|
|
53
|
+
function ae(e, t) {
|
|
54
54
|
return function() {
|
|
55
55
|
return e.apply(t, arguments);
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/utils.js
|
|
60
|
-
var { toString:
|
|
61
|
-
let n =
|
|
60
|
+
var { toString: oe } = Object.prototype, { getPrototypeOf: se } = Object, { iterator: I, toStringTag: L } = Symbol, R = ((e) => (t) => {
|
|
61
|
+
let n = oe.call(t);
|
|
62
62
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
63
|
-
})(Object.create(null)),
|
|
64
|
-
function
|
|
65
|
-
return e !== null && !
|
|
63
|
+
})(Object.create(null)), z = (e) => (e = e.toLowerCase(), (t) => R(t) === e), ce = (e) => (t) => typeof t === e, { isArray: le } = Array, ue = ce("undefined");
|
|
64
|
+
function de(e) {
|
|
65
|
+
return e !== null && !ue(e) && e.constructor !== null && !ue(e.constructor) && B(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
66
66
|
}
|
|
67
|
-
var
|
|
68
|
-
function
|
|
67
|
+
var fe = z("ArrayBuffer");
|
|
68
|
+
function pe(e) {
|
|
69
69
|
let t;
|
|
70
|
-
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer &&
|
|
71
|
-
}
|
|
72
|
-
var
|
|
73
|
-
if (
|
|
74
|
-
let t =
|
|
75
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
76
|
-
},
|
|
77
|
-
if (!
|
|
70
|
+
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && fe(e.buffer), t;
|
|
71
|
+
}
|
|
72
|
+
var me = ce("string"), B = ce("function"), he = ce("number"), ge = (e) => typeof e == "object" && !!e, _e = (e) => e === !0 || e === !1, ve = (e) => {
|
|
73
|
+
if (R(e) !== "object") return !1;
|
|
74
|
+
let t = se(e);
|
|
75
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(L in e) && !(I in e);
|
|
76
|
+
}, ye = (e) => {
|
|
77
|
+
if (!ge(e) || de(e)) return !1;
|
|
78
78
|
try {
|
|
79
79
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
80
80
|
} catch {
|
|
81
81
|
return !1;
|
|
82
82
|
}
|
|
83
|
-
},
|
|
84
|
-
function
|
|
83
|
+
}, be = z("Date"), xe = z("File"), Se = (e) => !!(e && e.uri !== void 0), Ce = (e) => e && e.getParts !== void 0, we = z("Blob"), Te = z("FileList"), Ee = (e) => ge(e) && B(e.pipe);
|
|
84
|
+
function De() {
|
|
85
85
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
86
86
|
}
|
|
87
|
-
var
|
|
87
|
+
var Oe = De(), ke = Oe.FormData === void 0 ? void 0 : Oe.FormData, Ae = (e) => {
|
|
88
88
|
if (!e) return !1;
|
|
89
|
-
if (
|
|
90
|
-
let t =
|
|
91
|
-
if (!t || t === Object.prototype || !
|
|
92
|
-
let n =
|
|
93
|
-
return n === "formdata" || n === "object" &&
|
|
94
|
-
},
|
|
89
|
+
if (ke && e instanceof ke) return !0;
|
|
90
|
+
let t = se(e);
|
|
91
|
+
if (!t || t === Object.prototype || !B(e.append)) return !1;
|
|
92
|
+
let n = R(e);
|
|
93
|
+
return n === "formdata" || n === "object" && B(e.toString) && e.toString() === "[object FormData]";
|
|
94
|
+
}, je = z("URLSearchParams"), [Me, Ne, Pe, Fe] = [
|
|
95
95
|
"ReadableStream",
|
|
96
96
|
"Request",
|
|
97
97
|
"Response",
|
|
98
98
|
"Headers"
|
|
99
|
-
].map(
|
|
100
|
-
function
|
|
99
|
+
].map(z), Ie = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
100
|
+
function Le(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
101
101
|
if (e == null) return;
|
|
102
102
|
let r, i;
|
|
103
|
-
if (typeof e != "object" && (e = [e]),
|
|
103
|
+
if (typeof e != "object" && (e = [e]), le(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
104
104
|
else {
|
|
105
|
-
if (
|
|
105
|
+
if (de(e)) return;
|
|
106
106
|
let i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = i.length, o;
|
|
107
107
|
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
110
|
+
function Re(e, t) {
|
|
111
|
+
if (de(e)) return null;
|
|
112
112
|
t = t.toLowerCase();
|
|
113
113
|
let n = Object.keys(e), r = n.length, i;
|
|
114
114
|
for (; r-- > 0;) if (i = n[r], t === i.toLowerCase()) return i;
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
-
var
|
|
118
|
-
function
|
|
119
|
-
let { caseless: t, skipUndefined: n } =
|
|
117
|
+
var ze = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Be = (e) => !ue(e) && e !== ze;
|
|
118
|
+
function V(...e) {
|
|
119
|
+
let { caseless: t, skipUndefined: n } = Be(this) && this || {}, r = {}, i = (e, i) => {
|
|
120
120
|
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
121
|
-
let a = t &&
|
|
122
|
-
|
|
121
|
+
let a = t && Re(r, i) || i, o = Ze(r, a) ? r[a] : void 0;
|
|
122
|
+
ve(o) && ve(e) ? r[a] = V(o, e) : ve(e) ? r[a] = V({}, e) : le(e) ? r[a] = e.slice() : (!n || !ue(e)) && (r[a] = e);
|
|
123
123
|
};
|
|
124
|
-
for (let t = 0, n = e.length; t < n; t++) e[t] &&
|
|
124
|
+
for (let t = 0, n = e.length; t < n; t++) e[t] && Le(e[t], i);
|
|
125
125
|
return r;
|
|
126
126
|
}
|
|
127
|
-
var
|
|
128
|
-
n &&
|
|
127
|
+
var Ve = (e, t, n, { allOwnKeys: r } = {}) => (Le(t, (t, r) => {
|
|
128
|
+
n && B(t) ? Object.defineProperty(e, r, {
|
|
129
129
|
__proto__: null,
|
|
130
|
-
value:
|
|
130
|
+
value: ae(t, n),
|
|
131
131
|
writable: !0,
|
|
132
132
|
enumerable: !0,
|
|
133
133
|
configurable: !0
|
|
@@ -138,7 +138,7 @@ var ze = (e, t, n, { allOwnKeys: r } = {}) => (Pe(t, (t, r) => {
|
|
|
138
138
|
enumerable: !0,
|
|
139
139
|
configurable: !0
|
|
140
140
|
});
|
|
141
|
-
}, { allOwnKeys: r }), e),
|
|
141
|
+
}, { allOwnKeys: r }), e), H = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), He = (e, t, n, r) => {
|
|
142
142
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
143
143
|
__proto__: null,
|
|
144
144
|
value: e,
|
|
@@ -149,53 +149,53 @@ var ze = (e, t, n, { allOwnKeys: r } = {}) => (Pe(t, (t, r) => {
|
|
|
149
149
|
__proto__: null,
|
|
150
150
|
value: t.prototype
|
|
151
151
|
}), n && Object.assign(e.prototype, n);
|
|
152
|
-
},
|
|
152
|
+
}, Ue = (e, t, n, r) => {
|
|
153
153
|
let i, a, o, s = {};
|
|
154
154
|
if (t ||= {}, e == null) return t;
|
|
155
155
|
do {
|
|
156
156
|
for (i = Object.getOwnPropertyNames(e), a = i.length; a-- > 0;) o = i[a], (!r || r(o, e, t)) && !s[o] && (t[o] = e[o], s[o] = !0);
|
|
157
|
-
e = n !== !1 &&
|
|
157
|
+
e = n !== !1 && se(e);
|
|
158
158
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
159
159
|
return t;
|
|
160
|
-
},
|
|
160
|
+
}, We = (e, t, n) => {
|
|
161
161
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
162
162
|
let r = e.indexOf(t, n);
|
|
163
163
|
return r !== -1 && r === n;
|
|
164
|
-
},
|
|
164
|
+
}, Ge = (e) => {
|
|
165
165
|
if (!e) return null;
|
|
166
|
-
if (
|
|
166
|
+
if (le(e)) return e;
|
|
167
167
|
let t = e.length;
|
|
168
|
-
if (!
|
|
168
|
+
if (!he(t)) return null;
|
|
169
169
|
let n = Array(t);
|
|
170
170
|
for (; t-- > 0;) n[t] = e[t];
|
|
171
171
|
return n;
|
|
172
|
-
},
|
|
173
|
-
let n = (e && e[
|
|
172
|
+
}, Ke = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && se(Uint8Array)), qe = (e, t) => {
|
|
173
|
+
let n = (e && e[I]).call(e), r;
|
|
174
174
|
for (; (r = n.next()) && !r.done;) {
|
|
175
175
|
let n = r.value;
|
|
176
176
|
t.call(e, n[0], n[1]);
|
|
177
177
|
}
|
|
178
|
-
},
|
|
178
|
+
}, Je = (e, t) => {
|
|
179
179
|
let n, r = [];
|
|
180
180
|
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
181
181
|
return r;
|
|
182
|
-
},
|
|
182
|
+
}, Ye = z("HTMLFormElement"), Xe = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
183
183
|
return t.toUpperCase() + n;
|
|
184
|
-
}),
|
|
184
|
+
}), Ze = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Qe = z("RegExp"), $e = (e, t) => {
|
|
185
185
|
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
186
|
-
|
|
186
|
+
Le(n, (n, i) => {
|
|
187
187
|
let a;
|
|
188
188
|
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
189
189
|
}), Object.defineProperties(e, r);
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
if (
|
|
190
|
+
}, et = (e) => {
|
|
191
|
+
$e(e, (t, n) => {
|
|
192
|
+
if (B(e) && [
|
|
193
193
|
"arguments",
|
|
194
194
|
"caller",
|
|
195
195
|
"callee"
|
|
196
196
|
].includes(n)) return !1;
|
|
197
197
|
let r = e[n];
|
|
198
|
-
if (
|
|
198
|
+
if (B(r)) {
|
|
199
199
|
if (t.enumerable = !1, "writable" in t) {
|
|
200
200
|
t.writable = !1;
|
|
201
201
|
return;
|
|
@@ -205,99 +205,99 @@ var ze = (e, t, n, { allOwnKeys: r } = {}) => (Pe(t, (t, r) => {
|
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
|
-
},
|
|
208
|
+
}, tt = (e, t) => {
|
|
209
209
|
let n = {}, r = (e) => {
|
|
210
210
|
e.forEach((e) => {
|
|
211
211
|
n[e] = !0;
|
|
212
212
|
});
|
|
213
213
|
};
|
|
214
|
-
return
|
|
215
|
-
},
|
|
216
|
-
function
|
|
217
|
-
return !!(e &&
|
|
214
|
+
return le(e) ? r(e) : r(String(e).split(t)), n;
|
|
215
|
+
}, nt = () => {}, rt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
216
|
+
function it(e) {
|
|
217
|
+
return !!(e && B(e.append) && e[L] === "FormData" && e[I]);
|
|
218
218
|
}
|
|
219
|
-
var
|
|
219
|
+
var at = (e) => {
|
|
220
220
|
let t = Array(10), n = (e, r) => {
|
|
221
|
-
if (
|
|
221
|
+
if (ge(e)) {
|
|
222
222
|
if (t.indexOf(e) >= 0) return;
|
|
223
|
-
if (
|
|
223
|
+
if (de(e)) return e;
|
|
224
224
|
if (!("toJSON" in e)) {
|
|
225
225
|
t[r] = e;
|
|
226
|
-
let i =
|
|
227
|
-
return
|
|
226
|
+
let i = le(e) ? [] : {};
|
|
227
|
+
return Le(e, (e, t) => {
|
|
228
228
|
let a = n(e, r + 1);
|
|
229
|
-
!
|
|
229
|
+
!ue(a) && (i[t] = a);
|
|
230
230
|
}), t[r] = void 0, i;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
return e;
|
|
234
234
|
};
|
|
235
235
|
return n(e, 0);
|
|
236
|
-
},
|
|
237
|
-
n ===
|
|
236
|
+
}, ot = z("AsyncFunction"), st = (e) => e && (ge(e) || B(e)) && B(e.then) && B(e.catch), ct = ((e, t) => e ? setImmediate : t ? ((e, t) => (ze.addEventListener("message", ({ source: n, data: r }) => {
|
|
237
|
+
n === ze && r === e && t.length && t.shift()();
|
|
238
238
|
}, !1), (n) => {
|
|
239
|
-
t.push(n),
|
|
240
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function",
|
|
241
|
-
isArray:
|
|
242
|
-
isArrayBuffer:
|
|
243
|
-
isBuffer:
|
|
244
|
-
isFormData:
|
|
245
|
-
isArrayBufferView:
|
|
246
|
-
isString:
|
|
247
|
-
isNumber:
|
|
248
|
-
isBoolean:
|
|
249
|
-
isObject:
|
|
250
|
-
isPlainObject:
|
|
251
|
-
isEmptyObject:
|
|
252
|
-
isReadableStream:
|
|
253
|
-
isRequest:
|
|
254
|
-
isResponse:
|
|
255
|
-
isHeaders:
|
|
256
|
-
isUndefined:
|
|
257
|
-
isDate:
|
|
258
|
-
isFile:
|
|
259
|
-
isReactNativeBlob:
|
|
260
|
-
isReactNative:
|
|
261
|
-
isBlob:
|
|
262
|
-
isRegExp:
|
|
263
|
-
isFunction:
|
|
264
|
-
isStream:
|
|
265
|
-
isURLSearchParams:
|
|
266
|
-
isTypedArray:
|
|
267
|
-
isFileList:
|
|
268
|
-
forEach:
|
|
269
|
-
merge:
|
|
270
|
-
extend:
|
|
271
|
-
trim:
|
|
272
|
-
stripBOM:
|
|
273
|
-
inherits:
|
|
274
|
-
toFlatObject:
|
|
275
|
-
kindOf:
|
|
276
|
-
kindOfTest:
|
|
277
|
-
endsWith:
|
|
278
|
-
toArray:
|
|
279
|
-
forEachEntry:
|
|
280
|
-
matchAll:
|
|
281
|
-
isHTMLForm:
|
|
282
|
-
hasOwnProperty:
|
|
283
|
-
hasOwnProp:
|
|
284
|
-
reduceDescriptors:
|
|
285
|
-
freezeMethods:
|
|
286
|
-
toObjectSet:
|
|
287
|
-
toCamelCase:
|
|
288
|
-
noop:
|
|
289
|
-
toFiniteNumber:
|
|
290
|
-
findKey:
|
|
291
|
-
global:
|
|
292
|
-
isContextDefined:
|
|
293
|
-
isSpecCompliantForm:
|
|
294
|
-
toJSONObject:
|
|
295
|
-
isAsyncFn:
|
|
296
|
-
isThenable:
|
|
297
|
-
setImmediate:
|
|
298
|
-
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
299
|
-
isIterable: (e) => e != null &&
|
|
300
|
-
},
|
|
239
|
+
t.push(n), ze.postMessage(e, "*");
|
|
240
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", B(ze.postMessage)), U = {
|
|
241
|
+
isArray: le,
|
|
242
|
+
isArrayBuffer: fe,
|
|
243
|
+
isBuffer: de,
|
|
244
|
+
isFormData: Ae,
|
|
245
|
+
isArrayBufferView: pe,
|
|
246
|
+
isString: me,
|
|
247
|
+
isNumber: he,
|
|
248
|
+
isBoolean: _e,
|
|
249
|
+
isObject: ge,
|
|
250
|
+
isPlainObject: ve,
|
|
251
|
+
isEmptyObject: ye,
|
|
252
|
+
isReadableStream: Me,
|
|
253
|
+
isRequest: Ne,
|
|
254
|
+
isResponse: Pe,
|
|
255
|
+
isHeaders: Fe,
|
|
256
|
+
isUndefined: ue,
|
|
257
|
+
isDate: be,
|
|
258
|
+
isFile: xe,
|
|
259
|
+
isReactNativeBlob: Se,
|
|
260
|
+
isReactNative: Ce,
|
|
261
|
+
isBlob: we,
|
|
262
|
+
isRegExp: Qe,
|
|
263
|
+
isFunction: B,
|
|
264
|
+
isStream: Ee,
|
|
265
|
+
isURLSearchParams: je,
|
|
266
|
+
isTypedArray: Ke,
|
|
267
|
+
isFileList: Te,
|
|
268
|
+
forEach: Le,
|
|
269
|
+
merge: V,
|
|
270
|
+
extend: Ve,
|
|
271
|
+
trim: Ie,
|
|
272
|
+
stripBOM: H,
|
|
273
|
+
inherits: He,
|
|
274
|
+
toFlatObject: Ue,
|
|
275
|
+
kindOf: R,
|
|
276
|
+
kindOfTest: z,
|
|
277
|
+
endsWith: We,
|
|
278
|
+
toArray: Ge,
|
|
279
|
+
forEachEntry: qe,
|
|
280
|
+
matchAll: Je,
|
|
281
|
+
isHTMLForm: Ye,
|
|
282
|
+
hasOwnProperty: Ze,
|
|
283
|
+
hasOwnProp: Ze,
|
|
284
|
+
reduceDescriptors: $e,
|
|
285
|
+
freezeMethods: et,
|
|
286
|
+
toObjectSet: tt,
|
|
287
|
+
toCamelCase: Xe,
|
|
288
|
+
noop: nt,
|
|
289
|
+
toFiniteNumber: rt,
|
|
290
|
+
findKey: Re,
|
|
291
|
+
global: ze,
|
|
292
|
+
isContextDefined: Be,
|
|
293
|
+
isSpecCompliantForm: it,
|
|
294
|
+
toJSONObject: at,
|
|
295
|
+
isAsyncFn: ot,
|
|
296
|
+
isThenable: st,
|
|
297
|
+
setImmediate: ct,
|
|
298
|
+
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(ze) : typeof process < "u" && process.nextTick || ct,
|
|
299
|
+
isIterable: (e) => e != null && B(e[I])
|
|
300
|
+
}, lt = U.toObjectSet([
|
|
301
301
|
"age",
|
|
302
302
|
"authorization",
|
|
303
303
|
"content-length",
|
|
@@ -315,13 +315,13 @@ var it = (e) => {
|
|
|
315
315
|
"referer",
|
|
316
316
|
"retry-after",
|
|
317
317
|
"user-agent"
|
|
318
|
-
]),
|
|
318
|
+
]), ut = (e) => {
|
|
319
319
|
let t = {}, n, r, i;
|
|
320
320
|
return e && e.split("\n").forEach(function(e) {
|
|
321
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] &&
|
|
321
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && lt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
322
322
|
}), t;
|
|
323
|
-
},
|
|
324
|
-
function
|
|
323
|
+
}, dt = Symbol("internals"), ft = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
324
|
+
function pt(e) {
|
|
325
325
|
let t = 0, n = e.length;
|
|
326
326
|
for (; t < n;) {
|
|
327
327
|
let n = e.charCodeAt(t);
|
|
@@ -335,33 +335,33 @@ function ft(e) {
|
|
|
335
335
|
}
|
|
336
336
|
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
337
337
|
}
|
|
338
|
-
function pt(e) {
|
|
339
|
-
return e && String(e).trim().toLowerCase();
|
|
340
|
-
}
|
|
341
338
|
function mt(e) {
|
|
342
|
-
return
|
|
339
|
+
return e && String(e).trim().toLowerCase();
|
|
343
340
|
}
|
|
344
341
|
function ht(e) {
|
|
345
|
-
return
|
|
342
|
+
return pt(e.replace(ft, ""));
|
|
346
343
|
}
|
|
347
344
|
function gt(e) {
|
|
345
|
+
return e === !1 || e == null ? e : U.isArray(e) ? e.map(gt) : ht(String(e));
|
|
346
|
+
}
|
|
347
|
+
function _t(e) {
|
|
348
348
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
349
349
|
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
350
350
|
return t;
|
|
351
351
|
}
|
|
352
|
-
var
|
|
353
|
-
function
|
|
354
|
-
if (
|
|
355
|
-
if (i && (t = n),
|
|
356
|
-
if (
|
|
357
|
-
if (
|
|
352
|
+
var vt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
353
|
+
function yt(e, t, n, r, i) {
|
|
354
|
+
if (U.isFunction(r)) return r.call(this, t, n);
|
|
355
|
+
if (i && (t = n), U.isString(t)) {
|
|
356
|
+
if (U.isString(r)) return t.indexOf(r) !== -1;
|
|
357
|
+
if (U.isRegExp(r)) return r.test(t);
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function bt(e) {
|
|
361
361
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
let n =
|
|
363
|
+
function xt(e, t) {
|
|
364
|
+
let n = U.toCamelCase(" " + t);
|
|
365
365
|
[
|
|
366
366
|
"get",
|
|
367
367
|
"set",
|
|
@@ -376,79 +376,79 @@ function bt(e, t) {
|
|
|
376
376
|
});
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
|
-
var
|
|
379
|
+
var W = class {
|
|
380
380
|
constructor(e) {
|
|
381
381
|
e && this.set(e);
|
|
382
382
|
}
|
|
383
383
|
set(e, t, n) {
|
|
384
384
|
let r = this;
|
|
385
385
|
function i(e, t, n) {
|
|
386
|
-
let i =
|
|
386
|
+
let i = mt(t);
|
|
387
387
|
if (!i) throw Error("header name must be a non-empty string");
|
|
388
|
-
let a =
|
|
389
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] =
|
|
388
|
+
let a = U.findKey(r, i);
|
|
389
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = gt(e));
|
|
390
390
|
}
|
|
391
|
-
let a = (e, t) =>
|
|
392
|
-
if (
|
|
393
|
-
else if (
|
|
394
|
-
else if (
|
|
391
|
+
let a = (e, t) => U.forEach(e, (e, n) => i(e, n, t));
|
|
392
|
+
if (U.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
393
|
+
else if (U.isString(e) && (e = e.trim()) && !vt(e)) a(ut(e), t);
|
|
394
|
+
else if (U.isObject(e) && U.isIterable(e)) {
|
|
395
395
|
let n = {}, r, i;
|
|
396
396
|
for (let t of e) {
|
|
397
|
-
if (!
|
|
398
|
-
n[i = t[0]] = (r = n[i]) ?
|
|
397
|
+
if (!U.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
398
|
+
n[i = t[0]] = (r = n[i]) ? U.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
399
399
|
}
|
|
400
400
|
a(n, t);
|
|
401
401
|
} else e != null && i(t, e, n);
|
|
402
402
|
return this;
|
|
403
403
|
}
|
|
404
404
|
get(e, t) {
|
|
405
|
-
if (e =
|
|
406
|
-
let n =
|
|
405
|
+
if (e = mt(e), e) {
|
|
406
|
+
let n = U.findKey(this, e);
|
|
407
407
|
if (n) {
|
|
408
408
|
let e = this[n];
|
|
409
409
|
if (!t) return e;
|
|
410
|
-
if (t === !0) return
|
|
411
|
-
if (
|
|
412
|
-
if (
|
|
410
|
+
if (t === !0) return _t(e);
|
|
411
|
+
if (U.isFunction(t)) return t.call(this, e, n);
|
|
412
|
+
if (U.isRegExp(t)) return t.exec(e);
|
|
413
413
|
throw TypeError("parser must be boolean|regexp|function");
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
has(e, t) {
|
|
418
|
-
if (e =
|
|
419
|
-
let n =
|
|
420
|
-
return !!(n && this[n] !== void 0 && (!t ||
|
|
418
|
+
if (e = mt(e), e) {
|
|
419
|
+
let n = U.findKey(this, e);
|
|
420
|
+
return !!(n && this[n] !== void 0 && (!t || yt(this, this[n], n, t)));
|
|
421
421
|
}
|
|
422
422
|
return !1;
|
|
423
423
|
}
|
|
424
424
|
delete(e, t) {
|
|
425
425
|
let n = this, r = !1;
|
|
426
426
|
function i(e) {
|
|
427
|
-
if (e =
|
|
428
|
-
let i =
|
|
429
|
-
i && (!t ||
|
|
427
|
+
if (e = mt(e), e) {
|
|
428
|
+
let i = U.findKey(n, e);
|
|
429
|
+
i && (!t || yt(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
return
|
|
432
|
+
return U.isArray(e) ? e.forEach(i) : i(e), r;
|
|
433
433
|
}
|
|
434
434
|
clear(e) {
|
|
435
435
|
let t = Object.keys(this), n = t.length, r = !1;
|
|
436
436
|
for (; n--;) {
|
|
437
437
|
let i = t[n];
|
|
438
|
-
(!e ||
|
|
438
|
+
(!e || yt(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
439
439
|
}
|
|
440
440
|
return r;
|
|
441
441
|
}
|
|
442
442
|
normalize(e) {
|
|
443
443
|
let t = this, n = {};
|
|
444
|
-
return
|
|
445
|
-
let a =
|
|
444
|
+
return U.forEach(this, (r, i) => {
|
|
445
|
+
let a = U.findKey(n, i);
|
|
446
446
|
if (a) {
|
|
447
|
-
t[a] =
|
|
447
|
+
t[a] = gt(r), delete t[i];
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
|
-
let o = e ?
|
|
451
|
-
o !== i && delete t[i], t[o] =
|
|
450
|
+
let o = e ? bt(i) : String(i).trim();
|
|
451
|
+
o !== i && delete t[i], t[o] = gt(r), n[o] = !0;
|
|
452
452
|
}), this;
|
|
453
453
|
}
|
|
454
454
|
concat(...e) {
|
|
@@ -456,8 +456,8 @@ var xt = class {
|
|
|
456
456
|
}
|
|
457
457
|
toJSON(e) {
|
|
458
458
|
let t = Object.create(null);
|
|
459
|
-
return
|
|
460
|
-
n != null && n !== !1 && (t[r] = e &&
|
|
459
|
+
return U.forEach(this, (n, r) => {
|
|
460
|
+
n != null && n !== !1 && (t[r] = e && U.isArray(n) ? n.join(", ") : n);
|
|
461
461
|
}), t;
|
|
462
462
|
}
|
|
463
463
|
[Symbol.iterator]() {
|
|
@@ -480,22 +480,22 @@ var xt = class {
|
|
|
480
480
|
return t.forEach((e) => n.set(e)), n;
|
|
481
481
|
}
|
|
482
482
|
static accessor(e) {
|
|
483
|
-
let t = (this[
|
|
483
|
+
let t = (this[dt] = this[dt] = { accessors: {} }).accessors, n = this.prototype;
|
|
484
484
|
function r(e) {
|
|
485
|
-
let r =
|
|
486
|
-
t[r] || (
|
|
485
|
+
let r = mt(e);
|
|
486
|
+
t[r] || (xt(n, e), t[r] = !0);
|
|
487
487
|
}
|
|
488
|
-
return
|
|
488
|
+
return U.isArray(e) ? e.forEach(r) : r(e), this;
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
|
-
|
|
491
|
+
W.accessor([
|
|
492
492
|
"Content-Type",
|
|
493
493
|
"Content-Length",
|
|
494
494
|
"Accept",
|
|
495
495
|
"Accept-Encoding",
|
|
496
496
|
"User-Agent",
|
|
497
497
|
"Authorization"
|
|
498
|
-
]),
|
|
498
|
+
]), U.reduceDescriptors(W.prototype, ({ value: e }, t) => {
|
|
499
499
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
500
500
|
return {
|
|
501
501
|
get: () => e,
|
|
@@ -503,35 +503,35 @@ xt.accessor([
|
|
|
503
503
|
this[n] = e;
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
|
-
}),
|
|
506
|
+
}), U.freezeMethods(W);
|
|
507
507
|
//#endregion
|
|
508
508
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/core/AxiosError.js
|
|
509
509
|
var St = "[REDACTED ****]";
|
|
510
510
|
function Ct(e) {
|
|
511
|
-
if (
|
|
511
|
+
if (U.hasOwnProp(e, "toJSON")) return !0;
|
|
512
512
|
let t = Object.getPrototypeOf(e);
|
|
513
513
|
for (; t && t !== Object.prototype;) {
|
|
514
|
-
if (
|
|
514
|
+
if (U.hasOwnProp(t, "toJSON")) return !0;
|
|
515
515
|
t = Object.getPrototypeOf(t);
|
|
516
516
|
}
|
|
517
517
|
return !1;
|
|
518
518
|
}
|
|
519
519
|
function wt(e, t) {
|
|
520
520
|
let n = new Set(t.map((e) => String(e).toLowerCase())), r = [], i = (e) => {
|
|
521
|
-
if (typeof e != "object" || !e ||
|
|
521
|
+
if (typeof e != "object" || !e || U.isBuffer(e)) return e;
|
|
522
522
|
if (r.indexOf(e) !== -1) return;
|
|
523
|
-
e instanceof
|
|
523
|
+
e instanceof W && (e = e.toJSON()), r.push(e);
|
|
524
524
|
let t;
|
|
525
|
-
if (
|
|
525
|
+
if (U.isArray(e)) t = [], e.forEach((e, n) => {
|
|
526
526
|
let r = i(e);
|
|
527
|
-
|
|
527
|
+
U.isUndefined(r) || (t[n] = r);
|
|
528
528
|
});
|
|
529
529
|
else {
|
|
530
|
-
if (!
|
|
530
|
+
if (!U.isPlainObject(e) && Ct(e)) return r.pop(), e;
|
|
531
531
|
t = Object.create(null);
|
|
532
532
|
for (let [r, a] of Object.entries(e)) {
|
|
533
533
|
let e = n.has(r.toLowerCase()) ? St : i(a);
|
|
534
|
-
|
|
534
|
+
U.isUndefined(e) || (t[r] = e);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
return r.pop(), t;
|
|
@@ -553,7 +553,7 @@ var G = class e extends Error {
|
|
|
553
553
|
}), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), n && (this.config = n), r && (this.request = r), i && (this.response = i, this.status = i.status);
|
|
554
554
|
}
|
|
555
555
|
toJSON() {
|
|
556
|
-
let e = this.config, t = e &&
|
|
556
|
+
let e = this.config, t = e && U.hasOwnProp(e, "redact") ? e.redact : void 0, n = U.isArray(t) && t.length > 0 ? wt(e, t) : U.toJSONObject(e);
|
|
557
557
|
return {
|
|
558
558
|
message: this.message,
|
|
559
559
|
name: this.name,
|
|
@@ -573,10 +573,10 @@ G.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", G.ERR_BAD_OPTION = "ERR_BAD_OPT
|
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/helpers/toFormData.js
|
|
575
575
|
function Tt(e) {
|
|
576
|
-
return
|
|
576
|
+
return U.isPlainObject(e) || U.isArray(e);
|
|
577
577
|
}
|
|
578
578
|
function Et(e) {
|
|
579
|
-
return
|
|
579
|
+
return U.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
580
580
|
}
|
|
581
581
|
function Dt(e, t, n) {
|
|
582
582
|
return e ? e.concat(t).map(function(e, t) {
|
|
@@ -584,36 +584,36 @@ function Dt(e, t, n) {
|
|
|
584
584
|
}).join(n ? "." : "") : t;
|
|
585
585
|
}
|
|
586
586
|
function Ot(e) {
|
|
587
|
-
return
|
|
587
|
+
return U.isArray(e) && !e.some(Tt);
|
|
588
588
|
}
|
|
589
|
-
var kt =
|
|
589
|
+
var kt = U.toFlatObject(U, {}, null, function(e) {
|
|
590
590
|
return /^is[A-Z]/.test(e);
|
|
591
591
|
});
|
|
592
592
|
function At(e, t, n) {
|
|
593
|
-
if (!
|
|
594
|
-
t ||= new FormData(), n =
|
|
593
|
+
if (!U.isObject(e)) throw TypeError("target must be an object");
|
|
594
|
+
t ||= new FormData(), n = U.toFlatObject(n, {
|
|
595
595
|
metaTokens: !0,
|
|
596
596
|
dots: !1,
|
|
597
597
|
indexes: !1
|
|
598
598
|
}, !1, function(e, t) {
|
|
599
|
-
return !
|
|
599
|
+
return !U.isUndefined(t[e]);
|
|
600
600
|
});
|
|
601
|
-
let r = n.metaTokens, i = n.visitor || d, a = n.dots, o = n.indexes, s = n.Blob || typeof Blob < "u" && Blob, c = n.maxDepth === void 0 ? 100 : n.maxDepth, l = s &&
|
|
602
|
-
if (!
|
|
601
|
+
let r = n.metaTokens, i = n.visitor || d, a = n.dots, o = n.indexes, s = n.Blob || typeof Blob < "u" && Blob, c = n.maxDepth === void 0 ? 100 : n.maxDepth, l = s && U.isSpecCompliantForm(t);
|
|
602
|
+
if (!U.isFunction(i)) throw TypeError("visitor must be a function");
|
|
603
603
|
function u(e) {
|
|
604
604
|
if (e === null) return "";
|
|
605
|
-
if (
|
|
606
|
-
if (
|
|
607
|
-
if (!l &&
|
|
608
|
-
return
|
|
605
|
+
if (U.isDate(e)) return e.toISOString();
|
|
606
|
+
if (U.isBoolean(e)) return e.toString();
|
|
607
|
+
if (!l && U.isBlob(e)) throw new G("Blob is not supported. Use a Buffer instead.");
|
|
608
|
+
return U.isArrayBuffer(e) || U.isTypedArray(e) ? l && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
609
609
|
}
|
|
610
610
|
function d(e, n, i) {
|
|
611
611
|
let s = e;
|
|
612
|
-
if (
|
|
612
|
+
if (U.isReactNative(t) && U.isReactNativeBlob(e)) return t.append(Dt(i, n, a), u(e)), !1;
|
|
613
613
|
if (e && !i && typeof e == "object") {
|
|
614
|
-
if (
|
|
615
|
-
else if (
|
|
616
|
-
!(
|
|
614
|
+
if (U.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
615
|
+
else if (U.isArray(e) && Ot(e) || (U.isFileList(e) || U.endsWith(n, "[]")) && (s = U.toArray(e))) return n = Et(n), s.forEach(function(e, r) {
|
|
616
|
+
!(U.isUndefined(e) || e === null) && t.append(o === !0 ? Dt([n], r, a) : o === null ? n : n + "[]", u(e));
|
|
617
617
|
}), !1;
|
|
618
618
|
}
|
|
619
619
|
return Tt(e) ? !0 : (t.append(Dt(i, n, a), u(e)), !1);
|
|
@@ -624,15 +624,15 @@ function At(e, t, n) {
|
|
|
624
624
|
isVisitable: Tt
|
|
625
625
|
});
|
|
626
626
|
function m(e, n, r = 0) {
|
|
627
|
-
if (!
|
|
627
|
+
if (!U.isUndefined(e)) {
|
|
628
628
|
if (r > c) throw new G("Object is too deeply nested (" + r + " levels). Max depth: " + c, G.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
629
629
|
if (f.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
630
|
-
f.push(e),
|
|
631
|
-
(!(
|
|
630
|
+
f.push(e), U.forEach(e, function(e, a) {
|
|
631
|
+
(!(U.isUndefined(e) || e === null) && i.call(t, e, U.isString(a) ? a.trim() : a, n, p)) === !0 && m(e, n ? n.concat(a) : [a], r + 1);
|
|
632
632
|
}), f.pop();
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
if (!
|
|
635
|
+
if (!U.isObject(e)) throw TypeError("data must be an object");
|
|
636
636
|
return m(e), t;
|
|
637
637
|
}
|
|
638
638
|
//#endregion
|
|
@@ -671,8 +671,8 @@ function Pt(e) {
|
|
|
671
671
|
}
|
|
672
672
|
function Ft(e, t, n) {
|
|
673
673
|
if (!t) return e;
|
|
674
|
-
let r = n && n.encode || Pt, i =
|
|
675
|
-
if (o = a ? a(t, i) :
|
|
674
|
+
let r = n && n.encode || Pt, i = U.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
675
|
+
if (o = a ? a(t, i) : U.isURLSearchParams(t) ? t.toString() : new Mt(t, i).toString(r), o) {
|
|
676
676
|
let t = e.indexOf("#");
|
|
677
677
|
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
678
678
|
}
|
|
@@ -699,7 +699,7 @@ var It = class {
|
|
|
699
699
|
this.handlers &&= [];
|
|
700
700
|
}
|
|
701
701
|
forEach(e) {
|
|
702
|
-
|
|
702
|
+
U.forEach(this.handlers, function(t) {
|
|
703
703
|
t !== null && e(t);
|
|
704
704
|
});
|
|
705
705
|
}
|
|
@@ -723,7 +723,7 @@ var It = class {
|
|
|
723
723
|
"url",
|
|
724
724
|
"data"
|
|
725
725
|
]
|
|
726
|
-
}, zt = /* @__PURE__ */
|
|
726
|
+
}, zt = /* @__PURE__ */ te({
|
|
727
727
|
hasBrowserEnv: () => Bt,
|
|
728
728
|
hasStandardBrowserEnv: () => Ht,
|
|
729
729
|
hasStandardBrowserWebWorkerEnv: () => Ut,
|
|
@@ -742,7 +742,7 @@ var It = class {
|
|
|
742
742
|
function Gt(e, t) {
|
|
743
743
|
return At(e, new K.classes.URLSearchParams(), {
|
|
744
744
|
visitor: function(e, t, n, r) {
|
|
745
|
-
return K.isNode &&
|
|
745
|
+
return K.isNode && U.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
746
746
|
},
|
|
747
747
|
...t
|
|
748
748
|
});
|
|
@@ -750,7 +750,7 @@ function Gt(e, t) {
|
|
|
750
750
|
//#endregion
|
|
751
751
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
752
752
|
function Kt(e) {
|
|
753
|
-
return
|
|
753
|
+
return U.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
754
754
|
}
|
|
755
755
|
function qt(e) {
|
|
756
756
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
@@ -762,11 +762,11 @@ function Jt(e) {
|
|
|
762
762
|
let a = e[i++];
|
|
763
763
|
if (a === "__proto__") return !0;
|
|
764
764
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
765
|
-
return a = !a &&
|
|
765
|
+
return a = !a && U.isArray(r) ? r.length : a, s ? (U.hasOwnProp(r, a) ? r[a] = U.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!r[a] || !U.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && U.isArray(r[a]) && (r[a] = qt(r[a])), !o);
|
|
766
766
|
}
|
|
767
|
-
if (
|
|
767
|
+
if (U.isFormData(e) && U.isFunction(e.entries)) {
|
|
768
768
|
let n = {};
|
|
769
|
-
return
|
|
769
|
+
return U.forEachEntry(e, (e, r) => {
|
|
770
770
|
t(Kt(e), r, n, 0);
|
|
771
771
|
}), n;
|
|
772
772
|
}
|
|
@@ -774,10 +774,10 @@ function Jt(e) {
|
|
|
774
774
|
}
|
|
775
775
|
//#endregion
|
|
776
776
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/defaults/index.js
|
|
777
|
-
var Yt = (e, t) => e != null &&
|
|
777
|
+
var Yt = (e, t) => e != null && U.hasOwnProp(e, t) ? e[t] : void 0;
|
|
778
778
|
function Xt(e, t, n) {
|
|
779
|
-
if (
|
|
780
|
-
return (t || JSON.parse)(e),
|
|
779
|
+
if (U.isString(e)) try {
|
|
780
|
+
return (t || JSON.parse)(e), U.trim(e);
|
|
781
781
|
} catch (e) {
|
|
782
782
|
if (e.name !== "SyntaxError") throw e;
|
|
783
783
|
}
|
|
@@ -791,16 +791,16 @@ var Zt = {
|
|
|
791
791
|
"fetch"
|
|
792
792
|
],
|
|
793
793
|
transformRequest: [function(e, t) {
|
|
794
|
-
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i =
|
|
795
|
-
if (i &&
|
|
796
|
-
if (
|
|
797
|
-
if (
|
|
798
|
-
if (
|
|
794
|
+
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = U.isObject(e);
|
|
795
|
+
if (i && U.isHTMLForm(e) && (e = new FormData(e)), U.isFormData(e)) return r ? JSON.stringify(Jt(e)) : e;
|
|
796
|
+
if (U.isArrayBuffer(e) || U.isBuffer(e) || U.isStream(e) || U.isFile(e) || U.isBlob(e) || U.isReadableStream(e)) return e;
|
|
797
|
+
if (U.isArrayBufferView(e)) return e.buffer;
|
|
798
|
+
if (U.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
799
799
|
let a;
|
|
800
800
|
if (i) {
|
|
801
801
|
let t = Yt(this, "formSerializer");
|
|
802
802
|
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Gt(e, t).toString();
|
|
803
|
-
if ((a =
|
|
803
|
+
if ((a = U.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
804
804
|
let n = Yt(this, "env"), r = n && n.FormData;
|
|
805
805
|
return At(a ? { "files[]": e } : e, r && new r(), t);
|
|
806
806
|
}
|
|
@@ -809,8 +809,8 @@ var Zt = {
|
|
|
809
809
|
}],
|
|
810
810
|
transformResponse: [function(e) {
|
|
811
811
|
let t = Yt(this, "transitional") || Zt.transitional, n = t && t.forcedJSONParsing, r = Yt(this, "responseType"), i = r === "json";
|
|
812
|
-
if (
|
|
813
|
-
if (e &&
|
|
812
|
+
if (U.isResponse(e) || U.isReadableStream(e)) return e;
|
|
813
|
+
if (e && U.isString(e) && (n && !r || i)) {
|
|
814
814
|
let n = !(t && t.silentJSONParsing) && i;
|
|
815
815
|
try {
|
|
816
816
|
return JSON.parse(e, Yt(this, "parseReviver"));
|
|
@@ -837,7 +837,7 @@ var Zt = {
|
|
|
837
837
|
"Content-Type": void 0
|
|
838
838
|
} }
|
|
839
839
|
};
|
|
840
|
-
|
|
840
|
+
U.forEach([
|
|
841
841
|
"delete",
|
|
842
842
|
"get",
|
|
843
843
|
"head",
|
|
@@ -851,8 +851,8 @@ W.forEach([
|
|
|
851
851
|
//#endregion
|
|
852
852
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/core/transformData.js
|
|
853
853
|
function Qt(e, t) {
|
|
854
|
-
let n = this || Zt, r = t || n, i =
|
|
855
|
-
return
|
|
854
|
+
let n = this || Zt, r = t || n, i = W.from(r.headers), a = r.data;
|
|
855
|
+
return U.forEach(e, function(e) {
|
|
856
856
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
857
857
|
}), i.normalize(), a;
|
|
858
858
|
}
|
|
@@ -933,11 +933,11 @@ var on = (e, t, n = 3) => {
|
|
|
933
933
|
total: e,
|
|
934
934
|
loaded: r
|
|
935
935
|
}), t[1]];
|
|
936
|
-
}, cn = (e) => (...t) =>
|
|
936
|
+
}, cn = (e) => (...t) => U.asap(() => e(...t)), ln = K.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, K.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(K.origin), K.navigator && /(msie|trident)/i.test(K.navigator.userAgent)) : () => !0, un = K.hasStandardBrowserEnv ? {
|
|
937
937
|
write(e, t, n, r, i, a, o) {
|
|
938
938
|
if (typeof document > "u") return;
|
|
939
939
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
940
|
-
|
|
940
|
+
U.isNumber(n) && s.push(`expires=${new Date(n).toUTCString()}`), U.isString(r) && s.push(`path=${r}`), U.isString(i) && s.push(`domain=${i}`), a === !0 && s.push("secure"), U.isString(o) && s.push(`SameSite=${o}`), document.cookie = s.join("; ");
|
|
941
941
|
},
|
|
942
942
|
read(e) {
|
|
943
943
|
if (typeof document > "u") return null;
|
|
@@ -976,7 +976,7 @@ function pn(e, t, n) {
|
|
|
976
976
|
}
|
|
977
977
|
//#endregion
|
|
978
978
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/core/mergeConfig.js
|
|
979
|
-
var mn = (e) => e instanceof
|
|
979
|
+
var mn = (e) => e instanceof W ? { ...e } : e;
|
|
980
980
|
function hn(e, t) {
|
|
981
981
|
t ||= {};
|
|
982
982
|
let n = Object.create(null);
|
|
@@ -988,22 +988,22 @@ function hn(e, t) {
|
|
|
988
988
|
configurable: !0
|
|
989
989
|
});
|
|
990
990
|
function r(e, t, n, r) {
|
|
991
|
-
return
|
|
991
|
+
return U.isPlainObject(e) && U.isPlainObject(t) ? U.merge.call({ caseless: r }, e, t) : U.isPlainObject(t) ? U.merge({}, t) : U.isArray(t) ? t.slice() : t;
|
|
992
992
|
}
|
|
993
993
|
function i(e, t, n, i) {
|
|
994
|
-
if (!
|
|
995
|
-
if (!
|
|
994
|
+
if (!U.isUndefined(t)) return r(e, t, n, i);
|
|
995
|
+
if (!U.isUndefined(e)) return r(void 0, e, n, i);
|
|
996
996
|
}
|
|
997
997
|
function a(e, t) {
|
|
998
|
-
if (!
|
|
998
|
+
if (!U.isUndefined(t)) return r(void 0, t);
|
|
999
999
|
}
|
|
1000
1000
|
function o(e, t) {
|
|
1001
|
-
if (!
|
|
1002
|
-
if (!
|
|
1001
|
+
if (!U.isUndefined(t)) return r(void 0, t);
|
|
1002
|
+
if (!U.isUndefined(e)) return r(void 0, e);
|
|
1003
1003
|
}
|
|
1004
1004
|
function s(n, i, a) {
|
|
1005
|
-
if (
|
|
1006
|
-
if (
|
|
1005
|
+
if (U.hasOwnProp(t, a)) return r(n, i);
|
|
1006
|
+
if (U.hasOwnProp(e, a)) return r(void 0, n);
|
|
1007
1007
|
}
|
|
1008
1008
|
let c = {
|
|
1009
1009
|
url: a,
|
|
@@ -1037,13 +1037,13 @@ function hn(e, t) {
|
|
|
1037
1037
|
validateStatus: s,
|
|
1038
1038
|
headers: (e, t, n) => i(mn(e), mn(t), n, !0)
|
|
1039
1039
|
};
|
|
1040
|
-
return
|
|
1040
|
+
return U.forEach(Object.keys({
|
|
1041
1041
|
...e,
|
|
1042
1042
|
...t
|
|
1043
1043
|
}), function(r) {
|
|
1044
1044
|
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
1045
|
-
let a =
|
|
1046
|
-
|
|
1045
|
+
let a = U.hasOwnProp(c, r) ? c[r] : i, o = a(U.hasOwnProp(e, r) ? e[r] : void 0, U.hasOwnProp(t, r) ? t[r] : void 0, r);
|
|
1046
|
+
U.isUndefined(o) && a !== s || (n[r] = o);
|
|
1047
1047
|
}), n;
|
|
1048
1048
|
}
|
|
1049
1049
|
//#endregion
|
|
@@ -1059,15 +1059,15 @@ function _n(e, t, n) {
|
|
|
1059
1059
|
});
|
|
1060
1060
|
}
|
|
1061
1061
|
var vn = (e) => encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi, (e, t) => String.fromCharCode(parseInt(t, 16))), yn = (e) => {
|
|
1062
|
-
let t = hn({}, e), n = (e) =>
|
|
1063
|
-
if (t.headers = s =
|
|
1062
|
+
let t = hn({}, e), n = (e) => U.hasOwnProp(t, e) ? t[e] : void 0, r = n("data"), i = n("withXSRFToken"), a = n("xsrfHeaderName"), o = n("xsrfCookieName"), s = n("headers"), c = n("auth"), l = n("baseURL"), u = n("allowAbsoluteUrls"), d = n("url");
|
|
1063
|
+
if (t.headers = s = W.from(s), t.url = Ft(pn(l, d, u), e.params, e.paramsSerializer), c && s.set("Authorization", "Basic " + btoa((c.username || "") + ":" + (c.password ? vn(c.password) : ""))), U.isFormData(r) && (K.hasStandardBrowserEnv || K.hasStandardBrowserWebWorkerEnv ? s.setContentType(void 0) : U.isFunction(r.getHeaders) && _n(s, r.getHeaders(), n("formDataHeaderPolicy"))), K.hasStandardBrowserEnv && (U.isFunction(i) && (i = i(t)), i === !0 || i == null && ln(t.url))) {
|
|
1064
1064
|
let e = a && o && un.read(o);
|
|
1065
1065
|
e && s.set(a, e);
|
|
1066
1066
|
}
|
|
1067
1067
|
return t;
|
|
1068
1068
|
}, bn = typeof XMLHttpRequest < "u" && function(e) {
|
|
1069
1069
|
return new Promise(function(t, n) {
|
|
1070
|
-
let r = yn(e), i = r.data, a =
|
|
1070
|
+
let r = yn(e), i = r.data, a = W.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1071
1071
|
function m() {
|
|
1072
1072
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1073
1073
|
}
|
|
@@ -1075,7 +1075,7 @@ var vn = (e) => encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi, (e, t) => Stri
|
|
|
1075
1075
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1076
1076
|
function g() {
|
|
1077
1077
|
if (!h) return;
|
|
1078
|
-
let r =
|
|
1078
|
+
let r = W.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1079
1079
|
tn(function(e) {
|
|
1080
1080
|
t(e), m();
|
|
1081
1081
|
}, function(e) {
|
|
@@ -1099,9 +1099,9 @@ var vn = (e) => encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi, (e, t) => Stri
|
|
|
1099
1099
|
}, h.ontimeout = function() {
|
|
1100
1100
|
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || Lt;
|
|
1101
1101
|
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new G(t, i.clarifyTimeoutError ? G.ETIMEDOUT : G.ECONNABORTED, e, h)), m(), h = null;
|
|
1102
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h &&
|
|
1102
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && U.forEach(a.toJSON(), function(e, t) {
|
|
1103
1103
|
h.setRequestHeader(t, e);
|
|
1104
|
-
}),
|
|
1104
|
+
}), U.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = on(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = on(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1105
1105
|
h &&= (n(!t || t.type ? new en(null, e, h) : t), h.abort(), m(), null);
|
|
1106
1106
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1107
1107
|
let _ = nn(r.url);
|
|
@@ -1129,7 +1129,7 @@ var vn = (e) => encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi, (e, t) => Stri
|
|
|
1129
1129
|
};
|
|
1130
1130
|
e.forEach((e) => e.addEventListener("abort", i));
|
|
1131
1131
|
let { signal: s } = n;
|
|
1132
|
-
return s.unsubscribe = () =>
|
|
1132
|
+
return s.unsubscribe = () => U.asap(o), s;
|
|
1133
1133
|
}
|
|
1134
1134
|
}, Sn = function* (e, t) {
|
|
1135
1135
|
let n = e.byteLength;
|
|
@@ -1212,15 +1212,15 @@ function En(e) {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
//#endregion
|
|
1214
1214
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/env/data.js
|
|
1215
|
-
var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } =
|
|
1215
|
+
var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } = U, An = (e, ...t) => {
|
|
1216
1216
|
try {
|
|
1217
1217
|
return !!e(...t);
|
|
1218
1218
|
} catch {
|
|
1219
1219
|
return !1;
|
|
1220
1220
|
}
|
|
1221
1221
|
}, jn = (e) => {
|
|
1222
|
-
let t =
|
|
1223
|
-
e =
|
|
1222
|
+
let t = U.global ?? globalThis, { ReadableStream: n, TextEncoder: r } = t;
|
|
1223
|
+
e = U.merge.call({ skipUndefined: !0 }, {
|
|
1224
1224
|
Request: t.Request,
|
|
1225
1225
|
Response: t.Response
|
|
1226
1226
|
}, e);
|
|
@@ -1235,7 +1235,7 @@ var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } = W, An = (e, ...t) => {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
}), r = t.headers.has("Content-Type");
|
|
1237
1237
|
return t.body != null && t.body.cancel(), e && !r;
|
|
1238
|
-
}), p = l && u && An(() =>
|
|
1238
|
+
}), p = l && u && An(() => U.isReadableStream(new o("").body)), m = { stream: p && ((e) => e.body) };
|
|
1239
1239
|
s && [
|
|
1240
1240
|
"text",
|
|
1241
1241
|
"arrayBuffer",
|
|
@@ -1251,16 +1251,16 @@ var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } = W, An = (e, ...t) => {
|
|
|
1251
1251
|
});
|
|
1252
1252
|
let h = async (e) => {
|
|
1253
1253
|
if (e == null) return 0;
|
|
1254
|
-
if (
|
|
1255
|
-
if (
|
|
1254
|
+
if (U.isBlob(e)) return e.size;
|
|
1255
|
+
if (U.isSpecCompliantForm(e)) return (await new a(K.origin, {
|
|
1256
1256
|
method: "POST",
|
|
1257
1257
|
body: e
|
|
1258
1258
|
}).arrayBuffer()).byteLength;
|
|
1259
|
-
if (
|
|
1260
|
-
if (
|
|
1261
|
-
}, g = async (e, t) =>
|
|
1259
|
+
if (U.isArrayBufferView(e) || U.isArrayBuffer(e)) return e.byteLength;
|
|
1260
|
+
if (U.isURLSearchParams(e) && (e += ""), U.isString(e)) return (await d(e)).byteLength;
|
|
1261
|
+
}, g = async (e, t) => U.toFiniteNumber(e.getContentLength()) ?? h(t);
|
|
1262
1262
|
return async (e) => {
|
|
1263
|
-
let { url: t, method: n, data: s, signal: l, cancelToken: u, timeout: d, onDownloadProgress: h, onUploadProgress: _, responseType: v, headers: y, withCredentials: b = "same-origin", fetchOptions: x, maxContentLength: S, maxBodyLength: C } = yn(e), w =
|
|
1263
|
+
let { url: t, method: n, data: s, signal: l, cancelToken: u, timeout: d, onDownloadProgress: h, onUploadProgress: _, responseType: v, headers: y, withCredentials: b = "same-origin", fetchOptions: x, maxContentLength: S, maxBodyLength: C } = yn(e), w = U.isNumber(S) && S > -1, T = U.isNumber(C) && C > -1, E = i || fetch;
|
|
1264
1264
|
v = v ? (v + "").toLowerCase() : "text";
|
|
1265
1265
|
let D = xn([l, u && u.toAbortSignal()], d), O = null, k = D && D.unsubscribe && (() => {
|
|
1266
1266
|
D.unsubscribe();
|
|
@@ -1277,14 +1277,14 @@ var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } = W, An = (e, ...t) => {
|
|
|
1277
1277
|
body: s,
|
|
1278
1278
|
duplex: "half"
|
|
1279
1279
|
}), n;
|
|
1280
|
-
if (
|
|
1280
|
+
if (U.isFormData(s) && (n = e.headers.get("content-type")) && y.setContentType(n), e.body) {
|
|
1281
1281
|
let [t, n] = sn(A, on(cn(_)));
|
|
1282
1282
|
s = Tn(e.body, On, t, n);
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
|
-
|
|
1285
|
+
U.isString(b) || (b = b ? "include" : "omit");
|
|
1286
1286
|
let i = c && "credentials" in a.prototype;
|
|
1287
|
-
if (
|
|
1287
|
+
if (U.isFormData(s)) {
|
|
1288
1288
|
let e = y.getContentType();
|
|
1289
1289
|
e && /^multipart\/form-data/i.test(e) && !/boundary=/i.test(e) && y.delete("content-type");
|
|
1290
1290
|
}
|
|
@@ -1301,7 +1301,7 @@ var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } = W, An = (e, ...t) => {
|
|
|
1301
1301
|
O = c && new a(t, l);
|
|
1302
1302
|
let u = await (c ? E(O, x) : E(t, l));
|
|
1303
1303
|
if (w) {
|
|
1304
|
-
let t =
|
|
1304
|
+
let t = U.toFiniteNumber(u.headers.get("content-length"));
|
|
1305
1305
|
if (t != null && t > S) throw new G("maxContentLength size of " + S + " exceeded", G.ERR_BAD_RESPONSE, e, O);
|
|
1306
1306
|
}
|
|
1307
1307
|
let d = p && (v === "stream" || v === "response");
|
|
@@ -1314,7 +1314,7 @@ var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } = W, An = (e, ...t) => {
|
|
|
1314
1314
|
].forEach((e) => {
|
|
1315
1315
|
t[e] = u[e];
|
|
1316
1316
|
});
|
|
1317
|
-
let n =
|
|
1317
|
+
let n = U.toFiniteNumber(u.headers.get("content-length")), [r, i] = h && sn(n, on(cn(h), !0)) || [], a = 0;
|
|
1318
1318
|
u = new o(Tn(u.body, On, (t) => {
|
|
1319
1319
|
if (w && (a = t, a > S)) throw new G("maxContentLength size of " + S + " exceeded", G.ERR_BAD_RESPONSE, e, O);
|
|
1320
1320
|
r && r(t);
|
|
@@ -1323,7 +1323,7 @@ var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } = W, An = (e, ...t) => {
|
|
|
1323
1323
|
}), t);
|
|
1324
1324
|
}
|
|
1325
1325
|
v ||= "text";
|
|
1326
|
-
let j = await m[
|
|
1326
|
+
let j = await m[U.findKey(m, v) || "text"](u, e);
|
|
1327
1327
|
if (w && !p && !d) {
|
|
1328
1328
|
let t;
|
|
1329
1329
|
if (j != null && (typeof j.byteLength == "number" ? t = j.byteLength : typeof j.size == "number" ? t = j.size : typeof j == "string" && (t = typeof r == "function" ? new r().encode(j).byteLength : j.length)), typeof t == "number" && t > S) throw new G("maxContentLength size of " + S + " exceeded", G.ERR_BAD_RESPONSE, e, O);
|
|
@@ -1331,7 +1331,7 @@ var Dn = "1.16.0", On = 64 * 1024, { isFunction: kn } = W, An = (e, ...t) => {
|
|
|
1331
1331
|
return !d && k && k(), await new Promise((t, n) => {
|
|
1332
1332
|
tn(t, n, {
|
|
1333
1333
|
data: j,
|
|
1334
|
-
headers:
|
|
1334
|
+
headers: W.from(u.headers),
|
|
1335
1335
|
status: u.status,
|
|
1336
1336
|
statusText: u.statusText,
|
|
1337
1337
|
config: e,
|
|
@@ -1363,7 +1363,7 @@ var Pn = {
|
|
|
1363
1363
|
xhr: bn,
|
|
1364
1364
|
fetch: { get: Nn }
|
|
1365
1365
|
};
|
|
1366
|
-
|
|
1366
|
+
U.forEach(Pn, (e, t) => {
|
|
1367
1367
|
if (e) {
|
|
1368
1368
|
try {
|
|
1369
1369
|
Object.defineProperty(e, "name", {
|
|
@@ -1377,15 +1377,15 @@ W.forEach(Pn, (e, t) => {
|
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
1379
|
});
|
|
1380
|
-
var Fn = (e) => `- ${e}`, In = (e) =>
|
|
1380
|
+
var Fn = (e) => `- ${e}`, In = (e) => U.isFunction(e) || e === null || e === !1;
|
|
1381
1381
|
function Ln(e, t) {
|
|
1382
|
-
e =
|
|
1382
|
+
e = U.isArray(e) ? e : [e];
|
|
1383
1383
|
let { length: n } = e, r, i, a = {};
|
|
1384
1384
|
for (let o = 0; o < n; o++) {
|
|
1385
1385
|
r = e[o];
|
|
1386
1386
|
let n;
|
|
1387
1387
|
if (i = r, !In(r) && (i = Pn[(n = String(r)).toLowerCase()], i === void 0)) throw new G(`Unknown adapter '${n}'`);
|
|
1388
|
-
if (i && (
|
|
1388
|
+
if (i && (U.isFunction(i) || (i = i.get(t)))) break;
|
|
1389
1389
|
a[n || "#" + o] = i;
|
|
1390
1390
|
}
|
|
1391
1391
|
if (!i) {
|
|
@@ -1404,7 +1404,7 @@ function zn(e) {
|
|
|
1404
1404
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new en(null, e);
|
|
1405
1405
|
}
|
|
1406
1406
|
function Bn(e) {
|
|
1407
|
-
return zn(e), e.headers =
|
|
1407
|
+
return zn(e), e.headers = W.from(e.headers), e.data = Qt.call(e, e.transformRequest), [
|
|
1408
1408
|
"post",
|
|
1409
1409
|
"put",
|
|
1410
1410
|
"patch"
|
|
@@ -1415,7 +1415,7 @@ function Bn(e) {
|
|
|
1415
1415
|
} finally {
|
|
1416
1416
|
delete e.response;
|
|
1417
1417
|
}
|
|
1418
|
-
return t.headers =
|
|
1418
|
+
return t.headers = W.from(t.headers), t;
|
|
1419
1419
|
}, function(t) {
|
|
1420
1420
|
if (!$t(t) && (zn(e), t && t.response)) {
|
|
1421
1421
|
e.response = t.response;
|
|
@@ -1424,7 +1424,7 @@ function Bn(e) {
|
|
|
1424
1424
|
} finally {
|
|
1425
1425
|
delete e.response;
|
|
1426
1426
|
}
|
|
1427
|
-
t.response.headers =
|
|
1427
|
+
t.response.headers = W.from(t.response.headers);
|
|
1428
1428
|
}
|
|
1429
1429
|
return Promise.reject(t);
|
|
1430
1430
|
});
|
|
@@ -1510,15 +1510,15 @@ var Wn = {
|
|
|
1510
1510
|
forcedJSONParsing: Gn.transitional(Gn.boolean),
|
|
1511
1511
|
clarifyTimeoutError: Gn.transitional(Gn.boolean),
|
|
1512
1512
|
legacyInterceptorReqResOrdering: Gn.transitional(Gn.boolean)
|
|
1513
|
-
}, !1), r != null && (
|
|
1513
|
+
}, !1), r != null && (U.isFunction(r) ? t.paramsSerializer = { serialize: r } : Wn.assertOptions(r, {
|
|
1514
1514
|
encode: Gn.function,
|
|
1515
1515
|
serialize: Gn.function
|
|
1516
1516
|
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Wn.assertOptions(t, {
|
|
1517
1517
|
baseUrl: Gn.spelling("baseURL"),
|
|
1518
1518
|
withXsrfToken: Gn.spelling("withXSRFToken")
|
|
1519
1519
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1520
|
-
let a = i &&
|
|
1521
|
-
i &&
|
|
1520
|
+
let a = i && U.merge(i.common, i[t.method]);
|
|
1521
|
+
i && U.forEach([
|
|
1522
1522
|
"delete",
|
|
1523
1523
|
"get",
|
|
1524
1524
|
"head",
|
|
@@ -1529,7 +1529,7 @@ var Wn = {
|
|
|
1529
1529
|
"common"
|
|
1530
1530
|
], (e) => {
|
|
1531
1531
|
delete i[e];
|
|
1532
|
-
}), t.headers =
|
|
1532
|
+
}), t.headers = W.concat(a, i);
|
|
1533
1533
|
let o = [], s = !0;
|
|
1534
1534
|
this.interceptors.request.forEach(function(e) {
|
|
1535
1535
|
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
@@ -1570,7 +1570,7 @@ var Wn = {
|
|
|
1570
1570
|
return e = hn(this.defaults, e), Ft(pn(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1571
1571
|
}
|
|
1572
1572
|
};
|
|
1573
|
-
|
|
1573
|
+
U.forEach([
|
|
1574
1574
|
"delete",
|
|
1575
1575
|
"get",
|
|
1576
1576
|
"head",
|
|
@@ -1583,7 +1583,7 @@ W.forEach([
|
|
|
1583
1583
|
data: (n || {}).data
|
|
1584
1584
|
}));
|
|
1585
1585
|
};
|
|
1586
|
-
}),
|
|
1586
|
+
}), U.forEach([
|
|
1587
1587
|
"post",
|
|
1588
1588
|
"put",
|
|
1589
1589
|
"patch",
|
|
@@ -1668,7 +1668,7 @@ function Jn(e) {
|
|
|
1668
1668
|
//#endregion
|
|
1669
1669
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/helpers/isAxiosError.js
|
|
1670
1670
|
function Yn(e) {
|
|
1671
|
-
return
|
|
1671
|
+
return U.isObject(e) && e.isAxiosError === !0;
|
|
1672
1672
|
}
|
|
1673
1673
|
//#endregion
|
|
1674
1674
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
@@ -1749,15 +1749,15 @@ Object.entries(Xn).forEach(([e, t]) => {
|
|
|
1749
1749
|
//#endregion
|
|
1750
1750
|
//#region node_modules/.pnpm/axios@1.16.0/node_modules/axios/lib/axios.js
|
|
1751
1751
|
function Zn(e) {
|
|
1752
|
-
let t = new Kn(e), n =
|
|
1753
|
-
return
|
|
1752
|
+
let t = new Kn(e), n = ae(Kn.prototype.request, t);
|
|
1753
|
+
return U.extend(n, Kn.prototype, t, { allOwnKeys: !0 }), U.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1754
1754
|
return Zn(hn(e, t));
|
|
1755
1755
|
}, n;
|
|
1756
1756
|
}
|
|
1757
1757
|
var q = Zn(Zt);
|
|
1758
1758
|
q.Axios = Kn, q.CanceledError = en, q.CancelToken = qn, q.isCancel = $t, q.VERSION = Dn, q.toFormData = At, q.AxiosError = G, q.Cancel = q.CanceledError, q.all = function(e) {
|
|
1759
1759
|
return Promise.all(e);
|
|
1760
|
-
}, q.spread = Jn, q.isAxiosError = Yn, q.mergeConfig = hn, q.AxiosHeaders =
|
|
1760
|
+
}, q.spread = Jn, q.isAxiosError = Yn, q.mergeConfig = hn, q.AxiosHeaders = W, q.formToJSON = (e) => Jt(U.isHTMLForm(e) ? new FormData(e) : e), q.getAdapter = Rn.getAdapter, q.HttpStatusCode = Xn, q.default = q;
|
|
1761
1761
|
//#endregion
|
|
1762
1762
|
//#region src/api/data/baostock.ts
|
|
1763
1763
|
function Qn(e) {
|
|
@@ -1811,6 +1811,11 @@ function nr(e) {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
var rr = "", ir = "/api/stock/kdata";
|
|
1813
1813
|
async function ar(e) {
|
|
1814
|
+
if (typeof window < "u" && window.location.hostname.includes("github.io")) {
|
|
1815
|
+
let e = await (await fetch("mock-stock-data.json")).json();
|
|
1816
|
+
if (e.success && e.data) return e.data.map(nr).sort((e, t) => e.timestamp - t.timestamp);
|
|
1817
|
+
throw Error("Mock data failed");
|
|
1818
|
+
}
|
|
1814
1819
|
let { timeout: t, ...n } = e, r = `${rr}${ir}`, i = {
|
|
1815
1820
|
stock_code: n.symbol,
|
|
1816
1821
|
start_date: n.start_date,
|
|
@@ -1827,6 +1832,14 @@ async function ar(e) {
|
|
|
1827
1832
|
if (!e.success) throw Error(`获取K线数据失败: ${e.error_msg || "未知错误"} (code: ${e.error_code})`);
|
|
1828
1833
|
return !e.data || e.data.length === 0 ? [] : e.data.map(nr).sort((e, t) => e.timestamp - t.timestamp);
|
|
1829
1834
|
} catch (e) {
|
|
1835
|
+
try {
|
|
1836
|
+
console.log("fetch mock-stock-data.json");
|
|
1837
|
+
let e = await fetch("mock-stock-data.json");
|
|
1838
|
+
if (e.ok) {
|
|
1839
|
+
let t = await e.json();
|
|
1840
|
+
if (t.success && t.data) return t.data.map(nr).sort((e, t) => e.timestamp - t.timestamp);
|
|
1841
|
+
}
|
|
1842
|
+
} catch {}
|
|
1830
1843
|
throw q.isAxiosError(e) ? Error(`获取K线数据失败: ${e.message}`) : e;
|
|
1831
1844
|
}
|
|
1832
1845
|
}
|
|
@@ -2706,23 +2719,23 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
2706
2719
|
for (let n in t) e[n] = (e[n] || 0) - (t[n] || 0);
|
|
2707
2720
|
}
|
|
2708
2721
|
function j(e) {
|
|
2709
|
-
return typeof e == "boolean" || typeof e == "number" || e === null ? !e : (0, t._)`!${
|
|
2722
|
+
return typeof e == "boolean" || typeof e == "number" || e === null ? !e : (0, t._)`!${ne(e)}`;
|
|
2710
2723
|
}
|
|
2711
2724
|
e.not = j;
|
|
2712
|
-
var M =
|
|
2725
|
+
var M = te(e.operators.AND);
|
|
2713
2726
|
function N(...e) {
|
|
2714
2727
|
return e.reduce(M);
|
|
2715
2728
|
}
|
|
2716
2729
|
e.and = N;
|
|
2717
|
-
var ee =
|
|
2730
|
+
var ee = te(e.operators.OR);
|
|
2718
2731
|
function P(...e) {
|
|
2719
2732
|
return e.reduce(ee);
|
|
2720
2733
|
}
|
|
2721
2734
|
e.or = P;
|
|
2722
|
-
function F(e) {
|
|
2723
|
-
return (n, r) => n === t.nil ? r : r === t.nil ? n : (0, t._)`${te(n)} ${e} ${te(r)}`;
|
|
2724
|
-
}
|
|
2725
2735
|
function te(e) {
|
|
2736
|
+
return (n, r) => n === t.nil ? r : r === t.nil ? n : (0, t._)`${ne(n)} ${e} ${ne(r)}`;
|
|
2737
|
+
}
|
|
2738
|
+
function ne(e) {
|
|
2726
2739
|
return e instanceof t.Name ? e : (0, t._)`(${e})`;
|
|
2727
2740
|
}
|
|
2728
2741
|
})), Y = /* @__PURE__ */ P(((e) => {
|
|
@@ -3698,7 +3711,7 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
3698
3711
|
function N(e, t, n, a) {
|
|
3699
3712
|
let { gen: o, schema: s, data: u, allErrors: f, opts: p, self: m } = e, { RULES: h } = m;
|
|
3700
3713
|
if (s.$ref && (p.ignoreKeywordsWithRef || !(0, d.schemaHasRulesButRef)(s, h))) {
|
|
3701
|
-
o.block(() =>
|
|
3714
|
+
o.block(() => I(e, "$ref", h.all.$ref.definition));
|
|
3702
3715
|
return;
|
|
3703
3716
|
}
|
|
3704
3717
|
p.jtd || P(e, t), o.block(() => {
|
|
@@ -3712,54 +3725,54 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
3712
3725
|
function ee(e, t) {
|
|
3713
3726
|
let { gen: n, schema: i, opts: { useDefaults: o } } = e;
|
|
3714
3727
|
o && (0, a.assignDefaults)(e, t.type), n.block(() => {
|
|
3715
|
-
for (let n of t.rules) (0, r.shouldUseRule)(i, n) &&
|
|
3728
|
+
for (let n of t.rules) (0, r.shouldUseRule)(i, n) && I(e, n.keyword, n.definition, t.type);
|
|
3716
3729
|
});
|
|
3717
3730
|
}
|
|
3718
3731
|
function P(e, t) {
|
|
3719
|
-
e.schemaEnv.meta || !e.opts.strictTypes || (
|
|
3732
|
+
e.schemaEnv.meta || !e.opts.strictTypes || (te(e, t), e.opts.allowUnionTypes || ne(e, t), re(e, e.dataTypes));
|
|
3720
3733
|
}
|
|
3721
|
-
function
|
|
3734
|
+
function te(e, t) {
|
|
3722
3735
|
if (t.length) {
|
|
3723
3736
|
if (!e.dataTypes.length) {
|
|
3724
3737
|
e.dataTypes = t;
|
|
3725
3738
|
return;
|
|
3726
3739
|
}
|
|
3727
3740
|
t.forEach((t) => {
|
|
3728
|
-
|
|
3729
|
-
}),
|
|
3741
|
+
F(e.dataTypes, t) || oe(e, `type "${t}" not allowed by context "${e.dataTypes.join(",")}"`);
|
|
3742
|
+
}), ae(e, t);
|
|
3730
3743
|
}
|
|
3731
3744
|
}
|
|
3732
|
-
function te(e, t) {
|
|
3733
|
-
t.length > 1 && !(t.length === 2 && t.includes("null")) && R(e, "use allowUnionTypes to allow union type keyword");
|
|
3734
|
-
}
|
|
3735
3745
|
function ne(e, t) {
|
|
3746
|
+
t.length > 1 && !(t.length === 2 && t.includes("null")) && oe(e, "use allowUnionTypes to allow union type keyword");
|
|
3747
|
+
}
|
|
3748
|
+
function re(e, t) {
|
|
3736
3749
|
let n = e.self.RULES.all;
|
|
3737
3750
|
for (let i in n) {
|
|
3738
3751
|
let a = n[i];
|
|
3739
3752
|
if (typeof a == "object" && (0, r.shouldUseRule)(e.schema, a)) {
|
|
3740
3753
|
let { type: n } = a.definition;
|
|
3741
|
-
n.length && !n.some((e) =>
|
|
3754
|
+
n.length && !n.some((e) => ie(t, e)) && oe(e, `missing type "${n.join(",")}" for keyword "${i}"`);
|
|
3742
3755
|
}
|
|
3743
3756
|
}
|
|
3744
3757
|
}
|
|
3745
|
-
function
|
|
3758
|
+
function ie(e, t) {
|
|
3746
3759
|
return e.includes(t) || t === "number" && e.includes("integer");
|
|
3747
3760
|
}
|
|
3748
|
-
function
|
|
3761
|
+
function F(e, t) {
|
|
3749
3762
|
return e.includes(t) || t === "integer" && e.includes("number");
|
|
3750
3763
|
}
|
|
3751
|
-
function
|
|
3764
|
+
function ae(e, t) {
|
|
3752
3765
|
let n = [];
|
|
3753
|
-
for (let r of e.dataTypes)
|
|
3766
|
+
for (let r of e.dataTypes) F(t, r) ? n.push(r) : t.includes("integer") && r === "number" && n.push("integer");
|
|
3754
3767
|
e.dataTypes = n;
|
|
3755
3768
|
}
|
|
3756
|
-
function
|
|
3769
|
+
function oe(e, t) {
|
|
3757
3770
|
let n = e.schemaEnv.baseId + e.errSchemaPath;
|
|
3758
3771
|
t += ` at "${n}" (strictTypes)`, (0, d.checkStrictMode)(e, t, e.opts.strictTypes);
|
|
3759
3772
|
}
|
|
3760
|
-
var
|
|
3773
|
+
var se = class {
|
|
3761
3774
|
constructor(e, t, n) {
|
|
3762
|
-
if ((0, o.validateKeywordUsage)(e, t, n), this.gen = e.gen, this.allErrors = e.allErrors, this.keyword = n, this.data = e.data, this.schema = e.schema[n], this.$data = t.$data && e.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, d.schemaRefOrVal)(e, this.schema, n, this.$data), this.schemaType = t.schemaType, this.parentSchema = e.schema, this.params = {}, this.it = e, this.def = t, this.$data) this.schemaCode = e.gen.const("vSchema",
|
|
3775
|
+
if ((0, o.validateKeywordUsage)(e, t, n), this.gen = e.gen, this.allErrors = e.allErrors, this.keyword = n, this.data = e.data, this.schema = e.schema[n], this.$data = t.$data && e.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, d.schemaRefOrVal)(e, this.schema, n, this.$data), this.schemaType = t.schemaType, this.parentSchema = e.schema, this.params = {}, this.it = e, this.def = t, this.$data) this.schemaCode = e.gen.const("vSchema", z(this.$data, e));
|
|
3763
3776
|
else if (this.schemaCode = this.schemaValue, !(0, o.validSchemaType)(this.schema, t.schemaType, t.allowUndefined)) throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);
|
|
3764
3777
|
("code" in t ? t.trackErrors : t.errors !== !1) && (this.errsCount = e.gen.const("_errs", l.default.errors));
|
|
3765
3778
|
}
|
|
@@ -3857,20 +3870,20 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
3857
3870
|
if (n.opts.unevaluated && (n.props !== !0 || n.items !== !0)) return r.if(t, () => this.mergeEvaluated(e, c.Name)), !0;
|
|
3858
3871
|
}
|
|
3859
3872
|
};
|
|
3860
|
-
e.KeywordCxt =
|
|
3861
|
-
function
|
|
3862
|
-
let i = new
|
|
3873
|
+
e.KeywordCxt = se;
|
|
3874
|
+
function I(e, t, n, r) {
|
|
3875
|
+
let i = new se(e, n, t);
|
|
3863
3876
|
"code" in n ? n.code(i, r) : i.$data && n.validate ? (0, o.funcKeywordCode)(i, n) : "macro" in n ? (0, o.macroKeywordCode)(i, n) : (n.compile || n.validate) && (0, o.funcKeywordCode)(i, n);
|
|
3864
3877
|
}
|
|
3865
|
-
var
|
|
3866
|
-
function
|
|
3878
|
+
var L = /^\/(?:[^~]|~0|~1)*$/, R = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
3879
|
+
function z(e, { dataLevel: t, dataNames: n, dataPathArr: r }) {
|
|
3867
3880
|
let i, a;
|
|
3868
3881
|
if (e === "") return l.default.rootData;
|
|
3869
3882
|
if (e[0] === "/") {
|
|
3870
|
-
if (!
|
|
3883
|
+
if (!L.test(e)) throw Error(`Invalid JSON-pointer: ${e}`);
|
|
3871
3884
|
i = e, a = l.default.rootData;
|
|
3872
3885
|
} else {
|
|
3873
|
-
let o =
|
|
3886
|
+
let o = R.exec(e);
|
|
3874
3887
|
if (!o) throw Error(`Invalid JSON-pointer: ${e}`);
|
|
3875
3888
|
let s = +o[1];
|
|
3876
3889
|
if (i = o[2], i === "#") {
|
|
@@ -3887,7 +3900,7 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
3887
3900
|
return `Cannot access ${e} ${n} levels up, current level is ${t}`;
|
|
3888
3901
|
}
|
|
3889
3902
|
}
|
|
3890
|
-
e.getData =
|
|
3903
|
+
e.getData = z;
|
|
3891
3904
|
})), Fr = /* @__PURE__ */ P(((e) => {
|
|
3892
3905
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = class extends Error {
|
|
3893
3906
|
constructor(e) {
|
|
@@ -4063,7 +4076,7 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
4063
4076
|
baseId: t
|
|
4064
4077
|
}), o.schema !== o.root.schema) return o;
|
|
4065
4078
|
}
|
|
4066
|
-
})), Rr = /* @__PURE__ */
|
|
4079
|
+
})), Rr = /* @__PURE__ */ te({
|
|
4067
4080
|
$id: () => zr,
|
|
4068
4081
|
additionalProperties: () => !1,
|
|
4069
4082
|
default: () => Wr,
|
|
@@ -4561,7 +4574,7 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
4561
4574
|
return n.CodeGen;
|
|
4562
4575
|
}
|
|
4563
4576
|
});
|
|
4564
|
-
var r = Fr(), i = Ir(), a = wr(), o = Lr(), s = J(), c = Nr(), l = Er(), u = Y(), d = (Gr(),
|
|
4577
|
+
var r = Fr(), i = Ir(), a = wr(), o = Lr(), s = J(), c = Nr(), l = Er(), u = Y(), d = (Gr(), ie(Rr).default), f = Yr(), p = (e, t) => new RegExp(e, t);
|
|
4565
4578
|
p.code = "new RegExp";
|
|
4566
4579
|
var m = [
|
|
4567
4580
|
"removeAdditional",
|
|
@@ -6067,7 +6080,7 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
6067
6080
|
}
|
|
6068
6081
|
}
|
|
6069
6082
|
};
|
|
6070
|
-
})), Ii = /* @__PURE__ */
|
|
6083
|
+
})), Ii = /* @__PURE__ */ te({
|
|
6071
6084
|
$id: () => Ri,
|
|
6072
6085
|
$schema: () => Li,
|
|
6073
6086
|
default: () => Ui,
|
|
@@ -6210,9 +6223,9 @@ var yr = /* @__PURE__ */ P(((e) => {
|
|
|
6210
6223
|
properties: Hi,
|
|
6211
6224
|
default: !0
|
|
6212
6225
|
};
|
|
6213
|
-
})), Gi = /* @__PURE__ */
|
|
6226
|
+
})), Gi = /* @__PURE__ */ re((/* @__PURE__ */ P(((e, t) => {
|
|
6214
6227
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.MissingRefError = e.ValidationError = e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = e.Ajv = void 0;
|
|
6215
|
-
var n = Xr(), r = Ni(), i = Fi(), a = (Wi(),
|
|
6228
|
+
var n = Xr(), r = Ni(), i = Fi(), a = (Wi(), ie(Ii).default), o = ["/properties"], s = "http://json-schema.org/draft-07/schema", c = class extends n.default {
|
|
6216
6229
|
_addVocabularies() {
|
|
6217
6230
|
super._addVocabularies(), r.default.forEach((e) => this.addVocabulary(e)), this.opts.discriminator && this.addKeyword(i.default);
|
|
6218
6231
|
}
|
|
@@ -6849,7 +6862,7 @@ var Zi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6849
6862
|
validator;
|
|
6850
6863
|
events;
|
|
6851
6864
|
constructor(e) {
|
|
6852
|
-
this.chart = e, this.validator = new Qi(), this.events = new
|
|
6865
|
+
this.chart = e, this.validator = new Qi(), this.events = new F();
|
|
6853
6866
|
}
|
|
6854
6867
|
async applyConfig(e) {
|
|
6855
6868
|
let t = this.validator.validate(e);
|
|
@@ -7256,7 +7269,7 @@ var ga = Symbol("global-pane"), X = {
|
|
|
7256
7269
|
isDestroyed = !1;
|
|
7257
7270
|
logger;
|
|
7258
7271
|
constructor(e) {
|
|
7259
|
-
this.registry = new _a(), this.eventBus = new
|
|
7272
|
+
this.registry = new _a(), this.eventBus = new F(), this.hookSystem = new va(), this.configManager = new ya(), this.stateStore = new ba(), this.logger = e ?? console;
|
|
7260
7273
|
}
|
|
7261
7274
|
events = {
|
|
7262
7275
|
on: (e, t) => {
|
|
@@ -8422,22 +8435,22 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8422
8435
|
], v = f.filter((e) => e.pane === "main"), x = f.filter((e) => e.pane === "sub"), S = u, T = d, O = y(null), k = y(null), A = y(!1), j = y(null), M = y(null), N = y(!1), ee = y({
|
|
8423
8436
|
left: "0",
|
|
8424
8437
|
bottom: "0"
|
|
8425
|
-
}), P = y(!1),
|
|
8426
|
-
function
|
|
8438
|
+
}), P = y(!1), te = y(null), ne = y(null), re = r(() => S.activeIndicators?.length ? S.activeIndicators.map((e) => f.find((t) => t.id === e)).filter((e) => e !== void 0).sort((e, t) => e.pane === t.pane ? 0 : e.pane === "main" ? -1 : 1) : []), ie = r(() => re.value.some((e) => e.pane === "main") ? re.value.find((e) => e.pane === "sub")?.id ?? null : null), F = r(() => j.value && f.find((e) => e.id === j.value) || null);
|
|
8439
|
+
function ae(e) {
|
|
8427
8440
|
return S.activeIndicators?.includes(e) ?? !1;
|
|
8428
8441
|
}
|
|
8429
|
-
function
|
|
8430
|
-
if (
|
|
8442
|
+
function oe(e) {
|
|
8443
|
+
if (ae(e)) return;
|
|
8431
8444
|
let t = f.find((t) => t.id === e);
|
|
8432
|
-
t && (t.pane === "main" && f.filter((t) => t.pane === "main" && t.id !== e &&
|
|
8445
|
+
t && (t.pane === "main" && f.filter((t) => t.pane === "main" && t.id !== e && ae(t.id)).forEach((e) => T("toggle", e.id, !1)), T("toggle", e, !0), N.value = !1);
|
|
8433
8446
|
}
|
|
8434
|
-
function
|
|
8447
|
+
function se(e) {
|
|
8435
8448
|
T("toggle", e, !1);
|
|
8436
8449
|
}
|
|
8437
|
-
function
|
|
8450
|
+
function I(e) {
|
|
8438
8451
|
j.value = e, A.value = !0;
|
|
8439
8452
|
}
|
|
8440
|
-
function
|
|
8453
|
+
function L(e) {
|
|
8441
8454
|
let t = f.find((t) => t.id === e);
|
|
8442
8455
|
if (!t?.params) return {};
|
|
8443
8456
|
let n = {};
|
|
@@ -8446,52 +8459,52 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8446
8459
|
for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
|
|
8447
8460
|
return i;
|
|
8448
8461
|
}
|
|
8449
|
-
function
|
|
8450
|
-
let t =
|
|
8462
|
+
function R(e) {
|
|
8463
|
+
let t = L(e.id);
|
|
8451
8464
|
return e.params ? e.params.map((e) => t[e.key] ?? "").join(",") : "";
|
|
8452
8465
|
}
|
|
8453
|
-
function
|
|
8466
|
+
function z(e) {
|
|
8454
8467
|
j.value && T("updateParams", j.value, e), A.value = !1;
|
|
8455
8468
|
}
|
|
8456
|
-
function
|
|
8469
|
+
function ce(e) {
|
|
8457
8470
|
return f.find((t) => t.id === e)?.pane === "sub";
|
|
8458
8471
|
}
|
|
8459
|
-
function
|
|
8460
|
-
if (!
|
|
8472
|
+
function le(e, t) {
|
|
8473
|
+
if (!ce(t)) {
|
|
8461
8474
|
e.preventDefault();
|
|
8462
8475
|
return;
|
|
8463
8476
|
}
|
|
8464
|
-
|
|
8465
|
-
}
|
|
8466
|
-
function le(e, t) {
|
|
8467
|
-
!te.value || !se(t) || te.value === t || (F.value = t, e.dataTransfer && (e.dataTransfer.dropEffect = "move"));
|
|
8477
|
+
ne.value = t, te.value = null, e.dataTransfer?.setData("text/plain", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
|
|
8468
8478
|
}
|
|
8469
8479
|
function ue(e, t) {
|
|
8470
|
-
|
|
8480
|
+
!ne.value || !ce(t) || ne.value === t || (te.value = t, e.dataTransfer && (e.dataTransfer.dropEffect = "move"));
|
|
8481
|
+
}
|
|
8482
|
+
function de(e, t) {
|
|
8483
|
+
let n = ne.value || e.dataTransfer?.getData("text/plain") || "";
|
|
8471
8484
|
if (!n || n === t) {
|
|
8472
|
-
|
|
8485
|
+
fe();
|
|
8473
8486
|
return;
|
|
8474
8487
|
}
|
|
8475
|
-
if (!
|
|
8476
|
-
|
|
8488
|
+
if (!ce(n) || !ce(t)) {
|
|
8489
|
+
fe();
|
|
8477
8490
|
return;
|
|
8478
8491
|
}
|
|
8479
|
-
let r =
|
|
8492
|
+
let r = re.value.findIndex((e) => e.id === n), i = re.value.findIndex((e) => e.id === t);
|
|
8480
8493
|
if (r < 0 || i < 0) {
|
|
8481
|
-
|
|
8494
|
+
fe();
|
|
8482
8495
|
return;
|
|
8483
8496
|
}
|
|
8484
|
-
let a = [...
|
|
8497
|
+
let a = [...re.value.map((e) => e.id)], [o] = a.splice(r, 1);
|
|
8485
8498
|
if (!o) {
|
|
8486
|
-
|
|
8499
|
+
fe();
|
|
8487
8500
|
return;
|
|
8488
8501
|
}
|
|
8489
|
-
a.splice(i, 0, o), T("reorderSubIndicators", a.filter((e) =>
|
|
8490
|
-
}
|
|
8491
|
-
function de() {
|
|
8492
|
-
F.value = null, te.value = null;
|
|
8502
|
+
a.splice(i, 0, o), T("reorderSubIndicators", a.filter((e) => ce(e))), fe();
|
|
8493
8503
|
}
|
|
8494
8504
|
function fe() {
|
|
8505
|
+
te.value = null, ne.value = null;
|
|
8506
|
+
}
|
|
8507
|
+
function pe() {
|
|
8495
8508
|
if (!N.value && O.value && !P.value) {
|
|
8496
8509
|
let e = O.value.getBoundingClientRect(), t = window.innerWidth, n = e.left + e.width / 2;
|
|
8497
8510
|
n + 160 > t - 8 && (n = t - 160 - 8), n - 160 < 8 && (n = 168), ee.value = {
|
|
@@ -8501,29 +8514,29 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8501
8514
|
}
|
|
8502
8515
|
N.value = !N.value;
|
|
8503
8516
|
}
|
|
8504
|
-
function
|
|
8517
|
+
function me(e) {
|
|
8505
8518
|
let t = k.value && !k.value.contains(e.target), n = O.value && !O.value.contains(e.target);
|
|
8506
8519
|
t && n && (N.value = !1);
|
|
8507
8520
|
}
|
|
8508
|
-
function
|
|
8521
|
+
function B() {
|
|
8509
8522
|
N.value &&= !1;
|
|
8510
8523
|
}
|
|
8511
8524
|
return h(() => {
|
|
8512
|
-
P.value = typeof CSS < "u" && CSS.supports("anchor-name: --kmap-anchor") && CSS.supports("position-anchor: --kmap-anchor"), document.addEventListener("click",
|
|
8525
|
+
P.value = typeof CSS < "u" && CSS.supports("anchor-name: --kmap-anchor") && CSS.supports("position-anchor: --kmap-anchor"), document.addEventListener("click", me), window.addEventListener("resize", B);
|
|
8513
8526
|
}), g(() => {
|
|
8514
|
-
document.removeEventListener("click",
|
|
8527
|
+
document.removeEventListener("click", me), window.removeEventListener("resize", B);
|
|
8515
8528
|
}), (r, u) => (_(), o("div", $o, [
|
|
8516
|
-
s("div", es, [s("div", ts, [(_(!0), o(e, null, b(
|
|
8529
|
+
s("div", es, [s("div", ts, [(_(!0), o(e, null, b(re.value, (t) => (_(), o(e, { key: t.id }, [t.id === ie.value ? (_(), o("div", ns)) : a("", !0), s("div", {
|
|
8517
8530
|
class: p(["indicator-item", {
|
|
8518
|
-
draggable:
|
|
8519
|
-
"drag-over":
|
|
8520
|
-
"is-dragging":
|
|
8531
|
+
draggable: ce(t.id),
|
|
8532
|
+
"drag-over": te.value === t.id,
|
|
8533
|
+
"is-dragging": ne.value === t.id
|
|
8521
8534
|
}]),
|
|
8522
|
-
draggable:
|
|
8523
|
-
onDragstart: (e) =>
|
|
8524
|
-
onDragover: D((e) =>
|
|
8525
|
-
onDrop: D((e) =>
|
|
8526
|
-
onDragend:
|
|
8535
|
+
draggable: ce(t.id),
|
|
8536
|
+
onDragstart: (e) => le(e, t.id),
|
|
8537
|
+
onDragover: D((e) => ue(e, t.id), ["prevent"]),
|
|
8538
|
+
onDrop: D((e) => de(e, t.id), ["prevent"]),
|
|
8539
|
+
onDragend: fe
|
|
8527
8540
|
}, [s("div", {
|
|
8528
8541
|
class: "indicator-btn-wrapper",
|
|
8529
8542
|
onMouseenter: (e) => M.value = t.id,
|
|
@@ -8531,12 +8544,12 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8531
8544
|
}, [s("button", { class: p(["indicator-btn", {
|
|
8532
8545
|
active: !0,
|
|
8533
8546
|
hovering: M.value === t.id
|
|
8534
|
-
}]) }, [s("span", as, [c(C(t.label) + " ", 1), t.params ? (_(), o("span", os, " (" + C(
|
|
8547
|
+
}]) }, [s("span", as, [c(C(t.label) + " ", 1), t.params ? (_(), o("span", os, " (" + C(R(t)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
|
|
8535
8548
|
default: E(() => [M.value === t.id ? (_(), o("div", ss, [
|
|
8536
8549
|
t.params ? (_(), o("button", {
|
|
8537
8550
|
key: 0,
|
|
8538
8551
|
class: "action-btn settings-btn",
|
|
8539
|
-
onClick: D((e) =>
|
|
8552
|
+
onClick: D((e) => I(t.id), ["stop"]),
|
|
8540
8553
|
title: "编辑参数"
|
|
8541
8554
|
}, [...u[2] ||= [s("svg", {
|
|
8542
8555
|
viewBox: "0 0 24 24",
|
|
@@ -8547,7 +8560,7 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8547
8560
|
t.params ? (_(), o("span", ls)) : a("", !0),
|
|
8548
8561
|
s("button", {
|
|
8549
8562
|
class: "action-btn remove-btn",
|
|
8550
|
-
onClick: D((e) =>
|
|
8563
|
+
onClick: D((e) => se(t.id), ["stop"]),
|
|
8551
8564
|
title: "移除指标"
|
|
8552
8565
|
}, [...u[3] ||= [s("svg", {
|
|
8553
8566
|
viewBox: "0 0 24 24",
|
|
@@ -8561,7 +8574,7 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8561
8574
|
ref_key: "addBtnRef",
|
|
8562
8575
|
ref: O,
|
|
8563
8576
|
class: "add-btn",
|
|
8564
|
-
onClick:
|
|
8577
|
+
onClick: pe,
|
|
8565
8578
|
title: "添加指标"
|
|
8566
8579
|
}, [...u[4] ||= [s("svg", {
|
|
8567
8580
|
viewBox: "0 0 24 24",
|
|
@@ -8578,13 +8591,13 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8578
8591
|
style: m(P.value ? void 0 : ee.value)
|
|
8579
8592
|
}, [s("div", fs, [u[6] ||= s("div", { class: "menu-title" }, "主图指标", -1), s("div", ps, [(_(!0), o(e, null, b(w(v), (e) => (_(), o("button", {
|
|
8580
8593
|
key: e.id,
|
|
8581
|
-
class: p(["menu-item", { disabled:
|
|
8582
|
-
disabled:
|
|
8583
|
-
onClick: (t) =>
|
|
8594
|
+
class: p(["menu-item", { disabled: ae(e.id) }]),
|
|
8595
|
+
disabled: ae(e.id),
|
|
8596
|
+
onClick: (t) => oe(e.id)
|
|
8584
8597
|
}, [
|
|
8585
8598
|
c(C(e.label) + " ", 1),
|
|
8586
8599
|
s("span", hs, " (" + C(e.name) + ") ", 1),
|
|
8587
|
-
|
|
8600
|
+
ae(e.id) ? (_(), o("span", gs, [...u[5] ||= [s("svg", {
|
|
8588
8601
|
viewBox: "0 0 24 24",
|
|
8589
8602
|
width: "14",
|
|
8590
8603
|
height: "14",
|
|
@@ -8592,13 +8605,13 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8592
8605
|
}, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
|
|
8593
8606
|
], 10, ms))), 128))])]), s("div", _s, [u[8] ||= s("div", { class: "menu-title" }, "副图指标", -1), s("div", vs, [(_(!0), o(e, null, b(w(x), (e) => (_(), o("button", {
|
|
8594
8607
|
key: e.id,
|
|
8595
|
-
class: p(["menu-item", { disabled:
|
|
8596
|
-
disabled:
|
|
8597
|
-
onClick: (t) =>
|
|
8608
|
+
class: p(["menu-item", { disabled: ae(e.id) }]),
|
|
8609
|
+
disabled: ae(e.id),
|
|
8610
|
+
onClick: (t) => oe(e.id)
|
|
8598
8611
|
}, [
|
|
8599
8612
|
c(C(e.label) + " ", 1),
|
|
8600
8613
|
s("span", bs, " (" + C(e.name) + ") ", 1),
|
|
8601
|
-
|
|
8614
|
+
ae(e.id) ? (_(), o("span", xs, [...u[7] ||= [s("svg", {
|
|
8602
8615
|
viewBox: "0 0 24 24",
|
|
8603
8616
|
width: "14",
|
|
8604
8617
|
height: "14",
|
|
@@ -8607,16 +8620,16 @@ var mo = { class: "kline-tooltip__title" }, ho = { key: 0 }, go = { class: "klin
|
|
|
8607
8620
|
], 10, ys))), 128))])])], 6)) : a("", !0)]),
|
|
8608
8621
|
_: 1
|
|
8609
8622
|
})])),
|
|
8610
|
-
|
|
8623
|
+
F.value ? (_(), i(Qo, {
|
|
8611
8624
|
key: 0,
|
|
8612
8625
|
visible: A.value,
|
|
8613
|
-
"indicator-id":
|
|
8614
|
-
"indicator-name":
|
|
8615
|
-
"indicator-description":
|
|
8616
|
-
params:
|
|
8617
|
-
values:
|
|
8626
|
+
"indicator-id": F.value.id,
|
|
8627
|
+
"indicator-name": F.value.name,
|
|
8628
|
+
"indicator-description": F.value.description,
|
|
8629
|
+
params: F.value.params || [],
|
|
8630
|
+
values: L(F.value.id),
|
|
8618
8631
|
onClose: u[1] ||= (e) => A.value = !1,
|
|
8619
|
-
onConfirm:
|
|
8632
|
+
onConfirm: z
|
|
8620
8633
|
}, null, 8, [
|
|
8621
8634
|
"visible",
|
|
8622
8635
|
"indicator-id",
|
|
@@ -9171,9 +9184,9 @@ var Ls = class {
|
|
|
9171
9184
|
let S = x + this.visibleRange.start, C = this.chart.getData(), w = this.getPaneByY(i);
|
|
9172
9185
|
if (this.activePaneId = w?.id || null, S >= 0 && S < (C?.length ?? 0)) {
|
|
9173
9186
|
this.crosshairIndex = S;
|
|
9174
|
-
let e = this.kLinePositions[x] + (this.kWidthPx - 1) / 2 / f - d;
|
|
9187
|
+
let e = this.kLinePositions[x], t = (Math.round(e * f) + (this.kWidthPx - 1) / 2) / f - d;
|
|
9175
9188
|
if (this.crosshairPos = {
|
|
9176
|
-
x: Math.min(Math.max(
|
|
9189
|
+
x: Math.min(Math.max(t, 0), l),
|
|
9177
9190
|
y: Math.min(Math.max(i, 0), u)
|
|
9178
9191
|
}, w) {
|
|
9179
9192
|
let e = i - w.top;
|
|
@@ -9185,8 +9198,8 @@ var Ls = class {
|
|
|
9185
9198
|
this.hoveredIndex = null;
|
|
9186
9199
|
return;
|
|
9187
9200
|
}
|
|
9188
|
-
let E = i - w.top, D = w.yAxis.priceToY(T.open), O = w.yAxis.priceToY(T.close), k = w.yAxis.priceToY(T.high), A = w.yAxis.priceToY(T.low), j = Math.min(D, O), M = Math.max(D, O), N = h - this.kLinePositions[x], ee = v / 2, P = Math.abs(M - j),
|
|
9189
|
-
if (!
|
|
9201
|
+
let E = i - w.top, D = w.yAxis.priceToY(T.open), O = w.yAxis.priceToY(T.close), k = w.yAxis.priceToY(T.high), A = w.yAxis.priceToY(T.low), j = Math.min(D, O), M = Math.max(D, O), N = h - this.kLinePositions[x], ee = v / 2, P = Math.abs(M - j), te = P < 8 ? (j + M) / 2 - 8 / 2 : j, ne = P < 8 ? (j + M) / 2 + 8 / 2 : M, re = E >= te && E <= ne && N >= 0 && N <= v, ie = Math.abs(N - ee) <= 3 && E >= Math.min(k, A) && E <= Math.max(k, A);
|
|
9202
|
+
if (!re && !ie) {
|
|
9190
9203
|
this.hoveredIndex = null;
|
|
9191
9204
|
return;
|
|
9192
9205
|
}
|
|
@@ -9198,10 +9211,10 @@ var Ls = class {
|
|
|
9198
9211
|
};
|
|
9199
9212
|
return;
|
|
9200
9213
|
}
|
|
9201
|
-
let
|
|
9214
|
+
let F = this.tooltipSize.width, ae = this.tooltipSize.height, oe = r + 14, se = r - 14 - F, I = oe + F + 12 <= s ? oe : se, L = i + 14, R = Math.max(12, s - F - 12), z = Math.max(12, c - ae - 12);
|
|
9202
9215
|
this.tooltipPos = {
|
|
9203
|
-
x: Math.min(Math.max(
|
|
9204
|
-
y: Math.min(Math.max(
|
|
9216
|
+
x: Math.min(Math.max(I, 12), R),
|
|
9217
|
+
y: Math.min(Math.max(L, 12), z)
|
|
9205
9218
|
};
|
|
9206
9219
|
}
|
|
9207
9220
|
reset() {
|
|
@@ -9229,8 +9242,8 @@ var Ls = class {
|
|
|
9229
9242
|
resize(e, t, n) {
|
|
9230
9243
|
let r = this.dom.plotCanvas, i = this.dom.yAxisCanvas;
|
|
9231
9244
|
r.width = Math.round(e * n), r.height = Math.round(t * n), r.style.width = `${r.width / n}px`, r.style.height = `${r.height / n}px`;
|
|
9232
|
-
let a = this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60);
|
|
9233
|
-
i.width = Math.round(
|
|
9245
|
+
let a = this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60), o = i.parentElement?.clientWidth ?? 0, s = o > 0 ? o : a;
|
|
9246
|
+
i.width = Math.round(s * n), i.height = Math.round(t * n), i.style.width = `${s}px`, i.style.height = `${i.height / n}px`;
|
|
9234
9247
|
}
|
|
9235
9248
|
destroy() {}
|
|
9236
9249
|
};
|
|
@@ -9327,38 +9340,38 @@ function Us(e = {}) {
|
|
|
9327
9340
|
return [n];
|
|
9328
9341
|
},
|
|
9329
9342
|
draw(e) {
|
|
9330
|
-
let { ctx: i, pane: a, data: o, range: s, scrollLeft: c,
|
|
9331
|
-
if (!
|
|
9343
|
+
let { ctx: i, pane: a, data: o, range: s, scrollLeft: c, dpr: l } = e, u = o;
|
|
9344
|
+
if (!u.length) return;
|
|
9332
9345
|
i.save(), i.translate(-c, 0);
|
|
9333
|
-
let { start:
|
|
9334
|
-
for (let e =
|
|
9335
|
-
let t =
|
|
9346
|
+
let { start: d, end: f } = s, p = 0, m = Infinity;
|
|
9347
|
+
for (let e = d; e < f && e < u.length; e++) {
|
|
9348
|
+
let t = u[e];
|
|
9336
9349
|
if (!t) continue;
|
|
9337
9350
|
let n = t.volume;
|
|
9338
|
-
n != null && (
|
|
9351
|
+
n != null && (p = Math.max(p, n), m = Math.min(m, n));
|
|
9339
9352
|
}
|
|
9340
|
-
if (
|
|
9353
|
+
if (p === 0 || !Number.isFinite(m)) {
|
|
9341
9354
|
i.restore();
|
|
9342
9355
|
return;
|
|
9343
9356
|
}
|
|
9344
|
-
let
|
|
9345
|
-
minPrice:
|
|
9346
|
-
maxPrice:
|
|
9347
|
-
}),
|
|
9357
|
+
let h = Math.max(.05, (p - m) * .1), g = Math.max(0, m - h), _ = p + h, v = a.yAxis.getDisplayRange({
|
|
9358
|
+
minPrice: g,
|
|
9359
|
+
maxPrice: _
|
|
9360
|
+
}), y = v.minPrice, b = v.maxPrice - y || 1, x = a.height - (0 - y) / b * a.height;
|
|
9348
9361
|
r?.setSharedState(n, {
|
|
9349
|
-
valueMin:
|
|
9350
|
-
valueMax:
|
|
9362
|
+
valueMin: g,
|
|
9363
|
+
valueMax: _,
|
|
9351
9364
|
timestamp: Date.now()
|
|
9352
9365
|
}, `volume_${t}`);
|
|
9353
|
-
for (let
|
|
9354
|
-
let
|
|
9355
|
-
if (!t) continue;
|
|
9356
|
-
let n = t.volume;
|
|
9366
|
+
for (let t = d; t < f; t++) {
|
|
9367
|
+
let n = u[t];
|
|
9357
9368
|
if (!n) continue;
|
|
9358
|
-
let r =
|
|
9359
|
-
if (r
|
|
9360
|
-
let o =
|
|
9361
|
-
|
|
9369
|
+
let r = n.volume;
|
|
9370
|
+
if (!r) continue;
|
|
9371
|
+
let o = e.kBarRects[t - d];
|
|
9372
|
+
if (!o) continue;
|
|
9373
|
+
let s = o.x, c = o.width;
|
|
9374
|
+
Ws(i, s, Gs(n), r, c, y, b, x, a.height, l);
|
|
9362
9375
|
}
|
|
9363
9376
|
i.restore();
|
|
9364
9377
|
}
|
|
@@ -9457,14 +9470,16 @@ function Xs(e = {}) {
|
|
|
9457
9470
|
}), r = e, a;
|
|
9458
9471
|
}
|
|
9459
9472
|
function a(e, t, n, r) {
|
|
9460
|
-
let { pane: i, range: a,
|
|
9473
|
+
let { pane: i, range: a, dpr: o, kLineCenters: s } = n;
|
|
9461
9474
|
e.strokeStyle = r, e.lineWidth = 1, e.lineJoin = "round", e.lineCap = "round", e.beginPath();
|
|
9462
|
-
let
|
|
9475
|
+
let c = !0;
|
|
9463
9476
|
for (let n = a.start; n < a.end && n < t.length; n++) {
|
|
9464
9477
|
let r = t[n];
|
|
9465
9478
|
if (r === void 0) continue;
|
|
9466
|
-
let
|
|
9467
|
-
|
|
9479
|
+
let l = s[n - a.start];
|
|
9480
|
+
if (l === void 0) continue;
|
|
9481
|
+
let u = i.yAxis.priceToY(r), d = l, f = Q(u, o);
|
|
9482
|
+
c ? (e.moveTo(d, f), c = !1) : e.lineTo(d, f);
|
|
9468
9483
|
}
|
|
9469
9484
|
e.stroke();
|
|
9470
9485
|
}
|
|
@@ -9546,41 +9561,47 @@ function Qs(e = {}) {
|
|
|
9546
9561
|
paneId: "main",
|
|
9547
9562
|
priority: X.INDICATOR,
|
|
9548
9563
|
draw(e) {
|
|
9549
|
-
let { ctx: n, pane: r, data: i, range: a, scrollLeft: s,
|
|
9550
|
-
if (
|
|
9551
|
-
let
|
|
9564
|
+
let { ctx: n, pane: r, data: i, range: a, scrollLeft: s, dpr: c, kLineCenters: l } = e, u = i;
|
|
9565
|
+
if (u.length < t.period) return;
|
|
9566
|
+
let d = o(u);
|
|
9552
9567
|
n.save(), n.translate(-s, 0);
|
|
9553
|
-
let
|
|
9568
|
+
let f = Math.max(a.start, t.period - 1), p = Math.min(a.end, u.length);
|
|
9554
9569
|
if (t.showBand) {
|
|
9555
9570
|
n.fillStyle = Wa.BAND_FILL, n.beginPath();
|
|
9556
9571
|
let e = !0;
|
|
9557
|
-
for (let t =
|
|
9558
|
-
let i =
|
|
9572
|
+
for (let t = f; t < p; t++) {
|
|
9573
|
+
let i = d[t];
|
|
9559
9574
|
if (!i) continue;
|
|
9560
|
-
let o =
|
|
9561
|
-
|
|
9575
|
+
let o = l[t - a.start];
|
|
9576
|
+
if (o === void 0) continue;
|
|
9577
|
+
let s = r.yAxis.priceToY(i.upper), u = o, f = Q(s, c);
|
|
9578
|
+
e ? (n.moveTo(u, f), e = !1) : n.lineTo(u, f);
|
|
9562
9579
|
}
|
|
9563
|
-
for (let e =
|
|
9564
|
-
let t =
|
|
9580
|
+
for (let e = p - 1; e >= f; e--) {
|
|
9581
|
+
let t = d[e];
|
|
9565
9582
|
if (!t) continue;
|
|
9566
|
-
let i =
|
|
9567
|
-
|
|
9583
|
+
let i = l[e - a.start];
|
|
9584
|
+
if (i === void 0) continue;
|
|
9585
|
+
let o = r.yAxis.priceToY(t.lower), s = i, u = Q(o, c);
|
|
9586
|
+
n.lineTo(s, u);
|
|
9568
9587
|
}
|
|
9569
9588
|
n.closePath(), n.fill();
|
|
9570
9589
|
}
|
|
9571
9590
|
n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round";
|
|
9572
|
-
let
|
|
9591
|
+
let m = (e, t) => {
|
|
9573
9592
|
n.strokeStyle = t, n.beginPath();
|
|
9574
9593
|
let i = !0;
|
|
9575
|
-
for (let t =
|
|
9576
|
-
let o =
|
|
9594
|
+
for (let t = f; t < p; t++) {
|
|
9595
|
+
let o = d[t];
|
|
9577
9596
|
if (!o) continue;
|
|
9578
|
-
let s =
|
|
9579
|
-
|
|
9597
|
+
let s = l[t - a.start];
|
|
9598
|
+
if (s === void 0) continue;
|
|
9599
|
+
let u = r.yAxis.priceToY(o[e]), f = s, p = Q(u, c);
|
|
9600
|
+
i ? (n.moveTo(f, p), i = !1) : n.lineTo(f, p);
|
|
9580
9601
|
}
|
|
9581
9602
|
n.stroke();
|
|
9582
9603
|
};
|
|
9583
|
-
t.showUpper &&
|
|
9604
|
+
t.showUpper && m("upper", Wa.UPPER), t.showMiddle && m("middle", Wa.MIDDLE), t.showLower && m("lower", Wa.LOWER), n.restore();
|
|
9584
9605
|
},
|
|
9585
9606
|
onDataUpdate() {
|
|
9586
9607
|
n = null;
|
|
@@ -9666,14 +9687,16 @@ function nc(e = {}) {
|
|
|
9666
9687
|
if (u.length < 2) return;
|
|
9667
9688
|
let d = o(u);
|
|
9668
9689
|
t.save(), t.translate(-a, 0);
|
|
9669
|
-
let f = i.start, p = Math.min(i.end, u.length), m = $a.FAST, h = $a.SLOW, g = (
|
|
9670
|
-
t.strokeStyle =
|
|
9671
|
-
let
|
|
9672
|
-
for (let
|
|
9673
|
-
let
|
|
9674
|
-
if (!
|
|
9675
|
-
let
|
|
9676
|
-
|
|
9690
|
+
let f = i.start, p = Math.min(i.end, u.length), m = $a.FAST, h = $a.SLOW, g = (r, a) => {
|
|
9691
|
+
t.strokeStyle = a, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9692
|
+
let o = !0;
|
|
9693
|
+
for (let a = f; a < p; a++) {
|
|
9694
|
+
let s = d[a];
|
|
9695
|
+
if (!s) continue;
|
|
9696
|
+
let l = e.kLineCenters[a - i.start];
|
|
9697
|
+
if (l === void 0) continue;
|
|
9698
|
+
let u = n.yAxis.priceToY(s[r]), f = l, p = Q(u, c);
|
|
9699
|
+
o ? (t.moveTo(f, p), o = !1) : t.lineTo(f, p);
|
|
9677
9700
|
}
|
|
9678
9701
|
t.stroke();
|
|
9679
9702
|
};
|
|
@@ -9752,38 +9775,44 @@ function ac(e = {}) {
|
|
|
9752
9775
|
paneId: "main",
|
|
9753
9776
|
priority: X.INDICATOR,
|
|
9754
9777
|
draw(e) {
|
|
9755
|
-
let { ctx: n, pane: r, data: i, range: a, scrollLeft: s,
|
|
9756
|
-
if (
|
|
9757
|
-
let
|
|
9778
|
+
let { ctx: n, pane: r, data: i, range: a, scrollLeft: s, dpr: c, kLineCenters: l } = e, u = i;
|
|
9779
|
+
if (u.length < t.period) return;
|
|
9780
|
+
let d = o(u);
|
|
9758
9781
|
n.save(), n.translate(-s, 0);
|
|
9759
|
-
let
|
|
9782
|
+
let f = Math.max(a.start, t.period - 1), p = Math.min(a.end, u.length);
|
|
9760
9783
|
n.fillStyle = "rgba(69, 112, 249, 0.08)", n.beginPath();
|
|
9761
|
-
let
|
|
9762
|
-
for (let e =
|
|
9763
|
-
let t =
|
|
9784
|
+
let m = !0;
|
|
9785
|
+
for (let e = f; e < p; e++) {
|
|
9786
|
+
let t = d[e];
|
|
9764
9787
|
if (!t) continue;
|
|
9765
|
-
let i =
|
|
9766
|
-
|
|
9788
|
+
let i = l[e - a.start];
|
|
9789
|
+
if (i === void 0) continue;
|
|
9790
|
+
let o = r.yAxis.priceToY(t.upper), s = i, u = Q(o, c);
|
|
9791
|
+
m ? (n.moveTo(s, u), m = !1) : n.lineTo(s, u);
|
|
9767
9792
|
}
|
|
9768
|
-
for (let e =
|
|
9769
|
-
let t =
|
|
9793
|
+
for (let e = p - 1; e >= f; e--) {
|
|
9794
|
+
let t = d[e];
|
|
9770
9795
|
if (!t) continue;
|
|
9771
|
-
let i =
|
|
9772
|
-
|
|
9796
|
+
let i = l[e - a.start];
|
|
9797
|
+
if (i === void 0) continue;
|
|
9798
|
+
let o = r.yAxis.priceToY(t.lower), s = i, u = Q(o, c);
|
|
9799
|
+
n.lineTo(s, u);
|
|
9773
9800
|
}
|
|
9774
9801
|
n.closePath(), n.fill(), n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round";
|
|
9775
|
-
let
|
|
9802
|
+
let h = (e, t) => {
|
|
9776
9803
|
n.strokeStyle = t, n.beginPath();
|
|
9777
9804
|
let i = !0;
|
|
9778
|
-
for (let t =
|
|
9779
|
-
let o =
|
|
9805
|
+
for (let t = f; t < p; t++) {
|
|
9806
|
+
let o = d[t];
|
|
9780
9807
|
if (!o) continue;
|
|
9781
|
-
let s =
|
|
9782
|
-
|
|
9808
|
+
let s = l[t - a.start];
|
|
9809
|
+
if (s === void 0) continue;
|
|
9810
|
+
let u = r.yAxis.priceToY(o[e]), f = s, p = Q(u, c);
|
|
9811
|
+
i ? (n.moveTo(f, p), i = !1) : n.lineTo(f, p);
|
|
9783
9812
|
}
|
|
9784
9813
|
n.stroke();
|
|
9785
9814
|
};
|
|
9786
|
-
|
|
9815
|
+
h("upper", "rgba(214, 10, 34, 1)"), h("middle", "rgba(69, 112, 249, 1)"), h("lower", "rgba(3, 123, 102, 1)"), n.restore();
|
|
9787
9816
|
},
|
|
9788
9817
|
onDataUpdate() {
|
|
9789
9818
|
n = null;
|
|
@@ -9990,77 +10019,77 @@ function dc(e = {}) {
|
|
|
9990
10019
|
return [r];
|
|
9991
10020
|
},
|
|
9992
10021
|
draw(e) {
|
|
9993
|
-
let { ctx: n, pane: o, data: s, range: c, scrollLeft: l,
|
|
9994
|
-
if (
|
|
9995
|
-
let
|
|
9996
|
-
for (let e = c.start; e < c.end && e <
|
|
9997
|
-
let t =
|
|
9998
|
-
t && (
|
|
9999
|
-
}
|
|
10000
|
-
if (!Number.isFinite(
|
|
10001
|
-
let
|
|
10002
|
-
|
|
10003
|
-
let
|
|
10004
|
-
valueMin:
|
|
10005
|
-
valueMax:
|
|
10022
|
+
let { ctx: n, pane: o, data: s, range: c, scrollLeft: l, dpr: u } = e, f = s;
|
|
10023
|
+
if (f.length < a.slowPeriod) return;
|
|
10024
|
+
let p = d(f), m = -Infinity, h = Infinity;
|
|
10025
|
+
for (let e = c.start; e < c.end && e < p.length; e++) {
|
|
10026
|
+
let t = p[e];
|
|
10027
|
+
t && (m = Math.max(m, t.dif, t.dea, t.macd), h = Math.min(h, t.dif, t.dea, t.macd));
|
|
10028
|
+
}
|
|
10029
|
+
if (!Number.isFinite(m) || !Number.isFinite(h)) return;
|
|
10030
|
+
let g = Math.max(.05, (m - h) * .1), _ = h - g, v = m + g;
|
|
10031
|
+
v - _;
|
|
10032
|
+
let y = c.end - 1, b = y >= 0 && y < p.length ? p[y] : null, x = {
|
|
10033
|
+
valueMin: _,
|
|
10034
|
+
valueMax: v,
|
|
10006
10035
|
timestamp: Date.now(),
|
|
10007
|
-
latestValues:
|
|
10008
|
-
dif:
|
|
10009
|
-
dea:
|
|
10010
|
-
macd:
|
|
10036
|
+
latestValues: b ? {
|
|
10037
|
+
dif: b.dif,
|
|
10038
|
+
dea: b.dea,
|
|
10039
|
+
macd: b.macd
|
|
10011
10040
|
} : void 0
|
|
10012
10041
|
};
|
|
10013
|
-
i?.setSharedState(r,
|
|
10014
|
-
let
|
|
10015
|
-
minPrice:
|
|
10016
|
-
maxPrice:
|
|
10017
|
-
}),
|
|
10042
|
+
i?.setSharedState(r, x, `macd_${t}`);
|
|
10043
|
+
let S = o.yAxis.getDisplayRange({
|
|
10044
|
+
minPrice: _,
|
|
10045
|
+
maxPrice: v
|
|
10046
|
+
}), C = S.minPrice, w = S.maxPrice - C || 1, T = o.height - (0 - C) / w * o.height;
|
|
10018
10047
|
n.save(), n.translate(-l, 0);
|
|
10019
|
-
let
|
|
10048
|
+
let E = Math.max(c.start, a.slowPeriod - 1), D = Math.min(c.end, f.length);
|
|
10020
10049
|
if (a.showBAR) {
|
|
10021
|
-
let
|
|
10022
|
-
for (let r =
|
|
10023
|
-
let i =
|
|
10050
|
+
let t = Math.round(T * u) / u;
|
|
10051
|
+
for (let r = E; r < D; r++) {
|
|
10052
|
+
let i = p[r];
|
|
10024
10053
|
if (!i) continue;
|
|
10025
|
-
let a =
|
|
10026
|
-
if (a
|
|
10027
|
-
let s =
|
|
10028
|
-
|
|
10029
|
-
let
|
|
10030
|
-
|
|
10031
|
-
let
|
|
10032
|
-
if (
|
|
10033
|
-
let
|
|
10034
|
-
n.fillRect(
|
|
10054
|
+
let a = e.kBarRects[r - c.start];
|
|
10055
|
+
if (!a) continue;
|
|
10056
|
+
let s = a.x, l = a.width, d = o.height - (i.macd - C) / w * o.height, f = i.macd >= 0, m = r > 0 ? p[r - 1] : null, h;
|
|
10057
|
+
h = m ? i.macd >= m.macd : !0;
|
|
10058
|
+
let g;
|
|
10059
|
+
g = f ? h ? Ga.BAR_UP : Ga.BAR_UP_LIGHT : h ? Ga.BAR_DOWN_LIGHT : Ga.BAR_DOWN, n.fillStyle = g;
|
|
10060
|
+
let _ = Math.round(d * u) / u, v = 1 / u;
|
|
10061
|
+
if (f) {
|
|
10062
|
+
let e = t - _, r = e <= 0 ? v : Math.max(e, v), i = e <= 0 ? t - v : t - r;
|
|
10063
|
+
n.fillRect(s, i, l, r);
|
|
10035
10064
|
} else {
|
|
10036
|
-
let
|
|
10037
|
-
n.fillRect(
|
|
10065
|
+
let e = _ - t, r = e <= 0 ? v : Math.max(e, v);
|
|
10066
|
+
n.fillRect(s, t, l, r);
|
|
10038
10067
|
}
|
|
10039
10068
|
}
|
|
10040
10069
|
}
|
|
10041
10070
|
if (a.showDIF) {
|
|
10042
10071
|
n.strokeStyle = Ga.DIF, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10043
|
-
let
|
|
10044
|
-
for (let
|
|
10045
|
-
let
|
|
10046
|
-
if (!
|
|
10047
|
-
let
|
|
10048
|
-
if (
|
|
10049
|
-
let
|
|
10050
|
-
|
|
10072
|
+
let t = !0;
|
|
10073
|
+
for (let r = E; r < D; r++) {
|
|
10074
|
+
let i = p[r];
|
|
10075
|
+
if (!i) continue;
|
|
10076
|
+
let a = e.kLineCenters[r - c.start];
|
|
10077
|
+
if (a === void 0) continue;
|
|
10078
|
+
let s = o.height - (i.dif - C) / w * o.height, l = a, d = Q(s, u);
|
|
10079
|
+
t ? (n.moveTo(l, d), t = !1) : n.lineTo(l, d);
|
|
10051
10080
|
}
|
|
10052
10081
|
n.stroke();
|
|
10053
10082
|
}
|
|
10054
10083
|
if (a.showDEA) {
|
|
10055
10084
|
n.strokeStyle = Ga.DEA, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10056
|
-
let
|
|
10057
|
-
for (let
|
|
10058
|
-
let
|
|
10059
|
-
if (!
|
|
10060
|
-
let
|
|
10061
|
-
if (
|
|
10062
|
-
let
|
|
10063
|
-
|
|
10085
|
+
let t = !0;
|
|
10086
|
+
for (let r = E; r < D; r++) {
|
|
10087
|
+
let i = p[r];
|
|
10088
|
+
if (!i) continue;
|
|
10089
|
+
let a = e.kLineCenters[r - c.start];
|
|
10090
|
+
if (a === void 0) continue;
|
|
10091
|
+
let s = o.height - (i.dea - C) / w * o.height, l = a, d = Q(s, u);
|
|
10092
|
+
t ? (n.moveTo(l, d), t = !1) : n.lineTo(l, d);
|
|
10064
10093
|
}
|
|
10065
10094
|
n.stroke();
|
|
10066
10095
|
}
|
|
@@ -10163,35 +10192,35 @@ function hc(e = {}) {
|
|
|
10163
10192
|
return [r];
|
|
10164
10193
|
},
|
|
10165
10194
|
draw(e) {
|
|
10166
|
-
let { ctx: n, pane: o, data: s, range: c, scrollLeft: l,
|
|
10167
|
-
if (
|
|
10168
|
-
let { rsi1:
|
|
10195
|
+
let { ctx: n, pane: o, data: s, range: c, scrollLeft: l, dpr: u, kLineCenters: d } = e, f = s;
|
|
10196
|
+
if (f.length < a.period1 + 1) return;
|
|
10197
|
+
let { rsi1: m, rsi2: h, rsi3: g } = p(f), _ = {
|
|
10169
10198
|
valueMin: 0,
|
|
10170
10199
|
valueMax: 100,
|
|
10171
10200
|
timestamp: Date.now()
|
|
10172
10201
|
};
|
|
10173
|
-
i?.setSharedState(r,
|
|
10174
|
-
let
|
|
10202
|
+
i?.setSharedState(r, _, `rsi_${t}`);
|
|
10203
|
+
let v = o.yAxis.getDisplayRange({
|
|
10175
10204
|
minPrice: 0,
|
|
10176
10205
|
maxPrice: 100
|
|
10177
|
-
}),
|
|
10206
|
+
}), y = v.minPrice, b = v.maxPrice - y || 1;
|
|
10178
10207
|
n.save(), n.translate(-l, 0);
|
|
10179
|
-
let
|
|
10180
|
-
n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(
|
|
10181
|
-
let
|
|
10208
|
+
let x = o.height - (80 - y) / b * o.height, S = o.height - (50 - y) / b * o.height, C = o.height - (20 - y) / b * o.height, w = l, T = l + e.paneWidth;
|
|
10209
|
+
n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(w, x), n.lineTo(T, x), n.moveTo(w, S), n.lineTo(T, S), n.moveTo(w, C), n.lineTo(T, C), n.stroke(), n.setLineDash([]);
|
|
10210
|
+
let E = Math.max(c.start, a.period1), D = Math.min(c.end, f.length), O = (e, t) => {
|
|
10182
10211
|
n.strokeStyle = t, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10183
10212
|
let r = !0;
|
|
10184
|
-
for (let t =
|
|
10213
|
+
for (let t = E; t < D; t++) {
|
|
10185
10214
|
let i = e[t];
|
|
10186
10215
|
if (i === void 0) continue;
|
|
10187
|
-
let a =
|
|
10216
|
+
let a = d[t - c.start];
|
|
10188
10217
|
if (a === void 0) continue;
|
|
10189
|
-
let s =
|
|
10190
|
-
r ? (n.moveTo(
|
|
10218
|
+
let s = o.height - (i - y) / b * o.height, l = a, f = Q(s, u);
|
|
10219
|
+
r ? (n.moveTo(l, f), r = !1) : n.lineTo(l, f);
|
|
10191
10220
|
}
|
|
10192
10221
|
n.stroke();
|
|
10193
10222
|
};
|
|
10194
|
-
a.showRSI1 &&
|
|
10223
|
+
a.showRSI1 && O(m, qa.RSI1), a.showRSI2 && O(h, qa.RSI2), a.showRSI3 && O(g, qa.RSI3), n.restore();
|
|
10195
10224
|
},
|
|
10196
10225
|
onDataUpdate() {
|
|
10197
10226
|
o = null;
|
|
@@ -10268,39 +10297,39 @@ function vc(e = {}) {
|
|
|
10268
10297
|
return [r];
|
|
10269
10298
|
},
|
|
10270
10299
|
draw(e) {
|
|
10271
|
-
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u,
|
|
10272
|
-
if (
|
|
10273
|
-
let
|
|
10274
|
-
for (let e = c.start; e < c.end && e <
|
|
10275
|
-
let t =
|
|
10276
|
-
t !== void 0 && (
|
|
10277
|
-
}
|
|
10278
|
-
if (!Number.isFinite(
|
|
10279
|
-
|
|
10280
|
-
let
|
|
10281
|
-
valueMin:
|
|
10282
|
-
valueMax:
|
|
10300
|
+
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u, dpr: d, kLineCenters: f } = e, p = s;
|
|
10301
|
+
if (p.length < a.period) return;
|
|
10302
|
+
let m = l(p), h = -Infinity, g = Infinity;
|
|
10303
|
+
for (let e = c.start; e < c.end && e < m.length; e++) {
|
|
10304
|
+
let t = m[e];
|
|
10305
|
+
t !== void 0 && (h = Math.max(h, t), g = Math.min(g, t));
|
|
10306
|
+
}
|
|
10307
|
+
if (!Number.isFinite(h) || !Number.isFinite(g)) return;
|
|
10308
|
+
h = Math.max(h, 150), g = Math.min(g, -150), h - g;
|
|
10309
|
+
let _ = {
|
|
10310
|
+
valueMin: g,
|
|
10311
|
+
valueMax: h,
|
|
10283
10312
|
timestamp: Date.now()
|
|
10284
10313
|
};
|
|
10285
|
-
i?.setSharedState(r,
|
|
10286
|
-
let
|
|
10287
|
-
minPrice:
|
|
10288
|
-
maxPrice:
|
|
10289
|
-
}),
|
|
10314
|
+
i?.setSharedState(r, _, `cci_${t}`);
|
|
10315
|
+
let v = o.yAxis.getDisplayRange({
|
|
10316
|
+
minPrice: g,
|
|
10317
|
+
maxPrice: h
|
|
10318
|
+
}), y = v.minPrice, b = v.maxPrice - y || 1, x = o.height - (0 - y) / b * o.height;
|
|
10290
10319
|
n.save(), n.translate(-u, 0);
|
|
10291
|
-
let
|
|
10292
|
-
n.strokeStyle = Ja.OVERBOUGHT, n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(
|
|
10293
|
-
let
|
|
10320
|
+
let S = o.height - (100 - y) / b * o.height, C = o.height - (-100 - y) / b * o.height, w = u, T = u + e.paneWidth;
|
|
10321
|
+
n.strokeStyle = Ja.OVERBOUGHT, n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(w, S), n.lineTo(T, S), n.stroke(), n.strokeStyle = Ja.OVERSOLD, n.beginPath(), n.moveTo(w, C), n.lineTo(T, C), n.stroke(), n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.beginPath(), n.moveTo(w, x), n.lineTo(T, x), n.stroke(), n.setLineDash([]);
|
|
10322
|
+
let E = Math.max(c.start, a.period - 1), D = Math.min(c.end, p.length);
|
|
10294
10323
|
if (a.showCCI) {
|
|
10295
10324
|
n.strokeStyle = Ja.CCI, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10296
10325
|
let e = !0;
|
|
10297
|
-
for (let t =
|
|
10298
|
-
let r =
|
|
10326
|
+
for (let t = E; t < D; t++) {
|
|
10327
|
+
let r = m[t];
|
|
10299
10328
|
if (r === void 0) continue;
|
|
10300
|
-
let i =
|
|
10329
|
+
let i = f[t - c.start];
|
|
10301
10330
|
if (i === void 0) continue;
|
|
10302
|
-
let a =
|
|
10303
|
-
e ? (n.moveTo(
|
|
10331
|
+
let a = o.height - (r - y) / b * o.height, s = i, l = Q(a, d);
|
|
10332
|
+
e ? (n.moveTo(s, l), e = !1) : n.lineTo(s, l);
|
|
10304
10333
|
}
|
|
10305
10334
|
n.stroke();
|
|
10306
10335
|
}
|
|
@@ -10388,45 +10417,45 @@ function Sc(e = {}) {
|
|
|
10388
10417
|
return [r];
|
|
10389
10418
|
},
|
|
10390
10419
|
draw(e) {
|
|
10391
|
-
let { ctx: n, pane: o, data: s, range: c, scrollLeft: l,
|
|
10392
|
-
if (
|
|
10393
|
-
let
|
|
10420
|
+
let { ctx: n, pane: o, data: s, range: c, scrollLeft: l, dpr: d, kLineCenters: f } = e, p = s;
|
|
10421
|
+
if (p.length < a.n + a.m - 1) return;
|
|
10422
|
+
let m = u(p), h = {
|
|
10394
10423
|
valueMin: 0,
|
|
10395
10424
|
valueMax: 100,
|
|
10396
10425
|
timestamp: Date.now()
|
|
10397
10426
|
};
|
|
10398
|
-
i?.setSharedState(r,
|
|
10399
|
-
let
|
|
10427
|
+
i?.setSharedState(r, h, `stoch_${t}`);
|
|
10428
|
+
let g = o.yAxis.getDisplayRange({
|
|
10400
10429
|
minPrice: 0,
|
|
10401
10430
|
maxPrice: 100
|
|
10402
|
-
}),
|
|
10431
|
+
}), _ = g.minPrice, v = g.maxPrice - _ || 1;
|
|
10403
10432
|
n.save(), n.translate(-l, 0);
|
|
10404
|
-
let
|
|
10405
|
-
n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(
|
|
10406
|
-
let
|
|
10433
|
+
let y = o.height - (80 - _) / v * o.height, b = o.height - (20 - _) / v * o.height, x = l, S = l + e.paneWidth;
|
|
10434
|
+
n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(x, y), n.lineTo(S, y), n.moveTo(x, b), n.lineTo(S, b), n.stroke(), n.setLineDash([]);
|
|
10435
|
+
let C = Math.max(c.start, a.n + a.m - 2), w = Math.min(c.end, p.length);
|
|
10407
10436
|
if (a.showK) {
|
|
10408
10437
|
n.strokeStyle = Ya.K, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10409
10438
|
let e = !0;
|
|
10410
|
-
for (let t =
|
|
10411
|
-
let r =
|
|
10439
|
+
for (let t = C; t < w; t++) {
|
|
10440
|
+
let r = m[t];
|
|
10412
10441
|
if (!r) continue;
|
|
10413
|
-
let i =
|
|
10442
|
+
let i = f[t - c.start];
|
|
10414
10443
|
if (i === void 0) continue;
|
|
10415
|
-
let a =
|
|
10416
|
-
e ? (n.moveTo(
|
|
10444
|
+
let a = o.height - (r.k - _) / v * o.height, s = i, l = Q(a, d);
|
|
10445
|
+
e ? (n.moveTo(s, l), e = !1) : n.lineTo(s, l);
|
|
10417
10446
|
}
|
|
10418
10447
|
n.stroke();
|
|
10419
10448
|
}
|
|
10420
10449
|
if (a.showD) {
|
|
10421
10450
|
n.strokeStyle = Ya.D, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10422
10451
|
let e = !0;
|
|
10423
|
-
for (let t =
|
|
10424
|
-
let r =
|
|
10452
|
+
for (let t = C; t < w; t++) {
|
|
10453
|
+
let r = m[t];
|
|
10425
10454
|
if (!r) continue;
|
|
10426
|
-
let i =
|
|
10455
|
+
let i = f[t - c.start];
|
|
10427
10456
|
if (i === void 0) continue;
|
|
10428
|
-
let a =
|
|
10429
|
-
e ? (n.moveTo(
|
|
10457
|
+
let a = o.height - (r.d - _) / v * o.height, s = i, l = Q(a, d);
|
|
10458
|
+
e ? (n.moveTo(s, l), e = !1) : n.lineTo(s, l);
|
|
10430
10459
|
}
|
|
10431
10460
|
n.stroke();
|
|
10432
10461
|
}
|
|
@@ -10497,40 +10526,40 @@ function Ec(e = {}) {
|
|
|
10497
10526
|
return [r];
|
|
10498
10527
|
},
|
|
10499
10528
|
draw(e) {
|
|
10500
|
-
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u,
|
|
10501
|
-
if (
|
|
10502
|
-
let
|
|
10503
|
-
for (let e = c.start; e < c.end && e <
|
|
10504
|
-
let t =
|
|
10505
|
-
t !== void 0 && (
|
|
10506
|
-
}
|
|
10507
|
-
if (!Number.isFinite(
|
|
10508
|
-
let
|
|
10509
|
-
|
|
10510
|
-
let
|
|
10511
|
-
valueMin:
|
|
10512
|
-
valueMax:
|
|
10529
|
+
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u, dpr: d, kLineCenters: f } = e, p = s;
|
|
10530
|
+
if (p.length < a.period + 1) return;
|
|
10531
|
+
let m = l(p), h = -Infinity, g = Infinity;
|
|
10532
|
+
for (let e = c.start; e < c.end && e < m.length; e++) {
|
|
10533
|
+
let t = m[e];
|
|
10534
|
+
t !== void 0 && (h = Math.max(h, t), g = Math.min(g, t));
|
|
10535
|
+
}
|
|
10536
|
+
if (!Number.isFinite(h) || !Number.isFinite(g)) return;
|
|
10537
|
+
let _ = Math.max(Math.abs(h), Math.abs(g)) * .1;
|
|
10538
|
+
h += _, g -= _, h - g;
|
|
10539
|
+
let v = {
|
|
10540
|
+
valueMin: g,
|
|
10541
|
+
valueMax: h,
|
|
10513
10542
|
timestamp: Date.now()
|
|
10514
10543
|
};
|
|
10515
|
-
i?.setSharedState(r,
|
|
10516
|
-
let
|
|
10517
|
-
minPrice:
|
|
10518
|
-
maxPrice:
|
|
10519
|
-
}),
|
|
10544
|
+
i?.setSharedState(r, v, `mom_${t}`);
|
|
10545
|
+
let y = o.yAxis.getDisplayRange({
|
|
10546
|
+
minPrice: g,
|
|
10547
|
+
maxPrice: h
|
|
10548
|
+
}), b = y.minPrice, x = y.maxPrice - b || 1, S = o.height - (0 - b) / x * o.height;
|
|
10520
10549
|
n.save(), n.translate(-u, 0);
|
|
10521
|
-
let
|
|
10522
|
-
n.strokeStyle = Xa.ZERO, n.lineWidth = 1, n.beginPath(), n.moveTo(
|
|
10523
|
-
let
|
|
10550
|
+
let C = u, w = u + e.paneWidth;
|
|
10551
|
+
n.strokeStyle = Xa.ZERO, n.lineWidth = 1, n.beginPath(), n.moveTo(C, S), n.lineTo(w, S), n.stroke();
|
|
10552
|
+
let T = Math.max(c.start, a.period), E = Math.min(c.end, p.length);
|
|
10524
10553
|
if (a.showMOM) {
|
|
10525
10554
|
n.strokeStyle = Xa.MOM, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10526
10555
|
let e = !0;
|
|
10527
|
-
for (let t =
|
|
10528
|
-
let r =
|
|
10556
|
+
for (let t = T; t < E; t++) {
|
|
10557
|
+
let r = m[t];
|
|
10529
10558
|
if (r === void 0) continue;
|
|
10530
|
-
let i =
|
|
10559
|
+
let i = f[t - c.start];
|
|
10531
10560
|
if (i === void 0) continue;
|
|
10532
|
-
let a =
|
|
10533
|
-
e ? (n.moveTo(
|
|
10561
|
+
let a = o.height - (r - b) / x * o.height, s = i, l = Q(a, d);
|
|
10562
|
+
e ? (n.moveTo(s, l), e = !1) : n.lineTo(s, l);
|
|
10534
10563
|
}
|
|
10535
10564
|
n.stroke();
|
|
10536
10565
|
}
|
|
@@ -10602,34 +10631,34 @@ function Ac(e = {}) {
|
|
|
10602
10631
|
return [r];
|
|
10603
10632
|
},
|
|
10604
10633
|
draw(e) {
|
|
10605
|
-
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u,
|
|
10606
|
-
if (
|
|
10607
|
-
let
|
|
10608
|
-
0 -
|
|
10609
|
-
let
|
|
10610
|
-
valueMin:
|
|
10634
|
+
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u, dpr: d, kLineCenters: f } = e, p = s;
|
|
10635
|
+
if (p.length < a.period) return;
|
|
10636
|
+
let m = l(p), h = -100;
|
|
10637
|
+
0 - h;
|
|
10638
|
+
let g = {
|
|
10639
|
+
valueMin: h,
|
|
10611
10640
|
valueMax: 0,
|
|
10612
10641
|
timestamp: Date.now()
|
|
10613
10642
|
};
|
|
10614
|
-
i?.setSharedState(r,
|
|
10615
|
-
let
|
|
10616
|
-
minPrice:
|
|
10643
|
+
i?.setSharedState(r, g, `wmsr_${t}`);
|
|
10644
|
+
let _ = o.yAxis.getDisplayRange({
|
|
10645
|
+
minPrice: h,
|
|
10617
10646
|
maxPrice: 0
|
|
10618
|
-
}),
|
|
10647
|
+
}), v = _.minPrice, y = _.maxPrice - v || 1;
|
|
10619
10648
|
n.save(), n.translate(-u, 0);
|
|
10620
|
-
let
|
|
10621
|
-
n.strokeStyle = Za.OVERBOUGHT, n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(
|
|
10622
|
-
let
|
|
10649
|
+
let b = o.height - (-20 - v) / y * o.height, x = o.height - (-80 - v) / y * o.height, S = o.height - (-50 - v) / y * o.height, C = u, w = u + e.paneWidth;
|
|
10650
|
+
n.strokeStyle = Za.OVERBOUGHT, n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(C, b), n.lineTo(w, b), n.stroke(), n.strokeStyle = Za.OVERSOLD, n.beginPath(), n.moveTo(C, x), n.lineTo(w, x), n.stroke(), n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.beginPath(), n.moveTo(C, S), n.lineTo(w, S), n.stroke(), n.setLineDash([]);
|
|
10651
|
+
let T = Math.max(c.start, a.period - 1), E = Math.min(c.end, p.length);
|
|
10623
10652
|
if (a.showWMSR) {
|
|
10624
10653
|
n.strokeStyle = Za.WMSR, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10625
10654
|
let e = !0;
|
|
10626
|
-
for (let t =
|
|
10627
|
-
let r =
|
|
10655
|
+
for (let t = T; t < E; t++) {
|
|
10656
|
+
let r = m[t];
|
|
10628
10657
|
if (r === void 0) continue;
|
|
10629
|
-
let i =
|
|
10658
|
+
let i = f[t - c.start];
|
|
10630
10659
|
if (i === void 0) continue;
|
|
10631
|
-
let a =
|
|
10632
|
-
e ? (n.moveTo(
|
|
10660
|
+
let a = o.height - (r - v) / y * o.height, s = i, l = Q(a, d);
|
|
10661
|
+
e ? (n.moveTo(s, l), e = !1) : n.lineTo(s, l);
|
|
10633
10662
|
}
|
|
10634
10663
|
n.stroke();
|
|
10635
10664
|
}
|
|
@@ -10732,53 +10761,53 @@ function Ic(e = {}) {
|
|
|
10732
10761
|
return [r];
|
|
10733
10762
|
},
|
|
10734
10763
|
draw(e) {
|
|
10735
|
-
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u,
|
|
10736
|
-
if (
|
|
10737
|
-
let
|
|
10738
|
-
for (let e = c.start; e < c.end && e <
|
|
10739
|
-
let t =
|
|
10740
|
-
t && (
|
|
10741
|
-
}
|
|
10742
|
-
if (!Number.isFinite(
|
|
10743
|
-
let
|
|
10744
|
-
|
|
10745
|
-
let
|
|
10746
|
-
valueMin:
|
|
10747
|
-
valueMax:
|
|
10764
|
+
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u, dpr: d, kLineCenters: f } = e, p = s;
|
|
10765
|
+
if (p.length < a.roc4 + 15 + a.signalPeriod) return;
|
|
10766
|
+
let m = l(p), h = -Infinity, g = Infinity;
|
|
10767
|
+
for (let e = c.start; e < c.end && e < m.length; e++) {
|
|
10768
|
+
let t = m[e];
|
|
10769
|
+
t && (h = Math.max(h, t.kst, t.signal), g = Math.min(g, t.kst, t.signal));
|
|
10770
|
+
}
|
|
10771
|
+
if (!Number.isFinite(h) || !Number.isFinite(g)) return;
|
|
10772
|
+
let _ = (h - g) * .1 || 1;
|
|
10773
|
+
h += _, g -= _, h - g;
|
|
10774
|
+
let v = {
|
|
10775
|
+
valueMin: g,
|
|
10776
|
+
valueMax: h,
|
|
10748
10777
|
timestamp: Date.now()
|
|
10749
10778
|
};
|
|
10750
|
-
i?.setSharedState(r,
|
|
10751
|
-
let
|
|
10752
|
-
minPrice:
|
|
10753
|
-
maxPrice:
|
|
10754
|
-
}),
|
|
10779
|
+
i?.setSharedState(r, v, `kst_${t}`);
|
|
10780
|
+
let y = o.yAxis.getDisplayRange({
|
|
10781
|
+
minPrice: g,
|
|
10782
|
+
maxPrice: h
|
|
10783
|
+
}), b = y.minPrice, x = y.maxPrice - b || 1, S = o.height - (0 - b) / x * o.height;
|
|
10755
10784
|
n.save(), n.translate(-u, 0);
|
|
10756
|
-
let
|
|
10757
|
-
n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.beginPath(), n.moveTo(
|
|
10758
|
-
let
|
|
10785
|
+
let C = u, w = u + e.paneWidth;
|
|
10786
|
+
n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.beginPath(), n.moveTo(C, S), n.lineTo(w, S), n.stroke();
|
|
10787
|
+
let T = Math.max(c.start, a.roc4 + 15 + a.signalPeriod - 1), E = Math.min(c.end, p.length);
|
|
10759
10788
|
if (a.showKST) {
|
|
10760
10789
|
n.strokeStyle = Qa.KST, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10761
10790
|
let e = !0;
|
|
10762
|
-
for (let t =
|
|
10763
|
-
let r =
|
|
10791
|
+
for (let t = T; t < E; t++) {
|
|
10792
|
+
let r = m[t];
|
|
10764
10793
|
if (!r) continue;
|
|
10765
|
-
let i =
|
|
10794
|
+
let i = f[t - c.start];
|
|
10766
10795
|
if (i === void 0) continue;
|
|
10767
|
-
let a =
|
|
10768
|
-
e ? (n.moveTo(
|
|
10796
|
+
let a = o.height - (r.kst - b) / x * o.height, s = i, l = Q(a, d);
|
|
10797
|
+
e ? (n.moveTo(s, l), e = !1) : n.lineTo(s, l);
|
|
10769
10798
|
}
|
|
10770
10799
|
n.stroke();
|
|
10771
10800
|
}
|
|
10772
10801
|
if (a.showSignal) {
|
|
10773
10802
|
n.strokeStyle = Qa.SIGNAL, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10774
10803
|
let e = !0;
|
|
10775
|
-
for (let t =
|
|
10776
|
-
let r =
|
|
10804
|
+
for (let t = T; t < E; t++) {
|
|
10805
|
+
let r = m[t];
|
|
10777
10806
|
if (!r) continue;
|
|
10778
|
-
let i =
|
|
10807
|
+
let i = f[t - c.start];
|
|
10779
10808
|
if (i === void 0) continue;
|
|
10780
|
-
let a =
|
|
10781
|
-
e ? (n.moveTo(
|
|
10809
|
+
let a = o.height - (r.signal - b) / x * o.height, s = i, l = Q(a, d);
|
|
10810
|
+
e ? (n.moveTo(s, l), e = !1) : n.lineTo(s, l);
|
|
10782
10811
|
}
|
|
10783
10812
|
n.stroke();
|
|
10784
10813
|
}
|
|
@@ -10860,32 +10889,32 @@ function Bc(e = {}) {
|
|
|
10860
10889
|
return [r];
|
|
10861
10890
|
},
|
|
10862
10891
|
draw(e) {
|
|
10863
|
-
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u,
|
|
10864
|
-
if (
|
|
10865
|
-
let
|
|
10892
|
+
let { ctx: n, pane: o, data: s, range: c, scrollLeft: u, dpr: d, kLineCenters: f } = e, p = s;
|
|
10893
|
+
if (p.length < a.period) return;
|
|
10894
|
+
let m = l(p), h = {
|
|
10866
10895
|
valueMin: 0,
|
|
10867
10896
|
valueMax: 100,
|
|
10868
10897
|
timestamp: Date.now()
|
|
10869
10898
|
};
|
|
10870
|
-
i?.setSharedState(r,
|
|
10871
|
-
let
|
|
10899
|
+
i?.setSharedState(r, h, `fastk_${t}`);
|
|
10900
|
+
let g = o.yAxis.getDisplayRange({
|
|
10872
10901
|
minPrice: 0,
|
|
10873
10902
|
maxPrice: 100
|
|
10874
|
-
}),
|
|
10903
|
+
}), _ = g.minPrice, v = g.maxPrice - _ || 1;
|
|
10875
10904
|
n.save(), n.translate(-u, 0);
|
|
10876
|
-
let
|
|
10877
|
-
n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(
|
|
10878
|
-
let
|
|
10905
|
+
let y = o.height - (80 - _) / v * o.height, b = o.height - (20 - _) / v * o.height, x = u, S = u + e.paneWidth;
|
|
10906
|
+
n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(x, y), n.lineTo(S, y), n.moveTo(x, b), n.lineTo(S, b), n.stroke(), n.setLineDash([]);
|
|
10907
|
+
let C = Math.max(c.start, a.period - 1), w = Math.min(c.end, p.length);
|
|
10879
10908
|
if (a.showFASTK) {
|
|
10880
10909
|
n.strokeStyle = Ya.K, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
|
|
10881
10910
|
let e = !0;
|
|
10882
|
-
for (let t =
|
|
10883
|
-
let r =
|
|
10911
|
+
for (let t = C; t < w; t++) {
|
|
10912
|
+
let r = m[t];
|
|
10884
10913
|
if (r === void 0) continue;
|
|
10885
|
-
let i =
|
|
10914
|
+
let i = f[t - c.start];
|
|
10886
10915
|
if (i === void 0) continue;
|
|
10887
|
-
let a =
|
|
10888
|
-
e ? (n.moveTo(
|
|
10916
|
+
let a = o.height - (r - _) / v * o.height, s = i, l = Q(a, d);
|
|
10917
|
+
e ? (n.moveTo(s, l), e = !1) : n.lineTo(s, l);
|
|
10889
10918
|
}
|
|
10890
10919
|
n.stroke();
|
|
10891
10920
|
}
|
|
@@ -12075,50 +12104,52 @@ function fl(e) {
|
|
|
12075
12104
|
paneId: e.paneId ?? "main",
|
|
12076
12105
|
priority: X.OVERLAY,
|
|
12077
12106
|
draw(e) {
|
|
12078
|
-
let { ctx: i, pane: a, data: o, range: s, dpr: c, paneWidth: l, kLinePositions: u,
|
|
12107
|
+
let { ctx: i, pane: a, data: o, range: s, dpr: c, paneWidth: l, kLinePositions: u, kLineCenters: d, kBarRects: f, kWidth: p, kGap: m } = e, h = e.viewport ?? {
|
|
12079
12108
|
scrollLeft: e.scrollLeft,
|
|
12080
12109
|
plotWidth: l,
|
|
12081
12110
|
plotHeight: a.height
|
|
12082
|
-
}, { startXPx:
|
|
12083
|
-
if (
|
|
12084
|
-
let
|
|
12111
|
+
}, { startXPx: g, unitPx: _ } = Ms(p, m, c), v = o, y = v.slice(s.start, s.end), b = t.getVisibleByPane(a.id);
|
|
12112
|
+
if (b.length === 0) return;
|
|
12113
|
+
let x = {
|
|
12085
12114
|
left: 0,
|
|
12086
12115
|
top: 0,
|
|
12087
|
-
right:
|
|
12116
|
+
right: h.plotWidth,
|
|
12088
12117
|
bottom: a.height
|
|
12089
12118
|
};
|
|
12090
|
-
i.save(), i.beginPath(), i.rect(0, 0,
|
|
12091
|
-
for (let e of
|
|
12119
|
+
i.save(), i.beginPath(), i.rect(0, 0, h.plotWidth, a.height), i.clip();
|
|
12120
|
+
for (let e of b) {
|
|
12092
12121
|
let o = n.compute(e, {
|
|
12093
12122
|
pane: a,
|
|
12094
|
-
visibleData:
|
|
12095
|
-
seriesData:
|
|
12123
|
+
visibleData: y,
|
|
12124
|
+
seriesData: v,
|
|
12096
12125
|
range: s,
|
|
12097
12126
|
kLinePositions: u,
|
|
12098
|
-
|
|
12099
|
-
|
|
12127
|
+
kLineCenters: d,
|
|
12128
|
+
kBarRects: f,
|
|
12129
|
+
kWidth: p,
|
|
12130
|
+
kGap: m,
|
|
12100
12131
|
dpr: c,
|
|
12101
12132
|
paneWidth: l,
|
|
12102
|
-
viewport:
|
|
12133
|
+
viewport: h,
|
|
12103
12134
|
toScreen(e) {
|
|
12104
12135
|
return !Number.isFinite(e.index) || e.index < 0 ? {
|
|
12105
|
-
x: -
|
|
12136
|
+
x: -p,
|
|
12106
12137
|
y: a.yAxis.priceToY(e.price)
|
|
12107
12138
|
} : {
|
|
12108
|
-
x: (
|
|
12139
|
+
x: (g + e.index * _ + (_ - 1) / 2) / c - h.scrollLeft,
|
|
12109
12140
|
y: a.yAxis.priceToY(e.price)
|
|
12110
12141
|
};
|
|
12111
12142
|
}
|
|
12112
12143
|
});
|
|
12113
12144
|
if (!o) continue;
|
|
12114
|
-
let
|
|
12115
|
-
for (let e of
|
|
12145
|
+
let b = t.getSelectedId() === e.id ? o.primitives.map((t) => pl(t, e.style)) : o.primitives;
|
|
12146
|
+
for (let e of b) {
|
|
12116
12147
|
if (e.kind === "point") {
|
|
12117
12148
|
r.point(i, e, c);
|
|
12118
12149
|
continue;
|
|
12119
12150
|
}
|
|
12120
12151
|
if (e.kind === "line") {
|
|
12121
|
-
r.line(i, e,
|
|
12152
|
+
r.line(i, e, x, c);
|
|
12122
12153
|
continue;
|
|
12123
12154
|
}
|
|
12124
12155
|
if (e.kind === "area") {
|
|
@@ -12266,15 +12297,25 @@ var ml = class e {
|
|
|
12266
12297
|
let { start: t, end: n } = Ns(e.scrollLeft, e.plotWidth, this.opt.kWidth, this.opt.kGap, this.data.length, e.dpr), r = {
|
|
12267
12298
|
start: t,
|
|
12268
12299
|
end: n
|
|
12269
|
-
}, i = this.calcKLinePositions(r),
|
|
12270
|
-
|
|
12300
|
+
}, i = this.calcKLinePositions(r), a = Ms(this.opt.kWidth, this.opt.kGap, e.dpr), o = Math.max(1, a.unitPx - 1);
|
|
12301
|
+
o % 2 == 0 && --o;
|
|
12302
|
+
let s = Array(i.length), c = Array(i.length);
|
|
12303
|
+
for (let t = 0; t < i.length; t++) {
|
|
12304
|
+
let n = i[t], r = Math.round(n * e.dpr) + (a.kWidthPx - 1) / 2;
|
|
12305
|
+
s[t] = r / e.dpr, c[t] = {
|
|
12306
|
+
x: (r - (o - 1) / 2) / e.dpr,
|
|
12307
|
+
width: o / e.dpr
|
|
12308
|
+
};
|
|
12309
|
+
}
|
|
12310
|
+
let { kWidthPx: l } = Ms(this.opt.kWidth, this.opt.kGap, e.dpr);
|
|
12311
|
+
this.interaction.setKLinePositions(i, r, l);
|
|
12271
12312
|
for (let t of this.paneRenderers) {
|
|
12272
12313
|
let n = t.getPane(), a = t.getDom().plotCanvas.getContext("2d"), o = t.getDom().yAxisCanvas.getContext("2d");
|
|
12273
12314
|
if (n.updateRange(this.data, r), a && (a.setTransform(1, 0, 0, 1, 0, 0), a.scale(e.dpr, e.dpr), a.clearRect(0, 0, e.plotWidth + 1, n.height + 2 / e.dpr)), o) {
|
|
12274
12315
|
let t = o.canvas.width / e.dpr;
|
|
12275
12316
|
o.setTransform(1, 0, 0, 1, 0, 0), o.scale(e.dpr, e.dpr), o.clearRect(0, 0, t, n.height + 2 / e.dpr);
|
|
12276
12317
|
}
|
|
12277
|
-
let
|
|
12318
|
+
let l = {
|
|
12278
12319
|
ctx: a,
|
|
12279
12320
|
pane: ha(n),
|
|
12280
12321
|
data: this.data,
|
|
@@ -12285,6 +12326,8 @@ var ml = class e {
|
|
|
12285
12326
|
dpr: e.dpr,
|
|
12286
12327
|
paneWidth: e.plotWidth,
|
|
12287
12328
|
kLinePositions: i,
|
|
12329
|
+
kLineCenters: s,
|
|
12330
|
+
kBarRects: c,
|
|
12288
12331
|
markerManager: this.markerManager,
|
|
12289
12332
|
crosshairIndex: this.interaction.getCrosshairIndex(),
|
|
12290
12333
|
yAxisCtx: o ?? void 0,
|
|
@@ -12298,17 +12341,17 @@ var ml = class e {
|
|
|
12298
12341
|
};
|
|
12299
12342
|
if (a) {
|
|
12300
12343
|
a.save();
|
|
12301
|
-
let e = this.rendererPluginManager.render(n.id,
|
|
12344
|
+
let e = this.rendererPluginManager.render(n.id, l);
|
|
12302
12345
|
e.length > 0 && this.pluginHost.events.emit("renderer:error", {
|
|
12303
12346
|
paneId: n.id,
|
|
12304
12347
|
errors: e
|
|
12305
12348
|
}), a.restore();
|
|
12306
12349
|
}
|
|
12307
12350
|
}
|
|
12308
|
-
let
|
|
12309
|
-
if (
|
|
12351
|
+
let u = this.dom.xAxisCanvas.getContext("2d");
|
|
12352
|
+
if (u) {
|
|
12310
12353
|
let t = {
|
|
12311
|
-
ctx:
|
|
12354
|
+
ctx: u,
|
|
12312
12355
|
pane: {
|
|
12313
12356
|
id: "xAxis",
|
|
12314
12357
|
role: "auxiliary",
|
|
@@ -12344,7 +12387,9 @@ var ml = class e {
|
|
|
12344
12387
|
dpr: e.dpr,
|
|
12345
12388
|
paneWidth: e.plotWidth,
|
|
12346
12389
|
kLinePositions: i,
|
|
12347
|
-
|
|
12390
|
+
kLineCenters: s,
|
|
12391
|
+
kBarRects: c,
|
|
12392
|
+
xAxisCtx: u,
|
|
12348
12393
|
viewport: {
|
|
12349
12394
|
scrollLeft: e.scrollLeft,
|
|
12350
12395
|
plotWidth: e.plotWidth,
|
|
@@ -12358,11 +12403,12 @@ var ml = class e {
|
|
|
12358
12403
|
}
|
|
12359
12404
|
}
|
|
12360
12405
|
applyRenderState(e, t, n) {
|
|
12361
|
-
this.
|
|
12406
|
+
let r = n === void 0 ? this.currentZoomLevel : Math.max(1, Math.min(this.zoomLevelCount, n));
|
|
12407
|
+
(this.opt.kWidth !== e || this.opt.kGap !== t || this.currentZoomLevel !== r) && (this.opt = {
|
|
12362
12408
|
...this.opt,
|
|
12363
12409
|
kWidth: e,
|
|
12364
12410
|
kGap: t
|
|
12365
|
-
}, n !== void 0 && (this.currentZoomLevel =
|
|
12411
|
+
}, n !== void 0 && (this.currentZoomLevel = r), this.scheduleDraw());
|
|
12366
12412
|
}
|
|
12367
12413
|
getZoomLevelCount() {
|
|
12368
12414
|
return this.zoomLevelCount;
|
|
@@ -12768,8 +12814,8 @@ var ml = class e {
|
|
|
12768
12814
|
plotHeight: o,
|
|
12769
12815
|
scrollLeft: l,
|
|
12770
12816
|
dpr: s
|
|
12771
|
-
};
|
|
12772
|
-
return this.viewport = u, this.onViewportChange?.(u), u;
|
|
12817
|
+
}, d = this.viewport, f = !d || d.viewWidth !== u.viewWidth || d.viewHeight !== u.viewHeight || d.plotWidth !== u.plotWidth || d.plotHeight !== u.plotHeight || d.scrollLeft !== u.scrollLeft || d.dpr !== u.dpr;
|
|
12818
|
+
return this.viewport = u, f && this.onViewportChange?.(u), u;
|
|
12773
12819
|
}
|
|
12774
12820
|
}, hl = 3;
|
|
12775
12821
|
function gl(e, t) {
|
|
@@ -13953,10 +13999,10 @@ var Gu = d({
|
|
|
13953
13999
|
}))], 40, $u)])
|
|
13954
14000
|
]));
|
|
13955
14001
|
}
|
|
13956
|
-
}), [["__scopeId", "data-v-f1125609"]]), td = { class: "chart-wrapper" }, nd = {
|
|
14002
|
+
}), [["__scopeId", "data-v-f1125609"]]), td = { class: "chart-wrapper" }, nd = {
|
|
13957
14003
|
class: "pane-separator-layer",
|
|
13958
14004
|
"aria-hidden": "true"
|
|
13959
|
-
},
|
|
14005
|
+
}, rd = 4, id = /* @__PURE__ */ Oo(/* @__PURE__ */ u({
|
|
13960
14006
|
__name: "KLineChart",
|
|
13961
14007
|
props: {
|
|
13962
14008
|
semanticConfig: {},
|
|
@@ -13974,44 +14020,44 @@ var Gu = d({
|
|
|
13974
14020
|
}
|
|
13975
14021
|
},
|
|
13976
14022
|
emits: ["zoomLevelChange", "toggleFullscreen"],
|
|
13977
|
-
setup(
|
|
13978
|
-
let u =
|
|
13979
|
-
initialZoomLevel:
|
|
13980
|
-
minKWidth:
|
|
13981
|
-
maxKWidth:
|
|
13982
|
-
zoomLevels:
|
|
13983
|
-
rightAxisWidth:
|
|
13984
|
-
priceLabelWidth:
|
|
14023
|
+
setup(n, { expose: c, emit: u }) {
|
|
14024
|
+
let d = n, v = u, x = y(null), C = y(null), E = y(null), D = y(null), O = y(null), k = y(null), A = S(null), j = S(null), M = Vs({
|
|
14025
|
+
initialZoomLevel: d.initialZoomLevel ?? 1,
|
|
14026
|
+
minKWidth: d.minKWidth,
|
|
14027
|
+
maxKWidth: d.maxKWidth,
|
|
14028
|
+
zoomLevels: d.zoomLevels,
|
|
14029
|
+
rightAxisWidth: d.rightAxisWidth,
|
|
14030
|
+
priceLabelWidth: d.priceLabelWidth
|
|
13985
14031
|
});
|
|
13986
|
-
|
|
13987
|
-
minKWidth:
|
|
13988
|
-
maxKWidth:
|
|
13989
|
-
zoomLevelCount:
|
|
13990
|
-
dpr:
|
|
13991
|
-
}), _l(
|
|
13992
|
-
let
|
|
13993
|
-
function
|
|
13994
|
-
|
|
13995
|
-
}
|
|
13996
|
-
function
|
|
14032
|
+
M.actions.setZoomState(M.state.zoomLevel, gl(M.state.zoomLevel, {
|
|
14033
|
+
minKWidth: d.minKWidth,
|
|
14034
|
+
maxKWidth: d.maxKWidth,
|
|
14035
|
+
zoomLevelCount: d.zoomLevels,
|
|
14036
|
+
dpr: M.state.viewportDpr
|
|
14037
|
+
}), _l(M.state.viewportDpr)), r(() => M.state.dataLength), r(() => M.state.viewportDpr);
|
|
14038
|
+
let N = r(() => M.state.zoomLevel), ee = r(() => M.state.kWidth), P = r(() => M.state.kGap), te = r(() => M.state.paneRatios), ne = r(() => M.state.selectedDrawingId), re = r(() => M.state.dataVersion);
|
|
14039
|
+
function ie() {
|
|
14040
|
+
A.value?.scheduleDraw();
|
|
14041
|
+
}
|
|
14042
|
+
function F(e, t, n) {
|
|
13997
14043
|
let r = e.getBoundingClientRect();
|
|
13998
14044
|
return {
|
|
13999
14045
|
width: Math.max(t, Math.round(r.width)),
|
|
14000
14046
|
height: Math.max(n, Math.round(r.height))
|
|
14001
14047
|
};
|
|
14002
14048
|
}
|
|
14003
|
-
function
|
|
14049
|
+
function ae(e) {
|
|
14004
14050
|
if (!e) return;
|
|
14005
|
-
let t =
|
|
14006
|
-
|
|
14051
|
+
let t = F(e, 180, 80);
|
|
14052
|
+
A.value?.interaction.setTooltipSize(t);
|
|
14007
14053
|
}
|
|
14008
|
-
function
|
|
14009
|
-
e && (
|
|
14054
|
+
function oe(e) {
|
|
14055
|
+
e && (le.value = F(e, 120, 60));
|
|
14010
14056
|
}
|
|
14011
|
-
let
|
|
14057
|
+
let se = y({
|
|
14012
14058
|
x: 0,
|
|
14013
14059
|
y: 0
|
|
14014
|
-
}),
|
|
14060
|
+
}), I = y(!1), L = S({
|
|
14015
14061
|
crosshairPos: null,
|
|
14016
14062
|
crosshairIndex: null,
|
|
14017
14063
|
crosshairPrice: null,
|
|
@@ -14029,84 +14075,105 @@ var Gu = d({
|
|
|
14029
14075
|
isHoveringPaneBoundary: !1,
|
|
14030
14076
|
hoveredPaneBoundaryId: null,
|
|
14031
14077
|
isHoveringRightAxis: !1
|
|
14032
|
-
}),
|
|
14033
|
-
let e =
|
|
14034
|
-
return e ?
|
|
14035
|
-
}),
|
|
14078
|
+
}), R = S(null), z = r(() => {
|
|
14079
|
+
let e = ne.value;
|
|
14080
|
+
return e ? M.state.drawings.find((t) => t.id === e) ?? null : null;
|
|
14081
|
+
}), ce = y([]), le = y({
|
|
14036
14082
|
width: 220,
|
|
14037
14083
|
height: 120
|
|
14038
|
-
}),
|
|
14039
|
-
let e =
|
|
14084
|
+
}), ue = r(() => {
|
|
14085
|
+
let e = D.value, t = O.value;
|
|
14086
|
+
return !e || !t ? {
|
|
14087
|
+
x: 0,
|
|
14088
|
+
y: 0
|
|
14089
|
+
} : {
|
|
14090
|
+
x: e.offsetLeft,
|
|
14091
|
+
y: e.offsetTop
|
|
14092
|
+
};
|
|
14093
|
+
}), de = r(() => L.value.hoveredMarkerData), fe = r(() => L.value.hoveredCustomMarker), pe = r(() => L.value.isDragging), me = r(() => L.value.isResizingPaneBoundary), B = r(() => L.value.isHoveringPaneBoundary), he = r(() => L.value.hoveredPaneBoundaryId), ge = r(() => L.value.isHoveringRightAxis), _e = r(() => L.value.hoveredIndex), ve = r(() => L.value.crosshairIndex), ye = r(() => {
|
|
14094
|
+
let e = L.value.hoveredIndex;
|
|
14040
14095
|
if (typeof e != "number") return null;
|
|
14041
|
-
|
|
14042
|
-
let t =
|
|
14096
|
+
re.value;
|
|
14097
|
+
let t = A.value?.getData();
|
|
14043
14098
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
14044
|
-
}),
|
|
14045
|
-
|
|
14046
|
-
|
|
14047
|
-
}),
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
}
|
|
14051
|
-
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14099
|
+
}), be = r(() => L.value.hoveredIndex), xe = r(() => L.value.tooltipPos), Se = r(() => ({
|
|
14100
|
+
x: xe.value.x + ue.value.x,
|
|
14101
|
+
y: xe.value.y + ue.value.y
|
|
14102
|
+
})), Ce = r(() => ({
|
|
14103
|
+
left: `${Se.value.x}px`,
|
|
14104
|
+
top: `${Se.value.y}px`
|
|
14105
|
+
})), we = r(() => ({
|
|
14106
|
+
x: se.value.x + ue.value.x,
|
|
14107
|
+
y: se.value.y + ue.value.y
|
|
14108
|
+
})), Te = r(() => ({
|
|
14109
|
+
left: `${we.value.x}px`,
|
|
14110
|
+
top: `${we.value.y}px`
|
|
14111
|
+
})), Ee = r(() => L.value.tooltipAnchorPlacement), De = r(() => {
|
|
14112
|
+
let e = A.value?.getViewport(), t = D.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
|
|
14113
|
+
return se.value.x + 12 + le.value.width + 12 > n ? "left-bottom" : "right-bottom";
|
|
14114
|
+
}), Oe = r(() => (re.value, A.value?.getData() ?? []));
|
|
14115
|
+
function ke(e) {
|
|
14116
|
+
R.value?.setTool(e);
|
|
14117
|
+
}
|
|
14118
|
+
function Ae(e) {
|
|
14119
|
+
let t = z.value;
|
|
14120
|
+
!t || !R.value || (R.value.updateDrawingStyle(t.id, e), M.actions.bumpDrawingVersion());
|
|
14121
|
+
}
|
|
14122
|
+
function je() {
|
|
14123
|
+
let e = z.value;
|
|
14124
|
+
!e || !R.value || (R.value.removeDrawing(e.id), M.actions.setSelectedDrawingId(null), M.actions.bumpDrawingVersion(), M.actions.setDrawings(R.value.getDrawings()));
|
|
14125
|
+
}
|
|
14126
|
+
function Me(e) {
|
|
14127
|
+
let t = D.value;
|
|
14061
14128
|
if (t) {
|
|
14062
|
-
if (
|
|
14063
|
-
|
|
14129
|
+
if (R.value?.onPointerDown(e, t)) {
|
|
14130
|
+
M.actions.setDrawings(R.value.getDrawings()), M.actions.bumpDrawingVersion();
|
|
14064
14131
|
return;
|
|
14065
14132
|
}
|
|
14066
|
-
|
|
14133
|
+
A.value?.interaction.onPointerDown(e);
|
|
14067
14134
|
}
|
|
14068
14135
|
}
|
|
14069
|
-
function
|
|
14070
|
-
let t =
|
|
14136
|
+
function Ne(e) {
|
|
14137
|
+
let t = D.value;
|
|
14071
14138
|
if (t) {
|
|
14072
14139
|
let n = t.getBoundingClientRect();
|
|
14073
|
-
if (
|
|
14140
|
+
if (se.value = {
|
|
14074
14141
|
x: e.clientX - n.left,
|
|
14075
14142
|
y: e.clientY - n.top
|
|
14076
|
-
},
|
|
14077
|
-
|
|
14143
|
+
}, R.value?.onPointerMove(e, t)) {
|
|
14144
|
+
M.actions.setDrawings(R.value.getDrawings());
|
|
14078
14145
|
return;
|
|
14079
14146
|
}
|
|
14080
14147
|
}
|
|
14081
|
-
|
|
14148
|
+
A.value?.interaction.onPointerMove(e);
|
|
14082
14149
|
}
|
|
14083
|
-
function
|
|
14084
|
-
let t =
|
|
14085
|
-
if (t &&
|
|
14086
|
-
|
|
14150
|
+
function Pe(e) {
|
|
14151
|
+
let t = D.value;
|
|
14152
|
+
if (t && R.value?.onPointerUp(e, t)) {
|
|
14153
|
+
M.actions.setDrawings(R.value.getDrawings());
|
|
14087
14154
|
return;
|
|
14088
14155
|
}
|
|
14089
|
-
|
|
14156
|
+
A.value?.interaction.onPointerUp(e);
|
|
14090
14157
|
}
|
|
14091
|
-
function
|
|
14092
|
-
|
|
14158
|
+
function Fe(e) {
|
|
14159
|
+
A.value?.interaction.onPointerLeave(e);
|
|
14093
14160
|
}
|
|
14094
|
-
function
|
|
14095
|
-
|
|
14161
|
+
function Ie(e) {
|
|
14162
|
+
A.value?.interaction.onRightAxisPointerDown(e);
|
|
14096
14163
|
}
|
|
14097
|
-
function
|
|
14098
|
-
|
|
14164
|
+
function Le(e) {
|
|
14165
|
+
A.value?.interaction.onRightAxisPointerMove(e);
|
|
14099
14166
|
}
|
|
14100
|
-
function
|
|
14101
|
-
|
|
14167
|
+
function Re(e) {
|
|
14168
|
+
A.value?.interaction.onRightAxisPointerUp(e);
|
|
14102
14169
|
}
|
|
14103
|
-
function
|
|
14104
|
-
|
|
14170
|
+
function ze(e) {
|
|
14171
|
+
A.value?.interaction.onRightAxisPointerLeave(e);
|
|
14105
14172
|
}
|
|
14106
|
-
function
|
|
14107
|
-
|
|
14173
|
+
function Be() {
|
|
14174
|
+
A.value?.interaction.onScroll();
|
|
14108
14175
|
}
|
|
14109
|
-
let
|
|
14176
|
+
let V = y([]), Ve = y({}), H = y([]), He = {
|
|
14110
14177
|
VOLUME: {
|
|
14111
14178
|
defaultParams: {},
|
|
14112
14179
|
getTitleInfo: () => ({
|
|
@@ -14164,10 +14231,10 @@ var Gu = d({
|
|
|
14164
14231
|
defaultParams: { period: 9 },
|
|
14165
14232
|
getTitleInfo: (e, t, n) => t === null ? null : Hc(e, t, n.period ?? 9)
|
|
14166
14233
|
}
|
|
14167
|
-
},
|
|
14168
|
-
function
|
|
14169
|
-
let e =
|
|
14170
|
-
return
|
|
14234
|
+
}, Ue = Object.keys(He);
|
|
14235
|
+
function We() {
|
|
14236
|
+
let e = te.value.main ?? 3;
|
|
14237
|
+
return H.value.length === 0 ? [{
|
|
14171
14238
|
id: "main",
|
|
14172
14239
|
ratio: e,
|
|
14173
14240
|
visible: !0,
|
|
@@ -14177,239 +14244,239 @@ var Gu = d({
|
|
|
14177
14244
|
ratio: e,
|
|
14178
14245
|
visible: !0,
|
|
14179
14246
|
role: "price"
|
|
14180
|
-
}, ...
|
|
14247
|
+
}, ...H.value.map((e) => ({
|
|
14181
14248
|
id: e.id,
|
|
14182
|
-
ratio:
|
|
14249
|
+
ratio: te.value[e.id] ?? 1,
|
|
14183
14250
|
visible: !0,
|
|
14184
14251
|
role: "indicator"
|
|
14185
14252
|
}))];
|
|
14186
14253
|
}
|
|
14187
|
-
function
|
|
14188
|
-
return { ...
|
|
14254
|
+
function Ge(e) {
|
|
14255
|
+
return { ...He[e].defaultParams };
|
|
14189
14256
|
}
|
|
14190
|
-
function
|
|
14191
|
-
if (
|
|
14257
|
+
function Ke(e = "VOLUME", t) {
|
|
14258
|
+
if (H.value.length >= rd) return !1;
|
|
14192
14259
|
let n = `sub_${e}`;
|
|
14193
|
-
if (
|
|
14194
|
-
if (!
|
|
14260
|
+
if (H.value.some((e) => e.id === n)) return !0;
|
|
14261
|
+
if (!A.value?.createSubPane(e, t ?? Ge(e))) return !1;
|
|
14195
14262
|
let r = Zl({
|
|
14196
14263
|
paneId: n,
|
|
14197
14264
|
title: e,
|
|
14198
|
-
getTitleInfo: () =>
|
|
14265
|
+
getTitleInfo: () => Qe(n)
|
|
14199
14266
|
});
|
|
14200
|
-
return
|
|
14267
|
+
return A.value?.useRenderer(r), H.value.push({
|
|
14201
14268
|
id: n,
|
|
14202
14269
|
indicatorId: e,
|
|
14203
14270
|
rendererName: `${e.toLowerCase()}_${n}`,
|
|
14204
14271
|
paneTitleRendererName: r.name,
|
|
14205
|
-
params: t ??
|
|
14206
|
-
}),
|
|
14272
|
+
params: t ?? Ge(e)
|
|
14273
|
+
}), V.value.includes(e) || V.value.push(e), ie(), !0;
|
|
14207
14274
|
}
|
|
14208
|
-
function
|
|
14209
|
-
let t =
|
|
14275
|
+
function qe(e) {
|
|
14276
|
+
let t = H.value.findIndex((t) => t.id === e);
|
|
14210
14277
|
if (t === -1) return;
|
|
14211
|
-
let n =
|
|
14212
|
-
n && (
|
|
14278
|
+
let n = H.value[t];
|
|
14279
|
+
n && (A.value?.removeRenderer(n.paneTitleRendererName), A.value?.removeSubPane(n.indicatorId), H.value.splice(t, 1), H.value.some((e) => e.indicatorId === n.indicatorId) || (V.value = V.value.filter((e) => e !== n.indicatorId)));
|
|
14213
14280
|
}
|
|
14214
|
-
function
|
|
14215
|
-
for (let e of
|
|
14216
|
-
|
|
14281
|
+
function Je() {
|
|
14282
|
+
for (let e of H.value) A.value?.removeRenderer(e.paneTitleRendererName);
|
|
14283
|
+
A.value?.clearSubPanes(), H.value = [], V.value = V.value.filter((e) => !Ue.includes(e));
|
|
14217
14284
|
}
|
|
14218
|
-
function
|
|
14219
|
-
let e =
|
|
14220
|
-
if (e) for (let t of e) t.enabled && (
|
|
14285
|
+
function Ye() {
|
|
14286
|
+
let e = d.semanticConfig.indicators?.main;
|
|
14287
|
+
if (e) for (let t of e) t.enabled && (V.value.includes(t.type) || V.value.push(t.type), t.params && (Ve.value[t.type] = t.params));
|
|
14221
14288
|
}
|
|
14222
|
-
T([
|
|
14223
|
-
let t =
|
|
14289
|
+
T([V, Ve], ([e]) => {
|
|
14290
|
+
let t = A.value;
|
|
14224
14291
|
t && (t.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
14225
14292
|
MA: {
|
|
14226
14293
|
enabled: e.includes("MA"),
|
|
14227
|
-
params:
|
|
14294
|
+
params: Ve.value.MA || {}
|
|
14228
14295
|
},
|
|
14229
14296
|
BOLL: {
|
|
14230
14297
|
enabled: e.includes("BOLL"),
|
|
14231
|
-
params:
|
|
14298
|
+
params: Ve.value.BOLL || {}
|
|
14232
14299
|
},
|
|
14233
14300
|
EXPMA: {
|
|
14234
14301
|
enabled: e.includes("EXPMA"),
|
|
14235
|
-
params:
|
|
14302
|
+
params: Ve.value.EXPMA || {}
|
|
14236
14303
|
},
|
|
14237
14304
|
ENE: {
|
|
14238
14305
|
enabled: e.includes("ENE"),
|
|
14239
|
-
params:
|
|
14306
|
+
params: Ve.value.ENE || {}
|
|
14240
14307
|
}
|
|
14241
|
-
} }), t.setRendererEnabled("ma", e.includes("MA")), t.setRendererEnabled("boll", e.includes("BOLL")), t.setRendererEnabled("expma", e.includes("EXPMA")), t.setRendererEnabled("ene", e.includes("ENE")),
|
|
14308
|
+
} }), t.setRendererEnabled("ma", e.includes("MA")), t.setRendererEnabled("boll", e.includes("BOLL")), t.setRendererEnabled("expma", e.includes("EXPMA")), t.setRendererEnabled("ene", e.includes("ENE")), ie());
|
|
14242
14309
|
}, { deep: !0 });
|
|
14243
|
-
function
|
|
14244
|
-
let e =
|
|
14245
|
-
|
|
14310
|
+
function Xe() {
|
|
14311
|
+
let e = A.value?.getSubPaneIndicators() ?? [];
|
|
14312
|
+
H.value = [];
|
|
14246
14313
|
for (let t of e) {
|
|
14247
14314
|
let e = `sub_${t}`, n = Zl({
|
|
14248
14315
|
paneId: e,
|
|
14249
14316
|
title: t,
|
|
14250
|
-
getTitleInfo: () =>
|
|
14317
|
+
getTitleInfo: () => Qe(e)
|
|
14251
14318
|
});
|
|
14252
|
-
|
|
14319
|
+
A.value?.useRenderer(n), H.value.push({
|
|
14253
14320
|
id: e,
|
|
14254
14321
|
indicatorId: t,
|
|
14255
14322
|
rendererName: `${t.toLowerCase()}_${e}`,
|
|
14256
14323
|
paneTitleRendererName: n.name,
|
|
14257
|
-
params:
|
|
14258
|
-
}),
|
|
14324
|
+
params: Ge(t)
|
|
14325
|
+
}), V.value.includes(t) || V.value.push(t);
|
|
14259
14326
|
}
|
|
14260
|
-
|
|
14327
|
+
ie();
|
|
14261
14328
|
}
|
|
14262
|
-
function
|
|
14263
|
-
let n =
|
|
14329
|
+
function Ze(e, t) {
|
|
14330
|
+
let n = H.value.find((t) => t.id === e);
|
|
14264
14331
|
if (!n) return;
|
|
14265
14332
|
let r = n.indicatorId;
|
|
14266
|
-
|
|
14333
|
+
A.value?.removeRenderer(n.paneTitleRendererName), A.value?.removeSubPane(r), A.value?.createSubPane(t, Ge(t));
|
|
14267
14334
|
let i = `sub_${t}`, a = Zl({
|
|
14268
14335
|
paneId: i,
|
|
14269
14336
|
title: t,
|
|
14270
|
-
getTitleInfo: () =>
|
|
14337
|
+
getTitleInfo: () => Qe(i)
|
|
14271
14338
|
});
|
|
14272
|
-
|
|
14273
|
-
let o =
|
|
14274
|
-
o !== -1 && (
|
|
14339
|
+
A.value?.useRenderer(a);
|
|
14340
|
+
let o = H.value.findIndex((t) => t.id === e);
|
|
14341
|
+
o !== -1 && (H.value[o] = {
|
|
14275
14342
|
id: i,
|
|
14276
14343
|
indicatorId: t,
|
|
14277
14344
|
rendererName: `${t.toLowerCase()}_${i}`,
|
|
14278
14345
|
paneTitleRendererName: a.name,
|
|
14279
|
-
params:
|
|
14280
|
-
}),
|
|
14346
|
+
params: Ge(t)
|
|
14347
|
+
}), V.value = V.value.filter((e) => e !== r), V.value.includes(t) || V.value.push(t);
|
|
14281
14348
|
}
|
|
14282
|
-
function
|
|
14283
|
-
let t =
|
|
14349
|
+
function Qe(e) {
|
|
14350
|
+
let t = H.value.find((t) => t.id === e);
|
|
14284
14351
|
if (!t) return null;
|
|
14285
|
-
let n =
|
|
14352
|
+
let n = A.value?.getData();
|
|
14286
14353
|
if (!n || n.length === 0) return null;
|
|
14287
|
-
let r =
|
|
14288
|
-
return r.getTitleInfo(n,
|
|
14354
|
+
let r = He[t.indicatorId], i = t.params;
|
|
14355
|
+
return r.getTitleInfo(n, ve.value, i);
|
|
14289
14356
|
}
|
|
14290
|
-
function
|
|
14357
|
+
function $e(e, t) {
|
|
14291
14358
|
if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
14292
|
-
t ?
|
|
14359
|
+
t ? V.value.includes(e) || V.value.push(e) : V.value = V.value.filter((t) => t !== e);
|
|
14293
14360
|
return;
|
|
14294
14361
|
}
|
|
14295
|
-
if (
|
|
14362
|
+
if (Ue.includes(e)) {
|
|
14296
14363
|
if (t) {
|
|
14297
|
-
if (
|
|
14298
|
-
if (!
|
|
14299
|
-
let t =
|
|
14300
|
-
t &&
|
|
14364
|
+
if (V.value.includes(e) || V.value.push(e), H.value.find((t) => t.indicatorId === e)) return;
|
|
14365
|
+
if (!Ke(e)) {
|
|
14366
|
+
let t = H.value[H.value.length - 1];
|
|
14367
|
+
t && Ze(t.id, e);
|
|
14301
14368
|
}
|
|
14302
|
-
} else
|
|
14303
|
-
|
|
14369
|
+
} else V.value = V.value.filter((t) => t !== e), H.value.filter((t) => t.indicatorId === e).forEach((e) => qe(e.id));
|
|
14370
|
+
ie();
|
|
14304
14371
|
}
|
|
14305
14372
|
}
|
|
14306
|
-
function
|
|
14307
|
-
|
|
14373
|
+
function et() {
|
|
14374
|
+
A.value?.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
14308
14375
|
MA: {
|
|
14309
|
-
enabled:
|
|
14310
|
-
params:
|
|
14376
|
+
enabled: V.value.includes("MA"),
|
|
14377
|
+
params: Ve.value.MA || {}
|
|
14311
14378
|
},
|
|
14312
14379
|
BOLL: {
|
|
14313
|
-
enabled:
|
|
14314
|
-
params:
|
|
14380
|
+
enabled: V.value.includes("BOLL"),
|
|
14381
|
+
params: Ve.value.BOLL || {}
|
|
14315
14382
|
},
|
|
14316
14383
|
EXPMA: {
|
|
14317
|
-
enabled:
|
|
14318
|
-
params:
|
|
14384
|
+
enabled: V.value.includes("EXPMA"),
|
|
14385
|
+
params: Ve.value.EXPMA || {}
|
|
14319
14386
|
},
|
|
14320
14387
|
ENE: {
|
|
14321
|
-
enabled:
|
|
14322
|
-
params:
|
|
14388
|
+
enabled: V.value.includes("ENE"),
|
|
14389
|
+
params: Ve.value.ENE || {}
|
|
14323
14390
|
}
|
|
14324
14391
|
} });
|
|
14325
14392
|
}
|
|
14326
|
-
function
|
|
14327
|
-
if (
|
|
14328
|
-
e === "BOLL" &&
|
|
14393
|
+
function tt(e, t) {
|
|
14394
|
+
if (Ve.value[e] = t, e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
14395
|
+
e === "BOLL" && A.value?.updateRendererConfig("boll", t), e === "EXPMA" && A.value?.updateRendererConfig("expma", t), e === "ENE" && A.value?.updateRendererConfig("ene", t), et(), ie();
|
|
14329
14396
|
return;
|
|
14330
14397
|
}
|
|
14331
|
-
|
|
14332
|
-
e.params = { ...t },
|
|
14333
|
-
}),
|
|
14398
|
+
Ue.includes(e) && H.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
14399
|
+
e.params = { ...t }, A.value?.updateRendererConfig(e.rendererName, t);
|
|
14400
|
+
}), ie();
|
|
14334
14401
|
}
|
|
14335
|
-
function
|
|
14336
|
-
if (!e.length ||
|
|
14337
|
-
let t = e.filter((e) =>
|
|
14402
|
+
function nt(e) {
|
|
14403
|
+
if (!e.length || H.value.length <= 1) return;
|
|
14404
|
+
let t = e.filter((e) => Ue.includes(e));
|
|
14338
14405
|
if (!t.length) return;
|
|
14339
|
-
let n = new Map(
|
|
14406
|
+
let n = new Map(H.value.map((e) => [e.indicatorId, e])), r = [];
|
|
14340
14407
|
for (let e of t) {
|
|
14341
14408
|
let t = n.get(e);
|
|
14342
14409
|
t && (r.push(t), n.delete(e));
|
|
14343
14410
|
}
|
|
14344
14411
|
if (r.length === 0) return;
|
|
14345
|
-
for (let e of
|
|
14346
|
-
let i =
|
|
14412
|
+
for (let e of H.value) n.has(e.indicatorId) && (r.push(e), n.delete(e.indicatorId));
|
|
14413
|
+
let i = H.value.map((e) => e.id), a = r.map((e) => e.id);
|
|
14347
14414
|
if (i.join("|") === a.join("|")) return;
|
|
14348
|
-
|
|
14349
|
-
let o =
|
|
14350
|
-
|
|
14351
|
-
let c =
|
|
14352
|
-
c && c.updatePaneLayout(
|
|
14353
|
-
}
|
|
14354
|
-
let
|
|
14355
|
-
function
|
|
14356
|
-
let e =
|
|
14415
|
+
H.value = r;
|
|
14416
|
+
let o = V.value.filter((e) => !Ue.includes(e)), s = H.value.map((e) => e.indicatorId);
|
|
14417
|
+
V.value = [...o, ...s];
|
|
14418
|
+
let c = A.value;
|
|
14419
|
+
c && c.updatePaneLayout(We());
|
|
14420
|
+
}
|
|
14421
|
+
let rt = r(() => d.rightAxisWidth + d.priceLabelWidth), it = M.computed.totalWidth;
|
|
14422
|
+
function at() {
|
|
14423
|
+
let e = D.value, t = A.value;
|
|
14357
14424
|
if (!e || !t) return;
|
|
14358
14425
|
let n = t.getData()?.length ?? 0;
|
|
14359
14426
|
if (n === 0) return;
|
|
14360
|
-
let r = t.getCurrentDpr(), { unitPx: i, startXPx: a } = Ms(
|
|
14361
|
-
e.scrollLeft = Math.round(c * r) / r,
|
|
14427
|
+
let r = t.getCurrentDpr(), { unitPx: i, startXPx: a } = Ms(ee.value, P.value, r), o = (a + n * i) / r, s = Math.max(0, e.scrollWidth - e.clientWidth), c = Math.min(s, Math.max(0, o - e.clientWidth));
|
|
14428
|
+
e.scrollLeft = Math.round(c * r) / r, ie();
|
|
14362
14429
|
}
|
|
14363
|
-
function
|
|
14364
|
-
let n =
|
|
14430
|
+
function ot(e, t) {
|
|
14431
|
+
let n = A.value, r = D.value;
|
|
14365
14432
|
if (!n || !r) return;
|
|
14366
|
-
let i = n.getCurrentDpr(), a = yl(e, t ?? (n.getViewport()?.plotWidth ?? r.clientWidth) / 2, r.scrollLeft,
|
|
14367
|
-
minKWidth:
|
|
14368
|
-
maxKWidth:
|
|
14369
|
-
zoomLevelCount:
|
|
14433
|
+
let i = n.getCurrentDpr(), a = yl(e, t ?? (n.getViewport()?.plotWidth ?? r.clientWidth) / 2, r.scrollLeft, N.value, ee.value, P.value, {
|
|
14434
|
+
minKWidth: d.minKWidth,
|
|
14435
|
+
maxKWidth: d.maxKWidth,
|
|
14436
|
+
zoomLevelCount: d.zoomLevels,
|
|
14370
14437
|
dpr: i
|
|
14371
14438
|
});
|
|
14372
|
-
a && (
|
|
14373
|
-
let e =
|
|
14439
|
+
a && (M.actions.setZoomState(a.targetLevel, a.newKWidth, a.newKGap), n.interaction.clearHover(), f(() => {
|
|
14440
|
+
let e = D.value;
|
|
14374
14441
|
if (!e) return;
|
|
14375
14442
|
let t = Math.max(0, e.scrollWidth - e.clientWidth), r = Math.min(Math.max(0, a.newScrollLeft), t);
|
|
14376
|
-
e.scrollLeft = Math.round(r * i) / i, n.applyRenderState(a.newKWidth, a.newKGap, a.targetLevel),
|
|
14443
|
+
e.scrollLeft = Math.round(r * i) / i, n.applyRenderState(a.newKWidth, a.newKGap, a.targetLevel), v("zoomLevelChange", a.targetLevel, a.newKWidth);
|
|
14377
14444
|
}));
|
|
14378
14445
|
}
|
|
14379
|
-
return
|
|
14380
|
-
scheduleRender:
|
|
14381
|
-
scrollToRight:
|
|
14382
|
-
addSubPane:
|
|
14383
|
-
removeSubPane:
|
|
14384
|
-
switchSubIndicator:
|
|
14385
|
-
clearAllSubPanes:
|
|
14446
|
+
return c({
|
|
14447
|
+
scheduleRender: ie,
|
|
14448
|
+
scrollToRight: at,
|
|
14449
|
+
addSubPane: Ke,
|
|
14450
|
+
removeSubPane: qe,
|
|
14451
|
+
switchSubIndicator: Ze,
|
|
14452
|
+
clearAllSubPanes: Je,
|
|
14386
14453
|
get plugin() {
|
|
14387
|
-
return
|
|
14454
|
+
return A.value?.plugin;
|
|
14388
14455
|
},
|
|
14389
|
-
zoomToLevel:
|
|
14390
|
-
zoomIn: (e) =>
|
|
14391
|
-
zoomOut: (e) =>
|
|
14392
|
-
getZoomLevel: () =>
|
|
14393
|
-
getZoomLevelCount: () =>
|
|
14456
|
+
zoomToLevel: ot,
|
|
14457
|
+
zoomIn: (e) => ot(N.value + 1, e),
|
|
14458
|
+
zoomOut: (e) => ot(N.value - 1, e),
|
|
14459
|
+
getZoomLevel: () => N.value,
|
|
14460
|
+
getZoomLevelCount: () => A.value?.getZoomLevelCount() ?? 10
|
|
14394
14461
|
}), h(() => {
|
|
14395
|
-
|
|
14396
|
-
let e =
|
|
14462
|
+
I.value = typeof CSS < "u" && CSS.supports("anchor-name: --kmap-anchor") && CSS.supports("position-anchor: --kmap-anchor");
|
|
14463
|
+
let e = D.value, t = C.value, n = E.value, r = x.value;
|
|
14397
14464
|
if (!e || !t || !n || !r) return;
|
|
14398
14465
|
let i = (t) => {
|
|
14399
14466
|
t.preventDefault();
|
|
14400
|
-
let n =
|
|
14467
|
+
let n = A.value;
|
|
14401
14468
|
if (!n) return;
|
|
14402
|
-
let r = e.getBoundingClientRect(), i = t.clientX - r.left, a = e.scrollLeft, o = n.getCurrentDpr(), s = vl(t.deltaY > 0 ? -1 : 1, i, a,
|
|
14403
|
-
minKWidth:
|
|
14404
|
-
maxKWidth:
|
|
14405
|
-
zoomLevelCount:
|
|
14469
|
+
let r = e.getBoundingClientRect(), i = t.clientX - r.left, a = e.scrollLeft, o = n.getCurrentDpr(), s = vl(t.deltaY > 0 ? -1 : 1, i, a, N.value, ee.value, P.value, {
|
|
14470
|
+
minKWidth: d.minKWidth,
|
|
14471
|
+
maxKWidth: d.maxKWidth,
|
|
14472
|
+
zoomLevelCount: d.zoomLevels,
|
|
14406
14473
|
dpr: o
|
|
14407
14474
|
});
|
|
14408
|
-
s && (
|
|
14409
|
-
let e =
|
|
14475
|
+
s && (M.actions.setZoomState(s.targetLevel, s.newKWidth, s.newKGap), n.interaction.clearHover(), f(() => {
|
|
14476
|
+
let e = D.value;
|
|
14410
14477
|
if (!e) return;
|
|
14411
14478
|
let t = Math.max(0, e.scrollWidth - e.clientWidth), r = Math.min(Math.max(0, s.newScrollLeft), t);
|
|
14412
|
-
e.scrollLeft = Math.round(r * o) / o, n.applyRenderState(s.newKWidth, s.newKGap, s.targetLevel),
|
|
14479
|
+
e.scrollLeft = Math.round(r * o) / o, n.applyRenderState(s.newKWidth, s.newKGap, s.targetLevel), v("zoomLevelChange", s.targetLevel, s.newKWidth);
|
|
14413
14480
|
}));
|
|
14414
14481
|
};
|
|
14415
14482
|
e.addEventListener("wheel", i, { passive: !1 });
|
|
@@ -14419,19 +14486,19 @@ var Gu = d({
|
|
|
14419
14486
|
rightAxisLayer: n,
|
|
14420
14487
|
xAxisCanvas: r
|
|
14421
14488
|
}, {
|
|
14422
|
-
yPaddingPx:
|
|
14423
|
-
rightAxisWidth:
|
|
14424
|
-
bottomAxisHeight:
|
|
14425
|
-
priceLabelWidth:
|
|
14426
|
-
minKWidth:
|
|
14427
|
-
maxKWidth:
|
|
14489
|
+
yPaddingPx: d.yPaddingPx,
|
|
14490
|
+
rightAxisWidth: d.rightAxisWidth,
|
|
14491
|
+
bottomAxisHeight: d.bottomAxisHeight,
|
|
14492
|
+
priceLabelWidth: d.priceLabelWidth,
|
|
14493
|
+
minKWidth: d.minKWidth,
|
|
14494
|
+
maxKWidth: d.maxKWidth,
|
|
14428
14495
|
panes: [{
|
|
14429
14496
|
id: "main",
|
|
14430
14497
|
ratio: 1
|
|
14431
14498
|
}],
|
|
14432
14499
|
paneGap: 0,
|
|
14433
|
-
zoomLevels:
|
|
14434
|
-
initialZoomLevel:
|
|
14500
|
+
zoomLevels: d.zoomLevels,
|
|
14501
|
+
initialZoomLevel: d.initialZoomLevel
|
|
14435
14502
|
});
|
|
14436
14503
|
a.useRenderer(Dl()), a.useRenderer(kl()), a.useRenderer(Xs({
|
|
14437
14504
|
ma5: !0,
|
|
@@ -14440,7 +14507,7 @@ var Gu = d({
|
|
|
14440
14507
|
ma30: !0,
|
|
14441
14508
|
ma60: !0
|
|
14442
14509
|
})), a.useRenderer(Qs()), a.setRendererEnabled("boll", !1), a.useRenderer(nc()), a.setRendererEnabled("expma", !1), a.useRenderer(ac()), a.setRendererEnabled("ene", !1), a.useRenderer(wl()), a.useRenderer(Ol()), a.useRenderer(ka());
|
|
14443
|
-
let o =
|
|
14510
|
+
let o = d.rightAxisWidth + d.priceLabelWidth, s = () => {
|
|
14444
14511
|
let e = a.interaction.crosshairPos, t = a.interaction.crosshairPrice, n = a.interaction.activePaneId;
|
|
14445
14512
|
return e && t !== null ? {
|
|
14446
14513
|
y: e.y,
|
|
@@ -14450,9 +14517,9 @@ var Gu = d({
|
|
|
14450
14517
|
};
|
|
14451
14518
|
a.useRenderer(Ll({
|
|
14452
14519
|
axisWidth: o,
|
|
14453
|
-
yPaddingPx:
|
|
14520
|
+
yPaddingPx: d.yPaddingPx,
|
|
14454
14521
|
getCrosshair: s
|
|
14455
|
-
})), a.useRenderer(sc({ yPaddingPx:
|
|
14522
|
+
})), a.useRenderer(sc({ yPaddingPx: d.yPaddingPx }));
|
|
14456
14523
|
let c = [
|
|
14457
14524
|
{
|
|
14458
14525
|
create: Bl,
|
|
@@ -14494,7 +14561,7 @@ var Gu = d({
|
|
|
14494
14561
|
for (let e of c) a.useRenderer(e.create({
|
|
14495
14562
|
axisWidth: o,
|
|
14496
14563
|
paneId: e.paneId,
|
|
14497
|
-
yPaddingPx:
|
|
14564
|
+
yPaddingPx: d.yPaddingPx,
|
|
14498
14565
|
getCrosshair: s
|
|
14499
14566
|
}));
|
|
14500
14567
|
a.useRenderer(Xl({ getCrosshairState: () => ({
|
|
@@ -14503,7 +14570,7 @@ var Gu = d({
|
|
|
14503
14570
|
isDragging: a.interaction.isDraggingState(),
|
|
14504
14571
|
price: a.interaction.crosshairPrice
|
|
14505
14572
|
}) })), a.useRenderer(Yl({
|
|
14506
|
-
height:
|
|
14573
|
+
height: d.bottomAxisHeight,
|
|
14507
14574
|
getCrosshair: () => {
|
|
14508
14575
|
let e = a.interaction.crosshairPos, t = a.interaction.crosshairIndex;
|
|
14509
14576
|
return e && t !== null ? {
|
|
@@ -14512,15 +14579,17 @@ var Gu = d({
|
|
|
14512
14579
|
} : null;
|
|
14513
14580
|
}
|
|
14514
14581
|
})), a.setOnViewportChange((e) => {
|
|
14515
|
-
|
|
14582
|
+
M.state.viewportDpr !== e.dpr && M.actions.setViewportDpr(e.dpr), M.state.viewWidth !== e.plotWidth && M.actions.setViewWidth(e.plotWidth);
|
|
14516
14583
|
let t = _l(e.dpr);
|
|
14517
|
-
|
|
14584
|
+
M.state.kGap !== t && M.actions.setZoomState(M.state.zoomLevel, M.state.kWidth, t);
|
|
14585
|
+
let n = a.getOption();
|
|
14586
|
+
(n.kWidth !== M.state.kWidth || n.kGap !== t) && a.applyRenderState(M.state.kWidth, t, M.state.zoomLevel);
|
|
14518
14587
|
}), a.setOnPaneLayoutChange((e) => {
|
|
14519
14588
|
let t = {};
|
|
14520
14589
|
for (let n of e) t[n.id] = n.ratio;
|
|
14521
|
-
|
|
14522
|
-
let n = a.getPaneRenderers(), r =
|
|
14523
|
-
|
|
14590
|
+
M.actions.setPaneRatios(t);
|
|
14591
|
+
let n = a.getPaneRenderers(), r = D.value && parseInt(getComputedStyle(D.value).borderTopWidth) || 0;
|
|
14592
|
+
ce.value = n.slice(0, -1).map((e) => {
|
|
14524
14593
|
let t = e.getPane();
|
|
14525
14594
|
return {
|
|
14526
14595
|
id: t.id,
|
|
@@ -14528,118 +14597,129 @@ var Gu = d({
|
|
|
14528
14597
|
};
|
|
14529
14598
|
});
|
|
14530
14599
|
}), a.setOnDataChange((e) => {
|
|
14531
|
-
|
|
14532
|
-
}),
|
|
14600
|
+
M.actions.setDataLength(e.length), M.actions.bumpDataVersion();
|
|
14601
|
+
}), A.value = a, a.applyRenderState(M.state.kWidth, M.state.kGap, M.state.zoomLevel), R.value = new Kc(a), R.value.setCallbacks({
|
|
14533
14602
|
onDrawingCreated: (e) => {
|
|
14534
|
-
|
|
14603
|
+
M.actions.setDrawings([...M.state.drawings, e]), M.actions.setSelectedDrawingId(e.id);
|
|
14535
14604
|
},
|
|
14536
14605
|
onToolChange: (e) => {},
|
|
14537
14606
|
onDrawingSelected: (e) => {
|
|
14538
|
-
|
|
14607
|
+
M.actions.setSelectedDrawingId(e?.id ?? null);
|
|
14539
14608
|
}
|
|
14540
|
-
}), a.interaction.setTooltipAnchorPositioning(
|
|
14541
|
-
|
|
14609
|
+
}), a.interaction.setTooltipAnchorPositioning(I.value), a.interaction.setOnInteractionChange((e) => {
|
|
14610
|
+
L.value = e;
|
|
14542
14611
|
}), a.interaction.setOnPinchZoom((e, t) => {
|
|
14543
|
-
let n =
|
|
14612
|
+
let n = D.value;
|
|
14544
14613
|
if (!n || !a) return;
|
|
14545
|
-
let r = t - n.getBoundingClientRect().left, i = n.scrollLeft, o = a.getCurrentDpr(), s = vl(e, r, i,
|
|
14546
|
-
minKWidth:
|
|
14547
|
-
maxKWidth:
|
|
14548
|
-
zoomLevelCount:
|
|
14614
|
+
let r = t - n.getBoundingClientRect().left, i = n.scrollLeft, o = a.getCurrentDpr(), s = vl(e, r, i, N.value, ee.value, P.value, {
|
|
14615
|
+
minKWidth: d.minKWidth,
|
|
14616
|
+
maxKWidth: d.maxKWidth,
|
|
14617
|
+
zoomLevelCount: d.zoomLevels,
|
|
14549
14618
|
dpr: o
|
|
14550
14619
|
});
|
|
14551
|
-
s && (
|
|
14552
|
-
let e =
|
|
14620
|
+
s && (M.actions.setZoomState(s.targetLevel, s.newKWidth, s.newKGap), a.interaction.clearHover(), f(() => {
|
|
14621
|
+
let e = D.value;
|
|
14553
14622
|
if (!e) return;
|
|
14554
14623
|
let t = Math.max(0, e.scrollWidth - e.clientWidth), n = Math.min(Math.max(0, s.newScrollLeft), t);
|
|
14555
|
-
e.scrollLeft = Math.round(n * o) / o, a.applyRenderState(s.newKWidth, s.newKGap, s.targetLevel),
|
|
14624
|
+
e.scrollLeft = Math.round(n * o) / o, a.applyRenderState(s.newKWidth, s.newKGap, s.targetLevel), v("zoomLevelChange", s.targetLevel, s.newKWidth);
|
|
14556
14625
|
}));
|
|
14557
|
-
}),
|
|
14626
|
+
}), L.value = a.interaction.getInteractionSnapshot(), M.actions.setViewportDpr(a.getCurrentDpr()), a.resize(), j.value = new $i(a), j.value.on("config:error", (e) => {
|
|
14558
14627
|
console.error("Semantic config error:", e);
|
|
14559
|
-
}),
|
|
14560
|
-
|
|
14561
|
-
}),
|
|
14628
|
+
}), j.value.on("config:ready", () => {
|
|
14629
|
+
M.actions.setDataLength(a.getData()?.length ?? 0), M.actions.bumpDataVersion(), Ye(), Xe(), f(() => at());
|
|
14630
|
+
}), j.value.applyConfig(d.semanticConfig).then((e) => {
|
|
14562
14631
|
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
14563
14632
|
}), a.__onWheel = i;
|
|
14564
14633
|
}), g(() => {
|
|
14565
|
-
let e =
|
|
14634
|
+
let e = A.value;
|
|
14566
14635
|
if (e) {
|
|
14567
|
-
let t = e.__onWheel, n =
|
|
14636
|
+
let t = e.__onWheel, n = D.value;
|
|
14568
14637
|
t && n && n.removeEventListener("wheel", t), e.destroy();
|
|
14569
14638
|
}
|
|
14570
|
-
|
|
14571
|
-
}), T(() =>
|
|
14572
|
-
|
|
14573
|
-
}), T(() =>
|
|
14639
|
+
A.value = null, R.value = null;
|
|
14640
|
+
}), T(() => d.yPaddingPx, (e) => {
|
|
14641
|
+
A.value?.updateOptions({ yPaddingPx: e });
|
|
14642
|
+
}), T(() => d.semanticConfig, async (e, t) => {
|
|
14574
14643
|
if (e && e !== t) {
|
|
14575
|
-
let t = await
|
|
14644
|
+
let t = await j.value?.applyConfig(e);
|
|
14576
14645
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
14577
14646
|
}
|
|
14578
|
-
}, { deep: !0 }), (
|
|
14579
|
-
"is-dragging":
|
|
14580
|
-
"is-resizing-pane":
|
|
14581
|
-
"is-hovering-pane-separator":
|
|
14582
|
-
"is-hovering-right-axis":
|
|
14583
|
-
"is-hovering-kline":
|
|
14647
|
+
}, { deep: !0 }), (r, c) => (_(), o("div", td, [s("div", { class: p(["chart-stage", {
|
|
14648
|
+
"is-dragging": pe.value,
|
|
14649
|
+
"is-resizing-pane": me.value,
|
|
14650
|
+
"is-hovering-pane-separator": B.value,
|
|
14651
|
+
"is-hovering-right-axis": ge.value,
|
|
14652
|
+
"is-hovering-kline": _e.value !== null
|
|
14584
14653
|
}]) }, [l(ed, {
|
|
14585
|
-
"is-fullscreen":
|
|
14586
|
-
onSelectTool:
|
|
14587
|
-
onToggleFullscreen:
|
|
14588
|
-
onZoomIn:
|
|
14589
|
-
onZoomOut:
|
|
14590
|
-
}, null, 8, ["is-fullscreen"]), s("div",
|
|
14591
|
-
|
|
14654
|
+
"is-fullscreen": n.isFullscreen,
|
|
14655
|
+
onSelectTool: ke,
|
|
14656
|
+
onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
|
|
14657
|
+
onZoomIn: c[1] ||= (e) => ot(N.value + 1),
|
|
14658
|
+
onZoomOut: c[2] ||= (e) => ot(N.value - 1)
|
|
14659
|
+
}, null, 8, ["is-fullscreen"]), s("div", {
|
|
14660
|
+
class: "chart-main",
|
|
14661
|
+
ref_key: "chartMainRef",
|
|
14662
|
+
ref: O
|
|
14663
|
+
}, [
|
|
14664
|
+
s("div", nd, [(_(!0), o(e, null, b(ce.value, (e) => (_(), o("div", {
|
|
14592
14665
|
key: e.id,
|
|
14593
|
-
class: p(["pane-separator-line", { "is-active":
|
|
14666
|
+
class: p(["pane-separator-line", { "is-active": he.value === e.id }]),
|
|
14594
14667
|
style: m({ top: `${e.top}px` })
|
|
14595
14668
|
}, null, 6))), 128))]),
|
|
14669
|
+
s("div", {
|
|
14670
|
+
ref_key: "tooltipLayerRef",
|
|
14671
|
+
ref: k,
|
|
14672
|
+
class: "tooltip-layer"
|
|
14673
|
+
}, null, 512),
|
|
14596
14674
|
s("div", {
|
|
14597
14675
|
class: "chart-container",
|
|
14598
14676
|
ref_key: "containerRef",
|
|
14599
|
-
ref:
|
|
14600
|
-
onScrollPassive:
|
|
14601
|
-
onPointerdown:
|
|
14602
|
-
onPointermove:
|
|
14603
|
-
onPointerup:
|
|
14604
|
-
onPointerleave:
|
|
14677
|
+
ref: D,
|
|
14678
|
+
onScrollPassive: Be,
|
|
14679
|
+
onPointerdown: Me,
|
|
14680
|
+
onPointermove: Ne,
|
|
14681
|
+
onPointerup: Pe,
|
|
14682
|
+
onPointerleave: Fe
|
|
14605
14683
|
}, [s("div", {
|
|
14606
14684
|
class: "scroll-content",
|
|
14607
|
-
style: m({ width: w(
|
|
14685
|
+
style: m({ width: w(it) + "px" })
|
|
14608
14686
|
}, [s("div", {
|
|
14609
14687
|
class: "canvas-layer",
|
|
14610
14688
|
ref_key: "canvasLayerRef",
|
|
14689
|
+
ref: C
|
|
14690
|
+
}, [s("canvas", {
|
|
14691
|
+
class: "x-axis-canvas",
|
|
14692
|
+
ref_key: "xAxisCanvasRef",
|
|
14611
14693
|
ref: x
|
|
14694
|
+
}, null, 512), z.value ? (_(), i(As, {
|
|
14695
|
+
key: 0,
|
|
14696
|
+
drawing: z.value,
|
|
14697
|
+
onUpdateStyle: Ae,
|
|
14698
|
+
onDelete: je
|
|
14699
|
+
}, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 544),
|
|
14700
|
+
k.value ? (_(), i(t, {
|
|
14701
|
+
key: 0,
|
|
14702
|
+
to: k.value
|
|
14612
14703
|
}, [
|
|
14613
|
-
|
|
14614
|
-
class: "x-axis-canvas",
|
|
14615
|
-
ref_key: "xAxisCanvasRef",
|
|
14616
|
-
ref: v
|
|
14617
|
-
}, null, 512),
|
|
14618
|
-
me.value ? (_(), o("div", {
|
|
14704
|
+
ye.value ? (_(), o("div", {
|
|
14619
14705
|
key: 0,
|
|
14620
|
-
class: p(["tooltip-anchor kline-tooltip-anchor", { "use-anchor":
|
|
14621
|
-
style: m(
|
|
14622
|
-
left: `${ge.value.x}px`,
|
|
14623
|
-
top: `${ge.value.y}px`
|
|
14624
|
-
})
|
|
14706
|
+
class: p(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": I.value }]),
|
|
14707
|
+
style: m(Ce.value)
|
|
14625
14708
|
}, null, 6)) : a("", !0),
|
|
14626
|
-
|
|
14709
|
+
de.value || fe.value ? (_(), o("div", {
|
|
14627
14710
|
key: 1,
|
|
14628
|
-
class: p(["tooltip-anchor marker-tooltip-anchor", { "use-anchor":
|
|
14629
|
-
style: m(
|
|
14630
|
-
left: `${I.value.x}px`,
|
|
14631
|
-
top: `${I.value.y}px`
|
|
14632
|
-
})
|
|
14711
|
+
class: p(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": I.value }]),
|
|
14712
|
+
style: m(Te.value)
|
|
14633
14713
|
}, null, 6)) : a("", !0),
|
|
14634
|
-
|
|
14714
|
+
ye.value ? (_(), i(ko, {
|
|
14635
14715
|
key: 2,
|
|
14636
|
-
k:
|
|
14637
|
-
index:
|
|
14638
|
-
data:
|
|
14639
|
-
pos:
|
|
14640
|
-
"set-el":
|
|
14641
|
-
"use-anchor":
|
|
14642
|
-
"anchor-placement":
|
|
14716
|
+
k: ye.value,
|
|
14717
|
+
index: be.value,
|
|
14718
|
+
data: Oe.value,
|
|
14719
|
+
pos: Se.value,
|
|
14720
|
+
"set-el": ae,
|
|
14721
|
+
"use-anchor": I.value,
|
|
14722
|
+
"anchor-placement": Ee.value
|
|
14643
14723
|
}, null, 8, [
|
|
14644
14724
|
"k",
|
|
14645
14725
|
"index",
|
|
@@ -14648,46 +14728,40 @@ var Gu = d({
|
|
|
14648
14728
|
"use-anchor",
|
|
14649
14729
|
"anchor-placement"
|
|
14650
14730
|
])) : a("", !0),
|
|
14651
|
-
|
|
14731
|
+
de.value || fe.value ? (_(), i(Po, {
|
|
14652
14732
|
key: 3,
|
|
14653
|
-
marker:
|
|
14654
|
-
pos:
|
|
14655
|
-
"use-anchor":
|
|
14656
|
-
"anchor-placement":
|
|
14657
|
-
"set-el":
|
|
14733
|
+
marker: de.value || fe.value,
|
|
14734
|
+
pos: we.value,
|
|
14735
|
+
"use-anchor": I.value,
|
|
14736
|
+
"anchor-placement": De.value,
|
|
14737
|
+
"set-el": oe
|
|
14658
14738
|
}, null, 8, [
|
|
14659
14739
|
"marker",
|
|
14660
14740
|
"pos",
|
|
14661
14741
|
"use-anchor",
|
|
14662
14742
|
"anchor-placement"
|
|
14663
|
-
])) : a("", !0)
|
|
14664
|
-
|
|
14665
|
-
key: 4,
|
|
14666
|
-
drawing: ie.value,
|
|
14667
|
-
onUpdateStyle: xe,
|
|
14668
|
-
onDelete: Se
|
|
14669
|
-
}, null, 8, ["drawing"])) : a("", !0)
|
|
14670
|
-
], 512)], 4)], 544),
|
|
14743
|
+
])) : a("", !0)
|
|
14744
|
+
], 8, ["to"])) : a("", !0),
|
|
14671
14745
|
s("div", {
|
|
14672
14746
|
class: "right-axis-host",
|
|
14673
14747
|
ref_key: "rightAxisLayerRef",
|
|
14674
|
-
ref:
|
|
14675
|
-
style: m({ width:
|
|
14676
|
-
onPointerdown:
|
|
14677
|
-
onPointermove:
|
|
14678
|
-
onPointerup:
|
|
14679
|
-
onPointerleave:
|
|
14748
|
+
ref: E,
|
|
14749
|
+
style: m({ width: rt.value + "px" }),
|
|
14750
|
+
onPointerdown: Ie,
|
|
14751
|
+
onPointermove: Le,
|
|
14752
|
+
onPointerup: Re,
|
|
14753
|
+
onPointerleave: ze
|
|
14680
14754
|
}, null, 36)
|
|
14681
|
-
])], 2), l(Ss, {
|
|
14682
|
-
"active-indicators":
|
|
14683
|
-
"indicator-params":
|
|
14684
|
-
onToggle:
|
|
14685
|
-
onUpdateParams:
|
|
14686
|
-
onReorderSubIndicators:
|
|
14755
|
+
], 512)], 2), l(Ss, {
|
|
14756
|
+
"active-indicators": V.value,
|
|
14757
|
+
"indicator-params": Ve.value,
|
|
14758
|
+
onToggle: $e,
|
|
14759
|
+
onUpdateParams: tt,
|
|
14760
|
+
onReorderSubIndicators: nt
|
|
14687
14761
|
}, null, 8, ["active-indicators", "indicator-params"])]));
|
|
14688
14762
|
}
|
|
14689
|
-
}), [["__scopeId", "data-v-
|
|
14690
|
-
e.component("KLineChart",
|
|
14763
|
+
}), [["__scopeId", "data-v-c53b9583"]]), ad = { install(e) {
|
|
14764
|
+
e.component("KLineChart", id);
|
|
14691
14765
|
} };
|
|
14692
14766
|
//#endregion
|
|
14693
|
-
export { ya as ConfigManager,
|
|
14767
|
+
export { ya as ConfigManager, F as EventBus, ga as GLOBAL_PANE_ID, va as HookSystem, id as KLineChart, ad as KMapPlugin, xa as PluginHostImpl, _a as PluginRegistry, ma as PluginState, X as RENDERER_PRIORITY, wa as RendererPluginManager, Sa as createPluginHost, ha as wrapPaneInfo };
|