From 7c1fb4f6e732e6b068efffb6bb6003e6c004d615 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Mon, 26 Mar 2018 16:02:29 +0300 Subject: [PATCH] commit 2018-03-26 13:02:24.543387 --- charting_library/charting_library.min.js | 2 +- ...d2e427bd8522.js => library.3a1dac88649135c71a7d.js} | 10 +++++----- ...6e307b4a0cd1.js => vendors.e76774664d65ba2c90ff.js} | 2 +- ...182c736.html => tv-chart.d3058aaa231505b75054.html} | 2 +- datafeeds/udf/dist/bundle.js | 2 +- datafeeds/udf/dist/polyfills.js | 2 +- test.html | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) rename charting_library/static/bundles/{library.21c43e3cd2e427bd8522.js => library.3a1dac88649135c71a7d.js} (99%) rename charting_library/static/bundles/{vendors.c0e9ee356e307b4a0cd1.js => vendors.e76774664d65ba2c90ff.js} (99%) rename charting_library/static/{tv-chart.82ee311dc10bb182c736.html => tv-chart.d3058aaa231505b75054.html} (93%) diff --git a/charting_library/charting_library.min.js b/charting_library/charting_library.min.js index e29e82f4..86125d36 100644 --- a/charting_library/charting_library.min.js +++ b/charting_library/charting_library.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView=t.TradingView||{})}(this,function(t){"use strict";function e(t,o){var i=n({},t);for(var s in o)"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s])?void 0!==o[s]&&(i[s]=o[s]):i[s]=e(t[s],o[s]);return i}function o(){return"1.12 (internal id 82ee311d @ 2018-03-01 03:55:41.951080)"}function i(t){window.addEventListener("DOMContentLoaded",t,!1)}var n=Object.assign||function(t){for(var e,o=arguments,i=1,n=arguments.length;i'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView=t.TradingView||{})}(this,function(t){"use strict";function e(t,o){var i=n({},t);for(var s in o)"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s])?void 0!==o[s]&&(i[s]=o[s]):i[s]=e(t[s],o[s]);return i}function o(){return"1.12 (internal id d3058aaa @ 2018-03-26 08:00:34.995422)"}function i(t){window.addEventListener("DOMContentLoaded",t,!1)}var n=Object.assign||function(t){for(var e,o=arguments,i=1,n=arguments.length;i'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/charting_library/static/bundles/library.21c43e3cd2e427bd8522.js b/charting_library/static/bundles/library.3a1dac88649135c71a7d.js similarity index 99% rename from charting_library/static/bundles/library.21c43e3cd2e427bd8522.js rename to charting_library/static/bundles/library.3a1dac88649135c71a7d.js index 5641b318..a56bc17b 100644 --- a/charting_library/static/bundles/library.21c43e3cd2e427bd8522.js +++ b/charting_library/static/bundles/library.3a1dac88649135c71a7d.js @@ -23,11 +23,11 @@ o.prototype.addRow=function(t){return $(document.createElement("tr")).appendTo(t ;this.transparencyProperty()&&(B.isHexColor(this.property().value())?(t=this.transparencyProperty().value?this.transparencyProperty().value():this.transparencyProperty(),e=E(this.property().value()),i=(100-t)/100,this.control().val(M(A(e,i)))):this.control().val(this.property().value()),this.control().change())},S.prototype.transparencyProperty=function(){return this._transparencyProperty},S.prototype.value=function(){return this._control.val()},S.prototype.setValue=function(t){this._control.val(t),this._control.change(),this._control.color&&this._control.color.fromString(t)},inherit(w,z),w.prototype.value=function(){return this._control.slider("option","value")},w.prototype.setValue=function(t){this._control.slider("option","value",t)},inherit(T,v),T.prototype.onIntervalChanged=function(){+this._intervalProperty.value()<1440?this._control.attr({disabled:!1,checked:!!this._property.value()}):this._control.attr({disabled:!0,checked:!1})},T.prototype.value=function(){return this._control.is(":disabled")?this._property.value():v.prototype.value.call(this)},T.prototype.setValue=function(t){if(!this._control.is(":disabled"))return v.prototype.setValue.call(this,t)},T.prototype.destroy=function(){this._intervalProperty.listeners().unsubscribe(this,this.onIntervalChanged),delete this._intervalProperty,v.prototype.destroy.call(this,arguments)},x.prototype._attachToControl=function(t){var e=this;this._wv.subscribe(this._setValueBinded,{callWithLast:!0}),$(this._control).on("change",function(){e.setValueToProperty(e.value())})},x.prototype.control=function(){return this._control},x.prototype.value=function(){var t=$(this._control).val();return this._transformFunction&&(t=this._transformFunction(t)),t},x.prototype.setValue=function(t){$(this._control).val(t)},x.prototype.setValueToProperty=function(t){D.setWatchedValue(this._wv,t,this._undoText)},x.prototype.watchedValue=function(){return this._wv},x.prototype.destroy=function(){this._wv.unsubscribe(this._setValueBinded)},inherit(C,x),C.prototype._attachToControl=function(t){var e=this;this._wv.subscribe(this.setValue.bind(this),{callWithLast:!0}),$(this._control).on("click",function(){e.setValueToProperty(e.value())})},C.prototype.value=function(){var t=$(this._control).attr("checked");return this._not&&(t=!t),this._transformFunction&&(t=this._transformFunction(t)),t},C.prototype.setValue=function(t){this._not&&(t=!t),$(this._control).attr("checked",!!t)},P.prototype.properties=function(){return this._properties},P.prototype.value=function(t){return this._control.slider("values",t)},P.prototype.setValue=function(t,e){this._control.slider("values",e,t.value()),this._inputsText&&$(this._inputsText[e]).val(t.value())},P.prototype.propertyChanged=function(t){this.setValue(t)},P.prototype.setValueToProperty=function(t,e){($(e).hasClass("from")||"from"===e)&&(this._undoModel.beginUndoMacro(this._undoText[0]),this._undoModel.setProperty(this._propFrom,t[0],this._undoText[0]),this._propFrom.setValue(t[0],0),this._undoModel.endUndoMacro()), ($(e).hasClass("to")||"to"===e)&&(this._undoModel.beginUndoMacro(this._undoText[1]),this._undoModel.setProperty(this._propTo,t[1],this._undoText[1]),this._propTo.setValue(t[1],1),this._undoModel.endUndoMacro())},P.prototype.destroy=function(){this._propFrom&&this._propTo&&(this._propFrom.listeners().unsubscribe(this,z.prototype.propertyChanged),this._propTo.listeners().unsubscribe(this,z.prototype.propertyChanged))},inherit(L,z),L.prototype.value=function(){var t=[];return this._control.each(function(){var e=$(this);e.is(":checked")&&t.push(e.attr("value"))}),t.join(this._separator)},L.prototype.setValue=function(t){var e=t.split(this._separator).filter(Boolean);this._control.each(function(){var t=$(this),i=-1!==e.indexOf(t.attr("value"));t.attr("checked",i),t.parents("label").toggleClass("active",i)})},e.PropertyPage=o,e.UppercaseTransformer=n,e.GreateTransformer=r,e.LessTransformer=s,e.ToIntTransformer=a,e.ToFloatTransformer=l,e.ToAsciiTransformer=c,e.ReplaceEmptyTransformer=h,e.SimpleStringBinder=u,e.FloatBinder=d,e.SessionBinder=p,e.BarTimeBinder=_,e.SymbolBinder=f,e.SimpleComboBinder=m,e.StaticContentBinder=g,e.BooleanBinder=v,e.DisabledBinder=y,e.ColorBinding=S,e.SliderBinder=w,e.CheckboxWVBinding=C,e.RangeBinder=P}).call(e,i(52))},function(t,e,i){"use strict";function o(t,e,i){this._defaultName=t;var n;i?n=e:(n=TradingView.clone(defaults(t)),e&&TradingView.merge(n,e)),r.call(this,n),this._defaultName=t,this.listeners().subscribe(this,o.prototype.onPropertyChanged),this._exclusions=[]}function n(t){o._saveDefaults=t}var r=i(52);inherit(o,r),o._saveDefaults=!1,o.prototype.addExclusion=function(t){this._exclusions.push(t)},o.prototype.restoreFactoryDefaults=function(){var t,e={};this._defaultName.startsWith("study_")&&(e=TradingView.clone(TradingView.factoryDefaults("study"))),this._defaultName.startsWith("linetool")&&(e=TradingView.clone(TradingView.factoryDefaults("linetoolvisibilities"))),t=TradingView.clone(TradingView.factoryDefaults(this._defaultName)),this._defaultName.startsWith("study_")&&t.inputs&&delete t.inputs.symbol,"linetoolicon"===this._defaultName&&(t.icon=defaults(this._defaultName).icon),~["linetooltext","linetooltextabsolute","linetoolnote","linetoolnoteabsolute","linetoolcallout","linetoolballoon","linetoolarrowmark","linetoolarrowmarkleft","linetoolarrowmarkup","linetoolarrowmarkright","linetoolarrowmarkdown","linetoolhorzline","linetoolhorzray"].indexOf(this._defaultName)&&delete t.text,this._exclusions.forEach(function(e){delete t[e]}),TradingView.merge(e,t),this.merge(e),this._defaultName.startsWith("study_")||TradingView.saveDefaults(this._defaultName,this.state(this._exclusions)),this.listeners().fire(this)},o.prototype.cleanupFactoryDefaults=function(){var t={};TradingView.saveDefaults(this._defaultName,t),this.listeners().fire(this)},o.prototype.onPropertyChanged=function(){o._saveDefaults&&!this._defaultName.startsWith("study_")&&this.saveDefaults()},o.prototype.saveDefaults=function(){TradingView.saveDefaults(this._defaultName,this.state(this._exclusions))}, o.prototype.clone=function(t){return new o(this._defaultName,this.state(),t&&t.replaceByState)},e.DefaultProperty=o,e.saveDefaultProperties=n},function(t,e,i){"use strict";var o,n,r,s,a,l;Object.defineProperty(e,"__esModule",{value:!0}),o=i(5),n=i(1),r=i(102),s=i(4),a=i(74),l=function(){function t(t,e){this._invalidated=!0,this._points=[],this._floatPoints=[],this._middlePoint=null,this._source=t,this._model=e}return t.prototype.priceToCoordinate=function(t){var e,i,o=this._source.priceScale();return null===o?null:(o.isPercent()&&null!==(e=this._source.ownerSource())&&null!==(i=e.firstValue())&&void 0!==i&&(t=o.priceRange().convertToPercent(t,i)),o.priceToCoordinate(t))},t.prototype.currentPoint=function(){var t=this._model.crossHairSource();return new n.Point(t.x,t.y)},t.prototype.anchorColor=function(){return this._source.isBeingEdited()?"#D61AD3":this._model.isDark()?"#FFFFFF":"#606060"},t.prototype.isHoveredSource=function(){return this._source===this._model.hoveredSource()},t.prototype.isSelectedSource=function(){return this._source===this._model.selectedSource()},t.prototype.isAnchorsRequired=function(){return(this.isHoveredSource()||this.isSelectedSource())&&!this._model.isSnapshot()},t.prototype.update=function(){this._invalidated=!0},t.prototype.addAnchors=function(t){if(this.isAnchorsRequired()){var e=this._points;this._model.lineBeingCreated()===this._source&&(e=e.slice(0,-1)),t.append(this.createLineAnchor({points:e}))}},t.prototype.createLineAnchor=function(t){var e=r.CheckMobile.any();return new a.LineAnchor(o.__assign({},t,{color:this.anchorColor(),backgroundColor:this._model.backgroundColor(),currentPoint:this.currentPoint(),linePointBeingEdited:this._model.linePointBeingEdited(),hittestResult:s.CHANGEPOINT,radius:(e?15:7)+(this.isSelectedSource()?1:0),strokeWidth:(e?3:1)+(this.isSelectedSource()?1:0)}))},t.prototype._updateImpl=function(){var t,e,i,o,n,r,s,a;if(this._points=[],this._floatPoints=[],t=this._source.priceScale(),e=this._model.timeScale(),t&&!t.isEmpty()&&!e.isEmpty()){for(i=this._source.points(),o=0;o=1&&(o+=8*(1+encodeURIComponent(t[i]).length),!(i-1>0&&(n=8*(1+encodeURIComponent(t[i-1]).length),o+n>e)));i--);return t.slice(i)}function s(t,e,i,o,n){var r={id:m,message:e,subSystemId:o,timestamp:+t};m+=1,i.unshift(r),void 0!==n&&i.length>n&&(i.length=n)}function a(t){var e,i=b.reduce(function(t,e){return t.concat(e)},[]);return i.sort(function(t,e){ -return t.id-e.id}),"number"==typeof t&&(i=i.slice(-t)),e=i.map(function(t){return new Date(t.timestamp).toISOString()+":"+t.subSystemId+":"+t.message.replace(/"/g,"'")}),r(e,g)}function l(t,e,i,n){var r,a;if((e!==w||n.id!==T)&&(r=new Date,t<=f.NORMAL&&s(r,e,i,n.id,n.maxCount),t<=C&&(!n.highRate||o())&&(!S||n.id.match(S)))){switch(a=r.toISOString()+":"+n.id+":"+e,t){case f.DEBUG:console.debug(a);break;case f.INFO:case f.NORMAL:n.color?console.log("%c"+a,"color: "+n.color):console.log(a);break;case f.WARNING:console.warn(a);break;case f.ERROR:console.error(a)}w=e,T=n.id,x&&clearTimeout(x),x=setTimeout(function(){w=null,T=null,x=NaN},1e3)}}function c(t,e){function i(t){return function(e){return l(t,e,o,n)}}var o,n;return void 0===e&&(e={}),o=[],b.push(o),n=Object.assign(e,{id:t}),{logDebug:i(f.DEBUG),logError:i(f.ERROR),logInfo:i(f.INFO),logNormal:i(f.NORMAL),logWarn:i(f.WARNING)}}function h(){P=!!p&&"true"===localStorage.getItem(y);var t=parseInt(p?localStorage.getItem(v)||"":"");Number.isNaN(t)&&(t=f.WARNING),n(t),L.logNormal("Init with settings - level: "+C+", high-rate: "+P)}function u(){try{p&&(localStorage.setItem(y,P+""),localStorage.setItem(v,C+""))}catch(t){L.logWarn("Cannot save logger state (level: "+C+", high-rate: "+P+") to localStorage: "+t.message)}}var d,p,_,f,m,g,v,y,b,S,w,T,x,C,P,L;Object.defineProperty(e,"__esModule",{value:!0}),d="undefined"!=typeof window?window:t,p="undefined"!=typeof localStorage,_="undefined"!=typeof TradingView?TradingView:{},function(t){t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO",t[t.NORMAL=4]="NORMAL",t[t.DEBUG=5]="DEBUG"}(f=e.LOGLEVEL||(e.LOGLEVEL={})),m=0,g=75497472,v="tv.logger.loglevel",y="tv.logger.logHighRate",b=[],S=null,w=null,T=null,x=NaN,C=f.WARNING,P=!1,e.getLogLevel=i,e.isHighRateEnabled=o,e.setLogLevel=n,e.getLogHistory=a,e.getLogger=c,L=c("logger"),e.loggingOn=d.lon=_.loggingOn=function(t,e){n(f.DEBUG),L.logNormal("Debug logging enabled"),P=!!t,S=e||null,u()},e.loggingNormal=_.loggingNormal=function(){n(f.NORMAL),L.logNormal("Logging set to normal level")},e.loggingOff=d.loff=function(){n(f.INFO),L.logInfo("Debug logging disabled")},h()}).call(e,function(){return this}())},,,function(t,e,i){function o(){this._data=null,this._hittest=new n(n.MOVEPOINT)}var n,r,s,a;i(102),n=i(4),r=i(18).LineEnd,s=i(33).distanceToSegment,a=i(69).extendAndClipLineSegment,o.prototype.setData=function(t){this._data=t},o.prototype.setHitTest=function(t){this._hittest=t},o.prototype.drawArrow=function(t,e,i,o){var n,r,s,a,l,c,h,u,d;e.subtract(t).length()<1||(n=e.subtract(t).normalized(),r=5*o,s=n.scaled(r),a=e.subtract(s),l=n.transposed(),c=3*o,h=l.scaled(c),u=a.add(h),d=a.subtract(h),CanvasEx.drawLine(i,Math.round(u.x),Math.round(u.y),e.x,e.y),CanvasEx.drawLine(i,Math.round(d.x),Math.round(d.y),e.x,e.y))},o.prototype.extendAndClipLineSegment=function(t,e){return a(t,e,this._data.width,this._data.height,this._data.extendleft,this._data.extendright)},o.prototype.drawCircle=function(t,e,i,o){o=$.extend({fillStyle:"#000000"},o),e.save(),e.fillStyle=o.fillStyle, -e.beginPath(),e.arc(t.x,t.y,i,0,2*Math.PI,!1),e.fill(),o.strokeWidth&&(e.lineWidth=o.strokeWidth,e.stroke()),e.restore()},o.prototype.draw=function(t){var e,i,o,n,r;null===this._data||this._data.points&&this._data.points.length<2||this._data.floatPoints&&this._data.floatPoints.length<2||(t.lineCap="butt",t.strokeStyle=this._data.color,t.lineWidth=this._data.linewidth,t.lineStyle=this._data.linestyle,e=this._data.floatPoints||this._data.points,i=e[0],o=e[1],this._data.overlayLineEndings?n=[$.extend(!0,{},i),$.extend(!0,{},o)]:this.drawEnds(t,[i,o]),r=this.extendAndClipLineSegment(i,o),null!==r&&this._data.linewidth>0&&CanvasEx.drawLine(t,r[0].x,r[0].y,r[1].x,r[1].y),this._data.overlayLineEndings&&this.drawEnds(t,n))},o.prototype.drawEnds=function(t,e){var i=e[0],o=e[1];switch(this._data.leftend){case r.Arrow:this.drawArrow(o,i,t,t.lineWidth);break;case r.Circle:this.drawCircle(i,t,t.lineWidth,this._data.endstyle)}switch(this._data.rightend){case r.Arrow:this.drawArrow(i,o,t,t.lineWidth);break;case r.Circle:this.drawCircle(o,t,t.lineWidth,this._data.endstyle)}},o.prototype.hitTest=function(t){var e,i,o,n,r,a;return null===this._data||this._data.points&&this._data.points.length<2?null:this._data.floatPoints&&this._data.floatPoints.length<2?null:(e=TradingView.isMobile.any()?24:3,i=this._data.floatPoints||this._data.points,o=i[0],n=i[1],r=this.extendAndClipLineSegment(o,n),null!==r&&(a=s(r[0],r[1],t),a.distance<=e)?this._hittest:null)},e.TrendLineRenderer=o},,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});!function(t){t[t.Normal=0]="Normal",t[t.Arrow=1]="Arrow",t[t.Circle=2]="Circle"}(e.LineEnd||(e.LineEnd={}))},function(t,e,i){"use strict";function o(t,e,i){var o,n,s,a,c;if(e=e||0,!r(t))return i?l.rgbaToString(l.rgba(l.parseRgb(t),l.normalizeAlphaComponent(1-e/100))):t;if(e<0&&e>100)throw Error("invalid transparency");return o=l.parseRgb(t),n=o[0],s=o[1],a=o[2],c=l.normalizeAlphaComponent(1-e/100),l.rgbaToString([n,s,a,c])}function n(t){return r(t)?t:l.rgbaToString(l.rgba(l.parseRgb(t),l.normalizeAlphaComponent(1)))}function r(t){return 0===t.indexOf("#")}function s(t){var e=l.parseRgb(t).map(function(t){return t/=255,t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)});return+(.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3)}function a(t,e){return l.rgbaToString(l.blendRgba(l.parseRgba(t),l.parseRgba(e)))}Object.defineProperty(e,"__esModule",{value:!0});var l=i(53);e.generateColor=o,e.resetTransparency=n,e.isHexColor=r,e.getLuminance=s,e.blendColors=a},function(t,e,i){(function(t){"use strict";function e(){this._listeners=[]}i(13).getLogger("Common.Delegate");e.prototype.subscribe=function(t,e,i){var o={object:t,member:e,singleshot:!!i};this._listeners.push(o)},e.prototype.unsubscribe=function(t,e){var i,o;for(i=0;i=0;--e)i=this._listeners[e],i.object===t&&this._listeners.splice(e,1)}, -e.prototype.destroy=function(){delete this._listeners},e.prototype.fire=function(){var t,e,i=this._listeners.slice();for(t=0;t=0;t--)this._listeners[t].singleshot&&this._listeners.splice(t,1)},"undefined"!=typeof window&&(window.Delegate=e),void 0!==t&&t&&t.exports&&(t.exports=e)}).call(e,i(78)(t))},function(t,e){"use strict";function i(t,e){if(!t)throw Error("Assertion failed"+(e?": "+e:""))}function o(t){if(void 0===t)throw Error("Value is undefined");return t}function n(t){if(null===t)throw Error("Value is null");return t}function r(t){return n(o(t))}Object.defineProperty(e,"__esModule",{value:!0}),e.assert=i,e.ensureDefined=o,e.ensureNotNull=n,e.ensure=r},,function(t,e,i){"use strict";function o(t){return t?(window._tv_languages||{})[t]||null:null}function n(){document.body&&document.body.dispatchEvent(new a.CustomEvent("tradingview-i18next-initialized"))}var r,s,a,l,c,h,u,d;i(1166),r=i(503),s=i(377),a=i(699),l={translate:r.translationFunction},window.__tradingviewI18nextInited||(c=window.language||null,h=o(c),c&&h||(console.error("No translation data"),c="en",h=o("en")),c&&h?(u={interpolation:{prefix:"__",suffix:"__"},keySeparator:":::",lng:c,nsSeparator:":::",resources:(d={},d[c]={translation:h},d)},s.init(u,n),l.translate=s.t.bind(s),r.addTranslationFunctionToWindow(l.translate),r.addTranslationFunctionToJQuery(l.translate)):n(),window.__tradingviewI18nextInited=!0),t.exports=l},,,,function(t,e,i){function o(t,e){this._linesMaxWidth=null,this._hittest=e||new n(n.MOVEPOINT),this._data={},this._fontSize=0,this.setData(t)}var n=i(4);o.prototype.setData=function(t){var e,i,o,n=this._data,r=this.fontStyle();this._data=t,this._fontSize=t.fontsize||t.fontSize||30,e=t.text===n.text,i=t.wordWrapWidth===n.wordWrapWidth,o=r===this.fontStyle(),e&&i&&o?(this._data.lines=n.lines,this._lines=n.lines):(this._linesMaxWidth=null,t.lines=this.wordWrap(t.text,t.wordWrapWidth),this._lines=t.lines)},function(){function t(){var t=document.createElement("canvas");t.width=0,t.height=0,e=t.getContext("2d"),t=null}var e;o.prototype.setPoints=function(t,e){this._data.points=t,this._hittest=e||new n(n.MOVEPOINT)},o.prototype._getLinesMaxWidth=function(){var i,o;if(null!==this._linesMaxWidth)return this._linesMaxWidth;if(e||t(),e.textBaseline="alphabetic",e.font=this.fontStyle(),this._data.wordWrapWidth)return this._data.wordWrapWidth;for(i=0,o=0;o0&&e.measureText(h.slice(0,3*--u-1).join("")).width>o;);if(u>0)s.push(h.slice(0,3*u-1).join("")),h.splice(0,3*u);else{if(d=h[0]+(h[1]||""),p=1===p?1:~~(o/e.measureText(d)*d.length),e.measureText(d.substr(0,p)).width<=o)for(;e.measureText(d.substr(0,p+1)).width<=o;)p++;else for(;p>1&&e.measureText(d.substr(0,--p)).width>o;);p<1&&(p=1),s.push(d.substr(0,p)),h[0]=d.substr(p),h[1]=""}if((c=e.measureText(h.join("")).width)<=o){s.push(h.join(""));break}}return s}}(),o.prototype._x=function(){return this._data.points[0].x+this._data.offsetX},o.prototype._y=function(){var t,e=this._fontSize*this._lines.length;switch(this._data.scaleY&&(e*=this._data.scaleY),t=this._data.points[0].y+this._data.offsetY+e,this._data.vertAlign){case"top":break;case"bottom":t-=e;break;case"middle":t-=e/2}return t},o.prototype.fontStyle=function(){return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._fontSize+"px "+this._data.font},o.prototype.draw=function(t){var e,i,o,n,r,s,a,l,c,h,u,d,p,_,f;if(0!==this._data.points.length){switch(e=this._x(),i=this._y(),o=this._fontSize,this._data.scaleY&&(o*=this._data.scaleY),i-=o*(this._lines.length-1),t.textBaseline="alphabetic",t.font=this.fontStyle(),this._data.horzAlign){case"left":t.textAlign="start";break;case"right":t.textAlign="end";break;case"center":t.textAlign="center"}if(t.translate(e+.5,i+.5),e=0,i=0,o=this._fontSize,this._data.scaleX&&this._data.scaleY&&(n=Math.min(this._data.scaleX,this._data.scaleY),t.scale(n,n)),r=this._getLinesMaxWidth(),s=0,this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){switch(a=e,this._data.horzAlign){case"left":break;case"right":a-=r;break;case"center":a-=r/2}l=o*this._lines.length,c=~~(o/6),this._data.backgroundHorzInflate&&(r+=2*this._data.backgroundHorzInflate,a-=this._data.backgroundHorzInflate),this._data.backgroundVertInflate&&(l+=2*this._data.backgroundVertInflate,i+=this._data.backgroundVertInflate),h={x:Math.floor(a-c),y:Math.floor(i-o),w:Math.ceil(r+2*c),h:Math.ceil(l+2*c)},h.w%2!=0&&h.w++,this._data.padding&&(h.h+=this._data.padding,s=this._data.padding),this._data.backgroundVertInflate&&(i+=this._data.backgroundVertInflate),this._data.backgroundRoundRect?(t.roundRect(h.x,h.y,h.w,h.h,this._data.backgroundRoundRect),this._data.backgroundColor&&(t.fillStyle=this._data.backgroundColor,t.fill()),this._data.borderColor&&(u=~~Math.max(o/12,1),t.strokeStyle=this._data.borderColor,t.lineWidth=u,t.stroke())):(this._data.backgroundColor&&(t.fillStyle=this._data.backgroundColor,t.fillRect(h.x,h.y,h.w,h.h)),this._data.borderColor?(u=~~Math.max(o/12,1),t.strokeStyle=this._data.borderColor, -t.lineWidth=u,t.strokeRect(h.x-u/2,h.y-u/2,h.w+u,h.h+u)):this._data.highlightBorder&&(t.strokeStyle=this._data.color,t.lineWidth=1,t.beginPath(),_=[3,1],t.dashedLineTo(h.x-.5,p=h.y-.5,d=h.x+h.w+.5,p,_),t.dashedLineTo(d,p,d,p=h.y+h.h+.5,_),t.dashedLineTo(d=h.x-.5,p,h.x+h.w+.5,p,_),t.dashedLineTo(d,h.y-.5,d,p,_),t.stroke()))}for(this._data.backgroundVertInflate&&!this._data.backgroundColor&&(i+=2*this._data.backgroundVertInflate),t.fillStyle=this._data.color,f=0;f=o-r-s&&t.x<=o+i+r+s&&t.y>=n-s&&t.y<=n+this._lines.length*this._fontSize+2*r+s?this._hittest:null)},e.TextRenderer=o},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dur=350,e.easingFunc={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},e.color={black0:"#000",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},,,,,function(t,e){"use strict";function i(t,e,i){ +return t.id-e.id}),"number"==typeof t&&(i=i.slice(-t)),e=i.map(function(t){return new Date(t.timestamp).toISOString()+":"+t.subSystemId+":"+t.message.replace(/"/g,"'")}),r(e,g)}function l(t,e,i,n){var r,a;if((e!==w||n.id!==T)&&(r=new Date,t<=f.NORMAL&&s(r,e,i,n.id,n.maxCount),t<=C&&(!n.highRate||o())&&(!S||n.id.match(S)))){switch(a=r.toISOString()+":"+n.id+":"+e,t){case f.DEBUG:console.debug(a);break;case f.INFO:case f.NORMAL:n.color?console.log("%c"+a,"color: "+n.color):console.log(a);break;case f.WARNING:console.warn(a);break;case f.ERROR:console.error(a)}w=e,T=n.id,x&&clearTimeout(x),x=setTimeout(function(){w=null,T=null,x=NaN},1e3)}}function c(t,e){function i(t){return function(e){return l(t,e,o,n)}}var o,n;return void 0===e&&(e={}),o=[],b.push(o),n=Object.assign(e,{id:t}),{logDebug:i(f.DEBUG),logError:i(f.ERROR),logInfo:i(f.INFO),logNormal:i(f.NORMAL),logWarn:i(f.WARNING)}}function h(){P=!!p&&"true"===localStorage.getItem(y);var t=parseInt(p?localStorage.getItem(v)||"":"");Number.isNaN(t)&&(t=f.WARNING),n(t),L.logNormal("Init with settings - level: "+C+", high-rate: "+P)}function u(){try{p&&(localStorage.setItem(y,P+""),localStorage.setItem(v,C+""))}catch(t){L.logWarn("Cannot save logger state (level: "+C+", high-rate: "+P+") to localStorage: "+t.message)}}var d,p,_,f,m,g,v,y,b,S,w,T,x,C,P,L;Object.defineProperty(e,"__esModule",{value:!0}),d="undefined"!=typeof window?window:t,p=!1;try{localStorage.getItem(""),p=!0}catch(t){}_="undefined"!=typeof TradingView?TradingView:{},function(t){t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO",t[t.NORMAL=4]="NORMAL",t[t.DEBUG=5]="DEBUG"}(f=e.LOGLEVEL||(e.LOGLEVEL={})),m=0,g=75497472,v="tv.logger.loglevel",y="tv.logger.logHighRate",b=[],S=null,w=null,T=null,x=NaN,C=f.WARNING,P=!1,e.getLogLevel=i,e.isHighRateEnabled=o,e.setLogLevel=n,e.getLogHistory=a,e.getLogger=c,L=c("logger"),e.loggingOn=d.lon=_.loggingOn=function(t,e){n(f.DEBUG),L.logNormal("Debug logging enabled"),P=!!t,S=e||null,u()},e.loggingNormal=_.loggingNormal=function(){n(f.NORMAL),L.logNormal("Logging set to normal level")},e.loggingOff=d.loff=function(){n(f.INFO),L.logInfo("Debug logging disabled")},h()}).call(e,function(){return this}())},,,function(t,e,i){function o(){this._data=null,this._hittest=new n(n.MOVEPOINT)}var n,r,s,a;i(102),n=i(4),r=i(18).LineEnd,s=i(33).distanceToSegment,a=i(69).extendAndClipLineSegment,o.prototype.setData=function(t){this._data=t},o.prototype.setHitTest=function(t){this._hittest=t},o.prototype.drawArrow=function(t,e,i,o){var n,r,s,a,l,c,h,u,d;e.subtract(t).length()<1||(n=e.subtract(t).normalized(),r=5*o,s=n.scaled(r),a=e.subtract(s),l=n.transposed(),c=3*o,h=l.scaled(c),u=a.add(h),d=a.subtract(h),CanvasEx.drawLine(i,Math.round(u.x),Math.round(u.y),e.x,e.y),CanvasEx.drawLine(i,Math.round(d.x),Math.round(d.y),e.x,e.y))},o.prototype.extendAndClipLineSegment=function(t,e){return a(t,e,this._data.width,this._data.height,this._data.extendleft,this._data.extendright)},o.prototype.drawCircle=function(t,e,i,o){o=$.extend({fillStyle:"#000000"},o),e.save(), +e.fillStyle=o.fillStyle,e.beginPath(),e.arc(t.x,t.y,i,0,2*Math.PI,!1),e.fill(),o.strokeWidth&&(e.lineWidth=o.strokeWidth,e.stroke()),e.restore()},o.prototype.draw=function(t){var e,i,o,n,r;null===this._data||this._data.points&&this._data.points.length<2||this._data.floatPoints&&this._data.floatPoints.length<2||(t.lineCap="butt",t.strokeStyle=this._data.color,t.lineWidth=this._data.linewidth,t.lineStyle=this._data.linestyle,e=this._data.floatPoints||this._data.points,i=e[0],o=e[1],this._data.overlayLineEndings?n=[$.extend(!0,{},i),$.extend(!0,{},o)]:this.drawEnds(t,[i,o]),r=this.extendAndClipLineSegment(i,o),null!==r&&this._data.linewidth>0&&CanvasEx.drawLine(t,r[0].x,r[0].y,r[1].x,r[1].y),this._data.overlayLineEndings&&this.drawEnds(t,n))},o.prototype.drawEnds=function(t,e){var i=e[0],o=e[1];switch(this._data.leftend){case r.Arrow:this.drawArrow(o,i,t,t.lineWidth);break;case r.Circle:this.drawCircle(i,t,t.lineWidth,this._data.endstyle)}switch(this._data.rightend){case r.Arrow:this.drawArrow(i,o,t,t.lineWidth);break;case r.Circle:this.drawCircle(o,t,t.lineWidth,this._data.endstyle)}},o.prototype.hitTest=function(t){var e,i,o,n,r,a;return null===this._data||this._data.points&&this._data.points.length<2?null:this._data.floatPoints&&this._data.floatPoints.length<2?null:(e=TradingView.isMobile.any()?24:3,i=this._data.floatPoints||this._data.points,o=i[0],n=i[1],r=this.extendAndClipLineSegment(o,n),null!==r&&(a=s(r[0],r[1],t),a.distance<=e)?this._hittest:null)},e.TrendLineRenderer=o},,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});!function(t){t[t.Normal=0]="Normal",t[t.Arrow=1]="Arrow",t[t.Circle=2]="Circle"}(e.LineEnd||(e.LineEnd={}))},function(t,e,i){"use strict";function o(t,e,i){var o,n,s,a,c;if(e=e||0,!r(t))return i?l.rgbaToString(l.rgba(l.parseRgb(t),l.normalizeAlphaComponent(1-e/100))):t;if(e<0&&e>100)throw Error("invalid transparency");return o=l.parseRgb(t),n=o[0],s=o[1],a=o[2],c=l.normalizeAlphaComponent(1-e/100),l.rgbaToString([n,s,a,c])}function n(t){return r(t)?t:l.rgbaToString(l.rgba(l.parseRgb(t),l.normalizeAlphaComponent(1)))}function r(t){return 0===t.indexOf("#")}function s(t){var e=l.parseRgb(t).map(function(t){return t/=255,t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)});return+(.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3)}function a(t,e){return l.rgbaToString(l.blendRgba(l.parseRgba(t),l.parseRgba(e)))}Object.defineProperty(e,"__esModule",{value:!0});var l=i(53);e.generateColor=o,e.resetTransparency=n,e.isHexColor=r,e.getLuminance=s,e.blendColors=a},function(t,e,i){(function(t){"use strict";function e(){this._listeners=[]}i(13).getLogger("Common.Delegate");e.prototype.subscribe=function(t,e,i){var o={object:t,member:e,singleshot:!!i};this._listeners.push(o)},e.prototype.unsubscribe=function(t,e){var i,o;for(i=0;i=0;--e)i=this._listeners[e], +i.object===t&&this._listeners.splice(e,1)},e.prototype.destroy=function(){delete this._listeners},e.prototype.fire=function(){var t,e,i=this._listeners.slice();for(t=0;t=0;t--)this._listeners[t].singleshot&&this._listeners.splice(t,1)},"undefined"!=typeof window&&(window.Delegate=e),void 0!==t&&t&&t.exports&&(t.exports=e)}).call(e,i(78)(t))},function(t,e){"use strict";function i(t,e){if(!t)throw Error("Assertion failed"+(e?": "+e:""))}function o(t){if(void 0===t)throw Error("Value is undefined");return t}function n(t){if(null===t)throw Error("Value is null");return t}function r(t){return n(o(t))}Object.defineProperty(e,"__esModule",{value:!0}),e.assert=i,e.ensureDefined=o,e.ensureNotNull=n,e.ensure=r},,function(t,e,i){"use strict";function o(t){return t?(window._tv_languages||{})[t]||null:null}function n(){document.body&&document.body.dispatchEvent(new a.CustomEvent("tradingview-i18next-initialized"))}var r,s,a,l,c,h,u,d;i(1166),r=i(503),s=i(377),a=i(699),l={translate:r.translationFunction},window.__tradingviewI18nextInited||(c=window.language||null,h=o(c),c&&h||(console.error("No translation data"),c="en",h=o("en")),c&&h?(u={interpolation:{prefix:"__",suffix:"__"},keySeparator:":::",lng:c,nsSeparator:":::",resources:(d={},d[c]={translation:h},d)},s.init(u,n),l.translate=s.t.bind(s),r.addTranslationFunctionToWindow(l.translate),r.addTranslationFunctionToJQuery(l.translate)):n(),window.__tradingviewI18nextInited=!0),t.exports=l},,,,function(t,e,i){function o(t,e){this._linesMaxWidth=null,this._hittest=e||new n(n.MOVEPOINT),this._data={},this._fontSize=0,this.setData(t)}var n=i(4);o.prototype.setData=function(t){var e,i,o,n=this._data,r=this.fontStyle();this._data=t,this._fontSize=t.fontsize||t.fontSize||30,e=t.text===n.text,i=t.wordWrapWidth===n.wordWrapWidth,o=r===this.fontStyle(),e&&i&&o?(this._data.lines=n.lines,this._lines=n.lines):(this._linesMaxWidth=null,t.lines=this.wordWrap(t.text,t.wordWrapWidth),this._lines=t.lines)},function(){function t(){var t=document.createElement("canvas");t.width=0,t.height=0,e=t.getContext("2d"),t=null}var e;o.prototype.setPoints=function(t,e){this._data.points=t,this._hittest=e||new n(n.MOVEPOINT)},o.prototype._getLinesMaxWidth=function(){var i,o;if(null!==this._linesMaxWidth)return this._linesMaxWidth;if(e||t(),e.textBaseline="alphabetic",e.font=this.fontStyle(),this._data.wordWrapWidth)return this._data.wordWrapWidth;for(i=0,o=0;o0&&e.measureText(h.slice(0,3*--u-1).join("")).width>o;);if(u>0)s.push(h.slice(0,3*u-1).join("")),h.splice(0,3*u);else{if(d=h[0]+(h[1]||""),p=1===p?1:~~(o/e.measureText(d)*d.length),e.measureText(d.substr(0,p)).width<=o)for(;e.measureText(d.substr(0,p+1)).width<=o;)p++;else for(;p>1&&e.measureText(d.substr(0,--p)).width>o;);p<1&&(p=1),s.push(d.substr(0,p)),h[0]=d.substr(p),h[1]=""}if((c=e.measureText(h.join("")).width)<=o){s.push(h.join(""));break}}return s}}(),o.prototype._x=function(){return this._data.points[0].x+this._data.offsetX},o.prototype._y=function(){var t,e=this._fontSize*this._lines.length;switch(this._data.scaleY&&(e*=this._data.scaleY),t=this._data.points[0].y+this._data.offsetY+e,this._data.vertAlign){case"top":break;case"bottom":t-=e;break;case"middle":t-=e/2}return t},o.prototype.fontStyle=function(){return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._fontSize+"px "+this._data.font},o.prototype.draw=function(t){var e,i,o,n,r,s,a,l,c,h,u,d,p,_,f;if(0!==this._data.points.length){switch(e=this._x(),i=this._y(),o=this._fontSize,this._data.scaleY&&(o*=this._data.scaleY),i-=o*(this._lines.length-1),t.textBaseline="alphabetic",t.font=this.fontStyle(),this._data.horzAlign){case"left":t.textAlign="start";break;case"right":t.textAlign="end";break;case"center":t.textAlign="center"}if(t.translate(e+.5,i+.5),e=0,i=0,o=this._fontSize,this._data.scaleX&&this._data.scaleY&&(n=Math.min(this._data.scaleX,this._data.scaleY),t.scale(n,n)),r=this._getLinesMaxWidth(),s=0,this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){switch(a=e,this._data.horzAlign){case"left":break;case"right":a-=r;break;case"center":a-=r/2}l=o*this._lines.length,c=~~(o/6),this._data.backgroundHorzInflate&&(r+=2*this._data.backgroundHorzInflate,a-=this._data.backgroundHorzInflate),this._data.backgroundVertInflate&&(l+=2*this._data.backgroundVertInflate,i+=this._data.backgroundVertInflate),h={x:Math.floor(a-c),y:Math.floor(i-o),w:Math.ceil(r+2*c),h:Math.ceil(l+2*c)},h.w%2!=0&&h.w++,this._data.padding&&(h.h+=this._data.padding,s=this._data.padding),this._data.backgroundVertInflate&&(i+=this._data.backgroundVertInflate),this._data.backgroundRoundRect?(t.roundRect(h.x,h.y,h.w,h.h,this._data.backgroundRoundRect),this._data.backgroundColor&&(t.fillStyle=this._data.backgroundColor,t.fill()),this._data.borderColor&&(u=~~Math.max(o/12,1),t.strokeStyle=this._data.borderColor,t.lineWidth=u,t.stroke())):(this._data.backgroundColor&&(t.fillStyle=this._data.backgroundColor,t.fillRect(h.x,h.y,h.w,h.h)),this._data.borderColor?(u=~~Math.max(o/12,1), +t.strokeStyle=this._data.borderColor,t.lineWidth=u,t.strokeRect(h.x-u/2,h.y-u/2,h.w+u,h.h+u)):this._data.highlightBorder&&(t.strokeStyle=this._data.color,t.lineWidth=1,t.beginPath(),_=[3,1],t.dashedLineTo(h.x-.5,p=h.y-.5,d=h.x+h.w+.5,p,_),t.dashedLineTo(d,p,d,p=h.y+h.h+.5,_),t.dashedLineTo(d=h.x-.5,p,h.x+h.w+.5,p,_),t.dashedLineTo(d,h.y-.5,d,p,_),t.stroke()))}for(this._data.backgroundVertInflate&&!this._data.backgroundColor&&(i+=2*this._data.backgroundVertInflate),t.fillStyle=this._data.color,f=0;f=o-r-s&&t.x<=o+i+r+s&&t.y>=n-s&&t.y<=n+this._lines.length*this._fontSize+2*r+s?this._hittest:null)},e.TextRenderer=o},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dur=350,e.easingFunc={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},e.color={black0:"#000",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},,,,,function(t,e){"use strict";function i(t,e,i){ var o=e.subtract(t),n=i.subtract(t),r=n.dotProduct(o)/o.dotProduct(o);return{coeff:r,distance:t.addScaled(o,r).subtract(i).length()}}function o(t,e,o){var n,r,s=i(t,e,o);return 0<=s.coeff&&s.coeff<=1?s:(n=t.subtract(o).length(),r=e.subtract(o).length(),n0)},l.isAbsent=function(t){return null===t||void 0===t},l.isExistent=function(t){return null!==t&&void 0!==t},Number.isNaN=Number.isNaN||function(t){return t!=t},l.isSameType=function(t,e){return Number.isNaN(t)||Number.isNaN(e)?Number.isNaN(t)===Number.isNaN(e):{}.toString.call(t)==={}.toString.call(e)},l.isInteger=function(t){return"number"==typeof t&&t%1==0},l.parseBool=function(t){return!0===t||"true"===t},l.isBoolean=function(t){return!0===t||!1===t},l.isString=function(t){return null!==t&&void 0!==t&&t.constructor===String},l.isInherited=function(t,e){return t===e||!(!t||!t.prototype)&&(void 0!==t.prototype.superclass&&null!==t.prototype.superclass&&(t.prototype.superclass===e||l.isInherited(t.prototype.superclass,e)))},l.TypeValidator=function(t){this.m_type=t},l.TypeValidator.prototype.check=function(t){return t.constructor===this.m_type||l.isInherited(t.constructor,this.m_type)},l.PredicateValidator=function(t){this.m_predicate=t},l.PredicateValidator.prototype.check=function(t){return this.m_predicate(t)},l.clone=function(t){var e,i,o;if(!t||"object"!=typeof t)return t;e="function"==typeof t.pop?[]:{};for(i in t)t.hasOwnProperty(i)&&(o=t[i],e[i]=o&&"object"==typeof o?l.clone(o):o);return e},l.deepEquals=function(t,e,i){var n,r,s,a,h;if(i||(i=""),t===e)return[!0,i];if(o(t)&&(t=void 0),o(e)&&(e=void 0),void 0===t&&void 0!==e)return[!1,i];if(void 0===e&&void 0!==t)return[!1,i] ;if(null===t&&null!==e)return[!1,i];if(null===e&&null!==t)return[!1,i];if("object"!=typeof t&&"object"!=typeof e)return[t===e,i];if(Array.isArray(t)&&Array.isArray(e)){if(n=t.length,r=e.length,n!==r)return[!1,i];for(s=0;sr&&(c=1*l),0===c);h++);return c}},void 0!==t&&t&&t.exports&&(t.exports={inherit:r,clone:l.clone,merge:l.merge,isNumber:e,isInteger:l.isInteger,isBoolean:l.isBoolean,isString:l.isString,isObject:h,isHashObject:u,isPromise:n,isNaN:l.isNaN,isAbsent:l.isAbsent,isExistent:l.isExistent,isSameType:l.isSameType,isArray:c,parseBool:l.parseBool,parseJSONorNot:i,deepEquals:l.deepEquals,declareClassAsPureInterface:s,requireFullInterfaceImplementation:a})}).call(e,i(78)(t))},,,function(t,e){"use strict";function i(t){this._invalidationLevel=t||i.UPDATE_CURSOR_ONLY,this._invalidatedPanes={}}i.UPDATE_CURSOR_ONLY=1,i.LIGHT_UPDATE=2,i.FULL_UPDATE=3,i.prototype.invalidatePane=function(t,e){this._invalidatedPanes[t]?this._invalidatedPanes[t]=Math.max(this._invalidatedPanes[t],e):this._invalidatedPanes[t]=e},i.prototype.invalidateAll=function(t){this._invalidationLevel=Math.max(this._invalidationLevel,t)},i.prototype.fullInvalidation=function(){return this._invalidationLevel},i.prototype.invalidateForPane=function(t){return this._invalidatedPanes[t]?Math.max(this._invalidatedPanes[t],this._invalidationLevel):this._invalidationLevel},i.prototype.merge=function(t){this.force=this.force||t.force,this._invalidationLevel=Math.max(this._invalidationLevel,t._invalidationLevel);for(var e in t._invalidatedPanes)this._invalidatedPanes[e]?this._invalidatedPanes[e]=Math.max(this._invalidatedPanes[e],t._invalidatedPanes[e]):this._invalidatedPanes[e]=t._invalidatedPanes[e]},i.prototype.exclude=function(t){this._invalidationLevel<=t&&(this._invalidationLevel=0);for(var e in this._invalidatedPanes)this._invalidatedPanes[e]<=t&&(this._invalidatedPanes[e]=0)},i.prototype.start=function(){this._timeStart=window.performance.now()},i.prototype.end=function(){this._timeEnd=window.performance.now()},t.exports=i},function(t,e,i){"use strict";var o,n;Object.defineProperty(e,"__esModule",{value:!0}),o=i(41),n=function(){function t(t){this._precision=t}return t.prototype.format=function(t){ return(void 0!==this._precision?t.toFixed(this._precision):t+"").replace(".",o.formatterOptions.decimalSign)},t.prototype.parse=function(t){var e=t.replace(o.formatterOptions.decimalSign,"."),i=parseFloat(e);return this._precision&&(i=+i.toFixed(this._precision)),i},t}(),e.NumericFormatter=n},,function(t,e,i){(function(e){"use strict";function o(t,e,i,o){this._map=$.extend({},this._map,o),e&&(e=this.unpackLevels(e)),r.call(this,t,e,i),this.updateCollectibleProperty()}var n=i(34).isSameType,r=i(11).DefaultProperty,s=i(825);inherit(o,r),o.prototype.state=function(t,i){t=t||[],t.push("__collectibleLines");var o=e.prototype.state.call(this,t);return i?o:this.packLevels(o)},o.prototype.clone=function(){var t=this.state();return this.__collectibleLines&&(t.__collectibleLines=this.__collectibleLines.state()),new o(this._defaultName,t)},o.prototype.merge=function(t){e.prototype.merge.call(this,this.unpackLevels(t)),this.updateCollectibleProperty()},o.prototype._map={prefixes:[""],range:[0,0],names:["coeff","color","visible","linestyle","linewidth"],typecheck:{pack:Object,unpack:Array}},o.prototype._packLvlTpl=function(){return[]},o.prototype._unpackLvlTpl=function(){return{}},o.prototype._packLvlFill=function(t,e,i,o){return o.push(i[e]),o},o.prototype._unpackLvlFill=function(t,e,i,o){return o[e]=i[t],o},o.prototype._iterateLevels=function(t,e){var i,o,r,s,a;for(i in this._map.prefixes)for(o=(this._map.prefixes[i]||"")+"level",r=this._map.range[0];r<=this._map.range[1];r++)if(t[o+r]&&n(t[o+r],e.typecheck())){s=e.tpl();for(a in this._map.names)s=e.fill(a,this._map.names[a],t[o+r],s);t[o+r]=s}return t},o.prototype.packLevels=function(t){return this._iterateLevels(t,{tpl:this._packLvlTpl,fill:this._packLvlFill,typecheck:this._map.typecheck.pack})},o.prototype.unpackLevels=function(t){return this._iterateLevels(t,{tpl:this._unpackLvlTpl,fill:this._unpackLvlFill,typecheck:this._map.typecheck.unpack})},o.prototype.saveDefaults=function(){TradingView.saveDefaults(this._defaultName,this.state(this._exclusions,!0))},o.prototype.updateCollectibleProperty=function(){var t,e;this.__collectibleLines&&(t=this,e=[],this.__collectibleLines._childs.forEach(function(i){var o,n=t.__collectibleLines[i].value(),r=n.split("."),s=t[r[0]];for(o=1;o16)throw new TypeError("invalid length");return 0===e?""+t:("0000000000000000"+t).slice(-e)}var n,r,s,a,l;Object.defineProperty(e,"__esModule",{value:!0}),i(23),n=i(34),r=i(13),s=r.getLogger("Chart.PriceFormatter"),e.customFormatters={dateFormatter:null,timeFormatter:null},e.formatterOptions={decimalSign:".",decimalSignFractional:"'"},a={custom:$.t("Price format is invalid."),fraction:$.t("Fraction part is invalid."), diff --git a/charting_library/static/bundles/vendors.c0e9ee356e307b4a0cd1.js b/charting_library/static/bundles/vendors.e76774664d65ba2c90ff.js similarity index 99% rename from charting_library/static/bundles/vendors.c0e9ee356e307b4a0cd1.js rename to charting_library/static/bundles/vendors.e76774664d65ba2c90ff.js index 0b76fb60..4622626c 100644 --- a/charting_library/static/bundles/vendors.c0e9ee356e307b4a0cd1.js +++ b/charting_library/static/bundles/vendors.e76774664d65ba2c90ff.js @@ -1,4 +1,4 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n,r,o=window.webpackJsonp;window.webpackJsonp=function(i,a){for(var s,u,c=0,l=[];c=0===n})}function l(e){var t=ce.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function f(e,t){return xt.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e,t){if(1===t.nodeType&&xt.hasData(e)){var n,r,o,i=xt._data(e),a=xt._data(t,i),s=i.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,o=s[n].length;r0){if("border"!==n)for(;o").appendTo(t),r=n.css("display");n.remove(),"none"!==r&&""!==r||(ct||(ct=bt.createElement("iframe"),ct.frameBorder=ct.width=ct.height=0),t.appendChild(ct),lt&&ct.createElement||(lt=(ct.contentWindow||ct.contentDocument).document,lt.write((xt.support.boxModel?"":"")+""),lt.close()),n=lt.createElement(e),lt.body.appendChild(n),r=xt.css(n,"display"),t.removeChild(ct)),ut[e]=r}return ut[e]}function D(e){return xt.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var P,A,L,I,j,R,F,U,H,Y,W,B,V,q,z,$,G,K,X,Q,J,Z,ee,te,ne,re,oe,ie,ae,se,ue,ce,le,fe,pe,de,he,me,ge,ye,ve,be,_e,we,xe,Ce,Te,ke,Ee,Se,Me,Oe,Ne,De,Pe,Ae,Le,Ie,je,Re,Fe,Ue,He,Ye,We,Be,Ve,qe,ze,$e,Ge,Ke,Xe,Qe,Je,Ze,et,tt,nt,rt,ot,it,at,st,ut,ct,lt,ft,pt,dt,ht,mt,gt,yt,vt,bt=window.document,_t=window.navigator,wt=window.location,xt=function(){function e(){if(!i.isReady){try{bt.documentElement.doScroll("left")}catch(t){return void setTimeout(e,1)}i.ready()}}var t,n,r,o,i=function(e,n){return new i.fn.init(e,n,t) },a=window.jQuery,s=window.$,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,c=/\S/,l=/^\s+/,f=/\s+$/,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,d=/^[\],:{}\s]*$/,h=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,m=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g=/(?:^|:|,)(?:\s*\[)+/g,y=/(webkit)[ \/]([\w.]+)/,v=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,_=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/gi,x=/^-ms-/,C=function(e,t){return(t+"").toUpperCase()},T=_t.userAgent,k=Object.prototype.toString,E=Object.prototype.hasOwnProperty,S=Array.prototype.push,M=Array.prototype.slice,O=String.prototype.trim,N=Array.prototype.indexOf,D={};return i.fn=i.prototype={constructor:i,init:function(e,t,n){var r,o,a,s;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!t&&bt.body)return this.context=bt,this[0]=bt.body,this.selector=e,this.length=1,this;if("string"==typeof e){if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:u.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1])return t=t instanceof i?t[0]:t,s=t?t.ownerDocument||t:bt,a=p.exec(e),a?i.isPlainObject(t)?(e=[bt.createElement(a[1])],i.fn.attr.call(e,t,!0)):e=[s.createElement(a[1])]:(a=i.buildFragment([r[1]],[s]),e=(a.cacheable?i.clone(a.fragment):a.fragment).childNodes),i.merge(this,e);if((o=bt.getElementById(r[2]))&&o.parentNode){if(o.id!==r[2])return n.find(e);this.length=1,this[0]=o}return this.context=bt,this.selector=e,this}return i.isFunction(e)?n.ready(e):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),i.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return M.call(this,0)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return i.isArray(e)?S.apply(r,e):i.merge(r,e),r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return i.each(this,e,t)},ready:function(e){return i.bindReady(),r.add(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(M.apply(this,arguments),"slice",M.call(arguments).join(","))},map:function(e){return this.pushStack(i.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:S,sort:[].sort,splice:[].splice},i.fn.init.prototype=i.fn,i.extend=i.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,c=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},u=2),"object"==typeof s||i.isFunction(s)||(s={}),c===u&&(s=this,--u);u
\ No newline at end of file +
\ No newline at end of file diff --git a/datafeeds/udf/dist/bundle.js b/datafeeds/udf/dist/bundle.js index c1912dfb..42a83a46 100644 --- a/datafeeds/udf/dist/bundle.js +++ b/datafeeds/udf/dist/bundle.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Datafeeds={})}(this,function(e){"use strict";var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};var r=!1;function s(e){if(r){var t=new Date;console.log(t.toLocaleTimeString()+"."+t.getMilliseconds()+"> "+e)}}function o(e){return void 0===e?"":"string"==typeof e?e:e.message}var i=function(){function e(e,t){this._datafeedUrl=e,this._requester=t}return e.prototype.getBars=function(e,t,r,s){var i=this,n={symbol:e.ticker||"",resolution:t,from:r,to:s};return new Promise(function(e,t){i._requester.sendRequest(i._datafeedUrl,"history",n).then(function(r){if("ok"===r.s||"no_data"===r.s){var s=[],o={noData:!1};if("no_data"===r.s)o.noData=!0,o.nextTime=r.nextTime;else for(var i=void 0!==r.v,n=void 0!==r.o,a=0;a0)){this._requestsPending=0;var t=function(t){r._requestsPending+=1,r._updateDataForSubscriber(t).then(function(){e._requestsPending-=1,s("DataPulseProvider: data for #"+t+" updated successfully, pending="+e._requestsPending)}).catch(function(r){e._requestsPending-=1,s("DataPulseProvider: data for #"+t+" updated with error="+o(r)+", pending="+e._requestsPending)})},r=this;for(var i in this._subscribers)t(i)}},e.prototype._updateDataForSubscriber=function(e){var t=this,r=this._subscribers[e],s=parseInt((Date.now()/1e3).toString()),o=s-function(e,t){var r=0;r="D"===e?t:"M"===e?31*t:"W"===e?7*t:t*parseInt(e)/1440;return 24*r*60*60}(r.resolution,10);return this._historyProvider.getBars(r.symbolInfo,r.resolution,o,s).then(function(r){t._onSubscriberDataReceived(e,r)})},e.prototype._onSubscriberDataReceived=function(e,t){if(this._subscribers.hasOwnProperty(e)){var r=t.bars;if(0!==r.length){var o=r[r.length-1],i=this._subscribers[e];if(!(null!==i.lastBarTime&&o.timei.lastBarTime){if(r.length<2)throw new Error("Not enough bars in history for proper pulse update. Need at least 2.");var n=r[r.length-2];i.listener(n)}i.lastBarTime=o.time,i.listener(o)}}}else s("DataPulseProvider: Data comes for already unsubscribed subscription #"+e)},e}();var a=function(){function e(e){this._subscribers={},this._requestsPending=0,this._quotesProvider=e,setInterval(this._updateQuotes.bind(this,1),1e4),setInterval(this._updateQuotes.bind(this,0),6e4)}return e.prototype.subscribeQuotes=function(e,t,r,o){this._subscribers[o]={symbols:e,fastSymbols:t,listener:r},s("QuotesPulseProvider: subscribed quotes with #"+o)},e.prototype.unsubscribeQuotes=function(e){delete this._subscribers[e],s("QuotesPulseProvider: unsubscribed quotes with #"+e)},e.prototype._updateQuotes=function(e){var t=this;if(!(this._requestsPending>0)){var r=function(r){i._requestsPending++;var n=i._subscribers[r];i._quotesProvider.getQuotes(1===e?n.fastSymbols:n.symbols).then(function(o){t._requestsPending--,t._subscribers.hasOwnProperty(r)&&(n.listener(o),s("QuotesPulseProvider: data for #"+r+" ("+e+") updated successfully, pending="+t._requestsPending))}).catch(function(i){t._requestsPending--,s("QuotesPulseProvider: data for #"+r+" ("+e+") updated with error="+o(i)+", pending="+t._requestsPending)})},i=this;for(var n in this._subscribers)r(n)}},e}();function u(e,t,r){var s=e[t];return Array.isArray(s)?s[r]:s}var c=function(){function e(e,t,r){this._exchangesList=["NYSE","FOREX","AMEX"],this._symbolsInfo={},this._symbolsList=[],this._datafeedUrl=e,this._datafeedSupportedResolutions=t,this._requester=r,this._readyPromise=this._init(),this._readyPromise.catch(function(e){console.error("SymbolsStorage: Cannot init, error="+e.toString())})}return e.prototype.resolveSymbol=function(e){var t=this;return this._readyPromise.then(function(){var r=t._symbolsInfo[e];return void 0===r?Promise.reject("invalid symbol"):Promise.resolve(r)})},e.prototype.searchSymbols=function(e,t,r,s){var o=this;return this._readyPromise.then(function(){var i=[],n=0===e.length;e=e.toUpperCase();for(var a=function(s){var a=o._symbolsInfo[s];if(void 0===a)return"continue";if(r.length>0&&a.type!==r)return"continue";if(t&&t.length>0&&a.exchange!==t)return"continue";var u=a.name.toUpperCase().indexOf(e),c=a.description.toUpperCase().indexOf(e);if((n||u>=0||c>=0)&&!i.some(function(e){return e.symbolInfo===a})){var l=u>=0?u:8e3+c;i.push({symbolInfo:a,weight:l})}},u=0,c=o._symbolsList;u "+e)}}function c(e){return void 0===e?"":"string"==typeof e?e:e.message}var i=function(){function e(e,t){this._datafeedUrl=e,this._requester=t}return e.prototype.getBars=function(e,t,r,s){var o=this,i={symbol:e.ticker||"",resolution:t,from:r,to:s};return new Promise(function(a,u){o._requester.sendRequest(o._datafeedUrl,"history",i).then(function(e){if("ok"===e.s||"no_data"===e.s){var t=[],r={noData:!1};if("no_data"===e.s)r.noData=!0,r.nextTime=e.nextTime;else for(var s=void 0!==e.v,o=void 0!==e.o,i=0;io.lastBarTime){if(r.length<2)throw new Error("Not enough bars in history for proper pulse update. Need at least 2.");var i=r[r.length-2];o.listener(i)}o.lastBarTime=s.time,o.listener(s)}}}else n("DataPulseProvider: Data comes for already unsubscribed subscription #"+e)},e}();var u=function(){function e(e){this._subscribers={},this._requestsPending=0,this._quotesProvider=e,setInterval(this._updateQuotes.bind(this,1),1e4),setInterval(this._updateQuotes.bind(this,0),6e4)}return e.prototype.subscribeQuotes=function(e,t,r,s){this._subscribers[s]={symbols:e,fastSymbols:t,listener:r},n("QuotesPulseProvider: subscribed quotes with #"+s)},e.prototype.unsubscribeQuotes=function(e){delete this._subscribers[e],n("QuotesPulseProvider: unsubscribed quotes with #"+e)},e.prototype._updateQuotes=function(s){var o=this;if(!(0-1};h.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+","+e:e},h.prototype.delete=function(t){delete this.map[a(t)]},h.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},h.prototype.set=function(t,e){this.map[a(t)]=u(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),f(t)},h.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},h.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),f(t)},e.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},p.call(b.prototype),p.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var s=[301,302,303,307,308];w.redirect=function(t,e){if(-1===s.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},t.Headers=h,t.Request=b,t.Response=w,t.fetch=function(t,r){return new Promise(function(n,o){var i=new b(t,r),s=new XMLHttpRequest;s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;n(new w(o,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&e.blob&&(s.responseType="blob"),i.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function h(t){this.map={},t instanceof h?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function l(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&n(t))this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!o(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=y(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var t,e,r,n=c(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=d(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function m(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function w(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:window)}(); +!function(){"use strict";!function(t){var e=setTimeout;function n(){}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function o(r,n){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var t=1===r._state?n.onFulfilled:n.onRejected;if(null!==t){var e;try{e=t(r._value)}catch(t){return void a(n.promise,t)}s(n.promise,e)}else(1===r._state?s:a)(n.promise,r._value)})):r._deferreds.push(n)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var r=t.then;if(t instanceof i)return e._state=3,e._value=t,void u(e);if("function"==typeof r)return void f((n=r,o=t,function(){n.apply(o,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){a(e,t)}var n,o}function a(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&i._immediateFn(function(){t._handled||i._unhandledRejectionFn(t._value)});for(var e=0,r=t._deferreds.length;e