(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[57565],{93953:e=>{e.exports={}},377510:e=>{e.exports={}},704976:e=>{e.exports={}},87e4:e=>{e.exports={}},721923:e=>{e.exports={}},565296:e=>{e.exports={}},135493:e=>{e.exports={}},769855:e=>{e.exports={}},342390:e=>{e.exports={}},397681:e=>{e.exports={}},473947:e=>{e.exports={}},408853:e=>{e.exports={}},952081:e=>{e.exports={}},765412:e=>{e.exports={}},924916:e=>{e.exports={}},259937:e=>{e.exports={}},468197:e=>{e.exports={}},751594:e=>{e.exports={}},146866:e=>{e.exports={}},268731:e=>{e.exports={}},34843:e=>{e.exports={}},725423:e=>{e.exports={}},349924:e=>{e.exports={badge:"badge-TRXznVu1",content:"content-TRXznVu1",anchor:"anchor-TRXznVu1",button:"button-TRXznVu1","size-xsmall":"size-xsmall-TRXznVu1","size-small":"size-small-TRXznVu1","size-medium":"size-medium-TRXznVu1","size-large":"size-large-TRXznVu1","size-xlarge":"size-xlarge-TRXznVu1"}},732003:e=>{e.exports={loader:"loader-PZ4hqS2H",static:"static-PZ4hqS2H",item:"item-PZ4hqS2H","tv-button-loader":"tv-button-loader-PZ4hqS2H",medium:"medium-PZ4hqS2H",small:"small-PZ4hqS2H",black:"black-PZ4hqS2H",white:"white-PZ4hqS2H",gray:"gray-PZ4hqS2H",primary:"primary-PZ4hqS2H","loader-initial":"loader-initial-PZ4hqS2H","loader-appear":"loader-appear-PZ4hqS2H"}},965759:e=>{e.exports={switcher:"switcher-Wv0rGnT8","thumb-wrapper":"thumb-wrapper-Wv0rGnT8","size-small":"size-small-Wv0rGnT8","size-large":"size-large-Wv0rGnT8",input:"input-Wv0rGnT8","intent-default":"intent-default-Wv0rGnT8","disable-active-state-styles":"disable-active-state-styles-Wv0rGnT8","intent-select":"intent-select-Wv0rGnT8",track:"track-Wv0rGnT8",thumb:"thumb-Wv0rGnT8"}},294123:e=>{e.exports={}},810684:e=>{e.exports={wrap:"wrap-uFE8C8hG",input:"input-uFE8C8hG",box:"box-uFE8C8hG",hoverDot:"hoverDot-uFE8C8hG",red:"red-uFE8C8hG",blue:"blue-uFE8C8hG",green:"green-uFE8C8hG",orange:"orange-uFE8C8hG",purple:"purple-uFE8C8hG",cyan:"cyan-uFE8C8hG",pink:"pink-uFE8C8hG",large:"large-uFE8C8hG",pickerDot:"pickerDot-uFE8C8hG"}},294155:e=>{e.exports={wrapper:"wrapper-AE6toMmz",selector:"selector-AE6toMmz",arrowLeft:"arrowLeft-AE6toMmz",colorSelectButton:"colorSelectButton-AE6toMmz",popup:"popup-AE6toMmz"}},202970:e=>{e.exports={"tv-spinner__container-rotate":"tv-spinner__container-rotate-OAzoNsnS"}},694089:e=>{e.exports={}},954239:e=>{e.exports={}},140078:e=>{e.exports={span:"span-zNKSdgKC"}},475230:e=>{e.exports={controls:"controls-D5xfHcr1",autosizeLabel:"autosizeLabel-D5xfHcr1",crossSign:"crossSign-D5xfHcr1",autosizeControl:"autosizeControl-D5xfHcr1",widthControl:"widthControl-D5xfHcr1",heightControl:"heightControl-D5xfHcr1"}},455150:e=>{e.exports={}},726486:e=>{e.exports={}},936902: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: 430px)"}},562730:e=>{e.exports={wrapper:"wrapper-KagMfMbV",newLabel:"newLabel-KagMfMbV"}},458819:e=>{e.exports={item:"item-bWEYVlEJ",interactive:"interactive-bWEYVlEJ", hovered:"hovered-bWEYVlEJ",disabled:"disabled-bWEYVlEJ",active:"active-bWEYVlEJ",shortcut:"shortcut-bWEYVlEJ",normal:"normal-bWEYVlEJ",big:"big-bWEYVlEJ",iconCell:"iconCell-bWEYVlEJ",icon:"icon-bWEYVlEJ",checkmark:"checkmark-bWEYVlEJ",content:"content-bWEYVlEJ",label:"label-bWEYVlEJ",checked:"checked-bWEYVlEJ",toolbox:"toolbox-bWEYVlEJ",showToolboxOnHover:"showToolboxOnHover-bWEYVlEJ",arrowIcon:"arrowIcon-bWEYVlEJ",subMenu:"subMenu-bWEYVlEJ",invisibleHotkey:"invisibleHotkey-bWEYVlEJ"}},994237:e=>{e.exports={item:"item-X2LmiiGx",emptyIcons:"emptyIcons-X2LmiiGx",loading:"loading-X2LmiiGx",disabled:"disabled-X2LmiiGx",interactive:"interactive-X2LmiiGx",hovered:"hovered-X2LmiiGx",normal:"normal-X2LmiiGx",big:"big-X2LmiiGx",icon:"icon-X2LmiiGx",label:"label-X2LmiiGx",title:"title-X2LmiiGx",nested:"nested-X2LmiiGx",shortcut:"shortcut-X2LmiiGx",remove:"remove-X2LmiiGx"}},530127:e=>{e.exports={separator:"separator-blm_vtaP"}},88327:e=>{e.exports={"default-drawer-min-top-distance":"100px",wrap:"wrap-yBUNQyVA",positionBottom:"positionBottom-yBUNQyVA",backdrop:"backdrop-yBUNQyVA",drawer:"drawer-yBUNQyVA",positionLeft:"positionLeft-yBUNQyVA"}},952604:e=>{e.exports={elementWrap:"elementWrap-RgmcRkjO",itemsWrap:"itemsWrap-RgmcRkjO",item:"item-RgmcRkjO",active:"active-RgmcRkjO",itemContent:"itemContent-RgmcRkjO",dropdownItem:"dropdownItem-RgmcRkjO",dropdownIcon:"dropdownIcon-RgmcRkjO",dropdownListItem:"dropdownListItem-RgmcRkjO"}},559986:(e,t,o)=>{"use strict";o.d(t,{LIST_START:()=>s,getTargetIndex:()=>r});const s=Symbol();function r(e,t,o){const r=void 0===o?void 0!==t?e.indexOf(t):void 0:o===s?0:e.indexOf(o)+1;return-1!==r?r:void 0}},199669:(e,t,o)=>{"use strict";function s(e){const{id:t,event:o,channel:s,filter:r}=e;return e=>(s.on(o,(o=>{const{action:s,emitter:i}=JSON.parse(o);i!==t&&r(s)&&e.dispatch({...s,payload:{...s.payload,silent:!0}})})),e=>i=>{const n=e(i);return r(i)&&(i.payload.silent||s.emit(o,JSON.stringify({action:i,emitter:t}))),n})}o.d(t,{createCrossTabSyncMiddleware:()=>s})},797035:(e,t,o)=>{"use strict";o.d(t,{ListColor:()=>s,LIST_COLORS:()=>h,isListColor:()=>u,markMany:()=>f,setup:()=>v,reset:()=>b,remove:()=>y,rename:()=>w,changeDescription:()=>S,renameSeparator:()=>C,shiftCommand:()=>k,share:()=>x,reducer:()=>F,createCrossTabSyncMiddleware:()=>T,getSymbolColor:()=>E,getListByColor:()=>$,getSymbolsByColor:()=>I,getCommands:()=>A,getTimestamp:()=>M});var s,r=o(629558),i=o(650151),n=o(199669),l=o(50991),a=o(340958),c=o(173777),d=o(559986);!function(e){e.Red="red",e.Blue="blue",e.Green="green",e.Orange="orange",e.Purple="purple",e.Cyan="cyan",e.Pink="pink"}(s||(s={}));const h=[s.Red,s.Blue,s.Green,s.Orange,s.Purple,s.Cyan,s.Pink];function u(e){return new Set(h).has(e)}const p={lists:{colors:[],byColor:{},bySymbol:{}},commands:[],timestamp:null};function _(e,t){const{lists:o}=e,s=o.byColor[t];s&&0===s.symbols.length&&(o.colors=o.colors.filter((e=>e!==t)))}function g(e){return(0,c.isSeparatorItem)(e)}const m=(0,r.createSlice)({name:"marked-lists",initialState:p,reducers:{setup:(e,t)=>{ const{lists:o,timestamp:s}=t.payload,r={lists:{colors:[],byColor:{},bySymbol:{}},commands:[],timestamp:null};r.timestamp=s;for(const e of function(e,t){return[...e].sort(((e,o)=>t.indexOf(e.color)-t.indexOf(o.color)))}(o,h)){const t=e.symbols.filter((t=>void 0===r.lists.bySymbol[t]&&(g(t)||(r.lists.bySymbol[t]=e.color),!0)));r.lists.byColor[e.color]={color:e.color,name:e.name,description:e.description,shared:e.shared,symbols:t},t.length>0&&r.lists.colors.push(e.color)}return r},remove:(e,t)=>{const{color:o,symbols:s,silent:r}=t.payload,{lists:i,commands:n}=e,l=i.byColor[o];if(void 0===l||0===l.symbols.length)return;const c=new Set(s),d=l.symbols.filter((e=>!c.has(e)));if(!(0,a.equalArrays)(d,l.symbols)){l.symbols=d;for(const e of c)delete i.bySymbol[e];r||n.push({type:"remove",color:o,symbols:[...c]}),_(e,o)}},markMany:(e,t)=>{const{color:o,before:s,silent:r}=t.payload,{lists:n,commands:l}=e,{unique:c,exclusions:h}=function(e,t){var o;const{color:s,symbols:r,separators:n}=t.payload,{lists:l}=e,a={},c=new Set,d=e=>g(e)?((0,i.assert)(null!==s),s):l.bySymbol[e];for(let e=0;e=0;--t)if(!o.has(e.symbols[t])){l=e.symbols[t];break}}}return l}(e,t,c,d.LIST_START);if(null!==o&&void 0!==h[o]&&1===Object.keys(h).length){const t=n.byColor[o];(0,i.assert)(void 0!==t);const p=t.symbols.filter((e=>!c.has(e))),m=(0,d.getTargetIndex)(p,s,u);if(void 0===m?p.push(...c):p.splice(m,0,...c),(0,a.equalArrays)(p,t.symbols))return;{const s=h[o];(0,i.assert)(void 0!==s),t.symbols=p;for(const e of s)delete n.bySymbol[e];for(const e of c)g(e)||(n.bySymbol[e]=o);return _(e,o),void(r||l.push({type:"replace",color:o,symbols:[...t.symbols]}))}}for(const t in h){if(!h.hasOwnProperty(t))continue;const o=h[t];(0,i.assert)(void 0!==o);const s=n.byColor[t];(0,i.assert)(void 0!==s),s.symbols=s.symbols.filter((e=>!o.has(e)||(delete n.bySymbol[e],!1))),_(e,t)}if(null===o)return void(r||l.push({type:"reset",symbols:[...c]}));const p=n.byColor[o];if(n.colors.includes(o)){(0,i.assert)(void 0!==p);const e=(0,d.getTargetIndex)(p.symbols,s,u);void 0===e?(p.symbols.push(...c),r||(void 0===h[o]?l.push({type:"append",color:o,symbols:[...c]}):l.push({type:"replace",color:o,symbols:[...p.symbols]}))):(p.symbols.splice(e,0,...c),r||l.push({type:"replace",color:o,symbols:[...p.symbols]}))}else void 0===p?n.byColor[o]={color:o,symbols:[...c],name:null,description:null,shared:!1}:p.symbols=[...c],n.colors.push(o),r||l.push({type:"append",color:o,symbols:[...c]});for(const e of c)g(e)||(n.bySymbol[e]=o)},renameSeparator:(e,t)=>{const{color:o,separator:s,name:r,silent:n}=t.payload;if(s===r||!g(s)||!g(r))return;const l=e.lists.byColor[o];(0,i.assert)(void 0!==l);const a=l.symbols.indexOf(s) ;-1!==a&&-1===l.symbols.indexOf(r)&&(l.symbols.splice(a,1,r),n||e.commands.push({type:"replace",color:o,symbols:l.symbols}))},rename:(e,t)=>{const{name:o,color:s,silent:r}=t.payload,n=e.lists.byColor[s];(0,i.assert)(void 0!==n),n.name!==o&&(n.name=o,r||e.commands.push({type:"rename",color:s,name:o}))},changeDescription:(e,t)=>{const{color:o,description:s,silent:r}=t.payload,n=e.lists.byColor[o];(0,i.assert)(void 0!==n),n.description!==s&&(n.description=s,r||e.commands.push({type:"change-description",color:o,description:s}))},reset:(e,t)=>{const{silent:o}=t.payload,{lists:s}=e;for(const e of h){const t=s.byColor[e];void 0!==t&&(t.symbols=[])}s.colors=[],s.bySymbol={},o||e.commands.push({type:"reset-all"})},share:(e,t)=>{const{lists:o,commands:s}=e,{shared:r,color:i,silent:n}=t.payload,l=o.byColor[i];void 0!==l&&l.shared!==r&&(l.shared=r,n||s.push({type:"share",color:i,shared:r}))},shiftCommand:(e,t)=>{const{count:o}=t.payload;e.commands.splice(0,o)}}}),{markMany:f,setup:v,reset:b,remove:y,rename:w,changeDescription:S,renameSeparator:C,shiftCommand:k,share:x}=m.actions,{reducer:F}=m;function T(e,t,o=m){return(0,n.createCrossTabSyncMiddleware)({id:e,channel:t,event:"marked-list-cross-tab-sync",filter:e=>function(e,t){return t.actions.markMany.match(e)||t.actions.rename.match(e)||t.actions.changeDescription.match(e)||t.actions.remove.match(e)||t.actions.setup.match(e)||t.actions.renameSeparator.match(e)||t.actions.reset.match(e)||t.actions.share.match(e)}(e,o)})}function E(e,t){var o;return null!==(o=e.lists.bySymbol[l.qualified.cast(t)])&&void 0!==o?o:null}function $(e,t){var o;return null!==(o=e.lists.byColor[t])&&void 0!==o?o:null}function I(e,t){var o,s;return null!==(s=null===(o=$(e,t))||void 0===o?void 0:o.symbols)&&void 0!==s?s:null}function A(e){return e.commands}function M(e){return e.timestamp}},173777:(e,t,o)=>{"use strict";o.d(t,{SEPARATOR_PREFIX:()=>s,isSeparatorItem:()=>r});const s="###";function r(e){return e.startsWith(s)}},50991:(e,t,o)=>{"use strict";o.d(t,{qualified:()=>s});const s={cast:e=>e,castMany:e=>e.map(s.cast)}},340958:(e,t,o)=>{"use strict";function s(e,t){if(e.length!==t.length)return!1;for(let o=0;os})},774465:(e,t,o)=>{"use strict";o.d(t,{AnchorBadge:()=>p,Badge:()=>u,BadgeSize:()=>n.BadgeSize});var s=o(50959),r=o(497754),i=o.n(r),n=o(105573),l=o(349924),a=o.n(l);function c(e){const{size:t=n.BadgeSize.Medium,className:o}=e;return i()(a().badge,t&&a()[`size-${t}`],o)}function d(e){return i()(c(e),a().anchor)}function h(e){const{children:t,contentClassName:o}=e;return s.createElement("span",{className:i()(a().content,o)},t)}function u(e){const{size:t,children:o,className:r,contentClassName:i,...n}=e;return s.createElement("span",{...n,className:c({size:t,className:r})},s.createElement(h,{contentClassName:i},o))}function p(e){const{size:t,children:o,className:r,contentClassName:i,...n}=e;return s.createElement("a",{...n,className:d({size:t,className:r})},s.createElement(h,{contentClassName:i},o))}},105573:(e,t,o)=>{ "use strict";var s;o.d(t,{BadgeSize:()=>s}),function(e){e.XSmall="xsmall",e.Small="small",e.Medium="medium",e.Large="large",e.XLarge="xlarge"}(s||(s={}))},488951:(e,t,o)=>{"use strict";o.r(t),o.d(t,{colorsPalette:()=>h,getHexColorByName:()=>u}) ;const s=JSON.parse('{"color-white":"#ffffff","color-black":"#000000","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEC","color-ripe-red-100":"#FCCBCD","color-ripe-red-200":"#FAA1A4","color-ripe-red-300":"#F77C80","color-ripe-red-400":"#F7525F","color-ripe-red-500":"#F23645","color-ripe-red-600":"#CC2F3C","color-ripe-red-700":"#B22833","color-ripe-red-800":"#991F29","color-ripe-red-900":"#801922","color-ripe-red-a100":"#FF8080","color-ripe-red-a200":"#FF5252","color-ripe-red-a400":"#FF3333","color-ripe-red-a600":"#CC2929","color-ripe-red-a700":"#802028","color-ripe-red-a800":"#4D191D","color-ripe-red-a900":"#331F20","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#FF9100","color-tan-orange-a600":"#CC7014","color-tan-orange-a700":"#8C541C","color-tan-orange-a800":"#593A1B","color-tan-orange-a900":"#33261A","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-800":"#2E7D32","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#ffd600","color-tv-blue-50":"#E3EFFD","color-tv-blue-100":"#BBD9FB","color-tv-blue-200":"#90BFF9","color-tv-blue-300":"#5B9CF6","color-tv-blue-400":"#3179F5","color-tv-blue-500":"#2962FF","color-tv-blue-600":"#1E53E5","color-tv-blue-700":"#1848CC","color-tv-blue-800":"#143EB3","color-tv-blue-900":"#0C3299","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#143A87","color-tv-blue-a800":"#142E61","color-tv-blue-a900":"#132042","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a200":"#7C4DFF","color-deep-blue-a400":"#651FFF","color-deep-blue-a700":"#6200EA","color-minty-green-50":"#DAF2EE","color-minty-green-100":"#ACE5DC","color-minty-green-200":"#70CCBD","color-minty-green-300":"#42BDA8","color-minty-green-400":"#22AB94","color-minty-green-500":"#089981","color-minty-green-600":"#06806B","color-minty-green-700":"#056656","color-minty-green-800":"#004D40","color-minty-green-900":"#00332A","color-minty-green-a400":"#2BD9BC","color-minty-green-a700":"#24B29B","color-minty-green-a900":"#082621","color-grapes-purple-50":"#F3E5F5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a200":"#E040FB","color-grapes-purple-a400":"#D500F9","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a100":"#ff80ab","color-berry-pink-a200":"#ff4081","color-berry-pink-a400":"#f50057","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-forest-green-50":"#DAF2E6","color-forest-green-100":"#ACE5C9","color-forest-green-200":"#70CC9E","color-forest-green-300":"#42BD7F","color-forest-green-400":"#22AB67","color-forest-green-500":"#089950","color-forest-green-600":"#068043","color-forest-green-700":"#056636","color-forest-green-800":"#004D27","color-forest-green-900":"#1A3326","color-facebook":"#1877F2","color-deep-facebook":"#1564CA","color-twitter":"#1DA1F2","color-deep-twitter":"#188CD3","color-youtube":"#FF0000","color-linkedin":"#007BB5","color-aqua-spring":"#ebf9f5","color-army-green":"#3d2c12","color-army-green-2":"#31230d","color-athens-gray-1":"#f2f3f5","color-athens-gray-2":"#f7f8fa","color-athens-gray-3":"#eceff2","color-black-180":"#b4b4b4","color-blue-dianne":"#21384d","color-bluish":"#2185cc","color-bright-gray":"#363c4e","color-brownish-grey":"#8d6e63","color-carnation":"#f04561","color-catskill-white":"#e1ecf2","color-charade":"#2f3241","color-charcoal-grey":"#323337","color-curious-blue":"#299dcd","color-dark-blue-grey":"#123440","color-darkness-blue-grey":"#12213b","color-dark-grey":"#292a2d","color-dark-grey-blue":"#28415a","color-dark-sky-blue":"#37a6ef","color-deep-sea-blue":"#016087","color-ebony-clay":"#262b3e","color-foam":"#d7f0fb","color-gull-gray":"#9db2bd","color-humming-bird":"#d3eef9","color-keppel-1":"#37bc9b","color-keppel-2":"#34b293","color-lavender-blush":"#ffedf0","color-lightish-purple":"#a75ee8","color-loblolly":"#c5cbce","color-manatee":"#878ca8","color-mandy":"#eb4d5c","color-medium-blue":"#2e7bb2","color-milk-chocolate":"#6f2626","color-mirage-1":"#131722","color-mirage-2":"#171b29","color-mirage-3":"#1c2030","color-mischka":"#d6d8e0","color-morning-glory":"#9addcc","color-oslo-gray":"#8b8e95","color-pale":"#fff2cf","color-pale-grey-1":"#f9fafb","color-pale-grey-2":"#e7ebee","color-pale-sky":"#6b7988","color-picton-blue-1":"#3bb3e4","color-puerto-rico":"#3bc2a1","color-purple-brown":"#4e2934","color-purple-brown-2":"#3d2028","color-radical-red":"#ff4a68","color-regent-gray":"#8797a5","color-scooter":"#38acdb","color-silver-tree":"#53b987","color-slate-gray":"#758696","color-sundown":"#ffa4b3","color-sunglow":"#ffca3b","color-tan-hide":"#ff9850","color-trout-1":"#4c525e","color-trout-2":"#4f5966","color-violet-1":"#332738","color-violet-2":"#271d2b","color-white-ice":"#ebf7fc","color-wild-watermelon":"#ff5773","color-readonly-input":"#b4b4b4","color-brand-dark":"#2a2c39","color-seeking-alpha-brand":"#ff7200"}'),r=JSON.parse('{"color-header-bg":"color-white","color-body-bg":"color-white","color-body-secondary-bg":"color-cold-gray-100","color-bg-primary":"color-white","color-bg-primary-hover":"color-cold-gray-100","color-bg-secondary":"color-white","color-bg-highlight":"color-cold-gray-50","color-bg-scroll-buttons":"color-cold-gray-100","color-legacy-bg-scroll-buttons":"color-cold-gray-850","color-legacy-bg-widget":"color-white","color-text-primary":"color-cold-gray-900","color-text-secondary":"color-cold-gray-550","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-300","color-accent-content":"color-cold-gray-900","color-box-shadow":"color-cold-gray-300","color-divider":"color-cold-gray-150","color-divider-hover":"color-cold-gray-100","color-divider-secondary":"color-cold-gray-100","color-active-hover-text":"color-cold-gray-900","color-alert-text":"color-cold-gray-900","color-border-table":"color-cold-gray-100","color-brand":"color-tv-blue-500","color-brand-active":"color-tv-blue-700","color-brand-hover":"color-tv-blue-600","color-chart-page-bg":"color-cold-gray-150","color-common-tooltip-bg":"color-cold-gray-800","color-danger":"color-ripe-red-400","color-danger-hover":"color-ripe-red-500","color-danger-active":"color-ripe-red-600","color-depthrenderer-stroke-style":"color-cold-gray-100","color-highlight-new":"color-tan-orange-50","color-input-bg":"color-white","color-input-publish-bg":"color-white","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-700","color-list-nth-child-bg":"color-cold-gray-50","color-pane-bg":"color-white","color-pane-secondary-bg":"color-cold-gray-100","color-popup-menu-item-hover-bg":"color-cold-gray-100","color-popup-menu-separator":"color-cold-gray-150","color-screener-description":"color-cold-gray-650","color-success":"color-minty-green-500","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-700","color-toolbar-button-text":"color-cold-gray-900","color-toolbar-button-text-hover":"color-cold-gray-900","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-100","color-toolbar-button-background-secondary-hover":"color-cold-gray-150","color-toolbar-button-background-active":"color-tv-blue-50","color-toolbar-button-background-active-hover":"color-tv-blue-100","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-toggle-button-icon":"color-cold-gray-200","color-toolbar-interactive-element-text-normal":"color-cold-gray-900","color-toolbar-interactive-element-text-hover":"color-cold-gray-900","color-toolbar-opened-element-bg":"color-cold-gray-100","color-toolbar-divider-background":"color-cold-gray-150","color-tooltip-bg":"color-cold-gray-800","color-tv-dialog-caption":"color-cold-gray-650","color-tv-dropdown-item-hover-bg":"color-cold-gray-100","color-underlined-text":"color-cold-gray-500","color-widget-pages-bg":"color-white","color-warning":"color-tan-orange-500","color-growing":"color-minty-green-500","color-falling":"color-ripe-red-500","color-forex-icon":"color-cold-gray-750","color-list-item-active-bg":"color-tv-blue-400","color-list-item-hover-bg":"color-tv-blue-50","color-list-item-text":"color-cold-gray-800","color-price-axis-label-back":"color-cold-gray-150","color-price-axis-label-text":"color-cold-gray-650","color-price-axis-gear":"color-cold-gray-900","color-price-axis-gear-hover":"color-black","color-price-axis-highlight":"color-cold-gray-150","color-bid":"color-tv-blue-500","color-border":"color-cold-gray-150","color-border-chat-fields":"color-cold-gray-250","color-border-hover":"color-cold-gray-250","color-button-hover-bg":"color-cold-gray-150","color-depthrenderer-fill-style":"color-cold-gray-650","color-disabled-border-and-color":"color-cold-gray-150","color-disabled-input":"color-cold-gray-150","color-empty-container-message":"color-cold-gray-550","color-icons":"color-cold-gray-550","color-input-textarea-readonly":"color-cold-gray-650","color-input-placeholder-text":"color-cold-gray-350","color-item-active-blue":"color-tv-blue-50","color-item-hover-active-bg":"color-tv-blue-100","color-item-hover-bg":"color-tv-blue-100","color-item-hover-blue":"color-tv-blue-100","color-item-selected-blue":"color-tv-blue-50","color-item-active-text":"color-white","color-item-active-bg":"color-tv-blue-500","color-list-item":"color-cold-gray-550","color-news-highlight":"color-tv-blue-100","color-placeholder":"color-cold-gray-350","color-row-hover-active-bg":"color-cold-gray-100","color-sb-scrollbar-body-bg":"color-cold-gray-200","color-section-separator-border":"color-cold-gray-300","color-separator-table-chat":"color-cold-gray-150","color-tag-active-bg":"color-cold-gray-200","color-tag-hover-bg":"color-cold-gray-150","color-text-regular":"color-cold-gray-700","color-tv-button-checked":"color-cold-gray-550","color-scroll-bg":"color-cold-gray-400","color-scroll-border":"color-cold-gray-100","color-widget-border":"color-cold-gray-100","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-200","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-500","color-goto-label-background":"color-cold-gray-800","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-market-expired":"color-ripe-red-500","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-700","color-replay-mode":"color-tv-blue-500","color-replay-mode-icon":"color-white","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-700","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-700","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-700","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-700","color-list-item-bg-highlighted":"color-tv-blue-50","color-list-item-bg-selected":"color-tv-blue-100","color-list-item-bg-highlighted-hover":"color-tv-blue-100","color-list-item-bg-selected-hover":"color-tv-blue-200","color-screener-header-bg":"color-white","color-screener-header-bg-hover":"color-cold-gray-100","color-marker-flagged":"color-ripe-red-400","color-marker-flagged-hovered":"color-ripe-red-600","color-ask":"color-ripe-red-400","color-sell":"color-ripe-red-400","color-buy":"color-tv-blue-500","color-neutral":"color-cold-gray-500","color-pro":"color-minty-green-400","color-pro-hover":"color-minty-green-600","color-pro-plus":"color-tv-blue-500","color-pro-plus-hover":"color-tv-blue-600","color-pro-premium":"color-tan-orange-500","color-pro-premium-hover":"color-tan-orange-700","color-trial":"color-cold-gray-500","color-trial-hover":"color-cold-gray-600","color-mod":"color-ripe-red-400","color-mod-hover":"color-ripe-red-600","color-ad":"color-tan-orange-500","color-broker-featured":"color-minty-green-400","color-broker-featured-hover":"color-minty-green-600","color-alert-status-active":"color-minty-green-400","color-alert-status-stopped":"color-ripe-red-500","color-alert-status-triggered":"color-tan-orange-500","color-overlay":"color-cold-gray-400","color-search-button-hover":"color-cold-gray-150","color-boost-button-content-selected":"color-tv-blue-600","color-boost-button-content-hover":"color-cold-gray-900","color-boost-button-bg-hover":"color-cold-gray-150","color-boost-button-border-hover":"color-cold-gray-150","color-boost-button-border-default":"color-cold-gray-150","color-common-tooltip-text":"color-cold-gray-100","color-replay-data-mode":"color-radical-red","color-legacy-success":"color-keppel-1","color-collapse-tabs-border":"color-athens-gray-3","color-site-widget-hover":"color-athens-gray-1","color-attention":"color-sunglow","color-card-border":"color-cold-gray-150","color-card-border-hover":"color-cold-gray-300","color-background-special-primary":"color-white","color-stroke-special-primary":"color-cold-gray-150","color-selection-bg":"color-tv-blue-100"}') ;var i=o(650151);const n={...s,...r},l={},a=Object.keys(n).length,c=/^#[0-9A-F]{6}$/i;function d(e,t=[]){const o=n[e];if(!o)return null;if(c.test(o))return o;const s=o;return t.push(e),-1!==t.indexOf(s)?(console.warn("Colors definitions cycled"),o):t.length>a?(console.warn("Too many variables-link in HEX-color search: "+t[0]),null):d(s,t)}Object.keys(n).forEach((e=>{const t=d(e);l[e]=(0,i.ensureNotNull)(t)}));const h=l;function u(e){const t=h[e];if(!t)throw new Error("No such color "+e);return t}},728804:(e,t,o)=>{"use strict";o.d(t,{CustomBehaviourContext:()=>s,presetDefault:()=>r,presetPlatform:()=>i});const s=(0,o(50959).createContext)({enableActiveStateStyles:!0});s.displayName="CustomBehaviourContext";const r={enableActiveStateStyles:!0},i={enableActiveStateStyles:!1}},745269:(e,t,o)=>{"use strict";o.d(t,{dur:()=>s,easingFunc:()=>r,CubicBezier:()=>i,color:()=>n});const s=350,r={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1- --e*e*e*e,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1+--e*e*e*e*e,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e};class i{constructor(e,t,o,s){this._mX1=e,this._mY1=t,this._mX2=o,this._mY2=s}easingFunc(e){return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))}_a(e,t){return 1-3*t+3*e}_b(e,t){return 3*t-6*e}_c(e){return 3*e}_calcBezier(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e}_getSlope(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)}_getTForX(e){let t=e;for(let o=0;o<4;++o){const o=this._getSlope(t);if(0===o)return t;t-=(this._calcBezier(t)-e)/o}return t}}const n={black70:"#4A4A4A",black80:"#535353"}},612247:(e,t,o)=>{"use strict";o.d(t,{Loader:()=>c});var s,r=o(50959),i=o(497754),n=o(745269),l=o(732003),a=o.n(l);!function(e){e[e.Initial=0]="Initial",e[e.Appear=1]="Appear",e[e.Active=2]="Active"}(s||(s={}));class c extends r.PureComponent{constructor(e){super(e),this._stateChangeTimeout=null,this.state={state:s.Initial}}render(){const{className:e,color:t="black",size:o="medium",staticPosition:s}=this.props,n=i(a().item,a()[t],a()[o]);return r.createElement("span",{className:i(a().loader,s&&a().static,this._getStateClass(),e)},r.createElement("span",{className:n}),r.createElement("span",{className:n}),r.createElement("span",{className:n}))}componentDidMount(){this.setState({state:s.Appear}),this._stateChangeTimeout=setTimeout((()=>{this.setState({state:s.Active})}),2*n.dur)}componentWillUnmount(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)}_getStateClass(){switch(this.state.state){case s.Initial:return a()["loader-initial"];case s.Appear:return a()["loader-appear"];default:return""}}}},451608:(e,t,o)=>{"use strict";o.d(t,{SwitchGroup:()=>s.SwitchGroup, makeSwitchGroupItem:()=>n});var s=o(367254),r=o(50959),i=o(719036);function n(e){var t;return t=class extends r.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.switchGroupContext.getOnChange()(e)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}componentDidMount(){this.context.switchGroupContext.subscribe(this._onUpdate)}render(){return r.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.switchGroupContext.unsubscribe(this._onUpdate)}_getName(){return this.context.switchGroupContext.getName()}_isChecked(){return this.context.switchGroupContext.getValues().includes(this.props.value)}},t.contextTypes={switchGroupContext:i.any.isRequired},t}},367254:(e,t,o)=>{"use strict";o.d(t,{SwitchGroup:()=>i});var s=o(50959),r=o(719036);class i extends s.PureComponent{constructor(){super(...arguments),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)}}getChildContext(){return{switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return this.props.children}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach((t=>t(e)))}_getUpdates(e,t){return[...t,...e].filter((o=>t.includes(o)?!e.includes(o):e.includes(o)))}}i.childContextTypes={switchGroupContext:r.any.isRequired}},694553:(e,t,o)=>{"use strict";o.d(t,{Switch:()=>c});var s=o(50959),r=o(497754),i=o(728804),n=o(965759),l=o.n(n);function a(e){const t=(0,s.useContext)(i.CustomBehaviourContext),{className:o,intent:n="default",size:a="small",enableActiveStateStyles:c=t.enableActiveStateStyles}=e;return r(o,l().switcher,l()[`size-${a}`],l()[`intent-${n}`],!c&&l()["disable-active-state-styles"])}function c(e){var t;const{reference:o,size:r,intent:i,role:n,"aria-checked":c,checked:d,defaultChecked:h,onKeyDown:u,...p}=e,_=(0,s.useCallback)((e=>{13===e.keyCode&&e.target.click(),u&&u(e)}),[u]);return s.createElement("span",{className:a(e)},s.createElement("input",{...p,type:"checkbox",className:l().input,ref:o,role:null!=n?n:"switch","aria-checked":null!==(t=null!=c?c:d)&&void 0!==t?t:h,checked:d,defaultChecked:h,onKeyDown:_}),s.createElement("span",{className:l()["thumb-wrapper"]},s.createElement("span",{className:l().track}),s.createElement("span",{className:l().thumb})))}},797638:(e,t,o)=>{"use strict";o.d(t,{createEmbedWidgetWrapper:()=>n});o(294123);var s=o(650151),r=o(351079),i=o(23580);function n(e,t,o={}){if(null===e.parentElement)return console.warn("Can not wrap 'elWidgetContainer' because it has no parentElement"),e;let n=null,l=document.querySelector(".js-embed-widget-body");const a=null!==l;if(a){l=(0,s.ensureNotNull)(l),n=(0,s.ensureNotNull)(l.parentElement) ;let e=document.querySelector(".js-embed-widget-head");null===e&&(e=document.createElement("div"),e.classList.add("tv-embed-widget-wrapper__header"),e.classList.add("js-embed-widget-head"),n.insertBefore(e,l))}else n=document.createElement("div"),n.classList.add("tv-embed-widget-wrapper"),n.innerHTML='
',l=n.querySelector(".js-embed-widget-body");if(o.overflowAuto&&l.classList.add("tv-embed-widget-wrapper__body--overflow_auto"),o.showBorderOnTransparent&&l.classList.add("tv-embed-widget-wrapper__body--border-on-transparent"),!o.isWhiteLabel){const e=!document.documentElement.classList.contains("is-transparent")||Boolean(o.showBorderOnTransparent);(0,i.getCustomerCopyrightData)(o.customer,o.locale,t).then((t=>{(0,s.ensureNotNull)(l).appendChild((0,r.createCopyrightLabel)({snapToEdge:e,...o.copyrightOptions,...t,isSheriffDisabled:o.isSheriffDisabled}))}))}return a||(e.parentElement.insertBefore(n,e),l.appendChild(e)),e}},428019:(e,t,o)=>{"use strict";o.d(t,{ColorSelector:()=>g});var s,r=o(50959),i=o(797035),n=o(451608),l=o(497754),a=o.n(l),c=o(83436),d=o(948019),h=o(676809),u=o(24122),p=o(810684);const _=(0,n.makeSwitchGroupItem)(((s=class extends r.PureComponent{constructor(){super(...arguments),this._onClickIfChecked=()=>{this.props.onClickIfChecked&&this.props.onClickIfChecked(this.props.value)},this._onChange=()=>{this.props.onChange&&this.props.onChange(this.props.value)}}render(){var e,t;const{className:o,value:s,name:i,checked:n}=this.props,l=null!==(t=null===(e=this.context)||void 0===e?void 0:e.type)&&void 0!==t?t:"menu",d=s;return r.createElement("label",{className:a()(o,p.wrap,"drawer"===l&&p.large)},r.createElement("input",{className:p.input,type:"radio",name:i,value:s,checked:n,onChange:this._onChange,onClick:n?this._onClickIfChecked:void 0}),r.createElement("div",{className:a()(p.box,p[d],"drawer"===l&&p.large)},n?r.createElement(c.Icon,{icon:h}):r.createElement("div",{className:p.pickerDot},r.createElement(c.Icon,{className:p.hoverDot,icon:u}))))}}).contextType=d.ContextMenuContext,s.defaultProps={value:i.ListColor.Red},s));class g extends r.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.props.onChange&&this.props.onChange(e)}}render(){const{buttonClassName:e,value:t,onSelectedClick:o}=this.props,s=i.LIST_COLORS.map(((t,s)=>r.createElement(_,{className:e,onClickIfChecked:o,key:s,value:t})));return r.createElement(n.SwitchGroup,{name:"color-selector",onChange:this._onChange,values:[t||""]},s)}}},589007:(e,t,o)=>{"use strict";o.d(t,{PopupColorSelector:()=>y});var s=o(50959),r=o(500962),i=o(670797),n=o(642709),l=o(18182),a=o(332585),c=o(67812),d=o(762852),h=o(768038),u=o(707533),p=o(428019),_=o(778785),g=o(294155);class m extends s.PureComponent{constructor(){super(...arguments),this._popUpElem=null,this._onChange=e=>{this.props.onSelectColor(e),this.props.hide()},this._onTargetMouseLeave=e=>{ const t=!!e.relatedTarget.nodeName,o=e.relatedTarget===this._popUpElem,s=this._popUpElem&&t&&this._popUpElem.contains(e.relatedTarget);o||s||this.props.hide()},this._onPopUpMouseLeave=e=>{const t=!!e.nativeEvent.relatedTarget.nodeName,o=e.nativeEvent.relatedTarget===this.props.elem,s=t&&this.props.elem.contains(e.nativeEvent.relatedTarget);o||s||this.props.hide()},this._onTouchStart=e=>{const t=!!e.target.nodeName,o=e.target===this.props.elem,s=e.target===this._popUpElem,r=t&&this.props.elem.contains(e.target),i=this._popUpElem&&t&&this._popUpElem.contains(e.target);o||r||s||i||this.props.hide()},this._setPopUpElem=e=>{this._popUpElem=e}}componentDidMount(){document.documentElement&&(_.mobiletouch?document.documentElement.addEventListener("touchstart",this._onTouchStart):(this.props.elem.addEventListener("mouseleave",this._onTargetMouseLeave),document.body.addEventListener("scroll",this.props.hide)))}componentWillUnmount(){document.documentElement&&(_.mobiletouch?document.documentElement.removeEventListener("touchstart",this._onTouchStart):this.props.elem&&(this.props.elem.removeEventListener("mouseleave",this._onTargetMouseLeave),document.documentElement.removeEventListener("scroll",this.props.hide)))}render(){const e={top:0,left:0};if(this.props.elem){const t=this.props.elem.getBoundingClientRect();e.top=t.top+t.height/2,e.left=t.left+((0,h.isRtl)()?0:t.width)}return s.createElement(u.Portal,null,s.createElement("div",{style:e,className:g.popup,ref:this._setPopUpElem,onMouseLeave:_.mobiletouch?void 0:this._onPopUpMouseLeave},s.createElement("div",{className:g.wrapper},s.createElement("div",{className:g.selector},s.createElement("div",{className:g.arrowLeft}),s.createElement(p.ColorSelector,{buttonClassName:g.colorSelectButton,value:this.props.currentColor,onChange:this._onChange})))))}}var f=o(948019);function v(e){const{actions:t,...o}=e;return s.createElement(l.MatchMedia,{rule:n.DialogBreakpoints.TabletSmall},(e=>e&&t?s.createElement(a.DrawerManager,null,s.createElement(f.ContextMenuContext.Provider,{value:{type:"drawer"}},s.createElement(d.Drawer,{onClose:o.hide,position:"Bottom"},s.createElement(c.ContextMenuList,{items:t})))):s.createElement(m,{...o})))}let b=null;var y;!function(e){function t(){b&&r.unmountComponentAtNode(b)}e.show=function(e){b||(b=document.createElement("div")),t(),r.render(s.createElement(i.SlotContext.Provider,{value:e.manager||null},s.createElement(v,{...e,hide:t})),b)},e.hide=t}(y||(y={}))},793242:(e,t,o)=>{"use strict";o.d(t,{MarketDialogMode:()=>s,MarketDialogContext:()=>i});var s,r=o(50959);!function(e){e.Single="single",e.Multi="multi"}(s||(s={}));const i=(0,r.createContext)(null)},35387:(e,t,o)=>{"use strict";o.d(t,{marketGroupName:()=>i,entireWorldMarket:()=>n});var s=o(777754),r=o(19138);const i={"Entire World":"","North America":s.t(null,void 0,o(380545)),Europe:s.t(null,void 0,o(559592)),"Middle East / Africa":s.t(null,void 0,o(985766)),"Mexico and South America":s.t(null,void 0,o(564135)),"Asia / Pacific":s.t(null,void 0,o(685332)),Worldwide:s.t(null,void 0,o(628584))},n={ value:"entire_world",name:s.t(null,void 0,o(886460)),desc:"",group:"Entire World",icon:r}},67905:(e,t,o)=>{"use strict";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 r(e,t){return t.map((t=>e.find((e=>e.value===t))))}o.d(t,{splitMarketsByGroup:()=>s,getMarketsByNames:()=>r})},607436:(e,t,o)=>{"use strict";o.d(t,{DEFAULT_SIZE:()=>s,spinnerSizeMap:()=>r});const s="large",r={mini:"xsmall",xsmall:"xsmall",small:"small",medium:"medium",large:"large"}},941285:(e,t,o)=>{"use strict";o.d(t,{Spinner:()=>n});o(202970);var s=o(878134),r=o(607436);const i=(0,s.parseHtmlElement)(function(e=""){return`
`}());class n{constructor(e){this._shown=!1,this._el=i.cloneNode(!0),this.setSize(r.spinnerSizeMap[e||r.DEFAULT_SIZE])}spin(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,void 0!==e&&e.appendChild(this._el)),this._shown=!0,this}stop(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this}setStyle(e){return Object.keys(e).forEach((t=>{const o=e[t];void 0!==o&&this._el.style.setProperty(t,o)})),this}style(){return this._el.style}setSize(e){const t=void 0!==e?`tv-spinner--size_${e}`:"";return this._el.className=`tv-spinner ${t} ${this._shown?"tv-spinner--shown":""}`,this}getEl(){return this._el}destroy(){this.stop(),delete this._el,delete this._container}}},780792:(e,t,o)=>{"use strict";o.d(t,{AbstractIndicator:()=>l});var s=o(272001),r=o(777491),i=o(947809);o(309103);const n=(0,s.getLogger)("GUI.Blocks.AbstractIndicator");class l{constructor(e){this._classSuffix="",this._quoteSessionPrefix="abstract-indicator",this._shortMode=!1,this._showTooltip=!0,this._subscribed=!1,this._tooltipType="custom",this._lastTooltipText="",this._quoteSession=e.quoteSession}getValue(){return this._value}getTooltipText(){return this._labelMap[this._value]||""}getLabel(){return this._labelMap[this._value]||""}getElement(){return this._el}update(e,t){this._updateValue(e,t),this._render()}setTooltipEnabled(e=!1){this._showTooltip!==e&&(this._showTooltip=e,this._renderTooltip())}enableShortMode(){!0!==this._shortMode&&(this._shortMode=!0,this._render())}disableShortMode(){!1!==this._shortMode&&(this._shortMode=!1,this._render())}isShortModeEnabled(){return this._shortMode}start(){!this._subscribed&&this._symbolName&&(this._quoteSession||(this._quoteSession=(0,i.getQuoteSessionInstance)("simple")),this._quoteSession.subscribe(this._getQuoteSessionId(),this._symbolName,this.update.bind(this)),this._subscribed=!0)}stop(){this._subscribed&&this._quoteSession&&this._symbolName&&(this._quoteSession.unsubscribe(this._getQuoteSessionId(),this._symbolName),this._subscribed=!1)}_init(e){this._el=e.el?e.el:document.createElement("span"),this._el.innerHTML="",this._classMap=e.classMap,this._labelMap=e.labelMap,this._showTooltip=e.showTooltip,this._classSuffix=e.classSuffix,this._symbolName=e.symbol, e.tooltipType&&(this._tooltipType=e.tooltipType),this._quoteSessionGUID=(0,r.guid)(),!0===e.short&&this.enableShortMode(),e.data&&this._updateValue(e.data)}_clearClasses(){Object.values(this._classMap).map((e=>{this._el.classList.remove(`${e}`),this._el.classList.remove(`${e}${this._classSuffix}`)}))}_render(){this._renderClasses(),this._renderTooltip(),this._renderLabel()}_renderLabel(){this._el.textContent=this.getLabel()}_updateValue(e,t){const o=this._getValueFromData(e);(t||o!==this._value)&&(this._value=o)}_renderClasses(){const e=this._el.classList;e.add(this._componentClass,this._componentClass+this._classSuffix);const t=this._classMap[this._value];for(const o in this._classMap){const s=this._classMap[o];s&&(s===t?e.add(s,s+this._classSuffix):e.remove(s,s+this._classSuffix))}!t&&this._value&&n.logWarn(`no className for status ${this._value}`)}_renderTooltip(){const e=this._showTooltip?this.getTooltipText():"";e!==this._lastTooltipText&&(this._lastTooltipText=e,this._el.setAttribute("title",e),"custom"===this._tooltipType&&this._el.classList.toggle("apply-common-tooltip",this._showTooltip))}_getQuoteSessionId(){return`${this._quoteSessionPrefix}.${this._quoteSessionGUID}`}}},719240:(e,t,o)=>{"use strict";o.d(t,{DataModeIndicator:()=>c});var s=o(777754),r=(o(984919),o(694089),o(780792));const i={connecting:s.t(null,void 0,o(413859)),delayed:s.t(null,void 0,o(78211)),delayed_streaming:s.t(null,void 0,o(78211)),endofday:s.t(null,void 0,o(132023)),forbidden:s.t(null,void 0,o(113439)),realtime:s.t(null,void 0,o(906530)),snapshot:s.t(null,void 0,o(502927)),loading:"",replay:s.t(null,void 0,o(688506))},n={connecting:s.t(null,{context:"data_mode_connecting_letter"},o(52587)),delayed:s.t(null,{context:"data_mode_delayed_letter"},o(469219)),delayed_streaming:s.t(null,{context:"data_mode_delayed_streaming_letter"},o(426211)),endofday:s.t(null,{context:"data_mode_end_of_day_letter"},o(960582)),forbidden:s.t(null,{context:"data_mode_forbidden_letter"},o(957357)),realtime:s.t(null,{context:"data_mode_realtime_letter"},o(647310)),snapshot:s.t(null,{context:"data_mode_snapshot_letter"},o(87817)),loading:"",replay:s.t(null,{context:"data_mode_replay_letter"},o(214485))},l={streaming:"realtime"},a={classMap:{connecting:"tv-data-mode--connecting",delayed:"tv-data-mode--delayed",delayed_streaming:"tv-data-mode--delayed",endofday:"tv-data-mode--endofday",forbidden:"tv-data-mode--forbidden",realtime:"tv-data-mode--realtime",snapshot:"tv-data-mode--snapshot",loading:"tv-data-mode--loading",replay:"tv-data-mode--replay"},classSuffix:"",data:{values:{update_mode:"connecting"}},labelMap:i,modeInterval:600,short:!1,shortLabelMap:n,showTooltip:!0,tooltipType:"custom"};class c extends r.AbstractIndicator{constructor(e){super(e),this._quoteSessionPrefix="data-mode-indicator",this._componentClass="tv-data-mode",this._init(e)}getLabel(){return!0===this._shortMode?this._shortLabelMap[this._value]||"":super.getLabel()}setMode(e,t){this.update({values:{update_mode:e,update_mode_seconds:t}})}hide(){this._el.classList.add("i-hidden")}show(){ this._el.classList.remove("i-hidden")}getTooltipText(){let e="";const t=this.getValue();if(""===t)return e;switch(t){case"delayed":e=s.t(null,void 0,o(728332));break;case"delayed_streaming":e=s.t(null,void 0,o(887267));break;default:e=this._labelMap[t]||e}return["delayed","delayed_streaming"].includes(t)&&(e=e.format({number:String(Math.round(this._modeInterval/60))})),e}_init(e={}){const t=Object.assign({},a,e);this._modeInterval=t.modeInterval||600,this._shortLabelMap=t.shortLabelMap||n,super._init(t),this._render()}_getValueFromData(e){let t;return t=void 0!==e.values&&void 0!==e.values.update_mode?e.values.update_mode:this.getValue(),l[t]||t}_updateValue(e,t){void 0!==e.values&&void 0!==e.values.update_mode_seconds&&(this._modeInterval=e.values.update_mode_seconds),super._updateValue(e,t)}}},605324:(e,t,o)=>{"use strict";o.d(t,{flagHtml:()=>r});var s=o(713438);function r(e){return`${e}`}},531327:(e,t,o)=>{"use strict";function s(e){return r()?0:i()?46:Math.min(Math.max(e,46),450)}o.d(t,{getWidgetBarPadding:()=>s,isWidgetBarFullscreen:()=>r});const r=()=>!window.matchMedia("screen and (min-width: 768px)").matches,i=()=>!window.matchMedia("screen and (min-width: 1280px)").matches},975420:(e,t,o)=>{"use strict";o.d(t,{initGA:()=>c,trackTiming:()=>d});var s=o(251954),r=o(261030),i=o(588948),n=o(638456),l=o(691805);let a=!1;function c(){if(a)return;(0,i.updateInitData)();const e=(0,i.getInitData)();if(!e.gaId)return void(window.gtag=()=>{});a=!0,(0,l.appendScript)(`https://www.googletagmanager.com/gtag/js?id=${(0,i.getInitData)().gaId}`),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);const t={optimize_id:e.optimizeId,anonymize_ip:!0};window.TVD&&(t.app_name="TVD",t.app_version=(0,n.desktopAppVersion)()),e.gaVars&&window.gtag("set",e.gaVars),window.gtag("consent","default",{analytics_storage:(0,r.getCookieSetting)(r.CookieSettings.Analytics)?"granted":"denied"}),window.gtag("config",e.gaId,t),s.subscribe(r.cookieSettingsChangeEvent,((e,t)=>{e===r.CookieSettings.Analytics&&window.gtag("consent","update",{analytics_storage:t?"granted":"denied"})}),null)}function d(e,t,o,s){c(),window.gtag("event","timing_complete",{name:t,value:o,event_category:e,event_label:s})}},414879:(e,t,o)=>{"use strict";var s,r;o.r(t),o.d(t,{WeekDays:()=>s,Months:()=>r}),function(e){e[e.SUNDAY=1]="SUNDAY",e[e.MONDAY=2]="MONDAY",e[e.TUESDAY=3]="TUESDAY",e[e.WEDNESDAY=4]="WEDNESDAY",e[e.THURSDAY=5]="THURSDAY",e[e.FRIDAY=6]="FRIDAY",e[e.SATURDAY=7]="SATURDAY"}(s||(s={})),function(e){e[e.JANUARY=0]="JANUARY",e[e.FEBRUARY=1]="FEBRUARY",e[e.MARCH=2]="MARCH",e[e.APRIL=3]="APRIL",e[e.MAY=4]="MAY",e[e.JUNE=5]="JUNE",e[e.JULY=6]="JULY",e[e.AUGUST=7]="AUGUST",e[e.SEPTEMBER=8]="SEPTEMBER",e[e.OCTOBER=9]="OCTOBER",e[e.NOVEMBER=10]="NOVEMBER",e[e.DECEMBER=11]="DECEMBER"}(r||(r={}))},552279:(e,t,o)=>{"use strict";o.d(t,{reloginOrGoPro:()=>u,runOrGoPro:()=>h,runOrGoProWithoutSync:()=>d}) ;var s=o(526225),r=o(508846),i=o(632446),n=o(833813);function l(e,t,o){return t.value||(0,i.enabled)(e,o)}function a(e,t,o){switch(e){case n.ProductFeatures.SCREENER_INTERVALS:return function(e,t){const o=(0,i.getConfig)(n.ProductFeatures.SCREENER_INTERVALS,t);return!(!o||!o.interval)&&o.interval.includes(e.interval)}(t,o);case n.ProductFeatures.SCREENER_AUTO_REFRESH:return l(n.ProductFeatures.SCREENER_AUTO_REFRESH,t,o);case n.ProductFeatures.ALERTS_NO_EXPIRATION:return l(n.ProductFeatures.ALERTS_NO_EXPIRATION,t,o);default:return(0,i.enabled)(e,o)}}var c=o(963644);function d(e,t,o,s){a(t,s)?e():(0,r.createGoProDialog)(o)}async function h(e,t,o,r={}){const i=window.is_authenticated;window.is_authenticated&&window.user.is_pro&&await(0,s.syncUserData)("gopro"),i===window.is_authenticated?d(e,t,o,r):(0,c.showSignModal)({source:o.goproSource,feature:o.feature,signinSuccess:e})}async function u(e){const t=window.is_authenticated;window.is_authenticated&&window.user.is_pro&&await(0,s.syncUserData)("gopro"),t===window.is_authenticated?(0,r.createGoProDialog)(e):(0,c.showSignModal)({source:e.goproSource,feature:e.feature})}},104344:(e,t,o)=>{"use strict";o.d(t,{HammerJSLoader:()=>r});var s=o(462282);class r extends class{constructor(){this._retries=5,this._cache=null,this._tryLoad=(e,t)=>{this._retries=this._retries-1;this._startLoading(e).then(t,0!==this._retries?o=>{(0,s.isAbortError)(o)||setTimeout((()=>this._tryLoad(e,t)),3e3)}:void 0)}}load(e){return this._cache||(this._cache=new Promise(this._tryLoad.bind(this,null!=e?e:null))),this._cache}}{_startLoading(){return Promise.all([o.e(11553),o.e(42377)]).then(o.bind(o,825806)).then((e=>e.HammerJS))}}},583912:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Linking:()=>g,linking:()=>m});var s=o(12481),r=o(988411),i=o.n(r),n=o(495046),l=o(720444),a=o(272001),c=o(62802),d=o(588948),h=o(776734),u=o(712270);const p=(0,a.getLogger)("Linking");var _;!function(e){e[e.NotBound=0]="NotBound",e[e.BoundToWidget=1]="BoundToWidget",e[e.BoundToModel=2]="BoundToModel"}(_||(_={}));class g{constructor(){this._watchedSymbol=new(i()),this._seriesShortSymbol=new(i()),this._proSymbol=new(i()),this._watchedInterval=new(i()),this._watchedIntraday=new(i()),this._watchedSeconds=new(i()),this._watchedTicks=new(i()),this._watchedDataFrequencyResolution=new(i()),this._watchedRange=new(i()),this._watchedSupportedResolutions=new(i()),this._watchedSupportedChartStyles=new(i())([]),this._symbolNamesList=new(i()),this._chartWidgetBindingState=_.NotBound,this._activeChartWidget=null,this._watchedSymbolListenerBound=this._watchedSymbolListener.bind(this),this._watchedIntervalListenerBound=this._watchedIntervalListener.bind(this),this._onSymbolLinkBound=this._onSymbolLink.bind(this),this._searchCharts=null,this._searchChartsLoadDebounced=null,this._selfEmit=!1,this._preventFeedBySymbol=!1,this._feedBySymbolDebounceCounter=0}get symbol(){return this._watchedSymbol}get proSymbol(){return this._proSymbol}get symbolNamesList(){return this._symbolNamesList}get seriesShortSymbol(){return this._seriesShortSymbol.readonly()} get interval(){return this._watchedInterval}get intraday(){return this._watchedIntraday.readonly()}get seconds(){return this._watchedSeconds.readonly()}get ticks(){return this._watchedTicks.readonly()}get range(){return this._watchedRange.readonly()}get supportedResolutions(){return this._watchedSupportedResolutions.readonly()}get supportedChartStyles(){return this._watchedSupportedChartStyles.readonly()}get preventFeedBySymbol(){return this._preventFeedBySymbol}get dataFrequencyResolution(){return this._watchedDataFrequencyResolution.readonly()}bindToChartWidget(e){if(this.unbindFromChartWidget(),this._activeChartWidget=e,e.hasModel())return void this._onChartModelCreated(e.model());e.modelCreated().subscribe(this,this._onChartModelCreated),this._chartWidgetBindingState=_.BoundToWidget;const t=e.properties().childs().mainSeriesProperties.childs();this._watchedSymbol.setValue(t.symbol.value()),this._watchedInterval.setValue(t.interval.value())}unbindFromChartWidget(){switch(this._chartWidgetBindingState){case _.BoundToWidget:if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated);break;case _.BoundToModel:this._symbolProperty().unsubscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.unsubscribe(this._watchedSymbolListenerBound),this._mainSeries().dataEvents().symbolResolved().unsubscribe(this,this._updateSeriesSymbolInfo),this._mainSeries().dataEvents().symbolError().unsubscribe(this,this._updateSeriesSymbolInfo),this._intervalProperty().unsubscribe(this,this._onIntervalPropertyChange),this._watchedInterval.unsubscribe(this._watchedIntervalListenerBound),delete this._watchedSymbol.hook,delete this._watchedSymbol.writeLock}this._activeChartWidget=null,this._chartWidgetBindingState=_.NotBound}getChartWidget(){return this._activeChartWidget}bindToChartWidgetCollection(e){this._chartWidgetCollection=e,this.unbindFromChartWidget(),e.activeChartWidget.subscribe((e=>{this.unbindFromChartWidget(),this.bindToChartWidget(e)}),{callWithLast:!0})}bindToSearchCharts(e){this.unbindFromSearchCharts(),this._searchCharts=e,e.onSearchBySymbol.subscribe(this,this._onSearchBySymbol),e.loadingSymbol.subscribe((e=>{!1===e&&(this._feedBySymbolDebounceCounter=0)})),this._watchedSymbol.subscribe(this._onSymbolLinkBound)}unbindFromSearchCharts(){this._searchCharts&&(this._searchCharts.onSearchBySymbol.unsubscribe(this,this._onSearchBySymbol),this._watchedSymbol.unsubscribe(this._onSymbolLinkBound),this._searchCharts=null)}setPreventFeedBySymbol(e){this._preventFeedBySymbol=e}_onSearchBySymbol(e){if(!e.resolved_symbol)throw new Error("no resolved_symbol");this._selfEmit=!0,this._watchedSymbol.setValue(e.resolved_symbol),this._selfEmit=!1}_onSymbolLink(e){if(!this._selfEmit){if(!this._searchCharts){const e="No search charts defined";throw p.logError(e),new Error(e)}this._preventFeedBySymbol||this._loadSearchCharts(e)}}_loadSearchCharts(e){if(!this._searchCharts){const e="No search charts defined";throw p.logError(e),new Error(e)} if(this._searchChartsLoadDebounced)return void(this._feedBySymbolDebounceCounter<100&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced(e)));const t=e=>this._searchCharts?(!0===this._searchCharts.loadingSymbol.value()?this._feedBySymbolDebounceCounter<100&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced=(0,s.default)(t,2e3),this._searchChartsLoadDebounced(e)):this._searchChartsLoadDebounced=null,this._searchCharts.feedBySymbol.call(this._searchCharts,e)):()=>{};!0===this._searchCharts.loadingSymbol.value()?this._feedBySymbolDebounceCounter<100&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced=(0,s.default)(t,2e3),this._searchChartsLoadDebounced(e)):this._searchCharts.feedBySymbol(e)}_mainSeries(){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");return this._activeChartWidget.model().mainSeries()}_properties(){return this._mainSeries().properties()}_symbolProperty(){return this._properties().symbol}_intervalProperty(){return this._properties().interval}_watchedSymbolListener(e){this._symbolProperty().value()!==e&&(this._chartWidgetCollection.setSymbol(e),this._sendSnowplowAnalytics())}_sendSnowplowAnalytics(){if(window.user.do_not_track)return;const e=this._mainSeries(),t=()=>{e.dataEvents().symbolResolved().unsubscribe(this,o)},o=o=>{(0,h.getTracker)().then((e=>{if(null===e)return;const t=this._chartWidgetCollection.layout.value(),s=this._chartWidgetCollection.metaInfo.uid.value()||"";e.trackChartSymbols(o.pro_name,o.type,t,s)})),e.dataEvents().symbolError().unsubscribe(this,t)};e.dataEvents().symbolResolved().subscribe(this,o,!0),e.dataEvents().symbolError().subscribe(this,t,!0)}_onSymbolPropertyChange(){const e=this._symbolProperty().value()!==this._watchedSymbol.value();this._watchedSymbol.setValue(this._symbolProperty().value()),e&&this._chartWidgetCollection.setSymbol(this._symbolProperty().value())}_onSymbolResolved(e){const t=this._mainSeries().symbolInfo();t&&this._applyValuesFromSymbolInfo(t)}_applyValuesFromSymbolInfo(e){const t=e.pro_name||n.enabled("trading_terminal")&&(e.full_name||e.name)||"";this._proSymbol.setValue(t),e.aliases&&this._symbolNamesList.setValue(e.aliases)}_updateSeriesSymbolInfo(){this._seriesShortSymbol.setValue(this._properties().shortName.value());const e=this._mainSeries().symbolInfo();if(e){this._applyValuesFromSymbolInfo(e);let t=(0,u.allChartStyles)();(0,l.isCloseBasedSymbol)(e)&&(t=t.filter((e=>(0,l.isSingleValueBasedStyle)(e)))),this._watchedSupportedChartStyles.setValue(t),this._watchedIntraday.setValue(!!e.has_intraday),this._watchedSeconds.setValue(!!e.has_seconds),this._watchedTicks.setValue(!(0,l.isCloseBasedSymbol)(e)&&!!e.has_ticks),this._watchedRange.setValue(!(0,l.isCloseBasedSymbol)(e));const o=e.data_frequency?e.data_frequency:void 0;this._watchedDataFrequencyResolution.setValue(o)}else this._watchedIntraday.deleteValue(),this._watchedSeconds.deleteValue(),this._watchedTicks.deleteValue(),this._watchedRange.deleteValue(),this._proSymbol.deleteValue()}_watchedIntervalListener(e){ this._intervalProperty().value()!==e&&this._chartWidgetCollection.setResolution(e)}_onIntervalPropertyChange(){const e=this._intervalProperty().value()!==this._watchedInterval.value();this._watchedInterval.setValue(this._intervalProperty().value()),e&&this._chartWidgetCollection.setResolution(this._intervalProperty().value())}_onChartModelCreated(e){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");this._chartWidgetBindingState=_.BoundToModel,this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated);const t=this._symbolProperty();t.subscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.setValue(t.value()),this._watchedSymbol.subscribe(this._watchedSymbolListenerBound);const o=this._mainSeries();o.dataEvents().symbolResolved().subscribe(this,this._onSymbolResolved),this._watchedSymbol.hook=e=>(o.symbolSameAsCurrent(e)&&(e=o.symbol()),e),o.dataEvents().symbolResolved().subscribe(this,this._updateSeriesSymbolInfo),o.dataEvents().symbolError().subscribe(this,this._updateSeriesSymbolInfo),o.dataEvents().symbolNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),o.dataEvents().symbolGroupNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),this._updateSeriesSymbolInfo();const s=this._intervalProperty();s.subscribe(this,this._onIntervalPropertyChange),this._watchedInterval.setValue(s.value()),this._watchedInterval.subscribe(this._watchedIntervalListenerBound),this._activeChartWidget.readOnly()&&(this._watchedSymbol.writeLock=!0)}}const m=new g;{const e=(0,d.getFreshInitData)().symbolInfo,t=e?e.pro_symbol:c.getValue("editchart.model.symbol",window.DEFAULT_SYMBOL);m.symbol.setValue(t)}window.TradingViewApi||(window.TradingViewApi={linking:m})},207678:(e,t,o)=>{"use strict";o.d(t,{breakpoints:()=>s,mobileFirstBreakpoints:()=>r,mobileFirstLegacyBreakpoints:()=>i});const s={desktop:1/0,desktopHd:1919,phone:767,"phone-vertical":479,tablet:1019},r={base:0,"media-mf-phone-vertical":320,"media-mf-phone-landscape":568,"media-mf-tablet-vertical":768,"media-mf-tablet-landscape":1024,"media-mf-laptop":1280,"media-mf-desktop-medium":1440,"media-mf-desktop-large":1920,"media-mf-desktop-extra-large":2560},i={"media-mf-legacy-phone-vertical":330,"media-mf-legacy-phone":480,"media-mf-legacy-notebook":1020,"media-mf-legacy-desktop-medium":1480,"media-mf-legacy-desktop":1531}},76107:(e,t,o)=>{"use strict";o.d(t,{getScrollbarWidth:()=>s,matchMediaMinMax:()=>r,getContentWidth:()=>i,setStyle:()=>n,getCSSProperty:()=>l,getCSSPropertyNumericValue:()=>a});const s=(()=>{let e;return()=>{var t;if(void 0===e){const o=document.createElement("div"),s=o.style;s.visibility="hidden",s.width="100px",s.msOverflowStyle="scrollbar",document.body.appendChild(o);const r=o.offsetWidth;o.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",o.appendChild(i);const n=i.offsetWidth;null===(t=o.parentNode)||void 0===t||t.removeChild(o),e=r-n}return e}})();function r(e,t){ return t===1/0?window.matchMedia(`(min-width: ${e}px)`):window.matchMedia(`(min-width: ${e}px) and (max-width: ${t}px)`)}function i(e){return a(e,"width")-a(e,"padding-left")-a(e,"padding-right")}function n(e,t,o){null!==e&&e.style.setProperty(t,o)}function l(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function a(e,t){return parseInt(l(e,t))}},575658:(e,t,o)=>{"use strict";o.d(t,{setFixedBodyState:()=>l});var s=o(76107),r=o(531327);let i=0,n=!1;function l(e){const{body:t}=document,o=t.querySelector(".widgetbar-wrap");if(e&&1==++i){const e=(0,s.getCSSProperty)(t,"overflow"),r=(0,s.getCSSPropertyNumericValue)(t,"padding-right");"hidden"!==e.toLowerCase()&&t.scrollHeight>t.offsetHeight&&((0,s.setStyle)(o,"right",`${(0,s.getScrollbarWidth)()}px`),t.style.paddingRight=`${r+(0,s.getScrollbarWidth)()}px`,n=!0),t.classList.add("i-no-scroll")}else if(!e&&i>0&&0==--i&&(t.classList.remove("i-no-scroll"),n)){(0,s.setStyle)(o,"right","0px");let e=0;e=o?(0,r.getWidgetBarPadding)((0,s.getContentWidth)(o)):0,t.scrollHeight<=t.clientHeight&&(e-=(0,s.getScrollbarWidth)()),t.style.paddingRight=(e<0?0:e)+"px",n=!1}}},519073:(e,t,o)=>{"use strict";function s(e,t){return t.includes("crypto")||["bitcoin","crypto"].includes(e)}o.d(t,{hasCryptoTypespec:()=>s})},526225:(e,t,o)=>{"use strict";o.d(t,{syncUserData:()=>d,syncUserConversionData:()=>h});var s=o(272001),r=o(345848),i=o(890740),n=o(152198);const l=(0,s.getLogger)("User.Sync");function a(e){return`${e}_${window.user&&window.user.username||""}`}function c(e,t,o){o!==window.user.pro_plan&&(window.user.pro_plan=o,window.user.is_pro=Boolean(o),(0,r.trackEvent)("Sync User Data","Different Pro Plan",a(e))),t!==window.is_authenticated&&(window.is_authenticated=t,window.loginStateChange.fire(),(0,r.trackEvent)("Sync User Data","Different Auth",a(e)))}async function d(e){try{c(e,!0,(await(0,n.getProPlanDetailsForUser)()).pro_plan)}catch(t){!function(e,t){403===t.status&&["not_authenticated","login_required"].includes(t.type||"")?c(e,!1,void 0):l.logError(t.message)}(e,t)}}async function h(e){const t=await(0,i.fetch)("/gopro/"),o=await t.json();return c(e,o.is_authenticated,o.user.pro_plan),o}},763532:(e,t,o)=>{"use strict";o.d(t,{saveTextFile:()=>r,escapeCSVValue:()=>a});var s=o(638456);function r(e,t,o="text/plain"){const r=new Blob([t],{type:o});if(s.CheckMobile.iOS()){const t=new FileReader;return t.onload=()=>{t.result&&i(e,t.result.toString())},void t.readAsDataURL(r)}const n=window.URL.createObjectURL(r);navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,e):window.navigator.msSaveBlob?window.navigator.msSaveBlob(r,e):(i(e,n),window.URL.revokeObjectURL(n))}function i(e,t){const o=document.createElement("a");o.style.display="none",document.body.appendChild(o),o.href=t,o.download=e,o.click(),document.body.removeChild(o)}const n=/[",\r\n]/,l=/"/g;function a(e){return n.test(e)?`"${e.replace(l,'""')}"`:e}},484400:(e,t,o)=>{"use strict";o.d(t,{DEFAULT_THEME:()=>s});const s="light"},369094:(e,t,o)=>{"use strict";o.d(t,{themes:()=>a});var s=o(919346),r=o(777754) ;const i=JSON.parse('{"color-header-bg":"color-black","color-body-bg":"color-black","color-body-secondary-bg":"color-cold-gray-900","color-bg-primary":"color-cold-gray-850","color-bg-primary-hover":"color-cold-gray-800","color-bg-secondary":"color-cold-gray-900","color-bg-highlight":"color-cold-gray-900","color-bg-scroll-buttons":"color-cold-gray-800","color-legacy-bg-scroll-buttons":"color-cold-gray-550","color-legacy-bg-widget":"color-cold-gray-900","color-text-primary":"color-cold-gray-200","color-text-secondary":"color-cold-gray-450","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-650","color-accent-content":"color-white","color-divider":"color-cold-gray-700","color-divider-hover":"color-cold-gray-800","color-divider-secondary":"color-cold-gray-800","color-box-shadow":"color-cold-gray-900","color-active-hover-text":"color-cold-gray-200","color-alert-text":"color-cold-gray-200","color-border":"color-cold-gray-750","color-border-chat-fields":"color-cold-gray-750","color-border-hover":"color-cold-gray-650","color-border-table":"color-cold-gray-800","color-brand":"color-tv-blue-500","color-brand-hover":"color-tv-blue-600","color-brand-active":"color-tv-blue-700","color-button-hover-bg":"color-cold-gray-850","color-chart-page-bg":"color-cold-gray-800","color-common-tooltip-bg":"color-cold-gray-750","color-danger":"color-ripe-red-600","color-danger-hover":"color-ripe-red-500","color-danger-active":"color-ripe-red-400","color-depthrenderer-fill-style":"color-cold-gray-150","color-depthrenderer-stroke-style":"color-cold-gray-650","color-disabled-border-and-color":"color-cold-gray-800","color-disabled-input":"color-cold-gray-750","color-empty-container-message":"color-cold-gray-450","color-highlight-new":"color-tv-blue-a800","color-icons":"color-cold-gray-450","color-input-bg":"color-cold-gray-800","color-input-textarea-readonly":"color-cold-gray-650","color-input-placeholder-text":"color-cold-gray-700","color-input-publish-bg":"color-cold-gray-900","color-item-active-blue":"color-tv-blue-a900","color-item-hover-active-bg":"color-cold-gray-800","color-item-hover-bg":"color-cold-gray-800","color-item-hover-blue":"color-tv-blue-a800","color-item-selected-blue":"color-tv-blue-a800","color-item-active-text":"color-cold-gray-200","color-item-active-bg":"color-tv-blue-500","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-700","color-list-item":"color-cold-gray-450","color-list-nth-child-bg":"color-cold-gray-850","color-news-highlight":"color-cold-gray-800","color-pane-bg":"color-cold-gray-900","color-pane-secondary-bg":"color-cold-gray-850","color-placeholder":"color-cold-gray-650","color-popup-menu-item-hover-bg":"color-cold-gray-800","color-popup-menu-separator":"color-cold-gray-700","color-row-hover-active-bg":"color-cold-gray-800","color-sb-scrollbar-body-bg":"color-cold-gray-650","color-screener-description":"color-cold-gray-200","color-section-separator-border":"color-cold-gray-750","color-search-button-hover":"color-cold-gray-700","color-separator-table-chat":"color-cold-gray-750","color-success":"color-minty-green-700","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-500","color-tag-active-bg":"color-cold-gray-750","color-tag-hover-bg":"color-cold-gray-800","color-text-regular":"color-cold-gray-200","color-toolbar-button-text":"color-cold-gray-200","color-toolbar-button-text-hover":"color-cold-gray-200","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-800","color-toolbar-button-background-secondary-hover":"color-cold-gray-750","color-toolbar-button-background-active":"color-tv-blue-a900","color-toolbar-button-background-active-hover":"color-tv-blue-a800","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-toggle-button-icon":"color-cold-gray-650","color-toolbar-interactive-element-text-normal":"color-cold-gray-200","color-toolbar-interactive-element-text-hover":"color-cold-gray-250","color-toolbar-opened-element-bg":"color-cold-gray-800","color-toolbar-divider-background":"color-cold-gray-700","color-tooltip-bg":"color-cold-gray-750","color-tv-button-checked":"color-cold-gray-500","color-tv-dialog-caption":"color-cold-gray-50","color-tv-dropdown-item-hover-bg":"color-cold-gray-800","color-underlined-text":"color-cold-gray-300","color-widget-pages-bg":"color-cold-gray-900","color-warning":"color-tan-orange-700","color-forex-icon":"color-white","color-list-item-active-bg":"color-tv-blue-500","color-list-item-hover-bg":"color-cold-gray-800","color-list-item-text":"color-cold-gray-200","color-price-axis-label-back":"color-cold-gray-800","color-price-axis-label-text":"color-cold-gray-500","color-price-axis-gear":"color-cold-gray-500","color-price-axis-gear-hover":"color-cold-gray-400","color-price-axis-highlight":"color-cold-gray-800","color-bid":"color-tv-blue-500","color-scroll-bg":"color-cold-gray-750","color-scroll-border":"color-cold-gray-850","color-widget-border":"color-cold-gray-800","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-650","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-700","color-growing":"color-minty-green-500","color-falling":"color-ripe-red-500","color-goto-label-background":"color-cold-gray-650","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-market-expired":"color-ripe-red-500","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-500","color-replay-mode":"color-tv-blue-500","color-replay-mode-icon":"color-tv-blue-50","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-700","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-700","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-700","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-500","color-list-item-bg-highlighted":"color-tv-blue-a900","color-list-item-bg-selected":"color-tv-blue-a800","color-list-item-bg-highlighted-hover":"color-tv-blue-a800","color-list-item-bg-selected-hover":"color-tv-blue-a700","color-screener-header-bg":"color-cold-gray-850","color-screener-header-bg-hover":"color-cold-gray-800","color-overlay":"color-cold-gray-950","color-boost-button-content-selected":"color-tv-blue-100","color-boost-button-content-hover":"color-white","color-boost-button-bg-hover":"color-cold-gray-750","color-boost-button-border-hover":"color-cold-gray-750","color-boost-button-border-default":"color-cold-gray-700","color-card-border":"color-cold-gray-700","color-card-border-hover":"color-cold-gray-600","color-background-special-primary":"color-black","color-stroke-special-primary":"color-cold-gray-800","color-selection-bg":"color-tv-blue-a700"}'),n=JSON.parse('{"color-toolbar-button-text-active":"color-seeking-alpha-brand"}') ;var l=o(488951);const a={[s.StdTheme.Light]:{name:s.StdTheme.Light,label:()=>r.t(null,{context:"colorThemeName"},o(669841)),order:2,getThemedColor:e=>(0,l.getHexColorByName)(e)},[s.StdTheme.Dark]:{name:s.StdTheme.Dark,label:()=>r.t(null,{context:"colorThemeName"},o(14642)),order:1,getThemedColor:e=>{const t=i[e]||e;return(0,l.getHexColorByName)(t)}}};a.sa={isPrivate:!0,noChartTheme:!0,name:"sa",getThemedColor:e=>{const t=n[e]||e;return(0,l.getHexColorByName)(t)}}},919346:(e,t,o)=>{"use strict";o.r(t),o.d(t,{StdTheme:()=>l.StdTheme,getStdChartTheme:()=>d,getStdThemeNames:()=>c,getThemeNameIfStdTheme:()=>p,isStdTheme:()=>u,translateThemeName:()=>h});var s=o(777754),r=o(724377) ;const i=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#131722","lineColor":"rgba(42, 46, 57, 0)","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"rgba(42, 46, 57, 0.06)"},"horzGridProperties":{"color":"rgba(42, 46, 57, 0.06)"},"crossHairProperties":{"color":"#9598A1"},"background":"#ffffff","backgroundGradientStartColor":"#ffffff","backgroundGradientEndColor":"#ffffff","separatorColor":"#E0E3EB"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2962FF","transparency":92},"preMarket":{"color":"#FF9800","transparency":92},"postMarket":{"color":"#2962FF","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#B2B5BE","candleStyle":{"borderColor":"#378658","upColor":"#089981","wickColor":"#737375","wickUpColor":"#089981","wickDownColor":"#F23645","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645"},"haStyle":{"borderColor":"#378658","upColor":"#089981","wickColor":"#737375","wickUpColor":"#089981","wickDownColor":"#F23645","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645"},"barStyle":{"downColor":"#F23645","upColor":"#089981"},"pnfStyle":{"downColor":"#F23645","upColor":"#089981","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"baselineStyle":{"baselineColor":"#758696","topFillColor1":"rgba(8, 153, 129, 0.28)","topFillColor2":"rgba(8, 153, 129, 0.05)","bottomFillColor1":"rgba(242, 54, 69, 0.05)","bottomFillColor2":"rgba(242, 54, 69, 0.28)","topLineColor":"#089981","bottomLineColor":"#F23645"},"areaStyle":{"transparency":100,"color1":"rgba(41, 98, 255, 0.28)","color2":"#2962FF","linecolor":"#2962FF","linewidth":2,"linestyle":0},"hiloStyle":{"color":"#2962FF","borderColor":"#2962FF","labelColor":"#2962FF"},"columnStyle":{"upColor":"rgba(8, 153, 129, 0.5)","downColor":"rgba(242, 54, 69, 0.5)","priceSource":"close"},"renkoStyle":{"upColor":"#089981","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae","wickUpColor":"#089981","wickDownColor":"#F23645"},"lineStyle":{"color":"#2962FF","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#F23645","upColor":"#089981","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"pbStyle":{"upColor":"#089981","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae"},"rangeStyle":{"upColor":"#089981","downColor":"#F23645","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"}}}}'),n=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#B2B5BE","lineColor":"rgba(240, 243, 250, 0)","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"rgba(240, 243, 250, 0.06)"},"horzGridProperties":{"color":"rgba(240, 243, 250, 0.06)"},"crossHairProperties":{"color":"#9598A1"},"background":"#131722","backgroundGradientStartColor":"#181C27","backgroundGradientEndColor":"#131722","backgroundType":"gradient","separatorColor":"#2A2E39"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2962FF","transparency":92},"preMarket":{"color":"#FF9800","transparency":92},"postMarket":{"color":"#2962FF","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#5d606b","candleStyle":{"borderColor":"#378658","upColor":"#089981","wickColor":"#B5B5B8","wickUpColor":"#089981","wickDownColor":"#F23645","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645"},"haStyle":{"borderColor":"#378658","upColor":"#089981","wickColor":"#B5B5B8","wickUpColor":"#089981","wickDownColor":"#F23645","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645"},"barStyle":{"downColor":"#F23645","upColor":"#089981"},"pnfStyle":{"downColor":"#F23645","upColor":"#089981","upColorProjection":"#336854","downColorProjection":"#7f323f"},"baselineStyle":{"baselineColor":"#758696","topFillColor1":"rgba(8, 153, 129, 0.28)","topFillColor2":"rgba(8, 153, 129, 0.05)","bottomFillColor1":"rgba(242, 54, 69, 0.05)","bottomFillColor2":"rgba(242, 54, 69, 0.28)","topLineColor":"#089981","bottomLineColor":"#F23645"},"areaStyle":{"transparency":100,"color1":"rgba(41, 98, 255, 0.28)","color2":"#2962FF","linecolor":"#2962FF","linewidth":2,"linestyle":0},"hiloStyle":{"color":"#2962FF","borderColor":"#2962FF","labelColor":"#2962FF"},"columnStyle":{"upColor":"rgba(8, 153, 129, 0.5)","downColor":"rgba(242, 54, 69, 0.5)","priceSource":"close"},"renkoStyle":{"upColor":"#089981","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f","wickUpColor":"#089981","wickDownColor":"#F23645"},"lineStyle":{"color":"#2962FF","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#F23645","upColor":"#089981","upColorProjection":"#336854","downColorProjection":"#7f323f"},"pbStyle":{"upColor":"#089981","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f"},"rangeStyle":{"upColor":"#089981","downColor":"#F23645","upColorProjection":"#336854","downColorProjection":"#7f323f"}}}}') ;var l=o(61499);function a(){return{[l.StdTheme.Light]:JSON.parse(JSON.stringify(i)),[l.StdTheme.Dark]:JSON.parse(JSON.stringify(n))}}function c(){return[l.StdTheme.Light,l.StdTheme.Dark]}function d(e){return a()[e]}function h(e){return{[l.StdTheme.Light]:s.t(null,{context:"colorThemeName"},o(669841)),[l.StdTheme.Dark]:s.t(null,{context:"colorThemeName"},o(14642))}[e]||e}function u(e){const t=a();return c().some((o=>_(t[o],e)))}function p(e){const t=a(),o=c();for(const s of o)if(_(t[s],e))return s;return null}function _(e,t){let o=e.content===t.content;return function(e={},t){try{g(e,[],t)}catch(e){return}}(e.content,((e,s)=>{const i=function(e,t={}){let o=t;for(let t=0;t{"use strict";o.d(t,{getThemeFromUserSettings:()=>i,saveThemeInUserSettings:()=>n});var s=o(62802);function r(e){const t=function(){const e=location.hostname.split(".").filter(Boolean);return e.every(isFinite)?location.host:e.slice(-2).join(".")}(),o=void 0===e?-1:3e8;document.cookie=`theme=${e};path=/;domain=${t};max-age=${o}`}function i(){return/(?:^|;)\s*theme=(dark|light)(?:;|$)|$/.exec(document.cookie)[1]||(0,s.getValue)("current_theme.name")||null}function n(e){r(e),(0,s.setValue)("current_theme.name",e,{forceFlush:!0})}},440135:(e,t,o)=>{"use strict";o.r(t),o.d(t,{DEFAULT_THEME:()=>u.DEFAULT_THEME,extractThemeFromModel:()=>P,getCurrentTheme:()=>g,getStdTheme:()=>x,getStdThemeNames:()=>C,getStdThemedValue:()=>F,getTheme:()=>w,getThemeNames:()=>S,getThemedColor:()=>m,isPublicTheme:()=>_,isStdTheme:()=>M,isStdThemeName:()=>k,isStdThemedDefaultValue:()=>T,isThemeExist:()=>I,loadTheme:()=>f,removeTheme:()=>$,restoreTheme:()=>v,saveTheme:()=>E,savedThemeName:()=>b,syncTheme:()=>y,themes:()=>p.themes,translateStdThemeName:()=>A});var s=o(724377),r=o(16665),i=o(902981),n=o(890740);const l=(0,o(272001).getLogger)("Themes.Provider");let a=null;function c(e){return(0,n.fetch)("/theme/?themeName="+encodeURIComponent(e),{credentials:"include",method:"GET"}).then((e=>e.json())).then((e=>{const t={};return e.content&&(t.content=JSON.parse(e.content)),t}))}var d=o(919346),h=o(909740),u=o(484400),p=o(369094);function _(e){return!e.isPrivate}function g(){return p.themes[h.watchedTheme.value()]||p.themes[u.DEFAULT_THEME]}function m(e){return g().getThemedColor(e)}async function f(e,t){const{themeName:o,standardTheme:s,syncState:i=!0,noUndo:n=!1,applyOverrides:l=!1}=t,a=await(s?Promise.resolve(x(o)):w(o)),c=!s;if(void 0!==a.content){const t=!s ;l&&(void 0!==(d=a.content).chartProperties&&(0,r.applyDefaultsOverrides)(d.chartProperties),void 0!==d.mainSourceProperties&&(0,r.applyDefaultsOverrides)(d.mainSourceProperties,void 0,!0,"mainSeriesProperties")),await e.applyTheme({theme:a.content,onlyActiveChart:t,restoreNonThemeDefaults:c,themeName:o,standardTheme:s,syncState:i,noUndo:n})}var d;return a}function v(){(0,h.setTheme)((0,i.getThemeFromUserSettings)()||u.DEFAULT_THEME)}function b(){return(0,i.getThemeFromUserSettings)()}function y(){(0,i.saveThemeInUserSettings)(g().name)}function w(e){return c(e)}function S(){return a||(0,n.fetch)("/themes/",{credentials:"include",method:"GET"}).then((e=>(a=e.json(),a)))}function C(){return d.getStdThemeNames()}function k(e){return C().includes(e)}function x(e){return d.getStdChartTheme(e)||{content:void 0}}function F(e,t){const o=t||g().name,s=d.getStdChartTheme(o),r=0!==e.length&&e.split(".");return s&&s.content&&r?r.reduce(((e,t)=>e[t]),s.content):null}function T(e,t,o){const r=F(e,o);return null!==r&&(0,s.areEqualRgba)((0,s.parseRgba)(r),(0,s.parseRgba)(String(t)))}function E(e,t){return function(e,t){const o=new FormData;return o.append("content",JSON.stringify(t)),o.append("name",e),a=null,(0,n.fetch)("/save-theme/",{credentials:"include",method:"POST",body:o}).then((e=>e.json()),(e=>l.logError(e)))}(e,t)}function $(e){return function(e){const t=new FormData;return t.append("name",e),a=null,(0,n.fetch)("/remove-theme/",{credentials:"include",method:"POST",body:t}).then((e=>e.json()),(e=>l.logError(e)))}(e)}function I(e){return function(e){return c(e).then((e=>Boolean(e.content)))}(e)}function A(e){return d.translateThemeName(e)}function M(e){return d.isStdTheme(e)}function P(e){return{content:{chartProperties:{paneProperties:e.model().properties().childs().paneProperties.state(),scalesProperties:e.model().properties().childs().scalesProperties.state()},sessions:e.model().sessions().properties().state(),mainSourceProperties:e.model().mainSeries().properties().state(),version:e.model().version()}}}},909740:(e,t,o)=>{"use strict";o.r(t),o.d(t,{setTheme:()=>i,watchedTheme:()=>r});var s=o(988411);const r=new(o.n(s)());function i(e){r.setValue(e)}r.subscribe((e=>{!function(e,t=window){const o="theme-"+e,s=t.document.documentElement.classList;for(const e of Array.from(s))e.startsWith("theme-")&&e!==o&&s.remove(e);s.add(o)}(e,window)}))},642709:(e,t,o)=>{"use strict";o.d(t,{DialogBreakpoints:()=>r});var s=o(936902);const r={SmallHeight:s["small-height-breakpoint"],TabletSmall:s["tablet-small-breakpoint"],TabletNormal:s["tablet-normal-breakpoint"]}},2606:(e,t,o)=>{"use strict";o.d(t,{isDetailsReady:()=>r});var s=o(988411);const r=new(o.n(s)())(!1)},414864:(e,t,o)=>{"use strict";o.d(t,{createSymbolNote:()=>h,showSymbolNews:()=>d,showSymbolNotes:()=>c});var s=o(2606),r=o(421219),i=o(777453);async function n(e){ Promise.all([o.e(38507),o.e(93404),o.e(82507),o.e(68726),o.e(63369),o.e(56305),o.e(3954),o.e(22325),o.e(80099),o.e(38587),o.e(75090),o.e(82999),o.e(95460),o.e(53053),o.e(25575),o.e(24248),o.e(55580),o.e(95441),o.e(49455),o.e(58803),o.e(56433),o.e(43512),o.e(32589),o.e(79421),o.e(48518),o.e(73479),o.e(962),o.e(29558),o.e(30832),o.e(58961),o.e(76079),o.e(6889),o.e(50996)]).then(o.bind(o,768175)).then((t=>{t.renderNotesDialog(e)}))}let l=null;function a(e,t){if(l&&s.isDetailsReady.unsubscribe(l),l=()=>{var o,s,r;(null===(r=null===(s=null===(o=null===window||void 0===window?void 0:window.widgetbar)||void 0===o?void 0:o.layout)||void 0===s?void 0:s.getWidgetByType("detail"))||void 0===r?void 0:r.widgetObject).navigate(e,t)},s.isDetailsReady.value())return l(),void(l=null);s.isDetailsReady.subscribe(l,{once:!0})}function c(e=null,t){const o=(0,r.pathToGroup)(null!=e?e:"");t?n(o):a(o)}function d(e,t){const s=(0,i.newsPathToGroup)(null!=e?e:"");t?async function(e){(await Promise.all([o.e(93404),o.e(82507),o.e(68726),o.e(56305),o.e(22325),o.e(80099),o.e(38587),o.e(82999),o.e(25575),o.e(61349),o.e(46960),o.e(95441),o.e(49455),o.e(54159),o.e(69255),o.e(27868),o.e(52436),o.e(77462),o.e(79421),o.e(89666),o.e(962),o.e(57879),o.e(31424),o.e(3179),o.e(41865),o.e(84482)]).then(o.bind(o,23154))).renderNewsDialog(e)}(s):a(s)}function h(e=null,t){const o=(0,r.pathToGroup)(null!=e?e:"")+"?new="+performance.now();t&&n(o),a(o)}},777453:(e,t,o)=>{"use strict";o.d(t,{NEWS_GROUP_PATH_PATTERN:()=>s,newsPathToGroup:()=>r});const s="/news/groups/:symbol/";function r(e){return s.replace(":symbol",encodeURIComponent(e))}},421219:(e,t,o)=>{"use strict";o.d(t,{NOTES_PATH_PATTERN:()=>s,GROUP_PATH_PATTERN:()=>r,UNATTENDED_PATH_PATTERN:()=>i,pathToGroup:()=>n});const s="/notes/",r="/notes/groups/:symbol/",i="/notes/unattended/";function n(e){return e?r.replace(":symbol",encodeURIComponent(e)):i}},362052:(e,t,o)=>{"use strict";o.d(t,{CompareLabel:()=>n});var s=o(50959),r=o(558470),i=o(562730);function n(e){return s.createElement("div",{className:i.wrapper},s.createElement("span",null,e.label),s.createElement(r.Badge,{className:i.newLabel,size:r.BadgeSize.XSmall},"New"))}},920389:(e,t,o)=>{"use strict";o.d(t,{runOrSignIn:()=>r});const s=o(495046).enabled("widget");function r(e,t){s?e():window.runOrSignIn(e,t)}},889267:(e,t,o)=>{"use strict";o.d(t,{symbolTokenEscapeRe:()=>n,tokenize:()=>c});var s=o(495046),r=o(173777);const i=s.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_!|:.&])*|'.+?'/,n=/[+\-/*]/,l={number:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,incompleteNumber:/\./,symbol:i,incompleteSymbol:/'[^']*/,separatorPrefix:r.SEPARATOR_PREFIX,openBrace:"(",closeBrace:")",plus:"+",minus:"-",multiply:"*",divide:"/",power:"^",whitespace:/[\0-\x20\s]+/,unparsed:null},a=new RegExp(Object.values(l).map((e=>{ return null===e?"":`(${"string"==typeof e?(t=e,t.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&")):e.source})`;var t})).filter((e=>""!==e)).concat(".").join("|"),"g");function c(e){if(!e)return[];const t=[],o=Object.keys(l);let s;for(;s=a.exec(e);){let e=!1;for(let r=o.length;r--;)if(s[r+1]){o[r]&&t.push({value:s[r+1],type:o[r],precedence:0,offset:s.index}),e=!0;break}e||t.push({value:s[0],type:"unparsed",precedence:0,offset:s.index})}return t}},558470:(e,t,o)=>{"use strict";o.d(t,{AnchorBadge:()=>s.AnchorBadge,Badge:()=>s.Badge,BadgeSize:()=>s.BadgeSize});var s=o(774465)},948019:(e,t,o)=>{"use strict";o.d(t,{ContextMenuContext:()=>s});const s=o(50959).createContext(null)},582997:(e,t,o)=>{"use strict";o.d(t,{Hint:()=>l});var s=o(50959),r=o(497754),i=o.n(r),n=o(458819);function l(e){const{text:t="",className:o}=e;return s.createElement("span",{className:i()(n.shortcut,o)},t)}},886004:(e,t,o)=>{"use strict";o.d(t,{ContextMenuItem:()=>_});var s=o(50959),r=o(497754),i=o.n(r),n=o(83436),l=o(612247),a=o(302478),c=o(582997),d=o(339750),h=o(379978),u=o(69311),p=o(994237);function _(e){const{isTitle:t,isLoading:o,isHovered:r,active:_,checkable:g,disabled:m,checked:f,icon:v,iconChecked:b,hint:y,subItems:w,label:S,onClick:C,children:k,toolbox:x,jsxLabel:F,size:T="normal"}=e,E=(0,s.useContext)(a.EmptyIconsContext),$=!!w.length;return o?s.createElement("li",{className:i()(p.item,p.loading,p[T])},s.createElement(l.Loader,null)):s.createElement("li",{className:i()(p.item,p.interactive,t&&p.title,m&&p.disabled,r&&p.hovered,_&&p.active,E&&p.emptyIcons,p[T]),onClick:C},s.createElement(n.Icon,{className:i()(p.icon),icon:function(){if(g&&f)return b||v||d;return v}()}),s.createElement("span",{className:i()(p.label)},null!=F?F:S),!!x&&s.createElement(n.Icon,{onClick:function(){x&&x.action()},className:p.remove,icon:u}),!$&&y&&s.createElement(c.Hint,{className:p.shortcut,text:y}),$&&s.createElement(n.Icon,{className:p.nested,icon:h}),k)}},67812:(e,t,o)=>{"use strict";o.d(t,{ContextMenuList:()=>u});var s=o(50959),r=o(530127);function i(e){return s.createElement("li",{className:r.separator})}var n=o(886004),l=o(762852),a=o(224743);function c(e){const{action:t}=e,[o,r]=(0,s.useState)((()=>t.getState())),[i,c]=(0,s.useState)(!1),d=!!o.subItems.length,h=d&&i;return(0,s.useEffect)((()=>{const e=()=>r(t.getState());return t.onUpdate().subscribe(null,e),()=>{t.onUpdate().unsubscribe(null,e)}}),[]),s.createElement(n.ContextMenuItem,{...o,onClick:function(e){if(o.disabled||e.defaultPrevented)return;if(d)return void c(!0);o.doNotCloseOnClick||(0,a.globalCloseMenu)();t.execute()},isLoading:o.loading,isHovered:h},h&&s.createElement(l.Drawer,{onClose:p},s.createElement(u,{items:o.subItems,parentAction:t,closeNested:p})));function p(e){e&&e.preventDefault(),c(!1)}}var d=o(302478),h=o(366493);function u(e){const{items:t,parentAction:o,closeNested:r}=e,l=!Boolean(o)&&t.every((e=>!Boolean("separator"!==e.type&&(e.getState().icon||e.getState().checkable))));return s.createElement(d.EmptyIconsContext.Provider,{value:l },s.createElement("ul",null,o&&s.createElement(s.Fragment,null,s.createElement(n.ContextMenuItem,{label:o.getState().label,isTitle:!0,active:!1,disabled:!1,subItems:[],checkable:!1,checked:!1,doNotCloseOnClick:!1,icon:h,onClick:r}),s.createElement(i,null)),t.map((e=>{switch(e.type){case"action":return s.createElement(c,{key:e.id,action:e});case"separator":return s.createElement(i,{key:e.id})}}))))}},302478:(e,t,o)=>{"use strict";o.d(t,{EmptyIconsContext:()=>s});const s=o(50959).createContext(!1)},332585:(e,t,o)=>{"use strict";o.d(t,{DrawerManager:()=>r,DrawerContext:()=>i});var s=o(50959);class r extends s.PureComponent{constructor(e){super(e),this._addDrawer=()=>{const e=this.state.currentDrawer+1;return this.setState({currentDrawer:e}),e},this._removeDrawer=()=>{const e=this.state.currentDrawer-1;return this.setState({currentDrawer:e}),e},this.state={currentDrawer:0}}render(){return s.createElement(i.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.currentDrawer}},this.props.children)}}const i=s.createContext(null)},762852:(e,t,o)=>{"use strict";o.d(t,{Drawer:()=>u});var s=o(50959),r=o(650151),i=o(497754),n=o(575658),l=o(707533),a=o(332585),c=o(320116),d=o(150881),h=o(88327);function u(e){const{position:t="Bottom",onClose:o,children:u,className:p,theme:_=h}=e,g=(0,r.ensureNotNull)((0,s.useContext)(a.DrawerContext)),[m,f]=(0,s.useState)(0),v=(0,s.useRef)(null),b=(0,s.useContext)(c.CloseDelegateContext);return(0,s.useEffect)((()=>((0,r.ensureNotNull)(v.current).focus({preventScroll:!0}),b.subscribe(g,o),0===g.currentDrawer&&(0,n.setFixedBodyState)(!0),f(g.addDrawer()),()=>{b.unsubscribe(g,o);0===g.removeDrawer()&&(0,n.setFixedBodyState)(!1)})),[]),s.createElement(l.Portal,null,s.createElement("div",{className:i(h.wrap,h[`position${t}`])},m===g.currentDrawer&&s.createElement("div",{className:h.backdrop,onClick:o}),s.createElement(d.TouchScrollContainer,{className:i(h.drawer,_.drawer,h[`position${t}`],p),tabIndex:-1,reference:v,"data-name":e["data-name"]},u)))}},18182:(e,t,o)=>{"use strict";o.d(t,{MatchMedia:()=>r});var s=o(50959);class r extends s.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addListener(this._handleChange)}_unsubscribe(e){e.removeListener(this._handleChange)}}},224743:(e,t,o)=>{"use strict";o.d(t,{globalCloseDelegate:()=>r,globalCloseMenu:()=>i});var s=o(869403);const r=new(o.n(s)());function i(){r.fire()}},320116:(e,t,o)=>{"use strict";o.d(t,{CloseDelegateContext:()=>i});var s=o(50959),r=o(224743);const i=s.createContext(r.globalCloseDelegate)}, 150881:(e,t,o)=>{"use strict";o.d(t,{TouchScrollContainer:()=>l});var s=o(50959),r=o(259142),i=o(650151),n=o(638456);function l(e){const{reference:t,children:o,...i}=e,l=(0,s.useRef)(null),c=(0,s.useCallback)((e=>{t&&(t.current=e),n.CheckMobile.iOS()&&(null!==l.current&&(0,r.enableBodyScroll)(l.current),l.current=e,null!==l.current&&(0,r.disableBodyScroll)(l.current,{allowTouchMove:a(l)}))}),[t]);return s.createElement("div",{ref:c,...i},o)}function a(e){return t=>{const o=(0,i.ensureNotNull)(e.current),s=document.activeElement;return!o.contains(t)||null!==s&&o.contains(s)&&s.contains(t)}}},742615:e=>{e.exports={modeTitle:"modeTitle-KK4vaPMw",modeTitleActive:"modeTitleActive-KK4vaPMw",switcherContainer:"switcherContainer-KK4vaPMw"}},450587:(e,t,o)=>{"use strict";t.operators={less:o(777754).t(null,void 0,o(24442)),eless:o(777754).t(null,void 0,o(406758)),greater:o(777754).t(null,void 0,o(983929)),egreater:o(777754).t(null,void 0,o(685878)),crosses:o(777754).t(null,void 0,o(306436)),crosses_above:o(777754).t(null,void 0,o(55125)),crosses_below:o(777754).t(null,void 0,o(421314)),in_range:o(777754).t(null,void 0,o(423367)),not_in_range:o(777754).t(null,void 0,o(69362)),equal:o(777754).t(null,void 0,o(604613)),nequal:o(777754).t(null,void 0,o(739777))}},450132:(e,t,o)=>{"use strict";o.d(t,{ScanFields:()=>s,earningsCalendarFieldSets:()=>a,getDefaultFieldSetsByScreenerType:()=>c});var s,r=o(777754),i=o(650151),n=o(695083);!function(e){e.BaseCurrencyLogoId="base_currency_logoid",e.Change="change",e.Country="country",e.CurrencyLogoId="currency_logoid",e.Description="description",e.Industry="industry",e.LogoId="logoid",e.Name="name",e.Performance1M="Perf.1M",e.Performance3M="Perf.3M",e.Performance6M="Perf.6M",e.PerformanceW="Perf.W",e.PerformanceY="Perf.Y",e.PerformanceYTD="Perf.YTD",e.Sector="sector"}(s||(s={}));const l=[{id:"overview",title:r.t(null,void 0,o(37260)),screenerTypeContent:{stock:{stock:[s.LogoId,s.Name,"close","change","change_abs","Recommend.All","volume","Value.Traded","market_cap_basic","price_earnings_ttm","earnings_per_share_basic_ttm","number_of_employees",s.Sector,"description","type"],_sector:[s.LogoId,s.Name,"close","change","change_abs","Recommend.All","volume","Value.Traded","market_cap_basic","price_earnings_ttm","earnings_per_share_basic_ttm","number_of_employees","industry","description","type"]},forex:[s.BaseCurrencyLogoId,s.CurrencyLogoId,s.Name,"close","change","change_abs","bid","ask","high","low","Recommend.All","description","type"],crypto:[s.BaseCurrencyLogoId,s.CurrencyLogoId,s.Name,"close","change","change_abs","high","low","volume","24h_vol|5","24h_vol_change|5","Recommend.All","exchange","description"],crypto_mkt:[s.BaseCurrencyLogoId,s.Sector,"market_cap_calc","market_cap_diluted_calc","close","total_shares_outstanding","total_shares_diluted","total_value_traded","change"],crypto_mkt_by_symbol:[s.CurrencyLogoId,s.Name,"close","change","change_abs","high","low","volume","Recommend.All","exchange","description"], crypto_by_symbol:[s.CurrencyLogoId,s.Name,"exchange","close","change","change_abs","high","low","volume","Recommend.All","description"],futures:[s.LogoId,s.Name,"close","change","change_abs","high","low","Recommend.All","description"],continuous_futures:[s.LogoId,s.Name,"expiration","close","change","change_abs","high","low","Recommend.All","description"],cfd:[s.LogoId,s.Name,"close","change","change_abs","high","low","Recommend.All","description"],sector:["description","market_cap_basic","dividend_yield_recent","change","volume","elements","basic_elements"],industry:["description","market_cap_basic","dividend_yield_recent","change","volume",s.Sector,"elements"],currency:[s.LogoId,s.Name,"close","change","change_abs","high","low","Recommend.All","description"],bonds:[s.LogoId,s.Name,"coupon","maturity_date","close","change","change_abs","high","low","Recommend.All","description"],pre_market:[s.LogoId,s.Name,"premarket_close","premarket_change_abs","premarket_change","premarket_volume","premarket_gap","close","change","volume","market_cap_basic"],post_market:[s.LogoId,s.Name,"postmarket_close","postmarket_change_abs","postmarket_change","postmarket_volume","close","change","volume","market_cap_basic"]},content:[],screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.Forex,n.ScreenerType.Futures,n.ScreenerType.ContinuousFutures,n.ScreenerType.Cfd,n.ScreenerType.Crypto,n.ScreenerType.CryptoMkt,n.ScreenerType.CryptoMktBySymbol,n.ScreenerType.CryptoBySymbol,n.ScreenerType.Sector,n.ScreenerType.Industry,n.ScreenerType.Currency,n.ScreenerType.Bonds,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0},{id:"performance",title:r.t(null,void 0,o(663089)),screenerTypeContent:{stock:[s.LogoId,s.Name,"description","type","change.1","change.5","change.15","change.60","change.240","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","beta_1_year","Volatility.D"],futures:[s.LogoId,s.Name,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"],continuous_futures:[s.LogoId,s.Name,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"],forex:[s.BaseCurrencyLogoId,s.CurrencyLogoId,s.Name,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"],crypto:[s.BaseCurrencyLogoId,s.CurrencyLogoId,s.Name,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"],crypto_mkt:[s.BaseCurrencyLogoId,s.Sector,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"],crypto_mkt_by_symbol:[s.CurrencyLogoId,s.Name,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"],crypto_by_symbol:[s.CurrencyLogoId,s.Name,"exchange","description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"], cfd:[s.LogoId,s.Name,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"],sector:["description","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y"],industry:["description","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y"],currency:[s.LogoId,s.Name,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"],bonds:[s.LogoId,s.Name,"description","type","change","change.1W","change.1M","Perf.3M","Perf.6M","Perf.YTD","Perf.Y","Volatility.D"]},content:[],screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.Forex,n.ScreenerType.Futures,n.ScreenerType.ContinuousFutures,n.ScreenerType.Cfd,n.ScreenerType.Crypto,n.ScreenerType.CryptoMkt,n.ScreenerType.CryptoBySymbol,n.ScreenerType.CryptoMktBySymbol,n.ScreenerType.Sector,n.ScreenerType.Industry,n.ScreenerType.Currency,n.ScreenerType.Bonds,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0},{id:"extended_hours",title:r.t(null,void 0,o(516608)),content:[s.LogoId,s.Name,"description","premarket_close","premarket_change","premarket_gap","premarket_volume","close","change","volume","postmarket_close","postmarket_change","postmarket_volume","Recommend.All","market_cap_basic"],screeners:[n.ScreenerType.Stock],showOnWidget:!1},{id:"valuation",title:r.t(null,void 0,o(796032)),content:[s.LogoId,s.Name,"description","type","close","market_cap_basic","price_earnings_ttm","price_revenue_ttm","earnings_per_share_basic_ttm","last_annual_eps","enterprise_value_ebitda_ttm","enterprise_value_fq","total_shares_outstanding_fundamental"],screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0},{id:"dividends",title:r.t(null,void 0,o(634135)),content:[s.LogoId,s.Name,"description","type","close","dividend_yield_recent","dividends_paid","dps_common_stock_prim_issue_fy"],screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0},{id:"margins",title:r.t(null,{context:"screener"},o(732648)),content:[s.LogoId,s.Name,"description","type","gross_margin","operating_margin","pre_tax_margin","after_tax_margin"],screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0},{id:"income_statement",title:r.t(null,void 0,o(506823)),content:[s.LogoId,s.Name,"description","type","basic_eps_net_income","earnings_per_share_basic_ttm","earnings_per_share_diluted_ttm","ebitda","gross_profit_fq","gross_profit","total_revenue","last_annual_eps","last_annual_revenue","net_income"],screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0},{id:"balance_sheet",title:r.t(null,void 0,o(730737)),content:[s.LogoId,s.Name,"description","type","current_ratio","debt_to_equity","net_debt","quick_ratio","total_assets","total_debt","total_current_assets"], screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0},{id:"oscillators",title:r.t(null,void 0,o(454800)),screenerTypeContent:{stock:[s.LogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],forex:[s.BaseCurrencyLogoId,s.CurrencyLogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],futures:[s.LogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],continuous_futures:[s.LogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],crypto:[s.BaseCurrencyLogoId,s.CurrencyLogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],crypto_mkt:[s.BaseCurrencyLogoId,s.Sector,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],crypto_mkt_by_symbol:[s.CurrencyLogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],crypto_by_symbol:[s.CurrencyLogoId,s.Name,"exchange","Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],cfd:[s.LogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],currency:[s.LogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"],bonds:[s.LogoId,s.Name,"Recommend.Other","ADX","AO","ATR","CCI20","MACD.macd","MACD.signal","Mom","RSI","Stoch.K","Stoch.D","description","type"]},content:[],screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.Forex,n.ScreenerType.Futures,n.ScreenerType.ContinuousFutures,n.ScreenerType.Cfd,n.ScreenerType.Crypto,n.ScreenerType.CryptoMkt,n.ScreenerType.CryptoMktBySymbol,n.ScreenerType.CryptoBySymbol,n.ScreenerType.Currency,n.ScreenerType.Bonds,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0},{id:"moving_averages",title:r.t(null,void 0,o(518795)),screenerTypeContent:{stock:[s.LogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],forex:[s.BaseCurrencyLogoId,s.CurrencyLogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],futures:[s.LogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],continuous_futures:[s.LogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],crypto:[s.BaseCurrencyLogoId,s.CurrencyLogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"], crypto_mkt:[s.BaseCurrencyLogoId,s.Sector,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],crypto_mkt_by_symbol:[s.CurrencyLogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],crypto_by_symbol:[s.CurrencyLogoId,s.Name,"exchange","Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],cfd:[s.LogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],currency:[s.LogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"],bonds:[s.LogoId,s.Name,"Recommend.MA","close","SMA20","SMA50","SMA200","BB.upper","BB.lower","description","type"]},content:[],screeners:[n.ScreenerType.Stock,n.ScreenerType.StockCompact,n.ScreenerType.Forex,n.ScreenerType.Futures,n.ScreenerType.ContinuousFutures,n.ScreenerType.Cfd,n.ScreenerType.Crypto,n.ScreenerType.CryptoMkt,n.ScreenerType.CryptoMktBySymbol,n.ScreenerType.CryptoBySymbol,n.ScreenerType.Currency,n.ScreenerType.Bonds,n.ScreenerType.PreMarket,n.ScreenerType.PostMarket],showOnWidget:!0}],a=[s.LogoId,"name","market_cap_basic","earnings_per_share_forecast_next_fq","earnings_per_share_fq","eps_surprise_fq","eps_surprise_percent_fq","revenue_forecast_next_fq","revenue_fq","earnings_release_next_date","earnings_release_next_calendar_date","earnings_release_next_time","description","type"];function c(e){const t={screenerType:n.ScreenerType.Stock,markets:["stock"],isCompact:!1,subtype:"",isOnWidget:!1};let o=l;const s=Object.assign(t,e),{screenerType:r,isCompact:a,subtype:c,isOnWidget:d}=s,{markets:h}=s;return o=o.filter((e=>{if(r===n.ScreenerType.Stock){const t=a?`${r}_compact`:r;return e.screeners.includes(t)}return e.screeners.includes(r)})),d&&(o=o.filter((e=>!0===e.showOnWidget))),o.forEach((e=>{if(void 0!==e.screenerTypeContent){const o=e.screenerTypeContent[(0,i.ensureDefined)(r)]||e.screenerTypeContent.stock;if(t=o,Array.isArray(t))e.content=(0,i.ensureDefined)(o);else{const t=Object.keys(o),s=h.reduce(((e,t)=>(e.push(`${(0,i.ensureDefined)(t)}_${(0,i.ensureDefined)(c)}`),e.push(`${(0,i.ensureDefined)(c)}`),e.push((0,i.ensureDefined)(t)),e)),[]),r=function(e,t){for(const o of e)if(t.includes(o))return o;return"stock"}([...new Set(s)],t);e.content=o[r]}}var t;d&&(e.content=e.content.filter((e=>"description"!==e)))})),o}},179670:(e,t,o)=>{"use strict";function s(){return Promise.all([o.e(82507),o.e(68726),o.e(56305),o.e(3954),o.e(49078),o.e(96831),o.e(27582),o.e(28083)]).then(o.bind(o,203409)).then((e=>e.showAlertsAreReadonlyWarningDialogImpl()))}o.d(t,{showAlertsAreReadonlyWarningDialog:()=>s})},695083:(e,t,o)=>{"use strict";var s;function r(e){return void 0===e?s.Stock:["forex","crypto"].includes(e)?e:s.Stock}o.d(t,{ScreenerType:()=>s,getScreenerType:()=>r}),function(e){e.Bonds="bonds",e.Cfd="cfd",e.ContinuousFutures="continuous_futures",e.Crypto="crypto",e.CryptoBySymbol="crypto_by_symbol",e.CryptoMkt="crypto_mkt",e.CryptoMktBySymbol="crypto_mkt_by_symbol", e.Currency="currency",e.Forex="forex",e.Futures="futures",e.Industry="industry",e.PostMarket="post_market",e.PreMarket="pre_market",e.Sector="sector",e.Stock="stock",e.StockCompact="stock_compact"}(s||(s={}))},963867:(e,t,o)=>{"use strict";function s(e){return{standalone:Boolean(e.standalone),originalStandalone:Boolean(e.originalStandalone),onWidget:Boolean(e.onWidget)}}function r(e){const t=s(e);return t.standalone&&t.originalStandalone&&!t.onWidget}function i(e){const t=s(e);return t.standalone&&!t.originalStandalone&&!t.onWidget}function n(e){const t=s(e);return!t.standalone&&t.originalStandalone&&!t.onWidget}function l(e){return s(e).onWidget}function a(e){return r(e)?"screener":i(e)?"market":n(e)?"chart":"widget"}o.d(t,{isScreenerPage:()=>r,isMarketPage:()=>i,isChartPage:()=>n,isExternalWidget:()=>l,getScreenerPage:()=>a})},432241:(e,t,o)=>{"use strict";var s;o.d(t,{UserActionState:()=>s}),function(e){e.Click="clicked",e.ApplyFilters="filters_applied",e.Type="typed",e.Slide="slided",e.Drag="drag"}(s||(s={}))},897925:(e,t,o)=>{"use strict";o.d(t,{DispatchContextMenuActionEvent:()=>r});var s=o(432241);class r{constructor(e,t,o){this.event="context_menu_action",this.state=s.UserActionState.Click,this.source=e,this.value=o.toString(),this.location=t}}},799148:(e,t,o)=>{"use strict";o.d(t,{ChangeMarketEvent:()=>s,ChangeMarketSelectionModeEvent:()=>r});class s{constructor(e){this.event="change_market",this.source="market_selector",this.location="toolbar",this.state="",this.value=e}}class r{constructor(e){this.event="change_market_selection_mode",this.source="market_selection_mode_switch",this.location="market_dialog",this.state="",this.value=e}}},426752:(e,t,o)=>{"use strict";o.d(t,{initScreenerInstance:()=>n,sendSnowPlowData:()=>l,getSnowPlowRefreshInterval:()=>a,getColumnSetNameForSnowPlow:()=>c,getFilterSetNameForSnowPlow:()=>d});var s=o(776734),r=o(963867);let i;function n(e){i=e}function l(e){let t="",o="";i&&(t=(0,r.getScreenerPage)(i.screenerBridge),o=i.screenerType);(!i||!(0,r.isExternalWidget)(i.screenerBridge))&&(0,s.getTracker)().then((s=>{s&&s.trackScreenerHighLevel(e,o,t)}))}function a(e){return 1===e?"auto":-1===e?"manual":`${e}`}function c(e){return i.defaultFieldSets.find((t=>t.id===e))?e:"custom"}function d(e){return i.defaultFilterSets.find((t=>t.id===e))?e:"custom"}},194851:(e,t,o)=>{"use strict";o.d(t,{getProductIdFromStockExchange:()=>l,hasStockScannerExchange:()=>n,isEmbedUnrestrictedExchange:()=>a});var s=o(959941) ;const r=JSON.parse('{"NASDAQ":"exchange-nasdaq","NYSE":"exchange-nyse","NYSE ARCA":"exchange-amex","AMEX":"exchange-amex","OTC":"exchange-otc","DFM":"exchange-dfm","BCBA":"exchange-bcba","ASX":"exchange-asx","EURONEXT":"exchange-euronext_stocks","EURONEXTBRU":"exchange-euronext_stocks","EURONEXTPAR":"exchange-euronext_stocks","EURONEXTLIS":"exchange-euronext_stocks","EURONEXTAMS":"exchange-euronext_stocks","BAHRAIN":"exchange-bahrain","BMFBOVESPA":"exchange-bovespa_stocks","TSX":"exchange-tsx","TSXV":"exchange-tsxv","CSE":"exchange-cse","SIX":"exchange-six","BCS":"exchange-bcs","SSE":"exchange-sse","SZSE":"exchange-szse","BVC":"exchange-bvc","FWB":"exchange-fwb","SWB":"exchange-swb","XETR":"exchange-xetr","OMXCOP":"exchange-omxcop","OMXTSE":"exchange-omxtse","EGX":"exchange-egx","BME":"exchange-bme","OMXHEX":"exchange-omxhex","HKEX":"exchange-hkex","IDX":"exchange-idx","TASE":"exchange-tase","BSE":"exchange-bse","NSE":"exchange-nse","OMXICE":"exchange-omxice","MIL":"exchange-mil","MILSEDEX":"exchange-mil","FSE":"exchange-fse","NAG":"exchange-nag","SAPSE":"exchange-sapse","TSE":"exchange-omxtse","KRX":"exchange-krx_stocks","OMXVSE":"exchange-omxvse","OMXRSE":"exchange-omxrse","BMV":"exchange-bmv","MYX":"exchange-myx","NSENG":"exchange-nseng","NZX":"exchange-nzx","BVL":"exchange-bvl","GPW":"exchange-gpw","QSE":"exchange-qse","BELEX":"exchange-belex","MOEX":"exchange-moex_stocks","TADAWUL":"exchange-tadawul","OMXSTO":"exchange-omxsto","SGX":"exchange-sgx_stocks","SET":"exchange-set","BIST":"exchange-bist","TWSE":"exchange-twse","LSE":"exchange-lse","LSIN":"exchange-lsin","HOSE":"exchange-hose_stocks","JSE":"exchange-jse_stocks","OSE":"exchange-osl"}'),i=[];for(const e in s)s.hasOwnProperty(e)&&s[e].hasOwnProperty("exchangesStocks")&&s[e].exchangesStocks.forEach((e=>{i.push(e)}));const n=e=>(e={OSL:"EURONEXTOSE",BCBA:"BYMA",AMEX:"NYSE ARCA"}[e]||e,i.includes(e));function l(e){return r[e]||null}function a(e){return"ASX"===e}},390466:(e,t,o)=>{"use strict";o.d(t,{getScreenerSymbolLogoUrl:()=>u,symbolNameWrap:()=>h});var s=o(849204),r=o(562840),i=o(315723);function n(e){const{symbolHtml:t,logoUrl:o,symbolFirstLetter:s,size:i="xsmall"}=e;return l({symbolHtml:t,logoHtml:(0,r.getCircleLogoHtml)({logoUrl:o,size:i,placeholderLetter:s,className:"tv-screener-table__logo-container"})})}function l(e){const{logoHtml:t="",symbolHtml:o="",wrapHtmlClass:s=""}=e;return`\n\t\t
\n\t\t\t
\n\t\t\t${t}\n\t\t\t
\n\t\t\t\t${o}\n\t\t\t
\n\t\t
\n\t`}var a=o(450132),c=o(696828);const d=(0,s.getLogoUrlResolver)();function h(e){const{fieldsOrder:t,proSymbol:o,rowData:s,symbolHtml:r}=e,c=t.indexOf(a.ScanFields.LogoId);if(-1!==c){const e=s[c];return n({symbolHtml:r,symbolFirstLetter:p(o),logoUrl:u(e)})}const d=t.indexOf(a.ScanFields.BaseCurrencyLogoId),h=-1!==d,_=t.indexOf(a.ScanFields.CurrencyLogoId),g=-1!==_;if(h&&g){const e=s[d],t=s[_];return function(e,t,o){return l({ symbolHtml:e,logoHtml:(0,i.getCircleLogoPairHtml)({primaryLogoUrl:t,secondaryLogoUrl:o,size:"xsmall",className:"tv-screener-table__logo-container"})})}(r,u(e),u(t))}if(h){const e=s[d];return n({symbolHtml:r,symbolFirstLetter:p(o),logoUrl:u(e)})}if(g){const e=s[_];return n({symbolHtml:r,symbolFirstLetter:p(o),logoUrl:u(e)})}return l({symbolHtml:r})}function u(e){if(e&&"null"!==e)return d.getSymbolLogoUrl(e,s.LogoSize.Medium)}function p(e){return(0,c.shortName)(e)[0]}},125316:(e,t,o)=>{"use strict";o.d(t,{ofTheSameType:()=>s,isGlobalScreenerUnavailable:()=>r});const s=(e,t)=>Object.prototype.toString.call(e)===Object.prototype.toString.call(t),r=()=>!window.is_authenticated},194577:(e,t,o)=>{"use strict";o.d(t,{defaultStockMarket:()=>n,markets:()=>r});var s=o(249219);const r=(i=(0,s.getMarketsByScreenerType)("stock"),Object.entries(i).map((([e,t])=>{const o=t.group;return{flag:t.flag,name:t.title,desc:t.stocks.join(", "),country:t.country,group:o,value:e}})));var i;const n=r.find((e=>e.value===(0,s.getDefaultStockMarket)()))},712270:(e,t,o)=>{"use strict";o.d(t,{japaneseChartStyles:()=>r,commonChartStyles:()=>i,allChartStyles:()=>n});var s=o(495046);function r(){const e=[8];return s.enabled("japanese_chart_styles")&&(e.push(4,7,5,6),e.push(11)),e}function i(){const e=[0,1,9,13,2,3,10];return e.push(12),e}function n(){return i().concat(r())}},951512:(e,t,o)=>{"use strict";o.d(t,{NumericFormatter:()=>i});var s=o(368725),r=o(960521);class i{constructor(e){this._precision=e}format(e){return(void 0!==this._precision?e.toFixed(this._precision):i.formatNoE(e)).replace(".",s.formatterOptions.decimalSign)}parse(e){const t=e.replace(s.formatterOptions.decimalSign,".");let o=parseFloat(t);return this._precision&&(o=+o.toFixed(this._precision)),o}static formatNoE(e){if(!Number.isFinite(e))return String(e);const t=new r.Big(e);return t.lt(1)?t.toFixed():t.toString()}}},561068:(e,t,o)=>{"use strict";o.d(t,{PercentageFormatter:()=>i});var s=o(368725),r=o(768038);class i extends s.PriceFormatter{constructor(e){super(e),this.type="percentage"}state(){const e=s.PriceFormatter.prototype.state.call(this);return e.percent=!0,e}parse(e){return e=e.replace("%",""),super.parse(e)}format(e,t,o,s,i=!0){const n=super.format(e,t,o,s,!1)+"%";return i?(0,r.forceLTRStr)(n):n}static serialize(e){return e.state()}static deserialize(e){return new i(e.priceScale)}}},738023:(e,t,o)=>{"use strict";o.d(t,{PLACE_HOLDER:()=>n,NOT_AVAILABLE_VOLUME_FORMATTER:()=>l,VolumeFormatter:()=>a});var s=o(777754),r=o(951512),i=o(758337);const n="---",l=1e100;class a{constructor(e){this.type="volume",this._numericFormatter=new r.NumericFormatter,this._fractionalValues=void 0!==e&&e>0,this._precision=e}state(){return{precision:this._precision}}format(e,t){if(!(0,i.isNumber)(e))return n;let r="";return e<0?(r="−",e=-e):e>0&&t&&(r="+"),e>=l?s.t(null,void 0,o(343088)):(!this._fractionalValues||e>=995?e=Math.round(e):this._fractionalValues&&(e=+e.toFixed(this._precision)), e<995?r+this._formatNumber(e):e<999995?r+this._formatNumber(e/1e3)+"K":e<999999995?(e=1e3*Math.round(e/1e3),r+this._formatNumber(e/1e6)+"M"):e<999999999995?(e=1e6*Math.round(e/1e6),r+this._formatNumber(e/1e9)+"B"):(e=1e9*Math.round(e/1e9),r+this._formatNumber(e/1e12)+"T"))}parse(e){if("---"===e)return{error:"not a number",res:!1,value:NaN};const t={K:1e3,M:1e6,B:1e9},o=e.slice(-1);if(t.hasOwnProperty(o)){const s=this._numericFormatter.parse(e.slice(0,-1));return(0,i.isNumber)(s)?{res:!0,value:s*t[o]}:{error:"not a number",res:!1,value:NaN}}{const t=this._numericFormatter.parse(e);return(0,i.isNumber)(t)?{res:!0,value:t}:{error:"not a number",res:!1,value:NaN}}}static serialize(e){return e.state()}static deserialize(e){return new a(e.precision)}_formatNumber(e){if(this._fractionalValues&&0!==e){const t=14-Math.ceil(Math.log10(e)),o=Math.pow(10,t);e=Math.round(e*o)/o}return this._numericFormatter.format(e).replace(/(\.[1-9]*)0+$/,((e,t)=>t))}}},125250:(e,t,o)=>{"use strict";o(728685),o(823127),o(801402),o(546322);var s=o(309103),r=o(62802),i=o.n(r),n=(o(984919),o(965426),o(797638)),l=o(186521);o(455150),o(924916),o(140078);o(823127);var a=o(777754),c=o(249219),d=o(125316),h=o(391542),u=o(695083);function p(e,t){return Array.isArray(e)&&Array.isArray(t)?function(e,t){const o=[...e,...t];return[Math.min(...o),Math.max(...o)]}(e,t):"string"!=typeof e?function(e,t){return e.operator!==t.operator?null:"greater"===t.operator?{operator:e.operator,value:Math.min(t.value,e.value)}:{operator:e.operator,value:Math.max(e.value,t.value)}}(e,t):e===t?e:null}const _={forex:{top_gainers:a.t(null,void 0,o(325757)),top_losers:a.t(null,void 0,o(41275))},default:{top_gainers:a.t(null,void 0,o(683966)),top_losers:a.t(null,void 0,o(686255))}},g=[{id:"general",title:a.t(null,void 0,o(337157)),content:{sort_field:"name",sort_direction:"asc",filters:{}}},{id:"most_capitalized",title:a.t(null,void 0,o(636123)),content:{sort_field:"market_cap_basic",sort_direction:"desc",filters:{is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"volume_leaders",title:a.t(null,void 0,o(797240)),adjustFilter:{volume:[1]},content:{sort_field:"volume",sort_direction:"desc",filters:{is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"top_gainers",title:_.default.top_gainers,adjustFilter:{change:[1]},content:{sort_field:"change",sort_direction:"desc",filters:{change:{operator:"greater",value:0},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"top_losers",title:_.default.top_losers,adjustFilter:{change:[0]},content:{sort_field:"change",sort_direction:"asc",filters:{change:{operator:"less",value:0},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"ath",title:a.t(null,void 0,o(546796)),content:{sort_field:"name",sort_direction:"asc",filters:{"High.All":{operator:"eless",value:"high"},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"atl",title:a.t(null,void 0,o(151339)),content:{ sort_field:"name",sort_direction:"asc",filters:{"Low.All":{operator:"egreater",value:"low"},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"high_dividend",title:a.t(null,void 0,o(506255)),content:{sort_field:"dividend_yield_recent",sort_direction:"desc",filters:{dividend_yield_recent:{operator:"greater",value:0},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"above_52wk_high",title:a.t(null,void 0,o(449404)),content:{sort_field:"name",sort_direction:"asc",filters:{price_52_week_high:{operator:"eless",value:"high"},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"below_52wk_low",title:a.t(null,void 0,o(946306)),content:{sort_field:"name",sort_direction:"asc",filters:{price_52_week_low:{operator:"egreater",value:"low"},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"monthly_high",title:a.t(null,void 0,o(628086)),content:{sort_field:"name",sort_direction:"asc",filters:{"High.1M":{operator:"eless",value:"high"},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"monthly_low",title:a.t(null,void 0,o(649381)),content:{sort_field:"name",sort_direction:"asc",filters:{"Low.1M":{operator:"egreater",value:"low"},is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"most_volatile",title:a.t(null,void 0,o(247547)),adjustFilter:{"Volatility.D":[1]},content:{sort_field:"Volatility.D",sort_direction:"desc",filters:{is_primary:{operator:"equal",value:!0},active_symbol:{operator:"equal",value:!0}}}},{id:"unusual_volume",title:a.t(null,void 0,o(969162)),adjustFilter:{relative_volume_10d_calc:[1]},content:{sort_field:"relative_volume_10d_calc",sort_direction:"desc",filters:{is_primary:{operator:"equal",value:!0},relative_volume_10d_calc:null,active_symbol:{operator:"equal",value:!0}}}},{id:"overbought",title:a.t(null,void 0,o(610590)),content:{sort_field:"name",sort_direction:"asc",filters:{is_primary:{operator:"equal",value:!0},RSI:{operator:"greater",value:70},active_symbol:{operator:"equal",value:!0}}}},{id:"oversold",title:a.t(null,void 0,o(728384)),content:{sort_field:"name",sort_direction:"asc",filters:{is_primary:{operator:"equal",value:!0},RSI:{operator:"less",value:30},active_symbol:{operator:"equal",value:!0}}}},{id:"outperforming_SMA50",title:a.t(null,void 0,o(363177)),content:{sort_field:"name",sort_direction:"asc",filters:{is_primary:{operator:"equal",value:!0},SMA50:{operator:"less",value:"close"},active_symbol:{operator:"equal",value:!0}}}},{id:"underperforming_SMA50",title:a.t(null,void 0,o(859301)),content:{sort_field:"name",sort_direction:"asc",filters:{is_primary:{operator:"equal",value:!0},SMA50:{operator:"greater",value:"close"},active_symbol:{operator:"equal",value:!0}}}},{id:"earnings_this_week",title:a.t(null,void 0,o(419370)),content:{sort_field:"market_cap_basic",sort_direction:"desc",filters:{is_primary:{operator:"equal",value:!0},earnings_release_next_date:null,active_symbol:{ operator:"equal",value:!0}}}},{id:"pre_market_gainers",title:a.t(null,void 0,o(972412)),adjustFilter:{premarket_change:[1]},content:{sort_field:"premarket_change",sort_direction:"desc",filters:{is_primary:{operator:"equal",value:!0},premarket_change:{operator:"greater",value:0},active_symbol:{operator:"equal",value:!0}}}},{id:"after_hours_gainers",title:a.t(null,void 0,o(918164)),adjustFilter:{postmarket_volume:[1]},content:{sort_field:"postmarket_volume",sort_direction:"desc",filters:{is_primary:{operator:"equal",value:!0},postmarket_volume:{operator:"greater",value:0},active_symbol:{operator:"equal",value:!0}}}}];function m(e){g.forEach((t=>{if(t.disabled=!1,t.id in c.marketFilterValues.america)for(const e in c.marketFilterValues.america[t.id])t.content.filters[e]=c.marketFilterValues.america[t.id][e];(t=>{["forex","crypto"].includes(e[0])||e.includes("brazil")?delete t.content.filters.name:t.content.filters.name=["common","dr","etf"],1===e.length&&"america"===e[0]?t.content.filters.exchange=["NYSE","NASDAQ","AMEX"]:delete t.content.filters.exchange,"general"===t.id&&("crypto"===e[0]&&(t.content.sort_field="24h_vol|5",t.content.sort_direction="desc"),"forex"===e[0]&&(t.content.sort_field="name",t.content.sort_direction="asc"));const o=[];for(const s of e){const e=c.marketFilterValues[s];if(e&&t.id in e)if(t.disabled||null!==e[t.id]){const s=e[t.id];for(const e in s){const r=s[e];if(null!==r&&(0,d.ofTheSameType)(t.content.filters[e],r))if(!o.includes(e)&&e in t.content.filters){const s=p(t.content.filters[e],r);s?t.content.filters[e]=s:(delete t.content.filters[e],o.push(e))}else t.content.filters[e]=r;else delete t.content.filters[e],o.push(e)}}else t.disabled=!0}"forex"===e[0]&&(_.forex[t.id]?t.title=_.forex[t.id]:_.default[t.id]&&(t.title=_.default[t.id]))})(t),"general"===t.id&&(t.disabled="forex"!==e[0]&&"crypto"!==e[0]),["pre_market_gainers","after_hours_gainers"].includes(t.id)&&(t.disabled=!0)}))}var f=o(296756),v=o(869403),b=o.n(v);o(475230);var y=o(919346),w=o(440135);w.themes[y.StdTheme.Light].label(),y.StdTheme.Light,w.themes[y.StdTheme.Dark].label(),y.StdTheme.Dark;var S=o(450132);const C="america";function k(e){const t=x((0,c.getMarketsByScreenerType)("stock"),e),o=x((0,c.getMarketsByScreenerType)("forex"),e),s=x((0,c.getMarketsByScreenerType)("crypto"),e);return t.concat(o).concat(s)}function x(e,t){const o=(0,f.getEmbedDeprecatedExchanges)(t);return Object.keys(e).filter((t=>{if(["forex","crypto"].includes(t))return!0;const s=e[t];return!!s&&(s.stocks=s.stocks.filter((e=>-1===o.indexOf(e))),0!==s.stocks.length)})).map((t=>({title:e[t]?e[t].title+(e[t].stocks.length?` (${F(t,e)})`:""):t,value:t}))).sort(((e,t)=>e.value===C?-1:t.value===C||e.title>t.title?1:-1))}function F(e,t){let o=[...t[e].stocks];const s=(0,c.getUnavailableWidgetExchangesMap)()[e];return s&&(o=o.filter((e=>!s.includes(e)))),o.join(", ")}function T(e){return(0,c.getUnavailableWidgetMarkets)().includes(e)}var E=o(591650),$=o(495046),I=(o(268731),o(408853),o(725423),o(34843),o(81207),o(786575),o(713710),o(751594),o(259937),o(146866), o(589578),o(473947),o(397681),o(342390),o(721923),o(377510),o(769855),o(704976),o(135493),o(87e4),o(952081),o(455567)),A=o(605324),M=o(12481),P=o(207678);class D{constructor(e){this._coll=e}getItemByIdx(e){return this._coll.item(e)}getItems(){return Array.from(this._coll)}getFirstItem(){return this.getItemByIdx(0)}getLastItem(){const e=this._coll.length;return this.getItemByIdx(e-1)}getItemIdx(e){return Array.prototype.findIndex.call(this._coll,(t=>t===e))}getLength(){return this._coll.length}contains(e){return-1!==this.getItemIdx(e)}}var B,L=o(177161);!function(e){e[e.Prev=-1]="Prev",e[e.Next=1]="Next"}(B||(B={}));const R="cursor";class N{constructor(e){this._list=e.list,this._items=new D(this._list.getElementsByClassName(e.listItemClass)),this._focused=new D(this._list.getElementsByClassName(e.focusedListItemClass)),this._selected=new D(this._list.getElementsByClassName(e.selectedListItemClass)),this._cursor=new D(this._list.getElementsByClassName(R)),this._selectedListItemClass=e.selectedListItemClass,this._focusedListItemClass=e.focusedListItemClass,this._onSelect=e.onSelect,this._onNavigate=e.onNavigate,this._onConfirm=e.onConfirm,this._onDelete=e.onDelete,this._mouseActions=new Map,this.hotkeys=(0,L.createGroup)({desc:"Selectable list"}),e.modes&&e.modes.forEach((t=>new t({selection:this,localHotkeyElement:this._list,globalHotkeyElement:e.globalHotkeys?null:this._list})))}selectItem(e){e.classList.add(this._selectedListItemClass)}unselectItem(e){e.classList.remove(this._selectedListItemClass)}focusItem(e){this.removeFocus(),e.classList.add(this._focusedListItemClass),this.setCursor(e)}getFocusedItemIdx(){const e=this._focused.getFirstItem();return e?this._items.getItemIdx(e):-1}getFocusedItem(){return this._focused.getFirstItem()}isSelected(e){return this._selected.contains(e)}isFocused(e){return this._focused.contains(e)}isListItem(e){return this._items.contains(e)}removeSelections(){this._selected.getItems().forEach((e=>e.classList.remove(this._selectedListItemClass)))}removeFocus(){this._focused.getItems().forEach((e=>e.classList.remove(this._focusedListItemClass)))}move(e,t,o){const s=e?this._items.getItemIdx(e):-1;let r;r="number"==typeof t?this._items.getItemByIdx(this._calcNextItemIdx(s,t)):t,r&&(o(r,e),this._scrollIfNotVisible(r))}getSelectedItems(){return this._selected.getItems()}getList(){return this._list}getItemsCollection(){return this._items}getSelectedCollection(){return this._selected}setCursor(e){this.removeCursor(),e.classList.add(R)}removeCursor(){this._cursor.getItems().forEach((e=>e.classList.remove(R)))}getCursorItem(){return this._cursor.getFirstItem()}getCursorItemIdx(){const e=this.getCursorItem();return e?this._items.getItemIdx(e):-1}onSelect(e,t){this._onSelect&&this._onSelect({cursor:t,items:this.getSelectedItems(),action:e})}onNavigate(e,t){this._onNavigate&&this._onNavigate({cursor:e,cursorIdx:this.getCursorItemIdx(),items:[e],action:t})}onConfirm(e,t){this._onConfirm&&this._onConfirm({cursor:e,items:[e],action:t})}onDelete(e,t,o){this._onDelete&&this._onDelete({cursor:o,items:e, action:t})}registerMouseAction(e,t){this._mouseActions.set(e,t)}dispatchMouseEvent(e,t){const o=this._mouseActions.get(e);o&&o(t)}delegateClick(e){return t=>{if(!t.defaultPrevented){const o=this._list.contains(t.target);let s=t.target;for(;o&&s!==this._list;){if(s&&this.isListItem(s))return void e(s);s=s&&s.parentElement}}}}clear(){this.removeSelections(),this.removeFocus(),this.removeCursor()}destroy(){this.hotkeys.destroy(),delete this._list,delete this._items,delete this._selected,delete this._focused,delete this._cursor,delete this._mouseActions}_scrollIfNotVisible(e){const t=this._list.getBoundingClientRect(),o=e.getBoundingClientRect(),s=t.top,r=t.bottom,i=o.top,n=o.bottom;ir&&(this._list.scrollTop+=n-r)}_calcNextItemIdx(e,t){const o=this._items.getLength()-1;let s=e+t;return s<0&&(s=o),s>o&&(s=0),s}}class O{constructor(e){this._focusNext=()=>{if(!this._isValidNavigation())return;const e=this._selection.getCursorItem();this._selection.move(e,B.Next,this._focusItem.bind(this,"down"))},this._focusPrev=()=>{if(!this._isValidNavigation())return;const e=this._selection.getCursorItem();this._selection.move(e,B.Prev,this._focusItem.bind(this,"up"))},this._focusFirst=()=>{if(!this._isValidNavigation())return;const e=this._selection.getItemsCollection().getFirstItem(),t=this._selection.getFocusedItem();this._selection.move(t,e,this._focusItem.bind(this,"home"))},this._focusLast=()=>{if(!this._isValidNavigation())return;const e=this._selection.getItemsCollection().getLastItem(),t=this._selection.getFocusedItem();this._selection.move(t,e,this._focusItem.bind(this,"end"))},this._selection=e.selection,this._selection.registerMouseAction("click",this._selection.delegateClick(this._focusItem.bind(this,"click"))),this._selection.hotkeys.add({desc:"Focus Previous",hotkey:38,handler:this._focusPrev,element:e.globalHotkeyElement}),this._selection.hotkeys.add({desc:"Focus Next",hotkey:40,handler:this._focusNext,element:e.globalHotkeyElement}),this._selection.hotkeys.add({desc:"Focus Previous",hotkey:L.Modifiers.Shift+32,handler:this._focusPrev,element:e.globalHotkeyElement}),this._selection.hotkeys.add({desc:"Focus Next",hotkey:32,handler:this._focusNext,element:e.globalHotkeyElement}),this._selection.hotkeys.add({desc:"Focus First",hotkey:36,handler:this._focusFirst,element:e.globalHotkeyElement}),this._selection.hotkeys.add({desc:"Focus Last",hotkey:35,handler:this._focusLast,element:e.globalHotkeyElement})}_focusItem(e,t){this._selection.removeSelections(),this._selection.focusItem(t),this._selection.setCursor(t),this._selection.selectItem(t),this._selection.onNavigate(t,e)}_isValidNavigation(){return document.activeElement===document.body||this._selection.getList().contains(document.activeElement)}}class j{constructor(e){this._selection=e.selection,this._selection.hotkeys.add({hotkey:L.Modifiers.Alt+13,handler:this._onItemKeyDown.bind(this,"alt+return"),element:e.localHotkeyElement}),this._selection.hotkeys.add({hotkey:L.Modifiers.Alt+L.Modifiers.Shift+13, handler:this._onItemKeyDown.bind(this,"alt+return"),element:e.localHotkeyElement})}_onItemKeyDown(e,t){const o=this._selection.getCursorItem();o&&this._selection.onConfirm(o,e)}}class W{constructor(e){this._selection=e.selection,this._selection.registerMouseAction("shift+click",this._selection.delegateClick(this._onItemClick.bind(this,"shift+click"))),this._selection.hotkeys.add({desc:"Extend Selection Down",hotkey:L.Modifiers.Shift+40,handler:this._nextRangeItem.bind(this,"shift+down"),element:e.localHotkeyElement}),this._selection.hotkeys.add({desc:"Extend Selection Up",hotkey:L.Modifiers.Shift+38,handler:this._prevRangeItem.bind(this,"shift+up"),element:e.localHotkeyElement})}_nextRangeItem(e){const t=this._selection.getItemsCollection(),o=this._selection.getCursorItem();this._selection.getCursorItemIdx()!==t.getLength()-1&&this._selection.move(o,B.Next,this._addItemToRange(e,((e,t)=>ee>t)))}_onItemClick(e,t){const o=this._selection.getItemsCollection().getItems(),s=this._getRangeInfo(t);this._selection.removeSelections();for(let e=s.start;e<=s.end;e++)this._selection.isSelected(o[e])||this._selection.selectItem(o[e]);this._selection.setCursor(t),this._selection.onSelect(e,t)}_getRangeInfo(e){const t=this._selection.getItemsCollection().getItemIdx(e),o=this._selection.getFocusedItemIdx(),s=-1!==o?o:0;return t>s?{start:s,end:t}:{start:t,end:s}}_addItemToRange(e,t){return(o,s)=>{const r=this._selection.getItemsCollection().getItemIdx(o),i=this._selection.getFocusedItemIdx();0===this._selection.getSelectedCollection().getLength()&&s&&this._selection.selectItem(s),t(i,r)?this._selection.selectItem(o):s&&this._selection.unselectItem(s),this._selection.setCursor(o),this._selection.onSelect(e,o)}}}class V{constructor(e){this._selection=e.selection,this._selection.registerMouseAction("ctrl+click",this._selection.delegateClick(this._onItemClick.bind(this,"ctrl+click"))),this._selection.registerMouseAction("meta+click",this._selection.delegateClick(this._onItemClick.bind(this,"meta+click"))),this._selection.hotkeys.add({hotkey:L.Modifiers.Mod+65,handler:this._selectAll.bind(this,"ctrl+a"),element:e.localHotkeyElement}),this._selection.hotkeys.add({hotkey:27,handler:this._unselectAll.bind(this,"esc"),element:e.localHotkeyElement})}_onItemClick(e,t){const o=this._selection.getFocusedItem(),s=this._selection.getSelectedCollection().getLength();o&&0===s&&this._selection.selectItem(o),this._toggleSelection(t),this._selection.onSelect(e,t)}_toggleSelection(e){this._selection.isSelected(e)?this._selection.unselectItem(e):this._selection.selectItem(e),this._selection.setCursor(e)}_selectAll(e){this._selection.getItemsCollection().getItems().forEach((e=>this._selection.selectItem(e))),this._selection.onSelect(e)}_unselectAll(e){this._selection.removeSelections();const t=this._selection.getFocusedItem();t&&this._selection.setCursor(t),this._selection.onSelect(e)}}class U{ constructor(e){this._selection=e.selection,this._selection.hotkeys.add({desc:"Delete",hotkey:46,handler:this._delete.bind(this,"del"),element:e.globalHotkeyElement})}_delete(e){const t=this._selection.getSelectedItems(),o=this._selection.getCursorItem();o&&t.length>0?this._selection.onDelete(t,e,o):o&&this._selection.onDelete([o],e,o)}}var H=o(638456);class q{constructor(e){this._dispatchClick=e=>{e.ctrlKey&&!(0,H.isMac)()?this._selection.dispatchMouseEvent("ctrl+click",e):e.shiftKey?this._selection.dispatchMouseEvent("shift+click",e):e.metaKey&&(0,H.isMac)()?this._selection.dispatchMouseEvent("meta+click",e):this._selection.dispatchMouseEvent("click",e)},this._onSelect=e=>{this._collectKeys(),this._opts.onSelect&&this._opts.onSelect(e)},this._onNavigate=e=>{this._collectKeys(),this._opts.onNavigate&&this._opts.onNavigate(e)},this._disableSelection=()=>{this._list.onselectstart=()=>!1},this._enableSelection=()=>{this._list.onselectstart=()=>null},this._opts=e,this._list=e.list,this._selection=new N({list:e.list,listItemClass:e.listItemClass,selectedListItemClass:e.selectedListItemClass,focusedListItemClass:e.focusedListItemClass,onSelect:this._onSelect,onNavigate:this._onNavigate,onConfirm:e.onConfirm,onDelete:e.onDelete,modes:e.modes,globalHotkeys:Boolean(e.globalHotkeys)}),this._selectedKeys=[],this._focusedKey=null,this._cursorKey=null,this.activate(),this._collectKeys()}activate(){this._list.addEventListener("click",this._dispatchClick),this._list.addEventListener("keydown",this._disableSelection),this._list.addEventListener("keyup",this._enableSelection),this._selection.hotkeys.promote()}deactivate(){this._list.removeEventListener("click",this._dispatchClick),this._list.removeEventListener("keydown",this._disableSelection),this._list.removeEventListener("keyup",this._enableSelection)}focusItem(e){this._selection.isSelected(e)||this._selection.isFocused(e)||(this._selection.removeSelections(),this._selection.focusItem(e))}removeFocus(){this._selection.removeFocus()}restore(){if(this._opts.getNodeKey){const e=this._selection.getItemsCollection().getItems(),t=this._opts.getNodeKey;e.forEach((e=>{const o=t(e);this._focusedKey===o&&this._selection.focusItem(e),this._cursorKey===o&&this._selection.setCursor(e),this._selectedKeys.includes(o)&&this._selection.selectItem(e)}))}}getSelectedKeys(){return this._collectKeys(),this._selectedKeys}getFocusedKey(){return this._collectKeys(),this._focusedKey||null}clear(){this._selection.clear()}destroy(){this.deactivate(),this._selection.destroy(),delete this._selection,delete this._list,delete this._opts}_collectKeys(){if(this._opts.getNodeKey){const e=this._opts.getNodeKey,t=this._selection.getSelectedItems(),o=this._selection.getFocusedItem(),s=this._selection.getCursorItem();this._selectedKeys=t.map((t=>e(t))),this._focusedKey=o?e(o):null,this._cursorKey=s?e(s):null}}}var z,G=o(552279),X=(o(875561),o(286974),o(30311),o(218333)),K=(o(726486),o(508846)),Y=o(264996),J=o(779923),Z=o(237037),Q=o(397239),ee=o(194851);!function(e){e[e.None=0]="None",e[e.Widget=1]="Widget", e[e.Site=2]="Site"}(z||(z={}));var te=o(868151),oe=o(833813),se=o(768038),re=o(426752);class ie{constructor(e){this.event="change_timeframe",this.source="timeframe_selector",this.location="toolbar",this.state="",this.value=e}}class ne{constructor(e,t){this.event="change_columnset",this.source="columset_selector",this.location="toolbar",this.state="",this.value=(0,re.getColumnSetNameForSnowPlow)(t),this.source=e}}class le{constructor(e,t){this.event="change_favorite_columnsets",this.source="columnset_star_button",this.location="toolbar",this.value=(0,re.getColumnSetNameForSnowPlow)(t),this.state=e}}class ae{constructor(){this.event="rename_custom_columnset",this.source="columnset_pen_button",this.location="toolbar",this.state="",this.value=""}}class ce{constructor(e){this.event="change_filterset",this.source="filterset_selector",this.location="toolbar",this.state="",this.value=(0,re.getFilterSetNameForSnowPlow)(e)}}class de{constructor(){this.event="rename_custom_filterset",this.source="filterset_pen_button",this.location="toolbar",this.state="",this.value=""}}var he=o(432241);class ue{constructor(e,t,o){this.event="change_columns",this.source="column_selector",this.location="header_fields_popup"===e?"header":"toolbar",this.state=t?"added":"removed",this.value=o}}class pe{constructor(e){this.event="column_move",this.source="column_header",this.location="header",this.state=he.UserActionState.Drag,this.value=e}}class _e{constructor(){this.event="refresh_screener_data",this.source="refresh_button",this.location="toolbar",this.state="",this.value=""}}class ge{constructor(e){this.event="change_refresh_interval",this.source="refresh_interval_selector",this.location="toolbar",this.state="",this.value=(0,re.getSnowPlowRefreshInterval)(e)}}var me=o(142668),fe=o(823127);const ve=o(272001).getLogger("Screener.Popups");class be{constructor(e,t,o){this._model=e,this._view=t,this._bridge=o,this._markets=null,this._model.fieldSetSaved.subscribe(null,(()=>this._view.$fieldSetsButton.removeClass("tv-screener-toolbar__button--unsaved"))),this._model.filterSetSaved.subscribe(null,(()=>this._view.$filterSetsButton.removeClass("tv-screener-toolbar__button--unsaved"))),this._fieldsPopupCache={}}showPromptDialog(e,t){return new Promise((s=>{(0,J.showRename)({title:e.title,text:e.label,initValue:t,mainButtonText:a.t(null,void 0,o(185520)),maxLength:128,onRename:({newValue:e,dialogClose:t})=>{s(e),t()},onClose:s})}))}showMaintenanceDialog(){(0,X.showNoticeDialog)({type:"modal",title:a.t(null,void 0,o(713991)),content:a.t(null,void 0,o(177513))})}showConfirmDialog(e){return new Promise((t=>{(0,J.showConfirm)({text:e,onConfirm:({dialogClose:e})=>{t(!0),e()},onClose:()=>t(!1)})}))}showNotice(e,t){(0,X.showNoticeDialog)({content:e,title:t})}setFieldsPopup(e,t,s){e.addClass("tv-dropdown-behavior__button");const r=fe(`
`);r.insertAfter(e).append(e);const i=fe('
').appendTo(r);s&&i.addClass(s) ;const n=fe('
').appendTo(i),l=fe(``).appendTo(n),c=fe('
').appendTo(i),d=fe('
').appendTo(c);"header_fields-button"===e.attr("data-name")&&d.attr({"data-name":"header_fields_popup"});const h=fe('
No matches
').appendTo(i);l.on("change input",(e=>{const t=l.val().trim().toLowerCase();t?d.find(".js-fields-item").each((function(){const e=fe(this);e.toggleClass("js-hidden",!~e.text().toLowerCase().indexOf(t))})):d.find(".js-fields-item").removeClass("js-hidden"),h.toggleClass("js-hidden",!!d.find(".js-fields-item:not(.js-hidden)").size()),r.tvDropdown("updateScroll")})),r.on("beforeOpenMenu",(()=>{l.val(""),d.find(".js-fields-item").removeClass("js-hidden"),h.addClass("js-hidden"),this.resetFieldsPopup(d),c.css("maxHeight",fe(window).height()-e.offset().top+fe(window).scrollTop()-e.outerHeight()-n.outerHeight()-20)})).on("afterOpenMenu",(()=>{l.focus()})).tvDropdown({scroll:!0,noAnimation:!0}),setTimeout((()=>this.resetFieldsPopup(d)),0)}resetFieldsPopup(e){e.empty();const t=e=>{if(e in this._fieldsPopupCache){const t=this._fieldsPopupCache[e];return t.checkbox.prop("checked",h.fields[e].checked),t.item}const t=fe('
');fe(``).appendTo(t);const o=t.find(".js-field-checkbox").tvControlCheckbox();return this._fieldsPopupCache[e]={item:t,checkbox:o},t},o=this._view.sortedFields.filter(h.isFieldToDisplay).sort(((e,t)=>h.fields[e].title.localeCompare(h.fields[t].title,void 0,{ignorePunctuation:!0,numeric:!0}))),s=o.filter((e=>h.fields[e].checked)),r=o.filter((e=>!h.fields[e].checked));s.concat(r).forEach((o=>{"is_primary"!==o&&t(o).appendTo(e)})),e.find(".js-field-checkbox").off("change"),e.find(".js-field-checkbox").on("change",(t=>{const o=fe(t.currentTarget),s=o.attr("name");h.fields[s].checked=o.prop("checked");const r=e.attr("data-name"),i=h.fields[s].checked;(0,re.sendSnowPlowData)(new ue(r,i,s));const n=h.fields[s].checked?this._view._table.fieldsOrder.concat(s):this._view._table.fieldsOrder.filter((e=>e!==s));this._model.preventPrevScanRequest(),this._model.fieldSetChanged.fire(n.filter((e=>h.fields[e]&&!0!==h.fields[e].disabled&&!0!==h.fields[e].hiddenColumn))),this._model.update(),this._view.$fieldSetsButton.toggleClass("tv-screener-toolbar__button--unsaved",this._model.isFieldSetChanged())}))}setPopup(e,t,o){e.addClass("tv-dropdown-behavior__button") ;const s=fe(`
`);s.insertAfter(e).append(e);const r=fe('
').appendTo(s);o&&r.addClass(o);const i=fe('
').appendTo(r);return fe('
').appendTo(i),s.on("beforeOpenMenu",(()=>{i.css("maxHeight",fe(window).height()-e.offset().top+fe(window).scrollTop()-45)})).tvDropdown({scroll:!0,noAnimation:!0})}setFieldSetsPopup(e){const t=this.setPopup(e,"tv-screener-toolbar__button-wrap");t.tvDropdown("disable");const s=t.find(".js-content");s.on("click",".js-set",(e=>{const o=fe(e.currentTarget);s.find(".js-item-active").removeClass("tv-screener-popup__item--active js-item-active"),o.addClass("tv-screener-popup__item--active js-item-active");const r=o.attr("data-set");this._model.applyFieldSet(r),this._view.adjustToolbarWidth(),t.tvDropdown("close"),(0,re.sendSnowPlowData)(new ne("columnset_selector",r))})).on("click",".js-set-delete",(e=>{const s=fe(e.currentTarget),r=this._model.getFieldSetById(s.parent().attr("data-set")),i=this._model.currentFieldSetId()===r.id;this.showConfirmDialog(a.t(null,void 0,o(827007)).format({name:r.title})).then((e=>{e&&this._model.saveFieldSet({id:r.id,delete:1},"Delete field set").then((()=>{this._model.removeFavoriteFieldSet(r.id),i&&this._model.applyFieldSet(this._model.defaultFieldSets[0].id,null,!0),this._view.adjustToolbarWidth()}))})),t.tvDropdown("close"),e.stopPropagation()})).on("click",".js-set-star",(e=>{const t=fe(e.currentTarget),o=t.parent().attr("data-set");t.parent().toggleClass("tv-screener-popup__item--favorite"),this._model.addFavoriteFieldSet(o),e.stopPropagation(),(0,re.sendSnowPlowData)(new le("added",o))})).on("click",".js-set-star-active",(e=>{const t=fe(e.currentTarget),o=t.parent().attr("data-set");t.parent().toggleClass("tv-screener-popup__item--favorite"),this._model.removeFavoriteFieldSet(o),e.stopPropagation(),(0,re.sendSnowPlowData)(new le("removed",o))})).on("click",".js-set-rename",(e=>{const s=fe(e.currentTarget).parent().attr("data-set"),r=this._model.getFieldSetById(s);this.showPromptDialog({title:a.t(null,void 0,o(962961)),label:a.t(null,void 0,o(150253))},r.title).then((e=>{e&&e!==r.title&&(this._model.saveFieldSet({id:r.id,title:e},"Rename field set"),this._view.$fieldSetsButton.removeClass("tv-screener-toolbar__button--active js-no-pointer-events"),this._model.currentFieldSetId()==r.id&&this._view.$fieldSetsButton.text(e),(0,re.sendSnowPlowData)(new ae))})),t.tvDropdown("close"),e.stopPropagation()})).on("click",".js-save",(e=>{this.confirmAndSaveCurrentFieldSet().then((e=>{const t=this._model.getFieldSetById(e.id);this._model.settingsSaver.setValue(this._model.settingKey+".fieldSetId",e.id,{forceFlush:!0}),this._view.$fieldSetsButton.text(t.title);const o=this.$favoritesBar&&this.$favoritesBar.find(`.js-favorite-item[data-set=${e.id}]`)||fe() ;o.size()&&o.removeClass("tv-screener-toolbar__favorites-item--active")})).catch((e=>{e&&ve.logError(e)})),t.tvDropdown("close")})),this._model.loadingComplete.subscribe(null,(()=>{t.tvDropdown("enable")}),!0),t.on("beforeOpenMenu",(()=>this.setFieldSetsPopupContent(s)))}setFieldSetsPopupContent(e){e.empty(),this._bridge.onWidget||fe(`
${(0,te.appendEllipsis)(a.t(null,void 0,o(774331)))}
`).prepend(fe(o(470088)).attr({class:"tv-screener-toolbar__button-icon",width:"20",height:"14",style:"top: -2px; margin-right: 10px;"})).appendTo(e);const t=fe('
').appendTo(e);this._model.settings.fieldSets.forEach((e=>{const s=fe(`
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${o(711732)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${o(663719)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${o(372665)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${o(959597)}\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
`).appendTo(t);s.find(".js-field-set-name").text(ye(e.title)),s.find(".js-set").toggleClass("tv-screener-popup__item--favorite",-1!==this._model.favoriteFieldSets.indexOf(e.id))})),this._model.defaultFieldSets.forEach((t=>{fe(`
\n\t\t\t\t
\n\t\t\t\t\t${t.title}\n\t\t\t\t\t${this._bridge.onWidget?"":`\n\t\t\t\t\t\t\t${o(372665)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t${o(959597)}\n\t\t\t\t\t\t`}\n\t\t\t\t
\n\t\t\t
`).appendTo(e).find(".js-set").toggleClass("tv-screener-popup__item--favorite",-1!==this._model.favoriteFieldSets.indexOf(t.id))})),e.find(`[data-set="${this._model.currentFieldSetId()}"]`).addClass("tv-screener-popup__item--active js-item-active")}confirmAndSaveCurrentFieldSet(){const e=this._model.getFieldSetById(this._model.currentFieldSetId()),t=this._view._table.fieldsOrder.slice(0);if(!h.fields.type.disabled&&h.fields.type.checked){const e=t.indexOf("name");-1!==e&&t.splice(e+1,0,"type")}if(!h.fields.description.disabled&&h.fields.description.checked){const e=t.indexOf("name") ;-1!==e&&t.splice(e+1,0,"description")}const s=JSON.stringify(t),r=e&&!this._model.defaultFieldSets.find((t=>t.id===e.id));return new Promise(((t,i)=>runOrSignIn((()=>this.showPromptDialog({title:a.t(null,void 0,o(774331)),label:a.t(null,void 0,o(150253))},e&&e.title||"").then((o=>{if(void 0===o)return void i();const n={title:TradingView.clean(o),content:s};let l="Create field set";r&&e.title===o&&(n.id=e.id,l="Update field set"),this._model.saveFieldSet(n,l).then(t,i)}))))))}setFilterSetsPopup(e,t){const s=this.setPopup(e,"tv-screener-toolbar__button-wrap","tv-dropdown__body--position_right");s.tvDropdown("disable");const r=s.find(".js-content"),i=this._bridge.$body;function n(e){if((0,se.isRtl)())e.toggleClass("tv-dropdown__body--position_right",!0);else{const t=s.width(),o=i.find(".tv-screener-toolbar").width(),r=s.position().left,n=o-(t+r);e.toggleClass("tv-dropdown__body--position_right",r>n)}}r.on("click",".js-set",(e=>{const t=fe(e.currentTarget);r.find(".js-item-active").removeClass("tv-screener-popup__item--active js-item-active"),t.addClass("tv-screener-popup__item--active js-item-active"),this._view.$filterSetsButton.toggleClass("i-disabled",!0),new Promise((e=>{this._bridge.onWidget?e():this._model.isFilterSetChanged()?this.showConfirmDialog(a.t(null,void 0,o(124431))).then((t=>{t?this.confirmAndSaveCurrentFilterSet().then(e,(t=>{t&&ve.logError(t),e()})):e()})):e()})).then((()=>{const e=ye(t.attr("data-set"));this._model.applyFilterSet(e),this._model.trackEvent("Apply filter set "+e),this._view.$filterSetsButton.toggleClass("i-disabled",!1),(0,re.sendSnowPlowData)(new ce(e))})),setTimeout((()=>s.tvDropdown("close")),200)})).on("click",".js-set-delete",(e=>{const t=fe(e.currentTarget),r=this._model.getFilterSetById(t.parent().attr("data-set")),i=this._model.currentFilterSetId()===r.id;this.showConfirmDialog(a.t(null,void 0,o(833163)).format({name:r.title})).then((e=>{e&&this._model.saveFilterSet({id:r.id,delete:1},"Delete filter set").then((()=>{if(i){const e=this._model.defaultFilterSets.find((e=>!0!==e.disabled))||this._model.defaultFilterSets[0];this._model.applyFilterSet(e.id)}}))})),s.tvDropdown("close"),e.stopPropagation()})).on("click",".js-set-rename",(e=>{const t=fe(e.currentTarget).parent().attr("data-set"),r=this._model.getFilterSetById(t);this.showPromptDialog({title:a.t(null,void 0,o(93401)),label:a.t(null,void 0,o(67996))},r.title).then((e=>{e&&e!==r.title&&(this._model.saveFilterSet({id:r.id,title:e},"Rename filter set"),this._view.$filterSetsButton.removeClass("tv-screener-toolbar__button--active js-no-pointer-events"),this._model.currentFilterSetId()==r.id&&this._view.$filterSetsButtonTitle.text(e),(0,re.sendSnowPlowData)(new de))})),s.tvDropdown("close"),e.stopPropagation()})).on("click",".js-save",(e=>{this.confirmAndSaveCurrentFilterSet().then((e=>{void 0!==e.id?(this._model.settingsSaver.setValue(this._model.settingKey+".filterSetId",e.id,{forceFlush:!0}),this._view.$filterSetsButtonTitle.text(this._model.getFilterSetById(e.id).title)):ve.logError("Unable to get id of created set") })).catch((e=>{e&&ve.logError(e)})),s.tvDropdown("close")})).on("click",".js-set-alert",(e=>{const t=fe(e.currentTarget),o=t.parent().attr("data-set");this._view.toggleAlert.fire(o,"toggle_alert_bell"),t.is(".js-active")||s.tvDropdown("close"),e.stopPropagation()})),this.$filterSetsPopupContent=r,this._bridge.width?(n(r.parent().parent()),this._bridge.width.subscribe((()=>{n(r.parent().parent())}))):fe(window).on("resize",(()=>{n(r.parent().parent())})),this._model.loadingComplete.subscribe(null,(()=>{s.tvDropdown("enable")}),!0),s.on("beforeOpenMenu",(()=>{this.setFilterSetsPopupContent()}))}setFilterSetsPopupContent(){const e=this.$filterSetsPopupContent;e.empty(),this._bridge.onWidget||fe(`
${(0,te.appendEllipsis)(a.t(null,void 0,o(409035)))}
`).prepend(fe(o(470088)).attr({class:"tv-screener-toolbar__button-icon",width:"20",height:"14",style:"top: -2px; margin-right: 10px;"})).appendTo(e);const t=fe('
').appendTo(e);this._model.settings.filterSets.forEach((e=>{const s=fe(`
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${o(663719)}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${o(711732)}\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
`);s.find(".js-filter-set-name").text(ye(e.title)),s.appendTo(t)})),this._model.defaultFilterSets.forEach((t=>{t.disabled||fe(`
\n\t\t\t\t
\n\t\t\t\t\t${t.title}\n\t\t\t\t
\n\t\t\t
`).appendTo(e)})),e.find(`[data-set="${this._model.currentFilterSetId()}"]`).addClass("tv-screener-popup__item--active js-item-active")}confirmAndSaveCurrentFilterSet(){const e=this._model.getFilterSetById(this._model.currentFilterSetId()),t=JSON.stringify(this._model.currentFilterState()),s=e&&!this._model.defaultFilterSets.find((t=>t.id===e.id));return new Promise(((r,i)=>runOrSignIn((()=>this.showPromptDialog({title:a.t(null,void 0,o(409035)),label:a.t(null,void 0,o(67996))},e.title).then((o=>{if(void 0===o)return void i();const n={title:TradingView.clean(o),content:t};let l="Create filter set";s&&e.title===o&&(n.id=e.id,l="Update filter set"),this._model.saveFilterSet(n,l).then(r,i)}))))))}setHiddenFavoritesPopup(e,t,o,s){e.addClass("tv-dropdown-behavior__button");const r=fe('
');r.insertAfter(e).append(e) ;const i=fe('
').appendTo(r),n=fe('
').appendTo(i),l=fe('
').appendTo(n);l.on("click",".js-set",(e=>{const t=fe(e.currentTarget).attr("data-set");s(t),(0,re.sendSnowPlowData)(new ne("columnset_favorites_picker",t)),r.tvDropdown("close")}));const a=()=>{l.empty(),t().forEach((e=>{fe(`
\n\t\t\t\t\t
\n\t\t\t\t\t\t${TradingView.clean(e.title)}\n\t\t\t\t\t
\n\t\t\t\t
`).toggleClass("tv-screener-popup__item--active",o(e.id)).appendTo(l)})),r.tvDropdown("updateScroll")};return r.on("beforeOpenMenu",(()=>{a(),n.css("maxHeight",fe(window).height()-e.offset().top+fe(window).scrollTop()-45)})).on("resetContent",(()=>a())).on("forceClose",(()=>r.tvDropdown("close"))).tvDropdown({scroll:!0,noAnimation:!0})}setSelectPopup(e,t){const{wrapClass:o,buttonClass:s,dropdownClass:r}=e,{buttonTitle:i}=t,n=fe(`
`),l=fe(`
`).appendTo(n),a=fe(`
`).appendTo(n),c=fe('
').appendTo(a),d=fe('
').appendTo(c);return n.on("beforeOpenMenu",(()=>{c.css("maxHeight",fe(window).height()-l.offset().top+fe(window).scrollTop()-45)})).on("forceClose",(()=>n.tvDropdown("close"))).tvDropdown({scroll:!0,$wrap:l,$body:a,noAnimation:!0}),{$wrap:n,$button:l,$dropdownBody:a,$dropdownContent:d}}setMarketsList(e){this._markets=e}updateRefreshIntervalsPopupContent(){if(!this.$filterRefreshIntervalsPopup||!this.$filterRefreshIntervalsPopup.length)return;this.$filterRefreshIntervalsPopup.empty();const e=this._view.refreshIntervals;for(let t=0;t\n\t\t\t\t\n\t\t\t
`).appendTo(this.$filterRefreshIntervalsPopup)}}setRefreshIntervalsPopup(e){const t=this.setPopup(e,"tv-screener-toolbar__button-wrap","tv-screener-popup__refresh-intervals");e.toggleClass("js-prevent-dropdown",!window.is_authenticated),e.on("click",(()=>runOrSignIn((()=>{}),{source:"Screener refresh mode button"}))),window.loginStateChange.subscribe(null,(()=>{e.toggleClass("js-prevent-dropdown",!window.is_authenticated)}));const o=t.find(".js-content");this.$filterRefreshIntervalsPopup=o,this.updateRefreshIntervalsPopupContent(),t.on("beforeOpenMenu",(()=>{o.find(`input[value=${this._model.refreshInterval}]`).prop("checked",!0)})),o.on("click",".js-interval",(e=>{e.preventDefault();const s=+fe(e.currentTarget).find("input").val();setTimeout((()=>t.tvDropdown("close")),I.dur/2),s!==this._model.refreshInterval&&(this._model.isFastRefresh?(o.find(`input[value=${s}]`).prop("checked",!0),this._model.refreshInterval=s):(0,G.runOrGoPro)((()=>{o.find(`input[value=${s}]`).prop("checked",!0),this._model.refreshInterval=s}),oe.ProductFeatures.SCREENER_AUTO_REFRESH,{feature:"screenerAutoRefresh"},{value:-1===s}),(0,re.sendSnowPlowData)(new ge(s)))}))}setSelectIntervalContent(e,t,o=(()=>{})){t.empty();const s=this._model.selectedIntervalId;for(const e of Y.INTERVALS)fe(`
\n\t\t\t\t
\n\t\t\t\t\t${e.shortTitle}\n\t\t\t\t
\n\t\t\t
`).appendTo(t);e.on("afterOpenMenu",(()=>{t.on("click",".js-select-interval",(s=>{s.preventDefault();const r=this._model.selectedIntervalId,i=fe(s.currentTarget);let n=(0,Y.getIntervalById)(i.data("interval"));if(!n||r===n.id)return;const l=this._model.eodRestriction.value();(0,G.runOrGoPro)((()=>{l!==z.None&&"1d"!==n.id?((0,K.createGoProDialog)({feature:"screenerIntervalsEod"}),n=(0,Y.getIntervalById)("1d")):(t.find(".tv-screener-popup__select-interval-active").removeClass("tv-screener-popup__select-interval-active"),t.find(`[data-interval='${n.id}']`).addClass("tv-screener-popup__select-interval-active"),o(n))}),oe.ProductFeatures.SCREENER_INTERVALS,{feature:"screenerIntervals"},{interval:n.id}),setTimeout((()=>{e.tvDropdown("close"),t.off("click")}),I.dur/2),(0,re.sendSnowPlowData)(new ie(n.id))}))}))}setAlertsPopup(e,t){e.removeClass("tv-screener-toolbar__button--space_right").addClass("tv-dropdown-behavior__button js-prevent-dropdown") ;const o=fe('
');o.insertAfter(e).append(e);const s=fe('
').appendTo(o);let r=o.position().left;const i=o.width(),n=fe(".tv-screener-toolbar");let l=n.width(),a=l-(i+r);return this._bridge.width?(s.toggleClass("tv-dropdown__body--position_right",r>a),this._bridge.width.subscribe((()=>{r=o.position().left,l=n.width(),a=l-(i+r);const e=r>a;s.toggleClass("tv-dropdown__body--position_right",e)}))):fe(window).on("resize",(()=>{r=o.position().left,l=n.width(),a=l-(i+r);const e=r>a;s.toggleClass("tv-dropdown__body--position_right",e)})),t.on("click",(()=>o.tvDropdown("close"))).appendTo(s),e.on("click",(()=>runOrSignIn((()=>{this._model.alerts.ready.then((()=>o.tvDropdown("open")))})))),o.tvDropdown({noAnimation:!0})}}function ye(e){return TradingView.clean(e,!0)}var we=o(343370),Se=o(316230);o(93953),o(565296);class Ce{constructor(e,t){this.event="open_filters_dialog",this.location="toolbar",this.value="",this.source=e,this.state=t>0?"with_counter":"without_counter"}}class ke{constructor(e){this.event="change_filter_dialog_tab",this.source="filter_dialog_tab_button",this.location="filter_dialog",this.value="",this.state=e}}class xe{constructor(){this.event="filter_dialog_search_input_click",this.source="filter_dialog_search_input",this.location="filter_dialog",this.state="user_clicked",this.value=""}}class Fe{constructor(e){this.event="filter_dialog_search_no_terms_found",this.source="filter_dialog_search_input",this.location="filter_dialog",this.state="empty_search_result",this.value="",this.value=e}}class Te{constructor(e){this.event="filter_dialog_applied_filters",this.source="unknown",this.location="filter_dialog",this.state=he.UserActionState.ApplyFilters,this.value=e}}class Ee{constructor(e,t,o,s){this.event="filter_use",this.value=e,this.state=t,this.source=o,this.location=s}}class $e{constructor(e){this.event="apply_flagged_filter",this.source="flagged_marker",this.location="header",this.state="enabled",this.value=e}}var Ie=o(823127);const Ae={filtersSearch:``,filtersBody:'
\n\t\t
\n\t
'};var Me=[a.t(null,void 0,o(695271)),a.t(null,void 0,o(27448)),a.t(null,void 0,o(677720)),a.t(null,void 0,o(960393))];class Pe{constructor(e,t,o){this._model=e,this._view=t,this._bridge=o,this._dialogTitle="screener_filters",this._categories=null}showFiltersDialog(e){ return Promise.all([o.e(59819),o.e(39915),o.e(28359),o.e(6743),o.e(39694),o.e(37384)]).then(o.bind(o,345115)).then((({createTabbedDialog:t})=>{this._categories=this._getCategories();const o=this._categories.map((e=>({name:Me[e]}))),{dialog:s,tabs:r}=t({tabs:o,additionalHeaderContent:Ae.filtersSearch,width:Math.min(1400,Math.max(646,Ie(window).width()-200)),height:Math.max(450,Ie(window).height()-200),contentAddClass:"js-dialog-content",doNotCreatePages:!0,destroyOnClose:!0}),i=s.$content.find(".js-dialog-content"),n=s.$content.find(".js-screener-search");this.$fieldSearchInput=n.find(".js-search-input"),this.$fieldSearchInput.on("input",(0,we.default)((e=>{this._view.updateFilterSearch(),s.updateScroll()}),100,{leading:!1,trailing:!0})),this.$fieldSearchInput.on("click",(()=>{(0,re.sendSnowPlowData)(new xe)}));n.find(".js-search-reset").on("click",(e=>this._view.resetAllFilters()));const l=()=>{const e=this.$filtersPopup.get(0).clientWidth>=1292;e&&!this._$filtersWrap.is(".js-2col")?this._$filtersWrap.addClass("js-2col tv-screener-dialog__wrap--2col"):!e&&this._$filtersWrap.is(".js-2col")&&this._$filtersWrap.removeClass("js-2col tv-screener-dialog__wrap--2col")};this.$filtersPopup=Ie(Ae.filtersBody),this._$filtersWrap=this.$filtersPopup.find(".js-filters-wrap");const a=[];this._view.sortedFields.forEach((e=>{h.fields[e]&&!h.fields[e].disabled&&h.fields[e].control&&a.push(this._view.addFieldFilter(e,this._$filtersWrap))})),Promise.all(a).then((()=>this._$filtersWrap.find(".js-wrap").each(((e,t)=>{this._view.initFilterHandlers(Ie(t))})))),this.$filtersPopup.appendTo(i),e&&this._model.settingsSaver.setValue(this._model.settingKey+".filters.tab",0),r.tabChanged.subscribe(null,(e=>{this.filtersDialogTabChanged(e),s.scrollToStart(),0!==e&&(0,re.sendSnowPlowData)(new ke(e))})),this._view.$filtersButton.addClass("js-no-pointer-events"),s.on("scroll",(()=>{s.$content.find(".js-dropdown-toggle.i-opened").trigger("resetPosition",null,i.parent())}));const c=this._getActiveFilters(!1).sort();s.on("destroy",(e=>{const t=this._getActiveFilters(!1).sort();for(const e in h.fields)"condition"===h.fields[e].control&&h.fields[e].value&&((0,h.isValueAbsent)(h.fields[e].value.value)||(0,h.isValueAbsent)(h.fields[e].value.operator))&&(h.fields[e].value=null);Ie(".tv-screener-dialog__filter-field").removeClass("js-hidden"),this.$fieldSearchInput.val(""),this.$filtersPopup.remove(),delete this.$filtersPopup,this._view.$filtersButton.removeClass("js-no-pointer-events"),delete this._dialog,Ie(window).off("resize",l),(0,Se.default)(c,t)||(0,re.sendSnowPlowData)(new Te(t.join(", ")))})),this._model.trackEvent("Open filters dialog"),s.open(),Ie(window).on("resize",l),l(),this.$dialogContainer=s.$content,this._dialog=s}))}filtersDialogTabChanged(e){const t=this._categories.map((e=>"tv-screener-dialog--cat"+e)).join(" ");this.$filtersPopup.removeClass(t).addClass("tv-screener-dialog--cat"+this._categories[e]).scrollTop(0)}destroy(){this._dialog&&(this._dialog.close(),delete this._dialog)}_getCategories(){const e=[0] ;return this._view.sortedFields.forEach((t=>{h.fields[t]&&!h.fields[t].disabled&&h.fields[t].control&&(e.includes(h.fields[t].category)||e.push(h.fields[t].category))})),e.sort()}_getDefaultFiltersForCurrentFilterSet(){const{defaultFilterSets:e}=this._model,t=this._model.currentFilterSetId();return Object.values(e).filter((e=>e.id===t))[0].content.filters}_fieldValueIsEqualToDefaultFilter(e){const t=this._getDefaultFiltersForCurrentFilterSet()[e],o=h.fields[e].value;switch(h.fields[e].control){case"condition":return o.operator===t.operator&&o.value.toString()===t.value.toString();case"range":case"select":return o.sort().toString()===t.sort().toString();default:return h.fields[e].value===o}}_getActiveFilters(e=!0){const t=[];for(const o in h.fields)if(h.fields[o].value){if("condition"===h.fields[o].control&&((0,h.isValueAbsent)(h.fields[o].value.operator)||(0,h.isValueAbsent)(h.fields[o].value.value)))continue;e?t.push((0,h.getFieldTitle)(h.fields[o])):t.push(o)}return t}}var De=o(126561),Be=o(941285),Le=o(535799),Re=o(791325),Ne=o(763532);class Oe{constructor(){this._handlers=[]}registerHandlers(e){this._handlers.push(e)}beforeAppendSymbol(e,t){this._handlers.forEach((o=>{o.beforeAppendSymbol&&o.beforeAppendSymbol(e,t)}))}beforeAppendContextMenuItems(e){return this._handlers.reduce(((t,o)=>o.beforeAppendContextMenuItems?t.concat(o.beforeAppendContextMenuItems(e)):t),[])}afterSymbolConfirm(e,t){this._handlers.forEach((o=>{o.afterSymbolConfirm&&o.afterSymbolConfirm(e,t)}))}beforeAppendSymbolsHeader(e){this._handlers.forEach((t=>{t.beforeAppendSymbolsHeader&&t.beforeAppendSymbolsHeader(e)}))}}var je=o(589007),We=o(251954),Ve=o(104344),Ue=o(50959),He=o(500962),qe=o(497754),ze=o.n(qe),Ge=o(728804),Xe=o(694553),Ke=o(742615);function Ye(e){const t=Object.keys(e.modes),o=Object.values(e.modes),[s,r]=Ue.useState(t[0]);return Ue.createElement(Ge.CustomBehaviourContext.Provider,{value:window.TradingView.onChartPage?Ge.presetPlatform:Ge.presetDefault},Ue.createElement(Je,{isActive:s===t[0],title:o[0]}),Ue.createElement("span",{className:Ke.switcherContainer},Ue.createElement(Xe.Switch,{onChange:function(o){const s=o.currentTarget.checked?t[1]:t[0];r(s),e.onChange(s)}})),Ue.createElement(Je,{isActive:s===t[1],title:o[1]}))}function Je(e){return Ue.createElement("span",{className:ze()(Ke.modeTitle,e.isActive&&Ke.modeTitleActive)},e.title)}var Ze=o(952604),Qe=o(722854),et=o(435218),tt=o(400236),ot=o(83436),st=o(157490);class rt extends Ue.PureComponent{render(){return Ue.createElement(et,{onMeasure:this.props.onResize},Ue.createElement("div",{className:this.props.className,onClick:this.props.onClick},this.props.children))}}var it=o(690863);class nt extends Ue.PureComponent{constructor(e){super(e),this._getDropdownHeight=()=>{if(!this._dropdownParent)return;const e=window.innerHeight-this._dropdownParent.getBoundingClientRect().bottom-20;return e&&e<50?void 0:e},this._getFirstHiddenItemIndex=()=>{let e;if(this.state.availableWidth&&!this._itemSizes.includes(null)){let t=0;for(e=0;e{this.setState({availableWidth:e.width,isOpened:!1})},this._onSelect=e=>{this.props.onSelect&&this.props.onSelect(e),this.setState({activeItem:e,isOpened:!1})},this._onDropdownSelect=(e,t)=>{this.props.onSelect&&this.props.onSelect(t.actualIndex),this.setState({activeItem:t.actualIndex,isOpened:!1})},this._onOutsideClick=e=>{this.state.isOpened&&(this.state.isOpened&&(e.preventDefault(),e.stopPropagation()),this.setState({isOpened:!1}))},this._onDropdownItemClick=()=>{this.setState({isOpened:!this.state.isOpened})},this._onItemResize=(e,t)=>{this._itemSizes[e]=t.width,this._itemSizes.includes(null)||this.forceUpdate()},this._itemSizes=this.props.items.map((e=>null)),this.state={availableWidth:0,activeItem:this.props.activeItem||0,isOpened:!1}}render(){const e=this._getFirstHiddenItemIndex(),t=this.props.items.slice(0,e),o=this.props.items.slice(e),s=t.map(((e,t)=>{const o=this.state.activeItem===t,s=qe(Ze.itemContent,{[Ze.active]:o});return Ue.createElement(rt,{key:e.title,className:qe(Ze.item,{[Ze.active]:o}),onClick:this._onSelect.bind(this,t),onResize:this._onItemResize.bind(this,t)},Ue.createElement("div",{className:s},e.title))})),r=o.map(((e,o)=>({elem:e.title,actualIndex:o+t.length}))),i=this.state.activeItem-e,n=i>=0,l=Ue.createElement(st.OutsideEvent,{handler:this._onOutsideClick,click:!0},(e=>Ue.createElement("div",{ref:e=>e&&(this._dropdownParent=He.findDOMNode(e))},Ue.createElement("div",{className:qe(Ze.item,{[Ze.active]:n}),ref:e,onClick:this._onDropdownItemClick},Ue.createElement("div",{className:qe(Ze.itemContent,Ze.dropdownItem,{[Ze.active]:n})},Ue.createElement(ot.Icon,{className:qe(Ze.dropdownIcon,{[Ze.active]:this.state.isOpened}),icon:it}),Ue.createElement(tt.DropdownList,{isOpened:this.state.isOpened,items:r,selected:n?i:void 0,onSelect:this._onDropdownSelect,top:27,right:0,itemsClassName:qe(Qe.bluishItem,Ze.dropdownListItem),selectedClassName:this.props.selectedItemClassName,maxHeight:this._getDropdownHeight()}))))));return Ue.createElement(et,{onMeasure:this._onElementResize},Ue.createElement("div",{className:qe(Ze.elementWrap,this.props.className)},Ue.createElement("div",{className:Ze.itemsWrap},s,o.length?l:void 0)))}}function lt(e,t){He.render(Ue.createElement(nt,{...t}),e)}var at=o(394721);const ct=["country","sector","industry","description"],dt=["close","bid","ask","candlestick"],ht=["Recommend.All","Recommend.MA","Recommend.Other"];function ut(e,t){return e.indexOf(t)}function pt(e){return e.map((e=>(0,Ne.escapeCSVValue)(e))).join(",")}function _t(e){return e.map(((e,t)=>Boolean(e)?t:void 0)).filter(Boolean)}function gt(e){return at.candlestickRanges.find((t=>t.key===e))}var mt=o(202339),ft=o(838126),vt=o(920389),bt=o(799148);class yt{constructor(){this.event="export_screener_data",this.source="export_button",this.location="toolbar",this.state="",this.value=""}}class wt{ constructor(e,t){this.event="change_forex_group",this.source="forex_group_selector",this.location="toolbar",this.state=e,this.value=t}}var St=o(531327);function Ct(e){return Promise.all([o.e(82507),o.e(68726),o.e(56305),o.e(3954),o.e(22325),o.e(38587),o.e(82999),o.e(67159),o.e(61601),o.e(93085),o.e(25034),o.e(57595),o.e(71041),o.e(31424),o.e(54631),o.e(67911)]).then(o.bind(o,751411)).then((t=>t.showScreenerMarketDialog(e)))}const kt=new Set(["dps_common_stock_prim_issue_yoy_growth_fy","earnings_per_share_diluted_qoq_growth_fq","earnings_per_share_diluted_yoy_growth_fq","earnings_per_share_diluted_yoy_growth_fy","earnings_per_share_diluted_yoy_growth_ttm","ebitda_qoq_growth_fq","ebitda_yoy_growth_fq","ebitda_yoy_growth_fy","ebitda_yoy_growth_ttm","free_cash_flow_margin_fy","free_cash_flow_margin_ttm","free_cash_flow_qoq_growth_fq","free_cash_flow_yoy_growth_fq","free_cash_flow_yoy_growth_fy","free_cash_flow_yoy_growth_ttm","gross_profit_margin_fy","gross_profit_qoq_growth_fq","gross_profit_yoy_growth_fq","gross_profit_yoy_growth_fy","gross_profit_yoy_growth_ttm","net_income_bef_disc_oper_margin_fy","net_income_qoq_growth_fq","net_income_yoy_growth_fq","net_income_yoy_growth_fy","net_income_yoy_growth_ttm","oper_income_margin_fy","total_assets_qoq_growth_fq","total_assets_yoy_growth_fq","total_assets_yoy_growth_fy","total_debt_qoq_growth_fq","total_debt_yoy_growth_fq","total_debt_yoy_growth_fy","total_revenue_qoq_growth_fq","total_revenue_yoy_growth_fq","total_revenue_yoy_growth_fy","total_revenue_yoy_growth_ttm"]);function xt(e,t){var o;return!!t.title&&(t.title.toLowerCase()!==(null===(o=t.shortTitle)||void 0===o?void 0:o.toLowerCase())||function(e){return kt.has(e)}(e))}var Ft=o(194577),Tt=o(963867),Et=o(159255);function $t(e,t){const o=setInterval((()=>{const s=document.querySelector(e);if(s){clearInterval(o);new Et.default(t).observe(s),t()}}),20)}var It=o(586240),At=o(823127);const Mt=parseInt(It["size-sticky-symbol-header-height"]);function Pt(e){const{$toolbar:t}=e,o=t.outerHeight(),s=e.table.$stickyHeader,r=document.querySelector(".js-sticky-symbol-header-container")?64+Mt:64;function i(t){const i=t||At(document).scrollTop(),{isSticky:n,upperScrollLimit:l,bottomScrollLimit:a}=function(t){const i=e.table._$emptyMessage?e.table._$emptyMessage.outerHeight():0,n=e.$content.offset().top+e.$content.outerHeight(),l=i||48,a=e.$content.offset().top-r-o,c=n-l-r-o-s.outerHeight();return{isSticky:t>=a&&t<=c,bottomScrollLimit:c,upperScrollLimit:a}}(i);if(n)return"sticky";return Math.abs(a-l)<20||io)return"absolute"===s?{left:"",right:""}:{left:t,right:""};const r=e.$content.scrollLeft();if((0,se.isRtl)()){const t=e._getResizerBridgeWidth();return"absolute"===s?{left:"",right:r}:{left:"",right:t+r}}return{left:t-r,right:""}}(r),c={left:r,width:n},d={...a,width:l} ;if(t.css({left:"",right:""}),s.css({left:"",right:""}),"absolute"===o)return t.css({width:n}),void s.css(d);t.css(c),s.css(d)}function l(e){t.css({top:e});const r=e+o;s.css({top:r})}const a=function(){let e=At(document).scrollTop(),a=i(e);return()=>{const c=At(document).scrollTop(),h=i(c);if("bottom"===h){d(h);return l(e+r-c),void(a="bottom")}if(a!==h){if(d(h),"absolute"===h)return t.css({top:0}),s.css({top:o}),n(),void(a="absolute");"sticky"===h&&(n(),l(r),e=c,a="sticky")}}}();function c(){n(),a()}function d(e){const o="absolute"===e;t.toggleClass("tv-screener-toolbar--markets_absolute",o),s.toggleClass("tv-screener-sticky-header-wrapper--markets_absolute",o),t.toggleClass("tv-screener-toolbar--markets_sticky",!o),s.toggleClass("tv-screener-sticky-header-wrapper--standalone_sticky",!0),s.toggleClass("tv-screener-sticky-header-wrapper--markets_sticky",!o)}const h=function(){let e;return()=>{clearTimeout(e),e=setTimeout(c,0)}}();document.addEventListener("scroll",(function(){a(),(0,se.isRtl)()&&n()}),{passive:!0}),e.$content[0].addEventListener("scroll",n),window.addEventListener("resize",h),$t(".widgetbar-wrap",n),$t(".tv-screener-table",n),d(i()),c()}var Dt=o(778785);function Bt(e){const{$before:t=null,$appendTo:o=null,$dropdownContainer:s=null,beforeMakingSelectPopup:r=(()=>{}),makeSelectPopup:i,afterMakingSelectPopup:n=(()=>{}),afterSelectPopupAppend:l=(()=>{})}=e,a={$dropdownContainer:s};r();const{$wrap:c,$button:d,$dropdownContent:h}=i(a);return n(c,d,h),(t||o)&&(t?c.insertBefore(t):c.appendTo(o),l(c,d,h)),d}var Lt,Rt=o(414864),Nt=o(696828);!function(e){e[e.Header=0]="Header",e[e.Table=1]="Table"}(Lt||(Lt={}));const Ot={[Lt.Header]:{description:"Open header context menu",prepend:!1},[Lt.Table]:{description:"Open context menu",prepend:!0}};function jt(e,t,s){return async function(){const[{TVAction:e},{AddToWatchlistAction:t}]=await Promise.all([o.e(34215).then(o.bind(o,973580)),o.e(26417).then(o.bind(o,686041))]);return{default:e,addToWatchlist:t}}().then((o=>t(e,o))).then((t=>{const o=Object.values(t);return Ot[s].prepend?function(e,t){return e._lifecycle.beforeAppendContextMenuItems(t.length>0?"bottom":void 0).concat(t)}(e.view,o):o}))}function Wt(e,t,s){const{view:r,e:i}=e;return jt(e,t,s).then((e=>{return t=e,s=i,o.e(34215).then(o.bind(o,263221)).then((({ContextMenuManager:e})=>e.showMenu(t,s)));var t,s})).then((()=>{const e=Ot[s].description;r._model.trackEvent(e)}))}var Vt,Ut=o(897925),Ht=o(362052),qt=o(324020),zt=o(823127);function Gt(e,t){const{view:o}=e,s=o._bridge,r=t.default,i=o._selectableList?o._selectableList.getSelectedKeys().length:1,n={...e,selectedSymbolsCount:i};if((0,Tt.isExternalWidget)(s))return{...Kt(n,r)};if((0,Tt.isScreenerPage)(s)||(0,Tt.isMarketPage)(s)){return{...0===i?Kt(n,r):{},...Xt(n,t.addToWatchlist)}}return{...Xt(n,t.addToWatchlist),...Yt(n,r),...Jt(n,r)}}function Xt(e,t){const{view:s,symbol:r,shortName:i,selectedSymbolsCount:n}=e;let l,c;0===n?(l=a.t(null,void 0,o(919604)).format({symbolName:i}),c=[r]):(l=a.t(null,void 0,o(276893)), c=s._selectableList?s._selectableList.getSelectedKeys().slice(0):[]);return{addToWatchListAction:new t({label:l,disabled:!0,onExecute:()=>{(0,vt.runOrSignIn)((()=>{const e=s._getWatchlist();e&&(e.addSymbols(c),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Vt.AddToWatchlist,"row",!0)))}),{source:"add symbol to watchlist"})}})}}function Kt(e,t){const{view:s}=e;return["sector","industry"].includes(s._model.screener_type)?function(e,t){const{e:s}=e,r=zt(s.target).closest(".tv-screener-table__result-row").find(".tv-screener__symbol");return{openSymbolPageAction:new t({label:a.t(null,void 0,o(393295)).format({symbol:r.text()}),onExecute:()=>{window.open(r.attr("href"),"_blank"),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Vt.OpenSymbolPage,"row",!0))}})}}(e,t):function(e,t){const{view:s,shortName:r,symbol:i}=e;return{openChartAction:new t({label:a.t(null,void 0,o(858764)).format({symbol:r}),onExecute:()=>{const{applySymbol:e}=s._bridge;e&&(e(i,!0),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Vt.OpenChart,"row",!0)))}})}}(e,t)}function Yt(e,t){const{view:s,symbol:r,shortName:i,selectedSymbolsCount:n}=e;let l,c;0===n?(l=a.t(null,void 0,o(465687)).format({symbol:i}),c=[r]):(l=a.t(null,void 0,o(695296)),c=s._selectableList.getSelectedKeys());return{compareAction:new t({jsxLabel:Ue.createElement(Ht.CompareLabel,{label:l}),onExecute:async()=>{var e;for(const t of c)await(null===(e=s._bridge.chartWidgetCollection)||void 0===e?void 0:e.activeChartWidget.value().addCompareAsOverlay(t,false))}})}}function Jt(e,t){const{symbol:s,shortName:r,selectedSymbolsCount:i}=e;if(i>0)return{};return{addToTextNotesAction:new t({icon:qt,label:a.t(null,void 0,o(878850)).format({symbol:r}),onExecute:()=>{(0,vt.runOrSignIn)((()=>{var e;(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Vt.AddTextNote,"row",!0)),null===(e=window.widgetbar)||void 0===e||e.setPage("base"),(0,Rt.createSymbolNote)(s)}),{source:"Add text note in screener"})}})}}!function(e){e.AddToWatchlist="add_to_watchlist",e.OpenChart="open_chart",e.AddToCompare="add_to_compare",e.AddTextNote="add_text_note",e.OpenSymbolPage="open_symbol_page"}(Vt||(Vt={}));var Zt,Qt=o(988411),eo=o.n(Qt),to=o(909740),oo=o(390466);function so(e,t,o){return e.get((0,Y.getFieldNameWithResolution)(t,o))}!function(e){e.Bool="bool",e.FundamentalPrice="fundamental_price",e.Number="number",e.Percent="percent",e.Price="price",e.Text="text",e.Time="time"}(Zt||(Zt={}));const ro=["—",''];function io(e,t,o,s,r){if(!lo()&&!r)return"";const i=!e&&o===Zt.Price||!t&&o===Zt.FundamentalPrice||ro.includes(s),n=![Zt.Price,Zt.FundamentalPrice].includes(o);if(i||n)return"";let l;return l=o===Zt.Price?e:t,`${l}`}const no="screener.showCurrencyLabel";function lo(){return r.getBool(no,!0)}var ao=o(366619),co=o(267562),ho=o(182951),uo=o(891250),po=o(823127),_o=o(823127);class go{constructor(e){this._setOptions(e),this._fields={}, this._fieldsOrder=Array.isArray(e.fieldsOrder)&&e.fieldsOrder||[],this.fieldsOrderChange=new(b()),this._columnsMap=new Map,this.afterFixCols=new(b()),this._additionalColumns=[],this._hiddenColumns=0,this._debouncedFixCols=(0,M.default)((()=>{this._unhideColumns(),this._unhideCells(),this._fixCols()}),50),this.dragStarted=new(eo()),this._fieldsOrderChange=!1,this._updateEmptyMessageIcon=this._updateEmptyMessageIcon.bind(this),to.watchedTheme.subscribe(this._updateEmptyMessageIcon)}_setOptions(e){this._options=e||{},this._model=this._options.model,this._defaultFormatter=this._options.defaultFormatter||(e=>e.value),this._nullFormatter=this._options.nullFormatter||(()=>"—"),this._widthChange=this._options.widthChange,this._visibilityChange=this._options.visibilityChange,this._noDataString=this._options.noDataString,this._isUnavailableWidgetMarket=this._options.isUnavailableWidgetMarket,this._disableStickyHeader=e.disableStickyHeader}updateSortField(e,t){const o=this.getTh(e);e&&t&&o.size()&&(this.$theadRow.find(".tv-screener-table__sort--desc,.tv-screener-table__sort--asc").removeClass("tv-screener-table__sort--desc tv-screener-table__sort--asc"),o.find(".js-table-sort").empty().addClass(`tv-screener-table__sort--${t}`).append("asc"===t?ho:uo))}highlightCell(e,t,o){const s=this.$tbody[0].querySelector(`tr[data-symbol="${e}"] td[data-field-key="${t}"]`);if(s){s.classList.add("tv-screener-table__cell--highlighted");const e=s.querySelector("span");if(e){const t=o?"tv-screener-table__cell--growing":"tv-screener-table__cell--falling";e.classList.add(t)}}}flickRow(e){this.$tbody[0].querySelectorAll(`tr[data-symbol="${e}"] td`).forEach((e=>{const t=e.querySelector("span");t&&t.classList.remove("tv-screener-table__cell--growing","tv-screener-table__cell--falling")}))}_createTable(){if(this._table)return;const e=document.createElement("table"),t=["tv-data-table"];this._options.addTableClasses&&t.push(...this._options.addTableClasses),e.classList.add(...t);const o=document.createElement("colgroup"),s=document.createElement("thead"),r=["tv-data-table__thead"];this._options.addTheadClasses&&r.push(...this._options.addTheadClasses),s.classList.add(...r);const i=document.createElement("tr"),n=["tv-data-table__thead-row"];this._options.addTheadRowClasses&&n.push(...this._options.addTheadRowClasses),i.classList.add(...n);const l=document.createElement("tbody");l.classList.add("tv-data-table__tbody"),e.appendChild(o),e.appendChild(s),s.appendChild(i),e.appendChild(l),this._table=e,this._colgroup=o,this._theadRow=i,this._tbody=l,window.addEventListener("resize",(()=>this._debouncedFixCols())),this._widthChange.subscribe(this,(()=>this._debouncedFixCols())),this._visibilityChange&&this._visibilityChange.subscribe((e=>{e&&this._debouncedFixCols()}))}_createStickyWrapper(){if(this._stickyWrapper)return;const e=["tv-data-table-sticky-wrapper"];this._options.addStickyHeaderWrapperClasses&&e.push(...this._options.addStickyHeaderWrapperClasses);const t=document.createElement("div");t.classList.add(...e);const o=this._table.cloneNode(!0) ;t.append(o),this._stickyWrapper=t}_createHeader(){const e=document.createDocumentFragment(),t=document.createDocumentFragment();this._disableStickyHeader||this._createStickyWrapper();for(let o=0;o{if(t.data("field")===this._model.searchField)return;e.preventDefault(),t.css({position:"relative",left:0});const i=t.offset().left;let n=i;const l=e.pageX||e.originalEvent.touches[0].pageX,a=e=>{const c=(e.pageX||e.originalEvent.touches[0].pageX)-l;if(!r){if(Math.abs(c)<10)return;o.e(34215).then(o.bind(o,263221)).then((({ContextMenuManager:e})=>{null!==e.getShown()&&(r=!1,t.css("left","auto"),_o(window).off("mousemove touchmove",a),this._onDragStop(t))})),this._onDragStart(t),t.one("click",(e=>{r&&e.stopPropagation()}))}r=!0;const d=s.offset().left,h=s.outerWidth(),u=t.outerWidth(),p=Math.max(d,Math.min(d+h-u,i+c)),_=p+u/2;let g=_o(),m=!1;const f=t.prev();if(f.size()&&((0,se.isRtl)()?_>f.offset().left+f.outerWidth()/2:p<=d||_=d+h||((0,se.isRtl)()?_e.offset().left+e.outerWidth()/2))&&(g=e,m=!0)}}const v=g.data("field");if(g.size()&&"name"!==v){const e=t.data("field"),o=_o(this._colgroup).find(`.js-tv-data-table-col-${this._esc(e)}`),s=_o(this._colgroup).find(`.js-tv-data-table-col-${this._esc(v)}`);let r=_o(),i=_o() ;this._stickyWrapper&&(r=_o(this._stickyWrapper).find(`.js-tv-data-table-col-${this._esc(e)}`),i=_o(this._stickyWrapper).find(`.js-tv-data-table-col-${this._esc(v)}`)),m?(o.insertAfter(s),r.size()&&i.size()&&r.insertAfter(i)):(o.insertBefore(s),r.size()&&i.size()&&r.insertBefore(i));let l=_o(),a=_o();this._stickyWrapper&&(l=_o(this._stickyWrapper).find(`.js-tv-data-table-th-${this._esc(e)}`),a=_o(this._stickyWrapper).find(`.js-tv-data-table-th-${this._esc(v)}`)),m?(t.insertAfter(g),n=t.offset().left-g[0].offsetWidth,l.size()&&a.size()&&l.insertAfter(a)):(t.insertBefore(g),n=t.offset().left+g[0].offsetWidth,l.size()&&a.size()&&l.insertBefore(a)),this._swapCols(e,v)}t.css("left",p-n)};_o(window).on("mousemove touchmove",a).one("mouseup touchend",(e=>{setTimeout((()=>{r=!1}),0),t.css("left","auto"),_o(window).off("mousemove touchmove",a),r&&this._onDragStop(t)}))}))}_setSearchInput(e,t){const o=e.querySelector(".js-search-query");if(!o)return;const s=o.querySelector(".js-search-input"),r=o.querySelector(".js-input-reset");(0,Tt.isScreenerPage)(this._model._bridge)&&s.focus();const i=Boolean(t);r.classList.toggle("i-hidden",!i),i&&(s.value=t),s.addEventListener("input",(()=>{r.classList.toggle("i-hidden",0===s.value.length)}));const n=(0,M.default)((()=>{this._fields[this._model.searchField].searchValue=s.value,this._model.loading||this._model.update()}),400);s.addEventListener("input",(()=>n()))}_onDragStart(e){this._model.preventPrevScanRequest(),this.dragStarted.setValue(!0);const t=e.data("field"),o=this._getColByField(t);o&&(this._options.addDraggingThClasses&&e[0].classList.add(...this._options.addDraggingThClasses),this._options.addDraggingColClasses&&o.classList.add(...this._options.addDraggingColClasses))}_swapCols(e,t){const o=this._columnsOrder.indexOf(e),s=this._columnsOrder.indexOf(t);this._columnsOrder[o]=this._columnsOrder.splice(s,1,this._columnsOrder[o])[0],this._fieldsOrderChanged=!0;const r=Math.min(o,s),i=Math.max(o,s),n=this._tbody.children;for(let e=0;eMath.floor(e.getBoundingClientRect().width)));const s="big"===this._options.table_style,r=window.innerWidth>P.breakpoints.tablet,i=this._table.parentNode.offsetWidth;let n=vo(o);if(s&&r&&n>i){do{n>i&&(o.pop(),this._hideColumn()),n=vo(o)}while(n>i);const e=Math.floor((i-n)/o.length);o=o.map((t=>t+e));const t=o.length-1,s=o[t],r=i-vo(o);o[t]=s+r}if(t.forEach(((e,t)=>{const s=o[t];s?e.style.width=`${s}px`:e.classList.add("i-hidden")})),this._stickyWrapper){const e=this._stickyWrapper,t=e.querySelector("colgroup"),s=e.querySelector("table"),r=this._colgroup.cloneNode(!0);t.replaceWith(r),s.classList.add("tv-screener-table--fixed"),this._stickyWrapper.style.width=function(e,t){if(!((0,Tt.isMarketPage)(e._model._bridge)&&window.innerWidth>P.breakpoints.phone))return;return e._stickyWrapper.querySelectorAll("th").forEach(((e,o)=>{t[o]?e.classList.remove("i-hidden"):e.classList.add("i-hidden")})),`${At(e._table).width()}px`}(this,o)||`${n}px`}this._table.classList.add("tv-screener-table--fixed"),this.afterFixCols.fire()}_hideColumn(){const e=this._theadRow.children;for(let t=e.length-1;t>=0;t--){const o=e[t];if(!o.classList.contains("i-hidden")){o.classList.add("i-hidden");break}}this._hiddenColumns++}_unhideColumns(){const e=this._table.querySelectorAll("col"),t=this._theadRow.querySelectorAll("th");e.forEach(((e,o)=>{e.style.width="",e.classList.remove("i-hidden"),t[o].classList.remove("i-hidden")})),this._hiddenColumns=0}_unhideCells(){if(!this._tbody)return;this._tbody.querySelectorAll("td.i-hidden").forEach((e=>{e.classList.remove("i-hidden")}))}toggleSignals(e){const t=this._fields[e];t.displaySignal=!t.displaySignal;const o=this._columnsOrder.indexOf(e);if(-1===o)return;const s=this._tbody.querySelectorAll(`.tv-data-table__row .tv-data-table__cell:nth-child(${o+1}) .tv-screener-table__signal`);0!==s.length&&(s.forEach((e=>e.classList.toggle("i-hidden",!t.displaySignal))),this._fixCols())}get $element(){return this._createTable(),_o(this._table)}get $tbody(){return this._createTable(),_o(this._tbody)}get $stickyHeader(){return this._createTable(),this._createStickyWrapper(),_o(this._stickyWrapper)}get $theadRow(){return this._disableStickyHeader?_o(this._theadRow):_o(this._theadRowSticky)}get additionalColumns(){return this._additionalColumns}get fieldsOrder(){return this._fieldsOrder}get columnsOrder(){return this._columnsOrder}setColumnsMap(e){this._columnsMap=e}setFields(e){this._fieldsOrder=[],this._columnsOrder=[];for(const[t,o]of Object.entries(e))this._fieldsOrder.push(t),o.skipField||this._columnsOrder.push(t);this._fields={},this._additionalColumns=[],this._fieldsOrder.forEach((t=>{this._fields[t]=e[t],e[t]&&e[t].additionalColumns&&e[t].additionalColumns.forEach((e=>{this._additionalColumns.includes(e)||this._additionalColumns.push(e)}))})),this.fieldsOrderChange.fire(),this._fieldsOrderChange=!0}update(e){this._fieldsOrderChange&&(this._unhideColumns(),this._createTable(),this._createHeader()),this.clearData(),this.append(e),this._fieldsOrderChange&&(this._fieldsOrderChange=!1), this._fixCols()}_updateEmptyMessageIcon(){if(!this._$emptyMessage)return;const e=to.watchedTheme.value()||((null===(t=document.querySelector("html"))||void 0===t?void 0:t.classList.contains("theme-dark"))?y.StdTheme.Dark:y.StdTheme.Light);var t;const o=this._$emptyMessage.find("i"),s=e===y.StdTheme.Light?co:ao;o.html(s)}_setEmptyMessage(){let e,t="";(0,Tt.isScreenerPage)(this._model._bridge)?t="tv-screener-table__empty-result--fixed":((0,Tt.isChartPage)(this._model._bridge)||(0,Tt.isExternalWidget)(this._model._bridge))&&(t="tv-screener-table__empty-result--relative"),e=this._isUnavailableWidgetMarket?a.t(null,void 0,o(446367)).format({openLink:'',closeLink:""}):this._noDataString||a.t(null,void 0,o(641379)),this._$emptyMessage=_o(`\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
${e}
\n\t\t\t
\n\t\t`).insertAfter(this._table),this._updateEmptyMessageIcon(),(0,Tt.isMarketPage)(this._model._bridge)?this._fixCols():this._model._view.fixStandaloneWidth()}append(e){this._$emptyMessage&&this._$emptyMessage.remove();const t=so(this._columnsMap,"currency",this._model.selectedIntervalId),o=so(this._columnsMap,"fundamental_currency_code",this._model.selectedIntervalId),s=document.createDocumentFragment();for(let r=0;r=0;--e){const t=this._fieldsOrder[e],o=this._fields[t];if(!o||o.skipField)continue;const s=so(this._columnsMap,t,this._model.selectedIntervalId),r=o.additionalColumns?o.additionalColumns.map((e=>bo(i.d,so(this._columnsMap,e,this._model.selectedIntervalId)))):[];let a="";const c=["tv-data-table__cell"];let _;if(o.tooltip&&("function"==typeof o.tooltip?a=o.tooltip(...r,o):"string"==typeof o.tooltip&&(a=o.tooltip),c.push("apply-common-tooltip")),"price"===o.type&&r.length>=4){const e=r.slice(-4);e[2]="true"===e[2],_=(0,h.getPriceFieldFormatter)(...e)}else _=(0,h.getFieldFormatter)(o,this._model.screener_type,!1);"name"===t&&r.push(i.s);const g=bo(i.d,s);let m=null===g?this._nullFormatter():_&&_.format(g)||this._defaultFormatter({value:g,fieldKey:t,field:o,rowData:i,fieldsOrder:this._fieldsOrder,title:a,columnsMap:this._columnsMap});if(this._options.addCellClasses){const e="function"==typeof this._options.addCellClasses?this._options.addCellClasses({value:g,fieldKey:t,field:o}):this._options.addCellClasses ;c.push(...e)}const f=o.additionalFormatter?o.additionalFormatter(...r):"";o.mutateDisplayValue&&(m=o.mutateDisplayValue(m,...r,o)),this._model.hasMarkedSymbols()&&c.push("tv-screener-table__cell--with-marker"),p>0&&(c.push("i-hidden"),p--);let v=m+f+io(n,l,o.type,m,(0,Tt.isMarketPage)(this._model._bridge));(t===S.ScanFields.Name||t===S.ScanFields.Sector&&this._model.screener_type===u.ScreenerType.CryptoMkt)&&(v=(0,oo.symbolNameWrap)({symbolHtml:v,fieldsOrder:this._fieldsOrder,rowData:i.d,proSymbol:i.s}));const b=document.createElement("td");b.classList.add(...c),b.title=a&&"name"!==t?a:"",b.setAttribute("data-field-key",t),b.innerHTML=v,d.prepend(b)}const _=document.createElement("tr");_.classList.add(...a),c.forEach((e=>_.setAttribute(...e))),_.append(d),this._options.onRowBuild&&this._options.onRowBuild(_,i),s.appendChild(_)}this._tbody.appendChild(s),0===this._tbody.querySelectorAll("tr").length&&this._setEmptyMessage(),this._options.onUpdate&&this._options.onUpdate()}clearData(e){if(this._tbody)if(e){const t=this._tbody.children,o=t.length;for(let s=e;se.removeChild(t)))}function vo(e){return e.reduce(((e,t)=>e+t))}function bo(e,t){return e[t]}var yo=o(384809),wo=o(806308);const So={america:"usa",brazil:"brazilia",euronext:"europe",hongkong:"hong-kong",newzealand:"new-zealand",uk:"united-kingdom",rsa:"south-africa"};function Co(e,t,o="sector"){return e&&t?(So[t]&&(t=So[t]),`/markets/stocks-${t}/sectorandindustry-${o}/${(s=e,s.replace(/[^a-zA-Z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")).toLowerCase()}/`):"/markets/stocks-usa/sectorandindustry-sector/";var s}function ko(e){const t=e._model,o=e._bridge,s={screenerType:Eo(t),market:t.markets[0],utm:t.utm,largeChartUrl:t.largeChartUrl,tableStyle:o.table_style,screenerPlacement:(0,Tt.getScreenerPage)(o),openChartOnSameTab:o.open_chart_on_same_tab,bridgeBaseUrl:o.baseUrl,selectedIntervalId:t.selectedIntervalId};return e=>function(e){switch(e.fieldKey){case S.ScanFields.Name:return function(e){const{value:t,title:o,screenerPlacement:s,openChartOnSameTab:r}=e;if("chart"!==s){const s=$o(e);return`${t}`}return`
${t}
`}(e) ;case S.ScanFields.Description:return function(e){const{value:t,screenerType:o,market:s}=e;if(["sector","industry"].includes(o)){const e=xo(t);return`\n\t\t\t\t\t\t${e}\n\t\t\t\t\t`}return Fo(t)}(e);case S.ScanFields.Sector:return function(e){const{value:t,fieldKey:o,screenerType:s,market:r,tableStyle:i,utm:n,openChartOnSameTab:l}=e;if(s===u.ScreenerType.CryptoMkt){const o=$o(e);return`\n\t\t\t\t\t\t${t}\n\t\t\t\t\t`}if("big"===i)return To(t,r,o);return t}(e);case S.ScanFields.Industry:return function(e){const{value:t,fieldKey:o,screenerType:s,market:r,tableStyle:i}=e;if("big"===i&&s!==u.ScreenerType.CryptoMkt)return To(t,r,o);return Fo(t)}(e);case S.ScanFields.Country:return(0,mt.triesTranslateCountrieName)(e.value);default:return e.value}}({...e,...s})}function xo(e){return(0,me.triesTranslateScreenerData)(e)}function Fo(e){const t=xo(e);return`${t}`}function To(e,t,o){const s=xo(e);return`\n\t\t\t\t${s}\n\t\t\t`}function Eo(e){return e.screener_type}function $o(e){const{rowData:t,screenerType:o,screenerPlacement:s,utm:r,largeChartUrl:i,columnsMap:n,selectedIntervalId:l}=e;if(o===u.ScreenerType.CryptoMkt){const e={proName:t.s,type:"crypto"};return"widget"===s&&i?(0,wo.makeTemplateSymbolUrl)(i,e):(0,wo.makeSymbolPageUrl)(e)}const a=so(n,"exchange",l);let c;a&&(c=t.d[a]);const d={proName:t.s,exchange:c,type:o};return o===u.ScreenerType.ContinuousFutures?(0,wo.makeSymbolChartUrl)(d):"widget"===s&&i?(0,wo.makeTemplateSymbolUrl)(i,d):(0,wo.makeSymbolPageUrl)(d,r)}var Io,Ao=o(583912);function Mo(e){const t=e._fields_order,s=e._disableStickyHeader,r=e._lifecycle,i=e.widthChange,n=e._model,l=n.screener_type,c=e._bridge,d=c.table_style,p=c.hide_controls,_=c.visible,g=(0,Tt.getScreenerPage)(c),m=h.fields.description,f={model:n,fieldsOrder:t,titleFormatter:(t,o)=>{const s=e._getThContent(t,o);return t===S.ScanFields.Name&&r.beforeAppendSymbolsHeader(s.get(0)),s},defaultFormatter:ko(e),addTheadClasses:["tv-screener-table__thead",s?"tv-screener-table__thead--sticky":"tv-screener-table__thead--regular"],addThClasses:["tv-data-table__sortable","tv-screener-table__sortable","tv-screener-table__th",d?`tv-screener-table__th--${d}`:"","widget"===g&&p?"tv-screener-table__th--no-toolbar":""],addCellClasses:e=>{const{value:t,fieldKey:o,field:s}=e,r=["tv-screener-table__cell"];return r.push(...function(e){const t=[];e.align===Io.Right||e.align===Io.Center||e.control&&"select"!==e.control||t.push("tv-screener-table__cell--left");e.align!==Io.Center||e.control||t.push("tv-screener-table__cell--center");return t}(s)),s.highlightChange&&t&&r.push(t>=0?"tv-screener-table__cell--up":"tv-screener-table__cell--down"), o!==S.ScanFields.Name||!m.disabled&&m.checked||r.push("widget"===g?"tv-screener-table__cell--widget-without-description":"tv-screener-table__cell--without-description"),d&&r.push(`tv-screener-table__cell--${d}`),"widget"===g&&r.push(...function(e,t,o){const s=[];e&&s.push("tv-screener-table__cell--no-toolbar");t===u.ScreenerType.CryptoMkt&&s.push("tv-screener-table__cell--crypto_mkt");return s}(p,l)),r},widthChange:i,visibilityChange:_,table_style:d,noDataString:e._noDataString,isUnavailableWidgetMarket:e._isUnavailableWidgetMarket,disableStickyHeader:s,onRowBuild:(t,o)=>{const s=e._selectableList;"chart"===g&&Ao.linking.proSymbol.value()===o.s&&s&&(e._setActiveElem(t),s.focusItem(t)),r.beforeAppendSymbol(o.s,t)},onUpdate:()=>{const t=e._selectableList;t&&t.restore()}},v={...f,sortable:!0,addTableClasses:["tv-screener-table"],addTheadRowClasses:["tv-data-table__stroke","tv-screener-table__head"],addRowClasses:()=>["tv-data-table__stroke","tv-screener-table__result-row"],addRowAttrs:e=>({"data-symbol":e.s}),addStickyHeaderWrapperClasses:["tv-screener-sticky-header-wrapper"],addDraggingThClasses:["tv-screener-table__th--dragging"],addDraggingColClasses:["tv-screener-table__col--dragging"]},b=new go(v);return b.setFields({name:{title:a.t(null,void 0,o(423097))}}),b}!function(e){e.Center="center",e.Right="right"}(Io||(Io={}));var Po,Do=o(823127);function Bo(e){const{view:t}=e;return t._bridge.hide_controls?Promise.resolve():Wt(e,Lo,Lt.Header)}function Lo(e,t){const{fieldKey:o}=e,s=t.default,r=h.fields[o],i={...e,field:r};return{...Ro(i,s),...No(i,s),...Oo(i,s),...jo(i,s)}}function Ro(e,t){const{view:s,fieldKey:i}=e;if("name"!==i)return{};const n=new t({label:!h.fields.description.disabled&&h.fields.description.checked?a.t(null,void 0,o(335976)):a.t(null,void 0,o(308014)),disabled:h.fields.description.disabled,onExecute:()=>{const e=!h.fields.description.checked;h.fields.description.checked=e,s.table.update(s._data),s.$fieldSetsButton.toggleClass("tv-screener-toolbar__button--unsaved",s._model.isFieldSetChanged()),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Po.ToggleDescription,"header",e))}}),l=new t({label:!h.fields.type.disabled&&h.fields.type.checked?a.t(null,void 0,o(459117)):a.t(null,void 0,o(107777)),disabled:h.fields.type.disabled,onExecute:()=>{const e=!h.fields.type.checked;h.fields.type.checked=e,s.table.update(s._data),s.$fieldSetsButton.toggleClass("tv-screener-toolbar__button--unsaved",s._model.isFieldSetChanged()),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Po.ToggleSymbolType,"header",e))}}),c=!["forex","crypto"].includes(s._model.screener_type),d=new t({label:lo()?a.t(null,void 0,o(417354)):a.t(null,void 0,o(57473)),onExecute:()=>{const e=!lo();var t;t=e,r.setValue(no,t),s.table.update(s._data),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Po.ToggleShowCurrency,"header",e))}});return{...c?{toggleCurrencyDisplayAction:d}:null,toggleDescriptionAction:n,toggleSymbolTypeAction:l}}function No(e,t){const{view:s,fieldKey:r,field:i}=e;if("name"===r)return{} ;return{removeColumnAction:new t({label:a.t(null,void 0,o(447927)),onExecute:()=>{i.checked=!1;const e=s._table.fieldsOrder.filter((e=>e!==r));s._model.fieldSetChanged.fire(e.filter((e=>h.fields[e]&&!0!==h.fields[e].disabled&&!0!==h.fields[e].hiddenColumn))),s._model.update(),s.$fieldSetsButton.toggleClass("tv-screener-toolbar__button--unsaved",s._model.isFieldSetChanged()),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Po.RemoveColumn,"header",r))}})}}function Oo(e,t){const{view:s,fieldKey:r,field:i,e:n}=e,l=n.currentTarget||n.target,c=new t({label:a.t(null,void 0,o(508359)),onExecute:()=>{s.resetFilter(r),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Po.ResetFilter,"header",r))}}),d=new t({label:a.t(null,void 0,o(84730)),onExecute:()=>{const e=Do(l).closest("th");s.showInplaceEditor(r,e),n.stopPropagation(),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Po.ChangeFilter,"header",r))}});if(i.control){s.fieldValueString(r)||c.update({disabled:!0})}else c.update({disabled:!0}),d.update({disabled:!0});return{resetFilterAction:c,changeFilterAction:d}}function jo(e,t){const{view:s,fieldKey:r,field:i}=e;if(!i.hasOwnProperty("displaySignal"))return{};const{displaySignal:n}=i;return{toggleSignalAction:new t({label:n?a.t(null,void 0,o(868189)):a.t(null,void 0,o(26693)),onExecute:()=>{s._table.toggleSignals(r),(0,re.sendSnowPlowData)(new Ut.DispatchContextMenuActionEvent(Po.ToggleSignal,"header",!n))}})}}!function(e){e.ActiveOnly="active_only",e.ToggleDescription="show_description",e.ToggleSymbolType="show_symbol_type",e.TogglePrimaryOnly="show_primary_only",e.RemoveColumn="remove_column",e.ResetFilter="reset_filter",e.ChangeFilter="change_filter",e.ToggleSignal="show_rating",e.ToggleShowCurrency="toggle_show_currency"}(Po||(Po={}));var Wo=o(793242);const Vo="screener-market-select-mode";var Uo=o(35387),Ho=o(67905),qo=o(491540),zo=o(823127);const Go=o(583912).linking;o(875561);const Xo=o(869403),Ko=o(272001).getLogger("Screener.View"),{operators:Yo,fields:Jo}=o(450587),Zo=a.t(null,{context:"forex_screener_pairs_select"},o(735295)),Qo=a.t(null,void 0,o(695271)),es=a.t(null,void 0,o(302951)),ts=o(182951),os=o(891250),ss=[-1,10,60],rs=[-1,1],is={bonds:{yields:a.t(null,{context:"Bonds"},o(143560)),prices:a.t(null,{context:"Bonds"},o(357096))},crypto_mkt:{USD:"USD",BTC:"BTC"}},ns=`
\n\t\t\n\t\t${o(62555)}\n\t\t${o(83170)}\n\t
`;class ls{constructor(e,t){this._bridge=e,this._model=t,this._onWidget=e.onWidget,this._activeElem=null,this._changeSymbol=(0,M.default)(this._changeSymbol,500), this._lifecycle=new Oe,this.sortedFields=Object.keys(h.fields).filter((e=>Boolean((0,h.getFieldTitle)(h.fields[e])))),this._popups=new be(t,this,e),this._dialog=new Pe(t,this,e),this._disableStickyHeader=this._bridge.disableStickyHeader,this._periodPicker=e.period_picker,this._noDataString=e.no_data_string,this._isUnavailableWidgetMarket=e.isUnavailableWidgetMarket,this._periodPickerButtons=[{id:"yesterday",title:a.t(null,void 0,o(730141))},{id:"today",title:a.t(null,void 0,o(963386))},{id:"tomorrow",title:a.t(null,void 0,o(749930))},{id:"this_week",title:a.t(null,void 0,o(924267))},{id:"next_week",title:a.t(null,void 0,o(302032))}],this.toggleAlert=new Xo;const s="undefined"===this._model.settingKey?this._model.screener_type:this._model.settingKey;this._fields_order=this._model.settingsSaver.getJSON(s+".fields_order",[]),this._data=[],this._lastSetId=null,this.widthChange=new Xo,this._bridge.width&&this._bridge.width.subscribe((()=>{this.widthChange.fire()})),this._$groupSelect=null,this._preventHighlightChanges=!1,this._table=Mo(this),this._model.fieldSetChanged.subscribe(null,(e=>{const t={};e.forEach((e=>{t[e]=h.fields[e]})),this._table.setFields(t)})),this._model.filterSetChanged.subscribe(null,(()=>{this.$filterSetsButton.toggleClass("tv-screener-toolbar__button--unsaved",this._model.isFilterSetChanged())})),this._table.fieldsOrderChange.subscribe(null,(()=>{this._model.fieldsOrder.setValue(this._table.fieldsOrder),this.$fieldSetsButton.toggleClass("tv-screener-toolbar__button--unsaved",this._model.isFieldSetChanged()),this._model.settingsSaver.setJSON(s+".fields_order",this._table.fieldsOrder,{forceFlush:!0})}));let r=0,i=!1;this._model.loadingStart.subscribe(null,(e=>{e?(i=!0,this._bridge.standalone&&(r=zo(document).scrollTop()),this._showSpinner(this.$bottomLoadingScreen)):(r=0,this._model.isFastRefresh||this._showSpinner())})),this._model.loadingStart.subscribe(null,(()=>this.resetRefreshCounter(!0))),this._model.loadingComplete.subscribe(null,(()=>{i&&this._bridge.standalone&&0!==r&&zo(document).scrollTop()!==r?(i=!1,zo(document).scrollTop(r),r=0):this._bridge.standalone&&this._isScrollBottom()&&zo(document).scrollTop(zo(document).scrollTop()/2),this._hideSpinner(),this.resetRefreshCounter()})),this._model.eodRestriction.subscribe((()=>this.updateIntervalButton()),{callWithLast:!0}),window.loginStateChange&&window.loginStateChange.subscribe(null,(()=>{if(this.resetRefreshCounter(),"forex"===this._model.screener_type){const e=this._model.selectedGroups;h.fields.sector.value=Array.isArray(e)&&e[0]===a.t(null,void 0,o(302951))?null:e,this._$groupSelectButton&&(this._$groupSelectButton.empty(),this.updateGroupsButton(this._$groupSelectButton,e))}})),this._bridge.standalone&&zo(window).on("scroll",(()=>{zo(".js-dropdown-toggle.i-opened").trigger("resetPosition")}));const n=(0,M.default)((()=>{this._tempBusy=!1}),250),l=()=>{this._tempBusy||(this._tempBusy=!0),n()};this._bridge.standalone&&zo(window).on("scroll",l),zo(window).on("resize",l),this.widthChange.subscribe(this,l), this._bridge.standalone||this._model.loadingComplete.subscribe(null,(()=>{this.isEndReached()?(this.$content.addClass("tv-screener__content-pane--fully-loaded"),this._table.$element.css("margin-bottom",-this._contentPadding)):(this.$content.removeClass("tv-screener__content-pane--fully-loaded"),this._table.$element.css("margin-bottom",""))})),TradingView.onChartPage&&We.subscribe("screener.selected_type_on_chart",(e=>{this._model.changeScreenerType(e).then((()=>{this._lastSetId=null,this._popups.setMarketsList((0,c.getMarketsByScreenerType)(this._model.screener_type)),"forex"===this._model.screener_type?this._$groupSelect.removeClass("i-hidden"):this._$groupSelect.addClass("i-hidden"),this.updateIntervalButton(this._$selectIntervalButton,this._model.selectedIntervalId),this._popups.updateRefreshIntervalsPopupContent()})).then((()=>this.updateMarketButton())).catch((e=>{e&&Ko.logError(e)}))}))}getSelectedSymbols(){return this._selectableList?this._selectableList.getSelectedKeys():[]}getFocusedSymbol(){if(this._selectableList)return this._selectableList.getFocusedKey()}registerHooksHandlers(e){this._lifecycle.registerHandlers(e)}_isScrollBottom(){return zo(window).scrollTop()+zo(window).height()===zo(document).height()}_initSelectableList(){var e;this._selectableList=(e={list:this.$content.get(0),listItemClass:"tv-screener-table__result-row",selectedListItemClass:"tv-screener-table__result-row--selected",focusedListItemClass:"tv-screener-table__result-row--focused",onNavigate:this._onSymbolsNavigate.bind(this),onConfirm:this._onSymbolConfirm.bind(this),getNodeKey:e=>e.dataset.symbol},new q(Object.assign({},{modes:[O,j,U,V,W]},e)))}_getThContent(e,t){t||(t=h.fields[e]);const s=xt(e,t)?zo(`
`):zo(`
`);t.disableHeaderControl&&s.addClass("tv-screener-table__head-wrap--disable-interaction");const r=zo('
').appendTo(s),i=zo('
').appendTo(r),n=zo(`
${t.shortTitle||t.title}
`).appendTo(i);e===this._model.searchField&&r.addClass(!h.fields.description.disabled&&h.fields.description.checked?"tv-screener-table__head-left--name-col":this._onWidget?"tv-screener-table__head-left--widget-name-col-without-description":"tv-screener-table__head-left--name-col-without-description");const l=zo(`${"asc"===this._model._sortDirection.value()?ts:os}`);if(e===this._model.searchField){let e;e=this._totalCount?this._bridge.hide_load_more&&this._bridge.page_size&&this._totalCount>=this._bridge.page_size?a.t(null,{plural:"{number} matches",count:this._bridge.page_size},o(462103)).format({number:this._bridge.page_size}):a.t(null,{ plural:"{number} matches",count:this._totalCount},o(462103)).format({number:this._totalCount}):a.t(null,void 0,o(566724)),zo(`
${e}
`).appendTo(r),this._onWidget||zo(ns).appendTo(r)}let c=!1;if(t.control&&!this._bridge.hide_controls){const t=zo(`${o(630001)}`);t.appendTo(s);if(this.fieldValueString(e)){t.addClass("tv-screener-table__filter-button--active");const o=zo(`${this.fieldValueString(e)}`);r.append(o),c=!0}}return l.appendTo(s),n.addClass(c?"tv-screener-table__head-left--title-two-lines":"tv-screener-table__head-left--title-three-lines"),s}_updateTableSortField(){const e=this._model._sortField.value(),t=this._model._sortDirection.value();this._table.updateSortField(e,t)}setFieldActive(e,t,o){this._dialog.$filtersPopup&&(o||(o=this._dialog.$filtersPopup.find(`.js-filter-field-${e.replace(/\W/g,"")}`)),o&&o.size()&&o.toggleClass("tv-screener-dialog__filter-field--active",t))}_resetSearchCount(){const e=this._getThContent(this._model.searchField).find(".js-field-total").text();this._table.setSearchText(e)}_resetField(e){this.setFieldActive(e,this._model.fieldActive(e));const t=this._getThContent(e);if("name"===e&&this._lifecycle.beforeAppendSymbolsHeader(t.get(0)),this._table.setThContent(e,t),!this._dialog.$filtersPopup&&this.$inplaceEditor&&e===this._inplaceEditorField){const t=!this._isFilterValueEmpty(e),o=this.$inplaceEditor.find(".js-reset"),s=this.$inplaceEditor.find(".js-wrap");t?(o.removeClass("i-hidden"),s.removeClass("tv-screener-inplace-editor__filter-without-reset"),this.$inplaceEditor.removeClass("tv-screener-inplace-editor__without-reset")):(o.addClass("i-hidden"),s.addClass("tv-screener-inplace-editor__filter-without-reset"),this.$inplaceEditor.addClass("tv-screener-inplace-editor__without-reset"))}}_setupStickyHeader(){if(this._disableStickyHeader)return;const e=this._table.$stickyHeader;e.insertBefore(this.$content);const t=zo('').prependTo(this.$content);let r=Math.round(this.$toolbar.outerHeight());if(this._bridge.width&&this._bridge.width.subscribe((()=>this.onResizeToolbar())),this._bridge.visible&&this._bridge.visible.subscribe((()=>this.onResizeToolbar())),(0,Tt.isMarketPage)(this._bridge))Pt(this);else if(this._bridge.standalone){const o=148;let s;this.$toolbar.toggleClass("tv-screener-toolbar--standalone_sticky",!0).css({top:o}),this._bridge.$body.css({"padding-top":r}),e.css({top:r});const i=(s,i)=>{i||(i=zo(document).scrollTop()),this._bridge.$body.css({"padding-top":r}),this.$toolbar.css({top:s?0:o-i}),e.css({top:r}),t.css({top:s?r:0})},n=e=>zo(document).scrollTop()-(this.$content.offset().top-e)>0;zo(document).on("scroll",(()=>{r=Math.round(this.$toolbar.outerHeight()) ;const o=zo(document).scrollTop(),l=zo(document).scrollLeft();let a;this._onWidget||(a=n(r),i(a,o),this._$mainContainer.css("top",-o)),e.toggleClass("tv-screener-sticky-header-wrapper--standalone_sticky",a);const c=(0,se.isRtl)()?document.body.clientWidth-this.$content[0].getBoundingClientRect().right:-l;e.css({[(0,se.isRtl)()?"right":"left"]:a?c:"auto"}),t.toggleClass("tv-screener-sticky-header-wrapper__right-substrate--standalone_sticky",a),s!==a&&this.updateToolbarButtons(),s=a,this.$bottomLoadingScreen.css({left:l})})),zo(window).on("resize",(()=>{this.fixStandaloneWidth(),r=Math.round(this.$toolbar.outerHeight());const e=n(r);i(e),this.onResizeToolbar()})),this.fixStandaloneWidth(),this._table.afterFixCols.subscribe(null,(()=>{this.fixStandaloneHorizontalScroll()}))}else{this._bridge.$body.css({overflow:"hidden"});let o=!1,r=!1;this.onResizeToolbar();const i=()=>{const o=Math.round(e.outerHeight());t.css({top:-o}),this.$content.css({top:o}),this._table.$element.css({top:-o,position:"relative"})};(TradingView.onChartPage||this._onWidget)&&i(),this.$content.on("scroll",(()=>{(0,s.hide)(),je.PopupColorSelector.hide(),(0,se.isRtl)()?e.css("right",-(this.$content[0].scrollWidth-this.$content[0].clientWidth-(0,se.getLTRScrollLeft)(this.$content[0]))):e.css("left",-this.$content.scrollLeft()),this._onWidget&&this._bridge.hide_controls&&e.css({top:0})})),TradingView.onChartPage&&zo(document).on("scroll",(()=>{window.innerWidth<=P.breakpoints.tablet&&(o=this.$content.get(0).getBoundingClientRect().top<0),e.toggleClass("tv-screener-sticky-header-wrapper--standalone_sticky",o),r!==o&&e.css({left:o?-this.$content.scrollLeft():0}),r=o}))}this._bridge.hide_controls||(this.$headerFieldsButton=zo(`
\n\t\t\t\t${o(407499)}\n\t\t\t
`).appendTo(e),this.$headerFieldsButton.attr({"data-name":"header_fields-button"}),this._popups.setFieldsPopup(this.$headerFieldsButton,"tv-screener-sticky-header-wrapper__fields-button-wrap","tv-dropdown__body--position_right")),this._model.loadingComplete.subscribe(null,(()=>{t.show()}),!0)}_showSpinner(e=this.$loadingScreen){e.removeClass("js-hidden"),clearTimeout(this._spinnerTimeoutId),this._spinner||(this._spinnerTimeoutId=setTimeout((()=>{this._spinner=(new Be.Spinner).spin(e.get(0))}),100))}_hideSpinner(){this.$loadingScreen.addClass("js-hidden"),this.$bottomLoadingScreen.addClass("js-hidden"),clearTimeout(this._spinnerTimeoutId),this._spinner&&(this._spinner.stop(),delete this._spinner)}_getResizerBridgeWidth(){return window.widgetbar?(0,St.getWidgetBarPadding)(window.widgetbar.resizerBridge.width.value()):0}fixStandaloneWidth(){if(this._bridge.standalone){this._bridge.$body.css({"padding-right":"","padding-left":""});const e=this._getResizerBridgeWidth(),t=(0,se.isRtl)()?"padding-left":"padding-right";this.$toolbar.width(zo(window).width()-e),this._$mainHeader.css({[t]:e}),this.updateToolbarButtons(), this._table&&this._table._$emptyMessage&&!(0,Tt.isMarketPage)(this._model._bridge)&&this._table._$emptyMessage.css({width:`calc(100% - ${e}px`}),this.widthChange.fire()}}fixStandaloneHorizontalScroll(){if(this._bridge.standalone){const e=this._getResizerBridgeWidth(),t=this._table.$element.width()+((0,se.isRtl)()?0:e),o=zo(window).width()`).appendTo(this._bridge.$body),this.$toolbar=zo(`
`).appendTo(this._bridge.$body),this.$toolbar.on("contextmenu",(function(e){e.preventDefault()})),zo(".tv-screener__content-pane").remove(),this.$content=zo('
').data({localScroll:!this._bridge.standalone}).appendTo(this._bridge.$body),this.$content.on("contextmenu",(function(e){e.target.classList.contains("tv-screener__content-pane")&&e.preventDefault()})),this.$bottomLoadingScreen=zo('
').appendTo(this._bridge.$body),this._$mainContainer=zo(".tv-screener__standalone-main-container"),this._$mainHeader=this._$mainContainer.find(".tv-header"),this._onWidget||(this.$refreshButton=zo(`
`).attr({"data-name":"screener-refresh","data-role":"button"}).append(zo(o(820713)).attr({class:"tv-screener-toolbar__button-icon tv-screener-toolbar__button-icon--standalone-refresh",width:"18",height:"18"})).appendTo(this.$toolbar),this.$refreshCounter=zo('').text("00:00").appendTo(this.$refreshButton),this.$refreshIntervalButton=zo(`
`).attr({"data-name":"screener-refresh-interval","data-role":"button"}).append(zo(o(407499)).attr({width:3,height:13,class:"tv-screener-toolbar__button-icon",style:"top: -1px"})).appendTo(this.$toolbar));const e=this._model.currentFieldSetId(),t=this._model.getFieldSetById(e) ;this.$fieldSetsButton=zo(`
\n\t\t\t\t${t?t.title:""}\n\t\t\t
`).attr({"data-name":"screener-field-sets","data-role":"button","data-field-set":e}).appendTo(this.$toolbar),this.$fieldsButton=zo(`
`).attr({"data-name":"screener-fields","data-role":"button"}).append(zo(o(944499)).attr({class:"tv-screener-toolbar__button-icon"})).appendTo(this.$toolbar),this.$favoritesBar=zo('
').appendTo(this.$toolbar),this.$periodPicker=zo('
').appendTo(this.$toolbar);const s=is[this._model.screener_type];s&&(this._createSwitch(s),this.$toolbar.addClass("tv-screener-toolbar--one-line"));const r=this._model.currentFilterSetId(),i=this._model.getFilterSetById(r);this.$filterSetsButton=zo(`
`).attr({"data-name":"screener-filter-sets","data-role":"button","data-filter-set":r}).appendTo(this.$toolbar),this.$filterSetsButtonTitle=zo(`${i?i.title:""}`).appendTo(this.$filterSetsButton),this.$filtersButton=zo(`
${a.t(null,void 0,o(12100))}
`).attr({"data-name":"screener-filter","data-role":"button"}).append(zo(o(630001)).attr({class:"tv-screener-toolbar__button-icon tv-screener-toolbar__button-icon--filters"})).appendTo(this.$toolbar),this._model.loadingComplete.subscribe(null,(()=>{this.$filtersButton.removeClass("i-disabled")}),!0);const n=zo('
').on("click",(()=>{this.showActiveFilters(),(0,re.sendSnowPlowData)(new Ce("filter_counter_button",this._getFiltersCounterValue()))})).appendTo(this.$toolbar);if(this.$filterCount=zo(``).attr({"data-name":"screener-filter-count","data-role":"button"}).appendTo(n),this._table.$element.appendTo(this.$content),this.initHandlers(),this._bridge.selection_disabled||this._initSelectableList(), this._onWidget&&this._bridge.hide_controls&&(this._contentPadding=this.$content.innerHeight()-this.$content.height(),this.$content.css("height",`calc(100% - ${this._contentPadding}px)`),this.$toolbar.hide()),this._bridge.hide_controls)[this.$refreshButton,this.$refreshIntervalButton,this.$fieldSetsButton,this.$fieldsButton,this.$filterSetsButton,this.$filtersButton,this.$filterCount].forEach((e=>{e&&e.hide()})),this._onWidget&&(this._bridge.$body.addClass("tv-screener--hidden-toolbar"),this.$loadingScreen.addClass("tv-screener__loading-screen--hidden-toolbar"));else{this._onWidget||(this._$selectIntervalButton=this.addIntervalSelect({$before:this.$filterSetsButton}).attr({"data-name":"screener-time-interval","data-role":"button"}),this._$downloadButton=zo(`
`).attr({"data-name":"screener-export-data","data-role":"button"}).append(zo(o(764162)).attr({class:"tv-screener-toolbar__button-icon tv-screener-toolbar__button-icon--export"})),this._$downloadButton.insertBefore(this._$selectIntervalButton),this._$downloadButton.on("click",(e=>{(0,G.runOrGoPro)((()=>{this._$downloadButton.toggleClass("i-loading",!0),this._model.getDownloadData().then((e=>{const[t,...o]=this._table.columnsOrder,s=[t,"description",...o];try{const t=function(e,t,o,s){const r=new Map,i=[];for(const e of t)i.push(h.fields[e].title),r.set(e,ut(o,e));const n=[i];for(const t of e){const e=[];for(const[i,n]of Array.from(r.entries())){const r=h.fields[i],l=t.d[n];if(null===l)e.push("");else if(ct.includes(i))e.push((0,me.triesTranslateScreenerData)(l));else if("earnings_release_date"===i||"earnings_release_next_date"===i){const t=(0,h.getFieldFormatter)(r,s,!1);e.push(t.format(l))}else if(r.signalComputation)ht.includes(i)?e.push(r.signalComputation(l).title):e.push(l.toString());else{const s=r.additionalColumns?r.additionalColumns.map((e=>t.d[ut(o,e)])):[];if(r.mutateDisplayValue&&!dt.includes(i))e.push(r.mutateDisplayValue(l,...s,i));else if("candlestick"===i&&r.additionalColumns){const{additionalColumns:t}=r,o=_t(s);if(0===o.length)e.push("");else{const s=o.map((e=>t[e])).map(gt).filter(Boolean).map((e=>e.name)).join(", ");e.push(s)}}else e.push(l.toString())}}n.push(e)}return n}(e.data,s,this._model.getRequestColumns(),this._model.screener_type),o=t.map(pt).join("\r\n"),r=ft.dateFormatFunctions["yyyy-MM-dd"](new Date,!0),i=`${this._model.markets.join("_")}_${r}.csv`;(0,Ne.saveTextFile)(i,o,"text/csv")}catch(e){Ko.logError(e.toString())}this._$downloadButton.toggleClass("i-loading",!1),this._model.trackEvent("Export screener data")}))}),oe.ProductFeatures.SCREENER_EXPORT_DATA,{feature:"screenerExportData"}),(0,re.sendSnowPlowData)(new yt)})),this._model.loadingComplete.subscribe(null,(()=>{this._$downloadButton.removeClass("i-disabled")}),!0));const e=this.addMarketSelect({$before:this.$filterSetsButton }),t=zo('
').on("click",(()=>{this._showMarketsDialog()}));this.$marketCount=zo(``).attr({"data-name":"screener-market-count","data-role":"button"}).appendTo(t),zo(e).after(t),this._$groupSelectButton=this.addGroupSelect({$before:this.$filterSetsButton}),this._popups.setFieldsPopup(this.$fieldsButton,"tv-screener-toolbar__button-wrap"),this._popups.setFieldSetsPopup(this.$fieldSetsButton),this._popups.setFilterSetsPopup(this.$filterSetsButton,!this._bridge.onWidget),this._onWidget||this._popups.setRefreshIntervalsPopup(this.$refreshIntervalButton)}(0,De.setCurrentTimezone)(this._model.timezone),this._periodPicker?((0,h.applyEarningsCalendarToFields)(),this._selectedPeriodId="today",this._setNewEarningsPeriod(this._selectedPeriodId),this.updatePeriodPicker(),this.$favoritesBar.hide(),h.fields.earnings_release_next_date.onFilterChange=e=>{const t=this._periodPickerButtons.find((t=>t.title===e));this.changeEarningsPeriod(t?t.id:"",!0)}):this.$periodPicker.hide(),this._showSpinner(),this.updateToolbarButtons(),this.onResizeToolbar()}onResizeToolbar(){if(this._disableStickyHeader)return;if(this._table.$stickyHeader.position().top<0)return;const e=Math.round(this.$toolbar.outerHeight());(0,Tt.isExternalWidget)(this._bridge)&&this._bridge.hide_controls?this._table.$stickyHeader.css({top:0}):this._table.$stickyHeader.css({top:e})}showMaintenance(){this._bridge.$body.html(`
${a.t(null,void 0,o(177513))}
`)}createAlertButtons(){}setAlertButtonsDisabledState(e){}setCreateAlertButtonLoading(){}setAlertButtonState(e){}initHandlers(){this.$toolbar.on("hover",this.adjustToolbarWidth.bind(this)),this.$fieldSetsButton.on("transitionend",this.updateToolbarButtons.bind(this));const e=e=>{const t=e.data("field");if(!1===h.fields[t].sortableColumn)return;const o=this._model._sortField.value(),s=this._model._sortDirection.value();h.fields[t].disableHeaderControl||(o===t&&this._model._sortDirection.setValue("asc"===s?"desc":"asc"),this._model._sortField.setValue(t),this._model.update())};if(Dt.mobiletouch){(new Ve.HammerJSLoader).load().then((t=>{const o=new t(zo(".tv-screener")[0],{touchAction:"auto"});o.get("press").set({time:500}),o.on("press",(e=>{const t=zo(e.target).closest(".js-head-wrap");if(t.length){Bo({view:this,fieldKey:zo(t).data("field"),e:e.srcEvent})}e.preventDefault()})),o.on("tap",(t=>{if(zo(t.target).closest(".js-search-input").length)return;const o=zo(t.target).closest(".js-head-wrap");o.length&&e(o)}))}))}else zo(".tv-screener").on("click",".js-head-wrap",(t=>{const o=zo(t.currentTarget);e(o),t.stopPropagation()})).on("contextmenu",".js-head-wrap",(e=>{Bo({view:this,fieldKey:zo(e.currentTarget).data("field"),e}),e.preventDefault()})),zo(".tv-screener").on("click",".js-filter-button",(e=>{ const t=zo(e.currentTarget).closest("th"),o=t.data("field");this.showInplaceEditor(o,t),e.stopPropagation()}));zo(".tv-screener").on("click",".js-search-input",(e=>{e.stopPropagation()})),zo(".tv-screener").on("click",".js-input-reset",(e=>{zo(e.currentTarget).addClass("i-hidden"),zo(".tv-screener").find(".js-search-input").val(""),h.fields[this._model.searchField].searchValue="",this._model.update(),e.stopPropagation()})),zo(".tv-screener").on("click",".js-filter-button",(e=>{const t=zo(e.currentTarget).closest("th"),o=t.data("field");this.showInplaceEditor(o,t),e.stopPropagation()})),this._bridge.table_context_menu_disabled||this._initTableContextMenu(),this.$content.on("scrolltoend",(e=>{this._model.loading||this._model.update(null,!0)})),this.$refreshButton&&this.$refreshButton.click((e=>{(0,vt.runOrSignIn)((()=>{this._model.loading||this.refresh(),(0,re.sendSnowPlowData)(new _e)}),{source:"Screener refresh button"})})),this.$filtersButton.click((()=>{this._dialog.showFiltersDialog(),(0,re.sendSnowPlowData)(new Ce("filter_button",this._getFiltersCounterValue()))})),Go.proSymbol.subscribe((e=>{const t=this.$content.find(`[data-symbol="${e}"]`).get(0);this._setActiveElem(t),this._selectableList&&(t?this._selectableList.focusItem(t):this._selectableList.clear())})),this.$fieldSetsButton.on("click",(()=>{this._lastSetId=null})),this.$toolbar.on("click",".js-favorite-item",(e=>{const t=zo(e.currentTarget).attr("data-set");this._lastSetId!==t&&(this._model.preventPrevScanRequest(),this.updateSetId(t,!1,this._bridge.hide_controls)),(0,re.sendSnowPlowData)(new ne("columnset_favorites_picker",t))})),this.$toolbar.on("click",".js-period-picker-item",(e=>{const t=zo(e.currentTarget).attr("data-period");this.changeEarningsPeriod(t)})),zo(window).resize((e=>this.updateToolbarButtons())),this._bridge.width&&this._bridge.width.subscribe((()=>this.updateToolbarButtons())),this._bridge.visible&&this._bridge.visible.subscribe((e=>{e&&(this.updateToolbarButtons(),this.adjustToolbarWidth())})),this.updateFavoritesToolbar()}_initTableContextMenu(){this.$content.on("contextmenu",".tv-screener-table__result-row",(e=>{const t=zo(e.currentTarget).data("symbol");this._selectableList&&this._selectableList.focusItem(e.currentTarget),function(e){const t=(0,Nt.ticker)(e.symbol);Wt({...e,shortName:t},Gt,Lt.Table)}({view:this,symbol:t,e}),e.preventDefault()}))}_onSymbolsNavigate(e){const t=e.cursor;if(t){if(TradingView.onChartPage&&this._setActiveElem(t),["sector","industry"].includes(this._model.screener_type))return;const e=t.dataset.symbol;this._changeSymbol(e)}}_changeSymbol(e){const t=Go.preventFeedBySymbol;Go.setPreventFeedBySymbol(!0),Go.symbol.setValue(e),Go.setPreventFeedBySymbol(t),this._model.trackEvent("Change symbol from table")}_setActiveElem(e){this._activeElem&&this._activeElem.classList.remove("tv-screener-table__result-row--active"),e?(e.classList.add("tv-screener-table__result-row--active"),this._activeElem=e):this._activeElem=null}_onSymbolConfirm(e){e.items.forEach((t=>{const o=t.dataset.symbol ;o&&this._lifecycle.afterSymbolConfirm(o,e.action)}))}changeEarningsPeriod(e,t=!1){if(this._selectedPeriodId===e)return;this._selectedPeriodId=e,this.updatePeriodPicker(),this._model.applyFieldSetContent(S.earningsCalendarFieldSets);"tomorrow"===e||"next_week"===e?(0,h.applyEarningsCalendarNextReleaseDate)():(0,h.applyEarningsCalendarReleaseDate)(),t||this._setNewEarningsPeriod(e,(()=>{this._resetField("earnings_release_next_date"),this._model.preventPrevScanRequest(),this._model.update()}))}_setNewEarningsPeriod(e,t=(()=>{})){const o=h.fields.earnings_release_next_date.sourceRange.find((t=>t.key===e));o&&(h.fields.earnings_release_next_date.value=o.name,t())}get totalCount(){return this._totalCount}get itemsCount(){return this._itemsCount}set itemsCount(e){this._itemsCount=+e}set lastSetId(e){this._lastSetId=e}get popups(){return this._popups}isEndReached(){return 0===this._data.length||"number"==typeof this._totalCount&&this._data.length>=this._totalCount}display(e,t,o){if(this._hideSpinner(),this._setFiltersCount(),this._setMarketsCount(),this.$filterSetsButton.toggleClass("tv-screener-toolbar__button--unsaved",this._model.isFilterSetChanged()),!e||e.error||!e.data&&!e.symbols)"abort"!==o&&(this.resetItems(),this._table.setColumnsMap(t),this._table.update([]),this._resetField("name"),"error"===o?Ko.logError(e.responseText||o):e&&e.error&&Ko.logError(e.error));else{let o=e.data||e.symbols;for(let e=0;e0?(o=o.slice(e),this._data=this._data.slice(0,e),this._table.clearData(e)):o=o.slice(this._data.length),this._data=this._data.concat(o),this._table.setColumnsMap(t),this._table.append(o))}setTimeout((()=>this.highlightChanges()),0),this._totalCount=e.totalCount,this._resetSearchCount(),this._model._initialSortField&&(this._model._sortField.setValue(this._model._initialSortField,!0),this._model._sortDirection.setValue(this._model._initialSortDirection,!0),delete this._model._initialSortField,delete this._model._initialSortDirection)}}_getInvalidatedFrom(e){for(let t=0;t{o.push(this._getFieldValueFromRangeTitles(e,t))})),o.join(", ")} _getFieldValueFromRangeTitles(e,t,o=!1){return h.fields[t].rangeTitles&&h.fields[t].rangeTitles[e]?h.fields[t].rangeTitles[e][o?1:0]:"string"!=typeof e?"":e}fieldValueString(e){const t=h.fields[e].value;if((0,h.isValueAbsent)(t)||!1===t)return"";if("select"===h.fields[e].control){const s=a.t(null,{plural:"{number} items",count:t.length,context:"combobox_input"},o(453508)).format({number:t.length});return Array.isArray(t)?`${s}`:this._getFieldValueFromRangeTitles(t,e,"dr"===t&&"name"===e)}return"range"===h.fields[e].control?Array.isArray(t)?this._rangeLeftValue(e)+" – "+this._rangeRightValue(e):"":"toggle"===h.fields[e].control?-1!==e.toLowerCase().indexOf("high")?a.t(null,void 0,o(59770)):a.t(null,void 0,o(967532)):"condition"!==h.fields[e].control||(0,h.isValueAbsent)(t.operator)||(0,h.isValueAbsent)(t.value)?"":"in_range"===t.operator?t.value[0]===t.value[1]?Yo.equal+" "+t.value[0]:-1e100===t.value[0]||this._isLessThenMin(t.value[0],e)?Yo.less+" "+t.value[1]:1e100===t.value[1]||this._isGreaterThenMax(t.value[1],e)?Yo.greater+" "+t.value[0]:this._rangeLeftValue(e)+" – "+this._rangeRightValue(e):"not_in_range"===t.operator?t.value[0]===t.value[1]?Yo.nequal+" "+t.value[0]:-1e100===t.value[0]||this._isLessThenMin(t.value[0],e)?Yo.greater+" "+t.value[1]:1e100===t.value[1]||this._isGreaterThenMax(t.value[1],e)?Yo.less+" "+t.value[0]:`${Yo.not_in_range} ${this._rangeLeftValue(e)} – ${this._rangeRightValue(e)}`:Yo[t.operator]+" "+("number"==typeof t.value?t.value:h.fields[t.value].title)}updateToolbarButtons(){this._bridge.period_picker?this.updatePeriodPicker():this._bridge.originalStandalone&&this.updateOldFavoritesToolbar()}updateOldFavoritesToolbar(){this.$hiddenFavoritesButtonWrap&&this.$hiddenFavoritesButtonWrap.hide(),this.$favoritesBar.find(".js-favorite-item").remove();let e=0;this.hiddenFavorites=[];const t=this.$favoritesBar.width(),s="forex"!==this._model.screener_type||this._bridge.hide_controls?40:160,r=e=>e===this._model.currentFieldSetId();if(this._model.favoriteFieldSets){let o=null;for(let i=0;i\n\t\t\t\t\t${(0,Le.htmlEscape)(l.title)}\n\t\t\t\t
`).toggleClass("tv-screener-toolbar__favorites-item--active",r(l.id));o?a.insertAfter(o):a.prependTo(this.$favoritesBar);let c=a.outerWidth();a[0].scrollWidth>c&&a.addClass("apply-common-tooltip").attr("title",l.title),c+=9,e+=c,e+s>t?(e-=c,a.remove(),this.hiddenFavorites.push({id:l.id,title:l.title})):o=a}}if(this.hiddenFavorites.length){if(this.hiddenFavorites.length===this._model.favoriteFieldSets.length&&this.$hiddenFavoritesButtonWrap)return void this.$hiddenFavoritesButtonWrap.hide();if(this.$hiddenFavoritesButtonWrap)this.$hiddenFavoritesButtonWrap.trigger("resetContent").show();else{ const e=zo(`
`).appendTo(this.$favoritesBar);this.$hiddenFavoritesButtonWrap=this._popups.setHiddenFavoritesPopup(e,(()=>this.hiddenFavorites),r,(e=>this.updateSetId(e,!1,this._bridge.hide_controls)))}}}updateSetId(e,t,o){this._lastSetId=e,this._model.applyFieldSet(e,t,o)}updateNewFavoritesToolbar(){if(!this._model.favoriteFieldSets)return;const e={items:this._model.favoriteFieldSets.map((e=>({title:this._model.getFieldSetById(e).title}))),activeItem:this._model.favoriteFieldSets.indexOf(this._model.currentFieldSetId()),onSelect:e=>{const t=this._model.favoriteFieldSets[e];this._lastSetId!==t&&(this._model.preventPrevScanRequest(),this.updateSetId(t,!1,this._bridge.hide_controls))},className:"tv-screener-toolbar__no-scroll-choicer-react-root",selectedItemClassName:"tv-screener-toolbar__no-scroll-choicer-react-root-dropdown-item--selected"};lt(this.$favoritesBar.get(0),e)}updateFavoritesToolbar(){this._onWidget||(this._bridge.originalStandalone?this.updateOldFavoritesToolbar():this.updateNewFavoritesToolbar())}updatePeriodPicker(){const e={items:this._periodPickerButtons.map((e=>({title:e.title}))),activeItem:this._periodPickerButtons.findIndex((e=>e.id===this._selectedPeriodId)),onSelect:e=>{const t=this._periodPickerButtons[e].id;this.changeEarningsPeriod(t)},className:"tv-screener-toolbar__no-scroll-choicer-react-root",selectedItemClassName:"tv-screener-toolbar__no-scroll-choicer-react-root-dropdown-item--selected"};lt(this.$periodPicker.get(0),e)}_getWatchlist(){if(window.widgetbar){const t=window.widgetbar.setPage("base");let o;for(var e=0;e{let n=r;e.hasOwnProperty(o)&&(e[o].state===t&&(n=t),clearTimeout(e[o].sender),r===he.UserActionState.Click&&!1===s)||(e[o]={state:n,sender:setTimeout((()=>(0,re.sendSnowPlowData)(new Ee(s.toString(),r,o,i))),1e4)})}}(),o=(e,t)=>t.reduce(((t,o)=>(o===e&&(o-=1),t+=Math.floor(o/e/(1/4)))),"");e.off("change.op").on("change.op","select.js-filter-operator",(o=>{const s=zo(o.target),r=s.attr("name");h.fields[r].value||(h.fields[r].value={}),h.fields[r].value.operator=s.val(),this._resetField(r),this._model.update();const{operator:i}=h.fields[r].value,n=e.hasClass("tv-screener-dialog__filter-field")?"filter_dialog":"columns";t(r,i,he.UserActionState.Click,n)})),e.off("change.op-val").on("change.op-val","select.js-filter-operator-value",(o=>{ const s=zo(o.target),{value:r}=o.target,i=s.attr("name");h.fields[i].value||(h.fields[i].value={}),h.fields[i].value.value=s.val(),this._resetField(i),this._model.update();let{operator:n}=h.fields[i].value;const l=e.hasClass("tv-screener-dialog__filter-field")?"filter_dialog":"columns";""!==r&&(n+="."+r),t(i,n,he.UserActionState.Click,l)})),e.off("update.op-arb-val").on("update.op-arb-val","input.js-filter-operator-arb-value",(o=>{const s=zo(o.target),r=s.attr("name");h.fields[r].value||(h.fields[r].value={});let i=+s.val();isFinite(i)&&!(0,h.isValueAbsent)(s.val())||(i=null),h.fields[r].value.value=i,this._resetField(r),this._model.update();const{operator:n}=h.fields[r].value,l=e.hasClass("tv-screener-dialog__filter-field")?"filter_dialog":"columns";t(r,n,he.UserActionState.Click,l)}));const s=e.find("input.js-filter-operator-between-left"),r=e.find("input.js-filter-operator-between-right"),i=e=>{const t=zo(e.target).attr("name");h.fields[t].value||(h.fields[t].value={});let o=+s.val();(!isFinite(o)||(0,h.isValueAbsent)(s.val())||this._isLessThenMin(o,t)||this._isGreaterThenMax(o,t))&&(o=-1e100);let i=+r.val();if((!isFinite(i)||(0,h.isValueAbsent)(r.val())||this._isLessThenMin(i,t)||this._isGreaterThenMax(i,t))&&(i=1e100),o>i){const e=o;o=i,i=e}h.fields[t].value.value=[o,i],-1e100===h.fields[t].value.value[0]&&1e100===h.fields[t].value.value[1]&&(h.fields[t].value.value=""),this._resetField(t),this._model.update()};e.off("update.op-between-left-val").on("update.op-between-left-val","input.js-filter-operator-between-left",i),e.off("update.op-between-right-val").on("update.op-between-right-val","input.js-filter-operator-between-right",i),e.off("change.toggle-val").on("change.toggle-val","input.js-filter-toggle",(o=>{const s=zo(o.target),r=s.attr("name");h.fields[r].value=s.prop("checked"),this._resetField(r),this._model.update();const i=e.hasClass("tv-screener-dialog__filter-field")?"filter_dialog":"columns";t(r,s.prop("checked"),he.UserActionState.Click,i)})),e.off("click.reset").on("click.reset",".js-reset",(e=>{const t=zo(e.currentTarget).data("field");this.resetFilter(t)}));let n="";e.off("keydown.filterInput").on("keydown.filterInput","input:not(.js-search-input):not(.js-filter-operator-arb-value)",(e=>{const t=zo(e.currentTarget);n=t.val()})),e.off("keyup.filterInput").on("keyup.filterInput","input:not(.js-search-input):not(.js-filter-operator-arb-value)",(s=>{const r=zo(s.currentTarget),i=r.data("field"),l=r.data("bound");if(void 0===i||void 0===l||n===r.val())return;const a=[this.parseRangeValue(i,r.val(),l),h.fields[i].value?h.fields[i].value[1-l]:h.fields[i].range[1-l]].sort(this._model.numericSorter),c=this.approximateSliderValues(i,a);if(e.find(`.tv-slider[data-field="${i}"]`).slider("values",c),h.fields[i].value=a,this._resetField(i),this._model.update(),h.fields[i].values){const s=e.hasClass("tv-screener-dialog__filter-field")?"filter_dialog":"columns",r=o(h.fields[i].values.length+1,c);t(i,r,he.UserActionState.Type,s)}}));e.find(".tv-slider").off("slidechange").on("slidechange",((e,t)=>{ const o=zo(e.currentTarget).data("field");h.fields[o].values?0===t.values[0]&&t.values[1]===h.fields[o].values.length+1?h.fields[o].value=null:h.fields[o].value=[0===t.values[0]?-1e100:parseInt(h.fields[o].values[t.values[0]-1],10),t.values[1]===h.fields[o].values.length+1?1e100:parseInt(h.fields[o].values[t.values[1]-1],10)]:t.values[0]===h.fields[o].range[0]&&t.values[1]===h.fields[o].range[1]?h.fields[o].value=null:h.fields[o].value=t.values,this._resetField(o),this._model.update()})).off("slide").on("slide",((e,t)=>{const o=zo(e.currentTarget),s=o.data("field");let r=t.values[0],i=t.values[1];if(r===i)return!1;h.fields[s].values&&(r=0===t.values[0]?this._rangeMinValue(s):(0,h.getFieldFormatter)(h.fields[s],this._model.screener_type).format(h.fields[s].values[t.values[0]-1]),i=t.values[1]===h.fields[s].values.length+1?this._rangeMaxValue(s):(0,h.getFieldFormatter)(h.fields[s],this._model.screener_type).format(h.fields[s].values[t.values[1]-1])),t.value===t.values[0]?o.find(".tv-slider__label--left").val(r):(t.value===t.values[1]||o.find(".tv-slider__label--left").val(r),o.find(".tv-slider__label--right").val(i))})).on("slidechange",((s,r)=>{const i=zo(s.currentTarget).data("field");if(h.fields[i].values){const s=e.hasClass("tv-screener-dialog__filter-field")?"filter_dialog":"columns",n=o(h.fields[i].values.length+1,r.values);t(i,n,he.UserActionState.Slide,s)}}))}parseRangeValue(e,t,o){if(-1!==t.indexOf("<"))return h.fields[e].range[0];if(-1!==t.indexOf(">"))return h.fields[e].range[1];t=t.replace(/%/g,"");let s=(0,h.getFieldFormatter)(h.fields[e],this._model.screener_type).parse(t);if(!s.res)return h.fields[e].range[o];const r=s.value||0===s.value?s.value:s.price;return s=Math.min(h.fields[e].range[1],Math.max(h.fields[e].range[0],r)),s}approximateSliderValues(e,t){const o=[0,0],s=[].concat(-1e100,h.fields[e].values,1e100);for(let e=0;e<2;e++)for(let r=0;r{let o=!1;for(const s in h.fields){const r=Array.from(t.querySelectorAll(`.js-filter-field-${s.replace(/\W/g,"")}:not(.js-found)`)),i=(0,h.getFieldTitle)(h.fields[s]),n=-1!==s.toLowerCase().indexOf(e)||Boolean(i)&&-1!==i.toLowerCase().indexOf(e);n&&(o=!0),r.forEach((e=>{e.classList.toggle("js-hidden",!n),e.classList.toggle("js-found",n)}))}o||0===e.length||(0,re.sendSnowPlowData)(new Fe(e))}))}showActiveFilters(){if(this._dialog.$filtersPopup)return;const e=this._dialog._getActiveFilters();this._dialog.showFiltersDialog(!0).then((()=>{this._dialog.$dialogContainer.find(".js-search-input").val(e.join(", ")),this.updateFilterSearch()}))}resetAllFilters(){this._resetAllFilters=!0;for(const e in h.fields)this._isFilterValueEmpty(e)||this.resetFilter(e) ;this._dialog.$dialogContainer.find(".js-search-input").val(""),this.updateFilterSearch(),this._resetAllFilters=!1}resetFilter(e){if(!h.fields[e].value||!1===h.fields[e].resettableFilter)return;h.fields[e].value=null;const t=this._dialog.$filtersPopup||this.$inplaceEditor;if(t)if("select"===h.fields[e].control)t.find(`.js-filter-field-${e.replace(/\W/g,"")}`).trigger("reset");else if("condition"===h.fields[e].control)t.find(`[name="${e}"]`).val("").trigger("change");else if("toggle"===h.fields[e].control)t.find(`[name="${e}"]`).prop("checked",!1);else if("range"===h.fields[e].control){let o=h.fields[e].range;h.fields[e].values&&(o=[0,h.fields[e].values.length+1]),t.find(`.ui-slider[data-field="${e}"]`).slider("values",o).trigger("slide",{values:o})}this._resetField(e),this._model.update()}_rangeLeftValue(e){let t=h.fields[e].value;return"in_range"!==t.operator&&"not_in_range"!==t.operator||(t=t.value),this._isLessThenMin(t[0],e)?this._rangeMinValue(e):(0,h.getFieldFormatter)(h.fields[e],this._model.screener_type).format(t[0])}_rangeRightValue(e){let t=h.fields[e].value;return"in_range"!==t.operator&&"not_in_range"!==t.operator||(t=t.value),this._isGreaterThenMax(t[1],e)?this._rangeMaxValue(e):(0,h.getFieldFormatter)(h.fields[e],this._model.screener_type).format(t[1])}_isGreaterThenMax(e,t){return h.fields[t].range&&e>=h.fields[t].range[1]}_isLessThenMin(e,t){return h.fields[t].range&&e<=h.fields[t].range[0]}_rangeMinValue(e){return"<"+(0,h.getFieldFormatter)(h.fields[e],this._model.screener_type).format(h.fields[e].values[0])}_rangeMaxValue(e){return">"+(0,h.getFieldFormatter)(h.fields[e],this._model.screener_type).format(h.fields[e].values[h.fields[e].values.length-1])}_highlightActiveItems(e){if(!e.find(".js-filter-checkbox:checked").size())return e.find(".tv-control-select__option-wrap").removeClass("i-active"),void e.find(".js-item-wrap-any .tv-control-select__option-wrap").addClass("i-active");e.find(".js-filter-checkbox:checked, .js-filter-checkbox-any:checked").each((function(){e.find(".tv-control-select__option-wrap").removeClass("i-active"),zo(this).closest(".tv-control-select__option-wrap").addClass("i-active")}))}_closeDropdown(e){e.tvDropdown("close"),this.$inplaceEditor&&this.$inplaceEditor.focus()}_createMultiSelectItems(e,t,o,s,r){const i=(h.fields[e].useDefaultRange?h.fields[e].defaultRange:h.fields[e].range).slice().sort(((t,o)=>{if(!1!==h.fields[e].sortSelectedFirst){const s=h.fields[e].value===t||Array.isArray(h.fields[e].value)&&~h.fields[e].value.indexOf(t),r=h.fields[e].value===o||Array.isArray(h.fields[e].value)&&~h.fields[e].value.indexOf(o);if(s&&!r)return-1;if(r&&!s)return 1}return!1===h.fields[e].sortable?0:t>o?1:-1}));for(let n=null===o?0:-1;n`);-1===n&&(o=a),-1===n&&r&&(l=r) ;const c=h.fields[e].rangeTitles,d=c&&c[l]&&c[l][2],u=this._getFieldValueFromRangeTitles(l,e);let p;p=d&&!0===d.nowrap?`${u}`:"country"===e?(0,mt.triesTranslateCountrieName)(u):(0,me.triesTranslateScreenerData)(u);const _=zo(`
`).appendTo(t);zo(`