@iccandle/news 0.0.3 → 0.0.5

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,12 +1,12 @@
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
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react");var we={exports:{}},ce={};var Je;function It(){if(Je)return ce;Je=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:i,ref:s!==void 0?s:null,props:o}}return ce.Fragment=t,ce.jsx=n,ce.jsxs=n,ce}var le={};var Ge;function qt(){return Ge||(Ge=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===X?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case _:return"Fragment";case Y:return"Profiler";case L:return"StrictMode";case E:return"Suspense";case D:return"SuspenseList";case ee:return"Activity"}if(typeof l=="object")switch(typeof l.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),l.$$typeof){case y:return"Portal";case k:return l.displayName||"Context";case A:return(l._context.displayName||"Context")+".Consumer";case $:var h=l.render;return l=l.displayName,l||(l=h.displayName||h.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case z:return h=l.displayName||null,h!==null?h:e(l.type)||"Memo";case V:h=l._payload,l=l._init;try{return e(l(h))}catch{}}return null}function t(l){return""+l}function n(l){try{t(l);var h=!1}catch{h=!0}if(h){h=console;var R=h.error,N=typeof Symbol=="function"&&Symbol.toStringTag&&l[Symbol.toStringTag]||l.constructor.name||"Object";return R.call(h,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",N),t(l)}}function r(l){if(l===_)return"<>";if(typeof l=="object"&&l!==null&&l.$$typeof===V)return"<...>";try{var h=e(l);return h?"<"+h+">":"<...>"}catch{return"<...>"}}function s(){var l=F.A;return l===null?null:l.getOwner()}function o(){return Error("react-stack-top-frame")}function i(l){if(B.call(l,"key")){var h=Object.getOwnPropertyDescriptor(l,"key").get;if(h&&h.isReactWarning)return!1}return l.key!==void 0}function a(l,h){function R(){U||(U=!0,console.error("%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)",h))}R.isReactWarning=!0,Object.defineProperty(l,"key",{get:R,configurable:!0})}function p(){var l=e(this.type);return x[l]||(x[l]=!0,console.error("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.")),l=this.props.ref,l!==void 0?l:null}function d(l,h,R,N,I,Z){var v=R.ref;return l={$$typeof:f,type:l,key:h,props:R,_owner:N},(v!==void 0?v:null)!==null?Object.defineProperty(l,"ref",{enumerable:!1,get:p}):Object.defineProperty(l,"ref",{enumerable:!1,value:null}),l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(l,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(l,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.defineProperty(l,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}function u(l,h,R,N,I,Z){var v=h.children;if(v!==void 0)if(N)if(O(v)){for(N=0;N<v.length;N++)w(v[N]);Object.freeze&&Object.freeze(v)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(v);if(B.call(h,"key")){v=e(l);var Q=Object.keys(h).filter(function(se){return se!=="key"});N=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",H[v+N]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react");var xe={exports:{}},Ce={};var at;function mn(){if(at)return Ce;at=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,r,i){var o=null;if(i!==void 0&&(o=""+i),r.key!==void 0&&(o=""+r.key),"key"in r){i={};for(var a in r)a!=="key"&&(i[a]=r[a])}else i=r;return r=i.ref,{$$typeof:e,type:s,key:o,ref:r!==void 0?r:null,props:i}}return Ce.Fragment=t,Ce.jsx=n,Ce.jsxs=n,Ce}var be={};var ct;function _n(){return ct||(ct=1,process.env.NODE_ENV!=="production"&&(function(){function e(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===le?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case h:return"Fragment";case j:return"Profiler";case A:return"StrictMode";case k:return"Suspense";case X:return"SuspenseList";case M:return"Activity"}if(typeof u=="object")switch(typeof u.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),u.$$typeof){case w:return"Portal";case B:return u.displayName||"Context";case N:return(u._context.displayName||"Context")+".Consumer";case H:var C=u.render;return u=u.displayName,u||(u=C.displayName||C.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case ce:return C=u.displayName||null,C!==null?C:e(u.type)||"Memo";case F:C=u._payload,u=u._init;try{return e(u(C))}catch{}}return null}function t(u){return""+u}function n(u){try{t(u);var C=!1}catch{C=!0}if(C){C=console;var U=C.error,S=typeof Symbol=="function"&&Symbol.toStringTag&&u[Symbol.toStringTag]||u.constructor.name||"Object";return U.call(C,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",S),t(u)}}function s(u){if(u===h)return"<>";if(typeof u=="object"&&u!==null&&u.$$typeof===F)return"<...>";try{var C=e(u);return C?"<"+C+">":"<...>"}catch{return"<...>"}}function r(){var u=W.A;return u===null?null:u.getOwner()}function i(){return Error("react-stack-top-frame")}function o(u){if(T.call(u,"key")){var C=Object.getOwnPropertyDescriptor(u,"key").get;if(C&&C.isReactWarning)return!1}return u.key!==void 0}function a(u,C){function U(){L||(L=!0,console.error("%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)",C))}U.isReactWarning=!0,Object.defineProperty(u,"key",{get:U,configurable:!0})}function f(){var u=e(this.type);return re[u]||(re[u]=!0,console.error("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.")),u=this.props.ref,u!==void 0?u:null}function d(u,C,U,S,Y,I){var D=U.ref;return u={$$typeof:p,type:u,key:C,props:U,_owner:S},(D!==void 0?D:null)!==null?Object.defineProperty(u,"ref",{enumerable:!1,get:f}):Object.defineProperty(u,"ref",{enumerable:!1,value:null}),u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(u,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(u,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(u,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}function l(u,C,U,S,Y,I){var D=C.children;if(D!==void 0)if(S)if(P(D)){for(S=0;S<D.length;S++)_(D[S]);Object.freeze&&Object.freeze(D)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _(D);if(T.call(C,"key")){D=e(u);var Z=Object.keys(C).filter(function(q){return q!=="key"});S=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",v[D+S]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
3
3
  let props = %s;
4
4
  <%s {...props} />
5
5
  React keys must be passed directly to JSX without using spread:
6
6
  let props = %s;
7
- <%s key={someKey} {...props} />`,N,v,Q,v),H[v+N]=!0)}if(v=null,R!==void 0&&(n(R),v=""+R),i(h)&&(n(h.key),v=""+h.key),"key"in h){R={};for(var ae in h)ae!=="key"&&(R[ae]=h[ae])}else R=h;return v&&a(R,typeof l=="function"?l.displayName||l.name||"Unknown":l),d(l,v,R,s(),I,Z)}function w(l){S(l)?l._store&&(l._store.validated=1):typeof l=="object"&&l!==null&&l.$$typeof===V&&(l._payload.status==="fulfilled"?S(l._payload.value)&&l._payload.value._store&&(l._payload.value._store.validated=1):l._store&&(l._store.validated=1))}function S(l){return typeof l=="object"&&l!==null&&l.$$typeof===f}var T=g,f=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),F=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,O=Array.isArray,M=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(l){return l()}};var U,x={},b=T.react_stack_bottom_frame.bind(T,o)(),P=M(r(o)),H={};le.Fragment=_,le.jsx=function(l,h,R){var N=1e4>F.recentlyCreatedOwnerStacks++;return u(l,h,R,!1,N?Error("react-stack-top-frame"):b,N?M(r(l)):P)},le.jsxs=function(l,h,R){var N=1e4>F.recentlyCreatedOwnerStacks++;return u(l,h,R,!0,N?Error("react-stack-top-frame"):b,N?M(r(l)):P)}})()),le}var ze;function Jt(){return ze||(ze=1,process.env.NODE_ENV==="production"?we.exports=It():we.exports=qt()),we.exports}var m=Jt();const _t=g.createContext(null);function Gt(){const e=g.useContext(_t);if(!e)throw new Error("useCtaLoader must be used within CtaLoaderProvider");return e}const Ve=1100,zt=180;function Vt({children:e,theme:t}){const[n,r]=g.useState(!1),[s,o]=g.useState(!1),[i,a]=g.useState(0),p=g.useRef(null),d=g.useRef(null),u=g.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null,d.current&&window.clearTimeout(d.current),d.current=null,d.current=window.setTimeout(()=>{d.current=null,r(!1),o(!1)},zt)},[]),w=g.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null,d.current&&window.clearTimeout(d.current),d.current=null,a(f=>f+1),o(!1),r(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>o(!0))),p.current=window.setTimeout(()=>{p.current=null,u()},Ve)},[u]);g.useEffect(()=>u,[u]);const S=g.useMemo(()=>({start:w,stop:u,visible:n}),[w,u,n]),T=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";return m.jsxs(_t.Provider,{value:S,children:[e,n&&m.jsx("div",{className:"cta-loader__overlay",children:m.jsxs("div",{className:"cta-loader__content",children:[m.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"auto",className:"cta-loader__video",children:m.jsx("source",{src:T,type:"video/webm"})}),m.jsx("div",{className:"cta-loader__bar-wrapper",children:m.jsx("div",{className:"cta-loader__bar-track",children:m.jsx("div",{className:"cta-loader__bar-fill",style:{transform:s?"scaleX(1)":"scaleX(0)",transition:`transform ${Ve}ms linear`}},i)})})]})})]})}function ht(e,t){return function(){return e.apply(t,arguments)}}const{toString:Xt}=Object.prototype,{getPrototypeOf:ke}=Object,{iterator:Se,toStringTag:wt}=Symbol,Ne=(e=>t=>{const n=Xt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),W=e=>(e=e.toLowerCase(),t=>Ne(t)===e),Ae=e=>t=>typeof t===e,{isArray:ie}=Array,oe=Ae("undefined");function pe(e){return e!==null&&!oe(e)&&e.constructor!==null&&!oe(e.constructor)&&J(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yt=W("ArrayBuffer");function Kt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yt(e.buffer),t}const Wt=Ae("string"),J=Ae("function"),Rt=Ae("number"),fe=e=>e!==null&&typeof e=="object",Zt=e=>e===!0||e===!1,Re=e=>{if(Ne(e)!=="object")return!1;const t=ke(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wt in e)&&!(Se in e)},Qt=e=>{if(!fe(e)||pe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},en=W("Date"),tn=W("File"),nn=W("Blob"),rn=W("FileList"),sn=e=>fe(e)&&J(e.pipe),on=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||J(e.append)&&((t=Ne(e))==="formdata"||t==="object"&&J(e.toString)&&e.toString()==="[object FormData]"))},an=W("URLSearchParams"),[cn,ln,un,dn]=["ReadableStream","Request","Response","Headers"].map(W),pn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function me(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),ie(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(pe(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Et(e,t){if(pe(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const te=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ct=e=>!oe(e)&&e!==te;function De(){const{caseless:e,skipUndefined:t}=Ct(this)&&this||{},n={},r=(s,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&Et(n,o)||o;Re(n[i])&&Re(s)?n[i]=De(n[i],s):Re(s)?n[i]=De({},s):ie(s)?n[i]=s.slice():(!t||!oe(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&me(arguments[s],r);return n}const fn=(e,t,n,{allOwnKeys:r}={})=>(me(t,(s,o)=>{n&&J(s)?Object.defineProperty(e,o,{value:ht(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),mn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_n=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},hn=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&ke(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},wn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},yn=e=>{if(!e)return null;if(ie(e))return e;let t=e.length;if(!Rt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Rn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ke(Uint8Array)),En=(e,t)=>{const r=(e&&e[Se]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Cn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},gn=W("HTMLFormElement"),bn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Sn=W("RegExp"),gt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};me(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Nn=e=>{gt(e,(t,n)=>{if(J(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(J(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},An=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return ie(e)?r(e):r(String(e).split(t)),n},Tn=()=>{},Ln=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Un(e){return!!(e&&J(e.append)&&e[wt]==="FormData"&&e[Se])}const xn=e=>{const t=new Array(10),n=(r,s)=>{if(fe(r)){if(t.indexOf(r)>=0)return;if(pe(r))return r;if(!("toJSON"in r)){t[s]=r;const o=ie(r)?[]:{};return me(r,(i,a)=>{const p=n(i,s+1);!oe(p)&&(o[a]=p)}),t[s]=void 0,o}}return r};return n(e,0)},vn=W("AsyncFunction"),Dn=e=>e&&(fe(e)||J(e))&&J(e.then)&&J(e.catch),bt=((e,t)=>e?setImmediate:t?((n,r)=>(te.addEventListener("message",({source:s,data:o})=>{s===te&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),te.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",J(te.postMessage)),On=typeof queueMicrotask<"u"?queueMicrotask.bind(te):typeof process<"u"&&process.nextTick||bt,Pn=e=>e!=null&&J(e[Se]),c={isArray:ie,isArrayBuffer:yt,isBuffer:pe,isFormData:on,isArrayBufferView:Kt,isString:Wt,isNumber:Rt,isBoolean:Zt,isObject:fe,isPlainObject:Re,isEmptyObject:Qt,isReadableStream:cn,isRequest:ln,isResponse:un,isHeaders:dn,isUndefined:oe,isDate:en,isFile:tn,isBlob:nn,isRegExp:Sn,isFunction:J,isStream:sn,isURLSearchParams:an,isTypedArray:Rn,isFileList:rn,forEach:me,merge:De,extend:fn,trim:pn,stripBOM:mn,inherits:_n,toFlatObject:hn,kindOf:Ne,kindOfTest:W,endsWith:wn,toArray:yn,forEachEntry:En,matchAll:Cn,isHTMLForm:gn,hasOwnProperty:Xe,hasOwnProp:Xe,reduceDescriptors:gt,freezeMethods:Nn,toObjectSet:An,toCamelCase:bn,noop:Tn,toFiniteNumber:Ln,findKey:Et,global:te,isContextDefined:Ct,isSpecCompliantForm:Un,toJSONObject:xn,isAsyncFn:vn,isThenable:Dn,setImmediate:bt,asap:On,isIterable:Pn};let C=class St extends Error{static from(t,n,r,s,o,i){const a=new St(t.message,n||t.code,r,s,o);return a.cause=t,a.name=t.name,i&&Object.assign(a,i),a}constructor(t,n,r,s,o){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}};C.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";C.ERR_BAD_OPTION="ERR_BAD_OPTION";C.ECONNABORTED="ECONNABORTED";C.ETIMEDOUT="ETIMEDOUT";C.ERR_NETWORK="ERR_NETWORK";C.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";C.ERR_DEPRECATED="ERR_DEPRECATED";C.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";C.ERR_BAD_REQUEST="ERR_BAD_REQUEST";C.ERR_CANCELED="ERR_CANCELED";C.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";C.ERR_INVALID_URL="ERR_INVALID_URL";const Fn=null;function Oe(e){return c.isPlainObject(e)||c.isArray(e)}function Nt(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Ke(e,t,n){return e?e.concat(t).map(function(s,o){return s=Nt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function jn(e){return c.isArray(e)&&!e.some(Oe)}const kn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Te(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,_){return!c.isUndefined(_[y])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function d(f){if(f===null)return"";if(c.isDate(f))return f.toISOString();if(c.isBoolean(f))return f.toString();if(!p&&c.isBlob(f))throw new C("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(f)||c.isTypedArray(f)?p&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,y,_){let L=f;if(f&&!_&&typeof f=="object"){if(c.endsWith(y,"{}"))y=r?y:y.slice(0,-2),f=JSON.stringify(f);else if(c.isArray(f)&&jn(f)||(c.isFileList(f)||c.endsWith(y,"[]"))&&(L=c.toArray(f)))return y=Nt(y),L.forEach(function(A,k){!(c.isUndefined(A)||A===null)&&t.append(i===!0?Ke([y],k,o):i===null?y:y+"[]",d(A))}),!1}return Oe(f)?!0:(t.append(Ke(_,y,o),d(f)),!1)}const w=[],S=Object.assign(kn,{defaultVisitor:u,convertValue:d,isVisitable:Oe});function T(f,y){if(!c.isUndefined(f)){if(w.indexOf(f)!==-1)throw Error("Circular reference detected in "+y.join("."));w.push(f),c.forEach(f,function(L,Y){(!(c.isUndefined(L)||L===null)&&s.call(t,L,c.isString(Y)?Y.trim():Y,y,S))===!0&&T(L,y?y.concat(Y):[Y])}),w.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return T(e),t}function We(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Be(e,t){this._pairs=[],e&&Te(e,this,t)}const At=Be.prototype;At.append=function(t,n){this._pairs.push([t,n])};At.toString=function(t){const n=t?function(r){return t.call(this,r,We)}:We;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Bn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tt(e,t,n){if(!t)return e;const r=n&&n.encode||Bn,s=c.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=c.isURLSearchParams(t)?t.toString():new Be(t,s).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ze{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Mn=typeof URLSearchParams<"u"?URLSearchParams:Be,Yn=typeof FormData<"u"?FormData:null,$n=typeof Blob<"u"?Blob:null,Hn={isBrowser:!0,classes:{URLSearchParams:Mn,FormData:Yn,Blob:$n},protocols:["http","https","file","blob","url","data"]},Ye=typeof window<"u"&&typeof document<"u",Pe=typeof navigator=="object"&&navigator||void 0,In=Ye&&(!Pe||["ReactNative","NativeScript","NS"].indexOf(Pe.product)<0),qn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jn=Ye&&window.location.href||"http://localhost",Gn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ye,hasStandardBrowserEnv:In,hasStandardBrowserWebWorkerEnv:qn,navigator:Pe,origin:Jn},Symbol.toStringTag,{value:"Module"})),q={...Gn,...Hn};function zn(e,t){return Te(e,new q.classes.URLSearchParams,{visitor:function(n,r,s,o){return q.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Vn(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Xn(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Lt(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),p=o>=n.length;return i=!i&&c.isArray(s)?s.length:i,p?(c.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!c.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&c.isArray(s[i])&&(s[i]=Xn(s[i])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,s)=>{t(Vn(r),s,n,0)}),n}return null}function Kn(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:Me,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=c.isObject(t);if(o&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(Lt(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return zn(t,this.formSerializer).toString();if((a=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Te(a?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Kn(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?C.from(a,C.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:q.classes.FormData,Blob:q.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const Wn=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Zn=e=>{const t={};let n,r,s;return e&&e.split(`
8
- `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Wn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Qe=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return e===!1||e==null?e:c.isArray(e)?e.map(Ee):String(e)}function Qn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const er=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ue(e,t,n,r,s){if(c.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function tr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function nr(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let G=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,p,d){const u=ue(p);if(!u)throw new Error("header name must be a non-empty string");const w=c.findKey(s,u);(!w||s[w]===void 0||d===!0||d===void 0&&s[w]!==!1)&&(s[w||p]=Ee(a))}const i=(a,p)=>c.forEach(a,(d,u)=>o(d,u,p));if(c.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(c.isString(t)&&(t=t.trim())&&!er(t))i(Zn(t),n);else if(c.isObject(t)&&c.isIterable(t)){let a={},p,d;for(const u of t){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[d=u[0]]=(p=a[d])?c.isArray(p)?[...p,u[1]]:[p,u[1]]:u[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=ue(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Qn(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ue(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=ue(i),i){const a=c.findKey(r,i);a&&(!n||Ue(r,r[a],a,n))&&(delete r[a],s=!0)}}return c.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Ue(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return c.forEach(this,(s,o)=>{const i=c.findKey(r,o);if(i){n[i]=Ee(s),delete n[o];return}const a=t?tr(o):String(o).trim();a!==o&&delete n[o],n[a]=Ee(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
9
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Qe]=this[Qe]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=ue(i);r[a]||(nr(s,i),r[a]=!0)}return c.isArray(t)?t.forEach(o):o(t),this}};G.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(G.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});c.freezeMethods(G);function xe(e,t){const n=this||_e,r=t||n,s=G.from(r.headers);let o=r.data;return c.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ut(e){return!!(e&&e.__CANCEL__)}let he=class extends C{constructor(t,n,r){super(t??"canceled",C.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function rr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function sr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(p){const d=Date.now(),u=r[o];i||(i=d),n[s]=p,r[s]=d;let w=o,S=0;for(;w!==s;)S+=n[w++],w=w%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),d-i<t)return;const T=u&&d-u;return T?Math.round(S*1e3/T):void 0}}function or(e,t){let n=0,r=1e3/t,s,o;const i=(d,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const u=Date.now(),w=u-n;w>=r?i(d,u):(s=d,o||(o=setTimeout(()=>{o=null,i(s)},r-w)))},()=>s&&i(s)]}const ge=(e,t,n=3)=>{let r=0;const s=sr(50,250);return or(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,p=i-r,d=s(p),u=i<=a;r=i;const w={loaded:i,total:a,progress:a?i/a:void 0,bytes:p,rate:d||void 0,estimated:d&&a&&u?(a-i)/d:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(w)},n)},et=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},tt=e=>(...t)=>c.asap(()=>e(...t)),ir=q.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,q.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(q.origin),q.navigator&&/(msie|trident)/i.test(q.navigator.userAgent)):()=>!0,ar=q.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function cr(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function vt(e,t,n){let r=!cr(t);return e&&(r||n==!1)?lr(e,t):t}const nt=e=>e instanceof G?{...e}:e;function re(e,t){t=t||{};const n={};function r(d,u,w,S){return c.isPlainObject(d)&&c.isPlainObject(u)?c.merge.call({caseless:S},d,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function s(d,u,w,S){if(c.isUndefined(u)){if(!c.isUndefined(d))return r(void 0,d,w,S)}else return r(d,u,w,S)}function o(d,u){if(!c.isUndefined(u))return r(void 0,u)}function i(d,u){if(c.isUndefined(u)){if(!c.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function a(d,u,w){if(w in t)return r(d,u);if(w in e)return r(void 0,d)}const p={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(d,u,w)=>s(nt(d),nt(u),w,!0)};return c.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const w=c.hasOwnProp(p,u)?p[u]:s,S=w(e[u],t[u],u);c.isUndefined(S)&&w!==a||(n[u]=S)}),n}const Dt=e=>{const t=re({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=G.from(i),t.url=Tt(vt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(q.hasStandardBrowserEnv||q.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const p=n.getHeaders(),d=["content-type","content-length"];Object.entries(p).forEach(([u,w])=>{d.includes(u.toLowerCase())&&i.set(u,w)})}}if(q.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&ir(t.url))){const p=s&&o&&ar.read(o);p&&i.set(s,p)}return t},ur=typeof XMLHttpRequest<"u",dr=ur&&function(e){return new Promise(function(n,r){const s=Dt(e);let o=s.data;const i=G.from(s.headers).normalize();let{responseType:a,onUploadProgress:p,onDownloadProgress:d}=s,u,w,S,T,f;function y(){T&&T(),f&&f(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let _=new XMLHttpRequest;_.open(s.method.toUpperCase(),s.url,!0),_.timeout=s.timeout;function L(){if(!_)return;const A=G.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),$={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:A,config:e,request:_};xt(function(D){n(D),y()},function(D){r(D),y()},$),_=null}"onloadend"in _?_.onloadend=L:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(L)},_.onabort=function(){_&&(r(new C("Request aborted",C.ECONNABORTED,e,_)),_=null)},_.onerror=function(k){const $=k&&k.message?k.message:"Network Error",E=new C($,C.ERR_NETWORK,e,_);E.event=k||null,r(E),_=null},_.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const $=s.transitional||Me;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),r(new C(k,$.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,_)),_=null},o===void 0&&i.setContentType(null),"setRequestHeader"in _&&c.forEach(i.toJSON(),function(k,$){_.setRequestHeader($,k)}),c.isUndefined(s.withCredentials)||(_.withCredentials=!!s.withCredentials),a&&a!=="json"&&(_.responseType=s.responseType),d&&([S,f]=ge(d,!0),_.addEventListener("progress",S)),p&&_.upload&&([w,T]=ge(p),_.upload.addEventListener("progress",w),_.upload.addEventListener("loadend",T)),(s.cancelToken||s.signal)&&(u=A=>{_&&(r(!A||A.type?new he(null,e,_):A),_.abort(),_=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const Y=rr(s.url);if(Y&&q.protocols.indexOf(Y)===-1){r(new C("Unsupported protocol "+Y+":",C.ERR_BAD_REQUEST,e));return}_.send(o||null)})},pr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(d){if(!s){s=!0,a();const u=d instanceof Error?d:this.reason;r.abort(u instanceof C?u:new he(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new C(`timeout of ${t}ms exceeded`,C.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:p}=r;return p.unsubscribe=()=>c.asap(a),p}},fr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},mr=async function*(e,t){for await(const n of _r(e))yield*fr(n,t)},_r=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},rt=(e,t,n,r)=>{const s=mr(e,t);let o=0,i,a=p=>{i||(i=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:d,value:u}=await s.next();if(d){a(),p.close();return}let w=u.byteLength;if(n){let S=o+=w;n(S)}p.enqueue(new Uint8Array(u))}catch(d){throw a(d),d}},cancel(p){return a(p),s.return()}},{highWaterMark:2})},st=64*1024,{isFunction:ye}=c,hr=(({Request:e,Response:t})=>({Request:e,Response:t}))(c.global),{ReadableStream:ot,TextEncoder:it}=c.global,at=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wr=e=>{e=c.merge.call({skipUndefined:!0},hr,e);const{fetch:t,Request:n,Response:r}=e,s=t?ye(t):typeof fetch=="function",o=ye(n),i=ye(r);if(!s)return!1;const a=s&&ye(ot),p=s&&(typeof it=="function"?(f=>y=>f.encode(y))(new it):async f=>new Uint8Array(await new n(f).arrayBuffer())),d=o&&a&&at(()=>{let f=!1;const y=new n(q.origin,{body:new ot,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!y}),u=i&&a&&at(()=>c.isReadableStream(new r("").body)),w={stream:u&&(f=>f.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!w[f]&&(w[f]=(y,_)=>{let L=y&&y[f];if(L)return L.call(y);throw new C(`Response type '${f}' is not supported`,C.ERR_NOT_SUPPORT,_)})});const S=async f=>{if(f==null)return 0;if(c.isBlob(f))return f.size;if(c.isSpecCompliantForm(f))return(await new n(q.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(c.isArrayBufferView(f)||c.isArrayBuffer(f))return f.byteLength;if(c.isURLSearchParams(f)&&(f=f+""),c.isString(f))return(await p(f)).byteLength},T=async(f,y)=>{const _=c.toFiniteNumber(f.getContentLength());return _??S(y)};return async f=>{let{url:y,method:_,data:L,signal:Y,cancelToken:A,timeout:k,onDownloadProgress:$,onUploadProgress:E,responseType:D,headers:z,withCredentials:V="same-origin",fetchOptions:ee}=Dt(f),X=t||fetch;D=D?(D+"").toLowerCase():"text";let F=pr([Y,A&&A.toAbortSignal()],k),B=null;const O=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let M;try{if(E&&d&&_!=="get"&&_!=="head"&&(M=await T(z,L))!==0){let l=new n(y,{method:"POST",body:L,duplex:"half"}),h;if(c.isFormData(L)&&(h=l.headers.get("content-type"))&&z.setContentType(h),l.body){const[R,N]=et(M,ge(tt(E)));L=rt(l.body,st,R,N)}}c.isString(V)||(V=V?"include":"omit");const U=o&&"credentials"in n.prototype,x={...ee,signal:F,method:_.toUpperCase(),headers:z.normalize().toJSON(),body:L,duplex:"half",credentials:U?V:void 0};B=o&&new n(y,x);let b=await(o?X(B,ee):X(y,x));const P=u&&(D==="stream"||D==="response");if(u&&($||P&&O)){const l={};["status","statusText","headers"].forEach(I=>{l[I]=b[I]});const h=c.toFiniteNumber(b.headers.get("content-length")),[R,N]=$&&et(h,ge(tt($),!0))||[];b=new r(rt(b.body,st,R,()=>{N&&N(),O&&O()}),l)}D=D||"text";let H=await w[c.findKey(w,D)||"text"](b,f);return!P&&O&&O(),await new Promise((l,h)=>{xt(l,h,{data:H,headers:G.from(b.headers),status:b.status,statusText:b.statusText,config:f,request:B})})}catch(U){throw O&&O(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,f,B,U&&U.response),{cause:U.cause||U}):C.from(U,U&&U.code,f,B,U&&U.response)}}},yr=new Map,Ot=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,p,d,u=yr;for(;a--;)p=o[a],d=u.get(p),d===void 0&&u.set(p,d=a?new Map:wr(t)),u=d;return d};Ot();const $e={http:Fn,xhr:dr,fetch:{get:Ot}};c.forEach($e,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ct=e=>`- ${e}`,Rr=e=>c.isFunction(e)||e===null||e===!1;function Er(e,t){e=c.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let a;if(s=r,!Rr(r)&&(s=$e[(a=String(r)).toLowerCase()],s===void 0))throw new C(`Unknown adapter '${a}'`);if(s&&(c.isFunction(s)||(s=s.get(t))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([p,d])=>`adapter ${p} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
10
- `+i.map(ct).join(`
11
- `):" "+ct(i[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const Pt={getAdapter:Er,adapters:$e};function ve(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new he(null,e)}function lt(e){return ve(e),e.headers=G.from(e.headers),e.data=xe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pt.getAdapter(e.adapter||_e.adapter,e)(e).then(function(r){return ve(e),r.data=xe.call(e,e.transformResponse,r),r.headers=G.from(r.headers),r},function(r){return Ut(r)||(ve(e),r&&r.response&&(r.response.data=xe.call(e,e.transformResponse,r.response),r.response.headers=G.from(r.response.headers))),Promise.reject(r)})}const Ft="1.13.5",Le={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Le[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ut={};Le.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Ft+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new C(s(i," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!ut[i]&&(ut[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};Le.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Cr(e,t,n){if(typeof e!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],p=a===void 0||i(a,o,e);if(p!==!0)throw new C("option "+o+" must be "+p,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+o,C.ERR_BAD_OPTION)}}const Ce={assertOptions:Cr,validators:Le},K=Ce.validators;let ne=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ze,response:new Ze}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
12
- `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=re(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ce.assertOptions(r,{silentJSONParsing:K.transitional(K.boolean),forcedJSONParsing:K.transitional(K.boolean),clarifyTimeoutError:K.transitional(K.boolean),legacyInterceptorReqResOrdering:K.transitional(K.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:Ce.assertOptions(s,{encode:K.function,serialize:K.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ce.assertOptions(n,{baseUrl:K.spelling("baseURL"),withXsrfToken:K.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&c.merge(o.common,o[n.method]);o&&c.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),n.headers=G.concat(i,o);const a=[];let p=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;p=p&&y.synchronous;const _=n.transitional||Me;_&&_.legacyInterceptorReqResOrdering?a.unshift(y.fulfilled,y.rejected):a.push(y.fulfilled,y.rejected)});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let u,w=0,S;if(!p){const f=[lt.bind(this),void 0];for(f.unshift(...a),f.push(...d),S=f.length,u=Promise.resolve(n);w<S;)u=u.then(f[w++],f[w++]);return u}S=a.length;let T=n;for(;w<S;){const f=a[w++],y=a[w++];try{T=f(T)}catch(_){y.call(this,_);break}}try{u=lt.call(this,T)}catch(f){return Promise.reject(f)}for(w=0,S=d.length;w<S;)u=u.then(d[w++],d[w++]);return u}getUri(t){t=re(this.defaults,t);const n=vt(t.baseURL,t.url,t.allowAbsoluteUrls);return Tt(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){ne.prototype[t]=function(n,r){return this.request(re(r||{},{method:t,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(re(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}ne.prototype[t]=n(),ne.prototype[t+"Form"]=n(!0)});let gr=class jt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new he(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new jt(function(s){t=s}),cancel:t}}};function br(e){return function(n){return e.apply(null,n)}}function Sr(e){return c.isObject(e)&&e.isAxiosError===!0}const Fe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fe).forEach(([e,t])=>{Fe[t]=e});function kt(e){const t=new ne(e),n=ht(ne.prototype.request,t);return c.extend(n,ne.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return kt(re(e,s))},n}const j=kt(_e);j.Axios=ne;j.CanceledError=he;j.CancelToken=gr;j.isCancel=Ut;j.VERSION=Ft;j.toFormData=Te;j.AxiosError=C;j.Cancel=j.CanceledError;j.all=function(t){return Promise.all(t)};j.spread=br;j.isAxiosError=Sr;j.mergeConfig=re;j.AxiosHeaders=G;j.formToJSON=e=>Lt(c.isHTMLForm(e)?new FormData(e):e);j.getAdapter=Pt.getAdapter;j.HttpStatusCode=Fe;j.default=j;const{Axios:ns,AxiosError:rs,CanceledError:ss,isCancel:os,CancelToken:is,VERSION:as,all:cs,Cancel:ls,isAxiosError:us,spread:ds,toFormData:ps,AxiosHeaders:fs,HttpStatusCode:ms,formToJSON:_s,getAdapter:hs,mergeConfig:ws}=j,Nr={"1D":"D1",D:"D1",240:"H4",120:"H2",60:"H1",30:"M30",15:"M15",5:"M5",1:"M1"},Bt=e=>({1:60,5:300,15:900,30:1800,60:3600})[e]||3600,Mt=[10,15,20,25,30,35,40,45,50],Yt=g.createContext(null),Ar=()=>{const e=g.useContext(Yt);if(!e)throw new Error("useWidgetContext must be used inside WidgetProvider");return e},Tr=({children:e,selectedTimeframe:t,setSelectedTimeframe:n,currentSymbol:r,setCurrentSymbol:s})=>m.jsx(Yt.Provider,{value:{currentSymbol:r,setCurrentSymbol:s,selectedTimeframe:t,setSelectedTimeframe:n},children:e});const $t=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Lr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Ur=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const dt=e=>{const t=Ur(e);return t.charAt(0).toUpperCase()+t.slice(1)};var xr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const vr=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Dr=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},p)=>g.createElement("svg",{ref:p,...xr,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:$t("lucide",s),...!o&&!vr(a)&&{"aria-hidden":"true"},...a},[...i.map(([d,u])=>g.createElement(d,u)),...Array.isArray(o)?o:[o]]));const He=(e,t)=>{const n=g.forwardRef(({className:r,...s},o)=>g.createElement(Dr,{ref:o,iconNode:t,className:$t(`lucide-${Lr(dt(e))}`,`lucide-${e}`,r),...s}));return n.displayName=dt(e),n};const Or=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pr=He("chevron-down",Or);const Fr=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],jr=He("chevron-left",Fr);const kr=[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]],Br=He("speech",kr),je=(e,t)=>{if(!e||e==="-"||e.trim()===""||!t||t==="-"||t.trim()==="")return"news-widget__orange";const n=e.trim().replace(/[kKmMbB%]/g,"").replace(/[^\d.-]/g,""),r=t.trim().replace(/[kKmMbB%]/g,"").replace(/[^\d.-]/g,""),s=parseFloat(n)||0,o=parseFloat(r)||0;return s>o?"news-widget__green":s===o?"news-widget__orange":"news-widget__red"},be=e=>e.trim().replaceAll(" ","").replaceAll("_",""),Mr=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}),Ht=e=>{const t=Mr.formatToParts(e),n=r=>t.find(s=>s.type===r)?.value??"";return`${n("year")} ${n("month")} ${n("day")}, ${n("hour")}:${n("minute")}`},Yr=({currency:e,size:t=24})=>m.jsx("img",{src:`https://cdn.iccandle.ai/web-assets/${e}.svg`,className:"news-widget_news_card__currency_img",alt:e,width:t,height:t}),$r=({title:e,date:t,forecast:n,actual:r,currency:s})=>m.jsxs("div",{className:"news-widget_news_card__container",children:[m.jsxs("div",{className:"news-widget_news_card__header",children:[s&&m.jsx("div",{className:"news-widget_news_card__currency_icon",children:m.jsx(Yr,{currency:s})}),m.jsxs("div",{className:"news-widget_news_card__meta",children:[m.jsx("div",{className:"news-widget_news_card__date",children:Ht(new Date(t??0))}),m.jsx("div",{className:"news-widget_news_card__title",children:e})]})]}),m.jsxs("div",{className:"news-widget_news_card__info_row",children:[m.jsxs("div",{className:"news-widget_news_card__info_card",children:[m.jsx("div",{className:"news-widget_news_card__label",children:"Actual"}),m.jsx("div",{className:`news-widget_news_card__font_semibold ${je(String(r),String(n))}`,children:r||"-"})]}),m.jsxs("div",{className:"news-widget_news_card__info_card",children:[m.jsx("div",{className:"news-widget_news_card__label",children:"Forecast"}),m.jsx("div",{className:"news-widget_news_card__font_semibold news-widget__orange",children:n||"-"})]})]})]});function Hr(e){switch(e){case"post":return"news-widget__bg_green";case"early":return"news-widget__bg_gray";case"coming":return"news-widget__bg_orange"}}const Ir=({eventData:e,showStatus:t=!0,showPreviousValues:n=!1,showSimilarEvents:r=!1,isSimilarEventsOpen:s=!1})=>m.jsxs("div",{className:"news-widget_event_details_card__container",children:[m.jsxs("div",{className:"news-widget_event_details_card__body",children:[m.jsxs("div",{className:"news-widget_event_details_card__left",children:[m.jsx("div",{className:"news-widget_event_details_card__header_row",children:m.jsxs("div",{className:"news-widget_event_details_card__header_inner",children:[m.jsxs("div",{className:"news-widget_event_details_card__timestamp_row",children:[m.jsxs("p",{className:"news-widget_event_details_card__timestamp",children:[e?.timestamp&&Ht(new Date(e?.timestamp??0))," "]})," ",e?.status&&t&&m.jsxs("div",{className:"news-widget_event_details_card__status_container",children:[m.jsx("div",{className:`news-widget_event_details_card__status ${Hr(e.status)}`}),e.status==="post"&&"Actual Released",e.status==="coming"&&"Predict Available",e.status==="early"&&"Predict Unavailable"]})," "]}),m.jsxs("div",{className:"news-widget_event_details_card__currency_row",children:[m.jsx("div",{className:"news-widget_event_details_card__currency_icon",children:m.jsx("img",{src:`https://cdn.iccandle.ai/web-assets/${e?.currency??"USD"}.svg`,className:"news-widget_event_details_card__currency_img",alt:e?.currency||"",width:36,height:36})}),m.jsxs("p",{className:"news-widget_event_details_card__event_name",children:[e?.event_name," ",e?.event_time&&` ${e?.event_time}`]}),e?.slug=="FOMC"&&m.jsx(Br,{stroke:"url(#gradient)",className:"news-widget_event_details_card__speech_icon"})]})]})}),e?.slug!="FOMC"&&m.jsxs("div",{className:"news-widget_event_details_card__values_row",children:[m.jsxs("div",{className:"news-widget_event_details_card__values_group",children:[m.jsxs("div",{className:"news-widget_event_details_card__info",children:[m.jsx("span",{className:"news-widget_event_details_card__label",children:"Actual:"}),m.jsx("span",{className:`news-widget_event_details_card__text_bold ${je(e?.actual,e?.forecast)}`,children:e?.actual||"Soon"})]}),m.jsxs("div",{className:"news-widget_event_details_card__info",children:[m.jsx("span",{className:"news-widget_event_details_card__label",children:"Forecast:"}),m.jsx("span",{className:"news-widget_event_details_card__text_bold news-widget__orange",children:e?.forecast||"-"})]})]}),n&&m.jsxs("div",{className:"news-widget_event_details_card__values_group",children:[m.jsxs("div",{className:"news-widget_event_details_card__info",children:[m.jsx("span",{className:"news-widget_event_details_card__label",children:"Previous Actual:"}),m.jsx("span",{className:`news-widget_event_details_card__text_bold ${je(e?.similar?.referenceEvent?.previous_actual,e?.similar?.referenceEvent?.previous_forecast)}`,children:e?.similar?.referenceEvent?.previous_actual||"-"})]}),m.jsxs("div",{className:"news-widget_event_details_card__info",children:[m.jsx("span",{className:"news-widget_event_details_card__label",children:"Previous Forecast:"}),m.jsx("span",{className:"news-widget_event_details_card__text_bold news-widget__orange",children:e?.similar?.referenceEvent?.previous_forecast||"-"})]})]})]}),e?.slug=="FOMC"&&m.jsxs("p",{className:"news-widget_event_details_card__fomc_source",children:["Source:"," ",m.jsx("a",{href:e?.resource??"#",target:"_blank",rel:"noopener noreferrer",className:"news-widget_event_details_card__fomc_link",children:"FOMC Report"})]})]}),m.jsx("div",{className:"news-widget_event_details_card__right",children:e?.description&&m.jsx("p",{className:"news-widget_event_details_card__description",children:e.description})})]}),r&&e?.similar?.referenceEvent?.previousEvents&&e?.similar?.referenceEvent?.previousEvents.length>0&&m.jsx("div",{className:`news-widget_event_details_card__collapsible ${s?"news-widget_event_details_card__collapsible--open":"news-widget_event_details_card__collapsible--closed"}`,children:s&&m.jsxs("div",{className:"news-widget_event_details_card__collapsible_inner",children:[e?.similar?.referenceEvent?.previousEvents.length>0&&m.jsxs("p",{className:"news-widget_event_details_card__text",children:["News Before This ",e?.event_name]}),e?.similar?.referenceEvent?.previousEvents.length>0&&m.jsx("div",{className:"news-widget_event_details_card__previous_events_list",children:e?.similar?.referenceEvent?.previousEvents?.map((o,i)=>m.jsx($r,{title:o.event_name,date:new Date(o.timestamp),forecast:o.forecast,actual:o.actual,currency:e?.currency},i))})]})})]}),qr=({newsDetail:e,children:t,isCompared:n})=>{const[r,s]=g.useState(!1);return m.jsxs("div",{className:"news-widget_event_details__container news-widget_event_details__container_sm",children:[e&&m.jsxs("div",{style:{position:"relative"},children:[m.jsx(Ir,{eventData:e.event,showPreviousValues:!n,showSimilarEvents:!0,isSimilarEventsOpen:r}),m.jsx("button",{type:"button",className:`news-widget__button news-widget_event_details__ghost_button ${r?"news-widget_event_details__ghost_button_open":""}`,onClick:()=>s(!r),children:m.jsx(Pr,{className:"news-widget_event_details__icon"})})]}),m.jsx("div",{className:"news-widget_event_details__chart_wrapper",children:m.jsx("div",{className:"news-widget_event_details__chart",children:t})})]})},Jr=[{name:"LTC_USD",type:"CFD",pipLocation:-1},{name:"HK33_HKD",type:"CFD",pipLocation:0},{name:"USD_JPY",type:"CURRENCY",pipLocation:-2},{name:"EUR_TRY",type:"CURRENCY",pipLocation:-4},{name:"BTCUSDT",type:"CRYPTO",pipLocation:0},{name:"ETHUSDT",type:"CRYPTO",pipLocation:0},{name:"XRPUSDT",type:"CRYPTO",pipLocation:-3},{name:"SOLUSDT",type:"CRYPTO",pipLocation:-1},{name:"AUD_NZD",type:"CURRENCY",pipLocation:-4},{name:"USD_THB",type:"CURRENCY",pipLocation:-2},{name:"GBP_CHF",type:"CURRENCY",pipLocation:-4},{name:"EUR_HUF",type:"CURRENCY",pipLocation:-2},{name:"EUR_ZAR",type:"CURRENCY",pipLocation:-4},{name:"NZD_JPY",type:"CURRENCY",pipLocation:-2},{name:"EUR_NZD",type:"CURRENCY",pipLocation:-4},{name:"USB02Y_USD",type:"CFD",pipLocation:-2},{name:"XAU_CAD",type:"METAL",pipLocation:-2},{name:"GBP_JPY",type:"CURRENCY",pipLocation:-2},{name:"USD_TRY",type:"CURRENCY",pipLocation:-4},{name:"EUR_NOK",type:"CURRENCY",pipLocation:-4},{name:"TRY_JPY",type:"CURRENCY",pipLocation:-2},{name:"USD_SGD",type:"CURRENCY",pipLocation:-4},{name:"EUR_SEK",type:"CURRENCY",pipLocation:-4},{name:"DE30_EUR",type:"CFD",pipLocation:0},{name:"AUD_CAD",type:"CURRENCY",pipLocation:-4},{name:"UK10YB_GBP",type:"CFD",pipLocation:-2},{name:"XPD_USD",type:"CFD",pipLocation:-2},{name:"UK100_GBP",type:"CFD",pipLocation:0},{name:"XAG_CHF",type:"METAL",pipLocation:-4},{name:"USD_CHF",type:"CURRENCY",pipLocation:-4},{name:"CHF_HKD",type:"CURRENCY",pipLocation:-4},{name:"EUR_HKD",type:"CURRENCY",pipLocation:-4},{name:"GBP_HKD",type:"CURRENCY",pipLocation:-4},{name:"XAU_NZD",type:"METAL",pipLocation:-2},{name:"GBP_NZD",type:"CURRENCY",pipLocation:-4},{name:"GBP_SGD",type:"CURRENCY",pipLocation:-4},{name:"USD_SEK",type:"CURRENCY",pipLocation:-4},{name:"EUR_SGD",type:"CURRENCY",pipLocation:-4},{name:"XAG_JPY",type:"METAL",pipLocation:0},{name:"USD_HKD",type:"CURRENCY",pipLocation:-4},{name:"XAG_HKD",type:"METAL",pipLocation:-4},{name:"XCU_USD",type:"CFD",pipLocation:-4},{name:"XAU_JPY",type:"METAL",pipLocation:1},{name:"EUR_PLN",type:"CURRENCY",pipLocation:-4},{name:"SUGAR_USD",type:"CFD",pipLocation:-4},{name:"HKD_JPY",type:"CURRENCY",pipLocation:-4},{name:"CHF_ZAR",type:"CURRENCY",pipLocation:-4},{name:"ZAR_JPY",type:"CURRENCY",pipLocation:-2},{name:"XAU_HKD",type:"METAL",pipLocation:-2},{name:"AUD_CHF",type:"CURRENCY",pipLocation:-4},{name:"EUR_CHF",type:"CURRENCY",pipLocation:-4},{name:"USD_MXN",type:"CURRENCY",pipLocation:-4},{name:"GBP_USD",type:"CURRENCY",pipLocation:-4},{name:"GBP_ZAR",type:"CURRENCY",pipLocation:-4},{name:"SGD_JPY",type:"CURRENCY",pipLocation:-2},{name:"BCH_USD",type:"CFD",pipLocation:-1},{name:"XAG_AUD",type:"METAL",pipLocation:-4},{name:"WTICO_USD",type:"CFD",pipLocation:-2},{name:"AUD_HKD",type:"CURRENCY",pipLocation:-4},{name:"AUD_SGD",type:"CURRENCY",pipLocation:-4},{name:"NZD_HKD",type:"CURRENCY",pipLocation:-4},{name:"EUR_JPY",type:"CURRENCY",pipLocation:-2},{name:"USD_NOK",type:"CURRENCY",pipLocation:-4},{name:"XAU_USD",type:"METAL",pipLocation:-1},{name:"DE10YB_EUR",type:"CFD",pipLocation:-2},{name:"USD_CZK",type:"CURRENCY",pipLocation:-4},{name:"XAU_CHF",type:"METAL",pipLocation:-2},{name:"USD_HUF",type:"CURRENCY",pipLocation:-2},{name:"WHEAT_USD",type:"CFD",pipLocation:-2},{name:"XAU_AUD",type:"METAL",pipLocation:-2},{name:"EUR_USD",type:"CURRENCY",pipLocation:-4},{name:"SG30_SGD",type:"CFD",pipLocation:-1},{name:"GBP_AUD",type:"CURRENCY",pipLocation:-4},{name:"USD_PLN",type:"CURRENCY",pipLocation:-4},{name:"NZD_CAD",type:"CURRENCY",pipLocation:-4},{name:"XAG_EUR",type:"METAL",pipLocation:-4},{name:"CORN_USD",type:"CFD",pipLocation:-2},{name:"XAG_SGD",type:"METAL",pipLocation:-4},{name:"CHINAH_HKD",type:"CFD",pipLocation:0},{name:"XAU_SGD",type:"METAL",pipLocation:-2},{name:"NZD_USD",type:"CURRENCY",pipLocation:-4},{name:"JP225Y_JPY",type:"CFD",pipLocation:0},{name:"XAG_NZD",type:"METAL",pipLocation:-4},{name:"EUR_CZK",type:"CURRENCY",pipLocation:-4},{name:"AU200_AUD",type:"CFD",pipLocation:0},{name:"SGD_CHF",type:"CURRENCY",pipLocation:-4},{name:"USD_DKK",type:"CURRENCY",pipLocation:-4},{name:"SPX500_USD",type:"CFD",pipLocation:0},{name:"NZD_SGD",type:"CURRENCY",pipLocation:-4},{name:"US30_USD",type:"CFD",pipLocation:0},{name:"NL25_EUR",type:"CFD",pipLocation:-2},{name:"JP225_USD",type:"CFD",pipLocation:0},{name:"USB30Y_USD",type:"CFD",pipLocation:-2},{name:"XAG_USD",type:"METAL",pipLocation:-4},{name:"GBP_PLN",type:"CURRENCY",pipLocation:-4},{name:"CN50_USD",type:"CFD",pipLocation:0},{name:"USB05Y_USD",type:"CFD",pipLocation:-2},{name:"AUD_USD",type:"CURRENCY",pipLocation:-4},{name:"USD_CNH",type:"CURRENCY",pipLocation:-4},{name:"EUR_GBP",type:"CURRENCY",pipLocation:-4},{name:"XAG_GBP",type:"METAL",pipLocation:-4},{name:"XAU_EUR",type:"METAL",pipLocation:-2},{name:"USD_CAD",type:"CURRENCY",pipLocation:-4},{name:"NAS100_USD",type:"CFD",pipLocation:0},{name:"EUR_CAD",type:"CURRENCY",pipLocation:-4},{name:"USB10Y_USD",type:"CFD",pipLocation:-2},{name:"EU50_EUR",type:"CFD",pipLocation:0},{name:"NATGAS_USD",type:"CFD",pipLocation:-2},{name:"CAD_JPY",type:"CURRENCY",pipLocation:-2},{name:"FR40_EUR",type:"CFD",pipLocation:0},{name:"XAU_XAG",type:"METAL",pipLocation:-2},{name:"CAD_SGD",type:"CURRENCY",pipLocation:-4},{name:"GBP_CAD",type:"CURRENCY",pipLocation:-4},{name:"USD_ZAR",type:"CURRENCY",pipLocation:-4},{name:"XAU_GBP",type:"METAL",pipLocation:-2},{name:"CH20_CHF",type:"CFD",pipLocation:0},{name:"CAD_HKD",type:"CURRENCY",pipLocation:-4},{name:"CHF_JPY",type:"CURRENCY",pipLocation:-2},{name:"NZD_CHF",type:"CURRENCY",pipLocation:-4},{name:"ESPIX_EUR",type:"CFD",pipLocation:0},{name:"XAG_CAD",type:"METAL",pipLocation:-4},{name:"XPT_USD",type:"CFD",pipLocation:-2},{name:"EUR_AUD",type:"CURRENCY",pipLocation:-4},{name:"CAD_CHF",type:"CURRENCY",pipLocation:-4},{name:"EUR_DKK",type:"CURRENCY",pipLocation:-4},{name:"SOYBN_USD",type:"CFD",pipLocation:-2},{name:"US2000_USD",type:"CFD",pipLocation:-2},{name:"BCO_USD",type:"CFD",pipLocation:-2},{name:"AUD_JPY",type:"CURRENCY",pipLocation:-2}],Gr=({children:e,eventId:t,widgetKey:n,chartWidget:r,isUpcoming:s=!1,event:o,theme:i,newsDetail:a,selectedCandles:p,defaultSymbol:d,currentSymbol:u,currentTimeFrame:w,onBack:S,isElapsed:T=!1})=>{const{setCurrentSymbol:f,setSelectedTimeframe:y}=Ar(),_=g.useRef(null);return g.useEffect(()=>{if(!t||t==""||!r)return;const L=()=>{if(r){const E=r?.activeChart();E&&E.getAllShapes().forEach(D=>{try{E.removeEntity(D.id)}catch(z){console.error("Failed to remove shape",z)}})}},Y=async()=>{const{data:E,status:D}=await j.get(`https://corprate-widget.iccandle.ai/news/${t}`,{headers:{"api-key":n},params:{symbol:d}});if(D!==200){console.error("Failed to fetch news detail");return}return E};let A=!1;const k=[],$=(E,D)=>{const z=window.setTimeout(E,D);return k.push(z),z};return _.current=r,r.onChartReady(async()=>{i==="dark"||i==="system"?(r.applyOverrides({"paneProperties.background":"#000000","scalesProperties.textColor":"#fff"}),r.setCSSCustomProperty("--tv-color-pane-background","#000000"),r.setCSSCustomProperty("--tv-color-platform-background","#0f0f0f")):(r.applyOverrides({"paneProperties.background":"#ffffff","scalesProperties.textColor":"#000"}),r.setCSSCustomProperty("--tv-color-pane-background","#ffffff"),r.setCSSCustomProperty("--tv-color-platform-background","#f9fafb"));const E=r.activeChart();if(!E)return;await E.setSymbol(u),await E.setResolution(w);const D=async(F,B)=>{if(await E.createShape({time:B},{shape:"vertical_line",lock:!0,disableSelection:!0,overrides:{linestyle:2,linewidth:1}}),A||_.current!==r)return;const O=await E.exportData({includeTime:!0,includedStudies:[]}),M=O.data.findIndex(x=>x[0]===B);let U=p;if(M!=-1&&!U&&(U=[...Mt].sort((x,b)=>b-x).find(x=>O.data[M+x])??null),M!=-1&&U){const x=F,b=O.data[M+U][0],P=O.data.filter(h=>h[0]>x&&h[0]<=b)??[];let H=null,l=null;if(P.length>0){const h=P.reduce((N,I,Z,v)=>Number(I[3])<Number(v[N][3])?Z:N,0),R=P[h];l={time:R[0],value:Number(R[3])}}if(P.length>0){const h=P.reduce((N,I,Z,v)=>Number(I[2])>Number(v[N][2])?Z:N,0),R=P[h];H={time:R[0],value:Number(R[2])}}if(H&&l&&P.length>0){const h=H.value,R=l.value,I=O.data[M+1][1];await E.createMultipointShape([{time:x,price:I},{time:b,price:h}],{shape:"rectangle",overrides:{showLabel:!1,linecolor:"#12B76A",linewidth:1,linestyle:0,color:"#12B76A10",borderColor:"#12B76A",borderWidth:1,backgroundColor:"#12B76A",transparency:70,drawBorder:!1,frozen:!0}}),await E.createMultipointShape([{time:x,price:R},{time:b,price:I}],{shape:"rectangle",overrides:{showLabel:!1,linecolor:"#D92D2030",linewidth:1,linestyle:0,color:"#D92D2010",borderWidth:1,backgroundColor:"#D92D20",transparency:70,drawBorder:!1,frozen:!0}}),await E.createMultipointShape([{time:x,price:h},{time:b,price:h}],{shape:"trend_line",overrides:{linecolor:"#12B76A",linewidth:1,linestyle:2,extendLeft:!0,extendRight:!0}}),await E.createMultipointShape([{time:x,price:R},{time:b,price:R}],{shape:"trend_line",overrides:{linecolor:"#D92D20",linewidth:1,linestyle:2,extendLeft:!0,extendRight:!0}});const Z=Jr.find(se=>be(se.name)==be(u))?.pipLocation;let v="",Q="";if(Z){const se=Math.pow(10,-Z),Ie=parseFloat(Math.abs((h-I)*se).toFixed(1)),qe=parseFloat(Math.abs((R-I)*se).toFixed(1));v=`${Ie>=0?"+":""}${Ie.toFixed(2)} pip`,Q=`${qe>=0?"-":""}${qe.toFixed(2)} pip`}await E.createShape({time:H.time,price:H.value},{shape:"arrow_down",overrides:{arrowColor:"#12B76A",fontsize:11,color:"#12B76A",text:v,bold:!0}}),await E.createShape({time:l.time,price:l.value},{shape:"arrow_up",overrides:{arrowColor:"#D92D20",fontsize:11,color:"#D92D20",text:Q,bold:!0}});const ae=Math.floor((x+b)/2);await E.createShape({time:ae},{shape:"text",text:`${U} candles`,zOrder:"top",overrides:{fontsize:12,color:"#FFFFFF",bold:!0,backgroundColor:"#FFFFFF"}})}}if(O&&(await E.setVisibleRange({from:O.data[0][0],to:O.data[O.data?.length-1][0]}),E.getPanes()[0].getLeftPriceScales()[0].setAutoScale(!0)),s&&o){const x=Math.floor(Date.now()/1e3);await E.setVisibleRange({from:x-3600*24*7,to:o.timestamp/1e3+1440*60*7});const b=o.timestamp/1e3,P=E.resolution();$(()=>{A||_.current!==r||Number(P)<=30&&E.createShape({time:b},{shape:"vertical_line",lock:!0,disableSelection:!0,overrides:{linestyle:2,linewidth:1}})},2e3)}},z=async()=>{if(L(),A||_.current!==r)return;const F=await Y();if(A||_.current!==r)return;const B=(F?.event?.timestamp??0)/1e3,O=Bt(w),M=B-B%O;E.getVisibleBarsRange()||await new Promise(b=>setTimeout(b,2e3));const x=E.getVisibleBarsRange();x&&x.from<=B&&B<=x.to?await D(B,M):(s||await E.setVisibleRange({from:B}),await D(B,M))},V=()=>{$(()=>{A||_.current!==r||(async()=>{try{f(E.symbol())}catch(F){console.log("error=>",F)}})()},300)},ee=()=>{$(()=>{A||_.current!==r||(async()=>{try{y(E.resolution())}catch(F){console.log("error=>",F)}})()},300)};E.onSymbolChanged().subscribe(null,V),E.onIntervalChanged().subscribe(null,ee);try{T||await z()}catch(F){console.log("error=>",F)}A&&(()=>{try{E.onSymbolChanged().unsubscribe(null,V)}catch{}try{E.onIntervalChanged().unsubscribe(null,ee)}catch{}})()}),()=>{A=!0,k.forEach(E=>window.clearTimeout(E)),L(),_.current===r&&(_.current=null)}},[i,n,r,s,d,p,o,t,w,y,u,f,T]),m.jsx("div",{className:"news-widget_detail_page__container",children:m.jsxs("div",{className:"news-widget_detail_page__right_border",children:[m.jsx("div",{className:"news-widget_detail_page__title_container",children:m.jsxs("div",{className:"news-widget_detail_page__title_padding",children:[m.jsx("button",{type:"button",className:"news-widget__button news-widget__button--ghost news-widget__button--icon news-widget_detail_page__back_button",onClick:S,children:m.jsx(jr,{className:"news-widget_detail_page__back_icon"})}),m.jsx("p",{className:"news-widget_detail_page__title_text",children:"Economic Calendar Analysis"})]})}),m.jsx("div",{className:"news-widget_detail_page__event_details",children:m.jsx(qr,{newsDetail:a,children:e})})]})})},de="https://widget-result-news.iccandle.ai",pt="https://corprate-widget.iccandle.ai/news",zr=({chartWidget:e,children:t,widgetKey:n,theme:r,defaultSymbol:s,symbolMapper:o,chartInterval:i="15"})=>{const{start:a}=Gt(),[p,d]=g.useState(""),[u,w]=g.useState(i),[S,T]=g.useState(s),[f,y]=g.useState(null),[_,L]=g.useState(null),Y=Nr[u]||"M15",A=Bt("60"),k=_?.[0]?.timestamp?_?.[0]?.timestamp/1e3:0,$=k-k%A,E=_?.[0]?.candleData.H1?.candles,D=E?.findIndex(b=>b.timestamp===$)||0,V=(E?.length||0)-D<=10,X="next_pip_up_50"in(_?.find(b=>b&&be(b.symbol)===be(S))?.candleData[Y]?.metadata??{}),F=!!p&&!X,B=g.useRef(F),O=g.useRef(!1);g.useEffect(()=>{if(F!==B.current){if(B.current=F,O.current){O.current=!1;return}a()}},[F,a]),g.useEffect(()=>{const b=async l=>{const{data:h,status:R}=await j.get(`${pt}/${l}`,{headers:{"api-key":n},params:{symbol:s}});return R!==200?(console.error("Failed to fetch news detail"),null):h},P=async l=>{const{data:h,status:R}=await j.get(`${pt}/similar-details`,{headers:{"api-key":n},params:{event_id:l}});return R!==200?(console.error("Failed to fetch compared news"),null):h};(async()=>{if(p==="")return;const[l,h]=await Promise.all([b(p),P(p)]);l&&y(l),h&&L(h)})()},[n,p,s]);const M=g.useCallback(()=>{d(""),T(s)},[s]);g.useEffect(()=>{const b=async({origin:P,data:H})=>{if(P!==de||typeof H!="string")return;const l=JSON.parse(H);if(l.action=="back")M();else if(l.action=="eventClicked"){O.current=!0,a();const R=l.data.event,N=e?.activeChart();await e?.headerReady(),N?.clearMarks(2),localStorage.setItem("iccandle:current-news-event",JSON.stringify({actual:R.actual,event_name:R.event_name,forecast:R.forecast,id:R.id,metric:R.metric,previous:R.previous,timestamp:R.timestamp,currency:R.currency})),N?.refreshMarks(),d(R.id)}else if(l.action=="intervalChanged"||l.action=="symbolChanged"){const h=l.data;if(h.type===2)return;w(h.resolution);const R=o?.[h.symbol]??s;T(R),a()}};return window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[e,s,a,M,o]);const U=g.useMemo(()=>{const b=_?.[0]?.candleData?.[Y]?.metadata;return b?[...Mt].sort((P,H)=>H-P).find(P=>[`next_pip_up_${P}`,`next_pip_down_${P}`].some(l=>b[l]!==void 0))??null:null},[_,Y]);g.useEffect(()=>{const b=()=>{M()};return window.addEventListener("popstate",b),()=>window.removeEventListener("popstate",b)},[M]);const x=g.useMemo(()=>p?_?X?`${de}/${p}?apiKey=${n}&theme=${r}&interval=${u}&symbol=${S}`:`${de}/similar-events/${p}?apiKey=${n}&theme=${r}`:`${de}?apiKey=${n}&theme=${r}`:`${de}?apiKey=${n}&theme=${r}`,[p,_,X,n,r,u,S]);return m.jsxs("div",{className:"news-widget_main__container news-widget_main__container--lg",children:[m.jsx("div",{className:"news-widget_main__left",style:{display:p&&!X?"flex":"none"},children:m.jsx(Tr,{selectedTimeframe:u,setSelectedTimeframe:w,currentSymbol:S,setCurrentSymbol:T,children:m.jsx(Gr,{eventId:p,chartWidget:e,widgetKey:n,theme:r,defaultSymbol:s,newsDetail:f,isUpcoming:V,event:f?.event,selectedCandles:U,currentTimeFrame:u,currentSymbol:S,onBack:M,isElapsed:X,children:t})})}),m.jsx("iframe",{src:x,className:p&&!X?"news-widget_main__iframe_half":"news-widget_main__iframe_full"})]})},Vr="https://api.iccandle.ai",Xr='"Inter Tight", ui-sans-serif, system-ui, sans-serif';function ft(e){return{iccandle_primary:e.iccandle_primary,iccandle_border:e.iccandle_border,iccandle_text:e.iccandle_text,iccandle_background:e.iccandle_background,iccandle_primary_gradient_end:e.iccandle_primary_gradient_end,iccandle_font:e.icc_font??e.iccandle_font??Xr}}const Kr=async e=>{const t=await fetch(`${Vr}/corporate-client/v1/widgetStyle/search/user/?service_type=news`,{headers:{"api-key":e}});if(!t.ok)throw new Error(`Failed to fetch widget style: ${t.statusText}`);const n=await t.json();return{...n,dark:ft(n.dark),light:ft(n.light)}},mt={iccandle_font:"--iccandle-font",iccandle_primary:"--iccandle-primary",iccandle_border:"--iccandle-border",iccandle_text:"--iccandle-text",iccandle_background:"--iccandle-background",iccandle_primary_gradient_end:"--iccandle-primary-gradient-end"};function Wr(e,t){const[n,r]=g.useState(null);g.useEffect(()=>{Kr(e).then(d=>{r(d)})},[e]);const s=g.useRef(null),[o,i]=g.useState(null),a=g.useMemo(()=>t==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,[t]),p=g.useMemo(()=>{if(n)return a==="dark"?n.dark:n.light},[n,a]);return g.useEffect(()=>{if(typeof window>"u"||!p||!o)return;const d=o;Object.keys(mt).forEach(u=>{d.style.setProperty(mt[u],p[u])})},[p,o]),{rootRef:s,setRootEl:i,resolvedTheme:a}}const Zr=e=>{const{rootRef:t,setRootEl:n,resolvedTheme:r}=Wr(e.widgetKey,e.theme);return m.jsx("div",{ref:s=>{t.current=s,n(s)},className:`news-widget__container news-widget ${r==="dark"?"dark":""}`,children:m.jsx(Vt,{theme:r,children:m.jsx(zr,{...e,children:e.children})})})};exports.NewsWidget=Zr;
7
+ <%s key={someKey} {...props} />`,S,D,Z,D),v[D+S]=!0)}if(D=null,U!==void 0&&(n(U),D=""+U),o(C)&&(n(C.key),D=""+C.key),"key"in C){U={};for(var x in C)x!=="key"&&(U[x]=C[x])}else U=C;return D&&a(U,typeof u=="function"?u.displayName||u.name||"Unknown":u),d(u,D,U,r(),Y,I)}function _(u){R(u)?u._store&&(u._store.validated=1):typeof u=="object"&&u!==null&&u.$$typeof===F&&(u._payload.status==="fulfilled"?R(u._payload.value)&&u._payload.value._store&&(u._payload.value._store.validated=1):u._store&&(u._store.validated=1))}function R(u){return typeof u=="object"&&u!==null&&u.$$typeof===p}var b=y,p=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),B=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),le=Symbol.for("react.client.reference"),W=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,P=Array.isArray,K=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(u){return u()}};var L,re={},g=b.react_stack_bottom_frame.bind(b,i)(),z=K(s(i)),v={};be.Fragment=h,be.jsx=function(u,C,U){var S=1e4>W.recentlyCreatedOwnerStacks++;return l(u,C,U,!1,S?Error("react-stack-top-frame"):g,S?K(s(u)):z)},be.jsxs=function(u,C,U){var S=1e4>W.recentlyCreatedOwnerStacks++;return l(u,C,U,!0,S?Error("react-stack-top-frame"):g,S?K(s(u)):z)}})()),be}var lt;function hn(){return lt||(lt=1,process.env.NODE_ENV==="production"?xe.exports=mn():xe.exports=_n()),xe.exports}var m=hn();const Ft=y.createContext(null);function wn(){const e=y.useContext(Ft);if(!e)throw new Error("useCtaLoader must be used within CtaLoaderProvider");return e}const dt=1100,yn=180;function gn({children:e,theme:t}){const[n,s]=y.useState(!1),[r,i]=y.useState(!1),[o,a]=y.useState(0),f=y.useRef(null),d=y.useRef(null),l=y.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null,d.current&&window.clearTimeout(d.current),d.current=null,d.current=window.setTimeout(()=>{d.current=null,s(!1),i(!1)},yn)},[]),_=y.useCallback(()=>{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(()=>requestAnimationFrame(()=>i(!0))),f.current=window.setTimeout(()=>{f.current=null,l()},dt)},[l]);y.useEffect(()=>l,[l]);const R=y.useMemo(()=>({start:_,stop:l,visible:n}),[_,l,n]),b=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";return m.jsxs(Ft.Provider,{value:R,children:[e,n&&m.jsx("div",{className:"cta-loader__overlay",children:m.jsxs("div",{className:"cta-loader__content",children:[m.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"auto",className:"cta-loader__video",children:m.jsx("source",{src:b,type:"video/webm"})}),m.jsx("div",{className:"cta-loader__bar-wrapper",children:m.jsx("div",{className:"cta-loader__bar-track",children:m.jsx("div",{className:"cta-loader__bar-fill",style:{transform:r?"scaleX(1)":"scaleX(0)",transition:`transform ${dt}ms linear`}},o)})})]})})]})}function jt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Cn}=Object.prototype,{getPrototypeOf:Qe}=Object,{iterator:je,toStringTag:Bt}=Symbol,Be=(e=>t=>{const n=Cn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ue=e=>(e=e.toLowerCase(),t=>Be(t)===e),Me=e=>t=>typeof t===e,{isArray:ge}=Array,ye=Me("undefined");function Se(e){return e!==null&&!ye(e)&&e.constructor!==null&&!ye(e.constructor)&&ie(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Mt=ue("ArrayBuffer");function bn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Mt(e.buffer),t}const Rn=Me("string"),ie=Me("function"),Yt=Me("number"),De=e=>e!==null&&typeof e=="object",En=e=>e===!0||e===!1,Pe=e=>{if(Be(e)!=="object")return!1;const t=Qe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Bt in e)&&!(je in e)},Sn=e=>{if(!De(e)||Se(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Dn=ue("Date"),An=ue("File"),Un=ue("Blob"),Tn=ue("FileList"),Nn=e=>De(e)&&ie(e.pipe),vn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ie(e.append)&&((t=Be(e))==="formdata"||t==="object"&&ie(e.toString)&&e.toString()==="[object FormData]"))},xn=ue("URLSearchParams"),[Ln,Pn,On,kn]=["ReadableStream","Request","Response","Headers"].map(ue),Fn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),ge(e))for(s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else{if(Se(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(s=0;s<o;s++)a=i[s],t.call(null,e[a],a,e)}}function Ht(e,t){if(Se(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,r;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,It=e=>!ye(e)&&e!==fe;function Je(){const{caseless:e,skipUndefined:t}=It(this)&&this||{},n={},s=(r,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=e&&Ht(n,i)||i;Pe(n[o])&&Pe(r)?n[o]=Je(n[o],r):Pe(r)?n[o]=Je({},r):ge(r)?n[o]=r.slice():(!t||!ye(r))&&(n[o]=r)};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ae(arguments[r],s);return n}const jn=(e,t,n,{allOwnKeys:s}={})=>(Ae(t,(r,i)=>{n&&ie(r)?Object.defineProperty(e,i,{value:jt(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),Bn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mn=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Yn=(e,t,n,s)=>{let r,i,o;const a={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],(!s||s(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Qe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Hn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},In=e=>{if(!e)return null;if(ge(e))return e;let t=e.length;if(!Yt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$n=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Qe(Uint8Array)),Gn=(e,t)=>{const s=(e&&e[je]).call(e);let r;for(;(r=s.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},Jn=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},Xn=ue("HTMLFormElement"),qn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),ut=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vn=ue("RegExp"),$t=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Ae(n,(r,i)=>{let o;(o=t(r,i,e))!==!1&&(s[i]=o||r)}),Object.defineProperties(e,s)},Kn=e=>{$t(e,(t,n)=>{if(ie(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(ie(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zn=(e,t)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return ge(e)?s(e):s(String(e).split(t)),n},Zn=()=>{},Wn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Qn(e){return!!(e&&ie(e.append)&&e[Bt]==="FormData"&&e[je])}const es=e=>{const t=new Array(10),n=(s,r)=>{if(De(s)){if(t.indexOf(s)>=0)return;if(Se(s))return s;if(!("toJSON"in s)){t[r]=s;const i=ge(s)?[]:{};return Ae(s,(o,a)=>{const f=n(o,r+1);!ye(f)&&(i[a]=f)}),t[r]=void 0,i}}return s};return n(e,0)},ts=ue("AsyncFunction"),ns=e=>e&&(De(e)||ie(e))&&ie(e.then)&&ie(e.catch),Gt=((e,t)=>e?setImmediate:t?((n,s)=>(fe.addEventListener("message",({source:r,data:i})=>{r===fe&&i===n&&s.length&&s.shift()()},!1),r=>{s.push(r),fe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ie(fe.postMessage)),ss=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||Gt,rs=e=>e!=null&&ie(e[je]),c={isArray:ge,isArrayBuffer:Mt,isBuffer:Se,isFormData:vn,isArrayBufferView:bn,isString:Rn,isNumber:Yt,isBoolean:En,isObject:De,isPlainObject:Pe,isEmptyObject:Sn,isReadableStream:Ln,isRequest:Pn,isResponse:On,isHeaders:kn,isUndefined:ye,isDate:Dn,isFile:An,isBlob:Un,isRegExp:Vn,isFunction:ie,isStream:Nn,isURLSearchParams:xn,isTypedArray:$n,isFileList:Tn,forEach:Ae,merge:Je,extend:jn,trim:Fn,stripBOM:Bn,inherits:Mn,toFlatObject:Yn,kindOf:Be,kindOfTest:ue,endsWith:Hn,toArray:In,forEachEntry:Gn,matchAll:Jn,isHTMLForm:Xn,hasOwnProperty:ut,hasOwnProp:ut,reduceDescriptors:$t,freezeMethods:Kn,toObjectSet:zn,toCamelCase:qn,noop:Zn,toFiniteNumber:Wn,findKey:Ht,global:fe,isContextDefined:It,isSpecCompliantForm:Qn,toJSONObject:es,isAsyncFn:ts,isThenable:ns,setImmediate:Gt,asap:ss,isIterable:rs};let E=class Jt extends Error{static from(t,n,s,r,i,o){const a=new Jt(t.message,n||t.code,s,r,i);return a.cause=t,a.name=t.name,o&&Object.assign(a,o),a}constructor(t,n,s,r,i){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}};E.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";E.ERR_BAD_OPTION="ERR_BAD_OPTION";E.ECONNABORTED="ECONNABORTED";E.ETIMEDOUT="ETIMEDOUT";E.ERR_NETWORK="ERR_NETWORK";E.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";E.ERR_DEPRECATED="ERR_DEPRECATED";E.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";E.ERR_BAD_REQUEST="ERR_BAD_REQUEST";E.ERR_CANCELED="ERR_CANCELED";E.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";E.ERR_INVALID_URL="ERR_INVALID_URL";const is=null;function Xe(e){return c.isPlainObject(e)||c.isArray(e)}function Xt(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function pt(e,t,n){return e?e.concat(t).map(function(r,i){return r=Xt(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function os(e){return c.isArray(e)&&!e.some(Xe)}const as=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Ye(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,h){return!c.isUndefined(h[w])});const s=n.metaTokens,r=n.visitor||l,i=n.dots,o=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(r))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(c.isDate(p))return p.toISOString();if(c.isBoolean(p))return p.toString();if(!f&&c.isBlob(p))throw new E("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(p)||c.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,w,h){let A=p;if(p&&!h&&typeof p=="object"){if(c.endsWith(w,"{}"))w=s?w:w.slice(0,-2),p=JSON.stringify(p);else if(c.isArray(p)&&os(p)||(c.isFileList(p)||c.endsWith(w,"[]"))&&(A=c.toArray(p)))return w=Xt(w),A.forEach(function(N,B){!(c.isUndefined(N)||N===null)&&t.append(o===!0?pt([w],B,i):o===null?w:w+"[]",d(N))}),!1}return Xe(p)?!0:(t.append(pt(h,w,i),d(p)),!1)}const _=[],R=Object.assign(as,{defaultVisitor:l,convertValue:d,isVisitable:Xe});function b(p,w){if(!c.isUndefined(p)){if(_.indexOf(p)!==-1)throw Error("Circular reference detected in "+w.join("."));_.push(p),c.forEach(p,function(A,j){(!(c.isUndefined(A)||A===null)&&r.call(t,A,c.isString(j)?j.trim():j,w,R))===!0&&b(A,w?w.concat(j):[j])}),_.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return b(e),t}function ft(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function et(e,t){this._pairs=[],e&&Ye(e,this,t)}const qt=et.prototype;qt.append=function(t,n){this._pairs.push([t,n])};qt.toString=function(t){const n=t?function(s){return t.call(this,s,ft)}:ft;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function cs(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vt(e,t,n){if(!t)return e;const s=n&&n.encode||cs,r=c.isFunction(n)?{serialize:n}:n,i=r&&r.serialize;let o;if(i?o=i(t,r):o=c.isURLSearchParams(t)?t.toString():new et(t,r).toString(s),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class mt{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(s){s!==null&&t(s)})}}const tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ls=typeof URLSearchParams<"u"?URLSearchParams:et,ds=typeof FormData<"u"?FormData:null,us=typeof Blob<"u"?Blob:null,ps={isBrowser:!0,classes:{URLSearchParams:ls,FormData:ds,Blob:us},protocols:["http","https","file","blob","url","data"]},nt=typeof window<"u"&&typeof document<"u",qe=typeof navigator=="object"&&navigator||void 0,fs=nt&&(!qe||["ReactNative","NativeScript","NS"].indexOf(qe.product)<0),ms=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_s=nt&&window.location.href||"http://localhost",hs=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nt,hasStandardBrowserEnv:fs,hasStandardBrowserWebWorkerEnv:ms,navigator:qe,origin:_s},Symbol.toStringTag,{value:"Module"})),te={...hs,...ps};function ws(e,t){return Ye(e,new te.classes.URLSearchParams,{visitor:function(n,s,r,i){return te.isNode&&c.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function ys(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gs(e){const t={},n=Object.keys(e);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],t[i]=e[i];return t}function Kt(e){function t(n,s,r,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),f=i>=n.length;return o=!o&&c.isArray(r)?r.length:o,f?(c.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!a):((!r[o]||!c.isObject(r[o]))&&(r[o]=[]),t(n,s,r[o],i)&&c.isArray(r[o])&&(r[o]=gs(r[o])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(s,r)=>{t(ys(s),r,n,0)}),n}return null}function Cs(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Ue={transitional:tt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=c.isObject(t);if(i&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return r?JSON.stringify(Kt(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return ws(t,this.formSerializer).toString();if((a=c.isFileList(t))||s.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ye(a?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),Cs(t)):t}],transformResponse:[function(t){const n=this.transitional||Ue.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:te.classes.FormData,Blob:te.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{Ue.headers[e]={}});const bs=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rs=e=>{const t={};let n,s,r;return e&&e.split(`
8
+ `).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||t[n]&&bs[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},_t=Symbol("internals");function Re(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return e===!1||e==null?e:c.isArray(e)?e.map(Oe):String(e)}function Es(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const Ss=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ie(e,t,n,s,r){if(c.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!c.isString(t)){if(c.isString(s))return t.indexOf(s)!==-1;if(c.isRegExp(s))return s.test(t)}}function Ds(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function As(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,i,o){return this[s].call(this,t,r,i,o)},configurable:!0})})}let oe=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function i(a,f,d){const l=Re(f);if(!l)throw new Error("header name must be a non-empty string");const _=c.findKey(r,l);(!_||r[_]===void 0||d===!0||d===void 0&&r[_]!==!1)&&(r[_||f]=Oe(a))}const o=(a,f)=>c.forEach(a,(d,l)=>i(d,l,f));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(c.isString(t)&&(t=t.trim())&&!Ss(t))o(Rs(t),n);else if(c.isObject(t)&&c.isIterable(t)){let a={},f,d;for(const l of t){if(!c.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[d=l[0]]=(f=a[d])?c.isArray(f)?[...f,l[1]]:[f,l[1]]:l[1]}o(a,n)}else t!=null&&i(n,t,s);return this}get(t,n){if(t=Re(t),t){const s=c.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return Es(r);if(c.isFunction(n))return n.call(this,r,s);if(c.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Re(t),t){const s=c.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Ie(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function i(o){if(o=Re(o),o){const a=c.findKey(s,o);a&&(!n||Ie(s,s[a],a,n))&&(delete s[a],r=!0)}}return c.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!t||Ie(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,s={};return c.forEach(this,(r,i)=>{const o=c.findKey(s,i);if(o){n[o]=Oe(r),delete n[i];return}const a=t?Ds(i):String(i).trim();a!==i&&delete n[i],n[a]=Oe(r),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&c.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
9
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[_t]=this[_t]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=Re(o);s[a]||(As(r,o),s[a]=!0)}return c.isArray(t)?t.forEach(i):i(t),this}};oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(oe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});c.freezeMethods(oe);function $e(e,t){const n=this||Ue,s=t||n,r=oe.from(s.headers);let i=s.data;return c.forEach(e,function(a){i=a.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function zt(e){return!!(e&&e.__CANCEL__)}let Te=class extends E{constructor(t,n,s){super(t??"canceled",E.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function Zt(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new E("Request failed with status code "+n.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Us(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ts(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),l=s[i];o||(o=d),n[r]=f,s[r]=d;let _=i,R=0;for(;_!==r;)R+=n[_++],_=_%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),d-o<t)return;const b=l&&d-l;return b?Math.round(R*1e3/b):void 0}}function Ns(e,t){let n=0,s=1e3/t,r,i;const o=(d,l=Date.now())=>{n=l,r=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{const l=Date.now(),_=l-n;_>=s?o(d,l):(r=d,i||(i=setTimeout(()=>{i=null,o(r)},s-_)))},()=>r&&o(r)]}const Fe=(e,t,n=3)=>{let s=0;const r=Ts(50,250);return Ns(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,f=o-s,d=r(f),l=o<=a;s=o;const _={loaded:o,total:a,progress:a?o/a:void 0,bytes:f,rate:d||void 0,estimated:d&&a&&l?(a-o)/d:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(_)},n)},ht=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},wt=e=>(...t)=>c.asap(()=>e(...t)),vs=te.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,te.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(te.origin),te.navigator&&/(msie|trident)/i.test(te.navigator.userAgent)):()=>!0,xs=te.hasStandardBrowserEnv?{write(e,t,n,s,r,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(s)&&a.push(`path=${s}`),c.isString(r)&&a.push(`domain=${r}`),i===!0&&a.push("secure"),c.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ls(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ps(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Wt(e,t,n){let s=!Ls(t);return e&&(s||n==!1)?Ps(e,t):t}const yt=e=>e instanceof oe?{...e}:e;function he(e,t){t=t||{};const n={};function s(d,l,_,R){return c.isPlainObject(d)&&c.isPlainObject(l)?c.merge.call({caseless:R},d,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function r(d,l,_,R){if(c.isUndefined(l)){if(!c.isUndefined(d))return s(void 0,d,_,R)}else return s(d,l,_,R)}function i(d,l){if(!c.isUndefined(l))return s(void 0,l)}function o(d,l){if(c.isUndefined(l)){if(!c.isUndefined(d))return s(void 0,d)}else return s(void 0,l)}function a(d,l,_){if(_ in t)return s(d,l);if(_ in e)return s(void 0,d)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(d,l,_)=>r(yt(d),yt(l),_,!0)};return c.forEach(Object.keys({...e,...t}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const _=c.hasOwnProp(f,l)?f[l]:r,R=_(e[l],t[l],l);c.isUndefined(R)&&_!==a||(n[l]=R)}),n}const Qt=e=>{const t=he({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=oe.from(o),t.url=Vt(Wt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(te.hasStandardBrowserEnv||te.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const f=n.getHeaders(),d=["content-type","content-length"];Object.entries(f).forEach(([l,_])=>{d.includes(l.toLowerCase())&&o.set(l,_)})}}if(te.hasStandardBrowserEnv&&(s&&c.isFunction(s)&&(s=s(t)),s||s!==!1&&vs(t.url))){const f=r&&i&&xs.read(i);f&&o.set(r,f)}return t},Os=typeof XMLHttpRequest<"u",ks=Os&&function(e){return new Promise(function(n,s){const r=Qt(e);let i=r.data;const o=oe.from(r.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:d}=r,l,_,R,b,p;function w(){b&&b(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function A(){if(!h)return;const N=oe.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),H={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:N,config:e,request:h};Zt(function(X){n(X),w()},function(X){s(X),w()},H),h=null}"onloadend"in h?h.onloadend=A:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(A)},h.onabort=function(){h&&(s(new E("Request aborted",E.ECONNABORTED,e,h)),h=null)},h.onerror=function(B){const H=B&&B.message?B.message:"Network Error",k=new E(H,E.ERR_NETWORK,e,h);k.event=B||null,s(k),h=null},h.ontimeout=function(){let B=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const H=r.transitional||tt;r.timeoutErrorMessage&&(B=r.timeoutErrorMessage),s(new E(B,H.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,h)),h=null},i===void 0&&o.setContentType(null),"setRequestHeader"in h&&c.forEach(o.toJSON(),function(B,H){h.setRequestHeader(H,B)}),c.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),a&&a!=="json"&&(h.responseType=r.responseType),d&&([R,p]=Fe(d,!0),h.addEventListener("progress",R)),f&&h.upload&&([_,b]=Fe(f),h.upload.addEventListener("progress",_),h.upload.addEventListener("loadend",b)),(r.cancelToken||r.signal)&&(l=N=>{h&&(s(!N||N.type?new Te(null,e,h):N),h.abort(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));const j=Us(r.url);if(j&&te.protocols.indexOf(j)===-1){s(new E("Unsupported protocol "+j+":",E.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Fs=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const i=function(d){if(!r){r=!0,a();const l=d instanceof Error?d:this.reason;s.abort(l instanceof E?l:new Te(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,i(new E(`timeout of ${t}ms exceeded`,E.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:f}=s;return f.unsubscribe=()=>c.asap(a),f}},js=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,r;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},Bs=async function*(e,t){for await(const n of Ms(e))yield*js(n,t)},Ms=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},gt=(e,t,n,s)=>{const r=Bs(e,t);let i=0,o,a=f=>{o||(o=!0,s&&s(f))};return new ReadableStream({async pull(f){try{const{done:d,value:l}=await r.next();if(d){a(),f.close();return}let _=l.byteLength;if(n){let R=i+=_;n(R)}f.enqueue(new Uint8Array(l))}catch(d){throw a(d),d}},cancel(f){return a(f),r.return()}},{highWaterMark:2})},Ct=64*1024,{isFunction:Le}=c,Ys=(({Request:e,Response:t})=>({Request:e,Response:t}))(c.global),{ReadableStream:bt,TextEncoder:Rt}=c.global,Et=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Hs=e=>{e=c.merge.call({skipUndefined:!0},Ys,e);const{fetch:t,Request:n,Response:s}=e,r=t?Le(t):typeof fetch=="function",i=Le(n),o=Le(s);if(!r)return!1;const a=r&&Le(bt),f=r&&(typeof Rt=="function"?(p=>w=>p.encode(w))(new Rt):async p=>new Uint8Array(await new n(p).arrayBuffer())),d=i&&a&&Et(()=>{let p=!1;const w=new n(te.origin,{body:new bt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!w}),l=o&&a&&Et(()=>c.isReadableStream(new s("").body)),_={stream:l&&(p=>p.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!_[p]&&(_[p]=(w,h)=>{let A=w&&w[p];if(A)return A.call(w);throw new E(`Response type '${p}' is not supported`,E.ERR_NOT_SUPPORT,h)})});const R=async p=>{if(p==null)return 0;if(c.isBlob(p))return p.size;if(c.isSpecCompliantForm(p))return(await new n(te.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(c.isArrayBufferView(p)||c.isArrayBuffer(p))return p.byteLength;if(c.isURLSearchParams(p)&&(p=p+""),c.isString(p))return(await f(p)).byteLength},b=async(p,w)=>{const h=c.toFiniteNumber(p.getContentLength());return h??R(w)};return async p=>{let{url:w,method:h,data:A,signal:j,cancelToken:N,timeout:B,onDownloadProgress:H,onUploadProgress:k,responseType:X,headers:ce,withCredentials:F="same-origin",fetchOptions:M}=Qt(p),le=t||fetch;X=X?(X+"").toLowerCase():"text";let W=Fs([j,N&&N.toAbortSignal()],B),T=null;const P=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let K;try{if(k&&d&&h!=="get"&&h!=="head"&&(K=await b(ce,A))!==0){let u=new n(w,{method:"POST",body:A,duplex:"half"}),C;if(c.isFormData(A)&&(C=u.headers.get("content-type"))&&ce.setContentType(C),u.body){const[U,S]=ht(K,Fe(wt(k)));A=gt(u.body,Ct,U,S)}}c.isString(F)||(F=F?"include":"omit");const L=i&&"credentials"in n.prototype,re={...M,signal:W,method:h.toUpperCase(),headers:ce.normalize().toJSON(),body:A,duplex:"half",credentials:L?F:void 0};T=i&&new n(w,re);let g=await(i?le(T,M):le(w,re));const z=l&&(X==="stream"||X==="response");if(l&&(H||z&&P)){const u={};["status","statusText","headers"].forEach(Y=>{u[Y]=g[Y]});const C=c.toFiniteNumber(g.headers.get("content-length")),[U,S]=H&&ht(C,Fe(wt(H),!0))||[];g=new s(gt(g.body,Ct,U,()=>{S&&S(),P&&P()}),u)}X=X||"text";let v=await _[c.findKey(_,X)||"text"](g,p);return!z&&P&&P(),await new Promise((u,C)=>{Zt(u,C,{data:v,headers:oe.from(g.headers),status:g.status,statusText:g.statusText,config:p,request:T})})}catch(L){throw P&&P(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,p,T,L&&L.response),{cause:L.cause||L}):E.from(L,L&&L.code,p,T,L&&L.response)}}},Is=new Map,en=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:r}=t,i=[s,r,n];let o=i.length,a=o,f,d,l=Is;for(;a--;)f=i[a],d=l.get(f),d===void 0&&l.set(f,d=a?new Map:Hs(t)),l=d;return d};en();const st={http:is,xhr:ks,fetch:{get:en}};c.forEach(st,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const St=e=>`- ${e}`,$s=e=>c.isFunction(e)||e===null||e===!1;function Gs(e,t){e=c.isArray(e)?e:[e];const{length:n}=e;let s,r;const i={};for(let o=0;o<n;o++){s=e[o];let a;if(r=s,!$s(s)&&(r=st[(a=String(s)).toLowerCase()],r===void 0))throw new E(`Unknown adapter '${a}'`);if(r&&(c.isFunction(r)||(r=r.get(t))))break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([f,d])=>`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
10
+ `+o.map(St).join(`
11
+ `):" "+St(o[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}const tn={getAdapter:Gs,adapters:st};function Ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function Dt(e){return Ge(e),e.headers=oe.from(e.headers),e.data=$e.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tn.getAdapter(e.adapter||Ue.adapter,e)(e).then(function(s){return Ge(e),s.data=$e.call(e,e.transformResponse,s),s.headers=oe.from(s.headers),s},function(s){return zt(s)||(Ge(e),s&&s.response&&(s.response.data=$e.call(e,e.transformResponse,s.response),s.response.headers=oe.from(s.response.headers))),Promise.reject(s)})}const nn="1.13.5",He={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{He[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const At={};He.transitional=function(t,n,s){function r(i,o){return"[Axios v"+nn+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(t===!1)throw new E(r(o," has been removed"+(n?" in "+n:"")),E.ERR_DEPRECATED);return n&&!At[o]&&(At[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};He.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Js(e,t,n){if(typeof e!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const a=e[i],f=a===void 0||o(a,i,e);if(f!==!0)throw new E("option "+i+" must be "+f,E.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new E("Unknown option "+i,E.ERR_BAD_OPTION)}}const ke={assertOptions:Js,validators:He},de=ke.validators;let me=class{constructor(t){this.defaults=t||{},this.interceptors={request:new mt,response:new mt}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
12
+ `+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=he(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&ke.assertOptions(s,{silentJSONParsing:de.transitional(de.boolean),forcedJSONParsing:de.transitional(de.boolean),clarifyTimeoutError:de.transitional(de.boolean),legacyInterceptorReqResOrdering:de.transitional(de.boolean)},!1),r!=null&&(c.isFunction(r)?n.paramsSerializer={serialize:r}:ke.assertOptions(r,{encode:de.function,serialize:de.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ke.assertOptions(n,{baseUrl:de.spelling("baseURL"),withXsrfToken:de.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&c.merge(i.common,i[n.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=oe.concat(o,i);const a=[];let f=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;f=f&&w.synchronous;const h=n.transitional||tt;h&&h.legacyInterceptorReqResOrdering?a.unshift(w.fulfilled,w.rejected):a.push(w.fulfilled,w.rejected)});const d=[];this.interceptors.response.forEach(function(w){d.push(w.fulfilled,w.rejected)});let l,_=0,R;if(!f){const p=[Dt.bind(this),void 0];for(p.unshift(...a),p.push(...d),R=p.length,l=Promise.resolve(n);_<R;)l=l.then(p[_++],p[_++]);return l}R=a.length;let b=n;for(;_<R;){const p=a[_++],w=a[_++];try{b=p(b)}catch(h){w.call(this,h);break}}try{l=Dt.call(this,b)}catch(p){return Promise.reject(p)}for(_=0,R=d.length;_<R;)l=l.then(d[_++],d[_++]);return l}getUri(t){t=he(this.defaults,t);const n=Wt(t.baseURL,t.url,t.allowAbsoluteUrls);return Vt(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){me.prototype[t]=function(n,s){return this.request(he(s||{},{method:t,url:n,data:(s||{}).data}))}});c.forEach(["post","put","patch"],function(t){function n(s){return function(i,o,a){return this.request(he(a||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}me.prototype[t]=n(),me.prototype[t+"Form"]=n(!0)});let Xs=class sn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new Te(i,o,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new sn(function(r){t=r}),cancel:t}}};function qs(e){return function(n){return e.apply(null,n)}}function Vs(e){return c.isObject(e)&&e.isAxiosError===!0}const Ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ve).forEach(([e,t])=>{Ve[t]=e});function rn(e){const t=new me(e),n=jt(me.prototype.request,t);return c.extend(n,me.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return rn(he(e,r))},n}const J=rn(Ue);J.Axios=me;J.CanceledError=Te;J.CancelToken=Xs;J.isCancel=zt;J.VERSION=nn;J.toFormData=Ye;J.AxiosError=E;J.Cancel=J.CanceledError;J.all=function(t){return Promise.all(t)};J.spread=qs;J.isAxiosError=Vs;J.mergeConfig=he;J.AxiosHeaders=oe;J.formToJSON=e=>Kt(c.isHTMLForm(e)?new FormData(e):e);J.getAdapter=tn.getAdapter;J.HttpStatusCode=Ve;J.default=J;const{Axios:kr,AxiosError:Fr,CanceledError:jr,isCancel:Br,CancelToken:Mr,VERSION:Yr,all:Hr,Cancel:Ir,isAxiosError:$r,spread:Gr,toFormData:Jr,AxiosHeaders:Xr,HttpStatusCode:qr,formToJSON:Vr,getAdapter:Kr,mergeConfig:zr}=J,Ut=e=>{let t;const n=new Set,s=(d,l)=>{const _=typeof d=="function"?d(t):d;if(!Object.is(_,t)){const R=t;t=l??(typeof _!="object"||_===null)?_:Object.assign({},t,_),n.forEach(b=>b(t,R))}},r=()=>t,a={setState:s,getState:r,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(s,r,a);return a},Ks=(e=>e?Ut(e):Ut),zs=e=>e;function Zs(e,t=zs){const n=y.useSyncExternalStore(e.subscribe,y.useCallback(()=>t(e.getState()),[e,t]),y.useCallback(()=>t(e.getInitialState()),[e,t]));return y.useDebugValue(n),n}const Tt=e=>{const t=Ks(e),n=s=>Zs(t,s);return Object.assign(n,t),n},Ws=(e=>e?Tt(e):Tt),we=Ws(e=>({newsSelectedCandles:null,newsPlayEndTimestamp:null,newsTargetCandle:null,gapCount:0,isReplayMode:!1,setNewsSelectedCandles:t=>e({newsSelectedCandles:t}),setNewsPlayEndTimestamp:t=>e({newsPlayEndTimestamp:t}),setNewsTargetCandle:t=>e({newsTargetCandle:t}),setGapCount:t=>e({gapCount:t}),setReplayMode:t=>e({isReplayMode:t})})),Qs={"1D":"D1",D:"D1",240:"H4",120:"H2",60:"H1",30:"M30",15:"M15",5:"M5",1:"M1"},Ke=e=>({1:60,5:300,15:900,30:1800,60:3600})[e]||3600,on=[10,15,20,25,30,35,40,45,50],an=y.createContext(null),er=()=>{const e=y.useContext(an);if(!e)throw new Error("useWidgetContext must be used inside WidgetProvider");return e},tr=({children:e,selectedTimeframe:t,setSelectedTimeframe:n,currentSymbol:s,setCurrentSymbol:r})=>m.jsx(an.Provider,{value:{currentSymbol:s,setCurrentSymbol:r,selectedTimeframe:t,setSelectedTimeframe:n},children:e});const cn=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();const nr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const sr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase());const Nt=e=>{const t=sr(e);return t.charAt(0).toUpperCase()+t.slice(1)};var rr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ir=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const or=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:i,iconNode:o,...a},f)=>y.createElement("svg",{ref:f,...rr,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:cn("lucide",r),...!i&&!ir(a)&&{"aria-hidden":"true"},...a},[...o.map(([d,l])=>y.createElement(d,l)),...Array.isArray(i)?i:[i]]));const rt=(e,t)=>{const n=y.forwardRef(({className:s,...r},i)=>y.createElement(or,{ref:i,iconNode:t,className:cn(`lucide-${nr(Nt(e))}`,`lucide-${e}`,s),...r}));return n.displayName=Nt(e),n};const ar=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],cr=rt("chevron-down",ar);const lr=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],dr=rt("chevron-left",lr);const ur=[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]],pr=rt("speech",ur),ze=(e,t)=>{if(!e||e==="-"||e.trim()===""||!t||t==="-"||t.trim()==="")return"news-widget__orange";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;return r>i?"news-widget__green":r===i?"news-widget__orange":"news-widget__red"},vt=e=>e.trim().replaceAll(" ","").replaceAll("_",""),fr=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}),ln=e=>{const t=fr.formatToParts(e),n=s=>t.find(r=>r.type===s)?.value??"";return`${n("year")} ${n("month")} ${n("day")}, ${n("hour")}:${n("minute")}`},mr=({currency:e,size:t=24})=>m.jsx("img",{src:`https://cdn.iccandle.ai/web-assets/${e}.svg`,className:"news-widget_news_card__currency_img",alt:e,width:t,height:t}),_r=({title:e,date:t,forecast:n,actual:s,currency:r})=>m.jsxs("div",{className:"news-widget_news_card__container",children:[m.jsxs("div",{className:"news-widget_news_card__header",children:[r&&m.jsx("div",{className:"news-widget_news_card__currency_icon",children:m.jsx(mr,{currency:r})}),m.jsxs("div",{className:"news-widget_news_card__meta",children:[m.jsx("div",{className:"news-widget_news_card__date",children:ln(new Date(t??0))}),m.jsx("div",{className:"news-widget_news_card__title",children:e})]})]}),m.jsxs("div",{className:"news-widget_news_card__info_row",children:[m.jsxs("div",{className:"news-widget_news_card__info_card",children:[m.jsx("div",{className:"news-widget_news_card__label",children:"Actual"}),m.jsx("div",{className:`news-widget_news_card__font_semibold ${ze(String(s),String(n))}`,children:s||"-"})]}),m.jsxs("div",{className:"news-widget_news_card__info_card",children:[m.jsx("div",{className:"news-widget_news_card__label",children:"Forecast"}),m.jsx("div",{className:"news-widget_news_card__font_semibold news-widget__orange",children:n||"-"})]})]})]});function hr(e){switch(e){case"post":return"news-widget__bg_green";case"early":return"news-widget__bg_gray";case"coming":return"news-widget__bg_orange"}}const wr=({eventData:e,showStatus:t=!0,showPreviousValues:n=!1,showSimilarEvents:s=!1,isSimilarEventsOpen:r=!1})=>m.jsxs("div",{className:"news-widget_event_details_card__container",children:[m.jsxs("div",{className:"news-widget_event_details_card__body",children:[m.jsxs("div",{className:"news-widget_event_details_card__left",children:[m.jsx("div",{className:"news-widget_event_details_card__header_row",children:m.jsxs("div",{className:"news-widget_event_details_card__header_inner",children:[m.jsxs("div",{className:"news-widget_event_details_card__timestamp_row",children:[m.jsxs("p",{className:"news-widget_event_details_card__timestamp",children:[e?.timestamp&&ln(new Date(e?.timestamp??0))," "]})," ",e?.status&&t&&m.jsxs("div",{className:"news-widget_event_details_card__status_container",children:[m.jsx("div",{className:`news-widget_event_details_card__status ${hr(e.status)}`}),e.status==="post"&&"Actual Released",e.status==="coming"&&"Predict Available",e.status==="early"&&"Predict Unavailable"]})," "]}),m.jsxs("div",{className:"news-widget_event_details_card__currency_row",children:[m.jsx("div",{className:"news-widget_event_details_card__currency_icon",children:m.jsx("img",{src:`https://cdn.iccandle.ai/web-assets/${e?.currency??"USD"}.svg`,className:"news-widget_event_details_card__currency_img",alt:e?.currency||"",width:36,height:36})}),m.jsxs("p",{className:"news-widget_event_details_card__event_name",children:[e?.event_name," ",e?.event_time&&` ${e?.event_time}`]}),e?.slug=="FOMC"&&m.jsx(pr,{stroke:"url(#gradient)",className:"news-widget_event_details_card__speech_icon"})]})]})}),e?.slug!="FOMC"&&m.jsxs("div",{className:"news-widget_event_details_card__values_row",children:[m.jsxs("div",{className:"news-widget_event_details_card__values_group",children:[m.jsxs("div",{className:"news-widget_event_details_card__info",children:[m.jsx("span",{className:"news-widget_event_details_card__label",children:"Actual:"}),m.jsx("span",{className:`news-widget_event_details_card__text_bold ${ze(e?.actual,e?.forecast)}`,children:e?.actual||"Soon"})]}),m.jsxs("div",{className:"news-widget_event_details_card__info",children:[m.jsx("span",{className:"news-widget_event_details_card__label",children:"Forecast:"}),m.jsx("span",{className:"news-widget_event_details_card__text_bold news-widget__orange",children:e?.forecast||"-"})]})]}),n&&m.jsxs("div",{className:"news-widget_event_details_card__values_group",children:[m.jsxs("div",{className:"news-widget_event_details_card__info",children:[m.jsx("span",{className:"news-widget_event_details_card__label",children:"Previous Actual:"}),m.jsx("span",{className:`news-widget_event_details_card__text_bold ${ze(e?.similar?.referenceEvent?.previous_actual,e?.similar?.referenceEvent?.previous_forecast)}`,children:e?.similar?.referenceEvent?.previous_actual||"-"})]}),m.jsxs("div",{className:"news-widget_event_details_card__info",children:[m.jsx("span",{className:"news-widget_event_details_card__label",children:"Previous Forecast:"}),m.jsx("span",{className:"news-widget_event_details_card__text_bold news-widget__orange",children:e?.similar?.referenceEvent?.previous_forecast||"-"})]})]})]}),e?.slug=="FOMC"&&m.jsxs("p",{className:"news-widget_event_details_card__fomc_source",children:["Source:"," ",m.jsx("a",{href:e?.resource??"#",target:"_blank",rel:"noopener noreferrer",className:"news-widget_event_details_card__fomc_link",children:"FOMC Report"})]})]}),m.jsx("div",{className:"news-widget_event_details_card__right",children:e?.description&&m.jsx("p",{className:"news-widget_event_details_card__description",children:e.description})})]}),s&&e?.similar?.referenceEvent?.previousEvents&&e?.similar?.referenceEvent?.previousEvents.length>0&&m.jsx("div",{className:`news-widget_event_details_card__collapsible ${r?"news-widget_event_details_card__collapsible--open":"news-widget_event_details_card__collapsible--closed"}`,children:r&&m.jsxs("div",{className:"news-widget_event_details_card__collapsible_inner",children:[e?.similar?.referenceEvent?.previousEvents.length>0&&m.jsxs("p",{className:"news-widget_event_details_card__text",children:["News Before This ",e?.event_name]}),e?.similar?.referenceEvent?.previousEvents.length>0&&m.jsx("div",{className:"news-widget_event_details_card__previous_events_list",children:e?.similar?.referenceEvent?.previousEvents?.map((i,o)=>m.jsx(_r,{title:i.event_name,date:new Date(i.timestamp),forecast:i.forecast,actual:i.actual,currency:e?.currency},o))})]})})]}),yr=({newsDetail:e,children:t,isCompared:n})=>{const[s,r]=y.useState(!1);return m.jsxs("div",{className:"news-widget_event_details__container news-widget_event_details__container_sm",children:[e&&m.jsxs("div",{style:{position:"relative"},children:[m.jsx(wr,{eventData:e.event,showPreviousValues:!n,showSimilarEvents:!0,isSimilarEventsOpen:s}),m.jsx("button",{type:"button",className:`news-widget__button news-widget_event_details__ghost_button ${s?"news-widget_event_details__ghost_button_open":""}`,onClick:()=>r(!s),children:m.jsx(cr,{className:"news-widget_event_details__icon"})})]}),m.jsx("div",{className:"news-widget_event_details__chart_wrapper",children:m.jsx("div",{className:"news-widget_event_details__chart",children:t})})]})},gr=[{name:"LTC_USD",type:"CFD",pipLocation:-1},{name:"HK33_HKD",type:"CFD",pipLocation:0},{name:"USD_JPY",type:"CURRENCY",pipLocation:-2},{name:"EUR_TRY",type:"CURRENCY",pipLocation:-4},{name:"BTCUSDT",type:"CRYPTO",pipLocation:0},{name:"ETHUSDT",type:"CRYPTO",pipLocation:0},{name:"XRPUSDT",type:"CRYPTO",pipLocation:-3},{name:"SOLUSDT",type:"CRYPTO",pipLocation:-1},{name:"AUD_NZD",type:"CURRENCY",pipLocation:-4},{name:"USD_THB",type:"CURRENCY",pipLocation:-2},{name:"GBP_CHF",type:"CURRENCY",pipLocation:-4},{name:"EUR_HUF",type:"CURRENCY",pipLocation:-2},{name:"EUR_ZAR",type:"CURRENCY",pipLocation:-4},{name:"NZD_JPY",type:"CURRENCY",pipLocation:-2},{name:"EUR_NZD",type:"CURRENCY",pipLocation:-4},{name:"USB02Y_USD",type:"CFD",pipLocation:-2},{name:"XAU_CAD",type:"METAL",pipLocation:-2},{name:"GBP_JPY",type:"CURRENCY",pipLocation:-2},{name:"USD_TRY",type:"CURRENCY",pipLocation:-4},{name:"EUR_NOK",type:"CURRENCY",pipLocation:-4},{name:"TRY_JPY",type:"CURRENCY",pipLocation:-2},{name:"USD_SGD",type:"CURRENCY",pipLocation:-4},{name:"EUR_SEK",type:"CURRENCY",pipLocation:-4},{name:"DE30_EUR",type:"CFD",pipLocation:0},{name:"AUD_CAD",type:"CURRENCY",pipLocation:-4},{name:"UK10YB_GBP",type:"CFD",pipLocation:-2},{name:"XPD_USD",type:"CFD",pipLocation:-2},{name:"UK100_GBP",type:"CFD",pipLocation:0},{name:"XAG_CHF",type:"METAL",pipLocation:-4},{name:"USD_CHF",type:"CURRENCY",pipLocation:-4},{name:"CHF_HKD",type:"CURRENCY",pipLocation:-4},{name:"EUR_HKD",type:"CURRENCY",pipLocation:-4},{name:"GBP_HKD",type:"CURRENCY",pipLocation:-4},{name:"XAU_NZD",type:"METAL",pipLocation:-2},{name:"GBP_NZD",type:"CURRENCY",pipLocation:-4},{name:"GBP_SGD",type:"CURRENCY",pipLocation:-4},{name:"USD_SEK",type:"CURRENCY",pipLocation:-4},{name:"EUR_SGD",type:"CURRENCY",pipLocation:-4},{name:"XAG_JPY",type:"METAL",pipLocation:0},{name:"USD_HKD",type:"CURRENCY",pipLocation:-4},{name:"XAG_HKD",type:"METAL",pipLocation:-4},{name:"XCU_USD",type:"CFD",pipLocation:-4},{name:"XAU_JPY",type:"METAL",pipLocation:1},{name:"EUR_PLN",type:"CURRENCY",pipLocation:-4},{name:"SUGAR_USD",type:"CFD",pipLocation:-4},{name:"HKD_JPY",type:"CURRENCY",pipLocation:-4},{name:"CHF_ZAR",type:"CURRENCY",pipLocation:-4},{name:"ZAR_JPY",type:"CURRENCY",pipLocation:-2},{name:"XAU_HKD",type:"METAL",pipLocation:-2},{name:"AUD_CHF",type:"CURRENCY",pipLocation:-4},{name:"EUR_CHF",type:"CURRENCY",pipLocation:-4},{name:"USD_MXN",type:"CURRENCY",pipLocation:-4},{name:"GBP_USD",type:"CURRENCY",pipLocation:-4},{name:"GBP_ZAR",type:"CURRENCY",pipLocation:-4},{name:"SGD_JPY",type:"CURRENCY",pipLocation:-2},{name:"BCH_USD",type:"CFD",pipLocation:-1},{name:"XAG_AUD",type:"METAL",pipLocation:-4},{name:"WTICO_USD",type:"CFD",pipLocation:-2},{name:"AUD_HKD",type:"CURRENCY",pipLocation:-4},{name:"AUD_SGD",type:"CURRENCY",pipLocation:-4},{name:"NZD_HKD",type:"CURRENCY",pipLocation:-4},{name:"EUR_JPY",type:"CURRENCY",pipLocation:-2},{name:"USD_NOK",type:"CURRENCY",pipLocation:-4},{name:"XAU_USD",type:"METAL",pipLocation:-1},{name:"DE10YB_EUR",type:"CFD",pipLocation:-2},{name:"USD_CZK",type:"CURRENCY",pipLocation:-4},{name:"XAU_CHF",type:"METAL",pipLocation:-2},{name:"USD_HUF",type:"CURRENCY",pipLocation:-2},{name:"WHEAT_USD",type:"CFD",pipLocation:-2},{name:"XAU_AUD",type:"METAL",pipLocation:-2},{name:"EUR_USD",type:"CURRENCY",pipLocation:-4},{name:"SG30_SGD",type:"CFD",pipLocation:-1},{name:"GBP_AUD",type:"CURRENCY",pipLocation:-4},{name:"USD_PLN",type:"CURRENCY",pipLocation:-4},{name:"NZD_CAD",type:"CURRENCY",pipLocation:-4},{name:"XAG_EUR",type:"METAL",pipLocation:-4},{name:"CORN_USD",type:"CFD",pipLocation:-2},{name:"XAG_SGD",type:"METAL",pipLocation:-4},{name:"CHINAH_HKD",type:"CFD",pipLocation:0},{name:"XAU_SGD",type:"METAL",pipLocation:-2},{name:"NZD_USD",type:"CURRENCY",pipLocation:-4},{name:"JP225Y_JPY",type:"CFD",pipLocation:0},{name:"XAG_NZD",type:"METAL",pipLocation:-4},{name:"EUR_CZK",type:"CURRENCY",pipLocation:-4},{name:"AU200_AUD",type:"CFD",pipLocation:0},{name:"SGD_CHF",type:"CURRENCY",pipLocation:-4},{name:"USD_DKK",type:"CURRENCY",pipLocation:-4},{name:"SPX500_USD",type:"CFD",pipLocation:0},{name:"NZD_SGD",type:"CURRENCY",pipLocation:-4},{name:"US30_USD",type:"CFD",pipLocation:0},{name:"NL25_EUR",type:"CFD",pipLocation:-2},{name:"JP225_USD",type:"CFD",pipLocation:0},{name:"USB30Y_USD",type:"CFD",pipLocation:-2},{name:"XAG_USD",type:"METAL",pipLocation:-4},{name:"GBP_PLN",type:"CURRENCY",pipLocation:-4},{name:"CN50_USD",type:"CFD",pipLocation:0},{name:"USB05Y_USD",type:"CFD",pipLocation:-2},{name:"AUD_USD",type:"CURRENCY",pipLocation:-4},{name:"USD_CNH",type:"CURRENCY",pipLocation:-4},{name:"EUR_GBP",type:"CURRENCY",pipLocation:-4},{name:"XAG_GBP",type:"METAL",pipLocation:-4},{name:"XAU_EUR",type:"METAL",pipLocation:-2},{name:"USD_CAD",type:"CURRENCY",pipLocation:-4},{name:"NAS100_USD",type:"CFD",pipLocation:0},{name:"EUR_CAD",type:"CURRENCY",pipLocation:-4},{name:"USB10Y_USD",type:"CFD",pipLocation:-2},{name:"EU50_EUR",type:"CFD",pipLocation:0},{name:"NATGAS_USD",type:"CFD",pipLocation:-2},{name:"CAD_JPY",type:"CURRENCY",pipLocation:-2},{name:"FR40_EUR",type:"CFD",pipLocation:0},{name:"XAU_XAG",type:"METAL",pipLocation:-2},{name:"CAD_SGD",type:"CURRENCY",pipLocation:-4},{name:"GBP_CAD",type:"CURRENCY",pipLocation:-4},{name:"USD_ZAR",type:"CURRENCY",pipLocation:-4},{name:"XAU_GBP",type:"METAL",pipLocation:-2},{name:"CH20_CHF",type:"CFD",pipLocation:0},{name:"CAD_HKD",type:"CURRENCY",pipLocation:-4},{name:"CHF_JPY",type:"CURRENCY",pipLocation:-2},{name:"NZD_CHF",type:"CURRENCY",pipLocation:-4},{name:"ESPIX_EUR",type:"CFD",pipLocation:0},{name:"XAG_CAD",type:"METAL",pipLocation:-4},{name:"XPT_USD",type:"CFD",pipLocation:-2},{name:"EUR_AUD",type:"CURRENCY",pipLocation:-4},{name:"CAD_CHF",type:"CURRENCY",pipLocation:-4},{name:"EUR_DKK",type:"CURRENCY",pipLocation:-4},{name:"SOYBN_USD",type:"CFD",pipLocation:-2},{name:"US2000_USD",type:"CFD",pipLocation:-2},{name:"BCO_USD",type:"CFD",pipLocation:-2},{name:"AUD_JPY",type:"CURRENCY",pipLocation:-2}];function Cr(e,t,n=1){if(t===0||!isFinite(t))return n;const s=e/t;return isFinite(s)?s:n}function xt(e){if(e.length===0)return 0;const t=[...e].sort((s,r)=>s-r),n=Math.floor(t.length/2);return t.length%2!==0?t[n]:(t[n-1]+t[n])/2}function br(e,t,n=[]){if(e.length===0)return[];const s=n.map(l=>Math.abs(l.c-l.o)),r=e.map(l=>Math.abs(l.c-l.o)),i=xt(r),o=xt(s),a=Cr(o,i),f=e[0].o,d=t.c;return e.map(l=>{const _=(l.o-f)*a+d,R=(l.h-f)*a+d,b=(l.l-f)*a+d,p=(l.c-f)*a+d;return{o:_,h:Math.max(R,_,p),l:Math.min(b,_,p),c:p}})}const _e=e=>e==="1"?60:e==="5"?300:e==="1D"?1440*3600:parseInt(e,10)*60,Ze=8,dn=4,We=5,un=e=>{const t=new Date(e+Ze*60*60*1e3),n=t.getUTCDay(),s=t.getUTCHours();return n===0?!1:n===1?s>=We:n===6?s<=dn:!0},pn=e=>{const t=new Date(e+Ze*60*60*1e3),n=t.getUTCDay(),s=t.getUTCHours();if(n===0||n===1&&s<We||n===6&&s>=dn){const r=(8-n)%7;return t.setUTCDate(t.getUTCDate()+r),t.setUTCHours(We,0,0,0),t.getTime()-Ze*60*60*1e3}return e},Rr=(e,t,n)=>{const s=_e(t)*1e3,r=[];let i=e;for(let o=0;o<n;o++)i+=s,un(i)||(i=pn(i)),r.push(i);return r},Lt=(e,t,n,s)=>{if(n<=0)return[];if(s==="24x7"){const i=_e(t)*1e3;return Array.from({length:n},(o,a)=>e+(a+1)*i)}if(s==="1700-1700")return Rr(e,t,n);const r=_e(t)*1e3;return Array.from({length:n},(i,o)=>e+(o+1)*r)},Er=(e,t,n,s)=>{if(s==="24x7"){const i=_e(n)*1e3;return Math.max(0,Math.floor((t-e)/i))}if(s==="1700-1700"){const i=_e(n)*1e3;let o=0,a=e;for(;a<t;)a+=i,un(a)||(a=pn(a)),a<=t&&o++;return o}const r=_e(n)*1e3;return Math.max(0,Math.floor((t-e)/r))},fn=[{ticker:"EUR_JPY",display_name:"EURJPY",logo_urls:["https://cdn.iccandle.ai/web-assets/EUR.svg","https://cdn.iccandle.ai/web-assets/JPY.svg"],description:"EUR JPY",type:"forex",session:"1700-1700"},{ticker:"GBP_JPY",display_name:"GBPJPY",logo_urls:["https://cdn.iccandle.ai/web-assets/GBP.svg","https://cdn.iccandle.ai/web-assets/JPY.svg"],description:"GBP JPY",type:"forex",session:"1700-1700"},{ticker:"AUD_JPY",display_name:"AUDJPY",logo_urls:["https://cdn.iccandle.ai/web-assets/AUD.svg","https://cdn.iccandle.ai/web-assets/JPY.svg"],description:"AUD JPY",type:"forex",session:"1700-1700"},{ticker:"NZD_JPY",display_name:"NZDJPY",logo_urls:["https://cdn.iccandle.ai/web-assets/NZD.svg","https://cdn.iccandle.ai/web-assets/JPY.svg"],description:"NZD JPY",type:"forex",session:"1700-1700"},{ticker:"CAD_JPY",display_name:"CADJPY",logo_urls:["https://cdn.iccandle.ai/web-assets/CAD.svg","https://cdn.iccandle.ai/web-assets/JPY.svg"],description:"CAD JPY",type:"forex",session:"1700-1700"},{ticker:"CHF_JPY",display_name:"CHFJPY",logo_urls:["https://cdn.iccandle.ai/web-assets/CHF.svg","https://cdn.iccandle.ai/web-assets/JPY.svg"],description:"CHF JPY",type:"forex",session:"1700-1700"},{ticker:"USD_JPY",display_name:"USDJPY",logo_urls:["https://cdn.iccandle.ai/web-assets/USD.svg","https://cdn.iccandle.ai/web-assets/JPY.svg"],description:"USD JPY",type:"forex",session:"1700-1700"},{ticker:"EUR_USD",display_name:"EURUSD",logo_urls:["https://cdn.iccandle.ai/web-assets/EUR.svg","https://cdn.iccandle.ai/web-assets/USD.svg"],description:"EUR USD",type:"forex",session:"1700-1700"},{ticker:"AUD_USD",display_name:"AUDUSD",logo_urls:["https://cdn.iccandle.ai/web-assets/AUD.svg","https://cdn.iccandle.ai/web-assets/USD.svg"],description:"AUD USD",type:"forex",session:"1700-1700"},{ticker:"NZD_USD",display_name:"NZDUSD",logo_urls:["https://cdn.iccandle.ai/web-assets/NZD.svg","https://cdn.iccandle.ai/web-assets/USD.svg"],description:"NZD USD",type:"forex",session:"1700-1700"},{ticker:"USD_CHF",display_name:"USDCHF",logo_urls:["https://cdn.iccandle.ai/web-assets/USD.svg","https://cdn.iccandle.ai/web-assets/CHF.svg"],description:"USD CHF",type:"forex",session:"1700-1700"},{ticker:"USD_CAD",display_name:"USDCAD",logo_urls:["https://cdn.iccandle.ai/web-assets/USD.svg","https://cdn.iccandle.ai/web-assets/CAD.svg"],description:"USD CAD",type:"forex",session:"1700-1700"},{ticker:"GBP_AUD",display_name:"GBPAUD",logo_urls:["https://cdn.iccandle.ai/web-assets/GBP.svg","https://cdn.iccandle.ai/web-assets/AUD.svg"],description:"GBP AUD",type:"forex",session:"1700-1700"},{ticker:"GBP_CAD",display_name:"GBPCAD",logo_urls:["https://cdn.iccandle.ai/web-assets/GBP.svg","https://cdn.iccandle.ai/web-assets/CAD.svg"],description:"GBP CAD",type:"forex",session:"1700-1700"},{ticker:"GBP_CHF",display_name:"GBPCHF",logo_urls:["https://cdn.iccandle.ai/web-assets/GBP.svg","https://cdn.iccandle.ai/web-assets/CHF.svg"],description:"GBP CHF",type:"forex",session:"1700-1700"},{ticker:"GBP_NZD",display_name:"GBPNZD",logo_urls:["https://cdn.iccandle.ai/web-assets/GBP.svg","https://cdn.iccandle.ai/web-assets/NZD.svg"],description:"GBP NZD",type:"forex",session:"1700-1700"},{ticker:"GBP_USD",display_name:"GBPUSD",logo_urls:["https://cdn.iccandle.ai/web-assets/GBP.svg","https://cdn.iccandle.ai/web-assets/USD.svg"],description:"GBP USD",type:"forex",session:"1700-1700"},{ticker:"NZD_CAD",display_name:"NZDCAD",logo_urls:["https://cdn.iccandle.ai/web-assets/NZD.svg","https://cdn.iccandle.ai/web-assets/CAD.svg"],description:"NZD CAD",type:"forex",session:"1700-1700"},{ticker:"EUR_CAD",display_name:"EURCAD",logo_urls:["https://cdn.iccandle.ai/web-assets/EUR.svg","https://cdn.iccandle.ai/web-assets/CAD.svg"],description:"EUR CAD",type:"forex",session:"1700-1700"},{ticker:"EUR_AUD",display_name:"EURAUD",logo_urls:["https://cdn.iccandle.ai/web-assets/EUR.svg","https://cdn.iccandle.ai/web-assets/AUD.svg"],description:"EUR AUD",type:"forex",session:"1700-1700"},{ticker:"XAU_USD",display_name:"XAUUSD",logo_urls:["https://cdn.iccandle.ai/web-assets/XAU.svg"],description:"Gold",type:"commodity",session:"1700-1700"},{ticker:"BCO_USD",display_name:"BCOUSD",logo_urls:["https://cdn.iccandle.ai/web-assets/BCO.svg"],description:"Brent Crude Oil",type:"commodity",session:"1700-1700"},{ticker:"SPX500_USD",display_name:"S&P500",logo_urls:["https://cdn.iccandle.ai/web-assets/SPX500.svg"],description:"S&P 500",type:"indices",session:"1700-1700"},{ticker:"NAS100_USD",display_name:"NASDAQ100",logo_urls:["https://cdn.iccandle.ai/web-assets/NAS100.svg"],description:"NASDAQ 100",type:"indices",session:"1700-1700"},{ticker:"US30_USD",display_name:"US30",logo_urls:["https://cdn.iccandle.ai/web-assets/US30.svg"],description:"US Wall St 30",type:"indices",session:"1700-1700"},{ticker:"BTCUSDT",display_name:"BTCUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/BTC.svg"],description:"BTCUSDT",type:"crypto",session:"24x7"},{ticker:"ETHUSDT",display_name:"ETHUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/ETH.svg"],description:"ETHUSDT",type:"crypto",session:"24x7"},{ticker:"XRPUSDT",display_name:"XRPUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/XRP.svg"],description:"XRPUSDT",type:"crypto",session:"24x7"},{ticker:"SOLUSDT",display_name:"SOLUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/SOL.svg"],description:"SOLUSDT",type:"crypto",session:"24x7"},{ticker:"ADAUSDT",display_name:"ADAUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/ADA.svg"],description:"ADAUSDT",type:"crypto",session:"24x7"},{ticker:"AVAUSDT",display_name:"AVAUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/AVA.svg"],description:"AVAUSDT",type:"crypto",session:"24x7"},{ticker:"AVAXUSDT",display_name:"AVAXUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/AVAX.svg"],description:"AVAXUSDT",type:"crypto",session:"24x7"},{ticker:"BNBUSDT",display_name:"BNBUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/BNB.svg"],description:"BNBUSDT",type:"crypto",session:"24x7"},{ticker:"DOGEUSDT",display_name:"DOGEUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/DOGE.svg"],description:"DOGEUSDT",type:"crypto",session:"24x7"},{ticker:"DOTUSDT",display_name:"DOTUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/DOT.svg"],description:"DOTUSDT",type:"crypto",session:"24x7"},{ticker:"TRXUSDT",display_name:"TRXUSDT",logo_urls:["https://cdn.iccandle.ai/web-assets/TRX.svg"],description:"TRXUSDT",type:"crypto",session:"24x7"},{ticker:"AAPL",display_name:"AAPL",logo_urls:["https://cdn.iccandle.ai/web-assets/AAPL.svg"],description:"Apple Inc.",type:"stock",session:"24x7"},{ticker:"AMZN",display_name:"AMZN",logo_urls:["https://cdn.iccandle.ai/web-assets/AMZN.svg"],description:"Amazon.Com Inc",type:"stock",session:"24x7"},{ticker:"BRK.B",display_name:"BRK.B",logo_urls:["https://cdn.iccandle.ai/web-assets/BRK.B.svg"],description:"BERKSHIRE HATHAWAY Class B",type:"stock",session:"24x7"},{ticker:"GOOGL",display_name:"GOOGL",logo_urls:["https://cdn.iccandle.ai/web-assets/GOOGL.svg"],description:"Alphabet Inc. Class A Common Stock",type:"stock",session:"24x7"},{ticker:"KO",display_name:"KO",logo_urls:["https://cdn.iccandle.ai/web-assets/KO.svg"],description:"Coca-Cola Company",type:"stock",session:"24x7"},{ticker:"META",display_name:"META",logo_urls:["https://cdn.iccandle.ai/web-assets/META.svg"],description:"Meta Platforms, Inc. Class A Common Stock",type:"stock",session:"24x7"},{ticker:"MSFT",display_name:"MSFT",logo_urls:["https://cdn.iccandle.ai/web-assets/MSFT.svg"],description:"Microsoft Corp",type:"stock",session:"24x7"},{ticker:"NFLX",display_name:"NFLX",logo_urls:["https://cdn.iccandle.ai/web-assets/NFLX.svg"],description:"NetFlix Inc",type:"stock",session:"24x7"},{ticker:"NKE",display_name:"NKE",logo_urls:["https://cdn.iccandle.ai/web-assets/NKE.svg"],description:"Nike, Inc.",type:"stock",session:"24x7"},{ticker:"NVDA",display_name:"NVDA",logo_urls:["https://cdn.iccandle.ai/web-assets/NVDA.svg"],description:"Nvidia Corp",type:"stock",session:"24x7"},{ticker:"TME",display_name:"TME",logo_urls:["https://cdn.iccandle.ai/web-assets/TME.svg"],description:"Tencent Music Entertainment Group American Depositary Shares, each representing two Class A Ordinary Shares",type:"stock",session:"24x7"},{ticker:"TSLA",display_name:"TSLA",logo_urls:["https://cdn.iccandle.ai/web-assets/TSLA.svg"],description:"Tesla, Inc. Common Stock",type:"stock",session:"24x7"},{ticker:"XAG_USD",display_name:"XAGUSD",logo_urls:["https://cdn.iccandle.ai/web-assets/XAG.svg"],description:"Silver",type:"commodity",session:"1700-1700"},{ticker:"XCU_USD",display_name:"XCUUSD",logo_urls:["https://cdn.iccandle.ai/web-assets/XCU.svg"],description:"Copper",type:"commodity",session:"1700-1700"}],Sr=({replayTabId:e,futureBarsRef:t,highlightBarsRef:n,tvWidgetRef:s,pushBar:r,resolution:i,symbol:o})=>{const a=we(b=>b.newsSelectedCandles),f=we(b=>b.newsTargetCandle),d=we(b=>b.newsPlayEndTimestamp),l=we(b=>b.gapCount),_=y.useRef(a),R=y.useRef(null);return y.useEffect(()=>{const b={current:null};let p=null,w=!1;return(async()=>{if(!w){if(a?.length&&f!==null){if(R.current===a)return;t.current=[];const h=d!=null;if(_.current||h)try{s?.current?.resetCache(),s?.current?.activeChart().resetData()}catch{}try{s?.current?.activeChart().executeActionById("timeScaleReset")}catch{}const j=[...a].slice(-50-(l||0)),N=br(j,f[f.length-1],f),H=fn.find(T=>T.ticker===o||T.display_name===o)?.session||"24x7",k=Lt(f[f.length-1].timestamp,i,l||0,H),X=Lt(l?k[k.length-1]:f[f.length-1].timestamp,i,N.length,H),F=N.map((T,P)=>({open:T.o,high:T.h,low:T.l,close:T.c,time:X[P]})).sort((T,P)=>T.time-P.time);n.current=F.slice(-50);let M=0,le=0;const W=async()=>{b.current&&(clearInterval(b.current),b.current=null),R.current=a;try{a&&F.length>0}catch(T){console.error("Error setting visible range:",T)}};F.length===0?(t.current=[],await W()):p=setTimeout(()=>{w||(b.current=setInterval(()=>{if(M<F.length){if(r(e,F[M]))t.current=F.slice(0,M+1),M++,le=0,M===F.length&&(t.current=F,W());else if(le++,le>=10){t.current=[...F];try{s?.current?.activeChart().resetData()}catch{}W()}}},150))},700)}else{if(t.current=[],_.current)try{s?.current?.resetCache(),s?.current?.activeChart().resetData()}catch{}R.current=null}_.current=a}})(),()=>{w=!0,p&&clearTimeout(p),b.current&&(t.current=[],clearInterval(b.current))}},[r,t,n,d,a,f,e,i,o,s,l]),y.useEffect(()=>{a===null&&(n.current=[])},[n,a]),m.jsx(m.Fragment,{})},Dr=({children:e,eventId:t,widgetKey:n,chartWidget:s,event:r,theme:i,newsDetail:o,selectedCandles:a,defaultSymbol:f,currentSymbol:d,currentTimeFrame:l,isUpcoming:_=!1,isElapsed:R=!1,onBack:b,pushBar:p,iframeRef:w,futureRef:h,pendingMessageRef:A,iframeReadyToListenRef:j,highlightBarsRef:N,setGapCountExternal:B,setReplayModeExternal:H})=>{const k=y.useRef(null),{setCurrentSymbol:X,setSelectedTimeframe:ce}=er(),{setNewsTargetCandle:F,setGapCount:M,setNewsPlayEndTimestamp:le,setNewsSelectedCandles:W}=we();return y.useEffect(()=>{if(!t||t==""||!s)return;const T=()=>{if(s){const g=s?.activeChart();g&&g.getAllShapes().forEach(z=>{try{g.removeEntity(z.id)}catch(v){console.error("Failed to remove shape",v)}})}},P=async()=>{const{data:g,status:z}=await J.get(`https://corprate-widget.iccandle.ai/news/${t}`,{headers:{"api-key":n},params:{symbol:f}});if(z!==200){console.error("Failed to fetch news detail");return}return g};let K=!1;const L=[],re=(g,z)=>{const v=window.setTimeout(g,z);return L.push(v),v};return k.current=s,s.onChartReady(async()=>{i==="dark"||i==="system"?(s.applyOverrides({"paneProperties.background":"#000000","scalesProperties.textColor":"#fff"}),s.setCSSCustomProperty("--tv-color-pane-background","#000000"),s.setCSSCustomProperty("--tv-color-platform-background","#0f0f0f")):(s.applyOverrides({"paneProperties.background":"#ffffff","scalesProperties.textColor":"#000"}),s.setCSSCustomProperty("--tv-color-pane-background","#ffffff"),s.setCSSCustomProperty("--tv-color-platform-background","#f9fafb"));const g=s.activeChart();if(!g)return;const z=async(S,Y)=>{await g.createShape({time:Y},{shape:"vertical_line",lock:!0,disableSelection:!0,overrides:{linestyle:2,linewidth:1}});const I=await g.exportData(),D=I.data.findIndex(x=>x[0]===Y);let Z=a;if(D!=-1&&!Z&&(Z=[...on].sort((x,q)=>q-x).find(x=>I.data[D+x])??null),D!=-1&&Z){const x=S,q=I.data[D+Z][0],$=I.data.filter(ae=>ae[0]>x&&ae[0]<=q)??[];let ee=null,pe=null;if($.length>0){const ae=$.reduce((ne,se,O,V)=>Number(se[3])<Number(V[ne][3])?O:ne,0),G=$[ae];pe={time:G[0],value:Number(G[3])}}if($.length>0){const ae=$.reduce((ne,se,O,V)=>Number(se[2])>Number(V[ne][2])?O:ne,0),G=$[ae];ee={time:G[0],value:Number(G[2])}}if(ee&&pe&&$.length>0){const ae=ee.value,G=pe.value,se=I.data[D+1][1];await g.createMultipointShape([{time:x,price:se},{time:q,price:ae}],{shape:"rectangle",overrides:{showLabel:!1,linecolor:"#12B76A",linewidth:1,linestyle:0,color:"#12B76A10",borderColor:"#12B76A",borderWidth:1,backgroundColor:"#12B76A",transparency:70,drawBorder:!1,frozen:!0}}),await g.createMultipointShape([{time:x,price:G},{time:q,price:se}],{shape:"rectangle",overrides:{showLabel:!1,linecolor:"#D92D2030",linewidth:1,linestyle:0,color:"#D92D2010",borderWidth:1,backgroundColor:"#D92D20",transparency:70,drawBorder:!1,frozen:!0}}),await g.createMultipointShape([{time:x,price:ae},{time:q,price:ae}],{shape:"trend_line",overrides:{linecolor:"#12B76A",linewidth:1,linestyle:2,extendLeft:!0,extendRight:!0}}),await g.createMultipointShape([{time:x,price:G},{time:q,price:G}],{shape:"trend_line",overrides:{linecolor:"#D92D20",linewidth:1,linestyle:2,extendLeft:!0,extendRight:!0}});const O=gr.find(ve=>vt(ve.name)==vt(d))?.pipLocation;let V="",Q="";if(O){const ve=Math.pow(10,-O),it=parseFloat(Math.abs((ae-se)*ve).toFixed(1)),ot=parseFloat(Math.abs((G-se)*ve).toFixed(1));V=`${it>=0?"+":""}${it.toFixed(2)} pip`,Q=`${ot>=0?"-":""}${ot.toFixed(2)} pip`}await g.createShape({time:ee.time,price:ee.value},{shape:"arrow_down",overrides:{arrowColor:"#12B76A",fontsize:11,color:"#12B76A",text:V,bold:!0}}),await g.createShape({time:pe.time,price:pe.value},{shape:"arrow_up",overrides:{arrowColor:"#D92D20",fontsize:11,color:"#D92D20",text:Q,bold:!0}});const Ne=Math.floor((x+q)/2);await g.createShape({time:Ne},{shape:"text",text:`${Z} candles`,zOrder:"top",overrides:{fontsize:12,color:"#FFFFFF",bold:!0,backgroundColor:"#FFFFFF"}})}}if(I&&I.data.length>0&&I.data[0][0]>=I.data[I.data.length-1][0]&&await g.setVisibleRange({from:I.data[0][0],to:I.data[I.data.length-1][0]}),_&&r){const x=Math.floor(Date.now()/1e3),q=Y,$=g.resolution(),ee=3600*24*7;x-ee>=q+ee&&await g.setVisibleRange({from:x-ee,to:q+ee},{applyDefaultRightMargin:!0,percentRightMargin:50}),re(()=>{K||k.current!==s||Number($)<=30&&g.createShape({time:q},{shape:"vertical_line",lock:!0,disableSelection:!0,overrides:{linestyle:2,linewidth:1}})},2e3)}},v=async()=>{if(K||k.current!==s)return;const S=await P();if(K||k.current!==s)return;T();const Y=(S?.event?.timestamp??0)/1e3,I=Ke(l),D=Y-Y%I;g.getVisibleBarsRange()||await new Promise(q=>setTimeout(q,2e3));const x=g.getVisibleBarsRange();x&&x.from<=Y&&Y<=x.to?await z(Y,D):(_||await g.setVisibleRange({from:Y},{applyDefaultRightMargin:!0,percentRightMargin:50}),await z(Y,D))},u=()=>{re(()=>{K||k.current!==s||d==g.symbol()||(async()=>{try{B(0),H(!1),W(null),w.current?.contentWindow?.postMessage({action:"handleClose"},"*"),X(g.symbol())}catch(S){console.log("error=>",S)}})()},300)},C=S=>{re(()=>{K||k.current!==s||l==S||(async()=>{try{B(0),H(!1),W(null),w.current?.contentWindow?.postMessage({action:"handleClose"},"*"),ce(S)}catch(Y){console.log("error=>",Y)}})()},300)};g.onSymbolChanged().subscribe(null,u),g.onIntervalChanged().subscribe(null,C);try{R||await v()}catch(S){console.log("error=>",S)}K&&(()=>{try{g.onSymbolChanged().unsubscribe(null,u)}catch{}try{g.onIntervalChanged().unsubscribe(null,C)}catch{}})()}),()=>{K=!0,L.forEach(g=>window.clearTimeout(g)),T(),k.current===s&&(k.current=null)}},[i,n,s,_,f,a,r,t,l,ce,d,X,R,le,W,M,F,B,H,w]),y.useEffect(()=>{s&&s.onChartReady(async()=>{const T=s?.activeChart();T&&T.onDataLoaded().subscribe(null,()=>{setTimeout(async()=>{const{data:P}=await T.exportData(),K=Ke(l),L=(r?.timestamp??0)/1e3,re=L-L%K,g=P.findIndex(v=>v[0]===re),z=P.slice(g-49,g+1).map(v=>({o:v[1],h:v[2],l:v[3],c:v[4],timestamp:v[0]*1e3}));if(_){const v=P[P.length-1],u={o:v[1],h:v[2],l:v[3],c:v[4],timestamp:v[0]*1e3},C=T.resolution(),U=_e(C)*1e3,S=u.timestamp,Y=r?.timestamp??0,I=Math.floor(Y/U)*U,D=fn.find($=>$.ticker===d||$.display_name===d)?.session||"24x7",Z=Er(S,I,C,D),x=P.slice(-50).map($=>({o:$[1],h:$[2],l:$[3],c:$[4],timestamp:$[0]*1e3}));M(Z),F(x);const q={newsTargetCandle:x,gapCount:Z};A.current=q,j.current&&(w.current?.contentWindow?.postMessage(A.current,"*"),A.current=null)}else{F(z),M(0);const v={newsTargetCandle:z,gapCount:0};A.current=v,j.current&&(w.current?.contentWindow?.postMessage(A.current,"*"),A.current=null)}},100)},!0)})},[t,r?.timestamp,F,M,l,_,d,s,A]),m.jsx("div",{className:"news-widget_detail_page__container",children:m.jsxs("div",{className:"news-widget_detail_page__right_border",children:[m.jsx("div",{className:"news-widget_detail_page__title_container",children:m.jsxs("div",{className:"news-widget_detail_page__title_padding",children:[m.jsx("button",{type:"button",className:"news-widget__button news-widget__button--ghost news-widget__button--icon news-widget_detail_page__back_button",onClick:b,children:m.jsx(dr,{className:"news-widget_detail_page__back_icon"})}),m.jsx("p",{className:"news-widget_detail_page__title_text",children:"Economic Calendar Analysis"})]})}),m.jsx("div",{className:"news-widget_detail_page__event_details",children:m.jsxs(yr,{newsDetail:o,children:[e,_&&m.jsx(Sr,{replayTabId:t||"news",futureBarsRef:h,highlightBarsRef:N,pushBar:p,tvWidgetRef:k,resolution:l||"15",symbol:d})]})})]})})},Ee="https://widget-result-news.iccandle.ai",Pt="https://corprate-widget.iccandle.ai/news",Ar=({chartWidget:e,children:t,widgetKey:n,userId:s,defaultSymbol:r,chartInterval:i="15",theme:o,symbolMapper:a,pushBar:f,futureRef:d,highlightBarsRef:l,setGapCountExternal:_,setReplayModeExternal:R})=>{const{start:b}=wn(),[p,w]=y.useState(""),[h,A]=y.useState(i),[j,N]=y.useState(r),[B,H]=y.useState(i),[k,X]=y.useState(r),[ce,F]=y.useState(null),[M,le]=y.useState(null),W=y.useRef(null),T=y.useRef(!1),{setNewsSelectedCandles:P,setNewsPlayEndTimestamp:K,newsTargetCandle:L,gapCount:re}=we(),g=y.useRef(null),z=Qs[h]||"M15",v=Ke("60"),u=M?.[0]?.timestamp?M?.[0]?.timestamp/1e3:0,C=u-u%v,U=M?.[0]?.candleData.H1?.candles,S=U?.findIndex(G=>G.timestamp===C)||0,I=(U?.length||0)-S<=10,D="next_pip_up_10"in(M?.[0]?.candleData[z]?.metadata??{}),Z=!!p&&!D,x=y.useRef(Z),q=y.useRef(!1);y.useEffect(()=>{if(Z!==x.current){if(x.current=Z,q.current){q.current=!1;return}b()}},[Z,b]),y.useEffect(()=>{const G=async O=>{const{data:V,status:Q}=await J.get(`${Pt}/${O}`,{headers:{"api-key":n},params:{symbol:r}});return Q!==200?(console.error("Failed to fetch news detail"),null):V},ne=async O=>{const{data:V,status:Q}=await J.get(`${Pt}/similar-details`,{headers:{"api-key":n},params:{event_id:O}});return Q!==200?(console.error("Failed to fetch compared news"),null):V};(async()=>{if(p==="")return;const[O,V]=await Promise.all([G(p),ne(p)]);O&&F(O),V&&le(V)})()},[n,p,r]);const $=y.useCallback(()=>{R(!1),_(0),P(null),K(null)},[R,_,P,K]),ee=y.useCallback(()=>{w(""),N(r),$()},[r,$]);y.useEffect(()=>{const G=async({origin:ne,data:se})=>{if(ne!==Ee||typeof se!="string")return;const O=JSON.parse(se);if(O.action=="back")ee();else if(O.action=="back-to-similar-events")$();else if(O.action=="eventClicked"){q.current=!0,b();const Q=O.data.event,Ne=e?.activeChart();await e?.headerReady(),Ne?.clearMarks(2),localStorage.setItem("iccandle:current-news-event",JSON.stringify({actual:Q.actual,event_name:Q.event_name,forecast:Q.forecast,id:Q.id,metric:Q.metric,previous:Q.previous,timestamp:Q.timestamp,currency:Q.currency})),Ne?.refreshMarks(),H(h),X(j),w(Q.id)}else if(O.action=="intervalChanged"||O.action=="symbolChanged"){const V=O.data;if(V.type===2)return;V.resolution&&A(V.resolution);const Q=a?.[V.symbol]??r;N(Q)}else if(O.action=="replay"){const V=O.data;R(V.isReplay),_(re),P(V.selectedCandles),K(L?.[L.length-1]?.timestamp??null)}else O.action=="iframe-ready"&&(T.current=!0,W.current?.contentWindow?.postMessage(g.current,"*"),g.current=null)};return window.addEventListener("message",G),()=>window.removeEventListener("message",G)},[L,re,e,r,b,$,ee,a,g,H,X,j,h,R,_,K,P]);const pe=y.useMemo(()=>{const G=M?.[0]?.candleData?.[z]?.metadata;return G?[...on].sort((ne,se)=>se-ne).find(ne=>[`next_pip_up_${ne}`,`next_pip_down_${ne}`].some(O=>G[O]!==void 0))??null:null},[M,z]);y.useEffect(()=>{const G=()=>{ee()};return window.addEventListener("popstate",G),()=>window.removeEventListener("popstate",G)},[ee]);const ae=y.useMemo(()=>p?M?D?`${Ee}/${p}?apiKey=${n}&userId=${s}&theme=${o}&interval=${B}&symbol=${k}`:`${Ee}/similar-events/${p}?apiKey=${n}&userId=${s}&theme=${o}`:`${Ee}?apiKey=${n}&userId=${s}&theme=${o}`:`${Ee}?apiKey=${n}&userId=${s}&theme=${o}`,[p,M,D,n,o,s,B,k]);return m.jsxs("div",{className:"news-widget_main__container news-widget_main__container--lg",children:[m.jsx("div",{className:"news-widget_main__left",style:{display:p&&!D?"flex":"none"},children:m.jsx(tr,{selectedTimeframe:h,setSelectedTimeframe:A,currentSymbol:j,setCurrentSymbol:N,children:m.jsx(Dr,{eventId:p,chartWidget:e,widgetKey:n,theme:o,defaultSymbol:r,newsDetail:ce,isUpcoming:I,event:ce?.event,selectedCandles:pe,currentTimeFrame:h,currentSymbol:j,onBack:ee,isElapsed:D,iframeRef:W,pendingMessageRef:g,iframeReadyToListenRef:T,pushBar:f,futureRef:d,highlightBarsRef:l,setReplayModeExternal:R,setGapCountExternal:_,children:t})})}),m.jsx("iframe",{src:ae,ref:W,className:p&&!D?"news-widget_main__iframe_half":"news-widget_main__iframe_full"})]})},Ur="https://api.iccandle.ai",Tr='"Inter Tight", ui-sans-serif, system-ui, sans-serif';function Ot(e){return{iccandle_primary:e.iccandle_primary,iccandle_border:e.iccandle_border,iccandle_text:e.iccandle_text,iccandle_background:e.iccandle_background,iccandle_primary_gradient_end:e.iccandle_primary_gradient_end,iccandle_font:e.icc_font??e.iccandle_font??Tr}}const Nr=async e=>{const t=await fetch(`${Ur}/corporate-client/v1/widgetStyle/search/user/?service_type=news`,{headers:{"api-key":e}});if(!t.ok)throw new Error(`Failed to fetch widget style: ${t.statusText}`);const n=await t.json();return{...n,dark:Ot(n.dark),light:Ot(n.light)}},kt={iccandle_font:"--iccandle-font",iccandle_primary:"--iccandle-primary",iccandle_border:"--iccandle-border",iccandle_text:"--iccandle-text",iccandle_background:"--iccandle-background",iccandle_primary_gradient_end:"--iccandle-primary-gradient-end"};function vr(e,t){const[n,s]=y.useState(null);y.useEffect(()=>{Nr(e).then(d=>{s(d)})},[e]);const r=y.useRef(null),[i,o]=y.useState(null),a=y.useMemo(()=>t==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,[t]),f=y.useMemo(()=>{if(n)return a==="dark"?n.dark:n.light},[n,a]);return y.useEffect(()=>{if(typeof window>"u"||!f||!i)return;const d=i;Object.keys(kt).forEach(l=>{d.style.setProperty(kt[l],f[l])})},[f,i]),{rootRef:r,setRootEl:o,resolvedTheme:a}}const xr=e=>{const{rootRef:t,setRootEl:n,resolvedTheme:s}=vr(e.widgetKey,e.theme);return m.jsx("div",{ref:r=>{t.current=r,n(r)},className:`news-widget__container news-widget ${s==="dark"?"dark":""}`,children:m.jsx(gn,{theme:s,children:m.jsx(Ar,{...e,children:e.children})})})};exports.NewsWidget=xr;
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { IChartingLibraryWidget } from 'public/charting_library/charting_library';
3
+ import { IChartingLibraryWidget, Bar } from 'public/charting_library/charting_library';
4
4
 
5
5
  declare const TICKERS: readonly ["EURJPY", "GBPJPY", "AUDJPY", "NZDJPY", "CADJPY", "CHFJPY", "USDJPY", "EURUSD", "AUDUSD", "NZDUSD", "USDCHF", "USDCAD", "GBPAUD", "GBPCAD", "GBPCHF", "GBPNZD", "GBPUSD", "NZDCAD", "EURCAD", "EURAUD", "XAUUSD", "BCOUSD", "S&P500", "NASDAQ100", "US30", "BTCUSDT", "ETHUSDT", "XRPUSDT", "SOLUSDT", "ADAUSDT", "AVAUSDT", "AVAXUSDT", "BNBUSDT", "DOGEUSDT", "DOTUSDT", "TRXUSDT", "AAPL", "AMZN", "BRK.B", "GOOGL", "KO", "META", "MSFT", "NFLX", "NKE", "NVDA", "TME", "TSLA", "XAGUSD", "XCUUSD"];
6
6
 
@@ -12,10 +12,20 @@ type NewsWidgetProps = {
12
12
  chartWidget: IChartingLibraryWidget | null;
13
13
  children: ReactNode;
14
14
  widgetKey: string;
15
+ userId: string;
15
16
  defaultSymbol: string;
16
- symbolMapper?: SymbolMapper;
17
17
  chartInterval: "1" | "5" | "15" | "30" | "60";
18
18
  theme?: "light" | "dark" | "system";
19
+ symbolMapper?: SymbolMapper;
20
+ pushBar: (tabValue: string, bar: Bar) => boolean;
21
+ highlightBarsRef: {
22
+ current: Bar[];
23
+ };
24
+ futureRef: {
25
+ current: Bar[];
26
+ };
27
+ setGapCountExternal: (count: number) => void;
28
+ setReplayModeExternal: (isReplayMode: boolean) => void;
19
29
  };
20
30
 
21
31
  declare const NewsWidget: (props: NewsWidgetProps) => react_jsx_runtime.JSX.Element;