Files
ai/charting_library/bundles/go-to-tradingview-referral-dialog.3ff513f8887e148c67d1.js
2023-02-02 13:31:14 +00:00

5 lines
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6066],{16581:(e,t,n)=>{e.exports=n.p+"ee2bdfea45e5aca4518fe3ae1e115904.svg"},99804:(e,t,n)=>{e.exports=n.p+"4958ef32c0c1820de94cfe8a01f2f1cf.svg"},97848:e=>{e.exports={"round-button":"round-button-p9ma7wH8",content:"content-p9ma7wH8","color-brand":"color-brand-p9ma7wH8","variant-primary":"variant-primary-p9ma7wH8","disable-themes":"disable-themes-p9ma7wH8","variant-quiet-primary":"variant-quiet-primary-p9ma7wH8","variant-secondary":"variant-secondary-p9ma7wH8","variant-ghost":"variant-ghost-p9ma7wH8","color-gray":"color-gray-p9ma7wH8","color-red":"color-red-p9ma7wH8","size-xsmall":"size-xsmall-p9ma7wH8","icon-only":"icon-only-p9ma7wH8","size-small":"size-small-p9ma7wH8","size-medium":"size-medium-p9ma7wH8","size-large":"size-large-p9ma7wH8","size-xlarge":"size-xlarge-p9ma7wH8","size-xxlarge":"size-xxlarge-p9ma7wH8",animated:"animated-p9ma7wH8",stretch:"stretch-p9ma7wH8"}},16178:e=>{e.exports={"close-button":"close-button-WaM0Er9G","close-icon":"close-icon-WaM0Er9G","button-l":"button-l-WaM0Er9G","button-m":"button-m-WaM0Er9G","button-s":"button-s-WaM0Er9G","button-xs":"button-xs-WaM0Er9G","button-xxs":"button-xxs-WaM0Er9G"}},56734:e=>{e.exports={dialog:"dialog-sXuYOF5A",radius:"radius-sXuYOF5A",container:"container-sXuYOF5A",closeButton:"closeButton-sXuYOF5A",icon:"icon-sXuYOF5A",title:"title-sXuYOF5A",featureDescription:"featureDescription-sXuYOF5A",description:"description-sXuYOF5A",wrapperButton:"wrapperButton-sXuYOF5A",actionButton:"actionButton-sXuYOF5A"}},21935:e=>{e.exports={wrap:"wrap-2oYqsh7S",container:"container-2oYqsh7S",backdrop:"backdrop-2oYqsh7S",modal:"modal-2oYqsh7S",dialog:"dialog-2oYqsh7S"}},5437:(e,t,n)=>{"use strict";n.d(t,{RoundAnchorButton:()=>m,RoundButton:()=>l});var r=n(97754);function a(e,t){const{className:n,color:a="brand",variant:s="primary",size:o="xlarge",stretch:i,animated:c=!1,disableThemes:u=!1,iconOnly:l=!1}=t;return r(n,e["round-button"],e["color-"+a],e["variant-"+s],e["size-"+o],c&&e.animated,i&&e.stretch,u&&e["disable-themes"],l&&e["icon-only"])}var s=n(59496),o=n(90186),i=n(97848),c=n.n(i);function u(e){const{className:t,color:n,variant:r,size:a,stretch:s,animated:i,disableThemes:c,...u}=e;return{...u,...(0,o.filterDataProps)(e),...(0,o.filterAriaProps)(e)}}function l(e){const{reference:t,children:n,...r}=e,o=a(c(),e);return s.createElement("button",{...u(r),className:o,ref:t},s.createElement("span",{className:c().content},n))}function d(e){const{className:t,color:n,variant:r,size:a,stretch:s,animated:i,disableThemes:c,Component:u,...l}=e;return{...l,...(0,o.filterDataProps)(e),...(0,o.filterAriaProps)(e)}}function m(e){const{reference:t,children:n,...r}=e,o=a(c(),e),i=e.Component||"a";return s.createElement(i,{...d(r),className:o,ref:t},s.createElement("span",{className:c().content},n))}},35582:(e,t,n)=>{"use strict";n.d(t,{CloseButton:()=>h});var r=n(59496),a=n(97754),s=n(9745),o=n(64120),i=n(12565),c=n(95781),u=n(7801),l=n(33584),d=n(16178),m=n.n(d);function p(e="l"){switch(e){case"l":return o;case"m":
return i;case"s":return c;case"xs":return u;case"xxs":return l;default:return i}}const h=r.forwardRef((e,t)=>{const{className:n,size:o,...i}=e,c=a(m()["close-button"],m()["button-"+o],n);return r.createElement("button",{...i,type:"button",className:c,ref:t},r.createElement(s.Icon,{icon:p(o),className:m()["close-icon"],"aria-hidden":!0}))})},9745:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>a});var r=n(59496);const a=r.forwardRef((e,t)=>{const{icon:n="",...a}=e;return r.createElement("span",{...a,ref:t,dangerouslySetInnerHTML:{__html:n}})})},90186:(e,t,n)=>{"use strict";function r(e){return s(e,o)}function a(e){return s(e,i)}function s(e,t){const n=Object.entries(e).filter(t),r={};for(const[e,t]of n)r[e]=t;return r}function o(e){const[t,n]=e;return 0===t.indexOf("data-")&&"string"==typeof n}function i(e){return 0===e[0].indexOf("aria-")}n.d(t,{filterDataProps:()=>r,filterAriaProps:()=>a,filterProps:()=>s,isDataAttribute:()=>o,isAriaAttribute:()=>i})},70148:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GoToTradingViewReferralDialog:()=>z,renderGoToTradingViewReferralDialog:()=>R});var r=n(59496),a=n(87995),s=n(28353),o=n(88216),i=n(9423),c=n(51768),u=n(37005),l=n(26843),d=n(77975),m=n(45345),p=n(74607),h=n(80054);const f=["utm_source","utm_medium","utm_campaign"];function v(e){return function(e,t=!1){const n=(0,p.createUrlParams)(e);return n&&t?"?"+n:n}(function(e){const t={};return f.forEach(n=>{const r=e[n];"string"==typeof r&&""!==r&&(t[n]=(0,h.htmlEscape)(r))}),t}((0,p.getUrlParams)()),e)}n(67337);let w;function g(){const e="https://www.tradingview.com";return w?e+"?aff_id="+w+"&"+v(!1):e+v(!0)}var b=n(97754),y=n(74664),E=n(90692),x=n(76594),k=n(9481),C=n(67844),_=n(3767),O=n(81e3),D=n(56734);function M(e){const{children:t,onClose:n,width:a}=e,o=r.createElement(r.Fragment,null,r.createElement(k.KeyboardDocumentListener,{keyCode:27,handler:n}),r.createElement(C.CloseButton,{className:D.closeButton,"aria-label":s.t("Close",{context:"input"}),onClick:n}),t);return r.createElement(x.OutsideEvent,{mouseDown:!0,handler:n},e=>r.createElement(E.MatchMedia,{rule:`screen and (max-width: ${y.breakpoints.phone}px)`},t=>t?r.createElement(O.PopupDialog,{reference:e,isOpened:!0,fullscreen:!0,className:b(D.dialog,D.radius)},o):r.createElement(_.Modal,{reference:e,className:D.dialog,width:a,isOpened:!0},o)))}var N=n(5437),B=n(99804),L=n(16581);const S=/{\w+}/,P={features:{alerts:s.t("Stay on top of market moves! Alerts are immediate notifications when markets meet your custom criteria. Pick from visual popups, audio signals & email alerts."),pinescript:s.t("Create your own indicators and strategies! Pine Script™ is a flexible and efficient language for doing just that."),saveload:s.t("Save the analysis you do! Your custom settings, indicator setups and so on are saved onsite as individual charts for later access from anywhere."),customIntervals:s.t("Customize how you look at the markets! View charts in custom timeframes, such as 7 minutes, 12 minutes, or even 8 hours per bar."),
kagiRenko:s.t("Get a new look at the markets with advanced chart types! Use Kagi and Renko charts with intraday resolutions for a complete picture."),plusMenu:s.t("Stay on top of market moves. Set alerts and place orders in one click!"),indicators:s.t("Maximum number of indicators on TradingView widget is 3.")}};function z(e){const{onClose:t,featureDescription:n}=e,a=((0,d.useWatchedValueReadonly)({watchedValue:m.watchedTheme})||l.StdTheme.Light)===l.StdTheme.Light?B:L,o=s.t("This feature is available only on TradingView"),i=s.t("You can become PRO to use this and many other features with the full version of {link_start}TradingView{link_end}.").split(S),c=r.createElement("p",null,i[0],r.createElement("a",{href:""+g(),target:"_blank"},i[1]),i[2]);return(0,u.useFixedBody)(),r.createElement(M,{width:720,onClose:t},r.createElement("div",{className:D.container},r.createElement("img",{src:a,className:D.icon}),r.createElement("div",{className:D.title},o),r.createElement("div",{className:D.featureDescription},n),r.createElement("div",{className:D.description},c),r.createElement("div",{className:D.wrapperButton},r.createElement(N.RoundButton,{onClick:function(){window.open(g(),"_blank")},className:D.actionButton},s.t("Lets go!")))))}function R(e){const t=(0,i.guid)(),n=(0,o.getRootOverlapManager)(),s=n.ensureWindow(t);let u="";void 0!==e&&e.feature&&(u=P.features[e.feature],(0,c.trackEvent)("Referral program enabled","feature "+e.feature));a.render(r.createElement(z,{featureDescription:u,onClose:()=>{a.unmountComponentAtNode(s),n.removeWindow(t)}}),s)}},39640:(e,t,n)=>{"use strict";function r(e,t,n,r,a){function s(a){if(e>a.timeStamp)return;const s=a.target;void 0!==n&&null!==t&&null!==s&&s.ownerDocument===r&&(t.contains(s)||n(a))}return a.click&&r.addEventListener("click",s,!1),a.mouseDown&&r.addEventListener("mousedown",s,!1),a.touchEnd&&r.addEventListener("touchend",s,!1),a.touchStart&&r.addEventListener("touchstart",s,!1),()=>{r.removeEventListener("click",s,!1),r.removeEventListener("mousedown",s,!1),r.removeEventListener("touchend",s,!1),r.removeEventListener("touchstart",s,!1)}}n.d(t,{addOutsideEventListener:()=>r})},74664:(e,t,n)=>{"use strict";n.d(t,{breakpoints:()=>r,mobileFirstBreakpoints:()=>a,mobileFirstLegacyBreakpoints:()=>s});const r={desktop:1/0,desktopHd:1919,phone:767,"phone-vertical":479,tablet:1019},a={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},s={"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}},67844:(e,t,n)=>{"use strict";n.d(t,{CloseButton:()=>r.CloseButton});var r=n(35582)},3767:(e,t,n)=>{"use strict";n.d(t,{Modal:()=>l});var r=n(59496),a=n(97754),s=n(98526),o=n(86431),i=n(76594),c=n(21935);class u extends r.PureComponent{constructor(){super(...arguments),
this._containerRef=null,this._handleContainerRef=e=>{this._containerRef=e}}componentDidMount(){var e;this.props.autofocus&&(null===(e=this._containerRef)||void 0===e||e.focus())}render(){const{zIndex:e,onClickOutside:t,children:n,className:o}=this.props;return r.createElement("div",{ref:this._handleContainerRef,style:{zIndex:e},"data-dialog-name":this.props["data-dialog-name"],tabIndex:-1},r.createElement("div",{className:c.backdrop}),r.createElement("div",{className:c.wrap},r.createElement("div",{className:c.container},r.createElement(i.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:t},e=>r.createElement("div",{className:c.modal,ref:e},r.createElement(s.Dialog,{...this.props,className:a(o,c.dialog)},n))))))}}u.defaultProps={width:500};const l=(0,o.makeOverlapable)(u)},37005:(e,t,n)=>{"use strict";n.d(t,{useFixedBody:()=>s});var r=n(59496),a=n(43989);function s(){(0,r.useEffect)(()=>((0,a.setFixedBodyState)(!0),()=>{(0,a.setFixedBodyState)(!1)}),[])}},58095:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>s});var r=n(59496),a=n(39640);function s(e){const{click:t,mouseDown:n,touchEnd:s,touchStart:o,handler:i,reference:c,ownerDocument:u=document}=e,l=(0,r.useRef)(null),d=(0,r.useRef)(new CustomEvent("timestamp").timeStamp);return(0,r.useLayoutEffect)(()=>{const e={click:t,mouseDown:n,touchEnd:s,touchStart:o},r=c?c.current:l.current;return(0,a.addOutsideEventListener)(d.current,r,i,u,e)},[t,n,s,o,i]),c||l}},77975:(e,t,n)=>{"use strict";n.d(t,{useWatchedValueReadonly:()=>a});var r=n(59496);const a=(e,t=!1)=>{const n="watchedValue"in e?e.watchedValue:void 0,a="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[s,o]=(0,r.useState)(n?n.value():a);return(t?r.useLayoutEffect:r.useEffect)(()=>{if(n){o(n.value());const e=e=>o(e);return n.subscribe(e),()=>n.unsubscribe(e)}return()=>{}},[n]),s}},9481:(e,t,n)=>{"use strict";n.d(t,{KeyboardDocumentListener:()=>a});var r=n(59496);class a extends r.PureComponent{constructor(){super(...arguments),this._handleKeyDown=e=>{e.keyCode===this.props.keyCode&&this.props.handler(e)}}componentDidMount(){document.addEventListener(this.props.eventType||"keydown",this._handleKeyDown,!1)}componentWillUnmount(){document.removeEventListener(this.props.eventType||"keydown",this._handleKeyDown,!1)}render(){return null}}},90692:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>a});var r=n(59496);class a extends r.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addListener(this._handleChange)}_unsubscribe(e){e.removeListener(this._handleChange)}}},76594:(e,t,n)=>{"use strict";n.d(t,{OutsideEvent:()=>a})
;var r=n(58095);function a(e){const{children:t,...n}=e;return t((0,r.useOutsideEvent)(n))}},86431:(e,t,n)=>{"use strict";n.d(t,{makeOverlapable:()=>s});var r=n(59496),a=n(65718);function s(e){return class extends r.PureComponent{render(){const{isOpened:t,root:n}=this.props;if(!t)return null;const s=r.createElement(e,{...this.props,zIndex:150});return"parent"===n?s:r.createElement(a.Portal,null,s)}}}},65718:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>c,PortalContext:()=>u});var r=n(59496),a=n(87995),s=n(9423),o=n(88216),i=n(50655);class c extends r.PureComponent{constructor(){super(...arguments),this._uuid=(0,s.guid)()}componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);return e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"",a.createPortal(r.createElement(u.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,o.getRootOverlapManager)():this.context}}c.contextType=i.SlotContext;const u=r.createContext(null)},50655:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>a,SlotContext:()=>s});var r=n(59496);class a extends r.Component{shouldComponentUpdate(){return!1}render(){return r.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const s=r.createContext(null)},64120:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23" width="23" height="23"><path stroke="currentColor" stroke-width="1.2" d="M1 1l21 21m0-21L1 22"/></svg>'},95781:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path stroke="currentColor" stroke-width="1.2" d="M1 1l11 11m0-11L1 12"/></svg>'},7801:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11" width="11" height="11"><path stroke="currentColor" stroke-width="1.2" d="M1 1l9 9m0-9l-9 9"/></svg>'},33584:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 9" width="9" height="9"><path stroke="currentColor" stroke-width="1.2" d="M1 1l7 7m0-7L1 8"/></svg>'}}]);