Files
ai/charting_library/bundles/alerts-trigger-warning-dialog-impl.9bffee22d66ddcf75e00.js
2023-02-02 13:31:14 +00:00

4 lines
11 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([[7136],{37593:e=>{e.exports={wrapper:"wrapper-5Xd5conM",input:"input-5Xd5conM",box:"box-5Xd5conM",icon:"icon-5Xd5conM",noOutline:"noOutline-5Xd5conM","intent-danger":"intent-danger-5Xd5conM",check:"check-5Xd5conM",dot:"dot-5Xd5conM"}},96670:e=>{e.exports={checkbox:"checkbox-GxG6nBa7",reverse:"reverse-GxG6nBa7",label:"label-GxG6nBa7",baseline:"baseline-GxG6nBa7"}},71349:e=>{e.exports={description:"description-XND8Gzdp",link:"link-XND8Gzdp"}},18586:e=>{e.exports={checkbox:"checkbox-OpxH0OVy"}},74371:e=>{e.exports={icon:"icon-cKcckIVa"}},84413:(e,t,n)=>{"use strict";n.d(t,{CheckboxInput:()=>c});var a=n(59496),s=n(97754),o=n(9745),i=n(49154),r=n(37593),l=n.n(r);function c(e){const t=s(l().box,l()["intent-"+e.intent],{[l().check]:!Boolean(e.indeterminate),[l().dot]:Boolean(e.indeterminate),[l().noOutline]:-1===e.tabIndex}),n=s(l().wrapper,e.className);return a.createElement("span",{className:n,title:e.title},a.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:l().input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference}),a.createElement("span",{className:t},a.createElement(o.Icon,{icon:i,className:l().icon})))}},15294:(e,t,n)=>{"use strict";n.d(t,{Checkbox:()=>c,GroupedCheckbox:()=>u});var a=n(59496),s=n(97754),o=n(54349),i=n(84413),r=n(96670),l=n.n(r);class c extends a.PureComponent{render(){const{inputClassName:e,labelClassName:t,...n}=this.props,o=s(this.props.className,l().checkbox,{[l().reverse]:Boolean(this.props.labelPositionReverse),[l().baseline]:Boolean(this.props.labelAlignBaseline)}),r=s(l().label,t,{[l().disabled]:this.props.disabled});let c=null;return this.props.label&&(c=a.createElement("span",{className:r,title:this.props.title},this.props.label)),a.createElement("label",{className:o},a.createElement(i.CheckboxInput,{...n,className:e}),c)}}c.defaultProps={value:"on"};const u=(0,o.makeSwitchGroupItem)(c)},54349:(e,t,n)=>{"use strict";n.d(t,{SwitchGroup:()=>o,makeSwitchGroupItem:()=>i});var a=n(59496),s=n(19036);class o extends a.PureComponent{constructor(){super(...arguments),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)}}getChildContext(){return{switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return this.props.children}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach(t=>t(e))}_getUpdates(e,t){return[...t,...e].filter(n=>t.includes(n)?!e.includes(n):e.includes(n))}}function i(e){var t;return(t=class extends a.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 a.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.switchGroupContext.unsubscribe(this._onUpdate)}_getName(){return this.context.switchGroupContext.getName()}_isChecked(){return this.context.switchGroupContext.getValues().includes(this.props.value)}}).contextTypes={switchGroupContext:s.any.isRequired},t}o.childContextTypes={switchGroupContext:s.any.isRequired}},1787:(e,t,n)=>{"use strict";n.d(t,{solutionIds:()=>a});const a=JSON.parse('{"EXTENDED_HOURS":43000502023,"PRE_MARKET":43000502023,"POST_MARKET":43000502023,"SPREAD_CHARTS":43000502298,"ALERTS":43000520149,"ALERT_ON_STRATEGY":43000481368,"ALERT_WEBHOOK":43000529348,"ALERT_DESCRIPTION_PLACEHOLDER":43000531021,"VOLUME_PROFILE":43000502040,"VOLUME_PROFILE_INDICATOR":43000557450,"RENKO":43000502284,"KAGI":43000502272,"LINE_BREAK":43000502273,"PNF":43000502276,"FINANCIAL_DATA":43000543506,"BROKER_RATING":43000542490,"CRYPTO_MARKET_CAP":43000540941,"CRYPTO_PAYMENT":43000485536,"ALERT_ON_SPREAD":43000478406,"ALERT_ON_CUSTOM_SCRIPT":43000478415,"ALERT_FUNCTION":43000597494,"SMS_VERIFICATION":43000553429,"MAGNET_MODE":43000537270,"PINE_CANNOT_DETERMINE":43000587849,"PRIVACY_SETTINGS":43000548335,"PUBLICATION_TYPE":43000609497,"SCRIPT_ACCESS":43000482573,"MEMORY_LIMITS_EXCEEDED":43000590233,"FREE_USER_FAQS":43000590947,"STRATEGY_UNREALISTIC_RESULTS":43000481029,"STRATEGY_FUTURE_DATA":43000614705,"STREAM_RULES":43000591348,"HOW_TO_USE_PAPER":43000516466,"HOW_TO_USE_CQG":43000516372,"HOW_TO_USE_OANDA":43000516375,"HOW_TO_USE_FOREXCOM":43000516374,"FAVORITE_IDEA":43000555216,"YOUTUBE_ERROR":43000612153,"AUTHORS_INSTRUCTIONS_PUBCLICATION":43000549951,"AUTHORS_INSTRUCTIONS_EDIT":43000614618,"SCRIPT_INSTRUCTIONS":43000482573,"BAR_REPLAY_UNAVAILABILITY":43000475470,"WHAT_IS_CBOE_BZX_EXCHANGE":43000473924,"GOPRO_UPGRADE_DESCRIPTION":43000473324,"GOPRO_DOWNGRADE_DESCRIPTION":43000485437,"BROKERAGE_REVIEWS":43000591351,"CHANGE_SUBSCRIPTION":43000635806,"PINE_LIBRARY_INFO":43000638371,"HOW_TO_CREATE_A_STREAM":43000560174,"HOW_DO_I_UPDATE_DESKTOP_APP":43000647779,"TECHNICAL_RATINGS":43000614331,"BACKTESTING_WIDGET":43000561856,"DEEP_BACKTESTING_WIDGET":43000670566,"DEEP_BACKTESTING":43000666199,"DEEP_BACKTESTING_AVAILABLE_DATA":43000668210}')},71270:(e,t,n)=>{"use strict";n.r(t),n.d(t,{showAlertsTriggerWarningDialogImpl:()=>x});var a=n(59496),s=n(87995),o=n(28353),i=n(96050),r=n(9745),l=n(74371);function c(e){return a.createElement(a.Fragment,null,a.createElement(r.Icon,{icon:e.icon,className:l.icon}),e.text)}var u=n(15294),h=n(18586);function p(e){return a.createElement(u.Checkbox,{checked:e.checked,onChange:e.onChange,label:e.label||(0,o.t)("Don't show again"),className:h.checkbox})}var d=n(77975),E=n(45345);var _=n(26843),m=n(1787),T=n(30152),C=n(68361),A=n(55746),g=n(71349)
;const R=(0,o.t)("Got it"),I=(0,o.t)("Cancel"),N=(0,o.t)("Continue anyway"),O={spread:(0,o.t)("Spread alerts may trigger differently from what you expect"),"pine-repainting":(0,o.t)("Alert may trigger differently from what you expect"),cryptocap:(0,o.t)("CRYPTOCAP alerts may trigger differently from what you expect"),"logarithmic-scale":(0,o.t)("Alert may trigger differently from what you expect")},S={spread:(0,o.t)("This is because the tick data of price movements within a bar are not included in historical bars. Have a read of our {solutionLinkStart}Help Center{linkEnd} for more info."),"pine-repainting":(0,o.t)("This is because its based on an indicator or strategy that can get repainted. Have a read of our {solutionLinkStart}Help Center{linkEnd} for more info."),cryptocap:(0,o.t)("This is because the calculation for these symbols may return different results when using historical and real-time data. Have a read of our {solutionLinkStart}Help Center{linkEnd} for more info."),"logarithmic-scale":(0,o.t)("This is because, at the moment, calculations are based on a linear scale, not a logarithmic one.")},b={spread:m.solutionIds.ALERT_ON_SPREAD,"pine-repainting":m.solutionIds.ALERT_ON_CUSTOM_SCRIPT,cryptocap:m.solutionIds.CRYPTO_MARKET_CAP},f=/(.*){solutionLinkStart}(.*){linkEnd}(.*)/;function x(e){return new Promise(t=>{const n=document.createElement("div");let o=!1;function r(){s.render(a.createElement(i.SimpleDialog,{title:a.createElement(v,{title:O[e]}),onClose:c,content:a.createElement(a.Fragment,null,a.createElement("p",{className:g.description},w(e)),a.createElement(p,{checked:o,onChange:l,label:R})),actions:[{name:"continue",title:N,handler:u},{name:"cancel",title:I,intent:"default",appearance:"stroke",handler:c}],dataName:"alerts-trigger-warning-dialog-"+e}),n)}function l(){o=!o,r()}function c(){s.unmountComponentAtNode(n),t({doNotShow:o,canContinue:!1})}function u(){s.unmountComponentAtNode(n),t({doNotShow:o,canContinue:!0})}r()})}function w(e){const t=S[e],n=t.match(f),s=b[e];if(!n||!s)return t;return a.createElement(a.Fragment,null,n[1],a.createElement("a",{className:g.link,onClick:function(e){e.preventDefault(),(0,T.showSupportDialog)({solutionId:s})},href:`/support/solutions/${s}/`},n[2]),n[3])}function v(e){const t=(0,d.useWatchedValueReadonly)({watchedValue:E.watchedTheme});return a.createElement(c,{text:e.title,icon:t===_.StdTheme.Light?C:A})}},30152:(e,t,n)=>{"use strict";n.d(t,{showSupportDialog:()=>a});n(51872);function a(e){return Promise.all([n.e(9685),n.e(5514),n.e(8463),n.e(9289),n.e(509),n.e(3118),n.e(5998),n.e(8844),n.e(1253),n.e(8247),n.e(9297),n.e(9255),n.e(3812),n.e(5376),n.e(1536),n.e(5423),n.e(9957),n.e(7274)]).then(n.bind(n,89053)).then(t=>new t.SupportDialog(e).open())}},77975:(e,t,n)=>{"use strict";n.d(t,{useWatchedValueReadonly:()=>s});var a=n(59496);const s=(e,t=!1)=>{const n="watchedValue"in e?e.watchedValue:void 0,s="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[o,i]=(0,a.useState)(n?n.value():s);return(t?a.useLayoutEffect:a.useEffect)(()=>{if(n){i(n.value())
;const e=e=>i(e);return n.subscribe(e),()=>n.unsubscribe(e)}return()=>{}},[n]),o}},49154:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},55746:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72" width="72" height="72"><path fill="#B2B5BE" fill-rule="evenodd" d="M12.88 2.9a1 1 0 0 1 1-.9h44.41a1 1 0 0 1 1 .9l6.91 67a1 1 0 0 1-1 1.1H57a1 1 0 0 1-1-.9l-.73-7.1H29.68l.72 6.9a1 1 0 0 1-.99 1.1l-8.62.05a1 1 0 0 1-1-.9L19.07 63H16.9l-.74 7.1a1 1 0 0 1-1 .9h-8.2a1 1 0 0 1-.99-1.1l6.91-67zM18.86 61l-4.98-48.26L8.08 69h6.19l.73-7.1a1 1 0 0 1 1-.9h2.86zM15 4h42.4l6.7 65H57.9l-.73-7.1a1 1 0 0 0-1-.9h-27.6a1 1 0 0 0-1 1.1l.73 6.9-6.6.05-.73-7.15L14.99 4z"/><path fill="#F57C00" d="M38.63 16.4a1.71 1.71 0 0 1 3.01-.08l13.49 23.63a1.71 1.71 0 0 1-1.49 2.56h-25.4a1.71 1.71 0 0 1-1.53-2.48L38.63 16.4z"/><path fill="#B2B5BE" d="M41.05 34.07h-.97c-.48-3.09-.72-5.25-.72-6.48v-3.8h2.41v3.8c0 1.23-.24 3.4-.72 6.48zm-.4.69c.41 0 .77.15 1.06.45.3.3.44.65.44 1.07 0 .42-.15.78-.44 1.08-.3.3-.65.44-1.07.44-.42 0-.78-.15-1.07-.44-.3-.3-.45-.66-.45-1.08 0-.42.15-.78.45-1.07.3-.3.65-.45 1.07-.45z"/></svg>'},68361:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72" width="72" height="72"><path fill="#1E222D" fill-rule="evenodd" d="M12.88 2.9a1 1 0 0 1 1-.9h44.41a1 1 0 0 1 1 .9l6.91 67a1 1 0 0 1-1 1.1H57a1 1 0 0 1-1-.9l-.73-7.1H29.68l.72 6.9a1 1 0 0 1-.99 1.1l-8.62.05a1 1 0 0 1-1-.9L19.07 63H16.9l-.74 7.1a1 1 0 0 1-1 .9h-8.2a1 1 0 0 1-.99-1.1l6.91-67zM18.86 61l-4.98-48.26L8.08 69h6.19l.73-7.1a1 1 0 0 1 1-.9h2.86zM15 4h42.4l6.7 65H57.9l-.73-7.1a1 1 0 0 0-1-.9h-27.6a1 1 0 0 0-1 1.1l.73 6.9-6.6.05-.73-7.15L14.99 4z"/><path fill="#FB8C00" d="M38.63 16.4a1.71 1.71 0 0 1 3.01-.08l13.49 23.63a1.71 1.71 0 0 1-1.49 2.56h-25.4a1.71 1.71 0 0 1-1.53-2.48L38.63 16.4z"/><path fill="#fff" d="M41.05 34.07h-.97c-.48-3.09-.72-5.25-.72-6.48v-3.8h2.41v3.8c0 1.23-.24 3.4-.72 6.48zm-.4.69c.41 0 .77.15 1.06.45.3.3.44.65.44 1.07 0 .42-.15.78-.44 1.08-.3.3-.65.44-1.07.44-.42 0-.78-.15-1.07-.44-.3-.3-.45-.66-.45-1.08 0-.42.15-.78.45-1.07.3-.3.65-.45 1.07-.45z"/></svg>'}}]);