(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5715],{36279:(e,t,n)=>{"use strict";var s;n.d(t,{LogoSize:()=>s,getLogoUrlResolver:()=>a}),function(e){e[e.Medium=0]="Medium",e[e.Large=1]="Large"}(s||(s={}));class r{getSymbolLogoUrl(e){return e}getCountryFlagUrl(){return""}getCryptoLogoUrl(e){return e}getProviderLogoUrl(e){return e}getSourceLogoUrl(e){return e}getBlockchainContractLogoUrl(e){return e}}let i;function a(){return i||(i=new r),i}},77975:(e,t,n)=>{"use strict";n.d(t,{useWatchedValueReadonly:()=>r});var s=n(50959);const r=(e,t=!1)=>{const n="watchedValue"in e?e.watchedValue:void 0,r="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[i,a]=(0,s.useState)(n?n.value():r);return(t?s.useLayoutEffect:s.useEffect)((()=>{if(n){a(n.value());const e=e=>a(e);return n.subscribe(e),()=>n.unsubscribe(e)}return()=>{}}),[n]),i}},4237:(e,t,n)=>{"use strict";var s=n(32227);t.createRoot=s.createRoot,s.hydrateRoot},75793:e=>{e.exports={wrapper:"wrapper-hPiAkrn3",timezone:"timezone-hPiAkrn3",largePadding:"largePadding-hPiAkrn3",sessionDayWrapper:"sessionDayWrapper-hPiAkrn3",nowWrapper:"nowWrapper-hPiAkrn3",now:"now-hPiAkrn3",sessionDay:"sessionDay-hPiAkrn3",weekDay:"weekDay-hPiAkrn3",sessionDaySegments:"sessionDaySegments-hPiAkrn3",timeMarkWrapper:"timeMarkWrapper-hPiAkrn3",timeMarkSegment:"timeMarkSegment-hPiAkrn3",timeMark:"timeMark-hPiAkrn3",timeMarkSegmentAlignByEnds:"timeMarkSegmentAlignByEnds-hPiAkrn3",segment:"segment-hPiAkrn3",small:"small-hPiAkrn3",start:"start-hPiAkrn3",end:"end-hPiAkrn3",active:"active-hPiAkrn3",green:"green-hPiAkrn3",orange:"orange-hPiAkrn3",blue:"blue-hPiAkrn3",gray:"gray-hPiAkrn3",tooltip:"tooltip-hPiAkrn3",time:"time-hPiAkrn3"}},75725:(e,t,n)=>{"use strict";n.d(t,{FullSessionScheduleRenderer:()=>g});var s=n(50959),r=n(97754),i=n(50151),a=n(11542),o=n(77975),l=n(92184),u=n(75793);const d=new WeakMap;function c(e){return d.has(e)||d.set(e,(0,l.randomHash)()),(0,i.ensureDefined)(d.get(e))}const y=new Map([[0,u.green],[1,u.orange],[2,u.blue],[3,u.gray]]),v=new Map([[0,a.t(null,void 0,n(80086))],[1,a.t(null,void 0,n(36018))],[2,a.t(null,void 0,n(73897))],[3,a.t(null,void 0,n(62464))]]),f=a.t(null,void 0,n(63538));var m;function h(e){const{segment:t,forceStart:n,forceEnd:i}=e,a=t.end.value-t.start.value,o=a<.03,l={left:100*t.start.value+"%",width:`calc(${100*a}% + ${o?2:0}px)`},d=r(u.segment,y.get(t.type),(n||t.start.isFirstOrLastPoint)&&u.start,(i||t.end.isFirstOrLastPoint)&&u.end,o&&u.small,"common-tooltip-html","apply-common-tooltip"),c=function(e,t){return`<div class="${u.tooltip}">\n\t\t<span class="${y.get(t)}">${v.get(t)}</span>\n\t\t<span class="${u.time}">${e}</span>\n\t</div>`}(t.tooltip,t.type);return s.createElement("div",{className:d,style:l,"data-tooltip":c})}function D(e){const{sessionDay:t}=e,n=t.entries.map(((e,n)=>s.createElement(h,{key:`${c(e)}Segment`,segment:e,forceStart:0===n&&3===e.type,forceEnd:n===t.entries.length-1&&3===e.type}))),i=r(u.sessionDay,t.isActive&&u.active);return s.createElement("div",{className:i},s.createElement("div",{
className:u.weekDay},t.title),s.createElement("div",{className:u.sessionDaySegments},n))}function p(e){const{sessionDays:t,currentTimeMark:n}=e,i=[],a=parseInt(Object.keys(t).filter((e=>t[parseInt(e)].isActive))[0]),o=t[a],l=o.entries.filter((e=>e.start.value<=n&&e.end.value>=n))[0];!l.start.isFirstOrLastPoint&&l.showStartForLastEntry?i.push(o.entries[o.entries.length-1].start):i.push(l.start);const d=!l.end.isFirstOrLastPoint&&l.showEndForFirstEntry?o.entries[0].end:l.end;if(i[0].value!==d.value&&i.push(d),0===i.length)return null;i.sort(((e,t)=>e.value-t.value));const y=i.map((e=>s.createElement("div",{key:c(e),className:u.timeMark},e.title))),v=100*(2===i.length?i[1].value-i[0].value:0),f=r(v>12&&u.timeMarkSegmentAlignByEnds,u.timeMarkSegment);return s.createElement("div",{className:u.sessionDay},s.createElement("div",{className:u.weekDay}),s.createElement("div",{className:u.timeMarkWrapper},s.createElement("div",{className:f,style:{left:100*i[0].value+"%",width:`${v}%`}},y)))}function g(e){const{className:t,timezone:n,showAllDays:i,timeZoneClassName:a}=e,l=(0,o.useWatchedValueReadonly)({watchedValue:e.sessionDays}),d=(0,o.useWatchedValueReadonly)({watchedValue:e.now}),c=Object.values(l).filter((e=>e.isActive))[0],y=r(t,u.wrapper);return s.createElement("div",{className:y},s.createElement("div",{className:u.sessionDayWrapper},i?s.createElement(s.Fragment,null,Object.values(l).map(((e,t)=>s.createElement(D,{key:t,sessionDay:e})))):s.createElement(D,{sessionDay:c}),s.createElement("div",{className:u.nowWrapper},s.createElement("div",{className:u.now,style:{left:100*d+"%"}}))),s.createElement(p,{sessionDays:l,currentTimeMark:d}),s.createElement("div",{className:r(u.timezone,a,i&&u.largePadding)},`${f}: ${n}`))}!function(e){e[e.MinSegmentWidth=12]="MinSegmentWidth",e[e.SmallWidth=.03]="SmallWidth"}(m||(m={}))},60697:(e,t,n)=>{"use strict";n.d(t,{FullSessionScheduleViewModel:()=>re});var s=n(63950),r=n(37265),i=n(2740),a=n(64147),o=n(68805);function l(e){return e/i.minutesPerDay}function u(e){return Math.round(e*i.minutesPerDay)}const d=function(e){return e&&e.length?e[0]:void 0};var c=n(62900),y=n(50151),v=n(18832),f=n(84917);const m=[f.WeekDays.SUNDAY,f.WeekDays.MONDAY,f.WeekDays.TUESDAY,f.WeekDays.WEDNESDAY,f.WeekDays.THURSDAY,f.WeekDays.FRIDAY,f.WeekDays.SATURDAY];function h(e,t){return(e+t+6)%7+1}function D(e){return t=>h(t,e)}const p=D(-1),g=D(1);var k=n(11542);f.Months.JANUARY,k.t(null,void 0,n(200)),f.Months.FEBRUARY,k.t(null,void 0,n(81069)),f.Months.MARCH,k.t(null,void 0,n(93878)),f.Months.APRIL,k.t(null,void 0,n(28896)),f.Months.MAY,k.t(null,void 0,n(25734)),f.Months.JUNE,k.t(null,void 0,n(61487)),f.Months.JULY,k.t(null,void 0,n(6608)),f.Months.AUGUST,k.t(null,void 0,n(11081)),f.Months.SEPTEMBER,k.t(null,void 0,n(32179)),f.Months.OCTOBER,k.t(null,void 0,n(37997)),f.Months.NOVEMBER,k.t(null,void 0,n(4607)),f.Months.DECEMBER,k.t(null,void 0,n(90082)),f.Months.JANUARY,k.t(null,void 0,n(62310)),f.Months.FEBRUARY,k.t(null,void 0,n(2507)),f.Months.MARCH,k.t(null,void 0,n(92767)),f.Months.APRIL,
k.t(null,void 0,n(27072)),f.Months.MAY,k.t(null,{context:"short"},n(13132)),f.Months.JUNE,k.t(null,void 0,n(429)),f.Months.JULY,k.t(null,void 0,n(53786)),f.Months.AUGUST,k.t(null,void 0,n(46450)),f.Months.SEPTEMBER,k.t(null,void 0,n(6816)),f.Months.OCTOBER,k.t(null,void 0,n(12179)),f.Months.NOVEMBER,k.t(null,void 0,n(26899)),f.Months.DECEMBER,k.t(null,void 0,n(32084)),f.WeekDays.SUNDAY,k.t(null,void 0,n(61480)),f.WeekDays.MONDAY,k.t(null,void 0,n(19573)),f.WeekDays.TUESDAY,k.t(null,void 0,n(82160)),f.WeekDays.WEDNESDAY,k.t(null,void 0,n(94226)),f.WeekDays.THURSDAY,k.t(null,void 0,n(79137)),f.WeekDays.FRIDAY,k.t(null,void 0,n(3570)),f.WeekDays.SATURDAY,k.t(null,void 0,n(30348));const A={[f.WeekDays.SUNDAY]:k.t(null,void 0,n(77493)),[f.WeekDays.MONDAY]:k.t(null,void 0,n(37150)),[f.WeekDays.TUESDAY]:k.t(null,void 0,n(11916)),[f.WeekDays.WEDNESDAY]:k.t(null,void 0,n(11532)),[f.WeekDays.THURSDAY]:k.t(null,void 0,n(71388)),[f.WeekDays.FRIDAY]:k.t(null,void 0,n(22928)),[f.WeekDays.SATURDAY]:k.t(null,void 0,n(32273))};f.WeekDays.SUNDAY,k.t(null,{context:"day_of_week"},n(75005)),f.WeekDays.MONDAY,k.t(null,{context:"day_of_week"},n(30961)),f.WeekDays.TUESDAY,k.t(null,{context:"day_of_week"},n(9135)),f.WeekDays.WEDNESDAY,k.t(null,{context:"day_of_week"},n(92578)),f.WeekDays.THURSDAY,k.t(null,{context:"day_of_week"},n(8765)),f.WeekDays.FRIDAY,k.t(null,{context:"day_of_week"},n(97349)),f.WeekDays.SATURDAY,k.t(null,{context:"day_of_week"},n(94748));var E=n(58683);function S(e){for((0,y.assert)(Number.isInteger(e),"timeMinutes expected to be integer number");e>i.minutesPerDay;)e-=i.minutesPerDay;const t=e%60,n=(e-t)/60;return(0,E.numberToStringWithLeadingZero)(n,2)+":"+(0,E.numberToStringWithLeadingZero)(t,2)}function w(e,t){return`${e} — ${t}`}function M(e,t){return`${A[e]} ${S(t)}`}function W(e,t,n,s){(0,y.assert)(t!==i.minutesPerDay,"Start time expected to be normalized (24:00 as range start is not allowed)"),(0,y.assert)(0!==s,"End time expected to be normalized (00:00 as range end is not allowed)");const r=function(e,t,n,s){const r=e*i.minutesPerDay+t;let a=n*i.minutesPerDay+s;return a<r&&(a+=7*i.minutesPerDay),a-r}(e,t,n,s);return r<i.minutesPerDay||r===i.minutesPerDay&&0===t?function(e,t){return w(S(e),S(t))}(t,s):function(e,t,n,s){return w(M(e,t),M(n,s))}(e,t,n,s)}function P(e,t,n,s){return{start:e,end:t,type:n,tooltip:s,showStartForLastEntry:!1,showEndForFirstEntry:!1}}function _(e){return{value:e,title:S(u(e)),isFirstOrLastPoint:!0}}function R(e){return 3!==e.type}function b(e,t){return{dayIndex:e,entries:t.filter(R)}}function x(e,t,n,s=t){const r=n(t),i=e[r];return r!==s&&0===i.entries.length?x(e,r,n,s):b(r,e[r].entries)}function I(e){return(t,n)=>x(t,n,e)}const N=I(p),T=I(g);function U(e,t,n,s){return(r,i,a)=>void 0===r?[s,a]:r===e?[t,n(i)]:[r,i]}const Y=U(1,0,g,0),F=U(0,1,p,1);function L(e,t,n,s,r){const[i,a]=Y(e,t,r),[o,l]=F(n,s,r);(0,y.assert)(t!==n||i<o,`Days are same (${t}) but prev entry time (${i}) >= next entry time (${o})`);const d=u(i),c=u(o);return P(_(a!==r?0:i),_(l!==r?1:o),3,W(a,d,l,c))}
function O(e,t,n,s,r){var i,a;return L(null===(i=null==e?void 0:e.end)||void 0===i?void 0:i.value,t,null===(a=null==n?void 0:n.start)||void 0===a?void 0:a.value,s,r)}function V(e){const t=[...e.entries];for(let n=1;n<e.entries.length;n++){const s=e.entries[n-1],r=e.entries[n];if(r.start.value!==s.end.value){const n=O(s,e.dayIndex,r,e.dayIndex,e.dayIndex);t.push(n)}}return t.sort(((e,t)=>e.start.value-t.start.value)),t}function B(e,t){const n=(0,c.default)(t.entries),s=t.dayIndex,r=(0,y.ensureDefined)(d(e.entries));return 0===r.start.value?[]:[O(n,s,r,e.dayIndex,e.dayIndex)]}function C(e,t){const n=d(t.entries),s=t.dayIndex,r=(0,y.ensureDefined)((0,c.default)(e.entries));return 1===r.end.value?[]:[O(r,e.dayIndex,n,s,e.dayIndex)]}function $(e,t){var n,s;const i={thisDay:b(e,t[e].entries),prevDay:N(t,e),nextDay:T(t,e)};return null!==(s=null!==(n=function({thisDay:e,prevDay:t,nextDay:n}){if(0===e.entries.length)return[O((0,c.default)(t.entries),t.dayIndex,d(n.entries),n.dayIndex,e.dayIndex)]}(i))&&void 0!==n?n:function({thisDay:e,prevDay:t,nextDay:n}){const s=e.dayIndex;if(t.dayIndex!==s||n.dayIndex!==s)return;const i=e.entries,a=(0,y.ensureDefined)(d(i)),o=(0,y.ensureDefined)((0,c.default)(i));return[0!==a.start.value?L(0,s,a.start.value,s,s):void 0,...V(e),1!==o.end.value?L(o.end.value,s,1,s,s):void 0].filter(r.isExistent)}(i))&&void 0!==s?s:function(e){return[...B(e.thisDay,e.prevDay),...V(e.thisDay),...C(e.thisDay,e.nextDay)]}(i)}function z(e,t,n,s){const[r,i]=e[t],a=l(r),o=l(i);return P(_(a),_(o),n,s)}function H(e,t,n,s){let r=e;const a=t+n;let o;if(a<=i.minutesPerDay)o=[[t,a]];else{const e=Math.min(i.minutesPerDay-t,n);o=[[t,t+e],[0,n-e]]}const u=function(e,t){const n=(0,y.ensureDefined)(d(e))[0],s=(0,y.ensureDefined)((0,c.default)(e))[1],r=e.map((e=>e[1]-e[0])).reduce(((e,t)=>e+t));return W(t,n,s===i.minutesPerDay?t:h(t,Math.floor(l(n+r))),s)}(o,r),v=[];for(let e=0;e<o.length;e++){const t=z(o,e,s,u);v.push([t,r]),r=g(r)}return v}var J=n(69748);const Z=function(e){for(var t=-1,n=null==e?0:e.length,s={};++t<n;){var r=e[t];s[r[0]]=r[1]}return s}(m.map((e=>[e,{title:A[e],isActive:!1,entries:[]}])));function j(e){return(t,n)=>{return s=(0,y.ensureDefined)(e(t)),r=(0,y.ensureDefined)(e(n)),s.start.value===r.start.value&&s.end.value===r.end.value;var s,r}}const G=j(d),q=j(c.default);function K(e,t){return H(e.sessionStartDayOfWeek(),e.start(),e.length(),t)}function Q(e,t){t.forEach((t=>function(e,t,n){const s=e[n].entries;s.push(t),s.sort(((e,t)=>e.start.value-t.start.value))}(e,t[0],t[1])))}function X(e,t,n){for(const s of t){Q(e,K(s,n))}}function ee(e,t){return e.type===t.type&&(3===e.type||t.end.value-t.start.value+e.end.value-e.start.value<=1)}function te(e,t){var n;const s=(null!==(n=null==t?void 0:t.getUTCDay())&&void 0!==n?n:(new Date).getDay())%7+1;const r=function(e){if(null===e)return new Map;if(void 0===e.subsessions)return new Map([[0,new J.SessionSpec(e.timezone,e.session,e.session_holidays,e.corrections)]]);const t="regular",n="premarket",s="postmarket",r=[t,n,s],i=new Map;for(const a of r){let r=null
;switch(a){case t:r=0;break;case n:r=1;break;case s:r=2}if(null!==r){const t=e.subsessions.find((e=>e.id===a));void 0!==t&&i.set(r,new J.SessionSpec(e.timezone,t["session-display"]||t.session,e.session_holidays,t["session-correction"]))}}return i}(e),i=(0,v.deepCopy)(Z);i[s].isActive=!0;for(const e of Array.from(r.keys())){X(i,(0,y.ensureDefined)(r.get(e)).getEntriesForWeekByCalendar((0,y.ensureNotNull)(t)),e)}return function(e){const t=new Map;for(const n of m)t.set(n,$(n,e));for(const n of m)e[n].entries=(0,y.ensureDefined)(t.get(n))}(i),function(e){for(const t of m){const n=e[t].entries,s=(0,y.ensureDefined)(d(n));ee(s,(0,y.ensureDefined)((0,c.default)(e[p(t)].entries)))&&(s.start.isFirstOrLastPoint=!1);const r=(0,y.ensureDefined)((0,c.default)(n));ee(r,(0,y.ensureDefined)(d(e[g(t)].entries)))&&(r.end.isFirstOrLastPoint=!1)}}(i),function(e){for(const t of m){const n=e[t].entries;if(1===n.length)continue;const s=p(t),r=g(t),i=(0,y.ensureDefined)((0,c.default)(n)),a=(0,y.ensureDefined)(d(n));a.start.isFirstOrLastPoint||(a.showStartForLastEntry=q(n,e[s].entries)),i.end.isFirstOrLastPoint||(i.showEndForFirstEntry=G(n,e[r].entries))}}(i),{newSessionsDays:i,newTodaySession:i[s]}}var ne;function se(e){return i.get_cal_from_unix_timestamp_ms(i.get_timezone(e.timezone),window.ChartApiInstance.serverTime()-1e3*(0,o.getSymbolDelaySeconds)(e))}!function(e){e[e.Regular=0]="Regular",e[e.Pre=1]="Pre",e[e.Post=2]="Post",e[e.Close=3]="Close"}(ne||(ne={}));class re{constructor(e){this.sessionsDays=new a.WatchedValue((0,r.clone)(Z)),this.todaySession=new a.WatchedValue((0,r.clone)({entries:[]})),this._currentTime=new a.WatchedValue(-1),this._symbolInfo=e.symbolInfo().spawn(),this._symbolInfo.subscribe(this._updateEntriesBySubSessions.bind(this),{callWithLast:!0}),this._timeIntervalId=setInterval(this._updateTodayWithOffsets.bind(this),6e4)}destroy(){this._symbolInfo.destroy(),clearInterval(this._timeIntervalId)}currentTimeValue(){return this._currentTime.readonly()}timezone(){const e=this._symbolInfo.value();return null===e?"":(0,s.timezoneTitle)(e.timezone)}_updateEntriesBySubSessions(e){this._updateTodayWithOffsets();const{newSessionsDays:t,newTodaySession:n}=te(e,null===e?null:se(e));this.sessionsDays.setValue(t),this.todaySession.setValue(n)}_updateTodayWithOffsets(){const e=this._symbolInfo.value();if(null===e)return void this._currentTime.setValue(-1);const t=this._currentTime.value(),n=l(i.get_minutes_from_midnight(se(e)));this._currentTime.setValue(n),n<t&&this._updateEntriesBySubSessions(e)}}},92315:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M9 14A5 5 0 1 0 9 4a5 5 0 0 0 0 10Zm3-4H6V8h6v2Z"/></svg>'}}]);