Release v19.032 (from f74f1ddb)
Fixes tradingview/charting_library#5829
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -308,9 +308,9 @@ type:n.Undefined},this._studyStatusChanged=new l.a,this._graphics=new p.LiveStud
|
||||
this._series.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))},e.prototype._createStudyUsingParentId=function(e){Object(s.assert)(this._status!==r.Active,'Status should not be "Active" when creating a study'),Object(s.assert)(this._studyStatus.type===n.Undefined,'Study status should be "Undefined" when creating a study'),Object(s.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=Object(h.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(s.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(r.AwaitingFirstDataUpdate)},e.prototype._onGatewayIsConnectedChanged=function(e){e?this._onGatewayConnected():this._onGatewayDisconnected()},e.prototype._onGatewayConnected=function(){this._status===r.AwaitingConnection&&this._createStudy()},e.prototype._onGatewayDisconnected=function(){this._status!==r.Idle&&this._status!==r.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(r.AwaitingConnection),this._studyStatus.type!==n.Undefined&&this._onStudyStatusChangedTo({type:n.Undefined})),this._turnaroundCounter=1},e.prototype._onSeriesCompleted=function(){this._status===r.AwaitingParent&&this._createStudyUsingParentId(Object(s.ensure)(this._series.seriesId()))},e.prototype._onStudyStatusChangedTo=function(e){var t=this._studyStatus;this._studyStatus=e,_.logNormal("Study status type changed from "+n[t.type]+" to "+n[e.type]),this._studyStatusChanged.fire(t,e)},e.prototype._onMessage=function(e){if("data_update"===e.method){var t=e.params,i=t.customId,n=t.turnaround,r=t.plots,o=t.nonseries;i===this._studyId&&this._checkTurnaround(n)&&this._onDataUpdate(r,o)}else if("study_loading"===e.method){var s=e.params,a=(i=s[0],n=s[1],s[2]);i===this._studyId&&this._checkTurnaround(n)&&this._onStudyLoading(a)}else if("study_completed"===e.method){var l=e.params;i=l[0],n=l[1],a=l[2];i===this._studyId&&this._checkTurnaround(n)&&this._onStudyCompleted(a)}else if("study_error"===e.method){var c=e.params,u=(i=c[0],n=c[1],c[2]),h=c[3];a=c[4];i===this._studyId&&this._checkTurnaround(n)&&this._onStudyError(u,h,a)}},e.prototype._onDataUpdate=function(e,t){var i=Object(u.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},e.prototype._onDataUnpacked=function(e,t,i){this._status!==r.Idle&&(this._status===r.AwaitingFirstDataUpdate&&(this._changeStatusTo(r.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(s.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))},e.prototype._onStudyLoading=function(e){this._onStudyStatusChangedTo({type:n.Loading,startTime:Date.now()})},e.prototype._onStudyError=function(e,t,i){this.clearData(),
|
||||
this._onStudyStatusChangedTo({type:n.Error,reason:e})},e.prototype._onStudyCompleted=function(e){this._onStudyStatusChangedTo({type:n.Completed})},e.prototype._mergePlots=function(e){this._plots.merge(e)},e.prototype._turnaround=function(){return""+this._turnaroundPrefix+this._turnaroundCounter},e.prototype._checkTurnaround=function(e){var t=this._turnaround();return e===t||e===this._series.turnaround()||e===this._series.turnaround()+"_"+t},e}(),v=i("kcTO"),y=i("Ocx9"),g=i("oV8k"),b=i("Kxc7");i.d(t,"sessionsPreferencesDefault",(function(){return w})),i.d(t,"Sessions",(function(){return P}));var S=new v.PriceFormatter,w={graphics:{backgrounds:{outOfSession:{color:"#2196F3",transparency:92,visible:!1},preMarket:{color:"#FF9800",transparency:92,visible:!1},postMarket:{color:"#2196F3",transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},P=function(e){function t(t,i,n){var r=e.call(this,t,i)||this;r._studySource=null,r._paneViews=[],r._metaInfo=null,r._destroyed=!1,r._isStarted=!1,r._loadedGraphics=null,r._doubleClickHandler=n;var o=i.mainSeries();return r._properties=new y.DefaultProperty("sessions"),r._removeDuplicateProperties(),r._properties.subscribe(r,r._onPropertiesChanged),i.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then((function(e){r._destroyed||null===r._loadedGraphics&&(r._setMetaInfo(e),null!==r._metaInfo&&(r._studySource=new m(i.chartApi(),o,"sessions_",r._metaInfo),r._createPaneViews(),r._studySource.dataCleared().subscribe(r,r.updateAllViews),r._studySource.dataUpdated().subscribe(r,r.updateAllViews),r._studySource.setInputs({}),r._processHibernate()))})),i.timeScale().onReset().subscribe(r,r._clearData),i.timeScale().logicalRangeChanged().subscribe(r,r.updateAllViews),i.mainSeries().properties().extendedHours.subscribe(r,r._updateVisibleOfPreAndPostMarketBackground),i.mainSeries().properties().interval.subscribe(r,r._processHibernate),r._updateVisibleOfPreAndPostMarketBackground(i.mainSeries().properties().extendedHours),r}return Object(o.c)(t,e),t.prototype.start=function(){this._isStarted=!0,this._processHibernate()},t.prototype.restart=function(){this._clearData(),b.enabled("stop_study_on_restart")&&this.stop(),this.start()},t.prototype.isStarted=function(){return this._isStarted},t.prototype.stop=function(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()},t.prototype.isHoveredEnabled=function(){return!1},t.prototype.paneViews=function(e){return this._paneViews},t.prototype.updateAllViews=function(){this._paneViews.forEach((function(e){return e.update()}))},t.prototype.updateViewsForPane=function(e){this.updateAllViews()},t.prototype.destroy=function(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),
|
||||
this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOfPreAndPostMarketBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate),this._properties.unsubscribe(this,this._onPropertiesChanged)},t.prototype.series=function(){return this._model.mainSeries()},t.prototype.priceScale=function(){return this.series().priceScale()},t.prototype.graphics=function(){return this._loadedGraphics||Object(s.ensureNotNull)(this._studySource).graphics()},t.prototype.properties=function(){return this._properties},t.prototype.graphicsInfo=function(){return Object(s.ensureNotNull)(this._metaInfo).graphics},t.prototype.firstValue=function(e){return this._model.mainSeries().firstValue()},t.prototype.formatter=function(){return S},t.prototype.state=function(e){var t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(p.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t},t.prototype.restoreState=function(e,t){var i=e.properties;this._migrateOutOfSessionProperty(i),this._properties.mergeAndFire(i),this._removeDuplicateProperties(),this._updateVisibleOfPreAndPostMarketBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())},t.prototype.restoreOldState=function(e,t){var i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)},t.prototype.applyPreferences=function(e){this._properties.mergePreferences(e)},t.prototype.metaInfo=function(){return Object(s.ensureNotNull)(this._metaInfo)},t.prototype._loadStudyGraphics=function(e){var t=e.backgrounds;if(void 0!==t){var i=t.findIndex((function(e){return"inSession"===e.styleId}));-1!==i&&t.splice(i,1)}this._loadedGraphics=Object(p.loadStudyGraphics)(e)},t.prototype._setMetaInfo=function(e){var t=e.graphics.backgrounds;void 0!==t&&void 0!==t.inSession&&delete t.inSession,this._metaInfo=e},t.prototype._updateVisibleOfPreAndPostMarketBackground=function(e){var t=e.value();this._outOfSessionVisibilityProperty().setValue(t),this._preMarketVisibilityProperty().setValue(t),this._postMarketVisibilityProperty().setValue(t)},t.prototype._clearData=function(){null!==this._studySource&&this._studySource.clearData()},t.prototype._createPaneViews=function(){var e=this,t={doubleClickHandler:this._doubleClickHandler};Object(p.createGraphicsPaneViews)(this,this._model,t).then((function(t){e._paneViews=t,e._model.lightUpdate()}))},t.prototype._onPropertiesChanged=function(){this._processHibernate(),this.updateAllViews()},t.prototype._processHibernate=function(){if(null!==this._studySource){var e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}},t.prototype._canBeHibernated=function(){
|
||||
var e=this._model.mainSeries(),t=this._preMarketVisibilityProperty().value()&&this._postMarketVisibilityProperty().value()&&this._outOfSessionVisibilityProperty().value();return e.isDWM()||!t&&!this._vertLinesVisibleProperty().value()},t.prototype._isHibernated=function(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())},t.prototype._outOfSessionVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible},t.prototype._preMarketVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().preMarket.childs().visible},t.prototype._postMarketVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().postMarket.childs().visible},t.prototype._vertLinesVisibleProperty=function(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible},t.prototype._removeDuplicateProperties=function(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(y.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(y.saveDefaultProperties)(!1))},t.prototype._migrateOutOfSessionProperty=function(e){var t=e.graphics.backgrounds,i=t.outOfSession;i.color===w.graphics.backgrounds.outOfSession.color||"postMarket"in t||(e.graphics.backgrounds=Object(o.a)(Object(o.a)({},t),{postMarket:{color:i.color,transparency:i.transparency,visible:i.visible},preMarket:{color:i.color,transparency:i.transparency,visible:i.visible}}))},t}(g.CustomSourceBase)},KcY8:function(e,t,i){"use strict";var n=i("mrSG"),r=i("aO4+"),o=i("f6yo"),s=i("VaSN"),a=i("Tmoa"),l=i("Ialn"),c=i("8Uy/"),u=i("jFln"),h=i("ikwP"),d=i("VdBB"),p=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=Object(n.a)({},e),this._commonData=Object(n.a)({},t)},e.prototype.draw=function(e,t,i,n,r,o){if(this._data.visible){e.font=t.font;var s,d=Math.floor((this._data.tickVisible?t.tickLength:0)*o),p=Math.floor((this._data.borderVisible?t.borderSize:0)*o),f=Math.floor(t.paddingTop*o),_=Math.floor(t.paddingBottom*o),m=Math.floor(t.paddingInner*o),v=Math.floor(t.paddingOuter*o),y=this._data.text,g=Math.round(t.baselineOffset*o),b=void 0!==this._data.labelIcon,S=Math.max(1,Math.floor(o)),w=Math.floor(t.fontSize*o)+f+_;if(w%2!=S%2&&(w+=1),b)s=w;else{var P=Math.ceil(i.measureText(e,y));s=Math.round(P*o)+d+p+m+v}var C=this._commonData.coordinate;this._commonData.fixedCoordinate&&(C=this._commonData.fixedCoordinate);var T,x,I="right"===r,L=this._getOffsetScaled(I,n,o),O=Math.ceil(n*o),M=I?O:0,A=M;e.fillStyle=Object(a.resetTransparency)(this._commonData.background),e.lineWidth=1,Object(u.setLineStyle)(e,c.LINESTYLE_SOLID),e.lineCap="butt";var k=Math.round(C*o)-Math.floor(.5*o),E=Math.floor(k+S/2-w/2),V=E+w;if(y||b){if(I?(T=M-d,x=(A=M-s)+v):(A=M+s,T=M+d,x=M+p+d+m),M+=L,A+=L,T+=L,e.beginPath(),e.moveTo(M,E),e.lineTo(A,E),e.lineTo(A,V),e.lineTo(M,V),e.fill(),0!==L&&this._data.fillOffset){
|
||||
e.fillStyle=t.paneBackgroundColor;var D=I?Math.ceil(n*o)+1:0;e.beginPath(),e.moveTo(M,E),e.lineTo(D,E),e.lineTo(D,V),e.lineTo(M,V),e.fill()}if(b){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,M,A,E,k,V,S)}return}this._data.tickVisible&&(e.fillStyle=this._commonData.color,e.fillRect(M,k,T-M,S)),e.textAlign="left",e.fillStyle=this._commonData.color,Object(h.drawScaled)(e,o,(function(){e.fillText(y,(x+L)/o,(V-_-g)/o)}))}if(this._data.secondLine){var B=Math.ceil(i.measureText(e,this._data.secondLine)*o)+m+v;e.fillStyle=Object(a.resetTransparency)(this._commonData.background),this._data.text&&(E+=w+S,V+=w+S),I?(M=(A=Math.min(A,O-B))+B,x=A+v):(A=(M=Math.max(A-B,p))+B,x=M+m),M+=L,A+=L,e.beginPath(),e.moveTo(M,E),e.lineTo(A,E),e.lineTo(A,V),e.lineTo(M,V),e.fill(),e.textAlign="left",e.fillStyle=this._commonData.color;var R=this._data.secondLine;Object(h.drawScaled)(e,o,(function(){e.fillText(Object(l.startWithLTR)(R),(x+L)/o,(V-_-g)/o)}))}}},e.prototype.height=function(e,t){if(!this._data.visible)return 0;var i=e.fontSize+e.paddingTop+e.paddingBottom;return this._data.secondLine&&t?2*i+1:i},e.prototype.hitTest=function(e){var t=this._data.hitTestData;if(void 0===t||!this._data.visible)return null;var i=this._data.offset,n=Object(s.lastEventIsTouch)()?10:0,a=Object(r.box)(new r.Point(t.xl+i-n,t.y-n),new r.Point(t.xl+i+t.containerWidth+n,t.y+t.containerHeight+n)),l=t.left&&Object(o.pointInBox)(e,a),c=Object(r.box)(new r.Point(t.xr-i-n,t.y-n),new r.Point(t.xr-i+t.containerWidth+n,t.y+t.containerHeight+n)),u=t.right&&Object(o.pointInBox)(e,c);if(l||u){var h=l?"left":"right";return new d.HitTestResult(d.HitTestResult.CUSTOM,{clickHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,h),tapHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,h),tooltip:t.tooltip})}return null},e.prototype._getOffsetScaled=function(e,t,i){var n=e?-1:1,r=0===this._data.offset?0:n*this._data.offset,o=0===r?0:n*Math.max(1,Math.round(Math.abs(r)*i));return e&&t*i%1!=0&&(o=n*(Math.abs(o)+1)),o},e.prototype._drawPlusIcon=function(e,t,i,n,r,o,s){e.fillStyle=this._commonData.color;var a=Math.abs(t-i),l=Math.round(.5*a);l%2!=s%2&&(l+=1);var c=Math.floor((a-l)/2),u=Math.min(t,i),h=u+Math.floor(a/2-s/2);e.fillRect(u+c,r,l,s),e.fillRect(h,n+c,s,l)},e}();i.d(t,"a",(function(){return f}));var f=function(){function e(e){this._commonRendererData={coordinate:0,color:"#FFF",background:"#000"},this._axisRendererData={text:"",visible:!1,tickVisible:!0,borderVisible:!0,offset:0},this._paneRendererData={text:"",visible:!1,tickVisible:!1,borderVisible:!1,offset:1,fillOffset:!0},this._invalidated=!0,this._axisRenderer=new(e||p)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||p)(this._paneRendererData,this._commonRendererData)}return e.prototype.text=function(){return this._axisRendererData.text},e.prototype.secondLineText=function(){return this._axisRendererData.secondLine},e.prototype.background=function(){return this._commonRendererData.background},e.prototype.color=function(){
|
||||
return this.generateTextColor(this.background())},e.prototype.generateTextColor=function(e){return Object(a.colorFromBackground)(e)},e.prototype.coordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate},e.prototype.floatCoordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate},e.prototype.update=function(){this._invalidated=!0},e.prototype.height=function(e,t){return void 0===t&&(t=!1),this._updateRendererDataIfNeeded(),Math.max(this._axisRenderer.height(e,t),this._paneRenderer.height(e,t))},e.prototype.getFixedCoordinate=function(){return this._commonRendererData.fixedCoordinate||0},e.prototype.setFixedCoordinate=function(e){this._commonRendererData.fixedCoordinate=e},e.prototype.isVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible},e.prototype.isAxisLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible},e.prototype.isPaneLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible},e.prototype.renderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer},e.prototype.paneRenderer=function(){return this._updateRendererDataIfNeeded(),this._paneRenderer},e.prototype.setPaneRendererLabelIcon=function(e){this._paneRendererData.labelIcon=e},e.prototype.setPaneLabelVisible=function(e){this._paneRendererData.visible=e,this._invalidated=!0},e.prototype._updateRendererDataIfNeeded=function(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData)},e}()},Kdr6:function(e,t,i){"use strict";i.r(t),i.d(t,"HHistLegendView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n}return Object(n.c)(t,e),t.prototype.isValuesVisible=function(){return this._showStudyValues.value()},t.prototype.additional=function(){return null},t.prototype.destroy=function(){},t}(i("TG9i").HHistDataWindowView)},Kmdw:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererArrowUp",(function(){return l})),i.d(t,"PaneRendererArrowDown",(function(){return c}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=i("Hr11"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sign=0,t._thinArrow=!1,t._thinArrowLineWidth=0,t._headHeight=0,t._arrowWidth=0,t}return Object(n.c)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t)},t.prototype._drawItemShape=function(e,t,i){
|
||||
var e=this._model.mainSeries(),t=this._preMarketVisibilityProperty().value()&&this._postMarketVisibilityProperty().value()&&this._outOfSessionVisibilityProperty().value();return e.isDWM()||!t&&!this._vertLinesVisibleProperty().value()},t.prototype._isHibernated=function(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())},t.prototype._outOfSessionVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible},t.prototype._preMarketVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().preMarket.childs().visible},t.prototype._postMarketVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().postMarket.childs().visible},t.prototype._vertLinesVisibleProperty=function(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible},t.prototype._removeDuplicateProperties=function(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(y.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(y.saveDefaultProperties)(!1))},t.prototype._migrateOutOfSessionProperty=function(e){var t=e.graphics.backgrounds;if(void 0!==t){var i=t.outOfSession;i.color===Object(s.ensureDefined)(w.graphics.backgrounds).outOfSession.color||"postMarket"in t||(e.graphics.backgrounds=Object(o.a)(Object(o.a)({},t),{postMarket:{color:i.color,transparency:i.transparency,visible:i.visible},preMarket:{color:i.color,transparency:i.transparency,visible:i.visible}}))}},t}(g.CustomSourceBase)},KcY8:function(e,t,i){"use strict";var n=i("mrSG"),r=i("aO4+"),o=i("f6yo"),s=i("VaSN"),a=i("Tmoa"),l=i("Ialn"),c=i("8Uy/"),u=i("jFln"),h=i("ikwP"),d=i("VdBB"),p=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=Object(n.a)({},e),this._commonData=Object(n.a)({},t)},e.prototype.draw=function(e,t,i,n,r,o){if(this._data.visible){e.font=t.font;var s,d=Math.floor((this._data.tickVisible?t.tickLength:0)*o),p=Math.floor((this._data.borderVisible?t.borderSize:0)*o),f=Math.floor(t.paddingTop*o),_=Math.floor(t.paddingBottom*o),m=Math.floor(t.paddingInner*o),v=Math.floor(t.paddingOuter*o),y=this._data.text,g=Math.round(t.baselineOffset*o),b=void 0!==this._data.labelIcon,S=Math.max(1,Math.floor(o)),w=Math.floor(t.fontSize*o)+f+_;if(w%2!=S%2&&(w+=1),b)s=w;else{var P=Math.ceil(i.measureText(e,y));s=Math.round(P*o)+d+p+m+v}var C=this._commonData.coordinate;this._commonData.fixedCoordinate&&(C=this._commonData.fixedCoordinate);var T,x,I="right"===r,L=this._getOffsetScaled(I,n,o),O=Math.ceil(n*o),M=I?O:0,A=M;e.fillStyle=Object(a.resetTransparency)(this._commonData.background),e.lineWidth=1,Object(u.setLineStyle)(e,c.LINESTYLE_SOLID),e.lineCap="butt";var k=Math.round(C*o)-Math.floor(.5*o),E=Math.floor(k+S/2-w/2),V=E+w;if(y||b){if(I?(T=M-d,x=(A=M-s)+v):(A=M+s,T=M+d,x=M+p+d+m),M+=L,A+=L,T+=L,e.beginPath(),e.moveTo(M,E),e.lineTo(A,E),e.lineTo(A,V),e.lineTo(M,V),
|
||||
e.fill(),0!==L&&this._data.fillOffset){e.fillStyle=t.paneBackgroundColor;var D=I?Math.ceil(n*o)+1:0;e.beginPath(),e.moveTo(M,E),e.lineTo(D,E),e.lineTo(D,V),e.lineTo(M,V),e.fill()}if(b){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,M,A,E,k,V,S)}return}this._data.tickVisible&&(e.fillStyle=this._commonData.color,e.fillRect(M,k,T-M,S)),e.textAlign="left",e.fillStyle=this._commonData.color,Object(h.drawScaled)(e,o,(function(){e.fillText(y,(x+L)/o,(V-_-g)/o)}))}if(this._data.secondLine){var B=Math.ceil(i.measureText(e,this._data.secondLine)*o)+m+v;e.fillStyle=Object(a.resetTransparency)(this._commonData.background),this._data.text&&(E+=w+S,V+=w+S),I?(M=(A=Math.min(A,O-B))+B,x=A+v):(A=(M=Math.max(A-B,p))+B,x=M+m),M+=L,A+=L,e.beginPath(),e.moveTo(M,E),e.lineTo(A,E),e.lineTo(A,V),e.lineTo(M,V),e.fill(),e.textAlign="left",e.fillStyle=this._commonData.color;var R=this._data.secondLine;Object(h.drawScaled)(e,o,(function(){e.fillText(Object(l.startWithLTR)(R),(x+L)/o,(V-_-g)/o)}))}}},e.prototype.height=function(e,t){if(!this._data.visible)return 0;var i=e.fontSize+e.paddingTop+e.paddingBottom;return this._data.secondLine&&t?2*i+1:i},e.prototype.hitTest=function(e){var t=this._data.hitTestData;if(void 0===t||!this._data.visible)return null;var i=this._data.offset,n=Object(s.lastEventIsTouch)()?10:0,a=Object(r.box)(new r.Point(t.xl+i-n,t.y-n),new r.Point(t.xl+i+t.containerWidth+n,t.y+t.containerHeight+n)),l=t.left&&Object(o.pointInBox)(e,a),c=Object(r.box)(new r.Point(t.xr-i-n,t.y-n),new r.Point(t.xr-i+t.containerWidth+n,t.y+t.containerHeight+n)),u=t.right&&Object(o.pointInBox)(e,c);if(l||u){var h=l?"left":"right";return new d.HitTestResult(d.HitTestResult.CUSTOM,{clickHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,h),tapHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,h),tooltip:t.tooltip})}return null},e.prototype._getOffsetScaled=function(e,t,i){var n=e?-1:1,r=0===this._data.offset?0:n*this._data.offset,o=0===r?0:n*Math.max(1,Math.round(Math.abs(r)*i));return e&&t*i%1!=0&&(o=n*(Math.abs(o)+1)),o},e.prototype._drawPlusIcon=function(e,t,i,n,r,o,s){e.fillStyle=this._commonData.color;var a=Math.abs(t-i),l=Math.round(.5*a);l%2!=s%2&&(l+=1);var c=Math.floor((a-l)/2),u=Math.min(t,i),h=u+Math.floor(a/2-s/2);e.fillRect(u+c,r,l,s),e.fillRect(h,n+c,s,l)},e}();i.d(t,"a",(function(){return f}));var f=function(){function e(e){this._commonRendererData={coordinate:0,color:"#FFF",background:"#000"},this._axisRendererData={text:"",visible:!1,tickVisible:!0,borderVisible:!0,offset:0},this._paneRendererData={text:"",visible:!1,tickVisible:!1,borderVisible:!1,offset:1,fillOffset:!0},this._invalidated=!0,this._axisRenderer=new(e||p)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||p)(this._paneRendererData,this._commonRendererData)}return e.prototype.text=function(){return this._axisRendererData.text},e.prototype.secondLineText=function(){return this._axisRendererData.secondLine},e.prototype.background=function(){return this._commonRendererData.background},
|
||||
e.prototype.color=function(){return this.generateTextColor(this.background())},e.prototype.generateTextColor=function(e){return Object(a.colorFromBackground)(e)},e.prototype.coordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate},e.prototype.floatCoordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate},e.prototype.update=function(){this._invalidated=!0},e.prototype.height=function(e,t){return void 0===t&&(t=!1),this._updateRendererDataIfNeeded(),Math.max(this._axisRenderer.height(e,t),this._paneRenderer.height(e,t))},e.prototype.getFixedCoordinate=function(){return this._commonRendererData.fixedCoordinate||0},e.prototype.setFixedCoordinate=function(e){this._commonRendererData.fixedCoordinate=e},e.prototype.isVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible},e.prototype.isAxisLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible},e.prototype.isPaneLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible},e.prototype.renderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer},e.prototype.paneRenderer=function(){return this._updateRendererDataIfNeeded(),this._paneRenderer},e.prototype.setPaneRendererLabelIcon=function(e){this._paneRendererData.labelIcon=e},e.prototype.setPaneLabelVisible=function(e){this._paneRendererData.visible=e,this._invalidated=!0},e.prototype._updateRendererDataIfNeeded=function(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData)},e}()},Kdr6:function(e,t,i){"use strict";i.r(t),i.d(t,"HHistLegendView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n}return Object(n.c)(t,e),t.prototype.isValuesVisible=function(){return this._showStudyValues.value()},t.prototype.additional=function(){return null},t.prototype.destroy=function(){},t}(i("TG9i").HHistDataWindowView)},Kmdw:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererArrowUp",(function(){return l})),i.d(t,"PaneRendererArrowDown",(function(){return c}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=i("Hr11"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sign=0,t._thinArrow=!1,t._thinArrowLineWidth=0,t._headHeight=0,t._arrowWidth=0,t}return Object(n.c)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t)},t.prototype._drawItemShape=function(e,t,i){
|
||||
var n=t.pixelRatio,r=this._lineWidth(t)%2?.5:0,o=this._sign,a=this._arrowWidth,l=this._headHeight,c=Math.abs(i.height),u=Math.round(i.x*n)+r,h=i.vertOffset,d=Math.round((i.y+h+o*c/2)*n)+r,p=Object(s.ceiledEven)(a*n),f=p/2,_=Math.round(c*n),m=Math.round(l*n);e.translate(u,d),this._thinArrow?(e.moveTo(0,0),e.lineTo(-f,-f*o),e.moveTo(0,0),e.lineTo(f,-f*o),e.moveTo(0,0),e.lineTo(0,-_*o),e.moveTo(-f,-_*o),e.lineTo(f,-_*o)):(e.moveTo(0,0),_<m?(e.lineTo(p,-_*o),e.lineTo(-p,-_*o)):(e.lineTo(p,-m*o),e.lineTo(f,-m*o),e.lineTo(f,-_*o),e.lineTo(-f,-_*o),e.lineTo(-f,-m*o),e.lineTo(-p,-m*o)),e.lineTo(0,0)),e.translate(-u,-d)},t.prototype._preDrawInit=function(){var e=this._calculateWidth();this._arrowWidth=e,this._sign=this._isUp()?-1:1,this._thinArrow=e<4,this._thinArrowLineWidth=Math.max(e/2,1),this._headHeight=Math.round(e)},t.prototype._startPath=function(e,t,i,n){e.beginPath(),e.fillStyle=i,e.strokeStyle=n,e.lineWidth=this._lineWidth(t)},t.prototype._lineWidth=function(t){return this._thinArrow?this._thinArrowLineWidth:e.prototype._lineWidth.call(this,t)},t.prototype._calcBoundingBox=function(t){var i=t.vertOffset,n=this._sign,r=this._arrowWidth,s=this._headHeight,a=Math.abs(t.height),l=t.x-r,c=l+2*r,u=t.y+i+n*Math.round(a/2),h=u+(-a-s)*n,d=new o.Point(l,u),p=new o.Point(c,h),f=Object(o.box)(d,p),_=e.prototype._calcBoundingBox.call(this,t);return _&&(f=this._unionBox(f,_)),f},t.prototype._calculateWidth=function(){return Math.round(this._barSpacing/4)},t}(r.a),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype._isUp=function(){return!0},t}(a),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.c)(t,e),t.prototype._isUp=function(){return!1},t}(a)},KnF9:function(e,t,i){"use strict";i.r(t),i.d(t,"EnvironmentState",(function(){return r}));var n=i("qFKp"),r=function(){function e(e){this._shift=!1,this._control=!1,this._alt=!1,void 0!==e&&(this._shift=Boolean(e.shiftKey),this._control=Boolean(Object(n.isMac)()?e.metaKey:e.ctrlKey),this._alt=Boolean(e.altKey))}return e.prototype.shift=function(){return this._shift},e.prototype.control=function(){return this._control},e.prototype.alt=function(){return this._alt},e.prototype.shiftOnly=function(){return this._shift&&!this._control&&!this._alt},e.prototype.controlOnly=function(){return this._control&&!this._shift&&!this._alt},e.prototype.altOnly=function(){return this._alt&&!this._shift&&!this._control},e.prototype.controlShift=function(){return this._shift&&this._control&&!this._alt},e.create=function(t,i,n){return void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),new e({shiftKey:t,ctrlKey:i,metaKey:i,altKey:n})},e}()},KtbP:function(e,t,i){"use strict";i.r(t),i.d(t,"PanePriceAxisView",(function(){return o}));var n=i("u+0B"),r=function(){function e(e){this._priceAxisViewRenderer=null,this._rendererOptions=null,this._align="right",this._width=0,this._textWidthCache=e}return e.prototype.setParams=function(e,t,i,n){this._priceAxisViewRenderer=e,this._rendererOptions=t,this._width=i,
|
||||
this._align=n},e.prototype.draw=function(e,t){null!==this._rendererOptions&&null!==this._priceAxisViewRenderer&&this._priceAxisViewRenderer.draw(e,this._rendererOptions,this._textWidthCache,this._width,this._align,t.pixelRatio)},e.prototype.hitTest=function(e){var t,i;return void 0===(null===(t=this._priceAxisViewRenderer)||void 0===t?void 0:t.hitTest)?null:null===(i=this._priceAxisViewRenderer)||void 0===i?void 0:i.hitTest(e)},e}(),o=function(){function e(e,t,i){this._renderer=null,this._invalidated=!0,this._priceAxisView=e,this._textWidthCache=new n.TextWidthCache(50),this._dataSource=t,this._chartModel=i,this._fontSize=-1,this._panePriceAxisViewRenderer=new r(this._textWidthCache)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(e,t),this._renderer},e.prototype._updateImpl=function(e,t){this._priceAxisView.update(),this._renderer=null;var i=this._chartModel.crossHairSource(),n=this._dataSource===i?i.pane:this._chartModel.paneForSource(this._dataSource);if(null!==n){var r=this._priceScale();if(null!==r){var o=n.priceScalePosition(r);if("overlay"===o&&(o=n.priceScalePosition(n.defaultPriceScale())),"overlay"!==o){var s=this._chartModel.priceAxisRendererOptions();s.fontSize!==this._fontSize&&(this._fontSize=s.fontSize,this._textWidthCache.reset()),this._panePriceAxisViewRenderer.setParams(this._priceAxisView.paneRenderer(),s,t,o),this._renderer=this._panePriceAxisViewRenderer,this._invalidated=!1}}}},e.prototype._priceScale=function(){return this._dataSource.priceScale()},e}()},"L/Ed":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"ToolboxType",(function(){return n})),function(e){e[e.Delete=0]="Delete"}(n||(n={}))},LAp3:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("ogJP"),o=i("5rJj"),s=function(e){function t(t,i){return e.call(this,t,i,!1,{names:["width","color","visible"]})||this}return Object(n.c)(t,e),t.prototype._iterateLevels=function(e,t){for(var i in e.levels)if(e.levels[i]&&Object(r.isSameType)(e.levels[i],t.typecheck())){var n=t.tpl();for(var o in this._map.names)this._map.names.hasOwnProperty(o)&&(n=t.fill(o,this._map.names[o],e.levels[i],n));e.levels[i]=n}return e},t}(i.n(o).a);function a(e,t){return new s(e,t)}},LdoW:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path d="M6.5 15A8.5 8.5 0 1 0 15 6.5H8.5"/><path d="M12 10L8.5 6.5 12 3"/></g></svg>'},Ltzl:function(e,t,i){"use strict";i.r(t),i.d(t,"SaveLineToolStateUndoCommand",(function(){return o}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o._newStates=[],o._model=t,o._savedStates=i.map((function(e){return e.state(!1)})),o}return Object(n.c)(t,e),t.prototype.redo=function(){this._applyState(this._newStates)},t.prototype.undo=function(){0===this._newStates.length&&this.saveNewState(),this._applyState(this._savedStates)},t.prototype.saveNewState=function(){
|
||||
var e=this,t=this._savedStates.map((function(t){return Object(r.ensureNotNull)(e._model.dataSourceForId(t.id))}));this._newStates=t.map((function(e){return e.state(!1)}))},t.prototype._applyState=function(e){for(var t=0,i=e;t<i.length;t++){var n=i[t],o=Object(r.ensureNotNull)(this._model.dataSourceForId(n.id));this._model.restoreLineToolState(o,n)}},t}(i("RDU5").UndoCommand)},LxhU:function(e,t,i){"use strict";i.r(t),i.d(t,"ResolutionKind",(function(){return n})),i.d(t,"SpecialResolutionKind",(function(){return r})),i.d(t,"Interval",(function(){return u})),i.d(t,"isHour",(function(){return d}));var n,r,o=/^(\d*)([TSHDWMR])$/,s=/^(\d+)$/;!function(e){e.Ticks="ticks",e.Seconds="seconds",e.Minutes="minutes",e.Days="days",e.Weeks="weeks",e.Months="months",e.Range="range",e.Invalid="invalid"}(n||(n={})),function(e){e.Hours="hours"}(r||(r={}));var a={};a[n.Ticks]=1e3,a[n.Seconds]=1e3,a[n.Minutes]=60*a[n.Seconds],a[n.Days]=1440*a[n.Minutes],a[n.Weeks]=7*a[n.Days];var l={T:n.Ticks,S:n.Seconds,D:n.Days,W:n.Weeks,M:n.Months,R:n.Range},c=new Set([n.Ticks,n.Seconds,n.Minutes]),u=function(){function e(e,t){this._kind=n.Invalid,this._multiplier=0,e!==n.Invalid&&t>0&&(this._kind=e,this._multiplier=t)}return e.prototype.kind=function(){return this._kind},e.prototype.multiplier=function(){return this._multiplier},e.prototype.isValid=function(){return this.kind()!==n.Invalid&&this.multiplier()>0},e.prototype.isDWM=function(){return this.isValid()&&!this.isRange()&&!this.isIntraday()&&!this.isTicks()},e.prototype.isIntraday=function(){var e=c.has(this.kind());return this.isValid()&&e},e.prototype.isSeconds=function(){return this.kind()===n.Seconds},e.prototype.isMinutes=function(){return this.kind()===n.Minutes},e.prototype.isMinuteHours=function(){return this.kind()===n.Minutes&&d(this.multiplier())},e.prototype.isDays=function(){return this.kind()===n.Days},e.prototype.isWeeks=function(){return this.kind()===n.Weeks},e.prototype.isMonths=function(){return this.kind()===n.Months},e.prototype.isRange=function(){return this.kind()===n.Range},e.prototype.isTicks=function(){return this.kind()===n.Ticks},e.prototype.isTimeBased=function(){return!this.isRange()},e.prototype.letter=function(){return this.isValid()&&this.kind()!==n.Minutes?this.kind()[0].toUpperCase():""},e.prototype.value=function(){return this.isValid()?this.kind()===n.Minutes?this.multiplier()+"":this.multiplier()+this.letter():""},e.prototype.isEqualTo=function(t){if(!(t instanceof e))throw new Error("Argument is not an Interval");return!(!this.isValid()||!t.isValid())&&(this.kind()===t.kind()&&this.multiplier()===t.multiplier())},e.prototype.inMilliseconds=function(e){if(void 0===e&&(e=Date.now()),!this.isValid()||this.isRange())return NaN;if(this.isMonths()){var t=new Date(e);return t.setUTCMonth(t.getUTCMonth()+(this.multiplier()||1)),+t-e}var i=this.multiplier();return a[this.kind()]*i},e.isEqual=function(t,i){return e.parse(t).isEqualTo(e.parse(i))},e.parse=function(t){t=(t+"").toUpperCase().split(",")[0];var i=o.exec(t)
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"description": "CL v19.031 (internal id f524baa5 @ 2021-06-14T09:55:41.738Z)",
|
||||
"description": "CL v19.032 (internal id f74f1ddb @ 2021-06-23T10:12:11.092Z)",
|
||||
"type": "module",
|
||||
"main": "charting_library.cjs.js",
|
||||
"module": "charting_library.esm.js",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user