@iccandle/news 0.0.9 → 0.0.11

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.
@@ -1,10 +1,10 @@
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 Te, { createContext as $t, useContext as Gt, useState as le, useRef as fe, useCallback as Me, useEffect as me, useMemo as Ne, forwardRef as Jt, createElement as ze } from "react";
3
- var ke = { exports: {} }, Se = {};
4
- var mt;
2
+ import Te, { createContext as Gt, useContext as Jt, useState as de, useRef as me, useCallback as He, useEffect as _e, useMemo as ve, forwardRef as Xt, createElement as Ze } from "react";
3
+ var Fe = { exports: {} }, De = {};
4
+ var _t;
5
5
  function En() {
6
- if (mt) return Se;
7
- mt = 1;
6
+ if (_t) return De;
7
+ _t = 1;
8
8
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
9
9
  function n(s, r, i) {
10
10
  var o = null;
@@ -21,274 +21,274 @@ function En() {
21
21
  props: i
22
22
  };
23
23
  }
24
- return Se.Fragment = t, Se.jsx = n, Se.jsxs = n, Se;
24
+ return De.Fragment = t, De.jsx = n, De.jsxs = n, De;
25
25
  }
26
- var De = {};
27
- var _t;
28
- function Sn() {
29
- return _t || (_t = 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 === q ? null : u.displayName || u.name || null;
34
- if (typeof u == "string") return u;
35
- switch (u) {
36
- case h:
26
+ var Ae = {};
27
+ var ht;
28
+ function Dn() {
29
+ return ht || (ht = 1, process.env.NODE_ENV !== "production" && (function() {
30
+ function e(l) {
31
+ if (l == null) return null;
32
+ if (typeof l == "function")
33
+ return l.$$typeof === Q ? null : l.displayName || l.name || null;
34
+ if (typeof l == "string") return l;
35
+ switch (l) {
36
+ case _:
37
37
  return "Fragment";
38
- case G:
38
+ case P:
39
39
  return "Profiler";
40
- case S:
40
+ case D:
41
41
  return "StrictMode";
42
- case k:
42
+ case V:
43
43
  return "Suspense";
44
- case Y:
44
+ case N:
45
45
  return "SuspenseList";
46
- case X:
46
+ case k:
47
47
  return "Activity";
48
48
  }
49
- if (typeof u == "object")
50
- switch (typeof u.tag == "number" && console.error(
49
+ if (typeof l == "object")
50
+ switch (typeof l.tag == "number" && console.error(
51
51
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
52
- ), u.$$typeof) {
52
+ ), l.$$typeof) {
53
53
  case w:
54
54
  return "Portal";
55
+ case x:
56
+ return l.displayName || "Context";
55
57
  case L:
56
- return u.displayName || "Context";
57
- case v:
58
- return (u._context.displayName || "Context") + ".Consumer";
59
- case J:
60
- var y = u.render;
61
- return u = u.displayName, u || (u = y.displayName || y.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
62
- case ne:
63
- return y = u.displayName || null, y !== null ? y : e(u.type) || "Memo";
58
+ return (l._context.displayName || "Context") + ".Consumer";
59
+ case B:
60
+ var y = l.render;
61
+ return l = l.displayName, l || (l = y.displayName || y.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
62
+ case ae:
63
+ return y = l.displayName || null, y !== null ? y : e(l.type) || "Memo";
64
64
  case W:
65
- y = u._payload, u = u._init;
65
+ y = l._payload, l = l._init;
66
66
  try {
67
- return e(u(y));
67
+ return e(l(y));
68
68
  } catch {
69
69
  }
70
70
  }
71
71
  return null;
72
72
  }
73
- function t(u) {
74
- return "" + u;
73
+ function t(l) {
74
+ return "" + l;
75
75
  }
76
- function n(u) {
76
+ function n(l) {
77
77
  try {
78
- t(u);
78
+ t(l);
79
79
  var y = !1;
80
80
  } catch {
81
81
  y = !0;
82
82
  }
83
83
  if (y) {
84
84
  y = console;
85
- var A = y.error, R = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
85
+ var A = y.error, T = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
86
86
  return A.call(
87
87
  y,
88
88
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
89
- R
90
- ), t(u);
89
+ T
90
+ ), t(l);
91
91
  }
92
92
  }
93
- function s(u) {
94
- if (u === h) return "<>";
95
- if (typeof u == "object" && u !== null && u.$$typeof === W)
93
+ function s(l) {
94
+ if (l === _) return "<>";
95
+ if (typeof l == "object" && l !== null && l.$$typeof === W)
96
96
  return "<...>";
97
97
  try {
98
- var y = e(u);
98
+ var y = e(l);
99
99
  return y ? "<" + y + ">" : "<...>";
100
100
  } catch {
101
101
  return "<...>";
102
102
  }
103
103
  }
104
104
  function r() {
105
- var u = Z.A;
106
- return u === null ? null : u.getOwner();
105
+ var l = Y.A;
106
+ return l === null ? null : l.getOwner();
107
107
  }
108
108
  function i() {
109
109
  return Error("react-stack-top-frame");
110
110
  }
111
- function o(u) {
112
- if (O.call(u, "key")) {
113
- var y = Object.getOwnPropertyDescriptor(u, "key").get;
111
+ function o(l) {
112
+ if (Z.call(l, "key")) {
113
+ var y = Object.getOwnPropertyDescriptor(l, "key").get;
114
114
  if (y && y.isReactWarning) return !1;
115
115
  }
116
- return u.key !== void 0;
116
+ return l.key !== void 0;
117
117
  }
118
- function a(u, y) {
118
+ function a(l, y) {
119
119
  function A() {
120
- x || (x = !0, console.error(
120
+ U || (U = !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
  y
123
123
  ));
124
124
  }
125
- A.isReactWarning = !0, Object.defineProperty(u, "key", {
125
+ A.isReactWarning = !0, Object.defineProperty(l, "key", {
126
126
  get: A,
127
127
  configurable: !0
128
128
  });
129
129
  }
130
130
  function f() {
131
- var u = e(this.type);
132
- return se[u] || (se[u] = !0, console.error(
131
+ var l = e(this.type);
132
+ return ne[l] || (ne[l] = !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
- )), u = this.props.ref, u !== void 0 ? u : null;
134
+ )), l = this.props.ref, l !== void 0 ? l : null;
135
135
  }
136
- function d(u, y, A, R, j, I) {
137
- var U = A.ref;
138
- return u = {
136
+ function u(l, y, A, T, F, J) {
137
+ var S = A.ref;
138
+ return l = {
139
139
  $$typeof: p,
140
- type: u,
140
+ type: l,
141
141
  key: y,
142
142
  props: A,
143
- _owner: R
144
- }, (U !== void 0 ? U : null) !== null ? Object.defineProperty(u, "ref", {
143
+ _owner: T
144
+ }, (S !== void 0 ? S : null) !== null ? Object.defineProperty(l, "ref", {
145
145
  enumerable: !1,
146
146
  get: f
147
- }) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
147
+ }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
148
148
  configurable: !1,
149
149
  enumerable: !1,
150
150
  writable: !0,
151
151
  value: 0
152
- }), Object.defineProperty(u, "_debugInfo", {
152
+ }), Object.defineProperty(l, "_debugInfo", {
153
153
  configurable: !1,
154
154
  enumerable: !1,
155
155
  writable: !0,
156
156
  value: null
157
- }), Object.defineProperty(u, "_debugStack", {
157
+ }), Object.defineProperty(l, "_debugStack", {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
- value: j
162
- }), Object.defineProperty(u, "_debugTask", {
161
+ value: F
162
+ }), Object.defineProperty(l, "_debugTask", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: I
167
- }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
166
+ value: J
167
+ }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
168
168
  }
169
- function l(u, y, A, R, j, I) {
170
- var U = y.children;
171
- if (U !== void 0)
172
- if (R)
173
- if (D(U)) {
174
- for (R = 0; R < U.length; R++)
175
- _(U[R]);
176
- Object.freeze && Object.freeze(U);
169
+ function d(l, y, A, T, F, J) {
170
+ var S = y.children;
171
+ if (S !== void 0)
172
+ if (T)
173
+ if (E(S)) {
174
+ for (T = 0; T < S.length; T++)
175
+ h(S[T]);
176
+ Object.freeze && Object.freeze(S);
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 _(U);
182
- if (O.call(y, "key")) {
183
- U = e(u);
184
- var B = Object.keys(y).filter(function(V) {
185
- return V !== "key";
181
+ else h(S);
182
+ if (Z.call(y, "key")) {
183
+ S = e(l);
184
+ var X = Object.keys(y).filter(function(v) {
185
+ return v !== "key";
186
186
  });
187
- R = 0 < B.length ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}", T[U + R] || (B = 0 < B.length ? "{" + B.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ T = 0 < X.length ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}", G[S + T] || (X = 0 < X.length ? "{" + X.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
- R,
195
- U,
196
- B,
197
- U
198
- ), T[U + R] = !0);
194
+ T,
195
+ S,
196
+ X,
197
+ S
198
+ ), G[S + T] = !0);
199
199
  }
200
- if (U = null, A !== void 0 && (n(A), U = "" + A), o(y) && (n(y.key), U = "" + y.key), "key" in y) {
200
+ if (S = null, A !== void 0 && (n(A), S = "" + A), o(y) && (n(y.key), S = "" + y.key), "key" in y) {
201
201
  A = {};
202
- for (var N in y)
203
- N !== "key" && (A[N] = y[N]);
202
+ for (var M in y)
203
+ M !== "key" && (A[M] = y[M]);
204
204
  } else A = y;
205
- return U && a(
205
+ return S && a(
206
206
  A,
207
- typeof u == "function" ? u.displayName || u.name || "Unknown" : u
208
- ), d(
209
- u,
210
- U,
207
+ typeof l == "function" ? l.displayName || l.name || "Unknown" : l
208
+ ), u(
209
+ l,
210
+ S,
211
211
  A,
212
212
  r(),
213
- j,
214
- I
213
+ F,
214
+ J
215
215
  );
216
216
  }
217
- function _(u) {
218
- C(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === W && (u._payload.status === "fulfilled" ? C(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
217
+ function h(l) {
218
+ g(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === W && (l._payload.status === "fulfilled" ? g(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
219
219
  }
220
- function C(u) {
221
- return typeof u == "object" && u !== null && u.$$typeof === p;
220
+ function g(l) {
221
+ return typeof l == "object" && l !== null && l.$$typeof === p;
222
222
  }
223
- var E = Te, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), h = /* @__PURE__ */ Symbol.for("react.fragment"), S = /* @__PURE__ */ Symbol.for("react.strict_mode"), G = /* @__PURE__ */ Symbol.for("react.profiler"), v = /* @__PURE__ */ Symbol.for("react.consumer"), L = /* @__PURE__ */ Symbol.for("react.context"), J = /* @__PURE__ */ Symbol.for("react.forward_ref"), k = /* @__PURE__ */ Symbol.for("react.suspense"), Y = /* @__PURE__ */ Symbol.for("react.suspense_list"), ne = /* @__PURE__ */ Symbol.for("react.memo"), W = /* @__PURE__ */ Symbol.for("react.lazy"), X = /* @__PURE__ */ Symbol.for("react.activity"), q = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, D = Array.isArray, F = console.createTask ? console.createTask : function() {
223
+ var R = Te, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), _ = /* @__PURE__ */ Symbol.for("react.fragment"), D = /* @__PURE__ */ Symbol.for("react.strict_mode"), P = /* @__PURE__ */ Symbol.for("react.profiler"), L = /* @__PURE__ */ Symbol.for("react.consumer"), x = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), V = /* @__PURE__ */ Symbol.for("react.suspense"), N = /* @__PURE__ */ Symbol.for("react.suspense_list"), ae = /* @__PURE__ */ Symbol.for("react.memo"), W = /* @__PURE__ */ Symbol.for("react.lazy"), k = /* @__PURE__ */ Symbol.for("react.activity"), Q = /* @__PURE__ */ Symbol.for("react.client.reference"), Y = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, E = Array.isArray, I = console.createTask ? console.createTask : function() {
224
224
  return null;
225
225
  };
226
- E = {
227
- react_stack_bottom_frame: function(u) {
228
- return u();
226
+ R = {
227
+ react_stack_bottom_frame: function(l) {
228
+ return l();
229
229
  }
230
230
  };
231
- var x, se = {}, g = E.react_stack_bottom_frame.bind(
232
- E,
231
+ var U, ne = {}, $ = R.react_stack_bottom_frame.bind(
232
+ R,
233
233
  i
234
- )(), H = F(s(i)), T = {};
235
- De.Fragment = h, De.jsx = function(u, y, A) {
236
- var R = 1e4 > Z.recentlyCreatedOwnerStacks++;
237
- return l(
238
- u,
234
+ )(), b = I(s(i)), G = {};
235
+ Ae.Fragment = _, Ae.jsx = function(l, y, A) {
236
+ var T = 1e4 > Y.recentlyCreatedOwnerStacks++;
237
+ return d(
238
+ l,
239
239
  y,
240
240
  A,
241
241
  !1,
242
- R ? Error("react-stack-top-frame") : g,
243
- R ? F(s(u)) : H
242
+ T ? Error("react-stack-top-frame") : $,
243
+ T ? I(s(l)) : b
244
244
  );
245
- }, De.jsxs = function(u, y, A) {
246
- var R = 1e4 > Z.recentlyCreatedOwnerStacks++;
247
- return l(
248
- u,
245
+ }, Ae.jsxs = function(l, y, A) {
246
+ var T = 1e4 > Y.recentlyCreatedOwnerStacks++;
247
+ return d(
248
+ l,
249
249
  y,
250
250
  A,
251
251
  !0,
252
- R ? Error("react-stack-top-frame") : g,
253
- R ? F(s(u)) : H
252
+ T ? Error("react-stack-top-frame") : $,
253
+ T ? I(s(l)) : b
254
254
  );
255
255
  };
256
- })()), De;
256
+ })()), Ae;
257
257
  }
258
- var ht;
259
- function Dn() {
260
- return ht || (ht = 1, process.env.NODE_ENV === "production" ? ke.exports = En() : ke.exports = Sn()), ke.exports;
261
- }
262
- var m = Dn();
263
- const Xt = $t(null);
258
+ var wt;
264
259
  function An() {
265
- const e = Gt(Xt);
260
+ return wt || (wt = 1, process.env.NODE_ENV === "production" ? Fe.exports = En() : Fe.exports = Dn()), Fe.exports;
261
+ }
262
+ var m = An();
263
+ const qt = Gt(null);
264
+ function Un() {
265
+ const e = Jt(qt);
266
266
  if (!e)
267
267
  throw new Error("useCtaLoader must be used within CtaLoaderProvider");
268
268
  return e;
269
269
  }
270
- const wt = 1100, Un = 180;
270
+ const yt = 1100, Nn = 180;
271
271
  function Tn({
272
272
  children: e,
273
273
  theme: t
274
274
  }) {
275
- const [n, s] = le(!1), [r, i] = le(!1), [o, a] = le(0), f = fe(null), d = fe(null), l = Me(() => {
276
- f.current && window.clearTimeout(f.current), f.current = null, d.current && window.clearTimeout(d.current), d.current = null, d.current = window.setTimeout(() => {
277
- d.current = null, s(!1), i(!1);
278
- }, Un);
279
- }, []), _ = Me(() => {
280
- f.current && window.clearTimeout(f.current), f.current = null, d.current && window.clearTimeout(d.current), d.current = null, a((p) => p + 1), i(!1), s(!0), requestAnimationFrame(
275
+ const [n, s] = de(!1), [r, i] = de(!1), [o, a] = de(0), f = me(null), u = me(null), d = He(() => {
276
+ f.current && window.clearTimeout(f.current), f.current = null, u.current && window.clearTimeout(u.current), u.current = null, u.current = window.setTimeout(() => {
277
+ u.current = null, s(!1), i(!1);
278
+ }, Nn);
279
+ }, []), h = He(() => {
280
+ f.current && window.clearTimeout(f.current), f.current = null, u.current && window.clearTimeout(u.current), u.current = null, a((p) => p + 1), i(!1), s(!0), requestAnimationFrame(
281
281
  () => requestAnimationFrame(() => i(!0))
282
282
  ), f.current = window.setTimeout(() => {
283
- f.current = null, l();
284
- }, wt);
285
- }, [l]);
286
- me(() => l, [l]);
287
- const C = Ne(
288
- () => ({ start: _, stop: l, visible: n }),
289
- [_, l, n]
290
- ), E = 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(Xt.Provider, { value: C, children: [
283
+ f.current = null, d();
284
+ }, yt);
285
+ }, [d]);
286
+ _e(() => d, [d]);
287
+ const g = ve(
288
+ () => ({ start: h, stop: d, visible: n }),
289
+ [h, d, n]
290
+ ), R = 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(qt.Provider, { value: g, 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 Tn({
300
300
  playsInline: !0,
301
301
  preload: "auto",
302
302
  className: "cta-loader__video",
303
- children: /* @__PURE__ */ m.jsx("source", { src: E, type: "video/webm" })
303
+ children: /* @__PURE__ */ m.jsx("source", { src: R, 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(
@@ -309,7 +309,7 @@ function Tn({
309
309
  className: "cta-loader__bar-fill",
310
310
  style: {
311
311
  transform: r ? "scaleX(1)" : "scaleX(0)",
312
- transition: `transform ${wt}ms linear`
312
+ transition: `transform ${yt}ms linear`
313
313
  }
314
314
  },
315
315
  o
@@ -317,47 +317,47 @@ function Tn({
317
317
  ] }) })
318
318
  ] });
319
319
  }
320
- function qt(e, t) {
320
+ function Vt(e, t) {
321
321
  return function() {
322
322
  return e.apply(t, arguments);
323
323
  };
324
324
  }
325
- const { toString: Nn } = Object.prototype, { getPrototypeOf: it } = Object, { iterator: Ie, toStringTag: Vt } = Symbol, $e = /* @__PURE__ */ ((e) => (t) => {
326
- const n = Nn.call(t);
325
+ const { toString: vn } = Object.prototype, { getPrototypeOf: ot } = Object, { iterator: $e, toStringTag: Kt } = Symbol, Ge = /* @__PURE__ */ ((e) => (t) => {
326
+ const n = vn.call(t);
327
327
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
328
- })(/* @__PURE__ */ Object.create(null)), _e = (e) => (e = e.toLowerCase(), (t) => $e(t) === e), Ge = (e) => (t) => typeof t === e, { isArray: Ee } = Array, Re = Ge("undefined");
329
- function ve(e) {
330
- return e !== null && !Re(e) && e.constructor !== null && !Re(e.constructor) && ie(e.constructor.isBuffer) && e.constructor.isBuffer(e);
328
+ })(/* @__PURE__ */ Object.create(null)), he = (e) => (e = e.toLowerCase(), (t) => Ge(t) === e), Je = (e) => (t) => typeof t === e, { isArray: Ee } = Array, Se = Je("undefined");
329
+ function xe(e) {
330
+ return e !== null && !Se(e) && e.constructor !== null && !Se(e.constructor) && ie(e.constructor.isBuffer) && e.constructor.isBuffer(e);
331
331
  }
332
- const Kt = _e("ArrayBuffer");
333
- function vn(e) {
332
+ const zt = he("ArrayBuffer");
333
+ function xn(e) {
334
334
  let t;
335
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Kt(e.buffer), t;
335
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && zt(e.buffer), t;
336
336
  }
337
- const xn = Ge("string"), ie = Ge("function"), zt = Ge("number"), xe = (e) => e !== null && typeof e == "object", Ln = (e) => e === !0 || e === !1, je = (e) => {
338
- if ($e(e) !== "object")
337
+ const Ln = Je("string"), ie = Je("function"), Zt = Je("number"), Le = (e) => e !== null && typeof e == "object", On = (e) => e === !0 || e === !1, Be = (e) => {
338
+ if (Ge(e) !== "object")
339
339
  return !1;
340
- const t = it(e);
341
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Vt in e) && !(Ie in e);
340
+ const t = ot(e);
341
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Kt in e) && !($e in e);
342
342
  }, Pn = (e) => {
343
- if (!xe(e) || ve(e))
343
+ if (!Le(e) || xe(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
- }, On = _e("Date"), kn = _e("File"), Fn = _e("Blob"), jn = _e("FileList"), Bn = (e) => xe(e) && ie(e.pipe), Yn = (e) => {
350
+ }, kn = he("Date"), Fn = he("File"), jn = he("Blob"), Bn = he("FileList"), Yn = (e) => Le(e) && ie(e.pipe), Mn = (e) => {
351
351
  let t;
352
- return e && (typeof FormData == "function" && e instanceof FormData || ie(e.append) && ((t = $e(e)) === "formdata" || // detect form-data instance
352
+ return e && (typeof FormData == "function" && e instanceof FormData || ie(e.append) && ((t = Ge(e)) === "formdata" || // detect form-data instance
353
353
  t === "object" && ie(e.toString) && e.toString() === "[object FormData]"));
354
- }, Mn = _e("URLSearchParams"), [Hn, In, $n, Gn] = [
354
+ }, Hn = he("URLSearchParams"), [In, $n, Gn, Jn] = [
355
355
  "ReadableStream",
356
356
  "Request",
357
357
  "Response",
358
358
  "Headers"
359
- ].map(_e), Jn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
360
- function Le(e, t, { allOwnKeys: n = !1 } = {}) {
359
+ ].map(he), Xn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
360
+ function Oe(e, t, { allOwnKeys: n = !1 } = {}) {
361
361
  if (e === null || typeof e > "u")
362
362
  return;
363
363
  let s, r;
@@ -365,7 +365,7 @@ function Le(e, t, { allOwnKeys: n = !1 } = {}) {
365
365
  for (s = 0, r = e.length; s < r; s++)
366
366
  t.call(null, e[s], s, e);
367
367
  else {
368
- if (ve(e))
368
+ if (xe(e))
369
369
  return;
370
370
  const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
371
371
  let a;
@@ -373,8 +373,8 @@ function Le(e, t, { allOwnKeys: n = !1 } = {}) {
373
373
  a = i[s], t.call(null, e[a], a, e);
374
374
  }
375
375
  }
376
- function Zt(e, t) {
377
- if (ve(e))
376
+ function Wt(e, t) {
377
+ if (xe(e))
378
378
  return null;
379
379
  t = t.toLowerCase();
380
380
  const n = Object.keys(e);
@@ -384,23 +384,23 @@ function Zt(e, t) {
384
384
  return r;
385
385
  return null;
386
386
  }
387
- const we = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wt = (e) => !Re(e) && e !== we;
388
- function Ze() {
389
- const { caseless: e, skipUndefined: t } = Wt(this) && this || {}, n = {}, s = (r, i) => {
387
+ const ye = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Qt = (e) => !Se(e) && e !== ye;
388
+ function We() {
389
+ const { caseless: e, skipUndefined: t } = Qt(this) && this || {}, n = {}, s = (r, i) => {
390
390
  if (i === "__proto__" || i === "constructor" || i === "prototype")
391
391
  return;
392
- const o = e && Zt(n, i) || i;
393
- je(n[o]) && je(r) ? n[o] = Ze(n[o], r) : je(r) ? n[o] = Ze({}, r) : Ee(r) ? n[o] = r.slice() : (!t || !Re(r)) && (n[o] = r);
392
+ const o = e && Wt(n, i) || i;
393
+ Be(n[o]) && Be(r) ? n[o] = We(n[o], r) : Be(r) ? n[o] = We({}, r) : Ee(r) ? n[o] = r.slice() : (!t || !Se(r)) && (n[o] = r);
394
394
  };
395
395
  for (let r = 0, i = arguments.length; r < i; r++)
396
- arguments[r] && Le(arguments[r], s);
396
+ arguments[r] && Oe(arguments[r], s);
397
397
  return n;
398
398
  }
399
- const Xn = (e, t, n, { allOwnKeys: s } = {}) => (Le(
399
+ const qn = (e, t, n, { allOwnKeys: s } = {}) => (Oe(
400
400
  t,
401
401
  (r, i) => {
402
402
  n && ie(r) ? Object.defineProperty(e, i, {
403
- value: qt(r, n),
403
+ value: Vt(r, n),
404
404
  writable: !0,
405
405
  enumerable: !0,
406
406
  configurable: !0
@@ -412,7 +412,7 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (Le(
412
412
  });
413
413
  },
414
414
  { allOwnKeys: s }
415
- ), e), qn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Vn = (e, t, n, s) => {
415
+ ), e), Vn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Kn = (e, t, n, s) => {
416
416
  e.prototype = Object.create(
417
417
  t.prototype,
418
418
  s
@@ -424,52 +424,52 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (Le(
424
424
  }), Object.defineProperty(e, "super", {
425
425
  value: t.prototype
426
426
  }), n && Object.assign(e.prototype, n);
427
- }, Kn = (e, t, n, s) => {
427
+ }, zn = (e, t, n, s) => {
428
428
  let r, i, o;
429
429
  const a = {};
430
430
  if (t = t || {}, e == null) return t;
431
431
  do {
432
432
  for (r = Object.getOwnPropertyNames(e), i = r.length; i-- > 0; )
433
433
  o = r[i], (!s || s(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0);
434
- e = n !== !1 && it(e);
434
+ e = n !== !1 && ot(e);
435
435
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
436
436
  return t;
437
- }, zn = (e, t, n) => {
437
+ }, Zn = (e, t, n) => {
438
438
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
439
439
  const s = e.indexOf(t, n);
440
440
  return s !== -1 && s === n;
441
- }, Zn = (e) => {
441
+ }, Wn = (e) => {
442
442
  if (!e) return null;
443
443
  if (Ee(e)) return e;
444
444
  let t = e.length;
445
- if (!zt(t)) return null;
445
+ if (!Zt(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
- }, Wn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && it(Uint8Array)), Qn = (e, t) => {
451
- const s = (e && e[Ie]).call(e);
450
+ }, Qn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ot(Uint8Array)), es = (e, t) => {
451
+ const s = (e && e[$e]).call(e);
452
452
  let r;
453
453
  for (; (r = s.next()) && !r.done; ) {
454
454
  const i = r.value;
455
455
  t.call(e, i[0], i[1]);
456
456
  }
457
- }, es = (e, t) => {
457
+ }, ts = (e, t) => {
458
458
  let n;
459
459
  const s = [];
460
460
  for (; (n = e.exec(t)) !== null; )
461
461
  s.push(n);
462
462
  return s;
463
- }, ts = _e("HTMLFormElement"), ns = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, s, r) {
463
+ }, ns = he("HTMLFormElement"), ss = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, s, r) {
464
464
  return s.toUpperCase() + r;
465
- }), yt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ss = _e("RegExp"), Qt = (e, t) => {
465
+ }), gt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), rs = he("RegExp"), en = (e, t) => {
466
466
  const n = Object.getOwnPropertyDescriptors(e), s = {};
467
- Le(n, (r, i) => {
467
+ Oe(n, (r, i) => {
468
468
  let o;
469
469
  (o = t(r, i, e)) !== !1 && (s[i] = o || r);
470
470
  }), Object.defineProperties(e, s);
471
- }, rs = (e) => {
472
- Qt(e, (t, n) => {
471
+ }, is = (e) => {
472
+ en(e, (t, n) => {
473
473
  if (ie(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
474
474
  return !1;
475
475
  const s = e[n];
@@ -483,108 +483,108 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (Le(
483
483
  });
484
484
  }
485
485
  });
486
- }, is = (e, t) => {
486
+ }, os = (e, t) => {
487
487
  const n = {}, s = (r) => {
488
488
  r.forEach((i) => {
489
489
  n[i] = !0;
490
490
  });
491
491
  };
492
492
  return Ee(e) ? s(e) : s(String(e).split(t)), n;
493
- }, os = () => {
494
- }, as = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
495
- function cs(e) {
496
- return !!(e && ie(e.append) && e[Vt] === "FormData" && e[Ie]);
493
+ }, as = () => {
494
+ }, cs = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
495
+ function ls(e) {
496
+ return !!(e && ie(e.append) && e[Kt] === "FormData" && e[$e]);
497
497
  }
498
- const ls = (e) => {
498
+ const ds = (e) => {
499
499
  const t = new Array(10), n = (s, r) => {
500
- if (xe(s)) {
500
+ if (Le(s)) {
501
501
  if (t.indexOf(s) >= 0)
502
502
  return;
503
- if (ve(s))
503
+ if (xe(s))
504
504
  return s;
505
505
  if (!("toJSON" in s)) {
506
506
  t[r] = s;
507
507
  const i = Ee(s) ? [] : {};
508
- return Le(s, (o, a) => {
508
+ return Oe(s, (o, a) => {
509
509
  const f = n(o, r + 1);
510
- !Re(f) && (i[a] = f);
510
+ !Se(f) && (i[a] = f);
511
511
  }), t[r] = void 0, i;
512
512
  }
513
513
  }
514
514
  return s;
515
515
  };
516
516
  return n(e, 0);
517
- }, ds = _e("AsyncFunction"), us = (e) => e && (xe(e) || ie(e)) && ie(e.then) && ie(e.catch), en = ((e, t) => e ? setImmediate : t ? ((n, s) => (we.addEventListener(
517
+ }, us = he("AsyncFunction"), ps = (e) => e && (Le(e) || ie(e)) && ie(e.then) && ie(e.catch), tn = ((e, t) => e ? setImmediate : t ? ((n, s) => (ye.addEventListener(
518
518
  "message",
519
519
  ({ source: r, data: i }) => {
520
- r === we && i === n && s.length && s.shift()();
520
+ r === ye && i === n && s.length && s.shift()();
521
521
  },
522
522
  !1
523
523
  ), (r) => {
524
- s.push(r), we.postMessage(n, "*");
525
- }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", ie(we.postMessage)), ps = typeof queueMicrotask < "u" ? queueMicrotask.bind(we) : typeof process < "u" && process.nextTick || en, fs = (e) => e != null && ie(e[Ie]), c = {
524
+ s.push(r), ye.postMessage(n, "*");
525
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", ie(ye.postMessage)), fs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ye) : typeof process < "u" && process.nextTick || tn, ms = (e) => e != null && ie(e[$e]), c = {
526
526
  isArray: Ee,
527
- isArrayBuffer: Kt,
528
- isBuffer: ve,
529
- isFormData: Yn,
530
- isArrayBufferView: vn,
531
- isString: xn,
532
- isNumber: zt,
533
- isBoolean: Ln,
534
- isObject: xe,
535
- isPlainObject: je,
527
+ isArrayBuffer: zt,
528
+ isBuffer: xe,
529
+ isFormData: Mn,
530
+ isArrayBufferView: xn,
531
+ isString: Ln,
532
+ isNumber: Zt,
533
+ isBoolean: On,
534
+ isObject: Le,
535
+ isPlainObject: Be,
536
536
  isEmptyObject: Pn,
537
- isReadableStream: Hn,
538
- isRequest: In,
539
- isResponse: $n,
540
- isHeaders: Gn,
541
- isUndefined: Re,
542
- isDate: On,
543
- isFile: kn,
544
- isBlob: Fn,
545
- isRegExp: ss,
537
+ isReadableStream: In,
538
+ isRequest: $n,
539
+ isResponse: Gn,
540
+ isHeaders: Jn,
541
+ isUndefined: Se,
542
+ isDate: kn,
543
+ isFile: Fn,
544
+ isBlob: jn,
545
+ isRegExp: rs,
546
546
  isFunction: ie,
547
- isStream: Bn,
548
- isURLSearchParams: Mn,
549
- isTypedArray: Wn,
550
- isFileList: jn,
551
- forEach: Le,
552
- merge: Ze,
553
- extend: Xn,
554
- trim: Jn,
555
- stripBOM: qn,
556
- inherits: Vn,
557
- toFlatObject: Kn,
558
- kindOf: $e,
559
- kindOfTest: _e,
560
- endsWith: zn,
561
- toArray: Zn,
562
- forEachEntry: Qn,
563
- matchAll: es,
564
- isHTMLForm: ts,
565
- hasOwnProperty: yt,
566
- hasOwnProp: yt,
547
+ isStream: Yn,
548
+ isURLSearchParams: Hn,
549
+ isTypedArray: Qn,
550
+ isFileList: Bn,
551
+ forEach: Oe,
552
+ merge: We,
553
+ extend: qn,
554
+ trim: Xn,
555
+ stripBOM: Vn,
556
+ inherits: Kn,
557
+ toFlatObject: zn,
558
+ kindOf: Ge,
559
+ kindOfTest: he,
560
+ endsWith: Zn,
561
+ toArray: Wn,
562
+ forEachEntry: es,
563
+ matchAll: ts,
564
+ isHTMLForm: ns,
565
+ hasOwnProperty: gt,
566
+ hasOwnProp: gt,
567
567
  // an alias to avoid ESLint no-prototype-builtins detection
568
- reduceDescriptors: Qt,
569
- freezeMethods: rs,
570
- toObjectSet: is,
571
- toCamelCase: ns,
572
- noop: os,
573
- toFiniteNumber: as,
574
- findKey: Zt,
575
- global: we,
576
- isContextDefined: Wt,
577
- isSpecCompliantForm: cs,
578
- toJSONObject: ls,
579
- isAsyncFn: ds,
580
- isThenable: us,
581
- setImmediate: en,
582
- asap: ps,
583
- isIterable: fs
568
+ reduceDescriptors: en,
569
+ freezeMethods: is,
570
+ toObjectSet: os,
571
+ toCamelCase: ss,
572
+ noop: as,
573
+ toFiniteNumber: cs,
574
+ findKey: Wt,
575
+ global: ye,
576
+ isContextDefined: Qt,
577
+ isSpecCompliantForm: ls,
578
+ toJSONObject: ds,
579
+ isAsyncFn: us,
580
+ isThenable: ps,
581
+ setImmediate: tn,
582
+ asap: fs,
583
+ isIterable: ms
584
584
  };
585
- let b = class tn extends Error {
585
+ let C = class nn extends Error {
586
586
  static from(t, n, s, r, i, o) {
587
- const a = new tn(t.message, n || t.code, s, r, i);
587
+ const a = new nn(t.message, n || t.code, s, r, i);
588
588
  return a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
589
589
  }
590
590
  /**
@@ -621,100 +621,100 @@ let b = class tn extends Error {
621
621
  };
622
622
  }
623
623
  };
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 ms = null;
637
- function We(e) {
624
+ C.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
625
+ C.ERR_BAD_OPTION = "ERR_BAD_OPTION";
626
+ C.ECONNABORTED = "ECONNABORTED";
627
+ C.ETIMEDOUT = "ETIMEDOUT";
628
+ C.ERR_NETWORK = "ERR_NETWORK";
629
+ C.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
630
+ C.ERR_DEPRECATED = "ERR_DEPRECATED";
631
+ C.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
632
+ C.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
633
+ C.ERR_CANCELED = "ERR_CANCELED";
634
+ C.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
635
+ C.ERR_INVALID_URL = "ERR_INVALID_URL";
636
+ const _s = null;
637
+ function Qe(e) {
638
638
  return c.isPlainObject(e) || c.isArray(e);
639
639
  }
640
- function nn(e) {
640
+ function sn(e) {
641
641
  return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
642
642
  }
643
- function gt(e, t, n) {
643
+ function Ct(e, t, n) {
644
644
  return e ? e.concat(t).map(function(r, i) {
645
- return r = nn(r), !n && i ? "[" + r + "]" : r;
645
+ return r = sn(r), !n && i ? "[" + r + "]" : r;
646
646
  }).join(n ? "." : "") : t;
647
647
  }
648
- function _s(e) {
649
- return c.isArray(e) && !e.some(We);
648
+ function hs(e) {
649
+ return c.isArray(e) && !e.some(Qe);
650
650
  }
651
- const hs = c.toFlatObject(c, {}, null, function(t) {
651
+ const ws = c.toFlatObject(c, {}, null, function(t) {
652
652
  return /^is[A-Z]/.test(t);
653
653
  });
654
- function Je(e, t, n) {
654
+ function Xe(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(w, h) {
662
- return !c.isUndefined(h[w]);
661
+ }, !1, function(w, _) {
662
+ return !c.isUndefined(_[w]);
663
663
  });
664
- const s = n.metaTokens, r = n.visitor || l, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
664
+ const s = n.metaTokens, r = n.visitor || d, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
665
665
  if (!c.isFunction(r))
666
666
  throw new TypeError("visitor must be a function");
667
- function d(p) {
667
+ function u(p) {
668
668
  if (p === null) return "";
669
669
  if (c.isDate(p))
670
670
  return p.toISOString();
671
671
  if (c.isBoolean(p))
672
672
  return p.toString();
673
673
  if (!f && c.isBlob(p))
674
- throw new b("Blob is not supported. Use a Buffer instead.");
674
+ throw new C("Blob is not supported. Use a Buffer instead.");
675
675
  return c.isArrayBuffer(p) || c.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
676
676
  }
677
- function l(p, w, h) {
678
- let S = p;
679
- if (p && !h && typeof p == "object") {
677
+ function d(p, w, _) {
678
+ let D = p;
679
+ if (p && !_ && typeof p == "object") {
680
680
  if (c.endsWith(w, "{}"))
681
681
  w = s ? w : w.slice(0, -2), p = JSON.stringify(p);
682
- else if (c.isArray(p) && _s(p) || (c.isFileList(p) || c.endsWith(w, "[]")) && (S = c.toArray(p)))
683
- return w = nn(w), S.forEach(function(v, L) {
684
- !(c.isUndefined(v) || v === null) && t.append(
682
+ else if (c.isArray(p) && hs(p) || (c.isFileList(p) || c.endsWith(w, "[]")) && (D = c.toArray(p)))
683
+ return w = sn(w), D.forEach(function(L, x) {
684
+ !(c.isUndefined(L) || L === null) && t.append(
685
685
  // eslint-disable-next-line no-nested-ternary
686
- o === !0 ? gt([w], L, i) : o === null ? w : w + "[]",
687
- d(v)
686
+ o === !0 ? Ct([w], x, i) : o === null ? w : w + "[]",
687
+ u(L)
688
688
  );
689
689
  }), !1;
690
690
  }
691
- return We(p) ? !0 : (t.append(gt(h, w, i), d(p)), !1);
691
+ return Qe(p) ? !0 : (t.append(Ct(_, w, i), u(p)), !1);
692
692
  }
693
- const _ = [], C = Object.assign(hs, {
694
- defaultVisitor: l,
695
- convertValue: d,
696
- isVisitable: We
693
+ const h = [], g = Object.assign(ws, {
694
+ defaultVisitor: d,
695
+ convertValue: u,
696
+ isVisitable: Qe
697
697
  });
698
- function E(p, w) {
698
+ function R(p, w) {
699
699
  if (!c.isUndefined(p)) {
700
- if (_.indexOf(p) !== -1)
700
+ if (h.indexOf(p) !== -1)
701
701
  throw Error("Circular reference detected in " + w.join("."));
702
- _.push(p), c.forEach(p, function(S, G) {
703
- (!(c.isUndefined(S) || S === null) && r.call(
702
+ h.push(p), c.forEach(p, function(D, P) {
703
+ (!(c.isUndefined(D) || D === null) && r.call(
704
704
  t,
705
- S,
706
- c.isString(G) ? G.trim() : G,
705
+ D,
706
+ c.isString(P) ? P.trim() : P,
707
707
  w,
708
- C
709
- )) === !0 && E(S, w ? w.concat(G) : [G]);
710
- }), _.pop();
708
+ g
709
+ )) === !0 && R(D, w ? w.concat(P) : [P]);
710
+ }), h.pop();
711
711
  }
712
712
  }
713
713
  if (!c.isObject(e))
714
714
  throw new TypeError("data must be an object");
715
- return E(e), t;
715
+ return R(e), t;
716
716
  }
717
- function Ct(e) {
717
+ function bt(e) {
718
718
  const t = {
719
719
  "!": "%21",
720
720
  "'": "%27",
@@ -728,38 +728,38 @@ function Ct(e) {
728
728
  return t[s];
729
729
  });
730
730
  }
731
- function ot(e, t) {
732
- this._pairs = [], e && Je(e, this, t);
731
+ function at(e, t) {
732
+ this._pairs = [], e && Xe(e, this, t);
733
733
  }
734
- const sn = ot.prototype;
735
- sn.append = function(t, n) {
734
+ const rn = at.prototype;
735
+ rn.append = function(t, n) {
736
736
  this._pairs.push([t, n]);
737
737
  };
738
- sn.toString = function(t) {
738
+ rn.toString = function(t) {
739
739
  const n = t ? function(s) {
740
- return t.call(this, s, Ct);
741
- } : Ct;
740
+ return t.call(this, s, bt);
741
+ } : bt;
742
742
  return this._pairs.map(function(r) {
743
743
  return n(r[0]) + "=" + n(r[1]);
744
744
  }, "").join("&");
745
745
  };
746
- function ws(e) {
746
+ function ys(e) {
747
747
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
748
748
  }
749
- function rn(e, t, n) {
749
+ function on(e, t, n) {
750
750
  if (!t)
751
751
  return e;
752
- const s = n && n.encode || ws, r = c.isFunction(n) ? {
752
+ const s = n && n.encode || ys, r = c.isFunction(n) ? {
753
753
  serialize: n
754
754
  } : n, i = r && r.serialize;
755
755
  let o;
756
- if (i ? o = i(t, r) : o = c.isURLSearchParams(t) ? t.toString() : new ot(t, r).toString(s), o) {
756
+ if (i ? o = i(t, r) : o = c.isURLSearchParams(t) ? t.toString() : new at(t, r).toString(s), o) {
757
757
  const a = e.indexOf("#");
758
758
  a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
759
759
  }
760
760
  return e;
761
761
  }
762
- class bt {
762
+ class Rt {
763
763
  constructor() {
764
764
  this.handlers = [];
765
765
  }
@@ -814,40 +814,40 @@ class bt {
814
814
  });
815
815
  }
816
816
  }
817
- const at = {
817
+ const ct = {
818
818
  silentJSONParsing: !0,
819
819
  forcedJSONParsing: !0,
820
820
  clarifyTimeoutError: !1,
821
821
  legacyInterceptorReqResOrdering: !0
822
- }, ys = typeof URLSearchParams < "u" ? URLSearchParams : ot, gs = typeof FormData < "u" ? FormData : null, Cs = typeof Blob < "u" ? Blob : null, bs = {
822
+ }, gs = typeof URLSearchParams < "u" ? URLSearchParams : at, Cs = typeof FormData < "u" ? FormData : null, bs = typeof Blob < "u" ? Blob : null, Rs = {
823
823
  isBrowser: !0,
824
824
  classes: {
825
- URLSearchParams: ys,
826
- FormData: gs,
827
- Blob: Cs
825
+ URLSearchParams: gs,
826
+ FormData: Cs,
827
+ Blob: bs
828
828
  },
829
829
  protocols: ["http", "https", "file", "blob", "url", "data"]
830
- }, ct = typeof window < "u" && typeof document < "u", Qe = typeof navigator == "object" && navigator || void 0, Rs = ct && (!Qe || ["ReactNative", "NativeScript", "NS"].indexOf(Qe.product) < 0), Es = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
831
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ss = ct && window.location.href || "http://localhost", Ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
830
+ }, lt = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, Ss = lt && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), Es = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
831
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ds = lt && window.location.href || "http://localhost", As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
832
832
  __proto__: null,
833
- hasBrowserEnv: ct,
834
- hasStandardBrowserEnv: Rs,
833
+ hasBrowserEnv: lt,
834
+ hasStandardBrowserEnv: Ss,
835
835
  hasStandardBrowserWebWorkerEnv: Es,
836
- navigator: Qe,
837
- origin: Ss
838
- }, Symbol.toStringTag, { value: "Module" })), te = {
839
- ...Ds,
840
- ...bs
836
+ navigator: et,
837
+ origin: Ds
838
+ }, Symbol.toStringTag, { value: "Module" })), se = {
839
+ ...As,
840
+ ...Rs
841
841
  };
842
- function As(e, t) {
843
- return Je(e, new te.classes.URLSearchParams(), {
842
+ function Us(e, t) {
843
+ return Xe(e, new se.classes.URLSearchParams(), {
844
844
  visitor: function(n, s, r, i) {
845
- return te.isNode && c.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
845
+ return se.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 Us(e) {
850
+ function Ns(e) {
851
851
  return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
852
852
  }
853
853
  function Ts(e) {
@@ -859,7 +859,7 @@ function Ts(e) {
859
859
  i = n[s], t[i] = e[i];
860
860
  return t;
861
861
  }
862
- function on(e) {
862
+ function an(e) {
863
863
  function t(n, s, r, i) {
864
864
  let o = n[i++];
865
865
  if (o === "__proto__") return !0;
@@ -869,12 +869,12 @@ function on(e) {
869
869
  if (c.isFormData(e) && c.isFunction(e.entries)) {
870
870
  const n = {};
871
871
  return c.forEachEntry(e, (s, r) => {
872
- t(Us(s), r, n, 0);
872
+ t(Ns(s), r, n, 0);
873
873
  }), n;
874
874
  }
875
875
  return null;
876
876
  }
877
- function Ns(e, t, n) {
877
+ function vs(e, t, n) {
878
878
  if (c.isString(e))
879
879
  try {
880
880
  return (t || JSON.parse)(e), c.trim(e);
@@ -885,12 +885,12 @@ function Ns(e, t, n) {
885
885
  return (n || JSON.stringify)(e);
886
886
  }
887
887
  const Pe = {
888
- transitional: at,
888
+ transitional: ct,
889
889
  adapter: ["xhr", "http", "fetch"],
890
890
  transformRequest: [function(t, n) {
891
891
  const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, i = c.isObject(t);
892
892
  if (i && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
893
- return r ? JSON.stringify(on(t)) : t;
893
+ return r ? JSON.stringify(an(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))
@@ -900,17 +900,17 @@ const Pe = {
900
900
  let a;
901
901
  if (i) {
902
902
  if (s.indexOf("application/x-www-form-urlencoded") > -1)
903
- return As(t, this.formSerializer).toString();
903
+ return Us(t, this.formSerializer).toString();
904
904
  if ((a = c.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
905
905
  const f = this.env && this.env.FormData;
906
- return Je(
906
+ return Xe(
907
907
  a ? { "files[]": t } : t,
908
908
  f && new f(),
909
909
  this.formSerializer
910
910
  );
911
911
  }
912
912
  }
913
- return i || r ? (n.setContentType("application/json", !1), Ns(t)) : t;
913
+ return i || r ? (n.setContentType("application/json", !1), vs(t)) : t;
914
914
  }],
915
915
  transformResponse: [function(t) {
916
916
  const n = this.transitional || Pe.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
@@ -922,7 +922,7 @@ const Pe = {
922
922
  return JSON.parse(t, this.parseReviver);
923
923
  } catch (a) {
924
924
  if (o)
925
- throw a.name === "SyntaxError" ? b.from(a, b.ERR_BAD_RESPONSE, this, null, this.response) : a;
925
+ throw a.name === "SyntaxError" ? C.from(a, C.ERR_BAD_RESPONSE, this, null, this.response) : a;
926
926
  }
927
927
  }
928
928
  return t;
@@ -937,8 +937,8 @@ const Pe = {
937
937
  maxContentLength: -1,
938
938
  maxBodyLength: -1,
939
939
  env: {
940
- FormData: te.classes.FormData,
941
- Blob: te.classes.Blob
940
+ FormData: se.classes.FormData,
941
+ Blob: se.classes.Blob
942
942
  },
943
943
  validateStatus: function(t) {
944
944
  return t >= 200 && t < 300;
@@ -953,7 +953,7 @@ const Pe = {
953
953
  c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
954
954
  Pe.headers[e] = {};
955
955
  });
956
- const vs = c.toObjectSet([
956
+ const xs = c.toObjectSet([
957
957
  "age",
958
958
  "authorization",
959
959
  "content-length",
@@ -971,21 +971,21 @@ const vs = c.toObjectSet([
971
971
  "referer",
972
972
  "retry-after",
973
973
  "user-agent"
974
- ]), xs = (e) => {
974
+ ]), Ls = (e) => {
975
975
  const t = {};
976
976
  let n, s, r;
977
977
  return e && e.split(`
978
978
  `).forEach(function(o) {
979
- r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] && vs[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
979
+ r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] && xs[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
- }, Rt = /* @__PURE__ */ Symbol("internals");
982
- function Ae(e) {
981
+ }, St = /* @__PURE__ */ Symbol("internals");
982
+ function Ue(e) {
983
983
  return e && String(e).trim().toLowerCase();
984
984
  }
985
- function Be(e) {
986
- return e === !1 || e == null ? e : c.isArray(e) ? e.map(Be) : String(e);
985
+ function Ye(e) {
986
+ return e === !1 || e == null ? e : c.isArray(e) ? e.map(Ye) : String(e);
987
987
  }
988
- function Ls(e) {
988
+ function Os(e) {
989
989
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
990
990
  let s;
991
991
  for (; s = n.exec(e); )
@@ -993,7 +993,7 @@ function Ls(e) {
993
993
  return t;
994
994
  }
995
995
  const Ps = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
996
- function qe(e, t, n, s, r) {
996
+ function Ve(e, t, n, s, r) {
997
997
  if (c.isFunction(s))
998
998
  return s.call(this, t, n);
999
999
  if (r && (t = n), !!c.isString(t)) {
@@ -1003,10 +1003,10 @@ function qe(e, t, n, s, r) {
1003
1003
  return s.test(t);
1004
1004
  }
1005
1005
  }
1006
- function Os(e) {
1006
+ function ks(e) {
1007
1007
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
1008
1008
  }
1009
- function ks(e, t) {
1009
+ function Fs(e, t) {
1010
1010
  const n = c.toCamelCase(" " + t);
1011
1011
  ["get", "set", "has"].forEach((s) => {
1012
1012
  Object.defineProperty(e, s + n, {
@@ -1023,24 +1023,24 @@ let oe = class {
1023
1023
  }
1024
1024
  set(t, n, s) {
1025
1025
  const r = this;
1026
- function i(a, f, d) {
1027
- const l = Ae(f);
1028
- if (!l)
1026
+ function i(a, f, u) {
1027
+ const d = Ue(f);
1028
+ if (!d)
1029
1029
  throw new Error("header name must be a non-empty string");
1030
- const _ = c.findKey(r, l);
1031
- (!_ || r[_] === void 0 || d === !0 || d === void 0 && r[_] !== !1) && (r[_ || f] = Be(a));
1030
+ const h = c.findKey(r, d);
1031
+ (!h || r[h] === void 0 || u === !0 || u === void 0 && r[h] !== !1) && (r[h || f] = Ye(a));
1032
1032
  }
1033
- const o = (a, f) => c.forEach(a, (d, l) => i(d, l, f));
1033
+ const o = (a, f) => c.forEach(a, (u, d) => i(u, d, f));
1034
1034
  if (c.isPlainObject(t) || t instanceof this.constructor)
1035
1035
  o(t, n);
1036
1036
  else if (c.isString(t) && (t = t.trim()) && !Ps(t))
1037
- o(xs(t), n);
1037
+ o(Ls(t), n);
1038
1038
  else if (c.isObject(t) && c.isIterable(t)) {
1039
- let a = {}, f, d;
1040
- for (const l of t) {
1041
- if (!c.isArray(l))
1039
+ let a = {}, f, u;
1040
+ for (const d of t) {
1041
+ if (!c.isArray(d))
1042
1042
  throw TypeError("Object iterator must return a key-value pair");
1043
- a[d = l[0]] = (f = a[d]) ? c.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
1043
+ a[u = d[0]] = (f = a[u]) ? c.isArray(f) ? [...f, d[1]] : [f, d[1]] : d[1];
1044
1044
  }
1045
1045
  o(a, n);
1046
1046
  } else
@@ -1048,14 +1048,14 @@ let oe = class {
1048
1048
  return this;
1049
1049
  }
1050
1050
  get(t, n) {
1051
- if (t = Ae(t), t) {
1051
+ if (t = Ue(t), t) {
1052
1052
  const s = c.findKey(this, t);
1053
1053
  if (s) {
1054
1054
  const r = this[s];
1055
1055
  if (!n)
1056
1056
  return r;
1057
1057
  if (n === !0)
1058
- return Ls(r);
1058
+ return Os(r);
1059
1059
  if (c.isFunction(n))
1060
1060
  return n.call(this, r, s);
1061
1061
  if (c.isRegExp(n))
@@ -1065,9 +1065,9 @@ let oe = class {
1065
1065
  }
1066
1066
  }
1067
1067
  has(t, n) {
1068
- if (t = Ae(t), t) {
1068
+ if (t = Ue(t), t) {
1069
1069
  const s = c.findKey(this, t);
1070
- return !!(s && this[s] !== void 0 && (!n || qe(this, this[s], s, n)));
1070
+ return !!(s && this[s] !== void 0 && (!n || Ve(this, this[s], s, n)));
1071
1071
  }
1072
1072
  return !1;
1073
1073
  }
@@ -1075,9 +1075,9 @@ let oe = class {
1075
1075
  const s = this;
1076
1076
  let r = !1;
1077
1077
  function i(o) {
1078
- if (o = Ae(o), o) {
1078
+ if (o = Ue(o), o) {
1079
1079
  const a = c.findKey(s, o);
1080
- a && (!n || qe(s, s[a], a, n)) && (delete s[a], r = !0);
1080
+ a && (!n || Ve(s, s[a], a, n)) && (delete s[a], r = !0);
1081
1081
  }
1082
1082
  }
1083
1083
  return c.isArray(t) ? t.forEach(i) : i(t), r;
@@ -1087,7 +1087,7 @@ let oe = class {
1087
1087
  let s = n.length, r = !1;
1088
1088
  for (; s--; ) {
1089
1089
  const i = n[s];
1090
- (!t || qe(this, this[i], i, t, !0)) && (delete this[i], r = !0);
1090
+ (!t || Ve(this, this[i], i, t, !0)) && (delete this[i], r = !0);
1091
1091
  }
1092
1092
  return r;
1093
1093
  }
@@ -1096,11 +1096,11 @@ let oe = class {
1096
1096
  return c.forEach(this, (r, i) => {
1097
1097
  const o = c.findKey(s, i);
1098
1098
  if (o) {
1099
- n[o] = Be(r), delete n[i];
1099
+ n[o] = Ye(r), delete n[i];
1100
1100
  return;
1101
1101
  }
1102
- const a = t ? Os(i) : String(i).trim();
1103
- a !== i && delete n[i], n[a] = Be(r), s[a] = !0;
1102
+ const a = t ? ks(i) : String(i).trim();
1103
+ a !== i && delete n[i], n[a] = Ye(r), s[a] = !0;
1104
1104
  }), this;
1105
1105
  }
1106
1106
  concat(...t) {
@@ -1133,12 +1133,12 @@ let oe = class {
1133
1133
  return n.forEach((r) => s.set(r)), s;
1134
1134
  }
1135
1135
  static accessor(t) {
1136
- const s = (this[Rt] = this[Rt] = {
1136
+ const s = (this[St] = this[St] = {
1137
1137
  accessors: {}
1138
1138
  }).accessors, r = this.prototype;
1139
1139
  function i(o) {
1140
- const a = Ae(o);
1141
- s[a] || (ks(r, o), s[a] = !0);
1140
+ const a = Ue(o);
1141
+ s[a] || (Fs(r, o), s[a] = !0);
1142
1142
  }
1143
1143
  return c.isArray(t) ? t.forEach(i) : i(t), this;
1144
1144
  }
@@ -1154,17 +1154,17 @@ c.reduceDescriptors(oe.prototype, ({ value: e }, t) => {
1154
1154
  };
1155
1155
  });
1156
1156
  c.freezeMethods(oe);
1157
- function Ve(e, t) {
1157
+ function Ke(e, t) {
1158
1158
  const n = this || Pe, s = t || n, r = oe.from(s.headers);
1159
1159
  let i = s.data;
1160
1160
  return c.forEach(e, function(a) {
1161
1161
  i = a.call(n, i, r.normalize(), t ? t.status : void 0);
1162
1162
  }), r.normalize(), i;
1163
1163
  }
1164
- function an(e) {
1164
+ function cn(e) {
1165
1165
  return !!(e && e.__CANCEL__);
1166
1166
  }
1167
- let Oe = class extends b {
1167
+ let ke = class extends C {
1168
1168
  /**
1169
1169
  * A `CanceledError` is an object that is thrown when an operation is canceled.
1170
1170
  *
@@ -1175,69 +1175,69 @@ let Oe = class extends b {
1175
1175
  * @returns {CanceledError} The created error.
1176
1176
  */
1177
1177
  constructor(t, n, s) {
1178
- super(t ?? "canceled", b.ERR_CANCELED, n, s), this.name = "CanceledError", this.__CANCEL__ = !0;
1178
+ super(t ?? "canceled", C.ERR_CANCELED, n, s), this.name = "CanceledError", this.__CANCEL__ = !0;
1179
1179
  }
1180
1180
  };
1181
- function cn(e, t, n) {
1181
+ function ln(e, t, n) {
1182
1182
  const s = n.config.validateStatus;
1183
- !n.status || !s || s(n.status) ? e(n) : t(new b(
1183
+ !n.status || !s || s(n.status) ? e(n) : t(new C(
1184
1184
  "Request failed with status code " + n.status,
1185
- [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1185
+ [C.ERR_BAD_REQUEST, C.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 Fs(e) {
1191
+ function js(e) {
1192
1192
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1193
1193
  return t && t[1] || "";
1194
1194
  }
1195
- function js(e, t) {
1195
+ function Bs(e, t) {
1196
1196
  e = e || 10;
1197
1197
  const n = new Array(e), s = new Array(e);
1198
1198
  let r = 0, i = 0, o;
1199
1199
  return t = t !== void 0 ? t : 1e3, function(f) {
1200
- const d = Date.now(), l = s[i];
1201
- o || (o = d), n[r] = f, s[r] = d;
1202
- let _ = i, C = 0;
1203
- for (; _ !== r; )
1204
- C += n[_++], _ = _ % e;
1205
- if (r = (r + 1) % e, r === i && (i = (i + 1) % e), d - o < t)
1200
+ const u = Date.now(), d = s[i];
1201
+ o || (o = u), n[r] = f, s[r] = u;
1202
+ let h = i, g = 0;
1203
+ for (; h !== r; )
1204
+ g += n[h++], h = h % e;
1205
+ if (r = (r + 1) % e, r === i && (i = (i + 1) % e), u - o < t)
1206
1206
  return;
1207
- const E = l && d - l;
1208
- return E ? Math.round(C * 1e3 / E) : void 0;
1207
+ const R = d && u - d;
1208
+ return R ? Math.round(g * 1e3 / R) : void 0;
1209
1209
  };
1210
1210
  }
1211
- function Bs(e, t) {
1211
+ function Ys(e, t) {
1212
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);
1213
+ const o = (u, d = Date.now()) => {
1214
+ n = d, r = null, i && (clearTimeout(i), i = null), e(...u);
1215
1215
  };
1216
- return [(...d) => {
1217
- const l = Date.now(), _ = l - n;
1218
- _ >= s ? o(d, l) : (r = d, i || (i = setTimeout(() => {
1216
+ return [(...u) => {
1217
+ const d = Date.now(), h = d - n;
1218
+ h >= s ? o(u, d) : (r = u, i || (i = setTimeout(() => {
1219
1219
  i = null, o(r);
1220
- }, s - _)));
1220
+ }, s - h)));
1221
1221
  }, () => r && o(r)];
1222
1222
  }
1223
- const He = (e, t, n = 3) => {
1223
+ const Ie = (e, t, n = 3) => {
1224
1224
  let s = 0;
1225
- const r = js(50, 250);
1226
- return Bs((i) => {
1227
- const o = i.loaded, a = i.lengthComputable ? i.total : void 0, f = o - s, d = r(f), l = o <= a;
1225
+ const r = Bs(50, 250);
1226
+ return Ys((i) => {
1227
+ const o = i.loaded, a = i.lengthComputable ? i.total : void 0, f = o - s, u = r(f), d = o <= a;
1228
1228
  s = o;
1229
- const _ = {
1229
+ const h = {
1230
1230
  loaded: o,
1231
1231
  total: a,
1232
1232
  progress: a ? o / a : void 0,
1233
1233
  bytes: f,
1234
- rate: d || void 0,
1235
- estimated: d && a && l ? (a - o) / d : void 0,
1234
+ rate: u || void 0,
1235
+ estimated: u && a && d ? (a - o) / u : void 0,
1236
1236
  event: i,
1237
1237
  lengthComputable: a != null,
1238
1238
  [t ? "download" : "upload"]: !0
1239
1239
  };
1240
- e(_);
1240
+ e(h);
1241
1241
  }, n);
1242
1242
  }, Et = (e, t) => {
1243
1243
  const n = e != null;
@@ -1246,10 +1246,10 @@ const He = (e, t, n = 3) => {
1246
1246
  total: e,
1247
1247
  loaded: s
1248
1248
  }), t[1]];
1249
- }, St = (e) => (...t) => c.asap(() => e(...t)), Ys = te.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, te.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1250
- new URL(te.origin),
1251
- te.navigator && /(msie|trident)/i.test(te.navigator.userAgent)
1252
- ) : () => !0, Ms = te.hasStandardBrowserEnv ? (
1249
+ }, Dt = (e) => (...t) => c.asap(() => e(...t)), Ms = se.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, se.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1250
+ new URL(se.origin),
1251
+ se.navigator && /(msie|trident)/i.test(se.navigator.userAgent)
1252
+ ) : () => !0, Hs = se.hasStandardBrowserEnv ? (
1253
1253
  // Standard browser envs support document.cookie
1254
1254
  {
1255
1255
  write(e, t, n, s, r, i, o) {
@@ -1278,45 +1278,45 @@ const He = (e, t, n = 3) => {
1278
1278
  }
1279
1279
  }
1280
1280
  );
1281
- function Hs(e) {
1281
+ function Is(e) {
1282
1282
  return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1283
1283
  }
1284
- function Is(e, t) {
1284
+ function $s(e, t) {
1285
1285
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1286
1286
  }
1287
- function ln(e, t, n) {
1288
- let s = !Hs(t);
1289
- return e && (s || n == !1) ? Is(e, t) : t;
1287
+ function dn(e, t, n) {
1288
+ let s = !Is(t);
1289
+ return e && (s || n == !1) ? $s(e, t) : t;
1290
1290
  }
1291
- const Dt = (e) => e instanceof oe ? { ...e } : e;
1292
- function Ce(e, t) {
1291
+ const At = (e) => e instanceof oe ? { ...e } : e;
1292
+ function be(e, t) {
1293
1293
  t = t || {};
1294
1294
  const n = {};
1295
- function s(d, l, _, C) {
1296
- return c.isPlainObject(d) && c.isPlainObject(l) ? c.merge.call({ caseless: C }, d, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
1297
- }
1298
- function r(d, l, _, C) {
1299
- if (c.isUndefined(l)) {
1300
- if (!c.isUndefined(d))
1301
- return s(void 0, d, _, C);
1302
- } else return s(d, l, _, C);
1303
- }
1304
- function i(d, l) {
1305
- if (!c.isUndefined(l))
1306
- return s(void 0, l);
1307
- }
1308
- function o(d, l) {
1309
- if (c.isUndefined(l)) {
1310
- if (!c.isUndefined(d))
1311
- return s(void 0, d);
1312
- } else return s(void 0, l);
1313
- }
1314
- function a(d, l, _) {
1315
- if (_ in t)
1316
- return s(d, l);
1317
- if (_ in e)
1295
+ function s(u, d, h, g) {
1296
+ return c.isPlainObject(u) && c.isPlainObject(d) ? c.merge.call({ caseless: g }, u, d) : c.isPlainObject(d) ? c.merge({}, d) : c.isArray(d) ? d.slice() : d;
1297
+ }
1298
+ function r(u, d, h, g) {
1299
+ if (c.isUndefined(d)) {
1300
+ if (!c.isUndefined(u))
1301
+ return s(void 0, u, h, g);
1302
+ } else return s(u, d, h, g);
1303
+ }
1304
+ function i(u, d) {
1305
+ if (!c.isUndefined(d))
1318
1306
  return s(void 0, d);
1319
1307
  }
1308
+ function o(u, d) {
1309
+ if (c.isUndefined(d)) {
1310
+ if (!c.isUndefined(u))
1311
+ return s(void 0, u);
1312
+ } else return s(void 0, d);
1313
+ }
1314
+ function a(u, d, h) {
1315
+ if (h in t)
1316
+ return s(u, d);
1317
+ if (h in e)
1318
+ return s(void 0, u);
1319
+ }
1320
1320
  const f = {
1321
1321
  url: i,
1322
1322
  method: i,
@@ -1346,121 +1346,121 @@ function Ce(e, t) {
1346
1346
  socketPath: o,
1347
1347
  responseEncoding: o,
1348
1348
  validateStatus: a,
1349
- headers: (d, l, _) => r(Dt(d), Dt(l), _, !0)
1349
+ headers: (u, d, h) => r(At(u), At(d), h, !0)
1350
1350
  };
1351
1351
  return c.forEach(
1352
1352
  Object.keys({ ...e, ...t }),
1353
- function(l) {
1354
- if (l === "__proto__" || l === "constructor" || l === "prototype")
1353
+ function(d) {
1354
+ if (d === "__proto__" || d === "constructor" || d === "prototype")
1355
1355
  return;
1356
- const _ = c.hasOwnProp(f, l) ? f[l] : r, C = _(e[l], t[l], l);
1357
- c.isUndefined(C) && _ !== a || (n[l] = C);
1356
+ const h = c.hasOwnProp(f, d) ? f[d] : r, g = h(e[d], t[d], d);
1357
+ c.isUndefined(g) && h !== a || (n[d] = g);
1358
1358
  }
1359
1359
  ), n;
1360
1360
  }
1361
- const dn = (e) => {
1362
- const t = Ce({}, e);
1361
+ const un = (e) => {
1362
+ const t = be({}, e);
1363
1363
  let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: i, headers: o, auth: a } = t;
1364
- if (t.headers = o = oe.from(o), t.url = rn(ln(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && o.set(
1364
+ if (t.headers = o = oe.from(o), t.url = on(dn(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 (te.hasStandardBrowserEnv || te.hasStandardBrowserWebWorkerEnv)
1368
+ if (se.hasStandardBrowserEnv || se.hasStandardBrowserWebWorkerEnv)
1369
1369
  o.setContentType(void 0);
1370
1370
  else if (c.isFunction(n.getHeaders)) {
1371
- const f = n.getHeaders(), d = ["content-type", "content-length"];
1372
- Object.entries(f).forEach(([l, _]) => {
1373
- d.includes(l.toLowerCase()) && o.set(l, _);
1371
+ const f = n.getHeaders(), u = ["content-type", "content-length"];
1372
+ Object.entries(f).forEach(([d, h]) => {
1373
+ u.includes(d.toLowerCase()) && o.set(d, h);
1374
1374
  });
1375
1375
  }
1376
1376
  }
1377
- if (te.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(t)), s || s !== !1 && Ys(t.url))) {
1378
- const f = r && i && Ms.read(i);
1377
+ if (se.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(t)), s || s !== !1 && Ms(t.url))) {
1378
+ const f = r && i && Hs.read(i);
1379
1379
  f && o.set(r, f);
1380
1380
  }
1381
1381
  return t;
1382
- }, $s = typeof XMLHttpRequest < "u", Gs = $s && function(e) {
1382
+ }, Gs = typeof XMLHttpRequest < "u", Js = Gs && function(e) {
1383
1383
  return new Promise(function(n, s) {
1384
- const r = dn(e);
1384
+ const r = un(e);
1385
1385
  let i = r.data;
1386
1386
  const o = oe.from(r.headers).normalize();
1387
- let { responseType: a, onUploadProgress: f, onDownloadProgress: d } = r, l, _, C, E, p;
1387
+ let { responseType: a, onUploadProgress: f, onDownloadProgress: u } = r, d, h, g, R, p;
1388
1388
  function w() {
1389
- E && E(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
1389
+ R && R(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(d), r.signal && r.signal.removeEventListener("abort", d);
1390
1390
  }
1391
- let h = new XMLHttpRequest();
1392
- h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
1393
- function S() {
1394
- if (!h)
1391
+ let _ = new XMLHttpRequest();
1392
+ _.open(r.method.toUpperCase(), r.url, !0), _.timeout = r.timeout;
1393
+ function D() {
1394
+ if (!_)
1395
1395
  return;
1396
- const v = oe.from(
1397
- "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1398
- ), J = {
1399
- data: !a || a === "text" || a === "json" ? h.responseText : h.response,
1400
- status: h.status,
1401
- statusText: h.statusText,
1402
- headers: v,
1396
+ const L = oe.from(
1397
+ "getAllResponseHeaders" in _ && _.getAllResponseHeaders()
1398
+ ), B = {
1399
+ data: !a || a === "text" || a === "json" ? _.responseText : _.response,
1400
+ status: _.status,
1401
+ statusText: _.statusText,
1402
+ headers: L,
1403
1403
  config: e,
1404
- request: h
1404
+ request: _
1405
1405
  };
1406
- cn(function(Y) {
1407
- n(Y), w();
1408
- }, function(Y) {
1409
- s(Y), w();
1410
- }, J), h = null;
1406
+ ln(function(N) {
1407
+ n(N), w();
1408
+ }, function(N) {
1409
+ s(N), w();
1410
+ }, B), _ = null;
1411
1411
  }
1412
- "onloadend" in h ? h.onloadend = S : h.onreadystatechange = function() {
1413
- !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(S);
1414
- }, h.onabort = function() {
1415
- h && (s(new b("Request aborted", b.ECONNABORTED, e, h)), h = null);
1416
- }, h.onerror = function(L) {
1417
- const J = L && L.message ? L.message : "Network Error", k = new b(J, b.ERR_NETWORK, e, h);
1418
- k.event = L || null, s(k), h = null;
1419
- }, h.ontimeout = function() {
1420
- let L = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
1421
- const J = r.transitional || at;
1422
- r.timeoutErrorMessage && (L = r.timeoutErrorMessage), s(new b(
1423
- L,
1424
- J.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1412
+ "onloadend" in _ ? _.onloadend = D : _.onreadystatechange = function() {
1413
+ !_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.indexOf("file:") === 0) || setTimeout(D);
1414
+ }, _.onabort = function() {
1415
+ _ && (s(new C("Request aborted", C.ECONNABORTED, e, _)), _ = null);
1416
+ }, _.onerror = function(x) {
1417
+ const B = x && x.message ? x.message : "Network Error", V = new C(B, C.ERR_NETWORK, e, _);
1418
+ V.event = x || null, s(V), _ = null;
1419
+ }, _.ontimeout = function() {
1420
+ let x = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
1421
+ const B = r.transitional || ct;
1422
+ r.timeoutErrorMessage && (x = r.timeoutErrorMessage), s(new C(
1423
+ x,
1424
+ B.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED,
1425
1425
  e,
1426
- h
1427
- )), h = null;
1428
- }, i === void 0 && o.setContentType(null), "setRequestHeader" in h && c.forEach(o.toJSON(), function(L, J) {
1429
- h.setRequestHeader(J, L);
1430
- }), c.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), a && a !== "json" && (h.responseType = r.responseType), d && ([C, p] = He(d, !0), h.addEventListener("progress", C)), f && h.upload && ([_, E] = He(f), h.upload.addEventListener("progress", _), h.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (l = (v) => {
1431
- h && (s(!v || v.type ? new Oe(null, e, h) : v), h.abort(), h = null);
1432
- }, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
1433
- const G = Fs(r.url);
1434
- if (G && te.protocols.indexOf(G) === -1) {
1435
- s(new b("Unsupported protocol " + G + ":", b.ERR_BAD_REQUEST, e));
1426
+ _
1427
+ )), _ = null;
1428
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in _ && c.forEach(o.toJSON(), function(x, B) {
1429
+ _.setRequestHeader(B, x);
1430
+ }), c.isUndefined(r.withCredentials) || (_.withCredentials = !!r.withCredentials), a && a !== "json" && (_.responseType = r.responseType), u && ([g, p] = Ie(u, !0), _.addEventListener("progress", g)), f && _.upload && ([h, R] = Ie(f), _.upload.addEventListener("progress", h), _.upload.addEventListener("loadend", R)), (r.cancelToken || r.signal) && (d = (L) => {
1431
+ _ && (s(!L || L.type ? new ke(null, e, _) : L), _.abort(), _ = null);
1432
+ }, r.cancelToken && r.cancelToken.subscribe(d), r.signal && (r.signal.aborted ? d() : r.signal.addEventListener("abort", d)));
1433
+ const P = js(r.url);
1434
+ if (P && se.protocols.indexOf(P) === -1) {
1435
+ s(new C("Unsupported protocol " + P + ":", C.ERR_BAD_REQUEST, e));
1436
1436
  return;
1437
1437
  }
1438
- h.send(i || null);
1438
+ _.send(i || null);
1439
1439
  });
1440
- }, Js = (e, t) => {
1440
+ }, Xs = (e, t) => {
1441
1441
  const { length: n } = e = e ? e.filter(Boolean) : [];
1442
1442
  if (t || n) {
1443
1443
  let s = new AbortController(), r;
1444
- const i = function(d) {
1444
+ const i = function(u) {
1445
1445
  if (!r) {
1446
1446
  r = !0, a();
1447
- const l = d instanceof Error ? d : this.reason;
1448
- s.abort(l instanceof b ? l : new Oe(l instanceof Error ? l.message : l));
1447
+ const d = u instanceof Error ? u : this.reason;
1448
+ s.abort(d instanceof C ? d : new ke(d instanceof Error ? d.message : d));
1449
1449
  }
1450
1450
  };
1451
1451
  let o = t && setTimeout(() => {
1452
- o = null, i(new b(`timeout of ${t}ms exceeded`, b.ETIMEDOUT));
1452
+ o = null, i(new C(`timeout of ${t}ms exceeded`, C.ETIMEDOUT));
1453
1453
  }, t);
1454
1454
  const a = () => {
1455
- e && (o && clearTimeout(o), o = null, e.forEach((d) => {
1456
- d.unsubscribe ? d.unsubscribe(i) : d.removeEventListener("abort", i);
1455
+ e && (o && clearTimeout(o), o = null, e.forEach((u) => {
1456
+ u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
1457
1457
  }), e = null);
1458
1458
  };
1459
- e.forEach((d) => d.addEventListener("abort", i));
1459
+ e.forEach((u) => u.addEventListener("abort", i));
1460
1460
  const { signal: f } = s;
1461
1461
  return f.unsubscribe = () => c.asap(a), f;
1462
1462
  }
1463
- }, Xs = function* (e, t) {
1463
+ }, qs = function* (e, t) {
1464
1464
  let n = e.byteLength;
1465
1465
  if (n < t) {
1466
1466
  yield e;
@@ -1469,10 +1469,10 @@ const dn = (e) => {
1469
1469
  let s = 0, r;
1470
1470
  for (; s < n; )
1471
1471
  r = s + t, yield e.slice(s, r), s = r;
1472
- }, qs = async function* (e, t) {
1473
- for await (const n of Vs(e))
1474
- yield* Xs(n, t);
1475
- }, Vs = async function* (e) {
1472
+ }, Vs = async function* (e, t) {
1473
+ for await (const n of Ks(e))
1474
+ yield* qs(n, t);
1475
+ }, Ks = async function* (e) {
1476
1476
  if (e[Symbol.asyncIterator]) {
1477
1477
  yield* e;
1478
1478
  return;
@@ -1488,27 +1488,27 @@ const dn = (e) => {
1488
1488
  } finally {
1489
1489
  await t.cancel();
1490
1490
  }
1491
- }, At = (e, t, n, s) => {
1492
- const r = qs(e, t);
1491
+ }, Ut = (e, t, n, s) => {
1492
+ const r = Vs(e, t);
1493
1493
  let i = 0, o, a = (f) => {
1494
1494
  o || (o = !0, s && s(f));
1495
1495
  };
1496
1496
  return new ReadableStream({
1497
1497
  async pull(f) {
1498
1498
  try {
1499
- const { done: d, value: l } = await r.next();
1500
- if (d) {
1499
+ const { done: u, value: d } = await r.next();
1500
+ if (u) {
1501
1501
  a(), f.close();
1502
1502
  return;
1503
1503
  }
1504
- let _ = l.byteLength;
1504
+ let h = d.byteLength;
1505
1505
  if (n) {
1506
- let C = i += _;
1507
- n(C);
1506
+ let g = i += h;
1507
+ n(g);
1508
1508
  }
1509
- f.enqueue(new Uint8Array(l));
1510
- } catch (d) {
1511
- throw a(d), d;
1509
+ f.enqueue(new Uint8Array(d));
1510
+ } catch (u) {
1511
+ throw a(u), u;
1512
1512
  }
1513
1513
  },
1514
1514
  cancel(f) {
@@ -1517,28 +1517,28 @@ const dn = (e) => {
1517
1517
  }, {
1518
1518
  highWaterMark: 2
1519
1519
  });
1520
- }, Ut = 64 * 1024, { isFunction: Fe } = c, Ks = (({ Request: e, Response: t }) => ({
1520
+ }, Nt = 64 * 1024, { isFunction: je } = c, zs = (({ Request: e, Response: t }) => ({
1521
1521
  Request: e,
1522
1522
  Response: t
1523
1523
  }))(c.global), {
1524
1524
  ReadableStream: Tt,
1525
- TextEncoder: Nt
1526
- } = c.global, vt = (e, ...t) => {
1525
+ TextEncoder: vt
1526
+ } = c.global, xt = (e, ...t) => {
1527
1527
  try {
1528
1528
  return !!e(...t);
1529
1529
  } catch {
1530
1530
  return !1;
1531
1531
  }
1532
- }, zs = (e) => {
1532
+ }, Zs = (e) => {
1533
1533
  e = c.merge.call({
1534
1534
  skipUndefined: !0
1535
- }, Ks, e);
1536
- const { fetch: t, Request: n, Response: s } = e, r = t ? Fe(t) : typeof fetch == "function", i = Fe(n), o = Fe(s);
1535
+ }, zs, e);
1536
+ const { fetch: t, Request: n, Response: s } = e, r = t ? je(t) : typeof fetch == "function", i = je(n), o = je(s);
1537
1537
  if (!r)
1538
1538
  return !1;
1539
- const a = r && Fe(Tt), f = r && (typeof Nt == "function" ? /* @__PURE__ */ ((p) => (w) => p.encode(w))(new Nt()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), d = i && a && vt(() => {
1539
+ const a = r && je(Tt), f = r && (typeof vt == "function" ? /* @__PURE__ */ ((p) => (w) => p.encode(w))(new vt()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), u = i && a && xt(() => {
1540
1540
  let p = !1;
1541
- const w = new n(te.origin, {
1541
+ const w = new n(se.origin, {
1542
1542
  body: new Tt(),
1543
1543
  method: "POST",
1544
1544
  get duplex() {
@@ -1546,24 +1546,24 @@ const dn = (e) => {
1546
1546
  }
1547
1547
  }).headers.has("Content-Type");
1548
1548
  return p && !w;
1549
- }), l = o && a && vt(() => c.isReadableStream(new s("").body)), _ = {
1550
- stream: l && ((p) => p.body)
1549
+ }), d = o && a && xt(() => c.isReadableStream(new s("").body)), h = {
1550
+ stream: d && ((p) => p.body)
1551
1551
  };
1552
1552
  r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
1553
- !_[p] && (_[p] = (w, h) => {
1554
- let S = w && w[p];
1555
- if (S)
1556
- return S.call(w);
1557
- throw new b(`Response type '${p}' is not supported`, b.ERR_NOT_SUPPORT, h);
1553
+ !h[p] && (h[p] = (w, _) => {
1554
+ let D = w && w[p];
1555
+ if (D)
1556
+ return D.call(w);
1557
+ throw new C(`Response type '${p}' is not supported`, C.ERR_NOT_SUPPORT, _);
1558
1558
  });
1559
1559
  });
1560
- const C = async (p) => {
1560
+ const g = async (p) => {
1561
1561
  if (p == null)
1562
1562
  return 0;
1563
1563
  if (c.isBlob(p))
1564
1564
  return p.size;
1565
1565
  if (c.isSpecCompliantForm(p))
1566
- return (await new n(te.origin, {
1566
+ return (await new n(se.origin, {
1567
1567
  method: "POST",
1568
1568
  body: p
1569
1569
  }).arrayBuffer()).byteLength;
@@ -1571,117 +1571,117 @@ const dn = (e) => {
1571
1571
  return p.byteLength;
1572
1572
  if (c.isURLSearchParams(p) && (p = p + ""), c.isString(p))
1573
1573
  return (await f(p)).byteLength;
1574
- }, E = async (p, w) => {
1575
- const h = c.toFiniteNumber(p.getContentLength());
1576
- return h ?? C(w);
1574
+ }, R = async (p, w) => {
1575
+ const _ = c.toFiniteNumber(p.getContentLength());
1576
+ return _ ?? g(w);
1577
1577
  };
1578
1578
  return async (p) => {
1579
1579
  let {
1580
1580
  url: w,
1581
- method: h,
1582
- data: S,
1583
- signal: G,
1584
- cancelToken: v,
1585
- timeout: L,
1586
- onDownloadProgress: J,
1587
- onUploadProgress: k,
1588
- responseType: Y,
1589
- headers: ne,
1581
+ method: _,
1582
+ data: D,
1583
+ signal: P,
1584
+ cancelToken: L,
1585
+ timeout: x,
1586
+ onDownloadProgress: B,
1587
+ onUploadProgress: V,
1588
+ responseType: N,
1589
+ headers: ae,
1590
1590
  withCredentials: W = "same-origin",
1591
- fetchOptions: X
1592
- } = dn(p), q = t || fetch;
1593
- Y = Y ? (Y + "").toLowerCase() : "text";
1594
- let Z = Js([G, v && v.toAbortSignal()], L), O = null;
1595
- const D = Z && Z.unsubscribe && (() => {
1596
- Z.unsubscribe();
1591
+ fetchOptions: k
1592
+ } = un(p), Q = t || fetch;
1593
+ N = N ? (N + "").toLowerCase() : "text";
1594
+ let Y = Xs([P, L && L.toAbortSignal()], x), Z = null;
1595
+ const E = Y && Y.unsubscribe && (() => {
1596
+ Y.unsubscribe();
1597
1597
  });
1598
- let F;
1598
+ let I;
1599
1599
  try {
1600
- if (k && d && h !== "get" && h !== "head" && (F = await E(ne, S)) !== 0) {
1601
- let u = new n(w, {
1600
+ if (V && u && _ !== "get" && _ !== "head" && (I = await R(ae, D)) !== 0) {
1601
+ let l = new n(w, {
1602
1602
  method: "POST",
1603
- body: S,
1603
+ body: D,
1604
1604
  duplex: "half"
1605
1605
  }), y;
1606
- if (c.isFormData(S) && (y = u.headers.get("content-type")) && ne.setContentType(y), u.body) {
1607
- const [A, R] = Et(
1608
- F,
1609
- He(St(k))
1606
+ if (c.isFormData(D) && (y = l.headers.get("content-type")) && ae.setContentType(y), l.body) {
1607
+ const [A, T] = Et(
1608
+ I,
1609
+ Ie(Dt(V))
1610
1610
  );
1611
- S = At(u.body, Ut, A, R);
1611
+ D = Ut(l.body, Nt, A, T);
1612
1612
  }
1613
1613
  }
1614
1614
  c.isString(W) || (W = W ? "include" : "omit");
1615
- const x = i && "credentials" in n.prototype, se = {
1616
- ...X,
1617
- signal: Z,
1618
- method: h.toUpperCase(),
1619
- headers: ne.normalize().toJSON(),
1620
- body: S,
1615
+ const U = i && "credentials" in n.prototype, ne = {
1616
+ ...k,
1617
+ signal: Y,
1618
+ method: _.toUpperCase(),
1619
+ headers: ae.normalize().toJSON(),
1620
+ body: D,
1621
1621
  duplex: "half",
1622
- credentials: x ? W : void 0
1622
+ credentials: U ? W : void 0
1623
1623
  };
1624
- O = i && new n(w, se);
1625
- let g = await (i ? q(O, X) : q(w, se));
1626
- const H = l && (Y === "stream" || Y === "response");
1627
- if (l && (J || H && D)) {
1628
- const u = {};
1629
- ["status", "statusText", "headers"].forEach((j) => {
1630
- u[j] = g[j];
1624
+ Z = i && new n(w, ne);
1625
+ let $ = await (i ? Q(Z, k) : Q(w, ne));
1626
+ const b = d && (N === "stream" || N === "response");
1627
+ if (d && (B || b && E)) {
1628
+ const l = {};
1629
+ ["status", "statusText", "headers"].forEach((F) => {
1630
+ l[F] = $[F];
1631
1631
  });
1632
- const y = c.toFiniteNumber(g.headers.get("content-length")), [A, R] = J && Et(
1632
+ const y = c.toFiniteNumber($.headers.get("content-length")), [A, T] = B && Et(
1633
1633
  y,
1634
- He(St(J), !0)
1634
+ Ie(Dt(B), !0)
1635
1635
  ) || [];
1636
- g = new s(
1637
- At(g.body, Ut, A, () => {
1638
- R && R(), D && D();
1636
+ $ = new s(
1637
+ Ut($.body, Nt, A, () => {
1638
+ T && T(), E && E();
1639
1639
  }),
1640
- u
1640
+ l
1641
1641
  );
1642
1642
  }
1643
- Y = Y || "text";
1644
- let T = await _[c.findKey(_, Y) || "text"](g, p);
1645
- return !H && D && D(), await new Promise((u, y) => {
1646
- cn(u, y, {
1647
- data: T,
1648
- headers: oe.from(g.headers),
1649
- status: g.status,
1650
- statusText: g.statusText,
1643
+ N = N || "text";
1644
+ let G = await h[c.findKey(h, N) || "text"]($, p);
1645
+ return !b && E && E(), await new Promise((l, y) => {
1646
+ ln(l, y, {
1647
+ data: G,
1648
+ headers: oe.from($.headers),
1649
+ status: $.status,
1650
+ statusText: $.statusText,
1651
1651
  config: p,
1652
- request: O
1652
+ request: Z
1653
1653
  });
1654
1654
  });
1655
- } catch (x) {
1656
- throw D && D(), x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message) ? Object.assign(
1657
- new b("Network Error", b.ERR_NETWORK, p, O, x && x.response),
1655
+ } catch (U) {
1656
+ throw E && E(), U && U.name === "TypeError" && /Load failed|fetch/i.test(U.message) ? Object.assign(
1657
+ new C("Network Error", C.ERR_NETWORK, p, Z, U && U.response),
1658
1658
  {
1659
- cause: x.cause || x
1659
+ cause: U.cause || U
1660
1660
  }
1661
- ) : b.from(x, x && x.code, p, O, x && x.response);
1661
+ ) : C.from(U, U && U.code, p, Z, U && U.response);
1662
1662
  }
1663
1663
  };
1664
- }, Zs = /* @__PURE__ */ new Map(), un = (e) => {
1664
+ }, Ws = /* @__PURE__ */ new Map(), pn = (e) => {
1665
1665
  let t = e && e.env || {};
1666
1666
  const { fetch: n, Request: s, Response: r } = t, i = [
1667
1667
  s,
1668
1668
  r,
1669
1669
  n
1670
1670
  ];
1671
- let o = i.length, a = o, f, d, l = Zs;
1671
+ let o = i.length, a = o, f, u, d = Ws;
1672
1672
  for (; a--; )
1673
- f = i[a], d = l.get(f), d === void 0 && l.set(f, d = a ? /* @__PURE__ */ new Map() : zs(t)), l = d;
1674
- return d;
1673
+ f = i[a], u = d.get(f), u === void 0 && d.set(f, u = a ? /* @__PURE__ */ new Map() : Zs(t)), d = u;
1674
+ return u;
1675
1675
  };
1676
- un();
1677
- const lt = {
1678
- http: ms,
1679
- xhr: Gs,
1676
+ pn();
1677
+ const dt = {
1678
+ http: _s,
1679
+ xhr: Js,
1680
1680
  fetch: {
1681
- get: un
1681
+ get: pn
1682
1682
  }
1683
1683
  };
1684
- c.forEach(lt, (e, t) => {
1684
+ c.forEach(dt, (e, t) => {
1685
1685
  if (e) {
1686
1686
  try {
1687
1687
  Object.defineProperty(e, "name", { value: t });
@@ -1690,8 +1690,8 @@ c.forEach(lt, (e, t) => {
1690
1690
  Object.defineProperty(e, "adapterName", { value: t });
1691
1691
  }
1692
1692
  });
1693
- const xt = (e) => `- ${e}`, Ws = (e) => c.isFunction(e) || e === null || e === !1;
1694
- function Qs(e, t) {
1693
+ const Lt = (e) => `- ${e}`, Qs = (e) => c.isFunction(e) || e === null || e === !1;
1694
+ function er(e, t) {
1695
1695
  e = c.isArray(e) ? e : [e];
1696
1696
  const { length: n } = e;
1697
1697
  let s, r;
@@ -1699,76 +1699,76 @@ function Qs(e, t) {
1699
1699
  for (let o = 0; o < n; o++) {
1700
1700
  s = e[o];
1701
1701
  let a;
1702
- if (r = s, !Ws(s) && (r = lt[(a = String(s)).toLowerCase()], r === void 0))
1703
- throw new b(`Unknown adapter '${a}'`);
1702
+ if (r = s, !Qs(s) && (r = dt[(a = String(s)).toLowerCase()], r === void 0))
1703
+ throw new C(`Unknown adapter '${a}'`);
1704
1704
  if (r && (c.isFunction(r) || (r = r.get(t))))
1705
1705
  break;
1706
1706
  i[a || "#" + o] = r;
1707
1707
  }
1708
1708
  if (!r) {
1709
1709
  const o = Object.entries(i).map(
1710
- ([f, d]) => `adapter ${f} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1710
+ ([f, u]) => `adapter ${f} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
1711
1711
  );
1712
1712
  let a = n ? o.length > 1 ? `since :
1713
- ` + o.map(xt).join(`
1714
- `) : " " + xt(o[0]) : "as no adapter specified";
1715
- throw new b(
1713
+ ` + o.map(Lt).join(`
1714
+ `) : " " + Lt(o[0]) : "as no adapter specified";
1715
+ throw new C(
1716
1716
  "There is no suitable adapter to dispatch the request " + a,
1717
1717
  "ERR_NOT_SUPPORT"
1718
1718
  );
1719
1719
  }
1720
1720
  return r;
1721
1721
  }
1722
- const pn = {
1722
+ const fn = {
1723
1723
  /**
1724
1724
  * Resolve an adapter from a list of adapter names or functions.
1725
1725
  * @type {Function}
1726
1726
  */
1727
- getAdapter: Qs,
1727
+ getAdapter: er,
1728
1728
  /**
1729
1729
  * Exposes all known adapters
1730
1730
  * @type {Object<string, Function|Object>}
1731
1731
  */
1732
- adapters: lt
1732
+ adapters: dt
1733
1733
  };
1734
- function Ke(e) {
1734
+ function ze(e) {
1735
1735
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1736
- throw new Oe(null, e);
1736
+ throw new ke(null, e);
1737
1737
  }
1738
- function Lt(e) {
1739
- return Ke(e), e.headers = oe.from(e.headers), e.data = Ve.call(
1738
+ function Ot(e) {
1739
+ return ze(e), e.headers = oe.from(e.headers), e.data = Ke.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), pn.getAdapter(e.adapter || Pe.adapter, e)(e).then(function(s) {
1743
- return Ke(e), s.data = Ve.call(
1742
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), fn.getAdapter(e.adapter || Pe.adapter, e)(e).then(function(s) {
1743
+ return ze(e), s.data = Ke.call(
1744
1744
  e,
1745
1745
  e.transformResponse,
1746
1746
  s
1747
1747
  ), s.headers = oe.from(s.headers), s;
1748
1748
  }, function(s) {
1749
- return an(s) || (Ke(e), s && s.response && (s.response.data = Ve.call(
1749
+ return cn(s) || (ze(e), s && s.response && (s.response.data = Ke.call(
1750
1750
  e,
1751
1751
  e.transformResponse,
1752
1752
  s.response
1753
1753
  ), s.response.headers = oe.from(s.response.headers))), Promise.reject(s);
1754
1754
  });
1755
1755
  }
1756
- const fn = "1.13.5", Xe = {};
1756
+ const mn = "1.13.5", qe = {};
1757
1757
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1758
- Xe[e] = function(s) {
1758
+ qe[e] = function(s) {
1759
1759
  return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
1760
1760
  };
1761
1761
  });
1762
1762
  const Pt = {};
1763
- Xe.transitional = function(t, n, s) {
1763
+ qe.transitional = function(t, n, s) {
1764
1764
  function r(i, o) {
1765
- return "[Axios v" + fn + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
1765
+ return "[Axios v" + mn + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
1766
1766
  }
1767
1767
  return (i, o, a) => {
1768
1768
  if (t === !1)
1769
- throw new b(
1769
+ throw new C(
1770
1770
  r(o, " has been removed" + (n ? " in " + n : "")),
1771
- b.ERR_DEPRECATED
1771
+ C.ERR_DEPRECATED
1772
1772
  );
1773
1773
  return n && !Pt[o] && (Pt[o] = !0, console.warn(
1774
1774
  r(
@@ -1778,12 +1778,12 @@ Xe.transitional = function(t, n, s) {
1778
1778
  )), t ? t(i, o, a) : !0;
1779
1779
  };
1780
1780
  };
1781
- Xe.spelling = function(t) {
1781
+ qe.spelling = function(t) {
1782
1782
  return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
1783
1783
  };
1784
- function er(e, t, n) {
1784
+ function tr(e, t, n) {
1785
1785
  if (typeof e != "object")
1786
- throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
1786
+ throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
1787
1787
  const s = Object.keys(e);
1788
1788
  let r = s.length;
1789
1789
  for (; r-- > 0; ) {
@@ -1791,22 +1791,22 @@ function er(e, t, n) {
1791
1791
  if (o) {
1792
1792
  const a = e[i], f = a === void 0 || o(a, i, e);
1793
1793
  if (f !== !0)
1794
- throw new b("option " + i + " must be " + f, b.ERR_BAD_OPTION_VALUE);
1794
+ throw new C("option " + i + " must be " + f, C.ERR_BAD_OPTION_VALUE);
1795
1795
  continue;
1796
1796
  }
1797
1797
  if (n !== !0)
1798
- throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
1798
+ throw new C("Unknown option " + i, C.ERR_BAD_OPTION);
1799
1799
  }
1800
1800
  }
1801
- const Ye = {
1802
- assertOptions: er,
1803
- validators: Xe
1804
- }, ue = Ye.validators;
1805
- let ye = class {
1801
+ const Me = {
1802
+ assertOptions: tr,
1803
+ validators: qe
1804
+ }, pe = Me.validators;
1805
+ let ge = class {
1806
1806
  constructor(t) {
1807
1807
  this.defaults = t || {}, this.interceptors = {
1808
- request: new bt(),
1809
- response: new bt()
1808
+ request: new Rt(),
1809
+ response: new Rt()
1810
1810
  };
1811
1811
  }
1812
1812
  /**
@@ -1835,21 +1835,21 @@ let ye = class {
1835
1835
  }
1836
1836
  }
1837
1837
  _request(t, n) {
1838
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Ce(this.defaults, n);
1838
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = be(this.defaults, n);
1839
1839
  const { transitional: s, paramsSerializer: r, headers: i } = n;
1840
- s !== void 0 && Ye.assertOptions(s, {
1841
- silentJSONParsing: ue.transitional(ue.boolean),
1842
- forcedJSONParsing: ue.transitional(ue.boolean),
1843
- clarifyTimeoutError: ue.transitional(ue.boolean),
1844
- legacyInterceptorReqResOrdering: ue.transitional(ue.boolean)
1840
+ s !== void 0 && Me.assertOptions(s, {
1841
+ silentJSONParsing: pe.transitional(pe.boolean),
1842
+ forcedJSONParsing: pe.transitional(pe.boolean),
1843
+ clarifyTimeoutError: pe.transitional(pe.boolean),
1844
+ legacyInterceptorReqResOrdering: pe.transitional(pe.boolean)
1845
1845
  }, !1), r != null && (c.isFunction(r) ? n.paramsSerializer = {
1846
1846
  serialize: r
1847
- } : Ye.assertOptions(r, {
1848
- encode: ue.function,
1849
- serialize: ue.function
1850
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ye.assertOptions(n, {
1851
- baseUrl: ue.spelling("baseURL"),
1852
- withXsrfToken: ue.spelling("withXSRFToken")
1847
+ } : Me.assertOptions(r, {
1848
+ encode: pe.function,
1849
+ serialize: pe.function
1850
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Me.assertOptions(n, {
1851
+ baseUrl: pe.spelling("baseURL"),
1852
+ withXsrfToken: pe.spelling("withXSRFToken")
1853
1853
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1854
1854
  let o = i && c.merge(
1855
1855
  i.common,
@@ -1867,49 +1867,49 @@ let ye = class {
1867
1867
  if (typeof w.runWhen == "function" && w.runWhen(n) === !1)
1868
1868
  return;
1869
1869
  f = f && w.synchronous;
1870
- const h = n.transitional || at;
1871
- h && h.legacyInterceptorReqResOrdering ? a.unshift(w.fulfilled, w.rejected) : a.push(w.fulfilled, w.rejected);
1870
+ const _ = n.transitional || ct;
1871
+ _ && _.legacyInterceptorReqResOrdering ? a.unshift(w.fulfilled, w.rejected) : a.push(w.fulfilled, w.rejected);
1872
1872
  });
1873
- const d = [];
1873
+ const u = [];
1874
1874
  this.interceptors.response.forEach(function(w) {
1875
- d.push(w.fulfilled, w.rejected);
1875
+ u.push(w.fulfilled, w.rejected);
1876
1876
  });
1877
- let l, _ = 0, C;
1877
+ let d, h = 0, g;
1878
1878
  if (!f) {
1879
- const p = [Lt.bind(this), void 0];
1880
- for (p.unshift(...a), p.push(...d), C = p.length, l = Promise.resolve(n); _ < C; )
1881
- l = l.then(p[_++], p[_++]);
1882
- return l;
1879
+ const p = [Ot.bind(this), void 0];
1880
+ for (p.unshift(...a), p.push(...u), g = p.length, d = Promise.resolve(n); h < g; )
1881
+ d = d.then(p[h++], p[h++]);
1882
+ return d;
1883
1883
  }
1884
- C = a.length;
1885
- let E = n;
1886
- for (; _ < C; ) {
1887
- const p = a[_++], w = a[_++];
1884
+ g = a.length;
1885
+ let R = n;
1886
+ for (; h < g; ) {
1887
+ const p = a[h++], w = a[h++];
1888
1888
  try {
1889
- E = p(E);
1890
- } catch (h) {
1891
- w.call(this, h);
1889
+ R = p(R);
1890
+ } catch (_) {
1891
+ w.call(this, _);
1892
1892
  break;
1893
1893
  }
1894
1894
  }
1895
1895
  try {
1896
- l = Lt.call(this, E);
1896
+ d = Ot.call(this, R);
1897
1897
  } catch (p) {
1898
1898
  return Promise.reject(p);
1899
1899
  }
1900
- for (_ = 0, C = d.length; _ < C; )
1901
- l = l.then(d[_++], d[_++]);
1902
- return l;
1900
+ for (h = 0, g = u.length; h < g; )
1901
+ d = d.then(u[h++], u[h++]);
1902
+ return d;
1903
1903
  }
1904
1904
  getUri(t) {
1905
- t = Ce(this.defaults, t);
1906
- const n = ln(t.baseURL, t.url, t.allowAbsoluteUrls);
1907
- return rn(n, t.params, t.paramsSerializer);
1905
+ t = be(this.defaults, t);
1906
+ const n = dn(t.baseURL, t.url, t.allowAbsoluteUrls);
1907
+ return on(n, t.params, t.paramsSerializer);
1908
1908
  }
1909
1909
  };
1910
1910
  c.forEach(["delete", "get", "head", "options"], function(t) {
1911
- ye.prototype[t] = function(n, s) {
1912
- return this.request(Ce(s || {}, {
1911
+ ge.prototype[t] = function(n, s) {
1912
+ return this.request(be(s || {}, {
1913
1913
  method: t,
1914
1914
  url: n,
1915
1915
  data: (s || {}).data
@@ -1919,7 +1919,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
1919
1919
  c.forEach(["post", "put", "patch"], function(t) {
1920
1920
  function n(s) {
1921
1921
  return function(i, o, a) {
1922
- return this.request(Ce(a || {}, {
1922
+ return this.request(be(a || {}, {
1923
1923
  method: t,
1924
1924
  headers: s ? {
1925
1925
  "Content-Type": "multipart/form-data"
@@ -1929,9 +1929,9 @@ c.forEach(["post", "put", "patch"], function(t) {
1929
1929
  }));
1930
1930
  };
1931
1931
  }
1932
- ye.prototype[t] = n(), ye.prototype[t + "Form"] = n(!0);
1932
+ ge.prototype[t] = n(), ge.prototype[t + "Form"] = n(!0);
1933
1933
  });
1934
- let tr = class mn {
1934
+ let nr = class _n {
1935
1935
  constructor(t) {
1936
1936
  if (typeof t != "function")
1937
1937
  throw new TypeError("executor must be a function.");
@@ -1955,7 +1955,7 @@ let tr = class mn {
1955
1955
  s.unsubscribe(i);
1956
1956
  }, o;
1957
1957
  }, t(function(i, o, a) {
1958
- s.reason || (s.reason = new Oe(i, o, a), n(s.reason));
1958
+ s.reason || (s.reason = new ke(i, o, a), n(s.reason));
1959
1959
  });
1960
1960
  }
1961
1961
  /**
@@ -1997,22 +1997,22 @@ let tr = class mn {
1997
1997
  static source() {
1998
1998
  let t;
1999
1999
  return {
2000
- token: new mn(function(r) {
2000
+ token: new _n(function(r) {
2001
2001
  t = r;
2002
2002
  }),
2003
2003
  cancel: t
2004
2004
  };
2005
2005
  }
2006
2006
  };
2007
- function nr(e) {
2007
+ function sr(e) {
2008
2008
  return function(n) {
2009
2009
  return e.apply(null, n);
2010
2010
  };
2011
2011
  }
2012
- function sr(e) {
2012
+ function rr(e) {
2013
2013
  return c.isObject(e) && e.isAxiosError === !0;
2014
2014
  }
2015
- const et = {
2015
+ const tt = {
2016
2016
  Continue: 100,
2017
2017
  SwitchingProtocols: 101,
2018
2018
  Processing: 102,
@@ -2083,64 +2083,64 @@ const et = {
2083
2083
  SslHandshakeFailed: 525,
2084
2084
  InvalidSslCertificate: 526
2085
2085
  };
2086
- Object.entries(et).forEach(([e, t]) => {
2087
- et[t] = e;
2086
+ Object.entries(tt).forEach(([e, t]) => {
2087
+ tt[t] = e;
2088
2088
  });
2089
- function _n(e) {
2090
- const t = new ye(e), n = qt(ye.prototype.request, t);
2091
- return c.extend(n, ye.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
2092
- return _n(Ce(e, r));
2089
+ function hn(e) {
2090
+ const t = new ge(e), n = Vt(ge.prototype.request, t);
2091
+ return c.extend(n, ge.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
2092
+ return hn(be(e, r));
2093
2093
  }, n;
2094
2094
  }
2095
- const M = _n(Pe);
2096
- M.Axios = ye;
2097
- M.CanceledError = Oe;
2098
- M.CancelToken = tr;
2099
- M.isCancel = an;
2100
- M.VERSION = fn;
2101
- M.toFormData = Je;
2102
- M.AxiosError = b;
2103
- M.Cancel = M.CanceledError;
2104
- M.all = function(t) {
2095
+ const j = hn(Pe);
2096
+ j.Axios = ge;
2097
+ j.CanceledError = ke;
2098
+ j.CancelToken = nr;
2099
+ j.isCancel = cn;
2100
+ j.VERSION = mn;
2101
+ j.toFormData = Xe;
2102
+ j.AxiosError = C;
2103
+ j.Cancel = j.CanceledError;
2104
+ j.all = function(t) {
2105
2105
  return Promise.all(t);
2106
2106
  };
2107
- M.spread = nr;
2108
- M.isAxiosError = sr;
2109
- M.mergeConfig = Ce;
2110
- M.AxiosHeaders = oe;
2111
- M.formToJSON = (e) => on(c.isHTMLForm(e) ? new FormData(e) : e);
2112
- M.getAdapter = pn.getAdapter;
2113
- M.HttpStatusCode = et;
2114
- M.default = M;
2107
+ j.spread = sr;
2108
+ j.isAxiosError = rr;
2109
+ j.mergeConfig = be;
2110
+ j.AxiosHeaders = oe;
2111
+ j.formToJSON = (e) => an(c.isHTMLForm(e) ? new FormData(e) : e);
2112
+ j.getAdapter = fn.getAdapter;
2113
+ j.HttpStatusCode = tt;
2114
+ j.default = j;
2115
2115
  const {
2116
- Axios: Gr,
2117
- AxiosError: Jr,
2118
- CanceledError: Xr,
2119
- isCancel: qr,
2120
- CancelToken: Vr,
2121
- VERSION: Kr,
2122
- all: zr,
2123
- Cancel: Zr,
2124
- isAxiosError: Wr,
2125
- spread: Qr,
2126
- toFormData: ei,
2127
- AxiosHeaders: ti,
2128
- HttpStatusCode: ni,
2129
- formToJSON: si,
2130
- getAdapter: ri,
2131
- mergeConfig: ii
2132
- } = M, Ot = (e) => {
2116
+ Axios: Jr,
2117
+ AxiosError: Xr,
2118
+ CanceledError: qr,
2119
+ isCancel: Vr,
2120
+ CancelToken: Kr,
2121
+ VERSION: zr,
2122
+ all: Zr,
2123
+ Cancel: Wr,
2124
+ isAxiosError: Qr,
2125
+ spread: ei,
2126
+ toFormData: ti,
2127
+ AxiosHeaders: ni,
2128
+ HttpStatusCode: si,
2129
+ formToJSON: ri,
2130
+ getAdapter: ii,
2131
+ mergeConfig: oi
2132
+ } = j, kt = (e) => {
2133
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 C = t;
2138
- t = l ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), n.forEach((E) => E(t, C));
2134
+ const n = /* @__PURE__ */ new Set(), s = (u, d) => {
2135
+ const h = typeof u == "function" ? u(t) : u;
2136
+ if (!Object.is(h, t)) {
2137
+ const g = t;
2138
+ t = d ?? (typeof h != "object" || h === null) ? h : Object.assign({}, t, h), n.forEach((R) => R(t, g));
2139
2139
  }
2140
- }, r = () => t, a = { setState: s, getState: r, getInitialState: () => f, subscribe: (d) => (n.add(d), () => n.delete(d)) }, f = t = e(s, r, a);
2140
+ }, r = () => t, a = { setState: s, getState: r, getInitialState: () => f, subscribe: (u) => (n.add(u), () => n.delete(u)) }, f = t = e(s, r, a);
2141
2141
  return a;
2142
- }, rr = ((e) => e ? Ot(e) : Ot), ir = (e) => e;
2143
- function or(e, t = ir) {
2142
+ }, ir = ((e) => e ? kt(e) : kt), or = (e) => e;
2143
+ function ar(e, t = or) {
2144
2144
  const n = Te.useSyncExternalStore(
2145
2145
  e.subscribe,
2146
2146
  Te.useCallback(() => t(e.getState()), [e, t]),
@@ -2148,10 +2148,10 @@ function or(e, t = ir) {
2148
2148
  );
2149
2149
  return Te.useDebugValue(n), n;
2150
2150
  }
2151
- const kt = (e) => {
2152
- const t = rr(e), n = (s) => or(t, s);
2151
+ const Ft = (e) => {
2152
+ const t = ir(e), n = (s) => ar(t, s);
2153
2153
  return Object.assign(n, t), n;
2154
- }, ar = ((e) => e ? kt(e) : kt), be = ar((e) => ({
2154
+ }, cr = ((e) => e ? Ft(e) : Ft), Re = cr((e) => ({
2155
2155
  newsSelectedCandles: null,
2156
2156
  newsPlayEndTimestamp: null,
2157
2157
  newsTargetCandle: null,
@@ -2162,7 +2162,7 @@ const kt = (e) => {
2162
2162
  setNewsTargetCandle: (t) => e({ newsTargetCandle: t }),
2163
2163
  setGapCount: (t) => e({ gapCount: t }),
2164
2164
  setReplayMode: (t) => e({ isReplayMode: t })
2165
- })), cr = {
2165
+ })), lr = {
2166
2166
  "1D": "D1",
2167
2167
  D: "D1",
2168
2168
  240: "H4",
@@ -2172,7 +2172,7 @@ const kt = (e) => {
2172
2172
  15: "M15",
2173
2173
  5: "M5",
2174
2174
  1: "M1"
2175
- }, tt = (e) => ({
2175
+ }, nt = (e) => ({
2176
2176
  1: 60,
2177
2177
  5: 300,
2178
2178
  // 5 minutes
@@ -2182,19 +2182,19 @@ const kt = (e) => {
2182
2182
  // 30 minutes
2183
2183
  60: 3600
2184
2184
  // 60 minutes (1 hour)
2185
- })[e] || 3600, hn = [10, 15, 20, 25, 30, 35, 40, 45, 50], wn = $t(null), lr = () => {
2186
- const e = Gt(wn);
2185
+ })[e] || 3600, wn = [10, 15, 20, 25, 30, 35, 40, 45, 50], yn = Gt(null), dr = () => {
2186
+ const e = Jt(yn);
2187
2187
  if (!e)
2188
2188
  throw new Error("useWidgetContext must be used inside WidgetProvider");
2189
2189
  return e;
2190
- }, dr = ({
2190
+ }, ur = ({
2191
2191
  children: e,
2192
2192
  selectedTimeframe: t,
2193
2193
  setSelectedTimeframe: n,
2194
2194
  currentSymbol: s,
2195
2195
  setCurrentSymbol: r
2196
2196
  }) => /* @__PURE__ */ m.jsx(
2197
- wn.Provider,
2197
+ yn.Provider,
2198
2198
  {
2199
2199
  value: {
2200
2200
  currentSymbol: s,
@@ -2205,17 +2205,17 @@ const kt = (e) => {
2205
2205
  children: e
2206
2206
  }
2207
2207
  );
2208
- const yn = (...e) => e.filter((t, n, s) => !!t && t.trim() !== "" && s.indexOf(t) === n).join(" ").trim();
2209
- const ur = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2210
- const pr = (e) => e.replace(
2208
+ const gn = (...e) => e.filter((t, n, s) => !!t && t.trim() !== "" && s.indexOf(t) === n).join(" ").trim();
2209
+ const pr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2210
+ const fr = (e) => e.replace(
2211
2211
  /^([A-Z])|[\s-_]+(\w)/g,
2212
2212
  (t, n, s) => s ? s.toUpperCase() : n.toLowerCase()
2213
2213
  );
2214
- const Ft = (e) => {
2215
- const t = pr(e);
2214
+ const jt = (e) => {
2215
+ const t = fr(e);
2216
2216
  return t.charAt(0).toUpperCase() + t.slice(1);
2217
2217
  };
2218
- var fr = {
2218
+ var mr = {
2219
2219
  xmlns: "http://www.w3.org/2000/svg",
2220
2220
  width: 24,
2221
2221
  height: 24,
@@ -2226,13 +2226,13 @@ var fr = {
2226
2226
  strokeLinecap: "round",
2227
2227
  strokeLinejoin: "round"
2228
2228
  };
2229
- const mr = (e) => {
2229
+ const _r = (e) => {
2230
2230
  for (const t in e)
2231
2231
  if (t.startsWith("aria-") || t === "role" || t === "title")
2232
2232
  return !0;
2233
2233
  return !1;
2234
2234
  };
2235
- const _r = Jt(
2235
+ const hr = Xt(
2236
2236
  ({
2237
2237
  color: e = "currentColor",
2238
2238
  size: t = 24,
@@ -2242,43 +2242,43 @@ const _r = Jt(
2242
2242
  children: i,
2243
2243
  iconNode: o,
2244
2244
  ...a
2245
- }, f) => ze(
2245
+ }, f) => Ze(
2246
2246
  "svg",
2247
2247
  {
2248
2248
  ref: f,
2249
- ...fr,
2249
+ ...mr,
2250
2250
  width: t,
2251
2251
  height: t,
2252
2252
  stroke: e,
2253
2253
  strokeWidth: s ? Number(n) * 24 / Number(t) : n,
2254
- className: yn("lucide", r),
2255
- ...!i && !mr(a) && { "aria-hidden": "true" },
2254
+ className: gn("lucide", r),
2255
+ ...!i && !_r(a) && { "aria-hidden": "true" },
2256
2256
  ...a
2257
2257
  },
2258
2258
  [
2259
- ...o.map(([d, l]) => ze(d, l)),
2259
+ ...o.map(([u, d]) => Ze(u, d)),
2260
2260
  ...Array.isArray(i) ? i : [i]
2261
2261
  ]
2262
2262
  )
2263
2263
  );
2264
- const dt = (e, t) => {
2265
- const n = Jt(
2266
- ({ className: s, ...r }, i) => ze(_r, {
2264
+ const ut = (e, t) => {
2265
+ const n = Xt(
2266
+ ({ className: s, ...r }, i) => Ze(hr, {
2267
2267
  ref: i,
2268
2268
  iconNode: t,
2269
- className: yn(
2270
- `lucide-${ur(Ft(e))}`,
2269
+ className: gn(
2270
+ `lucide-${pr(jt(e))}`,
2271
2271
  `lucide-${e}`,
2272
2272
  s
2273
2273
  ),
2274
2274
  ...r
2275
2275
  })
2276
2276
  );
2277
- return n.displayName = Ft(e), n;
2277
+ return n.displayName = jt(e), n;
2278
2278
  };
2279
- const hr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], wr = dt("chevron-down", hr);
2280
- const yr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], gr = dt("chevron-left", yr);
2281
- const Cr = [
2279
+ const wr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], yr = ut("chevron-down", wr);
2280
+ const gr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Cr = ut("chevron-left", gr);
2281
+ const br = [
2282
2282
  [
2283
2283
  "path",
2284
2284
  {
@@ -2288,20 +2288,20 @@ const Cr = [
2288
2288
  ],
2289
2289
  ["path", { d: "M19.8 17.8a7.5 7.5 0 0 0 .003-10.603", key: "yol142" }],
2290
2290
  ["path", { d: "M17 15a3.5 3.5 0 0 0-.025-4.975", key: "ssbmkc" }]
2291
- ], br = dt("speech", Cr), nt = (e, t) => {
2291
+ ], Rr = ut("speech", br), st = (e, t) => {
2292
2292
  if (!e || e === "-" || e.trim() === "" || !t || t === "-" || t.trim() === "")
2293
2293
  return "news-widget__orange";
2294
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
2295
  return r > i ? "news-widget__green" : r === i ? "news-widget__orange" : "news-widget__red";
2296
- }, jt = (e) => e.trim().replaceAll(" ", "").replaceAll("_", ""), Rr = new Intl.DateTimeFormat("en-US", {
2296
+ }, Bt = (e) => e.trim().replaceAll(" ", "").replaceAll("_", ""), Sr = new Intl.DateTimeFormat("en-US", {
2297
2297
  year: "numeric",
2298
2298
  month: "long",
2299
2299
  day: "2-digit",
2300
2300
  hour: "2-digit",
2301
2301
  minute: "2-digit",
2302
2302
  hour12: !1
2303
- }), gn = (e) => {
2304
- const t = Rr.formatToParts(e), n = (s) => t.find((r) => r.type === s)?.value ?? "";
2303
+ }), Cn = (e) => {
2304
+ const t = Sr.formatToParts(e), n = (s) => t.find((r) => r.type === s)?.value ?? "";
2305
2305
  return `${n("year")} ${n("month")} ${n("day")}, ${n("hour")}:${n("minute")}`;
2306
2306
  }, Er = ({
2307
2307
  currency: e,
@@ -2315,7 +2315,7 @@ const Cr = [
2315
2315
  width: t,
2316
2316
  height: t
2317
2317
  }
2318
- ), Sr = ({
2318
+ ), Dr = ({
2319
2319
  title: e,
2320
2320
  date: t,
2321
2321
  forecast: n,
@@ -2325,7 +2325,7 @@ const Cr = [
2325
2325
  /* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__header", children: [
2326
2326
  r && /* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__currency_icon", children: /* @__PURE__ */ m.jsx(Er, { currency: r }) }),
2327
2327
  /* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__meta", children: [
2328
- /* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__date", children: gn(new Date(t ?? 0)) }),
2328
+ /* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__date", children: Cn(new Date(t ?? 0)) }),
2329
2329
  /* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__title", children: e })
2330
2330
  ] })
2331
2331
  ] }),
@@ -2335,7 +2335,7 @@ const Cr = [
2335
2335
  /* @__PURE__ */ m.jsx(
2336
2336
  "div",
2337
2337
  {
2338
- className: `news-widget_news_card__font_semibold ${nt(String(s), String(n))}`,
2338
+ className: `news-widget_news_card__font_semibold ${st(String(s), String(n))}`,
2339
2339
  children: s || "-"
2340
2340
  }
2341
2341
  )
@@ -2346,7 +2346,7 @@ const Cr = [
2346
2346
  ] })
2347
2347
  ] })
2348
2348
  ] });
2349
- function Dr(e) {
2349
+ function Ar(e) {
2350
2350
  switch (e) {
2351
2351
  case "post":
2352
2352
  return "news-widget__bg_green";
@@ -2356,7 +2356,7 @@ function Dr(e) {
2356
2356
  return "news-widget__bg_orange";
2357
2357
  }
2358
2358
  }
2359
- const Ar = ({
2359
+ const Ur = ({
2360
2360
  eventData: e,
2361
2361
  showStatus: t = !0,
2362
2362
  showPreviousValues: n = !1,
@@ -2368,7 +2368,7 @@ const Ar = ({
2368
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: [
2369
2369
  /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__timestamp_row", children: [
2370
2370
  /* @__PURE__ */ m.jsxs("p", { className: "news-widget_event_details_card__timestamp", children: [
2371
- e?.timestamp && gn(
2371
+ e?.timestamp && Cn(
2372
2372
  new Date(e?.timestamp ?? 0)
2373
2373
  ),
2374
2374
  " "
@@ -2378,7 +2378,7 @@ const Ar = ({
2378
2378
  /* @__PURE__ */ m.jsx(
2379
2379
  "div",
2380
2380
  {
2381
- className: `news-widget_event_details_card__status ${Dr(e.status)}`
2381
+ className: `news-widget_event_details_card__status ${Ar(e.status)}`
2382
2382
  }
2383
2383
  ),
2384
2384
  e.status === "post" && "Actual Released",
@@ -2404,7 +2404,7 @@ const Ar = ({
2404
2404
  e?.event_time && ` ${e?.event_time}`
2405
2405
  ] }),
2406
2406
  e?.slug == "FOMC" && /* @__PURE__ */ m.jsx(
2407
- br,
2407
+ Rr,
2408
2408
  {
2409
2409
  stroke: "url(#gradient)",
2410
2410
  className: "news-widget_event_details_card__speech_icon"
@@ -2419,7 +2419,7 @@ const Ar = ({
2419
2419
  /* @__PURE__ */ m.jsx(
2420
2420
  "span",
2421
2421
  {
2422
- className: `news-widget_event_details_card__text_bold ${nt(e?.actual, e?.forecast)}`,
2422
+ className: `news-widget_event_details_card__text_bold ${st(e?.actual, e?.forecast)}`,
2423
2423
  children: e?.actual || "Soon"
2424
2424
  }
2425
2425
  )
@@ -2435,7 +2435,7 @@ const Ar = ({
2435
2435
  /* @__PURE__ */ m.jsx(
2436
2436
  "span",
2437
2437
  {
2438
- className: `news-widget_event_details_card__text_bold ${nt(
2438
+ className: `news-widget_event_details_card__text_bold ${st(
2439
2439
  e?.similar?.referenceEvent?.previous_actual,
2440
2440
  e?.similar?.referenceEvent?.previous_forecast
2441
2441
  )}`,
@@ -2477,7 +2477,7 @@ const Ar = ({
2477
2477
  ] }),
2478
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(
2479
2479
  (i, o) => /* @__PURE__ */ m.jsx(
2480
- Sr,
2480
+ Dr,
2481
2481
  {
2482
2482
  title: i.event_name,
2483
2483
  date: new Date(i.timestamp),
@@ -2491,16 +2491,16 @@ const Ar = ({
2491
2491
  ] })
2492
2492
  }
2493
2493
  )
2494
- ] }), Ur = ({
2494
+ ] }), Nr = ({
2495
2495
  newsDetail: e,
2496
2496
  children: t,
2497
2497
  isCompared: n
2498
2498
  }) => {
2499
- const [s, r] = le(!1);
2499
+ const [s, r] = de(!1);
2500
2500
  return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details__container news-widget_event_details__container_sm", children: [
2501
2501
  e && /* @__PURE__ */ m.jsxs("div", { style: { position: "relative" }, children: [
2502
2502
  /* @__PURE__ */ m.jsx(
2503
- Ar,
2503
+ Ur,
2504
2504
  {
2505
2505
  eventData: e.event,
2506
2506
  showPreviousValues: !n,
@@ -2514,7 +2514,7 @@ const Ar = ({
2514
2514
  type: "button",
2515
2515
  className: `news-widget__button news-widget_event_details__ghost_button ${s ? "news-widget_event_details__ghost_button_open" : ""}`,
2516
2516
  onClick: () => r(!s),
2517
- children: /* @__PURE__ */ m.jsx(wr, { className: "news-widget_event_details__icon" })
2517
+ children: /* @__PURE__ */ m.jsx(yr, { className: "news-widget_event_details__icon" })
2518
2518
  }
2519
2519
  )
2520
2520
  ] }),
@@ -2651,79 +2651,79 @@ const Ar = ({
2651
2651
  { name: "BCO_USD", type: "CFD", pipLocation: -2 },
2652
2652
  { name: "AUD_JPY", type: "CURRENCY", pipLocation: -2 }
2653
2653
  ];
2654
- function Nr(e, t, n = 1) {
2654
+ function vr(e, t, n = 1) {
2655
2655
  if (t === 0 || !isFinite(t)) return n;
2656
2656
  const s = e / t;
2657
2657
  return isFinite(s) ? s : n;
2658
2658
  }
2659
- function Bt(e) {
2659
+ function Yt(e) {
2660
2660
  if (e.length === 0) return 0;
2661
2661
  const t = [...e].sort((s, r) => s - r), n = Math.floor(t.length / 2);
2662
2662
  return t.length % 2 !== 0 ? t[n] : (t[n - 1] + t[n]) / 2;
2663
2663
  }
2664
- function vr(e, t, n = []) {
2664
+ function xr(e, t, n = []) {
2665
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 = Bt(r), o = Bt(s), a = Nr(o, i), f = e[0].o, d = t.c;
2667
- return e.map((l) => {
2668
- const _ = (l.o - f) * a + d, C = (l.h - f) * a + d, E = (l.l - f) * a + d, p = (l.c - f) * a + d;
2666
+ const s = n.map((d) => Math.abs(d.c - d.o)), r = e.map((d) => Math.abs(d.c - d.o)), i = Yt(r), o = Yt(s), a = vr(o, i), f = e[0].o, u = t.c;
2667
+ return e.map((d) => {
2668
+ const h = (d.o - f) * a + u, g = (d.h - f) * a + u, R = (d.l - f) * a + u, p = (d.c - f) * a + u;
2669
2669
  return {
2670
- o: _,
2671
- h: Math.max(C, _, p),
2672
- l: Math.min(E, _, p),
2670
+ o: h,
2671
+ h: Math.max(g, h, p),
2672
+ l: Math.min(R, h, p),
2673
2673
  c: p
2674
2674
  };
2675
2675
  });
2676
2676
  }
2677
- const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 : parseInt(e, 10) * 60, st = 8, Cn = 4, rt = 5, bn = (e) => {
2678
- const t = new Date(e + st * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
2679
- return n === 0 ? !1 : n === 1 ? s >= rt : n === 6 ? s <= Cn : !0;
2680
- }, Rn = (e) => {
2681
- const t = new Date(e + st * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
2682
- if (n === 0 || n === 1 && s < rt || n === 6 && s >= Cn) {
2677
+ const Ce = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 : parseInt(e, 10) * 60, rt = 8, bn = 4, it = 5, Rn = (e) => {
2678
+ const t = new Date(e + rt * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
2679
+ return n === 0 ? !1 : n === 1 ? s >= it : n === 6 ? s <= bn : !0;
2680
+ }, Sn = (e) => {
2681
+ const t = new Date(e + rt * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
2682
+ if (n === 0 || n === 1 && s < it || n === 6 && s >= bn) {
2683
2683
  const r = (8 - n) % 7;
2684
- return t.setUTCDate(t.getUTCDate() + r), t.setUTCHours(rt, 0, 0, 0), t.getTime() - st * 60 * 60 * 1e3;
2684
+ return t.setUTCDate(t.getUTCDate() + r), t.setUTCHours(it, 0, 0, 0), t.getTime() - rt * 60 * 60 * 1e3;
2685
2685
  }
2686
2686
  return e;
2687
- }, xr = (e, t, n) => {
2688
- const s = ge(t) * 1e3, r = [];
2687
+ }, Lr = (e, t, n) => {
2688
+ const s = Ce(t) * 1e3, r = [];
2689
2689
  let i = e;
2690
2690
  for (let o = 0; o < n; o++)
2691
- i += s, bn(i) || (i = Rn(i)), r.push(i);
2691
+ i += s, Rn(i) || (i = Sn(i)), r.push(i);
2692
2692
  return r;
2693
- }, Yt = (e, t, n, s) => {
2693
+ }, Mt = (e, t, n, s) => {
2694
2694
  if (n <= 0) return [];
2695
2695
  if (s === "24x7") {
2696
- const i = ge(t) * 1e3;
2696
+ const i = Ce(t) * 1e3;
2697
2697
  return Array.from(
2698
2698
  { length: n },
2699
2699
  (o, a) => e + (a + 1) * i
2700
2700
  );
2701
2701
  }
2702
2702
  if (s === "1700-1700")
2703
- return xr(e, t, n);
2704
- const r = ge(t) * 1e3;
2703
+ return Lr(e, t, n);
2704
+ const r = Ce(t) * 1e3;
2705
2705
  return Array.from(
2706
2706
  { length: n },
2707
2707
  (i, o) => e + (o + 1) * r
2708
2708
  );
2709
- }, Lr = (e, t, n, s) => {
2709
+ }, Or = (e, t, n, s) => {
2710
2710
  if (s === "24x7") {
2711
- const i = ge(n) * 1e3;
2711
+ const i = Ce(n) * 1e3;
2712
2712
  return Math.max(
2713
2713
  0,
2714
2714
  Math.floor((t - e) / i)
2715
2715
  );
2716
2716
  }
2717
2717
  if (s === "1700-1700") {
2718
- const i = ge(n) * 1e3;
2718
+ const i = Ce(n) * 1e3;
2719
2719
  let o = 0, a = e;
2720
2720
  for (; a < t; )
2721
- a += i, bn(a) || (a = Rn(a)), a <= t && o++;
2721
+ a += i, Rn(a) || (a = Sn(a)), a <= t && o++;
2722
2722
  return o;
2723
2723
  }
2724
- const r = ge(n) * 1e3;
2724
+ const r = Ce(n) * 1e3;
2725
2725
  return Math.max(0, Math.floor((t - e) / r));
2726
- }, ut = [
2726
+ }, pt = [
2727
2727
  {
2728
2728
  ticker: "EUR_JPY",
2729
2729
  display_name: "EURJPY",
@@ -3135,23 +3135,23 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3135
3135
  symbol: o,
3136
3136
  resolvedTheme: a
3137
3137
  }) => {
3138
- const f = be(
3138
+ const f = Re(
3139
3139
  (p) => p.newsSelectedCandles
3140
- ), d = be((p) => p.newsTargetCandle), l = be(
3140
+ ), u = Re((p) => p.newsTargetCandle), d = Re(
3141
3141
  (p) => p.newsPlayEndTimestamp
3142
- ), _ = be((p) => p.gapCount), C = fe(f), E = fe(null);
3143
- return me(() => {
3142
+ ), h = Re((p) => p.gapCount), g = me(f), R = me(null);
3143
+ return _e(() => {
3144
3144
  const p = {
3145
3145
  current: null
3146
3146
  };
3147
- let w = null, h = !1;
3147
+ let w = null, _ = !1;
3148
3148
  return (async () => {
3149
- if (!h) {
3150
- if (f?.length && d !== null) {
3151
- if (E.current === f) return;
3149
+ if (!_) {
3150
+ if (f?.length && u !== null) {
3151
+ if (R.current === f) return;
3152
3152
  t.current = [];
3153
- const S = l != null;
3154
- if (C.current || S)
3153
+ const D = d != null;
3154
+ if (g.current || D)
3155
3155
  try {
3156
3156
  s?.current?.resetCache(), s?.current?.activeChart().resetData();
3157
3157
  } catch {
@@ -3160,85 +3160,85 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3160
3160
  s?.current?.activeChart().executeActionById("timeScaleReset");
3161
3161
  } catch {
3162
3162
  }
3163
- const v = [...f].slice(-50 - (_ || 0)), L = vr(
3164
- v,
3165
- d[d.length - 1],
3166
- d
3167
- ), k = ut.find(
3168
- (D) => D.ticker === o || D.display_name === o
3169
- )?.session || "24x7", Y = Yt(
3170
- d[d.length - 1].timestamp,
3163
+ const L = [...f].slice(-50 - (h || 0)), x = xr(
3164
+ L,
3165
+ u[u.length - 1],
3166
+ u
3167
+ ), V = pt.find(
3168
+ (E) => E.ticker === o || E.display_name === o
3169
+ )?.session || "24x7", N = Mt(
3170
+ u[u.length - 1].timestamp,
3171
3171
  i,
3172
- _ || 0,
3173
- k
3174
- ), ne = Yt(
3175
- _ ? Y[Y.length - 1] : d[d.length - 1].timestamp,
3172
+ h || 0,
3173
+ V
3174
+ ), ae = Mt(
3175
+ h ? N[N.length - 1] : u[u.length - 1].timestamp,
3176
3176
  i,
3177
- L.length,
3178
- k
3179
- ), X = L.map(
3180
- (D, F) => ({
3181
- open: D.o,
3182
- high: D.h,
3183
- low: D.l,
3184
- close: D.c,
3185
- time: ne[F]
3177
+ x.length,
3178
+ V
3179
+ ), k = x.map(
3180
+ (E, I) => ({
3181
+ open: E.o,
3182
+ high: E.h,
3183
+ low: E.l,
3184
+ close: E.c,
3185
+ time: ae[I]
3186
3186
  })
3187
- ).sort((D, F) => D.time - F.time);
3188
- n.current = X.slice(-50);
3189
- let q = 0, Z = 0;
3190
- const O = async () => {
3191
- p.current && (clearInterval(p.current), p.current = null), E.current = f;
3187
+ ).sort((E, I) => E.time - I.time);
3188
+ n.current = k.slice(-50);
3189
+ let Q = 0, Y = 0;
3190
+ const Z = async () => {
3191
+ p.current && (clearInterval(p.current), p.current = null), R.current = f;
3192
3192
  try {
3193
- f && X.length > 0;
3194
- } catch (D) {
3195
- console.error("Error setting visible range:", D);
3193
+ f && k.length > 0;
3194
+ } catch (E) {
3195
+ console.error("Error setting visible range:", E);
3196
3196
  }
3197
3197
  };
3198
- X.length === 0 ? (t.current = [], await O()) : w = setTimeout(() => {
3199
- h || (p.current = setInterval(() => {
3200
- if (q < X.length) {
3201
- if (r(e, X[q]))
3202
- t.current = X.slice(0, q + 1), q++, Z = 0, q === X.length && (t.current = X, O());
3203
- else if (Z++, Z >= 10) {
3204
- t.current = [...X];
3198
+ k.length === 0 ? (t.current = [], await Z()) : w = setTimeout(() => {
3199
+ _ || (p.current = setInterval(() => {
3200
+ if (Q < k.length) {
3201
+ if (r(e, k[Q]))
3202
+ t.current = k.slice(0, Q + 1), Q++, Y = 0, Q === k.length && (t.current = k, Z());
3203
+ else if (Y++, Y >= 10) {
3204
+ t.current = [...k];
3205
3205
  try {
3206
3206
  s?.current?.activeChart().resetData();
3207
3207
  } catch {
3208
3208
  }
3209
- O();
3209
+ Z();
3210
3210
  }
3211
3211
  }
3212
3212
  }, 150));
3213
3213
  }, 700);
3214
3214
  } else {
3215
- if (t.current = [], C.current)
3215
+ if (t.current = [], g.current)
3216
3216
  try {
3217
3217
  s?.current?.resetCache(), s?.current?.activeChart().resetData();
3218
3218
  } catch {
3219
3219
  }
3220
- E.current = null;
3220
+ R.current = null;
3221
3221
  }
3222
- C.current = f;
3222
+ g.current = f;
3223
3223
  }
3224
3224
  })(), () => {
3225
- h = !0, w && clearTimeout(w), p.current && (t.current = [], clearInterval(p.current));
3225
+ _ = !0, w && clearTimeout(w), p.current && (t.current = [], clearInterval(p.current));
3226
3226
  };
3227
3227
  }, [
3228
3228
  r,
3229
3229
  t,
3230
3230
  n,
3231
- l,
3232
- f,
3233
3231
  d,
3232
+ f,
3233
+ u,
3234
3234
  e,
3235
3235
  i,
3236
3236
  o,
3237
3237
  s,
3238
- _
3239
- ]), me(() => {
3238
+ h
3239
+ ]), _e(() => {
3240
3240
  f === null && (n.current = []);
3241
- }, [n, f]), /* @__PURE__ */ m.jsx(m.Fragment, { children: _ > 900 && /* @__PURE__ */ m.jsx("div", { className: "bg-backdrop absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-4", children: /* @__PURE__ */ m.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
3241
+ }, [n, f]), /* @__PURE__ */ m.jsx(m.Fragment, { children: h > 900 && /* @__PURE__ */ m.jsx("div", { className: "bg-backdrop absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-4", children: /* @__PURE__ */ m.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
3242
3242
  /* @__PURE__ */ m.jsx(
3243
3243
  "img",
3244
3244
  {
@@ -3254,7 +3254,7 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3254
3254
  " Please try another timeframe."
3255
3255
  ] })
3256
3256
  ] }) }) });
3257
- }, Or = ({
3257
+ }, kr = ({
3258
3258
  children: e,
3259
3259
  eventId: t,
3260
3260
  widgetKey: n,
@@ -3264,61 +3264,62 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3264
3264
  newsDetail: o,
3265
3265
  selectedCandles: a,
3266
3266
  defaultSymbol: f,
3267
- currentSymbol: d,
3268
- currentTimeFrame: l,
3269
- isUpcoming: _ = !1,
3270
- isElapsed: C = !1,
3271
- onBack: E,
3267
+ currentSymbol: u,
3268
+ currentTimeFrame: d,
3269
+ isUpcoming: h = !1,
3270
+ isElapsed: g = !1,
3271
+ onBack: R,
3272
3272
  pushBar: p,
3273
3273
  iframeRef: w,
3274
- futureRef: h,
3275
- pendingMessageRef: S,
3276
- iframeReadyToListenRef: G,
3277
- highlightBarsRef: v,
3278
- setGapCountExternal: L,
3279
- setReplayModeExternal: J
3274
+ futureRef: _,
3275
+ pendingMessageRef: D,
3276
+ iframeReadyToListenRef: P,
3277
+ highlightBarsRef: L,
3278
+ setGapCountExternal: x,
3279
+ setReplayModeExternal: B,
3280
+ setPlayEndTimestampExternal: V
3280
3281
  }) => {
3281
- const k = fe(null), { setCurrentSymbol: Y, setSelectedTimeframe: ne } = lr(), {
3282
- setNewsTargetCandle: W,
3283
- setGapCount: X,
3284
- setNewsPlayEndTimestamp: q,
3282
+ const N = me(null), { setCurrentSymbol: ae, setSelectedTimeframe: W } = dr(), {
3283
+ setNewsTargetCandle: k,
3284
+ setGapCount: Q,
3285
+ setNewsPlayEndTimestamp: Y,
3285
3286
  setNewsSelectedCandles: Z
3286
- } = be();
3287
- return me(() => {
3287
+ } = Re();
3288
+ return _e(() => {
3288
3289
  if (!t || t == "" || !s) return;
3289
- const O = () => {
3290
+ const E = () => {
3290
3291
  if (s)
3291
3292
  try {
3292
- const g = s?.activeChart();
3293
- g && g.getAllShapes().forEach((H) => {
3293
+ const b = s?.activeChart();
3294
+ b && b.getAllShapes().forEach((G) => {
3294
3295
  try {
3295
- g.removeEntity(H.id);
3296
- } catch (T) {
3297
- console.error("Failed to remove shape", T);
3296
+ b.removeEntity(G.id);
3297
+ } catch (l) {
3298
+ console.error("Failed to remove shape", l);
3298
3299
  }
3299
3300
  });
3300
3301
  } catch {
3301
3302
  }
3302
- }, D = async () => {
3303
- const { data: g, status: H } = await M.get(
3303
+ }, I = async () => {
3304
+ const { data: b, status: G } = await j.get(
3304
3305
  `https://corprate-widget.iccandle.ai/news/${t}`,
3305
3306
  {
3306
3307
  headers: { "api-key": n },
3307
3308
  params: { symbol: f }
3308
3309
  }
3309
3310
  );
3310
- if (H !== 200) {
3311
+ if (G !== 200) {
3311
3312
  console.error("Failed to fetch news detail");
3312
3313
  return;
3313
3314
  }
3314
- return g;
3315
+ return b;
3315
3316
  };
3316
- let F = !1;
3317
- const x = [], se = (g, H) => {
3318
- const T = window.setTimeout(g, H);
3319
- return x.push(T), T;
3317
+ let U = !1;
3318
+ const ne = [], $ = (b, G) => {
3319
+ const l = window.setTimeout(b, G);
3320
+ return ne.push(l), l;
3320
3321
  };
3321
- return k.current = s, s.onChartReady(async () => {
3322
+ return N.current = s, s.onChartReady(async () => {
3322
3323
  i === "dark" || i === "system" ? (s.applyOverrides({
3323
3324
  //chart background
3324
3325
  "paneProperties.background": "#000000",
@@ -3340,11 +3341,11 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3340
3341
  "--tv-color-platform-background",
3341
3342
  "#f9fafb"
3342
3343
  ));
3343
- const g = s.activeChart();
3344
- if (!g) return;
3345
- const H = async (R, j) => {
3346
- await g.createShape(
3347
- { time: j },
3344
+ const b = s.activeChart();
3345
+ if (!b) return;
3346
+ const G = async (F, J) => {
3347
+ await b.createShape(
3348
+ { time: J },
3348
3349
  {
3349
3350
  shape: "vertical_line",
3350
3351
  lock: !0,
@@ -3352,44 +3353,44 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3352
3353
  overrides: { linestyle: 2, linewidth: 1 }
3353
3354
  }
3354
3355
  );
3355
- const I = await g.exportData(), U = I.data.findIndex((N) => N[0] === j);
3356
- let B = a;
3357
- if (U != -1 && !B && (B = [...hn].sort((N, V) => V - N).find((N) => I.data[U + N]) ?? null), U != -1 && B) {
3358
- const N = R, V = I.data[U + B][0], $ = I.data.filter(
3359
- (ae) => ae[0] > N && ae[0] <= V
3356
+ const S = await b.exportData(), X = S.data.findIndex((v) => v[0] === J);
3357
+ let M = a;
3358
+ if (X != -1 && !M && (M = [...wn].sort((v, K) => K - v).find((v) => S.data[X + v]) ?? null), X != -1 && M) {
3359
+ const v = F, K = S.data[X + M][0], H = S.data.filter(
3360
+ (ce) => ce[0] > v && ce[0] <= K
3360
3361
  ) ?? [];
3361
- let re = null, pe = null;
3362
- if ($.length > 0) {
3363
- const ae = $.reduce(
3364
- (K, Q, ce, P) => Number(Q[3]) < Number(P[K][3]) ? ce : K,
3362
+ let re = null, fe = null;
3363
+ if (H.length > 0) {
3364
+ const ce = H.reduce(
3365
+ (z, ee, le, O) => Number(ee[3]) < Number(O[z][3]) ? le : z,
3365
3366
  0
3366
- ), de = $[ae];
3367
- pe = {
3368
- time: de[0],
3369
- value: Number(de[3])
3367
+ ), ue = H[ce];
3368
+ fe = {
3369
+ time: ue[0],
3370
+ value: Number(ue[3])
3370
3371
  };
3371
3372
  }
3372
- if ($.length > 0) {
3373
- const ae = $.reduce(
3374
- (K, Q, ce, P) => Number(Q[2]) > Number(P[K][2]) ? ce : K,
3373
+ if (H.length > 0) {
3374
+ const ce = H.reduce(
3375
+ (z, ee, le, O) => Number(ee[2]) > Number(O[z][2]) ? le : z,
3375
3376
  0
3376
- ), de = $[ae];
3377
+ ), ue = H[ce];
3377
3378
  re = {
3378
- time: de[0],
3379
- value: Number(de[2])
3379
+ time: ue[0],
3380
+ value: Number(ue[2])
3380
3381
  };
3381
3382
  }
3382
- if (re && pe && $.length > 0) {
3383
- const ae = re.value, de = pe.value, Q = I.data[U + 1][1];
3384
- await g.createMultipointShape(
3383
+ if (re && fe && H.length > 0) {
3384
+ const ce = re.value, ue = fe.value, ee = S.data[X + 1][1];
3385
+ await b.createMultipointShape(
3385
3386
  [
3386
3387
  {
3387
- time: N,
3388
- price: Q
3388
+ time: v,
3389
+ price: ee
3389
3390
  },
3390
3391
  {
3391
- time: V,
3392
- price: ae
3392
+ time: K,
3393
+ price: ce
3393
3394
  }
3394
3395
  ],
3395
3396
  {
@@ -3408,15 +3409,15 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3408
3409
  frozen: !0
3409
3410
  }
3410
3411
  }
3411
- ), await g.createMultipointShape(
3412
+ ), await b.createMultipointShape(
3412
3413
  [
3413
3414
  {
3414
- time: N,
3415
- price: de
3415
+ time: v,
3416
+ price: ue
3416
3417
  },
3417
3418
  {
3418
- time: V,
3419
- price: Q
3419
+ time: K,
3420
+ price: ee
3420
3421
  }
3421
3422
  ],
3422
3423
  {
@@ -3434,15 +3435,15 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3434
3435
  frozen: !0
3435
3436
  }
3436
3437
  }
3437
- ), await g.createMultipointShape(
3438
+ ), await b.createMultipointShape(
3438
3439
  [
3439
3440
  {
3440
- time: N,
3441
- price: ae
3441
+ time: v,
3442
+ price: ce
3442
3443
  },
3443
3444
  {
3444
- time: V,
3445
- price: ae
3445
+ time: K,
3446
+ price: ce
3446
3447
  }
3447
3448
  ],
3448
3449
  {
@@ -3455,15 +3456,15 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3455
3456
  extendRight: !0
3456
3457
  }
3457
3458
  }
3458
- ), await g.createMultipointShape(
3459
+ ), await b.createMultipointShape(
3459
3460
  [
3460
3461
  {
3461
- time: N,
3462
- price: de
3462
+ time: v,
3463
+ price: ue
3463
3464
  },
3464
3465
  {
3465
- time: V,
3466
- price: de
3466
+ time: K,
3467
+ price: ue
3467
3468
  }
3468
3469
  ],
3469
3470
  {
@@ -3477,23 +3478,23 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3477
3478
  }
3478
3479
  }
3479
3480
  );
3480
- const ce = Tr.find(
3481
- (he) => jt(he.name) == jt(d)
3481
+ const le = Tr.find(
3482
+ (we) => Bt(we.name) == Bt(u)
3482
3483
  )?.pipLocation;
3483
- let P = "", z = "";
3484
- if (ce) {
3485
- const he = Math.pow(10, -ce), pt = parseFloat(
3486
- Math.abs((ae - Q) * he).toFixed(
3484
+ let O = "", q = "";
3485
+ if (le) {
3486
+ const we = Math.pow(10, -le), ft = parseFloat(
3487
+ Math.abs((ce - ee) * we).toFixed(
3487
3488
  1
3488
3489
  )
3489
- ), ft = parseFloat(
3490
- Math.abs((de - Q) * he).toFixed(
3490
+ ), mt = parseFloat(
3491
+ Math.abs((ue - ee) * we).toFixed(
3491
3492
  1
3492
3493
  )
3493
3494
  );
3494
- P = `${pt >= 0 ? "+" : ""}${pt.toFixed(2)} pip`, z = `${ft >= 0 ? "-" : ""}${ft.toFixed(2)} pip`;
3495
+ O = `${ft >= 0 ? "+" : ""}${ft.toFixed(2)} pip`, q = `${mt >= 0 ? "-" : ""}${mt.toFixed(2)} pip`;
3495
3496
  }
3496
- await g.createShape(
3497
+ await b.createShape(
3497
3498
  {
3498
3499
  time: re.time,
3499
3500
  price: re.value
@@ -3504,14 +3505,14 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3504
3505
  arrowColor: "#12B76A",
3505
3506
  fontsize: 11,
3506
3507
  color: "#12B76A",
3507
- text: P,
3508
+ text: O,
3508
3509
  bold: !0
3509
3510
  }
3510
3511
  }
3511
- ), await g.createShape(
3512
+ ), await b.createShape(
3512
3513
  {
3513
- time: pe.time,
3514
- price: pe.value
3514
+ time: fe.time,
3515
+ price: fe.value
3515
3516
  },
3516
3517
  {
3517
3518
  shape: "arrow_up",
@@ -3519,19 +3520,19 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3519
3520
  arrowColor: "#D92D20",
3520
3521
  fontsize: 11,
3521
3522
  color: "#D92D20",
3522
- text: z,
3523
+ text: q,
3523
3524
  bold: !0
3524
3525
  }
3525
3526
  }
3526
3527
  );
3527
- const ee = Math.floor((N + V) / 2);
3528
- await g.createShape(
3528
+ const te = Math.floor((v + K) / 2);
3529
+ await b.createShape(
3529
3530
  {
3530
- time: ee
3531
+ time: te
3531
3532
  },
3532
3533
  {
3533
3534
  shape: "text",
3534
- text: `${B} candles`,
3535
+ text: `${M} candles`,
3535
3536
  zOrder: "top",
3536
3537
  overrides: {
3537
3538
  fontsize: 12,
@@ -3543,20 +3544,20 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3543
3544
  );
3544
3545
  }
3545
3546
  }
3546
- if (I && I.data.length > 0 && I.data[0][0] >= I.data[I.data.length - 1][0] && await g.setVisibleRange({
3547
- from: I.data[0][0],
3548
- to: I.data[I.data.length - 1][0]
3549
- }), _ && r) {
3550
- const N = Math.floor(Date.now() / 1e3), V = j, $ = g.resolution(), re = 3600 * 24 * 7;
3551
- N - re >= V + re && await g.setVisibleRange(
3547
+ if (S && S.data.length > 0 && S.data[0][0] >= S.data[S.data.length - 1][0] && await b.setVisibleRange({
3548
+ from: S.data[0][0],
3549
+ to: S.data[S.data.length - 1][0]
3550
+ }), h && r) {
3551
+ const v = Math.floor(Date.now() / 1e3), K = J, H = b.resolution(), re = 3600 * 24 * 7;
3552
+ v - re >= K + re && await b.setVisibleRange(
3552
3553
  {
3553
- from: N - re,
3554
- to: V + re
3554
+ from: v - re,
3555
+ to: K + re
3555
3556
  },
3556
3557
  { applyDefaultRightMargin: !0, percentRightMargin: 50 }
3557
- ), se(() => {
3558
- F || k.current !== s || Number($) <= 30 && g.createShape(
3559
- { time: V },
3558
+ ), $(() => {
3559
+ U || N.current !== s || Number(H) <= 30 && b.createShape(
3560
+ { time: K },
3560
3561
  {
3561
3562
  shape: "vertical_line",
3562
3563
  lock: !0,
@@ -3566,139 +3567,144 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3566
3567
  );
3567
3568
  }, 2e3);
3568
3569
  }
3569
- }, T = async () => {
3570
- if (F || k.current !== s) return;
3571
- const R = await D();
3572
- if (F || k.current !== s) return;
3573
- O();
3574
- const j = (R?.event?.timestamp ?? 0) / 1e3, I = tt(l), U = j - j % I;
3575
- g.getVisibleBarsRange() || await new Promise((V) => setTimeout(V, 2e3));
3576
- const N = g.getVisibleBarsRange();
3577
- N && N.from <= j && j <= N.to ? await H(j, U) : (_ || await g.setVisibleRange(
3578
- { from: j },
3570
+ }, l = async () => {
3571
+ if (U || N.current !== s) return;
3572
+ const F = await I();
3573
+ if (U || N.current !== s) return;
3574
+ E();
3575
+ const J = (F?.event?.timestamp ?? 0) / 1e3, S = nt(d), X = J - J % S;
3576
+ b.getVisibleBarsRange() || await new Promise((K) => setTimeout(K, 2e3));
3577
+ const v = b.getVisibleBarsRange();
3578
+ v && v.from <= J && J <= v.to ? await G(J, X) : (h || await b.setVisibleRange(
3579
+ { from: J },
3579
3580
  { applyDefaultRightMargin: !0, percentRightMargin: 50 }
3580
- ), await H(j, U));
3581
- }, u = () => {
3582
- se(() => {
3583
- F || k.current !== s || d == g.symbol() || (async () => {
3581
+ ), await G(J, X));
3582
+ }, y = () => {
3583
+ $(() => {
3584
+ U || N.current !== s || (async () => {
3584
3585
  try {
3585
- L(0), J(!1), Z(null), w.current?.contentWindow?.postMessage(
3586
+ if (u == b.symbol()) {
3587
+ await l();
3588
+ return;
3589
+ }
3590
+ x(0), B(!1), V(null), Z(null), w.current?.contentWindow?.postMessage(
3586
3591
  { action: "handleClose" },
3587
3592
  "*"
3588
- ), Y(g.symbol());
3589
- } catch (R) {
3590
- console.log("error=>", R);
3593
+ ), ae(b.symbol());
3594
+ } catch (F) {
3595
+ console.log("error=>", F);
3591
3596
  }
3592
3597
  })();
3593
3598
  }, 300);
3594
- }, y = (R) => {
3595
- se(() => {
3596
- F || k.current !== s || l == R || (async () => {
3599
+ }, A = (F) => {
3600
+ $(() => {
3601
+ U || N.current !== s || d == F || (async () => {
3597
3602
  try {
3598
- L(0), J(!1), Z(null), w.current?.contentWindow?.postMessage(
3603
+ x(0), B(!1), V(null), Z(null), w.current?.contentWindow?.postMessage(
3599
3604
  { action: "handleClose" },
3600
3605
  "*"
3601
- ), ne(R);
3602
- } catch (j) {
3603
- console.log("error=>", j);
3606
+ ), W(F);
3607
+ } catch (J) {
3608
+ console.log("error=>", J);
3604
3609
  }
3605
3610
  })();
3606
3611
  }, 300);
3607
3612
  };
3608
- g.onSymbolChanged().subscribe(null, u), g.onIntervalChanged().subscribe(null, y);
3613
+ b.onSymbolChanged().subscribe(null, y), b.onIntervalChanged().subscribe(null, A);
3609
3614
  try {
3610
- C || await T();
3611
- } catch (R) {
3612
- console.log("error=>", R);
3615
+ await l();
3616
+ } catch (F) {
3617
+ console.log("error=>", F);
3613
3618
  }
3614
- F && (() => {
3619
+ U && (() => {
3615
3620
  try {
3616
- g.onSymbolChanged().unsubscribe(null, u);
3621
+ b.onSymbolChanged().unsubscribe(null, y);
3617
3622
  } catch {
3618
3623
  }
3619
3624
  try {
3620
- g.onIntervalChanged().unsubscribe(null, y);
3625
+ b.onIntervalChanged().unsubscribe(null, A);
3621
3626
  } catch {
3622
3627
  }
3623
3628
  })();
3624
3629
  }), () => {
3625
- F = !0, x.forEach((g) => window.clearTimeout(g)), O(), k.current === s && (k.current = null);
3630
+ U = !0, ne.forEach((b) => window.clearTimeout(b)), E(), N.current === s && (N.current = null);
3626
3631
  };
3627
3632
  }, [
3628
3633
  i,
3629
3634
  n,
3630
3635
  s,
3631
- _,
3636
+ h,
3632
3637
  f,
3633
3638
  a,
3634
3639
  r,
3635
3640
  t,
3636
- l,
3637
- ne,
3638
3641
  d,
3642
+ W,
3643
+ u,
3644
+ ae,
3645
+ g,
3639
3646
  Y,
3640
- C,
3641
- q,
3642
3647
  Z,
3643
- X,
3644
- W,
3645
- L,
3646
- J,
3648
+ Q,
3649
+ k,
3650
+ x,
3651
+ B,
3652
+ V,
3647
3653
  w
3648
- ]), me(() => {
3654
+ ]), _e(() => {
3649
3655
  if (s) {
3650
- if (t == "" || C) return;
3656
+ if (t == "" || g) return;
3651
3657
  s.onChartReady(async () => {
3652
- const O = s?.activeChart();
3653
- ne(O.resolution()), s.resetCache(), O.resetData(), O && O.onDataLoaded().subscribe(
3658
+ const E = s?.activeChart();
3659
+ W(E.resolution()), s.resetCache(), E.resetData(), E && E.onDataLoaded().subscribe(
3654
3660
  null,
3655
3661
  async () => {
3656
- const { data: D } = await O.exportData(), F = tt(l), x = (r?.timestamp ?? 0) / 1e3, se = x - x % F, g = D.findIndex(
3657
- (T) => T[0] === se
3658
- ), H = D.slice(g - 49, g + 1).map((T) => ({
3659
- o: T[1],
3660
- h: T[2],
3661
- l: T[3],
3662
- c: T[4],
3663
- timestamp: T[0] * 1e3
3662
+ const { data: I } = await E.exportData(), U = nt(d), ne = (r?.timestamp ?? 0) / 1e3, $ = ne - ne % U, b = I.findIndex(
3663
+ (l) => l[0] === $
3664
+ ), G = I.slice(b - 49, b + 1).map((l) => ({
3665
+ o: l[1],
3666
+ h: l[2],
3667
+ l: l[3],
3668
+ c: l[4],
3669
+ timestamp: l[0] * 1e3
3664
3670
  }));
3665
- if (_) {
3666
- const T = D[D.length - 1], u = {
3667
- o: T[1],
3668
- h: T[2],
3669
- l: T[3],
3670
- c: T[4],
3671
- timestamp: T[0] * 1e3
3672
- }, y = O.resolution(), A = ge(y) * 1e3, R = u.timestamp, j = r?.timestamp ?? 0, I = Math.floor(j / A) * A, U = ut.find(
3673
- ($) => $.ticker === d || $.display_name === d
3674
- )?.session || "24x7", B = Lr(
3675
- R,
3676
- I,
3677
- y,
3678
- U
3679
- ), N = D.slice(-50).map(($) => ({
3680
- o: $[1],
3681
- h: $[2],
3682
- l: $[3],
3683
- c: $[4],
3684
- timestamp: $[0] * 1e3
3671
+ if (h) {
3672
+ const l = I[I.length - 1], y = {
3673
+ o: l[1],
3674
+ h: l[2],
3675
+ l: l[3],
3676
+ c: l[4],
3677
+ timestamp: l[0] * 1e3
3678
+ }, A = E.resolution(), T = Ce(A) * 1e3, F = y.timestamp, J = r?.timestamp ?? 0, S = Math.floor(J / T) * T, X = pt.find(
3679
+ (H) => H.ticker === u || H.display_name === u
3680
+ )?.session || "24x7", M = Or(
3681
+ F,
3682
+ S,
3683
+ A,
3684
+ X
3685
+ ), v = I.slice(-50).map((H) => ({
3686
+ o: H[1],
3687
+ h: H[2],
3688
+ l: H[3],
3689
+ c: H[4],
3690
+ timestamp: H[0] * 1e3
3685
3691
  }));
3686
- X(B), W(N);
3687
- const V = { newsTargetCandle: N, gapCount: B };
3688
- S.current = V, G.current && (w.current?.contentWindow?.postMessage(
3689
- S.current,
3692
+ Q(M), k(v);
3693
+ const K = { newsTargetCandle: v, gapCount: M };
3694
+ D.current = K, P.current && (w.current?.contentWindow?.postMessage(
3695
+ D.current,
3690
3696
  "*"
3691
- ), S.current = null);
3697
+ ), D.current = null);
3692
3698
  } else {
3693
- W(H), X(0);
3694
- const T = {
3695
- newsTargetCandle: H,
3699
+ k(G), Q(0);
3700
+ const l = {
3701
+ newsTargetCandle: G,
3696
3702
  gapCount: 0
3697
3703
  };
3698
- S.current = T, G.current && (w.current?.contentWindow?.postMessage(
3699
- S.current,
3704
+ D.current = l, P.current && (w.current?.contentWindow?.postMessage(
3705
+ D.current,
3700
3706
  "*"
3701
- ), S.current = null);
3707
+ ), D.current = null);
3702
3708
  }
3703
3709
  },
3704
3710
  !0
@@ -3708,15 +3714,15 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3708
3714
  }, [
3709
3715
  t,
3710
3716
  r?.timestamp,
3717
+ k,
3711
3718
  W,
3712
- ne,
3713
- X,
3714
- l,
3715
- _,
3716
- C,
3719
+ Q,
3717
3720
  d,
3721
+ h,
3722
+ g,
3723
+ u,
3718
3724
  s,
3719
- S
3725
+ D
3720
3726
  ]), /* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__right_border", children: [
3721
3727
  /* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__title_container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__title_padding", children: [
3722
3728
  /* @__PURE__ */ m.jsx(
@@ -3724,30 +3730,30 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3724
3730
  {
3725
3731
  type: "button",
3726
3732
  className: "news-widget__button news-widget__button--ghost news-widget__button--icon news-widget_detail_page__back_button",
3727
- onClick: E,
3728
- children: /* @__PURE__ */ m.jsx(gr, { className: "news-widget_detail_page__back_icon" })
3733
+ onClick: R,
3734
+ children: /* @__PURE__ */ m.jsx(Cr, { className: "news-widget_detail_page__back_icon" })
3729
3735
  }
3730
3736
  ),
3731
3737
  /* @__PURE__ */ m.jsx("p", { className: "news-widget_detail_page__title_text", children: "Economic Calendar Analysis" })
3732
3738
  ] }) }),
3733
- /* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__event_details", children: /* @__PURE__ */ m.jsxs(Ur, { newsDetail: o, children: [
3739
+ /* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__event_details", children: /* @__PURE__ */ m.jsxs(Nr, { newsDetail: o, children: [
3734
3740
  e,
3735
- _ && /* @__PURE__ */ m.jsx(
3741
+ h && /* @__PURE__ */ m.jsx(
3736
3742
  Pr,
3737
3743
  {
3738
3744
  replayTabId: t || "news",
3739
- futureBarsRef: h,
3740
- highlightBarsRef: v,
3745
+ futureBarsRef: _,
3746
+ highlightBarsRef: L,
3741
3747
  pushBar: p,
3742
- tvWidgetRef: k,
3743
- resolution: l || "15",
3744
- symbol: d,
3748
+ tvWidgetRef: N,
3749
+ resolution: d || "15",
3750
+ symbol: u,
3745
3751
  resolvedTheme: i
3746
3752
  }
3747
3753
  )
3748
3754
  ] }) })
3749
3755
  ] }) });
3750
- }, Ue = "https://widget-result-news.iccandle.ai", Mt = "https://corprate-widget.iccandle.ai/news", kr = ({
3756
+ }, Ne = "https://widget-result-news.iccandle.ai", Ht = "https://corprate-widget.iccandle.ai/news", Fr = ({
3751
3757
  chartWidget: e,
3752
3758
  children: t,
3753
3759
  widgetKey: n,
@@ -3757,194 +3763,201 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3757
3763
  theme: o,
3758
3764
  symbolMapper: a,
3759
3765
  analyzeCallback: f,
3760
- pushBar: d,
3761
- futureRef: l,
3762
- highlightBarsRef: _,
3763
- setGapCountExternal: C,
3764
- setReplayModeExternal: E
3766
+ pushBar: u,
3767
+ futureRef: d,
3768
+ highlightBarsRef: h,
3769
+ setGapCountExternal: g,
3770
+ setReplayModeExternal: R,
3771
+ setPlayEndTimestampExternal: p
3765
3772
  }) => {
3766
- const { start: p } = An(), [w, h] = le(""), [S, G] = le(i), [v, L] = le(r), [J, k] = le(i), [Y, ne] = le(r), [W, X] = le(null), [q, Z] = le(
3773
+ const { start: w } = Un(), [_, D] = de(""), [P, L] = de(i), [x, B] = de(r), [V, N] = de(i), [ae, W] = de(r), [k, Q] = de(null), [Y, Z] = de(
3767
3774
  null
3768
- ), O = fe(null), D = fe(!1), {
3769
- setNewsSelectedCandles: F,
3770
- setNewsPlayEndTimestamp: x,
3771
- newsTargetCandle: se,
3772
- gapCount: g
3773
- } = be(), H = fe(null), T = cr[S] || "M15", u = tt("60"), y = q?.[0]?.timestamp ? q?.[0]?.timestamp / 1e3 : 0, A = y - y % u, R = q?.[0]?.candleData.H1?.candles, j = R?.findIndex((K) => K.timestamp === A) || 0, U = (R?.length || 0) - j <= 10, B = "next_pip_up_10" in (q?.[0]?.candleData[T]?.metadata ?? {}), N = !!w && !B, V = fe(N), $ = fe(!1);
3774
- me(() => {
3775
- if (N !== V.current) {
3776
- if (V.current = N, $.current) {
3777
- $.current = !1;
3775
+ ), E = me(null), I = me(!1), {
3776
+ setNewsSelectedCandles: U,
3777
+ setNewsPlayEndTimestamp: ne,
3778
+ newsTargetCandle: $,
3779
+ gapCount: b
3780
+ } = Re(), G = me(null), l = lr[P] || "M15", y = nt("60"), A = Y?.[0]?.timestamp ? Y?.[0]?.timestamp / 1e3 : 0, T = A - A % y, F = Y?.[0]?.candleData.H1?.candles, J = F?.findIndex((z) => z.timestamp === T) || 0, X = (F?.length || 0) - J <= 10, M = !X, v = !!_ && !M, K = me(v), H = me(!1);
3781
+ _e(() => {
3782
+ if (v !== K.current) {
3783
+ if (K.current = v, H.current) {
3784
+ H.current = !1;
3778
3785
  return;
3779
3786
  }
3780
- p();
3787
+ w();
3781
3788
  }
3782
- }, [N, p]), me(() => {
3783
- const K = async (P) => {
3784
- const { data: z, status: ee } = await M.get(
3785
- `${Mt}/${P}`,
3789
+ }, [v, w]), _e(() => {
3790
+ const z = async (O) => {
3791
+ const { data: q, status: te } = await j.get(
3792
+ `${Ht}/${O}`,
3786
3793
  {
3787
3794
  headers: { "api-key": n },
3788
3795
  params: { symbol: r }
3789
3796
  }
3790
3797
  );
3791
- return ee !== 200 ? (console.error("Failed to fetch news detail"), null) : z;
3792
- }, Q = async (P) => {
3793
- const { data: z, status: ee } = await M.get(
3794
- `${Mt}/similar-details`,
3798
+ return te !== 200 ? (console.error("Failed to fetch news detail"), null) : q;
3799
+ }, ee = async (O) => {
3800
+ const { data: q, status: te } = await j.get(
3801
+ `${Ht}/similar-details`,
3795
3802
  {
3796
3803
  headers: { "api-key": n },
3797
- params: { event_id: P }
3804
+ params: { event_id: O }
3798
3805
  }
3799
3806
  );
3800
- return ee !== 200 ? (console.error("Failed to fetch compared news"), null) : z;
3807
+ return te !== 200 ? (console.error("Failed to fetch compared news"), null) : q;
3801
3808
  };
3802
3809
  (async () => {
3803
- if (w === "") return;
3804
- const [P, z] = await Promise.all([
3805
- K(w),
3806
- Q(w)
3810
+ if (_ === "") return;
3811
+ const [O, q] = await Promise.all([
3812
+ z(_),
3813
+ ee(_)
3807
3814
  ]);
3808
- P && X(P), z && Z(z);
3815
+ O && Q(O), q && Z(q);
3809
3816
  })();
3810
- }, [n, w, r]);
3811
- const re = Me(() => {
3812
- E(!1), C(0), F(null), x(null);
3817
+ }, [n, _, r]);
3818
+ const re = He(() => {
3819
+ R(!1), g(0), p(null), U(null), ne(null);
3813
3820
  }, [
3814
- E,
3815
- C,
3816
- F,
3817
- x
3818
- ]), pe = Me(() => {
3819
- h(""), L(r), re();
3821
+ R,
3822
+ g,
3823
+ U,
3824
+ ne,
3825
+ p
3826
+ ]), fe = He(() => {
3827
+ D(""), B(r), re();
3820
3828
  }, [r, re]);
3821
- me(() => {
3822
- const K = async ({ origin: Q, data: ce }) => {
3823
- if (Q !== Ue || typeof ce != "string") return;
3824
- const P = JSON.parse(ce);
3825
- if (P.action == "back")
3826
- pe();
3827
- else if (P.action == "back-to-similar-events")
3829
+ _e(() => {
3830
+ const z = async ({ origin: ee, data: le }) => {
3831
+ if (ee !== Ne || typeof le != "string") return;
3832
+ const O = JSON.parse(le);
3833
+ if (O.action == "back")
3834
+ fe();
3835
+ else if (O.action == "back-to-similar-events")
3828
3836
  re();
3829
- else if (P.action == "eventClicked") {
3830
- $.current = !0, p();
3831
- const ee = P.data.event, he = e?.activeChart();
3832
- await e?.headerReady(), he?.clearMarks(2), localStorage.setItem(
3837
+ else if (O.action == "eventClicked") {
3838
+ H.current = !0, w();
3839
+ const te = O.data.event, we = e?.activeChart();
3840
+ await e?.headerReady(), we?.clearMarks(2), localStorage.setItem(
3833
3841
  "iccandle:current-news-event",
3834
3842
  JSON.stringify({
3835
- actual: ee.actual,
3836
- event_name: ee.event_name,
3837
- forecast: ee.forecast,
3838
- id: ee.id,
3839
- metric: ee.metric,
3840
- previous: ee.previous,
3841
- timestamp: ee.timestamp,
3842
- currency: ee.currency
3843
+ actual: te.actual,
3844
+ event_name: te.event_name,
3845
+ forecast: te.forecast,
3846
+ id: te.id,
3847
+ metric: te.metric,
3848
+ previous: te.previous,
3849
+ timestamp: te.timestamp,
3850
+ currency: te.currency
3843
3851
  })
3844
- ), he?.refreshMarks(), k(S), ne(v), h(ee.id);
3845
- } else if (P.action == "intervalChanged" || P.action == "symbolChanged") {
3846
- const z = P.data;
3847
- if (z.type === 2) return;
3848
- z.resolution && G(z.resolution);
3849
- const ee = ut.find(
3850
- (he) => he.display_name == z.symbol || he.ticker == z.symbol
3852
+ ), we?.refreshMarks(), N(P), W(x), D(te.id);
3853
+ } else if (O.action == "intervalChanged" || O.action == "symbolChanged") {
3854
+ const q = O.data;
3855
+ if (q.type === 2) return;
3856
+ q.resolution && L(q.resolution);
3857
+ const te = pt.find(
3858
+ (we) => we.display_name == q.symbol || we.ticker == q.symbol
3851
3859
  )?.ticker || "XAU_USD";
3852
- L(ee);
3853
- } else if (P.action == "replay") {
3854
- if (B) return;
3855
- const z = P.data;
3856
- E(z.isReplay), C(g), F(z.selectedCandles), x(
3857
- se?.[se.length - 1]?.timestamp ?? null
3860
+ B(te);
3861
+ } else if (O.action == "replay") {
3862
+ if (M) return;
3863
+ const q = O.data;
3864
+ q.isReplay == !1 ? p(null) : p(
3865
+ (k?.event.timestamp ?? 0) / 1e3
3866
+ ), R(q.isReplay), g(b), U(q.selectedCandles), ne(
3867
+ $?.[$.length - 1]?.timestamp ?? null
3858
3868
  );
3859
- } else P.action == "iframe-ready" ? (D.current = !0, O.current?.contentWindow?.postMessage(
3860
- H.current,
3869
+ } else O.action == "iframe-ready" ? (I.current = !0, E.current?.contentWindow?.postMessage(
3870
+ G.current,
3861
3871
  "*"
3862
- ), H.current = null) : P.action == "analyze" && f();
3872
+ ), G.current = null) : O.action == "analyze" && f();
3863
3873
  };
3864
- return window.addEventListener("message", K), () => window.removeEventListener("message", K);
3874
+ return window.addEventListener("message", z), () => window.removeEventListener("message", z);
3865
3875
  }, [
3866
- B,
3867
- se,
3868
- g,
3876
+ M,
3877
+ $,
3878
+ k,
3879
+ b,
3869
3880
  e,
3870
3881
  r,
3871
- p,
3882
+ w,
3872
3883
  re,
3873
- pe,
3884
+ fe,
3874
3885
  a,
3875
- H,
3876
- k,
3877
- ne,
3878
- v,
3879
- S,
3880
- E,
3881
- C,
3886
+ G,
3887
+ N,
3888
+ W,
3882
3889
  x,
3883
- F,
3890
+ P,
3891
+ R,
3892
+ g,
3893
+ p,
3894
+ ne,
3895
+ U,
3884
3896
  f
3885
3897
  ]);
3886
- const ae = Ne(() => {
3887
- const K = q?.[0]?.candleData?.[T]?.metadata;
3888
- return K ? [...hn].sort((Q, ce) => ce - Q).find((Q) => [
3889
- `next_pip_up_${Q}`,
3890
- `next_pip_down_${Q}`
3898
+ const ce = ve(() => {
3899
+ const z = Y?.[0]?.candleData?.[l]?.metadata;
3900
+ return z ? [...wn].sort((ee, le) => le - ee).find((ee) => [
3901
+ `next_pip_up_${ee}`,
3902
+ `next_pip_down_${ee}`
3891
3903
  ].some(
3892
- (P) => K[P] !== void 0
3904
+ (O) => z[O] !== void 0
3893
3905
  )) ?? null : null;
3894
- }, [q, T]);
3895
- me(() => {
3896
- const K = () => {
3897
- pe();
3906
+ }, [Y, l]);
3907
+ _e(() => {
3908
+ const z = () => {
3909
+ fe();
3898
3910
  };
3899
- return window.addEventListener("popstate", K), () => window.removeEventListener("popstate", K);
3900
- }, [pe]);
3901
- const de = Ne(() => w ? q ? B ? `${Ue}/${w}?apiKey=${n}&userId=${s}&theme=${o}&interval=${J}&symbol=${Y}` : `${Ue}/similar-events/${w}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ue}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ue}?apiKey=${n}&userId=${s}&theme=${o}`, [
3902
- w,
3903
- q,
3904
- B,
3911
+ return window.addEventListener("popstate", z), () => window.removeEventListener("popstate", z);
3912
+ }, [fe]);
3913
+ const ue = ve(() => _ ? Y ? M ? `${Ne}/${_}?apiKey=${n}&userId=${s}&theme=${o}&interval=${V}&symbol=${ae}` : `${Ne}/similar-events/${_}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ne}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ne}?apiKey=${n}&userId=${s}&theme=${o}`, [
3914
+ _,
3915
+ Y,
3916
+ M,
3905
3917
  n,
3906
3918
  o,
3907
3919
  s,
3908
- J,
3909
- Y
3920
+ V,
3921
+ ae
3910
3922
  ]);
3911
3923
  return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_main__container news-widget_main__container--lg", children: [
3912
3924
  /* @__PURE__ */ m.jsx(
3913
3925
  "div",
3914
3926
  {
3915
3927
  className: "news-widget_main__left",
3916
- style: { display: w && !B ? "flex" : "none" },
3928
+ style: { display: _ && !M ? "flex" : "none" },
3917
3929
  children: /* @__PURE__ */ m.jsx(
3918
- dr,
3930
+ ur,
3919
3931
  {
3920
- selectedTimeframe: S,
3921
- setSelectedTimeframe: G,
3922
- currentSymbol: v,
3923
- setCurrentSymbol: L,
3932
+ selectedTimeframe: P,
3933
+ setSelectedTimeframe: L,
3934
+ currentSymbol: x,
3935
+ setCurrentSymbol: B,
3924
3936
  children: /* @__PURE__ */ m.jsx(
3925
- Or,
3937
+ kr,
3926
3938
  {
3927
- eventId: w,
3939
+ eventId: _,
3928
3940
  chartWidget: e,
3929
3941
  widgetKey: n,
3930
3942
  theme: o,
3931
3943
  defaultSymbol: r,
3932
- newsDetail: W,
3933
- isUpcoming: U,
3934
- event: W?.event,
3935
- selectedCandles: ae,
3936
- currentTimeFrame: S,
3937
- currentSymbol: v,
3938
- onBack: pe,
3939
- isElapsed: B,
3940
- iframeRef: O,
3941
- pendingMessageRef: H,
3942
- iframeReadyToListenRef: D,
3943
- pushBar: d,
3944
- futureRef: l,
3945
- highlightBarsRef: _,
3946
- setReplayModeExternal: E,
3947
- setGapCountExternal: C,
3944
+ newsDetail: k,
3945
+ isUpcoming: X,
3946
+ event: k?.event,
3947
+ selectedCandles: ce,
3948
+ currentTimeFrame: P,
3949
+ currentSymbol: x,
3950
+ onBack: fe,
3951
+ isElapsed: M,
3952
+ iframeRef: E,
3953
+ pendingMessageRef: G,
3954
+ iframeReadyToListenRef: I,
3955
+ pushBar: u,
3956
+ futureRef: d,
3957
+ highlightBarsRef: h,
3958
+ setReplayModeExternal: R,
3959
+ setGapCountExternal: g,
3960
+ setPlayEndTimestampExternal: p,
3948
3961
  children: t
3949
3962
  }
3950
3963
  )
@@ -3955,26 +3968,26 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
3955
3968
  /* @__PURE__ */ m.jsx(
3956
3969
  "iframe",
3957
3970
  {
3958
- src: de,
3959
- ref: O,
3960
- className: w && !B ? "news-widget_main__iframe_half" : "news-widget_main__iframe_full"
3971
+ src: ue,
3972
+ ref: E,
3973
+ className: _ && !M ? "news-widget_main__iframe_half" : "news-widget_main__iframe_full"
3961
3974
  }
3962
3975
  )
3963
3976
  ] });
3964
- }, Fr = "https://api.iccandle.ai", jr = '"Inter Tight", ui-sans-serif, system-ui, sans-serif';
3965
- function Ht(e) {
3977
+ }, jr = "https://api.iccandle.ai", Br = '"Inter Tight", ui-sans-serif, system-ui, sans-serif';
3978
+ function It(e) {
3966
3979
  return {
3967
3980
  iccandle_primary: e.iccandle_primary,
3968
3981
  iccandle_border: e.iccandle_border,
3969
3982
  iccandle_text: e.iccandle_text,
3970
3983
  iccandle_background: e.iccandle_background,
3971
3984
  iccandle_primary_gradient_end: e.iccandle_primary_gradient_end,
3972
- iccandle_font: e.icc_font ?? e.iccandle_font ?? jr
3985
+ iccandle_font: e.icc_font ?? e.iccandle_font ?? Br
3973
3986
  };
3974
3987
  }
3975
- const Br = async (e) => {
3988
+ const Yr = async (e) => {
3976
3989
  const t = await fetch(
3977
- `${Fr}/corporate-client/v1/widgetStyle/search/user/?service_type=news`,
3990
+ `${jr}/corporate-client/v1/widgetStyle/search/user/?service_type=news`,
3978
3991
  { headers: { "api-key": e } }
3979
3992
  );
3980
3993
  if (!t.ok)
@@ -3982,10 +3995,10 @@ const Br = async (e) => {
3982
3995
  const n = await t.json();
3983
3996
  return {
3984
3997
  ...n,
3985
- dark: Ht(n.dark),
3986
- light: Ht(n.light)
3998
+ dark: It(n.dark),
3999
+ light: It(n.light)
3987
4000
  };
3988
- }, It = {
4001
+ }, $t = {
3989
4002
  iccandle_font: "--iccandle-font",
3990
4003
  iccandle_primary: "--iccandle-primary",
3991
4004
  iccandle_border: "--iccandle-border",
@@ -3993,32 +4006,32 @@ const Br = async (e) => {
3993
4006
  iccandle_background: "--iccandle-background",
3994
4007
  iccandle_primary_gradient_end: "--iccandle-primary-gradient-end"
3995
4008
  };
3996
- function Yr(e, t) {
3997
- const [n, s] = le(null);
3998
- me(() => {
3999
- Br(e).then((d) => {
4000
- s(d);
4009
+ function Mr(e, t) {
4010
+ const [n, s] = de(null);
4011
+ _e(() => {
4012
+ Yr(e).then((u) => {
4013
+ s(u);
4001
4014
  });
4002
4015
  }, [e]);
4003
- const r = fe(null), [i, o] = le(null), a = Ne(() => t === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : t, [t]), f = Ne(() => {
4016
+ const r = me(null), [i, o] = de(null), a = ve(() => t === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : t, [t]), f = ve(() => {
4004
4017
  if (n)
4005
4018
  return a === "dark" ? n.dark : n.light;
4006
4019
  }, [n, a]);
4007
- return me(() => {
4020
+ return _e(() => {
4008
4021
  if (typeof window > "u" || !f || !i) return;
4009
- const d = i;
4010
- Object.keys(It).forEach(
4011
- (l) => {
4012
- d.style.setProperty(
4013
- It[l],
4014
- f[l]
4022
+ const u = i;
4023
+ Object.keys($t).forEach(
4024
+ (d) => {
4025
+ u.style.setProperty(
4026
+ $t[d],
4027
+ f[d]
4015
4028
  );
4016
4029
  }
4017
4030
  );
4018
4031
  }, [f, i]), { rootRef: r, setRootEl: o, resolvedTheme: a };
4019
4032
  }
4020
- const oi = (e) => {
4021
- const { rootRef: t, setRootEl: n, resolvedTheme: s } = Yr(
4033
+ const ai = (e) => {
4034
+ const { rootRef: t, setRootEl: n, resolvedTheme: s } = Mr(
4022
4035
  e.widgetKey,
4023
4036
  e.theme
4024
4037
  );
@@ -4029,10 +4042,10 @@ const oi = (e) => {
4029
4042
  t.current = r, n(r);
4030
4043
  },
4031
4044
  className: `news-widget__container news-widget ${s === "dark" ? "dark" : ""}`,
4032
- children: /* @__PURE__ */ m.jsx(Tn, { theme: s, children: /* @__PURE__ */ m.jsx(kr, { ...e, children: e.children }) })
4045
+ children: /* @__PURE__ */ m.jsx(Tn, { theme: s, children: /* @__PURE__ */ m.jsx(Fr, { ...e, children: e.children }) })
4033
4046
  }
4034
4047
  );
4035
4048
  };
4036
4049
  export {
4037
- oi as NewsWidget
4050
+ ai as NewsWidget
4038
4051
  };