Files
ai/charting_library/bundles/1594.4ef8130762f60c777086.js
2023-02-02 13:31:14 +00:00

23 lines
68 KiB
JavaScript

(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1594],{66783:e=>{"use strict";var t=Object.prototype.hasOwnProperty;function n(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,r){if(n(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var o=Object.keys(e),s=Object.keys(r);if(o.length!==s.length)return!1;for(var a=0;a<o.length;a++)if(!t.call(r,o[a])||!n(e[o[a]],r[o[a]]))return!1;return!0}},55576:e=>{e.exports={button:"button-9pA37sIi",hover:"hover-9pA37sIi",isInteractive:"isInteractive-9pA37sIi",isGrouped:"isGrouped-9pA37sIi",newStyles:"newStyles-9pA37sIi",isActive:"isActive-9pA37sIi",isOpened:"isOpened-9pA37sIi",isDisabled:"isDisabled-9pA37sIi",text:"text-9pA37sIi",icon:"icon-9pA37sIi"}},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"}},28712:e=>{e.exports={container:"container-CcsqUMct",inputContainer:"inputContainer-CcsqUMct",withCancel:"withCancel-CcsqUMct",input:"input-CcsqUMct",icon:"icon-CcsqUMct",cancel:"cancel-CcsqUMct"}},74246:e=>{e.exports={actions:"actions-FZxvEi7a",actionButton:"actionButton-FZxvEi7a"}},82132:e=>{e.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",itemRow:"itemRow-uhHv1IHJ",multiLine:"multiLine-uhHv1IHJ",cell:"cell-uhHv1IHJ",itemInfoCell:"itemInfoCell-uhHv1IHJ",description:"description-uhHv1IHJ",symbolDescription:"symbolDescription-uhHv1IHJ",flag:"flag-uhHv1IHJ",exchangeDescription:"exchangeDescription-uhHv1IHJ",marketType:"marketType-uhHv1IHJ",exchangeName:"exchangeName-uhHv1IHJ",actionHandleWrap:"actionHandleWrap-uhHv1IHJ",hover:"hover-uhHv1IHJ",selected:"selected-uhHv1IHJ",active:"active-uhHv1IHJ",highlighted:"highlighted-uhHv1IHJ",light:"light-uhHv1IHJ","highlight-animation-theme-light":"highlight-animation-theme-light-uhHv1IHJ",dark:"dark-uhHv1IHJ","highlight-animation-theme-dark":"highlight-animation-theme-dark-uhHv1IHJ",markedFlag:"markedFlag-uhHv1IHJ",offset:"offset-uhHv1IHJ",descriptionCell:"descriptionCell-uhHv1IHJ",addition:"addition-uhHv1IHJ",exchangeCell:"exchangeCell-uhHv1IHJ",fixedWidth:"fixedWidth-uhHv1IHJ",expandHandle:"expandHandle-uhHv1IHJ",expanded:"expanded-uhHv1IHJ",symbolTitle:"symbolTitle-uhHv1IHJ",invalid:"invalid-uhHv1IHJ",noDescription:"noDescription-uhHv1IHJ",highlightedText:"highlightedText-uhHv1IHJ",icon:"icon-uhHv1IHJ",narrow:"narrow-uhHv1IHJ",dataMode:"dataMode-uhHv1IHJ",actionsCell:"actionsCell-uhHv1IHJ",action:"action-uhHv1IHJ",targetAction:"targetAction-uhHv1IHJ",removeAction:"removeAction-uhHv1IHJ",addAction:"addAction-uhHv1IHJ",
markedFlagWrap:"markedFlagWrap-uhHv1IHJ",markedFlagMobile:"markedFlagMobile-uhHv1IHJ",logo:"logo-uhHv1IHJ",isExpandable:"isExpandable-uhHv1IHJ"}},42608:e=>{e.exports={wrap:"wrap-nJ9riypy",libAllSelected:"libAllSelected-nJ9riypy",container:"container-nJ9riypy",iconWrap:"iconWrap-nJ9riypy",icon:"icon-nJ9riypy",title:"title-nJ9riypy",highlighted:"highlighted-nJ9riypy",description:"description-nJ9riypy",mobile:"mobile-nJ9riypy",allSelected:"allSelected-nJ9riypy",desktop:"desktop-nJ9riypy",allSelectedIcon:"allSelectedIcon-nJ9riypy",selected:"selected-nJ9riypy",titleWithoutDesc:"titleWithoutDesc-nJ9riypy",textBlock:"textBlock-nJ9riypy",bordered:"bordered-nJ9riypy"}},90819:e=>{e.exports={container:"container-ZOfHxh0z",contentList:"contentList-ZOfHxh0z",contentListDesktop:"contentListDesktop-ZOfHxh0z",searchSourceItemsContainer:"searchSourceItemsContainer-ZOfHxh0z",searchSourceItemsContainerDesktop:"searchSourceItemsContainerDesktop-ZOfHxh0z",groupTitleDesktop:"groupTitleDesktop-ZOfHxh0z",emptyText:"emptyText-ZOfHxh0z",noResultsDesktop:"noResultsDesktop-ZOfHxh0z"}},77338:e=>{e.exports={wrap:"wrap-LlwUhJDs",item:"item-LlwUhJDs",small:"small-LlwUhJDs",text:"text-LlwUhJDs",exchange:"exchange-LlwUhJDs"}},74915:e=>{e.exports={wrap:"wrap-SLQfcZ66",watchlist:"watchlist-SLQfcZ66",noFeed:"noFeed-SLQfcZ66",scrollContainer:"scrollContainer-SLQfcZ66",listContainer:"listContainer-SLQfcZ66",multiLineItemsContainer:"multiLineItemsContainer-SLQfcZ66"}},98749:e=>{e.exports={button:"button-v1WheJQo",desktop:"desktop-v1WheJQo"}},92540:e=>{e.exports={search:"search-RSKUFnp7",upperCase:"upperCase-RSKUFnp7",symbolType:"symbolType-RSKUFnp7",spinnerWrap:"spinnerWrap-RSKUFnp7",emptyText:"emptyText-RSKUFnp7",noResultsDesktop:"noResultsDesktop-RSKUFnp7",brokerCheckboxWrap:"brokerCheckboxWrap-RSKUFnp7"}},53474:e=>{e.exports={flagWrap:"flagWrap-7I0uFLqE",icon:"icon-7I0uFLqE",caret:"caret-7I0uFLqE",title:"title-7I0uFLqE"}},6215:e=>{e.exports={dialog:"dialog-JcokGZNe",tabletDialog:"tabletDialog-JcokGZNe",desktopDialog:"desktopDialog-JcokGZNe"}},70516:e=>{e.exports={childrenWrapper:"childrenWrapper-HNZPlz4e",container:"container-HNZPlz4e"}},99167:e=>{e.exports={bubbles:"bubbles-bgopH9MJ",multiLine:"multiLine-bgopH9MJ",bubble:"bubble-bgopH9MJ"}},74765:e=>{e.exports={bubble:"bubble-vcCjkHCG",animated:"animated-vcCjkHCG",content:"content-vcCjkHCG","appearance-default":"appearance-default-vcCjkHCG",active:"active-vcCjkHCG",red:"red-vcCjkHCG",blue:"blue-vcCjkHCG",green:"green-vcCjkHCG",orange:"orange-vcCjkHCG",purple:"purple-vcCjkHCG",cyan:"cyan-vcCjkHCG",pink:"pink-vcCjkHCG","appearance-text":"appearance-text-vcCjkHCG","fontSize-s":"fontSize-s-vcCjkHCG","fontSize-m":"fontSize-m-vcCjkHCG","size-m":"size-m-vcCjkHCG","size-l":"size-l-vcCjkHCG"}},81524:e=>{e.exports={highlighted:"highlighted-YWUtZHTy"}},91626:e=>{e.exports={separator:"separator-jtAq6E4V"}},40367:e=>{e.exports={icon:"icon-AL2odtws",dropped:"dropped-AL2odtws"}},9745:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>o});var r=n(59496);const o=r.forwardRef((e,t)=>{const{icon:n="",...o}=e
;return r.createElement("span",{...o,ref:t,dangerouslySetInnerHTML:{__html:n}})})},90186:(e,t,n)=>{"use strict";function r(e){return s(e,a)}function o(e){return s(e,i)}function s(e,t){const n=Object.entries(e).filter(t),r={};for(const[e,t]of n)r[e]=t;return r}function a(e){const[t,n]=e;return 0===t.indexOf("data-")&&"string"==typeof n}function i(e){return 0===e[0].indexOf("aria-")}n.d(t,{filterDataProps:()=>r,filterAriaProps:()=>o,filterProps:()=>s,isDataAttribute:()=>a,isAriaAttribute:()=>i})},4825:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_TOOL_WIDGET_BUTTON_THEME:()=>l,ToolWidgetButton:()=>c});var r=n(59496),o=n(97754),s=n(9745),a=n(37669),i=n(55576);const l=i,c=r.forwardRef((e,t)=>{const{icon:n,isActive:l,isOpened:c,isDisabled:u,isGrouped:d,isHovered:h,onClick:p,text:m,textBeforeIcon:v,title:f,theme:g=i,className:y,forceInteractive:b,"data-name":S,...x}=e,C=o(y,g.button,f&&"apply-common-tooltip",{[g.isActive]:l,[g.isOpened]:c,[g.isInteractive]:(b||Boolean(p))&&!u,[g.isDisabled]:u,[g.isGrouped]:d,[g.hover]:h,[g.newStyles]:a.hasNewHeaderToolbarStyles}),w=n&&("string"==typeof n?r.createElement(s.Icon,{className:g.icon,icon:n}):r.cloneElement(n,{className:o(g.icon,n.props.className)}));return r.createElement("div",{...x,ref:t,"data-role":"button",className:C,onClick:u?void 0:p,title:f,"data-name":S},v&&m&&r.createElement("div",{className:o("js-button-text",g.text)},m),w,!v&&m&&r.createElement("div",{className:o("js-button-text",g.text)},m))})},37669:(e,t,n)=>{"use strict";n.d(t,{hasNewHeaderToolbarStyles:()=>r});n(67337);const r=!1},47670:(e,t,n)=>{"use strict";n.d(t,{marketType:()=>l});var r=n(28353);n(94419);const o=new Map,s={context:"market_type"},a={cfd:(0,r.t)("cfd",s),bitcoin:(0,r.t)("crypto",s),crypto:(0,r.t)("crypto",s),dr:(0,r.t)("dr",s),forex:(0,r.t)("forex",s),futures:(0,r.t)("futures",s),index:(0,r.t)("index",s),stock:(0,r.t)("stock",s),economic:(0,r.t)("economy",s)},i=new Set(["cfd","spreadbet","defi"]);function l(e,t=[]){const n=t.filter(e=>i.has(e)),l=`${e}_${n.sort().join("_")}`,c=o.get(l);if(void 0!==c)return c;const u=Boolean(t.length)?(0,r.t)(e,s)+" "+n.join(" "):a[e]||e;return o.set(l,u),u}},39640:(e,t,n)=>{"use strict";function r(e,t,n,r,o){function s(o){if(e>o.timeStamp)return;const s=o.target;void 0!==n&&null!==t&&null!==s&&s.ownerDocument===r&&(t.contains(s)||n(o))}return o.click&&r.addEventListener("click",s,!1),o.mouseDown&&r.addEventListener("mousedown",s,!1),o.touchEnd&&r.addEventListener("touchend",s,!1),o.touchStart&&r.addEventListener("touchstart",s,!1),()=>{r.removeEventListener("click",s,!1),r.removeEventListener("mousedown",s,!1),r.removeEventListener("touchend",s,!1),r.removeEventListener("touchstart",s,!1)}}n.d(t,{addOutsideEventListener:()=>r})},68722:(e,t,n)=>{"use strict";n.d(t,{getScrollbarWidth:()=>r,matchMediaMinMax:()=>o,setStyle:()=>s,getCSSProperty:()=>a,getCSSPropertyNumericValue:()=>i});const r=(()=>{let e;return()=>{var t;if(void 0===e){const n=document.createElement("div"),r=n.style;r.visibility="hidden",r.width="100px",r.msOverflowStyle="scrollbar",
document.body.appendChild(n);const o=n.offsetWidth;n.style.overflow="scroll";const s=document.createElement("div");s.style.width="100%",n.appendChild(s);const a=s.offsetWidth;null===(t=n.parentNode)||void 0===t||t.removeChild(n),e=o-a}return e}})();function o(e,t){return t===1/0?window.matchMedia(`(min-width: ${e}px)`):window.matchMedia(`(min-width: ${e}px) and (max-width: ${t}px)`)}function s(e,t,n){null!==e&&e.style.setProperty(t,n)}function a(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function i(e,t){return parseInt(a(e,t))}},43989:(e,t,n)=>{"use strict";n.d(t,{setFixedBodyState:()=>a});var r=n(68722);let o=0,s=!1;function a(e){const{body:t}=document,n=t.querySelector(".widgetbar-wrap");if(e&&1==++o){const e=(0,r.getCSSProperty)(t,"overflow"),o=(0,r.getCSSPropertyNumericValue)(t,"padding-right");"hidden"!==e.toLowerCase()&&t.scrollHeight>t.offsetHeight&&((0,r.setStyle)(n,"right",(0,r.getScrollbarWidth)()+"px"),t.style.paddingRight=o+(0,r.getScrollbarWidth)()+"px",s=!0),t.classList.add("i-no-scroll")}else if(!e&&o>0&&0==--o&&(t.classList.remove("i-no-scroll"),s)){(0,r.setStyle)(n,"right","0px");let e=0;0,t.scrollHeight<=t.clientHeight&&(e-=(0,r.getScrollbarWidth)()),t.style.paddingRight=(e<0?0:e)+"px",s=!1}}},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"]}},85457:(e,t,n)=>{"use strict";n.d(t,{AdaptivePopupDialog:()=>k});var r=n(59496),o=n(88537);var s=n(97754),a=n.n(s),i=n(68335),l=n(35749),c=n(81e3),u=n(1109),d=n(24437),h=n(90692),p=n(95711),m=n(52092),v=n(76422),f=n(9745);const g=r.createContext({setHideClose:()=>{}});var y=n(37257),b=n(91441);function S(e){const{title:t,subtitle:n,showCloseIcon:o=!0,onClose:s,renderBefore:i,renderAfter:l,draggable:c,className:u,unsetAlign:d}=e,[h,p]=(0,r.useState)(!1);return r.createElement(g.Provider,{value:{setHideClose:p}},r.createElement("div",{className:a()(b.container,u,(n||d)&&b.unsetAlign)},i,r.createElement("div",{"data-dragg-area":c,className:b.title},r.createElement("div",{className:b.ellipsis},t),n&&r.createElement("div",{className:a()(b.ellipsis,b.subtitle)},n)),l,o&&!h&&r.createElement(f.Icon,{className:b.close,icon:y,onClick:s,"data-name":"close","data-role":"button"})))}var x=n(67179);const C={vertical:20},w={vertical:0};class k extends r.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,
i.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return void this._handleClose();const{activeElement:n}=document,r=(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 r.focus();if(r.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;v.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;v.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:s,dataName:i,onClickOutside:l,additionalElementPos:m,additionalHeaderElement:v,backdrop:f,shouldForceFocus:g=!0,showSeparator:y,subtitle:b,draggable:k=!0,fullScreen:E=!1,showCloseIcon:I=!0,rounded:_=!0,isAnimationEnabled:N,growPoint:H,dialogTooltip:D,unsetHeaderAlign:M,onDragStart:T,dataDialogName:L}=this.props,A="after"!==m?v:void 0,F="after"===m?v:void 0,O="string"==typeof s?s:L||"";return r.createElement(h.MatchMedia,{rule:d.DialogBreakpoints.SmallHeight},m=>r.createElement(h.MatchMedia,{rule:d.DialogBreakpoints.TabletSmall},d=>r.createElement(c.PopupDialog,{rounded:!(d||E)&&_,className:a()(x.dialog,e),isOpened:o,reference:this._handleReference,onKeyDown:this._handleKeyDown,onClickOutside:l,onClickBackdrop:l,fullscreen:d||E,guard:m?w:C,boundByScreen:d||E,shouldForceFocus:g,backdrop:f,draggable:k,isAnimationEnabled:N,growPoint:H,name:this.props.dataName,dialogTooltip:D,onDragStart:T},r.createElement("div",{className:a()(x.wrapper,t),"data-name":i,"data-dialog-name":O},void 0!==s&&r.createElement(S,{draggable:k&&!(d||E),onClose:this._handleClose,renderAfter:F,renderBefore:A,subtitle:b,title:s,showCloseIcon:I,className:n,unsetAlign:M}),y&&r.createElement(u.Separator,{className:x.separator}),r.createElement(p.PopupContext.Consumer,null,e=>this._renderChildren(e,d||E))))))}}},69654:(e,t,n)=>{"use strict";n.d(t,{DialogSearch:()=>u});var r=n(59496),o=n(97754),s=n.n(o),a=n(28353),i=n(9745),l=n(5639),c=n(28712);function u(e){const{children:t,renderInput:n,onCancel:o,...u}=e
;return r.createElement("div",{className:c.container},r.createElement("div",{className:s()(c.inputContainer,o&&c.withCancel)},n||r.createElement(d,{...u})),t,r.createElement(i.Icon,{className:c.icon,icon:l}),o&&r.createElement("div",{className:c.cancel,onClick:o},(0,a.t)("Cancel")))}function d(e){const{className:t,reference:n,value:o,onChange:a,onFocus:i,onBlur:l,onKeyDown:u,onSelect:d,placeholder:h,...p}=e;return r.createElement("input",{...p,ref:n,type:"text",className:s()(t,c.input),autoComplete:"off","data-role":"search",placeholder:h,value:o,onChange:a,onFocus:i,onBlur:l,onSelect:d,onKeyDown:u})}},5648:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchDialogContentItem:()=>g});var r=n(59496),o=n(97754),s=n.n(o),a=n(88537),i=n(9745),l=(n(67337),n(24637)),c=n(19785),u=n(84524),d=n(24633),h=n(77975),p=n(45345),m=n(32563),v=n(88142),f=n(82132);function g(e){const{dangerousTitleHTML:t,title:n,dangerousDescriptionHTML:o,description:g,searchToken:y,exchangeName:b,marketType:S,onClick:x,isSelected:C,isEod:w=!1,isActive:k=!1,isOffset:E=!1,invalid:I=!1,isHighlighted:_=!1,hideExchange:N=!1,hideMarkedListFlag:H=!1,onExpandClick:D,isExpanded:M,hoverComponent:T,country:L,providerId:A,source:F,type:O,flag:R,itemRef:B,onMouseOut:P,onMouseOver:W,className:J,actions:z,reference:V,fullSymbolName:q,logoId:U,currencyLogoId:Z,baseCurrencyLogoId:G,shortName:j,hideLogo:K=!1}=e,{isSmallWidth:Q,isMobile:$}=(0,a.ensureNotNull)((0,r.useContext)(u.SymbolSearchItemsDialogContext)),Y=Boolean(T),X=!I&&!N&&($||!Y),ee=(0,h.useWatchedValueReadonly)({watchedValue:p.watchedTheme})===d.StdTheme.Dark?f.dark:f.light,te=T;return r.createElement("div",{className:s()(f.itemRow,Q&&f.multiLine,_&&f.highlighted,_&&ee,C&&f.selected,k&&f.active,I&&f.invalid,!$&&m.mobiletouch&&Y&&f.hover,J),onClick:function(e,t){if(!e||t.defaultPrevented)return;t.preventDefault(),e(t)}.bind(null,x),"data-role":e["data-role"]||"list-item","data-active":k,"data-name":"symbol-search-dialog-content-item",onMouseOut:P,onMouseOver:W,ref:V},r.createElement("div",{ref:B,className:s()(f.itemInfoCell,f.cell,E&&f.offset)},r.createElement("div",{className:s()(f.actionHandleWrap,f.fixedWidth)},r.createElement(r.Fragment,null,!1,D&&r.createElement("div",{onClick:function(e){if(!D||e.defaultPrevented)return;e.preventDefault(),D(e)}},r.createElement(i.Icon,{className:s()(f.expandHandle,M&&f.expanded,C&&f.selected),icon:v})),!1)),r.createElement("div",{className:s()(f.description,!1)},n&&r.createElement("div",{className:s()(f.symbolTitle,k&&f.active,I&&f.invalid,!Boolean(o)&&f.noDescription),"data-name":"list-item-title"},"string"==typeof n&&y?r.createElement(l.HighlightedText,{className:f.highlightedText,text:n,queryString:y,rules:(0,c.createRegExpList)(y)}):n,w&&r.createElement("span",{className:f.dataMode},"E")),!n&&t&&r.createElement("div",{className:s()(f.symbolTitle,k&&f.active,I&&f.invalid),"data-name":"list-item-title"},r.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),w&&r.createElement("span",{className:f.dataMode},"E")),Q&&ne())),!Q&&r.createElement("div",{
className:s()(f.cell,f.descriptionCell,Boolean(te)&&f.addition)},ne(),te?r.createElement(te,{...e,className:f.actions,onMouseOver:void 0,onMouseOut:void 0}):null),Q&&te?r.createElement(te,{...e,className:f.cell,onMouseOver:void 0,onMouseOut:void 0}):null,X&&r.createElement("div",{className:s()(f.exchangeCell,f.cell)},r.createElement("div",{className:s()(f.exchangeDescription)},r.createElement("div",{className:s()(f.marketType,k&&f.active)},S),"economic"===O&&F?r.createElement("div",{className:s()(f.exchangeName,k&&f.active,"apply-common-tooltip",f.narrow),title:F},F):r.createElement("div",{className:s()(f.exchangeName,k&&f.active)},b)),!1),r.createElement("div",{className:s()(f.cell,Boolean(z)&&f.actionsCell)},z));function ne(){if(I)return null;const e=s()(f.symbolDescription,k&&f.active,!m.mobiletouch&&"apply-overflow-tooltip apply-overflow-tooltip--allow-text");return g?r.createElement("div",{className:e},y?r.createElement(l.HighlightedText,{className:f.highlightedText,text:g,queryString:y,rules:(0,c.createRegExpList)(y)}):g):o?r.createElement("div",{className:e,dangerouslySetInnerHTML:{__html:o}}):null}}},58442:(e,t,n)=>{"use strict";n.d(t,{qualifyProName:()=>a,QualifiedSources:()=>r});var r,o=n(88537),s=n(67337);n(81319);function a(e){return e}!function(e){function t(e){return e.pro_name}function n(e){{const t=s.enabled("pay_attention_to_ticker_not_symbol")?e.ticker:e.full_name;return(0,o.ensureDefined)(t)}}e.fromQuotesSnapshot=function(e){return"error"===e.status?e.symbolname:e.values.pro_name},e.fromQuotesResponse=function(e){const{values:n,symbolname:r,status:o}=e;return"error"===o&&r?r:t(n)},e.fromQuotes=t,e.fromSymbolSearchResult=function(e,t){{const{ticker:n,full_name:r}=null!=t?t:e;return s.enabled("pay_attention_to_ticker_not_symbol")?(0,o.ensureDefined)(null!=n?n:r):(0,o.ensureDefined)(r)}},e.fromSymbolInfo=n,e.fromSymbolMessage=function(e,t){return"symbol_resolved"===t.method?n(t.params[1]):e}}(r||(r={}))},24389:(e,t,n)=>{"use strict";n.d(t,{QuoteSessionContext:()=>r});const r=n(59496).createContext(null)},20882:(e,t,n)=>{"use strict";function r(e){return""===e.value()}function o(e,t){return e.filter(e=>e.includes(t))}function s(e){const t=new Map;return e.forEach(e=>{t.has(e.group())?t.get(e.group()).push(e):t.set(e.group(),[e])}),t}function a(e,t){return t.map(t=>new e(t))}n.d(t,{isAllSearchSourcesSelected:()=>r,filterSearchSources:()=>o,splitSearchSourcesByGroup:()=>s,createSearchSources:()=>a})},1861:(e,t,n)=>{"use strict";n.d(t,{showSymbolSearchItemsDialog:()=>c});var r=n(59496),o=n(87995),s=n(50655),a=n(24389),i=n(51826),l=n(12045);function c(e){const{initialMode:t="symbolSearch",autofocus:n=!0,defaultValue:c,showSpreadActions:u,selectSearchOnInit:d,onSearchComplete:h,onSearchFeedReady:p,dialogTitle:m,placeholder:v,fullscreen:f,initialScreen:g,wrapper:y,dialog:b,contentItem:S,onClose:x,footer:C,symbolTypes:w,searchInput:k,emptyState:E,hideMarkedListFlag:I,dialogWidth:_="auto",manager:N}=e
;if(i.dialogsOpenerManager.isOpened("SymbolSearch")||i.dialogsOpenerManager.isOpened("ChangeIntervalDialog"))return;const H=document.createElement("div"),D=r.createElement(s.SlotContext.Provider,{value:null!=N?N:null},r.createElement(a.QuoteSessionContext.Provider,{value:null},r.createElement(l.SymbolSearchItemsDialog,{onClose:M,initialMode:t,defaultValue:c,showSpreadActions:u,hideMarkedListFlag:I,onSearchFeedReady:p,selectSearchOnInit:d,onSearchComplete:h,dialogTitle:m,placeholder:v,fullscreen:f,initialScreen:g,wrapper:y,dialog:b,contentItem:S,footer:C,symbolTypes:w,searchInput:k,emptyState:E,autofocus:n,dialogWidth:_})));function M(){o.unmountComponentAtNode(H),i.dialogsOpenerManager.setAsClosed("SymbolSearch"),x&&x()}return o.render(D,H),i.dialogsOpenerManager.setAsOpened("SymbolSearch"),{close:M}}},70613:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchDialogBodyContext:()=>r});const r=n(59496).createContext(null)},84524:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchItemsDialogContext:()=>r});const r=n(59496).createContext(null)},12045:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchItemsDialog:()=>Pe});var r=n(59496),o=n(97754),s=n.n(o),a=n(28353),i=n(7785),l=n(15983),c=n(84877),u=n(67337),d=n(24437),h=n(85457),p=n(9745),m=n(84524),v=n(69654),f=n(20882),g=n(70516);function y(e){const{children:t,className:n}=e;return r.createElement("div",{className:s()(g.container,n)},r.createElement("div",{className:g.childrenWrapper},t))}var b=n(88537),S=n(78036),x=n(24637),C=n(19785),w=n(29601),k=n(42608);function E(e){const{searchSource:t,onClick:n,queryString:o}=e,{selectedSearchSource:a,isAllSearchSourcesSelected:i,isMobile:l}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),c=(0,b.ensureNotNull)(a).value(),u=i(t),d=t.value()===c,h=(0,r.useMemo)(()=>(0,C.createRegExpList)(o),[o]),v=t.description(),f=v&&!u,g=s()(k.container,l?k.mobile:k.desktop,d&&k.selected,u&&k.allSelected,u&&k.libAllSelected,!u&&l&&k.bordered);return r.createElement("div",{className:s()(!l&&k.wrap,u&&k.libAllSelected),onClick:n},r.createElement("div",{className:g},r.createElement("div",{className:k.iconWrap},!!u&&r.createElement(p.Icon,{className:s()(k.icon,k.allSelectedIcon),icon:w})),r.createElement("div",{className:k.textBlock},r.createElement("div",{className:s()(k.title,!f&&!l&&k.titleWithoutDesc)},r.createElement(x.HighlightedText,{className:s()(d&&k.highlighted),queryString:o,text:t.name(),rules:h})),f&&r.createElement("div",{className:s()(k.description,"apply-overflow-tooltip")},r.createElement(x.HighlightedText,{className:k.highlighted,queryString:o,rules:h,text:v})))))}var I=n(77975),_=n(45345),N=n(26843),H=n(70613),D=n(70029),M=n(72802),T=n(90819);const L={emptyTextClassName:T.emptyText};function A(e){const{searchSources:t}=e,{setSelectedSearchSource:n,setMode:o,isMobile:i,emptyState:l,autofocus:c}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),u=(0,I.useWatchedValueReadonly)({watchedValue:_.watchedTheme})===N.StdTheme.Dark?D:M,[d,h]=(0,r.useState)(""),g=(0,r.useMemo)(()=>[{group:null,sources:(0,f.filterSearchSources)(t,d)}],[t,d]),b=(0,
r.useRef)(null),x=(0,r.useRef)(null);(0,r.useLayoutEffect)(()=>{var e;c&&(null===(e=null==b?void 0:b.current)||void 0===e||e.focus())},[]);const C=l?r.createElement(l,null):r.createElement(y,{className:T.noResultsDesktop},r.createElement(p.Icon,{icon:u}),r.createElement("div",{className:T.emptyText},(0,a.t)("No exchanges match your criteria"))),w=!(g.length&&g.every(e=>0===e.sources.length));return r.createElement(H.SymbolSearchDialogBodyContext.Provider,{value:L},r.createElement(v.DialogSearch,{placeholder:(0,a.t)("Search"),onChange:function(e){h(e.target.value),x&&x.current&&(x.current.scrollTop=0)},reference:b}),w?r.createElement("div",{ref:x,className:s()(T.contentList,!i&&T.contentListDesktop),onTouchStart:function(){var e;null===(e=b.current)||void 0===e||e.blur()}},g.map(e=>{const{group:t,sources:n}=e;return 0===n.length?r.createElement(r.Fragment,{key:t}):r.createElement(r.Fragment,{key:t},!1,r.createElement("div",{className:s()(T.searchSourceItemsContainer,!i&&T.searchSourceItemsContainerDesktop)},n.map(e=>r.createElement(E,{key:e.value(),searchSource:e,queryString:d,onClick:k.bind(null,e)}))))})):C);function k(e){n(e),o("symbolSearch")}}var F=n(87995),O=n(8128);n(76861),n(85198);function R(e){return e.hasOwnProperty("exchange")}async function B(e){return new Promise(t=>{window.ChartApiInstance.searchSymbols(e.text||"",e.exchange||"",e.type||"","",!1,!0,"",!0,"",e=>{t(e)})})}var P=n(81319),W=n(78136),J=n(51768),z=n(68335),V=n(4825),q=n(20832),U=n(21740),Z=n(38927),G=n(43088),j=n(56584),K=n(19586),Q=n(74246);function $(e){var t;const{state:n,update:o}=e,{searchRef:s,forceUpdate:a,upperCaseEnabled:c}=(0,b.ensureNotNull)((0,r.useContext)(m.SymbolSearchItemsDialogContext)),d=(0,i.tokenize)(null===(t=s.current)||void 0===t?void 0:t.value),h=(0,l.validate)(d);let p=[{icon:q,insert:"/",type:"binaryOp",name:"division"},{icon:U,insert:"-",type:"binaryOp",name:"subtraction"},{icon:Z,insert:"+",type:"binaryOp",name:"addition"},{icon:G,insert:"*",type:"binaryOp",name:"multiplication"}];return u.enabled("hide_exponentiation_spread_operator")||(p=p.concat([{icon:j,insert:"^",type:"binaryOp",name:"exponentiation"}])),u.enabled("hide_reciprocal_spread_operator")||(p=p.concat([{icon:K,type:"complete",name:"1/x",callback:()=>{!s.current||h.errors.length||h.warnings.length||(s.current.value=(0,l.stringifyTokens)((0,l.flip)(d)),a())}}])),r.createElement("div",{className:Q.actions},p.map(e=>r.createElement(V.ToolWidgetButton,{className:Q.actionButton,icon:e.icon,key:e.name,isDisabled:Y(e,h),onClick:()=>function(e){var t;if(!Y(e,h)){if(e.insert&&s.current){const t=s.current.value+e.insert;s.current.value=t,s.current.setSelectionRange(t.length,t.length);const[r,,i]=(0,l.getCurrentTokenParamsFromInput)(s.current,c);n.current&&(n.current.selectedIndexValue=-1,n.current.searchSpreadsValue=(0,l.isSpread)(i),n.current.searchTokenValue=r),a(),o()}e.callback&&e.callback(),null===(t=s.current)||void 0===t||t.focus(),(0,J.trackEvent)("GUI","SS",e.name)}}(e)})))}function Y(e,t){let n=!1;if(!t.errors.length)switch(e.type){case"binaryOp":
n="var"===t.currentState;break;case"openBrace":n="var"!==t.currentState;break;case"closeBrace":n="var"===t.currentState&&t.braceBalance>0;break;case"complete":n=!t.errors.length&&!t.warnings.length}return!n}var X=n(90186),ee=n(74765);function te(e){const{title:t,isActive:n,isAnimated:r,activeColor:o,size:a="m",appearance:i="default",fontSize:l="m",className:c}=e;return s()(ee.bubble,n&&ee.active,o&&ee[o],t&&"apply-common-tooltip",a&&ee["size-"+a],l&&ee["fontSize-"+l],i&&ee["appearance-"+i],r&&ee.animated,c)}function ne(e){const{id:t,title:n,tabIndex:o,role:a,contentClassName:i,children:l,onClick:c,onMouseDown:u,reference:d,...h}=e;return r.createElement("span",{...(0,X.filterAriaProps)(h),...(0,X.filterDataProps)(h),id:t,title:n,tabIndex:o,role:a,className:te(e),onClick:c,onMouseDown:u,ref:d},r.createElement("span",{className:s()(ee.content,i)},l))}var re=n(99167);function oe(e){const{className:t,itemClassName:n,itemContentClassName:s,items:a,getItemTitle:i,getItemTooltip:l,getItemKey:c,checkItemIsActive:u,getItemColor:d,onBubbleClick:h,multiline:p,children:m,BubbleComponent:v=ne,reference:f,fontSize:g}=e;return r.createElement("div",{className:o(t,re.bubbles,p&&re.multiLine),ref:f},a.map((e,t)=>r.createElement(v,{key:c?c(e):t,id:c?c(e):t.toString(),className:o(re.bubble,n),contentClassName:s,onClick:function(){h(e)},onMouseDown:function(e){e.preventDefault()},isActive:!!u&&u(e),activeColor:d?d(e):void 0,fontSize:g,title:l?l(e):void 0},i(e))),m)}var se=n(61074),ae=n(69397),ie=n(9837),le=n.n(ie),ce=n(10381),ue=n(53474);function de(e){const{mode:t,setMode:n,searchRef:o,cachedInputValue:i,selectedSearchSource:l,isAllSearchSourcesSelected:c,upperCaseEnabled:u}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),d=(0,b.ensureNotNull)(l),h="symbolSearch"===t,v=c(d);return h?r.createElement("div",{className:s()(ue.flagWrap,"apply-common-tooltip"),title:(0,a.t)("Select source"),onClick:function(){o.current&&(i.current=u?o.current.value.toUpperCase():o.current.value);n("exchange")}},!!v&&r.createElement(p.Icon,{className:ue.icon,icon:w}),r.createElement("div",{className:ue.title},d.name()),r.createElement(ce.ToolWidgetCaret,{className:ue.caret,dropped:!1})):null}var he=n(77338);function pe(e){const{isSmallWidth:t,selectedSearchSource:n,searchSources:o}=(0,b.ensureNotNull)((0,r.useContext)(m.SymbolSearchItemsDialogContext)),i=n&&o.length>1&&!(0,P.exchangeSelectDisabled)();return r.createElement("div",{className:s()(he.wrap,t&&he.small)},r.createElement("div",{className:he.item},r.createElement("div",{className:he.text},t?(0,a.t)("Symbol & description"):(0,a.t)("Symbol"))),r.createElement("div",{className:he.item},!t&&r.createElement("div",{className:he.text},(0,a.t)("Description")),i&&r.createElement("div",{className:he.exchange},r.createElement(de,null))))}var me=n(62820),ve=n(74915);function fe(e){const{onTouchMove:t,listRef:n,className:o,listWrapRef:a,virtualListKey:i,items:l,getItemSize:c,hideFeed:u}=e,{mode:d,isSmallWidth:h,handleListWidth:p}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),[v,f]=(0,
r.useState)(null),g=(0,r.useCallback)(e=>{const{index:t,style:n}=e;return r.createElement("div",{style:n},l[t])},[l]),y=(0,r.useCallback)(e=>(0,b.ensure)(l[e].key),[l]),x="watchlist"===d&&null!==v;return r.createElement(le(),{onMeasure:function(e){f(e.height),p(e.width)}},r.createElement("div",{ref:a,className:s()(ve.wrap,x&&ve.watchlist,u&&ve.noFeed,o),onTouchMove:t},r.createElement("div",{className:s()(ve.scrollContainer,u&&ve.noFeed)},x?r.createElement(ae.VariableSizeList,{key:i,ref:n,className:ve.listContainer,width:"100%",height:(0,b.ensureNotNull)(v),itemCount:l.length,itemSize:c,children:g,itemKey:y,overscanCount:20,direction:(0,me.isRtl)()?"rtl":"ltr"}):r.createElement("div",{className:s()(ve.listContainer,h&&ve.multiLineItemsContainer)},r.createElement(pe,null),...l))))}var ge=n(5648),ye=n(92540);const be=u.enabled("hide_image_invalid_symbol");function Se(e){const{token:t,state:n,otherSymbolsCount:o,onChangeSymbolTypeFilter:s,onResetFilters:a,onListTouchMove:i,brokerTitle:l,isBrokerChecked:c,onBrokerCheckboxChange:u,listRef:d,listWrapRef:h}=e,{mode:p,isMobile:v,selectedSymbolType:f,symbolTypes:g,feedItems:y,contentItem:b,emptyState:x=xe}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),C=l&&r.createElement(BrokerCheckbox,{brokerTitle:l,checked:c,onCheckboxChange:u}),w="symbolSearch"===p&&"good"===n,k=null!=b?b:ge.SymbolSearchDialogContentItem,E=(0,r.useMemo)(()=>y.map(e=>r.createElement(k,{...e,searchToken:t})),[y]);return r.createElement(r.Fragment,null,"symbolSearch"===p&&r.createElement(r.Fragment,null,g.length>0&&r.createElement(oe,{itemClassName:ye.symbolType,items:g,getItemTitle:e=>e.name,getItemKey:e=>e.value,checkItemIsActive:e=>e.value===f,onBubbleClick:s,multiline:!v},!v&&C),v&&g.length>0&&l&&r.createElement("div",{className:ye.brokerCheckboxWrap},C)),r.createElement(fe,{listRef:d,listWrapRef:h,onTouchMove:i,items:E,getItemSize:()=>we,hideFeed:!w}),"loading"===n&&r.createElement("div",{className:ye.spinnerWrap},r.createElement(se.Spinner,null)),"symbolSearch"===p&&r.createElement(r.Fragment,null,!1,"empty"===n&&r.createElement(x,null)))}function xe(e){const t=(0,I.useWatchedValueReadonly)({watchedValue:_.watchedTheme})===N.StdTheme.Dark?D:M;return r.createElement(y,{className:ye.noResultsDesktop},!be&&r.createElement(p.Icon,{icon:t}),r.createElement("div",{className:ye.emptyText},(0,a.t)("No symbols match your criteria")))}const Ce=(0,P.getDefaultSearchSource)(),we=52;function ke(e){const{mode:t,setMode:n,setSelectedIndex:o,isMobile:i,selectedSearchSource:c,setSelectedSearchSource:d,isAllSearchSourcesSelected:h,selectedSymbolType:p,setSelectedSymbolType:f,setRenderSymbolSearchList:g,searchRef:y,cachedInputValue:b,setSearchSpreads:x,showSpreadActions:C,selectedItem:w,onSearchFeedReady:k,forceUpdate:E,placeholder:I,initialScreen:_,footer:N,searchInput:D,upperCaseEnabled:M,externalInput:T,handleKeyDown:L,customSearchSymbols:A}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),V=(0,r.useRef)(t);V.current=t;const q=(0,r.useRef)(new AbortController),[U,Z]=(0,r.useState)(0),[G,j]=(0,
r.useState)("noop"),K=(0,r.useRef)(0),[Q,Y]=(0,r.useState)(b.current),X=(0,r.useRef)(null),ee=(0,r.useRef)(null),te=(0,r.useRef)({selectedIndexValue:-1,searchTokenValue:"",searchSpreadsValue:!0}),ne=(0,r.useRef)(null),re=(0,r.useRef)(null),{broker:oe=null,brokerId:se,brokerTitle:ae,isBrokerChecked:ie=!1,setIsBrokerChecked:le=(()=>{}),unhideSymbolSearchGroups:ce=""}={brokerId:void 0,brokerTitle:void 0};(0,r.useEffect)(()=>()=>{q.current.abort(),Ie()},[]),(0,r.useEffect)(()=>{(null==y?void 0:y.current)&&Y(y.current.value)},[]),(0,r.useEffect)(()=>{const e=y.current;if(e)return e.addEventListener("input",ge),e.addEventListener("focus",ke),e.addEventListener("select",fe),e.addEventListener("click",fe),e.addEventListener("keyup",Ee),T&&L&&e.addEventListener("keydown",L),()=>{e&&(e.removeEventListener("input",ge),e.removeEventListener("focus",ke),e.removeEventListener("select",fe),e.removeEventListener("click",fe),e.removeEventListener("keyup",Ee),T&&L&&e.removeEventListener("keydown",L))}},[L]),(0,r.useEffect)(()=>{Boolean(_)&&""===Q.trim()||(xe(Q,p,c),X.current&&(X.current.scrollTop=0))},[Q,p,c,ie,_]),(0,r.useEffect)(()=>{if(!w||!y.current)return;if(!u.enabled("show_spread_operators"))return y.current.value=w.symbol,void E();const e=R(w)?w.exchange:w.parent.exchange,t={name:w.symbol,exchange:e,prefix:w.prefix,fullName:w.full_name},[n,r]=(0,l.getNextSymbolInputValueAndPosition)(y.current,t,M);y.current.value=n,y.current.setSelectionRange(r,r),E()},[w]);const ue=(0,r.useCallback)(e=>k?k(e):e,[k]),de=null!=_?_:"div",he=Boolean(_)&&"symbolSearch"!==t,pe=null!=D?D:v.DialogSearch,me=(0,r.useMemo)(()=>({listRef:ee,resetRecommends:we,updateRecommends:xe,searchToken:Q,emptyTextClassName:ye.emptyText,isBrokerChecked:ie,symbolSearchState:G,currentMode:V}),[ee,Q,ie,G,V]);return r.createElement(H.SymbolSearchDialogBodyContext.Provider,{value:me},!(T&&"symbolSearch"===t)&&r.createElement(pe,{reference:y,className:s()(ye.search,M&&ye.upperCase),placeholder:I||(0,a.t)("Search")},C&&r.createElement($,{state:te,update:be})),he?r.createElement(de,null):r.createElement(Se,{token:Q,state:G,otherSymbolsCount:U,onListTouchMove:function(){var e;null===(e=y.current)||void 0===e||e.blur()},onChangeSymbolTypeFilter:function(e){const{value:t}=e;f(t),o(-1)},onResetFilters:function(){var e;f((0,P.getAllSymbolTypesValue)()),Ce&&d(Ce);le(!1),i||null===(e=y.current)||void 0===e||e.focus()},brokerTitle:ae,isBrokerChecked:ie,onBrokerCheckboxChange:function(e){le("on"!==e)},listRef:ee,listWrapRef:X}),N);function ve(){if(!y.current)return;const[e,t,n]=(0,l.getCurrentTokenParamsFromInput)(y.current,M);K.current=t,te.current={selectedIndexValue:-1,searchSpreadsValue:(0,l.isSpread)(n),searchTokenValue:e},ne.current||(ne.current=setTimeout(be,0))}function fe(){if(!y.current)return;const[,e]=(0,l.getCurrentTokenParamsFromInput)(y.current,M);e!==K.current&&ve()}function ge(){u.enabled("show_spread_operators")?ve():y.current&&(te.current={selectedIndexValue:-1,searchSpreadsValue:!1,searchTokenValue:y.current.value},ne.current||(ne.current=setTimeout(be,0)))}
function be(){const{selectedIndexValue:e,searchTokenValue:t,searchSpreadsValue:n}=te.current;ne.current=null,(0,F.unstable_batchedUpdates)(()=>{x(n),o(e),Y(M?t.toUpperCase():t)})}async function xe(e,t,n){try{"noop"===G?j("loading"):(Ie(),re.current=setTimeout(()=>{j("loading")},500)),_e();const r=await async function(e,t,n,r){var o,s,a,i;const d=u.enabled("show_spread_operators")?(0,l.shortName)(t):null===(o=y.current)||void 0===o?void 0:o.value;let h;if(ie&&oe){const t=await(0,O.respectAbort)(e,oe.accountMetainfo());h=t.prefix}const p=u.enabled("show_spread_operators")?null!==(a=null!==(s=(0,l.getExchange)(t))&&void 0!==s?s:h)&&void 0!==a?a:null==r?void 0:r.getRequestExchangeValue():null==c?void 0:c.getRequestExchangeValue(),m=(0,l.getExchange)(t)||null===(i=r||c)||void 0===i?void 0:i.getRequestCountryValue(),v={serverHighlight:!1,text:d,exchange:p,country:m,type:n,lang:window.language||"",brokerId:se,onlyTradable:Boolean(se)&&ie,unhideSymbolSearchGroups:ce,signal:e},f=(0,W.getSearchRequestDelay)();void 0!==f&&await(0,O.delay)(e,f);return A?A(v):B(v)}(q.current.signal,e,t,n),o=ue(function(e,t=window.ChartApiInstance.symbolsGrouping()){var n;const r={},o=[];for(let s=0;s<e.length;++s){const a=e[s];if(a.prefix||Array.isArray(a.contracts))return e;const i=t[a.type];if(void 0===i){o.push(a);continue}const l=i.exec(a.symbol);if(l){const e=l[1];let t;r.hasOwnProperty(e)?t=r[e]:(t=o.length,r[e]=t,o.push({type:a.type,symbol:e,exchange:a.exchange,description:a.description,full_name:a.exchange+":"+e,contracts:[]})),null===(n=o[t].contracts)||void 0===n||n.push(a)}else o.push(a)}return o}(r));if(!o.length)return Ie(),void j("empty");Ie(),g(o),j("good")}catch(e){(0,O.skipAbortError)(e)}}function we(){_e(),j("empty"),Y(""),x(!1),Ie()}function ke(){"watchlist"===V.current&&(n("symbolSearch"),(0,J.trackEvent)("Watchlist","Mobile SS","Go to SS page"))}function Ee(e){switch((0,z.hashFromEvent)(e)){case 37:case 39:fe()}}function Ie(){re.current&&clearTimeout(re.current)}function _e(){q.current.abort(),q.current=new AbortController}}var Ee=n(64360),Ie=n(98749);function _e(e){const{theme:t=Ie}=e,{setMode:n,isMobile:o}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext);return r.createElement(p.Icon,{className:s()(e.className,t.button,!o&&t.desktop),icon:Ee,onClick:function(){n("symbolSearch")}})}var Ne=n(47670),He=n(58442),De=n(56840);function Me(e){const[t,n]=(0,r.useState)(()=>{const{defaultSearchSource:t,searchSources:n}=e,r=De.getValue("symboledit.exchangefilter","");return n.find(e=>e.value()===r)||t});return[t,(0,r.useCallback)(e=>{var t;n(e),t=e,De.setValue("symboledit.exchangefilter",t.value())},[])]}function Te(e){const[t,n]=(0,r.useState)(()=>{if(1===e.types.length)return e.types[0].value;const t=De.getValue("symboledit.filter",(0,P.getAllSymbolTypesValue)());return e.types.find(e=>e.value===t)?t:(0,P.getAllSymbolTypesValue)()});return[t,(0,r.useCallback)(e=>{var t;n(e),t=e,De.setValue("symboledit.filter",t)},[])]}var Le=n(36947),Ae=n(82708),Fe=n(6215);const Oe=(0,P.getAvailableSearchSources)(),Re=(0,
P.getDefaultSearchSource)(),Be=u.enabled("uppercase_instrument_names");function Pe(e){var t;const{onClose:n,initialMode:o,defaultValue:s="",showSpreadActions:h,hideMarkedListFlag:p,selectSearchOnInit:v=!0,onSearchComplete:g,onSearchFeedReady:y,dialogTitle:b=(0,a.t)("Symbol Search"),placeholder:S,fullscreen:x,initialScreen:C,wrapper:w,dialog:k,contentItem:E,footer:I,searchInput:_,emptyState:N,autofocus:H,dialogWidth:D,onKeyDown:M,searchSourcesScreen:T,customSearchSymbols:L,isDisableFiltering:F}=e,O=(0,r.useMemo)(()=>F?[]:e.symbolTypes?e.symbolTypes:(0,P.getAvailableSymbolTypes)(),[]),W=void 0!==e.input,J=F?[]:Oe,[V,q]=(0,r.useState)(o),U=(0,r.useRef)(s),[Z,G]=Me({searchSources:J,defaultSearchSource:Re}),[j,K]=Te({types:O}),[Q,$]=(0,r.useState)([]),[Y,X]=(0,r.useState)(!1),[ee,te]=(0,r.useState)(-1),ne=(0,r.useRef)(null!==(t=e.input)&&void 0!==t?t:null),[re,oe]=(0,r.useState)(!1),se=(0,Le.useForceUpdate)(),[ae,ie]=(0,r.useState)(new Set),{broker:le=null,brokerId:ce,unhideSymbolSearchGroups:ue="",displayBrokerSymbol:de=!1}={brokerId:void 0};(0,r.useLayoutEffect)(()=>{var e;!(null==ne?void 0:ne.current)||!W&&Boolean(null===(e=ne.current)||void 0===e?void 0:e.value)||(W||"compare"===V||(ne.current.value=U.current),!H||W&&"symbolSearch"!==V||ne.current.focus())},[V]),(0,r.useEffect)(()=>{(null==ne?void 0:ne.current)&&v&&H&&ne.current.select()},[]);const he=(0,r.useMemo)(()=>Q.reduce((e,t)=>{const n=ze(t),r=ae.has(n);return e.push(t),r&&t.contracts&&e.push(...t.contracts.map(e=>({...e,parent:t}))),e},[]),[Q,ae]),pe=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;-1!==ee&&(null===(e=pe.current)||void 0===e||e.scrollIntoView({block:"nearest"}))},[ee,pe]);const me=(0,r.useMemo)(()=>he.map((e,t)=>{var n,r,o,s;if(R(e)){const o=ze(e),s=e.contracts?ae.has(o):void 0,a=t===ee;return{key:t,id:o,title:Je(e,de),description:e.description,isOffset:!1,onClick:xe.bind(null,e),providerId:e.provider_id,source:e.source,country:null===(n=e.country)||void 0===n?void 0:n.toLocaleLowerCase(),type:e.type,exchangeName:e.exchange,marketType:(0,Ne.marketType)(e.type,e.typespecs),isEod:null===(r=e.params)||void 0===r?void 0:r.includes("eod"),isExpanded:s,onExpandClick:e.contracts?Ce.bind(null,o):void 0,fullSymbolName:P.isOpenFirstContractEnabled&&e.contracts?He.QualifiedSources.fromSymbolSearchResult(e,e.contracts[0]):He.QualifiedSources.fromSymbolSearchResult(e),itemRef:a?pe:void 0,isSelected:t===ee,hideMarkedListFlag:p,item:e,logoId:e.logoid,currencyLogoId:e["currency-logoid"],baseCurrencyLogoId:e["base-currency-logoid"],shortName:(0,Ae.safeShortName)(He.QualifiedSources.fromSymbolSearchResult(e)),currencyCode:e.currency_code}}{const{parent:n}=e,r=ze(n),a=t===ee;return{key:t,id:r+e.symbol,dangerousTitleHTML:Je(e,de),dangerousDescriptionHTML:`${n.description} (${e.description})`,isOffset:!0,isEod:null===(o=e.params)||void 0===o?void 0:o.includes("eod"),onClick:we.bind(null,e.parent,e),providerId:n.provider_id,country:null===(s=n.country)||void 0===s?void 0:s.toLowerCase(),type:n.type,exchangeName:n.exchange,marketType:(0,
Ne.marketType)(n.type,e.typespecs),fullSymbolName:He.QualifiedSources.fromSymbolSearchResult(e.parent,e),itemRef:a?pe:void 0,isSelected:a,hideMarkedListFlag:p,item:e}}}),[Q,ae,V,ee,M]),ve=null!=k?k:qe,fe=ve!==qe&&!W,ge=(e,t)=>({mode:V,setMode:q,selectedSearchSource:Z,setSelectedSearchSource:G,isAllSearchSourcesSelected:f.isAllSearchSourcesSelected,selectedSymbolType:j,setSelectedSymbolType:K,selectedIndex:ee,setSelectedIndex:te,onClose:n,setRenderSymbolSearchList:$,searchRef:ne,cachedInputValue:U,searchSpreads:Y,setSearchSpreads:X,handleListWidth:Ee,isSmallWidth:re,feedItems:me,isMobile:e,showSpreadActions:h,selectSearchOnInit:v,isTablet:t,selectedItem:he[ee],onSearchFeedReady:y,forceUpdate:se,placeholder:S,initialScreen:C,toggleExpand:Ce,openedItems:ae,onSubmit:Fe,onSearchComplete:g,footer:I,symbolTypes:O,contentItem:E,searchInput:_,emptyState:N,autofocus:H,upperCaseEnabled:Be,externalInput:W,handleKeyDown:fe?void 0:De,customSearchSymbols:L,searchSources:J}),ye=null!=T?T:A,be="exchange"===V?{title:(0,a.t)("Sources"),dataName:"exchanges-search",render:()=>r.createElement(ye,{searchSources:J}),additionalHeaderElement:r.createElement(_e,null),additionalElementPos:"before"}:{title:b,dataName:"symbol-search-items-dialog",render:()=>r.createElement(ke,null),additionalElementPos:"after"},Se=null!=w?w:"div";return r.createElement(Se,null,r.createElement(c.MatchMediaMap,{rules:d.DialogBreakpoints},({TabletSmall:e,TabletNormal:t})=>r.createElement(m.SymbolSearchItemsDialogContext.Provider,{value:ge(e,t)},r.createElement(ve,{...be,fullScreen:x,onClose:n,onClickOutside:n,onKeyDown:fe?void 0:De,isOpened:!0}))));function xe(e){if(e.contracts)return P.isOpenFirstContractEnabled&&e.contracts.length?void we(e,e.contracts[0]):void Ce(ze(e));we(e)}function Ce(e){const t=new Set(ae);t.has(e)?t.delete(e):t.add(e),ie(t)}function we(e,t){const r=t||e,{exchange:o}=e;if(u.enabled("show_spread_operators")){const e={name:r.symbol,exchange:o,prefix:r.prefix,fullName:r.full_name};if(Y)return Ie(e),void se();if(ne.current&&ne.current.value.includes(","))return void Ie(e)}const s=[{resolved:!0,symbol:He.QualifiedSources.fromSymbolSearchResult(e,t),result:r}];g(s),n()}function Ee(e){oe("fixed"===D||e<=640)}function Ie(e){if(!ne.current)return;const[t,n]=(0,l.getNextSymbolInputValueAndPosition)(ne.current,e,Be);ne.current.value=t,ne.current.setSelectionRange(n,n),ne.current.focus()}function De(e){switch((0,z.hashFromEvent)(e)){case 38:if(e.preventDefault(),0===ee)return;if(-1===ee)return void te(0);te(ee-1);break;case 40:if(e.preventDefault(),ee===me.length-1)return;te(ee+1);break;case 37:{if(-1===ee)return;const t=me[ee],{id:n,isOffset:r,onExpandClick:o}=t;if(r||!n||!ae.has(n)||!Boolean(o)||P.isOpenFirstContractEnabled&&Boolean(M)||(e.preventDefault(),Ce(n)),o)return void(null==M||M(e,!0));break}case 39:{if(-1===ee)return;const t=me[ee],{id:n,isOffset:r,onExpandClick:o}=t;if(r||!n||ae.has(n)||!Boolean(o)||P.isOpenFirstContractEnabled&&Boolean(M)||(e.preventDefault(),Ce(n)),o)return void(null==M||M(e,!0));break}case 13:e.preventDefault(),Fe(!0)
;break;case 27:e.preventDefault(),n()}null==M||M(e)}function Fe(e){if(!ne.current)return;const t=ne.current.value;if(u.enabled("show_spread_operators")&&Y&&t){if(t.includes(",")){const r=Ve(t);if(r.some(e=>!Pe(e)))return;return g(r.map(We)),void(e&&n())}if(!Pe(t))return;return g([{symbol:Be?t.toUpperCase():t,resolved:!1}]),void(e&&n())}if(t.includes(","))return g(Ve(t).map(We)),void(e&&n());if(-1!==ee){me[ee].onClick()}else{const r=Be?t.toUpperCase():t;if(r&&""!==r.trim()){const e=Ve(r);if(void 0!==ce&&-1===r.indexOf(":"))(function(e){let t=!1;return Promise.all(e.map(e=>-1!==e.indexOf(":")||t?Promise.resolve({symbol:e,resolved:!1}):(t=!0,async function(e){var t;null===(t=await(null==le?void 0:le.accountMetainfo()))||void 0===t||t.prefix;const n=await B({strictMatch:!0,serverHighlight:!1,text:e,lang:window.language||"",brokerId:ce,onlyTradable:!0,unhideSymbolSearchGroups:ue,exchange:void 0});if(0!==n.length){const e=n[0],{contracts:t}=e,r=t&&t.length>0?t[0]:void 0,o=e.prefix||e.exchange,s=r?r.symbol:e.symbol;if(o&&s)return{symbol:He.QualifiedSources.fromSymbolSearchResult(e,r),resolved:!0,result:e}}return{symbol:e,resolved:!1}}(e))))})(e).then(e=>g(e));else{const t=e.map(We);g(t)}}e&&n()}}function Pe(e){const t=(0,i.tokenize)(e),n=(0,l.validate)(t);if(n.errors.length||n.warnings.length)return!1;const r=me[ee];return!r||void 0===r.isExpanded||(r.onClick(),!1)}}function We(e){return{symbol:Be?e.toUpperCase():e,resolved:!1}}function Je(e,t){const{broker_symbol:n,symbol:r}=e;return`${r}${t&&n?` (${n})`:""}`}function ze(e){return e.symbol+e.exchange+e.description}function Ve(e){return e.split(",").map(e=>e.trim()).filter(e=>""!==e)}function qe(e){const{isMobile:t,isTablet:n}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext);return r.createElement(h.AdaptivePopupDialog,{...e,className:s()(Fe.dialog,!t&&(n?Fe.tabletDialog:Fe.desktopDialog)),backdrop:!0,draggable:!1})}},15983:(e,t,n)=>{"use strict";n.d(t,{validate:()=>a,flip:()=>i,stringifyTokens:()=>l,isSpread:()=>u,shortName:()=>h,getExchange:()=>p,getNextSymbolInputValueAndPosition:()=>v,getCurrentTokenParamsFromInput:()=>f});var r=n(67337),o=n(7785),s=n(81319);function a(e){const t={braceBalance:0,currentState:"var",warnings:[],errors:[]};if(r.enabled("charting_library_base")&&!r.enabled("show_spread_operators"))return t;let n="init";const o=[];for(let r=0;r<e.length;r++){const s=e[r];if("whitespace"!==s.type){if("incompleteSymbol"===s.type||"incompleteNumber"===s.type){const n=r!==e.length-1,o={status:n?"error":"incomplete",reason:"incomplete_token",offset:s.offset,token:s};if(n?t.errors.push(o):t.warnings.push(o),n)continue}switch(s.type){case"symbol":case"number":if("var"===n){t.errors.push({status:"error",reason:"unexpected_token",offset:s.offset,token:s});continue}n="var";break;case"plus":case"minus":case"multiply":case"divide":case"power":if("var"!==n){t.errors.push({status:"error",reason:"unexpected_token",offset:s.offset,token:s});continue}n="operator";break;case"openBrace":if("var"===n){t.errors.push({status:"error",reason:"unexpected_token",
offset:s.offset,token:s});continue}o.push(s),n="init";break;case"closeBrace":if("var"!==n){t.errors.push({status:"error",reason:"unexpected_token",offset:s.offset,token:s});continue}o.pop()||t.errors.push({status:"error",reason:"unbalanced_brace",offset:s.offset,token:s}),n="var";break;case"unparsed":t.errors.push({status:"error",reason:"unparsed_entity",offset:s.offset,token:s})}}}for(t.braceBalance=o.length,"var"!==n&&t.warnings.push({status:"incomplete",token:e[e.length-1]});o.length;){const e=o.pop();e&&t.warnings.push({status:"incomplete",reason:"unbalanced_brace",offset:e.offset,token:e})}return t.currentState=n,t}function i(e){const t=function(e){let t,n=0,r=0;for(let o=0;o<e.length;o++){const s=e[o];if("whitespace"!==s.type)switch(n){case 0:if("number"!==s.type||1!=+s.value)return[];n=1;break;case 1:if(1!==n||"divide"!==s.type)return[];n=2,t=o+1;break;case 2:if("openBrace"===s.type)n=3,r=1;else if(c(s.type))return[];break;case 3:"openBrace"===s.type?r++:"closeBrace"===s.type&&(r--,r<=0&&(n=2))}}return e.slice(t)}(e);return t.length?d(t):d((0,o.tokenize)("1/("+l(e)+")"))}function l(e){return e.reduce((e,t)=>"symbol"===t.type&&o.symbolTokenEscapeRe.test(t.value)?e+`'${t.value}'`:e+t.value,"")}function c(e){return"plus"===e||"minus"===e||"multiply"===e||"divide"===e||"power"===e}function u(e){return e.length>1&&e.some(e=>c(e.type))}function d(e){e=function(e){const t=[];for(const n of e)"whitespace"!==n.type&&t.push(n);return t}(e);const t=[],n=[];let r;for(let o=0;o<e.length;o++){const s=e[o];switch(s.type){case"plus":case"minus":case"multiply":case"divide":case"power":n.length&&n[n.length-1].minPrecedence>s.precedence&&(n[n.length-1].minPrecedence=s.precedence);break;case"openBrace":r={minPrecedence:1/0,openBraceIndex:o},n.push(r);break;case"closeBrace":{if(r=n.pop(),!r)break;const s=e[r.openBraceIndex-1],a=e[o+1],i=s&&("plus"===s.type||"multiply"===s.type);(!c(null==a?void 0:a.type)||(null==a?void 0:a.precedence)<=r.minPrecedence)&&(!c(null==s?void 0:s.type)||(null==s?void 0:s.precedence)<(null==r?void 0:r.minPrecedence)||(null==s?void 0:s.precedence)===(null==r?void 0:r.minPrecedence)&&i)&&(t.unshift(r.openBraceIndex),t.push(o),n.length&&n[n.length-1].minPrecedence>r.minPrecedence&&(n[n.length-1].minPrecedence=r.minPrecedence))}}}for(let n=t.length;n--;)e.splice(t[n],1);return e}function h(e){return d((0,o.tokenize)(e)).reduce((e,t)=>{if("symbol"!==t.type)return e+t.value;const[,n]=m(t);return n?e+n:e},"")}function p(e){const t=function(e){const t=(0,o.tokenize)(e),n=[];return t.forEach(e=>{if("symbol"!==e.type)return;const[t]=m(e);t&&n.push(t)}),n}(e);if(1===t.length)return t[0]}function m(e){const t=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i.exec(e.value);return null===t?[void 0,void 0]:[t[1],t[2]]}function v(e,t,n){const r=e.value,[a,i]=f(e,n),l=(0,s.getSymbolFullName)(t),c=o.symbolTokenEscapeRe.test(l)?`'${l}'`:l;return[r.substring(0,i)+c+r.substring(i+a.length),i+c.length]}function f(e,t){const{value:n,selectionStart:r}=e,s=(0,o.tokenize)(t?n.toUpperCase():n),a=function(e,t){for(let n=0;n<e.length;n++){
const r=e[n],o="symbol"===r.type||"incompleteSymbol"===r.type||"number"===r.type;if(r.offset<=t&&t<=r.offset+r.value.length&&o)return r}return null}(s,r||0);return[(null==a?void 0:a.value)||"",a?a.offset:n.length,s]}},81319:(e,t,n)=>{"use strict";n.d(t,{exchangeSelectDisabled:()=>p,getAllSymbolTypesValue:()=>h,getAvailableExchanges:()=>c,getAvailableSearchSources:()=>l,getAvailableSymbolTypes:()=>d,getDefaultSearchSource:()=>i,getSymbolFullName:()=>a,isOpenFirstContractEnabled:()=>m});var r=n(28353),o=n(20882);class s{constructor(e){this._exchange=e}value(){return this._exchange.value}name(){return(0,o.isAllSearchSourcesSelected)(this)?(0,r.t)("All sources"):this._exchange.name}description(){return this._exchange.desc}country(){return this._exchange.country}providerId(){return this._exchange.providerId}group(){return this._exchange.group}includes(e){return function(e,t){const n=t.toLowerCase(),{name:r,desc:o,searchTerms:s}=e;return r.toLowerCase().includes(n)||o.toLowerCase().includes(n)||void 0!==s&&s.some(e=>e.toLowerCase().includes(n))}(this._exchange,e)}getRequestExchangeValue(){return this._exchange.value}getRequestCountryValue(){}}function a(e){if(e.fullName)return e.fullName;let t;return t=e.prefix||e.exchange?(e.prefix||e.exchange)+":"+e.name:e.name,t.replace(/<\/?[^>]+(>|$)/g,"")}function i(){const e=l();return e.find(o.isAllSearchSourcesSelected)||e[0]||null}function l(){return(0,o.createSearchSources)(s,u())}function c(){return u()}function u(){return window.ChartApiInstance.supportedExchangesList().map(e=>({...e,country:"",providerId:"",flag:""}))}function d(){return window.ChartApiInstance.supportedSymbolsTypes()}function h(){return""}function p(){return!1}const m=!1},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},82708:(e,t,n)=>{"use strict";n.d(t,{safeShortName:()=>o});var r=n(82029);function o(e){try{return(0,r.shortName)(e)}catch(t){return e}}},7785:(e,t,n)=>{"use strict";n.d(t,{symbolTokenEscapeRe:()=>s,tokenize:()=>l});var r=n(67337);const o=r.enabled("charting_library_base")?/(?:[^-+\/*^\s]'|[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF^])(?:[^-+\/*^\s]'|[a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!:.&])*|'.+?'/:/(?:[^-+\/*^\s]'|[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF])(?:[^-+\/*^\s]'|[a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!|:.&])*|'.+?'/,s=/[+\-/*]/,a={number:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,incompleteNumber:/\./,symbol:o,incompleteSymbol:/'[^']*/,separatorPrefix:"###",openBrace:"(",closeBrace:")",plus:"+",minus:"-",multiply:"*",divide:"/",power:"^",whitespace:/[\0-\x20\s]+/,unparsed:null},i=new RegExp(Object.values(a).map(e=>{return null===e?"":`(${"string"==typeof e?(t=e,t.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&")):e.source})`;var t}).filter(e=>""!==e).concat(".").join("|"),"g");function l(e){if(!e)return[]
;const t=[],n=Object.keys(a);let r;for(;r=i.exec(e);){let e=!1;for(let o=n.length;o--;)if(r[o+1]){n[o]&&t.push({value:r[o+1],type:n[o],precedence:0,offset:r.index}),e=!0;break}e||t.push({value:r[0],type:"unparsed",precedence:0,offset:r.index})}return t}},19785:(e,t,n)=>{"use strict";n.d(t,{rankedSearch:()=>o,createRegExpList:()=>s,getHighlightedChars:()=>a});var r=n(80643);function o(e){const{data:t,rules:n,queryString:o,isPreventedFromFiltering:s,primaryKey:a,secondaryKey:i=a,optionalPrimaryKey:l}=e;return t.map(e=>{const t=l&&e[l]?e[l]:e[a],s=e[i];let c,u=0;return n.forEach(e=>{var n,a,i,l;const{re:d,fullMatch:h}=e;return d.lastIndex=0,t&&t.toLowerCase()===o.toLowerCase()?(u=3,void(c=null===(n=t.match(h))||void 0===n?void 0:n.index)):(0,r.isString)(t)&&h.test(t)?(u=2,void(c=null===(a=t.match(h))||void 0===a?void 0:a.index)):(0,r.isString)(s)&&h.test(s)?(u=1,void(c=null===(i=s.match(h))||void 0===i?void 0:i.index)):void((0,r.isString)(s)&&d.test(s)&&(u=1,c=null===(l=s.match(d))||void 0===l?void 0:l.index))}),{matchPriority:u,matchIndex:c,item:e}}).filter(e=>s||e.matchPriority).sort((e,t)=>{if(e.matchPriority<t.matchPriority)return 1;if(e.matchPriority>t.matchPriority)return-1;if(e.matchPriority===t.matchPriority){if(void 0===e.matchIndex||void 0===t.matchIndex)return 0;if(e.matchIndex>t.matchIndex)return 1;if(e.matchIndex<t.matchIndex)return-1}return 0}).map(({item:e})=>e)}function s(e,t){const n=[],r=e.toLowerCase(),o=e.split("").map((e,t)=>`(${0!==t?"[/\\s-]"+i(e):i(e)})`).join("(.*?)")+"(.*)";return n.push({fullMatch:new RegExp(`(${i(e)})`,"i"),re:new RegExp("^"+o,"i"),reserveRe:new RegExp(o,"i"),fuzzyHighlight:!0}),t&&t.hasOwnProperty(r)&&n.push({fullMatch:t[r],re:t[r],fuzzyHighlight:!1}),n}function a(e,t,n){const r=[];return e&&n?(n.forEach(e=>{const{fullMatch:n,re:o,reserveRe:s}=e;n.lastIndex=0,o.lastIndex=0;const a=n.exec(t),i=a||o.exec(t)||s&&s.exec(t);if(e.fuzzyHighlight=!a,i)if(e.fuzzyHighlight){let e=i.index;for(let t=1;t<i.length;t++){const n=i[t],o=i[t].length;if(t%2){const t=n.startsWith(" ")||n.startsWith("/")||n.startsWith("-");r[t?e+1:e]=!0}e+=o}}else for(let e=0;e<i[0].length;e++)r[i.index+e]=!0}),r):r}function i(e){return e.replace(/[!-/[-^{-}]/g,"\\$&")}},24637:(e,t,n)=>{"use strict";n.d(t,{HighlightedText:()=>i});var r=n(59496),o=n(97754),s=n(19785),a=n(81524);function i(e){const{queryString:t,rules:n,text:i,className:l}=e,c=(0,r.useMemo)(()=>(0,s.getHighlightedChars)(t,i,n),[t,n,i]);return r.createElement(r.Fragment,null,c.length?i.split("").map((e,t)=>r.createElement(r.Fragment,{key:t},c[t]?r.createElement("span",{className:o(a.highlighted,l)},e):r.createElement("span",null,e))):i)}},78036:(e,t,n)=>{"use strict";n.d(t,{useEnsuredContext:()=>s});var r=n(59496),o=n(88537);function s(e){return(0,o.ensureNotNull)((0,r.useContext)(e))}},36947:(e,t,n)=>{"use strict";n.d(t,{useForceUpdate:()=>o});var r=n(59496);const o=()=>{const[,e]=(0,r.useReducer)((e,t)=>e+1,0);return e}},58095:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>s});var r=n(59496),o=n(39640);function s(e){
const{click:t,mouseDown:n,touchEnd:s,touchStart:a,handler:i,reference:l,ownerDocument:c=document}=e,u=(0,r.useRef)(null),d=(0,r.useRef)(new CustomEvent("timestamp").timeStamp);return(0,r.useLayoutEffect)(()=>{const e={click:t,mouseDown:n,touchEnd:s,touchStart:a},r=l?l.current:u.current;return(0,o.addOutsideEventListener)(d.current,r,i,c,e)},[t,n,s,a,i]),l||u}},77975:(e,t,n)=>{"use strict";n.d(t,{useWatchedValueReadonly:()=>o});var r=n(59496);const o=(e,t=!1)=>{const n="watchedValue"in e?e.watchedValue:void 0,o="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[s,a]=(0,r.useState)(n?n.value():o);return(t?r.useLayoutEffect:r.useEffect)(()=>{if(n){a(n.value());const e=e=>a(e);return n.subscribe(e),()=>n.unsubscribe(e)}return()=>{}},[n]),s}},84877:(e,t,n)=>{"use strict";n.d(t,{MatchMediaMap:()=>a});var r=n(59496),o=n(66783),s=n.n(o);class a extends r.Component{constructor(e){super(e),this._handleMediaChange=()=>{const e=l(this.state.queries,(e,t)=>t.matches);let t=!1;for(const n in e)if(e.hasOwnProperty(n)&&this.state.matches[n]!==e[n]){t=!0;break}t&&this.setState({matches:e})};const{rules:t}=this.props;this.state=i(t)}shouldComponentUpdate(e,t){return!s()(e,this.props)||(!s()(t.rules,this.state.rules)||!s()(t.matches,this.state.matches))}componentDidMount(){this._migrate(null,this.state.queries)}componentDidUpdate(e,t){s()(e.rules,this.props.rules)||this._migrate(t.queries,this.state.queries)}componentWillUnmount(){this._migrate(this.state.queries,null)}render(){return this.props.children(this.state.matches)}static getDerivedStateFromProps(e,t){if(s()(e.rules,t.rules))return null;const{rules:n}=e;return i(n)}_migrate(e,t){null!==e&&l(e,(e,t)=>{t.removeListener(this._handleMediaChange)}),null!==t&&l(t,(e,t)=>{t.addListener(this._handleMediaChange)})}}function i(e){const t=l(e,(e,t)=>window.matchMedia(t));return{queries:t,matches:l(t,(e,t)=>t.matches),rules:{...e}}}function l(e,t){const n={};for(const r in e)e.hasOwnProperty(r)&&(n[r]=t(r,e[r]));return n}},90692:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>o});var r=n(59496);class o extends r.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:()=>a});var r=n(59496),o=n(97754),s=n(91626);function a(e){return r.createElement("div",{className:o(s.separator,e.className)})}},76594:(e,t,n)=>{"use strict";n.d(t,{OutsideEvent:()=>o});var r=n(58095);function o(e){const{children:t,...n}=e;return t((0,r.useOutsideEvent)(n))}},88216:(e,t,n)=>{"use strict"
;n.d(t,{OverlapManager:()=>s,getRootOverlapManager:()=>i});var r=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 s{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 r=this._document.createElement("div");if(r.style.position=t.position,r.style.zIndex=this._index.toString(),r.dataset.id=e,void 0!==t.index){const e=this._container.childNodes.length;if(t.index>=e)this._container.appendChild(r);else if(t.index<=0)this._container.insertBefore(r,this._container.firstChild);else{const e=this._container.childNodes[t.index];this._container.insertBefore(r,e)}}else"reverse"===t.direction?this._container.insertBefore(r,this._container.firstChild):this._container.appendChild(r);return this._windows.set(e,r),++this._index,r}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 a=new WeakMap;function i(e=document){const t=e.getElementById("overlap-manager-root");if(null!==t)return(0,r.ensureDefined)(a.get(t));{const t=new s(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 a.set(n,t),t.setContainer(n),e.body.appendChild(n),t}}},86431:(e,t,n)=>{"use strict";n.d(t,{makeOverlapable:()=>s});var r=n(59496),o=n(65718);function s(e){return class extends r.PureComponent{render(){const{isOpened:t,root:n}=this.props;if(!t)return null;const s=r.createElement(e,{...this.props,zIndex:150});return"parent"===n?s:r.createElement(o.Portal,null,s)}}}},65718:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>l,PortalContext:()=>c});var r=n(59496),o=n(87995),s=n(9423),a=n(88216),i=n(50655);class l extends r.PureComponent{constructor(){super(...arguments),this._uuid=(0,s.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(r.createElement(c.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,a.getRootOverlapManager)():this.context}}l.contextType=i.SlotContext;const c=r.createContext(null)},50655:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>o,SlotContext:()=>s});var r=n(59496);class o extends r.Component{shouldComponentUpdate(){return!1}render(){return r.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const s=r.createContext(null)},61074:(e,t,n)=>{"use strict";n.d(t,{Spinner:()=>a});var r=n(59496),o=n(97754),s=n(33134);n(24780);function a(e){const t=o(e.className,"tv-spinner","tv-spinner--shown","tv-spinner--size_"+s.spinnerSizeMap[e.size||s.DEFAULT_SIZE]);return r.createElement("div",{className:t,style:e.style,role:"progressbar"})}},10381:(e,t,n)=>{"use strict";n.d(t,{ToolWidgetCaret:()=>l});var r=n(59496),o=n(97754),s=n(9745),a=n(40367),i=n(81268);function l(e){const{dropped:t,className:n}=e;return r.createElement(s.Icon,{className:o(n,a.icon,{[a.dropped]:t}),icon:i})}},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>'},64360:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentcolor" stroke-width="1.2" d="M17 21l-7.5-7.5L17 6"/></svg>'},29601: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="M2.5 14.5c1.68-1.26 3.7-2 6.5-2s4.91.74 6.5 2m-13-11c1.68 1.26 3.7 2 6.5 2s4.91-.74 6.5-2"/><circle stroke="currentColor" cx="9" cy="9" r="8.5"/><path stroke="currentColor" d="M13.5 9c0 2.42-.55 4.58-1.4 6.12-.87 1.56-1.98 2.38-3.1 2.38s-2.23-.82-3.1-2.38c-.85-1.54-1.4-3.7-1.4-6.12s.55-4.58 1.4-6.12C6.77 1.32 7.88.5 9 .5s2.23.82 3.1 2.38c.85 1.54 1.4 3.7 1.4 6.12z"/></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>'},70029:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120"><path fill="#B2B5BE" fill-rule="evenodd" d="M23 39a36 36 0 0 1 72 0v13.15l15.1 8.44 2.16 1.2-1.64 1.86-12.85 14.59 3.73 4.03L98.57 85 95 81.13V117H77v-12H67v9H50V95H40v22H23V81.28l-3.8 3.61-2.76-2.9 4.05-3.84-12.77-14.5-1.64-1.86 2.16-1.2L23 52.34V39Zm72 36.33 10.98-12.46L95 56.73v18.6ZM23 56.92v18.03L12.35 62.87 23 56.92ZM59 7a32 32 0 0 0-32 32v74h9V91h18v19h9v-9h18v12h10V39A32 32 0 0 0 59 7Zm-7 36a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm19 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></svg>'},72802:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120"><path fill="#131722" fill-rule="evenodd" d="M23 39a36 36 0 0 1 72 0v13.15l15.1 8.44 2.16 1.2-1.64 1.86-12.85 14.59 3.73 4.03L98.57 85 95 81.13V117H77v-12H67v9H50V95H40v22H23V81.28l-3.8 3.61-2.76-2.9 4.05-3.84-12.77-14.5-1.64-1.86 2.16-1.2L23 52.34V39Zm72 36.33 10.98-12.46L95 56.73v18.6ZM23 56.92v18.03L12.35 62.87 23 56.92ZM59 7a32 32 0 0 0-32 32v74h9V91h18v19h9v-9h18v12h10V39A32 32 0 0 0 59 7Zm-7 36a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm19 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></svg>'},5639:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path stroke="currentColor" d="M12.4 12.5a7 7 0 1 0-4.9 2 7 7 0 0 0 4.9-2zm0 0l5.101 5"/></svg>'},88142:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path stroke="currentColor" d="M8 5l3.5 3.5L8 12"/></svg>'},20832:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M2.5 6.5h9"/><circle fill="currentColor" cx="7" cy="3" r="1"/><circle fill="currentColor" cx="7" cy="10" r="1"/></svg>'},19586:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path stroke-linecap="square" stroke-linejoin="round" d="M3.5 10V2.5L1 5"/><path stroke-linecap="square" d="M1.5 10.5h4"/><path d="M8 12l3-11"/></g></svg>'},21740:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M2.5 6.5h8"/></svg>'},43088:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M3 10l7-7M3 3l7 7"/></svg>'},38927:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M2.5 6.5h8m-4-4v8"/></svg>'},56584:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M3 7l3.5-3.5L10 7"/></svg>'}}]);