ag-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
1 lines • 774 kB
JavaScript
var l0=Object.defineProperty,c0=Object.getOwnPropertyDescriptor,p=(t,e,i,o)=>{for(var s=o>1?void 0:o?c0(e,i):e,a=t.length-1,n;a>=0;a--)(n=t[a])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&l0(e,i,s),s};import{AgCharts as Tl,VERSION as h0,_Scene as p0,_Theme as d0,_Util as u0,setupCommunityModules as g0}from"ag-charts-community";var f0=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(t,e){let i=t[0],o=t[1],s=t[2],a=t[3];i=this.ff(i,o,s,a,e[0],7,-680876936),a=this.ff(a,i,o,s,e[1],12,-389564586),s=this.ff(s,a,i,o,e[2],17,606105819),o=this.ff(o,s,a,i,e[3],22,-1044525330),i=this.ff(i,o,s,a,e[4],7,-176418897),a=this.ff(a,i,o,s,e[5],12,1200080426),s=this.ff(s,a,i,o,e[6],17,-1473231341),o=this.ff(o,s,a,i,e[7],22,-45705983),i=this.ff(i,o,s,a,e[8],7,1770035416),a=this.ff(a,i,o,s,e[9],12,-1958414417),s=this.ff(s,a,i,o,e[10],17,-42063),o=this.ff(o,s,a,i,e[11],22,-1990404162),i=this.ff(i,o,s,a,e[12],7,1804603682),a=this.ff(a,i,o,s,e[13],12,-40341101),s=this.ff(s,a,i,o,e[14],17,-1502002290),o=this.ff(o,s,a,i,e[15],22,1236535329),i=this.gg(i,o,s,a,e[1],5,-165796510),a=this.gg(a,i,o,s,e[6],9,-1069501632),s=this.gg(s,a,i,o,e[11],14,643717713),o=this.gg(o,s,a,i,e[0],20,-373897302),i=this.gg(i,o,s,a,e[5],5,-701558691),a=this.gg(a,i,o,s,e[10],9,38016083),s=this.gg(s,a,i,o,e[15],14,-660478335),o=this.gg(o,s,a,i,e[4],20,-405537848),i=this.gg(i,o,s,a,e[9],5,568446438),a=this.gg(a,i,o,s,e[14],9,-1019803690),s=this.gg(s,a,i,o,e[3],14,-187363961),o=this.gg(o,s,a,i,e[8],20,1163531501),i=this.gg(i,o,s,a,e[13],5,-1444681467),a=this.gg(a,i,o,s,e[2],9,-51403784),s=this.gg(s,a,i,o,e[7],14,1735328473),o=this.gg(o,s,a,i,e[12],20,-1926607734),i=this.hh(i,o,s,a,e[5],4,-378558),a=this.hh(a,i,o,s,e[8],11,-2022574463),s=this.hh(s,a,i,o,e[11],16,1839030562),o=this.hh(o,s,a,i,e[14],23,-35309556),i=this.hh(i,o,s,a,e[1],4,-1530992060),a=this.hh(a,i,o,s,e[4],11,1272893353),s=this.hh(s,a,i,o,e[7],16,-155497632),o=this.hh(o,s,a,i,e[10],23,-1094730640),i=this.hh(i,o,s,a,e[13],4,681279174),a=this.hh(a,i,o,s,e[0],11,-358537222),s=this.hh(s,a,i,o,e[3],16,-722521979),o=this.hh(o,s,a,i,e[6],23,76029189),i=this.hh(i,o,s,a,e[9],4,-640364487),a=this.hh(a,i,o,s,e[12],11,-421815835),s=this.hh(s,a,i,o,e[15],16,530742520),o=this.hh(o,s,a,i,e[2],23,-995338651),i=this.ii(i,o,s,a,e[0],6,-198630844),a=this.ii(a,i,o,s,e[7],10,1126891415),s=this.ii(s,a,i,o,e[14],15,-1416354905),o=this.ii(o,s,a,i,e[5],21,-57434055),i=this.ii(i,o,s,a,e[12],6,1700485571),a=this.ii(a,i,o,s,e[3],10,-1894986606),s=this.ii(s,a,i,o,e[10],15,-1051523),o=this.ii(o,s,a,i,e[1],21,-2054922799),i=this.ii(i,o,s,a,e[8],6,1873313359),a=this.ii(a,i,o,s,e[15],10,-30611744),s=this.ii(s,a,i,o,e[6],15,-1560198380),o=this.ii(o,s,a,i,e[13],21,1309151649),i=this.ii(i,o,s,a,e[4],6,-145523070),a=this.ii(a,i,o,s,e[11],10,-1120210379),s=this.ii(s,a,i,o,e[2],15,718787259),o=this.ii(o,s,a,i,e[9],21,-343485551),t[0]=this.add32(i,t[0]),t[1]=this.add32(o,t[1]),t[2]=this.add32(s,t[2]),t[3]=this.add32(a,t[3])}cmn(t,e,i,o,s,a){return e=this.add32(this.add32(e,t),this.add32(o,a)),this.add32(e<<s|e>>>32-s,i)}ff(t,e,i,o,s,a,n){return this.cmn(e&i|~e&o,t,e,s,a,n)}gg(t,e,i,o,s,a,n){return this.cmn(e&o|i&~o,t,e,s,a,n)}hh(t,e,i,o,s,a,n){return this.cmn(e^i^o,t,e,s,a,n)}ii(t,e,i,o,s,a,n){return this.cmn(i^(e|~o),t,e,s,a,n)}md51(t){const e=t.length,i=[1732584193,-271733879,-1732584194,271733878];let o;for(o=64;o<=t.length;o+=64)this.md5cycle(i,this.md5blk(t.substring(o-64,o)));t=t.substring(o-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(o=0;o<t.length;o++)s[o>>2]|=t.charCodeAt(o)<<(o%4<<3);if(s[o>>2]|=128<<(o%4<<3),o>55)for(this.md5cycle(i,s),o=0;o<16;o++)s[o]=0;return s[14]=e*8,this.md5cycle(i,s),i}md5blk(t){const e=[];for(let i=0;i<64;i+=4)e[i>>2]=t.charCodeAt(i)+(t.charCodeAt(i+1)<<8)+(t.charCodeAt(i+2)<<16)+(t.charCodeAt(i+3)<<24);return e}rhex(t){const e="0123456789abcdef".split("");let i="",o=0;for(;o<4;o++)i+=e[t>>o*8+4&15]+e[t>>o*8&15];return i}hex(t){for(let e=0;e<t.length;e++)t[e]=this.rhex(t[e]);return t.join("")}md5(t){return this.hex(this.md51(t))}add32(t,e){return this.ieCompatibility?this.add32Compat(t,e):this.add32Std(t,e)}add32Std(t,e){return t+e&4294967295}add32Compat(t,e){const i=(t&65535)+(e&65535);return(t>>16)+(e>>16)+(i>>16)<<16|i&65535}};function rd(t){return t==null||t.length===0}var Al={"01":"GRID","02":"CHARTS","0102":"BOTH"},tm="https://www.ag-grid.com/charts/licensing/",ld=class $t{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new f0,this.md5.init()}validateLicense(){const e=this.getLicenseDetails($t.licenseKey,$t.gridContext),i=`AG ${e.currentLicenseType==="BOTH"?"Grid and ":""}Charts Enterprise`;let o="";if(e.suppliedLicenseType==="BOTH"?o="AG Grid and AG Charts Enterprise":e.suppliedLicenseType==="GRID"?o="AG Grid Enterprise":e.suppliedLicenseType!==void 0&&(o="AG Charts Enterprise"),e.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(e.expired){const s=$t.getChartsReleaseDate(),a=$t.formatDate(s);this.outputExpiredKey(e.expiry,a,o)}else e.valid?e.isTrial&&e.trialExpired&&this.outputExpiredTrialKey(e.expiry,i,o):this.outputInvalidLicenseKey(!!e.incorrectLicenseType,i,o)}static extractExpiry(e){const i=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt($t.decode(i),10))}static extractLicenseComponents(e){let i=e.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),e.length<=32)return{md5:null,license:e,version:null,isTrial:null};const o=i.length-32,s=i.substring(o),a=i.substring(0,o),[n,r,l]=$t.extractBracketedInformation(i);return{md5:s,license:a,version:n,isTrial:r,type:l}}getLicenseDetails(e,i=!1){const o="CHARTS";if(rd(e))return{licenseKey:e,valid:!1,missing:!0,currentLicenseType:o};const s=$t.getChartsReleaseDate(),{md5:a,license:n,version:r,isTrial:l,type:c}=$t.extractLicenseComponents(e);let h=a===this.md5.md5(n)&&e.indexOf("For_Trialing_ag-Grid_Only")===-1,d,u,g=null,f=!1,y;function m(){d=g<new Date,u=void 0}if(h&&(g=$t.extractExpiry(n),h=!isNaN(g.getTime()),h))switch(u=s>g,r){case"legacy":case"2":{h=!1;break}case"3":rd(c)?h=!1:(y=c,c!==Al["02"]&&c!==Al["0102"]?(h=!1,f=!0):l&&m())}return h?{licenseKey:e,valid:h,expiry:$t.formatDate(g),expired:u,version:r,isTrial:l,trialExpired:d,invalidLicenseTypeForCombo:i?y!=="BOTH":void 0,incorrectLicenseType:f,currentLicenseType:o,suppliedLicenseType:y}:{licenseKey:e,valid:h,incorrectLicenseType:f,currentLicenseType:o,suppliedLicenseType:y}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!rd(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage??""}getHostname(){if(!this.document)return"localhost";const e=this.document.defaultView??window;if(!e)return"localhost";const i=e.location,{hostname:o=""}=i;return o}isForceWatermark(){if(!this.document)return!1;const e=this.document?.defaultView??typeof window<"u"?window:void 0;if(!e)return!1;const{pathname:i}=e.location;return i?i.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){const e=this.getHostname();return/^((?:[\w-]+\.)?ag-grid\.com)$/.exec(e)!==null}isLocalhost(){const e=this.getHostname();return/^(?:127\.0\.0\.1|localhost)$/.exec(e)!==null}static formatDate(e){const i=["January","February","March","April","May","June","July","August","September","October","November","December"],o=e.getDate(),s=e.getMonth(),a=e.getFullYear();return o+" "+i[s]+" "+a}static getChartsReleaseDate(){return new Date(parseInt($t.decode($t.RELEASE_INFORMATION),10))}static decode(e){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let o="",s,a,n,r,l,c,h,d=0;const u=e.replace(/[^A-Za-z0-9+/=]/g,"");for(;d<u.length;)r=i.indexOf(u.charAt(d++)),l=i.indexOf(u.charAt(d++)),c=i.indexOf(u.charAt(d++)),h=i.indexOf(u.charAt(d++)),s=r<<2|l>>4,a=(l&15)<<4|c>>2,n=(c&3)<<6|h,o=o+String.fromCharCode(s),c!=64&&(o=o+String.fromCharCode(a)),h!=64&&(o=o+String.fromCharCode(n));return o=$t.utf8_decode(o),o}static utf8_decode(e){e=e.replace(/rn/g,"n");let i="";for(let o=0;o<e.length;o++){const s=e.charCodeAt(o);s<128?i+=String.fromCharCode(s):s>127&&s<2048?(i+=String.fromCharCode(s>>6|192),i+=String.fromCharCode(s&63|128)):(i+=String.fromCharCode(s>>12|224),i+=String.fromCharCode(s>>6&63|128),i+=String.fromCharCode(s&63|128))}return i}static setGridContext(e=!1){$t.gridContext=e}static setLicenseKey(e){$t.licenseKey=e}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];const i=e.match(/\[(.*?)\]/g).map(r=>r.replace("[","").replace("]",""));if(!i||i.length===0)return["legacy",!1,void 0];const o=i.filter(r=>r==="TRIAL").length===1,s=i.filter(r=>r.startsWith("v"))[0],a=s?s.replace("v",""):"legacy",n=Al[i.filter(r=>Al[r])[0]];return[a,o,n]}centerPadAndOutput(e){const i=this.totalMessageLength-e.length;console.error(e.padStart(i/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,i="*",o=""){console.error(e.padEnd(this.totalMessageLength-o.length,i)+o)}outputInvalidLicenseKey(e,i,o){$t.gridContext||(e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${o} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${tm}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${tm}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""))),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,i,o){$t.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${o} expired on ${e}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){$t.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,i,o){$t.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${o} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${i}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="License Expired"}};ld.RELEASE_INFORMATION="MTc0MjgzMzc1OTQxMA==",ld.gridContext=!1;var Wa=ld;import{_ModuleSupport as Ha}from"ag-charts-community";import{_ModuleSupport as y0}from"ag-charts-community";import{isNumberEqual as em}from"ag-charts-core";function cd(t,e,i){const o=(a,n,r,l)=>{let c=t[0];for(let h=a;r>0?h<=n:h>n;h+=r){const d=t[h];if(l(c,d))return!0;c=d}return!1},s=Math.floor(t.length/2);return o(e,s,e,i)?!0:o(t.length-e,s,-e,i)}import{_ModuleSupport as m0}from"ag-charts-community";var{OR:x0,POSITIVE_NUMBER:S0,NAN:b0,AxisInterval:v0,TempValidate:D0}=m0,hd=class extends v0{};p([D0(x0(S0,b0))],hd.prototype,"minSpacing",2);import{_ModuleSupport as pd}from"ag-charts-community";import{countFractionDigits as M0,isNumberEqual as Ka}from"ag-charts-core";import{_ModuleSupport as im}from"ag-charts-community";import{isArray as k0,isNumberEqual as om}from"ag-charts-core";import{_ModuleSupport as O0}from"ag-charts-community";var{BaseProperties:sm,ChartAxisDirection:T0,ARRAY:A0,BOOLEAN:dd,COLOR_STRING:ud,FONT_STYLE:I0,FONT_WEIGHT:N0,LINE_DASH:C0,NUMBER:am,OBJECT:L0,POSITIVE_NUMBER:R0,RATIO:nm,STRING:rm,UNION:lm,AND:w0,COLOR_STRING_ARRAY:P0,TempValidate:Ct,MATCHING_CROSSLINE_TYPE:cm,createId:E0,Group:gd}=O0,Ii=class extends sm{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};p([Ct(dd,{optional:!0})],Ii.prototype,"enabled",2),p([Ct(rm,{optional:!0})],Ii.prototype,"text",2),p([Ct(I0,{optional:!0})],Ii.prototype,"fontStyle",2),p([Ct(N0,{optional:!0})],Ii.prototype,"fontWeight",2),p([Ct(R0)],Ii.prototype,"fontSize",2),p([Ct(rm)],Ii.prototype,"fontFamily",2),p([Ct(am)],Ii.prototype,"padding",2),p([Ct(ud,{optional:!0})],Ii.prototype,"color",2),p([Ct(dd,{optional:!0})],Ii.prototype,"parallel",2);var De=class extends sm{constructor(){super(...arguments),this.id=E0(this),this.defaultColorRange=[],this.shape="polygon",this.label=new Ii,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=T0.X,this.axisInnerRadius=0,this.axisOuterRadius=0,this.lineGroup=new gd({name:this.id}),this.rangeGroup=new gd({name:this.id}),this.labelGroup=new gd({name:this.id}),this._isRange=void 0}assignCrossLineGroup(t,e){t!==this._isRange&&(t?this.rangeGroup.appendChild(e):this.lineGroup.appendChild(e)),this._isRange=t}setSectorNodeProps(t){t.fill=this.fill,t.fillOpacity=this.fillOpacity??1,t.stroke=this.stroke,t.strokeOpacity=this.strokeOpacity??1,t.strokeWidth=this.strokeWidth??1,t.lineDash=this.lineDash}setLabelNodeProps(t,e,i,o,s){const{label:a}=this;t.x=e,t.y=i,t.text=a.text,t.textAlign="center",t.textBaseline=o,t.rotation=s,t.rotationCenterX=e,t.rotationCenterY=i,t.fill=a.color,t.fontFamily=a.fontFamily,t.fontSize=a.fontSize,t.fontStyle=a.fontStyle,t.visible=!0}};p([Ct(dd,{optional:!0})],De.prototype,"enabled",2),p([Ct(lm(["range","line"],"a crossLine type"))],De.prototype,"type",2),p([Ct(w0(cm("range"),A0.restrict({length:2})),{optional:!0})],De.prototype,"range",2),p([Ct(cm("value"),{optional:!0})],De.prototype,"value",2),p([Ct(P0)],De.prototype,"defaultColorRange",2),p([Ct(ud,{optional:!0})],De.prototype,"fill",2),p([Ct(nm,{optional:!0})],De.prototype,"fillOpacity",2),p([Ct(ud,{optional:!0})],De.prototype,"stroke",2),p([Ct(am,{optional:!0})],De.prototype,"strokeWidth",2),p([Ct(nm,{optional:!0})],De.prototype,"strokeOpacity",2),p([Ct(C0,{optional:!0})],De.prototype,"lineDash",2),p([Ct(lm(["polygon","circle"],"a shape"))],De.prototype,"shape",2),p([Ct(L0)],De.prototype,"label",2);var{ChartAxisDirection:_0,getCrossLineValue:hm,validateCrossLineValue:B0,normalizeAngle360:fd,Group:z0,Path:pm,Sector:F0,RotatableText:V0,ContinuousScale:G0}=im,yd=class extends De{constructor(){super(),this.direction=_0.X,this.polygonNode=new pm,this.sectorNode=new F0,this.lineNode=new pm,this.crossLineRange=new z0,this.labelNode=new V0,this.ticks=[],this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.crossLineRange.append(this.lineNode),this.labelGroup.append(this.labelNode)}visibilityCheck(){if(!G0.is(this.scale))return!0;const[t,e]=this.scale.domain,i=hm(this);if(k0(i)){const[o,s]=i;return o>=t&&o<=e&&s>=o&&s<=e}else return i>=t&&i<=e}update(t){const{scale:e}=this;if(!e||!this.isValid()||!B0(hm(this),e)||!this.visibilityCheck()){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updateLineNode(t),this.updatePolygonNode(t),this.updateSectorNode(t),this.updateLabelNode(t)}updateLineNode(t){const{scale:e,type:i,value:o,lineNode:s}=this;if(!t||i!=="line"||!e){s.visible=!1;return}const a=e.convert(o);if(isNaN(a)){s.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:r}=this;s.visible=!0,s.stroke=this.stroke,s.strokeOpacity=this.strokeOpacity??1,s.strokeWidth=this.strokeWidth??1,s.fill=void 0,s.lineDash=this.lineDash;const l=r*Math.cos(a),c=r*Math.sin(a),h=n*Math.cos(a),d=n*Math.sin(a);s.path.clear(!0),s.path.moveTo(h,d),s.path.lineTo(l,c),this.assignCrossLineGroup(!1,this.crossLineRange)}updatePolygonNode(t){const{polygonNode:e,range:i,scale:o,shape:s,type:a,ticks:n}=this;if(!t||a!=="range"||s!=="polygon"||!o||!i){e.visible=!1;return}const{axisInnerRadius:r,axisOuterRadius:l}=this,c=n.indexOf(i[0]),h=n.indexOf(i[1]),u=(c<=h?n.slice(c,h+1):n.slice(c).concat(n.slice(0,h+1))).map(f=>o.convert(f));e.visible=!0,this.setSectorNodeProps(e);const{path:g}=e;g.clear(!0),u.forEach((f,y)=>{const m=l*Math.cos(f),x=l*Math.sin(f);y===0?g.moveTo(m,x):g.lineTo(m,x)}),r===0?g.lineTo(0,0):u.slice().reverse().forEach(f=>{const y=r*Math.cos(f),m=r*Math.sin(f);g.lineTo(y,m)}),e.path.closePath(),this.assignCrossLineGroup(!0,this.crossLineRange)}updateSectorNode(t){const{sectorNode:e,range:i,scale:o,shape:s,type:a}=this;if(!t||a!=="range"||s!=="circle"||!o||!i){e.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:r}=this,l=i.map(d=>o.convert(d)),c=o.step??0,h=o instanceof im.BandScale?c/2:0;e.visible=!0,this.setSectorNodeProps(e),e.centerX=0,e.centerY=0,e.innerRadius=n,e.outerRadius=r,e.startAngle=l[0]-h,e.endAngle=l[1]+h,this.assignCrossLineGroup(!0,this.crossLineRange)}updateLabelNode(t){const{label:e,labelNode:i,range:o,scale:s,type:a,ticks:n}=this;if(!t||e.enabled===!1||!e.text||!s||a==="range"&&!o){i.visible=!1;return}i.visible=!0;const{axisInnerRadius:r,axisOuterRadius:l}=this;let c,h,d,u;if(a==="line"){const g=fd(s.convert(this.value)),f=1.5*Math.PI,y=om(g,f)||g>f||g<Math.PI/2,m=(r+l)/2*Math.cos(g),x=(r+l)/2*Math.sin(g);c=m+e.padding*Math.cos(g+Math.PI/2),h=x+e.padding*Math.sin(g+Math.PI/2),u=y?"top":"bottom",d=y?g:g-Math.PI}else{const[g,f]=o.map(v=>fd(s.convert(v)));let y=(g+f)/2;g>f&&(y-=Math.PI),y=fd(y);const m=(om(y,0)||y>0)&&y<Math.PI;let x;this.shape==="circle"||n.length<3?x=l-e.padding:x=l*Math.cos(Math.PI/n.length)-e.padding,c=x*Math.cos(y),h=x*Math.sin(y),u=m?"bottom":"top",d=m?y-Math.PI/2:y+Math.PI/2}this.setLabelNodeProps(i,c,h,u,d)}};yd.className="AngleCrossLine";var{ChartAxisDirection:W0,NUMBER:dm,UNION:H0,ProxyOnWrite:K0,TextWrapper:U0,TextUtils:Y0,TempValidate:md,toRadians:Il,normalizeAngle360:Ua,normalizeAngle360Inclusive:j0,Path:$0,RotatableText:X0,Transformable:Z0,BBox:q0}=pd,xd=class extends pd.AxisLabel{constructor(){super(...arguments),this.orientation="fixed"}};p([md(H0(["fixed","parallel","perpendicular"],"a label orientation"))],xd.prototype,"orientation",2);var jn=class extends pd.PolarAxis{constructor(t,e){super(t,e),this.startAngle=0,this.endAngle=void 0,this.labelData=[],this.tickData=[],this.radiusLine=this.axisGroup.appendChild(new $0),this.includeInvisibleDomains=!0}get direction(){return W0.X}createLabel(){return new xd}calculateTickLayout(t){const{nice:e,scale:i}=this,o={nice:e,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},s=e?i.niceDomain(o,t):t,a=this.generateAngleTicks(s);this.tickData=a;const n=a.map(l=>l.value),r=n.reduce((l,c)=>Math.max(typeof c=="number"?M0(c):0,l),0);return{niceDomain:s,primaryTickCount:void 0,tickDomain:s,ticks:n,fractionDigits:r,bbox:this.getBBox()}}update(){super.update(),this.updateRadiusLine()}normalizedAngles(){const t=Ua(-Math.PI/2+Il(this.startAngle)),e=this.endAngle!=null?j0(Il(this.endAngle)-Il(this.startAngle)):2*Math.PI,i=t+e;return[t,i]}computeRange(){this.range=this.normalizedAngles()}updateSelections(){const t=this.tickData;this.gridLineGroupSelection.update(this.gridLength&&this.gridLine.enabled?t:[]),this.tickLineGroupSelection.update(this.tick.enabled?t:[]),this.tickLabelGroupSelection.update(this.label.enabled?t:[]),this.gridLineGroupSelection.cleanup(),this.tickLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup()}updatePosition(){const{translation:t,axisGroup:e,gridGroup:i,crossLineRangeGroup:o,crossLineLineGroup:s,crossLineLabelGroup:a}=this,n=Math.floor(t.x),r=Math.floor(t.y);e.translationX=n,e.translationY=r,i.translationX=n,i.translationY=r,o.translationX=n,o.translationY=r,s.translationX=n,s.translationY=r,a.translationX=n,a.translationY=r}updateRadiusLine(){const t=this.radiusLine,{path:e}=t;e.clear(!0);const{points:i,closePath:o}=this.getAxisLinePoints();i.forEach(({x:s,y:a,moveTo:n,arc:r,radius:l=0,startAngle:c=0,endAngle:h=0})=>{r?e.arc(s,a,l,c,h):n?e.moveTo(s,a):e.lineTo(s,a)}),o&&e.closePath(),t.visible=this.line.enabled,t.stroke=this.line.stroke,t.strokeWidth=this.line.width,t.fill=void 0}getAxisLinePoints(){const{scale:t,shape:e,gridLength:i}=this,[o,s]=this.range,a=Ka(s-o,2*Math.PI),n=[];if(e==="circle")a?n.push({x:i,y:0,moveTo:!0},{x:0,y:0,radius:i,startAngle:0,endAngle:2*Math.PI,arc:!0,moveTo:!1}):n.push({x:i*Math.cos(o),y:i*Math.sin(o),moveTo:!0},{x:0,y:0,radius:i,startAngle:Ua(o),endAngle:Ua(s),arc:!0,moveTo:!1});else if(e==="polygon"){const r=t.ticks({nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.map(l=>t.convert(l));r&&r.length>2&&r.forEach((l,c)=>{const h=i*Math.cos(l),d=i*Math.sin(l),u=c===0;n.push({x:h,y:d,moveTo:u})})}return{points:n,closePath:a}}updateGridLines(){const{scale:t,gridLength:e,gridLine:{style:i,width:o},innerRadiusRatio:s}=this;if(!(i&&e>0))return;const a=e*s,n=i.length;this.gridLineGroupSelection.each((r,l,c)=>{const{value:h}=l,{stroke:d,lineDash:u}=i[c%n],g=t.convert(h);r.x1=a*Math.cos(g),r.y1=a*Math.sin(g),r.x2=e*Math.cos(g),r.y2=e*Math.sin(g),r.stroke=d,r.strokeWidth=o,r.lineDash=u,r.fill=void 0}),this.gridLineGroupSelection.cleanup()}updateLabels(){const{label:t,tickLabelGroupSelection:e}=this;e.each((i,o,s)=>{const a=this.labelData[s];if(!a||a.hidden){i.visible=!1;return}i.text=a.text,i.setFont(t),i.fill=t.color,i.x=a.x,i.y=a.y,i.textAlign=a.textAlign,i.textBaseline=a.textBaseline,i.visible=!0,a.rotation?(i.rotation=a.rotation,i.rotationCenterX=a.x,i.rotationCenterY=a.y):i.rotation=0})}updateTickLines(){const{scale:t,gridLength:e,tick:i,tickLineGroupSelection:o}=this;o.each((s,a)=>{const{value:n}=a,r=t.convert(n),l=Math.cos(r),c=Math.sin(r);s.x1=e*l,s.y1=e*c,s.x2=(e+i.size)*l,s.y2=(e+i.size)*c,s.stroke=i.stroke,s.strokeWidth=i.width})}createLabelNodeData(t,e,i){const{label:o,gridLength:s,scale:a,tick:n}=this;if(!o.enabled)return[];const r=new X0,l=i.x-this.translation.x,c=i.x+i.width-this.translation.x,h=t.map((d,u)=>{const{value:g}=d,f=s+o.spacing+n.size,y=a.convert(g),m=Math.cos(y),x=Math.sin(y),v=f*m,S=f*x,{textAlign:b,textBaseline:D}=this.getLabelAlign(y),I=u===t.length-1&&g!==t[0]&&Ka(Ua(y),Ua(a.convert(t[0]))),M=this.getLabelRotation(y);let k=this.formatTick(g,u,a.domain);r.text=k,r.x=v,r.y=S,r.setFont(o),r.textAlign=b,r.textBaseline=D,r.rotation=M,M&&(r.rotationCenterX=v,r.rotationCenterY=S);let A=M?Z0.toCanvas(r):r.getBBox();if(A&&e.hideWhenNecessary&&!M){const O=l-A.x,N=A.x+A.width-c,T=1;if(O>T||N>T){const L=A.width-Math.max(O,N);k=U0.wrapText(k,{maxWidth:L,font:o,textWrap:"never"}),k===Y0.EllipsisChar&&(k=""),r.text=k,A=r.getBBox()}}return{text:k,x:v,y:S,textAlign:b,textBaseline:D,hidden:k===""||d.hidden||I,rotation:M,box:A}});return o.avoidCollisions&&this.avoidLabelCollisions(h),h}computeLabelsBBox(t,e){this.labelData=this.createLabelNodeData(this.tickData,t,e);const i=this.labelData.map(({box:o})=>o).filter(o=>o!=null);return!this.label.enabled||i.length===0?null:q0.merge(i)}getLabelOrientation(){const{label:t}=this;return t instanceof xd?t.orientation:"fixed"}getLabelRotation(t){let e=Il(this.label.rotation??0);t=Ua(t);const i=this.getLabelOrientation();return i==="parallel"?(e+=t,t>=0&&t<Math.PI?e-=Math.PI/2:e+=Math.PI/2):i==="perpendicular"&&(e+=t,t>=Math.PI/2&&t<1.5*Math.PI&&(e+=Math.PI)),e}getLabelAlign(t){const e=Math.cos(t),i=Math.sin(t);let o,s;const a=this.getLabelOrientation(),n=Ka(e,0),r=Ka(i,0),l=Ka(e,1),c=Ka(i,-1),h=e>0&&!n,d=i>0&&!r;return a==="parallel"?(o="center",s=l&&r||d?"top":"bottom"):a==="perpendicular"?(o=c||h?"left":"right",s="middle"):(o="right",n?o="center":h&&(o="left"),s="bottom",r?s="middle":d&&(s="top")),{textAlign:o,textBaseline:s}}updateCrossLines(){const{shape:t,gridLength:e,innerRadiusRatio:i}=this;this.crossLines.forEach(o=>{o instanceof yd&&(o.ticks=this.tickData.map(s=>s.value),o.shape=t,o.axisOuterRadius=e,o.axisInnerRadius=e*i)}),super.updateCrossLines()}};jn.CrossLineConstructor=yd,p([K0("rotation"),md(dm)],jn.prototype,"startAngle",2),p([md(dm,{optional:!0})],jn.prototype,"endAngle",2);var{RATIO:um,OBJECT:Q0,TempValidate:Sd,CategoryScale:J0}=y0,$o=class extends jn{constructor(t){super(t,new J0),this.groupPaddingInner=0,this.paddingInner=0,this.interval=new hd}generateAngleTicks(){const{scale:t,gridLength:e}=this,{values:i,minSpacing:o}=this.interval,s=i??t.ticks({nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})??[];if(s.length<2||o==null)return s.map(c=>({value:c,visible:!0}));const a=s[0],n=t.convert(a),r=e*Math.cos(n),l=e*Math.sin(n);for(let c=1;c<s.length-1;c++){const h=s[c],d=t.convert(h);if(d-n>Math.PI)break;const u=e*Math.cos(d),g=e*Math.sin(d);if(Math.sqrt((u-r)**2+(g-l)**2)>o){const y=new Set([a]);return cd(s,c,(m,x)=>{y.add(x)}),s.map(m=>{const x=y.has(m);return{value:m,visible:x}})}}return[{value:a,visible:!0}]}avoidLabelCollisions(t){const{minSpacing:e}=this.label;if(t.length<3)return;const i=(l,c)=>{if(l.hidden||c.hidden)return!1;if(e==null)return l.box.collidesBBox(c.box);const h=l.box.clone().grow(e/2),d=c.box.clone().grow(e/2);return h.collidesBBox(d)},o=t[0],s=t.at(-1),a=new Set([o]),n=em(o.x,s.x)&&em(o.y,s.y),r=Math.floor(t.length/2);for(let l=1;l<=r;l++){const c=n?t.slice(0,-1):t;if(!cd(c,l,i)){cd(c,l,(d,u)=>{a.add(u)});break}}t.forEach(l=>{a.has(l)||(l.hidden=!0,l.box=void 0)})}};$o.className="AngleCategoryAxis",$o.type="angle-category",p([Sd(um)],$o.prototype,"groupPaddingInner",2),p([Sd(um)],$o.prototype,"paddingInner",2),p([Sd(Q0)],$o.prototype,"interval",2);var t2={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-category",moduleFactory:t=>new $o(t)};import{_ModuleSupport as e2}from"ag-charts-community";import{isNumberEqual as gm}from"ag-charts-core";import{_ModuleSupport as i2}from"ag-charts-community";import{isNumberEqual as o2}from"ag-charts-core";var{range:fm,isDenseInterval:s2,LinearScale:bd}=i2,ym=class Qy extends bd{constructor(){super(...arguments),this.arcLength=0}static getNiceStepAndTickCount(e,i){const[o,s]=i;let a=bd.getTickStep(o,s,e);const n=isNaN(e.maxTickCount)?1/0:e.maxTickCount,r=Math.abs(s-o)/a;let l=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2)));return l>n&&(l/=2,a*=2),{count:l,step:a}}ticks(e,i=this.domain){const{arcLength:o}=this;if(!i||i.length<2||i.some(c=>!isFinite(c))||o<=0)return[];const{nice:s,interval:a}=e,[n,r]=i;if(a){const c=Math.abs(a),h=this.getPixelRange();if(!s2((r-n)/c,h))return fm(n,r,c)}let l;if(s&&this.hasNiceRange()){const c=super.niceDomain(e,i);l=Qy.getNiceStepAndTickCount(e,c).step}else l=bd.getTickStep(n,r,e);return fm(n,r,l)}hasNiceRange(){const e=this.range.slice().sort((o,s)=>o-s);return[Math.PI,2*Math.PI].some(o=>o2(o,e[1]-e[0]))}niceDomain(e,i=this.domain){const o=super.niceDomain(e,i);if(!this.hasNiceRange())return o;const s=o[0]>o[1],a=s?o[1]:o[0],{step:n,count:r}=Qy.getNiceStepAndTickCount(e,o),l=1/n,c=n>=1?Math.ceil(a/n+r)*n:Math.ceil((a+r*n)*l)/l;return s?[c,a]:[a,c]}getPixelRange(){return this.arcLength}},{AND:mm,GREATER_THAN:a2,LESS_THAN:n2,NUMBER_OR_NAN:xm,OBJECT:r2,TempValidate:vd,angleBetween:l2,normalisedExtentWithMetadata:c2,findMinMax:h2}=e2,Ps=class extends jn{constructor(t){super(t,new ym),this.shape="circle",this.interval=new hd}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:o,clipped:s}=c2(t,e,i);return{domain:o,clipped:s}}updateScale(){super.updateScale(),this.scale.arcLength=this.getRangeArcLength()}getRangeArcLength(){const{range:t}=this,e=Math.min(...t),i=Math.max(...t),o=l2(e,i)||2*Math.PI,s=this.gridLength;return o*s}generateAngleTicks(t){const{scale:e,range:i,nice:o}=this,{values:s,step:a,minSpacing:n,maxSpacing:r}=this.interval;let l;if(s==null){const{arcLength:c}=e,h=r?Math.floor(c/r):1,d=n?Math.floor(c/n):1/0,u=Math.floor(4/Math.PI*Math.abs(i[0]-i[1])),g=Math.max(h,Math.min(d,u)),f={nice:o,interval:a,tickCount:g,minTickCount:h,maxTickCount:d};l=e.ticks(f,t)}else{const[c,h]=h2(t.map(Number));l=s.filter(d=>d>=c&&d<=h).sort((d,u)=>d-u)}return l.map(c=>({value:c,visible:!0}))}avoidLabelCollisions(t){const{minSpacing:e}=this.label,i=(a,n)=>{if(a.hidden||n.hidden)return!1;if(e==null)return a.box.collidesBBox(n.box);const r=a.box.clone().grow(e/2),l=n.box.clone().grow(e/2);return r.collidesBBox(l)},o=t[0],s=t.at(-1);o!==s&&gm(o.x,s.x)&&gm(o.y,s.y)&&(s.hidden=!0);for(let a=1;a<t.length;a*=2){let n=!1;for(let r=a;r<t.length;r+=a){const l=t[r],c=t[r-a];if(i(c,l)){n=!0;break}}if(!n){t.forEach((r,l)=>{l%a>0&&(r.hidden=!0,r.box=void 0)});return}}t.forEach((a,n)=>{n>0&&(a.hidden=!0,a.box=void 0)})}};Ps.className="AngleNumberAxis",Ps.type="angle-number",p([vd(mm(xm,n2("max")),{optional:!0})],Ps.prototype,"min",2),p([vd(mm(xm,a2("min")),{optional:!0})],Ps.prototype,"max",2),p([vd(r2)],Ps.prototype,"interval",2);var p2={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-number",moduleFactory:t=>new Ps(t)};import{_ModuleSupport as Sm}from"ag-charts-community";var{OrdinalTimeScale:d2}=Sm,Nl=class extends Sm.CategoryAxis{constructor(t){super(t,new d2)}};Nl.className="OrdinalTimeAxis",Nl.type="ordinal-time";var u2={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ordinal-time",moduleFactory:t=>new Nl(t)};import{_ModuleSupport as g2}from"ag-charts-community";import{_ModuleSupport as Cl}from"ag-charts-community";import{isNumberEqual as f2}from"ag-charts-core";import{_ModuleSupport as bm}from"ag-charts-community";import{clamp as vm,isNumberEqual as y2}from"ag-charts-core";var{ChartAxisDirection:m2,TempValidate:x2,NUMBER:S2,getCrossLineValue:b2,validateCrossLineValue:v2,normalizeAngle360:D2,toRadians:M2,Group:k2,Path:O2,Sector:T2,RotatableText:A2}=bm,Dm=class extends Ii{constructor(){super(...arguments),this.positionAngle=void 0}};p([x2(S2,{optional:!0})],Dm.prototype,"positionAngle",2);var Dd=class extends De{constructor(){super(),this.direction=m2.Y,this.label=new Dm,this.polygonNode=new O2,this.sectorNode=new T2,this.crossLineRange=new k2,this.labelNode=new A2,this.outerRadius=0,this.innerRadius=0,this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.labelGroup.append(this.labelNode)}update(t){const{scale:e}=this;if(!e||!this.isValid()||!v2(b2(this),e)){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.updateRadii();const{innerRadius:i,outerRadius:o}=this;t&&(t=i>=this.axisInnerRadius&&o<=this.axisOuterRadius),this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updatePolygonNode(t),this.updateSectorNode(t),this.updateLabelNode(t),this.assignCrossLineGroup(this.type==="range",this.crossLineRange)}updateRadii(){const{range:t,scale:e,type:i,axisInnerRadius:o,axisOuterRadius:s}=this;if(!e)return{innerRadius:0,outerRadius:0};const a=l=>s+o-l;let n,r;if(i==="line")n=a(e.convert(this.value)),r=n;else{const l=Math.abs(e?.bandwidth??0),c=t.map(h=>e.convert(h));n=a(Math.max(...c)),r=a(Math.min(...c))+l}this.outerRadius=n,this.innerRadius=r}drawPolygon(t,e,i){e.forEach((o,s)=>{const a=t*Math.cos(o),n=t*Math.sin(o);s===0?i.path.moveTo(a,n):i.path.lineTo(a,n)}),i.path.closePath()}updatePolygonNode(t){const{gridAngles:e,polygonNode:i,scale:o,shape:s,type:a,innerRadius:n,outerRadius:r}=this;if(!t||s!=="polygon"||!o||!e){i.visible=!1;return}i.visible=!0;const l=this.getPadding();i.path.clear(!0),this.drawPolygon(r-l,e,i);const c=e.slice().reverse(),h=a==="line"?r-l:n+l;this.drawPolygon(h,c,i),this.setSectorNodeProps(i)}updateSectorNode(t){const{axisInnerRadius:e,axisOuterRadius:i,scale:o,sectorNode:s,shape:a,innerRadius:n,outerRadius:r}=this;if(!t||a!=="circle"||!o){s.visible=!1;return}s.visible=!0,s.startAngle=0,s.endAngle=2*Math.PI;const l=this.getPadding(),c=vm(e,n+l,i),h=vm(e,r-l,i);s.innerRadius=Math.min(c,h),s.outerRadius=Math.max(c,h),this.setSectorNodeProps(s)}updateLabelNode(t){const{innerRadius:e,label:i,labelNode:o,scale:s,shape:a,type:n}=this;if(!t||i.enabled===!1||!i.text||!s){o.visible=!1;return}const r=D2(M2((i.positionAngle??0)-90)),l=(y2(r,0)||r>0)&&r<Math.PI,c=l?r-Math.PI/2:r+Math.PI/2;let h;const d=this.gridAngles??[];n==="line"?h=e+i.padding:a==="circle"||d.length<3?h=e-i.padding:h=e*Math.cos(Math.PI/d.length)-i.padding;const u=h*Math.cos(r),g=h*Math.sin(r);let f;n==="line"?f=l?"top":"bottom":f=l?"bottom":"top",this.setLabelNodeProps(o,u,g,f,c)}getPadding(){const{scale:t}=this;if(!t)return 0;const e=Math.abs(t.bandwidth??0),i=Math.abs(t.step??0);return t instanceof bm.BandScale?(i-e)/2:0}};Dd.className="RadiusCrossLine";var{ChartAxisDirection:I2,ZIndexMap:N2,NUMBER:Mm,BOOLEAN:C2,TempValidate:Md,normalizeAngle360:km,toRadians:L2,Caption:R2,Group:w2,Path:P2,Line:E2,Selection:_2,AxisTickGenerator:B2,AxisGroupZIndexMap:z2}=Cl,kd=class extends Cl.AxisLabel{constructor(){super(...arguments),this.autoRotateAngle=335}};p([Md(C2,{optional:!0})],kd.prototype,"autoRotate",2),p([Md(Mm)],kd.prototype,"autoRotateAngle",2);var Ll=class extends Cl.PolarAxis{constructor(t,e){super(t,e),this.positionAngle=0,this.tickGenerator=new B2(this),this.generatedTicks=void 0,this.lineNode=this.axisGroup.appendChild(new E2({name:`${this.id}-Axis-line`,zIndex:z2.AxisLine})),this.gridPathGroup=this.gridGroup.appendChild(new w2({name:`${this.id}-gridPaths`,zIndex:N2.AXIS_GRID})),this.gridPathSelection=_2.select(this.gridPathGroup,P2),this.axisGroup.appendChild(this.title.caption.node),this.destroyFns.push(this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}get direction(){return I2.Y}getAxisTransform(){const t=this.scale.range[0],{translation:e,positionAngle:i,innerRadiusRatio:o}=this,s=t*o,a=L2(i);return{translationX:e.x,translationY:e.y-t-s,rotation:a,rotationCenterX:0,rotationCenterY:t+s}}update(){super.update(),this.updateTitle();const{enabled:t,stroke:e,width:i}=this.line;this.lineNode.setProperties({stroke:e,strokeWidth:t?i:0,x1:0,y1:this.range[0],x2:0,y2:this.range[1]})}calculateTickLayout(t,e,i,o){const{parallelFlipRotation:s,regularFlipRotation:a}=this.calculateRotations(),n=[0,1],r=this.label.getSideFlag(),l=r*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding),c=this.tickGenerator.generateTicks({domain:t,niceMode:e,visibleRange:n,primaryTickCount:o,parallelFlipRotation:s,regularFlipRotation:a,labelX:l,sideFlag:r}),{tickData:h,primaryTickCount:d=o}=c,{ticks:u,rawTicks:g,tickDomain:f,fractionDigits:y,niceDomain:m=t}=h,x=u.map(v=>this.getTickLabelProps(v,c));return this.generatedTicks={ticks:u,labels:x},{ticks:g,tickDomain:f,niceDomain:m,primaryTickCount:d,fractionDigits:y}}updateSelections(){const{generatedTicks:t}=this;if(!t)return;const{ticks:e,labels:i}=t;this.gridLineGroupSelection.update(this.gridLength?e:[]),this.tickLineGroupSelection.update(e),this.tickLabelGroupSelection.update(i),this.gridPathSelection.update(this.gridLine.enabled?this.prepareGridPathTickData(e):[]),this.gridLineGroupSelection.cleanup(),this.tickLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup(),this.gridPathSelection.cleanup()}updateLabels(){if(!this.label.enabled)return;const t=Cl.resetAxisLabelSelectionFn();this.tickLabelGroupSelection.each((e,i)=>{e.fill=i.fill,e.fontFamily=i.fontFamily,e.fontSize=i.fontSize,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.text=i.text,e.textBaseline=i.textBaseline,e.textAlign=i.textAlign??"center",e.setProperties(t(e,i))})}updateGridLines(){super.updateGridLines();const{gridLine:{style:t,width:e},shape:i,generatedTicks:o}=this;if(!t||!o)return;const s=t.length,a=(u,g)=>{const{stroke:f,lineDash:y}=t[g%s];u.stroke=f,u.strokeWidth=e,u.lineDash=y,u.fill=void 0},[n,r]=this.gridRange??[0,2*Math.PI],l=f2(r-n,2*Math.PI),d=i==="circle"?(u,g)=>{const{path:f}=u;f.clear(!0);const y=this.getTickRadius(g);l?(f.moveTo(y,0),f.arc(0,0,y,0,2*Math.PI)):(f.moveTo(y*Math.cos(n),y*Math.sin(n)),f.arc(0,0,y,km(n),km(r))),l&&f.closePath()}:(u,g)=>{const{path:f}=u,y=this.gridAngles;if(f.clear(!0),!y||y.length<3)return;const m=this.getTickRadius(g);y.forEach((x,v)=>{const S=m*Math.cos(x),b=m*Math.sin(x);v===0?f.moveTo(S,b):f.lineTo(S,b),y.forEach((D,I)=>{const M=m*Math.cos(D),k=m*Math.sin(D);I===0?f.moveTo(M,k):f.lineTo(M,k)}),f.closePath()}),f.closePath()};this.gridPathSelection.each((u,g,f)=>{a(u,f),d(u,g)})}updateTitle(){const t=r=>r.defaultValue,{title:e,range:i,moduleCtx:{callbackCache:o}}=this,{formatter:s=t}=this.title;e.caption.enabled=e.enabled,e.caption.fontFamily=e.fontFamily,e.caption.fontSize=e.fontSize,e.caption.fontStyle=e.fontStyle,e.caption.fontWeight=e.fontWeight,e.caption.color=e.color,e.caption.wrapping=e.wrapping;let a=!1;const n=e.caption.node;e.enabled&&(a=!0,n.rotation=Math.PI/2,n.x=Math.floor((i[0]+i[1])/2),n.y=-R2.SMALL_PADDING,n.textAlign="center",n.textBaseline="bottom",n.text=o.call(this,s,this.getTitleFormatterParams(this.scale.domain))),n.visible=a}updateCrossLines(){this.crossLines.forEach(t=>{if(t instanceof Dd){const{shape:e,gridAngles:i,range:o,innerRadiusRatio:s}=this,a=o[0];t.shape=e,t.gridAngles=i,t.axisOuterRadius=a,t.axisInnerRadius=a*s}}),super.updateCrossLines()}createLabel(){return new kd}getTickLabelProps(t,e){const{label:i}=this,{combinedRotation:o,textBaseline:s,textAlign:a}=e,n=this.scale.range,r=t.tickLabel,c=i.getSideFlag()*(this.getTickSize()+i.spacing+this.seriesAreaPadding),h=r!==""&&r!=null;return{...this.getLabelStyles({value:t.tickLabel}),tickId:t.tickId,rotation:o,rotationCenterX:c,translationY:t.translationY,text:r,textAlign:a,textBaseline:s,visible:h,x:c,y:0,range:n}}};Ll.CrossLineConstructor=Dd,p([Md(Mm)],Ll.prototype,"positionAngle",2);var{RATIO:Od,ProxyPropertyOnWrite:Om,TempValidate:Td,CategoryScale:Tm}=g2,Xo=class extends Ll{constructor(t){super(t,new Tm),this.shape="circle",this.groupPaddingInner=0,this.paddingInner=0,this.paddingOuter=0}normaliseDataDomain(t){return{domain:t,clipped:!1}}prepareGridPathTickData(t){return t.slice().reverse()}getTickRadius(t){const{scale:e,innerRadiusRatio:i}=this,o=e.range[0],s=o*i;if(Tm.is(e)){const a=e.domain,n=a.length-1-a.indexOf(t.tick);return n===0?s:e.inset+e.step*(n-.5)+e.bandwidth/2}else{const a=(o-s)/e.domain.length;return o-t.translationY+s-a/2}}};Xo.className="RadiusCategoryAxis",Xo.type="radius-category",p([Td(Od)],Xo.prototype,"groupPaddingInner",2),p([Om("scale","paddingInner"),Td(Od)],Xo.prototype,"paddingInner",2),p([Om("scale","paddingOuter"),Td(Od)],Xo.prototype,"paddingOuter",2);var F2={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-category",moduleFactory:t=>new Xo(t)};import{_ModuleSupport as V2}from"ag-charts-community";var{AND:Am,GREATER_THAN:G2,LESS_THAN:W2,NUMBER_OR_NAN:Im,TempValidate:Nm,normalisedExtentWithMetadata:H2,LinearScale:K2}=V2,Ya=class extends Ll{constructor(t){super(t,new K2),this.shape="polygon"}prepareGridPathTickData(t){const{scale:e}=this,i=e.domain[1];return t.filter(({tick:o})=>o!==i).sort((o,s)=>s.tick-o.tick)}getTickRadius(t){const{scale:e}=this,i=e.range[0],o=i*this.innerRadiusRatio;return i-t.translationY+o}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:o,clipped:s}=H2(t,e,i);return{domain:o,clipped:s}}};Ya.className="RadiusNumberAxis",Ya.type="radius-number",p([Nm(Am(Im,W2("max")),{optional:!0})],Ya.prototype,"min",2),p([Nm(Am(Im,G2("min")),{optional:!0})],Ya.prototype,"max",2);var U2={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-number",moduleFactory:t=>new Ya(t)};import{_ModuleSupport as Cm}from"ag-charts-community";var{BOOLEAN:Y2,POSITIVE_NUMBER:j2,ObserveChanges:Lm,TempValidate:Rm}=Cm,Ad=class extends Cm.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!0,t.animationManager.skip(!1),this.destroyFns.push(()=>{t.animationManager.skip(!0)})}};p([Lm((t,e)=>{t.ctx.animationManager.skip(!e)}),Rm(Y2)],Ad.prototype,"enabled",2),p([Lm((t,e)=>{t.ctx.animationManager.defaultDuration=e}),Rm(j2,{optional:!0})],Ad.prototype,"duration",2);var $2={type:"root",optionsKey:"animation",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new Ad(t),themeTemplate:{animation:{enabled:!0}}};import{_ModuleSupport as Rl}from"ag-charts-community";import{isValidDate as Id}from"ag-charts-core";import{_ModuleSupport as wl}from"ag-charts-community";var X2='<div contenteditable="plaintext-only" class="ag-charts-text-input__textarea" tabindex="0"></div>',{focusCursorAtEnd:Z2}=wl,wm="text-input",Pm="canvas-overlay",q2=class extends wl.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1,this.element=t.domManager.addChild(Pm,wm),this.element.classList.add("ag-charts-text-input"),this.destroyFns.push(()=>t.domManager.removeChild(Pm,wm))}setKeyDownHandler(t){this.element.addEventListener("keydown",t),this.destroyFns.push(()=>this.element.removeEventListener("keydown",t))}show(t){this.element.innerHTML=X2;const e=this.element.firstElementChild;wl.setAttribute(e,"data-preventdefault",!1),e.isContentEditable||(e.contentEditable="true"),e.setAttribute("placeholder",this.ctx.localeManager.t(t.placeholderText??"inputTextareaPlaceholder")),t.styles?.placeholderColor&&e.style.setProperty("--placeholder-text-color",t.styles?.placeholderColor),e.innerText=t.text??"",e.style.color=t.styles?.color??"inherit",e.style.fontFamily=t.styles?.fontFamily??"inherit",e.style.fontSize=t.styles?.fontSize?`${t.styles.fontSize}px`:"inherit",e.style.fontStyle=t.styles?.fontStyle??"inherit",e.style.fontWeight=typeof t.styles?.fontWeight=="number"?`${t.styles.fontWeight}`:t.styles?.fontWeight??"inherit",Z2(e),e.addEventListener("input",()=>{this.updatePosition(),t.onChange?.(this.getValue(),this.getBBox())}),e.addEventListener("click",i=>{i.stopPropagation()}),t.layout&&(this.layout=t.layout,this.updatePosition()),t.onChange?.(this.getValue(),this.getBBox()),this.visible=!0}hide(){this.element.innerHTML="",this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1}isVisible(){return this.visible}updateColor(t){this.element.firstElementChild&&(this.element.firstElementChild.style.color=t)}updateFontSize(t){if(this.element.firstElementChild)return this.element.firstElementChild.style.fontSize=`${t}px`,this.updatePosition(),this.getBBox()}getValue(){if(this.element.firstElementChild)return this.element.firstElementChild.innerText.trim()}updatePosition(){const{element:t}=this,e=t.firstElementChild;if(!e)return;const i=this.ctx.domManager.getBoundingClientRect(),{width:o,getTextInputCoords:s,getTextPosition:a,alignment:n,textAlign:r}=this.layout;t.style.setProperty("width",o?`${o}px`:"unset");const l=e.getBoundingClientRect(),c=s(l.height);let h=c.x;n==="center"?h-=(o??l.width)/2:n==="right"&&(h-=o??l.width);const d=a();let u=c.y;d==="center"?u-=l.height/2:d==="bottom"&&(u-=l.height),t.style.setProperty("top",`${u}px`),t.style.setProperty("left",`${h}px`),t.style.setProperty("max-width",`${i.width-h}px`),t.style.setProperty("text-align",n),e.style.setProperty("text-align",r)}getBBox(){const{left:t,top:e,width:i,height:o}=this.element.getBoundingClientRect();return new wl.BBox(t,e,i,o)}};import{_ModuleSupport as Q2}from"ag-charts-community";var{BOOLEAN:J2,BaseProperties:tI,TempValidate:Em,UNION:eI}=Q2,iI=eI(["x","y","xy"],"an axis type"),Nd=class extends tI{constructor(){super(...arguments),this.enabled=!1,this.axes="y"}};p([Em(J2)],Nd.prototype,"enabled",2),p([Em(iI,{optional:!0})],Nd.prototype,"axes",2);import{_ModuleSupport as oI}from"ag-charts-community";var Cd=(t=>(t.Line="line",t.HorizontalLine="horizontal-line",t.VerticalLine="vertical-line",t.DisjointChannel="disjoint-channel",t.ParallelChannel="parallel-channel",t.FibonacciRetracement="fibonacci-retracement",t.FibonacciRetracementTrendBased="fibonacci-retracement-trend-based",t.Callout="callout",t.Comment="comment",t.Note="note",t.Text="text",t.Arrow="arrow",t.ArrowUp="arrow-up",t.ArrowDown="arrow-down",t.DateRange="date-range",t.PriceRange="price-range",t.DatePriceRange="date-price-range",t.QuickDatePriceRange="quick-date-price-range",t))(Cd||{}),sI=Object.values(Cd);function aI(t){for(const e of sI)if(e===t)return e}import{isObject as nI}from"ag-charts-core";import{_ModuleSupport as rI}from"ag-charts-community";import{isObject as lI}from"ag-charts-core";import{_ModuleSupport as cI}from"ag-charts-community";import{isObject as hI}from"ag-charts-core";var{BOOLEAN:$n,COLOR_STRING:Ld,DATE:Xn,FONT_STYLE:pI,FONT_WEIGHT:dI,FUNCTION:uI,LINE_DASH:gI,LINE_STYLE:fI,NUMBER:Es,OBJECT:Zn,OR:qn,POSITIVE_NUMBER:Rd,RATIO:_m,STRING:Zo,TEXT_ALIGN:yI,UNION:Pl,BaseProperties:qo,TempValidate:it,predicateWithMessage:mI,generateUUID:xI}=cI,SI=["value","groupPercentage"],Qn=mI(t=>hI(t)&&Object.keys(t).every(e=>SI.includes(e)),"objects with grouping value properties such as 'value' or 'groupPercentage'"),Jn=class extends qo{};p([it(qn(Zo,Es,Xn,Qn))],Jn.prototype,"x",2),p([it(qn(Zo,Es,Xn,Qn))],Jn.prototype,"y",2);var bI=class extends ue(vo(Vm(qo))){},wd=class extends ue(vo(Qi(_d(zs(qo))))){constructor(){super(...arguments),this.cornerRadius=2}};p([it($n)],wd.prototype,"enabled",2),p([it(Rd)],wd.prototype,"cornerRadius",2);var vI=class extends Qi(qo){},DI=class extends ue(vo(Qi(qo))){},_s=class extends zs(qo){constructor(){super(...arguments),this.label="",this.position="top",this.alignment="left"}};p([it(Zo)],_s.prototype,"label",2),p([it(Pl(["top","center","bottom"]),{optional:!0})],_s.prototype,"position",2),p([it(Pl(["left","center","right"]),{optional:!0})],_s.prototype,"alignment",2);var MI=class extends zs(qo){},tr=class extends zs(qo){constructor(){super(...arguments),this.label=""}};p([it(Zo)],tr.prototype,"label",2),p([it(Pl(["top","inside","bottom"]),{optional:!0})],tr.prototype,"position",2),p([it(Pl(["left","center","right"]),{optional:!0})],tr.prototype,"alignment",2);function Bs(t){class e extends OI(Vm(t)){constructor(){super(...arguments),this.id=xI()}isValidWithContext(o,s){return super.isValid(s)}}return e}function Pd(t){class e extends t{constructor(){super(...arguments),this.start=new Jn,this.end=new Jn}}return p([it(Zn)],e.prototype,"start",2),p([it(Zn)],e.prototype,"end",2),e}function Bm(t){class e extends t{}return p([it(qn(Zo,Es,Xn,Qn))],e.prototype,"x",2),p([it(qn(Zo,Es,Xn,Qn))],e.prototype,"y",2),e}function zm(t){class e extends t{}return p([it(qn(Zo,Es,Xn,Qn))],e.prototype,"value",2),e}function Ed(t){class e extends t{constructor(){super(...arguments),this.background=new vI}}return p([it(Zn,{optional:!0})],e.prototype,"background",2),e}function Qo(t){class e extends t{constructor(){super(...arguments),this.handle=new DI}}return p([it(Zn,{optional:!0})],e.prototype,"handle",2),e}function Fm(t){class e extends t{constructor(){super(...arguments),this.axisLabel=new wd}}return p([it(Zn,{optional:!0})],e.prototype,"axisLabel",2),e}function _d(t){class e extends t{constructor(){super(...arguments),this.padding=void 0,this.textAlign="center",this.formatter=void 0}}return p([it(Rd,{optional:!0})],e.prototype,"padding",2),p([it(yI,{optional:!0})],e.prototype,"textAlign",2),p([it(uI,{optional:!0})],e.prototype,"formatter",2),e}function kI(t){class e extends t{}return e}function Bd(t){class e extends t{}return p([it($n,{optional:!0})],e.prototype,"extendStart",2),p([it($n,{optional:!0})],e.prototype,"extendEnd",2),e}function OI(t){class e extends t{}return p([it($n,{optional:!0})],e.prototype,"locked",2),e}function zd(t){class e extends t{setLocaleManager(o){this.localeManager??(this.localeManager=o)}}return e}function Vm(t){class e extends t{}return p([it($n,{optional:!0})],e.prototype,"visible",2),e}function Qi(t){class e extends t{}return p([it(Ld,{optional:!0})],e.prototype,"fill",2),p([it(_m,{optional:!0})],e.prototype,"fillOpacity",2),e}function ue(t){class e extends t{}return p([it(Ld,{optional:!0})],e.prototype,"stroke",2),p([it(_m,{optional:!0})],e.prototype,"strokeOpacity",2),p([it(Es,{optional:!0})],e.prototype,"strokeWidth",2),e}function vo(t){class e extends t{constructor(){super(...arguments),this.lineCap=void 0,this.computedLineDash=void 0}}return p([it(gI,{optional:!0})],e.prototype,"lineDash",2),p([it(Es,{optional:!0})],e.prototype,"lineDashOffset",2),p([it(fI,{optional:!0})],e.prototype,"lineStyle",2),e}function zs(t){class e extends t{constructor(){super(...arguments),this.fontSize=12,this.fontFamily="Verdana, sans-serif"}}return p([it(pI,{optional:!0})],e.prototype,"fontStyle",2),p([it(dI,{optional:!0})],e.prototype,"fontWeight",2),p([it(Rd)],e.prototype,"fontSize",2),p([it(Zo)],e.prototype,"fontFamily",2),p([it(Ld,{optional:!0})],e.prototype,"color",2),e}import{_ModuleSupport as TI}from"ag-charts-community";import{_ModuleSupport as AI}from"ag-charts-community";import{isDate as II,isNumber as NI,isString as CI}from"ag-charts-core";function Gm(t){return NI(t)||CI(t)||II(t)?{value:t,groupPercentage:0}:t??{value:void 0,groupPercentage:0}}function _t(t){return Gm(t)?.value}var{clampArray:LI}=AI;function Me(t,e){if(t.start==null||t.end==null)return;const i=Mt(t.start,e),o=Mt(t.end,e);if(!(i==null||o==null))return{x1:i.x,y1:i.y,x2:o.x,y2:o.y}}function Mt(t,e){const i=Do(t.x,e.xAxis),o=Do(t.y,e.yAxis);return{x:i,y:o}}function Do(t,e){if(t==null)return 0;const{value:i,groupPercentage:o}=Gm(t),{scale:s,snapToGroup:a}=e,n=s.bandwidth===0?s.step??0:s.bandwidth??0,r=a?n/2:n*o;return s.convert(i)+r}function ke(t,e){const i=El(t.x,e.xAxis),o=El(t.y,e.yAxis);return{x:i,y:o}}function El(t,e){const{