(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1859],{45228:e=>{e.exports={calendar:"calendar-wVs9kh0I"}},55400:e=>{e.exports={row:"row-9XF0QIKT",mobileRow:"mobileRow-9XF0QIKT"}},26074:e=>{e.exports={dialogWrapper:"dialogWrapper-70bfoXiO",dialogWrapperSmall:"dialogWrapperSmall-70bfoXiO",tabs:"tabs-70bfoXiO",content:"content-70bfoXiO",contentMobile:"contentMobile-70bfoXiO",bodyWrapper:"bodyWrapper-70bfoXiO"}},96746:e=>{e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 428px)"}},34020:e=>{e.exports={container:"container-tZN1pb1A",icon:"icon-tZN1pb1A",tooltip:"tooltip-tZN1pb1A",date:"date-tZN1pb1A",time:"time-tZN1pb1A"}},93632:e=>{e.exports={tooltip:"tooltip-QKiUU4Ng"}},64886:e=>{e.exports={slider:"slider-Q7h4o6oW",inner:"inner-Q7h4o6oW"}},42545:e=>{e.exports={scrollWrap:"scrollWrap-VabV7Fn8",tabsWrap:"tabsWrap-VabV7Fn8",tabs:"tabs-VabV7Fn8",withoutBorder:"withoutBorder-VabV7Fn8",tab:"tab-VabV7Fn8",withHover:"withHover-VabV7Fn8",headerBottomSeparator:"headerBottomSeparator-VabV7Fn8",fadeWithoutSlider:"fadeWithoutSlider-VabV7Fn8",withBadge:"withBadge-VabV7Fn8"}},41814:e=>{e.exports={wrap:"wrap-sfzcrPlH",wrapWithArrowsOuting:"wrapWithArrowsOuting-sfzcrPlH",wrapOverflow:"wrapOverflow-sfzcrPlH",scrollWrap:"scrollWrap-sfzcrPlH",noScrollBar:"noScrollBar-sfzcrPlH",icon:"icon-sfzcrPlH",scrollLeft:"scrollLeft-sfzcrPlH",scrollRight:"scrollRight-sfzcrPlH",isVisible:"isVisible-sfzcrPlH",iconWrap:"iconWrap-sfzcrPlH",fadeLeft:"fadeLeft-sfzcrPlH",fadeRight:"fadeRight-sfzcrPlH"}},88722:e=>{e.exports={wrap:"wrap-TyQYOCnx",input:"input-TyQYOCnx"}},24451:e=>{e.exports={icon:"icon-P882WPW5"}},23576:e=>{e.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",item:"item-4TFSfyGO",hovered:"hovered-4TFSfyGO",isDisabled:"isDisabled-4TFSfyGO",isActive:"isActive-4TFSfyGO",shortcut:"shortcut-4TFSfyGO",toolbox:"toolbox-4TFSfyGO",withIcon:"withIcon-4TFSfyGO",icon:"icon-4TFSfyGO",labelRow:"labelRow-4TFSfyGO",label:"label-4TFSfyGO",showOnHover:"showOnHover-4TFSfyGO"}},37740:e=>{e.exports={tabs:"tabs-rKFlMYkc",tab:"tab-rKFlMYkc",noBorder:"noBorder-rKFlMYkc",disabled:"disabled-rKFlMYkc",active:"active-rKFlMYkc",defaultCursor:"defaultCursor-rKFlMYkc",slider:"slider-rKFlMYkc",content:"content-rKFlMYkc"}},9837:function(e,t,n){var r,o,i;e.exports=(r=n(59496),o=n(87995),i=n(59255),function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:n.props.includeMargin;if(n.props.shouldMeasure){n._node.parentNode||n._setDOMNode();var t=n.getDimensions(n._node,e),r="function"==typeof n.props.children;n._propsToMeasure.some((function(e){if(t[e]!==n._lastDimensions[e])return n.props.onMeasure(t),r&&void 0!==n&&n.setState({dimensions:t}),n._lastDimensions=t,!0}))}},n.state={dimensions:{width:0,height:0,top:0,right:0,bottom:0,left:0}},n._node=null,n._propsToMeasure=n._getPropsToMeasure(e),n._lastDimensions={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this;this._setDOMNode(),this.measure(),this.resizeObserver=new c.default((function(){return e.measure()})),this.resizeObserver.observe(this._node)}},{key:"componentWillReceiveProps",value:function(e){var t=(e.config,e.whitelist),n=e.blacklist;this.props.whitelist===t&&this.props.blacklist===n||(this._propsToMeasure=this._getPropsToMeasure({whitelist:t,blacklist:n}))}},{key:"componentWillUnmount",value:function(){this.resizeObserver.disconnect(this._node),this._node=null}},{key:"_setDOMNode",value:function(){this._node=l.default.findDOMNode(this)}},{key:"getDimensions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._node,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.includeMargin;return(0,u.default)(e,{margin:t})}},{key:"_getPropsToMeasure",value:function(e){var t=e.whitelist,n=e.blacklist;return t.filter((function(e){return n.indexOf(e)<0}))}},{key:"render",value:function(){var e=this.props.children;return i.Children.only("function"==typeof e?e(this.state.dimensions):e)}}]),t}(i.Component);f.propTypes={whitelist:s.default.array,blacklist:s.default.array,includeMargin:s.default.bool,useClone:s.default.bool,cloneOptions:s.default.object,shouldMeasure:s.default.bool,onMeasure:s.default.func},f.defaultProps={whitelist:["width","height","top","right","bottom","left"],blacklist:[],includeMargin:!0,useClone:!1,cloneOptions:{},shouldMeasure:!0,onMeasure:function(){return null}},t.default=f,e.exports=t.default},function(e,t){e.exports=r},function(e,t,n){(function(t){ "use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};if("production"!==t.env.NODE_ENV){var o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n(5)((function(e){return"object"===(void 0===e?"undefined":r(e))&&null!==e&&e.$$typeof===o}),!0)}else e.exports=n(12)()}).call(t,n(4))},function(e,t){"use strict";function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(){h&&d&&(h=!1,d.length?p=d.concat(p):m=-1,p.length&&a())}function a(){if(!h){var e=o(i);h=!0;for(var t=p.length;t;){for(d=p,p=[];++m1)for(var n=1;n1?t-1:0),r=1;r2?n-2:0),i=2;i1&&void 0!==arguments[1]?arguments[1]:{},n=e.getBoundingClientRect(),o=void 0,i=void 0,a=void 0;return t.margin&&(a=(0,r.default)(getComputedStyle(e))),t.margin?(o=a.left+n.width+a.right,i=a.top+n.height+a.bottom):(o=n.width,i=n.height),{width:o,height:i,top:n.top,right:n.right,bottom:n.bottom,left:n.left}};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(16));e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{top:n((e=e||{}).marginTop),right:n(e.marginRight),bottom:n(e.marginBottom),left:n(e.marginLeft)}};var n=function(e){return parseInt(e)||0};e.exports=t.default}]))},50773:(e,t,n)=>{"use strict";n.r(t),n.d(t,{showGoToDateDialog:()=>le});var r=n(59496),o=n(87995),i=n(88537),a=n(82992),s=n(23935),l=n(51826),c=n(10480),u=n.n(c);const f=r.createContext(null);function d(e){const{initialGoToDate:t,children:n}=e,[o,i]=(0,r.useState)(t),a=o.valueOf()<=(0,s.resetToDayEnd)(new Date).valueOf(),l=(0,r.useMemo)(()=>({date:o,setDate:i,isValid:a}),[o,a]);return r.createElement(f.Provider,{value:l},n)}const p=r.createContext(null);function h(e){const{initialRanges:t,children:n}=e,[o,i]=(0,r.useState)(t.from),[a,s]=(0,r.useState)(t.to),l=o.valueOf()<=a.valueOf(),c=(0,r.useMemo)(()=>({dateFrom:o,dateTo:a,setDateFrom:i,setDateTo:s,isValid:l}),[o,a,l]);return r.createElement(p.Provider,{value:c},n)}var m=n(28353),v=n(97754),b=n.n(v),g=n(76422),y=n(56840),w=n.n(y),E=n(52092),S=n(24437),O=n(50182),T=n(55400);function N(e){const{children:t}=e;return r.createElement("div",{className:b()(T.row,Q&&T.mobileRow)},t)}var D=n(27404),C=n(9745),_=n(78274),M=n(86623),k=n(93632);function x(e){const{className:t,text:n}=e;return r.createElement("span",{className:b()(k.tooltip,t)},n)}var R=n(56712);const P=n(34020);function F(e){const{hasErrors:t,onClick:n,errors:o,className:i,theme:a=P,...s}=e;return r.createElement("div",{className:a.container,onClick:n},r.createElement(M.FormInput,{...s,className:a.date,hasErrors:t,errors:[],endSlot:!t&&r.createElement(_.EndSlot,{icon:!0,interactive:!1},r.createElement(C.Icon,{icon:R,className:a.icon}))}),t&&r.createElement(x,{text:(0,m.t)("Please enter the right date"),className:a.tooltip}))}const I=r.createContext({isActive:!1,isFocused:!1});function V(e){const{value:t,reference:n,isActive:o,onPick:i,onFocus:a}=e,[s,l]=(0,r.useState)(!1);return r.createElement(I.Provider,{value:{isActive:o,isFocused:s}},r.createElement("div",{onFocus:function(){l(!0),a&&a()},onBlur:function(){l(!1)}},r.createElement(D.DatePicker,{initial:t,inputReference:n,InputComponent:A,withCalendar:!1,onPick:function(e){if(!e)return;i(new Date(e))},revertInvalidData:!0,name:e.name})))}function A(e){ const{isActive:t,isFocused:n}=(0,r.useContext)(I);return r.createElement(F,{...e,highlight:t||n})}var B=n(36565);function L(e){const{value:t,isDisabled:n,onPick:o}=e;return r.createElement(B.TimeInput,{value:(i=t,(0,s.twoDigitsFormat)(i.getHours())+":"+(0,s.twoDigitsFormat)(i.getMinutes())),onChange:o,disabled:n});var i}var W=n(48154),j=n(45228);function H(e){return r.createElement(W.Calendar,{...e,className:j.calendar,popupStyle:!1})}function z(e,t){const n=new Date(t);return n.setFullYear(e.getFullYear()),n.setMonth(e.getMonth()),n.setDate(e.getDate()),n}function G(e,t){const n=new Date(t);return n.setHours(e.getHours()),n.setMinutes(e.getMinutes()),n}function U(e){const{dateOnly:t,onCalendarMonthSwitch:n}=e,{date:o,setDate:a}=(0,i.ensureNotNull)((0,r.useContext)(f)),s=(0,r.useRef)(null),l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{Q||null===l.current||l.current.focus()},[]),r.createElement("div",{ref:s,tabIndex:-1},r.createElement(N,null,r.createElement(V,{reference:function(e){l.current=e},value:new Date(o),onPick:function(e){const t=z(e,o);a(t)},isActive:!Q}),r.createElement(L,{value:new Date(o),isDisabled:t,onPick:function(e){var t;const[n,r]=e.split(":"),i=new Date;i.setHours(Number(n)),i.setMinutes(Number(r));const l=G(i,o);a(l),Q||null===(t=s.current)||void 0===t||t.focus({preventScroll:!0})}})),!Q&&r.createElement(H,{key:`${o.getFullYear()}-${o.getMonth()}-${o.getDate()}`,selectedDate:new Date(o),onSelect:function(e){var t;const n=z(e,o);a(n),null===(t=s.current)||void 0===t||t.focus({preventScroll:!0})},onMonthSwitch:n,maxDate:new Date}))}function Y(e){const{dateOnly:t,onCalendarMonthSwitch:n,onDateInputFocus:o}=e,{dateFrom:a,dateTo:s,setDateFrom:l,setDateTo:c}=(0,i.ensureNotNull)((0,r.useContext)(p)),[u,f]=(0,r.useState)("from"),d=(0,r.useRef)(null),h=(0,r.useRef)(null),m=(0,r.useRef)(null),v=(0,r.useMemo)(()=>"from"===u?new Date(a):new Date(s),[u,s,a]);return(0,r.useEffect)(()=>{Q||null===h.current||h.current.focus()},[]),r.createElement("div",{ref:d,tabIndex:-1},r.createElement(N,null,r.createElement(V,{value:a,reference:function(e){h.current=e},isActive:!Q&&"from"===u,onPick:function(e){const t=z(e,a);l(t)},onFocus:function(){f("from"),o()},name:"start-date-range"}),r.createElement(L,{value:a,isDisabled:t,onPick:function(e){b(e,a,l)}})),r.createElement(N,null,r.createElement(V,{value:s,reference:function(e){m.current=e},isActive:!Q&&"to"===u,onPick:function(e){const t=z(e,s);c(t)},onFocus:function(){f("to"),o()},name:"end-date-range"}),r.createElement(L,{value:s,isDisabled:t,onPick:function(e){b(e,s,c)}})),!Q&&r.createElement(H,{key:`${v.getFullYear()}-${v.getMonth()}-${v.getDate()}`,selectedDate:new Date(v),onSelect:function(e){const t=z(e,"from"===u?a:s);({from:()=>{var e;l(t),null===(e=m.current)||void 0===e||e.focus({preventScroll:!0})},to:()=>{var e;c(t),null===(e=d.current)||void 0===e||e.focus({preventScroll:!0})}})[u]()},onMonthSwitch:n,highlightedFrom:new Date(a),highlightedTo:new Date(s),maxDate:"from"===u?new Date(s):void 0,minDate:"to"===u?new Date(a):void 0}));function b(e,t,n){var r ;const[o,i]=e.split(":"),a=new Date;a.setHours(Number(o)),a.setMinutes(Number(i));n(G(a,t)),Q||null===(r=d.current)||void 0===r||r.focus({preventScroll:!0})}}var $=n(31807),K=n(90692),q=n(32563),X=n(26074);const Q=q.mobiletouch,Z=()=>!0,J={byId:{Date:{title:(0,m.t)("Date")},CustomRange:{title:(0,m.t)("Custom range")}},allIds:["Date","CustomRange"]};function ee(e){const{dateOnly:t,onClose:n,onGoToDate:o,onGoToRange:a}=e,s=(0,r.useRef)(null),[l,c]=(0,r.useState)(w().getValue("GoToDialog.activeTab","Date")),[u,d]=(0,r.useState)(0),{date:h,isValid:v}=(0,i.ensureNotNull)((0,r.useContext)(f)),{dateFrom:y,dateTo:T,isValid:N}=(0,i.ensureNotNull)((0,r.useContext)(p));return(0,r.useEffect)(()=>(g.subscribe(E.CLOSE_POPUPS_AND_DIALOGS_COMMAND,M,null),()=>{g.unsubscribe(E.CLOSE_POPUPS_AND_DIALOGS_COMMAND,M,null)}),[n]),(0,r.useEffect)(()=>{null!==s.current&&s.current()},[u,l,h,y,T]),r.createElement(K.MatchMedia,{rule:S.DialogBreakpoints.TabletSmall},e=>r.createElement(O.AdaptiveConfirmDialog,{className:b()(X.dialogWrapper,e&&X.dialogWrapperSmall),title:(0,m.t)("Go to"),dataName:"go-to-date-dialog",render:D,defaultActionOnClose:"cancel",onClose:M,onClickOutside:M,onCancel:M,onSubmit:_,submitButtonDisabled:C(),submitButtonText:(0,m.t)("Go to"),forceCloseOnEsc:Z,shouldForceFocus:!1,fullScreen:e,isOpened:!0}));function D({requestResize:e}){return s.current=e,r.createElement(r.Fragment,null,r.createElement("div",{className:X.tabs},r.createElement($.DialogTabs,{activeTabId:l,tabs:J,onSelect:k})),r.createElement("div",{className:b()(X.content,Q&&X.contentMobile)},r.createElement("div",{className:X.bodyWrapper},r.createElement(te,{onCalendarMonthSwitch:x,onDateInputFocus:x,activeTab:l,dateOnly:t}))))}function C(){return{CustomRange:!N,Date:!v}[l]}function _(){switch(l){case"Date":o(h);break;case"CustomRange":a(y,T)}}function M(){n()}function k(e){c(e),w().setValue("GoToDialog.activeTab",e)}function x(){d(u+1)}}function te(e){const{activeTab:t,dateOnly:n,onCalendarMonthSwitch:o,onDateInputFocus:i}=e;switch(t){case"Date":return r.createElement(U,{dateOnly:n,onCalendarMonthSwitch:o});case"CustomRange":return r.createElement(Y,{dateOnly:n,onCalendarMonthSwitch:o,onDateInputFocus:i})}}function ne(e){const{dateOnly:t,onClose:n,onGoToDate:o,onGoToRange:i,initialGoToDate:a,initialRanges:s}=e;return r.createElement(d,{initialGoToDate:a},r.createElement(h,{initialRanges:s},r.createElement(ee,{dateOnly:t,onClose:n,onGoToDate:o,onGoToRange:i})))}var re=n(9315),oe=n(71053);const ie=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 ae=n(27365);const se=new l.DialogsOpenerManager;function le(e){if(se.isOpened("goTo"))return;if(!e.hasModel())return;const t=e.model(),n=document.createElement("div"),i=r.createElement(ne,{onClose:l,dateOnly:t.model().mainSeries().isDWM(),initialGoToDate:ce(),initialRanges:ue(e),onGoToDate:e=>{!function(e,t){ ie.setItem("goToDateTabLastPickedDate",String(t.valueOf()));if(void 0===e.model().timeScale().tickMarks().minIndex)return;const n=(0,s.addLocalTime)(t).valueOf();e.model().gotoTime(n).then(t=>{const n=e.model().mainSeries();void 0===t?n.clearGotoDateResult():n.setGotoDateResult(t)})}(t,e),l()},onGoToRange:(t,n)=>{!function(e,t,n){const r=(0,ae.getTimezoneName)(e.model());if(!r)return;const o=a.linking.interval.value(),i=o&&(0,re.normalizeIntervalString)(o),l=u().get_timezone(r),f=e=>(0,c.cal_to_utc)(l,new Date(e)),d=(0,s.addLocalTime)(t).valueOf(),p=(0,s.addLocalTime)(n).valueOf(),h={val:{type:"time-range",from:f(d)/1e3,to:f(p)/1e3},res:i};e.chartWidgetCollection().setTimeFrame(h)}(e,t,n),l()}});function l(){o.unmountComponentAtNode(n),se.setAsClosed("goTo")}o.render(i,n),se.setAsOpened("goTo")}function ce(){const e=ie.getItemOrDefault("goToDateTabLastPickedDate",null);return null===e?(0,s.resetToDayStart)(new Date):new Date(Number(e))}function ue(e){const t=function(e){const t=e.model().timeScale(),n=t.visibleBarsStrictRange();if(null===n)return;const r=e.model().mainSeries(),o=r.nearestIndex(n.firstBar(),oe.PlotRowSearchMode.NearestRight),a=r.nearestIndex(n.lastBar(),oe.PlotRowSearchMode.NearestLeft);if(void 0===o||void 0===a)return;return{from:(0,i.ensureNotNull)(t.indexToUserTime(o)),to:(0,i.ensureNotNull)(t.indexToUserTime(a))}}(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)}}},24437:(e,t,n)=>{"use strict";n.d(t,{DialogBreakpoints:()=>o});var r=n(96746);const o={SmallHeight:r["small-height-breakpoint"],TabletSmall:r["tablet-small-breakpoint"],TabletNormal:r["tablet-normal-breakpoint"]}},27365:(e,t,n)=>{"use strict";n.d(t,{getTimezoneName:()=>r});n(10480);function r(e){const t=e.model().timezone();if("exchange"!==t)return t;const n=e.model().mainSeries().symbolInfo();return null==n?void 0:n.timezone}},51826:(e,t,n)=>{"use strict";n.d(t,{DialogsOpenerManager:()=>r,dialogsOpenerManager:()=>o});class r{constructor(){this._storage=new Map}setAsOpened(e,t){this._storage.set(e,t)}setAsClosed(e){this._storage.delete(e)}isOpened(e){return this._storage.has(e)}getDialogPayload(e){return this._storage.get(e)}}const o=new r},31807:(e,t,n)=>{"use strict";n.d(t,{DialogTabs:()=>h});var r=n(59496),o=n(97754),i=n(64205),a=n(40173),s=n(64886);const l=(0,a.mergeThemes)(i.DEFAULT_SLIDER_THEME,s);var c=n(39440),u=n(32563),f=n(42545);const d=f,p=(0,i.factory)((function(e){return r.createElement("div",{className:l.slider,ref:e.reference},r.createElement("div",{className:l.inner}))}));class h extends r.PureComponent{constructor(){super(...arguments),this._createClickHandler=e=>()=>{this.props.onSelect(e)}}render(){const{theme:e=d,hiddenBottomBorders:t,fadedSlider:n=!0,ScrollComponent:i=c.HorizontalScroll}=this.props,a=this._generateDialogTabs();return r.createElement("div",{className:o(e.scrollWrap)},!t&&r.createElement("div",{className:e.headerBottomSeparator}),r.createElement(i,{isVisibleFade:u.mobiletouch, isVisibleButtons:!u.mobiletouch,isVisibleScrollbar:!1,fadeClassName:o({[e.fadeWithoutSlider]:!n})},r.createElement("div",{className:e.tabsWrap},r.createElement(p,{className:o(e.tabs,t&&e.withoutBorder)},a))))}_generateDialogTabs(){const{activeTabId:e,tabs:t,theme:n=d}=this.props;return t.allIds.map(a=>{const s=e===a,l=t.byId[a].withNotificationsBadge;return r.createElement(i.SliderItem,{key:a,value:a,className:o(n.tab,!s&&n.withHover,l&&f.withBadge),isActive:s,onClick:this._createClickHandler(a)},t.byId[a].title)})}}},39440:(e,t,n)=>{"use strict";n.d(t,{HorizontalScroll:()=>y});var r=n(59496),o=n(97754),i=n(9837),a=n(88537),s=n(9745),l=n(59199),c=n(68587),u=n(62820),f=n(33086),d=n(41814);const p={isVisibleScrollbar:!0,shouldMeasure:!0,hideButtonsFrom:1};function h(e){return r.createElement("div",{className:o(d.fadeLeft,e.className,{[d.isVisible]:e.isVisible})})}function m(e){return r.createElement("div",{className:o(d.fadeRight,e.className,{[d.isVisible]:e.isVisible})})}function v(e){return r.createElement(g,{...e,className:d.scrollLeft})}function b(e){return r.createElement(g,{...e,className:d.scrollRight})}function g(e){return r.createElement("div",{className:o(e.className,{[d.isVisible]:e.isVisible}),onClick:e.onClick},r.createElement("div",{className:d.iconWrap},r.createElement(s.Icon,{icon:f,className:d.icon})))}const y=function(e=v,t=b,n=h,s=m){var f;return(f=class extends r.PureComponent{constructor(e){super(e),this._scroll=r.createRef(),this._wrapMeasureRef=r.createRef(),this._contentMeasureRef=r.createRef(),this._handleScrollLeft=()=>{if(this.props.onScrollButtonClick)return void this.props.onScrollButtonClick("left");const e=this.props.scrollStepSize||this.state.widthWrap-50;this.animateTo(Math.max(0,this.currentPosition()-e))},this._handleScrollRight=()=>{if(this.props.onScrollButtonClick)return void this.props.onScrollButtonClick("right");const e=this.props.scrollStepSize||this.state.widthWrap-50;this.animateTo(Math.min((this.state.widthContent||0)-(this.state.widthWrap||0),this.currentPosition()+e))},this._handleResizeWrap=e=>{this.props.onMeasureWrap&&this.props.onMeasureWrap(e),this.setState({widthWrap:e.width}),this._checkButtonsVisibility()},this._handleResizeContent=e=>{this.props.onMeasureContent&&this.props.onMeasureContent(e);const{shouldDecreaseWidthContent:t,buttonsWidthIfDecreasedWidthContent:n}=this.props;t&&n?this.setState({widthContent:e.width+2*n}):this.setState({widthContent:e.width})},this._handleScroll=()=>{const{onScroll:e}=this.props;e&&e(this.currentPosition(),this.isAtLeft(),this.isAtRight()),this._checkButtonsVisibility()},this._checkButtonsVisibility=()=>{const{isVisibleLeftButton:e,isVisibleRightButton:t}=this.state,n=this.isAtLeft(),r=this.isAtRight();n||e?n&&e&&this.setState({isVisibleLeftButton:!1}):this.setState({isVisibleLeftButton:!0}),r||t?r&&t&&this.setState({isVisibleRightButton:!1}):this.setState({isVisibleRightButton:!0})},this.state={widthContent:0,widthWrap:0,isVisibleRightButton:!1,isVisibleLeftButton:!1}}componentDidMount(){this._checkButtonsVisibility()} componentDidUpdate(e,t){t.widthWrap===this.state.widthWrap&&t.widthContent===this.state.widthContent||this._handleScroll(),this.props.shouldMeasure&&this._wrapMeasureRef.current&&this._contentMeasureRef.current&&(this._wrapMeasureRef.current.measure(),this._contentMeasureRef.current.measure())}currentPosition(){return this._scroll.current?(0,u.isRtl)()?(0,u.getLTRScrollLeft)(this._scroll.current):this._scroll.current.scrollLeft:0}isAtLeft(){return!this._isOverflowed()||this.currentPosition()<=(0,a.ensureDefined)(this.props.hideButtonsFrom)}isAtRight(){return!this._isOverflowed()||this.currentPosition()+this.state.widthWrap>=this.state.widthContent-(0,a.ensureDefined)(this.props.hideButtonsFrom)}animateTo(e,t=c.dur){const n=this._scroll.current;n&&((0,u.isRtl)()&&(e=(0,u.getLTRScrollLeftOffset)(n,e)),t<=0?n.scrollLeft=Math.round(e):(0,l.doAnimate)({onStep(e,t){n.scrollLeft=Math.round(t)},from:n.scrollLeft,to:Math.round(e),easing:c.easingFunc.easeInOutCubic,duration:t}))}render(){const{children:a,isVisibleScrollbar:l,isVisibleFade:c,isVisibleButtons:u,shouldMeasure:f,shouldDecreaseWidthContent:p,buttonsWidthIfDecreasedWidthContent:h,onMouseOver:m,onMouseOut:v,scrollWrapClassName:b,fadeClassName:g}=this.props,{isVisibleRightButton:y,isVisibleLeftButton:w}=this.state,E=p&&h;return r.createElement(i,{whitelist:["width"],onMeasure:this._handleResizeWrap,shouldMeasure:f,ref:this._wrapMeasureRef},r.createElement("div",{className:d.wrapOverflow,onMouseOver:m,onMouseOut:v},r.createElement("div",{className:o(d.wrap,E?d.wrapWithArrowsOuting:"")},r.createElement("div",{className:o(d.scrollWrap,b,{[d.noScrollBar]:!l}),onScroll:this._handleScroll,ref:this._scroll},r.createElement(i,{onMeasure:this._handleResizeContent,whitelist:["width"],shouldMeasure:f,ref:this._contentMeasureRef},a)),c&&r.createElement(n,{isVisible:w,className:g}),c&&r.createElement(s,{isVisible:y,className:g}),u&&r.createElement(e,{onClick:this._handleScrollLeft,isVisible:w}),u&&r.createElement(t,{onClick:this._handleScrollRight,isVisible:y}))))}_isOverflowed(){const{widthContent:e,widthWrap:t}=this.state;return e>t}}).defaultProps=p,f}(v,b,h,m)},36565:(e,t,n)=>{"use strict";n.d(t,{TimeInput:()=>I});var r=n(49483),o=n(59496),i=n(97754),a=n.n(i),s=n(88537),l=n(47201),c=n(78274),u=n(31261),f=n(9745),d=n(24451),p=n(35692);function h(e){return o.createElement(f.Icon,{className:d.icon,icon:p})}var m=n(29202),v=n(88722);var b=n(58095),g=n(64514);const y={0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}};function w(e,t,n){const r=[],o=n;let i=0,a=0;const s=e.length,l=o.length;let c=-1,u=0;const f=[],d=s-1,p=[];let h;for(;i{const[n,r]=w(e,!1,t);c(n),v(r)},[t,e]),(0,o.useLayoutEffect)(()=>{const e=(0,s.ensureNotNull)(n.current);d&&(e.setSelectionRange(u,u),p(!1)),f(S(e))},[d]),[t,m,{onChange:function(){const t=(0,s.ensureNotNull)(n.current),r=t.value,[o,i]=w(e,!1,r);c(o),m.current=o;const a=v(i),d=function(e,t,n,r,o,i){if(e!==t){const a=t.length,s=e.length;let l=0,c=0,u=0,f=0,d=0;for(d=r;d=0&&o[d];d--)l++;for(d=r-1;d>=0;d--)o[d]&&u++;for(d=n-1;d>=0;d--)i[d]&&f++;if(r>s)r=10*a;else if(n>=r&&n!==s){if(i[r]){const e=r;r-=f-u,o[r-=l]&&(r=e)}}else r>n&&(r+=u-f,r+=c)}return r}(l,o,u,S(t),i,a);f(d),p(!0)},onSelect:function(){const e=(0,s.ensureNotNull)(n.current);f(S(e))},maxLength:r}];function v(e){const t=h.current;return h.current=e,t}}function S(e){return e.selectionStart||0}function O(e){const{value:t,mask:n,onChange:r,...i}=e,a=(0,o.useRef)(null),[s,l,c]=E(n,t,a);return(0,o.useLayoutEffect)(()=>{void 0!==e.reference&&(e.reference.current=a.current)},[e.reference]),o.createElement(u.InputControl,{...i,maxLength:c.maxLength,value:s,autoComplete:"off",reference:function(e){a.current=e},onChange:function(){c.onChange(),r(l.current)},onSelect:c.onSelect})}var T=n(68335),N=n(50628),D=n(16396),C=n(55257);const _=(()=>{const e=[];for(let t=0;t<24;++t)for(let n=0;n<60;n+=15){const[r,o]=[P(t.toString()),P(n.toString())],i=`${r}:${o}`,a=x(i)?i:R(i);e.push(a)}return e})();function M(e){let t=!1;const n=(0,o.useRef)(null),r=(0,o.useRef)(null),i=(0,o.useRef)(null),l=(0,o.useRef)(null),[u,f]=(0,m.useFocus)(),[d,p]=(0,o.useState)(e.value),v=k(d),y=x(v)?v:R(v),[w,E]=(0,o.useState)(y),S=u||W().some(e=>null!==e&&e.contains(document.activeElement));(0,o.useLayoutEffect)(()=>p(e.value),[e.value]),(0,o.useLayoutEffect)(()=>E(y),[d,S]),(0,o.useEffect)(()=>j(w===y?"auto":"smooth"),[w]);const M=(0,C.lowerbound)(_,y,(e,t)=>er&&o>t){const n=(0,g.clamp)(o,0,r),a=(0,g.clamp)(o,0,t);o=Math.max(n,a),i=n>a?e.top-n:e.bottom}else o>t&&(i=e.top-o);return{x:e.left,y:i,overrideWidth:e.width,overrideHeight:o}},closeOnClickOutside:!1,isOpened:S,tabIndex:-1,reference:i},P.map(e=>o.createElement(D.PopupMenuItem,{key:e,label:e,isActive:e===y,isHovered:e===w,reference:e===w?V:void 0,onClick:A,onClickArg:e}))));function I(n){const r=k(n),o=x(r)?r:R(r);p(o),t||(t=!0,e.onChange(o))}function V(e){l.current=e}function A(e){I((0,s.ensureDefined)(e)),(0,s.ensureNotNull)(i.current).blur()}function B(e){return u&&(null!==L(document.activeElement)||null!==L(e.relatedTarget))}function L(e){return e instanceof Node&&W().find(t=>null!==t&&t.contains(e))||null}function W(){return[i.current,r.current]}function j(e="auto"){if(null!==l.current){const t=(0,s.ensureNotNull)(i.current).getBoundingClientRect(),n=l.current.getBoundingClientRect();(t.top>n.top||t.bottom{d.current&&r&&(d.current.defaultValue=r)},[]),(0,o.useLayoutEffect)(()=>{d.current&&r&&(d.current.value=r)},[r]),o.createElement("div",{className:a()(v.wrap,i)},o.createElement(u.InputControl,{...f,type:"text",endSlot:o.createElement(c.EndSlot,{icon:!0},o.createElement(h,null)),value:r,highlight:p,intent:p?"primary":void 0,onFocus:function(e){(0,s.ensureNotNull)(d.current).focus(),n&&n(e)},onChange:function(){}}),o.createElement("input",{...b,disabled:e.disabled,className:v.input,type:"time",onBlur:g,onChange:function(e){const{value:n}=e.currentTarget;t&&n&&t(n)},ref:d}))}:M},16396:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_POPUP_MENU_ITEM_THEME:()=>c,PopupMenuItem:()=>d}) ;var r=n(59496),o=n(97754),i=n(59064),a=n(51768),s=n(90186),l=n(23576);const c=l;function u(e){const{reference:t,...n}=e,o={...n,ref:t};return r.createElement(e.href?"a":"div",o)}function f(e){e.stopPropagation()}function d(e){const{id:t,role:n,"aria-selected":c,className:d,title:p,labelRowClassName:h,labelClassName:m,shortcut:v,forceShowShortcuts:b,icon:g,isActive:y,isDisabled:w,isHovered:E,appearAsDisabled:S,label:O,link:T,showToolboxOnHover:N,target:D,rel:C,toolbox:_,reference:M,onMouseOut:k,onMouseOver:x,suppressToolboxClick:R=!0,theme:P=l}=e,F=(0,s.filterDataProps)(e),I=(0,r.useRef)(null);return r.createElement(u,{...F,id:t,role:n,"aria-selected":c,className:o(d,P.item,g&&P.withIcon,{[P.isActive]:y,[P.isDisabled]:w||S,[P.hovered]:E}),title:p,href:T,target:D,rel:C,reference:function(e){I.current=e,"function"==typeof M&&M(e);"object"==typeof M&&(M.current=e)},onClick:function(t){const{dontClosePopup:n,onClick:r,onClickArg:o,trackEventObject:s}=e;if(w)return;s&&(0,a.trackEvent)(s.category,s.event,s.label);r&&r(o,t);n||(0,i.globalCloseMenu)()},onContextMenu:function(t){const{trackEventObject:n,trackRightClick:r}=e;n&&r&&(0,a.trackEvent)(n.category,n.event,n.label+"_rightClick")},onMouseUp:function(t){const{trackEventObject:n,trackMouseWheelClick:r}=e;if(1===t.button&&T&&n){let e=n.label;r&&(e+="_mouseWheelClick"),(0,a.trackEvent)(n.category,n.event,e)}},onMouseOver:x,onMouseOut:k},void 0!==g&&r.createElement("div",{className:P.icon,dangerouslySetInnerHTML:{__html:g}}),r.createElement("div",{className:o(P.labelRow,h)},r.createElement("div",{className:o(P.label,m)},O)),(void 0!==v||b)&&r.createElement("div",{className:P.shortcut},(V=v)&&V.split("+").join(" + ")),void 0!==_&&r.createElement("div",{onClick:R?f:void 0,className:o(P.toolbox,{[P.showOnHover]:N})},_));var V}},64205:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_SLIDER_THEME:()=>s,SliderItem:()=>l,factory:()=>c});var r=n(59496),o=n(97754),i=n(88537),a=n(37740);const s=a;function l(e){const t=o(e.className,a.tab,{[a.active]:e.isActive,[a.disabled]:e.isDisabled,[a.defaultCursor]:!!e.shouldUseDefaultCursor,[a.noBorder]:!!e.noBorder});return r.createElement("div",{className:t,onClick:e.onClick,ref:e.reference,"data-type":"tab-item","data-value":e.value,"data-name":"tab-item-"+e.value.toString().toLowerCase()},e.children)}function c(e){return class extends r.PureComponent{constructor(){super(...arguments),this.activeTab={current:null}}componentDidUpdate(){(0,i.ensureNotNull)(this._slider).style.transition="transform 350ms",this._componentDidUpdate()}componentDidMount(){this._componentDidUpdate()}render(){const{className:t}=this.props,n=this._generateTabs();return r.createElement("div",{className:o(t,a.tabs),"data-name":this.props["data-name"]},n,r.createElement(e,{reference:e=>{this._slider=e}}))}_generateTabs(){return this.activeTab.current=null,r.Children.map(this.props.children,e=>{const t=e,n=Boolean(t.props.isActive),o={reference:e=>{n&&(this.activeTab.current=e),t.props.reference&&t.props.reference(e)}};return r.cloneElement(t,o)})}_componentDidUpdate(){const e=(0, i.ensureNotNull)(this._slider).style;if(this.activeTab.current){const t=this.activeTab.current.offsetWidth,n=this.activeTab.current.offsetLeft;e.transform=`translateX(${n}px)`,e.width=t+"px",e.opacity="1"}else e.opacity="0"}}}c((function(e){return r.createElement("div",{className:a.slider,ref:e.reference})}))},33086:e=>{e.exports=''},56712:e=>{e.exports=''},35692:e=>{e.exports=''}}]);