Release v17.025 (from 2f0c4150)
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -566,7 +566,7 @@ for(var n=Math.floor(i*(t-1)),o=t/r*(t/r),s=[],a=0,l=0;l<t;++l){var c=Math.exp(-
|
||||
;if(this._lastType.get()!==i)Math.abs(r-t)/t>this._deviation&&this.addPivot(e,t,i);else(i===d.HIGH?t>r:t<r)&&this.updatePivot(e,t)}},p.prototype.processPivot=function(e){e.update(),this._isBarClosed&&e.isPivotFound()&&this.addPoint(e.pivotIndex(),e.currentValue(),e.pivotType())},u.zigzag=function(e,t,i){return new p(e,t,i).lastPrice()},u.zigzagbars=function(e,t,i){var r=new p(e,t,i);return-1===r.lastIndex()?NaN:r.lastIndex()-u.n(i)},f.prototype.new_sym=function(e,t,i,r,n){return this.symbol.script.add_sym(e,n,t,i,void 0,r)},f.prototype.select_sym=function(e){this.symbol=this.symbol.script.get_sym(e)},f.prototype.new_var=function(e){var t=this.vars;t.length<=this.vars_index&&t.push(new _(this.symbol));var i=t[this.vars_index++];return arguments.length>0&&i.set(e),i},f.prototype.new_unlimited_var=function(e){var t=this.vars;t.length<=this.vars_index&&t.push(new m(this.symbol));var i=t[this.vars_index++];return arguments.length>0&&i.set(e),i},f.prototype.new_ctx=function(){return this.ctx.length<=this.ctx_index&&this.ctx.push(new f(this.symbol)),this.ctx[this.ctx_index++]},f.prototype.prepare=function(e){this.ctx_index=0,this.vars_index=0;for(var t=0;t<this.vars.length;t++)this.vars[t].prepare(e);for(var i=0;i<this.ctx.length;i++)this.ctx[i].prepare(e)},f.prototype.maxAdditionalDepth=function(){for(var e=0,t=0;t<this.vars.length;t++){var i=this.vars[t].mindepth;!isNaN(i)&&i>e&&(e=i)}return e},f.prototype.stop=function(){this.symbol=null,this.vars=null},_.prototype.valueOf=function(){return this.get(0)},_.prototype.get=function(e){return isNaN(e)&&(e=0),e=e||0,this.hist?e>=this.hist.length?(console.error("not enough depth: "+this),NaN):this._get(e):(this.mindepth=u.max(this.mindepth,e),NaN)},_.prototype._get=function(e){var t=this.hist_pos-e;return t<0&&(t+=this.hist.length),this.hist[t]},_.prototype.set=function(e){this.hist&&(this.hist[this.hist_pos]=e,this.modified=!0)},_.prototype.prepare=function(e){e===this.symbol&&(e.isNewBar?(this.original=this.get(0),!this.modified&&this.hist||this.add_hist()):this.set(this.original),this.modified=!1)},_.prototype.add_hist=function(){if(!this.hist){var e=u.na(this.mindepth)?u.max_series_default_size:u.max(this.mindepth+1,1);e=Math.round(e);for(var t=new Array(e),i=0;i<e;i++)t[i]=NaN;this.hist=t,this.hist_pos=-1}this.hist_pos=Math.min(this.hist_pos+1,this.hist.length),this.hist_pos===this.hist.length&&(this.hist_pos=this.hist.length-1,this.hist.shift(),this.hist.push(NaN)),this.hist[this.hist_pos]=this.original},_.prototype.adopt=function(e,t,i){this.hist||(this.mindepth=NaN);var r=t.get(),n=e.indexOf(r);if(0!==i){var o=t.get(1);if(!u.na(o))n=n===e.indexOf(o)?-1:n}return n<0?NaN:this._get(n)},_.prototype.indexOf=function(e){if(!this.hist)return this.mindepth=NaN,-1;if(u.na(e))return-1;var t=this.hist.length,i=this.symbol.index+1,r=Math.min(t,i),o=n.upperbound_int(this.hist,e,0,r);return 0===o?-1:r-o},o(m,_),m.prototype.add_hist=function(){if(this.hist_pos=this.hist_pos+1,this.hist_pos===this.hist.length){var e=new Float64Array(2*this.hist.length);e.set(this.hist),this.hist=e}
|
||||
this.hist[this.hist_pos]=this.original},y.parseTicker=function(e){var t=e.indexOf(":");return-1===t?e:e.substr(t+1)},y.parsePeriod=function(e){var t,i=(e+="").slice(0);if(i.indexOf(",")>=0){var r=i.split(",");t=y.parsePeriod(r[1]),i=r[0]}var n=!1,o=!1,s=i[i.length-1];-1==="DWM".indexOf(s)&&("S"===s?o=!0:(n=!0,s=""));var a=parseInt(n?i:i.length>1?i.slice(0,i.length-1):1);return{resolution:s,interval:a,pureResolution:[a,s].join(""),isIntraday:n,isSeconds:o,range:t}},y.newBarBuilder=function(e,t,i){var r=y.parsePeriod(e);return l.newBarBuilder(r.interval+r.resolution,t,i)},y.newSession=function(e){return new l.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},y.prototype.set_symbolinfo=function(e){for(var t in e||console.error("WARN: symbolinfo isn't defined for "+this.tickerid),this.info=e,this.timezone=a.get_timezone(e.timezone),this.session.init(e.timezone,e.session,e.holidays,e.corrections),this.other_sessions)this.other_sessions.hasOwnProperty(t)&&this.other_sessions[t].init(e.timezone,e.session,e.holidays,e.corrections)},y.prototype.get_session=function(e){if(!e)return this.session;var t=this.other_sessions[e];return t||(t=new l.SessionInfo("Etc/UTC","24x7"),this.other_sessions[e]=t),t},y.prototype.isdwm=function(){return""!==this.resolution&&"S"!==this.resolution},y.prototype.enable_dwm_aligning=function(e,t){this.dwm_aligner=y.newBarBuilder(this.period,e,t)},y.prototype.bartime=function(e,t){var i=this.time;if(e){var r=e;t&&(r+=t);var n=this.bb_cache[r];if(!n){var o=this.get_session(t);n=y.newBarBuilder(e,o),this.bb_cache[r]=n}i=n.alignTime(i)}if(!this.isdwm()||isNaN(i))return i;var s=a.utc_to_cal(this.timezone,i);return this.session.spec.correctTradingDay(s),a.cal_to_utc(this.timezone,s)},y.prototype.lastbar=function(e){if(!isNaN(e.time)){var t=e.time;this.dwm_aligner&&(this.dwm_aligner.moveTo(t),t=this.dwm_aligner.startOfBar(0));var i=this.time!==t;i&&this.index>=0&&!this.isBarClosed&&(this.isNewBar=!1,this.isBarClosed=!0,this.script.calc(this)),this.time=t,this.open=e.open,this.high=e.high,this.low=e.low,this.close=e.close,this.volume=e.volume,this.updatetime=e.updatetime,this.isNewBar=i,this.isBarClosed=e.isBarClosed,this.isLastBar=e.isLastBar,this.isNewBar&&this.index++,this.script.calc(this)}},g.prototype.calc=function(e){var t=this.ctx,i=this.body;t.prepare(e);var r=i.main(t,this.inputCallback),n=this;this.out&&r&&(!isNaN(t.symbol.time)||r.nonseries)&&(r.nonseries?("projection"===r.type&&(r.projectionTime=t.symbol.time),this.nonseriesOut(t.symbol,r)):r.bars?r.bars.forEach((function(e){n.out(t.symbol,e)})):this.out(t.symbol,r))},g.prototype.init=function(){var e=this.ctx,t=this.body;t.init&&t.init(e,this.inputCallback),t.main(e,this.inputCallback)},g.prototype.add_sym=function(e,t,i,r,n,o){var s=this.runner.add_sym(e,t,i,r,this,n,o);return this.symbols.push(s),s.isdwm()&&this.symbols.length>1&&s.enable_dwm_aligning(this.symbols[0].session,s.session),s},g.prototype.maxAdditionalDepth=function(){return this.ctx.maxAdditionalDepth()},g.prototype.stop=function(){this.symbols=null,this.ctx.stop(),
|
||||
this.ctx=null},g.prototype.get_sym=function(e){return this.symbols[e]},v.prototype.add_sym=function(e,t,i,r,n,o,s){var a=new y(e,t,i,r,n,o,s);return this.symbols.push(a),a},v.prototype.get_sym=function(e){return this.symbols[e]},v.prototype.out=function(e,t){if(this.nonseriesUpdate){var i=Object.assign({},this.nonseriesUpdate);t.splice(0,0,e.time),i.lastBar=t,this.host.nonseriesOut(e,i)}else this.host.out(e,t)},v.prototype.start=function(){var e=this.host;this._script=new g(e.tickerid,e.currencyCode,e.period,e.periodBase||e.period,e.periodForInitialRange,this,e.body,this.out.bind(this),e.input,e.symbolInfo.minmov/e.symbolInfo.pricescale,e.nonseriesOut);var t=this,i=[],r=this.symbols,n=(e.additionalBarsCount||0)+t._script.maxAdditionalDepth();function o(r,o){var s=v.feed.subscribe(r.tickerid,r.currencyCode,r.period,r.periodBase,r.periodForInitialRange,(function(i){"series"===(i.nonseries?"nonseries":"series")?t.update(o,i):i.lastBar?(t.nonseriesUpdate=i,i.lastBar.isLastBar=!0,t.symbols[0].lastbar(i.lastBar),t.nonseriesUpdate=null):e.nonseriesOut(r,i)}),e.onErrorCallback,e.symbolInfo,e.sessionId,e.rangeExtension,n);i.push(s)}for(var s=0;s<r.length;s++)o(r[s],s);this.subscription=i},v.prototype.stop=function(){var e=this.subscription;if(e||this._script){for(var t=0;t<e.length;t++)v.feed.unsubscribe(e[t]);this.subscription=null,this._script.stop(),this._script=null,this.symbols=null}else console.warn("Recurring script engine stop happened.")},v.prototype.update=function(e,t){if(t){var i=this.symbols[e];if(this.isRecalculated){var r=t.bar(t.count()-1);r.isBarClosed=t.isLastBarClosed(),r.isLastBar=!0,i.lastbar(r)}else this.barsets[e]||(this.barsets[e]=t,i.set_symbolinfo(t.symbolinfo()),this.recalc())}else console.error("Unexpected barset = null")},v.prototype.recalc=function(){for(var e=this.symbols,t=0;t<e.length;t++)if(!this.barsets[t])return;for(var i=e.length-1;i>=0;i--)for(var r=e[i],n=this.barsets[i],o=n.count(),s=0;s<o;s++){var a=n.bar(s);a.isLastBar=s===o-1,a.isBarClosed=!a.isLastBar||n.isLastBarClosed(),r.lastbar(a)}this.isRecalculated=!0,this.barsets[0]&&this.barsets[0].endOfData&&this.host.setNoMoreData(),this.host.recalc(this,{endOfData:this.barsets[0].endOfData,nextTime:this.barsets[0].nextTime})},v.feed={subscribe:function(e,t,i,r){console.error("must be initialized with setupFeed")},unsubscribe:function(e){console.error("must be initialized with setupFeed")}},b.prototype.stop=function(){this.runner.stop()},S.prototype.symbolinfo=function(){return this.info},S.prototype.isLastBarClosed=function(){return this.isBarClosed},S.prototype.setLastBarClosed=function(e){this.isBarClosed=e},S.prototype.bar=function(e){return this.bars[e]},S.prototype.count=function(){return this.bars.length},S.prototype.add=function(e,t){var i=e,r=this.bars,n=r.length,o=i.time,s=0===n?NaN:r[n-1].time;0===n||s<o?r.push(i):s===o?r[n-1]=i:console.error("time order violation, prev: "+new Date(s).toUTCString()+", cur: "+new Date(o).toUTCString()),this.isBarClosed=!!t},w.prototype.init=function(e){
|
||||
this.bb=y.newBarBuilder(this.period,e.symbol.session),this.bbEmptyBars=this.generateEmptyBars?y.newBarBuilder(this.period,e.symbol.session):void 0},w.prototype.extrapolate=function(e,t){return isNaN(e)||isNaN(t)?void 0:c(this.bbEmptyBars,e,t,Number.MAX_SAFE_INTEGER,!0).times},w.prototype.main=function(e){var t=e.symbol.time,i=this.bb.alignTime(t),r=e.new_var(i),n=u.na(i),o=r.get(1),s=e.symbol.isNewBar,a=e.new_var(),l=e.new_var(),c=e.new_var(),h=e.new_var(),d=a.get(1),p=l.get(1),f=c.get(1),_=h.get(1),m=n?NaN:s?u.open(e):d,y=n?NaN:s?u.high(e):u.max(u.high(e),p),g=n?NaN:s?u.low(e):u.min(u.low(e),f),v=n?NaN:u.close(e),b=n?NaN:s?u.volume(e):u.volume(e)+_,S=n?NaN:t,w=e.symbol.isBarClosed&&this.bb.isLastBar(0,t),P=this.generateEmptyBars&&s?this.extrapolate(o,i):void 0,C=e.new_var(u.close(e)).get(1),x=P instanceof Array?C:NaN;return a.set(m),l.set(y),c.set(g),h.set(b),[i,m,y,g,v,b,S,w,P,x]},P.prototype.main=function(e){return[u.open(e),u.high(e),u.low(e),u.close(e),u.volume(e),u.updatetime(e)]},{Std:u,Series:_,Symbol:y,SymbolInfo:function(e,t){this.timezone=e||"America/New_York",this.session=t||"0000-0000"},StudyEngine:b,BarSet:S,OHLCV:P,BarBuilder:w,setupFeed:function(e){v.feed=e}}}();e.exports=a}).call(this,i("yLpj"))},ocrj:function(e,t,i){"use strict";i.r(t),i.d(t,"RemoveSourcesCommand",(function(){return h}));var r=i("mrSG"),n=i("Eyy1"),o=i("RDU5"),s=i("CW80"),a=i("uOxu"),l=i("pQ+n"),c=(i("GVHu"),i("jpZi")),u=Object(a.getLogger)("Chart.RemoveSourcesCommand"),h=function(e){function t(t,i,r){var n=e.call(this,r)||this;return n._excludeLineToolsUndoCommands=[],n._chartModel=t,n._sourceIds=Object(l.a)(t,i).map((function(e){return e.id()})),n._sourceStates=[],n._paneIndexes=[],n._priceScalePositionIds=[],n._paneStates=[],n._restorePanes=[],n}return Object(r.__extends)(t,e),t.prototype.removedIds=function(){return this._sourceIds},t.prototype.redo=function(){var e=this,t=(this._chartModel.panes().length,this._sourceIds.map((function(t){return Object(n.ensureNotNull)(e._chartModel.dataSourceForId(t))})));this._sourceStates=t.map((function(e){return Object(n.ensureNotNull)(e.state(!1))}));var i=t.map((function(t){return Object(n.ensureNotNull)(e._chartModel.paneForSource(t))}));this._paneIndexes=i.map((function(t){return e._chartModel.panes().indexOf(t)}));var r=this._chartModel.lineToolsGroupModel(),o=new Map;t.forEach((function(e){if(Object(s.isLineTool)(e)){var t=r.groupForLineTool(e);if(null!==t){var i=o.get(t)||[];i.push(e),o.set(t,i)}}})),o.forEach((function(t,i){var r=new c.a(e._chartModel,i,t);r.redo(),e._excludeLineToolsUndoCommands.push(r)})),this._priceScalePositionIds=t.map((function(e,t){if(Object(s.isLineTool)(e))return null;var r=Object(n.ensureNotNull)(e.priceScale()),o=i[t].priceScalePosition(r);return{id:r.id(),position:o,priceScaleIndex:i[t].priceScaleIndex(r,o)}}));var a=new Set;t.forEach((function(t,i){Object(s.isLineTool)(t)||a.add(e._paneIndexes[i])})),this._paneStates=t.map((function(t,r){var n=e._paneIndexes[r];return a.has(n)?i[r].state():null})),this._restorePanes=t.map((function(t){
|
||||
this.bb=y.newBarBuilder(this.period,e.symbol.session),this.bbEmptyBars=this.generateEmptyBars?y.newBarBuilder(this.period,e.symbol.session):void 0},w.prototype.extrapolate=function(e,t){return isNaN(e)||isNaN(t)?void 0:c(this.bbEmptyBars,e,t,Number.MAX_SAFE_INTEGER,!0).times},w.prototype.main=function(e){var t=e.symbol.time,i=this.bb.alignTime(t),r=e.new_var(i),n=u.na(i),o=r.get(1),s=u.na(o)?1:u.neq(i,o),a=e.new_var(),l=e.new_var(),c=e.new_var(),h=e.new_var(),d=a.get(1),p=l.get(1),f=c.get(1),_=h.get(1),m=n?NaN:s?u.open(e):d,y=n?NaN:s?u.high(e):u.max(u.high(e),p),g=n?NaN:s?u.low(e):u.min(u.low(e),f),v=n?NaN:u.close(e),b=n?NaN:s?u.volume(e):u.volume(e)+_,S=n?NaN:t,w=e.symbol.isBarClosed&&this.bb.isLastBar(0,t),P=this.generateEmptyBars&&s?this.extrapolate(o,i):void 0,C=e.new_var(u.close(e)).get(1),x=P instanceof Array?C:NaN;return a.set(m),l.set(y),c.set(g),h.set(b),[i,m,y,g,v,b,S,w,P,x]},P.prototype.main=function(e){return[u.open(e),u.high(e),u.low(e),u.close(e),u.volume(e),u.updatetime(e)]},{Std:u,Series:_,Symbol:y,SymbolInfo:function(e,t){this.timezone=e||"America/New_York",this.session=t||"0000-0000"},StudyEngine:b,BarSet:S,OHLCV:P,BarBuilder:w,setupFeed:function(e){v.feed=e}}}();e.exports=a}).call(this,i("yLpj"))},ocrj:function(e,t,i){"use strict";i.r(t),i.d(t,"RemoveSourcesCommand",(function(){return h}));var r=i("mrSG"),n=i("Eyy1"),o=i("RDU5"),s=i("CW80"),a=i("uOxu"),l=i("pQ+n"),c=(i("GVHu"),i("jpZi")),u=Object(a.getLogger)("Chart.RemoveSourcesCommand"),h=function(e){function t(t,i,r){var n=e.call(this,r)||this;return n._excludeLineToolsUndoCommands=[],n._chartModel=t,n._sourceIds=Object(l.a)(t,i).map((function(e){return e.id()})),n._sourceStates=[],n._paneIndexes=[],n._priceScalePositionIds=[],n._paneStates=[],n._restorePanes=[],n}return Object(r.__extends)(t,e),t.prototype.removedIds=function(){return this._sourceIds},t.prototype.redo=function(){var e=this,t=(this._chartModel.panes().length,this._sourceIds.map((function(t){return Object(n.ensureNotNull)(e._chartModel.dataSourceForId(t))})));this._sourceStates=t.map((function(e){return Object(n.ensureNotNull)(e.state(!1))}));var i=t.map((function(t){return Object(n.ensureNotNull)(e._chartModel.paneForSource(t))}));this._paneIndexes=i.map((function(t){return e._chartModel.panes().indexOf(t)}));var r=this._chartModel.lineToolsGroupModel(),o=new Map;t.forEach((function(e){if(Object(s.isLineTool)(e)){var t=r.groupForLineTool(e);if(null!==t){var i=o.get(t)||[];i.push(e),o.set(t,i)}}})),o.forEach((function(t,i){var r=new c.a(e._chartModel,i,t);r.redo(),e._excludeLineToolsUndoCommands.push(r)})),this._priceScalePositionIds=t.map((function(e,t){if(Object(s.isLineTool)(e))return null;var r=Object(n.ensureNotNull)(e.priceScale()),o=i[t].priceScalePosition(r);return{id:r.id(),position:o,priceScaleIndex:i[t].priceScaleIndex(r,o)}}));var a=new Set;t.forEach((function(t,i){Object(s.isLineTool)(t)||a.add(e._paneIndexes[i])})),this._paneStates=t.map((function(t,r){var n=e._paneIndexes[r];return a.has(n)?i[r].state():null})),this._restorePanes=t.map((function(t){
|
||||
return e._chartModel.removeSource(t)}))},t.prototype.undo=function(){for(var e=this,t=[],i=this._sourceStates.length-1;i>=0;i--){var r=this._chartModel.restoreSource(this._restorePanes[i],this._paneIndexes[i],this._paneStates[i],this._sourceStates[i],this._priceScalePositionIds[i]);t.push(r)}t.some((function(i,r){return i.id()!==e._sourceIds[t.length-r-1]}))&&u.logError("Source was restored improperly - source ids does not match"),this._excludeLineToolsUndoCommands.forEach((function(e){return e.undo()}))},t}(o.UndoCommand)},odCa:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("fgLi").DataSource,o=i("tc+8"),s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=i("jTis").CalloutConsts,c=window.t("Callout");function u(e,t){this._constructor="LineToolCallout";var n=t||u.createProperties();r.call(this,e,n),this._barOffset=0,this._timeScale=e.timeScale(),i.e("lt-pane-views").then(function(e){var t=i("B4Hi").CalloutPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(u,r),u.prototype.pointsCount=function(){return 2},u.prototype.translatedType=function(){return c},u.prototype.name=function(){return"Callout"},u.prototype.correctPoints=function(e){var t=this._currentMovingPoint.index-this._startMovingPoint.index,i=this._currentMovingPoint.price-this._startMovingPoint.price,r=e[1];r.index+=t,r.price+=i,e[1]=r},u.prototype.addPoint=function(e){var t=r.prototype.addPoint.call(this,e);return t&&this._calculateBarOffset(),t},u.prototype._calculateBarOffset=function(){this.points().length>1&&(this._barOffset=this.points()[1].index-this.points()[0].index)},u.prototype.setLastPoint=function(e){r.prototype.setLastPoint.call(this,e),2===this.points().length&&this._calculateBarOffset()},u.prototype.setPoint=function(e,t){switch(e){case 0:r.prototype.setPoint.call(this,e,t),this._calculateBarOffset();break;case 1:var i=this.properties();if(!i.wordWrapWidth)return;var n=this._points,o=this._dragStartLeftEdgeIndex,s=Math.round((t.index-o)/2);if(isFinite(o)&&isFinite(s)){n[1]={index:o+s,price:n[1].price},this._calculateBarOffset(),this.normalizePoints();var a=this._timeScale.indexToCoordinate(o+2*s)-this._timeScale.indexToCoordinate(o)-l.RoundRadius-l.TextMargins;if(!isFinite(a))return;i.wordWrapWidth.setValue(Math.max(l.MinWidth,a));break}n[1]=t,this._calculateBarOffset(),this.normalizePoints()}},u.prototype.startDragPoint=function(e,t){var i=this.properties();1===e&&i.wordWrap&&i.wordWrap.value()&&(this._dragStartLeftEdgeIndex=2*this.points()[1].index-t.index)},u.prototype.move=function(e,t,i){r.prototype.move.call(this,e,t,i),this._calculateBarOffset()},u.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.barOffset=this._barOffset,t},u.prototype.restoreData=function(e){e.barOffset?this._barOffset=e.barOffset:this._calculateBarOffset(),this._calculatePoint2()},u.prototype.setPriceScale=function(e){n.prototype.setPriceScale.call(this,e),e&&e.priceRange()&&this._calculatePoint2()},u.prototype.template=function(){var e=r.prototype.template.call(this)
|
||||
;return e.text=this.properties().childs().text.value(),e},u.prototype._applyTemplateImpl=function(e){r.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},u.prototype._calculatePoint2=function(){if(!(this._model.lineBeingEdited()===this||this._model.sourcesBeingMoved().includes(this)||this._points.length<2)){var e=this.points()[0],t=this.points()[1];this._points[1]={price:t.price,index:e.index+this._barOffset}}},u.prototype.getStylesPropertyPage=function(){return a.LineToolCalloutStylesPropertyPage},u.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("xhf0").CalloutDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u.createProperties=function(e){var t=new s("linetoolcallout",e);return u._configureProperties(t),t},u._configureProperties=function(e){r._configureProperties(e),e.hasChild("text")||e.addChild("text",new o(window.t("Text"))),e.addExclusion("text")},t.LineToolCallout=u},oiZD:function(e,t,i){"use strict";i.r(t);var r=i("hY0g"),n=i.n(r);i.d(t,"watchedTheme",(function(){return o})),i.d(t,"setTheme",(function(){return s}));var o=new n.a;function s(e){o.setValue(e)}o.subscribe((function(e){!function(e,t){void 0===t&&(t=window);for(var i="theme-"+e,r=t.document.documentElement.classList,n=0,o=Array.from(r);n<o.length;n++){var s=o[n];s.startsWith("theme-")&&s!==i&&r.remove(s)}r.add(i)}(e,window)}))},okVO:function(e,t,i){"use strict";i.r(t),i.d(t,"SyncModel",(function(){return s}));var r=i("IiTo"),n=i("IDnv"),o=0,s=function(){function e(e,t){this._extrapolatedData=[],this._modelId=o++,this._builderCache=null,this._resolution=t,this._symbolInfo=e,this._valid=Boolean(e.timezone)&&Boolean(e.session),this._session=new r.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)}return e.prototype.getSymbolInfo=function(){return this._symbolInfo},e.prototype.getSession=function(){return this._session},e.prototype.getResolution=function(){return this._resolution},e.prototype.uniqueId=function(){return this._modelId},e.prototype.distance=function(e,t){if(!this.isValid())return{success:!1};var i=this._extrapolatedData.length,r=0!==i?this._extrapolatedData[0]:null,o=null!==r?this._extrapolatedData[i-1]:null;if(1e3*e!==r&&(this._extrapolatedData=[1e3*e],r=null,o=null),null===r||null!==o&&1e3*t>o){var s=Object(n.extrapolateBarsFrontToTime)(this._barBuilder(),o||1e3*e,1e3*t,2e3,!0);this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length}if((o=this._extrapolatedData[i-1])<1e3*t)return{success:!1};var a=this._extrapolatedData.indexOf(1e3*t);return-1===a?{success:!1}:{success:!0,result:a}},e.prototype.projectTime=function(e,t){if(!this.isValid())return e;var i=this._extrapolatedData.length,r=i>0?this._extrapolatedData[0]:null,o=null!==r?this._extrapolatedData[i-1]:null;if(1e3*e!==r&&(this._extrapolatedData=[1e3*e],r=null,o=null),null===r||t>=i){var s=Object(n.extrapolateBarsFrontByCount)(this._barBuilder(),o||1e3*e,t-i+1,!0)
|
||||
;this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length}return i<t?e:this._extrapolatedData[t]/1e3},e.prototype.isValid=function(){return this._valid},e.prototype._barBuilder=function(){return null===this._builderCache&&(this._builderCache=Object(r.newBarBuilder)(this._resolution,this._session,this._session)),this._builderCache},e}()},onDC:function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("Eyy1"),o=i("7MZv"),s=i("4O8T"),a=i.n(s),l=i("uOxu"),c=window.t("Move All Scales To Left"),u=window.t("Move All Scales To Right"),h=Object(l.getLogger)("Chart.MergeAllScales");var d=i("RDU5"),p=function(e){function t(t,i,r,n,o,s){var a=e.call(this,s)||this;return a._model=t,a._paneIndex=t.panes().indexOf(i),a._targetPosition=n,a._targetIndex=o,a._scaleId=r.id(),a._sourcePosition=i.priceScalePosition(r),"overlay"!==a._sourcePosition&&(a._sourceIndex=i.priceScaleIndex(r,a._sourcePosition)),a}return Object(r.__extends)(t,e),t.prototype.redo=function(){var e=this._model.panes()[this._paneIndex],t=Object(n.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._targetPosition,this._targetIndex),this._model.fullUpdate()},t.prototype.undo=function(){var e=this._model.panes()[this._paneIndex],t=Object(n.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._sourcePosition,this._sourceIndex),this._model.fullUpdate()},t}(d.UndoCommand),f=i("CW80"),_=function(e){function t(t,i,r,n){var o=e.call(this,n)||this;return o._createdIds=[],o._model=t,o._withoutShift=r,o._origStates=i.map((function(e){return e.state(!0)})),o}return Object(r.__extends)(t,e),t.prototype.redo=function(){var e=this,t=this._origStates.map((function(t,i){var r=Object(n.ensureNotNull)(e._model.dataSourceForId(t.id)),o=0===e._createdIds.length?void 0:Object(n.ensureDefined)(e._createdIds[i]),s=Object(f.cloneLineTool)(e._model,r,!e._withoutShift,o),a=Object(n.ensureNotNull)(r.priceScale());return Object(n.ensureNotNull)(e._model.paneForSource(r)).addDataSource(s,a,!1),e._model.updateSource(s),s}));0===this._createdIds.length&&(this._createdIds=t.map((function(e){return e.id()}))),this._model.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e=this;this._createdIds.forEach((function(t){var i=Object(n.ensureNotNull)(e._model.dataSourceForId(t));e._model.removeSource(i)}))},t.prototype.newIds=function(){return this._createdIds},t}(d.UndoCommand),m=i("ocrj"),y=i("jpZi"),g=i("Ltzl"),v=i("HGup"),b=i("jRfx"),S=i("s1Gx"),w=function(e){function t(t,i,r,n,o){void 0===o&&(o=!0);var s=e.call(this,"Create line "+r,!1)||this;return s._lineId=null,s._lineState=null,s._model=t,s._paneIndex=t.panes().indexOf(i),s._lineTool=r,s._ownerSourceId=n.id(),s._needCopyToOtherCharts=o,s}return Object(r.__extends)(t,e),t.prototype.startCreatingLine=function(e,t,i){var r=this._model.panes()[this._paneIndex],n=this._model.dataSourceForId(this._ownerSourceId),o=this._model.createLineTool(r,e,this._lineTool,t,i,n);return this._lineId=o.id(),!this._model.lineBeingCreated()},
|
||||
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 v17.024 (internal id cbd3ae28 @ 2020-11-11T12:45:30.675Z)",
|
||||
"description": "CL v17.025 (internal id 2f0c4150 @ 2020-11-19T09:50:09.264Z)",
|
||||
"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