@363045841yyt/klinechart 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.js +867 -744
- package/dist/klinechart.css +1 -1
- package/dist/src/core/chart.d.ts +17 -8
- package/dist/src/core/layout/pane.d.ts +8 -1
- package/dist/src/core/paneRenderer.d.ts +0 -4
- package/dist/src/core/renderers/yAxis.d.ts +2 -1
- package/dist/src/plugin/rendererPluginManager.d.ts +2 -2
- package/dist/src/plugin/types.d.ts +13 -0
- package/dist/src/utils/kLineDraw/axis.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -69,35 +69,35 @@ function ue(e) {
|
|
|
69
69
|
let t;
|
|
70
70
|
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && le(e.buffer), t;
|
|
71
71
|
}
|
|
72
|
-
var de = oe("string"), B = oe("function"), fe = oe("number"),
|
|
72
|
+
var de = oe("string"), B = oe("function"), fe = oe("number"), V = (e) => typeof e == "object" && !!e, pe = (e) => e === !0 || e === !1, H = (e) => {
|
|
73
73
|
if (ae(e) !== "object") return !1;
|
|
74
74
|
let t = L(e);
|
|
75
75
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ie in e) && !(re in e);
|
|
76
|
-
},
|
|
77
|
-
if (!
|
|
76
|
+
}, me = (e) => {
|
|
77
|
+
if (!V(e) || ce(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
|
+
}, he = R("Date"), ge = R("File"), _e = (e) => !!(e && e.uri !== void 0), ve = (e) => e && e.getParts !== void 0, ye = R("Blob"), be = R("FileList"), xe = (e) => V(e) && B(e.pipe);
|
|
84
|
+
function Se() {
|
|
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 Ce = Se(), we = Ce.FormData === void 0 ? void 0 : Ce.FormData, Te = (e) => {
|
|
88
88
|
if (!e) return !1;
|
|
89
|
-
if (
|
|
89
|
+
if (we && e instanceof we) return !0;
|
|
90
90
|
let t = L(e);
|
|
91
91
|
if (!t || t === Object.prototype || !B(e.append)) return !1;
|
|
92
92
|
let n = ae(e);
|
|
93
93
|
return n === "formdata" || n === "object" && B(e.toString) && e.toString() === "[object FormData]";
|
|
94
|
-
},
|
|
94
|
+
}, Ee = R("URLSearchParams"), [De, Oe, ke, Ae] = [
|
|
95
95
|
"ReadableStream",
|
|
96
96
|
"Request",
|
|
97
97
|
"Response",
|
|
98
98
|
"Headers"
|
|
99
|
-
].map(R),
|
|
100
|
-
function
|
|
99
|
+
].map(R), je = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
100
|
+
function Me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
101
101
|
if (e == null) return;
|
|
102
102
|
let r, i;
|
|
103
103
|
if (typeof e != "object" && (e = [e]), se(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
@@ -107,24 +107,24 @@ function je(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
107
107
|
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Ne(e, t) {
|
|
111
111
|
if (ce(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: e, skipUndefined: t } =
|
|
117
|
+
var Pe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Fe = (e) => !z(e) && e !== Pe;
|
|
118
|
+
function Ie() {
|
|
119
|
+
let { caseless: e, skipUndefined: t } = Fe(this) && this || {}, n = {}, r = (r, i) => {
|
|
120
120
|
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
121
|
-
let a = e &&
|
|
122
|
-
H(n[a]) && H(r) ? n[a] =
|
|
121
|
+
let a = e && Ne(n, i) || i;
|
|
122
|
+
H(n[a]) && H(r) ? n[a] = Ie(n[a], r) : H(r) ? n[a] = Ie({}, r) : se(r) ? n[a] = r.slice() : (!t || !z(r)) && (n[a] = r);
|
|
123
123
|
};
|
|
124
|
-
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] &&
|
|
124
|
+
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && Me(arguments[e], r);
|
|
125
125
|
return n;
|
|
126
126
|
}
|
|
127
|
-
var
|
|
127
|
+
var Le = (e, t, n, { allOwnKeys: r } = {}) => (Me(t, (t, r) => {
|
|
128
128
|
n && B(t) ? Object.defineProperty(e, r, {
|
|
129
129
|
value: te(t, n),
|
|
130
130
|
writable: !0,
|
|
@@ -136,14 +136,14 @@ var Ie = (e, t, n, { allOwnKeys: r } = {}) => (je(t, (t, r) => {
|
|
|
136
136
|
enumerable: !0,
|
|
137
137
|
configurable: !0
|
|
138
138
|
});
|
|
139
|
-
}, { allOwnKeys: r }), e),
|
|
139
|
+
}, { allOwnKeys: r }), e), Re = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ze = (e, t, n, r) => {
|
|
140
140
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
141
141
|
value: e,
|
|
142
142
|
writable: !0,
|
|
143
143
|
enumerable: !1,
|
|
144
144
|
configurable: !0
|
|
145
145
|
}), Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n);
|
|
146
|
-
},
|
|
146
|
+
}, Be = (e, t, n, r) => {
|
|
147
147
|
let i, a, o, s = {};
|
|
148
148
|
if (t ||= {}, e == null) return t;
|
|
149
149
|
do {
|
|
@@ -151,11 +151,11 @@ var Ie = (e, t, n, { allOwnKeys: r } = {}) => (je(t, (t, r) => {
|
|
|
151
151
|
e = n !== !1 && L(e);
|
|
152
152
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
153
153
|
return t;
|
|
154
|
-
},
|
|
154
|
+
}, Ve = (e, t, n) => {
|
|
155
155
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
156
156
|
let r = e.indexOf(t, n);
|
|
157
157
|
return r !== -1 && r === n;
|
|
158
|
-
},
|
|
158
|
+
}, He = (e) => {
|
|
159
159
|
if (!e) return null;
|
|
160
160
|
if (se(e)) return e;
|
|
161
161
|
let t = e.length;
|
|
@@ -163,26 +163,26 @@ var Ie = (e, t, n, { allOwnKeys: r } = {}) => (je(t, (t, r) => {
|
|
|
163
163
|
let n = Array(t);
|
|
164
164
|
for (; t-- > 0;) n[t] = e[t];
|
|
165
165
|
return n;
|
|
166
|
-
},
|
|
166
|
+
}, Ue = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && L(Uint8Array)), We = (e, t) => {
|
|
167
167
|
let n = (e && e[re]).call(e), r;
|
|
168
168
|
for (; (r = n.next()) && !r.done;) {
|
|
169
169
|
let n = r.value;
|
|
170
170
|
t.call(e, n[0], n[1]);
|
|
171
171
|
}
|
|
172
|
-
},
|
|
172
|
+
}, Ge = (e, t) => {
|
|
173
173
|
let n, r = [];
|
|
174
174
|
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
175
175
|
return r;
|
|
176
|
-
},
|
|
176
|
+
}, Ke = R("HTMLFormElement"), qe = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
177
177
|
return t.toUpperCase() + n;
|
|
178
|
-
}),
|
|
178
|
+
}), Je = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ye = R("RegExp"), Xe = (e, t) => {
|
|
179
179
|
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
180
|
-
|
|
180
|
+
Me(n, (n, i) => {
|
|
181
181
|
let a;
|
|
182
182
|
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
183
183
|
}), Object.defineProperties(e, r);
|
|
184
|
-
},
|
|
185
|
-
|
|
184
|
+
}, Ze = (e) => {
|
|
185
|
+
Xe(e, (t, n) => {
|
|
186
186
|
if (B(e) && [
|
|
187
187
|
"arguments",
|
|
188
188
|
"caller",
|
|
@@ -199,26 +199,26 @@ var Ie = (e, t, n, { allOwnKeys: r } = {}) => (je(t, (t, r) => {
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
|
-
},
|
|
202
|
+
}, Qe = (e, t) => {
|
|
203
203
|
let n = {}, r = (e) => {
|
|
204
204
|
e.forEach((e) => {
|
|
205
205
|
n[e] = !0;
|
|
206
206
|
});
|
|
207
207
|
};
|
|
208
208
|
return se(e) ? r(e) : r(String(e).split(t)), n;
|
|
209
|
-
},
|
|
210
|
-
function
|
|
209
|
+
}, $e = () => {}, et = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
210
|
+
function tt(e) {
|
|
211
211
|
return !!(e && B(e.append) && e[ie] === "FormData" && e[re]);
|
|
212
212
|
}
|
|
213
|
-
var
|
|
213
|
+
var nt = (e) => {
|
|
214
214
|
let t = Array(10), n = (e, r) => {
|
|
215
|
-
if (
|
|
215
|
+
if (V(e)) {
|
|
216
216
|
if (t.indexOf(e) >= 0) return;
|
|
217
217
|
if (ce(e)) return e;
|
|
218
218
|
if (!("toJSON" in e)) {
|
|
219
219
|
t[r] = e;
|
|
220
220
|
let i = se(e) ? [] : {};
|
|
221
|
-
return
|
|
221
|
+
return Me(e, (e, t) => {
|
|
222
222
|
let a = n(e, r + 1);
|
|
223
223
|
!z(a) && (i[t] = a);
|
|
224
224
|
}), t[r] = void 0, i;
|
|
@@ -227,71 +227,71 @@ var tt = (e) => {
|
|
|
227
227
|
return e;
|
|
228
228
|
};
|
|
229
229
|
return n(e, 0);
|
|
230
|
-
},
|
|
231
|
-
n ===
|
|
230
|
+
}, rt = R("AsyncFunction"), it = (e) => e && (V(e) || B(e)) && B(e.then) && B(e.catch), at = ((e, t) => e ? setImmediate : t ? ((e, t) => (Pe.addEventListener("message", ({ source: n, data: r }) => {
|
|
231
|
+
n === Pe && r === e && t.length && t.shift()();
|
|
232
232
|
}, !1), (n) => {
|
|
233
|
-
t.push(n),
|
|
234
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", B(
|
|
233
|
+
t.push(n), Pe.postMessage(e, "*");
|
|
234
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", B(Pe.postMessage)), U = {
|
|
235
235
|
isArray: se,
|
|
236
236
|
isArrayBuffer: le,
|
|
237
237
|
isBuffer: ce,
|
|
238
|
-
isFormData:
|
|
238
|
+
isFormData: Te,
|
|
239
239
|
isArrayBufferView: ue,
|
|
240
240
|
isString: de,
|
|
241
241
|
isNumber: fe,
|
|
242
|
-
isBoolean:
|
|
243
|
-
isObject:
|
|
242
|
+
isBoolean: pe,
|
|
243
|
+
isObject: V,
|
|
244
244
|
isPlainObject: H,
|
|
245
|
-
isEmptyObject:
|
|
246
|
-
isReadableStream:
|
|
247
|
-
isRequest:
|
|
248
|
-
isResponse:
|
|
249
|
-
isHeaders:
|
|
245
|
+
isEmptyObject: me,
|
|
246
|
+
isReadableStream: De,
|
|
247
|
+
isRequest: Oe,
|
|
248
|
+
isResponse: ke,
|
|
249
|
+
isHeaders: Ae,
|
|
250
250
|
isUndefined: z,
|
|
251
|
-
isDate:
|
|
252
|
-
isFile:
|
|
253
|
-
isReactNativeBlob:
|
|
254
|
-
isReactNative:
|
|
255
|
-
isBlob:
|
|
256
|
-
isRegExp:
|
|
251
|
+
isDate: he,
|
|
252
|
+
isFile: ge,
|
|
253
|
+
isReactNativeBlob: _e,
|
|
254
|
+
isReactNative: ve,
|
|
255
|
+
isBlob: ye,
|
|
256
|
+
isRegExp: Ye,
|
|
257
257
|
isFunction: B,
|
|
258
|
-
isStream:
|
|
259
|
-
isURLSearchParams:
|
|
260
|
-
isTypedArray:
|
|
261
|
-
isFileList:
|
|
262
|
-
forEach:
|
|
263
|
-
merge:
|
|
264
|
-
extend:
|
|
265
|
-
trim:
|
|
266
|
-
stripBOM:
|
|
267
|
-
inherits:
|
|
268
|
-
toFlatObject:
|
|
258
|
+
isStream: xe,
|
|
259
|
+
isURLSearchParams: Ee,
|
|
260
|
+
isTypedArray: Ue,
|
|
261
|
+
isFileList: be,
|
|
262
|
+
forEach: Me,
|
|
263
|
+
merge: Ie,
|
|
264
|
+
extend: Le,
|
|
265
|
+
trim: je,
|
|
266
|
+
stripBOM: Re,
|
|
267
|
+
inherits: ze,
|
|
268
|
+
toFlatObject: Be,
|
|
269
269
|
kindOf: ae,
|
|
270
270
|
kindOfTest: R,
|
|
271
|
-
endsWith:
|
|
272
|
-
toArray:
|
|
273
|
-
forEachEntry:
|
|
274
|
-
matchAll:
|
|
275
|
-
isHTMLForm:
|
|
276
|
-
hasOwnProperty:
|
|
277
|
-
hasOwnProp:
|
|
278
|
-
reduceDescriptors:
|
|
279
|
-
freezeMethods:
|
|
280
|
-
toObjectSet:
|
|
281
|
-
toCamelCase:
|
|
282
|
-
noop:
|
|
283
|
-
toFiniteNumber:
|
|
284
|
-
findKey:
|
|
285
|
-
global:
|
|
286
|
-
isContextDefined:
|
|
287
|
-
isSpecCompliantForm:
|
|
288
|
-
toJSONObject:
|
|
289
|
-
isAsyncFn:
|
|
290
|
-
isThenable:
|
|
291
|
-
setImmediate:
|
|
292
|
-
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
271
|
+
endsWith: Ve,
|
|
272
|
+
toArray: He,
|
|
273
|
+
forEachEntry: We,
|
|
274
|
+
matchAll: Ge,
|
|
275
|
+
isHTMLForm: Ke,
|
|
276
|
+
hasOwnProperty: Je,
|
|
277
|
+
hasOwnProp: Je,
|
|
278
|
+
reduceDescriptors: Xe,
|
|
279
|
+
freezeMethods: Ze,
|
|
280
|
+
toObjectSet: Qe,
|
|
281
|
+
toCamelCase: qe,
|
|
282
|
+
noop: $e,
|
|
283
|
+
toFiniteNumber: et,
|
|
284
|
+
findKey: Ne,
|
|
285
|
+
global: Pe,
|
|
286
|
+
isContextDefined: Fe,
|
|
287
|
+
isSpecCompliantForm: tt,
|
|
288
|
+
toJSONObject: nt,
|
|
289
|
+
isAsyncFn: rt,
|
|
290
|
+
isThenable: it,
|
|
291
|
+
setImmediate: at,
|
|
292
|
+
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(Pe) : typeof process < "u" && process.nextTick || at,
|
|
293
293
|
isIterable: (e) => e != null && B(e[re])
|
|
294
|
-
},
|
|
294
|
+
}, W = class e extends Error {
|
|
295
295
|
static from(t, n, r, i, a, o) {
|
|
296
296
|
let s = new e(t.message, n || t.code, r, i, a);
|
|
297
297
|
return s.cause = t, s.name = t.name, t.status != null && s.status == null && (s.status = t.status), o && Object.assign(s, o), s;
|
|
@@ -314,81 +314,81 @@ var tt = (e) => {
|
|
|
314
314
|
lineNumber: this.lineNumber,
|
|
315
315
|
columnNumber: this.columnNumber,
|
|
316
316
|
stack: this.stack,
|
|
317
|
-
config:
|
|
317
|
+
config: U.toJSONObject(this.config),
|
|
318
318
|
code: this.code,
|
|
319
319
|
status: this.status
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
|
-
|
|
323
|
+
W.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", W.ERR_BAD_OPTION = "ERR_BAD_OPTION", W.ECONNABORTED = "ECONNABORTED", W.ETIMEDOUT = "ETIMEDOUT", W.ERR_NETWORK = "ERR_NETWORK", W.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", W.ERR_DEPRECATED = "ERR_DEPRECATED", W.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", W.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", W.ERR_CANCELED = "ERR_CANCELED", W.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", W.ERR_INVALID_URL = "ERR_INVALID_URL", W.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
324
324
|
//#endregion
|
|
325
325
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/toFormData.js
|
|
326
|
-
function at(e) {
|
|
327
|
-
return W.isPlainObject(e) || W.isArray(e);
|
|
328
|
-
}
|
|
329
326
|
function ot(e) {
|
|
330
|
-
return
|
|
327
|
+
return U.isPlainObject(e) || U.isArray(e);
|
|
328
|
+
}
|
|
329
|
+
function st(e) {
|
|
330
|
+
return U.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function ct(e, t, n) {
|
|
333
333
|
return e ? e.concat(t).map(function(e, t) {
|
|
334
|
-
return e =
|
|
334
|
+
return e = st(e), !n && t ? "[" + e + "]" : e;
|
|
335
335
|
}).join(n ? "." : "") : t;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
return
|
|
337
|
+
function lt(e) {
|
|
338
|
+
return U.isArray(e) && !e.some(ot);
|
|
339
339
|
}
|
|
340
|
-
var
|
|
340
|
+
var ut = U.toFlatObject(U, {}, null, function(e) {
|
|
341
341
|
return /^is[A-Z]/.test(e);
|
|
342
342
|
});
|
|
343
|
-
function
|
|
344
|
-
if (!
|
|
345
|
-
t ||= new FormData(), n =
|
|
343
|
+
function dt(e, t, n) {
|
|
344
|
+
if (!U.isObject(e)) throw TypeError("target must be an object");
|
|
345
|
+
t ||= new FormData(), n = U.toFlatObject(n, {
|
|
346
346
|
metaTokens: !0,
|
|
347
347
|
dots: !1,
|
|
348
348
|
indexes: !1
|
|
349
349
|
}, !1, function(e, t) {
|
|
350
|
-
return !
|
|
350
|
+
return !U.isUndefined(t[e]);
|
|
351
351
|
});
|
|
352
|
-
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 &&
|
|
353
|
-
if (!
|
|
352
|
+
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);
|
|
353
|
+
if (!U.isFunction(i)) throw TypeError("visitor must be a function");
|
|
354
354
|
function u(e) {
|
|
355
355
|
if (e === null) return "";
|
|
356
|
-
if (
|
|
357
|
-
if (
|
|
358
|
-
if (!l &&
|
|
359
|
-
return
|
|
356
|
+
if (U.isDate(e)) return e.toISOString();
|
|
357
|
+
if (U.isBoolean(e)) return e.toString();
|
|
358
|
+
if (!l && U.isBlob(e)) throw new W("Blob is not supported. Use a Buffer instead.");
|
|
359
|
+
return U.isArrayBuffer(e) || U.isTypedArray(e) ? l && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
360
360
|
}
|
|
361
361
|
function d(e, n, i) {
|
|
362
362
|
let s = e;
|
|
363
|
-
if (
|
|
363
|
+
if (U.isReactNative(t) && U.isReactNativeBlob(e)) return t.append(ct(i, n, a), u(e)), !1;
|
|
364
364
|
if (e && !i && typeof e == "object") {
|
|
365
|
-
if (
|
|
366
|
-
else if (
|
|
367
|
-
!(
|
|
365
|
+
if (U.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
366
|
+
else if (U.isArray(e) && lt(e) || (U.isFileList(e) || U.endsWith(n, "[]")) && (s = U.toArray(e))) return n = st(n), s.forEach(function(e, r) {
|
|
367
|
+
!(U.isUndefined(e) || e === null) && t.append(o === !0 ? ct([n], r, a) : o === null ? n : n + "[]", u(e));
|
|
368
368
|
}), !1;
|
|
369
369
|
}
|
|
370
|
-
return
|
|
370
|
+
return ot(e) ? !0 : (t.append(ct(i, n, a), u(e)), !1);
|
|
371
371
|
}
|
|
372
|
-
let f = [], p = Object.assign(
|
|
372
|
+
let f = [], p = Object.assign(ut, {
|
|
373
373
|
defaultVisitor: d,
|
|
374
374
|
convertValue: u,
|
|
375
|
-
isVisitable:
|
|
375
|
+
isVisitable: ot
|
|
376
376
|
});
|
|
377
377
|
function m(e, n, r = 0) {
|
|
378
|
-
if (!
|
|
379
|
-
if (r > c) throw new
|
|
378
|
+
if (!U.isUndefined(e)) {
|
|
379
|
+
if (r > c) throw new W("Object is too deeply nested (" + r + " levels). Max depth: " + c, W.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
380
380
|
if (f.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
381
|
-
f.push(e),
|
|
382
|
-
(!(
|
|
381
|
+
f.push(e), U.forEach(e, function(e, a) {
|
|
382
|
+
(!(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);
|
|
383
383
|
}), f.pop();
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
if (!
|
|
386
|
+
if (!U.isObject(e)) throw TypeError("data must be an object");
|
|
387
387
|
return m(e), t;
|
|
388
388
|
}
|
|
389
389
|
//#endregion
|
|
390
390
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
391
|
-
function
|
|
391
|
+
function ft(e) {
|
|
392
392
|
let t = {
|
|
393
393
|
"!": "%21",
|
|
394
394
|
"'": "%27",
|
|
@@ -401,29 +401,29 @@ function dt(e) {
|
|
|
401
401
|
return t[e];
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
this._pairs = [], e &&
|
|
404
|
+
function pt(e, t) {
|
|
405
|
+
this._pairs = [], e && dt(e, this, t);
|
|
406
406
|
}
|
|
407
|
-
var
|
|
408
|
-
|
|
407
|
+
var mt = pt.prototype;
|
|
408
|
+
mt.append = function(e, t) {
|
|
409
409
|
this._pairs.push([e, t]);
|
|
410
|
-
},
|
|
410
|
+
}, mt.toString = function(e) {
|
|
411
411
|
let t = e ? function(t) {
|
|
412
|
-
return e.call(this, t,
|
|
413
|
-
} :
|
|
412
|
+
return e.call(this, t, ft);
|
|
413
|
+
} : ft;
|
|
414
414
|
return this._pairs.map(function(e) {
|
|
415
415
|
return t(e[0]) + "=" + t(e[1]);
|
|
416
416
|
}, "").join("&");
|
|
417
417
|
};
|
|
418
418
|
//#endregion
|
|
419
419
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/buildURL.js
|
|
420
|
-
function
|
|
420
|
+
function ht(e) {
|
|
421
421
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function gt(e, t, n) {
|
|
424
424
|
if (!t) return e;
|
|
425
|
-
let r = n && n.encode ||
|
|
426
|
-
if (o = a ? a(t, i) :
|
|
425
|
+
let r = n && n.encode || ht, i = U.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
426
|
+
if (o = a ? a(t, i) : U.isURLSearchParams(t) ? t.toString() : new pt(t, i).toString(r), o) {
|
|
427
427
|
let t = e.indexOf("#");
|
|
428
428
|
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
429
429
|
}
|
|
@@ -431,7 +431,7 @@ function ht(e, t, n) {
|
|
|
431
431
|
}
|
|
432
432
|
//#endregion
|
|
433
433
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/InterceptorManager.js
|
|
434
|
-
var
|
|
434
|
+
var _t = class {
|
|
435
435
|
constructor() {
|
|
436
436
|
this.handlers = [];
|
|
437
437
|
}
|
|
@@ -450,19 +450,19 @@ var gt = class {
|
|
|
450
450
|
this.handlers &&= [];
|
|
451
451
|
}
|
|
452
452
|
forEach(e) {
|
|
453
|
-
|
|
453
|
+
U.forEach(this.handlers, function(t) {
|
|
454
454
|
t !== null && e(t);
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, vt = {
|
|
458
458
|
silentJSONParsing: !0,
|
|
459
459
|
forcedJSONParsing: !0,
|
|
460
460
|
clarifyTimeoutError: !1,
|
|
461
461
|
legacyInterceptorReqResOrdering: !0
|
|
462
|
-
},
|
|
462
|
+
}, yt = {
|
|
463
463
|
isBrowser: !0,
|
|
464
464
|
classes: {
|
|
465
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams :
|
|
465
|
+
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : pt,
|
|
466
466
|
FormData: typeof FormData < "u" ? FormData : null,
|
|
467
467
|
Blob: typeof Blob < "u" ? Blob : null
|
|
468
468
|
},
|
|
@@ -474,99 +474,99 @@ var gt = class {
|
|
|
474
474
|
"url",
|
|
475
475
|
"data"
|
|
476
476
|
]
|
|
477
|
-
},
|
|
478
|
-
hasBrowserEnv: () =>
|
|
479
|
-
hasStandardBrowserEnv: () =>
|
|
480
|
-
hasStandardBrowserWebWorkerEnv: () =>
|
|
481
|
-
navigator: () =>
|
|
482
|
-
origin: () =>
|
|
483
|
-
}),
|
|
477
|
+
}, bt = /* @__PURE__ */ N({
|
|
478
|
+
hasBrowserEnv: () => xt,
|
|
479
|
+
hasStandardBrowserEnv: () => Ct,
|
|
480
|
+
hasStandardBrowserWebWorkerEnv: () => wt,
|
|
481
|
+
navigator: () => St,
|
|
482
|
+
origin: () => Tt
|
|
483
|
+
}), xt = typeof window < "u" && typeof document < "u", St = typeof navigator == "object" && navigator || void 0, Ct = xt && (!St || [
|
|
484
484
|
"ReactNative",
|
|
485
485
|
"NativeScript",
|
|
486
486
|
"NS"
|
|
487
|
-
].indexOf(
|
|
488
|
-
...
|
|
489
|
-
...
|
|
487
|
+
].indexOf(St.product) < 0), wt = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Tt = xt && window.location.href || "http://localhost", G = {
|
|
488
|
+
...bt,
|
|
489
|
+
...yt
|
|
490
490
|
};
|
|
491
491
|
//#endregion
|
|
492
492
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
493
|
-
function
|
|
494
|
-
return
|
|
493
|
+
function Et(e, t) {
|
|
494
|
+
return dt(e, new G.classes.URLSearchParams(), {
|
|
495
495
|
visitor: function(e, t, n, r) {
|
|
496
|
-
return
|
|
496
|
+
return G.isNode && U.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
497
497
|
},
|
|
498
498
|
...t
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
501
|
//#endregion
|
|
502
502
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
503
|
-
function Et(e) {
|
|
504
|
-
return W.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
505
|
-
}
|
|
506
503
|
function Dt(e) {
|
|
504
|
+
return U.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
505
|
+
}
|
|
506
|
+
function Ot(e) {
|
|
507
507
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
508
508
|
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
509
509
|
return t;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function kt(e) {
|
|
512
512
|
function t(e, n, r, i) {
|
|
513
513
|
let a = e[i++];
|
|
514
514
|
if (a === "__proto__") return !0;
|
|
515
515
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
516
|
-
return a = !a &&
|
|
516
|
+
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] = Ot(r[a])), !o);
|
|
517
517
|
}
|
|
518
|
-
if (
|
|
518
|
+
if (U.isFormData(e) && U.isFunction(e.entries)) {
|
|
519
519
|
let n = {};
|
|
520
|
-
return
|
|
521
|
-
t(
|
|
520
|
+
return U.forEachEntry(e, (e, r) => {
|
|
521
|
+
t(Dt(e), r, n, 0);
|
|
522
522
|
}), n;
|
|
523
523
|
}
|
|
524
524
|
return null;
|
|
525
525
|
}
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/defaults/index.js
|
|
528
|
-
var
|
|
529
|
-
function
|
|
530
|
-
if (
|
|
531
|
-
return (t || JSON.parse)(e),
|
|
528
|
+
var At = (e, t) => e != null && U.hasOwnProp(e, t) ? e[t] : void 0;
|
|
529
|
+
function jt(e, t, n) {
|
|
530
|
+
if (U.isString(e)) try {
|
|
531
|
+
return (t || JSON.parse)(e), U.trim(e);
|
|
532
532
|
} catch (e) {
|
|
533
533
|
if (e.name !== "SyntaxError") throw e;
|
|
534
534
|
}
|
|
535
535
|
return (n || JSON.stringify)(e);
|
|
536
536
|
}
|
|
537
|
-
var
|
|
538
|
-
transitional:
|
|
537
|
+
var Mt = {
|
|
538
|
+
transitional: vt,
|
|
539
539
|
adapter: [
|
|
540
540
|
"xhr",
|
|
541
541
|
"http",
|
|
542
542
|
"fetch"
|
|
543
543
|
],
|
|
544
544
|
transformRequest: [function(e, t) {
|
|
545
|
-
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i =
|
|
546
|
-
if (i &&
|
|
547
|
-
if (
|
|
548
|
-
if (
|
|
549
|
-
if (
|
|
545
|
+
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = U.isObject(e);
|
|
546
|
+
if (i && U.isHTMLForm(e) && (e = new FormData(e)), U.isFormData(e)) return r ? JSON.stringify(kt(e)) : e;
|
|
547
|
+
if (U.isArrayBuffer(e) || U.isBuffer(e) || U.isStream(e) || U.isFile(e) || U.isBlob(e) || U.isReadableStream(e)) return e;
|
|
548
|
+
if (U.isArrayBufferView(e)) return e.buffer;
|
|
549
|
+
if (U.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
550
550
|
let a;
|
|
551
551
|
if (i) {
|
|
552
|
-
let t =
|
|
553
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return
|
|
554
|
-
if ((a =
|
|
555
|
-
let n =
|
|
556
|
-
return
|
|
552
|
+
let t = At(this, "formSerializer");
|
|
553
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Et(e, t).toString();
|
|
554
|
+
if ((a = U.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
555
|
+
let n = At(this, "env"), r = n && n.FormData;
|
|
556
|
+
return dt(a ? { "files[]": e } : e, r && new r(), t);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
559
|
+
return i || r ? (t.setContentType("application/json", !1), jt(e)) : e;
|
|
560
560
|
}],
|
|
561
561
|
transformResponse: [function(e) {
|
|
562
|
-
let t =
|
|
563
|
-
if (
|
|
564
|
-
if (e &&
|
|
562
|
+
let t = At(this, "transitional") || Mt.transitional, n = t && t.forcedJSONParsing, r = At(this, "responseType"), i = r === "json";
|
|
563
|
+
if (U.isResponse(e) || U.isReadableStream(e)) return e;
|
|
564
|
+
if (e && U.isString(e) && (n && !r || i)) {
|
|
565
565
|
let n = !(t && t.silentJSONParsing) && i;
|
|
566
566
|
try {
|
|
567
|
-
return JSON.parse(e,
|
|
567
|
+
return JSON.parse(e, At(this, "parseReviver"));
|
|
568
568
|
} catch (e) {
|
|
569
|
-
if (n) throw e.name === "SyntaxError" ?
|
|
569
|
+
if (n) throw e.name === "SyntaxError" ? W.from(e, W.ERR_BAD_RESPONSE, this, null, At(this, "response")) : e;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
return e;
|
|
@@ -577,8 +577,8 @@ var jt = {
|
|
|
577
577
|
maxContentLength: -1,
|
|
578
578
|
maxBodyLength: -1,
|
|
579
579
|
env: {
|
|
580
|
-
FormData:
|
|
581
|
-
Blob:
|
|
580
|
+
FormData: G.classes.FormData,
|
|
581
|
+
Blob: G.classes.Blob
|
|
582
582
|
},
|
|
583
583
|
validateStatus: function(e) {
|
|
584
584
|
return e >= 200 && e < 300;
|
|
@@ -588,7 +588,7 @@ var jt = {
|
|
|
588
588
|
"Content-Type": void 0
|
|
589
589
|
} }
|
|
590
590
|
};
|
|
591
|
-
|
|
591
|
+
U.forEach([
|
|
592
592
|
"delete",
|
|
593
593
|
"get",
|
|
594
594
|
"head",
|
|
@@ -596,11 +596,11 @@ W.forEach([
|
|
|
596
596
|
"put",
|
|
597
597
|
"patch"
|
|
598
598
|
], (e) => {
|
|
599
|
-
|
|
599
|
+
Mt.headers[e] = {};
|
|
600
600
|
});
|
|
601
601
|
//#endregion
|
|
602
602
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/parseHeaders.js
|
|
603
|
-
var
|
|
603
|
+
var Nt = U.toObjectSet([
|
|
604
604
|
"age",
|
|
605
605
|
"authorization",
|
|
606
606
|
"content-length",
|
|
@@ -618,13 +618,13 @@ var Mt = W.toObjectSet([
|
|
|
618
618
|
"referer",
|
|
619
619
|
"retry-after",
|
|
620
620
|
"user-agent"
|
|
621
|
-
]),
|
|
621
|
+
]), Pt = (e) => {
|
|
622
622
|
let t = {}, n, r, i;
|
|
623
623
|
return e && e.split("\n").forEach(function(e) {
|
|
624
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] &&
|
|
624
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && Nt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
625
625
|
}), t;
|
|
626
|
-
},
|
|
627
|
-
function
|
|
626
|
+
}, Ft = Symbol("internals"), It = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
627
|
+
function Lt(e) {
|
|
628
628
|
let t = 0, n = e.length;
|
|
629
629
|
for (; t < n;) {
|
|
630
630
|
let n = e.charCodeAt(t);
|
|
@@ -638,33 +638,33 @@ function It(e) {
|
|
|
638
638
|
}
|
|
639
639
|
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
640
640
|
}
|
|
641
|
-
function Lt(e) {
|
|
642
|
-
return e && String(e).trim().toLowerCase();
|
|
643
|
-
}
|
|
644
641
|
function Rt(e) {
|
|
645
|
-
return
|
|
642
|
+
return e && String(e).trim().toLowerCase();
|
|
646
643
|
}
|
|
647
644
|
function zt(e) {
|
|
648
|
-
return
|
|
645
|
+
return Lt(e.replace(It, ""));
|
|
649
646
|
}
|
|
650
647
|
function Bt(e) {
|
|
648
|
+
return e === !1 || e == null ? e : U.isArray(e) ? e.map(Bt) : zt(String(e));
|
|
649
|
+
}
|
|
650
|
+
function Vt(e) {
|
|
651
651
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
652
652
|
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
653
653
|
return t;
|
|
654
654
|
}
|
|
655
|
-
var
|
|
656
|
-
function
|
|
657
|
-
if (
|
|
658
|
-
if (i && (t = n),
|
|
659
|
-
if (
|
|
660
|
-
if (
|
|
655
|
+
var Ht = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
656
|
+
function Ut(e, t, n, r, i) {
|
|
657
|
+
if (U.isFunction(r)) return r.call(this, t, n);
|
|
658
|
+
if (i && (t = n), U.isString(t)) {
|
|
659
|
+
if (U.isString(r)) return t.indexOf(r) !== -1;
|
|
660
|
+
if (U.isRegExp(r)) return r.test(t);
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Wt(e) {
|
|
664
664
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
let n =
|
|
666
|
+
function Gt(e, t) {
|
|
667
|
+
let n = U.toCamelCase(" " + t);
|
|
668
668
|
[
|
|
669
669
|
"get",
|
|
670
670
|
"set",
|
|
@@ -678,79 +678,79 @@ function Wt(e, t) {
|
|
|
678
678
|
});
|
|
679
679
|
});
|
|
680
680
|
}
|
|
681
|
-
var
|
|
681
|
+
var K = class {
|
|
682
682
|
constructor(e) {
|
|
683
683
|
e && this.set(e);
|
|
684
684
|
}
|
|
685
685
|
set(e, t, n) {
|
|
686
686
|
let r = this;
|
|
687
687
|
function i(e, t, n) {
|
|
688
|
-
let i =
|
|
688
|
+
let i = Rt(t);
|
|
689
689
|
if (!i) throw Error("header name must be a non-empty string");
|
|
690
|
-
let a =
|
|
691
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] =
|
|
690
|
+
let a = U.findKey(r, i);
|
|
691
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = Bt(e));
|
|
692
692
|
}
|
|
693
|
-
let a = (e, t) =>
|
|
694
|
-
if (
|
|
695
|
-
else if (
|
|
696
|
-
else if (
|
|
693
|
+
let a = (e, t) => U.forEach(e, (e, n) => i(e, n, t));
|
|
694
|
+
if (U.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
695
|
+
else if (U.isString(e) && (e = e.trim()) && !Ht(e)) a(Pt(e), t);
|
|
696
|
+
else if (U.isObject(e) && U.isIterable(e)) {
|
|
697
697
|
let n = {}, r, i;
|
|
698
698
|
for (let t of e) {
|
|
699
|
-
if (!
|
|
700
|
-
n[i = t[0]] = (r = n[i]) ?
|
|
699
|
+
if (!U.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
700
|
+
n[i = t[0]] = (r = n[i]) ? U.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
701
701
|
}
|
|
702
702
|
a(n, t);
|
|
703
703
|
} else e != null && i(t, e, n);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(e, t) {
|
|
707
|
-
if (e =
|
|
708
|
-
let n =
|
|
707
|
+
if (e = Rt(e), e) {
|
|
708
|
+
let n = U.findKey(this, e);
|
|
709
709
|
if (n) {
|
|
710
710
|
let e = this[n];
|
|
711
711
|
if (!t) return e;
|
|
712
|
-
if (t === !0) return
|
|
713
|
-
if (
|
|
714
|
-
if (
|
|
712
|
+
if (t === !0) return Vt(e);
|
|
713
|
+
if (U.isFunction(t)) return t.call(this, e, n);
|
|
714
|
+
if (U.isRegExp(t)) return t.exec(e);
|
|
715
715
|
throw TypeError("parser must be boolean|regexp|function");
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
719
|
has(e, t) {
|
|
720
|
-
if (e =
|
|
721
|
-
let n =
|
|
722
|
-
return !!(n && this[n] !== void 0 && (!t ||
|
|
720
|
+
if (e = Rt(e), e) {
|
|
721
|
+
let n = U.findKey(this, e);
|
|
722
|
+
return !!(n && this[n] !== void 0 && (!t || Ut(this, this[n], n, t)));
|
|
723
723
|
}
|
|
724
724
|
return !1;
|
|
725
725
|
}
|
|
726
726
|
delete(e, t) {
|
|
727
727
|
let n = this, r = !1;
|
|
728
728
|
function i(e) {
|
|
729
|
-
if (e =
|
|
730
|
-
let i =
|
|
731
|
-
i && (!t ||
|
|
729
|
+
if (e = Rt(e), e) {
|
|
730
|
+
let i = U.findKey(n, e);
|
|
731
|
+
i && (!t || Ut(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
|
-
return
|
|
734
|
+
return U.isArray(e) ? e.forEach(i) : i(e), r;
|
|
735
735
|
}
|
|
736
736
|
clear(e) {
|
|
737
737
|
let t = Object.keys(this), n = t.length, r = !1;
|
|
738
738
|
for (; n--;) {
|
|
739
739
|
let i = t[n];
|
|
740
|
-
(!e ||
|
|
740
|
+
(!e || Ut(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
741
741
|
}
|
|
742
742
|
return r;
|
|
743
743
|
}
|
|
744
744
|
normalize(e) {
|
|
745
745
|
let t = this, n = {};
|
|
746
|
-
return
|
|
747
|
-
let a =
|
|
746
|
+
return U.forEach(this, (r, i) => {
|
|
747
|
+
let a = U.findKey(n, i);
|
|
748
748
|
if (a) {
|
|
749
|
-
t[a] =
|
|
749
|
+
t[a] = Bt(r), delete t[i];
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
let o = e ?
|
|
753
|
-
o !== i && delete t[i], t[o] =
|
|
752
|
+
let o = e ? Wt(i) : String(i).trim();
|
|
753
|
+
o !== i && delete t[i], t[o] = Bt(r), n[o] = !0;
|
|
754
754
|
}), this;
|
|
755
755
|
}
|
|
756
756
|
concat(...e) {
|
|
@@ -758,8 +758,8 @@ var Gt = class {
|
|
|
758
758
|
}
|
|
759
759
|
toJSON(e) {
|
|
760
760
|
let t = Object.create(null);
|
|
761
|
-
return
|
|
762
|
-
n != null && n !== !1 && (t[r] = e &&
|
|
761
|
+
return U.forEach(this, (n, r) => {
|
|
762
|
+
n != null && n !== !1 && (t[r] = e && U.isArray(n) ? n.join(", ") : n);
|
|
763
763
|
}), t;
|
|
764
764
|
}
|
|
765
765
|
[Symbol.iterator]() {
|
|
@@ -782,22 +782,22 @@ var Gt = class {
|
|
|
782
782
|
return t.forEach((e) => n.set(e)), n;
|
|
783
783
|
}
|
|
784
784
|
static accessor(e) {
|
|
785
|
-
let t = (this[
|
|
785
|
+
let t = (this[Ft] = this[Ft] = { accessors: {} }).accessors, n = this.prototype;
|
|
786
786
|
function r(e) {
|
|
787
|
-
let r =
|
|
788
|
-
t[r] || (
|
|
787
|
+
let r = Rt(e);
|
|
788
|
+
t[r] || (Gt(n, e), t[r] = !0);
|
|
789
789
|
}
|
|
790
|
-
return
|
|
790
|
+
return U.isArray(e) ? e.forEach(r) : r(e), this;
|
|
791
791
|
}
|
|
792
792
|
};
|
|
793
|
-
|
|
793
|
+
K.accessor([
|
|
794
794
|
"Content-Type",
|
|
795
795
|
"Content-Length",
|
|
796
796
|
"Accept",
|
|
797
797
|
"Accept-Encoding",
|
|
798
798
|
"User-Agent",
|
|
799
799
|
"Authorization"
|
|
800
|
-
]),
|
|
800
|
+
]), U.reduceDescriptors(K.prototype, ({ value: e }, t) => {
|
|
801
801
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
802
802
|
return {
|
|
803
803
|
get: () => e,
|
|
@@ -805,12 +805,12 @@ Gt.accessor([
|
|
|
805
805
|
this[n] = e;
|
|
806
806
|
}
|
|
807
807
|
};
|
|
808
|
-
}),
|
|
808
|
+
}), U.freezeMethods(K);
|
|
809
809
|
//#endregion
|
|
810
810
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/transformData.js
|
|
811
811
|
function Kt(e, t) {
|
|
812
|
-
let n = this ||
|
|
813
|
-
return
|
|
812
|
+
let n = this || Mt, r = t || n, i = K.from(r.headers), a = r.data;
|
|
813
|
+
return U.forEach(e, function(e) {
|
|
814
814
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
815
815
|
}), i.normalize(), a;
|
|
816
816
|
}
|
|
@@ -821,16 +821,16 @@ function qt(e) {
|
|
|
821
821
|
}
|
|
822
822
|
//#endregion
|
|
823
823
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/cancel/CanceledError.js
|
|
824
|
-
var Jt = class extends
|
|
824
|
+
var Jt = class extends W {
|
|
825
825
|
constructor(e, t, n) {
|
|
826
|
-
super(e ?? "canceled",
|
|
826
|
+
super(e ?? "canceled", W.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
827
827
|
}
|
|
828
828
|
};
|
|
829
829
|
//#endregion
|
|
830
830
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/settle.js
|
|
831
831
|
function Yt(e, t, n) {
|
|
832
832
|
let r = n.config.validateStatus;
|
|
833
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
833
|
+
!n.status || !r || r(n.status) ? e(n) : t(new W("Request failed with status code " + n.status, [W.ERR_BAD_REQUEST, W.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
834
834
|
}
|
|
835
835
|
//#endregion
|
|
836
836
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/parseProtocol.js
|
|
@@ -891,11 +891,11 @@ var $t = (e, t, n = 3) => {
|
|
|
891
891
|
total: e,
|
|
892
892
|
loaded: r
|
|
893
893
|
}), t[1]];
|
|
894
|
-
}, tn = (e) => (...t) =>
|
|
894
|
+
}, tn = (e) => (...t) => U.asap(() => e(...t)), nn = G.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, G.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(G.origin), G.navigator && /(msie|trident)/i.test(G.navigator.userAgent)) : () => !0, rn = G.hasStandardBrowserEnv ? {
|
|
895
895
|
write(e, t, n, r, i, a, o) {
|
|
896
896
|
if (typeof document > "u") return;
|
|
897
897
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
898
|
-
|
|
898
|
+
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("; ");
|
|
899
899
|
},
|
|
900
900
|
read(e) {
|
|
901
901
|
if (typeof document > "u") return null;
|
|
@@ -930,7 +930,7 @@ function sn(e, t, n) {
|
|
|
930
930
|
}
|
|
931
931
|
//#endregion
|
|
932
932
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/mergeConfig.js
|
|
933
|
-
var cn = (e) => e instanceof
|
|
933
|
+
var cn = (e) => e instanceof K ? { ...e } : e;
|
|
934
934
|
function ln(e, t) {
|
|
935
935
|
t ||= {};
|
|
936
936
|
let n = Object.create(null);
|
|
@@ -941,22 +941,22 @@ function ln(e, t) {
|
|
|
941
941
|
configurable: !0
|
|
942
942
|
});
|
|
943
943
|
function r(e, t, n, r) {
|
|
944
|
-
return
|
|
944
|
+
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;
|
|
945
945
|
}
|
|
946
946
|
function i(e, t, n, i) {
|
|
947
|
-
if (!
|
|
948
|
-
if (!
|
|
947
|
+
if (!U.isUndefined(t)) return r(e, t, n, i);
|
|
948
|
+
if (!U.isUndefined(e)) return r(void 0, e, n, i);
|
|
949
949
|
}
|
|
950
950
|
function a(e, t) {
|
|
951
|
-
if (!
|
|
951
|
+
if (!U.isUndefined(t)) return r(void 0, t);
|
|
952
952
|
}
|
|
953
953
|
function o(e, t) {
|
|
954
|
-
if (!
|
|
955
|
-
if (!
|
|
954
|
+
if (!U.isUndefined(t)) return r(void 0, t);
|
|
955
|
+
if (!U.isUndefined(e)) return r(void 0, e);
|
|
956
956
|
}
|
|
957
957
|
function s(n, i, a) {
|
|
958
|
-
if (
|
|
959
|
-
if (
|
|
958
|
+
if (U.hasOwnProp(t, a)) return r(n, i);
|
|
959
|
+
if (U.hasOwnProp(e, a)) return r(void 0, n);
|
|
960
960
|
}
|
|
961
961
|
let c = {
|
|
962
962
|
url: a,
|
|
@@ -990,36 +990,36 @@ function ln(e, t) {
|
|
|
990
990
|
validateStatus: s,
|
|
991
991
|
headers: (e, t, n) => i(cn(e), cn(t), n, !0)
|
|
992
992
|
};
|
|
993
|
-
return
|
|
993
|
+
return U.forEach(Object.keys({
|
|
994
994
|
...e,
|
|
995
995
|
...t
|
|
996
996
|
}), function(r) {
|
|
997
997
|
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
998
|
-
let a =
|
|
999
|
-
|
|
998
|
+
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);
|
|
999
|
+
U.isUndefined(o) && a !== s || (n[r] = o);
|
|
1000
1000
|
}), n;
|
|
1001
1001
|
}
|
|
1002
1002
|
//#endregion
|
|
1003
1003
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/resolveConfig.js
|
|
1004
1004
|
var un = (e) => {
|
|
1005
|
-
let t = ln({}, e), n = (e) =>
|
|
1006
|
-
if (t.headers = s =
|
|
1007
|
-
if (
|
|
1008
|
-
else if (
|
|
1005
|
+
let t = ln({}, 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");
|
|
1006
|
+
if (t.headers = s = K.from(s), t.url = gt(sn(l, d, u), e.params, e.paramsSerializer), c && s.set("Authorization", "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))), U.isFormData(r)) {
|
|
1007
|
+
if (G.hasStandardBrowserEnv || G.hasStandardBrowserWebWorkerEnv) s.setContentType(void 0);
|
|
1008
|
+
else if (U.isFunction(r.getHeaders)) {
|
|
1009
1009
|
let e = r.getHeaders(), t = ["content-type", "content-length"];
|
|
1010
1010
|
Object.entries(e).forEach(([e, n]) => {
|
|
1011
1011
|
t.includes(e.toLowerCase()) && s.set(e, n);
|
|
1012
1012
|
});
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
|
-
if (
|
|
1015
|
+
if (G.hasStandardBrowserEnv && (U.isFunction(i) && (i = i(t)), i === !0 || i == null && nn(t.url))) {
|
|
1016
1016
|
let e = a && o && rn.read(o);
|
|
1017
1017
|
e && s.set(a, e);
|
|
1018
1018
|
}
|
|
1019
1019
|
return t;
|
|
1020
1020
|
}, dn = typeof XMLHttpRequest < "u" && function(e) {
|
|
1021
1021
|
return new Promise(function(t, n) {
|
|
1022
|
-
let r = un(e), i = r.data, a =
|
|
1022
|
+
let r = un(e), i = r.data, a = K.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1023
1023
|
function m() {
|
|
1024
1024
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1025
1025
|
}
|
|
@@ -1027,7 +1027,7 @@ var un = (e) => {
|
|
|
1027
1027
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1028
1028
|
function g() {
|
|
1029
1029
|
if (!h) return;
|
|
1030
|
-
let r =
|
|
1030
|
+
let r = K.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1031
1031
|
Yt(function(e) {
|
|
1032
1032
|
t(e), m();
|
|
1033
1033
|
}, function(e) {
|
|
@@ -1044,21 +1044,21 @@ var un = (e) => {
|
|
|
1044
1044
|
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
1045
1045
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1046
1046
|
}, h.onabort = function() {
|
|
1047
|
-
h &&= (n(new
|
|
1047
|
+
h &&= (n(new W("Request aborted", W.ECONNABORTED, e, h)), null);
|
|
1048
1048
|
}, h.onerror = function(t) {
|
|
1049
|
-
let r = new
|
|
1049
|
+
let r = new W(t && t.message ? t.message : "Network Error", W.ERR_NETWORK, e, h);
|
|
1050
1050
|
r.event = t || null, n(r), h = null;
|
|
1051
1051
|
}, h.ontimeout = function() {
|
|
1052
|
-
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional ||
|
|
1053
|
-
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new
|
|
1054
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h &&
|
|
1052
|
+
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || vt;
|
|
1053
|
+
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new W(t, i.clarifyTimeoutError ? W.ETIMEDOUT : W.ECONNABORTED, e, h)), h = null;
|
|
1054
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && U.forEach(a.toJSON(), function(e, t) {
|
|
1055
1055
|
h.setRequestHeader(t, e);
|
|
1056
|
-
}),
|
|
1056
|
+
}), U.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = $t(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = $t(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1057
1057
|
h &&= (n(!t || t.type ? new Jt(null, e, h) : t), h.abort(), null);
|
|
1058
1058
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1059
1059
|
let _ = Xt(r.url);
|
|
1060
|
-
if (_ &&
|
|
1061
|
-
n(new
|
|
1060
|
+
if (_ && G.protocols.indexOf(_) === -1) {
|
|
1061
|
+
n(new W("Unsupported protocol " + _ + ":", W.ERR_BAD_REQUEST, e));
|
|
1062
1062
|
return;
|
|
1063
1063
|
}
|
|
1064
1064
|
h.send(i || null);
|
|
@@ -1070,10 +1070,10 @@ var un = (e) => {
|
|
|
1070
1070
|
if (!r) {
|
|
1071
1071
|
r = !0, o();
|
|
1072
1072
|
let t = e instanceof Error ? e : this.reason;
|
|
1073
|
-
n.abort(t instanceof
|
|
1073
|
+
n.abort(t instanceof W ? t : new Jt(t instanceof Error ? t.message : t));
|
|
1074
1074
|
}
|
|
1075
1075
|
}, a = t && setTimeout(() => {
|
|
1076
|
-
a = null, i(new
|
|
1076
|
+
a = null, i(new W(`timeout of ${t}ms exceeded`, W.ETIMEDOUT));
|
|
1077
1077
|
}, t), o = () => {
|
|
1078
1078
|
e &&= (a && clearTimeout(a), a = null, e.forEach((e) => {
|
|
1079
1079
|
e.unsubscribe ? e.unsubscribe(i) : e.removeEventListener("abort", i);
|
|
@@ -1081,7 +1081,7 @@ var un = (e) => {
|
|
|
1081
1081
|
};
|
|
1082
1082
|
e.forEach((e) => e.addEventListener("abort", i));
|
|
1083
1083
|
let { signal: s } = n;
|
|
1084
|
-
return s.unsubscribe = () =>
|
|
1084
|
+
return s.unsubscribe = () => U.asap(o), s;
|
|
1085
1085
|
}
|
|
1086
1086
|
}, pn = function* (e, t) {
|
|
1087
1087
|
let n = e.byteLength;
|
|
@@ -1130,21 +1130,21 @@ var un = (e) => {
|
|
|
1130
1130
|
return s(e), i.return();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, { highWaterMark: 2 });
|
|
1133
|
-
}, _n = 64 * 1024, { isFunction: vn } =
|
|
1133
|
+
}, _n = 64 * 1024, { isFunction: vn } = U, yn = (({ Request: e, Response: t }) => ({
|
|
1134
1134
|
Request: e,
|
|
1135
1135
|
Response: t
|
|
1136
|
-
}))(
|
|
1136
|
+
}))(U.global), { ReadableStream: bn, TextEncoder: xn } = U.global, Sn = (e, ...t) => {
|
|
1137
1137
|
try {
|
|
1138
1138
|
return !!e(...t);
|
|
1139
1139
|
} catch {
|
|
1140
1140
|
return !1;
|
|
1141
1141
|
}
|
|
1142
1142
|
}, Cn = (e) => {
|
|
1143
|
-
e =
|
|
1143
|
+
e = U.merge.call({ skipUndefined: !0 }, yn, e);
|
|
1144
1144
|
let { fetch: t, Request: n, Response: r } = e, i = t ? vn(t) : typeof fetch == "function", a = vn(n), o = vn(r);
|
|
1145
1145
|
if (!i) return !1;
|
|
1146
1146
|
let s = i && vn(bn), c = i && (typeof xn == "function" ? ((e) => (t) => e.encode(t))(new xn()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && Sn(() => {
|
|
1147
|
-
let e = !1, t = new n(
|
|
1147
|
+
let e = !1, t = new n(G.origin, {
|
|
1148
1148
|
body: new bn(),
|
|
1149
1149
|
method: "POST",
|
|
1150
1150
|
get duplex() {
|
|
@@ -1152,7 +1152,7 @@ var un = (e) => {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}), r = t.headers.has("Content-Type");
|
|
1154
1154
|
return t.body != null && t.body.cancel(), e && !r;
|
|
1155
|
-
}), u = o && s && Sn(() =>
|
|
1155
|
+
}), u = o && s && Sn(() => U.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1156
1156
|
i && [
|
|
1157
1157
|
"text",
|
|
1158
1158
|
"arrayBuffer",
|
|
@@ -1163,19 +1163,19 @@ var un = (e) => {
|
|
|
1163
1163
|
!d[e] && (d[e] = (t, n) => {
|
|
1164
1164
|
let r = t && t[e];
|
|
1165
1165
|
if (r) return r.call(t);
|
|
1166
|
-
throw new
|
|
1166
|
+
throw new W(`Response type '${e}' is not supported`, W.ERR_NOT_SUPPORT, n);
|
|
1167
1167
|
});
|
|
1168
1168
|
});
|
|
1169
1169
|
let f = async (e) => {
|
|
1170
1170
|
if (e == null) return 0;
|
|
1171
|
-
if (
|
|
1172
|
-
if (
|
|
1171
|
+
if (U.isBlob(e)) return e.size;
|
|
1172
|
+
if (U.isSpecCompliantForm(e)) return (await new n(G.origin, {
|
|
1173
1173
|
method: "POST",
|
|
1174
1174
|
body: e
|
|
1175
1175
|
}).arrayBuffer()).byteLength;
|
|
1176
|
-
if (
|
|
1177
|
-
if (
|
|
1178
|
-
}, p = async (e, t) =>
|
|
1176
|
+
if (U.isArrayBufferView(e) || U.isArrayBuffer(e)) return e.byteLength;
|
|
1177
|
+
if (U.isURLSearchParams(e) && (e += ""), U.isString(e)) return (await c(e)).byteLength;
|
|
1178
|
+
}, p = async (e, t) => U.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1179
1179
|
return async (e) => {
|
|
1180
1180
|
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } = un(e), x = t || fetch;
|
|
1181
1181
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
@@ -1189,14 +1189,14 @@ var un = (e) => {
|
|
|
1189
1189
|
body: s,
|
|
1190
1190
|
duplex: "half"
|
|
1191
1191
|
}), t;
|
|
1192
|
-
if (
|
|
1192
|
+
if (U.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1193
1193
|
let [t, n] = en(T, $t(tn(g)));
|
|
1194
1194
|
s = gn(e.body, _n, t, n);
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
|
|
1197
|
+
U.isString(y) || (y = y ? "include" : "omit");
|
|
1198
1198
|
let t = a && "credentials" in n.prototype;
|
|
1199
|
-
if (
|
|
1199
|
+
if (U.isFormData(s)) {
|
|
1200
1200
|
let e = v.getContentType();
|
|
1201
1201
|
e && /^multipart\/form-data/i.test(e) && !/boundary=/i.test(e) && v.delete("content-type");
|
|
1202
1202
|
}
|
|
@@ -1220,17 +1220,17 @@ var un = (e) => {
|
|
|
1220
1220
|
].forEach((t) => {
|
|
1221
1221
|
e[t] = f[t];
|
|
1222
1222
|
});
|
|
1223
|
-
let t =
|
|
1223
|
+
let t = U.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && en(t, $t(tn(h), !0)) || [];
|
|
1224
1224
|
f = new r(gn(f.body, _n, n, () => {
|
|
1225
1225
|
i && i(), w && w();
|
|
1226
1226
|
}), e);
|
|
1227
1227
|
}
|
|
1228
1228
|
_ ||= "text";
|
|
1229
|
-
let E = await d[
|
|
1229
|
+
let E = await d[U.findKey(d, _) || "text"](f, e);
|
|
1230
1230
|
return !m && w && w(), await new Promise((t, n) => {
|
|
1231
1231
|
Yt(t, n, {
|
|
1232
1232
|
data: E,
|
|
1233
|
-
headers:
|
|
1233
|
+
headers: K.from(f.headers),
|
|
1234
1234
|
status: f.status,
|
|
1235
1235
|
statusText: f.statusText,
|
|
1236
1236
|
config: e,
|
|
@@ -1238,7 +1238,7 @@ var un = (e) => {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
});
|
|
1240
1240
|
} catch (t) {
|
|
1241
|
-
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new
|
|
1241
|
+
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new W("Network Error", W.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : W.from(t, t && t.code, e, C, t && t.response);
|
|
1242
1242
|
}
|
|
1243
1243
|
};
|
|
1244
1244
|
}, wn = /* @__PURE__ */ new Map(), Tn = (e) => {
|
|
@@ -1258,7 +1258,7 @@ var En = {
|
|
|
1258
1258
|
xhr: dn,
|
|
1259
1259
|
fetch: { get: Tn }
|
|
1260
1260
|
};
|
|
1261
|
-
|
|
1261
|
+
U.forEach(En, (e, t) => {
|
|
1262
1262
|
if (e) {
|
|
1263
1263
|
try {
|
|
1264
1264
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1266,20 +1266,20 @@ W.forEach(En, (e, t) => {
|
|
|
1266
1266
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1267
1267
|
}
|
|
1268
1268
|
});
|
|
1269
|
-
var Dn = (e) => `- ${e}`, On = (e) =>
|
|
1269
|
+
var Dn = (e) => `- ${e}`, On = (e) => U.isFunction(e) || e === null || e === !1;
|
|
1270
1270
|
function kn(e, t) {
|
|
1271
|
-
e =
|
|
1271
|
+
e = U.isArray(e) ? e : [e];
|
|
1272
1272
|
let { length: n } = e, r, i, a = {};
|
|
1273
1273
|
for (let o = 0; o < n; o++) {
|
|
1274
1274
|
r = e[o];
|
|
1275
1275
|
let n;
|
|
1276
|
-
if (i = r, !On(r) && (i = En[(n = String(r)).toLowerCase()], i === void 0)) throw new
|
|
1277
|
-
if (i && (
|
|
1276
|
+
if (i = r, !On(r) && (i = En[(n = String(r)).toLowerCase()], i === void 0)) throw new W(`Unknown adapter '${n}'`);
|
|
1277
|
+
if (i && (U.isFunction(i) || (i = i.get(t)))) break;
|
|
1278
1278
|
a[n || "#" + o] = i;
|
|
1279
1279
|
}
|
|
1280
1280
|
if (!i) {
|
|
1281
1281
|
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1282
|
-
throw new
|
|
1282
|
+
throw new W("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(Dn).join("\n") : " " + Dn(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1283
1283
|
}
|
|
1284
1284
|
return i;
|
|
1285
1285
|
}
|
|
@@ -1293,14 +1293,14 @@ function jn(e) {
|
|
|
1293
1293
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Jt(null, e);
|
|
1294
1294
|
}
|
|
1295
1295
|
function Mn(e) {
|
|
1296
|
-
return jn(e), e.headers =
|
|
1296
|
+
return jn(e), e.headers = K.from(e.headers), e.data = Kt.call(e, e.transformRequest), [
|
|
1297
1297
|
"post",
|
|
1298
1298
|
"put",
|
|
1299
1299
|
"patch"
|
|
1300
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), An.getAdapter(e.adapter ||
|
|
1301
|
-
return jn(e), t.data = Kt.call(e, e.transformResponse, t), t.headers =
|
|
1300
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), An.getAdapter(e.adapter || Mt.adapter, e)(e).then(function(t) {
|
|
1301
|
+
return jn(e), t.data = Kt.call(e, e.transformResponse, t), t.headers = K.from(t.headers), t;
|
|
1302
1302
|
}, function(t) {
|
|
1303
|
-
return qt(t) || (jn(e), t && t.response && (t.response.data = Kt.call(e, e.transformResponse, t.response), t.response.headers =
|
|
1303
|
+
return qt(t) || (jn(e), t && t.response && (t.response.data = Kt.call(e, e.transformResponse, t.response), t.response.headers = K.from(t.response.headers))), Promise.reject(t);
|
|
1304
1304
|
});
|
|
1305
1305
|
}
|
|
1306
1306
|
//#endregion
|
|
@@ -1324,23 +1324,23 @@ Pn.transitional = function(e, t, n) {
|
|
|
1324
1324
|
return "[Axios v" + Nn + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1325
1325
|
}
|
|
1326
1326
|
return (n, i, a) => {
|
|
1327
|
-
if (e === !1) throw new
|
|
1327
|
+
if (e === !1) throw new W(r(i, " has been removed" + (t ? " in " + t : "")), W.ERR_DEPRECATED);
|
|
1328
1328
|
return t && !Fn[i] && (Fn[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1329
1329
|
};
|
|
1330
1330
|
}, Pn.spelling = function(e) {
|
|
1331
1331
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1332
1332
|
};
|
|
1333
1333
|
function In(e, t, n) {
|
|
1334
|
-
if (typeof e != "object") throw new
|
|
1334
|
+
if (typeof e != "object") throw new W("options must be an object", W.ERR_BAD_OPTION_VALUE);
|
|
1335
1335
|
let r = Object.keys(e), i = r.length;
|
|
1336
1336
|
for (; i-- > 0;) {
|
|
1337
1337
|
let a = r[i], o = Object.prototype.hasOwnProperty.call(t, a) ? t[a] : void 0;
|
|
1338
1338
|
if (o) {
|
|
1339
1339
|
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1340
|
-
if (n !== !0) throw new
|
|
1340
|
+
if (n !== !0) throw new W("option " + a + " must be " + n, W.ERR_BAD_OPTION_VALUE);
|
|
1341
1341
|
continue;
|
|
1342
1342
|
}
|
|
1343
|
-
if (n !== !0) throw new
|
|
1343
|
+
if (n !== !0) throw new W("Unknown option " + a, W.ERR_BAD_OPTION);
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
var Ln = {
|
|
@@ -1349,8 +1349,8 @@ var Ln = {
|
|
|
1349
1349
|
}, Rn = Ln.validators, zn = class {
|
|
1350
1350
|
constructor(e) {
|
|
1351
1351
|
this.defaults = e || {}, this.interceptors = {
|
|
1352
|
-
request: new
|
|
1353
|
-
response: new
|
|
1352
|
+
request: new _t(),
|
|
1353
|
+
response: new _t()
|
|
1354
1354
|
};
|
|
1355
1355
|
}
|
|
1356
1356
|
async request(e, t) {
|
|
@@ -1384,15 +1384,15 @@ var Ln = {
|
|
|
1384
1384
|
forcedJSONParsing: Rn.transitional(Rn.boolean),
|
|
1385
1385
|
clarifyTimeoutError: Rn.transitional(Rn.boolean),
|
|
1386
1386
|
legacyInterceptorReqResOrdering: Rn.transitional(Rn.boolean)
|
|
1387
|
-
}, !1), r != null && (
|
|
1387
|
+
}, !1), r != null && (U.isFunction(r) ? t.paramsSerializer = { serialize: r } : Ln.assertOptions(r, {
|
|
1388
1388
|
encode: Rn.function,
|
|
1389
1389
|
serialize: Rn.function
|
|
1390
1390
|
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Ln.assertOptions(t, {
|
|
1391
1391
|
baseUrl: Rn.spelling("baseURL"),
|
|
1392
1392
|
withXsrfToken: Rn.spelling("withXSRFToken")
|
|
1393
1393
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1394
|
-
let a = i &&
|
|
1395
|
-
i &&
|
|
1394
|
+
let a = i && U.merge(i.common, i[t.method]);
|
|
1395
|
+
i && U.forEach([
|
|
1396
1396
|
"delete",
|
|
1397
1397
|
"get",
|
|
1398
1398
|
"head",
|
|
@@ -1402,12 +1402,12 @@ var Ln = {
|
|
|
1402
1402
|
"common"
|
|
1403
1403
|
], (e) => {
|
|
1404
1404
|
delete i[e];
|
|
1405
|
-
}), t.headers =
|
|
1405
|
+
}), t.headers = K.concat(a, i);
|
|
1406
1406
|
let o = [], s = !0;
|
|
1407
1407
|
this.interceptors.request.forEach(function(e) {
|
|
1408
1408
|
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1409
1409
|
s &&= e.synchronous;
|
|
1410
|
-
let n = t.transitional ||
|
|
1410
|
+
let n = t.transitional || vt;
|
|
1411
1411
|
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1412
1412
|
});
|
|
1413
1413
|
let c = [];
|
|
@@ -1440,10 +1440,10 @@ var Ln = {
|
|
|
1440
1440
|
return l;
|
|
1441
1441
|
}
|
|
1442
1442
|
getUri(e) {
|
|
1443
|
-
return e = ln(this.defaults, e),
|
|
1443
|
+
return e = ln(this.defaults, e), gt(sn(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1444
1444
|
}
|
|
1445
1445
|
};
|
|
1446
|
-
|
|
1446
|
+
U.forEach([
|
|
1447
1447
|
"delete",
|
|
1448
1448
|
"get",
|
|
1449
1449
|
"head",
|
|
@@ -1456,7 +1456,7 @@ W.forEach([
|
|
|
1456
1456
|
data: (n || {}).data
|
|
1457
1457
|
}));
|
|
1458
1458
|
};
|
|
1459
|
-
}),
|
|
1459
|
+
}), U.forEach([
|
|
1460
1460
|
"post",
|
|
1461
1461
|
"put",
|
|
1462
1462
|
"patch"
|
|
@@ -1540,7 +1540,7 @@ function Vn(e) {
|
|
|
1540
1540
|
//#endregion
|
|
1541
1541
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/isAxiosError.js
|
|
1542
1542
|
function Hn(e) {
|
|
1543
|
-
return
|
|
1543
|
+
return U.isObject(e) && e.isAxiosError === !0;
|
|
1544
1544
|
}
|
|
1545
1545
|
//#endregion
|
|
1546
1546
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
@@ -1622,14 +1622,14 @@ Object.entries(Un).forEach(([e, t]) => {
|
|
|
1622
1622
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/axios.js
|
|
1623
1623
|
function Wn(e) {
|
|
1624
1624
|
let t = new zn(e), n = te(zn.prototype.request, t);
|
|
1625
|
-
return
|
|
1625
|
+
return U.extend(n, zn.prototype, t, { allOwnKeys: !0 }), U.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1626
1626
|
return Wn(ln(e, t));
|
|
1627
1627
|
}, n;
|
|
1628
1628
|
}
|
|
1629
|
-
var q = Wn(
|
|
1630
|
-
q.Axios = zn, q.CanceledError = Jt, q.CancelToken = Bn, q.isCancel = qt, q.VERSION = Nn, q.toFormData =
|
|
1629
|
+
var q = Wn(Mt);
|
|
1630
|
+
q.Axios = zn, q.CanceledError = Jt, q.CancelToken = Bn, q.isCancel = qt, q.VERSION = Nn, q.toFormData = dt, q.AxiosError = W, q.Cancel = q.CanceledError, q.all = function(e) {
|
|
1631
1631
|
return Promise.all(e);
|
|
1632
|
-
}, q.spread = Vn, q.isAxiosError = Hn, q.mergeConfig = ln, q.AxiosHeaders =
|
|
1632
|
+
}, q.spread = Vn, q.isAxiosError = Hn, q.mergeConfig = ln, q.AxiosHeaders = K, q.formToJSON = (e) => kt(U.isHTMLForm(e) ? new FormData(e) : e), q.getAdapter = An.getAdapter, q.HttpStatusCode = Un, q.default = q;
|
|
1633
1633
|
//#endregion
|
|
1634
1634
|
//#region src/api/data/baostock.ts
|
|
1635
1635
|
function Gn(e) {
|
|
@@ -6832,6 +6832,8 @@ var ia = /* @__PURE__ */ function(e) {
|
|
|
6832
6832
|
function aa(e) {
|
|
6833
6833
|
return {
|
|
6834
6834
|
id: e.id,
|
|
6835
|
+
role: e.role,
|
|
6836
|
+
capabilities: { ...e.capabilities },
|
|
6835
6837
|
top: e.top,
|
|
6836
6838
|
height: e.height,
|
|
6837
6839
|
yAxis: {
|
|
@@ -7117,7 +7119,7 @@ var pa = Symbol("renderer:global-cache"), ma = class {
|
|
|
7117
7119
|
enabledState = /* @__PURE__ */ new Map();
|
|
7118
7120
|
groupCache = /* @__PURE__ */ new Map();
|
|
7119
7121
|
mergedCache = /* @__PURE__ */ new Map();
|
|
7120
|
-
knownPaneIds = new Set(
|
|
7122
|
+
knownPaneIds = /* @__PURE__ */ new Set();
|
|
7121
7123
|
cacheInvalid = !0;
|
|
7122
7124
|
onInvalidate = null;
|
|
7123
7125
|
setInvalidateCallback(e) {
|
|
@@ -7132,8 +7134,8 @@ var pa = Symbol("renderer:global-cache"), ma = class {
|
|
|
7132
7134
|
removeKnownPaneId(e) {
|
|
7133
7135
|
this.knownPaneIds.delete(e), this.cacheInvalid = !0;
|
|
7134
7136
|
}
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
+
setKnownPaneIds(e) {
|
|
7138
|
+
this.knownPaneIds = new Set(e), this.cacheInvalid = !0;
|
|
7137
7139
|
}
|
|
7138
7140
|
register(e) {
|
|
7139
7141
|
if (this.plugins.has(e.name)) {
|
|
@@ -7200,7 +7202,11 @@ var pa = Symbol("renderer:global-cache"), ma = class {
|
|
|
7200
7202
|
getMergedRenderers(e) {
|
|
7201
7203
|
this.rebuildCache();
|
|
7202
7204
|
let t = this.mergedCache.get(e);
|
|
7203
|
-
|
|
7205
|
+
if (!t) {
|
|
7206
|
+
let n = this.groupCache.get(e) ?? [], r = this.groupCache.get(pa) ?? [];
|
|
7207
|
+
t = this.mergeSorted(n, r), this.mergedCache.set(e, t);
|
|
7208
|
+
}
|
|
7209
|
+
return t;
|
|
7204
7210
|
}
|
|
7205
7211
|
getRenderers(e) {
|
|
7206
7212
|
return this.getMergedRenderers(e).filter((e) => e.isSystem ? !1 : this.isRendererEnabled(e));
|
|
@@ -7285,7 +7291,7 @@ function ya() {
|
|
|
7285
7291
|
version: "1.0.0",
|
|
7286
7292
|
description: "自定义标记渲染器",
|
|
7287
7293
|
debugName: "自定义标记",
|
|
7288
|
-
paneId:
|
|
7294
|
+
paneId: oa,
|
|
7289
7295
|
priority: X.OVERLAY,
|
|
7290
7296
|
draw(e) {
|
|
7291
7297
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, kLinePositions: s, markerManager: c } = e;
|
|
@@ -7293,7 +7299,7 @@ function ya() {
|
|
|
7293
7299
|
let l = c.getCustomMarkers();
|
|
7294
7300
|
if (!l || l.length === 0) return;
|
|
7295
7301
|
let u = r;
|
|
7296
|
-
if (u.length && n.
|
|
7302
|
+
if (u.length && n.role === "price") {
|
|
7297
7303
|
t.save(), t.translate(-a, 0);
|
|
7298
7304
|
for (let e of l) {
|
|
7299
7305
|
let r = xa(u, e.timestamp);
|
|
@@ -8154,7 +8160,7 @@ var no = { class: "kline-tooltip__title" }, ro = { key: 0 }, io = { class: "klin
|
|
|
8154
8160
|
], S = y.filter((e) => e.pane === "main"), T = y.filter((e) => e.pane === "sub"), E = u, D = d, O = _(null), k = _(null), A = _(!1), j = _(null), M = _(null), N = _(!1), ee = _({
|
|
8155
8161
|
left: "0",
|
|
8156
8162
|
bottom: "0"
|
|
8157
|
-
}), P = _(null), F = _(null), I = r(() => E.activeIndicators?.length ? E.activeIndicators.map((e) => y.find((t) => t.id === e)).filter((e) => e !== void 0) : []), te = r(() => I.value.find((e) => e.pane === "sub")?.id ?? null), ne = r(() => j.value && y.find((e) => e.id === j.value) || null);
|
|
8163
|
+
}), P = _(null), F = _(null), I = r(() => E.activeIndicators?.length ? E.activeIndicators.map((e) => y.find((t) => t.id === e)).filter((e) => e !== void 0).sort((e, t) => e.pane === t.pane ? 0 : e.pane === "main" ? -1 : 1) : []), te = r(() => I.value.find((e) => e.pane === "sub")?.id ?? null), ne = r(() => j.value && y.find((e) => e.id === j.value) || null);
|
|
8158
8164
|
function L(e) {
|
|
8159
8165
|
return E.activeIndicators?.includes(e) ?? !1;
|
|
8160
8166
|
}
|
|
@@ -8237,13 +8243,13 @@ var no = { class: "kline-tooltip__title" }, ro = { key: 0 }, io = { class: "klin
|
|
|
8237
8243
|
let t = k.value && !k.value.contains(e.target), n = O.value && !O.value.contains(e.target);
|
|
8238
8244
|
t && n && (N.value = !1);
|
|
8239
8245
|
}
|
|
8240
|
-
function
|
|
8246
|
+
function V() {
|
|
8241
8247
|
N.value &&= !1;
|
|
8242
8248
|
}
|
|
8243
8249
|
return m(() => {
|
|
8244
|
-
document.addEventListener("click", fe), window.addEventListener("resize",
|
|
8250
|
+
document.addEventListener("click", fe), window.addEventListener("resize", V);
|
|
8245
8251
|
}), h(() => {
|
|
8246
|
-
document.removeEventListener("click", fe), window.removeEventListener("resize",
|
|
8252
|
+
document.removeEventListener("click", fe), window.removeEventListener("resize", V);
|
|
8247
8253
|
}), (r, u) => (g(), o("div", Ho, [
|
|
8248
8254
|
s("div", Uo, [s("div", Wo, [(g(!0), o(e, null, v(I.value, (t) => (g(), o(e, { key: t.id }, [t.id === te.value ? (g(), o("div", Go)) : a("", !0), s("div", {
|
|
8249
8255
|
class: f(["indicator-item", {
|
|
@@ -8359,7 +8365,7 @@ var no = { class: "kline-tooltip__title" }, ro = { key: 0 }, io = { class: "klin
|
|
|
8359
8365
|
])) : a("", !0)
|
|
8360
8366
|
]));
|
|
8361
8367
|
}
|
|
8362
|
-
}), [["__scopeId", "data-v-
|
|
8368
|
+
}), [["__scopeId", "data-v-061fa6d4"]]);
|
|
8363
8369
|
//#endregion
|
|
8364
8370
|
//#region src/core/utils/klineConfig.ts
|
|
8365
8371
|
function fs(e, t) {
|
|
@@ -8451,8 +8457,31 @@ var gs = class {
|
|
|
8451
8457
|
deltaYToPriceOffset(e) {
|
|
8452
8458
|
return e * ((this.range.maxPrice - this.range.minPrice || 1) / Math.max(1, this.height - this.paddingTop - this.paddingBottom));
|
|
8453
8459
|
}
|
|
8454
|
-
}
|
|
8460
|
+
};
|
|
8461
|
+
//#endregion
|
|
8462
|
+
//#region src/core/layout/pane.ts
|
|
8463
|
+
function _s(e) {
|
|
8464
|
+
return e === "price" ? {
|
|
8465
|
+
showPriceAxisTicks: !0,
|
|
8466
|
+
showCrosshairPriceLabel: !0,
|
|
8467
|
+
candleHitTest: !0,
|
|
8468
|
+
supportsPriceTranslate: !0
|
|
8469
|
+
} : e === "indicator" ? {
|
|
8470
|
+
showPriceAxisTicks: !1,
|
|
8471
|
+
showCrosshairPriceLabel: !0,
|
|
8472
|
+
candleHitTest: !1,
|
|
8473
|
+
supportsPriceTranslate: !0
|
|
8474
|
+
} : {
|
|
8475
|
+
showPriceAxisTicks: !1,
|
|
8476
|
+
showCrosshairPriceLabel: !1,
|
|
8477
|
+
candleHitTest: !1,
|
|
8478
|
+
supportsPriceTranslate: !1
|
|
8479
|
+
};
|
|
8480
|
+
}
|
|
8481
|
+
var vs = class {
|
|
8455
8482
|
id;
|
|
8483
|
+
role;
|
|
8484
|
+
capabilities;
|
|
8456
8485
|
top = 0;
|
|
8457
8486
|
height = 0;
|
|
8458
8487
|
priceRange = {
|
|
@@ -8461,8 +8490,11 @@ var gs = class {
|
|
|
8461
8490
|
};
|
|
8462
8491
|
yAxis = new gs();
|
|
8463
8492
|
renderers = [];
|
|
8464
|
-
constructor(e) {
|
|
8465
|
-
this.id = e
|
|
8493
|
+
constructor(e, t = {}) {
|
|
8494
|
+
this.id = e, this.role = t.role ?? (e === "main" ? "price" : "indicator"), this.capabilities = {
|
|
8495
|
+
..._s(this.role),
|
|
8496
|
+
...t.capabilities ?? {}
|
|
8497
|
+
};
|
|
8466
8498
|
}
|
|
8467
8499
|
setLayout(e, t) {
|
|
8468
8500
|
this.top = e, this.height = Math.max(1, t), this.yAxis.setHeight(this.height);
|
|
@@ -8476,7 +8508,7 @@ var gs = class {
|
|
|
8476
8508
|
updateRange(e, t) {
|
|
8477
8509
|
this.priceRange = hs(e, t.start, t.end), this.yAxis.setRange(this.priceRange);
|
|
8478
8510
|
}
|
|
8479
|
-
},
|
|
8511
|
+
}, ys = class {
|
|
8480
8512
|
chart;
|
|
8481
8513
|
isDragging = !1;
|
|
8482
8514
|
dragMode = "none";
|
|
@@ -8707,7 +8739,7 @@ var gs = class {
|
|
|
8707
8739
|
} else this.crosshairPrice = null;
|
|
8708
8740
|
} else this.crosshairIndex = null, this.crosshairPos = null, this.crosshairPrice = null;
|
|
8709
8741
|
let T = typeof this.crosshairIndex == "number" ? C[this.crosshairIndex] : void 0;
|
|
8710
|
-
if (!T || !w || w.
|
|
8742
|
+
if (!T || !w || !w.capabilities.candleHitTest) {
|
|
8711
8743
|
this.hoveredIndex = null;
|
|
8712
8744
|
return;
|
|
8713
8745
|
}
|
|
@@ -8726,7 +8758,7 @@ var gs = class {
|
|
|
8726
8758
|
reset() {
|
|
8727
8759
|
this.isDragging = !1, this.dragMode = "none", this.dragStartX = 0, this.dragStartY = 0, this.scrollStartX = 0, this.activePaneIdOnDrag = null, this.clearSeparatorState(), this.isTouchSession = !1, this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId = null, this.clickedMarkerId = null, this.hoveredMarkerData = null, this.clickedMarkerData = null, this.kLinePositions = null, this.visibleRange = null, this.kWidthPx = null;
|
|
8728
8760
|
}
|
|
8729
|
-
},
|
|
8761
|
+
}, bs = class {
|
|
8730
8762
|
dom;
|
|
8731
8763
|
pane;
|
|
8732
8764
|
opt;
|
|
@@ -8752,7 +8784,7 @@ var gs = class {
|
|
|
8752
8784
|
};
|
|
8753
8785
|
//#endregion
|
|
8754
8786
|
//#region src/core/renderers/subVolume.ts
|
|
8755
|
-
function
|
|
8787
|
+
function xs(e = {}) {
|
|
8756
8788
|
let { paneId: t = "sub" } = e;
|
|
8757
8789
|
return {
|
|
8758
8790
|
name: `volume_${t}`,
|
|
@@ -8771,21 +8803,21 @@ function bs(e = {}) {
|
|
|
8771
8803
|
if (!r) continue;
|
|
8772
8804
|
let i = r.volume;
|
|
8773
8805
|
if (!i) continue;
|
|
8774
|
-
let a =
|
|
8775
|
-
d &&
|
|
8806
|
+
let a = Cs(r), d = c[e - u];
|
|
8807
|
+
d && Ss(t, d, a, i, f, o, s, n.height);
|
|
8776
8808
|
}
|
|
8777
8809
|
t.restore();
|
|
8778
8810
|
}
|
|
8779
8811
|
};
|
|
8780
8812
|
}
|
|
8781
|
-
function
|
|
8782
|
-
let c =
|
|
8813
|
+
function Ss(e, t, n, r, i, a, o, s) {
|
|
8814
|
+
let c = ws(r, i, s), l = a;
|
|
8783
8815
|
e.fillStyle = n, e.fillRect(t, c, l, s - c);
|
|
8784
8816
|
}
|
|
8785
|
-
function
|
|
8817
|
+
function Cs(e) {
|
|
8786
8818
|
return e.close > e.open ? ka.UP : e.close < e.open ? ka.DOWN : ka.NEUTRAL;
|
|
8787
8819
|
}
|
|
8788
|
-
function
|
|
8820
|
+
function ws(e, t, n) {
|
|
8789
8821
|
return n - n / t * e;
|
|
8790
8822
|
}
|
|
8791
8823
|
//#endregion
|
|
@@ -8796,7 +8828,7 @@ function Z(e, t) {
|
|
|
8796
8828
|
function Q(e, t) {
|
|
8797
8829
|
return (Math.floor(e * t) + .5) / t;
|
|
8798
8830
|
}
|
|
8799
|
-
function
|
|
8831
|
+
function Ts(e, t, n, r) {
|
|
8800
8832
|
if (t === n) return null;
|
|
8801
8833
|
let i = Math.min(t, n), a = Math.max(t, n), o = Math.round(e * r), s = Math.round(i * r), c = Math.round(a * r);
|
|
8802
8834
|
return {
|
|
@@ -8806,7 +8838,7 @@ function ws(e, t, n, r) {
|
|
|
8806
8838
|
height: Math.max(1, c - s) / r
|
|
8807
8839
|
};
|
|
8808
8840
|
}
|
|
8809
|
-
function
|
|
8841
|
+
function Es(e, t, n, r) {
|
|
8810
8842
|
if (e === t) return null;
|
|
8811
8843
|
let i = Math.min(e, t), a = Math.max(e, t), o = Math.round(i * r), s = Math.round(a * r), c = Math.round(n * r);
|
|
8812
8844
|
return {
|
|
@@ -8816,7 +8848,7 @@ function Ts(e, t, n, r) {
|
|
|
8816
8848
|
height: 1 / r
|
|
8817
8849
|
};
|
|
8818
8850
|
}
|
|
8819
|
-
function
|
|
8851
|
+
function Ds(e, t, n, r, i) {
|
|
8820
8852
|
let a = e + n, o = n, s = Math.round(t * i), c = Math.round((t + r) * i), l = Math.max(1, c - s), u = e + (n - 1) / 2, d = u, f = o % 2 == 1;
|
|
8821
8853
|
return {
|
|
8822
8854
|
bodyRect: {
|
|
@@ -8839,7 +8871,7 @@ function Es(e, t, n, r, i) {
|
|
|
8839
8871
|
}
|
|
8840
8872
|
//#endregion
|
|
8841
8873
|
//#region src/core/renderers/Indicator/ma.ts
|
|
8842
|
-
function
|
|
8874
|
+
function Os(e, t) {
|
|
8843
8875
|
let n = Array(e.length);
|
|
8844
8876
|
if (e.length < t) return n;
|
|
8845
8877
|
let r = 0;
|
|
@@ -8855,7 +8887,7 @@ function Ds(e, t) {
|
|
|
8855
8887
|
}
|
|
8856
8888
|
return n;
|
|
8857
8889
|
}
|
|
8858
|
-
function
|
|
8890
|
+
function ks(e = {}) {
|
|
8859
8891
|
let t = {
|
|
8860
8892
|
ma5: !0,
|
|
8861
8893
|
ma10: !0,
|
|
@@ -8867,7 +8899,7 @@ function Os(e = {}) {
|
|
|
8867
8899
|
function i(e, t) {
|
|
8868
8900
|
let i = n.get(t);
|
|
8869
8901
|
if (i && r === e) return i.values;
|
|
8870
|
-
let a =
|
|
8902
|
+
let a = Os(e, t);
|
|
8871
8903
|
return n.set(t, {
|
|
8872
8904
|
period: t,
|
|
8873
8905
|
values: a
|
|
@@ -8909,7 +8941,7 @@ function Os(e = {}) {
|
|
|
8909
8941
|
}
|
|
8910
8942
|
//#endregion
|
|
8911
8943
|
//#region src/core/renderers/Indicator/boll.ts
|
|
8912
|
-
function
|
|
8944
|
+
function As(e, t, n) {
|
|
8913
8945
|
let r = Array(e.length);
|
|
8914
8946
|
if (e.length < t) return r;
|
|
8915
8947
|
let i = 0, a = [];
|
|
@@ -8942,7 +8974,7 @@ function ks(e, t, n) {
|
|
|
8942
8974
|
}
|
|
8943
8975
|
return r;
|
|
8944
8976
|
}
|
|
8945
|
-
function
|
|
8977
|
+
function js(e = {}) {
|
|
8946
8978
|
let t = {
|
|
8947
8979
|
period: 20,
|
|
8948
8980
|
multiplier: 2,
|
|
@@ -8953,7 +8985,7 @@ function As(e = {}) {
|
|
|
8953
8985
|
...e
|
|
8954
8986
|
}, n = null, r = 0, i = 0, a = [];
|
|
8955
8987
|
function o(e) {
|
|
8956
|
-
return (n !== e || r !== t.period || i !== t.multiplier) && (a =
|
|
8988
|
+
return (n !== e || r !== t.period || i !== t.multiplier) && (a = As(e, t.period, t.multiplier), n = e, r = t.period, i = t.multiplier), a;
|
|
8957
8989
|
}
|
|
8958
8990
|
return {
|
|
8959
8991
|
name: "boll",
|
|
@@ -9010,7 +9042,7 @@ function As(e = {}) {
|
|
|
9010
9042
|
}
|
|
9011
9043
|
};
|
|
9012
9044
|
}
|
|
9013
|
-
function
|
|
9045
|
+
function Ms(e, t, n = 20, r = 2) {
|
|
9014
9046
|
if (t < n - 1 || t >= e.length) return null;
|
|
9015
9047
|
let i = 0;
|
|
9016
9048
|
for (let r = 0; r < n; r++) {
|
|
@@ -9033,7 +9065,7 @@ function js(e, t, n = 20, r = 2) {
|
|
|
9033
9065
|
}
|
|
9034
9066
|
//#endregion
|
|
9035
9067
|
//#region src/core/renderers/Indicator/expma.ts
|
|
9036
|
-
function
|
|
9068
|
+
function Ns(e, t, n) {
|
|
9037
9069
|
let r = Array(e.length);
|
|
9038
9070
|
if (e.length === 0) return r;
|
|
9039
9071
|
let i = 2 / (t + 1), a = 2 / (n + 1), o = e[0].close, s = o, c = o;
|
|
@@ -9050,7 +9082,7 @@ function Ms(e, t, n) {
|
|
|
9050
9082
|
}
|
|
9051
9083
|
return r;
|
|
9052
9084
|
}
|
|
9053
|
-
function
|
|
9085
|
+
function Ps(e, t, n = 12, r = 50) {
|
|
9054
9086
|
if (t < 0 || t >= e.length) return null;
|
|
9055
9087
|
let i = 2 / (n + 1), a = 2 / (r + 1), o = e[0].close, s = o, c = o;
|
|
9056
9088
|
for (let n = 1; n <= t; n++) {
|
|
@@ -9062,14 +9094,14 @@ function Ns(e, t, n = 12, r = 50) {
|
|
|
9062
9094
|
slow: c
|
|
9063
9095
|
};
|
|
9064
9096
|
}
|
|
9065
|
-
function
|
|
9097
|
+
function Fs(e = {}) {
|
|
9066
9098
|
let t = {
|
|
9067
9099
|
fastPeriod: 12,
|
|
9068
9100
|
slowPeriod: 50,
|
|
9069
9101
|
...e
|
|
9070
9102
|
}, n = null, r = 0, i = 0, a = [];
|
|
9071
9103
|
function o(e) {
|
|
9072
|
-
return (n !== e || r !== t.fastPeriod || i !== t.slowPeriod) && (a =
|
|
9104
|
+
return (n !== e || r !== t.fastPeriod || i !== t.slowPeriod) && (a = Ns(e, t.fastPeriod, t.slowPeriod), n = e, r = t.fastPeriod, i = t.slowPeriod), a;
|
|
9073
9105
|
}
|
|
9074
9106
|
return {
|
|
9075
9107
|
name: "expma",
|
|
@@ -9109,7 +9141,7 @@ function Ps(e = {}) {
|
|
|
9109
9141
|
}
|
|
9110
9142
|
//#endregion
|
|
9111
9143
|
//#region src/core/renderers/Indicator/ene.ts
|
|
9112
|
-
function
|
|
9144
|
+
function Is(e, t, n) {
|
|
9113
9145
|
let r = Array(e.length);
|
|
9114
9146
|
if (e.length < t) return r;
|
|
9115
9147
|
let i = 0;
|
|
@@ -9137,7 +9169,7 @@ function Fs(e, t, n) {
|
|
|
9137
9169
|
}
|
|
9138
9170
|
return r;
|
|
9139
9171
|
}
|
|
9140
|
-
function
|
|
9172
|
+
function Ls(e, t, n = 10, r = 11) {
|
|
9141
9173
|
if (t < n - 1 || t >= e.length) return null;
|
|
9142
9174
|
let i = 0;
|
|
9143
9175
|
for (let r = 0; r < n; r++) {
|
|
@@ -9152,14 +9184,14 @@ function Is(e, t, n = 10, r = 11) {
|
|
|
9152
9184
|
lower: a * (1 - o)
|
|
9153
9185
|
};
|
|
9154
9186
|
}
|
|
9155
|
-
function
|
|
9187
|
+
function Rs(e = {}) {
|
|
9156
9188
|
let t = {
|
|
9157
9189
|
period: 10,
|
|
9158
9190
|
deviation: 11,
|
|
9159
9191
|
...e
|
|
9160
9192
|
}, n = null, r = 0, i = 0, a = [];
|
|
9161
9193
|
function o(e) {
|
|
9162
|
-
return (n !== e || r !== t.period || i !== t.deviation) && (a =
|
|
9194
|
+
return (n !== e || r !== t.period || i !== t.deviation) && (a = Is(e, t.period, t.deviation), n = e, r = t.period, i = t.deviation), a;
|
|
9163
9195
|
}
|
|
9164
9196
|
return {
|
|
9165
9197
|
name: "ene",
|
|
@@ -9215,7 +9247,7 @@ function Ls(e = {}) {
|
|
|
9215
9247
|
}
|
|
9216
9248
|
//#endregion
|
|
9217
9249
|
//#region src/utils/kline/ma.ts
|
|
9218
|
-
function
|
|
9250
|
+
function zs(e, t, n) {
|
|
9219
9251
|
if (t < n - 1) return;
|
|
9220
9252
|
let r = 0;
|
|
9221
9253
|
for (let i = 0; i < n; i++) {
|
|
@@ -9227,7 +9259,7 @@ function Rs(e, t, n) {
|
|
|
9227
9259
|
}
|
|
9228
9260
|
//#endregion
|
|
9229
9261
|
//#region src/core/renderers/Indicator/mainIndicatorLegend.ts
|
|
9230
|
-
function
|
|
9262
|
+
function Bs(e) {
|
|
9231
9263
|
let t = {
|
|
9232
9264
|
yPaddingPx: e.yPaddingPx,
|
|
9233
9265
|
indicators: {
|
|
@@ -9278,28 +9310,28 @@ function zs(e) {
|
|
|
9278
9310
|
r.push({
|
|
9279
9311
|
label: `MA${e}`,
|
|
9280
9312
|
color: Na[t] || Na.MA5,
|
|
9281
|
-
value:
|
|
9313
|
+
value: zs(a, o, e)
|
|
9282
9314
|
});
|
|
9283
9315
|
}) : r.push({
|
|
9284
9316
|
label: "MA5",
|
|
9285
9317
|
color: Na.MA5,
|
|
9286
|
-
value:
|
|
9318
|
+
value: zs(a, o, 5)
|
|
9287
9319
|
}, {
|
|
9288
9320
|
label: "MA10",
|
|
9289
9321
|
color: Na.MA10,
|
|
9290
|
-
value:
|
|
9322
|
+
value: zs(a, o, 10)
|
|
9291
9323
|
}, {
|
|
9292
9324
|
label: "MA20",
|
|
9293
9325
|
color: Na.MA20,
|
|
9294
|
-
value:
|
|
9326
|
+
value: zs(a, o, 20)
|
|
9295
9327
|
}, {
|
|
9296
9328
|
label: "MA30",
|
|
9297
9329
|
color: Na.MA30,
|
|
9298
|
-
value:
|
|
9330
|
+
value: zs(a, o, 30)
|
|
9299
9331
|
}, {
|
|
9300
9332
|
label: "MA60",
|
|
9301
9333
|
color: Na.MA60,
|
|
9302
|
-
value:
|
|
9334
|
+
value: zs(a, o, 60)
|
|
9303
9335
|
}), r.length > 0) {
|
|
9304
9336
|
let i = 12, a = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9305
9337
|
n.fillStyle = ka.NEUTRAL, n.fillText("MA", i, a), i += n.measureText("MA").width + 10;
|
|
@@ -9311,17 +9343,17 @@ function zs(e) {
|
|
|
9311
9343
|
} });
|
|
9312
9344
|
let l = t.indicators.BOLL;
|
|
9313
9345
|
l?.enabled && s.push({ draw: (e) => {
|
|
9314
|
-
let r = l.params.period ?? 20, i = l.params.multiplier ?? 2, s =
|
|
9346
|
+
let r = l.params.period ?? 20, i = l.params.multiplier ?? 2, s = Ms(a, o, r, i), c = 12, u = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9315
9347
|
n.fillStyle = ka.NEUTRAL, n.fillText(`BOLL(${r},${i})`, c, u), c += n.measureText(`BOLL(${r},${i})`).width + 10, s && (n.fillStyle = Pa.UPPER, n.fillText(`上轨:${s.upper.toFixed(2)}`, c, u), c += n.measureText(`上轨:${s.upper.toFixed(2)}`).width + 10, n.fillStyle = Pa.MIDDLE, n.fillText(`中轨:${s.middle.toFixed(2)}`, c, u), c += n.measureText(`中轨:${s.middle.toFixed(2)}`).width + 10, n.fillStyle = Pa.LOWER, n.fillText(`下轨:${s.lower.toFixed(2)}`, c, u));
|
|
9316
9348
|
} });
|
|
9317
9349
|
let u = t.indicators.EXPMA;
|
|
9318
9350
|
u?.enabled && s.push({ draw: (e) => {
|
|
9319
|
-
let r = u.params.fastPeriod ?? 12, i = u.params.slowPeriod ?? 50, s =
|
|
9351
|
+
let r = u.params.fastPeriod ?? 12, i = u.params.slowPeriod ?? 50, s = Ps(a, o, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9320
9352
|
n.fillStyle = ka.NEUTRAL, n.fillText(`EXPMA(${r},${i})`, c, l), c += n.measureText(`EXPMA(${r},${i})`).width + 10, s && (n.fillStyle = Ha.FAST, n.fillText(`快:${s.fast.toFixed(2)}`, c, l), c += n.measureText(`快:${s.fast.toFixed(2)}`).width + 10, n.fillStyle = Ha.SLOW, n.fillText(`慢:${s.slow.toFixed(2)}`, c, l));
|
|
9321
9353
|
} });
|
|
9322
9354
|
let d = t.indicators.ENE;
|
|
9323
9355
|
d?.enabled && s.push({ draw: (e) => {
|
|
9324
|
-
let r = d.params.period ?? 10, i = d.params.deviation ?? 11, s =
|
|
9356
|
+
let r = d.params.period ?? 10, i = d.params.deviation ?? 11, s = Ls(a, o, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9325
9357
|
n.fillStyle = ka.NEUTRAL, n.fillText(`ENE(${r},${i})`, c, l), c += n.measureText(`ENE(${r},${i})`).width + 10, s && (n.fillStyle = Ua.UPPER, n.fillText(`上轨:${s.upper.toFixed(2)}`, c, l), c += n.measureText(`上轨:${s.upper.toFixed(2)}`).width + 10, n.fillStyle = Ua.MIDDLE, n.fillText(`中轨:${s.middle.toFixed(2)}`, c, l), c += n.measureText(`中轨:${s.middle.toFixed(2)}`).width + 10, n.fillStyle = Ua.LOWER, n.fillText(`下轨:${s.lower.toFixed(2)}`, c, l));
|
|
9326
9358
|
} }), s.forEach((e, t) => e.draw(t)), n.restore();
|
|
9327
9359
|
},
|
|
@@ -9341,10 +9373,10 @@ function zs(e) {
|
|
|
9341
9373
|
}
|
|
9342
9374
|
//#endregion
|
|
9343
9375
|
//#region src/plugin/stateKeys.ts
|
|
9344
|
-
var
|
|
9376
|
+
var Vs = (e, t) => `indicator:${e}:${t}`;
|
|
9345
9377
|
//#endregion
|
|
9346
9378
|
//#region src/core/renderers/Indicator/macd.ts
|
|
9347
|
-
function
|
|
9379
|
+
function Hs(e, t) {
|
|
9348
9380
|
let n = Array(e.length), r = 2 / (t + 1);
|
|
9349
9381
|
if (e.length === 0) return n;
|
|
9350
9382
|
n[0] = e[0].close;
|
|
@@ -9354,7 +9386,7 @@ function Vs(e, t) {
|
|
|
9354
9386
|
}
|
|
9355
9387
|
return n;
|
|
9356
9388
|
}
|
|
9357
|
-
function
|
|
9389
|
+
function Us(e, t) {
|
|
9358
9390
|
let n = Array(e.length), r = 2 / (t + 1), i = e.findIndex((e) => e !== void 0);
|
|
9359
9391
|
if (i === -1) return n;
|
|
9360
9392
|
n[i] = e[i];
|
|
@@ -9364,15 +9396,15 @@ function Hs(e, t) {
|
|
|
9364
9396
|
}
|
|
9365
9397
|
return n;
|
|
9366
9398
|
}
|
|
9367
|
-
function
|
|
9399
|
+
function Ws(e, t, n, r) {
|
|
9368
9400
|
let i = Array(e.length);
|
|
9369
9401
|
if (e.length < n) return i;
|
|
9370
|
-
let a =
|
|
9402
|
+
let a = Hs(e, t), o = Hs(e, n), s = Array(e.length);
|
|
9371
9403
|
for (let t = 0; t < e.length; t++) {
|
|
9372
9404
|
let e = a[t], n = o[t];
|
|
9373
9405
|
e !== void 0 && n !== void 0 && (s[t] = e - n);
|
|
9374
9406
|
}
|
|
9375
|
-
let c =
|
|
9407
|
+
let c = Us(s, r);
|
|
9376
9408
|
for (let t = 0; t < e.length; t++) {
|
|
9377
9409
|
let e = s[t], n = c[t];
|
|
9378
9410
|
e !== void 0 && n !== void 0 && (i[t] = {
|
|
@@ -9383,8 +9415,8 @@ function Us(e, t, n, r) {
|
|
|
9383
9415
|
}
|
|
9384
9416
|
return i;
|
|
9385
9417
|
}
|
|
9386
|
-
function
|
|
9387
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9418
|
+
function Gs(e = {}) {
|
|
9419
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("macd", t), i = null, a = {
|
|
9388
9420
|
fastPeriod: 12,
|
|
9389
9421
|
slowPeriod: 26,
|
|
9390
9422
|
signalPeriod: 9,
|
|
@@ -9394,7 +9426,7 @@ function Ws(e = {}) {
|
|
|
9394
9426
|
...n
|
|
9395
9427
|
}, o = null, s = 0, c = 0, l = 0, u = [];
|
|
9396
9428
|
function d(e) {
|
|
9397
|
-
return (o !== e || s !== a.fastPeriod || c !== a.slowPeriod || l !== a.signalPeriod) && (u =
|
|
9429
|
+
return (o !== e || s !== a.fastPeriod || c !== a.slowPeriod || l !== a.signalPeriod) && (u = Ws(e, a.fastPeriod, a.slowPeriod, a.signalPeriod), o = e, s = a.fastPeriod, c = a.slowPeriod, l = a.signalPeriod), u;
|
|
9398
9430
|
}
|
|
9399
9431
|
return {
|
|
9400
9432
|
name: `macd_${t}`,
|
|
@@ -9492,11 +9524,11 @@ function Ws(e = {}) {
|
|
|
9492
9524
|
}
|
|
9493
9525
|
};
|
|
9494
9526
|
}
|
|
9495
|
-
function Gs(e, t, n = 12, r = 26, i = 9) {
|
|
9496
|
-
return t < r || t >= e.length ? null : Us(e, n, r, i)[t] ?? null;
|
|
9497
|
-
}
|
|
9498
9527
|
function Ks(e, t, n = 12, r = 26, i = 9) {
|
|
9499
|
-
|
|
9528
|
+
return t < r || t >= e.length ? null : Ws(e, n, r, i)[t] ?? null;
|
|
9529
|
+
}
|
|
9530
|
+
function qs(e, t, n = 12, r = 26, i = 9) {
|
|
9531
|
+
let a = Ks(e, t, n, r, i);
|
|
9500
9532
|
return a ? {
|
|
9501
9533
|
name: "MACD",
|
|
9502
9534
|
params: [
|
|
@@ -9525,7 +9557,7 @@ function Ks(e, t, n = 12, r = 26, i = 9) {
|
|
|
9525
9557
|
}
|
|
9526
9558
|
//#endregion
|
|
9527
9559
|
//#region src/core/renderers/Indicator/rsi.ts
|
|
9528
|
-
function
|
|
9560
|
+
function Js(e, t) {
|
|
9529
9561
|
let n = Array(e.length);
|
|
9530
9562
|
if (e.length < t + 1) return n;
|
|
9531
9563
|
let r = [];
|
|
@@ -9547,8 +9579,8 @@ function qs(e, t) {
|
|
|
9547
9579
|
}
|
|
9548
9580
|
return n;
|
|
9549
9581
|
}
|
|
9550
|
-
function
|
|
9551
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9582
|
+
function Ys(e = {}) {
|
|
9583
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("rsi", t), i = null, a = {
|
|
9552
9584
|
period1: 6,
|
|
9553
9585
|
period2: 12,
|
|
9554
9586
|
period3: 24,
|
|
@@ -9558,7 +9590,7 @@ function Js(e = {}) {
|
|
|
9558
9590
|
...n
|
|
9559
9591
|
}, o = null, s = 0, c = 0, l = 0, u = [], d = [], f = [];
|
|
9560
9592
|
function p(e) {
|
|
9561
|
-
return (o !== e || s !== a.period1 || c !== a.period2 || l !== a.period3) && (u =
|
|
9593
|
+
return (o !== e || s !== a.period1 || c !== a.period2 || l !== a.period3) && (u = Js(e, a.period1), d = Js(e, a.period2), f = Js(e, a.period3), o = e, s = a.period1, c = a.period2, l = a.period3), {
|
|
9562
9594
|
rsi1: u,
|
|
9563
9595
|
rsi2: d,
|
|
9564
9596
|
rsi3: f
|
|
@@ -9614,9 +9646,9 @@ function Js(e = {}) {
|
|
|
9614
9646
|
}
|
|
9615
9647
|
};
|
|
9616
9648
|
}
|
|
9617
|
-
function
|
|
9649
|
+
function Xs(e, t, n = 6, r = 12, i = 24) {
|
|
9618
9650
|
if (t < n + 1 || t >= e.length) return null;
|
|
9619
|
-
let a =
|
|
9651
|
+
let a = Js(e, n)[t], o = Js(e, r)[t], s = Js(e, i)[t], c = [];
|
|
9620
9652
|
return a !== void 0 && c.push({
|
|
9621
9653
|
label: `RSI${n}`,
|
|
9622
9654
|
value: a,
|
|
@@ -9641,7 +9673,7 @@ function Ys(e, t, n = 6, r = 12, i = 24) {
|
|
|
9641
9673
|
}
|
|
9642
9674
|
//#endregion
|
|
9643
9675
|
//#region src/core/renderers/Indicator/cci.ts
|
|
9644
|
-
function
|
|
9676
|
+
function Zs(e, t) {
|
|
9645
9677
|
let n = Array(e.length);
|
|
9646
9678
|
if (e.length < t) return n;
|
|
9647
9679
|
let r = e.map((e) => (e.high + e.low + e.close) / 3);
|
|
@@ -9655,14 +9687,14 @@ function Xs(e, t) {
|
|
|
9655
9687
|
}
|
|
9656
9688
|
return n;
|
|
9657
9689
|
}
|
|
9658
|
-
function
|
|
9659
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9690
|
+
function Qs(e = {}) {
|
|
9691
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("cci", t), i = null, a = {
|
|
9660
9692
|
period: 14,
|
|
9661
9693
|
showCCI: !0,
|
|
9662
9694
|
...n
|
|
9663
9695
|
}, o = null, s = 0, c = [];
|
|
9664
9696
|
function l(e) {
|
|
9665
|
-
return (o !== e || s !== a.period) && (c =
|
|
9697
|
+
return (o !== e || s !== a.period) && (c = Zs(e, a.period), o = e, s = a.period), c;
|
|
9666
9698
|
}
|
|
9667
9699
|
return {
|
|
9668
9700
|
name: `cci_${t}`,
|
|
@@ -9724,12 +9756,12 @@ function Zs(e = {}) {
|
|
|
9724
9756
|
}
|
|
9725
9757
|
};
|
|
9726
9758
|
}
|
|
9727
|
-
function
|
|
9728
|
-
return
|
|
9759
|
+
function $s(e, t, n) {
|
|
9760
|
+
return Zs(e, n)[t];
|
|
9729
9761
|
}
|
|
9730
|
-
function
|
|
9762
|
+
function ec(e, t, n = 14) {
|
|
9731
9763
|
if (t < n || t >= e.length) return null;
|
|
9732
|
-
let r =
|
|
9764
|
+
let r = $s(e, t, n);
|
|
9733
9765
|
return r === void 0 ? null : {
|
|
9734
9766
|
name: "CCI",
|
|
9735
9767
|
params: [n],
|
|
@@ -9742,7 +9774,7 @@ function $s(e, t, n = 14) {
|
|
|
9742
9774
|
}
|
|
9743
9775
|
//#endregion
|
|
9744
9776
|
//#region src/core/renderers/Indicator/stoch.ts
|
|
9745
|
-
function
|
|
9777
|
+
function tc(e, t, n) {
|
|
9746
9778
|
let r = Array(e.length);
|
|
9747
9779
|
if (e.length < t) return r;
|
|
9748
9780
|
let i = Array(e.length);
|
|
@@ -9770,8 +9802,8 @@ function ec(e, t, n) {
|
|
|
9770
9802
|
}
|
|
9771
9803
|
return r;
|
|
9772
9804
|
}
|
|
9773
|
-
function
|
|
9774
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9805
|
+
function nc(e = {}) {
|
|
9806
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("stoch", t), i = null, a = {
|
|
9775
9807
|
n: 9,
|
|
9776
9808
|
m: 3,
|
|
9777
9809
|
showK: !0,
|
|
@@ -9779,7 +9811,7 @@ function tc(e = {}) {
|
|
|
9779
9811
|
...n
|
|
9780
9812
|
}, o = null, s = 0, c = 0, l = [];
|
|
9781
9813
|
function u(e) {
|
|
9782
|
-
return (o !== e || s !== a.n || c !== a.m) && (l =
|
|
9814
|
+
return (o !== e || s !== a.n || c !== a.m) && (l = tc(e, a.n, a.m), o = e, s = a.n, c = a.m), l;
|
|
9783
9815
|
}
|
|
9784
9816
|
return {
|
|
9785
9817
|
name: `stoch_${t}`,
|
|
@@ -9845,12 +9877,12 @@ function tc(e = {}) {
|
|
|
9845
9877
|
}
|
|
9846
9878
|
};
|
|
9847
9879
|
}
|
|
9848
|
-
function
|
|
9849
|
-
return
|
|
9880
|
+
function rc(e, t, n, r) {
|
|
9881
|
+
return tc(e, n, r)[t];
|
|
9850
9882
|
}
|
|
9851
|
-
function
|
|
9883
|
+
function ic(e, t, n = 9, r = 3) {
|
|
9852
9884
|
if (t < n + r - 1 || t >= e.length) return null;
|
|
9853
|
-
let i =
|
|
9885
|
+
let i = rc(e, t, n, r);
|
|
9854
9886
|
return i ? {
|
|
9855
9887
|
name: "STOCH",
|
|
9856
9888
|
params: [n, r],
|
|
@@ -9867,7 +9899,7 @@ function rc(e, t, n = 9, r = 3) {
|
|
|
9867
9899
|
}
|
|
9868
9900
|
//#endregion
|
|
9869
9901
|
//#region src/core/renderers/Indicator/mom.ts
|
|
9870
|
-
function
|
|
9902
|
+
function ac(e, t) {
|
|
9871
9903
|
let n = Array(e.length);
|
|
9872
9904
|
if (e.length < t + 1) return n;
|
|
9873
9905
|
for (let r = t; r < e.length; r++) {
|
|
@@ -9876,14 +9908,14 @@ function ic(e, t) {
|
|
|
9876
9908
|
}
|
|
9877
9909
|
return n;
|
|
9878
9910
|
}
|
|
9879
|
-
function
|
|
9880
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9911
|
+
function oc(e = {}) {
|
|
9912
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("mom", t), i = null, a = {
|
|
9881
9913
|
period: 10,
|
|
9882
9914
|
showMOM: !0,
|
|
9883
9915
|
...n
|
|
9884
9916
|
}, o = null, s = 0, c = [];
|
|
9885
9917
|
function l(e) {
|
|
9886
|
-
return (o !== e || s !== a.period) && (c =
|
|
9918
|
+
return (o !== e || s !== a.period) && (c = ac(e, a.period), o = e, s = a.period), c;
|
|
9887
9919
|
}
|
|
9888
9920
|
return {
|
|
9889
9921
|
name: `mom_${t}`,
|
|
@@ -9946,12 +9978,12 @@ function ac(e = {}) {
|
|
|
9946
9978
|
}
|
|
9947
9979
|
};
|
|
9948
9980
|
}
|
|
9949
|
-
function
|
|
9950
|
-
return
|
|
9981
|
+
function sc(e, t, n) {
|
|
9982
|
+
return ac(e, n)[t];
|
|
9951
9983
|
}
|
|
9952
|
-
function
|
|
9984
|
+
function cc(e, t, n = 10) {
|
|
9953
9985
|
if (t < n || t >= e.length) return null;
|
|
9954
|
-
let r =
|
|
9986
|
+
let r = sc(e, t, n);
|
|
9955
9987
|
return r === void 0 ? null : {
|
|
9956
9988
|
name: "MOM",
|
|
9957
9989
|
params: [n],
|
|
@@ -9964,7 +9996,7 @@ function sc(e, t, n = 10) {
|
|
|
9964
9996
|
}
|
|
9965
9997
|
//#endregion
|
|
9966
9998
|
//#region src/core/renderers/Indicator/wmsr.ts
|
|
9967
|
-
function
|
|
9999
|
+
function lc(e, t) {
|
|
9968
10000
|
let n = Array(e.length);
|
|
9969
10001
|
if (e.length < t) return n;
|
|
9970
10002
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -9978,14 +10010,14 @@ function cc(e, t) {
|
|
|
9978
10010
|
}
|
|
9979
10011
|
return n;
|
|
9980
10012
|
}
|
|
9981
|
-
function
|
|
9982
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
10013
|
+
function uc(e = {}) {
|
|
10014
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("wmsr", t), i = null, a = {
|
|
9983
10015
|
period: 14,
|
|
9984
10016
|
showWMSR: !0,
|
|
9985
10017
|
...n
|
|
9986
10018
|
}, o = null, s = 0, c = [];
|
|
9987
10019
|
function l(e) {
|
|
9988
|
-
return (o !== e || s !== a.period) && (c =
|
|
10020
|
+
return (o !== e || s !== a.period) && (c = lc(e, a.period), o = e, s = a.period), c;
|
|
9989
10021
|
}
|
|
9990
10022
|
return {
|
|
9991
10023
|
name: `wmsr_${t}`,
|
|
@@ -10040,12 +10072,12 @@ function lc(e = {}) {
|
|
|
10040
10072
|
}
|
|
10041
10073
|
};
|
|
10042
10074
|
}
|
|
10043
|
-
function
|
|
10044
|
-
return
|
|
10075
|
+
function dc(e, t, n) {
|
|
10076
|
+
return lc(e, n)[t];
|
|
10045
10077
|
}
|
|
10046
|
-
function
|
|
10078
|
+
function fc(e, t, n = 14) {
|
|
10047
10079
|
if (t < n || t >= e.length) return null;
|
|
10048
|
-
let r =
|
|
10080
|
+
let r = dc(e, t, n);
|
|
10049
10081
|
return r === void 0 ? null : {
|
|
10050
10082
|
name: "WMSR",
|
|
10051
10083
|
params: [n],
|
|
@@ -10058,7 +10090,7 @@ function dc(e, t, n = 14) {
|
|
|
10058
10090
|
}
|
|
10059
10091
|
//#endregion
|
|
10060
10092
|
//#region src/core/renderers/Indicator/kst.ts
|
|
10061
|
-
function
|
|
10093
|
+
function pc(e, t) {
|
|
10062
10094
|
let n = Array(e.length);
|
|
10063
10095
|
if (e.length < t + 1) return n;
|
|
10064
10096
|
for (let r = t; r < e.length; r++) {
|
|
@@ -10067,7 +10099,7 @@ function fc(e, t) {
|
|
|
10067
10099
|
}
|
|
10068
10100
|
return n;
|
|
10069
10101
|
}
|
|
10070
|
-
function
|
|
10102
|
+
function mc(e, t) {
|
|
10071
10103
|
let n = Array(e.length), r = 0, i = 0;
|
|
10072
10104
|
for (let a = 0; a < e.length; a++) {
|
|
10073
10105
|
let o = e[a];
|
|
@@ -10081,13 +10113,13 @@ function pc(e, t) {
|
|
|
10081
10113
|
}
|
|
10082
10114
|
return n;
|
|
10083
10115
|
}
|
|
10084
|
-
function
|
|
10085
|
-
let o = Array(e.length), s =
|
|
10116
|
+
function hc(e, t, n, r, i, a) {
|
|
10117
|
+
let o = Array(e.length), s = pc(e, t), c = pc(e, n), l = pc(e, r), u = pc(e, i), d = mc(s, 10), f = mc(c, 10), p = mc(l, 10), m = mc(u, 15), h = Array(e.length);
|
|
10086
10118
|
for (let t = 0; t < e.length; t++) {
|
|
10087
10119
|
let e = d[t], n = f[t], r = p[t], i = m[t];
|
|
10088
10120
|
e !== void 0 && n !== void 0 && r !== void 0 && i !== void 0 && (h[t] = e * 1 + n * 2 + r * 3 + i * 4);
|
|
10089
10121
|
}
|
|
10090
|
-
let g =
|
|
10122
|
+
let g = mc(h, a);
|
|
10091
10123
|
for (let t = 0; t < e.length; t++) {
|
|
10092
10124
|
let e = h[t], n = g[t];
|
|
10093
10125
|
e !== void 0 && n !== void 0 && (o[t] = {
|
|
@@ -10097,8 +10129,8 @@ function mc(e, t, n, r, i, a) {
|
|
|
10097
10129
|
}
|
|
10098
10130
|
return o;
|
|
10099
10131
|
}
|
|
10100
|
-
function
|
|
10101
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
10132
|
+
function gc(e = {}) {
|
|
10133
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("kst", t), i = null, a = {
|
|
10102
10134
|
roc1: 10,
|
|
10103
10135
|
roc2: 15,
|
|
10104
10136
|
roc3: 20,
|
|
@@ -10110,7 +10142,7 @@ function hc(e = {}) {
|
|
|
10110
10142
|
}, o = null, s = "", c = [];
|
|
10111
10143
|
function l(e) {
|
|
10112
10144
|
let t = `${a.roc1}-${a.roc2}-${a.roc3}-${a.roc4}-${a.signalPeriod}`;
|
|
10113
|
-
return (o !== e || s !== t) && (c =
|
|
10145
|
+
return (o !== e || s !== t) && (c = hc(e, a.roc1, a.roc2, a.roc3, a.roc4, a.signalPeriod), o = e, s = t), c;
|
|
10114
10146
|
}
|
|
10115
10147
|
return {
|
|
10116
10148
|
name: `kst_${t}`,
|
|
@@ -10186,12 +10218,12 @@ function hc(e = {}) {
|
|
|
10186
10218
|
}
|
|
10187
10219
|
};
|
|
10188
10220
|
}
|
|
10189
|
-
function
|
|
10190
|
-
return
|
|
10221
|
+
function _c(e, t, n, r, i, a, o) {
|
|
10222
|
+
return hc(e, n, r, i, a, o)[t];
|
|
10191
10223
|
}
|
|
10192
|
-
function
|
|
10224
|
+
function vc(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
10193
10225
|
if (t < a + 15 + o || t >= e.length) return null;
|
|
10194
|
-
let s =
|
|
10226
|
+
let s = _c(e, t, n, r, i, a, o);
|
|
10195
10227
|
return s ? {
|
|
10196
10228
|
name: "KST",
|
|
10197
10229
|
params: [
|
|
@@ -10214,7 +10246,7 @@ function _c(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
|
10214
10246
|
}
|
|
10215
10247
|
//#endregion
|
|
10216
10248
|
//#region src/core/renderers/Indicator/fastk.ts
|
|
10217
|
-
function
|
|
10249
|
+
function yc(e, t) {
|
|
10218
10250
|
let n = Array(e.length);
|
|
10219
10251
|
if (e.length < t) return n;
|
|
10220
10252
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -10228,14 +10260,14 @@ function vc(e, t) {
|
|
|
10228
10260
|
}
|
|
10229
10261
|
return n;
|
|
10230
10262
|
}
|
|
10231
|
-
function
|
|
10232
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
10263
|
+
function bc(e = {}) {
|
|
10264
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("fastk", t), i = null, a = {
|
|
10233
10265
|
period: 9,
|
|
10234
10266
|
showFASTK: !0,
|
|
10235
10267
|
...n
|
|
10236
10268
|
}, o = null, s = 0, c = [];
|
|
10237
10269
|
function l(e) {
|
|
10238
|
-
return (o !== e || s !== a.period) && (c =
|
|
10270
|
+
return (o !== e || s !== a.period) && (c = yc(e, a.period), o = e, s = a.period), c;
|
|
10239
10271
|
}
|
|
10240
10272
|
return {
|
|
10241
10273
|
name: `fastk_${t}`,
|
|
@@ -10288,12 +10320,12 @@ function yc(e = {}) {
|
|
|
10288
10320
|
}
|
|
10289
10321
|
};
|
|
10290
10322
|
}
|
|
10291
|
-
function
|
|
10292
|
-
return
|
|
10323
|
+
function xc(e, t, n) {
|
|
10324
|
+
return yc(e, n)[t];
|
|
10293
10325
|
}
|
|
10294
|
-
function
|
|
10326
|
+
function Sc(e, t, n = 9) {
|
|
10295
10327
|
if (t < n || t >= e.length) return null;
|
|
10296
|
-
let r =
|
|
10328
|
+
let r = xc(e, t, n);
|
|
10297
10329
|
return r === void 0 ? null : {
|
|
10298
10330
|
name: "FASTK",
|
|
10299
10331
|
params: [n],
|
|
@@ -10306,24 +10338,24 @@ function xc(e, t, n = 9) {
|
|
|
10306
10338
|
}
|
|
10307
10339
|
//#endregion
|
|
10308
10340
|
//#region src/core/renderers/Indicator/index.ts
|
|
10309
|
-
function
|
|
10341
|
+
function Cc(e) {
|
|
10310
10342
|
let { indicatorId: t, paneId: n } = e;
|
|
10311
10343
|
switch (t) {
|
|
10312
|
-
case "VOLUME": return
|
|
10313
|
-
case "MACD": return
|
|
10314
|
-
case "RSI": return
|
|
10315
|
-
case "CCI": return
|
|
10316
|
-
case "STOCH": return
|
|
10317
|
-
case "MOM": return
|
|
10318
|
-
case "WMSR": return
|
|
10319
|
-
case "KST": return
|
|
10320
|
-
case "FASTK": return
|
|
10344
|
+
case "VOLUME": return xs({ paneId: n });
|
|
10345
|
+
case "MACD": return Gs({ paneId: n });
|
|
10346
|
+
case "RSI": return Ys({ paneId: n });
|
|
10347
|
+
case "CCI": return Qs({ paneId: n });
|
|
10348
|
+
case "STOCH": return nc({ paneId: n });
|
|
10349
|
+
case "MOM": return oc({ paneId: n });
|
|
10350
|
+
case "WMSR": return uc({ paneId: n });
|
|
10351
|
+
case "KST": return gc({ paneId: n });
|
|
10352
|
+
case "FASTK": return bc({ paneId: n });
|
|
10321
10353
|
default: throw Error(`Unknown indicator: ${t}`);
|
|
10322
10354
|
}
|
|
10323
10355
|
}
|
|
10324
10356
|
//#endregion
|
|
10325
10357
|
//#region src/core/chart.ts
|
|
10326
|
-
var
|
|
10358
|
+
var wc = class e {
|
|
10327
10359
|
dom;
|
|
10328
10360
|
opt;
|
|
10329
10361
|
data = [];
|
|
@@ -10342,8 +10374,9 @@ var Cc = class e {
|
|
|
10342
10374
|
};
|
|
10343
10375
|
paneRatios = /* @__PURE__ */ new Map();
|
|
10344
10376
|
onViewportChange;
|
|
10377
|
+
onPaneLayoutChange;
|
|
10345
10378
|
constructor(e, t) {
|
|
10346
|
-
this.dom = e, this.opt = t, this.interaction = new
|
|
10379
|
+
this.dom = e, this.opt = t, this.interaction = new ys(this), this.markerManager = new bo(), this.pluginHost = fa(), this.rendererPluginManager = new ma(), this.rendererPluginManager.setPluginHost(this.pluginHost), this.rendererPluginManager.setInvalidateCallback(() => this.scheduleDraw()), this.syncPaneRatiosFromSpecs(this.opt.panes), this.initPanes(), this.initResizeObserver();
|
|
10347
10380
|
}
|
|
10348
10381
|
initResizeObserver() {
|
|
10349
10382
|
if (typeof ResizeObserver > "u") return;
|
|
@@ -10449,6 +10482,13 @@ var Cc = class e {
|
|
|
10449
10482
|
ctx: o,
|
|
10450
10483
|
pane: {
|
|
10451
10484
|
id: "xAxis",
|
|
10485
|
+
role: "auxiliary",
|
|
10486
|
+
capabilities: {
|
|
10487
|
+
showPriceAxisTicks: !1,
|
|
10488
|
+
showCrosshairPriceLabel: !1,
|
|
10489
|
+
candleHitTest: !1,
|
|
10490
|
+
supportsPriceTranslate: !1
|
|
10491
|
+
},
|
|
10452
10492
|
top: 0,
|
|
10453
10493
|
height: this.opt.bottomAxisHeight,
|
|
10454
10494
|
yAxis: {
|
|
@@ -10511,6 +10551,9 @@ var Cc = class e {
|
|
|
10511
10551
|
setOnViewportChange(e) {
|
|
10512
10552
|
this.onViewportChange = e;
|
|
10513
10553
|
}
|
|
10554
|
+
setOnPaneLayoutChange(e) {
|
|
10555
|
+
this.onPaneLayoutChange = e;
|
|
10556
|
+
}
|
|
10514
10557
|
getPaneRenderers() {
|
|
10515
10558
|
return this.paneRenderers;
|
|
10516
10559
|
}
|
|
@@ -10537,24 +10580,77 @@ var Cc = class e {
|
|
|
10537
10580
|
return s;
|
|
10538
10581
|
}
|
|
10539
10582
|
updateOptions(e) {
|
|
10583
|
+
if (e.panes) {
|
|
10584
|
+
let t = e.panes.map((e) => ({ ...e }));
|
|
10585
|
+
this.opt = {
|
|
10586
|
+
...this.opt,
|
|
10587
|
+
...e,
|
|
10588
|
+
panes: t
|
|
10589
|
+
}, this.applyPaneLayoutSpecs(t);
|
|
10590
|
+
return;
|
|
10591
|
+
}
|
|
10540
10592
|
this.opt = {
|
|
10541
10593
|
...this.opt,
|
|
10542
10594
|
...e
|
|
10543
|
-
},
|
|
10595
|
+
}, this.resize();
|
|
10544
10596
|
}
|
|
10545
10597
|
updatePaneLayout(e) {
|
|
10546
|
-
this.
|
|
10598
|
+
this.applyPaneLayoutSpecs(e);
|
|
10599
|
+
}
|
|
10600
|
+
setPaneDefinitions(e) {
|
|
10601
|
+
this.applyPaneLayoutSpecs(e);
|
|
10602
|
+
}
|
|
10603
|
+
upsertPane(e) {
|
|
10604
|
+
let t = this.opt.panes.findIndex((t) => t.id === e.id);
|
|
10605
|
+
if (t === -1) {
|
|
10606
|
+
this.applyPaneLayoutSpecs([...this.opt.panes, { ...e }]);
|
|
10607
|
+
return;
|
|
10608
|
+
}
|
|
10609
|
+
let n = [...this.opt.panes];
|
|
10610
|
+
n[t] = {
|
|
10611
|
+
...n[t],
|
|
10612
|
+
...e
|
|
10613
|
+
}, this.applyPaneLayoutSpecs(n);
|
|
10614
|
+
}
|
|
10615
|
+
removePaneDefinition(e) {
|
|
10616
|
+
this.opt.panes.some((t) => t.id === e) && (this.paneRatios.delete(e), this.applyPaneLayoutSpecs(this.opt.panes.filter((t) => t.id !== e)));
|
|
10617
|
+
}
|
|
10618
|
+
bindIndicatorToPane(e, t, n) {
|
|
10619
|
+
this.opt.panes.some((t) => t.id === e) || this.upsertPane({
|
|
10620
|
+
id: e,
|
|
10621
|
+
ratio: 1,
|
|
10622
|
+
visible: !0,
|
|
10623
|
+
role: "indicator"
|
|
10624
|
+
});
|
|
10625
|
+
let r = `${t.toLowerCase()}_${e}`;
|
|
10626
|
+
if (this.getRenderer(r)) {
|
|
10627
|
+
n && this.updateRendererConfig(r, n);
|
|
10628
|
+
return;
|
|
10629
|
+
}
|
|
10630
|
+
let i = Cc({
|
|
10631
|
+
indicatorId: t,
|
|
10632
|
+
paneId: e
|
|
10633
|
+
});
|
|
10634
|
+
this.useRenderer(i, n);
|
|
10547
10635
|
}
|
|
10548
10636
|
getPaneLayoutSpecs() {
|
|
10549
10637
|
let e = this.opt.panes.filter((e) => e.visible !== !1).reduce((e, t) => e + (this.paneRatios.get(t.id) ?? t.ratio ?? 0), 0), t = e > 0 ? e : 1;
|
|
10550
10638
|
return this.opt.panes.map((e) => {
|
|
10551
|
-
let n = this.paneRatios.get(e.id) ?? e.ratio ?? 0, r = e.visible === !1 ? n : n / t;
|
|
10639
|
+
let n = this.paneRatios.get(e.id) ?? e.ratio ?? 0, r = e.visible === !1 ? n : n / t, i = this.paneRenderers.find((t) => t.getPane().id === e.id)?.getPane();
|
|
10552
10640
|
return {
|
|
10553
10641
|
...e,
|
|
10554
|
-
ratio: r
|
|
10642
|
+
ratio: r,
|
|
10643
|
+
role: i?.role ?? e.role,
|
|
10644
|
+
capabilities: i ? { ...i.capabilities } : e.capabilities
|
|
10555
10645
|
};
|
|
10556
10646
|
});
|
|
10557
10647
|
}
|
|
10648
|
+
emitPaneLayoutChange() {
|
|
10649
|
+
this.onPaneLayoutChange?.(this.getPaneLayoutSpecs());
|
|
10650
|
+
}
|
|
10651
|
+
applyPaneLayoutSpecs(e) {
|
|
10652
|
+
this.opt.panes = e.map((e) => ({ ...e })), this.syncPaneRatiosFromSpecs(this.opt.panes), this.initPanes(), this.layoutPanes(), this.emitPaneLayoutChange(), this.scheduleDraw();
|
|
10653
|
+
}
|
|
10558
10654
|
resizePaneBoundary(e, t) {
|
|
10559
10655
|
if (!Number.isFinite(t) || t === 0) return !1;
|
|
10560
10656
|
let n = this.viewport;
|
|
@@ -10563,81 +10659,101 @@ var Cc = class e {
|
|
|
10563
10659
|
if (i < 0 || i >= r.length - 1) return !1;
|
|
10564
10660
|
let a = r[i], o = r[i + 1];
|
|
10565
10661
|
if (!a || !o) return !1;
|
|
10566
|
-
let s =
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10662
|
+
let s = /* @__PURE__ */ new Map();
|
|
10663
|
+
for (let e of r) {
|
|
10664
|
+
let t = this.paneRenderers.find((t) => t.getPane().id === e.id);
|
|
10665
|
+
t && s.set(e.id, t.getPane().height);
|
|
10666
|
+
}
|
|
10667
|
+
let c = t > 0 ? i : i + 1, l = t > 0 ? i + 1 : i, u = t > 0 ? 1 : -1, d = Math.abs(t), f = l;
|
|
10668
|
+
for (; d > 0 && f >= 0 && f < r.length;) {
|
|
10669
|
+
let e = r[f];
|
|
10670
|
+
if (!e) break;
|
|
10671
|
+
let t = s.get(e.id) ?? 0, i = this.getPaneMinHeight(e, n.plotHeight), a = Math.max(0, t - i);
|
|
10672
|
+
if (a > 0) {
|
|
10673
|
+
let n = Math.min(a, d);
|
|
10674
|
+
s.set(e.id, t - n), d -= n;
|
|
10675
|
+
}
|
|
10676
|
+
d > 0 && (f += u);
|
|
10677
|
+
}
|
|
10678
|
+
if (d > 0) return !1;
|
|
10679
|
+
let p = r[c];
|
|
10680
|
+
if (!p) return !1;
|
|
10681
|
+
let m = s.get(p.id) ?? 0;
|
|
10682
|
+
s.set(p.id, m + Math.abs(t));
|
|
10683
|
+
let h = Math.max(0, this.opt.paneGap ?? 0) * Math.max(0, r.length - 1), g = Math.max(1, n.plotHeight - h);
|
|
10684
|
+
for (let e of r) {
|
|
10685
|
+
let t = s.get(e.id) ?? 0;
|
|
10686
|
+
this.paneRatios.set(e.id, t / g);
|
|
10687
|
+
}
|
|
10688
|
+
return this.normalizeVisiblePaneRatios(r), this.syncPaneRatiosToSpecs(), this.layoutPanes(), this.emitPaneLayoutChange(), this.scheduleDraw(), !0;
|
|
10689
|
+
}
|
|
10690
|
+
resolvePaneRole(e, t) {
|
|
10691
|
+
return e.role ? e.role : t === 0 ? "price" : "indicator";
|
|
10576
10692
|
}
|
|
10577
10693
|
addPane(e) {
|
|
10578
|
-
if (this.
|
|
10694
|
+
if (this.opt.panes.some((t) => t.id === e)) {
|
|
10579
10695
|
console.warn(`Pane "${e}" already exists`);
|
|
10580
10696
|
return;
|
|
10581
10697
|
}
|
|
10582
|
-
let t =
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
yPaddingPx: 0,
|
|
10590
|
-
priceLabelWidth: this.opt.priceLabelWidth
|
|
10591
|
-
});
|
|
10592
|
-
this.paneRenderers.push(a);
|
|
10593
|
-
let o = this.dom.canvasLayer;
|
|
10594
|
-
o && (o.appendChild(n), o.appendChild(r)), this.rendererPluginManager.addKnownPaneId(e);
|
|
10698
|
+
let t = this.opt.panes.some((e, t) => this.resolvePaneRole(e, t) === "price") ? "indicator" : "price";
|
|
10699
|
+
this.applyPaneLayoutSpecs([...this.opt.panes, {
|
|
10700
|
+
id: e,
|
|
10701
|
+
ratio: 1,
|
|
10702
|
+
visible: !0,
|
|
10703
|
+
role: t
|
|
10704
|
+
}]);
|
|
10595
10705
|
}
|
|
10596
10706
|
removePane(e) {
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
if (!n) return;
|
|
10601
|
-
let r = n.getDom();
|
|
10602
|
-
r.plotCanvas.remove(), r.yAxisCanvas.remove(), this.paneRenderers.splice(t, 1), this.rendererPluginManager.removeKnownPaneId(e);
|
|
10707
|
+
if (!this.opt.panes.some((t) => t.id === e)) return;
|
|
10708
|
+
let t = this.opt.panes.filter((t) => t.id !== e);
|
|
10709
|
+
this.paneRatios.delete(e), this.applyPaneLayoutSpecs(t);
|
|
10603
10710
|
}
|
|
10604
10711
|
hasPane(e) {
|
|
10605
|
-
return this.
|
|
10712
|
+
return this.opt.panes.some((t) => t.id === e);
|
|
10606
10713
|
}
|
|
10607
10714
|
static SUB_PANE_PREFIX = "sub_";
|
|
10608
10715
|
createSubPane(t, n) {
|
|
10609
|
-
let r = `${e.SUB_PANE_PREFIX}${t}`;
|
|
10610
|
-
if (this.
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10716
|
+
let r = `${e.SUB_PANE_PREFIX}${t}`, i = `${t.toLowerCase()}_${r}`;
|
|
10717
|
+
if (this.getRenderer(i)) return n && this.updateRendererConfig(i, n), !0;
|
|
10718
|
+
let a = this.opt.panes.filter((e) => e.visible !== !1), o = a.filter((e, t) => this.resolvePaneRole(e, t) === "price"), s = a.filter((e, t) => this.resolvePaneRole(e, t) === "indicator");
|
|
10719
|
+
if (o.length === 1) {
|
|
10720
|
+
let e = o[0];
|
|
10721
|
+
e && this.paneRatios.set(e.id, 3);
|
|
10722
|
+
for (let e of s) this.paneRatios.set(e.id, 1);
|
|
10723
|
+
this.paneRatios.set(r, 1);
|
|
10724
|
+
} else this.paneRatios.set(r, 1);
|
|
10725
|
+
return this.upsertPane({
|
|
10726
|
+
id: r,
|
|
10727
|
+
ratio: this.paneRatios.get(r) ?? 1,
|
|
10728
|
+
visible: !0,
|
|
10729
|
+
role: "indicator"
|
|
10730
|
+
}), this.bindIndicatorToPane(r, t, n), !0;
|
|
10620
10731
|
}
|
|
10621
10732
|
removeSubPane(t) {
|
|
10622
10733
|
let n = `${e.SUB_PANE_PREFIX}${t}`;
|
|
10623
10734
|
if (!this.hasPane(n)) return;
|
|
10624
10735
|
let r = `${t.toLowerCase()}_${n}`;
|
|
10625
|
-
this.removeRenderer(r), this.
|
|
10736
|
+
this.removeRenderer(r), this.paneRatios.delete(n), this.applyPaneLayoutSpecs(this.opt.panes.filter((e) => e.id !== n));
|
|
10626
10737
|
}
|
|
10627
10738
|
clearSubPanes() {
|
|
10628
|
-
let t = this.
|
|
10629
|
-
|
|
10630
|
-
let
|
|
10631
|
-
|
|
10739
|
+
let t = this.opt.panes.map((e) => e.id).filter((t) => t.startsWith(e.SUB_PANE_PREFIX));
|
|
10740
|
+
if (t.length !== 0) {
|
|
10741
|
+
for (let n of t) {
|
|
10742
|
+
let t = `${n.slice(e.SUB_PANE_PREFIX.length).toLowerCase()}_${n}`;
|
|
10743
|
+
this.removeRenderer(t), this.paneRatios.delete(n);
|
|
10744
|
+
}
|
|
10745
|
+
this.applyPaneLayoutSpecs(this.opt.panes.filter((t) => !t.id.startsWith(e.SUB_PANE_PREFIX)));
|
|
10632
10746
|
}
|
|
10633
10747
|
}
|
|
10634
10748
|
getSubPaneIndicators() {
|
|
10635
|
-
return this.
|
|
10749
|
+
return this.opt.panes.map((e) => e.id).filter((t) => t.startsWith(e.SUB_PANE_PREFIX)).map((t) => t.slice(e.SUB_PANE_PREFIX.length));
|
|
10636
10750
|
}
|
|
10637
10751
|
translatePrice(e, t) {
|
|
10638
10752
|
let n = this.paneRenderers.find((t) => t.getPane().id === e);
|
|
10639
10753
|
if (!n) return;
|
|
10640
|
-
let r = n.getPane()
|
|
10754
|
+
let r = n.getPane();
|
|
10755
|
+
if (!r.capabilities.supportsPriceTranslate) return;
|
|
10756
|
+
let i = r.yAxis.deltaYToPriceOffset(t), a = r.yAxis.getPriceOffset();
|
|
10641
10757
|
r.yAxis.setPriceOffset(a + i), this.scheduleDraw();
|
|
10642
10758
|
}
|
|
10643
10759
|
updateData(e) {
|
|
@@ -10658,7 +10774,7 @@ var Cc = class e {
|
|
|
10658
10774
|
}
|
|
10659
10775
|
resize() {
|
|
10660
10776
|
let e = this.computeViewport();
|
|
10661
|
-
!e || e.viewWidth < 10 || e.viewHeight < 10 || (this.layoutPanes(), this.scheduleDraw());
|
|
10777
|
+
!e || e.viewWidth < 10 || e.viewHeight < 10 || (this.layoutPanes(), this.emitPaneLayoutChange(), this.scheduleDraw());
|
|
10662
10778
|
}
|
|
10663
10779
|
scheduleDraw() {
|
|
10664
10780
|
this.raf != null && cancelAnimationFrame(this.raf), this.raf = requestAnimationFrame(() => {
|
|
@@ -10669,15 +10785,18 @@ var Cc = class e {
|
|
|
10669
10785
|
this.raf != null && cancelAnimationFrame(this.raf), this.raf = null, this.resizeObserver?.disconnect(), this.resizeObserver = void 0, this.preciseDpr = 0, this.observedSize = {
|
|
10670
10786
|
width: 0,
|
|
10671
10787
|
height: 0
|
|
10672
|
-
}, this.viewport = null, this.paneRenderers.forEach((e) => e.destroy()), this.paneRenderers = [], this.rendererPluginManager.clear(), this.onZoomChange = void 0, this.onViewportChange = void 0, await this.pluginHost.destroy();
|
|
10788
|
+
}, this.viewport = null, this.paneRenderers.forEach((e) => e.destroy()), this.paneRenderers = [], this.rendererPluginManager.clear(), this.onZoomChange = void 0, this.onViewportChange = void 0, this.onPaneLayoutChange = void 0, await this.pluginHost.destroy();
|
|
10673
10789
|
}
|
|
10674
10790
|
initPanes() {
|
|
10675
|
-
this.paneRenderers = this.opt.panes.map((e) => {
|
|
10676
|
-
let
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
},
|
|
10791
|
+
this.paneRenderers = this.opt.panes.map((e, t) => {
|
|
10792
|
+
let n = new vs(e.id, {
|
|
10793
|
+
role: this.resolvePaneRole(e, t),
|
|
10794
|
+
capabilities: e.capabilities
|
|
10795
|
+
}), r = document.createElement("canvas"), i = document.createElement("canvas"), a = n.role === "price";
|
|
10796
|
+
return r.id = `${e.id}-plot`, r.className = a ? "plot-canvas main" : "plot-canvas sub", r.style.position = "absolute", r.style.left = "0", r.style.top = "0", i.id = `${e.id}-yAxis`, i.className = "right-axis", i.style.position = "absolute", i.style.right = "0", new bs({
|
|
10797
|
+
plotCanvas: r,
|
|
10798
|
+
yAxisCanvas: i
|
|
10799
|
+
}, n, {
|
|
10681
10800
|
rightAxisWidth: this.opt.rightAxisWidth,
|
|
10682
10801
|
yPaddingPx: this.opt.yPaddingPx,
|
|
10683
10802
|
priceLabelWidth: this.opt.priceLabelWidth
|
|
@@ -10687,7 +10806,7 @@ var Cc = class e {
|
|
|
10687
10806
|
e && (e.querySelectorAll("canvas:not(.x-axis-canvas)").forEach((e) => e.remove()), this.paneRenderers.forEach((t) => {
|
|
10688
10807
|
let n = t.getDom();
|
|
10689
10808
|
e.appendChild(n.plotCanvas), e.appendChild(n.yAxisCanvas);
|
|
10690
|
-
}));
|
|
10809
|
+
})), this.rendererPluginManager.setKnownPaneIds(this.paneRenderers.map((e) => e.getPane().id));
|
|
10691
10810
|
}
|
|
10692
10811
|
syncPaneRatiosFromSpecs(e) {
|
|
10693
10812
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -10729,7 +10848,7 @@ var Cc = class e {
|
|
|
10729
10848
|
}
|
|
10730
10849
|
}
|
|
10731
10850
|
getPaneMinHeight(e, t) {
|
|
10732
|
-
let n = this.opt.defaultPaneMinHeightPx ??
|
|
10851
|
+
let n = this.opt.defaultPaneMinHeightPx ?? 120, r = e.minHeightPx ?? n;
|
|
10733
10852
|
return Math.max(1, Math.min(Math.round(r), Math.max(1, t)));
|
|
10734
10853
|
}
|
|
10735
10854
|
computePaneHeightsByRatio(e, t) {
|
|
@@ -10764,7 +10883,7 @@ var Cc = class e {
|
|
|
10764
10883
|
let s = this.paneRenderers.find((e) => e.getPane().id === a.id);
|
|
10765
10884
|
if (!s) continue;
|
|
10766
10885
|
let c = s.getPane(), l = o[i] ?? 1;
|
|
10767
|
-
c.setLayout(r, l), c.
|
|
10886
|
+
c.setLayout(r, l), c.setPadding(this.opt.yPaddingPx, this.opt.yPaddingPx), s.resize(e.plotWidth, l, e.dpr), this.rendererPluginManager.notifyResize(c.id, aa(c));
|
|
10768
10887
|
let u = s.getDom();
|
|
10769
10888
|
u.plotCanvas.style.top = `${r}px`, u.yAxisCanvas.style.top = `${r}px`, r += l + n;
|
|
10770
10889
|
}
|
|
@@ -10797,18 +10916,18 @@ var Cc = class e {
|
|
|
10797
10916
|
};
|
|
10798
10917
|
//#endregion
|
|
10799
10918
|
//#region src/types/kLine.ts
|
|
10800
|
-
function
|
|
10919
|
+
function Tc(e) {
|
|
10801
10920
|
return e.open > e.close ? "down" : e.open < e.close ? "up" : "flat";
|
|
10802
10921
|
}
|
|
10803
10922
|
//#endregion
|
|
10804
10923
|
//#region src/types/volumePrice.ts
|
|
10805
10924
|
var $ = /* @__PURE__ */ function(e) {
|
|
10806
10925
|
return e.RISE_WITH_VOLUME = "rise_with_volume", e.RISE_WITHOUT_VOLUME = "rise_without_volume", e.FALL_WITH_VOLUME = "fall_with_volume", e.FALL_WITHOUT_VOLUME = "fall_without_volume", e.OTHERS = "others", e;
|
|
10807
|
-
}({}),
|
|
10926
|
+
}({}), Ec = {
|
|
10808
10927
|
volumeAmplifyThreshold: 1.5,
|
|
10809
10928
|
volumeShrinkThreshold: .8,
|
|
10810
10929
|
avgPeriod: 20
|
|
10811
|
-
},
|
|
10930
|
+
}, Dc = class {
|
|
10812
10931
|
prefixSum = [];
|
|
10813
10932
|
dataLength = 0;
|
|
10814
10933
|
build(e) {
|
|
@@ -10833,8 +10952,8 @@ var $ = /* @__PURE__ */ function(e) {
|
|
|
10833
10952
|
return this.dataLength;
|
|
10834
10953
|
}
|
|
10835
10954
|
};
|
|
10836
|
-
function
|
|
10837
|
-
let i = new
|
|
10955
|
+
function Oc(e, t, n, r = Ec) {
|
|
10956
|
+
let i = new Dc();
|
|
10838
10957
|
i.build(e);
|
|
10839
10958
|
let a = [], { volumeAmplifyThreshold: o, volumeShrinkThreshold: s, avgPeriod: c } = r;
|
|
10840
10959
|
for (let r = t; r < n && r < e.length; r++) {
|
|
@@ -10855,7 +10974,7 @@ function Dc(e, t, n, r = Tc) {
|
|
|
10855
10974
|
}
|
|
10856
10975
|
//#endregion
|
|
10857
10976
|
//#region src/core/renderers/candle.ts
|
|
10858
|
-
function
|
|
10977
|
+
function kc() {
|
|
10859
10978
|
return {
|
|
10860
10979
|
name: "candle",
|
|
10861
10980
|
version: "1.0.0",
|
|
@@ -10868,34 +10987,34 @@ function Oc() {
|
|
|
10868
10987
|
if (!d.length) return;
|
|
10869
10988
|
let { kWidthPx: f } = ps(o, s, c);
|
|
10870
10989
|
t.save(), t.translate(-a, 0);
|
|
10871
|
-
let p = l || [], m =
|
|
10990
|
+
let p = l || [], m = Oc(d, i.start, i.end, Ec);
|
|
10872
10991
|
for (let e = i.start; e < i.end && e < d.length; e++) {
|
|
10873
10992
|
let r = d[e];
|
|
10874
10993
|
if (!r) continue;
|
|
10875
10994
|
let a = n.yAxis.priceToY(r.open), s = n.yAxis.priceToY(r.close), l = n.yAxis.priceToY(r.high), h = n.yAxis.priceToY(r.low), g = p[e - i.start];
|
|
10876
10995
|
if (!g) continue;
|
|
10877
|
-
let _ = (e) => Math.round(e * c) / c, v = _(a), y = _(s), b = _(l), x = _(h), S = Math.min(v, y), C = Math.max(Math.abs(v - y), 1), w =
|
|
10878
|
-
t.fillStyle =
|
|
10996
|
+
let _ = (e) => Math.round(e * c) / c, v = _(a), y = _(s), b = _(l), x = _(h), S = Math.min(v, y), C = Math.max(Math.abs(v - y), 1), w = Ds(Math.round(g * c), S, f, C, c);
|
|
10997
|
+
t.fillStyle = Tc(r) === "up" ? ka.UP : ka.DOWN, t.fillRect(w.bodyRect.x, w.bodyRect.y, w.bodyRect.width, w.bodyRect.height);
|
|
10879
10998
|
let T = w.wickRect.width, E = w.wickRect.x, D = w.bodyRect.y, O = w.bodyRect.y + w.bodyRect.height, k = Math.max(r.open, r.close), A = Math.min(r.open, r.close);
|
|
10880
10999
|
if (r.high > k) {
|
|
10881
|
-
let e =
|
|
11000
|
+
let e = Ts(E, b, D, c);
|
|
10882
11001
|
e && t.fillRect(e.x, e.y, T, e.height);
|
|
10883
11002
|
}
|
|
10884
11003
|
if (r.low < A) {
|
|
10885
|
-
let e =
|
|
11004
|
+
let e = Ts(E, O, x, c);
|
|
10886
11005
|
e && t.fillRect(e.x, e.y, T, e.height);
|
|
10887
11006
|
}
|
|
10888
11007
|
let j = m[e - i.start];
|
|
10889
11008
|
if (j !== $.OTHERS && u) {
|
|
10890
11009
|
let n = j === $.RISE_WITH_VOLUME || j === $.RISE_WITHOUT_VOLUME ? b - 15 : x + 15;
|
|
10891
|
-
|
|
11010
|
+
Ac(t, w.bodyRect.x + w.bodyRect.width / 2, n, j, e, o, 4, u, c);
|
|
10892
11011
|
}
|
|
10893
11012
|
}
|
|
10894
11013
|
t.restore();
|
|
10895
11014
|
}
|
|
10896
11015
|
};
|
|
10897
11016
|
}
|
|
10898
|
-
function
|
|
11017
|
+
function Ac(e, t, n, r, i, a, o = 4, s, c) {
|
|
10899
11018
|
let l = (e) => Math.round(e * c) / c;
|
|
10900
11019
|
t = l(t), n = l(n);
|
|
10901
11020
|
let u = Math.min(a, 20), d = u * Math.sqrt(3) / 2, f, p;
|
|
@@ -10961,12 +11080,12 @@ function kc(e, t, n, r, i, a, o = 4, s, c) {
|
|
|
10961
11080
|
}
|
|
10962
11081
|
//#endregion
|
|
10963
11082
|
//#region src/core/utils/tickCount.ts
|
|
10964
|
-
function
|
|
11083
|
+
function jc(e, t) {
|
|
10965
11084
|
return Math.max(3, Math.round(e / 60) + 1);
|
|
10966
11085
|
}
|
|
10967
11086
|
//#endregion
|
|
10968
11087
|
//#region src/core/renderers/gridLines.ts
|
|
10969
|
-
function
|
|
11088
|
+
function Mc() {
|
|
10970
11089
|
return {
|
|
10971
11090
|
name: "gridLines",
|
|
10972
11091
|
version: "1.0.0",
|
|
@@ -10977,11 +11096,11 @@ function jc() {
|
|
|
10977
11096
|
draw(e) {
|
|
10978
11097
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, dpr: s, kLinePositions: c } = e, l = r;
|
|
10979
11098
|
if (!l.length) return;
|
|
10980
|
-
let u =
|
|
11099
|
+
let u = jc(n.height);
|
|
10981
11100
|
t.save(), t.fillStyle = Ma.HORIZONTAL, t.translate(-a, 0);
|
|
10982
11101
|
let d = t.canvas.width / s, f = a, p = a + d, m = n.yAxis.getPaddingTop(), h = n.yAxis.getPaddingBottom(), g = m, _ = Math.max(m, n.height - h), v = Math.max(0, _ - g);
|
|
10983
11102
|
for (let e = 0; e < u; e++) {
|
|
10984
|
-
let n = u <= 1 ? 0 : e / (u - 1), r =
|
|
11103
|
+
let n = u <= 1 ? 0 : e / (u - 1), r = Es(f, p, Math.round(g + n * v), s);
|
|
10985
11104
|
r && t.fillRect(r.x, r.y, r.width, r.height);
|
|
10986
11105
|
}
|
|
10987
11106
|
let y = Da(l);
|
|
@@ -10989,7 +11108,7 @@ function jc() {
|
|
|
10989
11108
|
if (e < i.start || e >= i.end || e >= l.length) continue;
|
|
10990
11109
|
let r = e - i.start;
|
|
10991
11110
|
if (r < 0 || r >= c.length) continue;
|
|
10992
|
-
let a =
|
|
11111
|
+
let a = Ts(c[r] + o / 2, 0, n.height, s);
|
|
10993
11112
|
a && t.fillRect(a.x, a.y, a.width, a.height);
|
|
10994
11113
|
}
|
|
10995
11114
|
t.restore();
|
|
@@ -10998,7 +11117,7 @@ function jc() {
|
|
|
10998
11117
|
}
|
|
10999
11118
|
//#endregion
|
|
11000
11119
|
//#region src/core/renderers/lastPrice.ts
|
|
11001
|
-
function
|
|
11120
|
+
function Nc() {
|
|
11002
11121
|
return {
|
|
11003
11122
|
name: "lastPriceLine",
|
|
11004
11123
|
version: "1.0.0",
|
|
@@ -11019,17 +11138,17 @@ function Mc() {
|
|
|
11019
11138
|
}
|
|
11020
11139
|
//#endregion
|
|
11021
11140
|
//#region src/core/renderers/extremaMarkers.ts
|
|
11022
|
-
function
|
|
11141
|
+
function Pc() {
|
|
11023
11142
|
return {
|
|
11024
11143
|
name: "extremaMarkers",
|
|
11025
11144
|
version: "1.0.0",
|
|
11026
11145
|
description: "可视区最高/最低价标注渲染器",
|
|
11027
11146
|
debugName: "极值标记",
|
|
11028
|
-
paneId:
|
|
11147
|
+
paneId: oa,
|
|
11029
11148
|
priority: X.OVERLAY,
|
|
11030
11149
|
draw(e) {
|
|
11031
11150
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, dpr: s, paneWidth: c, kLinePositions: l } = e, u = r;
|
|
11032
|
-
if (!u.length || n.
|
|
11151
|
+
if (!u.length || n.role !== "price") return;
|
|
11033
11152
|
let d = Math.max(0, i.start), f = Math.min(u.length, i.end);
|
|
11034
11153
|
if (f - d <= 0) return;
|
|
11035
11154
|
let p = -Infinity, m = Infinity, h = d, g = d;
|
|
@@ -11042,45 +11161,45 @@ function Nc() {
|
|
|
11042
11161
|
let t = e - i.start;
|
|
11043
11162
|
return t < 0 || t >= l.length ? 0 : l[t] + o / 2;
|
|
11044
11163
|
};
|
|
11045
|
-
t.save(), t.translate(-a, 0),
|
|
11164
|
+
t.save(), t.translate(-a, 0), Fc(t, _(h), n.yAxis.priceToY(p), p, s, c, a), Fc(t, _(g), n.yAxis.priceToY(m), m, s, c, a), t.restore();
|
|
11046
11165
|
}
|
|
11047
11166
|
};
|
|
11048
11167
|
}
|
|
11049
|
-
function
|
|
11168
|
+
function Fc(e, t, n, r, i, a, o) {
|
|
11050
11169
|
let s = r.toFixed(2);
|
|
11051
11170
|
e.font = "12px Arial";
|
|
11052
11171
|
let c = e.measureText(s).width, l = t - o + 30 + 4 + c > a, u = t, d = l ? t - 30 : t + 30;
|
|
11053
11172
|
u > d && ([u, d] = [d, u]);
|
|
11054
|
-
let f =
|
|
11173
|
+
let f = Es(u, d, n, i);
|
|
11055
11174
|
f && (e.fillStyle = Oa.WEAK, e.fillRect(f.x, f.y, f.width, f.height));
|
|
11056
11175
|
let p = Z(d, i), m = Z(n, i);
|
|
11057
11176
|
e.fillStyle = Oa.WEAK, e.beginPath(), e.arc(p, m, 2, 0, Math.PI * 2), e.fill(), e.font = "12px Arial", e.textBaseline = "middle", e.fillStyle = ka.NEUTRAL, l ? (e.textAlign = "right", e.fillText(s, Z(t - 30 - 4, i), Z(n, i))) : (e.textAlign = "left", e.fillText(s, Z(t + 30 + 4, i), Z(n, i)));
|
|
11058
11177
|
}
|
|
11059
11178
|
//#endregion
|
|
11060
11179
|
//#region src/utils/priceToY.ts
|
|
11061
|
-
function
|
|
11180
|
+
function Ic(e, t, n, r, i, a) {
|
|
11062
11181
|
let o = t - n || 1, s = Math.max(1, r - i - a);
|
|
11063
11182
|
return n + (1 - (Math.min(Math.max(e, i), i + s) - i) / s) * o;
|
|
11064
11183
|
}
|
|
11065
11184
|
//#endregion
|
|
11066
11185
|
//#region src/utils/kLineDraw/axis.ts
|
|
11067
|
-
function
|
|
11186
|
+
function Lc(e, t) {
|
|
11068
11187
|
let { x: n, y: r, width: i, height: a, crosshairX: o, timestamp: s, dpr: c, fontSize: l = 16, paddingX: u = 8 } = t, d = Ea(s);
|
|
11069
11188
|
e.save(), e.font = `${l}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
11070
11189
|
let f = Math.round(e.measureText(d).width), p = Math.min(i, f + u * 2), m = a, h = Math.min(Math.max(o, n + p / 2), n + i - p / 2), g = r + a / 2, _ = h - p / 2, v = r;
|
|
11071
11190
|
e.fillStyle = "rgba(0, 0, 0, 0.8)", e.fillRect(Z(_, c), Z(v, c), Z(p, c), Z(m, c)), e.fillStyle = "#ffffff", e.fillText(d, Z(h, c), Z(g, c)), e.restore();
|
|
11072
11191
|
}
|
|
11073
|
-
function
|
|
11074
|
-
let { x: n, y: r, width: i, height: a, crosshairY: o, priceRange: s, yPaddingPx: c = 0, dpr: l, fontSize: u = 16 } = t,
|
|
11192
|
+
function Rc(e, t) {
|
|
11193
|
+
let { x: n, y: r, width: i, height: a, crosshairY: o, priceRange: s, yPaddingPx: c = 0, dpr: l, fontSize: u = 16, priceOffset: d = 0, price: f } = t, p = Math.max(0, Math.min(c, Math.floor(a / 2) - 1)), { maxPrice: m, minPrice: h } = s, g = (f ?? Ic(o - r, m, h, a, p, p) + d).toFixed(2);
|
|
11075
11194
|
e.save(), e.font = `${u}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
11076
|
-
let
|
|
11195
|
+
let _ = u + 4, v = i, y = Math.min(Math.max(o, r + _ / 2), r + a - _ / 2), b = y - _ / 2;
|
|
11077
11196
|
e.fillStyle = "rgba(0, 0, 0, 0.8)";
|
|
11078
|
-
let
|
|
11079
|
-
e.fillRect(
|
|
11080
|
-
let
|
|
11081
|
-
e.fillStyle = "#ffffff", e.fillText(
|
|
11197
|
+
let x = Z(n, l), S = Z(b, l), C = Z(v, l), w = Z(_, l);
|
|
11198
|
+
e.fillRect(x, S, C, w);
|
|
11199
|
+
let T = n + i / 2;
|
|
11200
|
+
e.fillStyle = "#ffffff", e.fillText(g, Z(T, l), Z(y, l)), e.restore();
|
|
11082
11201
|
}
|
|
11083
|
-
function
|
|
11202
|
+
function zc(e, t) {
|
|
11084
11203
|
let { x: n, y: r, width: i, height: a, data: o, scrollLeft: s, kWidth: c, kGap: l, startIndex: u, endIndex: d, dpr: f, bgColor: p = Aa.TRANSPARENT, textColor: m = Oa.SECONDARY, lineColor: h = ja.DARK, fontSize: g = 12, paddingX: _ = 8, drawTopBorder: v = !0, drawBottomBorder: y = !0 } = t, b = Math.round(c * f), x = b % 2 == 0 ? b + 1 : b, S = Math.round(l * f), C = x + S, w = S, T = C / f, E = w / f, D = x / f;
|
|
11085
11204
|
e.fillStyle = p, e.fillRect(n, r, i, a), v && (e.strokeStyle = h, e.lineWidth = 1, e.beginPath(), e.moveTo(n, Q(r, f)), e.lineTo(n + i, Q(r, f)), e.stroke()), y && (e.strokeStyle = h, e.lineWidth = 1, e.beginPath(), e.moveTo(n, Q(r + a, f)), e.lineTo(n + i, Q(r + a, f)), e.stroke()), e.textAlign = "center", e.textBaseline = "middle";
|
|
11086
11205
|
let O = r + a / 2 + 1, k = Da(o).filter((e) => e >= u && e < d);
|
|
@@ -11096,10 +11215,10 @@ function Rc(e, t) {
|
|
|
11096
11215
|
}
|
|
11097
11216
|
//#endregion
|
|
11098
11217
|
//#region src/core/renderers/Indicator/scale/indicator_scale.ts
|
|
11099
|
-
function
|
|
11218
|
+
function Bc(e) {
|
|
11100
11219
|
let { ctx: t, dpr: n, axisWidth: r, height: i, paddingTop: a, paddingBottom: o, valueMin: s, valueMax: c, isMain: l, decimals: u = 2, hideEdgeTicks: d = !0 } = e, f = c - s || 1;
|
|
11101
11220
|
t.save(), t.fillStyle = Aa.TRANSPARENT, t.fillRect(0, 0, r, i), t.font = "12px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif", t.textBaseline = "middle", t.textAlign = "center";
|
|
11102
|
-
let p = r / 2, m = a, h = Math.max(a, i - o), g = Math.max(0, h - m), _ =
|
|
11221
|
+
let p = r / 2, m = a, h = Math.max(a, i - o), g = Math.max(0, h - m), _ = jc(i, l), v = f / Math.max(1, _ - 1);
|
|
11103
11222
|
for (let e = 0; e < _; e++) {
|
|
11104
11223
|
if (d && (e === 0 || e === _ - 1)) continue;
|
|
11105
11224
|
let r = s + v * e, i = m + (1 - (_ <= 1 ? 0 : e / (_ - 1))) * g;
|
|
@@ -11109,8 +11228,8 @@ function zc(e) {
|
|
|
11109
11228
|
}
|
|
11110
11229
|
t.restore();
|
|
11111
11230
|
}
|
|
11112
|
-
function
|
|
11113
|
-
let { axisWidth: t, paneId: n, indicatorKey: r, label: i, decimals: a = 2 } = e, o =
|
|
11231
|
+
function Vc(e) {
|
|
11232
|
+
let { axisWidth: t, paneId: n, indicatorKey: r, label: i, decimals: a = 2 } = e, o = Vs(r, n), s = null;
|
|
11114
11233
|
return {
|
|
11115
11234
|
name: `${r}Scale_${n}`,
|
|
11116
11235
|
version: "1.0.0",
|
|
@@ -11125,25 +11244,27 @@ function Bc(e) {
|
|
|
11125
11244
|
let { yAxisCtx: n, pane: r, dpr: i } = e;
|
|
11126
11245
|
if (!n || !s) return;
|
|
11127
11246
|
let c = s.getSharedState(o);
|
|
11128
|
-
c
|
|
11247
|
+
if (!c) return;
|
|
11248
|
+
let l = r.yAxis.getPriceOffset();
|
|
11249
|
+
Bc({
|
|
11129
11250
|
ctx: n,
|
|
11130
11251
|
dpr: i,
|
|
11131
11252
|
axisWidth: t,
|
|
11132
11253
|
height: r.height,
|
|
11133
11254
|
paddingTop: r.yAxis.getPaddingTop(),
|
|
11134
11255
|
paddingBottom: r.yAxis.getPaddingBottom(),
|
|
11135
|
-
valueMin: c.valueMin,
|
|
11136
|
-
valueMax: c.valueMax,
|
|
11256
|
+
valueMin: c.valueMin + l,
|
|
11257
|
+
valueMax: c.valueMax + l,
|
|
11137
11258
|
isMain: !1,
|
|
11138
11259
|
decimals: a,
|
|
11139
|
-
hideEdgeTicks: !
|
|
11260
|
+
hideEdgeTicks: !1
|
|
11140
11261
|
});
|
|
11141
11262
|
}
|
|
11142
11263
|
};
|
|
11143
11264
|
}
|
|
11144
11265
|
//#endregion
|
|
11145
11266
|
//#region src/core/renderers/yAxis.ts
|
|
11146
|
-
function
|
|
11267
|
+
function Hc(e) {
|
|
11147
11268
|
return {
|
|
11148
11269
|
name: "yAxis",
|
|
11149
11270
|
version: "1.0.0",
|
|
@@ -11152,40 +11273,41 @@ function Vc(e) {
|
|
|
11152
11273
|
paneId: oa,
|
|
11153
11274
|
priority: X.SYSTEM_YAXIS,
|
|
11154
11275
|
draw(t) {
|
|
11155
|
-
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n;
|
|
11156
|
-
|
|
11157
|
-
zc({
|
|
11276
|
+
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s = r.yAxis.getPriceOffset();
|
|
11277
|
+
r.capabilities.showPriceAxisTicks && Bc({
|
|
11158
11278
|
ctx: o,
|
|
11159
11279
|
dpr: i,
|
|
11160
11280
|
axisWidth: e.axisWidth,
|
|
11161
11281
|
height: r.height,
|
|
11162
11282
|
paddingTop: r.yAxis.getPaddingTop(),
|
|
11163
11283
|
paddingBottom: r.yAxis.getPaddingBottom(),
|
|
11164
|
-
valueMin: r.priceRange.minPrice,
|
|
11165
|
-
valueMax: r.priceRange.maxPrice,
|
|
11284
|
+
valueMin: r.priceRange.minPrice + s,
|
|
11285
|
+
valueMax: r.priceRange.maxPrice + s,
|
|
11166
11286
|
isMain: !0,
|
|
11167
11287
|
decimals: 2,
|
|
11168
|
-
hideEdgeTicks: !
|
|
11288
|
+
hideEdgeTicks: !1
|
|
11169
11289
|
});
|
|
11170
|
-
let
|
|
11171
|
-
|
|
11290
|
+
let c = e.getCrosshair?.();
|
|
11291
|
+
c && c.activePaneId === r.id && c.price !== null && Rc(o, {
|
|
11172
11292
|
x: 0,
|
|
11173
11293
|
y: r.top,
|
|
11174
11294
|
width: e.axisWidth,
|
|
11175
11295
|
height: r.height,
|
|
11176
|
-
crosshairY:
|
|
11296
|
+
crosshairY: c.y,
|
|
11177
11297
|
priceRange: r.priceRange,
|
|
11178
11298
|
yPaddingPx: e.yPaddingPx,
|
|
11179
11299
|
dpr: i,
|
|
11180
|
-
fontSize: 12
|
|
11300
|
+
fontSize: 12,
|
|
11301
|
+
priceOffset: s,
|
|
11302
|
+
price: c.price
|
|
11181
11303
|
});
|
|
11182
11304
|
}
|
|
11183
11305
|
};
|
|
11184
11306
|
}
|
|
11185
11307
|
//#endregion
|
|
11186
11308
|
//#region src/core/renderers/Indicator/scale/macd_scale.ts
|
|
11187
|
-
function
|
|
11188
|
-
return
|
|
11309
|
+
function Uc(e) {
|
|
11310
|
+
return Vc({
|
|
11189
11311
|
axisWidth: e.axisWidth,
|
|
11190
11312
|
paneId: e.paneId,
|
|
11191
11313
|
indicatorKey: "macd",
|
|
@@ -11195,8 +11317,8 @@ function Hc(e) {
|
|
|
11195
11317
|
}
|
|
11196
11318
|
//#endregion
|
|
11197
11319
|
//#region src/core/renderers/Indicator/scale/rsi_scale.ts
|
|
11198
|
-
function
|
|
11199
|
-
return
|
|
11320
|
+
function Wc(e) {
|
|
11321
|
+
return Vc({
|
|
11200
11322
|
axisWidth: e.axisWidth,
|
|
11201
11323
|
paneId: e.paneId,
|
|
11202
11324
|
indicatorKey: "rsi",
|
|
@@ -11206,8 +11328,8 @@ function Uc(e) {
|
|
|
11206
11328
|
}
|
|
11207
11329
|
//#endregion
|
|
11208
11330
|
//#region src/core/renderers/Indicator/scale/cci_scale.ts
|
|
11209
|
-
function
|
|
11210
|
-
return
|
|
11331
|
+
function Gc(e) {
|
|
11332
|
+
return Vc({
|
|
11211
11333
|
axisWidth: e.axisWidth,
|
|
11212
11334
|
paneId: e.paneId,
|
|
11213
11335
|
indicatorKey: "cci",
|
|
@@ -11217,8 +11339,8 @@ function Wc(e) {
|
|
|
11217
11339
|
}
|
|
11218
11340
|
//#endregion
|
|
11219
11341
|
//#region src/core/renderers/Indicator/scale/stoch_scale.ts
|
|
11220
|
-
function
|
|
11221
|
-
return
|
|
11342
|
+
function Kc(e) {
|
|
11343
|
+
return Vc({
|
|
11222
11344
|
axisWidth: e.axisWidth,
|
|
11223
11345
|
paneId: e.paneId,
|
|
11224
11346
|
indicatorKey: "stoch",
|
|
@@ -11228,8 +11350,8 @@ function Gc(e) {
|
|
|
11228
11350
|
}
|
|
11229
11351
|
//#endregion
|
|
11230
11352
|
//#region src/core/renderers/Indicator/scale/mom_scale.ts
|
|
11231
|
-
function
|
|
11232
|
-
return
|
|
11353
|
+
function qc(e) {
|
|
11354
|
+
return Vc({
|
|
11233
11355
|
axisWidth: e.axisWidth,
|
|
11234
11356
|
paneId: e.paneId,
|
|
11235
11357
|
indicatorKey: "mom",
|
|
@@ -11239,8 +11361,8 @@ function Kc(e) {
|
|
|
11239
11361
|
}
|
|
11240
11362
|
//#endregion
|
|
11241
11363
|
//#region src/core/renderers/Indicator/scale/wmsr_scale.ts
|
|
11242
|
-
function
|
|
11243
|
-
return
|
|
11364
|
+
function Jc(e) {
|
|
11365
|
+
return Vc({
|
|
11244
11366
|
axisWidth: e.axisWidth,
|
|
11245
11367
|
paneId: e.paneId,
|
|
11246
11368
|
indicatorKey: "wmsr",
|
|
@@ -11250,8 +11372,8 @@ function qc(e) {
|
|
|
11250
11372
|
}
|
|
11251
11373
|
//#endregion
|
|
11252
11374
|
//#region src/core/renderers/Indicator/scale/kst_scale.ts
|
|
11253
|
-
function
|
|
11254
|
-
return
|
|
11375
|
+
function Yc(e) {
|
|
11376
|
+
return Vc({
|
|
11255
11377
|
axisWidth: e.axisWidth,
|
|
11256
11378
|
paneId: e.paneId,
|
|
11257
11379
|
indicatorKey: "kst",
|
|
@@ -11261,8 +11383,8 @@ function Jc(e) {
|
|
|
11261
11383
|
}
|
|
11262
11384
|
//#endregion
|
|
11263
11385
|
//#region src/core/renderers/Indicator/scale/fastk_scale.ts
|
|
11264
|
-
function
|
|
11265
|
-
return
|
|
11386
|
+
function Xc(e) {
|
|
11387
|
+
return Vc({
|
|
11266
11388
|
axisWidth: e.axisWidth,
|
|
11267
11389
|
paneId: e.paneId,
|
|
11268
11390
|
indicatorKey: "fastk",
|
|
@@ -11272,19 +11394,19 @@ function Yc(e) {
|
|
|
11272
11394
|
}
|
|
11273
11395
|
//#endregion
|
|
11274
11396
|
//#region src/core/renderers/timeAxis.ts
|
|
11275
|
-
var
|
|
11276
|
-
function
|
|
11397
|
+
var Zc = Symbol("time-axis");
|
|
11398
|
+
function Qc(e) {
|
|
11277
11399
|
return {
|
|
11278
11400
|
name: "timeAxis",
|
|
11279
11401
|
version: "1.0.0",
|
|
11280
11402
|
description: "时间轴渲染器",
|
|
11281
11403
|
debugName: "时间轴",
|
|
11282
|
-
paneId:
|
|
11404
|
+
paneId: Zc,
|
|
11283
11405
|
priority: X.SYSTEM_XAXIS,
|
|
11284
11406
|
isSystem: !0,
|
|
11285
11407
|
draw(t) {
|
|
11286
11408
|
let { ctx: n, data: r, range: i, scrollLeft: a, kWidth: o, kGap: s, dpr: c, paneWidth: l } = t, u = r, d = n, f = l, p = e.height;
|
|
11287
|
-
d.setTransform(1, 0, 0, 1, 0, 0), d.scale(c, c), d.clearRect(0, 0, f, p),
|
|
11409
|
+
d.setTransform(1, 0, 0, 1, 0, 0), d.scale(c, c), d.clearRect(0, 0, f, p), zc(d, {
|
|
11288
11410
|
x: 0,
|
|
11289
11411
|
y: 0,
|
|
11290
11412
|
width: f,
|
|
@@ -11302,7 +11424,7 @@ function Zc(e) {
|
|
|
11302
11424
|
let m = e.getCrosshair?.();
|
|
11303
11425
|
if (m && typeof m.index == "number") {
|
|
11304
11426
|
let e = u[m.index];
|
|
11305
|
-
e &&
|
|
11427
|
+
e && Lc(d, {
|
|
11306
11428
|
x: 0,
|
|
11307
11429
|
y: 0,
|
|
11308
11430
|
width: f,
|
|
@@ -11318,7 +11440,7 @@ function Zc(e) {
|
|
|
11318
11440
|
}
|
|
11319
11441
|
//#endregion
|
|
11320
11442
|
//#region src/core/renderers/crosshair.ts
|
|
11321
|
-
function
|
|
11443
|
+
function $c(e) {
|
|
11322
11444
|
return {
|
|
11323
11445
|
name: "crosshair",
|
|
11324
11446
|
version: "1.0.0",
|
|
@@ -11331,9 +11453,9 @@ function Qc(e) {
|
|
|
11331
11453
|
if (o.isDragging || !o.pos) return;
|
|
11332
11454
|
let { x: s } = o.pos, c = r.id === o.activePaneId, l = -1;
|
|
11333
11455
|
c && o.price !== null && (l = r.yAxis.priceToY(o.price)), n.save(), n.beginPath(), n.rect(0, 0, a, r.height), n.clip(), n.fillStyle = Wa.LINE;
|
|
11334
|
-
let u =
|
|
11456
|
+
let u = Ts(s, 0, r.height, i);
|
|
11335
11457
|
if (u && n.fillRect(u.x, u.y, u.width, u.height), c && l >= 0) {
|
|
11336
|
-
let e =
|
|
11458
|
+
let e = Es(0, a, Math.min(l, r.height - 1 / i), i);
|
|
11337
11459
|
e && n.fillRect(e.x, e.y, e.width, e.height);
|
|
11338
11460
|
}
|
|
11339
11461
|
n.restore();
|
|
@@ -11342,7 +11464,7 @@ function Qc(e) {
|
|
|
11342
11464
|
}
|
|
11343
11465
|
//#endregion
|
|
11344
11466
|
//#region src/core/renderers/paneTitle.ts
|
|
11345
|
-
function
|
|
11467
|
+
function el(e) {
|
|
11346
11468
|
let t = { ...e };
|
|
11347
11469
|
return {
|
|
11348
11470
|
name: `paneTitle_${e.paneId}`,
|
|
@@ -11383,7 +11505,7 @@ function $c(e) {
|
|
|
11383
11505
|
}
|
|
11384
11506
|
//#endregion
|
|
11385
11507
|
//#region src/components/KLineChart.vue?vue&type=script&setup=true&lang.ts
|
|
11386
|
-
var
|
|
11508
|
+
var tl = { class: "chart-wrapper" }, nl = 4, rl = /* @__PURE__ */ _o(/* @__PURE__ */ u({
|
|
11387
11509
|
__name: "KLineChart",
|
|
11388
11510
|
props: {
|
|
11389
11511
|
semanticConfig: {},
|
|
@@ -11412,7 +11534,7 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11412
11534
|
let k = _(null), A = _(null), j = _({
|
|
11413
11535
|
x: 0,
|
|
11414
11536
|
y: 0
|
|
11415
|
-
}), M = _(!1), N = _(!1), ee = _(!1), P = _({ main:
|
|
11537
|
+
}), M = _(!1), N = _(!1), ee = _(!1), P = _({ main: 3 }), F = _(null), I = _(null), te = _({
|
|
11416
11538
|
x: 0,
|
|
11417
11539
|
y: 0
|
|
11418
11540
|
}), ne = _(0), L = r(() => {
|
|
@@ -11435,13 +11557,6 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11435
11557
|
N.value = e.isResizingPaneBoundaryState(), ee.value = e.isHoveringPaneBoundaryState();
|
|
11436
11558
|
}
|
|
11437
11559
|
function z() {
|
|
11438
|
-
let e = C.value;
|
|
11439
|
-
if (!e) return;
|
|
11440
|
-
let t = e.getPaneLayoutSpecs(), n = {};
|
|
11441
|
-
for (let e of t) n[e.id] = e.ratio;
|
|
11442
|
-
P.value = n;
|
|
11443
|
-
}
|
|
11444
|
-
function ce() {
|
|
11445
11560
|
let e = C.value?.interaction;
|
|
11446
11561
|
if (!e) {
|
|
11447
11562
|
F.value = null, I.value = null, k.value = null, A.value = null, se();
|
|
@@ -11454,15 +11569,15 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11454
11569
|
y: t.y
|
|
11455
11570
|
}), se();
|
|
11456
11571
|
}
|
|
11457
|
-
function
|
|
11572
|
+
function ce() {
|
|
11458
11573
|
oe ||= requestAnimationFrame(() => {
|
|
11459
|
-
|
|
11574
|
+
z(), oe = null;
|
|
11460
11575
|
});
|
|
11461
11576
|
}
|
|
11462
|
-
function
|
|
11463
|
-
C.value?.interaction.onPointerDown(e), M.value = C.value?.interaction.isDraggingState() ?? !1,
|
|
11577
|
+
function le(e) {
|
|
11578
|
+
C.value?.interaction.onPointerDown(e), M.value = C.value?.interaction.isDraggingState() ?? !1, z();
|
|
11464
11579
|
}
|
|
11465
|
-
function
|
|
11580
|
+
function ue(e) {
|
|
11466
11581
|
let t = v.value;
|
|
11467
11582
|
if (t) {
|
|
11468
11583
|
let n = t.getBoundingClientRect();
|
|
@@ -11471,18 +11586,18 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11471
11586
|
y: e.clientY - n.top
|
|
11472
11587
|
};
|
|
11473
11588
|
}
|
|
11474
|
-
C.value?.interaction.onPointerMove(e),
|
|
11589
|
+
C.value?.interaction.onPointerMove(e), ce();
|
|
11475
11590
|
}
|
|
11476
|
-
function
|
|
11477
|
-
C.value?.interaction.onPointerUp(e), M.value = C.value?.interaction.isDraggingState() ?? !1,
|
|
11591
|
+
function de(e) {
|
|
11592
|
+
C.value?.interaction.onPointerUp(e), M.value = C.value?.interaction.isDraggingState() ?? !1, z();
|
|
11478
11593
|
}
|
|
11479
|
-
function
|
|
11594
|
+
function B(e) {
|
|
11480
11595
|
C.value?.interaction.onPointerLeave(e), M.value = C.value?.interaction.isDraggingState() ?? !1, F.value = null, se();
|
|
11481
11596
|
}
|
|
11482
|
-
function
|
|
11483
|
-
C.value?.interaction.onScroll(),
|
|
11597
|
+
function fe() {
|
|
11598
|
+
C.value?.interaction.onScroll(), z();
|
|
11484
11599
|
}
|
|
11485
|
-
let V = _([]),
|
|
11600
|
+
let V = _([]), pe = _({}), H = _([]), me = [
|
|
11486
11601
|
"VOLUME",
|
|
11487
11602
|
"MACD",
|
|
11488
11603
|
"RSI",
|
|
@@ -11493,25 +11608,26 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11493
11608
|
"KST",
|
|
11494
11609
|
"FASTK"
|
|
11495
11610
|
];
|
|
11496
|
-
|
|
11497
|
-
let e = P.value.main ??
|
|
11498
|
-
return
|
|
11611
|
+
function he() {
|
|
11612
|
+
let e = P.value.main ?? 3;
|
|
11613
|
+
return H.value.length === 0 ? [{
|
|
11499
11614
|
id: "main",
|
|
11500
11615
|
ratio: e,
|
|
11501
|
-
visible: !0
|
|
11616
|
+
visible: !0,
|
|
11617
|
+
role: "price"
|
|
11502
11618
|
}] : [{
|
|
11503
11619
|
id: "main",
|
|
11504
11620
|
ratio: e,
|
|
11505
|
-
visible: !0
|
|
11506
|
-
|
|
11621
|
+
visible: !0,
|
|
11622
|
+
role: "price"
|
|
11623
|
+
}, ...H.value.map((e) => ({
|
|
11507
11624
|
id: e.id,
|
|
11508
11625
|
ratio: P.value[e.id] ?? 1,
|
|
11509
|
-
visible: !0
|
|
11626
|
+
visible: !0,
|
|
11627
|
+
role: "indicator"
|
|
11510
11628
|
}))];
|
|
11511
|
-
}
|
|
11512
|
-
|
|
11513
|
-
}, { flush: "post" });
|
|
11514
|
-
function he(e) {
|
|
11629
|
+
}
|
|
11630
|
+
function ge(e) {
|
|
11515
11631
|
switch (e) {
|
|
11516
11632
|
case "MACD": return {
|
|
11517
11633
|
fastPeriod: 12,
|
|
@@ -11541,99 +11657,99 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11541
11657
|
default: return {};
|
|
11542
11658
|
}
|
|
11543
11659
|
}
|
|
11544
|
-
function
|
|
11545
|
-
if (
|
|
11660
|
+
function _e(e = "VOLUME", t) {
|
|
11661
|
+
if (H.value.length >= nl) return !1;
|
|
11546
11662
|
let n = `sub_${e}`;
|
|
11547
|
-
if (
|
|
11548
|
-
if (!C.value?.createSubPane(e, t ??
|
|
11549
|
-
let r =
|
|
11663
|
+
if (H.value.some((e) => e.id === n)) return !0;
|
|
11664
|
+
if (!C.value?.createSubPane(e, t ?? ge(e))) return !1;
|
|
11665
|
+
let r = el({
|
|
11550
11666
|
paneId: n,
|
|
11551
11667
|
title: e,
|
|
11552
|
-
getTitleInfo: () =>
|
|
11668
|
+
getTitleInfo: () => Ce(n)
|
|
11553
11669
|
});
|
|
11554
|
-
return C.value?.useRenderer(r),
|
|
11670
|
+
return C.value?.useRenderer(r), H.value.push({
|
|
11555
11671
|
id: n,
|
|
11556
11672
|
indicatorId: e,
|
|
11557
11673
|
rendererName: `${e.toLowerCase()}_${n}`,
|
|
11558
11674
|
paneTitleRendererName: r.name,
|
|
11559
|
-
params: t ??
|
|
11560
|
-
}),
|
|
11675
|
+
params: t ?? ge(e)
|
|
11676
|
+
}), V.value.includes(e) || V.value.push(e), !0;
|
|
11561
11677
|
}
|
|
11562
|
-
function
|
|
11563
|
-
let t =
|
|
11678
|
+
function ve(e) {
|
|
11679
|
+
let t = H.value.findIndex((t) => t.id === e);
|
|
11564
11680
|
if (t === -1) return;
|
|
11565
|
-
let n =
|
|
11566
|
-
n && (C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(n.indicatorId),
|
|
11567
|
-
}
|
|
11568
|
-
function ve() {
|
|
11569
|
-
for (let e of U.value) C.value?.removeRenderer(e.paneTitleRendererName);
|
|
11570
|
-
C.value?.clearSubPanes(), U.value = [], z(), V.value = V.value.filter((e) => !me.includes(e));
|
|
11681
|
+
let n = H.value[t];
|
|
11682
|
+
n && (C.value?.removeRenderer(n.paneTitleRendererName), C.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)));
|
|
11571
11683
|
}
|
|
11572
11684
|
function ye() {
|
|
11685
|
+
for (let e of H.value) C.value?.removeRenderer(e.paneTitleRendererName);
|
|
11686
|
+
C.value?.clearSubPanes(), H.value = [], V.value = V.value.filter((e) => !me.includes(e));
|
|
11687
|
+
}
|
|
11688
|
+
function be() {
|
|
11573
11689
|
let e = n.semanticConfig.indicators?.main;
|
|
11574
|
-
if (e) for (let t of e) t.enabled && (V.value.includes(t.type) || V.value.push(t.type), t.params && (
|
|
11690
|
+
if (e) for (let t of e) t.enabled && (V.value.includes(t.type) || V.value.push(t.type), t.params && (pe.value[t.type] = t.params));
|
|
11575
11691
|
}
|
|
11576
|
-
S([V,
|
|
11692
|
+
S([V, pe], ([e]) => {
|
|
11577
11693
|
let t = C.value;
|
|
11578
11694
|
t && (t.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
11579
11695
|
MA: {
|
|
11580
11696
|
enabled: e.includes("MA"),
|
|
11581
|
-
params:
|
|
11697
|
+
params: pe.value.MA || {}
|
|
11582
11698
|
},
|
|
11583
11699
|
BOLL: {
|
|
11584
11700
|
enabled: e.includes("BOLL"),
|
|
11585
|
-
params:
|
|
11701
|
+
params: pe.value.BOLL || {}
|
|
11586
11702
|
},
|
|
11587
11703
|
EXPMA: {
|
|
11588
11704
|
enabled: e.includes("EXPMA"),
|
|
11589
|
-
params:
|
|
11705
|
+
params: pe.value.EXPMA || {}
|
|
11590
11706
|
},
|
|
11591
11707
|
ENE: {
|
|
11592
11708
|
enabled: e.includes("ENE"),
|
|
11593
|
-
params:
|
|
11709
|
+
params: pe.value.ENE || {}
|
|
11594
11710
|
}
|
|
11595
11711
|
} }), t.setRendererEnabled("ma", e.includes("MA")), t.setRendererEnabled("boll", e.includes("BOLL")), t.setRendererEnabled("expma", e.includes("EXPMA")), t.setRendererEnabled("ene", e.includes("ENE")), D());
|
|
11596
11712
|
}, { deep: !0 });
|
|
11597
|
-
function
|
|
11713
|
+
function xe() {
|
|
11598
11714
|
let e = C.value?.getSubPaneIndicators() ?? [];
|
|
11599
|
-
|
|
11715
|
+
H.value = [];
|
|
11600
11716
|
for (let t of e) {
|
|
11601
|
-
let e = `sub_${t}`, n =
|
|
11717
|
+
let e = `sub_${t}`, n = el({
|
|
11602
11718
|
paneId: e,
|
|
11603
11719
|
title: t,
|
|
11604
|
-
getTitleInfo: () =>
|
|
11720
|
+
getTitleInfo: () => Ce(e)
|
|
11605
11721
|
});
|
|
11606
|
-
C.value?.useRenderer(n),
|
|
11722
|
+
C.value?.useRenderer(n), H.value.push({
|
|
11607
11723
|
id: e,
|
|
11608
11724
|
indicatorId: t,
|
|
11609
11725
|
rendererName: `${t.toLowerCase()}_${e}`,
|
|
11610
11726
|
paneTitleRendererName: n.name,
|
|
11611
|
-
params:
|
|
11727
|
+
params: ge(t)
|
|
11612
11728
|
}), V.value.includes(t) || V.value.push(t);
|
|
11613
11729
|
}
|
|
11614
11730
|
}
|
|
11615
|
-
function
|
|
11616
|
-
let n =
|
|
11731
|
+
function Se(e, t) {
|
|
11732
|
+
let n = H.value.find((t) => t.id === e);
|
|
11617
11733
|
if (!n) return;
|
|
11618
11734
|
let r = n.indicatorId;
|
|
11619
|
-
C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t,
|
|
11620
|
-
let i = `sub_${t}`, a =
|
|
11735
|
+
C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t, ge(t));
|
|
11736
|
+
let i = `sub_${t}`, a = el({
|
|
11621
11737
|
paneId: i,
|
|
11622
11738
|
title: t,
|
|
11623
|
-
getTitleInfo: () =>
|
|
11739
|
+
getTitleInfo: () => Ce(i)
|
|
11624
11740
|
});
|
|
11625
11741
|
C.value?.useRenderer(a);
|
|
11626
|
-
let o =
|
|
11627
|
-
o !== -1 && (
|
|
11742
|
+
let o = H.value.findIndex((t) => t.id === e);
|
|
11743
|
+
o !== -1 && (H.value[o] = {
|
|
11628
11744
|
id: i,
|
|
11629
11745
|
indicatorId: t,
|
|
11630
11746
|
rendererName: `${t.toLowerCase()}_${i}`,
|
|
11631
11747
|
paneTitleRendererName: a.name,
|
|
11632
|
-
params:
|
|
11748
|
+
params: ge(t)
|
|
11633
11749
|
}), V.value = V.value.filter((e) => e !== r), V.value.includes(t) || V.value.push(t);
|
|
11634
11750
|
}
|
|
11635
|
-
function
|
|
11636
|
-
let t =
|
|
11751
|
+
function Ce(e) {
|
|
11752
|
+
let t = H.value.find((t) => t.id === e);
|
|
11637
11753
|
if (!t) return null;
|
|
11638
11754
|
let n = C.value?.getData();
|
|
11639
11755
|
if (!n || n.length === 0) return null;
|
|
@@ -11646,94 +11762,96 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11646
11762
|
let i = I.value;
|
|
11647
11763
|
if (i === null) return null;
|
|
11648
11764
|
switch (t.indicatorId) {
|
|
11649
|
-
case "MACD": return
|
|
11650
|
-
case "RSI": return
|
|
11651
|
-
case "CCI": return
|
|
11652
|
-
case "STOCH": return
|
|
11653
|
-
case "MOM": return
|
|
11654
|
-
case "WMSR": return
|
|
11655
|
-
case "KST": return
|
|
11656
|
-
case "FASTK": return
|
|
11765
|
+
case "MACD": return qs(n, i, r.fastPeriod ?? 12, r.slowPeriod ?? 26, r.signalPeriod ?? 9);
|
|
11766
|
+
case "RSI": return Xs(n, i, r.period1 ?? 6, r.period2 ?? 12, r.period3 ?? 24);
|
|
11767
|
+
case "CCI": return ec(n, i, r.period ?? 14);
|
|
11768
|
+
case "STOCH": return ic(n, i, r.n ?? 9, r.m ?? 3);
|
|
11769
|
+
case "MOM": return cc(n, i, r.period ?? 10);
|
|
11770
|
+
case "WMSR": return fc(n, i, r.period ?? 14);
|
|
11771
|
+
case "KST": return vc(n, i, r.roc1 ?? 10, r.roc2 ?? 15, r.roc3 ?? 20, r.roc4 ?? 30, r.signalPeriod ?? 9);
|
|
11772
|
+
case "FASTK": return Sc(n, i, r.period ?? 9);
|
|
11657
11773
|
default: return null;
|
|
11658
11774
|
}
|
|
11659
11775
|
}
|
|
11660
|
-
function
|
|
11776
|
+
function we(e, t) {
|
|
11661
11777
|
if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
11662
11778
|
t ? V.value.includes(e) || V.value.push(e) : V.value = V.value.filter((t) => t !== e);
|
|
11663
11779
|
return;
|
|
11664
11780
|
}
|
|
11665
11781
|
if (me.includes(e)) {
|
|
11666
11782
|
if (t) {
|
|
11667
|
-
if (V.value.includes(e) || V.value.push(e),
|
|
11668
|
-
if (!
|
|
11669
|
-
let t =
|
|
11670
|
-
t &&
|
|
11783
|
+
if (V.value.includes(e) || V.value.push(e), H.value.find((t) => t.indicatorId === e)) return;
|
|
11784
|
+
if (!_e(e)) {
|
|
11785
|
+
let t = H.value[H.value.length - 1];
|
|
11786
|
+
t && Se(t.id, e);
|
|
11671
11787
|
}
|
|
11672
|
-
} else V.value = V.value.filter((t) => t !== e),
|
|
11788
|
+
} else V.value = V.value.filter((t) => t !== e), H.value.filter((t) => t.indicatorId === e).forEach((e) => ve(e.id));
|
|
11673
11789
|
D();
|
|
11674
11790
|
}
|
|
11675
11791
|
}
|
|
11676
|
-
function
|
|
11792
|
+
function Te() {
|
|
11677
11793
|
C.value?.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
11678
11794
|
MA: {
|
|
11679
11795
|
enabled: V.value.includes("MA"),
|
|
11680
|
-
params:
|
|
11796
|
+
params: pe.value.MA || {}
|
|
11681
11797
|
},
|
|
11682
11798
|
BOLL: {
|
|
11683
11799
|
enabled: V.value.includes("BOLL"),
|
|
11684
|
-
params:
|
|
11800
|
+
params: pe.value.BOLL || {}
|
|
11685
11801
|
},
|
|
11686
11802
|
EXPMA: {
|
|
11687
11803
|
enabled: V.value.includes("EXPMA"),
|
|
11688
|
-
params:
|
|
11804
|
+
params: pe.value.EXPMA || {}
|
|
11689
11805
|
},
|
|
11690
11806
|
ENE: {
|
|
11691
11807
|
enabled: V.value.includes("ENE"),
|
|
11692
|
-
params:
|
|
11808
|
+
params: pe.value.ENE || {}
|
|
11693
11809
|
}
|
|
11694
11810
|
} });
|
|
11695
11811
|
}
|
|
11696
|
-
function
|
|
11697
|
-
if (
|
|
11698
|
-
e === "BOLL" && C.value?.updateRendererConfig("boll", t), e === "EXPMA" && C.value?.updateRendererConfig("expma", t), e === "ENE" && C.value?.updateRendererConfig("ene", t),
|
|
11812
|
+
function Ee(e, t) {
|
|
11813
|
+
if (pe.value[e] = t, e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
11814
|
+
e === "BOLL" && C.value?.updateRendererConfig("boll", t), e === "EXPMA" && C.value?.updateRendererConfig("expma", t), e === "ENE" && C.value?.updateRendererConfig("ene", t), Te(), D();
|
|
11699
11815
|
return;
|
|
11700
11816
|
}
|
|
11701
|
-
me.includes(e) &&
|
|
11817
|
+
me.includes(e) && H.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
11702
11818
|
e.params = { ...t }, C.value?.updateRendererConfig(e.rendererName, t);
|
|
11703
11819
|
}), D();
|
|
11704
11820
|
}
|
|
11705
|
-
function
|
|
11706
|
-
if (!e.length ||
|
|
11821
|
+
function De(e) {
|
|
11822
|
+
if (!e.length || H.value.length <= 1) return;
|
|
11707
11823
|
let t = e.filter((e) => me.includes(e));
|
|
11708
11824
|
if (!t.length) return;
|
|
11709
|
-
let n = new Map(
|
|
11825
|
+
let n = new Map(H.value.map((e) => [e.indicatorId, e])), r = [];
|
|
11710
11826
|
for (let e of t) {
|
|
11711
11827
|
let t = n.get(e);
|
|
11712
11828
|
t && (r.push(t), n.delete(e));
|
|
11713
11829
|
}
|
|
11714
11830
|
if (r.length === 0) return;
|
|
11715
|
-
for (let e of
|
|
11716
|
-
let i =
|
|
11831
|
+
for (let e of H.value) n.has(e.indicatorId) && (r.push(e), n.delete(e.indicatorId));
|
|
11832
|
+
let i = H.value.map((e) => e.id), a = r.map((e) => e.id);
|
|
11717
11833
|
if (i.join("|") === a.join("|")) return;
|
|
11718
|
-
|
|
11719
|
-
let o = V.value.filter((e) => !me.includes(e)), s =
|
|
11720
|
-
V.value = [...o, ...s]
|
|
11834
|
+
H.value = r;
|
|
11835
|
+
let o = V.value.filter((e) => !me.includes(e)), s = H.value.map((e) => e.indicatorId);
|
|
11836
|
+
V.value = [...o, ...s];
|
|
11837
|
+
let c = C.value;
|
|
11838
|
+
c && c.updatePaneLayout(he());
|
|
11721
11839
|
}
|
|
11722
|
-
let
|
|
11840
|
+
let Oe = r(() => {
|
|
11723
11841
|
let e = T.value, t = E.value, { startXPx: r, unitPx: i } = ps(b.value, x.value, t);
|
|
11724
11842
|
return (r + e * i) / t + (n.rightAxisWidth + n.priceLabelWidth);
|
|
11725
11843
|
});
|
|
11726
|
-
function
|
|
11844
|
+
function ke() {
|
|
11727
11845
|
let e = v.value;
|
|
11728
11846
|
e && (e.scrollLeft = e.scrollWidth, D());
|
|
11729
11847
|
}
|
|
11730
11848
|
return t({
|
|
11731
11849
|
scheduleRender: D,
|
|
11732
|
-
scrollToRight:
|
|
11733
|
-
addSubPane:
|
|
11734
|
-
removeSubPane:
|
|
11735
|
-
switchSubIndicator:
|
|
11736
|
-
clearAllSubPanes:
|
|
11850
|
+
scrollToRight: ke,
|
|
11851
|
+
addSubPane: _e,
|
|
11852
|
+
removeSubPane: ve,
|
|
11853
|
+
switchSubIndicator: Se,
|
|
11854
|
+
clearAllSubPanes: ye,
|
|
11737
11855
|
get plugin() {
|
|
11738
11856
|
return C.value?.plugin;
|
|
11739
11857
|
}
|
|
@@ -11741,10 +11859,10 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11741
11859
|
let e = v.value, t = u.value, r = c.value;
|
|
11742
11860
|
if (!e || !t || !r) return;
|
|
11743
11861
|
let i = (e) => {
|
|
11744
|
-
C.value?.interaction.onWheel(e),
|
|
11862
|
+
C.value?.interaction.onWheel(e), z();
|
|
11745
11863
|
};
|
|
11746
11864
|
e.addEventListener("wheel", i, { passive: !1 });
|
|
11747
|
-
let a = new
|
|
11865
|
+
let a = new wc({
|
|
11748
11866
|
container: e,
|
|
11749
11867
|
canvasLayer: t,
|
|
11750
11868
|
xAxisCanvas: r
|
|
@@ -11769,52 +11887,53 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11769
11887
|
if (!r) return;
|
|
11770
11888
|
let i = Math.max(0, r.scrollWidth - r.clientWidth);
|
|
11771
11889
|
r.scrollLeft = Math.min(Math.max(0, n), i), a.applyZoom(e, t);
|
|
11772
|
-
}), a.useRenderer(
|
|
11890
|
+
}), a.useRenderer(Mc()), a.useRenderer(Pc()), a.useRenderer(ks({
|
|
11773
11891
|
ma5: !0,
|
|
11774
11892
|
ma10: !0,
|
|
11775
11893
|
ma20: !0,
|
|
11776
11894
|
ma30: !0,
|
|
11777
11895
|
ma60: !0
|
|
11778
|
-
})), a.useRenderer(
|
|
11896
|
+
})), a.useRenderer(js()), a.setRendererEnabled("boll", !1), a.useRenderer(Fs()), a.setRendererEnabled("expma", !1), a.useRenderer(Rs()), a.setRendererEnabled("ene", !1), a.useRenderer(kc()), a.useRenderer(Nc()), a.useRenderer(ya()), a.useRenderer(Hc({
|
|
11779
11897
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11780
11898
|
yPaddingPx: n.yPaddingPx,
|
|
11781
11899
|
getCrosshair: () => {
|
|
11782
|
-
let e = a.interaction.crosshairPos, t = a.interaction.crosshairPrice;
|
|
11900
|
+
let e = a.interaction.crosshairPos, t = a.interaction.crosshairPrice, n = a.interaction.activePaneId;
|
|
11783
11901
|
return e && t !== null ? {
|
|
11784
11902
|
y: e.y,
|
|
11785
|
-
price: t
|
|
11903
|
+
price: t,
|
|
11904
|
+
activePaneId: n
|
|
11786
11905
|
} : null;
|
|
11787
11906
|
}
|
|
11788
|
-
})), a.useRenderer(
|
|
11907
|
+
})), a.useRenderer(Bs({ yPaddingPx: n.yPaddingPx })), a.useRenderer(Uc({
|
|
11789
11908
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11790
11909
|
paneId: "sub_MACD"
|
|
11791
|
-
})), a.useRenderer(
|
|
11910
|
+
})), a.useRenderer(Wc({
|
|
11792
11911
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11793
11912
|
paneId: "sub_RSI"
|
|
11794
|
-
})), a.useRenderer(
|
|
11913
|
+
})), a.useRenderer(Gc({
|
|
11795
11914
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11796
11915
|
paneId: "sub_CCI"
|
|
11797
|
-
})), a.useRenderer(
|
|
11916
|
+
})), a.useRenderer(Kc({
|
|
11798
11917
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11799
11918
|
paneId: "sub_STOCH"
|
|
11800
|
-
})), a.useRenderer(
|
|
11919
|
+
})), a.useRenderer(qc({
|
|
11801
11920
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11802
11921
|
paneId: "sub_MOM"
|
|
11803
|
-
})), a.useRenderer(
|
|
11922
|
+
})), a.useRenderer(Jc({
|
|
11804
11923
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11805
11924
|
paneId: "sub_WMSR"
|
|
11806
|
-
})), a.useRenderer(
|
|
11925
|
+
})), a.useRenderer(Yc({
|
|
11807
11926
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11808
11927
|
paneId: "sub_KST"
|
|
11809
|
-
})), a.useRenderer(
|
|
11928
|
+
})), a.useRenderer(Xc({
|
|
11810
11929
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11811
11930
|
paneId: "sub_FASTK"
|
|
11812
|
-
})), a.useRenderer(
|
|
11931
|
+
})), a.useRenderer($c({ getCrosshairState: () => ({
|
|
11813
11932
|
pos: a.interaction.crosshairPos,
|
|
11814
11933
|
activePaneId: a.interaction.activePaneId,
|
|
11815
11934
|
isDragging: a.interaction.isDraggingState(),
|
|
11816
11935
|
price: a.interaction.crosshairPrice
|
|
11817
|
-
}) })), a.useRenderer(
|
|
11936
|
+
}) })), a.useRenderer(Qc({
|
|
11818
11937
|
height: n.bottomAxisHeight,
|
|
11819
11938
|
getCrosshair: () => {
|
|
11820
11939
|
let e = a.interaction.crosshairPos, t = a.interaction.crosshairIndex;
|
|
@@ -11825,10 +11944,14 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11825
11944
|
}
|
|
11826
11945
|
})), a.setOnViewportChange((e) => {
|
|
11827
11946
|
E.value = e.dpr;
|
|
11828
|
-
}),
|
|
11947
|
+
}), a.setOnPaneLayoutChange((e) => {
|
|
11948
|
+
let t = {};
|
|
11949
|
+
for (let n of e) t[n.id] = n.ratio;
|
|
11950
|
+
P.value = t;
|
|
11951
|
+
}), C.value = a, E.value = a.getCurrentDpr(), a.resize(), w.value = new Ui(a), w.value.on("config:error", (e) => {
|
|
11829
11952
|
console.error("Semantic config error:", e);
|
|
11830
11953
|
}), w.value.on("config:ready", () => {
|
|
11831
|
-
T.value = a.getData()?.length ?? 0, R(),
|
|
11954
|
+
T.value = a.getData()?.length ?? 0, R(), be(), xe(), d(() => ke());
|
|
11832
11955
|
}), w.value.applyConfig(n.semanticConfig).then((e) => {
|
|
11833
11956
|
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
11834
11957
|
}), a.interaction.setOnMarkerHover((e) => {
|
|
@@ -11855,7 +11978,7 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11855
11978
|
let t = await w.value?.applyConfig(e);
|
|
11856
11979
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
11857
11980
|
}
|
|
11858
|
-
}, { deep: !0 }), (e, t) => (g(), o("div",
|
|
11981
|
+
}, { deep: !0 }), (e, t) => (g(), o("div", tl, [s("div", {
|
|
11859
11982
|
class: f(["chart-container", {
|
|
11860
11983
|
"is-dragging": M.value,
|
|
11861
11984
|
"is-resizing-pane": N.value,
|
|
@@ -11863,14 +11986,14 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11863
11986
|
}]),
|
|
11864
11987
|
ref_key: "containerRef",
|
|
11865
11988
|
ref: v,
|
|
11866
|
-
onScrollPassive:
|
|
11867
|
-
onPointerdown:
|
|
11868
|
-
onPointermove:
|
|
11869
|
-
onPointerup:
|
|
11870
|
-
onPointerleave:
|
|
11989
|
+
onScrollPassive: fe,
|
|
11990
|
+
onPointerdown: le,
|
|
11991
|
+
onPointermove: ue,
|
|
11992
|
+
onPointerup: de,
|
|
11993
|
+
onPointerleave: B
|
|
11871
11994
|
}, [s("div", {
|
|
11872
11995
|
class: "scroll-content",
|
|
11873
|
-
style: p({ width:
|
|
11996
|
+
style: p({ width: Oe.value + "px" })
|
|
11874
11997
|
}, [s("div", {
|
|
11875
11998
|
class: "canvas-layer",
|
|
11876
11999
|
ref_key: "canvasLayerRef",
|
|
@@ -11901,14 +12024,14 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11901
12024
|
}, null, 8, ["marker", "pos"])) : a("", !0)
|
|
11902
12025
|
], 512)], 4)], 34), l(ds, {
|
|
11903
12026
|
"active-indicators": V.value,
|
|
11904
|
-
"indicator-params":
|
|
11905
|
-
onToggle:
|
|
11906
|
-
onUpdateParams:
|
|
11907
|
-
onReorderSubIndicators:
|
|
12027
|
+
"indicator-params": pe.value,
|
|
12028
|
+
onToggle: we,
|
|
12029
|
+
onUpdateParams: Ee,
|
|
12030
|
+
onReorderSubIndicators: De
|
|
11908
12031
|
}, null, 8, ["active-indicators", "indicator-params"])]));
|
|
11909
12032
|
}
|
|
11910
|
-
}), [["__scopeId", "data-v-
|
|
11911
|
-
e.component("KLineChart",
|
|
12033
|
+
}), [["__scopeId", "data-v-fe7804fa"]]), il = { install(e) {
|
|
12034
|
+
e.component("KLineChart", rl);
|
|
11912
12035
|
} };
|
|
11913
12036
|
//#endregion
|
|
11914
|
-
export { la as ConfigManager, I as EventBus, oa as GLOBAL_PANE_ID, ca as HookSystem,
|
|
12037
|
+
export { la as ConfigManager, I as EventBus, oa as GLOBAL_PANE_ID, ca as HookSystem, rl as KLineChart, il as KMapPlugin, da as PluginHostImpl, sa as PluginRegistry, ia as PluginState, X as RENDERER_PRIORITY, ma as RendererPluginManager, fa as createPluginHost, aa as wrapPaneInfo };
|