@iccandle/news 0.0.3 → 0.0.4
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/news-widget.cjs +7 -7
- package/dist/news-widget.d.ts +11 -2
- package/dist/news-widget.js +2208 -1451
- package/package.json +1 -1
package/dist/news-widget.js
CHANGED
|
@@ -1,294 +1,294 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.cta-loader__overlay{background-color:var(--iccandle-background);position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.cta-loader__content{position:relative;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:9rem;padding-left:1.5rem;padding-right:1.5rem}.cta-loader__video{height:100%;max-height:18rem;width:100%;object-fit:contain}@media(min-width:768px){.cta-loader__video{max-height:20rem}}.cta-loader__bar-wrapper{width:100%;max-width:24rem}.cta-loader__bar-track{position:relative;height:.25rem;overflow:hidden;border-radius:9999px;background-color:var( --iccandle-background-secondary, rgba(128, 128, 128, .7) )}.cta-loader__bar-fill{position:absolute;top:0;bottom:0;left:0;width:100%;transform-origin:left;border-radius:9999px;background-color:var(--iccandle-primary, #ffffff);will-change:transform}.news-widget_detail_page__container{background:var(--iccandle-background);display:flex;height:100%;width:100%}.news-widget_detail_page__right_border{display:flex;flex:1;flex-direction:column;min-width:50%;border-right-style:solid;border-right-color:var(--iccandle-border);border-right-width:1px}.news-widget_detail_page__event_details{height:calc(100% - 57px)}.news-widget_detail_page__title_container{display:flex;height:57px;width:100%;align-items:center;justify-content:space-between;border-bottom-style:solid;border-bottom-color:var(--iccandle-border);border-bottom-width:1px}.news-widget_detail_page__title_padding{display:flex;align-items:center;gap:8px;padding:16px}.news-widget_detail_page__title_text{font-size:18px;line-height:calc(1.75 / 1.125);font-weight:600;color:var(--iccandle-title)}.news-widget_detail_page__back_button{height:2.25rem;width:2.25rem;border:none}.news-widget_detail_page__back_icon{color:var(--iccandle-text);height:1.25rem;width:1.25rem}.news-widget_event_details__container{background-color:var(--iccandle-background);box-sizing:border-box;display:flex;min-height:100%;width:100%;min-width:50%;flex:1;flex-direction:column;overflow:auto;gap:16px;padding:16px}.news-widget_event_details__container_sm{height:50%}@media(min-width:40rem){.news-widget_event_details__container_sm{height:100%}}.news-widget_event_details__ghost_button{background-color:var(--iccandle-background);position:absolute;right:50%;bottom:-8px;height:12px;width:24px;color:var(--iccandle-text);border-radius:calc(infinity * 1px);border-style:solid;border-width:1px;border-color:var(--iccandle-border);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.news-widget_event_details__ghost_button_open{rotate:180deg}.news-widget_event_details__icon{height:16px;width:16px}.news-widget_event_details__chart_wrapper{position:relative;height:100%;min-height:500px}.news-widget_event_details__chart{height:100%;min-height:500px;overflow:hidden;border-radius:.75rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border)}.news-widget_event_details_card__container{background-color:var(--iccandle-background);position:relative;border-radius:1rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border);padding:.75rem}@media(min-width:40rem){.news-widget_event_details_card__container{min-height:170px;padding:1rem}}.news-widget_event_details_card__text{font-weight:600;color:var(--iccandle-news-details-title)}.news-widget_event_details_card__event_name{line-height:1.25;font-weight:700;font-size:1rem;color:var(--iccandle-title)}@media(min-width:40rem){.news-widget_event_details_card__event_name{font-size:1.125rem;line-height:1.75rem}}.news-widget_event_details_card__status_container{display:flex;align-items:center;gap:.25rem;font-size:.75rem;line-height:calc(1 / .75);text-wrap:nowrap;color:var(--iccandle-title)}.news-widget_event_details_card__status{height:.5rem;width:.5rem;border-radius:calc(infinity * 1px)}.news-widget_event_details_card__collapsible{display:grid;width:100%;overflow:hidden;transition:grid-template-rows .5s ease-in-out,opacity .5s ease-in-out}.news-widget_event_details_card__collapsible--open{grid-template-rows:1fr;opacity:1}.news-widget_event_details_card__collapsible--closed{grid-template-rows:0fr;opacity:0}.news-widget_event_details_card__text_bold{font-size:.875rem;line-height:1.25rem;font-weight:700}.news-widget_event_details_card__body{display:flex;height:100%;flex-direction:column;align-items:stretch;justify-content:space-between;gap:.75rem}@media(min-width:40rem){.news-widget_event_details_card__body{flex-direction:row;gap:.25rem}}.news-widget_event_details_card__left{display:flex;width:100%;flex-direction:column;gap:.5rem;border-bottom:1px solid var(--iccandle-border);padding-bottom:.75rem}@media(min-width:40rem){.news-widget_event_details_card__left{border-bottom:none;border-right:1px solid var(--iccandle-border);padding-bottom:0;padding-right:1rem}}.news-widget_event_details_card__header_row{display:flex;width:100%;align-items:flex-start;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__header_row{align-items:center;gap:.75rem}}.news-widget_event_details_card__header_inner{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:.5rem}.news-widget_event_details_card__timestamp_row{display:flex;width:100%;align-items:center;justify-content:space-between;gap:.5rem}.news-widget_event_details_card__timestamp{font-size:.875rem;color:var(--iccandle-gray)}.news-widget_event_details_card__currency_row{display:flex;width:100%;align-items:center;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__currency_row{max-height:2.25rem;gap:.75rem}}.news-widget_event_details_card__currency_icon{width:1.75rem;height:1.75rem;flex-shrink:0}@media(min-width:40rem){.news-widget_event_details_card__currency_icon{width:2.25rem;height:2.25rem}}.news-widget_event_details_card__currency_img{height:100%;width:100%;border-radius:9999px;object-fit:cover}.news-widget_event_details_card__speech_icon{width:1.25rem;height:1.25rem;flex-shrink:0}@media(min-width:40rem){.news-widget_event_details_card__speech_icon{width:1.75rem;height:1.75rem}}.news-widget_event_details_card__values_row{display:flex;width:100%;flex-direction:column;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__values_row{flex-direction:row;justify-content:space-between}}.news-widget_event_details_card__values_group{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__values_group{align-items:center;gap:.75rem}}.news-widget_event_details_card__label{font-size:.75rem;font-weight:500;color:var(--iccandle-dark-gray)}.news-widget_event_details_card__fomc_source{margin-top:.5rem;font-size:.75rem;color:var(--iccandle-news-details-title)}@media(min-width:40rem){.news-widget_event_details_card__fomc_source{font-size:.875rem}}.news-widget_event_details_card__fomc_link{word-break:break-all;color:#3b82f6;text-decoration:underline}.news-widget_event_details_card__right{display:flex;width:100%;flex:1;flex-direction:column;align-items:flex-end;justify-content:center;gap:.75rem;padding-left:.25rem}@media(min-width:40rem){.news-widget_event_details_card__right{min-width:40%;padding-left:1rem}}.news-widget_event_details_card__description{font-size:.75rem;color:var(--iccandle-dark-gray);text-align:start;overflow-wrap:break-word;line-height:var(1 / .75)}.news-widget_event_details_card__collapsible_inner{display:flex;min-height:0;flex-direction:column;gap:1rem;overflow:hidden;padding-top:1rem;text-align:left}.news-widget_event_details_card__previous_events_list{display:flex;gap:.75rem;overflow-x:auto;padding-bottom:.75rem}.news-widget_event_details_card__info{display:flex;flex-direction:column;border-radius:.375rem;border-style:solid;border-width:1px;border-color:color-mix(in oklab,var(--iccandle-muted) 50%,transparent);padding-inline:.5rem;padding-block:.25rem;box-shadow:0 1px 2px #0000000d;text-align:left}.news-widget_news_card__container{background:var(--iccandle-background);width:220px;flex-shrink:0;border-radius:.75rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border);padding:.75rem}.news-widget_news_card__title{color:var(--iccandle-news-card-title);font-size:.875rem;line-height:1.25;font-weight:600;text-align:left}.news-widget_news_card__info_card{background:color-mix(in oklab,var(--iccandle-muted) 50%,transparent);flex:1;padding:.25rem;text-align:center;border-radius:.5rem}.news-widget_news_card__font_semibold{font-weight:600}.news-widget_news_card__info_row{display:flex;align-items:stretch;gap:.25rem;font-size:.75rem;line-height:1rem}.news-widget_news_card__label{color:var(--iccandle-gray);margin-bottom:.25rem}.news-widget_news_card__header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.75rem}.news-widget_news_card__currency_icon{width:1.75rem;height:1.75rem;flex-shrink:0}.news-widget_news_card__currency_img{height:100%;width:100%;border-radius:9999px;object-fit:cover}.news-widget_news_card__meta{min-width:0}.news-widget_news_card__date{color:var(--iccandle-gray);margin-bottom:.125rem;font-size:.75rem;line-height:1rem}.news-widget_main__container{display:flex;height:100%;width:100%;flex-direction:column;overflow-y:auto}@media(min-width:1024px){.news-widget_main__container--lg{flex-direction:row;overflow-y:unset}}.news-widget_main__iframe_full{height:100%;width:100%;border:none}.news-widget_main__iframe_half{width:100%;height:100%;border:none;flex-shrink:0}@media(min-width:1024px){.news-widget_main__container--lg .news-widget_main__iframe_half{width:50%;height:100%;flex-shrink:1}}.news-widget_main__left{width:100%;height:100%;flex-shrink:0;display:flex;flex-direction:column}@media(min-width:1024px){.news-widget_main__container--lg .news-widget_main__left{width:50%;height:100%;flex-shrink:1}}.news-widget__button{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;color:var(--iccandle-text);transition:color .15s,background-color .15s}.news-widget__button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--iccandle-background),0 0 0 4px var(--iccandle-primary)}.news-widget__button:disabled{pointer-events:none;opacity:.5}.news-widget__button svg{pointer-events:none;width:16px;height:16px;flex-shrink:0}.news-widget__button--ghost{background:transparent}.news-widget__button--ghost:hover{background-color:var(--iccandle-secondary)}.news-widget__button--icon{height:40px;width:40px;padding:0}.news-widget,.news-widget *:before,.news-widget *:after{margin:0;padding:0;border:0 solid}.news-widget,.news-widget *,.news-widget *:before,.news-widget *:after{box-sizing:border-box;letter-spacing:normal}.news-widget{line-height:1.5;tab-size:4;--iccandle-primary: #00dfb9;--iccandle-primary-gradient-end: #ffb84d;--iccandle-background: #ffffff;--iccandle-border: #d1d5dc;--iccandle-text: #000000;--iccandle-secondary: oklch( from var(--iccandle-background) clamp(.92, calc(l - .06) , .98) c h / .92 );--iccandle-green: #22c55e;--iccandle-gray: #667085;--iccandle-dark-gray: #667085;--iccandle-orange: #ffb84d;--iccandle-red: #ef4444;--iccandle-title: #000;--iccandle-news-card-title: #0a0a0a;--iccandle-news-details-title: #344054;--iccandle-muted: hsl(0 0% 96.1%);font-family:var( --iccandle-font, "Inter Tight", ui-sans-serif, system-ui, sans-serif );position:relative;height:100%}.dark{--iccandle-primary: #00dfb9;--iccandle-primary-gradient-end: #ffb84d;--iccandle-background: #1a1a1a;--iccandle-border: rgba(255, 255, 255, .2);--iccandle-text: #ffffff;--iccandle-secondary: oklch( from var(--iccandle-background) clamp(.22, calc(l + .22) , .34) c h / .92 );--iccandle-green: #22c55e;--iccandle-gray: #a3a3a3;--iccandle-dark-gray: #6a7282;--iccandle-orange: #ffb84d;--iccandle-red: #ef4444;--iccandle-title: #fff;--iccandle-news-card-title: #fafafa;--iccandle-news-details-title: #d1d5dc;--iccandle-muted: hsl(0 0% 14.9%)}.news-widget__container{height:100%;width:100%}.news-widget__red{color:var(--iccandle-red)}.news-widget__green{color:var(--iccandle-green)}.news-widget__gray{color:var(--iccandle-gray)}.news-widget__orange{color:var(--iccandle-orange)}.news-widget__bg_green{background:var(--iccandle-green)}.news-widget__bg_gray{background:var(--iccandle-gray)}.news-widget__bg_orange{background:var(--iccandle-orange)}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
2
|
+
import Ee, { createContext as Yt, useContext as Mt, useState as re, useRef as ae, useCallback as Fe, useEffect as ie, useMemo as Se, forwardRef as Ht, createElement as Xe } from "react";
|
|
3
|
+
var xe = { exports: {} }, ge = {};
|
|
4
|
+
var dt;
|
|
5
|
+
function Rn() {
|
|
6
|
+
if (dt) return ge;
|
|
7
|
+
dt = 1;
|
|
8
8
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
-
function n(
|
|
10
|
-
var
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
for (var a in
|
|
14
|
-
a !== "key" && (
|
|
15
|
-
} else
|
|
16
|
-
return
|
|
9
|
+
function n(s, r, i) {
|
|
10
|
+
var o = null;
|
|
11
|
+
if (i !== void 0 && (o = "" + i), r.key !== void 0 && (o = "" + r.key), "key" in r) {
|
|
12
|
+
i = {};
|
|
13
|
+
for (var a in r)
|
|
14
|
+
a !== "key" && (i[a] = r[a]);
|
|
15
|
+
} else i = r;
|
|
16
|
+
return r = i.ref, {
|
|
17
17
|
$$typeof: e,
|
|
18
|
-
type:
|
|
19
|
-
key:
|
|
20
|
-
ref:
|
|
21
|
-
props:
|
|
18
|
+
type: s,
|
|
19
|
+
key: o,
|
|
20
|
+
ref: r !== void 0 ? r : null,
|
|
21
|
+
props: i
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return ge.Fragment = t, ge.jsx = n, ge.jsxs = n, ge;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
function e(
|
|
31
|
-
if (
|
|
32
|
-
if (typeof
|
|
33
|
-
return
|
|
34
|
-
if (typeof
|
|
35
|
-
switch (
|
|
36
|
-
case
|
|
26
|
+
var Ce = {};
|
|
27
|
+
var ut;
|
|
28
|
+
function bn() {
|
|
29
|
+
return ut || (ut = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function e(u) {
|
|
31
|
+
if (u == null) return null;
|
|
32
|
+
if (typeof u == "function")
|
|
33
|
+
return u.$$typeof === I ? null : u.displayName || u.name || null;
|
|
34
|
+
if (typeof u == "string") return u;
|
|
35
|
+
switch (u) {
|
|
36
|
+
case h:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case B:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case v:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case
|
|
42
|
+
case V:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case O:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
46
|
+
case Q:
|
|
47
47
|
return "Activity";
|
|
48
48
|
}
|
|
49
|
-
if (typeof
|
|
50
|
-
switch (typeof
|
|
49
|
+
if (typeof u == "object")
|
|
50
|
+
switch (typeof u.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
|
-
),
|
|
52
|
+
), u.$$typeof) {
|
|
53
53
|
case y:
|
|
54
54
|
return "Portal";
|
|
55
55
|
case j:
|
|
56
|
-
return
|
|
57
|
-
case
|
|
58
|
-
return (
|
|
56
|
+
return u.displayName || "Context";
|
|
57
|
+
case U:
|
|
58
|
+
return (u._context.displayName || "Context") + ".Consumer";
|
|
59
|
+
case x:
|
|
60
|
+
var w = u.render;
|
|
61
|
+
return u = u.displayName, u || (u = w.displayName || w.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
|
|
62
|
+
case k:
|
|
63
|
+
return w = u.displayName || null, w !== null ? w : e(u.type) || "Memo";
|
|
59
64
|
case M:
|
|
60
|
-
|
|
61
|
-
return l = l.displayName, l || (l = h.displayName || h.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
62
|
-
case G:
|
|
63
|
-
return h = l.displayName || null, h !== null ? h : e(l.type) || "Memo";
|
|
64
|
-
case z:
|
|
65
|
-
h = l._payload, l = l._init;
|
|
65
|
+
w = u._payload, u = u._init;
|
|
66
66
|
try {
|
|
67
|
-
return e(
|
|
67
|
+
return e(u(w));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
function t(
|
|
74
|
-
return "" +
|
|
73
|
+
function t(u) {
|
|
74
|
+
return "" + u;
|
|
75
75
|
}
|
|
76
|
-
function n(
|
|
76
|
+
function n(u) {
|
|
77
77
|
try {
|
|
78
|
-
t(
|
|
79
|
-
var
|
|
78
|
+
t(u);
|
|
79
|
+
var w = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
w = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
|
|
83
|
+
if (w) {
|
|
84
|
+
w = console;
|
|
85
|
+
var S = w.error, D = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
|
|
86
|
+
return S.call(
|
|
87
|
+
w,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
90
|
-
), t(
|
|
89
|
+
D
|
|
90
|
+
), t(u);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
if (
|
|
95
|
-
if (typeof
|
|
93
|
+
function s(u) {
|
|
94
|
+
if (u === h) return "<>";
|
|
95
|
+
if (typeof u == "object" && u !== null && u.$$typeof === M)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var w = e(u);
|
|
99
|
+
return w ? "<" + w + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
var
|
|
106
|
-
return
|
|
104
|
+
function r() {
|
|
105
|
+
var u = N.A;
|
|
106
|
+
return u === null ? null : u.getOwner();
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function i() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
111
|
+
function o(u) {
|
|
112
|
+
if (F.call(u, "key")) {
|
|
113
|
+
var w = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
114
|
+
if (w && w.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return u.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function a(
|
|
119
|
-
function
|
|
120
|
-
|
|
118
|
+
function a(u, w) {
|
|
119
|
+
function S() {
|
|
120
|
+
g || (g = !0, console.error(
|
|
121
121
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
122
|
-
|
|
122
|
+
w
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
S.isReactWarning = !0, Object.defineProperty(u, "key", {
|
|
126
|
+
get: S,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
function p() {
|
|
131
|
-
var
|
|
132
|
-
return
|
|
131
|
+
var u = e(this.type);
|
|
132
|
+
return J[u] || (J[u] = !0, console.error(
|
|
133
133
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
134
|
-
)),
|
|
134
|
+
)), u = this.props.ref, u !== void 0 ? u : null;
|
|
135
135
|
}
|
|
136
|
-
function d(
|
|
137
|
-
var
|
|
138
|
-
return
|
|
136
|
+
function d(u, w, S, D, $, W) {
|
|
137
|
+
var R = S.ref;
|
|
138
|
+
return u = {
|
|
139
139
|
$$typeof: f,
|
|
140
|
-
type:
|
|
141
|
-
key:
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
140
|
+
type: u,
|
|
141
|
+
key: w,
|
|
142
|
+
props: S,
|
|
143
|
+
_owner: D
|
|
144
|
+
}, (R !== void 0 ? R : null) !== null ? Object.defineProperty(u, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
146
|
get: p
|
|
147
|
-
}) : Object.defineProperty(
|
|
147
|
+
}) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
150
150
|
writable: !0,
|
|
151
151
|
value: 0
|
|
152
|
-
}), Object.defineProperty(
|
|
152
|
+
}), Object.defineProperty(u, "_debugInfo", {
|
|
153
153
|
configurable: !1,
|
|
154
154
|
enumerable: !1,
|
|
155
155
|
writable: !0,
|
|
156
156
|
value: null
|
|
157
|
-
}), Object.defineProperty(
|
|
157
|
+
}), Object.defineProperty(u, "_debugStack", {
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
162
|
-
}), Object.defineProperty(
|
|
161
|
+
value: $
|
|
162
|
+
}), Object.defineProperty(u, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
167
|
-
}), Object.freeze && (Object.freeze(
|
|
166
|
+
value: W
|
|
167
|
+
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
168
168
|
}
|
|
169
|
-
function u
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
for (
|
|
175
|
-
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function l(u, w, S, D, $, W) {
|
|
170
|
+
var R = w.children;
|
|
171
|
+
if (R !== void 0)
|
|
172
|
+
if (D)
|
|
173
|
+
if (X(R)) {
|
|
174
|
+
for (D = 0; D < R.length; D++)
|
|
175
|
+
_(R[D]);
|
|
176
|
+
Object.freeze && Object.freeze(R);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
|
-
else
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
return
|
|
181
|
+
else _(R);
|
|
182
|
+
if (F.call(w, "key")) {
|
|
183
|
+
R = e(u);
|
|
184
|
+
var A = Object.keys(w).filter(function(L) {
|
|
185
|
+
return L !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
D = 0 < A.length ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}", Z[R + D] || (A = 0 < A.length ? "{" + A.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
),
|
|
194
|
+
D,
|
|
195
|
+
R,
|
|
196
|
+
A,
|
|
197
|
+
R
|
|
198
|
+
), Z[R + D] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
typeof
|
|
200
|
+
if (R = null, S !== void 0 && (n(S), R = "" + S), o(w) && (n(w.key), R = "" + w.key), "key" in w) {
|
|
201
|
+
S = {};
|
|
202
|
+
for (var G in w)
|
|
203
|
+
G !== "key" && (S[G] = w[G]);
|
|
204
|
+
} else S = w;
|
|
205
|
+
return R && a(
|
|
206
|
+
S,
|
|
207
|
+
typeof u == "function" ? u.displayName || u.name || "Unknown" : u
|
|
208
208
|
), d(
|
|
209
|
-
|
|
210
|
-
x,
|
|
209
|
+
u,
|
|
211
210
|
R,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
S,
|
|
212
|
+
r(),
|
|
213
|
+
$,
|
|
214
|
+
W
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
217
|
+
function _(u) {
|
|
218
|
+
E(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === M && (u._payload.status === "fulfilled" ? E(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof
|
|
220
|
+
function E(u) {
|
|
221
|
+
return typeof u == "object" && u !== null && u.$$typeof === f;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var C = Ee, f = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), h = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), B = /* @__PURE__ */ Symbol.for("react.profiler"), U = /* @__PURE__ */ Symbol.for("react.consumer"), j = /* @__PURE__ */ Symbol.for("react.context"), x = /* @__PURE__ */ Symbol.for("react.forward_ref"), V = /* @__PURE__ */ Symbol.for("react.suspense"), O = /* @__PURE__ */ Symbol.for("react.suspense_list"), k = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), Q = /* @__PURE__ */ Symbol.for("react.activity"), I = /* @__PURE__ */ Symbol.for("react.client.reference"), N = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, X = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
227
|
-
react_stack_bottom_frame: function(
|
|
228
|
-
return
|
|
226
|
+
C = {
|
|
227
|
+
react_stack_bottom_frame: function(u) {
|
|
228
|
+
return u();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
return
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
231
|
+
var g, J = {}, T = C.react_stack_bottom_frame.bind(
|
|
232
|
+
C,
|
|
233
|
+
i
|
|
234
|
+
)(), q = z(s(i)), Z = {};
|
|
235
|
+
Ce.Fragment = h, Ce.jsx = function(u, w, S) {
|
|
236
|
+
var D = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return l(
|
|
238
|
+
u,
|
|
239
|
+
w,
|
|
240
|
+
S,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
D ? Error("react-stack-top-frame") : T,
|
|
243
|
+
D ? z(s(u)) : q
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
247
|
-
return
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
245
|
+
}, Ce.jsxs = function(u, w, S) {
|
|
246
|
+
var D = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return l(
|
|
248
|
+
u,
|
|
249
|
+
w,
|
|
250
|
+
S,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
D ? Error("react-stack-top-frame") : T,
|
|
253
|
+
D ? z(s(u)) : q
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), Ce;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var pt;
|
|
259
|
+
function En() {
|
|
260
|
+
return pt || (pt = 1, process.env.NODE_ENV === "production" ? xe.exports = Rn() : xe.exports = bn()), xe.exports;
|
|
261
261
|
}
|
|
262
|
-
var m =
|
|
263
|
-
const
|
|
264
|
-
function
|
|
265
|
-
const e =
|
|
262
|
+
var m = En();
|
|
263
|
+
const It = Yt(null);
|
|
264
|
+
function Sn() {
|
|
265
|
+
const e = Mt(It);
|
|
266
266
|
if (!e)
|
|
267
267
|
throw new Error("useCtaLoader must be used within CtaLoaderProvider");
|
|
268
268
|
return e;
|
|
269
269
|
}
|
|
270
|
-
const
|
|
271
|
-
function
|
|
270
|
+
const ft = 1100, Dn = 180;
|
|
271
|
+
function An({
|
|
272
272
|
children: e,
|
|
273
273
|
theme: t
|
|
274
274
|
}) {
|
|
275
|
-
const [n,
|
|
275
|
+
const [n, s] = re(!1), [r, i] = re(!1), [o, a] = re(0), p = ae(null), d = ae(null), l = Fe(() => {
|
|
276
276
|
p.current && window.clearTimeout(p.current), p.current = null, d.current && window.clearTimeout(d.current), d.current = null, d.current = window.setTimeout(() => {
|
|
277
|
-
d.current = null,
|
|
278
|
-
},
|
|
279
|
-
}, []),
|
|
280
|
-
p.current && window.clearTimeout(p.current), p.current = null, d.current && window.clearTimeout(d.current), d.current = null, a((f) => f + 1),
|
|
281
|
-
() => requestAnimationFrame(() =>
|
|
277
|
+
d.current = null, s(!1), i(!1);
|
|
278
|
+
}, Dn);
|
|
279
|
+
}, []), _ = Fe(() => {
|
|
280
|
+
p.current && window.clearTimeout(p.current), p.current = null, d.current && window.clearTimeout(d.current), d.current = null, a((f) => f + 1), i(!1), s(!0), requestAnimationFrame(
|
|
281
|
+
() => requestAnimationFrame(() => i(!0))
|
|
282
282
|
), p.current = window.setTimeout(() => {
|
|
283
|
-
p.current = null,
|
|
284
|
-
},
|
|
285
|
-
}, [
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
() => ({ start:
|
|
289
|
-
[
|
|
290
|
-
),
|
|
291
|
-
return /* @__PURE__ */ m.jsxs(
|
|
283
|
+
p.current = null, l();
|
|
284
|
+
}, ft);
|
|
285
|
+
}, [l]);
|
|
286
|
+
ie(() => l, [l]);
|
|
287
|
+
const E = Se(
|
|
288
|
+
() => ({ start: _, stop: l, visible: n }),
|
|
289
|
+
[_, l, n]
|
|
290
|
+
), C = t === "light" ? "https://icc-web-assets.s3.ap-southeast-1.amazonaws.com/loader/build-up-white.webm" : "https://icc-web-assets.s3.ap-southeast-1.amazonaws.com/loader/build-up-black.webm";
|
|
291
|
+
return /* @__PURE__ */ m.jsxs(It.Provider, { value: E, children: [
|
|
292
292
|
e,
|
|
293
293
|
n && /* @__PURE__ */ m.jsx("div", { className: "cta-loader__overlay", children: /* @__PURE__ */ m.jsxs("div", { className: "cta-loader__content", children: [
|
|
294
294
|
/* @__PURE__ */ m.jsx(
|
|
@@ -300,7 +300,7 @@ function rn({
|
|
|
300
300
|
playsInline: !0,
|
|
301
301
|
preload: "auto",
|
|
302
302
|
className: "cta-loader__video",
|
|
303
|
-
children: /* @__PURE__ */ m.jsx("source", { src:
|
|
303
|
+
children: /* @__PURE__ */ m.jsx("source", { src: C, type: "video/webm" })
|
|
304
304
|
}
|
|
305
305
|
),
|
|
306
306
|
/* @__PURE__ */ m.jsx("div", { className: "cta-loader__bar-wrapper", children: /* @__PURE__ */ m.jsx("div", { className: "cta-loader__bar-track", children: /* @__PURE__ */ m.jsx(
|
|
@@ -308,114 +308,114 @@ function rn({
|
|
|
308
308
|
{
|
|
309
309
|
className: "cta-loader__bar-fill",
|
|
310
310
|
style: {
|
|
311
|
-
transform:
|
|
312
|
-
transition: `transform ${
|
|
311
|
+
transform: r ? "scaleX(1)" : "scaleX(0)",
|
|
312
|
+
transition: `transform ${ft}ms linear`
|
|
313
313
|
}
|
|
314
314
|
},
|
|
315
|
-
|
|
315
|
+
o
|
|
316
316
|
) }) })
|
|
317
317
|
] }) })
|
|
318
318
|
] });
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function $t(e, t) {
|
|
321
321
|
return function() {
|
|
322
322
|
return e.apply(t, arguments);
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
const { toString:
|
|
326
|
-
const n =
|
|
325
|
+
const { toString: Un } = Object.prototype, { getPrototypeOf: tt } = Object, { iterator: Be, toStringTag: Gt } = Symbol, Ye = /* @__PURE__ */ ((e) => (t) => {
|
|
326
|
+
const n = Un.call(t);
|
|
327
327
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
328
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
329
|
-
function
|
|
330
|
-
return e !== null && !
|
|
328
|
+
})(/* @__PURE__ */ Object.create(null)), oe = (e) => (e = e.toLowerCase(), (t) => Ye(t) === e), Me = (e) => (t) => typeof t === e, { isArray: ye } = Array, we = Me("undefined");
|
|
329
|
+
function De(e) {
|
|
330
|
+
return e !== null && !we(e) && e.constructor !== null && !we(e.constructor) && ee(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
331
331
|
}
|
|
332
|
-
const
|
|
333
|
-
function
|
|
332
|
+
const Jt = oe("ArrayBuffer");
|
|
333
|
+
function Tn(e) {
|
|
334
334
|
let t;
|
|
335
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
335
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Jt(e.buffer), t;
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
if (
|
|
337
|
+
const Nn = Me("string"), ee = Me("function"), Xt = Me("number"), Ae = (e) => e !== null && typeof e == "object", vn = (e) => e === !0 || e === !1, Pe = (e) => {
|
|
338
|
+
if (Ye(e) !== "object")
|
|
339
339
|
return !1;
|
|
340
|
-
const t =
|
|
341
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
342
|
-
},
|
|
343
|
-
if (!
|
|
340
|
+
const t = tt(e);
|
|
341
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Gt in e) && !(Be in e);
|
|
342
|
+
}, xn = (e) => {
|
|
343
|
+
if (!Ae(e) || De(e))
|
|
344
344
|
return !1;
|
|
345
345
|
try {
|
|
346
346
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
347
347
|
} catch {
|
|
348
348
|
return !1;
|
|
349
349
|
}
|
|
350
|
-
},
|
|
350
|
+
}, Ln = oe("Date"), Pn = oe("File"), On = oe("Blob"), kn = oe("FileList"), Fn = (e) => Ae(e) && ee(e.pipe), jn = (e) => {
|
|
351
351
|
let t;
|
|
352
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
353
|
-
t === "object" &&
|
|
354
|
-
},
|
|
352
|
+
return e && (typeof FormData == "function" && e instanceof FormData || ee(e.append) && ((t = Ye(e)) === "formdata" || // detect form-data instance
|
|
353
|
+
t === "object" && ee(e.toString) && e.toString() === "[object FormData]"));
|
|
354
|
+
}, Bn = oe("URLSearchParams"), [Yn, Mn, Hn, In] = [
|
|
355
355
|
"ReadableStream",
|
|
356
356
|
"Request",
|
|
357
357
|
"Response",
|
|
358
358
|
"Headers"
|
|
359
|
-
].map(
|
|
360
|
-
function
|
|
359
|
+
].map(oe), $n = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
360
|
+
function Ue(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
361
361
|
if (e === null || typeof e > "u")
|
|
362
362
|
return;
|
|
363
|
-
let
|
|
364
|
-
if (typeof e != "object" && (e = [e]),
|
|
365
|
-
for (
|
|
366
|
-
t.call(null, e[
|
|
363
|
+
let s, r;
|
|
364
|
+
if (typeof e != "object" && (e = [e]), ye(e))
|
|
365
|
+
for (s = 0, r = e.length; s < r; s++)
|
|
366
|
+
t.call(null, e[s], s, e);
|
|
367
367
|
else {
|
|
368
|
-
if (
|
|
368
|
+
if (De(e))
|
|
369
369
|
return;
|
|
370
|
-
const
|
|
370
|
+
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
371
371
|
let a;
|
|
372
|
-
for (
|
|
373
|
-
a =
|
|
372
|
+
for (s = 0; s < o; s++)
|
|
373
|
+
a = i[s], t.call(null, e[a], a, e);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
if (
|
|
376
|
+
function qt(e, t) {
|
|
377
|
+
if (De(e))
|
|
378
378
|
return null;
|
|
379
379
|
t = t.toLowerCase();
|
|
380
380
|
const n = Object.keys(e);
|
|
381
|
-
let
|
|
382
|
-
for (;
|
|
383
|
-
if (
|
|
384
|
-
return
|
|
381
|
+
let s = n.length, r;
|
|
382
|
+
for (; s-- > 0; )
|
|
383
|
+
if (r = n[s], t === r.toLowerCase())
|
|
384
|
+
return r;
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
389
|
-
const { caseless: e, skipUndefined: t } =
|
|
390
|
-
if (
|
|
387
|
+
const le = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Vt = (e) => !we(e) && e !== le;
|
|
388
|
+
function qe() {
|
|
389
|
+
const { caseless: e, skipUndefined: t } = Vt(this) && this || {}, n = {}, s = (r, i) => {
|
|
390
|
+
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
391
391
|
return;
|
|
392
|
-
const
|
|
393
|
-
|
|
392
|
+
const o = e && qt(n, i) || i;
|
|
393
|
+
Pe(n[o]) && Pe(r) ? n[o] = qe(n[o], r) : Pe(r) ? n[o] = qe({}, r) : ye(r) ? n[o] = r.slice() : (!t || !we(r)) && (n[o] = r);
|
|
394
394
|
};
|
|
395
|
-
for (let
|
|
396
|
-
arguments[
|
|
395
|
+
for (let r = 0, i = arguments.length; r < i; r++)
|
|
396
|
+
arguments[r] && Ue(arguments[r], s);
|
|
397
397
|
return n;
|
|
398
398
|
}
|
|
399
|
-
const
|
|
399
|
+
const Gn = (e, t, n, { allOwnKeys: s } = {}) => (Ue(
|
|
400
400
|
t,
|
|
401
|
-
(
|
|
402
|
-
n &&
|
|
403
|
-
value:
|
|
401
|
+
(r, i) => {
|
|
402
|
+
n && ee(r) ? Object.defineProperty(e, i, {
|
|
403
|
+
value: $t(r, n),
|
|
404
404
|
writable: !0,
|
|
405
405
|
enumerable: !0,
|
|
406
406
|
configurable: !0
|
|
407
|
-
}) : Object.defineProperty(e,
|
|
408
|
-
value:
|
|
407
|
+
}) : Object.defineProperty(e, i, {
|
|
408
|
+
value: r,
|
|
409
409
|
writable: !0,
|
|
410
410
|
enumerable: !0,
|
|
411
411
|
configurable: !0
|
|
412
412
|
});
|
|
413
413
|
},
|
|
414
|
-
{ allOwnKeys:
|
|
415
|
-
), e),
|
|
414
|
+
{ allOwnKeys: s }
|
|
415
|
+
), e), Jn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Xn = (e, t, n, s) => {
|
|
416
416
|
e.prototype = Object.create(
|
|
417
417
|
t.prototype,
|
|
418
|
-
|
|
418
|
+
s
|
|
419
419
|
), Object.defineProperty(e.prototype, "constructor", {
|
|
420
420
|
value: e,
|
|
421
421
|
writable: !0,
|
|
@@ -424,56 +424,56 @@ const gn = (e, t, n, { allOwnKeys: r } = {}) => (we(
|
|
|
424
424
|
}), Object.defineProperty(e, "super", {
|
|
425
425
|
value: t.prototype
|
|
426
426
|
}), n && Object.assign(e.prototype, n);
|
|
427
|
-
},
|
|
428
|
-
let
|
|
427
|
+
}, qn = (e, t, n, s) => {
|
|
428
|
+
let r, i, o;
|
|
429
429
|
const a = {};
|
|
430
430
|
if (t = t || {}, e == null) return t;
|
|
431
431
|
do {
|
|
432
|
-
for (
|
|
433
|
-
|
|
434
|
-
e = n !== !1 &&
|
|
432
|
+
for (r = Object.getOwnPropertyNames(e), i = r.length; i-- > 0; )
|
|
433
|
+
o = r[i], (!s || s(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0);
|
|
434
|
+
e = n !== !1 && tt(e);
|
|
435
435
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
436
436
|
return t;
|
|
437
|
-
},
|
|
437
|
+
}, Vn = (e, t, n) => {
|
|
438
438
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
439
|
-
const
|
|
440
|
-
return
|
|
441
|
-
},
|
|
439
|
+
const s = e.indexOf(t, n);
|
|
440
|
+
return s !== -1 && s === n;
|
|
441
|
+
}, Kn = (e) => {
|
|
442
442
|
if (!e) return null;
|
|
443
|
-
if (
|
|
443
|
+
if (ye(e)) return e;
|
|
444
444
|
let t = e.length;
|
|
445
|
-
if (!
|
|
445
|
+
if (!Xt(t)) return null;
|
|
446
446
|
const n = new Array(t);
|
|
447
447
|
for (; t-- > 0; )
|
|
448
448
|
n[t] = e[t];
|
|
449
449
|
return n;
|
|
450
|
-
},
|
|
451
|
-
const
|
|
452
|
-
let
|
|
453
|
-
for (; (
|
|
454
|
-
const
|
|
455
|
-
t.call(e,
|
|
450
|
+
}, zn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && tt(Uint8Array)), Zn = (e, t) => {
|
|
451
|
+
const s = (e && e[Be]).call(e);
|
|
452
|
+
let r;
|
|
453
|
+
for (; (r = s.next()) && !r.done; ) {
|
|
454
|
+
const i = r.value;
|
|
455
|
+
t.call(e, i[0], i[1]);
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, Wn = (e, t) => {
|
|
458
458
|
let n;
|
|
459
|
-
const
|
|
459
|
+
const s = [];
|
|
460
460
|
for (; (n = e.exec(t)) !== null; )
|
|
461
|
-
|
|
462
|
-
return
|
|
463
|
-
},
|
|
464
|
-
return
|
|
465
|
-
}),
|
|
466
|
-
const n = Object.getOwnPropertyDescriptors(e),
|
|
467
|
-
|
|
468
|
-
let
|
|
469
|
-
(
|
|
470
|
-
}), Object.defineProperties(e,
|
|
471
|
-
},
|
|
472
|
-
|
|
473
|
-
if (
|
|
461
|
+
s.push(n);
|
|
462
|
+
return s;
|
|
463
|
+
}, Qn = oe("HTMLFormElement"), es = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, s, r) {
|
|
464
|
+
return s.toUpperCase() + r;
|
|
465
|
+
}), mt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ts = oe("RegExp"), Kt = (e, t) => {
|
|
466
|
+
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
467
|
+
Ue(n, (r, i) => {
|
|
468
|
+
let o;
|
|
469
|
+
(o = t(r, i, e)) !== !1 && (s[i] = o || r);
|
|
470
|
+
}), Object.defineProperties(e, s);
|
|
471
|
+
}, ns = (e) => {
|
|
472
|
+
Kt(e, (t, n) => {
|
|
473
|
+
if (ee(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
474
474
|
return !1;
|
|
475
|
-
const
|
|
476
|
-
if (
|
|
475
|
+
const s = e[n];
|
|
476
|
+
if (ee(s)) {
|
|
477
477
|
if (t.enumerable = !1, "writable" in t) {
|
|
478
478
|
t.writable = !1;
|
|
479
479
|
return;
|
|
@@ -483,109 +483,109 @@ const gn = (e, t, n, { allOwnKeys: r } = {}) => (we(
|
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
|
-
},
|
|
487
|
-
const n = {},
|
|
488
|
-
|
|
489
|
-
n[
|
|
486
|
+
}, ss = (e, t) => {
|
|
487
|
+
const n = {}, s = (r) => {
|
|
488
|
+
r.forEach((i) => {
|
|
489
|
+
n[i] = !0;
|
|
490
490
|
});
|
|
491
491
|
};
|
|
492
|
-
return
|
|
493
|
-
},
|
|
494
|
-
},
|
|
495
|
-
function
|
|
496
|
-
return !!(e &&
|
|
492
|
+
return ye(e) ? s(e) : s(String(e).split(t)), n;
|
|
493
|
+
}, rs = () => {
|
|
494
|
+
}, is = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
495
|
+
function os(e) {
|
|
496
|
+
return !!(e && ee(e.append) && e[Gt] === "FormData" && e[Be]);
|
|
497
497
|
}
|
|
498
|
-
const
|
|
499
|
-
const t = new Array(10), n = (
|
|
500
|
-
if (
|
|
501
|
-
if (t.indexOf(
|
|
498
|
+
const as = (e) => {
|
|
499
|
+
const t = new Array(10), n = (s, r) => {
|
|
500
|
+
if (Ae(s)) {
|
|
501
|
+
if (t.indexOf(s) >= 0)
|
|
502
502
|
return;
|
|
503
|
-
if (
|
|
504
|
-
return
|
|
505
|
-
if (!("toJSON" in
|
|
506
|
-
t[
|
|
507
|
-
const
|
|
508
|
-
return
|
|
509
|
-
const p = n(
|
|
510
|
-
!
|
|
511
|
-
}), t[
|
|
503
|
+
if (De(s))
|
|
504
|
+
return s;
|
|
505
|
+
if (!("toJSON" in s)) {
|
|
506
|
+
t[r] = s;
|
|
507
|
+
const i = ye(s) ? [] : {};
|
|
508
|
+
return Ue(s, (o, a) => {
|
|
509
|
+
const p = n(o, r + 1);
|
|
510
|
+
!we(p) && (i[a] = p);
|
|
511
|
+
}), t[r] = void 0, i;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
return
|
|
514
|
+
return s;
|
|
515
515
|
};
|
|
516
516
|
return n(e, 0);
|
|
517
|
-
},
|
|
517
|
+
}, cs = oe("AsyncFunction"), ls = (e) => e && (Ae(e) || ee(e)) && ee(e.then) && ee(e.catch), zt = ((e, t) => e ? setImmediate : t ? ((n, s) => (le.addEventListener(
|
|
518
518
|
"message",
|
|
519
|
-
({ source:
|
|
520
|
-
|
|
519
|
+
({ source: r, data: i }) => {
|
|
520
|
+
r === le && i === n && s.length && s.shift()();
|
|
521
521
|
},
|
|
522
522
|
!1
|
|
523
|
-
), (
|
|
524
|
-
|
|
525
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function",
|
|
526
|
-
isArray:
|
|
527
|
-
isArrayBuffer:
|
|
528
|
-
isBuffer:
|
|
529
|
-
isFormData:
|
|
530
|
-
isArrayBufferView:
|
|
531
|
-
isString:
|
|
532
|
-
isNumber:
|
|
533
|
-
isBoolean:
|
|
534
|
-
isObject:
|
|
535
|
-
isPlainObject:
|
|
536
|
-
isEmptyObject:
|
|
537
|
-
isReadableStream:
|
|
538
|
-
isRequest:
|
|
539
|
-
isResponse:
|
|
540
|
-
isHeaders:
|
|
541
|
-
isUndefined:
|
|
542
|
-
isDate:
|
|
543
|
-
isFile:
|
|
544
|
-
isBlob:
|
|
545
|
-
isRegExp:
|
|
546
|
-
isFunction:
|
|
547
|
-
isStream:
|
|
548
|
-
isURLSearchParams:
|
|
549
|
-
isTypedArray:
|
|
550
|
-
isFileList:
|
|
551
|
-
forEach:
|
|
552
|
-
merge:
|
|
553
|
-
extend:
|
|
554
|
-
trim:
|
|
555
|
-
stripBOM:
|
|
556
|
-
inherits:
|
|
557
|
-
toFlatObject:
|
|
558
|
-
kindOf:
|
|
559
|
-
kindOfTest:
|
|
560
|
-
endsWith:
|
|
561
|
-
toArray:
|
|
562
|
-
forEachEntry:
|
|
563
|
-
matchAll:
|
|
564
|
-
isHTMLForm:
|
|
565
|
-
hasOwnProperty:
|
|
566
|
-
hasOwnProp:
|
|
523
|
+
), (r) => {
|
|
524
|
+
s.push(r), le.postMessage(n, "*");
|
|
525
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", ee(le.postMessage)), ds = typeof queueMicrotask < "u" ? queueMicrotask.bind(le) : typeof process < "u" && process.nextTick || zt, us = (e) => e != null && ee(e[Be]), c = {
|
|
526
|
+
isArray: ye,
|
|
527
|
+
isArrayBuffer: Jt,
|
|
528
|
+
isBuffer: De,
|
|
529
|
+
isFormData: jn,
|
|
530
|
+
isArrayBufferView: Tn,
|
|
531
|
+
isString: Nn,
|
|
532
|
+
isNumber: Xt,
|
|
533
|
+
isBoolean: vn,
|
|
534
|
+
isObject: Ae,
|
|
535
|
+
isPlainObject: Pe,
|
|
536
|
+
isEmptyObject: xn,
|
|
537
|
+
isReadableStream: Yn,
|
|
538
|
+
isRequest: Mn,
|
|
539
|
+
isResponse: Hn,
|
|
540
|
+
isHeaders: In,
|
|
541
|
+
isUndefined: we,
|
|
542
|
+
isDate: Ln,
|
|
543
|
+
isFile: Pn,
|
|
544
|
+
isBlob: On,
|
|
545
|
+
isRegExp: ts,
|
|
546
|
+
isFunction: ee,
|
|
547
|
+
isStream: Fn,
|
|
548
|
+
isURLSearchParams: Bn,
|
|
549
|
+
isTypedArray: zn,
|
|
550
|
+
isFileList: kn,
|
|
551
|
+
forEach: Ue,
|
|
552
|
+
merge: qe,
|
|
553
|
+
extend: Gn,
|
|
554
|
+
trim: $n,
|
|
555
|
+
stripBOM: Jn,
|
|
556
|
+
inherits: Xn,
|
|
557
|
+
toFlatObject: qn,
|
|
558
|
+
kindOf: Ye,
|
|
559
|
+
kindOfTest: oe,
|
|
560
|
+
endsWith: Vn,
|
|
561
|
+
toArray: Kn,
|
|
562
|
+
forEachEntry: Zn,
|
|
563
|
+
matchAll: Wn,
|
|
564
|
+
isHTMLForm: Qn,
|
|
565
|
+
hasOwnProperty: mt,
|
|
566
|
+
hasOwnProp: mt,
|
|
567
567
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
568
|
-
reduceDescriptors:
|
|
569
|
-
freezeMethods:
|
|
570
|
-
toObjectSet:
|
|
571
|
-
toCamelCase:
|
|
572
|
-
noop:
|
|
573
|
-
toFiniteNumber:
|
|
574
|
-
findKey:
|
|
575
|
-
global:
|
|
576
|
-
isContextDefined:
|
|
577
|
-
isSpecCompliantForm:
|
|
578
|
-
toJSONObject:
|
|
579
|
-
isAsyncFn:
|
|
580
|
-
isThenable:
|
|
581
|
-
setImmediate:
|
|
582
|
-
asap:
|
|
583
|
-
isIterable:
|
|
568
|
+
reduceDescriptors: Kt,
|
|
569
|
+
freezeMethods: ns,
|
|
570
|
+
toObjectSet: ss,
|
|
571
|
+
toCamelCase: es,
|
|
572
|
+
noop: rs,
|
|
573
|
+
toFiniteNumber: is,
|
|
574
|
+
findKey: qt,
|
|
575
|
+
global: le,
|
|
576
|
+
isContextDefined: Vt,
|
|
577
|
+
isSpecCompliantForm: os,
|
|
578
|
+
toJSONObject: as,
|
|
579
|
+
isAsyncFn: cs,
|
|
580
|
+
isThenable: ls,
|
|
581
|
+
setImmediate: zt,
|
|
582
|
+
asap: ds,
|
|
583
|
+
isIterable: us
|
|
584
584
|
};
|
|
585
|
-
let
|
|
586
|
-
static from(t, n, r,
|
|
587
|
-
const a = new
|
|
588
|
-
return a.cause = t, a.name = t.name,
|
|
585
|
+
let b = class Zt extends Error {
|
|
586
|
+
static from(t, n, s, r, i, o) {
|
|
587
|
+
const a = new Zt(t.message, n || t.code, s, r, i);
|
|
588
|
+
return a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
* Create an Error with the specified message, config, error code, request and response.
|
|
@@ -598,8 +598,8 @@ let C = class Dt extends Error {
|
|
|
598
598
|
*
|
|
599
599
|
* @returns {Error} The created error.
|
|
600
600
|
*/
|
|
601
|
-
constructor(t, n,
|
|
602
|
-
super(t), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n),
|
|
601
|
+
constructor(t, n, s, r, i) {
|
|
602
|
+
super(t), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), s && (this.config = s), r && (this.request = r), i && (this.response = i, this.status = i.status);
|
|
603
603
|
}
|
|
604
604
|
toJSON() {
|
|
605
605
|
return {
|
|
@@ -621,48 +621,48 @@ let C = class Dt extends Error {
|
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
623
|
};
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
const
|
|
637
|
-
function
|
|
624
|
+
b.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
625
|
+
b.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
626
|
+
b.ECONNABORTED = "ECONNABORTED";
|
|
627
|
+
b.ETIMEDOUT = "ETIMEDOUT";
|
|
628
|
+
b.ERR_NETWORK = "ERR_NETWORK";
|
|
629
|
+
b.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
630
|
+
b.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
631
|
+
b.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
632
|
+
b.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
633
|
+
b.ERR_CANCELED = "ERR_CANCELED";
|
|
634
|
+
b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
635
|
+
b.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
636
|
+
const ps = null;
|
|
637
|
+
function Ve(e) {
|
|
638
638
|
return c.isPlainObject(e) || c.isArray(e);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Wt(e) {
|
|
641
641
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
642
642
|
}
|
|
643
|
-
function
|
|
644
|
-
return e ? e.concat(t).map(function(
|
|
645
|
-
return
|
|
643
|
+
function _t(e, t, n) {
|
|
644
|
+
return e ? e.concat(t).map(function(r, i) {
|
|
645
|
+
return r = Wt(r), !n && i ? "[" + r + "]" : r;
|
|
646
646
|
}).join(n ? "." : "") : t;
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
return c.isArray(e) && !e.some(
|
|
648
|
+
function fs(e) {
|
|
649
|
+
return c.isArray(e) && !e.some(Ve);
|
|
650
650
|
}
|
|
651
|
-
const
|
|
651
|
+
const ms = c.toFlatObject(c, {}, null, function(t) {
|
|
652
652
|
return /^is[A-Z]/.test(t);
|
|
653
653
|
});
|
|
654
|
-
function
|
|
654
|
+
function He(e, t, n) {
|
|
655
655
|
if (!c.isObject(e))
|
|
656
656
|
throw new TypeError("target must be an object");
|
|
657
657
|
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
658
658
|
metaTokens: !0,
|
|
659
659
|
dots: !1,
|
|
660
660
|
indexes: !1
|
|
661
|
-
}, !1, function(y,
|
|
662
|
-
return !c.isUndefined(
|
|
661
|
+
}, !1, function(y, h) {
|
|
662
|
+
return !c.isUndefined(h[y]);
|
|
663
663
|
});
|
|
664
|
-
const
|
|
665
|
-
if (!c.isFunction(
|
|
664
|
+
const s = n.metaTokens, r = n.visitor || l, i = n.dots, o = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
665
|
+
if (!c.isFunction(r))
|
|
666
666
|
throw new TypeError("visitor must be a function");
|
|
667
667
|
function d(f) {
|
|
668
668
|
if (f === null) return "";
|
|
@@ -671,50 +671,50 @@ function xe(e, t, n) {
|
|
|
671
671
|
if (c.isBoolean(f))
|
|
672
672
|
return f.toString();
|
|
673
673
|
if (!p && c.isBlob(f))
|
|
674
|
-
throw new
|
|
674
|
+
throw new b("Blob is not supported. Use a Buffer instead.");
|
|
675
675
|
return c.isArrayBuffer(f) || c.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
let
|
|
679
|
-
if (f && !
|
|
677
|
+
function l(f, y, h) {
|
|
678
|
+
let v = f;
|
|
679
|
+
if (f && !h && typeof f == "object") {
|
|
680
680
|
if (c.endsWith(y, "{}"))
|
|
681
|
-
y =
|
|
682
|
-
else if (c.isArray(f) &&
|
|
683
|
-
return y =
|
|
684
|
-
!(c.isUndefined(
|
|
681
|
+
y = s ? y : y.slice(0, -2), f = JSON.stringify(f);
|
|
682
|
+
else if (c.isArray(f) && fs(f) || (c.isFileList(f) || c.endsWith(y, "[]")) && (v = c.toArray(f)))
|
|
683
|
+
return y = Wt(y), v.forEach(function(U, j) {
|
|
684
|
+
!(c.isUndefined(U) || U === null) && t.append(
|
|
685
685
|
// eslint-disable-next-line no-nested-ternary
|
|
686
|
-
|
|
687
|
-
d(
|
|
686
|
+
o === !0 ? _t([y], j, i) : o === null ? y : y + "[]",
|
|
687
|
+
d(U)
|
|
688
688
|
);
|
|
689
689
|
}), !1;
|
|
690
690
|
}
|
|
691
|
-
return
|
|
691
|
+
return Ve(f) ? !0 : (t.append(_t(h, y, i), d(f)), !1);
|
|
692
692
|
}
|
|
693
|
-
const
|
|
694
|
-
defaultVisitor:
|
|
693
|
+
const _ = [], E = Object.assign(ms, {
|
|
694
|
+
defaultVisitor: l,
|
|
695
695
|
convertValue: d,
|
|
696
|
-
isVisitable:
|
|
696
|
+
isVisitable: Ve
|
|
697
697
|
});
|
|
698
|
-
function
|
|
698
|
+
function C(f, y) {
|
|
699
699
|
if (!c.isUndefined(f)) {
|
|
700
|
-
if (
|
|
700
|
+
if (_.indexOf(f) !== -1)
|
|
701
701
|
throw Error("Circular reference detected in " + y.join("."));
|
|
702
|
-
|
|
703
|
-
(!(c.isUndefined(
|
|
702
|
+
_.push(f), c.forEach(f, function(v, B) {
|
|
703
|
+
(!(c.isUndefined(v) || v === null) && r.call(
|
|
704
704
|
t,
|
|
705
|
-
|
|
706
|
-
c.isString(
|
|
705
|
+
v,
|
|
706
|
+
c.isString(B) ? B.trim() : B,
|
|
707
707
|
y,
|
|
708
|
-
|
|
709
|
-
)) === !0 &&
|
|
710
|
-
}),
|
|
708
|
+
E
|
|
709
|
+
)) === !0 && C(v, y ? y.concat(B) : [B]);
|
|
710
|
+
}), _.pop();
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
if (!c.isObject(e))
|
|
714
714
|
throw new TypeError("data must be an object");
|
|
715
|
-
return
|
|
715
|
+
return C(e), t;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function ht(e) {
|
|
718
718
|
const t = {
|
|
719
719
|
"!": "%21",
|
|
720
720
|
"'": "%27",
|
|
@@ -724,42 +724,42 @@ function nt(e) {
|
|
|
724
724
|
"%20": "+",
|
|
725
725
|
"%00": "\0"
|
|
726
726
|
};
|
|
727
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
728
|
-
return t[
|
|
727
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(s) {
|
|
728
|
+
return t[s];
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
this._pairs = [], e &&
|
|
731
|
+
function nt(e, t) {
|
|
732
|
+
this._pairs = [], e && He(e, this, t);
|
|
733
733
|
}
|
|
734
|
-
const
|
|
735
|
-
|
|
734
|
+
const Qt = nt.prototype;
|
|
735
|
+
Qt.append = function(t, n) {
|
|
736
736
|
this._pairs.push([t, n]);
|
|
737
737
|
};
|
|
738
|
-
|
|
739
|
-
const n = t ? function(
|
|
740
|
-
return t.call(this,
|
|
741
|
-
} :
|
|
742
|
-
return this._pairs.map(function(
|
|
743
|
-
return n(
|
|
738
|
+
Qt.toString = function(t) {
|
|
739
|
+
const n = t ? function(s) {
|
|
740
|
+
return t.call(this, s, ht);
|
|
741
|
+
} : ht;
|
|
742
|
+
return this._pairs.map(function(r) {
|
|
743
|
+
return n(r[0]) + "=" + n(r[1]);
|
|
744
744
|
}, "").join("&");
|
|
745
745
|
};
|
|
746
|
-
function
|
|
746
|
+
function _s(e) {
|
|
747
747
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function en(e, t, n) {
|
|
750
750
|
if (!t)
|
|
751
751
|
return e;
|
|
752
|
-
const
|
|
752
|
+
const s = n && n.encode || _s, r = c.isFunction(n) ? {
|
|
753
753
|
serialize: n
|
|
754
|
-
} : n,
|
|
755
|
-
let
|
|
756
|
-
if (
|
|
754
|
+
} : n, i = r && r.serialize;
|
|
755
|
+
let o;
|
|
756
|
+
if (i ? o = i(t, r) : o = c.isURLSearchParams(t) ? t.toString() : new nt(t, r).toString(s), o) {
|
|
757
757
|
const a = e.indexOf("#");
|
|
758
|
-
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") +
|
|
758
|
+
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
759
759
|
}
|
|
760
760
|
return e;
|
|
761
761
|
}
|
|
762
|
-
class
|
|
762
|
+
class wt {
|
|
763
763
|
constructor() {
|
|
764
764
|
this.handlers = [];
|
|
765
765
|
}
|
|
@@ -772,12 +772,12 @@ class rt {
|
|
|
772
772
|
*
|
|
773
773
|
* @return {Number} An ID used to remove interceptor later
|
|
774
774
|
*/
|
|
775
|
-
use(t, n,
|
|
775
|
+
use(t, n, s) {
|
|
776
776
|
return this.handlers.push({
|
|
777
777
|
fulfilled: t,
|
|
778
778
|
rejected: n,
|
|
779
|
-
synchronous:
|
|
780
|
-
runWhen:
|
|
779
|
+
synchronous: s ? s.synchronous : !1,
|
|
780
|
+
runWhen: s ? s.runWhen : null
|
|
781
781
|
}), this.handlers.length - 1;
|
|
782
782
|
}
|
|
783
783
|
/**
|
|
@@ -809,88 +809,88 @@ class rt {
|
|
|
809
809
|
* @returns {void}
|
|
810
810
|
*/
|
|
811
811
|
forEach(t) {
|
|
812
|
-
c.forEach(this.handlers, function(
|
|
813
|
-
|
|
812
|
+
c.forEach(this.handlers, function(s) {
|
|
813
|
+
s !== null && t(s);
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
const
|
|
817
|
+
const st = {
|
|
818
818
|
silentJSONParsing: !0,
|
|
819
819
|
forcedJSONParsing: !0,
|
|
820
820
|
clarifyTimeoutError: !1,
|
|
821
821
|
legacyInterceptorReqResOrdering: !0
|
|
822
|
-
},
|
|
822
|
+
}, hs = typeof URLSearchParams < "u" ? URLSearchParams : nt, ws = typeof FormData < "u" ? FormData : null, ys = typeof Blob < "u" ? Blob : null, gs = {
|
|
823
823
|
isBrowser: !0,
|
|
824
824
|
classes: {
|
|
825
|
-
URLSearchParams:
|
|
826
|
-
FormData:
|
|
827
|
-
Blob:
|
|
825
|
+
URLSearchParams: hs,
|
|
826
|
+
FormData: ws,
|
|
827
|
+
Blob: ys
|
|
828
828
|
},
|
|
829
829
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
830
|
-
},
|
|
831
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
830
|
+
}, rt = typeof window < "u" && typeof document < "u", Ke = typeof navigator == "object" && navigator || void 0, Cs = rt && (!Ke || ["ReactNative", "NativeScript", "NS"].indexOf(Ke.product) < 0), Rs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
831
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", bs = rt && window.location.href || "http://localhost", Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
832
832
|
__proto__: null,
|
|
833
|
-
hasBrowserEnv:
|
|
834
|
-
hasStandardBrowserEnv:
|
|
835
|
-
hasStandardBrowserWebWorkerEnv:
|
|
836
|
-
navigator:
|
|
837
|
-
origin:
|
|
838
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
839
|
-
...
|
|
840
|
-
...
|
|
833
|
+
hasBrowserEnv: rt,
|
|
834
|
+
hasStandardBrowserEnv: Cs,
|
|
835
|
+
hasStandardBrowserWebWorkerEnv: Rs,
|
|
836
|
+
navigator: Ke,
|
|
837
|
+
origin: bs
|
|
838
|
+
}, Symbol.toStringTag, { value: "Module" })), K = {
|
|
839
|
+
...Es,
|
|
840
|
+
...gs
|
|
841
841
|
};
|
|
842
|
-
function
|
|
843
|
-
return
|
|
844
|
-
visitor: function(n,
|
|
845
|
-
return
|
|
842
|
+
function Ss(e, t) {
|
|
843
|
+
return He(e, new K.classes.URLSearchParams(), {
|
|
844
|
+
visitor: function(n, s, r, i) {
|
|
845
|
+
return K.isNode && c.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
846
846
|
},
|
|
847
847
|
...t
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Ds(e) {
|
|
851
851
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function As(e) {
|
|
854
854
|
const t = {}, n = Object.keys(e);
|
|
855
|
-
let
|
|
856
|
-
const
|
|
857
|
-
let
|
|
858
|
-
for (
|
|
859
|
-
|
|
855
|
+
let s;
|
|
856
|
+
const r = n.length;
|
|
857
|
+
let i;
|
|
858
|
+
for (s = 0; s < r; s++)
|
|
859
|
+
i = n[s], t[i] = e[i];
|
|
860
860
|
return t;
|
|
861
861
|
}
|
|
862
|
-
function
|
|
863
|
-
function t(n,
|
|
864
|
-
let
|
|
865
|
-
if (
|
|
866
|
-
const a = Number.isFinite(+
|
|
867
|
-
return
|
|
862
|
+
function tn(e) {
|
|
863
|
+
function t(n, s, r, i) {
|
|
864
|
+
let o = n[i++];
|
|
865
|
+
if (o === "__proto__") return !0;
|
|
866
|
+
const a = Number.isFinite(+o), p = i >= n.length;
|
|
867
|
+
return o = !o && c.isArray(r) ? r.length : o, p ? (c.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !a) : ((!r[o] || !c.isObject(r[o])) && (r[o] = []), t(n, s, r[o], i) && c.isArray(r[o]) && (r[o] = As(r[o])), !a);
|
|
868
868
|
}
|
|
869
869
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
870
870
|
const n = {};
|
|
871
|
-
return c.forEachEntry(e, (
|
|
872
|
-
t(
|
|
871
|
+
return c.forEachEntry(e, (s, r) => {
|
|
872
|
+
t(Ds(s), r, n, 0);
|
|
873
873
|
}), n;
|
|
874
874
|
}
|
|
875
875
|
return null;
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function Us(e, t, n) {
|
|
878
878
|
if (c.isString(e))
|
|
879
879
|
try {
|
|
880
880
|
return (t || JSON.parse)(e), c.trim(e);
|
|
881
|
-
} catch (
|
|
882
|
-
if (
|
|
883
|
-
throw
|
|
881
|
+
} catch (s) {
|
|
882
|
+
if (s.name !== "SyntaxError")
|
|
883
|
+
throw s;
|
|
884
884
|
}
|
|
885
885
|
return (n || JSON.stringify)(e);
|
|
886
886
|
}
|
|
887
|
-
const
|
|
888
|
-
transitional:
|
|
887
|
+
const Te = {
|
|
888
|
+
transitional: st,
|
|
889
889
|
adapter: ["xhr", "http", "fetch"],
|
|
890
890
|
transformRequest: [function(t, n) {
|
|
891
|
-
const
|
|
892
|
-
if (
|
|
893
|
-
return
|
|
891
|
+
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, i = c.isObject(t);
|
|
892
|
+
if (i && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
893
|
+
return r ? JSON.stringify(tn(t)) : t;
|
|
894
894
|
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
895
895
|
return t;
|
|
896
896
|
if (c.isArrayBufferView(t))
|
|
@@ -898,31 +898,31 @@ const ye = {
|
|
|
898
898
|
if (c.isURLSearchParams(t))
|
|
899
899
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
900
900
|
let a;
|
|
901
|
-
if (
|
|
902
|
-
if (
|
|
903
|
-
return
|
|
904
|
-
if ((a = c.isFileList(t)) ||
|
|
901
|
+
if (i) {
|
|
902
|
+
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
903
|
+
return Ss(t, this.formSerializer).toString();
|
|
904
|
+
if ((a = c.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
905
905
|
const p = this.env && this.env.FormData;
|
|
906
|
-
return
|
|
906
|
+
return He(
|
|
907
907
|
a ? { "files[]": t } : t,
|
|
908
908
|
p && new p(),
|
|
909
909
|
this.formSerializer
|
|
910
910
|
);
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
return
|
|
913
|
+
return i || r ? (n.setContentType("application/json", !1), Us(t)) : t;
|
|
914
914
|
}],
|
|
915
915
|
transformResponse: [function(t) {
|
|
916
|
-
const n = this.transitional ||
|
|
916
|
+
const n = this.transitional || Te.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
917
917
|
if (c.isResponse(t) || c.isReadableStream(t))
|
|
918
918
|
return t;
|
|
919
|
-
if (t && c.isString(t) && (
|
|
920
|
-
const
|
|
919
|
+
if (t && c.isString(t) && (s && !this.responseType || r)) {
|
|
920
|
+
const o = !(n && n.silentJSONParsing) && r;
|
|
921
921
|
try {
|
|
922
922
|
return JSON.parse(t, this.parseReviver);
|
|
923
923
|
} catch (a) {
|
|
924
|
-
if (
|
|
925
|
-
throw a.name === "SyntaxError" ?
|
|
924
|
+
if (o)
|
|
925
|
+
throw a.name === "SyntaxError" ? b.from(a, b.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
return t;
|
|
@@ -937,8 +937,8 @@ const ye = {
|
|
|
937
937
|
maxContentLength: -1,
|
|
938
938
|
maxBodyLength: -1,
|
|
939
939
|
env: {
|
|
940
|
-
FormData:
|
|
941
|
-
Blob:
|
|
940
|
+
FormData: K.classes.FormData,
|
|
941
|
+
Blob: K.classes.Blob
|
|
942
942
|
},
|
|
943
943
|
validateStatus: function(t) {
|
|
944
944
|
return t >= 200 && t < 300;
|
|
@@ -951,9 +951,9 @@ const ye = {
|
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
953
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
954
|
-
|
|
954
|
+
Te.headers[e] = {};
|
|
955
955
|
});
|
|
956
|
-
const
|
|
956
|
+
const Ts = c.toObjectSet([
|
|
957
957
|
"age",
|
|
958
958
|
"authorization",
|
|
959
959
|
"content-length",
|
|
@@ -971,136 +971,136 @@ const ir = c.toObjectSet([
|
|
|
971
971
|
"referer",
|
|
972
972
|
"retry-after",
|
|
973
973
|
"user-agent"
|
|
974
|
-
]),
|
|
974
|
+
]), Ns = (e) => {
|
|
975
975
|
const t = {};
|
|
976
|
-
let n,
|
|
976
|
+
let n, s, r;
|
|
977
977
|
return e && e.split(`
|
|
978
|
-
`).forEach(function(
|
|
979
|
-
|
|
978
|
+
`).forEach(function(o) {
|
|
979
|
+
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] && Ts[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
980
980
|
}), t;
|
|
981
|
-
},
|
|
982
|
-
function
|
|
981
|
+
}, yt = /* @__PURE__ */ Symbol("internals");
|
|
982
|
+
function Re(e) {
|
|
983
983
|
return e && String(e).trim().toLowerCase();
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
return e === !1 || e == null ? e : c.isArray(e) ? e.map(
|
|
985
|
+
function Oe(e) {
|
|
986
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(Oe) : String(e);
|
|
987
987
|
}
|
|
988
|
-
function
|
|
988
|
+
function vs(e) {
|
|
989
989
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
990
|
-
let
|
|
991
|
-
for (;
|
|
992
|
-
t[
|
|
990
|
+
let s;
|
|
991
|
+
for (; s = n.exec(e); )
|
|
992
|
+
t[s[1]] = s[2];
|
|
993
993
|
return t;
|
|
994
994
|
}
|
|
995
|
-
const
|
|
996
|
-
function
|
|
997
|
-
if (c.isFunction(
|
|
998
|
-
return
|
|
999
|
-
if (
|
|
1000
|
-
if (c.isString(
|
|
1001
|
-
return t.indexOf(
|
|
1002
|
-
if (c.isRegExp(
|
|
1003
|
-
return
|
|
995
|
+
const xs = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
996
|
+
function $e(e, t, n, s, r) {
|
|
997
|
+
if (c.isFunction(s))
|
|
998
|
+
return s.call(this, t, n);
|
|
999
|
+
if (r && (t = n), !!c.isString(t)) {
|
|
1000
|
+
if (c.isString(s))
|
|
1001
|
+
return t.indexOf(s) !== -1;
|
|
1002
|
+
if (c.isRegExp(s))
|
|
1003
|
+
return s.test(t);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1007
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n,
|
|
1006
|
+
function Ls(e) {
|
|
1007
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Ps(e, t) {
|
|
1010
1010
|
const n = c.toCamelCase(" " + t);
|
|
1011
|
-
["get", "set", "has"].forEach((
|
|
1012
|
-
Object.defineProperty(e,
|
|
1013
|
-
value: function(
|
|
1014
|
-
return this[
|
|
1011
|
+
["get", "set", "has"].forEach((s) => {
|
|
1012
|
+
Object.defineProperty(e, s + n, {
|
|
1013
|
+
value: function(r, i, o) {
|
|
1014
|
+
return this[s].call(this, t, r, i, o);
|
|
1015
1015
|
},
|
|
1016
1016
|
configurable: !0
|
|
1017
1017
|
});
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
|
-
let
|
|
1020
|
+
let te = class {
|
|
1021
1021
|
constructor(t) {
|
|
1022
1022
|
t && this.set(t);
|
|
1023
1023
|
}
|
|
1024
|
-
set(t, n,
|
|
1025
|
-
const
|
|
1026
|
-
function
|
|
1027
|
-
const
|
|
1028
|
-
if (!
|
|
1024
|
+
set(t, n, s) {
|
|
1025
|
+
const r = this;
|
|
1026
|
+
function i(a, p, d) {
|
|
1027
|
+
const l = Re(p);
|
|
1028
|
+
if (!l)
|
|
1029
1029
|
throw new Error("header name must be a non-empty string");
|
|
1030
|
-
const
|
|
1031
|
-
(!
|
|
1030
|
+
const _ = c.findKey(r, l);
|
|
1031
|
+
(!_ || r[_] === void 0 || d === !0 || d === void 0 && r[_] !== !1) && (r[_ || p] = Oe(a));
|
|
1032
1032
|
}
|
|
1033
|
-
const
|
|
1033
|
+
const o = (a, p) => c.forEach(a, (d, l) => i(d, l, p));
|
|
1034
1034
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
1035
|
-
|
|
1036
|
-
else if (c.isString(t) && (t = t.trim()) && !
|
|
1037
|
-
|
|
1035
|
+
o(t, n);
|
|
1036
|
+
else if (c.isString(t) && (t = t.trim()) && !xs(t))
|
|
1037
|
+
o(Ns(t), n);
|
|
1038
1038
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
1039
1039
|
let a = {}, p, d;
|
|
1040
|
-
for (const
|
|
1041
|
-
if (!c.isArray(
|
|
1040
|
+
for (const l of t) {
|
|
1041
|
+
if (!c.isArray(l))
|
|
1042
1042
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1043
|
-
a[d =
|
|
1043
|
+
a[d = l[0]] = (p = a[d]) ? c.isArray(p) ? [...p, l[1]] : [p, l[1]] : l[1];
|
|
1044
1044
|
}
|
|
1045
|
-
|
|
1045
|
+
o(a, n);
|
|
1046
1046
|
} else
|
|
1047
|
-
t != null &&
|
|
1047
|
+
t != null && i(n, t, s);
|
|
1048
1048
|
return this;
|
|
1049
1049
|
}
|
|
1050
1050
|
get(t, n) {
|
|
1051
|
-
if (t =
|
|
1052
|
-
const
|
|
1053
|
-
if (
|
|
1054
|
-
const
|
|
1051
|
+
if (t = Re(t), t) {
|
|
1052
|
+
const s = c.findKey(this, t);
|
|
1053
|
+
if (s) {
|
|
1054
|
+
const r = this[s];
|
|
1055
1055
|
if (!n)
|
|
1056
|
-
return
|
|
1056
|
+
return r;
|
|
1057
1057
|
if (n === !0)
|
|
1058
|
-
return
|
|
1058
|
+
return vs(r);
|
|
1059
1059
|
if (c.isFunction(n))
|
|
1060
|
-
return n.call(this,
|
|
1060
|
+
return n.call(this, r, s);
|
|
1061
1061
|
if (c.isRegExp(n))
|
|
1062
|
-
return n.exec(
|
|
1062
|
+
return n.exec(r);
|
|
1063
1063
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
has(t, n) {
|
|
1068
|
-
if (t =
|
|
1069
|
-
const
|
|
1070
|
-
return !!(
|
|
1068
|
+
if (t = Re(t), t) {
|
|
1069
|
+
const s = c.findKey(this, t);
|
|
1070
|
+
return !!(s && this[s] !== void 0 && (!n || $e(this, this[s], s, n)));
|
|
1071
1071
|
}
|
|
1072
1072
|
return !1;
|
|
1073
1073
|
}
|
|
1074
1074
|
delete(t, n) {
|
|
1075
|
-
const
|
|
1076
|
-
let
|
|
1077
|
-
function o
|
|
1078
|
-
if (
|
|
1079
|
-
const a = c.findKey(
|
|
1080
|
-
a && (!n ||
|
|
1075
|
+
const s = this;
|
|
1076
|
+
let r = !1;
|
|
1077
|
+
function i(o) {
|
|
1078
|
+
if (o = Re(o), o) {
|
|
1079
|
+
const a = c.findKey(s, o);
|
|
1080
|
+
a && (!n || $e(s, s[a], a, n)) && (delete s[a], r = !0);
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
|
-
return c.isArray(t) ? t.forEach(
|
|
1083
|
+
return c.isArray(t) ? t.forEach(i) : i(t), r;
|
|
1084
1084
|
}
|
|
1085
1085
|
clear(t) {
|
|
1086
1086
|
const n = Object.keys(this);
|
|
1087
|
-
let
|
|
1088
|
-
for (;
|
|
1089
|
-
const
|
|
1090
|
-
(!t ||
|
|
1087
|
+
let s = n.length, r = !1;
|
|
1088
|
+
for (; s--; ) {
|
|
1089
|
+
const i = n[s];
|
|
1090
|
+
(!t || $e(this, this[i], i, t, !0)) && (delete this[i], r = !0);
|
|
1091
1091
|
}
|
|
1092
|
-
return
|
|
1092
|
+
return r;
|
|
1093
1093
|
}
|
|
1094
1094
|
normalize(t) {
|
|
1095
|
-
const n = this,
|
|
1096
|
-
return c.forEach(this, (
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1099
|
-
n[
|
|
1095
|
+
const n = this, s = {};
|
|
1096
|
+
return c.forEach(this, (r, i) => {
|
|
1097
|
+
const o = c.findKey(s, i);
|
|
1098
|
+
if (o) {
|
|
1099
|
+
n[o] = Oe(r), delete n[i];
|
|
1100
1100
|
return;
|
|
1101
1101
|
}
|
|
1102
|
-
const a = t ?
|
|
1103
|
-
a !==
|
|
1102
|
+
const a = t ? Ls(i) : String(i).trim();
|
|
1103
|
+
a !== i && delete n[i], n[a] = Oe(r), s[a] = !0;
|
|
1104
1104
|
}), this;
|
|
1105
1105
|
}
|
|
1106
1106
|
concat(...t) {
|
|
@@ -1108,8 +1108,8 @@ let J = class {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
toJSON(t) {
|
|
1110
1110
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1111
|
-
return c.forEach(this, (
|
|
1112
|
-
|
|
1111
|
+
return c.forEach(this, (s, r) => {
|
|
1112
|
+
s != null && s !== !1 && (n[r] = t && c.isArray(s) ? s.join(", ") : s);
|
|
1113
1113
|
}), n;
|
|
1114
1114
|
}
|
|
1115
1115
|
[Symbol.iterator]() {
|
|
@@ -1129,42 +1129,42 @@ let J = class {
|
|
|
1129
1129
|
return t instanceof this ? t : new this(t);
|
|
1130
1130
|
}
|
|
1131
1131
|
static concat(t, ...n) {
|
|
1132
|
-
const
|
|
1133
|
-
return n.forEach((
|
|
1132
|
+
const s = new this(t);
|
|
1133
|
+
return n.forEach((r) => s.set(r)), s;
|
|
1134
1134
|
}
|
|
1135
1135
|
static accessor(t) {
|
|
1136
|
-
const
|
|
1136
|
+
const s = (this[yt] = this[yt] = {
|
|
1137
1137
|
accessors: {}
|
|
1138
|
-
}).accessors,
|
|
1139
|
-
function o
|
|
1140
|
-
const a =
|
|
1141
|
-
|
|
1138
|
+
}).accessors, r = this.prototype;
|
|
1139
|
+
function i(o) {
|
|
1140
|
+
const a = Re(o);
|
|
1141
|
+
s[a] || (Ps(r, o), s[a] = !0);
|
|
1142
1142
|
}
|
|
1143
|
-
return c.isArray(t) ? t.forEach(
|
|
1143
|
+
return c.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1144
1144
|
}
|
|
1145
1145
|
};
|
|
1146
|
-
|
|
1147
|
-
c.reduceDescriptors(
|
|
1146
|
+
te.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1147
|
+
c.reduceDescriptors(te.prototype, ({ value: e }, t) => {
|
|
1148
1148
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1149
1149
|
return {
|
|
1150
1150
|
get: () => e,
|
|
1151
|
-
set(
|
|
1152
|
-
this[n] =
|
|
1151
|
+
set(s) {
|
|
1152
|
+
this[n] = s;
|
|
1153
1153
|
}
|
|
1154
1154
|
};
|
|
1155
1155
|
});
|
|
1156
|
-
c.freezeMethods(
|
|
1157
|
-
function
|
|
1158
|
-
const n = this ||
|
|
1159
|
-
let
|
|
1156
|
+
c.freezeMethods(te);
|
|
1157
|
+
function Ge(e, t) {
|
|
1158
|
+
const n = this || Te, s = t || n, r = te.from(s.headers);
|
|
1159
|
+
let i = s.data;
|
|
1160
1160
|
return c.forEach(e, function(a) {
|
|
1161
|
-
|
|
1162
|
-
}),
|
|
1161
|
+
i = a.call(n, i, r.normalize(), t ? t.status : void 0);
|
|
1162
|
+
}), r.normalize(), i;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function nn(e) {
|
|
1165
1165
|
return !!(e && e.__CANCEL__);
|
|
1166
1166
|
}
|
|
1167
|
-
let
|
|
1167
|
+
let Ne = class extends b {
|
|
1168
1168
|
/**
|
|
1169
1169
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1170
1170
|
*
|
|
@@ -1174,88 +1174,88 @@ let Re = class extends C {
|
|
|
1174
1174
|
*
|
|
1175
1175
|
* @returns {CanceledError} The created error.
|
|
1176
1176
|
*/
|
|
1177
|
-
constructor(t, n,
|
|
1178
|
-
super(t ?? "canceled",
|
|
1177
|
+
constructor(t, n, s) {
|
|
1178
|
+
super(t ?? "canceled", b.ERR_CANCELED, n, s), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
|
-
function
|
|
1182
|
-
const
|
|
1183
|
-
!n.status || !
|
|
1181
|
+
function sn(e, t, n) {
|
|
1182
|
+
const s = n.config.validateStatus;
|
|
1183
|
+
!n.status || !s || s(n.status) ? e(n) : t(new b(
|
|
1184
1184
|
"Request failed with status code " + n.status,
|
|
1185
|
-
[
|
|
1185
|
+
[b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1186
1186
|
n.config,
|
|
1187
1187
|
n.request,
|
|
1188
1188
|
n
|
|
1189
1189
|
));
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Os(e) {
|
|
1192
1192
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1193
1193
|
return t && t[1] || "";
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function ks(e, t) {
|
|
1196
1196
|
e = e || 10;
|
|
1197
|
-
const n = new Array(e),
|
|
1198
|
-
let
|
|
1197
|
+
const n = new Array(e), s = new Array(e);
|
|
1198
|
+
let r = 0, i = 0, o;
|
|
1199
1199
|
return t = t !== void 0 ? t : 1e3, function(p) {
|
|
1200
|
-
const d = Date.now(),
|
|
1201
|
-
|
|
1202
|
-
let
|
|
1203
|
-
for (;
|
|
1204
|
-
|
|
1205
|
-
if (
|
|
1200
|
+
const d = Date.now(), l = s[i];
|
|
1201
|
+
o || (o = d), n[r] = p, s[r] = d;
|
|
1202
|
+
let _ = i, E = 0;
|
|
1203
|
+
for (; _ !== r; )
|
|
1204
|
+
E += n[_++], _ = _ % e;
|
|
1205
|
+
if (r = (r + 1) % e, r === i && (i = (i + 1) % e), d - o < t)
|
|
1206
1206
|
return;
|
|
1207
|
-
const
|
|
1208
|
-
return
|
|
1207
|
+
const C = l && d - l;
|
|
1208
|
+
return C ? Math.round(E * 1e3 / C) : void 0;
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
let n = 0,
|
|
1213
|
-
const
|
|
1214
|
-
n =
|
|
1211
|
+
function Fs(e, t) {
|
|
1212
|
+
let n = 0, s = 1e3 / t, r, i;
|
|
1213
|
+
const o = (d, l = Date.now()) => {
|
|
1214
|
+
n = l, r = null, i && (clearTimeout(i), i = null), e(...d);
|
|
1215
1215
|
};
|
|
1216
1216
|
return [(...d) => {
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
},
|
|
1221
|
-
}, () =>
|
|
1217
|
+
const l = Date.now(), _ = l - n;
|
|
1218
|
+
_ >= s ? o(d, l) : (r = d, i || (i = setTimeout(() => {
|
|
1219
|
+
i = null, o(r);
|
|
1220
|
+
}, s - _)));
|
|
1221
|
+
}, () => r && o(r)];
|
|
1222
1222
|
}
|
|
1223
|
-
const
|
|
1224
|
-
let
|
|
1225
|
-
const
|
|
1226
|
-
return
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
const
|
|
1230
|
-
loaded:
|
|
1223
|
+
const je = (e, t, n = 3) => {
|
|
1224
|
+
let s = 0;
|
|
1225
|
+
const r = ks(50, 250);
|
|
1226
|
+
return Fs((i) => {
|
|
1227
|
+
const o = i.loaded, a = i.lengthComputable ? i.total : void 0, p = o - s, d = r(p), l = o <= a;
|
|
1228
|
+
s = o;
|
|
1229
|
+
const _ = {
|
|
1230
|
+
loaded: o,
|
|
1231
1231
|
total: a,
|
|
1232
|
-
progress: a ?
|
|
1232
|
+
progress: a ? o / a : void 0,
|
|
1233
1233
|
bytes: p,
|
|
1234
1234
|
rate: d || void 0,
|
|
1235
|
-
estimated: d && a &&
|
|
1236
|
-
event:
|
|
1235
|
+
estimated: d && a && l ? (a - o) / d : void 0,
|
|
1236
|
+
event: i,
|
|
1237
1237
|
lengthComputable: a != null,
|
|
1238
1238
|
[t ? "download" : "upload"]: !0
|
|
1239
1239
|
};
|
|
1240
|
-
e(
|
|
1240
|
+
e(_);
|
|
1241
1241
|
}, n);
|
|
1242
|
-
},
|
|
1242
|
+
}, gt = (e, t) => {
|
|
1243
1243
|
const n = e != null;
|
|
1244
|
-
return [(
|
|
1244
|
+
return [(s) => t[0]({
|
|
1245
1245
|
lengthComputable: n,
|
|
1246
1246
|
total: e,
|
|
1247
|
-
loaded:
|
|
1247
|
+
loaded: s
|
|
1248
1248
|
}), t[1]];
|
|
1249
|
-
},
|
|
1250
|
-
new URL(
|
|
1251
|
-
|
|
1252
|
-
) : () => !0,
|
|
1249
|
+
}, Ct = (e) => (...t) => c.asap(() => e(...t)), js = K.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, K.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1250
|
+
new URL(K.origin),
|
|
1251
|
+
K.navigator && /(msie|trident)/i.test(K.navigator.userAgent)
|
|
1252
|
+
) : () => !0, Bs = K.hasStandardBrowserEnv ? (
|
|
1253
1253
|
// Standard browser envs support document.cookie
|
|
1254
1254
|
{
|
|
1255
|
-
write(e, t, n, r,
|
|
1255
|
+
write(e, t, n, s, r, i, o) {
|
|
1256
1256
|
if (typeof document > "u") return;
|
|
1257
1257
|
const a = [`${e}=${encodeURIComponent(t)}`];
|
|
1258
|
-
c.isNumber(n) && a.push(`expires=${new Date(n).toUTCString()}`), c.isString(
|
|
1258
|
+
c.isNumber(n) && a.push(`expires=${new Date(n).toUTCString()}`), c.isString(s) && a.push(`path=${s}`), c.isString(r) && a.push(`domain=${r}`), i === !0 && a.push("secure"), c.isString(o) && a.push(`SameSite=${o}`), document.cookie = a.join("; ");
|
|
1259
1259
|
},
|
|
1260
1260
|
read(e) {
|
|
1261
1261
|
if (typeof document > "u") return null;
|
|
@@ -1278,201 +1278,201 @@ const Ne = (e, t, n = 3) => {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
1280
|
);
|
|
1281
|
-
function
|
|
1281
|
+
function Ys(e) {
|
|
1282
1282
|
return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function Ms(e, t) {
|
|
1285
1285
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1288
|
-
let
|
|
1289
|
-
return e && (
|
|
1287
|
+
function rn(e, t, n) {
|
|
1288
|
+
let s = !Ys(t);
|
|
1289
|
+
return e && (s || n == !1) ? Ms(e, t) : t;
|
|
1290
1290
|
}
|
|
1291
|
-
const
|
|
1292
|
-
function
|
|
1291
|
+
const Rt = (e) => e instanceof te ? { ...e } : e;
|
|
1292
|
+
function pe(e, t) {
|
|
1293
1293
|
t = t || {};
|
|
1294
1294
|
const n = {};
|
|
1295
|
-
function
|
|
1296
|
-
return c.isPlainObject(d) && c.isPlainObject(
|
|
1295
|
+
function s(d, l, _, E) {
|
|
1296
|
+
return c.isPlainObject(d) && c.isPlainObject(l) ? c.merge.call({ caseless: E }, d, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1299
|
-
if (c.isUndefined(
|
|
1298
|
+
function r(d, l, _, E) {
|
|
1299
|
+
if (c.isUndefined(l)) {
|
|
1300
1300
|
if (!c.isUndefined(d))
|
|
1301
|
-
return
|
|
1302
|
-
} else return
|
|
1301
|
+
return s(void 0, d, _, E);
|
|
1302
|
+
} else return s(d, l, _, E);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
if (!c.isUndefined(
|
|
1306
|
-
return
|
|
1304
|
+
function i(d, l) {
|
|
1305
|
+
if (!c.isUndefined(l))
|
|
1306
|
+
return s(void 0, l);
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
if (c.isUndefined(
|
|
1308
|
+
function o(d, l) {
|
|
1309
|
+
if (c.isUndefined(l)) {
|
|
1310
1310
|
if (!c.isUndefined(d))
|
|
1311
|
-
return
|
|
1312
|
-
} else return
|
|
1311
|
+
return s(void 0, d);
|
|
1312
|
+
} else return s(void 0, l);
|
|
1313
1313
|
}
|
|
1314
|
-
function a(d,
|
|
1315
|
-
if (
|
|
1316
|
-
return
|
|
1317
|
-
if (
|
|
1318
|
-
return
|
|
1314
|
+
function a(d, l, _) {
|
|
1315
|
+
if (_ in t)
|
|
1316
|
+
return s(d, l);
|
|
1317
|
+
if (_ in e)
|
|
1318
|
+
return s(void 0, d);
|
|
1319
1319
|
}
|
|
1320
1320
|
const p = {
|
|
1321
|
-
url:
|
|
1322
|
-
method:
|
|
1323
|
-
data:
|
|
1324
|
-
baseURL:
|
|
1325
|
-
transformRequest:
|
|
1326
|
-
transformResponse:
|
|
1327
|
-
paramsSerializer:
|
|
1328
|
-
timeout:
|
|
1329
|
-
timeoutMessage:
|
|
1330
|
-
withCredentials:
|
|
1331
|
-
withXSRFToken:
|
|
1332
|
-
adapter:
|
|
1333
|
-
responseType:
|
|
1334
|
-
xsrfCookieName:
|
|
1335
|
-
xsrfHeaderName:
|
|
1336
|
-
onUploadProgress:
|
|
1337
|
-
onDownloadProgress:
|
|
1338
|
-
decompress:
|
|
1339
|
-
maxContentLength:
|
|
1340
|
-
maxBodyLength:
|
|
1341
|
-
beforeRedirect:
|
|
1342
|
-
transport:
|
|
1343
|
-
httpAgent:
|
|
1344
|
-
httpsAgent:
|
|
1345
|
-
cancelToken:
|
|
1346
|
-
socketPath:
|
|
1347
|
-
responseEncoding:
|
|
1321
|
+
url: i,
|
|
1322
|
+
method: i,
|
|
1323
|
+
data: i,
|
|
1324
|
+
baseURL: o,
|
|
1325
|
+
transformRequest: o,
|
|
1326
|
+
transformResponse: o,
|
|
1327
|
+
paramsSerializer: o,
|
|
1328
|
+
timeout: o,
|
|
1329
|
+
timeoutMessage: o,
|
|
1330
|
+
withCredentials: o,
|
|
1331
|
+
withXSRFToken: o,
|
|
1332
|
+
adapter: o,
|
|
1333
|
+
responseType: o,
|
|
1334
|
+
xsrfCookieName: o,
|
|
1335
|
+
xsrfHeaderName: o,
|
|
1336
|
+
onUploadProgress: o,
|
|
1337
|
+
onDownloadProgress: o,
|
|
1338
|
+
decompress: o,
|
|
1339
|
+
maxContentLength: o,
|
|
1340
|
+
maxBodyLength: o,
|
|
1341
|
+
beforeRedirect: o,
|
|
1342
|
+
transport: o,
|
|
1343
|
+
httpAgent: o,
|
|
1344
|
+
httpsAgent: o,
|
|
1345
|
+
cancelToken: o,
|
|
1346
|
+
socketPath: o,
|
|
1347
|
+
responseEncoding: o,
|
|
1348
1348
|
validateStatus: a,
|
|
1349
|
-
headers: (d,
|
|
1349
|
+
headers: (d, l, _) => r(Rt(d), Rt(l), _, !0)
|
|
1350
1350
|
};
|
|
1351
1351
|
return c.forEach(
|
|
1352
1352
|
Object.keys({ ...e, ...t }),
|
|
1353
|
-
function(
|
|
1354
|
-
if (
|
|
1353
|
+
function(l) {
|
|
1354
|
+
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
1355
1355
|
return;
|
|
1356
|
-
const
|
|
1357
|
-
c.isUndefined(
|
|
1356
|
+
const _ = c.hasOwnProp(p, l) ? p[l] : r, E = _(e[l], t[l], l);
|
|
1357
|
+
c.isUndefined(E) && _ !== a || (n[l] = E);
|
|
1358
1358
|
}
|
|
1359
1359
|
), n;
|
|
1360
1360
|
}
|
|
1361
|
-
const
|
|
1362
|
-
const t =
|
|
1363
|
-
let { data: n, withXSRFToken:
|
|
1364
|
-
if (t.headers =
|
|
1361
|
+
const on = (e) => {
|
|
1362
|
+
const t = pe({}, e);
|
|
1363
|
+
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: i, headers: o, auth: a } = t;
|
|
1364
|
+
if (t.headers = o = te.from(o), t.url = en(rn(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && o.set(
|
|
1365
1365
|
"Authorization",
|
|
1366
1366
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1367
1367
|
), c.isFormData(n)) {
|
|
1368
|
-
if (
|
|
1369
|
-
|
|
1368
|
+
if (K.hasStandardBrowserEnv || K.hasStandardBrowserWebWorkerEnv)
|
|
1369
|
+
o.setContentType(void 0);
|
|
1370
1370
|
else if (c.isFunction(n.getHeaders)) {
|
|
1371
1371
|
const p = n.getHeaders(), d = ["content-type", "content-length"];
|
|
1372
|
-
Object.entries(p).forEach(([
|
|
1373
|
-
d.includes(
|
|
1372
|
+
Object.entries(p).forEach(([l, _]) => {
|
|
1373
|
+
d.includes(l.toLowerCase()) && o.set(l, _);
|
|
1374
1374
|
});
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
|
-
if (
|
|
1378
|
-
const p =
|
|
1379
|
-
p &&
|
|
1377
|
+
if (K.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(t)), s || s !== !1 && js(t.url))) {
|
|
1378
|
+
const p = r && i && Bs.read(i);
|
|
1379
|
+
p && o.set(r, p);
|
|
1380
1380
|
}
|
|
1381
1381
|
return t;
|
|
1382
|
-
},
|
|
1383
|
-
return new Promise(function(n,
|
|
1384
|
-
const
|
|
1385
|
-
let
|
|
1386
|
-
const
|
|
1387
|
-
let { responseType: a, onUploadProgress: p, onDownloadProgress: d } =
|
|
1382
|
+
}, Hs = typeof XMLHttpRequest < "u", Is = Hs && function(e) {
|
|
1383
|
+
return new Promise(function(n, s) {
|
|
1384
|
+
const r = on(e);
|
|
1385
|
+
let i = r.data;
|
|
1386
|
+
const o = te.from(r.headers).normalize();
|
|
1387
|
+
let { responseType: a, onUploadProgress: p, onDownloadProgress: d } = r, l, _, E, C, f;
|
|
1388
1388
|
function y() {
|
|
1389
|
-
|
|
1389
|
+
C && C(), f && f(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1390
1390
|
}
|
|
1391
|
-
let
|
|
1392
|
-
|
|
1393
|
-
function
|
|
1394
|
-
if (!
|
|
1391
|
+
let h = new XMLHttpRequest();
|
|
1392
|
+
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1393
|
+
function v() {
|
|
1394
|
+
if (!h)
|
|
1395
1395
|
return;
|
|
1396
|
-
const
|
|
1397
|
-
"getAllResponseHeaders" in
|
|
1398
|
-
),
|
|
1399
|
-
data: !a || a === "text" || a === "json" ?
|
|
1400
|
-
status:
|
|
1401
|
-
statusText:
|
|
1402
|
-
headers:
|
|
1396
|
+
const U = te.from(
|
|
1397
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1398
|
+
), x = {
|
|
1399
|
+
data: !a || a === "text" || a === "json" ? h.responseText : h.response,
|
|
1400
|
+
status: h.status,
|
|
1401
|
+
statusText: h.statusText,
|
|
1402
|
+
headers: U,
|
|
1403
1403
|
config: e,
|
|
1404
|
-
request:
|
|
1404
|
+
request: h
|
|
1405
1405
|
};
|
|
1406
|
-
|
|
1407
|
-
n(
|
|
1408
|
-
}, function(
|
|
1409
|
-
|
|
1410
|
-
},
|
|
1406
|
+
sn(function(O) {
|
|
1407
|
+
n(O), y();
|
|
1408
|
+
}, function(O) {
|
|
1409
|
+
s(O), y();
|
|
1410
|
+
}, x), h = null;
|
|
1411
1411
|
}
|
|
1412
|
-
"onloadend" in
|
|
1413
|
-
!
|
|
1414
|
-
},
|
|
1415
|
-
|
|
1416
|
-
},
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
},
|
|
1420
|
-
let j =
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1412
|
+
"onloadend" in h ? h.onloadend = v : h.onreadystatechange = function() {
|
|
1413
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(v);
|
|
1414
|
+
}, h.onabort = function() {
|
|
1415
|
+
h && (s(new b("Request aborted", b.ECONNABORTED, e, h)), h = null);
|
|
1416
|
+
}, h.onerror = function(j) {
|
|
1417
|
+
const x = j && j.message ? j.message : "Network Error", V = new b(x, b.ERR_NETWORK, e, h);
|
|
1418
|
+
V.event = j || null, s(V), h = null;
|
|
1419
|
+
}, h.ontimeout = function() {
|
|
1420
|
+
let j = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1421
|
+
const x = r.transitional || st;
|
|
1422
|
+
r.timeoutErrorMessage && (j = r.timeoutErrorMessage), s(new b(
|
|
1423
1423
|
j,
|
|
1424
|
-
|
|
1424
|
+
x.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
|
|
1425
1425
|
e,
|
|
1426
|
-
|
|
1427
|
-
)),
|
|
1428
|
-
},
|
|
1429
|
-
|
|
1430
|
-
}), c.isUndefined(
|
|
1431
|
-
|
|
1432
|
-
},
|
|
1433
|
-
const
|
|
1434
|
-
if (
|
|
1435
|
-
|
|
1426
|
+
h
|
|
1427
|
+
)), h = null;
|
|
1428
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && c.forEach(o.toJSON(), function(j, x) {
|
|
1429
|
+
h.setRequestHeader(x, j);
|
|
1430
|
+
}), c.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), a && a !== "json" && (h.responseType = r.responseType), d && ([E, f] = je(d, !0), h.addEventListener("progress", E)), p && h.upload && ([_, C] = je(p), h.upload.addEventListener("progress", _), h.upload.addEventListener("loadend", C)), (r.cancelToken || r.signal) && (l = (U) => {
|
|
1431
|
+
h && (s(!U || U.type ? new Ne(null, e, h) : U), h.abort(), h = null);
|
|
1432
|
+
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1433
|
+
const B = Os(r.url);
|
|
1434
|
+
if (B && K.protocols.indexOf(B) === -1) {
|
|
1435
|
+
s(new b("Unsupported protocol " + B + ":", b.ERR_BAD_REQUEST, e));
|
|
1436
1436
|
return;
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1438
|
+
h.send(i || null);
|
|
1439
1439
|
});
|
|
1440
|
-
},
|
|
1440
|
+
}, $s = (e, t) => {
|
|
1441
1441
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1442
1442
|
if (t || n) {
|
|
1443
|
-
let
|
|
1444
|
-
const
|
|
1445
|
-
if (!
|
|
1446
|
-
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1443
|
+
let s = new AbortController(), r;
|
|
1444
|
+
const i = function(d) {
|
|
1445
|
+
if (!r) {
|
|
1446
|
+
r = !0, a();
|
|
1447
|
+
const l = d instanceof Error ? d : this.reason;
|
|
1448
|
+
s.abort(l instanceof b ? l : new Ne(l instanceof Error ? l.message : l));
|
|
1449
1449
|
}
|
|
1450
1450
|
};
|
|
1451
|
-
let
|
|
1452
|
-
|
|
1451
|
+
let o = t && setTimeout(() => {
|
|
1452
|
+
o = null, i(new b(`timeout of ${t}ms exceeded`, b.ETIMEDOUT));
|
|
1453
1453
|
}, t);
|
|
1454
1454
|
const a = () => {
|
|
1455
|
-
e && (
|
|
1456
|
-
d.unsubscribe ? d.unsubscribe(
|
|
1455
|
+
e && (o && clearTimeout(o), o = null, e.forEach((d) => {
|
|
1456
|
+
d.unsubscribe ? d.unsubscribe(i) : d.removeEventListener("abort", i);
|
|
1457
1457
|
}), e = null);
|
|
1458
1458
|
};
|
|
1459
|
-
e.forEach((d) => d.addEventListener("abort",
|
|
1460
|
-
const { signal: p } =
|
|
1459
|
+
e.forEach((d) => d.addEventListener("abort", i));
|
|
1460
|
+
const { signal: p } = s;
|
|
1461
1461
|
return p.unsubscribe = () => c.asap(a), p;
|
|
1462
1462
|
}
|
|
1463
|
-
},
|
|
1463
|
+
}, Gs = function* (e, t) {
|
|
1464
1464
|
let n = e.byteLength;
|
|
1465
1465
|
if (n < t) {
|
|
1466
1466
|
yield e;
|
|
1467
1467
|
return;
|
|
1468
1468
|
}
|
|
1469
|
-
let
|
|
1470
|
-
for (;
|
|
1471
|
-
|
|
1472
|
-
},
|
|
1473
|
-
for await (const n of
|
|
1474
|
-
yield*
|
|
1475
|
-
},
|
|
1469
|
+
let s = 0, r;
|
|
1470
|
+
for (; s < n; )
|
|
1471
|
+
r = s + t, yield e.slice(s, r), s = r;
|
|
1472
|
+
}, Js = async function* (e, t) {
|
|
1473
|
+
for await (const n of Xs(e))
|
|
1474
|
+
yield* Gs(n, t);
|
|
1475
|
+
}, Xs = async function* (e) {
|
|
1476
1476
|
if (e[Symbol.asyncIterator]) {
|
|
1477
1477
|
yield* e;
|
|
1478
1478
|
return;
|
|
@@ -1480,90 +1480,90 @@ const Mt = (e) => {
|
|
|
1480
1480
|
const t = e.getReader();
|
|
1481
1481
|
try {
|
|
1482
1482
|
for (; ; ) {
|
|
1483
|
-
const { done: n, value:
|
|
1483
|
+
const { done: n, value: s } = await t.read();
|
|
1484
1484
|
if (n)
|
|
1485
1485
|
break;
|
|
1486
|
-
yield
|
|
1486
|
+
yield s;
|
|
1487
1487
|
}
|
|
1488
1488
|
} finally {
|
|
1489
1489
|
await t.cancel();
|
|
1490
1490
|
}
|
|
1491
|
-
},
|
|
1492
|
-
const
|
|
1493
|
-
let
|
|
1494
|
-
|
|
1491
|
+
}, bt = (e, t, n, s) => {
|
|
1492
|
+
const r = Js(e, t);
|
|
1493
|
+
let i = 0, o, a = (p) => {
|
|
1494
|
+
o || (o = !0, s && s(p));
|
|
1495
1495
|
};
|
|
1496
1496
|
return new ReadableStream({
|
|
1497
1497
|
async pull(p) {
|
|
1498
1498
|
try {
|
|
1499
|
-
const { done: d, value:
|
|
1499
|
+
const { done: d, value: l } = await r.next();
|
|
1500
1500
|
if (d) {
|
|
1501
1501
|
a(), p.close();
|
|
1502
1502
|
return;
|
|
1503
1503
|
}
|
|
1504
|
-
let
|
|
1504
|
+
let _ = l.byteLength;
|
|
1505
1505
|
if (n) {
|
|
1506
|
-
let
|
|
1507
|
-
n(
|
|
1506
|
+
let E = i += _;
|
|
1507
|
+
n(E);
|
|
1508
1508
|
}
|
|
1509
|
-
p.enqueue(new Uint8Array(
|
|
1509
|
+
p.enqueue(new Uint8Array(l));
|
|
1510
1510
|
} catch (d) {
|
|
1511
1511
|
throw a(d), d;
|
|
1512
1512
|
}
|
|
1513
1513
|
},
|
|
1514
1514
|
cancel(p) {
|
|
1515
|
-
return a(p),
|
|
1515
|
+
return a(p), r.return();
|
|
1516
1516
|
}
|
|
1517
1517
|
}, {
|
|
1518
1518
|
highWaterMark: 2
|
|
1519
1519
|
});
|
|
1520
|
-
},
|
|
1520
|
+
}, Et = 64 * 1024, { isFunction: Le } = c, qs = (({ Request: e, Response: t }) => ({
|
|
1521
1521
|
Request: e,
|
|
1522
1522
|
Response: t
|
|
1523
1523
|
}))(c.global), {
|
|
1524
|
-
ReadableStream:
|
|
1525
|
-
TextEncoder:
|
|
1526
|
-
} = c.global,
|
|
1524
|
+
ReadableStream: St,
|
|
1525
|
+
TextEncoder: Dt
|
|
1526
|
+
} = c.global, At = (e, ...t) => {
|
|
1527
1527
|
try {
|
|
1528
1528
|
return !!e(...t);
|
|
1529
1529
|
} catch {
|
|
1530
1530
|
return !1;
|
|
1531
1531
|
}
|
|
1532
|
-
},
|
|
1532
|
+
}, Vs = (e) => {
|
|
1533
1533
|
e = c.merge.call({
|
|
1534
1534
|
skipUndefined: !0
|
|
1535
|
-
},
|
|
1536
|
-
const { fetch: t, Request: n, Response:
|
|
1537
|
-
if (!
|
|
1535
|
+
}, qs, e);
|
|
1536
|
+
const { fetch: t, Request: n, Response: s } = e, r = t ? Le(t) : typeof fetch == "function", i = Le(n), o = Le(s);
|
|
1537
|
+
if (!r)
|
|
1538
1538
|
return !1;
|
|
1539
|
-
const a =
|
|
1539
|
+
const a = r && Le(St), p = r && (typeof Dt == "function" ? /* @__PURE__ */ ((f) => (y) => f.encode(y))(new Dt()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), d = i && a && At(() => {
|
|
1540
1540
|
let f = !1;
|
|
1541
|
-
const y = new n(
|
|
1542
|
-
body: new
|
|
1541
|
+
const y = new n(K.origin, {
|
|
1542
|
+
body: new St(),
|
|
1543
1543
|
method: "POST",
|
|
1544
1544
|
get duplex() {
|
|
1545
1545
|
return f = !0, "half";
|
|
1546
1546
|
}
|
|
1547
1547
|
}).headers.has("Content-Type");
|
|
1548
1548
|
return f && !y;
|
|
1549
|
-
}),
|
|
1550
|
-
stream:
|
|
1549
|
+
}), l = o && a && At(() => c.isReadableStream(new s("").body)), _ = {
|
|
1550
|
+
stream: l && ((f) => f.body)
|
|
1551
1551
|
};
|
|
1552
|
-
|
|
1553
|
-
!
|
|
1554
|
-
let
|
|
1555
|
-
if (
|
|
1556
|
-
return
|
|
1557
|
-
throw new
|
|
1552
|
+
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1553
|
+
!_[f] && (_[f] = (y, h) => {
|
|
1554
|
+
let v = y && y[f];
|
|
1555
|
+
if (v)
|
|
1556
|
+
return v.call(y);
|
|
1557
|
+
throw new b(`Response type '${f}' is not supported`, b.ERR_NOT_SUPPORT, h);
|
|
1558
1558
|
});
|
|
1559
1559
|
});
|
|
1560
|
-
const
|
|
1560
|
+
const E = async (f) => {
|
|
1561
1561
|
if (f == null)
|
|
1562
1562
|
return 0;
|
|
1563
1563
|
if (c.isBlob(f))
|
|
1564
1564
|
return f.size;
|
|
1565
1565
|
if (c.isSpecCompliantForm(f))
|
|
1566
|
-
return (await new n(
|
|
1566
|
+
return (await new n(K.origin, {
|
|
1567
1567
|
method: "POST",
|
|
1568
1568
|
body: f
|
|
1569
1569
|
}).arrayBuffer()).byteLength;
|
|
@@ -1571,117 +1571,117 @@ const Mt = (e) => {
|
|
|
1571
1571
|
return f.byteLength;
|
|
1572
1572
|
if (c.isURLSearchParams(f) && (f = f + ""), c.isString(f))
|
|
1573
1573
|
return (await p(f)).byteLength;
|
|
1574
|
-
},
|
|
1575
|
-
const
|
|
1576
|
-
return
|
|
1574
|
+
}, C = async (f, y) => {
|
|
1575
|
+
const h = c.toFiniteNumber(f.getContentLength());
|
|
1576
|
+
return h ?? E(y);
|
|
1577
1577
|
};
|
|
1578
1578
|
return async (f) => {
|
|
1579
1579
|
let {
|
|
1580
1580
|
url: y,
|
|
1581
|
-
method:
|
|
1582
|
-
data:
|
|
1583
|
-
signal:
|
|
1584
|
-
cancelToken:
|
|
1581
|
+
method: h,
|
|
1582
|
+
data: v,
|
|
1583
|
+
signal: B,
|
|
1584
|
+
cancelToken: U,
|
|
1585
1585
|
timeout: j,
|
|
1586
|
-
onDownloadProgress:
|
|
1587
|
-
onUploadProgress:
|
|
1588
|
-
responseType:
|
|
1589
|
-
headers:
|
|
1590
|
-
withCredentials:
|
|
1591
|
-
fetchOptions:
|
|
1592
|
-
} =
|
|
1593
|
-
|
|
1594
|
-
let
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1586
|
+
onDownloadProgress: x,
|
|
1587
|
+
onUploadProgress: V,
|
|
1588
|
+
responseType: O,
|
|
1589
|
+
headers: k,
|
|
1590
|
+
withCredentials: M = "same-origin",
|
|
1591
|
+
fetchOptions: Q
|
|
1592
|
+
} = on(f), I = t || fetch;
|
|
1593
|
+
O = O ? (O + "").toLowerCase() : "text";
|
|
1594
|
+
let N = $s([B, U && U.toAbortSignal()], j), F = null;
|
|
1595
|
+
const X = N && N.unsubscribe && (() => {
|
|
1596
|
+
N.unsubscribe();
|
|
1597
1597
|
});
|
|
1598
|
-
let
|
|
1598
|
+
let z;
|
|
1599
1599
|
try {
|
|
1600
|
-
if (
|
|
1601
|
-
let
|
|
1600
|
+
if (V && d && h !== "get" && h !== "head" && (z = await C(k, v)) !== 0) {
|
|
1601
|
+
let u = new n(y, {
|
|
1602
1602
|
method: "POST",
|
|
1603
|
-
body:
|
|
1603
|
+
body: v,
|
|
1604
1604
|
duplex: "half"
|
|
1605
|
-
}),
|
|
1606
|
-
if (c.isFormData(
|
|
1607
|
-
const [
|
|
1608
|
-
|
|
1609
|
-
|
|
1605
|
+
}), w;
|
|
1606
|
+
if (c.isFormData(v) && (w = u.headers.get("content-type")) && k.setContentType(w), u.body) {
|
|
1607
|
+
const [S, D] = gt(
|
|
1608
|
+
z,
|
|
1609
|
+
je(Ct(V))
|
|
1610
1610
|
);
|
|
1611
|
-
|
|
1611
|
+
v = bt(u.body, Et, S, D);
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
c.isString(
|
|
1615
|
-
const
|
|
1616
|
-
...
|
|
1617
|
-
signal:
|
|
1618
|
-
method:
|
|
1619
|
-
headers:
|
|
1620
|
-
body:
|
|
1614
|
+
c.isString(M) || (M = M ? "include" : "omit");
|
|
1615
|
+
const g = i && "credentials" in n.prototype, J = {
|
|
1616
|
+
...Q,
|
|
1617
|
+
signal: N,
|
|
1618
|
+
method: h.toUpperCase(),
|
|
1619
|
+
headers: k.normalize().toJSON(),
|
|
1620
|
+
body: v,
|
|
1621
1621
|
duplex: "half",
|
|
1622
|
-
credentials:
|
|
1622
|
+
credentials: g ? M : void 0
|
|
1623
1623
|
};
|
|
1624
|
-
|
|
1625
|
-
let
|
|
1626
|
-
const
|
|
1627
|
-
if (
|
|
1628
|
-
const
|
|
1629
|
-
["status", "statusText", "headers"].forEach((
|
|
1630
|
-
|
|
1624
|
+
F = i && new n(y, J);
|
|
1625
|
+
let T = await (i ? I(F, Q) : I(y, J));
|
|
1626
|
+
const q = l && (O === "stream" || O === "response");
|
|
1627
|
+
if (l && (x || q && X)) {
|
|
1628
|
+
const u = {};
|
|
1629
|
+
["status", "statusText", "headers"].forEach(($) => {
|
|
1630
|
+
u[$] = T[$];
|
|
1631
1631
|
});
|
|
1632
|
-
const
|
|
1633
|
-
|
|
1634
|
-
|
|
1632
|
+
const w = c.toFiniteNumber(T.headers.get("content-length")), [S, D] = x && gt(
|
|
1633
|
+
w,
|
|
1634
|
+
je(Ct(x), !0)
|
|
1635
1635
|
) || [];
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1636
|
+
T = new s(
|
|
1637
|
+
bt(T.body, Et, S, () => {
|
|
1638
|
+
D && D(), X && X();
|
|
1639
1639
|
}),
|
|
1640
|
-
|
|
1640
|
+
u
|
|
1641
1641
|
);
|
|
1642
1642
|
}
|
|
1643
|
-
|
|
1644
|
-
let
|
|
1645
|
-
return !
|
|
1646
|
-
|
|
1647
|
-
data:
|
|
1648
|
-
headers:
|
|
1649
|
-
status:
|
|
1650
|
-
statusText:
|
|
1643
|
+
O = O || "text";
|
|
1644
|
+
let Z = await _[c.findKey(_, O) || "text"](T, f);
|
|
1645
|
+
return !q && X && X(), await new Promise((u, w) => {
|
|
1646
|
+
sn(u, w, {
|
|
1647
|
+
data: Z,
|
|
1648
|
+
headers: te.from(T.headers),
|
|
1649
|
+
status: T.status,
|
|
1650
|
+
statusText: T.statusText,
|
|
1651
1651
|
config: f,
|
|
1652
|
-
request:
|
|
1652
|
+
request: F
|
|
1653
1653
|
});
|
|
1654
1654
|
});
|
|
1655
|
-
} catch (
|
|
1656
|
-
throw
|
|
1657
|
-
new
|
|
1655
|
+
} catch (g) {
|
|
1656
|
+
throw X && X(), g && g.name === "TypeError" && /Load failed|fetch/i.test(g.message) ? Object.assign(
|
|
1657
|
+
new b("Network Error", b.ERR_NETWORK, f, F, g && g.response),
|
|
1658
1658
|
{
|
|
1659
|
-
cause:
|
|
1659
|
+
cause: g.cause || g
|
|
1660
1660
|
}
|
|
1661
|
-
) :
|
|
1661
|
+
) : b.from(g, g && g.code, f, F, g && g.response);
|
|
1662
1662
|
}
|
|
1663
1663
|
};
|
|
1664
|
-
},
|
|
1664
|
+
}, Ks = /* @__PURE__ */ new Map(), an = (e) => {
|
|
1665
1665
|
let t = e && e.env || {};
|
|
1666
|
-
const { fetch: n, Request:
|
|
1667
|
-
r,
|
|
1666
|
+
const { fetch: n, Request: s, Response: r } = t, i = [
|
|
1668
1667
|
s,
|
|
1668
|
+
r,
|
|
1669
1669
|
n
|
|
1670
1670
|
];
|
|
1671
|
-
let
|
|
1671
|
+
let o = i.length, a = o, p, d, l = Ks;
|
|
1672
1672
|
for (; a--; )
|
|
1673
|
-
p =
|
|
1673
|
+
p = i[a], d = l.get(p), d === void 0 && l.set(p, d = a ? /* @__PURE__ */ new Map() : Vs(t)), l = d;
|
|
1674
1674
|
return d;
|
|
1675
1675
|
};
|
|
1676
|
-
|
|
1677
|
-
const
|
|
1678
|
-
http:
|
|
1679
|
-
xhr:
|
|
1676
|
+
an();
|
|
1677
|
+
const it = {
|
|
1678
|
+
http: ps,
|
|
1679
|
+
xhr: Is,
|
|
1680
1680
|
fetch: {
|
|
1681
|
-
get:
|
|
1681
|
+
get: an
|
|
1682
1682
|
}
|
|
1683
1683
|
};
|
|
1684
|
-
c.forEach(
|
|
1684
|
+
c.forEach(it, (e, t) => {
|
|
1685
1685
|
if (e) {
|
|
1686
1686
|
try {
|
|
1687
1687
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1690,123 +1690,123 @@ c.forEach(Ge, (e, t) => {
|
|
|
1690
1690
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1691
1691
|
}
|
|
1692
1692
|
});
|
|
1693
|
-
const
|
|
1694
|
-
function
|
|
1693
|
+
const Ut = (e) => `- ${e}`, zs = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1694
|
+
function Zs(e, t) {
|
|
1695
1695
|
e = c.isArray(e) ? e : [e];
|
|
1696
1696
|
const { length: n } = e;
|
|
1697
|
-
let
|
|
1698
|
-
const
|
|
1699
|
-
for (let
|
|
1700
|
-
|
|
1697
|
+
let s, r;
|
|
1698
|
+
const i = {};
|
|
1699
|
+
for (let o = 0; o < n; o++) {
|
|
1700
|
+
s = e[o];
|
|
1701
1701
|
let a;
|
|
1702
|
-
if (
|
|
1703
|
-
throw new
|
|
1704
|
-
if (
|
|
1702
|
+
if (r = s, !zs(s) && (r = it[(a = String(s)).toLowerCase()], r === void 0))
|
|
1703
|
+
throw new b(`Unknown adapter '${a}'`);
|
|
1704
|
+
if (r && (c.isFunction(r) || (r = r.get(t))))
|
|
1705
1705
|
break;
|
|
1706
|
-
|
|
1706
|
+
i[a || "#" + o] = r;
|
|
1707
1707
|
}
|
|
1708
|
-
if (!
|
|
1709
|
-
const
|
|
1708
|
+
if (!r) {
|
|
1709
|
+
const o = Object.entries(i).map(
|
|
1710
1710
|
([p, d]) => `adapter ${p} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1711
1711
|
);
|
|
1712
|
-
let a = n ?
|
|
1713
|
-
` +
|
|
1714
|
-
`) : " " +
|
|
1715
|
-
throw new
|
|
1712
|
+
let a = n ? o.length > 1 ? `since :
|
|
1713
|
+
` + o.map(Ut).join(`
|
|
1714
|
+
`) : " " + Ut(o[0]) : "as no adapter specified";
|
|
1715
|
+
throw new b(
|
|
1716
1716
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1717
1717
|
"ERR_NOT_SUPPORT"
|
|
1718
1718
|
);
|
|
1719
1719
|
}
|
|
1720
|
-
return
|
|
1720
|
+
return r;
|
|
1721
1721
|
}
|
|
1722
|
-
const
|
|
1722
|
+
const cn = {
|
|
1723
1723
|
/**
|
|
1724
1724
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1725
1725
|
* @type {Function}
|
|
1726
1726
|
*/
|
|
1727
|
-
getAdapter:
|
|
1727
|
+
getAdapter: Zs,
|
|
1728
1728
|
/**
|
|
1729
1729
|
* Exposes all known adapters
|
|
1730
1730
|
* @type {Object<string, Function|Object>}
|
|
1731
1731
|
*/
|
|
1732
|
-
adapters:
|
|
1732
|
+
adapters: it
|
|
1733
1733
|
};
|
|
1734
|
-
function
|
|
1734
|
+
function Je(e) {
|
|
1735
1735
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1736
|
-
throw new
|
|
1736
|
+
throw new Ne(null, e);
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1739
|
-
return
|
|
1738
|
+
function Tt(e) {
|
|
1739
|
+
return Je(e), e.headers = te.from(e.headers), e.data = Ge.call(
|
|
1740
1740
|
e,
|
|
1741
1741
|
e.transformRequest
|
|
1742
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1743
|
-
return
|
|
1742
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), cn.getAdapter(e.adapter || Te.adapter, e)(e).then(function(s) {
|
|
1743
|
+
return Je(e), s.data = Ge.call(
|
|
1744
1744
|
e,
|
|
1745
1745
|
e.transformResponse,
|
|
1746
|
-
|
|
1747
|
-
),
|
|
1748
|
-
}, function(
|
|
1749
|
-
return
|
|
1746
|
+
s
|
|
1747
|
+
), s.headers = te.from(s.headers), s;
|
|
1748
|
+
}, function(s) {
|
|
1749
|
+
return nn(s) || (Je(e), s && s.response && (s.response.data = Ge.call(
|
|
1750
1750
|
e,
|
|
1751
1751
|
e.transformResponse,
|
|
1752
|
-
|
|
1753
|
-
),
|
|
1752
|
+
s.response
|
|
1753
|
+
), s.response.headers = te.from(s.response.headers))), Promise.reject(s);
|
|
1754
1754
|
});
|
|
1755
1755
|
}
|
|
1756
|
-
const
|
|
1756
|
+
const ln = "1.13.5", Ie = {};
|
|
1757
1757
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1758
|
-
|
|
1759
|
-
return typeof
|
|
1758
|
+
Ie[e] = function(s) {
|
|
1759
|
+
return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1760
1760
|
};
|
|
1761
1761
|
});
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1764
|
-
function
|
|
1765
|
-
return "[Axios v" +
|
|
1762
|
+
const Nt = {};
|
|
1763
|
+
Ie.transitional = function(t, n, s) {
|
|
1764
|
+
function r(i, o) {
|
|
1765
|
+
return "[Axios v" + ln + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1766
1766
|
}
|
|
1767
|
-
return (
|
|
1767
|
+
return (i, o, a) => {
|
|
1768
1768
|
if (t === !1)
|
|
1769
|
-
throw new
|
|
1770
|
-
|
|
1771
|
-
|
|
1769
|
+
throw new b(
|
|
1770
|
+
r(o, " has been removed" + (n ? " in " + n : "")),
|
|
1771
|
+
b.ERR_DEPRECATED
|
|
1772
1772
|
);
|
|
1773
|
-
return n && !
|
|
1774
|
-
|
|
1775
|
-
|
|
1773
|
+
return n && !Nt[o] && (Nt[o] = !0, console.warn(
|
|
1774
|
+
r(
|
|
1775
|
+
o,
|
|
1776
1776
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1777
1777
|
)
|
|
1778
|
-
)), t ? t(
|
|
1778
|
+
)), t ? t(i, o, a) : !0;
|
|
1779
1779
|
};
|
|
1780
1780
|
};
|
|
1781
|
-
|
|
1782
|
-
return (n,
|
|
1781
|
+
Ie.spelling = function(t) {
|
|
1782
|
+
return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
1783
1783
|
};
|
|
1784
|
-
function
|
|
1784
|
+
function Ws(e, t, n) {
|
|
1785
1785
|
if (typeof e != "object")
|
|
1786
|
-
throw new
|
|
1787
|
-
const
|
|
1788
|
-
let
|
|
1789
|
-
for (;
|
|
1790
|
-
const
|
|
1791
|
-
if (
|
|
1792
|
-
const a = e[
|
|
1786
|
+
throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
|
|
1787
|
+
const s = Object.keys(e);
|
|
1788
|
+
let r = s.length;
|
|
1789
|
+
for (; r-- > 0; ) {
|
|
1790
|
+
const i = s[r], o = t[i];
|
|
1791
|
+
if (o) {
|
|
1792
|
+
const a = e[i], p = a === void 0 || o(a, i, e);
|
|
1793
1793
|
if (p !== !0)
|
|
1794
|
-
throw new
|
|
1794
|
+
throw new b("option " + i + " must be " + p, b.ERR_BAD_OPTION_VALUE);
|
|
1795
1795
|
continue;
|
|
1796
1796
|
}
|
|
1797
1797
|
if (n !== !0)
|
|
1798
|
-
throw new
|
|
1798
|
+
throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
|
-
const
|
|
1802
|
-
assertOptions:
|
|
1803
|
-
validators:
|
|
1804
|
-
},
|
|
1805
|
-
let
|
|
1801
|
+
const ke = {
|
|
1802
|
+
assertOptions: Ws,
|
|
1803
|
+
validators: Ie
|
|
1804
|
+
}, se = ke.validators;
|
|
1805
|
+
let de = class {
|
|
1806
1806
|
constructor(t) {
|
|
1807
1807
|
this.defaults = t || {}, this.interceptors = {
|
|
1808
|
-
request: new
|
|
1809
|
-
response: new
|
|
1808
|
+
request: new wt(),
|
|
1809
|
+
response: new wt()
|
|
1810
1810
|
};
|
|
1811
1811
|
}
|
|
1812
1812
|
/**
|
|
@@ -1820,142 +1820,142 @@ let re = class {
|
|
|
1820
1820
|
async request(t, n) {
|
|
1821
1821
|
try {
|
|
1822
1822
|
return await this._request(t, n);
|
|
1823
|
-
} catch (
|
|
1824
|
-
if (
|
|
1825
|
-
let
|
|
1826
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1827
|
-
const
|
|
1823
|
+
} catch (s) {
|
|
1824
|
+
if (s instanceof Error) {
|
|
1825
|
+
let r = {};
|
|
1826
|
+
Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
|
|
1827
|
+
const i = r.stack ? r.stack.replace(/^.+\n/, "") : "";
|
|
1828
1828
|
try {
|
|
1829
|
-
|
|
1830
|
-
` +
|
|
1829
|
+
s.stack ? i && !String(s.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1830
|
+
` + i) : s.stack = i;
|
|
1831
1831
|
} catch {
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
|
-
throw
|
|
1834
|
+
throw s;
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
1837
|
_request(t, n) {
|
|
1838
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1839
|
-
const { transitional:
|
|
1840
|
-
|
|
1841
|
-
silentJSONParsing:
|
|
1842
|
-
forcedJSONParsing:
|
|
1843
|
-
clarifyTimeoutError:
|
|
1844
|
-
legacyInterceptorReqResOrdering:
|
|
1845
|
-
}, !1),
|
|
1846
|
-
serialize:
|
|
1847
|
-
} :
|
|
1848
|
-
encode:
|
|
1849
|
-
serialize:
|
|
1850
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1851
|
-
baseUrl:
|
|
1852
|
-
withXsrfToken:
|
|
1838
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = pe(this.defaults, n);
|
|
1839
|
+
const { transitional: s, paramsSerializer: r, headers: i } = n;
|
|
1840
|
+
s !== void 0 && ke.assertOptions(s, {
|
|
1841
|
+
silentJSONParsing: se.transitional(se.boolean),
|
|
1842
|
+
forcedJSONParsing: se.transitional(se.boolean),
|
|
1843
|
+
clarifyTimeoutError: se.transitional(se.boolean),
|
|
1844
|
+
legacyInterceptorReqResOrdering: se.transitional(se.boolean)
|
|
1845
|
+
}, !1), r != null && (c.isFunction(r) ? n.paramsSerializer = {
|
|
1846
|
+
serialize: r
|
|
1847
|
+
} : ke.assertOptions(r, {
|
|
1848
|
+
encode: se.function,
|
|
1849
|
+
serialize: se.function
|
|
1850
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ke.assertOptions(n, {
|
|
1851
|
+
baseUrl: se.spelling("baseURL"),
|
|
1852
|
+
withXsrfToken: se.spelling("withXSRFToken")
|
|
1853
1853
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1854
|
-
let
|
|
1855
|
-
|
|
1856
|
-
|
|
1854
|
+
let o = i && c.merge(
|
|
1855
|
+
i.common,
|
|
1856
|
+
i[n.method]
|
|
1857
1857
|
);
|
|
1858
|
-
|
|
1858
|
+
i && c.forEach(
|
|
1859
1859
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1860
1860
|
(f) => {
|
|
1861
|
-
delete
|
|
1861
|
+
delete i[f];
|
|
1862
1862
|
}
|
|
1863
|
-
), n.headers =
|
|
1863
|
+
), n.headers = te.concat(o, i);
|
|
1864
1864
|
const a = [];
|
|
1865
1865
|
let p = !0;
|
|
1866
1866
|
this.interceptors.request.forEach(function(y) {
|
|
1867
1867
|
if (typeof y.runWhen == "function" && y.runWhen(n) === !1)
|
|
1868
1868
|
return;
|
|
1869
1869
|
p = p && y.synchronous;
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1870
|
+
const h = n.transitional || st;
|
|
1871
|
+
h && h.legacyInterceptorReqResOrdering ? a.unshift(y.fulfilled, y.rejected) : a.push(y.fulfilled, y.rejected);
|
|
1872
1872
|
});
|
|
1873
1873
|
const d = [];
|
|
1874
1874
|
this.interceptors.response.forEach(function(y) {
|
|
1875
1875
|
d.push(y.fulfilled, y.rejected);
|
|
1876
1876
|
});
|
|
1877
|
-
let
|
|
1877
|
+
let l, _ = 0, E;
|
|
1878
1878
|
if (!p) {
|
|
1879
|
-
const f = [
|
|
1880
|
-
for (f.unshift(...a), f.push(...d),
|
|
1881
|
-
|
|
1882
|
-
return
|
|
1879
|
+
const f = [Tt.bind(this), void 0];
|
|
1880
|
+
for (f.unshift(...a), f.push(...d), E = f.length, l = Promise.resolve(n); _ < E; )
|
|
1881
|
+
l = l.then(f[_++], f[_++]);
|
|
1882
|
+
return l;
|
|
1883
1883
|
}
|
|
1884
|
-
|
|
1885
|
-
let
|
|
1886
|
-
for (;
|
|
1887
|
-
const f = a[
|
|
1884
|
+
E = a.length;
|
|
1885
|
+
let C = n;
|
|
1886
|
+
for (; _ < E; ) {
|
|
1887
|
+
const f = a[_++], y = a[_++];
|
|
1888
1888
|
try {
|
|
1889
|
-
|
|
1890
|
-
} catch (
|
|
1891
|
-
y.call(this,
|
|
1889
|
+
C = f(C);
|
|
1890
|
+
} catch (h) {
|
|
1891
|
+
y.call(this, h);
|
|
1892
1892
|
break;
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
try {
|
|
1896
|
-
|
|
1896
|
+
l = Tt.call(this, C);
|
|
1897
1897
|
} catch (f) {
|
|
1898
1898
|
return Promise.reject(f);
|
|
1899
1899
|
}
|
|
1900
|
-
for (
|
|
1901
|
-
|
|
1902
|
-
return
|
|
1900
|
+
for (_ = 0, E = d.length; _ < E; )
|
|
1901
|
+
l = l.then(d[_++], d[_++]);
|
|
1902
|
+
return l;
|
|
1903
1903
|
}
|
|
1904
1904
|
getUri(t) {
|
|
1905
|
-
t =
|
|
1906
|
-
const n =
|
|
1907
|
-
return
|
|
1905
|
+
t = pe(this.defaults, t);
|
|
1906
|
+
const n = rn(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1907
|
+
return en(n, t.params, t.paramsSerializer);
|
|
1908
1908
|
}
|
|
1909
1909
|
};
|
|
1910
1910
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1911
|
-
|
|
1912
|
-
return this.request(
|
|
1911
|
+
de.prototype[t] = function(n, s) {
|
|
1912
|
+
return this.request(pe(s || {}, {
|
|
1913
1913
|
method: t,
|
|
1914
1914
|
url: n,
|
|
1915
|
-
data: (
|
|
1915
|
+
data: (s || {}).data
|
|
1916
1916
|
}));
|
|
1917
1917
|
};
|
|
1918
1918
|
});
|
|
1919
1919
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1920
|
-
function n(
|
|
1921
|
-
return function(
|
|
1922
|
-
return this.request(
|
|
1920
|
+
function n(s) {
|
|
1921
|
+
return function(i, o, a) {
|
|
1922
|
+
return this.request(pe(a || {}, {
|
|
1923
1923
|
method: t,
|
|
1924
|
-
headers:
|
|
1924
|
+
headers: s ? {
|
|
1925
1925
|
"Content-Type": "multipart/form-data"
|
|
1926
1926
|
} : {},
|
|
1927
|
-
url:
|
|
1928
|
-
data:
|
|
1927
|
+
url: i,
|
|
1928
|
+
data: o
|
|
1929
1929
|
}));
|
|
1930
1930
|
};
|
|
1931
1931
|
}
|
|
1932
|
-
|
|
1932
|
+
de.prototype[t] = n(), de.prototype[t + "Form"] = n(!0);
|
|
1933
1933
|
});
|
|
1934
|
-
let
|
|
1934
|
+
let Qs = class dn {
|
|
1935
1935
|
constructor(t) {
|
|
1936
1936
|
if (typeof t != "function")
|
|
1937
1937
|
throw new TypeError("executor must be a function.");
|
|
1938
1938
|
let n;
|
|
1939
|
-
this.promise = new Promise(function(
|
|
1940
|
-
n =
|
|
1939
|
+
this.promise = new Promise(function(i) {
|
|
1940
|
+
n = i;
|
|
1941
1941
|
});
|
|
1942
|
-
const
|
|
1943
|
-
this.promise.then((
|
|
1944
|
-
if (!
|
|
1945
|
-
let
|
|
1946
|
-
for (;
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
}), this.promise.then = (
|
|
1950
|
-
let
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1953
|
-
}).then(
|
|
1954
|
-
return
|
|
1955
|
-
|
|
1956
|
-
},
|
|
1957
|
-
}, t(function(
|
|
1958
|
-
|
|
1942
|
+
const s = this;
|
|
1943
|
+
this.promise.then((r) => {
|
|
1944
|
+
if (!s._listeners) return;
|
|
1945
|
+
let i = s._listeners.length;
|
|
1946
|
+
for (; i-- > 0; )
|
|
1947
|
+
s._listeners[i](r);
|
|
1948
|
+
s._listeners = null;
|
|
1949
|
+
}), this.promise.then = (r) => {
|
|
1950
|
+
let i;
|
|
1951
|
+
const o = new Promise((a) => {
|
|
1952
|
+
s.subscribe(a), i = a;
|
|
1953
|
+
}).then(r);
|
|
1954
|
+
return o.cancel = function() {
|
|
1955
|
+
s.unsubscribe(i);
|
|
1956
|
+
}, o;
|
|
1957
|
+
}, t(function(i, o, a) {
|
|
1958
|
+
s.reason || (s.reason = new Ne(i, o, a), n(s.reason));
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
1961
|
/**
|
|
@@ -1985,8 +1985,8 @@ let vr = class qt {
|
|
|
1985
1985
|
n !== -1 && this._listeners.splice(n, 1);
|
|
1986
1986
|
}
|
|
1987
1987
|
toAbortSignal() {
|
|
1988
|
-
const t = new AbortController(), n = (
|
|
1989
|
-
t.abort(
|
|
1988
|
+
const t = new AbortController(), n = (s) => {
|
|
1989
|
+
t.abort(s);
|
|
1990
1990
|
};
|
|
1991
1991
|
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1992
1992
|
}
|
|
@@ -1997,22 +1997,22 @@ let vr = class qt {
|
|
|
1997
1997
|
static source() {
|
|
1998
1998
|
let t;
|
|
1999
1999
|
return {
|
|
2000
|
-
token: new
|
|
2001
|
-
t =
|
|
2000
|
+
token: new dn(function(r) {
|
|
2001
|
+
t = r;
|
|
2002
2002
|
}),
|
|
2003
2003
|
cancel: t
|
|
2004
2004
|
};
|
|
2005
2005
|
}
|
|
2006
2006
|
};
|
|
2007
|
-
function
|
|
2007
|
+
function er(e) {
|
|
2008
2008
|
return function(n) {
|
|
2009
2009
|
return e.apply(null, n);
|
|
2010
2010
|
};
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function tr(e) {
|
|
2013
2013
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
2014
2014
|
}
|
|
2015
|
-
const
|
|
2015
|
+
const ze = {
|
|
2016
2016
|
Continue: 100,
|
|
2017
2017
|
SwitchingProtocols: 101,
|
|
2018
2018
|
Processing: 102,
|
|
@@ -2083,53 +2083,86 @@ const Me = {
|
|
|
2083
2083
|
SslHandshakeFailed: 525,
|
|
2084
2084
|
InvalidSslCertificate: 526
|
|
2085
2085
|
};
|
|
2086
|
-
Object.entries(
|
|
2087
|
-
|
|
2086
|
+
Object.entries(ze).forEach(([e, t]) => {
|
|
2087
|
+
ze[t] = e;
|
|
2088
2088
|
});
|
|
2089
|
-
function
|
|
2090
|
-
const t = new
|
|
2091
|
-
return c.extend(n,
|
|
2092
|
-
return
|
|
2089
|
+
function un(e) {
|
|
2090
|
+
const t = new de(e), n = $t(de.prototype.request, t);
|
|
2091
|
+
return c.extend(n, de.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
2092
|
+
return un(pe(e, r));
|
|
2093
2093
|
}, n;
|
|
2094
2094
|
}
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2095
|
+
const Y = un(Te);
|
|
2096
|
+
Y.Axios = de;
|
|
2097
|
+
Y.CanceledError = Ne;
|
|
2098
|
+
Y.CancelToken = Qs;
|
|
2099
|
+
Y.isCancel = nn;
|
|
2100
|
+
Y.VERSION = ln;
|
|
2101
|
+
Y.toFormData = He;
|
|
2102
|
+
Y.AxiosError = b;
|
|
2103
|
+
Y.Cancel = Y.CanceledError;
|
|
2104
|
+
Y.all = function(t) {
|
|
2105
2105
|
return Promise.all(t);
|
|
2106
2106
|
};
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2107
|
+
Y.spread = er;
|
|
2108
|
+
Y.isAxiosError = tr;
|
|
2109
|
+
Y.mergeConfig = pe;
|
|
2110
|
+
Y.AxiosHeaders = te;
|
|
2111
|
+
Y.formToJSON = (e) => tn(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
2112
|
+
Y.getAdapter = cn.getAdapter;
|
|
2113
|
+
Y.HttpStatusCode = ze;
|
|
2114
|
+
Y.default = Y;
|
|
2115
2115
|
const {
|
|
2116
|
-
Axios:
|
|
2117
|
-
AxiosError:
|
|
2118
|
-
CanceledError:
|
|
2119
|
-
isCancel:
|
|
2120
|
-
CancelToken:
|
|
2121
|
-
VERSION:
|
|
2122
|
-
all:
|
|
2123
|
-
Cancel:
|
|
2124
|
-
isAxiosError:
|
|
2125
|
-
spread:
|
|
2126
|
-
toFormData:
|
|
2127
|
-
AxiosHeaders:
|
|
2128
|
-
HttpStatusCode:
|
|
2129
|
-
formToJSON:
|
|
2130
|
-
getAdapter:
|
|
2131
|
-
mergeConfig:
|
|
2132
|
-
} =
|
|
2116
|
+
Axios: Ir,
|
|
2117
|
+
AxiosError: $r,
|
|
2118
|
+
CanceledError: Gr,
|
|
2119
|
+
isCancel: Jr,
|
|
2120
|
+
CancelToken: Xr,
|
|
2121
|
+
VERSION: qr,
|
|
2122
|
+
all: Vr,
|
|
2123
|
+
Cancel: Kr,
|
|
2124
|
+
isAxiosError: zr,
|
|
2125
|
+
spread: Zr,
|
|
2126
|
+
toFormData: Wr,
|
|
2127
|
+
AxiosHeaders: Qr,
|
|
2128
|
+
HttpStatusCode: ei,
|
|
2129
|
+
formToJSON: ti,
|
|
2130
|
+
getAdapter: ni,
|
|
2131
|
+
mergeConfig: si
|
|
2132
|
+
} = Y, vt = (e) => {
|
|
2133
|
+
let t;
|
|
2134
|
+
const n = /* @__PURE__ */ new Set(), s = (d, l) => {
|
|
2135
|
+
const _ = typeof d == "function" ? d(t) : d;
|
|
2136
|
+
if (!Object.is(_, t)) {
|
|
2137
|
+
const E = t;
|
|
2138
|
+
t = l ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), n.forEach((C) => C(t, E));
|
|
2139
|
+
}
|
|
2140
|
+
}, r = () => t, a = { setState: s, getState: r, getInitialState: () => p, subscribe: (d) => (n.add(d), () => n.delete(d)) }, p = t = e(s, r, a);
|
|
2141
|
+
return a;
|
|
2142
|
+
}, nr = ((e) => e ? vt(e) : vt), sr = (e) => e;
|
|
2143
|
+
function rr(e, t = sr) {
|
|
2144
|
+
const n = Ee.useSyncExternalStore(
|
|
2145
|
+
e.subscribe,
|
|
2146
|
+
Ee.useCallback(() => t(e.getState()), [e, t]),
|
|
2147
|
+
Ee.useCallback(() => t(e.getInitialState()), [e, t])
|
|
2148
|
+
);
|
|
2149
|
+
return Ee.useDebugValue(n), n;
|
|
2150
|
+
}
|
|
2151
|
+
const xt = (e) => {
|
|
2152
|
+
const t = nr(e), n = (s) => rr(t, s);
|
|
2153
|
+
return Object.assign(n, t), n;
|
|
2154
|
+
}, ir = ((e) => e ? xt(e) : xt), he = ir((e) => ({
|
|
2155
|
+
newsSelectedCandles: null,
|
|
2156
|
+
newsPlayEndTimestamp: null,
|
|
2157
|
+
newsTargetCandle: null,
|
|
2158
|
+
gapCount: 0,
|
|
2159
|
+
isReplayMode: !1,
|
|
2160
|
+
setNewsSelectedCandles: (t) => e({ newsSelectedCandles: t }),
|
|
2161
|
+
setNewsPlayEndTimestamp: (t) => e({ newsPlayEndTimestamp: t }),
|
|
2162
|
+
setNewsTargetCandle: (t) => e({ newsTargetCandle: t }),
|
|
2163
|
+
setGapCount: (t) => e({ gapCount: t }),
|
|
2164
|
+
setReplayMode: (t) => e({ isReplayMode: t })
|
|
2165
|
+
})), or = {
|
|
2133
2166
|
"1D": "D1",
|
|
2134
2167
|
D: "D1",
|
|
2135
2168
|
240: "H4",
|
|
@@ -2139,7 +2172,7 @@ const {
|
|
|
2139
2172
|
15: "M15",
|
|
2140
2173
|
5: "M5",
|
|
2141
2174
|
1: "M1"
|
|
2142
|
-
},
|
|
2175
|
+
}, Ze = (e) => ({
|
|
2143
2176
|
1: 60,
|
|
2144
2177
|
5: 300,
|
|
2145
2178
|
// 5 minutes
|
|
@@ -2149,40 +2182,40 @@ const {
|
|
|
2149
2182
|
// 30 minutes
|
|
2150
2183
|
60: 3600
|
|
2151
2184
|
// 60 minutes (1 hour)
|
|
2152
|
-
})[e] || 3600,
|
|
2153
|
-
const e =
|
|
2185
|
+
})[e] || 3600, pn = [10, 15, 20, 25, 30, 35, 40, 45, 50], fn = Yt(null), ar = () => {
|
|
2186
|
+
const e = Mt(fn);
|
|
2154
2187
|
if (!e)
|
|
2155
2188
|
throw new Error("useWidgetContext must be used inside WidgetProvider");
|
|
2156
2189
|
return e;
|
|
2157
|
-
},
|
|
2190
|
+
}, cr = ({
|
|
2158
2191
|
children: e,
|
|
2159
2192
|
selectedTimeframe: t,
|
|
2160
2193
|
setSelectedTimeframe: n,
|
|
2161
|
-
currentSymbol:
|
|
2162
|
-
setCurrentSymbol:
|
|
2194
|
+
currentSymbol: s,
|
|
2195
|
+
setCurrentSymbol: r
|
|
2163
2196
|
}) => /* @__PURE__ */ m.jsx(
|
|
2164
|
-
|
|
2197
|
+
fn.Provider,
|
|
2165
2198
|
{
|
|
2166
2199
|
value: {
|
|
2167
|
-
currentSymbol:
|
|
2168
|
-
setCurrentSymbol:
|
|
2200
|
+
currentSymbol: s,
|
|
2201
|
+
setCurrentSymbol: r,
|
|
2169
2202
|
selectedTimeframe: t,
|
|
2170
2203
|
setSelectedTimeframe: n
|
|
2171
2204
|
},
|
|
2172
2205
|
children: e
|
|
2173
2206
|
}
|
|
2174
2207
|
);
|
|
2175
|
-
const
|
|
2176
|
-
const
|
|
2177
|
-
const
|
|
2208
|
+
const mn = (...e) => e.filter((t, n, s) => !!t && t.trim() !== "" && s.indexOf(t) === n).join(" ").trim();
|
|
2209
|
+
const lr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2210
|
+
const dr = (e) => e.replace(
|
|
2178
2211
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2179
|
-
(t, n,
|
|
2212
|
+
(t, n, s) => s ? s.toUpperCase() : n.toLowerCase()
|
|
2180
2213
|
);
|
|
2181
|
-
const
|
|
2182
|
-
const t =
|
|
2214
|
+
const Lt = (e) => {
|
|
2215
|
+
const t = dr(e);
|
|
2183
2216
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2184
2217
|
};
|
|
2185
|
-
var
|
|
2218
|
+
var ur = {
|
|
2186
2219
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2187
2220
|
width: 24,
|
|
2188
2221
|
height: 24,
|
|
@@ -2193,59 +2226,59 @@ var Yr = {
|
|
|
2193
2226
|
strokeLinecap: "round",
|
|
2194
2227
|
strokeLinejoin: "round"
|
|
2195
2228
|
};
|
|
2196
|
-
const
|
|
2229
|
+
const pr = (e) => {
|
|
2197
2230
|
for (const t in e)
|
|
2198
2231
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
2199
2232
|
return !0;
|
|
2200
2233
|
return !1;
|
|
2201
2234
|
};
|
|
2202
|
-
const
|
|
2235
|
+
const fr = Ht(
|
|
2203
2236
|
({
|
|
2204
2237
|
color: e = "currentColor",
|
|
2205
2238
|
size: t = 24,
|
|
2206
2239
|
strokeWidth: n = 2,
|
|
2207
|
-
absoluteStrokeWidth:
|
|
2208
|
-
className:
|
|
2209
|
-
children:
|
|
2210
|
-
iconNode:
|
|
2240
|
+
absoluteStrokeWidth: s,
|
|
2241
|
+
className: r = "",
|
|
2242
|
+
children: i,
|
|
2243
|
+
iconNode: o,
|
|
2211
2244
|
...a
|
|
2212
|
-
}, p) =>
|
|
2245
|
+
}, p) => Xe(
|
|
2213
2246
|
"svg",
|
|
2214
2247
|
{
|
|
2215
2248
|
ref: p,
|
|
2216
|
-
...
|
|
2249
|
+
...ur,
|
|
2217
2250
|
width: t,
|
|
2218
2251
|
height: t,
|
|
2219
2252
|
stroke: e,
|
|
2220
|
-
strokeWidth:
|
|
2221
|
-
className:
|
|
2222
|
-
...!
|
|
2253
|
+
strokeWidth: s ? Number(n) * 24 / Number(t) : n,
|
|
2254
|
+
className: mn("lucide", r),
|
|
2255
|
+
...!i && !pr(a) && { "aria-hidden": "true" },
|
|
2223
2256
|
...a
|
|
2224
2257
|
},
|
|
2225
2258
|
[
|
|
2226
|
-
...
|
|
2227
|
-
...Array.isArray(
|
|
2259
|
+
...o.map(([d, l]) => Xe(d, l)),
|
|
2260
|
+
...Array.isArray(i) ? i : [i]
|
|
2228
2261
|
]
|
|
2229
2262
|
)
|
|
2230
2263
|
);
|
|
2231
|
-
const
|
|
2232
|
-
const n =
|
|
2233
|
-
({ className:
|
|
2234
|
-
ref:
|
|
2264
|
+
const ot = (e, t) => {
|
|
2265
|
+
const n = Ht(
|
|
2266
|
+
({ className: s, ...r }, i) => Xe(fr, {
|
|
2267
|
+
ref: i,
|
|
2235
2268
|
iconNode: t,
|
|
2236
|
-
className:
|
|
2237
|
-
`lucide-${
|
|
2269
|
+
className: mn(
|
|
2270
|
+
`lucide-${lr(Lt(e))}`,
|
|
2238
2271
|
`lucide-${e}`,
|
|
2239
|
-
|
|
2272
|
+
s
|
|
2240
2273
|
),
|
|
2241
|
-
...
|
|
2274
|
+
...r
|
|
2242
2275
|
})
|
|
2243
2276
|
);
|
|
2244
|
-
return n.displayName =
|
|
2277
|
+
return n.displayName = Lt(e), n;
|
|
2245
2278
|
};
|
|
2246
|
-
const
|
|
2247
|
-
const
|
|
2248
|
-
const
|
|
2279
|
+
const mr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], _r = ot("chevron-down", mr);
|
|
2280
|
+
const hr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], wr = ot("chevron-left", hr);
|
|
2281
|
+
const yr = [
|
|
2249
2282
|
[
|
|
2250
2283
|
"path",
|
|
2251
2284
|
{
|
|
@@ -2255,22 +2288,22 @@ const Gr = [
|
|
|
2255
2288
|
],
|
|
2256
2289
|
["path", { d: "M19.8 17.8a7.5 7.5 0 0 0 .003-10.603", key: "yol142" }],
|
|
2257
2290
|
["path", { d: "M17 15a3.5 3.5 0 0 0-.025-4.975", key: "ssbmkc" }]
|
|
2258
|
-
],
|
|
2291
|
+
], gr = ot("speech", yr), We = (e, t) => {
|
|
2259
2292
|
if (!e || e === "-" || e.trim() === "" || !t || t === "-" || t.trim() === "")
|
|
2260
2293
|
return "news-widget__orange";
|
|
2261
|
-
const n = e.trim().replace(/[kKmMbB%]/g, "").replace(/[^\d.-]/g, ""),
|
|
2262
|
-
return
|
|
2263
|
-
},
|
|
2294
|
+
const n = e.trim().replace(/[kKmMbB%]/g, "").replace(/[^\d.-]/g, ""), s = t.trim().replace(/[kKmMbB%]/g, "").replace(/[^\d.-]/g, ""), r = parseFloat(n) || 0, i = parseFloat(s) || 0;
|
|
2295
|
+
return r > i ? "news-widget__green" : r === i ? "news-widget__orange" : "news-widget__red";
|
|
2296
|
+
}, Pt = (e) => e.trim().replaceAll(" ", "").replaceAll("_", ""), Cr = new Intl.DateTimeFormat("en-US", {
|
|
2264
2297
|
year: "numeric",
|
|
2265
2298
|
month: "long",
|
|
2266
2299
|
day: "2-digit",
|
|
2267
2300
|
hour: "2-digit",
|
|
2268
2301
|
minute: "2-digit",
|
|
2269
2302
|
hour12: !1
|
|
2270
|
-
}),
|
|
2271
|
-
const t =
|
|
2303
|
+
}), _n = (e) => {
|
|
2304
|
+
const t = Cr.formatToParts(e), n = (s) => t.find((r) => r.type === s)?.value ?? "";
|
|
2272
2305
|
return `${n("year")} ${n("month")} ${n("day")}, ${n("hour")}:${n("minute")}`;
|
|
2273
|
-
},
|
|
2306
|
+
}, Rr = ({
|
|
2274
2307
|
currency: e,
|
|
2275
2308
|
size: t = 24
|
|
2276
2309
|
}) => /* @__PURE__ */ m.jsx(
|
|
@@ -2282,17 +2315,17 @@ const Gr = [
|
|
|
2282
2315
|
width: t,
|
|
2283
2316
|
height: t
|
|
2284
2317
|
}
|
|
2285
|
-
),
|
|
2318
|
+
), br = ({
|
|
2286
2319
|
title: e,
|
|
2287
2320
|
date: t,
|
|
2288
2321
|
forecast: n,
|
|
2289
|
-
actual:
|
|
2290
|
-
currency:
|
|
2322
|
+
actual: s,
|
|
2323
|
+
currency: r
|
|
2291
2324
|
}) => /* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__container", children: [
|
|
2292
2325
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__header", children: [
|
|
2293
|
-
|
|
2326
|
+
r && /* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__currency_icon", children: /* @__PURE__ */ m.jsx(Rr, { currency: r }) }),
|
|
2294
2327
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__meta", children: [
|
|
2295
|
-
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__date", children:
|
|
2328
|
+
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__date", children: _n(new Date(t ?? 0)) }),
|
|
2296
2329
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__title", children: e })
|
|
2297
2330
|
] })
|
|
2298
2331
|
] }),
|
|
@@ -2302,8 +2335,8 @@ const Gr = [
|
|
|
2302
2335
|
/* @__PURE__ */ m.jsx(
|
|
2303
2336
|
"div",
|
|
2304
2337
|
{
|
|
2305
|
-
className: `news-widget_news_card__font_semibold ${
|
|
2306
|
-
children:
|
|
2338
|
+
className: `news-widget_news_card__font_semibold ${We(String(s), String(n))}`,
|
|
2339
|
+
children: s || "-"
|
|
2307
2340
|
}
|
|
2308
2341
|
)
|
|
2309
2342
|
] }),
|
|
@@ -2313,7 +2346,7 @@ const Gr = [
|
|
|
2313
2346
|
] })
|
|
2314
2347
|
] })
|
|
2315
2348
|
] });
|
|
2316
|
-
function
|
|
2349
|
+
function Er(e) {
|
|
2317
2350
|
switch (e) {
|
|
2318
2351
|
case "post":
|
|
2319
2352
|
return "news-widget__bg_green";
|
|
@@ -2323,19 +2356,19 @@ function Wr(e) {
|
|
|
2323
2356
|
return "news-widget__bg_orange";
|
|
2324
2357
|
}
|
|
2325
2358
|
}
|
|
2326
|
-
const
|
|
2359
|
+
const Sr = ({
|
|
2327
2360
|
eventData: e,
|
|
2328
2361
|
showStatus: t = !0,
|
|
2329
2362
|
showPreviousValues: n = !1,
|
|
2330
|
-
showSimilarEvents:
|
|
2331
|
-
isSimilarEventsOpen:
|
|
2363
|
+
showSimilarEvents: s = !1,
|
|
2364
|
+
isSimilarEventsOpen: r = !1
|
|
2332
2365
|
}) => /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__container", children: [
|
|
2333
2366
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__body", children: [
|
|
2334
2367
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__left", children: [
|
|
2335
2368
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details_card__header_row", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__header_inner", children: [
|
|
2336
2369
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__timestamp_row", children: [
|
|
2337
2370
|
/* @__PURE__ */ m.jsxs("p", { className: "news-widget_event_details_card__timestamp", children: [
|
|
2338
|
-
e?.timestamp &&
|
|
2371
|
+
e?.timestamp && _n(
|
|
2339
2372
|
new Date(e?.timestamp ?? 0)
|
|
2340
2373
|
),
|
|
2341
2374
|
" "
|
|
@@ -2345,7 +2378,7 @@ const Zr = ({
|
|
|
2345
2378
|
/* @__PURE__ */ m.jsx(
|
|
2346
2379
|
"div",
|
|
2347
2380
|
{
|
|
2348
|
-
className: `news-widget_event_details_card__status ${
|
|
2381
|
+
className: `news-widget_event_details_card__status ${Er(e.status)}`
|
|
2349
2382
|
}
|
|
2350
2383
|
),
|
|
2351
2384
|
e.status === "post" && "Actual Released",
|
|
@@ -2371,7 +2404,7 @@ const Zr = ({
|
|
|
2371
2404
|
e?.event_time && ` ${e?.event_time}`
|
|
2372
2405
|
] }),
|
|
2373
2406
|
e?.slug == "FOMC" && /* @__PURE__ */ m.jsx(
|
|
2374
|
-
|
|
2407
|
+
gr,
|
|
2375
2408
|
{
|
|
2376
2409
|
stroke: "url(#gradient)",
|
|
2377
2410
|
className: "news-widget_event_details_card__speech_icon"
|
|
@@ -2386,7 +2419,7 @@ const Zr = ({
|
|
|
2386
2419
|
/* @__PURE__ */ m.jsx(
|
|
2387
2420
|
"span",
|
|
2388
2421
|
{
|
|
2389
|
-
className: `news-widget_event_details_card__text_bold ${
|
|
2422
|
+
className: `news-widget_event_details_card__text_bold ${We(e?.actual, e?.forecast)}`,
|
|
2390
2423
|
children: e?.actual || "Soon"
|
|
2391
2424
|
}
|
|
2392
2425
|
)
|
|
@@ -2402,7 +2435,7 @@ const Zr = ({
|
|
|
2402
2435
|
/* @__PURE__ */ m.jsx(
|
|
2403
2436
|
"span",
|
|
2404
2437
|
{
|
|
2405
|
-
className: `news-widget_event_details_card__text_bold ${
|
|
2438
|
+
className: `news-widget_event_details_card__text_bold ${We(
|
|
2406
2439
|
e?.similar?.referenceEvent?.previous_actual,
|
|
2407
2440
|
e?.similar?.referenceEvent?.previous_forecast
|
|
2408
2441
|
)}`,
|
|
@@ -2433,61 +2466,61 @@ const Zr = ({
|
|
|
2433
2466
|
] }),
|
|
2434
2467
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details_card__right", children: e?.description && /* @__PURE__ */ m.jsx("p", { className: "news-widget_event_details_card__description", children: e.description }) })
|
|
2435
2468
|
] }),
|
|
2436
|
-
|
|
2469
|
+
s && e?.similar?.referenceEvent?.previousEvents && e?.similar?.referenceEvent?.previousEvents.length > 0 && /* @__PURE__ */ m.jsx(
|
|
2437
2470
|
"div",
|
|
2438
2471
|
{
|
|
2439
|
-
className: `news-widget_event_details_card__collapsible ${
|
|
2440
|
-
children:
|
|
2472
|
+
className: `news-widget_event_details_card__collapsible ${r ? "news-widget_event_details_card__collapsible--open" : "news-widget_event_details_card__collapsible--closed"}`,
|
|
2473
|
+
children: r && /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__collapsible_inner", children: [
|
|
2441
2474
|
e?.similar?.referenceEvent?.previousEvents.length > 0 && /* @__PURE__ */ m.jsxs("p", { className: "news-widget_event_details_card__text", children: [
|
|
2442
2475
|
"News Before This ",
|
|
2443
2476
|
e?.event_name
|
|
2444
2477
|
] }),
|
|
2445
2478
|
e?.similar?.referenceEvent?.previousEvents.length > 0 && /* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details_card__previous_events_list", children: e?.similar?.referenceEvent?.previousEvents?.map(
|
|
2446
|
-
(
|
|
2447
|
-
|
|
2479
|
+
(i, o) => /* @__PURE__ */ m.jsx(
|
|
2480
|
+
br,
|
|
2448
2481
|
{
|
|
2449
|
-
title:
|
|
2450
|
-
date: new Date(
|
|
2451
|
-
forecast:
|
|
2452
|
-
actual:
|
|
2482
|
+
title: i.event_name,
|
|
2483
|
+
date: new Date(i.timestamp),
|
|
2484
|
+
forecast: i.forecast,
|
|
2485
|
+
actual: i.actual,
|
|
2453
2486
|
currency: e?.currency
|
|
2454
2487
|
},
|
|
2455
|
-
|
|
2488
|
+
o
|
|
2456
2489
|
)
|
|
2457
2490
|
) })
|
|
2458
2491
|
] })
|
|
2459
2492
|
}
|
|
2460
2493
|
)
|
|
2461
|
-
] }),
|
|
2494
|
+
] }), Dr = ({
|
|
2462
2495
|
newsDetail: e,
|
|
2463
2496
|
children: t,
|
|
2464
2497
|
isCompared: n
|
|
2465
2498
|
}) => {
|
|
2466
|
-
const [
|
|
2499
|
+
const [s, r] = re(!1);
|
|
2467
2500
|
return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details__container news-widget_event_details__container_sm", children: [
|
|
2468
2501
|
e && /* @__PURE__ */ m.jsxs("div", { style: { position: "relative" }, children: [
|
|
2469
2502
|
/* @__PURE__ */ m.jsx(
|
|
2470
|
-
|
|
2503
|
+
Sr,
|
|
2471
2504
|
{
|
|
2472
2505
|
eventData: e.event,
|
|
2473
2506
|
showPreviousValues: !n,
|
|
2474
2507
|
showSimilarEvents: !0,
|
|
2475
|
-
isSimilarEventsOpen:
|
|
2508
|
+
isSimilarEventsOpen: s
|
|
2476
2509
|
}
|
|
2477
2510
|
),
|
|
2478
2511
|
/* @__PURE__ */ m.jsx(
|
|
2479
2512
|
"button",
|
|
2480
2513
|
{
|
|
2481
2514
|
type: "button",
|
|
2482
|
-
className: `news-widget__button news-widget_event_details__ghost_button ${
|
|
2483
|
-
onClick: () =>
|
|
2484
|
-
children: /* @__PURE__ */ m.jsx(
|
|
2515
|
+
className: `news-widget__button news-widget_event_details__ghost_button ${s ? "news-widget_event_details__ghost_button_open" : ""}`,
|
|
2516
|
+
onClick: () => r(!s),
|
|
2517
|
+
children: /* @__PURE__ */ m.jsx(_r, { className: "news-widget_event_details__icon" })
|
|
2485
2518
|
}
|
|
2486
2519
|
)
|
|
2487
2520
|
] }),
|
|
2488
2521
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details__chart_wrapper", children: /* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details__chart", children: t }) })
|
|
2489
2522
|
] });
|
|
2490
|
-
},
|
|
2523
|
+
}, Ar = [
|
|
2491
2524
|
{ name: "LTC_USD", type: "CFD", pipLocation: -1 },
|
|
2492
2525
|
{ name: "HK33_HKD", type: "CFD", pipLocation: 0 },
|
|
2493
2526
|
{ name: "USD_JPY", type: "CURRENCY", pipLocation: -2 },
|
|
@@ -2617,131 +2650,734 @@ const Zr = ({
|
|
|
2617
2650
|
{ name: "US2000_USD", type: "CFD", pipLocation: -2 },
|
|
2618
2651
|
{ name: "BCO_USD", type: "CFD", pipLocation: -2 },
|
|
2619
2652
|
{ name: "AUD_JPY", type: "CURRENCY", pipLocation: -2 }
|
|
2620
|
-
]
|
|
2653
|
+
];
|
|
2654
|
+
function Ur(e, t, n = 1) {
|
|
2655
|
+
if (t === 0 || !isFinite(t)) return n;
|
|
2656
|
+
const s = e / t;
|
|
2657
|
+
return isFinite(s) ? s : n;
|
|
2658
|
+
}
|
|
2659
|
+
function Ot(e) {
|
|
2660
|
+
if (e.length === 0) return 0;
|
|
2661
|
+
const t = [...e].sort((s, r) => s - r), n = Math.floor(t.length / 2);
|
|
2662
|
+
return t.length % 2 !== 0 ? t[n] : (t[n - 1] + t[n]) / 2;
|
|
2663
|
+
}
|
|
2664
|
+
function Tr(e, t, n = []) {
|
|
2665
|
+
if (e.length === 0) return [];
|
|
2666
|
+
const s = n.map((l) => Math.abs(l.c - l.o)), r = e.map((l) => Math.abs(l.c - l.o)), i = Ot(r), o = Ot(s), a = Ur(o, i), p = e[0].o, d = t.c;
|
|
2667
|
+
return e.map((l) => {
|
|
2668
|
+
const _ = (l.o - p) * a + d, E = (l.h - p) * a + d, C = (l.l - p) * a + d, f = (l.c - p) * a + d;
|
|
2669
|
+
return {
|
|
2670
|
+
o: _,
|
|
2671
|
+
h: Math.max(E, _, f),
|
|
2672
|
+
l: Math.min(C, _, f),
|
|
2673
|
+
c: f
|
|
2674
|
+
};
|
|
2675
|
+
});
|
|
2676
|
+
}
|
|
2677
|
+
const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 : parseInt(e, 10) * 60, Qe = 8, hn = 4, et = 5, wn = (e) => {
|
|
2678
|
+
const t = new Date(e + Qe * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
|
|
2679
|
+
return n === 0 ? !1 : n === 1 ? s >= et : n === 6 ? s <= hn : !0;
|
|
2680
|
+
}, yn = (e) => {
|
|
2681
|
+
const t = new Date(e + Qe * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
|
|
2682
|
+
if (n === 0 || n === 1 && s < et || n === 6 && s >= hn) {
|
|
2683
|
+
const r = (8 - n) % 7;
|
|
2684
|
+
return t.setUTCDate(t.getUTCDate() + r), t.setUTCHours(et, 0, 0, 0), t.getTime() - Qe * 60 * 60 * 1e3;
|
|
2685
|
+
}
|
|
2686
|
+
return e;
|
|
2687
|
+
}, Nr = (e, t, n) => {
|
|
2688
|
+
const s = ue(t) * 1e3, r = [];
|
|
2689
|
+
let i = e;
|
|
2690
|
+
for (let o = 0; o < n; o++)
|
|
2691
|
+
i += s, wn(i) || (i = yn(i)), r.push(i);
|
|
2692
|
+
return r;
|
|
2693
|
+
}, kt = (e, t, n, s) => {
|
|
2694
|
+
if (n <= 0) return [];
|
|
2695
|
+
if (s === "24x7") {
|
|
2696
|
+
const i = ue(t) * 1e3;
|
|
2697
|
+
return Array.from(
|
|
2698
|
+
{ length: n },
|
|
2699
|
+
(o, a) => e + (a + 1) * i
|
|
2700
|
+
);
|
|
2701
|
+
}
|
|
2702
|
+
if (s === "1700-1700")
|
|
2703
|
+
return Nr(e, t, n);
|
|
2704
|
+
const r = ue(t) * 1e3;
|
|
2705
|
+
return Array.from(
|
|
2706
|
+
{ length: n },
|
|
2707
|
+
(i, o) => e + (o + 1) * r
|
|
2708
|
+
);
|
|
2709
|
+
}, vr = (e, t, n, s) => {
|
|
2710
|
+
if (s === "24x7") {
|
|
2711
|
+
const i = ue(n) * 1e3;
|
|
2712
|
+
return Math.max(
|
|
2713
|
+
0,
|
|
2714
|
+
Math.floor((t - e) / i)
|
|
2715
|
+
);
|
|
2716
|
+
}
|
|
2717
|
+
if (s === "1700-1700") {
|
|
2718
|
+
const i = ue(n) * 1e3;
|
|
2719
|
+
let o = 0, a = e;
|
|
2720
|
+
for (; a < t; )
|
|
2721
|
+
a += i, wn(a) || (a = yn(a)), a <= t && o++;
|
|
2722
|
+
return o;
|
|
2723
|
+
}
|
|
2724
|
+
const r = ue(n) * 1e3;
|
|
2725
|
+
return Math.max(0, Math.floor((t - e) / r));
|
|
2726
|
+
}, gn = [
|
|
2727
|
+
{
|
|
2728
|
+
ticker: "EUR_JPY",
|
|
2729
|
+
display_name: "EURJPY",
|
|
2730
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/EUR.svg", "https://cdn.iccandle.ai/web-assets/JPY.svg"],
|
|
2731
|
+
description: "EUR JPY",
|
|
2732
|
+
type: "forex",
|
|
2733
|
+
session: "1700-1700"
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
ticker: "GBP_JPY",
|
|
2737
|
+
display_name: "GBPJPY",
|
|
2738
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/GBP.svg", "https://cdn.iccandle.ai/web-assets/JPY.svg"],
|
|
2739
|
+
description: "GBP JPY",
|
|
2740
|
+
type: "forex",
|
|
2741
|
+
session: "1700-1700"
|
|
2742
|
+
},
|
|
2743
|
+
{
|
|
2744
|
+
ticker: "AUD_JPY",
|
|
2745
|
+
display_name: "AUDJPY",
|
|
2746
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/AUD.svg", "https://cdn.iccandle.ai/web-assets/JPY.svg"],
|
|
2747
|
+
description: "AUD JPY",
|
|
2748
|
+
type: "forex",
|
|
2749
|
+
session: "1700-1700"
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
ticker: "NZD_JPY",
|
|
2753
|
+
display_name: "NZDJPY",
|
|
2754
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/NZD.svg", "https://cdn.iccandle.ai/web-assets/JPY.svg"],
|
|
2755
|
+
description: "NZD JPY",
|
|
2756
|
+
type: "forex",
|
|
2757
|
+
session: "1700-1700"
|
|
2758
|
+
},
|
|
2759
|
+
{
|
|
2760
|
+
ticker: "CAD_JPY",
|
|
2761
|
+
display_name: "CADJPY",
|
|
2762
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/CAD.svg", "https://cdn.iccandle.ai/web-assets/JPY.svg"],
|
|
2763
|
+
description: "CAD JPY",
|
|
2764
|
+
type: "forex",
|
|
2765
|
+
session: "1700-1700"
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
ticker: "CHF_JPY",
|
|
2769
|
+
display_name: "CHFJPY",
|
|
2770
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/CHF.svg", "https://cdn.iccandle.ai/web-assets/JPY.svg"],
|
|
2771
|
+
description: "CHF JPY",
|
|
2772
|
+
type: "forex",
|
|
2773
|
+
session: "1700-1700"
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
ticker: "USD_JPY",
|
|
2777
|
+
display_name: "USDJPY",
|
|
2778
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/USD.svg", "https://cdn.iccandle.ai/web-assets/JPY.svg"],
|
|
2779
|
+
description: "USD JPY",
|
|
2780
|
+
type: "forex",
|
|
2781
|
+
session: "1700-1700"
|
|
2782
|
+
},
|
|
2783
|
+
{
|
|
2784
|
+
ticker: "EUR_USD",
|
|
2785
|
+
display_name: "EURUSD",
|
|
2786
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/EUR.svg", "https://cdn.iccandle.ai/web-assets/USD.svg"],
|
|
2787
|
+
description: "EUR USD",
|
|
2788
|
+
type: "forex",
|
|
2789
|
+
session: "1700-1700"
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
ticker: "AUD_USD",
|
|
2793
|
+
display_name: "AUDUSD",
|
|
2794
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/AUD.svg", "https://cdn.iccandle.ai/web-assets/USD.svg"],
|
|
2795
|
+
description: "AUD USD",
|
|
2796
|
+
type: "forex",
|
|
2797
|
+
session: "1700-1700"
|
|
2798
|
+
},
|
|
2799
|
+
{
|
|
2800
|
+
ticker: "NZD_USD",
|
|
2801
|
+
display_name: "NZDUSD",
|
|
2802
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/NZD.svg", "https://cdn.iccandle.ai/web-assets/USD.svg"],
|
|
2803
|
+
description: "NZD USD",
|
|
2804
|
+
type: "forex",
|
|
2805
|
+
session: "1700-1700"
|
|
2806
|
+
},
|
|
2807
|
+
{
|
|
2808
|
+
ticker: "USD_CHF",
|
|
2809
|
+
display_name: "USDCHF",
|
|
2810
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/USD.svg", "https://cdn.iccandle.ai/web-assets/CHF.svg"],
|
|
2811
|
+
description: "USD CHF",
|
|
2812
|
+
type: "forex",
|
|
2813
|
+
session: "1700-1700"
|
|
2814
|
+
},
|
|
2815
|
+
{
|
|
2816
|
+
ticker: "USD_CAD",
|
|
2817
|
+
display_name: "USDCAD",
|
|
2818
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/USD.svg", "https://cdn.iccandle.ai/web-assets/CAD.svg"],
|
|
2819
|
+
description: "USD CAD",
|
|
2820
|
+
type: "forex",
|
|
2821
|
+
session: "1700-1700"
|
|
2822
|
+
},
|
|
2823
|
+
{
|
|
2824
|
+
ticker: "GBP_AUD",
|
|
2825
|
+
display_name: "GBPAUD",
|
|
2826
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/GBP.svg", "https://cdn.iccandle.ai/web-assets/AUD.svg"],
|
|
2827
|
+
description: "GBP AUD",
|
|
2828
|
+
type: "forex",
|
|
2829
|
+
session: "1700-1700"
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
ticker: "GBP_CAD",
|
|
2833
|
+
display_name: "GBPCAD",
|
|
2834
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/GBP.svg", "https://cdn.iccandle.ai/web-assets/CAD.svg"],
|
|
2835
|
+
description: "GBP CAD",
|
|
2836
|
+
type: "forex",
|
|
2837
|
+
session: "1700-1700"
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
ticker: "GBP_CHF",
|
|
2841
|
+
display_name: "GBPCHF",
|
|
2842
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/GBP.svg", "https://cdn.iccandle.ai/web-assets/CHF.svg"],
|
|
2843
|
+
description: "GBP CHF",
|
|
2844
|
+
type: "forex",
|
|
2845
|
+
session: "1700-1700"
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
ticker: "GBP_NZD",
|
|
2849
|
+
display_name: "GBPNZD",
|
|
2850
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/GBP.svg", "https://cdn.iccandle.ai/web-assets/NZD.svg"],
|
|
2851
|
+
description: "GBP NZD",
|
|
2852
|
+
type: "forex",
|
|
2853
|
+
session: "1700-1700"
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
ticker: "GBP_USD",
|
|
2857
|
+
display_name: "GBPUSD",
|
|
2858
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/GBP.svg", "https://cdn.iccandle.ai/web-assets/USD.svg"],
|
|
2859
|
+
description: "GBP USD",
|
|
2860
|
+
type: "forex",
|
|
2861
|
+
session: "1700-1700"
|
|
2862
|
+
},
|
|
2863
|
+
{
|
|
2864
|
+
ticker: "NZD_CAD",
|
|
2865
|
+
display_name: "NZDCAD",
|
|
2866
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/NZD.svg", "https://cdn.iccandle.ai/web-assets/CAD.svg"],
|
|
2867
|
+
description: "NZD CAD",
|
|
2868
|
+
type: "forex",
|
|
2869
|
+
session: "1700-1700"
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
ticker: "EUR_CAD",
|
|
2873
|
+
display_name: "EURCAD",
|
|
2874
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/EUR.svg", "https://cdn.iccandle.ai/web-assets/CAD.svg"],
|
|
2875
|
+
description: "EUR CAD",
|
|
2876
|
+
type: "forex",
|
|
2877
|
+
session: "1700-1700"
|
|
2878
|
+
},
|
|
2879
|
+
{
|
|
2880
|
+
ticker: "EUR_AUD",
|
|
2881
|
+
display_name: "EURAUD",
|
|
2882
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/EUR.svg", "https://cdn.iccandle.ai/web-assets/AUD.svg"],
|
|
2883
|
+
description: "EUR AUD",
|
|
2884
|
+
type: "forex",
|
|
2885
|
+
session: "1700-1700"
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
ticker: "XAU_USD",
|
|
2889
|
+
display_name: "XAUUSD",
|
|
2890
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/XAU.svg"],
|
|
2891
|
+
description: "Gold",
|
|
2892
|
+
type: "commodity",
|
|
2893
|
+
session: "1700-1700"
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
ticker: "BCO_USD",
|
|
2897
|
+
display_name: "BCOUSD",
|
|
2898
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/BCO.svg"],
|
|
2899
|
+
description: "Brent Crude Oil",
|
|
2900
|
+
type: "commodity",
|
|
2901
|
+
session: "1700-1700"
|
|
2902
|
+
},
|
|
2903
|
+
{
|
|
2904
|
+
ticker: "SPX500_USD",
|
|
2905
|
+
display_name: "S&P500",
|
|
2906
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/SPX500.svg"],
|
|
2907
|
+
description: "S&P 500",
|
|
2908
|
+
type: "indices",
|
|
2909
|
+
session: "1700-1700"
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
ticker: "NAS100_USD",
|
|
2913
|
+
display_name: "NASDAQ100",
|
|
2914
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/NAS100.svg"],
|
|
2915
|
+
description: "NASDAQ 100",
|
|
2916
|
+
type: "indices",
|
|
2917
|
+
session: "1700-1700"
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
ticker: "US30_USD",
|
|
2921
|
+
display_name: "US30",
|
|
2922
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/US30.svg"],
|
|
2923
|
+
description: "US Wall St 30",
|
|
2924
|
+
type: "indices",
|
|
2925
|
+
session: "1700-1700"
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
ticker: "BTCUSDT",
|
|
2929
|
+
display_name: "BTCUSDT",
|
|
2930
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/BTC.svg"],
|
|
2931
|
+
description: "BTCUSDT",
|
|
2932
|
+
type: "crypto",
|
|
2933
|
+
session: "24x7"
|
|
2934
|
+
},
|
|
2935
|
+
{
|
|
2936
|
+
ticker: "ETHUSDT",
|
|
2937
|
+
display_name: "ETHUSDT",
|
|
2938
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/ETH.svg"],
|
|
2939
|
+
description: "ETHUSDT",
|
|
2940
|
+
type: "crypto",
|
|
2941
|
+
session: "24x7"
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
ticker: "XRPUSDT",
|
|
2945
|
+
display_name: "XRPUSDT",
|
|
2946
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/XRP.svg"],
|
|
2947
|
+
description: "XRPUSDT",
|
|
2948
|
+
type: "crypto",
|
|
2949
|
+
session: "24x7"
|
|
2950
|
+
},
|
|
2951
|
+
{
|
|
2952
|
+
ticker: "SOLUSDT",
|
|
2953
|
+
display_name: "SOLUSDT",
|
|
2954
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/SOL.svg"],
|
|
2955
|
+
description: "SOLUSDT",
|
|
2956
|
+
type: "crypto",
|
|
2957
|
+
session: "24x7"
|
|
2958
|
+
},
|
|
2959
|
+
{
|
|
2960
|
+
ticker: "ADAUSDT",
|
|
2961
|
+
display_name: "ADAUSDT",
|
|
2962
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/ADA.svg"],
|
|
2963
|
+
description: "ADAUSDT",
|
|
2964
|
+
type: "crypto",
|
|
2965
|
+
session: "24x7"
|
|
2966
|
+
},
|
|
2967
|
+
{
|
|
2968
|
+
ticker: "AVAUSDT",
|
|
2969
|
+
display_name: "AVAUSDT",
|
|
2970
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/AVA.svg"],
|
|
2971
|
+
description: "AVAUSDT",
|
|
2972
|
+
type: "crypto",
|
|
2973
|
+
session: "24x7"
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
ticker: "AVAXUSDT",
|
|
2977
|
+
display_name: "AVAXUSDT",
|
|
2978
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/AVAX.svg"],
|
|
2979
|
+
description: "AVAXUSDT",
|
|
2980
|
+
type: "crypto",
|
|
2981
|
+
session: "24x7"
|
|
2982
|
+
},
|
|
2983
|
+
{
|
|
2984
|
+
ticker: "BNBUSDT",
|
|
2985
|
+
display_name: "BNBUSDT",
|
|
2986
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/BNB.svg"],
|
|
2987
|
+
description: "BNBUSDT",
|
|
2988
|
+
type: "crypto",
|
|
2989
|
+
session: "24x7"
|
|
2990
|
+
},
|
|
2991
|
+
{
|
|
2992
|
+
ticker: "DOGEUSDT",
|
|
2993
|
+
display_name: "DOGEUSDT",
|
|
2994
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/DOGE.svg"],
|
|
2995
|
+
description: "DOGEUSDT",
|
|
2996
|
+
type: "crypto",
|
|
2997
|
+
session: "24x7"
|
|
2998
|
+
},
|
|
2999
|
+
{
|
|
3000
|
+
ticker: "DOTUSDT",
|
|
3001
|
+
display_name: "DOTUSDT",
|
|
3002
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/DOT.svg"],
|
|
3003
|
+
description: "DOTUSDT",
|
|
3004
|
+
type: "crypto",
|
|
3005
|
+
session: "24x7"
|
|
3006
|
+
},
|
|
3007
|
+
{
|
|
3008
|
+
ticker: "TRXUSDT",
|
|
3009
|
+
display_name: "TRXUSDT",
|
|
3010
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/TRX.svg"],
|
|
3011
|
+
description: "TRXUSDT",
|
|
3012
|
+
type: "crypto",
|
|
3013
|
+
session: "24x7"
|
|
3014
|
+
},
|
|
3015
|
+
{
|
|
3016
|
+
ticker: "AAPL",
|
|
3017
|
+
display_name: "AAPL",
|
|
3018
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/AAPL.svg"],
|
|
3019
|
+
description: "Apple Inc.",
|
|
3020
|
+
type: "stock",
|
|
3021
|
+
session: "24x7"
|
|
3022
|
+
},
|
|
3023
|
+
{
|
|
3024
|
+
ticker: "AMZN",
|
|
3025
|
+
display_name: "AMZN",
|
|
3026
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/AMZN.svg"],
|
|
3027
|
+
description: "Amazon.Com Inc",
|
|
3028
|
+
type: "stock",
|
|
3029
|
+
session: "24x7"
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
ticker: "BRK.B",
|
|
3033
|
+
display_name: "BRK.B",
|
|
3034
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/BRK.B.svg"],
|
|
3035
|
+
description: "BERKSHIRE HATHAWAY Class B",
|
|
3036
|
+
type: "stock",
|
|
3037
|
+
session: "24x7"
|
|
3038
|
+
},
|
|
3039
|
+
{
|
|
3040
|
+
ticker: "GOOGL",
|
|
3041
|
+
display_name: "GOOGL",
|
|
3042
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/GOOGL.svg"],
|
|
3043
|
+
description: "Alphabet Inc. Class A Common Stock",
|
|
3044
|
+
type: "stock",
|
|
3045
|
+
session: "24x7"
|
|
3046
|
+
},
|
|
3047
|
+
{
|
|
3048
|
+
ticker: "KO",
|
|
3049
|
+
display_name: "KO",
|
|
3050
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/KO.svg"],
|
|
3051
|
+
description: "Coca-Cola Company",
|
|
3052
|
+
type: "stock",
|
|
3053
|
+
session: "24x7"
|
|
3054
|
+
},
|
|
3055
|
+
{
|
|
3056
|
+
ticker: "META",
|
|
3057
|
+
display_name: "META",
|
|
3058
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/META.svg"],
|
|
3059
|
+
description: "Meta Platforms, Inc. Class A Common Stock",
|
|
3060
|
+
type: "stock",
|
|
3061
|
+
session: "24x7"
|
|
3062
|
+
},
|
|
3063
|
+
{
|
|
3064
|
+
ticker: "MSFT",
|
|
3065
|
+
display_name: "MSFT",
|
|
3066
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/MSFT.svg"],
|
|
3067
|
+
description: "Microsoft Corp",
|
|
3068
|
+
type: "stock",
|
|
3069
|
+
session: "24x7"
|
|
3070
|
+
},
|
|
3071
|
+
{
|
|
3072
|
+
ticker: "NFLX",
|
|
3073
|
+
display_name: "NFLX",
|
|
3074
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/NFLX.svg"],
|
|
3075
|
+
description: "NetFlix Inc",
|
|
3076
|
+
type: "stock",
|
|
3077
|
+
session: "24x7"
|
|
3078
|
+
},
|
|
3079
|
+
{
|
|
3080
|
+
ticker: "NKE",
|
|
3081
|
+
display_name: "NKE",
|
|
3082
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/NKE.svg"],
|
|
3083
|
+
description: "Nike, Inc.",
|
|
3084
|
+
type: "stock",
|
|
3085
|
+
session: "24x7"
|
|
3086
|
+
},
|
|
3087
|
+
{
|
|
3088
|
+
ticker: "NVDA",
|
|
3089
|
+
display_name: "NVDA",
|
|
3090
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/NVDA.svg"],
|
|
3091
|
+
description: "Nvidia Corp",
|
|
3092
|
+
type: "stock",
|
|
3093
|
+
session: "24x7"
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
ticker: "TME",
|
|
3097
|
+
display_name: "TME",
|
|
3098
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/TME.svg"],
|
|
3099
|
+
description: "Tencent Music Entertainment Group American Depositary Shares, each representing two Class A Ordinary Shares",
|
|
3100
|
+
type: "stock",
|
|
3101
|
+
session: "24x7"
|
|
3102
|
+
},
|
|
3103
|
+
{
|
|
3104
|
+
ticker: "TSLA",
|
|
3105
|
+
display_name: "TSLA",
|
|
3106
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/TSLA.svg"],
|
|
3107
|
+
description: "Tesla, Inc. Common Stock",
|
|
3108
|
+
type: "stock",
|
|
3109
|
+
session: "24x7"
|
|
3110
|
+
},
|
|
3111
|
+
{
|
|
3112
|
+
ticker: "XAG_USD",
|
|
3113
|
+
display_name: "XAGUSD",
|
|
3114
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/XAG.svg"],
|
|
3115
|
+
description: "Silver",
|
|
3116
|
+
type: "commodity",
|
|
3117
|
+
session: "1700-1700"
|
|
3118
|
+
},
|
|
3119
|
+
{
|
|
3120
|
+
ticker: "XCU_USD",
|
|
3121
|
+
display_name: "XCUUSD",
|
|
3122
|
+
logo_urls: ["https://cdn.iccandle.ai/web-assets/XCU.svg"],
|
|
3123
|
+
description: "Copper",
|
|
3124
|
+
type: "commodity",
|
|
3125
|
+
session: "1700-1700"
|
|
3126
|
+
}
|
|
3127
|
+
], xr = ({
|
|
3128
|
+
replayTabId: e,
|
|
3129
|
+
futureBarsRef: t,
|
|
3130
|
+
highlightBarsRef: n,
|
|
3131
|
+
// hiddenBarsRef,
|
|
3132
|
+
tvWidgetRef: s,
|
|
3133
|
+
pushBar: r,
|
|
3134
|
+
resolution: i,
|
|
3135
|
+
symbol: o
|
|
3136
|
+
}) => {
|
|
3137
|
+
const a = he(
|
|
3138
|
+
(C) => C.newsSelectedCandles
|
|
3139
|
+
), p = he((C) => C.newsTargetCandle), d = he(
|
|
3140
|
+
(C) => C.newsPlayEndTimestamp
|
|
3141
|
+
), l = he((C) => C.gapCount), _ = ae(a), E = ae(null);
|
|
3142
|
+
return ie(() => {
|
|
3143
|
+
const C = {
|
|
3144
|
+
current: null
|
|
3145
|
+
};
|
|
3146
|
+
let f = !1;
|
|
3147
|
+
return (async () => {
|
|
3148
|
+
if (!f) {
|
|
3149
|
+
if (a?.length && p !== null) {
|
|
3150
|
+
if (E.current === a) return;
|
|
3151
|
+
t.current = [];
|
|
3152
|
+
const y = d != null;
|
|
3153
|
+
if (_.current || y)
|
|
3154
|
+
try {
|
|
3155
|
+
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3156
|
+
} catch {
|
|
3157
|
+
}
|
|
3158
|
+
try {
|
|
3159
|
+
s?.current?.activeChart().executeActionById("timeScaleReset");
|
|
3160
|
+
} catch {
|
|
3161
|
+
}
|
|
3162
|
+
console.log("upcoming-predict: ", { newsTargetCandle: p });
|
|
3163
|
+
const v = [...a].slice(-50 - (l || 0)), B = Tr(
|
|
3164
|
+
v,
|
|
3165
|
+
p[p.length - 1],
|
|
3166
|
+
p
|
|
3167
|
+
), j = gn.find(
|
|
3168
|
+
(N) => N.ticker === o || N.display_name === o
|
|
3169
|
+
)?.session || "24x7", x = kt(
|
|
3170
|
+
p[p.length - 1].timestamp,
|
|
3171
|
+
i,
|
|
3172
|
+
l || 0,
|
|
3173
|
+
j
|
|
3174
|
+
), V = kt(
|
|
3175
|
+
l ? x[x.length - 1] : p[p.length - 1].timestamp,
|
|
3176
|
+
i,
|
|
3177
|
+
B.length,
|
|
3178
|
+
j
|
|
3179
|
+
), k = B.map(
|
|
3180
|
+
(N, F) => ({
|
|
3181
|
+
open: N.o,
|
|
3182
|
+
high: N.h,
|
|
3183
|
+
low: N.l,
|
|
3184
|
+
close: N.c,
|
|
3185
|
+
time: V[F]
|
|
3186
|
+
})
|
|
3187
|
+
).sort((N, F) => N.time - F.time);
|
|
3188
|
+
n.current = k.slice(-50);
|
|
3189
|
+
let M = 0, Q = 0;
|
|
3190
|
+
const I = async () => {
|
|
3191
|
+
C.current && (clearInterval(C.current), C.current = null), E.current = a;
|
|
3192
|
+
try {
|
|
3193
|
+
a && k.length > 0;
|
|
3194
|
+
} catch (N) {
|
|
3195
|
+
console.error("Error setting visible range:", N);
|
|
3196
|
+
}
|
|
3197
|
+
};
|
|
3198
|
+
k.length === 0 ? (t.current = [], await I()) : setTimeout(() => {
|
|
3199
|
+
C.current = setInterval(() => {
|
|
3200
|
+
if (M < k.length) {
|
|
3201
|
+
if (r(e, k[M]))
|
|
3202
|
+
t.current = k.slice(0, M + 1), M++, Q = 0, M === k.length && (t.current = k, I());
|
|
3203
|
+
else if (Q++, Q >= 10) {
|
|
3204
|
+
t.current = [...k];
|
|
3205
|
+
try {
|
|
3206
|
+
s?.current?.activeChart().resetData();
|
|
3207
|
+
} catch {
|
|
3208
|
+
}
|
|
3209
|
+
I();
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
}, 150);
|
|
3213
|
+
}, 700);
|
|
3214
|
+
} else {
|
|
3215
|
+
if (t.current = [], _.current)
|
|
3216
|
+
try {
|
|
3217
|
+
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3218
|
+
} catch {
|
|
3219
|
+
}
|
|
3220
|
+
E.current = null;
|
|
3221
|
+
}
|
|
3222
|
+
_.current = a;
|
|
3223
|
+
}
|
|
3224
|
+
})(), () => {
|
|
3225
|
+
f = !0, C.current && clearInterval(C.current);
|
|
3226
|
+
};
|
|
3227
|
+
}, [
|
|
3228
|
+
r,
|
|
3229
|
+
t,
|
|
3230
|
+
n,
|
|
3231
|
+
d,
|
|
3232
|
+
a,
|
|
3233
|
+
p,
|
|
3234
|
+
e,
|
|
3235
|
+
i,
|
|
3236
|
+
o,
|
|
3237
|
+
s,
|
|
3238
|
+
l
|
|
3239
|
+
]), ie(() => {
|
|
3240
|
+
a === null && (n.current = []);
|
|
3241
|
+
}, [n, a]), /* @__PURE__ */ m.jsx(m.Fragment, {});
|
|
3242
|
+
}, Lr = ({
|
|
2621
3243
|
children: e,
|
|
2622
3244
|
eventId: t,
|
|
2623
3245
|
widgetKey: n,
|
|
2624
|
-
chartWidget:
|
|
2625
|
-
|
|
2626
|
-
event: o,
|
|
3246
|
+
chartWidget: s,
|
|
3247
|
+
event: r,
|
|
2627
3248
|
theme: i,
|
|
2628
|
-
newsDetail:
|
|
2629
|
-
selectedCandles:
|
|
2630
|
-
defaultSymbol:
|
|
2631
|
-
currentSymbol:
|
|
2632
|
-
currentTimeFrame:
|
|
2633
|
-
|
|
2634
|
-
isElapsed:
|
|
3249
|
+
newsDetail: o,
|
|
3250
|
+
selectedCandles: a,
|
|
3251
|
+
defaultSymbol: p,
|
|
3252
|
+
currentSymbol: d,
|
|
3253
|
+
currentTimeFrame: l,
|
|
3254
|
+
isUpcoming: _ = !1,
|
|
3255
|
+
isElapsed: E = !1,
|
|
3256
|
+
onBack: C,
|
|
3257
|
+
pushBar: f,
|
|
3258
|
+
highlightBarsRef: y,
|
|
3259
|
+
futureRef: h,
|
|
3260
|
+
setGapCountExternal: v,
|
|
3261
|
+
setReplayModeExternal: B
|
|
2635
3262
|
}) => {
|
|
2636
|
-
const { setCurrentSymbol:
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
3263
|
+
const U = ae(null), j = ae(!1), { setCurrentSymbol: x, setSelectedTimeframe: V } = ar(), {
|
|
3264
|
+
setNewsTargetCandle: O,
|
|
3265
|
+
setGapCount: k,
|
|
3266
|
+
setNewsPlayEndTimestamp: M,
|
|
3267
|
+
setNewsSelectedCandles: Q
|
|
3268
|
+
} = he();
|
|
3269
|
+
return ie(() => {
|
|
3270
|
+
if (!t || t == "" || !s) return;
|
|
3271
|
+
const I = () => {
|
|
3272
|
+
if (s) {
|
|
3273
|
+
const g = s?.activeChart();
|
|
3274
|
+
g && g.getAllShapes().forEach((J) => {
|
|
2643
3275
|
try {
|
|
2644
|
-
|
|
2645
|
-
} catch (
|
|
2646
|
-
console.error("Failed to remove shape",
|
|
3276
|
+
g.removeEntity(J.id);
|
|
3277
|
+
} catch (T) {
|
|
3278
|
+
console.error("Failed to remove shape", T);
|
|
2647
3279
|
}
|
|
2648
3280
|
});
|
|
2649
3281
|
}
|
|
2650
|
-
},
|
|
2651
|
-
const { data:
|
|
3282
|
+
}, N = async () => {
|
|
3283
|
+
const { data: g, status: J } = await Y.get(
|
|
2652
3284
|
`https://corprate-widget.iccandle.ai/news/${t}`,
|
|
2653
3285
|
{
|
|
2654
3286
|
headers: { "api-key": n },
|
|
2655
|
-
params: { symbol:
|
|
3287
|
+
params: { symbol: p }
|
|
2656
3288
|
}
|
|
2657
3289
|
);
|
|
2658
|
-
if (
|
|
3290
|
+
if (J !== 200) {
|
|
2659
3291
|
console.error("Failed to fetch news detail");
|
|
2660
3292
|
return;
|
|
2661
3293
|
}
|
|
2662
|
-
return
|
|
3294
|
+
return g;
|
|
2663
3295
|
};
|
|
2664
|
-
let
|
|
2665
|
-
const
|
|
2666
|
-
const
|
|
2667
|
-
return
|
|
3296
|
+
let F = !1;
|
|
3297
|
+
const X = [], z = (g, J) => {
|
|
3298
|
+
const T = window.setTimeout(g, J);
|
|
3299
|
+
return X.push(T), T;
|
|
2668
3300
|
};
|
|
2669
|
-
return
|
|
2670
|
-
i === "dark" || i === "system" ? (
|
|
3301
|
+
return U.current = s, s.onChartReady(async () => {
|
|
3302
|
+
i === "dark" || i === "system" ? (s.applyOverrides({
|
|
2671
3303
|
//chart background
|
|
2672
3304
|
"paneProperties.background": "#000000",
|
|
2673
3305
|
//timestamp color
|
|
2674
3306
|
"scalesProperties.textColor": "#fff"
|
|
2675
|
-
}),
|
|
3307
|
+
}), s.setCSSCustomProperty(
|
|
2676
3308
|
"--tv-color-pane-background",
|
|
2677
3309
|
"#000000"
|
|
2678
|
-
),
|
|
3310
|
+
), s.setCSSCustomProperty(
|
|
2679
3311
|
"--tv-color-platform-background",
|
|
2680
3312
|
"#0f0f0f"
|
|
2681
|
-
)) : (
|
|
3313
|
+
)) : (s.applyOverrides({
|
|
2682
3314
|
"paneProperties.background": "#ffffff",
|
|
2683
3315
|
"scalesProperties.textColor": "#000"
|
|
2684
|
-
}),
|
|
3316
|
+
}), s.setCSSCustomProperty(
|
|
2685
3317
|
"--tv-color-pane-background",
|
|
2686
3318
|
"#ffffff"
|
|
2687
|
-
),
|
|
3319
|
+
), s.setCSSCustomProperty(
|
|
2688
3320
|
"--tv-color-platform-background",
|
|
2689
3321
|
"#f9fafb"
|
|
2690
3322
|
));
|
|
2691
|
-
const
|
|
2692
|
-
if (!
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
3323
|
+
const g = s.activeChart();
|
|
3324
|
+
if (!g) return;
|
|
3325
|
+
if (!j.current) {
|
|
3326
|
+
const w = await g.createStudy(
|
|
3327
|
+
"Generated Candles - By iC Candle",
|
|
3328
|
+
!0,
|
|
3329
|
+
!0
|
|
3330
|
+
);
|
|
3331
|
+
w && g.bringToFront([w]), j.current = !0;
|
|
3332
|
+
}
|
|
3333
|
+
const J = async (w, S) => {
|
|
3334
|
+
await g.createShape(
|
|
3335
|
+
{ time: S },
|
|
2697
3336
|
{
|
|
2698
3337
|
shape: "vertical_line",
|
|
2699
3338
|
lock: !0,
|
|
2700
3339
|
disableSelection: !0,
|
|
2701
3340
|
overrides: { linestyle: 2, linewidth: 1 }
|
|
2702
3341
|
}
|
|
2703
|
-
)
|
|
2704
|
-
const D = await
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
if (B != -1 && !L && (L = [...zt].sort((U, g) => g - U).find((U) => D.data[B + U]) ?? null), B != -1 && L) {
|
|
2710
|
-
const U = P, g = D.data[B + L][0], O = D.data.filter(
|
|
2711
|
-
(h) => h[0] > U && h[0] <= g
|
|
3342
|
+
);
|
|
3343
|
+
const D = await g.exportData(), $ = D.data.findIndex((R) => R[0] === S);
|
|
3344
|
+
let W = a;
|
|
3345
|
+
if ($ != -1 && !W && (W = [...pn].sort((R, A) => A - R).find((R) => D.data[$ + R]) ?? null), $ != -1 && W) {
|
|
3346
|
+
const R = w, A = D.data[$ + W][0], G = D.data.filter(
|
|
3347
|
+
(P) => P[0] > R && P[0] <= A
|
|
2712
3348
|
) ?? [];
|
|
2713
|
-
let
|
|
2714
|
-
if (
|
|
2715
|
-
const
|
|
2716
|
-
(
|
|
3349
|
+
let L = null, H = null;
|
|
3350
|
+
if (G.length > 0) {
|
|
3351
|
+
const P = G.reduce(
|
|
3352
|
+
(fe, ce, me, _e) => Number(ce[3]) < Number(_e[fe][3]) ? me : fe,
|
|
2717
3353
|
0
|
|
2718
|
-
),
|
|
2719
|
-
|
|
2720
|
-
time:
|
|
2721
|
-
value: Number(
|
|
3354
|
+
), ne = G[P];
|
|
3355
|
+
H = {
|
|
3356
|
+
time: ne[0],
|
|
3357
|
+
value: Number(ne[3])
|
|
2722
3358
|
};
|
|
2723
3359
|
}
|
|
2724
|
-
if (
|
|
2725
|
-
const
|
|
2726
|
-
(
|
|
3360
|
+
if (G.length > 0) {
|
|
3361
|
+
const P = G.reduce(
|
|
3362
|
+
(fe, ce, me, _e) => Number(ce[2]) > Number(_e[fe][2]) ? me : fe,
|
|
2727
3363
|
0
|
|
2728
|
-
),
|
|
2729
|
-
|
|
2730
|
-
time:
|
|
2731
|
-
value: Number(
|
|
3364
|
+
), ne = G[P];
|
|
3365
|
+
L = {
|
|
3366
|
+
time: ne[0],
|
|
3367
|
+
value: Number(ne[2])
|
|
2732
3368
|
};
|
|
2733
3369
|
}
|
|
2734
|
-
if (
|
|
2735
|
-
const
|
|
2736
|
-
await
|
|
3370
|
+
if (L && H && G.length > 0) {
|
|
3371
|
+
const P = L.value, ne = H.value, ce = D.data[$ + 1][1];
|
|
3372
|
+
await g.createMultipointShape(
|
|
2737
3373
|
[
|
|
2738
3374
|
{
|
|
2739
|
-
time:
|
|
2740
|
-
price:
|
|
3375
|
+
time: R,
|
|
3376
|
+
price: ce
|
|
2741
3377
|
},
|
|
2742
3378
|
{
|
|
2743
|
-
time:
|
|
2744
|
-
price:
|
|
3379
|
+
time: A,
|
|
3380
|
+
price: P
|
|
2745
3381
|
}
|
|
2746
3382
|
],
|
|
2747
3383
|
{
|
|
@@ -2760,15 +3396,15 @@ const Zr = ({
|
|
|
2760
3396
|
frozen: !0
|
|
2761
3397
|
}
|
|
2762
3398
|
}
|
|
2763
|
-
), await
|
|
3399
|
+
), await g.createMultipointShape(
|
|
2764
3400
|
[
|
|
2765
3401
|
{
|
|
2766
|
-
time:
|
|
2767
|
-
price:
|
|
3402
|
+
time: R,
|
|
3403
|
+
price: ne
|
|
2768
3404
|
},
|
|
2769
3405
|
{
|
|
2770
|
-
time:
|
|
2771
|
-
price:
|
|
3406
|
+
time: A,
|
|
3407
|
+
price: ce
|
|
2772
3408
|
}
|
|
2773
3409
|
],
|
|
2774
3410
|
{
|
|
@@ -2786,15 +3422,15 @@ const Zr = ({
|
|
|
2786
3422
|
frozen: !0
|
|
2787
3423
|
}
|
|
2788
3424
|
}
|
|
2789
|
-
), await
|
|
3425
|
+
), await g.createMultipointShape(
|
|
2790
3426
|
[
|
|
2791
3427
|
{
|
|
2792
|
-
time:
|
|
2793
|
-
price:
|
|
3428
|
+
time: R,
|
|
3429
|
+
price: P
|
|
2794
3430
|
},
|
|
2795
3431
|
{
|
|
2796
|
-
time:
|
|
2797
|
-
price:
|
|
3432
|
+
time: A,
|
|
3433
|
+
price: P
|
|
2798
3434
|
}
|
|
2799
3435
|
],
|
|
2800
3436
|
{
|
|
@@ -2807,15 +3443,15 @@ const Zr = ({
|
|
|
2807
3443
|
extendRight: !0
|
|
2808
3444
|
}
|
|
2809
3445
|
}
|
|
2810
|
-
), await
|
|
3446
|
+
), await g.createMultipointShape(
|
|
2811
3447
|
[
|
|
2812
3448
|
{
|
|
2813
|
-
time:
|
|
2814
|
-
price:
|
|
3449
|
+
time: R,
|
|
3450
|
+
price: ne
|
|
2815
3451
|
},
|
|
2816
3452
|
{
|
|
2817
|
-
time:
|
|
2818
|
-
price:
|
|
3453
|
+
time: A,
|
|
3454
|
+
price: ne
|
|
2819
3455
|
}
|
|
2820
3456
|
],
|
|
2821
3457
|
{
|
|
@@ -2829,26 +3465,26 @@ const Zr = ({
|
|
|
2829
3465
|
}
|
|
2830
3466
|
}
|
|
2831
3467
|
);
|
|
2832
|
-
const
|
|
2833
|
-
(
|
|
3468
|
+
const me = Ar.find(
|
|
3469
|
+
(ve) => Pt(ve.name) == Pt(d)
|
|
2834
3470
|
)?.pipLocation;
|
|
2835
|
-
let
|
|
2836
|
-
if (
|
|
2837
|
-
const
|
|
2838
|
-
Math.abs((
|
|
3471
|
+
let _e = "", at = "";
|
|
3472
|
+
if (me) {
|
|
3473
|
+
const ve = Math.pow(10, -me), ct = parseFloat(
|
|
3474
|
+
Math.abs((P - ce) * ve).toFixed(
|
|
2839
3475
|
1
|
|
2840
3476
|
)
|
|
2841
|
-
),
|
|
2842
|
-
Math.abs((
|
|
3477
|
+
), lt = parseFloat(
|
|
3478
|
+
Math.abs((ne - ce) * ve).toFixed(
|
|
2843
3479
|
1
|
|
2844
3480
|
)
|
|
2845
3481
|
);
|
|
2846
|
-
|
|
3482
|
+
_e = `${ct >= 0 ? "+" : ""}${ct.toFixed(2)} pip`, at = `${lt >= 0 ? "-" : ""}${lt.toFixed(2)} pip`;
|
|
2847
3483
|
}
|
|
2848
|
-
await
|
|
3484
|
+
await g.createShape(
|
|
2849
3485
|
{
|
|
2850
|
-
time:
|
|
2851
|
-
price:
|
|
3486
|
+
time: L.time,
|
|
3487
|
+
price: L.value
|
|
2852
3488
|
},
|
|
2853
3489
|
{
|
|
2854
3490
|
shape: "arrow_down",
|
|
@@ -2856,14 +3492,14 @@ const Zr = ({
|
|
|
2856
3492
|
arrowColor: "#12B76A",
|
|
2857
3493
|
fontsize: 11,
|
|
2858
3494
|
color: "#12B76A",
|
|
2859
|
-
text:
|
|
3495
|
+
text: _e,
|
|
2860
3496
|
bold: !0
|
|
2861
3497
|
}
|
|
2862
3498
|
}
|
|
2863
|
-
), await
|
|
3499
|
+
), await g.createShape(
|
|
2864
3500
|
{
|
|
2865
|
-
time:
|
|
2866
|
-
price:
|
|
3501
|
+
time: H.time,
|
|
3502
|
+
price: H.value
|
|
2867
3503
|
},
|
|
2868
3504
|
{
|
|
2869
3505
|
shape: "arrow_up",
|
|
@@ -2871,19 +3507,19 @@ const Zr = ({
|
|
|
2871
3507
|
arrowColor: "#D92D20",
|
|
2872
3508
|
fontsize: 11,
|
|
2873
3509
|
color: "#D92D20",
|
|
2874
|
-
text:
|
|
3510
|
+
text: at,
|
|
2875
3511
|
bold: !0
|
|
2876
3512
|
}
|
|
2877
3513
|
}
|
|
2878
3514
|
);
|
|
2879
|
-
const
|
|
2880
|
-
await
|
|
3515
|
+
const Cn = Math.floor((R + A) / 2);
|
|
3516
|
+
await g.createShape(
|
|
2881
3517
|
{
|
|
2882
|
-
time:
|
|
3518
|
+
time: Cn
|
|
2883
3519
|
},
|
|
2884
3520
|
{
|
|
2885
3521
|
shape: "text",
|
|
2886
|
-
text: `${
|
|
3522
|
+
text: `${W} candles`,
|
|
2887
3523
|
zOrder: "top",
|
|
2888
3524
|
overrides: {
|
|
2889
3525
|
fontsize: 12,
|
|
@@ -2895,19 +3531,19 @@ const Zr = ({
|
|
|
2895
3531
|
);
|
|
2896
3532
|
}
|
|
2897
3533
|
}
|
|
2898
|
-
if (D &&
|
|
3534
|
+
if (D && await g.setVisibleRange({
|
|
2899
3535
|
from: D.data[0][0],
|
|
2900
3536
|
to: D.data[D.data?.length - 1][0]
|
|
2901
|
-
}),
|
|
2902
|
-
const
|
|
2903
|
-
await
|
|
2904
|
-
from:
|
|
2905
|
-
to:
|
|
3537
|
+
}), _ && r) {
|
|
3538
|
+
const R = Math.floor(Date.now() / 1e3);
|
|
3539
|
+
await g.setVisibleRange({
|
|
3540
|
+
from: R - 3600 * 24 * 7,
|
|
3541
|
+
to: S / 1e3 + 1440 * 60 * 7
|
|
2906
3542
|
});
|
|
2907
|
-
const
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
{ time:
|
|
3543
|
+
const A = S / 1e3, G = g.resolution();
|
|
3544
|
+
z(() => {
|
|
3545
|
+
F || U.current !== s || Number(G) <= 30 && g.createShape(
|
|
3546
|
+
{ time: A },
|
|
2911
3547
|
{
|
|
2912
3548
|
shape: "vertical_line",
|
|
2913
3549
|
lock: !0,
|
|
@@ -2917,70 +3553,129 @@ const Zr = ({
|
|
|
2917
3553
|
);
|
|
2918
3554
|
}, 2e3);
|
|
2919
3555
|
}
|
|
2920
|
-
},
|
|
2921
|
-
if (
|
|
2922
|
-
const
|
|
2923
|
-
if (
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
3556
|
+
}, T = async () => {
|
|
3557
|
+
if (F || U.current !== s) return;
|
|
3558
|
+
const w = await N();
|
|
3559
|
+
if (F || U.current !== s) return;
|
|
3560
|
+
I();
|
|
3561
|
+
const S = (w?.event?.timestamp ?? 0) / 1e3, D = Ze(l), $ = S - S % D;
|
|
3562
|
+
g.getVisibleBarsRange() || await new Promise((A) => setTimeout(A, 2e3));
|
|
3563
|
+
const R = g.getVisibleBarsRange();
|
|
3564
|
+
R && R.from <= S && S <= R.to ? await J(S, $) : (_ || await g.setVisibleRange({
|
|
3565
|
+
from: S
|
|
3566
|
+
}), await J(S, $));
|
|
3567
|
+
}, q = () => {
|
|
3568
|
+
z(() => {
|
|
3569
|
+
F || U.current !== s || (async () => {
|
|
2933
3570
|
try {
|
|
2934
|
-
|
|
2935
|
-
} catch (
|
|
2936
|
-
console.log("error=>",
|
|
3571
|
+
x(g.symbol());
|
|
3572
|
+
} catch (w) {
|
|
3573
|
+
console.log("error=>", w);
|
|
2937
3574
|
}
|
|
2938
3575
|
})();
|
|
2939
3576
|
}, 300);
|
|
2940
|
-
},
|
|
2941
|
-
|
|
2942
|
-
|
|
3577
|
+
}, Z = () => {
|
|
3578
|
+
z(() => {
|
|
3579
|
+
F || U.current !== s || (async () => {
|
|
2943
3580
|
try {
|
|
2944
|
-
|
|
2945
|
-
} catch (
|
|
2946
|
-
console.log("error=>",
|
|
3581
|
+
V(g.resolution());
|
|
3582
|
+
} catch (w) {
|
|
3583
|
+
console.log("error=>", w);
|
|
2947
3584
|
}
|
|
2948
3585
|
})();
|
|
2949
3586
|
}, 300);
|
|
2950
3587
|
};
|
|
2951
|
-
|
|
3588
|
+
g.onSymbolChanged().subscribe(null, q), g.onIntervalChanged().subscribe(null, Z);
|
|
2952
3589
|
try {
|
|
2953
|
-
|
|
2954
|
-
} catch (
|
|
2955
|
-
console.log("error=>",
|
|
3590
|
+
E || await T();
|
|
3591
|
+
} catch (w) {
|
|
3592
|
+
console.log("error=>", w);
|
|
2956
3593
|
}
|
|
2957
|
-
|
|
3594
|
+
F && (() => {
|
|
2958
3595
|
try {
|
|
2959
|
-
|
|
3596
|
+
g.onSymbolChanged().unsubscribe(null, q);
|
|
2960
3597
|
} catch {
|
|
2961
3598
|
}
|
|
2962
3599
|
try {
|
|
2963
|
-
|
|
3600
|
+
g.onIntervalChanged().unsubscribe(null, Z);
|
|
2964
3601
|
} catch {
|
|
2965
3602
|
}
|
|
2966
3603
|
})();
|
|
2967
3604
|
}), () => {
|
|
2968
|
-
|
|
3605
|
+
F = !0, X.forEach((g) => window.clearTimeout(g)), I(), U.current === s && (U.current = null);
|
|
2969
3606
|
};
|
|
2970
3607
|
}, [
|
|
2971
3608
|
i,
|
|
2972
3609
|
n,
|
|
2973
|
-
r,
|
|
2974
3610
|
s,
|
|
2975
|
-
|
|
3611
|
+
_,
|
|
2976
3612
|
p,
|
|
2977
|
-
|
|
3613
|
+
a,
|
|
3614
|
+
r,
|
|
2978
3615
|
t,
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
3616
|
+
l,
|
|
3617
|
+
V,
|
|
3618
|
+
d,
|
|
3619
|
+
x,
|
|
3620
|
+
E,
|
|
3621
|
+
M,
|
|
3622
|
+
Q,
|
|
3623
|
+
k,
|
|
3624
|
+
O,
|
|
3625
|
+
v,
|
|
3626
|
+
B
|
|
3627
|
+
]), ie(() => {
|
|
3628
|
+
s && s.onChartReady(async () => {
|
|
3629
|
+
const I = s?.activeChart();
|
|
3630
|
+
I && I.onDataLoaded().subscribe(
|
|
3631
|
+
null,
|
|
3632
|
+
async () => {
|
|
3633
|
+
const { data: N } = await I.exportData();
|
|
3634
|
+
console.log({ isUpcoming: _, candles: N });
|
|
3635
|
+
const F = Ze(l), X = (r?.timestamp ?? 0) / 1e3, z = X - X % F, g = N.findIndex(
|
|
3636
|
+
(T) => T[0] === z
|
|
3637
|
+
), J = N.slice(g - 49, g + 1).map((T) => ({
|
|
3638
|
+
o: T[1],
|
|
3639
|
+
h: T[2],
|
|
3640
|
+
l: T[3],
|
|
3641
|
+
c: T[4],
|
|
3642
|
+
timestamp: T[0] * 1e3
|
|
3643
|
+
}));
|
|
3644
|
+
if (_) {
|
|
3645
|
+
const T = N[N.length - 1], q = {
|
|
3646
|
+
o: T[1],
|
|
3647
|
+
h: T[2],
|
|
3648
|
+
l: T[3],
|
|
3649
|
+
c: T[4],
|
|
3650
|
+
timestamp: T[0] * 1e3
|
|
3651
|
+
}, Z = I.resolution(), u = ue(Z) * 1e3, w = q.timestamp, S = r?.timestamp ?? 0, D = Math.floor(S / u) * u, $ = gn.find((A) => A.ticker === d)?.session || "24x7", W = vr(
|
|
3652
|
+
w,
|
|
3653
|
+
D,
|
|
3654
|
+
Z,
|
|
3655
|
+
$
|
|
3656
|
+
), R = N.slice(-50).map((A) => ({
|
|
3657
|
+
o: A[1],
|
|
3658
|
+
h: A[2],
|
|
3659
|
+
l: A[3],
|
|
3660
|
+
c: A[4],
|
|
3661
|
+
timestamp: A[0] * 1e3
|
|
3662
|
+
}));
|
|
3663
|
+
console.log({ historySlice: R, gapCount: W }), k(W), O(R);
|
|
3664
|
+
} else
|
|
3665
|
+
console.log({ targetCandle: J, gapCount: 0 }), O(J), k(0);
|
|
3666
|
+
},
|
|
3667
|
+
!0
|
|
3668
|
+
);
|
|
3669
|
+
});
|
|
3670
|
+
}, [
|
|
3671
|
+
t,
|
|
3672
|
+
r?.timestamp,
|
|
3673
|
+
O,
|
|
3674
|
+
k,
|
|
3675
|
+
l,
|
|
3676
|
+
_,
|
|
3677
|
+
d,
|
|
3678
|
+
s
|
|
2984
3679
|
]), /* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__right_border", children: [
|
|
2985
3680
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__title_container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__title_padding", children: [
|
|
2986
3681
|
/* @__PURE__ */ m.jsx(
|
|
@@ -2988,153 +3683,215 @@ const Zr = ({
|
|
|
2988
3683
|
{
|
|
2989
3684
|
type: "button",
|
|
2990
3685
|
className: "news-widget__button news-widget__button--ghost news-widget__button--icon news-widget_detail_page__back_button",
|
|
2991
|
-
onClick:
|
|
2992
|
-
children: /* @__PURE__ */ m.jsx(
|
|
3686
|
+
onClick: C,
|
|
3687
|
+
children: /* @__PURE__ */ m.jsx(wr, { className: "news-widget_detail_page__back_icon" })
|
|
2993
3688
|
}
|
|
2994
3689
|
),
|
|
2995
3690
|
/* @__PURE__ */ m.jsx("p", { className: "news-widget_detail_page__title_text", children: "Economic Calendar Analysis" })
|
|
2996
3691
|
] }) }),
|
|
2997
|
-
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__event_details", children: /* @__PURE__ */ m.
|
|
3692
|
+
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__event_details", children: /* @__PURE__ */ m.jsxs(Dr, { newsDetail: o, children: [
|
|
3693
|
+
e,
|
|
3694
|
+
_ && /* @__PURE__ */ m.jsx(
|
|
3695
|
+
xr,
|
|
3696
|
+
{
|
|
3697
|
+
replayTabId: t || "news",
|
|
3698
|
+
futureBarsRef: h,
|
|
3699
|
+
highlightBarsRef: y,
|
|
3700
|
+
pushBar: f,
|
|
3701
|
+
tvWidgetRef: U,
|
|
3702
|
+
resolution: l || "15",
|
|
3703
|
+
symbol: d
|
|
3704
|
+
}
|
|
3705
|
+
)
|
|
3706
|
+
] }) })
|
|
2998
3707
|
] }) });
|
|
2999
|
-
},
|
|
3708
|
+
}, be = "https://widget-result-news.iccandle.ai", Ft = "https://corprate-widget.iccandle.ai/news", Pr = ({
|
|
3000
3709
|
chartWidget: e,
|
|
3001
3710
|
children: t,
|
|
3002
3711
|
widgetKey: n,
|
|
3003
|
-
theme: r,
|
|
3004
3712
|
defaultSymbol: s,
|
|
3713
|
+
chartInterval: r = "15",
|
|
3714
|
+
theme: i,
|
|
3005
3715
|
symbolMapper: o,
|
|
3006
|
-
|
|
3716
|
+
pushBar: a,
|
|
3717
|
+
futureRef: p,
|
|
3718
|
+
highlightBarsRef: d,
|
|
3719
|
+
setGapCountExternal: l,
|
|
3720
|
+
setReplayModeExternal: _
|
|
3721
|
+
// setNewsPlayEndTimestampExternal,
|
|
3007
3722
|
}) => {
|
|
3008
|
-
const { start:
|
|
3723
|
+
const { start: E } = Sn(), [C, f] = re(""), [y, h] = re(r), [v, B] = re(s), [U, j] = re(null), [x, V] = re(
|
|
3009
3724
|
null
|
|
3010
|
-
),
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3725
|
+
), {
|
|
3726
|
+
setNewsSelectedCandles: O,
|
|
3727
|
+
setNewsPlayEndTimestamp: k,
|
|
3728
|
+
newsTargetCandle: M,
|
|
3729
|
+
gapCount: Q
|
|
3730
|
+
} = he(), I = or[y] || "M15", N = Ze("60"), F = x?.[0]?.timestamp ? x?.[0]?.timestamp / 1e3 : 0, X = F - F % N, z = x?.[0]?.candleData.H1?.candles, g = z?.findIndex((R) => R.timestamp === X) || 0, T = (z?.length || 0) - g <= 10, q = "next_pip_up_50" in (x?.[0]?.candleData[I]?.metadata ?? {}), Z = !!C && !q, u = ae(Z), w = ae(!1);
|
|
3731
|
+
ie(() => {
|
|
3732
|
+
if (Z !== u.current) {
|
|
3733
|
+
if (u.current = Z, w.current) {
|
|
3734
|
+
w.current = !1;
|
|
3017
3735
|
return;
|
|
3018
3736
|
}
|
|
3019
|
-
|
|
3737
|
+
E();
|
|
3020
3738
|
}
|
|
3021
|
-
}, [
|
|
3022
|
-
const
|
|
3023
|
-
const { data:
|
|
3024
|
-
`${
|
|
3739
|
+
}, [Z, E]), ie(() => {
|
|
3740
|
+
const R = async (L) => {
|
|
3741
|
+
const { data: H, status: P } = await Y.get(
|
|
3742
|
+
`${Ft}/${L}`,
|
|
3025
3743
|
{
|
|
3026
3744
|
headers: { "api-key": n },
|
|
3027
3745
|
params: { symbol: s }
|
|
3028
3746
|
}
|
|
3029
3747
|
);
|
|
3030
|
-
return
|
|
3031
|
-
},
|
|
3032
|
-
const { data:
|
|
3033
|
-
`${
|
|
3748
|
+
return P !== 200 ? (console.error("Failed to fetch news detail"), null) : H;
|
|
3749
|
+
}, A = async (L) => {
|
|
3750
|
+
const { data: H, status: P } = await Y.get(
|
|
3751
|
+
`${Ft}/similar-details`,
|
|
3034
3752
|
{
|
|
3035
3753
|
headers: { "api-key": n },
|
|
3036
|
-
params: { event_id:
|
|
3754
|
+
params: { event_id: L }
|
|
3037
3755
|
}
|
|
3038
3756
|
);
|
|
3039
|
-
return
|
|
3757
|
+
return P !== 200 ? (console.error("Failed to fetch compared news"), null) : H;
|
|
3040
3758
|
};
|
|
3041
3759
|
(async () => {
|
|
3042
|
-
if (
|
|
3043
|
-
const [
|
|
3044
|
-
|
|
3045
|
-
|
|
3760
|
+
if (C === "") return;
|
|
3761
|
+
const [L, H] = await Promise.all([
|
|
3762
|
+
R(C),
|
|
3763
|
+
A(C)
|
|
3046
3764
|
]);
|
|
3047
|
-
|
|
3765
|
+
L && j(L), H && V(H);
|
|
3048
3766
|
})();
|
|
3049
|
-
}, [n,
|
|
3050
|
-
const
|
|
3051
|
-
|
|
3052
|
-
}, [
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3767
|
+
}, [n, C, s]);
|
|
3768
|
+
const S = Fe(() => {
|
|
3769
|
+
_(!1), l(0), O(null), k(null);
|
|
3770
|
+
}, [
|
|
3771
|
+
_,
|
|
3772
|
+
l,
|
|
3773
|
+
O,
|
|
3774
|
+
k
|
|
3775
|
+
]), D = Fe(() => {
|
|
3776
|
+
f(""), B(s), S();
|
|
3777
|
+
}, [s, S]);
|
|
3778
|
+
ie(() => {
|
|
3779
|
+
const R = async ({ origin: A, data: G }) => {
|
|
3780
|
+
if (A !== be || typeof G != "string") return;
|
|
3781
|
+
const L = JSON.parse(G);
|
|
3782
|
+
if (console.log({ action: L.action }), L.action == "back")
|
|
3783
|
+
D();
|
|
3784
|
+
else if (L.action == "back-to-similar-events")
|
|
3785
|
+
S();
|
|
3786
|
+
else if (L.action == "eventClicked") {
|
|
3787
|
+
w.current = !0, E();
|
|
3788
|
+
const P = L.data.event, ne = e?.activeChart();
|
|
3789
|
+
await e?.headerReady(), ne?.clearMarks(2), localStorage.setItem(
|
|
3063
3790
|
"iccandle:current-news-event",
|
|
3064
3791
|
JSON.stringify({
|
|
3065
|
-
actual:
|
|
3066
|
-
event_name:
|
|
3067
|
-
forecast:
|
|
3068
|
-
id:
|
|
3069
|
-
metric:
|
|
3070
|
-
previous:
|
|
3071
|
-
timestamp:
|
|
3072
|
-
currency:
|
|
3792
|
+
actual: P.actual,
|
|
3793
|
+
event_name: P.event_name,
|
|
3794
|
+
forecast: P.forecast,
|
|
3795
|
+
id: P.id,
|
|
3796
|
+
metric: P.metric,
|
|
3797
|
+
previous: P.previous,
|
|
3798
|
+
timestamp: P.timestamp,
|
|
3799
|
+
currency: P.currency
|
|
3073
3800
|
})
|
|
3074
|
-
),
|
|
3075
|
-
} else if (
|
|
3076
|
-
const
|
|
3077
|
-
if (
|
|
3078
|
-
|
|
3079
|
-
const
|
|
3080
|
-
|
|
3801
|
+
), ne?.refreshMarks(), f(P.id);
|
|
3802
|
+
} else if (L.action == "intervalChanged" || L.action == "symbolChanged") {
|
|
3803
|
+
const H = L.data;
|
|
3804
|
+
if (H.type === 2) return;
|
|
3805
|
+
h(H.resolution);
|
|
3806
|
+
const P = o?.[H.symbol] ?? s;
|
|
3807
|
+
B(P);
|
|
3808
|
+
} else if (L.action == "replay") {
|
|
3809
|
+
const H = L.data;
|
|
3810
|
+
console.log({
|
|
3811
|
+
replayData: H,
|
|
3812
|
+
gapCount: Q,
|
|
3813
|
+
ts: M?.[M.length - 1]?.timestamp ?? null
|
|
3814
|
+
}), _(H.isReplay), l(Q), O(H.selectedCandles), k(
|
|
3815
|
+
M?.[M.length - 1]?.timestamp ?? null
|
|
3816
|
+
);
|
|
3081
3817
|
}
|
|
3082
3818
|
};
|
|
3083
|
-
return window.addEventListener("message",
|
|
3084
|
-
}, [
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3819
|
+
return window.addEventListener("message", R), () => window.removeEventListener("message", R);
|
|
3820
|
+
}, [
|
|
3821
|
+
M,
|
|
3822
|
+
Q,
|
|
3823
|
+
e,
|
|
3824
|
+
s,
|
|
3825
|
+
E,
|
|
3826
|
+
S,
|
|
3827
|
+
D,
|
|
3828
|
+
o,
|
|
3829
|
+
// setCurrentSymbolCompared,
|
|
3830
|
+
// setSelectedTimeframeCompared,
|
|
3831
|
+
_,
|
|
3832
|
+
l,
|
|
3833
|
+
k,
|
|
3834
|
+
O
|
|
3835
|
+
// setNewsPlayEndTimestampExternal,
|
|
3836
|
+
]);
|
|
3837
|
+
const $ = Se(() => {
|
|
3838
|
+
const R = x?.[0]?.candleData?.[I]?.metadata;
|
|
3839
|
+
return R ? [...pn].sort((A, G) => G - A).find((A) => [
|
|
3840
|
+
`next_pip_up_${A}`,
|
|
3841
|
+
`next_pip_down_${A}`
|
|
3090
3842
|
].some(
|
|
3091
|
-
(
|
|
3843
|
+
(L) => R[L] !== void 0
|
|
3092
3844
|
)) ?? null : null;
|
|
3093
|
-
}, [
|
|
3094
|
-
|
|
3095
|
-
const
|
|
3096
|
-
|
|
3845
|
+
}, [x, I]);
|
|
3846
|
+
ie(() => {
|
|
3847
|
+
const R = () => {
|
|
3848
|
+
D();
|
|
3097
3849
|
};
|
|
3098
|
-
return window.addEventListener("popstate",
|
|
3099
|
-
}, [
|
|
3100
|
-
const
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3850
|
+
return window.addEventListener("popstate", R), () => window.removeEventListener("popstate", R);
|
|
3851
|
+
}, [D]);
|
|
3852
|
+
const W = Se(() => C ? x ? q ? `${be}/${C}?apiKey=${n}&theme=${i}&interval=${y}&symbol=${v}` : `${be}/similar-events/${C}?apiKey=${n}&theme=${i}` : `${be}?apiKey=${n}&theme=${i}` : `${be}?apiKey=${n}&theme=${i}`, [
|
|
3853
|
+
C,
|
|
3854
|
+
x,
|
|
3855
|
+
q,
|
|
3104
3856
|
n,
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3857
|
+
i,
|
|
3858
|
+
y,
|
|
3859
|
+
v
|
|
3108
3860
|
]);
|
|
3109
3861
|
return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_main__container news-widget_main__container--lg", children: [
|
|
3110
3862
|
/* @__PURE__ */ m.jsx(
|
|
3111
3863
|
"div",
|
|
3112
3864
|
{
|
|
3113
3865
|
className: "news-widget_main__left",
|
|
3114
|
-
style: { display:
|
|
3866
|
+
style: { display: C && !q ? "flex" : "none" },
|
|
3115
3867
|
children: /* @__PURE__ */ m.jsx(
|
|
3116
|
-
|
|
3868
|
+
cr,
|
|
3117
3869
|
{
|
|
3118
|
-
selectedTimeframe:
|
|
3119
|
-
setSelectedTimeframe:
|
|
3120
|
-
currentSymbol:
|
|
3121
|
-
setCurrentSymbol:
|
|
3870
|
+
selectedTimeframe: y,
|
|
3871
|
+
setSelectedTimeframe: h,
|
|
3872
|
+
currentSymbol: v,
|
|
3873
|
+
setCurrentSymbol: B,
|
|
3122
3874
|
children: /* @__PURE__ */ m.jsx(
|
|
3123
|
-
|
|
3875
|
+
Lr,
|
|
3124
3876
|
{
|
|
3125
|
-
eventId:
|
|
3877
|
+
eventId: C,
|
|
3126
3878
|
chartWidget: e,
|
|
3127
3879
|
widgetKey: n,
|
|
3128
|
-
theme:
|
|
3880
|
+
theme: i,
|
|
3129
3881
|
defaultSymbol: s,
|
|
3130
|
-
newsDetail:
|
|
3131
|
-
isUpcoming:
|
|
3132
|
-
event:
|
|
3133
|
-
selectedCandles:
|
|
3134
|
-
currentTimeFrame:
|
|
3135
|
-
currentSymbol:
|
|
3136
|
-
onBack:
|
|
3137
|
-
isElapsed:
|
|
3882
|
+
newsDetail: U,
|
|
3883
|
+
isUpcoming: T,
|
|
3884
|
+
event: U?.event,
|
|
3885
|
+
selectedCandles: $,
|
|
3886
|
+
currentTimeFrame: y,
|
|
3887
|
+
currentSymbol: v,
|
|
3888
|
+
onBack: D,
|
|
3889
|
+
isElapsed: q,
|
|
3890
|
+
pushBar: a,
|
|
3891
|
+
futureRef: p,
|
|
3892
|
+
highlightBarsRef: d,
|
|
3893
|
+
setReplayModeExternal: _,
|
|
3894
|
+
setGapCountExternal: l,
|
|
3138
3895
|
children: t
|
|
3139
3896
|
}
|
|
3140
3897
|
)
|
|
@@ -3145,25 +3902,25 @@ const Zr = ({
|
|
|
3145
3902
|
/* @__PURE__ */ m.jsx(
|
|
3146
3903
|
"iframe",
|
|
3147
3904
|
{
|
|
3148
|
-
src:
|
|
3149
|
-
className:
|
|
3905
|
+
src: W,
|
|
3906
|
+
className: C && !q ? "news-widget_main__iframe_half" : "news-widget_main__iframe_full"
|
|
3150
3907
|
}
|
|
3151
3908
|
)
|
|
3152
3909
|
] });
|
|
3153
|
-
},
|
|
3154
|
-
function
|
|
3910
|
+
}, Or = "https://api.iccandle.ai", kr = '"Inter Tight", ui-sans-serif, system-ui, sans-serif';
|
|
3911
|
+
function jt(e) {
|
|
3155
3912
|
return {
|
|
3156
3913
|
iccandle_primary: e.iccandle_primary,
|
|
3157
3914
|
iccandle_border: e.iccandle_border,
|
|
3158
3915
|
iccandle_text: e.iccandle_text,
|
|
3159
3916
|
iccandle_background: e.iccandle_background,
|
|
3160
3917
|
iccandle_primary_gradient_end: e.iccandle_primary_gradient_end,
|
|
3161
|
-
iccandle_font: e.icc_font ?? e.iccandle_font ??
|
|
3918
|
+
iccandle_font: e.icc_font ?? e.iccandle_font ?? kr
|
|
3162
3919
|
};
|
|
3163
3920
|
}
|
|
3164
|
-
const
|
|
3921
|
+
const Fr = async (e) => {
|
|
3165
3922
|
const t = await fetch(
|
|
3166
|
-
`${
|
|
3923
|
+
`${Or}/corporate-client/v1/widgetStyle/search/user/?service_type=news`,
|
|
3167
3924
|
{ headers: { "api-key": e } }
|
|
3168
3925
|
);
|
|
3169
3926
|
if (!t.ok)
|
|
@@ -3171,10 +3928,10 @@ const os = async (e) => {
|
|
|
3171
3928
|
const n = await t.json();
|
|
3172
3929
|
return {
|
|
3173
3930
|
...n,
|
|
3174
|
-
dark:
|
|
3175
|
-
light:
|
|
3931
|
+
dark: jt(n.dark),
|
|
3932
|
+
light: jt(n.light)
|
|
3176
3933
|
};
|
|
3177
|
-
},
|
|
3934
|
+
}, Bt = {
|
|
3178
3935
|
iccandle_font: "--iccandle-font",
|
|
3179
3936
|
iccandle_primary: "--iccandle-primary",
|
|
3180
3937
|
iccandle_border: "--iccandle-border",
|
|
@@ -3182,46 +3939,46 @@ const os = async (e) => {
|
|
|
3182
3939
|
iccandle_background: "--iccandle-background",
|
|
3183
3940
|
iccandle_primary_gradient_end: "--iccandle-primary-gradient-end"
|
|
3184
3941
|
};
|
|
3185
|
-
function
|
|
3186
|
-
const [n,
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3942
|
+
function jr(e, t) {
|
|
3943
|
+
const [n, s] = re(null);
|
|
3944
|
+
ie(() => {
|
|
3945
|
+
Fr(e).then((d) => {
|
|
3946
|
+
s(d);
|
|
3190
3947
|
});
|
|
3191
3948
|
}, [e]);
|
|
3192
|
-
const
|
|
3949
|
+
const r = ae(null), [i, o] = re(null), a = Se(() => t === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : t, [t]), p = Se(() => {
|
|
3193
3950
|
if (n)
|
|
3194
3951
|
return a === "dark" ? n.dark : n.light;
|
|
3195
3952
|
}, [n, a]);
|
|
3196
|
-
return
|
|
3197
|
-
if (typeof window > "u" || !p || !
|
|
3198
|
-
const d =
|
|
3199
|
-
Object.keys(
|
|
3200
|
-
(
|
|
3953
|
+
return ie(() => {
|
|
3954
|
+
if (typeof window > "u" || !p || !i) return;
|
|
3955
|
+
const d = i;
|
|
3956
|
+
Object.keys(Bt).forEach(
|
|
3957
|
+
(l) => {
|
|
3201
3958
|
d.style.setProperty(
|
|
3202
|
-
|
|
3203
|
-
p[
|
|
3959
|
+
Bt[l],
|
|
3960
|
+
p[l]
|
|
3204
3961
|
);
|
|
3205
3962
|
}
|
|
3206
3963
|
);
|
|
3207
|
-
}, [p,
|
|
3964
|
+
}, [p, i]), { rootRef: r, setRootEl: o, resolvedTheme: a };
|
|
3208
3965
|
}
|
|
3209
|
-
const
|
|
3210
|
-
const { rootRef: t, setRootEl: n, resolvedTheme:
|
|
3966
|
+
const ri = (e) => {
|
|
3967
|
+
const { rootRef: t, setRootEl: n, resolvedTheme: s } = jr(
|
|
3211
3968
|
e.widgetKey,
|
|
3212
3969
|
e.theme
|
|
3213
3970
|
);
|
|
3214
3971
|
return /* @__PURE__ */ m.jsx(
|
|
3215
3972
|
"div",
|
|
3216
3973
|
{
|
|
3217
|
-
ref: (
|
|
3218
|
-
t.current =
|
|
3974
|
+
ref: (r) => {
|
|
3975
|
+
t.current = r, n(r);
|
|
3219
3976
|
},
|
|
3220
|
-
className: `news-widget__container news-widget ${
|
|
3221
|
-
children: /* @__PURE__ */ m.jsx(
|
|
3977
|
+
className: `news-widget__container news-widget ${s === "dark" ? "dark" : ""}`,
|
|
3978
|
+
children: /* @__PURE__ */ m.jsx(An, { theme: s, children: /* @__PURE__ */ m.jsx(Pr, { ...e, children: e.children }) })
|
|
3222
3979
|
}
|
|
3223
3980
|
);
|
|
3224
3981
|
};
|
|
3225
3982
|
export {
|
|
3226
|
-
|
|
3983
|
+
ri as NewsWidget
|
|
3227
3984
|
};
|