(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1859],{97754:(e,t)=>{var a;!function(){"use strict";var n={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)&&a.length){var i=l.apply(null,a);i&&e.push(i)}else if("object"===o)for(var r in a)n.call(a,r)&&a[r]&&e.push(r)}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(a=function(){return l}.apply(t,[]))||(e.exports=a)}()},55185:e=>{e.exports={"link-item":"link-item-eIA09f0e"}},67033:e=>{e.exports={"arrow-icon":"arrow-icon-NIrWNOPk",dropped:"dropped-NIrWNOPk","size-xsmall":"size-xsmall-NIrWNOPk","size-small":"size-small-NIrWNOPk","size-medium":"size-medium-NIrWNOPk","size-large":"size-large-NIrWNOPk","size-xlarge":"size-xlarge-NIrWNOPk"}},58591:e=>{e.exports={"underline-tab":"underline-tab-cfYYXvwA","disable-focus-outline":"disable-focus-outline-cfYYXvwA","enable-cursor-pointer":"enable-cursor-pointer-cfYYXvwA",disabled:"disabled-cfYYXvwA",selected:"selected-cfYYXvwA","disable-active-state-styles":"disable-active-state-styles-cfYYXvwA","size-xsmall":"size-xsmall-cfYYXvwA","size-small":"size-small-cfYYXvwA","size-medium":"size-medium-cfYYXvwA","size-large":"size-large-cfYYXvwA","size-xlarge":"size-xlarge-cfYYXvwA",fake:"fake-cfYYXvwA","margin-xsmall":"margin-xsmall-cfYYXvwA","margin-small":"margin-small-cfYYXvwA","margin-medium":"margin-medium-cfYYXvwA","margin-large":"margin-large-cfYYXvwA","margin-xlarge":"margin-xlarge-cfYYXvwA",collapse:"collapse-cfYYXvwA","ellipsis-children":"ellipsis-children-cfYYXvwA"}},49682:e=>{e.exports={"scroll-wrap":"scroll-wrap-SmxgjhBJ","size-xlarge":"size-xlarge-SmxgjhBJ","enable-scroll":"enable-scroll-SmxgjhBJ","underline-tabs":"underline-tabs-SmxgjhBJ","size-large":"size-large-SmxgjhBJ","size-medium":"size-medium-SmxgjhBJ","size-small":"size-small-SmxgjhBJ","size-xsmall":"size-xsmall-SmxgjhBJ","make-grid-column":"make-grid-column-SmxgjhBJ","stretch-tabs":"stretch-tabs-SmxgjhBJ","equal-tab-size":"equal-tab-size-SmxgjhBJ"}},15427:e=>{e.exports={underline:"underline-Pun8HxCz",center:"center-Pun8HxCz",corner:"corner-Pun8HxCz",disabled:"disabled-Pun8HxCz"}},67829:(e,t,a)=>{"use strict";a.d(t,{UnderlineButtonTabs:()=>$});var n,l=a(50959),o=a(97754),i=a.n(o),r=a(11542),s=a(95854),c=a(38528),u=a(47201),d=a(7953),m=a(36966),f=a(26597);!function(e){e.XSmall="xsmall",e.Small="small",e.Medium="medium",e.Large="large",e.XLarge="xlarge"}(n||(n={}));const v=(0,l.createContext)({size:"small",overflowBehaviour:void 0});var b=a(17946),g=a(58591);function p(e){const{size:t="xsmall",active:a,fake:n,enableActiveStateStyles:l,anchor:o=!1,hideFocusOutline:r=!1,equalTabSize:s,className:c,overflowBehaviour:u,disabled:d}=e;return i()(g["underline-tab"],g[`size-${t}`],a&&g.selected,!l&&g["disable-active-state-styles"],r&&g["disable-focus-outline"],n&&g.fake,o&&g["enable-cursor-pointer"],s&&g[`margin-${t}`],"collapse"===u&&g.collapse,d&&g.disabled,c)}const h=(0,l.forwardRef)(((e,t)=>{
const{size:a,overflowBehaviour:n}=(0,l.useContext)(v),o=(0,l.useContext)(b.CustomBehaviourContext),{active:r,fake:s,className:c,enableActiveStateStyles:u=o.enableActiveStateStyles,hideFocusOutline:d=!1,equalTabSize:m,children:f,disabled:h,...w}=e;return l.createElement("button",{...w,ref:t,className:p({size:a,active:r,fake:s,enableActiveStateStyles:u,hideFocusOutline:d,equalTabSize:m,className:c,overflowBehaviour:n,disabled:h})},m&&"string"==typeof f?l.createElement("span",{className:i()(g["ellipsis-children"],"apply-overflow-tooltip")},f):f)}));h.displayName="UnderlineTabsBaseButton";const w=(0,l.forwardRef)(((e,t)=>{const{item:a,highlighted:n,handleItemRef:o,onClick:i,...r}=e,s=(0,l.useCallback)((()=>{i&&i(a)}),[i,a]),c=(0,l.useCallback)((e=>{o&&o(a,e),t&&"object"==typeof t?t.current=e:"function"==typeof t&&t(e)}),[a,o,t]);return l.createElement(h,{...r,id:a.id,onClick:s,ref:c},a.label)}));w.displayName="UnderlineButtonTab";var D=a(50151),C=a(16396),S=a(4523),x=a(9745),k=a(47531),y=a(2948),E=a(63509),N=a(68874),T=a(67033);function A(e){switch(e){case"xsmall":return k;case"small":return y;case"medium":case"large":return E;case"xlarge":return N}}function I(e){const{size:t,isDropped:a=!1}=e;return l.createElement(x.Icon,{icon:A(t),className:o(T["arrow-icon"],T[`size-${t}`],a&&T.dropped)})}var O=a(55185);const R=4,z=4;function P(e){const{size:t,disabled:a,isOpened:n,enableActiveStateStyles:o,hideFocusOutline:i,fake:r,items:s,buttonContent:u,buttonRef:d,isAnchorTabs:m,isHighlighted:f,onButtonClick:v,onItemClick:b,onClose:g}=e,p=(0,l.useRef)(null),w=(0,c.useMergedRefs)([d,p]),x=function(e,t){const a=(0,l.useRef)(M);return(0,l.useEffect)((()=>{const e=getComputedStyle((0,D.ensureNotNull)(t.current));a.current={xsmall:B(e,"xsmall"),small:B(e,"small"),medium:B(e,"medium"),large:B(e,"large"),xlarge:B(e,"xlarge")}}),[t]),(0,l.useCallback)((()=>{const n=(0,D.ensureNotNull)(t.current).getBoundingClientRect(),l=a.current[e];return{x:n.left,y:n.top+n.height+l+R,indentFromWindow:{top:z,bottom:z,left:z,right:z}}}),[t,e])}(t,p);return l.createElement(S.PopupMenuDisclosureView,{buttonRef:p,listboxTabIndex:-1,isOpened:n,onClose:g,listboxAria:{"aria-hidden":!0},popupPosition:x,button:l.createElement(h,{"aria-hidden":!0,disabled:a,active:n,onClick:v,ref:w,tabIndex:-1,enableActiveStateStyles:o,hideFocusOutline:i,fake:r},u,l.createElement(I,{size:t,isDropped:n})),popupChildren:s.map((e=>l.createElement(C.PopupMenuItem,{key:e.id,className:m?O["link-item"]:void 0,onClick:b,onClickArg:e,isActive:f(e),label:e.label,isDisabled:e.disabled,link:"href"in e?e.href:void 0,rel:"rel"in e?e.rel:void 0,target:"target"in e?e.target:void 0,renderComponent:"renderComponent"in e?e.renderComponent:void 0,dontClosePopup:!0})))})}function B(e,t){return parseInt(e.getPropertyValue(`--ui-lib-underline-tabs-tab-margin-bottom-${t}`),10)}const M={xsmall:0,small:0,medium:0,large:0,xlarge:0};var Y=a(75774),F=a(42707),X=a(86240),L=a(49682);function V(e){const{size:t,overflowBehaviour:a,className:n}=e
;return i()(L["scroll-wrap"],L[`size-${t}`],"scroll"===a&&L["enable-scroll"],n)}function _(){const[e,t]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{t(Y.mobiletouch)}),[]),e}var W=a(90484),G=a(24640),H=a(15427),j=a.n(H);const U=100;function q(e){const{disabled:t,translateX:a,transitionDuration:n}=e,i=e.scale/100;return l.createElement("div",{className:o(j().underline,t&&j().disabled),style:{transform:`translateX(${a}px) scaleX(${i})`,transitionDuration:`${n}ms`}},l.createElement("div",{className:j().corner,style:{transform:`scaleX(${1/i})`}}),l.createElement("div",{className:j().center,style:{transform:`scaleX(${1-30/e.scale})`}}),l.createElement("div",{className:j().corner,style:{transform:`scaleX(${1/i})`}}))}function $(e){const{id:t,items:n,activationType:o,disabled:b,moreButtonContent:g=r.t(null,void 0,a(37117)),size:p="small",onActivate:h,isActive:D,className:C,style:S,overflowBehaviour:x,enableActiveStateStyles:k,tablistLabelId:y,tablistLabel:E,"data-name":N="underline-tabs-buttons",stretchTabs:T,equalTabSize:A,defaultKeyboardFocus:I,stopPropagationIfKeyboardActionHandled:O,keyboardNavigationLoop:R,focusableItemAttributes:z,dataQaId:B="underline-tabs-buttons"}=e,M=_(),Y=function(e){const t=(0,F.useSafeMatchMedia)(X["media-mf-phone-landscape"],!0),a=_();return e??(a||!t?"scroll":"collapse")}(x),H=(0,l.useRef)(!1),j=(0,l.useCallback)((e=>e.id),[]),$="none"===Y&&T,J="none"===Y&&A,K=k??!M,{visibleItems:Z,hiddenItems:Q,containerRefCallback:ee,innerContainerRefCallback:te,moreButtonRef:ae,setItemRef:ne}=(0,s.useCollapsible)(n,j,D),le="collapse"===Y?Z:n,oe="collapse"===Y?Q:[],ie=(0,l.useCallback)((e=>oe.includes(e)),[oe]),re=(0,l.useRef)(new Map),{isOpened:se,open:ce,close:ue,onButtonClick:de}=(0,d.useDisclosure)({id:t,disabled:b}),me=function(e="xsmall"){switch(e){case"xsmall":case"small":return 12;case"medium":return 16;case"large":case"xlarge":return 20}}(p),{tabsBindings:fe,tablistBinding:ve,scrollWrapBinding:be,onActivate:ge,onHighlight:pe,isHighlighted:he}=(0,m.useTabs)({id:t,items:[...le,...oe],activationType:o,disabled:b,tablistLabelId:y,tablistLabel:E,onActivate:h,isActive:D,isCollapsed:ie,isRtl:G.isRtl,itemsRefs:re,isDisclosureOpened:se,defaultKeyboardFocus:I,stopPropagationIfKeyboardActionHandled:O,keyboardNavigationLoop:R,focusableItemAttributes:z,scrollIntoViewOptions:{additionalScroll:me}}),we=n.find(D),De=oe.find(he),Ce=(0,l.useCallback)((()=>{we&&pe(we)}),[pe,we]),Se=(0,l.useCallback)((e=>fe.find((t=>t.id===e.id))??{}),[fe]),xe=(0,l.useCallback)((()=>{ue(),Ce(),H.current=!0}),[ue,Ce]),ke=(0,l.useCallback)((()=>{De&&(ge(De),pe(De,200))}),[ge,pe,De]);be.ref=(0,c.useMergedRefs)([be.ref,ee]),ve.ref=(0,c.useMergedRefs)([ve.ref,te]),ve.onKeyDown=(0,u.createSafeMulticastEventHandler)((0,f.useKeyboardEventHandler)([(0,f.useKeyboardClose)(se,xe),(0,f.useKeyboardActionHandler)([13,32],ke,(0,l.useCallback)((()=>Boolean(De)),[De]))]),ve.onKeyDown);const ye=(0,l.useCallback)((e=>{H.current=!0,de(e)}),[H,de]),Ee=(0,l.useCallback)((e=>{e&&ge(e)}),[ge]);(0,l.useEffect)((()=>{H.current?H.current=!1:(De&&!se&&ce(),
!De&&se&&ue())}),[De,se,ce,ue]);const Ne=function(e,t,a=[]){const[n,o]=(0,l.useState)(),i=(0,l.useRef)(),r=(0,l.useRef)(),s=e=>{const t=e.parentElement??void 0;if(void 0===t)return;const a=void 0===r.current||r.current===e?0:U;r.current=e;const{left:n,right:l,width:i}=e.getBoundingClientRect(),{left:s,right:c}=t.getBoundingClientRect(),u=(0,G.isRtl)()?l-c:n-s;o({translateX:u,scale:i,transitionDuration:a})};return(0,l.useEffect)((()=>{const e=(0,W.default)((e=>{const t=e[0].target;void 0!==t&&s(t)}),50);i.current=new ResizeObserver(e)}),[]),(0,l.useEffect)((()=>{if(void 0===t)return;const a=e.get(t);return void 0!==a?(s(a),i.current?.observe(a),()=>i.current?.disconnect()):void 0}),a),n}(re.current,we??De,[we??De,le,p,$,Y]);return l.createElement(v.Provider,{value:{size:p,overflowBehaviour:Y}},l.createElement("div",{...be,className:V({size:p,overflowBehaviour:Y,className:C}),style:S,"data-name":N,"data-qa-id":B},l.createElement("div",{...ve,className:i()(L["underline-tabs"],{[L["make-grid-column"]]:$||J,[L["stretch-tabs"]]:$,[L["equal-tab-size"]]:J})},le.map((e=>l.createElement(w,{...Se(e),key:e.id,item:e,onClick:ge,enableActiveStateStyles:K,hideFocusOutline:M,ref:ne(j(e)),...e.dataId&&{"data-id":e.dataId},"data-qa-id":e.dataId,equalTabSize:J}))),oe.map((e=>l.createElement(w,{...Se(e),ref:ne(j(e)),key:e.id,item:e,fake:!0}))),"collapse"===Y&&l.createElement(P,{size:p,disabled:b,isOpened:se,items:oe,buttonContent:g,buttonRef:ae,isHighlighted:he,onButtonClick:ye,onItemClick:Ee,onClose:ue,enableActiveStateStyles:K,hideFocusOutline:M,fake:0===oe.length}),Ne?l.createElement(q,{...Ne,disabled:b}):l.createElement("div",null))))}var J=a(38952);function K(e){return l.createElement("a",{...(0,J.renameRef)(e)})}(0,l.forwardRef)(((e,t)=>{const{size:a,overflowBehaviour:n}=(0,l.useContext)(v),o=(0,l.useContext)(b.CustomBehaviourContext),{item:i,highlighted:r,handleItemRef:s,onClick:c,active:u,fake:d,className:m,enableActiveStateStyles:f=o.enableActiveStateStyles,hideFocusOutline:g=!1,disabled:h,"aria-disabled":w,...D}=e,C=(0,l.useCallback)((e=>{w?e.preventDefault():c&&c(i)}),[c,w,i]),S=(0,l.useCallback)((e=>{s&&s(i,e),t&&"object"==typeof t?t.current=e:"function"==typeof t&&t(e)}),[i,s,t]),x=i.renderComponent??K;return l.createElement(x,{...D,id:i.id,"aria-disabled":w,onClick:C,reference:S,href:i.href,rel:i.rel,target:i.target,className:p({size:a,active:u,fake:d,enableActiveStateStyles:f,anchor:!0,hideFocusOutline:g,className:m,overflowBehaviour:n})},i.label)})).displayName="UnderlineAnchorTab"},64908:e=>{e.exports={calendar:"calendar-PM3TZruR"}},29411:e=>{e.exports={row:"row-Sj9z7O1v",mobileRow:"mobileRow-Sj9z7O1v"}},55903:e=>{e.exports={dialogWrapper:"dialogWrapper-P_IVoUsZ",dialogWrapperSmall:"dialogWrapperSmall-P_IVoUsZ",tabs:"tabs-P_IVoUsZ",content:"content-P_IVoUsZ",contentMobile:"contentMobile-P_IVoUsZ",bodyWrapper:"bodyWrapper-P_IVoUsZ"}},62256:(e,t,a)=>{"use strict";a.r(t),a.d(t,{showGoToDateDialog:()=>le});var n=a(50959),l=a(50151),o=a(37236),i=a(29803),r=a(7145),s=a(23935),c=a(51826);const u=n.createContext(null)
;function d(e){const{initialGoToDate:t,children:a}=e,[l,o]=(0,n.useState)(t),i=l.valueOf()<=(0,r.resetToDayEnd)(new Date).valueOf(),s=(0,n.useMemo)((()=>({date:l,setDate:o,isValid:i})),[l,i]);return n.createElement(u.Provider,{value:s},a)}const m=n.createContext(null);function f(e){const{initialRanges:t,children:a}=e,[l,o]=(0,n.useState)(t.from),[i,r]=(0,n.useState)(t.to),s=l.valueOf()<=i.valueOf(),c=(0,n.useMemo)((()=>({dateFrom:l,dateTo:i,setDateFrom:o,setDateTo:r,isValid:s})),[l,i,s]);return n.createElement(m.Provider,{value:c},a)}var v=a(11542),b=a(97754),g=a.n(b),p=a(76422),h=a(1765),w=a(52092),D=a(73986),C=a(50182),S=a(15499),x=a(29411);function k(e){const{children:t}=e;return n.createElement("div",{className:g()(x.row,W&&x.mobileRow)},t)}var y=a(85528),E=a(76056);const N=n.createContext({isActive:!1,isFocused:!1});function T(e){const{value:t,reference:a,isActive:l,onPick:o,onFocus:i,isDisabled:r,minValue:s,maxValue:c,dataQaId:u}=e,[d,m]=(0,n.useState)(!1);return n.createElement(N.Provider,{value:{isActive:l,isFocused:d}},n.createElement("div",{"data-qa-id":`${u}-wrapper`,onFocus:function(){m(!0),i&&i()},onBlur:function(){m(!1)}},n.createElement(y.DatePicker,{initial:t,minDate:s,maxDate:c,inputReference:a,InputComponent:A,withCalendar:!1,onPick:function(e){if(!e)return;o(new Date(e))},revertInvalidData:!0,name:e.name,disabled:r,dataQaId:u})))}function A(e){const{isActive:t,isFocused:a}=(0,n.useContext)(N);return n.createElement(E.DateInput,{...e,highlight:t||a})}var I=a(36565);function O(e){const{value:t,isDisabled:a,onPick:l,className:o,dataQaId:i}=e;return n.createElement(I.TimeInput,{value:(r=t,(0,s.twoDigitsFormat)(r.getHours())+":"+(0,s.twoDigitsFormat)(r.getMinutes())),onChange:l,disabled:a,className:o,dataQaId:i});var r}var R=a(44313),z=a(64908);function P(e){const{className:t,...a}=e;return n.createElement(R.Calendar,{...a,className:g()(z.calendar,t),popupStyle:!1})}function B(e,t){const a=new Date(t);return a.setFullYear(e.getFullYear()),a.setMonth(e.getMonth(),1),a.setDate(e.getDate()),a}function M(e,t){const a=new Date(t);return a.setHours(e.getHours()),a.setMinutes(e.getMinutes()),a}function Y(e){const{dateOnly:t,onCalendarMonthSwitch:a,hideTimePick:o,minDate:i,datePickDelegate:r}=e,{date:s,setDate:c}=(0,l.ensureNotNull)((0,n.useContext)(u)),d=(0,n.useRef)(null),m=(0,n.useRef)(null);return(0,n.useEffect)((()=>{W||null===d.current||d.current.focus()}),[]),(0,n.useEffect)((()=>(r?.subscribe(null,f),()=>{r?.unsubscribe(null,f)})),[r]),n.createElement("div",null,n.createElement(k,null,n.createElement(T,{reference:function(e){d.current=e},value:new Date(s),onPick:function(e){f(B(e,s))},isActive:!W,minValue:i}),!o&&n.createElement(O,{value:new Date(s),isDisabled:t,onPick:function(e){const[t,a]=e.split(":"),n=new Date;n.setHours(Number(t)),n.setMinutes(Number(a));const l=M(n,s);c(l),W||l.valueOf()===s.valueOf()||m.current?.focus()}})),!W&&n.createElement(P,{calendarRef:m,selectedDate:new Date(s),onSelect:function(e){const t=B(e,s);c(t)},onMonthSwitch:a,maxDate:new Date,minDate:i}));function f(e){c(e),
m.current?.setViewDate(e),m.current?.setViewType(S.CalendarViewType.Month)}}function F(e){const{dateOnly:t,onCalendarMonthSwitch:a,onDateInputFocus:o}=e,{dateFrom:i,dateTo:r,setDateFrom:s,setDateTo:c}=(0,l.ensureNotNull)((0,n.useContext)(m)),[u,d]=(0,n.useState)("from"),f=(0,n.useRef)(null),v=(0,n.useRef)(null),b=(0,n.useRef)(null),g=(0,n.useMemo)((()=>"from"===u?new Date(i):new Date(r)),[u,r,i]);return(0,n.useEffect)((()=>{W||null===f.current||f.current.focus()}),[]),n.createElement("div",null,n.createElement(k,null,n.createElement(T,{value:i,reference:function(e){f.current=e},isActive:!W&&"from"===u,onPick:function(e){const t=B(e,i);s(t),p(t)},onFocus:function(){d("from"),p(i),o()},name:"start-date-range"}),n.createElement(O,{value:i,isDisabled:t,onPick:function(e){h(e,i,(e=>{s(e),W||i.valueOf()===e.valueOf()||v.current?.focus({preventScroll:!0})}))}})),n.createElement(k,null,n.createElement(T,{value:r,reference:function(e){v.current=e},isActive:!W&&"to"===u,onPick:function(e){const t=B(e,r);c(t),p(t)},onFocus:function(){d("to"),p(r),o()},name:"end-date-range"}),n.createElement(O,{value:r,isDisabled:t,onPick:function(e){h(e,r,(e=>{c(e),W||r.valueOf()===e.valueOf()||b.current?.focus()}))}})),!W&&n.createElement(P,{calendarRef:b,selectedDate:new Date(g),onSelect:function(e){const t=B(e,"from"===u?i:r);({from:()=>{s(t),v.current?.focus({preventScroll:!0})},to:()=>{c(t)}})[u]()},onMonthSwitch:a,highlightedFrom:new Date(i),highlightedTo:new Date(r),maxDate:"from"===u?new Date(r):void 0,minDate:"to"===u?new Date(i):void 0}));function p(e){b.current?.setViewDate(e),b.current?.setViewType(S.CalendarViewType.Month)}function h(e,t,a){const[n,l]=e.split(":"),o=new Date;o.setHours(Number(n)),o.setMinutes(Number(l));a(M(o,t))}}var X=a(67829),L=a(90692),V=a(32563),_=a(55903);const W=V.mobiletouch;var G;!function(e){e.Date="Date",e.CustomRange="CustomRange"}(G||(G={}));const H=()=>!0,j=[{label:v.t(null,void 0,a(22677)),id:"Date",dataId:"tab-item-date"},{label:v.t(null,void 0,a(81861)),id:"CustomRange",dataId:"tab-item-customrange"}];function U(e){const{dateOnly:t,onClose:o,onGoToDate:i,onGoToRange:r}=e,s=(0,n.useRef)(null),[c,d]=(0,n.useState)(h.default.getValue("GoToDialog.activeTab","Date")),[f,b]=(0,n.useState)(0),{date:S,isValid:x}=(0,l.ensureNotNull)((0,n.useContext)(u)),{dateFrom:k,dateTo:y,isValid:E}=(0,l.ensureNotNull)((0,n.useContext)(m));return(0,n.useEffect)((()=>(p.subscribe(w.CLOSE_POPUPS_AND_DIALOGS_COMMAND,I,null),()=>{p.unsubscribe(w.CLOSE_POPUPS_AND_DIALOGS_COMMAND,I,null)})),[o]),(0,n.useEffect)((()=>{null!==s.current&&s.current()}),[f,c,S,k,y]),n.createElement(L.MatchMedia,{rule:D.DialogBreakpoints.TabletSmall},(e=>n.createElement(C.AdaptiveConfirmDialog,{className:g()(_.dialogWrapper,e&&_.dialogWrapperSmall),title:v.t(null,void 0,a(42432)),dataName:"go-to-date-dialog",render:N,defaultActionOnClose:"cancel",onClose:I,onClickOutside:I,onCancel:I,onSubmit:A,submitButtonDisabled:T(),submitButtonText:v.t(null,void 0,a(42432)),forceCloseOnEsc:H,shouldForceFocus:!1,fullScreen:e,isOpened:!0})))
;function N({requestResize:e}){return s.current=e,n.createElement(n.Fragment,null,n.createElement("div",{className:_.tabs},n.createElement(X.UnderlineButtonTabs,{id:"go-to-date-tabs",isActive:e=>e.id===c,items:j,onActivate:O,overflowBehaviour:"scroll"})),n.createElement("div",{className:g()(_.content,W&&_.contentMobile)},n.createElement("div",{className:_.bodyWrapper},n.createElement(q,{onCalendarMonthSwitch:R,onDateInputFocus:R,activeTab:c,dateOnly:t}))))}function T(){return{CustomRange:!E,Date:!x}[c]}function A(){switch(c){case"Date":i(S);break;case"CustomRange":r(k,y)}}function I(){o()}function O(e){d(e.id),h.default.setValue("GoToDialog.activeTab",e.id)}function R(){b(f+1)}}function q(e){const{activeTab:t,dateOnly:a,onCalendarMonthSwitch:l,onDateInputFocus:o}=e;switch(t){case"Date":return n.createElement(Y,{dateOnly:a,onCalendarMonthSwitch:l});case"CustomRange":return n.createElement(F,{dateOnly:a,onCalendarMonthSwitch:l,onDateInputFocus:o})}}function $(e){const{dateOnly:t,onClose:a,onGoToDate:l,onGoToRange:o,initialGoToDate:i,initialRanges:r}=e;return n.createElement(d,{initialGoToDate:i},n.createElement(f,{initialRanges:r},n.createElement(U,{dateOnly:t,onClose:a,onGoToDate:l,onGoToRange:o})))}var J,K=a(87296),Z=a(5471);!function(e){e.GoToDateTabLastPickedDate="goToDateTabLastPickedDate",e.DetailsKeyStatsExpanded="detailsKeyStatsExpanded",e.DetailsIncomeStatementPeriodId="detailsIncomeStatementPeriodId"}(J||(J={}));const Q=new class{constructor(){this._hasError=!1}getItemOrDefault(e,t){return!sessionStorage||this._hasError?t:sessionStorage.getItem(e)}setItem(e,t="true"){try{sessionStorage.setItem(e,t),this._hasError=!1}catch(e){this._hasError=!0}}};var ee=a(27365),te=a(87896);const ae="goTo",ne=new c.DialogsOpenerManager;function le(e){if(ne.isOpened(ae))return;if(!e.hasModel())return;const t=e.model(),a=document.createElement("div"),l=n.createElement($,{onClose:c,dateOnly:t.model().mainSeries().isDWM(),initialGoToDate:oe(e),initialRanges:ie(e),onGoToDate:e=>{!function(e,t){Q.setItem("goToDateTabLastPickedDate",String(t.valueOf()));if(void 0===e.model().timeScale().tickMarks().minIndex)return;const a=(0,s.addLocalTime)(t).valueOf();e.model().gotoTime(a).then((t=>{const a=e.model().mainSeries();void 0===t?a.clearGotoDateResult():a.setGotoDateResult(t)}))}(t,e),c()},onGoToRange:(t,a)=>{!function(e,t,a){const n=(0,ee.getTimezoneName)(e.model());if(!n)return;const l=i.linking.interval.value(),r=l&&(0,K.normalizeIntervalString)(l),c=(0,o.get_timezone)(n),u=e=>(0,o.cal_to_utc)(c,new Date(e)),d=(0,s.addLocalTime)(t).valueOf(),m=(0,s.addLocalTime)(a).valueOf(),f={val:{type:"time-range",from:Math.round(u(d)/1e3),to:Math.round(u(m)/1e3)},res:r};e.chartWidgetCollection().setTimeFrame(f)}(e,t,a),c()}}),r=(0,te.createReactRoot)(l,a);function c(){r.unmount(),ne.setAsClosed(ae)}ne.setAsOpened(ae)}function oe(e){const t=Q.getItemOrDefault("goToDateTabLastPickedDate",null);if(null===t)return(0,r.resetToDayStart)(new Date);const a=new Date(Number(t));return e.model().model().mainSeries().isDWM()?(0,r.resetToDayStart)(a):a}
function ie(e){const t=function(e){const t=e.model().timeScale(),a=t.visibleBarsStrictRange();if(null===a)return;const n=e.model().mainSeries(),o=n.nearestIndex(a.firstBar(),Z.PlotRowSearchMode.NearestRight),i=n.nearestIndex(a.lastBar(),Z.PlotRowSearchMode.NearestLeft);if(void 0===o||void 0===i)return;return{from:(0,l.ensureNotNull)(t.indexToUserTime(o)),to:(0,l.ensureNotNull)(t.indexToUserTime(i))}}(e);return t?{from:(0,s.subtractLocalTime)(t.from),to:(0,s.subtractLocalTime)(t.to)}:{from:(0,s.subtractLocalTime)(new Date),to:(0,s.subtractLocalTime)(new Date)}}},47531:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="m4.67 7.38.66-.76L9 9.84l3.67-3.22.66.76L9 11.16 4.67 7.38Z"/></svg>'},63509:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M3.57 7.85 9 12.62l5.43-4.77-1.32-1.5L9 9.95l-4.11-3.6-1.32 1.5Z"/></svg>'},68874:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="m14 18.41-6.7-6.7 1.4-1.42 5.3 5.3 5.3-5.3 1.4 1.41-6.7 6.71Z"/></svg>'},25931:(e,t,a)=>{"use strict";a.d(t,{nanoid:()=>n});let n=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")}}]);