(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6631],{20453:e=>{e.exports={autocomplete:"autocomplete-SY8CqC4y",caret:"caret-SY8CqC4y",icon:"icon-SY8CqC4y",suggestions:"suggestions-SY8CqC4y",suggestion:"suggestion-SY8CqC4y",noResults:"noResults-SY8CqC4y",selected:"selected-SY8CqC4y",opened:"opened-SY8CqC4y"}},6539:e=>{e.exports={button:"button-YKkCvwjV",content:"content-YKkCvwjV","icon-only":"icon-only-YKkCvwjV","color-brand":"color-brand-YKkCvwjV","variant-primary":"variant-primary-YKkCvwjV","variant-secondary":"variant-secondary-YKkCvwjV","color-gray":"color-gray-YKkCvwjV","color-green":"color-green-YKkCvwjV","color-red":"color-red-YKkCvwjV","size-xsmall":"size-xsmall-YKkCvwjV","size-small":"size-small-YKkCvwjV","size-medium":"size-medium-YKkCvwjV","size-large":"size-large-YKkCvwjV","size-xlarge":"size-xlarge-YKkCvwjV","with-start-icon":"with-start-icon-YKkCvwjV","with-end-icon":"with-end-icon-YKkCvwjV","start-icon-wrap":"start-icon-wrap-YKkCvwjV","end-icon-wrap":"end-icon-wrap-YKkCvwjV",animated:"animated-YKkCvwjV",stretch:"stretch-YKkCvwjV",grouped:"grouped-YKkCvwjV","adjust-position":"adjust-position-YKkCvwjV","first-row":"first-row-YKkCvwjV","first-col":"first-col-YKkCvwjV","no-corner-top-left":"no-corner-top-left-YKkCvwjV","no-corner-top-right":"no-corner-top-right-YKkCvwjV","no-corner-bottom-right":"no-corner-bottom-right-YKkCvwjV","no-corner-bottom-left":"no-corner-bottom-left-YKkCvwjV"}},37593:e=>{e.exports={wrapper:"wrapper-5Xd5conM",input:"input-5Xd5conM",box:"box-5Xd5conM",icon:"icon-5Xd5conM",noOutline:"noOutline-5Xd5conM","intent-danger":"intent-danger-5Xd5conM",check:"check-5Xd5conM",dot:"dot-5Xd5conM"}},96670:e=>{e.exports={checkbox:"checkbox-GxG6nBa7",reverse:"reverse-GxG6nBa7",label:"label-GxG6nBa7",baseline:"baseline-GxG6nBa7"}},21103:e=>{e.exports={container:"container-pgo9gj31","intent-default":"intent-default-pgo9gj31",focused:"focused-pgo9gj31",readonly:"readonly-pgo9gj31",disabled:"disabled-pgo9gj31","with-highlight":"with-highlight-pgo9gj31",grouped:"grouped-pgo9gj31","adjust-position":"adjust-position-pgo9gj31","first-row":"first-row-pgo9gj31","first-col":"first-col-pgo9gj31",stretch:"stretch-pgo9gj31","font-size-medium":"font-size-medium-pgo9gj31","font-size-large":"font-size-large-pgo9gj31","size-small":"size-small-pgo9gj31","size-medium":"size-medium-pgo9gj31","size-large":"size-large-pgo9gj31","intent-success":"intent-success-pgo9gj31","intent-warning":"intent-warning-pgo9gj31","intent-danger":"intent-danger-pgo9gj31","intent-primary":"intent-primary-pgo9gj31","border-none":"border-none-pgo9gj31","border-thin":"border-thin-pgo9gj31","border-thick":"border-thick-pgo9gj31","no-corner-top-left":"no-corner-top-left-pgo9gj31","no-corner-top-right":"no-corner-top-right-pgo9gj31","no-corner-bottom-right":"no-corner-bottom-right-pgo9gj31","no-corner-bottom-left":"no-corner-bottom-left-pgo9gj31",highlight:"highlight-pgo9gj31",shown:"shown-pgo9gj31"}},10306:e=>{e.exports={"inner-slot":"inner-slot-QpAAIiaV",interactive:"interactive-QpAAIiaV",icon:"icon-QpAAIiaV",
"inner-middle-slot":"inner-middle-slot-QpAAIiaV","before-slot":"before-slot-QpAAIiaV","after-slot":"after-slot-QpAAIiaV"}},66579:e=>{e.exports={input:"input-uGWFLwEy","with-start-slot":"with-start-slot-uGWFLwEy","with-end-slot":"with-end-slot-uGWFLwEy"}},62092:e=>{e.exports={loader:"loader-MuZZSHRY",static:"static-MuZZSHRY",item:"item-MuZZSHRY","tv-button-loader":"tv-button-loader-MuZZSHRY",medium:"medium-MuZZSHRY",small:"small-MuZZSHRY",black:"black-MuZZSHRY",white:"white-MuZZSHRY",gray:"gray-MuZZSHRY",primary:"primary-MuZZSHRY","loader-initial":"loader-initial-MuZZSHRY","loader-appear":"loader-appear-MuZZSHRY"}},35256:e=>{e.exports={loading:"loading-4Sqi3h6J"}},33558:e=>{e.exports={container:"container-PqABOUJm",withSuggestions:"withSuggestions-PqABOUJm",title:"title-PqABOUJm",autocomplete:"autocomplete-PqABOUJm",saveSymbol:"saveSymbol-PqABOUJm",saveInterval:"saveInterval-PqABOUJm",indicators:"indicators-PqABOUJm",hintLabel:"hintLabel-PqABOUJm",hintMark:"hintMark-PqABOUJm"}},91131:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-xe9kH1lJ",submitButton:"submitButton-xe9kH1lJ",buttons:"buttons-xe9kH1lJ"}},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)"}},67179:e=>{e.exports={dialog:"dialog-HExheUfY",wrapper:"wrapper-HExheUfY",separator:"separator-HExheUfY"}},91441:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-tuOy5zvD",unsetAlign:"unsetAlign-tuOy5zvD",title:"title-tuOy5zvD",subtitle:"subtitle-tuOy5zvD",ellipsis:"ellipsis-tuOy5zvD",close:"close-tuOy5zvD"}},91626:e=>{e.exports={separator:"separator-jtAq6E4V"}},40367:e=>{e.exports={icon:"icon-AL2odtws",dropped:"dropped-AL2odtws"}},94720:(e,t,n)=>{"use strict";n.d(t,{Button:()=>C});var s=n(59496),o=n(97754),r=n(95604),i=n(9745),a=n(6539),l=n.n(a);function c(e){const{color:t="brand",size:n="medium",variant:s="primary",stretch:i=!1,icon:a,startIcon:c,endIcon:u,iconOnly:d=!1,className:h,isGrouped:p,cellState:m,disablePositionAdjustment:g=!1}=e,f=function(e){let t="";return 0!==e&&(1&e&&(t=o(t,l()["no-corner-top-left"])),2&e&&(t=o(t,l()["no-corner-top-right"])),4&e&&(t=o(t,l()["no-corner-bottom-right"])),8&e&&(t=o(t,l()["no-corner-bottom-left"]))),t}((0,r.getGroupCellRemoveRoundBorders)(m));return o(h,l().button,l()["size-"+n],l()["color-"+t],l()["variant-"+s],i&&l().stretch,(a||c)&&l()["with-start-icon"],u&&l()["with-end-icon"],d&&l()["icon-only"],f,p&&l().grouped,p&&!g&&l()["adjust-position"],p&&m.isTop&&l()["first-row"],p&&m.isLeft&&l()["first-col"])}function u(e){const{size:t,startIcon:n,icon:o,iconOnly:r,children:a,endIcon:c}=e,u=null!=n?n:o;return s.createElement(s.Fragment,null,u&&"xsmall"!==t&&s.createElement(i.Icon,{icon:u,className:l()["start-icon-wrap"]}),a&&s.createElement("span",{className:l().content},a),c&&!r&&"xsmall"!==t&&s.createElement(i.Icon,{icon:c,className:l()["end-icon-wrap"]}))}var d=n(86332),h=n(90186)
;function p(e){const{className:t,color:n,variant:s,size:o,stretch:r,animated:i,icon:a,iconOnly:l,startIcon:c,endIcon:u,...d}=e;return{...d,...(0,h.filterDataProps)(e),...(0,h.filterAriaProps)(e)}}function m(e){const{reference:t,...n}=e,{isGrouped:o,cellState:r,disablePositionAdjustment:i}=(0,s.useContext)(d.ControlGroupContext),a=c({...n,isGrouped:o,cellState:r,disablePositionAdjustment:i});return s.createElement("button",{...p(n),className:a,ref:t},s.createElement(u,{...n}))}function g(e="default"){switch(e){case"default":return"primary";case"stroke":return"secondary"}}function f(e="primary"){switch(e){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function v(e="m"){switch(e){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}function b(e){const{intent:t,size:n,appearance:s,useFullWidth:o,icon:r,...i}=e;return{...i,color:f(t),size:v(n),variant:g(s),stretch:o,startIcon:r}}function C(e){return s.createElement(m,{...b(e)})}},84413:(e,t,n)=>{"use strict";n.d(t,{CheckboxInput:()=>c});var s=n(59496),o=n(97754),r=n(9745),i=n(49154),a=n(37593),l=n.n(a);function c(e){const t=o(l().box,l()["intent-"+e.intent],{[l().check]:!Boolean(e.indeterminate),[l().dot]:Boolean(e.indeterminate),[l().noOutline]:-1===e.tabIndex}),n=o(l().wrapper,e.className);return s.createElement("span",{className:n,title:e.title},s.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:l().input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference}),s.createElement("span",{className:t},s.createElement(r.Icon,{icon:i,className:l().icon})))}},15294:(e,t,n)=>{"use strict";n.d(t,{Checkbox:()=>c});var s=n(59496),o=n(97754),r=n(54349),i=n(84413),a=n(96670),l=n.n(a);class c extends s.PureComponent{render(){const{inputClassName:e,labelClassName:t,...n}=this.props,r=o(this.props.className,l().checkbox,{[l().reverse]:Boolean(this.props.labelPositionReverse),[l().baseline]:Boolean(this.props.labelAlignBaseline)}),a=o(l().label,t,{[l().disabled]:this.props.disabled});let c=null;return this.props.label&&(c=s.createElement("span",{className:a,title:this.props.title},this.props.label)),s.createElement("label",{className:r},s.createElement(i.CheckboxInput,{...n,className:e}),c)}}c.defaultProps={value:"on"};(0,r.makeSwitchGroupItem)(c)},86332:(e,t,n)=>{"use strict";n.d(t,{ControlGroupContext:()=>s});const s=n(59496).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,isLeft:!0}})},95604:(e,t,n)=>{"use strict";function s(e){let t=0;return e.isTop&&e.isLeft||(t+=1),e.isTop&&e.isRight||(t+=2),e.isBottom&&e.isLeft||(t+=8),e.isBottom&&e.isRight||(t+=4),t}n.d(t,{getGroupCellRemoveRoundBorders:()=>s})},67029:(e,t,n)=>{"use strict";n.d(t,{ControlSkeleton:()=>b,InputClasses:()=>g});var s=n(59496),o=n(97754),r=n(88537),i=n(66092),a=n(90186),l=n(86332),c=n(95604);var u=n(21103),d=n.n(u);function h(e){let t=""
;return 0!==e&&(1&e&&(t=o(t,d()["no-corner-top-left"])),2&e&&(t=o(t,d()["no-corner-top-right"])),4&e&&(t=o(t,d()["no-corner-bottom-right"])),8&e&&(t=o(t,d()["no-corner-bottom-left"]))),t}function p(e,t,n,s){const{removeRoundBorder:r,className:i,intent:a="default",borderStyle:l="thin",size:u,highlight:p,disabled:m,readonly:g,stretch:f,noReadonlyStyles:v,isFocused:b}=e,C=h(null!=r?r:(0,c.getGroupCellRemoveRoundBorders)(n));return o(d().container,d()["intent-"+a],d()["border-"+l],u&&d()["size-"+u],C,p&&d()["with-highlight"],m&&d().disabled,g&&!v&&d().readonly,b&&d().focused,f&&d().stretch,t&&d().grouped,!s&&d()["adjust-position"],n.isTop&&d()["first-row"],n.isLeft&&d()["first-col"],i)}function m(e,t){const{highlight:n,highlightRemoveRoundBorder:s}=e;if(!n)return d().highlight;const r=h(null!=s?s:(0,c.getGroupCellRemoveRoundBorders)(t));return o(d().highlight,d().shown,r)}const g={FontSizeMedium:(0,r.ensureDefined)(d()["font-size-medium"]),FontSizeLarge:(0,r.ensureDefined)(d()["font-size-large"])},f={passive:!1};function v(e,t){const{id:n,role:o,onFocus:r,onBlur:c,onMouseOver:u,onMouseOut:d,onMouseDown:h,onMouseUp:g,onKeyDown:v,onClick:b,tabIndex:C,startSlot:_,middleSlot:w,endSlot:y,onWheel:S,onWheelNoPassive:x=null}=e,{isGrouped:E,cellState:k,disablePositionAdjustment:N=!1}=(0,s.useContext)(l.ControlGroupContext),O=function(e,t=null,n){const o=(0,s.useRef)(null),r=(0,s.useRef)(null),i=(0,s.useCallback)(()=>{if(null===o.current||null===r.current)return;const[e,t,n]=r.current;null!==t&&o.current.addEventListener(e,t,n)},[]),a=(0,s.useCallback)(()=>{if(null===o.current||null===r.current)return;const[e,t,n]=r.current;null!==t&&o.current.removeEventListener(e,t,n)},[]),l=(0,s.useCallback)(e=>{a(),o.current=e,i()},[]);return(0,s.useEffect)(()=>(r.current=[e,t,n],i(),a),[e,t,n]),l}("wheel",x,f);return s.createElement("span",{id:n,role:o,className:p(e,E,k,N),tabIndex:C,ref:(0,i.useMergedRefs)([t,O]),onFocus:r,onBlur:c,onMouseOver:u,onMouseOut:d,onMouseDown:h,onMouseUp:g,onKeyDown:v,onClick:b,onWheel:S,...(0,a.filterDataProps)(e),...(0,a.filterAriaProps)(e)},_,w,y,s.createElement("span",{className:m(e,k)}))}v.displayName="ControlSkeleton";const b=s.forwardRef(v)},78274:(e,t,n)=>{"use strict";n.d(t,{StartSlot:()=>a,MiddleSlot:()=>l,EndSlot:()=>c,AfterSlot:()=>u});var s=n(59496),o=n(97754),r=n(10306),i=n.n(r);function a(e){const{className:t,interactive:n=!0,icon:r=!1,children:a}=e;return s.createElement("span",{className:o(i()["inner-slot"],n&&i().interactive,r&&i().icon,t)},a)}function l(e){const{className:t,children:n}=e;return s.createElement("span",{className:o(i()["inner-slot"],i()["inner-middle-slot"],t)},n)}function c(e){const{className:t,interactive:n=!0,icon:r=!1,children:a}=e;return s.createElement("span",{className:o(i()["inner-slot"],n&&i().interactive,r&&i().icon,t)},a)}function u(e){const{className:t,children:n}=e;return s.createElement("span",{className:o(i()["after-slot"],t)},n)}},31261:(e,t,n)=>{"use strict";n.d(t,{InputControl:()=>b})
;var s=n(59496),o=n(97754),r=n(90186),i=n(47201),a=n(48907),l=n(66092),c=n(48027),u=n(29202),d=n(45812),h=n(67029),p=n(78274),m=n(66579),g=n.n(m);function f(e){return!(0,r.isAriaAttribute)(e)&&!(0,r.isDataAttribute)(e)}function v(e){const{id:t,title:n,role:i,tabIndex:a,placeholder:l,name:c,type:u,value:d,defaultValue:m,draggable:v,autoComplete:b,autoFocus:C,maxLength:_,min:w,max:y,step:S,pattern:x,inputMode:E,onSelect:k,onFocus:N,onBlur:O,onKeyDown:A,onKeyUp:D,onKeyPress:M,onChange:I,onDragStart:T,size:L="medium",className:B,inputClassName:R,disabled:j,readonly:P,containerTabIndex:V,startSlot:F,endSlot:U,reference:K,containerReference:z,onContainerFocus:H,...Y}=e,q=(0,r.filterProps)(Y,f),G={...(0,r.filterAriaProps)(Y),...(0,r.filterDataProps)(Y),id:t,title:n,role:i,tabIndex:a,placeholder:l,name:c,type:u,value:d,defaultValue:m,draggable:v,autoComplete:b,autoFocus:C,maxLength:_,min:w,max:y,step:S,pattern:x,inputMode:E,onSelect:k,onFocus:N,onBlur:O,onKeyDown:A,onKeyUp:D,onKeyPress:M,onChange:I,onDragStart:T};return s.createElement(h.ControlSkeleton,{...q,disabled:j,readonly:P,tabIndex:V,className:o(g().container,B),size:L,ref:z,onFocus:H,startSlot:F,middleSlot:s.createElement(p.MiddleSlot,null,s.createElement("input",{...G,className:o(g().input,R,F&&g()["with-start-slot"],U&&g()["with-end-slot"]),disabled:j,readOnly:P,ref:K})),endSlot:U})}function b(e){e=(0,c.useControl)(e);const{disabled:t,autoSelectOnFocus:n,tabIndex:o=0,onFocus:r,onBlur:h,reference:p,containerReference:m=null}=e,g=(0,s.useRef)(null),f=(0,s.useRef)(null),[b,C]=(0,u.useFocus)(),_=t?void 0:b?-1:o,w=t?void 0:b?o:-1,{isMouseDown:y,handleMouseDown:S,handleMouseUp:x}=(0,d.useIsMouseDown)(),E=(0,i.createSafeMulticastEventHandler)(C.onFocus,(function(e){n&&!y.current&&(0,a.selectAllContent)(e.currentTarget)}),r),k=(0,i.createSafeMulticastEventHandler)(C.onBlur,h),N=(0,s.useCallback)(e=>{g.current=e,p&&("function"==typeof p&&p(e),"object"==typeof p&&(p.current=e))},[g,p]);return s.createElement(v,{...e,isFocused:b,containerTabIndex:_,tabIndex:w,onContainerFocus:function(e){f.current===e.target&&null!==g.current&&g.current.focus()},onFocus:E,onBlur:k,reference:N,containerReference:(0,l.useMergedRefs)([f,m]),onMouseDown:S,onMouseUp:x})}},48027:(e,t,n)=>{"use strict";n.d(t,{useControl:()=>r});var s=n(47201),o=n(29202);function r(e){const{onFocus:t,onBlur:n,intent:r,highlight:i,disabled:a}=e,[l,c]=(0,o.useFocus)(void 0,a),u=(0,s.createSafeMulticastEventHandler)(a?void 0:c.onFocus,t),d=(0,s.createSafeMulticastEventHandler)(a?void 0:c.onBlur,n);return{...e,intent:r||(l?"primary":"default"),highlight:null!=i?i:l,onFocus:u,onBlur:d}}},29202:(e,t,n)=>{"use strict";n.d(t,{useFocus:()=>o});var s=n(59496);function o(e,t){const[n,o]=(0,s.useState)(!1);(0,s.useEffect)(()=>{t&&n&&o(!1)},[t,n]);const r={onFocus:(0,s.useCallback)((function(t){void 0!==e&&e.current!==t.target||o(!0)}),[e]),onBlur:(0,s.useCallback)((function(t){void 0!==e&&e.current!==t.target||o(!1)}),[e])};return[n,r]}},45812:(e,t,n)=>{"use strict";n.d(t,{useIsMouseDown:()=>o});var s=n(59496);function o(){
const e=(0,s.useRef)(!1),t=(0,s.useCallback)(()=>{e.current=!0},[e]),n=(0,s.useCallback)(()=>{e.current=!1},[e]);return{isMouseDown:e,handleMouseDown:t,handleMouseUp:n}}},66092:(e,t,n)=>{"use strict";n.d(t,{useMergedRefs:()=>o});var s=n(59496);function o(e){return(0,s.useCallback)(function(e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}(e),e)}},9745:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>o});var s=n(59496);const o=s.forwardRef((e,t)=>{const{icon:n="",...o}=e;return s.createElement("span",{...o,ref:t,dangerouslySetInnerHTML:{__html:n}})})},26996:(e,t,n)=>{"use strict";n.d(t,{Loader:()=>c});var s,o=n(59496),r=n(97754),i=n(74991),a=n(62092),l=n.n(a);!function(e){e[e.Initial=0]="Initial",e[e.Appear=1]="Appear",e[e.Active=2]="Active"}(s||(s={}));class c extends o.PureComponent{constructor(e){super(e),this._stateChangeTimeout=null,this.state={state:s.Initial}}render(){const{className:e,color:t="black",size:n="medium",staticPosition:s}=this.props,i=r(l().item,l()[t],l()[n]);return o.createElement("span",{className:r(l().loader,s&&l().static,this._getStateClass(),e)},o.createElement("span",{className:i}),o.createElement("span",{className:i}),o.createElement("span",{className:i}))}componentDidMount(){this.setState({state:s.Appear}),this._stateChangeTimeout=setTimeout(()=>{this.setState({state:s.Active})},2*i.dur)}componentWillUnmount(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)}_getStateClass(){switch(this.state.state){case s.Initial:return l()["loader-initial"];case s.Appear:return l()["loader-appear"];default:return""}}}},54349:(e,t,n)=>{"use strict";n.d(t,{SwitchGroup:()=>r,makeSwitchGroupItem:()=>i});var s=n(59496),o=n(19036);class r extends s.PureComponent{constructor(){super(...arguments),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)}}getChildContext(){return{switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return this.props.children}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach(t=>t(e))}_getUpdates(e,t){return[...t,...e].filter(n=>t.includes(n)?!e.includes(n):e.includes(n))}}function i(e){var t;return(t=class extends s.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.switchGroupContext.getOnChange()(e)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}componentDidMount(){this.context.switchGroupContext.subscribe(this._onUpdate)}render(){return s.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.switchGroupContext.unsubscribe(this._onUpdate)}_getName(){return this.context.switchGroupContext.getName()}_isChecked(){
return this.context.switchGroupContext.getValues().includes(this.props.value)}}).contextTypes={switchGroupContext:o.any.isRequired},t}r.childContextTypes={switchGroupContext:o.any.isRequired}},90186:(e,t,n)=>{"use strict";function s(e){return r(e,i)}function o(e){return r(e,a)}function r(e,t){const n=Object.entries(e).filter(t),s={};for(const[e,t]of n)s[e]=t;return s}function i(e){const[t,n]=e;return 0===t.indexOf("data-")&&"string"==typeof n}function a(e){return 0===e[0].indexOf("aria-")}n.d(t,{filterDataProps:()=>s,filterAriaProps:()=>o,filterProps:()=>r,isDataAttribute:()=>i,isAriaAttribute:()=>a})},48907:(e,t,n)=>{"use strict";function s(e){null!==e&&e.setSelectionRange(0,e.value.length)}n.d(t,{selectAllContent:()=>s})},47201:(e,t,n)=>{"use strict";function s(...e){return t=>{for(const n of e)void 0!==n&&n(t)}}n.d(t,{createSafeMulticastEventHandler:()=>s})},33165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StudyTemplateSaver:()=>z});var s,o=n(88537),r=n(28353),i=n(59496),a=n(87995),l=(n(94419),n(97754)),c=n(15294),u=n(10381),d=n(78274),h=n(31261),p=n(76594);!function(e){e[e.Enter=13]="Enter",e[e.Space=32]="Space",e[e.Backspace=8]="Backspace",e[e.DownArrow=40]="DownArrow",e[e.UpArrow=38]="UpArrow",e[e.RightArrow=39]="RightArrow",e[e.LeftArrow=37]="LeftArrow",e[e.Escape=27]="Escape",e[e.Tab=9]="Tab"}(s||(s={}));var m=n(20453);function g(e,t){return""===e||-1!==t.toLowerCase().indexOf(e.toLowerCase())}class f extends i.PureComponent{constructor(e){if(super(e),this._setInputRef=e=>{e&&(this._inputElement=e,this.props.setupHTMLInput&&this.props.setupHTMLInput(e),this._inputElement.addEventListener("keyup",this._handleKeyUpEnter))},this._handleCaretClick=()=>{this.state.isOpened?this.props.preventOnFocusOpen&&this._focus():this.props.preventOnFocusOpen?this._open():this._focus()},this._handleOutsideClick=()=>{const{allowUserDefinedValues:e,value:t,onChange:n}=this.props,{queryValue:s}=this.state;e?n&&s!==t&&n(s):this.setState(this._valueToQuery(t)),this._close()},this._handleFocus=e=>{this.props.preventOnFocusOpen||this._open(),this.props.onFocus&&this.props.onFocus(e)},this._handleChange=e=>{const{preventSearchOnEmptyQuery:t,allowUserDefinedValues:n,onChange:s,onSuggestionsOpen:o,onSuggestionsClose:r}=this.props,i=e.currentTarget.value;if(t&&""===i)this.setState({queryValue:i,isOpened:!1,active:void 0}),r&&r();else{const e=this._suggestions(i),t=Object.keys(e).length>0;this.setState({queryValue:i,isOpened:t,active:n?void 0:this._getActiveKeyByValue(i)}),t&&o&&o()}n&&s&&s(i)},this._handleItemClick=e=>{const t=e.currentTarget.id;this.setState({queryValue:this._source()[t]}),this.props.onChange&&this.props.onChange(t),this._close()},this._handleKeyDown=e=>{if(-1===[s.DownArrow,s.UpArrow,s.Enter,s.Escape].indexOf(e.which))return;const{allowUserDefinedValues:t,value:n,onChange:o,onSuggestionsOpen:r}=this.props,{active:i,isOpened:a,queryValue:l}=this.state;a&&(e.preventDefault(),e.stopPropagation());const c=this._suggestions(l);switch(e.which){case s.DownArrow:case s.UpArrow:const u=Object.keys(c)
;if(!a&&u.length&&e.which===s.DownArrow){this.setState({isOpened:!0,active:u[0]}),r&&r();break}let d;if(void 0===i){if(e.which===s.UpArrow){this._close();break}d=0}else d=u.indexOf(i)+(e.which===s.UpArrow?-1:1);d<0&&(d=0),d>u.length-1&&(d=u.length-1);const h=u[d];this.setState({active:h});const p=document.getElementById(h);p&&this._scrollIfNotVisible(p,this._suggestionsElement);break;case s.Escape:this._close(),a||this._blur();break;case s.Enter:let m=i;t&&(a&&m?this.setState(this._valueToQuery(m)):m=l),void 0!==m&&(this._close(),a||this._blur(),m!==n?o&&o(m):this.setState(this._valueToQuery(m)))}},this._setSuggestionsRef=e=>{e&&(this._suggestionsElement=e)},this._scrollIfNotVisible=(e,t)=>{const n=t.scrollTop,s=t.scrollTop+t.clientHeight,o=e.offsetTop,r=o+e.clientHeight;o<=n?e.scrollIntoView(!0):r>=s&&e.scrollIntoView(!1)},!(e=>Array.isArray(e.source)||!e.allowUserDefinedValues)(e))throw new Error("allowUserDefinedProps === true cay only be used if source is array");this.state={isOpened:!1,active:e.value,...this._valueToQuery(e.value)}}UNSAFE_componentWillReceiveProps(e){const{allowUserDefinedValues:t,value:n}=e;if(n===this.props.value&&this.state.isOpened)return;const s=t?n:""===n?"":this._source()[n]||this.state.queryValue;this.setState({queryValue:s,active:n})}componentWillUnmount(){this._inputElement&&this._inputElement.removeEventListener("keyup",this._handleKeyUpEnter)}render(){return i.createElement(p.OutsideEvent,{handler:this._handleOutsideClick,click:!0},e=>i.createElement("div",{className:l(m.autocomplete,{[m.opened]:this.state.isOpened},"js-dialog-skip-escape"),ref:e},i.createElement(h.InputControl,{name:this.props.name,endSlot:Object.keys(this._suggestions(this.state.queryValue)).length?i.createElement(d.EndSlot,null,i.createElement("span",{className:m.caret,onClick:this._handleCaretClick},i.createElement(u.ToolWidgetCaret,{className:m.icon,dropped:this.state.isOpened}))):void 0,maxLength:this.props.maxLength,reference:this._setInputRef,stretch:!0,placeholder:this.props.placeholder,value:this.state.queryValue,intent:this.props.error?"danger":void 0,onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this.props.onBlur,onMouseOver:this.props.onMouseOver,onMouseOut:this.props.onMouseOut,onKeyDown:this._handleKeyDown,autoComplete:"off"}),this._renderSuggestions()))}_focus(){this._inputElement.focus()}_blur(){this._inputElement.blur()}_open(){const{onSuggestionsOpen:e}=this.props;this._focus(),this.setState({isOpened:!0}),e&&e()}_close(){const{onSuggestionsClose:e}=this.props;this.setState({isOpened:!1,active:void 0}),e&&e()}_source(){let e={};return Array.isArray(this.props.source)?this.props.source.forEach(t=>{e[t]=t}):e=this.props.source,e}_suggestions(e){const{filter:t=g}=this.props,n=this._source(),s={};return Object.keys(n).filter(s=>t(e,n[s])).forEach(e=>s[e]=n[e]),s}_renderSuggestions(){const e=this._suggestions(this.state.queryValue),t=Object.keys(e).map(t=>{const n=l(m.suggestion,{[m.selected]:this.state.active===t});return i.createElement("li",{id:t,key:t,className:n,
onClick:this._handleItemClick},e[t])}),n=i.createElement("li",{className:m.noResults},(0,r.t)("No results found"));return!t.length&&this.props.noEmptyText?null:i.createElement("ul",{className:m.suggestions,ref:this._setSuggestionsRef},t.length?t:n)}_handleKeyUpEnter(e){e.which===s.Enter&&e.stopImmediatePropagation()}_getActiveKeyByValue(e){const{filter:t=g}=this.props,n=this._suggestions(e),s=Object.keys(n);for(const o of s)if(t(e,n[o]))return o;return s[0]}_valueToQuery(e){return{queryValue:this._source()[e]||""}}}var v=n(9745),b=n(50182),C=n(50655),_=n(26996),w=n(35256);function y(e){const{isLoading:t}=e;return i.createElement("span",{className:t?w.loading:void 0},(0,r.t)("Save"),t&&i.createElement(_.Loader,{color:"white"}))}class S extends i.PureComponent{constructor(e){super(e),this._dialogRef=i.createRef(),this._manager=null,this._handleSubmit=()=>{this.setState({isLoading:!0}),this.props.onSubmit(this)},this.state={isLoading:!1}}render(){const{isOpened:e,saveDisabled:t,title:n,onClose:s}=this.props;return i.createElement(b.AdaptiveConfirmDialog,{ref:this._dialogRef,onClose:s,onSubmit:this._handleSubmit,onCancel:s,onClickOutside:s,isOpened:e,title:n,dataName:"save-rename-dialog",render:this._renderDialogBody(),defaultActionOnClose:"none",submitButtonText:i.createElement(y,{isLoading:this.state.isLoading}),submitButtonDisabled:t})}focus(){(0,o.ensureNotNull)(this._dialogRef.current).focus()}manager(){return this._manager}submit(){this.props.onSubmit(this)}close(){this.props.onClose()}dropLoading(){this.setState({isLoading:!1})}_renderDialogBody(){return()=>i.createElement(C.SlotContext.Consumer,null,e=>(this._manager=e,this.props.children))}}var x=n(60495),E=n(33558);const k=(0,r.t)("Template name"),N=(0,r.t)("Saved indicators"),O=(0,r.t)("Remember Symbol"),A=(0,r.t)("Remember Interval");function D(e){const{title:t,saveSymbolHintText:n,saveIntervalHintText:s,indicatorsText:r,source:a,onClose:u,onSubmit:d}=e,[h,p]=(0,i.useState)(""),[m,g]=(0,i.useState)(!1),[b,C]=(0,i.useState)(!1),[_,w]=(0,i.useState)(!1),y=(0,i.useRef)(null),D=(0,i.useRef)(null);return(0,i.useEffect)(()=>{(0,o.ensureNotNull)(D.current).focus()},[]),i.createElement(S,{ref:y,isOpened:!0,saveDisabled:!h,title:t,onClose:u,onSubmit:function(e){d({title:h,saveSymbol:m,saveInterval:b},e)}},i.createElement("div",{className:l(E.container,_&&E.withSuggestions)},i.createElement("div",{className:E.title},k),i.createElement("div",{className:E.autocomplete},i.createElement(f,{maxLength:64,value:h,onChange:p,onBlur:function(){(0,o.ensureNotNull)(y.current).focus()},source:a,allowUserDefinedValues:!0,preventOnFocusOpen:!0,noEmptyText:!0,preventSearchOnEmptyQuery:!0,filter:function(e,t){return Boolean(""===e||e&&-1!==t.toLowerCase().indexOf(e.toLowerCase()))},setupHTMLInput:function(e){D.current=e},onSuggestionsOpen:function(){w(!0)},onSuggestionsClose:function(){w(!1)}})),i.createElement("div",{className:E.saveSymbol},i.createElement(c.Checkbox,{label:i.createElement("span",{className:E.hintLabel},O,i.createElement(v.Icon,{icon:x,
className:l(E.hintMark,"apply-common-tooltip"),title:n})),onChange:function(){g(!m),(0,o.ensureNotNull)(y.current).focus()},checked:m})),i.createElement("div",{className:E.saveInterval},i.createElement(c.Checkbox,{label:i.createElement("span",{className:E.hintLabel},A,i.createElement(v.Icon,{icon:x,className:l(E.hintMark,"apply-common-tooltip"),title:s})),onChange:function(){C(!b),(0,o.ensureNotNull)(y.current).focus()},checked:b})),i.createElement("div",{className:E.title},N),i.createElement("div",{className:l(E.indicators,_&&E.withSuggestions)},r)))}var M=n(76422),I=n(52092);class T{constructor(e){this._container=document.createElement("div"),this.close=()=>{this.unmount(),this._onClose&&this._onClose()},this.unmount=()=>{M.unsubscribe(I.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this.unmount,null),a.unmountComponentAtNode(this._container)},this._title=e.title,this._saveSymbolHintText=e.saveSymbolHintText,this._saveIntervalHintText=e.saveIntervalHintText,this._indicatorsText=e.indicatorsText,this._source=e.source,this._onSubmit=e.onSubmit,this._onClose=e.onClose,M.subscribe(I.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this.unmount,null)}mount(){a.render(i.createElement(D,{title:this._title,saveSymbolHintText:this._saveSymbolHintText,saveIntervalHintText:this._saveIntervalHintText,indicatorsText:this._indicatorsText,source:this._source,onClose:this.close,onSubmit:this._onSubmit}),this._container)}destroy(){this.unmount()}show(){this.mount()}}var L=n(43007),B=n(3615),R=n(35218),j=n(23177);const P=(0,r.t)("Save Indicator Template"),V=(0,r.t)("Selecting this option will set the {symbol} symbol on the chart when this template is applied"),F=(0,r.t)("Selecting this option will set the {interval} interval on the chart when this template is applied"),U=(0,r.t)("Study Template '{templateName}' already exists. Do you really want to replace it?");function K(e,t,n){const s=()=>{L.backend.invalidateStudyTemplatesList(),L.backend.getStudyTemplatesList().then(t)};L.backend.saveStudyTemplate(e).then(s)}class z{constructor(e){this._dialog=null,this._onSave=e=>{this._options.onSave(e),this._close()},this._showSaveDialog=async()=>{const e=this._controller.model().mainSeries().symbol(),t=this._controller.model().mainSeries().interval(),n=await this._getActualTemplateList();await this._showTemplateSaveRenameDialog(n,e,t)},this._close=()=>{this._dialog&&(this._dialog.destroy(),this._dialog=null)},this._options=e,this._controller=e.controller}show(){window.runOrSignIn(this._showSaveDialog,{source:"Study templates save as",sourceMeta:"Chart"})}_prepareData(e,t,n){const s=this._controller.model().studyTemplate(t,n);return{name:e,content:JSON.stringify(s),meta_info:(0,j.createStudyTemplateMetaInfo)(this._controller,s.interval)}}_doSave(e,t,n){const{title:s,saveSymbol:o,saveInterval:r}=t;if(!s)return;const i=n.manager()||void 0,a=this._prepareData(s,o,r);if(e.find(e=>e.name===s)){const e=e=>{e?K(a,this._onSave):(n.focus(),n.dropLoading())};(function(e,t){return new Promise(n=>(0,B.showConfirm)({text:U.format({templateName:e}),onConfirm:({dialogClose:e})=>{
n(!0),e()},onClose:()=>n(!1)},t))})(s,i).then(e)}else{K(a,this._onSave)}}_getActualTemplateList(){return L.backend.invalidateStudyTemplatesList(),L.backend.getStudyTemplatesList()}_showTemplateSaveRenameDialog(e,t,n){const s=(0,j.createStudyTemplateMetaInfo)(this._controller);(this._dialog=new T({source:e.map(e=>e.name),title:P,saveSymbolHintText:V.format({symbol:t}),saveIntervalHintText:F.format({interval:(0,R.translatedIntervalString)(n)}),indicatorsText:(0,j.descriptionString)(s.indicators),onSubmit:(t,n)=>this._doSave(e,t,n),onClose:this._close})).show()}}},23177:(e,t,n)=>{"use strict";n.d(t,{createStudyTemplateMetaInfo:()=>o,descriptionString:()=>r});var s=n(81851);function o(e,t){return{indicators:e.orderedDataSources(!0).filter(e=>(0,s.isStudy)(e)&&!0).map(e=>({id:e.metaInfo().id,description:e.title(!0,void 0,!0)})),interval:t}}function r(e){const t=new Map;return e.forEach(e=>{const[n,s]=t.get(e.id)||[e.description,0];t.set(e.id,[n,s+1])}),Array.from(t.values()).map(([e,t])=>`${e}${t>1?" x "+t:""}`).join(", ")}},39640:(e,t,n)=>{"use strict";function s(e,t,n,s,o){function r(o){if(e>o.timeStamp)return;const r=o.target;void 0!==n&&null!==t&&null!==r&&r.ownerDocument===s&&(t.contains(r)||n(o))}return o.click&&s.addEventListener("click",r,!1),o.mouseDown&&s.addEventListener("mousedown",r,!1),o.touchEnd&&s.addEventListener("touchend",r,!1),o.touchStart&&s.addEventListener("touchstart",r,!1),()=>{s.removeEventListener("click",r,!1),s.removeEventListener("mousedown",r,!1),s.removeEventListener("touchend",r,!1),s.removeEventListener("touchstart",r,!1)}}n.d(t,{addOutsideEventListener:()=>s})},99054:(e,t,n)=>{"use strict";n.d(t,{setFixedBodyState:()=>c});const s=(()=>{let e;return()=>{var t;if(void 0===e){const n=document.createElement("div"),s=n.style;s.visibility="hidden",s.width="100px",s.msOverflowStyle="scrollbar",document.body.appendChild(n);const o=n.offsetWidth;n.style.overflow="scroll";const r=document.createElement("div");r.style.width="100%",n.appendChild(r);const i=r.offsetWidth;null===(t=n.parentNode)||void 0===t||t.removeChild(n),e=o-i}return e}})();function o(e,t,n){null!==e&&e.style.setProperty(t,n)}function r(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function i(e,t){return parseInt(r(e,t))}let a=0,l=!1;function c(e){const{body:t}=document,n=t.querySelector(".widgetbar-wrap");if(e&&1==++a){const e=r(t,"overflow"),a=i(t,"padding-right");"hidden"!==e.toLowerCase()&&t.scrollHeight>t.offsetHeight&&(o(n,"right",s()+"px"),t.style.paddingRight=a+s()+"px",l=!0),t.classList.add("i-no-scroll")}else if(!e&&a>0&&0==--a&&(t.classList.remove("i-no-scroll"),l)){o(n,"right","0px");let e=0;0,t.scrollHeight<=t.clientHeight&&(e-=s()),t.style.paddingRight=(e<0?0:e)+"px",l=!1}}},50182:(e,t,n)=>{"use strict";n.d(t,{AdaptiveConfirmDialog:()=>h});var s=n(59496),o=n(97754),r=n.n(o),i=n(94720),a=n(88537),l=n(28353),c=n(68335),u=n(85457),d=n(91131);class h extends s.PureComponent{constructor(){super(...arguments),this._dialogRef=s.createRef(),this._handleClose=()=>{
const{defaultActionOnClose:e,onSubmit:t,onCancel:n,onClose:s}=this.props;switch(e){case"submit":t();break;case"cancel":n()}s()},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleKeyDown=e=>{const{onSubmit:t,submitButtonDisabled:n,submitOnEnterKey:s}=this.props;13===(0,c.hashFromEvent)(e)&&s&&(e.preventDefault(),n||t())}}render(){const{render:e,onClose:t,onSubmit:n,onCancel:o,footerLeftRenderer:r,submitButtonText:i,submitButtonDisabled:a,defaultActionOnClose:l,submitOnEnterKey:c,...d}=this.props;return s.createElement(u.AdaptivePopupDialog,{...d,ref:this._dialogRef,onKeyDown:this._handleKeyDown,render:this._renderChildren(),onClose:this._handleClose})}focus(){(0,a.ensureNotNull)(this._dialogRef.current).focus()}_renderChildren(){return e=>{const{render:t,footerLeftRenderer:n,additionalButtons:o,submitButtonText:a,submitButtonDisabled:c,onSubmit:u,cancelButtonText:h,showCancelButton:p=!0,submitButtonClassName:m,cancelButtonClassName:g,buttonsWrapperClassName:f}=this.props;return s.createElement(s.Fragment,null,t(e),s.createElement("div",{className:d.footer},n&&n(e.isSmallWidth),s.createElement("div",{className:r()(d.buttons,f)},o,p&&s.createElement(i.Button,{className:g,name:"cancel",appearance:"stroke",onClick:this._handleCancel},null!=h?h:(0,l.t)("Cancel")),s.createElement("span",{className:d.submitButton},s.createElement(i.Button,{className:m,disabled:c,name:"submit",onClick:u,"data-name":"submit-button"},null!=a?a:(0,l.t)("Ok"))))))}}}h.defaultProps={defaultActionOnClose:"submit",submitOnEnterKey:!0}},24437:(e,t,n)=>{"use strict";n.d(t,{DialogBreakpoints:()=>o});var s=n(96746);const o={SmallHeight:s["small-height-breakpoint"],TabletSmall:s["tablet-small-breakpoint"],TabletNormal:s["tablet-normal-breakpoint"]}},85457:(e,t,n)=>{"use strict";n.d(t,{AdaptivePopupDialog:()=>x});var s=n(59496),o=n(88537);var r=n(97754),i=n.n(r),a=n(68335),l=n(35749),c=n(63016),u=n(1109),d=n(24437),h=n(90692),p=n(95711),m=n(52092),g=n(76422),f=n(9745);const v=s.createContext({setHideClose:()=>{}});var b=n(37257),C=n(91441);function _(e){const{title:t,subtitle:n,showCloseIcon:o=!0,onClose:r,renderBefore:a,renderAfter:l,draggable:c,className:u,unsetAlign:d}=e,[h,p]=(0,s.useState)(!1);return s.createElement(v.Provider,{value:{setHideClose:p}},s.createElement("div",{className:i()(C.container,u,(n||d)&&C.unsetAlign)},a,s.createElement("div",{"data-dragg-area":c,className:C.title},s.createElement("div",{className:C.ellipsis},t),n&&s.createElement("div",{className:i()(C.ellipsis,C.subtitle)},n)),l,o&&!h&&s.createElement(f.Icon,{className:C.close,icon:b,onClick:r,"data-name":"close","data-role":"button"})))}var w=n(67179);const y={vertical:20},S={vertical:0};class x extends s.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._orientationMediaQuery=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleClose=()=>{
this.props.onClose()},this._handleOpen=()=>{void 0!==this.props.onOpen&&this.props.isOpened&&this.props.onOpen(this.props.fullScreen||window.matchMedia(d.DialogBreakpoints.TabletSmall).matches)},this._handleKeyDown=e=>{var t;if(!e.defaultPrevented)switch(this.props.onKeyDown&&this.props.onKeyDown(e),(0,a.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return void this._handleClose();const{activeElement:n}=document,s=(0,o.ensureNotNull)(this._reference);if(null!==n){if(e.preventDefault(),"true"===(t=n).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();if((0,l.isTextEditingField)(n))return void s.focus();if(s.contains(n))return void this._handleClose()}}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()}}componentDidMount(){var e,t;g.subscribe(m.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),this._handleOpen(),void 0!==this.props.onOpen&&(this._orientationMediaQuery=window.matchMedia("(orientation: portrait)"),e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.addEventListener)?e.addEventListener("change",t):e.addListener(t))}componentWillUnmount(){var e,t;g.unsubscribe(m.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),null!==this._orientationMediaQuery&&(e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.removeEventListener)?e.removeEventListener("change",t):e.removeListener(t))}focus(){(0,o.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,n;return null!==(n=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==n&&n}render(){const{className:e,wrapperClassName:t,headerClassName:n,isOpened:o,title:r,dataName:a,onClickOutside:l,additionalElementPos:m,additionalHeaderElement:g,backdrop:f,shouldForceFocus:v=!0,showSeparator:b,subtitle:C,draggable:x=!0,fullScreen:E=!1,showCloseIcon:k=!0,rounded:N=!0,isAnimationEnabled:O,growPoint:A,dialogTooltip:D,unsetHeaderAlign:M,onDragStart:I,dataDialogName:T}=this.props,L="after"!==m?g:void 0,B="after"===m?g:void 0,R="string"==typeof r?r:T||"";return s.createElement(h.MatchMedia,{rule:d.DialogBreakpoints.SmallHeight},m=>s.createElement(h.MatchMedia,{rule:d.DialogBreakpoints.TabletSmall},d=>s.createElement(c.PopupDialog,{rounded:!(d||E)&&N,className:i()(w.dialog,e),isOpened:o,reference:this._handleReference,onKeyDown:this._handleKeyDown,onClickOutside:l,onClickBackdrop:l,fullscreen:d||E,guard:m?S:y,boundByScreen:d||E,shouldForceFocus:v,backdrop:f,draggable:x,isAnimationEnabled:O,growPoint:A,name:this.props.dataName,dialogTooltip:D,onDragStart:I},s.createElement("div",{className:i()(w.wrapper,t),"data-name":a,"data-dialog-name":R},void 0!==r&&s.createElement(_,{draggable:x&&!(d||E),onClose:this._handleClose,renderAfter:B,renderBefore:L,subtitle:C,title:r,showCloseIcon:k,className:n,unsetAlign:M}),b&&s.createElement(u.Separator,{
className:w.separator}),s.createElement(p.PopupContext.Consumer,null,e=>this._renderChildren(e,d||E))))))}}},58095:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>r});var s=n(59496),o=n(39640);function r(e){const{click:t,mouseDown:n,touchEnd:r,touchStart:i,handler:a,reference:l,ownerDocument:c=document}=e,u=(0,s.useRef)(null),d=(0,s.useRef)(new CustomEvent("timestamp").timeStamp);return(0,s.useLayoutEffect)(()=>{const e={click:t,mouseDown:n,touchEnd:r,touchStart:i},s=l?l.current:u.current;return(0,o.addOutsideEventListener)(d.current,s,a,c,e)},[t,n,r,i,a]),l||u}},90692:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>o});var s=n(59496);class o extends s.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addListener(this._handleChange)}_unsubscribe(e){e.removeListener(this._handleChange)}}},1109:(e,t,n)=>{"use strict";n.d(t,{Separator:()=>i});var s=n(59496),o=n(97754),r=n(91626);function i(e){return s.createElement("div",{className:o(r.separator,e.className)})}},88216:(e,t,n)=>{"use strict";n.d(t,{OverlapManager:()=>r,getRootOverlapManager:()=>a});var s=n(88537);class o{constructor(){this._storage=[]}add(e){this._storage.push(e)}remove(e){this._storage=this._storage.filter(t=>e!==t)}has(e){return this._storage.includes(e)}getItems(){return this._storage}}class r{constructor(e=document){this._storage=new o,this._windows=new Map,this._index=0,this._document=e,this._container=e.createDocumentFragment()}setContainer(e){const t=this._container,n=null===e?this._document.createDocumentFragment():e;!function(e,t){Array.from(e.childNodes).forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&t.appendChild(e)})}(t,n),this._container=n}registerWindow(e){this._storage.has(e)||this._storage.add(e)}ensureWindow(e,t={position:"fixed",direction:"normal"}){const n=this._windows.get(e);if(void 0!==n)return n;this.registerWindow(e);const s=this._document.createElement("div");if(s.style.position=t.position,s.style.zIndex=this._index.toString(),s.dataset.id=e,void 0!==t.index){const e=this._container.childNodes.length;if(t.index>=e)this._container.appendChild(s);else if(t.index<=0)this._container.insertBefore(s,this._container.firstChild);else{const e=this._container.childNodes[t.index];this._container.insertBefore(s,e)}}else"reverse"===t.direction?this._container.insertBefore(s,this._container.firstChild):this._container.appendChild(s);return this._windows.set(e,s),++this._index,s}unregisterWindow(e){this._storage.remove(e);const t=this._windows.get(e);void 0!==t&&(null!==t.parentElement&&t.parentElement.removeChild(t),this._windows.delete(e))}getZindex(e){
const t=this.ensureWindow(e);return parseInt(t.style.zIndex||"0")}moveToTop(e){if(this.getZindex(e)!==this._index){this.ensureWindow(e).style.zIndex=(++this._index).toString()}}removeWindow(e){this.unregisterWindow(e)}}const i=new WeakMap;function a(e=document){const t=e.getElementById("overlap-manager-root");if(null!==t)return(0,s.ensureDefined)(i.get(t));{const t=new r(e),n=function(e){const t=e.createElement("div");return t.style.position="absolute",t.style.zIndex=150..toString(),t.style.top="0px",t.style.left="0px",t.id="overlap-manager-root",t}(e);return i.set(n,t),t.setContainer(n),e.body.appendChild(n),t}}},65718:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>l,PortalContext:()=>c});var s=n(59496),o=n(87995),r=n(9423),i=n(88216),a=n(50655);class l extends s.PureComponent{constructor(){super(...arguments),this._uuid=(0,r.guid)()}componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);return e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"",o.createPortal(s.createElement(c.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,i.getRootOverlapManager)():this.context}}l.contextType=a.SlotContext;const c=s.createContext(null)},50655:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>o,SlotContext:()=>r});var s=n(59496);class o extends s.Component{shouldComponentUpdate(){return!1}render(){return s.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const r=s.createContext(null)},10381:(e,t,n)=>{"use strict";n.d(t,{ToolWidgetCaret:()=>l});var s=n(59496),o=n(97754),r=n(9745),i=n(40367),a=n(81268);function l(e){const{dropped:t,className:n}=e;return s.createElement(r.Icon,{className:o(n,i.icon,{[i.dropped]:t}),icon:a})}},49154:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},81268:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 8" width="16" height="8"><path fill="currentColor" d="M0 1.475l7.396 6.04.596.485.593-.49L16 1.39 14.807 0 7.393 6.122 8.58 6.12 1.186.08z"/></svg>'},37257:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" width="17" height="17" fill="currentColor"><path d="m.58 1.42.82-.82 15 15-.82.82z"/><path d="m.58 15.58 15-15 .82.82-15 15z"/></svg>'},60495:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M8 8.5h1.5V14"/><circle fill="currentColor" cx="9" cy="5" r="1"/><path stroke="currentColor" d="M16.5 9a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0z"/></svg>'}}]);