"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var i in e)__defProp(t,i,{get:e[i],enumerable:!0})},__copyProps=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of __getOwnPropNames(e))!__hasOwnProp.call(t,s)&&s!==i&&__defProp(t,s,{get:()=>e[s],enumerable:!(o=__getOwnPropDesc(e,s))||o.enumerable});return t},__reExport=(t,e,i)=>(__copyProps(t,e,"default"),i&&__copyProps(i,e,"default")),__toCommonJS=t=>__copyProps(__defProp({},"__esModule",{value:!0}),t),__decorateClass=(t,e,i,o)=>{for(var s=o>1?void 0:o?__getOwnPropDesc(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&&__defProp(e,i,s),s},main_exports={};__export(main_exports,{AgChartsEnterpriseModule:()=>AgChartsEnterpriseModule,LicenseManager:()=>LicenseManager2,setupEnterpriseModules:()=>setupEnterpriseModules2}),module.exports=__toCommonJS(main_exports);var import_ag_charts_community271=require("ag-charts-community"),MD5=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<>>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>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>16)+(e>>16)+(i>>16)<<16|i&65535}};function missingOrEmpty(t){return t==null||t.length===0}var LICENSE_TYPES={"01":"GRID","02":"CHARTS","0102":"BOTH"},LICENSING_HELP_URL="https://www.ag-grid.com/charts/licensing/",_LicenseManager=class at{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new MD5,this.md5.init()}validateLicense(){const e=this.getLicenseDetails(at.licenseKey,at.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=at.getChartsReleaseDate(),a=at.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(at.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]=at.extractBracketedInformation(i);return{md5:s,license:a,version:n,isTrial:r,type:l}}getLicenseDetails(e,i=!1){const o="CHARTS";if(missingOrEmpty(e))return{licenseKey:e,valid:!1,missing:!0,currentLicenseType:o};const s=at.getChartsReleaseDate(),{md5:a,license:n,version:r,isTrial:l,type:c}=at.extractLicenseComponents(e);let h=a===this.md5.md5(n)&&e.indexOf("For_Trialing_ag-Grid_Only")===-1,d,u,p=null,g=!1,y;function f(){d=pp,r){case"legacy":case"2":{h=!1;break}case"3":missingOrEmpty(c)?h=!1:(y=c,c!==LICENSE_TYPES["02"]&&c!==LICENSE_TYPES["0102"]?(h=!1,g=!0):l&&f())}return h?{licenseKey:e,valid:h,expiry:at.formatDate(p),expired:u,version:r,isTrial:l,trialExpired:d,invalidLicenseTypeForCombo:i?y!=="BOTH":void 0,incorrectLicenseType:g,currentLicenseType:o,suppliedLicenseType:y}:{licenseKey:e,valid:h,incorrectLicenseType:g,currentLicenseType:o,suppliedLicenseType:y}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!missingOrEmpty(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(at.decode(at.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>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=at.utf8_decode(o),o}static utf8_decode(e){e=e.replace(/rn/g,"n");let i="";for(let o=0;o127&&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){at.gridContext=e}static setLicenseKey(e){at.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=LICENSE_TYPES[i.filter(r=>LICENSE_TYPES[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){at.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 ${LICENSING_HELP_URL}.`," ","*"),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 ${LICENSING_HELP_URL}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""))),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,i,o){at.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){at.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){at.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"}};_LicenseManager.RELEASE_INFORMATION="MTc0MDAzOTI3Mjg4Mg==",_LicenseManager.gridContext=!1;var LicenseManager=_LicenseManager,import_ag_charts_community270=require("ag-charts-community"),import_ag_charts_community5=require("ag-charts-community");function loopSymmetrically(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)}var import_ag_charts_community=require("ag-charts-community"),{OR,POSITIVE_NUMBER,NAN,AxisInterval,Validate}=import_ag_charts_community._ModuleSupport,AngleAxisInterval=class extends AxisInterval{constructor(){super(...arguments),this.minSpacing=NaN}};__decorateClass([Validate(OR(POSITIVE_NUMBER,NAN))],AngleAxisInterval.prototype,"minSpacing",2);var import_ag_charts_community4=require("ag-charts-community"),import_ag_charts_community3=require("ag-charts-community"),import_ag_charts_community2=require("ag-charts-community"),{BaseProperties,ChartAxisDirection,ARRAY,BOOLEAN,COLOR_STRING,FONT_STYLE,FONT_WEIGHT,LINE_DASH,NUMBER,OBJECT,POSITIVE_NUMBER:POSITIVE_NUMBER2,RATIO,STRING,UNION,AND,Validate:Validate2,MATCHING_CROSSLINE_TYPE,createId,Group}=import_ag_charts_community2._ModuleSupport,PolarCrossLineLabel=class extends BaseProperties{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};__decorateClass([Validate2(BOOLEAN,{optional:!0})],PolarCrossLineLabel.prototype,"enabled",2),__decorateClass([Validate2(STRING,{optional:!0})],PolarCrossLineLabel.prototype,"text",2),__decorateClass([Validate2(FONT_STYLE,{optional:!0})],PolarCrossLineLabel.prototype,"fontStyle",2),__decorateClass([Validate2(FONT_WEIGHT,{optional:!0})],PolarCrossLineLabel.prototype,"fontWeight",2),__decorateClass([Validate2(POSITIVE_NUMBER2)],PolarCrossLineLabel.prototype,"fontSize",2),__decorateClass([Validate2(STRING)],PolarCrossLineLabel.prototype,"fontFamily",2),__decorateClass([Validate2(NUMBER)],PolarCrossLineLabel.prototype,"padding",2),__decorateClass([Validate2(COLOR_STRING,{optional:!0})],PolarCrossLineLabel.prototype,"color",2),__decorateClass([Validate2(BOOLEAN,{optional:!0})],PolarCrossLineLabel.prototype,"parallel",2);var PolarCrossLine=class extends BaseProperties{constructor(){super(...arguments),this.id=createId(this),this.shape="polygon",this.label=new PolarCrossLineLabel,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=ChartAxisDirection.X,this.axisInnerRadius=0,this.axisOuterRadius=0,this.lineGroup=new Group({name:this.id}),this.rangeGroup=new Group({name:this.id}),this.labelGroup=new Group({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}};__decorateClass([Validate2(BOOLEAN,{optional:!0})],PolarCrossLine.prototype,"enabled",2),__decorateClass([Validate2(UNION(["range","line"],"a crossLine type"),{optional:!0})],PolarCrossLine.prototype,"type",2),__decorateClass([Validate2(AND(MATCHING_CROSSLINE_TYPE("range"),ARRAY.restrict({length:2})),{optional:!0})],PolarCrossLine.prototype,"range",2),__decorateClass([Validate2(MATCHING_CROSSLINE_TYPE("value"),{optional:!0})],PolarCrossLine.prototype,"value",2),__decorateClass([Validate2(COLOR_STRING,{optional:!0})],PolarCrossLine.prototype,"fill",2),__decorateClass([Validate2(RATIO,{optional:!0})],PolarCrossLine.prototype,"fillOpacity",2),__decorateClass([Validate2(COLOR_STRING,{optional:!0})],PolarCrossLine.prototype,"stroke",2),__decorateClass([Validate2(NUMBER,{optional:!0})],PolarCrossLine.prototype,"strokeWidth",2),__decorateClass([Validate2(RATIO,{optional:!0})],PolarCrossLine.prototype,"strokeOpacity",2),__decorateClass([Validate2(LINE_DASH,{optional:!0})],PolarCrossLine.prototype,"lineDash",2),__decorateClass([Validate2(UNION(["polygon","circle"],"a shape"))],PolarCrossLine.prototype,"shape",2),__decorateClass([Validate2(OBJECT)],PolarCrossLine.prototype,"label",2);var{ChartAxisDirection:ChartAxisDirection2,validateCrossLineValues,normalizeAngle360,isNumberEqual,Group:Group2,Path,Sector,RotatableText,ContinuousScale,BandScale}=import_ag_charts_community3._ModuleSupport,AngleCrossLine=class extends PolarCrossLine{constructor(){super(),this.direction=ChartAxisDirection2.X,this.polygonNode=new Path,this.sectorNode=new Sector,this.lineNode=new Path,this.crossLineRange=new Group2,this.labelNode=new RotatableText,this.ticks=[],this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.crossLineRange.append(this.lineNode),this.labelGroup.append(this.labelNode)}update(t){const{scale:e,shape:i,type:o,value:s,range:a}=this;if(!e||!o||!validateCrossLineValues(o,s,a,e,()=>{if(!ContinuousScale.is(e))return!0;const[r,l]=a??[s,void 0],{domain:c}=e;return r>=c[0]&&r<=c[1]&&(o==="line"||l>=r&&l<=c[1])})){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,o==="line"&&i==="circle"&&BandScale.is(e)&&(this.type="range",this.range=[s,s]),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(g=>o.convert(g));e.visible=!0,this.setSectorNodeProps(e);const{path:p}=e;p.clear(!0),u.forEach((g,y)=>{const f=l*Math.cos(g),m=l*Math.sin(g);y===0?p.moveTo(f,m):p.lineTo(f,m)}),r===0?p.lineTo(0,0):u.slice().reverse().forEach(g=>{const y=r*Math.cos(g),f=r*Math.sin(g);p.lineTo(y,f)}),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 import_ag_charts_community3._ModuleSupport.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 p=normalizeAngle360(s.convert(this.value)),g=1.5*Math.PI,y=isNumberEqual(p,g)||p>g||pnormalizeAngle360(s.convert(b)));let y=(p+g)/2;p>g&&(y-=Math.PI),y=normalizeAngle360(y);const f=(isNumberEqual(y,0)||y>0)&&yr.value);return{niceDomain:s,primaryTickCount:void 0,tickDomain:s,ticks:n,fractionDigits:0,bbox:this.getBBox()}}update(){super.update(),this.updateRadiusLine()}normalizedAngles(){const t=normalizeAngle3602(-Math.PI/2+toRadians(this.startAngle)),e=this.endAngle!=null?normalizeAngle360Inclusive(toRadians(this.endAngle)-toRadians(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=isNumberEqual2(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:normalizeAngle3602(o),endAngle:normalizeAngle3602(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],p=t.convert(h);r.x1=a*Math.cos(p),r.y1=a*Math.sin(p),r.x2=e*Math.cos(p),r.y2=e*Math.sin(p),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 RotatableText2,l=i.x-this.translation.x,c=i.x+i.width-this.translation.x,h=t.map((d,u)=>{const{value:p}=d,g=s+o.spacing+n.size,y=a.convert(p),f=Math.cos(y),m=Math.sin(y),b=g*f,x=g*m,{textAlign:S,textBaseline:M}=this.getLabelAlign(y),A=u===t.length-1&&p!==t[0]&&isNumberEqual2(normalizeAngle3602(y),normalizeAngle3602(a.convert(t[0]))),v=this.getLabelRotation(y);let k=String(p);if(o.formatter){const{callbackCache:C}=this.moduleCtx;k=C.call(o.formatter,{value:p,index:u})??""}r.text=k,r.x=b,r.y=x,r.setFont(o),r.textAlign=S,r.textBaseline=M,r.rotation=v,v&&(r.rotationCenterX=b,r.rotationCenterY=x);let D=v?Transformable.toCanvas(r):r.getBBox();if(D&&e.hideWhenNecessary&&!v){const C=l-D.x,_=D.x+D.width-c,I=1;if(C>I||_>I){const T=D.width-Math.max(C,_);k=TextWrapper.wrapText(k,{maxWidth:T,font:o,textWrap:"never"}),k===TextUtils.EllipsisChar&&(k=""),r.text=k,D=r.getBBox()}}return{text:k,x:b,y:x,textAlign:S,textBaseline:M,hidden:k===""||d.hidden||A,rotation:v,box:D}});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:BBox.merge(i)}getLabelOrientation(){const{label:t}=this;return t instanceof AngleAxisLabel?t.orientation:"fixed"}getLabelRotation(t){let e=toRadians(this.label.rotation??0);t=normalizeAngle3602(t);const i=this.getLabelOrientation();return i==="parallel"?(e+=t,t>=0&&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=isNumberEqual2(e,0),r=isNumberEqual2(i,0),l=isNumberEqual2(e,1),c=isNumberEqual2(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 AngleCrossLine&&(o.ticks=this.tickData.map(s=>s.value),o.shape=t,o.axisOuterRadius=e,o.axisInnerRadius=e*i)}),super.updateCrossLines()}};AngleAxis.CrossLineConstructor=AngleCrossLine,__decorateClass([ProxyOnWrite("rotation"),Validate3(NUMBER2)],AngleAxis.prototype,"startAngle",2),__decorateClass([Validate3(NUMBER2,{optional:!0})],AngleAxis.prototype,"endAngle",2);var{RATIO:RATIO2,OBJECT:OBJECT2,Validate:Validate4,isNumberEqual:isNumberEqual3,CategoryScale}=import_ag_charts_community5._ModuleSupport,AngleCategoryAxis=class extends AngleAxis{constructor(t){super(t,new CategoryScale),this.groupPaddingInner=0,this.paddingInner=0,this.interval=new AngleAxisInterval}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||isNaN(o))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;cMath.PI)break;const u=e*Math.cos(d),p=e*Math.sin(d);if(Math.sqrt((u-r)**2+(p-l)**2)>o){const y=new Set([a]);return loopSymmetrically(s,c,(f,m)=>{y.add(m)}),s.map(f=>{const m=y.has(f);return{value:f,visible:m}})}}return[{value:a,visible:!0}]}avoidLabelCollisions(t){let{minSpacing:e}=this.label;if(Number.isFinite(e)||(e=0),t.length<3)return;const i=(l,c)=>{if(l.hidden||c.hidden)return!1;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=isNumberEqual3(o.x,s.x)&&isNumberEqual3(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(!loopSymmetrically(c,l,i)){loopSymmetrically(c,l,(d,u)=>{a.add(u)});break}}t.forEach(l=>{a.has(l)||(l.hidden=!0,l.box=void 0)})}};AngleCategoryAxis.className="AngleCategoryAxis",AngleCategoryAxis.type="angle-category",__decorateClass([Validate4(RATIO2)],AngleCategoryAxis.prototype,"groupPaddingInner",2),__decorateClass([Validate4(RATIO2)],AngleCategoryAxis.prototype,"paddingInner",2),__decorateClass([Validate4(OBJECT2)],AngleCategoryAxis.prototype,"interval",2);var AngleCategoryAxisModule={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-category",moduleFactory:t=>new AngleCategoryAxis(t)},import_ag_charts_community7=require("ag-charts-community"),import_ag_charts_community6=require("ag-charts-community"),{range,isDenseInterval,isNumberEqual:isNumberEqual4,LinearScale}=import_ag_charts_community6._ModuleSupport,LinearAngleScale=class mt extends LinearScale{constructor(){super(...arguments),this.arcLength=0}static getNiceStepAndTickCount(e,i){const[o,s]=i;let a=LinearScale.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(!isDenseInterval((r-n)/c,h))return range(n,r,c)}let l;if(s&&this.hasNiceRange()){const c=super.niceDomain(e,i);l=mt.getNiceStepAndTickCount(e,c).step}else l=LinearScale.getTickStep(n,r,e);return range(n,r,l)}hasNiceRange(){const e=this.range.slice().sort((o,s)=>o-s);return[Math.PI,2*Math.PI].some(o=>isNumberEqual4(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}=mt.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:AND2,Default,GREATER_THAN,LESS_THAN,NUMBER_OR_NAN,OBJECT:OBJECT3,Validate:Validate5,angleBetween,isNumberEqual:isNumberEqual5,normalisedExtentWithMetadata,findMinMax}=import_ag_charts_community7._ModuleSupport,AngleNumberAxis=class extends AngleAxis{constructor(t){super(t,new LinearAngleScale),this.shape="circle",this.min=NaN,this.max=NaN,this.interval=new AngleAxisInterval}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:o,clipped:s}=normalisedExtentWithMetadata(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=angleBetween(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])),p=Math.max(h,Math.min(d,u)),g={nice:o,interval:a,tickCount:p,minTickCount:h,maxTickCount:d};l=e.ticks(g,t)}else{const[c,h]=findMinMax(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){let{minSpacing:e}=this.label;Number.isFinite(e)||(e=0);const i=(a,n)=>{if(a.hidden||n.hidden)return!1;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&&isNumberEqual5(o.x,s.x)&&isNumberEqual5(o.y,s.y)&&(s.hidden=!0);for(let a=1;a{l%a>0&&(r.hidden=!0,r.box=void 0)});return}}t.forEach((a,n)=>{n>0&&(a.hidden=!0,a.box=void 0)})}};AngleNumberAxis.className="AngleNumberAxis",AngleNumberAxis.type="angle-number",__decorateClass([Validate5(AND2(NUMBER_OR_NAN,LESS_THAN("max"))),Default(NaN)],AngleNumberAxis.prototype,"min",2),__decorateClass([Validate5(AND2(NUMBER_OR_NAN,GREATER_THAN("min"))),Default(NaN)],AngleNumberAxis.prototype,"max",2),__decorateClass([Validate5(OBJECT3)],AngleNumberAxis.prototype,"interval",2);var AngleNumberAxisModule={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-number",moduleFactory:t=>new AngleNumberAxis(t)},import_ag_charts_community8=require("ag-charts-community"),{OrdinalTimeScale}=import_ag_charts_community8._ModuleSupport,OrdinalTimeAxis=class extends import_ag_charts_community8._ModuleSupport.CategoryAxis{constructor(t){super(t,new OrdinalTimeScale)}};OrdinalTimeAxis.className="OrdinalTimeAxis",OrdinalTimeAxis.type="ordinal-time";var OrdinalTimeAxisModule={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ordinal-time",moduleFactory:t=>new OrdinalTimeAxis(t)},import_ag_charts_community11=require("ag-charts-community"),import_ag_charts_community10=require("ag-charts-community"),import_ag_charts_community9=require("ag-charts-community"),{ChartAxisDirection:ChartAxisDirection4,Validate:Validate6,NUMBER:NUMBER3,validateCrossLineValues:validateCrossLineValues2,clamp,normalizeAngle360:normalizeAngle3603,toRadians:toRadians2,isNumberEqual:isNumberEqual6,Group:Group3,Path:Path3,Sector:Sector2,RotatableText:RotatableText3}=import_ag_charts_community9._ModuleSupport,RadiusCrossLineLabel=class extends PolarCrossLineLabel{constructor(){super(...arguments),this.positionAngle=void 0}};__decorateClass([Validate6(NUMBER3,{optional:!0})],RadiusCrossLineLabel.prototype,"positionAngle",2);var RadiusCrossLine=class extends PolarCrossLine{constructor(){super(),this.direction=ChartAxisDirection4.Y,this.label=new RadiusCrossLineLabel,this.polygonNode=new Path3,this.sectorNode=new Sector2,this.crossLineRange=new Group3,this.labelNode=new RotatableText3,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,type:i,value:o,range:s}=this;if(!e||!i||!validateCrossLineValues2(i,o,s,e)){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}i==="line"&&e instanceof import_ag_charts_community9._ModuleSupport.BandScale&&(this.type="range",this.range=[o,o]),this.updateRadii();const{innerRadius:a,outerRadius:n}=this;t&&(t=a>=this.axisInnerRadius&&n<=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=clamp(e,n+l,i),h=clamp(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=normalizeAngle3603(toRadians2((i.positionAngle??0)-90)),l=(isNumberEqual6(r,0)||r>0)&&rthis.getTickLabelProps(b,c));return this.generatedTicks={ticks:u,labels:m},{ticks:p,tickDomain:g,niceDomain:f,primaryTickCount:d,fractionDigits:y,bbox:void 0}}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=import_ag_charts_community10._ModuleSupport.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,p)=>{const{stroke:g,lineDash:y}=t[p%s];u.stroke=g,u.strokeWidth=e,u.lineDash=y,u.fill=void 0},[n,r]=this.gridRange??[0,2*Math.PI],l=isNumberEqual7(r-n,2*Math.PI),d=i==="circle"?(u,p)=>{const{path:g}=u;g.clear(!0);const y=this.getTickRadius(p);l?(g.moveTo(y,0),g.arc(0,0,y,0,2*Math.PI)):(g.moveTo(y*Math.cos(n),y*Math.sin(n)),g.arc(0,0,y,normalizeAngle3604(n),normalizeAngle3604(r))),l&&g.closePath()}:(u,p)=>{const{path:g}=u,y=this.gridAngles;if(g.clear(!0),!y||y.length<3)return;const f=this.getTickRadius(p);y.forEach((m,b)=>{const x=f*Math.cos(m),S=f*Math.sin(m);b===0?g.moveTo(x,S):g.lineTo(x,S),y.forEach((M,A)=>{const v=f*Math.cos(M),k=f*Math.sin(M);A===0?g.moveTo(v,k):g.lineTo(v,k)}),g.closePath()}),g.closePath()};this.gridPathSelection.each((u,p,g)=>{a(u,g),d(u,p)})}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=-Caption.SMALL_PADDING,n.textAlign="center",n.textBaseline="bottom",n.text=o.call(s,this.getTitleFormatterParams())),n.visible=a}updateCrossLines(){this.crossLines.forEach(t=>{if(t instanceof RadiusCrossLine){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 RadiusAxisLabel}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}}};RadiusAxis.CrossLineConstructor=RadiusCrossLine,__decorateClass([Validate7(NUMBER4),Default2(0)],RadiusAxis.prototype,"positionAngle",2);var{RATIO:RATIO3,ProxyPropertyOnWrite,Validate:Validate8,CategoryScale:CategoryScale2}=import_ag_charts_community11._ModuleSupport,RadiusCategoryAxis=class extends RadiusAxis{constructor(t){super(t,new CategoryScale2),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(CategoryScale2.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}}};RadiusCategoryAxis.className="RadiusCategoryAxis",RadiusCategoryAxis.type="radius-category",__decorateClass([Validate8(RATIO3)],RadiusCategoryAxis.prototype,"groupPaddingInner",2),__decorateClass([ProxyPropertyOnWrite("scale","paddingInner"),Validate8(RATIO3)],RadiusCategoryAxis.prototype,"paddingInner",2),__decorateClass([ProxyPropertyOnWrite("scale","paddingOuter"),Validate8(RATIO3)],RadiusCategoryAxis.prototype,"paddingOuter",2);var RadiusCategoryAxisModule={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-category",moduleFactory:t=>new RadiusCategoryAxis(t)},import_ag_charts_community12=require("ag-charts-community"),{AND:AND3,Default:Default3,GREATER_THAN:GREATER_THAN2,LESS_THAN:LESS_THAN2,NUMBER_OR_NAN:NUMBER_OR_NAN2,Validate:Validate9,normalisedExtentWithMetadata:normalisedExtentWithMetadata2,LinearScale:LinearScale2}=import_ag_charts_community12._ModuleSupport,RadiusNumberAxis=class extends RadiusAxis{constructor(t){super(t,new LinearScale2),this.shape="polygon",this.min=NaN,this.max=NaN}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}=normalisedExtentWithMetadata2(t,e,i);return{domain:o,clipped:s}}};RadiusNumberAxis.className="RadiusNumberAxis",RadiusNumberAxis.type="radius-number",__decorateClass([Validate9(AND3(NUMBER_OR_NAN2,LESS_THAN2("max"))),Default3(NaN)],RadiusNumberAxis.prototype,"min",2),__decorateClass([Validate9(AND3(NUMBER_OR_NAN2,GREATER_THAN2("min"))),Default3(NaN)],RadiusNumberAxis.prototype,"max",2);var RadiusNumberAxisModule={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-number",moduleFactory:t=>new RadiusNumberAxis(t)},import_ag_charts_community14=require("ag-charts-community"),import_ag_charts_community13=require("ag-charts-community"),{Chart}=import_ag_charts_community13._ModuleSupport;function isFlowProportion(t){return t.type==="sankey"||t.type==="chord"}var FlowProportionChart=class extends Chart{getChartType(){return"flow-proportion"}async updateData(){await super.updateData();const{nodes:t}=this.getOptions();this.series.forEach(e=>{isFlowProportion(e)&&e.setChartNodes(t)})}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:o}=t;o.shrink(this.seriesArea.padding.toJson());const s=o.clone();this.seriesRect=s,this.animationRect=s,e.visible=this.series.some(a=>a.visible);for(const a of[e,i])a.translationX=Math.floor(s.x),a.translationY=Math.floor(s.y);this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:e.visible,rect:s,paddedRect:s}})}};FlowProportionChart.className="FlowProportionChart",FlowProportionChart.type="flow-proportion";var{isAgFlowProportionChartOptions}=import_ag_charts_community14._ModuleSupport,FlowProportionChartModule={type:"chart",name:"flow-proportion",detect:isAgFlowProportionChartOptions,create(t,e){return new FlowProportionChart(t,e)}},import_ag_charts_community16=require("ag-charts-community"),import_ag_charts_community15=require("ag-charts-community"),logger_exports={};__export(logger_exports,{error:()=>error,errorOnce:()=>errorOnce,log:()=>log,logGroup:()=>logGroup,reset:()=>reset,table:()=>table,warn:()=>warn,warnOnce:()=>warnOnce});var doOnceCache=new Set;function log(...t){console.log(...t)}function warn(t,...e){console.warn(`AG Charts - ${t}`,...e)}function error(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)}function table(...t){console.table(...t)}function warnOnce(t,...e){const i=`Logger.warn: ${t}`;doOnceCache.has(i)||(warn(t,...e),doOnceCache.add(i))}function errorOnce(t,...e){const i=`Logger.error: ${t}`;doOnceCache.has(i)||(error(t,...e),doOnceCache.add(i))}function reset(){doOnceCache.clear()}function logGroup(t,e){console.groupCollapsed(t);try{return e()}finally{console.groupEnd()}}function unique(t){return Array.from(new Set(t))}function findMaxValue(t,e,i){if(t>e)return;let o;for(;e>=t;){const s=Math.floor((e+t)/2),a=i(s);a==null?e=s-1:(o=a,t=s+1)}return o}function debounce(t,e=0,i){const{leading:o=!1,trailing:s=!0,maxWait:a=1/0}=i??{};let n,r;if(ar=null,e),t(...c);return}let h=e;if(a!==1/0&&r){const d=Date.now()-r;e>a-d&&(h=a-d)}clearTimeout(n),r??(r=Date.now()),n=setTimeout(()=>{r=null,s&&t(...c)},h)}return Object.assign(l,{cancel(){clearTimeout(n),r=null}})}function*iterate(...t){for(const e of t)yield*e}function isDefined(t){return t!=null}function isArray(t){return Array.isArray(t)}function isDate(t){return t instanceof Date}function isValidDate(t){return isDate(t)&&!isNaN(Number(t))}function isObject(t){return typeof t=="object"&&t!==null&&!isArray(t)}function isString(t){return typeof t=="string"}function isNumber(t){return typeof t=="number"}function isFiniteNumber(t){return Number.isFinite(t)}var{CartesianAxis,Chart:Chart2,ChartAxisDirection:ChartAxisDirection6,LinearScale:LinearScale3,PolarAxis,isBetweenAngles,normalizeAngle360Inclusive:normalizeAngle360Inclusive2,sectorBox}=import_ag_charts_community15._ModuleSupport;function isRadialGaugeSeries(t){return t.type==="radial-gauge"}function isLinearGaugeSeries(t){return t.type==="linear-gauge"}var GaugeChart=class extends Chart2{getChartType(){return"gauge"}updateRadialGauge(t,e){const i=this.axes.find(D=>D.direction===ChartAxisDirection6.X);if(!(i instanceof PolarAxis))return;i.computeRange();const o=t.x,s=o+t.width,a=t.y,n=a+t.height,[r,l]=i.range,h=normalizeAngle360Inclusive2(l-r)>Math.PI,d=h||isBetweenAngles(1.5*Math.PI,r,l),u=h||isBetweenAngles(0*Math.PI,r,l),p=h||isBetweenAngles(.5*Math.PI,r,l),g=h||isBetweenAngles(1*Math.PI,r,l);let y;g&&!u?y="right":!g&&u?y="left":y="center";let f;d&&!p?f="bottom":!d&&p?f="top":f="middle";const m=sectorBox({startAngle:r,endAngle:l,innerRadius:0,outerRadius:.5}),b=-(m.x+m.width/2)*2,x=-(m.y+m.height/2)*2,{minimumRadius:S=0,maximumRadius:M}=e,A=Math.max(.5*Math.min(t.width/m.width,t.height/m.height),0);let v=Math.min(M??1/0,Math.max(A,S??0));const k=8;for(let D=0;D0)v=Math.max(v-O,S);else break}i.translation.x=t.x+t.width/2+b*v,i.translation.y=t.y+t.height/2+x*v,e.centerX=t.width/2+b*v,e.centerY=t.height/2+x*v,e.radius=v,e.textAlign=y,e.verticalAlign=f,(v===0||v>A)&&logger_exports.warnOnce("There was insufficient space to display the Radial Gauge.")}updateLinearGauge(t,e){const i=this.axes.find(m=>m.direction===ChartAxisDirection6.X),o=this.axes.find(m=>m.direction===ChartAxisDirection6.Y);if(!(i instanceof CartesianAxis)||!(o instanceof CartesianAxis))return t;const{horizontal:s,thickness:a}=e;let n=0,r=0;const l=new LinearScale3,c=s?i:o;l.domain=[0,100],l.range=c.range;const h=l.ticks({nice:c.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0});s?n=e.computeInset(ChartAxisDirection6.X,h):r=e.computeInset(ChartAxisDirection6.Y,h);const d=t.width-Math.abs(n),u=t.height-Math.abs(r),{width:p,height:g}=s?{width:Math.max(d,0),height:Math.max(Math.min(u,a),0)}:{width:Math.max(Math.min(d,a),0),height:Math.max(u,0)},y=t.x+(d-p)/2+Math.max(n,0),f=t.y+(u-g)/2-Math.min(r,0);i.range=[0,p],i.gridLength=p,i.calculateLayout(),i.translation.x=y,i.translation.y=f+(i.position==="bottom"?a:0),o.range=[0,g],o.gridLength=g,o.calculateLayout(),o.translation.x=y+(o.position==="right"?a:0),o.translation.y=f,e.originX=y-t.x,e.originY=f-t.y,(p===0||g===0)&&logger_exports.warnOnce("There was insufficient space to display the Linear Gauge.")}performLayout(t){const{seriesRoot:e,annotationRoot:i,series:o,seriesArea:s}=this,{layoutBox:a}=t,n=a.clone();a.shrink(s.padding.toJson());const r=this.series[0];isRadialGaugeSeries(r)?this.updateRadialGauge(a,r):isLinearGaugeSeries(r)&&this.updateLinearGauge(a,r),this.axes.forEach(l=>l.update()),this.seriesRect=n.clone().translate(n.x-a.x,n.y-a.y),this.animationRect=a,e.visible=o.some(l=>l.visible);for(const l of[e,i])l.translationX=Math.floor(a.x),l.translationY=Math.floor(a.y);this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:e.visible,rect:n,paddedRect:a}})}getAriaLabel(){const t=[],e=this.getCaptionText();e.length!==0&&t.push(e);for(const o of this.series)t.push(o.getCaptionText());const i=t.join(". ");return this.ctx.localeManager.t("ariaAnnounceGaugeChart",{caption:i})}};GaugeChart.className="GaugeChart",GaugeChart.type="gauge";var{isAgGaugeChartOptions}=import_ag_charts_community16._ModuleSupport,GaugeChartModule={type:"chart",name:"gauge",detect:isAgGaugeChartOptions,create(t,e){return new GaugeChart(t,e)}},import_ag_charts_community18=require("ag-charts-community"),import_ag_charts_community17=require("ag-charts-community"),{Chart:Chart3}=import_ag_charts_community17._ModuleSupport,HierarchyChart=class extends Chart3{getChartType(){return"hierarchy"}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:o}=t;o.shrink(this.seriesArea.padding.toJson());const s=o.clone();this.seriesRect=s,this.animationRect=s;for(const a of[e,i])a.translationX=Math.floor(s.x),a.translationY=Math.floor(s.y);e.visible=this.series[0].visible,e.setClipRect(s.clone()),this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:s,paddedRect:s}})}getAriaLabel(){const t=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:t})}};HierarchyChart.className="HierarchyChart",HierarchyChart.type="hierarchy";var{isAgHierarchyChartOptions}=import_ag_charts_community18._ModuleSupport,HierarchyChartModule={type:"chart",name:"hierarchy",detect:isAgHierarchyChartOptions,create(t,e){return new HierarchyChart(t,e)}},import_ag_charts_community20=require("ag-charts-community"),import_ag_charts_community19=require("ag-charts-community"),{Chart:Chart4}=import_ag_charts_community19._ModuleSupport,StandaloneChart=class extends Chart4{getChartType(){return"standalone"}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:o}=t;o.shrink(this.seriesArea.padding.toJson());const s=o.clone();this.seriesRect=s,this.animationRect=s;for(const a of[e,i])a.translationX=Math.floor(o.x),a.translationY=Math.floor(o.y);e.visible=this.series[0].visible,this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:s,paddedRect:o}})}getAriaLabel(){const t=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:t})}};StandaloneChart.className="StandaloneChart",StandaloneChart.type="standalone";var{isAgStandaloneChartOptions}=import_ag_charts_community20._ModuleSupport,StandaloneChartModule={type:"chart",name:"standalone",detect:isAgStandaloneChartOptions,create(t,e){return new StandaloneChart(t,e)}},import_ag_charts_community22=require("ag-charts-community"),import_ag_charts_community21=require("ag-charts-community"),{Chart:Chart5,MercatorScale,NumberAxis}=import_ag_charts_community21._ModuleSupport;function isTopologySeries(t){return t.type==="map-shape"||t.type==="map-line"||t.type==="map-marker"||t.type==="map-shape-background"||t.type==="map-line-background"}var TopologyChart=class extends Chart5{constructor(t,e){super(t,e),this.xAxis=new NumberAxis(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new NumberAxis(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}async updateData(){await super.updateData();const{topology:t}=this.getOptions();this.series.forEach(e=>{isTopologySeries(e)&&e.setChartTopology(t)})}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:o}=t;o.shrink(this.seriesArea.padding.toJson());const s=o.clone();this.seriesRect=s,this.animationRect=s;const a=this.series.filter(isTopologySeries),n=a.reduce((c,h)=>{if(!h.visible)return c;const d=h.topologyBounds;return d==null?c:c==null?d:(c.merge(d),c)},void 0);let r;if(n!=null){const{lon0:c,lat0:h,lon1:d,lat1:u}=n,p=[[c,h],[d,u]],g=MercatorScale.bounds(p),{width:y,height:f}=s,m=Math.min(y/g.width,f/g.height),b=g.width*m,x=g.height*m,S=(y-b)/2,M=(f-x)/2,A=S,v=M,k=S+b,D=M+x,C=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),_=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),I=(k-A)/(C.max-C.min),T=A-I*C.min,O=(D-v)/(1-_.min-(1-_.max)),w=v-O*(1-_.max);r=new MercatorScale(p,[[T,w],[T+I,w+O]])}a.forEach(c=>{c.scale=r});const l=this.series.some(c=>c.visible);e.visible=l;for(const c of[e,i])c.translationX=Math.floor(s.x),c.translationY=Math.floor(s.y),c.setClipRect(s.clone());this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:l,rect:s,paddedRect:s}})}};TopologyChart.className="TopologyChart",TopologyChart.type="topology";var{isAgTopologyChartOptions}=import_ag_charts_community22._ModuleSupport,TopologyChartModule={type:"chart",name:"topology",detect:isAgTopologyChartOptions,create(t,e){return new TopologyChart(t,e)}},import_ag_charts_community23=require("ag-charts-community"),{BOOLEAN:BOOLEAN3,POSITIVE_NUMBER:POSITIVE_NUMBER3,ObserveChanges,Validate:Validate10}=import_ag_charts_community23._ModuleSupport,Animation=class extends import_ag_charts_community23._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!0,t.animationManager.skip(!1)}};__decorateClass([ObserveChanges((t,e)=>{t.ctx.animationManager.skip(!e)}),Validate10(BOOLEAN3)],Animation.prototype,"enabled",2),__decorateClass([ObserveChanges((t,e)=>{t.ctx.animationManager.defaultDuration=e}),Validate10(POSITIVE_NUMBER3,{optional:!0})],Animation.prototype,"duration",2);var AnimationModule={type:"root",optionsKey:"animation",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new Animation(t),themeTemplate:{animation:{enabled:!0}}},import_ag_charts_community98=require("ag-charts-community"),import_ag_charts_community24=require("ag-charts-community"),textInputTemplate_default='
',{focusCursorAtEnd}=import_ag_charts_community24._ModuleSupport,moduleId="text-input",canvasOverlay="canvas-overlay",TextInput=class extends import_ag_charts_community24._ModuleSupport.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(canvasOverlay,moduleId),this.element.classList.add("ag-charts-text-input"),this.destroyFns.push(()=>t.domManager.removeChild(canvasOverlay,moduleId))}setKeyDownHandler(t){this.element.addEventListener("keydown",t),this.destroyFns.push(()=>this.element.removeEventListener("keydown",t))}show(t){this.element.innerHTML=textInputTemplate_default;const e=this.element.firstElementChild;import_ag_charts_community24._ModuleSupport.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",focusCursorAtEnd(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 import_ag_charts_community24._ModuleSupport.BBox(t,e,i,o)}},import_ag_charts_community25=require("ag-charts-community"),{BOOLEAN:BOOLEAN4,BaseProperties:BaseProperties2,Validate:Validate11,UNION:UNION3}=import_ag_charts_community25._ModuleSupport,AXIS_TYPE=UNION3(["x","y","xy"],"an axis type"),AxesButtons=class extends BaseProperties2{constructor(){super(...arguments),this.enabled=!1,this.axes="y"}};__decorateClass([Validate11(BOOLEAN4)],AxesButtons.prototype,"enabled",2),__decorateClass([Validate11(AXIS_TYPE,{optional:!0})],AxesButtons.prototype,"axes",2);var import_ag_charts_community47=require("ag-charts-community"),AnnotationType=(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))(AnnotationType||{}),ANNOTATION_TYPES=Object.values(AnnotationType);function stringToAnnotationType(t){for(const e of ANNOTATION_TYPES)if(e===t)return e}var import_ag_charts_community30=require("ag-charts-community"),import_ag_charts_community26=require("ag-charts-community"),{BOOLEAN:BOOLEAN5,COLOR_STRING:COLOR_STRING2,DATE,FONT_STYLE:FONT_STYLE2,FONT_WEIGHT:FONT_WEIGHT2,FUNCTION,LINE_DASH:LINE_DASH2,LINE_STYLE,NUMBER:NUMBER5,OBJECT:OBJECT4,OR:OR2,POSITIVE_NUMBER:POSITIVE_NUMBER4,RATIO:RATIO4,STRING:STRING2,TEXT_ALIGN,UNION:UNION4,BaseProperties:BaseProperties3,Validate:Validate12,predicateWithMessage,generateUUID}=import_ag_charts_community26._ModuleSupport,GROUPING_VALUE_KEYS=["value","groupPercentage"],GROUPING_VALUE=predicateWithMessage(t=>isObject(t)&&Object.keys(t).every(e=>GROUPING_VALUE_KEYS.includes(e)),"objects with grouping value properties such as 'value' or 'groupPercentage'"),PointProperties=class extends BaseProperties3{};__decorateClass([Validate12(OR2(STRING2,NUMBER5,DATE,GROUPING_VALUE))],PointProperties.prototype,"x",2),__decorateClass([Validate12(OR2(STRING2,NUMBER5,DATE,GROUPING_VALUE))],PointProperties.prototype,"y",2);var ChannelAnnotationMiddleProperties=class extends Stroke(LineStyle(Visible(BaseProperties3))){},AxisLabelProperties=class extends Stroke(LineStyle(Fill(Label(Font(BaseProperties3))))){constructor(){super(...arguments),this.cornerRadius=2}};__decorateClass([Validate12(BOOLEAN5)],AxisLabelProperties.prototype,"enabled",2),__decorateClass([Validate12(POSITIVE_NUMBER4)],AxisLabelProperties.prototype,"cornerRadius",2);var BackgroundProperties=class extends Fill(BaseProperties3){},HandleProperties=class extends Stroke(LineStyle(Fill(BaseProperties3))){},LineTextProperties=class extends Font(BaseProperties3){constructor(){super(...arguments),this.label="",this.position="top",this.alignment="left"}};__decorateClass([Validate12(STRING2)],LineTextProperties.prototype,"label",2),__decorateClass([Validate12(UNION4(["top","center","bottom"]),{optional:!0})],LineTextProperties.prototype,"position",2),__decorateClass([Validate12(UNION4(["left","center","right"]),{optional:!0})],LineTextProperties.prototype,"alignment",2);var LabelTextProperties=class extends Font(BaseProperties3){},ChannelTextProperties=class extends Font(BaseProperties3){constructor(){super(...arguments),this.label=""}};__decorateClass([Validate12(STRING2)],ChannelTextProperties.prototype,"label",2),__decorateClass([Validate12(UNION4(["top","inside","bottom"]),{optional:!0})],ChannelTextProperties.prototype,"position",2),__decorateClass([Validate12(UNION4(["left","center","right"]),{optional:!0})],ChannelTextProperties.prototype,"alignment",2);function Annotation(t){class e extends Lockable(Visible(t)){constructor(){super(...arguments),this.id=generateUUID()}isValidWithContext(o,s){return super.isValid(s)}}return e}function Line2(t){class e extends t{constructor(){super(...arguments),this.start=new PointProperties,this.end=new PointProperties}}return __decorateClass([Validate12(OBJECT4)],e.prototype,"start",2),__decorateClass([Validate12(OBJECT4)],e.prototype,"end",2),e}function Point(t){class e extends t{}return __decorateClass([Validate12(OR2(STRING2,NUMBER5,DATE,GROUPING_VALUE))],e.prototype,"x",2),__decorateClass([Validate12(OR2(STRING2,NUMBER5,DATE,GROUPING_VALUE))],e.prototype,"y",2),e}function Value(t){class e extends t{}return __decorateClass([Validate12(OR2(STRING2,NUMBER5,DATE,GROUPING_VALUE))],e.prototype,"value",2),e}function Background(t){class e extends t{constructor(){super(...arguments),this.background=new BackgroundProperties}}return __decorateClass([Validate12(OBJECT4,{optional:!0})],e.prototype,"background",2),e}function Handle(t){class e extends t{constructor(){super(...arguments),this.handle=new HandleProperties}}return __decorateClass([Validate12(OBJECT4,{optional:!0})],e.prototype,"handle",2),e}function AxisLabel(t){class e extends t{constructor(){super(...arguments),this.axisLabel=new AxisLabelProperties}}return __decorateClass([Validate12(OBJECT4,{optional:!0})],e.prototype,"axisLabel",2),e}function Label(t){class e extends t{constructor(){super(...arguments),this.padding=void 0,this.textAlign="center",this.formatter=void 0}}return __decorateClass([Validate12(POSITIVE_NUMBER4,{optional:!0})],e.prototype,"padding",2),__decorateClass([Validate12(TEXT_ALIGN,{optional:!0})],e.prototype,"textAlign",2),__decorateClass([Validate12(FUNCTION,{optional:!0})],e.prototype,"formatter",2),e}function Cappable(t){class e extends t{}return e}function Extendable(t){class e extends t{}return __decorateClass([Validate12(BOOLEAN5,{optional:!0})],e.prototype,"extendStart",2),__decorateClass([Validate12(BOOLEAN5,{optional:!0})],e.prototype,"extendEnd",2),e}function Lockable(t){class e extends t{}return __decorateClass([Validate12(BOOLEAN5,{optional:!0})],e.prototype,"locked",2),e}function Localisable(t){class e extends t{setLocaleManager(o){this.localeManager??(this.localeManager=o)}}return e}function Visible(t){class e extends t{}return __decorateClass([Validate12(BOOLEAN5,{optional:!0})],e.prototype,"visible",2),e}function Fill(t){class e extends t{}return __decorateClass([Validate12(COLOR_STRING2,{optional:!0})],e.prototype,"fill",2),__decorateClass([Validate12(RATIO4,{optional:!0})],e.prototype,"fillOpacity",2),e}function Stroke(t){class e extends t{}return __decorateClass([Validate12(COLOR_STRING2,{optional:!0})],e.prototype,"stroke",2),__decorateClass([Validate12(RATIO4,{optional:!0})],e.prototype,"strokeOpacity",2),__decorateClass([Validate12(NUMBER5,{optional:!0})],e.prototype,"strokeWidth",2),e}function LineStyle(t){class e extends t{constructor(){super(...arguments),this.lineCap=void 0,this.computedLineDash=void 0}}return __decorateClass([Validate12(LINE_DASH2,{optional:!0})],e.prototype,"lineDash",2),__decorateClass([Validate12(NUMBER5,{optional:!0})],e.prototype,"lineDashOffset",2),__decorateClass([Validate12(LINE_STYLE,{optional:!0})],e.prototype,"lineStyle",2),e}function Font(t){class e extends t{constructor(){super(...arguments),this.fontSize=12,this.fontFamily="Verdana, sans-serif"}}return __decorateClass([Validate12(FONT_STYLE2,{optional:!0})],e.prototype,"fontStyle",2),__decorateClass([Validate12(FONT_WEIGHT2,{optional:!0})],e.prototype,"fontWeight",2),__decorateClass([Validate12(POSITIVE_NUMBER4)],e.prototype,"fontSize",2),__decorateClass([Validate12(STRING2)],e.prototype,"fontFamily",2),__decorateClass([Validate12(COLOR_STRING2,{optional:!0})],e.prototype,"color",2),e}var import_ag_charts_community29=require("ag-charts-community"),import_ag_charts_community27=require("ag-charts-community");function getGroupingValue(t){return isNumber(t)||isString(t)||isDate(t)?{value:t,groupPercentage:0}:t??{value:void 0,groupPercentage:0}}var{clampArray}=import_ag_charts_community27._ModuleSupport;function convertLine(t,e){if(t.start==null||t.end==null)return;const i=convertPoint(t.start,e),o=convertPoint(t.end,e);if(!(i==null||o==null))return{x1:i.x,y1:i.y,x2:o.x,y2:o.y}}function convertPoint(t,e){const i=convert(t.x,e.xAxis),o=convert(t.y,e.yAxis);return{x:i,y:o}}function convert(t,e){if(t==null)return 0;const{value:i,groupPercentage:o}=getGroupingValue(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 invertCoords(t,e){const i=invert(t.x,e.xAxis),o=invert(t.y,e.yAxis);return{x:i,y:o}}function invert(t,e){const{scale:i}=e;if(e.continuous&&i.step==null)return e.scaleInvert(t);const o=e.scaleInvertNearest(t),s=i.bandwidth===0?i.step:i.bandwidth??0,a=i.convert(o),n=a+s,r=clampArray(t,i.range),l=a===n?0:(r-a)/(n-a);return{value:o,groupPercentage:l}}var import_ag_charts_community28=require("ag-charts-community"),{BaseProperties:BaseProperties4}=import_ag_charts_community28._ModuleSupport,StartEndProperties=class extends Annotation(Line2(Handle(BaseProperties4))){constructor(){super(...arguments),this.snapToAngle=45}isValidWithContext(t,e){return super.isValid(e)}getDefaultColor(t){}getDefaultOpacity(t){}},{STRING:STRING3,Validate:Validate13}=import_ag_charts_community29._ModuleSupport,TextualStartEndProperties=class extends Localisable(Label(Font(StartEndProperties))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}isValidWithContext(t,e){return super.isValid(e)}getDefaultColor(t){return this.color}getDefaultOpacity(t){}getPlaceholderColor(){}getPadding(){const{padding:t=0}=this;return{top:t,right:t,bottom:t,left:t}}getText(){const t=this.text.length==0;let e=this.text;return t&&(e=this.placeholderText??"",this.localeManager&&(e=this.localeManager.t(e))),{text:e,isPlaceholder:t}}getTextInputCoords(t,e){return convertPoint(this.end,t)}getTextPosition(){return this.position}};__decorateClass([Validate13(STRING3)],TextualStartEndProperties.prototype,"text",2);var{STRING:STRING4,Validate:Validate14,Color}=import_ag_charts_community30._ModuleSupport,DEFAULT_CALLOUT_PADDING={top:6,right:12,bottom:9,left:12},CalloutProperties=class extends Fill(Stroke(TextualStartEndProperties)){constructor(){super(...arguments),this.type="callout",this.position="bottom",this.alignment="left"}static is(t){return isObject(t)&&t.type==="callout"}getDefaultColor(t){switch(t){case"fill-color":return this.fill;case"line-color":return this.stroke;case"text-color":default:return this.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.fillOpacity;case"line-color":return this.strokeOpacity;case"text-color":default:return}}getPlaceholderColor(){const{r:t,g:e,b:i}=Color.fromString(this.color??"#888888");return new Color(t,e,i,.66).toString()}getPadding(){const{padding:t}=this;return t==null?{...DEFAULT_CALLOUT_PADDING}:{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const i=super.getTextInputCoords(t,e),o=this.getPadding(),s=o.left??0,a=o.bottom??0;return{x:i.x+s,y:i.y-a}}};__decorateClass([Validate14(STRING4)],CalloutProperties.prototype,"type",2);var import_ag_charts_community32=require("ag-charts-community"),import_ag_charts_community31=require("ag-charts-community"),{STRING:STRING5,BaseProperties:BaseProperties5,Validate:Validate15}=import_ag_charts_community31._ModuleSupport,TextualPointProperties=class extends Annotation(Point(Handle(Label(Font(BaseProperties5))))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}isValidWithContext(t,e){return super.isValid(e)}getDefaultColor(t){return this.color}getDefaultOpacity(t){}getPlaceholderColor(){}getPadding(){const{padding:t=0}=this;return{top:t,right:t,bottom:t,left:t}}getText(){const t=this.text.length==0;return{text:t?this.placeholderText??"":this.text,isPlaceholder:t}}getTextInputCoords(t,e){return convertPoint(this,t)}getTextPosition(){return this.position}};__decorateClass([Validate15(STRING5)],TextualPointProperties.prototype,"text",2);var{STRING:STRING6,Validate:Validate16,Color:Color2}=import_ag_charts_community32._ModuleSupport,DEFAULT_COMMENT_PADDING={top:8,right:14,bottom:8,left:14},CommentProperties=class extends Fill(Stroke(TextualPointProperties)){constructor(){super(...arguments),this.type="comment",this.position="bottom",this.alignment="left"}static is(t){return isObject(t)&&t.type==="comment"}getDefaultColor(t){switch(t){case"fill-color":return this.fill;case"line-color":return this.stroke;case"text-color":default:return this.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.fillOpacity;case"line-color":return this.strokeOpacity;case"text-color":default:return}}getPlaceholderColor(){const{r:t,g:e,b:i}=Color2.fromString(this.color??"#888888");return new Color2(t,e,i,.66).toString()}getPadding(){const{padding:t,fontSize:e}=this;return t==null?{top:Math.max(e*.4,DEFAULT_COMMENT_PADDING.top),bottom:Math.max(e*.4,DEFAULT_COMMENT_PADDING.bottom),left:Math.max(e*.8,DEFAULT_COMMENT_PADDING.left),right:Math.max(e*.8,DEFAULT_COMMENT_PADDING.right)}:{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const i=super.getTextInputCoords(t,e),o=this.getPadding();return{x:i.x+o.left,y:i.y-o.bottom}}};__decorateClass([Validate16(STRING6)],CommentProperties.prototype,"type",2);var import_ag_charts_community34=require("ag-charts-community"),import_ag_charts_community33=require("ag-charts-community"),{Vec2}=import_ag_charts_community33._ModuleSupport;function getLineStyle(t,e){return t?"dashed":e??"solid"}function getComputedLineDash(t,e){switch(e){case"solid":return[];case"dashed":return[t*4,t*2];case"dotted":return[0,t*2]}}function getLineDash(t,e,i,o){const s=getLineStyle(t,i);return e??t??getComputedLineDash(o??1,s)}function getLineCap(t,e,i){const o=getLineStyle(e,i);return t??o==="dotted"?"round":void 0}function boundsIntersections(t,e){const[i,o]=Vec2.from(t),s=e.height,a=Vec2.gradient(o,i,s),n=Vec2.intercept(o,a,s),r=[{x:i.x,y:s??0},{x:i.x,y:s==null?e.height:s-e.height}];if(a===1/0)return r;let l=[Vec2.intersectAtY(a,n,0,s),Vec2.intersectAtY(a,n,e.height,s),Vec2.intersectAtX(a,n,0,s),Vec2.intersectAtX(a,n,e.width,s)];return l=l.filter(c=>c.x>=e.x&&c.x<=e.width&&c.y>=e.y&&c.y<=e.height).sort((c,h)=>c.x===h.x?0:c.x{},this.text=new LineTextProperties}getDefaultColor(t){switch(t){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([Validate17(OBJECT5,{optional:!0})],MeasurerTypeProperties.prototype,"statistics",2),__decorateClass([Validate17(OBJECT5,{optional:!0})],MeasurerTypeProperties.prototype,"text",2);function DateRange(t){class e extends t{constructor(){super(...arguments),this.hasDateRange=!0}}return e}function PriceRange(t){class e extends t{constructor(){super(...arguments),this.hasPriceRange=!0}}return e}var DateRangeProperties=class extends DateRange(MeasurerTypeProperties){constructor(){super(...arguments),this.type="date-range",this.direction="horizontal"}static is(t){return isObject(t)&&t.type==="date-range"}};__decorateClass([Validate17(STRING7)],DateRangeProperties.prototype,"type",2),__decorateClass([Validate17(BOOLEAN6,{optional:!0})],DateRangeProperties.prototype,"extendAbove",2),__decorateClass([Validate17(BOOLEAN6,{optional:!0})],DateRangeProperties.prototype,"extendBelow",2);var PriceRangeProperties=class extends PriceRange(MeasurerTypeProperties){constructor(){super(...arguments),this.type="price-range",this.direction="vertical"}static is(t){return isObject(t)&&t.type==="price-range"}};__decorateClass([Validate17(STRING7)],PriceRangeProperties.prototype,"type",2),__decorateClass([Validate17(BOOLEAN6,{optional:!0})],PriceRangeProperties.prototype,"extendLeft",2),__decorateClass([Validate17(BOOLEAN6,{optional:!0})],PriceRangeProperties.prototype,"extendRight",2);var DatePriceRangeProperties=class extends DateRange(PriceRange(MeasurerTypeProperties)){constructor(){super(...arguments),this.type="date-price-range",this.direction="both"}static is(t){return isObject(t)&&t.type==="date-price-range"}};__decorateClass([Validate17(STRING7)],DatePriceRangeProperties.prototype,"type",2);var QuickDatePriceRangeProperties=class extends DateRange(PriceRange(MeasurerTypeProperties)){constructor(){super(...arguments),this.type="quick-date-price-range",this.up=new MeasurerDirectionProperties,this.down=new MeasurerDirectionProperties,this.direction="both"}static is(t){return isObject(t)&&t.type==="quick-date-price-range"}};__decorateClass([Validate17(STRING7)],QuickDatePriceRangeProperties.prototype,"type",2),__decorateClass([Validate17(OBJECT5,{optional:!0})],QuickDatePriceRangeProperties.prototype,"up",2),__decorateClass([Validate17(OBJECT5,{optional:!0})],QuickDatePriceRangeProperties.prototype,"down",2);var import_ag_charts_community36=require("ag-charts-community"),import_ag_charts_community35=require("ag-charts-community"),{TextWrapper:TextWrapper2,CachedTextMeasurerPool,BBox:BBox2}=import_ag_charts_community35._ModuleSupport,ANNOTATION_TEXT_LINE_HEIGHT=1.38;function getTextWrapOptions(t){return{font:{fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight},textAlign:t.textAlign,textBaseline:t.position=="center"?"middle":t.position,lineHeight:ANNOTATION_TEXT_LINE_HEIGHT,avoidOrphans:!1,textWrap:"always"}}function wrapText(t,e,i){return i?TextWrapper2.wrapText(e,{...getTextWrapOptions(t),maxWidth:i}):e}function measureAnnotationText(t,e){const i=getTextWrapOptions(t),{lineMetrics:o,width:s}=CachedTextMeasurerPool.measureLines(e,i),a=o.length*(t.fontSize??14)*ANNOTATION_TEXT_LINE_HEIGHT;return{width:s,height:a}}function getBBox(t,e,i,o){let s=o?.width??0,a=o?.height??0;if(!o){const n=t.width!=null?wrapText(t,e,t.width):e;({width:s,height:a}=measureAnnotationText(t,n))}return new BBox2(i.x,i.y,s,a)}function updateTextNode(t,e,i,o,{x:s,y:a}){const{visible:n=!0,fontFamily:r,fontSize:l=14,fontStyle:c,fontWeight:h,textAlign:d}=o,u=l*ANNOTATION_TEXT_LINE_HEIGHT,p=o.position=="center"?"middle":o.position,g=i?o.getPlaceholderColor():o.color;t.setProperties({x:s,y:a,visible:n,text:e,fill:g,fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h,textAlign:d,lineHeight:u,textBaseline:p})}var{OBJECT:OBJECT6,STRING:STRING8,BaseProperties:BaseProperties7,Validate:Validate18,clamp:clamp2}=import_ag_charts_community36._ModuleSupport,DEFAULT_NOTE_PADDING=10,HANDLE_SIZE=11,ICON_HEIGHT=20,ICON_WIDTH=22,ICON_SPACING=10,LABEL_OFFSET=ICON_HEIGHT+ICON_SPACING,TOOLBAR_OFFSET=34,NoteBackgroundProperties=class extends Fill(Stroke(BaseProperties7)){},NoteProperties=class extends Fill(Stroke(TextualPointProperties)){constructor(){super(...arguments),this.type="note",this.background=new NoteBackgroundProperties,this.position="bottom",this.alignment="center",this.width=200}static is(t){return isObject(t)&&t.type==="note"}getDefaultColor(t){switch(t){case"line-color":return this.fill;case"text-color":return this.color}}getDefaultOpacity(t){switch(t){case"line-color":return this.fillOpacity;case"text-color":return}}getPadding(){const t=this.padding??DEFAULT_NOTE_PADDING;return{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const{width:i,text:o}=this,s=super.getTextInputCoords(t,e),a=this.getPadding().top,n=getBBox(this,o,s);n.x=clamp2(i/2,n.x,t.seriesRect.width-i/2);const r=n.y-LABEL_OFFSET-a*2,l=n.y+HANDLE_SIZE+a*2,c=Math.max(n.height,e);return r-c-TOOLBAR_OFFSET<0?(n.y=l,this.position="top"):(n.y=r+a,this.position="bottom"),{x:n.x,y:n.y}}};__decorateClass([Validate18(STRING8)],NoteProperties.prototype,"type",2),__decorateClass([Validate18(OBJECT6,{optional:!0})],NoteProperties.prototype,"background",2);var import_ag_charts_community37=require("ag-charts-community"),{BaseProperties:BaseProperties8}=import_ag_charts_community37._ModuleSupport,PointProperties2=class extends Annotation(Point(Handle(BaseProperties8))){isValidWithContext(t,e){return super.isValid(e)}getDefaultColor(t){}getDefaultOpacity(t){}},ShapePointProperties=class St extends Fill(PointProperties2){constructor(){super(...arguments),this.size=32}static is(e){return e instanceof St}getDefaultColor(e){return e==="fill-color"?this.fill:void 0}getDefaultOpacity(e){return e==="fill-color"?this.fillOpacity:void 0}},import_ag_charts_community39=require("ag-charts-community"),import_ag_charts_community38=require("ag-charts-community");function validateDatumLine(t,e,i,o){let s=!0;return s&&(s=validateDatumPoint(t,e.start,i,o&&`${o}[start] `)),s&&(s=validateDatumPoint(t,e.end,i,o&&`${o}[end] `)),s}function validateDatumValue(t,e,i){const o=e.direction==="horizontal"?t.yAxis:t.xAxis,s=validateDatumPointDirection(e.value,o);if(!s&&i){const{value:a}=getGroupingValue(e.value);logger_exports.warnOnce(`${i}is outside the axis domain, ignoring. - value: [${a}]]`)}return s}function validateDatumPoint(t,e,i,o){if(e.x==null||e.y==null)return o&&logger_exports.warnOnce(`${o}requires both an [x] and [y] property, ignoring.`),!1;const s=i?.x===!1?!0:validateDatumPointDirection(e.x,t.xAxis),a=i?.y===!1?!0:validateDatumPointDirection(e.y,t.yAxis);if(!s||!a){let n="x & y domains";if(s&&(n="y domain"),a&&(n="x domain"),o){const{value:r}=getGroupingValue(e.x),{value:l}=getGroupingValue(e.y);logger_exports.warnOnce(`${o}is outside the ${n}, ignoring. - x: [${r}], y: ${l}]`)}return!1}return!0}function validateDatumPointDirection(t,e){const{domain:i}=e.scale,{value:o}=getGroupingValue(t);return i&&o!=null&&e.continuous?o>=i[0]&&o<=i.at(-1):!0}function isPoint(t){return t?.x!=null&&t?.y!=null}var{OBJECT:OBJECT7,STRING:STRING9,BaseProperties:BaseProperties9,Validate:Validate19}=import_ag_charts_community39._ModuleSupport,HorizontalLineProperties=class extends Annotation(Value(Handle(AxisLabel(Stroke(LineStyle(BaseProperties9)))))){constructor(){super(...arguments),this.direction="horizontal",this.type="horizontal-line",this.text=new LineTextProperties}static is(t){return isObject(t)&&t.type==="horizontal-line"}isValidWithContext(t,e){return super.isValid(e)&&validateDatumValue(t,this,e)}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([Validate19(STRING9)],HorizontalLineProperties.prototype,"type",2),__decorateClass([Validate19(OBJECT7,{optional:!0})],HorizontalLineProperties.prototype,"text",2);var VerticalLineProperties=class extends Annotation(Value(Handle(AxisLabel(Stroke(LineStyle(BaseProperties9)))))){constructor(){super(...arguments),this.direction="vertical",this.type="vertical-line",this.text=new LineTextProperties}static is(t){return isObject(t)&&t.type==="vertical-line"}isValidWithContext(t,e){return super.isValid(e)&&validateDatumValue(t,this,e)}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([Validate19(STRING9)],VerticalLineProperties.prototype,"type",2),__decorateClass([Validate19(OBJECT7,{optional:!0})],VerticalLineProperties.prototype,"text",2);var import_ag_charts_community40=require("ag-charts-community"),{NUMBER:NUMBER6,OBJECT:OBJECT8,STRING:STRING10,BaseProperties:BaseProperties10,Validate:Validate20}=import_ag_charts_community40._ModuleSupport,DisjointChannelProperties=class extends Annotation(Background(Line2(Handle(Extendable(Stroke(LineStyle(BaseProperties10))))))){constructor(){super(...arguments),this.type="disjoint-channel",this.text=new ChannelTextProperties,this.snapToAngle=45}static is(t){return isObject(t)&&t.type==="disjoint-channel"}get bottom(){const t={start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y}};return typeof t.start.y=="number"&&typeof t.end.y=="number"?(t.start.y-=this.startHeight,t.end.y-=this.endHeight):logger_exports.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),t}isValidWithContext(t,e){return super.isValid(e)&&validateDatumLine(t,this,{y:!1},e)&&validateDatumLine(t,this.bottom,{y:!1},e)}getDefaultColor(t){switch(t){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([Validate20(STRING10)],DisjointChannelProperties.prototype,"type",2),__decorateClass([Validate20(NUMBER6)],DisjointChannelProperties.prototype,"startHeight",2),__decorateClass([Validate20(NUMBER6)],DisjointChannelProperties.prototype,"endHeight",2),__decorateClass([Validate20(OBJECT8,{optional:!0})],DisjointChannelProperties.prototype,"text",2);var import_ag_charts_community43=require("ag-charts-community"),import_ag_charts_community42=require("ag-charts-community"),import_ag_charts_community41=require("ag-charts-community"),{OBJECT:OBJECT9,STRING:STRING11,Validate:Validate21}=import_ag_charts_community41._ModuleSupport,LineTypeProperties=class extends Localisable(Cappable(Extendable(Stroke(LineStyle(StartEndProperties))))){constructor(){super(...arguments),this.text=new LineTextProperties}isValidWithContext(t,e){return super.isValid(e)&&validateDatumLine(t,this,void 0,e)}getDefaultColor(t){switch(t){case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([Validate21(OBJECT9,{optional:!0})],LineTypeProperties.prototype,"text",2);var ArrowProperties=class extends LineTypeProperties{constructor(){super(...arguments),this.type="arrow",this.endCap="arrow"}static is(t){return isObject(t)&&t.type==="arrow"}};__decorateClass([Validate21(STRING11)],ArrowProperties.prototype,"type",2);var LineProperties=class extends LineTypeProperties{constructor(){super(...arguments),this.type="line"}static is(t){return isObject(t)&&t.type==="line"}};__decorateClass([Validate21(STRING11)],LineProperties.prototype,"type",2);var{OBJECT:OBJECT10,BOOLEAN:BOOLEAN7,COLOR_STRING:COLOR_STRING3,COLOR_STRING_ARRAY,Validate:Validate22,predicateWithMessage:predicateWithMessage2}=import_ag_charts_community42._ModuleSupport,fibonacciBands=[10,6,4],FIBONACCI_BANDS=predicateWithMessage2(t=>isFiniteNumber(t)&&fibonacciBands.includes(t),"Number of fibonacci ranges, 10, 6 or 4"),FibonacciProperties=class extends LineTypeProperties{constructor(){super(...arguments),this.label=new LabelTextProperties,this.reverse=!1,this.showFill=!0,this.isMultiColor=!0,this.strokes=[],this.bands=10}getDefaultColor(t){switch(t){case"line-color":return this.rangeStroke??this.stroke;case"text-color":return this.text.color}}};__decorateClass([Validate22(OBJECT10,{optional:!0})],FibonacciProperties.prototype,"label",2),__decorateClass([Validate22(BOOLEAN7,{optional:!0})],FibonacciProperties.prototype,"reverse",2),__decorateClass([Validate22(BOOLEAN7,{optional:!0})],FibonacciProperties.prototype,"showFill",2),__decorateClass([Validate22(BOOLEAN7,{optional:!0})],FibonacciProperties.prototype,"isMultiColor",2),__decorateClass([Validate22(COLOR_STRING_ARRAY,{optional:!0})],FibonacciProperties.prototype,"strokes",2),__decorateClass([Validate22(COLOR_STRING3,{optional:!0})],FibonacciProperties.prototype,"rangeStroke",2),__decorateClass([Validate22(FIBONACCI_BANDS,{optional:!0})],FibonacciProperties.prototype,"bands",2);var{STRING:STRING12,OBJECT:OBJECT11,Validate:Validate23}=import_ag_charts_community43._ModuleSupport,FibonacciRetracementTrendBasedProperties=class extends FibonacciProperties{constructor(){super(...arguments),this.type="fibonacci-retracement-trend-based",this.endRetracement=new PointProperties}static is(t){return isObject(t)&&t.type==="fibonacci-retracement-trend-based"}};__decorateClass([Validate23(STRING12)],FibonacciRetracementTrendBasedProperties.prototype,"type",2),__decorateClass([Validate23(OBJECT11)],FibonacciRetracementTrendBasedProperties.prototype,"endRetracement",2);var import_ag_charts_community44=require("ag-charts-community"),{STRING:STRING13,Validate:Validate24}=import_ag_charts_community44._ModuleSupport,FibonacciRetracementProperties=class extends FibonacciProperties{constructor(){super(...arguments),this.type="fibonacci-retracement"}static is(t){return isObject(t)&&t.type==="fibonacci-retracement"}};__decorateClass([Validate24(STRING13)],FibonacciRetracementProperties.prototype,"type",2);var import_ag_charts_community45=require("ag-charts-community"),{NUMBER:NUMBER7,STRING:STRING14,OBJECT:OBJECT12,BaseProperties:BaseProperties11,Validate:Validate25}=import_ag_charts_community45._ModuleSupport,ParallelChannelProperties=class extends Annotation(Background(Line2(Handle(Extendable(Stroke(LineStyle(BaseProperties11))))))){constructor(){super(...arguments),this.type="parallel-channel",this.middle=new ChannelAnnotationMiddleProperties,this.text=new ChannelTextProperties,this.snapToAngle=45}static is(t){return isObject(t)&&t.type==="parallel-channel"}get bottom(){const t={start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y}};return typeof t.start.y=="number"&&typeof t.end.y=="number"?(t.start.y-=this.height,t.end.y-=this.height):logger_exports.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),t}isValidWithContext(t,e){return super.isValid(e)&&validateDatumLine(t,this,{y:!1},e)&&validateDatumLine(t,this.bottom,{y:!1},e)}getDefaultColor(t){switch(t){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([Validate25(STRING14)],ParallelChannelProperties.prototype,"type",2),__decorateClass([Validate25(NUMBER7)],ParallelChannelProperties.prototype,"height",2),__decorateClass([Validate25(OBJECT12,{optional:!0})],ParallelChannelProperties.prototype,"middle",2),__decorateClass([Validate25(OBJECT12,{optional:!0})],ParallelChannelProperties.prototype,"text",2);var import_ag_charts_community46=require("ag-charts-community"),{STRING:STRING15,Validate:Validate26}=import_ag_charts_community46._ModuleSupport,TextProperties=class extends TextualPointProperties{constructor(){super(...arguments),this.type="text",this.position="bottom"}static is(t){return isObject(t)&&t.type==="text"}};__decorateClass([Validate26(STRING15)],TextProperties.prototype,"type",2);function isEphemeralType(t){return QuickDatePriceRangeProperties.is(t)}function isLineType(t){return LineProperties.is(t)||HorizontalLineProperties.is(t)||VerticalLineProperties.is(t)||ArrowProperties.is(t)||isFibonacciType(t)}function isChannelType(t){return DisjointChannelProperties.is(t)||ParallelChannelProperties.is(t)}function isFibonacciType(t){return FibonacciRetracementProperties.is(t)||FibonacciRetracementTrendBasedProperties.is(t)}function isTextType(t){return CalloutProperties.is(t)||CommentProperties.is(t)||NoteProperties.is(t)||TextProperties.is(t)}function isMeasurerType(t){return DateRangeProperties.is(t)||PriceRangeProperties.is(t)||DatePriceRangeProperties.is(t)||QuickDatePriceRangeProperties.is(t)}function hasFontSize(t){return isTextType(t)&&!NoteProperties.is(t)}function hasLineStyle(t){return isLineType(t)||isChannelType(t)||isMeasurerType(t)&&!QuickDatePriceRangeProperties.is(t)}function hasLineColor(t){return isLineType(t)||isChannelType(t)||isMeasurerType(t)||CalloutProperties.is(t)||NoteProperties.is(t)}function hasIconColor(t){return NoteProperties.is(t)}function hasFillColor(t){return isChannelType(t)||isMeasurerType(t)||CalloutProperties.is(t)||CommentProperties.is(t)||ShapePointProperties.is(t)}function hasTextColor(t){return isTextType(t)&&!NoteProperties.is(t)}function hasLineText(t){return(isLineType(t)||isChannelType(t)||isMeasurerType(t))&&!isEphemeralType(t)&&isObject(t.text)}function setFontSize(t,e){"fontSize"in t&&(t.fontSize=e),hasLineText(t)&&(t.text.fontSize=e)}function setLineStyle(t,e){const i=e?.strokeWidth??t.strokeWidth??1,o=e?.type??t.lineStyle,s=o??getLineStyle(t.lineDash,o),a=getComputedLineDash(i,s);t.strokeWidth=i,t.computedLineDash=a,t.lineStyle=s,t.lineCap=s==="dotted"?"round":void 0}function setColor(t,e,i,o,s,a){switch(e){case"fill-color":{"fill"in t&&(t.fill=o),"fillOpacity"in t&&(t.fillOpacity=s),"background"in t&&(t.background.fill=o,t.background.fillOpacity=s);break}case"line-color":{"axisLabel"in t&&(t.axisLabel.fill=o,t.axisLabel.fillOpacity=s,t.axisLabel.stroke=o,t.axisLabel.strokeOpacity=s),"fill"in t&&"fillOpacity"in t&&hasIconColor(t)?(t.fill=o,t.fillOpacity=s):("strokeOpacity"in t&&(t.strokeOpacity=s),"isMultiColor"in t&&"rangeStroke"in t?(t.isMultiColor=a,t.rangeStroke=o):"stroke"in t&&(t.stroke=o));break}case"text-color":{"color"in t&&(t.color=i),hasLineText(t)&&(t.text.color=o);break}}}var{deepClone}=import_ag_charts_community47._ModuleSupport,AnnotationDefaults=class{constructor(){this.mementoOriginatorKey="annotation-defaults",this.colors=new Map(Object.values(AnnotationType).map(t=>[t,new Map([["line-color",void 0],["fill-color",void 0],["text-color",void 0]])])),this.fontSizes=new Map([["callout",void 0],["comment",void 0],["text",void 0],["arrow",void 0],["line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineStyles=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineTextAlignments=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineTextPositions=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.fibonacciOptions=new Map([["fibonacci-retracement",{bands:void 0,reverse:void 0,showFill:void 0}],["fibonacci-retracement-trend-based",{bands:void 0,reverse:void 0,showFill:void 0}]])}createMemento(){return{colors:deepClone(this.colors),fontSizes:deepClone(this.fontSizes),lineStyles:deepClone(this.lineStyles),lineTextAlignments:deepClone(this.lineTextAlignments),lineTextPositions:deepClone(this.lineTextPositions),fibonacciOptions:deepClone(this.fibonacciOptions)}}guardMemento(t){return!0}restoreMemento(t,e,i){this.colors=deepClone(i.colors),this.fontSizes=deepClone(i.fontSizes),this.lineStyles=deepClone(i.lineStyles),this.lineTextAlignments=deepClone(i.lineTextAlignments),this.lineTextPositions=deepClone(i.lineTextPositions),this.fibonacciOptions=deepClone(i.fibonacciOptions)}setDefaultColor(t,e,i,o,s,a){this.colors.get(t)?.set(e,[i,o,s,a])}setDefaultFontSize(t,e){this.fontSizes.set(t,e)}setDefaultLineStyleType(t,e){const i=this.lineStyles.get(t);i?i.type=e:this.lineStyles.set(t,{type:e})}setDefaultLineStyleWidth(t,e){const i=this.lineStyles.get(t);i?i.strokeWidth=e:this.lineStyles.set(t,{strokeWidth:e})}setDefaultLineTextAlignment(t,e){this.lineTextAlignments.set(t,e)}setDefaultLineTextPosition(t,e){this.lineTextPositions.set(t,e)}setDefaultFibonacciOptions(t,e,i){if(t!="fibonacci-retracement"&&t!="fibonacci-retracement-trend-based")return;const o=this.fibonacciOptions.get(t);o[e]=i,this.fibonacciOptions.set(t,o)}applyDefaults(t){for(const[e,i]of this.colors)if(t.type===e)for(const[o,[s,a,n,r]=[]]of i)s&&a&&n!=null&&r!=null&&setColor(t,o,s,a,n,r);for(const[e,i]of this.fontSizes)t.type!==e||i==null||setFontSize(t,i);for(const[e,i]of this.lineStyles)t.type!==e||i==null||setLineStyle(t,i);for(const[e,i]of this.lineTextPositions)t.type!==e||i==null||(t.text.position=i);for(const[e,i]of this.lineTextAlignments)t.type!==e||i==null||(t.text.alignment=i);for(const[e,i]of this.fibonacciOptions)t.type!==e||i==null||Object.entries(i).forEach(([o,s])=>{s!=null&&t.set({[o]:s})})}},import_ag_charts_community50=require("ag-charts-community"),import_ag_charts_community48=require("ag-charts-community"),colorPickerTemplate_default='
',{Color:Color3,clamp:clamp3,createElement}=import_ag_charts_community48._ModuleSupport,getHsva=t=>{try{const e=Color3.fromString(t),[i,o,s]=e.toHSB();return[i,o,s,e.a]}catch{return}},ColorPicker=class extends import_ag_charts_community48._ModuleSupport.AnchoredPopover{constructor(t,e){super(t,"color-picker",e),this.hasChanged=!1,this.hideFns.push(()=>{this.hasChanged&&this.onChangeHide?.()})}show(t){this.hasChanged=!1,this.onChangeHide=t.onChangeHide;const{element:e,initialFocus:i}=this.createColorPicker(t),o=this.showWithChildren([e],{initialFocus:i,...t});o.classList.add("ag-charts-color-picker"),o.setAttribute("role","dialog")}createColorPicker(t){let e=t.isMultiColor??!1,[i,o,s,a]=getHsva(t.color??"#f00")??[0,1,.5,1];a=t.opacity??a;const n=createElement("div","ag-charts-color-picker__content");n.innerHTML=colorPickerTemplate_default,n.ariaLabel=this.ctx.localeManager.t("ariaLabelColorPicker");const r=n.querySelector(".ag-charts-color-picker__palette"),l=n.querySelector(".ag-charts-color-picker__hue-input"),c=n.querySelector(".ag-charts-color-picker__multi-color-button"),h=n.querySelector(".ag-charts-color-picker__alpha-input"),d=n.querySelector(".ag-charts-color-picker__color-input"),u=n.querySelector(".ag-charts-color-picker__color-label");c.classList.toggle("ag-charts-color-picker__multi-color-button--hidden",!t.hasMultiColorOption);const p=(m=!0)=>{const x=Color3.fromHSB(i,o,s,a).toHexString();if(n.style.setProperty("--h",`${i}`),n.style.setProperty("--s",`${o}`),n.style.setProperty("--v",`${s}`),n.style.setProperty("--a",`${a}`),n.style.setProperty("--color",x.slice(0,7)),n.style.setProperty("--color-a",x),l.value=`${i}`,h.value=`${a}`,h.classList.toggle("ag-charts-color-picker__alpha-input--opaque",a===1),c.classList.toggle("ag-charts-color-picker__multi-color-button--active",e),u.classList.toggle("ag-charts-color-picker__color-label--multi-color",e),document.activeElement!==d&&(d.value=e?"Multi Colour":x.toUpperCase()),m||t.color==null){const S=Color3.fromHSB(i,o,s,1).toHexString();t.onChange?.(x,S,a,e)}m&&(this.hasChanged=!0)};p(!1);const g=m=>m.preventDefault(),y=m=>m.stopPropagation(),f=m=>{m.preventDefault();const b=m.currentTarget;b.focus();const x=b.getBoundingClientRect(),S=({pageX:A,pageY:v})=>{e=!1,o=Math.min(Math.max((A-x.left)/x.width,0),1),s=1-Math.min(Math.max((v-x.top)/x.height,0),1),p()},M=()=>{window.removeEventListener("pointermove",S)};S(m),window.addEventListener("pointermove",S),window.addEventListener("pointerup",M,{once:!0})};return n.addEventListener("mousedown",y),n.addEventListener("touchstart",y),n.addEventListener("touchmove",y),n.addEventListener("keydown",m=>{switch(m.stopPropagation(),m.key){case"Enter":case"Escape":this.hide();break;default:return}m.preventDefault()}),r.addEventListener("pointerdown",f),r.addEventListener("touchstart",g,{passive:!1}),r.addEventListener("touchmove",g,{passive:!1}),r.addEventListener("keydown",m=>{if(m.key==="ArrowLeft")o=clamp3(0,o-.01,1);else if(m.key==="ArrowRight")o=clamp3(0,o+.01,1);else if(m.key==="ArrowUp")s=clamp3(0,s+.01,1);else if(m.key==="ArrowDown")s=clamp3(0,s-.01,1);else return;m.preventDefault(),p()}),c.addEventListener("click",()=>{e=!e,p()}),l.addEventListener("input",m=>{e=!1,i=m.currentTarget.valueAsNumber??0,p()}),h.addEventListener("input",m=>{e=!1,a=m.currentTarget.valueAsNumber??0,p()}),d.addEventListener("input",m=>{e=!1;const b=getHsva(m.currentTarget.value);b!=null&&([i,o,s,a]=b,p())}),d.addEventListener("blur",()=>p()),d.addEventListener("keydown",m=>{m.key==="Enter"&&(m.currentTarget.blur(),p())}),{element:n,initialFocus:r}}},import_ag_charts_community49=require("ag-charts-community");function channelMenuItemVisible(t){return!(t instanceof import_ag_charts_community49._ModuleSupport.LogScale)&&!(t instanceof import_ag_charts_community49._ModuleSupport.BandScale)}var LINE_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsTrendLine",icon:"trend-line-drawing",value:"line"},{label:"toolbarAnnotationsHorizontalLine",icon:"horizontal-line-drawing",value:"horizontal-line"},{label:"toolbarAnnotationsVerticalLine",icon:"vertical-line-drawing",value:"vertical-line"},{label:"toolbarAnnotationsParallelChannel",icon:"parallel-channel-drawing",value:"parallel-channel",visible:channelMenuItemVisible},{label:"toolbarAnnotationsDisjointChannel",icon:"disjoint-channel-drawing",value:"disjoint-channel",visible:channelMenuItemVisible}],FIBONACCI_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsFibonacciRetracement",icon:"fibonacci-retracement-drawing",value:"fibonacci-retracement"},{label:"toolbarAnnotationsFibonacciRetracementTrendBased",icon:"fibonacci-retracement-trend-based-drawing",value:"fibonacci-retracement-trend-based"}],FIBONACCI_RATIO_ITEMS=[{label:"Fibonacci - Extended",value:10},{label:"Fibonacci - 6 Band",value:6},{label:"Fibonacci - 4 Band",value:4}],TEXT_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsText",icon:"text-annotation",value:"text"},{label:"toolbarAnnotationsComment",icon:"comment-annotation",value:"comment"},{label:"toolbarAnnotationsCallout",icon:"callout-annotation",value:"callout"},{label:"toolbarAnnotationsNote",icon:"note-annotation",value:"note"}],SHAPE_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsArrow",icon:"arrow-drawing",value:"arrow"},{label:"toolbarAnnotationsArrowUp",icon:"arrow-up-drawing",value:"arrow-up"},{label:"toolbarAnnotationsArrowDown",icon:"arrow-down-drawing",value:"arrow-down"}],MEASURER_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsQuickDatePriceRange",icon:"measurer-drawing",value:"quick-date-price-range"},{label:"toolbarAnnotationsDateRange",icon:"date-range-drawing",value:"date-range"},{label:"toolbarAnnotationsPriceRange",icon:"price-range-drawing",value:"price-range"},{label:"toolbarAnnotationsDatePriceRange",icon:"date-price-range-drawing",value:"date-price-range"}],LINE_STROKE_WIDTH_ITEMS=[{strokeWidth:1,label:"1",value:1},{strokeWidth:2,label:"2",value:2},{strokeWidth:3,label:"3",value:3},{strokeWidth:4,label:"4",value:4},{strokeWidth:8,label:"8",value:8}],LINE_STYLE_TYPE_ITEMS=[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],TEXT_SIZE_ITEMS=[{label:"10",value:10},{label:"12",value:12},{label:"14",value:14},{label:"16",value:16},{label:"18",value:18},{label:"22",value:22},{label:"28",value:28},{label:"36",value:36},{label:"46",value:46}],{ARRAY:ARRAY2,BOOLEAN:BOOLEAN8,NUMBER:NUMBER8,OBJECT:OBJECT13,STRING:STRING16,UNION:UNION5,Color:Color4,FloatingToolbar,Listeners,Menu,PropertiesArray,ToolbarButtonProperties,ToolbarButtonWidget,Validate:Validate27}=import_ag_charts_community50._ModuleSupport,AnnotationOptionsButtonProperties=class extends ToolbarButtonProperties{constructor(){super(...arguments),this.checkedOverrides=new ToolbarButtonProperties}};__decorateClass([Validate27(UNION5(["line-stroke-width","line-style-type","line-color","fill-color","text-color","text-size","delete","settings","lock"]))],AnnotationOptionsButtonProperties.prototype,"value",2),__decorateClass([Validate27(OBJECT13,{optional:!0})],AnnotationOptionsButtonProperties.prototype,"checkedOverrides",2),__decorateClass([Validate27(STRING16,{optional:!0})],AnnotationOptionsButtonProperties.prototype,"color",2),__decorateClass([Validate27(NUMBER8,{optional:!0})],AnnotationOptionsButtonProperties.prototype,"strokeWidth",2),__decorateClass([Validate27(Boolean,{optional:!0})],AnnotationOptionsButtonProperties.prototype,"isMultiColor",2);var AnnotationOptionsButtonWidget=class extends ToolbarButtonWidget{update(t){super.update(t),t.value==="line-stroke-width"&&this.updateLineStrokeWidth(t),(t.value==="fill-color"||t.value==="line-color"||t.value==="text-color")&&this.updateFillColor(t)}updateFillColor(t){const e=this.getElement();e.classList.add("ag-charts-annotations__color-picker-button"),e.classList.toggle("ag-charts-annotations__color-picker-button--multi-color",t.isMultiColor),e.style.setProperty("--color",t.color??null)}updateLineStrokeWidth(t){const e=this.getElement();e.classList.add("ag-charts-annotations__stroke-width-button"),e.style.setProperty("--stroke-width",`${t.strokeWidth}px`)}},FloatingAnnotationOptionsToolbar=class extends FloatingToolbar{createButtonWidget(){return new AnnotationOptionsButtonWidget(this.localeManager)}},AnnotationOptionsToolbar=class extends import_ag_charts_community50._ModuleSupport.BaseProperties{constructor(t,e){super(),this.ctx=t,this.getActiveDatum=e,this.enabled=!0,this.buttons=new PropertiesArray(AnnotationOptionsButtonProperties),this.destroyFns=[],this.events=new Listeners,this.visibleButtons=[],this.toolbar=new FloatingAnnotationOptionsToolbar(this.ctx,"annotation-options"),this.colorPicker=new ColorPicker(this.ctx),this.textSizeMenu=new Menu(this.ctx,"text-size"),this.lineStyleTypeMenu=new Menu(this.ctx,"annotations-line-style-type"),this.lineStrokeWidthMenu=new Menu(this.ctx,"annotations-line-stroke-width"),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),this.toolbar.addToolbarListener("toolbar-moved",this.onToolbarMoved.bind(this)),t.widgets.seriesWidget.addListener("drag-start",this.onDragStart.bind(this)),t.widgets.seriesWidget.addListener("drag-end",this.onDragEnd.bind(this)),()=>this.colorPicker.destroy())}onDragStart(){this.toolbar.ignorePointerEvents()}onDragEnd(){this.toolbar.capturePointerEvents()}destroy(){for(const t of this.destroyFns)t()}addListener(t,e){return this.events.addListener(t,e)}show(){this.enabled&&this.toolbar.show()}hide(){this.toolbar.hide()}updateButtons(t){if(!this.enabled)return;const e={"line-style-type":hasLineStyle(t),"line-stroke-width":hasLineStyle(t),"line-color":hasLineColor(t),"text-color":hasTextColor(t),"fill-color":hasFillColor(t),"text-size":hasFontSize(t),settings:hasLineText(t),lock:!0,delete:!0};this.visibleButtons=this.buttons.filter(i=>e[i.value]),this.toolbar.clearButtons(),this.toolbar.updateButtons(this.visibleButtons),this.refreshButtons(t)}setAnchorScene(t){this.toolbar.hasBeenDragged()||this.toolbar.setAnchor(t.getAnchor())}hideOverlays(){this.toolbar.clearActiveButton(),this.colorPicker.hide({lastFocus:null}),this.textSizeMenu.hide(),this.lineStyleTypeMenu.hide(),this.lineStrokeWidthMenu.hide(),this.dispatch("hid-overlays")}clearActiveButton(){this.toolbar.clearActiveButton()}updateColors(t){this.updateColorPickerColor("line-color",t.getDefaultColor("line-color"),t.getDefaultOpacity("line-color"),"isMultiColor"in t&&t?.isMultiColor),this.updateColorPickerColor("fill-color",t.getDefaultColor("fill-color"),t.getDefaultOpacity("fill-color"),"isMultiColor"in t&&t?.isMultiColor),this.updateColorPickerColor("text-color",t.getDefaultColor("text-color"),t.getDefaultOpacity("text-color"),"isMultiColor"in t&&t?.isMultiColor)}updateColorPickerColor(t,e,i,o){if(e!=null&&i!=null){const{r:s,g:a,b:n}=Color4.fromString(e);e=Color4.fromArray([s,a,n,i]).toHexString()}this.updateButtonByValue(t,{color:e,isMultiColor:o})}updateFontSize(t){this.updateButtonByValue("text-size",{label:t!=null?String(t):void 0})}updateLineStyleType(t){this.updateButtonByValue("line-style-type",{icon:t.icon})}updateStrokeWidth(t){this.updateButtonByValue("line-stroke-width",{label:t.label,strokeWidth:t.value})}dispatch(t,e){this.events.dispatch(t,e)}onButtonPress({event:t,button:e}){const i=this.getActiveDatum();if(i)switch(this.hideOverlays(),e.value){case"line-style-type":{const o=hasLineStyle(i)?getLineStyle(i.lineDash,i.lineStyle):void 0;this.lineStyleTypeMenu.show({items:LINE_STYLE_TYPE_ITEMS,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStyle"),value:o,sourceEvent:t.sourceEvent,onPress:s=>this.onLineStyleTypeMenuPress(s,i),class:"ag-charts-annotations__line-style-type-menu"});break}case"line-stroke-width":{const o=hasLineStyle(i)?i.strokeWidth:void 0;this.lineStrokeWidthMenu.show({items:LINE_STROKE_WIDTH_ITEMS,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStrokeWidth"),value:o,sourceEvent:t.sourceEvent,onPress:s=>this.onLineStrokeWidthMenuPress(s,i),class:"ag-charts-annotations__line-stroke-width-menu"});break}case"line-color":case"fill-color":case"text-color":{this.toolbar.toggleActiveButtonByIndex(e.index),this.colorPicker.show({color:i?.getDefaultColor(e.value),opacity:i?.getDefaultOpacity(e.value),sourceEvent:t.sourceEvent,hasMultiColorOption:"isMultiColor"in i,isMultiColor:"isMultiColor"in i&&i?.isMultiColor,onChange:i!=null?this.onColorPickerChange.bind(this,e.value,i):void 0,onChangeHide:(o=>{this.dispatch("saved-color",{type:i.type,colorPickerType:e.value,color:i.getDefaultColor(o)})}).bind(this,e.value)});break}case"text-size":{const o=isTextType(i)?i.fontSize:void 0;this.textSizeMenu.show({items:TEXT_SIZE_ITEMS,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsTextSize"),value:o,sourceEvent:t.sourceEvent,onPress:s=>this.onTextSizeMenuPress(s,i),class:"ag-charts-annotations__text-size-menu"});break}case"delete":{this.dispatch("pressed-delete");break}case"lock":{i.locked=!i.locked,this.refreshButtons(i),this.dispatch("pressed-lock");break}case"settings":{this.toolbar.toggleActiveButtonByIndex(e.index),this.dispatch("pressed-settings",t);break}}}onToolbarMoved(t){const{buttonBounds:e,popoverBounds:i}=t,o={x:i.x,y:i.y+i.height+4},s={y:i.y-4};this.colorPicker.setAnchor(o,s);for(const[a,n]of e.entries()){const r=this.visibleButtons.at(a);if(!r)continue;const l={x:n.x,y:n.y+n.height-1},c={y:n.y};switch(r.value){case"line-stroke-width":this.lineStrokeWidthMenu.setAnchor(l,c);break;case"line-style-type":this.lineStyleTypeMenu.setAnchor(l,c);break;case"text-size":this.textSizeMenu.setAnchor(l,c);break}}}onColorPickerChange(t,e,i,o,s,a){this.dispatch("updated-color",{type:e.type,colorPickerType:t,colorOpacity:i,color:o,opacity:s,isMultiColor:a}),this.updateColorPickerColor(t,i,s,a)}onTextSizeMenuPress(t,e){if(!hasFontSize(e))return;const i=t.value;this.dispatch("updated-font-size",{type:e.type,fontSize:i}),this.textSizeMenu.hide(),this.updateFontSize(i)}onLineStyleTypeMenuPress(t,e){if(!hasLineStyle(e))return;const i=t.value;this.dispatch("updated-line-style",{type:e.type,lineStyleType:i}),this.lineStyleTypeMenu.hide(),this.updateLineStyleType(t)}onLineStrokeWidthMenuPress(t,e){if(!hasLineStyle(e))return;const i=t.value;this.dispatch("updated-line-width",{type:e.type,strokeWidth:i}),this.lineStrokeWidthMenu.hide(),this.updateStrokeWidth(t)}refreshButtons(t){const e=t.locked??!1;for(const[i,o]of this.visibleButtons.entries())o&&(o.value==="lock"?(this.toolbar.toggleSwitchCheckedByIndex(i,e),this.updateButtonByIndex(i,e?o.checkedOverrides.toJson():o.toJson())):this.toolbar.toggleButtonEnabledByIndex(i,!e));hasFontSize(t)&&this.updateFontSize(t.fontSize),this.updateColors(t),this.updateLineStyles(t)}updateLineStyles(t){if(!hasLineStyle(t))return;const e=t.strokeWidth??1,i=getLineStyle(t.lineDash,t.lineStyle);this.updateStrokeWidth({strokeWidth:e,value:e,label:String(e)}),this.updateLineStyleType(LINE_STYLE_TYPE_ITEMS.find(o=>o.value===i)??LINE_STYLE_TYPE_ITEMS[0])}updateButtonByValue(t,e){const i=this.visibleButtons.findIndex(o=>o.value===t);i!==-1&&this.updateButtonByIndex(i,e)}updateButtonByIndex(t,e){const i=this.visibleButtons.at(t);i&&this.toolbar.updateButtonByIndex(t,{...i.toJson(),...e,value:e.value??i.value})}};__decorateClass([Validate27(BOOLEAN8)],AnnotationOptionsToolbar.prototype,"enabled",2),__decorateClass([Validate27(ARRAY2)],AnnotationOptionsToolbar.prototype,"buttons",2);var import_ag_charts_community51=require("ag-charts-community"),{StateMachine,StateMachineProperty,Vec2:Vec22,Debug}=import_ag_charts_community51._ModuleSupport,DragStateMachine=class extends StateMachine{constructor(t){const e=({context:i})=>{this.node?.drag(this.datum,this.offset,i,this.snapping),t.update()};super("idle",{idle:{dragStart:{target:"dragging",action:({offset:i,context:o})=>{this.hasMoved=!1,this.dragStart=i,this.offset=i,this.node?.dragStart(this.datum,i,o)}}},dragging:{keyDown:e,keyUp:e,drag:({offset:i,context:o})=>{this.hasMoved=Vec22.lengthSquared(Vec22.sub(i,this.dragStart))>0,this.offset=i,this.node?.drag(this.datum,i,o,this.snapping),t.update()},dragEnd:{target:StateMachine.parent,action:()=>{this.node?.stopDragging(),this.hasMoved&&t.recordAction("Move annotation"),t.update()}}}}),this.debug=Debug.create(!0,"annotations"),this.hasMoved=!1,this.snapping=!1}};__decorateClass([StateMachineProperty()],DragStateMachine.prototype,"snapping",2),__decorateClass([StateMachineProperty()],DragStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty()],DragStateMachine.prototype,"node",2);var import_ag_charts_community52=require("ag-charts-community"),{STRING:STRING17,Validate:Validate28}=import_ag_charts_community52._ModuleSupport,ArrowDownProperties=class extends ShapePointProperties{constructor(){super(...arguments),this.type="arrow-down"}static is(t){return isObject(t)&&t.type==="arrow-down"}};__decorateClass([Validate28(STRING17)],ArrowDownProperties.prototype,"type",2);var import_ag_charts_community58=require("ag-charts-community"),import_ag_charts_community57=require("ag-charts-community"),import_ag_charts_community54=require("ag-charts-community"),import_ag_charts_community53=require("ag-charts-community"),_Handle=class bt extends import_ag_charts_community53._ModuleSupport.Group{constructor(){super(...arguments),this.active=!1,this.locked=!1,this.visible=!1,this.zIndex=1}drag(e){const{handle:i,locked:o}=this;return o?{point:{x:i.x,y:i.y},offset:{x:0,y:0}}:{point:e,offset:{x:e.x-i.x,y:e.y-i.y}}}toggleActive(e){this.active=e,e||(this.handle.strokeWidth=bt.INACTIVE_STROKE_WIDTH)}toggleHovered(e){this.glow.visible=!this.locked&&e,this.glow.dirtyPath=!0}toggleDragging(e){this.locked||(this.handle.visible=!e,this.glow.visible=this.glow.visible&&!e,this.handle.dirtyPath=!0,this.glow.dirtyPath=!0)}toggleLocked(e){this.locked=e}getCursor(){}containsPoint(e,i){return this.handle.containsPoint(e,i)}};_Handle.INACTIVE_STROKE_WIDTH=2;var Handle2=_Handle,_InvariantHandle=class vt extends Handle2{constructor(){super(),this.handle=new import_ag_charts_community53._ModuleSupport.Marker({shape:"circle"}),this.glow=new import_ag_charts_community53._ModuleSupport.Marker({shape:"circle"}),this.append([this.handle]),this.handle.size=vt.HANDLE_SIZE,this.handle.strokeWidth=Handle2.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2}update(e){this.handle.setProperties({...e,strokeWidth:Handle2.INACTIVE_STROKE_WIDTH})}drag(e){return{point:e,offset:{x:0,y:0}}}};_InvariantHandle.HANDLE_SIZE=7,_InvariantHandle.GLOW_SIZE=9;var InvariantHandle=_InvariantHandle,_UnivariantHandle=class rt extends Handle2{constructor(){super(),this.handle=new import_ag_charts_community53._ModuleSupport.Rect,this.glow=new import_ag_charts_community53._ModuleSupport.Rect,this.gradient="horizontal",this.append([this.glow,this.handle]),this.handle.cornerRadius=rt.CORNER_RADIUS,this.handle.width=rt.HANDLE_SIZE,this.handle.height=rt.HANDLE_SIZE,this.handle.strokeWidth=Handle2.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.cornerRadius=rt.CORNER_RADIUS,this.glow.width=rt.GLOW_SIZE,this.glow.height=rt.GLOW_SIZE,this.glow.strokeWidth=0,this.glow.fillOpacity=.2,this.glow.zIndex=1,this.glow.visible=!1}toggleLocked(e){if(super.toggleLocked(e),e){const i=(rt.HANDLE_SIZE-InvariantHandle.HANDLE_SIZE)/2;this.handle.cornerRadius=1,this.handle.fill=this.handle.stroke,this.handle.strokeWidth=0,this.handle.x+=i,this.handle.y+=i,this.handle.width=InvariantHandle.HANDLE_SIZE,this.handle.height=InvariantHandle.HANDLE_SIZE,this.glow.width=InvariantHandle.GLOW_SIZE,this.glow.height=InvariantHandle.GLOW_SIZE}else this.handle.cornerRadius=rt.CORNER_RADIUS,this.handle.width=rt.HANDLE_SIZE,this.handle.height=rt.HANDLE_SIZE,this.glow.width=rt.GLOW_SIZE,this.glow.height=rt.GLOW_SIZE,this.cachedStyles&&this.handle.setProperties(this.cachedStyles)}update(e){if(this.cachedStyles={...e},this.active||delete e.strokeWidth,this.locked){delete e.fill,delete e.strokeWidth;const i=(rt.HANDLE_SIZE-InvariantHandle.HANDLE_SIZE)/2;e.x-=i,e.y-=i,this.cachedStyles.x-=i,this.cachedStyles.y-=i}this.handle.setProperties(e),this.glow.setProperties({...e,x:(e.x??this.glow.x)-2,y:(e.y??this.glow.y)-2,strokeWidth:0,fill:e.stroke})}drag(e){return this.locked?{point:e,offset:{x:0,y:0}}:this.gradient==="vertical"?{point:{x:e.x,y:this.handle.y},offset:{x:e.x-this.handle.x,y:0}}:{point:{x:this.handle.x,y:e.y},offset:{x:0,y:e.y-this.handle.y}}}getCursor(){if(!this.locked)return this.gradient==="vertical"?"col-resize":"row-resize"}};_UnivariantHandle.HANDLE_SIZE=12,_UnivariantHandle.GLOW_SIZE=16,_UnivariantHandle.CORNER_RADIUS=4;var UnivariantHandle=_UnivariantHandle,_DivariantHandle=class pt extends Handle2{constructor(){super(),this.handle=new import_ag_charts_community53._ModuleSupport.Marker({shape:"circle"}),this.glow=new import_ag_charts_community53._ModuleSupport.Marker({shape:"circle"}),this.append([this.glow,this.handle]),this.handle.size=pt.HANDLE_SIZE,this.handle.strokeWidth=Handle2.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.size=pt.GLOW_SIZE,this.glow.strokeWidth=0,this.glow.fillOpacity=.2,this.glow.zIndex=1,this.glow.visible=!1}toggleLocked(e){super.toggleLocked(e),e?(this.handle.fill=this.handle.stroke,this.handle.strokeWidth=0,this.handle.size=InvariantHandle.HANDLE_SIZE,this.glow.size=InvariantHandle.GLOW_SIZE):(this.handle.size=pt.HANDLE_SIZE,this.glow.size=pt.GLOW_SIZE,this.cachedStyles&&this.handle.setProperties(this.cachedStyles))}update(e){this.cachedStyles={...e},this.active||delete e.strokeWidth,this.locked&&(delete e.fill,delete e.strokeWidth),this.handle.setProperties(e),this.glow.setProperties({...e,strokeWidth:0,fill:e.stroke})}getCursor(){return"pointer"}};_DivariantHandle.HANDLE_SIZE=11,_DivariantHandle.GLOW_SIZE=17;var DivariantHandle=_DivariantHandle,{ZIndexMap:ZIndexMap2}=import_ag_charts_community54._ModuleSupport,AnnotationScene=class extends import_ag_charts_community54._ModuleSupport.Group{constructor(){super(...arguments),this.name="AnnotationScene",this.zIndex=ZIndexMap2.CHART_ANNOTATION}static isCheck(t,e){return isObject(t)&&Object.hasOwn(t,"type")&&t.type===e}toggleHovered(t){this.toggleHandles(t)}*nonHandleChildren(){for(const t of this.children())t instanceof Handle2||(yield t)}computeBBoxWithoutHandles(){return import_ag_charts_community54._ModuleSupport.Transformable.toCanvas(this,import_ag_charts_community54._ModuleSupport.Group.computeChildrenBBox(this.nonHandleChildren()))}updateNode(t,e,i){if(!i&&e){this.removeChild(e);return}return i&&e==null&&(e=new t,this.appendChild(e)),e}},import_ag_charts_community56=require("ag-charts-community"),import_ag_charts_community55=require("ag-charts-community"),{Vec2:Vec23,toRadians:toRadians4}=import_ag_charts_community55._ModuleSupport;function snapPoint(t,e,i=!1,o,s=1){if(!i)return invertCoords(t,e);const a=o?convertPoint(o,e):Vec23.origin();return invertCoords(snapToAngle(t,a,s),e)}function snapToAngle({x:t,y:e},i,o,s=1){const{x:a,y:n}=i,r=Math.sqrt(Math.pow(t-a,2)+Math.pow(e-n,2)),l=Math.atan2(e-n,t-a),c=toRadians4(o),h=Math.round(l/c)*c;return{x:a+r*Math.cos(h),y:n+r*Math.sin(h)*s}}function getDragStartState(t,e){const i={};return Object.entries(t).forEach(([o,s])=>{i[o]=convertPoint(s,e)}),i}function translate(t,e,i){const o=[],s={};Object.entries(t).forEach(([h,d])=>{const u=Vec23.add(d,e);o.push(u),s[h]=invertCoords(u,i)});const{xAxis:a,yAxis:n}=i,r=(h,d,u)=>d>=h&&d<=u,l=o.every(h=>r(a.bounds.x,h.x,a.bounds.x+a.bounds.width)),c=o.every(h=>r(n.bounds.y,h.y,n.bounds.y+n.bounds.height));return{vectors:s,translateX:l,translateY:c}}var{Vec2:Vec24}=import_ag_charts_community56._ModuleSupport,PointScene=class extends AnnotationScene{constructor(){super(...arguments),this.handle=new DivariantHandle,this.anchor={x:0,y:0,position:"above"}}update(t,e){const i=convertPoint(t,e);this.updateHandle(t,i),this.anchor=this.updateAnchor(t,i,e)}dragStart(t,e,i){this.dragState={offset:e,...getDragStartState({handle:t},i)}}drag(t,e,i){const{dragState:o}=this;if(t.locked||!o)return;const s=Vec24.add(o.handle,Vec24.sub(e,o.offset)),a=invertCoords(s,i);validateDatumPoint(i,a)&&(t.x=a.x,t.y=a.y)}translate(t,e,i){const o=Vec24.add(convertPoint(t,i),e),s=invertCoords(o,i);validateDatumPoint(i,s)&&(t.x=s.x,t.y=s.y)}toggleHandles(t){this.handle.visible=!!t,this.handle.toggleHovered(this.activeHandle==="handle")}toggleActive(t){this.toggleHandles(t),this.handle.toggleActive(t)}stopDragging(){this.handle.toggleDragging(!1)}copy(t,e,i){const o=convertPoint(t,i),s=invertCoords({x:o.x-30,y:o.y-30},i);return e.x=s.x,e.y=s.y,e}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(t,e){const{handle:i}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="handle",!0):!1}getNodeAtCoords(t,e){if(this.handle.containsPoint(t,e))return"handle"}updateHandle(t,e,i){const{x:o,y:s}=this.getHandleCoords(t,e,i),a=this.getHandleStyles(t);this.handle.update({...a,x:o,y:s}),this.handle.toggleLocked(t.locked??!1)}updateAnchor(t,e,i){const o=this.getHandleCoords(t,e);return{x:o.x+i.seriesRect.x,y:o.y+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(t,e,i){return{x:e.x,y:e.y}}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}},ShapePointScene=class extends PointScene{constructor(){super(),this.append([this.handle])}update(t,e){super.update(t,e);const i=convertPoint(t,e);this.updateShape(t,i)}updateShape(t,e){this.updateShapeStyles(t),this.updateShapePath(t,e)}updateShapeStyles(t){const{shape:e}=this;e.fill=t.fill,e.fillOpacity=t.fillOpacity??1}updateShapePath(t,e){const{shape:i}=this;i.x=e.x,i.y=e.y,i.size=t.size}containsPoint(t,e){return super.containsPoint(t,e)||this.shape.containsPoint(t,e)}getNodeAtCoords(t,e){return this.shape.containsPoint(t,e)?"shape":super.getNodeAtCoords(t,e)}},arrowUpPoints=[[.5,0],[1,.5],[.75,.5],[.75,1],[.25,1],[.25,.5],[0,.5]];function arrowUp(t){import_ag_charts_community57._ModuleSupport.drawMarkerUnitPolygon(t,arrowUpPoints)}arrowUp.anchor={x:.5,y:0};var ArrowUpScene=class extends ShapePointScene{constructor(){super(),this.type="arrow-up",this.shape=new import_ag_charts_community57._ModuleSupport.Marker({shape:arrowUp}),this.append([this.shape])}static is(t){return AnnotationScene.isCheck(t,"arrow-up")}getHandleCoords(t,e){const i=DivariantHandle.HANDLE_SIZE/2,o=super.getHandleCoords(t,e);return o.y-=i,o}},arrowDownPoints=arrowUpPoints.map(([t,e])=>[t,1-e]);function arrowDown(t){import_ag_charts_community58._ModuleSupport.drawMarkerUnitPolygon(t,arrowDownPoints)}arrowDown.anchor={x:.5,y:1};var ArrowDownScene=class extends ShapePointScene{constructor(){super(),this.type="arrow-down",this.shape=new import_ag_charts_community58._ModuleSupport.Marker({shape:arrowDown}),this.append([this.shape])}static is(t){return AnnotationScene.isCheck(t,"arrow-down")}updateAnchor(t,e,i){const o=super.updateAnchor(t,e,i);return o.y-=t.size,o}getHandleCoords(t,e){const i=DivariantHandle.HANDLE_SIZE/2,o=super.getHandleCoords(t,e);return o.y+=i,o}},import_ag_charts_community59=require("ag-charts-community"),{StateMachine:StateMachine2,StateMachineProperty:StateMachineProperty2,Debug:Debug2}=import_ag_charts_community59._ModuleSupport,PointStateMachine=class extends StateMachine2{constructor(t){const e=({point:o})=>{const s=this.createDatum();s.set({x:o.x,y:o.y}),t.create(s)},i=()=>{this.node?.toggleActive(!0),t.showAnnotationOptions(),t.update()};super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},cancel:StateMachine2.parent,reset:StateMachine2.parent},"waiting-first-render":{render:{target:StateMachine2.parent,action:i}}}),this.debug=Debug2.create(!0,"annotations")}};__decorateClass([StateMachineProperty2()],PointStateMachine.prototype,"node",2);var ArrowDownStateMachine=class extends PointStateMachine{createDatum(){return new ArrowDownProperties}},arrowDownConfig={type:"arrow-down",datum:ArrowDownProperties,scene:ArrowDownScene,isDatum:ArrowDownProperties.is,translate:(t,e,i,o)=>{ArrowDownProperties.is(e)&&ArrowDownScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(ArrowDownProperties.is(e)&&ArrowDownProperties.is(i)&&ArrowDownScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{ArrowDownProperties.is(e)&&ArrowDownScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new ArrowDownStateMachine({...t,create:e("arrow-down")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community60=require("ag-charts-community"),{STRING:STRING18,Validate:Validate29}=import_ag_charts_community60._ModuleSupport,ArrowUpProperties=class extends ShapePointProperties{constructor(){super(...arguments),this.type="arrow-up"}static is(t){return isObject(t)&&t.type==="arrow-up"}};__decorateClass([Validate29(STRING18)],ArrowUpProperties.prototype,"type",2);var ArrowUpStateMachine=class extends PointStateMachine{createDatum(){return new ArrowUpProperties}},arrowUpConfig={type:"arrow-up",datum:ArrowUpProperties,scene:ArrowUpScene,isDatum:ArrowUpProperties.is,translate:(t,e,i,o)=>{ArrowUpProperties.is(e)&&ArrowUpScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(ArrowUpProperties.is(e)&&ArrowUpProperties.is(i)&&ArrowUpScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{ArrowUpProperties.is(e)&&ArrowUpScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new ArrowUpStateMachine({...t,create:e("arrow-up")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community64=require("ag-charts-community"),import_ag_charts_community63=require("ag-charts-community"),import_ag_charts_community62=require("ag-charts-community"),import_ag_charts_community61=require("ag-charts-community"),{Vec2:Vec25,Vec4}=import_ag_charts_community61._ModuleSupport,LinearScene=class extends AnnotationScene{extendLine({x1:t,y1:e,x2:i,y2:o},s,a){const n={x1:t,y1:e,x2:i,y2:o};if(!s.extendStart&&!s.extendEnd)return n;const[r,l]=boundsIntersections(n,a.yAxis.bounds),c=n.x2=n.y2,d=n.x2===n.x1;return s.extendEnd&&(d?n.y2=h?l.y:r.y:(n.x2=c?r.x:l.x,n.y2=c?r.y:l.y)),s.extendStart&&(d?n.y1=h?r.y:l.y:(n.x1=c?l.x:r.x,n.y1=c?l.y:r.y)),n}dragStart(t,e,i){this.dragState={offset:e,...getDragStartState({start:t.start,end:t.end},i)}}drag(t,e,i,o){t.locked||(this.activeHandle?this.dragHandle(t,e,i,o):this.dragAll(t,e,i))}dragAll(t,e,i){const{dragState:o}=this;o&&this.translatePoints(t,o.start,o.end,Vec25.sub(e,o.offset),i)}translatePoints(t,e,i,o,s){const{vectors:a,translateX:n,translateY:r}=translate({start:e,end:i},o,s);n&&(t.start.x=a.start?.x,t.end.x=a.end?.x),(this.ignoreYBounds||r)&&(t.start.y=a.start?.y,t.end.y=a.end?.y)}translate(t,e,i){this.translatePoints(t,convertPoint(t.start,i),convertPoint(t.end,i),e,i)}copy(t,e,i){const o=convertLine(t,i);if(!o)return;const s=this.computeBBoxWithoutHandles(),a={x:-s.width/2,y:-s.height/2};return this.translatePoints(e,Vec4.start(o),Vec4.end(o),a,i),e}},{Vec4:Vec42}=import_ag_charts_community62._ModuleSupport,StartEndScene=class extends LinearScene{constructor(){super(...arguments),this.start=new DivariantHandle,this.end=new DivariantHandle,this.anchor={x:0,y:0,position:"above"}}update(t,e){const i=convertLine(t,e);i!=null&&(this.updateHandles(t,i),this.updateAnchor(t,i,e))}toggleHandles(t){if(typeof t=="boolean")this.start.visible=t,this.end.visible=t;else for(const[e,i]of Object.entries(t))this[e].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end")}toggleActive(t){this.toggleHandles(t),this.start.toggleActive(t),this.end.toggleActive(t)}dragHandle(t,e,i,o){const{activeHandle:s,dragState:a}=this;if(!s||!a)return;this[s].toggleDragging(!0);const n=o?this.snapToAngle(t,e,i):invertCoords(this[s].drag(e).point,i);!n||!validateDatumPoint(i,n)||(t[s].x=n.x,t[s].y=n.y)}snapToAngle(t,e,i){const{activeHandle:o}=this,a=["start","end"].find(r=>r!==o);if(!o||!a)return;this[o].toggleDragging(!0);const n=convertPoint(t[a],i);return invertCoords(snapToAngle(e,n,t.snapToAngle),i)}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(t,e){const{start:i,end:o}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):o.containsPoint(t,e)?(this.activeHandle="end",!0):!1}getNodeAtCoords(t,e){if(this.start.containsPoint(t,e)||this.end.containsPoint(t,e))return"handle"}updateHandles(t,e,i){this.start.update({...this.getHandleStyles(t,"start"),...this.getHandleCoords(t,e,"start")}),this.end.update({...this.getHandleStyles(t,"end"),...this.getHandleCoords(t,e,"end",i)}),this.start.toggleLocked(t.locked??!1),this.end.toggleLocked(t.locked??!1)}updateAnchor(t,e,i,o){this.anchor={x:e.x1+i.seriesRect.x,y:e.y1+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(t,e,i,o){return i==="start"?Vec42.start(e):Vec42.end(e)}getHandleStyles(t,e){return{fill:t.handle.fill,stroke:t.handle.stroke,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}},{Vec2:Vec26,Vec4:Vec43}=import_ag_charts_community63._ModuleSupport,TextualStartEndScene=class extends StartEndScene{constructor(){super(...arguments),this.label=new import_ag_charts_community63._ModuleSupport.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(t){this.textInputBBox=t,this.markDirty()}update(t,e){const i=convertLine(t,e);if(i==null)return;const o=this.getTextBBox(t,i);this.updateLabel(t,o,i),this.updateHandles(t,i,o),this.updateShape(t,o,i),this.updateAnchor(t,i,e,o)}dragHandle(t,e,i,o){const{activeHandle:s,dragState:a}=this;if(!s||!a)return;this[s].toggleDragging(!0);const n=Vec26.add(a.end,Vec26.sub(e,a.offset)),r=o?this.snapToAngle(t,n,i):invertCoords(n,i);!r||!validateDatumPoint(i,r)||(t[s].x=r.x,t[s].y=r.y)}containsPoint(t,e){const{label:i}=this;return super.containsPoint(t,e)||i.containsPoint(t,e)}getNodeAtCoords(t,e){return this.label.containsPoint(t,e)?"text":super.getNodeAtCoords(t,e)}getTextBBox(t,e){const{text:i}=t.getText();return getBBox(t,i,Vec43.end(e),this.textInputBBox)}updateLabel(t,e,i){const{text:o,isPlaceholder:s}=t.getText();updateTextNode(this.label,o,s,t,this.getLabelCoords(t,e,i))}updateShape(t,e,i){}getLabelCoords(t,e,i){return Vec43.end(i)}getHandleStyles(t,e){return{...super.getHandleStyles(t,e),stroke:t.handle.stroke??t.color}}},{drawCorner,Path:Path5}=import_ag_charts_community64._ModuleSupport,CalloutScene=class extends TextualStartEndScene{constructor(){super(),this.type="callout",this.shape=new Path5,this.append([this.shape,this.label,this.start,this.end])}static is(t){return AnnotationScene.isCheck(t,"callout")}drag(t,e,i,o){t.locked||(this.activeHandle==="end"?this.dragHandle(t,e,i,o):this.dragAll(t,e,i))}getLabelCoords(t,e,i){const o=t.getPadding(),{bodyBounds:s={x:0,y:0,width:0,height:0}}=this.getDimensions(t,e,i)??{};return{x:s.x+o.left,y:s.y-o.bottom}}getHandleStyles(t,e){return e==="start"?{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}:{fill:void 0,strokeWidth:0}}updateAnchor(t,e,i,o){const{bodyBounds:s}=this.getDimensions(t,o,e)??{},a=s??o;this.anchor={x:a.x+i.seriesRect.x,y:a.y+i.seriesRect.y-a.height,position:this.anchor.position}}updateShape(t,e,i){const{shape:o}=this;o.fill=t.fill,o.fillOpacity=t.fillOpacity??1,o.stroke=t.stroke,o.strokeWidth=t.strokeWidth??1,o.strokeOpacity=t.strokeOpacity??1;const{tailPoint:s,bodyBounds:a}=this.getDimensions(t,e,i)??{};!s||!a||this.updatePath(s,a)}updatePath(t,e){const{x:i,y:o}=t,{x:s,y:a,width:n,height:r}=e,l=a-r,c=s+n,h=this.calculateCalloutPlacement({x:i,y:o},e),d=8,u=[{coordinates:{x0:s,x1:s+d,y0:l+d,y1:l,cx:h==="topLeft"?i:s+d,cy:h==="topLeft"?o:l+d},type:h==="topLeft"?"calloutCorner":"corner"},{coordinates:{x0:s+d,x1:c-d,y0:l,y1:l,cx:i,cy:o},type:h==="top"?"calloutSide":"side"},{coordinates:{x0:c-d,x1:c,y0:l,y1:l+d,cx:h==="topRight"?i:c-d,cy:h==="topRight"?o:l+d},type:h==="topRight"?"calloutCorner":"corner"},{coordinates:{x0:c,x1:c,y0:l+d,y1:a-d,cx:i,cy:o},type:h==="right"?"calloutSide":"side"},{coordinates:{x0:c,x1:c-d,y0:a-d,y1:a,cx:h==="bottomRight"?i:c-d,cy:h==="bottomRight"?o:a-d},type:h==="bottomRight"?"calloutCorner":"corner"},{coordinates:{x0:c-d,x1:s+d,y0:a,y1:a,cx:i,cy:o},type:h==="bottom"?"calloutSide":"side"},{coordinates:{x0:s+d,x1:s,y0:a,y1:a-d,cx:h==="bottomLeft"?i:s+d,cy:h==="bottomLeft"?o:a-d},type:h==="bottomLeft"?"calloutCorner":"corner"},{coordinates:{x0:s,x1:s,y0:a-d,y1:l+d,cx:i,cy:o},type:h==="left"?"calloutSide":"side"}],{path:p}=this.shape;p.clear(),p.moveTo(s,l+d),u.forEach(({coordinates:g,type:y})=>{this.drawPath(p,g,d,y)}),p.closePath()}drawPath(t,{x0:e,y0:i,x1:o,y1:s,cx:a,cy:n},r,l){switch(l){case"calloutCorner":{t.lineTo(a,n),t.lineTo(o,s);break}case"corner":{drawCorner(t,{x0:e,x1:o,y0:i,y1:s,cx:a,cy:n},r,!1);break}case"calloutSide":{if(e!==o){const h=e>o?-1:1,d=Math.min(e,o)+Math.abs(o-e)/2;t.lineTo(d-6*h,i),t.lineTo(a,n),t.lineTo(d+6*h,i),t.lineTo(o,s)}else{const h=i>s?-1:1,d=Math.min(i,s)+Math.abs(i-s)/2;t.lineTo(e,d-6*h),t.lineTo(a,n),t.lineTo(e,d+6*h),t.lineTo(o,s)}break}case"side":default:{t.lineTo(o,s);break}}}calculateCalloutPlacement(t,e){const i=e.x+e.width,o=e.y-e.height;let s,a;return t.x>i?s="right":t.xe.y?a="bottom":t.y{const p=this.createDatum();p.set({start:u,end:u,visible:!0}),t.create(p)},i=()=>{const{node:u}=this;u?.toggleActive(!0),u?.toggleHandles({start:!0})},o=()=>{t.showTextInput(),this.datum&&(this.datum.visible=!1)},s=()=>{t.hideTextInput(),this.datum&&(this.datum.visible=!0),t.deselect()},a=u=>{this.node?.setTextInputBBox(u),t.update()},n=({point:u})=>{const{datum:p,node:g}=this;p?.set({end:u}),g?.toggleActive(!0),g?.toggleHandles({end:!1}),t.update()},r=()=>{t.showAnnotationOptions(),this.node?.toggleHandles({end:!0})},l=({colorPickerType:u,colorOpacity:p,color:g,opacity:y,isMultiColor:f})=>{const{datum:m}=this;m&&(u==="text-color"&&t.updateTextInputColor(g),setColor(m,u,p,g,y,f),t.update())},c=u=>{const{datum:p,node:g}=this;!p||!g||!isTextType(p)||(p.fontSize=u,t.updateTextInputFontSize(u),t.update())},h=()=>{t.delete()},d=({textInputValue:u,bbox:p})=>{const{datum:g}=this;if(p!=null&&u!=null&&u.length>0){if(!isTextType(g))return;const y=wrapText(g,u,p.width);g?.set({text:y}),t.update(),t.recordAction(`Create ${g?.type} annotation`)}else t.delete()};super("start",{start:{click:{target:"waiting-first-render",action:e},dragStart:{target:"waiting-first-render",action:e},cancel:StateMachine3.parent,reset:StateMachine3.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:n,drag:n,click:{target:"edit",action:r},dragEnd:{target:"edit",action:r},reset:{target:StateMachine3.parent,action:h},cancel:{target:StateMachine3.parent,action:h}},edit:{onEnter:o,updateTextInputBBox:a,color:l,fontSize:c,textInput:[{guard:guardCancelAndExit,target:StateMachine3.parent,action:h},{guard:guardSaveAndExit,target:StateMachine3.parent,action:d}],click:{target:StateMachine3.parent,action:d},dragStart:{target:StateMachine3.parent,action:d},resize:{target:StateMachine3.parent,action:d},onExit:s,cancel:{target:StateMachine3.parent,action:h}}}),this.debug=Debug3.create(!0,"annotations")}};__decorateClass([StateMachineProperty3()],TextualStartEndStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty3()],TextualStartEndStateMachine.prototype,"node",2);var CalloutStateMachine=class extends TextualStartEndStateMachine{createDatum(){return new CalloutProperties}},calloutConfig={type:"callout",datum:CalloutProperties,scene:CalloutScene,isDatum:CalloutProperties.is,translate:(t,e,i,o)=>{if(CalloutProperties.is(e)&&CalloutScene.is(t))return t.translate(e,i,o)},copy:(t,e,i,o)=>{if(CalloutProperties.is(e)&&CalloutProperties.is(i)&&CalloutScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{CalloutProperties.is(e)&&CalloutScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new CalloutStateMachine({...t,create:e("callout")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community67=require("ag-charts-community"),import_ag_charts_community66=require("ag-charts-community"),TextualPointScene=class extends PointScene{constructor(){super(...arguments),this.label=new import_ag_charts_community66._ModuleSupport.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(t){this.textInputBBox=t,this.markDirty()}update(t,e){const i=convertPoint(t,e),o=this.getTextBBox(t,i,e);this.updateLabel(t,o),this.updateHandle(t,i,o),this.updateShape(t,o),this.anchor=this.updateAnchor(t,o,e)}copy(t,e,i){const o=convertPoint(t,i),s=this.getTextBBox(t,o,i),a=t.getPadding(),n=a.left+a.right,r=a.top+a.bottom,l=(s.width+n)/2,c=s.height+r,h=invertCoords({x:o.x-l,y:o.y-c},i);return e.x=h.x,e.y=h.y,e}containsPoint(t,e){const{label:i}=this;return super.containsPoint(t,e)||i.visible&&i.containsPoint(t,e)}getNodeAtCoords(t,e){return this.label.visible&&this.label.containsPoint(t,e)?"text":super.getNodeAtCoords(t,e)}getTextBBox(t,e,i){const{text:o}=t.getText();return getBBox(t,o,{x:e.x,y:e.y},this.textInputBBox)}updateLabel(t,e){const{text:i,isPlaceholder:o}=t.getText();updateTextNode(this.label,i,o,t,this.getLabelCoords(t,e))}updateShape(t,e){}updateAnchor(t,e,i){return{x:e.x+i.seriesRect.x,y:e.y+i.seriesRect.y-e.height,position:this.anchor.position}}getLabelCoords(t,e){return e}getHandleCoords(t,e,i){return i}getHandleStyles(t){const e=super.getHandleStyles(t);return e.stroke=t.handle.stroke??t.color,e}},{drawCorner:drawCorner2}=import_ag_charts_community67._ModuleSupport,CommentScene=class extends TextualPointScene{constructor(){super(),this.type="comment",this.shape=new import_ag_charts_community67._ModuleSupport.Path,this.append([this.shape,this.label,this.handle])}static is(t){return AnnotationScene.isCheck(t,"comment")}updateShape(t,e){const{shape:i}=this;i.fill=t.fill,i.fillOpacity=t.fillOpacity??1,i.stroke=t.stroke??"transparent",i.strokeWidth=t.strokeWidth??1,i.strokeOpacity=t.strokeOpacity??1,this.updatePath(t,e)}getLabelCoords(t,e){const i=t.getPadding();return{x:e.x+i.left,y:e.y-i.bottom}}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke??t.fill,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}updateAnchor(t,e,i){const o=super.updateAnchor(t,e,i),s=t.getPadding();return o.y-=s.bottom+s.top,o}updatePath(t,e){const i=t.getPadding(),{x:o,y:s}=e;let{width:a,height:n}=e;const{fontSize:r}=t,l=i.left+i.right,c=i.top+i.bottom;a=a+l,n=Math.max(n+c,r+c);const h=s-n,d=o+a,u=(r*ANNOTATION_TEXT_LINE_HEIGHT+c)/2,{path:p}=this.shape;p.clear(),p.moveTo(o,s),p.lineTo(o,h+u),drawCorner2(p,{x0:o,x1:o+u,y0:h+u,y1:h,cx:o+u,cy:h+u},u,!1),p.lineTo(d-u,h),drawCorner2(p,{x0:d-u,x1:d,y0:h,y1:h+u,cx:d-u,cy:h+u},u,!1),p.lineTo(d,s-u),drawCorner2(p,{x0:d,x1:d-u,y0:s-u,y1:s,cx:d-u,cy:s-u},u,!1),p.closePath()}containsPoint(t,e){return super.containsPoint(t,e)||this.shape.containsPoint(t,e)}},import_ag_charts_community68=require("ag-charts-community"),{StateMachine:StateMachine4,StateMachineProperty:StateMachineProperty4,Debug:Debug4}=import_ag_charts_community68._ModuleSupport,TextualPointStateMachine=class extends StateMachine4{constructor(t){const e=({point:h})=>{const d=this.createDatum();d.set({x:h.x,y:h.y}),t.create(d)},i=()=>{this.node?.toggleActive(!0),t.showAnnotationOptions(),t.update()},o=()=>{t.showTextInput(),this.datum&&(this.datum.visible=!1)},s=()=>{t.hideTextInput(),this.datum&&(this.datum.visible=!0),t.deselect()},a=h=>{this.node?.setTextInputBBox(h),t.update()},n=({colorPickerType:h,colorOpacity:d,color:u,opacity:p,isMultiColor:g})=>{this.datum&&(h==="text-color"&&t.updateTextInputColor(u),setColor(this.datum,h,d,u,p,g),t.update())},r=h=>{const{datum:d,node:u}=this;!d||!u||!isTextType(d)||(d.fontSize=h,t.updateTextInputFontSize(h),t.update())},l=()=>{t.delete()},c=({textInputValue:h,bbox:d})=>{if(d!=null&&h!=null&&h.length>0){const{datum:u}=this;if(!isTextType(u))return;const p=wrapText(u,h,d.width);u?.set({text:p}),t.update(),t.recordAction(`Create ${u?.type} annotation`)}else t.delete()};super("start",{start:{click:{target:"waiting-first-render",action:e},dragStart:{target:"waiting-first-render",action:e},cancel:StateMachine4.parent,reset:StateMachine4.parent},"waiting-first-render":{render:{target:"edit",action:i}},edit:{onEnter:o,updateTextInputBBox:a,color:n,fontSize:r,textInput:[{guard:guardCancelAndExit,target:StateMachine4.parent,action:l},{guard:guardSaveAndExit,target:StateMachine4.parent,action:c}],click:{target:StateMachine4.parent,action:c},dragStart:{target:StateMachine4.parent,action:c},resize:{target:StateMachine4.parent,action:c},onExit:s,cancel:{target:StateMachine4.parent,action:l}}}),this.debug=Debug4.create(!0,"annotations")}};__decorateClass([StateMachineProperty4()],TextualPointStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty4()],TextualPointStateMachine.prototype,"node",2);var CommentStateMachine=class extends TextualPointStateMachine{createDatum(){return new CommentProperties}},commentConfig={type:"comment",datum:CommentProperties,scene:CommentScene,isDatum:CommentProperties.is,translate:(t,e,i,o)=>{CommentProperties.is(e)&&CommentScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(CommentProperties.is(e)&&CommentProperties.is(i)&&CommentScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{CommentProperties.is(e)&&CommentScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new CommentStateMachine({...t,create:e("comment")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community73=require("ag-charts-community"),import_ag_charts_community69=require("ag-charts-community"),{calculateLabelTranslation,ChartAxisDirection:ChartAxisDirection7}=import_ag_charts_community69._ModuleSupport,AxisLabelScene=class extends import_ag_charts_community69._ModuleSupport.Group{constructor(){super({name:"AnnotationAxisLabelGroup"}),this.label=new import_ag_charts_community69._ModuleSupport.Text({zIndex:1}),this.rect=new import_ag_charts_community69._ModuleSupport.Rect;const{label:t}=this;t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.textBaseline="middle",t.textAlign="center",this.append([this.rect,this.label])}update(t){this.updateLabel(t),this.updateRect(t),this.updatePosition(t)}updateLabel({value:t,styles:e,context:i}){const{fontWeight:o,fontSize:s,fontStyle:a,fontFamily:n,textAlign:r,color:l="white",formatter:c}=e,h=c?c({value:t}):i.scaleValueFormatter()(t);this.label.setProperties({fontWeight:o,fontSize:s,fontStyle:a,fontFamily:n,textAlign:r,fill:l,text:h})}updateRect({styles:t}){const{rect:e}=this,{cornerRadius:i,fill:o,fillOpacity:s,stroke:a,strokeOpacity:n}=t;e.setProperties({cornerRadius:i,fill:o,fillOpacity:s,stroke:a,strokeOpacity:n})}updatePosition({x:t,y:e,context:i,styles:{padding:o}}){const{label:s,rect:a}=this,n=s.getBBox()?.clone(),r=o??8,l=o??5;n.grow(r,"horizontal"),n.grow(l,"vertical");const c=i.direction===ChartAxisDirection7.X?Math.round(l/2):r,{xTranslation:h,yTranslation:d}=calculateLabelTranslation({yDirection:!0,padding:i.labelPadding-c,position:i.position??"left",bbox:n}),u=t+h,p=e+d;s.x=u,s.y=p,a.y=p-Math.round(n.height/2),a.x=u-Math.round(n.width/2),a.height=n.height,a.width=n.width}};AxisLabelScene.className="AxisLabel";var import_ag_charts_community70=require("ag-charts-community"),{Vec2:Vec27}=import_ag_charts_community70._ModuleSupport,CollidableLine=class extends import_ag_charts_community70._ModuleSupport.Line{constructor(){super(...arguments),this.growCollisionBox=9,this.clipMask=new Map}setProperties(t,e){return super.setProperties(t,e),this.updateCollisionBBox(),this}updateCollisionBBox(){const{growCollisionBox:t,strokeWidth:e,x1:i,y1:o,x2:s,y2:a}=this;let n=e+t;n%2===0&&(n+=1);const r=Vec27.from(i,o-Math.floor(n/2)),l=Vec27.from(s,a),c=Vec27.distance(r,l);this.collisionBBox=new import_ag_charts_community70._ModuleSupport.BBox(r.x,r.y,c,n)}isPointInPath(t,e){const{collisionBBox:i,x1:o,y1:s,x2:a,y2:n}=this;if(!i)return!1;const r=Vec27.from(o,s),l=Vec27.from(a,n),c=Vec27.sub(Vec27.from(t,e),r),h=Vec27.sub(l,r),d=Vec27.rotate(c,Vec27.angle(c,h),r);return i.containsPoint(d.x,d.y)??!1}render(t){this.applyClipMask(t.ctx),super.render(t),this.closeClipMask(t.ctx)}setClipMask(t,e){const i=this.clipMask.get(t);import_ag_charts_community70._ModuleSupport.jsonDiff(i,e)!=null&&this.markDirty(),e?this.clipMask.set(t,e):this.clipMask.delete(t)}applyClipMask(t){const{clipMask:e}=this;e.size!==0&&this.clipMask.forEach(i=>{const{x:o,y:s,radius:a}=i;t.save(),t.beginPath(),t.rect(0,0,t.canvas.width,t.canvas.height),t.ellipse(o,s,a,a,0,Math.PI*2,0,!0),t.clip()})}closeClipMask(t){this.clipMask.size!==0&&t.restore()}},import_ag_charts_community71=require("ag-charts-community"),CollidableText=class extends import_ag_charts_community71._ModuleSupport.TransformableText{constructor(){super(...arguments),this.growCollisionBox={top:4,right:4,bottom:4,left:4}}isPointInPath(t,e){const i=this.fromParentPoint(t,e),o=this.computeBBoxWithoutTransforms();return o?o.grow(this.growCollisionBox).containsPoint(i.x,i.y):!1}},import_ag_charts_community72=require("ag-charts-community"),{Vec2:Vec28}=import_ag_charts_community72._ModuleSupport;function updateLineText(t,e,i,o,s,a,n){if(!a||!s||!o){e.setClipMask(t);return}const{alignment:r,position:l}=o,c=getNumbers(i,o.fontSize,n),{point:h,textBaseline:d}=positionAndAlignment(c,l,r);setProperties(s,a,o,h,c.angle,d);const{x:u,y:p,width:g,height:y}=s.getBBox(),f=Vec28.length(Vec28.from(g,y)),m={x:u+g/2,y:p+y/2,radius:f/2+Vec28.length(c.offset)};return l==="center"?e.setClipMask(t,m):e.setClipMask(t),{clipMask:m,numbers:c}}function updateChannelText(t,e,i,o,s,a,n){if(!n||!a)return;const{alignment:r,position:l}=o,[c,h]=e.y1<=i.y1?[e,i]:[i,e];let d=c;l==="bottom"?d=h:l==="inside"&&(d={x1:(c.x1+h.x1)/2,y1:(c.y1+h.y1)/2,x2:(c.x2+h.x2)/2,y2:(c.y2+h.y2)/2});const u=getNumbers(d,o.fontSize,s),{point:p,textBaseline:g}=positionAndAlignment(u,l==="inside"?"center":l,r,t);setProperties(a,n,o,p,u.angle,g)}function getNumbers(t,e,i){let[o,s]=Vec28.from(t);o.x>s.x&&([o,s]=[s,o]);const a=Vec28.normalized(Vec28.sub(s,o)),n=Vec28.angle(a),r=Vec28.multiply(a,DivariantHandle.HANDLE_SIZE/2+(e??14)/2),l=Vec28.multiply(a,(i??2)/2+(e??14)/3);return{left:o,right:s,normal:a,angle:n,inset:r,offset:l}}function positionAndAlignment({left:t,right:e,normal:i,angle:o,inset:s,offset:a},n,r,l){let c;r==="right"?c=Vec28.sub(e,s):r==="center"?c=Vec28.add(t,Vec28.multiply(i,Vec28.distance(t,e)/2)):c=Vec28.add(t,s);let h="bottom";return n==="bottom"?(c=Vec28.rotate(a,o+Math.PI/2,c),h="top"):n==="center"&&!l?h="middle":c=Vec28.rotate(a,o-Math.PI/2,c),{point:c,textBaseline:h}}function setProperties(t,e,i,o,s,a){t.setProperties({text:e,x:o.x,y:o.y,rotation:s,rotationCenterX:o.x,rotationCenterY:o.y,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textAlign:i.alignment,textBaseline:a})}var{ChartAxisDirection:ChartAxisDirection8,Vec2:Vec29,Vec4:Vec44}=import_ag_charts_community73._ModuleSupport,CrossLineScene=class extends AnnotationScene{constructor(){super(),this.type="cross-line",this.line=new CollidableLine,this.middle=new UnivariantHandle,this.isHorizontal=!1,this.append([this.line,this.middle])}static is(t){return AnnotationScene.isCheck(t,"cross-line")}update(t,e){const{seriesRect:i}=e;this.seriesRect=i,this.isHorizontal=HorizontalLineProperties.is(t);const o=this.isHorizontal?e.yAxis:e.xAxis,s=this.convertCrossLine(t,o);if(s==null){this.visible=!1;return}this.visible=t.visible??!0,this.visible&&(this.updateLine(t,s),this.updateHandle(t,s),this.updateText(t,s),this.updateAxisLabel(t,o,s))}updateLine(t,e){const{line:i}=this,{lineDashOffset:o,stroke:s,strokeWidth:a,strokeOpacity:n}=t,{x1:r,y1:l,x2:c,y2:h}=e;i.setProperties({x1:r,y1:l,x2:c,y2:h,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:o,stroke:s,strokeWidth:a,strokeOpacity:n,fillOpacity:0})}updateHandle(t,e){const{middle:i}=this,{locked:o,stroke:s,strokeWidth:a,strokeOpacity:n}=t,r={fill:t.handle.fill,stroke:t.handle.stroke??s,strokeOpacity:t.handle.strokeOpacity??n,strokeWidth:t.handle.strokeWidth??a},l=Vec29.sub(Vec44.center(e),Vec29.from(i.handle.width/2,i.handle.height/2));i.gradient=this.isHorizontal?"horizontal":"vertical",i.update({...r,...l}),i.toggleLocked(o??!1)}updateText(t,e){this.text=this.updateNode(CollidableText,this.text,!!t.text.label),updateLineText(this.line.id,this.line,e,t.text,this.text,t.text.label,t.strokeWidth)}createAxisLabel(t){const e=new AxisLabelScene;return t.attachLabel(e),e}updateAxisLabel(t,e,i){this.axisLabel||(this.axisLabel=this.createAxisLabel(e));const{axisLabel:o,seriesRect:s}=this,{direction:a,position:n}=e;if(t.axisLabel.enabled){o.visible=this.visible;const r=n==="left"||n==="top"?Vec44.start(i):Vec44.end(i),l=a===ChartAxisDirection8.X?r.x:r.y;if(!e.inRange(l)){o.visible=!1;return}const{value:c}=getGroupingValue(t.value);o.update({...Vec29.add(r,Vec29.required(s)),value:c,styles:t.axisLabel,context:e})}else o.visible=!1}setAxisLabelOpacity(t){this.axisLabel&&(this.axisLabel.opacity=t)}setAxisLabelVisible(t){this.axisLabel&&(this.axisLabel.visible=t)}toggleHandles(t){this.middle.visible=t,this.middle.toggleHovered(this.activeHandle==="middle")}destroy(){super.destroy(),this.axisLabel?.destroy()}toggleActive(t){this.toggleHandles(t),this.middle.toggleActive(t)}dragStart(t,e,i){const o=HorizontalLineProperties.is(t)?{x:e.x,y:convert(t.value,i.yAxis)}:{x:convert(t.value,i.xAxis),y:e.y};this.dragState={offset:e,middle:o}}drag(t,e,i){const{activeHandle:o,dragState:s}=this;if(t.locked)return;let a;if(o)this[o].toggleDragging(!0),a=this[o].drag(e).point;else if(s)a=Vec29.add(s.middle,Vec29.sub(e,s.offset));else return;const n=invertCoords(a,i),r=HorizontalLineProperties.is(t);t.set({value:r?n.y:n.x})}translate(t,{x:e,y:i},o){if(t.locked)return;const{axisContext:s,translation:a}=HorizontalLineProperties.is(t)?{axisContext:o.yAxis,translation:i}:{axisContext:o.xAxis,translation:e},n=convert(t.value,s)+a,r=invert(n,s);isNaN(r)||t.set({value:r})}stopDragging(){this.middle.toggleDragging(!1)}copy(t,e,i){const o=HorizontalLineProperties.is(t),s=this.isHorizontal?i.yAxis:i.xAxis,a=this.convertCrossLine(t,s);if(!a)return;const n=o?-30:0,r=o?0:-30,l=invertCoords({x:a.x1+r,y:a.y1+n},i);return e.set({value:o?l.y:l.x}),e}getCursor(){return this.activeHandle==null?"pointer":this[this.activeHandle].getCursor()}containsPoint(t,e){const{middle:i,line:o,text:s}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="middle",!0):o.isPointInPath(t,e)||!!s?.containsPoint(t,e)}getNodeAtCoords(t,e){if(this.text?.containsPoint(t,e))return"text";if(this.line.isPointInPath(t,e))return"line";if(this.middle.containsPoint(t,e))return"handle"}getAnchor(){const t=this.computeBBoxWithoutHandles();return this.isHorizontal?{x:t.x+t.width/2,y:t.y}:{x:t.x+t.width,y:t.y+t.height/2,position:"right"}}convertCrossLine(t,e){if(t.value==null)return;let i=0,o=0,s,a;const{bounds:n}=e,r=convert(t.value,e);return HorizontalLineProperties.is(t)?(s=n.width,o=r,a=r):(i=r,s=r,a=n.height),{x1:i,y1:o,x2:s,y2:a}}},import_ag_charts_community74=require("ag-charts-community"),{StateMachine:StateMachine5,StateMachineProperty:StateMachineProperty5,Debug:Debug5}=import_ag_charts_community74._ModuleSupport,CrossLineStateMachine=class extends StateMachine5{constructor(t,e){const i=({point:s})=>{const a=t==="horizontal",n=a?new HorizontalLineProperties:new VerticalLineProperties;n.set({value:a?s.y:s.x}),e.create(n),e.recordAction(`Create ${a?"horizontal-line":"vertical-line"} annotation`)},o=()=>{this.node?.toggleActive(!0),e.showAnnotationOptions(),e.update()};super("start",{start:{click:{target:"waiting-first-render",action:i},drag:{target:"waiting-first-render",action:i},reset:StateMachine5.parent,cancel:StateMachine5.parent},"waiting-first-render":{render:{target:StateMachine5.parent,action:o}}}),this.debug=Debug5.create(!0,"annotations")}};__decorateClass([StateMachineProperty5()],CrossLineStateMachine.prototype,"node",2);var horizontalLineConfig={type:"horizontal-line",datum:HorizontalLineProperties,scene:CrossLineScene,isDatum:HorizontalLineProperties.is,translate:(t,e,i,o)=>{HorizontalLineProperties.is(e)&&CrossLineScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(HorizontalLineProperties.is(e)&&HorizontalLineProperties.is(i)&&CrossLineScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{HorizontalLineProperties.is(e)&&CrossLineScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new CrossLineStateMachine("horizontal",{...t,create:e("horizontal-line")}),dragState:t=>new DragStateMachine(t)},verticalLineConfig={type:"vertical-line",datum:VerticalLineProperties,scene:CrossLineScene,isDatum:VerticalLineProperties.is,translate:(t,e,i,o)=>{VerticalLineProperties.is(e)&&CrossLineScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(VerticalLineProperties.is(e)&&VerticalLineProperties.is(i)&&CrossLineScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{VerticalLineProperties.is(e)&&CrossLineScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new CrossLineStateMachine("vertical",{...t,create:e("vertical-line")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community77=require("ag-charts-community"),import_ag_charts_community76=require("ag-charts-community"),import_ag_charts_community75=require("ag-charts-community"),{Vec4:Vec45}=import_ag_charts_community75._ModuleSupport,WithBackgroundScene=class{static updateBackground(t,e,i,o){const{background:s}=this,{seriesRect:a}=o;s.path.clear(!0);const n=Vec45.from(0,0,a.width,a.height),r=this.getBackgroundPoints(t,e,i,n);for(let c=0;cinvertCoords(u,i),l=t.toJson(),c=t.snapToAngle,{value:h}=getGroupingValue(t.end.y),{value:d}=getGroupingValue(t.start.y);switch(s){case"topLeft":case"bottomLeft":{const u=s==="topLeft"?1:-1,p=o?this.snapToAngle(e,i,"topLeft","topRight",c,u):r({x:a.topLeft.handle.x+n.x,y:a.topLeft.handle.y+n.y*u}),g=o?this.snapToAngle(e,i,"bottomLeft","bottomRight",c,-u):r({x:a.bottomLeft.handle.x+n.x,y:a.bottomLeft.handle.y+n.y*-u});if(p?.y==null||g?.y==null||d==null||!isNumber(d))return;const y=t.startHeight+(p.y-d)*2;t.start.x=p.x,t.start.y=p.y,t.startHeight=y;break}case"topRight":{const u=o?this.snapToAngle(e,i,"topRight","topLeft",c):r({x:a.topRight.handle.x+n.x,y:a.topRight.handle.y+n.y});if(u?.y==null||h==null||!isNumber(h))return;const p=t.endHeight+(u.y-h)*2;t.end.x=u.x,t.end.y=u.y,t.endHeight=p;break}case"bottomRight":{const u=r({x:a.bottomLeft.handle.x+n.x,y:a.bottomLeft.handle.y+n.y}),p=r({x:a.bottomRight.handle.x+n.x,y:a.bottomRight.handle.y+n.y});if(!u||!p||t.start.y==null||h==null||!isNumber(h))return;const g=h-p.y,y=t.startHeight-(t.endHeight-g);t.startHeight=y,t.endHeight=g}}t.isValidWithContext(i)||t.set(l)}updateLines(t,e,i){const{topLine:o,bottomLine:s}=this,{lineDashOffset:a,stroke:n,strokeOpacity:r,strokeWidth:l}=t,c={lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:a,stroke:n,strokeOpacity:r,strokeWidth:l};o.setProperties({...e,...c}),s.setProperties({...i,...c})}updateHandles(t,e,i){const{handles:{topLeft:o,topRight:s,bottomLeft:a,bottomRight:n}}=this,r={fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth};o.update({...r,...Vec46.start(e)}),s.update({...r,...Vec46.end(e)}),a.update({...r,...Vec46.start(i)}),n.update({...r,...Vec210.sub(Vec46.end(i),Vec210.from(n.handle.width/2,n.handle.height/2))})}updateText(t,e,i){this.text=this.updateNode(CollidableText,this.text,!!t.text.label),updateChannelText(!1,e,i,t.text,t.strokeWidth,this.text,t.text.label)}getBackgroundPoints(t,e,i,o){const s=e.x1>e.x2,a=e.y1>e.y2,n=a?o.y2:o.y1,r=a?o.y1:o.y2,l=Vec210.from(e);return t.extendEnd&&e.y2===r&&l.push(Vec210.from(s?o.x1:o.x2,a?o.y1:o.y2)),t.extendEnd&&i.y2===n&&l.push(Vec210.from(s?o.x1:o.x2,a?o.y2:o.y1)),l.push(...Vec210.from(i).reverse()),t.extendStart&&i.y1===r&&l.push(Vec210.from(s?o.x2:o.x1,a?o.y1:o.y2)),t.extendStart&&e.y1===n&&l.push(Vec210.from(s?o.x2:o.x1,a?o.y2:o.y1)),l}},import_ag_charts_community78=require("ag-charts-community"),{StateMachine:StateMachine6,StateMachineProperty:StateMachineProperty6,Debug:Debug6}=import_ag_charts_community78._ModuleSupport,DisjointChannelStateMachine=class extends StateMachine6{constructor(t){const e=({point:l})=>{const c=new DisjointChannelProperties;c.set({start:l,end:l,startHeight:0,endHeight:0}),t.create(c)},i=()=>{const{node:l}=this;l?.toggleActive(!0),l?.toggleHandles({topLeft:!0,topRight:!1,bottomLeft:!1,bottomRight:!1})},o=({offset:l,context:c})=>{const{datum:h,snapping:d}=this;h&&(h.set({end:snapPoint(l,c,d,h.start,h.snapToAngle)}),t.update())},s=()=>{this.node?.toggleHandles({topRight:!0}),t.update()},a=({point:l})=>{const{datum:c,node:h}=this,{value:d}=getGroupingValue(c?.end.y),{value:u}=getGroupingValue(c?.start.y),{y:p}=l;if(c==null||!isNumber(u)||!isNumber(d)||!isNumber(p))return;const g=d-(p??0),y=(u-d)*2+g,f={x:c?.start.x,y:u-y},m={x:c?.end.x,y:l.y};h?.toggleHandles({bottomLeft:!0,bottomRight:!0}),!(!t.validatePoint(f)||!t.validatePoint(m))&&(c.set({startHeight:y,endHeight:g}),t.update())},n=({point:l})=>{const{datum:c,node:h}=this,{value:d}=getGroupingValue(c?.end.y),{value:u}=getGroupingValue(c?.start.y),{y:p}=l;if(c==null||!isNumber(u)||!isNumber(d)||!isNumber(p))return;const g=d-(p??0),y=(u-d)*2+g,f={x:c.start.x,y:u-g},m={x:c.end.x,y:l.y};h?.toggleHandles(!0),!(!t.validatePoint(f)||!t.validatePoint(m))&&(c.set({startHeight:y,endHeight:g}),t.recordAction("Create disjoint-channel annotation"),t.showAnnotationOptions(),t.update())},r=()=>t.delete();super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},reset:StateMachine6.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,drag:o,click:{target:"height",action:s},dragEnd:{target:"height",action:s},reset:{target:StateMachine6.parent,action:r},cancel:{target:StateMachine6.parent,action:r}},height:{hover:a,click:{target:StateMachine6.parent,action:n},drag:{target:StateMachine6.parent,action:n},reset:{target:StateMachine6.parent,action:r},cancel:{target:StateMachine6.parent,action:r}}}),this.debug=Debug6.create(!0,"annotations"),this.snapping=!1}};__decorateClass([StateMachineProperty6()],DisjointChannelStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty6()],DisjointChannelStateMachine.prototype,"node",2),__decorateClass([StateMachineProperty6()],DisjointChannelStateMachine.prototype,"snapping",2);var disjointChannelConfig={type:"disjoint-channel",datum:DisjointChannelProperties,scene:DisjointChannelScene,isDatum:DisjointChannelProperties.is,translate:(t,e,i,o)=>{DisjointChannelProperties.is(e)&&DisjointChannelScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(DisjointChannelProperties.is(e)&&DisjointChannelProperties.is(i)&&DisjointChannelScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{DisjointChannelProperties.is(e)&&DisjointChannelScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new DisjointChannelStateMachine({...t,create:e("disjoint-channel")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community80=require("ag-charts-community"),import_ag_charts_community79=require("ag-charts-community"),FIBONACCI_RETRACEMENT_RATIOS=[0,23.6,38.2,50,61.8,78.6,100],FIBONACCI_EXTENSION_RATIOS=[161.8,261.8,361.8,423.6],FIBONACCI_RATIOS=[...FIBONACCI_RETRACEMENT_RATIOS,...FIBONACCI_EXTENSION_RATIOS],FIBONACCI_RATIOS_MAP={10:FIBONACCI_RATIOS,6:FIBONACCI_RETRACEMENT_RATIOS,4:FIBONACCI_RETRACEMENT_RATIOS.filter(t=>t!==78.6&&t!==23.6)},FIBONACCI_RANGE_LABEL_PADDING=10;function getFibonacciCoords(t,e){const{x2:i,y1:o,y2:s}=t,a=o-s;return e==null?{x1:i,x2:i,y1:s-a,y2:s}:{x1:e.x1,x2:e.x2,y1:e.y2-a,y2:e.y2}}function createFibonacciRangesData({x1:t,y1:e,x2:i,y2:o},s,a,n,r=10){const l=e-o,c=a?-1:1;let h=n;const d=[];return FIBONACCI_RATIOS_MAP[r].forEach((u,p)=>{const g=n+l*(u/100)*c,y=s.yAxis.scaleInvert(g);d.push({id:p,x1:t,x2:i,y1:h,y2:g,tag:u==100?0:1,label:{x1:Math.min(t,i)-FIBONACCI_RANGE_LABEL_PADDING,x2:i,y1:g,y2:g,text:`${(u/100).toFixed(3)} (${y.toFixed(2)})`}}),h=g}),d}var{Vec2:Vec211,Vec4:Vec47}=import_ag_charts_community79._ModuleSupport,FibonacciScene=class extends AnnotationScene{constructor(){super(),this.trendLine=new CollidableLine,this.rangeFillsGroup=new import_ag_charts_community79._ModuleSupport.Group({name:`${this.id}-range-fills`}),this.rangeFillsGroupSelection=import_ag_charts_community79._ModuleSupport.Selection.select(this.rangeFillsGroup,import_ag_charts_community79._ModuleSupport.Range),this.rangeStrokesGroup=new import_ag_charts_community79._ModuleSupport.Group({name:`${this.id}-range-strokes`}),this.rangeStrokesGroupSelection=import_ag_charts_community79._ModuleSupport.Selection.select(this.rangeStrokesGroup,CollidableLine),this.labelsGroup=new import_ag_charts_community79._ModuleSupport.Group({name:`${this.id}-ranges-labels`}),this.labelsGroupSelection=import_ag_charts_community79._ModuleSupport.Selection.select(this.labelsGroup,CollidableText),this.anchor={x:0,y:0,position:"above"},this.append([this.trendLine,this.rangeFillsGroup,this.rangeStrokesGroup,this.labelsGroup])}update(t,e){let i=convertLine(t,e);if(i==null){this.visible=!1;return}if(i=Vec47.round(i),this.visible=t.visible??!0,!this.visible)return;this.updateLine(t,i,this.trendLine),this.updateHandles(t,i),this.updateAnchor(t,i,e);const{reverse:o}=t,s=this.extendLine(i,t,e),a=o?s.y1:s.y2,n=o?s.y2:s.y1,r=createFibonacciRangesData(s,e,t.reverse,a,t.bands);this.updateRanges(t,r,e);const l={...s,y1:n,y2:n};this.updateText(t,l)}extendLine({x1:t,y1:e,x2:i,y2:o},s,a){const n={x1:t,y1:e,x2:i,y2:o};if(!s.extendStart&&!s.extendEnd)return n;const{x:r,width:l}=a.xAxis.bounds;return s.extendEnd&&(n[t>i?"x1":"x2"]=r+l),s.extendStart&&(n[t>i?"x2":"x1"]=r),n}updateLine(t,e,i){if(!e||!i)return;const{lineDashOffset:o,strokeWidth:s,strokeOpacity:a,stroke:n}=t;i.setProperties({...e,lineCap:t.getLineCap(),lineDash:[3,4],lineDashOffset:o,strokeWidth:s,strokeOpacity:a,fillOpacity:0,stroke:n})}updateRangeStrokes(t){const{lineDashOffset:e,strokeWidth:i,strokeOpacity:o,strokes:s,rangeStroke:a,isMultiColor:n}=t;this.rangeStrokesGroupSelection.each((r,{x1:l,x2:c,y2:h,tag:d},u)=>{const p=h,g=n?s[u%s.length]:a;r.setProperties({x1:l,x2:c,y1:p,y2:p,stroke:g,strokeOpacity:o,strokeWidth:i,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,tag:d})})}updateRanges(t,e,i){const o=s=>s.id;this.rangeFillsGroupSelection.update(e,void 0,o),this.rangeStrokesGroupSelection.update(e,void 0,o),this.labelsGroupSelection.update(e,void 0,o),this.updateRangeFills(t),this.updateRangeStrokes(t),this.updateRangeLabels(t,i)}updateRangeFills(t){const{lineDashOffset:e,strokeWidth:i,strokeOpacity:o,strokes:s,rangeStroke:a,showFill:n,isMultiColor:r}=t;this.rangeFillsGroupSelection.each((l,{x1:c,x2:h,y1:d,y2:u},p)=>{const g=r?s[p%s.length]:a;if(!n){l.visible=!1;return}l.setProperties({x1:c,x2:h,y1:d,y2:u,startLine:!1,endLine:!1,isRange:!0,stroke:g,strokeOpacity:o,fill:g,fillOpacity:(o??1)*.15,strokeWidth:i,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,visible:!0})})}updateRangeLabels(t,{xAxis:e}){const{rangeStrokesGroupSelection:i}=this,{strokes:o,strokeWidth:s,rangeStroke:a,isMultiColor:n,label:{fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h,color:d}}=t,u={fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h},p=this.checkWithinBounds(e,u,this.labelsGroupSelection.at(0));this.labelsGroupSelection.each((g,y,f)=>{const m=d??(n?o[f%o.length]:a),b=i.at(f);if(!b)return;const{text:x,...S}=y.label;if(p)g.setProperties({...u,text:x,x:S.x1,y:S.y1,textBaseline:"middle",textAlign:"end",fill:m}),updateLineText(g.id,b,S);else{const M={...u,label:x,position:"center",alignment:"left",color:m};updateLineText(g.id,b,S,M,g,x,s)}})}checkWithinBounds(t,e,i){if(!i)return!1;const{text:o,...s}=i.datum.label;i.setProperties({...e,text:o,x:s.x1,y:s.y1,textBaseline:"middle",textAlign:"end"});const{x:a}=i.getBBox();return a>=t.bounds.x&&a<=t.bounds.x+t.bounds.width}updateText(t,e){const i=this.rangeStrokesGroupSelection.selectByTag(0)[0];if(!i)return;const{text:o,strokeWidth:s}=t;this.text=this.updateNode(CollidableText,this.text,!!o.label),updateLineText(i.id,i,e,o,this.text,o.label,s)}updateAnchor(t,e,i,o){const s=Vec47.topCenter(e);Vec211.apply(this.anchor,import_ag_charts_community79._ModuleSupport.Transformable.toCanvasPoint(this.trendLine,s.x,s.y))}containsPoint(t,e){const{trendLine:i,rangeStrokesGroupSelection:o,text:s}=this;let a=!1;return o.each(n=>a||(a=n.isPointInPath(t,e))),a||i.isPointInPath(t,e)||!!s?.containsPoint(t,e)}getNodeAtCoords(t,e){if(this.text?.containsPoint(t,e))return"text";if(this.trendLine.isPointInPath(t,e))return"line"}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth}}drag(t,e,i,o){t.locked||(this.activeHandle?this.dragHandle(t,e,i,o):this.dragAll(t,e,i))}getAnchor(){return this.anchor}getCursor(){return"pointer"}},{Vec2:Vec212,Vec4:Vec48}=import_ag_charts_community80._ModuleSupport,FibonacciRetracementTrendBasedScene=class extends FibonacciScene{constructor(){super(),this.type="fibonacci-retracement-trend-based",this.endRetracementLine=new CollidableLine,this.start=new DivariantHandle,this.end=new DivariantHandle,this.endRetracement=new DivariantHandle,this.append([this.endRetracementLine,this.start,this.end,this.endRetracement])}static is(t){return AnnotationScene.isCheck(t,"fibonacci-retracement-trend-based")}update(t,e){let{coords1:i,coords2:o}=this.getCoords(t,e);if(i==null||o==null){this.visible=!1;return}if(i=Vec48.round(i),o=Vec48.round(o),this.visible=t.visible??!0,!this.visible)return;(t.endRetracement.x==null||t.endRetracement.y==null)&&(o=void 0),this.updateLine(t,i,this.trendLine),this.updateLine(t,o,this.endRetracementLine),this.updateHandles(t,i,o),this.updateAnchor(t,o??i,e);const{reverse:s,bands:a}=t,n=getFibonacciCoords(i,o),r=this.extendLine(n,t,e),l=r.y2,c=r.y1,h=o?createFibonacciRangesData(r,e,s,l,a):[];this.updateRanges(t,h,e);const d={...r,y1:c,y2:c};this.updateText(t,d)}containsPoint(t,e){const{start:i,end:o,endRetracement:s,endRetracementLine:a}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):o.containsPoint(t,e)?(this.activeHandle="end",!0):s.containsPoint(t,e)?(this.activeHandle="endRetracement",!0):a.isPointInPath(t,e)||super.containsPoint(t,e)}getNodeAtCoords(t,e){return this.start.containsPoint(t,e)||this.end.containsPoint(t,e)||this.endRetracement.containsPoint(t,e)?"handle":this.endRetracementLine.isPointInPath(t,e)?"line":super.getNodeAtCoords(t,e)}dragStart(t,e,i){this.dragState={offset:e,...getDragStartState({start:t.start,end:t.end,endRetracement:t.endRetracement},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1),this.endRetracement.toggleDragging(!1)}dragAll(t,e,i){const{dragState:o}=this;o&&this.translatePoints({datum:t,start:o.start,end:o.end,endRetracement:o.endRetracement,translation:Vec212.sub(e,o.offset),context:i})}dragHandle(t,e,i,o){const{activeHandle:s,dragState:a}=this;if(!s||!a)return;this[s].toggleDragging(!0);const n=o?this.snapToAngle(t,e,i):invertCoords(this[s].drag(e).point,i);!n||!validateDatumPoint(i,n)||(t[s].x=n.x,t[s].y=n.y)}snapToAngle(t,e,i){const{activeHandle:o}=this,s=["start","end","endRetracement"];if(!o)return;const a=(s.indexOf(o)+1)%s.length,n=s[a];this[o].toggleDragging(!0);const r=convertPoint(t[n],i);return invertCoords(snapToAngle(e,r,t.snapToAngle),i)}translatePoints({datum:t,start:e,end:i,endRetracement:o,translation:s,context:a}){const{vectors:n,translateX:r,translateY:l}=translate({start:e,end:i,endRetracement:o},s,a);r&&(t.start.x=n.start?.x,t.end.x=n.end?.x,t.endRetracement.x=n.endRetracement?.x),(this.ignoreYBounds||l)&&(t.start.y=n.start?.y,t.end.y=n.end?.y,t.endRetracement.y=n.endRetracement?.y)}translate(t,e,i){this.translatePoints({datum:t,start:convertPoint(t.start,i),end:convertPoint(t.end,i),endRetracement:convertPoint(t.endRetracement,i),translation:e,context:i})}copy(t,e,i){const{coords1:o,coords2:s}=this.getCoords(t,i);if(!o||!s)return;const a=this.computeBBoxWithoutHandles();return this.translatePoints({datum:e,start:Vec48.start(o),end:Vec48.end(o),endRetracement:Vec48.end(s),translation:{x:-a.width/2,y:-a.height/2},context:i}),e}getCoords(t,e){return{coords1:convertLine(t,e),coords2:convertLine({start:t.end,end:t.endRetracement},e)}}toggleHandles(t){if(typeof t=="boolean")this.start.visible=t,this.end.visible=t,this.endRetracement.visible=t;else for(const[e,i]of Object.entries(t))this[e].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end"),this.endRetracement.toggleHovered(this.activeHandle==="endRetracement")}toggleActive(t){this.toggleHandles(t),this.start.toggleActive(t),this.end.toggleActive(t),this.endRetracement.toggleActive(t)}updateHandles(t,e,i,o){this.start.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"start")}),this.end.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"end",o)}),i&&this.endRetracement.update({...this.getHandleStyles(t),...this.getHandleCoords(t,i,"endRetracement",o)}),this.start.toggleLocked(t.locked??!1),this.end.toggleLocked(t.locked??!1),this.endRetracement.toggleLocked(t.locked??!1)}getHandleCoords(t,e,i,o){return i==="start"?Vec48.start(e):Vec48.end(e)}},import_ag_charts_community81=require("ag-charts-community"),{StateMachine:StateMachine7,StateMachineProperty:StateMachineProperty7,Debug:Debug7}=import_ag_charts_community81._ModuleSupport,FibonacciRetracementTrendBasedStateMachine=class extends StateMachine7{constructor(t){const e=({point:c})=>{const h=this.createDatum();h.set({start:c,end:c}),t.create(h)},i=()=>{const{node:c}=this;c?.toggleActive(!0),c?.toggleHandles({start:!0,end:!1,endRetracement:!1})},o=({offset:c,context:h})=>{const{datum:d,snapping:u}=this;d&&(d.set({end:snapPoint(c,h,u,d.start,d.snapToAngle)}),t.update())},s=()=>{const{datum:c}=this;c&&(c.endRetracement.x=c.end.x,c.endRetracement.y=c.end.y,this.node?.toggleHandles({end:!0}),t.update())},a=({offset:c,context:h})=>{const{datum:d,snapping:u}=this;d&&(d.set({endRetracement:snapPoint(c,h,u,d.end,d.snapToAngle)}),t.update())},n=()=>{this.node?.toggleHandles({endRetracement:!0}),t.update()},r=()=>t.delete(),l=()=>{t.showAnnotationOptions(),t.recordAction(`Create ${this.datum?.type} annotation`)};super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},reset:StateMachine7.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,click:{target:"endRetracement",action:s},drag:o,dragEnd:{target:"endRetracement",action:s},reset:{target:StateMachine7.parent,action:r},cancel:{target:StateMachine7.parent,action:r},onExit:l},endRetracement:{hover:a,click:{target:StateMachine7.parent,action:n},drag:{target:StateMachine7.parent,action:n},reset:{target:StateMachine7.parent,action:r},cancel:{target:StateMachine7.parent,action:r}}}),this.debug=Debug7.create(!0,"annotations"),this.snapping=!1}createDatum(){return new FibonacciRetracementTrendBasedProperties}};__decorateClass([StateMachineProperty7()],FibonacciRetracementTrendBasedStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty7()],FibonacciRetracementTrendBasedStateMachine.prototype,"node",2),__decorateClass([StateMachineProperty7()],FibonacciRetracementTrendBasedStateMachine.prototype,"snapping",2);var fibonacciRetracementTrendBasedConfig={type:"fibonacci-retracement-trend-based",datum:FibonacciRetracementTrendBasedProperties,scene:FibonacciRetracementTrendBasedScene,isDatum:FibonacciRetracementTrendBasedProperties.is,translate:(t,e,i,o)=>{FibonacciRetracementTrendBasedProperties.is(e)&&FibonacciRetracementTrendBasedScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(FibonacciRetracementTrendBasedProperties.is(e)&&FibonacciRetracementTrendBasedProperties.is(i)&&FibonacciRetracementTrendBasedScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{FibonacciRetracementTrendBasedProperties.is(e)&&FibonacciRetracementTrendBasedScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new FibonacciRetracementTrendBasedStateMachine({...t,create:e("fibonacci-retracement-trend-based")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community82=require("ag-charts-community"),{Vec2:Vec213,Vec4:Vec49}=import_ag_charts_community82._ModuleSupport,FibonacciRetracementScene=class extends FibonacciScene{constructor(){super(),this.type="fibonacci-retracement",this.start=new DivariantHandle,this.end=new DivariantHandle,this.append([this.start,this.end])}static is(t){return AnnotationScene.isCheck(t,"fibonacci-retracement")}containsPoint(t,e){const{start:i,end:o}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):o.containsPoint(t,e)?(this.activeHandle="end",!0):super.containsPoint(t,e)}getNodeAtCoords(t,e){return this.start.containsPoint(t,e)||this.end.containsPoint(t,e)?"handle":super.getNodeAtCoords(t,e)}dragStart(t,e,i){this.dragState={offset:e,...getDragStartState({start:t.start,end:t.end},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}dragAll(t,e,i){const{dragState:o}=this;o&&this.translatePoints({datum:t,start:o.start,end:o.end,translation:Vec213.sub(e,o.offset),context:i})}dragHandle(t,e,i,o){const{activeHandle:s,dragState:a}=this;if(!s||!a)return;this[s].toggleDragging(!0);const n=o?this.snapToAngle(t,e,i):invertCoords(this[s].drag(e).point,i);!n||!validateDatumPoint(i,n)||(t[s].x=n.x,t[s].y=n.y)}snapToAngle(t,e,i){const{activeHandle:o}=this,a=["start","end"].find(r=>r!==o);if(!o||!a)return;this[o].toggleDragging(!0);const n=convertPoint(t[a],i);return invertCoords(snapToAngle(e,n,t.snapToAngle),i)}translatePoints({datum:t,start:e,end:i,translation:o,context:s}){const{vectors:a,translateX:n,translateY:r}=translate({start:e,end:i},o,s);n&&(t.start.x=a.start?.x,t.end.x=a.end?.x),(this.ignoreYBounds||r)&&(t.start.y=a.start?.y,t.end.y=a.end?.y)}translate(t,e,i){this.translatePoints({datum:t,start:convertPoint(t.start,i),end:convertPoint(t.end,i),translation:e,context:i})}copy(t,e,i){const o=convertLine(t,i);if(!o)return;const s=this.computeBBoxWithoutHandles();return this.translatePoints({datum:e,start:{x:o.x1,y:o.y1},end:{x:o.x2,y:o.y2},translation:{x:-s.width/2,y:-s.height/2},context:i}),e}toggleHandles(t){if(typeof t=="boolean")this.start.visible=t,this.end.visible=t;else for(const[e,i]of Object.entries(t))this[e].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end")}toggleActive(t){this.toggleHandles(t),this.start.toggleActive(t),this.end.toggleActive(t)}updateHandles(t,e,i,o){this.start.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"start")}),this.end.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"end",o)}),this.start.toggleLocked(t.locked??!1),this.end.toggleLocked(t.locked??!1)}getHandleCoords(t,e,i,o){return i==="start"?Vec49.start(e):Vec49.end(e)}},import_ag_charts_community83=require("ag-charts-community"),{StateMachine:StateMachine8,StateMachineProperty:StateMachineProperty8,Debug:Debug8}=import_ag_charts_community83._ModuleSupport,LineTypeStateMachine=class extends StateMachine8{constructor(t){const e=({point:r})=>{const l=this.createDatum();l.set({start:r,end:r}),t.create(l)},i=()=>{const{node:r}=this;r?.toggleActive(!0),r?.toggleHandles({start:!0,end:!1})},o=({offset:r,context:l})=>{const{datum:c,snapping:h}=this;c&&(c.set({end:snapPoint(r,l,h,c.start,c.snapToAngle)}),t.update())},s=()=>{this.node?.toggleHandles({end:!0}),t.update()},a=()=>t.delete(),n=()=>{t.showAnnotationOptions(),t.recordAction(`Create ${this.datum?.type} annotation`)};super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},reset:StateMachine8.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,click:{target:StateMachine8.parent,action:s},drag:o,dragEnd:{target:StateMachine8.parent,action:s},reset:{target:StateMachine8.parent,action:a},cancel:{target:StateMachine8.parent,action:a},onExit:n}}),this.debug=Debug8.create(!0,"annotations"),this.snapping=!1}};__decorateClass([StateMachineProperty8()],LineTypeStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty8()],LineTypeStateMachine.prototype,"node",2),__decorateClass([StateMachineProperty8()],LineTypeStateMachine.prototype,"snapping",2);var ArrowStateMachine=class extends LineTypeStateMachine{createDatum(){return new ArrowProperties}},LineStateMachine=class extends LineTypeStateMachine{createDatum(){return new LineProperties}},FibonacciRetracementStateMachine=class extends LineTypeStateMachine{createDatum(){return new FibonacciRetracementProperties}},fibonacciRetracementConfig={type:"fibonacci-retracement",datum:FibonacciRetracementProperties,scene:FibonacciRetracementScene,isDatum:FibonacciRetracementProperties.is,translate:(t,e,i,o)=>{FibonacciRetracementProperties.is(e)&&FibonacciRetracementScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(FibonacciRetracementProperties.is(e)&&FibonacciRetracementProperties.is(i)&&FibonacciRetracementScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{FibonacciRetracementProperties.is(e)&&FibonacciRetracementScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new FibonacciRetracementStateMachine({...t,create:e("fibonacci-retracement")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community85=require("ag-charts-community"),import_ag_charts_community84=require("ag-charts-community"),{Vec2:Vec214}=import_ag_charts_community84._ModuleSupport,CapScene=class extends import_ag_charts_community84._ModuleSupport.Group{},ArrowCapScene=class extends CapScene{constructor(){super(),this.type="arrow",this.path=new import_ag_charts_community84._ModuleSupport.Path,this.armLength=6,this.append([this.path])}update(t){const{path:e}=this,{x:i,y:o,angle:s,...a}=t,n=Vec214.from(i,o),r=3*Math.PI/4,l=this.armLength+(t.strokeWidth??0)*2,c=Vec214.rotate(Vec214.from(0,l),s+r,n),h=Vec214.rotate(Vec214.from(l,0),s-r,n);e.setProperties(a),e.fillOpacity=0,e.path.clear(),e.path.moveTo(c.x,c.y),e.path.lineTo(n.x,n.y),e.path.lineTo(h.x,h.y)}},{Vec2:Vec215,Vec4:Vec410}=import_ag_charts_community85._ModuleSupport,LineScene=class extends StartEndScene{constructor(){super(),this.type="line",this.line=new CollidableLine,this.append([this.line,this.start,this.end])}static is(t){return AnnotationScene.isCheck(t,"line")}update(t,e){let i=convertLine(t,e);if(i==null){this.visible=!1;return}i=Vec410.round(i),this.visible=t.visible??!0,this.visible&&(this.updateLine(t,i,e),this.updateHandles(t,i),this.updateText(t,i),this.updateCaps(t,i),this.updateAnchor(t,i,e))}updateLine(t,e,i){const{line:o}=this,{lineDashOffset:s,stroke:a,strokeWidth:n,strokeOpacity:r}=t,l=this.extendLine(e,t,i);o.setProperties({...l,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:s,stroke:a,strokeWidth:n,strokeOpacity:r,fillOpacity:0})}updateText(t,e){this.text=this.updateNode(CollidableText,this.text,!!t.text.label),updateLineText(this.line.id,this.line,e,t.text,this.text,t.text.label,t.strokeWidth)}updateCaps(t,e){if(!t.startCap&&this.startCap&&(this.removeChild(this.startCap),this.startCap=void 0),!t.endCap&&this.endCap&&(this.removeChild(this.endCap),this.endCap=void 0),!t.startCap&&!t.endCap)return;const{stroke:i,strokeWidth:o,strokeOpacity:s}=t,[a,n]=Vec215.from(e),r=Vec215.angle(Vec215.sub(n,a));t.startCap&&(this.startCap&&this.startCap.type!==t.startCap&&(this.removeChild(this.startCap),this.startCap=void 0),this.startCap==null&&(this.startCap=new ArrowCapScene,this.append([this.startCap])),this.startCap.update({x:a.x,y:a.y,angle:r-Math.PI,stroke:i,strokeWidth:o,strokeOpacity:s})),t.endCap&&(this.endCap&&this.endCap.type!==t.endCap&&(this.removeChild(this.endCap),this.endCap=void 0),this.endCap==null&&(this.endCap=new ArrowCapScene,this.append([this.endCap])),this.endCap.update({x:n.x,y:n.y,angle:r,stroke:i,strokeWidth:o,strokeOpacity:s}))}updateAnchor(t,e,i,o){const s=Vec410.topCenter(e);Vec215.apply(this.anchor,import_ag_charts_community85._ModuleSupport.Transformable.toCanvasPoint(this.line,s.x,s.y))}containsPoint(t,e){const{line:i,text:o}=this;return super.containsPoint(t,e)||i.isPointInPath(t,e)||!!o?.containsPoint(t,e)}getNodeAtCoords(t,e){return this.text?.containsPoint(t,e)?"text":this.line.isPointInPath(t,e)?"line":super.getNodeAtCoords(t,e)}getHandleCoords(t,e,i,o){const{startCap:s,endCap:a}=this;let[n,r]=Vec215.from(e);const l=Vec215.angle(Vec215.sub(r,n));return s&&(n=Vec215.rotate(Vec215.from(0,-DivariantHandle.HANDLE_SIZE/2),l,n)),a&&(r=Vec215.rotate(Vec215.from(0,DivariantHandle.HANDLE_SIZE/2),l,r)),i==="start"?n:r}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth}}},lineConfig={type:"line",datum:LineProperties,scene:LineScene,isDatum:LineProperties.is,translate:(t,e,i,o)=>{LineProperties.is(e)&&LineScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(LineProperties.is(e)&&LineProperties.is(i)&&LineScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{LineProperties.is(e)&&LineScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new LineStateMachine({...t,create:e("line")}),dragState:t=>new DragStateMachine(t)},arrowConfig={type:"arrow",datum:ArrowProperties,scene:LineScene,isDatum:ArrowProperties.is,translate:(t,e,i,o)=>{ArrowProperties.is(e)&&LineScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(ArrowProperties.is(e)&&ArrowProperties.is(i)&&LineScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{ArrowProperties.is(e)&&LineScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new ArrowStateMachine({...t,create:e("arrow")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community88=require("ag-charts-community"),import_ag_charts_community87=require("ag-charts-community"),import_ag_charts_community86=require("ag-charts-community");function layoutScenesRow(t,e=0,i=0){let o=e;for(const s of t)if(Array.isArray(s)){for(const a of s)layoutSetX(a,o);o+=import_ag_charts_community86._ModuleSupport.Group.computeChildrenBBox(s).width+i}else layoutSetX(s,o),o+=s.getBBox().width+i}function layoutScenesColumn(t,e=0,i=0){let o=e;for(const s of t)if(Array.isArray(s)){for(const a of s)layoutSetY(a,o);o+=import_ag_charts_community86._ModuleSupport.Group.computeChildrenBBox(s).height+i}else layoutSetY(s,o),o+=s.getBBox().height+i}function layoutSetX(t,e){"x1"in t?(t.x2=e+(t.x2-t.x1),t.x1=e):t.x=e}function layoutSetY(t,e){"y1"in t?(t.y2=e+(t.y2-t.y1),t.y1=e):t.y=e}function layoutAddX(t,e){"x1"in t?(t.x1+=e,t.x2+=e):t.x+=e}function layoutAddY(t,e){"y1"in t?(t.y1+=e,t.y2+=e):t.y+=e}var{Vec4:Vec411}=import_ag_charts_community87._ModuleSupport,MeasurerStatisticsScene=class extends import_ag_charts_community87._ModuleSupport.Group{constructor(){super(),this.name="MeasurerStatisticsScene",this.background=new import_ag_charts_community87._ModuleSupport.Rect,this.dateRangeBarsText=new import_ag_charts_community87._ModuleSupport.Text,this.dateRangeDivider=new import_ag_charts_community87._ModuleSupport.Line,this.dateRangeValueText=new import_ag_charts_community87._ModuleSupport.Text,this.priceRangeValueText=new import_ag_charts_community87._ModuleSupport.Text,this.priceRangeDivider=new import_ag_charts_community87._ModuleSupport.Line,this.priceRangePercentageText=new import_ag_charts_community87._ModuleSupport.Text,this.volumeText=new import_ag_charts_community87._ModuleSupport.Text,this.volumeFormatter=new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2}),this.append([this.background,this.dateRangeBarsText,this.dateRangeDivider,this.dateRangeValueText,this.priceRangeValueText,this.priceRangeDivider,this.priceRangePercentageText,this.volumeText])}update(t,e,i,o,s,a,n){this.verticalDirection=a;const r=this.updateStatistics(t,e,i,n),l=import_ag_charts_community87._ModuleSupport.Group.computeChildrenBBox(r.flat()),c=10;l.grow(c),this.updateBackground(t,l,c),this.reposition(r,c,s),this.checkVisibility(t,s,o)}checkVisibility(t,e,i){const o=Vec411.from(new import_ag_charts_community87._ModuleSupport.BBox(0,0,e.seriesRect.width,e.seriesRect.height));Vec411.collides(i,o)?this.visible=t.visible??!0:this.visible=!1}updateStatistics(t,e,i,o){const{dateRangeBarsText:s,dateRangeDivider:a,dateRangeValueText:n,priceRangeValueText:r,priceRangeDivider:l,priceRangePercentageText:c,volumeText:h}=this,d=8,u=6,p=t.statistics.fontSize+3,g=-2,y=this.getTextStyles(t),f={...this.getDividerStyles(t),x1:0,y1:0,x2:0,y2:p},m=[s,a,n],b=[r,l,c],x=[];return e.priceRange&&(r.setProperties({...y,text:this.formatPriceRangeValue(e.priceRange.value,o)}),l.setProperties(f),c.setProperties({...y,text:this.formatPriceRangePercentage(e.priceRange.percentage,o)}),layoutScenesRow(b,i.x,d),x.push(b)),e.dateRange&&(s.setProperties({...y,text:this.formatDateRangeBars(e.dateRange.bars,o)}),a.setProperties(f),n.setProperties({...y,text:this.formatDateRangeValue(e.dateRange.value)}),layoutScenesRow(m,i.x,d),x.push(m)),e.volume!=null?(h.setProperties({...y,x:i.x,text:this.formatVolume(e.volume,o),visible:!0}),x.push(h)):h.visible=!1,layoutScenesColumn(x,i.y,u),l.y1+=g,l.y2+=g,a.y1+=g,a.y2+=g,x}updateBackground(t,e,i){const o=this.getBackgroundStyles(t);this.background.setProperties({...o,...e,x:e.x-e.width/2+i,y:e.y})}reposition(t,e,i){const{width:o,height:s}=i.seriesRect,a=Vec411.from(this.background.getBBox());let n=0;a.x1<0&&(n=-a.x1),a.x2>o&&(n=o-a.x2);const r=Math.min(e,s-a.y2);for(const l of t)if(Array.isArray(l)){const c=import_ag_charts_community87._ModuleSupport.Group.computeChildrenBBox(l).width;for(const h of l)layoutAddX(h,n-c/2),layoutAddY(h,r)}else layoutAddX(l,n-l.getBBox().width/2),layoutAddY(l,r);this.background.x+=n,this.background.y+=r}getTextStyles(t){return{fill:t.statistics.color,fontFamily:t.statistics.fontFamily,fontSize:t.statistics.fontSize,fontStyle:t.statistics.fontStyle,fontWeight:t.statistics.fontWeight,textBaseline:"top"}}getDividerStyles(t){return{stroke:t.statistics.divider.stroke,strokeOpacity:t.statistics.divider.strokeOpacity,strokeWidth:t.statistics.divider.strokeWidth}}getBackgroundStyles(t){return{fill:t.statistics.fill,stroke:t.statistics.stroke,strokeOpacity:t.statistics.strokeOpacity,strokeWidth:t.statistics.strokeWidth,cornerRadius:4}}formatDateRangeBars(t,e){return e?.t("measurerDateRangeBars",{value:t})??`${t}`}formatDateRangeValue(t){const e=[],i=t>=0?"":"-";t=Math.abs(t);const o=1e3*60,s=o*60,a=s*24,n=Math.floor(t/o),r=Math.floor(t/s),l=Math.floor(t/a),c=r%(a/s),h=n%(s/o);return l>=1&&e.push(`${l}d`),r>=1&&(t=o.x-h.x&&(l={x:o.x,y:r.clipMask.y,radius:this.text.getBBox().height/2+Vec216.length(h)})}this.verticalLine.setClipMask(n,l)}updateCaps(t,e){const{horizontalEndCap:i,verticalEndCap:o}=this,{direction:s}=t,{x1:a,y1:n,x2:r,y2:l}=e,c=Vec216.round(Vec412.center(e)),{stroke:h,strokeWidth:d,strokeOpacity:u}=this.getLineStyles(t),p={stroke:h,strokeWidth:d,strokeOpacity:u};if(s!=="vertical"){const g=a<=r?0:Math.PI;let y=r;s==="horizontal"&&(y+=a<=r?-2:2),i.update({...p,x:y,y:c.y,angle:g})}if(s!=="horizontal"){const g=n<=l?Math.PI/2:Math.PI/-2;let y=l;s==="vertical"&&(y+=n<=l?-2:2),o.update({...p,x:c.x,y,angle:g})}}updateBoundingLines(t,e){const{verticalStartLine:i,verticalEndLine:o,horizontalStartLine:s,horizontalEndLine:a}=this,{direction:n}=t,{x1:r,y1:l,x2:c,y2:h}=e,d=this.getLineStyles(t);n==="horizontal"&&(i.setProperties({...d,x1:r,y1:l,x2:r,y2:h}),o.setProperties({...d,x1:c,y1:l,x2:c,y2:h})),n==="vertical"&&(s.setProperties({...d,x1:r,y1:l,x2:c,y2:l}),a.setProperties({...d,x1:r,y1:h,x2:c,y2:h}))}updateStatistics(t,e,i){const o=Vec216.add(Vec412.bottomCenter(e),Vec216.from(0,10)),s={volume:this.getVolume(t)};t.hasPriceRange&&(s.priceRange={percentage:this.getPriceRangePercentage(t),value:this.getPriceRangeValue(t)}),t.hasDateRange&&(s.dateRange={bars:this.getDateRangeBars(e,i),value:this.getDateRangeValue(t)}),this.statistics.update(t,s,o,e,i,this.verticalDirection,t.localeManager)}updateAnchor(t,e,i,o){const s=Vec412.topCenter(e);Vec216.apply(this.anchor,import_ag_charts_community88._ModuleSupport.Transformable.toCanvasPoint(this.horizontalLine,s.x,s.y))}getBackgroundPoints(t,e,i,o){const[s,a]=Vec216.from(e),[n,r]=Vec216.from(i);return[s,a,r,n]}getLineStyles(t){const{lineDashOffset:e,stroke:i,strokeWidth:o,strokeOpacity:s}=t;return{lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,stroke:i,strokeWidth:o,strokeOpacity:s,fillOpacity:0}}getBackgroundStyles(t){const{background:e}=t;return{fill:e.fill,fillOpacity:e.fillOpacity}}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth}}containsPoint(t,e){const{horizontalLine:i,text:o,verticalLine:s,horizontalStartLine:a,horizontalEndLine:n,verticalStartLine:r,verticalEndLine:l}=this;return super.containsPoint(t,e)||i.isPointInPath(t,e)||s.isPointInPath(t,e)||a.visible&&a.isPointInPath(t,e)||n.visible&&n.isPointInPath(t,e)||r.visible&&r.isPointInPath(t,e)||l.visible&&l.isPointInPath(t,e)||!!o?.containsPoint(t,e)}getNodeAtCoords(t,e){return this.text?.containsPoint(t,e)?"text":this.start.containsPoint(t,e)||this.end.containsPoint(t,e)?"handle":"line"}getDateRangeBars(t,e){const{step:i}=e.xAxis.scale,o=t.x1<=t.x2?1:-1;return i?Math.round(Vec412.width(t)/i)*o:0}getDateRangeValue(t){const{value:e}=getGroupingValue(t.start.x),{value:i}=getGroupingValue(t.end.x);if(!isDate(e)||!isDate(i))throw new Error("Can not create a date range measurement of non-date x-axis.");return i.getTime()-e.getTime()}getPriceRangePercentage(t){if(t.start.y==null||t.end.y==null)throw new Error("Can not create a price range measurement of a non-numeric y-axis");const{value:e}=getGroupingValue(t.end.y),{value:i}=getGroupingValue(t.start.y);if(!isNumber(e)||!isNumber(i))throw new Error("Can not create a price range measurement of a non-numeric y-axis");return(e-i)/i}getPriceRangeValue(t){if(t.start.y==null||t.end.y==null)throw new Error("Can not create a price range measurement of a non-numeric y-axis");const{value:e}=getGroupingValue(t.end.y),{value:i}=getGroupingValue(t.start.y);if(!isNumber(e)||!isNumber(i))throw new Error("Can not create a price range measurement of a non-numeric y-axis");return e-i}getVolume(t){return t.getVolume(t.start.x,t.end.x)}},QuickMeasurerScene=class extends MeasurerScene{constructor(){super(...arguments),this.type="quick-measurer"}static is(t){return AnnotationScene.isCheck(t,"quick-measurer")}createStatisticsScene(){return new QuickMeasurerStatisticsScene}getDirectionStyles(t){return this.verticalDirection==="down"?t.down:t.up}getLineStyles(t){const e=this.getDirectionStyles(t);return{...super.getLineStyles(t),stroke:e.stroke,strokeWidth:e.strokeWidth,strokeOpacity:e.strokeOpacity}}getBackgroundStyles(t){const e=this.getDirectionStyles(t);return{fill:e.fill,fillOpacity:e.fillOpacity}}getHandleStyles(t){const e=this.getDirectionStyles(t);return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth}}},import_ag_charts_community89=require("ag-charts-community"),{StateMachine:StateMachine9,StateMachineProperty:StateMachineProperty9,Debug:Debug9}=import_ag_charts_community89._ModuleSupport,MeasurerTypeStateMachine=class extends StateMachine9{constructor(t){const e=({point:n})=>{const r=this.createDatum();r.set({start:n,end:n}),t.create(r)},i=({point:n})=>{const{datum:r,node:l}=this;r?.set({end:n}),l?.toggleActive(!0),l?.toggleHandles({end:!1}),t.update()},o=()=>{this.node?.toggleHandles({end:!0})},s=()=>t.delete(),a=()=>{t.showAnnotationOptions(),!isEphemeralType(this.datum)&&t.recordAction(`Create ${this.node?.type} annotation`)};super("start",{start:{reset:StateMachine9.parent,click:{target:"end",action:e},drag:{target:"end",action:e}},end:{hover:i,drag:i,click:{target:StateMachine9.parent,action:o},dragEnd:{target:StateMachine9.parent,action:o},reset:{target:StateMachine9.parent,action:s},cancel:{target:StateMachine9.parent,action:s},onExit:a}}),this.debug=Debug9.create(!0,"annotations")}};__decorateClass([StateMachineProperty9()],MeasurerTypeStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty9()],MeasurerTypeStateMachine.prototype,"node",2);var DateRangeStateMachine=class extends MeasurerTypeStateMachine{createDatum(){return new DateRangeProperties}},PriceRangeStateMachine=class extends MeasurerTypeStateMachine{createDatum(){return new PriceRangeProperties}},DatePriceRangeStateMachine=class extends MeasurerTypeStateMachine{createDatum(){return new DatePriceRangeProperties}},QuickDatePriceRangeStateMachine=class extends MeasurerTypeStateMachine{createDatum(){return new QuickDatePriceRangeProperties}},dateRangeConfig={type:"date-range",datum:DateRangeProperties,scene:MeasurerScene,isDatum:DateRangeProperties.is,translate:(t,e,i,o)=>{DateRangeProperties.is(e)&&MeasurerScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(DateRangeProperties.is(e)&&DateRangeProperties.is(i)&&MeasurerScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{DateRangeProperties.is(e)&&MeasurerScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new DateRangeStateMachine({...t,create:e("date-range")}),dragState:t=>new DragStateMachine(t)},priceRangeConfig={type:"price-range",datum:PriceRangeProperties,scene:MeasurerScene,isDatum:PriceRangeProperties.is,translate:(t,e,i,o)=>{PriceRangeProperties.is(e)&&MeasurerScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(PriceRangeProperties.is(e)&&PriceRangeProperties.is(i)&&MeasurerScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{PriceRangeProperties.is(e)&&MeasurerScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new PriceRangeStateMachine({...t,create:e("date-range")}),dragState:t=>new DragStateMachine(t)},datePriceRangeConfig={type:"date-price-range",datum:DatePriceRangeProperties,scene:MeasurerScene,isDatum:DatePriceRangeProperties.is,translate:(t,e,i,o)=>{DatePriceRangeProperties.is(e)&&MeasurerScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(DatePriceRangeProperties.is(e)&&DatePriceRangeProperties.is(i)&&MeasurerScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{DatePriceRangeProperties.is(e)&&MeasurerScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new DatePriceRangeStateMachine({...t,create:e("date-range")}),dragState:t=>new DragStateMachine(t)},quickDatePriceRangeConfig={type:"quick-date-price-range",datum:QuickDatePriceRangeProperties,scene:QuickMeasurerScene,isDatum:QuickDatePriceRangeProperties.is,translate:(t,e,i,o)=>{QuickDatePriceRangeProperties.is(e)&&QuickMeasurerScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(QuickDatePriceRangeProperties.is(e)&&QuickDatePriceRangeProperties.is(i)&&QuickMeasurerScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{QuickDatePriceRangeProperties.is(e)&&QuickMeasurerScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new QuickDatePriceRangeStateMachine({...t,create:e("quick-date-price-range")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community90=require("ag-charts-community"),{ZIndexMap:ZIndexMap3,TextWrapper:TextWrapper3,clamp:clamp4}=import_ag_charts_community90._ModuleSupport,NoteScene=class extends TextualPointScene{constructor(){super(),this.type="note",this.shape=new import_ag_charts_community90._ModuleSupport.Rect,this.iconBackground=new import_ag_charts_community90._ModuleSupport.SvgPath("M22 1.83333C22 0.820811 21.1792 0 20.1667 0H1.83333C0.820811 0 0 0.82081 0 1.83333V13.9868C0 14.9994 0.820811 15.8202 1.83333 15.8202L5.88971 15.8202C6.44575 15.8202 6.97175 16.0725 7.31971 16.5062L9.57006 19.3112C10.304 20.2259 11.6962 20.2259 12.4301 19.3112L14.6804 16.5062C15.0284 16.0725 15.5544 15.8202 16.1104 15.8202L20.1667 15.8202C21.1792 15.8202 22 14.9994 22 13.9868V1.83333Z"),this.iconLines=new import_ag_charts_community90._ModuleSupport.SvgPath("M17.1114 5.75C17.1114 6.16421 16.7756 6.5 16.3614 6.5H5.63916C5.22495 6.5 4.88916 6.16421 4.88916 5.75V5.75C4.88916 5.33579 5.22495 5 5.63916 5H16.3614C16.7756 5 17.1114 5.33579 17.1114 5.75V5.75ZM17.1114 9.25C17.1114 9.66421 16.7756 10 16.3614 10H5.63916C5.22495 10 4.88916 9.66421 4.88916 9.25V9.25C4.88916 8.83579 5.22495 8.5 5.63916 8.5H16.3614C16.7756 8.5 17.1114 8.83579 17.1114 9.25V9.25Z"),this.active=!1,this.shape.visible=!1,this.label.visible=!1,this.iconBackground.fillShadow=new import_ag_charts_community90._ModuleSupport.DropShadow,this.append([this.shape,this.label,this.iconBackground,this.iconLines,this.handle])}static is(t){return AnnotationScene.isCheck(t,"note")}update(t,e){this.updateIcon(t,e),super.update(t,e)}getTextBBox(t,e,i){const o=super.getTextBBox(t,e,i);o.x-=t.width/2,o.x=clamp4(0,o.x,i.seriesRect.width-t.width);const s=t.getPadding().top,a=o.y-LABEL_OFFSET-s*2,n=o.y+DivariantHandle.HANDLE_SIZE+s*2;return a-o.height-TOOLBAR_OFFSET<0?(o.y=n,t.position="top"):(o.y=a+s,t.position="bottom"),o}updateLabel(t,e){const i=t.visible===!1?!1:this.label.visible;super.updateLabel(t,e),this.label.visible=i,this.label.text=TextWrapper3.wrapText(t.text,{font:{fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight},avoidOrphans:!1,textAlign:t.textAlign,textBaseline:"hanging",textWrap:"always",maxWidth:200})}updateShape(t,e){const{shape:i}=this;i.fill=t.background.fill,i.fillOpacity=t.background.fillOpacity??1,i.stroke=t.background.stroke,i.strokeOpacity=t.background.strokeOpacity??1,i.strokeWidth=t.background.strokeWidth??1,i.cornerRadius=4;const o=t.getPadding().top,s=t.position==="top";i.x=e.x-o,i.width=t.width+o*2,i.height=e.height+o*2,i.y=e.y+(s?0:-e.height)-o}updateIcon(t,e){const{active:i,iconBackground:o,iconLines:s}=this,{x:a,y:n}=convertPoint(t,e);o.x=a-ICON_WIDTH/2,o.y=n-ICON_HEIGHT,s.x=o.x,s.y=o.y,o.fill=t.fill,o.fillOpacity=t.fillOpacity??1,o.stroke=t.stroke,o.strokeOpacity=t.strokeOpacity??1,o.strokeWidth=t.strokeWidth??1,s.fill=t.stroke,i?o.fillShadow.color=t.fill??"rgba(0, 0, 0, 0.22)":o.fillShadow.color="rgba(0, 0, 0, 0.22)"}updateAnchor(t,e,i){const o=t.getPadding().top,s=t.position==="top",a=s?1:-1;return{x:e.x+i.seriesRect.x+t.width/2,y:e.y+i.seriesRect.y+a*(e.height+o),position:s?"below":"above"}}getLabelCoords(t,e){const i=t.position==="top",o=t.getPadding().top;return{x:e.x,y:e.y+(i?o/2:0)}}getHandleCoords(t,e,i){return{x:e.x,y:e.y+DivariantHandle.HANDLE_SIZE/2+4}}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.fill,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}toggleHovered(t){super.toggleHovered(t),this.label.visible=t,this.shape.visible=t,this.zIndex=t?ZIndexMap3.CHART_ANNOTATION_FOCUSED:ZIndexMap3.CHART_ANNOTATION}toggleActive(t){super.toggleActive(t),this.label.visible=t,this.shape.visible=t,this.active=t}containsPoint(t,e){return this.shape.visible&&this.shape.containsPoint(t,e)||this.iconBackground.containsPoint(t,e)?!0:super.containsPoint(t,e)}},NoteStateMachine=class extends TextualPointStateMachine{createDatum(){return new NoteProperties}},noteConfig={type:"note",datum:NoteProperties,scene:NoteScene,isDatum:NoteProperties.is,translate:(t,e,i,o)=>{NoteProperties.is(e)&&NoteScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(NoteProperties.is(e)&&NoteProperties.is(i)&&NoteScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{NoteProperties.is(e)&&NoteScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new NoteStateMachine({...t,create:e("note")}),dragState:t=>new DragStateMachine(t)},import_ag_charts_community91=require("ag-charts-community"),{Vec2:Vec217,Vec4:Vec413}=import_ag_charts_community91._ModuleSupport,ParallelChannelScene=class extends ChannelScene{constructor(){super(),this.type="parallel-channel",this.ignoreYBounds=!0,this.handles={topLeft:new DivariantHandle,topMiddle:new UnivariantHandle,topRight:new DivariantHandle,bottomLeft:new DivariantHandle,bottomMiddle:new UnivariantHandle,bottomRight:new DivariantHandle},this.middleLine=new CollidableLine,this.append([this.background,this.topLine,this.middleLine,this.bottomLine,...Object.values(this.handles)])}static is(t){return AnnotationScene.isCheck(t,"parallel-channel")}dragHandle(t,e,i,o){const{activeHandle:s,handles:a}=this;if(s==null)return;const{offset:n}=a[s].drag(e);a[s].toggleDragging(!0);const r=t.toJson();let l=[],c=[];switch(s){case"topLeft":case"bottomLeft":l=["topLeft","bottomLeft"],c=["topRight","bottomRight"];break;case"topMiddle":l=["topLeft","topRight"],n.y-=UnivariantHandle.HANDLE_SIZE/2;break;case"topRight":case"bottomRight":l=["topRight","bottomRight"],c=["topLeft","bottomLeft"];break;case"bottomMiddle":l=["bottomLeft","bottomRight"],n.y-=UnivariantHandle.HANDLE_SIZE/2;break}const h=t.snapToAngle,d=l.map((p,g)=>o&&c[g]?this.snapToAngle(e,i,p,c[g],h):invertCoords(Vec217.add(a[p].handle,n),i)).filter(isPoint);if(d.some(p=>!validateDatumPoint(i,p,{y:!1})))return;const{value:u}=getGroupingValue(t.start.y);if((s==="topMiddle"||s==="bottomMiddle")&&u!=null&&isNumber(u)){const p=invertCoords(Vec217.add(a.topLeft.handle,n),i);s==="topMiddle"?t.height+=p.y-u:t.height-=p.y-u}for(const[p,g]of d.entries())switch(l[p]){case"topLeft":t.start.x=g.x,t.start.y=g.y;break;case"topRight":t.end.x=g.x,t.end.y=g.y;break}t.isValidWithContext(i)||t.set(r)}containsPoint(t,e){return super.containsPoint(t,e)||this.middleLine.visible&&this.middleLine.strokeWidth>0&&this.middleLine.containsPoint(t,e)}getNodeAtCoords(t,e){return this.middleLine.visible&&this.middleLine.strokeWidth>0&&this.middleLine.containsPoint(t,e)?"line":super.getNodeAtCoords(t,e)}updateLines(t,e,i,o,s,a){const{topLine:n,middleLine:r,bottomLine:l}=this,{lineDashOffset:c,stroke:h,strokeOpacity:d,strokeWidth:u}=t,p=t.getLineDash(),g={lineCap:t.getLineCap(),lineDash:p,lineDashOffset:c,stroke:h,strokeOpacity:d,strokeWidth:u};n.setProperties({...e,...g}),l.setProperties({...i,...g});const y=this.extendLine({x1:s.x1,y1:a.y1+(s.y1-a.y1)/2,x2:s.x2,y2:a.y2+(s.y2-a.y2)/2},t,o);r.setProperties({...y,lineDash:t.middle.lineDash??p,lineDashOffset:t.middle.lineDashOffset??c,stroke:t.middle.stroke??h,strokeOpacity:t.middle.strokeOpacity??d,strokeWidth:t.middle.strokeWidth??u,visible:t.middle.visible??!0})}updateHandles(t,e,i){const{handles:{topLeft:o,topMiddle:s,topRight:a,bottomLeft:n,bottomMiddle:r,bottomRight:l}}=this,c={fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth};o.update({...c,...Vec413.start(e)}),a.update({...c,...Vec413.end(e)}),n.update({...c,...Vec413.start(i)}),l.update({...c,...Vec413.end(i)}),s.update({...c,...Vec217.sub(Vec413.center(e),Vec217.from(s.handle.width/2,s.handle.height/2))}),r.update({...c,...Vec217.sub(Vec413.center(i),Vec217.from(r.handle.width/2,r.handle.height/2))})}updateText(t,e,i){this.text=this.updateNode(CollidableText,this.text,!!t.text.label),updateChannelText(!0,e,i,t.text,t.strokeWidth,this.text,t.text.label)}getBackgroundPoints(t,e,i,o){const s=e.x1>e.x2,a=e.y1>e.y2,n=e.x1!==i.x1&&e.y1!==i.y1,r=e.x2!==i.x2&&e.y2!==i.y2,l=Vec217.from(e);return t.extendEnd&&r&&l.push(Vec217.from(s?o.x1:o.x2,a?o.y1:o.y2)),l.push(...Vec217.from(i).reverse()),t.extendStart&&n&&l.push(Vec217.from(s?o.x2:o.x1,a?o.y2:o.y1)),l}},import_ag_charts_community92=require("ag-charts-community"),{StateMachine:StateMachine10,StateMachineProperty:StateMachineProperty10,Debug:Debug10}=import_ag_charts_community92._ModuleSupport,ParallelChannelStateMachine=class extends StateMachine10{constructor(t){const e=({point:l})=>{const c=new ParallelChannelProperties;c.set({start:l,end:l,height:0}),t.create(c)},i=()=>{const{node:l}=this;l?.toggleActive(!0),l?.toggleHandles({topLeft:!0,topMiddle:!1,topRight:!1,bottomLeft:!1,bottomMiddle:!1,bottomRight:!1})},o=({offset:l,context:c})=>{const{datum:h,snapping:d}=this;h&&(h.set({end:snapPoint(l,c,d,h.start,h.snapToAngle)}),t.update())},s=()=>{this.node?.toggleHandles({topRight:!0}),t.update()},a=({point:l})=>{const{datum:c,node:h}=this,{value:d}=getGroupingValue(c?.end.y),{value:u}=getGroupingValue(c?.start.y),{y:p}=l;if(c==null||!isNumber(u)||!isNumber(d)||!isNumber(p))return;const g=d-(p??0),y=u-g;h?.toggleHandles({bottomLeft:!0,bottomRight:!0}),!(!t.validatePoint({x:c.start.x,y})||!t.validatePoint({x:c.end.x,y:l.y}))&&(c.set({height:g}),t.update())},n=({point:l})=>{const{datum:c,node:h}=this,{value:d}=getGroupingValue(c?.end.y),{value:u}=getGroupingValue(c?.start.y),{y:p}=l;if(c==null||!isNumber(u)||!isNumber(d)||!isNumber(p))return;const g=d-(p??0),y=u-g;h?.toggleHandles(!0),!(!t.validatePoint({x:c.start.x,y})||!t.validatePoint({x:c.end.x,y:l.y}))&&(c.set({height:g}),t.recordAction("Create parallel-channel annotation"),t.showAnnotationOptions(),t.update())},r=()=>t.delete();super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},reset:StateMachine10.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,drag:o,click:{target:"height",action:s},dragEnd:{target:"height",action:s},reset:{target:StateMachine10.parent,action:r},cancel:{target:StateMachine10.parent,action:r}},height:{hover:a,click:{target:StateMachine10.parent,action:n},drag:{target:StateMachine10.parent,action:n},reset:{target:StateMachine10.parent,action:r},cancel:{target:StateMachine10.parent,action:r}}}),this.debug=Debug10.create(!0,"annotations"),this.snapping=!1}};__decorateClass([StateMachineProperty10()],ParallelChannelStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty10()],ParallelChannelStateMachine.prototype,"node",2),__decorateClass([StateMachineProperty10()],ParallelChannelStateMachine.prototype,"snapping",2);var parallelChannelConfig={type:"parallel-channel",datum:ParallelChannelProperties,scene:ParallelChannelScene,isDatum:ParallelChannelProperties.is,translate:(t,e,i,o)=>{ParallelChannelProperties.is(e)&&ParallelChannelScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(ParallelChannelProperties.is(e)&&ParallelChannelProperties.is(i)&&ParallelChannelScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{ParallelChannelProperties.is(e)&&ParallelChannelScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new ParallelChannelStateMachine({...t,create:e("parallel-channel")}),dragState:t=>new DragStateMachine(t)},TextScene=class extends TextualPointScene{constructor(){super(),this.type="text",this.append([this.label,this.handle])}static is(t){return AnnotationScene.isCheck(t,"text")}getHandleCoords(t,e){const i=DivariantHandle.HANDLE_SIZE/2;return{x:e.x+i,y:e.y+2+i}}},TextStateMachine=class extends TextualPointStateMachine{createDatum(){return new TextProperties}},textConfig={type:"text",datum:TextProperties,scene:TextScene,isDatum:TextProperties.is,translate:(t,e,i,o)=>{TextProperties.is(e)&&TextScene.is(t)&&t.translate(e,i,o)},copy:(t,e,i,o)=>{if(TextProperties.is(e)&&TextProperties.is(i)&&TextScene.is(t))return t.copy(e,i,o)},update:(t,e,i)=>{TextProperties.is(e)&&TextScene.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new TextStateMachine({...t,create:e("text")}),dragState:t=>new DragStateMachine(t)},annotationConfigs={[lineConfig.type]:lineConfig,[horizontalLineConfig.type]:horizontalLineConfig,[verticalLineConfig.type]:verticalLineConfig,[parallelChannelConfig.type]:parallelChannelConfig,[disjointChannelConfig.type]:disjointChannelConfig,[fibonacciRetracementConfig.type]:fibonacciRetracementConfig,[fibonacciRetracementTrendBasedConfig.type]:fibonacciRetracementTrendBasedConfig,[calloutConfig.type]:calloutConfig,[commentConfig.type]:commentConfig,[noteConfig.type]:noteConfig,[textConfig.type]:textConfig,[arrowConfig.type]:arrowConfig,[arrowUpConfig.type]:arrowUpConfig,[arrowDownConfig.type]:arrowDownConfig,[dateRangeConfig.type]:dateRangeConfig,[priceRangeConfig.type]:priceRangeConfig,[datePriceRangeConfig.type]:datePriceRangeConfig,[quickDatePriceRangeConfig.type]:quickDatePriceRangeConfig};function getTypedDatum(t){for(const{isDatum:e}of Object.values(annotationConfigs))if(e(t))return t}var import_ag_charts_community93=require("ag-charts-community"),{ActionOnSet,ParallelStateMachine,StateMachine:StateMachine11,StateMachineProperty:StateMachineProperty11,Debug:Debug11}=import_ag_charts_community93._ModuleSupport,AnnotationsStateMachine=class extends ParallelStateMachine{constructor(t){super(new SnappingStateMachine(e=>{this.snapping=e}),new UpdateMachine(()=>{this.node=this.active==null?void 0:t.node(this.active)}),new AnnotationsMainStateMachine(t,e=>{this.active=e,this.datum=this.active==null?void 0:t.datum(this.active),this.node=this.active==null?void 0:t.node(this.active)})),this.snapping=!1}getActive(){return this.active}isActive(t){return t===this.active}};__decorateClass([StateMachineProperty11()],AnnotationsStateMachine.prototype,"snapping",2),__decorateClass([StateMachineProperty11()],AnnotationsStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty11()],AnnotationsStateMachine.prototype,"node",2);var SnappingStateMachine=class extends StateMachine11{constructor(t){super("idle",{idle:{hover:({shiftKey:e})=>t(e),keyDown:({shiftKey:e})=>t(e),keyUp:({shiftKey:e})=>t(e),click:({shiftKey:e})=>t(e),drag:({shiftKey:e})=>t(e)},dragging:{},"text-input":{}})}},UpdateMachine=class extends StateMachine11{constructor(t){super("idle",{idle:{onEnter:t,render:t},dragging:{onEnter:t,render:t},"text-input":{render:t}})}},AnnotationsMainStateMachine=class extends StateMachine11{constructor(t,e){const i=x=>S=>{t.create(x,S),this.active=t.selectLast()},o=()=>{this.active!=null&&t.delete(this.active),this.active=void 0,t.select()},s={createDatum:i},a={...t,delete:o,showTextInput:()=>{this.active!=null&&t.showTextInput(this.active)},deselect:()=>{const x=this.active;this.active=void 0,this.hovered=void 0,t.select(this.active,x)},showAnnotationOptions:()=>{this.active!=null&&t.showAnnotationOptions(this.active)}},n=Object.fromEntries(Object.entries(annotationConfigs).map(([x,S])=>[x,S.createState(a,s)])),r=Object.fromEntries(Object.entries(annotationConfigs).map(([x,S])=>[x,S.dragState(t,s)])),l=({colorPickerType:x,colorOpacity:S,color:M,opacity:A,isMultiColor:v})=>{this.datum&&(x==="text-color"&&t.updateTextInputColor(M),setColor(this.datum,x,S,M,A,v),t.update())},c=x=>{const{datum:S,node:M}=this;!S||!M||(isTextType(S)?(S.fontSize=x,t.updateTextInputFontSize(x)):hasLineText(S)&&(S.text.fontSize=x),t.update())},h=x=>{const{datum:S,node:M}=this;!S||!M||!hasLineStyle(S)||(setLineStyle(S,x),t.update())},d=x=>{const{node:S}=this;!S||!("setTextInputBBox"in S)||(S.setTextInputBBox(x),t.update())},u=({textInputValue:x,bbox:S})=>{const{datum:M}=this;if(S!=null&&x!=null&&x.length>0){if(!isTextType(M))return;const A=wrapText(M,x,S.width);M.set({text:A}),t.update(),t.recordAction(`Change ${M.type} annotation text`)}else t.delete(this.active),t.recordAction(`Delete ${M?.type} annotation`)},p=()=>{t.updateTextInputBBox(void 0)},g=()=>this.active!=null,y=()=>this.copied!=null,f=()=>{const{active:x,datum:S}=this;return x==null||!S?!1:hasLineText(S)&&!S.locked},m=()=>this.active!=null&&!isEphemeralType(this.datum),b=()=>this.hovered!=null;super("idle",{idle:{onEnter:()=>{t.select(this.active,this.active),this.hoverCoords&&(this.hovered=t.hoverAtCoords(this.hoverCoords,this.active,this.hovered))},hover:({offset:x})=>{this.hovered=t.hoverAtCoords(x,this.active,this.hovered),this.hoverCoords=x},translate:{guard:g,action:({translation:x})=>{t.startInteracting(),t.translate(this.active,x),t.update()}},translateEnd:{guard:g,action:()=>{t.stopInteracting()}},copy:{guard:m,action:()=>{this.copied=t.copy(this.active)}},cut:{guard:m,action:()=>{this.copied=t.copy(this.active),o()}},paste:{guard:y,action:()=>{t.paste(this.copied)}},selectLast:()=>{const x=this.active;this.active=t.selectLast(),t.select(this.active,x)},click:[{guard:()=>{const{active:x,hovered:S,datum:M}=this;return x==null||S!==x||!M?!1:isTextType(M)&&!M.locked},target:"text-input"},{action:()=>{const x=this.active;this.active=this.hovered,t.select(this.active,x)}}],dblclick:{guard:f,action:({offset:x})=>{const S=t.getNodeAtCoords(x,this.active)==="text"?"text":"line";t.showAnnotationSettings(this.active,void 0,S)}},dragStart:[{guard:b,target:"dragging",action:()=>{const x=this.active;this.active=this.hovered,t.select(this.active,x),t.startInteracting()}},{action:()=>{const x=this.active;this.active=this.hovered,t.select(this.active,x)}}],color:{guard:g,action:l},fontSize:{guard:g,action:c},lineProps:{guard:g,action:x=>{const S=getTypedDatum(this.datum);S?.set(x),t.update(),t.recordAction(`Change ${S?.type} ${Object.entries(x).map(([M,A])=>`${M} to ${A}`).join(", ")}`)}},lineStyle:{guard:g,action:h},lineText:{guard:g,action:x=>{const S=getTypedDatum(this.datum);hasLineText(S)&&(isChannelType(S)&&x.position==="center"&&(x.position="inside"),S.text.set(x),t.update())}},updateTextInputBBox:{guard:g,action:d},toolbarPressSettings:{guard:f,action:x=>{t.showAnnotationSettings(this.active,x)}},reset:()=>{this.active!=null&&this.node?.toggleActive(!1),this.hovered=void 0,this.active=void 0,t.select(this.active,this.active),t.resetToIdle()},delete:()=>{this.active!=null&&(t.delete(this.active),!isEphemeralType(this.datum)&&t.recordAction(`Delete ${this.datum?.type} annotation`))},deleteAll:()=>{t.deleteAll()},...n},dragging:{onEnter:(x,S)=>{if(this.active==null)return;const M=t.getAnnotationType(this.active);M&&(this.transitionRoot(M),this.transitionRoot("dragStart",S))},...r},"text-input":{onEnter:()=>{if(this.active==null)return;const x=getTypedDatum(this.datum);!x||!("getTextInputCoords"in x)||(t.startInteracting(),t.showTextInput(this.active),x.visible=!1,t.update())},updateTextInputBBox:{guard:g,action:d},resize:{target:"idle",action:u},click:{target:"idle",action:u},drag:{target:"idle",action:u},textInput:[{guard:guardCancelAndExit,target:"idle",action:p},{guard:guardSaveAndExit,target:"idle",action:u}],color:{guard:g,action:l},fontSize:{guard:g,action:c},cancel:{target:"idle",action:p},onExit:()=>{t.stopInteracting(),t.hideTextInput();const x=this.active;if(this.active=this.hovered=void 0,t.select(this.active,x),x==null)return;const S=t.datum(x),M=t.node(x);!S||!M||(S.visible=!0)}}}),this.setActive=e,this.debug=Debug11.create(!0,"annotations"),this.snapping=!1}};__decorateClass([ActionOnSet({changeValue(t){this.setActive(t)}}),StateMachineProperty11()],AnnotationsMainStateMachine.prototype,"active",2),__decorateClass([StateMachineProperty11()],AnnotationsMainStateMachine.prototype,"hovered",2),__decorateClass([StateMachineProperty11()],AnnotationsMainStateMachine.prototype,"hoverCoords",2),__decorateClass([StateMachineProperty11()],AnnotationsMainStateMachine.prototype,"copied",2),__decorateClass([StateMachineProperty11()],AnnotationsMainStateMachine.prototype,"snapping",2),__decorateClass([StateMachineProperty11()],AnnotationsMainStateMachine.prototype,"datum",2),__decorateClass([StateMachineProperty11()],AnnotationsMainStateMachine.prototype,"node",2);var import_ag_charts_community94=require("ag-charts-community"),{ARRAY:ARRAY3,BOOLEAN:BOOLEAN9,UNION:UNION6,POSITIVE_NUMBER:POSITIVE_NUMBER5,ActionOnSet:ActionOnSet2,LayoutElement,Menu:Menu2,PropertiesArray:PropertiesArray2,ToolbarButtonProperties:ToolbarButtonProperties2,Validate:Validate30,ChartAxisDirection:ChartAxisDirection9}=import_ag_charts_community94._ModuleSupport,AnnotationsToolbarButtonProperties=class extends ToolbarButtonProperties2{};__decorateClass([Validate30(UNION6(["line-menu","fibonacci-menu","text-menu","shape-menu","measurer-menu","clear"]))],AnnotationsToolbarButtonProperties.prototype,"value",2);var AnnotationsToolbar=class extends import_ag_charts_community94._ModuleSupport.BaseProperties{constructor(t){super(),this.ctx=t,this.enabled=!0,this.padding=20,this.buttons=new PropertiesArray2(AnnotationsToolbarButtonProperties),this.events=new import_ag_charts_community94._ModuleSupport.Listeners,this.annotationMenu=new Menu2(this.ctx,"annotations"),this.destroyFns=[],this.toolbar=t.sharedToolbar.getSharedToolbar("annotations");const e=this.onKeyDown.bind(this);this.toolbar.addListener("keydown",e),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onToolbarButtonPress.bind(this)),t.layoutManager.registerElement(LayoutElement.ToolbarLeft,this.onLayoutStart.bind(this)),()=>{this.toolbar.removeListener("keydown",e),this.toolbar.destroy()})}destroy(){for(const t of this.destroyFns)t()}addListener(t,e){return this.events.addListener(t,e)}toggleVisibility(t){this.toolbar.setHidden(!t)}toggleClearButtonEnabled(t){const e=this.buttons.findIndex(i=>i.value==="clear");this.toolbar.toggleButtonEnabledByIndex(e,t)}resetButtonIcons(){for(const[t,e]of this.buttons.entries())switch(e.value){case"line-menu":this.updateButtonByIndex(t,{icon:"trend-line-drawing",value:"line-menu"});break;case"fibonacci-menu":this.updateButtonByIndex(t,{icon:"fibonacci-retracement-drawing",value:"fibonacci-menu"});break;case"text-menu":this.updateButtonByIndex(t,{icon:"text-annotation",value:"text-menu"});break;case"shape-menu":this.updateButtonByIndex(t,{icon:"arrow-drawing",value:"shape-menu"});break;case"measurer-menu":this.updateButtonByIndex(t,{icon:"measurer-drawing",value:"measurer-menu"});break}}hideOverlays(){this.annotationMenu.hide()}clearActiveButton(){this.toolbar.clearActiveButton()}dispatch(t,e){this.events.dispatch(t,e)}onLayoutStart(t){this.enabled&&(this.toolbar.updateButtons(this.buttons),this.toolbar.layout(t.layoutBox,this.padding))}refreshButtonsEnabled(t){for(const[e,i]of this.buttons.entries())i&&this.toolbar.toggleButtonEnabledByIndex(e,t)}onToolbarButtonPress({event:t,button:e,buttonBounds:i}){const o=this.ctx.axisManager.getAxisContext(ChartAxisDirection9.Y)[0].scale;switch(e.value){case"clear":this.dispatch("pressed-clear");break;case"line-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsLineAnnotations",LINE_ANNOTATION_ITEMS.filter(s=>s.visible?s.visible(o):!0));break;case"fibonacci-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsFibonacciAnnotations",FIBONACCI_ANNOTATION_ITEMS);break;case"text-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsTextAnnotations",TEXT_ANNOTATION_ITEMS);break;case"shape-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsShapeAnnotations",SHAPE_ANNOTATION_ITEMS);break;case"measurer-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsMeasurerAnnotations",MEASURER_ANNOTATION_ITEMS);break}}onToolbarButtonPressShowMenu(t,e,i,o,s){this.dispatch("pressed-show-menu");const a=this.buttons.findIndex(n=>n.value===i);this.toolbar.toggleActiveButtonByIndex(a),this.annotationMenu.setAnchor({x:e.x+e.width+6,y:e.y}),this.annotationMenu.show({items:s,ariaLabel:this.ctx.localeManager.t(o),class:"ag-charts-annotations__toolbar-menu",sourceEvent:t.sourceEvent,onPress:this.onButtonPressMenuCreateAnnotation.bind(this,i)})}onButtonPressMenuCreateAnnotation(t,e){const i=this.buttons.findIndex(o=>o.value===t);this.updateButtonByIndex(i,{icon:e.icon}),this.dispatch("pressed-create-annotation",{annotation:e.value}),this.annotationMenu.hide()}onKeyDown({sourceEvent:t}){t.key==="Escape"&&this.dispatch("cancel-create-annotation")}updateButtonByIndex(t,e){const i=this.buttons.at(t);i&&(i.set({...i.toJson(),...e,value:e.value??i.value}),this.toolbar.updateButtonByIndex(t,{...i.toJson()}))}};__decorateClass([Validate30(BOOLEAN9),ActionOnSet2({changeValue(t){this.toolbar?.setHidden(!t)}})],AnnotationsToolbar.prototype,"enabled",2),__decorateClass([Validate30(POSITIVE_NUMBER5)],AnnotationsToolbar.prototype,"padding",2),__decorateClass([Validate30(ARRAY3)],AnnotationsToolbar.prototype,"buttons",2);var import_ag_charts_community95=require("ag-charts-community"),{BaseModuleInstance,InteractionState,Validate:Validate31,BOOLEAN:BOOLEAN10,ChartAxisDirection:ChartAxisDirection10,getIconClassNames}=import_ag_charts_community95._ModuleSupport,DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS="ag-charts-annotations__axis-button",AxisButton=class extends BaseModuleInstance{constructor(t,e,i,o){super(),this.ctx=t,this.axisCtx=e,this.onButtonClick=i,this.seriesRect=o,this.enabled=!0,this.snap=!1,this.padding=0,this.button=this.setup(),this.toggleVisibility(!1),this.updateButtonElement(),this.snap=!!e.scale.bandwidth,t.domManager.addEventListener("focusin",({target:s})=>{const a=s instanceof HTMLElement?s:void 0;!(a&&t.domManager.contains(a,"series-area"))&&a!==this.button.getElement()&&this.hide()}),this.destroyFns.push(t.widgets.seriesWidget.addListener("drag-move",s=>this.onMouseDrag(s)),t.widgets.seriesWidget.addListener("mousemove",s=>this.onMouseMove(s)),t.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseLeave()),t.widgets.seriesDragInterpreter.addListener("click",s=>this.onClick(s)),t.chartEventManager.addListener("series-focus-change",()=>this.onKeyPress()),t.zoomManager.addListener("zoom-pan-start",()=>this.hide()),t.zoomManager.addListener("zoom-change",()=>this.hide()),()=>this.destroyElements(),()=>this.button.destroy())}update(t,e){this.seriesRect=t,this.padding=e}setup(){const t=new import_ag_charts_community95._Widget.ButtonWidget;return t.addClass(DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS),t.setTabIndex(-1),t.setAriaLabel(this.ctx.localeManager.t("ariaLabelAddHorizontalLine")),this.ctx.widgets.seriesWidget.getElement().appendChild(t.getElement()),t}destroyElements(){this.ctx.domManager.removeChild("canvas-overlay",DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS)}onMouseMove(t){this.ctx.interactionManager.isState(InteractionState.Clickable)&&this.show(t)}onMouseDrag(t){this.ctx.interactionManager.isState(InteractionState.AnnotationsMoveable)&&this.show(t)}onMouseLeave(){this.ctx.interactionManager.isState(InteractionState.Clickable)&&this.hide()}onClick(t){this.ctx.interactionManager.isState(InteractionState.Clickable)&&t.device==="touch"&&this.show(t)}show(t){const{sourceEvent:e,currentX:i,currentY:o}=t;if(!(this.enabled&&this.ctx.widgets.seriesWidget.getElement().contains(e.target))){this.hide();return}this.toggleVisibility(!0);const s=this.getButtonCoordinates({x:i,y:o});this.coords={x:s.x+this.button.clientWidth/2,y:s.y+this.button.clientHeight/2},this.updatePosition(s)}hide(){this.toggleVisibility(!1)}onKeyPress(){this.snap&&this.ctx.interactionManager.isState(InteractionState.Default)||this.hide()}getButtonCoordinates({x:t,y:e}){const{axisCtx:{direction:i,position:o},seriesRect:s,snap:a,axisCtx:n,padding:r}=this,{clientWidth:l,clientHeight:c}=this.button,[h,d]=[0,s.height],[u,p]=[0,s.width];if(a&&(t=convert(invert(t-s.x,n),n)+s.x,e=convert(invert(e-s.y,n),n)+s.y),i===ChartAxisDirection10.X){const y=c-Math.max(0,r-5);t=t-l/2,e=o==="top"?h-c+y:d-y}else{const y=l-Math.max(0,r-9);t=o==="left"?u-l+y:p-y,e=e-c/2}return{x:t,y:e}}toggleVisibility(t){const{button:e}=this;if(e==null)return;const i=this.enabled&&t;this.toggleClass("-hidden",!i)}toggleClass(t,e){this.button.toggleClass(`${DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS}-${t}`,e)}updatePosition({x:t,y:e}){this.button.getElement().style.transform=`translate(${Math.round(t)}px, ${Math.round(e)}px)`}updateButtonElement(){const{button:t}=this;t.addListener("click",()=>this.onButtonClick(this.coords)),t.addListener("touchend",()=>this.onButtonClick(this.coords)),t.addListener("drag-start",()=>{}),t.setInnerHTML(``)}};__decorateClass([Validate31(BOOLEAN10)],AxisButton.prototype,"enabled",2);var import_ag_charts_community97=require("ag-charts-community"),import_ag_charts_community96=require("ag-charts-community"),{Color:Color5,DraggablePopover,NativeWidget,Vec2:Vec218,createButton,createCheckbox,createElementId,createSelect,createTextArea,initRovingTabIndex,getIconClassNames:getIconClassNames2,mapValues,setAttribute,setAttributes,createElement:createElement2,getWindow}=import_ag_charts_community96._ModuleSupport,_Dialog=class xt extends DraggablePopover{constructor(e,i){super(e,i),this.dragHandleDraggingClass="ag-charts-dialog__drag-handle--dragging",this.colorPicker=new ColorPicker(this.ctx,{detached:!0}),this.destroyFns.push(e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)))}showWithChildren(e,i){const o=super.showWithChildren(e,i);return o.classList.add("ag-charts-dialog"),o.setAttribute("role","dialog"),o.addEventListener("mousedown",s=>{s.target.classList?.contains("ag-charts-dialog__color-picker-button")||this.colorPicker.hide()}),o.addEventListener("keydown",this.onKeyDown.bind(this)),getWindow().requestAnimationFrame(()=>this.reposition()),this.colorPicker.attachTo(this),o}updatePosition(e){super.updatePosition(e);const{anchor:i,fallbackAnchor:o}=this.getColorPickerAnchors()??{};i&&this.colorPicker.setAnchor(i,o)}createTabs(e,i,o){const s=createElement2("div","ag-charts-dialog__tabs"),a=mapValues(o,()=>createElementId("ag-charts-dialog__tab")),n=mapValues(o,()=>createElementId("ag-charts-dialog__tab-panel"));for(const[p,g]of Object.entries(o))setAttributes(g.panel,{id:n[p],role:"tabpanel","aria-labelledby":a[p]});const r=p=>{for(const[g,y]of Object.entries(o))y.panel.classList.toggle("ag-charts-dialog__tab-panel--active",g===p),h[g].classList.toggle("ag-charts-dialog__tab-button--active",g===p),setAttribute(h[g],"aria-selected",g===p),g===p&&y.onShow?.()},l=new NativeWidget(createElement2("div","ag-charts-dialog__header"));l.addListener("drag-start",p=>{const{sourceEvent:g}=p;g.target instanceof Element&&g.target.classList.contains("ag-charts-dialog__header")&&this.onDragStart(p)}),l.addListener("drag-move",p=>this.onDragMove(p)),l.addListener("drag-end",()=>this.onDragEnd());const c=new DragHandleWidget;this.setDragHandle(c);const h=mapValues(o,(p,g)=>createButton({label:this.ctx.localeManager.t(p.label),onPress:()=>r(g)},{id:a[g],class:"ag-charts-dialog__tab-button",role:"tab","aria-controls":n[g]})),d=createElement2("div","ag-charts-dialog__tab-list");setAttributes(d,{role:"tablist","aria-label":this.ctx.localeManager.t(e)}),d.append(...Object.values(h));const u=this.createHeaderCloseButton();return l.getElement().append(c.getElement(),d,u),s.append(l.getElement(),...Object.values(o).map(p=>p.panel)),r(i),initRovingTabIndex({orientation:"horizontal",buttons:Object.values(h)}),{tabs:s,initialFocus:h[i]}}createTabPanel(){return createElement2("div","ag-charts-dialog__tab-panel")}createInputGroupLine(){return createElement2("div","ag-charts-dialog__input-group-line")}createRadioGroup({label:e,options:i,value:o,onChange:s}){const a=this.createInputGroup(e);setAttributes(a,{role:"radiogroup",tabindex:-1,"aria-label":this.ctx.localeManager.t(e)});const n="ag-charts-dialog__button--active",r=[];for(const l of i){const{icon:c,altText:h}=l,d=this.ctx.localeManager.t(h),u=createButton({icon:c,altText:d,onPress:()=>{for(const p of Array.from(a.children))p.classList.remove(n),p.ariaChecked="false";u.classList.add(n),u.ariaChecked="true",s(l.value)}},{"aria-checked":l.value===o,class:"ag-charts-dialog__button",role:"radio",title:d});l.value===o&&u.classList.add(n),a.appendChild(u),r.push(u)}return initRovingTabIndex({orientation:"horizontal",buttons:r}),a}createSelect({altText:e,label:i,options:o,value:s,onChange:a}){const n=this.createInputGroup(i),r=this.ctx.localeManager.t(e),l=createSelect({value:s,options:o,onChange:a},{class:"ag-charts-dialog__select","aria-label":r,title:r});return n.append(l),n}createTextArea({placeholder:e,value:i,onChange:o}){const s=e?this.ctx.localeManager.t(e):void 0;return createTextArea({value:i,onChange:o},{placeholder:s})}createCheckbox({label:e,checked:i,onChange:o}){const s=`ag-charts__${e}`,a=this.createInputGroup(e,{for:s}),n=createCheckbox({checked:i,onChange:o},{class:"ag-charts-dialog__checkbox",role:"switch",id:s});return a.append(n),a}createColorPicker({color:e,opacity:i,label:o,altText:s,onChange:a,onChangeHide:n,isMultiColor:r,hasMultiColorOption:l}){const c=this.createInputGroup(o),h=this.ctx.localeManager.t(s),d=createButton({label:h,onPress:u=>{const{anchor:p,fallbackAnchor:g}=this.getColorPickerAnchors(d)??{};this.colorPicker.show({anchor:p,fallbackAnchor:g,color:e,opacity:i,isMultiColor:r,hasMultiColorOption:l,sourceEvent:u,onChange:(y,f,m,b)=>{d.style.setProperty("--color",y),d.classList.toggle("ag-charts-dialog__color-picker-button--multi-color",b),a(y,f,m,b)},onChangeHide:n})}},{"aria-label":h,tabindex:0,class:"ag-charts-dialog__color-picker-button",title:h});if(r)d.classList.toggle("ag-charts-dialog__color-picker-button--multi-color");else if(e){const u=Color5.fromString(e),p=new Color5(u.r,u.g,u.b,i);d.style.setProperty("--color",p.toHexString())}return c.append(d),this.hideFns.push(()=>{this.colorPicker.hide()}),c}createHeaderCloseButton(){return createButton({icon:"close",altText:this.ctx.localeManager.t("iconAltTextClose"),onPress:()=>this.hide()},{class:"ag-charts-dialog__close-button"})}createInputGroup(e,i){const o=createElement2("div","ag-charts-dialog__input-group"),s=createElement2("label","ag-charts-dialog__input-group-label");return s.innerText=this.ctx.localeManager.t(e),i?.for&&s.setAttribute("for",i.for),o.appendChild(s),o}onLayoutComplete(e){this.seriesRect=e.series.paddedRect,this.reposition()}onKeyDown(e){e.altKey||e.ctrlKey||e.metaKey||e.isComposing||e.key!=="Escape"||this.hide()}reposition(){const{seriesRect:e,ctx:i}=this,o=i.domManager.getBoundingClientRect(),s=this.getPopoverElement();if(!e||!s)return;const a=Vec218.from(0,e.y),n=Vec218.from(o.width,e.height),r=Vec218.from(s),l=Vec218.from(.5,1);let c;if(e.width>1e3){const h=Vec218.sub(Vec218.add(a,Vec218.multiply(n,l)),Vec218.multiply(r,l));c=Vec218.sub(h,Vec218.from(0,xt.offset))}else{const h=Vec218.sub(Vec218.add(a,n),r);c=Vec218.sub(h,xt.offset)}this.updatePosition(c)}getColorPickerAnchors(e){if(e&&(this.colorPickerAnchorElement=e),!this.colorPickerAnchorElement)return;const i=this.colorPickerAnchorElement.getBoundingClientRect(),o=this.ctx.domManager.getBoundingClientRect(),s=Vec218.sub(Vec218.from(i.x,i.y),Vec218.from(o.left,o.top)),a=Vec218.add(s,Vec218.from(0,i.height+5)),n=Vec218.sub(s,Vec218.from(0,5));return{anchor:a,fallbackAnchor:n}}};_Dialog.offset=60;var Dialog=_Dialog,DragHandleWidget=class extends NativeWidget{constructor(){super(createElement2("div","ag-charts-dialog__drag-handle"));const t=new NativeWidget(createElement2("span",getIconClassNames2("drag-handle")));t.setAriaHidden(!0),this.addChild(t)}},{Listeners:Listeners2,focusCursorAtEnd:focusCursorAtEnd2}=import_ag_charts_community97._ModuleSupport,AnnotationSettingsDialog=class extends Dialog{constructor(t){super(t,"settings"),this.events=new Listeners2,this.hideFns.push(()=>this.events.dispatch("hidden"))}addListener(t,e){return this.events.addListener(t,e)}show(t,e){const i=this.createLinearLineTab(t,e),o=this.createLinearTextTab(t,e);let s="dialogHeaderLine";isChannelType(t)?s="dialogHeaderChannel":isFibonacciType(t)?s="dialogHeaderFibonacciRange":t.type==="date-range"?s="dialogHeaderDateRange":t.type==="price-range"?s="dialogHeaderPriceRange":t.type==="date-price-range"&&(s="dialogHeaderDatePriceRange");const{tabs:a,initialFocus:n}=this.createTabs("ariaLabelSettingsTabBar",e.initialSelectedTab,{line:{label:s,panel:i},text:{label:"dialogHeaderText",panel:o.panel,onShow:o.onShow}});e.initialFocus=n,this.showWithChildren([a],e).classList.add("ag-charts-dialog--annotation-settings")}createLinearLineTab(t,e){const i=this.createTabPanel(),o=this.createInputGroupLine(),s=this.createInputGroupLine(),a="isMultiColor"in t,n=this.createColorPickerInput("line-color",t.getDefaultColor("line-color"),t.getDefaultOpacity("line-color"),a?t.isMultiColor:!1,a,e.onChangeLineColor,e.onChangeHideLineColor),r=this.createStrokeWidthSelect(t.strokeWidth??2,e.onChangeLineStyleWidth),l=this.createLineStyleRadioGroup(t.lineStyle??"solid",e.onChangeLineStyleType);if(o.append(n),"background"in t){const c=this.createColorPickerInput("fill-color",t.getDefaultColor("fill-color"),t.getDefaultOpacity("fill-color"),!1,!1,e.onChangeFillColor,e.onChangeHideFillColor);o.append(c),s.append(r)}else"showFill"in t?(o.append(this.createCheckbox({label:"dialogInputShowFill",checked:t.showFill??!0,onChange:c=>e.onChangeLine({showFill:c})})),s.append(r)):o.append(r);return s.append(l),i.append(o,s),"bands"in t&&i.append(this.createFibonacciRatioSelect(t.bands??10,c=>e.onChangeLine({bands:c}))),"extendStart"in t&&"extendEnd"in t&&i.append(this.createCheckbox({label:isChannelType(t)?"dialogInputExtendChannelStart":"dialogInputExtendLineStart",checked:t.extendStart??!1,onChange:c=>e.onChangeLine({extendStart:c})}),this.createCheckbox({label:isChannelType(t)?"dialogInputExtendChannelEnd":"dialogInputExtendLineEnd",checked:t.extendEnd??!1,onChange:c=>e.onChangeLine({extendEnd:c})})),"extendAbove"in t&&"extendBelow"in t&&i.append(this.createCheckbox({label:"dialogInputExtendAbove",checked:t.extendAbove??!1,onChange:c=>e.onChangeLine({extendAbove:c})}),this.createCheckbox({label:"dialogInputExtendBelow",checked:t.extendBelow??!1,onChange:c=>e.onChangeLine({extendBelow:c})})),"extendLeft"in t&&"extendRight"in t&&i.append(this.createCheckbox({label:"dialogInputExtendLeft",checked:t.extendLeft??!1,onChange:c=>e.onChangeLine({extendLeft:c})}),this.createCheckbox({label:"dialogInputExtendRight",checked:t.extendRight??!1,onChange:c=>e.onChangeLine({extendRight:c})})),"reverse"in t&&"showFill"in t&&i.append(this.createCheckbox({label:"dialogInputReverse",checked:t.reverse??!1,onChange:c=>e.onChangeLine({reverse:c})})),i}createLinearTextTab(t,e){const i=this.createTabPanel(),o=this.createTextArea({placeholder:"inputTextareaPlaceholder",value:t.text.label,onChange:h=>e.onChangeText({label:h})}),s=this.createFontSizeSelect(t.text.fontSize,e.onChangeTextFontSize),a=this.createColorPickerInput("text-color",t.text.color,1,!1,!1,e.onChangeTextColor,e.onChangeHideTextColor),n=t.text.position==="inside"?"center":t.text.position,r=this.createPositionRadioGroup(n??"top",h=>e.onChangeText({position:h})),l=this.createAlignmentRadioGroup(t.text.alignment??"center",h=>e.onChangeText({alignment:h})),c=this.createInputGroupLine();return c.append(s,a,r,l),i.append(o,c),{panel:i,onShow:()=>focusCursorAtEnd2(o)}}createColorPickerInput(t,e,i,o,s,a,n){const r=t==="fill-color"?"dialogInputFillColorPicker":"dialogInputColorPicker",l=t==="fill-color"?"dialogInputFillColorPickerAltText":"dialogInputColorPickerAltText";return this.createColorPicker({label:r,altText:l,color:e,opacity:i,isMultiColor:o,hasMultiColorOption:s,onChange:a,onChangeHide:n})}createStrokeWidthSelect(t,e){return this.createSelect({label:"dialogInputStrokeWidth",altText:"dialogInputStrokeWidthAltText",options:LINE_STROKE_WIDTH_ITEMS.map(({label:i,value:o})=>({label:i,value:`${o}`})),value:String(t),onChange:i=>e(Number(i))})}createFibonacciRatioSelect(t,e){return this.createSelect({label:"dialogInputFibonacciBands",altText:"dialogInputFibonacciBandsAltText",options:FIBONACCI_RATIO_ITEMS.map(({label:i,value:o})=>({label:i,value:`${o}`})),value:String(t),onChange:i=>e(Number(i))})}createLineStyleRadioGroup(t,e){return this.createRadioGroup({label:"dialogInputLineStyle",options:[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],value:t,onChange:e})}createFontSizeSelect(t,e){return this.createSelect({label:"dialogInputFontSize",altText:"dialogInputFontSizeAltText",options:TEXT_SIZE_ITEMS.map(({label:i,value:o})=>({label:i,value:String(o)})),value:String(t),onChange:i=>e(Number(i))})}createPositionRadioGroup(t,e){return this.createRadioGroup({label:"dialogInputPosition",options:[{icon:"position-top",altText:"iconAltTextPositionTop",value:"top"},{icon:"position-center",altText:"iconAltTextPositionCenter",value:"center"},{icon:"position-bottom",altText:"iconAltTextPositionBottom",value:"bottom"}],value:t,onChange:e})}createAlignmentRadioGroup(t,e){return this.createRadioGroup({label:"dialogInputAlign",options:[{icon:"align-left",altText:"iconAltTextAlignLeft",value:"left"},{icon:"align-center",altText:"iconAltTextAlignCenter",value:"center"},{icon:"align-right",altText:"iconAltTextAlignRight",value:"right"}],value:t,onChange:e})}};function calculateAxisLabelPadding(t){return t.gridPadding+t.seriesAreaPadding+t.tickSize+t.label.spacing}function updateAnnotation(t,e,i){for(const{update:o}of Object.values(annotationConfigs))o(t,e,i)}var{BOOLEAN:BOOLEAN11,OBJECT:OBJECT14,ChartUpdateType,InteractionState:InteractionState2,ObserveChanges:ObserveChanges2,PropertiesArray:PropertiesArray3,Validate:Validate32,ChartAxisDirection:ChartAxisDirection11,Vec2:Vec219,keyProperty,valueProperty,Selection:Selection2,BBox:BBox3}=import_ag_charts_community98._ModuleSupport,_Annotations=class Mt extends import_ag_charts_community98._ModuleSupport.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!0,this.toolbar=new AnnotationsToolbar(this.ctx),this.optionsToolbar=new AnnotationOptionsToolbar(this.ctx,()=>{const i=this.state.getActive();if(i!=null)return getTypedDatum(this.annotationData.at(i))}),this.axesButtons=new AxesButtons,this.snap=!1,this.data=void 0,this.xKey=void 0,this.volumeKey=void 0,this.annotationData=new PropertiesArray3(Mt.createAnnotationDatum),this.defaults=new AnnotationDefaults,this.container=new import_ag_charts_community98._ModuleSupport.Group({name:"static-annotations"}),this.annotations=new Selection2(this.container,this.createAnnotationScene.bind(this)),this.settingsDialog=new AnnotationSettingsDialog(this.ctx),this.textInput=new TextInput(this.ctx),this.restoreAnnotations=!0,this.postUpdateFns=[],this.state=this.setupStateMachine(),this.setupListeners(),this.setupDOM(),this.ctx.historyManager.addMementoOriginator(e.annotationManager),this.ctx.historyManager.addMementoOriginator(this.defaults),this.textInput.setKeyDownHandler(this.onTextInput.bind(this))}setupStateMachine(){const{ctx:e}=this;return new AnnotationsStateMachine({resetToIdle:()=>{e.domManager.updateCursor("annotations"),this.popAnnotationState(InteractionState2.Annotations),this.hideOverlays(),this.optionsToolbar.hide(),this.deleteEphemeralAnnotations(),this.update()},hoverAtCoords:(i,o,s)=>{let a;return this.annotations.each((n,r,l)=>{const c=n.containsPoint(i.x,i.y);c&&(a??(a=l)),n.toggleHovered(c||o===l)}),a!=null?e.tooltipManager.suppressTooltip("annotations"):this.isAnnotationState()||e.tooltipManager.unsuppressTooltip("annotations"),this.ctx.domManager.updateCursor("annotations",a==null?void 0:this.annotations.at(a)?.getCursor()),a!==s&&this.update(),a},getNodeAtCoords:(i,o)=>{const s=this.annotations.at(o);if(s)return s.getNodeAtCoords(i.x,i.y)},translate:(i,o)=>{const s=this.annotations.at(i),a=getTypedDatum(this.annotationData.at(i));if(!(!s||!a))return this.translateNode(s,a,o)},copy:i=>{const o=this.annotations.at(i),s=getTypedDatum(this.annotationData.at(i));if(!(!o||!s))return this.createAnnotationDatumCopy(o,s)},paste:i=>{this.createAnnotation(i.type,i,!1),this.postUpdateFns.push(()=>{this.state.transitionAsync("selectLast"),this.state.transitionAsync("copy")})},select:(i,o)=>{const{annotations:s,optionsToolbar:a,toolbar:n}=this;this.hideOverlays(),n.clearActiveButton(),n.resetButtonIcons();const r=i!=null?s.at(i):null,l=o!=null?s.at(o):null;l===r&&r!=null||(l?.toggleActive(!1),a.hide(),r?(this.pushAnnotationState(InteractionState2.AnnotationsSelected),r.toggleActive(!0),a.updateButtons(this.annotationData.at(i)),this.postUpdateFns.push(()=>{a.show(),a.setAnchorScene(r)})):(this.popAnnotationState(InteractionState2.AnnotationsSelected),this.popAnnotationState(InteractionState2.Annotations)),this.deleteEphemeralAnnotations(),this.update())},selectLast:()=>(this.pushAnnotationState(InteractionState2.AnnotationsSelected),this.annotationData.length-1),startInteracting:()=>{this.pushAnnotationState(InteractionState2.Annotations)},stopInteracting:()=>{this.popAnnotationState(InteractionState2.Annotations)},create:(i,o)=>{this.createAnnotation(i,o)},delete:i=>{this.annotationData.splice(i,1)},deleteAll:()=>{this.annotationData.splice(0,this.annotationData.length)},validatePoint:i=>{const o=this.getAnnotationContext();return o?validateDatumPoint(o,i):!0},getAnnotationType:i=>stringToAnnotationType(this.annotationData[i].type),datum:i=>this.annotationData.at(i),node:i=>this.annotations.at(i),recordAction:i=>{this.recordActionAfterNextUpdate(i)},update:()=>{this.postUpdateFns.push(()=>{const i=this.state.getActive(),o=i!=null?this.annotations.at(i):null;o!=null&&this.optionsToolbar.setAnchorScene(o)}),this.update()},showTextInput:i=>{const o=getTypedDatum(this.annotationData.at(i));if(!this.annotations.at(i)||!o||!("getTextInputCoords"in o)||!("getTextPosition"in o))return;const a={color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,placeholderColor:o.getPlaceholderColor()},n=this.getAnnotationContext(),r=c=>Vec219.add(o.getTextInputCoords(n,c),Vec219.required(this.seriesRect)),l=()=>o.getTextPosition();this.textInput.show({styles:a,layout:{getTextInputCoords:r,getTextPosition:l,alignment:o.alignment,textAlign:o.textAlign,width:o.width},text:o.text,placeholderText:o.placeholderText,onChange:(c,h)=>{this.state.transition("updateTextInputBBox",h)}}),this.ctx.domManager.updateCursor("annotations")},hideTextInput:()=>{this.textInput.hide()},updateTextInputColor:i=>{this.textInput.updateColor(i)},updateTextInputFontSize:i=>{const o=this.textInput.updateFontSize(i);this.state.transition("updateTextInputBBox",o)},updateTextInputBBox:i=>{this.state.transition("updateTextInputBBox",i)},showAnnotationOptions:i=>{const o=this.annotations.at(i);!o||isEphemeralType(this.annotationData.at(i))||(this.optionsToolbar.updateButtons(this.annotationData.at(i)),this.optionsToolbar.show(),this.optionsToolbar.setAnchorScene(o))},showAnnotationSettings:(i,o,s="line")=>{const a=this.annotationData.at(i);if(!isLineType(a)&&!isChannelType(a)&&!isMeasurerType(a)||isEphemeralType(a))return;const n=c=>(h,d,u,p)=>{this.setColorAndDefault(a.type,c,h,d,u,p),this.optionsToolbar.updateColorPickerColor(c,d,u,p)},r=c=>()=>{this.recordActionAfterNextUpdate(`Change ${a.type} ${c} to ${a.getDefaultColor(c)}`,["annotations","defaults"]),this.update()},l={initialSelectedTab:s,ariaLabel:this.ctx.localeManager.t("ariaLabelAnnotationSettingsDialog"),sourceEvent:o,onChangeLine:c=>{this.state.transition("lineProps",c),c.bands!=null&&this.defaults.setDefaultFibonacciOptions(a.type,"bands",c.bands),c.reverse!=null&&this.defaults.setDefaultFibonacciOptions(a.type,"reverse",c.reverse),c.showFill!=null&&this.defaults.setDefaultFibonacciOptions(a.type,"showFill",c.showFill)},onChangeText:c=>{this.state.transition("lineText",c),c.alignment&&this.defaults.setDefaultLineTextAlignment(a.type,c.alignment),c.position&&this.defaults.setDefaultLineTextPosition(a.type,c.position),this.recordActionAfterNextUpdate(`Change ${a.type} text ${Object.entries(c).map(([h,d])=>`${h} to ${d}`).join(", ")}`)},onChangeFillColor:n("fill-color"),onChangeHideFillColor:r("fill-color"),onChangeLineColor:n("line-color"),onChangeHideLineColor:r("line-color"),onChangeLineStyleType:c=>{this.setLineStyleTypeAndDefault(a.type,c),this.optionsToolbar.updateLineStyleType(LINE_STYLE_TYPE_ITEMS.find(h=>h.value===c)??LINE_STYLE_TYPE_ITEMS[0])},onChangeLineStyleWidth:c=>{this.setLineStyleWidthAndDefault(a.type,c),this.optionsToolbar.updateStrokeWidth({strokeWidth:c,value:c,label:String(c)})},onChangeTextColor:n("text-color"),onChangeHideTextColor:r("text-color"),onChangeTextFontSize:c=>{this.setFontSizeAndDefault(a.type,c)}};this.settingsDialog.show(a,l)}})}setupListeners(){const{ctx:e,optionsToolbar:i,settingsDialog:o,toolbar:s}=this,{seriesWidget:a,seriesDragInterpreter:n,chartWidget:r}=e.widgets;this.destroyFns.push(n.addListener("click",this.hoverTouchPreHandler.bind(this)),n.addListener("drag-start",this.hoverTouchPreHandler.bind(this)),n.addListener("drag-move",this.dragMoveTouchPreHandler.bind(this)),n.addListener("mousemove",this.onHover.bind(this)),n.addListener("click",this.onClick.bind(this)),n.addListener("dblclick",this.onDoubleClick.bind(this)),n.addListener("drag-start",this.onDragStart.bind(this)),n.addListener("drag-move",this.onDrag.bind(this)),n.addListener("drag-end",this.onDragEnd.bind(this)),a.addListener("keydown",this.onKeyDown.bind(this)),a.addListener("keyup",this.onKeyUp.bind(this)),r.addListener("click",this.onCancel.bind(this)),e.annotationManager.addListener("restore-annotations",this.onRestoreAnnotations.bind(this)),e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)),e.updateService.addListener("pre-scene-render",this.onPreRender.bind(this)),e.zoomManager.addListener("zoom-change",()=>this.onResize()),e.domManager.addListener("resize",()=>this.onResize()),s.addListener("cancel-create-annotation",()=>{this.cancel(),this.reset(),this.update()}),s.addListener("pressed-create-annotation",({annotation:l})=>{this.cancel(),this.pushAnnotationState(InteractionState2.Annotations),this.state.transition(l),this.update()}),s.addListener("pressed-clear",()=>{this.clear(),this.recordActionAfterNextUpdate("Clear all")}),s.addListener("pressed-show-menu",()=>{this.cancel(),this.reset()}),s.addListener("pressed-unrelated",()=>{this.reset()}),i.addListener("pressed-delete",()=>{this.cancel(),this.delete(),this.reset()}),i.addListener("pressed-settings",({sourceEvent:l})=>{this.state.transition("toolbarPressSettings",l)}),i.addListener("pressed-lock",()=>{this.update()}),i.addListener("hid-overlays",()=>{this.settingsDialog.hide()}),i.addListener("saved-color",({type:l,colorPickerType:c,color:h})=>{this.recordActionAfterNextUpdate(`Change ${l} ${c} to ${h}`,["annotations","defaults"])}),i.addListener("updated-color",({type:l,colorPickerType:c,colorOpacity:h,color:d,opacity:u,isMultiColor:p})=>{this.setColorAndDefault(l,c,h,d,u,p)}),i.addListener("updated-font-size",({type:l,fontSize:c})=>{this.setFontSizeAndDefault(l,c)}),i.addListener("updated-line-style",({type:l,lineStyleType:c})=>{this.setLineStyleTypeAndDefault(l,c)}),i.addListener("updated-line-width",({type:l,strokeWidth:c})=>{this.setLineStyleWidthAndDefault(l,c)}),o.addListener("hidden",()=>{this.optionsToolbar.clearActiveButton()}))}setupDOM(){const{ctx:e,toolbar:i}=this;this.destroyFns.push(e.annotationManager.attachNode(this.container),()=>e.domManager.removeStyles(DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS),()=>i.destroy())}async processData(e){if(!this.enabled||this.data==null||this.xKey==null||this.volumeKey==null)return;const i=[keyProperty(this.xKey,void 0,{id:"date"}),valueProperty(this.volumeKey,"number",{id:"volume"})],{dataModel:o,processedData:s}=await e.request("annotations",this.data,{props:i});this.dataModel=o,this.processedData=s}createAnnotationScene(e){if(e.type in annotationConfigs)return new annotationConfigs[e.type].scene;throw new Error(`AG Charts - Cannot create annotation scene of type [${e.type}], expected one of [${Object.keys(annotationConfigs)}], ignoring.`)}static createAnnotationDatum(e){if(e.type in annotationConfigs)return new annotationConfigs[e.type].datum().set(e);throw new Error(`AG Charts - Cannot create annotation datum of unknown type [${e.type}], expected one of [${Object.keys(annotationConfigs)}], ignoring.`)}createAnnotation(e,i,o=!0){if(this.annotationData.push(i),o){const s=this.ctx.annotationManager.getAnnotationTypeStyles(e);s&&i.set(s),this.defaults.applyDefaults(i)}this.injectDatumDependencies(i),this.update()}injectDatumDependencies(e){"setLocaleManager"in e&&e.setLocaleManager(this.ctx.localeManager),"getVolume"in e&&(e.getVolume=this.getDatumRangeVolume.bind(this))}getDatumRangeVolume(e,i){const{dataModel:o,processedData:s}=this;let a=getGroupingValue(e).value,n=getGroupingValue(i).value;if(!isValidDate(a)||!isValidDate(n)||!o||!s||this.volumeKey==null)return;a>n&&([a,n]=[n,a]);const r=o.resolveKeysById({id:"annotations"},"date",s),l=o.resolveColumnById({id:"annotations"},"volume",s);let c=0;for(let h=0;h=a&&d<=n&&(c+=l[h])}return c}translateNode(e,i,o){const s=this.getAnnotationConfig(i),a=this.getAnnotationContext();a&&s.translate(e,i,o,a)}createAnnotationDatumCopy(e,i){const o=this.getAnnotationConfig(i),s=new o.datum;s.set(i.toJson());const a=this.getAnnotationContext();if(a)return o.copy(e,i,s,a)}getAnnotationConfig(e){if(e.type in annotationConfigs)return annotationConfigs[e.type];throw new Error(`AG Charts - Cannot get annotation config of unknown type [${e.type}], expected one of [${Object.keys(annotationConfigs)}], ignoring.`)}onRestoreAnnotations(e){this.enabled&&(this.clear(),this.annotationData.set(e.annotations),this.restoreAnnotations=!0,this.update())}onLayoutComplete(e){const i=e.series.paddedRect;this.seriesRect=i,this.container.setClipRect(i);for(const o of e.axes??[])o.direction===import_ag_charts_community98._ModuleSupport.ChartAxisDirection.X?this.xAxis=this.getAxis(o,i,this.xAxis?.button):this.yAxis=this.getAxis(o,i,this.yAxis?.button);this.showAnnotations()?this.animateAnnotations({from:0,to:1,phase:"trailing"}):this.animateAnnotations({from:1,to:0,phase:"remove"})}showAnnotations(){if(!this.yAxis||!this.xAxis)return!1;const e=this.ctx.chartService.series.some(s=>s.hasData),o=this.yAxis.context.seriesIds().some(s=>this.ctx.chartService.series.find(n=>n.id===s)?.visible);return e&&o}animateAnnotations({from:e,to:i,phase:o}){const{annotations:s}=this;this.ctx.animationManager?.animate({from:e,to:i,id:"chart-annotations",phase:o,groupId:"opacity",onUpdate(a){s.each(n=>{n.opacity=a,"setAxisLabelOpacity"in n&&n.setAxisLabelOpacity(a)})},onStop(){s.each(a=>{a.opacity=i,"setAxisLabelOpacity"in a&&a.setAxisLabelOpacity(i)})}})}onPreRender(){this.updateAnnotations(),this.state.transition("render")}getAxis(e,i,o){const s=this.ctx.axisManager.getAxisContext(e.direction)[0],{position:a="bottom",direction:n}=s,r=e.gridPadding+e.seriesAreaPadding,l=new BBox3(0,0,i.width,i.height).grow(r,a),c=s.direction===ChartAxisDirection11.X?"vertical":"horizontal",{axesButtons:h,snap:d}=this;if(this.enabled&&h.enabled&&(h.axes==="xy"||h.axes===n)){o??(o=new AxisButton(this.ctx,{...s,snapToGroup:d},g=>this.onAxisButtonClick(g,c),i));const p=calculateAxisLabelPadding(e);o.update(i,p)}else o?.destroy(),o=void 0;return{layout:e,context:s,bounds:l,button:o}}recordActionAfterNextUpdate(e,i=["annotations"]){const{defaults:o,ctx:{annotationManager:s,historyManager:a}}=this,n=i.map(r=>r==="defaults"?o:s);this.postUpdateFns.push(()=>{a.record(e,...n)})}setColorAndDefault(e,i,o,s,a,n){this.state.transition("color",{colorPickerType:i,colorOpacity:o,color:s,opacity:a,isMultiColor:n}),this.defaults.setDefaultColor(e,i,o,s,a,n)}setFontSizeAndDefault(e,i){this.state.transition("fontSize",i),this.defaults.setDefaultFontSize(e,i),this.recordActionAfterNextUpdate(`Change ${e} font size to ${i}`,["annotations","defaults"])}setLineStyleTypeAndDefault(e,i){this.state.transition("lineStyle",{type:i}),this.defaults.setDefaultLineStyleType(e,i),this.recordActionAfterNextUpdate(`Change ${e} line style to ${i}`,["annotations","defaults"])}setLineStyleWidthAndDefault(e,i){this.state.transition("lineStyle",{strokeWidth:i}),this.defaults.setDefaultLineStyleWidth(e,i),this.recordActionAfterNextUpdate(`Change ${e} stroke width to ${i}`,["annotations","defaults"])}updateAnnotations(){const{annotationData:e,annotations:i,seriesRect:o,ctx:{annotationManager:s}}=this,a=this.getAnnotationContext();if(!o||!a)return;s.updateData(e.toJson().filter(l=>!isEphemeralType(l)));const n=this.showAnnotations();this.toolbar.refreshButtonsEnabled(n),this.toolbar.toggleClearButtonEnabled(e.length>0&&n);const r=this.restoreAnnotations;i.update(e??[],void 0,l=>l.id).each((l,c)=>{if(!n||!this.validateDatum(c,r)){l.visible=!1,"setAxisLabelVisible"in l&&l.setAxisLabelVisible(!1);return}"setAxisLabelVisible"in l&&l.setAxisLabelVisible(!0),this.injectDatumDependencies(c),updateAnnotation(l,c,a)}),this.postUpdateFns.forEach(l=>l()),this.postUpdateFns=[],this.restoreAnnotations=!1}validateDatum(e,i){const o=this.getAnnotationContext(),s=i?`Annotation [${e.type}] `:void 0;return o?e.isValidWithContext(o,s):!0}getAnnotationContext(){const{seriesRect:e,xAxis:i,yAxis:o,snap:s}=this;if(e&&i&&o)return{seriesRect:e,xAxis:{...i.context,bounds:i.bounds,labelPadding:calculateAxisLabelPadding(i.layout),snapToGroup:s},yAxis:{...o.context,bounds:o.bounds,labelPadding:calculateAxisLabelPadding(i.layout),snapToGroup:s}}}onHover(e){const{state:i}=this,o=this.getAnnotationContext();if(!o)return;const s=e.sourceEvent.shiftKey,a=Vec219.from(e),n=invertCoords(a,o);i.transition("hover",{offset:a,point:n,shiftKey:s,context:o})}onClick(e){const{state:i}=this,o=this.getAnnotationContext();if(!o)return;const s=e.sourceEvent.shiftKey,a=invertCoords(Vec219.from(e),o),n=this.textInput.getValue(),r=this.textInput.getBBox();i.transition("click",{point:a,shiftKey:s,textInputValue:n,bbox:r})}onDoubleClick(e){const{state:i}=this;if(!this.getAnnotationContext())return;const s=Vec219.from(e);i.transition("dblclick",{offset:s})}onAxisButtonClick(e,i){this.cancel(),this.reset();const o=this.getAnnotationContext();if(!this.annotationData||!o)return;const{state:s}=this;this.pushAnnotationState(InteractionState2.Annotations);const a=i==="horizontal";if(s.transition(a?"horizontal-line":"vertical-line"),this.optionsToolbar.hide(),!e)return;const n=invertCoords(e,o);validateDatumPoint(o,n)&&(s.transition("click",{point:n,shiftKey:!1}),this.update())}onResize(){const e=this.textInput.getValue(),i=this.textInput.getBBox();this.state.transition("resize",{textInputValue:e,bbox:i})}hoverTouchPreHandler(e){e.device==="touch"&&this.onHover(e)}dragMoveTouchPreHandler(e){e.device==="touch"&&this.ctx.interactionManager.isState(InteractionState2.AnnotationsSelected)&&e.sourceEvent.preventDefault()}onDragStart(e){if(!this.ctx.interactionManager.isState(InteractionState2.AnnotationsDraggable))return;const i=this.getAnnotationContext();if(!i)return;const o=Vec219.from(e),s=invertCoords(o,i),a=this.textInput.getValue(),n=this.textInput.getBBox();this.state.transition("dragStart",{context:i,offset:o,point:s,textInputValue:a,bbox:n})}onDrag(e){if(!this.ctx.interactionManager.isState(InteractionState2.AnnotationsDraggable))return;const i=this.getAnnotationContext();if(!i)return;const o=Vec219.from(e),s=invertCoords(o,i),a=e.sourceEvent.shiftKey,n=this.textInput.getValue(),r=this.textInput.getBBox();this.state.transition("drag",{context:i,offset:o,point:s,shiftKey:a,textInputValue:n,bbox:r})}onDragEnd(){this.state.transition("dragEnd")}onCancel(e){const{sourceEvent:i}=e??{};i?.currentTarget===i?.target&&(this.cancel(),this.reset())}onDelete(){this.textInput.isVisible()||(this.cancel(),this.delete(),this.reset(),this.update())}onTextInput(e){const{state:i}=this,o=this.getAnnotationContext();if(!o)return;const{key:s,shiftKey:a}=e,n=this.textInput.getValue(),r=this.textInput.getBBox();i.transition("textInput",{key:s,shiftKey:a,textInputValue:n,bbox:r,context:o})}onKeyDown(e){const{state:i}=this,o=this.getAnnotationContext();if(!o)return;const{sourceEvent:s}=e,{shiftKey:a,ctrlKey:n,metaKey:r}=s,l=n||r,c=n||a;this.state.transition("keyDown",{shiftKey:a,context:o});const h={x:0,y:0},d=Math.max(o?.xAxis.scale.bandwidth??0,c?10:1),u=Math.max(o?.yAxis.scale.bandwidth??0,c?10:1);switch(s.key){case"ArrowDown":h.y=u;break;case"ArrowUp":h.y=-u;break;case"ArrowLeft":h.x=-d;break;case"ArrowRight":h.x=d;break;case"Escape":this.onCancel();return;case"Backspace":case"Delete":this.onDelete();return}if((h.x||h.y)&&(i.transition("translate",{translation:h}),s.stopPropagation(),s.preventDefault()),!!l)switch(s.key){case"c":i.transition("copy");return;case"x":i.transition("cut"),this.recordActionAfterNextUpdate("Cut annotation");return;case"v":i.transition("paste"),this.recordActionAfterNextUpdate("Paste annotation");return}}onKeyUp(e){const{shiftKey:i}=e.sourceEvent,o=this.getAnnotationContext();o&&(this.state.transition("keyUp",{shiftKey:i,context:o}),this.state.transition("translateEnd"))}clear(){this.cancel(),this.deleteAll(),this.reset()}reset(){this.state.transition("reset")}cancel(){this.state.transition("cancel")}delete(){this.state.transition("delete")}deleteAll(){this.state.transition("deleteAll")}deleteEphemeralAnnotations(){for(const[e,i]of this.annotationData.entries())isEphemeralType(i)&&this.annotationData.splice(e,1)}hideOverlays(){this.settingsDialog.hide(),this.toolbar.hideOverlays(),this.optionsToolbar.hideOverlays()}pushAnnotationState(e){this.ctx.interactionManager.pushState(e),this.ctx.tooltipManager.suppressTooltip("annotations")}popAnnotationState(e){this.ctx.interactionManager.popState(e),this.ctx.tooltipManager.unsuppressTooltip("annotations")}isAnnotationState(){return this.ctx.interactionManager.isState(InteractionState2.Annotations)||this.ctx.interactionManager.isState(InteractionState2.AnnotationsSelected)}update(e=ChartUpdateType.PRE_SCENE_RENDER){this.ctx.updateService.update(e)}};__decorateClass([ObserveChanges2((t,e,i)=>{const{ctx:{annotationManager:o,stateManager:s}}=t;e!==i&&(t.toolbar?.toggleVisibility(!!e),i===!1&&e===!0?s.restoreState(o):e===!1&&t.clear())}),Validate32(BOOLEAN11)],_Annotations.prototype,"enabled",2),__decorateClass([Validate32(OBJECT14)],_Annotations.prototype,"toolbar",2),__decorateClass([Validate32(OBJECT14)],_Annotations.prototype,"optionsToolbar",2),__decorateClass([Validate32(OBJECT14)],_Annotations.prototype,"axesButtons",2),__decorateClass([Validate32(BOOLEAN11)],_Annotations.prototype,"snap",2);var Annotations=_Annotations,import_ag_charts_community99=require("ag-charts-community"),{FONT_SIZE_RATIO,ThemeSymbols}=import_ag_charts_community99._ModuleSupport,stroke={stroke:{$ref:"foregroundColor"},strokeOpacity:1,strokeWidth:2},handle={fill:ThemeSymbols.DEFAULT_ANNOTATION_HANDLE_FILL,strokeOpacity:1,strokeWidth:2},font={color:{$ref:"backgroundColor"},fontSize:{$rem:[FONT_SIZE_RATIO.LARGE]},fontFamily:{$ref:"fontFamily"}},axisLabel={...font,enabled:!0,fill:{$ref:"foregroundColor"},fontSize:{$ref:"fontSize"}},text={...font,textAlign:"left"},lineText={...font,position:"top",alignment:"center",color:{$ref:"textColor"}},channelText={...font,position:"top",alignment:"center",color:{$ref:"textColor"}},measurerStatistics={...font,fontSize:{$ref:"fontSize"},color:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_COLOR,fill:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_FILL,stroke:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_STROKE,strokeWidth:1,divider:{stroke:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,strokeWidth:1,strokeOpacity:.5}},measurer={...stroke,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...handle},text:{...lineText},statistics:{...measurerStatistics}},toolbar={buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}],padding:{$ref:"padding"}},optionsToolbar={buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextColor",value:"text-color"},{icon:"line-color",tooltip:"toolbarAnnotationsLineColor",value:"line-color"},{icon:"fill-color",tooltip:"toolbarAnnotationsFillColor",value:"fill-color"},{tooltip:"toolbarAnnotationsTextSize",value:"text-size"},{tooltip:"toolbarAnnotationsLineStrokeWidth",value:"line-stroke-width"},{icon:"line-style-solid",tooltip:"toolbarAnnotationsLineStyle",value:"line-style-type"},{icon:"settings",tooltip:"toolbarAnnotationsSettings",value:"settings"},{icon:"unlocked",tooltip:"toolbarAnnotationsLock",ariaLabel:"toolbarAnnotationsLock",checkedOverrides:{icon:"locked",tooltip:"toolbarAnnotationsUnlock"},value:"lock"},{icon:"delete",tooltip:"toolbarAnnotationsDelete",value:"delete"}]},annotationsTheme={enabled:!1,line:{...stroke,handle:{...handle},text:{...lineText}},"horizontal-line":{...stroke,handle:{...handle},axisLabel:{...axisLabel},text:{...lineText}},"vertical-line":{...stroke,handle:{...handle},axisLabel:{...axisLabel},text:{...lineText}},"disjoint-channel":{...stroke,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...handle},text:{...channelText}},"parallel-channel":{...stroke,middle:{lineDash:[6,5],strokeWidth:1},background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...handle},text:{...channelText}},"fibonacci-retracement":{...stroke,strokes:ThemeSymbols.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...handle},text:{...lineText,position:"center"},label:{...font,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},"fibonacci-retracement-trend-based":{...stroke,strokes:ThemeSymbols.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...handle},text:{...lineText,position:"center"},label:{...font,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},callout:{...stroke,...text,color:{$ref:"textColor"},handle:{...handle},fill:{$ref:"foregroundColor"},fillOpacity:.075},comment:{...text,fontWeight:700,handle:{...handle},fill:{$ref:"foregroundColor"}},note:{...text,color:ThemeSymbols.DEFAULT_TEXTBOX_COLOR,fill:ThemeSymbols.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,stroke:{$ref:"backgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...handle},background:{fill:ThemeSymbols.DEFAULT_TEXTBOX_FILL,stroke:ThemeSymbols.DEFAULT_TEXTBOX_STROKE,strokeWidth:1}},text:{...text,color:{$ref:"textColor"},handle:{...handle}},arrow:{...stroke,handle:{...handle},text:{...lineText}},"arrow-up":{fill:ThemeSymbols.PALETTE_UP_FILL,handle:{...handle,stroke:{$ref:"foregroundColor"}}},"arrow-down":{fill:ThemeSymbols.PALETTE_DOWN_FILL,handle:{...handle,stroke:{$ref:"foregroundColor"}}},"date-range":{...measurer},"price-range":{...measurer},"date-price-range":{...measurer},"quick-date-price-range":{up:{...stroke,fill:ThemeSymbols.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,fillOpacity:.2,handle:{...handle},statistics:{...measurerStatistics,color:"#fff",fill:ThemeSymbols.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...stroke,stroke:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,fill:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,fillOpacity:.2,handle:{...handle,stroke:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE},statistics:{...measurerStatistics,color:"#fff",fill:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{},toolbar,optionsToolbar},AnnotationsModule={type:"root",optionsKey:"annotations",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Annotations(t),themeTemplate:{annotations:annotationsTheme}},import_ag_charts_community101=require("ag-charts-community"),import_ag_charts_community100=require("ag-charts-community"),{BaseProperties:BaseProperties12,ObserveChanges:ObserveChanges3,ProxyProperty,Validate:Validate33,NUMBER:NUMBER9,POSITIVE_NUMBER:POSITIVE_NUMBER6,RATIO:RATIO5,calculatePlacement,createElement:createElement3}=import_ag_charts_community100._ModuleSupport,Image=class extends BaseProperties12{constructor(){super(),this.opacity=1,this.loadedSynchronously=!0,this.containerWidth=0,this.containerHeight=0,this.onLoad=void 0,this.onImageLoad=()=>{this.loadedSynchronously||(this.node.visible=!1,this.performLayout(this.containerWidth,this.containerHeight),this.onLoad?.())},this.imageElement=createElement3("img"),this.imageElement.onload=this.onImageLoad,this.node=new import_ag_charts_community100._ModuleSupport.Image(this.imageElement)}get complete(){return this.imageElement.width>0&&this.imageElement.height>0}performLayout(t,e){this.containerWidth=t,this.containerHeight=e;const i={width:t,height:e},o=calculatePlacement(this.imageElement.width,this.imageElement.height,i,this);return this.node.setProperties(this.complete?{visible:!0,opacity:this.opacity,...o}:{visible:!1}),o}};__decorateClass([Validate33(NUMBER9,{optional:!0})],Image.prototype,"top",2),__decorateClass([Validate33(NUMBER9,{optional:!0})],Image.prototype,"right",2),__decorateClass([Validate33(NUMBER9,{optional:!0})],Image.prototype,"bottom",2),__decorateClass([Validate33(NUMBER9,{optional:!0})],Image.prototype,"left",2),__decorateClass([Validate33(POSITIVE_NUMBER6,{optional:!0})],Image.prototype,"width",2),__decorateClass([Validate33(POSITIVE_NUMBER6,{optional:!0})],Image.prototype,"height",2),__decorateClass([Validate33(RATIO5)],Image.prototype,"opacity",2),__decorateClass([ProxyProperty("imageElement.src"),ObserveChanges3(t=>t.loadedSynchronously=t.complete)],Image.prototype,"url",2);var{ActionOnSet:ActionOnSet3,OBJECT:OBJECT15,Validate:Validate34}=import_ag_charts_community101._ModuleSupport,Background2=class extends import_ag_charts_community101._ModuleSupport.Background{constructor(){super(...arguments),this.image=new Image}onLayoutComplete(t){if(super.onLayoutComplete(t),this.image){const{width:e,height:i}=t.chart;this.image.performLayout(e,i)}}onImageLoad(){this.ctx.updateService.update(import_ag_charts_community101._ModuleSupport.ChartUpdateType.SCENE_RENDER)}};__decorateClass([Validate34(OBJECT15,{optional:!0}),ActionOnSet3({newValue(t){this.node.appendChild(t.node),t.onLoad=()=>this.onImageLoad()},oldValue(t){this.node.removeChild(t.node),t.onLoad=void 0}})],Background2.prototype,"image",2);var BackgroundModule={type:"root",optionsKey:"background",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new Background2(t)},import_ag_charts_community103=require("ag-charts-community"),import_ag_charts_community102=require("ag-charts-community"),{BOOLEAN:BOOLEAN12,ActionOnSet:ActionOnSet4,LayoutElement:LayoutElement2,Menu:Menu3,Validate:Validate35}=import_ag_charts_community102._ModuleSupport,menuItems=[{label:"toolbarSeriesTypeOHLC",icon:"ohlc-series",value:"ohlc"},{label:"toolbarSeriesTypeCandles",icon:"candlestick-series",value:"candlestick"},{label:"toolbarSeriesTypeHollowCandles",icon:"hollow-candlestick-series",value:"hollow-candlestick"},{label:"toolbarSeriesTypeLine",icon:"line-series",value:"line"},{label:"toolbarSeriesTypeStepLine",icon:"step-line-series",value:"step-line"},{label:"toolbarSeriesTypeHLC",icon:"hlc-series",value:"hlc"},{label:"toolbarSeriesTypeHighLow",icon:"high-low-series",value:"high-low"}],ChartToolbar=class extends import_ag_charts_community102._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.menu=new Menu3(this.ctx,"chart-toolbar"),this.toolbar=t.sharedToolbar.getSharedToolbar("chartToolbar"),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPressed.bind(this)),t.layoutManager.registerElement(LayoutElement2.ToolbarLeft,this.onLayoutStart.bind(this)),()=>this.toolbar.destroy())}onLayoutStart(t){this.enabled&&(this.updateButton(),this.toolbar.layout(t.layoutBox))}onButtonPressed({event:t,buttonBounds:e}){this.menu.setAnchor({x:e.x+e.width+6,y:e.y}),this.menu.show({items:menuItems,menuItemRole:"menuitemradio",ariaLabel:this.ctx.localeManager.t("toolbarSeriesTypeDropdown"),class:"ag-charts-chart-toolbar__menu",value:this.getChartType(),sourceEvent:t.sourceEvent,onPress:i=>{this.setChartType(i.value),this.hidePopover()},onHide:()=>{this.toolbar.clearActiveButton()}}),this.toolbar.toggleActiveButtonByIndex(0)}updateButton(){const t=this.getChartType(),e=menuItems.find(i=>i.value===t)?.icon;e!=null&&this.toolbar.updateButtons([{icon:e,tooltip:"toolbarSeriesTypeDropdown"}])}hidePopover(){this.toolbar.clearActiveButton(),this.menu.hide()}setChartType(t){const e={chartType:t};this.ctx.chartService.publicApi?.updateDelta(e).catch(i=>logger_exports.error(i))}getChartType(){const t=this.ctx.chartService.publicApi?.getOptions()?.chartType;return t==null||!menuItems.some(e=>e.value===t)?"candlestick":t}};__decorateClass([Validate35(BOOLEAN12),ActionOnSet4({changeValue(t){this.toolbar?.setHidden(!t)}})],ChartToolbar.prototype,"enabled",2);var ChartToolbarModule={type:"root",optionsKey:"chartToolbar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new ChartToolbar(t)},import_ag_charts_community105=require("ag-charts-community"),import_ag_charts_community104=require("ag-charts-community"),DEFAULT_CONTEXT_MENU_CLASS="ag-charts-context-menu",DEFAULT_CONTEXT_MENU_DARK_CLASS="ag-charts-dark-context-menu",{BOOLEAN:BOOLEAN13,Validate:Validate36,initMenuKeyNav,makeAccessibleClickListener,ContextMenuRegistry,createElement:createElement4}=import_ag_charts_community104._ModuleSupport,moduleId2="context-menu";function getChildrenOfType(t,e){const{children:i}=t??{};if(!i)return[];const o=[];for(const s of Array.from(i))s instanceof e&&o.push(s);return o}var ContextMenu=class extends import_ag_charts_community104._ModuleSupport.BaseModuleInstance{constructor(t){if(super(),this.ctx=t,this.enabled=!0,this.darkTheme=!1,this.extraActions=[],this.extraNodeActions=[],this.extraSeriesAreaActions=[],this.extraLegendItemActions=[],this.pickedNode=void 0,this.showEvent=void 0,this.x=0,this.y=0,this.interactionManager=t.interactionManager,this.registry=t.contextMenuRegistry,this.groups={default:[],extra:[],extraSeriesArea:[],extraNode:[],extraLegendItem:[]},this.element=t.domManager.addChild("canvas-overlay",moduleId2),this.element.classList.add(DEFAULT_CONTEXT_MENU_CLASS),this.element.addEventListener("contextmenu",e=>e.preventDefault()),this.destroyFns.push(()=>this.element.parentNode?.removeChild(this.element)),this.doClose(),this.destroyFns.push(t.domManager.addListener("hidden",()=>this.hide())),typeof MutationObserver<"u"){const e=new MutationObserver(()=>{this.menuElement&&this.element.contains(this.menuElement)&&this.reposition()});e.observe(this.element,{childList:!0}),this.mutationObserver=e,this.destroyFns.push(()=>e.disconnect())}this.destroyFns.push(this.registry.registerDefaultAction({id:"download",type:"all",label:"contextMenuDownload",action:()=>{const e=t.chartService.title;let i="image";e?.enabled&&e?.text!==void 0&&(i=e.text.replace(/\.+/,"")),this.ctx.chartService.publicApi?.download({fileName:i}).catch(o=>{logger_exports.error("Unable to download chart",o)})}})),this.destroyFns.push(this.registry.addListener(e=>this.onContext(e)))}onContext(t){if(!this.enabled)return;t.sourceEvent.preventDefault(),this.showEvent=t.sourceEvent,this.x=t.x,this.y=t.y,this.groups.default=this.registry.filterActions(t.type);for(const r of this.groups.default)r.id==null||r.toggleEnabledOnShow==null||(r.toggleEnabledOnShow(t)?this.registry.enableAction(r.id):this.registry.disableAction(r.id));this.pickedNode=void 0,this.pickedLegendItem=void 0,this.groups.extra=this.extraActions.map(({label:r,action:l})=>({type:"all",label:r,action:l})),this.groups.extraSeriesArea=[],this.groups.extraNode=[],ContextMenuRegistry.check("series-area",t)&&(this.pickedNode=t.context.pickedNode,this.groups.extraSeriesArea=this.extraSeriesAreaActions.map(({label:r,action:l})=>({type:"series-area",label:r,action:l})),this.pickedNode&&(this.groups.extraNode=this.extraNodeActions.map(({label:r,action:l})=>({type:"node",label:r,action:l})))),this.groups.extraLegendItem=[],ContextMenuRegistry.check("legend",t)&&(this.pickedLegendItem=t.context.legendItem,this.pickedLegendItem&&(this.groups.extraLegendItem=this.extraLegendItemActions.map(({label:r,action:l})=>({type:"legend",label:r,action:l}))));const{default:e,extra:i,extraSeriesArea:o,extraNode:s,extraLegendItem:a}=this.groups;[e,i,o,s,a].reduce((r,l)=>l.length+r,0)!==0&&this.show(t.sourceEvent)}show(t){this.interactionManager.pushState(import_ag_charts_community104._ModuleSupport.InteractionState.ContextMenu),this.element.classList.toggle(DEFAULT_CONTEXT_MENU_DARK_CLASS,this.darkTheme);const e=this.renderMenu();this.menuCloser?.close(),this.menuElement?this.element.replaceChild(e,this.menuElement):this.element.appendChild(e),this.menuElement=e,this.element.style.display="block";const i=t.pointerType==="touch"?!1:void 0,o=getChildrenOfType(e,HTMLButtonElement);this.menuCloser=initMenuKeyNav({menu:e,buttons:o,orientation:"vertical",sourceEvent:t,overrideFocusVisible:i,autoCloseOnBlur:!0,closeCallback:()=>this.doClose()}),t.pointerType==="touch"&&this.ctx.chartService.overrideFocusVisible(!1)}hide(){this.menuCloser?.close()}doClose(){this.interactionManager.popState(import_ag_charts_community104._ModuleSupport.InteractionState.ContextMenu),this.menuElement&&(this.element.removeChild(this.menuElement),this.menuElement=void 0,this.menuCloser=void 0),this.element.style.display="none"}renderMenu(){const t=createElement4("div");return t.classList.add(`${DEFAULT_CONTEXT_MENU_CLASS}__menu`),t.classList.toggle(DEFAULT_CONTEXT_MENU_DARK_CLASS,this.darkTheme),t.role="menu",this.appendMenuGroup(t,this.groups.default,!1),this.appendMenuGroup(t,this.groups.extra),this.appendMenuGroup(t,this.groups.extraSeriesArea),this.pickedNode&&this.appendMenuGroup(t,this.groups.extraNode),this.pickedLegendItem&&this.appendMenuGroup(t,this.groups.extraLegendItem),t}appendMenuGroup(t,e,i=!0){e.length!==0&&(i&&t.appendChild(this.createDividerElement()),e.forEach(o=>{const s=this.renderItem(o);s&&t.appendChild(s)}))}renderItem(t){if(t&&typeof t=="object"&&t.constructor===Object)return this.createActionElement(t)}createDividerElement(){const t=createElement4("div");return t.classList.add(`${DEFAULT_CONTEXT_MENU_CLASS}__divider`),t.classList.toggle(DEFAULT_CONTEXT_MENU_DARK_CLASS,this.darkTheme),t.role="separator",t}createActionElement({id:t,label:e,type:i,action:o}){const s=!!(t&&this.registry.isDisabled(t));return this.createButtonElement(i,e,o,s)}createButtonOnClick(t,e){return ContextMenuRegistry.checkCallback("legend",t,e)?i=>{if(this.pickedLegendItem){const{seriesId:o,itemId:s}=this.pickedLegendItem;e({type:"contextmenu",seriesId:o,itemId:s,event:i}),this.hide()}}:ContextMenuRegistry.checkCallback("series-area",t,e)?()=>{e({type:"seriesContextMenuAction",event:this.showEvent}),this.hide()}:ContextMenuRegistry.checkCallback("node",t,e)?()=>{const{pickedNode:i,showEvent:o}=this,s=i?.series.createNodeContextMenuActionEvent(o,i);s?e(s):logger_exports.error("series node not found"),this.hide()}:()=>{e({type:"contextMenuEvent",event:this.showEvent}),this.hide()}}createButtonElement(t,e,i,o){const s=createElement4("button");return s.classList.add(`${DEFAULT_CONTEXT_MENU_CLASS}__item`),s.classList.toggle(DEFAULT_CONTEXT_MENU_DARK_CLASS,this.darkTheme),s.ariaDisabled=o.toString(),s.textContent=this.ctx.localeManager.t(e),s.role="menuitem",s.onclick=makeAccessibleClickListener(s,this.createButtonOnClick(t,i)),s.addEventListener("mouseover",()=>s.focus({preventScroll:!0})),s}reposition(){let{x:t,y:e}=this;this.element.style.top="unset",this.element.style.bottom="unset";const i=this.ctx.domManager.getBoundingClientRect(),{offsetWidth:o,offsetHeight:s}=this.element;t=import_ag_charts_community104._ModuleSupport.clamp(0,t,i.width-o),e=import_ag_charts_community104._ModuleSupport.clamp(0,e,i.height-s),this.element.style.left=`${t}px`,this.element.style.top=`calc(${e}px - 0.5em)`}destroy(){super.destroy(),this.mutationObserver?.disconnect(),this.ctx.domManager.removeStyles(moduleId2),this.ctx.domManager.removeChild("canvas-overlay",moduleId2)}};__decorateClass([Validate36(BOOLEAN13)],ContextMenu.prototype,"enabled",2),__decorateClass([Validate36(BOOLEAN13)],ContextMenu.prototype,"darkTheme",2);var ContextMenuModule={type:"root",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsKey:"contextMenu",moduleFactory:t=>new ContextMenu(t),themeTemplate:{contextMenu:{enabled:!0,darkTheme:import_ag_charts_community105._ModuleSupport.ThemeSymbols.IS_DARK_THEME}}},import_ag_charts_community108=require("ag-charts-community"),import_ag_charts_community107=require("ag-charts-community"),import_ag_charts_community106=require("ag-charts-community"),{BaseProperties:BaseProperties13,BOOLEAN:BOOLEAN14,FUNCTION:FUNCTION2,NUMBER:NUMBER10,STRING:STRING19,Validate:Validate37,createId:createId2,setAttribute:setAttribute2}=import_ag_charts_community106._ModuleSupport,DEFAULT_LABEL_CLASS="ag-charts-crosshair-label",CrosshairLabelProperties=class extends import_ag_charts_community106._ModuleSupport.ChangeDetectableProperties{constructor(){super(...arguments),this.enabled=!0,this.xOffset=0,this.yOffset=0,this.format=void 0,this.renderer=void 0}};__decorateClass([Validate37(BOOLEAN14)],CrosshairLabelProperties.prototype,"enabled",2),__decorateClass([Validate37(NUMBER10)],CrosshairLabelProperties.prototype,"xOffset",2),__decorateClass([Validate37(NUMBER10)],CrosshairLabelProperties.prototype,"yOffset",2),__decorateClass([Validate37(STRING19,{optional:!0})],CrosshairLabelProperties.prototype,"format",2),__decorateClass([Validate37(FUNCTION2,{optional:!0})],CrosshairLabelProperties.prototype,"renderer",2);var CrosshairLabel=class extends BaseProperties13{constructor(t,e,i){super(),this.domManager=t,this.id=createId2(this),this.enabled=!0,this.xOffset=0,this.yOffset=0,this.renderer=void 0,this.element=t.addChild("canvas-overlay",`crosshair-label-${this.id}`),this.element.classList.add(DEFAULT_LABEL_CLASS),setAttribute2(this.element,"aria-hidden",!0),this.element.setAttribute("data-key",e),this.element.setAttribute("data-axis-id",i)}show(t){const{element:e}=this,i=t.x+this.xOffset,o=t.y+this.yOffset;e.style.top=`${Math.round(o)}px`,e.style.left=`${Math.round(i)}px`,this.toggle(!0)}setLabelHtml(t){t!==void 0&&(this.element.innerHTML=t)}getBBox(){const{element:t}=this;return new import_ag_charts_community106._ModuleSupport.BBox(t.clientLeft,t.clientTop,t.clientWidth,t.clientHeight)}toggle(t){this.element.classList.toggle("ag-charts-crosshair-label--hidden",!t)}destroy(){this.domManager.removeChild("canvas-overlay",`crosshair-label-${this.id}`)}toLabelHtml(t,e){if(typeof t=="string")return t;e=e??{};const{text:i=e.text??"",color:o=e.color,backgroundColor:s=e.backgroundColor,opacity:a=e.opacity??1}=t;return`
${i}
`}};__decorateClass([Validate37(BOOLEAN14)],CrosshairLabel.prototype,"enabled",2),__decorateClass([Validate37(NUMBER10)],CrosshairLabel.prototype,"xOffset",2),__decorateClass([Validate37(NUMBER10)],CrosshairLabel.prototype,"yOffset",2),__decorateClass([Validate37(STRING19,{optional:!0})],CrosshairLabel.prototype,"format",2),__decorateClass([Validate37(FUNCTION2,{optional:!0})],CrosshairLabel.prototype,"renderer",2);var{Group:Group5,TranslatableGroup,Line:Line3,BBox:BBox4,createId:createId3,POSITIVE_NUMBER:POSITIVE_NUMBER7,RATIO:RATIO6,BOOLEAN:BOOLEAN15,COLOR_STRING:COLOR_STRING4,LINE_DASH:LINE_DASH3,OBJECT:OBJECT16,InteractionState:InteractionState3,Validate:Validate38,ZIndexMap:ZIndexMap4,formatNumber,isInteger,ChartAxisDirection:ChartAxisDirection12}=import_ag_charts_community107._ModuleSupport,Crosshair=class extends import_ag_charts_community107._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.id=createId3(this),this.enabled=!1,this.stroke="rgb(195, 195, 195)",this.lineDash=[6,3],this.lineDashOffset=0,this.strokeWidth=1,this.strokeOpacity=1,this.snap=!0,this.label=new CrosshairLabelProperties,this.seriesRect=new BBox4(0,0,0,0),this.bounds=new BBox4(0,0,0,0),this.crosshairGroup=new TranslatableGroup({name:"crosshairs",zIndex:ZIndexMap4.SERIES_CROSSHAIR}),this.lineGroup=this.crosshairGroup.appendChild(new Group5({name:`${this.id}-crosshair-lines`,zIndex:ZIndexMap4.SERIES_CROSSHAIR})),this.lineGroupSelection=import_ag_charts_community107._ModuleSupport.Selection.select(this.lineGroup,Line3,!1),this.activeHighlight=void 0,this.axisCtx=t.parent,this.labels={},this.hideCrosshairs(),t.domManager.addEventListener("focusin",({target:e})=>{const i=e instanceof HTMLElement&&t.domManager.contains(e,"series-area");this.crosshairGroup.visible&&!i&&(this.hideCrosshairs(),this.ctx.updateService.update(import_ag_charts_community107._ModuleSupport.ChartUpdateType.PERFORM_LAYOUT))}),this.destroyFns.push(t.scene.attachNode(this.crosshairGroup),t.widgets.seriesWidget.addListener("mousemove",e=>this.onMouseHoverLike(e)),t.widgets.seriesWidget.addListener("drag-move",e=>this.onMouseHoverLike(e)),t.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseOut()),t.widgets.seriesDragInterpreter.addListener("click",e=>this.onClick(e)),t.chartEventManager.addListener("series-focus-change",()=>this.onKeyPress()),t.zoomManager.addListener("zoom-pan-start",()=>this.onMouseOut()),t.zoomManager.addListener("zoom-change",()=>this.onMouseOut()),t.highlightManager.addListener("highlight-change",e=>this.onHighlightChange(e)),t.layoutManager.addListener("layout:complete",e=>this.layout(e)),()=>Object.entries(this.labels).forEach(([e,i])=>i.destroy()))}layout({series:{rect:t,visible:e},axes:i}){if(!e||!i||!this.enabled)return;this.seriesRect=t;const{position:o="left",axisId:s}=this.axisCtx,a=i.find(c=>c.id===s);if(!a)return;this.axisLayout=a,this.bounds=t.clone().grow(a.gridPadding+a.seriesAreaPadding,o);const{crosshairGroup:n,bounds:r}=this;n.translationX=Math.round(r.x),n.translationY=Math.round(r.y);const l=["pointer",...this.axisCtx.seriesKeyProperties()];this.updateSelections(l),this.updateLines(),this.updateLabels(l)}updateSelections(t){this.lineGroupSelection.update(t,e=>e.append(new Line3),e=>e)}updateLabels(t){const{labels:e,ctx:i}=this;for(const o of t)this.label.enabled&&(e[o]??(e[o]=new CrosshairLabel(i.domManager,o,this.axisCtx.axisId))),e[o]&&this.updateLabel(e[o]);this.labelFormatter=this.axisCtx.scaleValueFormatter(this.label.format)}updateLabel(t){const{enabled:e,xOffset:i,yOffset:o,format:s,renderer:a}=this.label;t.enabled=e,t.xOffset=i,t.yOffset=o,t.format=s,t.renderer=a}updateLines(){const{lineGroupSelection:t,bounds:e,stroke:i,strokeWidth:o,strokeOpacity:s,lineDash:a,lineDashOffset:n,axisLayout:r}=this;if(!r)return;const l=this.isVertical();t.each(c=>{c.stroke=i,c.strokeWidth=o,c.strokeOpacity=s,c.lineDash=a,c.lineDashOffset=n,c.y1=0,c.y2=l?e.height:0,c.x1=0,c.x2=l?0:e.width})}isVertical(){return this.axisCtx.direction===ChartAxisDirection12.X}isHover(t){return t.type==="mousemove"||t.type==="click"||t.device==="touch"&&this.ctx.chartService.touch.dragAction==="hover"}formatValue(t){const{labelFormatter:e,axisLayout:i,ctx:{callbackCache:o}}=this;if(e){const s=o.call(e,t);if(s!=null)return s}if(typeof t=="number"){const s=(i?.label.fractionDigits??0)+(isInteger(t)?0:1);return formatNumber(t,s)}return String(t??"")}onClick(t){t.device==="touch"&&this.onMouseHoverLike(t)}onMouseHoverLike(t){if(!this.enabled||this.snap)return;const e=this.isHover(t)?InteractionState3.Clickable:InteractionState3.AnnotationsMoveable;this.ctx.interactionManager.isState(e)&&(this.updatePositions(this.getData(t)),this.crosshairGroup.visible=!0,this.ctx.updateService.update(import_ag_charts_community107._ModuleSupport.ChartUpdateType.SCENE_RENDER))}onMouseOut(){this.ctx.interactionManager.isState(InteractionState3.Clickable)&&(this.hideCrosshairs(),this.ctx.updateService.update(import_ag_charts_community107._ModuleSupport.ChartUpdateType.SCENE_RENDER))}onKeyPress(){this.enabled&&!this.snap&&this.ctx.interactionManager.isState(InteractionState3.Default)&&this.hideCrosshairs()}onHighlightChange(t){if(!this.enabled)return;const{crosshairGroup:e,axisCtx:i}=this,{datum:o,series:s}=t.currentHighlight??{},a=o&&(s?.axes.x?.id===i.axisId||s?.axes.y?.id===i.axisId);if(this.activeHighlight=a?t.currentHighlight:void 0,!this.activeHighlight)this.hideCrosshairs();else if(this.snap){const n=this.getActiveHighlightData(this.activeHighlight);this.updatePositions(n),e.visible=!0}}isInRange(t){return this.axisCtx.inRange(t)}updatePositions(t){const{seriesRect:e,lineGroupSelection:i}=this;i.each((o,s)=>{const a=t[s];if(!a){o.visible=!1,this.hideLabel(s);return}o.visible=!0;const{value:n,position:r}=a;let l=0,c=0;this.isVertical()?(l=r,o.x=Math.round(l)):(c=r,o.y=Math.round(c)),this.label.enabled?this.showLabel(l+e.x,c+e.y,n,s):this.hideLabel(s)})}getData(t){const{axisCtx:e}=this,i="pointer",{datum:o,xKey:s="",yKey:a=""}=this.activeHighlight??{},{currentX:n,currentY:r}=t,l=this.isVertical(),c=l?n:r;let h=o?.[l?s:a]??"";return e.continuous&&(h=e.scaleInvert(c)),{[i]:{position:c,value:h}}}getActiveHighlightData(t){const{axisCtx:e}=this,{datum:i,series:o,xKey:s="",aggregatedValue:a,cumulativeValue:n,midPoint:r}=t,l=o.getKeyProperties(e.direction),c=(e.scale.bandwidth??0)/2,h=o.axes[e.direction]?.id===e.axisId,d=l.indexOf("yKey")>-1&&h,u=l.indexOf("xKey")>-1&&h,p=a??n;if(d&&p!==void 0){const y=e.scale.convert(p)+c;return this.isInRange(y)?{yKey:{value:p,position:y}}:{}}if(u){const y=(this.isVertical()?r?.x:r?.y)??0,f=e.continuous?e.scaleInvert(y):i[s];return this.isInRange(y)?{xKey:{value:f,position:y}}:{}}const g={};return l.forEach(y=>{const f=o.properties[y],m=i[f],b=e.scale.convert(m)+c;this.isInRange(b)&&(g[y]={value:m,position:b})}),g}getLabelHtml(t,e){const i=this.axisLayout?.label?.fractionDigits??0,o={text:this.formatValue(t)};return this.label.renderer?e.toLabelHtml(this.label.renderer({value:t,fractionDigits:i}),o):e.toLabelHtml(o)}showLabel(t,e,i,o){if(!this.axisLayout)return;const{bounds:s}=this,a=this.labels[o],n=this.getLabelHtml(i,a);a.setLabelHtml(n);const{width:r,height:l}=a.getBBox(),c=this.axisCtx.position;let h=this.axisLayout.label.spacing+this.axisLayout.tickSize;this.axisCtx.direction===ChartAxisDirection12.X?(h-=4,a.show({x:t-r/2,y:c==="bottom"?s.y+s.height+h:s.y-l-h})):(h-=8,a.show({x:c==="right"?s.x+s.width+h:s.x-r-h,y:e-l/2}))}hideCrosshairs(){this.crosshairGroup.visible=!1;for(const t of Object.keys(this.labels))this.hideLabel(t)}hideLabel(t){this.labels[t]?.toggle(!1)}};__decorateClass([Validate38(BOOLEAN15)],Crosshair.prototype,"enabled",2),__decorateClass([Validate38(COLOR_STRING4,{optional:!0})],Crosshair.prototype,"stroke",2),__decorateClass([Validate38(LINE_DASH3,{optional:!0})],Crosshair.prototype,"lineDash",2),__decorateClass([Validate38(POSITIVE_NUMBER7)],Crosshair.prototype,"lineDashOffset",2),__decorateClass([Validate38(POSITIVE_NUMBER7)],Crosshair.prototype,"strokeWidth",2),__decorateClass([Validate38(RATIO6)],Crosshair.prototype,"strokeOpacity",2),__decorateClass([Validate38(BOOLEAN15)],Crosshair.prototype,"snap",2),__decorateClass([Validate38(OBJECT16)],Crosshair.prototype,"label",2);var CrosshairModule={type:"axis-option",optionsKey:"crosshair",packageType:"enterprise",chartTypes:["cartesian"],axisTypes:["category","ordinal-time","number","log","time"],moduleFactory:t=>new Crosshair(t),themeTemplate:{crosshair:{snap:!0,stroke:{$ref:"subtleTextColor"},strokeWidth:1,strokeOpacity:1,lineDash:[5,6],lineDashOffset:0,label:{enabled:!0}}}},import_ag_charts_community109=require("ag-charts-community"),{BOOLEAN:BOOLEAN16,FUNCTION:FUNCTION3,ActionOnSet:ActionOnSet5,Validate:Validate39}=import_ag_charts_community109._ModuleSupport,DataSource=class extends import_ag_charts_community109._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.enabled=!1,this.getData=()=>Promise.resolve(),this.dataService=t.dataService}updateCallback(t,e){this.dataService&&(t&&e!=null?this.dataService.updateCallback(e):this.dataService.clearCallback())}};__decorateClass([ActionOnSet5({newValue(t){this.updateCallback(t,this.getData)}}),Validate39(BOOLEAN16)],DataSource.prototype,"enabled",2),__decorateClass([ActionOnSet5({newValue(t){this.updateCallback(this.enabled,t)}}),Validate39(FUNCTION3)],DataSource.prototype,"getData",2),__decorateClass([ActionOnSet5({newValue(t){this.dataService.requestThrottle=t}})],DataSource.prototype,"requestThrottle",2),__decorateClass([ActionOnSet5({newValue(t){this.dataService.dispatchThrottle=t}})],DataSource.prototype,"updateThrottle",2),__decorateClass([ActionOnSet5({newValue(t){this.dataService.dispatchOnlyLatest=!t}})],DataSource.prototype,"updateDuringInteraction",2);var DataSourceModule={type:"root",optionsKey:"dataSource",packageType:"enterprise",chartTypes:["cartesian","hierarchy","polar","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new DataSource(t),themeTemplate:{dataSource:{enabled:!1}}},import_ag_charts_community114=require("ag-charts-community"),import_ag_charts_community112=require("ag-charts-community"),import_ag_charts_community110=require("ag-charts-community"),{nearestSquaredInContainer,partialAssign,mergeDefaults,BBox:BBox5}=import_ag_charts_community110._ModuleSupport,HierarchicalBBox=class{constructor(t){this.components=t,this.union=BBox5.merge(t)}containsPoint(t,e){if(!this.union.containsPoint(t,e))return!1;for(const i of this.components)if(i.containsPoint(t,e))return!0;return!1}},ErrorBarNode=class extends import_ag_charts_community110._ModuleSupport.Group{constructor(){super(),this.capLength=NaN,this._datum=void 0,this.whiskerPath=new import_ag_charts_community110._ModuleSupport.Path,this.capsPath=new import_ag_charts_community110._ModuleSupport.Path,this.bboxes=new HierarchicalBBox([]),this.append([this.whiskerPath,this.capsPath])}get datum(){return this._datum}set datum(t){this._datum=t}calculateCapLength(t,e){const{lengthRatio:i=1,length:o}=t,{lengthRatioMultiplier:s,lengthMax:a}=e,n=o??i*s;return Math.min(n,a)}getItemStylerParams(t,e,i){const{datum:o}=this;if(o==null||t.itemStyler==null)return;const{xLowerKey:s,xUpperKey:a,yLowerKey:n,yUpperKey:r}=t;return{...e,datum:o.datum,seriesId:o.datum.seriesId,xKey:o.xKey,yKey:o.yKey,xLowerKey:s,xUpperKey:a,yLowerKey:n,yUpperKey:r,highlighted:i}}formatStyles(t,e,i){let{cap:o,...s}=t;const a=this.getItemStylerParams(e,t,i);if(a!=null&&e.itemStyler!=null){const n=e.itemStyler(a);s=mergeDefaults(n,s),o=mergeDefaults(n?.cap,n,o)}return{whiskerStyle:s,capsStyle:o}}applyStyling(t,e){partialAssign(["visible","stroke","strokeWidth","strokeOpacity","lineDash","lineDashOffset"],t,e)}update(t,e,i){if(this.datum===void 0)return;const{whiskerStyle:o,capsStyle:s}=this.formatStyles(t,e,i),{xBar:a,yBar:n,capDefaults:r}=this.datum,l=this.whiskerPath;this.applyStyling(l,o),l.path.clear(!0),n!==void 0&&(l.path.moveTo(n.lowerPoint.x,n.lowerPoint.y),l.path.lineTo(n.upperPoint.x,n.upperPoint.y)),a!==void 0&&(l.path.moveTo(a.lowerPoint.x,a.lowerPoint.y),l.path.lineTo(a.upperPoint.x,a.upperPoint.y)),l.path.closePath(),this.capLength=this.calculateCapLength(s??{},r);const c=this.capLength/2,h=this.capsPath;this.applyStyling(h,s),h.path.clear(!0),n!==void 0&&(h.path.moveTo(n.lowerPoint.x-c,n.lowerPoint.y),h.path.lineTo(n.lowerPoint.x+c,n.lowerPoint.y),h.path.moveTo(n.upperPoint.x-c,n.upperPoint.y),h.path.lineTo(n.upperPoint.x+c,n.upperPoint.y)),a!==void 0&&(h.path.moveTo(a.lowerPoint.x,a.lowerPoint.y-c),h.path.lineTo(a.lowerPoint.x,a.lowerPoint.y+c),h.path.moveTo(a.upperPoint.x,a.upperPoint.y-c),h.path.lineTo(a.upperPoint.x,a.upperPoint.y+c)),h.path.closePath()}updateBBoxes(){const{capLength:t,whiskerPath:e,capsPath:i}=this,{yBar:o,xBar:s}=this.datum??{},a=t/2,n=[];if(o!==void 0){const r=o.lowerPoint.y-o.upperPoint.y;n.push(new BBox5(o.lowerPoint.x,o.upperPoint.y,e.strokeWidth,r),new BBox5(o.lowerPoint.x-a,o.lowerPoint.y,t,i.strokeWidth),new BBox5(o.upperPoint.x-a,o.upperPoint.y,t,i.strokeWidth))}if(s!==void 0){const r=s.upperPoint.x-s.lowerPoint.x;n.push(new BBox5(s.lowerPoint.x,s.upperPoint.y,r,e.strokeWidth),new BBox5(s.lowerPoint.x,s.lowerPoint.y-a,i.strokeWidth,t),new BBox5(s.upperPoint.x,s.upperPoint.y-a,i.strokeWidth,t))}this.bboxes.components=n,this.bboxes.union=BBox5.merge(n)}containsPoint(t,e){return this.bboxes.containsPoint(t,e)}pickNode(t,e){return this.containsPoint(t,e)?this:void 0}nearestSquared(t,e,i){const{bboxes:o}=this;if(o.union.distanceSquared(t,e)>i)return{nearest:void 0,distanceSquared:1/0};const{distanceSquared:s}=BBox5.nearestBox(t,e,o.components);return{nearest:this,distanceSquared:s}}},ErrorBarGroup=class extends import_ag_charts_community110._ModuleSupport.Group{nearestSquared(t,e){const{nearest:i,distanceSquared:o}=nearestSquaredInContainer(t,e,{children:this.children()});if(i!==void 0&&!isNaN(o))return{datum:i.datum,distanceSquared:o}}},import_ag_charts_community111=require("ag-charts-community"),{BaseProperties:BaseProperties14,Validate:Validate40,BOOLEAN:BOOLEAN17,COLOR_STRING:COLOR_STRING5,FUNCTION:FUNCTION4,LINE_DASH:LINE_DASH4,NUMBER:NUMBER11,OBJECT:OBJECT17,POSITIVE_NUMBER:POSITIVE_NUMBER8,RATIO:RATIO7,STRING:STRING20}=import_ag_charts_community111._ModuleSupport,ErrorBarCap=class extends BaseProperties14{};__decorateClass([Validate40(BOOLEAN17,{optional:!0})],ErrorBarCap.prototype,"visible",2),__decorateClass([Validate40(COLOR_STRING5,{optional:!0})],ErrorBarCap.prototype,"stroke",2),__decorateClass([Validate40(POSITIVE_NUMBER8,{optional:!0})],ErrorBarCap.prototype,"strokeWidth",2),__decorateClass([Validate40(RATIO7,{optional:!0})],ErrorBarCap.prototype,"strokeOpacity",2),__decorateClass([Validate40(LINE_DASH4,{optional:!0})],ErrorBarCap.prototype,"lineDash",2),__decorateClass([Validate40(POSITIVE_NUMBER8,{optional:!0})],ErrorBarCap.prototype,"lineDashOffset",2),__decorateClass([Validate40(NUMBER11,{optional:!0})],ErrorBarCap.prototype,"length",2),__decorateClass([Validate40(RATIO7,{optional:!0})],ErrorBarCap.prototype,"lengthRatio",2);var ErrorBarProperties=class extends BaseProperties14{constructor(){super(...arguments),this.visible=!0,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.cap=new ErrorBarCap}};__decorateClass([Validate40(STRING20,{optional:!0})],ErrorBarProperties.prototype,"yLowerKey",2),__decorateClass([Validate40(STRING20,{optional:!0})],ErrorBarProperties.prototype,"yLowerName",2),__decorateClass([Validate40(STRING20,{optional:!0})],ErrorBarProperties.prototype,"yUpperKey",2),__decorateClass([Validate40(STRING20,{optional:!0})],ErrorBarProperties.prototype,"yUpperName",2),__decorateClass([Validate40(STRING20,{optional:!0})],ErrorBarProperties.prototype,"xLowerKey",2),__decorateClass([Validate40(STRING20,{optional:!0})],ErrorBarProperties.prototype,"xLowerName",2),__decorateClass([Validate40(STRING20,{optional:!0})],ErrorBarProperties.prototype,"xUpperKey",2),__decorateClass([Validate40(STRING20,{optional:!0})],ErrorBarProperties.prototype,"xUpperName",2),__decorateClass([Validate40(BOOLEAN17,{optional:!0})],ErrorBarProperties.prototype,"visible",2),__decorateClass([Validate40(COLOR_STRING5,{optional:!0})],ErrorBarProperties.prototype,"stroke",2),__decorateClass([Validate40(POSITIVE_NUMBER8,{optional:!0})],ErrorBarProperties.prototype,"strokeWidth",2),__decorateClass([Validate40(RATIO7,{optional:!0})],ErrorBarProperties.prototype,"strokeOpacity",2),__decorateClass([Validate40(LINE_DASH4,{optional:!0})],ErrorBarProperties.prototype,"lineDash",2),__decorateClass([Validate40(POSITIVE_NUMBER8,{optional:!0})],ErrorBarProperties.prototype,"lineDashOffset",2),__decorateClass([Validate40(FUNCTION4,{optional:!0})],ErrorBarProperties.prototype,"itemStyler",2),__decorateClass([Validate40(OBJECT17)],ErrorBarProperties.prototype,"cap",2);var{fixNumericExtent,groupAccumulativeValueProperty,mergeDefaults:mergeDefaults2,valueProperty:valueProperty2,ChartAxisDirection:ChartAxisDirection13}=import_ag_charts_community112._ModuleSupport;function toErrorBoundCartesianSeries(t){for(const e of import_ag_charts_community112.AgErrorBarSupportedSeriesTypes)if(e===t.series.type)return t.series;throw new Error(`AG Charts - unsupported series type '${t.series.type}', error bars supported series types: ${import_ag_charts_community112.AgErrorBarSupportedSeriesTypes.join(", ")}`)}var ErrorBars=class gt extends import_ag_charts_community112._ModuleSupport.BaseModuleInstance{constructor(e){super(),this.properties=new ErrorBarProperties;const i=toErrorBoundCartesianSeries(e),{annotationGroup:o,annotationSelections:s}=i;this.cartesianSeries=i,this.groupNode=new ErrorBarGroup({name:`${o.id}-errorBars`}),o.appendChild(this.groupNode),this.selection=import_ag_charts_community112._ModuleSupport.Selection.select(this.groupNode,()=>this.errorBarFactory()),s.add(this.selection),i.addEventListener("seriesVisibilityChange",a=>this.onToggleSeriesItem(a)),this.destroyFns.push(i.addListener("data-processed",a=>this.onDataProcessed(a)),i.addListener("data-update",a=>this.onDataUpdate(a)),e.highlightManager.addListener("highlight-change",a=>this.onHighlightChange(a)),()=>o.removeChild(this.groupNode),()=>s.delete(this.selection))}hasErrorBars(){const{xLowerKey:e,xUpperKey:i,yLowerKey:o,yUpperKey:s}=this.properties;return isDefined(e)&&isDefined(i)||isDefined(o)&&isDefined(s)}isStacked(){const e=this.cartesianSeries.seriesGrouping?.stackCount;return e==null?!1:e>0}getUnstackPropertyDefinition(e){const i=[],{xLowerKey:o,xUpperKey:s,yLowerKey:a,yUpperKey:n,xErrorsID:r,yErrorsID:l}=this.getMaybeFlippedKeys(),{xScaleType:c,yScaleType:h}=e;return a!=null&&n!=null&&i.push(valueProperty2(a,h,{id:`${l}-lower`}),valueProperty2(n,h,{id:`${l}-upper`})),o!=null&&s!=null&&i.push(valueProperty2(o,c,{id:`${r}-lower`}),valueProperty2(s,c,{id:`${r}-upper`})),i}getStackPropertyDefinition(e){const i=[],{cartesianSeries:o}=this,{xLowerKey:s,xUpperKey:a,yLowerKey:n,yUpperKey:r,xErrorsID:l,yErrorsID:c}=this.getMaybeFlippedKeys(),{xScaleType:h,yScaleType:d}=e,u=o.seriesGrouping?.groupIndex??o.id,p={invalidValue:null,missingValue:0,separateNegative:!0,...o.visible?{}:{forceValue:0}},g=(f,m,b,x)=>groupAccumulativeValueProperty(f,"normal","current",{id:`${m}-${b}`,groupId:`errorGroup-${u}-${b}`,...p},x),y=(f,m,b,x)=>{i.push(...g(f,b,"lower",x),...g(m,b,"upper",x))};return n!=null&&r!=null&&y(n,r,c,d),s!=null&&a!=null&&y(s,a,l,h),i}getPropertyDefinitions(e){return this.isStacked()?this.getStackPropertyDefinition(e):this.getUnstackPropertyDefinition(e)}onDataProcessed(e){this.dataModel=e.dataModel,this.processedData=e.processedData}getDomain(e){const{xLowerKey:i,xUpperKey:o,xErrorsID:s,yLowerKey:a,yUpperKey:n,yErrorsID:r}=this.getMaybeFlippedKeys();if(e===ChartAxisDirection13.X?isDefined(i)&&isDefined(o):isDefined(a)&&isDefined(n)){const{dataModel:c,processedData:h,cartesianSeries:d}=this;if(c!=null&&h!=null){const u={x:s,y:r}[e],p=c.getDomain(d,`${u}-lower`,"value",h),g=c.getDomain(d,`${u}-upper`,"value",h),y=[Math.min(...p,...g),Math.max(...p,...g)];return fixNumericExtent(y)}}return[]}onDataUpdate(e){this.dataModel=e.dataModel,this.processedData=e.processedData,isDefined(e.dataModel)&&isDefined(e.processedData)&&(this.createNodeData(),this.update())}getNodeData(){return this.hasErrorBars()?this.cartesianSeries.contextNodeData?.nodeData:void 0}createNodeData(){const e=this.getNodeData(),i=this.cartesianSeries.axes[ChartAxisDirection13.X]?.scale,o=this.cartesianSeries.axes[ChartAxisDirection13.Y]?.scale;if(!(!i||!o||!e))for(let s=0;sthis.updateNode(i,o,s)))}updateNode(e,i,o){e.datum=i,e.update(this.getDefaultStyle(),this.properties,!1),e.updateBBoxes()}pickNodeExact(e){const{x:i,y:o}=e,s=this.groupNode.pickNode(i,o);if(s!=null)return{datum:s.datum,distanceSquared:0}}pickNodeNearest(e){return this.groupNode.nearestSquared(e.x,e.y)}pickNodeMainAxisFirst(e){return this.groupNode.nearestSquared(e.x,e.y)}getTooltipParams(){const{xLowerKey:e,xUpperKey:i,yLowerKey:o,yUpperKey:s,xLowerName:a=e,xUpperName:n=i,yLowerName:r=o,yUpperName:l=s}=this.properties;return{xLowerKey:e,xLowerName:a,xUpperKey:i,xUpperName:n,yLowerKey:o,yLowerName:r,yUpperKey:s,yUpperName:l}}onToggleSeriesItem(e){this.groupNode.visible=e.visible}makeStyle(e){return{visible:e.visible,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeOpacity:e.strokeOpacity,cap:mergeDefaults2(this.properties.cap,e)}}getDefaultStyle(){return this.makeStyle(this.getWhiskerProperties())}getHighlightStyle(){return this.makeStyle(this.getWhiskerProperties())}restyleHighlightChange(e,i,o){const s=this.getNodeData();if(s!=null){for(let a=0;anew ErrorBars(t),themeTemplate:ERROR_BARS_THEME},import_ag_charts_community115=require("ag-charts-community"),{ZIndexMap:ZIndexMap5,ActionOnSet:ActionOnSet6,Validate:Validate41,ProxyPropertyOnWrite:ProxyPropertyOnWrite2,OBJECT:OBJECT18,RATIO:RATIO8,COLOR_STRING:COLOR_STRING6}=import_ag_charts_community115._ModuleSupport,Foreground=class extends import_ag_charts_community115._ModuleSupport.Background{constructor(){super(...arguments),this.image=new Image,this.fill="transparent",this.fillOpacity=void 0}createNode(){return new import_ag_charts_community115._ModuleSupport.Group({name:"foreground",zIndex:ZIndexMap5.FOREGROUND})}onLayoutComplete(t){super.onLayoutComplete(t);const{width:e,height:i}=t.chart;let o={x:0,y:0,width:e,height:i};this.image&&(o=this.image.performLayout(e,i)),this.text&&this.updateTextNode(o)}onImageLoad(){this.ctx.updateService.update(import_ag_charts_community115._ModuleSupport.ChartUpdateType.SCENE_RENDER)}updateTextNode(t){const{textNode:e}=this;e.fontWeight="bold",e.fontFamily="Impact, sans-serif",e.fontSize=19,e.opacity=.7,e.fill="#9b9b9b",e.textBaseline="top";const i=this.textNode.getBBox(),o=10;e.x=t.x+t.width/2-i.width/2,e.y=t.y+t.height+o}};__decorateClass([Validate41(OBJECT18,{optional:!0}),ActionOnSet6({newValue(t){this.node.appendChild(t.node),t.onLoad=()=>this.onImageLoad()},oldValue(t){this.node.removeChild(t.node),t.onLoad=void 0}})],Foreground.prototype,"image",2),__decorateClass([Validate41(COLOR_STRING6,{optional:!0}),ProxyPropertyOnWrite2("rectNode","fill")],Foreground.prototype,"fill",2),__decorateClass([Validate41(RATIO8,{optional:!0}),ProxyPropertyOnWrite2("rectNode","fillOpacity")],Foreground.prototype,"fillOpacity",2);var ForegroundModule={type:"root",optionsKey:"foreground",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new Foreground(t)},import_ag_charts_community123=require("ag-charts-community"),import_ag_charts_community122=require("ag-charts-community"),import_ag_charts_community117=require("ag-charts-community"),import_ag_charts_community116=require("ag-charts-community"),{TranslatableGroup:TranslatableGroup2,ScenePathChangeDetection}=import_ag_charts_community116._ModuleSupport,MiniChartGroup=class extends TranslatableGroup2{constructor(){super(...arguments),this.inset=0,this.cornerRadius=0}applyClip(t,e){const{cornerRadius:i,inset:o}=this,{x:s,y:a,width:n,height:r}=e;t.beginPath(),t.roundRect(s+o,a+o,n-2*o,r-2*o,i),t.clip()}};__decorateClass([ScenePathChangeDetection()],MiniChartGroup.prototype,"inset",2),__decorateClass([ScenePathChangeDetection()],MiniChartGroup.prototype,"cornerRadius",2);var{Validate:Validate42,BOOLEAN:BOOLEAN18,POSITIVE_NUMBER:POSITIVE_NUMBER9,ZIndexMap:ZIndexMap6,ActionOnSet:ActionOnSet7,CategoryAxis,TextUtils:TextUtils2,Padding,Group:Group6,BBox:BBox6,ProxyProperty:ProxyProperty2}=import_ag_charts_community117._ModuleSupport,MiniChartPadding=class{constructor(){this.top=0,this.bottom=0}};__decorateClass([Validate42(POSITIVE_NUMBER9)],MiniChartPadding.prototype,"top",2),__decorateClass([Validate42(POSITIVE_NUMBER9)],MiniChartPadding.prototype,"bottom",2);var MiniChart=class extends import_ag_charts_community117._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.padding=new MiniChartPadding,this.root=new Group6({name:"root"}),this.seriesRoot=this.root.appendChild(new MiniChartGroup({name:"Series-root",zIndex:ZIndexMap6.SERIES_LAYER,renderToOffscreenCanvas:!0})),this.axisGridGroup=this.root.appendChild(new Group6({name:"Axes-Grids",zIndex:ZIndexMap6.AXIS_GRID})),this.axisGroup=this.root.appendChild(new Group6({name:"Axes-Grids",zIndex:ZIndexMap6.AXIS_GRID})),this.axisLabelGroup=this.root.appendChild(new Group6({name:"Axes-Labels",zIndex:ZIndexMap6.SERIES_LABEL})),this.axisCrosslineRangeGroup=this.root.appendChild(new Group6({name:"Axes-Crosslines-Range",zIndex:ZIndexMap6.SERIES_CROSSLINE_RANGE})),this.axisCrosslineLineGroup=this.root.appendChild(new Group6({name:"Axes-Crosslines-Line",zIndex:ZIndexMap6.SERIES_CROSSLINE_LINE})),this.axisCrosslineLabelGroup=this.root.appendChild(new Group6({name:"Axes-Crosslines-Label",zIndex:ZIndexMap6.SERIES_LABEL})),this.data=[],this._destroyed=!1,this.miniChartAnimationPhase="initial",this.axes=[],this.series=[]}destroy(){this._destroyed||(this.destroySeries(this.series),this.axes.forEach(t=>t.destroy()),this.axes=[],this._destroyed=!0)}onSeriesChange(t,e){const i=e?.filter(o=>!t.includes(o))??[];this.destroySeries(i);for(const o of t){if(e?.includes(o))continue;o.attachSeries(this.seriesRoot,this.seriesRoot,void 0);const s=this;o.chart={get mode(){return"standalone"},get isMiniChart(){return!0},get seriesRect(){return s.seriesRect}},o.resetAnimation(this.miniChartAnimationPhase==="initial"?"initial":"disabled")}}destroySeries(t){t?.forEach(e=>{e.destroy(),e.detachSeries(this.seriesRoot,this.seriesRoot,void 0),e.chart=void 0})}assignSeriesToAxes(){this.axes.forEach(t=>{t.boundSeries=this.series.filter(e=>e.axes[t.direction]===t)})}assignAxesToSeries(){const t={};this.axes.forEach(e=>{const i=e.direction;(t[i]??(t[i]=[])).push(e)}),this.series.forEach(e=>{e.directions.forEach(i=>{const o=t[i];if(!o){logger_exports.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);return}const s=e.getKeys(i),a=this.findMatchingAxis(o,s);if(!a){logger_exports.warnOnce(`no matching axis for direction [${i}] and keys [${s}]; check series and axes configuration.`);return}e.axes[i]=a})})}findMatchingAxis(t,e){for(const i of t){if(!i.keys.length)return i;if(e){for(const o of e)if(i.keys.includes(o))return i}}}updateData(t){this.series.forEach(e=>e.setChartData(t)),this.miniChartAnimationPhase==="initial"&&this.ctx.animationManager.onBatchStop(()=>{this.miniChartAnimationPhase="ready",this.series.forEach(e=>e.resetAnimation("disabled"))})}async processData(t){this.series.some(e=>e.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes()),await Promise.all(this.series.map(e=>(e.resetDatumCallbackCache(),e.processData(t))));for(const e of this.axes)e.processData()}computeAxisPadding(){const t=new Padding;return this.enabled&&this.axes.forEach(({position:e,thickness:i,line:o,label:s})=>{if(e==null)return;let a;i?a=i:a=(o.enabled?o.width:0)+(s.enabled?TextUtils2.getLineHeight(s.fontSize??0)+s.spacing:0),t[e]=Math.ceil(a)}),t}async layout(t,e){const{padding:i}=this,o=this.seriesRect!=null,s=new BBox6(0,0,t,e-(i.top+i.bottom));this.seriesRect=s,this.seriesRoot.translationY=i.top,this.seriesRoot.setClipRectCanvasSpace(new BBox6(0,-i.top,t,e)),this.axes.forEach(a=>{const{position:n="left"}=a;switch(n){case"top":case"bottom":a.range=[0,s.width],a.gridLength=s.height;break;case"right":case"left":{const r=a instanceof CategoryAxis;a.range=r?[0,s.height]:[s.height,0],a.gridLength=s.width;break}}a.gridPadding=0,a.translation.x=0,a.translation.y=0,n==="right"?a.translation.x=t:n==="bottom"&&(a.translation.y=e),o||a.resetAnimation("initial"),a.calculateLayout(),a.update()}),await Promise.all(this.series.map(a=>a.update({seriesRect:s})))}};__decorateClass([Validate42(BOOLEAN18)],MiniChart.prototype,"enabled",2),__decorateClass([ProxyProperty2(["seriesRoot","inset"])],MiniChart.prototype,"inset",2),__decorateClass([ProxyProperty2(["seriesRoot","cornerRadius"])],MiniChart.prototype,"cornerRadius",2),__decorateClass([ActionOnSet7({changeValue(t,e=[]){const i={axisNode:this.axisGroup,gridNode:this.axisGridGroup,labelNode:this.axisLabelGroup,crossLineLineNode:this.axisCrosslineLineGroup,crossLineRangeNode:this.axisCrosslineRangeGroup,crossLineLabelNode:this.axisCrosslineLabelGroup};for(const o of e)t.includes(o)||(o.detachAxis(i),o.destroy());for(const o of t)e?.includes(o)||o.attachAxis(i)}})],MiniChart.prototype,"axes",2),__decorateClass([ActionOnSet7({changeValue(t,e){this.onSeriesChange(t,e)}})],MiniChart.prototype,"series",2);var import_ag_charts_community118=require("ag-charts-community"),{clamp:clamp5,SliderWidget}=import_ag_charts_community118._ModuleSupport,NavigatorDOMProxy=class{constructor(t,e){this.ctx=t,this.sliderHandlers=e,this._min=0,this._max=1,this.minRange=.001,this.dragStartX=0,this.ctx=t,this.toolbar=t.proxyInteractionService.createProxyContainer({type:"toolbar",domManagerId:"navigator-toolbar",classList:["ag-charts-proxy-navigator-toolbar"],orientation:"vertical",ariaLabel:{id:"ariaLabelNavigator"}}),this.sliders=[t.proxyInteractionService.createProxyElement({type:"slider",domIndex:1,ariaLabel:{id:"ariaLabelNavigatorMinimum"},parent:this.toolbar,cursor:"ew-resize"}),t.proxyInteractionService.createProxyElement({type:"slider",domIndex:-1/0,ariaLabel:{id:"ariaLabelNavigatorRange"},parent:this.toolbar,cursor:"grab"}),t.proxyInteractionService.createProxyElement({type:"slider",domIndex:2,ariaLabel:{id:"ariaLabelNavigatorMaximum"},parent:this.toolbar,cursor:"ew-resize"})];for(const[i,o]of["min","pan","max"].entries()){const s=this.sliders[i];s.step=SliderWidget.STEP_HUNDRETH,s.keyboardStep=SliderWidget.STEP_ONE,s.orientation="horizontal",s.setPreventsDefault(!1),s.addListener("drag-start",a=>this.onDragStart(i,a,o)),s.addListener("drag-move",a=>this.onDrag(s,a,o)),s.addListener("drag-end",()=>this.updateSliderRatios()),s.addListener("contextmenu",a=>this.onContextMenu(s,a))}this.sliders[0].addListener("change",()=>this.onMinSliderChange()),this.sliders[1].addListener("change",()=>this.onPanSliderChange()),this.sliders[2].addListener("change",()=>this.onMaxSliderChange()),this.updateSliderRatios(),this.updateVisibility(!1)}destroy(){this.toolbar.destroy()}updateVisibility(t){this.toolbar.setHidden(!t)}updateZoom(){const{_min:t,_max:e}=this;if(!(t==null||e==null))return this.ctx.zoomManager.updateZoom("navigator",{x:{min:t,max:e}})}updateBounds(t){this.toolbar.setBounds(t)}updateSliderBounds(t,e){this.sliders[t].setBounds(e)}updateMinMax(t,e){this._min=t,this._max=e,this.updateSliderRatios()}updateSliderRatios(){const{_min:t,_max:e}=this,i=this.ctx.localeManager.t("ariaValuePanRange",{min:t,max:e});this.sliders[0].setValueRatio(t),this.sliders[1].setValueRatio(t,{ariaValueText:i}),this.sliders[2].setValueRatio(e)}toCanvasOffsets(t){return{offsetX:this.dragStartX+t.originDeltaX}}moveToFront(t){if(t===1)return;const e=this.sliders[t],i=this.sliders[2-t];this.toolbar.moveChild(i,e.domIndex-1)}onDragStart(t,e,i){const o=this.sliders[t],s=this.toolbar.cssLeft(),a=o.cssLeft();this.dragStartX=s+a+e.offsetX,this.moveToFront(t),e.device==="touch"&&e.sourceEvent.preventDefault(),this.sliderHandlers.onDragStart(i,this.toCanvasOffsets(e))}onDrag(t,e,i){e.device==="touch"&&e.sourceEvent.preventDefault(),this.sliderHandlers.onDrag(i,this.toCanvasOffsets(e))}onContextMenu(t,{sourceEvent:e,offsetX:i,offsetY:o}){const{x:s,y:a}=this.toolbar.getBounds(),{x:n,y:r}=t.getBounds(),l=i+s+n,c=o+a+r;this.ctx.contextMenuRegistry.dispatchContext("all",{sourceEvent:e,canvasX:l,canvasY:c},{})}onPanSliderChange(){const t=this.sliders[1].getValueRatio(),e=this._max-this._min;this._min=clamp5(0,t,1-e),this._max=this._min+e,this.updateZoom()}onMinSliderChange(){this._min=this.sliders[0].clampValueRatio(0,this._max-this.minRange),this.updateZoom()}onMaxSliderChange(){this._max=this.sliders[2].clampValueRatio(this._min+this.minRange,1),this.updateZoom()}},import_ag_charts_community119=require("ag-charts-community"),{Validate:Validate43,ScenePathChangeDetection:ScenePathChangeDetection2,POSITIVE_NUMBER:POSITIVE_NUMBER10,BOOLEAN:BOOLEAN19,BBox:BBox7,ExtendedPath2D}=import_ag_charts_community119._ModuleSupport,RangeHandle=class extends import_ag_charts_community119._ModuleSupport.Path{constructor(){super(...arguments),this.zIndex=3,this.centerX=0,this.centerY=0,this.width=8,this.height=16,this.cornerRadius=4,this.grip=!0,this.gripPath=new ExtendedPath2D}setCenter(t,e){this.dirtyPath=!0,(this.centerX!==t||this.centerY!==e)&&(this.centerX=t,this.centerY=e,this.markDirty())}static align(t,e,i,o,s,a,n,r,l){const c=t.align(i+s*n)+l,h=c+t.align(i+s*n,s*(r-n))-2*l,d=t.align(o+a/2);t.setCenter(c,d),e.setCenter(h,d)}computeBBox(){const{centerX:t,centerY:e,width:i,height:o}=this,s=t-i/2,a=e-o/2;return new BBox7(s,a,i,o)}isPointInPath(t,e){return this.getBBox().containsPoint(t,e)}updatePath(){const{centerX:t,centerY:e,path:i,gripPath:o,strokeWidth:s,cornerRadius:a,grip:n}=this,r=s/2,l=this.layerManager?.canvas?.pixelRatio??1;i.clear(),o.clear();const c=Math.floor(this.width/2*l)/l,h=Math.floor(this.height/2*l)/l;i.roundRect(t-c+r,e-h+r,2*(c-r),2*(h-r),a);const d=3;if(n)for(let u=-.5;u<=.5;u+=1)for(let p=-1;p<=1;p+=1)o.arc(t+u*d,e+p*d,1,0,2*Math.PI),o.closePath()}renderFill(t,e){const{stroke:i}=this;super.renderFill(t,e),t.fillStyle=typeof i=="string"?i:"black",t.fill(this.gripPath.getPath2D())}};RangeHandle.className="RangeHandle",__decorateClass([Validate43(POSITIVE_NUMBER10),ScenePathChangeDetection2()],RangeHandle.prototype,"width",2),__decorateClass([Validate43(POSITIVE_NUMBER10),ScenePathChangeDetection2()],RangeHandle.prototype,"height",2),__decorateClass([Validate43(POSITIVE_NUMBER10),ScenePathChangeDetection2()],RangeHandle.prototype,"cornerRadius",2),__decorateClass([Validate43(BOOLEAN19),ScenePathChangeDetection2()],RangeHandle.prototype,"grip",2);var import_ag_charts_community120=require("ag-charts-community"),{Path:Path6,BBox:BBox8,ExtendedPath2D:ExtendedPath2D2,clippedRoundRect,POSITIVE_NUMBER:POSITIVE_NUMBER11,Validate:Validate44,ScenePathChangeDetection:ScenePathChangeDetection3}=import_ag_charts_community120._ModuleSupport,RangeMask=class extends Path6{constructor(){super(...arguments),this.cornerRadius=4,this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1,this.visiblePath=new ExtendedPath2D2}layout(t,e,i,o,s,a){s=isNaN(s)?this.min:s,a=isNaN(a)?this.max:a,(t!==this.x||e!==this.y||i!==this.width||this.height!==o||s!==this.min||a!==this.max)&&(this.x=t,this.y=e,this.width=i,this.height=o,this.min=s,this.max=a,this.dirtyPath=!0,this.markDirty())}computeBBox(){const{x:t,y:e,width:i,height:o}=this;return new BBox8(t,e,i,o)}computeVisibleRangeBBox(){const{x:t,y:e,width:i,height:o,min:s,max:a}=this,n=t+i*s,r=t+i*a;return new BBox8(n,e,r-n,o)}updatePath(){const{path:t,visiblePath:e,x:i,y:o,width:s,height:a,min:n,max:r,strokeWidth:l,cornerRadius:c}=this,h=l/2;t.clear(),e.clear();const d=this.align(i)+h,u=this.align(o)+h,p=this.align(i,s)-2*h,g=this.align(o,a)-2*h,y=this.align(i+s*n)+h,f=y+this.align(i+s*n,s*(r-n))-2*h,m={topLeft:c,topRight:c,bottomRight:c,bottomLeft:c};clippedRoundRect(t,d,u,p,g,m,new BBox8(d,u,y-d,g)),clippedRoundRect(t,d,u,p,g,m,new BBox8(f,u,p+d-f,g)),f-y>1&&clippedRoundRect(e,d,u,p,g,m,new BBox8(y,u,f-y,g))}renderStroke(t,e){super.renderStroke(t,e),super.renderStroke(t,this.visiblePath.getPath2D())}};RangeMask.className="RangeMask",__decorateClass([Validate44(POSITIVE_NUMBER11),ScenePathChangeDetection3()],RangeMask.prototype,"cornerRadius",2);var import_ag_charts_community121=require("ag-charts-community"),RangeSelector=class extends import_ag_charts_community121._ModuleSupport.Group{constructor(t){super({name:"rangeSelectorGroup",zIndex:import_ag_charts_community121._ModuleSupport.ZIndexMap.NAVIGATOR}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.background=this.appendChild(new import_ag_charts_community121._ModuleSupport.TranslatableGroup({name:"navigator-background",zIndex:1})),this.append(t)}layout(t,e,i,o,s,a){this.x=t,this.y=e,this.width=i,this.height=o,this.lOffset=s,this.rOffset=a,this.background.translationX=t,this.background.translationY=e,this.markDirty()}updateBackground(t,e){t!=null&&this.background.removeChild(t),e!=null&&this.background.appendChild(e),this.markDirty()}computeBBox(){const{x:t,y:e,width:i,height:o,lOffset:s,rOffset:a}=this;return new import_ag_charts_community121._ModuleSupport.BBox(t-s,e,i+(s+a),o)}},{clamp:clamp6,BaseModuleInstance:BaseModuleInstance2,ObserveChanges:ObserveChanges4,Validate:Validate45,BOOLEAN:BOOLEAN20,POSITIVE_NUMBER:POSITIVE_NUMBER12}=import_ag_charts_community122._ModuleSupport,Navigator=class extends BaseModuleInstance2{constructor(t){super(),this.ctx=t,this.enabled=!1,this.mask=new RangeMask,this.minHandle=new RangeHandle,this.maxHandle=new RangeHandle,this.maskVisibleRange={id:"navigator-mask-visible-range",getBBox:()=>this.mask.computeVisibleRangeBBox(),toCanvasBBox:()=>this.mask.computeVisibleRangeBBox(),fromCanvasPoint:(e,i)=>({x:e,y:i})},this.height=30,this.cornerRadius=0,this.spacing=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new RangeSelector([this.mask,this.minHandle,this.maxHandle]),this.destroyFns.push(t.scene.attachNode(this.rangeSelector),this.ctx.localeManager.addListener("locale-changed",()=>this.updateZoom()),this.ctx.layoutManager.registerElement(import_ag_charts_community122._ModuleSupport.LayoutElement.Navigator,e=>this.onLayoutStart(e)),this.ctx.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),t.zoomManager.addListener("zoom-change",e=>this.onZoomChange(e))),this.domProxy=new NavigatorDOMProxy(t,this),this.updateGroupVisibility(),this.miniChart=new MiniChart(t)}updateBackground(t,e){this.rangeSelector?.updateBackground(t,e)}updateGroupVisibility(){const{enabled:t}=this;this.rangeSelector==null||t===this.rangeSelector.visible||(this.rangeSelector.visible=t,this.domProxy.updateVisibility(t),t?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}onLayoutStart(t){if(this.enabled){const{layoutBox:e}=t,i=this.height+this.spacing;e.shrink(i,"bottom"),this.y=e.y+e.height+this.spacing}else this.y=0;if(this.enabled&&this.miniChart){const{top:e,bottom:i}=this.miniChart.computeAxisPadding();t.layoutBox.shrink(e+i,"bottom"),this.y-=i,this.miniChart.inset=this.mask.strokeWidth/2,this.miniChart.cornerRadius=this.mask.cornerRadius}}onLayoutComplete(t){const{x:e,width:i}=t.series.rect,{y:o,height:s}=this;if(this.domProxy.updateVisibility(this.enabled),this.enabled){const{_min:a,_max:n}=this.domProxy;this.layoutNodes(e,o,i,s,a,n),this.domProxy.updateBounds({x:e,y:o,width:i,height:s})}this.x=e,this.width=i,this.miniChart?.layout(i,s).catch(a=>logger_exports.error(a))}canDrag(){return this.enabled&&this.ctx.interactionManager.isState(import_ag_charts_community122._ModuleSupport.InteractionState.ZoomDraggable)}onDragStart(t,{offsetX:e}){this.canDrag()&&(t==="pan"&&(this.panStart=(e-this.x)/this.width-this.domProxy._min),this.ctx.zoomManager.fireZoomPanStartEvent("navigator"))}onDrag(t,{offsetX:e}){if(!this.canDrag())return;const{panStart:i,x:o,width:s}=this,{minRange:a}=this.domProxy;let{_min:n,_max:r}=this.domProxy;const l=(e-o)/s;if(t==="min")n=clamp6(0,l,r-a);else if(t==="max")r=clamp6(n+a,l,1);else if(t==="pan"&&i!=null){const c=r-n;n=clamp6(0,l-i,1-c),r=n+c}this.domProxy._min=n,this.domProxy._max=r,this.updateZoom()}onZoomChange(t){const{x:e}=t;if(!e)return;const{x:i,y:o,width:s,height:a}=this,{min:n,max:r}=e;this.domProxy.updateMinMax(n,r),this.layoutNodes(i,o,s,a,n,r)}layoutNodes(t,e,i,o,s,a){const{rangeSelector:n,mask:r,minHandle:l,maxHandle:c}=this;r.layout(t,e,i,o,s,a),n.layout(t,e,i,o,l.width/2,c.width/2),RangeHandle.align(l,c,t,e,i,o,s,a,r.strokeWidth/2),s+(a-s)/2<.5?(l.zIndex=3,c.zIndex=4):(l.zIndex=4,c.zIndex=3),[l,this.maskVisibleRange,c].forEach((h,d)=>{const u=h.getBBox(),p={x:u.x-t,y:u.y-e,height:u.height,width:u.width};this.domProxy.updateSliderBounds(d,p)})}updateZoom(){this.enabled&&this.domProxy.updateZoom()}updateData(t){return this.miniChart?.updateData(t)}async processData(t){if(this.miniChart)return this.miniChart?.processData(t)}};__decorateClass([ObserveChanges4((t,e,i)=>{t.updateBackground(i?.root,e?.root)})],Navigator.prototype,"miniChart",2),__decorateClass([Validate45(BOOLEAN20),ObserveChanges4((t,e)=>{t.ctx.zoomManager.setNavigatorEnabled(!!e),t.updateGroupVisibility()})],Navigator.prototype,"enabled",2),__decorateClass([Validate45(POSITIVE_NUMBER12)],Navigator.prototype,"height",2),__decorateClass([Validate45(POSITIVE_NUMBER12),ObserveChanges4((t,e)=>{t.mask.cornerRadius=e})],Navigator.prototype,"cornerRadius",2),__decorateClass([Validate45(POSITIVE_NUMBER12)],Navigator.prototype,"spacing",2);var NavigatorModule={type:"root",optionsKey:"navigator",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Navigator(t),removable:!1,themeTemplate:{navigator:{enabled:!1,height:18,cornerRadius:4,mask:{fill:{$ref:"foregroundColor"},fillOpacity:.1,stroke:{$ref:"borderColor"},strokeWidth:1},minHandle:{fill:{$ref:"backgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},maxHandle:{fill:{$ref:"backgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},miniChart:{enabled:!1,label:{color:{$ref:"textColor"},fontSize:{$rem:[import_ag_charts_community123._ModuleSupport.FONT_SIZE_RATIO.SMALLER]},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:5},padding:{top:0,bottom:0}}}}},import_ag_charts_community125=require("ag-charts-community"),import_ag_charts_community124=require("ag-charts-community"),{AND:AND4,ARRAY:ARRAY4,FUNCTION:FUNCTION5,NUMBER:NUMBER12,OR:OR3,ToolbarButtonProperties:ToolbarButtonProperties3,Validate:Validate46}=import_ag_charts_community124._ModuleSupport,RangesButtonProperties=class extends ToolbarButtonProperties3{};__decorateClass([Validate46(OR3(NUMBER12,AND4(ARRAY4,ARRAY4.restrict({length:2})),FUNCTION5))],RangesButtonProperties.prototype,"value",2);var{BOOLEAN:BOOLEAN21,OBJECT:OBJECT19,ChartAxisDirection:ChartAxisDirection14,LayoutElement:LayoutElement3,PropertiesArray:PropertiesArray4,Toolbar,Validate:Validate47}=import_ag_charts_community125._ModuleSupport,Ranges=class extends import_ag_charts_community125._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.buttons=new PropertiesArray4(RangesButtonProperties),this.verticalSpacing=10,this.container=t.domManager.addChild("canvas-overlay","range-buttons"),this.container.role="presentation",this.toolbar=new Toolbar(this.ctx.localeManager),this.toolbar.addClass("ag-charts-range-buttons"),this.container.append(this.toolbar.getElement()),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),t.layoutManager.registerElement(LayoutElement3.ToolbarBottom,this.onLayoutStart.bind(this)),t.zoomManager.addListener("zoom-change",this.onZoomChanged.bind(this)),this.teardown.bind(this))}teardown(){this.container.removeChild(this.toolbar.getElement()),this.toolbar.destroy()}onLayoutStart(t){const{buttons:e,ctx:i,enabled:o,toolbar:s,verticalSpacing:a}=this,{layoutBox:n}=t;if(!o||!i.zoomManager.isZoomEnabled()){s.setHidden(!0);return}s.setHidden(!1),s.updateButtons(e);const r=s.getBounds().height;s.setBounds({x:n.x,y:n.y+n.height-r,width:n.width,height:r}),n.shrink({bottom:r+a})}onZoomChanged(){this.toolbar.clearActiveButton()}onButtonPress({button:{index:t}}){const{zoomManager:e}=this.ctx,i=this.buttons.at(t);if(!i)return;const{value:o}=i;typeof o=="number"?e.extendToEnd("zoom-buttons",ChartAxisDirection14.X,o):Array.isArray(o)?e.updateWith("zoom-buttons",ChartAxisDirection14.X,()=>o):typeof o=="function"&&e.updateWith("zoom-buttons",ChartAxisDirection14.X,o),this.toolbar.toggleActiveButtonByIndex(t)}};__decorateClass([Validate47(BOOLEAN21)],Ranges.prototype,"enabled",2),__decorateClass([Validate47(OBJECT19)],Ranges.prototype,"buttons",2);var DAY=1e3*60*60*24,MONTH=DAY*30,YEAR=DAY*365,RangesModule={type:"root",optionsKey:"ranges",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Ranges(t),themeTemplate:{ranges:{enabled:!1,buttons:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:MONTH},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:3*MONTH},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:6*MONTH},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(t,e)=>[new Date(`${new Date(e).getFullYear()}-01-01`).getTime(),e]},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:YEAR},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:(t,e)=>[t,e]}]}}},import_ag_charts_community127=require("ag-charts-community"),import_ag_charts_community126=require("ag-charts-community"),_SharedToolbar=class yt extends import_ag_charts_community126._ModuleSupport.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.activeSections=new Set,this.sectionButtons={annotations:[],chartToolbar:[]},this.container=this.ctx.domManager.addChild("canvas-overlay","shared-toolbar"),this.container.role="presentation"}getSharedToolbar(e){return this.sharedToolbar||this.createSharedToolbar(),this.toolbarWithSection(e)}createSharedToolbar(){this.sharedToolbar=new import_ag_charts_community126._ModuleSupport.Toolbar(this.ctx.localeManager,"vertical"),this.sharedToolbar.addClass("ag-charts-shared-toolbar"),this.container.append(this.sharedToolbar.getElement()),this.destroyFns.push(()=>{this.sharedToolbar&&(this.container.removeChild(this.sharedToolbar.getElement()),this.sharedToolbar.destroy(),this.sharedToolbar=void 0)})}toolbarWithSection(e){const i=this.sharedToolbar,o={layout:(s,a)=>{if(this.firstLayoutSection!=null&&this.firstLayoutSection!==e&&this.activeSections.has(this.firstLayoutSection))return;this.firstLayoutSection=e;const n=i.getBounds().width;i.setBounds({x:s.x,y:s.y,width:n}),s.shrink({left:n+i.horizontalSpacing+(a??0)})},addToolbarListener:(s,a)=>i.addToolbarListener(s,n=>{const r=this.getSectionIndex(e,n.button.index);if(r<0)return;const l={...n,button:this.sectionButtons[e][r]};a(l)}),updateButtons:s=>{this.sectionButtons[e]=s;const a=yt.SECTION_ORDER.flatMap(n=>this.sectionButtons[n]);i.updateButtons(a)},updateButtonByIndex:(s,a)=>{i.updateButtonByIndex(this.getIndex(e,s),a)},toggleActiveButtonByIndex:s=>{i.toggleActiveButtonByIndex(this.getIndex(e,s))},toggleButtonEnabledByIndex:(s,a)=>{i.toggleButtonEnabledByIndex(this.getIndex(e,s),a)},setHidden:s=>{s?this.activeSections.delete(e):this.activeSections.add(e);let a=0;for(const n of yt.SECTION_ORDER){if(n!==e){a+=this.sectionButtons[n].length;continue}for(const r of this.sectionButtons[e].keys())i.setButtonHiddenByIndex(a+r,s)}},destroy:()=>{o.setHidden(!0),this.activeSections.size===0&&this.destroy()},clearActiveButton:i.clearActiveButton.bind(i),addListener:i.addListener.bind(i),removeListener:i.removeListener.bind(i)};return o.setHidden(!1),o}getIndex(e,i){let o=0;for(const s of yt.SECTION_ORDER){if(s===e)return o+i;o+=this.sectionButtons[s].length}return-1}getSectionIndex(e,i){let o=0;for(const s of yt.SECTION_ORDER){if(s===e)return i>=o+this.sectionButtons[e].length?-1:i-o;o+=this.sectionButtons[s].length}return-1}};_SharedToolbar.SECTION_ORDER=["chartToolbar","annotations"];var SharedToolbar=_SharedToolbar,SharedToolbarModule={type:"context",contextKey:"sharedToolbar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new SharedToolbar(t)},import_ag_charts_community129=require("ag-charts-community"),import_ag_charts_community128=require("ag-charts-community"),{CachedTextMeasurerPool:CachedTextMeasurerPool2,ZIndexMap:ZIndexMap7,LayoutElement:LayoutElement4,Validate:Validate48,BaseProperties:BaseProperties15,OBJECT:OBJECT20,BOOLEAN:BOOLEAN22,STRING:STRING21,COLOR_STRING:COLOR_STRING7,RATIO:RATIO9,valueProperty:valueProperty3,TextUtils:TextUtils3,Group:Group7,Label:Label2,Rect,Text}=import_ag_charts_community128._ModuleSupport,chartConfigurations={ohlc:62,candlestick:62,"hollow-candlestick":62,line:96,"step-line":96,hlc:184,"high-low":800},itemIdMap={up:"positive",down:"negative"},neutralColorMap={hlc:"altNeutral"},StatusBarBackground=class extends BaseProperties15{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1}};__decorateClass([Validate48(COLOR_STRING7)],StatusBarBackground.prototype,"fill",2),__decorateClass([Validate48(RATIO9)],StatusBarBackground.prototype,"fillOpacity",2);var StatusBar=class extends import_ag_charts_community128._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.openKey=void 0,this.highKey=void 0,this.lowKey=void 0,this.closeKey=void 0,this.volumeKey=void 0,this.title=new Label2,this.positive=new Label2,this.negative=new Label2,this.neutral=new Label2,this.altNeutral=new Label2,this.background=new StatusBarBackground,this.layoutStyle="block",this.id="status-bar",this.data=void 0,this.layer=new Group7({name:"StatusBar",zIndex:ZIndexMap7.STATUS_BAR}),this.labelGroup=this.layer.appendChild(new import_ag_charts_community128._ModuleSupport.TranslatableGroup),this.backgroundNode=this.labelGroup.appendChild(new Rect),this.labels=[{label:"O",configuration:2,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"openValue",key:"openKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"H",configuration:16,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"highValue",key:"highKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"H",configuration:256,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),style:"neutral",id:"highValue",key:"highKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"L",configuration:8,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"lowValue",key:"lowKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"L",configuration:512,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),style:"neutral",id:"lowValue",key:"lowKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"C",configuration:4,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"closeValue",key:"closeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"C",configuration:128,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"closeValue",key:"closeKey",style:"neutral",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"",configuration:64,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),style:"neutral",id:"closeValue",key:"closeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2})},{label:"Vol",configuration:32,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"volumeValue",key:"volumeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2})}],this.highlightManager=t.highlightManager,this.labelGroup.visible=!1,this.destroyFns.push(t.scene.attachNode(this.layer),t.layoutManager.registerElement(LayoutElement4.Overlay,e=>this.startPerformLayout(e)),t.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),t.highlightManager.addListener("highlight-change",()=>this.updateHighlight()))}async processData(t){if(!this.enabled||this.data==null)return;const e=[];for(const s of this.labels){const{id:a,key:n}=s,r=this[n];r==null?s.domain=void 0:e.push(valueProperty3(r,"number",{id:a}))}if(e.length===0)return;const{processedData:i,dataModel:o}=await t.request(this.id,this.data,{props:e});for(const s of this.labels){const{id:a,key:n}=s;this[n]!=null&&(s.domain=o.getDomain(this,a,"value",i))}}startPerformLayout(t){if(this.labelGroup.translationX=0,this.labelGroup.translationY=0,!this.enabled)return;const{layoutBox:e}=t,i=4,o=12,s=0,a=8;this.labelGroup.translationY=e.y+s;const n=Math.max(this.title.fontSize,this.positive.fontSize,this.negative.fontSize),r=TextUtils3.getLineHeight(n),l=chartConfigurations[this.getChartType()]??0;let c=0,h,d="alphabetic";if(this.layoutStyle==="block")e.shrink(s+r+a,"top"),h=n+(r-n)/2;else{const{title:u}=this.ctx.chartService;if(d="top",h=s+u.padding,u.enabled){const p=u.node.getBBox();c=p.x+p.width+o}else c=u.padding}for(const{label:u,configuration:p,title:g,value:y,domain:f,formatter:m}of this.labels){if(f==null||!(l&p)){g.visible=!1,y.visible=!1;continue}const b=Math.max(CachedTextMeasurerPool2.measureText(m.format(f[0]),{font:this.positive.getFont(),textBaseline:d,textAlign:"left"}).width,CachedTextMeasurerPool2.measureText(m.format(f[1]),{font:this.positive.getFont(),textBaseline:d,textAlign:"left"}).width,CachedTextMeasurerPool2.measureText(m.format(f[0]),{font:this.negative.getFont(),textBaseline:d,textAlign:"left"}).width,CachedTextMeasurerPool2.measureText(m.format(f[1]),{font:this.negative.getFont(),textBaseline:d,textAlign:"left"}).width);g.visible=!0,y.visible=!0;const x=CachedTextMeasurerPool2.measureText(u,{font:this.title.getFont(),textBaseline:d,textAlign:"left"});g.setFont(this.title),g.fill=this.title.color,g.text=u,g.textBaseline=d,g.y=h,g.x=c,c+=x.width+i,y.textBaseline=d,y.y=h,y.x=c,c+=b+o}this.backgroundNode.x=0,this.backgroundNode.y=0,this.backgroundNode.width=c-o,this.backgroundNode.height=r+s+a,this.backgroundNode.fill=this.background.fill,this.backgroundNode.fillOpacity=this.background.fillOpacity}onLayoutComplete(t){this.labelGroup.translationX=t.series.rect.x,this.updateHighlight()}updateHighlight(){if(!this.enabled)return;const t=this.highlightManager.getActiveHighlight(),e=t?.datum??this.data?.at(-1);if(e==null){this.labelGroup.visible=!1;return}this.labelGroup.visible=!0;const i=t?.itemId;let o=i!=null?itemIdMap[i]:void 0;o==null&&this.openKey!=null&&this.closeKey!=null&&(e[this.openKey]new StatusBar(t),themeTemplate:{statusBar:{enabled:!1,layoutStyle:import_ag_charts_community129._ModuleSupport.ThemeSymbols.DEFAULT_CAPTION_LAYOUT_STYLE,title:{color:{$ref:"textColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},positive:{color:import_ag_charts_community129._ModuleSupport.ThemeSymbols.PALETTE_UP_STROKE,fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},negative:{color:import_ag_charts_community129._ModuleSupport.ThemeSymbols.PALETTE_DOWN_STROKE,fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},neutral:{color:import_ag_charts_community129._ModuleSupport.ThemeSymbols.PALETTE_NEUTRAL_STROKE,fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},background:{fill:{$ref:"backgroundColor"},fillOpacity:.5},altNeutral:{color:"gray"}}}},import_ag_charts_community130=require("ag-charts-community"),{BOOLEAN:BOOLEAN23,STRING:STRING22,UNION:UNION7,BaseProperties:BaseProperties16,CartesianAxis:CartesianAxis2,ChartUpdateType:ChartUpdateType2,ObserveChanges:ObserveChanges5,TooltipManager,Validate:Validate49}=import_ag_charts_community130._ModuleSupport,ChartSync=class extends BaseProperties16{constructor(t){super(),this.moduleContext=t,this.enabled=!1,this.axes="x",this.nodeInteraction=!0,this.zoom=!0}updateSiblings(t){const{syncManager:e}=this.moduleContext;for(const i of e.getGroupSiblings(t??this.groupId))this.updateChart(i)}updateChart(t,e=ChartUpdateType2.UPDATE_DATA){t.ctx.updateService.update(e,{skipSync:!0})}enabledZoomSync(){const{syncManager:t,zoomManager:e}=this.moduleContext;this.disableZoomSync=e.addListener("zoom-change",()=>{for(const i of t.getGroupSiblings(this.groupId))i.modulesManager.getModule("sync")?.zoom&&i.ctx.zoomManager.updateZoom("sync",this.mergeZoom(i))})}enabledNodeInteractionSync(){const{highlightManager:t,syncManager:e}=this.moduleContext;this.disableNodeInteractionSync=t.addListener("highlight-change",i=>{for(const o of e.getGroupSiblings(this.groupId))if(o.modulesManager.getModule("sync")?.nodeInteraction){if(!i.currentHighlight?.datum){o.ctx.highlightManager.updateHighlight(o.id),o.ctx.tooltipManager.removeTooltip(o.id);continue}for(const s of o.axes){const a=this.axes==="xy"?"x":this.axes;if(!CartesianAxis2.is(s)||s.direction!==a)continue;const n=o.series.map(r=>{const l=r.getKeys(s.direction);if(s.keys.length&&!s.keys.some(g=>l.includes(g)))return;const{nodeData:c}=r.contextNodeData;if(!c?.length)return;const h=c[0][`${s.direction}Key`];let d=i.currentHighlight.datum[h];const u=isDate(d);u&&(d=d.getTime());const p=c.find(g=>{const y=g.datum[h];return u?y.getTime()===d:y===d});return p?{series:r,nodeDatum:p}:null}).filter(isDefined);if(n.length<2&&n[0]?.nodeDatum!==o.ctx.highlightManager.getActiveHighlight()){const{series:r,nodeDatum:l}=n[0]??{};if(o.ctx.highlightManager.updateHighlight(o.id,l),l){const c=l.midPoint?.x??l.point?.x??0,h=l.midPoint?.y??l.point?.y??0,d=TooltipManager.makeTooltipMeta({type:"pointermove",canvasX:c,canvasY:h},r,l);delete d.lastPointerEvent,o.ctx.tooltipManager.updateTooltip(o.id,d,r.getTooltipContent(l))}else o.ctx.tooltipManager.removeTooltip(o.id);this.updateChart(o,ChartUpdateType2.SERIES_UPDATE)}}}})}getSyncedDomain(t){if(!CartesianAxis2.is(t)||this.axes!=="xy"&&this.axes!==t.direction)return;const{syncManager:e}=this.moduleContext,i=e.getGroup(this.groupId),[{axes:o}]=i,{direction:s,min:a,max:n,nice:r,reverse:l}=t;for(const c of o)if(s===c.direction&&(r!==c.nice||l!==c.reverse||a!==c.min&&(isFiniteNumber(a)||isFiniteNumber(c.min))||n!==c.max&&(isFiniteNumber(n)||isFiniteNumber(c.max)))){logger_exports.warnOnce("To allow synchronization, ensure that all charts have matching min, max, nice, and reverse properties on the synchronized axes."),this.enabled=!1;return}return unique(i.flatMap(c=>c.series).filter(c=>{if(c.visible){const h=c.getKeys(t.direction);return t.keys.length?t.keys.some(d=>h.includes(d)):!0}}).flatMap(c=>c.getDomain(t.direction)))}mergeZoom(t){const{zoomManager:e}=this.moduleContext;if(this.axes==="xy")return e.getZoom();const i=t.ctx.zoomManager.getZoom()??{};return i[this.axes]=e.getZoom()?.[this.axes],i}onEnabledChange(){const{syncManager:t}=this.moduleContext;this.enabled?t.subscribe(this.groupId):t.unsubscribe(this.groupId),this.updateSiblings(),this.onNodeInteractionChange(),this.onZoomChange()}onGroupIdChange(t,e){if(!this.enabled||t===e)return;const{syncManager:i}=this.moduleContext;i.unsubscribe(e),i.subscribe(t),this.updateSiblings(e),this.updateSiblings(t)}onAxesChange(){if(!this.enabled)return;const{syncManager:t}=this.moduleContext;this.updateChart(t.getChart())}onNodeInteractionChange(){this.enabled&&this.nodeInteraction?this.enabledNodeInteractionSync():this.disableNodeInteractionSync?.()}onZoomChange(){this.enabled&&this.zoom?this.enabledZoomSync():this.disableZoomSync?.()}destroy(){const{syncManager:t}=this.moduleContext;t.unsubscribe(this.groupId),this.updateSiblings(),this.disableZoomSync?.()}};ChartSync.className="Sync",__decorateClass([Validate49(BOOLEAN23),ObserveChanges5(t=>t.onEnabledChange())],ChartSync.prototype,"enabled",2),__decorateClass([Validate49(STRING22,{optional:!0}),ObserveChanges5((t,e,i)=>t.onGroupIdChange(e,i))],ChartSync.prototype,"groupId",2),__decorateClass([Validate49(UNION7(["x","y","xy"],"an axis")),ObserveChanges5(t=>t.onAxesChange())],ChartSync.prototype,"axes",2),__decorateClass([Validate49(BOOLEAN23),ObserveChanges5(t=>t.onNodeInteractionChange())],ChartSync.prototype,"nodeInteraction",2),__decorateClass([Validate49(BOOLEAN23),ObserveChanges5(t=>t.onZoomChange())],ChartSync.prototype,"zoom",2);var SyncModule={type:"root",optionsKey:"sync",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new ChartSync(t),themeTemplate:{sync:{enabled:!1}}},import_ag_charts_community140=require("ag-charts-community"),import_ag_charts_community131=require("ag-charts-community"),{COLOR_STRING:COLOR_STRING8,RATIO:RATIO10,Validate:Validate50}=import_ag_charts_community131._ModuleSupport,VALID_COLOR="#2196f3",INVALID_COLOR="#8a8a8a",ZoomRect=class extends import_ag_charts_community131._ModuleSupport.Rect{constructor(){super(...arguments),this.fill=VALID_COLOR,this.fillOpacity=.2,this.zIndex=import_ag_charts_community131._ModuleSupport.ZIndexMap.ZOOM_SELECTION}updateValid(){this.fill=VALID_COLOR}updateInvalid(){this.fill=INVALID_COLOR}};ZoomRect.className="ZoomRect",__decorateClass([Validate50(COLOR_STRING8)],ZoomRect.prototype,"fill",2),__decorateClass([Validate50(RATIO10)],ZoomRect.prototype,"fillOpacity",2);var import_ag_charts_community133=require("ag-charts-community"),import_ag_charts_community132=require("ag-charts-community"),{UNION:UNION8,clamp:clamp7,isNumberEqual:isNumberEqual8,round}=import_ag_charts_community132._ModuleSupport,UNIT={min:0,max:1},DEFAULT_ANCHOR_POINT_X="end",DEFAULT_ANCHOR_POINT_Y="middle",ANCHOR_POINT=UNION8(["pointer","start","middle","end"],"an anchor point"),constrain=(t,e=UNIT.min,i=UNIT.max)=>clamp7(e,t,i);function unitZoomState(){return{x:{...UNIT},y:{...UNIT}}}function dx(t){return t.x.max-t.x.min}function dy(t){return t.y.max-t.y.min}function isZoomRangeEqual(t,e,i=1e-10){return isNumberEqual8(t.min,e.min,i)&&isNumberEqual8(t.max,e.max,i)}function isZoomEqual(t,e,i){return isZoomRangeEqual(t.x,e.x,i)&&isZoomRangeEqual(t.y,e.y,i)}function definedZoomState(t){return{x:{min:t?.x?.min??UNIT.min,max:t?.x?.max??UNIT.max},y:{min:t?.y?.min??UNIT.min,max:t?.y?.max??UNIT.max}}}function pointToRatio(t,e,i){if(!t)return{x:0,y:0};const o=constrain(e-t.x,0,t.x+t.width),s=constrain(i-t.y,0,t.y+t.height),a=1/t.width*o,n=1-1/t.height*s;return{x:constrain(a),y:constrain(n)}}function translateZoom(t,e,i){return{x:{min:t.x.min+e,max:t.x.max+e},y:{min:t.y.min+i,max:t.y.max+i}}}function scaleZoom(t,e,i){return{x:{min:t.x.min,max:t.x.min+dx(t)*e},y:{min:t.y.min,max:t.y.min+dy(t)*i}}}function scaleZoomCenter(t,e,i){const o=dx(t),s=dy(t),a=t.x.min+o/2,n=t.y.min+s/2;return{x:{min:a-o*e/2,max:a+o*e/2},y:{min:n-s*i/2,max:n+s*i/2}}}function scaleZoomAxisWithAnchor(t,e,i,o){const{min:s,max:a}=e,n=s+(a-s)/2,r=t.max-t.min;switch(i){case"start":return{min:s,max:e.min+r};case"end":return{min:e.max-r,max:a};case"middle":return{min:n-r/2,max:n+r/2};case"pointer":return scaleZoomAxisWithPoint(t,e,o??n);default:return{min:s,max:a}}}function scaleZoomAxisWithPoint(t,e,i){const o=t.max-t.min,s=e.max-e.min,a=i*(1-(s-o)),n=i-a,r=t.min+n,l=t.max+n;return{min:r,max:l}}function multiplyZoom(t,e,i){return{x:{min:t.x.min*e,max:t.x.max*e},y:{min:t.y.min*i,max:t.y.max*i}}}function constrainZoom(t){return{x:constrainAxis(t.x),y:constrainAxis(t.y)}}function constrainAxis(t){const e=t.max-t.min;let i=t.max>UNIT.max?UNIT.max-e:t.min,o=t.min{const a=this.getRect();if(!a)return!0;const n=pointToRatio(a,s.x,s.y);return this.iterateFindNextZoomAtPoint(n)!=null}}),o=e.registerDefaultAction({id:CONTEXT_PAN_ACTION_ID,type:"series-area",label:"contextMenuPanToCursor",action:this.onPanToHere.bind(this),toggleEnabledOnShow:()=>!isZoomEqual(definedZoomState(this.zoomManager.getZoom()),unitZoomState())});return()=>{i(),o()}}computeOrigin(t){const e=this.getRect(),{enabled:i}=this.getModuleProperties();if(!i||!e||!t?.target||!(t instanceof MouseEvent))return;const o={x:0,y:0,width:e.width,height:e.height};return pointToRatio(o,t.offsetX,t.offsetY)}onZoomToHere({event:t}){const e=this.computeOrigin(t);if(!e)return;const i=this.iterateFindNextZoomAtPoint(e);i!=null&&this.updateZoom(i)}onPanToHere({event:t}){const e=this.computeOrigin(t);if(!e)return;const i=definedZoomState(this.zoomManager.getZoom()),o=dx(i),s=dy(i),a=e.x*o,n=e.y*s,r=(UNIT.max-UNIT.min)/2;let l={x:{min:e.x-r,max:e.x+r},y:{min:e.y-r,max:e.y+r}};l=scaleZoomCenter(l,o,s),l=translateZoom(l,i.x.min-e.x+a,i.y.min-e.y+n),this.updateZoom(constrainZoom(l))}iterateFindNextZoomAtPoint(t){const{scrollingStep:e}=this.getModuleProperties();for(let i=e;i<=1-e;i+=e){const o=this.getNextZoomAtPoint(t,i);if(this.isZoomValid(o))return o}}getNextZoomAtPoint(t,e){const{isScalingX:i,isScalingY:o}=this.getModuleProperties(),s=definedZoomState(this.zoomManager.getZoom()),a=t.x*dx(s),n=t.y*dy(s),r=UNIT.max-UNIT.min,l=r/2;let c={x:{min:t.x-l,max:t.x+l},y:{min:t.y-l,max:t.y+l}};return c=scaleZoomCenter(c,i?dx(s)*e:r,o?dy(s)*e:r),c=translateZoom(c,s.x.min-t.x+a,s.y.min-t.y+n),constrainZoom(c)}},import_ag_charts_community134=require("ag-charts-community"),{BBoxValues}=import_ag_charts_community134._ModuleSupport,ZoomDOMProxy=class{constructor(t){this.axesHandlers=t,this.axes=[]}initAxis(t,e,i,o){const{X:s,Y:a}=import_ag_charts_community134._ModuleSupport.ChartAxisDirection,n={[s]:"ew-resize",[a]:"ns-resize"}[o],r="afterend",l=t.proxyInteractionService.createProxyElement({type:"region",domManagerId:e,where:r});return l.setCursor(n),l.addListener("drag-start",c=>{c.device==="touch"&&c.sourceEvent.preventDefault(),i.onDragStart(e,o)}),l.addListener("drag-move",c=>i.onDrag(c)),l.addListener("drag-end",i.onDragEnd),l.addListener("dblclick",()=>i.onDoubleClick(e,o)),{axisId:e,div:l}}destroy(){this.axes.forEach(t=>t.div.destroy())}update(t,e){if(this.axes.forEach(r=>r.div.setHidden(!t)),!t)return;const{X:i,Y:o}=import_ag_charts_community134._ModuleSupport.ChartAxisDirection,s=[...e.axisManager.getAxisContext(i),...e.axisManager.getAxisContext(o)],{removed:a,added:n}=this.diffAxisIds(s);a.length>0&&(this.axes=this.axes.filter(r=>a.includes(r.axisId)?(r.div.destroy(),!1):!0));for(const r of n){const{axisId:l,direction:c}=r;this.axes.push(this.initAxis(e,l,this.axesHandlers,c))}for(const r of this.axes){const c=s.filter(h=>h.axisId===r.axisId)[0].getCanvasBounds();r.div.setHidden(BBoxValues.isEmpty(c)),c!==void 0&&r.div.setBounds(c)}}diffAxisIds(t){const e=this.axes.map(a=>a.axisId),i=t.map(a=>a.axisId),o=e.filter(a=>!i.includes(a)),s=t.filter(a=>!e.includes(a.axisId));return{removed:o,added:s}}},import_ag_charts_community135=require("ag-charts-community"),maxZoomCoords=16,decelerationValues={off:1,short:.01,long:.002},ZoomPanner=class{constructor(){this.deceleration=1,this.zoomCoordsHistoryIndex=0,this.coordsHistory=[]}get decelerationValue(){const{deceleration:t}=this;return Math.max(typeof t=="number"?t:decelerationValues[t]??1,1e-4)}addListener(t,e){return this.onUpdate=e,()=>{this.onUpdate=void 0}}stopInteractions(){this.inertiaHandle!=null&&(cancelAnimationFrame(this.inertiaHandle),this.inertiaHandle=void 0)}update(t){this.updateCoords(t.currentX,t.currentY);const{x1:e=0,y1:i=0,x2:o=0,y2:s=0}=this.coords??{};this.onUpdate?.({type:"update",deltaX:e-o,deltaY:i-s})}start(){this.coordsMonitorTimeout=setInterval(this.recordCurrentZoomCoords.bind(this),16)}stop(){const{coordsHistory:t}=this;let e=0,i=0,o=0;if(t.length>0){const s=this.zoomCoordsHistoryIndex%maxZoomCoords;let a=s-1;a<0&&(a=t.length-1);let n=s;n>=t.length&&(n=0);const r=t[a],l=t[n];e=r.x-l.x,i=r.y-l.y,o=r.t-l.t}if(this.coords=void 0,clearInterval(this.coordsMonitorTimeout),this.coordsMonitorTimeout=void 0,this.zoomCoordsHistoryIndex=0,this.coordsHistory.length=0,o>0&&this.decelerationValue<1){const s=e/o,a=i/o,n=Math.hypot(s,a),r=Math.atan2(a,s),l=performance.now();this.inertiaHandle=import_ag_charts_community135._ModuleSupport.getWindow().requestAnimationFrame(c=>{this.animateInertia(c,c,l,n,r)})}}recordCurrentZoomCoords(){const{coords:t,coordsHistory:e,zoomCoordsHistoryIndex:i}=this;if(!t)return;const{x2:o,y2:s}=t,a=Date.now();e[i%maxZoomCoords]={x:o,y:s,t:a},this.zoomCoordsHistoryIndex+=1}animateInertia(t,e,i,o,s){const a=1-this.decelerationValue,n=-o/Math.log(a),r=o*(a**(e-i)-1)/Math.log(a),l=o*(a**(t-i)-1)/Math.log(a);this.onUpdate?.({type:"update",deltaX:-Math.cos(s)*(l-r),deltaY:-Math.sin(s)*(l-r)}),!(l>=n-1)&&(this.inertiaHandle=requestAnimationFrame(c=>{this.animateInertia(c,t,i,o,s)}))}updateCoords(t,e){this.coords?this.coords={x1:this.coords.x2,y1:this.coords.y2,x2:t,y2:e}:this.coords={x1:t,y1:e,x2:t,y2:e}}translateZooms(t,e,i,o){const s=pointToRatio(t,t.x+Math.abs(i),t.y+t.height-Math.abs(o)),a=Math.sign(i)*s.x,n=-Math.sign(o)*s.y,r={};for(const[l,{direction:c,zoom:h}]of Object.entries(e)){if(h&&h.min===UNIT.min&&h.max===UNIT.max)continue;let d=definedZoomState({[c]:h});d=constrainZoom(translateZoom(d,a*dx(d),n*dy(d))),r[l]={direction:c,zoom:d[c]}}return r}},import_ag_charts_community136=require("ag-charts-community"),DELTA_SCALE=200,ZoomScrollPanner=class{update(t,e,i,o){const s=t.deltaX*e*DELTA_SCALE;return this.translateZooms(i,o,s)}translateZooms(t,e,i){const o={},s=pointToRatio(t,t.x+Math.abs(i),0),a=i<0?-s.x:s.x;for(const[n,{direction:r,zoom:l}]of Object.entries(e)){if(r!==import_ag_charts_community136._ModuleSupport.ChartAxisDirection.X)continue;let c=definedZoomState({x:l});c=constrainZoom(translateZoom(c,a*dx(c),0)),o[n]={direction:r,zoom:c.x}}return o}},import_ag_charts_community137=require("ag-charts-community"),ZoomScroller=class{updateAxes(t,e,i,o){const s=t.sourceEvent,a={},{anchorPointX:n,anchorPointY:r,isScalingX:l,isScalingY:c,scrollingStep:h}=e,d=pointToRatio(i,s.offsetX??s.clientX,s.offsetY??s.clientY);for(const[u,{direction:p,zoom:g}]of Object.entries(o)){if(g==null)continue;let y={...g};const f=h*t.deltaY*(g.max-g.min);if(p===import_ag_charts_community137._ModuleSupport.ChartAxisDirection.X&&l)y.max+=f,y=scaleZoomAxisWithAnchor(y,g,n,d.x);else if(p===import_ag_charts_community137._ModuleSupport.ChartAxisDirection.Y&&c)y.max+=f,y=scaleZoomAxisWithAnchor(y,g,r,d.y);else continue;a[u]={direction:p,zoom:constrainAxis(y)}}return a}update(t,e,i,o){const{anchorPointX:s,anchorPointY:a,isScalingX:n,isScalingY:r,scrollingStep:l}=e,c=t.offsetX+i.x,h=t.offsetY+i.y,d=pointToRatio(i,c,h),u=t.deltaY;let p=definedZoomState(o);return p.x.max+=n?l*u*dx(o):0,p.y.max+=r?l*u*dy(o):0,n&&(p.x=scaleZoomAxisWithAnchor(p.x,o.x,s,d.x)),r&&(p.y=scaleZoomAxisWithAnchor(p.y,o.y,a,d.y)),p=constrainZoom(p),p}updateDelta(t,e,i){const{anchorPointX:o,anchorPointY:s,isScalingX:a,isScalingY:n,scrollingStep:r}=e;let l=definedZoomState(i);return l.x.max+=a?r*-t*dx(i):0,l.y.max+=n?r*-t*dy(i):0,a&&(l.x=scaleZoomAxisWithAnchor(l.x,i.x,o)),n&&(l.y=scaleZoomAxisWithAnchor(l.y,i.y,s)),l=constrainZoom(l),l}},ZoomSelector=class{constructor(t,e,i){this.rect=t,this.getZoom=e,this.isZoomValid=i,this.rect.visible=!1}update(t,e,i){const o=t.currentX+(i?.x??0),s=t.currentY+(i?.y??0);this.rect.visible=!0,this.updateCoords(o,s,e,i),this.updateRect(i)}stop(t,e,i){let o=definedZoomState();if(!t||!e)return o;this.coords&&(o=this.createZoomFromCoords(e,i));const s=e.width/t.width,a=e.height/t.height;return o=constrainZoom(multiplyZoom(o,s,a)),this.reset(),o}reset(){this.coords=void 0,this.rect.visible=!1}didUpdate(){return this.rect.visible&&this.rect.width>0&&this.rect.height>0}updateCoords(t,e,i,o){if(!this.coords){this.coords={x1:t,y1:e,x2:t,y2:e};return}const{coords:s}=this;if(s.x2=t,s.y2=e,!o)return;const{isScalingX:a,isScalingY:n,keepAspectRatio:r}=i,l=this.getNormalisedDimensions();if(r&&a&&n){const c=o.width/o.height;s.y2r&&sUNIT.min;break;case"pan-end":o=t.x.maxUNIT.min;break;case"pan-right":o=t.x.maxg.identifier=0),this.previous.a1=NaN,this.previous.a2=NaN,this.previous.b1=NaN,this.previous.b2=NaN;for(const g of[0,1]){const y=o[g].clientX,f=a+r-o[g].clientY;this.touchStart.origins[g].identifier=o[g].identifier,this.touchStart.origins[g].normalX=clientToNormal(this.initialZoom.x,y,s,n),this.touchStart.origins[g].normalY=clientToNormal(this.initialZoom.y,f,a,r)}const[l,c]=o,[h,d]=this.touchStart.origins,u=isRangeOverlapping(l.clientX,l.radiusX,c.clientX,c.radiusX);return isRangeOverlapping(l.clientY,l.radiusY,c.clientY,c.radiusY)&&(h.normalY=d.normalY=(h.normalY+d.normalY)/2),u&&(h.normalX=d.normalX=(h.normalX+d.normalX)/2),!0}update(t,e){t.sourceEvent.preventDefault();const i=Array.from(t.sourceEvent.targetTouches),{x:o,y:s,width:a,height:n}=e.getBoundingClientRect(),{origins:r}=this.touchStart,l=[0,1].map(m=>i.find(b=>b.identifier===r[m].identifier)),c=r[0].normalX,h=r[1].normalX,d=l[0].clientX,u=l[1].clientX,p=r[0].normalY,g=r[1].normalY,y=s+n-l[0].clientY,f=s+n-l[1].clientY;return this.twitchTolerantZoomPan4(c,h,d,u,p,g,y,f,o,s,a,n)}end(t){const e=Array.from(t.sourceEvent.targetTouches).map(i=>i.identifier);return!e.includes(this.touchStart.origins[0].identifier)||!e.includes(this.touchStart.origins[1].identifier)}twitchTolerantZoomPan4(t,e,i,o,s,a,n,r,l,c,h,d){const{initialZoom:u,previous:p}=this,g=twitchTolerantZoomPan2(t,e,i,o,p,"a1","a2",l,h,u.x),y=twitchTolerantZoomPan2(s,a,n,r,p,"b1","b2",c,d,u.y);return{x:g,y}}};function twitchTolerantZoomPan2(t,e,i,o,s,a,n,r,l,c){if(t!=e){const h=s[a],d=s[n];return Math.abs(i-h)+Math.abs(o-d)<=1?(i=h,o=d):(s[a]=i,s[n]=o),solveTwoUnknowns(t,e,i,o,r,l)}else{const h=clientToNormal(c,i,r,l),d=clientToNormal(c,o,r,l),u=(h+d)/2,p=(t-u)/N;return{min:c.min+p,max:c.max+p}}}var{BOOLEAN:BOOLEAN25,NUMBER:NUMBER13,POSITIVE_NUMBER:POSITIVE_NUMBER13,RATIO:RATIO11,UNION:UNION10,OBJECT:OBJECT21,OR:OR4,ActionOnSet:ActionOnSet9,ChartAxisDirection:ChartAxisDirection16,ChartUpdateType:ChartUpdateType3,Deprecated,Validate:Validate52,InteractionState:InteractionState4,ProxyProperty:ProxyProperty3,round:sharedRound}=import_ag_charts_community140._ModuleSupport,round2=t=>sharedRound(t,10),CURSOR_ID="zoom-cursor",TOOLTIP_ID="zoom-tooltip",ZoomAutoScaling=class extends import_ag_charts_community140._ModuleSupport.BaseProperties{constructor(t){super(),this.onChange=t,this.enabled=!1,this.padding=0}};__decorateClass([Validate52(BOOLEAN25),ActionOnSet9({changeValue(t){this.onChange({enabled:t,padding:this.padding})}})],ZoomAutoScaling.prototype,"enabled",2),__decorateClass([Validate52(RATIO11),ActionOnSet9({changeValue(t){this.onChange({enabled:this.enabled,padding:t})}})],ZoomAutoScaling.prototype,"padding",2);var Zoom=class extends import_ag_charts_community140._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.enableAxisDragging=!0,this.enableDoubleClickToReset=!0,this.enablePanning=!0,this.enableScrolling=!0,this.enableSelecting=!1,this.enableTwoFingerZoom=!0,this.panKey="alt",this.axes="x",this.scrollingStep=(UNIT.max-UNIT.min)/10,this.keepAspectRatio=!1,this.minVisibleItems=2,this.anchorPointX=DEFAULT_ANCHOR_POINT_X,this.anchorPointY=DEFAULT_ANCHOR_POINT_Y,this.autoScaling=new ZoomAutoScaling(i=>{this.ctx.zoomManager.setAutoScaleYAxis(i.enabled,i.padding)}),this.buttons=new ZoomToolbar(this.ctx,this.getModuleProperties.bind(this),this.getResetZoom.bind(this),this.updateZoom.bind(this),this.updateAxisZoom.bind(this),this.resetZoom.bind(this),this.isZoomValid.bind(this)),this.axisDragger=new ZoomAxisDragger,this.panner=new ZoomPanner,this.scroller=new ZoomScroller,this.scrollPanner=new ZoomScrollPanner,this.twoFingers=new ZoomTwoFingers,this.deceleration="short",this.dragState=0,this.isState=i=>this.ctx.interactionManager.isState(i),this.destroyContextMenuActions=void 0,this.isFirstWheelEvent=!0,this.debouncedWheelReset=debounce(()=>{this.isFirstWheelEvent=!0},100);const e=new ZoomRect;this.selector=new ZoomSelector(e,this.getZoom.bind(this),this.isZoomValid.bind(this)),this.contextMenu=new ZoomContextMenu(t.contextMenuRegistry,t.zoomManager,this.getModuleProperties.bind(this),()=>this.paddedRect,this.updateZoom.bind(this),this.isZoomValid.bind(this)),this.domProxy=new ZoomDOMProxy({onDragStart:(i,o)=>this.onAxisDragStart(i,o),onDrag:i=>{this.onDragMove({...i,currentX:i.offsetX,currentY:i.offsetY})},onDragEnd:()=>this.onDragEnd(),onDoubleClick:(i,o)=>{this.hoveredAxis={id:i,direction:o},this.onDoubleClick(),this.hoveredAxis=void 0}}),this.destroyFns.push(t.scene.attachNode(e),t.chartEventManager.addListener("series-keynav-zoom",i=>this.onNavZoom(i)),t.widgets.seriesDragInterpreter.addListener("dblclick",i=>this.onDoubleClick(i)),t.widgets.seriesDragInterpreter.addListener("drag-move",i=>this.onDragMove(i)),t.widgets.seriesDragInterpreter.addListener("drag-start",i=>this.onDragStart(i)),t.widgets.seriesDragInterpreter.addListener("drag-end",()=>this.onDragEnd()),t.widgets.seriesWidget.addListener("wheel",i=>this.onWheel(i)),t.widgets.seriesWidget.addListener("touchstart",(i,o)=>this.onTouchStart(i,o)),t.widgets.seriesWidget.addListener("touchmove",(i,o)=>this.onTouchMove(i,o)),t.widgets.seriesWidget.addListener("touchend",i=>this.onTouchEnd(i)),t.widgets.seriesWidget.addListener("touchcancel",i=>this.onTouchEnd(i)),t.updateService.addListener("process-data",i=>this.onProcessData(i)),t.layoutManager.addListener("layout:complete",i=>this.onLayoutComplete(i)),t.zoomManager.addListener("zoom-change",i=>this.onZoomChange(i)),t.zoomManager.addListener("zoom-pan-start",i=>this.onZoomPanStart(i)),this.panner.addListener("update",i=>this.onPanUpdate(i)),()=>this.teardown())}teardown(){this.ctx.zoomManager.setZoomModuleEnabled(!1),this.buttons.destroy(),this.destroyContextMenuActions?.()}onEnabledChange(t){this.ctx.zoomManager.setZoomModuleEnabled(t),this.contextMenu&&(this.destroyContextMenuActions?.(),this.destroyContextMenuActions=this.contextMenu.registerActions(t))}isIgnoredTouch(t){if(t?.device!=="touch")return!1;if(this.ctx.chartService.touch.dragAction!=="drag")return!0;if(this.enableSelecting)return!1;if(!this.enablePanning)return!0;const{x:e,y:i}=this.getZoom();return e.min===0&&e.max===1&&i.min===0&&i.max===1}onDoubleClick(t){const{enabled:e,enableDoubleClickToReset:i,hoveredAxis:o,ctx:{zoomManager:s}}=this;!e||!i||!this.isState(InteractionState4.ZoomClickable)||(o?s.resetAxisZoom("zoom",o.id):t?.preventZoomDblClick||this.resetZoom())}onDragStart(t){const{enabled:e,enableAxisDragging:i,enablePanning:o,enableSelecting:s,hoveredAxis:a,ctx:{domManager:n,zoomManager:r}}=this;if(!e||!this.hoveredAxis&&(!this.isState(InteractionState4.ZoomDraggable)||this.dragState!==0||this.isIgnoredTouch(t)))return;this.panner.stopInteractions();let l=0;if(i&&a)l=1;else if(t!=null){const c=this.isPanningKeyPressed(t.sourceEvent);o&&(!s||c)?(n.updateCursor(CURSOR_ID,"grabbing"),l=2,this.panner.start()):s&&!c&&(l=3)}(this.dragState=l)!==0&&r.fireZoomPanStartEvent("zoom")}onDragMove(t){const{anchorPointX:e,anchorPointY:i,axisDragger:o,dragState:s,enabled:a,paddedRect:n,panner:r,selector:l,seriesRect:c,shouldFlipXY:h,hoveredAxis:d,ctx:{interactionManager:u,tooltipManager:p,updateService:g,zoomManager:y}}=this;if(!a||!n||!c||!d&&(!this.isState(InteractionState4.ZoomDraggable)||this.isIgnoredTouch(t)))return;u.pushState(import_ag_charts_community140._ModuleSupport.InteractionState.ZoomDrag),t.device==="touch"&&t.sourceEvent.preventDefault();const f=this.getZoom();switch(s){case 1:{if(!d)break;const{id:m,direction:b}=d;let x=b===ChartAxisDirection16.X?e:i;h&&(x=b===ChartAxisDirection16.X?i:e);const S=y.getAxisZoom(m),M=o.update(t,b,x,c,f,S);y.setAxisManuallyAdjusted("zoom",m),this.updateAxisZoom(m,b,M);break}case 2:r.update(t);break;case 3:l.update(t,this.getModuleProperties(),n);break;case 0:return}p.updateTooltip(TOOLTIP_ID),g.update(ChartUpdateType3.PERFORM_LAYOUT,{skipAnimations:!0})}onDragEnd(){const{axisDragger:t,dragState:e,enabled:i,panner:o,selector:s,ctx:{domManager:a,interactionManager:n,tooltipManager:r}}=this;if(n.popState(import_ag_charts_community140._ModuleSupport.InteractionState.ZoomDrag),!(!i||e===0)){switch(e){case 1:this.hoveredAxis=void 0,t.stop();break;case 2:o.stop();break;case 3:{if(!s.didUpdate())break;const l=this.getZoom(),c=s.stop(this.seriesRect,this.paddedRect,l);this.updateZoom(c);break}}this.dragState=0,a.updateCursor(CURSOR_ID),r.removeTooltip(TOOLTIP_ID)}}onNavZoom(t){const{enabled:e,enableScrolling:i,scroller:o}=this;!this.ctx.interactionManager.isState(import_ag_charts_community140._ModuleSupport.InteractionState.Default)||!e||!i||(t.widgetEvent.sourceEvent.preventDefault(),this.updateZoom(o.updateDelta(t.delta,this.getModuleProperties(),this.getZoom())))}onWheel(t){const{enabled:e,enablePanning:i,enableScrolling:o,paddedRect:s}=this;if(!e||!o||!s||!this.isState(InteractionState4.ZoomWheelable))return;const{deltaX:a,deltaY:n}=t.sourceEvent,r=a!=null&&n!=null&&Math.abs(a)>Math.abs(n);i&&r?this.onWheelPanning(t):this.onWheelScrolling(t)}onWheelPanning(t){const{scrollingStep:e,scrollPanner:i,seriesRect:o,ctx:{zoomManager:s}}=this;if(!o)return;t.sourceEvent.preventDefault();const a=i.update(t,e,o,s.getAxisZooms());for(const[n,{direction:r,zoom:l}]of Object.entries(a))this.updateAxisZoom(n,r,l)}onWheelScrolling(t){const{enableAxisDragging:e,enableIndependentAxes:i,hoveredAxis:o,scroller:s,seriesRect:a,ctx:{zoomManager:n}}=this;if(!a)return;const r=this.getZoom();let l=t.deltaY>0&&this.isMaxZoom(r);const c=e&&o!=null;let h=this.isScalingX(),d=this.isScalingY();c&&(h=o.direction===import_ag_charts_community140._ModuleSupport.ChartAxisDirection.X,d=!h);const u=this.getModuleProperties({isScalingX:h,isScalingY:d});let p=!0;if(i===!0){const g=s.updateAxes(t,u,a,n.getAxisZooms());for(const[y,{direction:f,zoom:m}]of Object.entries(g))c&&o.id!==y||p&&(p=this.updateAxisZoom(y,f,m))}else{const g=s.update(t,u,a,this.getZoom());p=this.updateUnifiedZoom(g)}l||(l=t.deltaY<0&&!p),(!this.isFirstWheelEvent||!l)&&t.sourceEvent.preventDefault(),this.isFirstWheelEvent=!1,this.debouncedWheelReset()}onAxisDragStart(t,e){this.hoveredAxis={id:t,direction:e},this.onDragStart(void 0)}onTouchStart(t,e){!this.enableTwoFingerZoom||this.dragState!==0||this.twoFingers.start(t,e,this.getZoom())&&(this.dragState=4)}onTouchMove(t,e){if(!this.enableTwoFingerZoom||this.dragState!==4)return;const i=this.twoFingers.update(t,e);this.updateZoom(constrainZoom(i))}onTouchEnd(t){!this.enableTwoFingerZoom||this.dragState!==4||(t.sourceEvent.preventDefault(),this.twoFingers.end(t)&&(this.dragState=0))}onProcessData(t){this.shouldFlipXY=t.series.shouldFlipXY}onLayoutComplete(t){this.domProxy.update(this.enableAxisDragging,this.ctx);const{enabled:e}=this;if(!e)return;const{series:{rect:i,paddedRect:o}}=t;this.seriesRect=i,this.paddedRect=o}onZoomChange(t){t.callerId!=="zoom"&&this.panner.stopInteractions();const e=this.getZoom();this.buttons.toggleVisibleZoomed(this.isMaxZoom(e))}onZoomPanStart(t){t.callerId==="zoom"&&this.panner.stopInteractions()}onPanUpdate(t){const{panner:e,seriesRect:i,ctx:{tooltipManager:o,zoomManager:s}}=this;if(!i)return;const a=e.translateZooms(i,s.getAxisZooms(),t.deltaX,t.deltaY);for(const[n,{direction:r,zoom:l}]of Object.entries(a))this.updateAxisZoom(n,r,l);o.updateTooltip(TOOLTIP_ID)}isPanningKeyPressed(t){switch(this.panKey){case"alt":return t.altKey;case"ctrl":return t.ctrlKey;case"shift":return t.shiftKey;case"meta":return t.metaKey}}isScalingX(){return this.axes==="xy"?!0:this.shouldFlipXY?this.axes==="y":this.axes==="x"}isScalingY(){return this.axes==="xy"?!0:this.shouldFlipXY?this.axes==="x":this.axes==="y"}getAnchorPointX(){return this.shouldFlipXY?this.anchorPointY:this.anchorPointX}getAnchorPointY(){return this.shouldFlipXY?this.anchorPointX:this.anchorPointY}isMaxZoom(t){return isZoomEqual(t,unitZoomState())}isZoomValid(t){const{minVisibleItems:e,minVisibleItemsX:i,minVisibleItemsY:o,ctx:{zoomManager:s}}=this;if(e===0)return!0;const a=this.getZoom(),n=round2(dx(t))=l||a.isVisibleItemsCountAtLeast(c,h??i)}resetZoom(){this.ctx.zoomManager.resetZoom("zoom")}updateZoom(t){this.enableIndependentAxes?this.updatePrimaryAxisZooms(t):this.updateUnifiedZoom(t)}updateUnifiedZoom(t){return this.isZoomValid(t)?(this.ctx.zoomManager.updateZoom("zoom",t),!0):(this.ctx.updateService.update(ChartUpdateType3.SCENE_RENDER,{skipAnimations:!0}),!1)}updatePrimaryAxisZooms(t){this.updatePrimaryAxisZoom(t,ChartAxisDirection16.X),this.updatePrimaryAxisZoom(t,ChartAxisDirection16.Y)}updatePrimaryAxisZoom(t,e){const i=this.ctx.zoomManager.getPrimaryAxisId(e);i!=null&&this.updateAxisZoom(i,e,t[e])}updateAxisZoom(t,e,i){const{enableIndependentAxes:o,ctx:{zoomManager:s}}=this;if(!i)return!1;const a=this.getZoom();return o!==!0?(a[e]=i,this.updateUnifiedZoom(a)):this.isAxisZoomValid(e,i)?(s.updateAxisZoom("zoom",t,i),!0):!1}getZoom(){return definedZoomState(this.ctx.zoomManager.getZoom())}getResetZoom(){return definedZoomState(this.ctx.zoomManager.getRestoredZoom())}getModuleProperties(t){return{anchorPointX:t?.anchorPointX??this.getAnchorPointX(),anchorPointY:t?.anchorPointY??this.getAnchorPointY(),enabled:t?.enabled??this.enabled,independentAxes:t?.independentAxes??this.enableIndependentAxes===!0,isScalingX:t?.isScalingX??this.isScalingX(),isScalingY:t?.isScalingY??this.isScalingY(),keepAspectRatio:t?.keepAspectRatio??this.keepAspectRatio,scrollingStep:t?.scrollingStep??this.scrollingStep}}};__decorateClass([ActionOnSet9({newValue(t){this.onEnabledChange(t)}}),Validate52(BOOLEAN25)],Zoom.prototype,"enabled",2),__decorateClass([Validate52(BOOLEAN25)],Zoom.prototype,"enableAxisDragging",2),__decorateClass([Validate52(BOOLEAN25)],Zoom.prototype,"enableDoubleClickToReset",2),__decorateClass([ActionOnSet9({changeValue(t){this.ctx.zoomManager.setIndependentAxes(!!t)}}),Validate52(BOOLEAN25,{optional:!0})],Zoom.prototype,"enableIndependentAxes",2),__decorateClass([Validate52(BOOLEAN25)],Zoom.prototype,"enablePanning",2),__decorateClass([Validate52(BOOLEAN25)],Zoom.prototype,"enableScrolling",2),__decorateClass([Validate52(BOOLEAN25)],Zoom.prototype,"enableSelecting",2),__decorateClass([Validate52(BOOLEAN25)],Zoom.prototype,"enableTwoFingerZoom",2),__decorateClass([Validate52(UNION10(["alt","ctrl","meta","shift"],"a pan key"))],Zoom.prototype,"panKey",2),__decorateClass([Validate52(UNION10(["x","y","xy"],"an axis"))],Zoom.prototype,"axes",2),__decorateClass([Validate52(RATIO11)],Zoom.prototype,"scrollingStep",2),__decorateClass([Validate52(BOOLEAN25)],Zoom.prototype,"keepAspectRatio",2),__decorateClass([Validate52(POSITIVE_NUMBER13)],Zoom.prototype,"minVisibleItems",2),__decorateClass([Deprecated("Use [minVisibleItems] instead."),Validate52(NUMBER13.restrict({min:1}))],Zoom.prototype,"minVisibleItemsX",2),__decorateClass([Deprecated("Use [minVisibleItems] instead."),Validate52(NUMBER13.restrict({min:1}))],Zoom.prototype,"minVisibleItemsY",2),__decorateClass([Validate52(ANCHOR_POINT)],Zoom.prototype,"anchorPointX",2),__decorateClass([Validate52(ANCHOR_POINT)],Zoom.prototype,"anchorPointY",2),__decorateClass([Validate52(OBJECT21)],Zoom.prototype,"autoScaling",2),__decorateClass([Validate52(OBJECT21)],Zoom.prototype,"buttons",2),__decorateClass([ProxyProperty3("panner.deceleration"),Validate52(OR4(RATIO11,UNION10(["off","short","long"],"a deceleration")))],Zoom.prototype,"deceleration",2);var buttons={enabled:!0,visible:"hover",buttons:[{icon:"zoom-out",tooltip:"toolbarZoomZoomOut",value:"zoom-out",section:"scale"},{icon:"zoom-in",tooltip:"toolbarZoomZoomIn",value:"zoom-in",section:"scale"},{icon:"pan-left",tooltip:"toolbarZoomPanLeft",value:"pan-left",section:"pan"},{icon:"pan-right",tooltip:"toolbarZoomPanRight",value:"pan-right",section:"pan"},{icon:"reset",tooltip:"toolbarZoomReset",value:"reset",section:"reset"}]},ZoomModule={type:"root",optionsKey:"zoom",packageType:"enterprise",chartTypes:["cartesian","topology"],moduleFactory:t=>new Zoom(t),themeTemplate:{zoom:{anchorPointX:"end",anchorPointY:"middle",axes:"x",buttons,enabled:!1,enableAxisDragging:!0,enableDoubleClickToReset:!0,enablePanning:!0,enableScrolling:!0,enableSelecting:!1,enableTwoFingerZoom:!0,deceleration:"short",minVisibleItems:2,panKey:"alt",scrollingStep:.1,autoScaling:{enabled:!1,padding:.05}}}},import_ag_charts_community142=require("ag-charts-community"),import_ag_charts_community141=require("ag-charts-community"),{BOOLEAN:BOOLEAN26,OBJECT:OBJECT22,POSITION,POSITIVE_NUMBER:POSITIVE_NUMBER14,BaseProperties:BaseProperties18,AxisTicks,ZIndexMap:ZIndexMap8,ProxyProperty:ProxyProperty4,Validate:Validate53,LayoutElement:LayoutElement5,createId:createId4,Group:Group8,Rect:Rect2,Marker,TranslatableGroup:TranslatableGroup3,LinearGradient}=import_ag_charts_community141._ModuleSupport,GradientBar=class extends BaseProperties18{constructor(){super(...arguments),this.thickness=16,this.preferredLength=100}};__decorateClass([Validate53(POSITIVE_NUMBER14)],GradientBar.prototype,"thickness",2),__decorateClass([Validate53(POSITIVE_NUMBER14)],GradientBar.prototype,"preferredLength",2);var GradientLegendScale=class{constructor(t){this.axisTicks=t}};__decorateClass([ProxyProperty4("axisTicks.label")],GradientLegendScale.prototype,"label",2),__decorateClass([ProxyProperty4("axisTicks.interval")],GradientLegendScale.prototype,"interval",2),__decorateClass([ProxyProperty4("axisTicks.padding")],GradientLegendScale.prototype,"padding",2);var GradientLegend=class{constructor(t){this.ctx=t,this.id=createId4(this),this.legendGroup=new TranslatableGroup3({name:"legend",zIndex:ZIndexMap8.LEGEND}),this.gradientRect=new Rect2,this.arrow=new Marker({shape:"triangle"}),this.ticksGroup=new Group8({name:"legend-axis-group"}),this.destroyFns=[],this.enabled=!1,this.position="bottom",this.reverseOrder=!1,this.gradient=new GradientBar,this.spacing=20,this.data=[],this.highlightManager=t.highlightManager,this.axisTicks=new AxisTicks,this.axisTicks.attachAxis(this.ticksGroup),this.scale=new GradientLegendScale(this.axisTicks),this.legendGroup.append([this.gradientRect,this.arrow,this.ticksGroup]),this.destroyFns.push(t.highlightManager.addListener("highlight-change",()=>this.onChartHoverChange()),t.layoutManager.registerElement(LayoutElement5.Legend,e=>this.onStartLayout(e)),()=>this.legendGroup.remove())}isVertical(){return this.position==="right"||this.position==="left"}destroy(){this.destroyFns.forEach(t=>t())}attachLegend(t){t.appendChild(this.legendGroup)}onStartLayout(t){const[e]=this.data;if(!this.enabled||!e?.enabled){this.legendGroup.visible=!1;return}const{colorRange:i}=this.normalizeColorArrays(e);this.updateGradientRect(t.layoutBox,i);const o=this.updateAxis(e),{left:s,top:a}=this.getMeasurements(t.layoutBox,o);this.updateArrow(),this.legendGroup.visible=!0,this.legendGroup.translationX=s,this.legendGroup.translationY=a}normalizeColorArrays(t){let e=t.colorDomain.slice();const i=t.colorRange.slice();if(e.length===i.length)return{colorDomain:e,colorRange:i};e.length>i.length&&i.splice(e.length);const[o,s]=e,a=i.length;return e=i.map((n,r)=>r===0?o:r===a-1?s:o+(s-o)*r/(a-1)),{colorDomain:e,colorRange:i}}updateGradientRect(t,e){const{gradientRect:i}=this,{preferredLength:o,thickness:s}=this.gradient;let a;this.isVertical()?(a=0,i.width=s,i.height=Math.min(t.height,o)):(a=90,i.width=Math.min(t.width,o),i.height=s),i.fill=new LinearGradient("oklch",e.map((n,r)=>({offset:r/(e.length-1),color:n})),a)}updateAxis(t){const{axisTicks:e}=this,i=this.isVertical(),o=this.reverseOrder!==i;return e.position=this.position,e.translationX=i?this.gradient.thickness:0,e.translationY=i?0:this.gradient.thickness,e.scale.domain=o?t.colorDomain.slice().reverse():t.colorDomain,e.scale.range=i?[0,this.gradientRect.height]:[0,this.gradientRect.width],e.calculateLayout()}updateArrow(){const t=this.highlightManager.getActiveHighlight(),{arrow:e}=this;if(t?.colorValue==null){e.visible=!1;return}const{scale:i,label:o}=this.axisTicks,s=o.fontSize??0,a=i.convert(t.colorValue);let{x:n,y:r}=this.gradientRect,l=Math.PI;this.isVertical()?(n-=s/2,r+=a,l/=2):(n+=a,r-=s/2),e.visible=!0,e.fill=o.color,e.rotation=l,e.size=s,e.translationX=n,e.translationY=r}getMeasurements(t,e){let{x:i,y:o}=t,{width:s,height:a}=this.gradientRect;switch(this.isVertical()?s+=e.width+5:a+=e.height+5,this.position){case"left":o+=t.height/2-a/2,t.shrink(s+this.spacing,"left");break;case"right":i+=t.width-s,o+=t.height/2-a/2,t.shrink(s+this.spacing,"right");break;case"top":i+=t.width/2-s/2,t.shrink(a+this.spacing,"top");break;case"bottom":i+=t.width/2-s/2,o+=t.height-a,t.shrink(a+this.spacing,"bottom")}return{top:o,left:i}}onChartHoverChange(){this.enabled&&this.updateArrow()}};GradientLegend.className="GradientLegend",__decorateClass([Validate53(BOOLEAN26)],GradientLegend.prototype,"enabled",2),__decorateClass([Validate53(POSITION)],GradientLegend.prototype,"position",2),__decorateClass([Validate53(BOOLEAN26)],GradientLegend.prototype,"reverseOrder",2),__decorateClass([Validate53(OBJECT22)],GradientLegend.prototype,"gradient",2),__decorateClass([Validate53(POSITIVE_NUMBER14)],GradientLegend.prototype,"spacing",2);var GradientLegendModule={type:"legend",optionsKey:"gradientLegend",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient",moduleFactory:t=>new GradientLegend(t),themeTemplate:{enabled:!1,position:"bottom",spacing:20,scale:{padding:13,label:{color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"}},interval:{minSpacing:15}},gradient:{preferredLength:100,thickness:16},reverseOrder:!1},removable:"standalone-only"},import_ag_charts_community143=require("ag-charts-community");function injectWatermark(t,e){const i=t.addChild("canvas-overlay","watermark"),o=import_ag_charts_community143._ModuleSupport.createElement("span");o.innerText=e,i.addEventListener("animationend",()=>{t.removeChild("canvas-overlay","watermark"),t.removeStyles("watermark")}),i.classList.add("ag-watermark"),i.appendChild(o)}var import_ag_charts_community147=require("ag-charts-community"),import_ag_charts_community146=require("ag-charts-community"),import_ag_charts_community145=require("ag-charts-community"),import_ag_charts_community144=require("ag-charts-community"),{findMinMax:findMinMax2}=import_ag_charts_community144._ModuleSupport,X_MIN=0,X_MAX=1,Y_MIN=2,Y_MAX=3,SPAN=4;function maxRangeFittingPoints(t,e=1){let i=Math.ceil(Math.log2(t.length/e))-1;return i=Math.min(Math.max(i,0),16),2**i|0}function aggregationDomain(t){return findMinMax2(t.map(e=>Number(e)))}function xRatioForDatumIndex(t,e,i){return(t.valueOf()-e)/(i-e)}function aggregationIndexForXRatio(t,e){return Math.min(Math.floor(t*e),e-1)*SPAN|0}function createAggregationIndices(t,e,i,o,s,a){const n=new Int32Array(a*SPAN).fill(-1),r=new Float64Array(a*SPAN).fill(NaN);for(let l=0;lr[y+X_MAX])&&(n[y+X_MAX]=l,r[y+X_MAX]=u),(f||gr[y+Y_MAX])&&(n[y+Y_MAX]=l,r[y+Y_MAX]=p)}return{indexData:n,valueData:r}}function compactAggregationIndices(t,e,i,{inPlace:o=!1}={}){const s=i/2|0,a=o?t:new Int32Array(s*SPAN),n=o?e:new Float64Array(s*SPAN);for(let r=0;re[h+X_MAX]?c:h;a[l+X_MAX]=t[p+X_MAX],n[l+X_MAX]=e[p+X_MAX];const g=d||e[c+Y_MIN]e[h+Y_MAX]?c:h;a[l+Y_MAX]=t[y+Y_MAX],n[l+Y_MAX]=e[y+Y_MAX]}return{maxRange:s,indexData:a,valueData:n}}var indexes={xMin:X_MIN,xMax:X_MAX,yMin:Y_MIN,yMax:Y_MAX,span:SPAN},AGGREGATION_THRESHOLD=1e3,PRECISION=5;function getIndices(t,e){return Array.from({length:t},(i,o)=>{const s=o*SPAN,a=e[s+X_MIN],n=e[s+X_MAX];return(a+n)/2|0})}function aggregateBarData(t,e,i){if(t.length64;)({indexData:n,valueData:r,maxRange:a}=compactAggregationIndices(n,r,a)),l=getIndices(a,n),c.push({maxRange:a,indexData:n,indices:l,indexes});return c.reverse(),c}var{ChartAxisDirection:ChartAxisDirection17,ContinuousScale:ContinuousScale2,OrdinalTimeScale:OrdinalTimeScale2}=import_ag_charts_community146._ModuleSupport,BarSeries=class extends import_ag_charts_community146._ModuleSupport.BarSeries{aggregateData(t,e){if(e?.type!=="ungrouped")return;const i=this.axes[ChartAxisDirection17.X];if(i==null||!(ContinuousScale2.is(i.scale)||OrdinalTimeScale2.is(i.scale)))return;const o=t.resolveKeysById(this,"xValue",e),s=t.resolveColumnById(this,"yValue-raw",e),{index:a}=t.resolveProcessedDataDefById(this,"xValue"),n=e.domain.keys[a];return aggregateBarData(o,s,n)}},{BarSeriesModule}=import_ag_charts_community147._ModuleSupport,BarModule={...BarSeriesModule,type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"bar",moduleFactory:t=>new BarSeries(t)},import_ag_charts_community152=require("ag-charts-community"),import_ag_charts_community150=require("ag-charts-community");function prepareBoxPlotFromTo(t){return{from:t?{scalingX:1,scalingY:0}:{scalingX:0,scalingY:1},to:{scalingX:1,scalingY:1}}}function resetBoxPlotSelectionsScalingCenterFn(t){return(e,i)=>t?{scalingCenterY:i.scaledValues.medianValue}:{scalingCenterX:i.scaledValues.medianValue}}var import_ag_charts_community148=require("ag-charts-community"),{ScalableGroup,Rect:Rect3,Line:Line4,BBox:BBox9,Selection:Selection3}=import_ag_charts_community148._ModuleSupport,BoxPlotGroup=class extends ScalableGroup{constructor(){super(),this.append([new Rect3({tag:0}),new Rect3({tag:0}),new Rect3({tag:2}),new Rect3({tag:1}),new Line4({tag:3}),new Line4({tag:3}),new Line4({tag:4}),new Line4({tag:4})])}updateDatumStyles(t,e,i,o){const{bandwidth:s,scaledValues:{xValue:a,medianValue:n}}=t;let{minValue:r,q1Value:l,q3Value:c,maxValue:h}=t.scaledValues;(i&&!o||!i&&o)&&([h,c,l,r]=[r,l,c,h]);const d=(L,R,V,F)=>i?{y:L,x:R,width:F,height:V}:{x:L,y:R,width:V,height:F},u=(L,R,V)=>i?{y1:L,y2:R,x:V}:{x1:L,x2:R,y:V},p=(L,R,V)=>i?{x1:R,x2:V,y:L}:{x:L,y1:R,y2:V},g=(L,R,V,F)=>({x:L,y:R,width:V,height:F}=d(L,R,V,F),new BBox9(L,R,V,F)),{fill:y,fillOpacity:f,stroke:m,strokeWidth:b,strokeOpacity:x,lineDash:S,lineDashOffset:M,cornerRadius:A,cap:v,whisker:k}=e,D=Selection3.select(this,Rect3),C=D.selectByTag(0),[_]=D.selectByTag(2),[I]=D.selectByTag(1),T=D.selectByTag(3),O=D.selectByTag(4);k.strokeWidth>s&&(k.strokeWidth=s);const w=d(l,a,c-l,s);_.setProperties(w),C[0].setProperties(w),C[0].setProperties({cornerRadius:A,clipBBox:g(l,a,Math.round(n-l+b/2),s)}),C[1].setProperties(w),C[1].setProperties({cornerRadius:A,clipBBox:g(Math.round(n-b/2),a,Math.floor(c-n+b/2),s)});const E=Math.max(Math.round(n-b/2),l+b),B=Math.min(Math.round(n+b/2),c-b);I.setProperties(w),I.setProperties({visible:E{const w=f[O];if(w==null)return;const E=m[O],B=b[O],z=x[O],P=S[O],L=M[O];if([E,B,z,P,L].some(j=>typeof j!="number")||E>B||B>z||z>P||P>L)return;const R={xValue:Math.round(o.scale.convert(w)),minValue:Math.round(s.scale.convert(E)),q1Value:Math.round(s.scale.convert(B)),medianValue:Math.round(s.scale.convert(z)),q3Value:Math.round(s.scale.convert(P)),maxValue:Math.round(s.scale.convert(L))};R.xValue+=Math.round(D.convert(String(v)))+k;const V=Math.round(A),F=Math.abs(R.q3Value-R.q1Value),G=R.xValue+V/2,W=Math.min(R.q3Value,R.q1Value)+F/2,H={x:C?G:W,y:C?W:G};let U;C?U={x:H.x-V/2,y:R.minValue,width:V,height:R.maxValue-R.minValue}:U={x:R.minValue,y:H.y-V/2,width:R.maxValue-R.minValue,height:V},y.push({series:this,itemId:w,datum:T,datumIndex:O,xKey:a,bandwidth:V,scaledValues:R,cap:p,whisker:g,fill:n,fillOpacity:r,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:d,lineDashOffset:u,midPoint:H,focusRect:U})}),_}legendItemSymbol(){const{fill:t,fillOpacity:e,stroke:i,strokeWidth:o,strokeOpacity:s,lineDash:a,lineDashOffset:n}=this.properties;return{marker:{fill:t,fillOpacity:e,stroke:i,strokeOpacity:s,strokeWidth:o,lineDash:a,lineDashOffset:n}}}getLegendData(t){const{id:e,ctx:{legendManager:i},visible:o}=this,{xKey:s,yName:a,showInLegend:n,legendItemName:r}=this.properties;return!s||t!=="category"?[]:[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:o&&i.getItemEnabled({seriesId:e,itemId:e}),label:{text:r??a??e},symbol:this.legendItemSymbol(),legendItemName:r,hideInLegend:!n}]}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,properties:s}=this,{xKey:a,xName:n,yName:r,medianKey:l,medianName:c,q1Key:h,q1Name:d,q3Key:u,q3Name:p,minKey:g,minName:y,maxKey:f,maxName:m,legendItemName:b,tooltip:x}=s,S=this.getCategoryAxis(),M=this.getValueAxis();if(!i||!o||!S||!M)return;const{datumIndex:A}=t,v=o.dataSources.get(this.id)?.[A],k=i.resolveKeysById(this,"xValue",o)[A],D=i.resolveColumnById(this,"minValue",o)[A],C=i.resolveColumnById(this,"q1Value",o)[A],_=i.resolveColumnById(this,"medianValue",o)[A],I=i.resolveColumnById(this,"q3Value",o)[A],T=i.resolveColumnById(this,"maxValue",o)[A];if(k==null)return;const O=this.getItemBaseStyle(!1);return Object.assign(O,this.getItemStyleOverrides(String(A),v,O,!1)),x.formatTooltip({heading:S.formatDatum(k),title:b??r,symbol:this.legendItemSymbol(),data:[{label:y,fallbackLabel:g,value:M.formatDatum(D)},{label:d,fallbackLabel:h,value:M.formatDatum(C)},{label:c,fallbackLabel:l,value:M.formatDatum(_)},{label:p,fallbackLabel:u,value:M.formatDatum(I)},{label:m,fallbackLabel:f,value:M.formatDatum(T)}]},{seriesId:e,datum:v,title:r,xKey:a,xName:n,yName:r,medianKey:l,medianName:c,q1Key:h,q1Name:d,q3Key:u,q3Name:p,minKey:g,minName:y,maxKey:f,maxName:m,...O})}animateEmptyUpdateReady({datumSelection:t}){const e=this.isVertical(),{from:i,to:o}=prepareBoxPlotFromTo(e);motion.resetMotion([t],resetBoxPlotSelectionsScalingCenterFn(e)),motion.staticFromToMotion(this.id,"datums",this.ctx.animationManager,[t],i,o,{phase:"initial"})}isLabelEnabled(){return!1}updateDatumSelection(t){const e=t.nodeData??[];return t.datumSelection.update(e)}getItemBaseStyle(t){const{properties:e}=this,{cornerRadius:i,cap:o,whisker:s}=e,a=t?e.highlightStyle.item:void 0,n=this.getStrokeWidth(e.strokeWidth);return{fill:a?.fill??e.fill,fillOpacity:a?.fillOpacity??e.fillOpacity,stroke:a?.stroke??e.stroke,strokeWidth:a?.strokeWidth??n,strokeOpacity:a?.strokeOpacity??e.strokeOpacity,lineDash:a?.lineDash??e.lineDash??[],lineDashOffset:a?.lineDashOffset??e.lineDashOffset,cornerRadius:i,cap:o,whisker:s}}getItemStyleOverrides(t,e,i,o){const{id:s,properties:a}=this,{xKey:n,minKey:r,q1Key:l,medianKey:c,q3Key:h,maxKey:d,itemStyler:u}=a;if(u!=null)return this.cachedDatumCallback(createDatumId(t,o?"highlight":"node"),()=>u({seriesId:s,datum:e,xKey:n,minKey:r,q1Key:l,medianKey:c,q3Key:h,maxKey:d,highlighted:o,...i}))}updateDatumNodes({datumSelection:t,isHighlight:e}){const i=this.isVertical(),o=this.getValueAxis()?.isReversed();t.each((s,a)=>{let n=this.getFormattedStyles(a,e?"highlight":"node");e&&(n=mergeDefaults4(this.properties.highlightStyle.item,n));const{stroke:r,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:d}=n;n.whisker=mergeDefaults4(n.whisker,{stroke:r,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:d}),s.updateDatumStyles(a,n,i,o)})}updateLabelNodes(){}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e)}nodeFactory(){return new BoxPlotGroup}getFormattedStyles(t,e){const{id:i,properties:o}=this,{xKey:s,minKey:a,q1Key:n,medianKey:r,q3Key:l,maxKey:c,itemStyler:h,backgroundFill:d,cornerRadius:u}=o,{datum:p,stroke:g,strokeWidth:y,strokeOpacity:f,lineDash:m,lineDashOffset:b,cap:x,whisker:S}=t;let M,A;if(!0)M=t.fill,A=o.fillOpacity;else{try{M=Color6.mix(Color6.fromString(d),Color6.fromString(t.fill),o.fillOpacity).toString()}catch{M=t.fill}A=void 0}const k={fill:M,fillOpacity:A,stroke:g,strokeWidth:y,strokeOpacity:f,lineDash:m,lineDashOffset:b,cornerRadius:u,cap:extractDecoratedProperties(x),whisker:extractDecoratedProperties(S)};if(h){const D=this.cachedDatumCallback(createDatumId(p.index,e),()=>h({datum:p,seriesId:i,highlighted:e==="highlight",...k,xKey:s,minKey:a,q1Key:n,medianKey:r,q3Key:l,maxKey:c}));if(D)return mergeDefaults4(D,k)}return k}computeFocusBounds({datumIndex:t}){return computeBarFocusBounds(this,this.contextNodeData?.nodeData[t].focusRect)}};BoxPlotSeries.className="BoxPlotSeries",BoxPlotSeries.type="box-plot";var import_ag_charts_community151=require("ag-charts-community"),{CARTESIAN_AXIS_TYPE}=import_ag_charts_community151._ModuleSupport.ThemeConstants,BOX_PLOT_SERIES_THEME={series:{direction:"vertical",strokeWidth:2},axes:{[CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{snap:!1}},[CARTESIAN_AXIS_TYPE.CATEGORY]:{groupPaddingInner:.2,crosshair:{enabled:!1,snap:!1}}}},{Color:Color7,swapAxisCondition,ThemeSymbols:{DEFAULT_BACKGROUND_COLOUR},ThemeConstants:{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE2,CARTESIAN_POSITION}}=import_ag_charts_community152._ModuleSupport,BoxPlotModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"box-plot",moduleFactory:t=>new BoxPlotSeries(t),tooltipDefaults:{range:"exact"},defaultAxes:swapAxisCondition([{type:CARTESIAN_AXIS_TYPE2.NUMBER,position:CARTESIAN_POSITION.LEFT},{type:CARTESIAN_AXIS_TYPE2.CATEGORY,position:CARTESIAN_POSITION.BOTTOM}],t=>t?.direction==="horizontal"),themeTemplate:BOX_PLOT_SERIES_THEME,groupable:!0,paletteFactory:({takeColors:t,themeTemplateParameters:e})=>{const i=e.get(DEFAULT_BACKGROUND_COLOUR),o=(Array.isArray(i)?i[0]:i)??"white",{fills:[s],strokes:[a]}=t(1);let n;try{n=Color7.mix(Color7.fromString(o),Color7.fromString(s),.3).toString()}catch{n=s}return{fill:n,stroke:a,backgroundFill:o}}},import_ag_charts_community160=require("ag-charts-community"),import_ag_charts_community158=require("ag-charts-community"),import_ag_charts_community153=require("ag-charts-community"),AGGREGATION_THRESHOLD2=1e3,OPEN=X_MIN,HIGH=Y_MAX,LOW=Y_MIN,CLOSE=X_MAX;function aggregateOhlcData(t,e,i,o){if(t.length64;)({indexData:r,valueData:l,maxRange:n}=compactAggregationIndices(r,l,n)),c.push({maxRange:n,indexData:r});return c.reverse(),c}var{fixNumericExtent:fixNumericExtent3,keyProperty:keyProperty3,createDatumId:createDatumId2,SeriesNodePickMode:SeriesNodePickMode2,ChartAxisDirection:ChartAxisDirection19,SMALLEST_KEY_INTERVAL:SMALLEST_KEY_INTERVAL2,valueProperty:valueProperty5,diff:diff2,animationValidation:animationValidation2,computeBarFocusBounds:computeBarFocusBounds2,visibleRangeIndices,ContinuousScale:ContinuousScale4,OrdinalTimeScale:OrdinalTimeScale3,BandScale:BandScale2}=import_ag_charts_community153._ModuleSupport,OhlcSeriesNodeEvent=class extends import_ag_charts_community153._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o),this.xKey=o.properties.xKey,this.openKey=o.properties.openKey,this.closeKey=o.properties.closeKey,this.highKey=o.properties.highKey,this.lowKey=o.properties.lowKey}},OhlcSeriesBase=class extends import_ag_charts_community153._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,pickModes:[SeriesNodePickMode2.AXIS_ALIGNED,SeriesNodePickMode2.EXACT_SHAPE_MATCH],directionKeys:{x:["xKey"],y:["lowKey","highKey","openKey","closeKey"]},directionNames:{x:["xName"],y:["lowName","highName","openName","closeName"]},pathsPerSeries:[]}),this.NodeEvent=OhlcSeriesNodeEvent,this.dataAggregationFilters=void 0}async processData(t){if(!this.properties.isValid()||!this.visible)return;const{xKey:e,openKey:i,closeKey:o,highKey:s,lowKey:a}=this.properties,n=!this.ctx.animationManager.isSkipped(),r=this.getCategoryAxis()?.scale,l=this.getValueAxis()?.scale,{isContinuousX:c,xScaleType:h,yScaleType:d}=this.getScaleInformation({xScale:r,yScale:l}),u=[];n&&(this.processedData&&u.push(diff2(this.id,this.processedData)),u.push(animationValidation2())),i&&u.push(valueProperty5(i,d,{id:"openValue",invalidValue:void 0,missingValue:void 0}));const{dataModel:p,processedData:g}=await this.requestDataModel(t,this.data,{props:[keyProperty3(e,h,{id:"xValue"}),valueProperty5(o,d,{id:"closeValue"}),valueProperty5(s,d,{id:"highValue"}),valueProperty5(a,d,{id:"lowValue"}),...c?[SMALLEST_KEY_INTERVAL2]:[],...u]});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.dataAggregationFilters=this.aggregateData(p,g),this.animationState.transition("updateData")}aggregateData(t,e){const i=this.axes[ChartAxisDirection19.X];if(i==null||!(ContinuousScale4.is(i.scale)||OrdinalTimeScale3.is(i.scale)))return;const o=t.resolveKeysById(this,"xValue",e),s=t.resolveColumnById(this,"highValue",e),a=t.resolveColumnById(this,"lowValue",e),{index:n}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[n];return aggregateOhlcData(o,s,a,r)}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!(e&&i))return[];if(t!==this.getBarDirection()){const{index:s,def:a}=i.resolveProcessedDataDefById(this,"xValue"),n=e.domain.keys[s];return a.type==="key"&&a.valueType==="category"?n:this.padBandExtent(n)}const o=this.domainForClippedRange(ChartAxisDirection19.Y,["highValue","lowValue"],"xValue",!0);return fixNumericExtent3(o)}getSeriesRange(t,e){return this.domainForVisibleRange(ChartAxisDirection19.Y,["highValue","lowValue"],"xValue",e,!0)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["highValue","lowValue"],t,e,i)}createNodeData(){const{visible:t,dataModel:e,processedData:i}=this,o=this.getCategoryAxis(),s=this.getValueAxis();if(!(e&&i&&o&&s))return;const a=[],{xKey:n,highKey:r,lowKey:l}=this.properties,c=i.dataSources.get(this.id)??[],h=e.resolveKeysById(this,"xValue",i),d=e.resolveColumnById(this,"openValue",i),u=e.resolveColumnById(this,"closeValue",i),p=e.resolveColumnById(this,"highValue",i),g=e.resolveColumnById(this,"lowValue",i),{groupScale:y}=this,{barWidth:f,groupIndex:m}=this.updateGroupScale(o),b=y.convert(String(m)),x=f>=1?f:y.rawBandwidth,S=BandScale2.is(o.scale),M={itemId:n,nodeData:a,labelData:[],scales:this.calculateScaling(),visible:this.visible};if(!t)return M;const A=(O,w,E,B,z,P,L,R)=>{const V=c[O],F=S?L/2:0,G=o.scale.convert(w)+b+F,W=s.scale.convert(E),H=s.scale.convert(B),U=s.scale.convert(z),j=s.scale.convert(P),$=B>E,Z=$?"up":"down",X=Math.min(U,j),K=Math.max(U,j)-X,q={x:G,y:X+K/2};a.push({series:this,itemId:Z,datum:V,datumIndex:O,xKey:n,xValue:w,openValue:E,closeValue:B,highValue:z,lowValue:P,midPoint:q,aggregatedValue:B,isRising:$,centerX:G,width:L,y:X,height:K,yOpen:W,yClose:H,crisp:R})},{dataAggregationFilters:v}=this,k=o.scale,[D,C]=k.range,_=C-D,I=O=>k.convert(h[O])+b,T=v?.find(O=>O.maxRange>_);if(T==null){let[O,w]=visibleRangeIndices(c.length,o.range,E=>{const B=I(E);return[B,B+x]});i.input.count<1e3&&(O=0,w=i.input.count);for(let E=O;E=z&&L>=P;if(!V){logger_exports.warnOnce(`invalid low value for key [${l}] in data element, low value cannot be higher than datum open or close values`);continue}if(!F){logger_exports.warnOnce(`invalid high value for key [${r}] in data element, high value cannot be lower than datum open or close values.`);continue}A(E,B,z,P,L,R,x,!0)}}else{const{maxRange:O,indexData:w}=T,[E,B]=visibleRangeIndices(O,o.range,z=>{const P=z*SPAN,L=w[P+OPEN],R=w[P+CLOSE];if(L!==-1)return[I(L),I(R)+x]});for(let z=E;zr({seriesId:a,datum:e,itemId:i,xKey:l,openKey:c,closeKey:h,highKey:d,lowKey:u,highlighted:s,...o}))}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,properties:s}=this,{xKey:a,xName:n,yName:r,openKey:l,openName:c,highKey:h,highName:d,lowKey:u,lowName:p,closeKey:g,closeName:y,legendItemName:f,tooltip:m}=s,b=this.getCategoryAxis(),x=this.getValueAxis();if(!i||!o||!b||!x)return;const{datumIndex:S}=t,M=o.dataSources.get(this.id)?.[S],A=i.resolveKeysById(this,"xValue",o)[S],v=i.resolveColumnById(this,"openValue",o)[S],k=i.resolveColumnById(this,"highValue",o)[S],D=i.resolveColumnById(this,"lowValue",o)[S],C=i.resolveColumnById(this,"closeValue",o)[S];if(A==null)return;const _=C>=v?"up":"down",I=this.properties.item[_],T=this.getItemBaseStyle(_,!1);return Object.assign(T,this.getItemStyleOverrides(String(S),M,_,T,!1)),m.formatTooltip({heading:b.formatDatum(A),title:f,symbol:{marker:{fill:I.fill??I.stroke,fillOpacity:I.fillOpacity??I.strokeOpacity??1,stroke:I.stroke,strokeWidth:I.strokeWidth??1,strokeOpacity:I.strokeOpacity??1,lineDash:I.lineDash??[0],lineDashOffset:I.lineDashOffset??0}},data:[{label:c,fallbackLabel:l,value:x.formatDatum(v)},{label:d,fallbackLabel:h,value:x.formatDatum(k)},{label:p,fallbackLabel:u,value:x.formatDatum(D)},{label:y,fallbackLabel:g,value:x.formatDatum(C)}]},{seriesId:e,datum:M,title:r,itemId:_,xKey:a,xName:n,yName:r,openKey:l,openName:c,highKey:h,highName:d,lowKey:u,lowName:p,closeKey:g,closeName:y,...T})}getDatumId(t){return createDatumId2(t.xValue)}computeFocusBounds(t){const e=this.getNodeData()?.at(t.datumIndex);if(e==null)return;const{centerX:i,y:o,width:s,height:a}=e,n={x:i-s/2,y:o,width:s,height:a};return computeBarFocusBounds2(this,n)}},import_ag_charts_community155=require("ag-charts-community"),import_ag_charts_community154=require("ag-charts-community"),{Path:Path7,ScenePathChangeDetection:ScenePathChangeDetection4,BBox:BBox10}=import_ag_charts_community154._ModuleSupport,OhlcBaseNode=class extends Path7{constructor(){super(...arguments),this.centerX=0,this.y=0,this.width=0,this.height=0,this.yOpen=0,this.yClose=0,this.crisp=!1,this.strokeAlignment=0}computeBBox(){const{centerX:t,y:e,width:i,height:o}=this;return new BBox10(t-i/2,e,i,o)}isPointInPath(t,e){return this.getBBox().containsPoint(t,e)}distanceSquared(t,e){return this.getBBox().distanceSquared(t,e)}get midPoint(){return{x:this.centerX,y:this.y+this.height/2}}alignedCoordinates(){const{y:t,width:e,height:i,crisp:o,strokeAlignment:s}=this;let{centerX:a,yOpen:n,yClose:r}=this,l=a-e/2,c=a+e/2,h=t,d=t+i;if(o&&e>1){a=this.align(a),n=this.align(n),r=this.align(r);const p=this.align(e/2);l=a-p,c=a+p,h=this.align(t),d=h+this.align(h,i)}const u=(h+d)/2;return a+=s,l+=s,c+=s,h-=s,d+=s,n+=n1&&(t.moveTo(i,n),t.lineTo(e,n),t.moveTo(e,r),t.lineTo(o,r))}},{ScenePathChangeDetection:ScenePathChangeDetection5,ExtendedPath2D:ExtendedPath2D3}=import_ag_charts_community155._ModuleSupport,CandlestickNode=class extends OhlcBaseNode{constructor(){super(...arguments),this.wickPath=new ExtendedPath2D3,this.wickStroke=void 0,this.wickStrokeWidth=void 0,this.wickStrokeOpacity=void 0}updatePath(){const{path:t,stroke:e,strokeWidth:i,strokeOpacity:o,lineDash:s,lineDashOffset:a,wickStroke:n,wickStrokeWidth:r,wickStrokeOpacity:l,wickLineDash:c,wickLineDashOffset:h,strokeAlignment:d}=this,{centerX:u,x0:p,x1:g,y0:y,y1:f,yOpen:m,yClose:b}=this.alignedCoordinates();this.path.clear(),this.wickPath.clear();const S=n!=null&&n!==e||r!=null&&r!==i||l!=null&&l!==o||c!=null&&c!==s||h!=null&&h!==a?this.wickPath:t;if(Math.abs(g-p)<=3){S.moveTo(u,y),S.lineTo(u,f);return}const M=Math.min(m,b),A=Math.max(m,b);S.moveTo(u,y),S.lineTo(u,M+i/2),S.moveTo(u,f),S.lineTo(u,A-i/2);const v=d+i/2,k=A-M-2*v;if(k>0)t.rect(p+v,M+v,g-p-2*v,k);else{const D=(M+A)/2;t.moveTo(p,D),t.lineTo(g,D)}}drawPath(t){super.drawPath(t);const{wickPath:e}=this;if(e.isEmpty())return;const{stroke:i,strokeWidth:o,strokeOpacity:s,lineDash:a,lineDashOffset:n,wickStroke:r=i,wickStrokeWidth:l=o,wickStrokeOpacity:c=s,wickLineDash:h=a,wickLineDashOffset:d=n}=this;l!==0&&(t.globalAlpha*=c,typeof r=="string"&&(t.strokeStyle=r),t.lineWidth=l,h!=null&&t.setLineDash(h),t.lineDashOffset=d,t.stroke(e.getPath2D()))}};__decorateClass([ScenePathChangeDetection5()],CandlestickNode.prototype,"wickStroke",2),__decorateClass([ScenePathChangeDetection5()],CandlestickNode.prototype,"wickStrokeWidth",2),__decorateClass([ScenePathChangeDetection5()],CandlestickNode.prototype,"wickStrokeOpacity",2),__decorateClass([ScenePathChangeDetection5()],CandlestickNode.prototype,"wickLineDash",2),__decorateClass([ScenePathChangeDetection5()],CandlestickNode.prototype,"wickLineDashOffset",2);var import_ag_charts_community157=require("ag-charts-community"),import_ag_charts_community156=require("ag-charts-community"),{BaseProperties:BaseProperties20,Validate:Validate55,AbstractBarSeriesProperties:AbstractBarSeriesProperties2,SeriesTooltip:SeriesTooltip2,STRING:STRING25,COLOR_STRING:COLOR_STRING10,FUNCTION:FUNCTION7,LINE_DASH:LINE_DASH6,OBJECT:OBJECT24,POSITIVE_NUMBER:POSITIVE_NUMBER16,RATIO:RATIO13}=import_ag_charts_community156._ModuleSupport,OhlcSeriesItem=class extends BaseProperties20{constructor(){super(...arguments),this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([Validate55(COLOR_STRING10)],OhlcSeriesItem.prototype,"stroke",2),__decorateClass([Validate55(POSITIVE_NUMBER16)],OhlcSeriesItem.prototype,"strokeWidth",2),__decorateClass([Validate55(RATIO13)],OhlcSeriesItem.prototype,"strokeOpacity",2),__decorateClass([Validate55(LINE_DASH6)],OhlcSeriesItem.prototype,"lineDash",2),__decorateClass([Validate55(POSITIVE_NUMBER16)],OhlcSeriesItem.prototype,"lineDashOffset",2);var OhlcSeriesItems=class extends BaseProperties20{constructor(){super(...arguments),this.up=new OhlcSeriesItem,this.down=new OhlcSeriesItem}};__decorateClass([Validate55(OBJECT24)],OhlcSeriesItems.prototype,"up",2),__decorateClass([Validate55(OBJECT24)],OhlcSeriesItems.prototype,"down",2);var OhlcSeriesBaseProperties=class extends AbstractBarSeriesProperties2{};__decorateClass([Validate55(STRING25)],OhlcSeriesBaseProperties.prototype,"xKey",2),__decorateClass([Validate55(STRING25)],OhlcSeriesBaseProperties.prototype,"openKey",2),__decorateClass([Validate55(STRING25)],OhlcSeriesBaseProperties.prototype,"closeKey",2),__decorateClass([Validate55(STRING25)],OhlcSeriesBaseProperties.prototype,"highKey",2),__decorateClass([Validate55(STRING25)],OhlcSeriesBaseProperties.prototype,"lowKey",2),__decorateClass([Validate55(STRING25,{optional:!0})],OhlcSeriesBaseProperties.prototype,"xName",2),__decorateClass([Validate55(STRING25,{optional:!0})],OhlcSeriesBaseProperties.prototype,"yName",2),__decorateClass([Validate55(STRING25,{optional:!0})],OhlcSeriesBaseProperties.prototype,"openName",2),__decorateClass([Validate55(STRING25,{optional:!0})],OhlcSeriesBaseProperties.prototype,"closeName",2),__decorateClass([Validate55(STRING25,{optional:!0})],OhlcSeriesBaseProperties.prototype,"highName",2),__decorateClass([Validate55(STRING25,{optional:!0})],OhlcSeriesBaseProperties.prototype,"lowName",2);var OhlcSeriesProperties=class extends OhlcSeriesBaseProperties{constructor(){super(...arguments),this.tooltip=new SeriesTooltip2,this.item=new OhlcSeriesItems}};__decorateClass([Validate55(OBJECT24)],OhlcSeriesProperties.prototype,"tooltip",2),__decorateClass([Validate55(OBJECT24)],OhlcSeriesProperties.prototype,"item",2),__decorateClass([Validate55(FUNCTION7,{optional:!0})],OhlcSeriesProperties.prototype,"itemStyler",2);var{BaseProperties:BaseProperties21,SeriesTooltip:SeriesTooltip3,Validate:Validate56,COLOR_STRING:COLOR_STRING11,FUNCTION:FUNCTION8,LINE_DASH:LINE_DASH7,OBJECT:OBJECT25,POSITIVE_NUMBER:POSITIVE_NUMBER17,RATIO:RATIO14}=import_ag_charts_community157._ModuleSupport,CandlestickSeriesWick=class extends BaseProperties21{};__decorateClass([Validate56(COLOR_STRING11,{optional:!0})],CandlestickSeriesWick.prototype,"stroke",2),__decorateClass([Validate56(POSITIVE_NUMBER17)],CandlestickSeriesWick.prototype,"strokeWidth",2),__decorateClass([Validate56(RATIO14)],CandlestickSeriesWick.prototype,"strokeOpacity",2),__decorateClass([Validate56(LINE_DASH7,{optional:!0})],CandlestickSeriesWick.prototype,"lineDash",2),__decorateClass([Validate56(POSITIVE_NUMBER17)],CandlestickSeriesWick.prototype,"lineDashOffset",2);var CandlestickSeriesItem=class extends BaseProperties21{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.wick=new CandlestickSeriesWick}};__decorateClass([Validate56(COLOR_STRING11,{optional:!0})],CandlestickSeriesItem.prototype,"fill",2),__decorateClass([Validate56(RATIO14)],CandlestickSeriesItem.prototype,"fillOpacity",2),__decorateClass([Validate56(COLOR_STRING11)],CandlestickSeriesItem.prototype,"stroke",2),__decorateClass([Validate56(POSITIVE_NUMBER17)],CandlestickSeriesItem.prototype,"strokeWidth",2),__decorateClass([Validate56(RATIO14)],CandlestickSeriesItem.prototype,"strokeOpacity",2),__decorateClass([Validate56(LINE_DASH7)],CandlestickSeriesItem.prototype,"lineDash",2),__decorateClass([Validate56(POSITIVE_NUMBER17)],CandlestickSeriesItem.prototype,"lineDashOffset",2),__decorateClass([Validate56(POSITIVE_NUMBER17)],CandlestickSeriesItem.prototype,"cornerRadius",2),__decorateClass([Validate56(OBJECT25)],CandlestickSeriesItem.prototype,"wick",2);var CandlestickSeriesItems=class extends BaseProperties21{constructor(){super(...arguments),this.up=new CandlestickSeriesItem,this.down=new CandlestickSeriesItem}};__decorateClass([Validate56(OBJECT25)],CandlestickSeriesItems.prototype,"up",2),__decorateClass([Validate56(OBJECT25)],CandlestickSeriesItems.prototype,"down",2);var CandlestickSeriesProperties=class extends OhlcSeriesBaseProperties{constructor(){super(...arguments),this.item=new CandlestickSeriesItems,this.tooltip=new SeriesTooltip3}};__decorateClass([Validate56(OBJECT25)],CandlestickSeriesProperties.prototype,"item",2),__decorateClass([Validate56(OBJECT25)],CandlestickSeriesProperties.prototype,"tooltip",2),__decorateClass([Validate56(FUNCTION8,{optional:!0})],CandlestickSeriesProperties.prototype,"itemStyler",2);var{createDatumId:createDatumId3}=import_ag_charts_community158._ModuleSupport,CandlestickSeries=class extends OhlcSeriesBase{constructor(){super(...arguments),this.properties=new CandlestickSeriesProperties}nodeFactory(){return new CandlestickNode}updateDatumNodes({datumSelection:t,isHighlight:e}){const{id:i,properties:o}=this,{xKey:s,highKey:a,lowKey:n,openKey:r,closeKey:l,item:c,itemStyler:h}=o,{up:d,down:u}=c,{fill:p,fillOpacity:g,stroke:y,strokeWidth:f,strokeOpacity:m,lineDash:b,lineDashOffset:x}=d,{stroke:S,strokeWidth:M,strokeOpacity:A,lineDash:v,lineDashOffset:k}=d.wick,{fill:D,fillOpacity:C,stroke:_,strokeWidth:I,strokeOpacity:T,lineDash:O,lineDashOffset:w}=u,{stroke:E,strokeWidth:B,strokeOpacity:z,lineDash:P,lineDashOffset:L}=u.wick,R=e?o.highlightStyle.item:void 0;t.each((V,F)=>{const{isRising:G,centerX:W,width:H,y:U,height:j,yOpen:$,yClose:Z,crisp:X}=F;let K;if(h!=null){const{fill:Q,fillOpacity:Y,stroke:st,strokeWidth:ot,strokeOpacity:J,lineDash:tt,lineDashOffset:et}=G?d:u;K=this.cachedDatumCallback(createDatumId3(this.getDatumId(F),e?"highlight":"node"),()=>h({seriesId:i,itemId:F.itemId,xKey:s,highKey:a,lowKey:n,openKey:r,closeKey:l,datum:F.datum,fill:Q,fillOpacity:Y,strokeOpacity:J,stroke:st,strokeWidth:ot,lineDash:tt,lineDashOffset:et,highlighted:e}))}V.centerX=W,V.width=H,V.y=U,V.height=j,V.yOpen=$,V.yClose=Z,V.crisp=X,V.fill=R?.fill??K?.fill??(G?p:D),V.fillOpacity=R?.fillOpacity??K?.fillOpacity??(G?g:C),V.stroke=R?.stroke??K?.stroke??(G?y:_),V.strokeWidth=R?.strokeWidth??K?.strokeWidth??(G?f:I),V.strokeOpacity=R?.strokeOpacity??K?.strokeOpacity??(G?m:T),V.lineDash=R?.lineDash??K?.lineDash??(G?b:O),V.lineDashOffset=R?.lineDashOffset??K?.lineDashOffset??(G?x:w);const q=K?.wick;V.wickStroke=R?.stroke??q?.stroke??(G?S:E),V.wickStrokeWidth=R?.strokeWidth??q?.strokeWidth??(G?M:B),V.wickStrokeOpacity=R?.strokeOpacity??q?.strokeOpacity??(G?A:z),V.wickLineDash=R?.lineDash??q?.lineDash??(G?v:P),V.wickLineDashOffset=R?.lineDashOffset??q?.lineDashOffset??(G?k:L),V.strokeAlignment=(K?.strokeWidth??(G?f:I))/2})}legendItemSymbol(){const{up:t,down:e}=this.properties.item,i=new import_ag_charts_community158._ModuleSupport.LinearGradient("rgb",[{color:t.fill,offset:0},{color:t.fill,offset:.5},{color:e.fill,offset:.5}],90),o=new import_ag_charts_community158._ModuleSupport.LinearGradient("rgb",[{color:t.stroke,offset:0},{color:t.stroke,offset:.5},{color:e.stroke,offset:.5}],90);return{marker:{fill:i,fillOpacity:t.fillOpacity,stroke:o,strokeWidth:t.strokeWidth??1,strokeOpacity:t.strokeOpacity??1,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset}}}getLegendData(t){const{id:e,data:i,visible:o,ctx:{legendManager:s}}=this,{xKey:a,yName:n,showInLegend:r,legendItemName:l}=this.properties;return!i?.length||!a||t!=="category"?[]:[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:o&&s.getItemEnabled({seriesId:e,itemId:e}),label:{text:l??n??e},symbol:this.legendItemSymbol(),legendItemName:l,hideInLegend:!r}]}};CandlestickSeries.className="CandleStickSeries",CandlestickSeries.type="candlestick";var import_ag_charts_community159=require("ag-charts-community"),{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE3}=import_ag_charts_community159._ModuleSupport.ThemeConstants,CANDLESTICK_SERIES_THEME={series:{highlightStyle:{item:{strokeWidth:3}}},animation:{enabled:!1},axes:{[CARTESIAN_AXIS_TYPE3.NUMBER]:{crosshair:{snap:!1}},[CARTESIAN_AXIS_TYPE3.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE4,CARTESIAN_POSITION:CARTESIAN_POSITION2}=import_ag_charts_community160._ModuleSupport.ThemeConstants,CandlestickModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"candlestick",moduleFactory:t=>new CandlestickSeries(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:CARTESIAN_AXIS_TYPE4.NUMBER,position:CARTESIAN_POSITION2.LEFT},{type:CARTESIAN_AXIS_TYPE4.ORDINAL_TIME,position:CARTESIAN_POSITION2.BOTTOM}],themeTemplate:CANDLESTICK_SERIES_THEME,groupable:!1,paletteFactory:({takeColors:t,colorsCount:e,userPalette:i,palette:o})=>{if(i==="user-indexed"){const{fills:s,strokes:a}=t(e);return{item:{up:{fill:"transparent",stroke:a[0]},down:{fill:s[0],stroke:a[0]}}}}return{item:{up:o.up,down:o.down}}}},import_ag_charts_community165=require("ag-charts-community"),import_ag_charts_community164=require("ag-charts-community"),import_ag_charts_community161=require("ag-charts-community");function computeNodeGraph(t,e,i){i||(e=removeCircularLinks(e));const o=new Map;for(const a of t)o.set(a.id,{datum:a,linksBefore:[],linksAfter:[],maxPathLengthBefore:-1,maxPathLengthAfter:-1});let s=0;return o.forEach((a,n)=>{s=Math.max(s,computePathLength(o,e,a,n,-1,[])+computePathLength(o,e,a,n,1,[])+1)}),{links:e,nodeGraph:o,maxPathLength:s}}function findCircularLinks(t,e,i,o){const s=o.indexOf(e);if(s!==-1){for(let n=s;n!e.has(i))}function computePathLength(t,e,i,o,s,a){if(a.includes(o))return 1/0;let n=s===-1?i.maxPathLengthBefore:i.maxPathLengthAfter;if(n===-1){n=0;const r=s===-1?i.linksBefore:i.linksAfter;for(const l of e){const{fromNode:c,toNode:h}=l,d=s===-1?h.id:c.id,u=s===-1?c.id:h.id,p=o===d?t.get(u):void 0;p!=null&&(r.push({node:p,link:l}),a?.push(o),n=Math.max(n,computePathLength(t,e,p,u,s,a)+1),a?.pop())}s===-1?i.maxPathLengthBefore=n:i.maxPathLengthAfter=n}return n}var{Series,DataController,Validate:Validate57,ARRAY:ARRAY6,keyProperty:keyProperty4,valueProperty:valueProperty6,Selection:Selection4,Group:Group9,TransformableText}=import_ag_charts_community161._ModuleSupport,FlowProportionSeriesNodeEvent=class extends import_ag_charts_community161._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o);const{datumIndex:s}=i,a=o.contextNodeData?.nodeData.find(n=>n.datumIndex.type===s.type&&n.datumIndex.index===s.index);this.size=a?.size,this.label=a?.type===1?a?.label:void 0}},FlowProportionSeries=class extends Series{constructor(){super(...arguments),this.NodeEvent=FlowProportionSeriesNodeEvent,this._chartNodes=void 0,this.nodeCount=0,this.linkCount=0,this.linksDataModel=void 0,this.linksProcessedData=void 0,this.nodesDataModel=void 0,this.nodesProcessedData=void 0,this.processedNodes=new Map,this.linkGroup=this.contentGroup.appendChild(new Group9({name:"linkGroup"})),this.nodeGroup=this.contentGroup.appendChild(new Group9({name:"nodeGroup"})),this.focusLinkGroup=this.highlightNode.appendChild(new Group9({name:"linkGroup"})),this.focusNodeGroup=this.highlightNode.appendChild(new Group9({name:"nodeGroup"})),this.highlightLinkGroup=this.highlightNode.appendChild(new Group9({name:"linkGroup"})),this.highlightNodeGroup=this.highlightNode.appendChild(new Group9({name:"nodeGroup"})),this.labelSelection=Selection4.select(this.labelGroup,TransformableText),this.linkSelection=Selection4.select(this.linkGroup,()=>this.linkFactory()),this.nodeSelection=Selection4.select(this.nodeGroup,()=>this.nodeFactory()),this.focusLinkSelection=Selection4.select(this.focusLinkGroup,()=>this.linkFactory()),this.focusNodeSelection=Selection4.select(this.focusNodeGroup,()=>this.nodeFactory()),this.highlightLinkSelection=Selection4.select(this.highlightLinkGroup,()=>this.linkFactory()),this.highlightNodeSelection=Selection4.select(this.highlightNodeGroup,()=>this.nodeFactory())}get nodes(){return this.properties.nodes??this._chartNodes}setChartNodes(t){this._chartNodes=t,this.nodes===t&&(this.nodeDataRefresh=!0)}async processData(t){const{data:e,nodes:i}=this;if(e==null||!this.properties.isValid())return;const{fromKey:o,toKey:s,sizeKey:a,idKey:n,labelKey:r}=this.properties,l=new DataController("standalone",t.suppressFieldDotNotation),c=i!=null?l.request(this.id,i,{props:[keyProperty4(n,void 0,{id:"idValue",includeProperty:!1}),...r!=null?[valueProperty6(r,void 0,{id:"labelValue",includeProperty:!1})]:[]],groupByKeys:!0}):null,h=t.request(this.id,e,{props:[valueProperty6(o,void 0,{id:"fromValue",includeProperty:!1}),valueProperty6(s,void 0,{id:"toValue",includeProperty:!1}),...a!=null?[valueProperty6(a,void 0,{id:"sizeValue",includeProperty:!1,missingValue:0})]:[]],groupByKeys:!1});i!=null&&l.execute();const[d,u]=await Promise.all([c,h]);this.nodesDataModel=d?.dataModel,this.nodesProcessedData=d?.processedData,this.linksDataModel=u?.dataModel,this.linksProcessedData=u?.processedData;const p=new Map;if(d==null){const g=u.dataModel.resolveColumnById(this,"fromValue",u.processedData),y=u.dataModel.resolveColumnById(this,"toValue",u.processedData),f=m=>{const b=p.size;return{series:this,itemId:void 0,datum:{},datumIndex:{type:1,index:b},type:1,index:b,linksBefore:[],linksAfter:[],id:m,size:0,label:m}};u.processedData.dataSources.get(this.id)?.forEach((m,b)=>{const x=g[b],S=y[b];x==null||S==null||(p.has(x)||p.set(x,f(x)),p.has(S)||p.set(S,f(S)))})}else{const g=d.dataModel.resolveColumnById(this,"idValue",d.processedData),y=r!=null?d.dataModel.resolveColumnById(this,"labelValue",d.processedData):void 0;d.processedData.dataSources.get(this.id)?.forEach((f,m)=>{const b=g[m],x=y?.[m];p.set(b,{series:this,itemId:void 0,datum:f,datumIndex:{type:1,index:m},type:1,index:m,linksBefore:[],linksAfter:[],id:b,size:0,label:x})})}this.processedNodes=p}getNodeGraph(t,e,{includeCircularReferences:i}){const{linksDataModel:o,linksProcessedData:s}=this;if(o==null||s==null){const{links:g,nodeGraph:y,maxPathLength:f}=computeNodeGraph(new Map().values(),[],i);return this.nodeCount=0,this.linkCount=0,{nodeGraph:y,links:g,maxPathLength:f}}const{sizeKey:a}=this.properties,n=o.resolveColumnById(this,"fromValue",s),r=o.resolveColumnById(this,"toValue",s),l=a!=null?o.resolveColumnById(this,"sizeValue",s):void 0,c=new Map;this.processedNodes.forEach(g=>{const y=t(g);c.set(g.id,y)});const h=[];s.dataSources.get(this.id)?.forEach((g,y)=>{const f=n[y],m=r[y],b=l!=null?l[y]:1,x=c.get(f),S=c.get(m);if(b<=0||x==null||S==null)return;const M=e({series:this,itemId:void 0,datum:g,datumIndex:{type:0,index:y},type:0,index:y,fromNode:x,toNode:S,size:b});h.push(M)});const{links:d,nodeGraph:u,maxPathLength:p}=computeNodeGraph(c.values(),h,i);return u.forEach(g=>{g.datum.linksBefore=g.linksBefore.map(y=>y.link),g.datum.linksAfter=g.linksAfter.map(y=>y.link)}),this.nodeCount=u.size,this.linkCount=d.length,{nodeGraph:u,links:d,maxPathLength:p}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(t){const{seriesRect:e}=t,i={seriesRectWidth:e?.width??0,seriesRectHeight:e?.height??0};(this._nodeDataDependencies==null||this._nodeDataDependencies.seriesRectWidth!==i.seriesRectWidth||this._nodeDataDependencies.seriesRectHeight!==i.seriesRectHeight)&&(this._nodeDataDependencies=i),this.updateSelections();const o=this.contextNodeData?.nodeData??[],s=this.contextNodeData?.labelData??[];let a=this.ctx.highlightManager?.getActiveHighlight();if(a?.series===this&&a.type==null){const{itemId:h}=a;a=h!=null?o.find(d=>d.type===1&&d.id===h):void 0}else a?.series!==this&&(a=void 0);this.contentGroup.visible=this.visible,this.contentGroup.opacity=a!=null?this.properties.highlightStyle.series.dimOpacity??1:1,this.labelSelection=this.updateLabelSelection({labelData:s,labelSelection:this.labelSelection}),this.updateLabelNodes({labelSelection:this.labelSelection}),this.linkSelection=this.updateLinkSelection({nodeData:o.filter(h=>h.type===0),datumSelection:this.linkSelection}),this.updateLinkNodes({datumSelection:this.linkSelection,isHighlight:!1}),this.nodeSelection=this.updateNodeSelection({nodeData:o.filter(h=>h.type===1),datumSelection:this.nodeSelection}),this.updateNodeNodes({datumSelection:this.nodeSelection,isHighlight:!1});let n,r,l,c;a?.type===1?(n=o.filter(h=>h.type===0&&(h.toNode===a||h.fromNode===a)),r=n.map(h=>h.fromNode===a?h.toNode:h.fromNode),r.push(a),l=[],c=[a]):a?.type===0?(n=[a],r=[a.fromNode,a.toNode],l=[a],c=[]):(n=[],r=[],l=[],c=[]),this.focusLinkSelection=this.updateLinkSelection({nodeData:n,datumSelection:this.focusLinkSelection}),this.updateLinkNodes({datumSelection:this.focusLinkSelection,isHighlight:!1}),this.focusNodeSelection=this.updateNodeSelection({nodeData:r,datumSelection:this.focusNodeSelection}),this.updateNodeNodes({datumSelection:this.focusNodeSelection,isHighlight:!1}),this.highlightLinkSelection=this.updateLinkSelection({nodeData:l,datumSelection:this.highlightLinkSelection}),this.updateLinkNodes({datumSelection:this.highlightLinkSelection,isHighlight:!0}),this.highlightNodeSelection=this.updateNodeSelection({nodeData:c,datumSelection:this.highlightNodeSelection}),this.updateNodeNodes({datumSelection:this.highlightNodeSelection,isHighlight:!0})}resetAnimation(t){}getSeriesDomain(t){return[]}getSeriesRange(t,e){return[NaN,NaN]}legendItemSymbol(t,e,i={}){const{fills:o,strokes:s}=this.properties,{fill:a=o[e%o.length],fillOpacity:n=1,stroke:r=s[e%s.length],strokeWidth:l=0,strokeOpacity:c=1,lineDash:h=[0],lineDashOffset:d=0}=i;return{marker:{fill:a,fillOpacity:n,stroke:r,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:d}}}getLegendData(t){if(t!=="category")return[];const{showInLegend:e}=this.properties;return Array.from(this.processedNodes.values(),({id:i,label:o},s)=>({legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:!0,label:{text:o??i},symbol:this.legendItemSymbol(1,s),hideInLegend:!e,isFixed:!0}))}pickNodeClosestDatum({x:t,y:e}){let i=1/0,o;return this.linkSelection.each((s,a)=>{const n=s.containsPoint(t,e)?0:1/0;n{const n=s.distanceSquared(t,e);nh.datum),c=r.indexOf(o)+e;if(c>=0&&c0)s=r[r.length-1];else{const h=Array.from(this.nodeSelection,d=>d.datum);s=h[h.length-1]}}else if(o?.type===1){const r=Array.from(this.nodeSelection,h=>h.datum),c=r.indexOf(o)+e;c>=0&&cd.datum)[0]}if(s==null)return;const a=s.type===1?Array.from(this.nodeSelection).find(r=>r.datum===s):Array.from(this.linkSelection).find(r=>r.datum===s);if(a==null)return;const n=this.computeFocusBounds(a.node);if(n!=null)return{datum:a.datum,datumIndex:this.contextNodeData?.nodeData.indexOf(a.datum)??0,otherIndex:0,bounds:n,clipFocusBox:!0}}};__decorateClass([Validate57(ARRAY6,{optional:!0,property:"nodes"})],FlowProportionSeries.prototype,"_chartNodes",2);var import_ag_charts_community162=require("ag-charts-community"),{BBox:BBox11,Path:Path8,ScenePathChangeDetection:ScenePathChangeDetection6}=import_ag_charts_community162._ModuleSupport;function bezierControlPoints({radius:t,startAngle:e,endAngle:i,tension:o}){const s=t*Math.cos(e),a=t*Math.sin(e),n=t*Math.cos(i),r=t*Math.sin(i),l=s*o,c=a*o,h=n*o,d=r*o;return{x:[s,l,h,n],y:[a,c,d,r]}}var ChordLink=class extends Path8{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.radius=0,this.startAngle1=0,this.endAngle1=0,this.startAngle2=0,this.endAngle2=0,this.tension=1}computeBBox(){const{centerX:t,centerY:e,radius:i,startAngle1:o,endAngle1:s,startAngle2:a,endAngle2:n,tension:r}=this,l=bezierControlPoints({radius:i,startAngle:o,endAngle:n,tension:r}),c=bezierControlPoints({radius:i,startAngle:a,endAngle:s,tension:r}),h=Math.min(...l.x,...c.x),d=Math.max(...l.x,...c.x)-h,u=Math.min(...l.y,...c.y),p=Math.max(...l.y,...c.y)-u;return new BBox11(t+h,e+u,d,p)}tensionedCurveTo(t,e,i,o,s,a,n,r){const{path:l,tension:c}=this,h=1-c;l.cubicCurveTo((i-t)*h+t,(o-e)*h+e,(s-n)*h+n,(a-r)*h+r,n,r)}updatePath(){const{path:t,centerX:e,centerY:i,radius:o}=this;let{startAngle1:s,endAngle1:a,startAngle2:n,endAngle2:r}=this;s>n&&([s,n]=[n,s],[a,r]=[r,a]),t.clear();const l=e+o*Math.cos(s),c=i+o*Math.sin(s);t.moveTo(l,c),this.tensionedCurveTo(l,c,e,i,e,i,e+o*Math.cos(r),i+o*Math.sin(r)),t.arc(e,i,o,r,n,!0),this.tensionedCurveTo(e+o*Math.cos(n),i+o*Math.sin(n),e,i,e,i,e+o*Math.cos(a),i+o*Math.sin(a)),t.arc(e,i,o,a,s,!0),t.closePath()}};__decorateClass([ScenePathChangeDetection6()],ChordLink.prototype,"centerX",2),__decorateClass([ScenePathChangeDetection6()],ChordLink.prototype,"centerY",2),__decorateClass([ScenePathChangeDetection6()],ChordLink.prototype,"radius",2),__decorateClass([ScenePathChangeDetection6()],ChordLink.prototype,"startAngle1",2),__decorateClass([ScenePathChangeDetection6()],ChordLink.prototype,"endAngle1",2),__decorateClass([ScenePathChangeDetection6()],ChordLink.prototype,"startAngle2",2),__decorateClass([ScenePathChangeDetection6()],ChordLink.prototype,"endAngle2",2),__decorateClass([ScenePathChangeDetection6()],ChordLink.prototype,"tension",2);var import_ag_charts_community163=require("ag-charts-community"),{BaseProperties:BaseProperties22,SeriesTooltip:SeriesTooltip4,SeriesProperties,ARRAY:ARRAY7,COLOR_STRING:COLOR_STRING12,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY2,FUNCTION:FUNCTION9,LINE_DASH:LINE_DASH8,OBJECT:OBJECT26,POSITIVE_NUMBER:POSITIVE_NUMBER18,RATIO:RATIO15,STRING:STRING26,Validate:Validate58,Label:Label3}=import_ag_charts_community163._ModuleSupport,ChordSeriesLabelProperties=class extends Label3{constructor(){super(...arguments),this.spacing=1,this.maxWidth=1}};__decorateClass([Validate58(POSITIVE_NUMBER18)],ChordSeriesLabelProperties.prototype,"spacing",2),__decorateClass([Validate58(POSITIVE_NUMBER18)],ChordSeriesLabelProperties.prototype,"maxWidth",2);var ChordSeriesLinkProperties=class extends BaseProperties22{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0,this.tension=0}};__decorateClass([Validate58(COLOR_STRING12,{optional:!0})],ChordSeriesLinkProperties.prototype,"fill",2),__decorateClass([Validate58(RATIO15)],ChordSeriesLinkProperties.prototype,"fillOpacity",2),__decorateClass([Validate58(COLOR_STRING12,{optional:!0})],ChordSeriesLinkProperties.prototype,"stroke",2),__decorateClass([Validate58(RATIO15)],ChordSeriesLinkProperties.prototype,"strokeOpacity",2),__decorateClass([Validate58(POSITIVE_NUMBER18)],ChordSeriesLinkProperties.prototype,"strokeWidth",2),__decorateClass([Validate58(LINE_DASH8)],ChordSeriesLinkProperties.prototype,"lineDash",2),__decorateClass([Validate58(POSITIVE_NUMBER18)],ChordSeriesLinkProperties.prototype,"lineDashOffset",2),__decorateClass([Validate58(RATIO15)],ChordSeriesLinkProperties.prototype,"tension",2),__decorateClass([Validate58(FUNCTION9,{optional:!0})],ChordSeriesLinkProperties.prototype,"itemStyler",2);var ChordSeriesNodeProperties=class extends BaseProperties22{constructor(){super(...arguments),this.spacing=1,this.width=1,this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([Validate58(POSITIVE_NUMBER18)],ChordSeriesNodeProperties.prototype,"spacing",2),__decorateClass([Validate58(POSITIVE_NUMBER18)],ChordSeriesNodeProperties.prototype,"width",2),__decorateClass([Validate58(COLOR_STRING12,{optional:!0})],ChordSeriesNodeProperties.prototype,"fill",2),__decorateClass([Validate58(RATIO15)],ChordSeriesNodeProperties.prototype,"fillOpacity",2),__decorateClass([Validate58(COLOR_STRING12,{optional:!0})],ChordSeriesNodeProperties.prototype,"stroke",2),__decorateClass([Validate58(RATIO15)],ChordSeriesNodeProperties.prototype,"strokeOpacity",2),__decorateClass([Validate58(POSITIVE_NUMBER18)],ChordSeriesNodeProperties.prototype,"strokeWidth",2),__decorateClass([Validate58(LINE_DASH8)],ChordSeriesNodeProperties.prototype,"lineDash",2),__decorateClass([Validate58(POSITIVE_NUMBER18)],ChordSeriesNodeProperties.prototype,"lineDashOffset",2),__decorateClass([Validate58(FUNCTION9,{optional:!0})],ChordSeriesNodeProperties.prototype,"itemStyler",2);var ChordSeriesProperties=class extends SeriesProperties{constructor(){super(...arguments),this.idKey="",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.sizeKey=void 0,this.sizeName=void 0,this.nodes=void 0,this.fills=[],this.strokes=[],this.label=new ChordSeriesLabelProperties,this.link=new ChordSeriesLinkProperties,this.node=new ChordSeriesNodeProperties,this.tooltip=new SeriesTooltip4}};__decorateClass([Validate58(STRING26)],ChordSeriesProperties.prototype,"fromKey",2),__decorateClass([Validate58(STRING26)],ChordSeriesProperties.prototype,"toKey",2),__decorateClass([Validate58(STRING26)],ChordSeriesProperties.prototype,"idKey",2),__decorateClass([Validate58(STRING26,{optional:!0})],ChordSeriesProperties.prototype,"idName",2),__decorateClass([Validate58(STRING26,{optional:!0})],ChordSeriesProperties.prototype,"labelKey",2),__decorateClass([Validate58(STRING26,{optional:!0})],ChordSeriesProperties.prototype,"labelName",2),__decorateClass([Validate58(STRING26,{optional:!0})],ChordSeriesProperties.prototype,"sizeKey",2),__decorateClass([Validate58(STRING26,{optional:!0})],ChordSeriesProperties.prototype,"sizeName",2),__decorateClass([Validate58(ARRAY7,{optional:!0})],ChordSeriesProperties.prototype,"nodes",2),__decorateClass([Validate58(COLOR_STRING_ARRAY2)],ChordSeriesProperties.prototype,"fills",2),__decorateClass([Validate58(COLOR_STRING_ARRAY2)],ChordSeriesProperties.prototype,"strokes",2),__decorateClass([Validate58(OBJECT26)],ChordSeriesProperties.prototype,"label",2),__decorateClass([Validate58(OBJECT26)],ChordSeriesProperties.prototype,"link",2),__decorateClass([Validate58(OBJECT26)],ChordSeriesProperties.prototype,"node",2),__decorateClass([Validate58(OBJECT26)],ChordSeriesProperties.prototype,"tooltip",2);var{SeriesNodePickMode:SeriesNodePickMode3,CachedTextMeasurerPool:CachedTextMeasurerPool3,TextWrapper:TextWrapper4,TextUtils:TextUtils4,createDatumId:createDatumId4,angleBetween:angleBetween2,normalizeAngle360:normalizeAngle3605,isBetweenAngles:isBetweenAngles2,Sector:Sector3,evaluateBezier,applyShapeStyle}=import_ag_charts_community164._ModuleSupport,nodeMidAngle=t=>t.startAngle+angleBetween2(t.startAngle,t.endAngle)/2,ChordSeries=class extends FlowProportionSeries{constructor(t){super({moduleCtx:t,pickModes:[SeriesNodePickMode3.NEAREST_NODE,SeriesNodePickMode3.EXACT_SHAPE_MATCH]}),this.properties=new ChordSeriesProperties}isLabelEnabled(){return(this.properties.labelKey!=null||this.nodes==null)&&this.properties.label.enabled}linkFactory(){return new ChordLink}nodeFactory(){return new Sector3}createNodeData(){const{id:t,_nodeDataDependencies:{seriesRectWidth:e,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0}}=this,{fromKey:o,toKey:s,sizeKey:a,label:{spacing:n,maxWidth:r,fontSize:l},node:{width:c,spacing:h}}=this.properties,d=e/2,u=i/2;let p=[];const{nodeGraph:g,links:y}=this.getNodeGraph(T=>({...T,centerX:d,centerY:u,innerRadius:NaN,outerRadius:NaN,startAngle:NaN,endAngle:NaN}),T=>({...T,centerX:d,centerY:u,radius:NaN,startAngle1:NaN,endAngle1:NaN,startAngle2:NaN,endAngle2:NaN}),{includeCircularReferences:!0});let f=0;g.forEach(({datum:T,linksBefore:O,linksAfter:w},E)=>{const B=O.reduce((z,{link:P})=>z+P.size,0)+w.reduce((z,{link:P})=>z+P.size,0);if(B===0)g.delete(E);else{T.size=B,f+=T.size;const z=this.getLabelText(this.properties.label,{datum:T.datum,value:T.label,fromKey:o,toKey:s,sizeKey:a,size:T.size});T.label=String(z)}});let m=0;if(this.isLabelEnabled()){const T=this.properties.label.getFont();let O=0;g.forEach(({datum:w})=>{const{id:E,label:B}=w;if(B==null)return;const z=TextWrapper4.wrapText(B,{maxWidth:r,font:this.properties.label,textWrap:"never"}),{width:P}=CachedTextMeasurerPool3.measureText(z,{font:T,textAlign:"left",textBaseline:"middle"});O=Math.max(P,O),p.push({id:E,text:z,centerX:d,centerY:u,angle:NaN,radius:NaN})}),m=O+n}const b=g.size;let x=Math.min(e,i)/2-c-m,S=h/x;if(m!==0&&(b*S>=1.5*Math.PI||x<=0)&&(p=[],x=Math.min(e,i)/2-c,S=h/x),b*S>=2*Math.PI||x<=0){logger_exports.warnOnce("There was insufficient space to display the Chord Series.");return}const M=x,A=x+c,v=Math.max((2*Math.PI-b*S)/f,0);let k=0;g.forEach(({datum:T})=>{T.innerRadius=M,T.outerRadius=A,T.startAngle=k,T.endAngle=k+T.size*v,k=T.endAngle+S;const O=(T.innerRadius+T.outerRadius)/2,w=nodeMidAngle(T);T.midPoint={x:T.centerX+O*Math.cos(w),y:T.centerY+O*Math.sin(w)}});const D=[];g.forEach(({datum:T,linksBefore:O,linksAfter:w})=>{const E=nodeMidAngle(T),B=[...O.map(P=>({link:P.link,distance:angleBetween2(nodeMidAngle(P.node.datum),E),after:!1})),...w.map(P=>({link:P.link,distance:angleBetween2(nodeMidAngle(P.node.datum),E),after:!0}))];let z=T.startAngle;B.toSorted((P,L)=>P.distance-L.distance).forEach(({link:P,after:L})=>{const R=P.size*v;L?(P.startAngle1=z,P.endAngle1=z+R):(P.startAngle2=z,P.endAngle2=z+R),z+=P.size*v}),D.push(T)});const{tension:C}=this.properties.link;y.forEach(T=>{T.radius=x;const O=bezierControlPoints({radius:x,startAngle:T.startAngle1,endAngle:T.endAngle2,tension:C}),w=bezierControlPoints({radius:x,startAngle:T.startAngle2,endAngle:T.endAngle1,tension:C}),E=evaluateBezier(...O.x,.5),B=evaluateBezier(...O.y,.5),z=evaluateBezier(...w.x,.5),P=evaluateBezier(...w.y,.5);T.midPoint={x:T.centerX+(E+z)/2,y:T.centerY+(B+P)/2},D.push(T)}),p.forEach(T=>{const O=g.get(T.id)?.datum;O!=null&&(T.radius=A+n,T.angle=normalizeAngle3605(O.startAngle+angleBetween2(O.startAngle,O.endAngle)/2))}),p.sort((T,O)=>T.angle-O.angle);let _=1/0,I=-1/0;return p=p.filter(T=>{const O=TextUtils4.getLineHeight(l),w=Math.atan2(O/2,T.radius),E=T.angle-w,B=T.angle+w;return isBetweenAngles2(_,E,B)||isBetweenAngles2(I,E,B)?!1:(_=Math.min(E,_),I=Math.max(B,I),!0)}),{itemId:t,nodeData:D,labelData:p}}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:o,fontWeight:s,fontSize:a,fontFamily:n}=this.properties.label;e.each((r,{text:l,centerX:c,centerY:h,radius:d,angle:u})=>{r.visible=!0,r.translationX=c+d*Math.cos(u),r.translationY=h+d*Math.sin(u),r.text=l,r.fill=i,r.fontStyle=o,r.fontWeight=s,r.fontSize=a,r.fontFamily=n,r.textBaseline="middle",Math.cos(u)>=0?(r.textAlign="left",r.rotation=u):(r.textAlign="right",r.rotation=u-Math.PI)})}updateNodeSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId4([e.type,e.id]))}getBaseNodeStyle(t){const{properties:e}=this,{fill:i,fillOpacity:o,stroke:s,strokeOpacity:a,lineDash:n,lineDashOffset:r}=e.node,l=t?e.highlightStyle.item:void 0;return{fill:l?.fill??i,fillOpacity:l?.fillOpacity??o,stroke:l?.stroke??s,strokeOpacity:l?.strokeOpacity??a,strokeWidth:l?.strokeWidth??this.getStrokeWidth(e.node.strokeWidth),lineDash:l?.lineDash??n,lineDashOffset:l?.lineDashOffset??r}}getNodeStyleOverrides(t,e,i,o,s,a,n){const{id:r,properties:l}=this,{fills:c,strokes:h}=l,{itemStyler:d}=l.node,u=a.fill??c[i%c.length],p=a.stroke??h[i%h.length],g={};if(n||(g.fill=u,g.stroke=p),d!=null){const y=this.cachedDatumCallback(createDatumId4(t,n?"highlight":"node"),()=>{const{fillOpacity:f=1,strokeOpacity:m=1,strokeWidth:b=0,lineDash:x=[],lineDashOffset:S=0}=a;return d({seriesId:r,datum:e,highlighted:n,label:s,size:o,fill:u,fillOpacity:f,stroke:p,strokeOpacity:m,strokeWidth:b,lineDash:x,lineDashOffset:S})});Object.assign(g,y)}return g}updateNodeNodes(t){const{datumSelection:e,isHighlight:i}=t,o=this.getBaseNodeStyle(i);e.each((s,a)=>{const{datumIndex:n,size:r,label:l}=a,c=this.getNodeStyleOverrides(String(n),a,n.index,r,l,o,i);s.centerX=a.centerX,s.centerY=a.centerY,s.innerRadius=a.innerRadius,s.outerRadius=a.outerRadius,s.startAngle=a.startAngle,s.endAngle=a.endAngle,s.fill=c.fill??o?.fill,s.fillOpacity=c.fillOpacity??o?.fillOpacity,s.stroke=c.stroke??o?.stroke,s.strokeOpacity=c.strokeOpacity??o?.strokeOpacity,s.strokeWidth=c.strokeWidth??o?.strokeWidth,s.lineDash=c.lineDash??o?.lineDash,s.lineDashOffset=c.lineDashOffset??o?.lineDashOffset,s.inset=s.strokeWidth/2})}updateLinkSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId4([e.type,e.index,e.fromNode.id,e.toNode.id]))}getBaseLinkStyle(t){const{properties:e}=this,{fill:i,fillOpacity:o,stroke:s,strokeOpacity:a,lineDash:n,lineDashOffset:r,tension:l}=e.link,c=t?e.highlightStyle.item:void 0;return{fill:c?.fill??i,fillOpacity:c?.fillOpacity??o,stroke:c?.stroke??s,strokeOpacity:c?.strokeOpacity??a,strokeWidth:c?.strokeWidth??this.getStrokeWidth(e.link.strokeWidth),lineDash:c?.lineDash??n,lineDashOffset:c?.lineDashOffset??r,tension:l}}getLinkStyleOverrides(t,e,i,o,s){const{id:a,properties:n}=this,{fills:r,strokes:l}=n,{itemStyler:c}=n.link,h=o.fill??r[i%r.length],d=o.stroke??l[i%l.length],u={};if(s||(u.fill=h,u.stroke=d),c!=null){const p=this.cachedDatumCallback(createDatumId4(t,s?"highlight":"node"),()=>{const{fillOpacity:g=1,strokeOpacity:y=1,strokeWidth:f=0,lineDash:m=[],lineDashOffset:b=0,tension:x}=o;return c({seriesId:a,datum:e,highlighted:s,tension:x,fill:h,fillOpacity:g,stroke:d,strokeOpacity:y,strokeWidth:f,lineDash:m,lineDashOffset:b})});Object.assign(u,p)}return u}updateLinkNodes(t){const{datumSelection:e,isHighlight:i}=t,o=this.getBaseLinkStyle(i);e.each((s,a)=>{const{datumIndex:n}=a,r=a.fromNode.datumIndex,l=this.getLinkStyleOverrides(String(n),a,r.index,o,i);s.centerX=a.centerX,s.centerY=a.centerY,s.radius=a.radius,s.startAngle1=a.startAngle1,s.endAngle1=a.endAngle1,s.startAngle2=a.startAngle2,s.endAngle2=a.endAngle2,applyShapeStyle(s,o,l),s.tension=l?.tension??o.tension})}getTooltipContent(t){const{id:e,linksProcessedData:i,nodesProcessedData:o,properties:s}=this,{fromKey:a,toKey:n,sizeKey:r,sizeName:l,tooltip:c}=s,{datumIndex:h}=t,d=t.type===0?t.fromNode.index:t.index,u=t.type===0?`${t.fromNode.label} - ${t.toNode.label}`:t.label,p=h.type===0?i?.dataSources.get(this.id)?.[h.index]:o?.dataSources.get(this.id)?.[h.index],g=t.size;let y;if(t.type===0){const f=t.fromNode.datumIndex,m=this.getBaseLinkStyle(!1);Object.assign(m,this.getLinkStyleOverrides(String(h),p,f.index,m,!1)),y=m}else{const f=t.label,m=this.getBaseNodeStyle(!1);Object.assign(m,this.getNodeStyleOverrides(String(h),p,h.index,g,f,m,!1)),y=m}return c.formatTooltip({title:u,symbol:this.legendItemSymbol(t.type,d,y),data:r!=null?[{label:l,fallbackLabel:r,value:String(g)}]:[]},{seriesId:e,datum:p,title:u,fromKey:a,toKey:n,sizeKey:r,sizeName:l,size:g,...y})}computeFocusBounds(t){return t}};ChordSeries.className="ChordSeries",ChordSeries.type="chord";var ChordModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["flow-proportion"],solo:!0,identifier:"chord",tooltipDefaults:{range:"exact"},moduleFactory:t=>new ChordSeries(t),themeTemplate:{series:{highlightStyle:{series:{dimOpacity:.2}},label:{fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:5,maxWidth:100},node:{spacing:8,width:10,strokeWidth:0},link:{fillOpacity:.5,strokeWidth:0,tension:.4}},legend:{enabled:!1,toggleSeries:!1}},paletteFactory({takeColors:t,colorsCount:e}){const{fills:i,strokes:o}=t(e);return{fills:i,strokes:o}}},import_ag_charts_community173=require("ag-charts-community"),import_ag_charts_community166=require("ag-charts-community"),{ThemeConstants:{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE5,CARTESIAN_POSITION:CARTESIAN_POSITION3},ThemeSymbols:{DEFAULT_SHADOW_COLOUR}}=import_ag_charts_community166._ModuleSupport;function funnelSeriesAxes(t){const{placement:e,...i}=t?.stageLabel??{};return t?.direction!=="horizontal"?[{type:CARTESIAN_AXIS_TYPE5.CATEGORY,position:e==="after"?CARTESIAN_POSITION3.RIGHT:CARTESIAN_POSITION3.LEFT,label:i},{type:CARTESIAN_AXIS_TYPE5.NUMBER,position:CARTESIAN_POSITION3.BOTTOM}]:[{type:CARTESIAN_AXIS_TYPE5.NUMBER,position:CARTESIAN_POSITION3.LEFT},{type:CARTESIAN_AXIS_TYPE5.CATEGORY,position:e==="before"?CARTESIAN_POSITION3.TOP:CARTESIAN_POSITION3.BOTTOM,label:i}]}var FUNNEL_SERIES_THEME={series:{direction:"vertical",strokeWidth:0,spacingRatio:.25,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}},dropOff:{enabled:!0,fillOpacity:.2,strokeWidth:0},shadow:{enabled:!1,color:DEFAULT_SHADOW_COLOUR,xOffset:3,yOffset:3,blur:5}},axes:{[CARTESIAN_AXIS_TYPE5.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1,formatter(t){return Math.abs(t.value).toFixed(t.fractionDigits??0)}}},[CARTESIAN_AXIS_TYPE5.CATEGORY]:{line:{enabled:!1}}}},import_ag_charts_community171=require("ag-charts-community"),import_ag_charts_community169=require("ag-charts-community"),import_ag_charts_community167=require("ag-charts-community"),{lineDistanceSquared,BBox:BBox12,Path:Path9,ScenePathChangeDetection:ScenePathChangeDetection7}=import_ag_charts_community167._ModuleSupport,delta=1e-6;function pointsEq([t,e],[i,o]){return Math.abs(t-i)<=delta&&Math.abs(e-o)<=delta}var FunnelConnector=class extends Path9{constructor(){super(...arguments),this.x0=0,this.y0=0,this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.x3=0,this.y3=0}get midPoint(){const{x0:t,y0:e,x1:i,y1:o,x2:s,y2:a,x3:n,y3:r}=this;return{x:(t+i+s+n)/4,y:(e+o+a+r)/4}}distanceSquared(t,e){if(this.containsPoint(t,e))return 0;const{x0:i,y0:o,x1:s,y1:a,x2:n,y2:r,x3:l,y3:c}=this;return Math.min(lineDistanceSquared(t,e,i,o,s,a,1/0),lineDistanceSquared(t,e,s,a,n,r,1/0),lineDistanceSquared(t,e,n,r,l,c,1/0),lineDistanceSquared(t,e,l,c,i,o,1/0))}computeBBox(){const{x0:t,y0:e,x1:i,y1:o,x2:s,y2:a,x3:n,y3:r}=this,l=Math.min(t,i,s,n),c=Math.max(t,i,s,n)-l,h=Math.min(e,o,a,r),d=Math.max(e,o,a,r)-h;return new BBox12(l,h,c,d)}updatePath(){const{path:t,x0:e,y0:i,x1:o,y1:s,x2:a,y2:n,x3:r,y3:l}=this,c=[[e,i],[o,s],[a,n],[r,l]];t.clear();let h,d;c.forEach(u=>{if(h!=null&&pointsEq(h,u)||d!=null&&pointsEq(d,u))return;const[p,g]=u;h==null?t.moveTo(p,g):t.lineTo(p,g),h??(h=u),d=u}),t.closePath()}};__decorateClass([ScenePathChangeDetection7()],FunnelConnector.prototype,"x0",2),__decorateClass([ScenePathChangeDetection7()],FunnelConnector.prototype,"y0",2),__decorateClass([ScenePathChangeDetection7()],FunnelConnector.prototype,"x1",2),__decorateClass([ScenePathChangeDetection7()],FunnelConnector.prototype,"y1",2),__decorateClass([ScenePathChangeDetection7()],FunnelConnector.prototype,"x2",2),__decorateClass([ScenePathChangeDetection7()],FunnelConnector.prototype,"y2",2),__decorateClass([ScenePathChangeDetection7()],FunnelConnector.prototype,"x3",2),__decorateClass([ScenePathChangeDetection7()],FunnelConnector.prototype,"y3",2);var import_ag_charts_community168=require("ag-charts-community"),{NODE_UPDATE_STATE_TO_PHASE_MAPPING}=import_ag_charts_community168._ModuleSupport;function connectorStartingPosition(t,e,i,o){const{x0:s,y0:a,x1:n,y1:r,x2:l,y2:c,x3:h,y3:d,opacity:u}=t;return i?{x0:(s+h)/2,y0:(a+d)/2,x1:(n+l)/2,y1:(r+c)/2,x2:(n+l)/2,y2:(r+c)/2,x3:(s+h)/2,y3:(a+d)/2,opacity:u}:{x0:(s+n)/2,y0:(a+r)/2,x1:(s+n)/2,y1:(a+r)/2,x2:(l+h)/2,y2:(c+d)/2,x3:(l+h)/2,y3:(c+d)/2,opacity:u}}function prepareConnectorAnimationFunctions(t,e){const i=a=>a==null;return{fromFn:(a,n,r)=>{r==="updated"&&i(n)?r="removed":r==="updated"&&i(a.previousDatum)&&(r="added");let l;r==="added"&&a.previousDatum==null&&e==="fade"?l={...resetConnectorSelectionsFn(a,n),opacity:0}:r==="unknown"||r==="added"?l=connectorStartingPosition(n,a.previousDatum,t,e):l={x0:a.x0,y0:a.y0,x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,x3:a.x3,y3:a.y3,opacity:a.opacity};const c=NODE_UPDATE_STATE_TO_PHASE_MAPPING[r];return{...l,phase:c}},toFn:(a,n,r)=>{let l;return r==="removed"&&a.datum==null&&e==="fade"?l={...resetConnectorSelectionsFn(a,n),opacity:0}:r==="removed"||i(n)?l=connectorStartingPosition(n,a.previousDatum,t,e):l=resetConnectorSelectionsFn(a,n),l}}}function resetConnectorSelectionsFn(t,e){const{x0:i,y0:o,x1:s,y1:a,x2:n,y2:r,x3:l,y3:c,opacity:h}=e;return{x0:i,y0:o,x1:s,y1:a,x2:n,y2:r,x3:l,y3:c,opacity:h}}var{SeriesNodePickMode:SeriesNodePickMode4,SeriesZIndexMap,valueProperty:valueProperty7,keyProperty:keyProperty5,ChartAxisDirection:ChartAxisDirection20,updateLabelNode,SMALLEST_KEY_INTERVAL:SMALLEST_KEY_INTERVAL3,LARGEST_KEY_INTERVAL,diff:diff3,fixNumericExtent:fixNumericExtent4,seriesLabelFadeInAnimation,resetMotion,resetLabelFn,animationValidation:animationValidation3,computeBarFocusBounds:computeBarFocusBounds3,ContinuousScale:ContinuousScale5,Group:Group10,Selection:Selection5,PointerEvents,motion:motion2,checkCrisp,createDatumId:createDatumId5}=import_ag_charts_community169._ModuleSupport,FunnelSeriesNodeEvent=class extends import_ag_charts_community169._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o),this.xKey=o.properties.stageKey,this.yKey=o.properties.valueKey}},BaseFunnelSeries=class extends import_ag_charts_community169._ModuleSupport.AbstractBarSeries{constructor({moduleCtx:t,animationResetFns:e}){super({moduleCtx:t,pickModes:[SeriesNodePickMode4.AXIS_ALIGNED,SeriesNodePickMode4.EXACT_SHAPE_MATCH],hasHighlightedLabels:!0,directionKeys:{x:["stageKey"],y:["valueKey"]},directionNames:{x:[],y:[]},datumSelectionGarbageCollection:!1,animationResetFns:{datum:e.datum,label:resetLabelFn}}),this.NodeEvent=FunnelSeriesNodeEvent,this.connectorNodeGroup=this.contentGroup.appendChild(new Group10({name:`${this.id}-series-connectorNodes`,zIndex:SeriesZIndexMap.BACKGROUND})),this.connectorSelection=Selection5.select(this.connectorNodeGroup,()=>this.connectionFactory()),this.connectorNodeGroup.pointerEvents=PointerEvents.None}get pickModeAxis(){return"main-category"}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.connectorNodeGroup.zIndex=[SeriesZIndexMap.BACKGROUND,t],!0):!1}isVertical(){return!super.isVertical()}connectionFactory(){return new FunnelConnector}async processData(t){if(!this.properties.isValid())return;const{stageKey:e,valueKey:i}=this.properties,{visible:o,id:s}=this,a=(g,y,f)=>o&&this.ctx.legendManager.getItemEnabled({seriesId:s,itemId:f}),n=this.getCategoryAxis()?.scale,r=this.getValueAxis()?.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:n,yScale:r}),d=[];this.ctx.animationManager.isSkipped()||(this.processedData&&d.push(diff3(this.id,this.processedData)),d.push(animationValidation3()));const u=this.visible?{}:{forceValue:0},{processedData:p}=await this.requestDataModel(t,this.data,{props:[keyProperty5(e,c,{id:"xValue"}),valueProperty7(i,h,{id:"yValue",...u,validation:a,invalidValue:0}),...l?[SMALLEST_KEY_INTERVAL3,LARGEST_KEY_INTERVAL]:[],...d],groupByKeys:!1});this.smallestDataInterval=p.reduced?.smallestKeyInterval,this.largestDataInterval=p.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i,id:o,ctx:{legendManager:s}}=this;if(!e||!i)return[];const{keys:[a]}=e.domain;if(t===this.getCategoryDirection()){const n=i.resolveProcessedDataDefById(this,"xValue");return n?.def.type==="key"&&n?.def.valueType==="category"?this.hasData?a.filter((r,l)=>s.getItemEnabled({seriesId:o,itemId:l})):[]:this.padBandExtent(a)}else{const n=this.domainForClippedRange(ChartAxisDirection20.Y,["yValue"],"xValue",!0),r=Math.max(...n),l=[-r,r];return fixNumericExtent4(l)}}getSeriesRange(t,e){return[NaN,NaN]}createNodeData(){const{hasData:t,data:e,dataModel:i,groupScale:o,processedData:s,id:a,ctx:{legendManager:n}}=this,r=this.getCategoryAxis(),l=this.getValueAxis();if(!(t&&e&&r&&l&&i&&s?.type==="ungrouped"))return;const c=r.scale,h=l.scale,d=this.getBarDirection()===ChartAxisDirection20.X,{stageKey:u,valueKey:p}=this.properties,{strokeWidth:g}=this.barStyle(),y=`${p}`,f={itemId:y,nodeData:[],labelData:[],connectorData:[],scales:this.calculateScaling(),visible:this.visible},m=this.visible;if(!m)return f;const b=i.resolveKeysById(this,"xValue",s),x=i.resolveColumnById(this,"yValue",s),{barWidth:S,groupIndex:M}=this.updateGroupScale(r),A=ContinuousScale5.is(c)?S*-.5:0,v=checkCrisp(r?.scale,r?.visibleRange,this.smallestDataInterval,this.largestDataInterval);let k;return(s.dataSources.get(this.id)??[]).forEach((C,_)=>{const I=m&&n.getItemEnabled({seriesId:a,itemId:_}),T=b[_];if(T==null)return;const O=Math.round(c.convert(T))+o.convert(String(M))+A,w=x[_],E=Math.round(h.convert(-w)),B=Math.round(h.convert(w)),z=Math.max(g,Math.abs(B-E)),P={x:d?Math.min(B,E):O,y:d?O:Math.min(B,E),width:d?z:S,height:d?S:z},L={x:P.x+P.width/2,y:P.y+P.height/2},R=this.createLabelData({datumIndex:_,rect:P,barAlongX:d,yDatum:w,datum:C,visible:I}),V={index:_,series:this,itemId:y,datum:C,datumIndex:_,xValue:T,yValue:w,xKey:u,yKey:p,x:P.x,y:P.y,width:P.width,height:P.height,midPoint:L,strokeWidth:g,crisp:v,label:R,visible:I};if(f.nodeData.push(V),R!=null&&f.labelData.push(R),k!=null){const F=k.rect,G=k.nodeDatum,W=k.datumIndex;d?f.connectorData.push({datum:G,datumIndex:W,x0:F.x,y0:F.y+F.height,x1:F.x+F.width,y1:F.y+F.height,x2:P.x+P.width,y2:P.y,x3:P.x,y3:P.y,opacity:1}):f.connectorData.push({datum:G,datumIndex:W,x0:F.x+F.width,y0:F.y,x1:P.x,y1:P.y,x2:P.x,y2:P.y+P.height,x3:F.x+F.width,y3:F.y+F.height,opacity:1})}I&&(k={itemId:y,rect:P,nodeDatum:V,datumIndex:_})}),f}updateNodes(t,e,i){super.updateNodes(t,e,i);const{connectorSelection:o}=this,s=this.contextNodeData?.connectorData??[];this.connectorSelection=this.updateConnectorSelection({connectorSelection:o,connectorData:s}),this.updateConnectorNodes({connectorSelection:o})}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,o=e??[];return i.update(o,void 0,s=>this.getDatumId(s))}updateConnectorSelection(t){const{connectorData:e,connectorSelection:i}=t;return i.update(this.connectorEnabled()?e:[],void 0,o=>this.getDatumId(o.datum))}updateConnectorNodes(t){const{fills:e,strokes:i}=this.properties,{fill:o,fillOpacity:s,stroke:a,strokeOpacity:n,strokeWidth:r,lineDash:l,lineDashOffset:c}=this.connectorStyle();t.connectorSelection.each((h,d)=>{const{datumIndex:u}=d;h.setProperties(resetConnectorSelectionsFn(h,d)),h.fill=o??e[u%e.length],h.fillOpacity=s,h.stroke=a??i[u%i.length],h.strokeOpacity=n,h.strokeWidth=r,h.lineDash=l,h.lineDashOffset=c})}getHighlightLabelData(t,e){const i=t.filter(o=>o.datum===e.datum);return i.length>0?i:void 0}updateLabelSelection(t){const e=this.properties.label.enabled?t.labelData:[];return t.labelSelection.update(e,i=>{i.pointerEvents=PointerEvents.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{updateLabelNode(e,this.properties.label,i)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,properties:s}=this,{stageKey:a,valueKey:n,tooltip:r}=s,l=this.getCategoryAxis(),c=this.getValueAxis();if(!i||!o||!l||!c)return;const{datumIndex:h}=t,d=o.dataSources.get(this.id)?.[h],u=i.resolveKeysById(this,"xValue",o)[h],p=i.resolveColumnById(this,"yValue",o)[h];if(u!=null)return r.formatTooltip({symbol:this.legendItemSymbol(h),data:[{label:l.formatDatum(u),value:c.formatDatum(p)}]},{seriesId:e,datum:d,title:a,stageKey:a,valueKey:n,...this.tooltipStyle(d,h)})}resetAllAnimation(t){super.resetAllAnimation(t),resetMotion([this.connectorSelection],resetConnectorSelectionsFn)}animateEmptyUpdateReady({labelSelection:t}){const{connectorSelection:e}=this,i=this.isVertical(),s=prepareConnectorAnimationFunctions(i,"normal");motion2.fromToMotion(this.id,"connectors",this.ctx.animationManager,[e],s),seriesLabelFadeInAnimation(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(t){const{labelSelection:e}=t;this.ctx.animationManager.stopByAnimationGroupId(this.id),seriesLabelFadeInAnimation(this,"labels",this.ctx.animationManager,e)}getDatumId(t){return createDatumId5(t.xValue)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){return computeBarFocusBounds3(this,this.contextNodeData?.nodeData[t])}legendItemSymbol(t){const{strokeWidth:e,fillOpacity:i,strokeOpacity:o,lineDash:s,lineDashOffset:a}=this.barStyle(),{fills:n,strokes:r}=this.properties,l=n[t%n.length]??"black",c=r[t%r.length]??"black";return{marker:{fill:l,fillOpacity:i,stroke:c,strokeWidth:e,strokeOpacity:o,lineDash:s,lineDashOffset:a}}}getLegendData(t){const{id:e,processedData:i,dataModel:o,ctx:{legendManager:s},visible:a}=this;if(!o||!i||t!=="category"||!this.properties.isValid())return[];const{showInLegend:n}=this.properties,r=o.resolveKeysById(this,"xValue",i);return(i.dataSources.get(this.id)??[]).map((l,c)=>{const h=r[c];if(h!=null)return{legendType:"category",id:e,datum:l,itemId:c,seriesId:e,enabled:a&&s.getItemEnabled({seriesId:e,itemId:c}),label:{text:String(h)},symbol:this.legendItemSymbol(c),skipAnimations:!0,hideInLegend:!n}}).filter(l=>l!=null)}},import_ag_charts_community170=require("ag-charts-community"),{Label:Label4,AbstractBarSeriesProperties:AbstractBarSeriesProperties3,SeriesTooltip:SeriesTooltip5,AxisLabel:AxisLabel2,Validate:Validate59,UNION:UNION11,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY3,LINE_DASH:LINE_DASH9,OBJECT:OBJECT27,POSITIVE_NUMBER:POSITIVE_NUMBER19,RATIO:RATIO16,STRING:STRING27}=import_ag_charts_community170._ModuleSupport,ConeFunnelSeriesLabel=class extends Label4{constructor(){super(...arguments),this.spacing=0}};__decorateClass([Validate59(UNION11(["before","middle","after"],"a placement"))],ConeFunnelSeriesLabel.prototype,"placement",2),__decorateClass([Validate59(POSITIVE_NUMBER19)],ConeFunnelSeriesLabel.prototype,"spacing",2);var ConeFunnelSeriesStageLabel=class extends AxisLabel2{};__decorateClass([Validate59(UNION11(["before","after"],"a placement"))],ConeFunnelSeriesStageLabel.prototype,"placement",2);var ConeFunnelProperties=class extends AbstractBarSeriesProperties3{constructor(){super(...arguments),this.fills=[],this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new ConeFunnelSeriesLabel,this.stageLabel=new ConeFunnelSeriesStageLabel,this.tooltip=new SeriesTooltip5}};__decorateClass([Validate59(STRING27)],ConeFunnelProperties.prototype,"stageKey",2),__decorateClass([Validate59(STRING27)],ConeFunnelProperties.prototype,"valueKey",2),__decorateClass([Validate59(COLOR_STRING_ARRAY3)],ConeFunnelProperties.prototype,"fills",2),__decorateClass([Validate59(RATIO16)],ConeFunnelProperties.prototype,"fillOpacity",2),__decorateClass([Validate59(COLOR_STRING_ARRAY3)],ConeFunnelProperties.prototype,"strokes",2),__decorateClass([Validate59(POSITIVE_NUMBER19)],ConeFunnelProperties.prototype,"strokeWidth",2),__decorateClass([Validate59(RATIO16)],ConeFunnelProperties.prototype,"strokeOpacity",2),__decorateClass([Validate59(LINE_DASH9)],ConeFunnelProperties.prototype,"lineDash",2),__decorateClass([Validate59(POSITIVE_NUMBER19)],ConeFunnelProperties.prototype,"lineDashOffset",2),__decorateClass([Validate59(OBJECT27)],ConeFunnelProperties.prototype,"label",2),__decorateClass([Validate59(OBJECT27)],ConeFunnelProperties.prototype,"stageLabel",2),__decorateClass([Validate59(OBJECT27)],ConeFunnelProperties.prototype,"tooltip",2);function resetLineSelectionsFn(t,{x:e,y:i,width:o,height:s,opacity:a}){return{x1:e,y1:i,x2:e+o,y2:i+s,opacity:a}}var{formatValue,Line:Line5}=import_ag_charts_community171._ModuleSupport,ConeFunnelSeries=class extends BaseFunnelSeries{constructor(t){super({moduleCtx:t,animationResetFns:{datum:resetLineSelectionsFn}}),this.properties=new ConeFunnelProperties}get hasData(){const{id:t,ctx:{legendManager:e}}=this,i=this.data?.reduce((o,s,a)=>o+(e.getItemEnabled({seriesId:t,itemId:a})?1:0),0);return i!=null&&i>1}getBandScalePadding(){return{inner:1,outer:0}}connectorEnabled(){return!0}barStyle(){return{fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[],lineDashOffset:0}}connectorStyle(){const{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:o,lineDashOffset:s}=this.properties;return{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:o,lineDashOffset:s}}nodeFactory(){return new Line5}createLabelData({datumIndex:t,rect:e,barAlongX:i,yDatum:o,datum:s,visible:a}){const{stageKey:n,valueKey:r,label:l}=this.properties,{spacing:c,placement:h}=l;let d,u,p,g;if(i)switch(d=e.x+e.width/2,p="center",h){case"before":u=e.y-c,g="bottom";break;case"after":u=e.y+e.height+c,g="top";break;default:u=e.y+e.height/2,g="middle"}else switch(u=e.y+e.height/2,g="middle",h){case"before":d=e.x-c,p="right";break;case"after":d=e.x+e.width+c,p="left";break;default:d=e.x+e.width/2,p="center"}return{x:d,y:u,textAlign:p,textBaseline:g,text:this.getLabelText(l,{itemId:r,value:o,datum:s,stageKey:n,valueKey:r},y=>formatValue(y,0)),itemId:r,datum:s,datumIndex:t,series:this,visible:a}}updateDatumNodes(t){const e=t.isHighlight?this.properties.highlightStyle.item:void 0;t.datumSelection.each((i,o)=>{i.setProperties(resetLineSelectionsFn(i,o)),i.stroke=e?.stroke,i.strokeWidth=e?.strokeWidth??0,i.strokeOpacity=e?.strokeOpacity??1,i.lineDash=e?.lineDash,i.lineDashOffset=e?.lineDashOffset??0})}tooltipStyle(t,e){const{fills:i,strokes:o}=this.properties,s=i[e%i.length]??"black",a=o[e%o.length]??"black",{fillOpacity:n,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}=this.barStyle();return{fill:s,fillOpacity:n,stroke:a,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}}};ConeFunnelSeries.className="ConeFunnelSeries",ConeFunnelSeries.type="cone-funnel";var import_ag_charts_community172=require("ag-charts-community"),{ThemeConstants:{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE6}}=import_ag_charts_community172._ModuleSupport,CONE_FUNNEL_SERIES_THEME={series:{direction:"vertical",strokeWidth:0,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},placement:"before",spacing:4}},seriesArea:{padding:{top:20,bottom:20}},axes:{[CARTESIAN_AXIS_TYPE6.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1,formatter(t){return Math.abs(t.value).toFixed(t.fractionDigits??0)}}},[CARTESIAN_AXIS_TYPE6.CATEGORY]:{line:{enabled:!1}}}},ConeFunnelModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"cone-funnel",moduleFactory:t=>new ConeFunnelSeries(t),solo:!0,tooltipDefaults:{range:"nearest"},defaultAxes:funnelSeriesAxes,themeTemplate:CONE_FUNNEL_SERIES_THEME,paletteFactory:({userPalette:t,themeTemplateParameters:e,takeColors:i,colorsCount:o})=>{const{fills:s}=i(o),a=e.get(import_ag_charts_community173._ModuleSupport.ThemeSymbols.DEFAULT_FUNNEL_SERIES_COLOR_RANGE),n=t==="inbuilt"?a:[s[0],s[1]];return{fills:n,strokes:n.slice(0)}}},import_ag_charts_community175=require("ag-charts-community"),import_ag_charts_community174=require("ag-charts-community"),{Label:Label5,DropShadow,AbstractBarSeriesProperties:AbstractBarSeriesProperties4,BaseProperties:BaseProperties23,SeriesTooltip:SeriesTooltip6,AxisLabel:AxisLabel3,Validate:Validate60,UNION:UNION12,BOOLEAN:BOOLEAN27,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY4,COLOR_STRING:COLOR_STRING13,FUNCTION:FUNCTION10,LINE_DASH:LINE_DASH10,OBJECT:OBJECT28,POSITIVE_NUMBER:POSITIVE_NUMBER20,RATIO:RATIO17,STRING:STRING28}=import_ag_charts_community174._ModuleSupport,FunnelSeriesLabel=class extends Label5{},FunnelSeriesStageLabel=class extends AxisLabel3{};__decorateClass([Validate60(UNION12(["before","after"],"a placement"))],FunnelSeriesStageLabel.prototype,"placement",2);var FunnelDropOff=class extends BaseProperties23{constructor(){super(...arguments),this.enabled=!0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([Validate60(BOOLEAN27)],FunnelDropOff.prototype,"enabled",2),__decorateClass([Validate60(COLOR_STRING13,{optional:!0})],FunnelDropOff.prototype,"fill",2),__decorateClass([Validate60(RATIO17)],FunnelDropOff.prototype,"fillOpacity",2),__decorateClass([Validate60(COLOR_STRING13,{optional:!0})],FunnelDropOff.prototype,"stroke",2),__decorateClass([Validate60(POSITIVE_NUMBER20)],FunnelDropOff.prototype,"strokeWidth",2),__decorateClass([Validate60(RATIO17)],FunnelDropOff.prototype,"strokeOpacity",2),__decorateClass([Validate60(LINE_DASH10)],FunnelDropOff.prototype,"lineDash",2),__decorateClass([Validate60(POSITIVE_NUMBER20)],FunnelDropOff.prototype,"lineDashOffset",2);var FunnelProperties=class extends AbstractBarSeriesProperties4{constructor(){super(...arguments),this.fills=[],this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.spacingRatio=0,this.dropOff=new FunnelDropOff,this.shadow=new DropShadow().set({enabled:!1}),this.label=new FunnelSeriesLabel,this.stageLabel=new FunnelSeriesStageLabel,this.tooltip=new SeriesTooltip6}};__decorateClass([Validate60(STRING28)],FunnelProperties.prototype,"stageKey",2),__decorateClass([Validate60(STRING28)],FunnelProperties.prototype,"valueKey",2),__decorateClass([Validate60(COLOR_STRING_ARRAY4)],FunnelProperties.prototype,"fills",2),__decorateClass([Validate60(RATIO17)],FunnelProperties.prototype,"fillOpacity",2),__decorateClass([Validate60(COLOR_STRING_ARRAY4)],FunnelProperties.prototype,"strokes",2),__decorateClass([Validate60(POSITIVE_NUMBER20)],FunnelProperties.prototype,"strokeWidth",2),__decorateClass([Validate60(RATIO17)],FunnelProperties.prototype,"strokeOpacity",2),__decorateClass([Validate60(LINE_DASH10)],FunnelProperties.prototype,"lineDash",2),__decorateClass([Validate60(POSITIVE_NUMBER20)],FunnelProperties.prototype,"lineDashOffset",2),__decorateClass([Validate60(RATIO17)],FunnelProperties.prototype,"spacingRatio",2),__decorateClass([Validate60(FUNCTION10,{optional:!0})],FunnelProperties.prototype,"itemStyler",2),__decorateClass([Validate60(OBJECT28)],FunnelProperties.prototype,"dropOff",2),__decorateClass([Validate60(OBJECT28)],FunnelProperties.prototype,"shadow",2),__decorateClass([Validate60(OBJECT28)],FunnelProperties.prototype,"label",2),__decorateClass([Validate60(OBJECT28)],FunnelProperties.prototype,"stageLabel",2),__decorateClass([Validate60(OBJECT28)],FunnelProperties.prototype,"tooltip",2);var{ChartAxisDirection:ChartAxisDirection21,resetBarSelectionsFn,prepareBarAnimationFunctions,midpointStartingBarPosition,createDatumId:createDatumId6,formatValue:formatValue2,Rect:Rect4,motion:motion3,applyShapeStyle:applyShapeStyle2}=import_ag_charts_community175._ModuleSupport,FunnelSeries=class extends BaseFunnelSeries{constructor(t){super({moduleCtx:t,animationResetFns:{datum:resetBarSelectionsFn}}),this.properties=new FunnelProperties}getBandScalePadding(){return{inner:this.properties.spacingRatio,outer:0}}connectorEnabled(){return this.properties.dropOff.enabled}barStyle(){const{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:o,lineDashOffset:s}=this.properties;return{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:o,lineDashOffset:s}}connectorStyle(){const{fill:t,fillOpacity:e,stroke:i,strokeOpacity:o,strokeWidth:s,lineDash:a,lineDashOffset:n}=this.properties.dropOff;return{fill:t,fillOpacity:e,stroke:i,strokeOpacity:o,strokeWidth:s,lineDash:a,lineDashOffset:n}}nodeFactory(){return new Rect4}createLabelData({datumIndex:t,rect:e,yDatum:i,datum:o,visible:s}){const{valueKey:a,stageKey:n,label:r}=this.properties;return{x:e.x+e.width/2,y:e.y+e.height/2,textAlign:"center",textBaseline:"middle",text:this.getLabelText(r,{itemId:n,value:i,datum:o,valueKey:a,stageKey:n},l=>formatValue2(l,0)),itemId:n,datum:o,datumIndex:t,series:this,visible:s}}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{fill:i?.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset}}getItemStyleOverrides(t,e,i,o,s){const{id:a,properties:n}=this,{stageKey:r,valueKey:l,fills:c,strokes:h,itemStyler:d}=n,u=o.fill??c[i%c.length]??"black",p=o.stroke??h[i%h.length]??"black",g={};if(s||(g.fill=u,g.stroke=p),d!=null){const y=this.cachedDatumCallback(createDatumId6(t,s?"highlight":"node"),()=>{const{fillOpacity:f,strokeOpacity:m,strokeWidth:b,lineDash:x,lineDashOffset:S}=o;return d({seriesId:a,datum:e,highlighted:s,stageKey:r,valueKey:l,fill:u,fillOpacity:f,stroke:p,strokeOpacity:m,strokeWidth:b,lineDash:x,lineDashOffset:S})});Object.assign(g,y)}return g}updateDatumNodes(t){const{shadow:e}=this.properties,{datumSelection:i,isHighlight:o}=t,s=this.getCategoryDirection()===ChartAxisDirection21.X,a=this.getItemBaseStyle(o);i.each((n,r)=>{const{datumIndex:l}=r,c=this.getItemStyleOverrides(String(r.datumIndex),r.datum,l,a,o);applyShapeStyle2(n,a,c),n.visible=s?r.width>0:r.height>0,n.crisp=r.crisp,n.fillShadow=e})}tooltipStyle(t,e){const i=this.getItemBaseStyle(!1);return Object.assign(i,this.getItemStyleOverrides(String(e),t,e,i,!1)),i}animateEmptyUpdateReady(t){super.animateEmptyUpdateReady(t);const{datumSelection:e}=t,i=this.isVertical(),s=prepareBarAnimationFunctions(midpointStartingBarPosition(i,"normal"));motion3.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],s)}animateWaitingUpdateReady(t){super.animateWaitingUpdateReady(t);const{datumSelection:e}=t,{processedData:i}=this,o=i?.reduced?.diff?.[this.id],s=prepareBarAnimationFunctions(midpointStartingBarPosition(this.isVertical(),"fade"));motion3.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],s,(a,n)=>n.xValue,o)}};FunnelSeries.className="FunnelSeries",FunnelSeries.type="funnel";var FunnelModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"funnel",moduleFactory:t=>new FunnelSeries(t),solo:!0,tooltipDefaults:{range:"exact"},defaultAxes:funnelSeriesAxes,themeTemplate:FUNNEL_SERIES_THEME,paletteFactory:({takeColors:t})=>{const{fills:e,strokes:i}=t(1);return{fills:e,strokes:i}}},import_ag_charts_community181=require("ag-charts-community"),import_ag_charts_community179=require("ag-charts-community"),import_ag_charts_community176=require("ag-charts-community"),{CachedTextMeasurerPool:CachedTextMeasurerPool4,TextUtils:TextUtils5,TextWrapper:TextWrapper5}=import_ag_charts_community176._ModuleSupport;function generateLabelSecondaryLabelFontSizeCandidates(t,e){const{fontSize:i,minimumFontSize:o=i}=t,{fontSize:s,minimumFontSize:a=s}=e,n=i-o,r=s-a;let l=t.fontSize,c=e.fontSize;const h=[{labelFontSize:i,secondaryLabelFontSize:s}];for(;l>o||c>a;){const d=n>0?(l-o)/n:-1,u=r>0?(c-a)/r:-1;d>u?l--:c--,h.push({labelFontSize:l,secondaryLabelFontSize:c})}return h.reverse(),h}function getLineHeight(t,e){return t.lineHeight!=null&&t.fontSize!=null?t.lineHeight*e/t.fontSize:TextUtils5.getLineHeight(e)}function formatStackedLabels(t,e,i,o,{padding:s},a){const{spacing:n=0}=e,r=2*s,l=2*s+n,c=(e.minimumFontSize??e.fontSize)+(o.minimumFontSize??o.fontSize);if(c>a(c+l,!1).height-l)return;const h=generateLabelSecondaryLabelFontSizeCandidates(e,o),d={fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight},u={fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight};let p,g;return findMaxValue(0,h.length-1,y=>{const{labelFontSize:f,secondaryLabelFontSize:m}=h[y],b=y===0,x=getLineHeight(e,f),S=getLineHeight(o,m),M=a(x+S+l,b),A=M.width-r,v=M.height-l;if(x+S>v||((p==null||p.fontSize!==f)&&(d.fontSize=f,p=wrapLabel(e,t,A,v,d,e.wrapping,b?e.overflowStrategy:"hide")),p==null||p.width>A||p.height>v)||((g==null||g.fontSize!==m)&&(u.fontSize=m,g=wrapLabel(o,i,A,v,u,o.wrapping,b?o.overflowStrategy:"hide")),g==null))return;const k=p.height+g.height;if(!(g.width>A||k>v))return{width:Math.max(p.width,g.width),height:k+n,meta:M.meta,label:p,secondaryLabel:g}})}function formatSingleLabel(t,e,{padding:i},o){const s=2*i,a=Math.min(e.minimumFontSize??e.fontSize,e.fontSize),n={fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight};return findMaxValue(a,e.fontSize,r=>{const l=getLineHeight(e,r),c=r===a,h=o(l+s,c),d=h.width-s,u=h.height-s;if(l>u)return;n.fontSize=r;const p=TextWrapper5.wrapLines(t,{maxWidth:d,maxHeight:u,font:n,textWrap:e.wrapping,overflow:(c?e.overflowStrategy:void 0)??"hide"});if(!p.length)return;const g=clipLines(p,{lineHeight:l,font:n,maxWidth:d,maxHeight:u});if(g)return[{fontSize:r,lineHeight:l,...g},h.meta]})}function hasInvalidFontSize(t){return t?.minimumFontSize!=null&&t?.fontSize!=null&&t?.minimumFontSize>t?.fontSize}function formatLabels(t,e,i,o,s,a){const n=e.enabled?t:void 0,r=o.enabled?i:void 0;(hasInvalidFontSize(e)||hasInvalidFontSize(o))&&logger_exports.warnOnce("minimumFontSize should be set to a value less than or equal to the font size");let l;n!=null&&r!=null&&(l=formatStackedLabels(n,e,r,o,s,a));let c;if(l==null&&n!=null&&(c=formatSingleLabel(n,e,s,a)),c!=null){const[d,u]=c;l={width:d.width,height:d.height,meta:u,label:d,secondaryLabel:void 0}}let h;if(l==null&&n==null&&r!=null&&(h=formatSingleLabel(r,o,s,a)),h!=null){const[d,u]=h;l={width:d.width,height:d.height,meta:u,label:void 0,secondaryLabel:d}}return l}function wrapLabel(t,e,i,o,s,a,n){const r=TextWrapper5.wrapLines(e,{maxWidth:i,maxHeight:o,font:s,textWrap:a,overflow:n});if(!r.length)return;const l=getLineHeight(t,s.fontSize),{width:c}=CachedTextMeasurerPool4.measureLines(r,{font:s});return{width:c,lineHeight:l,text:r.join(` `),height:r.length*l,fontSize:s.fontSize}}function clipLines(t,{font:e,lineHeight:i=TextUtils5.defaultLineHeight,maxWidth:o,maxHeight:s=1/0}){let a=i*t.length;for(;a>s;){if(t.length===1)return;t.pop(),t[t.length-1]=TextWrapper5.appendEllipsis(t.at(-1)),a=i*t.length}const n=CachedTextMeasurerPool4.measureLines(t,{font:e});let r,l;if(n.width>o){const c=[];l=0;for(const h of n.lineMetrics){if(h.width>o){if(!c.length)return;break}c.push(h.text),l=Math.max(l,h.width)}r=TextWrapper5.appendEllipsis(c.join(` `))}else r=t.join(` `),l=n.width;return{text:r,width:l,height:a}}var import_ag_charts_community178=require("ag-charts-community"),import_ag_charts_community177=require("ag-charts-community"),{Validate:Validate61,NUMBER:NUMBER14,POSITIVE_NUMBER:POSITIVE_NUMBER21,TEXT_WRAP,OVERFLOW_STRATEGY}=import_ag_charts_community177._ModuleSupport,BaseAutoSizedLabel=class extends import_ag_charts_community177._ModuleSupport.Label{constructor(){super(...arguments),this.wrapping="on-space",this.overflowStrategy="ellipsis"}};__decorateClass([Validate61(TEXT_WRAP)],BaseAutoSizedLabel.prototype,"wrapping",2),__decorateClass([Validate61(OVERFLOW_STRATEGY)],BaseAutoSizedLabel.prototype,"overflowStrategy",2),__decorateClass([Validate61(POSITIVE_NUMBER21,{optional:!0})],BaseAutoSizedLabel.prototype,"lineHeight",2),__decorateClass([Validate61(POSITIVE_NUMBER21,{optional:!0})],BaseAutoSizedLabel.prototype,"minimumFontSize",2);var AutoSizedLabel=class extends BaseAutoSizedLabel{constructor(){super(...arguments),this.spacing=0}};__decorateClass([Validate61(NUMBER14)],AutoSizedLabel.prototype,"spacing",2);var AutoSizedSecondaryLabel=class extends BaseAutoSizedLabel{},{CartesianSeriesProperties,SeriesTooltip:SeriesTooltip7,Validate:Validate62,AND:AND5,ARRAY:ARRAY8,COLOR_STRING:COLOR_STRING14,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY5,FUNCTION:FUNCTION11,OBJECT:OBJECT29,POSITIVE_NUMBER:POSITIVE_NUMBER22,RATIO:RATIO18,STRING:STRING29,TEXT_ALIGN:TEXT_ALIGN2,VERTICAL_ALIGN}=import_ag_charts_community178._ModuleSupport,HeatmapSeriesProperties=class extends CartesianSeriesProperties{constructor(){super(...arguments),this.colorRange=["black","black"],this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.textAlign="center",this.verticalAlign="middle",this.itemPadding=0,this.label=new AutoSizedLabel,this.tooltip=new SeriesTooltip7}};__decorateClass([Validate62(STRING29,{optional:!0})],HeatmapSeriesProperties.prototype,"title",2),__decorateClass([Validate62(STRING29)],HeatmapSeriesProperties.prototype,"xKey",2),__decorateClass([Validate62(STRING29)],HeatmapSeriesProperties.prototype,"yKey",2),__decorateClass([Validate62(STRING29,{optional:!0})],HeatmapSeriesProperties.prototype,"colorKey",2),__decorateClass([Validate62(STRING29,{optional:!0})],HeatmapSeriesProperties.prototype,"xName",2),__decorateClass([Validate62(STRING29,{optional:!0})],HeatmapSeriesProperties.prototype,"yName",2),__decorateClass([Validate62(STRING29,{optional:!0})],HeatmapSeriesProperties.prototype,"colorName",2),__decorateClass([Validate62(AND5(COLOR_STRING_ARRAY5,ARRAY8.restrict({minLength:1})))],HeatmapSeriesProperties.prototype,"colorRange",2),__decorateClass([Validate62(COLOR_STRING14,{optional:!0})],HeatmapSeriesProperties.prototype,"stroke",2),__decorateClass([Validate62(RATIO18)],HeatmapSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([Validate62(POSITIVE_NUMBER22,{optional:!0})],HeatmapSeriesProperties.prototype,"strokeWidth",2),__decorateClass([Validate62(TEXT_ALIGN2)],HeatmapSeriesProperties.prototype,"textAlign",2),__decorateClass([Validate62(VERTICAL_ALIGN)],HeatmapSeriesProperties.prototype,"verticalAlign",2),__decorateClass([Validate62(POSITIVE_NUMBER22)],HeatmapSeriesProperties.prototype,"itemPadding",2),__decorateClass([Validate62(FUNCTION11,{optional:!0})],HeatmapSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate62(OBJECT29)],HeatmapSeriesProperties.prototype,"label",2),__decorateClass([Validate62(OBJECT29)],HeatmapSeriesProperties.prototype,"tooltip",2);var{SeriesNodePickMode:SeriesNodePickMode5,computeBarFocusBounds:computeBarFocusBounds4,getMissCount,valueProperty:valueProperty8,ChartAxisDirection:ChartAxisDirection22,DEFAULT_CARTESIAN_DIRECTION_KEYS,DEFAULT_CARTESIAN_DIRECTION_NAMES,createDatumId:createDatumId7,ColorScale,Rect:Rect5,PointerEvents:PointerEvents2,applyShapeStyle:applyShapeStyle3}=import_ag_charts_community179._ModuleSupport,HeatmapSeriesNodeEvent=class extends import_ag_charts_community179._ModuleSupport.CartesianSeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o),this.colorKey=o.properties.colorKey}},textAlignFactors={left:-.5,center:0,right:-.5},verticalAlignFactors={top:-.5,middle:0,bottom:-.5},HeatmapSeries=class extends import_ag_charts_community179._ModuleSupport.CartesianSeries{constructor(t){super({moduleCtx:t,directionKeys:DEFAULT_CARTESIAN_DIRECTION_KEYS,directionNames:DEFAULT_CARTESIAN_DIRECTION_NAMES,pickModes:[SeriesNodePickMode5.NEAREST_NODE,SeriesNodePickMode5.EXACT_SHAPE_MATCH],pathsPerSeries:[],hasMarkers:!1,hasHighlightedLabels:!0}),this.properties=new HeatmapSeriesProperties,this.NodeEvent=HeatmapSeriesNodeEvent,this.colorScale=new ColorScale}async processData(t){const e=this.axes[ChartAxisDirection22.X],i=this.axes[ChartAxisDirection22.Y];if(!e||!i||!this.properties.isValid()||!this.data?.length)return;const{xKey:o,yKey:s,colorRange:a,colorKey:n}=this.properties,r=this.axes[ChartAxisDirection22.X]?.scale,l=this.axes[ChartAxisDirection22.Y]?.scale,{xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:r,yScale:l}),d=this.colorScale.type,{dataModel:u,processedData:p}=await this.requestDataModel(t,this.data,{props:[valueProperty8(o,c,{id:"xValue"}),valueProperty8(s,h,{id:"yValue"}),...n?[valueProperty8(n,d,{id:"colorValue"})]:[]]});if(this.isColorScaleValid()){const g=u.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=p.domain.values[g],this.colorScale.range=a,this.colorScale.update()}}isColorScaleValid(){const{colorKey:t}=this.properties;if(!t)return!1;const{dataModel:e,processedData:i}=this;if(!e||!i)return!1;const o=e.resolveProcessedDataIndexById(this,"colorValue"),s=i.input.count,a=getMissCount(this,i.defs.values[o].missing);return!(s===0||s===a)}xCoordinateRange(t,e){const i=this.axes[ChartAxisDirection22.X].scale,o=e*(i.bandwidth??0)/2,s=i.convert(t)+o,a=e*(i.bandwidth??10);return[s,s+a]}yCoordinateRange(t,e){const i=this.axes[ChartAxisDirection22.Y].scale,o=e*(i.bandwidth??0)/2,s=i.convert(t[0])+o,a=e*(i.bandwidth??10);return[s,s+a]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;return!e||!i?[]:t===ChartAxisDirection22.X?e.getDomain(this,"xValue","value",i):e.getDomain(this,"yValue","value",i)}getSeriesRange(t,e){return[NaN,NaN]}createNodeData(){const{data:t,visible:e,axes:i,dataModel:o,processedData:s}=this,a=i[ChartAxisDirection22.X],n=i[ChartAxisDirection22.Y];if(!(t&&o&&s&&e&&a&&n))return;if(a.type!=="category"||n.type!=="category"){logger_exports.warnOnce(`Heatmap series expected axes to have "category" type, but received "${a.type}" and "${n.type}" instead.`);return}const{xKey:r,xName:l,yKey:c,yName:h,colorKey:d,colorName:u,textAlign:p,verticalAlign:g,itemPadding:y,label:f}=this.properties,m=o.resolveColumnById(this,"xValue",s),b=o.resolveColumnById(this,"yValue",s),x=d?o.resolveColumnById(this,"colorValue",s):void 0,S=a.scale,M=n.scale,A=(S.bandwidth??0)/2,v=(M.bandwidth??0)/2,k=[],D=[],C=S.bandwidth??10,_=M.bandwidth??10,I=(C-2*y)*textAlignFactors[p],T=(_-2*y)*verticalAlignFactors[g],O=()=>({width:C,height:_,meta:null});return(s.dataSources.get(this.id)??[]).forEach((E,B)=>{const z=m[B],P=b[B],L=S.convert(z)+A,R=M.convert(P)+v,V=x?.[B],F=V==null?void 0:this.getLabelText(f,{value:V,datum:E,colorKey:d,colorName:u,xKey:r,yKey:c,xName:l,yName:h}),G=formatLabels(F,this.properties.label,void 0,this.properties.label,{padding:y},O),W={x:L,y:R,size:0};if(k.push({series:this,itemId:c,datumIndex:B,yKey:c,xKey:r,xValue:z,yValue:P,colorValue:V,datum:E,point:W,width:C,height:_,midPoint:{x:L,y:R},missing:V==null}),G?.label!=null){const{text:H,fontSize:U,lineHeight:j,height:$}=G.label,{fontStyle:Z,fontFamily:X,fontWeight:K,color:q}=this.properties.label,Q=W.x+I*(C-2*y),Y=W.y+T*(_-2*y)-(G.height-$)*.5;D.push({series:this,itemId:c,datum:E,datumIndex:B,text:H,fontSize:U,lineHeight:j,fontStyle:Z,fontFamily:X,fontWeight:K,color:q,textAlign:p,verticalAlign:g,x:Q,y:Y})}}),{itemId:this.properties.yKey??this.id,nodeData:k,labelData:D,scales:this.calculateScaling(),visible:this.visible}}nodeFactory(){return new Rect5}update(t){return this.ctx.animationManager.skipCurrentBatch(),super.update(t)}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,o=e??[];return i.update(o)}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{fill:i?.fill,fillOpacity:i?.fillOpacity??1,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity}}getItemStyleOverrides(t,e,i,o,s){const{id:a,properties:n}=this,{xKey:r,yKey:l,colorRange:c,itemStyler:h}=n,d=this.isColorScaleValid()&&i!=null?this.colorScale.convert(i):c[0];let u=o.fill==null?{fill:d}:void 0;if(h!=null){u??(u={});const p=this.cachedDatumCallback(createDatumId7(t,s?"highlight":"node"),()=>h({seriesId:a,datum:e,xKey:r,yKey:l,highlighted:s,fill:d,...o}));Object.assign(u,p)}return u}updateDatumNodes(t){const{isHighlight:e}=t,i=this.axes[ChartAxisDirection22.X],[o,s]=i?.visibleRange??[],n=!(o!==0||s!==1),r=this.getItemBaseStyle(e);t.datumSelection.each((l,c)=>{const{datumIndex:h,colorValue:d,datum:u,point:p,width:g,height:y}=c,f=this.getItemStyleOverrides(String(h),u,d,r,e);l.crisp=n,l.x=Math.floor(p.x-g/2),l.y=Math.floor(p.y-y/2),l.width=Math.ceil(g),l.height=Math.ceil(y),applyShapeStyle3(l,r,f)})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t,{enabled:o}=this.properties.label,s=o?e:[];return i.update(s)}updateLabelNodes(t){t.labelSelection.each((e,i)=>{e.text=i.text,e.fontSize=i.fontSize,e.lineHeight=i.lineHeight,e.fontStyle=i.fontStyle,e.fontFamily=i.fontFamily,e.fontWeight=i.fontWeight,e.fill=i.color,e.textAlign=i.textAlign,e.textBaseline=i.verticalAlign,e.x=i.x,e.y=i.y,e.pointerEvents=PointerEvents2.None})}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,axes:s,properties:a,colorScale:n}=this,{xKey:r,xName:l,yKey:c,yName:h,colorKey:d,colorName:u,colorRange:p,title:g,legendItemName:y,tooltip:f}=a,m=s[ChartAxisDirection22.X],b=s[ChartAxisDirection22.Y];if(!i||!o||!m||!b)return;const{datumIndex:x}=t,S=o.dataSources.get(this.id)?.[x],M=i.resolveColumnById(this,"xValue",o)[x],A=i.resolveColumnById(this,"yValue",o)[x],v=d!=null&&this.isColorScaleValid()?i.resolveColumnById(this,"colorValue",o)[x]:void 0;if(M==null)return;const k=[];let D;v==null?D=p[0]:(D=n.convert(v),k.push({label:u,fallbackLabel:d,value:String(v)})),k.push({label:l,fallbackLabel:r,value:m.formatDatum(M)},{label:h,fallbackLabel:c,value:b.formatDatum(A)});const C=D!=null?{marker:{shape:"square",fill:D,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}}:void 0,_=this.getItemBaseStyle(!1);return Object.assign(_,this.getItemStyleOverrides(String(x),S,v,_,!1)),f.formatTooltip({title:g??y,symbol:C,data:k},{seriesId:e,datum:S,title:g,xKey:r,xName:l,yKey:c,yName:h,colorKey:d,colorName:u,..._})}getLegendData(t){return t!=="gradient"||!this.properties.isValid()||!this.isColorScaleValid()||!this.dataModel?[]:[{legendType:"gradient",enabled:this.visible,seriesId:this.id,colorName:this.properties.colorName,colorDomain:this.processedData.domain.values[this.dataModel.resolveProcessedDataIndexById(this,"colorValue")],colorRange:this.properties.colorRange}]}isLabelEnabled(){return this.properties.label.enabled&&!!this.properties.colorKey}getBandScalePadding(){return{inner:0,outer:0}}computeFocusBounds({datumIndex:t}){const e=this.contextNodeData?.nodeData[t];if(e===void 0)return;const{width:i,height:o,midPoint:s}=e,a={x:s.x-i/2,y:s.y-o/2,width:i,height:o};return computeBarFocusBounds4(this,a)}};HeatmapSeries.className="HeatmapSeries",HeatmapSeries.type="heatmap";var import_ag_charts_community180=require("ag-charts-community"),HEATMAP_SERIES_THEME={series:{label:{enabled:!1,color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},wrapping:"on-space",overflowStrategy:"ellipsis"},itemPadding:3},gradientLegend:{enabled:!0}},{ThemeSymbols:{DEFAULT_DIVERGING_SERIES_COLOR_RANGE,DEFAULT_BACKGROUND_COLOUR:DEFAULT_BACKGROUND_COLOUR2},ThemeConstants:{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE7,CARTESIAN_POSITION:CARTESIAN_POSITION4}}=import_ag_charts_community181._ModuleSupport,HeatmapModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"heatmap",moduleFactory:t=>new HeatmapSeries(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:CARTESIAN_AXIS_TYPE7.CATEGORY,position:CARTESIAN_POSITION4.LEFT},{type:CARTESIAN_AXIS_TYPE7.CATEGORY,position:CARTESIAN_POSITION4.BOTTOM}],themeTemplate:HEATMAP_SERIES_THEME,paletteFactory:({takeColors:t,colorsCount:e,userPalette:i,themeTemplateParameters:o})=>{const s=o.get(DEFAULT_DIVERGING_SERIES_COLOR_RANGE),a=o.get(DEFAULT_BACKGROUND_COLOUR2),n=(Array.isArray(a)?a[0]:a)??"white",{fills:r,strokes:l}=t(e);return{stroke:i==="inbuilt"?n:l[0],colorRange:i==="inbuilt"?s:[r[0],r[1]]}}},import_ag_charts_community184=require("ag-charts-community"),import_ag_charts_community183=require("ag-charts-community"),import_ag_charts_community182=require("ag-charts-community"),AGGREGATION_THRESHOLD3=1e3,MAX_POINTS=10;function aggregationContainsIndex(t,e,i,o,s,a){const n=t[a];if(n==null)return!1;const r=xRatioForDatumIndex(n,e,i),l=aggregationIndexForXRatio(r,s);return a===o[l+X_MIN]||a===o[l+X_MAX]||a===o[l+Y_MIN]||a===o[l+Y_MAX]}function aggregateLineData(t,e,i){if(t.lengthMAX_POINTS&&a>64;)({maxRange:a}=compactAggregationIndices(n,r,a,{inPlace:!0})),l=l.filter(aggregationContainsIndex.bind(null,t,o,s,n,a)),c.push({maxRange:a,indices:l});return c.reverse(),c}var{ChartAxisDirection:ChartAxisDirection23,ContinuousScale:ContinuousScale6,OrdinalTimeScale:OrdinalTimeScale4}=import_ag_charts_community183._ModuleSupport,LineSeries=class extends import_ag_charts_community183._ModuleSupport.LineSeries{aggregateData(t,e){const i=this.axes[ChartAxisDirection23.X];if(i==null||!(ContinuousScale6.is(i.scale)||OrdinalTimeScale4.is(i.scale)))return;const o=t.resolveColumnById(this,"xValue",e),s=t.resolveColumnById(this,"yValueRaw",e),a=t.getDomain(this,"xValue","value",e);return aggregateLineData(o,s,a)}},{LineSeriesModule}=import_ag_charts_community184._ModuleSupport,LineModule={...LineSeriesModule,type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"line",moduleFactory:t=>new LineSeries(t)},import_ag_charts_community193=require("ag-charts-community"),import_ag_charts_community185=require("ag-charts-community"),{ColorScale:ColorScale2}=import_ag_charts_community185._ModuleSupport;function defaultColorStops(t){if(t==null)return[];const e=new ColorScale2;e.domain=[0,1],e.range=t;const i=5;return Array.from({length:5},(o,s)=>e.convert(s/(i-1)))}var import_ag_charts_community192=require("ag-charts-community"),DatumUnion=class{*[Symbol.iterator](){const{node:t,datum:e}=this;t&&e&&(yield{node:t,datum:e})}nodes(){return this.node?[this.node]:[]}update(t,e,i,o){const s=t.nodes();if(s.length===0)this.node?.remove(),this.node=void 0;else{this.node===void 0&&(this.node=new i,this.node.fillOpacity=0,this.node.strokeOpacity=0,e.appendChild(this.node));const a=s[0],n=s.toReversed().find(r=>r.datum.datum.value>r.datum.datum.segmentStart)??s[s.length-1];this.node.datum=this.datum=a.datum,o(this.node,a,n)}}},fadeInFns={fromFn:()=>({opacity:0,phase:"initial"}),toFn:()=>({opacity:1})};function formatLabel(t,e){if(t==null)return"";if(e==null)return String(t);const[i,o]=e.scale.domain,s=i!==0?Math.ceil(Math.log10(Math.abs(i))):0,a=o!==0?Math.ceil(Math.log10(Math.abs(o))):0,n=Math.max(2-Math.max(s,a),0);return t.toFixed(n)}function getLabelText(t,e,i){if(e.text!=null)return e.text;const o=i??e.value,s=e?.formatter?.({seriesId:t.id,datum:void 0,value:o});if(s!=null)return String(s)}var import_ag_charts_community186=require("ag-charts-community");function lineMarker({path:t,x:e,y:i,size:o}){t.moveTo(e,i-o/2),t.lineTo(e,i+o/2)}var import_ag_charts_community187=require("ag-charts-community"),{clamp:clamp8}=import_ag_charts_community187._ModuleSupport;function pickGaugeNearestDatum(t,e){const i=iterate(t.datumUnion.nodes(),t.targetSelection.nodes());return t.pickNodeNearestDistantObject(e,i)}function pickGaugeFocus(t,e){const i=[{data:t.contextNodeData?.nodeData,selection:t.datumUnion},{data:t.contextNodeData?.targetData,selection:t.targetSelection}].filter(l=>l.data&&l.data.length>0),o=clamp8(0,e.otherIndex+e.otherIndexDelta,i.length-1);if(i.length===0)return;const{data:s,selection:a}=i[o];if(s==null||s.length===0)return;const n=clamp8(0,e.datumIndex,s.length-1),r=s[n];for(const l of a)if(l.datum===r)return{bounds:l.node,clipFocusBox:!0,datum:r,datumIndex:n,otherIndex:o}}var import_ag_charts_community188=require("ag-charts-community"),{MARKER_SHAPE,UNION:UNION13,OR:OR5}=import_ag_charts_community188._ModuleSupport,FILL_MODE=UNION13(["continuous","discrete"],"a fill mode"),TARGET_MARKER_SHAPE=OR5(MARKER_SHAPE,UNION13(["line"],"a marker shape")),CORNER_MODE=UNION13(["container","item"],"a corner mode");function parseUnknownGaugeNodeDatum(t){let e,i;return typeof t.value=="number"&&(e=t.value),typeof t.text=="string"&&(i=t.text),{value:e,text:i}}var import_ag_charts_community190=require("ag-charts-community"),import_ag_charts_community189=require("ag-charts-community"),{BaseProperties:BaseProperties24,Validate:Validate63,OBJECT:OBJECT30,BOOLEAN:BOOLEAN28,NUMBER:NUMBER15,NUMBER_ARRAY}=import_ag_charts_community189._ModuleSupport,GaugeSegmentationIntervalProperties=class extends BaseProperties24{getSegments(t,e){const{values:i,step:o,count:s}=this,a=Math.min(...t.domain),n=Math.max(...t.domain);let r;if(i!=null){const l=i.filter(c=>c>a&&cc-h);r=[a,...l,n]}else if(o!=null){const l=[];for(let c=a;ch/l*(n-a)+a)}else{const l=t.ticks({nice:!0,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.filter(c=>c>a&&ce&&(logger_exports.warnOnce("the configured segmentation results in more than 1 item per pixel, ignoring. Supply a segmentation configuration that results in larger segments or omit this configuration"),r=void 0),r??(r=[a,n]),r}};__decorateClass([Validate63(NUMBER_ARRAY,{optional:!0})],GaugeSegmentationIntervalProperties.prototype,"values",2),__decorateClass([Validate63(NUMBER15,{optional:!0})],GaugeSegmentationIntervalProperties.prototype,"step",2),__decorateClass([Validate63(NUMBER15,{optional:!0})],GaugeSegmentationIntervalProperties.prototype,"count",2);var GaugeSegmentationProperties=class extends BaseProperties24{constructor(){super(...arguments),this.enabled=!1,this.interval=new GaugeSegmentationIntervalProperties,this.spacing=0}};__decorateClass([Validate63(BOOLEAN28)],GaugeSegmentationProperties.prototype,"enabled",2),__decorateClass([Validate63(OBJECT30)],GaugeSegmentationProperties.prototype,"interval",2),__decorateClass([Validate63(NUMBER15)],GaugeSegmentationProperties.prototype,"spacing",2);var{BaseProperties:BaseProperties25,SeriesTooltip:SeriesTooltip8,SeriesProperties:SeriesProperties2,PropertiesArray:PropertiesArray6,Validate:Validate64,BOOLEAN:BOOLEAN29,COLOR_STRING:COLOR_STRING15,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY6,FUNCTION:FUNCTION12,LINE_DASH:LINE_DASH11,NUMBER:NUMBER16,OBJECT_ARRAY,OBJECT:OBJECT31,POSITIVE_NUMBER:POSITIVE_NUMBER23,RATIO:RATIO19,STRING:STRING30,UNION:UNION14,Label:Label6}=import_ag_charts_community190._ModuleSupport,TARGET_PLACEMENT=UNION14(["before","after","middle"],"a placement"),LABEL_PLACEMENT=UNION14(["inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end"],"an placement"),DIRECTION=UNION14(["horizontal","vertical"],"an orientation"),LinearGaugeDefaultTargetLabelProperties=class extends Label6{};__decorateClass([Validate64(NUMBER16,{optional:!0})],LinearGaugeDefaultTargetLabelProperties.prototype,"spacing",2);var LinearGaugeTargetProperties=class extends BaseProperties25{constructor(){super(...arguments),this.value=0,this.label=new LinearGaugeDefaultTargetLabelProperties}};__decorateClass([Validate64(STRING30,{optional:!0})],LinearGaugeTargetProperties.prototype,"text",2),__decorateClass([Validate64(NUMBER16)],LinearGaugeTargetProperties.prototype,"value",2),__decorateClass([Validate64(TARGET_MARKER_SHAPE,{optional:!0})],LinearGaugeTargetProperties.prototype,"shape",2),__decorateClass([Validate64(TARGET_PLACEMENT,{optional:!0})],LinearGaugeTargetProperties.prototype,"placement",2),__decorateClass([Validate64(NUMBER16,{optional:!0})],LinearGaugeTargetProperties.prototype,"spacing",2),__decorateClass([Validate64(POSITIVE_NUMBER23,{optional:!0})],LinearGaugeTargetProperties.prototype,"size",2),__decorateClass([Validate64(NUMBER16,{optional:!0})],LinearGaugeTargetProperties.prototype,"rotation",2),__decorateClass([Validate64(COLOR_STRING15,{optional:!0})],LinearGaugeTargetProperties.prototype,"fill",2),__decorateClass([Validate64(RATIO19,{optional:!0})],LinearGaugeTargetProperties.prototype,"fillOpacity",2),__decorateClass([Validate64(COLOR_STRING15,{optional:!0})],LinearGaugeTargetProperties.prototype,"stroke",2),__decorateClass([Validate64(POSITIVE_NUMBER23,{optional:!0})],LinearGaugeTargetProperties.prototype,"strokeWidth",2),__decorateClass([Validate64(RATIO19,{optional:!0})],LinearGaugeTargetProperties.prototype,"strokeOpacity",2),__decorateClass([Validate64(LINE_DASH11,{optional:!0})],LinearGaugeTargetProperties.prototype,"lineDash",2),__decorateClass([Validate64(POSITIVE_NUMBER23,{optional:!0})],LinearGaugeTargetProperties.prototype,"lineDashOffset",2),__decorateClass([Validate64(OBJECT31)],LinearGaugeTargetProperties.prototype,"label",2);var LinearGaugeBarProperties=class extends BaseProperties25{constructor(){super(...arguments),this.enabled=!0,this.thicknessRatio=1,this.fills=new PropertiesArray6(import_ag_charts_community190._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([Validate64(BOOLEAN29)],LinearGaugeBarProperties.prototype,"enabled",2),__decorateClass([Validate64(POSITIVE_NUMBER23,{optional:!0})],LinearGaugeBarProperties.prototype,"thickness",2),__decorateClass([Validate64(RATIO19)],LinearGaugeBarProperties.prototype,"thicknessRatio",2),__decorateClass([Validate64(OBJECT_ARRAY)],LinearGaugeBarProperties.prototype,"fills",2),__decorateClass([Validate64(FILL_MODE)],LinearGaugeBarProperties.prototype,"fillMode",2),__decorateClass([Validate64(COLOR_STRING15,{optional:!0})],LinearGaugeBarProperties.prototype,"fill",2),__decorateClass([Validate64(RATIO19)],LinearGaugeBarProperties.prototype,"fillOpacity",2),__decorateClass([Validate64(COLOR_STRING15)],LinearGaugeBarProperties.prototype,"stroke",2),__decorateClass([Validate64(POSITIVE_NUMBER23)],LinearGaugeBarProperties.prototype,"strokeWidth",2),__decorateClass([Validate64(RATIO19)],LinearGaugeBarProperties.prototype,"strokeOpacity",2),__decorateClass([Validate64(LINE_DASH11)],LinearGaugeBarProperties.prototype,"lineDash",2),__decorateClass([Validate64(POSITIVE_NUMBER23)],LinearGaugeBarProperties.prototype,"lineDashOffset",2);var LinearGaugeScaleProperties=class extends BaseProperties25{constructor(){super(...arguments),this.fills=new PropertiesArray6(import_ag_charts_community190._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.defaultFill="black"}};__decorateClass([Validate64(OBJECT_ARRAY)],LinearGaugeScaleProperties.prototype,"fills",2),__decorateClass([Validate64(FILL_MODE)],LinearGaugeScaleProperties.prototype,"fillMode",2),__decorateClass([Validate64(COLOR_STRING15,{optional:!0})],LinearGaugeScaleProperties.prototype,"fill",2),__decorateClass([Validate64(RATIO19)],LinearGaugeScaleProperties.prototype,"fillOpacity",2),__decorateClass([Validate64(COLOR_STRING15)],LinearGaugeScaleProperties.prototype,"stroke",2),__decorateClass([Validate64(POSITIVE_NUMBER23)],LinearGaugeScaleProperties.prototype,"strokeWidth",2),__decorateClass([Validate64(RATIO19)],LinearGaugeScaleProperties.prototype,"strokeOpacity",2),__decorateClass([Validate64(LINE_DASH11)],LinearGaugeScaleProperties.prototype,"lineDash",2),__decorateClass([Validate64(POSITIVE_NUMBER23)],LinearGaugeScaleProperties.prototype,"lineDashOffset",2),__decorateClass([Validate64(COLOR_STRING15)],LinearGaugeScaleProperties.prototype,"defaultFill",2);var LinearGaugeLabelProperties=class extends AutoSizedLabel{constructor(){super(...arguments),this.placement="inside-center",this.avoidCollisions=!0}};__decorateClass([Validate64(STRING30,{optional:!0})],LinearGaugeLabelProperties.prototype,"text",2),__decorateClass([Validate64(LABEL_PLACEMENT)],LinearGaugeLabelProperties.prototype,"placement",2),__decorateClass([Validate64(BOOLEAN29)],LinearGaugeLabelProperties.prototype,"avoidCollisions",2);var LinearGaugeSeriesProperties=class extends SeriesProperties2{constructor(){super(...arguments),this.value=0,this.segmentation=new GaugeSegmentationProperties,this.defaultColorRange=[],this.targets=new PropertiesArray6(LinearGaugeTargetProperties),this.defaultTarget=new LinearGaugeTargetProperties,this.direction="vertical",this.thickness=1,this.cornerRadius=0,this.cornerMode="container",this.margin=0,this.scale=new LinearGaugeScaleProperties,this.bar=new LinearGaugeBarProperties,this.label=new LinearGaugeLabelProperties,this.tooltip=new SeriesTooltip8}};__decorateClass([Validate64(NUMBER16)],LinearGaugeSeriesProperties.prototype,"value",2),__decorateClass([Validate64(OBJECT31)],LinearGaugeSeriesProperties.prototype,"segmentation",2),__decorateClass([Validate64(COLOR_STRING_ARRAY6)],LinearGaugeSeriesProperties.prototype,"defaultColorRange",2),__decorateClass([Validate64(OBJECT_ARRAY)],LinearGaugeSeriesProperties.prototype,"targets",2),__decorateClass([Validate64(OBJECT31)],LinearGaugeSeriesProperties.prototype,"defaultTarget",2),__decorateClass([Validate64(DIRECTION)],LinearGaugeSeriesProperties.prototype,"direction",2),__decorateClass([Validate64(POSITIVE_NUMBER23)],LinearGaugeSeriesProperties.prototype,"thickness",2),__decorateClass([Validate64(POSITIVE_NUMBER23)],LinearGaugeSeriesProperties.prototype,"cornerRadius",2),__decorateClass([Validate64(CORNER_MODE)],LinearGaugeSeriesProperties.prototype,"cornerMode",2),__decorateClass([Validate64(NUMBER16)],LinearGaugeSeriesProperties.prototype,"margin",2),__decorateClass([Validate64(OBJECT31)],LinearGaugeSeriesProperties.prototype,"scale",2),__decorateClass([Validate64(OBJECT31)],LinearGaugeSeriesProperties.prototype,"bar",2),__decorateClass([Validate64(FUNCTION12,{optional:!0})],LinearGaugeSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate64(OBJECT31)],LinearGaugeSeriesProperties.prototype,"label",2),__decorateClass([Validate64(OBJECT31)],LinearGaugeSeriesProperties.prototype,"tooltip",2);var import_ag_charts_community191=require("ag-charts-community"),{CachedTextMeasurerPool:CachedTextMeasurerPool5,BBox:BBox13}=import_ag_charts_community191._ModuleSupport;function datumRect(t){const{x0:e,y0:i,x1:o,y1:s,horizontalInset:a,verticalInset:n}=t,r=Math.min(e,o)+a,l=Math.min(i,s)+n,c=Math.max(Math.abs(o-e)-2*a,0),h=Math.max(Math.abs(s-i)-2*n,0);return{x:r,y:l,width:c,height:h}}function clipBBoxVisibility(t,e){if(e==null)return!0;const i=datumRect(t),o=1e-6,s=i.x+o,a=i.y+o,n=i.x+i.width-o,r=i.y+i.height-o,l=e.x,c=e.x+e.width,h=e.y,d=e.y+e.height;return Math.max(s,l)<=Math.min(n,c)&&Math.max(a,h)<=Math.min(r,d)}function hasClipBBox(t){const{clipX0:e,clipX1:i,clipY0:o,clipY1:s}=t;return e!=null&&i!=null||o!=null&&s!=null}function computeClipBBox(t){if(!hasClipBBox(t))return;const{x0:e,y0:i,x1:o,y1:s}=t,{x:a,y:n,width:r,height:l}=datumRect(t);let{clipX0:c,clipX1:h,clipY0:d,clipY1:u}=t;(c==null||h==null)&&(c=e,h=o),(d==null||u==null)&&(d=i,u=s);const p=Math.min(c,h),g=Math.min(d,u),y=Math.abs(h-c),f=Math.abs(u-d);return c=Math.max(a,p),d=Math.max(n,g),h=Math.min(a+r,p+y),u=Math.min(n+l,g+f),new BBox13(Math.min(c,h),Math.min(d,u),Math.abs(h-c),Math.abs(u-d))}function prepareLinearGaugeSeriesAnimationFunctions(t,e){const i=t?"initial":"update";return{node:{fromFn(s,a){const n=s.previousDatum;let{x0:r,y0:l,x1:c,y1:h,clipX0:d,clipY0:u,clipX1:p,clipY1:g}=n??a;const{horizontalInset:y,verticalInset:f}=a,m=n!=null&&hasClipBBox(n),b=hasClipBBox(a);return m&&b||(!m&&b?({x0:r,y0:l,x1:c,y1:h,clipX0:d,clipY0:u,clipX1:p,clipY1:g}=a,t&&(e?p=a.clipX0:g=a.clipY0)):m&&!b?({x0:r,y0:l,x1:c,y1:h}=a,d=void 0,u=void 0,p=void 0,g=void 0):t&&(e?c=r:h=l)),{x0:r,y0:l,x1:c,y1:h,clipX0:d,clipY0:u,clipX1:p,clipY1:g,horizontalInset:y,verticalInset:f,phase:i}},toFn(s,a){const{x0:n,y0:r,x1:l,y1:c,clipX0:h,clipY0:d,clipX1:u,clipY1:p,horizontalInset:g,verticalInset:y}=a;return{x0:n,y0:r,x1:l,y1:c,clipX0:h,clipY0:d,clipX1:u,clipY1:p,horizontalInset:g,verticalInset:y}},applyFn(s,a){s.setProperties(resetLinearGaugeSeriesResetRectFunction(s,a))}}}}function resetLinearGaugeSeriesResetRectFunction(t,e){const{x:i,y:o,width:s,height:a}=datumRect(e),n=computeClipBBox(e),r=clipBBoxVisibility(e,n);return{x:i,y:o,width:s,height:a,clipBBox:n,visible:r}}var horizontalTextAligns={Before:"right",Center:"center",After:"left"},verticalTextBaselines={Before:"top",Center:"middle",After:"bottom"},horizontalAlignFactors={Before:-1,Center:-.5,After:0},verticalAlignFactors2={Before:0,Center:-.5,After:-1};function formatLinearGaugeLabels(t,e,i,o,s){const{scale:a,bar:n}=o,{padding:r,horizontal:l}=i;e.each((c,h)=>{const d=getLabelText(t,h,s?.label),u=()=>({width:a.width,height:a.height,meta:null});let p;const g=h.avoidCollisions&&h.placement!=="outside-start"&&h.placement!=="outside-end";if(d==null)return;if(g)p=formatSingleLabel(d,h,{padding:r},u)?.[0];else{const T={fontSize:h.fontSize,fontStyle:h.fontStyle,fontWeight:h.fontWeight,fontFamily:h.fontFamily,lineHeight:h.lineHeight},{width:O,height:w}=CachedTextMeasurerPool5.measureText(d,{font:T});p={text:d,fontSize:h.fontSize,lineHeight:getLineHeight(h,h.fontSize),width:O,height:w}}if(p==null){c.visible=!1;return}const y=l?a.x:a.y+a.height,f=l?a.x+a.width:a.y,m=l?n.x:n.y+n.height,b=l?n.x+n.width:n.y,x=h.spacing*(l?1:-1);let S,M,A,v;switch(h.placement){case"outside-start":S=-1/0,M=1/0,A=y-x,v="Before";break;case"outside-end":S=-1/0,M=1/0,A=f+x,v="After";break;case"inside-start":S=y,M=b,A=y+x,v="After";break;case"inside-end":S=b,M=f,A=f-x,v="Before";break;case"inside-center":S=y,M=f,A=(y+f)/2,v="Center";break;case"bar-inside":S=m,M=b,A=(m+b)/2,v="Center";break;case"bar-inside-end":S=m,M=b,A=b-x,v="Before";break;case"bar-outside-end":S=b,M=f,A=b+x,v="After";break;case"bar-end":S=-1/0,M=1/0,A=b,v="Center";break}const k=l?A:a.x+a.width/2,D=l?a.y+a.height/2:A;let C,_;l?(C=k+horizontalAlignFactors[v]*p.width,_=C+p.width):(C=D+verticalAlignFactors2[v]*p.height,_=C+p.height);const I=Math.min(C,_)>=Math.min(S,M)&&Math.max(C,_)<=Math.max(S,M);if(h.avoidCollisions&&!I){c.visible=!1;return}c.visible=!0,c.text=p.text,c.fontSize=p.fontSize,c.lineHeight=p.lineHeight,c.textAlign=l?horizontalTextAligns[v]:"center",c.textBaseline=l?"middle":verticalTextBaselines[v],c.x=k,c.y=D})}var{fromToMotion,resetMotion:resetMotion2,SeriesNodePickMode:SeriesNodePickMode6,StateMachine:StateMachine12,createDatumId:createDatumId8,ChartAxisDirection:ChartAxisDirection24,CachedTextMeasurerPool:CachedTextMeasurerPool6,toRadians:toRadians5,BBox:BBox14,Group:Group11,PointerEvents:PointerEvents3,Selection:Selection6,Rect:Rect6,Text:Text2,LinearGradient:LinearGradient2,Marker:Marker2,easing,getColorStops}=import_ag_charts_community192._ModuleSupport,horizontalTargetPlacementRotation={before:180,middle:0,after:0},verticalTargetPlacementRotation={before:90,middle:0,after:-90},LinearGaugeSeries=class extends import_ag_charts_community192._ModuleSupport.Series{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[SeriesNodePickMode6.EXACT_SHAPE_MATCH,SeriesNodePickMode6.NEAREST_NODE]}),this.canHaveAxes=!0,this.properties=new LinearGaugeSeriesProperties,this.originX=0,this.originY=0,this.scaleGroup=this.contentGroup.appendChild(new Group11({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new Group11({name:"itemGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new Group11({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new Group11({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Group11({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new Group11({name:"itemTargetLabelGroup"})),this.scaleSelection=Selection6.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=Selection6.select(this.itemGroup,()=>this.nodeFactory()),this.targetSelection=Selection6.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=Selection6.select(this.itemTargetLabelGroup,Text2),this.labelSelection=Selection6.select(this.itemLabelGroup,Text2),this.highlightTargetSelection=Selection6.select(this.highlightTargetGroup,()=>this.markerFactory()),this.datumUnion=new DatumUnion,this.animationState=new StateMachine12("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.animateReadyResize(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateWaitingUpdateReady()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty"},reset:"empty",skip:"ready"}}),this.scaleGroup.pointerEvents=PointerEvents3.None}get horizontal(){return this.properties.direction==="horizontal"}get thickness(){return this.properties.thickness}computeInset(t,e){const{label:i}=this.properties;let o;switch(i.placement){case"outside-start":o=1;break;case"outside-end":o=-1;break;default:return 0}const s=i.text?.split(` `);let a;if(t===ChartAxisDirection24.Y)a=getLineHeight(i,i.fontSize)*(s?.length??1);else{const n=i.getFont();a=(s??e.map(l=>getLabelText(this,this.labelDatum(i,l))??"")).reduce((l,c)=>{const{width:h}=CachedTextMeasurerPool6.measureText(c,{font:n});return Math.max(l,h)},0)}return o*(i.spacing+a)}get hasData(){return!0}nodeFactory(){const t=new Rect6;return t.crisp=!0,t}markerFactory(){return new Marker2}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(t){const{axes:e,horizontal:i}=this,o=i?e[ChartAxisDirection24.X]:e[ChartAxisDirection24.Y];return formatLabel(t,o)}createLinearGradient(t,e){const{properties:i,originX:o,originY:s,horizontal:a,axes:n}=this,{thickness:r,defaultColorRange:l}=i,c=a?n[ChartAxisDirection24.X]:n[ChartAxisDirection24.Y],{domain:h,range:d}=c.scale,u=d[1]-d[0],p=getColorStops(t,l,h,e);return new LinearGradient2("oklch",p,a?90:0,new BBox14(o,s,a?u:r,a?r:u))}getTargets(){const{properties:t}=this,e=t.defaultTarget;return Array.from(t.targets).map(i=>{const{text:o=e.text,value:s=e.value??0,shape:a=e.shape??"triangle",rotation:n=e.rotation??0,strokeWidth:r=e.strokeWidth??0,placement:l=e.placement??"middle",spacing:c=e.spacing??0,size:h=e.size??0,fill:d=e.fill??"black",fillOpacity:u=e.fillOpacity??1,stroke:p=e.stroke??"black",strokeOpacity:g=e.strokeOpacity??1,lineDash:y=e.lineDash??[0],lineDashOffset:f=e.lineDashOffset??0}=i,{enabled:m=e.label.enabled,color:b=e.label.color??"black",fontStyle:x=e.label.fontStyle??"normal",fontWeight:S=e.label.fontWeight??"normal",fontSize:M=e.label.fontSize,fontFamily:A=e.label.fontFamily,spacing:v=e.label.spacing??0}=i.label;return{text:o,value:s,shape:a,placement:l,spacing:c,size:h,rotation:n,fill:d,fillOpacity:u,stroke:p,strokeWidth:r,strokeOpacity:g,lineDash:y,lineDashOffset:f,label:{enabled:m,color:b,fontStyle:x,fontWeight:S,fontSize:M,fontFamily:A,spacing:v}}})}getTargetPoint(t){const e=this.axes[ChartAxisDirection24.X],i=this.axes[ChartAxisDirection24.Y];if(e==null||i==null)return{x:0,y:0};const{properties:o,originX:s,originY:a,horizontal:n}=this,{thickness:r}=o,{value:l,placement:c,spacing:h,size:d}=t,u=n?e:i,p=u.scale.convert(l)-u.scale.range[0];let g;switch(c){case"before":g=-(h+d/2);break;case"after":g=r+h+d/2;break;default:g=r/2;break}return{x:s+e.range[0]+(n?p:g),y:a+i.range[0]+(n?g:p)}}getTargetLabel(t){const{size:e,placement:i,label:o}=t,{spacing:s,color:a,fontStyle:n,fontWeight:r,fontSize:l,fontFamily:c}=o,h=void 0,d=e/2+s;let u,p,g=0,y=0;return this.horizontal?(u="center",i==="after"?(p="top",y=d):(p="bottom",y=-d)):(p="middle",i==="before"?(u="right",g=-d):(u="left",g=d)),{offsetX:g,offsetY:y,fill:a,textAlign:u,textBaseline:p,fontStyle:n,fontWeight:r,fontSize:l,fontFamily:c,lineHeight:h}}labelDatum(t,e){const{placement:i,avoidCollisions:o,spacing:s,text:a,color:n,fontSize:r,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:d,lineHeight:u,wrapping:p,overflowStrategy:g,formatter:y=f=>this.formatLabel(f.value)}=t;return{placement:i,avoidCollisions:o,spacing:s,text:a,value:e,fill:n,fontSize:r,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:d,lineHeight:u,wrapping:p,overflowStrategy:g,formatter:y}}createNodeData(){const{id:t,properties:e,originX:i,originY:o,horizontal:s}=this;if(!e.isValid())return;const{value:a,segmentation:n,thickness:r,cornerRadius:l,cornerMode:c,bar:h,scale:d,label:u}=e,p=this.getTargets(),g=this.axes[ChartAxisDirection24.X],y=this.axes[ChartAxisDirection24.Y];if(g==null||y==null)return;const f=s?g:y,m=g.scale,b=y.scale,x=f.scale;let{domain:S}=f.scale;f.isReversed()&&(S=S.slice().reverse());const M=[],A=[],v=[],k=[],[D,C]=x.range,_=Math.abs(C-D);let[I,T]=g.range;g.isReversed()&&([T,I]=[I,T]);let[O,w]=y.range;y.isReversed()&&([w,O]=[O,w]);const E=s?m.convert(a):T,B=s?w:b.convert(a),z=n.enabled?n.spacing/2:0,P=s?z:0,L=s?0:z,R=Math.min(h.thickness??Math.round(h.thicknessRatio*r),r),V=-(r-R)/2,F=s?0:V,G=s?V:0,W=c==="item",H=Math.ceil(_);let U=n.enabled?n.interval.getSegments(x,H):void 0;const j=h.fill??this.createLinearGradient(h.fills,h.fillMode),$=d.fill??(h.enabled&&d.fills.length===0?d.defaultFill:void 0)??this.createLinearGradient(d.fills,d.fillMode);if(U==null&&W){const X=Math.min(...S),K=Math.max(...S),q={value:a,segmentStart:X,segmentEnd:K};if(h.enabled){const tt=Math.min(l,R/2,_/2)*(f.isReversed()?-1:1),et=s?tt:0,it=s?0:tt;M.push({series:this,itemId:"value",datum:q,datumIndex:{type:0},type:0,x0:i+I-et-F,y0:o+O-it-G,x1:i+E+et+F,y1:o+B+it+G,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,fill:j,horizontalInset:P,verticalInset:L})}const Y=Math.min(l,r/2,_/2)*(f.isReversed()?-1:1),st=s?Y:0,ot=s?0:Y;k.push({series:this,itemId:"scale",datum:q,datumIndex:{type:0},type:0,x0:i+I-st,y0:o+O-ot,x1:i+T+st,y1:o+w+ot,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,fill:$,horizontalInset:P,verticalInset:L})}else{U??(U=S);const X=i+I-F,K=o+O-G,q=i+E+F,Q=o+B+G;for(let Y=0;YcreateDatumId8(t.nodeData.length,e.itemId))}updateDatumNodes(t){const{datumSelection:e}=t,{ctx:i,properties:o}=this,{bar:s}=o,{fillOpacity:a,stroke:n,strokeOpacity:r,lineDash:l,lineDashOffset:c}=s,h=this.getStrokeWidth(s.strokeWidth),d=i.animationManager.isSkipped();e.each((u,p)=>{const{topLeftCornerRadius:g,topRightCornerRadius:y,bottomRightCornerRadius:f,bottomLeftCornerRadius:m,fill:b}=p;u.fill=b,u.fillOpacity=a,u.stroke=n,u.strokeOpacity=r,u.strokeWidth=h,u.lineDash=l,u.lineDashOffset=c,u.topLeftCornerRadius=g,u.topRightCornerRadius=y,u.bottomRightCornerRadius=f,u.bottomLeftCornerRadius=m,u.pointerEvents=this.properties.bar.enabled?import_ag_charts_community192._ModuleSupport.PointerEvents.All:import_ag_charts_community192._ModuleSupport.PointerEvents.None,(d||u.previousDatum==null)&&u.setProperties(resetLinearGaugeSeriesResetRectFunction(u,p))}),this.datumUnion.update(e,this.itemGroup,import_ag_charts_community192._ModuleSupport.Rect,(u,p,g)=>{u.pointerEvents=import_ag_charts_community192._ModuleSupport.PointerEvents.None,u.clipBBox??(u.clipBBox=new BBox14(NaN,NaN,NaN,NaN)),u.x=p.x,u.y=p.y,u.clipBBox.x=p.clipBBox?.x??p.x,u.clipBBox.y=p.clipBBox?.y??p.y,this.properties.direction==="horizontal"?(u.height=u.clipBBox.height=g.height,u.width=g===p?g.width:g.x+g.width,u.clipBBox.width=u.width-(g.width-(g.clipBBox?.width??g.width)),u.topLeftCornerRadius=p.topLeftCornerRadius,u.bottomLeftCornerRadius=p.bottomLeftCornerRadius,u.topRightCornerRadius=g.topRightCornerRadius,u.bottomRightCornerRadius=g.bottomRightCornerRadius):(u.width=u.clipBBox.width=g.width,u.height=g===p?g.height:g.x+g.height,u.clipBBox.height=u.height-(g.height-(g.clipBBox?.height??g.height)),u.topLeftCornerRadius=p.topLeftCornerRadius,u.topRightCornerRadius=p.topRightCornerRadius,u.bottomLeftCornerRadius=g.bottomLeftCornerRadius,u.bottomRightCornerRadius=g.bottomRightCornerRadius)})}updateScaleSelection(t){return t.scaleSelection.update(t.scaleData,void 0,e=>createDatumId8(t.scaleData.length,e.itemId))}updateScaleNodes(t){const{scaleSelection:e}=t,{scale:i}=this.properties,{fillOpacity:o,stroke:s,strokeOpacity:a,strokeWidth:n,lineDash:r,lineDashOffset:l}=i;e.each((c,h)=>{const{topLeftCornerRadius:d,topRightCornerRadius:u,bottomRightCornerRadius:p,bottomLeftCornerRadius:g,fill:y}=h;c.fill=y,c.fillOpacity=o,c.stroke=s,c.strokeOpacity=a,c.strokeWidth=n,c.lineDash=r,c.lineDashOffset=l,c.topLeftCornerRadius=d,c.topRightCornerRadius=u,c.bottomRightCornerRadius=p,c.bottomLeftCornerRadius=g,c.setProperties(resetLinearGaugeSeriesResetRectFunction(c,h))})}updateTargetSelection(t){return t.targetSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetNodes(t){const{targetSelection:e,isHighlight:i}=t,o=i?this.properties.highlightStyle.item:void 0;e.each((s,a)=>{const{x:n,y:r,shape:l,size:c,rotation:h,fill:d,fillOpacity:u,stroke:p,strokeOpacity:g,strokeWidth:y,lineDash:f,lineDashOffset:m}=a;s.size=c,s.shape=l==="line"?lineMarker:l,s.fill=o?.fill??d,s.fillOpacity=o?.fillOpacity??u,s.stroke=o?.stroke??p,s.strokeOpacity=o?.strokeOpacity??g,s.strokeWidth=o?.strokeWidth??y,s.lineDash=o?.lineDash??f,s.lineDashOffset=o?.lineDashOffset??m,s.translationX=n,s.translationY=r,s.rotation=h})}updateTargetLabelSelection(t){return t.targetLabelSelection.update(t.targetData)}updateTargetLabelNodes(t){const{targetLabelSelection:e}=t;e.each((i,o)=>{const{x:s,y:a,text:n}=o,{offsetX:r,offsetY:l,fill:c,fontStyle:h,fontWeight:d,fontSize:u,fontFamily:p,textAlign:g,textBaseline:y}=o.label;i.visible=!0,i.x=s+r,i.y=a+l,i.text=n,i.fill=c,i.fontStyle=h,i.fontWeight=d,i.fontSize=u,i.fontFamily=p,i.textAlign=g,i.textBaseline=y})}updateLabelSelection(t){return t.labelSelection.update(t.labelData,void 0,e=>"primary")}updateLabelNodes(t){const{labelSelection:e}=t,i=this.ctx.animationManager.isSkipped();e.each((o,s)=>{o.fill=s.fill,o.fontStyle=s.fontStyle,o.fontWeight=s.fontWeight,o.fontFamily=s.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}labelsHaveExplicitText(){for(const{datum:t}of this.labelSelection)if(t.text==null)return!1;return!0}formatLabelText(t){const{labelSelection:e,horizontal:i,axes:o}=this,s=o[ChartAxisDirection24.X],a=o[ChartAxisDirection24.Y];if(s==null||a==null)return;const[n,r]=s.range,[l,c]=a.range,h=this.originX+Math.min(n,r),d=this.originY+Math.min(l,c),u=Math.abs(r-n),p=Math.abs(c-l),g=t?.label??this.properties.value;let y;if(i){const b=s.scale.convert(g);y=new BBox14(h,d,b-h,p)}else{const b=a.scale.convert(g);y=new BBox14(h,b,u,p-b)}const f={scale:new BBox14(h,d,u,p),bar:y},{margin:m}=this.properties;formatLinearGaugeLabels(this,e,{padding:m,horizontal:i},f,t)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),resetMotion2([this.datumSelection],resetLinearGaugeSeriesResetRectFunction),this.formatLabelText()}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}animateLabelText(t={}){const{animationManager:e}=this.ctx;let i=0,o=0;if(this.labelSelection.each((s,a)=>{s.opacity=1,i=s.previousDatum?.value??t.from??a.value,o=a.value}),!this.labelsHaveExplicitText())if(i===o)this.formatLabelText({label:o});else{const s=`${this.id}_labels`;e.animate({id:s,groupId:"label",from:{label:i},to:{label:o},phase:t.phase??"update",ease:easing.easeOut,onUpdate:a=>this.formatLabelText(a)})}}animateEmptyUpdateReady(){const{animationManager:t}=this.ctx,{node:e}=prepareLinearGaugeSeriesAnimationFunctions(!0,this.horizontal);fromToMotion(this.id,"node",t,[this.datumSelection],e,(i,o)=>o.itemId),fromToMotion(this.id,"label",t,[this.labelSelection],fadeInFns,()=>"primary"),this.animateLabelText({from:0,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:t}=this.ctx,{node:e}=prepareLinearGaugeSeriesAnimationFunctions(!1,this.horizontal);fromToMotion(this.id,"node",t,[this.datumSelection],e,(i,o)=>o.itemId),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}getSeriesDomain(){return[0,1]}getSeriesRange(t,e){return[NaN,NaN]}getLegendData(){return[]}getTooltipContent(t){const{id:e,properties:i}=this,{tooltip:o}=i;if(!i.isValid())return;const{value:s=i.value,text:a=i.label.text}=parseUnknownGaugeNodeDatum(t);return o.formatTooltip({data:[{label:a,fallbackLabel:"Value",value:this.formatLabel(s)}]},{seriesId:e,title:void 0,datum:void 0,value:s})}pickNodeClosestDatum(t){return pickGaugeNearestDatum(this,t)}pickFocus(t){return pickGaugeFocus(this,t)}getCaptionText(){return this.formatLabel(this.properties.value)}};LinearGaugeSeries.className="LinearGaugeSeries",LinearGaugeSeries.type="linear-gauge";var{ThemeSymbols:{DEFAULT_HIERARCHY_FILLS,DEFAULT_GAUGE_SERIES_COLOR_RANGE},ThemeConstants:{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE8}}=import_ag_charts_community193._ModuleSupport,LinearGaugeModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["gauge"],identifier:"linear-gauge",moduleFactory:t=>new LinearGaugeSeries(t),tooltipDefaults:{range:10},defaultAxes:[{type:CARTESIAN_AXIS_TYPE8.NUMBER,line:{enabled:!1}},{type:CARTESIAN_AXIS_TYPE8.NUMBER,line:{enabled:!1}}],themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{thickness:50,bar:{strokeWidth:0},segmentation:{enabled:!1,interval:{},spacing:1},defaultTarget:{fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},size:10,shape:"triangle",placement:"after",spacing:5,label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:5}},label:{enabled:!1,placement:"inside-start",fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[2]},minimumFontSize:12,spacing:18,color:{$ref:"backgroundColor"}},margin:4},axes:{[CARTESIAN_AXIS_TYPE8.NUMBER]:{line:{enabled:!1},gridLine:{enabled:!1}}}},paletteFactory(t){const{takeColors:e,colorsCount:i,userPalette:o,themeTemplateParameters:s}=t,{fills:a}=e(i),n=s.get(DEFAULT_GAUGE_SERIES_COLOR_RANGE),r=s.get(DEFAULT_HIERARCHY_FILLS),l=o==="inbuilt"?n:[a[0],a[1]];return{scale:{defaultFill:r?.[1],stroke:r?.[2]},defaultColorRange:defaultColorStops(l)}}},import_ag_charts_community200=require("ag-charts-community"),MAP_THEME_DEFAULTS={zoom:{axes:"xy",anchorPointX:"pointer",anchorPointY:"pointer",buttons:{anchorPointX:"middle",anchorPointY:"middle"}},legend:{enabled:!1},gradientLegend:{enabled:!1},tooltip:{range:"exact"}},import_ag_charts_community199=require("ag-charts-community"),import_ag_charts_community195=require("ag-charts-community"),delta2=1e-9;function lineSegmentDistanceToPointSquared(t,e,i,o){const[s,a]=t,[n,r]=e,l=n-s,c=r-a,h=l*l+c*c;let d,u;if(Math.abs(h)e){const h=(e-s)/l,d=[i+(n-i)*h,o+(r-o)*h],u=Math.atan2(r-o,n-i);return{point:d,angle:u}}s=c,i=n,o=r}}var import_ag_charts_community194=require("ag-charts-community"),{LonLatBBox}=import_ag_charts_community194._ModuleSupport;function extendBbox(t,e,i,o,s){return t==null?t=new LonLatBBox(e,i,o,s):(t.lon0=Math.min(t.lon0,e),t.lat0=Math.min(t.lat0,i),t.lon1=Math.max(t.lon1,o),t.lat1=Math.max(t.lat1,s)),t}function polygonBbox(t,e){return t.forEach(i=>{const[o,s]=i;e=extendBbox(e,o,s,o,s)}),e}function polygonCentroid(t){if(t.length===0)return;let e=0,i=0,o=0,[s,a]=t[t.length-1];for(const[n,r]of t){const l=s*r-n*a;o+=l,e+=(s+n)*l,i+=(a+r)*l,s=n,a=r}return o*=3,[e/o,i/o]}function polygonDistance(t,e,i){let o=!1,s=1/0;for(const a of t){let n=a[a.length-1],[r,l]=n;for(const c of a){const[h,d]=c;d>i!=l>i&&e<(r-h)*(i-d)/(l-d)+h&&(o=!o),s=Math.min(s,lineSegmentDistanceToPointSquared(n,c,e,i)),n=c,r=h,l=d}}return(o?-1:1)*Math.sqrt(s)}var{Path:Path10,ExtendedPath2D:ExtendedPath2D4,BBox:BBox15,ScenePathChangeDetection:ScenePathChangeDetection8}=import_ag_charts_community195._ModuleSupport,GeoGeometry=class extends Path10{constructor(){super(...arguments),this.projectedGeometry=void 0,this.renderMode=3,this.strokePath=new ExtendedPath2D4}computeBBox(){return(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.bbox?.clone()}updatePath(){const{projectedGeometry:t}=this;this.strokePath.clear(),this.path.clear(),this.bbox=t!=null?this.drawGeometry(t,void 0):void 0}drawPath(t){super.drawPath(t),this.renderStroke(t,this.strokePath.getPath2D())}containsPoint(t,e){const{projectedGeometry:i}=this;return i==null||!this.getBBox().containsPoint(t,e)?!1:this.geometryDistance(i,t,e)<=0}distanceSquared(t,e){const{projectedGeometry:i}=this;if(i==null)return 1/0;const o=this.geometryDistance(i,t,e);return o>0?o*o:0}geometryDistance(t,e,i){const{renderMode:o,strokeWidth:s}=this,a=(o&1)!==0,n=(o&2)!==0,r=Math.max(s/2,1)+1;switch(t.type){case"GeometryCollection":return t.geometries.reduce((l,c)=>Math.min(l,this.geometryDistance(c,e,i)),1/0);case"MultiPolygon":return a?t.coordinates.reduce((l,c)=>Math.min(l,Math.max(polygonDistance(c,e,i),0)),1/0):1/0;case"Polygon":return a?Math.max(polygonDistance(t.coordinates,e,i),0):1/0;case"MultiLineString":return n?t.coordinates.reduce((l,c)=>Math.min(l,Math.max(lineStringDistance(c,e,i)-r,0)),1/0):1/0;case"LineString":return n?Math.max(lineStringDistance(t.coordinates,e,i)-r,0):1/0;case"MultiPoint":case"Point":default:return 1/0}}drawGeometry(t,e){const{renderMode:i,path:o,strokePath:s}=this,a=(i&1)!==0,n=(i&2)!==0;switch(t.type){case"GeometryCollection":t.geometries.forEach(r=>{e=this.drawGeometry(r,e)});break;case"MultiPolygon":a&&t.coordinates.forEach(r=>{e=this.drawPolygon(o,r,e)});break;case"Polygon":a&&(e=this.drawPolygon(o,t.coordinates,e));break;case"LineString":n&&(e=this.drawLineString(s,t.coordinates,e,!1));break;case"MultiLineString":n&&t.coordinates.forEach(r=>{e=this.drawLineString(s,r,e,!1)});break;case"Point":case"MultiPoint":break}return e}drawPolygon(t,e,i){if(e.length<1)return i;i=this.drawLineString(t,e[0],i,!0);for(let o=1;o{e=geometryBbox(i,e)});break;case"MultiPolygon":t.coordinates.forEach(i=>{i.length>0&&(e=polygonBbox(i[0],e))});break;case"Polygon":t.coordinates.length>0&&(e=polygonBbox(t.coordinates[0],e));break;case"MultiLineString":t.coordinates.forEach(i=>{e=polygonBbox(i,e)});break;case"LineString":e=polygonBbox(t.coordinates,e);break;case"MultiPoint":t.coordinates.forEach(i=>{const[o,s]=i;e=extendBbox(e,o,s,o,s)});break;case"Point":{const[i,o]=t.coordinates;e=extendBbox(e,i,o,i,o);break}}return e}function largestPolygon(t){switch(t.type){case"GeometryCollection":{let e,i;return t.geometries.forEach(o=>{const s=largestPolygon(o);if(s==null)return;const a=polygonBbox(s[0],void 0);if(a==null)return;const n=Math.abs(a.lat1-a.lat0)*Math.abs(a.lon1-a.lon0);(e==null||n>e)&&(e=n,i=s)}),i}case"MultiPolygon":{let e,i;return t.coordinates.forEach(o=>{const s=polygonBbox(o[0],void 0);if(s==null)return;const a=Math.abs(s.lat1-s.lat0)*Math.abs(s.lon1-s.lon0);(e==null||a>e)&&(e=a,i=o)}),i}case"Polygon":return t.coordinates;case"MultiLineString":case"LineString":case"MultiPoint":case"Point":return}}function largestLineString(t){switch(t.type){case"GeometryCollection":{let e,i;return t.geometries.forEach(o=>{const s=largestLineString(o);if(s==null)return;const a=lineStringLength(s);a!=null&&(e==null||a>e)&&(e=a,i=s)}),i}case"MultiLineString":{let e=0,i;return t.coordinates.forEach(o=>{const s=lineStringLength(o);s>e&&(e=s,i=o)}),i}case"LineString":return t.coordinates;case"MultiPolygon":case"Polygon":case"MultiPoint":case"Point":return}}function containsType(t,e){if(t==null)return!1;switch(t.type){case"GeometryCollection":return t.geometries.some(i=>containsType(i,e));case"MultiPolygon":case"Polygon":return(e&1)!==0;case"MultiLineString":case"LineString":return(e&2)!==0;case"MultiPoint":case"Point":return(e&4)!==0}}function projectGeometry(t,e){switch(t.type){case"GeometryCollection":return{type:"GeometryCollection",geometries:t.geometries.map(i=>projectGeometry(i,e))};case"Polygon":return{type:"Polygon",coordinates:projectPolygon(t.coordinates,e)};case"MultiPolygon":return{type:"MultiPolygon",coordinates:projectMultiPolygon(t.coordinates,e)};case"MultiLineString":return{type:"MultiLineString",coordinates:projectPolygon(t.coordinates,e)};case"LineString":return{type:"LineString",coordinates:projectLineString(t.coordinates,e)};case"MultiPoint":return{type:"MultiPoint",coordinates:projectLineString(t.coordinates,e)};case"Point":return{type:"Point",coordinates:e.convert(t.coordinates)}}}function projectMultiPolygon(t,e){return t.map(i=>projectPolygon(i,e))}function projectPolygon(t,e){return t.map(i=>projectLineString(i,e))}function projectLineString(t,e){return t.map(i=>e.convert(i))}var import_ag_charts_community196=require("ag-charts-community"),TopologySeriesProperties=class extends import_ag_charts_community196._ModuleSupport.SeriesProperties{},TopologySeries=class extends import_ag_charts_community196._ModuleSupport.DataModelSeries{addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",t=>{this.onLegendItemClick(t)}),this.ctx.chartEventManager.addListener("legend-item-double-click",t=>{this.onLegendItemDoubleClick(t)}))}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}},import_ag_charts_community197=require("ag-charts-community");function isValidCoordinate(t){return Array.isArray(t)&&t.length>=2&&t.every(isFiniteNumber)}function isValidCoordinates(t){return Array.isArray(t)&&t.length>=2&&t.every(isValidCoordinate)}var delta3=.001;function hasSameStartEndPoint(t){return Math.abs(t[0][0]-t[t.length-1][0])this.nodeFactory())}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get focusable(){return!1}setOptionsData(){}setChartData(){}get hasData(){return!1}renderToOffscreenCanvas(){return!0}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[0,t,0],this.highlightGroup.zIndex=[0,t,1],!0):!1}nodeFactory(){const t=new GeoGeometry;return t.renderMode=2,t.lineJoin="round",t.lineCap="round",t.pointerEvents=PointerEvents4.None,t}processData(){const{topology:t}=this;this.topologyBounds=t?.features.reduce((e,i)=>{const o=i.geometry;return o==null?e:geometryBbox(o,e)},void 0),t==null&&logger_exports.warnOnce("no topology was provided for [MapShapeBackgroundSeries]; nothing will be rendered.")}createNodeData(){const{id:t,topology:e,scale:i}=this;if(e==null)return;const o=[],s=[];return e.features.forEach((a,n)=>{const{geometry:r}=a,l=r!=null&&i!=null?projectGeometry(r,i):void 0;l!=null&&o.push({series:this,itemId:n,datum:a,datumIndex:0,index:n,projectedGeometry:l})}),{itemId:t,nodeData:o,labelData:s}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t}=this;this.updateSelections(),this.contentGroup.visible=this.visible;const{nodeData:e=[]}=this.contextNodeData??{};this.datumSelection=this.updateDatumSelection({nodeData:e,datumSelection:t}),this.updateDatumNodes({datumSelection:t})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId9(e.index))}updateDatumNodes(t){const{properties:e}=this,{datumSelection:i}=t,{stroke:o,strokeOpacity:s,lineDash:a,lineDashOffset:n}=e,r=this.getStrokeWidth(e.strokeWidth);i.each((l,c)=>{const{projectedGeometry:h}=c;if(h==null){l.visible=!1,l.projectedGeometry=void 0;return}l.visible=!0,l.projectedGeometry=h,l.stroke=o,l.strokeWidth=r,l.strokeOpacity=s,l.lineDash=a,l.lineDashOffset=n})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(t){}computeFocusBounds(t){}};MapLineBackgroundSeries.className="MapLineBackgroundSeries",MapLineBackgroundSeries.type="map-line-background",__decorateClass([Validate66(GEOJSON_OBJECT,{optional:!0,property:"topology"})],MapLineBackgroundSeries.prototype,"_chartTopology",2);var{DEFAULT_HIERARCHY_STROKES}=import_ag_charts_community200._ModuleSupport.ThemeSymbols,MapLineBackgroundModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-line-background",moduleFactory:t=>new MapLineBackgroundSeries(t),tooltipDefaults:{range:"exact"},themeTemplate:{...MAP_THEME_DEFAULTS,series:{strokeWidth:1,lineDash:[0],lineDashOffset:0}},paletteFactory:({themeTemplateParameters:t})=>({stroke:t.get(DEFAULT_HIERARCHY_STROKES)?.[1]})},import_ag_charts_community203=require("ag-charts-community"),import_ag_charts_community202=require("ag-charts-community");function prepareMapMarkerAnimationFunctions(){return{fromFn:(i,o,s)=>s==="removed"?{scalingX:1,scalingY:1}:i.previousDatum==null?{scalingX:0,scalingY:0}:{scalingX:i.scalingX,scalingY:i.scalingY},toFn:(i,o,s)=>s==="removed"?{scalingX:0,scalingY:0}:{scalingX:1,scalingY:1}}}function findFocusedGeoGeometry(t,e){const i=t.contextNodeData?.nodeData[e.datumIndex];if(i!==void 0){for(const o of t.datumSelection.nodes())if(o.datum===i)return o}}var import_ag_charts_community201=require("ag-charts-community"),{AND:AND6,ARRAY:ARRAY9,COLOR_STRING:COLOR_STRING17,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY7,FUNCTION:FUNCTION13,LINE_DASH:LINE_DASH13,NUMBER_ARRAY:NUMBER_ARRAY2,OBJECT:OBJECT33,POSITIVE_NUMBER:POSITIVE_NUMBER25,RATIO:RATIO21,STRING:STRING31,Validate:Validate67,SeriesProperties:SeriesProperties4,SeriesTooltip:SeriesTooltip10,Label:Label7}=import_ag_charts_community201._ModuleSupport,MapLineSeriesProperties=class extends SeriesProperties4{constructor(){super(...arguments),this.topology=void 0,this.idKey="",this.topologyIdKey="name",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.maxStrokeWidth=void 0,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.label=new Label7,this.tooltip=new SeriesTooltip10}};__decorateClass([Validate67(GEOJSON_OBJECT,{optional:!0})],MapLineSeriesProperties.prototype,"topology",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"title",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"legendItemName",2),__decorateClass([Validate67(STRING31)],MapLineSeriesProperties.prototype,"idKey",2),__decorateClass([Validate67(STRING31)],MapLineSeriesProperties.prototype,"topologyIdKey",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"idName",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"labelKey",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"labelName",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"sizeKey",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"sizeName",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"colorKey",2),__decorateClass([Validate67(STRING31,{optional:!0})],MapLineSeriesProperties.prototype,"colorName",2),__decorateClass([Validate67(NUMBER_ARRAY2,{optional:!0})],MapLineSeriesProperties.prototype,"sizeDomain",2),__decorateClass([Validate67(AND6(COLOR_STRING_ARRAY7,ARRAY9.restrict({minLength:1})),{optional:!0})],MapLineSeriesProperties.prototype,"colorRange",2),__decorateClass([Validate67(POSITIVE_NUMBER25,{optional:!0})],MapLineSeriesProperties.prototype,"maxStrokeWidth",2),__decorateClass([Validate67(COLOR_STRING17)],MapLineSeriesProperties.prototype,"stroke",2),__decorateClass([Validate67(RATIO21)],MapLineSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([Validate67(POSITIVE_NUMBER25)],MapLineSeriesProperties.prototype,"strokeWidth",2),__decorateClass([Validate67(LINE_DASH13)],MapLineSeriesProperties.prototype,"lineDash",2),__decorateClass([Validate67(POSITIVE_NUMBER25)],MapLineSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([Validate67(FUNCTION13,{optional:!0})],MapLineSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate67(OBJECT33)],MapLineSeriesProperties.prototype,"label",2),__decorateClass([Validate67(OBJECT33)],MapLineSeriesProperties.prototype,"tooltip",2);var{getMissCount:getMissCount2,createDatumId:createDatumId10,SeriesNodePickMode:SeriesNodePickMode8,valueProperty:valueProperty9,CachedTextMeasurerPool:CachedTextMeasurerPool7,Validate:Validate68,ColorScale:ColorScale3,LinearScale:LinearScale4,Selection:Selection8,Text:Text3,Transformable:Transformable2}=import_ag_charts_community202._ModuleSupport,MapLineSeries=class extends TopologySeries{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[SeriesNodePickMode8.EXACT_SHAPE_MATCH,SeriesNodePickMode8.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new MapLineSeriesProperties,this._chartTopology=void 0,this.colorScale=new ColorScale3,this.sizeScale=new LinearScale4,this.datumSelection=Selection8.select(this.contentGroup,()=>this.nodeFactory()),this.labelSelection=Selection8.select(this.labelGroup,Text3),this.highlightDatumSelection=Selection8.select(this.highlightNode,()=>this.nodeFactory()),this._previousDatumMidPoint=void 0}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){return super.hasData&&this.topology!=null}renderToOffscreenCanvas(){return!0}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[1,t],this.highlightGroup.zIndex=[2,t],!0):!1}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}nodeFactory(){const t=new GeoGeometry;return t.renderMode=2,t.lineJoin="round",t.lineCap="round",t}async processData(t){if(this.data==null||!this.properties.isValid())return;const{data:e,topology:i,sizeScale:o,colorScale:s}=this,{topologyIdKey:a,idKey:n,sizeKey:r,colorKey:l,labelKey:c,sizeDomain:h,colorRange:d}=this.properties,u=new Map;i?.features.forEach(x=>{const S=x.properties?.[a];S==null||!containsType(x.geometry,2)||u.set(S,x)});const p=this.sizeScale.type,g=this.colorScale.type,y=this.scale?.type,{dataModel:f,processedData:m}=await this.requestDataModel(t,e,{props:[valueProperty9(n,y,{id:"idValue",includeProperty:!1}),valueProperty9(n,y,{id:"featureValue",includeProperty:!1,processor:()=>x=>u.get(x)}),...c!=null?[valueProperty9(c,"band",{id:"labelValue"})]:[],...r!=null?[valueProperty9(r,p,{id:"sizeValue"})]:[],...l!=null?[valueProperty9(l,g,{id:"colorValue"})]:[]]}),b=f.resolveColumnById(this,"featureValue",m);if(this.topologyBounds=b.reduce((x,S)=>{const M=S?.geometry;return M==null?x:geometryBbox(M,x)},void 0),r!=null){const x=f.resolveProcessedDataIndexById(this,"sizeValue"),S=m.domain.values[x]??[];o.domain=h??S}if(d!=null&&this.isColorScaleValid()){const x=f.resolveProcessedDataIndexById(this,"colorValue");s.domain=m.domain.values[x],s.range=d,s.update()}i==null&&logger_exports.warnOnce("no topology was provided for [MapLineSeries]; nothing will be rendered.")}isColorScaleValid(){const{colorKey:t}=this.properties;if(!t)return!1;const{dataModel:e,processedData:i}=this;if(!e||!i)return!1;const o=e.resolveProcessedDataIndexById(this,"colorValue"),s=i.input.count,a=getMissCount2(this,i.defs.values[o].missing);return!(s===0||s===a)}getLabelDatum(t,e,i,o){if(e==null||i==null)return;const s=largestLineString(i);if(s==null)return;const{idKey:a,idName:n,sizeKey:r,sizeName:l,colorKey:c,colorName:h,labelKey:d,labelName:u,label:p}=this.properties,g=this.getLabelText(p,{value:e,datum:t,idKey:a,idName:n,sizeKey:r,sizeName:l,colorKey:c,colorName:h,labelKey:d,labelName:u});if(g==null)return;const y=CachedTextMeasurerPool7.measureText(String(g),{font:o}),f=lineStringCenter(s);if(f==null)return;const[m,b]=f.point,{width:x,height:S}=y;return{point:{x:m,y:b,size:0},label:{width:x,height:S,text:g},anchor:void 0,placement:void 0}}createNodeData(){const{id:t,dataModel:e,processedData:i,sizeScale:o,properties:s,scale:a}=this,{idKey:n,sizeKey:r,colorKey:l,labelKey:c,label:h}=s;if(e==null||i==null)return;const d=e.resolveColumnById(this,"idValue",i),u=e.resolveColumnById(this,"featureValue",i),p=c!=null?e.resolveColumnById(this,"labelValue",i):void 0,g=r!=null?e.resolveColumnById(this,"sizeValue",i):void 0,y=l!=null?e.resolveColumnById(this,"colorValue",i):void 0,f=s.maxStrokeWidth??s.strokeWidth;o.range=[Math.min(s.strokeWidth,f),f];const m=h.getFont(),b=new Map;i.dataSources.get(this.id)?.forEach((k,D)=>{const C=d[D],_=u[D]?.geometry??void 0,I=_!=null&&a!=null?projectGeometry(_,a):void 0;C!=null&&I!=null&&b.set(C,I)});const x=[],S=[],M=[];(i.dataSources.get(this.id)??[]).forEach((k,D)=>{const C=d[D],_=y?.[D],I=g?.[D],T=p?.[D],O=b.get(C);O==null&&M.push(C);const w=this.getLabelDatum(k,T,O,m);w!=null&&S.push(w),x.push({series:this,itemId:n,datum:k,datumIndex:D,idValue:C,labelValue:T,colorValue:_,sizeValue:I,projectedGeometry:O})});const v=10;if(M.length>v){const k=M.length-v;M.length=v,M.push(`(+${k} more)`)}return M.length>0&&logger_exports.warnOnce("some data items do not have matches in the provided topology",M),{itemId:t,nodeData:x,labelData:S}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t,highlightDatumSelection:e}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let i=this.ctx.highlightManager?.getActiveHighlight();i!=null&&(i.series!==this||i.datum==null)&&(i=void 0);const o=this.contextNodeData?.nodeData??[];this.datumSelection=this.updateDatumSelection({nodeData:o,datumSelection:t}),this.updateDatumNodes({datumSelection:t,isHighlight:!1}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:i!=null?[i]:[],datumSelection:e}),this.updateDatumNodes({datumSelection:e,isHighlight:!0})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId10(e.idValue))}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset}}getItemStyleOverrides(t,e,i,o,s,a){const{id:n,properties:r,colorScale:l,sizeScale:c}=this,{colorRange:h,itemStyler:d}=r;let u;if(!a&&i!=null&&(u??(u={}),u.stroke=this.isColorScaleValid()?l.convert(i):h?.[0]??r.stroke),o!=null&&(u??(u={}),u.strokeWidth=c.convert(o,!0)),d!=null){const p=this.cachedDatumCallback(createDatumId10(t,a?"highlight":"node"),()=>d({seriesId:n,datum:e,highlighted:a,...s,...u}));u??(u={}),Object.assign(u,p)}return u}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,o=this.getItemBaseStyle(i);e.each((s,a)=>{const{datum:n,datumIndex:r,colorValue:l,sizeValue:c,projectedGeometry:h}=a;if(h==null){s.visible=!1,s.projectedGeometry=void 0;return}const d=this.getItemStyleOverrides(String(r),n,l,c,o,i);s.visible=!0,s.projectedGeometry=h,s.stroke=d?.stroke??o.stroke,s.strokeWidth=d?.strokeWidth??o.strokeWidth,s.strokeOpacity=d?.strokeOpacity??o.strokeOpacity,s.lineDash=d?.lineDash??o.lineDash,s.lineDashOffset=d?.lineDashOffset??o.lineDashOffset})}updatePlacedLabelData(t){this.labelSelection=this.labelSelection.update(t,e=>{e.pointerEvents=import_ag_charts_community202._ModuleSupport.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:o,fontWeight:s,fontSize:a,fontFamily:n}=this.properties.label;e.each((r,{x:l,y:c,width:h,height:d,text:u})=>{r.visible=!0,r.x=l+h/2,r.y=c+d/2,r.text=u,r.fill=i,r.fontStyle=o,r.fontWeight=s,r.fontSize=a,r.fontFamily=n,r.textAlign="center",r.textBaseline="middle"})}resetAnimation(){}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum({x:t,y:e}){let i=1/0,o;return this.datumSelection.each((s,a)=>{const n=s.distanceSquared(t,e);nnew MapLineSeries(t),tooltipDefaults:{range:"exact"},themeTemplate:{...MAP_THEME_DEFAULTS,series:{strokeWidth:1,maxStrokeWidth:3,lineDash:[0],lineDashOffset:0,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}}},paletteFactory:t=>{const{takeColors:e,colorsCount:i,userPalette:o,themeTemplateParameters:s}=t,{fill:a}=import_ag_charts_community203._ModuleSupport.singleSeriesPaletteFactory(t),n=s.get(DEFAULT_DIVERGING_SERIES_COLOR_RANGE2),{fills:r}=e(i);return{colorRange:o==="inbuilt"?n:[r[0],r[1]],stroke:a}}},import_ag_charts_community206=require("ag-charts-community"),import_ag_charts_community205=require("ag-charts-community"),insertManySorted=(t,e,i)=>{let o=t,s=o;for(const a of e)if(o==null||i(o.value,a)>0)o={value:a,next:o},s=o;else{for(s=s;s.next!=null&&i(s.next.value,a)<=0;)s=s.next;s.next={value:a,next:s.next}}return o};function polygonPointSearch(t,e,i){const o=polygonBbox(t[0],void 0);if(o==null)return;const s=(o.lon0+o.lon1)/2,a=(o.lat0+o.lat1)/2,n=Math.abs(o.lon1-o.lon0),r=Math.abs(o.lat1-o.lat0),l=polygonCentroid(t[0]),[c,h]=l,d=-polygonDistance(t,c,h);let u;const p=(M,A)=>{const k=Math.max(A-d,0);return M-.5*k},g=(M,A,v)=>{const{distance:k,maxDistance:D}=i(t,M,A,v),C=Math.hypot(c-M,h-A),_=Math.min(Math.max(c,M-v/2),M+v/2),I=Math.min(Math.max(h,A-v/2),A+v/2),T=Math.hypot(c-_,h-I),O=p(k,C),w=p(D,T);return{distance:k,maxDistance:D,value:O,maxValue:w,x:M,y:A,stride:v}},y=(M,A,v,k)=>{const D=g(A,v,k);D.maxDistance>=0&&M.push(D)},f=Math.min(n,r)/2;let m={value:g(s,a,f),next:null};for(;m!=null;){const M=m.value,{distance:A,value:v,maxValue:k,x:D,y:C,stride:_}=M;if(m=m.next,A>0&&(u==null||v>u.value)&&(u=M),u!=null&&k-u.value<=e)continue;const I=_/2,T=[];y(T,D-I,C-I,I),y(T,D+I,C-I,I),y(T,D-I,C+I,I),y(T,D+I,C+I,I),T.sort(labelPlacementCmp),m=insertManySorted(m,T,labelPlacementCmp)}if(u==null)return;const{distance:b,x,y:S}=u;return{x,y:S,distance:b}}var labelPlacementCmp=(t,e)=>e.maxValue-t.maxValue;function polygonMarkerCenter(t,e){const i=polygonPointSearch(t,e,(a,n,r,l)=>{const c=-polygonDistance(a,n,r),h=c+l*Math.SQRT2;return{distance:c,maxDistance:h}});if(i==null)return;const{x:o,y:s}=i;return[o,s]}function markerPositions(t,e){let i;switch(t.type){case"GeometryCollection":return t.geometries.flatMap(o=>markerPositions(o,e));case"MultiPoint":return t.coordinates;case"Point":return[t.coordinates];case"MultiPolygon":{const o=largestPolygon(t);i=o!=null?polygonMarkerCenter(o,e):void 0;break}case"Polygon":{const o=t.coordinates;i=o!=null?polygonMarkerCenter(o,e):void 0;break}case"MultiLineString":{const o=largestLineString(t);i=o!=null?lineStringCenter(o)?.point:void 0;break}case"LineString":{const o=t.coordinates;i=lineStringCenter(o)?.point;break}}return i!=null?[i]:[]}var import_ag_charts_community204=require("ag-charts-community"),{AND:AND7,ARRAY:ARRAY10,COLOR_STRING:COLOR_STRING18,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY8,FUNCTION:FUNCTION14,NUMBER_ARRAY:NUMBER_ARRAY3,OBJECT:OBJECT34,POSITIVE_NUMBER:POSITIVE_NUMBER26,RATIO:RATIO22,STRING:STRING32,MARKER_SHAPE:MARKER_SHAPE2,LINE_DASH:LINE_DASH14,Validate:Validate69,SeriesProperties:SeriesProperties5,SeriesTooltip:SeriesTooltip11,Label:Label8}=import_ag_charts_community204._ModuleSupport,MapMarkerSeriesLabel=class extends Label8{constructor(){super(...arguments),this.placement="bottom"}};__decorateClass([Validate69(STRING32)],MapMarkerSeriesLabel.prototype,"placement",2);var MapMarkerSeriesProperties=class extends SeriesProperties5{constructor(){super(...arguments),this.topology=void 0,this.idKey=void 0,this.topologyIdKey="name",this.idName=void 0,this.latitudeKey=void 0,this.latitudeName=void 0,this.longitudeKey=void 0,this.longitudeName=void 0,this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.shape="circle",this.size=6,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new MapMarkerSeriesLabel,this.tooltip=new SeriesTooltip11}isValid(){const t=super.isValid(),e=this.idKey!=null,i=this.latitudeKey!=null&&this.longitudeKey!=null;return!e&&!i?(logger_exports.warnOnce("Either both [topology] and [idKey] or both [latitudeKey] and [longitudeKey] must be set to render a map marker series."),!1):t}};__decorateClass([Validate69(GEOJSON_OBJECT,{optional:!0})],MapMarkerSeriesProperties.prototype,"topology",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"title",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"legendItemName",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"idKey",2),__decorateClass([Validate69(STRING32)],MapMarkerSeriesProperties.prototype,"topologyIdKey",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"idName",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"latitudeKey",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"latitudeName",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"longitudeKey",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"longitudeName",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"labelKey",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"labelName",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"sizeKey",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"sizeName",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"colorKey",2),__decorateClass([Validate69(STRING32,{optional:!0})],MapMarkerSeriesProperties.prototype,"colorName",2),__decorateClass([Validate69(AND7(COLOR_STRING_ARRAY8,ARRAY10.restrict({minLength:1})),{optional:!0})],MapMarkerSeriesProperties.prototype,"colorRange",2),__decorateClass([Validate69(MARKER_SHAPE2)],MapMarkerSeriesProperties.prototype,"shape",2),__decorateClass([Validate69(POSITIVE_NUMBER26)],MapMarkerSeriesProperties.prototype,"size",2),__decorateClass([Validate69(POSITIVE_NUMBER26,{optional:!0})],MapMarkerSeriesProperties.prototype,"maxSize",2),__decorateClass([Validate69(NUMBER_ARRAY3,{optional:!0})],MapMarkerSeriesProperties.prototype,"sizeDomain",2),__decorateClass([Validate69(COLOR_STRING18)],MapMarkerSeriesProperties.prototype,"fill",2),__decorateClass([Validate69(RATIO22)],MapMarkerSeriesProperties.prototype,"fillOpacity",2),__decorateClass([Validate69(COLOR_STRING18)],MapMarkerSeriesProperties.prototype,"stroke",2),__decorateClass([Validate69(POSITIVE_NUMBER26)],MapMarkerSeriesProperties.prototype,"strokeWidth",2),__decorateClass([Validate69(RATIO22)],MapMarkerSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([Validate69(LINE_DASH14)],MapMarkerSeriesProperties.prototype,"lineDash",2),__decorateClass([Validate69(POSITIVE_NUMBER26)],MapMarkerSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([Validate69(FUNCTION14,{optional:!0})],MapMarkerSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate69(OBJECT34)],MapMarkerSeriesProperties.prototype,"label",2),__decorateClass([Validate69(OBJECT34)],MapMarkerSeriesProperties.prototype,"tooltip",2);var{CachedTextMeasurerPool:CachedTextMeasurerPool8,Validate:Validate70,fromToMotion:fromToMotion2,StateMachine:StateMachine13,getMissCount:getMissCount3,createDatumId:createDatumId11,SeriesNodePickMode:SeriesNodePickMode9,valueProperty:valueProperty10,computeMarkerFocusBounds,ColorScale:ColorScale4,LinearScale:LinearScale5,Group:Group13,Selection:Selection9,Text:Text4,Marker:Marker3,applyShapeStyle:applyShapeStyle4}=import_ag_charts_community205._ModuleSupport,MapMarkerSeries=class extends TopologySeries{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[SeriesNodePickMode9.EXACT_SHAPE_MATCH,SeriesNodePickMode9.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new MapMarkerSeriesProperties,this._chartTopology=void 0,this.colorScale=new ColorScale4,this.sizeScale=new LinearScale5,this.markerGroup=this.contentGroup.appendChild(new Group13({name:"markerGroup"})),this.labelSelection=Selection9.select(this.labelGroup,Text4,!1),this.markerSelection=Selection9.select(this.markerGroup,Marker3,!1),this.highlightMarkerSelection=Selection9.select(this.highlightNode,Marker3),this.animationState=new StateMachine13("empty",{empty:{update:{target:"ready",action:()=>this.animateMarkers()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.resetAllAnimation(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateMarkers()},resize:{target:"ready",action:()=>this.resetAllAnimation()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:()=>this.resetAllAnimation()},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){const t=this.properties.latitudeKey!=null&&this.properties.longitudeKey!=null;return super.hasData&&(this.topology!=null||t)}renderToOffscreenCanvas(){return!0}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[3,t],this.highlightGroup.zIndex=[4,t],!0):!1}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}async processData(t){if(this.data==null||!this.properties.isValid())return;const{data:e,topology:i,sizeScale:o,colorScale:s}=this,{topologyIdKey:a,idKey:n,latitudeKey:r,longitudeKey:l,sizeKey:c,colorKey:h,labelKey:d,sizeDomain:u,colorRange:p}=this.properties,g=new Map;i?.features.forEach(k=>{const D=k.properties?.[a];D!=null&&g.set(D,k)});const y=this.sizeScale.type,f=this.colorScale.type,m=this.scale?.type,b=r!=null&&l!=null,{dataModel:x,processedData:S}=await this.requestDataModel(t,e,{props:[...n!=null?[valueProperty10(n,m,{id:"idValue",includeProperty:!1}),valueProperty10(n,m,{id:"featureValue",includeProperty:!1,processor:()=>k=>g.get(k)})]:[],...b?[valueProperty10(r,m,{id:"latValue"}),valueProperty10(l,m,{id:"lonValue"})]:[],...d?[valueProperty10(d,"band",{id:"labelValue"})]:[],...c?[valueProperty10(c,y,{id:"sizeValue"})]:[],...h?[valueProperty10(h,f,{id:"colorValue"})]:[]]}),M=n!=null?x.resolveColumnById(this,"featureValue",S):void 0,A=b?x.resolveColumnById(this,"latValue",S):void 0,v=b?x.resolveColumnById(this,"lonValue",S):void 0;if(this.topologyBounds=S.dataSources.get(this.id)?.reduce((k,D,C)=>{const I=M?.[C]?.geometry;if(I!=null&&(k=geometryBbox(I,k)),A!=null&&v!=null){const T=v[C],O=A[C];k=extendBbox(k,T,O,T,O)}return k},void 0),c!=null){const k=x.resolveProcessedDataIndexById(this,"sizeValue"),D=S.domain.values[k]??[];o.domain=u??D}if(p!=null&&this.isColorScaleValid()){const k=x.resolveProcessedDataIndexById(this,"colorValue");s.domain=S.domain.values[k],s.range=p,s.update()}this.animationState.transition("updateData")}isColorScaleValid(){const{colorKey:t}=this.properties;if(!t)return!1;const{dataModel:e,processedData:i}=this;if(!e||!i)return!1;const o=e.resolveProcessedDataIndexById(this,"colorValue"),s=i.input.count,a=getMissCount3(this,i.defs.values[o].missing);return!(s===0||s===a)}getLabelDatum(t,e,i,o,s,a){if(e==null)return;const{idKey:n,idName:r,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:d,sizeKey:u,sizeName:p,colorKey:g,colorName:y,labelKey:f,labelName:m,label:b,shape:x}=this.properties,{placement:S}=b,M=this.getLabelText(b,{value:e,datum:t,idKey:n,idName:r,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:d,sizeKey:u,sizeName:p,colorKey:g,colorName:y,labelKey:f,labelName:m});if(M==null)return;const{width:A,height:v}=CachedTextMeasurerPool8.measureText(String(M),{font:a}),k=Marker3.anchor(x);return{point:{x:i,y:o,size:s},label:{width:A,height:v,text:M},anchor:k,placement:S}}createNodeData(){const{id:t,dataModel:e,processedData:i,sizeScale:o,properties:s,scale:a}=this,{idKey:n,latitudeKey:r,longitudeKey:l,sizeKey:c,colorKey:h,labelKey:d,label:u}=s;if(e==null||i==null||a==null)return;const p=r!=null&&l!=null,g=n!=null?e.resolveColumnById(this,"idValue",i):void 0,y=n!=null?e.resolveColumnById(this,"featureValue",i):void 0,f=p?e.resolveColumnById(this,"latValue",i):void 0,m=p?e.resolveColumnById(this,"lonValue",i):void 0,b=d!=null?e.resolveColumnById(this,"labelValue",i):void 0,x=c!=null?e.resolveColumnById(this,"sizeValue",i):void 0,S=h!=null?e.resolveColumnById(this,"colorValue",i):void 0,M=s.maxSize??s.size;o.range=[Math.min(s.size,M),M];const A=u.getFont();let v;g!=null&&y!=null&&(v=new Map,i.dataSources.get(this.id)?.forEach((T,O)=>{const w=g[O],E=y[O]?.geometry??void 0,B=E!=null&&a!=null?projectGeometry(E,a):void 0;w!=null&&B!=null&&v.set(w,B)}));const k=[],D=[],C=[];(i.dataSources.get(this.id)??[]).forEach((T,O)=>{const w=g?.[O],E=m?.[O],B=f?.[O],z=S?.[O],P=x?.[O],L=b?.[O],R=P!=null?o.convert(P,!0):s.size,V=w!=null?v?.get(w):void 0;if(w!=null&&projectGeometry==null&&C.push(w),E!=null&&B!=null){const[F,G]=a.convert([E,B]),W=this.getLabelDatum(T,L,F,G,R,A);W&&D.push(W),k.push({series:this,itemId:r,datum:T,datumIndex:O,index:-1,idValue:w,lonValue:E,latValue:B,labelValue:L,sizeValue:P,colorValue:z,point:{x:F,y:G,size:R},midPoint:{x:F,y:G}})}else V!=null&&markerPositions(V,1).forEach(([F,G],W)=>{const H=this.getLabelDatum(T,L,F,G,R,A);H&&D.push(H),k.push({series:this,itemId:r,datum:T,datumIndex:O,index:W,idValue:w,lonValue:E,latValue:B,labelValue:L,sizeValue:P,colorValue:z,point:{x:F,y:G,size:R},midPoint:{x:F,y:G}})})});const I=10;if(C.length>I){const T=C.length-I;C.length=I,C.push(`(+${T} more)`)}return C.length>0&&logger_exports.warnOnce("some data items do not have matches in the provided topology",C),{itemId:t,nodeData:k,labelData:D}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}checkScaleChange(){return this.previousScale===this.scale?!1:(this.previousScale=this.scale,!0)}update({seriesRect:t}){const e=this.checkResize(t),i=this.checkScaleChange(),{markerSelection:o,highlightMarkerSelection:s}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let a=this.ctx.highlightManager?.getActiveHighlight();a!=null&&(a.series!==this||a.datum==null)&&(a=void 0);const n=this.contextNodeData?.nodeData??[];this.markerSelection=this.updateMarkerSelection({markerData:n,markerSelection:o}),this.updateMarkerNodes({markerSelection:o,isHighlight:!1,highlightedDatum:a}),this.highlightMarkerSelection=this.updateMarkerSelection({markerData:a!=null?[a]:[],markerSelection:s}),this.updateMarkerNodes({markerSelection:s,isHighlight:!0,highlightedDatum:a}),(i||e)&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePlacedLabelData(t){this.labelSelection=this.labelSelection.update(t,e=>{e.pointerEvents=import_ag_charts_community205._ModuleSupport.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:o,fontWeight:s,fontSize:a,fontFamily:n}=this.properties.label;e.each((r,{x:l,y:c,width:h,height:d,text:u})=>{r.visible=!0,r.x=l+h/2,r.y=c+d/2,r.text=u,r.fill=i,r.fontStyle=o,r.fontWeight=s,r.fontSize=a,r.fontFamily=n,r.textAlign="center",r.textBaseline="middle"})}updateMarkerSelection(t){const{markerData:e,markerSelection:i}=t;return i.update(e,void 0,o=>createDatumId11([o.index,o.idValue,o.lonValue,o.latValue]))}getMarkerItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{shape:e.shape,size:e.size,fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset}}getMarkerItemStyleOverrides(t,e,i,o,s,a){const{id:n,properties:r,colorScale:l,sizeScale:c}=this,{colorRange:h,itemStyler:d}=r;let u;if(!a&&i!=null&&(u??(u={}),u.fill=this.isColorScaleValid()?l.convert(i):h?.[0]??r.fill),o!=null&&(u??(u={}),u.size=c.convert(o,!0)),d!=null){const p=this.cachedDatumCallback(createDatumId11(t,a?"highlight":"node"),()=>d({seriesId:n,datum:e,highlighted:a,...s,...u}));u??(u={}),Object.assign(u,p)}return u}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i,highlightedDatum:o}=t,s=this.getMarkerItemBaseStyle(i);e.each((a,n)=>{const{datumIndex:r,datum:l,point:c,colorValue:h,sizeValue:d}=n,u=this.getMarkerItemStyleOverrides(String(r),l,h,d,s,i);a.shape=u?.shape??s.shape,a.size=u?.size??s.size,applyShapeStyle4(a,s,u),a.translationX=c.x,a.translationY=c.y,a.zIndex=!i&&o!=null&&l===o.datum?1:0})}isProcessedDataAnimatable(){return!0}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.ctx.animationManager.skipCurrentBatch(),this.labelSelection.cleanup(),this.markerSelection.cleanup(),this.highlightMarkerSelection.cleanup()}animateMarkers(){const{animationManager:t}=this.ctx,e=prepareMapMarkerAnimationFunctions();fromToMotion2(this.id,"markers",t,[this.markerSelection,this.highlightMarkerSelection],e)}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum(t){const{x:e,y:i}=t;let o=1/0,s;return this.contextNodeData?.nodeData.forEach(a=>{const{x:n,y:r,size:l}=a.point,c=Math.max(Math.abs(n-e)-l,0),h=Math.max(Math.abs(r-i)-l,0),d=c*c+h*h;d=0?"N":"S"}, ${Math.abs(I).toFixed(4)}\xB0 ${I>=0?"W":"E"}`}const C=this.getMarkerItemBaseStyle(!1);return Object.assign(C,this.getMarkerItemStyleOverrides(String(S),S,v,A,C,!1)),x.formatTooltip({heading:D,title:m??b,symbol:this.legendItemSymbol(S),data:k},{seriesId:e,datum:M,title:m,idKey:a,idName:n,latitudeKey:r,latitudeName:l,longitudeKey:c,longitudeName:h,colorKey:d,colorName:u,sizeKey:p,sizeName:g,labelKey:y,labelName:f,...C})}getFormattedMarkerStyle(t){const{datumIndex:e,colorValue:i,sizeValue:o}=t,s=this.getMarkerItemBaseStyle(!1);return Object.assign(s,this.getMarkerItemStyleOverrides(String(e),e,i,o,s,!1)),{size:s.size}}computeFocusBounds(t){return computeMarkerFocusBounds(this,t)}};MapMarkerSeries.className="MapMarkerSeries",MapMarkerSeries.type="map-marker",__decorateClass([Validate70(GEOJSON_OBJECT,{optional:!0,property:"topology"})],MapMarkerSeries.prototype,"_chartTopology",2);var{DEFAULT_DIVERGING_SERIES_COLOR_RANGE:DEFAULT_DIVERGING_SERIES_COLOR_RANGE3}=import_ag_charts_community206._ModuleSupport.ThemeSymbols,MapMarkerModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-marker",moduleFactory:t=>new MapMarkerSeries(t),tooltipDefaults:{range:"exact"},themeTemplate:{...MAP_THEME_DEFAULTS,series:{shape:"circle",maxSize:30,fillOpacity:.5,label:{color:{$ref:"textColor"}}}},paletteFactory:t=>{const{takeColors:e,colorsCount:i,userPalette:o,themeTemplateParameters:s}=t,{fill:a,stroke:n}=import_ag_charts_community206._ModuleSupport.singleSeriesPaletteFactory(t),r=s.get(DEFAULT_DIVERGING_SERIES_COLOR_RANGE3),{fills:l}=e(i);return{fill:a,stroke:n,colorRange:o==="inbuilt"?r:[l[0],l[1]]}}},import_ag_charts_community209=require("ag-charts-community"),import_ag_charts_community208=require("ag-charts-community"),import_ag_charts_community207=require("ag-charts-community"),{COLOR_STRING:COLOR_STRING19,LINE_DASH:LINE_DASH15,OBJECT:OBJECT35,POSITIVE_NUMBER:POSITIVE_NUMBER27,RATIO:RATIO23,Validate:Validate71,SeriesProperties:SeriesProperties6,SeriesTooltip:SeriesTooltip12}=import_ag_charts_community207._ModuleSupport,MapShapeBackgroundSeriesProperties=class extends SeriesProperties6{constructor(){super(...arguments),this.topology=void 0,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=new SeriesTooltip12}};__decorateClass([Validate71(GEOJSON_OBJECT,{optional:!0})],MapShapeBackgroundSeriesProperties.prototype,"topology",2),__decorateClass([Validate71(COLOR_STRING19)],MapShapeBackgroundSeriesProperties.prototype,"fill",2),__decorateClass([Validate71(RATIO23)],MapShapeBackgroundSeriesProperties.prototype,"fillOpacity",2),__decorateClass([Validate71(COLOR_STRING19)],MapShapeBackgroundSeriesProperties.prototype,"stroke",2),__decorateClass([Validate71(RATIO23)],MapShapeBackgroundSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([Validate71(POSITIVE_NUMBER27)],MapShapeBackgroundSeriesProperties.prototype,"strokeWidth",2),__decorateClass([Validate71(LINE_DASH15)],MapShapeBackgroundSeriesProperties.prototype,"lineDash",2),__decorateClass([Validate71(POSITIVE_NUMBER27)],MapShapeBackgroundSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([Validate71(OBJECT35)],MapShapeBackgroundSeriesProperties.prototype,"tooltip",2);var{createDatumId:createDatumId12,SeriesNodePickMode:SeriesNodePickMode10,Validate:Validate72,Selection:Selection10,Group:Group14,PointerEvents:PointerEvents5}=import_ag_charts_community208._ModuleSupport,MapShapeBackgroundSeries=class extends TopologySeries{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[SeriesNodePickMode10.EXACT_SHAPE_MATCH]}),this.properties=new MapShapeBackgroundSeriesProperties,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new Group14({name:"itemGroup"})),this.datumSelection=Selection10.select(this.itemGroup,()=>this.nodeFactory())}get topology(){return this.properties.topology??this._chartTopology}get focusable(){return!1}setOptionsData(){}setChartData(){}getNodeData(){}get hasData(){return!1}renderToOffscreenCanvas(){return!0}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[0,t,0],this.highlightGroup.zIndex=[0,t,1],!0):!1}nodeFactory(){const t=new GeoGeometry;return t.renderMode=1,t.lineJoin="round",t.pointerEvents=PointerEvents5.None,t}processData(){const{topology:t}=this;this.topologyBounds=t?.features.reduce((e,i)=>{const o=i.geometry;return o==null?e:geometryBbox(o,e)},void 0),t==null&&logger_exports.warnOnce("no topology was provided for [MapShapeBackgroundSeries]; nothing will be rendered.")}createNodeData(){const{id:t,topology:e,scale:i}=this;if(e==null)return;const o=[],s=[];return e.features.forEach((a,n)=>{const{geometry:r}=a,l=r!=null&&i!=null?projectGeometry(r,i):void 0;l!=null&&o.push({series:this,itemId:n,datum:a,datumIndex:0,index:n,projectedGeometry:l})}),{itemId:t,nodeData:o,labelData:s}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t}=this;this.updateSelections(),this.contentGroup.visible=this.visible;const{nodeData:e=[]}=this.contextNodeData??{};this.datumSelection=this.updateDatumSelection({nodeData:e,datumSelection:t}),this.updateDatumNodes({datumSelection:t})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId12(e.index))}updateDatumNodes(t){const{properties:e}=this,{datumSelection:i}=t,{fill:o,fillOpacity:s,stroke:a,strokeOpacity:n,lineDash:r,lineDashOffset:l}=e,c=this.getStrokeWidth(e.strokeWidth);i.each((h,d)=>{const{projectedGeometry:u}=d;if(u==null){h.visible=!1,h.projectedGeometry=void 0;return}h.visible=!0,h.projectedGeometry=u,h.fill=o,h.fillOpacity=s,h.stroke=a,h.strokeWidth=c,h.strokeOpacity=n,h.lineDash=r,h.lineDashOffset=l})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(t){}pickFocus(){}computeFocusBounds(t){}};MapShapeBackgroundSeries.className="MapShapeBackgroundSeries",MapShapeBackgroundSeries.type="map-shape-background",__decorateClass([Validate72(GEOJSON_OBJECT,{optional:!0,property:"topology"})],MapShapeBackgroundSeries.prototype,"_chartTopology",2);var{DEFAULT_HIERARCHY_FILLS:DEFAULT_HIERARCHY_FILLS2}=import_ag_charts_community209._ModuleSupport.ThemeSymbols,MapShapeBackgroundModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-shape-background",moduleFactory:t=>new MapShapeBackgroundSeries(t),tooltipDefaults:{range:"exact"},themeTemplate:{...MAP_THEME_DEFAULTS,series:{stroke:{$ref:"backgroundColor"},strokeWidth:1}},paletteFactory:({themeTemplateParameters:t})=>({fill:t.get(DEFAULT_HIERARCHY_FILLS2)?.[1]})},import_ag_charts_community212=require("ag-charts-community"),import_ag_charts_community211=require("ag-charts-community");function preferredLabelCenter(t,{aspectRatio:e,precision:i}){const o=polygonPointSearch(t,i,(l,c,h,d)=>{const u=maxWidthOfRectConstrainedByCenterAndAspectRatioToPolygon(l,c,h,e),p=u+2*d*e,g=u*Math.SQRT2,y=p*Math.SQRT2;return{distance:g,maxDistance:y}});if(o==null)return;const{x:s,y:a,distance:n}=o,r=n/Math.SQRT2;return{x:s,y:a,maxWidth:r}}function maxWidthOfRectConstrainedByCenterAndAspectRatioToLineSegment(t,e,i,o,s){const[a,n]=t,[r,l]=e,c=1/s,h=r-a,d=l-n,[u,p]=n<=l?t:e,[g,y]=a<=r?t:e,[f,m]=n<=l?e:t,[b,x]=a<=r?e:t;let S=1/0;if(h!==0){const C=d/h;for(let _=0;_<=1;_+=1){const I=_===0?c:-c,T=(C*a-n-I*i+o)/(C-I);if(T>=g&&T<=b){const O=Math.abs(i-T)*2;S=Math.min(S,O)}}}else for(let C=0;C<=1;C+=1){const I=(C===0?c:-c)*(a-i)+o;if(I>=p&&I<=m){const O=Math.abs(o-I)*2*s;S=Math.min(S,O)}}const M=s,A=Math.abs((u-i)/(p-o)),v=Math.abs((f-i)/(m-o));if(mo&&Ai&&ki!=c>i&&e<(l-d)*(i-u)/(c-u)+d&&(s=!s);const p=maxWidthOfRectConstrainedByCenterAndAspectRatioToLineSegment(r,h,e,i,o);a=Math.min(a,p),r=h,l=d,c=u}}return(s?1:-1)*a}function applyX(t,e,i){i>=e&&(t.maxX=Math.min(t.maxX,i-e)),i<=e&&(t.minX=Math.max(t.minX,i-e))}function xExtentsOfRectConstrainedByCenterAndHeightToLineSegment(t,e,i,o,s,a){const n=s-a/2,r=s+a/2,[l,c]=e,[h,d]=i,u=h-l,p=d-c,[g,y]=l<=h?e:i,[f,m]=l<=h?i:e;if(u!==0){const b=p/u;for(let x=0;x<=1;x+=1){const M=((x===0?n:r)-c)/b+l;M>=g&&M<=f&&applyX(t,o,M)}}else Math.max(n,Math.min(c,d))<=Math.min(r,Math.max(c,d))&&applyX(t,o,l);return f=n&&m<=r?applyX(t,o,f):g>o&&y>=n&&y<=r&&applyX(t,o,g),t}function maxWidthInPolygonForRectOfHeight(t,e,i,o){const s={minX:-1/0,maxX:1/0};for(const r of t){let l=r[r.length-1];for(const c of r)xExtentsOfRectConstrainedByCenterAndHeightToLineSegment(s,l,c,e,i,o),l=c}const{minX:a,maxX:n}=s;return Number.isFinite(a)&&Number.isFinite(n)?{x:e+(a+n)/2,width:n-a}:{x:e,width:0}}var import_ag_charts_community210=require("ag-charts-community"),{AND:AND8,ARRAY:ARRAY11,COLOR_STRING:COLOR_STRING20,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY9,FUNCTION:FUNCTION15,LINE_DASH:LINE_DASH16,OBJECT:OBJECT36,POSITIVE_NUMBER:POSITIVE_NUMBER28,RATIO:RATIO24,STRING:STRING33,Validate:Validate73,SeriesProperties:SeriesProperties7,SeriesTooltip:SeriesTooltip13}=import_ag_charts_community210._ModuleSupport,MapShapeSeriesProperties=class extends SeriesProperties7{constructor(){super(...arguments),this.topology=void 0,this.idKey="",this.idName=void 0,this.topologyIdKey="name",this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.padding=0,this.label=new AutoSizedSecondaryLabel,this.tooltip=new SeriesTooltip13}};__decorateClass([Validate73(GEOJSON_OBJECT,{optional:!0})],MapShapeSeriesProperties.prototype,"topology",2),__decorateClass([Validate73(STRING33,{optional:!0})],MapShapeSeriesProperties.prototype,"title",2),__decorateClass([Validate73(STRING33,{optional:!0})],MapShapeSeriesProperties.prototype,"legendItemName",2),__decorateClass([Validate73(STRING33)],MapShapeSeriesProperties.prototype,"idKey",2),__decorateClass([Validate73(STRING33,{optional:!0})],MapShapeSeriesProperties.prototype,"idName",2),__decorateClass([Validate73(STRING33)],MapShapeSeriesProperties.prototype,"topologyIdKey",2),__decorateClass([Validate73(STRING33,{optional:!0})],MapShapeSeriesProperties.prototype,"labelKey",2),__decorateClass([Validate73(STRING33,{optional:!0})],MapShapeSeriesProperties.prototype,"labelName",2),__decorateClass([Validate73(STRING33,{optional:!0})],MapShapeSeriesProperties.prototype,"colorKey",2),__decorateClass([Validate73(STRING33,{optional:!0})],MapShapeSeriesProperties.prototype,"colorName",2),__decorateClass([Validate73(AND8(COLOR_STRING_ARRAY9,ARRAY11.restrict({minLength:1})),{optional:!0})],MapShapeSeriesProperties.prototype,"colorRange",2),__decorateClass([Validate73(COLOR_STRING20)],MapShapeSeriesProperties.prototype,"fill",2),__decorateClass([Validate73(RATIO24)],MapShapeSeriesProperties.prototype,"fillOpacity",2),__decorateClass([Validate73(COLOR_STRING20)],MapShapeSeriesProperties.prototype,"stroke",2),__decorateClass([Validate73(RATIO24)],MapShapeSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([Validate73(POSITIVE_NUMBER28)],MapShapeSeriesProperties.prototype,"strokeWidth",2),__decorateClass([Validate73(LINE_DASH16)],MapShapeSeriesProperties.prototype,"lineDash",2),__decorateClass([Validate73(POSITIVE_NUMBER28)],MapShapeSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([Validate73(POSITIVE_NUMBER28)],MapShapeSeriesProperties.prototype,"padding",2),__decorateClass([Validate73(FUNCTION15,{optional:!0})],MapShapeSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate73(OBJECT36)],MapShapeSeriesProperties.prototype,"label",2),__decorateClass([Validate73(OBJECT36)],MapShapeSeriesProperties.prototype,"tooltip",2);var{getMissCount:getMissCount4,createDatumId:createDatumId13,SeriesNodePickMode:SeriesNodePickMode11,valueProperty:valueProperty11,Validate:Validate74,CachedTextMeasurerPool:CachedTextMeasurerPool9,TextUtils:TextUtils6,ColorScale:ColorScale5,Group:Group15,Selection:Selection11,Text:Text5,PointerEvents:PointerEvents6,applyShapeStyle:applyShapeStyle5}=import_ag_charts_community211._ModuleSupport,fixedScale=import_ag_charts_community211._ModuleSupport.MercatorScale.fixedScale(),MapShapeSeries=class extends TopologySeries{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[SeriesNodePickMode11.EXACT_SHAPE_MATCH,SeriesNodePickMode11.NEAREST_NODE]}),this.properties=new MapShapeSeriesProperties,this._chartTopology=void 0,this.colorScale=new ColorScale5,this.itemGroup=this.contentGroup.appendChild(new Group15({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Group15({name:"itemLabelGroup"})),this.datumSelection=Selection11.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=Selection11.select(this.itemLabelGroup,Text5),this.highlightDatumSelection=Selection11.select(this.highlightNode,()=>this.nodeFactory()),this.previousLabelLayouts=void 0,this._previousDatumMidPoint=void 0,this.itemLabelGroup.pointerEvents=PointerEvents6.None}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){return super.hasData&&this.topology!=null}renderToOffscreenCanvas(){return!0}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[1,t],this.highlightGroup.zIndex=[2,t],!0):!1}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}nodeFactory(){const t=new GeoGeometry;return t.renderMode=1,t.lineJoin="round",t}async processData(t){if(this.data==null||!this.properties.isValid())return;const{data:e,topology:i,colorScale:o}=this,{topologyIdKey:s,idKey:a,colorKey:n,labelKey:r,colorRange:l}=this.properties,c=new Map;i?.features.forEach(y=>{const f=y.properties?.[s];f==null||!containsType(y.geometry,1)||c.set(f,y)});const h=this.colorScale.type,d=this.scale?.type,{dataModel:u,processedData:p}=await this.requestDataModel(t,e,{props:[valueProperty11(a,d,{id:"idValue",includeProperty:!1}),valueProperty11(a,d,{id:"featureValue",includeProperty:!1,processor:()=>y=>c.get(y)}),...r?[valueProperty11(r,"band",{id:"labelValue"})]:[],...n?[valueProperty11(n,h,{id:"colorValue"})]:[]]}),g=u.resolveColumnById(this,"featureValue",p);if(this.topologyBounds=g.reduce((y,f)=>{const m=f?.geometry;return m==null?y:geometryBbox(m,y)},void 0),l!=null&&this.isColorScaleValid()){const y=u.resolveProcessedDataIndexById(this,"colorValue");o.domain=p.domain.values[y],o.range=l,o.update()}i==null&&logger_exports.warnOnce("no topology was provided for [MapShapeSeries]; nothing will be rendered.")}isColorScaleValid(){const{colorKey:t}=this.properties;if(!t)return!1;const{dataModel:e,processedData:i}=this;if(!e||!i)return!1;const o=e.resolveProcessedDataIndexById(this,"colorValue"),s=i.input.count,a=getMissCount4(this,i.defs.values[o].missing);return!(s===0||s===a)}getLabelLayout(t,e,i,o,s){if(e==null||o==null)return;const{idKey:a,idName:n,colorKey:r,colorName:l,labelKey:c,labelName:h,padding:d,label:u}=this.properties,p=this.getLabelText(u,{value:e,datum:t,idKey:a,idName:n,colorKey:r,colorName:l,labelKey:c,labelName:h});if(p==null)return;const g=CachedTextMeasurerPool9.measureText(String(p),{font:i}),y=p.split(` `).length,f=(g.width+2*d)/(y*TextUtils6.getLineHeight(u.fontSize)+2*d);if(s?.geometry===o&&s?.labelText===p&&s?.aspectRatio===f)return s;const m=projectGeometry(o,fixedScale),b=largestPolygon(m);if(b==null)return;const x=preferredLabelCenter(b,{aspectRatio:f,precision:.001});if(x==null)return;const{x:S,y:M,maxWidth:A}=x;return{geometry:o,labelText:p,aspectRatio:f,x:S,y:M,maxWidth:A,fixedPolygon:b}}getLabelDatum(t,e){const{scale:i}=this;if(i==null)return;const{padding:o,label:s}=this.properties,{labelText:a,aspectRatio:n,x:r,y:l,maxWidth:c,fixedPolygon:h}=t,d={width:Math.ceil(c*e),height:Math.ceil(c*e/n),meta:r},u=formatSingleLabel(a,s,{padding:o},(S,M)=>{if(!M)return d;const A=maxWidthInPolygonForRectOfHeight(h,r,l,S/e);return{width:A.width*e,height:S,meta:A.x}});if(u==null)return;const[{text:p,fontSize:g,lineHeight:y,width:f},m]=u;if(p===TextUtils6.EllipsisChar)return;const b=f{const k=d[v],D=g?.[v],C=p?.[v],_=u[v]?.geometry??void 0;_==null&&x.push(k);const I=this.getLabelLayout(A,C,y,_,a?.get(k));I!=null&&f.set(k,I);const T=I!=null&&s!=null?this.getLabelDatum(I,h):void 0;T!=null&&b.push(T);const O=_!=null&&s!=null?projectGeometry(_,s):void 0;m.push({series:this,itemId:n,datum:A,datumIndex:v,idValue:k,colorValue:D,labelValue:C,projectedGeometry:O})});const M=10;if(x.length>M){const A=x.length-M;x.length=M,x.push(`(+${A} more)`)}return x.length>0&&logger_exports.warnOnce("some data items do not have matches in the provided topology",x),{itemId:t,nodeData:m,labelData:b}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t,labelSelection:e,highlightDatumSelection:i}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let o=this.ctx.highlightManager?.getActiveHighlight();o!=null&&(o.series!==this||o.datum==null)&&(o=void 0);const s=this.contextNodeData?.nodeData??[],a=this.contextNodeData?.labelData??[];this.datumSelection=this.updateDatumSelection({nodeData:s,datumSelection:t}),this.updateDatumNodes({datumSelection:t,isHighlight:!1}),this.labelSelection=this.updateLabelSelection({labelData:a,labelSelection:e}),this.updateLabelNodes({labelSelection:e}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:o!=null?[o]:[],datumSelection:i}),this.updateDatumNodes({datumSelection:i,isHighlight:!0})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId13(e.idValue))}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset}}getItemStyleOverrides(t,e,i,o,s){const{id:a,properties:n,colorScale:r}=this,{colorRange:l,itemStyler:c}=n;let h;if(!s&&i!=null&&(h??(h={}),h.fill=this.isColorScaleValid()?r.convert(i):l?.[0]??n.fill),c!=null){const d=this.cachedDatumCallback(createDatumId13(t,s?"highlight":"node"),()=>c({seriesId:a,datum:e,highlighted:s,...o,...h}));h??(h={}),Object.assign(h,d)}return h}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,o=this.getItemBaseStyle(i);e.each((s,a)=>{const{datum:n,datumIndex:r,colorValue:l,projectedGeometry:c}=a;if(c==null){s.visible=!1,s.projectedGeometry=void 0;return}const h=this.getItemStyleOverrides(String(r),n,l,o,i);s.visible=!0,s.projectedGeometry=c,applyShapeStyle5(s,o,h)})}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:o,fontWeight:s,fontFamily:a}=this.properties.label;e.each((n,{x:r,y:l,text:c,fontSize:h,lineHeight:d})=>{n.visible=!0,n.x=r,n.y=l,n.text=c,n.fill=i,n.fontStyle=o,n.fontWeight=s,n.fontSize=h,n.lineHeight=d,n.fontFamily=a,n.textAlign="center",n.textBaseline="middle"})}resetAnimation(){}pickNodeClosestDatum({x:t,y:e}){let i=1/0,o;return this.datumSelection.each((s,a)=>{const n=s.distanceSquared(t,e);nnew MapShapeSeries(t),tooltipDefaults:{range:"exact"},themeTemplate:{...MAP_THEME_DEFAULTS,series:{fillOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,padding:2,label:{color:{$ref:"backgroundColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:"bold",overflowStrategy:"hide"}}},paletteFactory:t=>{const{takeColors:e,colorsCount:i,userPalette:o,themeTemplateParameters:s}=t,{fill:a}=import_ag_charts_community212._ModuleSupport.singleSeriesPaletteFactory(t),n=s.get(DEFAULT_DIVERGING_SERIES_COLOR_RANGE4),{fills:r}=e(i);return{fill:a,stroke:s.get(DEFAULT_BACKGROUND_COLOUR3),colorRange:o==="inbuilt"?n:[r[0],r[1]]}}},import_ag_charts_community219=require("ag-charts-community"),import_ag_charts_community217=require("ag-charts-community"),import_ag_charts_community213=require("ag-charts-community"),{ChartAxisDirection:ChartAxisDirection25,PolarAxis:PolarAxis2,diff:diff4,fixNumericExtent:fixNumericExtent5,groupAccumulativeValueProperty:groupAccumulativeValueProperty2,keyProperty:keyProperty6,normaliseGroupTo,resetLabelFn:resetLabelFn2,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation2,seriesLabelFadeOutAnimation,valueProperty:valueProperty12,animationValidation:animationValidation4,createDatumId:createDatumId14,SeriesNodePickMode:SeriesNodePickMode12,normalizeAngle360:normalizeAngle3606,CategoryScale:CategoryScale3,motion:motion4,applyShapeStyle:applyShapeStyle6}=import_ag_charts_community213._ModuleSupport,RadialColumnSeriesNodeEvent=class extends import_ag_charts_community213._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o),this.angleKey=o.properties.angleKey,this.radiusKey=o.properties.radiusKey}},RadialColumnSeriesBase=class extends import_ag_charts_community213._ModuleSupport.PolarSeries{constructor(t,{animationResetFns:e}){super({moduleCtx:t,useLabelLayer:!0,canHaveAxes:!0,pickModes:[SeriesNodePickMode12.NEAREST_NODE,SeriesNodePickMode12.EXACT_SHAPE_MATCH],animationResetFns:{...e,label:resetLabelFn2}}),this.NodeEvent=RadialColumnSeriesNodeEvent,this.groupScale=new CategoryScale3,this.circleCache={r:0,cx:0,cy:0}}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===ChartAxisDirection25.X)return e.getDomain(this,"angleValue","key",i);{const o=e.getDomain(this,"radiusValue-end","value",i),s=Number.isFinite(o[1]-o[0])?[o[0]>0?0:o[0],o[1]<0?0:o[1]]:[];return fixNumericExtent5(s)}}async processData(t){const{visible:e}=this,{angleKey:i,radiusKey:o,normalizedTo:s}=this.properties,a=!this.ctx.animationManager.isSkipped();if(!this.properties.isValid())return;const n=this.getStackId(),r=`${n}-trailing`,l=[];isDefined(s)&&l.push(normaliseGroupTo([n,r],Math.abs(s))),a&&this.processedData&&l.push(diff4(this.id,this.processedData)),a&&l.push(animationValidation4());const c=e||!a?{}:{forceValue:0},h=this.axes[ChartAxisDirection25.Y]?.scale.type,d=this.axes[ChartAxisDirection25.X]?.scale.type;await this.requestDataModel(t,this.data,{props:[keyProperty6(i,d,{id:"angleValue"}),valueProperty12(o,h,{id:"radiusValue-raw",invalidValue:null,...c}),...groupAccumulativeValueProperty2(o,"normal","current",{id:"radiusValue-end",rangeId:"radiusValue-range",invalidValue:null,groupId:n,separateNegative:!0,...c},h),...groupAccumulativeValueProperty2(o,"trailing","current",{id:"radiusValue-start",invalidValue:null,groupId:r,separateNegative:!0,...c},h),...l],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,o=this.circleCache;return t!==o.r||e!==o.cx||i!==o.cy?(this.circleCache={r:t,cx:e,cy:i},!0):!1}isRadiusAxisReversed(){return this.axes[ChartAxisDirection25.Y]?.isReversed()}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}getAxisInnerRadius(){const t=this.axes[ChartAxisDirection25.Y];return t instanceof PolarAxis2?this.radius*t.innerRadiusRatio:0}createNodeData(){const{processedData:t,dataModel:e,groupScale:i}=this;if(!e||!t||t.type!=="grouped"||!this.properties.isValid())return;const o=this.axes[ChartAxisDirection25.X],s=this.axes[ChartAxisDirection25.Y],a=o?.scale,n=s?.scale;if(!a||!n)return;const r=e.resolveKeysById(this,"angleValue",t),l=e.resolveColumnById(this,"radiusValue-start",t),c=e.resolveColumnById(this,"radiusValue-end",t),h=e.resolveColumnById(this,"radiusValue-raw",t),d=e.resolveProcessedDataIndexById(this,"radiusValue-range");let u=0,p=0;o instanceof AngleCategoryAxis&&(u=o.groupPaddingInner,p=o.paddingInner);const y=(a.bandwidth??0)*(1-p),{index:f,visibleGroupCount:m}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);i.domain=Array.from({length:m}).map((E,B)=>String(B)),i.range=[-y/2,y/2],i.paddingInner=m>1?u:0;const b=this.isRadiusAxisReversed(),x=b?this.radius:this.getAxisInnerRadius(),S=b?this.getAxisInnerRadius():this.radius,M=S+x,{angleKey:A,radiusKey:v,angleName:k,radiusName:D,label:C}=this.properties,_=(E,B,z,P)=>{const L=this.getLabelText(C,{value:B,datum:E,angleKey:A,radiusKey:v,angleName:k,radiusName:D});if(L)return{x:z,y:P,text:L,textAlign:"center",textBaseline:"middle"}},I=[],T={itemId:v,nodeData:I,labelData:I};if(!this.visible)return T;const{dataSources:O}=t,w=O.get(this.id)??[];for(const{datumIndex:E,group:B}of e.forEachGroupDatum(this,t)){const z=w[E],P=r[E];if(P==null)return;const L=h[E],R=L>=0&&!Object.is(L,-0),V=l[E],F=c[E],G=B.aggregation[d][R?1:0]??0,W=R===b;if(V===void 0||F===void 0)return;let H,U;if(w.length===1)H=-.5*Math.PI,U=1.5*Math.PI;else{const J=a.convert(P);H=normalizeAngle3606(J+i.convert(String(f))),U=normalizeAngle3606(H+i.bandwidth)}const j=H+i.bandwidth/2,$=M-n.convert(V),Z=M-n.convert(F),X=($+Z)/2,K=M-n.convert(0),q=M-n.convert(G),Q=Math.cos(j)*X,Y=Math.sin(j)*X,st=this.properties.label.enabled?_(z,L,Q,Y):void 0,ot=this.getColumnWidth(H,U);I.push({series:this,datum:z,datumIndex:E,point:{x:Q,y:Y,size:0},midPoint:{x:Q,y:Y},label:st,angleValue:P,radiusValue:L,negative:W,innerRadius:$,outerRadius:Z,stackInnerRadius:K,stackOuterRadius:q,startAngle:H,endAngle:U,axisInnerRadius:x,axisOuterRadius:S,columnWidth:ot,index:E})}return{itemId:v,nodeData:I,labelData:I}}getColumnWidth(t,e){return NaN}update({seriesRect:t}){const e=this.checkResize(t);this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updateSectorSelection(this.itemSelection,!1),this.updateSectorSelection(this.highlightSelection,!0),this.updateLabels(),e&&this.animationState.transition("resize"),this.animationState.transition("update")}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset,cornerRadius:e.cornerRadius}}getItemStyleOverrides(t,e,i,o){const{id:s,properties:a}=this,{angleKey:n,radiusKey:r,itemStyler:l}=a;if(l!=null)return this.cachedDatumCallback(createDatumId14(t,o?"highlight":"node"),()=>l({seriesId:s,datum:e,highlighted:o,angleKey:n,radiusKey:r,...i}))}updateSectorSelection(t,e){let i=[];if(e){const s=this.ctx.highlightManager?.getActiveHighlight();s?.datum&&s.series===this&&i.push(s)}else i=this.nodeData;const o=this.getItemBaseStyle(e);t.update(i,void 0,s=>this.getDatumId(s)).each((s,a)=>{const{datum:n,datumIndex:r}=a,l=this.getItemStyleOverrides(String(r),n,o,e);this.updateItemPath(s,a,e),applyShapeStyle6(s,o,l),s.cornerRadius=l?.cornerRadius??o.cornerRadius,s.lineJoin="round"})}updateLabels(){const{label:t}=this.properties;this.labelSelection.update(this.nodeData).each((e,i)=>{t.enabled&&i.label?(e.x=i.label.x,e.y=i.label.y,e.fill=t.color,e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=i.label.text,e.textAlign=i.label.textAlign,e.textBaseline=i.label.textBaseline,e.visible=!0):e.visible=!1})}animateEmptyUpdateReady(){const{labelSelection:t}=this,e=this.getColumnTransitionFunctions();motion4.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],e),seriesLabelFadeInAnimation2(this,"labels",this.ctx.animationManager,t)}animateClearingUpdateEmpty(){const{itemSelection:t}=this,{animationManager:e}=this.ctx,i=this.getColumnTransitionFunctions();motion4.fromToMotion(this.id,"datums",e,[t],i),seriesLabelFadeOutAnimation(this,"labels",e,this.labelSelection)}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,axes:s,properties:a}=this,{angleKey:n,angleName:r,radiusKey:l,radiusName:c,tooltip:h}=a,d=s[ChartAxisDirection25.X],u=s[ChartAxisDirection25.Y];if(!i||!o||!d||!u)return;const{datumIndex:p}=t,g=o.dataSources.get(this.id)?.[p],y=i.resolveKeysById(this,"angleValue",o)[p],f=i.resolveColumnById(this,"radiusValue-raw",o)[p];if(y==null)return;const m=this.getItemBaseStyle(!1);return Object.assign(m,this.getItemStyleOverrides(String(p),p,m,!1)),h.formatTooltip({heading:d.formatDatum(y),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:u.formatDatum(f)}]},{seriesId:e,datum:g,title:r,angleKey:n,angleName:r,radiusKey:l,radiusName:c,...m})}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.itemSelection.nodes())}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:o,strokeWidth:s,lineDash:a,lineDashOffset:n}=this.properties;return{marker:{fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:o,strokeWidth:s,lineDash:a,lineDashOffset:n}}}getLegendData(t){if(!this.properties.isValid()||t!=="category")return[];const{id:e,visible:i}=this,{radiusKey:o,radiusName:s,showInLegend:a}=this.properties;return[{legendType:"category",id:e,itemId:o,seriesId:e,enabled:i,label:{text:s??o},symbol:this.legendItemSymbol(),hideInLegend:!a}]}getDatumId(t){return createDatumId14(t.angleValue)}computeLabelsBBox(){return null}},import_ag_charts_community214=require("ag-charts-community"),{SeriesProperties:SeriesProperties8,SeriesTooltip:SeriesTooltip14,Validate:Validate75,COLOR_STRING:COLOR_STRING21,NUMBER:NUMBER17,FUNCTION:FUNCTION16,LINE_DASH:LINE_DASH17,OBJECT:OBJECT37,POSITIVE_NUMBER:POSITIVE_NUMBER29,RATIO:RATIO25,STRING:STRING34,Label:Label9}=import_ag_charts_community214._ModuleSupport,RadialColumnSeriesBaseProperties=class extends SeriesProperties8{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.label=new Label9,this.tooltip=new SeriesTooltip14}};__decorateClass([Validate75(STRING34)],RadialColumnSeriesBaseProperties.prototype,"angleKey",2),__decorateClass([Validate75(STRING34,{optional:!0})],RadialColumnSeriesBaseProperties.prototype,"angleName",2),__decorateClass([Validate75(STRING34)],RadialColumnSeriesBaseProperties.prototype,"radiusKey",2),__decorateClass([Validate75(STRING34,{optional:!0})],RadialColumnSeriesBaseProperties.prototype,"radiusName",2),__decorateClass([Validate75(COLOR_STRING21)],RadialColumnSeriesBaseProperties.prototype,"fill",2),__decorateClass([Validate75(RATIO25)],RadialColumnSeriesBaseProperties.prototype,"fillOpacity",2),__decorateClass([Validate75(COLOR_STRING21)],RadialColumnSeriesBaseProperties.prototype,"stroke",2),__decorateClass([Validate75(POSITIVE_NUMBER29)],RadialColumnSeriesBaseProperties.prototype,"strokeWidth",2),__decorateClass([Validate75(RATIO25)],RadialColumnSeriesBaseProperties.prototype,"strokeOpacity",2),__decorateClass([Validate75(LINE_DASH17)],RadialColumnSeriesBaseProperties.prototype,"lineDash",2),__decorateClass([Validate75(POSITIVE_NUMBER29)],RadialColumnSeriesBaseProperties.prototype,"lineDashOffset",2),__decorateClass([Validate75(POSITIVE_NUMBER29)],RadialColumnSeriesBaseProperties.prototype,"cornerRadius",2),__decorateClass([Validate75(FUNCTION16,{optional:!0})],RadialColumnSeriesBaseProperties.prototype,"itemStyler",2),__decorateClass([Validate75(NUMBER17)],RadialColumnSeriesBaseProperties.prototype,"rotation",2),__decorateClass([Validate75(STRING34,{optional:!0})],RadialColumnSeriesBaseProperties.prototype,"stackGroup",2),__decorateClass([Validate75(NUMBER17,{optional:!0})],RadialColumnSeriesBaseProperties.prototype,"normalizedTo",2),__decorateClass([Validate75(OBJECT37)],RadialColumnSeriesBaseProperties.prototype,"label",2),__decorateClass([Validate75(OBJECT37)],RadialColumnSeriesBaseProperties.prototype,"tooltip",2);var import_ag_charts_community216=require("ag-charts-community"),import_ag_charts_community215=require("ag-charts-community"),{motion:motion5}=import_ag_charts_community215._ModuleSupport;function createAngleMotionCalculator(){const t={startAngle:new Map,endAngle:new Map},e=["startAngle","endAngle"],i=(n,r,l)=>{e.forEach(c=>{const h=t[c];let d=(l==="removed"||l==="updated"?n:r)[c],u=(l==="removed"?n:r)[c];isNaN(u)&&(u=n.previousDatum?.[c]??NaN);const p=d-u;Math.abs(p)>Math.PI&&(d-=Math.sign(p)*2*Math.PI),h.set(r,{from:d,to:u})})},o=(n,r)=>({startAngle:t.startAngle.get(n)[r],endAngle:t.endAngle.get(n)[r]});return{calculate:i,from:n=>o(n,"from"),to:n=>o(n,"to")}}function fixRadialColumnAnimationStatus(t,e,i){if(i==="updated"){if(t.previousDatum==null||isNaN(t.previousDatum.startAngle)||isNaN(t.previousDatum.endAngle))return"added";if(isNaN(e.startAngle)||isNaN(e.endAngle))return"removed"}return i==="added"&&t.previousDatum!=null?"updated":i}function prepareRadialColumnAnimationFunctions(t){const e=createAngleMotionCalculator();return{toFn:(s,a,n)=>{const{startAngle:r,endAngle:l}=e.to(a);let c,h,d,u,p;return n==="removed"?(c=s.innerRadius,h=s.innerRadius,d=s.columnWidth,u=s.axisInnerRadius,p=s.axisOuterRadius):(c=isNaN(a.innerRadius)?t:a.innerRadius,h=isNaN(a.outerRadius)?t:a.outerRadius,d=isNaN(a.columnWidth)?s.columnWidth:a.columnWidth,u=a.axisInnerRadius,p=a.axisOuterRadius),{innerRadius:c,outerRadius:h,columnWidth:d,axisInnerRadius:u,axisOuterRadius:p,startAngle:r,endAngle:l}},fromFn:(s,a,n)=>{n=fixRadialColumnAnimationStatus(s,a,n),e.calculate(s,a,n);const{startAngle:r,endAngle:l}=e.from(a);let c,h,d,u,p;n==="removed"||n==="updated"?(c=s.innerRadius,h=s.outerRadius,d=s.columnWidth,u=s.axisInnerRadius,p=s.axisOuterRadius):(c=t,h=t,d=a.columnWidth,u=a.axisInnerRadius,p=a.axisOuterRadius);const g=motion5.NODE_UPDATE_STATE_TO_PHASE_MAPPING[n];return{innerRadius:c,outerRadius:h,columnWidth:d,axisInnerRadius:u,axisOuterRadius:p,startAngle:r,endAngle:l,phase:g}}}}function resetRadialColumnSelectionFn(t,{innerRadius:e,outerRadius:i,columnWidth:o,axisInnerRadius:s,axisOuterRadius:a,startAngle:n,endAngle:r}){return{innerRadius:e,outerRadius:i,columnWidth:o,axisInnerRadius:s,axisOuterRadius:a,startAngle:n,endAngle:r}}var{SectorBox,motion:motion6}=import_ag_charts_community216._ModuleSupport;function getRadii(t){const{negative:e,innerRadius:i,outerRadius:o,stackInnerRadius:s,stackOuterRadius:a}=t;return{innerRadius:e?a:s,outerRadius:e?s:a,clipInnerRadius:e?o:i,clipOuterRadius:e?i:o}}function prepareNightingaleAnimationFunctions(t){const e=createAngleMotionCalculator();return{toFn:(s,a,n)=>{const{startAngle:r,endAngle:l}=e.to(a);let c,h,d;if(n==="removed")c=t,h=t,d=new SectorBox(r,l,c,h);else{let u,p;({innerRadius:c,outerRadius:h,clipInnerRadius:u,clipOuterRadius:p}=getRadii(a)),isNaN(c)&&(c=t),isNaN(h)&&(h=t),isNaN(u)&&(u=t),isNaN(p)&&(p=t),d=new SectorBox(r,l,u,p)}return{innerRadius:c,outerRadius:h,startAngle:r,endAngle:l,clipSector:d}},fromFn:(s,a,n)=>{n=fixRadialColumnAnimationStatus(s,a,n),e.calculate(s,a,n);const{startAngle:r,endAngle:l}=e.from(a);let c,h,d;n==="removed"||n==="updated"?(c=s.innerRadius,h=s.outerRadius,d=s.clipSector):(c=t,h=t),d??(d=new SectorBox(r,l,c,h));const u=motion6.NODE_UPDATE_STATE_TO_PHASE_MAPPING[n];return{innerRadius:c,outerRadius:h,startAngle:r,endAngle:l,clipSector:d,phase:u}}}}function resetNightingaleSelectionFn(t,e){const{startAngle:i,endAngle:o}=e,{innerRadius:s,outerRadius:a,clipInnerRadius:n,clipOuterRadius:r}=getRadii(e),l=new SectorBox(i,o,n,r);return{innerRadius:s,outerRadius:a,startAngle:i,endAngle:o,clipSector:l}}var{Sector:Sector4,SectorBox:SectorBox2,PolarZIndexMap}=import_ag_charts_community217._ModuleSupport,NightingaleSeries=class extends RadialColumnSeriesBase{constructor(t){super(t,{animationResetFns:{item:resetNightingaleSelectionFn}}),this.properties=new RadialColumnSeriesBaseProperties}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[0,PolarZIndexMap.FOREGROUND,t],this.highlightGroup.zIndex=[0,PolarZIndexMap.HIGHLIGHT,t],this.labelGroup.zIndex=[0,PolarZIndexMap.LABEL,t],!0):!1}getStackId(){return`nightingale-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new Sector4}updateItemPath(t,e,i){const{negative:o}=e;if(t.centerX=0,t.centerY=0,t.startOuterCornerRadius=o?0:this.properties.cornerRadius,t.endOuterCornerRadius=o?0:this.properties.cornerRadius,t.startInnerCornerRadius=o?this.properties.cornerRadius:0,t.endInnerCornerRadius=o?this.properties.cornerRadius:0,i){const{startAngle:s,endAngle:a}=e,{innerRadius:n,outerRadius:r,clipInnerRadius:l,clipOuterRadius:c}=getRadii(e);t.innerRadius=n,t.outerRadius=r,t.startAngle=s,t.endAngle=a,t.clipSector=new SectorBox2(s,a,l,c)}}getColumnTransitionFunctions(){const t=this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius();return prepareNightingaleAnimationFunctions(t)}};NightingaleSeries.className="NightingaleSeries",NightingaleSeries.type="nightingale";var import_ag_charts_community218=require("ag-charts-community"),{ThemeConstants:{POLAR_AXIS_TYPE,POLAR_AXIS_SHAPE}}=import_ag_charts_community218._ModuleSupport,NIGHTINGALE_SERIES_THEME={series:{strokeWidth:1,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},axes:{[POLAR_AXIS_TYPE.ANGLE_CATEGORY]:{shape:POLAR_AXIS_SHAPE.CIRCLE,groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[POLAR_AXIS_TYPE.RADIUS_NUMBER]:{shape:POLAR_AXIS_SHAPE.CIRCLE}}},{ThemeSymbols:{DEFAULT_POLAR_SERIES_STROKE},ThemeConstants:{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE2}}=import_ag_charts_community219._ModuleSupport,NightingaleModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"nightingale",moduleFactory:t=>new NightingaleSeries(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:POLAR_AXIS_TYPE2.ANGLE_CATEGORY},{type:POLAR_AXIS_TYPE2.RADIUS_NUMBER}],themeTemplate:NIGHTINGALE_SERIES_THEME,paletteFactory({takeColors:t,userPalette:e}){const{fills:[i],strokes:[o]}=t(1);return{fill:i,stroke:e!=="inbuilt"?o:DEFAULT_POLAR_SERIES_STROKE}},stackable:!0,groupable:!0,stackedByDefault:!0},import_ag_charts_community221=require("ag-charts-community"),import_ag_charts_community220=require("ag-charts-community"),{createDatumId:createDatumId15}=import_ag_charts_community220._ModuleSupport,OhlcSeries=class extends OhlcSeriesBase{constructor(){super(...arguments),this.properties=new OhlcSeriesProperties}nodeFactory(){return new OhlcNode}updateDatumNodes({datumSelection:t,isHighlight:e}){const{id:i,properties:o}=this,{xKey:s,highKey:a,lowKey:n,openKey:r,closeKey:l,item:c,itemStyler:h}=o,{up:d,down:u}=c,{stroke:p,strokeWidth:g,strokeOpacity:y,lineDash:f,lineDashOffset:m}=d,{stroke:b,strokeWidth:x,strokeOpacity:S,lineDash:M,lineDashOffset:A}=u,v=e?o.highlightStyle.item:void 0;t.each((k,D)=>{const{isRising:C,centerX:_,width:I,y:T,height:O,yOpen:w,yClose:E,crisp:B}=D;let z;if(h!=null){const{stroke:P,strokeWidth:L,strokeOpacity:R,lineDash:V,lineDashOffset:F}=C?d:u;z=this.cachedDatumCallback(createDatumId15(this.getDatumId(D),e?"highlight":"node"),()=>h({seriesId:i,itemId:D.itemId,xKey:s,highKey:a,lowKey:n,openKey:r,closeKey:l,datum:D.datum,strokeOpacity:R,stroke:P,strokeWidth:L,lineDash:V,lineDashOffset:F,highlighted:e}))}k.centerX=_,k.width=I,k.y=T,k.height=O,k.yOpen=w,k.yClose=E,k.crisp=B,k.stroke=v?.stroke??z?.stroke??(C?p:b),k.strokeWidth=v?.strokeWidth??z?.strokeWidth??(C?g:x),k.strokeOpacity=v?.strokeOpacity??z?.strokeOpacity??(C?y:S),k.lineDash=v?.lineDash??z?.lineDash??(C?f:M),k.lineDashOffset=v?.lineDashOffset??z?.lineDashOffset??(C?m:A),k.strokeAlignment=(z?.strokeWidth??(C?g:x))/2})}getLegendData(t){const{id:e,data:i,ctx:{legendManager:o},visible:s}=this,{xKey:a,yName:n,item:{up:r,down:l},showInLegend:c,legendItemName:h}=this.properties;if(!i?.length||!a||t!=="category")return[];const d=new import_ag_charts_community220._ModuleSupport.LinearGradient("rgb",[{color:r.stroke,offset:0},{color:r.stroke,offset:.5},{color:l.stroke,offset:.5}],90);return[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:s&&o.getItemEnabled({seriesId:e,itemId:e}),label:{text:h??n??e},symbol:{marker:{fill:d,fillOpacity:r.strokeOpacity,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}},legendItemName:h,hideInLegend:!c}]}};OhlcSeries.className="ohlc",OhlcSeries.type="ohlc";var{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE9,CARTESIAN_POSITION:CARTESIAN_POSITION5}=import_ag_charts_community221._ModuleSupport.ThemeConstants,OhlcModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ohlc",moduleFactory:t=>new OhlcSeries(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:CARTESIAN_AXIS_TYPE9.NUMBER,position:CARTESIAN_POSITION5.LEFT},{type:CARTESIAN_AXIS_TYPE9.ORDINAL_TIME,position:CARTESIAN_POSITION5.BOTTOM}],themeTemplate:{animation:{enabled:!1},axes:{[CARTESIAN_AXIS_TYPE9.NUMBER]:{crosshair:{snap:!1}},[CARTESIAN_AXIS_TYPE9.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},groupable:!1,paletteFactory:({takeColors:t,colorsCount:e,userPalette:i,palette:o})=>{if(i==="user-indexed"){const[s]=t(e).strokes;return{item:{up:{stroke:s},down:{stroke:s}}}}return{item:{up:{stroke:o.up.stroke},down:{stroke:o.down.stroke}}}}},import_ag_charts_community225=require("ag-charts-community"),import_ag_charts_community223=require("ag-charts-community"),import_ag_charts_community222=require("ag-charts-community"),{SeriesProperties:SeriesProperties9,SeriesTooltip:SeriesTooltip15,Validate:Validate76,UNION:UNION15,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY10,FUNCTION:FUNCTION17,DIRECTION:DIRECTION2,BOOLEAN:BOOLEAN30,LINE_DASH:LINE_DASH18,OBJECT:OBJECT38,NUMBER:NUMBER18,POSITIVE_NUMBER:POSITIVE_NUMBER30,RATIO:RATIO26,STRING:STRING35,Label:Label10,DropShadow:DropShadow2}=import_ag_charts_community222._ModuleSupport,PyramidSeriesLabel=class extends Label10{},PyramidSeriesStageLabel=class extends Label10{constructor(){super(...arguments),this.spacing=0}};__decorateClass([Validate76(NUMBER18)],PyramidSeriesStageLabel.prototype,"spacing",2),__decorateClass([Validate76(UNION15(["before","after"],"a placement"))],PyramidSeriesStageLabel.prototype,"placement",2);var PyramidProperties=class extends SeriesProperties9{constructor(){super(...arguments),this.fills=[],this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.direction="vertical",this.reverse=void 0,this.spacing=0,this.aspectRatio=void 0,this.shadow=new DropShadow2().set({enabled:!1}),this.label=new PyramidSeriesLabel,this.stageLabel=new PyramidSeriesStageLabel,this.tooltip=new SeriesTooltip15}};__decorateClass([Validate76(STRING35)],PyramidProperties.prototype,"stageKey",2),__decorateClass([Validate76(STRING35)],PyramidProperties.prototype,"valueKey",2),__decorateClass([Validate76(COLOR_STRING_ARRAY10)],PyramidProperties.prototype,"fills",2),__decorateClass([Validate76(RATIO26)],PyramidProperties.prototype,"fillOpacity",2),__decorateClass([Validate76(COLOR_STRING_ARRAY10)],PyramidProperties.prototype,"strokes",2),__decorateClass([Validate76(POSITIVE_NUMBER30)],PyramidProperties.prototype,"strokeWidth",2),__decorateClass([Validate76(RATIO26)],PyramidProperties.prototype,"strokeOpacity",2),__decorateClass([Validate76(LINE_DASH18)],PyramidProperties.prototype,"lineDash",2),__decorateClass([Validate76(POSITIVE_NUMBER30)],PyramidProperties.prototype,"lineDashOffset",2),__decorateClass([Validate76(DIRECTION2)],PyramidProperties.prototype,"direction",2),__decorateClass([Validate76(BOOLEAN30,{optional:!0})],PyramidProperties.prototype,"reverse",2),__decorateClass([Validate76(POSITIVE_NUMBER30)],PyramidProperties.prototype,"spacing",2),__decorateClass([Validate76(POSITIVE_NUMBER30,{optional:!0})],PyramidProperties.prototype,"aspectRatio",2),__decorateClass([Validate76(FUNCTION17,{optional:!0})],PyramidProperties.prototype,"itemStyler",2),__decorateClass([Validate76(OBJECT38)],PyramidProperties.prototype,"shadow",2),__decorateClass([Validate76(OBJECT38)],PyramidProperties.prototype,"label",2),__decorateClass([Validate76(OBJECT38)],PyramidProperties.prototype,"stageLabel",2),__decorateClass([Validate76(OBJECT38)],PyramidProperties.prototype,"tooltip",2);var{valueProperty:valueProperty13,SeriesNodePickMode:SeriesNodePickMode13,CachedTextMeasurerPool:CachedTextMeasurerPool10,TextUtils:TextUtils7,createDatumId:createDatumId16,BBox:BBox16,Group:Group16,Selection:Selection12,Text:Text6,PointerEvents:PointerEvents7,applyShapeStyle:applyShapeStyle7}=import_ag_charts_community223._ModuleSupport,PyramidSeries=class extends import_ag_charts_community223._ModuleSupport.DataModelSeries{constructor(t){super({moduleCtx:t,pickModes:[SeriesNodePickMode13.EXACT_SHAPE_MATCH,SeriesNodePickMode13.NEAREST_NODE]}),this.properties=new PyramidProperties,this.itemGroup=this.contentGroup.appendChild(new Group16({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Group16({name:"itemLabelGroup"})),this.stageLabelGroup=this.contentGroup.appendChild(new Group16({name:"stageLabelGroup"})),this.datumSelection=Selection12.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=Selection12.select(this.itemLabelGroup,Text6),this.stageLabelSelection=Selection12.select(this.stageLabelGroup,Text6),this.highlightDatumSelection=Selection12.select(this.highlightNode,()=>this.nodeFactory()),this.itemLabelGroup.pointerEvents=PointerEvents7.None,this.stageLabelGroup.pointerEvents=PointerEvents7.None}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",t=>this.onLegendItemClick(t)))}nodeFactory(){return new FunnelConnector}getNodeData(){return this.contextNodeData?.nodeData}async processData(t){if(this.data==null||!this.properties.isValid())return;const{id:e,visible:i,ctx:{legendManager:o}}=this,{stageKey:s,valueKey:a}=this.properties,n="band",r="number",l=(h,d,u)=>i&&o.getItemEnabled({seriesId:e,itemId:u}),c=this.visible?{}:{forceValue:0};await this.requestDataModel(t,this.data,{props:[valueProperty13(s,n,{id:"xValue"}),valueProperty13(a,r,{id:"yValue",...c,validation:l,invalidValue:0})]})}createNodeData(){const{id:t,dataModel:e,processedData:i,properties:o,visible:s,ctx:{legendManager:a}}=this,{stageKey:n,valueKey:r,direction:l,reverse:c=l==="horizontal",spacing:h,aspectRatio:d,label:u,stageLabel:p}=o;if(e==null||i==null)return;const g=l==="horizontal",y=e.resolveColumnById(this,"xValue",i),f=e.resolveColumnById(this,"yValue",i),m=CachedTextMeasurerPool10.getMeasurer({font:p.getFont()});let b,x;g?(b="center",x=p.placement==="before"?"bottom":"top"):(b=p.placement==="after"?"left":"right",x="middle");const S=p.enabled?[]:void 0;let M=0,A=0,v=0;const k=i.dataSources.get(this.id)??[];k.forEach((L,R)=>{const V=y[R],F=f[R],G=s&&a.getItemEnabled({seriesId:t,itemId:R});if(v+=F,S==null)return;const W=this.getLabelText(this.properties.stageLabel,{datum:L,value:V,stageKey:n,valueKey:r}),{width:H}=m.measureText(W),U=W.split(` `).length*TextUtils7.getLineHeight(u.fontSize);M=Math.max(M,H),A=Math.max(A,U),S.push({x:NaN,y:NaN,text:W,textAlign:b,textBaseline:x,visible:G})});const D=this._nodeDataDependencies?.seriesRectWidth??0,C=this._nodeDataDependencies?.seriesRectHeight??0,_=h*(i.input.count-1);let I;if(g){const L=A+p.spacing;I=new BBox16(0,p.placement==="before"?L:0,D,C-L)}else{const L=M+p.spacing;I=new BBox16(p.placement==="after"?0:L,0,D-L,C)}if(d!=null&&d!==0){const L=l==="horizontal"?1/d:d,R=Math.min(I.width,I.height*L),V=R/L;I=new BBox16(I.x+(I.width-R)/2,I.y+(I.height-V)/2,R,V)}let T,O;g?O=p.placement==="before"?I.y-p.spacing:I.y+I.height+p.spacing:T=p.placement==="after"?I.x+I.width+p.spacing:I.x-p.spacing;const w=I.width-(g?_:0),E=I.height-(g?0:_);if(w<0||E<0)return;const B=[],z=[];let P=0;return k.forEach((L,R)=>{const V=y[R],F=f[R],G=s&&a.getItemEnabled({seriesId:t,itemId:R}),W=P+F,H=(P+W)/(2*v),U=(W-P)/v,j=g?w*H+h*R:w*.5,$=g?E*.5:E*H+h*R,Z=I.x+j,X=I.y+$;if(S!=null){const J=S[R];J.x=T??Z,J.y=O??X}let K,q,Q,Y;if(g){const J=w*U;K=J,Q=J;const tt=(j+J/2)*(E/I.width),et=(j-J/2)*(E/I.width);q=c?I.height-tt:tt,Y=c?I.height-et:et}else{const J=E*U;q=J,Y=J;const tt=($-J/2)*(w/I.height),et=($+J/2)*(w/I.height);K=c?I.width-tt:tt,Q=c?I.width-et:et}const st=this.getLabelText(u,{datum:L,value:F,stageKey:n,valueKey:r}),ot={x:Z,y:X,text:st,textAlign:"center",textBaseline:"middle",visible:G};z.push(ot),B.push({series:this,itemId:r,datum:L,datumIndex:R,index:R,xValue:V,yValue:F,x:Z,y:X,top:K,right:q,bottom:Q,left:Y,label:ot,enabled:G,midPoint:{x:Z,y:X}}),P=W}),{itemId:t,nodeData:B,labelData:z,stageLabelData:S}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update({seriesRect:t}){this.checkResize(t);const{datumSelection:e,labelSelection:i,stageLabelSelection:o,highlightDatumSelection:s}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let a=this.ctx.highlightManager?.getActiveHighlight();a!=null&&(a.series!==this||a.datum==null)&&(a=void 0);const n=this.contextNodeData?.nodeData??[],r=this.contextNodeData?.labelData??[],l=this.contextNodeData?.stageLabelData??[];this.datumSelection=this.updateDatumSelection({nodeData:n,datumSelection:e}),this.updateDatumNodes({datumSelection:e,isHighlight:!1}),this.labelSelection=this.updateLabelSelection({labelData:r,labelSelection:i}),this.updateLabelNodes({labelSelection:i,labelProperties:this.properties.label}),this.stageLabelSelection=this.updateStageLabelSelection({stageLabelData:l,stageLabelSelection:o}),this.updateLabelNodes({labelSelection:o,labelProperties:this.properties.stageLabel}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:a!=null?[a]:[],datumSelection:s}),this.updateDatumNodes({datumSelection:s,isHighlight:!0})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData)}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{fill:i?.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset}}getItemStyleOverrides(t,e,i,o,s){const{id:a,properties:n}=this,{fills:r,strokes:l,stageKey:c,valueKey:h,itemStyler:d}=n,u=o.fill??r[i%r.length],p=o.stroke??l[i%l.length],g={};if(s||(g.fill=u,g.stroke=p),d!=null){const y=this.cachedDatumCallback(createDatumId16(t,s?"highlight":"node"),()=>d({seriesId:a,datum:e,stageKey:c,valueKey:h,highlighted:s,fill:u,stroke:p,...o}));Object.assign(g,y)}return g}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,{properties:o}=this,{shadow:s}=o,a=this.getItemBaseStyle(i);e.each((n,r)=>{const{datumIndex:l,datum:c,x:h,y:d,top:u,right:p,bottom:g,left:y}=r,f=this.getItemStyleOverrides(String(l),c,l,a,i);n.x0=h-u/2,n.x1=h+u/2,n.x2=h+g/2,n.x3=h-g/2,n.y0=d-y/2,n.y1=d-p/2,n.y2=d+p/2,n.y3=d+y/2,applyShapeStyle7(n,a,f),n.fillShadow=s})}updateLabelSelection(t){return t.labelSelection.update(this.properties.label.enabled?t.labelData:[])}updateStageLabelSelection(t){return t.stageLabelSelection.update(t.stageLabelData)}updateLabelNodes(t){const{labelSelection:e,labelProperties:i}=t,{color:o,fontSize:s,fontStyle:a,fontWeight:n,fontFamily:r}=i;e.each((l,{visible:c,x:h,y:d,text:u,textAlign:p,textBaseline:g})=>{l.visible=c,l.x=h,l.y=d,l.text=u,l.fill=o,l.fontStyle=a,l.fontWeight=n,l.fontSize=s,l.fontFamily=r,l.textAlign=p,l.textBaseline=g})}resetAnimation(t){}computeFocusBounds(t){const e=this.getNodeData()?.[t.datumIndex];if(e!==void 0){for(const i of this.datumSelection)if(i.datum===e)return i.node}}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,properties:s}=this,{stageKey:a,valueKey:n,tooltip:r}=s;if(!i||!o)return;const{datumIndex:l}=t,c=o.dataSources.get(this.id)?.[l],h=i.resolveColumnById(this,"xValue",o)[l],d=i.resolveColumnById(this,"yValue",o)[l];if(h==null)return;const u=this.getLabelText(this.properties.stageLabel,{datum:o.dataSources.get(this.id)?.[l],value:d,stageKey:a,valueKey:n}),p=this.getItemBaseStyle(!1);return Object.assign(p,this.getItemStyleOverrides(String(l),l,l,p,!1)),r.formatTooltip({symbol:this.legendItemSymbol(l),data:[{label:String(h),value:u}]},{seriesId:e,datum:c,title:void 0,stageKey:a,valueKey:n,...p})}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}pickNodeClosestDatum({x:t,y:e}){let i=1/0,o;return this.datumSelection.each((s,a)=>{const n=s.distanceSquared(t,e);n{const u=l[d];r.push({legendType:"category",id:o,itemId:d,seriesId:o,enabled:a&&s.getItemEnabled({seriesId:o,itemId:d}),label:{text:u},symbol:this.legendItemSymbol(d),hideInLegend:!n})}),r}};PyramidSeries.className="PyramidSeries",PyramidSeries.type="pyramid";var import_ag_charts_community224=require("ag-charts-community"),{ThemeSymbols:{DEFAULT_SHADOW_COLOUR:DEFAULT_SHADOW_COLOUR2}}=import_ag_charts_community224._ModuleSupport,PYRAMID_SERIES_THEME={series:{direction:"vertical",strokeWidth:0,spacing:2,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}},stageLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:12},shadow:{enabled:!1,color:DEFAULT_SHADOW_COLOUR2,xOffset:3,yOffset:3,blur:5}}},PyramidModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["standalone"],identifier:"pyramid",moduleFactory:t=>new PyramidSeries(t),solo:!0,tooltipDefaults:{range:"exact"},themeTemplate:PYRAMID_SERIES_THEME,paletteFactory:({takeColors:t,colorsCount:e})=>{const{fills:i,strokes:o}=t(e);return{fills:i,strokes:o}}},import_ag_charts_community231=require("ag-charts-community"),import_ag_charts_community226=require("ag-charts-community"),{ThemeConstants:{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE3}}=import_ag_charts_community226._ModuleSupport,BASE_RADAR_SERIES_THEME={series:{label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},marker:{enabled:!0,fillOpacity:1,shape:"circle",size:6,strokeOpacity:1,strokeWidth:0}},axes:{[POLAR_AXIS_TYPE3.ANGLE_CATEGORY]:{label:{spacing:10}}}},RADAR_LINE_SERIES_THEME=import_ag_charts_community226._ModuleSupport.mergeDefaults({series:{strokeWidth:2}},BASE_RADAR_SERIES_THEME),RADAR_AREA_SERIES_THEME=import_ag_charts_community226._ModuleSupport.mergeDefaults({series:{fillOpacity:.8,strokeWidth:2,marker:{enabled:!1}}},BASE_RADAR_SERIES_THEME),import_ag_charts_community230=require("ag-charts-community"),import_ag_charts_community228=require("ag-charts-community"),import_ag_charts_community227=require("ag-charts-community"),{Label:Label11,SeriesMarker,SeriesProperties:SeriesProperties10,SeriesTooltip:SeriesTooltip16,Validate:Validate77,BOOLEAN:BOOLEAN31,COLOR_STRING:COLOR_STRING22,NUMBER:NUMBER19,LINE_DASH:LINE_DASH19,OBJECT:OBJECT39,POSITIVE_NUMBER:POSITIVE_NUMBER31,RATIO:RATIO27,STRING:STRING36}=import_ag_charts_community227._ModuleSupport,RadarSeriesProperties=class extends SeriesProperties10{constructor(){super(...arguments),this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.rotation=0,this.marker=new SeriesMarker,this.label=new Label11,this.tooltip=new SeriesTooltip16,this.connectMissingData=!1}};__decorateClass([Validate77(STRING36)],RadarSeriesProperties.prototype,"angleKey",2),__decorateClass([Validate77(STRING36)],RadarSeriesProperties.prototype,"radiusKey",2),__decorateClass([Validate77(STRING36,{optional:!0})],RadarSeriesProperties.prototype,"angleName",2),__decorateClass([Validate77(STRING36,{optional:!0})],RadarSeriesProperties.prototype,"radiusName",2),__decorateClass([Validate77(COLOR_STRING22)],RadarSeriesProperties.prototype,"stroke",2),__decorateClass([Validate77(POSITIVE_NUMBER31)],RadarSeriesProperties.prototype,"strokeWidth",2),__decorateClass([Validate77(RATIO27)],RadarSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([Validate77(LINE_DASH19)],RadarSeriesProperties.prototype,"lineDash",2),__decorateClass([Validate77(POSITIVE_NUMBER31)],RadarSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([Validate77(NUMBER19)],RadarSeriesProperties.prototype,"rotation",2),__decorateClass([Validate77(OBJECT39)],RadarSeriesProperties.prototype,"marker",2),__decorateClass([Validate77(OBJECT39)],RadarSeriesProperties.prototype,"label",2),__decorateClass([Validate77(OBJECT39)],RadarSeriesProperties.prototype,"tooltip",2),__decorateClass([Validate77(BOOLEAN31)],RadarSeriesProperties.prototype,"connectMissingData",2);var{ChartAxisDirection:ChartAxisDirection26,PolarAxis:PolarAxis3,SeriesNodePickMode:SeriesNodePickMode14,valueProperty:valueProperty14,fixNumericExtent:fixNumericExtent6,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation3,markerFadeInAnimation,resetMarkerFn,animationValidation:animationValidation5,computeMarkerFocusBounds:computeMarkerFocusBounds2,extent,isNumberEqual:isNumberEqual9,createDatumId:createDatumId17,BBox:BBox17,Group:Group17,Path:Path11,PointerEvents:PointerEvents8,Selection:Selection13,Text:Text7,Marker:Marker4,applyShapeStyle:applyShapeStyle8}=import_ag_charts_community228._ModuleSupport,RadarSeriesNodeEvent=class extends import_ag_charts_community228._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o),this.angleKey=o.properties.angleKey,this.radiusKey=o.properties.radiusKey}},RadarSeries=class extends import_ag_charts_community228._ModuleSupport.PolarSeries{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[SeriesNodePickMode14.NEAREST_NODE,SeriesNodePickMode14.EXACT_SHAPE_MATCH],canHaveAxes:!0,animationResetFns:{item:resetMarkerFn}}),this.clipFocusBox=!1,this.properties=new RadarSeriesProperties,this.NodeEvent=RadarSeriesNodeEvent,this.lineGroup=this.contentGroup.appendChild(new Group17({name:"radar-line",zIndex:import_ag_charts_community228._ModuleSupport.SeriesZIndexMap.ANY_CONTENT})),this.lineSelection=Selection13.select(this.lineGroup,Path11),this.resetInvalidToZero=!1,this.circleCache={r:0,cx:0,cy:0}}nodeFactory(){return new Marker4}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.lineGroup.zIndex=[import_ag_charts_community228._ModuleSupport.SeriesZIndexMap.ANY_CONTENT,t,import_ag_charts_community228._ModuleSupport.SeriesContentZIndexMap.FOREGROUND,1],!0):!1}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===ChartAxisDirection26.X)return e.getDomain(this,"angleValue","value",i);{const o=e.getDomain(this,"radiusValue","value",i),s=extent(o.length===0?o:[0].concat(o));return fixNumericExtent6(s)}}async processData(t){if(!this.properties.isValid())return;const{angleKey:e,radiusKey:i}=this.properties,o=[];this.ctx.animationManager.isSkipped()||o.push(animationValidation5());const s=this.axes[ChartAxisDirection26.Y]?.scale.type,a=this.axes[ChartAxisDirection26.X]?.scale.type;await this.requestDataModel(t,this.data,{props:[valueProperty14(e,a,{id:"angleValue"}),valueProperty14(i,s,{id:"radiusValue",invalidValue:void 0}),...o]}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,o=this.circleCache;return t===o.r&&e===o.cx&&i===o.cy?!1:(this.circleCache={r:t,cx:e,cy:i},!0)}getAxisInnerRadius(){const t=this.axes[ChartAxisDirection26.Y];return t instanceof PolarAxis3?this.radius*t.innerRadiusRatio:0}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}createNodeData(){const{processedData:t,dataModel:e}=this;if(!t||!e||!this.properties.isValid())return;const{angleKey:i,radiusKey:o,angleName:s,radiusName:a,marker:n,label:r}=this.properties,l=this.axes[ChartAxisDirection26.X]?.scale,c=this.axes[ChartAxisDirection26.Y]?.scale;if(!l||!c)return;const h=e.resolveColumnById(this,"angleValue",t),d=e.resolveColumnById(this,"radiusValue",t),u=this.getAxisInnerRadius(),g=(t.dataSources.get(this.id)??[]).map((y,f)=>{const m=h[f],b=d[f],x=l.convert(m),S=this.radius+u-c.convert(b),M=Math.cos(x),A=Math.sin(x),v=M*S,k=A*S;let D;if(r.enabled){const C=this.getLabelText(r,{value:b,datum:y,angleKey:i,radiusKey:o,angleName:s,radiusName:a});if(C){let _="right";isNumberEqual9(M,0)?_="center":M>0&&(_="left");let I="bottom";isNumberEqual9(A,0)?I="middle":A>0&&(I="top"),D={x:v+M*n.size,y:k+A*n.size,text:C,textAlign:_,textBaseline:I}}}return{series:this,datum:y,datumIndex:f,index:f,point:{x:v,y:k,size:n.size},midPoint:{x:v,y:k},label:D,angleValue:m,radiusValue:b,missing:!isFiniteNumber(x)||!isFiniteNumber(S)}});return{itemId:o,nodeData:g,labelData:g}}update({seriesRect:t}){const e=this.checkResize(t),i=!this.ctx.animationManager.isSkipped(),{series:o}=this.ctx.highlightManager?.getActiveHighlight()??{};this.highlightGroup.visible=(i||this.visible)&&o===this,this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updatePathSelections(),this.updateMarkerSelection(),this.updateMarkers(this.itemSelection,!1),this.updateMarkers(this.highlightSelection,!0),this.updateLabels(),e&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePathSelections(){const t=this.visible?[!0]:[];this.lineSelection.update(t)}updateMarkerSelection(){this.properties.marker.isDirty()&&(this.itemSelection.clear(),this.itemSelection.cleanup(),this.itemSelection=Selection13.select(this.itemGroup,()=>this.nodeFactory(),!1)),this.itemSelection.update(this.properties.marker.enabled?this.nodeData:[])}getMarkerFill(t){return t?.fill??this.properties.marker.fill}getMarkerItemBaseStyle(t){const{properties:e}=this,{marker:i}=e,o=t?e.highlightStyle.item:void 0;return{shape:i.shape,size:i.size,fill:o?.fill??i.fill,fillOpacity:o?.fillOpacity??i.fillOpacity,stroke:o?.stroke??i.stroke,strokeWidth:o?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:o?.strokeOpacity??i.strokeOpacity,lineDash:o?.lineDash??i.lineDash,lineDashOffset:o?.lineDashOffset??i.lineDashOffset}}getMarkerItemStyleOverrides(t,e,i,o){const{id:s,properties:a}=this,{angleKey:n,radiusKey:r,marker:l}=a,{itemStyler:c}=l;if(c!=null)return this.cachedDatumCallback(createDatumId17(t,o?"highlight":"node"),()=>c({seriesId:s,datum:e,angleKey:n,radiusKey:r,highlighted:o,...i}))}updateMarkers(t,e){const{visible:i}=this,{marker:o}=this.properties;let s=[];if(i&&o.shape&&o.enabled)if(e){const n=this.ctx.highlightManager?.getActiveHighlight();n?.datum&&(s=[n])}else s=this.nodeData;const a=this.getMarkerItemBaseStyle(e);t.update(s).each((n,r)=>{const{datum:l,datumIndex:c,point:h}=r,d=this.getMarkerItemStyleOverrides(String(c),l,a,e);applyShapeStyle8(n,a,d),n.shape=d?.shape??a.shape,n.size=d?.size??a.size;const{x:u,y:p}=h;n.x=u,n.y=p,n.visible=i&&n.size>0&&!isNaN(u)&&!isNaN(p)})}updateLabels(){const{label:t}=this.properties;this.labelSelection.update(this.nodeData).each((e,i)=>{t.enabled&&i.label?(e.x=i.label.x,e.y=i.label.y,e.fill=t.color,e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=i.label.text,e.textAlign=i.label.textAlign,e.textBaseline=i.label.textBaseline,e.visible=!0):e.visible=!1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,axes:s,properties:a}=this,{angleKey:n,angleName:r,radiusKey:l,radiusName:c,tooltip:h}=a,d=s[ChartAxisDirection26.X],u=s[ChartAxisDirection26.Y];if(!i||!o||!d||!u)return;const{datumIndex:p}=t,g=o.dataSources.get(this.id)?.[p],y=i.resolveColumnById(this,"angleValue",o)[p],f=i.resolveColumnById(this,"radiusValue",o)[p];if(y==null)return;const m=this.getMarkerItemBaseStyle(!1);return Object.assign(m,this.getMarkerItemStyleOverrides(String(p),p,m,!1)),h.formatTooltip({heading:d.formatDatum(y),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:u.formatDatum(f)}]},{seriesId:e,datum:g,title:r,angleKey:n,radiusKey:l,angleName:r,radiusName:c,...m})}legendItemSymbol(){const{stroke:t,strokeWidth:e,strokeOpacity:i,lineDash:o,marker:s}=this.properties;return{marker:{shape:s.shape,fill:this.getMarkerFill()??s.stroke??t??"rgba(0, 0, 0, 0)",stroke:s.stroke??t??"rgba(0, 0, 0, 0)",fillOpacity:s.fillOpacity,strokeOpacity:s.strokeOpacity,strokeWidth:s.strokeWidth,lineDash:s.lineDash,lineDashOffset:s.lineDashOffset,enabled:s.enabled||e<=0},line:{stroke:t,strokeOpacity:i,strokeWidth:e,lineDash:o}}}getLegendData(t){if(!this.properties.isValid()||t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:o}=this,{radiusKey:s,radiusName:a,showInLegend:n}=this.properties;return[{legendType:"category",id:e,itemId:s,seriesId:e,enabled:o&&i.getItemEnabled({seriesId:e,itemId:s}),label:{text:a??s},symbol:this.legendItemSymbol(),hideInLegend:!n}]}pickNodeClosestDatum(t){const{nodeData:e,centerX:i,centerY:o}=this,{x:s,y:a}=t,n=this.radius;if(Math.sqrt((s-i)**2+(a-o)**2)>n+this.properties.marker.size)return;let l=1/0,c;for(const h of e){const{point:{x:d=NaN,y:u=NaN}={}}=h;if(isNaN(d)||isNaN(u))continue;const p=Math.sqrt((t.x-d-i)**2+(t.y-u-o)**2);p{if(!t.enabled||!o.label)return;i.text=o.label.text,i.x=o.label.x,i.y=o.label.y,i.setFont(t),i.setAlign(o.label);const s=i.getBBox();e.push(s)}),e.length===0?null:BBox17.merge(e)}getLineNode(){return this.lineSelection?.at(0)}beforePathAnimation(){const t=this.getLineNode();t&&(t.fill=void 0,t.lineJoin="round",t.lineCap="round",t.pointerEvents=PointerEvents8.None,t.stroke=this.properties.stroke,t.strokeWidth=this.getStrokeWidth(this.properties.strokeWidth),t.strokeOpacity=this.properties.strokeOpacity,t.lineDash=this.properties.lineDash,t.lineDashOffset=this.properties.lineDashOffset)}getLinePoints(){const{nodeData:t,resetInvalidToZero:e}=this,{connectMissingData:i}=this.properties;if(t.length===0)return[];const o=this.axes[ChartAxisDirection26.Y],a=this.axes[ChartAxisDirection26.X]?.isReversed(),r=o?.isReversed()&&!a?[...t].reverse():t,l=[];let c=!1,h;return r.forEach((d,u)=>{let{x:p,y:g}=d.point;const y=isNaN(p)||isNaN(g);y||(h??(h=d)),y&&!i&&(p=0,g=0);const f=u===0||!e&&!i&&(y||c);l.push({x:p,y:g,moveTo:f}),c=y}),h!==void 0&&l.push({x:h.point.x,y:h.point.y,moveTo:!1}),l}animateSinglePath(t,e,i){const{path:o}=t;o.clear(!0);const s=this.getAxisInnerRadius(),a=this.axes[ChartAxisDirection26.Y],r=a?.isReversed()?this.radius+s-a?.scale.convert(0):s;e.forEach(l=>{const{x:c,y:h,arc:d,radius:u=0,startAngle:p=0,endAngle:g=0,moveTo:y}=l,f=Math.atan2(h,c),m=r*Math.cos(f),b=r*Math.sin(f),x=i,S=m*(1-x)+c*x,M=b*(1-x)+h*x;d?o.arc(c,h,u,p,g):y?o.moveTo(S,M):o.lineTo(S,M)}),t.checkPathDirty()}animatePaths(t){const e=this.getLinePoints(),i=this.getLineNode();i&&this.animateSinglePath(i,e,t)}animateEmptyUpdateReady(){const{itemSelection:t,labelSelection:e}=this,{animationManager:i}=this.ctx;this.beforePathAnimation(),i.animate({id:`${this.id}_'path`,groupId:this.id,from:0,to:1,phase:"initial",collapsable:!1,onUpdate:o=>this.animatePaths(o),onStop:()=>this.animatePaths(1)}),markerFadeInAnimation(this,i,"added",t),seriesLabelFadeInAnimation3(this,"labels",i,e)}animateWaitingUpdateReady(t){super.animateWaitingUpdateReady(t),this.resetPaths()}animateReadyResize(t){super.animateReadyResize(t),this.resetPaths()}resetPaths(){const t=this.getLineNode();if(t){const{path:e}=t,i=this.getLinePoints();t.fill=void 0,t.stroke=this.properties.stroke,t.strokeWidth=this.getStrokeWidth(this.properties.strokeWidth),t.strokeOpacity=this.properties.strokeOpacity,t.lineDash=this.properties.lineDash,t.lineDashOffset=this.properties.lineDashOffset,e.clear(!0);for(const{x:o,y:s,moveTo:a}of i)a?e.moveTo(o,s):e.lineTo(o,s);t.checkPathDirty()}}getFormattedMarkerStyle(t){const{angleKey:e,radiusKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:t,angleKey:e,radiusKey:i,highlighted:!0})}computeFocusBounds(t){return computeMarkerFocusBounds2(this,t)}};RadarSeries.className="RadarSeries";var import_ag_charts_community229=require("ag-charts-community"),{RATIO:RATIO28,COLOR_STRING:COLOR_STRING23,Validate:Validate78}=import_ag_charts_community229._ModuleSupport,RadarAreaSeriesProperties=class extends RadarSeriesProperties{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1}};__decorateClass([Validate78(COLOR_STRING23)],RadarAreaSeriesProperties.prototype,"fill",2),__decorateClass([Validate78(RATIO28)],RadarAreaSeriesProperties.prototype,"fillOpacity",2);var{Group:Group18,Path:Path12,PointerEvents:PointerEvents9,Selection:Selection14,ChartAxisDirection:ChartAxisDirection27}=import_ag_charts_community230._ModuleSupport,RadarAreaSeries=class extends RadarSeries{constructor(t){super(t),this.properties=new RadarAreaSeriesProperties,this.resetInvalidToZero=!0;const e=new Group18;this.contentGroup.append(e),this.areaSelection=Selection14.select(e,Path12)}updatePathSelections(){const t=this.visible?[!0]:[];this.areaSelection.update(t),super.updatePathSelections()}getAreaNode(){return this.areaSelection.at(0)}getMarkerFill(t){return t?.fill??this.properties.marker.fill??this.properties.fill}beforePathAnimation(){super.beforePathAnimation();const t=this.getAreaNode();t.fill=this.properties.fill,t.fillOpacity=this.properties.fillOpacity,t.pointerEvents=PointerEvents9.None,t.stroke=void 0}animatePaths(t){super.animatePaths(t),this.animateSinglePath(this.getAreaNode(),this.getAreaPoints(),t)}getAreaPoints(){const t=this.getLinePoints(),e=n=>{const r=this.axes[n];return r instanceof import_ag_charts_community230._ModuleSupport.PolarAxis?r:void 0},i=e(ChartAxisDirection27.Y),o=e(ChartAxisDirection27.X);if(!i?.isReversed())return t;const a=o?.getAxisLinePoints()?.points??[];return t.concat(...a)}resetPaths(){super.resetPaths();const t=this.getAreaNode();if(t){const{path:e}=t,i=this.getAreaPoints();t.fill=this.properties.fill,t.fillOpacity=this.properties.fillOpacity,t.stroke=void 0,t.lineDash=this.properties.lineDash,t.lineDashOffset=this.properties.lineDashOffset,t.lineJoin=t.lineCap="round",e.clear(!0),i.forEach(({x:o,y:s,moveTo:a,arc:n,radius:r=0,startAngle:l=0,endAngle:c=0})=>{n?e.arc(o,s,r,l,c):a?e.moveTo(o,s):e.lineTo(o,s)}),e.closePath(),t.checkPathDirty()}}};RadarAreaSeries.className="RadarAreaSeries",RadarAreaSeries.type="radar-area";var{markerPaletteFactory,ThemeConstants:{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE4}}=import_ag_charts_community231._ModuleSupport,RadarAreaModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radar-area",moduleFactory:t=>new RadarAreaSeries(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:POLAR_AXIS_TYPE4.ANGLE_CATEGORY},{type:POLAR_AXIS_TYPE4.RADIUS_NUMBER}],themeTemplate:RADAR_AREA_SERIES_THEME,paletteFactory:t=>{const{marker:e}=markerPaletteFactory(t);return{stroke:e.stroke,fill:e.fill,marker:e}}},import_ag_charts_community232=require("ag-charts-community"),RadarLineSeries=class extends RadarSeries{updatePathSelections(){this.lineSelection.update(this.visible?[!0]:[])}};RadarLineSeries.className="RadarLineSeries",RadarLineSeries.type="radar-line";var{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE5}=import_ag_charts_community232._ModuleSupport.ThemeConstants,RadarLineModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radar-line",moduleFactory:t=>new RadarLineSeries(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:POLAR_AXIS_TYPE5.ANGLE_CATEGORY},{type:POLAR_AXIS_TYPE5.RADIUS_NUMBER}],themeTemplate:RADAR_LINE_SERIES_THEME,paletteFactory:({takeColors:t})=>{const{fills:[e],strokes:[i]}=t(1);return{stroke:e,marker:{fill:e,stroke:i}}}},import_ag_charts_community237=require("ag-charts-community"),import_ag_charts_community235=require("ag-charts-community"),import_ag_charts_community233=require("ag-charts-community"),{SeriesProperties:SeriesProperties11,SeriesTooltip:SeriesTooltip17,Validate:Validate79,COLOR_STRING:COLOR_STRING24,NUMBER:NUMBER20,FUNCTION:FUNCTION18,LINE_DASH:LINE_DASH20,OBJECT:OBJECT40,POSITIVE_NUMBER:POSITIVE_NUMBER32,RATIO:RATIO29,STRING:STRING37,Label:Label12}=import_ag_charts_community233._ModuleSupport,RadialBarSeriesProperties=class extends SeriesProperties11{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.label=new Label12,this.tooltip=new SeriesTooltip17}};__decorateClass([Validate79(STRING37)],RadialBarSeriesProperties.prototype,"angleKey",2),__decorateClass([Validate79(STRING37)],RadialBarSeriesProperties.prototype,"radiusKey",2),__decorateClass([Validate79(STRING37,{optional:!0})],RadialBarSeriesProperties.prototype,"angleName",2),__decorateClass([Validate79(STRING37,{optional:!0})],RadialBarSeriesProperties.prototype,"radiusName",2),__decorateClass([Validate79(COLOR_STRING24)],RadialBarSeriesProperties.prototype,"fill",2),__decorateClass([Validate79(RATIO29)],RadialBarSeriesProperties.prototype,"fillOpacity",2),__decorateClass([Validate79(COLOR_STRING24)],RadialBarSeriesProperties.prototype,"stroke",2),__decorateClass([Validate79(POSITIVE_NUMBER32)],RadialBarSeriesProperties.prototype,"strokeWidth",2),__decorateClass([Validate79(RATIO29)],RadialBarSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([Validate79(LINE_DASH20)],RadialBarSeriesProperties.prototype,"lineDash",2),__decorateClass([Validate79(POSITIVE_NUMBER32)],RadialBarSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([Validate79(POSITIVE_NUMBER32)],RadialBarSeriesProperties.prototype,"cornerRadius",2),__decorateClass([Validate79(FUNCTION18,{optional:!0})],RadialBarSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate79(NUMBER20)],RadialBarSeriesProperties.prototype,"rotation",2),__decorateClass([Validate79(STRING37,{optional:!0})],RadialBarSeriesProperties.prototype,"stackGroup",2),__decorateClass([Validate79(NUMBER20,{optional:!0})],RadialBarSeriesProperties.prototype,"normalizedTo",2),__decorateClass([Validate79(OBJECT40)],RadialBarSeriesProperties.prototype,"label",2),__decorateClass([Validate79(OBJECT40)],RadialBarSeriesProperties.prototype,"tooltip",2);var import_ag_charts_community234=require("ag-charts-community"),{SectorBox:SectorBox3,motion:motion7}=import_ag_charts_community234._ModuleSupport;function fixRadialBarAnimationStatus(t,e,i){if(i==="updated"){if(t.previousDatum==null||isNaN(t.previousDatum.innerRadius)||isNaN(t.previousDatum.outerRadius))return"added";if(isNaN(e.innerRadius)||isNaN(e.outerRadius))return"removed"}return i==="added"&&t.previousDatum!=null?"updated":i}function prepareRadialBarSeriesAnimationFunctions(t){return{toFn:(o,s,a)=>{let n,r,l,c,h;return a==="removed"?(n=t,r=t,l=s.innerRadius,c=s.outerRadius,h=new SectorBox3(n,r,l,c)):(n=s.startAngle,r=s.endAngle,l=isNaN(s.innerRadius)?o.innerRadius:s.innerRadius,c=isNaN(s.outerRadius)?o.outerRadius:s.outerRadius,h=s.clipSector),{startAngle:n,endAngle:r,innerRadius:l,outerRadius:c,clipSector:h}},fromFn:(o,s,a)=>{a=fixRadialBarAnimationStatus(o,s,a);let n,r,l,c,h;a==="removed"||a==="updated"?(n=o.startAngle,r=o.endAngle,l=o.innerRadius,c=o.outerRadius,h=o.clipSector):(n=t,r=t,l=s.innerRadius,c=s.outerRadius),h??(h=new SectorBox3(n,r,l,c));const d=motion7.NODE_UPDATE_STATE_TO_PHASE_MAPPING[a];return{startAngle:n,endAngle:r,innerRadius:l,outerRadius:c,clipSector:h,phase:d}}}}function resetRadialBarSelectionsFn(t,e){return{centerX:0,centerY:0,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clipSector:e.clipSector}}var{ChartAxisDirection:ChartAxisDirection28,PolarAxis:PolarAxis4,diff:diff5,groupAccumulativeValueProperty:groupAccumulativeValueProperty3,keyProperty:keyProperty7,normaliseGroupTo:normaliseGroupTo2,valueProperty:valueProperty15,fixNumericExtent:fixNumericExtent7,resetLabelFn:resetLabelFn3,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation4,seriesLabelFadeOutAnimation:seriesLabelFadeOutAnimation2,animationValidation:animationValidation6,angleBetween:angleBetween3,createDatumId:createDatumId18,CategoryScale:CategoryScale4,Sector:Sector5,SectorBox:SectorBox4,motion:motion8,applyShapeStyle:applyShapeStyle9}=import_ag_charts_community235._ModuleSupport,RadialBarSeriesNodeEvent=class extends import_ag_charts_community235._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o),this.angleKey=o.properties.angleKey,this.radiusKey=o.properties.radiusKey}},RadialBarSeries=class extends import_ag_charts_community235._ModuleSupport.PolarSeries{constructor(t){super({moduleCtx:t,useLabelLayer:!0,canHaveAxes:!0,animationResetFns:{item:resetRadialBarSelectionsFn,label:resetLabelFn3}}),this.properties=new RadialBarSeriesProperties,this.NodeEvent=RadialBarSeriesNodeEvent,this.groupScale=new CategoryScale4,this.circleCache={r:0,cx:0,cy:0}}nodeFactory(){return new Sector5}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===ChartAxisDirection28.X){const o=e.getDomain(this,"angleValue-end","value",i),s=[o[0]>0?0:o[0],o[1]<0?0:o[1]];return fixNumericExtent7(s)}else return e.getDomain(this,"radiusValue","key",i)}async processData(t){const{visible:e}=this,{angleKey:i,radiusKey:o,normalizedTo:s}=this.properties,a=!this.ctx.animationManager.isSkipped();if(!this.properties.isValid())return;const n=this.getStackId(),r=`${n}-trailing`,l=[];isDefined(s)&&l.push(normaliseGroupTo2([n,r],Math.abs(s))),a&&(this.processedData&&l.push(diff5(this.id,this.processedData)),l.push(animationValidation6()));const c=e||!a?{}:{forceValue:0},h=this.axes[ChartAxisDirection28.Y]?.scale.type,d=this.axes[ChartAxisDirection28.X]?.scale.type;await this.requestDataModel(t,this.data,{props:[keyProperty7(o,h,{id:"radiusValue"}),valueProperty15(i,d,{id:"angleValue-raw",invalidValue:null,...c}),...groupAccumulativeValueProperty3(i,"normal","current",{id:"angleValue-end",rangeId:"angleValue-range",invalidValue:null,groupId:n,separateNegative:!0,...c},d),...groupAccumulativeValueProperty3(i,"trailing","current",{id:"angleValue-start",invalidValue:null,groupId:r,separateNegative:!0,...c},d),...l],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,o=this.circleCache;return t===o.r&&e===o.cx&&i===o.cy?!1:(this.circleCache={r:t,cx:e,cy:i},!0)}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}getAxisInnerRadius(){const t=this.axes[ChartAxisDirection28.Y];return t instanceof PolarAxis4?this.radius*t.innerRadiusRatio:0}createNodeData(){const{processedData:t,dataModel:e}=this;if(!e||!t||t.type!=="grouped"||!this.properties.isValid())return;const i=this.axes[ChartAxisDirection28.X],o=this.axes[ChartAxisDirection28.Y],s=i?.scale,a=o?.scale;if(!s||!a)return;const n=e.resolveKeysById(this,"radiusValue",t),r=e.resolveColumnById(this,"angleValue-start",t),l=e.resolveColumnById(this,"angleValue-end",t),c=e.resolveColumnById(this,"angleValue-raw",t),h=e.resolveProcessedDataIndexById(this,"angleValue-range");let d=0;o instanceof RadiusCategoryAxis&&(d=o.groupPaddingInner);const{groupScale:u}=this,{index:p,visibleGroupCount:g}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);u.domain=Array.from({length:g}).map((w,E)=>String(E)),u.range=[0,Math.abs(a.bandwidth??0)],u.paddingInner=g>1?d:0;const y=u.bandwidth>=1?u.bandwidth:u.rawBandwidth,f=i.isReversed(),m=o.isReversed(),b=m?this.radius:this.getAxisInnerRadius(),S=(m?this.getAxisInnerRadius():this.radius)+b,{angleKey:M,radiusKey:A,angleName:v,radiusName:k,label:D}=this.properties,C=(w,E,B,z)=>{const P=this.getLabelText(D,{value:E,datum:w,angleKey:M,radiusKey:A,angleName:v,radiusName:k});if(P)return{x:B,y:z,text:P,textAlign:"center",textBaseline:"middle"}},_=[],I={itemId:A,nodeData:_,labelData:_};if(!this.visible)return I;const{dataSources:T}=t,O=T.get(this.id)??[];for(const{datumIndex:w,group:E}of e.forEachGroupDatum(this,t)){const B=O[w],z=n[w];if(z==null)return;const P=c[w],L=r[w],R=l[w],V=P>=0&&!Object.is(P,-0),F=E.aggregation[h][V?1:0],G=V===f;let W=s.convert(L,!0),H=s.convert(R,!0),U=s.convert(0,!0),j=s.convert(F,!0);G&&([U,j]=[j,U],[W,H]=[H,W]);const Z=S-a.convert(z)+u.convert(String(p)),X=Z+y,K=(Z+X)/2,q=W+angleBetween3(W,H)/2,Q=Math.cos(q)*K,Y=Math.sin(q)*K,st=this.properties.label.enabled?C(B,P,Q,Y):void 0,ot=new SectorBox4(W,H,Z,X);_.push({series:this,datum:B,datumIndex:w,point:{x:Q,y:Y,size:0},midPoint:{x:Q,y:Y},label:st,angleValue:P,radiusValue:z,innerRadius:Z,outerRadius:X,startAngle:U,endAngle:j,clipSector:ot,reversed:G,index:w})}return I}update({seriesRect:t}){const e=this.checkResize(t);this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updateSectorSelection(this.itemSelection,!1),this.updateSectorSelection(this.highlightSelection,!0),this.updateLabels(),e&&this.animationState.transition("resize"),this.animationState.transition("update")}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset,cornerRadius:e.cornerRadius}}getItemStyleOverrides(t,e,i,o){const{id:s,properties:a}=this,{angleKey:n,radiusKey:r,itemStyler:l}=a;if(l!=null)return this.cachedDatumCallback(createDatumId18(t,o?"highlight":"node"),()=>l({seriesId:s,datum:e,highlighted:o,angleKey:n,radiusKey:r,...i}))}updateSectorSelection(t,e){let i=[];if(e){const s=this.ctx.highlightManager?.getActiveHighlight();s?.datum&&s.series===this&&i.push(s)}else i=this.nodeData;const o=this.getItemBaseStyle(e);t.update(i,void 0,s=>this.getDatumId(s)).each((s,a)=>{const{datum:n,datumIndex:r}=a,l=this.getItemStyleOverrides(String(r),n,o,e),c=l?.cornerRadius??o.cornerRadius;applyShapeStyle9(s,o,l),s.lineJoin="round",s.inset=s.stroke!=null?s.strokeWidth/2:0,s.startInnerCornerRadius=n.reversed?c:0,s.startOuterCornerRadius=n.reversed?c:0,s.endInnerCornerRadius=n.reversed?0:c,s.endOuterCornerRadius=n.reversed?0:c,e&&(s.startAngle=a.startAngle,s.endAngle=a.endAngle,s.clipSector=a.clipSector,s.innerRadius=a.innerRadius,s.outerRadius=a.outerRadius)})}updateLabels(){const{label:t}=this.properties;this.labelSelection.update(this.nodeData).each((e,i)=>{t.enabled&&i.label?(e.x=i.label.x,e.y=i.label.y,e.fill=t.color,e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=i.label.text,e.textAlign=i.label.textAlign,e.textBaseline=i.label.textBaseline,e.visible=!0):e.visible=!1})}getBarTransitionFunctions(){const t=this.axes[ChartAxisDirection28.X]?.scale;let e=0;if(!t)return prepareRadialBarSeriesAnimationFunctions(e);const i=Math.min(t.domain[0],t.domain[1]),o=Math.max(t.domain[0],t.domain[1]);return i<=0&&o>=0&&(e=t.convert(0)),prepareRadialBarSeriesAnimationFunctions(e)}animateEmptyUpdateReady(){const{labelSelection:t}=this,e=this.getBarTransitionFunctions();motion8.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],e),seriesLabelFadeInAnimation4(this,"labels",this.ctx.animationManager,t)}animateClearingUpdateEmpty(){const{itemSelection:t}=this,{animationManager:e}=this.ctx,i=this.getBarTransitionFunctions();motion8.fromToMotion(this.id,"datums",e,[t],i),seriesLabelFadeOutAnimation2(this,"labels",e,this.labelSelection)}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,axes:s,properties:a}=this,{angleKey:n,angleName:r,radiusKey:l,radiusName:c,tooltip:h}=a,d=s[ChartAxisDirection28.X],u=s[ChartAxisDirection28.Y];if(!i||!o||!d||!u)return;const{datumIndex:p}=t,g=o.dataSources.get(this.id)?.[p],y=i.resolveKeysById(this,"radiusValue",o)[p],f=i.resolveColumnById(this,"angleValue-raw",o)[p];if(y==null)return;const m=this.getItemBaseStyle(!1);return Object.assign(m,this.getItemStyleOverrides(String(p),p,m,!1)),h.formatTooltip({heading:u.formatDatum(y),symbol:this.legendItemSymbol(),data:[{label:r,fallbackLabel:n,value:d.formatDatum(f)}]},{seriesId:e,datum:g,title:r,angleKey:n,angleName:r,radiusKey:l,radiusName:c,...m})}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.itemSelection.nodes())}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:o,strokeWidth:s,lineDash:a,lineDashOffset:n}=this.properties;return{marker:{fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:o,strokeWidth:s,lineDash:a,lineDashOffset:n}}}getLegendData(t){if(!this.properties.isValid()||t!=="category")return[];const{id:e,visible:i}=this,{angleKey:o,angleName:s,showInLegend:a}=this.properties;return[{legendType:"category",id:e,itemId:o,seriesId:e,enabled:i,label:{text:s??o},symbol:this.legendItemSymbol(),hideInLegend:!a}]}getDatumId(t){return createDatumId18(t.radiusValue)}computeLabelsBBox(){return null}getStackId(){return`radialBar-stack-${this.seriesGrouping?.groupIndex??this.id}-xValues`}};RadialBarSeries.className="RadialBarSeries",RadialBarSeries.type="radial-bar";var import_ag_charts_community236=require("ag-charts-community"),{ThemeConstants:{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE6}}=import_ag_charts_community236._ModuleSupport,RADIAL_BAR_SERIES_THEME={series:{strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}}},axes:{[POLAR_AXIS_TYPE6.RADIUS_CATEGORY]:{innerRadiusRatio:.2,groupPaddingInner:.2,paddingInner:.2,paddingOuter:.1}}},{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE7}=import_ag_charts_community237._ModuleSupport.ThemeConstants,RadialBarModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radial-bar",moduleFactory:t=>new RadialBarSeries(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:POLAR_AXIS_TYPE7.ANGLE_NUMBER},{type:POLAR_AXIS_TYPE7.RADIUS_CATEGORY}],themeTemplate:RADIAL_BAR_SERIES_THEME,paletteFactory:({takeColors:t})=>{const{fills:[e],strokes:[i]}=t(1);return{fill:e,stroke:i}},stackable:!0,groupable:!0},import_ag_charts_community241=require("ag-charts-community"),import_ag_charts_community239=require("ag-charts-community"),import_ag_charts_community238=require("ag-charts-community"),{Validate:Validate80,RATIO:RATIO30}=import_ag_charts_community238._ModuleSupport,RadialColumnSeriesProperties=class extends RadialColumnSeriesBaseProperties{};__decorateClass([Validate80(RATIO30,{optional:!0})],RadialColumnSeriesProperties.prototype,"columnWidthRatio",2),__decorateClass([Validate80(RATIO30,{optional:!0})],RadialColumnSeriesProperties.prototype,"maxColumnWidthRatio",2);var{ChartAxisDirection:ChartAxisDirection29,PolarAxis:PolarAxis5,RadialColumnShape,getRadialColumnWidth}=import_ag_charts_community239._ModuleSupport,RadialColumnSeries=class extends RadialColumnSeriesBase{constructor(t){super(t,{animationResetFns:{item:resetRadialColumnSelectionFn}}),this.properties=new RadialColumnSeriesProperties}getStackId(){return`radarColumn-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new RadialColumnShape}getColumnTransitionFunctions(){const t=this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius();return prepareRadialColumnAnimationFunctions(t)}isRadiusAxisCircle(){const t=this.axes[ChartAxisDirection29.Y];return t instanceof PolarAxis5?t.shape==="circle":!1}updateItemPath(t,e,i){t.isBeveled=this.isRadiusAxisCircle(),t.isRadiusAxisReversed=this.isRadiusAxisReversed(),i&&(t.innerRadius=e.innerRadius,t.outerRadius=e.outerRadius,t.startAngle=e.startAngle,t.endAngle=e.endAngle,t.columnWidth=e.columnWidth,t.axisInnerRadius=e.axisInnerRadius,t.axisOuterRadius=e.axisOuterRadius)}getColumnWidth(t,e){const{columnWidthRatio:i=.5,maxColumnWidthRatio:o=.5}=this.properties;return getRadialColumnWidth(t,e,this.radius,i,o)}};RadialColumnSeries.className="RadialColumnSeries",RadialColumnSeries.type="radial-column";var import_ag_charts_community240=require("ag-charts-community"),{ThemeConstants:{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE8,POLAR_AXIS_SHAPE:POLAR_AXIS_SHAPE2}}=import_ag_charts_community240._ModuleSupport,RADIAL_COLUMN_SERIES_THEME={series:{columnWidthRatio:.5,maxColumnWidthRatio:.5,strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},axes:{[POLAR_AXIS_TYPE8.ANGLE_CATEGORY]:{shape:POLAR_AXIS_SHAPE2.CIRCLE,groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[POLAR_AXIS_TYPE8.RADIUS_NUMBER]:{shape:POLAR_AXIS_SHAPE2.CIRCLE,innerRadiusRatio:.5}}},{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE9}=import_ag_charts_community241._ModuleSupport.ThemeConstants,RadialColumnModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radial-column",moduleFactory:t=>new RadialColumnSeries(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:POLAR_AXIS_TYPE9.ANGLE_CATEGORY},{type:POLAR_AXIS_TYPE9.RADIUS_NUMBER}],themeTemplate:RADIAL_COLUMN_SERIES_THEME,paletteFactory:({takeColors:t})=>{const{fills:[e],strokes:[i]}=t(1);return{fill:e,stroke:i}},stackable:!0,groupable:!0},import_ag_charts_community246=require("ag-charts-community"),import_ag_charts_community245=require("ag-charts-community"),import_ag_charts_community242=require("ag-charts-community"),{SvgPath,Rotatable,Translatable,Scalable}=import_ag_charts_community242._ModuleSupport,RadialGaugeNeedle=class extends Rotatable(Scalable(Translatable(SvgPath))){constructor(){super(...arguments),this.scalingCenterX=.5,this.scalingCenterY=.5,this.rotationCenterX=.5,this.rotationCenterY=.5}};RadialGaugeNeedle.defaultPathData="M0.50245 0.53745C0.481767 0.53745 0.465 0.520683 0.465 0.5C0.465 0.479317 0.481767 0.46255 0.50245 0.46255L1 0.500012L0.50245 0.53745Z";var import_ag_charts_community243=require("ag-charts-community"),{BaseProperties:BaseProperties26,SeriesTooltip:SeriesTooltip18,SeriesProperties:SeriesProperties12,PropertiesArray:PropertiesArray7,Validate:Validate81,BOOLEAN:BOOLEAN32,COLOR_STRING:COLOR_STRING25,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY11,FUNCTION:FUNCTION19,LINE_DASH:LINE_DASH21,NUMBER:NUMBER21,OBJECT_ARRAY:OBJECT_ARRAY2,OBJECT:OBJECT41,POSITIVE_NUMBER:POSITIVE_NUMBER33,RATIO:RATIO31,STRING:STRING38,UNION:UNION16,Label:Label13}=import_ag_charts_community243._ModuleSupport,TARGET_PLACEMENT2=UNION16(["inside","outside","middle"],"a placement"),RadialGaugeDefaultTargetLabelProperties=class extends Label13{};__decorateClass([Validate81(NUMBER21,{optional:!0})],RadialGaugeDefaultTargetLabelProperties.prototype,"spacing",2);var RadialGaugeTargetProperties=class extends BaseProperties26{constructor(){super(...arguments),this.label=new RadialGaugeDefaultTargetLabelProperties}};__decorateClass([Validate81(STRING38,{optional:!0})],RadialGaugeTargetProperties.prototype,"text",2),__decorateClass([Validate81(NUMBER21,{optional:!0})],RadialGaugeTargetProperties.prototype,"value",2),__decorateClass([Validate81(TARGET_MARKER_SHAPE,{optional:!0})],RadialGaugeTargetProperties.prototype,"shape",2),__decorateClass([Validate81(TARGET_PLACEMENT2,{optional:!0})],RadialGaugeTargetProperties.prototype,"placement",2),__decorateClass([Validate81(NUMBER21,{optional:!0})],RadialGaugeTargetProperties.prototype,"spacing",2),__decorateClass([Validate81(POSITIVE_NUMBER33,{optional:!0})],RadialGaugeTargetProperties.prototype,"size",2),__decorateClass([Validate81(NUMBER21,{optional:!0})],RadialGaugeTargetProperties.prototype,"rotation",2),__decorateClass([Validate81(COLOR_STRING25,{optional:!0})],RadialGaugeTargetProperties.prototype,"fill",2),__decorateClass([Validate81(RATIO31,{optional:!0})],RadialGaugeTargetProperties.prototype,"fillOpacity",2),__decorateClass([Validate81(COLOR_STRING25,{optional:!0})],RadialGaugeTargetProperties.prototype,"stroke",2),__decorateClass([Validate81(POSITIVE_NUMBER33,{optional:!0})],RadialGaugeTargetProperties.prototype,"strokeWidth",2),__decorateClass([Validate81(RATIO31,{optional:!0})],RadialGaugeTargetProperties.prototype,"strokeOpacity",2),__decorateClass([Validate81(LINE_DASH21,{optional:!0})],RadialGaugeTargetProperties.prototype,"lineDash",2),__decorateClass([Validate81(POSITIVE_NUMBER33,{optional:!0})],RadialGaugeTargetProperties.prototype,"lineDashOffset",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeTargetProperties.prototype,"label",2);var RadialGaugeBarProperties=class extends BaseProperties26{constructor(){super(...arguments),this.enabled=!0,this.fills=new PropertiesArray7(import_ag_charts_community243._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([Validate81(BOOLEAN32)],RadialGaugeBarProperties.prototype,"enabled",2),__decorateClass([Validate81(OBJECT_ARRAY2)],RadialGaugeBarProperties.prototype,"fills",2),__decorateClass([Validate81(FILL_MODE)],RadialGaugeBarProperties.prototype,"fillMode",2),__decorateClass([Validate81(COLOR_STRING25,{optional:!0})],RadialGaugeBarProperties.prototype,"fill",2),__decorateClass([Validate81(RATIO31)],RadialGaugeBarProperties.prototype,"fillOpacity",2),__decorateClass([Validate81(COLOR_STRING25,{optional:!0})],RadialGaugeBarProperties.prototype,"stroke",2),__decorateClass([Validate81(POSITIVE_NUMBER33,{optional:!0})],RadialGaugeBarProperties.prototype,"strokeWidth",2),__decorateClass([Validate81(RATIO31)],RadialGaugeBarProperties.prototype,"strokeOpacity",2),__decorateClass([Validate81(LINE_DASH21)],RadialGaugeBarProperties.prototype,"lineDash",2),__decorateClass([Validate81(POSITIVE_NUMBER33)],RadialGaugeBarProperties.prototype,"lineDashOffset",2);var RadialGaugeScaleProperties=class extends BaseProperties26{constructor(){super(...arguments),this.fills=new PropertiesArray7(import_ag_charts_community243._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.defaultFill="black"}};__decorateClass([Validate81(OBJECT_ARRAY2)],RadialGaugeScaleProperties.prototype,"fills",2),__decorateClass([Validate81(FILL_MODE)],RadialGaugeScaleProperties.prototype,"fillMode",2),__decorateClass([Validate81(COLOR_STRING25,{optional:!0})],RadialGaugeScaleProperties.prototype,"fill",2),__decorateClass([Validate81(RATIO31)],RadialGaugeScaleProperties.prototype,"fillOpacity",2),__decorateClass([Validate81(COLOR_STRING25)],RadialGaugeScaleProperties.prototype,"stroke",2),__decorateClass([Validate81(POSITIVE_NUMBER33)],RadialGaugeScaleProperties.prototype,"strokeWidth",2),__decorateClass([Validate81(RATIO31)],RadialGaugeScaleProperties.prototype,"strokeOpacity",2),__decorateClass([Validate81(LINE_DASH21)],RadialGaugeScaleProperties.prototype,"lineDash",2),__decorateClass([Validate81(POSITIVE_NUMBER33)],RadialGaugeScaleProperties.prototype,"lineDashOffset",2),__decorateClass([Validate81(COLOR_STRING25)],RadialGaugeScaleProperties.prototype,"defaultFill",2);var RadialGaugeNeedleProperties=class extends BaseProperties26{constructor(){super(...arguments),this.enabled=!0,this.spacing=0,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([Validate81(BOOLEAN32)],RadialGaugeNeedleProperties.prototype,"enabled",2),__decorateClass([Validate81(RATIO31,{optional:!0})],RadialGaugeNeedleProperties.prototype,"radiusRatio",2),__decorateClass([Validate81(NUMBER21)],RadialGaugeNeedleProperties.prototype,"spacing",2),__decorateClass([Validate81(COLOR_STRING25)],RadialGaugeNeedleProperties.prototype,"fill",2),__decorateClass([Validate81(RATIO31)],RadialGaugeNeedleProperties.prototype,"fillOpacity",2),__decorateClass([Validate81(COLOR_STRING25)],RadialGaugeNeedleProperties.prototype,"stroke",2),__decorateClass([Validate81(POSITIVE_NUMBER33)],RadialGaugeNeedleProperties.prototype,"strokeWidth",2),__decorateClass([Validate81(RATIO31)],RadialGaugeNeedleProperties.prototype,"strokeOpacity",2),__decorateClass([Validate81(LINE_DASH21)],RadialGaugeNeedleProperties.prototype,"lineDash",2),__decorateClass([Validate81(POSITIVE_NUMBER33)],RadialGaugeNeedleProperties.prototype,"lineDashOffset",2);var RadialGaugeLabelProperties=class extends AutoSizedLabel{};__decorateClass([Validate81(STRING38,{optional:!0})],RadialGaugeLabelProperties.prototype,"text",2);var RadialGaugeSecondaryLabelProperties=class extends AutoSizedSecondaryLabel{};__decorateClass([Validate81(STRING38,{optional:!0})],RadialGaugeSecondaryLabelProperties.prototype,"text",2);var RadialGaugeSeriesProperties=class extends SeriesProperties12{constructor(){super(...arguments),this.segmentation=new GaugeSegmentationProperties,this.defaultColorRange=[],this.targets=new PropertiesArray7(RadialGaugeTargetProperties),this.defaultTarget=new RadialGaugeTargetProperties,this.outerRadiusRatio=1,this.innerRadiusRatio=1,this.cornerRadius=0,this.cornerMode="container",this.spacing=0,this.scale=new RadialGaugeScaleProperties,this.bar=new RadialGaugeBarProperties,this.needle=new RadialGaugeNeedleProperties,this.label=new RadialGaugeLabelProperties,this.secondaryLabel=new RadialGaugeSecondaryLabelProperties,this.tooltip=new SeriesTooltip18}isValid(t){if(!super.isValid(t))return!1;const{outerRadius:e,innerRadius:i}=this;return e==null!=(i==null)?(logger_exports.warnOnce("Either [innerRadius] and [outerRadius] must both be set, or neither can be set."),!1):!0}};__decorateClass([Validate81(NUMBER21)],RadialGaugeSeriesProperties.prototype,"value",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeSeriesProperties.prototype,"segmentation",2),__decorateClass([Validate81(COLOR_STRING_ARRAY11)],RadialGaugeSeriesProperties.prototype,"defaultColorRange",2),__decorateClass([Validate81(OBJECT_ARRAY2)],RadialGaugeSeriesProperties.prototype,"targets",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeSeriesProperties.prototype,"defaultTarget",2),__decorateClass([Validate81(RATIO31)],RadialGaugeSeriesProperties.prototype,"outerRadiusRatio",2),__decorateClass([Validate81(RATIO31)],RadialGaugeSeriesProperties.prototype,"innerRadiusRatio",2),__decorateClass([Validate81(POSITIVE_NUMBER33,{optional:!0})],RadialGaugeSeriesProperties.prototype,"outerRadius",2),__decorateClass([Validate81(POSITIVE_NUMBER33,{optional:!0})],RadialGaugeSeriesProperties.prototype,"innerRadius",2),__decorateClass([Validate81(POSITIVE_NUMBER33)],RadialGaugeSeriesProperties.prototype,"cornerRadius",2),__decorateClass([Validate81(CORNER_MODE)],RadialGaugeSeriesProperties.prototype,"cornerMode",2),__decorateClass([Validate81(NUMBER21)],RadialGaugeSeriesProperties.prototype,"spacing",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeSeriesProperties.prototype,"scale",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeSeriesProperties.prototype,"bar",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeSeriesProperties.prototype,"needle",2),__decorateClass([Validate81(FUNCTION19,{optional:!0})],RadialGaugeSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeSeriesProperties.prototype,"label",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeSeriesProperties.prototype,"secondaryLabel",2),__decorateClass([Validate81(OBJECT41)],RadialGaugeSeriesProperties.prototype,"tooltip",2);var import_ag_charts_community244=require("ag-charts-community"),{SectorBox:SectorBox5}=import_ag_charts_community244._ModuleSupport;function computeClipSector(t){const{startAngle:e,endAngle:i,clipStartAngle:o,clipEndAngle:s,innerRadius:a,outerRadius:n}=t;if(!(o==null||s==null))return new SectorBox5(Math.max(o,e),Math.min(s,i),a,n)}function clipSectorVisibility(t,e,i){return Math.max(t,i.startAngle)<=Math.min(e,i.endAngle)}function hasClipSector(t){return t.clipStartAngle!=null&&t.clipEndAngle!=null}function datumClipSector(t,e){const{clipStartAngle:i,clipEndAngle:o,innerRadius:s,outerRadius:a}=t;return new SectorBox5(i,e?i:o,s,a)}function prepareRadialGaugeSeriesAnimationFunctions(t,e){const i=t?"initial":"update";return{node:{fromFn(a,n){const r=a.previousDatum;let{startAngle:l,endAngle:c}=r??n;const h=r!=null&&hasClipSector(r)?datumClipSector(r,t):void 0,d=hasClipSector(n)?datumClipSector(n,t):void 0;let u;return h!=null&&d!=null?u=h:h==null&&d!=null?(u=d,l=n.startAngle,c=n.endAngle):h!=null&&d==null?(u=void 0,l=n.startAngle,c=n.endAngle):t&&(c=l),{startAngle:l,endAngle:c,clipSector:u,phase:i}},toFn(a,n){const{startAngle:r,endAngle:l}=n;let c;return hasClipSector(n)&&(c=datumClipSector(n,!1)),{startAngle:r,endAngle:l,clipSector:c}},applyFn(a,n){const{startAngle:r,endAngle:l}=n;let{clipSector:c}=n;c!=null&&(c=new SectorBox5(Math.max(r,c.startAngle),Math.min(l,c.endAngle),c.innerRadius,c.outerRadius));const h=c==null||clipSectorVisibility(r,l,c);a.startAngle=r,a.endAngle=l,a.clipSector=c,a.visible=h}},needle:{fromFn(a){let{angle:n}=a.previousDatum??a.datum;return t&&(n=e),{rotation:n,phase:i}},toFn(a,n){const{angle:r}=n;return{rotation:r}}}}}function resetRadialGaugeSeriesResetSectorFunction(t,e){const{startAngle:i,endAngle:o}=e,s=computeClipSector(e),a=s==null||clipSectorVisibility(i,o,s);return{startAngle:i,endAngle:o,clipSector:s,visible:a}}function resetRadialGaugeSeriesResetNeedleFunction(t,e){const{angle:i}=e;return{rotation:i}}var verticalAlignFactors3={top:0,middle:.5,bottom:1};function formatRadialGaugeLabels(t,e,i,o,s){const{padding:a,textAlign:n,verticalAlign:r}=i;let l,c;if(e.each((S,M)=>{M.label==="primary"?l=M:M.label==="secondary"&&(c=M)}),l==null)return;const h=getLabelText(t,l,s?.label);if(h==null)return;const d=c!=null?getLabelText(t,c,s?.secondaryLabel):void 0,u={padding:a},p=n==="center"?2:1,g=r==="middle"?2:1,y=S=>({width:Math.sqrt(Math.max(o**2-(S/g)**2,0))*p,height:Math.min(S,g*o),meta:null});let f,m,b;if(c!=null&&d!=null){const S=formatStackedLabels(h,l,d,c,u,y);f=S?.label,m=S?.secondaryLabel,b=S?.height??0}else{const S=formatSingleLabel(h,l,u,y);f=S?.[0],m=void 0,b=S?.[0].height??0}const x=b*verticalAlignFactors3[r];e.each((S,M)=>{let A;if(M.label==="primary"?A=f:M.label==="secondary"&&(A=m),A==null){S.visible=!1;return}S.visible=!0,S.text=A.text,S.fontSize=A.fontSize,S.lineHeight=A.lineHeight,S.textAlign=n,S.textBaseline="middle";const v=M.label==="primary"?A.height/2:b-A.height/2;S.y=M.centerY+v-x,S.x=M.centerX})}var{fromToMotion:fromToMotion3,resetMotion:resetMotion3,SeriesNodePickMode:SeriesNodePickMode15,StateMachine:StateMachine14,createDatumId:createDatumId19,ChartAxisDirection:ChartAxisDirection30,normalizeAngle360:normalizeAngle3607,normalizeAngle360Inclusive:normalizeAngle360Inclusive3,toDegrees,toRadians:toRadians6,BBox:BBox18,Group:Group19,PointerEvents:PointerEvents10,Selection:Selection15,Sector:Sector6,SectorBox:SectorBox6,Text:Text8,ConicGradient,Marker:Marker5,getColorStops:getColorStops2}=import_ag_charts_community245._ModuleSupport,targetPlacementRotation={inside:90,middle:0,outside:-90},outsideLabelPlacements=[{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"},{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"}],insideLabelPlacements=[{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"},{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"}],RadialGaugeSeries=class extends import_ag_charts_community245._ModuleSupport.Series{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[SeriesNodePickMode15.EXACT_SHAPE_MATCH,SeriesNodePickMode15.NEAREST_NODE]}),this.canHaveAxes=!0,this.properties=new RadialGaugeSeriesProperties,this.centerX=0,this.centerY=0,this.radius=0,this.textAlign="center",this.verticalAlign="middle",this.scaleGroup=this.contentGroup.appendChild(new Group19({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new Group19({name:"itemGroup"})),this.itemNeedleGroup=this.contentGroup.appendChild(new Group19({name:"itemNeedleGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new Group19({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new Group19({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Group19({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new Group19({name:"itemTargetLabelGroup"})),this.scaleSelection=Selection15.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=Selection15.select(this.itemGroup,()=>this.nodeFactory()),this.needleSelection=Selection15.select(this.itemNeedleGroup,RadialGaugeNeedle),this.targetSelection=Selection15.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=Selection15.select(this.itemTargetLabelGroup,Text8),this.labelSelection=Selection15.select(this.itemLabelGroup,Text8),this.highlightTargetSelection=Selection15.select(this.highlightTargetGroup,()=>this.markerFactory()),this.datumUnion=new DatumUnion,this.animationState=new StateMachine14("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.animateReadyResize(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateWaitingUpdateReady()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty"},reset:"empty",skip:"ready"}}),this.scaleGroup.pointerEvents=PointerEvents10.None}get maximumRadius(){return this.properties.outerRadius}get minimumRadius(){return this.properties.outerRadius}get hasData(){return this.properties.value!=null}nodeFactory(){return new Sector6}markerFactory(){const t=new Marker5;return t.size=1,t}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(t){return formatLabel(t,this.axes[ChartAxisDirection30.X])}createConicGradient(t,e){const{centerX:i,centerY:o,radius:s}=this,{domain:a,range:n}=this.axes[ChartAxisDirection30.X].scale,[r,l]=n,{defaultColorRange:c}=this.properties,h=normalizeAngle3607((r+l)/2+Math.PI),d=normalizeAngle360Inclusive3(l-r),u=getColorStops2(t,c,a,e).map(({color:p,offset:g})=>(g=Math.min(Math.max(g,0),1),g=(r+d*g-h)/(2*Math.PI),g=(g%1+1)%1,{offset:g,color:p}));return new ConicGradient("oklch",u,toDegrees(h)-90,new BBox18(i-s,o-s,2*s,2*s))}getTargets(){const{properties:t}=this,e=t.defaultTarget;return Array.from(t.targets).map(i=>{const{text:o=e.text,value:s=e.value??0,shape:a=e.shape??"triangle",rotation:n=e.rotation??0,strokeWidth:r=e.strokeWidth??0,placement:l=e.placement??"middle",spacing:c=e.spacing??0,size:h=e.size??0,fill:d=e.fill??"black",fillOpacity:u=e.fillOpacity??1,stroke:p=e.stroke??"black",strokeOpacity:g=e.strokeOpacity??1,lineDash:y=e.lineDash??[0],lineDashOffset:f=e.lineDashOffset??0}=i,{enabled:m=e.label.enabled,color:b=e.label.color??"black",fontStyle:x=e.label.fontStyle??"normal",fontWeight:S=e.label.fontWeight??"normal",fontSize:M=e.label.fontSize,fontFamily:A=e.label.fontFamily,spacing:v=e.label.spacing??0}=i.label;return{text:o,value:s,shape:a,placement:l,spacing:c,size:h,rotation:n,fill:d,fillOpacity:u,stroke:p,strokeWidth:r,strokeOpacity:g,lineDash:y,lineDashOffset:f,label:{enabled:m,color:b,fontStyle:x,fontWeight:S,fontSize:M,fontFamily:A,spacing:v}}})}getTargetRadius(t){const{radius:e,properties:i}=this,{innerRadiusRatio:o,outerRadiusRatio:s}=i,{placement:a,spacing:n,size:r}=t,l=e*s,c=e*o;switch(a){case"inside":return Math.max(c-n-r/2,0);case"outside":return l+n+r/2;default:return(c+l)/2}}getTargetLabel(t){const i=this.axes[ChartAxisDirection30.X].scale,{value:o,size:s,placement:a,label:n}=t,{spacing:r,color:l,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u}=n,p=void 0,g=i.convert(o),y=normalizeAngle3607(g)/(Math.PI/2)|0,f=s/2+r;let m,b,x,S;switch(a){case"outside":({textAlign:m,textBaseline:b}=outsideLabelPlacements[y]),x=f*Math.cos(g),S=f*Math.sin(g);break;case"inside":({textAlign:m,textBaseline:b}=insideLabelPlacements[y]),x=-f*Math.cos(g),S=-f*Math.sin(g);break;default:m="center",b="bottom",x=0,S=-f;break}return{offsetX:x,offsetY:S,fill:l,textAlign:m,textBaseline:b,fontStyle:c,fontWeight:h,fontSize:d,fontFamily:u,lineHeight:p}}createNodeData(){const{id:t,properties:e,radius:i,centerX:o,centerY:s}=this;if(!e.isValid())return;const a=this.axes[ChartAxisDirection30.X];if(a==null)return;const{value:n,innerRadiusRatio:r,outerRadiusRatio:l,segmentation:c,cornerRadius:h,cornerMode:d,needle:u,bar:p,scale:g,label:y,secondaryLabel:f}=e,{outerRadius:m=i*l,innerRadius:b=i*r}=e,x=this.getTargets(),{domain:S}=a.scale,M=[],A=[],v=[],k=[],D=[],[C,_]=a.range,I=a.scale,T=d==="item",O=I.convert(S[0]),w=I.convert(n),E=Math.ceil(normalizeAngle360Inclusive3(w-O)*i);let B=c.enabled?c.interval.getSegments(a.scale,E):void 0;const z=p.enabled?p.fill??this.createConicGradient(p.fills,p.fillMode):"rgba(0,0,0,0)",P=g.fill??(p.enabled&&g.fills.length===0?g.defaultFill:void 0)??this.createConicGradient(g.fills,g.fillMode);if(B==null&&T){const[L,R]=S,V={value:n,segmentStart:L,segmentEnd:R},G=Math.min(h,(m-b)/2)/((b+m)/2);M.push({series:this,itemId:"value",datum:V,datumIndex:{type:0},type:0,centerX:o,centerY:s,outerRadius:m,innerRadius:b,startAngle:O-G,endAngle:w+G,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:h,endCornerRadius:h,fill:z}),D.push({series:this,itemId:"scale",datum:V,datumIndex:{type:0},type:0,centerX:o,centerY:s,outerRadius:m,innerRadius:b,startAngle:C-G,endAngle:_+G,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:h,endCornerRadius:h,fill:P})}else{B??(B=S);for(let L=0;Lthis.formatLabel($.value)}=y;k.push({label:"primary",centerX:o,centerY:s,text:L,value:n,fill:R,fontSize:V,minimumFontSize:F,fontStyle:G,fontWeight:W,fontFamily:H,lineHeight:U,formatter:j})}if(!u.enabled&&f.enabled){const{text:L,color:R,fontSize:V,minimumFontSize:F,fontStyle:G,fontWeight:W,fontFamily:H,lineHeight:U,formatter:j}=f;k.push({label:"secondary",centerX:o,centerY:s,text:L,value:n,fill:R,fontSize:V,minimumFontSize:F,fontStyle:G,fontWeight:W,fontFamily:H,lineHeight:U,formatter:j})}if(u.enabled){let L=u.radiusRatio!=null?i*u.radiusRatio:b;L=Math.max(L-u.spacing,0);const R=I.convert(n);v.push({centerX:o,centerY:s,radius:L,angle:R,series:this})}for(let L=0;LMath.max(...S))continue;const q=this.getTargetRadius(R),Q=I.convert(V),Y=toRadians6(R.rotation+targetPlacementRotation[R.placement]);A.push({series:this,itemId:`target-${L}`,midPoint:{x:q*Math.cos(Q)+o,y:q*Math.sin(Q)+s},datum:{value:V},datumIndex:{type:1,index:L},type:1,value:V,text:F,centerX:o,centerY:s,shape:W,radius:q,angle:Q,rotation:Y,size:G,fill:H,fillOpacity:U,stroke:j,strokeOpacity:Z,strokeWidth:$,lineDash:X,lineDashOffset:K,label:this.getTargetLabel(R)})}return{itemId:t,nodeData:M,needleData:v,targetData:A,labelData:k,scaleData:D}}updateSelections(t){(this.nodeDataRefresh||t)&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}highlightDatum(t){if(t!=null&&t.series===this&&t.type===1)return t}update({seriesRect:t}){const{datumSelection:e,labelSelection:i,needleSelection:o,targetSelection:s,targetLabelSelection:a,scaleSelection:n,highlightTargetSelection:r}=this,l=this.checkResize(t);this.updateSelections(l),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();const c=this.contextNodeData?.nodeData??[],h=this.contextNodeData?.labelData??[],d=this.contextNodeData?.needleData??[],u=this.contextNodeData?.targetData??[],p=this.contextNodeData?.scaleData??[],g=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:p,scaleSelection:n}),this.updateScaleNodes({scaleSelection:n}),this.needleSelection=this.updateNeedleSelection({needleData:d,needleSelection:o}),this.updateNeedleNodes({needleSelection:o}),this.targetSelection=this.updateTargetSelection({targetData:u,targetSelection:s}),this.updateTargetNodes({targetSelection:s,isHighlight:!1}),this.targetLabelSelection=this.updateTargetLabelSelection({targetData:u,targetLabelSelection:a}),this.updateTargetLabelNodes({targetLabelSelection:a}),this.datumSelection=this.updateDatumSelection({nodeData:c,datumSelection:e}),this.updateDatumNodes({datumSelection:e}),this.labelSelection=this.updateLabelSelection({labelData:h,labelSelection:i}),this.updateLabelNodes({labelSelection:i}),this.highlightTargetSelection=this.updateTargetSelection({targetData:g!=null?[g]:[],targetSelection:r}),this.updateTargetNodes({targetSelection:r,isHighlight:!0}),l&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId19(t.nodeData.length,e.itemId))}updateDatumNodes(t){const{datumSelection:e}=t,{ctx:i,properties:o}=this,{bar:s,segmentation:a}=o,n=a.spacing??0,{fillOpacity:r,stroke:l,strokeOpacity:c,lineDash:h,lineDashOffset:d}=s,u=this.getStrokeWidth(s.strokeWidth),p=i.animationManager.isSkipped();e.each((g,y)=>{const{centerX:f,centerY:m,innerRadius:b,outerRadius:x,startCornerRadius:S,endCornerRadius:M,fill:A}=y;g.centerX=f,g.centerY=m,g.innerRadius=b,g.outerRadius=x,g.pointerEvents=this.properties.bar.enabled?import_ag_charts_community245._ModuleSupport.PointerEvents.All:import_ag_charts_community245._ModuleSupport.PointerEvents.None,g.fill=A,g.fillOpacity=r,g.stroke=l,g.strokeOpacity=c,g.strokeWidth=u,g.lineDash=h,g.lineDashOffset=d,g.startOuterCornerRadius=S,g.startInnerCornerRadius=S,g.endOuterCornerRadius=M,g.endInnerCornerRadius=M,g.radialEdgeInset=(n+g.strokeWidth)/2,g.concentricEdgeInset=g.strokeWidth/2,(p||g.previousDatum==null)&&g.setProperties(resetRadialGaugeSeriesResetSectorFunction(g,y))}),this.datumUnion.update(e,this.itemGroup,import_ag_charts_community245._ModuleSupport.Sector,(g,y,f)=>{g.clipSector??(g.clipSector=new SectorBox6(NaN,NaN,NaN,NaN)),g.centerX=y.centerX,g.centerY=y.centerY,g.outerRadius=g.clipSector.outerRadius=y.outerRadius,g.innerRadius=g.clipSector.innerRadius=y.innerRadius,g.startAngle=g.clipSector.startAngle=y.startAngle,g.startInnerCornerRadius=y.startInnerCornerRadius,g.startOuterCornerRadius=y.startOuterCornerRadius,g.endAngle=f.endAngle,g.clipSector.endAngle=f.clipSector?.endAngle??f.endAngle,g.endInnerCornerRadius=f.endInnerCornerRadius,g.endOuterCornerRadius=f.endOuterCornerRadius,g.pointerEvents=import_ag_charts_community245._ModuleSupport.PointerEvents.None})}updateScaleSelection(t){return t.scaleSelection.update(t.scaleData,void 0,e=>createDatumId19(t.scaleData.length,e.itemId))}updateScaleNodes(t){const{scaleSelection:e}=t,{scale:i,segmentation:o}=this.properties,s=o.spacing??0,{fillOpacity:a,stroke:n,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}=i;e.each((d,u)=>{const{centerX:p,centerY:g,innerRadius:y,outerRadius:f,startCornerRadius:m,endCornerRadius:b,fill:x}=u;d.centerX=p,d.centerY=g,d.innerRadius=y,d.outerRadius=f,d.fill=x,d.fillOpacity=a,d.stroke=n,d.strokeOpacity=r,d.strokeWidth=l,d.lineDash=c,d.lineDashOffset=h,d.startOuterCornerRadius=m,d.startInnerCornerRadius=m,d.endOuterCornerRadius=b,d.endInnerCornerRadius=b,d.radialEdgeInset=(s+d.strokeWidth)/2,d.concentricEdgeInset=d.strokeWidth/2,d.setProperties(resetRadialGaugeSeriesResetSectorFunction(d,u))})}updateNeedleSelection(t){return t.needleSelection.update(t.needleData,void 0,()=>createDatumId19([]))}updateNeedleNodes(t){const{needleSelection:e}=t,{fill:i,fillOpacity:o,stroke:s,strokeOpacity:a,strokeWidth:n,lineDash:r,lineDashOffset:l}=this.properties.needle,c=this.ctx.animationManager.isSkipped();e.each((h,d)=>{const{centerX:u,centerY:p,radius:g}=d,y=g*2;h.d=RadialGaugeNeedle.defaultPathData,h.fill=i,h.fillOpacity=o,h.stroke=s,h.strokeOpacity=a,h.strokeWidth=n/y,h.lineDash=r.map(f=>f/y),h.lineDashOffset=l/y,h.translationX=u,h.translationY=p,h.scalingX=y,h.scalingY=y,c&&h.setProperties(resetRadialGaugeSeriesResetNeedleFunction(h,d))})}updateTargetSelection(t){return t.targetSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetNodes(t){const{targetSelection:e,isHighlight:i}=t,o=i?this.properties.highlightStyle.item:void 0;e.each((s,a)=>{const{centerX:n,centerY:r,angle:l,radius:c,shape:h,size:d,rotation:u,fill:p,fillOpacity:g,stroke:y,strokeOpacity:f,strokeWidth:m,lineDash:b,lineDashOffset:x}=a;s.shape=h==="line"?lineMarker:h,s.size=d,s.fill=o?.fill??p,s.fillOpacity=o?.fillOpacity??g,s.stroke=o?.stroke??y,s.strokeOpacity=o?.strokeOpacity??f,s.strokeWidth=o?.strokeWidth??m,s.lineDash=o?.lineDash??b,s.lineDashOffset=o?.lineDashOffset??x,s.translationX=n+c*Math.cos(l),s.translationY=r+c*Math.sin(l),s.rotation=l+u})}updateTargetLabelSelection(t){return t.targetLabelSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetLabelNodes(t){const{targetLabelSelection:e}=t;e.each((i,o)=>{const{centerX:s,centerY:a,radius:n,angle:r,text:l}=o,{offsetX:c,offsetY:h,fill:d,fontStyle:u,fontWeight:p,fontSize:g,fontFamily:y,textAlign:f,textBaseline:m}=o.label;if(l==null){i.visible=!1;return}i.visible=!0,i.x=s+n*Math.cos(r)+c,i.y=a+n*Math.sin(r)+h,i.text=l,i.fill=d,i.fontStyle=u,i.fontWeight=p,i.fontSize=g,i.fontFamily=y,i.textAlign=f,i.textBaseline=m})}updateLabelSelection(t){return t.labelSelection.update(t.labelData,void 0,e=>e.label)}updateLabelNodes(t){const{labelSelection:e}=t,i=this.ctx.animationManager.isSkipped();e.each((o,s)=>{o.fill=s.fill,o.fontStyle=s.fontStyle,o.fontWeight=s.fontWeight,o.fontFamily=s.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}labelsHaveExplicitText(){for(const{datum:t}of this.labelSelection)if(t.text==null)return!1;return!0}formatLabelText(t){if(this.axes[ChartAxisDirection30.X]==null)return;const{labelSelection:i,radius:o,textAlign:s,verticalAlign:a}=this,{spacing:n,innerRadiusRatio:r}=this.properties;formatRadialGaugeLabels(this,i,{padding:n,textAlign:s,verticalAlign:a},o*r,t)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),resetMotion3([this.datumSelection],resetRadialGaugeSeriesResetSectorFunction),resetMotion3([this.needleSelection],resetRadialGaugeSeriesResetNeedleFunction),this.formatLabelText()}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}animateLabelText(t={}){const{animationManager:e}=this.ctx;let i,o,s,a;if(this.labelSelection.each((n,r)=>{n.opacity=1,r.label==="primary"?(i=n.previousDatum?.value??t.from??r.value,o=r.value):r.label==="secondary"&&(s=n.previousDatum?.value??t.from??r.value,a=r.value)}),!this.labelsHaveExplicitText())if(o==null||a==null)this.formatLabelText();else if(i===o&&s===a)this.formatLabelText({label:o,secondaryLabel:a});else{const n=`${this.id}_labels`;e.animate({id:n,groupId:"label",from:{label:i,secondaryLabel:s},to:{label:o,secondaryLabel:a},phase:t.phase??"update",onUpdate:r=>this.formatLabelText(r)})}}animateEmptyUpdateReady(){const{animationManager:t}=this.ctx,{node:e,needle:i}=prepareRadialGaugeSeriesAnimationFunctions(!0,this.axes[ChartAxisDirection30.X]?.range[0]??0);fromToMotion3(this.id,"node",t,[this.datumSelection],e,(o,s)=>s.itemId),fromToMotion3(this.id,"needle",t,[this.needleSelection],i,()=>"needle"),fromToMotion3(this.id,"label",t,[this.labelSelection],fadeInFns,(o,s)=>s.label),this.animateLabelText({from:this.axes[ChartAxisDirection30.X]?.scale.domain[0]??0,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:t}=this.ctx,{node:e,needle:i}=prepareRadialGaugeSeriesAnimationFunctions(!1,this.axes[ChartAxisDirection30.X]?.range[0]??0);fromToMotion3(this.id,"node",t,[this.datumSelection],e,(o,s)=>s.itemId),fromToMotion3(this.id,"needle",t,[this.needleSelection],i,()=>"needle"),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}getLegendData(){return[]}getTooltipContent(t){const{id:e,properties:i}=this,{tooltip:o}=i;if(!i.isValid())return;const{value:s=i.value,text:a=i.label.text}=parseUnknownGaugeNodeDatum(t);return o.formatTooltip({data:[{label:a,fallbackLabel:"Value",value:this.formatLabel(s)}]},{seriesId:e,title:void 0,datum:void 0,value:s})}pickNodeClosestDatum(t){return pickGaugeNearestDatum(this,t)}pickFocus(t){return pickGaugeFocus(this,t)}getCaptionText(){const{value:t}=this.properties,e=[];return e.push(this.formatLabel(t)),this.labelSelection.each((i,o)=>{const s=getLabelText(this,o);s!=null&&e.push(s)}),e.join(". ")}};RadialGaugeSeries.className="RadialGaugeSeries",RadialGaugeSeries.type="radial-gauge";var{FONT_SIZE_RATIO:FONT_SIZE_RATIO2,ThemeSymbols:{DEFAULT_HIERARCHY_FILLS:DEFAULT_HIERARCHY_FILLS3,DEFAULT_GAUGE_SERIES_COLOR_RANGE:DEFAULT_GAUGE_SERIES_COLOR_RANGE2},ThemeConstants:{POLAR_AXIS_TYPE:POLAR_AXIS_TYPE10}}=import_ag_charts_community246._ModuleSupport,RadialGaugeModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["gauge"],identifier:"radial-gauge",moduleFactory:t=>new RadialGaugeSeries(t),tooltipDefaults:{range:10},defaultAxes:[{type:POLAR_AXIS_TYPE10.ANGLE_NUMBER,line:{enabled:!1}},{type:POLAR_AXIS_TYPE10.RADIUS_NUMBER,line:{enabled:!1}}],themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{outerRadiusRatio:1,innerRadiusRatio:.8,bar:{strokeWidth:0},segmentation:{enabled:!1,interval:{},spacing:2},defaultTarget:{fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},size:10,shape:"triangle",placement:"outside",spacing:5,label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:5}},needle:{enabled:!1,fill:{$ref:"foregroundColor"},spacing:10},label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:56,minimumFontSize:18/56,fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}},secondaryLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[FONT_SIZE_RATIO2.LARGE]},minimumFontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"}}},axes:{[POLAR_AXIS_TYPE10.ANGLE_NUMBER]:{startAngle:270,endAngle:450,nice:!1,line:{enabled:!1}}}},paletteFactory(t){const{takeColors:e,colorsCount:i,userPalette:o,themeTemplateParameters:s}=t,{fills:a}=e(i),n=s.get(DEFAULT_GAUGE_SERIES_COLOR_RANGE2),r=s.get(DEFAULT_HIERARCHY_FILLS3),l=o==="inbuilt"?n:[a[0],a[1]];return{scale:{defaultFill:r?.[1],stroke:r?.[2]},defaultColorRange:defaultColorStops(l)}}},import_ag_charts_community251=require("ag-charts-community"),import_ag_charts_community249=require("ag-charts-community"),AGGREGATION_THRESHOLD4=1e3;function aggregationContainsTopIndex(t,e,i,o,s,a){const n=t[a];if(n==null)return!1;const r=xRatioForDatumIndex(n,e,i),l=aggregationIndexForXRatio(r,s);return a===o[l+Y_MAX]}function aggregationContainsBottomIndex(t,e,i,o,s,a){const n=t[a];if(n==null)return!1;const r=xRatioForDatumIndex(n,e,i),l=aggregationIndexForXRatio(r,s);return a===o[l+Y_MIN]}function aggregateData(t,e,i,o){if(t.length64;)({maxRange:n}=compactAggregationIndices(r,l,n,{inPlace:!0})),c=c.filter(aggregationContainsTopIndex.bind(null,t,s,a,r,n)),h=h.filter(aggregationContainsBottomIndex.bind(null,t,s,a,r,n)),d.push({maxRange:n,topIndices:c,bottomIndices:h});return d.reverse(),d}var import_ag_charts_community247=require("ag-charts-community"),{CartesianSeriesProperties:CartesianSeriesProperties2,InterpolationProperties,SeriesMarker:SeriesMarker2,SeriesTooltip:SeriesTooltip19,Validate:Validate82,BOOLEAN:BOOLEAN33,COLOR_STRING:COLOR_STRING26,LINE_DASH:LINE_DASH22,OBJECT:OBJECT42,PLACEMENT,POSITIVE_NUMBER:POSITIVE_NUMBER34,RATIO:RATIO32,STRING:STRING39,DropShadow:DropShadow3,Label:Label14}=import_ag_charts_community247._ModuleSupport,RangeAreaSeriesLabel=class extends Label14{constructor(){super(...arguments),this.placement="outside",this.padding=6}};__decorateClass([Validate82(PLACEMENT)],RangeAreaSeriesLabel.prototype,"placement",2),__decorateClass([Validate82(POSITIVE_NUMBER34)],RangeAreaSeriesLabel.prototype,"padding",2);var RangeAreaProperties=class extends CartesianSeriesProperties2{constructor(){super(...arguments),this.fill="#99CCFF",this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new InterpolationProperties,this.shadow=new DropShadow3().set({enabled:!1}),this.marker=new SeriesMarker2,this.label=new RangeAreaSeriesLabel,this.tooltip=new SeriesTooltip19,this.connectMissingData=!1}};__decorateClass([Validate82(STRING39)],RangeAreaProperties.prototype,"xKey",2),__decorateClass([Validate82(STRING39)],RangeAreaProperties.prototype,"yLowKey",2),__decorateClass([Validate82(STRING39)],RangeAreaProperties.prototype,"yHighKey",2),__decorateClass([Validate82(STRING39,{optional:!0})],RangeAreaProperties.prototype,"xName",2),__decorateClass([Validate82(STRING39,{optional:!0})],RangeAreaProperties.prototype,"yName",2),__decorateClass([Validate82(STRING39,{optional:!0})],RangeAreaProperties.prototype,"yLowName",2),__decorateClass([Validate82(STRING39,{optional:!0})],RangeAreaProperties.prototype,"yHighName",2),__decorateClass([Validate82(COLOR_STRING26)],RangeAreaProperties.prototype,"fill",2),__decorateClass([Validate82(RATIO32)],RangeAreaProperties.prototype,"fillOpacity",2),__decorateClass([Validate82(COLOR_STRING26)],RangeAreaProperties.prototype,"stroke",2),__decorateClass([Validate82(POSITIVE_NUMBER34)],RangeAreaProperties.prototype,"strokeWidth",2),__decorateClass([Validate82(RATIO32)],RangeAreaProperties.prototype,"strokeOpacity",2),__decorateClass([Validate82(LINE_DASH22)],RangeAreaProperties.prototype,"lineDash",2),__decorateClass([Validate82(POSITIVE_NUMBER34)],RangeAreaProperties.prototype,"lineDashOffset",2),__decorateClass([Validate82(OBJECT42)],RangeAreaProperties.prototype,"interpolation",2),__decorateClass([Validate82(OBJECT42)],RangeAreaProperties.prototype,"shadow",2),__decorateClass([Validate82(OBJECT42)],RangeAreaProperties.prototype,"marker",2),__decorateClass([Validate82(OBJECT42)],RangeAreaProperties.prototype,"label",2),__decorateClass([Validate82(OBJECT42)],RangeAreaProperties.prototype,"tooltip",2),__decorateClass([Validate82(BOOLEAN33)],RangeAreaProperties.prototype,"connectMissingData",2);var import_ag_charts_community248=require("ag-charts-community"),{CollapseMode,isScaleValid,pairUpSpans,prepareAreaFillAnimationFns,plotInterpolatedLinePathStroke,prepareLinePathPropertyAnimation,areScalingEqual}=import_ag_charts_community248._ModuleSupport;function prepareRangeAreaPathStrokeAnimationFns(t,e,i,o){const s=(l,c)=>{plotInterpolatedLinePathStroke(l,c,e.removed),plotInterpolatedLinePathStroke(l,c,i.removed)},a=(l,c)=>{plotInterpolatedLinePathStroke(l,c,e.moved),plotInterpolatedLinePathStroke(l,c,i.moved)},n=(l,c)=>{plotInterpolatedLinePathStroke(l,c,e.added),plotInterpolatedLinePathStroke(l,c,i.added)},r=prepareLinePathPropertyAnimation(t,o);return{status:t,path:{addPhaseFn:n,updatePhaseFn:a,removePhaseFn:s},pathProperties:r}}function prepareRangeAreaPathAnimation(t,e,i){const o=t.scales.x?.type==="category",s=e.scales.x?.type==="category";if(o!==s||!isScaleValid(t.scales.x)||!isScaleValid(e.scales.x))return;let a="updated";e.visible&&!t.visible?a="removed":!e.visible&&t.visible&&(a="added");const n=pairUpSpans({scales:t.scales,data:t.fillData.spans},{scales:e.scales,data:e.fillData.spans},CollapseMode.Split);if(n==null)return;const r=pairUpSpans({scales:t.scales,data:t.fillData.phantomSpans},{scales:e.scales,data:e.fillData.phantomSpans},CollapseMode.Split);if(r==null)return;const l=pairUpSpans({scales:t.scales,data:t.highStrokeData.spans},{scales:e.scales,data:e.highStrokeData.spans},CollapseMode.Split);if(l==null)return;const c=pairUpSpans({scales:t.scales,data:t.lowStrokeData.spans},{scales:e.scales,data:e.lowStrokeData.spans},CollapseMode.Split);if(c==null)return;const h="fade",d=prepareAreaFillAnimationFns(a,n,r,h),u=prepareRangeAreaPathStrokeAnimationFns(a,l,c,h),p=(i?.changed??!0)||!areScalingEqual(t.scales.x,e.scales.x)||!areScalingEqual(t.scales.y,e.scales.y)||a!=="updated";return{status:a,fill:d,stroke:u,hasMotion:p}}var{valueProperty:valueProperty16,keyProperty:keyProperty8,ChartAxisDirection:ChartAxisDirection31,mergeDefaults:mergeDefaults5,updateLabelNode:updateLabelNode2,fixNumericExtent:fixNumericExtent8,buildResetPathFn,resetLabelFn:resetLabelFn4,resetMarkerFn:resetMarkerFn2,resetMarkerPositionFn,pathSwipeInAnimation,resetMotion:resetMotion4,markerSwipeScaleInAnimation,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation5,animationValidation:animationValidation7,diff:diff6,updateClipPath,computeMarkerFocusBounds:computeMarkerFocusBounds3,plotAreaPathFill,plotLinePathStroke,interpolatePoints,pathFadeInAnimation,markerFadeInAnimation:markerFadeInAnimation2,fromToMotion:fromToMotion4,pathMotion,extent:extent2,createDatumId:createDatumId20,PointerEvents:PointerEvents11,Group:Group20,BBox:BBox19,ContinuousScale:ContinuousScale7,OrdinalTimeScale:OrdinalTimeScale5,findMinMax:findMinMax3}=import_ag_charts_community249._ModuleSupport,RangeAreaSeriesNodeEvent=class extends import_ag_charts_community249._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o),this.xKey=o.properties.xKey,this.yLowKey=o.properties.yLowKey,this.yHighKey=o.properties.yHighKey}},RangeAreaSeries=class extends import_ag_charts_community249._ModuleSupport.CartesianSeries{constructor(t){super({moduleCtx:t,hasMarkers:!0,pathsPerSeries:["fill","stroke"],pickModes:[import_ag_charts_community249._ModuleSupport.SeriesNodePickMode.AXIS_ALIGNED],directionKeys:{[ChartAxisDirection31.X]:["xKey"],[ChartAxisDirection31.Y]:["yLowKey","yHighKey"]},directionNames:{[ChartAxisDirection31.X]:["xName"],[ChartAxisDirection31.Y]:["yLowName","yHighName","yName"]},animationResetFns:{path:buildResetPathFn({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:resetLabelFn4,marker:(e,i)=>({...resetMarkerFn2(e),...resetMarkerPositionFn(e,i)})}}),this.properties=new RangeAreaProperties,this.NodeEvent=RangeAreaSeriesNodeEvent,this.dataAggregationFilters=void 0}async processData(t){if(!this.properties.isValid())return;const{xKey:e,yLowKey:i,yHighKey:o}=this.properties,s=this.axes[ChartAxisDirection31.X]?.scale,a=this.axes[ChartAxisDirection31.Y]?.scale,{xScaleType:n,yScaleType:r}=this.getScaleInformation({xScale:s,yScale:a}),l=[],c=!this.ctx.animationManager.isSkipped();!this.ctx.animationManager.isSkipped()&&this.processedData&&l.push(diff6(this.id,this.processedData)),c&&l.push(animationValidation7());const{dataModel:h,processedData:d}=await this.requestDataModel(t,this.data,{props:[keyProperty8(e,n,{id:"xValue"}),valueProperty16(i,r,{id:"yLowValue"}),valueProperty16(o,r,{id:"yHighValue"}),...l]});this.dataAggregationFilters=this.aggregateData(h,d),this.animationState.transition("updateData")}aggregateData(t,e){const i=this.axes[ChartAxisDirection31.X];if(i==null||!(ContinuousScale7.is(i.scale)||OrdinalTimeScale5.is(i.scale)))return;const o=t.resolveKeysById(this,"xValue",e),s=t.resolveColumnById(this,"yHighValue",e),a=t.resolveColumnById(this,"yLowValue",e),{index:n}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[n];return aggregateData(o,s,a,r)}xCoordinateRange(t){const e=this.axes[ChartAxisDirection31.X].scale.convert(t);return[e,e]}yCoordinateRange(t){const e=this.axes[ChartAxisDirection31.Y].scale.convert(t[0]);return[e,e]}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!(e&&i))return[];const{domain:{keys:[o]}}=e;if(t===ChartAxisDirection31.X){const s=i.resolveProcessedDataDefById(this,"xValue");return s?.def.type==="key"&&s.def.valueType==="category"?o:fixNumericExtent8(extent2(o))}else{const s=this.domainForClippedRange(ChartAxisDirection31.Y,["yHighValue","yLowValue"],"xValue",!0),a=findMinMax3(s);return fixNumericExtent8(a)}}getSeriesRange(t,e){return this.domainForVisibleRange(ChartAxisDirection31.Y,["yHighValue","yLowValue"],"xValue",e,!0)}createNodeData(){const{data:t,dataModel:e,processedData:i,axes:o}=this,s=o[ChartAxisDirection31.X],a=o[ChartAxisDirection31.Y];if(!(t&&s&&a&&e&&i))return;const n=s.scale,r=a.scale,{xKey:l,yLowKey:c,yHighKey:h,connectMissingData:d,marker:u,interpolation:p}=this.properties,g=i.dataSources.get(this.id)??[],y=(n.bandwidth??0)/2,f=e.resolveKeysById(this,"xValue",i),m=e.resolveColumnById(this,"yHighValue",i),b=e.resolveColumnById(this,"yLowValue",i),x=L=>n.convert(f[L])+y,S=[],M=[],A=[],v=(L,R,V)=>{const F=g[L],G=f[L];if(G==null)return;const W=A[A.length-1];if(Number.isFinite(R)&&Number.isFinite(V)){const H=(q,Q,Y)=>{M.push({index:L,series:this,itemId:q,datum:F,datumIndex:L,midPoint:{x:j,y:Y},yHighValue:R,yLowValue:V,xValue:G,xKey:l,yLowKey:c,yHighKey:h,point:{x:j,y:Y,size:X},enabled:!0});const st=this.createLabelData({datumIndex:L,point:{x:j,y:Y},value:Q,yLowValue:V,yHighValue:R,itemId:q,inverted:U,datum:F,series:this});S.push(st)},U=V>R,j=x(L),$=r.convert(R),Z=r.convert(V),{size:X}=u;H("high",R,$),H("low",V,Z);const K={high:{point:{x:j,y:$},xDatum:G,yDatum:R},low:{point:{x:j,y:Z},xDatum:G,yDatum:V}};Array.isArray(W)?W.push(K):W!=null?(W.skip+=1,A.push([K])):A.push([K])}else d||(Array.isArray(W)||W==null?A.push({skip:0}):W.skip+=1)},{dataAggregationFilters:k}=this,[D,C]=n.range,_=C-D,I=k?.find(L=>L.maxRange>_),T=I?.topIndices,O=I?.bottomIndices;let[w,E]=this.visibleRange("xValue",s.range,T);w=Math.max(w-1,0),E=Math.min(E+1,T?.length??f.length),i.input.count<1e3&&(w=0,E=i.input.count);for(let L=w;L{if(!Array.isArray(L))return[];const R=L.map(V=>V.high);return interpolatePoints(R,p)}),z=A.flatMap(L=>{if(!Array.isArray(L))return[];const R=L.map(V=>V.low);return interpolatePoints(R,p)});return{itemId:`${c}-${h}`,labelData:S,nodeData:M,fillData:{itemId:"high",spans:B,phantomSpans:z},highStrokeData:{itemId:"high",spans:B},lowStrokeData:{itemId:"low",spans:z},scales:this.calculateScaling(),visible:this.visible}}createLabelData({datumIndex:t,point:e,value:i,itemId:o,inverted:s,datum:a,series:n}){const{xKey:r,yLowKey:l,yHighKey:c,xName:h,yName:d,yLowName:u,yHighName:p,label:g}=this.properties,{placement:y,padding:f=10}=g;let m=o;s&&(m=o==="low"?"high":"low");const b=y==="outside"&&m==="high"||y==="inside"&&m==="low"?-1:1;return{x:e.x,y:e.y+f*b,series:n,itemId:o,datum:a,datumIndex:t,text:this.getLabelText(g,{value:i,datum:a,itemId:o,xKey:r,yLowKey:l,yHighKey:c,xName:h,yLowName:u,yHighName:p,yName:d}),textAlign:"center",textBaseline:b===-1?"bottom":"top"}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{opacity:e,visible:i,animationEnabled:o}=t,[s,a]=t.paths,n=this.getStrokeWidth(this.properties.strokeWidth);a.setProperties({fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:PointerEvents11.None,stroke:this.properties.stroke,strokeWidth:n,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:e,visible:i||o}),s.setProperties({stroke:void 0,lineJoin:"round",pointerEvents:PointerEvents11.None,fill:this.properties.fill,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,strokeOpacity:this.properties.strokeOpacity,fillShadow:this.properties.shadow,strokeWidth:n,opacity:e,visible:i||o}),updateClipPath(this,a),updateClipPath(this,s)}updatePaths(t){this.updateAreaPaths(t.paths,t.contextData)}updateAreaPaths(t,e){for(const i of t)i.visible=e.visible;if(e.visible)this.updateFillPath(t,e),this.updateStrokePath(t,e);else for(const i of t)i.path.clear(),i.markDirty()}updateFillPath(t,e){const[i]=t;i.path.clear(),plotAreaPathFill(i,e.fillData),i.markDirty()}updateStrokePath(t,e){const[,i]=t;i.path.clear(),plotLinePathStroke(i,e.highStrokeData.spans),plotLinePathStroke(i,e.lowStrokeData.spans),i.markDirty()}updateMarkerSelection(t){const{nodeData:e,markerSelection:i}=t;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?e:[])}getMarkerItemBaseStyle(t){const{properties:e}=this,{marker:i}=e,o=t?e.highlightStyle.item:void 0;return{shape:i.shape,size:i.size,fill:o?.fill??i.fill,fillOpacity:o?.fillOpacity??i.fillOpacity,stroke:o?.stroke??i.stroke,strokeWidth:o?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:o?.strokeOpacity??i.strokeOpacity,lineDash:o?.lineDash??i.lineDash,lineDashOffset:o?.lineDashOffset??i.lineDashOffset}}getMarkerItemStyleOverrides(t,e,i,o){const{id:s,properties:a}=this,{xKey:n,yHighKey:r,yLowKey:l,marker:c}=a,{itemStyler:h}=c;if(h!=null)return this.cachedDatumCallback(createDatumId20(t,o?"highlight":"node"),()=>h({seriesId:s,datum:e,xKey:n,yHighKey:r,yLowKey:l,highlighted:o,...i}))}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:o,yLowKey:s,yHighKey:a,marker:n,fill:r,stroke:l,strokeWidth:c,fillOpacity:h,strokeOpacity:d}=this.properties,u=mergeDefaults5(i&&this.properties.highlightStyle.item,n.getStyle(),{fill:r,fillOpacity:h,stroke:l,strokeWidth:c,strokeOpacity:d});e.each((p,g)=>{this.updateMarkerStyle(p,n,{datum:g,highlighted:i,xKey:o,yHighKey:a,yLowKey:s},u)}),i||this.properties.marker.markClean()}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e,o=>{o.pointerEvents=PointerEvents11.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{updateLabelNode2(e,this.properties.label,i)})}getHighlightLabelData(t,e){const i=t.filter(o=>o.datum===e.datum);return i.length>0?i:void 0}getHighlightData(t,e){const i=t.filter(o=>o.datum===e.datum);return i.length>0?i:void 0}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,axes:s,properties:a}=this,{xName:n,yName:r,yLowKey:l,yLowName:c,xKey:h,yHighKey:d,yHighName:u,tooltip:p}=a,g=s[ChartAxisDirection31.X],y=s[ChartAxisDirection31.Y];if(!i||!o||!g||!y)return;const{datumIndex:f}=t,m=o.dataSources.get(this.id)?.[f],b=i.resolveKeysById(this,"xValue",o)[f],x=i.resolveColumnById(this,"yHighValue",o)[f],S=i.resolveColumnById(this,"yLowValue",o)[f];if(b==null)return;const M=this.getMarkerItemBaseStyle(!1);Object.assign(M,this.getMarkerItemStyleOverrides(String(f),f,M,!1));const A=`${y.formatDatum(S)} - ${y.formatDatum(x)}`;return p.formatTooltip({heading:g.formatDatum(b),symbol:this.legendItemSymbol(),data:[{label:r,fallbackLabel:`${c??l} - ${u??d}`,value:A}]},{seriesId:e,datum:m,title:r,itemId:t.itemId,xName:n,yName:r,yLowKey:l,yLowName:c,xKey:h,yHighKey:d,yHighName:u,...M})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,strokeOpacity:o,lineDash:s,marker:a}=this.properties;return{marker:{shape:a.shape,fill:a.fill??t,stroke:a.stroke??e,fillOpacity:a.fillOpacity,strokeOpacity:a.strokeOpacity,strokeWidth:a.strokeWidth,lineDash:a.lineDash,lineDashOffset:a.lineDashOffset},line:{stroke:e,strokeOpacity:o,strokeWidth:i,lineDash:s}}}getLegendData(t){if(t!=="category")return[];const{id:e,visible:i}=this,{yLowKey:o,yHighKey:s,yName:a,yLowName:n,yHighName:r,showInLegend:l}=this.properties,c=a??`${n??o} - ${r??s}`,h=`${o}-${s}`;return[{legendType:"category",id:e,itemId:h,seriesId:e,enabled:i,label:{text:`${c}`},symbol:this.legendItemSymbol(),hideInLegend:!l}]}isLabelEnabled(){return this.properties.label.enabled}onDataChange(){}nodeFactory(){return new Group20}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,contextData:o,paths:s}=t,{animationManager:a}=this.ctx;this.updateAreaPaths(s,o),pathSwipeInAnimation(this,a,...s),resetMotion4([e],resetMarkerPositionFn),markerSwipeScaleInAnimation(this,a,e),seriesLabelFadeInAnimation5(this,"labels",a,i)}animateReadyResize(t){const{contextData:e,paths:i}=t;this.updateAreaPaths(i,e),super.animateReadyResize(t)}animateWaitingUpdateReady(t){const{animationManager:e}=this.ctx,{markerSelection:i,labelSelection:o,contextData:s,paths:a,previousContextData:n}=t,[r,l]=a;if(r==null&&l==null)return;this.resetMarkerAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateAreaPaths(a,s)},h=()=>{e.skipCurrentBatch(),c()};if(s==null||n==null){c(),markerFadeInAnimation2(this,e,"added",i),pathFadeInAnimation(this,"fill_path_properties",e,"add",r),pathFadeInAnimation(this,"stroke_path_properties",e,"add",l),seriesLabelFadeInAnimation5(this,"labels",e,o);return}const d=prepareRangeAreaPathAnimation(s,n,this.processedData?.reduced?.diff?.[this.id]);if(d===void 0){h();return}else if(d.status==="no-op")return;fromToMotion4(this.id,"fill_path_properties",e,[r],d.fill.pathProperties),fromToMotion4(this.id,"stroke_path_properties",e,[l],d.stroke.pathProperties),d.status==="added"?this.updateAreaPaths(a,s):d.status==="removed"?this.updateAreaPaths(a,n):(pathMotion(this.id,"fill_path_update",e,[r],d.fill.path),pathMotion(this.id,"stroke_path_update",e,[l],d.stroke.path)),d.hasMotion&&(markerFadeInAnimation2(this,e,void 0,i),seriesLabelFadeInAnimation5(this,"labels",e,o)),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(a,s)})}getFormattedMarkerStyle(t){const{xKey:e,yLowKey:i,yHighKey:o}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:t,xKey:e,yLowKey:i,yHighKey:o,highlighted:!0})}computeFocusBounds(t){const e=computeMarkerFocusBounds3(this,t),i=computeMarkerFocusBounds3(this,{...t,datumIndex:t.datumIndex+1});if(e&&i)return BBox19.merge([e,i])}computeFocusDatumIndex(t,e){const i={...t,datumIndex:t.datumIndex+t.datumIndexDelta,datumIndexDelta:t.datumIndexDelta*2};return super.computeFocusDatumIndex(i,e)}};RangeAreaSeries.className="RangeAreaSeries",RangeAreaSeries.type="range-area";var import_ag_charts_community250=require("ag-charts-community"),RANGE_AREA_SERIES_THEME={series:{fillOpacity:.7,nodeClickRange:"nearest",marker:{enabled:!1,size:6,strokeWidth:2},label:{enabled:!1,placement:"outside",padding:10,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},interpolation:{type:"linear",tension:1,position:"end"}},axes:{[import_ag_charts_community250._ModuleSupport.ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},{markerPaletteFactory:markerPaletteFactory2,ThemeConstants:{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE10,CARTESIAN_POSITION:CARTESIAN_POSITION6}}=import_ag_charts_community251._ModuleSupport,RangeAreaModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"range-area",moduleFactory:t=>new RangeAreaSeries(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:CARTESIAN_AXIS_TYPE10.NUMBER,position:CARTESIAN_POSITION6.LEFT},{type:CARTESIAN_AXIS_TYPE10.CATEGORY,position:CARTESIAN_POSITION6.BOTTOM}],themeTemplate:RANGE_AREA_SERIES_THEME,paletteFactory:t=>{const{marker:e}=markerPaletteFactory2(t);return{fill:e.fill,stroke:e.stroke,marker:e}}},import_ag_charts_community255=require("ag-charts-community"),import_ag_charts_community253=require("ag-charts-community"),AGGREGATION_THRESHOLD5=1e3,PRECISION2=5;function aggregateRangeBarData(t,e,i,o){if(t.length64;)({indexData:r,valueData:l,maxRange:n}=compactAggregationIndices(r,l,n)),c.push({maxRange:n,indexData:r});return c.reverse(),c}var import_ag_charts_community252=require("ag-charts-community"),{AbstractBarSeriesProperties:AbstractBarSeriesProperties5,SeriesTooltip:SeriesTooltip20,Validate:Validate83,COLOR_STRING:COLOR_STRING27,FUNCTION:FUNCTION20,LINE_DASH:LINE_DASH23,OBJECT:OBJECT43,PLACEMENT:PLACEMENT2,POSITIVE_NUMBER:POSITIVE_NUMBER35,RATIO:RATIO33,STRING:STRING40,BOOLEAN:BOOLEAN34,DropShadow:DropShadow4,Label:Label15}=import_ag_charts_community252._ModuleSupport,RangeBarSeriesLabel=class extends Label15{constructor(){super(...arguments),this.placement="inside",this.padding=6}};__decorateClass([Validate83(PLACEMENT2)],RangeBarSeriesLabel.prototype,"placement",2),__decorateClass([Validate83(POSITIVE_NUMBER35)],RangeBarSeriesLabel.prototype,"padding",2);var RangeBarProperties=class extends AbstractBarSeriesProperties5{constructor(){super(...arguments),this.fill="#99CCFF",this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.shadow=new DropShadow4().set({enabled:!1}),this.label=new RangeBarSeriesLabel,this.tooltip=new SeriesTooltip20,this.fastDataProcessing=!1}};__decorateClass([Validate83(STRING40)],RangeBarProperties.prototype,"xKey",2),__decorateClass([Validate83(STRING40)],RangeBarProperties.prototype,"yLowKey",2),__decorateClass([Validate83(STRING40)],RangeBarProperties.prototype,"yHighKey",2),__decorateClass([Validate83(STRING40,{optional:!0})],RangeBarProperties.prototype,"xName",2),__decorateClass([Validate83(STRING40,{optional:!0})],RangeBarProperties.prototype,"yName",2),__decorateClass([Validate83(STRING40,{optional:!0})],RangeBarProperties.prototype,"yLowName",2),__decorateClass([Validate83(STRING40,{optional:!0})],RangeBarProperties.prototype,"yHighName",2),__decorateClass([Validate83(COLOR_STRING27)],RangeBarProperties.prototype,"fill",2),__decorateClass([Validate83(RATIO33)],RangeBarProperties.prototype,"fillOpacity",2),__decorateClass([Validate83(COLOR_STRING27)],RangeBarProperties.prototype,"stroke",2),__decorateClass([Validate83(POSITIVE_NUMBER35)],RangeBarProperties.prototype,"strokeWidth",2),__decorateClass([Validate83(RATIO33)],RangeBarProperties.prototype,"strokeOpacity",2),__decorateClass([Validate83(LINE_DASH23)],RangeBarProperties.prototype,"lineDash",2),__decorateClass([Validate83(POSITIVE_NUMBER35)],RangeBarProperties.prototype,"lineDashOffset",2),__decorateClass([Validate83(POSITIVE_NUMBER35)],RangeBarProperties.prototype,"cornerRadius",2),__decorateClass([Validate83(FUNCTION20,{optional:!0})],RangeBarProperties.prototype,"itemStyler",2),__decorateClass([Validate83(OBJECT43)],RangeBarProperties.prototype,"shadow",2),__decorateClass([Validate83(OBJECT43)],RangeBarProperties.prototype,"label",2),__decorateClass([Validate83(OBJECT43)],RangeBarProperties.prototype,"tooltip",2),__decorateClass([Validate83(BOOLEAN34)],RangeBarProperties.prototype,"fastDataProcessing",2);var{SeriesNodePickMode:SeriesNodePickMode16,valueProperty:valueProperty17,keyProperty:keyProperty9,ChartAxisDirection:ChartAxisDirection32,checkCrisp:checkCrisp2,updateLabelNode:updateLabelNode3,SMALLEST_KEY_INTERVAL:SMALLEST_KEY_INTERVAL4,LARGEST_KEY_INTERVAL:LARGEST_KEY_INTERVAL2,diff:diff7,prepareBarAnimationFunctions:prepareBarAnimationFunctions2,midpointStartingBarPosition:midpointStartingBarPosition2,resetBarSelectionsFn:resetBarSelectionsFn2,fixNumericExtent:fixNumericExtent9,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation6,resetLabelFn:resetLabelFn5,animationValidation:animationValidation8,computeBarFocusBounds:computeBarFocusBounds5,visibleRangeIndices:visibleRangeIndices2,createDatumId:createDatumId21,ContinuousScale:ContinuousScale8,OrdinalTimeScale:OrdinalTimeScale6,Rect:Rect7,PointerEvents:PointerEvents12,motion:motion9,applyShapeStyle:applyShapeStyle10,findMinMax:findMinMax4}=import_ag_charts_community253._ModuleSupport,RangeBarSeriesNodeEvent=class extends import_ag_charts_community253._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,o){super(t,e,i,o),this.xKey=o.properties.xKey,this.yLowKey=o.properties.yLowKey,this.yHighKey=o.properties.yHighKey}},RangeBarSeries=class extends import_ag_charts_community253._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,pickModes:[SeriesNodePickMode16.AXIS_ALIGNED,SeriesNodePickMode16.EXACT_SHAPE_MATCH],hasHighlightedLabels:!0,directionKeys:{x:["xKey"],y:["yLowKey","yHighKey"]},directionNames:{x:["xName"],y:["yLowName","yHighName","yName"]},datumSelectionGarbageCollection:!1,animationResetFns:{datum:resetBarSelectionsFn2,label:resetLabelFn5}}),this.properties=new RangeBarProperties,this.dataAggregationFilters=void 0,this.NodeEvent=RangeBarSeriesNodeEvent}async processData(t){if(!this.properties.isValid())return;const{xKey:e,yLowKey:i,yHighKey:o,fastDataProcessing:s}=this.properties,a=!s,n=this.getCategoryAxis()?.scale,r=this.getValueAxis()?.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:n,yScale:r}),d=[];this.ctx.animationManager.isSkipped()||(this.processedData&&d.push(diff7(this.id,this.processedData)),d.push(animationValidation8()));const u=this.visible?{}:{forceValue:0},{dataModel:p,processedData:g}=await this.requestDataModel(t,this.data,{props:[keyProperty9(e,c,{id:"xValue"}),valueProperty17(i,h,{id:"yLowValue",invalidValue:null,...u}),valueProperty17(o,h,{id:"yHighValue",invalidValue:null,...u}),...l?[SMALLEST_KEY_INTERVAL4,LARGEST_KEY_INTERVAL2]:[],...d],groupByKeys:a});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.largestDataInterval=g.reduced?.largestKeyInterval,this.dataAggregationFilters=this.aggregateData(p,g),this.animationState.transition("updateData")}aggregateData(t,e){if(e.type!=="grouped")return;const i=this.axes[ChartAxisDirection32.X];if(i==null||!(ContinuousScale8.is(i.scale)||OrdinalTimeScale6.is(i.scale)))return;const o=t.resolveKeysById(this,"xValue",e),s=t.resolveColumnById(this,"yHighValue",e),a=t.resolveColumnById(this,"yLowValue",e),{index:n}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[n];return aggregateRangeBarData(o,s,a,r)}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!e||!i)return[];const{keys:[o]}=e.domain;if(t===this.getCategoryDirection()){const s=i.resolveProcessedDataDefById(this,"xValue");return s?.def.type==="key"&&s?.def.valueType==="category"?o:this.padBandExtent(o)}else{const s=this.domainForClippedRange(ChartAxisDirection32.Y,["yHighValue","yLowValue"],"xValue",!0),a=findMinMax4(s);return fixNumericExtent9(a)}}getSeriesRange(t,e){return this.domainForVisibleRange(ChartAxisDirection32.Y,["yHighValue","yLowValue"],"xValue",e,!0)}createNodeData(){const{data:t,dataModel:e,groupScale:i,processedData:o,visible:s}=this,a=this.getCategoryAxis(),n=this.getValueAxis();if(!(t&&a&&n&&e&&o?.dataSources))return;const r=a.scale,l=n.scale,c=this.getBarDirection()===ChartAxisDirection32.X,{xKey:h,yLowKey:d,yHighKey:u,strokeWidth:p}=this.properties,g=`${d}-${u}`,y={itemId:g,nodeData:[],labelData:[],scales:this.calculateScaling(),visible:this.visible};if(!s)return y;const f=o.dataSources.get(this.id)??[],m=e.resolveKeysById(this,"xValue",o),b=e.resolveColumnById(this,"yLowValue",o),x=e.resolveColumnById(this,"yHighValue",o),{barWidth:S,groupIndex:M}=this.updateGroupScale(a),A=ContinuousScale8.is(r)?S*-.5:0,v=i.convert(String(M)),k=checkCrisp2(a?.scale,a?.visibleRange,this.smallestDataInterval,this.largestDataInterval),D=E=>Math.round(r.convert(m[E]))+v+A,C=(E,B,z,P,L,R,V)=>{const F=f[E],G=m[E];if(G==null)return;const W=b[E],H=x[E];if(!Number.isFinite(W?.valueOf())||!Number.isFinite(H?.valueOf()))return;const[U,j]=WE.maxRange>O);if(w!=null){const{maxRange:E,indexData:B}=w,[z,P]=visibleRangeIndices2(E,a.range,L=>{const R=L*SPAN,V=B[R+X_MIN],F=B[R+X_MAX];if(V===-1)return;const G=(V+F)/2|0;return[D(G),D(F)+S]});for(let L=z;L[D(z),S]);o.input.count<1e3&&(E=0,B=o.input.count);for(let z=E;zthis.getDatumId(s))}getItemBaseStyle(t){const{properties:e}=this,{cornerRadius:i}=e,o=t?e.highlightStyle.item:void 0;return{fill:o?.fill??e.fill,fillOpacity:o?.fillOpacity??e.fillOpacity,stroke:o?.stroke??e.stroke,strokeWidth:o?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:o?.strokeOpacity??e.strokeOpacity,lineDash:o?.lineDash??e.lineDash??[],lineDashOffset:o?.lineDashOffset??e.lineDashOffset,cornerRadius:i}}getItemStyleOverrides(t,e,i,o){const{id:s,properties:a}=this,{xKey:n,yHighKey:r,yLowKey:l,itemStyler:c}=a;if(c!=null)return this.cachedDatumCallback(createDatumId21(t,o?"highlight":"node"),()=>c({seriesId:s,datum:e,xKey:n,yHighKey:r,yLowKey:l,highlighted:o,...i}))}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,o=this.getCategoryDirection()===ChartAxisDirection32.X,s=this.getItemBaseStyle(i);e.each((a,n)=>{const r=this.getItemStyleOverrides(String(n.datumIndex),n.datum,s,i);applyShapeStyle10(a,s,r),a.cornerRadius=r?.cornerRadius??s.cornerRadius,a.visible=o?n.width>0:n.height>0,a.crisp=n.crisp})}getHighlightLabelData(t,e){const i=t.filter(o=>o.datum===e.datum);return i.length>0?i:void 0}updateLabelSelection(t){const e=this.properties.label.enabled?t.labelData:[];return t.labelSelection.update(e,i=>{i.pointerEvents=PointerEvents12.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{updateLabelNode3(e,this.properties.label,i)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,properties:s}=this,{xKey:a,xName:n,yName:r,yLowKey:l,yHighKey:c,yLowName:h,yHighName:d,tooltip:u}=s,p=this.getCategoryAxis(),g=this.getValueAxis();if(!i||!o||!p||!g)return;const{datumIndex:y}=t,f=o.dataSources.get(this.id)?.[y],m=i.resolveKeysById(this,"xValue",o)[y],b=i.resolveColumnById(this,"yHighValue",o)[y],x=i.resolveColumnById(this,"yLowValue",o)[y];if(m==null)return;const S=this.getItemBaseStyle(!1);Object.assign(S,this.getItemStyleOverrides(String(y),f,S,!1));const M=`${g.formatDatum(x)} - ${g.formatDatum(b)}`;return u.formatTooltip({heading:p.formatDatum(m),symbol:this.legendItemSymbol(),data:[{label:r,fallbackLabel:`${h??l} - ${d??c}`,value:M}]},{seriesId:e,datum:f,title:r,xKey:a,xName:n,yName:r,yLowKey:l,yHighKey:c,yLowName:h,yHighName:d,...S})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,fillOpacity:o,strokeOpacity:s,lineDash:a,lineDashOffset:n}=this.properties;return{marker:{fill:t,stroke:e,fillOpacity:o,strokeOpacity:s,strokeWidth:i,lineDash:a,lineDashOffset:n}}}getLegendData(t){if(t!=="category")return[];const{id:e,visible:i}=this,{yName:o,yLowName:s,yHighName:a,yLowKey:n,yHighKey:r,showInLegend:l}=this.properties,c=o??`${s??n} - ${a??r}`,h=`${n}-${r}`;return[{legendType:"category",id:e,itemId:h,seriesId:e,enabled:i,label:{text:`${c}`},symbol:this.legendItemSymbol(),hideInLegend:!l}]}animateEmptyUpdateReady({datumSelection:t,labelSelection:e}){const i=prepareBarAnimationFunctions2(midpointStartingBarPosition2(this.isVertical(),"normal"));motion9.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],i),seriesLabelFadeInAnimation6(this,"labels",this.ctx.animationManager,e)}animateWaitingUpdateReady(t){const{datumSelection:e,labelSelection:i}=t,{processedData:o}=this,s=o?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const a=prepareBarAnimationFunctions2(midpointStartingBarPosition2(this.isVertical(),"fade"));motion9.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],a,(n,r)=>this.getDatumId(r),s),seriesLabelFadeInAnimation6(this,"labels",this.ctx.animationManager,i)}getDatumId(t){return`${t.xValue}-${t.valueIndex}`}isLabelEnabled(){return this.properties.label.enabled}onDataChange(){}computeFocusBounds({datumIndex:t}){return computeBarFocusBounds5(this,this.contextNodeData?.nodeData[t])}};RangeBarSeries.className="RangeBarSeries",RangeBarSeries.type="range-bar";var import_ag_charts_community254=require("ag-charts-community"),RANGE_BAR_SERIES_THEME={series:{direction:"vertical",strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},placement:"inside"}},axes:{[import_ag_charts_community254._ModuleSupport.ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},{CARTESIAN_AXIS_TYPE:CARTESIAN_AXIS_TYPE11,CARTESIAN_POSITION:CARTESIAN_POSITION7}=import_ag_charts_community255._ModuleSupport.ThemeConstants,RangeBarModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"range-bar",moduleFactory:t=>new RangeBarSeries(t),tooltipDefaults:{range:"exact"},defaultAxes:import_ag_charts_community255._ModuleSupport.swapAxisCondition([{type:CARTESIAN_AXIS_TYPE11.NUMBER,position:CARTESIAN_POSITION7.LEFT},{type:CARTESIAN_AXIS_TYPE11.CATEGORY,position:CARTESIAN_POSITION7.BOTTOM}],t=>t?.direction==="horizontal"),themeTemplate:RANGE_BAR_SERIES_THEME,paletteFactory:({takeColors:t})=>{const{fills:[e],strokes:[i]}=t(1);return{fill:e,stroke:i}},groupable:!0},import_ag_charts_community259=require("ag-charts-community"),import_ag_charts_community258=require("ag-charts-community");function sortNodesByY(t){t.nodes.sort((e,i)=>Math.round((e.datum.y-i.datum.y)*100)/100||-(e.datum.size-i.datum.size))}function justifyNodesAcrossColumn({nodes:t,size:e},{seriesRectHeight:i,nodeSpacing:o,sizeScale:s}){const a=i*e*s;let n=(i-(a+o*(t.length-1)))/2;t.forEach(({datum:r})=>{const l=i*r.size*s;r.y=n,r.height=l,n+=l+o})}function separateNodesInColumn(t,e){const{nodes:i}=t,{seriesRectHeight:o,nodeSpacing:s}=e;sortNodesByY(t);let a=0,n=0;for(const{datum:c}of i){const h=Math.max(n-c.y,0);c.y+=h,a+=h,n=c.y+c.height+s}if(n-s0;let l=o;for(let c=i.length-1;c>=0;c-=1){const{datum:h}=i[c],d=h.y+h.height,u=Math.min(l-d,0);h.y+=u,a+=u,l=h.y-s}return!0}function hasCrossOver(t,e,i,o,s,a,n,r){const l=(i-t)/(o-e),c=(n-s)/(r-a),h=((a-e)*(l*c)+t*c-s*l)/(c-l);return tt&&hMath.max(i,n)}function removeColumnCrossoversInDirection(t,e){let i=!1;const o=t.nodes.filter(a=>e(a).length===1);let s=!0;for(let a=0;s&&ai.linksBefore)||e,e=removeColumnCrossoversInDirection(t,i=>i.linksAfter)||e,e}function weightedNodeY(t){if(t.length===0)return;let e=0,i=0;for(const{node:{datum:o}}of t)e+=o.y*o.size,i+=o.size;return e/i}function layoutColumn(t,e,i,o){return t.nodes.forEach(({datum:s,linksBefore:a,linksAfter:n})=>{const r=o===1?a:n,l=o===1?n:a,c=weightedNodeY(r);if(c!=null){const h=l.length!==0?i:1;s.y=s.y+(c-s.y)*h}}),separateNodesInColumn(t,e)}function layoutColumnsForward(t,e,i){let o=!1;for(const s of t)o=layoutColumn(s,e,i,1)||o;return o}function layoutColumnsBackwards(t,e,i){let o=!1;for(let s=t.length-1;s>=0;s-=1)o=layoutColumn(t[s],e,i,-1)||o;return o}function removeColumnsCrossovers(t){let e=!1;for(let i=t.length-1;i>=0;i-=1)e=removeColumnCrossovers(t[i])||e;return e}function layoutColumns(t,e){t.forEach(o=>{justifyNodesAcrossColumn(o,e)});let i=!1;for(let o=0;o<6;o+=1){const s=layoutColumnsForward(t,e,1);i=layoutColumnsBackwards(t,e,.5);const a=removeColumnsCrossovers(t);if(!s&&!i&&!a)break}i&&(layoutColumnsForward(t,e,1),removeColumnsCrossovers(t))}var import_ag_charts_community256=require("ag-charts-community"),{BBox:BBox20,Path:Path13,ScenePathChangeDetection:ScenePathChangeDetection9,splitBezier}=import_ag_charts_community256._ModuleSupport;function offsetTrivialCubicBezier(t,e,i,o,s,a,n,r,l,c){let h,d;if(s!==i&&l!==n){const A=-(o-e)/(s-i),v=-(r-a)/(l-n);h=(n-i+A*e-v*a)/(A-v),d=A*(h-e)+i}else if(s===i&&l!==n)h=e,d=-(r-a)/(l-n)*(h-r)+l;else if(s!==i&&l===n)h=r,d=-(o-e)/(s-i)*(h-e)+i;else throw new Error("Offsetting flat bezier curve");const u=Math.hypot(i-d,e-h),p=(u+c)/u,g=Math.hypot(l-d,r-h),y=(g+c)/g,f=h+(o-h)*p,m=d+(s-d)*p,b=h+(a-h)*y,x=d+(n-d)*y,S=h+(r-h)*y,M=d+(l-d)*y;t.cubicCurveTo(f,m,b,x,S,M)}var SankeyLink=class extends Path13{constructor(){super(...arguments),this.x1=0,this.x2=0,this.y1=0,this.y2=0,this.height=0,this.inset=0}computeBBox(){const t=Math.min(this.x1,this.x2),e=Math.max(this.x1,this.x2)-t,i=Math.min(this.y1,this.y2),o=Math.max(this.y1,this.y2)-i+this.height;return new BBox20(t,i,e,o)}updatePath(){const{path:t,inset:e}=this;t.clear();const i=this.x1+e,o=this.x2-e,s=this.y1+e,a=this.y2+e,n=this.height-2*e;if(n<0||i>o)return;const r=i,l=s+n/2,c=(i+o)/2,h=s+n/2,d=(i+o)/2,u=a+n/2,p=o,g=a+n/2;if(t.moveTo(r,l-n/2),Math.abs(this.y2-this.y1)<1||this.x2-this.x1s?1:-1)*n/2;offsetTrivialCubicBezier(t,y[0].x,y[0].y,y[1].x,y[1].y,y[2].x,y[2].y,y[3].x,y[3].y,m),offsetTrivialCubicBezier(t,f[0].x,f[0].y,f[1].x,f[1].y,f[2].x,f[2].y,f[3].x,f[3].y,-m),t.lineTo(p,g+n/2),offsetTrivialCubicBezier(t,f[3].x,f[3].y,f[2].x,f[2].y,f[1].x,f[1].y,f[0].x,f[0].y,m),offsetTrivialCubicBezier(t,y[3].x,y[3].y,y[2].x,y[2].y,y[1].x,y[1].y,y[0].x,y[0].y,-m)}t.closePath()}};__decorateClass([ScenePathChangeDetection9()],SankeyLink.prototype,"x1",2),__decorateClass([ScenePathChangeDetection9()],SankeyLink.prototype,"x2",2),__decorateClass([ScenePathChangeDetection9()],SankeyLink.prototype,"y1",2),__decorateClass([ScenePathChangeDetection9()],SankeyLink.prototype,"y2",2),__decorateClass([ScenePathChangeDetection9()],SankeyLink.prototype,"height",2),__decorateClass([ScenePathChangeDetection9()],SankeyLink.prototype,"inset",2);var import_ag_charts_community257=require("ag-charts-community"),{BaseProperties:BaseProperties27,SeriesTooltip:SeriesTooltip21,SeriesProperties:SeriesProperties13,ARRAY:ARRAY12,COLOR_STRING:COLOR_STRING28,COLOR_STRING_ARRAY:COLOR_STRING_ARRAY12,FUNCTION:FUNCTION21,LINE_DASH:LINE_DASH24,OBJECT:OBJECT44,POSITIVE_NUMBER:POSITIVE_NUMBER36,RATIO:RATIO34,STRING:STRING41,UNION:UNION17,Validate:Validate84,Label:Label16}=import_ag_charts_community257._ModuleSupport,ALIGNMENT=UNION17(["left","right","center","justify"],"a justification value"),SankeySeriesLabelProperties=class extends Label16{constructor(){super(...arguments),this.spacing=1}};__decorateClass([Validate84(POSITIVE_NUMBER36)],SankeySeriesLabelProperties.prototype,"spacing",2);var SankeySeriesLinkProperties=class extends BaseProperties27{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([Validate84(COLOR_STRING28,{optional:!0})],SankeySeriesLinkProperties.prototype,"fill",2),__decorateClass([Validate84(RATIO34)],SankeySeriesLinkProperties.prototype,"fillOpacity",2),__decorateClass([Validate84(COLOR_STRING28,{optional:!0})],SankeySeriesLinkProperties.prototype,"stroke",2),__decorateClass([Validate84(RATIO34)],SankeySeriesLinkProperties.prototype,"strokeOpacity",2),__decorateClass([Validate84(POSITIVE_NUMBER36)],SankeySeriesLinkProperties.prototype,"strokeWidth",2),__decorateClass([Validate84(LINE_DASH24)],SankeySeriesLinkProperties.prototype,"lineDash",2),__decorateClass([Validate84(POSITIVE_NUMBER36)],SankeySeriesLinkProperties.prototype,"lineDashOffset",2),__decorateClass([Validate84(FUNCTION21,{optional:!0})],SankeySeriesLinkProperties.prototype,"itemStyler",2);var SankeySeriesNodeProperties=class extends BaseProperties27{constructor(){super(...arguments),this.spacing=1,this.width=1,this.alignment="justify",this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([Validate84(POSITIVE_NUMBER36)],SankeySeriesNodeProperties.prototype,"spacing",2),__decorateClass([Validate84(POSITIVE_NUMBER36)],SankeySeriesNodeProperties.prototype,"width",2),__decorateClass([Validate84(ALIGNMENT)],SankeySeriesNodeProperties.prototype,"alignment",2),__decorateClass([Validate84(COLOR_STRING28,{optional:!0})],SankeySeriesNodeProperties.prototype,"fill",2),__decorateClass([Validate84(RATIO34)],SankeySeriesNodeProperties.prototype,"fillOpacity",2),__decorateClass([Validate84(COLOR_STRING28,{optional:!0})],SankeySeriesNodeProperties.prototype,"stroke",2),__decorateClass([Validate84(RATIO34)],SankeySeriesNodeProperties.prototype,"strokeOpacity",2),__decorateClass([Validate84(POSITIVE_NUMBER36)],SankeySeriesNodeProperties.prototype,"strokeWidth",2),__decorateClass([Validate84(LINE_DASH24)],SankeySeriesNodeProperties.prototype,"lineDash",2),__decorateClass([Validate84(POSITIVE_NUMBER36)],SankeySeriesNodeProperties.prototype,"lineDashOffset",2),__decorateClass([Validate84(FUNCTION21,{optional:!0})],SankeySeriesNodeProperties.prototype,"itemStyler",2);var SankeySeriesProperties=class extends SeriesProperties13{constructor(){super(...arguments),this.nodes=void 0,this.idKey="",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.sizeKey=void 0,this.sizeName=void 0,this.fills=[],this.strokes=[],this.label=new SankeySeriesLabelProperties,this.link=new SankeySeriesLinkProperties,this.node=new SankeySeriesNodeProperties,this.tooltip=new SeriesTooltip21}};__decorateClass([Validate84(ARRAY12,{optional:!0})],SankeySeriesProperties.prototype,"nodes",2),__decorateClass([Validate84(STRING41)],SankeySeriesProperties.prototype,"fromKey",2),__decorateClass([Validate84(STRING41)],SankeySeriesProperties.prototype,"toKey",2),__decorateClass([Validate84(STRING41)],SankeySeriesProperties.prototype,"idKey",2),__decorateClass([Validate84(STRING41,{optional:!0})],SankeySeriesProperties.prototype,"idName",2),__decorateClass([Validate84(STRING41,{optional:!0})],SankeySeriesProperties.prototype,"labelKey",2),__decorateClass([Validate84(STRING41,{optional:!0})],SankeySeriesProperties.prototype,"labelName",2),__decorateClass([Validate84(STRING41,{optional:!0})],SankeySeriesProperties.prototype,"sizeKey",2),__decorateClass([Validate84(STRING41,{optional:!0})],SankeySeriesProperties.prototype,"sizeName",2),__decorateClass([Validate84(COLOR_STRING_ARRAY12)],SankeySeriesProperties.prototype,"fills",2),__decorateClass([Validate84(COLOR_STRING_ARRAY12)],SankeySeriesProperties.prototype,"strokes",2),__decorateClass([Validate84(OBJECT44)],SankeySeriesProperties.prototype,"label",2),__decorateClass([Validate84(OBJECT44)],SankeySeriesProperties.prototype,"link",2),__decorateClass([Validate84(OBJECT44)],SankeySeriesProperties.prototype,"node",2),__decorateClass([Validate84(OBJECT44)],SankeySeriesProperties.prototype,"tooltip",2);var{Transformable:Transformable3,applyShapeStyle:applyShapeStyle11,SeriesNodePickMode:SeriesNodePickMode17,CachedTextMeasurerPool:CachedTextMeasurerPool11,TextWrapper:TextWrapper6,TextUtils:TextUtils8,createDatumId:createDatumId22,Rect:Rect8,BBox:BBox21}=import_ag_charts_community258._ModuleSupport,SankeySeries=class extends FlowProportionSeries{constructor(t){super({moduleCtx:t,pickModes:[SeriesNodePickMode17.NEAREST_NODE,SeriesNodePickMode17.EXACT_SHAPE_MATCH]}),this.properties=new SankeySeriesProperties}isLabelEnabled(){return(this.properties.labelKey!=null||this.nodes==null)&&this.properties.label.enabled}linkFactory(){return new SankeyLink}nodeFactory(){return new Rect8}createNodeData(){const{id:t,_nodeDataDependencies:{seriesRectWidth:e,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0}}=this,{fromKey:o,toKey:s,sizeKey:a,label:{spacing:n},node:{spacing:r,width:l,alignment:c}}=this.properties,{nodeGraph:h,links:d,maxPathLength:u}=this.getNodeGraph(v=>({...v,x:NaN,y:NaN,width:l,height:NaN}),v=>({...v,x1:NaN,x2:NaN,y1:NaN,y2:NaN,height:NaN}),{includeCircularReferences:!1}),p=h,g=this.isLabelEnabled()?(e-l)*(1-u/(u+1)):0,y=(e-l-2*g)/(u-1),f=[];for(let v=0;v{const{datum:k,linksBefore:D,linksAfter:C,maxPathLengthBefore:_,maxPathLengthAfter:I}=v,T=Math.max(D.reduce((E,{link:B})=>E+B.size,0),C.reduce((E,{link:B})=>E+B.size,0));if(D.length===0&&C.length===0||T===0){v.columnIndex=-1;return}let O;switch(c){case"left":O=f[_];break;case"right":O=f[u-1-I];break;case"center":{if(D.length!==0)O=f[_];else if(C.length!==0){const E=C.reduce((B,z)=>Math.min(B,z.node.maxPathLengthBefore),u)-1;O=f[E]}else O=f[0];break}case"justify":{O=C.length===0?f[u-1]:f[_];break}}k.x=O.x,k.size=T;const w=this.getLabelText(this.properties.label,{datum:k.datum,value:k.label,fromKey:o,toKey:s,sizeKey:a,size:T});k.label=String(w),O.nodes.push(v),O.size+=T,v.columnIndex=O.index}),p.forEach(v=>{let k=1/0,D=0;v.linksAfter.forEach(C=>{const _=C.node,{columnIndex:I}=_;I{const C=(1-(D.length-1)*(r/i))/k;return Math.min(v,C)},1/0);for(let v=f.length-1;v>=0;v-=1)f[v].nodes.sort((D,C)=>D.closestColumnIndex-C.closestColumnIndex||D.maxSizeOfClosestNodesAfter-C.maxSizeOfClosestNodesAfter||D.datum.size-C.datum.size);layoutColumns(f,{seriesRectHeight:i,nodeSpacing:r,sizeScale:m});let b=!1;if(p.forEach(({datum:v,linksBefore:k,linksAfter:D})=>{b||(b=v.height<0);const C=v.y+v.height,_=O=>O.sort((w,E)=>{const B=w.node.datum,z=E.node.datum,P=B.y+B.height,L=z.y+z.height,R=Math.atan2(B.y-v.y,Math.abs(B.x-v.x))-Math.atan2(z.y-v.y,Math.abs(z.x-v.x)),V=Math.atan2(P-C,Math.abs(B.x-v.x))-Math.atan2(L-C,Math.abs(z.x-v.x));return R+V});let I=v.y;_(k).forEach(({link:O})=>{O.y2=I,I+=O.size*i*m});let T=v.y;_(D).forEach(({link:O})=>{O.y1=T,T+=O.size*i*m})}),b){logger_exports.warnOnce("There was insufficient space to display the Sankey Series. Reduce the node spacing, or provide a larger container.");return}const x=[],S=[],{fontSize:M}=this.properties.label,A=this.properties.label.getFont();return f.forEach((v,k)=>{const D=k===0,C=k===f.length-1;let _=-1/0;v.nodes.sort((I,T)=>I.datum.y-T.datum.y),v.nodes.forEach(({datum:I})=>{if(I.midPoint={x:I.x+I.width/2,y:I.y+I.height/2},x.push(I),I.label==null)return;const T=D?I.x-n:I.x+I.width+n,O=I.y+I.height/2;let w;if(!D&&!C){const P=O-TextUtils8.getLineHeight(M),L=O+TextUtils8.getLineHeight(M);let R=e;p.forEach(({datum:F})=>{F.x>I.x&&Math.max(F.y,P)<=Math.min(F.y+F.height,L)&&(R=Math.min(R,F.x-n))});const V=R-I.x-2*n;w=TextWrapper6.wrapText(I.label,{maxWidth:V,maxHeight:I.height,font:this.properties.label,textWrap:"never",overflow:"hide"})}if(w==null||w===""){const P=D||C?n:n*2;w=TextWrapper6.wrapText(I.label,{maxWidth:y-P,maxHeight:I.height,font:this.properties.label,textWrap:"never"})}if(w==="")return;const{height:E}=CachedTextMeasurerPool11.measureText(w,{font:A,textAlign:"left",textBaseline:"middle"}),B=O-E/2,z=O+E/2;B>=_&&(S.push({x:T,y:O,leading:D,text:w}),_=z)})}),d.forEach(v=>{const{fromNode:k,toNode:D,size:C}=v;v.height=i*C*m,v.x1=k.x+l,v.x2=D.x,v.midPoint={x:(v.x1+v.x2)/2,y:(v.y1+v.y2)/2+v.height/2},x.push(v)}),{itemId:t,nodeData:x,labelData:S}}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:o,fontWeight:s,fontSize:a,fontFamily:n}=this.properties.label;e.each((r,{x:l,y:c,leading:h,text:d})=>{r.visible=!0,r.x=l,r.y=c,r.text=d,r.fill=i,r.fontStyle=o,r.fontWeight=s,r.fontSize=a,r.fontFamily=n,r.textAlign=h?"right":"left",r.textBaseline="middle"})}updateNodeSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId22([e.type,e.id]))}getBaseNodeStyle(t){const{properties:e}=this,{fill:i,fillOpacity:o,stroke:s,strokeOpacity:a,lineDash:n,lineDashOffset:r}=e.node,l=t?e.highlightStyle.item:void 0;return{fill:l?.fill??i,fillOpacity:l?.fillOpacity??o,stroke:l?.stroke??s,strokeOpacity:l?.strokeOpacity??a,strokeWidth:l?.strokeWidth??this.getStrokeWidth(e.node.strokeWidth),lineDash:l?.lineDash??n,lineDashOffset:l?.lineDashOffset??r}}getNodeStyleOverrides(t,e,i,o,s,a,n){const{id:r,properties:l}=this,{fills:c,strokes:h}=l,{itemStyler:d}=l.node,u=a.fill??c[i%c.length],p=a.stroke??h[i%h.length],g={};if(n||(g.fill=u,g.stroke=p),d!=null){const y=this.cachedDatumCallback(createDatumId22(t,n?"highlight":"node"),()=>{const{fillOpacity:f=1,strokeOpacity:m=1,strokeWidth:b=0,lineDash:x=[],lineDashOffset:S=0}=a;return d({seriesId:r,datum:e,highlighted:n,label:s,size:o,fill:u,fillOpacity:f,stroke:p,strokeOpacity:m,strokeWidth:b,lineDash:x,lineDashOffset:S})});Object.assign(g,y)}return g}updateNodeNodes(t){const{datumSelection:e,isHighlight:i}=t,o=this.getBaseNodeStyle(i);e.each((s,a)=>{const{datumIndex:n,size:r,label:l}=a,c=this.getNodeStyleOverrides(String(n),a,n.index,r,l,o,i);s.x=a.x,s.y=a.y,s.width=Math.max(a.width,0),s.height=Math.max(a.height,0),applyShapeStyle11(s,o,c)})}updateLinkSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>createDatumId22([e.type,e.index,e.fromNode.id,e.toNode.id]))}getBaseLinkStyle(t){const{properties:e}=this,{fill:i,fillOpacity:o,stroke:s,strokeOpacity:a,lineDash:n,lineDashOffset:r}=e.link,l=t?e.highlightStyle.item:void 0;return{fill:l?.fill??i,fillOpacity:l?.fillOpacity??o,stroke:l?.stroke??s,strokeOpacity:l?.strokeOpacity??a,strokeWidth:l?.strokeWidth??this.getStrokeWidth(e.link.strokeWidth),lineDash:l?.lineDash??n,lineDashOffset:l?.lineDashOffset??r}}getLinkStyleOverrides(t,e,i,o,s){const{id:a,properties:n}=this,{fills:r,strokes:l}=n,{itemStyler:c}=n.link,h=o.fill??r[i%r.length],d=o.stroke??l[i%l.length],u={};if(s||(u.fill=h,u.stroke=d),c!=null){const p=this.cachedDatumCallback(createDatumId22(t,s?"highlight":"node"),()=>{const{fillOpacity:g=1,strokeOpacity:y=1,strokeWidth:f=0,lineDash:m=[],lineDashOffset:b=0}=o;return c({seriesId:a,datum:e,highlighted:s,fill:h,fillOpacity:g,stroke:d,strokeOpacity:y,strokeWidth:f,lineDash:m,lineDashOffset:b})});Object.assign(u,p)}return u}updateLinkNodes(t){const{datumSelection:e,isHighlight:i}=t,o=this.getBaseLinkStyle(i);e.each((s,a)=>{const{datumIndex:n}=a,r=a.fromNode.datumIndex,l=this.getLinkStyleOverrides(String(n),a,r.index,o,i);s.x1=a.x1,s.y1=a.y1,s.x2=a.x2,s.y2=a.y2,s.height=a.height,applyShapeStyle11(s,o,l),s.inset=s.strokeWidth/2})}getTooltipContent(t){const{id:e,linksProcessedData:i,nodesProcessedData:o,properties:s}=this,{fromKey:a,toKey:n,sizeKey:r,sizeName:l,tooltip:c}=s,{datumIndex:h}=t,d=t.type===0?t.fromNode.index:t.index,u=t.type===0?`${t.fromNode.label} - ${t.toNode.label}`:t.label,p=h.type===0?i?.dataSources.get(this.id)?.[h.index]:o?.dataSources.get(this.id)?.[h.index],g=t.size;let y;if(t.type===0){const f=t.fromNode.datumIndex,m=this.getBaseLinkStyle(!1);Object.assign(m,this.getLinkStyleOverrides(String(h),p,f.index,m,!1)),y=m}else{const f=t.label,m=this.getBaseNodeStyle(!1);Object.assign(m,this.getNodeStyleOverrides(String(h),p,h.index,g,f,m,!1)),y=m}return c.formatTooltip({title:u,symbol:this.legendItemSymbol(t.type,d,y),data:r!=null?[{label:l,fallbackLabel:r,value:String(g)}]:[]},{seriesId:e,datum:p,title:u,fromKey:a,toKey:n,sizeKey:r,sizeName:l,size:g,...y})}computeFocusBounds(t){if(t instanceof Rect8){const{x:e,y:i,width:o,height:s}=t,a=new BBox21(e,i,o,s);return Transformable3.toCanvas(this.contentGroup,a)}return t}};SankeySeries.className="SankeySeries",SankeySeries.type="sankey";var SankeyModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["flow-proportion"],solo:!0,identifier:"sankey",moduleFactory:t=>new SankeySeries(t),tooltipDefaults:{range:"exact"},themeTemplate:{seriesArea:{padding:{top:10,bottom:10}},series:{highlightStyle:{series:{dimOpacity:.2}},label:{fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:10},node:{spacing:20,width:10,strokeWidth:0},link:{fillOpacity:.5,strokeWidth:0}},legend:{enabled:!1,toggleSeries:!1}},paletteFactory({takeColors:t,colorsCount:e}){return t(e)}},import_ag_charts_community262=require("ag-charts-community"),import_ag_charts_community261=require("ag-charts-community"),import_ag_charts_community260=require("ag-charts-community"),{HierarchySeriesProperties,HighlightStyle,SeriesTooltip:SeriesTooltip22,Validate:Validate85,COLOR_STRING:COLOR_STRING29,FUNCTION:FUNCTION22,NUMBER:NUMBER22,OBJECT:OBJECT45,POSITIVE_NUMBER:POSITIVE_NUMBER37,RATIO:RATIO35,STRING:STRING42}=import_ag_charts_community260._ModuleSupport,SunburstSeriesTileHighlightStyle=class extends HighlightStyle{constructor(){super(...arguments),this.label=new AutoSizedLabel,this.secondaryLabel=new AutoSizedLabel}};__decorateClass([Validate85(STRING42,{optional:!0})],SunburstSeriesTileHighlightStyle.prototype,"fill",2),__decorateClass([Validate85(RATIO35,{optional:!0})],SunburstSeriesTileHighlightStyle.prototype,"fillOpacity",2),__decorateClass([Validate85(COLOR_STRING29,{optional:!0})],SunburstSeriesTileHighlightStyle.prototype,"stroke",2),__decorateClass([Validate85(POSITIVE_NUMBER37,{optional:!0})],SunburstSeriesTileHighlightStyle.prototype,"strokeWidth",2),__decorateClass([Validate85(RATIO35,{optional:!0})],SunburstSeriesTileHighlightStyle.prototype,"strokeOpacity",2),__decorateClass([Validate85(OBJECT45)],SunburstSeriesTileHighlightStyle.prototype,"label",2),__decorateClass([Validate85(OBJECT45)],SunburstSeriesTileHighlightStyle.prototype,"secondaryLabel",2);var SunburstSeriesProperties=class extends HierarchySeriesProperties{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=0,this.strokeOpacity=1,this.cornerRadius=0,this.highlightStyle=new SunburstSeriesTileHighlightStyle,this.label=new AutoSizedLabel,this.secondaryLabel=new AutoSizedSecondaryLabel,this.tooltip=new SeriesTooltip22}};__decorateClass([Validate85(STRING42,{optional:!0})],SunburstSeriesProperties.prototype,"sizeName",2),__decorateClass([Validate85(STRING42,{optional:!0})],SunburstSeriesProperties.prototype,"labelKey",2),__decorateClass([Validate85(STRING42,{optional:!0})],SunburstSeriesProperties.prototype,"secondaryLabelKey",2),__decorateClass([Validate85(RATIO35)],SunburstSeriesProperties.prototype,"fillOpacity",2),__decorateClass([Validate85(POSITIVE_NUMBER37)],SunburstSeriesProperties.prototype,"strokeWidth",2),__decorateClass([Validate85(RATIO35)],SunburstSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([Validate85(POSITIVE_NUMBER37)],SunburstSeriesProperties.prototype,"cornerRadius",2),__decorateClass([Validate85(NUMBER22,{optional:!0})],SunburstSeriesProperties.prototype,"sectorSpacing",2),__decorateClass([Validate85(NUMBER22,{optional:!0})],SunburstSeriesProperties.prototype,"padding",2),__decorateClass([Validate85(FUNCTION22,{optional:!0})],SunburstSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate85(OBJECT45)],SunburstSeriesProperties.prototype,"highlightStyle",2),__decorateClass([Validate85(OBJECT45)],SunburstSeriesProperties.prototype,"label",2),__decorateClass([Validate85(OBJECT45)],SunburstSeriesProperties.prototype,"secondaryLabel",2),__decorateClass([Validate85(OBJECT45)],SunburstSeriesProperties.prototype,"tooltip",2);var{fromToMotion:fromToMotion5,normalizeAngle360:normalizeAngle3608,createDatumId:createDatumId23,Sector:Sector7,Group:Group21,ScalableGroup:ScalableGroup2,Selection:Selection16,TransformableText:TransformableText2,applyShapeStyle:applyShapeStyle12}=import_ag_charts_community261._ModuleSupport,SunburstNode=class extends import_ag_charts_community261._ModuleSupport.HierarchyNode{constructor(){super(...arguments),this.label=void 0,this.secondaryLabel=void 0,this.contentHeight=0,this.bbox=void 0,this.startAngle=0,this.endAngle=0}};function setAngleData(t,e=0,i=2*Math.PI/t.sumSize){for(const o of t.children){const s=e+o.sumSize*i;o.startAngle=e,o.endAngle=s,setAngleData(o,e,i),e=s}}var SunburstSeries=class extends import_ag_charts_community261._ModuleSupport.HierarchySeries{constructor(){super(...arguments),this.NodeClass=SunburstNode,this.properties=new SunburstSeriesProperties,this.scalingGroup=this.contentGroup.appendChild(new ScalableGroup2),this.sectorGroup=this.scalingGroup.appendChild(new Group21),this.sectorLabelGroup=this.scalingGroup.appendChild(new Group21),this.highlightSectorGroup=this.scalingGroup.appendChild(new Group21),this.datumSelection=Selection16.select(this.sectorGroup,Sector7),this.labelSelection=Selection16.select(this.sectorLabelGroup,Group21),this.highlightSelection=Selection16.select(this.highlightSectorGroup,Sector7)}processData(){super.processData(),setAngleData(this.rootNode)}updateSelections(){const t=this.ctx.highlightManager?.getActiveHighlight();if(this.highlightSelection.update(t!=null?[t]:[],void 0,a=>this.getDatumId(a)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{chart:e}=this;if(e==null||e.seriesRect==null)return;const o=Array.from(this.rootNode),s=a=>{a.append([new TransformableText2({tag:0}),new TransformableText2({tag:1})])};this.datumSelection.update(o,void 0,a=>this.getDatumId(a)),this.labelSelection.update(o,s,a=>this.getDatumId(a))}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle:void 0;return{fill:i?.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity}}getItemStyleOverrides(t,e,i,o,s,a){const{id:n,properties:r,colorScale:l}=this,{fills:c,strokes:h,itemStyler:d}=r,u=t[0],p=s.fill??c[u%c.length],g=s.stroke??h[u%h.length],y={};if(a||(y.fill=o!=null?l.convert(o):p,y.stroke=g),d!=null){const f=this.cachedDatumCallback(createDatumId23(t.join(":"),a?"highlight":"node"),()=>d({seriesId:n,datum:e,depth:i,highlighted:a,fill:p,stroke:g,...s}));Object.assign(y,f)}return y}updateNodes(){const{chart:t,data:e,maxDepth:i}=this;if(t==null||e==null)return;const{width:o,height:s}=t.seriesRect,{sectorSpacing:a=0,padding:n=0,cornerRadius:r,childrenKey:l,colorKey:c,colorName:h,labelKey:d,secondaryLabelKey:u,sizeKey:p,sizeName:g}=this.properties;this.contentGroup.translationX=o/2,this.contentGroup.translationY=s/2;const y=a*.5,m=Math.min(o,s)/2/(i+1),b=-Math.PI/2;this.rootNode?.walk(k=>{const{startAngle:D,endAngle:C}=k;if(k.depth!=null){const _=(D+C)/2+b,I=(k.depth+.5)*m;k.midPoint.x=Math.cos(_)*I,k.midPoint.y=Math.sin(_)*I}}),this.rootNode?.walk(k=>{const{datum:D,depth:C,startAngle:_,endAngle:I,parent:T,sumSize:O}=k;k.label=void 0,k.secondaryLabel=void 0,k.contentHeight=0;let w;if(D!=null&&C!=null&&d!=null){const tt=D[d];w=this.getLabelText(this.properties.label,{depth:C,datum:D,childrenKey:l,colorKey:c,colorName:h,labelKey:d,secondaryLabelKey:u,sizeKey:p,sizeName:g,value:tt})}w===""&&(w=void 0);let E;if(D!=null&&C!=null&&u!=null){const tt=D[u];E=this.getLabelText(this.properties.secondaryLabel,{depth:C,datum:D,childrenKey:l,colorKey:c,colorName:h,labelKey:d,secondaryLabelKey:u,sizeKey:p,sizeName:g,value:tt})}if(E===""&&(E=void 0),C==null)return;const B=C*m+y,z=(C+1)*m-y,P=B>y?y/B:y,L=z>y?y/z:y,R=_+P,F=I+P-R,G=_+L,H=I+L-G,U=tt=>{if(C===0&&T?.sumSize===O)return{width:2*Math.sqrt(z**2-(tt*.5)**2),height:tt,meta:0};const it=tt,nt=2*Math.sqrt(z**2-(B+it)**2),ht=F=ut?{width:lt,height:it,meta:1}:{width:ut,height:ct,meta:2}},j=formatLabels(w,this.properties.label,E,this.properties.secondaryLabel,{padding:n},U);if(j==null)return;const{width:$,height:Z,meta:X,label:K,secondaryLabel:q}=j,Q=b+(_+I)/2,Y=Math.sin(Q)>=0,st=Math.cos(Q)>=0,ot=(Y?3:12)&(st?6:9);let J;switch(X){case 0:J=0;break;case 1:{const et=z-(m-Z)*.58,it=Math.sqrt((z-n)**2-($/2)**2);J=Math.min(et,it);break}case 2:if(C===0){const tt=Z/(2*Math.tan(F*.5))+$*.5,et=Math.sqrt(z**2-(Z*.5)**2)-$*.5;J=(tt+et)*.5}else J=(B+z)*.5;break}if(K!=null){const{fontStyle:tt="normal",fontFamily:et,fontWeight:it="normal",color:nt="black"}=this.properties.label;k.label={...K,fontStyle:tt,fontFamily:et,fontWeight:it,color:nt,labelPlacement:X,circleQuarter:ot,radius:J,theta:Q}}if(q!=null){const{fontStyle:tt="normal",fontFamily:et,fontWeight:it="normal",color:nt="black"}=this.properties.secondaryLabel;k.secondaryLabel={...q,fontStyle:tt,fontFamily:et,fontWeight:it,color:nt,labelPlacement:X,circleQuarter:ot,radius:J,theta:Q}}k.contentHeight=j.height});const x=(k,D,C,_)=>{const{datum:I,datumIndex:T,depth:O,colorValue:w,startAngle:E,endAngle:B}=k;if(O==null){D.visible=!1;return}D.visible=!0;const z=this.getItemStyleOverrides(T,I,O,w,C,_),P=z.strokeWidth??C.strokeWidth;applyShapeStyle12(D,C,z),D.centerX=0,D.centerY=0,D.innerRadius=O*m,D.outerRadius=(O+1)*m,D.startAngle=E+b,D.endAngle=B+b,D.inset=y+P*.5,D.cornerRadius=r},S=this.getItemBaseStyle(!1);this.datumSelection.each((k,D)=>{x(D,k,S,!1)});const M=this.getItemBaseStyle(!0);this.highlightSelection.each((k,D)=>{x(D,k,M,!0)});const A=(k,D,C,_)=>{const{depth:I,contentHeight:T}=k,O=C===0,w=O?k.label:k.secondaryLabel;if(I==null||w==null){D.visible=!1;return}const{labelPlacement:E,circleQuarter:B,radius:z,theta:P}=w;let L;switch(_&&(L=(O?this.properties.highlightStyle.label:this.properties.highlightStyle.secondaryLabel).color),D.text=w.text,D.fontSize=w.fontSize,D.lineHeight=w.lineHeight,D.fontStyle=w.fontStyle,D.fontFamily=w.fontFamily,D.fontWeight=w.fontWeight,D.fill=L??w.color,E){case 0:D.textAlign="center",D.textBaseline="top",D.translationX=0,D.translationY=(O?0:T-w.height)-T*.5,D.rotation=0;break;case 1:{const R=(B&3)!==0,V=O===!R?z:z-(T-w.height);D.textAlign="center",D.textBaseline=R?"bottom":"top",D.translationX=Math.cos(P)*V,D.translationY=Math.sin(P)*V,D.rotation=R?P-Math.PI*.5:P+Math.PI*.5;break}case 2:{const R=(B&6)!==0,V=O===!R?(T-w.height)*.5:(w.height-T)*.5;D.textAlign="center",D.textBaseline="middle",D.translationX=Math.cos(P)*z+Math.cos(P+Math.PI/2)*V,D.translationY=Math.sin(P)*z+Math.sin(P+Math.PI/2)*V,D.rotation=R?P:P+Math.PI;break}}D.visible=!0},v=this.ctx.highlightManager?.getActiveHighlight();this.labelSelection.selectByClass(TransformableText2).forEach(k=>{A(k.datum,k,k.tag,k.datum===v)})}getTooltipContent(t){const{id:e,properties:i}=this,{labelKey:o,secondaryLabelKey:s,childrenKey:a,sizeKey:n,sizeName:r,colorKey:l,colorName:c,tooltip:h}=i,{datum:d,datumIndex:u,depth:p}=t;if(d==null||p==null)return;const g=[],y=n!=null?d[n]:void 0;y!=null&&g.push({label:r,fallbackLabel:n,value:y});const f=l!=null?d[l]:void 0;f!=null&&g.push({label:c,fallbackLabel:l,value:f});const m=this.getItemBaseStyle(!1);Object.assign(m,this.getItemStyleOverrides(u,d,p,f,m,!1));const b=m.fill;return h.formatTooltip({title:o!=null?d[o]:void 0,symbol:{marker:{shape:"square",fill:b,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}},data:g},{seriesId:e,datum:d,title:void 0,depth:p,labelKey:o,secondaryLabelKey:s,childrenKey:a,sizeKey:n,sizeName:r,colorKey:l,colorName:c,...m})}createNodeData(){}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.datumSelection.selectByClass(Sector7))}animateEmptyUpdateReady(){fromToMotion5(this.id,"nodes",this.ctx.animationManager,[this.scalingGroup],{toFn(){return{scalingX:1,scalingY:1}},fromFn(){return{scalingX:0,scalingY:0}}})}computeFocusBounds(t){return t}};SunburstSeries.className="SunburstSeries",SunburstSeries.type="sunburst";var{FONT_SIZE_RATIO:FONT_SIZE_RATIO3,ThemeSymbols:{DEFAULT_DIVERGING_SERIES_COLOR_RANGE:DEFAULT_DIVERGING_SERIES_COLOR_RANGE5}}=import_ag_charts_community262._ModuleSupport,SunburstModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["hierarchy"],identifier:"sunburst",moduleFactory:t=>new SunburstSeries(t),tooltipDefaults:{range:"exact"},solo:!0,themeTemplate:{series:{label:{fontFamily:{$ref:"fontFamily"},fontSize:{$rem:[FONT_SIZE_RATIO3.LARGE]},minimumFontSize:{$round:[{$mul:[{$ref:"fontSize"},9/12]}]},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},overflowStrategy:"ellipsis",wrapping:"never",spacing:2},secondaryLabel:{fontFamily:{$ref:"fontFamily"},fontSize:{$rem:[FONT_SIZE_RATIO3.SMALLEST]},minimumFontSize:{$round:[{$mul:[{$ref:"fontSize"},7/12]}]},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},overflowStrategy:"ellipsis",wrapping:"never"},sectorSpacing:2,padding:3,highlightStyle:{label:{color:{$ref:"backgroundColor"}},secondaryLabel:{color:{$ref:"backgroundColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}},gradientLegend:{enabled:!0}},paletteFactory:({takeColors:t,colorsCount:e,themeTemplateParameters:i})=>{const{fills:o,strokes:s}=t(e),a=i.get(DEFAULT_DIVERGING_SERIES_COLOR_RANGE5);return{fills:o,strokes:s,colorRange:a}}},import_ag_charts_community265=require("ag-charts-community"),import_ag_charts_community264=require("ag-charts-community"),import_ag_charts_community263=require("ag-charts-community"),{BaseProperties:BaseProperties28,HierarchySeriesProperties:HierarchySeriesProperties2,HighlightStyle:HighlightStyle2,SeriesTooltip:SeriesTooltip23,Validate:Validate86,BOOLEAN:BOOLEAN35,COLOR_STRING:COLOR_STRING30,FUNCTION:FUNCTION23,NUMBER:NUMBER23,OBJECT:OBJECT46,POSITIVE_NUMBER:POSITIVE_NUMBER38,RATIO:RATIO36,STRING:STRING43,STRING_ARRAY,TEXT_ALIGN:TEXT_ALIGN3,VERTICAL_ALIGN:VERTICAL_ALIGN2,Label:Label17}=import_ag_charts_community263._ModuleSupport,TreemapGroupLabel=class extends Label17{constructor(){super(...arguments),this.spacing=0}};__decorateClass([Validate86(NUMBER23)],TreemapGroupLabel.prototype,"spacing",2);var TreemapSeriesGroup=class extends BaseProperties28{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.cornerRadius=0,this.textAlign="center",this.gap=0,this.padding=0,this.interactive=!0,this.label=new TreemapGroupLabel}};__decorateClass([Validate86(STRING43,{optional:!0})],TreemapSeriesGroup.prototype,"fill",2),__decorateClass([Validate86(RATIO36)],TreemapSeriesGroup.prototype,"fillOpacity",2),__decorateClass([Validate86(COLOR_STRING30,{optional:!0})],TreemapSeriesGroup.prototype,"stroke",2),__decorateClass([Validate86(POSITIVE_NUMBER38)],TreemapSeriesGroup.prototype,"strokeWidth",2),__decorateClass([Validate86(RATIO36)],TreemapSeriesGroup.prototype,"strokeOpacity",2),__decorateClass([Validate86(POSITIVE_NUMBER38)],TreemapSeriesGroup.prototype,"cornerRadius",2),__decorateClass([Validate86(TEXT_ALIGN3)],TreemapSeriesGroup.prototype,"textAlign",2),__decorateClass([Validate86(POSITIVE_NUMBER38)],TreemapSeriesGroup.prototype,"gap",2),__decorateClass([Validate86(POSITIVE_NUMBER38)],TreemapSeriesGroup.prototype,"padding",2),__decorateClass([Validate86(BOOLEAN35)],TreemapSeriesGroup.prototype,"interactive",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesGroup.prototype,"label",2);var TreemapSeriesTile=class extends BaseProperties28{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.cornerRadius=0,this.textAlign="center",this.verticalAlign="middle",this.gap=0,this.padding=0,this.label=new AutoSizedLabel,this.secondaryLabel=new AutoSizedSecondaryLabel}};__decorateClass([Validate86(STRING43,{optional:!0})],TreemapSeriesTile.prototype,"fill",2),__decorateClass([Validate86(RATIO36)],TreemapSeriesTile.prototype,"fillOpacity",2),__decorateClass([Validate86(COLOR_STRING30,{optional:!0})],TreemapSeriesTile.prototype,"stroke",2),__decorateClass([Validate86(POSITIVE_NUMBER38,{optional:!0})],TreemapSeriesTile.prototype,"strokeWidth",2),__decorateClass([Validate86(RATIO36)],TreemapSeriesTile.prototype,"strokeOpacity",2),__decorateClass([Validate86(POSITIVE_NUMBER38)],TreemapSeriesTile.prototype,"cornerRadius",2),__decorateClass([Validate86(TEXT_ALIGN3)],TreemapSeriesTile.prototype,"textAlign",2),__decorateClass([Validate86(VERTICAL_ALIGN2)],TreemapSeriesTile.prototype,"verticalAlign",2),__decorateClass([Validate86(POSITIVE_NUMBER38)],TreemapSeriesTile.prototype,"gap",2),__decorateClass([Validate86(POSITIVE_NUMBER38)],TreemapSeriesTile.prototype,"padding",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesTile.prototype,"label",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesTile.prototype,"secondaryLabel",2);var TreemapSeriesGroupHighlightStyle=class extends BaseProperties28{constructor(){super(...arguments),this.label=new AutoSizedLabel}};__decorateClass([Validate86(STRING43,{optional:!0})],TreemapSeriesGroupHighlightStyle.prototype,"fill",2),__decorateClass([Validate86(RATIO36,{optional:!0})],TreemapSeriesGroupHighlightStyle.prototype,"fillOpacity",2),__decorateClass([Validate86(COLOR_STRING30,{optional:!0})],TreemapSeriesGroupHighlightStyle.prototype,"stroke",2),__decorateClass([Validate86(POSITIVE_NUMBER38,{optional:!0})],TreemapSeriesGroupHighlightStyle.prototype,"strokeWidth",2),__decorateClass([Validate86(RATIO36,{optional:!0})],TreemapSeriesGroupHighlightStyle.prototype,"strokeOpacity",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesGroupHighlightStyle.prototype,"label",2);var TreemapSeriesTileHighlightStyle=class extends BaseProperties28{constructor(){super(...arguments),this.label=new AutoSizedLabel,this.secondaryLabel=new AutoSizedSecondaryLabel}};__decorateClass([Validate86(STRING43,{optional:!0})],TreemapSeriesTileHighlightStyle.prototype,"fill",2),__decorateClass([Validate86(RATIO36,{optional:!0})],TreemapSeriesTileHighlightStyle.prototype,"fillOpacity",2),__decorateClass([Validate86(COLOR_STRING30,{optional:!0})],TreemapSeriesTileHighlightStyle.prototype,"stroke",2),__decorateClass([Validate86(POSITIVE_NUMBER38,{optional:!0})],TreemapSeriesTileHighlightStyle.prototype,"strokeWidth",2),__decorateClass([Validate86(RATIO36,{optional:!0})],TreemapSeriesTileHighlightStyle.prototype,"strokeOpacity",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesTileHighlightStyle.prototype,"label",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesTileHighlightStyle.prototype,"secondaryLabel",2);var TreemapSeriesHighlightStyle=class extends HighlightStyle2{constructor(){super(...arguments),this.group=new TreemapSeriesGroupHighlightStyle,this.tile=new TreemapSeriesTileHighlightStyle}};__decorateClass([Validate86(OBJECT46)],TreemapSeriesHighlightStyle.prototype,"group",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesHighlightStyle.prototype,"tile",2);var TreemapSeriesProperties=class extends HierarchySeriesProperties2{constructor(){super(...arguments),this.highlightStyle=new TreemapSeriesHighlightStyle,this.tooltip=new SeriesTooltip23,this.group=new TreemapSeriesGroup,this.tile=new TreemapSeriesTile,this.undocumentedGroupFills=[],this.undocumentedGroupStrokes=[]}};__decorateClass([Validate86(STRING43,{optional:!0})],TreemapSeriesProperties.prototype,"sizeName",2),__decorateClass([Validate86(STRING43,{optional:!0})],TreemapSeriesProperties.prototype,"labelKey",2),__decorateClass([Validate86(STRING43,{optional:!0})],TreemapSeriesProperties.prototype,"secondaryLabelKey",2),__decorateClass([Validate86(FUNCTION23,{optional:!0})],TreemapSeriesProperties.prototype,"itemStyler",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesProperties.prototype,"highlightStyle",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesProperties.prototype,"tooltip",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesProperties.prototype,"group",2),__decorateClass([Validate86(OBJECT46)],TreemapSeriesProperties.prototype,"tile",2),__decorateClass([Validate86(STRING_ARRAY)],TreemapSeriesProperties.prototype,"undocumentedGroupFills",2),__decorateClass([Validate86(STRING_ARRAY)],TreemapSeriesProperties.prototype,"undocumentedGroupStrokes",2);var{TextUtils:TextUtils9,TextWrapper:TextWrapper7,isNumberEqual:isNumberEqual10,createDatumId:createDatumId24,Rect:Rect9,Group:Group22,BBox:BBox22,Selection:Selection17,Text:Text9,Transformable:Transformable4,applyShapeStyle:applyShapeStyle13}=import_ag_charts_community264._ModuleSupport,TreemapNode=class extends import_ag_charts_community264._ModuleSupport.HierarchyNode{constructor(){super(...arguments),this.labelValue=void 0,this.secondaryLabelValue=void 0,this.label=void 0,this.secondaryLabel=void 0,this.bbox=void 0,this.padding=void 0}},tempText=new Text9;function getTextSize(t,e){const{fontStyle:i,fontWeight:o,fontSize:s,fontFamily:a}=e;tempText.setProperties({text:t,fontStyle:i,fontWeight:o,fontSize:s,fontFamily:a,textAlign:"left",textBaseline:"top"});const{width:n,height:r}=tempText.getBBox();return{width:n,height:r}}function nodeSize(t){return t.children.length>0?t.sumSize-t.sizeValue:t.sizeValue}var textAlignFactors2={left:0,center:.5,right:1},verticalAlignFactors4={top:0,middle:.5,bottom:1},DistantGroup=class extends import_ag_charts_community264._ModuleSupport.Group{distanceSquared(t,e){return this.getBBox().distanceSquared(t,e)}},TreemapSeries=class extends import_ag_charts_community264._ModuleSupport.HierarchySeries{constructor(){super(...arguments),this.NodeClass=TreemapNode,this.properties=new TreemapSeriesProperties,this.rectGroup=this.contentGroup.appendChild(new Group22),this.datumSelection=Selection17.select(this.rectGroup,Rect9),this.labelSelection=Selection17.select(this.labelGroup,Group22),this.highlightSelection=Selection17.select(this.rectGroup,Rect9)}groupTitleHeight(t,e){const{labelValue:i}=t,{label:o}=this.properties.group,s=3;if(i!=null){if(o.fontSize>e.width/s||o.fontSize>e.height/s)return;{const{height:a}=getTextSize(i,o);return Math.max(a,o.fontSize)}}}getNodePadding(t,e){if(t.parent==null)return{top:0,right:0,bottom:0,left:0};if(t.children.length===0){const{padding:n}=this.properties.tile;return{top:n,right:n,bottom:n,left:n}}const{label:{spacing:i},padding:o}=this.properties.group,s=this.groupTitleHeight(t,e),a=s!=null?s+i:0;return{top:o+a,right:o,bottom:o,left:o}}sortChildren({children:t}){const e=Array.from(t,(o,s)=>s).filter(o=>nodeSize(t[o])>0).sort((o,s)=>nodeSize(t[s])-nodeSize(t[o]));return{sortedChildrenIndices:e,childAt:o=>{const s=e[o];return t[s]}}}squarify(t,e){const{datum:i,children:o}=t;if(e.width<=0||e.height<=0){t.bbox=void 0,t.padding=void 0,t.midPoint.x=NaN,t.midPoint.y=NaN;return}const s=i!=null?this.getNodePadding(t,e):{top:0,right:0,bottom:0,left:0};t.parent==null?(t.bbox=void 0,t.padding=void 0,t.midPoint.x=NaN,t.midPoint.y=NaN):(t.bbox=e,t.padding=s,t.midPoint.x=e.x+e.width/2,t.midPoint.y=e.y);const{sortedChildrenIndices:a,childAt:n}=this.sortChildren(t),r=a.every(M=>o[M].children.length===0),l=1,c=e.width-s.left-s.right,h=e.height-s.top-s.bottom;if(c<=0||h<=0)return;const d=a.length;let u=0,p=0,g=1/0,y=a.reduce((M,A)=>M+nodeSize(o[A]),0);const f=new BBox22(e.x+s.left,e.y+s.top,c,h),m=f.clone();let b=0;for(;b({left:l.x,top:l.y,right:l.x+l.width,bottom:l.y+l.height}),a=s(t),n=s(e);["top","right","bottom","left"].forEach(l=>{isNumberEqual10(a[l],n[l])||e.shrink(o,l)})}createNodeData(){}getGroupBaseStyle(t){const{properties:e}=this,{group:i}=e,o=t?e.highlightStyle.group:void 0;return{fill:o?.fill??i.fill,fillOpacity:o?.fillOpacity??i.fillOpacity,stroke:o?.stroke??i.stroke,strokeWidth:o?.strokeWidth??i.strokeWidth,strokeOpacity:o?.strokeOpacity??i.strokeOpacity}}getGroupStyleOverrides(t,e,i,o,s){const{id:a,properties:n}=this,{undocumentedGroupFills:r,undocumentedGroupStrokes:l,itemStyler:c}=n,h=o.fill??r[Math.min(i??0,r.length)],d=o.stroke??l[Math.min(i??0,l.length)],u={};if(s||(u.fill=h,u.stroke=d),c!=null){const p=this.cachedDatumCallback(createDatumId24(t.join(":"),s?"highlight":"node"),()=>c({seriesId:a,datum:e,depth:i,highlighted:s,fill:h,stroke:d,...o}));Object.assign(u,p)}return u}getTileBaseStyle(t){const{properties:e}=this,{tile:i}=e,o=t?e.highlightStyle.tile:void 0;return{fill:o?.fill??i.fill,fillOpacity:o?.fillOpacity??i.fillOpacity,stroke:o?.stroke??i.stroke,strokeWidth:o?.strokeWidth??i.strokeWidth,strokeOpacity:o?.strokeOpacity??i.strokeOpacity}}getTileStyleOverrides(t,e,i,o,s,a){const{id:n,properties:r,colorScale:l}=this,{fills:c,strokes:h,itemStyler:d}=r,u=t[0],p=s.fill??c[u%c.length],g=s.stroke??h[u%h.length],y={};if(a||(y.fill=o!=null?l.convert(o):p,y.stroke=g),d!=null){const f=this.cachedDatumCallback(createDatumId24(t.join(":"),a?"highlight":"node"),()=>d({seriesId:n,datum:e,depth:i,highlighted:a,fill:p,stroke:g,...s}));Object.assign(y,f)}return y}updateSelections(){let t=this.ctx.highlightManager?.getActiveHighlight();if(t!=null&&!this.properties.group.interactive&&t.children.length!==0&&(t=void 0),this.highlightSelection.update(t!=null?[t]:[],void 0,s=>this.getDatumId(s)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{seriesRect:e}=this.chart??{};if(!e)return;const i=Array.from(this.rootNode),o=s=>{s.append([new Text9({tag:0}),new Text9({tag:1})])};this.datumSelection.update(i,void 0,s=>this.getDatumId(s)),this.labelSelection.update(i,o,s=>this.getDatumId(s))}updateNodes(){const{rootNode:t,data:e}=this,{childrenKey:i,colorKey:o,colorName:s,labelKey:a,secondaryLabelKey:n,sizeKey:r,sizeName:l,highlightStyle:c,tile:h,group:d}=this.properties,{seriesRect:u}=this.chart??{};if(!u||!e)return;this.rootNode?.walk(A=>{const{datum:v,depth:k,children:D}=A,C=D.length===0,_=C?h.label:d.label;let I;if(v!=null&&k!=null&&a!=null){const O=v[a];I=this.getLabelText(_,{depth:k,datum:v,childrenKey:i,colorKey:o,colorName:s,labelKey:a,secondaryLabelKey:n,sizeKey:r,sizeName:l,value:O})}I===""&&(I=void 0);let T;if(C&&v!=null&&k!=null&&n!=null){const O=v[n];T=this.getLabelText(h.secondaryLabel,{depth:k,datum:v,childrenKey:i,colorKey:o,colorName:s,labelKey:a,secondaryLabelKey:n,sizeKey:r,sizeName:l,value:O})}T===""&&(T=void 0),A.labelValue=I,A.secondaryLabelValue=T});const{width:p,height:g}=u;this.squarify(t,new BBox22(0,0,p,g)),this.rootNode?.walk(A=>{const{bbox:v,children:k,labelValue:D,secondaryLabelValue:C}=A;if(A.label=void 0,A.secondaryLabel=void 0,v!=null)if(k.length===0){const _={width:v.width,height:v.height,meta:null},I=formatLabels(D,this.properties.tile.label,C,this.properties.tile.secondaryLabel,{padding:h.padding},()=>_);if(I==null)return;const{height:T,label:O,secondaryLabel:w}=I,{textAlign:E,verticalAlign:B,padding:z}=h,P=textAlignFactors2[E]??.5,L=v.x+z+(v.width-2*z)*P,R=verticalAlignFactors4[B]??.5,V=v.y+z+T*.5+(v.height-2*z-T)*R;if(O!=null){const{fontStyle:F="normal",fontFamily:G,fontWeight:W="normal",color:H="black"}=this.properties.tile.label;A.label={text:O.text,fontSize:O.fontSize,lineHeight:O.lineHeight,fontStyle:F,fontFamily:G,fontWeight:W,color:H,textAlign:E,verticalAlign:"middle",x:L,y:V-(T-O.height)*.5}}if(w!=null){const{fontStyle:F="normal",fontFamily:G,fontWeight:W="normal",color:H="black"}=this.properties.tile.secondaryLabel;A.secondaryLabel={text:w.text,fontSize:w.fontSize,lineHeight:w.fontSize,fontStyle:F,fontFamily:G,fontWeight:W,color:H,textAlign:E,verticalAlign:"middle",x:L,y:V+(T-w.height)*.5}}}else{if(D==null)return;{const{padding:_,textAlign:I}=d,T=this.groupTitleHeight(A,v);if(T==null)return;const O=v.width-2*_,w=TextWrapper7.wrapText(D,{maxWidth:v.width-2*_,font:d.label,textWrap:"never"}),E=textAlignFactors2[I]??.5,{fontStyle:B="normal",fontFamily:z,fontWeight:P="normal",color:L="black"}=this.properties.group.label;A.label={text:w,fontSize:d.label.fontSize,lineHeight:TextUtils9.getLineHeight(d.label.fontSize),fontStyle:B,fontFamily:z,fontWeight:P,color:L,textAlign:I,verticalAlign:"middle",x:v.x+_+O*E,y:v.y+_+T*.5}}}});const y=(A,v,k,D,C)=>{const{bbox:_}=A;if(_==null){v.visible=!1;return}const{datum:I,depth:T=-1,datumIndex:O,colorValue:w}=A,E=A.children.length===0,B=E?D:k,z=E?this.getTileStyleOverrides(O,I,T,w,B,C):this.getGroupStyleOverrides(O,I,T,B,C);v.crisp=!0,applyShapeStyle13(v,B,z),v.cornerRadius=E?h.cornerRadius:d.cornerRadius,v.zIndex=[0,T,C?1:0];const P=A.parent?.children.every(V=>V.children.length===0),L=A.parent!=null?A.parent.bbox:void 0,R=A.parent!=null?A.parent.padding:void 0;P===!0&&L!=null&&R!=null?(v.clipBBox=_,v.x=L.x+R.left,v.y=L.y+R.top,v.width=L.width-(R.left+R.right),v.height=L.height-(R.top+R.bottom)):(v.clipBBox=void 0,v.x=_.x,v.y=_.y,v.width=_.width,v.height=_.height),v.visible=!0},f=this.getGroupBaseStyle(!1),m=this.getTileBaseStyle(!1);this.datumSelection.each((A,v)=>y(v,A,f,m,!1));const b=this.getGroupBaseStyle(!0),x=this.getTileBaseStyle(!0);this.highlightSelection.each((A,v)=>{y(v,A,b,x,!0)});const S=(A,v,k,D)=>{const C=A.children.length===0,_=k===0?A.label:A.secondaryLabel;if(_==null){v.visible=!1;return}let I;if(D){const{tile:T,group:O}=c;I=T.secondaryLabel.color,C?k===0&&(I=T.label.color):I=O.label.color}v.text=_.text,v.fontSize=_.fontSize,v.lineHeight=_.lineHeight,v.fontStyle=_.fontStyle,v.fontFamily=_.fontFamily,v.fontWeight=_.fontWeight,v.fill=I??_.color,v.textAlign=_.textAlign,v.textBaseline=_.verticalAlign,v.x=_.x,v.y=_.y,v.visible=!0,v.zIndex=1},M=this.ctx.highlightManager?.getActiveHighlight();this.labelSelection.selectByClass(Text9).forEach(A=>{S(A.datum,A,A.tag,A.datum===M)})}pickNodeClosestDatum(t){const e=this.pickNodeExactShape(t);return e!==void 0?e:this.pickNodeNearestDistantObject(t,this.datumSelection.nodes())}getTooltipContent(t){const{id:e,properties:i}=this,{labelKey:o,secondaryLabelKey:s,childrenKey:a,sizeKey:n,sizeName:r,colorKey:l,colorName:c,tooltip:h}=i,{datum:d,datumIndex:u,depth:p,children:g}=t;if(d==null||p==null)return;const y=g.length===0,f=[],m=n!=null?d[n]:void 0;m!=null&&f.push({label:r,fallbackLabel:n,value:m});const b=l!=null?d[l]:void 0;b!=null&&f.push({label:c,fallbackLabel:l,value:b});let x;y?(x=this.getTileBaseStyle(!1),Object.assign(x,this.getTileStyleOverrides(u,d,p,b,x,!1))):(x=this.getGroupBaseStyle(!1),Object.assign(x,this.getGroupStyleOverrides(u,d,p,x,!1)));const S=x.fill,M=y?{marker:{shape:"square",fill:S,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}}:void 0;return h.formatTooltip({title:o!=null?d[o]:void 0,symbol:M,data:f},{seriesId:e,datum:d,title:void 0,depth:p,labelKey:o,secondaryLabelKey:s,childrenKey:a,sizeKey:n,sizeName:r,colorKey:l,colorName:c,...x})}computeFocusBounds(t){return Transformable4.toCanvas(this.contentGroup,t.getBBox())}};TreemapSeries.className="TreemapSeries",TreemapSeries.type="treemap";var{FONT_SIZE_RATIO:FONT_SIZE_RATIO4,ThemeSymbols:{DEFAULT_DIVERGING_SERIES_COLOR_RANGE:DEFAULT_DIVERGING_SERIES_COLOR_RANGE6,DEFAULT_HIERARCHY_FILLS:DEFAULT_HIERARCHY_FILLS4,DEFAULT_HIERARCHY_STROKES:DEFAULT_HIERARCHY_STROKES2}}=import_ag_charts_community265._ModuleSupport,TreemapModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["hierarchy"],identifier:"treemap",moduleFactory:t=>new TreemapSeries(t),tooltipDefaults:{range:"exact"},solo:!0,themeTemplate:{series:{group:{label:{enabled:!0,color:{$ref:"textColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},spacing:4},fill:void 0,stroke:void 0,strokeWidth:1,padding:4,gap:2,textAlign:"left"},tile:{label:{enabled:!0,color:{$ref:"backgroundColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.5]},minimumFontSize:{$rem:[FONT_SIZE_RATIO4.SMALLER]},fontFamily:{$ref:"fontFamily"},wrapping:"on-space",overflowStrategy:"ellipsis",spacing:2},secondaryLabel:{enabled:!0,color:{$ref:"backgroundColor"},fontStyle:void 0,fontWeight:void 0,fontSize:{$ref:"fontSize"},minimumFontSize:{$rem:[FONT_SIZE_RATIO4.SMALLER]},fontFamily:{$ref:"fontFamily"},wrapping:"never",overflowStrategy:"ellipsis"},fill:void 0,stroke:void 0,strokeWidth:0,padding:3,gap:1},highlightStyle:{group:{label:{color:{$ref:"textColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2},tile:{label:{color:{$ref:"backgroundColor"}},secondaryLabel:{color:{$ref:"backgroundColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}}},gradientLegend:{enabled:!0}},paletteFactory:({takeColors:t,colorsCount:e,themeTemplateParameters:i})=>{const{fills:o,strokes:s}=t(e),a=i.get(DEFAULT_DIVERGING_SERIES_COLOR_RANGE6),n=i.get(DEFAULT_HIERARCHY_FILLS4),r=i.get(DEFAULT_HIERARCHY_STROKES2);return{fills:o,strokes:s,colorRange:a,undocumentedGroupFills:n,undocumentedGroupStrokes:r}}},import_ag_charts_community269=require("ag-charts-community"),import_ag_charts_community267=require("ag-charts-community"),import_ag_charts_community266=require("ag-charts-community"),{AbstractBarSeriesProperties:AbstractBarSeriesProperties6,BaseProperties:BaseProperties29,PropertiesArray:PropertiesArray8,SeriesTooltip:SeriesTooltip24,Validate:Validate87,BOOLEAN:BOOLEAN36,COLOR_STRING:COLOR_STRING31,FUNCTION:FUNCTION24,LINE_DASH:LINE_DASH25,NUMBER:NUMBER24,OBJECT:OBJECT47,OBJECT_ARRAY:OBJECT_ARRAY3,POSITIVE_NUMBER:POSITIVE_NUMBER39,RATIO:RATIO37,STRING:STRING44,UNION:UNION18,DropShadow:DropShadow5,Label:Label18}=import_ag_charts_community266._ModuleSupport,WaterfallSeriesTotal=class extends BaseProperties29{};__decorateClass([Validate87(UNION18(["subtotal","total"],"a total type"))],WaterfallSeriesTotal.prototype,"totalType",2),__decorateClass([Validate87(NUMBER24)],WaterfallSeriesTotal.prototype,"index",2),__decorateClass([Validate87(STRING44)],WaterfallSeriesTotal.prototype,"axisLabel",2);var WaterfallSeriesItemTooltip=class extends BaseProperties29{};__decorateClass([Validate87(FUNCTION24,{optional:!0})],WaterfallSeriesItemTooltip.prototype,"renderer",2);var WaterfallSeriesLabel=class extends Label18{constructor(){super(...arguments),this.placement="outside-end",this.padding=6}};__decorateClass([Validate87(UNION18(["inside-center","inside-start","inside-end","outside-start","outside-end"],"a placement"))],WaterfallSeriesLabel.prototype,"placement",2),__decorateClass([Validate87(POSITIVE_NUMBER39)],WaterfallSeriesLabel.prototype,"padding",2);var WaterfallSeriesItem=class extends BaseProperties29{constructor(){super(...arguments),this.fill="#c16068",this.stroke="#c16068",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=1,this.cornerRadius=0,this.shadow=new DropShadow5().set({enabled:!1}),this.label=new WaterfallSeriesLabel,this.tooltip=new WaterfallSeriesItemTooltip}};__decorateClass([Validate87(STRING44,{optional:!0})],WaterfallSeriesItem.prototype,"name",2),__decorateClass([Validate87(COLOR_STRING31)],WaterfallSeriesItem.prototype,"fill",2),__decorateClass([Validate87(COLOR_STRING31)],WaterfallSeriesItem.prototype,"stroke",2),__decorateClass([Validate87(RATIO37)],WaterfallSeriesItem.prototype,"fillOpacity",2),__decorateClass([Validate87(RATIO37)],WaterfallSeriesItem.prototype,"strokeOpacity",2),__decorateClass([Validate87(LINE_DASH25)],WaterfallSeriesItem.prototype,"lineDash",2),__decorateClass([Validate87(POSITIVE_NUMBER39)],WaterfallSeriesItem.prototype,"lineDashOffset",2),__decorateClass([Validate87(POSITIVE_NUMBER39)],WaterfallSeriesItem.prototype,"strokeWidth",2),__decorateClass([Validate87(POSITIVE_NUMBER39)],WaterfallSeriesItem.prototype,"cornerRadius",2),__decorateClass([Validate87(FUNCTION24,{optional:!0})],WaterfallSeriesItem.prototype,"itemStyler",2),__decorateClass([Validate87(OBJECT47)],WaterfallSeriesItem.prototype,"shadow",2),__decorateClass([Validate87(OBJECT47)],WaterfallSeriesItem.prototype,"label",2),__decorateClass([Validate87(OBJECT47)],WaterfallSeriesItem.prototype,"tooltip",2);var WaterfallSeriesConnectorLine=class extends BaseProperties29{constructor(){super(...arguments),this.enabled=!0,this.stroke="black",this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=2}};__decorateClass([Validate87(BOOLEAN36)],WaterfallSeriesConnectorLine.prototype,"enabled",2),__decorateClass([Validate87(COLOR_STRING31)],WaterfallSeriesConnectorLine.prototype,"stroke",2),__decorateClass([Validate87(RATIO37)],WaterfallSeriesConnectorLine.prototype,"strokeOpacity",2),__decorateClass([Validate87(LINE_DASH25)],WaterfallSeriesConnectorLine.prototype,"lineDash",2),__decorateClass([Validate87(POSITIVE_NUMBER39)],WaterfallSeriesConnectorLine.prototype,"lineDashOffset",2),__decorateClass([Validate87(POSITIVE_NUMBER39)],WaterfallSeriesConnectorLine.prototype,"strokeWidth",2);var WaterfallSeriesItems=class extends BaseProperties29{constructor(){super(...arguments),this.positive=new WaterfallSeriesItem,this.negative=new WaterfallSeriesItem,this.total=new WaterfallSeriesItem}};__decorateClass([Validate87(OBJECT47)],WaterfallSeriesItems.prototype,"positive",2),__decorateClass([Validate87(OBJECT47)],WaterfallSeriesItems.prototype,"negative",2),__decorateClass([Validate87(OBJECT47)],WaterfallSeriesItems.prototype,"total",2);var WaterfallSeriesProperties=class extends AbstractBarSeriesProperties6{constructor(){super(...arguments),this.item=new WaterfallSeriesItems,this.totals=new PropertiesArray8(WaterfallSeriesTotal),this.line=new WaterfallSeriesConnectorLine,this.tooltip=new SeriesTooltip24}};__decorateClass([Validate87(STRING44)],WaterfallSeriesProperties.prototype,"xKey",2),__decorateClass([Validate87(STRING44)],WaterfallSeriesProperties.prototype,"yKey",2),__decorateClass([Validate87(STRING44,{optional:!0})],WaterfallSeriesProperties.prototype,"xName",2),__decorateClass([Validate87(STRING44,{optional:!0})],WaterfallSeriesProperties.prototype,"yName",2),__decorateClass([Validate87(OBJECT47)],WaterfallSeriesProperties.prototype,"item",2),__decorateClass([Validate87(OBJECT_ARRAY3)],WaterfallSeriesProperties.prototype,"totals",2),__decorateClass([Validate87(OBJECT47)],WaterfallSeriesProperties.prototype,"line",2),__decorateClass([Validate87(OBJECT47)],WaterfallSeriesProperties.prototype,"tooltip",2);var{adjustLabelPlacement,SeriesNodePickMode:SeriesNodePickMode18,fixNumericExtent:fixNumericExtent10,valueProperty:valueProperty18,keyProperty:keyProperty10,accumulativeValueProperty,trailingAccumulatedValueProperty,ChartAxisDirection:ChartAxisDirection33,createDatumId:createDatumId25,checkCrisp:checkCrisp3,updateLabelNode:updateLabelNode4,prepareBarAnimationFunctions:prepareBarAnimationFunctions3,collapsedStartingBarPosition,resetBarSelectionsFn:resetBarSelectionsFn3,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation7,resetLabelFn:resetLabelFn6,animationValidation:animationValidation9,DEFAULT_CARTESIAN_DIRECTION_KEYS:DEFAULT_CARTESIAN_DIRECTION_KEYS2,DEFAULT_CARTESIAN_DIRECTION_NAMES:DEFAULT_CARTESIAN_DIRECTION_NAMES2,computeBarFocusBounds:computeBarFocusBounds6,isContinuous,Rect:Rect10,motion:motion10,applyShapeStyle:applyShapeStyle14}=import_ag_charts_community267._ModuleSupport,WaterfallSeries=class extends import_ag_charts_community267._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,directionKeys:DEFAULT_CARTESIAN_DIRECTION_KEYS2,directionNames:DEFAULT_CARTESIAN_DIRECTION_NAMES2,pickModes:[SeriesNodePickMode18.NEAREST_NODE,SeriesNodePickMode18.EXACT_SHAPE_MATCH],pathsPerSeries:["connector"],hasHighlightedLabels:!0,pathsZIndexSubOrderOffset:[-1,-1],animationResetFns:{datum:resetBarSelectionsFn3,label:resetLabelFn6}}),this.properties=new WaterfallSeriesProperties,this.seriesItemTypes=new Set(["positive","negative","total"])}async processData(t){const{xKey:e,yKey:i,totals:o}=this.properties,{data:s=[]}=this;if(!this.properties.isValid()||!this.visible)return;const a=b=>isContinuous(b)&&Number(b)>=0,n=b=>isContinuous(b)&&Number(b)>=0,r=b=>b==="total"||b==="subtotal",l={missingValue:void 0,invalidValue:void 0},c=[],h=o.reduce((b,x)=>{const S=b.get(x.index);return S?S.push(x):b.set(x.index,[x]),b},new Map);s.forEach((b,x)=>{c.push(b),h.get(x)?.forEach(S=>c.push({...S.toJson(),[e]:S.axisLabel}))});const d=[];this.ctx.animationManager.isSkipped()||d.push(animationValidation9());const u=this.getCategoryAxis()?.scale,p=this.getValueAxis()?.scale,{isContinuousX:g,xScaleType:y,yScaleType:f}=this.getScaleInformation({xScale:u,yScale:p}),{processedData:m}=await this.requestDataModel(t,c,{props:[keyProperty10(e,y,{id:"xValue"}),accumulativeValueProperty(i,f,{...l,id:"yCurrent"}),accumulativeValueProperty(i,f,{...l,missingValue:0,id:"yCurrentTotal"}),accumulativeValueProperty(i,f,{...l,id:"yCurrentPositive",validation:a}),accumulativeValueProperty(i,f,{...l,id:"yCurrentNegative",validation:n}),trailingAccumulatedValueProperty(i,f,{...l,id:"yPrevious"}),valueProperty18(i,f,{id:"yRaw"}),valueProperty18("totalType","band",{id:"totalTypeValue",missingValue:void 0,validation:r}),...g?[import_ag_charts_community267._ModuleSupport.SMALLEST_KEY_INTERVAL,import_ag_charts_community267._ModuleSupport.LARGEST_KEY_INTERVAL]:[],...d]});this.smallestDataInterval=m.reduced?.smallestKeyInterval,this.largestDataInterval=m.reduced?.largestKeyInterval,this.updateSeriesItemTypes(),this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!e||!i)return[];const{keys:[o],values:s}=e.domain;if(t===this.getCategoryDirection()){const a=i.resolveProcessedDataDefById(this,"xValue");if(a?.def.type==="key"&&a?.def.valueType==="category")return o;const n=t===ChartAxisDirection33.Y,r=this.getCategoryAxis().isReversed();return this.padBandExtent(o,r!==n)}else{const a=i.resolveProcessedDataIndexById(this,"yCurrent"),n=s[a],r=[Math.min(0,n[0]),Math.max(0,n[1])];return fixNumericExtent10(r)}}getSeriesRange(t,e){return[NaN,NaN]}createNodeData(){const{data:t,dataModel:e,processedData:i}=this,o=this.getCategoryAxis(),s=this.getValueAxis();if(!t||!o||!s||!e||!i)return;const{line:a}=this.properties,n=o.scale,r=s.scale,l=this.getBarDirection()===ChartAxisDirection33.X,c=this.getBandwidth(o)??10,h=o.isReversed(),d=s.isReversed();if(i.type!=="ungrouped")return;const u={itemId:this.properties.yKey,nodeData:[],labelData:[],pointData:[],scales:this.calculateScaling(),visible:this.visible};if(!this.visible)return u;const p=[],g=e.resolveKeysById(this,"xValue",i),y=e.resolveColumnById(this,"yRaw",i),f=e.resolveColumnById(this,"totalTypeValue",i),m=e.resolveColumnById(this,"yCurrent",i),b=e.resolveColumnById(this,"yPrevious",i),x=e.resolveColumnById(this,"yCurrentTotal",i),S=checkCrisp3(o?.scale,o?.visibleRange,this.smallestDataInterval,this.largestDataInterval);function M(O,w,E){return O||w?{cumulativeValue:x[E],trailingValue:w?v:0}:{cumulativeValue:m[E],trailingValue:b[E]}}function A(O,w,E,B,z){return O?B:w?(B??0)-(z??0):E}let v=0;const{xKey:k,yKey:D,xName:C,yName:_}=this.properties;(i.dataSources.get(this.id)??[]).forEach((O,w)=>{const E=f[w],B=this.isSubtotal(E),z=this.isTotal(E),P=z||B,L=g[w];if(L==null)return;const R=Math.round(n.convert(L)),V=y[w],{cumulativeValue:F,trailingValue:G}=M(z,B,w);P&&(v=F??0);const W=Math.round(r.convert(F)),H=Math.round(r.convert(G)),U=A(z,B,V,F,G),j=(U??0)>=0,$=this.getSeriesItemType(j,E),{strokeWidth:Z,label:X}=this.getItemConfig($),K=j?W:H,q=j?H:W,Q=Math.max(Z,Math.abs(q-K)),Y={x:l?Math.min(K,q):R,y:l?R:Math.min(K,q),width:l?Q:c,height:l?c:Q},st={x:Y.x+Y.width/2,y:Y.y+Y.height/2},ot=P?W:H,J=Math.floor(a.strokeWidth)%2/2,tt=h?W:ot,et=h?ot:W;let it,nt;l?(it={x:tt+J,y:Y.y},nt={x:et+J,y:Y.y+Y.height}):(it={x:Y.x,y:tt+J},nt={x:Y.x+Y.width,y:et+J});const ht={x:h?nt.x:it.x,y:h?nt.y:it.y,x2:h?it.x:nt.x,y2:h?it.y:nt.y,size:0};p.push(ht);const lt=$==="subtotal"?"total":$,dt=this.getLabelText(X,{itemId:lt,value:U,datum:O,xKey:k,yKey:D,xName:C,yName:_}),ct={index:w,series:this,itemId:$,datum:O,datumIndex:w,cumulativeValue:F??0,xValue:L,yValue:U,yKey:D,xKey:k,x:Y.x,y:Y.y,width:Y.width,height:Y.height,midPoint:st,crisp:S,label:{text:dt,...adjustLabelPlacement({isUpward:(U??-1)>=0!==d,isVertical:!l,placement:X.placement,padding:X.padding,rect:Y})}};u.nodeData.push(ct),u.labelData.push(ct)});const T=this.properties.line.enabled;return m!=null&&T&&(u.pointData=p),u}updateSeriesItemTypes(){const{dataModel:t,seriesItemTypes:e,processedData:i}=this;if(!t||!i)return;e.clear();const o=t.resolveProcessedDataIndexById(this,"yCurrentPositive"),s=t.resolveProcessedDataIndexById(this,"yCurrentNegative"),a=t.resolveProcessedDataIndexById(this,"totalTypeValue"),n=i.domain.values[o]??[],r=i.domain.values[s]??[];n.length>0&&e.add("positive"),r.length>0&&e.add("negative");const l=i?.domain.values[a];l&&l.forEach(c=>{(c==="total"||c==="subtotal")&&e.add("total")})}isSubtotal(t){return t==="subtotal"}isTotal(t){return t==="total"}nodeFactory(){return new Rect10}getSeriesItemType(t,e){return e??(t?"positive":"negative")}getItemConfig(t){switch(t){case"positive":return this.properties.item.positive;case"negative":return this.properties.item.negative;case"subtotal":case"total":return this.properties.item.total}}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,o=e??[];return i.update(o)}getItemStyle(t,e,i,o){const{id:s,properties:a}=this,n=a.item[i==="subtotal"?"total":i],r=o?a.highlightStyle.item:void 0,{itemStyler:l}=n,{xKey:c,yKey:h}=a,d={fill:r?.fill??n.fill,fillOpacity:r?.fillOpacity??n.fillOpacity,stroke:r?.stroke??n.stroke,strokeWidth:r?.strokeWidth??n.strokeWidth,strokeOpacity:r?.strokeOpacity??n.strokeOpacity,lineDash:r?.lineDash??n.lineDash??[],lineDashOffset:r?.lineDashOffset??n.lineDashOffset,cornerRadius:n.cornerRadius};if(l!=null){const u=this.cachedDatumCallback(createDatumId25(t,o?"highlight":"node"),()=>l({seriesId:s,itemId:i,datum:e,xKey:c,yKey:h,highlighted:o,...d}));Object.assign(d,u)}return d}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,o=this.getCategoryDirection()===ChartAxisDirection33.X;e.each((s,a)=>{const n=a.itemId,r=this.getItemStyle(String(a.datumIndex),a.datum,n,i);applyShapeStyle14(s,r),s.visible=o?a.width>0:a.height>0,s.crisp=a.crisp})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;if(e.length===0)return i.update([]);const o=e.filter(s=>{const{label:a}=this.getItemConfig(s.itemId);return a.enabled});return i.update(o)}updateLabelNodes(t){t.labelSelection.each((e,i)=>{updateLabelNode4(e,this.getItemConfig(i.itemId).label,i.label)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:o,properties:s}=this,{xKey:a,xName:n,yKey:r,yName:l,tooltip:c}=s,h=this.getCategoryAxis(),d=this.getValueAxis();if(!i||!o||!h||!d)return;const{datumIndex:u}=t,p=o.dataSources.get(this.id)?.[u],g=i.resolveKeysById(this,"xValue",o)[u],y=i.resolveColumnById(this,"yRaw",o)[u],f=i.resolveColumnById(this,"yCurrentTotal",o),m=i.resolveColumnById(this,"totalTypeValue",o);if(g==null)return;const b=m[u],x=(y??0)>=0,S=this.getSeriesItemType(x,b);let M;if(this.isTotal(b))M=f[u];else if(this.isSubtotal(b)){M=f[u];for(let v=u-1;v>=0;v-=1)if(this.isSubtotal(m[v])){M=M-f[v];break}}else M=y;const A=this.getItemStyle(String(u),p,S,!1);return c.formatTooltip({heading:h.formatDatum(g),symbol:this.legendItemSymbol(S),data:[{label:l,fallbackLabel:r,value:d.formatDatum(M)}]},{seriesId:e,datum:p,title:l,itemId:S,xKey:a,xName:n,yKey:r,yName:l,...A})}legendItemSymbol(t){const{fill:e,stroke:i,fillOpacity:o,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:r}=this.getItemConfig(t);return{marker:{fill:e,stroke:i,fillOpacity:o,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:r}}}getLegendData(t){if(t!=="category")return[];const{id:e,seriesItemTypes:i}=this,o=[],s=n=>n.charAt(0).toUpperCase()+n.substring(1),{showInLegend:a}=this.properties;return i.forEach(n=>{const{name:r}=this.getItemConfig(n);o.push({legendType:"category",id:e,itemId:n,seriesId:e,enabled:!0,label:{text:r??s(n)},symbol:this.legendItemSymbol(n),hideInLegend:!a,isFixed:!0})}),o}toggleSeriesItem(){}animateEmptyUpdateReady({datumSelection:t,labelSelection:e,contextData:i,paths:o}){const s=prepareBarAnimationFunctions3(collapsedStartingBarPosition(this.isVertical(),this.axes,"normal"));motion10.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],s),seriesLabelFadeInAnimation7(this,"labels",this.ctx.animationManager,e);const{pointData:a}=i;if(!a)return;const[n]=o;this.isVertical()?this.animateConnectorLinesVertical(n,a):this.animateConnectorLinesHorizontal(n,a)}animateConnectorLinesHorizontal(t,e){const{path:i}=t;this.updateLineNode(t);const o=this.getValueAxis(),s=o?.isReversed(),a=s?(c,h)=>cc>h,n=o?.scale.convert(0),r=e.reduce((c,h)=>(a(h.x,c)&&(c=h.x),c),s?1/0:0),l=(c,h,d,u,p)=>(c-h)/(d-h)*(p-u)+u;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:n,to:r,ease:import_ag_charts_community267._ModuleSupport.Motion.easeOut,collapsable:!1,onUpdate(c){i.clear(!0),e.forEach((h,d)=>{const u=l(c,n,r,n,h.x),p=l(c,n,r,n,h.x2);d!==0&&i.lineTo(u,h.y),i.moveTo(p,h.y2)}),t.checkPathDirty()}})}animateConnectorLinesVertical(t,e){const{path:i}=t;this.updateLineNode(t);const o=this.getValueAxis(),s=o?.isReversed(),a=s?(c,h)=>c>h:(c,h)=>c(a(h.y,c)&&(c=h.y),c),s?0:1/0),l=(c,h,d,u,p)=>(c-h)/(d-h)*(p-u)+u;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:n,to:r,ease:import_ag_charts_community267._ModuleSupport.Motion.easeOut,collapsable:!1,onUpdate(c){i.clear(!0),e.forEach((h,d)=>{const u=l(c,n,r,n,h.y),p=l(c,n,r,n,h.y2);d!==0&&i.lineTo(h.x,u),i.moveTo(h.x2,p)}),t.checkPathDirty()}})}animateReadyResize(t){super.animateReadyResize(t),this.resetConnectorLinesPath(t)}updatePaths(t){this.resetConnectorLinesPath({contextData:t.contextData,paths:t.paths})}resetConnectorLinesPath({contextData:t,paths:e}){if(e.length===0)return;const[i]=e;this.updateLineNode(i);const{path:o}=i;o.clear(!0);const{pointData:s}=t;s&&(s.forEach((a,n)=>{n!==0&&o.lineTo(a.x,a.y),o.moveTo(a.x2,a.y2)}),i.checkPathDirty())}updateLineNode(t){const{stroke:e,strokeWidth:i,strokeOpacity:o,lineDash:s,lineDashOffset:a}=this.properties.line;t.setProperties({fill:void 0,stroke:e,strokeWidth:this.getStrokeWidth(i),strokeOpacity:o,lineDash:s,lineDashOffset:a,lineJoin:"round",pointerEvents:import_ag_charts_community267._ModuleSupport.PointerEvents.None})}isLabelEnabled(){const{positive:t,negative:e,total:i}=this.properties.item;return t.label.enabled||e.label.enabled||i.label.enabled}onDataChange(){}computeFocusBounds({datumIndex:t}){return computeBarFocusBounds6(this,this.contextNodeData?.nodeData[t])}};WaterfallSeries.className="WaterfallSeries",WaterfallSeries.type="waterfall";var import_ag_charts_community268=require("ag-charts-community"),itemTheme={strokeWidth:0,label:{enabled:!1,fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},formatter:void 0,placement:"outside-end"}},WATERFALL_SERIES_THEME={series:{item:{positive:itemTheme,negative:itemTheme,total:itemTheme},line:{stroke:import_ag_charts_community268._ModuleSupport.ThemeSymbols.PALETTE_NEUTRAL_STROKE,strokeOpacity:1,lineDash:[0],lineDashOffset:0,strokeWidth:2}},legend:{enabled:!0,toggleSeries:!1}},{ThemeConstants}=import_ag_charts_community269._ModuleSupport,WaterfallModule={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"waterfall",solo:!0,moduleFactory:t=>new WaterfallSeries(t),tooltipDefaults:{range:"exact"},defaultAxes:import_ag_charts_community269._ModuleSupport.swapAxisCondition([{type:ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER,position:ThemeConstants.CARTESIAN_POSITION.LEFT},{type:ThemeConstants.CARTESIAN_AXIS_TYPE.CATEGORY,position:ThemeConstants.CARTESIAN_POSITION.BOTTOM}],t=>t?.direction==="horizontal"),themeTemplate:WATERFALL_SERIES_THEME,paletteFactory:({takeColors:t,colorsCount:e,userPalette:i,palette:o})=>{if(i==="user-indexed"){const{fills:s,strokes:a}=t(e);return{line:{stroke:o.neutral.stroke},item:{positive:{fill:s[0],stroke:a[0]},negative:{fill:s[1],stroke:a[1]},total:{fill:s[2],stroke:a[2]}}}}return{line:{stroke:o.neutral.stroke},item:{positive:{fill:o.altUp.fill,stroke:o.altUp.stroke,label:{color:{$ref:"textColor"}}},negative:{fill:o.altDown.fill,stroke:o.altDown.stroke,label:{color:{$ref:"textColor"}}},total:{fill:o.neutral.fill,stroke:o.neutral.stroke,label:{color:{$ref:"textColor"}}}}}}},styles_default=`.ag-watermark{position:absolute;bottom:20px;right:25px;font-weight:700;font-family:Impact,sans-serif;font-size:19px;opacity:.7;animation:1s ease-out 3s ag-watermark-fadeout;color:#9b9b9b;pointer-events:none;&:before{content:"";display:block;height:40px;width:170px;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=);background-repeat:no-repeat;background-size:170px 40px}>span{padding-left:.7rem}}@keyframes ag-watermark-fadeout{0%{opacity:.5}to{opacity:0}}.ag-charts-dialog{display:flex;flex-direction:column;font-size:var(--ag-charts-chrome-font-size-large)}.ag-charts-dialog__tabs{display:flex;flex-direction:column}.ag-charts-dialog__header{border-bottom:1px solid var(--ag-charts-border-color);display:flex}.ag-charts-dialog__tab-list{display:flex;gap:calc(var(--ag-charts-spacing) * 2)}.ag-charts-dialog__drag-handle{align-items:center;color:inherit;cursor:grab;display:flex;padding:1px 6px;text-align:center}.ag-charts-dialog__drag-handle--dragging{cursor:grabbing}.ag-charts-dialog__tab-button{background:none;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--ag-charts-chrome-subtle-text-color);margin-bottom:-1px;padding:var(--input-padding) calc(var(--input-padding) / 2)}.ag-charts-dialog__tab-button:hover{background:none}.ag-charts-dialog__tab-button--active{border-color:var(--ag-charts-accent-color);color:inherit}.ag-charts-dialog__drag-handle+.ag-charts-dialog__tab-button{margin-left:calc(var(--ag-charts-spacing) * -2)}.ag-charts-button.ag-charts-dialog__close-button{background:none;border:0;margin-left:auto;padding:1px 6px}.ag-charts-dialog__close-button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-dialog__tab-panel{display:none;flex-direction:column;gap:calc(var(--ag-charts-spacing) * 4);margin:0 calc(var(--ag-charts-spacing) * 4);padding:calc(var(--ag-charts-spacing) * 4) 0}.ag-charts-dialog__tab-panel--active{display:flex}.ag-charts-dialog__input-group-line{display:flex;gap:16px 18px;flex-wrap:wrap}.ag-charts-dialog__input-group{align-items:center;display:flex;font-size:var(--ag-charts-chrome-font-size)}.ag-charts-dialog__input-group-label{color:var(--ag-charts-chrome-subtle-text-color);margin-right:5px}.ag-charts-dialog__input-group-label[for]{cursor:pointer}.ag-charts-dialog__button{border-radius:0;margin-right:-1px}.ag-charts-dialog__button.ag-charts-dialog__button--active{background:var(--ag-charts-button-focus-background-color);border-color:var(--ag-charts-input-focus-border-color);color:var(--ag-charts-input-focus-text-color);z-index:var(--input-layer-active)}.ag-charts-dialog__button:first-child,.ag-charts-dialog__input-group-label+.ag-charts-dialog__button{border-bottom-left-radius:var(--ag-charts-input-border-radius);border-top-left-radius:var(--ag-charts-input-border-radius)}.ag-charts-dialog__button:last-child{border-bottom-right-radius:var(--ag-charts-input-border-radius);border-top-right-radius:var(--ag-charts-input-border-radius)}.ag-charts-dialog__color-picker-button{--color: #000;background:var(--color);border:none;color:transparent;height:26px;width:26px}.ag-charts-dialog__color-picker-button:hover{background:var(--color)}.ag-charts-dialog__color-picker-button--multi-color,.ag-charts-dialog__color-picker-button--multi-color:hover{background:linear-gradient(135deg,red 0%,#ff0 calc(100% * 1 / 6),#0f0 calc(100% * 2 / 6),#0ff 50%,#00f calc(100% * 4 / 6),#f0f calc(100% * 5 / 6),red 100%)}.ag-charts-color-picker{width:190px;padding:8px;--h: 0;--s: 0;--v: 0;--a: 0;--color: #000;--color-a: #000;--thumb-size: 18px;--inner-width: 172px;--track-height: 12px;--palette-height: 136px;--checker: url('data:image/svg+xml;utf8,');--multi-color: linear-gradient( 135deg, #f00 0% , #ff0 calc(100% * 1 / 6), #0f0 calc(100% * 2 / 6), #0ff 50% , #00f calc(100% * 4 / 6), #f0f calc(100% * 5 / 6), #f00 100% )}.ag-charts-color-picker__content{display:flex;flex-direction:column}.ag-charts-color-picker__palette{position:relative;width:100%;height:var(--palette-height);margin-bottom:8px;background:linear-gradient(to bottom,#0000,#000),linear-gradient(to right,#fff,#fff0) hsl(var(--h),100%,50%);border-radius:calc(var(--ag-charts-border-radius) * 1.5);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__palette:after{content:"";position:absolute;display:block;top:calc(var(--thumb-size) * -.5 + (1 - var(--v)) * 100%);left:calc(var(--thumb-size) * -.5 + var(--s) * 100%);background:var(--color);width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038}.ag-charts-color-picker__palette:focus-visible:after{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),0 0 0 2px #fff8,var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__color-row{display:flex;gap:8px;align-items:center;margin-bottom:4px;--inset: calc((var(--thumb-size) - var(--track-height)) / 2)}.ag-charts-color-picker__hue-input,.ag-charts-color-picker__alpha-input{-webkit-appearance:none;display:block;position:relative;padding:0;margin:0 calc(var(--inset) * -1);border:0;height:var(--thumb-size);width:auto;background:transparent;--inset: calc((var(--thumb-size) - var(--track-height)) / 2)}.ag-charts-color-picker__hue-input::-webkit-slider-thumb,.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{-webkit-appearance:none;width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038;transform:translateZ(0)}.ag-charts-color-picker__hue-input::-webkit-slider-thumb{background:hsl(var(--h),100%,50%)}.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{background:transparent}.ag-charts-color-picker__alpha-input--opaque::-webkit-slider-thumb{background:var(--color)}.ag-charts-color-picker__hue-input:focus-visible::-webkit-slider-thumb,.ag-charts-color-picker__alpha-input:focus-visible::-webkit-slider-thumb{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__hue-input:before,.ag-charts-color-picker__alpha-input:before{position:absolute;content:"";display:block;top:calc(50% - var(--track-height) / 2);left:var(--inset);right:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__multi-color-button{width:36px;margin-left:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);border:0;background:var(--multi-color);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__multi-color-button--hidden{display:none}.ag-charts-color-picker__multi-color-button--active{box-shadow:inset 0 0 0 1px #0003;outline-offset:1px;outline:2px solid #2196f3}.ag-charts-color-picker__hue-input{flex:1 0 0}.ag-charts-color-picker__hue-input:before{background:linear-gradient(to right,red,red calc((100% - var(--track-height)) * 0 / 6 + var(--track-height) / 2),#ff0 calc((100% - var(--track-height)) * 1 / 6 + var(--track-height) / 2),#0f0 calc((100% - var(--track-height)) * 2 / 6 + var(--track-height) / 2),#0ff calc((100% - var(--track-height)) * 3 / 6 + var(--track-height) / 2),#00f calc((100% - var(--track-height)) * 4 / 6 + var(--track-height) / 2),#f0f calc((100% - var(--track-height)) * 5 / 6 + var(--track-height) / 2),red calc((100% - var(--track-height)) * 6 / 6 + var(--track-height) / 2))}.ag-charts-color-picker__alpha-input{margin-bottom:7px}.ag-charts-color-picker__alpha-input:before{background:linear-gradient(to right,transparent,var(--color)),var(--checker) top left / 4px 4px}.ag-charts-color-picker__color-field{display:flex;border:var(--ag-charts-border);background:var(--ag-charts-background-color);border-radius:var(--ag-charts-border-radius);overflow:hidden}.ag-charts-color-picker__color-field:has(:focus-visible){border-color:var(--ag-charts-accent-color);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__color-label{width:16px;height:16px;margin:7px 0 7px 7px;color:transparent;background:linear-gradient(to right,var(--color-a),var(--color-a)),var(--checker) top left / 4px 4px;border-radius:calc(var(--ag-charts-border-radius) / 2);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__color-label--multi-color{background:var(--multi-color)}.ag-charts-color-picker__color-input{flex:1;min-width:0;padding:7px 7px 7px 8px;border:0;margin:0;color:inherit;background:transparent;font-variant:tabular-nums}.ag-charts-color-picker__color-input:focus-visible{border:none;outline:none}.ag-charts-annotations__line-stroke-width-menu,.ag-charts-annotations__line-style-type-menu,.ag-charts-annotations__text-size-menu{.ag-charts-menu__row:first-child{border-radius:0}}.ag-charts-annotations__text-size-menu{--item-padding: 4px 8px;border-top-left-radius:0;border-top-right-radius:0;min-width:34px;text-align:center}.ag-charts-annotations__line-stroke-width-menu{--item-padding: 6px;column-gap:6px}.ag-charts-annotations__line-style-type-menu{--item-padding: 6px;column-gap:0}.ag-charts-annotations__stroke-width-button:before{background:var(--ag-charts-foreground-color);content:"";margin-right:var(--toolbar-button-padding);height:min(var(--stroke-width),20px);width:12px}.ag-charts-annotations__stroke-width-button[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-annotations__color-picker-button{--emblem: var(--color)}.ag-charts-annotations__color-picker-button--multi-color{--emblem: linear-gradient( to right, #f00 0% , #ff0 calc(100% * 1 / 6), #0f0 calc(100% * 2 / 6), #0ff 50% , #00f calc(100% * 4 / 6), #f0f calc(100% * 5 / 6), #f00 100% )}.ag-charts-annotations__color-picker-button:after{content:"";display:block;position:absolute;bottom:3px;left:5px;right:5px;height:4px;border-radius:99px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ag-charts-foreground-color) 10%,transparent);background:var(--emblem)}.ag-charts-annotations__color-picker-button[aria-disabled=true]:after{filter:grayscale(1);opacity:.5}.ag-charts-annotations__toolbar-menu{min-width:200px}.ag-charts-annotations__axis-button--hidden{display:none}.ag-charts-annotations__axis-button{background-color:var(--ag-charts-crosshair-label-background-color);border-radius:calc(var(--ag-charts-border-radius) / 2);border:none;box-sizing:border-box;color:var(--ag-charts-crosshair-label-text-color);cursor:pointer;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);left:0;line-height:16px;overflow:hidden;padding:0;position:absolute;top:0;user-select:none;white-space:nowrap;z-index:var(--ag-charts-layer-annotations)}.ag-charts-annotations__axis-button:hover{opacity:.8;color:var(--ag-charts-background-color)}.ag-charts-dialog--annotation-settings{min-height:233px;width:289px}.ag-charts-dialog--annotation-settings .ag-charts-textarea{height:calc(10px * 2 + var(--textarea-line-height) * 1em * 3 + 2px);overflow-y:auto;resize:vertical}.ag-charts-context-menu{background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);border-radius:var(--ag-charts-border-radius);box-shadow:var(--ag-charts-shadow);color:var(--ag-charts-chrome-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:calc(var(--ag-charts-chrome-font-size) * (13 / 12));font-weight:var(--ag-charts-chrome-font-weight);transition:transform .1s ease;white-space:nowrap;z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-context-menu__cover{position:fixed;left:0;top:0}.ag-charts-context-menu__menu{display:flex;flex-direction:column;padding:.5em 0}.ag-charts-context-menu__menu:focus{outline:none}.ag-charts-context-menu__item{background:none;border:none;box-sizing:border-box;color:inherit;font:inherit;padding:.5em 1em;text-align:left;-webkit-appearance:none;-moz-appearance:none}.ag-charts-context-menu__item:focus,.ag-charts-context-menu__item:active{background:var(--ag-charts-focus-color)}.ag-charts-context-menu__item[data-focus-visible-override=true]:focus,.ag-charts-context-menu__item:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-context-menu__item[data-focus-visible-override=false]{outline:inherit;box-shadow:inherit;z-index:inherit}.ag-charts-context-menu__item[aria-disabled=true]{border:none;opacity:.5;text-align:left}.ag-charts-context-menu__item[aria-disabled=true]:focus{background:inherit;cursor:inherit}.ag-charts-context-menu__divider{margin:5px 0;background:#babfc7;height:1px}.ag-charts-context-menu__divider.ag-charts-dark-context-menu{background:#2196f31a}.ag-charts-crosshair-label{position:absolute;left:0;top:0;user-select:none;pointer-events:none;font-family:var(--ag-charts-font-family);font-size:var(--ag-charts-font-size);font-weight:var(--ag-charts-font-weight);overflow:hidden;white-space:nowrap;z-index:var(--ag-charts-layer-crosshair);box-sizing:border-box}.ag-charts-crosshair-label-content{padding:0 8px;border-radius:calc(var(--ag-charts-border-radius) / 2);line-height:calc(var(--ag-charts-font-size) + 8px);background-color:var(--ag-charts-crosshair-label-background-color);color:var(--ag-charts-crosshair-label-text-color)}.ag-charts-crosshair-label--hidden{visibility:hidden!important}.ag-charts-text-input{position:absolute}.ag-charts-text-input__textarea{--placeholder-text-color: var(--ag-charts-input-placeholder-text-color);display:block;height:100%;width:100%;border:0;background:none;line-height:1.38;outline:none;transform:translateY(.09em)}.ag-charts-text-input__textarea[placeholder]:empty:before{content:attr(placeholder);color:var(--placeholder-text-color);font-weight:400}.ag-charts-text-input__textarea[placeholder]:not(:empty):before{content:""}.ag-charts-chart-toolbar__menu{min-width:200px}.ag-charts-range-buttons .ag-charts-toolbar__button{padding:var(--toolbar-button-padding) calc(var(--toolbar-button-padding) * 1.5)}.ag-charts-zoom-buttons{align-items:center;display:flex;height:44px;justify-content:center;overflow:hidden;padding-bottom:10px;pointer-events:none;width:100%;.ag-charts-toolbar{--toolbar-size: 24px;--toolbar-button-padding: 1px;display:flex;font-size:var(--ag-charts-chrome-font-size);height:var(--toolbar-size);justify-content:center;opacity:1;pointer-events:auto;transition:opacity .2s ease-in-out,transform .4s ease-in-out;.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius)}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius)}.ag-charts-toolbar__label{padding-left:var(--ag-charts-spacing);padding-right:var(--ag-charts-spacing)}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{padding-left:0}.ag-charts-toolbar__button--gap{margin-left:var(--toolbar-gap)}.ag-charts-zoom-buttons__toolbar--hidden{opacity:0;transition:opacity .4s ease-in-out,transform .4s ease-in-out}}}.ag-charts-shared-toolbar{gap:var(--toolbar-gap);.ag-charts-toolbar__button{border-radius:var(--ag-charts-border-radius);margin:0}} `;import_ag_charts_community270._ModuleSupport.ModuleRegistry.registerMany([FlowProportionChartModule,GaugeChartModule,HierarchyChartModule,StandaloneChartModule,TopologyChartModule]);function setupEnterpriseModules(){import_ag_charts_community270._ModuleSupport.moduleRegistry.register(AngleCategoryAxisModule,AngleNumberAxisModule,AnimationModule,AnnotationsModule,BackgroundModule,BarModule,ForegroundModule,BoxPlotModule,CandlestickModule,ChordModule,ConeFunnelModule,FunnelModule,OhlcModule,ChartToolbarModule,ContextMenuModule,CrosshairModule,DataSourceModule,ErrorBarsModule,LinearGaugeModule,LineModule,MapLineModule,MapLineBackgroundModule,MapMarkerModule,MapShapeModule,MapShapeBackgroundModule,NavigatorModule,StatusBarModule,GradientLegendModule,HeatmapModule,NightingaleModule,OrdinalTimeAxisModule,RadarAreaModule,RadarLineModule,RadialBarModule,RadialColumnModule,RadiusCategoryAxisModule,RadialGaugeModule,RadiusNumberAxisModule,RangeBarModule,RangeAreaModule,RangesModule,PyramidModule,SankeyModule,SharedToolbarModule,SunburstModule,SyncModule,TreemapModule,WaterfallModule,ZoomModule),import_ag_charts_community270._ModuleSupport.enterpriseModule.isEnterprise=!0,import_ag_charts_community270._ModuleSupport.enterpriseModule.styles=styles_default,import_ag_charts_community270._ModuleSupport.enterpriseModule.licenseManager=t=>new LicenseManager(t.container?.ownerDocument??(typeof document>"u"?void 0:document)),import_ag_charts_community270._ModuleSupport.enterpriseModule.injectWatermark=injectWatermark}__reExport(main_exports,require("ag-charts-community"),module.exports),setupEnterpriseModules();var LicenseManager2={setLicenseKey(t){LicenseManager.setLicenseKey(t)}};function setupEnterpriseModules2(){setupEnterpriseModules(),(0,import_ag_charts_community271.setupCommunityModules)()}var AgChartsEnterpriseModule={VERSION:import_ag_charts_community271.VERSION,_Scene:import_ag_charts_community271._Scene,_Theme:import_ag_charts_community271._Theme,_Util:import_ag_charts_community271._Util,create:import_ag_charts_community271.AgCharts.create.bind(import_ag_charts_community271.AgCharts),createSparkline:import_ag_charts_community271.AgCharts.__createSparkline.bind(import_ag_charts_community271.AgCharts),setup:setupEnterpriseModules2,setGridContext:LicenseManager.setGridContext.bind(LicenseManager),setLicenseKey:LicenseManager.setLicenseKey.bind(LicenseManager),isEnterprise:!0};