Release v31.0.0 (from 028f81fbf6fef55e9694e5df4bd5106cc04c188a)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[2347],{53336:function(e,t){var o,n,r;n=[t],o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=!1;if("undefined"!=typeof window){var n={get passive(){o=!0}};window.addEventListener("testPassive",null,n),window.removeEventListener("testPassive",null,n)}var r="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),a=[],l=!1,i=-1,s=void 0,c=void 0,d=function(e){return a.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},u=function(e){var t=e||window.event;return!!d(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)},m=function(){setTimeout((function(){void 0!==c&&(document.body.style.paddingRight=c,c=void 0),void 0!==s&&(document.body.style.overflow=s,s=void 0)}))};e.disableBodyScroll=function(e,n){if(r){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!a.some((function(t){return t.targetElement===e}))){var m={targetElement:e,options:n||{}};a=[].concat(t(a),[m]),e.ontouchstart=function(e){1===e.targetTouches.length&&(i=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var o,n,r,a;1===t.targetTouches.length&&(n=e,a=(o=t).targetTouches[0].clientY-i,!d(o.target)&&(n&&0===n.scrollTop&&0<a||(r=n)&&r.scrollHeight-r.scrollTop<=r.clientHeight&&a<0?u(o):o.stopPropagation()))},l||(document.addEventListener("touchmove",u,o?{passive:!1}:void 0),l=!0)}}else{h=n,setTimeout((function(){if(void 0===c){var e=!!h&&!0===h.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(c=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===s&&(s=document.body.style.overflow,document.body.style.overflow="hidden")}));var p={targetElement:e,options:n||{}};a=[].concat(t(a),[p])}var h},e.clearAllBodyScrollLocks=function(){r?(a.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),l&&(document.removeEventListener("touchmove",u,o?{passive:!1}:void 0),l=!1),a=[],i=-1):(m(),a=[])},e.enableBodyScroll=function(e){if(r){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,a=a.filter((function(t){return t.targetElement!==e})),l&&0===a.length&&(document.removeEventListener("touchmove",u,o?{passive:!1}:void 0),l=!1)}else 1===a.length&&a[0].targetElement===e?(m(),a=[]):a=a.filter((function(t){return t.targetElement!==e}))}},void 0===(r="function"==typeof o?o.apply(t,n):o)||(e.exports=r)},92318:e=>{e.exports={button:"button-D4RPB3ZC",iconOnly:"iconOnly-D4RPB3ZC",withStartSlot:"withStartSlot-D4RPB3ZC",withEndSlot:"withEndSlot-D4RPB3ZC",startSlotWrap:"startSlotWrap-D4RPB3ZC",
|
||||
endSlotWrap:"endSlotWrap-D4RPB3ZC",xsmall:"xsmall-D4RPB3ZC",small:"small-D4RPB3ZC",medium:"medium-D4RPB3ZC",large:"large-D4RPB3ZC",xlarge:"xlarge-D4RPB3ZC",content:"content-D4RPB3ZC",link:"link-D4RPB3ZC",blue:"blue-D4RPB3ZC",primary:"primary-D4RPB3ZC",secondary:"secondary-D4RPB3ZC",gray:"gray-D4RPB3ZC",green:"green-D4RPB3ZC",red:"red-D4RPB3ZC",black:"black-D4RPB3ZC",slot:"slot-D4RPB3ZC",stretch:"stretch-D4RPB3ZC",grouped:"grouped-D4RPB3ZC",adjustPosition:"adjustPosition-D4RPB3ZC",firstRow:"firstRow-D4RPB3ZC",firstCol:"firstCol-D4RPB3ZC","no-corner-top-left":"no-corner-top-left-D4RPB3ZC","no-corner-top-right":"no-corner-top-right-D4RPB3ZC","no-corner-bottom-right":"no-corner-bottom-right-D4RPB3ZC","no-corner-bottom-left":"no-corner-bottom-left-D4RPB3ZC",textWrap:"textWrap-D4RPB3ZC",multilineContent:"multilineContent-D4RPB3ZC",primaryText:"primaryText-D4RPB3ZC",secondaryText:"secondaryText-D4RPB3ZC"}},98297:e=>{e.exports={"checkbox-size":"18px","checkbox-primary-default-bg":"var(--color-container-fill-primary-neutral-extra-bold)","checkbox-primary-hover-bg":"var(--color-container-fill-primary-neutral-bold)","checkbox-primary-active-bg":"var(--color-container-fill-primary-neutral-medium)","checkbox-primary-fg":"var(--color-container-fill-quinary-inverse)","checkbox-danger-default-bg":"var(--color-container-fill-primary-danger-bold)","checkbox-danger-hover-bg":"var(--color-container-fill-primary-danger-semi-bold)","checkbox-danger-active-bg":"var(--color-container-fill-primary-danger)","checkbox-danger-fg":"var(--color-container-fill-quaternary-inverse)",wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",focusOutline:"focusOutline-GZajBGIm",primary:"primary-GZajBGIm",disabled:"disabled-GZajBGIm",danger:"danger-GZajBGIm",view:"view-GZajBGIm"}},44859:e=>{e.exports={"checkbox-size":"18px",box:"box-vgla_e5o",unchecked:"unchecked-vgla_e5o",checked:"checked-vgla_e5o",mixed:"mixed-vgla_e5o",disabled:"disabled-vgla_e5o",checkedMark:"checkedMark-vgla_e5o",mixedMark:"mixedMark-vgla_e5o"}},74988:e=>{e.exports={button:"button-Rc93kXa8",bordersVisible:"bordersVisible-Rc93kXa8",selected:"selected-Rc93kXa8",listOption:"listOption-Rc93kXa8"}},65266:e=>{e.exports={footer:"footer-dwINHZFL"}},36163:e=>{e.exports={wrap:"wrap-oc7l8ZQg",header:"header-oc7l8ZQg",item:"item-oc7l8ZQg"}},62328:e=>{e.exports={label:"label-lVJKBKVk"}},77896:e=>{e.exports={scrollable:"scrollable-sXALjK1u",spinnerWrap:"spinnerWrap-sXALjK1u",item:"item-sXALjK1u",heading:"heading-sXALjK1u",checkboxWrap:"checkboxWrap-sXALjK1u",checkbox:"checkbox-sXALjK1u",emptyState:"emptyState-sXALjK1u",image:"image-sXALjK1u",text:"text-sXALjK1u"}},50074:e=>{e.exports={dialog:"dialog-IKuIIugL",tabletDialog:"tabletDialog-IKuIIugL",desktopDialog:"desktopDialog-IKuIIugL"}},80163:e=>{e.exports={"default-drawer-min-top-distance":"100px",wrap:"wrap-_HnK0UIN",positionBottom:"positionBottom-_HnK0UIN",backdrop:"backdrop-_HnK0UIN",drawer:"drawer-_HnK0UIN",positionLeft:"positionLeft-_HnK0UIN"}},63459:(e,t,o)=>{"use strict";o.d(t,{SquareButton:()=>g})
|
||||
;var n=o(79474),r=o(14487),a=o.n(r),l=o(67440),i=o(92318),s=o.n(i);const c="apply-overflow-tooltip apply-overflow-tooltip--check-children-recursively apply-overflow-tooltip--allow-text apply-common-tooltip";function d(e){const{size:t="medium",variant:o="primary",color:n="brand",stretch:r=!1,startSlot:i,endSlot:d,iconOnly:u=!1,className:m,isGrouped:p,cellState:h,disablePositionAdjustment:v=!1,primaryText:f,secondaryText:g,isAnchor:b=!1}=e,x="brand"===n?"black":n,y=function(e){let t="";return 0!==e&&(1&e&&(t=a()(t,s()["no-corner-top-left"])),2&e&&(t=a()(t,s()["no-corner-top-right"])),4&e&&(t=a()(t,s()["no-corner-bottom-right"])),8&e&&(t=a()(t,s()["no-corner-bottom-left"]))),t}((0,l.getGroupCellRemoveRoundBorders)(h)),S=u&&(i||d);return a()(m,s().button,s()[t],s()[x],s()[o],r&&s().stretch,i&&s().withStartIcon,d&&s().withEndIcon,S&&s().iconOnly,y,p&&s().grouped,p&&!v&&s().adjustPosition,p&&h.isTop&&s().firstRow,p&&h.isLeft&&s().firstCol,f&&g&&s().multilineContent,b&&s().link,c)}function u(e){const{startSlot:t,iconOnly:o,children:r,endSlot:l,primaryText:i,secondaryText:d}=e;if(t&&l&&o)return n.createElement("span",{className:a()(s().slot,s().startSlotWrap)},t);const u=o&&(t??l),m=!t&&!l&&!o&&!r&&i&&d;return n.createElement(n.Fragment,null,t&&n.createElement("span",{className:a()(s().slot,s().startSlotWrap)},t),r&&!u&&n.createElement("span",{className:s().content},r),l&&n.createElement("span",{className:a()(s().slot,s().endSlotWrap)},l),m&&!u&&function(e){return e.primaryText&&e.secondaryText&&n.createElement("div",{className:a()(s().textWrap,c)},n.createElement("span",{className:s().primaryText}," ",e.primaryText," "),"string"==typeof e.secondaryText?n.createElement("span",{className:s().secondaryText}," ",e.secondaryText," "):n.createElement("span",{className:s().secondaryText},n.createElement("span",null,e.secondaryText.firstLine),n.createElement("span",null,e.secondaryText.secondLine)))}(e))}var m=o(27914),p=o(59794),h=o(40197);function v(e,t){return o=>{if(t)return o.preventDefault(),void o.stopPropagation();e?.(o)}}function f(e){const{className:t,color:o,variant:n,size:r,stretch:a,iconOnly:l,startSlot:i,endSlot:s,primaryText:c,secondaryText:d,...u}=e;return{...u,...(0,h.filterDataProps)(e),...(0,h.filterAriaProps)(e)}}function g(e){const{reference:t,tooltipText:o,disabled:r,onClick:a,onMouseOver:l,onMouseOut:i,onMouseDown:s,onMouseEnter:c,"aria-disabled":h,...g}=e,{isGrouped:b,cellState:x,disablePositionAdjustment:y}=(0,n.useContext)(p.ControlGroupContext),S=d({...g,isGrouped:b,cellState:x,disablePositionAdjustment:y}),C=o??(e.primaryText?[e.primaryText,e.secondaryText].join(" "):(0,m.getTextForTooltip)(e.children));return n.createElement("button",{...f(g),"aria-disabled":r||h,tabIndex:e.tabIndex??(r?-1:0),className:S,ref:t,onClick:v(a,r),onMouseDown:v(s,r),onMouseOver:v(l,r),onMouseOut:v(i,r),onMouseEnter:v(c,r),"data-overflow-tooltip-text":C},n.createElement(u,{...g}))}o(90741)},71236:(e,t,o)=>{"use strict";o.d(t,{CheckboxInput:()=>u})
|
||||
;var n=o(79474),r=o(14487),a=o.n(r),l=o(40197),i=o(11864),s=o(94350),c=o(98297),d=o.n(c);function u(e){const t=e.intent??"primary";return n.createElement("span",{className:a()(d().wrapper,e.disabled&&d().disabled,e.className),title:e.title,style:e.style},n.createElement("span",{className:a()(d().view,d()[t])},n.createElement(s.CheckboxViewImpl,{checked:e.checked,disabled:e.disabled})),n.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:a()(d()[t],d().input),type:"checkbox",name:e.name,checked:!1!==e.checked,disabled:e.disabled,value:e.value,role:e.role,onChange:e.onChange,ref:e.reference,"aria-checked":(()=>{switch(e.checked){case!0:return"true";case!1:return"false";case"mixed":return"mixed"}})(),"aria-required":e.ariaRequired,"aria-describedby":e.ariaDescribedby,"aria-invalid":e.ariaInvalid,"data-qa-id":e.dataQaId,...(0,l.filterDataProps)(e)}),n.createElement("div",{className:d().focusOutline}))}(0,i.makeSwitchGroupItem)(u)},94350:(e,t,o)=>{"use strict";o.d(t,{CheckboxViewImpl:()=>u});var n=o(79474),r=o(14487),a=o.n(r),l=o(64588),i=o(17070),s=o.n(i),c=o(44859),d=o.n(c);function u(e){const{checked:t,disabled:o}=e;return n.createElement("div",{className:a()(d().box,!0===t&&d().checked,!1===t&&d().unchecked,"mixed"===t&&d().mixed,o&&d().disabled)},!0===t&&n.createElement(l.BlockIcon,{icon:s(),className:d().checkedMark}),"mixed"===t&&n.createElement("div",{className:d().mixedMark}))}},59794:(e,t,o)=>{"use strict";o.d(t,{ControlGroupContext:()=>n});const n=o(79474).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,isLeft:!0}})},67440:(e,t,o)=>{"use strict";function n(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}o.d(t,{getGroupCellRemoveRoundBorders:()=>n})},11864:(e,t,o)=>{"use strict";o.d(t,{SwitchGroup:()=>l,makeSwitchGroupItem:()=>i});var n=o(79474),r=o(16687);const a=(0,n.createContext)({getName:()=>"",getValues:()=>[],getOnChange:()=>r.default,subscribe:r.default,unsubscribe:r.default});class l extends n.PureComponent{constructor(e){super(e),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)},this.state={switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return n.createElement(a.Provider,{value:this.state.switchGroupContext},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((o=>t.includes(o)?!e.includes(o):e.includes(o)))}}function i(e){var t;return t=class extends n.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.getOnChange()(e.target.value)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}
|
||||
componentDidMount(){this.context.subscribe(this._onUpdate)}render(){return n.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.unsubscribe(this._onUpdate)}_getName(){return this.context.getName()}_isChecked(){return this.context.getValues().includes(this.props.value)}},t.contextType=a,t}},4861:(e,t,o)=>{"use strict";o.d(t,{Measure:()=>r});var n=o(61366);function r(e){const{children:t,onResize:o}=e;return t((0,n.useResizeObserver)(o||(()=>{}),[null===o]))}},72825:(e,t,o)=>{"use strict";o.d(t,{SymbolSearchDialogFooter:()=>i});var n=o(79474),r=o(14487),a=o.n(r),l=o(65266);function i(e){const{className:t,children:o}=e;return n.createElement("div",{className:a()(l.footer,t)},o)}},13757:(e,t,o)=>{"use strict";o.r(t),o.d(t,{getCompareDialogRenderer:()=>ie});var n=o(79474),r=o(91599),a=o(16905),l=o(72445),i=o(66411),s=o(14487),c=o.n(s),d=o(85842),u=o(66334),m=o(75026),p=o(57069),h=o(55206),v=o(47097),f=o(49841),g=o(4861),b=o(64851),x=o(8041);const y=n.createContext(null);var S=o(53530),C=o(14856);const w=n.createContext(null);var E=o(1642),k=o(77690),I=o(17896),D=o(63459),B=o(74988);function N(e){const{theme:t=B,children:o,onClick:r,isSelected:a,areBordersVisible:l,isItemSelected:i,className:s,value:d,name:u}=e;return n.createElement("button",{type:"button",className:c()(s,t.button,a&&t.selected,l&&!a&&!i&&t.bordersVisible),name:u,value:d,onClick:r},o)}function _(e){const{className:t,isSelected:o,onClick:r,name:a,children:l}=e;return n.createElement(D.SquareButton,{className:c()(t,B.listOption,o&&B.selected),size:"xsmall",onClick:r,name:a,"data-qa-id":e["data-qa-id"]},l)}var M=o(5260);function R(e){const{compareModel:t,selectedCompareOptionIndex:a}=(0,C.useEnsuredContext)(y),l=t.comparableOnSameScale({isYield:e}),i=(0,n.useMemo)((()=>function(e){return[{label:e?r.t(null,void 0,o(98976)):r.t(null,void 0,o(50283)),compareOption:e?M.CompareOption.SameScale:M.CompareOption.SamePctScale},{label:r.t(null,void 0,o(86560)),compareOption:M.CompareOption.NewPriceScale},{label:r.t(null,void 0,o(84620)),compareOption:M.CompareOption.NewPane}]}(l)),[l]);return[(0,n.useMemo)((()=>i[a]?.compareOption??i[0].compareOption),[i,a]),i]}var T=o(36163);function P(e){const{fullSymbolName:t,isSelected:a,className:l,isYield:s}=e,{isMobile:d,searchRef:u,setMode:m}=(0,C.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:p,setHoveredItemId:h,clearInput:v,allowExtendTimeScale:f}=(0,C.useEnsuredContext)(y),{callback:g}=(0,C.useEnsuredContext)(w),[x,S]=R(s);return d?n.createElement(I.DrawerManager,null,n.createElement(k.Drawer,{position:"Bottom",onClose:D.bind(null,!1)},n.createElement("div",{className:T.header},r.t(null,void 0,o(78271))),S.map((({label:e,compareOption:t})=>n.createElement(E.PopupMenuItem,{key:t,className:T.item,onClick:B,onClickArg:t,label:e}))))):n.createElement("div",{className:c()(T.wrap,l),"data-name":"compare-buttons-group"},S.map((({label:e,compareOption:t})=>n.createElement(_,{key:t,isSelected:a&&x===t,onClick:e=>B(t,e)},e))))
|
||||
;function D(e){d&&g&&g(),v&&e&&v(u,m)}function B(e,o){if(o.preventDefault(),p&&t&&void 0!==e){(0,i.getSymbolSearchCompleteOverrideFunction)()(t).then((t=>{p.applyStudy(t.symbol,e,f),h(""),D(!0)}))}}}function O(e){const{isSelected:t,fullSymbolName:o,onExpandClick:r,actions:a,id:s,isOffset:c,isYield:d}=e,{isMobile:u,toggleExpand:m,searchSpreads:p,searchRef:h,setMode:v,mode:f}=(0,C.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:g,hoveredItemId:E,setHoveredItemId:k,clearInput:I,allowExtendTimeScale:D}=(0,C.useEnsuredContext)(y),[B,N]=(0,n.useState)(!1),_=(0,n.useRef)(null),R=(0,S.useAccurateHover)(_),T=(0,n.useMemo)((()=>({callback:Z})),[Z]),O=!Boolean(r)&&!Boolean(a),L=s===E;return n.createElement(w.Provider,{value:T},n.createElement(x.SymbolSearchDialogContentItem,{hideMarkedListFlag:"compare"===f,...e,reference:_,onClick:function(t){if(Boolean(r)&&s&&!c)return t?.preventDefault(),void m(s);if(!B&&u)return void N(!0);if(p&&e.onClick)return void e.onClick(t);if((l.mobiletouch?L:!B)&&o){(0,i.getSymbolSearchCompleteOverrideFunction)()(o).then((e=>{const t=g.comparableOnSameScale({isYield:d})?M.CompareOption.SameScale:M.CompareOption.SamePctScale;g.applyStudy(e.symbol,t,D)})),k(""),I&&I(h,v)}l.mobiletouch&&!u&&!L&&s&&k(s)},hoverComponent:function(){if(!O)return!1;if(u)return B;if(l.mobiletouch)return L;return Boolean(R||t)}()?P:void 0}));function Z(){N(!1)}}var L=o(85197),Z=o(94950),A=o(38056),z=o(77896);function F(e){const{handleListWidth:t,activeSymbol:a}=(0,d.ensureNotNull)((0,n.useContext)(b.SymbolSearchItemsDialogContext)),{compareModel:l,selectedCompareIndex:i,selectedItemRef:s}=(0,d.ensureNotNull)((0,n.useContext)(y)),S=(0,p.useWatchedValueReadonly)({watchedValue:l.isDataReady()}),C=(0,p.useWatchedValueReadonly)({watchedValue:l.studies()}),w=(0,p.useWatchedValueReadonly)({watchedValue:l.highlightedSymbol()}),E=(0,n.useMemo)((()=>C.filter((e=>e.checked))),[C]),k=(0,n.useMemo)((()=>C.filter((e=>!e.checked))),[C]);return(0,n.useEffect)((()=>(l.chartModel().dataSourceCollectionChanged().subscribe(l,l.handleSourcesChange),()=>l.chartModel().dataSourceCollectionChanged().unsubscribe(l,l.handleSourcesChange))),[l]),n.createElement(g.Measure,{onResize:function([e]){t(e.contentRect.width)}},(e=>n.createElement(m.TouchScrollContainer,{className:z.scrollable,ref:e},function(){if(!S)return n.createElement("div",{className:z.spinnerWrap},n.createElement(h.Spinner,null));if(!Boolean(E.length)&&!Boolean(k.length)){const e=f.watchedTheme.value()===v.StdTheme.Dark?Z:L;return n.createElement("div",{className:z.emptyState},n.createElement(u.Icon,{className:z.image,icon:e}),n.createElement("div",{className:z.text},r.t(null,void 0,o(23228))))}return n.createElement(n.Fragment,null,Boolean(E.length)&&n.createElement(n.Fragment,null,n.createElement("div",{className:z.heading},r.t(null,void 0,o(95383))),E.map(((e,t)=>n.createElement(x.SymbolSearchDialogContentItem,{"data-role":"added-symbol-item",className:z.item,isActive:a?a===e.symbol:void 0,key:e.id,id:e.id,shortName:e.title,title:e.title,logoData:e.logoData,
|
||||
dangerousDescriptionHTML:e.description,exchangeName:e.exchangeName,marketType:e.marketType,sourceLogos:[{country:e.country,providerId:e.providerId}],onClick:I.bind(null,e),isHighlighted:e.id===w,isSelected:D(e),itemRef:D(e)?s:void 0,isYield:e.isYield,actions:n.createElement("div",{className:z.checkboxWrap},n.createElement(N,{className:z.checkbox,onClick:I.bind(null,e),isSelected:D(e)},n.createElement(u.Icon,{icon:A})))})))),Boolean(k.length)&&n.createElement(n.Fragment,null,n.createElement("div",{className:z.heading},r.t(null,void 0,o(64447))),k.map((e=>n.createElement(O,{"data-role":"recent-symbol-item",isActive:a?a===e.symbol:void 0,className:c()(z.item,e.id===w&&z.highlighted),key:e.id,id:e.id,shortName:e.title,logoData:e.logoData,title:e.title,dangerousDescriptionHTML:e.description,exchangeName:e.exchangeName,marketType:e.marketType,sourceLogos:[{country:e.country,providerId:e.providerId}],fullSymbolName:e.symbol,isSelected:D(e),itemRef:D(e)?s:void 0,isYield:e.isYield})))))}())));function I(e,t){t?.preventDefault(),l.removeStudy(e)}function D(e){return C.indexOf(e)===i}}var G=o(82287);class V extends n.PureComponent{constructor(e){super(e),this._selectedItemRef=n.createRef(),this._getContextValue=()=>{const{compareModel:e}=this.props,{selectedCompareOptionIndex:t,selectedCompareIndex:o,hoveredItemId:n,allowExtendTimeScale:r}=this.state;return{compareModel:e,selectedCompareOptionIndex:t,setSelectedCompareOptionIndex:this._setSelectedCompareOptionIndex,hoveredItemId:n,setHoveredItemId:this._setHoveredItemId,selectedCompareIndex:o,setSelectedCompareIndex:this._setSelectedCompareIndex,selectedItemRef:this._selectedItemRef,clearInput:this._clearInput,allowExtendTimeScale:r,toggleAllowExtendTimeScale:this._toggleAllowExtendTimeScale}},this._clearInput=(e,t)=>{e&&e.current&&(e.current.value="",t("compare"))},this._setSelectedCompareOptionIndex=e=>{this.setState({selectedCompareOptionIndex:e})},this._setHoveredItemId=e=>{this.setState({hoveredItemId:e})},this._setSelectedCompareIndex=(e,t)=>{this.setState({selectedCompareIndex:e},t)},this._toggleAllowExtendTimeScale=()=>{const e=!this.state.allowExtendTimeScale;G.setValue("showAddSymbolDialog.extendCheckboxState",e),this.setState({allowExtendTimeScale:e})},this.state={selectedCompareOptionIndex:0,selectedCompareIndex:-1,hoveredItemId:void 0,allowExtendTimeScale:Boolean(G.getBool("showAddSymbolDialog.extendCheckboxState"))}}render(){const{children:e}=this.props;return n.createElement(y.Provider,{value:this._getContextValue()},e)}}var W=o(23351),j=o(35088),H=o(78122),K=o(50074);function U(e){const{openedItems:t,searchRef:o,feedItems:r,selectedIndex:l,toggleExpand:i,onSearchComplete:c,mode:d,setMode:u,setSelectedIndex:m,isMobile:h,isTablet:v,onClose:f,upperCaseEnabled:g,symbolSearchState:x,searchSpreads:S}=(0,
|
||||
C.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:w,hoveredItemId:E,setHoveredItemId:k,selectedCompareOptionIndex:I,setSelectedCompareOptionIndex:D,selectedCompareIndex:B,setSelectedCompareIndex:N,selectedItemRef:_,clearInput:M,allowExtendTimeScale:T}=(0,C.useEnsuredContext)(y),P=(0,p.useWatchedValueReadonly)({watchedValue:w.studies()}),O=r[l],L="compare"===d,Z="exchange"===d,A=L?B:l,z=L?P:r,F=z[A],[G,V]=R(F?.isYield);return(0,n.useEffect)((()=>{E&&k(""),B&&N(-1)}),[d]),n.createElement(j.AdaptivePopupDialog,{...e,className:s(K.dialog,!h&&(v?K.tabletDialog:K.desktopDialog)),onKeyDown:function(e){if(e.target&&e.target!==o.current)return;const n=(0,W.hashFromEvent)(e);switch(n){case 13:{if(L)return void function(){if(-1===B)return;const e=P[B];e.checked?w.removeStudy(e):w.applyStudy(e.symbol,G,T);N(-1)}();const t=q();if(t)return e.preventDefault(),void i(t);e.preventDefault();const n=function(){if((0,a.isFeaturesetEnabled)("compare_symbol_search_spread_operators")&&(0,a.isFeaturesetEnabled)("show_spread_operators")&&S)return o?.current?.value.trim();const e=e=>"string"==typeof e?.fullSymbolName?e.fullSymbolName:e?.symbol,t=-1!==l;if(t)return e(F);const n=(0,a.isFeaturesetEnabled)("allow_arbitrary_symbol_search_input"),r="empty"!==x;if(n)return r&&z.length?e(z[0]):o?.current?.value.trim();if(!r&&!t&&!n)return;if(z.length)return e(z[0])}();return void(n&&(c([{symbol:g?n.toString().toUpperCase():n.toString(),resolved:!1,compareOption:G,allowExtendTimeScale:T}]),M&&M(o,u)))}case 27:return e.preventDefault(),Z?void u("symbolSearch"):void f()}if(!L&&"good"!==x)return;switch((0,H.mapKeyCodeToDirection)(n)){case"blockPrev":if(e.preventDefault(),0===A)return;if(-1===A)return void U(0);U(A-1);break;case"blockNext":if(e.preventDefault(),A===z.length-1)return;U(A+1);break;case"inlinePrev":{const o=q();if(o&&t.has(o))return e.preventDefault(),void i(o);if(!I||o)return;e.preventDefault(),D(I-1);break}case"inlineNext":{const o=q();if(o&&!t.has(o))return e.preventDefault(),void i(o);if(I===V.length-1||o)return;e.preventDefault(),D(I+1);break}}},dataName:"compare-dialog",draggable:!0});function U(e){L?N(e,X):m(e)}function X(){_.current?.scrollIntoView({block:"nearest"})}function q(){if(!O)return;const{id:e,isOffset:t,onExpandClick:o}=O;return!t&&Boolean(o)&&e?e:void 0}}var X=o(72101),q=o(87740),Y=o(64483);class Q extends q.DialogRenderer{constructor(e){super(),this._props=e}show(e){if(this.visible().value())return;const t=n.createElement(X.SymbolSearchItemsDialog,{...this._props,shouldReturnFocus:e?.shouldReturnFocus,initialMode:this._props.initialMode||"symbolSearch",onClose:()=>this.hide()});this._rootInstance=(0,Y.createReactRoot)(t,this._container),this._setVisibility(!0)}hide(){this._rootInstance?.unmount(),this._visibility.setValue(!1),this._props.onClose?.()}}var $=o(756),J=o(17517),ee=o(44973);function te(e){const{setMode:t,searchRef:o}=(0,C.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{currentMode:r}=(0,C.useEnsuredContext)(J.SymbolSearchDialogBodyContext),a=ee.DialogSearch;return(0,
|
||||
n.useEffect)((()=>{const e=o.current;if(e)return e.addEventListener("input",n),e.addEventListener("search-input-clear",n),()=>{e.removeEventListener("input",n),e.removeEventListener("search-input-clear",n)};function n(){o.current&&r&&("compare"!==r.current||""===o?.current?.value?.trim()?"symbolSearch"===r.current&&""===o?.current?.value?.trim()&&t("compare"):t("symbolSearch"))}}),[r,o,t]),n.createElement(a,{...e})}var oe=o(71236),ne=o(72825),re=o(62328);function ae(e){const{allowExtendTimeScale:t,toggleAllowExtendTimeScale:a}=(0,d.ensureNotNull)((0,n.useContext)(y));return n.createElement(ne.SymbolSearchDialogFooter,null,n.createElement("label",{"data-name":"allow-extend-time-scale-checkbox",className:re.label},n.createElement(oe.CheckboxInput,{checked:t,value:t?"on":"off",onChange:a}),n.createElement("span",null,r.t(null,void 0,o(76275)))))}const le=(0,a.isFeaturesetEnabled)("secondary_series_extend_time_scale");function ie(e){return new Q({wrapper:(t=e,e=>n.createElement(V,{...e,compareModel:t})),dialog:U,contentItem:O,initialScreen:F,searchInput:te,footer:le?n.createElement(ae):void 0,initialMode:"compare",searchInitiationPoint:"compare",dialogTitle:r.t(null,void 0,o(92540)),autofocus:!l.mobiletouch,dialogWidth:"fixed",onSearchComplete:t=>{const{compareOption:o,allowExtendTimeScale:n}=t[0];if(void 0!==o){(0,i.getSymbolSearchCompleteOverrideFunction)()(t[0].symbol,t[0].result).then((t=>{e.applyStudy(t.symbol,o,n)}))}},symbolTypes:(0,$.getAvailableSymbolTypes)(),showSpreadActions:(0,a.isFeaturesetEnabled)("show_spread_operators")&&(0,a.isFeaturesetEnabled)("compare_symbol_search_spread_operators")});var t}},5260:(e,t,o)=>{"use strict";var n;o.d(t,{CompareOption:()=>n}),function(e){e[e.SamePctScale=0]="SamePctScale",e[e.NewPriceScale=1]="NewPriceScale",e[e.NewPane=2]="NewPane",e[e.SameScale=3]="SameScale"}(n||(n={}))},17896:(e,t,o)=>{"use strict";o.d(t,{DrawerContext:()=>l,DrawerManager:()=>a});var n=o(79474),r=o(11288);class a extends n.PureComponent{constructor(e){super(e),this._isBodyFixed=!1,this._addDrawer=e=>{this.setState((t=>({stack:[...t.stack,e]})))},this._removeDrawer=e=>{this.setState((t=>({stack:t.stack.filter((t=>t!==e))})))},this.state={stack:[]}}componentDidUpdate(e,t){!t.stack.length&&this.state.stack.length&&((0,r.setFixedBodyState)(!0),this._isBodyFixed=!0),t.stack.length&&!this.state.stack.length&&this._isBodyFixed&&((0,r.setFixedBodyState)(!1),this._isBodyFixed=!1)}componentWillUnmount(){this.state.stack.length&&this._isBodyFixed&&(0,r.setFixedBodyState)(!1)}render(){return n.createElement(l.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.stack.length?this.state.stack[this.state.stack.length-1]:null}},this.props.children)}}const l=n.createContext(null)},77690:(e,t,o)=>{"use strict";o.d(t,{Drawer:()=>p});var n=o(79474),r=o(85842),a=o(14487),l=o(47166),i=o(64888),s=o(17896),c=o(11508),d=o(75026),u=o(80163);var m;function p(e){const{position:t="Bottom",onClose:o,children:d,reference:m,className:p,theme:v=u}=e,f=(0,r.ensureNotNull)((0,
|
||||
n.useContext)(s.DrawerContext)),[g]=(0,n.useState)((()=>(0,l.randomHash)())),b=(0,n.useRef)(null),x=(0,n.useContext)(c.CloseDelegateContext);return(0,n.useLayoutEffect)((()=>((0,r.ensureNotNull)(b.current).focus({preventScroll:!0}),x.subscribe(f,o),f.addDrawer(g),()=>{f.removeDrawer(g),x.unsubscribe(f,o)})),[]),n.createElement(i.Portal,null,n.createElement("div",{ref:m,className:a(u.wrap,u[`position${t}`])},g===f.currentDrawer&&n.createElement("div",{className:u.backdrop,onClick:o}),n.createElement(h,{className:a(v.drawer,u[`position${t}`],p),ref:b,"data-name":e["data-name"],"data-qa-id":e["data-qa-id"]},d)))}!function(e){e.Left="Left",e.Bottom="Bottom"}(m||(m={}));const h=(0,n.forwardRef)(((e,t)=>{const{className:o,...r}=e;return n.createElement(d.TouchScrollContainer,{className:a(u.drawer,o),tabIndex:-1,ref:t,...r})}))},53530:(e,t,o)=>{"use strict";o.d(t,{hoverMouseEventFilter:()=>l,useAccurateHover:()=>i,useHover:()=>r,useHoverDeprecated:()=>a});var n=o(79474);function r(){const[e,t]=(0,n.useState)(!1);return[e,{onMouseEnter:function(e){t(!0)},onMouseLeave:function(e){t(!1)}}]}function a(){const[e,t]=(0,n.useState)(!1);return[e,{onMouseOver:function(e){l(e)&&t(!0)},onMouseOut:function(e){l(e)&&t(!1)}}]}function l(e){return!e.currentTarget.contains(e.relatedTarget)}function i(e){const[t,o]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const t=t=>{if(null===e.current)return;const n=e.current.contains(t.target);o(n)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)}),[]),t}},75026:(e,t,o)=>{"use strict";o.d(t,{TouchScrollContainer:()=>c});var n=o(79474),r=o(53336),a=o(85842),l=o(45958);const i=CSS.supports("overscroll-behavior","none");let s=0;const c=(0,n.forwardRef)(((e,t)=>{const{children:o,...a}=e,c=(0,n.useRef)(null);return(0,n.useImperativeHandle)(t,(()=>c.current)),(0,n.useLayoutEffect)((()=>{if(l.CheckMobile.iOS())return s++,null!==c.current&&(i?1===s&&(document.body.style.overscrollBehavior="none"):(0,r.disableBodyScroll)(c.current,{allowTouchMove:d(c)})),()=>{s--,null!==c.current&&(i?0===s&&(document.body.style.overscrollBehavior=""):(0,r.enableBodyScroll)(c.current))}}),[]),n.createElement("div",{ref:c,...a},o)}));function d(e){return t=>{const o=(0,a.ensureNotNull)(e.current),n=document.activeElement;return!o.contains(t)||null!==n&&o.contains(n)&&n.contains(t)}}},17070:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke="currentColor" stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},38056: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-linecap="round" stroke-width="1.5" d="M7 15l5 5L23 9"/></svg>'},94950:e=>{
|
||||
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121 120" width="121" height="120"><path fill="#D1D4DC" d="M53.88 18.36a43.4 43.4 0 0 1 11.24 0 1 1 0 0 0 .26-1.98 45.42 45.42 0 0 0-11.76 0 1 1 0 1 0 .26 1.98zM43.04 21.26a1 1 0 0 0-.77-1.85A44.95 44.95 0 0 0 32.1 25.3a1 1 0 0 0 1.22 1.58 42.95 42.95 0 0 1 9.72-5.62zM75.42 19.96a1 1 0 0 1 1.3-.55A44.95 44.95 0 0 1 86.9 25.3a1 1 0 0 1-1.22 1.58 42.95 42.95 0 0 0-9.72-5.62 1 1 0 0 1-.54-1.3zM25.38 34.82a1 1 0 1 0-1.58-1.22 44.95 44.95 0 0 0-5.89 10.17 1 1 0 0 0 1.85.77 42.95 42.95 0 0 1 5.62-9.72zM16.86 55.38a1 1 0 0 0-1.98-.26 45.42 45.42 0 0 0 0 11.76 1 1 0 1 0 1.98-.26 43.4 43.4 0 0 1 0-11.24zM103 54.26a1 1 0 0 1 1.12.86 45.4 45.4 0 0 1 0 11.76 1 1 0 0 1-1.98-.26 43.37 43.37 0 0 0 0-11.24 1 1 0 0 1 .86-1.12zM19.76 77.46a1 1 0 0 0-1.85.77A44.95 44.95 0 0 0 23.8 88.4a1 1 0 0 0 1.58-1.22 42.95 42.95 0 0 1-5.62-9.72zM100.54 76.92a1 1 0 0 1 .54 1.3A44.95 44.95 0 0 1 95.2 88.4a1 1 0 0 1-1.58-1.22 42.95 42.95 0 0 0 5.62-9.72 1 1 0 0 1 1.3-.54zM33.32 95.12a1 1 0 1 0-1.22 1.58 44.94 44.94 0 0 0 10.17 5.88 1 1 0 0 0 .77-1.84 42.97 42.97 0 0 1-9.72-5.62zM87.08 95.3a1 1 0 0 1-.18 1.4 44.94 44.94 0 0 1-10.17 5.88 1 1 0 0 1-.77-1.84 42.98 42.98 0 0 0 9.72-5.62 1 1 0 0 1 1.4.18zM53.88 103.64a1 1 0 0 0-.26 1.98 45.4 45.4 0 0 0 11.76 0 1 1 0 0 0-.26-1.98 43.37 43.37 0 0 1-11.24 0zM62.81 53.17a1 1 0 0 0-.78 1.84 6.62 6.62 0 0 1 3.49 3.5 1 1 0 1 0 1.84-.78 8.62 8.62 0 0 0-4.55-4.56z"/><path fill="#D1D4DC" d="M45.5 61a14 14 0 1 1 24.28 9.5l7.92 7.92a1 1 0 0 1-1.42 1.42l-7.96-7.97A14 14 0 0 1 45.5 61zm14-12a12 12 0 1 0 0 24 12 12 0 0 0 0-24z"/><circle fill="#1976D2" cx="97.5" cy="39" r="13"/><path fill="#D1D4DC" d="M98.5 34a1 1 0 1 0-2 0v4h-4a1 1 0 1 0 0 2h4v4a1 1 0 1 0 2 0v-4h4a1 1 0 0 0 0-2h-4v-4z"/></svg>'},85197:e=>{
|
||||
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121 120" width="121" height="120"><path fill="#1E222D" d="M53.88 18.36a43.4 43.4 0 0 1 11.24 0 1 1 0 0 0 .26-1.98 45.42 45.42 0 0 0-11.76 0 1 1 0 1 0 .26 1.98zM43.04 21.26a1 1 0 0 0-.77-1.85A44.95 44.95 0 0 0 32.1 25.3a1 1 0 0 0 1.22 1.58 42.95 42.95 0 0 1 9.72-5.62zM75.42 19.96a1 1 0 0 1 1.3-.55A44.95 44.95 0 0 1 86.9 25.3a1 1 0 0 1-1.22 1.58 42.95 42.95 0 0 0-9.72-5.62 1 1 0 0 1-.54-1.3zM25.38 34.82a1 1 0 1 0-1.58-1.22 44.95 44.95 0 0 0-5.89 10.17 1 1 0 0 0 1.85.77 42.95 42.95 0 0 1 5.62-9.72zM16.86 55.38a1 1 0 0 0-1.98-.26 45.42 45.42 0 0 0 0 11.76 1 1 0 1 0 1.98-.26 43.4 43.4 0 0 1 0-11.24zM103 54.26a1 1 0 0 1 1.12.86 45.4 45.4 0 0 1 0 11.76 1 1 0 0 1-1.98-.26 43.37 43.37 0 0 0 0-11.24 1 1 0 0 1 .86-1.12zM19.76 77.46a1 1 0 0 0-1.85.77A44.95 44.95 0 0 0 23.8 88.4a1 1 0 0 0 1.58-1.22 42.95 42.95 0 0 1-5.62-9.72zM100.54 76.92a1 1 0 0 1 .54 1.3A44.95 44.95 0 0 1 95.2 88.4a1 1 0 0 1-1.58-1.22 42.95 42.95 0 0 0 5.62-9.72 1 1 0 0 1 1.3-.54zM33.32 95.12a1 1 0 1 0-1.22 1.58 44.94 44.94 0 0 0 10.17 5.88 1 1 0 0 0 .77-1.84 42.97 42.97 0 0 1-9.72-5.62zM87.08 95.3a1 1 0 0 1-.18 1.4 44.94 44.94 0 0 1-10.17 5.88 1 1 0 0 1-.77-1.84 42.98 42.98 0 0 0 9.72-5.62 1 1 0 0 1 1.4.18zM53.88 103.64a1 1 0 0 0-.26 1.98 45.4 45.4 0 0 0 11.76 0 1 1 0 0 0-.26-1.98 43.37 43.37 0 0 1-11.24 0zM62.81 53.17a1 1 0 0 0-.78 1.84 6.62 6.62 0 0 1 3.49 3.5 1 1 0 1 0 1.84-.78 8.62 8.62 0 0 0-4.55-4.56z"/><path fill="#1E222D" d="M45.5 61a14 14 0 1 1 24.28 9.5l7.92 7.92a1 1 0 0 1-1.42 1.42l-7.96-7.97A14 14 0 0 1 45.5 61zm14-12a12 12 0 1 0 0 24 12 12 0 0 0 0-24z"/><circle fill="#2196F3" cx="97.5" cy="39" r="13"/><path fill="#fff" d="M98.5 34a1 1 0 1 0-2 0v4h-4a1 1 0 1 0 0 2h4v4a1 1 0 1 0 2 0v-4h4a1 1 0 0 0 0-2h-4v-4z"/></svg>'}}]);
|
||||
Reference in New Issue
Block a user