Hacked By AnonymousFox

Current Path : C:/AppServ/www/financial/stacked/code/es5/indicators/
Upload File :
Current File : C:/AppServ/www/financial/stacked/code/es5/indicators/indicators.js

!/**
 * Highstock JS v12.1.2 (2025-01-09)
 * @module highcharts/indicators/indicators
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2024 Pawel Fus, Sebastian Bochan
 *
 * License: www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("highcharts"),require("highcharts").Chart,require("highcharts").SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/indicators",[["highcharts/highcharts"],["highcharts/highcharts","Chart"],["highcharts/highcharts","SeriesRegistry"]],e):"object"==typeof exports?exports["highcharts/indicators/indicators"]=e(require("highcharts"),require("highcharts").Chart,require("highcharts").SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.Chart,t.Highcharts.SeriesRegistry)}(this,function(t,e,a){return function(){"use strict";var n,i,r,o={960:function(t){t.exports=e},512:function(t){t.exports=a},944:function(e){e.exports=t}},s={};function p(t){var e=s[t];if(void 0!==e)return e.exports;var a=s[t]={exports:{}};return o[t](a,a.exports,p),a.exports}p.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return p.d(e,{a:e}),e},p.d=function(t,e){for(var a in e)p.o(e,a)&&!p.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},p.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var h={};p.d(h,{default:function(){return Y}});var l=p(944),u=p.n(l),c=p(960),f=p.n(c),d=p(512),y=p.n(d),g=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(t,e)},function(t,e){function a(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}),v=function(){return(v=Object.assign||function(t){for(var e,a=1,n=arguments.length;a<n;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},m=function(t,e,a){if(a||2==arguments.length)for(var n,i=0,r=e.length;i<r;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},x=y().seriesTypes.line,D=u().addEvent,P=u().fireEvent,O=u().error,A=u().extend,C=u().isArray,b=u().merge,k=u().pick,T=function(t,e){var a=[],n=t.pointArrayMap,i=e&&t.dataTable.modified||t.dataTable;if(!n)return t.getColumn("y",e);for(var r=n.map(function(a){return t.getColumn(a,e)}),o=function(t){var e=n.map(function(e,a){var n;return(null===(n=r[a])||void 0===n?void 0:n[t])||0});a.push(e)},s=0;s<i.rowCount;s++)o(s);return a},E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return g(e,t),e.prototype.destroy=function(){this.dataEventsToUnbind.forEach(function(t){t()}),t.prototype.destroy.apply(this,arguments)},e.prototype.getName=function(){var t=[],e=this.name;return e||((this.nameComponents||[]).forEach(function(e,a){t.push(this.options.params[e]+k(this.nameSuffixes[a],""))},this),e=(this.nameBase||this.type.toUpperCase())+(this.nameComponents?" ("+t.join(", ")+")":"")),e},e.prototype.getValues=function(t,e){var a,n,i=e.period,r=t.xData||[],o=t.yData,s=o.length,p=[],h=[],l=[],u=-1,c=0,f=0;if(!(r.length<i)){for(C(o[0])&&(u=e.index?e.index:0);c<i-1;)f+=u<0?o[c]:o[c][u],c++;for(a=c;a<s;a++)f+=u<0?o[a]:o[a][u],n=[r[a],f/i],p.push(n),h.push(n[0]),l.push(n[1]),f-=u<0?o[a-c]:o[a-c][u];return{values:p,xData:h,yData:l}}},e.prototype.init=function(e,a){var n=this;t.prototype.init.call(n,e,a);var i=D(f(),"afterLinkSeries",function(t){if(!t.isUpdating){var a=!!n.dataEventsToUnbind.length;if(!n.linkedParent)return O("Series "+n.options.linkedTo+" not found! Check `linkedTo`.",!1,e);if(!a&&(n.dataEventsToUnbind.push(D(n.linkedParent,"updatedData",function(){n.recalculateValues()})),n.calculateOn.xAxis&&n.dataEventsToUnbind.push(D(n.linkedParent.xAxis,n.calculateOn.xAxis,function(){n.recalculateValues()}))),"init"===n.calculateOn.chart)n.closestPointRange||n.recalculateValues();else if(!a)var i=D(n.chart,n.calculateOn.chart,function(){n.recalculateValues(),i()})}},{order:0});n.dataEventsToUnbind=[],n.eventsToUnbind.push(i)},e.prototype.recalculateValues=function(){var t,e,a,n,i,r=this,o=[],s=this.dataTable,p=this.points||[],h=this.dataTable.rowCount,l=!0,u=this.linkedParent.yData,c=this.linkedParent.processedYData;this.linkedParent.xData=this.linkedParent.getColumn("x"),this.linkedParent.yData=T(this.linkedParent),this.linkedParent.processedYData=T(this.linkedParent,!0);var f=this.linkedParent.options&&this.linkedParent.dataTable.rowCount&&this.getValues(this.linkedParent,this.options.params)||{values:[],xData:[],yData:[]};delete this.linkedParent.xData,this.linkedParent.yData=u,this.linkedParent.processedYData=c;var d=this.pointArrayMap||["y"],y={};if(f.yData.forEach(function(t){d.forEach(function(e,a){var n=y[e]||[];n.push(C(t)?t[a]:t),y[e]||(y[e]=n)})}),h&&!this.hasGroupedData&&this.visible&&this.points){if(this.cropped){this.xAxis&&(n=this.xAxis.min,i=this.xAxis.max);for(var g=this.cropData(s,n,i),x=m(["x"],this.pointArrayMap||["y"],!0),D=function(t){var e=x.map(function(e){return r.getColumn(e)[t]||0});o.push(e)},O=0;O<((null===(t=g.modified)||void 0===t?void 0:t.rowCount)||0);O++)D(O);var A=this.getColumn("x");e=f.xData.indexOf(A[0]),a=f.xData.indexOf(A[A.length-1]),-1===e&&a===f.xData.length-2&&o[0][0]===p[0].x&&o.shift(),this.updateData(o)}else(this.updateAllPoints||f.xData.length!==h-1&&f.xData.length!==h+1)&&(l=!1,this.updateData(f.values))}l&&(s.setColumns(v(v({},y),{x:f.xData})),this.options.data=f.values),this.calculateOn.xAxis&&this.getColumn("x",!0).length&&(this.isDirty=!0,this.redraw()),this.isDirtyData=!!this.linkedSeries.length,P(this,"updatedData")},e.prototype.processData=function(){var e=this.options.compareToMain,a=this.linkedParent;t.prototype.processData.apply(this,arguments),this.dataModify&&a&&a.dataModify&&a.dataModify.compareValue&&e&&(this.dataModify.compareValue=a.dataModify.compareValue)},e.defaultOptions=b(x.defaultOptions,{name:void 0,tooltip:{valueDecimals:4},linkedTo:void 0,compareToMain:!1,params:{index:3,period:14}}),e}(x);A(E.prototype,{calculateOn:{chart:"init"},hasDerivedData:!0,nameComponents:["period"],nameSuffixes:[],useCommonDataGrouping:!0}),y().registerSeriesType("sma",E);var M=(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function a(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}),_=y().seriesTypes.sma,w=u().correctFloat,S=u().isArray,V=u().merge,j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.accumulatePeriodPoints=function(t,e,a){for(var n=0,i=0;i<t;)n+=e<0?a[i]:a[i][e],i++;return n},e.prototype.calculateEma=function(t,e,a,n,i,r,o){var s=t[a-1],p=r<0?e[a-1]:e[a-1][r];return[s,void 0===i?o:w(p*n+i*(1-n))]},e.prototype.getValues=function(t,e){var a,n,i,r=e.period,o=t.xData,s=t.yData,p=s?s.length:0,h=2/(r+1),l=[],u=[],c=[],f=-1,d=0;if(!(p<r)){for(S(s[0])&&(f=e.index?e.index:0),d=this.accumulatePeriodPoints(r,f,s)/r,i=r;i<p+1;i++)n=this.calculateEma(o,s,i,h,a,f,d),l.push(n),u.push(n[0]),c.push(n[1]),a=n[1];return{values:l,xData:u,yData:c}}},e.defaultOptions=V(_.defaultOptions,{params:{index:3,period:9}}),e}(_);y().registerSeriesType("ema",j);var G=y().seriesTypes.sma.prototype,N=u().defined,U=u().error,L=u().merge;!function(t){var e=["bottomLine"],a=["top","bottom"],n=["top"];function i(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function r(t,e){var a=[];return(t.pointArrayMap||[]).forEach(function(t){t!==e&&a.push(i(t))}),a}function o(){var t,e=this,a=e.pointValKey,n=e.linesApiNames,o=e.areaLinesNames,s=e.points,p=e.options,h=e.graph,l={options:{gapSize:p.gapSize}},u=[],c=r(e,a),f=s.length;if(c.forEach(function(e,a){for(u[a]=[];f--;)t=s[f],u[a].push({x:t.x,plotX:t.plotX,plotY:t[e],isNull:!N(t[e])});f=s.length}),e.userOptions.fillColor&&o.length){var d=u[c.indexOf(i(o[0]))],y=1===o.length?s:u[c.indexOf(i(o[1]))],g=e.color;e.points=y,e.nextPoints=d,e.color=e.userOptions.fillColor,e.options=L(s,l),e.graph=e.area,e.fillGraph=!0,G.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=g}n.forEach(function(t,a){u[a]?(e.points=u[a],p[t]?e.options=L(p[t].styles,l):U('Error: "There is no '+t+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),e.graph=e["graph"+t],G.drawGraph.call(e),e["graph"+t]=e.graph):U('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=s,e.options=p,e.graph=h,G.drawGraph.call(e)}function s(t){var e,a=[],n=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((e=G.getGraphPath.call(this,this.nextPoints))&&e.length){e[0][0]="L",a=G.getGraphPath.call(this,t),n=e.slice(0,a.length);for(var i=n.length-1;i>=0;i--)a.push(n[i])}}else a=G.getGraphPath.apply(this,arguments);return a}function p(t){var e=[];return(this.pointArrayMap||[]).forEach(function(a){e.push(t[a])}),e}function h(){var t,e=this,a=this.pointArrayMap,n=[];n=r(this),G.translate.apply(this,arguments),this.points.forEach(function(i){a.forEach(function(a,r){t=i[a],e.dataModify&&(t=e.dataModify.modifyValue(t)),null!==t&&(i[n[r]]=e.yAxis.toPixels(t,!0))})})}t.compose=function(t){var i=t.prototype;return i.linesApiNames=i.linesApiNames||e.slice(),i.pointArrayMap=i.pointArrayMap||a.slice(),i.pointValKey=i.pointValKey||"top",i.areaLinesNames=i.areaLinesNames||n.slice(),i.drawGraph=o,i.getGraphPath=s,i.toYData=p,i.translate=h,t}}(r||(r={}));var q=r,R=u();R.MultipleLinesComposition=R.MultipleLinesComposition||q;var Y=u();return h.default}()});

Hacked By AnonymousFox1.0, Coded By AnonymousFox