ag-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
26 lines • 1.77 MB
JavaScript
(function(Uf,Co){typeof exports=="object"&&typeof module=="object"?module.exports=Co():typeof define=="function"&&define.amd?define("agCharts",[],Co):typeof exports=="object"?exports.agCharts=Co():Uf.agCharts=Co()})(this,()=>{var Uf={},Co={exports:Uf};if(typeof OIt>"u")var OIt=function(e){throw new Error("Unknown module: "+e)};var Mb=Object.defineProperty,AP=Object.getOwnPropertyDescriptor,CP=Object.getOwnPropertyNames,mZ=Object.prototype.hasOwnProperty,I=(t,e)=>function(){return t&&(e=(0,t[CP(t)[0]])(t=0)),e},La=(t,e)=>{for(var i in e)Mb(t,i,{get:e[i],enumerable:!0})},yZ=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of CP(e))!mZ.call(t,a)&&a!==i&&Mb(t,a,{get:()=>e[a],enumerable:!(s=AP(e,a))||s.enumerable});return t},w=t=>yZ(Mb({},"__esModule",{value:!0}),t),S=(t,e,i,s)=>{for(var a=s>1?void 0:s?AP(e,i):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&Mb(e,i,a),a},ut={};La(ut,{error:()=>LP,errorOnce:()=>vZ,log:()=>xZ,logGroup:()=>MZ,reset:()=>SZ,table:()=>bZ,warn:()=>cI,warnOnce:()=>Kf});function xZ(...t){console.log(...t)}function cI(t,...e){console.warn(`AG Charts - ${t}`,...e)}function LP(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)}function bZ(...t){console.table(...t)}function wP(t,e,i){let s;t instanceof Error?s=t.message:typeof t=="string"?s=t:typeof t=="object"?s=JSON.stringify(t):s=String(t);const a=`${e}: ${s}`;Db.has(a)||(i(t),Db.add(a))}function Kf(t,...e){wP(t,"Logger.warn",i=>cI(i,...e))}function vZ(t,...e){wP(t,"Logger.error",i=>LP(i,...e))}function SZ(){Db.clear()}function MZ(t,e){console.groupCollapsed(t);try{return e()}finally{console.groupEnd()}}var Db,kb=I({"packages/ag-charts-core/src/globals/logger.ts"(){"use strict";Db=new Set}}),hI,DZ=I({"packages/ag-charts-core/src/interfaces/moduleDefinition.ts"(){"use strict";hI=(t=>(t.Axis="axis",t.Chart="chart",t.Preset="preset",t.Plugin="plugin",t.Series="series",t))(hI||{})}}),qs={};La(qs,{detectChartDefinition:()=>LZ,getAxisModule:()=>wZ,getPresetModule:()=>TZ,getSeriesModule:()=>NZ,hasModule:()=>AZ,listModulesByType:()=>CZ,register:()=>TP,registerMany:()=>kZ,reset:()=>IZ});function TP(t,e){const{def:i,version:s}=Lo.get(t.name)??{};if(!i){Lo.set(t.name,{def:t,version:e});return}if(!i.enterprise&&t.enterprise&&e===s){Lo.set(t.name,{def:t,version:e});return}if(s===e){cI([`AG Charts - Module '${t.name}' already registered,',
'ignoring (version: ${s}).`,"Check your code for duplicate loading of charts NPM modules."].join(" "));return}throw new Error([`AG Charts - Module '${t.name}' already registered with different version:`,`${s} vs ${e}`,"","Check your package.json for conflicting dependencies - depending on your package manager","one of these commands may help:","- npm ls ag-charts-community","- yarn why ag-charts-community"].join(`
`))}function kZ(t,e){for(const i of t)TP(i,e)}function IZ(){Lo.clear()}function AZ(t){return Lo.has(t)}function*CZ(t){for(const e of Lo.values())Yf(t,e.def)&&(yield e.def)}function LZ(t){for(const e of Lo.values())if(Yf("chart",e.def)&&e.def.detect(t))return e.def;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function wZ(t){const e=Lo.get(t);if(Yf("axis",e?.def))return e?.def}function TZ(t){const e=Lo.get(t);if(Yf("preset",e?.def))return e?.def}function NZ(t){const e=Lo.get(t);if(Yf("series",e?.def))return e?.def}function Yf(t,e){return e?.type===t}var Lo,OZ=I({"packages/ag-charts-core/src/globals/moduleRegistry.ts"(){"use strict";kb(),Lo=new Map}}),NP=I({"packages/ag-charts-core/src/globals/index.ts"(){"use strict";kb(),OZ()}}),PZ=I({"packages/ag-charts-core/src/interfaces/globalTypes.ts"(){"use strict"}}),gr,_Z=I({"packages/ag-charts-core/src/classes/eventEmitter.ts"(){"use strict";gr=class{constructor(){this.events=new Map}on(t,e){return this.events.has(t)||this.events.set(t,new Set),this.events.get(t)?.add(e),()=>this.off(t,e)}off(t,e){const i=this.events.get(t);i&&(i.delete(e),i.size===0&&this.events.delete(t))}emit(t,e){this.events.get(t)?.forEach(i=>i(e))}clear(t){t?this.events.delete(t):this.events.clear()}}}});function wo(t){return t?To.document?.[t]:To.document}function de(t){return t?To.window?.[t]:To.window}function OP(t){To.document=t}function PP(t){To.window=t}var To,Ib=I({"packages/ag-charts-core/src/utils/dom/globalsProxy.ts"(){"use strict";To={},typeof window<"u"?To.window=window:typeof global<"u"&&(To.window=global.window),typeof document<"u"?To.document=document:typeof global<"u"&&(To.document=global.document)}});function zt(t,e,i){const s=wo().createElement(t);if(typeof e=="object"&&(i=e,e=void 0),e)for(const a of e.split(" "))s.classList.add(a);return i&&Object.assign(s.style,i),s}function fi(t){return wo().createElementNS("http://www.w3.org/2000/svg",t)}var _P=I({"packages/ag-charts-core/src/utils/dom/domElements.ts"(){"use strict";Ib()}});function EP(t,e){const i=wo("body"),s=zt("a",{display:"none"});s.href=t,s.download=e,i.appendChild(s),s.click(),setTimeout(()=>i.removeChild(s))}var EZ=I({"packages/ag-charts-core/src/utils/dom/domDownload.ts"(){"use strict";_P(),Ib()}});function fe(t,e,i,s){return t.addEventListener(e,i,s),()=>t.removeEventListener(e,i,s)}var RZ=I({"packages/ag-charts-core/src/utils/dom/domEvents.ts"(){"use strict"}});function RP(t){const e=de("Option"),{style:i}=new e;return i.color=t,i.color||null}var BZ=I({"packages/ag-charts-core/src/utils/dom/domUtils.ts"(){"use strict";Ib()}}),BP=I({"packages/ag-charts-core/src/utils/dom/index.ts"(){"use strict";EZ(),_P(),RZ(),BZ(),Ib()}});function au(t){return t!=null}function ss(t){return Array.isArray(t)}function zP(t){return typeof t=="boolean"}function Zf(t){return t instanceof Date}function Ab(t){return Zf(t)&&!isNaN(Number(t))}function zZ(t){return t instanceof RegExp}function rl(t){return typeof t=="function"}function xs(t){return typeof t=="object"&&t!==null&&!ss(t)}function FZ(t){return ss(t)||No(t)}function No(t){return typeof t=="object"&&t!==null&&t.constructor?.name==="Object"}function En(t){return typeof t=="string"}function uI(t){return typeof t=="number"}function pe(t){return Number.isFinite(t)}function VZ(t){return typeof window<"u"&&t instanceof HTMLElement}function GZ(t,e){return En(e)&&Object.keys(t).includes(e)}function jZ(t,e){return Object.values(t).includes(e)}function Xf(t){return typeof t=="symbol"}function FP(t){return En(t)&&(t==="none"||RP(t)!=null)}function WZ(t,e){return t in e}var qf=I({"packages/ag-charts-core/src/utils/typeGuards.ts"(){"use strict";BP()}});function HZ(t,e=0,i){const{leading:s=!1,trailing:a=!0,maxWait:n=1/0}=i??{};let o,r;if(n<e)throw new Error("Value of maxWait cannot be lower than waitMs.");function l(...c){if(s&&!r){r=Date.now(),o=setTimeout(()=>r=null,e),t(...c);return}let h=e;if(n!==1/0&&r){const u=Date.now()-r;e>n-u&&(h=n-u)}clearTimeout(o),r??(r=Date.now()),o=setTimeout(()=>{r=null,a&&t(...c)},h)}return Object.assign(l,{cancel(){clearTimeout(o),r=null}})}function dI(t,e,i){const{leading:s=!0,trailing:a=!0}=i??{};let n,o,r=!1;function l(){a&&o?(n=setTimeout(l,e),t(...o)):r=!1,o=null}function c(...h){r?o=h:(r=!0,n=setTimeout(l,e),s?t(...h):o=h)}return Object.assign(c,{cancel(){clearTimeout(n),r=!1,o=null}})}function pI(t,e,i=""){try{return t(...e)}catch(s){const a=i?` \`${i}\``:"";Kf(`Uncaught exception in user callback${a}`,s)}}var VP=I({"packages/ag-charts-core/src/utils/functions.ts"(){"use strict";kb()}});function yp(t,e="and",i=String,s=1/0){if(t.length===0)return"";if(t.length===1)return i(t[0]);t=t.map(i);const a=t.pop();if(t.length>=s){const n=t.length-(s-1);return`${t.slice(0,s-1).join(", ")}, and ${n} more ${e} ${a}`}return`${t.join(", ")} ${e} ${a}`}function Cb(t,e=1/0){if(typeof t=="number"){if(isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity"}const i=JSON.stringify(t)??typeof t;return i.length>e?`${i.slice(0,e)}... (+${i.length-e} characters)`:i}function GP(t){let e=1;for(let i=0;i<t.length;i++)t.charCodeAt(i)===10&&e++;return e}function jP(t,e){if(t===e)return 0;const[i,s]=t.length<e.length?[t,e]:[e,t],a=i.length,n=s.length;let o=new Array(a+1).fill(0).map((l,c)=>c),r=new Array(a+1);for(let l=1;l<=n;l++){r[0]=l;for(let c=1;c<=a;c++){const h=s[l-1]===i[c-1]?0:1;r[c]=Math.min(o[c]+1,r[c-1]+1,o[c-1]+h)}[o,r]=[r,o]}return o[a]}function WP(t){return t.replace(HP,(e,i)=>(i>0?"-":"")+e.toLowerCase())}var HP,$P=I({"packages/ag-charts-core/src/utils/strings.ts"(){"use strict";HP=/[A-Z]+(?![a-z])|[A-Z]/g}});function Qf(t,e){return pe(e)?`${t}[${e}]`:t?`${t}.${e}`:e}function Qs(t,e,i=""){if(!xs(t))return{cleared:null,invalid:[new yc("required","an object",t,i)]};const s={},a=[],n=new Set(Object.keys(t)),o=[];if(xp in e){const r=Object.keys(e),l=e[xp];if(t.type!=null&&r.includes(t.type)||t.type==null&&l!=null){const{type:c=l,...h}=t,u=Qs(h,e[c],i);Object.assign(s,{type:c},u.cleared);for(const d of u.invalid)d.setUnionType(c,i);a.push(...u.invalid)}else{const c=yp(r,"or",h=>`'${h}'`);a.push(new yc("required",`a keyword such as ${c}`,t.type,i,"type"))}return{cleared:s,invalid:a}}for(const r of Object.keys(e)){const l=e[r],c=l[gI],h=t[r];if(n.delete(r),typeof h>"u"&&(l[fI]||o.push(r),!c))continue;const u=Qf(i,r);if(rl(l)){const p=l(h,{options:t,path:u});if(typeof p=="object"){if(a.push(...p.invalid),p.valid){s[r]=p.cleared;continue}else if(nu(p.invalid,u))continue}else if(p){s[r]=h;continue}a.push(new yc(c?"required":"invalid",l[wa],h,i,r))}else{const d=Qs(h,l,u);d.cleared!=null&&(s[r]=d.cleared),a.push(...d.invalid)}}for(const r of n){const l=t[r];typeof l>"u"||a.push(new tm(o,l,i,r))}return{cleared:s,invalid:a}}function $Z(t,e,i=2){const s=[],a=t.toLowerCase(),n=KP.get(a);for(const o of e){const r=o.toLowerCase();(n?.has(o)||r.includes(a)||jP(a,r)<=i)&&s.push(o)}return s}function Qt(t,e){if(rl(t)){let s=function(a,n){return t(a,n)};var i=s;return s[wa]=e,s}else return{...t,[wa]:e}}function mt(t){return Object.assign(rl(t)?(e,i)=>t(e,i):mi(t),{[gI]:!0,[wa]:t[wa]})}function _t(t){return Object.assign(rl(t)?(e,i)=>t(e,i):mi(t),{[fI]:!0,[wa]:t[wa]})}function ot(...t){xs(t[0])&&(t=Object.values(t[0]));const e=yp(t,"or",i=>`'${i}'`);return Qt(i=>t.includes(i),`a keyword such as ${e}`)}function nu(t,e){return t.some(i=>i.type==="required"&&i.path===e)}function UP(t,e){return i=>{if(i instanceof tm)return Kf(`Callback \`${t.path}\` returned an unknown property \`${Qf(i.path,i.key)}\`${i.getPostfix()}`);const s=Cb(i.value,50);Kf(i.key?`Callback \`${t.path}\` returned an invalid property \`${Qf(i.path,i.key)}\`: \`${s}\`; expecting ${i.description}, ignoring.`:`Callback \`${t.path}\` returned an invalid value \`${s}\`; expecting ${e??i.description}, ignoring.`)}}var wa,gI,Jf,fI,xp,KP,mI,yc,tm,mi,ou,ze,Bt,em,YP,Js,Y,oe,pt,ll,Ct,nt,bp,Q,Lb,cl,wb,Tb,yI,K,vp,Mt,fr,mr,ve,ZP,wt,bs,hl,Ne,xI=I({"packages/ag-charts-core/src/utils/validation.ts"(){"use strict";kb(),VP(),$P(),qf(),wa=Symbol("description"),gI=Symbol("required"),Jf=Symbol("marked"),fI=Symbol("undocumented"),xp=Symbol("union"),KP=[["placement","position"],["padding","spacing","gap"],["color","fill","stroke"],["whisker","wick"],["nodeClick","seriesNodeClick"],["nodeDoubleClick","seriesNodeDoubleClick"],["src","url"]].reduce((t,e)=>{for(const i of e)t.set(i.toLowerCase(),new Set(e.filter(s=>s!==i)));return t},new Map),mI=(t=>(t.Invalid="invalid",t.Required="required",t.Unknown="unknown",t))(mI||{}),yc=class{constructor(t,e,i,s,a){this.type=t,this.description=e,this.value=i,this.path=s,this.key=a}setUnionType(t,e){if(this.path.startsWith(e)){const i=this.path.slice(e.length);this.altPath=`${e}[type=${t}]${i}`}}getPrefix(){const{altPath:t=this.path,key:e}=this;return!t&&!e?"Value":`Option \`${e?Qf(t,e):t}\``}toString(){const{description:t="unknown",type:e,value:i}=this;return e==="required"&&i==null?`${this.getPrefix()} is required and has not been provided; expecting ${t}, ignoring.`:`${this.getPrefix()} cannot be set to \`${Cb(i,50)}\`; expecting ${t}, ignoring.`}},tm=class extends yc{constructor(t,e,i,s){super("unknown",void 0,e,i,s),this.suggestions=t,this.key=s}getPrefix(){return`Unknown option \`${Qf(this.path,this.key)}\``}getPostfix(){const t=yp($Z(this.key,this.suggestions),"or",e=>`\`${e}\``);return t?`; Did you mean ${t}? Ignoring.`:", ignoring."}toString(){return`${this.getPrefix()}${this.getPostfix()}`}},mi=(t,e="an object")=>Qt((i,s)=>{const a=Qs(i,t,s.path);return{valid:!nu(a.invalid,s.path),cleared:a.cleared,invalid:a.invalid}},e),ou=(t,e,i)=>({...t,[wa]:e,[xp]:i}),ze=(...t)=>Qt((e,i)=>{const s=[];for(const a of t){const n=a(e,i);if(typeof n=="object"){if(s.push(...n.invalid),!n.valid)return{valid:!1,cleared:e,invalid:s};e=n.cleared}else if(!n)return!1}return{valid:!0,cleared:e,invalid:s}},t.map(e=>e[wa]).filter(Boolean).join(" and ")),Bt=(...t)=>Qt((e,i)=>{for(const s of t){const a=s(e,i);if(typeof a=="object"?a.valid:a)return a}return!1},t.map(e=>e[wa]).filter(Boolean).join(" or ")),em=t=>pe(t)||Ab(t),YP=t=>Zf(t)||(pe(t)||En(t))&&Ab(new Date(t)),Js=Qt(ss,"an array"),Y=Qt(zP,"a boolean"),oe=Qt(rl,"a function"),pt=Qt(FP,"a color string"),ll=Qt(YP,"a date"),Ct=Qt(au,"a defined value"),nt=Qt(pe,"a number"),bp=Qt(xs,"an object"),Q=Qt(En,"a string"),Lb=Qt(t=>typeof HTMLElement>"u"||t instanceof HTMLElement,"an html element"),cl=(t,e=1/0)=>{let i;return e===1/0?i=`an array of at least ${t} items`:t===e?i=`an array of exactly ${t} items`:t===0?i=`an array of no more than ${e} items`:i=`an array of at least ${t} and no more than ${e} items`,Qt(s=>ss(s)&&s.length>=t&&s.length<=e,i)},wb=(t,e=1/0)=>{let i;return e===1/0?i=`a string of at least ${t} characters`:t===e?i=`an string of exactly ${t} characters`:t===0?i=`an string of no more than ${e} characters`:i=`an string of at least ${t} and no more than ${e} characters`,Qt(s=>En(s)&&s.length>=t&&s.length<=e,i)},Tb=(t,e=!0)=>Qt(i=>pe(i)&&(i>t||e&&i===t),`a number greater than ${e?"or equal to ":""}${t}`),yI=(t,e)=>Qt(i=>pe(i)&&i>=t&&i<=e,`a number between ${t} and ${e} inclusive`),K=Tb(0),vp=Tb(0,!1),Mt=yI(0,1),fr=t=>Qt((e,{options:i})=>!em(e)||!em(i[t])||e<i[t],`the value to be less than \`${t}\``),mr=t=>Qt((e,{options:i})=>!em(e)||!em(i[t])||e>i[t],`the value to be greater than \`${t}\``),ve=t=>Qt(e=>t===e,`the value ${JSON.stringify(t)}`),ZP=(t,e)=>Qt(i=>i instanceof t,e??`an instance of ${t.name}`),wt=(t,e,i=!0)=>Qt((s,a)=>{if(!ss(s))return!1;let n=i;const o=[],r=[],l=c=>n=i?n&&c:n||c;if(s.length===0)return{valid:!0,cleared:o,invalid:r};for(let c=0;c<s.length;c++){const h=s[c],u=t(h,{options:h,path:`${a.path}[${c}]`});typeof u=="object"?(n=l(u.valid),r.push(...u.invalid),u.cleared!=null&&o.push(u.cleared)):(n=l(u),u&&o.push(h))}return{valid:n,cleared:n||!i?o:null,invalid:r}},e??`${t[wa]} array`),bs=(t,e="an object array")=>Qt((i,s)=>{if(!ss(i))return!1;const a=[],n=[];for(let o=0;o<i.length;o++){const r=`${s.path}[${o}]`,l=Qs(i[o],t,r);nu(l.invalid,r)||a.push(l.cleared),n.push(...l.invalid)}return{valid:!0,cleared:a,invalid:n}},e),hl=(t,e)=>Qt((i,s)=>rl(i)?Jf in i?!0:{valid:!0,cleared:Object.assign((...n)=>{const o=pI(i,n);if(o==null)return;const r=t(o,{options:o,path:""});if(typeof r=="object"){if(r.invalid.forEach(UP(s,e??t[wa])),r.valid)return r.cleared}else{if(r)return o;Kf(`Callback \`${s.path}\` returned an invalid value \`${Cb(o,50)}\`; expecting ${e??t[wa]}, ignoring.`)}},{[Jf]:!0}),invalid:[]}:!1,"a function"),Ne=(t,e="an object")=>Qt((i,s)=>rl(i)?Jf in i?!0:{valid:!0,cleared:Object.assign((...n)=>{const o=pI(i,n,s.path);if(o==null)return;const r=Qs(o,t);return r.invalid.forEach(UP(s,e)),r.cleared},{[Jf]:!0}),invalid:[]}:!1,"a function")}});function bI(t){return{enabled:Y,range:ot("tooltip","node"),highlightedItem:t,unhighlightedItem:t}}function oi(t,e){return{enabled:Y,range:ot("tooltip","node"),highlightedItem:t,unhighlightedItem:t,highlightedSeries:e,unhighlightedSeries:e}}var Sp,XP,Nb,im,Ob,sm,rt,vI,SI,MI,qP,Rn,ft,yt,Bn,ul,Le,Pb,am,Ie,UZ=I({"packages/ag-charts-core/src/options/commonOptionsDefs.ts"(){"use strict";qf(),xI(),Sp=t=>{if(!xs(t))return!1;const e=Object.keys(t);return e.length===1&&e[0].startsWith("$")},XP=mi({color:pt,stop:Mt},""),Nb=Qt(t=>{let e=-1/0;for(const i of t)if(i?.stop!=null){if(i.stop<e)return!1;e=i.stop}return!0},"color stops to be defined in ascending order"),im=ze(cl(2),wt(XP),Nb),Ob=ot("axis","item","series"),sm=mi({type:mt(ve("gradient")),colorStops:mt(im),rotation:nt,gradient:_t(ot("linear","radial","conic")),bounds:_t(Ob),reverse:_t(Y)},"a gradient object with color stops"),rt={stroke:pt,strokeWidth:K,strokeOpacity:Mt},vI=mi({type:mt(ve("gradient")),gradient:mt(ot("linear","radial","conic")),bounds:mt(Ob),colorStops:mt(Bt(im,ze(cl(2),wt(pt)))),rotation:mt(nt),reverse:mt(Y)}),SI=mi({type:mt(ve("pattern")),pattern:mt(ot("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),path:wb(2),width:mt(K),height:mt(K),fill:mt(pt),fillOpacity:mt(Mt),backgroundFill:mt(pt),backgroundFillOpacity:mt(Mt),padding:mt(K),rotation:mt(nt),scale:mt(K),stroke:mt(pt),strokeWidth:mt(K),strokeOpacity:mt(Mt)}),MI=mi({type:mt(ve("image")),url:Q,width:K,height:K,rotation:mt(nt),backgroundFill:mt(pt),backgroundFillOpacity:Mt,fit:mt(ot("stretch","contain","cover")),repeat:mt(ot("repeat","repeat-x","repeat-y","no-repeat"))}),qP=ou({gradient:{colorStops:im,rotation:nt,gradient:_t(ot("linear","radial","conic")),bounds:_t(Ob),reverse:_t(Y)},pattern:{pattern:ot("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),path:wb(2),width:K,height:K,rotation:nt,scale:K,fill:pt,fillOpacity:Mt,backgroundFill:pt,backgroundFillOpacity:Mt,...rt,padding:_t(K)},image:{url:mt(Q),backgroundFill:pt,backgroundFillOpacity:Mt,width:K,height:K,fit:ot("stretch","contain","cover","none"),repeat:ot("repeat","repeat-x","repeat-y","no-repeat"),rotation:nt}},"a color object"),Rn=Bt(pt,mi(qP,"a color object")),ft={fill:Rn,fillOpacity:Mt},ft.fillGradientDefaults=_t(vI),ft.fillPatternDefaults=_t(SI),ft.fillImageDefaults=_t(MI),yt={lineDash:wt(K),lineDashOffset:nt},Bn={...ft,...rt,...yt,opacity:Mt,cornerRadius:K},ul={...rt,...yt,opacity:Mt},Le={...ft,...rt,...yt,opacity:Mt},Pb=mi({googleFont:Q},"google font"),am=Bt(Q,Sp,Pb,wt(Bt(Q,Pb))),Ie={color:pt,fontFamily:am,fontSize:K,fontStyle:ot("normal","italic","oblique"),fontWeight:Bt(K,ot("normal","bold","bolder","lighter"))}}});function nm(t){return typeof t>"u"?[]:Array.isArray(t)?t:[t]}function QP(t){return Array.from(new Set(t))}function _b(t,e){return t.reduce((i,s)=>{const a=e(s);return i[a]??(i[a]=[]),i[a].push(s),i},{})}function yr(t,e){if(t==null||e==null||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(Array.isArray(t[i])&&Array.isArray(e[i])){if(!yr(t[i],e[i]))return!1}else if(t[i]!==e[i])return!1;return!0}function KZ(t,e,i=0){if(t.length===0)return[];const s=[];for(let a=0;a<e;a++)s.push(t.at((a+i)%t.length));return s}function JP(t,e){const i=new Map;return e.forEach((s,a)=>{i.set(s,a)}),t.sort((s,a)=>{const n=i.get(s)??1/0,o=i.get(a)??1/0;return n-o})}function t_(t,e){let i=0;for(;i<t.length&&e(t[i]);)i+=1;const s=i;s!==0&&t.splice(0,s)}function e_(t,e){let i=t.length-1;for(;i>=0&&e(t[i]);)i-=1;const s=t.length-1-i;s!==0&&t.splice(t.length-s,s)}var YZ=I({"packages/ag-charts-core/src/utils/arrays.ts"(){"use strict"}});function DI(t=0){return new Promise(e=>{setTimeout(e,t)})}var Eb,ZZ=I({"packages/ag-charts-core/src/utils/async.ts"(){"use strict";Eb=class{constructor(){this.queue=[]}await(t=50){return new Promise(e=>{const i=()=>{clearTimeout(a),e(!0)},a=setTimeout(()=>{const n=this.queue.indexOf(i);n<0||(this.queue.splice(n,1),e(!1))},t);this.queue.push(i)})}notify(){this.queue.splice(0).forEach(t=>t())}}}});function*ru(...t){for(const e of t)yield*e}function i_(t){return t!=null&&typeof t=="object"&&Symbol.iterator in t?t:[t]}function Mp(t){for(const e of t)return e;throw new Error("AG Charts - no first() value found")}function*Oo(t){const e=[void 0,void 0];for(const i of Object.keys(t))e[0]=i,e[1]=t[i],yield e}var s_=I({"packages/ag-charts-core/src/utils/iterators.ts"(){"use strict"}});function xc(t){return t==="true"}function XZ(t){return Number(t)}function en(t){return t}function Ut(t,e,i){i==null||i===""||i===""?t?.removeAttribute(e):t?.setAttribute(e,i.toString())}function lu(t,e){if(e!=null)for(const[i,s]of Oo(e))i!=="class"&&Ut(t,i,s)}function cu(t,e,i){if(!(t instanceof HTMLElement))return;const s=t.getAttribute(e);return s===null?i:n_[e]?.(s)??void 0}function Po(t,e,i){t!=null&&(i==null?t.style.removeProperty(e):t.style.setProperty(e,i.toString()))}function a_(t,e){for(const[i,s]of Oo(e))Po(t,i,s)}var n_,qZ=I({"packages/ag-charts-core/src/utils/attributeUtil.ts"(){"use strict";s_(),n_={role:en,"aria-checked":xc,"aria-controls":en,"aria-describedby":en,"aria-disabled":xc,"aria-expanded":xc,"aria-haspopup":en,"aria-hidden":xc,"aria-label":en,"aria-labelledby":en,"aria-live":en,"aria-orientation":en,"aria-selected":xc,"data-focus-override":xc,"data-focus-visible-override":xc,"data-preventdefault":xc,class:en,for:en,id:en,tabindex:XZ,title:en,placeholder:en}}});function kI(t,e,i,s,a){return e<t.x+t.width&&e+s>t.x&&i<t.y+t.height&&i+a>t.y}function Rb(t,e,i,s=0,a=0){return e>=t.x&&e+s<=t.x+t.width&&i>=t.y&&i+a<=t.y+t.height}function QZ(t){return t==null||t.height===0||t.width===0||isNaN(t.height)||isNaN(t.width)}function Bb(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}var JZ=I({"packages/ag-charts-core/src/utils/boxBounds.ts"(){"use strict"}});function bc(t,e,i){if(t>e)return;let s;for(;e>=t;){const a=Math.floor((e+t)/2);i(a)?(s=a,t=a+1):e=a-1}return s}function Dp(t,e,i){if(t>e)return;let s;for(;e>=t;){const a=Math.floor((e+t)/2);i(a)?(s=a,e=a-1):t=a+1}return s}function tX(t,e,i){if(t>e)return;let s;for(;e>=t;){const a=Math.floor((e+t)/2),n=i(a);n==null?e=a-1:(s=n,t=a+1)}return s}function eX(t,e,i){if(t>e)return;let s;for(;e>=t;){const a=Math.floor((e+t)/2),n=i(a);n==null?t=a+1:(s=n,e=a-1)}return s}var iX=I({"packages/ag-charts-core/src/utils/binarySearch.ts"(){"use strict"}}),o_,II,sX=I({"packages/ag-charts-core/src/utils/caching.ts"(){"use strict";o_=class{constructor(t){this.getter=t}get(){return this.result??(this.result=this.getter()),this.result}clear(){this.result=void 0}},II=class{constructor(t){this.getter=t}get(){let t=this.result?.deref();return t||(t=this.getter(),this.result=new WeakRef(t),t)}clear(){this.result=void 0}}}}),Fe,aX=I({"packages/ag-charts-core/src/utils/cleanupRegistry.ts"(){"use strict";Fe=class{constructor(){this.callbacks=new Set}flush(){for(const t of this.callbacks)t();this.callbacks.clear()}merge(t){for(const e of t.callbacks)this.callbacks.add(e)}register(...t){for(const e of t)e&&this.callbacks.add(e)}}}});function r_(t,e){const i=Math.max(t.length,e.length),s=new Set,a=new Set;for(let n=0;n<i;n++){const o=t[n],r=e[n];o!==r&&(a.has(r)?a.delete(r):r&&s.add(r),s.has(o)?s.delete(o):o&&a.add(o))}return{changed:s.size>0||a.size>0,added:s,removed:a}}var nX=I({"packages/ag-charts-core/src/utils/diff.ts"(){"use strict"}});function Et(t,e,i){return Math.min(i,Math.max(t,e))}function l_(t,e,i=1e-10){return t>=e[0]-i&&t<=e[1]+i}function sn(t,e,i=1e-10){return t===e||Math.abs(t-e)<i}function zb(t){return Math.sign(t)===-1||Object.is(t,-0)}function c_(t){return t%1===0}function AI(t,e=2){const i=10**e;return Math.round(t*i)/i}function CI(t,e){return Math.floor(t%e+(t<0?Math.abs(e):0))}function Fb(t){if(Math.floor(t)===t)return 0;let e=String(t),i=0;if(t<1e-6||t>=1e21){let a;[e,a]=e.split("e"),a!=null&&(i=Number(a))}const s=e.split(".")[1]?.length??0;return Math.max(s-i,0)}var LI=I({"packages/ag-charts-core/src/utils/numbers.ts"(){"use strict"}});function h_(t){return Array.isArray(t)&&t.length>=2&&t.every(pe)}function Vb(t){return Array.isArray(t)&&t.length>=2&&t.every(h_)}function oX(t){const e=t[0],i=t[t.length-1];return sn(e[0],i[0],.001)&&sn(e[1],i[1],.001)}function u_(t){return Array.isArray(t)&&t.every(Vb)&&t.every(oX)}function d_(t){if(t===null)return!0;if(!xs(t)||t.type==null)return!1;const{type:e,coordinates:i}=t;switch(e){case"GeometryCollection":return Array.isArray(t.geometries)&&t.geometries.every(d_);case"MultiPolygon":return Array.isArray(i)&&i.every(u_);case"Polygon":return u_(i);case"MultiLineString":return Array.isArray(i)&&i.every(Vb);case"LineString":return Vb(i);case"MultiPoint":return Vb(i);case"Point":return h_(i);default:return!1}}function rX(t){return xs(t)&&t.type==="Feature"&&d_(t.geometry)}function lX(t){return xs(t)&&t.type==="FeatureCollection"&&Array.isArray(t.features)&&t.features.every(rX)}var wI,cX=I({"packages/ag-charts-core/src/utils/geoJson.ts"(){"use strict";LI(),qf(),xI(),wI=Qt(lX,"a GeoJSON object")}}),TI,NI,hX=I({"packages/ag-charts-core/src/utils/graph.ts"(){"use strict";TI=class{constructor(t,e){this._vertexCount=0,this.pendingProcessingEdges=[],this.cachedNeighboursEdge=t,this.processedEdge=e}clear(){this._vertexCount=0,this.pendingProcessingEdges=[]}addVertex(t){const e=new NI(t);return this._vertexCount++,e}addEdge(t,e,i){i===this.cachedNeighboursEdge&&t.cachedNeighbours.set(e.value,e),i===this.processedEdge&&this.pendingProcessingEdges.push([t,e]);const{edges:s}=t,a=s.get(i);a?a.indexOf(e)===-1&&a.push(e):s.set(i,[e])}removeVertex(t){this._vertexCount--;const e=t.edges;if(e){for(const[i,s]of e)this._vertexCount-=s.length;t.clear()}}removeEdge(t,e){for(const[i,s]of t.edges){const a=s.indexOf(e);s.splice(a,1),s.length===0&&t.edges.delete(i)}}removeEdges(t,e){t.edges.delete(e)}getVertexValue(t){return t.value}*neighbours(t){for(const[e,i]of t.edges)for(const s of i)yield s}*neighboursAndEdges(t){for(const[e,i]of t.edges)for(const s of i)yield[s,e]}neighboursWithEdgeValue(t,e){return t.edges.get(e)??[]}findNeighbour(t,e){return t.edges.get(e)?.[0]}findNeighbourValue(t,e){const i=this.findNeighbour(t,e);if(i)return this.getVertexValue(i)}findNeighbourWithValue(t,e,i){const s=i==null?this.neighbours(t):this.neighboursWithEdgeValue(t,i);for(const a of s)if(this.getVertexValue(a)===e)return a}findVertexAlongEdge(t,e,i){if(i===this.cachedNeighboursEdge){let n;for(const o of e)if(n=(n??t).cachedNeighbours.get(o),!n)return;return n}let s=t,a;for(const n of e){let o=!1;for(const r of this.neighboursWithEdgeValue(s,i))if(this.getVertexValue(r)===n){s=r,o=!0;break}if(!o)return;a=s}return a}adjacent(t,e){for(const[i,s]of t.edges)if(s.includes(e))return!0;return!1}},NI=class{constructor(t){this.value=t,this.edges=new Map,this.cachedNeighbours=new Map}clear(){this.edges.clear(),this.cachedNeighbours.clear()}}}});function uX(){jb.clear(),OI=1}function zn(t){const e=t.constructor,i=Object.hasOwn(e,"className")?e.className:e.name;if(!i)throw new Error(`The ${e} is missing the 'className' property.`);const s=(jb.get(i)??0)+1;return jb.set(i,s),`${i}-${s}`}function om(){return`ag-charts-${OI++}`}function Gb(){return crypto.randomUUID?.()??dX()}function dX(){const t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let e="";for(let i=0;i<t.length;i++)(i===4||i===6||i===8||i===10)&&(e+="-"),e+=t[i].toString(16).padStart(2,"0");return e}var jb,pX,OI,gX=I({"packages/ag-charts-core/src/utils/id.ts"(){"use strict";jb=new Map,pX=Symbol("ElementID"),OI=1}}),PI,fX=I({"packages/ag-charts-core/src/utils/linkedList.ts"(){"use strict";PI=(t,e,i)=>{let s=t,a=s;for(const n of e)if(s==null||i(s.value,n)>0)s={value:n,next:s},a=s;else{for(a=a;a.next!=null&&i(a.next.value,n)<=0;)a=a.next;a.next={value:n,next:a.next}}return s}}});function p_(t){if(!En(t))return!1;const e=RI.exec(t);return EI.test(e?e[2]:t)}function Wb(t){let e,i;const s=RI.exec(t);s&&([,e,t,i]=s);const a=EI.exec(t);if(!a){ut.warnOnce(`The number formatter is invalid: ${t}`);return}const[,n,o,r,l,c,h,u,d,p,g]=a;return{fill:n,align:o,sign:r,symbol:l,zero:c,width:parseInt(h),comma:u,precision:parseInt(d),trim:!!p,type:g,prefix:e,suffix:i}}function _I(t){const e=typeof t=="string"?Wb(t):t;if(e==null)return;const{fill:i,align:s,sign:a="-",symbol:n,zero:o,width:r,comma:l,type:c,prefix:h="",suffix:u="",precision:d}=e;let{trim:p}=e;const g=d==null||isNaN(d);let f;if(!c)f=an.g,p=!0;else if(c in an&&c in hu)f=g?hu[c]:an[c];else if(c in an)f=an[c];else if(c in hu)f=hu[c];else throw new Error(`The number formatter type is invalid: ${c}`);const x=c?6:12;let m;return g||(m=d),(b,v)=>{let M=f(b,m??v??x);return p&&(M=mX(M)),l&&(M=yX(M,l)),M=bX(b,M,a),n&&n!=="#"&&(M=`${n}${M}`),n==="#"&&c==="x"&&(M=`0x${M}`),c==="s"&&(M=`${M}${xX(b)}`),(c==="%"||c==="p")&&(M=`${M}%`),r!=null&&!isNaN(r)&&(M=vX(M,r,i??o,s)),M=`${h}${M}${u}`,M}}function Hb(t){return Math.floor(Math.abs(t))}function mX(t){if(!t.endsWith("0")||t.indexOf(".")===-1)return t;let e=t.length-1;for(;e>0;)if(t[e]=="0")e-=1;else if(t[e]=="."){e-=1;break}else break;return t.substring(0,e+1)}function yX(t,e){let i=t.indexOf(".");i<0&&(i=t.length);const s=t.substring(0,i).split(""),a=t.substring(i);for(let n=s.length-3;n>0;n-=3)s.splice(n,0,e);return`${s.join("")}${a}`}function xX(t){return f_[g_(t)]}function g_(t){return Et(BI,t?Math.floor(Math.log10(Math.abs(t))/3)*3:0,zI)}function bX(t,e,i=""){if(i==="(")return t>=0?e:`(${e})`;const s=i==="+"?"+":"";return`${t>=0?s:m_}${e}`}function vX(t,e,i=" ",s=">"){let a=t;if(s===">"||!s)a=a.padStart(e,i);else if(s==="<")a=a.padEnd(e,i);else if(s==="^"){const n=Math.max(0,e-a.length),o=Math.ceil(n/2),r=Math.floor(n/2);a=a.padStart(o+a.length,i),a=a.padEnd(r+a.length,i)}return a}var EI,RI,hu,an,BI,zI,f_,m_,SX=I({"packages/ag-charts-core/src/utils/numberFormat.ts"(){"use strict";NP(),LI(),qf(),EI=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,RI=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/,hu={b:t=>Hb(t).toString(2),c:t=>String.fromCharCode(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>Hb(t).toString(8),x:t=>Hb(t).toString(16),X:t=>hu.x(t).toUpperCase(),n:t=>hu.d(t),"%":t=>`${Hb(t*100).toFixed(0)}`},an={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>an.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>an.f(t,e).toUpperCase(),g:(t,e)=>{if(t===0)return"0";const i=Math.abs(t),s=Math.floor(Math.log10(i));return s>=-4&&s<e?i.toFixed(e-1-s):i.toExponential(e-1)},G:(t,e)=>an.g(t,e).toUpperCase(),n:(t,e)=>an.g(t,e),p:(t,e)=>an.r(t*100,e),r:(t,e)=>{if(t===0)return"0";const i=Math.abs(t),a=Math.floor(Math.log10(i))-(e-1);if(a<=0)return i.toFixed(-a);const n=10**a;return(Math.round(i/n)*n).toFixed()},s:(t,e)=>{const i=g_(t);return an.r(t/10**i,e)},"%":(t,e)=>an.f(t*100,e)},BI=-24,zI=24,f_={[BI]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"\xB5",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[zI]:"Y"},m_="\u2212"}}),st={};La(st,{AdjacencyListGraph:()=>TI,AsyncAwaitQueue:()=>Eb,CleanupRegistry:()=>Fe,ErrorType:()=>mI,EventEmitter:()=>gr,Logger:()=>ut,ModuleRegistry:()=>qs,ModuleType:()=>hI,SimpleCache:()=>o_,UnknownError:()=>tm,ValidationError:()=>yc,Vertex:()=>NI,WeakCache:()=>II,and:()=>ze,array:()=>Js,arrayLength:()=>cl,arrayOf:()=>wt,arrayOfDefs:()=>bs,arraysEqual:()=>yr,attachDescription:()=>Qt,attachListener:()=>fe,barHighlightOptionsDef:()=>Bn,boolean:()=>Y,boxCollides:()=>kI,boxContains:()=>Rb,boxEmpty:()=>QZ,boxesEqual:()=>Bb,callback:()=>oe,callbackDefs:()=>Ne,callbackOf:()=>hl,circularSliceArray:()=>KZ,clamp:()=>Et,color:()=>pt,colorStopsOrderValidator:()=>Nb,colorUnion:()=>Rn,constant:()=>ve,countFractionDigits:()=>Fb,countLines:()=>GP,createElement:()=>zt,createElementId:()=>om,createId:()=>zn,createNumberFormatter:()=>_I,createSvgElement:()=>fi,date:()=>ll,debounce:()=>HZ,defined:()=>Ct,diffArrays:()=>r_,downloadUrl:()=>EP,dropFirstWhile:()=>t_,dropLastWhile:()=>e_,entries:()=>Oo,fillGradientDefaults:()=>vI,fillImageDefaults:()=>MI,fillOptionsDef:()=>ft,fillPatternDefaults:()=>SI,findMaxIndex:()=>bc,findMaxValue:()=>tX,findMinIndex:()=>Dp,findMinValue:()=>eX,first:()=>Mp,fontFamilyFull:()=>am,fontOptionsDef:()=>Ie,generateUUID:()=>Gb,geoJson:()=>wI,getAttribute:()=>cu,getDocument:()=>wo,getWindow:()=>de,googleFont:()=>Pb,gradientColorStops:()=>im,gradientStrict:()=>sm,greaterThan:()=>mr,groupBy:()=>_b,hasRequiredInPath:()=>nu,highlightOptionsDef:()=>bI,htmlElement:()=>Lb,inRange:()=>l_,insertListItemsSorted:()=>PI,instanceOf:()=>ZP,isArray:()=>ss,isBoolean:()=>zP,isColor:()=>FP,isDate:()=>Zf,isDefined:()=>au,isEnumKey:()=>GZ,isEnumValue:()=>jZ,isFiniteNumber:()=>pe,isFunction:()=>rl,isHtmlElement:()=>VZ,isInteger:()=>c_,isKeyOf:()=>WZ,isNegative:()=>zb,isNumber:()=>uI,isNumberEqual:()=>sn,isObject:()=>xs,isObjectLike:()=>FZ,isPlainObject:()=>No,isRegExp:()=>zZ,isString:()=>En,isSymbol:()=>Xf,isValidDate:()=>Ab,isValidNumberFormat:()=>p_,iterate:()=>ru,joinFormatted:()=>yp,kebabCase:()=>WP,lessThan:()=>fr,levenshteinDistance:()=>jP,lineDashOptionsDef:()=>yt,lineHighlightOptionsDef:()=>ul,modulus:()=>CI,multiSeriesHighlightOptionsDef:()=>oi,number:()=>nt,numberMin:()=>Tb,numberRange:()=>yI,object:()=>bp,optionsDefs:()=>mi,or:()=>Bt,parseColor:()=>RP,parseNumberFormat:()=>Wb,pause:()=>DI,positiveNumber:()=>K,positiveNumberNonZero:()=>vp,ratio:()=>Mt,required:()=>mt,resetIds:()=>uX,roundTo:()=>AI,safeCall:()=>pI,setAttribute:()=>Ut,setAttributes:()=>lu,setDocument:()=>OP,setElementStyle:()=>Po,setElementStyles:()=>a_,setWindow:()=>PP,shapeHighlightOptionsDef:()=>Le,sortBasedOnArray:()=>JP,string:()=>Q,stringLength:()=>wb,stringifyValue:()=>Cb,strokeOptionsDef:()=>rt,themeOperator:()=>Sp,throttle:()=>dI,toArray:()=>nm,toIterable:()=>i_,typeUnion:()=>ou,undocumented:()=>_t,union:()=>ot,unionSymbol:()=>xp,unique:()=>QP,validate:()=>Qs});var R=I({"packages/ag-charts-core/src/main.ts"(){"use strict";NP(),PZ(),DZ(),_Z(),UZ(),BP(),YZ(),ZZ(),qZ(),JZ(),iX(),sX(),aX(),nX(),VP(),cX(),hX(),gX(),s_(),fX(),SX(),LI(),$P(),qf(),xI()}}),rm,y_,_o,xr=I({"packages/ag-charts-community/src/module/module.ts"(){"use strict";R(),rm=class{constructor(){this.cleanup=new Fe}destroy(){this.cleanup.flush()}},y_=class{constructor(){this.modules=[],this.dependencies=new Map,this.modulesByOptionKey=new Map}register(...t){for(const e of t){this.registerDependencies(e);const i=this.modules.find(s=>e.type===s.type&&("optionsKey"in e&&"optionsKey"in s?e.optionsKey===s.optionsKey:!0)&&e.identifier===s.identifier);if(i){if(e.packageType==="enterprise"&&i.packageType==="community"){const s=this.modules.indexOf(i);this.modules.splice(s,1,e),"optionsKey"in e&&this.modulesByOptionKey.set(e.optionsKey,e)}}else this.modules.push(e),"optionsKey"in e&&this.modulesByOptionKey.set(e.optionsKey,e)}}hasEnterpriseModules(){return this.modules.some(t=>t.packageType==="enterprise")}*byType(...t){const e=new Set,i=this.modules.filter(n=>t.includes(n.type)),s=n=>{const o=this.dependencies.get(n);return o?.flatMap(s).concat(o)??[]},a=[];for(const n of i){const o="optionsKey"in n?n.optionsKey:n.contextKey;if(!e.has(o)){for(const r of s(o)){if(e.has(r))continue;const l=this.modulesByOptionKey.get(r);if(!l){a.push(r);continue}t.includes(l.type)&&(yield l,e.add(r))}yield n,e.add(o)}}if(a.length>0)throw new Error(`Could not resolve module dependencies: ${a}`)}registerDependencies(t){if(t.dependencies==null||t.dependencies.length===0)return;const e="optionsKey"in t?t.optionsKey:t.contextKey;this.dependencies.set(e,t.dependencies)}},_o=new y_}}),lm,cm,FI=I({"packages/ag-charts-community/src/util/interpolating.ts"(){"use strict";lm=Symbol("interpolate"),cm=t=>t[lm]!=null}});function $b(t,e,i,s=1/0){const a={nearest:void 0,distanceSquared:s};for(const n of i){const o=n.distanceSquared(t,e);if(o===0)return{nearest:n,distanceSquared:0};o<a.distanceSquared&&(a.nearest=n,a.distanceSquared=o)}return a}function MX(t,e,i,s=1/0){const{x:a=t,y:n=e}=i.transformPoint?.(t,e)??{},o={nearest:void 0,distanceSquared:s};for(const r of i.children){const{nearest:l,distanceSquared:c}=r.nearestSquared(a,n,o.distanceSquared);if(c===0)return{nearest:l,distanceSquared:c};c<o.distanceSquared&&(o.nearest=l,o.distanceSquared=c)}return o}var Ub=I({"packages/ag-charts-community/src/util/nearest.ts"(){"use strict"}}),kp,gt,Wt=I({"packages/ag-charts-community/src/scene/bbox.ts"(){"use strict";R(),FI(),Ub(),kp=class $f{constructor(e,i,s,a){this.x=e,this.y=i,this.width=s,this.height=a}static fromDOMRect({x:e,y:i,width:s,height:a}){return new $f(e,i,s,a)}static merge(e){let i=1/0,s=1/0,a=-1/0,n=-1/0;for(const o of e)o.x<i&&(i=o.x),o.y<s&&(s=o.y),o.x+o.width>a&&(a=o.x+o.width),o.y+o.height>n&&(n=o.y+o.height);return new $f(i,s,a-i,n-s)}static nearestBox(e,i,s){return $b(e,i,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON(){return{}}}}clone(){const{x:e,y:i,width:s,height:a}=this;return new $f(e,i,s,a)}equals(e){return Bb(this,e)}containsPoint(e,i){return Rb(this,e,i)}intersection(e){if(!this.collidesBBox(e))return;const i=Et(e.x,this.x,e.x+e.width),s=Et(e.y,this.y,e.y+e.height),a=Et(e.x,this.x+this.width,e.x+e.width),n=Et(e.y,this.y+this.height,e.y+e.height);return new $f(i,s,a-i,n-s)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,i){if(this.containsPoint(e,i))return 0;const s=e-Et(this.x,e,this.x+this.width),a=i-Et(this.y,i,this.y+this.height);return s*s+a*a}shrink(e,i){if(typeof e=="number")this.applyMargin(e,i);else for(const s of Object.keys(e)){const a=e[s];typeof a=="number"&&this.applyMargin(a,s)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(e,i){if(typeof e=="number")this.applyMargin(-e,i);else for(const s of Object.keys(e)){const a=e[s];typeof a=="number"&&this.applyMargin(-a,s)}return this}applyMargin(e,i){switch(i){case"top":this.y+=e;case"bottom":this.height-=e;break;case"left":this.x+=e;case"right":this.width-=e;break;case"vertical":this.y+=e,this.height-=e*2;break;case"horizontal":this.x+=e,this.width-=e*2;break;case void 0:this.x+=e,this.y+=e,this.width-=e*2,this.height-=e*2;break}}translate(e,i){return this.x+=e,this.y+=i,this}[lm](e,i){return new $f(this.x*(1-i)+e.x*i,this.y*(1-i)+e.y*i,this.width*(1-i)+e.width*i,this.height*(1-i)+e.height*i)}},kp.zero=Object.freeze(new kp(0,0,0,0)),kp.NaN=Object.freeze(new kp(NaN,NaN,NaN,NaN)),gt=kp}}),x_,VI,b_,Ft,yi=I({"packages/ag-charts-community/src/util/debug.ts"(){"use strict";R(),x_=2e3,VI=Date.now(),b_=()=>{const t=Date.now()-VI;if(t>x_){const e=(Math.floor(t/100)/10).toFixed(1);ut.log(`**** ${e}s since last log message ****`)}VI=Date.now()},Ft={create(...t){return Object.assign((...i)=>{Ft.check(...t)&&(typeof i[0]=="function"&&(i=nm(i[0]())),b_(),ut.log(...i))},{check:()=>Ft.check(...t),group:(i,s)=>Ft.check(...t)?ut.logGroup(i,s):s()})},check(...t){return t.length===0&&t.push(!0),nm(de("agChartsDebug")).some(i=>t.includes(i))},inDevelopmentMode(t){if(Ft.check("dev"))return t()}}}});function v_({context:t,pixelRatio:e,width:i,height:s}){t.save();try{t.resetTransform(),t.clearRect(0,0,Math.ceil(i*e),Math.ceil(s*e))}finally{t.restore()}}function S_(t){if(Ft.check("canvas")){const e=t.save.bind(t),i=t.restore.bind(t);let s=0;Object.assign(t,{save(){e(),s++},restore(){if(s===0)throw new Error("AG Charts - Unable to restore() past depth 0");i(),s--},verifyDepthZero(){if(s!==0)throw new Error(`AG Charts - Save/restore depth is non-zero: ${s}`)}})}}var M_=I({"packages/ag-charts-community/src/scene/canvas/canvasUtil.ts"(){"use strict";yi()}});function D_(t,e,i){return[Math.floor(t*i),Math.floor(e*i)]}var Kb,GI=I({"packages/ag-charts-community/src/scene/canvas/hdpiOffscreenCanvas.ts"(){"use strict";M_(),Kb=class{constructor(t){const{width:e,height:i,pixelRatio:s,willReadFrequently:a=!1}=t;this.width=e,this.height=i,this.pixelRatio=s;const[n,o]=D_(e,i,s);this.canvas=new OffscreenCanvas(n,o),this.context=this.canvas.getContext("2d",{willReadFrequently:a}),this.context.setTransform(s,0,0,s,0,0),S_(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.canvas,e,i)}transferToImageBitmap(){return this.canvas.transferToImageBitmap()}resize(t,e,i){if(!(t>0&&e>0))return;const{canvas:s,context:a}=this;if(t!==this.width||e!==this.height||i!==this.pixelRatio){const[n,o]=D_(t,e,i);s.width=n,s.height=o}a.setTransform(i,0,0,i,0,0),this.width=t,this.height=e,this.pixelRatio=i}clear(){v_(this)}destroy(){this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0),this.canvas=null,this.context=null,Object.freeze(this)}}}});function DX(t,e){jI(t,e).optional=!0}function jI(t,e){if(Object.getOwnPropertyDescriptor(t,Ip)==null&&Object.defineProperty(t,Ip,{value:{}}),Object.getOwnPropertyDescriptor(t,hm)==null){const h=Object.getPrototypeOf(t)?.[hm]?.slice()??[];Object.defineProperty(t,hm,{value:h})}const i=t[Ip],s=e.toString();if(i[s]!=null)return i[s];i[s]={setters:[],getters:[],observers:[]};const a=Object.getOwnPropertyDescriptor(t,e);let n=a?.get,o=a?.set;if(n==null||o==null){const c=t[hm];let h=c.indexOf(e);h===-1&&(h=c.push(e)-1),n??(n=function(){let u=this.__accessors;return u==null&&(u=c.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:u})),u[h]}),o??(o=function(u){let d=this.__accessors;d==null&&(d=c.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:d})),d[h]=u})}return Object.defineProperty(t,e,{set:function(c){const{setters:h,observers:u}=i[s];let d;h.some(p=>p.length>2)&&(d=n.call(this));for(const p of h)if(c=p(this,e,c,d),c===Zb)return;o.call(this,c);for(const p of u)p(this,c,d)},get:function(){let c=n.call(this);for(const h of i[s].getters)if(c=h(this,e,c),c===Zb)return;return c},enumerable:!0,configurable:!1}),i[s]}function uu(t,e,i){return(s,a)=>{const n=jI(s,a);n.setters.push(t),e&&n.getters.unshift(e),i&&Object.assign(n,i)}}function k_(t){return(e,i)=>{jI(e,i).observers.push(t)}}function Yb(t){return typeof t<"u"&&Ip in t}function du(t){const e=new Set;for(;Yb(t);)e.add(t?.[Ip]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(i=>Object.keys(i))}function I_(t){return du(t).reduce((e,i)=>(e[i]=t[i]??null,e),{})}var Zb,Ip,hm,Ap=I({"packages/ag-charts-community/src/util/decorator.ts"(){"use strict";Zb=Symbol("BREAK"),Ip="__decorator_config",hm="__decorator_accessors"}});function Wi(t,e){return Array.isArray(t)?!Array.isArray(e)||t.length!==e.length?!1:t.every((i,s)=>Wi(i,e[s])):pl(t)?pl(e)?WI(t,e,Wi):!1:t===e}function WI(t,e,i){if(Object.is(t,e))return!0;for(const s of Object.keys(e))if(!(s in t))return!1;for(const s of Object.keys(t))if(!(s in e)||!i(t[s],e[s]))return!1;return!0}function se(...t){const e={};for(const i of t){if(!YI(i))continue;const s=Yb(i)?du(i):Object.keys(i);for(const a of s)pl(e[a])&&pl(i[a])?e[a]=se(e[a],i[a]):e[a]??(e[a]=i[a])}return e}function um(...t){const e={};for(const i of t){if(!YI(i))continue;const s=Yb(i)?du(i):Object.keys(i);for(const a of s)pl(e[a])&&pl(i[a])?e[a]=um(e[a],i[a]):a in e||(e[a]??(e[a]=i[a]))}return e}function A_(t,...e){return e&&Xb(t)?t.map(i=>se(i,...e)):t}function C_(t,e){const i={};for(const[s,a]of w_(t))i[s]=e(a,s,t);return i}function dt(t,e){const i={...t};for(const s of e)delete i[s];return i}function HI(t,e){if(t==null)return;const i={};for(const s of e)Object.hasOwn(t,s)&&(i[s]=t[s]);return i}function $I(t,e){return(Xb(e)?e:e.split(".")).reduce((s,a)=>s[a],t)}function UI(t,e,i){const s=Xb(e)?e.slice():e.split("."),a=s.pop();if(s.some(o=>qb.has(o)))return;const n=s.reduce((o,r)=>o[r],t);return n[a]=i,n[a]}function KI(t,e,i){if(i===void 0)return e;for(const s of t){const a=i[s];a!==void 0&&(e[s]=a)}return e}function dl(t){return t==null||typeof t!="object"||!pl(t)||(Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{const i=t[e];i!==null&&(typeof i=="object"||typeof i=="function")&&!Object.isFrozen(i)&&dl(i)})),t}function L_(t,e){return pl(t)&&e in t}function kX(t,e){return L_(t,e)&&typeof t[e]=="string"}var w_,Xb,YI,pl,qb,Pt=I({"packages/ag-charts-community/src/util/object.ts"(){"use strict";R(),Ap(),{entries:w_,isArray:Xb,isObject:YI,isPlainObject:pl}=st,qb=new Set(["__proto__","constructor","prototype"])}});function lt(t){return function(e,i){const s=`__${i}`;e[i]||IX(e,i,s,t)}}function nn(t){return lt(t)}function ZI(t){const e=t??{};return e.equals=yr,lt(t)}function IX(t,e,i,s){const{changeCb:a,convertor:n,checkDirtyOnAssignment:o=!1}=s??{},r={changeCb:a,checkDirtyOnAssignment:o,convertor:n},l=LX(i,CX(AX(wX(i,r),r),r),r);Object.defineProperty(t,e,{set:l,get:function(){return this[i]},enumerable:!0,configurable:!0})}function AX(t,e){const{convertor:i}=e;return i?function(s){t.call(this,i(s))}:t}function CX(t,e){const{changeCb:i}=e;return i?function(s){const a=t.call(this,s);return a!==XI&&i.call(this,this),a}:t}function LX(t,e,i){const{checkDirtyOnAssignment:s}=i;return s?function(a){const n=e.call(this,a);return a?._dirty===!0&&this.markDirty(t),n}:e}function wX(t,e){const{equals:i=pu}=e;return function(s){const a=this[t];return i(s,a)?XI:(this[t]=s,this.onChangeDetection(t),s)}}var pu,XI,Fn=I({"packages/ag-charts-community/src/scene/changeDetectable.ts"(){"use strict";R(),pu=(t,e)=>t===e,XI=Symbol("no-change")}});function T_(t,e){if(typeof t=="number"&&typeof e=="number")return Qb(t,e);const i=typeof t=="number"?[t]:t,s=typeof e=="number"?[e]:e,a=Math.min(i.length,s.length);for(let n=0;n<a;n+=1){const o=Qb(i[n],s[n]);if(o!==0)return o}return Qb(i.length,s.length)}var Qb,N_=I({"packages/ag-charts-community/src/scene/zIndex.ts"(){"use strict";Qb=(t,e)=>Math.sign(t-e)}}),qI,O_,Cp,br,Vn=I({"packages/ag-charts-community/src/scene/node.ts"(){"use strict";R(),Pt(),Fn(),qI=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(qI||{}),O_=5,Cp=class yP{constructor(e){this.serialNumber=yP._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=zn(this),this.name=void 0,this.transitionOut=void 0,this.pointerEvents=0,this._datum=void 0,this._previousDatum=void 0,this.scene=void 0,this._debugDirtyProperties=void 0,this.parentNode=void 0,this.cachedBBox=void 0,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.batchLevel=0,this.batchDirty=!1,this.name=e?.name,this.tag=e?.tag??NaN,this.zIndex=e?.zIndex??0,(e?.debugDirty??yP._debugEnabled)&&(this._debugDirtyProperties=new Map([["__first__",[]]]))}static toSVG(e,i,s){const a=e?.toSVG();if(a==null||!a.elements.length&&!a.defs?.length)return;const n=fi("svg");if(n.setAttribute("width",String(i)),n.setAttribute("height",String(s)),n.setAttribute("viewBox",`0 0 ${i} ${s}`),a.defs?.length){const o=fi("defs");o.append(...a.defs),n.append(o)}return n.append(...a.elements),n.outerHTML}static*extractBBoxes(e,i){for(const s of e)if(!i||s.visible&&!s.transitionOut){const a=s.getBBox();a&&(yield a)}}get datum(){return this._datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get layerManager(){return this.scene?.layersManager}get imageLoader(){return this.scene?.imageLoader}closestDatum(){for(const{datum:e}of this.traverseUp(!0))if(e!=null)return e}preRender(e,i=1){if(this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1,this.childNodeCounts.complexity=i,this.childNodeCounts.thisComplexity=i,this.batchLevel>0||this.batchDirty)throw new Error("AG Charts - illegal rendering state; batched update in progress");return this.childNodeCounts}isolatedRender(e){e.ctx.save();try{this.render(e)}catch(i){const s=i.errorCount??1;if(s>=O_)throw i.errorCount=s,i;ut.warnOnce("Error during rendering",i,i.stack)}finally{e.ctx.restore()}}render(e){const{stats:i}=e;if(this.debugDirtyProperties(),e.debugNodeSearch){const s=this.name??this.id;e.debugNodeSearch.some(a=>typeof a=="string"?a===s:a.test(s))&&(e.debugNodes[this.name??this.id]=this)}i&&(i.nodesRendered++,i.opsPerformed+=this.childNodeCounts.thisComplexity)}setScene(e){this.scene=e}*traverseUp(e){let i=this;for(e&&(yield i);i=i.parentNode;)yield i}isRoot(){return!this.parentNode}removeChild(e){throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`)}remove(){this.parentNode?.removeChild(this)}destroy(){this.parentNode?.removeChild(this)}batchedUpdate(e){this.batchLevel++,e(),this.batchLevel--,this.batchLevel===0&&this.batchDirty&&(this.markDirty(),this.batchDirty=!1)}setProperties(e){return this.batchLevel++,Object.assign(this,e),this.batchLevel--,this.batchLevel===0&&this.batchDirty&&(this.markDirty(),this.batchDirty=!1),this}containsPoint(e,i){return!1}pickNode(e,i){if(this.containsPoint(e,i))return this}pickNodes(e,i,s=[]){return this.containsPoint(e,i)&&s.push(this),s}getBBox(){return this.cachedBBox==null&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}onChangeDetection(e){this.markDirty(e)}markDirtyChildrenOrder(){this.cachedBBox=void 0}markDirty(e){if(this.batchLevel>0){this.batchDirty=!0;return}e!=null&&this._debugDirtyProperties&&this.markDebugProperties(e),this.cachedBBox=void 0,this.parentNode?.markDirty()}markDebugProperties(e){const i=this._debugDirtyProperties?.get(e)??[],s=new Error().stack?.split(`
`).filter(a=>a!=="Error"&&!a.includes(".markDebugProperties")&&!a.includes(".markDirty")&&!a.includes("Object.assign ")&&!a.includes(`${this.constructor.name}.`))??"unknown";i.push(s[0].replace(" at ","").trim()),this._debugDirtyProperties?.set(e,i)}debugDirtyProperties(){this._debugDirtyProperties!=null&&(this._debugDirtyProperties.has("__first__")||this._debugDirtyProperties.forEach((e,i)=>{e.length>1&&(console.groupCollapsed(`Property changed multiple times before render: ${this.constructor.name}.${i} (${e.length}x)`),e.forEach(s=>console.log(s)),console.groupEnd())}),this._debugDirtyProperties.clear())}onZIndexChange(){this.parentNode?.markDirtyChildrenOrder()}toSVG(){}},Cp._nextSerialNumber=0,Cp._debugEnabled=!1,S([lt()],Cp.prototype,"visible",2),S([nn({equals:Wi,changeCb:t=>t.onZIndexChange()})],Cp.prototype,"zIndex",2),br=Cp}});function Ai(t){return t%=on,t+=on,t%=on,t}function TX(t){return t%=on,t+=on,t!==on&&(t%=on),t}function dm(t){return t%=on,t<-Math.PI?t+=on:t>=Math.PI&&(t-=on),t}function gu(t,e,i){const s=Ai(t),a=Ai(e),n=Ai(i);return a<n?a<=s&&s<=n:a>n?a<=s||s<=n:!0}function Hi(t){return t/180*Math.PI}function NX(t){return t/Math.PI*180}function Jb(t,e){return t=Ai(t),e=Ai(e),e-t+(t>e?on:0)}function P_(t){const e=Ai(t);return e<=Lp?e/Lp:e<=Math.PI?(Math.PI-e)/Lp:e<=1.5*Math.PI?(e-Math.PI)/Lp:(on-e)/Lp}function QI(t,e,i){const s=P_(i);return t*s+e*Math.abs(1-s)}function gl(t){return t?Ai(Hi(t)):0}var on,Lp,$i=I({"packages/ag-charts-community/src/util/angle.ts"(){"use strict";on=Math.PI*2,Lp=Math.PI/2}}),vc,tv,ev,JI,be,fu=I({"packages/ag-charts-community/src/util/color.ts"(){"use strict";R(),vc=(t,e,i)=>t*(1-i)+e*i,tv=t=>{const e=t<0?-1:1,i=Math.abs(t);return i<=.04045?t/12.92:e*((i+.055)/1.055)**2.4},ev=t=>{const e=t<0?-1:1,i=Math.abs(t);return i>.0031308?e*(1.055*i**(1/2.4)-.055):12.92*t},JI=class ue{constructor(e,i,s,a=1){this.r=Et(0,e||0,1),this.g=Et(0,i||0,1),this.b=Et(0,s||0,1),this.a=Et(0,a||0,1)}static validColorString(e){return e.indexOf("#")>=0?!!ue.parseHex(e):e.indexOf("rgb")>=0?!!ue.stringToRgba(e):ue.nameToHex.has(e.toLowerCase())}static fromString(e){if(e.indexOf("#")>=0)return ue.fromHexString(e);const i=ue.nameToHex.get(e.toLowerCase());if(i)return ue.fromHexString(i);if(e.indexOf("rgb")>=0)return ue.fromRgbaString(e);throw new Error(`Invalid color string: '${e}'`)}static parseHex(e){e=e.replace(/ /g,"").slice(1);let i;switch(e.length){case 6:case 8:i=[];for(let s=0;s<e.length;s+=2)i.push(parseInt(`${e[s]}${e[s+1]}`,16));break;case 3:case 4:i=e.split("").map(s=>parseInt(s,16)).map(s=>s+s*16);break}if(i?.length>=3&&i.every(s=>s>=0))return i.length===3&&i.push(255),i}static fromHexString(e){const i=ue.parseHex(e);if(i){const[s,a,n,o]=i;return new ue(s/255,a/255,n/255,o/255)}throw new Error(`Malformed hexadecimal color string: '${e}'`)}static stringToRgba(e){let i=-1,s=-1;for(let r=0;r<e.length;r++){const l=e[r];if(i===-1&&l==="(")i=r;else if(l===")"){s=r;break}}if(i===-1||s===-1)return;const n=e.substring(i+1,s).split(","),o=[];for(let r=0;r<n.length;r++){const l=n[r];let c=parseFloat(l);if(!Number.isFinite(c))return;l.indexOf("%")>=0?(c=Et(0,c,100),c/=100):r===3?c=Et(0,c,1):(c=Et(0,c,255),c/=255),o.push(c)}return o}static fromRgbaString(e){const i=ue.stringToRgba(e);if(i){if(i.length===3)return new ue(i[0],i[1],i[2]);if(i.length===4)return new ue(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${e}'`)}static fromArray(e){if(e.length===4)return new ue(e[0],e[1],e[2],e[3]);if(e.length===3)return new ue(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(e,i,s,a=1){const n=ue.HSBtoRGB(e,i,s);return new ue(n[0],n[1],n[2],a)}static fromHSL(e,i,s,a=1){const n=ue.HSLtoRGB(e,i,s);return new ue(n[0],n[1],n[2],a)}static fromOKLCH(e,i,s,a=1){const n=ue.OKLCHtoRGB(e,i,s);return new ue(n[0],n[1],n[2],a)}static padHex(e){return e.length===1?"0"+e:e}toHexString(){let e="#"+ue.padHex(Math.round(this.r*255).toString(16))+ue.padHex(Math.round(this.g*255).toString(16))+ue.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(e+=ue.padHex(Math.round(this.a*255).toString(16))),e}toRgbaString(e=3){const i=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],s=Math.pow(10,e);return this.a!==1?(i.push(Math.round(this.a*s)/s),`rgba(${i.join(", ")})`):`rgb(${i.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return ue.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,i,s){const a=tv(e),n=tv(i),o=tv(s),r=Math.cbrt(.4122214708*a+.5363325363*n+.0514459929*o),l=Math.cbrt(.2119034982*a+.6806995451*n+.1073969566*o),c=Math.cbrt(.0883024619*a+.2817188376*n+.6299787005*o),h=.2104542553*r+.793617785*l-.0040720468*c,u=1.9779984951*r-2.428592205*l+.4505937099*c,d=.0259040371*r+.7827717662*l-.808675766*c,p=Math.atan2(d,u)*180/Math.PI,g=h,f=Math.hypot(u,d),x=p>=0?p:p+360;return[g,f,x]}static OKLCHtoRGB(e,i,s){const a=e,n=i*Math.cos(s*Math.PI/180),o=i*Math.sin(s*Math.PI/180),r=(a+.3963377774*n+.2158037573*o)**3,l=(a-.1055613458*n-.0638541728*o)**3,c=(a-.0894841775*n-1.291485548*o)**3,h=4.0767416621*r-3.3077115913*l+.2309699292*c,u=-1.2684380046*r+2.6097574011*l-.3413193965*c,d=-.0041960863*r-.7034186147*l+1.707614701*c,p=ev(h),g=ev(u),f=ev(d);return[p,g,f]}static RGBtoHSL(e,i,s){const a=Math.min(e,i,s),n=Math.max(e,i,s),o=(n+a)/2;let r,l;if(n===a)r=0,l=0;else{const c=n-a;l=o>.5?c/(2-n-a):c/(n+a),n===e?r=(i-s)/c+(i<s?6:0):n===i?r=(s-e)/c+2:r=(e-i)/c+4,r*=360/6}return[r,l,o]}static HSLtoRGB(e,i,s){if(e=(e%360+360)%360,i===0)return[s,s,s];const a=s<.5?s*(1+i):s+i-s*i,n=2*s-a;function o(h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?n+(a-n)*6*h:h<1/2?a:h<2/3?n+(a-n)*(2/3-h)*6:n}const r=o(e/360+1/3),l=o(e/360),c=o(e/360-1/3);return[r,l,c]}static RGBtoHSB(e,i,s){const a=Math.min(e,i,s),n=Math.max(e,i,s),o=n===0?0:(n-a)/n;let r=0;if(a!==n){const l=n-a,c=(n-e)/l,h=(n-i)/l,u=(n-s)/l;e===n?r=u-h:i===n?r=2+c-u:r=4+h-c,r/=6,r<0&&(r=r+1)}return[r*360,o,n]}static HSBtoRGB(e,i,s){e=(e%360+360)%360/360;let a=0,n=0,o=0;if(i===0)a=n=o=s;else{const r=(e-Math.floor(e))*6,l=r-Math.floor(r),c=s*(1-i),h=s*(1-i*l),u=s*(1-i*(1-l));switch(r>>0){case 0:a=s,n=u,o=c;break;case 1:a=h,n=s,o=c;break;case 2:a=c,n=s,o=u;break;case 3:a=c,n=h,o=s;break;case 4:a=u,n=c,o=s;break;case 5:a=s,n=c,o=h;break}}return[a,n,o]}static mix(e,i,s){return new ue(vc(e.r,i.r,s),vc(e.g,i.g,s),vc(e.b,i.b,s),vc(e.a,i.a,s))}static lighten(e,i){const s=ue.RGBtoOKLCH(e.r,e.g,e.b);return ue.fromOKLCH(Et(0,s[0]+i,1),s[1],s[2])}static darken(e,i){const s=ue.RGBtoOKLCH(e.r,e.g,e.b);return ue.fromOKLCH(Et(0,s[0]-i,1),s[1],s[2])}static interpolate(e,i){const s=1/(e.length-1),a=e.map(n=>ue.RGBtoOKLCH(n.r,n.g,n.b));return Array.from({length:i},(n,o)=>{const r=o/(i-1),l=e.length<=2?0:Math.min(Math.floor(r*(e.length-1)),e.length-2),c=(r-l*s)/s,h=a[l],u=a[l+1];return ue.fromOKLCH(vc(h[0],u[0],c),vc(h[1],u[1],c),vc(h[2],u[2],c))})}},JI.nameToHex=new Map([["aliceblue","#F0F8FF"],["antiquewhite","#FAEBD7"],["aqua","#00FFFF"],["aquamarine","#7FFFD4"],["azure","#F0FFFF"],["beige","#F5F5DC"],["bisque","#FFE4C4"],["black","#000000"],["blanchedalmond","#FFEBCD"],["blue","#0000FF"],["blueviolet","#8A2BE2"],["brown","#A52A2A"],["burlywood","#DEB887"],["cadetblue","#5F9EA0"],["chartreuse","#7FFF00"],["chocolate","#D2691E"],["coral","#FF7F50"],["cornflowerblue","#6495ED"],["cornsilk","#FFF8DC"],["crimson","#DC143C"],["cyan","#00FFFF"],["darkblue","#00008B"],["darkcyan","#008B8B"],["darkgoldenrod","#B8860B"],["darkgray","#A9A9A9"],["darkgreen","#006400"],["darkgrey","#A9A9A9"],["darkkhaki","#BDB76B"],["darkmagenta","#8B008B"],["darkolivegreen","#556B2F"],["darkorange","#FF8C00"],["darkorchid","#9932CC"],["darkred","#8B0000"],["darksalmon","#E9967A"],["darkseagreen","#8FBC8F"],["darkslateblue","#483D8B"],["darkslategray","#2F4F4F"],["darkslategrey","#2F4F4F"],["darkturquoise","#00CED1"],["darkviolet","#9400D3"],["deeppink","#FF1493"],["deepskyblue","#00BFFF"],["dimgray","#696969"],["dimgrey","#696969"],["dodgerblue","#1E90FF"],["firebrick","#B22222"],["floralwhite","#FFFAF0"],["forestgreen","#228B22"],["fuchsia","#FF00FF"],["gainsboro","#DCDCDC"],["ghostwhite","#F8F8FF"],["gold","#FFD700"],["goldenrod","#DAA520"],["gray","#808080"],["green","#008000"],["greenyellow","#ADFF2F"],["grey","#808080"],["honeydew","#F0FFF0"],["hotpink","#FF69B4"],["indianred","#CD5C5C"],["indigo","#4B0082"],["ivory","#FFFFF0"],["khaki","#F0E68C"],["lavender","#E6E6FA"],["lavenderblush","#FFF0F5"],["lawngreen","#7CFC00"],["lemonchiffon","#FFFACD"],["lightblue","#ADD8E6"],["lightcoral","#F08080"],["lightcyan","#E0FFFF"],["lightgoldenrodyellow","#FAFAD2"],["lightgray","#D3D3D3"],["lightgreen","#90EE90"],["lightgrey","#D3D3D3"],["lightpink","#FFB6C1"],["lightsalmon","#FFA07A"],["lightseagreen","#20B2AA"],["lightskyblue","#87CEFA"],["lightslategray","#778899"],["lightslategrey","#778899"],["lightsteelblue","#B0C4DE"],["lightyellow","#FFFFE0"],["lime","#00FF00"],["limegreen","#32CD32"],["linen","#FAF0E6"],["magenta","#FF00FF"],["maroon","#800000"],["mediumaquamarine","#66CDAA"],["mediumblue","#0000CD"],["mediumorchid","#BA55D3"],["mediumpurple","#9370DB"],["mediumseagreen","#3CB371"],["mediumslateblue","#7B68EE"],["mediumspringgreen","#00FA9A"],["mediumturquoise","#48D1CC"],["mediumvioletred","#C71585"],["midnightblue","#191970"],["mintcream","#F5FFFA"],["mistyrose","#FFE4E1"],["moccasin","#FFE4B5"],["navajowhite","#FFDEAD"],["navy","#000080"],["oldlace","#FDF5E6"],["olive","#808000"],["olivedrab","#6B8E23"],["orange","#FFA500"],["orangered","#FF4500"],["orchid","#DA70D6"],["palegoldenrod","#EEE8AA"],["palegreen","#98FB98"],["paleturquoise","#AFEEEE"],["palevioletred","#DB7093"],["papayawhip","#FFEFD5"],["peachpuff","#FFDAB9"],["peru","#CD853F"],["pink","#FFC0CB"],["plum","#DDA0DD"],["powderblue","#B0E0E6"],["purple","#800080"],["rebeccapurple","#663399"],["red","#FF0000"],["rosybrown","#BC8F8F"],["royalblue","#4169E1"],["saddlebrown","#8B4513"],["salmon","#FA8072"],["sandybrown","#F4A460"],["seagreen","#2E8B57"],["seashell","#FFF5EE"],["sienna","#A0522D"],["silver","#C0C0C0"],["skyblue","#87CEEB"],["slateblue","#6A5ACD"],["slategray","#708090"],["slategrey","#708090"],["snow","#FFFAFA"],["springgreen","#00FF7F"],["steelblue","#4682B4"],["tan","#D2B48C"],["teal","#008080"],["thistle","#D8BFD8"],["tomato","#FF6347"],["transparent","#00000000"],["turquoise","#40E0D0"],["violet","#EE82EE"],["wheat","#F5DEB3"],["white","#FFFFFF"],["whitesmoke","#F5F5F5"],["yellow","#FFFF00"],["yellowgreen","#9ACD32"]]),be=JI}}),pm,iv=I({"packages/ag-charts-community/src/scale/abstractScale.ts"(){"use strict";pm=class{ticks(t,e,i){}niceDomain(t,e=this.domain){return e}get bandwidth(){}get step(){}get inset(){}}}}),wp,tA=I({"packages/ag-charts-community/src/scale/invalidating.ts"(){"use strict";wp=(t,e)=>{const i=Symbol(String(e));t[i]=void 0,Object.defineProperty(t,e,{get(){return this[i]},set(s){this[i]!==s&&(this[i]=s,this.invalid=!0)},enumerable:!0,configurable:!1})}}}),eA,sv,iA,__,mu,av=I({"packages/ag-charts-community/src/scale/colorScale.ts"(){"use strict";R(),fu(),iv(),tA(),eA=t=>{const e=be.fromString(t),[i,s,a]=be.RGBtoOKLCH(e.r,e.g,e.b);return{l:i,c:s,h:a,a:e.a}},sv=1e-6,iA=t=>t.c<sv||t.l<sv||t.l>1-sv,__=(t,e,i)=>{i=Et(0,i,1);let s;if(iA(t))s=e.h;else if(iA(e))s=t.h;else{const r=t.h;let l=e.h;const c=e.h-t.h;c>180?l-=360:c<-180&&(l+=360),s=r*(1-i)+l*i}const a=t.c*(1-i)+e.c*i,n=t.l*(1-i)+e.l*i,o=t.a*(1-i)+e.a*i;return be.fromOKLCH(n,a,s,o)},mu=class extends pm{constructor(){super(...arguments),this.type="color",this.defaultTickCount=0,this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(eA)}update(){const{domain:t,range:e}=this;t.length<2&&(ut.warnOnce("`colorDomain` should have at least 2 values."),t.length===0?t.push(0,1):t.length===1&&t.push(t[0]+1));for(let i=1;i<t.length;i++){const s=t[i-1],a=t[i];if(s>=a){ut.warnOnce("`colorDomain` values should be supplied in ascending order."),t.sort((n,o)=>n-o);break}}if(e.length<t.length)for(let i=e.length;i<t.length;i++)e.push(e.length>0?e[0]:"black");this.parsedRange=this.range.map(eA)}normalizeDomains(...t){return{domain:t.flat(),animatable:!0}}toDomain(){}convert(t){this.refresh();const{domain:e,range:i,parsedRange:s}=this,a=e[0],n=e.at(-1),o=i[0],r=i[i.length-1];if(t<=a)return o;if(t>=n)return r;let l,c;if(e.length===2){const d=(t-a)/(n-a),p=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(d*(i.length-1)),i.length-2),c=(d-l*p)/p}else{for(l=0;l<e.length-2&&!(t<e[l+1]);l++);const d=e[l],p=e[l+1];c=(t-d)/(p-d)}const h=s[l],u=s[l+1];return __(h,u,c).toRgbaString()}invert(){}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&ut.warnOnce("Expected update to not invalidate scale"))}},S([wp],mu.prototype,"domain",2),S([wp],mu.prototype,"range",2)}}),gm,nv=I({"packages/ag-charts-community/src/scene/gradient/gradient.ts"(){"use strict";R(),av(),gm=class{constructor(t,e=[],i){this.colorSpace=t,this.stops=e,this.bbox=i,this._cache=void 0}createGradient(t,e,i){const s=this.bbox??e;if(!s.isFinite())return;if(this._cache!=null&&this._cache.ctx===t&&this._cache.bbox.equals(s))return this._cache.gradient;const{stops:a,colorSpace:n}=this;if(a.length===0)return;if(a.length===1)return a[0].color;let o=this.createCanvasGradient(t,s,i);if(o==null)return;const r=n==="oklch",l=.05;let c=a[0];o.addColorStop(c.stop,c.color);for(let h=1;h<a.length;h+=1){const u=a[h];if(r){const d=new mu;d.domain=[c.stop,u.stop],d.range=[c.color,u.color];for(let p=c.stop+l;p<u.stop;p+=l)o.addColorStop(p,d.convert(p))}o.addColorStop(u.stop,u.color),c=u}return"createPattern"in o&&(o=o.createPattern()),this._cache={ctx:t,bbox:s,gradient:o},o}toSvg(t){const e=this.bbox??t,i=this.createSvgGradient(e);return this.stops.forEach(({stop:s,color:a})=>{const n=fi("stop");n.setAttribute("offset",`${s}`),n.setAttribute("stop-color",`${a}`),i.appendChild(n)}),i}}}}),sA,E_=I({"packages/ag-charts-community/src/scene/gradient/conicGradient.ts"(){"use strict";R(),$i(),nv(),sA=class extends gm{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}createCanvasGradient(t,e,i){const{angle:a}=this,n=gl(a+-90),o=i?.centerX??e.x+e.width*.5,r=i?.centerY??e.y+e.height*.5;return t.createConicGradient(n,o,r)}createSvgGradient(t){return fi("linearGradient")}}}}),aA,R_=I({"packages/ag-charts-community/src/scene/gradient/linearGradient.ts"(){"use strict";R(),$i(),nv(),aA=class extends gm{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}getGradientPoints(t){const{angle:i}=this,s=gl(i+90),a=Math.cos(s),n=Math.sin(s),o=t.width,r=t.height,l=t.x+o*.5,c=t.y+r*.5,h=Math.sqrt(r*r+o*o)/2,u=Math.atan2(r,o);let d;s<Math.PI/2?d=s:s<Math.PI?d=Math.PI-s:s<1.5*Math.PI?d=s-Math.PI:d=2*Math.PI-s;const p=h*Math.abs(Math.cos(d-u));return{x0:l+a*p,y0:c+n*p,x1:l-a*p,y1:c-n*p}}createCanvasGradient(t,e){const{x0:i,y0:s,x1:a,y1:n}=this.getGradientPoints(e);if(!(isNaN(i)||isNaN(s)||isNaN(a)||isNaN(n)))return t.createLinearGradient(i,s,a,n)}createSvgGradient(t){const{x0:e,y0:i,x1:s,y1:a}=this.getGradientPoints(t),n=fi("linearGradient");return n.setAttribute("x1",String(e)),n.setAttribute("y1",String(i)),n.setAttribute("x2",String(s)),n.setAttribute("y2",String(a)),n.setAttribute("gradientUnits","userSpaceOnUse"),n}}}}),B_,OX=I({"packages/ag-charts-community/src/scene/gradient/radialGradient.ts"(){"use strict";R(),nv(),B_=class extends gm{constructor(t,e,i){super(t,e,i)}createCanvasGradient(t,e,i){const s=i?.centerX??e.x+e.width*.5,a=i?.centerY??e.y+e.height*.5,n=i?.innerRadius??0,o=i?.outerRadius??Math.hypot(e.width*.5,e.height*.5)/Math.SQRT2;return t.createRadialGradient(s,a,n,s,a,o)}createSvgGradient(t){const e=t.x+t.width*.5,i=t.y+t.height*.5,s=fi("radialGradient");return s.setAttribute("cx",String(e)),s.setAttribute("cy",String(i)),s.setAttribute("r",String(Math.hypot(t.width*.5,t.height*.5)/Math.SQRT2)),s.setAttribute("gradientUnits","userSpaceOnUse"),s}}}});function Tp(t){return t instanceof Nt||t instanceof Np}var k,Nt,Np,vt=I({"packages/ag-charts-community/src/util/properties.ts"(){"use strict";R(),Ap(),Pt(),k=DX,Nt=class{handleUnknownProperties(t,e){}set(t){const{className:e=this.constructor.name}=this.constructor;if(typeof t!="object")return ut.warn(`unable to set ${e} - expecting a properties object`),this;const i=new Set(Object.keys(t));for(const s of du(this))if(i.has(s)){const a=t[s],n=this;if(Tp(n[s]))if(n[s]instanceof Np){const o=n[s].reset(a);o!=null?n[s]=o:ut.warn(`unable to set [${s}] - expecting a properties array`)}else n[s].set(a);else No(a)?n[s]=um(a,n[s]??{}):n[s]=a;i.delete(s)}this.handleUnknownProperties(i,t);for(const s of i)ut.warn(`unable to set [${s}] in ${e} - property is unknown`);return this}toJson(){return du(this).reduce((t,e)=>{const i=this[e];return t[e]=Tp(i)?i.toJson():i,t},{})}},Np=class UY extends Array{constructor(e,...i){super(i.length);const a=(n=>!!n?.prototype?.constructor?.name)(e)?n=>new e().set(n):e;Object.defineProperty(this,"itemFactory",{value:a,enumerable:!1,configurable:!1}),this.set(i)}set(e){if(ss(e)){this.length=e.length;for(let i=0;i<e.length;i++)this[i]=this.itemFactory(e[i])}return this}reset(e){if(Array.isArray(e))return new UY(this.itemFactory,...e)}toJson(){return this.map(e=>e?.toJson?.()??e)}}}});function PX(t){let e;for(const i of t)if(i?.stop!=null){if(e!=null&&i.stop<e)return!1;e=i.stop}return!0}function z_(t){return t.flatMap((e,i)=>{const{stop:s}=e,a=t.at(i+1)?.color;return a!=null?[e,{stop:s,color:a}]:[e]})}function _X(t,e){const i=e==="discrete"?1:0,s=t.map((a,n,{length:o})=>({stop:(n+i)/(o-1+i),color:a}));return e==="discrete"?z_(s):s}function F_(t,e,i,s="continuous"){const a=t.map(g=>typeof g=="string"?{color:g}:g);if(a.length===0)return _X(e,s);if(!PX(a))return ut.warnOnce("[fills] must have the stops defined in ascending order"),[];const n=Math.min(...i),o=Math.max(...i),r=s==="discrete",l=new Float64Array(a.length);let c=0,h=-1;for(let g=0;g<a.length;g+=1){const f=a[g];if(g>=h){h=a.length-1;for(let m=g+1;m<a.length;m+=1)if(a[m]?.stop!=null){h=m;break}}let x=f?.stop;if(x==null){const m=a[c]?.stop,b=a[h]?.stop,v=m??n,M=b??o,D=r&&m==null?1:0;x=v+(M-v)*(g-c+D)/(h-c+D)}else c=g;l[g]=Math.max(0,Math.min(1,(x-n)/(o-n)))}let u=a.find(g=>g.color!=null)?.color,d;const p=a.map((g,f)=>{let x=g?.color;const m=l[f];return x!=null?u=x:u!=null?x=u:(d==null&&(d=new mu,d.domain=[0,1],d.range=e),x=d.convert(m)),{stop:m,color:x}});return s==="discrete"?z_(p):p}var ov,V_=I({"packages/ag-charts-community/src/scene/gradient/stops.ts"(){"use strict";R(),av(),vt(),vt(),ov=class extends Nt{constructor(){super(...arguments),this.color="black"}},S([k],ov.prototype,"stop",2),S([k],ov.prototype,"color",2)}}),G_,EX=I({"packages/ag-charts-community/src/scene/image/image.ts"(){"use strict";R(),$i(),G_=class{constructor(t,e){this.imageLoader=t,this._cache=void 0,this.url=e.url,this.backgroundFill=e.backgroundFill??"black",this.backgroundFillOpacity=e.backgroundFillOpacity??1,this.repeat=e.repeat??"no-repeat",this.width=e.width,this.height=e.height,this.fit=e.fit??"stretch",this.rotation=e.rotation??0}createCanvasImage(t,e,i,s){if(!e)return null;const[a,n]=this.getSize(e.width,e.height,i,s);return a<1||n<1?(ut.warnOnce("Image fill is too small to render, ignoring."),null):t.createPattern(e,this.repeat)}getSize(t,e,i,s){const{fit:a}=this;let n=t,o=e,r=1;const l=i/s,c=t/e;return a==="stretch"||t===0||e===0?(n=i,o=s):a==="contain"?r=c>l?i/t:s/e:a==="cover"&&(r=c>l?s/e:i/t),[Math.max(1,n*r),Math.max(1,o*r)]}setImageTransform(t,e){if(typeof t=="string")return;const{url:i,rotation:s,width:a,height:n}=this,o=this.imageLoader?.loadImage(i);if(!o)return;const r=gl(s),l=Math.cos(r),c=Math.sin(r),[h,u]=this.getSize(o.width,o.height,a??e.width,n??e.height),d=h/o.width,p=u/o.height,g=e.x+e.width/2,f=e.y+e.height/2,x=l*h-c*u,m=c*h+l*u,b=x/2,v=m/2;t?.setTransform(new DOMMatrix([l*d,c*p,-c*d,l*p,g-b,f-v]))}createPattern(t,e,i,s){const a=this.width??e,n=this.height??i,o=this._cache;if(o!=null&&o.ctx===t&&o.width===a&&o.height===n)return o.pattern;const r=this.imageLoader?.loadImage(this.url,s),l=this.createCanvasImage(t,r,a,n);return l==null?this.backgroundFill:(this._cache={ctx:t,pattern:l,width:a,height:n},l)}toSvg(t,e){const{url:i,rotation:s,backgroundFill:a,backgroundFillOpacity:n}=this,{x:o,y:r,width:l,height:c}=t,h=fi("pattern");h.setAttribute("viewBox",`0 0 ${l} ${c}`),h.setAttribute("x",String(o)),h.setAttribute("y",String(r)),h.setAttribute("width",String(l)),h.setAttribute("height",String(c)),h.setAttribute("patternUnits","userSpaceOnUse");const u=fi("rect");u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("width",String(l)),u.setAttribute("height",String(c)),u.setAttribute("fill",a),u.setAttribute("fill-opacity",String(n)),h.appendChild(u);const d=fi("image");return d.setAttribute("href",i),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width",String(l)),d.setAttribute("height",String(c)),d.setAttribute("preserveAspectRatio","none"),d.setAttribute("transform",`scale(${1/e}) rotate(${s}, ${l/2}, ${c/2})`),h.appendChild(d),h}}}});function j_(t,e,i,s){const a=t-i,n=e-s;return a*a+n*n}function rv(t,e,i,s,a,n,o){if(i===a&&s===n)return Math.min(o,j_(t,e,i,s));const r=a-i,l=n-s,c=Math.max(0,Math.min(1,((t-i)*r+(e-s)*l)/(r*r+l*l))),h=i+c*r,u=s+c*l;return Math.min(o,j_(t,e,h,u))}var nA=I({"packages/ag-charts-community/src/util/distance.ts"(){"use strict"}});function RX(t){if(!t)return;const e=[];let i=0,s;for(;i<t.length;){const a=W_.exec(t.slice(i));let n;if(a==null){if(!s){ut.warnOnce(`Invalid SVG path, error at index ${i}: Missing command.`);return}n=s}else n=a[1],i+=a[0].length;const o=BX(n,t,i);if(!o)return;i=o[0],s=n,e.push(o[1])}return e}function BX(t,e,i){const s=$_[t.toLocaleLowerCase()],a={command:t,params:[]};for(const n of s){const o=e.slice(i),r=n.exec(o);if(r!=null){a.params.push(parseFloat(r[0])),i+=r[0].length;const l=H_.exec(o.slice(r[0].length));l!=null&&(i+=l[0].length)}else{if(a.params.length===1)return[i,a];ut.warnOnce(`Invalid SVG path, error at index ${i}: No path segment parameters for command [${t}]`);return}}return[i,a]}var W_,Ae,H_,oA,$_,zX=I({"packages/ag-charts-community/src/util/svg.ts"(){"use strict";R(),W_=/^[\t\n\f\r ]*([achlmqstvz])[\t\n\f\r ]*/i,Ae=/^[+-]?((\d*\.\d+)|(\d+\.)|(\d+))(e[+-]?\d+)?/i,H_=/[\t\n\f\r ]*,?[\t\n\f\r ]*/,oA=/^[01]/,$_={z:[],h:[Ae],v:[Ae],m:[Ae,Ae],l:[Ae,Ae],t:[Ae,Ae],s:[Ae,Ae,Ae,Ae],q:[Ae,Ae,Ae,Ae],c:[Ae,Ae,Ae,Ae,Ae,Ae],a:[Ae,Ae,Ae,oA,oA,Ae,Ae]}}});function FX(t,e){const i=-e/t;return t!==0&&i>=0&&i<=1?[i]:[]}function VX(t,e,i,s=1e-6){if(Math.abs(t)<s)return FX(e,i);const a=e*e-4*t*i,n=[];if(Math.abs(a)<s){const o=-e/(2*t);o>=0&&o<=1&&n.push(o)}else if(a>0){const o=Math.sqrt(a),r=(-e-o)/(2*t),l=(-e+o)/(2*t);r>=0&&r<=1&&n.push(r),l>=0&&l<=1&&n.push(l)}return n}function GX(t,e,i,s,a=1e-6){if(Math.abs(t)<a)return VX(e,i,s,a);const n=e/t,o=i/t,r=s/t,l=(3*o-n*n)/9,c=(9*n*o-27*r-2*n*n*n)/54,h=l*l*l+c*c,u=1/3,d=[];if(h>=0){const p=Math.sqrt(h),g=Math.sign(c+p)*Math.pow(Math.abs(c+p),u),f=Math.sign(c-p)*Math.pow(Math.abs(c-p),u),x=Math.abs(Math.sqrt(3)*(g-f)/2),m=-u*n+(g+f);if(m>=0&&m<=1&&d.push(m),Math.abs(x)<a){const b=-u*n-(g+f)/2;b>=0&&b<=1&&d.push(b)}}else{const p=Math.acos(c/Math.sqrt(-l*l*l)),g=u*n,f=2*Math.sqrt(-l),x=f*Math.cos(u*p)-g,m=f*Math.cos(u*(p+2*Math.PI))-g,b=f*Math.cos(u*(p+4*Math.PI))-g;x>=0&&x<=1&&d.push(x),m>=0&&m<=1&&d.push(m),b>=0&&b<=1&&d.push(b)}return d}var jX=I({"packages/ag-charts-community/src/scene/polyRoots.ts"(){"use strict"}});function fm(t,e,i,s,a,n,o,r){const l=(i-t)*(r-n)-(s-e)*(o-a);if(l===0)return 0;const c=((o-a)*(e-n)-(t-a)*(r-n))/l,h=((i-t)*(e-n)-(s-e)*(t-a))/l;return c>=0&&c<=1&&h>=0&&h<=1?1:0}function WX(t,e,i,s,a,n,o,r,l,c,h,u){let d=0;const p=c-u,g=h-l,f=l*(u-c)-c*(h-l),x=U_(t,i,a,o),m=U_(e,s,n,r),b=p*x[0]+g*m[0],v=p*x[1]+g*m[1],M=p*x[2]+g*m[2],D=p*x[3]+g*m[3]+f,L=GX(b,v,M,D);for(const C of L){const A=C*C,T=C*A,N=x[0]*T+x[1]*A+x[2]*C+x[3],O=m[0]*T+m[1]*A+m[2]*C+m[3];let E;l===h?E=(O-c)/(u-c):E=(N-l)/(h-l),E>=0&&E<=1&&d++}return d}function U_(t,e,i,s){return[-t+3*e-3*i+s,3*t-6*e+3*i,-3*t+3*e,t]}var K_=I({"packages/ag-charts-community/src/scene/intersection.ts"(){"use strict";jX()}});function Op(t,e,i,s,a){return(1-a)**3*t+3*(1-a)**2*a*e+3*(1-a)*a**2*i+a**3*s}function lv(t,e,i,s,a){if(a<=Math.min(t,s))return t<s?0:1;if(a>=Math.max(t,s))return t<s?1:0;let n=0,o=1,r=NaN;for(let l=0;l<12;l+=1)r=(n+o)/2,Op(t,e,i,s,r)<a?n=r:o=r;return r}function mm(t,e,i,s,a,n,o,r,l){const c=(1-l)*t+l*i,h=(1-l)*e+l*s,u=(1-l)*i+l*a,d=(1-l)*s+l*n,p=(1-l)*a+l*o,g=(1-l)*n+l*r,f=(1-l)*c+l*u,x=(1-l)*h+l*d,m=(1-l)*u+l*p,b=(1-l)*d+l*g,v=(1-l)*f+l*m,M=(1-l)*x+l*b;return[[{x:t,y:e},{x:c,y:h},{x:f,y:x},{x:v,y:M}],[{x:v,y:M},{x:m,y:b},{x:p,y:g},{x:o,y:r}]]}function Y_(t,e,i,s){const a=-t+3*e-3*i+s,n=2*(t-2*e+i),o=-t+e;if(a===0){if(n!==0){const l=-o/n;if(l>0&&l<1)return[l]}return[]}const r=n*n-4*a*o;if(r>=0){const l=Math.sqrt(r),c=(-n+l)/(2*a),h=(-n-l)/(2*a);return[c,h].filter(u=>u>0&&u<1)}return[]}function Z_(t,e,i,s,a,n,o,r){const l=Y_(t,i,a,o),c=Y_(e,s,n,r);return[...l,...c]}function rA(t,e,i){const s=Op(t[0].x,t[1].x,t[2].x,t[3].x,.5),a=Op(t[0].y,t[1].y,t[2].y,t[3].y,.5),n=Math.hypot(s-e,a-i),o=Math.min(Math.hypot(t[0].x-e,t[0].y-i),Math.hypot(t[1].x-e,t[1].y-i),Math.hypot(t[2].x-e,t[2].y-i),Math.hypot(t[3].x-e,t[3].y-i));return{points:t,distance:n,minDistance:o}}function X_(t,e,i,s,a,n,o,r,l,c,h=1){let d={value:rA([{x:t,y:e},{x:i,y:s},{x:a,y:n},{x:o,y:r}],l,c),next:null},p;for(;d!=null;){const{points:g,distance:f,minDistance:x}=d.value;if(d=d.next,(p==null||f<p.distance)&&(p={distance:f,minDistance:x}),p!=null&&p.distance-x<=h)continue;const[m,b]=mm(g[0].x,g[0].y,g[1].x,g[1].y,g[2].x,g[2].y,g[3].x,g[3].y,.5),v=[rA(m,l,c),rA(b,l,c)].sort(lA);d=PI(d,v,lA)}return p?.distance??1/0}var lA,cv=I({"packages/ag-charts-community/src/scene/util/bezier.ts"(){"use strict";R(),lA=(t,e)=>e.minDistance-t.minDistance}}),yu,hv=I({"packages/ag-charts-community/src/scene/extendedPath2D.ts"(){"use strict";$i(),nA(),zX(),Wt(),K_(),cv(),yu=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.cx=NaN,this.cy=NaN,this.sx=NaN,this.sy=NaN,this.openedPath=!1,this.closedPath=!1}isEmpty(){return this.commands.length===0}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(t,e){this.openedPath=!0,this.sx=t,this.sy=e,this.cx=t,this.cy=e,this.path2d.moveTo(t,e),this.commands.push(0),this.params.push(t,e)}lineTo(t,e){this.openedPath?(this.cx=t,this.cy=e,this.path2d.lineTo(t,e),this.commands.push(1),this.params.push(t,e)):this.moveTo(t,e)}cubicCurveTo(t,e,i,s,a,n){this.openedPath||this.moveTo(t,e),this.path2d.bezierCurveTo(t,e,i,s,a,n),this.commands.push(2),this.params.push(t,e,i,s,a,n)}closePath(){this.openedPath&&(this.cx=this.sx,this.cy=this.sy,this.sx=NaN,this.sy=NaN,this.path2d.closePath(),this.commands.push(3),this.openedPath=!1,this.closedPath=!0)}rect(t,e,i,s){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.closePath()}roundRect(t,e,i,s,a){a=Math.min(a,i/2,s/2),this.moveTo(t,e+a),this.arc(t+a,e+a,a,Math.PI,1.5*Math.PI),this.lineTo(t+a,e),this.lineTo(t+i-a,e),this.arc(t+i-a,e+a,a,1.5*Math.PI,2*Math.PI),this.lineTo(t+i,e+a),this.lineTo(t+i,e+s-a),this.arc(t+i-a,e+s-a,a,0,Math.PI/2),this.lineTo(t+i-a,e+s),this.lineTo(t+a,e+s),this.arc(t+ +a,e+s-a,a,Math.PI/2,Math.PI),this.lineTo(t,e+s-a),this.closePath()}ellipse(t,e,i,s,a,n,o,r=!1){const l=i,c=s/i,h=Math.cos(a),u=Math.sin(a),d=-c*u,p=c*h,g=l*Math.cos(n),f=l*Math.sin(n),x=t+h*g+d*f,m=e+u*g+p*f,b=(x-this.cx)**2+(m-this.cy)**2;this.openedPath?b>1e-6&&this.lineTo(x,m):this.moveTo(x,m);let v=r?-Ai(n-o):Ai(o-n);Math.abs(Math.abs(o-n)-2*Math.PI)<1e-6&&v<2*Math.PI&&(v+=2*Math.PI*(r?-1:1));const M=Math.max(Math.ceil(Math.abs(v)/(Math.PI/2)),1),D=v/M,L=4/3*Math.tan(D/4);for(let C=0;C<M;C+=1){const A=n+D*(C+0),T=n+D*(C+1),N=l*Math.sin(A),O=l*Math.cos(A),E=l*Math.sin(T),z=l*Math.cos(T),B=O-L*N,F=N+L*O,V=z+L*E,G=E-L*z,H=z,$=E;this.cubicCurveTo(t+h*B+d*F,e+u*B+p*F,t+h*V+d*G,e+u*V+p*G,t+h*H+d*$,e+u*H+p*$)}}arc(t,e,i,s,a,n){this.ellipse(t,e,i,i,0,s,a,n)}appendSvg(t){const e=RX(t);if(e==null)return!1;let i=0,s=0,a,n,o=0,r=0;for(const{command:l,params:c}of e){a??(a=c[0]),n??(n=c[1]);const h=l===l.toLowerCase(),u=h?a:0,d=h?n:0;switch(l.toLowerCase()){case"m":this.moveTo(u+c[0],d+c[1]),a=u+c[0],n=d+c[1],i=a,s=n;break;case"c":this.cubicCurveTo(u+c[0],d+c[1],u+c[2],d+c[3],u+c[4],d+c[5]),o=u+c[2],r=d+c[3],a=u+c[4],n=d+c[5];break;case"s":this.cubicCurveTo(a+a-o,n+n-r,u+c[0],d+c[1],u+c[2],d+c[3]),o=u+c[0],r=d+c[1],a=u+c[2],n=d+c[3];break;case"q":this.cubicCurveTo((u+2*c[0])/3,(d+2*c[1])/3,(2*c[0]+c[2])/3,(2*c[1]+c[3])/3,c[2],c[3]),o=c[0],r=c[1],a=c[2],n=c[3];break;case"t":this.cubicCurveTo((a+2*(a+a-o))/3,(n+2*(n+n-r))/3,(2*(a+a-o)+c[0])/3,(2*(n+n-r)+c[1])/3,c[0],c[1]),o=a+a-o,r=n+n-r,a=c[0],n=c[1];break;case"a":this.svgEllipse(a,n,c[0],c[1],c[2]*Math.PI/180,c[3],c[4],u+c[5],d+c[6]),a=u+c[5],n=d+c[6];break;case"h":this.lineTo(u+c[0],n),a=u+c[0];break;case"l":this.lineTo(u+c[0],d+c[1]),a=u+c[0],n=d+c[1];break;case"v":this.lineTo(a,d+c[0]),n=d+c[0];break;case"z":this.closePath(),a=i,n=s;break;default:throw new Error(`Could not translate command '${l}' with '${c.join(" ")}'`)}}return!0}svgEllipse(t,e,i,s,a,n,o,r,l){i=Math.abs(i),s=Math.abs(s);const c=(t-r)/2,h=(e-l)/2,u=Math.sin(a),d=Math.cos(a),p=d*c+u*h,g=-u*c+d*h,f=p/i,x=g/s;let m=f*f+x*x,b=(t+r)/2,v=(e+l)/2,M=0,D=0;m>=1?(m=Math.sqrt(m),i*=m,s*=m):(m=Math.sqrt(1/m-1),n===o&&(m=-m),M=m*i*x,D=-m*s*f,b+=d*M-u*D,v+=u*M+d*D);const L=Math.atan2((g-D)/s,(p-M)/i),C=Math.atan2((-g-D)/s,(-p-M)/i)-L,A=L+C,T=!!(1-o);this.ellipse(b,v,i,s,a,L,A,T)}clear(t){t&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(t,e){const i=this.commands,s=this.params,a=i.length,n=-1e4,o=-1e4;let r=NaN,l=NaN,c=0,h=0,u=0;for(let d=0,p=0;d<a;d++)switch(i[d]){case 0:u+=fm(r,l,c,h,n,o,t,e),c=s[p++],r=c,h=s[p++],l=h;break;case 1:u+=fm(c,h,s[p++],s[p++],n,o,t,e),c=s[p-2],h=s[p-1];break;case 2:u+=WX(c,h,s[p++],s[p++],s[p++],s[p++],s[p++],s[p++],n,o,t,e),c=s[p-2],h=s[p-1];break;case 3:u+=fm(r,l,c,h,n,o,t,e);break}return u%2===1}distanceSquared(t,e){let i=1/0;const s=this.commands,a=this.params,n=s.length;let o=NaN,r=NaN,l=0,c=0;for(let h=0,u=0;h<n;h++)switch(s[h]){case 0:l=o=a[u++],c=r=a[u++];break;case 1:{const b=l,v=c;l=a[u++],c=a[u++],i=rv(t,e,b,v,l,c,i);break}case 2:const d=l,p=c,g=a[u++],f=a[u++],x=a[u++],m=a[u++];l=a[u++],c=a[u++],i=X_(d,p,g,f,x,m,l,c,t,e)**2;break;case 3:i=rv(t,e,l,c,o,r,i);break}return i}toSVG(t=(e,i)=>({x:e,y:i})){const e=[],{commands:i,params:s}=this,a=(o,r)=>{e.push(o);for(let l=0;l<r;l+=2){const{x:c,y:h}=t(s[n++],s[n++]);e.push(c,h)}};let n=0;for(const o of i)switch(o){case 0:a("M",2);break;case 1:a("L",2);break;case 2:a("C",6);break;case 3:a("Z",0);break}return e.join(" ")}computeBBox(){const{commands:t,params:e}=this;let[i,s,a,n]=[1/0,1/0,-1/0,-1/0],[o,r]=[NaN,NaN],[l,c]=[NaN,NaN];const h=(d,p)=>{i=Math.min(p,i),s=Math.min(d,s),a=Math.max(d,a),n=Math.max(p,n),o=d,r=p};let u=0;for(const d of t)switch(d){case 0:h(e[u++],e[u++]),l=o,c=r;break;case 1:h(e[u++],e[u++]);break;case 2:{const p=o,g=r,f=e[u++],x=e[u++],m=e[u++],b=e[u++],v=e[u++],M=e[u++];Z_(p,g,f,x,m,b,v,M).forEach(L=>{const C=Op(p,f,m,v,L),A=Op(g,x,b,M,L);h(C,A)}),h(v,M);break}case 3:h(l,c),l=NaN,c=NaN;break}return new gt(s,i,a-s,n-i)}}}});function as(t,e,i){const s=Math.round(e*t)/t;return i==null?s:i===0?0:i<1?Math.ceil(i*t)/t:Math.round((i+e)*t)/t-s}function q_(t,e){return Math.floor(e*t)/t}var uv=I({"packages/ag-charts-community/src/scene/util/pixel.ts"(){"use strict"}});function cA(t,e,i){const{width:s,height:a,padding:n,strokeWidth:o}=e,r=s/2,l=a/2,c=Math.max(1,s-n-o/2),h=Math.max(1,a-n-o/2);let u=!1;for(const[d,p]of i){const g=r+(d-.5)*c,f=l+(p-.5)*h;u?t.lineTo(g,f):t.moveTo(g,f),u=!0}t.closePath()}var hA,HX=I({"packages/ag-charts-community/src/scene/pattern/patterns.ts"(){"use strict";$i(),uv(),hA={circles(t,{width:e,strokeWidth:i,padding:s}){const a=e/2,n=Math.max(1,a-s-i/2);t.arc(a,a,n,0,Math.PI*2)},squares(t,{width:e,height:i,pixelRatio:s,padding:a,strokeWidth:n}){const o=a+n/2;t.moveTo(as(s,o),as(s,o)),t.lineTo(as(s,e-o),as(s,o)),t.lineTo(as(s,e-o),as(s,i-o)),t.lineTo(as(s,o),as(s,i-o)),t.closePath()},triangles(t,e){cA(t,e,[[.5,0],[1,1],[0,1]])},diamonds(t,e){cA(t,e,[[.5,0],[1,.5],[.5,1],[0,.5]])},stars(t,{width:e,height:i,padding:s}){const n=Math.max(1,(e-s)/2),o=n/2,r=Math.PI/2;for(let l=0;l<5*2;l++){const c=l%2===0?n:o,h=l*Math.PI/5-r,u=e/2+Math.cos(h)*c,d=i/2+Math.sin(h)*c;t.lineTo(u,d)}t.closePath()},hearts(t,{width:e,height:i,padding:s}){const a=Math.max(1,e/4-s/2),n=e/2,o=i/2+a/2;t.arc(n-a,o-a,a,Hi(130),Hi(330)),t.arc(n+a,o-a,a,Hi(220),Hi(50)),t.lineTo(n,o+a),t.closePath()},crosses(t,e){cA(t,e,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},"vertical-lines"(t,{width:e,height:i,pixelRatio:s,strokeWidth:a}){const n=as(s,e/2)-a%2/2;t.moveTo(n,0),t.lineTo(n,i)},"horizontal-lines"(t,{width:e,height:i,pixelRatio:s,strokeWidth:a}){const n=as(s,i/2)-a%2/2;t.moveTo(0,n),t.lineTo(e,n)},"forward-slanted-lines"(t,{width:e,height:i,strokeWidth:s}){const a=Math.atan2(i,e),n=s*Math.cos(a),o=s*Math.sin(a);t.moveTo(-n,o),t.lineTo(n,-o),t.moveTo(-n,i+o),t.lineTo(e+n,-o),t.moveTo(e-n,i+o),t.lineTo(e+n,i-o)},"backward-slanted-lines"(t,{width:e,height:i,strokeWidth:s}){const a=Math.atan2(i,e),n=s*Math.cos(a),o=s*Math.sin(a);t.moveTo(e-n,-o),t.lineTo(e+n,o),t.moveTo(-n,-o),t.lineTo(e+n,i+o),t.moveTo(-n,i-o),t.lineTo(n,i+o)}}}}),Q_,$X=I({"packages/ag-charts-community/src/scene/pattern/pattern.ts"(){"use strict";R(),$i(),GI(),hv(),HX(),Q_=class{constructor(t){this._cache=void 0,this.width=Math.max(t?.width??10,1),this.height=Math.max(t?.height??10,1),this.fill=t.fill??"none",this.fillOpacity=t.fillOpacity??1,this.backgroundFill=t.backgroundFill??"none",this.backgroundFillOpacity=t.backgroundFillOpacity??1,this.stroke=t.stroke??"black",this.strokeOpacity=t.strokeOpacity??1,this.strokeWidth=t.strokeWidth??1,this.padding=t.padding??1,this.pattern=t.pattern??"forward-slanted-lines",this.rotation=t.rotation??0,this.scale=t.scale??1,this.path=t.path}getPath(t){const{pattern:e,width:i,height:s,padding:a,strokeWidth:n,path:o}=this,r=new yu;let l=hA[e]!=null;return o&&l&&(l=!r.appendSvg(o)),l&&hA[e](r,{width:i,height:s,pixelRatio:t,strokeWidth:n,padding:a}),r}renderStroke(t,e){const{stroke:i,strokeWidth:s,strokeOpacity:a}=this;s&&(e.strokeStyle=i,e.lineWidth=s,e.globalAlpha=a,e.stroke(t))}renderFill(t,e){const{fill:i,fillOpacity:s}=this;i!=="none"&&(e.fillStyle=i,e.globalAlpha=s,e.fill(t))}createCanvasPattern(t,e){const{width:i,height:s,scale:a,backgroundFill:n,backgroundFillOpacity:o}=this;if(i*a<1||s*a<1)return ut.warnOnce("Pattern fill is too small to render, ignoring."),null;const r=new Kb({width:i,height:s,pixelRatio:e*a}),l=r.context;n!=="none"&&(l.fillStyle=n,l.globalAlpha=o,l.fillRect(0,0,i,s));const c=this.getPath(e).getPath2D();this.renderFill(c,l),this.renderStroke(c,l);const h=t.createPattern(r.canvas,"repeat");return this.setPatternTransform(h,e),r.destroy(),h}setPatternTransform(t,e,i=0,s=0){if(t==null)return;const a=gl(this.rotation),n=1/e,o=Math.cos(a)*n,r=Math.sin(a)*n;t.setTransform(new DOMMatrix([o,r,-r,o,i,s]))}createPattern(t,e){if(this._cache!=null&&this._cache.ctx===t&&this._cache.pixelRatio===e)return this._cache.pattern;const i=this.createCanvasPattern(t,e);if(i!=null)return this._cache={ctx:t,pattern:i,pixelRatio:e},i}toSvg(){const{width:t,height:e,fill:i,fillOpacity:s,backgroundFill:a,backgroundFillOpacity:n,stroke:o,strokeWidth:r,strokeOpacity:l,rotation:c,scale:h}=this,u=fi("pattern");u.setAttribute("viewBox",`0 0 ${t} ${e}`),u.setAttribute("width",String(t)),u.setAttribute("height",String(e)),u.setAttribute("patternUnits","userSpaceOnUse");const d=fi("rect");d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width",String(t)),d.setAttribute("height",String(e)),d.setAttribute("fill",a),d.setAttribute("fill-opacity",String(n)),u.appendChild(d);const p=fi("path");return p.setAttribute("fill",i),p.setAttribute("fill-opacity",String(s)),p.setAttribute("stroke-opacity",String(l)),p.setAttribute("stroke",o),p.setAttribute("stroke-width",String(r)),p.setAttribute("transform",`rotate(${c}) scale(${h})`),p.setAttribute("d",this.getPath(1).toSVG()),u.appendChild(p),u}}}});function rn(t){return dv(t)&&t.type=="gradient"}function J_(t){return tE(t)&&t.every(e=>typeof e=="string")}function Sc(t){return t!==null&&dv(t)&&t.type=="pattern"}function xu(t){return t!==null&&dv(t)&&t.type=="image"}function UX(t){return rn(t)||Sc(t)}var tE,dv,bu=I({"packages/ag-charts-community/src/scene/util/fill.ts"(){"use strict";R(),{isArray:tE,isObject:dv}=st}}),xi,vu=I({"packages/ag-charts-community/src/scene/shape/shape.ts"(){"use strict";R(),Pt(),Fn(),E_(),R_(),OX(),V_(),EX(),Vn(),$X(),bu(),uv(),xi=class extends br{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill="black",this.strokeWidth=0,this.lineDashOffset=0,this.opacity=1}getGradient(t){if(rn(t))return this.createGradient(t)}createGradient(t){const{colorSpace:e="rgb",gradient:i="linear",colorStops:s,rotation:a=0,reverse:n=!1}=t;if(s==null)return;let o=F_(s,["black"],[0,1]);switch(n&&(o=o.map(r=>({color:r.color,stop:1-r.stop})).reverse()),i){case"linear":return new aA(e,o,a);case"radial":return new B_(e,o);case"conic":return new sA(e,o,a)}}getPattern(t){if(Sc(t))return this.createPattern(t)}createPattern(t){return new Q_(t)}getImage(t){if(xu(t))return this.createImage(t)}createImage(t){return new G_(this.imageLoader,t)}onFillChange(){typeof this.fill=="object"&&Wi(this._cachedFill??{},this.fill)||(this.fillGradient=this.getGradient(this.fill),this.fillPattern=this.getPattern(this.fill),this.fillImage=this.getImage(this.fill),this._cachedFill=this.fill)}onStrokeChange(){this.strokeGradient=this.getGradient(this.stroke)}align(t,e){return as(this.layerManager?.canvas?.pixelRatio??1,t,e)}markDirty(t){super.markDirty(t),this.cachedDefaultGradientFillBBox=void 0}fillStroke(t,e){this.renderFill(t,e),this.renderStroke(t,e)}renderFill(t,e){const{fill:i,fillImage:s}=this;if(i&&i!=="none"){const{globalAlpha:a}=t;s&&(t.globalAlpha=s.backgroundFillOpacity,t.fillStyle=s.backgroundFill,this.executeFill(t,e),t.globalAlpha=a),this.applyFillAndAlpha(t),this.applyShadow(t),this.executeFill(t,e),t.globalAlpha=a}t.shadowColor="rgba(0, 0, 0, 0)"}executeFill(t,e){e?t.fill(e):t.fill()}applyFillAndAlpha(t){const{fill:e,fillGradient:i,fillPattern:s,fillImage:a,fillOpacity:n=1,opacity:o=1}=this;if(t.globalAlpha*=o*n,i){const{fillBBox:r=this.getDefaultGradientFillBBox()??this.getBBox(),fillParams:l}=this;t.fillStyle=i.createGradient(t,r,l)??"black"}else if(s){const{x:r,y:l}=this.getBBox(),c=this.layerManager?.canvas?.pixelRatio??1,h=s.createPattern(t,c);s.setPatternTransform(h,c,r,l),h?t.fillStyle=h:(t.fillStyle=s.fill,t.globalAlpha*=s.fillOpacity)}else if(a){const r=this.getBBox(),l=a.createPattern(t,r.width,r.height,this);a.setImageTransform(l,r),t.fillStyle=l??"transparent"}else t.fillStyle=typeof e=="string"?e:"black"}applyStrokeAndAlpha(t){const{stroke:e,strokeOpacity:i=1,strokeGradient:s,opacity:a=1}=this;t.strokeStyle=s?.createGradient(t,this.getBBox())??(typeof e=="string"?e:void 0)??"black",t.globalAlpha*=a*i}applyShadow(t){const e=this.layerManager?.canvas.pixelRatio??1,i=this.fillShadow;i?.enabled&&(t.shadowColor=i.color,t.shadowOffsetX=i.xOffset*e,t.shadowOffsetY=i.yOffset*e,t.shadowBlur=i.blur*e)}renderStroke(t,e){const{stroke:i,strokeWidth:s,lineDash:a,lineDashOffset:n,lineCap:o,lineJoin:r,miterLimit:l}=this;if(i&&s){const{globalAlpha:c}=t;this.applyStrokeAndAlpha(t),t.lineWidth=s,a&&t.setLineDash(a),n&&(t.lineDashOffset=n),o&&(t.lineCap=o),r&&(t.lineJoin=r),l!=null&&(t.miterLimit=l),this.executeStroke(t,e),t.globalAlpha=c}}executeStroke(t,e){e?t.stroke(e):t.stroke()}getDefaultGradientFillBBox(){return this.cachedDefaultGradientFillBBox==null&&(this.cachedDefaultGradientFillBBox=Object.freeze(this.computeDefaultGradientFillBBox())),this.cachedDefaultGradientFillBBox}computeDefaultGradientFillBBox(){}containsPoint(t,e){return this.isPointInPath(t,e)}applySvgFillAttributes(t,e){const{fill:i,fillOpacity:s}=this;if(typeof i=="string")t.setAttribute("fill",i);else if(rn(i)&&this.fillGradient){e??(e=[]);const a=this.fillGradient.toSvg(this.fillBBox??this.getBBox()),n=Gb();a.setAttribute("id",n),e.push(a),t.setAttribute("fill",`url(#${n})`)}else if(Sc(i)&&this.fillPattern){e??(e=[]);const a=this.fillPattern.toSvg(),n=Gb();a.setAttribute("id",n),e.push(a),t.setAttribute("fill",`url(#${n})`)}else if(xu(i)&&this.fillImage){e??(e=[]);const a=this.layerManager?.canvas?.pixelRatio??1,n=this.fillImage.toSvg(this.getBBox(),a),o=Gb();n.setAttribute("id",o),e.push(n),t.setAttribute("fill",`url(#${o})`)}else t.setAttribute("fill","none");return t.setAttribute("fill-opacity",String(s)),e}applySvgStrokeAttributes(t){const{stroke:e,strokeOpacity:i,strokeWidth:s,lineDash:a,lineDashOffset:n}=this;if(e!=null&&(t.setAttribute("stroke",typeof e=="string"?e:"none"),t.setAttribute("stroke-opacity",String(i)),t.setAttribute("stroke-width",String(s))),a?.some(o=>o!==0)===!0){const o=a.length%2===1?[...a,...a]:a;t.setAttribute("stroke-dasharray",o.join(" ")),t.setAttribute("stroke-dashoffset",String(n))}}},S([lt()],xi.prototype,"fillOpacity",2),S([lt()],xi.prototype,"strokeOpacity",2),S([nn({equals:Wi,changeCb:t=>t.onFillChange()})],xi.prototype,"fill",2),S([nn({equals:Wi,changeCb:t=>t.onStrokeChange()})],xi.prototype,"stroke",2),S([lt()],xi.prototype,"strokeWidth",2),S([ZI()],xi.prototype,"lineDash",2),S([lt()],xi.prototype,"lineDashOffset",2),S([lt()],xi.prototype,"lineCap",2),S([lt()],xi.prototype,"lineJoin",2),S([lt()],xi.prototype,"miterLimit",2),S([lt({convertor:t=>Et(0,t??1,1)})],xi.prototype,"opacity",2),S([nn({equals:pu,checkDirtyOnAssignment:!0})],xi.prototype,"fillShadow",2),S([nn({equals:Bb,changeCb:t=>t.onFillChange()})],xi.prototype,"fillBBox",2),S([nn({equals:Wi,changeCb:t=>t.onFillChange()})],xi.prototype,"fillParams",2)}}),uA,vr,eE=I({"packages/ag-charts-community/src/scene/matrix.ts"(){"use strict";R(),Wt(),uA=[1,0,0,1,0,0],vr=class nI{get e(){return[...this.elements]}constructor(e=uA){this.elements=[...e]}setElements(e){const i=this.elements;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],this}get identity(){const e=this.elements;return sn(e[0],1)&&sn(e[1],0)&&sn(e[2],0)&&sn(e[3],1)&&sn(e[4],0)&&sn(e[5],0)}AxB(e,i,s){const a=e[0]*i[0]+e[2]*i[1],n=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],l=e[0]*i[4]+e[2]*i[5]+e[4],c=e[1]*i[4]+e[3]*i[5]+e[5];s=s??e,s[0]=a,s[1]=n,s[2]=o,s[3]=r,s[4]=l,s[5]=c}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(e){const i=new Array(6);return e instanceof nI?this.AxB(this.elements,e.elements,i):this.AxB(this.elements,[e.a,e.b,e.c,e.d,e.e,e.f],i),new nI(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const e=this.elements;let i=e[0],s=e[1],a=e[2],n=e[3];const o=e[4],r=e[5],l=1/(i*n-s*a);return i*=l,s*=l,a*=l,n*=l,new nI([n,-s,-a,i,a*r-n*o,s*o-i*r])}invertSelf(){const e=this.elements;let i=e[0],s=e[1],a=e[2],n=e[3];const o=e[4],r=e[5],l=1/(i*n-s*a);return i*=l,s*=l,a*=l,n*=l,e[0]=n,e[1]=-s,e[2]=-a,e[3]=i,e[4]=a*r-n*o,e[5]=s*o-i*r,this}transformPoint(e,i){const s=this.elements;return{x:e*s[0]+i*s[2]+s[4],y:e*s[1]+i*s[3]+s[5]}}transformBBox(e,i){const s=this.elements,a=s[0],n=s[1],o=s[2],r=s[3],l=e.width*.5,c=e.height*.5,h=e.x+l,u=e.y+c,d=Math.abs(l*a)+Math.abs(c*o),p=Math.abs(l*n)+Math.abs(c*r);return i??(i=new gt(0,0,0,0)),i.x=h*a+u*o+s[4]-d,i.y=h*n+u*r+s[5]-p,i.width=d+d,i.height=p+p,i}toContext(e){if(this.identity)return;const i=this.elements;e.transform(i[0],i[1],i[2],i[3],i[4],i[5])}static updateTransformMatrix(e,i,s,a,n,o,r){const l=i,c=s;let h,u;l===1&&c===1?(h=0,u=0):(h=r?.scalingCenterX??0,u=r?.scalingCenterY??0);const d=a,p=Math.cos(d),g=Math.sin(d);let f,x;d===0?(f=0,x=0):(f=r?.rotationCenterX??0,x=r?.rotationCenterY??0);const m=n,b=o,v=h*(1-l)-f,M=u*(1-c)-x;return e.setElements([p*l,g*l,-g*c,p*c,p*v-g*M+f+m,g*v+p*M+x+b]),e}}}});function Mc(t){return iE(t.constructor)}function iE(t){return t[gA]===!0}function dA(t){var e,i;const s=t;if(iE(t))return t;const a=Symbol("matrix_combined_transform");class n extends s{constructor(){super(...arguments),this[i]=new vr,this._dirtyTransform=!0}onChangeDetection(r){super.onChangeDetection(r),this._dirtyTransform=!0,!(this.batchLevel>0)&&this.markDirty("transform")}updateMatrix(r){}computeTransformMatrix(){this._dirtyTransform&&(this[a].setElements(uA),this.updateMatrix(this[a]),this._dirtyTransform=!1)}toParent(r){return this.computeTransformMatrix(),this[a].identity?r.clone():this[a].transformBBox(r)}toParentPoint(r,l){return this.computeTransformMatrix(),this[a].identity?{x:r,y:l}:this[a].transformPoint(r,l)}fromParent(r){return this.computeTransformMatrix(),this[a].identity?r.clone():this[a].inverse().transformBBox(r)}fromParentPoint(r,l){return this.computeTransformMatrix(),this[a].identity?{x:r,y:l}:this[a].inverse().transformPoint(r,l)}computeBBox(){const r=super.computeBBox();return r&&this.toParent(r)}computeBBoxWithoutTransforms(){return super.computeBBox()}pickNode(r,l){return{x:r,y:l}=this.fromParentPoint(r,l),super.pickNode(r,l)}pickNodes(r,l,c){return{x:r,y:l}=this.fromParentPoint(r,l),super.pickNodes(r,l,c)}render(r){this.computeTransformMatrix();const{ctx:l}=r,c=this[a];let h=!1;try{c.identity||(l.save(),h=!0,c.toContext(l)),super.render(r)}finally{h&&l.restore()}}toSVG(){this.computeTransformMatrix();const r=super.toSVG(),l=this[a];if(l.identity||r==null)return r;const c=fi("g");c.append(...r.elements);const[h,u,d,p,g,f]=l.e;return c.setAttribute("transform",`matrix(${h} ${u} ${d} ${p} ${g} ${f})`),{elements:[c],defs:r.defs}}}return e=gA,i=a,n[e]=!0,n}function Pp(t){var e;const i=t,s=Symbol("matrix_rotation");class a extends dA(i){constructor(){super(...arguments),this[e]=new vr,this.rotationCenterX=0,this.rotationCenterY=0,this.rotation=0}updateMatrix(o){super.updateMatrix(o);const{rotation:r,rotationCenterX:l,rotationCenterY:c}=this;r!==0&&(vr.updateTransformMatrix(this[s],1,1,r,0,0,{rotationCenterX:l,rotationCenterY:c}),o.multiplySelf(this[s]))}}return e=s,S([lt()],a.prototype,"rotationCenterX",2),S([lt()],a.prototype,"rotationCenterY",2),S([lt()],a.prototype,"rotation",2),a}function pA(t){var e;const i=t,s=Symbol("matrix_scale");class a extends dA(i){constructor(){super(...arguments),this[e]=new vr,this.scalingX=1,this.scalingY=1,this.scalingCenterX=0,this.scalingCenterY=0}updateMatrix(o){super.updateMatrix(o);const{scalingX:r,scalingY:l,scalingCenterX:c,scalingCenterY:h}=this;r===1&&l===1||(vr.updateTransformMatrix(this[s],r,l,0,0,0,{scalingCenterX:c,scalingCenterY:h}),o.multiplySelf(this[s]))}}return e=s,S([lt()],a.prototype,"scalingX",2),S([lt()],a.prototype,"scalingY",2),S([lt()],a.prototype,"scalingCenterX",2),S([lt()],a.prototype,"scalingCenterY",2),a}function Su(t){var e;const i=t,s=Symbol("matrix_translation");class a extends dA(i){constructor(){super(...arguments),this[e]=new vr,this.translationX=0,this.translationY=0}updateMatrix(o){super.updateMatrix(o);const{translationX:r,translationY:l}=this;r===0&&l===0||(vr.updateTransformMatrix(this[s],1,1,0,r,l),o.multiplySelf(this[s]))}}return e=s,S([lt()],a.prototype,"translationX",2),S([lt()],a.prototype,"translationY",2),a}var gA,He,ns=I({"packages/ag-charts-community/src/scene/transformable.ts"(){"use strict";R(),eE(),Vn(),gA=Symbol("isMatrixTransform"),He=class{static fromCanvas(t,e){const i=[];for(const s of t.traverseUp())Mc(s)&&i.unshift(s);for(const s of i)e=s.fromParent(e);return Mc(t)&&(e=t.fromParent(e)),e}static toCanvas(t,e){e==null?e=t.getBBox():Mc(t)&&(e=t.toParent(e));for(const i of t.traverseUp())Mc(i)&&(e=i.toParent(e));return e}static fromCanvasPoint(t,e,i){const s=[];for(const a of t.traverseUp())Mc(a)&&s.unshift(a);for(const a of s)({x:e,y:i}=a.fromParentPoint(e,i));return Mc(t)&&({x:e,y:i}=t.fromParentPoint(e,i)),{x:e,y:i}}static toCanvasPoint(t,e,i){Mc(t)&&({x:e,y:i}=t.toParentPoint(e,i));for(const s of t.traverseUp())Mc(s)&&({x:e,y:i}=s.toParentPoint(e,i));return{x:e,y:i}}}}}),ym,pv,Lt,sE,aE,vs,Mu,Oe=I({"packages/ag-charts-community/src/scene/group.ts"(){"use strict";R(),Wt(),GI(),Vn(),vu(),ns(),uv(),N_(),pv=class fb extends br{constructor(e){super(e),this.childNodes=new Set,this.dirty=!1,this.dirtyZIndex=!1,this.clipRect=void 0,this.opacity=1,this.renderToOffscreenCanvas=!1,this.optimizeForInfrequentRedraws=!1,this.layer=void 0,this.image=void 0,this._lastWidth=NaN,this._lastHeight=NaN,this._lastDevicePixelRatio=NaN,this.isContainerNode=!0,this.renderToOffscreenCanvas=e?.renderToOffscreenCanvas===!0}static is(e){return e instanceof fb}static computeChildrenBBox(e,i=!0){return gt.merge(br.extractBBoxes(e,i))}static compareChildren(e,i){return T_(e.zIndex,i.zIndex)||e.serialNumber-i.serialNumber}containsPoint(e,i){return!0}computeBBox(){return fb.computeChildrenBBox(this.children())}computeSafeClippingBBox(e){const i=this.computeBBox();if(i?.isFinite()!==!0)return;let s=0;const a=4;for(const d of this.descendants())d instanceof xi&&(s=Math.max(s,d.strokeWidth));const n=Math.max(1,s/2*a),{x:o,y:r}=He.toCanvasPoint(this,0,0),l=q_(e,o+i.x-n)-o,c=q_(e,r+i.y-n)-r,h=Math.ceil(i.x+i.width-l+n),u=Math.ceil(i.y+i.height-c+n);return new gt(l,c,h,u)}prepareSharedCanvas(e,i,s){return ym==null||ym.pixelRatio!==s?ym=new Kb({width:e,height:i,pixelRatio:s}):ym.resize(e,i,s),ym}setScene(e){super.setScene(e),this.layer&&(this.scene?.layersManager.removeLayer(this.layer),this.layer=void 0);for(const i of this.children())i.setScene(e)}markDirty(e){this.dirty=!0,super.markDirty(e)}markDirtyChildrenOrder(){super.markDirtyChildrenOrder(),this.dirtyZIndex=!0,this.markDirty()}append(e){for(const i of i_(e))i.parentNode?.removeChild(i),this.childNodes.add(i),i.parentNode=this,i.setScene(this.scene);this.markDirtyChildrenOrder(),this.markDirty()}appendChild(e){return this.append(e),e}removeChild(e){if(!this.childNodes?.delete(e))throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`);e.parentNode=void 0,e.setScene(),this.markDirtyChildrenOrder(),this.markDirty()}clear(){for(const e of this.children())delete e.parentNode,e.setScene();this.childNodes?.clear(),this.markDirty()}pickNode(e,i){if(!(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))){if(this.childNodes!=null&&this.childNodes.size!==0){const s=[...this.children()];for(let a=s.length-1;a>=0;a--){const o=s[a].pickNode(e,i);if(o!=null)return o}}else if(!this.isContainerNode)return this}}pickNodes(e,i,s=[]){if(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))return s;this.isContainerNode||s.push(this);for(const a of this.children())a.pickNodes(e,i,s);return s}isDirty(e){const{width:i,height:s,devicePixelRatio:a}=e,{dirty:n,layer:o}=this,r=o!=null&&(this._lastWidth!==i||this._lastHeight!==s),l=this._lastDevicePixelRatio!==a;return this._lastWidth=i,this._lastHeight=s,this._lastDevicePixelRatio=a,n||r||l}preRender(e){let i;if(this.dirty){i=super.preRender(e,0);for(const s of this.children()){const a=s.preRender(e);i.groups+=a.groups,i.nonGroups+=a.nonGroups,i.complexity+=a.complexity}i.groups+=1,i.nonGroups-=1}else i=this.childNodeCounts;return this.renderToOffscreenCanvas&&!this.optimizeForInfrequentRedraws&&i.nonGroups>0&&this.getVisibility()?this.layer??(this.layer=this.layerManager?.addLayer({name:this.name})):this.layer!=null&&(this.layerManager?.removeLayer(this.layer),this.layer=void 0),i}render(e){const{layer:i,renderToOffscreenCanvas:s}=this,a={...e},n=this.isDirty(e);if(this.dirty=!1,!s){this.renderInContext(a),super.render(a);return}const{ctx:o,stats:r,devicePixelRatio:l}=e;let{image:c}=this;if(n){c?.bitmap.close(),c=void 0;const u=i?void 0:this.computeSafeClippingBBox(l),d=(p,...g)=>{const f=p.context;a.ctx=f,p.clear(),f.save();try{f.setTransform(...g),f.globalAlpha=1,this.renderInContext(a)}finally{f.restore(),f.verifyDepthZero?.()}};if(i)d(i,o.getTransform());else if(u){const{x:p,y:g,width:f,height:x}=u,m=this.prepareSharedCanvas(f,x,l);d(m,l,0,0,l,-p*l,-g*l),c={bitmap:m.transferToImageBitmap(),x:p,y:g,width:f,height:x}}this.image=c,r&&r.layersRendered++}else r&&r.layersSkipped++;const{globalAlpha:h}=o;if(o.globalAlpha=h*this.opacity,i){o.save();try{o.resetTransform(),i.drawImage(o)}finally{o.restore()}}else if(c){const{bitmap:u,x:d,y:p,width:g,height:f}=c;o.drawImage(u,0,0,g*l,f*l,d,p,g,f)}o.globalAlpha=h,super.render(a)}applyClip(e,i){const{x:s,y:a,width:n,height:o}=i;e.beginPath(),e.rect(s,a,n,o),e.clip()}renderInContext(e){const{ctx:i,stats:s}=e;this.dirtyZIndex&&(this.sortChildren(fb.compareChildren),this.dirtyZIndex=!1),i.save();try{i.globalAlpha*=this.opacity,this.clipRect!=null&&(this.applyClip(i,this.clipRect),e.clipBBox=He.toCanvas(this,this.clipRect));for(const a of this.children()){if(!a.visible){s&&(s.nodesSkipped+=a.childNodeCounts.nonGroups+a.childNodeCounts.groups,s.opsSkipped+=a.childNodeCounts.complexity);continue}a.isolatedRender(e)}}finally{i.restore()}}sortChildren(e){if(!this.childNodes)return;const i=[...this.childNodes].sort(e);this.childNodes.clear();for(const s of i)this.childNodes.add(s)}*children(){yield*this.childNodes}*descendants(){for(const e of this.children())yield e,e instanceof fb&&(yield*e.descendants())}setClipRect(e){this.clipRect=e?He.fromCanvas(this,e):void 0}setClipRectCanvasSpace(e){this.clipRect=e}getVisibility(){for(const e of this.traverseUp(!0))if(!e.visible)return!1;return!0}toSVG(){if(!this.visible)return;const e=[],i=[];for(const s of this.children()){const a=s.toSVG();a!=null&&(i.push(...a.elements),a.defs!=null&&e.push(...a.defs))}return{elements:i,defs:e}}},pv.className="Group",S([lt({convertor:t=>Et(0,t,1)})],pv.prototype,"opacity",2),Lt=pv,sE=class extends pA(Lt){},aE=class extends Pp(Lt){},vs=class extends Su(Lt){},Mu=class extends Pp(Su(Lt)){}}});function KX(t,e){return"context"in t}function nE(t,e){return t!=null&&KX(t,e)&&e[0]!=null&&typeof e[0]=="object"&&e[0].context===void 0?(e[0].context=t.context,!0):!1}function fl(t,e,...i){if(Array.isArray(t)){for(const s of t)if(nE(s,i))break}else nE(t,i);return e(...i)}var fA,Du=I({"packages/ag-charts-community/src/util/callbackCache.ts"(){"use strict";R(),fA=class{constructor(){this.cache=new WeakMap}call(t,e,...i){let s,a=this.cache.get(e);try{s=JSON.stringify(i)}catch{return this.invoke(t,e,a,void 0,...i)}return a==null&&(a=new Map,this.cache.set(e,a)),a.has(s)?a.get(s):this.invoke(t,e,a,s,...i)}invoke(t,e,i,s,...a){try{const n=fl(t,e,...a);return i&&s!=null&&i.set(s,n),n}catch(n){ut.warnOnce("User callback errored, ignoring",n);return}}invalidateCache(){this.cache=new WeakMap}}}});function gv(t,e){if(!t)return;const{x:i,y:s,width:a,height:n}=ZX(e);mv(t.style,"width",a),mv(t.style,"height",n),mv(t.style,"left",i),mv(t.style,"top",s)}function oE(t){const e=parseFloat(t.style.width)||t.offsetWidth,i=parseFloat(t.style.height)||t.offsetHeight,s=parseFloat(t.style.left)||t.offsetLeft,a=parseFloat(t.style.top)||t.offsetTop;return{x:s,y:a,width:e,height:i}}function YX(t){if(t.focus({preventScroll:!0}),t.lastChild?.textContent==null)return;const e=wo().createRange();e.setStart(t.lastChild,t.lastChild.textContent.length),e.setEnd(t.lastChild,t.lastChild.textContent.length);const i=de().getSelection();i?.removeAllRanges(),i?.addRange(e)}function rE(){const t=de("navigator");if("scheduling"in t){const e=t.scheduling;if("isInputPending"in e)return e.isInputPending({includeContinuous:!0})}return!1}function fv(t){return`ag-charts-icon ag-charts-icon-${t}`}function ZX(t){let{x:e,y:i,width:s,height:a}=t;return(s==null||s>0)&&(a==null||a>0)?t:(e!=null&&s!=null&&s<0&&(s=-s,e=e-s),i!=null&&a!=null&&a<0&&(a=-a,i=i-a),{x:e,y:i,width:s,height:a})}function mv(t,e,i){i==null?t.removeProperty(e):t.setProperty(e,`${i}px`)}var ku=I({"packages/ag-charts-community/src/util/dom.ts"(){"use strict";R()}});function Sr(t,e,i){if(Iu(e)){if(!Iu(t)||t.length!==e.length||e.some((s,a)=>Sr(t[a],s,i)!=null))return e}else if(Au(e)){if(!Au(t))return e;const s={},a=new Set([...Object.keys(t),...Object.keys(e)]);for(const n of a)if(t[n]!==e[n])if(i?.has(n))s[n]=e[n];else if(typeof t[n]==typeof e[n]){const o=Sr(t[n],e[n],i);o!==null&&(s[n]=o)}else s[n]=e[n];return Object.keys(s).length?s:null}else if(t!==e)return e;return null}function lE(t,e){for(const i of Object.keys(t))if(t[i]!==e?.[i])return!1;return!0}function $e(t,e){return Iu(t)?XX(t,e):Au(t)?qX(t,e):t instanceof Map?new Map($e(Array.from(t))):mA(t)}function XX(t,e){const i=[],s=e?.seen;for(const a of t){if(typeof a=="object"&&s?.includes(a)){_p.warn("cycle detected in array",a);continue}s?.push(a),i.push($e(a,e)),s?.pop()}return i}function qX(t,e){const i={};for(const s of Object.keys(t))e?.assign?.has(s)?i[s]=t[s]:e?.shallow?.has(s)?i[s]=mA(t[s]):i[s]=$e(t[s],e);return i}function mA(t){return Iu(t)?t.slice(0):Au(t)?{...t}:xA(t)?new Date(t):dE(t)?new RegExp(t.source,t.flags):t}function Dc(t,e,i,s,a,n){if(Iu(t)){n=e(t,s,a,n);let o=0;for(const r of t)n=Dc(r,e,i,s?.[o],a,n),o++}else if(Au(t)){n=e(t,s,a,n);for(const o of Object.keys(t)){if(i?.has(o))continue;const r=t[o];n=Dc(r,e,i,s?.[o],a,n)}}return n}function xm(t,e,i={}){const{path:s,matcherPath:a=s?.replace(/(\[[0-9+]+])/i,"[]"),skip:n=[]}=i;if(t==null)throw new Error(`AG Charts - target is uninitialised: ${s??"<root>"}`);if(e==null)return t;if(Tp(t))return t.set(e);const o=t,r=yA(t);for(const l of Object.keys(e)){if(qb.has(l))continue;const c=`${a?a+".":""}${l}`;if(n.includes(c))continue;const h=e[l],u=`${s?s+".":""}${l}`,d=o.constructor,p=o[l];try{const g=yA(p),f=yA(h);if(r===yv&&!(l in t||l==="context")){if(h===void 0)continue;_p.warn(`unable to set [${u}] in ${d?.name} - property is unknown`);continue}if(g!=null&&f!=null&&f!==g&&(g!==yv||f!=="object")){_p.warn(`unable to set [${u}] in ${d?.name} - can't apply type of [${f}], allowed types are: [${g}]`);continue}if(Tp(p))o[l].set(h);else if(f==="object"&&l!=="context"){if(!(l in o)){_p.warn(`unable to set [${u}] in ${d?.name} - property is unknown`);continue}p==null?o[l]=h:xm(p,h,{...i,path:u,matcherPath:c})}else o[l]=h}catch(g){_p.warn(`unable to set [${u}] in [${d?.name}]; nested error is: ${g.message}`)}}return t}function yA(t){return t==null?null:hE(t)||xA(t)?"primitive":Iu(t)?"array":uE(t)?Au(t)?"object":yv:cE(t)?"function":"primitive"}var _p,Iu,xA,cE,hE,uE,Au,dE,yv,Ta=I({"packages/ag-charts-community/src/util/json.ts"(){"use strict";R(),Pt(),vt(),{Logger:_p,isArray:Iu,isDate:xA,isFunction:cE,isHtmlElement:hE,isObject:uE,isPlainObject:Au,isRegExp:dE}=st,yv="class-instance"}}),pE,QX=I({"packages/ag-charts-community/src/util/mutex.ts"(){"use strict";R(),pE=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(t){return new Promise(e=>{this.acquireQueue.push([t,e]),this.available&&this.dispatchNext().catch(i=>ut.errorOnce(i))})}async acquireImmediately(t){return this.available?(await this.acquire(t),!0):!1}async waitForClearAcquireQueue(){return this.acquire(()=>Promise.resolve(void 0))}async dispatchNext(){this.available=!1;let[t,e]=this.acquireQueue.shift()??[];for(;t;){try{await t(),e?.()}catch(i){ut.error("mutex callback error",i),e?.()}[t,e]=this.acquireQueue.shift()??[]}this.available=!0}}}}),bA,gE=I({"packages/ag-charts-community/src/util/observable.ts"(){"use strict";bA=class{constructor(){this.eventListeners=new Map}addEventListener(t,e){if(typeof e!="function")throw new Error("AG Charts - listener must be a Function");const i=this.eventListeners.get(t);i?i.add(e):this.eventListeners.set(t,new Set([e]))}removeEventListener(t,e){const i=this.eventListeners.get(t);i!=null&&(i.delete(e),i.size===0&&this.eventListeners.delete(t))}hasEventListener(t){return this.eventListeners.has(t)}clearEventListeners(){this.eventListeners.clear()}fireEvent(t){this.eventListeners.get(t.type)?.forEach(e=>e(t))}}}}),ml,vA=I({"packages/ag-charts-community/src/util/padding.ts"(){"use strict";vt(),vt(),ml=class extends Nt{constructor(t=0,e=t,i=t,s=e){super(),this.top=t,this.right=e,this.bottom=i,this.left=s}},S([k],ml.prototype,"top",2),S([k],ml.prototype,"right",2),S([k],ml.prototype,"bottom",2),S([k],ml.prototype,"left",2)}});function ge(t,e){const i=ss(t)?t:t.split(".");if(i.length===1){const[s]=i;return uu((a,n,o)=>a[s]=o,a=>a[s],e)}return uu((s,a,n)=>UI(s,i,n),s=>$I(s,i),e)}function JX(t){return uu((e,i,s)=>e[t]=s)}function os(t,e){return uu((i,s,a)=>i[t][e??s]=a)}function Na(t){const{newValue:e,oldValue:i,changeValue:s}=t;return uu((a,n,o,r)=>(o!==r&&(r!==void 0&&i?.call(a,r),o!==void 0&&e?.call(a,o),s?.call(a,o,r)),o))}function kc(t){return k_(t)}var ta=I({"packages/ag-charts-community/src/util/proxy.ts"(){"use strict";R(),Ap(),Pt()}});function t6(t){return fE((e,i)=>de().requestAnimationFrame(e),t)}function e6(t){return fE((e,i=0)=>{i===0?queueMicrotask(e):setTimeout(e,i)},t)}function fE(t,e){let i=0,s=!1,a,n;const o=()=>s,r=()=>{s=!1,n?.(),n=void 0,a=void 0,i>0&&t(l)},l=()=>{const c=i;i=0,s=!0;const h=e({count:c});if(!h){r();return}h.then(r,r)};return{schedule(c){i===0&&!o()&&t(l,c),i++},async await(){if(o())for(a==null&&(a=new Promise(c=>{n=c}));o();)await a}}}var mE=I({"packages/ag-charts-community/src/util/render.ts"(){"use strict";R()}});function Ep(t,e,i){const{offsetX:s,offsetY:a,clientX:n,clientY:o}=e,{currentX:r,currentY:l}=Mr.calcCurrentXY(i,e);return{type:t,device:"mouse",offsetX:s,offsetY:a,clientX:n,clientY:o,currentX:r,currentY:l,sourceEvent:e}}function xv(t,e,i){return{type:t,sourceEvent:e}}var bv,yE,Mr,vv=I({"packages/ag-charts-community/src/widget/widgetEvents.ts"(){"use strict";bv=["blur","change","contextmenu","focus","keydown","keyup","click","dblclick","mouseenter","mousemove","mouseleave","wheel","touchstart","touchmove","touchend","touchcancel"],yE={blur:t=>({type:"blur",sourceEvent:t}),change:t=>({type:"change",sourceEvent:t}),contextmenu:(t,e)=>Ep("contextmenu",t,e),focus:t=>({type:"focus",sourceEvent:t}),keydown:t=>({type:"keydown",sourceEvent:t}),keyup:t=>({type:"keyup",sourceEvent:t}),click:(t,e)=>Ep("click",t,e),dblclick:(t,e)=>Ep("dblclick",t,e),mouseenter:(t,e)=>Ep("mouseenter",t,e),mousemove:(t,e)=>Ep("mousemove",t,e),mouseleave:(t,e)=>Ep("mouseleave",t,e),wheel:t=>{const{offsetX:e,offsetY:i,clientX:s,clientY:a}=t,n=t.deltaMode===0?.01:1,o=t.deltaX*n,r=t.deltaY*n;return{type:"wheel",offsetX:e,offsetY:i,clientX:s,clientY:a,deltaX:o,deltaY:r,sourceEvent:t}},touchstart:(t,e)=>xv("touchstart",t,e),touchmove:(t,e)=>xv("touchmove",t,e),touchend:(t,e)=>xv("touchend",t,e),touchcancel:(t,e)=>xv("touchcancel",t,e)},Mr=class{static alloc(t,e,i){return yE[t](e,i)}static isHTMLEvent(t){return bv.includes(t)}static calcCurrentXY(t,e){const i=t.getBoundingClientRect();return{currentX:e.clientX-i.x,currentY:e.clientY-i.y}}}}}),xE,i6=I({"packages/ag-charts-community/src/widget/widgetListenerHTML.ts"(){"use strict";R(),vv(),xE=class{constructor(){this.widgetListeners={},this.sourceListeners={}}initSourceHandler(t,e){this.sourceListeners??(this.sourceListeners={}),this.sourceListeners[t]=e}lazyGetWidgetListeners(t,e){var i;if(!(t in(this.sourceListeners??{}))){const s=n=>{const o=Mr.alloc(t,n,e.getElement());this.dispatch(t,e,o)},a={};t.startsWith("touch")&&(a.passive=!1),this.initSourceHandler(t,s),e.getElement().addEventListener(t,s,a)}return this.widgetListeners??(this.widgetListeners={}),(i=this.widgetListeners)[t]??(i[t]=[]),this.widgetListeners[t]}add(t,e,i){this.lazyGetWidgetListeners(t,e).push(i)}remove(t,e,i){const s=this.lazyGetWidgetListeners(t,e),a=s.indexOf(i);a>-1&&s.splice(a,1)}destroy(t){if(this.widgetListeners=void 0,this.sourceListeners){for(const[e,i]of Oo(this.sourceListeners))t.getElement().removeEventListener(e,i);this.sourceListeners=void 0}}dispatch(t,e,i){for(const s of this.widgetListeners?.[t]??[])s(i,e)}}}});function s6(t,e,i,s){if(t.globalMouseDragCallbacks==null)return new bE(t,e,i,s)}var bE,a6=I({"packages/ag-charts-community/src/widget/mouseDragger.ts"(){"use strict";R(),bE=class{constructor(t,e,i,s){this.glob=t,this.self=e,this.window=de(),this.cleanup=new Fe,this.mousegeneral=l=>{l.stopPropagation(),l.stopImmediatePropagation()},this.mousemove=l=>{l.stopPropagation(),l.stopImmediatePropagation(),this.glob.globalMouseDragCallbacks?.mousemove(l)},this.mouseup=l=>{l.button===0&&(l.stopPropagation(),l.stopImmediatePropagation(),this.glob.globalMouseDragCallbacks?.mouseup(l),this.destroy())};const{window:a,mousegeneral:n,mousemove:o,mouseup:r}=this;this.cleanup.register(fe(a,"mousedown",n,{capture:!0}),fe(a,"mouseenter",n,{capture:!0}),fe(a,"mouseleave",n,{capture:!0}),fe(a,"mouseout",n,{capture:!0}),fe(a,"mouseover",n,{capture:!0}),fe(a,"mousemove",o,{capture:!0}),fe(a,"mouseup",r,{capture:!0})),e.mouseDragger=this,t.globalMouseDragCallbacks=i,t.globalMouseDragCallbacks.mousedown(s),s.stopPropagation(),s.stopImmediatePropagation()}destroy(){this.cleanup.flush(),this.glob.globalMouseDragCallbacks=void 0,this.self.mouseDragger=void 0}}}});function n6(t,e){const i=t.clientX-e.clientX,s=t.clientY-e.clientY;return i*i+s*s}function o6(t,e,i,s,a){if(!(t.globalTouchDragCallbacks!=null||Sv))return new ME(t,e,i,s,a)}var vE,SE,Sv,ME,r6=I({"packages/ag-charts-community/src/widget/touchDragger.ts"(){"use strict";R(),vE=500,SE=100,Sv=!1,ME=class{constructor(t,e,i,s,a){this.glob=t,this.self=e,this.initialTouch=s,this.target=a,this.cleanup=new Fe,this.longTapInterrupted=!1,this.longtap=()=>{const{target:r,initialTouch:l}=this;if(!this.longTapInterrupted){const c=new Fe;r.dispatchEvent(new TouchEvent("touchcancel",{touches:[l],bubbles:!0})),Sv=!0;const h=f=>f.preventDefault(),u=f=>{Sv=!1,f.preventDefault(),c.flush()};c.register(fe(r,"touchmove",h,{passive:!1}),fe(r,"touchend",u,{passive:!1}),fe(r,"touchcancel",u,{passive:!1}));const{clientX:d,clientY:p}=l,g=new PointerEvent("contextmenu",{bubbles:!0,cancelable:!0,view:de(),clientX:d,clientY:p,pointerType:"touch"});r.dispatchEvent(g)}},this.touchmove=r=>{const{glob:l,self:c,initialTouch:h}=this,u=this.findInitialFinger(r.targetTouches);u!=null&&(this.longTapInterrupted=this.longTapInterrupted||n6(h,u)>SE,c.dragTouchEnabled&&l.globalTouchDragCallbacks?.touchmove(r,u))},this.touchend=r=>{this.longTapInterrupted=!0;const l=this.findInitialFinger(r.changedTouches,r.touches);l!=null&&this.glob.globalTouchDragCallbacks?.touchend(r,l),this.destroy()},this.longtapTimer=setTimeout(this.longtap,vE);const{touchmove:n,touchend:o}=this;this.cleanup.register(fe(a,"touchmove",n,{passive:!1}),fe(a,"touchstart",o,{passive:!1}),fe(a,"touchend",o,{passive:!1}),fe(a,"touchcancel",o,{passive:!1})),e.touchDragger=this,t.globalTouchDragCallbacks=i}destroy(){clearTimeout(this.longtapTimer),this.cleanup.flush(),this.glob.globalTouchDragCallbacks=void 0,this.self.touchDragger=void 0}findInitialFinger(...t){const e=t.map(i=>Array.from(i)).flat();return Array.from(e).find(i=>i.identifier===this.initialTouch.identifier)}}}});function SA(t,e,i,s){const{currentX:a,currentY:n}=Mr.calcCurrentXY(t.getElement(),s),o=s.pageX-i.pageX,r=s.pageY-i.pageY;return{type:e,device:"mouse",offsetX:i.offsetX+o,offsetY:i.offsetY+r,clientX:s.clientX,clientY:s.clientY,currentX:a,currentY:n,originDeltaX:o,originDeltaY:r,sourceEvent:s}}function l6(t,{pageX:e,pageY:i}){const{x:s,y:a}=t.getElement().getBoundingClientRect();return{offsetX:e-s,offsetY:i-a}}function MA(t,e,i,s,a){const{currentX:n,currentY:o}=Mr.calcCurrentXY(t.getElement(),a),r=a.pageX-i.pageX,l=a.pageY-i.pageY;return{type:e,device:"touch",offsetX:i.offsetX+r,offsetY:i.offsetY+l,clientX:a.clientX,clientY:a.clientY,currentX:n,currentY:o,originDeltaX:r,originDeltaY:l,sourceEvent:s}}var DA,kA,c6=I({"packages/ag-charts-community/src/widget/widgetListenerInternal.ts"(){"use strict";R(),Pt(),a6(),r6(),vv(),DA={},kA=class{constructor(t){this.dispatchCallback=t,this.dragTouchEnabled=!0}destroy(){this.dragTriggerRemover?.(),this.dragTriggerRemover=void 0,this.listeners?.clear(),this.mouseDragger?.destroy(),this.touchDragger?.destroy()}getListenerSet(t){this.listeners??(this.listeners=new Map);let e=this.listeners.get(t);return e===void 0&&(e=new Set,this.listeners.set(t,e)),e}add(t,e,i){switch(this.getListenerSet(t).add(i),t){case"drag-start":case"drag-move":case"drag-end":{this.registerDragTrigger(e);break}}}remove(t,e,i){this.getListenerSet(t).delete(i)}registerDragTrigger(t){if(this.dragTriggerRemover==null){const e=t.getElement(),i=new Fe;i.register(fe(e,"mousedown",s=>this.triggerMouseDrag(t,s)),fe(e,"touchstart",s=>this.triggerTouchDrag(t,s),{passive:!1})),this.dragTriggerRemover=()=>i.flush()}}triggerMouseDrag(t,e){e.button===0&&this.startMouseDrag(t,e)}startMouseDrag(t,e){const i={pageX:NaN,pageY:NaN,offsetX:NaN,offsetY:NaN};KI(["pageX","pageY","offsetX","offsetY"],i,e);const s={mousedown:a=>{const n=SA(t,"drag-start",i,a);this.dispatch("drag-start",t,n)},mousemove:a=>{const n=SA(t,"drag-move",i,a);this.dispatch("drag-move",t,n)},mouseup:a=>{const n=SA(t,"drag-end",i,a);this.dispatch("drag-end",t,n),this.endDrag(t,n)}};this.mouseDragger=s6(DA,this,s,e)}endDrag(t,{sourceEvent:e,clientX:i,clientY:s}){const a=t.getElement(),n=a.getBoundingClientRect();Rb(n,i,s)||(a.dispatchEvent(new MouseEvent("mouseleave",e)),e.target?.dispatchEvent(new MouseEvent("mouseenter",e)))}triggerTouchDrag(t,e){const i=e.targetTouches[0];e.targetTouches.length===1&&i!=null&&this.startOneFingerTouch(t,e,i)}startOneFingerTouch(t,e,i){const s={pageX:NaN,pageY:NaN,...l6(t,i)};KI(["pageX","pageY"],s,i);const a={touchmove:(r,l)=>{const c=MA(t,"drag-move",s,r,l);this.dispatch("drag-move",t,c)},touchend:(r,l)=>{const c=MA(t,"drag-end",s,r,l);this.dispatch("drag-end",t,c)}},n=t.getElement();this.touchDragger=o6(DA,this,a,i,n);const o=MA(t,"drag-start",s,e,i);this.dispatch("drag-start",t,o)}dispatch(t,e,i){for(const s of this.getListenerSet(t))s(i,e);this.dispatchCallback(t,i)}}}}),DE,Eo,yl=I({"packages/ag-charts-community/src/widget/widget.ts"(){"use strict";R(),ku(),vv(),i6(),c6(),DE=class{constructor(t){this.elem=t}setBounds(t){gv(this.elemContainer??this.elem,t)}getBounds(){return oE(this.elemContainer??this.elem)}static setElementContainer(t,e){const i=t.getBounds();gv(e,i),a_(t.elem,{width:"100%",height:"100%"}),t.elem.remove(),t.elemContainer=e,t.elemContainer.replaceChildren(t.elem)}},Eo=class extends DE{constructor(){super(...arguments),this.index=NaN,this.children=[]}set id(t){Ut(this.elem,"id",t)}get id(){return cu(this.elem,"id")}getElement(){return this.elem}getBoundingClientRect(){return this.elem.getBoundingClientRect()}get clientWidth(){return this.elem.clientWidth}get clientHeight(){return this.elem.clientHeight}destroy(){this.parent?.removeChild(this),this.children.forEach(t=>{t.parent=void 0,t.destroy()}),this.children.length=0,this.destructor(),this.remove(),this.internalListener?.destroy(),this.htmlListener?.destroy(this)}remove(){this.elem.remove(),this.elemContainer?.remove()}setHidden(t){Po(this.elem,"display",t?"none":void 0)}isHidden(){return de()?.getComputedStyle?.(this.elem).display==="none"}setCursor(t){Po(this.elem,"cursor",t)}setTextContent(t){this.elem.textContent=t??null}setAriaDescribedBy(t){Ut(this.elem,"aria-describedby",t)}setAriaHidden(t){Ut(this.elem,"aria-hidden",t)}setAriaLabel(t){Ut(this.elem,"aria-label",t)}setAriaExpanded(t){Ut(this.elem,"aria-expanded",t)}setAriaControls(t){Ut(this.elem,"aria-controls",t)}setAriaHasPopup(t){Ut(this.elem,"aria-haspopup",t)}setInnerHTML(t){this.elem.innerHTML=t}setPointerEvents(t){Po(this.elem,"pointer-events",t)}isDisabled(){return cu(this.elem,"aria-disabled",!1)}hasPopup(){const t=cu(this.elem,"aria-haspopup");return t!==void 0&&t!=="false"}parseFloat(t){return t===""?0:parseFloat(t)}cssLeft(){return this.parseFloat(this.elem.style.left)}cssTop(){return this.parseFloat(this.elem.style.top)}cssWidth(){return this.parseFloat(this.elem.style.width)}cssHeight(){return this.parseFloat(this.elem.style.height)}focus(t){this.elem.focus(t)}setFocusOverride(t){Ut(this.elem,"data-focus-override",t)}setPreventsDefault(t){Ut(this.elem,"data-preventdefault",t)}setTabIndex(t){Ut(this.elem,"tabindex",t)}addChild(t){this.addChildToDOM(t,this.getBefore(t)),this.children.push(t),t.index=this.children.length-1,t.parent=this,this.onChildAdded(t)}removeChild(t){const e=this.children.findIndex(i=>i===t);this.children.splice(e,1),this.removeChildFromDOM(t),this.onChildRemoved(t)}moveChild(t,e){t.domIndex!==e&&(t.domIndex=e,this.removeChildFromDOM(t),this.addChildToDOM(t,this.getBefore(t)))}addClass(...t){this.elem.classList.add(...t)}removeClass(...t){this.elem.classList.remove(...t)}toggleClass(t,e){this.elem.classList.toggle(t,e)}appendOrInsert(t,e){e?e.getElement().insertAdjacentElement("beforebegin",t):this.elem.appendChild(t)}addChildToDOM(t,e){this.appendOrInsert(t.getElement(),e)}removeChildFromDOM(t){this.elem.removeChild(t.getElement())}onChildAdded(t){}onChildRemoved(t){}getBefore({domIndex:t}){if(t!==void 0)return this.children.filter(e=>e.domIndex!==void 0&&e.domIndex>t).reduce((e,i)=>!e||i.domIndex<e.domIndex?i:e,void 0)}addListener(t,e){return Mr.isHTMLEvent(t)?(this.htmlListener??(this.htmlListener=new xE),this.htmlListener.add(t,this,e)):(this.internalListener??(this.internalListener=new kA(this.onDispatch.bind(this))),this.internalListener.add(t,this,e)),()=>this.removeListener(t,e)}removeListener(t,e){Mr.isHTMLEvent(t)?this.htmlListener?.remove(t,this,e):this.htmlListener!=null&&this.internalListener?.remove(t,this,e)}setDragTouchEnabled(t){this.internalListener??(this.internalListener=new kA(this.onDispatch.bind(this))),this.internalListener.dragTouchEnabled=t}onDispatch(t,e){if(!e.sourceEvent?.bubbles)return;let{parent:i}=this;for(;i!=null;){const{internalListener:s}=i;if(s!=null){const a={...e,...Mr.calcCurrentXY(i.getElement(),e)};s.dispatch(t,i,a)}i=i.parent}}static addWindowEvent(t,e){const i=s=>{s.persisted||e()};return fe(de(),"pagehide",i)}}}});function h6(t=0,e=0){return new OffscreenCanvas(t,e).getContext("2d")}var u6=I({"packages/ag-charts-community/src/util/canvas.util.ts"(){"use strict"}}),Mv,kE=I({"packages/ag-charts-community/src/util/lruCache.ts"(){"use strict";Mv=class{constructor(t=5){this.maxCacheSize=t,this.store=new Map}get(t){if(!this.store.has(t))return;const e=this.store.get(t);return this.store.delete(t),this.store.set(t,e),e}has(t){return this.store.has(t)}set(t,e){if(this.store.set(t,e),this.store.size>this.maxCacheSize){const i=this.store.keys();let s=this.store.size-this.maxCacheSize;for(;s>0;){const a=i.next();a.done||this.store.delete(a.value),s--}}return e}clear(){this.store.clear()}}}}),Dr,IA,we,Dv,ln=I({"packages/ag-charts-community/src/util/textMeasurer.ts"(){"use strict";u6(),kE(),Dr=class{static measureText(t,e){return this.getMeasurer(e).measureText(t)}static measureLines(t,e){return this.getMeasurer(e).measureLines(t)}static getMeasurer(t){const e=we.toFontString(t.font),i=`${e}-${t.textAlign??"start"}-${t.textBaseline??"top"}`;return this.instanceMap.get(i)??this.createFontMeasurer(e,t,i)}static clear(){this.instanceMap.clear()}static createFontMeasurer(t,e,i){const s=h6();s.font=t,s.textAlign=e.textAlign??"start",s.textBaseline=e.textBaseline??"top";const a=new IA(s,e);return this.instanceMap.set(i,a),a}},Dr.instanceMap=new Mv(10),IA=class{constructor(t,e){this.ctx=t,this.measureMap=new Mv(100),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline),t.font=we.toFontString(e.font),this.textMeasurer=new Dv(i=>this.cachedCtxMeasureText(i),e.textBaseline??"alphabetic")}textWidth(t,e){return this.textMeasurer.textWidth(t,e)}measureText(t){return this.textMeasurer.measureText(t)}measureLines(t){return this.textMeasurer.measureLines(t)}cachedCtxMeasureText(t){if(!this.measureMap.has(t)){const e=this.ctx.measureText(t);this.measureMap.set(t,{actualBoundingBoxAscent:e.actualBoundingBoxAscent,emHeightAscent:e.emHeightAscent,emHeightDescent:e.emHeightDescent,actualBoundingBoxDescent:e.actualBoundingBoxDescent,actualBoundingBoxLeft:e.actualBoundingBoxLeft,actualBoundingBoxRight:e.actualBoundingBoxRight,alphabeticBaseline:e.alphabeticBaseline,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent,hangingBaseline:e.hangingBaseline,ideographicBaseline:e.ideographicBaseline,width:e.width})}return this.measureMap.get(t)}},we=class{static toFontString({fontSize:t=10,fontStyle:e,fontWeight:i,fontFamily:s}){let a="";return e&&e!=="normal"&&(a+=`${e} `),i&&i!=="normal"&&i!==400&&(a+=`${i} `),a+=`${t}px`,a+=` ${s}`,a.trim()}static getLineHeight(t){return Math.ceil(t*this.defaultLineHeight)}static getHorizontalModifier(t){switch(t){case"left":case"start":return 0;case"center":return .5;case"right":case"end":return 1;default:return 0}}static getVerticalModifier(t){switch(t){case"hanging":case"top":return 0;case"middle":return .5;case"alphabetic":case"bottom":case"ideographic":default:return 1}}},we.EllipsisChar="\u2026",we.defaultLineHeight=1.15,we.lineSplitter=/\r?\n/g,Dv=class{constructor(t,e="alphabetic"){this.measureTextFn=t,this.textBaseline=e,this.charMap=new Map}getMetrics(t){const e=this.measureTextFn(t);return e.fontBoundingBoxAscent??(e.fontBoundingBoxAscent=e.emHeightAscent),e.fontBoundingBoxDescent??(e.fontBoundingBoxDescent=e.emHeightDescent),{width:e.width,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,lineHeight:e.fontBoundingBoxAscent+e.fontBoundingBoxDescent}}getMultilineMetrics(t){let e=0,i=0,s=0,a=0,n=0,o=0;const r=we.getVerticalModifier(this.textBaseline),l=[];let c=0;const h=t.length;for(const u of t){const d=this.measureTextFn(u);d.fontBoundingBoxAscent??(d.fontBoundingBoxAscent=d.emHeightAscent),d.fontBoundingBoxDescent??(d.fontBoundingBoxDescent=d.emHeightDescent),e<d.width&&(e=d.width),a<d.actualBoundingBoxLeft&&(a=d.actualBoundingBoxLeft),c===0?(i+=d.actualBoundingBoxAscent,s+=d.actualBoundingBoxAscent,o=d.alphabeticBaseline):n+=d.fontBoundingBoxAscent,c===h-1?i+=d.actualBoundingBoxDescent:n+=d.fontBoundingBoxDescent,l.push({text:u,width:d.width,height:d.actualBoundingBoxAscent+d.actualBoundingBoxDescent,lineHeight:d.fontBoundingBoxAscent+d.fontBoundingBoxDescent,offsetTop:d.actualBoundingBoxAscent,offsetLeft:d.actualBoundingBoxLeft}),c++}return i+=n,s+=n*r,{width:e,height:i,offsetTop:s,offsetLeft:a,alphabeticBaseline:o,lineMetrics:l}}textWidth(t,e){if(e){let i=0;for(let s=0;s<t.length;s++)i+=this.textWidth(t.charAt(s));return i}return t.length>1?this.measureTextFn(t).width:this.charMap.get(t)??this.charWidth(t)}measureText(t){return this.getMetrics(t)}measureLines(t){const e=typeof t=="string"?t.split(we.lineSplitter):t;return this.getMultilineMetrics(e)}charWidth(t){const{width:e}=this.measureTextFn(t);return this.charMap.set(t,e),e}}}});function d6(t){for(const e of["B","KB","MB","GB"]){if(t<1536)return`${t.toFixed(1)}${e}`;t/=1024}return`${t.toFixed(1)}TB}`}function p6(){if(!("memory"in performance))return;const{totalJSHeapSize:t,usedJSHeapSize:e,jsHeapSizeLimit:i}=performance.memory,s=[];for(const a of[e,t,i])typeof a=="number"&&s.push(d6(a));return`Heap ${s.join(" / ")}`}function IE(t,e,i,s,a={},n=gt.zero){if(!Ft.check("scene:stats","scene:stats:verbose"))return;const{layersRendered:o=0,layersSkipped:r=0,nodesRendered:l=0,nodesSkipped:c=0,opsPerformed:h=0,opsSkipped:u=0}=s??{},d=performance.now(),{start:p,...g}=e,f=Object.entries(g).map(([T,N])=>CE(T,N)).filter(T=>T!=null).join(" + "),x=Object.entries(a).map(([T,N])=>`${T}: ${JSON.stringify(N)}`).join(" ; "),m=Ft.check("scene:stats:verbose"),b=p6(),v=[`${CE("\u23F1\uFE0F",p,d)} (${f})`,`${x}`,`Layers: ${m?AA(o,r):t.size}`,m?`Nodes: ${AA(l,c)}`:null,m?`Ops: ${AA(h,u)}`:null,m&&b?b:null].filter(En),M=new Dv(T=>i.measureText(T)),D=new Map(v.map(T=>[T,M.measureLines(T)])),L=Math.max(...Array.from(D.values(),T=>T.width)),C=y6(D.values(),T=>T.height),A=2+n.x;i.save();try{i.fillStyle="white",i.fillRect(A,0,L,C),i.fillStyle="black";let T=0;for(const[N,O]of D.entries())T+=O.height,i.fillText(N,A,T)}catch(T){ut.warnOnce("Error during debug stats rendering",T)}finally{i.restore()}}function g6(t){const e=nm(de("agChartsSceneDebug")),i=[];for(const s of e)s==="layout"?i.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):i.push(s);t.debugNodeSearch=i}function f6(t,e){t.save();try{for(const[i,s]of Object.entries(e)){const a=He.toCanvas(s);if(!a){ut.log(`Scene.render() - no bbox for debugged node [${i}].`);continue}t.globalAlpha=.8,t.strokeStyle="red",t.lineWidth=1,t.strokeRect(a.x,a.y,a.width,a.height),t.fillStyle="red",t.strokeStyle="white",t.font="16px sans-serif",t.textBaseline="top",t.textAlign="left",t.lineWidth=2,t.strokeText(i,a.x,a.y,a.width),t.fillText(i,a.x,a.y,a.width)}}catch(i){ut.warnOnce("Error during debug rendering",i)}finally{t.restore()}}function m6(t){const{...e}=t;for(const i of Object.keys(e))wE.has(i)||typeof e[i]!="number"&&typeof e[i]!="string"&&typeof e[i]!="boolean"&&(LE.add(i),delete e[i]);return e}function kv(t,e){if(!Ft.check(!0,"scene"))return{};let i=0;return{node:e==="json"?m6(t):t,name:t.name??t.id,dirty:t instanceof Lt?t.dirty:void 0,...Array.from(t instanceof Lt?t.children():[],s=>kv(s,e)).reduce((s,a)=>{let{name:n}=a;const{node:{visible:o,opacity:r,zIndex:l,translationX:c,translationY:h,rotation:u,scalingX:d,scalingY:p},node:g}=a;(!o||r<=0)&&(n=`(${n})`),Lt.is(g)&&g.renderToOffscreenCanvas&&(n=`*${n}*`);const f=Array.isArray(l)?`(${l.join(", ")})`:l,x=[`${(i++).toString().padStart(3,"0")}|`,`${n??"<unknown>"}`,`z: ${f}`,c&&`x: ${c}`,h&&`y: ${h}`,u&&`r: ${u}`,d!=null&&d!==1&&`sx: ${d}`,p!=null&&p!==1&&`sy: ${p}`].filter(v=>!!v).join(" ");let m=x,b=1;for(;s[m]!=null&&b<100;)m=`${x} (${b++})`;return s[m]=a,s},{})}}function AE(t){const e=t instanceof Lt?t.dirty:void 0;if(!e)return{dirtyTree:{},paths:[]};const i=Array.from(t instanceof Lt?t.children():[],n=>AE(n)).filter(n=>n.paths.length>0),s=Lt.is(t)?t.name??t.id:t.id,a=i.length?i.flatMap(n=>n.paths).map(n=>`${s}.${n}`):[s];return{dirtyTree:{name:s,node:t,dirty:e,...i.map(n=>n.dirtyTree).filter(n=>n.dirty!=null).reduce((n,o)=>(n[o.name??"<unknown>"]=o,n),{})},paths:a}}function AA(t,e){const i=t+e;return`${t} / ${i} (${Math.round(100*t/i)}%)`}function CE(t,e,i){const s=i!=null?i-e:e;return`${t}: ${Math.round(s*100)/100}ms`}function y6(t,e){let i=0;for(const s of t)i+=e(s);return i}var LE,wE,x6=I({"packages/ag-charts-community/src/scene/sceneDebug.ts"(){"use strict";R(),yi(),ln(),Wt(),Oe(),ns(),LE=new Set,wE=new Set(["gradient","zIndex","clipRect","cachedBBox","childNodeCounts","path","__zIndex","name","__scalingCenterX","__scalingCenterY","__rotationCenterX","__rotationCenterY","_previousDatum","__fill","__lineDash","borderPath","borderClipPath","_clipPath"])}}),Iv,da,rs,CA,Cu,cn=I({"packages/ag-charts-community/src/scene/shape/text.ts"(){"use strict";R(),yi(),ln(),Wt(),Vn(),ns(),vu(),Iv=!1,da=class mb extends xi{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this.fontSize=mb.defaultFontSize,this.fontFamily="sans-serif",this.textAlign="start",this.textBaseline="alphabetic"}onTextChange(){this.lines=this.text?.split(`
`).map(e=>e.trim())??[]}static computeBBox(e,i,s,a,n=!0){const{font:o,font:{fontSize:r},textAlign:l,textBaseline:c="alphabetic",lineHeight:h=n?we.getLineHeight(r):void 0}=a,{width:u,alphabeticBaseline:d,offsetLeft:p,offsetTop:g,height:f}=Dr.measureLines(e,n?{font:o,lineHeight:h,textAlign:"start",textBaseline:"top"}:a),x=h==null?f:h*e.length;let m;h==null?m=g:c==="alphabetic"?m=(h-r)/2-d:m=we.getVerticalModifier(c)*x;const b=n?u*we.getHorizontalModifier(l):p;return new gt(i-b,s-m,u,x)}computeBBox(e=Iv){const{x:i,y:s,lines:a,textBaseline:n,textAlign:o,lineHeight:r}=this;return mb.computeBBox(a,i,s,{font:this,textBaseline:n,textAlign:o,lineHeight:r},e)}getBBox(e=!0){if(e){Iv=!0;const i=this.computeBBox(!0);return Iv=!1,i}return super.getBBox()}getTextMeasureBBox(){return this.computeBBox()}isPointInPath(e,i){const s=this.getBBox();return s?s.containsPoint(e,i):!1}render(e){const{ctx:i,stats:s}=e;if(!this.lines.length||!this.layerManager)return s&&(s.nodesSkipped+=1),super.render(e);const{fill:a,stroke:n,strokeWidth:o}=this,{globalAlpha:r}=i,{pixelRatio:l}=this.layerManager.canvas;if(!a&&!(n!=null&&o>0))return super.render(e);const c=we.toFontString(this);i.font!==c&&(i.font=c);const{fontSize:h,lineHeight:u=we.getLineHeight(h),textAlign:d,textBaseline:p}=this,g=this.lines.length,f=p==="alphabetic"?0:-we.getVerticalModifier(p)*u*(g-1);if(i.textAlign=d,i.textBaseline=p,a){this.applyFillAndAlpha(i);const{fillShadow:x}=this;x?.enabled&&(i.shadowColor=x.color,i.shadowOffsetX=x.xOffset*l,i.shadowOffsetY=x.yOffset*l,i.shadowBlur=x.blur*l),this.renderLines(f,u,(m,b,v)=>i.fillText(m,b,v)),i.globalAlpha=r}if(n&&o){this.applyStrokeAndAlpha(i),i.lineWidth=o;const{lineDash:x,lineDashOffset:m,lineCap:b,lineJoin:v}=this;x&&i.setLineDash([...x]),m&&(i.lineDashOffset=m),b&&(i.lineCap=b),v&&(i.lineJoin=v),this.renderLines(f,u,(M,D,L)=>i.strokeText(M,D,L)),i.globalAlpha=r}if(mb.debug.check()){const x=this.getBBox(!0);i.strokeStyle="red",i.lineWidth=1,i.strokeRect(x.x,x.y,x.width,x.height)}super.render(e)}renderLines(e,i,s){const{lines:a,x:n,y:o}=this;if(!(!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(e)||!Number.isFinite(i)))for(const r of a)s(r,n,o+e),e+=i}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize??mb.defaultFontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}toSVG(){if(!this.visible||!this.text)return;const e=fi("text");return this.applySvgFillAttributes(e),e.setAttribute("font-family",this.fontFamily?.split(",")[0]??""),e.setAttribute("font-size",String(this.fontSize)),e.setAttribute("font-style",this.fontStyle??""),e.setAttribute("font-weight",String(this.fontWeight??"")),e.setAttribute("text-anchor",{center:"middle",left:"start",right:"end",start:"start",end:"end"}[this.textAlign??"start"]),e.setAttribute("alignment-baseline",{alphabetic:"alphabetic",top:"top",bottom:"bottom",hanging:"hanging",middle:"middle",ideographic:"ideographic"}[this.textBaseline??"alphabetic"]),e.setAttribute("x",String(this.x)),e.setAttribute("y",String(this.y)),e.textContent=this.text??"",{elements:[e]}}},da.className="Text",da.debug=Ft.create(!0,"scene:text"),da.defaultFontSize=10,S([lt()],da.prototype,"x",2),S([lt()],da.prototype,"y",2),S([lt({convertor:t=>au(t)?String(t):t,changeCb:t=>t.onTextChange()})],da.prototype,"text",2),S([lt()],da.prototype,"fontStyle",2),S([lt()],da.prototype,"fontWeight",2),S([lt()],da.prototype,"fontSize",2),S([lt()],da.prototype,"fontFamily",2),S([lt()],da.prototype,"textAlign",2),S([lt()],da.prototype,"textBaseline",2),S([lt()],da.prototype,"lineHeight",2),rs=da,CA=class extends Pp(rs){},Cu=class extends Pp(Su(rs)){}}}),bm,Av=I({"packages/ag-charts-community/src/util/textWrapper.ts"(){"use strict";ln(),bm=class{static wrapText(t,e){return this.wrapLines(t,e).join(`
`)}static wrapLines(t,e){const i=this.textWrap(t,e);return e.overflow==="hide"&&i.some(s=>s.endsWith(we.EllipsisChar))?[]:i}static appendEllipsis(t){return t.replace(/[.,]{1,5}$/,"")+we.EllipsisChar}static truncateLine(t,e,i,s){const a=e.textWidth(we.EllipsisChar);let n=0,o=0;for(;o<t.length;o++){const r=e.textWidth(t.charAt(o));if(n+r>i)break;n+=r}if(t.length===o&&(!s||n+a<=i))return s?t+we.EllipsisChar:t;for(t=t.slice(0,o).trimEnd();t.length&&e.textWidth(t)+a>i;)t=t.slice(0,-1).trimEnd();return t+we.EllipsisChar}static textWrap(t,e){const i=t.split(we.lineSplitter),s=Dr.getMeasurer(e);if(e.textWrap==="never")return i.map(r=>this.truncateLine(r.trimEnd(),s,e.maxWidth));const a=[],n=e.textWrap==="hyphenate",o=e.textWrap==null||e.textWrap==="on-space";for(const r of i){let l=r.trimEnd();if(l===""){a.push(l);continue}let c=0,h=0,u=0;for(;c<l.length;){const d=l.charAt(c);if(h+=s.textWidth(d),d===" "&&(u=c),h>e.maxWidth){if(c===0)break;const p=s.textWidth(l.slice(0,c+1));if(p<=e.maxWidth){h=p,c++;continue}if(u){const x=this.getWordAt(l,u+1),m=s.textWidth(x);if(m<=e.maxWidth){a.push(l.slice(0,u).trimEnd()),l=l.slice(u).trimStart(),c=0,h=0,u=0;continue}else o&&m>e.maxWidth&&a.push(l.slice(0,u).trimEnd(),this.truncateLine(l.slice(u).trimStart(),s,e.maxWidth,!0))}else o&&a.push(this.truncateLine(l,s,e.maxWidth,!0));if(o){l="";break}const g=n?"-":"";let f=l.slice(0,c).trim();for(;f.length&&s.textWidth(f+g)>e.maxWidth;)f=f.slice(0,-1).trimEnd();if(a.push(f+g),!f.length){l="";break}l=l.slice(f.length).trimStart(),c=-1,h=0,u=0}c++}l&&a.push(l)}return this.avoidOrphans(a,s,e),this.clipLines(a,s,e)}static getWordAt(t,e){const i=t.indexOf(" ",e);return i===-1?t.slice(e):t.slice(e,i)}static clipLines(t,e,i){if(!i.maxHeight)return t;const{height:s,lineMetrics:a}=e.measureLines(t);if(s<=i.maxHeight)return t;for(let n=0,o=0;n<a.length;n++){const{lineHeight:r}=a[n];if(o+=r,o>i.maxHeight){if(i.overflow==="hide")return[];const l=t.slice(0,n||1),c=l.pop();return l.concat(this.truncateLine(c,e,i.maxWidth,!0))}}return t}static avoidOrphans(t,e,i){if(i.avoidOrphans===!1||t.length<2)return;const{length:s}=t,a=t[s-1],n=t[s-2];if(n.length<a.length)return;const o=n.lastIndexOf(" ");if(o===-1||o===n.indexOf(" ")||a.includes(" "))return;const r=n.slice(o+1);e.textWidth(a+r)<=i.maxWidth&&(t[s-2]=n.slice(0,o),t[s-1]=r+" "+a)}}}}),TE={};La(TE,{BASE_FONT_SIZE:()=>kr,CARTESIAN_AXIS_TYPE:()=>wA,CARTESIAN_POSITION:()=>LA,FONT_SIZE:()=>Cv,FONT_SIZE_RATIO:()=>Oa,POLAR_AXIS_SHAPE:()=>NA,POLAR_AXIS_TYPE:()=>TA});var Cv,kr,Oa,LA,wA,TA,NA,Rp=I({"packages/ag-charts-community/src/chart/themes/constants.ts"(){"use strict";Cv=(t=>(t[t.SMALLEST=8]="SMALLEST",t[t.SMALLER=10]="SMALLER",t[t.SMALL=12]="SMALL",t[t.MEDIUM=13]="MEDIUM",t[t.LARGE=14]="LARGE",t[t.LARGEST=17]="LARGEST",t))(Cv||{}),kr=12,Oa=(t=>(t[t.SMALLEST=8/kr]="SMALLEST",t[t.SMALLER=10/kr]="SMALLER",t[t.SMALL=12/kr]="SMALL",t[t.MEDIUM=13/kr]="MEDIUM",t[t.LARGE=14/kr]="LARGE",t[t.LARGEST=17/kr]="LARGEST",t))(Oa||{}),LA=(t=>(t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t))(LA||{}),wA=(t=>(t.CATEGORY="category",t.GROUPED_CATEGORY="grouped-category",t.ORDINAL_TIME="ordinal-time",t.UNIT_TIME="unit-time",t.TIME="time",t.NUMBER="number",t.LOG="log",t))(wA||{}),TA=(t=>(t.ANGLE_CATEGORY="angle-category",t.ANGLE_NUMBER="angle-number",t.RADIUS_CATEGORY="radius-category",t.RADIUS_NUMBER="radius-number",t))(TA||{}),NA=(t=>(t.CIRCLE="circle",t.POLYGON="polygon",t))(NA||{})}}),Pe,Lu=I({"packages/ag-charts-community/src/chart/caption.ts"(){"use strict";R(),cn(),ns(),vt(),vt(),ta(),ln(),Av(),Pe=class extends Nt{constructor(){super(...arguments),this.id=zn(this),this.node=new CA({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.padding=0,this.layoutStyle="block",this.truncated=!1}registerInteraction(t,e){return t.eventsHub.on("layout:complete",()=>this.updateA11yText(t,e))}computeTextWrap(t,e){const{text:i,padding:s,wrapping:a}=this,n=Math.min(this.maxWidth??1/0,t)-s*2,o=this.maxHeight??e-s*2;if(!isFinite(n)&&!isFinite(o)){this.node.text=i;return}const r=bm.wrapText(i??"",{maxWidth:n,maxHeight:o,font:this,textWrap:a});this.node.text=r,this.truncated=r.includes(we.EllipsisChar)}updateA11yText(t,e){const{proxyInteractionService:i}=t;if(this.enabled&&this.text){const s=He.toCanvas(this.node);if(s){const{id:a}=this;this.proxyText??(this.proxyText=i.createProxyElement({type:"text",domManagerId:a,where:e})),this.proxyText.textContent=this.text,this.proxyText.setBounds(s),this.proxyText.addListener("mousemove",n=>this.handleMouseMove(t,n)),this.proxyText.addListener("mouseleave",n=>this.handleMouseLeave(t,n))}}else this.proxyText?.destroy(),this.proxyText=void 0}handleMouseMove(t,e){if(e!=null&&this.enabled&&this.node.visible&&this.truncated){const{x:i,y:s}=He.toCanvas(this.node),a=e.sourceEvent.offsetX+i,n=e.sourceEvent.offsetY+s;t.tooltipManager.updateTooltip(this.id,{canvasX:a,canvasY:n,showArrow:!1},[{type:"structured",title:this.text}])}}handleMouseLeave(t,e){t.tooltipManager.removeTooltip(this.id)}},Pe.SMALL_PADDING=10,S([k,os("node","visible")],Pe.prototype,"enabled",2),S([k,os("node")],Pe.prototype,"text",2),S([k,os("node")],Pe.prototype,"textAlign",2),S([k,os("node")],Pe.prototype,"fontStyle",2),S([k,os("node")],Pe.prototype,"fontWeight",2),S([k,os("node")],Pe.prototype,"fontSize",2),S([k,os("node")],Pe.prototype,"fontFamily",2),S([k,os("node","fill")],Pe.prototype,"color",2),S([k],Pe.prototype,"spacing",2),S([k],Pe.prototype,"maxWidth",2),S([k],Pe.prototype,"maxHeight",2),S([k],Pe.prototype,"wrapping",2),S([k],Pe.prototype,"padding",2),S([k],Pe.prototype,"layoutStyle",2)}});function b6(t){switch(t){case"x":case"y":case"angle":case"radius":return!0;default:return!1}}var Lv,NE=I({"packages/ag-charts-community/src/chart/chartAxisDirection.ts"(){"use strict";Lv=(t=>(t.X="x",t.Y="y",t.Angle="angle",t.Radius="radius",t))(Lv||{})}}),vm,v6=I({"packages/ag-charts-community/src/chart/chartCaptions.ts"(){"use strict";vt(),ln(),Lu(),vm=class{constructor(){this.title=new Pe,this.subtitle=new Pe,this.footnote=new Pe}positionCaptions(t){const{title:e,subtitle:i,footnote:s}=this,a=t.layoutBox.height/10;if(e.enabled){const{spacing:n}=e;this.positionCaption("top",e,t.layoutBox,a),this.shrinkLayoutByCaption("top",e,t.layoutBox,n)}i.enabled&&(this.positionCaption("top",i,t.layoutBox,a),this.shrinkLayoutByCaption("top",i,t.layoutBox,i.spacing)),s.enabled&&(this.positionCaption("bottom",s,t.layoutBox,a),this.shrinkLayoutByCaption("bottom",s,t.layoutBox,s.spacing))}positionAbsoluteCaptions(t){const{title:e,subtitle:i,footnote:s}=this,{rect:a}=t.series;for(const n of[e,i,s])if(n.layoutStyle==="overlay"){if(n.textAlign==="left")n.node.x=a.x+n.padding;else if(n.textAlign==="right"){const o=n.node.getBBox();n.node.x=a.x+a.width-o.width-n.padding}}}computeX(t,e){return t==="left"?e.x:t==="right"?e.x+e.width:e.x+e.width/2}positionCaption(t,e,i,s){const a=Math.max(we.getLineHeight(e.fontSize),s);e.node.x=this.computeX(e.textAlign,i)+e.padding,e.node.y=i.y+(t==="top"?0:i.height)+e.padding,e.node.textBaseline=t,e.computeTextWrap(i.width,a)}shrinkLayoutByCaption(t,e,i,s=0){if(e.layoutStyle==="block"){const a=e.node.getTextMeasureBBox();i.shrink(Math.ceil(t==="top"?a.y-i.y+a.height+s:i.y+i.height-a.y+s),t)}}},S([k],vm.prototype,"title",2),S([k],vm.prototype,"subtitle",2),S([k],vm.prototype,"footnote",2)}}),OE,PE,S6=I({"packages/ag-charts-community/src/api/preset/chartTypeOriginator.ts"(){"use strict";R(),OE=["candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"],PE=class{constructor(t){this.chartService=t,this.mementoOriginatorKey="chartType"}createMemento(){let t=this.chartService.publicApi?.getOptions()?.chartType;return t==null&&(t="candlestick"),t}guardMemento(t){return t==null||OE.includes(t)}restoreMemento(t,e,i){if(i==null)return;const s={chartType:i};this.chartService.publicApi?.updateDelta(s).catch(a=>ut.error("error restoring state",a))}}}}),Ic,wv=I({"packages/ag-charts-community/src/version.ts"(){"use strict";Ic="12.0.1"}}),OA,_E,M6=I({"packages/ag-charts-community/src/api/state/historyManager.ts"(){"use strict";R(),yi(),wv(),OA=Symbol("previous-memento-not-found"),_E=class{constructor(t){this.history=[],this.historyIndex=-1,this.originators=new Map,this.clearState=new Map,this.maxHistoryLength=100,this.debug=Ft.create(!0,"history"),this.cleanup=new Fe,this.cleanup.register(t.on("series:undo",this.undo.bind(this)),t.on("series:redo",this.redo.bind(this)))}destroy(){this.cleanup.flush()}addMementoOriginator(t){this.originators.set(t.mementoOriginatorKey,t),this.clearState.set(t.mementoOriginatorKey,t.createMemento()),this.debugEvent("History add originator:",t.mementoOriginatorKey)}clear(){this.debug("History clear:",Object.keys(this.originators)),this.history=[],this.historyIndex=-1;for(const[t,e]of this.originators.entries())this.clearState.set(t,e.createMemento())}record(t,...e){this.historyIndex<this.history.length-1&&(this.history=this.history.slice(0,this.historyIndex+1)),this.history.length>this.maxHistoryLength&&(this.history=this.history.slice(-this.maxHistoryLength));const i=new Map;for(const s of e){if(!this.originators.has(s.mementoOriginatorKey))throw new Error(`Originator [${s.mementoOriginatorKey}] has not been added to the HistoryManager.`);i.set(s.mementoOriginatorKey,s.createMemento())}this.history.push({label:t,mementos:i}),this.historyIndex=this.history.length-1,this.debugEvent(`History record: [${t}]`)}undo(){const t=this.history[this.historyIndex];if(t){for(const e of t.mementos.keys()){const i=this.findPreviousMemento(e);if(i===OA)throw new Error(`Could not find previous memento for [${e}].`);this.restoreMemento(e,i)}this.historyIndex-=1,this.debugEvent(`History undo: [${t.label}]`)}}redo(){const t=this.history[this.historyIndex+1];if(t){for(const[e,i]of t.mementos.entries())this.restoreMemento(e,i);this.historyIndex+=1,this.debugEvent(`History redo: [${t.label}]`)}}findPreviousMemento(t){for(let e=this.historyIndex-1;e>=0;e--)if(this.history[e].mementos.has(t))return this.history[e].mementos.get(t);return this.clearState.has(t)?this.clearState.get(t):OA}restoreMemento(t,e){this.originators.get(t)?.restoreMemento(Ic,Ic,e)}debugEvent(...t){this.debug(...t,this.history.map((e,i)=>i===this.historyIndex?`** ${e.label} **`:e.label))}}}}),PA,EE=I({"packages/ag-charts-community/src/api/state/memento.ts"(){"use strict";R(),PA=class xP{constructor(e){this.version=e.split("-")[0]}save(...e){const i={version:this.version};for(const s of Object.values(e))i[s.mementoOriginatorKey]=this.encode(s,s.createMemento());return i}restore(e,...i){if(typeof e!="object"){ut.warnOnce(`Could not restore data of type [${typeof e}], expecting an object, ignoring.`);return}if(e==null){ut.warnOnce("Could not restore data of type [null], expecting an object, ignoring.");return}if(!("version"in e)||typeof e.version!="string"){ut.warnOnce("Could not restore data, missing [version] string in object, ignoring.");return}for(const s of i){const a=this.decode(s,e[s.mementoOriginatorKey]),n=[];if(!s.guardMemento(a,n)){const o=n.length>0?`
${n.join(`
`)}
`:"";ut.warnOnce(`Could not restore [${s.mementoOriginatorKey}] data, value was invalid, ignoring.${o}`,a);return}s.restoreMemento(this.version,e.version,a)}}encode(e,i){try{return JSON.parse(JSON.stringify(i,xP.encodeTypes))}catch(s){throw new Error(`Failed to encode [${e.mementoOriginatorKey}] value [${s}].`,{cause:s})}}decode(e,i){if(i==null)return i;try{return JSON.parse(JSON.stringify(i),xP.decodeTypes)}catch(s){throw new Error(`Failed to decode [${e.mementoOriginatorKey}] value [${s}].`,{cause:s})}}static encodeTypes(e,i){return Zf(this[e])?{__type:"date",value:this[e].toISOString()}:i}static decodeTypes(e,i){return xs(this[e])&&"__type"in this[e]&&this[e].__type==="date"?new Date(this[e].value):i}}}}),RE,D6=I({"packages/ag-charts-community/src/api/state/stateManager.ts"(){"use strict";Pt(),wv(),EE(),RE=class{constructor(){this.caretaker=new PA(Ic),this.state=new Map}setState(t,e){Wi(this.state.get(t.mementoOriginatorKey),e)||this.setStateAndRestore(t,e)}setStateAndRestore(t,e){this.state.set(t.mementoOriginatorKey,e),this.restoreState(t)}restoreState(t){const{caretaker:e,state:i}=this;if(!i.has(t.mementoOriginatorKey))return;const s=i.get(t.mementoOriginatorKey);e.restore({version:e.version,[t.mementoOriginatorKey]:s},t)}}}}),BE,k6=I({"packages/ag-charts-community/src/styles.css"(){BE=`.ag-charts-wrapper,.ag-charts-wrapper:after,.ag-charts-wrapper:before,.ag-charts-wrapper *,.ag-charts-wrapper *:after,.ag-charts-wrapper *:before{box-sizing:border-box}.ag-charts-wrapper{--align-items: center;--justify-content: center;position:relative;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.ag-charts-wrapper--safe-horizontal{--justify-content: flex-start}.ag-charts-wrapper--safe-vertical{--align-items: flex-start}.ag-charts-tab-guard{width:0%;height:0%;position:absolute;pointer-events:none}.ag-charts-canvas-center{width:100%;height:100%;position:absolute;touch-action:auto;pointer-events:auto;display:flex;align-items:var(--align-items);justify-content:var(--justify-content)}.ag-charts-canvas-container,.ag-charts-canvas{position:relative;user-select:none;-webkit-user-select:none}.ag-charts-canvas-container>*,.ag-charts-canvas>*{pointer-events:none}.ag-charts-canvas canvas{display:block}.ag-charts-series-area{outline:none;pointer-events:auto;position:absolute}.ag-charts-swapchain{top:0;left:0;outline:none;opacity:0;pointer-events:none;position:absolute;width:100%;height:100%}.ag-charts-swapchain:focus-visible{opacity:1}.ag-charts-canvas-proxy,.ag-charts-canvas-overlay{inset:0;pointer-events:none;position:absolute;user-select:none;-webkit-user-select:none}.ag-charts-canvas-overlay>*{position:absolute;pointer-events:auto}.ag-charts-theme-default,.ag-charts-theme-default-dark{--ag-charts-accent-color: #2196f3;--ag-charts-background-color: #fff;--ag-charts-border-color: #dddddd;--ag-charts-border-radius: 4px;--ag-charts-chart-background-color: #fff;--ag-charts-chart-padding: 20px;--ag-charts-focus-shadow: 0 0 0 3px #2196f3;--ag-charts-foreground-color: #181d1f;--ag-charts-font-family: Verdana, sans-serif;--ag-charts-font-size: 12px;--ag-charts-font-weight: 400;--ag-charts-popup-shadow: 0 0 16px rgba(0, 0, 0, .15);--ag-charts-subtle-text-color: #8c8c8c;--ag-charts-text-color: #181d1f;--ag-charts-chrome-background-color: #fafafa;--ag-charts-chrome-font-family: Verdana, sans-serif;--ag-charts-chrome-font-size: 12px;--ag-charts-chrome-font-weight: 400;--ag-charts-chrome-subtle-text-color: #8c8c8c;--ag-charts-chrome-text-color: #181d1f;--ag-charts-button-background-color: #fff;--ag-charts-button-border: 1px solid #dddddd;--ag-charts-button-font-weight: normal;--ag-charts-button-text-color: inherit;--ag-charts-input-background-color: #fff;--ag-charts-input-border: 1px solid #dddddd;--ag-charts-input-text-color: #181d1f;--ag-charts-menu-background-color: #fafafa;--ag-charts-menu-border: 1px solid #dddddd;--ag-charts-menu-text-color: #181d1f;--ag-charts-panel-background-color: #fafafa;--ag-charts-panel-text-color: #181d1f;--ag-charts-tooltip-background-color: #fafafa;--ag-charts-tooltip-border: 1px solid #dddddd;--ag-charts-tooltip-text-color: #181d1f;--ag-charts-tooltip-subtle-text-color: #8c8c8c;--ag-charts-crosshair-label-background-color: #fafafa;--ag-charts-crosshair-label-text-color: #181d1f;--ag-charts-spacing: 4px;--ag-charts-icon-size: 16px;--ag-charts-focus-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-accent-color) 12%);--ag-charts-input-border-radius: var(--ag-charts-border-radius);--ag-charts-input-focus-border-color: var(--ag-charts-accent-color);--ag-charts-input-focus-text-color: var(--ag-charts-accent-color);--ag-charts-input-disabled-background-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-foreground-color) 6% );--ag-charts-input-disabled-border-color: var(--ag-charts-border-color);--ag-charts-input-disabled-text-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-input-text-color) 50% );--ag-charts-input-placeholder-text-color: color-mix( in srgb, var(--ag-charts-input-background-color), var(--ag-charts-input-text-color) 60% );--ag-charts-button-border-radius: var(--ag-charts-border-radius);--ag-charts-button-focus-background-color: color-mix( in srgb, var(--ag-charts-button-background-color), var(--ag-charts-accent-color) 12% );--ag-charts-button-focus-border-color: var(--ag-charts-accent-color);--ag-charts-button-focus-text-color: var(--ag-charts-accent-color);--ag-charts-button-disabled-background-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-foreground-color) 6% );--ag-charts-button-disabled-border-color: var(--ag-charts-border-color);--ag-charts-button-disabled-text-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-chrome-text-color) 50% );--ag-charts-checkbox-background-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 35% );--ag-charts-checkbox-checked-background-color: var(--ag-charts-accent-color);--ag-charts-tooltip-border-radius: var(--ag-charts-border-radius);--ag-charts-menu-border-radius: var(--ag-charts-border-radius);--ag-charts-chrome-font-size-small: var(--ag-charts-chrome-font-size);--ag-charts-chrome-font-size-medium: calc(var(--ag-charts-chrome-font-size) * (13 / 12));--ag-charts-chrome-font-size-large: calc(var(--ag-charts-chrome-font-size) * (14 / 12));--ag-charts-border: 1px solid var(--ag-charts-border-color);--ag-charts-focus-border: 1px solid var(--ag-charts-accent-color);--ag-charts-focus-border-shadow: 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-accent-color) 20%);--ag-charts-layer-menu: 6;--ag-charts-layer-ui-overlay: 5;--ag-charts-layer-tooltip: 4;--ag-charts-layer-toolbar: 3;--ag-charts-layer-crosshair: 2;--ag-charts-layer-annotations: 1}.ag-charts-theme-default-dark{--ag-charts-focus-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-accent-color) 22%)}.ag-chart-canvas-wrapper .ag-charts-theme-default{--ag-charts-border-radius: var(--ag-border-radius, 4px);--ag-charts-border: var(--ag-borders-critical, solid 1px) var(--ag-charts-border-color);--ag-charts-focus-shadow: var(--ag-focus-shadow, 0 0 0 3px var(--ag-charts-accent-color));--ag-charts-focus-border-shadow: var( --ag-focus-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-accent-color) 20%) )}.ag-charts-icon{display:block;width:20px;height:20px;speak:none;speak:never;mask:var(--icon) center / contain no-repeat;background-color:currentColor;transition:background-color .25s ease-in-out}.ag-charts-icon-align-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNyAxMGg2djFIN3pNNCA3aDEydjFINHptMSA2aDEwdjFINXoiLz48L3N2Zz4=)}.ag-charts-icon-align-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNCAxMGg2djFINHptMC0zaDEydjFINHptMCA2aDEwdjFINHoiLz48L3N2Zz4=)}.ag-charts-icon-align-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTAgMTBoNnYxaC02ek00IDdoMTJ2MUg0em0yIDZoMTB2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-arrow-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1LjI5MyA0LjVIMTIuNXYtMUgxN3Y0aC0xVjUuMjA3bC05LjY0NiA5LjY0Ny0uNzA4LS43MDh6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDE2YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwbS0yLjUgMS41YTEuNSAxLjUgMCAxIDAgMC0zIDEuNSAxLjUgMCAwIDAgMCAzIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-arrow-down-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDhMMS41IDhMMTAgMThMMTguNSA4TDE0IDhMMTQgM0w2IDNMNiA4Wk03IDRMNyA5SDMuNjYyNDRMMTAgMTYuNDU2TDE2LjMzNzYgOUwxMyA5TDEzIDRMNyA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-arrow-up-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNCAxMkgxOC41TDEwIDJMMS41IDEySDZMNi4wMDAwMiAxN0gxNFYxMlpNMTMgMTZWMTFIMTYuMzM3NkwxMCAzLjU0NDA1TDMuNjYyNDQgMTFIN0w3LjAwMDAyIDE2SDEzWiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-callout-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtNC41MTRhMjYgMjYgMCAwIDAtMi4wMTcgMS41NGwtLjMxNC4yNmMtLjU1LjQ1Ny0xLjExNS45MjYtMS43NiAxLjQtLjY2OS40OTEtMS41NjItLjAxMi0xLjU2Mi0uOFYxNEg0LjVBMS41IDEuNSAwIDAgMSAzIDEyLjV6TTQuNSA0YS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWgxLjgzM3YzLjM3MmEzNiAzNiAwIDAgMCAxLjY3OC0xLjMzOGwuMzItLjI2NWEyNiAyNiAwIDAgMSAyLjIyNS0xLjY4NWwuMTI2LS4wODRIMTUuNWEuNS41IDAgMCAwIC41LS41di04YS41LjUgMCAwIDAtLjUtLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyAxdjNoMnYxMkg3djNINnYtM0g0VjRoMlYxek01IDVoM3YxMEg1ek0xMSAxNFY2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6bTEtN2gzdjZoLTN6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-close{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNSA1IDEwIDEwTTUgMTUgMTUgNSIgc3Ryb2tlPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-comment-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy41MTMgMy45OTVhNi41IDYuNSAwIDAgMSA2LjA5OCAxMS40MWMtLjU4OC4zOTMtMS4yMTcuNTM2LTEuODI5LjU4NWExMyAxMyAwIDAgMS0xLjI3LjAxN0EyNyAyNyAwIDAgMCAxMCAxNkg0LjVhLjUuNSAwIDAgMS0uNS0uNVYxMHEwLS4yNDctLjAwNy0uNTEzYy0uMDA4LS40MTYtLjAxNi0uODU3LjAxNy0xLjI2OS4wNS0uNjEyLjE5Mi0xLjI0LjU4NS0xLjgzYTYuNSA2LjUgMCAwIDEgMi45MTgtMi4zOTNtMy41Ni42MWE1LjUgNS41IDAgMCAwLTUuNjQ2IDIuMzRjLS4yNjYuMzk3LS4zNzkuODQyLS40MiAxLjM1NC0uMDMuMzYtLjAyMi43MTgtLjAxNSAxLjEwOFE1IDkuNjg5IDUgMTB2NWg1cS4zMTEuMDAxLjU5My4wMDhjLjM5LjAwNy43NDcuMDE1IDEuMTA4LS4wMTUuNTEyLS4wNDEuOTU3LS4xNTQgMS4zNTUtLjQyYTUuNSA1LjUgMCAwIDAtMS45ODMtOS45NjciIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-crosshair-add-line{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-date-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAyaDF2MTZIMnptMTUgMGgxdjE2aC0xeiIgZmlsbD0iIzE4MUQxRiIvPjxwYXRoIGQ9Ik0xMy4xNTcgMTFINXYtMWg3Ljc5M0wxMSA4LjIwN2wuNzA3LS43MDcgMy4xODIgMy4xODItMy4xODIgMy4xODItLjcwNy0uNzA3eiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-date-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMyAySDJ2MTZoMXptMy41MDcgNC44OUw4LjUgNC44OTVWMTBINXYxaDMuNXY3aDF2LTdoNS4wODhsLTEuOTU3IDEuOTU3LjcwNy43MDcgMy4xODItMy4xODJMMTMuMzM4IDcuM2wtLjcwNy43MDdMMTQuNjI0IDEwSDkuNVY0LjkzMmwxLjk1NyAxLjk1Ny43MDctLjcwN0w4Ljk4MiAzIDUuOCA2LjE4MnoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-delete{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTguNDk2IDguOTk2QS41LjUgMCAwIDEgOSA5LjQ5MnY0YS41LjUgMCAxIDEtMSAuMDA4di00YS41LjUgMCAwIDEgLjQ5Ni0uNTA0TTEyIDkuNWEuNS41IDAgMCAwLTEgMHY0YS41LjUgMCAwIDAgMSAweiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTYgNVYzLjVBMi41IDIuNSAwIDAgMSA4LjUgMWgzQTIuNSAyLjUgMCAwIDEgMTQgMy41VjVoMi44MzNhLjUuNSAwIDAgMSAwIDFIMTV2MTAuMjVjMCAuNDE1LS4wNjYuODYzLS4zIDEuMjIxLS4yNTcuMzk0LS42NzIuNjEyLTEuMi42MTJoLTdjLS41MjggMC0uOTQzLS4yMTgtMS4yLS42MTItLjIzNC0uMzU4LS4zLS44MDYtLjMtMS4yMjFWNkgzLjMzM2EuNS41IDAgMCAxIDAtMXptMS0xLjVBMS41IDEuNSAwIDAgMSA4LjUgMmgzQTEuNSAxLjUgMCAwIDEgMTMgMy41VjVIN3pNNiAxNi4yNVY2aDh2MTAuMjVjMCAuMzM1LS4wNTkuNTU0LS4xMzguNjc1LS4wNTUuMDg1LS4xNC4xNTgtLjM2Mi4xNThoLTdjLS4yMjIgMC0uMzA3LS4wNzMtLjM2Mi0uMTU4LS4wOC0uMTIxLS4xMzgtLjM0LS4xMzgtLjY3NSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-disjoint-channel,.ag-charts-icon-disjoint-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTkuMDI4IDE3LjQ2YTIuMjUgMi4yNSAwIDAgMC00LjA5Mi0xLjg1bC05LjUxMS0yLjM3OGEyLjI1IDIuMjUgMCAxIDAtLjIyNS45NzRsOS40NzUgMi4zNjlhMi4yNTEgMi4yNTEgMCAwIDAgNC4zNTMuODg2bS0xLjY2Mi0xLjk2NWExLjI1IDEuMjUgMCAxIDEtLjg4NSAyLjMzOCAxLjI1IDEuMjUgMCAwIDEgLjg4NS0yLjMzOE00LjM0MyAxMy42NjlhMS4yNSAxLjI1IDAgMSAwLTIuMzM4LS44ODUgMS4yNSAxLjI1IDAgMCAwIDIuMzM4Ljg4NU0zLjk3IDguNzY5YTIuMjUgMi4yNSAwIDAgMCAxLjQ1NS0yLjExbDkuNTExLTIuMzc4YTIuMjUgMi4yNSAwIDEgMC0uMjYtLjk2NUw1LjIgNS42ODVhMi4yNSAyLjI1IDAgMSAwLTEuMjMgMy4wODRtLjM3My0yLjU0N2ExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjc1LTMuNDM4YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-drag-handle{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjcuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjxjaXJjbGUgY3g9IjEzLjc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iMTMuNzUiIGN5PSIxMS43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjExLjc1IiByPSIuNzUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjUiLz48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iMTEuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjwvc3ZnPg==)}.ag-charts-icon-fibonacci-retracement-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA1aDEydjFIMnoiLz48Y2lyY2xlIGN4PSIxNS43NSIgY3k9IjUuNSIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC4yNSIgY3k9IjE0LjUiIHI9IjEuNzUiIHN0cm9rZT0iIzAwMCIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik0xOCAxNUg2di0xaDEyem0wLTQuNUgydi0xaDE2eiIvPjwvc3ZnPg==)}.ag-charts-icon-fibonacci-retracement-trend-based-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJtNC45OTYgMTIuNjc0IDMuMjkxLTUuNzQzLjg2OC40OTctMy4yOTEgNS43NDN6Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjUuNSIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC4zNTEiIGN5PSIxNC41IiByPSIxLjc1IiBzdHJva2U9IiMwMDAiLz48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTggNmgtN1Y1aDd6bTAgNC41aC03di0xaDd6bTAgNC41SDZ2LTFoMTJ6Ii8+PC9zdmc+)}.ag-charts-icon-fill-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtOC4wNzEgNC4wNi0uOTI0LS45MjQuNzA3LS43MDcgNy4yODggNy4yODgtNC45NSA0Ljk1YTMuNSAzLjUgMCAwIDEtNC45NSAwbC0xLjQxNC0xLjQxNGEzLjUgMy41IDAgMCAxIDAtNC45NXptLjcwNy43MDhMNC41MzYgOS4wMWEyLjUgMi41IDAgMCAwIDAgMy41MzZMNS45NSAxMy45NmEyLjUgMi41IDAgMCAwIDMuNTM1IDBsNC4yNDMtNC4yNDN6bTYuOSA3LjIwMi0uMzQ1LjM2My0uMzQ0LS4zNjNhLjUuNSAwIDAgMSAuNjg4IDBtLS4zNDUgMS4wOGE4IDggMCAwIDAtLjI4LjMyMyA0LjMgNC4zIDAgMCAwLS40MDkuNTgyYy0uMTEzLjIwMS0uMTQ0LjMyNi0uMTQ0LjM3OGEuODMzLjgzMyAwIDAgMCAxLjY2NyAwYzAtLjA1Mi0uMDMxLS4xNzctLjE0NC0uMzc4YTQuMyA0LjMgMCAwIDAtLjQxLS41ODIgOCA4IDAgMCAwLS4yOC0uMzIybS0uMzQ0LTEuMDguMzQ0LjM2My4zNDQtLjM2My4wMDIuMDAyLjAwNC4wMDQuMDEzLjAxMmE2IDYgMCAwIDEgLjIwNi4yMDhjLjEzMS4xMzYuMzA4LjMyNy40ODUuNTQ1LjE3Ni4yMTUuMzYzLjQ2Ny41MDcuNzI0LjEzNy4yNDMuMjczLjU1My4yNzMuODY4YTEuODMzIDEuODMzIDAgMSAxLTMuNjY3IDBjMC0uMzE1LjEzNi0uNjI1LjI3My0uODY4LjE0NC0uMjU3LjMzLS41MDkuNTA3LS43MjRhOSA5IDAgMCAxIC42NDUtLjcwOGwuMDQ2LS4wNDUuMDEzLS4wMTIuMDA0LS4wMDR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-hollow-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1vcGFjaXR5PSIuMTUiIGQ9Ik01IDVoM3YxMEg1eiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMXYzaDJ2MTJIN3YzSDZ2LTNINFY0aDJWMXpNNSA1aDN2MTBINXptNyAyaDN2NmgtM3ptLTEgN1Y2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-horizontal-line,.ag-charts-icon-horizontal-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNLjUgOS41aDcuMzA2YTIuMjUgMi4yNSAwIDAgMSA0LjM4OCAwSDE5LjV2MWgtNy4zMDZhMi4yNSAyLjI1IDAgMCAxLTQuMzg4IDBILjV6bTkuNSAxLjc1YTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQuMjQyIDIuNzIyYy0uNjEyIDAtMS4yLjI0My0xLjYzMi42NzVsLTEuMzQzIDEuMzQ0YS41LjUgMCAwIDAtLjExMi4xMTJMNC4wNSAxMS45NTljLS4yMDcuMjA3LS4zNi40Ni0uNDQ2Ljc0di4wMDFsLS42OSAyLjc2N3YuMDAyYS44Mi44MiAwIDAgMCAxLjAyMiAxLjAyMWguMDAybDIuNjM0LS44MjJjLjI4LS4wODUuNTM0LS4yMzcuNzQtLjQ0M2w3LjEwNy03LjEwOGEuNS41IDAgMCAwIC4xMTItLjExMmwxLjM0My0xLjM0M2EyLjMwOCAyLjMwOCAwIDAgMC0xLjYzMi0zLjk0TTE0LjEyMiA3bDEuMDQ0LTEuMDQ1YTEuMzA4IDEuMzA4IDAgMSAwLTEuODQ5LTEuODVMMTIuMjcxIDUuMTV6bS0yLjU1OC0xLjE0Mi02LjgwNyA2LjgwOWEuOC44IDAgMCAwLS4xOTYuMzI1bC0uNzUgMi40NjggMi40Ny0uNzQ5YS44LjggMCAwIDAgLjMyNS0uMTk0bDYuODA4LTYuODF6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTcuMzYyIDQuODczLTQuNTk0IDYuNjU0LTQuODUtMy4zMTctNC4yNTEgNi45NzctLjg1NC0uNTJMNy42MTIgNi43OWw0Ljg5OSAzLjM1IDQuMDI4LTUuODM2eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-line-style-dashed{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDR2MUgyem0xMiAwaDR2MWgtNHpNOCA5aDR2MUg4eiIvPjwvc3ZnPg==)}.ag-charts-icon-line-style-dotted{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIyLjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTAuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSIxMi41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjE0LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-line-style-solid{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDE2djFIMnoiLz48L3N2Zz4=)}.ag-charts-icon-line-with-markers-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTk4IDQuODg4LTMuNTU2IDQuOTE4YTIuMjUgMi4yNSAwIDEgMS0zLjg2Ni43NWwtMS40MzItLjlhMi4yNCAyLjI0IDAgMCAxLTIuMDA5LjQzNWwtMy44MjggNi40MjgtLjg2LS41MTJMNi40NSA5LjYyM2EyLjI1IDIuMjUgMCAxIDEgMy41MS0uNzYxbDEuMzI5LjgzNWEyLjI0IDIuMjQgMCAwIDEgMi41NTctLjQ5N2wzLjU0Mi00Ljg5OHptLTQuOTYgNS4xNTNhMS4yNSAxLjI1IDAgMSAwLS42NCAyLjQxOSAxLjI1IDEuMjUgMCAwIDAgLjY0LTIuNDE5TTkuMSA4LjMyMXEuMDY2LS4xOTIuMDY3LS40MDRhMS4yNSAxLjI1IDAgMSAwLS4wNjcuNDA0IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-lock,.ag-charts-icon-locked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuMjA3IDMuNzY0YTIuODk0IDIuODk0IDAgMCAwLTIuODk1IDIuODk0VjloNS43ODlWNi42NThhMi44OTQgMi44OTQgMCAwIDAtMi44OTUtMi44OTRNMTQuMSA5VjYuNjU4YTMuODk0IDMuODk0IDAgMSAwLTcuNzg5IDB2Mi4zNDlBMi41IDIuNSAwIDAgMCA0IDExLjV2M0EyLjUgMi41IDAgMCAwIDYuNSAxN2g4YTIuNSAyLjUgMCAwIDAgMi41LTIuNXYtM0EyLjUgMi41IDAgMCAwIDE0LjUgOXpNNi41IDEwQTEuNSAxLjUgMCAwIDAgNSAxMS41djNBMS41IDEuNSAwIDAgMCA2LjUgMTZoOGExLjUgMS41IDAgMCAwIDEuNS0xLjV2LTNhMS41IDEuNSAwIDAgMC0xLjUtMS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-measurer-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibTQuNDYxIDEyLjcxIDEuNTMyLTEuNTMxIDEuNDE0IDEuNDE0LjcwNy0uNzA3TDYuNyAxMC40NzJsMS41MzItMS41MzMgMiAyIC43MDctLjcwNy0yLTIgNi4wMS02LjAxIDIuODMgMi44MjhMNS4wNSAxNy43NzggMi4yMjIgMTQuOTVsMS41MzItMS41MzIgMS40MTQgMS40MTQuNzA3LS43MDd6TS44MDggMTQuOTVsLjcwNy0uNzA3TDE0LjI0MyAxLjUxNWwuNzA3LS43MDcuNzA3LjcwNyAyLjgyOCAyLjgyOC43MDcuNzA3LS43MDcuNzA3TDUuNzU3IDE4LjQ4NWwtLjcwNy43MDctLjcwNy0uNzA3LTIuODI4LTIuODI4em0xMS4wNzgtNi44MzVMMTAuNDcgNi43bC43MDctLjcwNyAxLjQxNSAxLjQxNHptLjgyNC0zLjY1NCAxIDEgLjcwOC0uNzA3LTEtMXoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-note-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtMy4yMWwtMS40NjkgMi41N2ExIDEgMCAwIDEtMS42ODIuMDg1TDcuMjQzIDE0SDQuNUExLjUgMS41IDAgMCAxIDMgMTIuNXpNNC41IDRhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDMuMjU3bDIuMTk2IDMuMDc0TDExLjcxIDEzaDMuNzlhLjUuNSAwIDAgMCAuNS0uNXYtOGEuNS41IDAgMCAwLS41LS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi41IDYuNUEuNS41IDAgMCAxIDcgNmg2YS41LjUgMCAwIDEgMCAxSDdhLjUuNSAwIDAgMS0uNS0uNU02LjUgOS41QS41LjUgMCAwIDEgNyA5aDZhLjUuNSAwIDAgMSAwIDFIN2EuNS41IDAgMCAxLS41LS41IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-ohlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTEzIDExaC0zdi0xaDNWM2gxdjJoNHYxaC00djExaC0xek02IDE3di0yaDN2LTFINlY0SDV2MUgydjFoM3YxMXoiLz48L3N2Zz4=)}.ag-charts-icon-pan-end{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0ibTYuNjQ2IDEzLjgxMy0uMzUzLjM1NC43MDcuNzA3LjM1NC0uMzU0ek0xMS4xNjYgMTBsLjM1NC4zNTQuMzU0LS4zNTQtLjM1NC0uMzU0ek03LjM1NSA1LjQ4IDcgNS4xMjZsLS43MDcuNzA3LjM1My4zNTR6bTAgOS4wNCA0LjE2Ni00LjE2Ni0uNzA3LS43MDgtNC4xNjcgNC4xNjd6bTQuMTY2LTQuODc0TDcuMzU0IDUuNDhsLS43MDguNzA3IDQuMTY3IDQuMTY3ek0xMy4wODMgNXYxMGgxVjV6Ii8+PC9zdmc+)}.ag-charts-icon-pan-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuNzkgNS44MzMgOC42MjUgMTBsNC4xNjYgNC4xNjctLjcwNy43MDdMNy4yMSAxMGw0Ljg3My00Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy4yMSAxNC4xNjcgMTEuMzc2IDEwIDcuMjEgNS44MzNsLjcwNy0uNzA3TDEyLjc5IDEwbC00Ljg3MyA0Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-start{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgNXYxMGgxVjV6TTkuNjI0IDEwbDQuMTY2LTQuMTY3LS43MDctLjcwN0w4LjIxIDEwbDQuODc0IDQuODc0LjcwNy0uNzA3eiIvPjwvc3ZnPg==)}.ag-charts-icon-parallel-channel,.ag-charts-icon-parallel-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzIgNS4zMzFBMi4yNSAyLjI1IDAgMSAwIDE0LjcwNSAzLjZsLTkuNDkgNC41NjJhMi4yNSAyLjI1IDAgMSAwIC4yMDkgMS4wMWw5LjY2Mi00LjY0NmEyLjI1IDIuMjUgMCAwIDAgMi42MzQuODA1bS4zNzMtMi41NDdhMS4yNSAxLjI1IDAgMSAxLTIuMzM4Ljg4NSAxLjI1IDEuMjUgMCAwIDEgMi4zMzgtLjg4NU00LjM0MyA4LjY3YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODVNNS4zMDcgMTYuNzI4YTIuMjUgMi4yNSAwIDEgMS0uNTI1LS44NThsOS45MjMtNC43N2EyLjI1IDIuMjUgMCAxIDEgLjM4MS45MjZ6bS0uOTY0LjI3NGExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjAyMy01LjEwNmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-position-bottom{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzem0zLTNoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgMTNoOHYxSDZ6Ii8+PC9zdmc+)}.ag-charts-icon-position-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMyAxMGgxNHYxSDN6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDdoOHYxSDZ6bTAgNmg4djFINnoiLz48L3N2Zz4=)}.ag-charts-icon-position-top{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzeiIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik02IDdoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDEzaDh2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-price-label-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNC41IDNBMS41IDEuNSAwIDAgMCAzIDQuNVYxM2ExLjUgMS41IDAgMCAwIDEuNSAxLjVoLjgzM3YuMDU3Yy4yNDItLjI5OS41OTctLjUwMyAxLS41NDhWMTMuNUg0LjVBLjUuNSAwIDAgMSA0IDEzVjQuNWEuNS41IDAgMCAxIC41LS41aDExYS41LjUgMCAwIDEgLjUuNXY4YS41LjUgMCAwIDEtLjUuNWgtNC44MThsLS4xMjYuMDg0YTI2IDI2IDAgMCAwLTIuMjI1IDEuNjg1bC0uMzIuMjY1LS4wNjguMDU2YTEuNSAxLjUgMCAwIDEtMi42MDkgMS4zNTRjLjAzMy43NjMuOTA1IDEuMjM4IDEuNTYuNzU2LjY0Ni0uNDc0IDEuMjEtLjk0MyAxLjc2MS0xLjRsLjMxMy0uMjZBMjYgMjYgMCAwIDEgMTAuOTg2IDE0SDE1LjVhMS41IDEuNSAwIDAgMCAxLjUtMS41di04QTEuNSAxLjUgMCAwIDAgMTUuNSAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43MTYgMTQuODE1YTIuMjUgMi4yNSAwIDEgMS00LjIxIDEuNTkzIDIuMjUgMi4yNSAwIDAgMSA0LjIxLTEuNTkzbS0xLjY2MiAxLjk2NmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS41IDYuMjI4IDcuMTY3IDguMzc2IDYuNSA3Ljc2MiA5LjUgNWwzIDIuNzYyLS42NjcuNjE0eiIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik0yIDE4di0xaDE2djF6TTIgM1YyaDE2djF6IiBmaWxsPSIjMTgxRDFGIi8+PC9zdmc+)}.ag-charts-icon-reset{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuMDQgNC40NDVhNS44MSA1LjgxIDAgMCAwLTcuMjU3IDIuNDUzLjUuNSAwIDAgMS0uODY1LS41MDJBNi44MSA2LjgxIDAgMSAxIDMgOS44MTNhLjUuNSAwIDAgMSAxIDAgNS44MSA1LjgxIDAgMSAwIDguMDQtNS4zNjgiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjg5IDMuMDAyYS41LjUgMCAwIDEgLjUuNXYyLjY1NWgyLjY1NWEuNS41IDAgMCAxIDAgMUg0LjI5YS41LjUgMCAwIDEtLjUtLjVWMy41MDJhLjUuNSAwIDAgMSAuNS0uNSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-settings{--icon: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkIj48cGF0aCBkPSJNMTAgMTNhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2bTAtMWEyIDIgMCAxIDEtLjAwMS0zLjk5OUEyIDIgMCAwIDEgMTAgMTIiLz48cGF0aCBkPSJNMi4zMSAxNC4zNDVjLS44MTctMS40OTEuMDI3LTIuNDk5LjQ3NC0yLjg2NS41MzEtLjQzNC45NjktLjM2NS45NzItMS40OC0uMDAzLTEuMTE1LS40NDEtMS4wNDYtLjk3Mi0xLjQ4MS0uNDU0LS4zNzEtMS4zMTctMS40MDUtLjQzNC0yLjkzNmwuMDA1LS4wMDljLjg4NC0xLjUyIDIuMjA3LTEuMjkgMi43NTUtMS4wODMuNjQxLjI0My44MDEuNjU2IDEuNzY4LjEwMS45NjQtLjU2LjY4Ni0uOTA0Ljc5Ni0xLjU4Mi4wOTQtLjU3OC41NTktMS44NDMgMi4zMjYtMS44NDNoLjAxYzEuNzU5LjAwNSAyLjIyMiAxLjI2NiAyLjMxNiAxLjg0My4xMS42NzgtLjE2OCAxLjAyMi43OTYgMS41ODIuOTY3LjU1NSAxLjEyNy4xNDIgMS43NjgtLjEwMS41NDktLjIwOCAxLjg3Ni0uNDM4IDIuNzYgMS4wOTJzLjAyIDIuNTY1LS40MzQgMi45MzZjLS41MzEuNDM1LS45NjkuMzY2LS45NzIgMS40ODEuMDAzIDEuMTE1LjQ0MSAxLjA0Ni45NzIgMS40OC40NTQuMzcyIDEuMzE3IDEuNDA2LjQzNCAyLjkzN2wtLjAwNS4wMDljLS44ODQgMS41Mi0yLjIwNyAxLjI5LTIuNzU1IDEuMDgzLS42NDEtLjI0My0uODAxLS42NTYtMS43NjgtLjEwMS0uOTY0LjU2LS42ODYuOTA0LS43OTYgMS41ODEtLjA5NC41NzktLjU1OSAxLjg0NC0yLjMyNiAxLjg0NGgtLjAxYy0xLjc1OS0uMDA1LTIuMjIyLTEuMjY2LTIuMzE2LTEuODQ0LS4xMS0uNjc3LjE2OC0xLjAyMS0uNzk2LTEuNTgxLS45NjctLjU1NS0xLjEyNy0uMTQyLTEuNzY4LjEwMS0uNTQ5LjIwOC0xLjg3Ni40MzgtMi43Ni0xLjA5MmwtLjAyLS4wMzZ6TTkuOTg0IDIuMTYySDEwYzEuMzU1IDAgMS4zNDIgMS4wMzkgMS4zNTMgMS40MjUuMDA4LjMxMi4wNCAxLjE2IDEuMjU5IDEuODcybC4wMTUuMDA4YzEuMjI1LjcgMS45NzYuMzA0IDIuMjUxLjE1NS4zMzctLjE4MyAxLjIyNi0uNzExIDEuOTAyLjQ0NWwuMDA4LjAxNGMuNjc4IDEuMTczLS4yMjkgMS42ODItLjU1OCAxLjg4NC0uMjY2LjE2My0uOTg0LjYxNS0uOTkxIDIuMDI3di4wMTZjLjAwNyAxLjQxMi43MjUgMS44NjQuOTkxIDIuMDI3LjMyOC4yMDEgMS4yMjkuNzA3LjU2NiAxLjg3bC0uMDA4LjAxNGMtLjY3NyAxLjE3NC0xLjU3MS42NDMtMS45MS40NTktLjI3NS0uMTQ5LTEuMDI2LS41NDUtMi4yNTEuMTU0bC0uMDE1LjAwOWMtMS4yMTkuNzEyLTEuMjUxIDEuNTYtMS4yNTkgMS44NzItLjAxMS4zODYuMDAyIDEuNDI1LTEuMzUzIDEuNDI1cy0xLjM0Mi0xLjAzOS0xLjM1My0xLjQyNWMtLjAwOC0uMzEyLS4wNC0xLjE2LTEuMjU5LTEuODcybC0uMDE1LS4wMDljLTEuMjI1LS42OTktMS45NzYtLjMwMy0yLjI1MS0uMTU0LS4zMzYuMTgzLTEuMjE5LjcwNi0xLjg5NC0uNDMybC0uMDE2LS4wMjdjLS42NzgtMS4xNzQuMjI5LTEuNjgyLjU1OC0xLjg4NC4yNjYtLjE2My45ODQtLjYxNS45OTEtMi4wMjd2LS4wMTZjLS4wMDctMS40MTItLjcyNS0xLjg2NC0uOTkxLTIuMDI3LS4zMjgtLjIwMS0xLjIyOS0uNzA3LS41NjYtMS44N2wuMDA4LS4wMTRjLjY3Ny0xLjE3NCAxLjU3MS0uNjQzIDEuOTEtLjQ1OS4yNzUuMTQ5IDEuMDI2LjU0NSAyLjI1MS0uMTU1bC4wMTUtLjAwOGMxLjIxOS0uNzEyIDEuMjUxLTEuNTYgMS4yNTktMS44NzIuMDEtLjM4NC0uMDAyLTEuNDE3IDEuMzM3LTEuNDI1Ii8+PC9zdmc+)}.ag-charts-icon-step-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzE4MUQxRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNiA0aDV2OGgzVjhoNXYxaC00djRoLTVWNUg3djEwSDJ2LTFoNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-text-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00IDRIMTZWN0gxNVY1SDEwLjVWMTVIMTRWMTZINlYxNUg5LjVWNUg1VjdINFY0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-trend-line,.ag-charts-icon-trend-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS4zMTQgMTAuOTM4YTIuMjUgMi4yNSAwIDEgMSAuMDEtMWg5LjM1MmEyLjI1IDIuMjUgMCAxIDEgLjAxIDF6bS0yLjE4OS43MjlhMS4yNSAxLjI1IDAgMSAwIDAtMi41IDEuMjUgMS4yNSAwIDAgMCAwIDIuNW0xMy43NSAwYTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock,.ag-charts-icon-unlocked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNjUxIDMuNWEyLjg5NCAyLjg5NCAwIDAgMC0yLjg5NCAyLjg5NFY5SDE0LjVhMi41IDIuNSAwIDAgMSAyLjUgMi41djNhMi41IDIuNSAwIDAgMS0yLjUgMi41aC04QTIuNSAyLjUgMCAwIDEgNCAxNC41di0zQTIuNSAyLjUgMCAwIDEgNi41IDloLjI1N1Y2LjM5NGEzLjg5NCAzLjg5NCAwIDEgMSA3Ljc4OSAwIC41LjUgMCAwIDEtMSAwQTIuODk0IDIuODk0IDAgMCAwIDEwLjY1IDMuNU02LjUgMTBBMS41IDEuNSAwIDAgMCA1IDExLjV2M0ExLjUgMS41IDAgMCAwIDYuNSAxNmg4YTEuNSAxLjUgMCAwIDAgMS41LTEuNXYtM2ExLjUgMS41IDAgMCAwLTEuNS0xLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-vertical-line,.ag-charts-icon-vertical-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNSA3LjgwNmEyLjI1IDIuMjUgMCAwIDEgMCA0LjM4OFYxOS41aC0xdi03LjMwNmEyLjI1IDIuMjUgMCAwIDEgMC00LjM4OFYuNWgxem0tLjUuOTQ0YTEuMjUgMS4yNSAwIDEgMSAwIDIuNSAxLjI1IDEuMjUgMCAwIDEgMC0yLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-zoom-in{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS41IDEwYS41LjUgMCAwIDEgLjUtLjVoOGEuNS41IDAgMCAxIDAgMUg2YS41LjUgMCAwIDEtLjUtLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-high-low-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyA0aDJ2MTJINFY0aDNNNSA1aDN2MTBINXpNMTEgMTRWNmg1djhoLTVtMS03aDN2NmgtM3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTYzIDEuODM3LTUuMzM0IDExLjYyMUw2Ljk1NyA4LjEybC00LjE5OSA5LjYyMi0uOTE2LS40IDQuNzU2LTEwLjlMMTIuNDkgMTEuOCAxNy4yNTQgMS40MnoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODI1IDIuNzA0LjU1IDEzLjc4NWwuOTAyLjQzIDQuNzI0LTkuOTE5IDYuMDM0IDUuMDI5IDMuMjU1LTguMTQtLjkyOC0uMzctMi43NDUgNi44NnptNy44NTIgMTQuNjM2IDUuNzgtMTMuMTM5LS45MTUtLjQwMi01LjIxOSAxMS44Ni02LjAwNS01LjUwNC0zLjI3OCA3LjY0OC45Mi4zOTQgMi43MjItNi4zNTJ6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-chevron-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03LjQ3IDUuNDdhLjc1Ljc1IDAgMCAxIDEuMDYgMGw0IDRhLjc1Ljc1IDAgMCAxIDAgMS4wNmwtNCA0YS43NS43NSAwIDAgMS0xLjA2LTEuMDZMMTAuOTQgMTAgNy40NyA2LjUzYS43NS43NSAwIDAgMSAwLTEuMDYiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-alt{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+)}.ag-charts-icon-zoom-out-alt{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=)}.ag-charts-input{--input-layer-active: 1;--input-layer-focus: 2;--input-padding: calc(var(--ag-charts-spacing) * 2);--input-padding-large: calc(var(--ag-charts-spacing) * 2.5);color:var(--ag-charts-input-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-large);transition-duration:.25s;transition-property:none;transition-timing-function:ease-out}.ag-charts-input:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:var(--input-layer-focus)}.ag-charts-button{background:var(--ag-charts-button-background-color);border:var(--ag-charts-button-border);border-radius:var(--ag-charts-button-border-radius);color:var(--ag-charts-button-text-color);cursor:pointer;padding:var(--input-padding);transition-property:background,border-color}.ag-charts-button:hover{background:var(--ag-charts-focus-color)}.ag-charts-button:has(.ag-charts-icon){padding:2px}.ag-charts-checkbox{--checkbox-transition-duration: .1s;appearance:none;background:var(--ag-charts-checkbox-background-color);border-radius:calc(var(--ag-charts-border-radius) * 9);cursor:pointer;height:18px;margin:0;transition-duration:var(--checkbox-transition-duration);transition-property:margin;width:29px}.ag-charts-checkbox:before{display:block;background:var(--ag-charts-input-background-color);border-radius:calc(var(--ag-charts-border-radius) * 7);content:" ";height:14px;margin:2px;transition-duration:var(--checkbox-transition-duration);transition-property:margin;transition-timing-function:var(--ag-charts-input-transition-easing);width:14px}.ag-charts-checkbox:checked{background:var(--ag-charts-checkbox-checked-background-color)}.ag-charts-checkbox:checked:before{margin-left:13px}.ag-charts-select{background:var(--ag-charts-input-background-color);border:var(--ag-charts-input-border);border-radius:var(--ag-charts-input-border-radius);padding:3px 2px 4px;font-size:inherit}.ag-charts-textarea{--textarea-line-height: 1.38;background:var(--ag-charts-input-background-color);border:var(--ag-charts-input-border);border-radius:var(--ag-charts-input-border-radius);line-height:var(--textarea-line-height);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-large);padding:var(--input-padding-large) var(--input-padding)}.ag-charts-textarea::placeholder{color:var(--ag-charts-input-placeholder-text-color)}.ag-charts-proxy-container{pointer-events:none;position:absolute}.ag-charts-proxy-elem{-webkit-appearance:none;appearance:none;background:none;border:none;color:#0000;overflow:hidden;pointer-events:auto;position:absolute}.ag-charts-proxy-elem::-moz-range-thumb,.ag-charts-proxy-elem::-moz-range-track{opacity:0}.ag-charts-proxy-elem::-webkit-slider-runnable-track,.ag-charts-proxy-elem::-webkit-slider-thumb{opacity:0}.ag-charts-proxy-elem:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus-indicator{position:absolute;display:block;pointer-events:none;user-select:none;-webkit-user-select:none;width:100%;height:100%}.ag-charts-focus-indicator>div{position:absolute;outline:solid 1px var(--ag-charts-chrome-background-color);box-shadow:var(--ag-charts-focus-shadow)}.ag-charts-focus-indicator>svg{width:100%;height:100%;fill:none;overflow:visible}.ag-charts-focus-svg-outer-path{stroke:var(--ag-charts-chrome-background-color);stroke-width:4px}.ag-charts-focus-svg-inner-path{stroke:var(--ag-charts-accent-color);stroke-width:2px}.ag-charts-overlay{color:#181d1f;pointer-events:none}.ag-charts-overlay.ag-charts-dark-overlay{color:#fff}.ag-charts-overlay--loading{color:#8c8c8c}.ag-charts-overlay__loading-background{background:#fff;pointer-events:none}.ag-charts-overlay.ag-charts-dark-overlay .ag-charts-overlay__loading-background{background:#192232}.ag-charts-tooltip{--tooltip-arrow-size: 8px;--tooltip-row-spacing: 8px;--tooltip-column-spacing: 16px;position:fixed;inset:unset;margin:0;padding:0;overflow:visible;top:var(--top, 0px);left:var(--left, 0px);width:max-content;max-width:100%;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);color:var(--ag-charts-tooltip-text-color);background:var(--ag-charts-tooltip-background-color);border:var(--ag-charts-tooltip-border);border-radius:var(--ag-charts-tooltip-border-radius);box-shadow:var(--ag-charts-popup-shadow)}.ag-charts-tooltip--compact .ag-charts-tooltip-content{--tooltip-row-spacing: 2px;--tooltip-column-spacing: 8px;padding:3px 6px}.ag-charts-tooltip--arrow-top:before,.ag-charts-tooltip--arrow-right:before,.ag-charts-tooltip--arrow-bottom:before,.ag-charts-tooltip--arrow-left:before{content:"";position:absolute;display:block;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);border:inherit;border-bottom-color:transparent;border-right-color:transparent;background:inherit;clip-path:polygon(0 0,100% 0,100% 1px,1px 100%,0 100%)}.ag-charts-tooltip--arrow-top:before{bottom:100%;left:50%;transform:translate(-50%) translateY(calc(var(--tooltip-arrow-size) * .5)) rotate(45deg)}.ag-charts-tooltip--arrow-bottom:before{top:100%;left:50%;transform:translate(-50%) translateY(calc(var(--tooltip-arrow-size) * -.5)) rotate(225deg)}.ag-charts-tooltip--arrow-left:before{right:100%;top:50%;transform:translateY(-50%) translate(calc(var(--tooltip-arrow-size) * .5)) rotate(315deg)}.ag-charts-tooltip--arrow-right:before{left:100%;top:50%;transform:translateY(-50%) translate(calc(var(--tooltip-arrow-size) * -.5)) rotate(135deg)}.ag-charts-tooltip--no-interaction{pointer-events:none;user-select:none;-webkit-user-select:none}.ag-charts-tooltip--wrap-always{overflow-wrap:break-word;word-break:break-word;hyphens:none}.ag-charts-tooltip--wrap-hyphenate{overflow-wrap:break-word;word-break:break-word;hyphens:auto}.ag-charts-tooltip--wrap-on-space{overflow-wrap:normal;word-break:normal}.ag-charts-tooltip--wrap-never{white-space:nowrap}.ag-charts-tooltip-heading,.ag-charts-tooltip-title,.ag-charts-tooltip-label,.ag-charts-tooltip-value{overflow:hidden;text-overflow:ellipsis}.ag-charts-tooltip-content{display:grid;grid:auto-flow minmax(1em,auto) / 1fr;padding:8px 12px;gap:var(--tooltip-row-spacing)}.ag-charts-tooltip-content:has(.ag-charts-tooltip-symbol){grid:auto-flow minmax(1em,auto) / auto 1fr}.ag-charts-tooltip-heading{grid-column:1 / -1}.ag-charts-tooltip-symbol{grid-column:1 / 2;place-self:center}.ag-charts-tooltip-symbol svg{display:block}.ag-charts-tooltip-title{grid-column:-2 / -1}.ag-charts-tooltip-row{grid-column:1 / -1;display:flex;gap:var(--tooltip-column-spacing);align-items:baseline;justify-content:space-between;overflow:hidden}.ag-charts-tooltip-row--inline{grid-column:-2 / -1}.ag-charts-tooltip-label{flex:1;min-width:0}.ag-charts-tooltip-value{min-width:0}.ag-charts-tooltip-footer{grid-column:1 / -1;color:var(--ag-charts-tooltip-subtle-text-color);text-align:center}.ag-charts-popover{position:absolute;border:var(--ag-charts-border);border-radius:var(--ag-charts-border-radius);background:var(--ag-charts-panel-background-color);color:var(--ag-charts-chrome-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);box-shadow:var(--ag-charts-popup-shadow);z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-menu{--item-padding: 6px 12px;--icon-color: var(--ag-charts-menu-text-color);display:grid;grid:auto-flow auto / 1fr;column-gap:12px;font-size:var(--ag-charts-chrome-font-size)}.ag-charts-menu:has(.ag-charts-menu__icon,.ag-charts-menu__row--stroke-width-visible){grid:auto-flow auto / auto 1fr}.ag-charts-menu__row--stroke-width-visible:before{content:"";height:var(--strokeWidth);width:12px;background:var(--icon-color)}.ag-charts-menu__row--stroke-width-visible[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-menu__row{display:grid;grid-column:1 / -1;grid-template-columns:subgrid;align-items:center;padding:var(--item-padding)}.ag-charts-menu__row:not(.ag-charts-menu__row--active){cursor:pointer}.ag-charts-menu__row:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.ag-charts-menu__row:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.ag-charts-menu__row:focus{background:var(--ag-charts-focus-color)}.ag-charts-menu__row:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:var(--ag-charts-layer-menu)}.ag-charts-menu__row--active{--icon-color: var(--ag-charts-accent-color);background:var(--ag-charts-focus-color);color:var(--ag-charts-accent-color)}.ag-charts-menu__label{grid-column:-1 / span 1}.ag-charts-toolbar{--toolbar-gap: calc(var(--ag-charts-spacing) * 2);--toolbar-size: 34px;--toolbar-button-padding: 6px;align-items:center;display:flex;flex-wrap:nowrap;position:absolute}.ag-charts-toolbar__button{align-items:center;background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-button-border);color:var(--ag-charts-button-text-color);cursor:pointer;display:flex;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-medium);font-weight:var(--ag-charts-chrome-font-weight);justify-content:center;min-height:var(--toolbar-size);min-width:var(--toolbar-size);padding:var(--toolbar-button-padding);position:relative;transition:background-color .25s ease-in-out,border-color .25s ease-in-out,color .25s ease-in-out;white-space:nowrap}.ag-charts-toolbar__button:hover{background:var(--ag-charts-focus-color);z-index:1}.ag-charts-toolbar__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-toolbar__button--active{background:var(--ag-charts-focus-color);border-color:var(--ag-charts-accent-color);color:var(--ag-charts-accent-color);z-index:2}.ag-charts-toolbar__button[aria-disabled=true]{background:var(--ag-charts-button-disabled-background-color);color:var(--ag-charts-button-disabled-text-color);cursor:default}.ag-charts-toolbar--horizontal{flex-direction:row;.ag-charts-toolbar__button{margin:0 0 0 -1px}.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius);margin:0}.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--vertical{flex-direction:column;.ag-charts-toolbar__button{margin:-1px 0 0;max-width:100%}.ag-charts-toolbar__button--first{border-top-left-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-left-radius:var(--ag-charts-border-radius);border-bottom-right-radius:var(--ag-charts-border-radius)}}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{margin-left:var(--toolbar-gap)}.ag-charts-toolbar__icon,.ag-charts-toolbar__label{pointer-events:none}.ag-charts-floating-toolbar{border:none;display:flex;.ag-charts-toolbar{align-items:unset;position:unset}}.ag-charts-floating-toolbar__drag-handle{align-items:center;background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius);cursor:grab;display:flex;justify-content:center;min-width:24px;padding-left:0;padding-right:0}.ag-charts-floating-toolbar__drag-handle--dragging{cursor:grabbing}
`}}),Tv,_A=I({"packages/ag-charts-community/src/util/baseManager.ts"(){"use strict";R(),Tv=class{constructor(){this.cleanup=new Fe,this.destroyed=!1}destroy(){this.cleanup.flush(),this.destroyed=!0}}}}),zE,I6=I({"packages/ag-charts-community/src/util/guardedElement.ts"(){"use strict";R(),zE=class oI{constructor(e,i,s){this.element=e,this.topTabGuard=i,this.bottomTabGuard=s,this.cleanup=new Fe,this.guardTabIndex=0,this.hasFocus=!1,this.initTabGuard(this.topTabGuard,!1),this.initTabGuard(this.bottomTabGuard,!0),this.element.addEventListener("focus",()=>this.onFocus(),{capture:!0}),this.element.addEventListener("blur",a=>this.onBlur(a),{capture:!0})}set tabIndex(e){this.guardTabIndex=e,this.guardTabIndex===0?this.setGuardIndices(void 0):this.hasFocus||this.setGuardIndices(this.guardTabIndex)}destroy(){this.cleanup.flush()}initTabGuard(e,i){this.cleanup.register(fe(e,"focus",()=>this.onTab(e,i)))}setGuardIndices(e){const i=e;Ut(this.topTabGuard,"tabindex",i),Ut(this.bottomTabGuard,"tabindex",i)}onFocus(){this.hasFocus=!0,this.guardTabIndex!==0&&this.setGuardIndices(0)}onBlur({relatedTarget:e}){const{topTabGuard:i,bottomTabGuard:s}=this;this.hasFocus=!1,this.guardTabIndex!==0&&e!==i&&e!==s&&this.setGuardIndices(this.guardTabIndex)}onTab(e,i){if(this.guardTabIndex!==0){let s;e.tabIndex===0?(s=this.findExitTarget(!i),this.setGuardIndices(this.guardTabIndex)):s=this.findEnterTarget(i),s?.focus()}}static queryFocusable(e,i){const s=de();return Array.from(e.querySelectorAll(i)).filter(a=>{if(a instanceof HTMLElement){const n=s.getComputedStyle(a);return n.display!=="none"&&n.visibility!=="none"}return!1})}findEnterTarget(e){const i=oI.queryFocusable(this.element,'[tabindex="0"]'),s=e?i.length-1:0;return i[s]}findExitTarget(e){const i=oI.queryFocusable(wo(),"[tabindex]").filter(n=>n.tabIndex>0).sort((n,o)=>n.tabIndex-o.tabIndex),{before:s,after:a}=oI.findBeforeAndAfter(i,this.guardTabIndex);return e?s:a}static findBeforeAndAfter(e,i){let s=0,a=e.length-1,n,o;for(;s<=a;){const r=Math.floor((s+a)/2),l=e[r].tabIndex;if(l===i){n=e[r-1]||void 0,o=e[r+1]||void 0;break}else l<i?(n=e[r],s=r+1):(o=e[r],a=r-1)}return{before:n,after:o}}}}});function Nv(t,e,i=["Escape"]){return fe(t,"keydown",s=>{Ov(s,...i)&&e(s)})}function EA(t,e){const i=fe(de(),"mousedown",s=>{[0,2].includes(s.button)&&!FE(t,s)&&(e(),i())});return i}function RA(t,e){const i=fe(de(),"touchstart",s=>{Array.from(s.targetTouches).some(n=>!FE(t,n))&&(e(),i())});return i}function FE(t,e){return e.target instanceof Node&&t.contains(e.target)}function BA(t,e,i){const s=a=>{for(const n of e)Ut(n,"data-focus-visible-override",a)};return s(i),fe(t,"keydown",()=>s(!0),{once:!0})}function Sm(t){return!(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)}function Ov(t,...e){return Sm(t)&&e.some(i=>t.key===i)}function VE(t,e,i){return fe(t,"keydown",s=>{Ov(s,i)&&e.focus()})}function GE(t){const{orientation:e,buttons:i,wrapAround:s=!1,onEscape:a,onFocus:n,onBlur:o}=t,{nextKey:r,prevKey:l}=wu[e],c=p=>{p.target&&"tabIndex"in p.target&&(i.forEach(g=>g.tabIndex=-1),p.target.tabIndex=0)},[h,u]=s?[i.length,i.length]:[0,1/0],d=new Fe;for(let p=0;p<i.length;p++){const g=i[(h+p-1)%u],f=i[p],x=i[(h+p+1)%u];d.register(fe(f,"focus",c),n&&fe(f,"focus",n),o&&fe(f,"blur",o),a&&Nv(f,a),g&&VE(f,g,l),x&&VE(f,x,r),fe(f,"keydown",m=>{Ov(m,r,l)&&m.preventDefault()})),f.tabIndex=p===0?0:-1}return d}function jE(t){const{sourceEvent:e,orientation:i,menu:s,buttons:a,closeCallback:n,overrideFocusVisible:o}=t,{nextKey:r,prevKey:l}=wu[i],c=_v(e);Ut(c,"aria-expanded",!0);const h=new HE(s,c,n),u=()=>h.close(),{cleanup:d}=h;return s.role="menu",s.ariaOrientation=i,d.merge(GE({orientation:i,buttons:a,onEscape:u,wrapAround:!0})),s.tabIndex=-1,d.register(Nv(s,u),fe(s,"keydown",p=>{p.target===s&&(p.key===r||p.key===l)&&(p.preventDefault(),a[0]?.focus())})),a[0]?.focus({preventScroll:!0}),o!==void 0&&d.register(BA(s,a,o)),h}function A6(t,e){return i=>{if(t.ariaDisabled==="true")return i.preventDefault();e(i)}}function Pv(t){return"button"in t?t.button===0:Sm(t)&&(t.code==="Space"||t.key==="Enter")}function _v(t){if(t?.target instanceof HTMLElement&&"tabindex"in t.target.attributes)return t.target}function WE(t){return fe(t,"keydown",e=>{if(e.defaultPrevented)return;cu(e.target,"data-preventdefault",!0)&&Ov(e,"ArrowRight","ArrowLeft","ArrowDown","ArrowUp")&&e.preventDefault()})}var wu,HE,Ac=I({"packages/ag-charts-community/src/util/keynavUtil.ts"(){"use strict";R(),wu={horizontal:{nextKey:"ArrowRight",prevKey:"ArrowLeft"},vertical:{nextKey:"ArrowDown",prevKey:"ArrowUp"}},HE=class{constructor(t,e,i){this.lastFocus=e,this.closeCallback=i,this.cleanup=new Fe,this.cleanup.register(EA(t,()=>this.close(!0)),RA(t,()=>this.close(!0)))}close(t){this.cleanup.flush(),this.closeCallback(),this.finishClosing(t)}finishClosing(t){this.cleanup.flush(),Ut(this.lastFocus,"aria-expanded",!1),t||this.lastFocus?.focus({preventScroll:!0}),this.lastFocus=void 0}}}}),$E,C6=I({"packages/ag-charts-community/src/util/pixelRatioObserver.ts"(){"use strict";R(),$E=class{constructor(t){this.callback=t,this.devicePixelRatio=de("devicePixelRatio")??1,this.devicePixelRatioMediaQuery=void 0,this.devicePixelRatioListener=e=>{e.matches||(this.devicePixelRatio=de("devicePixelRatio")??1,this.unregisterDevicePixelRatioListener(),this.registerDevicePixelRatioListener(),this.callback(this.pixelRatio))}}get pixelRatio(){return this.devicePixelRatio}observe(){this.registerDevicePixelRatioListener()}disconnect(){this.unregisterDevicePixelRatioListener()}unregisterDevicePixelRatioListener(){this.devicePixelRatioMediaQuery?.removeEventListener("change",this.devicePixelRatioListener),this.devicePixelRatioMediaQuery=void 0}registerDevicePixelRatioListener(){const t=de("matchMedia")?.(`(resolution: ${this.pixelRatio}dppx)`);t?.addEventListener("change",this.devicePixelRatioListener),this.devicePixelRatioMediaQuery=t}}}}),zA,UE=I({"packages/ag-charts-community/src/util/sizeMonitor.ts"(){"use strict";R(),C6(),zA=class{constructor(){this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach(([e,i])=>this.observe(e,i)),this.queuedObserveRequests=[],this.observeWindow()},typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(e=>{for(const{target:i,contentRect:{width:s,height:a}}of e){const n=this.elements.get(i);this.checkSize(n,i,s,a)}}));let t;this.pixelRatioObserver=new $E(()=>{clearTimeout(t),t=setTimeout(()=>this.checkPixelRatio(),0)}),this.documentReady=wo("readyState")==="complete",this.documentReady?this.observeWindow():de()?.addEventListener("load",this.onLoad)}destroy(){de()?.removeEventListener("load",this.onLoad),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.pixelRatioObserver?.disconnect(),this.pixelRatioObserver=void 0}observeWindow(){this.pixelRatioObserver?.observe()}checkPixelRatio(){const t=this.pixelRatioObserver?.pixelRatio??1;for(const[e,i]of this.elements)if(i.size!=null&&i.size.pixelRatio!==t){const{width:s,height:a}=i.size;i.size={width:s,height:a,pixelRatio:t},i.cb(i.size,e)}}checkSize(t,e,i,s){if(t&&(i!==t.size?.width||s!==t.size?.height)){const a=this.pixelRatioObserver?.pixelRatio??1;t.size={width:i,height:s,pixelRatio:a},t.cb(t.size,e)}}observe(t,e){if(!this.documentReady){this.queuedObserveRequests.push([t,e]);return}this.elements.has(t)?this.removeFromQueue(t):this.resizeObserver?.observe(t);const i={cb:e};this.elements.set(t,i)}unobserve(t){this.resizeObserver?.unobserve(t),this.elements.delete(t),this.removeFromQueue(t),this.elements.size||this.destroy()}removeFromQueue(t){this.queuedObserveRequests=this.queuedObserveRequests.filter(([e])=>e!==t)}}}}),Tu,Ev=I({"packages/ag-charts-community/src/util/stateTracker.ts"(){"use strict";Tu=class extends Map{constructor(t,e){super(),this.defaultValue=t,this.defaultState=e}set(t,e){return this.delete(t),typeof e<"u"&&super.set(t,e),delete this.cachedState,delete this.cachedValue,this}stateId(){return this.cachedState??(this.cachedState=Array.from(this.keys()).pop()??this.defaultState),this.cachedState}stateValue(){return this.cachedValue??(this.cachedValue=Array.from(this.values()).pop()??this.defaultValue),this.cachedValue}}}}),KE,L6=I({"packages/ag-charts-community/src/dom/domLayout.html"(){KE='<div role="presentation" class="ag-charts-wrapper ag-charts-styles" data-ag-charts><div role="presentation" class="ag-charts-canvas-center"><div role="presentation" class="ag-charts-canvas-container"><div role="presentation" class="ag-charts-canvas" aria-hidden="true"></div><div role="figure" class="ag-charts-canvas-proxy"><div role="presentation" class="ag-charts-series-area"></div></div><div role="presentation" class="ag-charts-canvas-overlay ag-charts-tooltip-container"></div></div></div></div>'}});function w6(t,e){if(typeof IntersectionObserver>"u")return;const i=new IntersectionObserver(s=>{for(const a of s)a.target===t&&e(a.intersectionRatio)},{root:t});return i.observe(t),i}function YE(t,e){const i=zt("div");return i.className="ag-charts-tab-guard",t.insertAdjacentElement(e,i),i}var ZE,XE,FA,qE,VA,Rv,GA,QE=I({"packages/ag-charts-community/src/dom/domManager.ts"(){"use strict";R(),Wt(),k6(),_A(),I6(),Ac(),UE(),Ev(),L6(),ZE=["styles","canvas","canvas-center","canvas-container","canvas-overlay","canvas-proxy","series-area","tooltip-container"],XE=new Set(["canvas-container","canvas","tooltip-container"]),FA={safeHorizontal:"ag-charts-wrapper--safe-horizontal",safeVertical:"ag-charts-wrapper--safe-vertical"},qE=new Map([["styles",{childElementType:"style"}],["canvas",{childElementType:"canvas"}],["canvas-proxy",{childElementType:"div"}],["canvas-overlay",{childElementType:"div"}],["canvas-center",{childElementType:"div"}],["series-area",{childElementType:"div"}],["tooltip-container",{childElementType:"div"}]]),VA={x:0,y:0,width:0,height:0,top:0,bottom:0,left:0,right:0,toJSON(){return VA}},Rv=class fp extends Tv{constructor(e,i,s,a,n="normal"){super(),this.eventsHub=e,this.chart=i,this.styleContainer=a,this.mode=n,this.anchorName=`--${zn(this)}`,this.styles=new Map,this.pendingContainer=void 0,this.container=void 0,this.documentRoot=void 0,this.initiallyConnected=void 0,this.containerSize=void 0,this.sizeMonitor=new zA,this.cursorState=new Tu("default"),this.minWidth=0,this.minHeight=0,this.element=this.initDOM(),this.rootElements=this.initRootElements(),this.rootElements.canvas.element.style.setProperty("anchor-name",this.anchorName);let o=!1;if(this.observer=w6(this.element,r=>{r===0&&!o&&this.eventsHub.emit("dom:hidden",null),o=r===0}),this.setSizeOptions(),this.updateContainerSize(),this.addStyles("ag-charts-community",BE),this.setContainer(s),this.cleanup.register(WE(this.element)),this.mode==="normal"){const r=this.rootElements["canvas-center"].element;if(r==null)throw new Error("Error initializing tab guards");const l=YE(r,"beforebegin"),c=YE(r,"afterend");this.tabGuards=new zE(r,l,c)}}initDOM(){if(this.mode==="normal"){const s=zt("div");return s.innerHTML=KE,s.firstChild}const e=zt("div");e.role="presentation",e.dataset.agCharts="",e.classList.add("ag-charts-wrapper");const i=zt("div");return e.appendChild(i),i.role="presentation",i.classList.add("ag-charts-series-area"),e}initRootElements(){const{mode:e,element:i}=this,s={};for(const a of ZE){const n=`ag-charts-${a}`;let o;if(e==="normal"?o=i.classList.contains(n)?i:i.getElementsByClassName(n)[0]:XE.has(a)?o=i:o=i.getElementsByClassName(n)[0]??zt("div"),o==null)throw new Error(`AG Charts - unable to find DOM element ${n}`);s[a]={element:o,children:new Map,listeners:[]}}return s}destroy(){super.destroy(),this.observer?.unobserve(this.element),this.container&&this.sizeMonitor.unobserve(this.container),this.pendingContainer=void 0,Object.values(this.rootElements).forEach(e=>{e.children.forEach(i=>i.remove()),e.element.remove()}),this.element.remove()}postRenderUpdate(){this.mode!=="minimal"&&(this.pendingContainer==null||this.pendingContainer===this.container||(fp.batchedUpdateContainer.length===0&&de().setTimeout(this.applyBatchedUpdateContainer.bind(this),0),fp.batchedUpdateContainer.push(this)))}applyBatchedUpdateContainer(){for(const e of fp.batchedUpdateContainer)e.destroyed||e.updateContainer();fp.batchedUpdateContainer.splice(0)}setSizeOptions(e=300,i=300,s,a){const{style:n}=this.element;n.width=`${s??e}px`,n.height=`${a??i}px`,this.minWidth=s??e,this.minHeight=a??i,this.updateContainerClassName()}updateContainerSize(){const{style:e}=this.rootElements["canvas-center"].element;e.visibility=this.containerSize==null?"hidden":"",this.containerSize?(e.width=`${this.containerSize.width??0}px`,e.height=`${this.containerSize.height??0}px`):(e.width="",e.height=""),this.updateContainerClassName()}setTabGuardIndex(e){this.tabGuards&&(this.tabGuards.tabIndex=e)}setContainer(e){e!==this.container&&(this.pendingContainer=e,(this.mode==="minimal"||this.container==null)&&this.updateContainer())}updateContainer(){const{pendingContainer:e}=this;if(!(e==null||e===this.container)){if(this.container&&(this.container.removeChild(this.element),this.sizeMonitor.unobserve(this.container)),this.documentRoot!=null)for(const i of this.rootElements.styles.children.keys())this.removeChild("styles",i);this.container=e,this.pendingContainer=void 0,this.documentRoot=this.getShadowDocumentRoot(e),this.initiallyConnected=this.mode==="minimal"||e.isConnected;for(const[i,s]of this.styles)this.addStyles(i,s);e.appendChild(this.element),this.sizeMonitor.observe(e,i=>{this.containerSize=i,this.updateContainerSize(),this.eventsHub.emit("dom:resize",null)}),this.eventsHub.emit("dom:container-change",null)}}setThemeClass(e){const i="ag-charts-theme-";this.element.classList.forEach(s=>{s.startsWith(i)&&s!==e&&this.element.classList.remove(s)}),this.element.classList.add(e)}setThemeParameters(e){for(const[i,s]of Oo(e)){let a=`${s}`;i.endsWith("Size")||i.endsWith("Radius")?a=`${s}px`:i.endsWith("Border")&&typeof s=="boolean"&&(a=s?"var(--ag-charts-border)":"none"),this.element.style.setProperty(`--ag-charts-${WP(i)}`,a)}}updateCanvasLabel(e){Ut(this.rootElements["canvas-proxy"].element,"aria-label",e)}getEventElement(e,i){return["focus","blur","keydown","keyup"].includes(i)?this.rootElements["series-area"].element:e}addEventListener(e,i,s){const a=this.getEventElement(this.element,e);return fe(a,e,i,s)}removeEventListener(e,i,s){this.getEventElement(this.element,e).removeEventListener(e,i,s)}getBoundingClientRect(){return this.rootElements.canvas.element.getBoundingClientRect()}getOverlayClientRect(){const e=de(),i=new gt(0,0,e.innerWidth,e.innerHeight),s=this.getRawOverlayClientRect();return i.intersection(s)?.toDOMRect()??VA}getRawOverlayClientRect(){let e=this.element;const i=this.element.getRootNode()?.fullscreenElement;for(;e!=null;){let n;if(i!=null&&e===i)n=!0;else{const r=e.computedStyleMap?.()?.get("overflow-y")?.toString();n=r==="auto"||r==="scroll"}if(n)return gt.fromDOMRect(e.getBoundingClientRect());e=e.parentElement}if(this.documentRoot!=null)return gt.fromDOMRect(this.documentRoot.getBoundingClientRect());const{innerWidth:s,innerHeight:a}=de();return new gt(0,0,s,a)}getShadowDocumentRoot(e=this.container){const i=e?.ownerDocument?.body??wo("body");for(;e!=null;){if(e===i)return;if(e.parentNode instanceof DocumentFragment)return e;e=e.parentNode}}getParent(e){return this.rootElements[e].element}getChildBoundingClientRect(e){const{children:i}=this.rootElements[e],s=[];for(const a of i.values())s.push(gt.fromDOMRect(a.getBoundingClientRect()));return gt.merge(s)}isManagedChildDOMElement(e,i,s){const{children:a}=this.rootElements[i],n=a?.get(s);return n!=null&&e.contains(n)}contains(e,i){return i==null?this.element.contains(e):this.rootElements[i].element.contains(e)}addStyles(e,i){const s="data-ag-charts";if(this.styles.set(e,i),this.container==null)return;const a=r=>r.getAttribute(s)===e,n=r=>{const l=new Set(["TITLE","META"]);let c=!0,h;for(const d of r.children){if(c&&l.has(d.tagName)){h=d;continue}if(c=!1,a(d))return;d.hasAttribute(s)&&(h=d)}const u=zt("style");return this.chart.styleNonce!=null&&(u.nonce=this.chart.styleNonce),h==null?r.prepend(u):r.insertBefore(u,h.nextSibling),u};let o;this.styleContainer?o=n(this.styleContainer):this.initiallyConnected===!1?o=this.addChild("styles",e):this.documentRoot==null&&!fp.headStyles.has(e)?(o=n(wo("head")),fp.headStyles.add(e)):this.documentRoot!=null&&(o=this.addChild("styles",e)),!(o==null||a(o))&&(o.setAttribute(s,e),o.innerHTML=i)}removeStyles(e){this.removeChild("styles",e)}updateCursor(e,i){this.cursorState.set(e,i),this.element.style.cursor=this.cursorState.stateValue()}getCursor(){return this.element.style.cursor}addChild(e,i,s,a){const{element:n,children:o,listeners:r}=this.rootElements[e];if(!o)throw new Error("AG Charts - unable to create DOM elements after destroy()");if(o.has(i))return o.get(i);const{childElementType:l="div"}=qE.get(e)??{};if(s&&s.tagName.toLowerCase()!==l.toLowerCase())throw new Error("AG Charts - mismatching DOM element type");const c=s??zt(l);for(const[h,u,d]of r)c.addEventListener(h,u,d);if(o.set(i,c),l==="style"&&this.chart.styleNonce!=null&&(c.nonce=this.chart.styleNonce),a){const h=n.querySelector(a.query);if(h==null)throw new Error(`AG Charts - addChild query failed ${a.query}`);h.insertAdjacentElement(a.where,c)}else n?.appendChild(c);return c}removeChild(e,i){const{children:s}=this.rootElements[e];s&&(s.get(i)?.remove(),s.delete(i))}incrementDataCounter(e){const{dataset:i}=this.element;i[e]??(i[e]="0"),i[e]=String(Number(i[e])+1)}setDataBoolean(e,i){this.element.dataset[e]=String(i)}updateContainerClassName(){const{element:e,containerSize:i,minWidth:s,minHeight:a}=this;e.classList.toggle(FA.safeHorizontal,s>=(i?.width??1/0)),e.classList.toggle(FA.safeVertical,a>=(i?.height??1/0))}},Rv.batchedUpdateContainer=[],Rv.headStyles=new Set,GA=Rv}}),JE,T6=I({"packages/ag-charts-community/src/widget/boundedTextWidget.ts"(){"use strict";R(),yl(),JE=class extends Eo{constructor(){super(zt("div")),this.textElement=fi("text"),this.textElement.role="presentation",this.svgElement=fi("svg"),this.svgElement.appendChild(this.textElement),this.svgElement.style.width="100%",this.svgElement.style.opacity="0",this.svgElement.role="presentation",this.elem.appendChild(this.svgElement),this.elem.role="presentation"}set textContent(t){this.textElement.textContent=t;const i=this.textElement.getBBox?.();i&&this.svgElement.setAttribute("viewBox",`${i.x} ${i.y} ${i.width} ${i.height}`)}get textContent(){return this.textElement.textContent}destructor(){}}}}),jA,tR=I({"packages/ag-charts-community/src/widget/abstractButtonWidget.ts"(){"use strict";R(),Ac(),yl(),jA=class extends Eo{constructor(t,e){super(t),Ut(this.elem,"role",e),this.setEnabled(!0),this.addListener("keydown",({sourceEvent:i})=>{Pv(i)&&(i.preventDefault(),this.htmlListener?.dispatch("click",this,{type:"click",device:"keyboard",sourceEvent:i}))})}destructor(){}setEnabled(t){Ut(this.elem,"aria-disabled",!t)}addListener(t,e){return super.addListener(t,(i,s)=>{(t==="click"||t==="dblclick")&&this.isDisabled()||e(i,s)})}}}}),Bp,Bv=I({"packages/ag-charts-community/src/widget/buttonWidget.ts"(){"use strict";R(),tR(),Bp=class extends jA{constructor(){super(zt("button"))}}}}),eR,N6=I({"packages/ag-charts-community/src/widget/groupWidget.ts"(){"use strict";R(),yl(),eR=class extends Eo{constructor(){super(zt("div")),Ut(this.elem,"role","group")}destructor(){}}}}),zv,WA=I({"packages/ag-charts-community/src/widget/rovingTabContainerWidget.ts"(){"use strict";R(),Ac(),yl(),zv=class extends Eo{constructor(t,e){super(zt("div")),this.focusedChildIndex=0,this.onChildFocus=(i,s)=>{const a=this.children[this.focusedChildIndex];this.focusedChildIndex=s.index,a?.setTabIndex(-1),s.setTabIndex(0)},this.onChildKeyDown=(i,s)=>{const a=this.orientation,[n,o]=a==="both"?[wu.horizontal,wu.vertical]:[wu[a],void 0];let r=-1;if(Sm(i.sourceEvent)){const l=i.sourceEvent.key;l===n.nextKey||l===o?.nextKey?r=s.index+1:(l===n.prevKey||l===o?.prevKey)&&(r=s.index-1)}this.children[r]?.focus()},Ut(this.elem,"role",e),this.orientation=t}get orientation(){return cu(this.elem,"aria-orientation")??"both"}set orientation(t){Ut(this.elem,"aria-orientation",t!=="both"?t:void 0)}focus(){this.children[this.focusedChildIndex]?.focus()}clear(){this.focusedChildIndex=0;for(const t of this.children)this.removeChildListeners(t),t.parent=void 0;this.elem.textContent="",this.children.length=0}addChildListeners(t){t.addListener("focus",this.onChildFocus),t.addListener("keydown",this.onChildKeyDown)}removeChildListeners(t){t.removeListener("focus",this.onChildFocus),t.removeListener("keydown",this.onChildKeyDown)}onChildAdded(t){this.addChildListeners(t),t.setTabIndex(this.children.length===1?0:-1)}onChildRemoved(t){this.removeChildListeners(t);const{focusedChildIndex:e,children:i}=this,s=e===t.index;for(let a=0;a<i.length;a++){const n=i[a];n.index===e&&(this.focusedChildIndex=a),n.index=a}if(s){const a=i[e]??i[e-1];a?(this.focusedChildIndex=a.index,a.setTabIndex(0)):this.focusedChildIndex=0}}}}}),iR,O6=I({"packages/ag-charts-community/src/widget/listWidget.ts"(){"use strict";R(),WA(),yl(),iR=class extends zv{constructor(){super("both","list"),this.setHidden(!0)}destructor(){this.children.forEach(t=>t.getElement().parentElement.remove())}addChildToDOM(t,e){const i=zt("div");Ut(i,"role","listitem"),Po(i,"position","absolute"),Eo.setElementContainer(t,i),this.appendOrInsert(i,e),this.setHidden(!1)}removeChildFromDOM(t){t.getElement().parentElement.remove(),this.setHidden(this.children.length===0)}setHidden(t){this.children.length===0&&(t=!0),super.setHidden(t)}}}}),Nu,Fv=I({"packages/ag-charts-community/src/widget/nativeWidget.ts"(){"use strict";yl(),Nu=class extends Eo{constructor(t){super(t)}destructor(){}}}});function Cc(t,e=2){return typeof t=="number"?aR(t,e):typeof t=="string"?t:String(t??"")}function sR(t){return nR.format(t)}function aR(t,e){let i=HA.get(e);return i||(i=new Intl.NumberFormat("en-US",{maximumFractionDigits:e,useGrouping:!1}),HA.set(e,i)),i.format(t)}var nR,HA,Ou=I({"packages/ag-charts-community/src/util/format.util.ts"(){"use strict";nR=new Intl.NumberFormat("en-US",{style:"percent"}),HA=new Map().set(2,new Intl.NumberFormat("en-US",{maximumFractionDigits:2,useGrouping:!1}))}}),Vv,Gv,oR=I({"packages/ag-charts-community/src/widget/sliderWidget.ts"(){"use strict";R(),Ou(),yl(),Vv=class yb extends Eo{constructor(){super(zt("input")),this._step=yb.STEP_ONE,this.orientation="both"}get step(){return this._step}set step(e){this._step=e,this.getElement().step=e.attributeValue}get keyboardStep(){return this._keyboardStep?.step??this._step}set keyboardStep(e){if(e!==this._keyboardStep?.step&&(this._keyboardStep!==void 0&&(this.removeListener("keydown",this._keyboardStep.onKeyDown),this.removeListener("keyup",this._keyboardStep.onKeyUp),this.removeListener("blur",this._keyboardStep.onBlur),this._keyboardStep=void 0),e!==void 0)){const i=()=>this.getElement().step=e.attributeValue,s=()=>this.getElement().step=this._step.attributeValue;this._keyboardStep={step:e,onKeyDown:i,onKeyUp:s,onBlur:s},this.addListener("keydown",this._keyboardStep.onKeyDown),this.addListener("keyup",this._keyboardStep.onKeyUp),this.addListener("blur",this._keyboardStep.onBlur)}}get orientation(){return cu(this.elem,"aria-orientation")??"both"}set orientation(e){Ut(this.elem,"aria-orientation",e!=="both"?e:void 0),yb.registerDefaultPreventers(this,e)}destructor(){}clampValueRatio(e,i){const s=this.getValueRatio(),a=Et(e,s,i);return a!==s&&this.setValueRatio(a),a}setValueRatio(e,i){const{divider:s}=this.step,a=Math.round(e*1e4)/s,{ariaValueText:n=sR(a/s)}=i??{},o=this.getElement();o.value=`${a}`,o.ariaValueText=n}getValueRatio(){return this.getElement().valueAsNumber/this.step.divider}static registerDefaultPreventers(e,i){i==="both"?e.removeListener("keydown",yb.onKeyDown):e.addListener("keydown",yb.onKeyDown)}static onKeyDown(e,i){let s=[];const{orientation:a}=i;a==="horizontal"?s=["ArrowUp","ArrowDown"]:a==="vertical"&&(s=["ArrowLeft","ArrowRight"]),s.includes(e.sourceEvent.code)&&e.sourceEvent.preventDefault()}},Vv.STEP_ONE={attributeValue:"1",divider:1},Vv.STEP_HUNDRETH={attributeValue:"0.01",divider:100},Gv=Vv}}),rR,P6=I({"packages/ag-charts-community/src/widget/switchWidget.ts"(){"use strict";R(),Bv(),rR=class extends Bp{constructor(){super(),Ut(this.elem,"role","switch"),this.setChecked(!1)}setChecked(t){Ut(this.elem,"aria-checked",t)}}}}),Mm,$A=I({"packages/ag-charts-community/src/widget/toolbarWidget.ts"(){"use strict";WA(),Mm=class extends zv{constructor(t="horizontal"){super(t,"toolbar")}destructor(){}}}});function zp(t,e){return e.params?.type===t}function _6(t){if(t==="button")return new Bp;if(t==="slider")return new Gv;if(t==="toolbar")return new Mm;if(t==="group")return new eR;if(t==="list")return new iR;if(t==="region")return new Nu(zt("div"));if(t==="text")return new JE;if(t==="listswitch")return new rR;throw Error("AG Charts - error allocating meta")}function lR(t){const e={params:t,result:void 0};return e.result=_6(e.params.type),e}var UA,cR=I({"packages/ag-charts-community/src/dom/proxyInteractionService.ts"(){"use strict";R(),T6(),Bv(),N6(),O6(),Fv(),oR(),P6(),$A(),UA=class{constructor(t,e,i){this.eventsHub=t,this.localeManager=e,this.domManager=i,this.cleanup=new Fe}destroy(){this.cleanup.flush()}addLocalisation(t){t(),this.cleanup.register(this.eventsHub.on("locale:change",t))}createProxyContainer(t){const e=lR(t),{params:i,result:s}=e,a=s.getElement();return this.domManager.addChild("canvas-proxy",i.domManagerId,a),a.classList.add(...i.classList,"ag-charts-proxy-container"),a.role=i.type,"ariaOrientation"in i&&(a.ariaOrientation=i.ariaOrientation),zp("toolbar",e)&&(e.result.orientation=e.params.orientation),this.addLocalisation(()=>{a.ariaLabel=this.localeManager.t(i.ariaLabel.id,i.ariaLabel.params)}),s}createProxyElement(t){const e=lR(t);if(zp("button",e)){const{params:i,result:s}=e,a=s.getElement();if(this.initInteract(i,s),typeof i.textContent=="string")a.textContent=i.textContent;else{const{textContent:n}=i;this.addLocalisation(()=>{a.textContent=this.localeManager.t(n.id,n.params)})}this.setParent(e.params,e.result)}if(zp("slider",e)){const{params:i,result:s}=e,a=s.getElement();this.initInteract(i,s),a.type="range",a.role="presentation",a.style.margin="0px",this.addLocalisation(()=>{a.ariaLabel=this.localeManager.t(i.ariaLabel.id,i.ariaLabel.params)}),this.setParent(e.params,e.result)}if(zp("text",e)){const{params:i,result:s}=e;this.initElement(i,s),this.setParent(e.params,e.result)}if(zp("listswitch",e)){const{params:i,result:s}=e;this.initInteract(i,s),s.setTextContent(i.textContent),s.setChecked(i.ariaChecked),s.setAriaDescribedBy(i.ariaDescribedBy),this.setParent(e.params,e.result)}if(zp("region",e)){const{params:i,result:s}=e,a=s.getElement();this.initInteract(i,s),a.role="region",this.setParent(e.params,e.result)}return e.result}initElement(t,e){const i=e.getElement();return Po(i,"cursor",t.cursor),i.classList.toggle("ag-charts-proxy-elem",!0),i}initInteract(t,e){const{tabIndex:i,domIndex:s}=t,a=this.initElement(t,e);i!==void 0&&(a.tabIndex=i),s!==void 0&&(e.domIndex=s)}setParent(t,e){if("parent"in t)t.parent?.addChild(e);else{const i={where:t.where,query:".ag-charts-series-area"};this.domManager.addChild("canvas-proxy",t.domManagerId,e.getElement(),i)}}}}}),E6=I({"packages/ag-charts-locale/src/ar-EG.ts"(){"use strict"}}),R6=I({"packages/ag-charts-locale/src/bg-BG.ts"(){"use strict"}}),B6=I({"packages/ag-charts-locale/src/cs-CZ.ts"(){"use strict"}}),z6=I({"packages/ag-charts-locale/src/da-DK.ts"(){"use strict"}}),F6=I({"packages/ag-charts-locale/src/de-DE.ts"(){"use strict"}}),V6=I({"packages/ag-charts-locale/src/el-GR.ts"(){"use strict"}}),KA,G6=I({"packages/ag-charts-locale/src/en-US.ts"(){"use strict";KA={ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceHierarchyChart:"hierarchy chart, ${caption}",ariaAnnounceGaugeChart:"gauge chart, ${caption}",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaDescriptionLegendItem:"Press Space or Enter to toggle visibility",ariaLabelAddHorizontalLine:"Add Horizontal Line",ariaLabelAnnotationsToolbar:"Annotations",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelAnnotationSettingsDialog:"Annotation Settings",ariaLabelColorPicker:"Color picker",ariaLabelFinancialCharts:"Financial Charts",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number]",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelSettingsTabBar:"Settings",ariaLabelZoomToolbar:"Zoom",ariaValuePanRange:"${min}[percent0to2dp] to ${max}[percent0to2dp]",iconAltTextLineStyleSolid:"Solid",iconAltTextLineStyleDashed:"Long-dashed",iconAltTextLineStyleDotted:"Short-dashed",iconAltTextPositionTop:"Top",iconAltTextPositionCenter:"Center",iconAltTextPositionBottom:"Bottom",iconAltTextAlignLeft:"Left",iconAltTextAlignCenter:"Center",iconAltTextAlignRight:"Right",iconAltTextClose:"Close",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",overlayUnsupportedBrowser:"Incompatible browser version. Please upgrade your browser.",seriesHistogramTooltipFrequency:"Frequency",seriesHistogramTooltipSum:"${yName} (sum)",seriesHistogramTooltipCount:"${yName} (count)",seriesHistogramTooltipMean:"${yName} (mean)",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsFibonacciRetracement:"Fib Retracement",toolbarAnnotationsFibonacciRetracementTrendBased:"Fib Trend Based",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsLineStyle:"Line Style",toolbarAnnotationsLineStrokeWidth:"Line Stroke Width",toolbarAnnotationsSettings:"Settings",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsDragHandle:"Drag Toolbar",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsFibonacciAnnotations:"Fibonacci",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsShapeAnnotations:"Arrows",toolbarAnnotationsMeasurerAnnotations:"Measurers",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarAnnotationsArrow:"Arrow",toolbarAnnotationsArrowUp:"Arrow Up",toolbarAnnotationsArrowDown:"Arrow Down",toolbarAnnotationsDateRange:"Date Range",toolbarAnnotationsPriceRange:"Price Range",toolbarAnnotationsDatePriceRange:"Date and Price",toolbarAnnotationsQuickDatePriceRange:"Measure",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here",contextMenuResetZoom:"Reset zoom",dialogHeaderChannel:"Channel",dialogHeaderLine:"Line",dialogHeaderFibonacciRange:"Fib Retracement",dialogHeaderDateRange:"Date Range",dialogHeaderPriceRange:"Price Range",dialogHeaderDatePriceRange:"Date and Price",dialogHeaderText:"Text",dialogInputAlign:"Align",dialogInputColorPicker:"Color",dialogInputColorPickerAltText:"Text Color",dialogInputFillColorPicker:"Fill",dialogInputFillColorPickerAltText:"Fill Color",dialogInputExtendChannelStart:"Extend channel start",dialogInputExtendChannelEnd:"Extend channel end",dialogInputExtendLineStart:"Extend line start",dialogInputExtendLineEnd:"Extend line end",dialogInputExtendAbove:"Extend above",dialogInputExtendBelow:"Extend below",dialogInputExtendLeft:"Extend left",dialogInputExtendRight:"Extend right",dialogInputReverse:"Reverse",dialogInputShowFill:"Show Fill",dialogInputFontSize:"Size",dialogInputFontSizeAltText:"Font Size",dialogInputLineStyle:"Dash",dialogInputPosition:"Position",dialogInputStrokeWidth:"Weight",dialogInputStrokeWidthAltText:"Line Weight",dialogInputFibonacciBands:"Bands",dialogInputFibonacciBandsAltText:"Fibonacci Bands",inputTextareaPlaceholder:"Add Text",measurerDateRangeBars:"${value}[number] bars",measurerPriceRangeValue:"${value}[number]",measurerPriceRangePercent:"${value}[percent]",measurerVolume:"Vol ${value}",tooltipPaginationStatus:"${index}[number] of ${count}[number]"}}}),j6=I({"packages/ag-charts-locale/src/es-ES.ts"(){"use strict"}}),W6=I({"packages/ag-charts-locale/src/fa-IR.ts"(){"use strict"}}),H6=I({"packages/ag-charts-locale/src/fi-FI.ts"(){"use strict"}}),$6=I({"packages/ag-charts-locale/src/fr-FR.ts"(){"use strict"}}),U6=I({"packages/ag-charts-locale/src/he-IL.ts"(){"use strict"}}),K6=I({"packages/ag-charts-locale/src/hr-HR.ts"(){"use strict"}}),Y6=I({"packages/ag-charts-locale/src/hu-HU.ts"(){"use strict"}}),Z6=I({"packages/ag-charts-locale/src/it-IT.ts"(){"use strict"}}),X6=I({"packages/ag-charts-locale/src/ja-JP.ts"(){"use strict"}}),q6=I({"packages/ag-charts-locale/src/ko-KR.ts"(){"use strict"}}),Q6=I({"packages/ag-charts-locale/src/nb-NO.ts"(){"use strict"}}),J6=I({"packages/ag-charts-locale/src/nl-NL.ts"(){"use strict"}}),t9=I({"packages/ag-charts-locale/src/pl-PL.ts"(){"use strict"}}),e9=I({"packages/ag-charts-locale/src/pt-BR.ts"(){"use strict"}}),i9=I({"packages/ag-charts-locale/src/pt-PT.ts"(){"use strict"}}),s9=I({"packages/ag-charts-locale/src/ro-RO.ts"(){"use strict"}}),a9=I({"packages/ag-charts-locale/src/sk-SK.ts"(){"use strict"}}),n9=I({"packages/ag-charts-locale/src/sv-SE.ts"(){"use strict"}}),o9=I({"packages/ag-charts-locale/src/tr-TR.ts"(){"use strict"}}),r9=I({"packages/ag-charts-locale/src/uk-UA.ts"(){"use strict"}}),l9=I({"packages/ag-charts-locale/src/ur-PK.ts"(){"use strict"}}),c9=I({"packages/ag-charts-locale/src/vi-VN.ts"(){"use strict"}}),h9=I({"packages/ag-charts-locale/src/zh-CN.ts"(){"use strict"}}),u9=I({"packages/ag-charts-locale/src/zh-HK.ts"(){"use strict"}}),d9=I({"packages/ag-charts-locale/src/zh-TW.ts"(){"use strict"}}),hR=I({"packages/ag-charts-locale/src/main.ts"(){"use strict";E6(),R6(),B6(),z6(),F6(),V6(),G6(),j6(),W6(),H6(),$6(),U6(),K6(),Y6(),Z6(),X6(),q6(),Q6(),J6(),t9(),e9(),i9(),s9(),a9(),n9(),o9(),r9(),l9(),c9(),h9(),u9(),d9()}}),uR,jv,dR,p9=I({"packages/ag-charts-community/src/locale/defaultMessageFormatter.ts"(){"use strict";R(),uR=/\$\{(\w+)}(?:\[(\w+)])?/gi,jv={number:new Intl.NumberFormat("en-US"),percent:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}),percent0to2dp:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}),date:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}),time:new Intl.DateTimeFormat("en-US",{timeStyle:"full"}),datetime:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeStyle:"full"})},dR=({defaultValue:t,variables:e})=>t?.replaceAll(uR,(i,s,a)=>{const n=e[s],o=a!=null?jv[a]:null;return a!=null&&o==null&&ut.warnOnce(`Format style [${a}] is not supported`),o!=null?o.format(n):typeof n=="number"?jv.number.format(n):n instanceof Date?jv.datetime.format(n):String(n)})}}),pR,g9=I({"packages/ag-charts-community/src/locale/localeManager.ts"(){"use strict";hR(),p9(),pR=class{constructor(t){this.eventsHub=t,this.localeText=void 0,this.getLocaleText=void 0}setLocaleText(t){this.localeText!==t&&(this.localeText=t,this.eventsHub.emit("locale:change",null))}setLocaleTextFormatter(t){this.getLocaleText=t,this.getLocaleText!==t&&(this.getLocaleText=t,this.eventsHub.emit("locale:change",null))}t(t,e={}){const{localeText:i=KA,getLocaleText:s}=this,a=i[t];return s?.({key:t,defaultValue:a,variables:e})??dR({key:t,defaultValue:a,variables:e})??t}}}}),Wv,gR=I({"packages/ag-charts-community/src/scene/canvas/hdpiCanvas.ts"(){"use strict";R(),ta(),M_(),Wv=class{constructor(t){this.enabled=!0,this.width=600,this.height=300;const{width:e,height:i,canvasElement:s,willReadFrequently:a=!1}=t;this.pixelRatio=t.pixelRatio??de("devicePixelRatio")??1,this.element=s??zt("canvas"),this.element.style.display="block",this.element.style.width=(e??this.width)+"px",this.element.style.height=(i??this.height)+"px",this.element.width=Math.round((e??this.width)*this.pixelRatio),this.element.height=Math.round((i??this.height)*this.pixelRatio),this.context=this.element.getContext("2d",{willReadFrequently:a}),this.onEnabledChange(),this.resize(e??0,i??0,this.pixelRatio),S_(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.context.canvas,e,i)}toDataURL(t){return this.element.toDataURL(t)}resize(t,e,i){if(!(t>0&&e>0))return;const{element:s,context:a}=this;s.width=Math.round(t*i),s.height=Math.round(e*i),a.setTransform(i,0,0,i,0,0),s.style.width=t+"px",s.style.height=e+"px",this.width=t,this.height=e,this.pixelRatio=i}clear(){v_(this)}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}reset(){this.context.reset(),this.context.verifyDepthZero?.()}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"":"none")}},S([kc(t=>t.onEnabledChange())],Wv.prototype,"enabled",2)}}),fR,f9=I({"packages/ag-charts-community/src/scene/image/imageLoader.ts"(){"use strict";R(),fR=class extends gr{constructor(){super(...arguments),this.cache=new Map,this.imageLoadingCount=0}loadImage(t,e){const i=this.cache.get(t);if(i?.image)return i.image;if(i!=null&&e){i.nodes.add(e);return}if(!e)return;const s={image:void 0,nodes:new Set([e])},a=new Image;return this.imageLoadingCount++,a.onload=()=>{s.image=a;for(const n of s.nodes)n.markDirty();s.nodes.clear(),this.imageLoadingCount--,this.emit("image-loaded",{uri:t})},a.onerror=()=>{this.imageLoadingCount--,s.nodes.clear(),this.emit("image-error",{uri:t})},a.src=t,this.cache.set(t,s),s.image}waitingToLoad(){return this.imageLoadingCount>0}destroy(){this.cache.forEach(t=>{t.nodes.clear()}),this.cache.clear()}}}}),mR,m9=I({"packages/ag-charts-community/src/scene/layersManager.ts"(){"use strict";yi(),GI(),mR=class{constructor(t){this.canvas=t,this.debug=Ft.create(!0,"scene"),this.layersMap=new Map,this.nextLayerId=0}get size(){return this.layersMap.size}resize(t,e,i){this.canvas.resize(t,e,i),this.layersMap.forEach(({canvas:s})=>s.resize(t,e,i))}addLayer(t){const{width:e,height:i,pixelRatio:s}=this.canvas,{name:a}=t,n=new Kb({width:e,height:i,pixelRatio:s});return this.layersMap.set(n,{id:this.nextLayerId++,name:a,canvas:n}),this.debug("Scene.addLayer() - layers",this.layersMap),n}removeLayer(t){this.layersMap.has(t)&&(this.layersMap.delete(t),t.destroy(),this.debug("Scene.removeLayer() - layers",this.layersMap))}clear(){for(const t of this.layersMap.values())t.canvas.destroy();this.layersMap.clear()}}}}),Dm,YA=I({"packages/ag-charts-community/src/scene/scene.ts"(){"use strict";R(),yi(),gR(),Oe(),f9(),m9(),Vn(),x6(),Dm=class extends gr{constructor(t){super(),this.debug=Ft.create(!0,"scene"),this.id=zn(this),this.imageLoader=new fR,this.root=null,this.pendingSize=null,this.isDirty=!1,this.cleanup=new Fe,this.updateDebugFlags(),this.canvas=new Wv(t),this.layersManager=new mR(this.canvas),this.cleanup.register(this.imageLoader.on("image-loaded",()=>{this.emit("scene-changed",{})}),this.imageLoader.on("image-error",({uri:e})=>{ut.warnOnce(`Unable to load image ${e}`)}))}waitingForUpdate(){return this.imageLoader?.waitingToLoad()??!1}get width(){return this.pendingSize?.[0]??this.canvas.width}get height(){return this.pendingSize?.[1]??this.canvas.height}get pixelRatio(){return this.pendingSize?.[2]??this.canvas.pixelRatio}setContainer(t){const{element:e}=this.canvas;return e.parentElement?.removeChild(e),t.appendChild(e),this}setRoot(t){return this.root===t?this:(this.isDirty=!0,this.root?.setScene(),this.root=t,t&&(t.visible=!0,t.setScene(this)),this)}updateDebugFlags(){Ft.inDevelopmentMode(()=>br._debugEnabled=!0)}clearCanvas(){this.canvas.clear()}attachNode(t){return this.appendChild(t),()=>this.removeChild(t)}appendChild(t){return this.root?.appendChild(t),this}removeChild(t){return this.root?.removeChild(t),this}download(t,e){EP(this.canvas.toDataURL(e),t?.trim()??"image")}getDataURL(t){return this.canvas.toDataURL(t)}resize(t,e,i){return t=Math.round(t),e=Math.round(e),i??(i=this.pixelRatio),t>0&&e>0&&(t!==this.width||e!==this.height||i!==this.pixelRatio)?(this.pendingSize=[t,e,i],this.isDirty=!0,!0):!1}render(t){const{debugSplitTimes:e={start:performance.now()},extraDebugStats:i,seriesRect:s}=t??{},{canvas:a,canvas:{context:n}={},root:o,pendingSize:r,width:l,height:c,pixelRatio:h}=this;if(!n)return;const u=performance.now();let d=!1;if(r&&(d=!0,this.layersManager.resize(...r),this.pendingSize=null),o&&!o.visible){this.isDirty=!1;return}let p;if(o instanceof Lt&&(p=o.dirty),o!=null&&p===!1&&!this.isDirty){this.debug.check()&&this.debug("Scene.render() - no-op",{tree:kv(o,"console")}),IE(this.layersManager,e,n,void 0,i,s);return}const g={ctx:n,width:l,height:c,devicePixelRatio:h,debugNodes:{}};Ft.check("scene:stats:verbose")&&(g.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0,opsPerformed:0,opsSkipped:0}),g6(g);let f=!1;if((p!==!1||d)&&(f=!0,a.clear()),o&&Ft.check("scene:dirtyTree")){const{dirtyTree:x,paths:m}=AE(o);Ft.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:x,paths:m})}if(o&&f){if(o.visible&&o.preRender(g),this.debug.check()){const x=kv(o,"console");this.debug("Scene.render() - before",{canvasCleared:f,tree:x})}if(o.visible)try{n.save(),o.render(g),n.restore()}catch(x){throw this.canvas.reset(),x}}e["\u270D\uFE0F"]=performance.now()-u,n.verifyDepthZero?.(),this.isDirty=!1,IE(this.layersManager,e,n,g.stats,i,s),f6(n,g.debugNodes),o&&this.debug.check()&&this.debug("Scene.render() - after",{tree:kv(o,"console"),canvasCleared:f})}toSVG(){const{root:t,width:e,height:i}=this;if(t!=null)return br.toSVG(t,e,i)}strip(){const{context:t,pixelRatio:e}=this.canvas;t.setTransform(e,0,0,e,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1,this.clear()}destroy(){this.strip(),this.canvas.destroy(),this.imageLoader.destroy(),this.cleanup.flush(),Object.assign(this,{canvas:void 0})}},Dm.className="Scene"}}),yR,y9=I({"packages/ag-charts-community/src/chart/annotation/annotationManager.ts"(){"use strict";R(),Ta(),Pt(),yR=class{constructor(t,e,i){this.eventsHub=t,this.annotationRoot=e,this.fireChartEvent=i,this.mementoOriginatorKey="annotations",this.annotations=[]}createMemento(){return this.annotations}guardMemento(t){return t==null||ss(t)}restoreMemento(t,e,i){this.annotations=this.cleanData(i??[]).map(s=>{const a=this.getAnnotationTypeStyles(s.type);return se(s,a)}),this.eventsHub.emit("annotations:restore",{annotations:this.annotations})}updateData(t){this.annotations=this.cleanData(t??[])}fireChangedEvent(){this.fireChartEvent({type:"annotations",annotations:$e([...this.annotations])})}attachNode(t){return this.annotationRoot.append(t),()=>(this.annotationRoot?.removeChild(t),this)}setAnnotationStyles(t){this.styles=t}getAnnotationTypeStyles(t){return this.styles?.[t]}cleanData(t){for(const e of t)"textAlign"in e&&delete e.textAlign;return t}}}}),ZA,x9=I({"packages/ag-charts-community/src/chart/zIndexMap.ts"(){"use strict";ZA=(t=>(t[t.CHART_BACKGROUND=0]="CHART_BACKGROUND",t[t.AXIS_BAND_HIGHLIGHT=1]="AXIS_BAND_HIGHLIGHT",t[t.AXIS_GRID=2]="AXIS_GRID",t[t.AXIS=3]="AXIS",t[t.ZOOM_SELECTION=4]="ZOOM_SELECTION",t[t.SERIES_CROSSLINE_RANGE=5]="SERIES_CROSSLINE_RANGE",t[t.SERIES_LAYER=6]="SERIES_LAYER",t[t.AXIS_FOREGROUND=7]="AXIS_FOREGROUND",t[t.SERIES_CROSSHAIR=8]="SERIES_CROSSHAIR",t[t.SERIES_CROSSLINE_LINE=9]="SERIES_CROSSLINE_LINE",t[t.SERIES_ANNOTATION=10]="SERIES_ANNOTATION",t[t.CHART_ANNOTATION=11]="CHART_ANNOTATION",t[t.CHART_ANNOTATION_FOCUSED=12]="CHART_ANNOTATION_FOCUSED",t[t.STATUS_BAR=13]="STATUS_BAR",t[t.SERIES_LABEL=14]="SERIES_LABEL",t[t.LEGEND=15]="LEGEND",t[t.NAVIGATOR=16]="NAVIGATOR",t[t.FOREGROUND=17]="FOREGROUND",t))(ZA||{})}}),xR,b9=I({"packages/ag-charts-community/src/chart/axis/axisManager.ts"(){"use strict";Oe(),xR=class{constructor(t,e){this.eventsHub=t,this.sceneRoot=e,this.axes=new Map,this.axisGridGroup=new Lt({name:"Axes-Grids",zIndex:2}),this.axisGroup=new Lt({name:"Axes",zIndex:3}),this.axisLabelGroup=new Lt({name:"Axes-Labels",zIndex:14}),this.axisCrosslineRangeGroup=new Lt({name:"Axes-Crosslines-Range",zIndex:5}),this.axisCrosslineLineGroup=new Lt({name:"Axes-Crosslines-Line",zIndex:9}),this.axisCrosslineLabelGroup=new Lt({name:"Axes-Crosslines-Label",zIndex:14}),this.sceneRoot.appendChild(this.axisGroup),this.sceneRoot.appendChild(this.axisGridGroup),this.sceneRoot.appendChild(this.axisLabelGroup),this.sceneRoot.appendChild(this.axisCrosslineRangeGroup),this.sceneRoot.appendChild(this.axisCrosslineLineGroup),this.sceneRoot.appendChild(this.axisCrosslineLabelGroup)}updateAxes(t,e){const i={axisNode:this.axisGroup,gridNode:this.axisGridGroup,labelNode:this.axisLabelGroup,crossLineRangeNode:this.axisCrosslineRangeGroup,crossLineLineNode:this.axisCrosslineLineGroup,crossLineLabelNode:this.axisCrosslineLabelGroup};for(const s of t)e.includes(s)||(s.detachAxis(i),s.destroy());for(const s of e)t?.includes(s)||s.attachAxis(i);this.axes.clear();for(const s of e){const a=s.createAxisContext();this.axes.has(a.direction)?this.axes.get(a.direction)?.push(a):this.axes.set(a.direction,[a])}this.eventsHub.emit("axis:change",null)}getAxisContext(t){return this.axes.get(t)??[]}destroy(){this.axes.clear(),this.sceneRoot.removeChild(this.axisGroup),this.sceneRoot.removeChild(this.axisGridGroup)}}}}),Fp,bR=I({"packages/ag-charts-community/src/chart/chartUpdateType.ts"(){"use strict";Fp=(t=>(t[t.FULL=0]="FULL",t[t.UPDATE_DATA=1]="UPDATE_DATA",t[t.PROCESS_DATA=2]="PROCESS_DATA",t[t.PROCESS_DOMAIN=3]="PROCESS_DOMAIN",t[t.PERFORM_LAYOUT=4]="PERFORM_LAYOUT",t[t.SERIES_UPDATE=5]="SERIES_UPDATE",t[t.PRE_SCENE_RENDER=6]="PRE_SCENE_RENDER",t[t.SCENE_RENDER=7]="SCENE_RENDER",t[t.NONE=8]="NONE",t))(Fp||{})}}),km,vR=I({"packages/ag-charts-community/src/chart/data/dataService.ts"(){"use strict";R(),yi(),ta(),km=class{constructor(t,e,i){this.eventsHub=t,this.caller=e,this.animationManager=i,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.pendingData=void 0,this.debug=Ft.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(t){typeof t=="function"&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=t,this.isLoadingInitialData=!0,this.animationManager.skip(),this.eventsHub.emit("data:source-change",null))}clearCallback(){this.dataSourceCallback=void 0}load(t){const{pendingData:e}=this;if(e!=null&&e.params.windowStart?.valueOf()===t.windowStart?.valueOf()&&e.params.windowEnd?.valueOf()===t.windowEnd?.valueOf()){const i=this.requestCounter++;this.isLoadingInitialData=!1,this.dispatch(i,e.data);return}this.isLoadingData=!0,this.throttledFetch(t)}isLazy(){return this.dataSourceCallback!=null}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}async getData(){const{latestRequest:t}=this;if(!t)return;const{params:e,fetchRequest:i}=t,s=await i;return{params:e,data:s}}restoreData(t){this.pendingData=t}createThrottledFetch(t){return dI(e=>this.fetch(e).catch(i=>ut.error("callback failed",i)),t,{leading:!1,trailing:!0})}createThrottledDispatch(t){return dI((e,i)=>this.dispatch(e,i),t,{leading:!0,trailing:!0})}dispatch(t,e){this.debug(`DataService - dispatching 'data-load' | ${t}`),this.eventsHub.emit("data:load",{data:e})}async fetch(t){"context"in this.caller&&(t.context=this.caller.context);const e=Promise.resolve().then(async()=>{if(!this.dataSourceCallback)throw new Error("DataService - [dataSource.getData] callback not initialised");const i=performance.now(),s=this.requestCounter++;this.debug(`DataService - requesting | ${s}`);let a;try{a=await this.dataSourceCallback(t),this.debug(`DataService - response | ${performance.now()-i}ms | ${s}`)}catch(o){this.debug(`DataService - request failed | ${s}`),ut.errorOnce(`DataService - request failed | [${o}]`)}this.isLoadingInitialData=!1;const n=this.freshRequests.indexOf(e);return n===-1||this.dispatchOnlyLatest&&n!==this.freshRequests.length-1?(this.debug(`DataService - discarding stale request | ${s}`),a):(this.freshRequests=this.freshRequests.slice(n+1),this.freshRequests.length===0&&(this.isLoadingData=!1),Array.isArray(a)?this.throttledDispatch(s,a):this.eventsHub.emit("data:error",null),a)});this.latestRequest={params:t,fetchRequest:e},this.freshRequests.push(e),await e}},S([Na({newValue(t){this.throttledDispatch=this.createThrottledDispatch(t)}})],km.prototype,"dispatchThrottle",2),S([Na({newValue(t){this.throttledFetch=this.createThrottledFetch(t)}})],km.prototype,"requestThrottle",2)}}),SR,v9=I({"packages/ag-charts-community/src/chart/fonts/fontManager.ts"(){"use strict";ln(),SR=class{constructor(t,e){this.domManager=t,this.updateService=e,this.observers=[]}updateFonts(t){!t||t.size===0||(this.loadFonts(t),t.forEach(e=>{this.observeFontStatus(e)}))}destroy(){for(const t of this.observers)t.disconnect();this.observers=[]}loadFonts(t){const e=Array.from(t).map(n=>encodeURIComponent(n)),i=":wght@100;200;300;400;500;600;700;800;900",s=`${i}&family=`,a=`@import url('https://fonts.googleapis.com/css2?family=${e.join(s)}${i}&display=swap');
`;this.domManager.addStyles(`google-font-${e.join("-")}`,a)}observeFontStatus(t){const e=window.document.createElement("div");e.style.setProperty("position","absolute"),e.style.setProperty("top","0"),e.style.setProperty("margin","0"),e.style.setProperty("padding","0"),e.style.setProperty("overflow","hidden"),e.style.setProperty("visibility","hidden"),e.style.setProperty("width","auto"),e.style.setProperty("max-width","none"),e.style.setProperty("font-synthesis","none"),e.style.setProperty("font-family",t),e.style.setProperty("font-size","16px"),e.style.setProperty("white-space","nowrap"),e.textContent="UVWxyz",this.domManager.addChild("canvas-container",`font-check-${encodeURIComponent(t)}`,e);const i=new ResizeObserver(s=>{const a=s?.at(0)?.contentBoxSize.at(0)?.inlineSize;a!=null&&a>0&&(Dr.clear(),this.updateService.update(4))});i.observe(e),this.observers.push(i)}}}}),S9=I({"packages/ag-charts-types/src/api/initialStateOptions.ts"(){"use strict"}}),M9=I({"packages/ag-charts-types/src/api/stateTypes.ts"(){"use strict"}}),D9=I({"packages/ag-charts-types/src/api/agCharts.ts"(){"use strict"}}),k9=I({"packages/ag-charts-types/src/chart/annotationsOptions.ts"(){"use strict"}}),I9=I({"packages/ag-charts-types/src/chart/axisOptions.ts"(){"use strict"}}),A9=I({"packages/ag-charts-types/src/chart/buttonOptions.ts"(){"use strict"}}),C9=I({"packages/ag-charts-types/src/chart/callbackOptions.ts"(){"use strict"}}),L9=I({"packages/ag-charts-types/src/chart/chartOptions.ts"(){"use strict"}}),w9=I({"packages/ag-charts-types/src/chart/chartToolbarOptions.ts"(){"use strict"}}),T9=I({"packages/ag-charts-types/src/chart/contextMenuOptions.ts"(){"use strict"}}),N9=I({"packages/ag-charts-types/src/chart/crossLineOptions.ts"(){"use strict"}}),O9=I({"packages/ag-charts-types/src/chart/crosshairOptions.ts"(){"use strict"}}),P9=I({"packages/ag-charts-types/src/chart/bandHighlightOptions.ts"(){"use strict"}}),_9=I({"packages/ag-charts-types/src/chart/dataSourceOptions.ts"(){"use strict"}}),E9=I({"packages/ag-charts-types/src/chart/dropShadowOptions.ts"(){"use strict"}}),MR,R9=I({"packages/ag-charts-types/src/chart/errorBarOptions.ts"(){"use strict";MR=["bar","line","scatter"]}}),B9=I({"packages/ag-charts-types/src/chart/formatterOptions.ts"(){"use strict"}}),z9=I({"packages/ag-charts-types/src/chart/eventOptions.ts"(){"use strict"}}),F9=I({"packages/ag-charts-types/src/chart/gradientLegendOptions.ts"(){"use strict"}}),V9=I({"packages/ag-charts-types/src/chart/icons.ts"(){"use strict"}}),G9=I({"packages/ag-charts-types/src/chart/labelOptions.ts"(){"use strict"}}),j9=I({"packages/ag-charts-types/src/chart/legendOptions.ts"(){"use strict"}}),W9=I({"packages/ag-charts-types/src/chart/localeOptions.ts"(){"use strict"}}),DR,kR,H9=I({"packages/ag-charts-types/src/chart/navigatorOptions.ts"(){"use strict";DR=void 0,kR=void 0,kR=DR}}),$9=I({"packages/ag-charts-types/src/chart/operationOptions.ts"(){"use strict"}}),U9=I({"packages/ag-charts-types/src/chart/polarAxisOptions.ts"(){"use strict"}}),K9=I({"packages/ag-charts-types/src/chart/radiusAxisOptions.ts"(){"use strict"}}),Y9=I({"packages/ag-charts-types/src/chart/rangesOptions.ts"(){"use strict"}}),IR,AR,Z9=I({"packages/ag-charts-types/src/chart/themeOptions.ts"(){"use strict";IR=void 0,AR=void 0,AR=IR}}),X9=I({"packages/ag-charts-types/src/chart/themeParamsOptions.ts"(){"use strict"}}),XA,qA,q9=I({"packages/ag-charts-types/src/chart/tooltipOptions.ts"(){"use strict";XA=(t=>(t.POINTER="pointer",t.NODE="node",t.CHART="chart",t))(XA||{}),qA=(t=>(t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t.TOP_RIGHT="top-right",t.BOTTOM_RIGHT="bottom-right",t.BOTTOM_LEFT="bottom-left",t.TOP_LEFT="top-left",t.CENTER="center",t))(qA||{})}}),Q9=I({"packages/ag-charts-types/src/chart/types.ts"(){"use strict"}}),J9=I({"packages/ag-charts-types/src/chart/zoomOptions.ts"(){"use strict"}}),t8=I({"packages/ag-charts-types/src/chartBuilderOptions.ts"(){"use strict"}}),e8=I({"packages/ag-charts-types/src/integratedCharts.ts"(){"use strict"}}),i8=I({"packages/ag-charts-types/src/presets/financial/financialOptions.ts"(){"use strict"}}),s8=I({"packages/ag-charts-types/src/presets/financial/priceVolumeOptions.ts"(){"use strict"}}),CR,LR,wR,TR,a8=I({"packages/ag-charts-types/src/presets/gauge/commonOptions.ts"(){"use strict";CR=void 0,LR=void 0,LR=CR,wR=void 0,TR=void 0,TR=wR}}),n8=I({"packages/ag-charts-types/src/presets/gauge/gaugeOptions.ts"(){"use strict"}}),o8=I({"packages/ag-charts-types/src/presets/gauge/linearGaugeOptions.ts"(){"use strict"}}),r8=I({"packages/ag-charts-types/src/presets/gauge/radialGaugeOptions.ts"(){"use strict"}}),l8=I({"packages/ag-charts-types/src/presets/sparkline/sparklineAxisOptions.ts"(){"use strict"}}),c8=I({"packages/ag-charts-types/src/presets/sparkline/sparklineOptions.ts"(){"use strict"}}),h8=I({"packages/ag-charts-types/src/series/cartesian/areaOptions.ts"(){"use strict"}}),u8=I({"packages/ag-charts-types/src/series/cartesian/barOptions.ts"(){"use strict"}}),d8=I({"packages/ag-charts-types/src/series/cartesian/boxPlotOptions.ts"(){"use strict"}}),p8=I({"packages/ag-charts-types/src/series/cartesian/bubbleOptions.ts"(){"use strict"}}),g8=I({"packages/ag-charts-types/src/series/cartesian/candlestickOptions.ts"(){"use strict"}}),f8=I({"packages/ag-charts-types/src/chart/cartesianOptions.ts"(){"use strict"}}),m8=I({"packages/ag-charts-types/src/series/cartesian/cartesianSeriesTooltipOptions.ts"(){"use strict"}}),y8=I({"packages/ag-charts-types/src/series/cartesian/cartesianSeriesTypes.ts"(){"use strict"}}),x8=I({"packages/ag-charts-types/src/series/cartesian/commonOptions.ts"(){"use strict"}}),b8=I({"packages/ag-charts-types/src/series/cartesian/coneFunnelOptions.ts"(){"use strict"}}),v8=I({"packages/ag-charts-types/src/series/cartesian/funnelOptions.ts"(){"use strict"}}),S8=I({"packages/ag-charts-types/src/series/cartesian/heatmapOptions.ts"(){"use strict"}}),M8=I({"packages/ag-charts-types/src/series/cartesian/histogramOptions.ts"(){"use strict"}}),D8=I({"packages/ag-charts-types/src/series/cartesian/lineOptions.ts"(){"use strict"}}),k8=I({"packages/ag-charts-types/src/series/cartesian/ohlcBaseOptions.ts"(){"use strict"}}),I8=I({"packages/ag-charts-types/src/series/cartesian/ohlcOptions.ts"(){"use strict"}}),A8=I({"packages/ag-charts-types/src/series/cartesian/rangeAreaOptions.ts"(){"use strict"}}),C8=I({"packages/ag-charts-types/src/series/cartesian/rangeBarOptions.ts"(){"use strict"}}),L8=I({"packages/ag-charts-types/src/series/cartesian/scatterOptions.ts"(){"use strict"}}),w8=I({"packages/ag-charts-types/src/series/cartesian/waterfallOptions.ts"(){"use strict"}}),T8=I({"packages/ag-charts-types/src/series/flow-proportion/chordOptions.ts"(){"use strict"}}),N8=I({"packages/ag-charts-types/src/series/flow-proportion/flowProportionOptions.ts"(){"use strict"}}),O8=I({"packages/ag-charts-types/src/series/flow-proportion/sankeyOptions.ts"(){"use strict"}}),P8=I({"packages/ag-charts-types/src/series/standalone/pyramidOptions.ts"(){"use strict"}}),_8=I({"packages/ag-charts-types/src/series/standalone/standaloneOptions.ts"(){"use strict"}}),E8=I({"packages/ag-charts-types/src/series/hierarchy/hierarchyOptions.ts"(){"use strict"}}),R8=I({"packages/ag-charts-types/src/series/hierarchy/sunburstOptions.ts"(){"use strict"}}),B8=I({"packages/ag-charts-types/src/series/hierarchy/treemapOptions.ts"(){"use strict"}}),z8=I({"packages/ag-charts-types/src/series/interpolationOptions.ts"(){"use strict"}}),F8=I({"packages/ag-charts-types/src/series/markerOptions.ts"(){"use strict"}}),V8=I({"packages/ag-charts-types/src/series/polar/donutOptions.ts"(){"use strict"}}),G8=I({"packages/ag-charts-types/src/series/polar/nightingaleOptions.ts"(){"use strict"}}),j8=I({"packages/ag-charts-types/src/series/polar/pieOptions.ts"(){"use strict"}}),W8=I({"packages/ag-charts-types/src/chart/polarOptions.ts"(){"use strict"}}),H8=I({"packages/ag-charts-types/src/series/polar/radarAreaOptions.ts"(){"use strict"}}),$8=I({"packages/ag-charts-types/src/series/polar/radarLineOptions.ts"(){"use strict"}}),U8=I({"packages/ag-charts-types/src/series/polar/radarOptions.ts"(){"use strict"}}),K8=I({"packages/ag-charts-types/src/series/polar/radialBarOptions.ts"(){"use strict"}}),Y8=I({"packages/ag-charts-types/src/series/polar/radialColumnOptions.ts"(){"use strict"}}),Z8=I({"packages/ag-charts-types/src/series/polar/radialOptions.ts"(){"use strict"}}),X8=I({"packages/ag-charts-types/src/series/seriesOptions.ts"(){"use strict"}}),q8=I({"packages/ag-charts-types/src/series/topology/mapLineBackgroundOptions.ts"(){"use strict"}}),Q8=I({"packages/ag-charts-types/src/series/topology/mapLineOptions.ts"(){"use strict"}}),J8=I({"packages/ag-charts-types/src/series/topology/mapMarkerOptions.ts"(){"use strict"}}),tq=I({"packages/ag-charts-types/src/series/topology/mapShapeBackgroundOptions.ts"(){"use strict"}}),eq=I({"packages/ag-charts-types/src/series/topology/mapShapeOptions.ts"(){"use strict"}}),iq=I({"packages/ag-charts-types/src/series/topology/topologyOptions.ts"(){"use strict"}}),xl=I({"packages/ag-charts-types/src/main.ts"(){"use strict";S9(),M9(),D9(),k9(),I9(),A9(),C9(),L9(),w9(),T9(),N9(),O9(),P9(),_9(),E9(),R9(),B9(),z9(),F9(),V9(),G9(),j9(),W9(),H9(),$9(),U9(),K9(),Y9(),Z9(),X9(),q9(),Q9(),J9(),t8(),e8(),i8(),s8(),a8(),n8(),o8(),r8(),l8(),c8(),h8(),u8(),d8(),p8(),g8(),f8(),m8(),y8(),x8(),b8(),v8(),S8(),M8(),D8(),k8(),I8(),A8(),C8(),L8(),w8(),T8(),N8(),O8(),P8(),_8(),E8(),R8(),B8(),z8(),F8(),V8(),G8(),j8(),W8(),H8(),$8(),U8(),K8(),Y8(),Z8(),X8(),q8(),Q8(),J8(),tq(),eq(),iq()}}),QA,NR=I({"packages/ag-charts-community/src/util/listeners.ts"(){"use strict";R(),QA=class{constructor(){this.registeredListeners=new Map}addListener(t,e){const i={symbol:Symbol(t),handler:e};return this.registeredListeners.has(t)?this.registeredListeners.get(t).push(i):this.registeredListeners.set(t,[i]),()=>this.removeListener(i.symbol)}removeListener(t){for(const[e,i]of this.registeredListeners.entries()){const s=i.findIndex(a=>a.symbol===t);if(s>=0){i.splice(s,1),i.length===0&&this.registeredListeners.delete(e);break}}}dispatch(t,...e){for(const i of this.getListenersByType(t))try{i.handler(...e)}catch(s){ut.errorOnce(s)}}getListenersByType(t){return this.registeredListeners.get(t)??[]}destroy(){this.registeredListeners.clear()}}}});function Hv(t,e){const i=JSON.stringify(t,null,0);return Vp.has(e)||Vp.set(e,new Map),Vp.get(e)?.has(i)||Vp.get(e)?.set(i,e(t)),Vp.get(e)?.get(i)}function sq(t,e){let i=new $v;const s=(...a)=>{let n=i;for(const o of a){const r=typeof o=="object"||typeof o=="symbol"?n.weak:n.strong;let l=r.get(o);l==null&&(l=new $v,r.set(o,l)),n=l}if(n.set)return e?.("hit",t,a),n.value;{const o=t(...a);return n.set=!0,n.value=o,e?.("miss",t,a),o}};return s.reset=()=>{i=new $v},s}function ea(t,e){const i=new Map,s=(...o)=>o.map(r=>typeof r=="object"||typeof r=="symbol"?r:(i.has(r)||i.set(r,{v:r}),i.get(r))),a={},n=new WeakMap;return(...o)=>{const r=o.length===0?[a]:s(...o);let l=n;for(const u of r.slice(0,-1))l.has(u)||l.set(u,new WeakMap),l=l.get(u);const c=r.at(-1);let h=l.get(c);return h?e?.("hit",t,o):(h=t(...o),l.set(c,h),e?.("miss",t,o)),h}}var Vp,$v,Im=I({"packages/ag-charts-community/src/util/memo.ts"(){"use strict";Vp=new WeakMap,$v=class{constructor(){this.weak=new WeakMap,this.strong=new Map,this.set=!1,this.value=void 0}}}});function JA(t,e=new Date(t.getFullYear(),0,1)){const i=t.getTimezoneOffset()-e.getTimezoneOffset(),s=t.getTime()-e.getTime()+i*6e4,a=36e5*24;return Math.floor(s/a)}function OR(t,e){const s=new Date(t.getFullYear(),0,1).getDay(),a=(e-s+7)%7,n=new Date(t.getFullYear(),0,a+1);return n<=t?Math.floor(JA(t,n)/7)+1:0}function PR(t,e=t.getFullYear()){const s=new Date(e,0,1).getDay(),a=(eC-s+7)%7,n=new Date(e,0,a-(eC-tC)+1);return n<=t?Math.floor(JA(t,n)/7)+1:PR(t,e-1)}function aq(t){const e=t.getTimezoneOffset(),i=Math.abs(e);return`${e>0?"-":"+"}${Es(Math.floor(i/60),2,"0")}${Es(Math.floor(i%60),2,"0")}`}function Es(t,e,i){const s=String(Math.floor(t));return s.length>=e?s:`${i.repeat(e-s.length)}${s}`}function Pu(t){const e=[];for(;t.length>0;){let i=t.indexOf("%");if(i!==0){const r=i>0?t.substring(0,i):t;e.push(r)}if(i<0)break;const s=t[i+1],a=RR[s];a!=null&&i++;const n=t[i+1],o=ER[n];if(typeof o=="function")e.push([o,a]);else if(typeof o=="string"){const r=Pu(o);e.push([r,a])}else e.push(`${a??""}${n}`);t=t.substring(i+2)}return i=>{const s=typeof i=="number"?new Date(i):i;return e.map(a=>typeof a=="string"?a:a[0](s,a[1])).join("")}}var Am,_R,tC,eC,ER,RR,Uv=I({"packages/ag-charts-community/src/util/timeFormat.ts"(){"use strict";Am={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},_R=0,tC=1,eC=4,ER={a:t=>Am.shortDays[t.getDay()],A:t=>Am.days[t.getDay()],b:t=>Am.shortMonths[t.getMonth()],B:t=>Am.months[t.getMonth()],c:"%x, %X",d:(t,e)=>Es(t.getDate(),2,e??"0"),e:"%_d",f:(t,e)=>Es(t.getMilliseconds()*1e3,6,e??"0"),H:(t,e)=>Es(t.getHours(),2,e??"0"),I:(t,e)=>{const i=t.getHours()%12;return i===0?"12":Es(i,2,e??"0")},j:(t,e)=>Es(JA(t)+1,3,e??"0"),m:(t,e)=>Es(t.getMonth()+1,2,e??"0"),M:(t,e)=>Es(t.getMinutes(),2,e??"0"),L:(t,e)=>Es(t.getMilliseconds(),3,e??"0"),p:t=>t.getHours()<12?"AM":"PM",Q:t=>String(t.getTime()),s:t=>String(Math.floor(t.getTime()/1e3)),S:(t,e)=>Es(t.getSeconds(),2,e??"0"),u:t=>{let e=t.getDay();return e<1&&(e+=7),String(e%7)},U:(t,e)=>Es(OR(t,_R),2,e??"0"),V:(t,e)=>Es(PR(t),2,e??"0"),w:(t,e)=>Es(t.getDay(),2,e??"0"),W:(t,e)=>Es(OR(t,tC),2,e??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(t,e)=>Es(t.getFullYear()%100,2,e??"0"),Y:(t,e)=>Es(t.getFullYear(),4,e??"0"),Z:t=>aq(t),"%":()=>"%"},RR={_:" ",0:"0","-":""}}});function BR(t,e,i){if(typeof t=="string")return t;t??(t=Ro);const{millisecond:s=Ro.millisecond,second:a=Ro.second,minute:n=Ro.minute,hour:o=Ro.hour,day:r=Ro.day,month:l=Ro.month,year:c=Ro.year}=t,h=Rs[e],u=zR[e],d=i?Rs[i]:-1;if(d<Rs.year&&h>=Rs.year&&!$R.test(c)||d<Rs.month&&h>=Rs.month&&!HR.test(l)||d<Rs.day&&h>=Rs.day&&!WR.test(r))return u;let p;switch(e){case"year":return c;case"month":return d<Rs.year?`${l} ${c}`:l;case"day":return d<Rs.year?`${l} ${r} ${c}`:`${l} ${r}`;case"hour":p=o;break;case"minute":p=n;break;case"second":p=a;break;case"millisecond":p=s;break;default:return u}if(h>=Rs.hour&&!jR.test(p)||h>=Rs.minute&&!GR.test(p)||h>=Rs.second&&!VR.test(p)||h>=Rs.millisecond&&!FR.test(p))return u;let g;return d<Rs.year?g=`${l} ${r} ${c}`:d<Rs.month&&(g=`${l} ${r}`),g?`${p} ${g}`:p}var Ro,zR,Rs,FR,VR,GR,jR,WR,HR,$R,UR=I({"packages/ag-charts-community/src/chart/axis/timeFormatUtil.ts"(){"use strict";Ro={millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e",month:"%b",year:"%Y"},zR={millisecond:"%Y %b %e %H:%M:%S.%L",second:"%Y %b %e %H:%M:%S",minute:"%Y %b %e %H:%M",hour:"%Y %b %e %H:%M",day:"%Y %b %e",month:"%Y %b",year:"%Y"},Rs={year:0,month:1,day:2,hour:3,minute:4,second:5,millisecond:6},FR=/%[-_0]?L/,VR=/%[-_0]?S/,GR=/%[-_0]?M/,jR=/%[-_0]?[HI]/,WR=/^%[-_0]?[de]$/,HR=/^%[-_0]?[Bbm]$/,$R=/^%[-_0]?[Yy]$/}}),_u,Cm=I({"packages/ag-charts-community/src/chart/formatter/formatManager.ts"(){"use strict";R(),xl(),Ou(),NR(),Im(),Uv(),UR(),_u=class rI extends QA{constructor(){super(...arguments),this.formats=new Map,this.dateFormatter=sq((e,i,s,a,n)=>{const o=rI.mergeSpecifiers(e,i)??Ro;return rI.getFormatter("date",o,s,a,{truncateDate:n})}),this.formatter=void 0}static mergeSpecifiers(...e){let i;for(const s of e)typeof s=="string"?i=s:No(s)&&(i=No(i)?{...i,...s}:s);return i}static getFormatter(e,i,s,a="long",{truncateDate:n}={}){if(No(i)){if(e!=="date"){ut.warn("Date formatter configuration is not supported for non-date types.");return}s??(s="millisecond");const o=a==="component"?i?.[s]??Ro[s]:BR(i,s,n);return Pu(o)}switch(e){case"number":const o=Wb(i);return o==null?void 0:_I(o);case"date":return Pu(i);case"category":return r=>i.replace("%s",String(r))}}setFormatter(e){this.formatter!==e&&(this.formatter=e,this.formats.clear(),this.dateFormatter.reset(),this.dispatch("format-changed"))}format(e,i,{specifier:s,truncateDate:a}={}){if(i.value==null)return;const{formatter:n}=this;if(n==null)return;if(typeof n=="function"){const c=e(n,i);return c!=null?String(c):void 0}const o=n[i.property];if(o==null)return;if(typeof o=="function"){const c=e(o,i);return c!=null?String(c):void 0}else if(i.type==="date"){const{unit:c,style:h}=i;return this.dateFormatter(o,s,c,h,a)?.(i.value)}const r=s??o;if(typeof r!="string")return;let l=this.formats.get(r);return l==null&&(l=rI.getFormatter(i.type,r),this.formats.set(r,l)),l?.(i.value,i.type==="number"?i.fractionDigits:void 0)}defaultFormat(e,{specifier:i,truncateDate:s}={}){const{formatter:a}=this,n=typeof a=="function"?void 0:a?.[e.property];switch(e.type){case"date":{const{unit:o,style:r}=e,l=n!=null&&typeof n!="function"?n:void 0;return this.dateFormatter(l,i,o,r,s)?.(e.value)??String(e.value)}case"number":return Cc(e.value,e.fractionDigits);case"category":return Array.isArray(e.value)?e.value.join(" - "):typeof e.value=="string"?e.value:typeof e.value=="number"?Cc(e.value):String(e.value)}}}}});function nq(t,e){return i=>Number(t)*(1-i)+Number(e)*i}function KR(t,e){if(typeof t=="string")try{t=be.fromString(t)}catch{t=be.fromArray([0,0,0])}if(typeof e=="string")try{e=be.fromString(e)}catch{e=be.fromArray([0,0,0])}return i=>be.mix(t,e,i).toRgbaString()}var YR=I({"packages/ag-charts-community/src/util/interpolate.ts"(){"use strict";fu()}}),iC={};La(iC,{easeIn:()=>ZR,easeInOut:()=>XR,easeInOutQuad:()=>JR,easeInQuad:()=>qR,easeOut:()=>Gp,easeOutQuad:()=>QR,inverseEaseOut:()=>aC,linear:()=>sC});var sC,ZR,Gp,XR,qR,QR,JR,aC,jp=I({"packages/ag-charts-community/src/motion/easing.ts"(){"use strict";sC=t=>t,ZR=t=>1-Math.cos(t*Math.PI/2),Gp=t=>Math.sin(t*Math.PI/2),XR=t=>-(Math.cos(t*Math.PI)-1)/2,qR=t=>t*t,QR=t=>1-(1-t)**2,JR=t=>t<.5?2*t*t:1-(-2*t+2)**2/2,aC=t=>2*Math.asin(t)/Math.PI}});function oq(t){return t.every(e=>e instanceof br)}function Kv(t){return oq(t)?{nodes:t,selections:[]}:{nodes:[],selections:t}}function nC(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((i,s)=>nC(i,e[s])):cm(t)&&cm(e)?t.equals(e):oC(t)&&oC(e)?WI(t,e,nC):!1}var tB,oC,Lm,Eu,Wp,rC,lC,Ru=I({"packages/ag-charts-community/src/motion/animation.ts"(){"use strict";R(),Vn(),YR(),FI(),Pt(),jp(),{clamp:tB,isPlainObject:oC}=st,Lm=.2,Eu=["initial","remove","update","add","trailing","end","none"],Wp={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:Lm,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1+Lm,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},rC=(t=>(t.Loop="loop",t.Reverse="reverse",t))(rC||{}),lC=class{constructor(t){this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=t.id,this.groupId=t.groupId,this.autoplay=t.autoplay??!0,this.ease=t.ease??sC,this.phase=t.phase;const e=t.duration??Wp[this.phase].animationDuration;this.duration=e*t.defaultDuration,this.delay=(t.delay??0)*t.defaultDuration,this.onComplete=t.onComplete,this.onPlay=t.onPlay,this.onStop=t.onStop,this.onUpdate=t.onUpdate,this.interpolate=this.createInterpolator(t.from,t.to),this.from=t.from,t.skip===!0&&(this.onUpdate?.(t.to,!1,this),this.onStop?.(this),this.onComplete?.(this),this.isComplete=!0),t.collapsable!==!1&&(this.duration=this.checkCollapse(t,this.duration))}checkCollapse(t,e){return nC(t.from,t.to)?0:e}play(t=!1){this.isPlaying||this.isComplete||(this.isPlaying=!0,this.onPlay?.(this),this.autoplay&&(this.autoplay=!1,t&&this.onUpdate?.(this.from,!0,this)))}stop(){this.isPlaying=!1,this.isComplete||(this.isComplete=!0,this.onStop?.(this))}update(t){if(this.isComplete)return t;!this.isPlaying&&this.autoplay&&this.play(!0);const e=this.elapsed;if(this.elapsed+=t,this.delay>this.elapsed)return 0;const i=this.interpolate(this.isReverse?1-this.delta:this.delta);this.onUpdate?.(i,!1,this);const s=this.delay+this.duration;return this.elapsed>=s?(this.stop(),this.isComplete=!0,this.onComplete?.(this),t-(s-e)):0}get delta(){return this.ease(tB(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(t,e){if(typeof e!="object"||cm(e))return this.interpolateValue(t,e);const i=[];for(const s of Object.keys(e)){const a=this.interpolateValue(t[s],e[s]);a!=null&&i.push([s,a])}return s=>{const a={};for(const[n,o]of i)a[n]=o(s);return a}}interpolateValue(t,e){if(!(t==null||e==null)){if(cm(t))return i=>t[lm](e,i);try{switch(typeof t){case"number":return nq(t,e);case"string":return KR(t,e);case"boolean":if(t===e)return()=>t;break;case"object":return()=>t;default:throw new Error(`Unable to interpolate values: ${t}, ${e}`)}}catch{}throw new Error(`Unable to interpolate values: ${t}, ${e}`)}}}}}),cC,rq=I({"packages/ag-charts-community/src/chart/interaction/animationBatch.ts"(){"use strict";R(),Ru(),yi(),cC=class{constructor(t){this.maxAnimationTime=t,this.debug=Ft.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(Eu.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){return this.phases.get(Eu[this.currentPhase])??[]}checkOverlappingId(t){t!=null&&this.controllers.has(t)&&(this.controllers.get(t).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${t}`),this.skip())}addAnimation(t){if(t.isComplete)return;if(Eu.indexOf(t.phase)<this.currentPhase){this.debug("Skipping animation due to being for an earlier phase",t.id),t.stop();return}this.controllers.set(t.id,t),this.phases.get(t.phase)?.push(t)}removeAnimation(t){this.controllers.delete(t.id);const e=this.phases.get(t.phase),i=e?.indexOf(t);i!=null&&i>=0&&e?.splice(i,1)}progress(t){if(!this.isReady)return;let e=t===0?.01:t;const i=()=>{const c=Eu[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:c,phaseMeta:Wp[c]}};let{phase:s,phaseControllers:a,phaseMeta:n}=i();const o=()=>Eu[this.currentPhase]==null,r=()=>{for({phase:s,phaseControllers:a,phaseMeta:n}=i();!o()&&a.length===0;)this.currentPhase++,{phase:s,phaseControllers:a,phaseMeta:n}=i(),this.debug(`AnimationBatch - phase changing to ${s}`,{unusedTime:e},a)},l=this.controllers.size;this.debug(`AnimationBatch - ${t}ms; phase ${s} with ${a?.length} of ${l}`);do{const c=e,h=n.skipIfNoEarlierAnimations&&this.animationTimeConsumed===0;let u=0;for(const d of a)h?d.stop():e=Math.min(d.update(c),e),d.isComplete&&(u++,this.removeAnimation(d));this.animationTimeConsumed+=c-e,this.debug(`AnimationBatch - updated ${a.length} controllers; ${u} completed`,a),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),r()}while(e>0&&!o());this.animationTimeConsumed>this.maxAnimationTime&&(this.debug("Animation batch exceeded max animation time, skipping",[...this.controllers]),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let t=!0;for(const[,e]of this.controllers)if(e.duration>0&&Wp[e.phase].skipIfNoEarlierAnimations!==!0){t=!1;break}if(!t)for(const[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(t=!0){if(this.skipAnimations===!1&&t===!0){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=t}play(){for(const t of this.controllers.values())t.play()}stop(){for(const t of this.controllers.values())try{t.stop(),this.removeAnimation(t)}catch(e){ut.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(t){if(t!=null&&this.controllers.has(t)){const e=this.controllers.get(t);e&&(e.stop(),this.removeAnimation(e))}}stopByAnimationGroupId(t){for(const e of this.controllers.values())e.groupId===t&&this.stopByAnimationId(e.id)}dispatchStopped(){this.stoppedCbs.forEach(t=>t()),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}getRemainingTime(t){if(!this.isActive())return 0;let e=0;for(const[i,s]of this.phases)s.length!==0&&(t!=null&&t!==i||(e+=Math.max(...s.map(a=>a.isComplete?0:a.delay+a.duration-(a.elapsed??0)))));return e}destroy(){this.stop(),this.controllers.clear()}}}}),hC,uC,eB=I({"packages/ag-charts-community/src/chart/interaction/interactionManager.ts"(){"use strict";hC=(t=>(t[t.Default=32]="Default",t[t.ZoomDrag=16]="ZoomDrag",t[t.Annotations=8]="Annotations",t[t.ContextMenu=4]="ContextMenu",t[t.Animation=2]="Animation",t[t.AnnotationsSelected=1]="AnnotationsSelected",t[t.Clickable=41]="Clickable",t[t.Focusable=34]="Focusable",t[t.Keyable=43]="Keyable",t[t.ContextMenuable=36]="ContextMenuable",t[t.AnnotationsMoveable=9]="AnnotationsMoveable",t[t.AnnotationsDraggable=57]="AnnotationsDraggable",t[t.ZoomDraggable=50]="ZoomDraggable",t[t.ZoomClickable=34]="ZoomClickable",t[t.ZoomWheelable=59]="ZoomWheelable",t[t.All=63]="All",t))(hC||{}),uC=class{constructor(){this.stateQueue=34}pushState(t){this.stateQueue|=t}popState(t){this.stateQueue&=~t}isState(t){return!!(this.stateQueue&-this.stateQueue&t)}}}});function iB(t){return t==null?!0:!isNaN(t)&&t>=0&&t<=2}var dC,sB=I({"packages/ag-charts-community/src/chart/interaction/animationManager.ts"(){"use strict";R(),Ru(),yi(),rq(),dC=class{constructor(t,e){this.interactionManager=t,this.chartUpdateMutex=e,this.defaultDuration=1e3,this.batch=new cC(this.defaultDuration*1.5),this.debug=Ft.create(!0,"animation"),this.events=new gr,this.rafAvailable=typeof requestAnimationFrame<"u",this.isPlaying=!0,this.requestId=null,this.skipAnimations=!0,this.currentAnonymousAnimationId=0}addListener(t,e){return this.events.on(t,e)}animate(t){const e=this.batch;try{e.checkOverlappingId(t.id)}catch(r){this.failsafeOnError(r);return}let{id:i}=t;i==null&&(i=`__${this.currentAnonymousAnimationId}`,this.currentAnonymousAnimationId+=1);const s=this.isSkipped()||t.phase==="none";s&&this.debug("AnimationManager - skipping animation");const{delay:a,duration:n}=t;if(!iB(a))throw new Error(`Animation delay of ${a} is unsupported (${i})`);if(!iB(n))throw new Error(`Animation duration of ${n} is unsupported (${i})`);const o=new lC({...t,id:i,skip:s,autoplay:this.isPlaying?t.autoplay:!1,phase:t.phase,defaultDuration:this.defaultDuration});if(!this.forceTimeJump(o,this.defaultDuration))return this.batch.addAnimation(o),o}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(t){this.failsafeOnError(t)}this.requestAnimation()}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(t){try{this.batch.stopByAnimationId(t)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(t){try{this.batch.stopByAnimationGroupId(t)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(t=!0){this.skipAnimations=t}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}getRemainingTime(t){return this.batch.getRemainingTime(t)}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:new Error().stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(t){this.requestId=de().requestAnimationFrame(e=>{t(e).catch(i=>ut.error(i))})}forceTimeJump(t,e){return!1}requestAnimation(){if(!this.rafAvailable||!this.batch.isActive()||this.requestId!==null)return;let t;const e=async i=>{await this.debug.group("AnimationManager.onAnimationFrame()",async()=>{const s=()=>{const a=i-(t??i);t=i,this.debug("AnimationManager",{controllersCount:this.batch.size,deltaTime:a}),this.interactionManager.pushState(2);try{this.batch.progress(a)}catch(n){this.failsafeOnError(n)}this.events.emit("animation-frame",{type:"animation-frame",deltaMs:a})};this.isSkippingFrames()?await this.chartUpdateMutex.acquireImmediately(s):await this.chartUpdateMutex.acquire(s),this.batch.isActive()?this.scheduleAnimationFrame(e):(this.batch.stop(),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))})};this.events.emit("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(e)}cancelAnimation(){this.requestId!==null&&(cancelAnimationFrame(this.requestId),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}),this.requestId=null,this.startBatch())}failsafeOnError(t,e=!0){ut.error("Error during animation, skipping animations",t),e&&this.cancelAnimation()}startBatch(t){this.debug(`AnimationManager - startBatch() with skipAnimations=${t}.`),this.reset(),this.batch.destroy(),this.batch=new cC(this.defaultDuration*1.5),t===!0&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(2),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(t){this.batch.stoppedCbs.add(t)}destroy(){this.stop(),this.events.clear()}}}}),aB,nB,pC,oB=I({"packages/ag-charts-community/src/chart/interaction/contextMenuTypes.ts"(){"use strict";aB=class{constructor(){this.download={type:"action",showOn:"always",label:"contextMenuDownload",enabled:!0,action:void 0,items:void 0},this["zoom-to-cursor"]={type:"action",showOn:"series-area",label:"contextMenuZoomToCursor",enabled:!0,action:void 0,items:void 0},this["pan-to-cursor"]={type:"action",showOn:"series-area",label:"contextMenuPanToCursor",enabled:!0,action:void 0,items:void 0},this["reset-zoom"]={type:"action",showOn:"series-area",label:"contextMenuResetZoom",enabled:!0,action:void 0,items:void 0},this["toggle-series-visibility"]={type:"action",showOn:"legend-item",label:"contextMenuToggleSeriesVisibility",enabled:!0,action:void 0,items:void 0},this["toggle-other-series"]={type:"action",showOn:"legend-item",label:"contextMenuToggleOtherSeries",enabled:!0,action:void 0,items:void 0},this.separator={type:"separator",showOn:"always",label:"separator",enabled:!0,action:void 0,items:void 0}}},nB=class{constructor(){this.defaults=["download","zoom-to-cursor","pan-to-cursor","reset-zoom","toggle-series-visibility","toggle-other-series"]}},pC=class{constructor(){this.items=new aB,this.lists=new nB}}}}),gC,rB=I({"packages/ag-charts-community/src/chart/interaction/contextMenuRegistry.ts"(){"use strict";oB(),gC=class{constructor(t){this.eventsHub=t,this.builtins=new pC,this.hiddenActions=new Set,this.setVisible("zoom-to-cursor",!1),this.setVisible("pan-to-cursor",!1),this.setVisible("reset-zoom",!1)}static check(t,e){return e.showOn==t}static checkCallback(t,e,i){return t===e}dispatchContext(t,e,i,s){const{widgetEvent:a}=e;if(a.sourceEvent.defaultPrevented)return;const n=s?.x??e.canvasX,o=s?.y??e.canvasY,r={showOn:t,x:n,y:o,context:i,widgetEvent:a};this.eventsHub.emit("context-menu:setup",r),this.eventsHub.emit("context-menu:complete",r)}isVisible(t){return!this.hiddenActions.has(t)}setVisible(t,e){e?this.hiddenActions.delete(t):this.hiddenActions.add(t)}}}}),fC,lB=I({"packages/ag-charts-community/src/chart/interaction/highlightManager.ts"(){"use strict";Ev(),fC=class{constructor(t){this.eventsHub=t,this.highlightStates=new Tu}updateHighlight(t,e){const i=this.getActiveHighlight();this.highlightStates.set(t,e);const s=this.getActiveHighlight();this.isEqual(s,i)||this.eventsHub.emit("highlight:change",{callerId:t,currentHighlight:s,previousHighlight:i})}getActiveHighlight(){return this.highlightStates.stateValue()}isEqual(t,e){return t===e||t!=null&&e!=null&&t?.series===e?.series&&t?.itemId===e?.itemId&&t?.datum===e?.datum}}}});function cB(t,e){if(t==null||e.length===0)return[!1,!1];const i=t.valueOf(),s=e[0],a=e[e.length-1];if(typeof s=="string")return[i===s,i===a];let n=s.valueOf(),o=a.valueOf();return n>o&&([n,o]=[o,n]),[i===n,i===o]}function Lc(t,e,i,s,a,n){const[o,r]=cB(e,n),[l,c]=cB(t,a);return{xKey:i,yKey:s,xValue:t,yValue:e,first:l,last:c,min:o,max:r}}function hB(t,e,[i,s],a){let n=Dp(0,e-1,r=>{const l=t===1?r:e-r,c=a(l)?.[1]??NaN;return!Number.isFinite(c)||c>i})??0,o=bc(0,e-1,r=>{const l=t===1?r:e-r,c=a(l)?.[0]??NaN;return!Number.isFinite(c)||c<s})??e-1;return t===-1&&([n,o]=[e-o,e-n]),n=Math.max(n,0),o=Math.min(o+1,e),[n,o]}function mC(t,e,i){if(i){const{x:a,y:n,width:o,height:r}=i;return{canvasX:a+o/2,canvasY:n+r/2}}const s=e.yBar?.upperPoint??e.midPoint??t.datumMidPoint?.(e);if(s){const{x:a,y:n}=He.toCanvasPoint(t.contentGroup,s.x,s.y);return{canvasX:Math.round(a),canvasY:Math.round(n)}}}function uB(t,e,i,s,a){let n=-1,o=0,r=0,l=!1;for(;o<s&&n<=e-t;){n+=1;const c=i+r;if(l||(r*=-1),r>=0&&(r+=1),l&&r<0&&(r-=1),c<t||c>e){l=!0;continue}a(c)&&(o+=1)}return o}var Bu=I({"packages/ag-charts-community/src/chart/series/util.ts"(){"use strict";R(),ns()}}),wm,yC=I({"packages/ag-charts-community/src/chart/interaction/tooltipManager.ts"(){"use strict";R(),Pt(),Ev(),Bu(),wm=class{constructor(t,e,i,s){this.domManager=i,this.tooltip=s,this.stateTracker=new Tu,this.suppressState=new Tu(!1),this.appliedState=null,this.cleanup=new Fe,this.cleanup.register(s.setup(e,i),t.on("dom:hidden",()=>this.tooltip.hide()))}destroy(){this.cleanup.flush()}updateTooltip(t,e,i,s){i??(i=this.stateTracker.get(t)?.content),this.stateTracker.set(t,{meta:e,content:i,pagination:s}),this.applyStates()}removeTooltip(t){this.stateTracker.delete(t),this.applyStates()}suppressTooltip(t){this.suppressState.set(t,!0)}unsuppressTooltip(t){this.suppressState.delete(t)}applyStates(){const t=this.stateTracker.stateId(),e=t?this.stateTracker.get(t):void 0;if(this.suppressState.stateValue()||e?.meta==null||e?.content==null){this.appliedState=null,this.tooltip.hide();return}const i=this.domManager.getBoundingClientRect(),s=this.tooltip.bounds==="extended"?this.domManager.getOverlayClientRect():i;if(Wi(this.appliedState?.content,e?.content)&&Wi(this.appliedState?.pagination,e?.pagination)){const a=this.tooltip.isVisible();this.tooltip.show(s,i,e?.meta,null,void 0,a)}else this.tooltip.show(s,i,e?.meta,e?.content,e?.pagination);this.appliedState=e}static makeTooltipMeta(t,e,i,s){const{canvasX:a,canvasY:n}=t,o=e.properties.tooltip,{placement:r,anchorTo:l,xOffset:c,yOffset:h}=o.position,u=mC(e,i,s);return{canvasX:a,canvasY:n,nodeCanvasX:u?.canvasX??a,nodeCanvasY:u?.canvasY??n,enableInteraction:o.interaction?.enabled??!1,showArrow:o.showArrow,position:{placement:r,anchorTo:l,xOffset:c,yOffset:h}}}}}});function xC(t,e){const{device:i,offsetX:s,offsetY:a,clientX:n,clientY:o,currentX:r,currentY:l,sourceEvent:c}=e;return{type:t,device:i,offsetX:s,offsetY:a,clientX:n,clientY:o,currentX:r,currentY:l,sourceEvent:c}}function dB(t,e){const i=t*t+e*e,s=bC*bC;return i>=s}function lq(t,e){const i=t.clientX-e.clientX,s=t.clientY-e.clientY,a=i*i+s*s,n=vC*vC;return a<n}var bC,pB,vC,SC,gB=I({"packages/ag-charts-community/src/chart/interaction/dragInterpreter.ts"(){"use strict";R(),bC=3,pB=505,vC=30,SC=class{constructor(t){this.cleanup=new Fe,this.events=new gr,this.isDragging=!1,this.touch={distanceTravelledX:0,distanceTravelledY:0,clientX:0,clientY:0},this.cleanup.register(t.addListener("touchstart",this.onTouchStart.bind(this)),t.addListener("touchmove",this.onTouchMove.bind(this)),t.addListener("touchend",this.onTouchEnd.bind(this)),t.addListener("mousemove",this.onMouseMove.bind(this)),t.addListener("dblclick",this.onDblClick.bind(this)),t.addListener("drag-start",this.onDragStart.bind(this)),t.addListener("drag-move",this.onDragMove.bind(this)),t.addListener("drag-end",this.onDragEnd.bind(this)))}destroy(){this.cleanup.flush()}onTouchStart(t){const{clientX:e,clientY:i}=t.sourceEvent.targetTouches[0]??{clientX:1/0,clientY:1/0};this.touch.distanceTravelledX=0,this.touch.distanceTravelledY=0,this.touch.clientX=e,this.touch.clientY=i}onTouchMove(t){const{clientX:e,clientY:i}=t.sourceEvent.targetTouches[0]??{clientX:1/0,clientY:1/0};this.touch.distanceTravelledX+=Math.abs(this.touch.clientX-e),this.touch.distanceTravelledY+=Math.abs(this.touch.clientY-i),this.touch.clientX=e,this.touch.clientY=i}onTouchEnd(t){t.sourceEvent.preventDefault()}onMouseMove(t){this.events.emit("mousemove",t)}onDblClick(t){this.events.emit("dblclick",t)}onDragStart(t){this.dragStartEvent=t}onDragMove(t){this.dragStartEvent!=null&&dB(t.originDeltaX,t.originDeltaY)&&(this.events.emit("drag-start",this.dragStartEvent),this.events.emit("drag-move",{...this.dragStartEvent,type:"drag-move"}),this.dragStartEvent=void 0,this.isDragging=!0),this.isDragging&&this.events.emit("drag-move",t)}onDragEnd(t){if(this.isDragging){this.events.emit("drag-end",t),this.isDragging=!1;return}if(t.device==="mouse"){const e=xC("click",t);this.events.emit("click",e)}else if(t.sourceEvent.type==="touchend"){if(dB(this.touch.distanceTravelledX,this.touch.distanceTravelledY))return;const e=xC("click",t);this.events.emit("click",e);const i=Date.now();if(this.lastClick!==void 0&&i-this.lastClick.time<=pB&&lq(this.lastClick,t)){const s=xC("dblclick",t);this.events.emit("dblclick",s),this.lastClick=void 0}else this.lastClick={time:i,clientX:t.clientX,clientY:t.clientY}}}}}}),Yv,fB,cq=I({"packages/ag-charts-community/src/chart/interaction/widgetSet.ts"(){"use strict";Fv(),gB(),Yv=class extends Nu{constructor(t){super(t)}addChildToDOM(){}removeChildFromDOM(){}},fB=class{constructor(t,e){this.seriesWidget=new Yv(t.getParent("series-area")),this.chartWidget=new Yv(t.getParent("canvas-proxy")),this.containerWidget=new Yv(t.getParent("canvas-container")),this.containerWidget.addChild(this.chartWidget),this.chartWidget.addChild(this.seriesWidget),e.withDragInterpretation&&(this.seriesDragInterpreter=new SC(this.seriesWidget))}destroy(){this.seriesDragInterpreter?.destroy(),this.seriesWidget.destroy(),this.chartWidget.destroy(),this.containerWidget.destroy()}}}});function Tm(t,e){const[i,s]=ls(e);return Et(i,t,s)}function ls(t){if(t.length===0)return[];const e=[1/0,-1/0];for(const i of t)i<e[0]&&(e[0]=i),i>e[1]&&(e[1]=i);return e}function Nm(t){const[e,i]=ls(t);return i-e}var Gn=I({"packages/ag-charts-community/src/util/number.ts"(){"use strict";R()}});function MC(...t){let e,i=1/0,s,a=-1/0;for(const n of t)for(const o of n){const r=o.valueOf();r<i&&(i=r,e=o),r>a&&(a=r,s=o)}return e!=null&&s!=null?{domain:[e,s],animatable:!0}:{domain:[],animatable:!1}}var DC,me,Bs=I({"packages/ag-charts-community/src/scale/continuousScale.ts"(){"use strict";Gn(),iv(),DC=class bP extends pm{constructor(e=[],i=[]){super(),this.domain=e,this.range=i,this.defaultTickCount=bP.defaultTickCount,this.defaultClamp=!1}static is(e){return e instanceof bP}normalizeDomains(...e){return MC(...e)}calcBandwidth(e=1,i=1){const{domain:s}=this,a=this.getPixelRange();if(s.length===0)return a;let o=Math.abs(s[1].valueOf()-s[0].valueOf())/e+1;if(i!==0){const r=Math.floor(a);o=Math.min(o,r)}return a/Math.max(1,o)}convert(e,i){const{domain:s}=this;if(!s||s.length<2||e==null)return NaN;const{range:a}=this,n=i?.clamp??this.defaultClamp;let o=s[0].valueOf(),r=s[1].valueOf(),l=e.valueOf();if(this.transform&&(o=this.transform(o),r=this.transform(r),l=this.transform(l)),n){const[h,u]=ls([o,r]);if(l<h)return a[0];if(l>u)return a[1]}if(o===r)return(a[0]+a[1])/2;if(l===o)return a[0];if(l===r)return a[1];const c=a[0];return c+(l-o)/(r-o)*(a[1]-c)}invert(e,i){const{domain:s}=this;if(s.length<2)return;let a=s[0].valueOf(),n=s[1].valueOf();this.transform&&(a=this.transform(a),n=this.transform(n));const{range:o}=this,[r,l]=o;let c;return r===l?c=this.toDomain((a+n)/2):c=this.toDomain(a+(e-r)/(l-r)*(n-a)),this.transformInvert?this.transformInvert(c):c}getPixelRange(){const[e,i]=this.range;return Math.abs(i-e)}},DC.defaultTickCount=5,me=DC}}),Zv,wc,zu=I({"packages/ag-charts-community/src/scale/bandScale.ts"(){"use strict";R(),iv(),tA(),Zv=class KY extends pm{constructor(){super(...arguments),this.invalid=!0,this.range=[0,1],this.round=!1,this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(e){return e instanceof KY}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get inset(){return this.refresh(),this._inset}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=Et(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this.invalid=!0,this._paddingInner=Et(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this.invalid=!0,this._paddingOuter=Et(0,e,1)}get paddingOuter(){return this._paddingOuter}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&ut.warnOnce("Expected update to not invalidate scale"))}convert(e,i){this.refresh();const s=this.findIndex(e);return s==null||s<0||s>=this.bands.length?NaN:this.ordinalRange(s)}invertNearestIndex(e){this.refresh();const i=this.bands.length;if(i===0)return-1;let s=0,a=i-1,n=1/0,o=0;for(;s<=a;){const r=(a+s)/2|0,l=this.ordinalRange(r),c=Math.abs(l-e);if(c===0)return r;c<n&&(n=c,o=r),l<e?s=r+1:a=r-1}return o}update(){const[e,i]=this.range;let{_paddingInner:s}=this;const{_paddingOuter:a,round:n,bands:o}=this,r=o.length;if(r===0)return;const l=i-e;let c;r===1?(s=0,c=l*(1-a*2)):c=l/Math.max(1,r-s+a*2);const h=n?Math.floor(c):c;let u=e+(l-h*(r-s))/2,d=h*(1-s);n&&(u=Math.round(u),d=Math.round(d)),this._step=h,this._inset=u,this._bandwidth=d,this._rawBandwidth=c*(1-s)}ordinalRange(e){const{_inset:i,_step:s,range:a}=this,n=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);return Et(n,i+s*e,o)}},S([wp],Zv.prototype,"range",2),S([wp],Zv.prototype,"round",2),wc=Zv}}),Pa,Fu=I({"packages/ag-charts-community/src/scale/discreteTimeScale.ts"(){"use strict";R(),zu(),Pa=class YY extends wc{static is(e){return e instanceof YY}toDomain(e){return new Date(e)}convert(e,i){e instanceof Date||(e=new Date(e));const{domain:s,bands:a}=this;if(s.length<=0)return NaN;const n=this.ordinalRange(0),o=this.ordinalRange(a.length-1);if(a.length===0)return n;if(i?.clamp===!0){const{range:b}=this;if(e<a[0])return b[0];if(e>a[a.length-1])return b[1]}const r=i?.interpolate??!1,l=s[0].valueOf()>s[s.length-1].valueOf();if(!r){const b=super.convert(e,i);return l?o-(b-n):b}const c=e.valueOf();let h=this.findIndex(e)??0,u;l?(h=Math.min(Math.max(h,1),a.length-1),u=-1):(h=Math.min(Math.max(h,0),a.length-2),u=1);const d=a[h].valueOf(),p=a[h+u].valueOf(),g=this.ordinalRange(h),f=this.ordinalRange(h+u),m=(c-d)/(p-d)*(f-g)+g;return l?o-(m-n):m}invert(e,i=!1){this.refresh();const{domain:s,bands:a}=this;if(s.length<=0)return;const n=s[0].valueOf()>s[s.length-1].valueOf();let o;return i?o=this.invertNearestIndex(e-this.bandwidth/2):o=Dp(0,a.length-1,l=>this.ordinalRange(l)>=e)??a.length-1,a[n?a.length-1-o:o]}}}});function hq(t){return{x:t.x1,y:t.y1}}function uq(t){return{x:t.x2,y:t.y2}}function dq(t){return{x:(t.x1+t.x2)/2,y:Math.min(t.y1,t.y2)}}function pq(t){return{x:(t.x1+t.x2)/2,y:(t.y1+t.y2)/2}}function gq(t){return{x:(t.x1+t.x2)/2,y:Math.max(t.y1,t.y2)}}function fq(t){return Math.abs(t.x2-t.x1)}function mq(t){return Math.abs(t.y2-t.y1)}function yq(t){return{x1:Math.round(t.x1),y1:Math.round(t.y1),x2:Math.round(t.x2),y2:Math.round(t.y2)}}function xq(t){return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}function bq(t,e){const i=kC(t),s=kC(e);return i.x1<=s.x2&&i.x2>=s.x1&&i.y1<=s.y2&&i.y2>=s.y1}function kC(t){return{x1:Math.min(t.x1,t.x2),x2:Math.max(t.x1,t.x2),y1:Math.min(t.y1,t.y2),y2:Math.max(t.y1,t.y2)}}function vq(t,e,i,s){if(typeof t=="number")return{x1:t,y1:e,x2:i,y2:s};if("width"in t)return kC({x1:t.x,y1:t.y,x2:t.x+t.width,y2:t.y+t.height});throw new Error(`Values can not be converted into a vector4: [${JSON.stringify(t)}] [${e}] [${i}] [${s}]`)}function Sq(){return{x1:0,y1:0,x2:0,y2:0}}var Hp,IC=I({"packages/ag-charts-community/src/util/vector4.ts"(){"use strict";Hp={bottomCenter:gq,center:pq,clone:xq,collides:bq,end:uq,from:vq,height:mq,round:yq,start:hq,topCenter:dq,origin:Sq,width:fq}}});function Xv(t,e,i,s,a){return e+(s-e)*((a-t)/(i-t))}function mB(t,e,i,s,a){return t+(a-e)*((i-t)/(s-e))}function yB(t,e,i){return[mB(t,i.min,e,i.max,0),mB(t,i.min,e,i.max,1)]}function Mq(t,e,i){const[s,a]=yB(t.x1,t.x2,e),[n,o]=yB(t.y1,t.y2,i);return{x1:s,x2:a,y1:n,y2:o}}function xB(t,e,i,s,a,n){if(i<=a&&n<=s)return i;const o=a-i,r=n-s,l=Math.abs(o)<Math.abs(r)?o:r;return Et(t,i+l,e)}function Dq(t,e,i){const{x:s={min:0,max:1},y:a={min:0,max:1}}=e,n=Hp.from(i),o=Hp.from(t),r=Mq(o,s,a),l=xB(r.x1,r.x2,o.x1,o.x2,n.x1,n.x2),c=xB(r.y1,r.y2,o.y1,o.y2,n.y1,n.y2),h={x:{min:Xv(o.x1,s.min,o.x2,s.max,l),max:Xv(o.x1,s.min,o.x2,s.max,l+t.width)},y:{min:Xv(o.y1,a.min,o.y2,a.max,c),max:Xv(o.y1,a.min,o.y2,a.max,c+t.height)}},u=h.x.max-h.x.min,d=h.y.max-h.y.min;return h.x.min=Et(0,h.x.min,1-u),h.x.max=h.x.min+u,h.y.min=Et(0,h.y.min,1-d),h.y.max=h.y.min+d,h}var kq=I({"packages/ag-charts-community/src/util/panToBBox.ts"(){"use strict";R(),IC()}}),bB,AC,CC,vB,SB=I({"packages/ag-charts-community/src/chart/interaction/zoomManager.ts"(){"use strict";R(),Bs(),Fu(),_A(),Ta(),Pt(),kq(),Ev(),bB=class{constructor(){this.enabled=!1,this.padding=0,this.manuallyAdjusted=!1}},AC=t=>Qt((e,{options:i})=>!me.is(t?.scale)&&!Pa.is(t?.scale)||e==null||i.end==null?!0:e<=i.end,"to be less than end"),CC=class extends Tv{constructor(t,e){super(),this.eventsHub=t,this.fireChartEvent=e,this.mementoOriginatorKey="zoom",this.axisZoomManagers=new Map,this.state=new Tu(void 0,"initial"),this.axes=[],this.didLayoutAxes=!1,this.autoScaleYAxis=new bB,this.lastRestoredState=void 0,this.independentAxes=!1,this.navigatorModule=!1,this.zoomModule=!1,this.pendingMemento=void 0,this.cleanup.register(t.on("layout:complete",()=>{this.didLayoutAxes=!0;const{pendingMemento:i}=this;i&&this.restoreMemento(i.version,i.mementoVersion,i.memento),this.autoScaleYZoom("zoom-manager")}))}createMemento(){return this.getMementoRanges()}guardMemento(t,e){if(t==null)return!0;if(!xs(t))return!1;const i=this.getPrimaryAxis("x"),s=this.getPrimaryAxis("y"),a={rangeX:{start:AC(i),end:Ct},rangeY:{start:AC(s),end:Ct},ratioX:{start:Ct,end:Ct},ratioY:{start:Ct,end:Ct},autoScaledAxes:Ct},{invalid:n}=Qs(t,a);return n.length>0?(e.push(...n.map(String)),!1):!0}restoreMemento(t,e,i){const{independentAxes:s}=this;if(!this.axes||!this.didLayoutAxes){this.pendingMemento={version:t,mementoVersion:e,memento:i};return}this.pendingMemento=void 0;const a=this.getDefinedZoom();if(i?.rangeX?a.x=this.rangeToRatio(i.rangeX,"x")??{min:0,max:1}:i?.ratioX?a.x={min:i.ratioX.start??0,max:i.ratioX.end??1}:a.x={min:0,max:1},!this.navigatorModule||this.zoomModule){let r=i?.autoScaledAxes?.includes("y");if(i?.rangeY)r??(r=!1),a.y=this.rangeToRatio(i.rangeY,"y")??{min:0,max:1};else if(i?.ratioY)r??(r=!1),a.y={min:i.ratioY.start??0,max:i.ratioY.end??1};else{r??(r=!0);const l=r?this.getAutoScaleYZoom(a.x):void 0;a.y=l??{min:0,max:1}}a.autoScaleYAxis=r}if(this.lastRestoredState=a,s!==!0){this.updateZoom("zoom-manager",a);return}const n=this.getPrimaryAxis("x"),o=this.getPrimaryAxis("y");for(const r of[n,o])r&&this.updateAxisZoom("zoom-manager",r.id,a[r.direction])}updateAxes(t){this.axes=t;const e=new Map(t.map(i=>[i.id,this.axisZoomManagers.get(i.id)]));this.axisZoomManagers.clear();for(const i of t)this.axisZoomManagers.set(i.id,e.get(i.id)??new vB(i));this.state.size>0&&t.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}setIndependentAxes(t=!0){this.independentAxes=t}setAutoScaleYAxis(t,e){this.autoScaleYAxis.enabled=t,this.autoScaleYAxis.padding=e,t&&this.autoScaleYZoom("toggle-auto-scale")}setNavigatorEnabled(t=!0){this.navigatorModule=t}setZoomModuleEnabled(t=!0){this.zoomModule=t}isNavigatorEnabled(){return this.navigatorModule}isZoomEnabled(){return this.zoomModule}updateZoom(t,e){if(e?.x&&(e.x.min<0||e.x.max>1)&&(ut.warnOnce(`Attempted to update x-axis zoom to an invalid ratio of [{ min: ${e.x.min}, max: ${e.x.max} }], expecting a ratio of 0 to 1, ignoring.`),e.x=void 0),e?.y&&(e.y.min<0||e.y.max>1)&&(ut.warnOnce(`Attempted to update y-axis zoom to an invalid ratio of [{ min: ${e.y.min}, max: ${e.y.max} }], expecting a ratio of 0 to 1, ignoring.`),e.y=void 0),this.axisZoomManagers.size===0){const s=this.state.stateId();(s==="initial"||s===t)&&this.state.set(t,e);return}this.state.set(t,e);const i=e?.autoScaleYAxis;i!=null&&(this.autoScaleYAxis.manuallyAdjusted=!i),this.axisZoomManagers.forEach(s=>{s.updateZoom(t,e?.[s.getDirection()])}),this.applyChanges(t)}updateAxisZoom(t,e,i){this.axisZoomManagers.get(e)?.updateZoom(t,i),this.applyChanges(t)}resetZoom(t){this.autoScaleYAxis.manuallyAdjusted=!1;const e=this.getRestoredZoom();this.updateZoom(t,{x:{min:e?.x?.min??0,max:e?.x?.max??1},y:{min:e?.y?.min??0,max:e?.y?.max??1},autoScaleYAxis:e?.autoScaleYAxis??!0})}resetAxisZoom(t,e){const s=this.axisZoomManagers.get(e)?.getDirection();if(s==null)return;const a=this.getRestoredZoom();if(s==="y"){const n=a?.autoScaleYAxis??!0;this.autoScaleYAxis.manuallyAdjusted=!n}for(const n of this.axes)n.direction===s&&this.updateAxisZoom(t,n.id,a?.[s]??{min:0,max:1})}setAxisManuallyAdjusted(t,e){this.axisZoomManagers.get(e)?.getDirection()==="y"&&(this.autoScaleYAxis.manuallyAdjusted=!0)}updatePrimaryAxisZoom(t,e,i){const s=this.getPrimaryAxis(e);s&&this.updateAxisZoom(t,s.id,i)}panToBBox(t,e,i){if(!this.isZoomEnabled()&&!this.isNavigatorEnabled())return!1;const s=this.getZoom();if(s===void 0||!s.x&&!s.y)return!1;if(!(e.width>0&&e.height>0&&Math.abs(i.width)<=Math.abs(e.width)&&Math.abs(i.height)<=Math.abs(e.height)))return ut.warnOnce("cannot pan to target BBox - chart too small?"),!1;const n=Dq(e,s,i);return this.independentAxes?(this.updatePrimaryAxisZoom(t,"x",n.x),this.updatePrimaryAxisZoom(t,"y",n.y)):this.updateZoom(t,n),!0}fireZoomPanStartEvent(t){this.eventsHub.emit("zoom:pan-start",{callerId:t})}extendToEnd(t,e,i){return this.extendWith(t,e,s=>Number(s)-i)}extendWith(t,e,i){const s=this.getPrimaryAxis(e);if(!s)return;const a=this.getDomainExtents(s);if(!a)return;const[,n]=a,o=i(n),r=this.rangeToRatio({start:o,end:n},e);r&&this.updateZoom(t,{[e]:r})}updateWith(t,e,i){const s=this.getPrimaryAxis(e);if(!s)return;const a=this.getDomainExtents(s);if(!a)return;let[n,o]=a;[n,o]=i(n,o);const r=this.rangeToRatio({start:n,end:o},e);r&&this.updateZoom(t,{[e]:r})}getZoom(){let t,e;if(this.axisZoomManagers.forEach(i=>{i.getDirection()==="x"?t??(t=i.getZoom()):i.getDirection()==="y"&&(e??(e=i.getZoom()))}),t||e)return{x:t,y:e}}getAxisZoom(t){return this.axisZoomManagers.get(t)?.getZoom()??{min:0,max:1}}getAxisZooms(){const t={};for(const[e,i]of this.axisZoomManagers.entries())t[e]={direction:i.getDirection(),zoom:i.getZoom()};return t}getRestoredZoom(){return this.lastRestoredState}getPrimaryAxisId(t){return this.getPrimaryAxis(t)?.id}isVisibleItemsCountAtLeast(t,e){const i=this.getPrimaryAxis("x"),s=this.getPrimaryAxis("y"),a=new Set;let n=0;const o=[t.x.min,t.x.max],r=[t.y.min,t.y.max];for(const l of i?.boundSeries??[]){a.add(l.id);const c=e-(n??0),h=l.getVisibleItems(o,r,c);if(n+=h,n>=e)return!0}for(const l of s?.boundSeries??[]){if(a.has(l.id))continue;const c=e-(n??0),h=l.getVisibleItems(o,r,c);if(n+=h,n>=e)return!0}return a.size===0}getMementoRanges(){const t=this.getDefinedZoom();let e;return this.autoScaleYAxis.enabled&&(e=this.autoScaleYAxis.manuallyAdjusted?[]:["y"]),{rangeX:this.getRangeDirection(t.x,"x"),rangeY:this.getRangeDirection(t.y,"y"),ratioX:{start:t.x.min,end:t.x.max},ratioY:{start:t.y.min,end:t.y.max},autoScaledAxes:e}}getAutoScaleYZoom(t){if(!this.isZoomEnabled())return;const{independentAxes:e,autoScaleYAxis:i}=this;if(!i.enabled||i.manuallyAdjusted)return;const{padding:s}=i;return t?.min===0&&t?.max===1?{min:0,max:1}:e?this.primaryAxisZoom("y",t,{padding:s}):this.combinedAxisZoom("y",t,{padding:s})}autoScaleYZoom(t,e=!0){const{independentAxes:i}=this,s=this.getZoom();if(s?.x==null)return;const a=this.getAutoScaleYZoom(s.x);if(!(a==null||Wi(s.y,a))){if(i){const n=this.getPrimaryAxis("y");(n==null?void 0:this.axisZoomManagers.get(n.id))?.updateZoom("zoom-manager",a)}else for(const n of this.axisZoomManagers.values())n.getDirection()==="y"&&n.updateZoom("zoom-manager",a);e&&this.applyChanges(t)}}applyChanges(t){if(this.autoScaleYZoom(t,!1),!Array.from(this.axisZoomManagers.values(),s=>s.applyChanges()).includes(!0))return;const i={};for(const[s,a]of this.axisZoomManagers.entries())i[s]=a.getZoom();this.eventsHub.emit("zoom:change",{...this.getZoom(),axes:i,callerId:t}),this.fireChartEvent({type:"zoom",...this.getMementoRanges()})}getRangeDirection(t,e){const i=this.getPrimaryAxis(e);if(!i||!me.is(i.scale)&&!Pa.is(i.scale))return;const s=this.getDomainPixelExtents(i);if(!s)return;const[a,n]=s;let o,r;return a<=n?(o=i.scale.invert(0),r=i.scale.invert(a+(n-a)*t.max)):(o=i.scale.invert(a-(a-n)*t.min),r=i.scale.invert(0)),{start:o,end:r}}rangeToRatio(t,e){const i=this.getPrimaryAxis(e);if(!i)return;const s=this.getDomainPixelExtents(i);if(!s)return;const[a,n]=s,{scale:o}=i;let r=t.start==null?a:o.convert(t.start),l=t.end==null?n:o.convert(t.end)+(o.bandwidth??0);if(!pe(r)||!pe(l))return;const[c,h]=[Math.min(a,n),Math.max(a,n)];if(r<c||r>h){ut.warnOnce(`Invalid range start [${t.start}], expecting a value between [${o.invert(a)}] and [${o.invert?.(n)}], ignoring.`);return}if(l<c||l>h){ut.warnOnce(`Invalid range end [${t.end}], expecting a value between [${o.invert(a)}] and [${o.invert?.(n)}], ignoring.`);return}r=Math.min(h,Math.max(c,r)),l=Math.min(h,Math.max(c,l));const u=n-a,d=Math.abs((r-a)/u),p=Math.abs((l-a)/u);return{min:d,max:p}}getPrimaryAxis(t){return this.axes?.find(e=>e.direction===t)}getDomainExtents(t){const{domain:e}=t.scale,i=e.at(0),s=e.at(-1);if(!(i==null||s==null))return[i,s]}getDomainPixelExtents(t){const[e,i]=t.scale.range;if(!(!pe(e)||!pe(i)))return[e,i]}getDefinedZoom(){const t=this.getZoom();return{x:{min:t?.x?.min??0,max:t?.x?.max??1},y:{min:t?.y?.min??0,max:t?.y?.max??1}}}zoomBounds(t,e,i,s){const a=t.scale,n=a.range;a.range=[0,1];const o=e.scale,r=o.range;o.range=[0,1];let l=1,c=!1,h=0,u=!1;for(const g of e.boundSeries){if(!g.visible)continue;const{connectsToYAxis:f}=g,x=g.getRange("y",[i.min,i.max]);for(const m of x){const b=o.convert(m);Number.isFinite(b)&&(b<l&&(l=b,c=!f||m<0),b>h&&(h=b,u=!f||m>0))}}if(pe(e.min)&&(l=0),pe(e.max)&&(h=1),a.range=n,o.range=r,l>=h)return;const d=(c?s:0)+(u?s:0),p=Math.min((h-l)*(1+d),1);if(!(p<=0)){if(c&&u){const g=(h+l)/2;l=g-p/2,h=g+p/2}else!c&&u?h=l+p:c&&!u&&(l=h-p);return l<0?(h+=-l,l=0):h>1&&(l-=h-1,h=1),{min:l,max:h}}}primaryAxisZoom(t,e,{padding:i=0}={}){const s=t==="x"?"y":"x",a=this.getPrimaryAxis(s),n=this.getPrimaryAxis(t);if(!(a==null||n==null))return this.zoomBounds(a,n,e,i)}combinedAxisZoom(t,e,{padding:i=0}={}){const s=t==="x"?"y":"x",a=new Map;for(const l of this.axes)if(l.direction===s)for(const c of l.boundSeries)a.set(c,l);let n=1,o=0;for(const l of this.axes)if(l.direction===t)for(const c of l.boundSeries){const h=a.get(c);if(h==null)continue;const u=this.zoomBounds(h,l,e,i);if(u==null)return;n=Math.min(n,u.min),o=Math.max(o,u.max)}const r=1e-6;if(n<r&&(n=0),o>1-r&&(o=1),!(n>o))return{min:n,max:o}}},vB=class{constructor(t){this.axis=t;const[e=0,i=1]=t.visibleRange;this.state=new Tu({min:e,max:i}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(t,e){this.state.set(t,e)}getZoom(){return $e(this.state.stateValue())}hasChanges(){const t=this.currentZoom,e=this.state.stateValue();return t.min!==e.min||t.max!==e.max}applyChanges(){const t=this.hasChanges();return this.currentZoom=this.state.stateValue(),t}}}}),qv,LC,MB,DB=I({"packages/ag-charts-community/src/chart/layout/layoutManager.ts"(){"use strict";Wt(),qv=(t=>(t[t.Caption=0]="Caption",t[t.Legend=1]="Legend",t[t.ToolbarLeft=2]="ToolbarLeft",t[t.ToolbarBottom=3]="ToolbarBottom",t[t.Navigator=4]="Navigator",t[t.Overlay=5]="Overlay",t))(qv||{}),LC=class{constructor(t){this.eventsHub=t,this.elements=new Map}registerElement(t,e){return this.elements.has(t)?this.elements.get(t).add(e):this.elements.set(t,new Set([e])),()=>this.elements.get(t)?.delete(e)}createContext(t,e){const i=new MB(t,e);for(const s of Object.values(qv))typeof s=="number"&&this.elements.get(s)?.forEach(a=>a(i));return i}emitLayoutComplete(t,e){const{width:i,height:s}=t;this.eventsHub.emit("layout:complete",{axes:e.axes??[],chart:{width:i,height:s},clipSeries:e.clipSeries??!1,series:e.series})}},MB=class{constructor(t,e){this.width=t,this.height=e,this.layoutBox=new gt(0,0,t,e)}}}});function Iq({point:t,anchor:e},i,s,a,n){if(t.size===0)return!1;let o=t.x,r=t.y;e!=null&&(o-=(e.x-.5)*t.size,r-=(e.y-.5)*t.size);let l=o;o<i?l=i:o>i+a&&(l=i+a);let c=r;r<s?c=s:r>s+n&&(c=s+n);const h=o-l,u=r-c;return Math.sqrt(h*h+u*u)<=t.size*.5}function Aq(t){return t!=null&&typeof t.point=="object"&&typeof t.label=="object"}function Cq(t,e,i=5){const s=new Map,a=[],n=new Map([...t.entries()].map(([r,l])=>[r,l.toSorted((c,h)=>h.point.size-c.point.size)])),o=[...n.values()].flat();for(const[r,l]of n.entries()){const c=[];if(l[0]?.label){for(let h=0,u=l.length;h<u;h++){const d=l[h],{point:p,label:g,anchor:f}=d,{text:x,width:m,height:b}=g,v=p.size*.5;let M=0,D=0;if(v>0&&d.placement!=null){const E=kB[d.placement];M=(m*.5+v+i)*E.x,D=(b*.5+v+i)*E.y}const L=p.x-m*.5+M-((f?.x??.5)-.5)*p.size,C=p.y-b*.5+D-((f?.y??.5)-.5)*p.size;if(!Rb(e,L,C,m,b)||o.some(E=>Iq(E,L,C,m,b))||a.some(E=>kI(E,L,C,m,b)))continue;const O={index:h,text:x,x:L,y:C,width:m,height:b,datum:d};c.push(O),a.push(O)}s.set(r,c)}}return s}var kB,Lq=I({"packages/ag-charts-community/src/scene/util/labelPlacement.ts"(){"use strict";R(),kB={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},"top-left":{x:-1,y:-1},"top-right":{x:1,y:-1},"bottom-left":{x:-1,y:1},"bottom-right":{x:1,y:1}}}}),IB,wq=I({"packages/ag-charts-community/src/chart/layout/seriesLabelLayoutManager.ts"(){"use strict";Wt(),Lq(),IB=class{constructor(){this.labelData=new Map}updateLabels(t,e,i=gt.zero){const s={x:-e.left,y:-e.top,width:i.width+e.left+e.right,height:i.height+e.top+e.bottom},a=new Set(t.map(o=>o.id));for(const o of this.labelData.keys())a.has(o)||this.labelData.delete(o);for(const o of t){const r=o.getLabelData();r.every(Aq)&&this.labelData.set(o.id,r)}const n=Cq(this.labelData,s,5);for(const o of t)o.updatePlacedLabelData?.(n.get(o.id)??[])}}}}),AB,Tq=I({"packages/ag-charts-community/src/chart/legend/legendManager.ts"(){"use strict";R(),AB=class{constructor(t){this.eventsHub=t,this.mementoOriginatorKey="legend",this.legendDataMap=new Map}createMemento(){return this.getData().filter(({hideInLegend:t,isFixed:e})=>!t&&!e).map(({enabled:t,seriesId:e,itemId:i,legendItemName:s})=>({visible:t,seriesId:e,itemId:i,legendItemName:s}))}guardMemento(t){return t==null||ss(t)}restoreMemento(t,e,i){i?.forEach(s=>{const{seriesId:a,data:n}=this.getRestoredData(s)??{};!a||!n||this.updateData(a,n)}),this.update()}getRestoredData(t){const{seriesId:e,itemId:i,legendItemName:s,visible:a}=t;if(e){const o=(this.legendDataMap.get(e)??[]).map(r=>{const l=r.seriesId===e&&(!i||r.itemId===i);return l&&r.isFixed&&this.warnFixed(r.seriesId,r.itemId),!r.isFixed&&l?{...r,enabled:a}:r});return{seriesId:e,data:o}}if(!(i==null&&s==null))for(const n of this.getData()){if(i!=null&&n.itemId!==i||s!=null&&n.legendItemName!==s)continue;if(n.isFixed){this.warnFixed(n.seriesId,i);return}const o=(this.legendDataMap.get(n.seriesId)??[]).map(r=>r.itemId===i||r.legendItemName===s?{...r,enabled:a}:r);return{seriesId:n.seriesId,data:o}}}warnFixed(t,e){ut.warnOnce(`The legend item with seriesId [${t}] and itemId [${e}] is not configurable, this series item cannot be toggled through the legend.`)}update(t){this.eventsHub.emit("legend:change",{legendData:t??this.getData()})}updateData(t,e=[]){this.legendDataMap.set(t,e)}clearData(){this.legendDataMap.clear()}toggleItem(t,e,i,s){if(s){this.getData().forEach(r=>{const l=(this.legendDataMap.get(r.seriesId)??[]).map(c=>c.legendItemName===s?{...c,enabled:t}:c);this.updateData(r.seriesId,l)});return}const a=this.getData(e),n=a.length===1,o=a.map(r=>i==null&&n||r.itemId===i?{...r,enabled:t}:r);this.updateData(e,o)}getData(t){return t?this.legendDataMap.get(t)??[]:[...this.legendDataMap].reduce((e,[i,s])=>e.concat(s),[])}getDatum({seriesId:t,itemId:e}={}){return this.getData(t).find(i=>i.itemId===e)}getSeriesEnabled(t){const e=this.getData(t);if(e.length>0)return e.some(i=>i.enabled)}getItemEnabled({seriesId:t,itemId:e}={}){return this.getDatum({seriesId:t,itemId:e})?.enabled??!0}}}}),CB,Nq=I({"packages/ag-charts-community/src/chart/series/seriesStateManager.ts"(){"use strict";CB=class{constructor(){this.groups=new Map}registerSeries({internalId:t,seriesGrouping:e,visible:i,type:s}){if(!e)return;let a=this.groups.get(s);a==null&&(a=new Map,this.groups.set(s,a)),a.set(t,{grouping:e,visible:i})}updateSeries({internalId:t,seriesGrouping:e,visible:i,type:s}){if(!e)return;const a=this.groups.get(s)?.get(t);a&&(a.grouping=e,a.visible=i)}deregisterSeries({internalId:t,type:e}){const i=this.groups.get(e);i!=null&&(i.delete(t),i.size===0&&this.groups.delete(e))}getVisiblePeerGroupIndex({type:t,seriesGrouping:e,visible:i}){if(!e)return{visibleGroupCount:i?1:0,visibleSameStackCount:i?1:0,index:0};const s=new Set,a=new Set,n=this.groups.get(t);for(const r of n?.values()??[])r.visible&&(s.add(r.grouping.groupIndex),r.grouping.groupIndex===e.groupIndex&&a.add(r.grouping.stackIndex));const o=Array.from(s);return o.sort((r,l)=>r-l),{visibleGroupCount:o.length,visibleSameStackCount:a.size,index:o.indexOf(e.groupIndex)}}}}}),wC,LB=I({"packages/ag-charts-community/src/chart/updateService.ts"(){"use strict";R(),wC=class{constructor(t){this.updateCallback=t,this.events=new gr}addListener(t,e){return this.events.on(t,e)}destroy(){this.events.clear()}update(t=0,e){this.updateCallback(t,e)}dispatchUpdateComplete(t){this.events.emit("update-complete",{type:"update-complete",apiUpdate:t})}dispatchPreDomUpdate(){this.events.emit("pre-dom-update",{type:"pre-dom-update"})}dispatchPreSceneRender(){this.events.emit("pre-scene-render",{type:"pre-scene-render"})}dispatchProcessData({series:t}){this.events.emit("process-data",{type:"process-data",series:t})}}}}),wB,Oq=I({"packages/ag-charts-community/src/chart/chartContext.ts"(){"use strict";R(),S6(),M6(),D6(),QE(),cR(),g9(),xr(),YA(),Du(),y9(),b9(),vR(),v9(),Cm(),sB(),rB(),lB(),eB(),yC(),cq(),SB(),DB(),wq(),Tq(),Nq(),LB(),wB=class{constructor(t,e){this.eventsHub=new gr,this.callbackCache=new fA,this.highlightManager=new fC(this.eventsHub),this.formatManager=new _u,this.layoutManager=new LC(this.eventsHub),this.localeManager=new pR(this.eventsHub),this.seriesStateManager=new CB,this.stateManager=new RE,this.seriesLabelLayoutManager=new IB,this.cleanup=new Fe,this.contextModules=[];const{scene:i,root:s,syncManager:a,container:n,fireEvent:o,updateCallback:r,updateMutex:l,styleContainer:c,chartType:h,domMode:u,withDragInterpretation:d}=e;this.chartService=t,this.syncManager=a,this.domManager=new GA(this.eventsHub,this.chartService,n,c,u),this.widgets=new fB(this.domManager,{withDragInterpretation:d});const p=this.domManager.addChild("canvas","scene-canvas",i?.canvas.element);this.scene=i??new Dm({canvasElement:p}),this.scene.setRoot(s),this.cleanup.register(this.scene.on("scene-changed",()=>{this.updateService.update(7)})),this.axisManager=new xR(this.eventsHub,s),this.legendManager=new AB(this.eventsHub),this.annotationManager=new yR(this.eventsHub,t.annotationRoot,o),this.chartTypeOriginator=new PE(t),this.interactionManager=new uC,this.contextMenuRegistry=new gC(this.eventsHub),this.updateService=new wC(r),this.proxyInteractionService=new UA(this.eventsHub,this.localeManager,this.domManager),this.fontManager=new SR(this.domManager,this.updateService),this.historyManager=new _E(this.eventsHub),this.animationManager=new dC(this.interactionManager,l),this.dataService=new km(this.eventsHub,t,this.animationManager),this.tooltipManager=new wm(this.eventsHub,this.localeManager,this.domManager,t.tooltip),this.zoomManager=new CC(this.eventsHub,o);for(const g of _o.byType("context")){if(!g.chartTypes.includes(h))continue;const f=g.moduleFactory(this);this.contextModules.push(f),this[g.contextKey]=f}}destroy(){this.animationManager.destroy(),this.axisManager.destroy(),this.callbackCache.invalidateCache(),this.domManager.destroy(),this.fontManager.destroy(),this.proxyInteractionService.destroy(),this.tooltipManager.destroy(),this.zoomManager.destroy(),this.widgets.destroy(),this.contextModules.forEach(t=>t.destroy()),this.cleanup.flush()}}}}),TC,Pq=I({"packages/ag-charts-community/src/chart/chartHighlight.ts"(){"use strict";vt(),vt(),TC=class extends Nt{constructor(){super(...arguments),this.range="tooltip"}},S([k],TC.prototype,"range",2)}});function _q(t,e){if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0}function Eq(t,e){if(t==null||e==null)return t===e;if(t.size!==e.size)return!1;for(const[i,s]of t){const a=e.get(i);if(a==null||!_q(s,a))return!1}return!0}function Rq(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i+=1){const{type:s,idsMap:a,scopes:n,data:o,...r}=t[i],{type:l,idsMap:c,scopes:h,data:u,...d}=e[i];if(s!==l||n&&h&&!yr(n,h)||o&&u&&o!==u||!Wi(r,d)||!Eq(a,c))return!1}return!0}function Bq(t,e){const{props:i,...s}=t,{props:a,...n}=e;return Wi(s,n)&&Rq(i,a)}function zq(t,e,i,s){return e===t.data&&yr(i,t.ids)&&Bq(s,t.opts)}var Fq=I({"packages/ag-charts-community/src/chart/data/caching.ts"(){"use strict";R(),Pt()}}),NC,bl,TB=I({"packages/ag-charts-community/src/chart/data/dataDomain.ts"(){"use strict";NC=class ZY{constructor(){this.domain=new Set}static is(e){return e instanceof ZY}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},bl=class XY{constructor(){this.domain=[1/0,-1/0]}static is(e){return e instanceof XY}static extendDomain(e,i=[1/0,-1/0]){for(const s of e)typeof s=="number"&&(i[0]>s&&(i[0]=s),i[1]<s&&(i[1]=s));return i}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}}}}),Vu,Gu,Bo,NB,Vq=I({"packages/ag-charts-community/src/chart/data/rangeLookup.ts"(){"use strict";Vu=0,Gu=1,Bo=2,NB=class{constructor(t){const e=t.reduce((n,o)=>Math.max(n,o.length),0);let s=1<<32-Math.clz32(e);e===s/2&&(s=s>>>1),this.maxLevelSize=s;const a=new Float64Array((s*2-1)*2).fill(NaN);for(const n of t)for(let o=0;o<n.length;o+=1){const r=Number(n[o]),l=s+o-1,c=(l*Bo|0)+Vu,h=(l*Bo|0)+Gu,u=a[c],d=a[h];(!Number.isFinite(u)||r<u)&&(a[c]=r),(!Number.isFinite(d)||r>d)&&(a[h]=r)}for(let n=s/2|0;n>=1;n=n/2|0){const o=n-1|0,r=o+n|0;for(let l=0;l<n;l+=1){const c=o+l,h=r+l*2,u=h+1,d=a[(h*Bo|0)+Vu],p=a[(u*Bo|0)+Vu];a[(c*Bo|0)+Vu]=!Number.isFinite(p)||d<p?d:p;const g=a[(h*Bo|0)+Gu],f=a[(u*Bo|0)+Gu];a[(c*Bo|0)+Gu]=!Number.isFinite(f)||g>f?g:f}}this.buffer=a}computeRangeInto(t,e,i,s,a,n,o){const r=a+n-1;if(r<e||a>=i)return o;if(a>=e&&r<i){const l=t[(s*Bo|0)+Vu],c=t[(s*Bo|0)+Gu];Number.isFinite(l)&&(o[0]=Math.min(o[0],l)),Number.isFinite(c)&&(o[1]=Math.max(o[1],c))}else n>1&&(s=s*2|0,n=n/2|0,this.computeRangeInto(t,e,i,s+1|0,a,n,o),this.computeRangeInto(t,e,i,s+2|0,a+n,n,o));return o}rangeBetween(t,e){if(t>e)return[NaN,NaN];const{maxLevelSize:i,buffer:s}=this,a=[1/0,-1/0];return this.computeRangeInto(s,t,e,0,0,i,a),a}get range(){const{buffer:t}=this;return[t[Vu],t[Gu]]}}}});function Gq(t){if(t.length<=1)return 1;let e=0,i=t[0];for(let s=1;s<t.length;s++){const a=t[s];if(a==null)continue;if(typeof a.valueOf()!="number")return;const o=Math.sign(a-i);if(o!==0){if(e!==0&&e!==o)return;e=o}i=a}return e===0?1:e}var jq=I({"packages/ag-charts-community/src/chart/data/sortOrder.ts"(){"use strict"}});function Wq(t){return t.map(e=>xs(e)?JSON.stringify(e):e).join("-")}function _a(t){const e=t?.map(Number);return e?.every(Number.isFinite)?e:[]}function OC(t,e){return e?.get(t.id)??0}function Hq(t){return"scopes"in t&&Array.isArray(t.scopes)}function PC(t,e){const i=[];for(let s=0;s<t;s+=1)i[s]=e;return i}function Qv(t,e,i){const s=[];for(const a of t){const n=a.get(e)?.[i];if(n==null)return;s.push(n)}return s}function OB(t){const e=[];let i=0,s;const a=/((?:(?:^|\.)\s*\w+|\[\s*(?:'(?:[^']|(?<!\\)\\')*'|"(?:[^"]|(?<!\\)\\")*"|-?\d+)\s*\])\s*)/g;for(;s=a.exec(t);){if(s.index!==i)return;i=s.index+s[0].length;const n=s[1].trim();if(n.startsWith("."))e.push(n.slice(1).trim());else if(n.startsWith("[")){const o=n.slice(1,-1).trim();o.startsWith("'")?e.push(o.slice(1,-1).replace(/(?<!\\)\\'/g,"'")):o.startsWith('"')?e.push(o.slice(1,-1).replace(/(?<!\\)\\"/g,'"')):e.push(o)}else e.push(n)}if(i===t.length)return e}function $q(t){return e=>{let i=e;for(const s of t)i=i[s];return i}}function Uq(t){const e=(i,s)=>{s.length>0&&(ut.log(`DataModel.processData() - ${i}`),ut.table(s))};ut.log("DataModel.processData() - processedData",t),e("Key Domains",t.domain.keys),e("Group Domains",t.domain.groups??[]),e("Value Domains",t.domain.values),e("Aggregate Domains",t.domain.aggValues??[])}var _C,EC,RC,jn=I({"packages/ag-charts-community/src/chart/data/dataModel.ts"(){"use strict";R(),yi(),TB(),Vq(),jq(),_C=Symbol("sort-orders"),EC=Symbol("domain-ranges"),RC=class{constructor(t,e="standalone",i=!1){this.opts=t,this.mode=e,this.suppressFieldDotNotation=i,this.debug=Ft.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[],this.markScopeDatumInvalid=function(r,l,c,h){for(const u of r)h.has(u)||h.set(u,PC(l.length,!1)),h.get(u)[c]=!0};let s=!0;for(const r of t.props){if(r.type==="key"&&!s)throw new Error("AG Charts - internal config error: keys must come before values.");r.type==="value"&&s&&(s=!1)}const a=({matchGroupIds:r=[]})=>{for(const l of r)if(this.values.every(c=>c.groupId!==l))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${l}).`)},n=new Set,o=new Set;for(const r of t.props){const l=r.type==="key"?n:o;switch(Hq(r)&&r.scopes?.forEach(c=>l.add(c)),r.type){case"key":this.keys.push({...r,index:this.keys.length,missing:new Map});break;case"value":if(r.property==null)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(r)}`);this.values.push({...r,index:this.values.length,missing:new Map});break;case"aggregate":a(r),this.aggregates.push({...r,index:this.aggregates.length});break;case"group-value-processor":a(r),this.groupProcessors.push({...r,index:this.groupProcessors.length});break;case"property-value-processor":this.propertyProcessors.push({...r,index:this.propertyProcessors.length});break;case"reducer":this.reducers.push({...r,index:this.reducers.length});break;case"processor":this.processors.push({...r,index:this.processors.length});break}}if(this.opts.groupByKeys||this.opts.groupByFn!=null){const r=new Set(o.values());if(n.forEach(l=>r.delete(l)),r.size>0)throw new Error(`AG Charts - scopes missing key for grouping, illegal configuration: ${[...r.values()]}`)}}resolveProcessedDataDefById(t,e){const i=this.scopeCache.get(t.id)?.get(e);if(!i)throw new Error(`AG Charts - didn't find property definition for [${e}, ${t.id}]`);return{index:i.index,def:i}}resolveProcessedDataIndexById(t,e){return this.resolveProcessedDataDefById(t,e).index}resolveKeysById(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),a=i.keys[s];if(a==null)throw new Error(`AG Charts - didn't find keys for [${e}, ${t.id}]`);return a.get(t.id)}hasColumnById(t,e){return this.scopeCache.get(t.id)?.get(e)!=null}resolveColumnById(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),a=i.columns?.[s];if(a==null)throw new Error(`AG Charts - didn't find column for [${e}, ${t.id}]`);return a}*forEachDatum(t,e,i){const s=e.columnScopes.findIndex(a=>a.has(t.id));for(const a of i.datumIndices[s]??[])yield e.columns[s][a]}*forEachGroupDatum(t,e){const i=e.columnScopes.findIndex(n=>n.has(t.id)),s={groupIndex:0,columnIndex:i},a=[];for(const n of e.groups){s.group=n;let o=0;for(const r of n.datumIndices[i]??a)s.datumIndex=r,s.valueIndex=o++,yield s;s.groupIndex++}}*forEachGroupDatumTuple(t,e){const s={columnIndex:e.columnScopes.findIndex(a=>a.has(t.id)),datumIndexes:[void 0,void 0,void 0]};for(const a of this.forEachGroupDatum(t,e))s.group=s.nextGroup,s.groupIndex=s.nextGroupIndex,s.nextGroup=a.group,s.nextGroupIndex=a.groupIndex,s.datumIndexes[0]=s.datumIndexes[1],s.datumIndexes[1]=s.datumIndexes[2],s.datumIndexes[2]=a.datumIndex,s.group!=null&&s.datumIndexes[1]!=null&&(yield s);s.group=s.nextGroup,s.groupIndex=s.nextGroupIndex,s.nextGroup=void 0,s.nextGroupIndex=void 0,s.datumIndexes[0]=s.datumIndexes[1],s.datumIndexes[1]=s.datumIndexes[2],s.datumIndexes[2]=void 0,s.group!=null&&s.datumIndexes[1]!=null&&(yield s)}getDomain(t,e,i,s){return this.getDomainsByType(i??"value",s)?.[this.resolveProcessedDataIndexById(t,e)]??[]}getDomainBetweenRange(t,e,[i,s],a){const n=e.map(c=>this.resolveProcessedDataIndexById(t,c)),o=n.join(":"),r=a[EC];let l=r.get(o);if(l==null){const c=n.map(h=>a.columns[h]);l=new NB(c),r.set(o,l)}return l.rangeBetween(i,s)}getSortOrder(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),a=i[_C];let n=a.get(s);if(n==null){const o=i.columns[s];n={sortOrder:Gq(o)},a.set(s,n)}return n.sortOrder}getDomainsByType(t,e){switch(t){case"key":return e.domain.keys;case"value":return e.domain.values;case"aggregate":return e.domain.aggValues;case"group-value-processor":return e.domain.groups;default:return null}}processData(t){const{opts:{groupByKeys:e,groupByFn:i},aggregates:s,groupProcessors:a,reducers:n,processors:o,propertyProcessors:r}=this,l=performance.now();if(e&&this.keys.length===0)return;let c=this.extractData(t);e?c=this.groupData(c):i&&(c=this.groupData(c,i(c))),a.length>0&&c.type==="grouped"&&this.postProcessGroups(c),s.length>0&&c.type==="ungrouped"?this.aggregateUngroupedData(c):s.length>0&&c.type==="grouped"&&this.aggregateGroupedData(c),r.length>0&&this.postProcessProperties(c),n.length>0&&this.reduceData(c),o.length>0&&this.postProcessData(c),this.warnDataMissingProperties(t);const h=performance.now();return c.time=h-l,this.debug.check()&&Uq(c),this.processScopeCache(),c}warnDataMissingProperties(t){if(t.size!==0)for(const e of ru(this.keys,this.values))for(const[i,s]of e.missing){if(s<(t.get(i)?.length??1/0))continue;const a=i==null?"":` for ${i}`;ut.warnOnce(`the key '${e.property}' was not found in any data element${a}.`)}}processScopeCache(){this.scopeCache.clear();for(const t of ru(this.keys,this.values,this.aggregates))if(t.idsMap)for(const[e,i]of t.idsMap)for(const s of i)if(!this.scopeCache.has(e))this.scopeCache.set(e,new Map([[s,t]]));else{if(this.scopeCache.get(e)?.has(s))throw new Error("duplicate definition ids on the same scope are not allowed.");this.scopeCache.get(e).set(s,t)}}valueGroupIdxLookup({matchGroupIds:t}){const e=[];for(const[i,s]of this.values.entries())(!t||s.groupId&&t.includes(s.groupId))&&e.push(i);return e}valueIdxLookup(t,e){const i=t==null||t.length===0,s=typeof e=="string"?e:e.id,a=o=>{if(o.idsMap){for(const[r,l]of o.idsMap)if(t?.includes(r)&&l.has(s))return!0}return!1},n=this.values.reduce((o,r,l)=>((r.scopes==null||i&&!r.scopes.length||r.scopes.some(h=>t?.includes(h)))&&(r.property===s||r.id===s||a(r))&&o.push(l),o),[]);if(n.length===0)throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(e)} in scope(s) ${JSON.stringify(t)}`);return n}extractData(t){const{dataDomain:e,processValue:i,allScopesHaveSameDefs:s}=this.initDataDomainProcessor(),{keys:a,values:n}=this,{invalidData:o,invalidKeys:r,allKeyMappings:l}=this.extractKeys(a,t,i),{columns:c,columnScopes:h,partialValidDataCount:u,maxDataLength:d}=this.extractValues(o,n,t,r,i),p=g=>{const f=e.get(g),x=f.getDomain();return bl.is(f)&&x[0]>x[1]?[]:x};return{type:"ungrouped",input:{count:d},scopes:new Set(t.keys()),dataSources:t,aggregation:void 0,keys:[...l.values()],columns:c,columnScopes:h,invalidKeys:r,invalidData:o,domain:{keys:a.map(p),values:n.map(p)},defs:{allScopesHaveSameDefs:s,keys:a,values:n},partialValidDataCount:u,time:0,[EC]:new Map,[_C]:new Map}}extractKeys(t,e,i){const s=new Map,a=new Map,n=new Map;let o,r;const l=(c,h)=>{const u=r.get(c);o.set(h,o.get(u)),s.has(u)&&(s.set(h,s.get(u)),a.set(h,a.get(u)))};for(const c of t){const{invalidValue:h,scopes:u}=c;o=new Map,r=new Map,n.set(c,o);for(const d of u??[]){const p=e.get(d)??[];if(r.has(p)){l(p,d);continue}const g=[];o.set(d,g),r.set(p,d);let f,x;for(let m=0;m<p.length;m++){if(p[m]==null||typeof p[m]!="object")continue;const b=i(c,p[m],m,d);if(b.valid){g.push(b.value);continue}g.push(h),f??(f=PC(p.length,!1)),x??(x=PC(p.length,!1)),f[m]=!0,x[m]=!0}f&&x&&(s.set(d,f),a.set(d,x))}}return{invalidData:a,invalidKeys:s,allKeyMappings:n}}extractValues(t,e,i,s,a){let n=0;const o=[],r=[];let l=0;for(const c of e){const{invalidValue:h}=c;if(new Set(c.scopes.map(x=>i.get(x))).size>1)throw new Error(`AG Charts - more than one data source for: ${JSON.stringify(c)}`);const d=new Set(c.scopes),p=Mp(c.scopes),g=i.get(p),f=new Array;for(let x=0;x<g.length;x++){if(g[x]==null||typeof g[x]!="object")continue;const m=g[x],b=s.get(p)?.[x],v=a(c,m,x,c.scopes);let M=v.value;(b||!v.valid)&&this.markScopeDatumInvalid(c.scopes,g,x,t),b?M=h:v.valid||(n+=1,M=h),f[x]=M}o.push(f),r.push(d),l=Math.max(l,f.length)}return{columns:o,columnScopes:r,partialValidDataCount:n,maxDataLength:l}}groupData(t,e){var i;const s=new Map,{keys:a,columns:n,columnScopes:o,invalidKeys:r,invalidData:l}=t,c=t.scopes,h=new Set;for(const p of c){const g=n.map((M,D)=>D).filter(M=>!h.has(M)&&o[M].has(p));if(g.length===0)continue;for(const M of g)h.add(M);const f=new Set;for(const M of g)for(const D of o[M])f.add(D);const x=a.map(M=>M.get(p)).filter(M=>M!=null),m=n[Mp(g)],b=l?.get(p),v=r?.get(p);for(let M=0;M<m.length;M++){if(v?.[M]===!0)continue;const D=x.map(T=>T[M]);if(D==null||D.length===0)throw new Error("AG Charts - no keys found for scope: "+p);const L=e?.(D)??D,C=Wq(L),A=s.get(C)??{keys:L,datumIndices:[],validScopes:c};if(s.has(C)||s.set(C,A),b?.[M]===!0){A.validScopes===c&&(A.validScopes=new Set(c.values()));for(const T of f)A.validScopes.delete(T)}for(const T of g)(i=A.datumIndices)[T]??(i[T]=[]),A.datumIndices[T].push(M)}}const u=[],d=[];for(const{keys:p,datumIndices:g,validScopes:f}of s.values())u.push(p),d.push({datumIndices:g,keys:p,aggregation:[],validScopes:f});return{...t,type:"grouped",domain:{...t.domain,groups:u},groups:d}}aggregateUngroupedData(t){const e=this.aggregates.map(()=>[1/0,-1/0]);t.domain.aggValues=e;const{keys:i,columns:s,dataSources:a}=t,n=Mp(a.keys()),o=a.get(n);t.aggregation=o?.map((r,l)=>{const c=[];for(const[h,u]of this.aggregates.entries()){const d=this.valueGroupIdxLookup(u);let p=u.groupAggregateFunction?.()??[1/0,-1/0];const g=d.map(b=>s[b][l]),f=Qv(i,n,l),x=f!=null?u.aggregateFunction(g,f):void 0;x&&(p=u.groupAggregateFunction?.(x,p)??bl.extendDomain(x,p));const m=u.finalFunction?.(p)??p;c[h]=m,bl.extendDomain(m,e[h])}return c})}aggregateGroupedData(t){const e=this.aggregates.map(()=>[1/0,-1/0]);t.domain.aggValues=e;const{columns:i}=t;for(const[s,a]of this.aggregates.entries()){const n=this.valueGroupIdxLookup(a);for(const o of t.groups){o.aggregation??(o.aggregation=[]);const r=o.keys;let l=a.groupAggregateFunction?.()??[1/0,-1/0];const c=Math.max(...n.map(u=>o.datumIndices[u]?.length??0));for(let u=0;u<c;u++){const d=n.map(g=>i[g][o.datumIndices[g]?.[u]]),p=a.aggregateFunction(d,r);p&&(l=a.groupAggregateFunction?.(p,l)??bl.extendDomain(p,l))}const h=a.finalFunction?.(l)??l;o.aggregation[s]=h,bl.extendDomain(h,e[s])}}}postProcessGroups(t){const{groupProcessors:e}=this,{columnScopes:i,columns:s,invalidData:a}=t;for(const n of e){const o=this.valueGroupIdxLookup(n),r=n.adjust()();for(const l of t.groups)r(s,o,l);for(const l of o){const h=this.values[l].valueType==="category",u=s[l],d=Mp(i[l]),p=a?.get(d),g=h?new NC:new bl;for(let f=0;f<u.length;f+=1)p?.[f]!==!0&&g.extend(u[f]);t.domain.values[l]=g.getDomain()}}}postProcessProperties(t){for(const{adjust:e,property:i,scopes:s}of this.propertyProcessors)for(const a of this.valueIdxLookup(s,i))e()(t,a)}reduceData(t){t.reduced??(t.reduced={});const{dataSources:e,keys:i}=t;for(const s of this.reducers){const a=s.reducer();let n=s.initialValue;if(t.type==="grouped")for(const o of t.groups)n=a(n,o.keys);else{const o=Mp(e.keys()),r=i.map(h=>h.get(o)).filter(h=>h!=null),l=r.map(()=>{}),c=e.get(o);for(let h=0;h<c.length;h+=1){for(let u=0;u<l.length;u++)l[u]=r[u]?.[h];n=a(n,l)}}t.reduced[s.property]=n}}postProcessData(t){t.reduced??(t.reduced={});for(const e of this.processors)t.reduced[e.property]=e.calculate(t,t.reduced[e.property])}initDataDomainProcessor(){const{keys:t,values:e}=this,i=new Set;for(const h of e)if(h.scopes)for(const u of h.scopes)i.add(u);const s=new Map,a=new Map;let n=!0;const o=()=>{for(const h of ru(t,e))h.valueType==="category"?s.set(h,new NC):(s.set(h,new bl),n&&(n=(h.scopes??[]).length===i.size))};o();const r=this.buildAccessors(ru(t,e)),l={value:void 0,missing:!1,valid:!1};return{dataDomain:s,processValue:(h,u,d,p)=>{let g,f;if(r.has(h.property)){try{f=r.get(h.property)(u)}catch{}g=f!=null}else g=h.property in u,f=g?u[h.property]:h.missingValue;h.forceValue!=null&&(f=g&&zb(f)?-1*h.forceValue:h.forceValue,g=!0),l.missing=!g;const x="missingValue"in h;if(!g&&!x)if(typeof p=="string"){const m=h.missing.get(p)??0;h.missing.set(p,m+1)}else for(const m of p){const b=h.missing.get(m)??0;h.missing.set(m,b+1)}if(s.has(h)||o(),g&&h.validation?.(f,u,d)===!1)if(l.valid=!1,"invalidValue"in h)f=h.invalidValue;else return this.mode!=="integrated"&&ut.warnOnce(`invalid value of type [${typeof f}] for [${h.scopes} / ${h.id}] ignored:`,`[${f}]`),l.value=void 0,l;else l.valid=!0;if(h.processor){let m=a.get(h);m==null&&(m=h.processor(),a.set(h,m)),f=m(f,d)}return s.get(h)?.extend(f),l.value=f,l},initDataDomain:o,scopes:i,allScopesHaveSameDefs:n}}buildAccessors(t){const e=new Map;if(this.suppressFieldDotNotation)return e;for(const i of t){if(!(i.property.includes(".")||i.property.includes("[")))continue;const a=OB(i.property);if(a==null){ut.warnOnce("Invalid property path [%s]",i.property);continue}const n=$q(a);e.set(i.property,n)}return e}}}}),BC,zC,PB=I({"packages/ag-charts-community/src/chart/data/dataController.ts"(){"use strict";R(),yi(),Fq(),jn(),BC=class fc{constructor(e,i){this.mode=e,this.suppressFieldDotNotation=i,this.debug=Ft.create(!0,"data-model"),this.requested=[],this.status="setup"}async request(e,i,s){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");return new Promise((a,n)=>{this.requested.push({id:e,opts:s,data:i,resolve:a,reject:n})})}execute(e){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);const i=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",i);const s=this.mergeRequested(i);this.debug("DataController.execute() - merged",s),this.debug.check()&&(de().processedData=[]);const a=[];for(const{data:n,ids:o,opts:r,resolves:l,rejects:c}of s){const h=e?.find(p=>zq(p,n,o,r));let u,d;if(h==null)try{u=new RC(r,this.mode,this.suppressFieldDotNotation);const p=new Map(i.map(g=>[g.id,g.data]));d=u.processData(p)}catch(p){c.forEach(g=>g(p));continue}else({dataModel:u,processedData:d}=h);a.push({opts:r,data:n,ids:o,dataModel:u,processedData:d}),this.debug.check()&&de("processedData").push(d),d?.partialValidDataCount===0?l.forEach(p=>p({dataModel:u,processedData:d})):d?this.splitResult(u,d,o,l):c.forEach(p=>p(new Error("AG Charts - no processed data generated")))}return a}validateRequests(e){const i=[];for(const[s,a]of e.entries())s>0&&a.data.length!==e[0].data.length&&a.opts.groupByData===!1&&a.opts.groupByKeys===!1?a.reject(new Error("all series[].data arrays must be of the same length and have matching keys.")):i.push(a);return i}mergeRequested(e){const i=[];for(const s of e){const a=i.find(fc.groupMatch(s));a?a.push(s):i.push([s])}return i.map(fc.mergeRequests)}splitResult(e,i,s,a){for(let n=0;n<s.length;n++){const o=a[n];o({dataModel:e,processedData:i})}}static groupMatch({data:e,opts:i}){function s(c){return c.filter(h=>h.type==="key").map(h=>h.property).join(";")}const{groupByData:a,groupByKeys:n=!1,groupByFn:o,props:r}=i,l=s(r);return([c])=>(a===!1||c.data===e)&&(c.opts.groupByKeys??!1)===n&&c.opts.groupByFn===o&&s(c.opts.props)===l}static mergeRequests(e){const i=new Set(["key","group-value-processor"]);return e.reduce((s,{id:a,data:n,resolve:o,reject:r,opts:{props:l,...c}})=>{s.ids.push(a),s.rejects.push(r),s.resolves.push(o),s.data??(s.data=n),s.opts??(s.opts={...c,props:[]});for(const h of l){const u={...h,scopes:[a],data:n};fc.createIdsMap(a,u);const d=s.opts.props.find(p=>p.type===u.type&&(i.has(p.type)||p.data===u.data)&&fc.deepEqual(p,u));if(!d){s.opts.props.push(u);continue}d.scopes??(d.scopes=[]),d.scopes.push(...u.scopes??[]),(d.type==="key"||d.type==="value")&&u.idsMap?.size&&fc.mergeIdsMap(u.idsMap,d.idsMap)}return s},{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(e,i){for(const[s,a]of e){const n=i.get(s);if(n==null)i.set(s,new Set(a));else for(const o of a)n.add(o)}}static createIdsMap(e,i){i.id!=null&&(i.idsMap??(i.idsMap=new Map),i.idsMap.has(e)?i.idsMap.get(e).add(i.id):i.idsMap.set(e,new Set([i.id])))}static deepEqual(e,i){if(e===i)return!0;if(e&&i&&typeof e=="object"&&typeof i=="object"){if(e.constructor!==i.constructor)return!1;let s,a;if(Array.isArray(e)){if(a=e.length,a!==i.length)return!1;for(s=a-1;s>=0;s--)if(!fc.deepEqual(e[s],i[s]))return!1;return!0}const n=Object.keys(e);if(a=n.length,a!==Object.keys(i).length)return!1;for(s=a-1;s>=0;s--){const o=n[s];if(!fc.skipKeys.has(o)&&(!Object.hasOwn(i,o)||!fc.deepEqual(e[o],i[o])))return!1}return!0}return!1}},BC.skipKeys=new Set(["id","idsMap","type","scopes","data"]),zC=BC}}),_B,Tc,Jv=I({"packages/ag-charts-community/src/chart/factory/axisRegistry.ts"(){"use strict";_B=class{constructor(){this.axesMap=new Map,this.themeTemplates=new Map}register(t,e){this.axesMap.set(t,e.moduleFactory),e.themeTemplate&&this.setThemeTemplate(t,e.themeTemplate)}create(t,e){const i=this.axesMap.get(t);if(i)return i(e);throw new Error(`AG Charts - unknown axis type: ${t}`)}has(t){return this.axesMap.has(t)}keys(){return this.axesMap.keys()}setThemeTemplate(t,e){return this.themeTemplates.set(t,e),this}getThemeTemplate(t){return this.themeTemplates.get(t)}},Tc=new _B}});function ju(t){return $p.find(e=>e.type==="series"&&e.identifier===t)?.chartTypes}function Kq(t){return ju(t)?.find(i=>i==="cartesian")==="cartesian"}function Yq(t){return ju(t)?.find(i=>i==="polar")==="polar"}function Zq(t){return ju(t)?.find(i=>i==="hierarchy")==="hierarchy"}function Xq(t){return ju(t)?.find(i=>i==="topology")==="topology"}function qq(t){return ju(t)?.find(i=>i==="flow-proportion")==="flow-proportion"}function Qq(t){return ju(t)?.find(i=>i==="standalone")==="standalone"}function Jq(t){return ju(t)?.find(i=>i==="gauge")==="gauge"}function t7(t){return t.packageType==="enterprise"}function e7(t){if(!t7(t))throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");const e=$p.find(i=>i.type===t.type&&("optionsKey"in i&&"optionsKey"in t?i.optionsKey===t.optionsKey:!0)&&("contextKey"in i&&"contextKey"in t?i.contextKey===t.contextKey:!0)&&i.identifier===t.identifier&&t.chartTypes.every(s=>i.chartTypes.includes(s)));return e&&(e.useCount??(e.useCount=0),e.useCount++),e!=null}function i7(){return $p.filter(({useCount:t})=>t==null||t===0)}var $p,tS=I({"packages/ag-charts-community/src/chart/factory/expectedEnterpriseModules.ts"(){"use strict";$p=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"foreground",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"chartToolbar",chartTypes:["cartesian"]},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"statusBar",chartTypes:["cartesian"],identifier:"status-bar"},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]},{type:"root",optionsKey:"ranges",chartTypes:["cartesian"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"]},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bar",community:!0},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"line",community:!0},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"axis-option",optionsKey:"bandHighlight",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"cone-funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"chord"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"sankey"},{type:"series",optionsKey:"series[]",chartTypes:["standalone"],identifier:"pyramid"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"linear-gauge"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"radial-gauge"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"},{type:"context",contextKey:"sharedToolbar",chartTypes:["cartesian"]}]}}),EB,eS,FC=I({"packages/ag-charts-community/src/chart/factory/legendRegistry.ts"(){"use strict";EB=class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(t,{optionsKey:e,moduleFactory:i,themeTemplate:s}){this.legendMap.set(t,{optionsKey:e,moduleFactory:i}),this.themeTemplates.set(e,s)}create(t,e){const i=this.legendMap.get(t)?.moduleFactory;if(i)return i(e);throw new Error(`AG Charts - unknown legend type: ${t}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce((t,[e,i])=>(t[e]=i.optionsKey,t),{})}},eS=new EB}}),VC,RB,Se,BB,iS,Wu=I({"packages/ag-charts-community/src/chart/factory/chartTypes.ts"(){"use strict";Pt(),VC=class extends Map{get(t){return super.get(t)??"unknown"}isCartesian(t){return this.get(t)==="cartesian"}isPolar(t){return this.get(t)==="polar"}isHierarchy(t){return this.get(t)==="hierarchy"}isTopology(t){return this.get(t)==="topology"}isFlowProportion(t){return this.get(t)==="flow-proportion"}isStandalone(t){return this.get(t)==="standalone"}isGauge(t){return this.get(t)==="gauge"}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter(t=>this.isCartesian(t))}get polarTypes(){return this.seriesTypes.filter(t=>this.isPolar(t))}get hierarchyTypes(){return this.seriesTypes.filter(t=>this.isHierarchy(t))}get topologyTypes(){return this.seriesTypes.filter(t=>this.isTopology(t))}get flowProportionTypes(){return this.seriesTypes.filter(t=>this.isFlowProportion(t))}get standaloneTypes(){return this.seriesTypes.filter(t=>this.isStandalone(t))}get gaugeTypes(){return this.seriesTypes.filter(t=>this.isGauge(t))}},RB=class extends Map{set(t,e){return super.set(t,se(e,this.get(t)))}},Se=new VC,BB=new VC,iS=new RB}}),zB,Wn,Om=I({"packages/ag-charts-community/src/chart/factory/seriesRegistry.ts"(){"use strict";Ta(),Pt(),Wu(),zB=class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(t,{chartTypes:[e],moduleFactory:i,defaultAxes:s,themeTemplate:a,solo:n,stackable:o,groupable:r,stackedByDefault:l,hidden:c}){this.setThemeTemplate(t,a),this.seriesMap.set(t,{moduleFactory:i,defaultAxes:s,solo:n,stackable:o,groupable:r,stackedByDefault:l}),Se.set(t,e),c||BB.set(t,e)}create(t,e){const i=this.seriesMap.get(t)?.moduleFactory;if(i)return i(e);throw new Error(`AG Charts - unknown series type: ${t}`)}cloneDefaultAxes(t){const e=this.seriesMap.get(t)?.defaultAxes;return e==null?null:{axes:$e(e)}}setThemeTemplate(t,e){const i=this.themeTemplates.get(t);this.themeTemplates.set(t,se(e,i))}getThemeTemplate(t){return this.themeTemplates.get(t)}isSolo(t){return this.seriesMap.get(t)?.solo??!1}isGroupable(t){return this.seriesMap.get(t)?.groupable??!1}isStackable(t){return this.seriesMap.get(t)?.stackable??!1}isStackedByDefault(t){return this.seriesMap.get(t)?.stackedByDefault??!1}},Wn=new zB}}),sS,FB,s7=I({"packages/ag-charts-community/src/chart/interaction/syncManager.ts"(){"use strict";sS=class mc{constructor(e){this.chart=e}subscribe(e=mc.DEFAULT_GROUP){let i=this.get(e);return i||(i={members:new Set},mc.chartsGroups.set(e,i)),i.members.add(this.chart),this}unsubscribe(e=mc.DEFAULT_GROUP){const i=this.get(e);return i?.members.delete(this.chart),delete i?.domains?.x?.sources?.[this.chart.id],delete i?.domains?.y?.sources?.[this.chart.id],this}getChart(){return this.chart}getGroupState(e=mc.DEFAULT_GROUP){return this.get(e)}getGroupMembers(e=mc.DEFAULT_GROUP){const i=this.get(e);return i?Array.from(i.members):[]}getGroupSiblings(e=mc.DEFAULT_GROUP){return this.getGroupMembers(e).filter(i=>i!==this.chart)}getGroupSyncMode(e=mc.DEFAULT_GROUP){return this.getGroupMembers(e).some(i=>i.series.length>1)?"multi-series":"single-series"}get(e){return mc.chartsGroups.get(e)}},sS.chartsGroups=new Map,sS.DEFAULT_GROUP=Symbol("sync-group-default"),FB=sS}}),aS,a7=I({"packages/ag-charts-community/src/chart/keyboard.ts"(){"use strict";vt(),vt(),aS=class extends Nt{constructor(){super(...arguments),this.enabled=!1}},S([k],aS.prototype,"enabled",2),S([k],aS.prototype,"tabIndex",2)}}),VB={};La(VB,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Hn,fromToMotion:()=>Ue,staticFromToMotion:()=>vl});function Ue(t,e,i,s,a,n,o){const{fromFn:r,toFn:l,applyFn:c=(g,f)=>g.setProperties(f)}=a,{nodes:h,selections:u}=Kv(s),d=(g,f)=>{let x,m=0,b=0;for(const v of f){const M=g[m]===v,D={last:b>=f.length-1,lastLive:m>=g.length-1,prev:f[b-1],prevFromProps:x,prevLive:g[m-1],next:f[b+1],nextLive:g[m+(M?1:0)]},L=`${t}_${e}_${v.id}`;i.stopByAnimationId(L);let C="unknown";M?n&&o&&(C=n7(v,v.datum,n,o)):C="removed",v.transitionOut=C==="removed";const{phase:A,start:T,finish:N,delay:O,duration:E,...z}=r(v,v.datum,C,D),{phase:B,start:F,finish:V,delay:G,duration:H,...$}=l(v,v.datum,C,D),W=N==null;i.animate({id:L,groupId:t,phase:A??B??"update",duration:E??H,delay:O??G,from:z,to:$,ease:Gp,collapsable:W,onPlay:()=>{const j={...T,...F,...z};c(v,j,"start")},onUpdate(j){c(v,j,"update")},onStop:()=>{const j={...T,...F,...z,...$,...N,...V};c(v,j,"end")}}),M&&m++,b++,x=z}};let p=0;for(const g of u){const f=g.nodes(),x=f.filter(m=>!g.isGarbage(m));d(x,f),i.animate({id:`${t}_${e}_selection_${p}`,groupId:t,phase:"end",from:0,to:1,ease:Gp,onStop(){g.cleanup()}}),p++}d(h,h)}function vl(t,e,i,s,a,n,o){const{nodes:r,selections:l}=Kv(s),{start:c,finish:h,phase:u}=o;i.animate({id:`${t}_${e}`,groupId:t,phase:u??"update",from:a,to:n,ease:Gp,onPlay:()=>{if(c){for(const d of r)d.setProperties(c);for(const d of l)for(const p of d.nodes())p.setProperties(c)}},onUpdate(d){for(const p of r)p.setProperties(d);for(const p of l)for(const g of p.nodes())g.setProperties(d)},onStop:()=>{for(const d of r)d.setProperties({...n,...h});for(const d of l){for(const p of d.nodes())p.setProperties({...n,...h});d.cleanup()}}})}function n7(t,e,i,s){const a=i(t,e);return s.added.has(a)?"added":s.removed.has(a)?"removed":t.previousDatum==null&&t.datum!=null?"added":t.previousDatum!=null&&t.datum==null?"removed":"updated"}var Hn,zs=I({"packages/ag-charts-community/src/motion/fromToMotion.ts"(){"use strict";Ru(),jp(),Hn={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"}}}),GB={};La(GB,{resetMotion:()=>cs});function cs(t,e){const{nodes:i,selections:s}=Kv(t);for(const a of s){for(const n of a.nodes()){const o=e(n,n.datum);n.setProperties(o)}a.cleanup()}for(const a of i){const n=e(a,a.datum);a.setProperties(n)}}var Hu=I({"packages/ag-charts-community/src/motion/resetMotion.ts"(){"use strict";Ru()}}),Ci,Nc=I({"packages/ag-charts-community/src/scene/selection.ts"(){"use strict";yi(),Oe(),Vn(),Ci=class mp{constructor(e,i,s=!0){this.parentNode=e,this.autoCleanup=s,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=Ft.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(br,i)?()=>new i:i}static select(e,i,s=!0){return new mp(e,i,s)}static selectAll(e,i){const s=[],a=n=>{if(i(n)&&s.push(n),n instanceof Lt)for(const o of n.children())a(o)};return a(e),s}static selectByClass(e,...i){return mp.selectAll(e,s=>i.some(a=>s instanceof a))}static selectByTag(e,i){return mp.selectAll(e,s=>s.tag===i)}createNode(e,i,s){const a=this.nodeFactory(e);return a.datum=e,i?.(a),s==null?this._nodes.push(a):this._nodes.splice(s,0,a),this.parentNode.appendChild(a),a}update(e,i,s){if(this.garbageBin.size>0&&this.debug("Selection - update() called with pending garbage",e),s){const a=new Map(e.map((n,o)=>[s(n),[n,o]]));for(const[n,o]of this._nodesMap.entries())if(a.has(o)){const[r]=a.get(o);n.datum=r,this.garbageBin.delete(n),a.delete(o)}else this.garbageBin.add(n);for(const[n,[o,r]]of a.entries())this._nodesMap.set(this.createNode(o,i,r),n)}else{const a=Math.max(e.length,this.data.length);for(let n=0;n<a;n++)n>=e.length?this.garbageBin.add(this._nodes[n]):n>=this._nodes.length?this.createNode(e[n],i):(this._nodes[n].datum=e[n],this.garbageBin.delete(this._nodes[n]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return this.garbageBin.size===0?this:(this._nodes=this._nodes.filter(e=>this.garbageBin.has(e)?(this._nodesMap.delete(e),this.garbageBin.delete(e),e.destroy(),!1):!0),this)}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}each(e){for(const i of this._nodes.entries())e(i[1],i[1].datum,i[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const i=this._nodes[e];yield{node:i,datum:i.datum,index:e}}}select(e){return mp.selectAll(this.parentNode,e)}selectByClass(e){return mp.selectByClass(this.parentNode,e)}selectByTag(e){return mp.selectByTag(this.parentNode,e)}nodes(){return this._nodes}at(e){return this._nodes.at(e)}get length(){return this._nodes.length}}}}),pa,$u=I({"packages/ag-charts-community/src/scene/shape/line.ts"(){"use strict";R(),nA(),Wt(),Vn(),vu(),pa=class extends xi{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.fill=void 0,this.strokeWidth=1}set x(t){this.x1=t,this.x2=t}set y(t){this.y1=t,this.y2=t}get midPoint(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}}computeBBox(){return new gt(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(t,e){return this.x1===this.x2||this.y1===this.y2?this.getBBox().clone().grow(this.strokeWidth/2).containsPoint(t,e):!1}distanceSquared(t,e){const{x1:i,y1:s,x2:a,y2:n}=this;return rv(t,e,i,s,a,n,1/0)}render(t){const{ctx:e,devicePixelRatio:i}=t;let{x1:s,y1:a,x2:n,y2:o}=this;if(s===n){const{strokeWidth:r}=this,l=Math.round(s*i)/i+Math.trunc(r*i)%2/(i*2);s=l,n=l}else if(a===o){const{strokeWidth:r}=this,l=Math.round(a*i)/i+Math.trunc(r*i)%2/(i*2);a=l,o=l}e.beginPath(),e.moveTo(s,a),e.lineTo(n,o),this.fillStroke(e),this.fillShadow?.markClean(),super.render(t)}toSVG(){if(!this.visible)return;const t=fi("line");return t.setAttribute("x1",String(this.x1)),t.setAttribute("y1",String(this.y1)),t.setAttribute("x2",String(this.x2)),t.setAttribute("y2",String(this.y2)),this.applySvgStrokeAttributes(t),{elements:[t]}}},pa.className="Line",S([lt()],pa.prototype,"x1",2),S([lt()],pa.prototype,"y1",2),S([lt()],pa.prototype,"x2",2),S([lt()],pa.prototype,"y2",2)}});function o7(){return k_(()=>{})}function GC(t,e){const i=du(e);if(i.length===0)return;const s=I_(t);for(const a of i)a in s&&(e[a]=s[a])}var nS,oS,jC,rS,Up,jB,Pm=I({"packages/ag-charts-community/src/util/stateMachine.ts"(){"use strict";yi(),Ap(),nS="color: green",oS="color: grey",jC=class{transitionRoot(t,e){this.parent?this.parent.transitionRoot(t,e):this.transition(t,e)}},rS=class Ja extends jC{constructor(e,i,s){super(),this.defaultState=e,this.states=i,this.enterEach=s,this.debug=Ft.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,nS)}transition(e,i){if(!this.transitionChild(e,i)||this.state===Ja.child||this.state===Ja.parent)return;const a=this.state,n=this.states[this.state];let o=n[e];const r=`%c${this.constructor.name} | ${this.state} -> ${e} ->`;if(Array.isArray(o))o=o.find(h=>{if(!h.guard)return!0;const u=h.guard(i);return u||this.debug(`${r} (guarded)`,h.target,oS),u});else if(typeof o=="object"&&!(o instanceof Ja)&&o.guard&&!o.guard(i)){this.debug(`${r} (guarded)`,o.target,oS);return}if(!o){this.debug(`${r} ${this.state}`,oS);return}const l=this.getDestinationState(o),c=l===this.state?void 0:n.onExit;this.debug(`${r} ${l}`,nS),this.state=l,typeof o=="function"?o(i):typeof o=="object"&&!(o instanceof Ja)&&o.action?.(i),c?.(),this.enterEach?.(a,l),l!==a&&l!==Ja.child&&l!==Ja.parent&&this.states[l].onEnter?.(a,i)}transitionAsync(e,i){setTimeout(()=>{this.transition(e,i)},0)}is(e){return this.state===Ja.child&&this.childState?this.childState.is(e):this.state===e}resetHierarchy(){this.debug(`%c${this.constructor.name} | ${this.state} -> [resetHierarchy] -> ${this.defaultState}`,"color: green"),this.state=this.defaultState}transitionChild(e,i){return this.state!==Ja.child||!this.childState||(GC(this,this.childState),this.childState.transition(e,i),!this.childState.is(Ja.parent))?!0:(this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${this.defaultState}`,nS),this.state=this.defaultState,this.states[this.state].onEnter?.(),this.childState.resetHierarchy(),!1)}getDestinationState(e){let i=this.state;return typeof e=="string"?i=e:e instanceof Ja?(this.childState=e,this.childState.parent=this,i=Ja.child):typeof e=="object"&&(e.target instanceof Ja?(this.childState=e.target,this.childState.parent=this,i=Ja.child):e.target!=null&&(i=e.target)),i}},rS.child="__child",rS.parent="__parent",Up=rS,jB=class extends jC{constructor(...t){super(),this.stateMachines=t;for(const e of t)e.parent=this}transition(t,e){for(const i of this.stateMachines)GC(this,i),i.transition(t,e)}transitionAsync(t,e){for(const i of this.stateMachines)GC(this,i),i.transitionAsync(t,e)}}}}),lS,WC=I({"packages/ag-charts-community/src/module/moduleMap.ts"(){"use strict";R(),lS=class{constructor(){this.moduleMap=new Map}*modules(){for(const t of this.moduleMap.values())yield t.moduleInstance}addModule(t,e){if(this.moduleMap.has(t.optionsKey))throw new Error(`AG Charts - module already initialised: ${t.optionsKey}`);this.moduleMap.set(t.optionsKey,{module:t,moduleInstance:e(t)})}removeModule(t){const e=En(t)?t:t.optionsKey;this.moduleMap.get(e)?.moduleInstance.destroy(),this.moduleMap.delete(e)}getModule(t){return this.moduleMap.get(En(t)?t:t.optionsKey)?.moduleInstance}isEnabled(t){return this.moduleMap.has(En(t)?t:t.optionsKey)}mapModules(t){return Array.from(this.moduleMap.values(),(e,i)=>t(e.moduleInstance,i))}destroy(){for(const t of this.moduleMap.keys())this.moduleMap.get(t)?.moduleInstance.destroy();this.moduleMap.clear()}}}}),zo,WB=I({"packages/ag-charts-community/src/scene/shape/range.ts"(){"use strict";Wt(),Vn(),vu(),zo=class extends xi{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.horizontal=!1,this.strokeWidth=1}computeBBox(){return new gt(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(t,e){return!1}render(t){const{ctx:e}=t;let{x1:i,y1:s,x2:a,y2:n}=this;i=this.align(i),s=this.align(s),a=this.align(a),n=this.align(n);const{fill:o,horizontal:r}=this,{globalAlpha:l}=e;o!=null&&(this.applyFillAndAlpha(e),e.beginPath(),e.moveTo(i,s),e.lineTo(a,s),e.lineTo(a,n),e.lineTo(i,n),e.closePath(),e.fill(),e.globalAlpha=l);const{stroke:c,strokeWidth:h,startLine:u,endLine:d}=this;if(!!((u||d)&&c&&h)){const{lineDash:g,lineDashOffset:f,lineCap:x,lineJoin:m}=this;this.applyStrokeAndAlpha(e),e.lineWidth=h,g&&e.setLineDash([...g]),f&&(e.lineDashOffset=f),x&&(e.lineCap=x),m&&(e.lineJoin=m),e.beginPath(),u&&(e.moveTo(i,s),r?e.lineTo(i,n):e.lineTo(a,s)),d&&(e.moveTo(a,n),r?e.lineTo(a,s):e.lineTo(i,n)),e.stroke(),e.globalAlpha=l}this.fillShadow?.markClean(),super.render(t)}},zo.className="Range",S([lt()],zo.prototype,"x1",2),S([lt()],zo.prototype,"y1",2),S([lt()],zo.prototype,"x2",2),S([lt()],zo.prototype,"y2",2),S([lt()],zo.prototype,"startLine",2),S([lt()],zo.prototype,"endLine",2),S([lt()],zo.prototype,"horizontal",2)}});function r7(t){return t!=null&&Object.hasOwn(t,"toString")&&En(t.toString())}function l7(t){return t!=null&&Object.hasOwn(t,"valueOf")&&pe(t.valueOf())}function cS(t){return pe(t)||Ab(t)||l7(t)}function c7(t,e){return t!=null&&(!e||cS(t))}function HC(t){return r7(t)&&Object.hasOwn(t,"id")?t.id:t}var _m=I({"packages/ag-charts-community/src/util/value.ts"(){"use strict";R()}});function HB(t){switch(t.type){case"line":return t.value;case"range":return t.range}}function $B(t,e){const i=HB(t);if(i==null)return!1;const s=me.is(e)||Pa.is(e),a=n=>c7(n,s)&&!isNaN(e.convert(n,{clamp:!0}));if(t.type==="range"){const[n,o]=i;return a(n)&&a(o)}else return a(i)}var UB=I({"packages/ag-charts-community/src/chart/crossline/crossLine.ts"(){"use strict";Bs(),Fu(),_m()}}),KB,YB,ZB,XB,hn,ia,qB=I({"packages/ag-charts-community/src/chart/crossline/cartesianCrossLine.ts"(){"use strict";R(),zu(),Wt(),Oe(),WB(),cn(),$i(),Gn(),vt(),UB(),KB={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:1},"top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:-1},"bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},YB={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:-1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:-1,labelV:-1},"inside-top-right":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},ZB={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},XB={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:-1,labelV:-1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},hn=class extends Nt{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}},S([k],hn.prototype,"enabled",2),S([k],hn.prototype,"text",2),S([k],hn.prototype,"fontStyle",2),S([k],hn.prototype,"fontWeight",2),S([k],hn.prototype,"fontSize",2),S([k],hn.prototype,"fontFamily",2),S([k],hn.prototype,"padding",2),S([k],hn.prototype,"color",2),S([k],hn.prototype,"position",2),S([k],hn.prototype,"rotation",2),S([k],hn.prototype,"parallel",2),ia=class extends Nt{constructor(){super(),this.id=zn(this),this.defaultColorRange=[],this.fill="#c16068",this.label=new hn,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.position="top",this.rangeGroup=new Lt({name:this.id}),this.lineGroup=new Lt({name:this.id}),this.labelGroup=new Lt({name:this.id}),this.crossLineRange=new zo,this.crossLineLabel=new Cu,this.data=void 0,this.startLine=!1,this.endLine=!1,this._isRange=void 0,this.lineGroup.append(this.crossLineRange),this.labelGroup.append(this.crossLineLabel),this.crossLineRange.pointerEvents=1}get defaultLabelPosition(){return"top"}update(t){const{enabled:e,type:i,data:s,scale:a}=this;if(!a||!e||!t||!$B(this,a)||s==null){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updateNodes();const n=i==="range";n!==this._isRange&&(n?this.rangeGroup.appendChild(this.crossLineRange):this.lineGroup.appendChild(this.crossLineRange)),this._isRange=n}calculateLayout(t){if(this.data=void 0,!t)return;const{type:e,range:i,value:s,scale:a,clippedRange:n,strokeWidth:o=0}=this;if(!a)return;const r=a.bandwidth??0,l=a.step??0,c=a instanceof wc?(l-r)/2:0,[h,u]=ls(n);let d,p,g,f;if(e==="line"){const x=r/2;if(d=a.convert(s)+x,p=NaN,g=a.convert(s,{clamp:!0})+x,f=NaN,g>=u||g<=h)return}else if(i){const[x,m]=i;if(d=a.convert(x),p=a.convert(m),g=a.convert(x,{clamp:!0}),f=a.convert(m,{clamp:!0}),g>f&&([g,f]=[f,g],[d,p]=[p,d]),g>=u||f<=h)return;Number.isFinite(d)&&(g-=c),Number.isFinite(p)&&(p+=r,f+=r+c)}else return;g=Tm(g,n),f=Tm(f,n),d-c>=g&&(d-=c),p+c<=f&&(p+=c),this.startLine=o>0&&d>=g&&d<=g+c,this.endLine=o>0&&p>=f-r-c&&p<=f,this.data=[g,f],this.label.enabled===!1||this.label.text}updateNodes(){const{position:t,data:[e,i]=[0,0],gridLength:s}=this,a=Number.isFinite(i)?i-e:0;let n;switch(t){case"top":case"bottom":n=new gt(e,t==="top"?0:-s,a,s);break;case"left":case"right":n=new gt(t==="left"?0:-s,e,s,a)}this.updateRangeNode(n);const{label:o}=this;o.enabled!==!1&&o.text&&(this.updateLabel(),this.positionLabel(n))}updateRangeNode(t){const{type:e,position:i,crossLineRange:s,startLine:a,endLine:n,fill:o,fillOpacity:r,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u}=this;s.x1=t.x,s.x2=t.x+t.width,s.y1=t.y,s.y2=t.y+t.height,s.horizontal=i==="top"||i==="bottom",s.startLine=a,s.endLine=n,s.fill=e==="range"?o:void 0,s.fillOpacity=r??1,s.stroke=l,s.strokeWidth=c??1,s.strokeOpacity=h??1,s.lineDash=u}updateLabel(){const{crossLineLabel:t,label:e}=this;e.text&&(t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.fontSize=e.fontSize,t.fontFamily=e.fontFamily,t.fill=e.color,t.text=e.text)}get anchor(){const t=this.position==="left"||this.position==="right",e=this.type==="range",{position:i=this.defaultLabelPosition}=this.label;return e?(t?ZB:XB)[i]:(t?KB:YB)[i]}positionLabel(t){const{crossLineLabel:e,label:i,anchor:s}=this;e.rotation=Hi(i.rotation??0),e.textBaseline="middle",e.textAlign="center";const a=e.getBBox();if(!a)return;const{width:n,height:o}=a,r=i.padding+n/2,l=i.padding+o/2,c=t.x+t.width*(s.rangeH+1)/2-r*s.labelH,h=t.y+t.height*(s.rangeV+1)/2-l*s.labelV;e.x=c,e.y=h,e.rotationCenterX=c,e.rotationCenterY=h}computeLabelSize(){const{label:t}=this;if(t.enabled===!1||!t.text)return;const e=new Cu;e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=t.text,e.rotation=Hi(t.rotation??0),e.textBaseline="middle",e.textAlign="center";const i=e.getBBox();if(!i)return;const{width:s,height:a}=i;return{width:s,height:a}}calculatePadding(t){const{label:e,anchor:i}=this,s=this.computeLabelSize();if(!s)return;const{width:a,height:n}=s,o=e.padding+a,r=e.padding+n,l=this.position==="left"||this.position==="right";l&&(i.rangeH===-1&&i.labelH===1?t.left=Math.max(t.left??0,o):i.rangeH===1&&i.labelH===-1&&(t.right=Math.max(t.right??0,o))),l||(i.rangeV===-1&&i.labelV===1?t.top=Math.max(t.top??0,r):i.rangeV===1&&i.labelV===-1&&(t.bottom=Math.max(t.bottom??0,r)))}},ia.className="CrossLine",S([k],ia.prototype,"enabled",2),S([k],ia.prototype,"type",2),S([k],ia.prototype,"range",2),S([k],ia.prototype,"value",2),S([k],ia.prototype,"defaultColorRange",2),S([k],ia.prototype,"fill",2),S([k],ia.prototype,"fillOpacity",2),S([k],ia.prototype,"stroke",2),S([k],ia.prototype,"strokeWidth",2),S([k],ia.prototype,"strokeOpacity",2),S([k],ia.prototype,"lineDash",2),S([k],ia.prototype,"label",2)}}),Em,h7=I({"packages/ag-charts-community/src/chart/axis/axisGridLine.ts"(){"use strict";vt(),Em=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}},S([k],Em.prototype,"enabled",2),S([k],Em.prototype,"width",2),S([k],Em.prototype,"style",2)}}),Uu,QB=I({"packages/ag-charts-community/src/chart/axis/axisInterval.ts"(){"use strict";vt(),vt(),Uu=class extends Nt{},S([k],Uu.prototype,"step",2),S([k],Uu.prototype,"values",2),S([k],Uu.prototype,"minSpacing",2),S([k],Uu.prototype,"maxSpacing",2)}}),Ui,hS=I({"packages/ag-charts-community/src/chart/axis/axisLabel.ts"(){"use strict";Pt(),vt(),vt(),Cm(),Ui=class extends Nt{constructor(){super(...arguments),this.enabled=!0,this.spacing=5,this.color="#575757",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1,this._formatters={"component:year":void 0,"component:month":void 0,"component:day":void 0,"component:none":void 0,"long:year":void 0,"long:month":void 0,"long:day":void 0,"long:none":void 0}}getSideFlag(){return this.mirrored?1:-1}formatValue(t,e,i,s={dateStyle:"long",truncateDate:void 0}){const{formatter:a,format:n}=this,{type:o,value:r,domain:l,boundSeries:c}=e,h=e.type==="number"?e.fractionDigits:void 0,u=e.type==="date"?e.unit:void 0;let d;if(a!=null){const p=e.type==="date"?e.step:void 0;d=t(a,{value:r,index:i,domain:l,fractionDigits:h,unit:u,step:p,boundSeries:c})}if(n!=null&&d==null){const{specifier:p,dateStyle:g,truncateDate:f}=s,x=`${g}:${f??"none"}`;let m=this._formatters[x];const b=_u.mergeSpecifiers(p,n);(m==null||m.type!==o||m.unit!==u||!Wi(m.mergedFormat,b))&&(m={type:o,mergedFormat:b,unit:u,formatter:_u.getFormatter(o,b,u,g,s)},this._formatters[x]=m),d=m.formatter?.(r,h)}return d!=null?String(d):void 0}},S([k],Ui.prototype,"enabled",2),S([k],Ui.prototype,"fontStyle",2),S([k],Ui.prototype,"fontWeight",2),S([k],Ui.prototype,"fontSize",2),S([k],Ui.prototype,"fontFamily",2),S([k],Ui.prototype,"spacing",2),S([k],Ui.prototype,"minSpacing",2),S([k],Ui.prototype,"color",2),S([k],Ui.prototype,"rotation",2),S([k],Ui.prototype,"avoidCollisions",2),S([k],Ui.prototype,"mirrored",2),S([k],Ui.prototype,"parallel",2),S([k],Ui.prototype,"itemStyler",2),S([k],Ui.prototype,"formatter",2),S([k],Ui.prototype,"format",2)}}),Rm,u7=I({"packages/ag-charts-community/src/chart/axis/axisLine.ts"(){"use strict";vt(),Rm=class{constructor(){this.enabled=!0,this.width=1,this.stroke=void 0}},S([k],Rm.prototype,"enabled",2),S([k],Rm.prototype,"width",2),S([k],Rm.prototype,"stroke",2)}}),Oc,$C=I({"packages/ag-charts-community/src/chart/axis/axisTick.ts"(){"use strict";vt(),vt(),Oc=class extends Nt{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6}},S([k],Oc.prototype,"enabled",2),S([k],Oc.prototype,"width",2),S([k],Oc.prototype,"size",2),S([k],Oc.prototype,"stroke",2)}}),$n,d7=I({"packages/ag-charts-community/src/chart/axis/axisTitle.ts"(){"use strict";vt(),vt(),Lu(),$n=class extends Nt{constructor(){super(...arguments),this.caption=new Pe,this.enabled=!1,this.spacing=Pe.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}},S([k],$n.prototype,"enabled",2),S([k],$n.prototype,"text",2),S([k],$n.prototype,"spacing",2),S([k],$n.prototype,"fontStyle",2),S([k],$n.prototype,"fontWeight",2),S([k],$n.prototype,"fontSize",2),S([k],$n.prototype,"fontFamily",2),S([k],$n.prototype,"color",2),S([k],$n.prototype,"wrapping",2),S([k],$n.prototype,"formatter",2)}});function JB(t){const[e,i]=ls(t.range),s=Math.floor(e),a=Math.ceil(i);return{min:s,max:a,visible:s!==a}}function p7(t,e){return Math.abs(e-t)<iz?e:t>e?e+dS:e-dS}function tz(t){const{min:e,max:i}=t,s=l=>l<e||l>i;return{tick:{fromFn(l,c,h){let{x1:u,x2:d,y1:p,y2:g}=l,f=l.opacity;return(h==="added"||s(c.offset))&&({x1:u,x2:d,y1:p,y2:g}=c,f=0),{x1:u,x2:d,y1:p,y2:g,opacity:f,phase:Hn[h]}},toFn(l,c,h){const{x1:u,x2:d,y1:p,y2:g}=c;let f=1;return h==="removed"&&(f=0),{x1:u,x2:d,y1:p,y2:g,opacity:f}},applyFn(l,c){l.setProperties(c),l.visible=!s(l.y)}},line:{fromFn(l,c){const{x1:h,x2:u,y1:d,y2:p}=l.previousDatum??c;return{x1:h,x2:u,y1:d,y2:p,phase:Hn.updated}},toFn(l,c){const{x1:h,x2:u,y1:d,y2:p}=c;return{x1:h,x2:u,y1:d,y2:p}}},label:{fromFn(l,c,h){const u=l.previousDatum??c;let{x:d,y:p,rotationCenterX:g,rotationCenterY:f,rotation:x}=u,m=l.opacity;return h==="removed"||s(u.y)?x=c.rotation:(h==="added"||s(l.datum.y))&&({x:d,y:p,rotationCenterX:g,rotationCenterY:f,rotation:x}=c,m=0),{x:d,y:p,rotationCenterX:g,rotationCenterY:f,rotation:x,opacity:m,phase:Hn[h]}},toFn(l,c,h){const{x:u,y:d,rotationCenterX:p,rotationCenterY:g}=c;let f=0,x=1;return h==="added"?f=c.rotation:h==="removed"?(x=0,f=c.rotation):f=p7(l.previousDatum?.rotation??c.rotation,c.rotation),{x:u,y:d,rotationCenterX:p,rotationCenterY:g,rotation:f,opacity:x,finish:{rotation:c.rotation}}}},group:{fromFn(l,c){const{translationX:h,translationY:u}=l;return{translationX:h,translationY:u,phase:Hn.updated}},toFn(l,c){const{translationX:h,translationY:u}=c;return{translationX:h,translationY:u}}}}}function ez(){return(t,e)=>({translationX:e.translationX,translationY:e.translationY})}function uS(){return(t,e)=>({x:e.x,y:e.y,rotationCenterX:e.rotationCenterX,rotationCenterY:e.rotationCenterY,rotation:e.rotation})}function UC(){return(t,e)=>{const{x1:i,x2:s,y1:a,y2:n}=e;return{x1:i,x2:s,y1:a,y2:n}}}var KC,dS,iz,YC=I({"packages/ag-charts-community/src/chart/axis/axisUtil.ts"(){"use strict";zs(),Gn(),KC=(t=>(t[t.TickAndDomain=0]="TickAndDomain",t[t.TicksOnly=1]="TicksOnly",t[t.Off=2]="Off",t))(KC||{}),dS=Math.PI*2,iz=dS/2}}),ZC,Ir,pS,XC=I({"packages/ag-charts-community/src/chart/axis/axis.ts"(){"use strict";R(),WC(),zu(),Bs(),Fu(),Wt(),Oe(),Nc(),cn(),ns(),Gn(),Pt(),vt(),ta(),qB(),Cm(),h7(),QB(),hS(),u7(),$C(),d7(),ZC=(t=>(t[t.TickLines=0]="TickLines",t[t.AxisLine=1]="AxisLine",t[t.TickLabels=2]="TickLabels",t))(ZC||{}),Ir=class qY{constructor(e,i){this.moduleCtx=e,this.scale=i,this.id=zn(this),this._crossLines=[],this.nice=!0,this.reverse=!1,this.keys=[],this.interval=new Uu,this.dataDomain={domain:[],clipped:!1},this.title=new $n,this.gridLength=0,this.gridPadding=0,this.seriesAreaPadding=0,this.layoutConstraints={stacked:!0,align:"start",width:100,unit:"percent"},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new Lt({name:`${this.id}-axis`}),this.tickLineGroup=this.axisGroup.appendChild(new Mu({name:`${this.id}-Axis-tick-lines`,zIndex:0})),this.tickLabelGroup=this.axisGroup.appendChild(new Mu({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.labelGroup=new Lt({name:`${this.id}-Labels`,zIndex:10}),this.gridGroup=new vs({name:`${this.id}-Axis-grid`,zIndex:2}),this.gridLineGroup=this.gridGroup.appendChild(new Lt({name:`${this.id}-gridLines`})),this.crossLineRangeGroup=new Mu({name:`${this.id}-CrossLines-Range`,zIndex:5}),this.crossLineLineGroup=new Mu({name:`${this.id}-CrossLines-Line`,zIndex:9}),this.crossLineLabelGroup=new Mu({name:`${this.id}-CrossLines-Label`,zIndex:14}),this.tickLabelGroupSelection=Ci.select(this.tickLabelGroup,Cu,!1),this.line=new Rm,this.tick=new Oc,this.gridLine=new Em,this.label=this.createLabel(),this.defaultTickMinSpacing=qY.defaultTickMinSpacing,this.translation={x:0,y:0},this.layout={label:{fractionDigits:0,spacing:this.label.spacing,format:this.label.format}},this.axisContext=void 0,this.cleanup=new Fe,this.range=[0,1],this.visibleRange=[0,1],this.animatable=!0,this.unzoomedInputDomain=void 0,this.unzoomedInputRangeExtent=NaN,this.unzoomedInputGridLength=NaN,this.unzoomedInputInitialPrimaryTickCount=void 0,this.formatterBoundSeries=new II(()=>{const{direction:s,boundSeries:a}=this;return dl(a.flatMap(n=>n.getFormatterContext(s)))}),this.moduleMap=new lS,this.range=this.scale.range.slice(),this.crossLines.forEach(s=>this.initCrossLine(s))}set crossLines(e){const{CrossLineConstructor:i}=this.constructor;this._crossLines.forEach(s=>this.detachCrossLine(s)),this._crossLines=e.map(s=>{const a=new i;return a.set(s),a}),this._crossLines.forEach(s=>{this.attachCrossLine(s),this.initCrossLine(s)})}get crossLines(){return this._crossLines}get type(){return this.constructor.type??""}get primaryLabel(){}get primaryTick(){}resetAnimation(e){}attachCrossLine(e){this.crossLineRangeGroup.appendChild(e.rangeGroup),this.crossLineLineGroup.appendChild(e.lineGroup),this.crossLineLabelGroup.appendChild(e.labelGroup)}detachCrossLine(e){this.crossLineRangeGroup.removeChild(e.rangeGroup),this.crossLineLineGroup.removeChild(e.lineGroup),this.crossLineLabelGroup.removeChild(e.labelGroup)}destroy(){this.moduleMap.destroy(),this.cleanup.flush()}setScaleRange(e){const{range:i,scale:s}=this,a=(i[1]-i[0])/(e[1]-e[0]),n=a*e[0],o=i[0]-n;s.range=[o,o+a]}updateScale(){const{range:[e,i]}=this;this.setScaleRange(this.visibleRange),this.crossLines.forEach(s=>{s.clippedRange=[e,i]})}setCrossLinesVisible(e){this.crossLineRangeGroup.visible=e,this.crossLineLineGroup.visible=e,this.crossLineLabelGroup.visible=e}attachAxis(e){e.gridNode.appendChild(this.gridGroup),e.axisNode.appendChild(this.axisGroup),e.labelNode.appendChild(this.labelGroup),e.crossLineRangeNode.appendChild(this.crossLineRangeGroup),e.crossLineLineNode.appendChild(this.crossLineLineGroup),e.crossLineLabelNode.appendChild(this.crossLineLabelGroup)}detachAxis(e){e.gridNode.removeChild(this.gridGroup),e.axisNode.removeChild(this.axisGroup),e.labelNode.removeChild(this.labelGroup),e.crossLineRangeNode.removeChild(this.crossLineRangeGroup),e.crossLineLineNode.removeChild(this.crossLineLineGroup),e.crossLineLabelNode.removeChild(this.crossLineLabelGroup)}attachLabel(e){this.labelGroup.append(e)}inRange(e,i=0){const[s,a]=ls(this.range);return e>=s-i&&e<=a+i}getRangeOverflow(e){const{range:i,visibleRange:s}=this,a=(i[1]-i[0])/(s[1]-s[0]),[n,o]=ls([i[0]-a*s[0],i[0]-a*s[0]+a]);return e<n?e-n:e>o?e-o:0}createDatumFormatter(e,i){}onGridLengthChange(e,i){i^e&&this.onGridVisibilityChange(),this.crossLines.forEach(s=>this.initCrossLine(s))}onGridVisibilityChange(){}createLabel(){return new Ui}update(){this.formatterBoundSeries.clear(),this.unzoomedTickLayout=void 0,this.updatePosition(),this.updateSelections(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled,this.updateLabels(),this.updateCrossLines()}getLabelStyles(e,i,s=this.label){const a={color:s.color,spacing:s.spacing,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight};let n;s.itemStyler&&(n=this.callWithContext(s.itemStyler,{...e,...a}));const{color:o,fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h,spacing:u}=se(n,i,a);return{fill:o,fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h,spacing:u}}getTickSize(e=this.tick){return e.enabled?e.size:0}processData(){const{includeInvisibleDomains:e,boundSeries:i,direction:s}=this,n=(e?i:i.filter(o=>o.isEnabled())).map(o=>o.getDomain(s));this.setDomains(...n)}setDomains(...e){let i,s;e.length>0?{domain:i,animatable:s}=this.scale.normalizeDomains(...e):(i=[],s=!0),this.dataDomain=this.normaliseDataDomain(i),this.reverse&&this.dataDomain.domain.reverse(),this.animatable=s}calculateDomain(e){const{nice:i,dataDomain:{domain:s},range:a,scale:n,gridLength:o,unzoomedInputDomain:r,unzoomedInputRangeExtent:l,unzoomedInputGridLength:c,unzoomedInputInitialPrimaryTickCount:h}=this;let{unzoomedTickLayout:u}=this;const d=Nm(a);if(this.updateScale(),u==null||r!==s||l!==d||c!==o||h?.unzoomed!==e?.unzoomed||h?.zoomed!==e?.zoomed){const p=n.range;this.setScaleRange([0,1]);const g=i?0:2;u=this.calculateTickLayout(s,g,[0,1],e),n.range=p,this.unzoomedInputDomain=s,this.unzoomedInputRangeExtent=d,this.unzoomedInputGridLength=o,this.unzoomedTickLayout=u,this.unzoomedInputInitialPrimaryTickCount=e}return this.updateScale(),n.domain=u.niceDomain,{unzoomedTickLayout:u,domain:n.domain}}calculateLayout(e,i){this.chartLayout=i;const{visibleRange:s,nice:a}=this,n=s[0]===0&&s[1]===1,{unzoomedTickLayout:o,domain:r}=this.calculateDomain(e);let l;if(n)l=o;else{const g=a?1:2;l=this.calculateTickLayout(r,g,s,e)}const{rawTickCount:c=0,fractionDigits:h,bbox:u}=l,d=o.rawTickCount??0,p=c!==0&&d!==0?{zoomed:c,unzoomed:d}:void 0;return this.tickLayout=l.layout,this.layout.label={fractionDigits:h,spacing:this.label.spacing,format:this.label.format},this.layoutCrossLines(),{primaryTickCount:p,bbox:u}}updateCrossLines(){const e=this.isAnySeriesActive();this.crossLines.forEach(i=>{i.update(e)})}updatePosition(){const{crossLineRangeGroup:e,crossLineLineGroup:i,crossLineLabelGroup:s,gridGroup:a,translation:n}=this,o=Math.floor(n.x),r=Math.floor(n.y);a.setProperties({translationX:o,translationY:r}),e.setProperties({translationX:o,translationY:r}),i.setProperties({translationX:o,translationY:r}),s.setProperties({translationX:o,translationY:r})}tickFormatter(e,i,s,a,n,o="long"){const{moduleCtx:r,label:l}=this,{formatManager:c}=r,h=s?this.primaryLabel:void 0,u=this.tickFormatParams(e,i,a,n),d=this.formatterBoundSeries.get();let p,g,f;if(u.type==="number")p=u.fractionDigits;else if(u.type==="date"){const{unit:D,step:L,epoch:C}=u;g={unit:D,step:L,epoch:C},f=u.truncateDate}const x=this.callWithContext.bind(this),m={datum:void 0,seriesId:void 0,legendItemName:void 0,key:void 0,source:"axis-label",property:this.direction,domain:e,boundSeries:d},b=h??l,v=s?l.format:void 0,M={specifier:_u.mergeSpecifiers(h?.format,l.format),truncateDate:f};return(D,L)=>{const C=this.datumFormatParams(D,m,p,g,o);return C.value=D,b.formatValue(x,C,L,{specifier:v,dateStyle:o,truncateDate:f})??c.format(x,C,M)??c.defaultFormat(C,M)}}formatDatum(e,i,s,a,n,o,r,l,c,h=this.callWithContext.bind(this)){if(e==null)return"";const{moduleCtx:u,direction:d,dataDomain:p}=this;r??(r=p.domain);const{formatManager:g}=u,f=this.formatterBoundSeries.get();let x;switch(i){case"crosshair":case"annotation-label":x=this.layout.label.fractionDigits+1;break;case"series-label":x=2;break;case"tooltip":x=3;break;case"legend-label":x=void 0;break}const m=this.datumFormatParams(e,{source:i,datum:n,seriesId:s,legendItemName:a,key:o,property:d,domain:r,boundSeries:f},x,void 0,"long"),{type:b,value:v}=m,M=h,D=l?.formatValue(M,b,v,c??m)??g.format(M,m)??this.label.formatValue(M,m,NaN)??g.defaultFormat(m);return String(D)}getBBox(){return this.axisGroup.getBBox()}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(e=>this.includeInvisibleDomains||e.isEnabled())}clipTickLines(e,i,s,a){this.tickLineGroup.setClipRect(new gt(e,i,s,a))}clipGrid(e,i,s,a){this.gridGroup.setClipRect(new gt(e,i,s,a))}getTitleFormatterParams(e){const{direction:i}=this,s=this.formatterBoundSeries.get();return{domain:e,direction:i,boundSeries:s,defaultValue:this.title?.text}}normaliseDataDomain(e){return{domain:[...e],clipped:!1}}getLayoutState(){return{id:this.id,rect:this.getBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale,...this.layout}}getModuleMap(){return this.moduleMap}createModuleContext(){return this.axisContext??(this.axisContext=this.createAxisContext()),{...this.moduleCtx,parent:this.axisContext}}createAxisContext(){const{scale:e}=this;return{axisId:this.id,scale:this.scale,direction:this.direction,continuous:me.is(e)||Pa.is(e),getCanvasBounds:()=>He.toCanvas(this.axisGroup),seriesKeyProperties:()=>this.boundSeries.reduce((i,s)=>(s.getKeyProperties(this.direction).forEach(n=>i.add(n)),i),new Set),seriesIds:()=>this.boundSeries.map(i=>i.id),scaleInvert:i=>e.invert(i,!0),scaleInvertNearest:i=>e.invert(i,!0),formatScaleValue:(i,s,a)=>this.formatDatum(i,s,void 0,void 0,void 0,void 0,void 0,a),attachLabel:i=>this.attachLabel(i),inRange:(i,s)=>this.inRange(i,s),getRangeOverflow:i=>this.getRangeOverflow(i),pickBand:i=>this.pickBand(i)}}pickBand(e){if(!wc.is(this.scale))return;const{scale:i,range:s}=this,a=i.invert(this.isVertical()?e.y:e.x,!0),n=i.bandwidth??0,r=((i.step??0)-n)/2,l=i.convert(a),c=l-r,h=l+n+r;return{id:this.id,value:a,band:[Tm(c,s),Tm(h,s)],position:l}}isVertical(){return this.direction==="y"}isReversed(){return this.reverse}callWithContext(e,...i){const{callbackCache:s,chartService:a}=this.moduleCtx;return s.call([this,a],e,...i)}},Ir.defaultTickMinSpacing=50,Ir.CrossLineConstructor=ia,S([k],Ir.prototype,"nice",2),S([k],Ir.prototype,"reverse",2),S([k],Ir.prototype,"keys",2),S([k],Ir.prototype,"interval",2),S([k],Ir.prototype,"title",2),S([kc((t,e,i)=>t.onGridLengthChange(e,i))],Ir.prototype,"gridLength",2),pS=Ir}});function gS(t,e){return t.valueOf()-e.valueOf()}function g7(t){let e=NaN;const i=[];for(const s of t){const a=s.valueOf();e!==a&&i.push(s),e=a}return i}function qC(t){const e=t.slice().sort(gS);return QC(e)==null?g7(e):e}function QC(t){if(t.length===0)return 1;const e=Number(t[t.length-1])>Number(t[0])?1:-1;let i=-1/0*e;for(const s of t){const a=s.valueOf();if(Math.sign(a-i)!==e)return;i=a}return e}var JC=I({"packages/ag-charts-community/src/util/date.ts"(){"use strict"}}),Ku,Sl,Pc,_c,tL,fS,Kp,sz=I({"packages/ag-charts-community/src/util/time/duration.ts"(){"use strict";Ku=1e3,Sl=Ku*60,Pc=Sl*60,_c=Pc*24,tL=_c*7,fS=_c*30,Kp=_c*365}}),Yu,Yp,az=I({"packages/ag-charts-community/src/util/time/encoding.ts"(){"use strict";sz(),Yu=new Date().getTimezoneOffset()*Sl,Yp={millisecond:{milliseconds:1,hierarchy:"day",encode(t){return t.getTime()},decode(t){return new Date(t)}},second:{milliseconds:Ku,hierarchy:"day",encode(t,e){const i=e?0:Yu;return Math.floor((t.getTime()-i)/Ku)},decode(t,e){const i=e?0:Yu;return new Date(i+t*Ku)}},minute:{milliseconds:Sl,hierarchy:"day",encode(t,e){const i=e?0:Yu;return Math.floor((t.getTime()-i)/Sl)},decode(t,e){const i=e?0:Yu;return new Date(i+t*Sl)}},hour:{milliseconds:Pc,hierarchy:"day",encode(t,e){const i=e?0:Yu;return Math.floor((t.getTime()-i)/Pc)},decode(t,e){const i=e?0:Yu;return new Date(i+t*Pc)}},day:{milliseconds:_c,hierarchy:"month",encode(t,e){const i=e?0:t.getTimezoneOffset()*Sl;return Math.floor((t.getTime()-i)/_c)},decode(t,e){let i;return e?(i=new Date(0),i.setUTCDate(i.getUTCDate()+t),i.setUTCHours(0,0,0,0)):(i=new Date(1970,0,1),i.setDate(i.getDate()+t)),i}},month:{milliseconds:fS,hierarchy:"year",encode(t,e){return e?t.getUTCFullYear()*12+t.getUTCMonth():t.getFullYear()*12+t.getMonth()},decode(t,e){if(e){const i=Math.floor(t/12),s=t-i*12;return new Date(Date.UTC(i,s,1))}else{const i=Math.floor(t/12),s=t-i*12;return new Date(i,s,1)}}},year:{milliseconds:Kp,hierarchy:void 0,encode(t,e){return e?t.getUTCFullYear():t.getFullYear()},decode(t,e){const i=new Date;return e?(i.setUTCFullYear(t),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)):(i.setFullYear(t),i.setMonth(0,1),i.setHours(0,0,0,0)),i}}}}});function Bm(t){return typeof t=="string"?{unit:t,step:1,epoch:void 0,utc:!1}:{unit:t.unit,step:t.step??1,epoch:t.epoch,utc:t.utc??!1}}function zm(t,e,i,s){if(i==null)return 0;const a=Yp[t];return Math.floor(a.encode(new Date(i),s))%e}function Zp(t,e,i,s,a){const n=Yp[e];return Math.floor((n.encode(new Date(t),s)-a)/i)}function Fm(t,e,i,s,a){return Yp[e].decode(t*i+a,s)}function mS(t,e,i,s,a){const n=new Date(t),o=Zp(n,e,i,s,a);return Fm(o,e,i,s,a)}function yS(t,e,i,s,a){const n=new Date(Number(t)-1),o=Zp(n,e,i,s,a);return Fm(o+1,e,i,s,a)}function Un(t,e){const{unit:i,step:s,epoch:a,utc:n}=Bm(t),o=zm(i,s,a,n);return mS(e,i,s,n,o)}function nz(t,e){const{unit:i,step:s,epoch:a,utc:n}=Bm(t),o=zm(i,s,a,n);return yS(e,i,s,n,o)}function oz(t,e){const{unit:i,step:s,epoch:a,utc:n}=Bm(t),o=zm(i,s,a,n);return Fm(Zp(yS(e,i,s,n,o),i,s,n,o)-1,i,s,n,o)}function rz(t,e){const{unit:i,step:s,epoch:a,utc:n}=Bm(t),o=zm(i,s,a,n);return Fm(Zp(mS(e,i,s,n,o),i,s,n,o)+1,i,s,n,o)}function eL(t,e,i){if(t.valueOf()>e.valueOf()&&([t,e]=[e,t],i!=null&&(i=[1-i[1],1-i[0]])),i!=null){const s=e.valueOf()-t.valueOf(),a=t.valueOf();t=new Date(a+i[0]*s),e=new Date(a+i[1]*s)}return[new Date(t),new Date(e)]}function lz(t,e,i,{extend:s=!1,visibleRange:a=[0,1],limit:n,defaultAlignment:o="start"}={}){const r=Bm(t),{unit:l,step:c,utc:h}=r;let u;r.epoch!=null?u=r.epoch:o==="interval"?u=void 0:e.valueOf()>i.valueOf()?u=i:u=e,[e,i]=eL(e,i,a);const d=zm(r.unit,r.step,u,r.utc),p=s?mS(e,l,c,h,d):yS(e,l,c,h,d),g=Zp(p,l,c,h,d),f=s?yS(i,l,c,h,d):mS(i,l,c,h,d);let x=Zp(f,l,c,h,d);return n!=null&&x-g>n&&(x=g+n),{range:[g,x],unit:l,step:c,utc:h,offset:d}}function iL(t,e,i,s){const{range:[a,n]}=lz(t,e,i,s);return Math.abs(n-a)}function Kn(t,e,i,s){const{range:[a,n],unit:o,step:r,utc:l,offset:c}=lz(t,e,i,s),h=[];for(let u=a;u<=n;u+=1){const d=Fm(u,o,r,l,c);h.push(d)}return h}var f7=I({"packages/ag-charts-community/src/util/time/range.ts"(){"use strict";az()}});function Ml(t){return typeof t=="string"?t:t.unit}function Ec(t){return typeof t=="string"?1:t.step??1}function Vm(t){return typeof t=="string"?void 0:t.epoch}function Gm(t){return Yp[Ml(t)].hierarchy}function un(t){return Ec(t)*Yp[Ml(t)].milliseconds}var Ar=I({"packages/ag-charts-community/src/util/time/index.ts"(){"use strict";az(),sz(),f7()}});function cz(t,e){return Math.abs(Math.round(t)-t)<e}function hz(t,e,i){return Math.abs(e-t)>=i?Math.abs(e-t)/i+1:1}function jm(t,e,i,s,a,n){if(t===e)return{ticks:[t],count:1};if(i<2)return{ticks:[t,e],count:2};const o=Wm(t,e,i,s,a);if(!Number.isFinite(o))return{ticks:[],count:0};let r=t,l=e;if(cz(r/o,1e-12)||(r=Math.ceil(r/o)*o),cz(l/o,1e-12)||(l=Math.floor(l/o)*o),n!=null){const h=l-r,u=e-t,d=t+u*n[0],p=t+u*n[1];n=[(d-r)/h,(p-r)/h]}const{ticks:c}=bS(r,l,o,n);return{ticks:c,count:hz(t,e,o)}}function uz({timeInterval:t,step:e}){const i=un(t)*e,s=Gm(t),a=s?un(s):void 0;return i<=(a??1/0)*yz}function dz(t,{weekStart:e}){if(t.unit==="day"&&t.step===7)return e}function xS(t,e,i,s,a,{weekStart:n,primaryOnly:o=!1,targetInterval:r}){if(i<=0)return;const l=r??Math.abs(e-t)/Math.max(i,1),c=vS.findLast(p=>(!o||uz(p))&&l>p.duration),h=vS.find(p=>(!o||uz(p))&&l<=p.duration);if(c==null)return{unit:"millisecond",step:Math.max(Wm(t,e,i,s,a),1)};if(h==null)return{unit:"year",step:r==null?Wm(t/Kp,e/Kp,i,s,a):1};const{timeInterval:u,step:d}=l-c.duration<h.duration-l?c:h;return{unit:u.unit,step:Ec(u)*d,epoch:dz(u,{weekStart:n})}}function Wm(t,e,i,s=0,a=1/0){if(t===e)return Et(1,s,a);if(i<1)return NaN;const n=Math.abs(e-t),o=10**Math.floor(Math.log10(n/i));let r=NaN,l=1/0,c=!1;for(const h of sL){const u=Math.ceil(n/(h*o)),d=u>=s&&u<=a;if(c&&!d)continue;const p=Math.abs(u-i);(l>p||c!==d)&&(c||(c=d),l=p,r=h)}return r*o}function pz(t){for(let e=t.length-1;e>=0;e-=1)if(t[e]!=="0")return e+1;return 0}function gz(t,e){const i=Wb(e??",f");if(i==null)return;(i.precision==null||isNaN(i.precision))&&(!i.type||"eEFgGnprs".includes(i.type)?i.precision=Math.max(...t.map(a=>{if(!Number.isFinite(a))return 0;const[n,o]=a.toExponential((i.type?6:12)-1).split(/[.e]/g);return(n!=="1"&&n!=="-1"?1:0)+pz(o)+1})):"f%".includes(i.type)&&(i.precision=Math.max(...t.map(a=>{if(!Number.isFinite(a)||a===0)return 0;const n=Math.floor(Math.log10(Math.abs(a))),o=i.type?6:12,r=a.toExponential(o-1).split(/[.e]/g)[1],l=pz(r);return Math.max(0,l-n)}))));const s=_I(i);return a=>s(Number(a))}function bS(t,e,i,s){if(!Number.isFinite(i)||i<=0)return{ticks:[],count:0};if(t===e)return{ticks:[t],count:1};const a=10**Fb(i),n=Math.min(t,e),o=Math.max(t,e);let r,l;if(s!=null&&(s[0]!==0||s[1]!==1)){const h=e-t,u=t+h*s[0],d=e-h*(1-s[1]);r=Math.min(u,d),l=Math.max(u,d)}else r=n,l=o;r=Math.floor(r*a)/a,l=Math.ceil(l*a)/a;const c=[];for(let h=0;;h+=1){const u=Math.round((n+i*h)*a)/a;if(u>o)break;u>=r&&u<=l&&c.push(u)}return{ticks:c,count:hz(n,o,i)}}function Xp(t,e){return t>=e?(ut.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0):!1}function fz(t,e){const i=Math.abs(e-t),s=10**Math.floor(Math.log10(i));let a=1/0,n=[t,e];for(const o of sL){const r=o*s,l=Math.floor(t/r)*r,c=Math.ceil(e/r)*r,h=1-i/Math.abs(c-l);a>h&&(a=h,n=[l,c])}return n}function mz(t,e,i,s,a,n){if(t<=0)return{minTickCount:0,maxTickCount:0,tickCount:0};n=Math.max(n,t/(a+1)),i??(i=n),s??(s=t),i>s&&(i===n?i=s:s=i),i=Math.max(i,1);const o=Math.max(1,Math.floor(t/(e*i))),r=Math.min(o,Math.ceil(t/(e*s))),l=Et(r,Math.floor(a/e),o);return{minTickCount:r,maxTickCount:o,tickCount:l}}var Ke,vS,sL,yz,Rc=I({"packages/ag-charts-community/src/util/ticks.ts"(){"use strict";R(),Ar(),Ar(),Ke=(t,e)=>({duration:un(t)*e,timeInterval:t,step:e}),vS=[Ke({unit:"second"},1),Ke({unit:"second"},5),Ke({unit:"second"},15),Ke({unit:"second"},30),Ke({unit:"minute"},1),Ke({unit:"minute"},5),Ke({unit:"minute"},15),Ke({unit:"minute"},30),Ke({unit:"hour"},1),Ke({unit:"hour"},3),Ke({unit:"hour"},6),Ke({unit:"hour"},12),Ke({unit:"day"},1),Ke({unit:"day"},2),Ke({unit:"day",step:7},1),Ke({unit:"day",step:7},2),Ke({unit:"day",step:7},3),Ke({unit:"month"},1),Ke({unit:"month"},2),Ke({unit:"month"},3),Ke({unit:"month"},4),Ke({unit:"month"},6),Ke({unit:"year"},1)],sL=[1,2,5,10],yz=Math.floor(2*tL/fS*10)/10}});function dn(t){return t instanceof Date?t.getTime():t}function SS(t){return t<Ku?"millisecond":t<Sl?"second":t<Pc?"minute":t<Pc*23?"hour":t<28*_c?"day":t<Kp?"month":"year"}function aL(t){if(t.length===0)return"millisecond";if(t.length===1)return MS(t[0]);let e=1/0;for(let i=1;i<t.length;i++)e=Math.min(e,Math.abs(t[i].valueOf()-t[i-1].valueOf()));return SS(e)}function MS(t){return Un("second",t)<t?"millisecond":Un("minute",t)<t?"second":Un("hour",t)<t?"minute":Un("day",t)<t?"hour":Un("month",t)<t?"day":Un("year",t)<t?"month":"year"}function nL(t){const[e,i]=t.length===0?[0,0]:ls([t[0].valueOf(),t[t.length-1].valueOf()]),s=new Date(e).getFullYear(),a=new Date(i).getFullYear();if(s!==a)return;const n=new Date(e).getMonth(),o=new Date(i).getMonth();if(n!==o)return"year";const r=new Date(e).getDate(),l=new Date(i).getDate();return r!==l?"month":"day"}var Hm=I({"packages/ag-charts-community/src/util/timeFormatDefaults.ts"(){"use strict";Gn(),Ar()}});function m7({start:t,stop:e,tickCount:i,minTickCount:s,maxTickCount:a,visibleRange:n,extend:o}){const r=xS(t,e,i,s,a,{weekStart:$m});return r?Kn(r,new Date(t),new Date(e),{visibleRange:n,extend:o}):[]}function oL({start:t,stop:e,interval:i,availableRange:s,visibleRange:a,extend:n}){if(!i)return[];if(No(i)||typeof i=="string"){const u=Kn(i,new Date(t),new Date(e),{visibleRange:a,extend:n});return Xp(u.length,s)?void 0:u}const o=Math.abs(i);if(Xp(Math.abs(e-t)/o,s))return;const r=vS.findLast(u=>o%u.duration===0);if(r){const{timeInterval:u,step:d,duration:p}=r,g={...u,step:d*Ec(u)*Math.round(o/p),epoch:dz(u,{weekStart:$m})};return Kn(g,new Date(t),new Date(e),{visibleRange:a,extend:n})}let l=new Date(Math.min(t,e));const c=new Date(Math.max(t,e)),h=[];for(;l<=c;)h.push(l),l=new Date(l),l.setMilliseconds(l.getMilliseconds()+o);return h}function y7(t,e,i,s){const{interval:a}=i,n=Math.min(dn(t),dn(e)),o=Math.max(dn(t),dn(e));let r;if(No(a)||typeof a=="string")r=a;else{let u;typeof a=="number"&&(u=(o-n)/Math.max(a,1),Xp(u,s)&&(u=void 0)),u??(u=i.tickCount??me.defaultTickCount),r=xS(n,o,u,i.minTickCount,i.maxTickCount,{weekStart:$m})}if(r==null)return[t,e];const l=Kn(r,new Date(n),new Date(o),{extend:!0});if(l==null||l.length<2)return[t,e];const c=l[0],h=l[l.length-1];return t<=e?[c,h]:[h,c]}var $m,Bc,DS=I({"packages/ag-charts-community/src/scale/timeScale.ts"(){"use strict";R(),Rc(),Ar(),Hm(),Bs(),$m=new Date(1970,0,4),Bc=class QY extends me{constructor(){super([],[0,1]),this.type="time"}static is(e){return e instanceof QY}toDomain(e){return new Date(e)}convert(e,i){return super.convert(e?.valueOf()??NaN,i)}invert(e){return new Date(super.invert(e))}niceDomain(e,i=this.domain){if(i.length<2)return[];let[s,a]=i;const n=4,o=this.getPixelRange();for(let r=0;r<n;r++){const[l,c]=y7(s,a,e,o);if(dn(s)===dn(l)&&dn(a)===dn(c))break;s=l,a=c}return[s,a]}ticks(e,i=this.domain,s=[0,1],a=!1){const{nice:n,interval:o,tickCount:r=me.defaultTickCount,minTickCount:l,maxTickCount:c}=e;if(i.length<2)return;const h=i.map(dn),u=h[0],d=h[h.length-1];if(o!=null){const g=this.getPixelRange();return{ticks:oL({start:u,stop:d,interval:o,availableRange:g,visibleRange:s,extend:a})??m7({start:u,stop:d,tickCount:r,minTickCount:l,maxTickCount:c,visibleRange:s,extend:a}),count:void 0}}else{if(n&&r===2)return{ticks:i,count:void 0};if(n&&r===1)return{ticks:i.slice(0,1),count:void 0}}const p=xS(u,d,r,l,c,{weekStart:$m});if(p!=null)return{ticks:Kn(p,new Date(u),new Date(d),{visibleRange:s,extend:a}),count:void 0,timeInterval:p}}}}});function xz(t,e,i,s,a){const n=[],o=Math.ceil(t.length/e),r=Math.floor(o/2);let l=Math.floor(s[0]*t.length),c=Math.ceil(s[1]*t.length);a&&(l>o&&(l-=o),c<t.length-o&&(c+=o));for(let h=l;h<c;h+=1){const u=i?t.length-1-h:h;(o<=0||(u+r)%o===0)&&n.push(t[h])}return n}var kS,rL=I({"packages/ag-charts-community/src/scale/ordinalTimeScale.ts"(){"use strict";R(),JC(),Bs(),Fu(),DS(),kS=class JY extends Pa{constructor(){super(...arguments),this.type="ordinal-time",this.defaultTickCount=me.defaultTickCount,this._domain=[],this.isReversed=!1}static is(e){return e instanceof JY}set domain(e){e!==this._domain&&(this.invalid=!0,this._domain=e,this._bands=void 0,this.isReversed=e.length>0&&e[0]>e[e.length-1])}get domain(){return this._domain}get bands(){return this._bands??(this._bands=this.isReversed?this.domain.slice().reverse():this.domain),this._bands}normalizeDomains(...e){const i=e.filter(s=>s.length>0);if(i.length===0)return{domain:[],animatable:!1};if(i.length===1){let s=i[0];const a=QC(s);return a===-1?s=s.slice().reverse():a==null&&(s=qC(s.slice())),{domain:s,animatable:!0}}return{domain:qC(i.flat()),animatable:!0}}ticks({interval:e,maxTickCount:i,tickCount:s=i},a=this.domain,n=[0,1],o=!1){if(!a.length)return;this.refresh();const{isReversed:r}=this;if(e==null)return{ticks:xz(a,s,r,n,o),count:void 0};const l=a[0].valueOf(),c=a[a.length-1].valueOf(),[h,u]=this.range,d=Math.abs(u-h);let p=oL({start:l,stop:c,interval:e,availableRange:d,visibleRange:n,extend:o})??xz(a,s,r,n,o),g=-1;return p=p.filter(f=>{const x=this.findIndex(f)??-1,m=x===g;return g=x,!m}),{ticks:p,count:void 0}}findIndex(e){const{bands:i}=this,s=e.valueOf();return Dp(0,i.length-1,a=>i[a].valueOf()>=s)}}}});function bz(t,e,i){const[s,a]=IS(t,e);return iL(e,s,a,i)<=lL}function IS(t,e){const i=Un(e,t[0]),s=Un(e,t[1]);return[i,s]}var lL,Fo,AS=I({"packages/ag-charts-community/src/scale/unitTimeScale.ts"(){"use strict";R(),Ar(),Bs(),Fu(),lL=5e7,Fo=class tZ extends Pa{constructor(){super(...arguments),this.type="unit-time",this.defaultTickCount=12,this._domain=[],this._bands=void 0}static is(e){return e instanceof tZ}static supportsInterval(e,i){return bz(e,i)}set domain(e){e!==this._domain&&(this._domain=e,this._bands=void 0)}get domain(){return this._domain}get interval(){return this._interval}set interval(e){this._interval!==e&&(this._interval=e,this._bands=void 0)}get bands(){return this._bands??(this._bands=this.calculateBands(this._domain,[0,1])),this._bands}normalizeDomains(...e){return MC(...e)}convert(e,i){e instanceof Date||(e=new Date(e));const{domain:s,interval:a}=this;if(s.length<2)return NaN;if(i?.clamp!==!0&&a!=null){const n=e.valueOf(),[o,r]=IS(s,a),l=Math.min(o.valueOf(),r.valueOf()),c=Math.max(o.valueOf(),r.valueOf());if(n<l||n>=c+un(a))return NaN}return super.convert(e,i)}calculateBands(e,i,s=!1){if(e===this.domain&&i[0]===0&&i[1]===1&&!s&&this._bands!=null)return this._bands;if(e.length<2)return[];const{interval:a}=this;if(a==null)return[];const n={visibleRange:i,extend:s};if(!bz(e,a,n))return[];const[o,r]=IS(e,a);return iL(a,o,r,n)>lL?(ut.warnOnce("the configured unit results in too many bands, ignoring. Supply a larger unit."),[]):Kn(a,o,r,n)}ticks({interval:e},i=this.domain,s=[0,1],a=!1){if(i.length<2)return;const n=this.calculateBands(i,s,a),o=this.interval?un(this.interval):1/0;if(e==null)return{ticks:n,count:void 0};const r=Math.min(i[0].valueOf(),i[1].valueOf()),l=Math.max(i[0].valueOf(),i[1].valueOf());let c,h,u;No(e)||typeof e=="string"?(c=Kn(e,i[0],i[1],{extend:!0,visibleRange:s}),h=0,u=c.length-1):(c=n,h=bc(0,n.length-1,b=>n[b].valueOf()<=r)??0,u=bc(0,n.length-1,b=>n[b].valueOf()<=l)??n.length-1);const d=[];let p;for(let b=h;b<=u;b++){const v=c[b].valueOf(),M=bc(0,n.length-1,L=>n[L].valueOf()<=v),D=M!=null&&M!=p?n[M]:void 0;p=M,D!=null&&v-D.getTime()<=o&&d.push(D)}let g,f;if(this.interval){const b=IS([new Date(r),new Date(l)],this.interval);g=b[0].valueOf(),f=b[1].valueOf()}else g=r,f=l;let x=Dp(0,d.length-1,b=>d[b].valueOf()>=g)??0,m=bc(0,d.length-1,b=>d[b].valueOf()<=f)??d.length-1;return a&&(x=Math.max(x-1,0),m=Math.min(m+1,d.length-1)),{ticks:d.slice(x,m+1),count:d.length}}findIndex(e){const{bands:i}=this,s=e.valueOf();return bc(0,i.length-1,a=>i[a].valueOf()<=s)}}}});function x7(t,e,i,s,a){let[n,o]=ls(e.map(Number));const r=Math.floor(i.unzoomed);if(r<=1){const[m,b]=b7(n,o),v=5*Math.pow(2,-Math.ceil(Math.log2(a[1]-a[0]))),{ticks:M}=jm(m,b,v,void 0,void 0,a),D=[t.toDomain(m),t.toDomain(b)];return s&&D.reverse(),{domain:D,ticks:M}}if(n===o){const m=Math.floor(Math.log10(n)),b=Math.pow(10,m),v=Math.min(b,1),M=r-1;n-=v*Math.floor(M/2),o=n+v*M}let l=n,c=o;l=v7(l,c,r);const h=M7(l,c,r),u=r-1;c=l+u*h;const d=Math.floor(l/h)*h,p=Math.floor(c/h)*h;d<=n&&p>=o&&(l=d,c=p);const g=[t.toDomain(l),t.toDomain(c)];s&&g.reverse();const f=h*((i.unzoomed-1)/(i.zoomed-1)),x=S7(l,f,Math.floor(i.zoomed));return{domain:g,ticks:x}}function b7(t,e){let i=t,s=e,a=0;do{[i,s]=fz(i,s);const{ticks:n}=jm(i,s,5);if(n.length%2===1)return[i,s];i-=1,s+=1}while(a++<10);return[t,e]}function v7(t,e,i){t=Math.floor(t);const s=Math.abs(e-t)/(i-1),a=Math.floor(Math.log10(s)),n=Math.pow(10,a);return Math.floor(t/n)*n}function S7(t,e,i){const s=Fb(e),a=Math.pow(10,s),n=[];for(let o=0;o<i;o++){const r=t+e*o;n.push(Math.round(r*a)/a)}return n}function M7(t,e,i){const s=i-1,a=(e-t)/s;return D7(a)}function D7(t){const e=Math.floor(Math.log10(t)),i=Math.pow(10,e),s=t/i;return s>0&&s<=1?i:s>1&&s<=2?2*i:s>2&&s<=5?5*i:s>5&&s<=10?10*i:t}var k7=I({"packages/ag-charts-community/src/util/secondaryAxisTicks.ts"(){"use strict";R(),Gn(),Rc()}});function cL(){const t=new Map;return e=>{const i=t.get(e);return i?(t.set(e,i+1),`${e}_${i}`):(t.set(e,1),e)}}var hL=I({"packages/ag-charts-community/src/util/tempUtils.ts"(){"use strict"}});function I7(t,e,i=0,s=0){const a=gl(t),n=!a&&s>=0&&s<=Math.PI?-1:1,o=!a&&i>=0&&i<=Math.PI?-1:1;let r=0;return e?r=n*Math.PI/2:o===-1&&(r=Math.PI),{configuredRotation:a,defaultRotation:r,parallelFlipFlag:n,regularFlipFlag:o}}function A7(t,e){return t??(e?0:10)}function C7(t,e,i,s){return t&&!e?i*s===-1?"top":"bottom":"middle"}function L7(t,e,i,s,a){const n=e>0&&e<=Math.PI,o=i>0&&i<=Math.PI,r=n||o?-1:1;if(t)if(e||i){if(s*r===-1)return"end"}else return"center";else if(s*a===-1)return"end";return"start"}function uL(t,e){if(t!=null){if(typeof t=="string")return t;if(No(t)&&e!=null)return t[Ml(e)]}}function w7(t,e,i,s,a){const n=uL(t.format,s)??(typeof t.format=="string"?t.format:void 0);if(n==null)return{width:0,height:0};const o=Pu(n),r=s?Gm(s):void 0,l=uL(e?.format,r),c=l?Pu(l):o,h=new Date(i[0]),u=new Date(i[i.length-1]),d=r?Kn(r,new Date(i[0]),new Date(i[i.length-1]),{extend:!0}):void 0;let p=0,g=0;if(o!=null){let f,x;d!=null&&d.length>1?(f=d[0],x=d[1]):(f=h,x=u);const m=Kn(s,f,x,{limit:50});for(const b of m){const v=o(b),{width:M,height:D}=a.measureLines(v);p=Math.max(p,M),g=Math.max(g,D)}}if(c!=null&&d!=null)for(const f of d){const x=c(f),{width:m,height:b}=a.measureLines(x);p=Math.max(p,m),g=Math.max(g,b)}return{width:Math.ceil(p),height:Math.ceil(g)}}function T7(t,e,i,s){const a=[];for(const{tickLabel:n,translation:o}of t){if(!n)continue;const{x:r,y:l}=i.transformBBox(new gt(e,o,0,0)),{width:c,height:h}=s.measureLines(n);a.push({point:{x:r,y:l},label:{text:n,width:c,height:h}})}return a}function N7({width:t,height:e,spacing:i},s,a){const n=[];for(const o of[0,i]){const{x:r,y:l}=a.transformBBox(new gt(s,o,0,0));n.push({point:{x:r,y:l},label:{text:void 0,width:t,height:e}})}return n}var Li,Vo=I({"packages/ag-charts-community/src/chart/label.ts"(){"use strict";R(),Wt(),$i(),vt(),Ar(),Uv(),Cm(),Li=class extends Nt{constructor(){super(...arguments),this.enabled=!0,this._cachedFormatter=void 0}formatValue(t,e,i,s){const{formatter:a,format:n}=this;let o;if(a!=null&&(o??(o=t(a,s))),n!=null){let r=this._cachedFormatter;(r==null||r.type!==e||r.format!==n)&&(r={type:e,format:n,formatter:_u.getFormatter(e,n)},this._cachedFormatter=r),o??(o=r.formatter?.(i))}return o!=null?String(o):void 0}},S([k],Li.prototype,"enabled",2),S([k],Li.prototype,"color",2),S([k],Li.prototype,"fontStyle",2),S([k],Li.prototype,"fontWeight",2),S([k],Li.prototype,"fontSize",2),S([k],Li.prototype,"fontFamily",2),S([k],Li.prototype,"formatter",2),S([k],Li.prototype,"format",2)}});function vz(t,e=0){const i=[];for(const s of t){const{x:a,y:n}=s.point;let{width:o,height:r}=s.label;if(o+=e,r+=e,i.some(l=>kI(l,a,n,o,r)))return!0;i.push({x:a,y:n,width:o,height:r})}return!1}function O7(t,e,i,s){if(t==null)return e;const a=e[0].valueOf(),n=e[1].valueOf();if(typeof t!="number"){const r=e[0],l=typeof t=="string"?{unit:t,epoch:r}:{...t,epoch:r};return Kn(l,e[0],e[1],{visibleRange:i,extend:s})}const o=[];for(let r=a;r<=n;r+=t)o.push(new Date(r));return o}function Sz(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i+=1)if(t[i]?.valueOf()!==e[i]?.valueOf())return!1;return!0}function P7(t){if(t.length<2)return 1/0;let e=0,i=t[0].translation;for(let s=1;s<t.length;s++){const a=t[s].translation,n=Math.abs(a-i);e=Math.max(e,n),i=a}return e}var Mz,dL,Dz=I({"packages/ag-charts-community/src/chart/axis/axisTickGenerator.ts"(){"use strict";R(),zu(),Bs(),Fu(),rL(),DS(),AS(),eE(),$i(),JC(),Gn(),k7(),hL(),ln(),Av(),Rc(),Ar(),Vo(),Mz=new Date(1970,0,4),dL=class{constructor(t){this.axis=t}estimateTickCount(t,e,i,s,a){const{scale:n}=this.axis,{defaultTickCount:o}=n;return mz(Nm(t),Nm(e),s,a,o,i)}filterTicks(t,e){const{minSpacing:i,maxSpacing:s}=this.axis.interval,n=i!=null||s!=null?Math.ceil(t.length/e):2,o=t.length%n?-1:0;return t.filter((r,l)=>(l+o)%n===0)}generateTicks({range:t,domain:e,reverse:i,primaryTickCount:s,defaultTickMinSpacing:a,visibleRange:n,niceMode:o,parallelFlipRotation:r,regularFlipRotation:l,labelX:c,sideFlag:h,removeOverflowLabels:u,removeOverflowThreshold:d=0,sizeLimit:p}){const{scale:g,label:f,primaryLabel:x,interval:{minSpacing:m,maxSpacing:b}}=this.axis,{parallel:v,fontFamily:M,fontSize:D,fontStyle:L,fontWeight:C}=f,A=s!==void 0,{defaultRotation:T,configuredRotation:N,parallelFlipFlag:O,regularFlipFlag:E}=I7(f.rotation,v,l,r),{maxTickCount:z}=this.estimateTickCount(t,n,a,m,b),F=!(me.is(g)||Pa.is(g))||isNaN(z)?10:z,V=C7(v,N,h,O),G={fontFamily:M,fontSize:D,fontStyle:L,fontWeight:C},H=Dr.getMeasurer({font:G}),$=f.enabled&&f.avoidCollisions,W=N+T,j=new vr,U=xt=>{const kt=W+xt;vr.updateTransformMatrix(j,1,1,kt,0,0)},Z=({ticks:xt},kt)=>(U(kt),T7(xt,c,j,H)),X=(xt,kt)=>{const{niceDomain:Dt,ticks:St,timeInterval:Xt}=xt;if(Xt==null)return[];U(kt);const ke=P7(St),{width:ce,height:Ot}=w7(f,x,Dt??e,Xt,H);return N7({width:ce,height:Ot,spacing:ke},c,j)},q=(xt,kt)=>{if(!$)return!1;const Dt=N!==0||kt!==0,St=A7(f.minSpacing,Dt);return vz(X(xt,kt),St)||vz(Z(xt,kt),St)};let tt={tickDomain:[],ticks:[],rawTicks:[],rawTickCount:void 0,timeInterval:void 0,fractionDigits:0,niceDomain:void 0},J=0,at=0,et=!0,it=!1;for(;!it&&et&&J<=F;){at=0;for(const xt of this.getTickStrategies({domain:e,range:t,reverse:i,niceMode:o,secondaryAxis:A,index:J,sizeLimit:p}))({tickData:tt,index:J,autoRotation:at,terminate:it}=xt({index:J,tickData:tt,terminate:it,primaryTickCount:s,defaultTickMinSpacing:a,visibleRange:n,labelsOverlap(){return q(tt,at)}}));et=q(tt,at)}const ct=L7(v,N,at,h,E),ht=N+at;if(u&&tt.ticks.length>2){const xt=Z(tt,at),kt=tt.ticks.at(-1),Dt=xt.at(-1);if(kt!=null&&Dt!=null&&kt.translation+Dt.label.width/2>t[1]+d){kt.tickLabel=void 0;const St=tt.ticks[0];St.translation===0&&n[0]===0&&n[1]===1&&(St.tickLabel=void 0)}}return{tickData:tt,rotation:ht,textBaseline:V,textAlign:ct}}getTickStrategies({domain:t,range:e,reverse:i,niceMode:s,index:a,secondaryAxis:n,sizeLimit:o}){const{scale:r,label:l,interval:c}=this.axis,{minSpacing:h}=c,u=me.is(r)||Pa.is(r),d=l.enabled&&l.avoidCollisions,p=!u&&a!==0&&d,g=l.autoRotate===!0&&l.rotation===void 0,f=[];let x;c.values?x=3:n?x=1:p?x=2:x=0;const m=({index:b,tickData:v,primaryTickCount:M,defaultTickMinSpacing:D,visibleRange:L,terminate:C})=>this.createTickData(t,e,i,s,L,M,D,x,b,v,C,o);if(f.push(m),!u&&h!=null){const b=({index:v,tickData:M,primaryTickCount:D,defaultTickMinSpacing:L,visibleRange:C,terminate:A})=>this.createTickData(t,e,i,s,C,D,L,2,v,M,A,o);f.push(b)}if(d&&g){const b=({index:v,tickData:M,labelsOverlap:D,terminate:L})=>({index:v,tickData:M,autoRotation:D()?gl(l.autoRotateAngle):0,terminate:L});f.push(b)}return f}createTickData(t,e,i,s,a,n,o,r,l,c,h,u){const{scale:d,interval:p}=this.axis,{step:g,values:f,minSpacing:x,maxSpacing:m}=p,{maxTickCount:b,minTickCount:v,tickCount:M}=this.estimateTickCount(e,a,o,x,m),D=me.is(d)||Pa.is(d),L=!D||isNaN(b)?10:b,C=O=>D?Math.max(M-O,v):b,A=c.rawTicks,T=g==null&&f==null&&C(l)>v&&(D||r===2),N={domain:t,range:e,reverse:i,niceMode:s,visibleRange:a,primaryTickCount:n,tickGenerationType:r,previousTicks:A,minTickCount:v,maxTickCount:b,tickCount:0,sizeLimit:u};if(N.tickCount=C(l),c=this.getTicks(N),T&&Sz(c.rawTicks,A)){let O=l,E=L;for(;O<=E;)l=(O+E)/2|0,N.tickCount=C(l),c=this.getTicks(N),Sz(c.rawTicks,A)?O=l+1:E=l-1}return l+=1,h||(h=g!=null||f!=null),{tickData:c,index:l,autoRotation:0,terminate:h}}getTimeIntervalTicks(t,e,i,s){const a=Gm(i);if(a==null)return;const{scale:n}=this.axis;if(!Bc.is(n)&&!Pa.is(n))return;s&&(t=[1-t[1],1-t[0]]);const o=Math.min(n.domain[0].valueOf(),n.domain[n.domain.length-1].valueOf()),r=Math.max(n.domain[0].valueOf(),n.domain[n.domain.length-1].valueOf());let[l,c]=eL(new Date(o),new Date(r),t);l=Un(a,l),l.valueOf()>=o&&(l=oz(a,l)),c=nz(a,c),c.valueOf()<=r&&(c=rz(a,c));const h=Kn(a,l,c),u=un(i),d=Fo.is(n)&&n.interval!=null&&un(n.interval)<u;let p,g=new Set;if(Bc.is(n)||Fo.is(n)){p=[];const f={...e,interval:i},x=!Fo.is(n)||d;for(let m=0;m<h.length-1;m+=1){const b=h[m],v=h[m+1],M=m===h.length-2,D=v.valueOf()-b.valueOf(),L=[Math.max((o-b.valueOf())/D,0),Math.min((r-b.valueOf())/D,1)],C=x?O7(f.interval,[b,v],L,!0):n.ticks(f,[b,v],L,!0)?.ticks??[];if(t_(C,O=>O.valueOf()<b.valueOf()),M||e_(C,O=>x?O.valueOf()+u>v.valueOf():O.valueOf()>=v.valueOf()),C.length===0)continue;const A=C[0],T=gS(A,b);(x?T===0:T<=u)&&g.add(p.length),p.push(...C)}}else if(kS.is(n)){p=n.ticks(e,void 0,t,!0)?.ticks??[];let f=0;for(let x=0;x<p.length;x++){const m=p[x];let b=!1;for(;f<h.length&&gS(h[f],m)<=0;)b=!0,f++;b&&g.add(x)}}else p=[];return(g.size===0||g.size===1&&g.has(0))&&(g=void 0),{ticks:p,tickCount:void 0,primaryTicksIndices:g,interpolate:d}}getTicks({domain:t,range:e,reverse:i,niceMode:s,visibleRange:a,tickGenerationType:n,previousTicks:o,tickCount:r,minTickCount:l,maxTickCount:c,primaryTickCount:h,sizeLimit:u=1/0}){const{axis:d}=this,{label:p,primaryLabel:g,scale:f,interval:x}=d,m={nice:s===0,interval:x.step,tickCount:r,minTickCount:l,maxTickCount:c},b={...m,nice:s===0||s===1};let v;n===1&&h!=null&&me.is(f)&&(v=x7(f,t,h,i,a));const M=s===0?v?.domain??f.niceDomain(m,t):t;let D=M,L,C,A,T,N=!1;const O=g?.enabled===!0&&b.interval==null,E=f.domain;switch(f.domain=M,n){case 3:if(D=x.values,L=x.values,C=L.length,N=Fo.is(f),me.is(f)){const[q,tt]=ls(M.map(Number));L=L.filter(J=>Number(J)>=q&&Number(J)<=tt).sort((J,at)=>Number(J)-Number(at))}break;case 1:if(v)L=v.ticks,C=v.ticks.length;else{const q=f.ticks(b,M,a);L=q?.ticks??[],C=q?.count}break;case 2:L=this.filterTicks(o,r),C=void 0;break;default:{if(M.length>0&&b.interval==null&&(Fo.is(f)||O&&(Bc.is(f)||kS.is(f)))){const J=M,at=Math.min(J[0].valueOf(),J[J.length-1].valueOf()),et=Math.max(J[0].valueOf(),J[J.length-1].valueOf());A=xS(at,et,r,l,c,{weekStart:g==null?Mz:void 0,primaryOnly:!0})}const q=Fo.is(f)?f.interval:void 0;q!=null&&A!=null&&un(q)>=un(A)&&(A=q);const tt=A?this.getTimeIntervalTicks(a,b,A,i):void 0;if(tt)({ticks:L,tickCount:C,primaryTicksIndices:T,interpolate:N}=tt);else{const J=Fo.is(f)&&b.interval==null&&A!=null?{...b,interval:A}:b,at=f.ticks(J,M,a);L=at?.ticks??[],C=at?.count,(Bc.is(f)||Pa.is(f))&&(A??(A=b.interval??at?.timeInterval))}}}const z=L.reduce((q,tt)=>Math.max(q,typeof tt=="number"?Fb(tt):0),0);O||(T=void 0);const B=O?"component":"long",F=p.enabled?d.tickFormatter(M,L,!1,z,A,B):void 0,V=A!=null?Gm(A):void 0,G=O?d.tickFormatter(M,L,!0,z,V,B):void 0,H=(f.bandwidth??0)/2,$=[],W=Bc.is(f)||Pa.is(f),j=cL(),U=d.direction==="y",Z=(wc.is(f)?f.bandwidth:null)??1/0,X={font:p,maxWidth:U?u:Z,maxHeight:U?Z:u,overflow:p.truncate?"ellipsis":"hide",textWrap:p.wrapping};for(let q=0;q<L.length;q++){const tt=L[q],J=f.convert(tt,{interpolate:N})+H;if(e.length>0&&!d.inRange(J,.001))continue;const at=T?.has(q)??!1;let et=at?G?.(tt,q):F?.(tt,q);p.avoidCollisions&&(et=bm.wrapText(et??String(tt),X)||et);let it;const ct=W?tt?.valueOf():void 0;Number.isFinite(ct)?it=j(`v:${ct}`):it=j(`l:${et}`),$.push({tick:tt,tickId:it,tickLabel:et,translation:Math.floor(J),primary:at})}return f.domain=E,{tickDomain:D,rawTicks:L,rawTickCount:C,fractionDigits:z,timeInterval:A,ticks:$,niceDomain:M}}}}}),qp,_7=I({"packages/ag-charts-community/src/chart/axis/cartesianAxisLabel.ts"(){"use strict";vt(),hS(),qp=class extends Ui{constructor(){super(...arguments),this.autoRotateAngle=335,this.wrapping="never",this.truncate=!1}},S([k],qp.prototype,"autoRotate",2),S([k],qp.prototype,"autoRotateAngle",2),S([k],qp.prototype,"wrapping",2),S([k],qp.prototype,"truncate",2)}}),Um,Qp,Km=I({"packages/ag-charts-community/src/chart/axis/cartesianAxis.ts"(){"use strict";R(),zs(),Hu(),Bs(),Wt(),Oe(),Nc(),$u(),cn(),$i(),Gn(),vt(),Pm(),ln(),Lu(),XC(),Dz(),YC(),_7(),Um=class eZ extends pS{constructor(e,i){super(e,i),this.maxThicknessRatio=.3,this.headingLabelGroup=this.axisGroup.appendChild(new vs({name:`${this.id}-Axis-heading`})),this.lineNodeGroup=this.axisGroup.appendChild(new vs({name:`${this.id}-Axis-line`})),this.lineNode=this.lineNodeGroup.appendChild(new pa({zIndex:1})),this.tickLineGroupSelection=Ci.select(this.tickLineGroup,pa,!1),this.gridLineGroupSelection=Ci.select(this.gridLineGroup,pa,!1),this.tempText=new Cu({debugDirty:!1}),this.tempCaption=new Pe,this.tickGenerator=new dL(this),this.animationManager=e.animationManager,this.animationState=new Up("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:a=>this.animateReadyUpdate(a),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this.headingLabelGroup.appendChild(this.title.caption.node);let s;this.cleanup.register(e.eventsHub.on("layout:complete",a=>{const n=[a.chart.width,a.chart.height];s!=null&&!yr(n,s)&&this.animationState.transition("resize"),s=n}),this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}static is(e){return e instanceof eZ}get horizontal(){return this.position==="top"||this.position==="bottom"}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}resetAnimation(e){e==="initial"&&this.animationState.transition("reset")}get direction(){return this.position==="top"||this.position==="bottom"?"x":"y"}createAxisContext(){return{...super.createAxisContext(),position:this.position}}createLabel(){return new qp}updateDirection(){switch(this.position){case"top":this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.label.mirrored=!1,this.label.parallel=!1;break}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}calculateLayout(e,i){return this.updateDirection(),super.calculateLayout(e,i)}layoutCrossLines(){const e=this.isAnySeriesActive();this.crossLines.forEach(i=>{i.calculateLayout?.(e)})}calculateTickLayout(e,i,s,a){const n=this.label.getSideFlag(),o=this.horizontal?-.5*Math.PI:0,r=Ai(o),l=Ai(o-Math.PI/2),c=n*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding);if(i===2&&this.label.enabled===!1&&this.tick.enabled===!1&&this.gridLine.enabled===!1){const{bbox:Z,spacing:X}=this.tickBBox(e,[],[]);return{ticks:[],rawTickCount:0,tickDomain:e,niceDomain:e,fractionDigits:0,timeInterval:void 0,bbox:Z,layout:{ticks:[],tickLines:[],gridLines:[],labels:[],spacing:X}}}const{range:h,reverse:u,defaultTickMinSpacing:d}=this,p=this.horizontal&&me.is(this.scale),g=this.tickGenerator.generateTicks({domain:e,range:h,reverse:u,niceMode:i,visibleRange:s,primaryTickCount:a,defaultTickMinSpacing:d,parallelFlipRotation:r,regularFlipRotation:l,labelX:c,sideFlag:n,removeOverflowLabels:p,removeOverflowThreshold:this.chartLayout?.padding.right,sizeLimit:this.chartLayout?.sizeLimit}),{tickData:f}=g,{ticks:x,tickDomain:m,rawTicks:b,rawTickCount:v,fractionDigits:M,timeInterval:D,niceDomain:L=e}=f,C=x.map(Z=>this.getTickLabelProps(Z,g)),{position:A,horizontal:T,gridPadding:N,gridLength:O}=this,E=A==="bottom"||A==="right"?-1:1,z=N,B=E*O-N,{gridLine:F}=this,V=x.map(({tickId:Z,translation:X},q)=>{const[tt,J,at,et]=T?[X,z,X,B]:[z,X,B,X],{style:it,width:ct}=F,{stroke:ht,lineDash:xt}=it[q%it.length]??{};return{tickId:Z,offset:X,x1:tt,y1:J,x2:at,y2:et,stroke:ht,strokeWidth:ct,lineDash:xt}}),{tick:G,primaryTick:H}=this,$=x.map(({primary:Z,tickId:X,translation:q})=>{const tt=Z&&H?.enabled?H:G,J=-E*this.getTickSize(tt),[at,et,it,ct]=T?[q,0,q,J]:[0,q,J,q],{stroke:ht,width:xt}=tt;return{tickId:X,offset:q,x1:at,y1:et,x2:it,y2:ct,stroke:ht,strokeWidth:xt,lineDash:void 0}}),{bbox:W,spacing:j}=this.tickBBox(m,x,C);return{ticks:b,rawTickCount:v,tickDomain:m,niceDomain:L,fractionDigits:M,timeInterval:D,bbox:W,layout:{ticks:x,gridLines:V,tickLines:$,labels:C,spacing:j}}}update(){this.updateDirection();const e=Array.from(this.tickLabelGroupSelection.nodes(),o=>o.datum.tickId);super.update(),this.tickLineGroup.visible=this.tick.enabled||(this.primaryTick?.enabled??!1),this.tickLabelGroup.visible=this.label.enabled||(this.primaryTick?.enabled??!1);const{tickLayout:i}=this;if(this.updateTitle(this.scale.domain,i?.spacing??0),this.animatable||this.moduleCtx.animationManager.skipCurrentBatch(),i){const{ticks:o}=i;if(this.animationManager.isSkipped())this.resetSelectionNodes();else{const r=o.map(c=>c.tickId),l=r_(e,r);this.animationState.transition("update",l)}}const{enabled:s,stroke:a,width:n}=this.line;this.lineNode.setProperties({stroke:a,strokeWidth:s?n:0}),this.updateTickLines(),this.updateGridLines()}getAxisTransform(){return{translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){super.updatePosition();const e=this.getAxisTransform();this.tickLineGroup.datum=e,this.tickLabelGroup.datum=e,this.lineNodeGroup.datum=e,this.headingLabelGroup.datum=e}getAxisLineCoordinates(){const{horizontal:e}=this,[i,s]=ls(this.range);return e?{x1:i,x2:s,y1:0,y2:0}:{x1:0,x2:0,y1:i,y2:s}}getTickLineBBox(e){const{translation:i}=e,{position:s,primaryTick:a}=this;let n=this.getTickSize();switch(a?.enabled&&(n=Math.max(n,this.getTickSize(a))),s){case"top":return new gt(i,-n,i,n);case"bottom":return new gt(i,0,i,n);case"left":return new gt(-n,i,n,i);case"right":return new gt(0,i,n,i)}}lineNodeBBox(){const{position:e,seriesAreaPadding:i}=this,{y1:s,y2:a}=this.getAxisLineCoordinates(),n=a-s;switch(e){case"top":return new gt(s,-i,n,i);case"bottom":return new gt(s,0,n,i);case"left":return new gt(-i,s,i,n);case"right":return new gt(0,s,i,n)}}titleBBox(e,i){const{tempCaption:s}=this;return s.node.setProperties(this.titleProps(s,e,i)),s.node.getBBox()}tickBBox(e,i,s){const{tick:a,primaryTick:n,label:o,primaryLabel:r,title:l,position:c,horizontal:h,seriesAreaPadding:u}=this,d=[];if(d.push(this.lineNodeBBox()),a.enabled||n?.enabled)for(const x of i)d.push(this.getTickLineBBox(x));const{tempText:p}=this;if(o.enabled)for(const x of s){if(!x.visible)continue;p.setProperties(x);const m=p.getBBox(!1);m&&d.push(m)}if(r?.enabled&&c==="bottom"&&(d.push(new gt(0,we.getLineHeight(o.fontSize)+2,1,this.getTickSize(a)+o.spacing+u)),r.format!=null)){const{format:m}=r,v=(No(m)?Object.values(m):[m]).reduce((M,D)=>Math.max(M,GP(D)),0);d.push(new gt(0,this.getTickSize(n??a)+r.spacing+u,1,v*we.getLineHeight(r.fontSize)+2))}let g=0;if(l.enabled){const x=gt.merge(d);g=h?x.height:x.width,d.push(this.titleBBox(e,g))}return{bbox:gt.merge(d),spacing:g}}titleProps(e,i,s){const{title:a}=this;if(!a.enabled)return e.enabled=!1,{visible:!1,text:"",textBaseline:"bottom",x:0,y:0,rotationCenterX:0,rotationCenterY:0,rotation:0};e.enabled=!0,e.color=a.color,e.fontFamily=a.fontFamily,e.fontSize=a.fontSize,e.fontStyle=a.fontStyle,e.fontWeight=a.fontWeight,e.wrapping=a.wrapping;const n=(a.spacing??0)+s,{range:o}=this,r=(o[0]+o[1])/2;let l,c,h,u;switch(this.position){case"top":l=r,c=-n,h=0,u="bottom";break;case"bottom":l=r,c=n,h=0,u="top";break;case"left":l=-n,c=r,h=-.5*Math.PI,u="bottom";break;case"right":l=n,c=r,h=.5*Math.PI,u="bottom";break}const{formatter:d=g=>g.defaultValue}=a,p=this.callWithContext(d,this.getTitleFormatterParams(i));return e.text=p,{visible:!0,text:p,textBaseline:u,x:l,y:c,rotationCenterX:l,rotationCenterY:c,rotation:h}}getTickLabelProps(e,i){const{horizontal:s,primaryLabel:a,primaryTick:n,seriesAreaPadding:o,scale:r}=this,{tickId:l,tickLabel:c="",translation:h,primary:u}=e,d=u&&a?.enabled?a:this.label,p=u&&n?.enabled?n:this.tick,{rotation:g,textBaseline:f,textAlign:x}=i,{range:m}=r,v=this.label.getSideFlag()*(this.getTickSize(p)+d.spacing+o),M=c!=="",D=s?h:v,L=s?-v:h;return{...this.getLabelStyles({value:c},void 0,d),tickId:l,rotation:g,text:c,textAlign:x,textBaseline:f,visible:M,x:D,y:L,rotationCenterX:D,rotationCenterY:L,range:m}}updateSelections(){if(!this.tickLayout)return;const e=this.getAxisLineCoordinates(),{tickLines:i,gridLines:s,labels:a}=this.tickLayout,n=o=>o.tickId;this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLine.enabled?s:[],void 0,n),this.tickLineGroupSelection.update(i,void 0,n),this.tickLabelGroupSelection.update(a,void 0,n)}updateGridLines(){this.gridLineGroupSelection.each((e,i)=>{e.stroke=i.stroke,e.strokeWidth=i.strokeWidth,e.lineDash=i.lineDash})}updateTickLines(){this.tickLineGroupSelection.each((e,i)=>{e.stroke=i.stroke,e.strokeWidth=i.strokeWidth,e.lineDash=i.lineDash})}updateTitle(e,i){const{caption:s}=this.title,a=this.titleProps(s,e,i);s.node.visible=a.visible,s.node.text=a.text,s.node.textBaseline=a.textBaseline,s.node.datum=a}updateLabels(){this.label.enabled&&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"})}animateReadyUpdate(e){const{animationManager:i}=this.moduleCtx,s=JB(this),a=tz(s);Ue(this.id,"axis-group",i,[this.lineNodeGroup,this.tickLabelGroup,this.tickLineGroup,this.headingLabelGroup],a.group),Ue(this.id,"line",i,[this.lineNode],a.line),Ue(this.id,"line-paths",i,[this.gridLineGroupSelection,this.tickLineGroupSelection],a.tick,(n,o)=>o.tickId,e),Ue(this.id,"tick-labels",i,[this.tickLabelGroupSelection],a.label,(n,o)=>o.tickId,e),Ue(this.id,"title",i,[this.title.caption.node],a.label,(n,o)=>o.tickId,e)}resetSelectionNodes(){cs([this.lineNodeGroup,this.tickLabelGroup,this.tickLineGroup,this.headingLabelGroup],ez()),cs([this.gridLineGroupSelection,this.tickLineGroupSelection],UC()),cs([this.tickLabelGroupSelection],uS()),cs([this.title.caption.node],uS()),cs([this.lineNode],UC())}},S([k],Um.prototype,"thickness",2),S([k],Um.prototype,"maxThicknessRatio",2),S([k],Um.prototype,"position",2),Qp=Um}});function E7(t){return typeof t=="string"&&pL.includes(t)}function R7(t){const e=[],i=[],s=[...pL];for(const a of t)a instanceof Qp&&(E7(a.position)?i.push(a.position):e.push(a));for(const a of e){let n;do n=s.pop();while(n&&i.includes(n));if(n==null)break;a.position=n}}var pL,B7=I({"packages/ag-charts-community/src/chart/mapping/prepareAxis.ts"(){"use strict";Km(),pL=["top","right","bottom","left"]}});function z7(t,e,i){const s=(c,h,u)=>{const d=[c];for(const p of kz)p in h&&h[p]!=null&&d.push(`${p}=${h[p]}`);return u?.seriesGrouping&&d.push(`seriesGrouping.groupId=${u?.seriesGrouping.groupId}`),d.join(";")},a=new Map;let n=0;for(const c of t){const h=s(c.type,c.properties,i?.[n]);a.has(h)||a.set(h,[]),a.get(h)?.push([c,n++])}const o=new Map;n=0;for(const c of e){const h=s(c.type,c,c);o.has(h)||o.set(h,[]),o.get(h)?.push([c,n++])}if(![...a.keys()].some(c=>o.has(c)))return{status:"no-overlap",oldKeys:a.keys(),newKeys:o.keys()};const l=[];for(const[c,h]of o.entries())for(const[u,d]of h){const p=a.get(c);if(p==null||p.length<1){l.push({opts:u,targetIdx:d,idx:d,status:"add"}),a.delete(c);continue}const[g,f]=p.shift(),x=i?.[f]??{},m=Sr(x,u??{}),{groupIndex:b,stackIndex:v}=m?.seriesGrouping??{};b!=null||v!=null?l.push({opts:u,series:g,diff:m,targetIdx:d,idx:f,status:"series-grouping"}):m?l.push({opts:u,series:g,diff:m,targetIdx:d,idx:f,status:"update"}):l.push({opts:u,series:g,targetIdx:d,idx:f,status:"no-op"}),p.length===0&&a.delete(c)}for(const c of a.values())for(const[h,u]of c)l.push({series:h,idx:u,targetIdx:-1,status:"remove"});return{status:"overlap",changes:l}}var kz,F7=I({"packages/ag-charts-community/src/chart/mapping/prepareSeries.ts"(){"use strict";Ta(),kz=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo"]}});function Zu(t){const{series:e}=t;return e?.[0]?.type??"line"}function Iz(t){const e=Zu(t);return Se.isCartesian(e)||Kq(e)}function V7(t){const e=Zu(t);return Se.isPolar(e)||Yq(e)}function Az(t){const e=Zu(t);return Se.isHierarchy(e)||Zq(e)}function Cz(t){const e=Zu(t);return Se.isTopology(e)||Xq(e)}function Lz(t){const e=Zu(t);return Se.isFlowProportion(e)||qq(e)}function wz(t){const e=Zu(t);return Se.isStandalone(e)||Qq(e)}function gL(t){const e=Zu(t);return Se.isGauge(e)||Jq(e)}var Jp=I({"packages/ag-charts-community/src/chart/mapping/types.ts"(){"use strict";Wu(),tS()}}),Tz,G7=I({"packages/ag-charts-community/src/chart/modulesManager.ts"(){"use strict";WC(),vt(),Tz=class extends lS{applyOptions(t){for(const e of this.moduleMap.values())e.module.optionsKey in t&&Tp(e.moduleInstance)&&e.moduleInstance.set(t[e.module.optionsKey])}*legends(){for(const{module:t,moduleInstance:e}of this.moduleMap.values())t.type==="legend"&&(yield{legendType:t.identifier,legend:e})}}}}),CS,fL,zc,mL=I({"packages/ag-charts-community/src/chart/overlay/overlay.ts"(){"use strict";R(),Du(),vt(),vt(),CS="ag-charts-overlay",fL="ag-charts-dark-overlay",zc=class extends Nt{constructor(t,e){super(),this.className=t,this.defaultMessageId=e,this.enabled=!0}getText(t){return t.t(this.text??this.defaultMessageId)}getElement(t,e,i,s){if(this.content?.remove(),this.focusBox=s,this.renderer){const a={},n=fl(t,this.renderer,a);if(n instanceof HTMLElement)this.content=n;else{const o=zt("div");o.innerHTML=n;const{firstElementChild:r}=o;r instanceof HTMLElement&&o.childElementCount===1?this.content=r:this.content=o}}else{const a=zt("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",fontFamily:"var(--ag-charts-font-family)",fontSize:"var(--ag-charts-font-size)",fontWeight:"var(--ag-charts-font-weight)"});a.innerText=this.getText(i),this.content=a,e?.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(n){a.style.opacity=String(n)},onStop(){a.style.opacity="1"}})}return this.content}removeElement(t=()=>this.content?.remove(),e){if(this.content){if(e){const{content:i}=this;e.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(s){i.style.opacity=String(s)},onStop(){t?.()}})}else t?.();this.content=void 0,this.focusBox=void 0}}},S([k],zc.prototype,"enabled",2),S([k],zc.prototype,"text",2),S([k],zc.prototype,"renderer",2)}}),Xu,j7=I({"packages/ag-charts-community/src/chart/overlay/chartOverlays.ts"(){"use strict";vt(),vt(),mL(),Xu=class extends Nt{constructor(){super(...arguments),this.darkTheme=!1,this.loading=new zc("ag-charts-loading-overlay","overlayLoadingData"),this.noData=new zc("ag-charts-no-data-overlay","overlayNoData"),this.noVisibleSeries=new zc("ag-charts-no-visible-series","overlayNoVisibleSeries"),this.unsupportedBrowser=new zc("ag-charts-unsupported-browser","overlayUnsupportedBrowser")}getFocusInfo(t){for(const e of[this.loading,this.noData,this.noVisibleSeries,this.unsupportedBrowser])if(e.focusBox!==void 0)return{text:e.getText(t),rect:e.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement(),this.unsupportedBrowser.removeElement()}},S([k],Xu.prototype,"darkTheme",2),S([k],Xu.prototype,"loading",2),S([k],Xu.prototype,"noData",2),S([k],Xu.prototype,"noVisibleSeries",2),S([k],Xu.prototype,"unsupportedBrowser",2)}});function W7(t,e){const{animationDuration:i}=Wp.add,s=i*e,a=zt("div",`${CS}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${s}ms linear 50ms both`}),n=zt("span",{width:"45px",height:"40px",backgroundImage:["linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)"].join(""),backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),o=zt("p",{marginTop:"1em"});o.innerText=t;const r=zt("div",`${CS}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),l=zt("style");return l.innerText=["@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } }","@keyframes ag-charts-loading-matrix {","0% { background-position: 0% 0%, 50% 0%, 100% 0%; }","100% { background-position: 0% 100%, 50% 100%, 100% 100%; }","}"].join(" "),a.replaceChildren(l,n,o,r),a}var H7=I({"packages/ag-charts-community/src/chart/overlay/loadingSpinner.ts"(){"use strict";R(),Ru(),mL()}}),yL,Cr,Lr,Dl,Ym,xL,pn,_e,ga,tg,Ea,kl=I({"packages/ag-charts-community/src/chart/series/seriesProperties.ts"(){"use strict";R(),Pt(),vt(),vt(),yL=(t=>(t[t.None=0]="None",t[t.Item=1]="Item",t[t.Series=2]="Series",t[t.OtherSeries=3]="OtherSeries",t[t.OtherItem=4]="OtherItem",t))(yL||{}),Cr=class extends Nt{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}},S([k],Cr.prototype,"fill",2),S([k],Cr.prototype,"fillOpacity",2),S([k],Cr.prototype,"stroke",2),S([k],Cr.prototype,"strokeWidth",2),S([k],Cr.prototype,"strokeOpacity",2),S([k],Cr.prototype,"lineDash",2),S([k],Cr.prototype,"lineDashOffset",2),Lr=class extends Nt{},S([k],Lr.prototype,"fill",2),S([k],Lr.prototype,"fillOpacity",2),S([k],Lr.prototype,"stroke",2),S([k],Lr.prototype,"strokeWidth",2),S([k],Lr.prototype,"strokeOpacity",2),S([k],Lr.prototype,"lineDash",2),S([k],Lr.prototype,"lineDashOffset",2),S([k],Lr.prototype,"opacity",2),Dl=class extends Nt{constructor(){super(...arguments),this.enabled=!0,this.range="tooltip",this.highlightedItem={},this.unhighlightedItem={},this.highlightedSeries={},this.unhighlightedSeries={}}getItemHighlightStyle(t){switch(t){case 1:return this.highlightedItem;case 4:return this.unhighlightedItem;case 2:return this.highlightedSeries;case 3:return this.unhighlightedSeries}}getSeriesHighlightStyle(t){switch(t){case 1:case 4:case 2:return this.highlightedSeries;case 3:return this.unhighlightedSeries}}getStyle(t){return se(this.getItemHighlightStyle(t),this.getSeriesHighlightStyle(t))}},S([k],Dl.prototype,"enabled",2),S([k],Dl.prototype,"range",2),S([k],Dl.prototype,"highlightedItem",2),S([k],Dl.prototype,"unhighlightedItem",2),S([k],Dl.prototype,"highlightedSeries",2),S([k],Dl.prototype,"unhighlightedSeries",2),Ym=class extends Nt{},S([k],Ym.prototype,"strokeWidth",2),S([k],Ym.prototype,"dimOpacity",2),S([k],Ym.prototype,"enabled",2),xL=class extends Nt{constructor(){super(...arguments),this.color="black"}},S([k],xL.prototype,"color",2),pn=class extends Nt{constructor(){super(...arguments),this.type="gradient",this.colorStops=[],this.bounds="item",this.gradient="linear",this.rotation=0,this.reverse=!1}},S([k],pn.prototype,"type",2),S([k],pn.prototype,"colorStops",2),S([k],pn.prototype,"bounds",2),S([k],pn.prototype,"gradient",2),S([k],pn.prototype,"rotation",2),S([k],pn.prototype,"reverse",2),_e=class extends Nt{constructor(){super(...arguments),this.type="pattern",this.colorStops=[],this.bounds="item",this.gradient="linear",this.rotation=0,this.scale=1,this.reverse=!1,this.pattern="forward-slanted-lines",this.width=26,this.height=26,this.padding=6,this.fill="black",this.fillOpacity=1,this.backgroundFill="white",this.backgroundFillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0}},S([k],_e.prototype,"type",2),S([k],_e.prototype,"colorStops",2),S([k],_e.prototype,"bounds",2),S([k],_e.prototype,"gradient",2),S([k],_e.prototype,"rotation",2),S([k],_e.prototype,"scale",2),S([k],_e.prototype,"reverse",2),S([k],_e.prototype,"path",2),S([k],_e.prototype,"pattern",2),S([k],_e.prototype,"width",2),S([k],_e.prototype,"height",2),S([k],_e.prototype,"padding",2),S([k],_e.prototype,"fill",2),S([k],_e.prototype,"fillOpacity",2),S([k],_e.prototype,"backgroundFill",2),S([k],_e.prototype,"backgroundFillOpacity",2),S([k],_e.prototype,"stroke",2),S([k],_e.prototype,"strokeOpacity",2),S([k],_e.prototype,"strokeWidth",2),ga=class extends Nt{constructor(){super(...arguments),this.type="image",this.url="",this.rotation=0,this.scale=1,this.backgroundFill="black",this.backgroundFillOpacity=1,this.repeat="no-repeat",this.fit="contain"}},S([k],ga.prototype,"type",2),S([k],ga.prototype,"url",2),S([k],ga.prototype,"rotation",2),S([k],ga.prototype,"scale",2),S([k],ga.prototype,"backgroundFill",2),S([k],ga.prototype,"backgroundFillOpacity",2),S([k],ga.prototype,"repeat",2),S([k],ga.prototype,"fit",2),tg=class extends Nt{constructor(t=!0){super(),this.deprecated=t,this.item=new Cr,this.series=new Ym,this.text=new xL}set(t){return this.deprecated&&ut.warnOnce("highlightStyle is deprecated, use highlight instead."),super.set(t)}},S([k],tg.prototype,"item",2),S([k],tg.prototype,"series",2),S([k],tg.prototype,"text",2),Ea=class extends Nt{constructor(){super(...arguments),this.visible=!0,this.focusPriority=1/0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlight=new Dl,this.highlightStyle=new tg}handleUnknownProperties(t,e){"context"in e&&(this.context=e.context,t.delete("context"))}},S([k],Ea.prototype,"id",2),S([k],Ea.prototype,"visible",2),S([k],Ea.prototype,"focusPriority",2),S([k],Ea.prototype,"showInLegend",2),S([k],Ea.prototype,"cursor",2),S([k],Ea.prototype,"nodeClickRange",2),S([k],Ea.prototype,"highlight",2),S([k],Ea.prototype,"highlightStyle",2)}}),bL,vL,$7=I({"packages/ag-charts-community/src/chart/series/seriesZIndexMap.ts"(){"use strict";bL=(t=>(t[t.BACKGROUND=0]="BACKGROUND",t[t.ANY_CONTENT=1]="ANY_CONTENT",t))(bL||{}),vL=(t=>(t[t.FOREGROUND=0]="FOREGROUND",t[t.HIGHLIGHT=1]="HIGHLIGHT",t[t.LABEL=2]="LABEL",t))(vL||{})}});function qu(t,e,i,s){if(rn(t))return{type:"gradient",gradient:t.gradient??e.gradient,colorStops:t.colorStops??e.colorStops,bounds:t.bounds??e.bounds,rotation:t.rotation??e.rotation,reverse:t.reverse??e.reverse};if(Sc(t)){const a=t.pattern??i.pattern;let n=t.strokeWidth;a==="backward-slanted-lines"||a==="forward-slanted-lines"||a==="horizontal-lines"||a==="vertical-lines"?n??(n=i.strokeWidth):n??(n=0);const o=t.width??t.height??i.width,r=t.height??t.width??i.height;return{type:"pattern",pattern:a,width:o,height:r,path:t.path,padding:t.padding??i.padding,fill:t.fill??i.fill,fillOpacity:t.fillOpacity??i.fillOpacity,backgroundFill:t.backgroundFill??i.backgroundFill,backgroundFillOpacity:t.backgroundFillOpacity??i.backgroundFillOpacity,stroke:t.stroke??i.stroke,strokeOpacity:t.strokeOpacity??i.strokeOpacity,strokeWidth:n,rotation:t.rotation??i.rotation,scale:t.scale??i.scale}}return xu(t)?{type:"image",url:t.url,width:t.width,height:t.height,backgroundFill:t.backgroundFill??s.backgroundFill,backgroundFillOpacity:t.backgroundFillOpacity??s.backgroundFillOpacity,rotation:t.rotation??s.rotation,repeat:t.repeat??s.repeat,fit:t.fit??s.fit}:t}function wr(t,e,i,s){return!rn(t?.fill)&&!Sc(t?.fill)&&!xu(t?.fill)?t:{...t,fill:qu(t.fill,e,i,s)}}function Nz(t,e,i,s){i==null||!rn(e)||e.bounds==null||e.bounds==="item"?t.fillBBox=void 0:t.fillBBox=i[e.bounds],t.fillParams=s}function Il(t,e,i,s,a){const n=i?.opacity??e.opacity??1,o=i?.fill??e.fill;t.fill=o,Nz(t,i?.fill??e.fill,s,a),t.fillOpacity=(i?.fillOpacity??e.fillOpacity??1)*n,t.stroke=i?.stroke??e.stroke,t.strokeOpacity=(i?.strokeOpacity??e.strokeOpacity??1)*n,t.strokeWidth=i?.strokeWidth??e.strokeWidth??0,t.lineDash=i?.lineDash??e.lineDash,t.lineDashOffset=i?.lineDashOffset??e.lineDashOffset??0}var Al=I({"packages/ag-charts-community/src/chart/series/shapeUtil.ts"(){"use strict";bu()}});function Oz(t){switch(t){case"x":return"x";case"y":return"y";case"angle":return"angle";case"radius":return"radius"}}function SL(t){switch(t){case"x":return"x";case"y":return"y";case"angle":return"angle";case"radius":return"radius"}}var ML,Pz,_z,eg,LS,Zm,Qu=I({"packages/ag-charts-community/src/chart/series/series.ts"(){"use strict";R(),WC(),Oe(),Du(),Ta(),kE(),Ub(),Pt(),gE(),ta(),Al(),ML=(t=>(t[t.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",t[t.NEAREST_NODE=1]="NEAREST_NODE",t[t.AXIS_ALIGNED=2]="AXIS_ALIGNED",t))(ML||{}),Pz=.25,_z=.125,eg=class{constructor(t,e,i,s){this.type=t,this.event=e,this.defaultPrevented=!1,this.datum=i.datum,this.seriesId=s.id}preventDefault(){this.defaultPrevented=!0}},LS=class{constructor(t,e,i){this.series=t,this.seriesGrouping=e,this.oldGrouping=i,this.type="groupingChanged"}},Zm=class extends bA{constructor(t){super(),this.cleanup=new Fe,this.usesPlacedLabels=!1,this.seriesGrouping=void 0,this.NodeEvent=eg,this.internalId=zn(this),this.contentGroup=new vs({name:`${this.internalId}-content`,zIndex:1}),this.highlightGroup=new vs({name:`${this.internalId}-highlight`,zIndex:1}),this.annotationGroup=new vs({name:`${this.internalId}-annotation`}),this.labelGroup=new vs({name:`${this.internalId}-series-labels`}),this.axes={},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new lS,this.datumCallbackCache=new Map,this.connectsToYAxis=!1,this._declarationOrder=-1,this.events=new gr,this._pickNodeCache=new Mv,this.fireEventWrapper=r=>super.fireEvent(r);const{moduleCtx:e,pickModes:i,propertyKeys:s={},propertyNames:a={},canHaveAxes:n=!1,usesPlacedLabels:o=!1}=t;this.ctx=e,this.propertyKeys=s,this.propertyNames=a,this.canHaveAxes=n,this.usesPlacedLabels=o,this.highlightGroup=new vs({name:`${this.internalId}-highlight`}),this.highlightNode=this.highlightGroup.appendChild(new Lt({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new Lt({name:"highlightLabel",zIndex:10})),this.pickModes=i}get pickModeAxis(){return"main"}get id(){return this.properties?.id??this.internalId}get type(){return this.constructor.type??""}get focusable(){return!0}get data(){return this._data??this._chartData}set visible(t){this.properties.visible=t,this.ctx.legendManager.toggleItem(t,this.id),this.ctx.legendManager.update(),this.visibleMaybeChanged()}get visible(){return this.ctx.legendManager.getSeriesEnabled(this.id)??this.properties.visible}get hasData(){return this.data!=null&&this.data.length>0}get tooltipEnabled(){return this.properties.tooltip?.enabled}onDataChange(){this.nodeDataRefresh=!0,this._pickNodeCache.clear()}setOptionsData(t){this._data=t,this.onDataChange()}setChartData(t){this._chartData=t,this.data===t&&this.onDataChange()}onSeriesGroupingChange(t,e){const{internalId:i,type:s,visible:a}=this;t&&this.ctx.seriesStateManager.deregisterSeries(this),e&&this.ctx.seriesStateManager.registerSeries({internalId:i,type:s,visible:a,seriesGrouping:e}),this.fireEvent(new LS(this,e,t))}getBandScalePadding(){return{inner:1,outer:0}}attachSeries(t,e,i){t.appendChild(this.contentGroup),e.appendChild(this.highlightGroup),e.appendChild(this.labelGroup),i?.appendChild(this.annotationGroup)}detachSeries(t,e,i){t?.removeChild(this.contentGroup),e.removeChild(this.highlightGroup),e.removeChild(this.labelGroup),i?.removeChild(this.annotationGroup)}setSeriesIndex(t){return t===this._declarationOrder?!1:(this._declarationOrder=t,this.contentGroup.zIndex=[1,t,0],this.highlightGroup.zIndex=[1,t,1],this.labelGroup.zIndex=[1,t,2],this.annotationGroup.zIndex=t,!0)}renderToOffscreenCanvas(){return!1}addEventListener(t,e){return super.addEventListener(t,e)}removeEventListener(t,e){return super.removeEventListener(t,e)}hasEventListener(t){return super.hasEventListener(t)}addChartEventListeners(){}updatedDomains(){}destroy(){this.cleanup.flush(),this.resetDatumCallbackCache(),this.ctx.seriesStateManager.deregisterSeries(this)}getPropertyValues(t,e){const i=Oz(t),s=i!=null?SL(this.resolveKeyDirection(i)):t,a=e?.[s],n=[];if(!a)return n;const o=(...r)=>{for(const l of r)Array.isArray(l)?o(...l):typeof l=="object"?o(...Object.values(l)):n.push(l)};return o(...a.map(r=>this.properties[r])),n}getKeys(t){return this.getPropertyValues(SL(t),this.propertyKeys)}getKeyProperties(t){return this.propertyKeys[this.resolveKeyDirection(t)]??[]}getNames(t){return this.getPropertyValues(SL(t),this.propertyNames)}getFormatterContext(t){const{id:e}=this,i=this.getPropertyValues(t,this.propertyKeys),s=this.getPropertyValues(t,this.propertyNames),a=[];for(let n=0;n<i.length;n++)a.push({seriesId:e,key:i[n],name:s[n]});return a}resolveKeyDirection(t){return t}getDomain(t){const e=this.getSeriesDomain(t),i=this.moduleMap.mapModules(s=>s.getDomain(t)).flat();return i.length!==0?e.concat(i):e}getRange(t,e){return this.getSeriesRange(t,e)}getVisibleItems(t,e,i){return 1/0}markNodeDataDirty(){this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.visibleMaybeChanged()}visibleMaybeChanged(){this.ctx.seriesStateManager.updateSeries(this)}getOpacity(){if(!this.properties.highlight)return 1;const{opacity:e=1}=this.getHighlightStyle();return e}getStrokeWidth(t){if(!this.properties.highlight.enabled)return t;const{strokeWidth:e=t}=this.getHighlightStyle();return e}getHighlightState(t,e,i){const s=this.ctx.highlightManager?.getActiveHighlight();if(t)return 1;if(s?.series==null)return 0;if(this.isSeriesHighlighted(s,i)){const a=this.isItemHighlighted(s,e);return a==null||a?2:4}return 3}isSeriesHighlighted(t,e){return t?.series===this}isItemHighlighted(t,e){if(!(t?.datumIndex==null||e==null))return t.datumIndex===e}getHighlightStyle(t,e,i){const s=this.getHighlightState(t,e,i);return this.properties.highlight.getStyle(s)}getModuleTooltipParams(){return this.moduleMap.mapModules(t=>t.getTooltipParams()).reduce((t,e)=>Object.assign(t,e),{})}pickNodes(t,e,i=!1){const{pickModes:s,pickModeAxis:a,visible:n,contentGroup:o}=this;if(!n||!o.visible||e==="highlight"&&!this.properties.highlight.enabled||e==="highlight-tooltip"&&!this.properties.highlight.enabled)return;let r=1/0;if(e==="tooltip"||e==="highlight-tooltip"){const{tooltip:d}=this.properties;r=typeof d.range=="number"?d.range:1/0,i||(i=d.range==="exact")}else if(e==="event"||e==="context-menu"){const{nodeClickRange:d}=this.properties;r=typeof d=="number"?d:1/0,i||(i=d==="exact")}const l=s.filter(d=>!i||d===0),{x:c,y:h}=t,u=JSON.stringify({x:c,y:h,maxDistance:r,selectedPickModes:l});if(this._pickNodeCache.has(u))return this._pickNodeCache.get(u);for(const d of l){let p;switch(d){case 0:{const g=this.pickNodesExactShape(t);p=g.length===0?void 0:{datums:g,distance:0};break}case 1:{const g=this.pickNodeClosestDatum(t),f=g?.distance===0?this.pickNodesExactShape(t):void 0;f!=null&&f.length!==0?p={datums:f,distance:0}:g?p={datums:[g.datum],distance:g.distance}:p=void 0;break}case 2:{const g=a!=null?this.pickNodeMainAxisFirst(t,a==="main-category"):void 0;p=g!=null?{datums:[g.datum],distance:g.distance}:void 0;break}}if(p&&p.distance<=r)return this._pickNodeCache.set(u,{pickMode:d,datums:p.datums,distance:p.distance})}return this._pickNodeCache.set(u,void 0)}pickNodesExactShape(t){const e=[];for(const i of this.contentGroup.pickNodes(t.x,t.y)){const s=i.closestDatum();s!=null&&s.missing!==!0&&e.push(s)}return e}pickNodeClosestDatum(t){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeNearestDistantObject(t,e){const i=$b(t.x,t.y,e),s=i.nearest?.closestDatum();if(s!=null&&s.missing!==!0)return{datum:s,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(t,e){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}getLabelData(){return[]}updatePlacedLabelData(t){}fireEvent(t){fl([this.properties,this.ctx.chartService],this.fireEventWrapper,t)}fireNodeClickEvent(t,e){const i=new this.NodeEvent("seriesNodeClick",t,e,this);return this.fireEvent(i),!i.defaultPrevented}fireNodeDoubleClickEvent(t,e){const i=new this.NodeEvent("seriesNodeDoubleClick",t,e,this);return this.fireEvent(i),!i.defaultPrevented}createNodeContextMenuActionEvent(t,e){return new this.NodeEvent("nodeContextMenuAction",t,e,this)}onLegendInitialState(t,e){const{visible:i=!0,itemId:s,legendItemName:a}=e??{};this.toggleSeriesItem(i,t,s,a)}onLegendItemClick(t){const{enabled:e,itemId:i,series:s,legendType:a}=t,n="legendItemName"in this.properties?this.properties.legendItemName:void 0,o="legendItemKey"in this.properties?this.properties.legendItemKey:void 0,r=n!=null&&n===t.legendItemName;(s.id===this.id||r||o!=null)&&this.toggleSeriesItem(e,a,i,n,t)}onLegendItemDoubleClick(t){const{enabled:e,itemId:i,series:s,numVisibleItems:a,legendType:n}=t,o="legendItemName"in this.properties?this.properties.legendItemName:void 0,r="legendItemKey"in this.properties?this.properties.legendItemKey:void 0,l=o!=null&&o===t.legendItemName;s.id===this.id||l||r!=null?this.toggleSeriesItem(!0,n,i,o,t):e&&a===1?this.toggleSeriesItem(!0,n,void 0,o):this.toggleSeriesItem(!1,n,void 0,o)}toggleSeriesItem(t,e,i,s,a){const n=this.id;(t||e!=="category")&&(this.visible=t),this.nodeDataRefresh=!0,this._pickNodeCache.clear();const o={type:"seriesVisibilityChange",seriesId:n,itemId:i,legendItemName:a?.legendItemName??s,visible:t};this.fireEvent(o),this.ctx.legendManager.toggleItem(t,n,i,s)}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return{...this.ctx,series:this}}getLabelText(t,e,i,s,a,n,o){if(t==null)return"";const{axes:r,canHaveAxes:l,ctx:c,id:h,properties:u}=this,{formatManager:d}=c,p="legendItemName"in u?u.legendItemName:void 0,g="series-label",f={seriesId:this.id,...o},x=this.callWithContext.bind(this),m=D=>n.formatValue(x,D.type,D.value,f)??d.format(x,D)??String(t),b=l?Oz(s):void 0,v=b!=null?r[this.resolveKeyDirection(b)]:void 0;if(v!=null)return v.formatDatum(t,g,h,p,e,i,a,n,f,x);const M=this.getFormatterContext(s);switch(s){case"y":case"color":case"size":return m({type:"number",value:t,datum:e,seriesId:h,legendItemName:p,key:i,source:g,property:s,domain:a,boundSeries:M,fractionDigits:void 0});case"x":case"radius":case"angle":case"label":case"secondaryLabel":case"calloutLabel":case"sectorLabel":case"legendItem":return m({type:"category",value:t,datum:e,seriesId:h,legendItemName:p,key:i,source:g,property:s,domain:a,boundSeries:M})}}getMarkerStyle(t,e,i,s=!1,a=t.size??0,n){const{itemStyler:o,fillGradientDefaults:r,fillPatternDefaults:l,fillImageDefaults:c}=t;let u=wr(se({size:a},n,t.getStyle()),r,l,c);if(o&&i){const d=this.cachedCallWithContext(o,{seriesId:this.id,...u,...i,highlighted:s,datum:e});u=wr(se(d,u),r,l,c)}return u}updateMarkerStyle(t,e,i,s,a,n,o,r,{applyTranslation:l=!0,selected:c=!0}={}){const h=this.getMarkerStyle(t,i,a,n,s?.size,o),{shape:u,size:d}=h,p=this.visible&&d>0&&s&&!isNaN(s.x)&&!isNaN(s.y);if(Il(e,h,void 0,r),l?e.setProperties({visible:p,shape:u,size:d,x:s?.x,y:s?.y,scalingCenterX:s?.x,scalingCenterY:s?.y}):e.setProperties({visible:p,shape:u,size:d}),c||(e.fillOpacity*=Pz,e.strokeOpacity*=_z),typeof t.shape=="function"&&!e.dirtyPath){e.path.clear(!0),e.updatePath(),e.checkPathDirty();const g=e.getBBox();if(s!=null&&g.isFinite()){const f=g.computeCenter(),[x,m]=["x","y"].map(b=>(h.strokeWidth??0)+Math.abs(f[b]-s[b]));s.focusSize=Math.max(g.width+x,g.height+m)}}}get nodeDataDependencies(){return this._nodeDataDependencies??{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(t){const{width:e,height:i}=t??{width:NaN,height:NaN},s=t?{seriesRectWidth:e,seriesRectHeight:i}:void 0,a=Sr(this.nodeDataDependencies,s)!=null;return a&&(this._nodeDataDependencies=s,this.markNodeDataDirty()),a}pickFocus(t){}resetDatumCallbackCache(){this.datumCallbackCache.clear()}cachedDatumCallback(t,e){const{datumCallbackCache:i}=this,s=i.get(t);if(s!=null)return s;try{const a=e();return i.set(t,a),a}catch(a){ut.error(String(a))}}cachedCallWithContext(t,...e){return this.ctx.callbackCache.call([this.properties,this.ctx.chartService],t,...e)}callWithContext(t,...e){return fl([this.properties,this.ctx.chartService],t,...e)}formatTooltipWithContext(t,e,i){return t.formatTooltip([this.properties,this.ctx.chartService],e,i)}minTimeInterval(){}},S([Na({changeValue:function(t,e){this.onSeriesGroupingChange(e,t)}})],Zm.prototype,"seriesGrouping",2)}}),Fs,Yn=I({"packages/ag-charts-community/src/scene/shape/path.ts"(){"use strict";R(),Fn(),hv(),vu(),Fs=class extends xi{constructor(){super(...arguments),this.path=new yu,this._clipX=NaN,this._clipY=NaN,this.clip=!1,this._dirtyPath=!0,this.lastPixelRatio=NaN}set clipX(t){this._clipX=t,this.dirtyPath=!0}set clipY(t){this._clipY=t,this.dirtyPath=!0}set dirtyPath(t){this._dirtyPath!==t&&(this._dirtyPath=t,t&&this.markDirty("path"))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){this._dirtyPath||(this.dirtyPath=this.path.isDirty()||(this.fillShadow?.isDirty()??!1)||(this._clipPath?.isDirty()??!1))}resetPathDirty(){this.path.clear(!0),this._dirtyPath=!1}isPathDirty(){return this.path.isDirty()}onChangeDetection(t){this._dirtyPath||(this._dirtyPath=!0,super.onChangeDetection(t))}computeBBox(){return this.updatePathIfDirty(),this.path.computeBBox()}isPointInPath(t,e){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(t,e)}distanceSquared(t,e){return this.distanceSquaredTransformedPoint(t,e)}svgPathData(t){return this.updatePathIfDirty(),this.path.toSVG(t)}distanceSquaredTransformedPoint(t,e){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(t,e)?0:this.path.distanceSquared(t,e)}isDirtyPath(){return!1}updatePath(){}updatePathIfDirty(){(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1)}preRender(t){return t.devicePixelRatio!==this.lastPixelRatio&&(this.dirtyPath=!0),this.lastPixelRatio=t.devicePixelRatio,this.updatePathIfDirty(),super.preRender(t,this.path.commands.length)}render(t){const{ctx:e}=t;if(this.clip&&!isNaN(this._clipX)&&!isNaN(this._clipY)){e.save();try{const i=this.strokeWidth/2;this._clipPath??(this._clipPath=new yu),this._clipPath.clear(),this._clipPath.rect(-i,-i,this._clipX+i,this._clipY+i+i),e.clip(this._clipPath?.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(e)}finally{e.restore()}}else this._clipPath=void 0,this.drawPath(e);this.fillShadow?.markClean(),super.render(t)}drawPath(t){this.fillStroke(t,this.path.getPath2D())}toSVG(){if(!this.visible)return;const t=fi("path");t.setAttribute("d",this.svgPathData());const e=this.applySvgFillAttributes(t,[]);return this.applySvgStrokeAttributes(t),{elements:[t],defs:e}}},Fs.className="Path",S([lt()],Fs.prototype,"clip",2),S([lt()],Fs.prototype,"clipX",1),S([lt()],Fs.prototype,"clipY",1)}}),Ez,U7=I({"packages/ag-charts-community/src/dom/focusIndicator.ts"(){"use strict";R(),Wt(),Yn(),ns(),ku(),Ez=class{constructor(t){this.swapChain=t,this.hasBeenActivated=!1,this.div=zt("div"),this.svg=fi("svg"),this.outerPath=fi("path"),this.innerPath=fi("path"),this.svg.append(this.outerPath),this.svg.append(this.innerPath),this.outerPath.classList.add("ag-charts-focus-svg-outer-path"),this.innerPath.classList.add("ag-charts-focus-svg-inner-path"),this.element=zt("div","ag-charts-focus-indicator"),this.element.ariaHidden="true",this.element.append(this.svg),this.swapChain.addListener("swap",e=>this.onSwap(e))}clear(){}update(t,e,i){if(e!=null)if(t instanceof Fs){const s=(n,o)=>{let{x:r,y:l}=He.toCanvasPoint(t,n,o);return r-=e.x??0,l-=e.y??0,{x:r,y:l}},a=t.svgPathData(s);this.outerPath.setAttribute("d",a),this.innerPath.setAttribute("d",a),this.show(this.svg)}else{let s;if(i){const a=Math.max(t.x-e.x,0),n=Math.max(t.y-e.y,0),o=Math.min(t.x+t.width-e.x,e.width),r=Math.min(t.y+t.height-e.y,e.height);s=new gt(a,n,o-a,r-n)}else s=new gt(t.x-e.x,t.y-e.y,t.width,t.height);gv(this.div,s),this.show(this.div)}}onSwap(t){t!==this.element.parentElement&&(this.element.remove(),t.appendChild(this.element),this.overrideFocusVisible(this.focusVisible))}show(t){this.hasBeenActivated=!0,this.element.innerHTML="",this.element.append(t)}overrideFocusVisible(t){this.focusVisible=t;const e={true:"1",false:"0",undefined:""};this.element.parentElement?.style.setProperty("opacity",e[`${t}`])}isFocusVisible(t=!1){if(!t&&!this.hasBeenActivated)return!1;const e=this.element.parentElement;return e!=null&&de().getComputedStyle(e).opacity==="1"}}}}),Rz,K7=I({"packages/ag-charts-community/src/dom/focusSwapChain.ts"(){"use strict";R(),Rz=class{constructor(t,e,i){this.label1=t,this.label2=e,this.hasFocus=!1,this.skipDispatch=!1,this.listeners={blur:[],focus:[],swap:[]},this.onBlur=s=>(Po(s.target,"pointer-events",void 0),!this.skipDispatch&&this.dispatch("blur",s)),this.onFocus=s=>(Po(s.target,"pointer-events","auto"),!this.skipDispatch&&this.dispatch("focus",s)),Ut(this.label1,"id",om()),Ut(this.label2,"id",om()),Po(this.label1,"display","none"),Po(this.label2,"display","none"),this.activeAnnouncer=this.createAnnouncer(i),this.inactiveAnnouncer=this.createAnnouncer(i),Ut(this.activeAnnouncer,"tabindex",0),this.label2.insertAdjacentElement("afterend",this.activeAnnouncer),this.label2.insertAdjacentElement("afterend",this.inactiveAnnouncer),this.swap("")}createAnnouncer(t){const e=zt("div");return e.role=t,e.className="ag-charts-swapchain",e.addEventListener("blur",this.onBlur),e.addEventListener("focus",this.onFocus),e}destroy(){for(const t of[this.activeAnnouncer,this.inactiveAnnouncer])t.removeEventListener("blur",this.onBlur),t.removeEventListener("focus",this.onFocus),t.remove()}focus(t){this.focusOptions=t,this.activeAnnouncer.focus(t),this.focusOptions=void 0}update(t){this.skipDispatch=!0,this.swap(t),this.hasFocus&&this.activeAnnouncer.focus(this.focusOptions),this.skipDispatch=!1}addListener(t,e){this.listeners[t].push(e),t==="swap"&&e(this.activeAnnouncer)}dispatch(t,e){t==="focus"?this.hasFocus=!0:t==="blur"&&(this.hasFocus=!1),this.listeners[t].forEach(i=>i(e))}swap(t){const e=this.activeAnnouncer.tabIndex;this.label2.textContent=t,[this.inactiveAnnouncer,this.activeAnnouncer]=[this.activeAnnouncer,this.inactiveAnnouncer],[this.label1,this.label2]=[this.label2,this.label1],lu(this.inactiveAnnouncer,{"aria-labelledby":this.label1.id,"aria-hidden":!0,tabindex:void 0}),lu(this.activeAnnouncer,{"aria-labelledby":this.label1.id,"aria-hidden":!1,tabindex:e}),this.dispatch("swap",this.activeAnnouncer)}}}});function Y7(t,e){for(const i of e)if("code"in i){if(i.code===t.code)return!0}else if(i.key===t.key&&(i.shift===void 0||i.shift===t.shiftKey)&&(i.ctrlOrMeta===void 0||i.ctrlOrMeta===t.ctrlKey||i.ctrlOrMeta===t.metaKey))return!0;return!1}function Z7(t){for(const[e,{activatesFocusIndicator:i=!0,bindings:s}]of Oo(Bz))if(Y7(t,s))return{name:e,activatesFocusIndicator:i}}var Bz,X7=I({"packages/ag-charts-community/src/chart/interaction/keyBindings.ts"(){"use strict";R(),Bz={arrowdown:{bindings:[{code:"ArrowDown"}]},arrowleft:{bindings:[{code:"ArrowLeft"}]},arrowright:{bindings:[{code:"ArrowRight"}]},arrowup:{bindings:[{code:"ArrowUp"}]},delete:{bindings:[{key:"Backspace"},{key:"Delete"}],activatesFocusIndicator:!1},redo:{bindings:[{key:"y",ctrlOrMeta:!0},{key:"z",ctrlOrMeta:!0,shift:!0}],activatesFocusIndicator:!1},undo:{bindings:[{key:"z",ctrlOrMeta:!0}],activatesFocusIndicator:!1},submit:{bindings:[{key:"Enter"},{code:"Enter"},{code:"Space"}]},zoomin:{bindings:[{key:"+"},{code:"ZoomIn"},{code:"Add"}],activatesFocusIndicator:!1},zoomout:{bindings:[{key:"-"},{code:"ZoomOut"},{code:"Substract"}],activatesFocusIndicator:!1}}}});function q7(t,e,i){const s=mC(t,i.datum,i.movedBounds);if(s!=null)return{x:s.canvasX,y:s.canvasY};const a=i.bounds;if(a!=null){if(a instanceof gt){const{x:n,y:o}=a.computeCenter();return{x:e.x+n,y:e.y+o}}return He.toCanvas(a).computeCenter()}}function Q7({bounds:t}){return t instanceof gt?t:t!=null?He.toCanvas(t):gt.NaN}function J7(t,e,i){const{x:s,y:a}=q7(t,e,i)??{};if(s!==void 0&&a!==void 0)return{type:"keyboard",canvasX:s,canvasY:a}}var tQ=I({"packages/ag-charts-community/src/chart/keyboardUtil.ts"(){"use strict";Wt(),ns(),Bu()}});function zz(t,e,i,s){let{top:a,right:n,bottom:o,left:r,width:l,height:c}=s;return r!=null?l!=null?n=i.width-r+l:n!=null&&(l=i.width-r-n):n!=null&&l!=null&&(r=i.width-n-l),a!=null?c!=null?o=i.height-a-c:o!=null&&(c=i.height-o-a):o!=null&&c!=null&&(a=i.height-o-c),l==null?c==null?(l=t,c=e):l=Math.ceil(t*c/e):c==null&&(c=Math.ceil(e*l/t)),r==null&&(n==null?r=Math.floor((i.width-l)/2):r=i.width-n-l),a==null&&(o==null?a=Math.floor((i.height-c)/2):a=i.height-c-o),{x:r,y:a,width:l,height:c}}var Fz=I({"packages/ag-charts-community/src/util/placement.ts"(){"use strict"}}),DL,kL,IL,Vz,Gz,eQ=I({"packages/ag-charts-community/src/chart/tooltip/springAnimation.ts"(){"use strict";R(),DL=.1,kL=200,IL=12,Vz=.5,Gz=class{constructor(){this.events=new gr,this.x1=NaN,this.y1=NaN,this.x=NaN,this.y=NaN,this.vx=0,this.vy=0,this.t0=NaN,this.animationFrameHandle=void 0}reset(){this.x=NaN,this.y=NaN,this.animationFrameHandle!=null&&(cancelAnimationFrame(this.animationFrameHandle),this.animationFrameHandle=void 0)}update(t,e){if(Number.isNaN(this.x)||Number.isNaN(this.y)){this.x=t,this.y=e,this.vx=0,this.vy=0,this.emitUpdate(),this.animationFrameHandle!=null&&(cancelAnimationFrame(this.animationFrameHandle),this.animationFrameHandle=void 0);return}this.x1=t,this.y1=e,this.t0=Date.now(),this.animationFrameHandle==null&&(this.animationFrameHandle=requestAnimationFrame(this.onFrame.bind(this)))}onFrame(){this.animationFrameHandle=void 0;const{x1:t,y1:e,t0:i}=this,s=Date.now(),a=s-i;this.t0=s;const n=.001,o=Math.ceil(a/(n*1e3))|0;let{x:r,y:l,vx:c,vy:h}=this;for(let u=0;u<o;u+=1){const d=r-t,p=l-e,g=-(kL*d+IL*c)/DL,f=-(kL*p+IL*h)/DL;c+=g*n,h+=f*n,r+=c*n,l+=h*n}Math.hypot(r-t,l-e)<Vz?(this.x=this.x1,this.y=this.y1,this.vx=0,this.vy=0):(this.x=r,this.y=l,this.vx=c,this.vy=h,this.animationFrameHandle=requestAnimationFrame(this.onFrame.bind(this))),this.emitUpdate()}emitUpdate(){this.events.emit("update",{x:this.x,y:this.y})}}}});function Xm(t){return t===""?"":(qm??(qm=zt("div")),qm.textContent=String(t),qm.innerHTML.replace(/\n/g,"<br>"))}var qm,iQ=I({"packages/ag-charts-community/src/util/sanitize.ts"(){"use strict";R(),qm=null}});function Qm(t,e){const{path:i,size:s}=t,{x:a,y:n}=t;i.clear();let o=!1;for(const[r,l]of e){const c=a+(r-.5)*s,h=n+(l-.5)*s;o?i.lineTo(c,h):i.moveTo(c,h),o=!0}i.closePath()}var jz,Wz=I({"packages/ag-charts-community/src/chart/marker/shapes.ts"(){"use strict";uv(),$i(),jz={circle({path:t,x:e,y:i,size:s}){const a=s/2;t.arc(e,i,a,0,Math.PI*2),t.closePath()},cross(t){Qm(t,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},diamond(t){Qm(t,[[.5,0],[1,.5],[.5,1],[0,.5]])},heart({path:t,x:e,y:i,size:s}){const a=s/4;i=i+a/2,t.arc(e-a,i-a,a,Hi(130),Hi(330)),t.arc(e+a,i-a,a,Hi(220),Hi(50)),t.lineTo(e,i+a),t.closePath()},pin({path:t,x:e,y:i,size:s}){t.moveTo(e+(.15625-.5)*s,i+(.34375-.5)*s),t.cubicCurveTo(e+(.15625-.5)*s,i+(.151491-.5)*s,e+(.307741-.5)*s,i+(0-.5)*s,e+(.5-.5)*s,i+(0-.5)*s),t.cubicCurveTo(e+(.692259-.5)*s,i+(0-.5)*s,e+(.84375-.5)*s,i+(.151491-.5)*s,e+(.84375-.5)*s,i+(.34375-.5)*s),t.cubicCurveTo(e+(.84375-.5)*s,i+(.493824-.5)*s,e+(.784625-.5)*s,i+(.600181-.5)*s,e+(.716461-.5)*s,i+(.695393-.5)*s),t.cubicCurveTo(e+(.699009-.5)*s,i+(.719769-.5)*s,e+(.681271-.5)*s,i+(.743104-.5)*s,e+(.663785-.5)*s,i+(.766105-.5)*s),t.cubicCurveTo(e+(.611893-.5)*s,i+(.834367-.5)*s,e+(.562228-.5)*s,i+(.899699-.5)*s,e+(.528896-.5)*s,i+(.980648-.5)*s),t.cubicCurveTo(e+(.524075-.5)*s,i+(.992358-.5)*s,e+(.512663-.5)*s,i+(1-.5)*s,e+(.5-.5)*s,i+(1-.5)*s),t.cubicCurveTo(e+(.487337-.5)*s,i+(1-.5)*s,e+(.475925-.5)*s,i+(.992358-.5)*s,e+(.471104-.5)*s,i+(.980648-.5)*s),t.cubicCurveTo(e+(.487337-.5)*s,i+(1-.5)*s,e+(.475925-.5)*s,i+(.992358-.5)*s,e+(.471104-.5)*s,i+(.980648-.5)*s),t.cubicCurveTo(e+(.437772-.5)*s,i+(.899699-.5)*s,e+(.388107-.5)*s,i+(.834367-.5)*s,e+(.336215-.5)*s,i+(.766105-.5)*s),t.cubicCurveTo(e+(.318729-.5)*s,i+(.743104-.5)*s,e+(.300991-.5)*s,i+(.719769-.5)*s,e+(.283539-.5)*s,i+(.695393-.5)*s),t.cubicCurveTo(e+(.215375-.5)*s,i+(.600181-.5)*s,e+(.15625-.5)*s,i+(.493824-.5)*s,e+(.15625-.5)*s,i+(.34375-.5)*s),t.closePath()},plus(t){Qm(t,[[1/3,0],[2/3,0],[2/3,1/3],[1,1/3],[1,2/3],[2/3,2/3],[2/3,1],[1/3,1],[1/3,2/3],[0,2/3],[0,1/3],[1/3,1/3]])},square({path:t,x:e,y:i,size:s,pixelRatio:a}){const n=s/2;t.moveTo(as(a,e-n),as(a,i-n)),t.lineTo(as(a,e+n),as(a,i-n)),t.lineTo(as(a,e+n),as(a,i+n)),t.lineTo(as(a,e-n),as(a,i+n)),t.closePath()},star({path:t,x:e,y:i,size:s}){const n=s/2,o=n/2,r=Math.PI/2;for(let l=0;l<5*2;l++){const c=l%2===0?n:o,h=l*Math.PI/5-r,u=e+Math.cos(h)*c,d=i+Math.sin(h)*c;t.lineTo(u,d)}t.closePath()},triangle(t){Qm(t,[[.5,0],[1,.87],[0,.87]])}}}}),ig,wi,Go=I({"packages/ag-charts-community/src/chart/marker/marker.ts"(){"use strict";Wt(),Fn(),Yn(),ns(),Wz(),ig=class extends Fs{constructor(){super(...arguments),this.shape="square",this.x=0,this.y=0,this.size=12}isPointInPath(t,e){return this.distanceSquared(t,e)<=0}distanceSquared(t,e){const i=wi.anchor(this.shape);return Math.max(Math.hypot(t-this.x+(i.x-.5)*this.size,e-this.y+(i.y-.5)*this.size)-this.size/2,0)}updatePath(){const{path:t,shape:e,x:i,y:s,size:a}=this,n=this.layerManager?.canvas?.pixelRatio??1,o=wi.anchor(e),r={path:t,x:i-(o.x-.5)*a,y:s-(o.y-.5)*a,size:a,pixelRatio:n};t.clear(),typeof e=="string"?jz[e](r):typeof e=="function"&&e(r)}computeBBox(){const{x:t,y:e,size:i}=this,s=wi.anchor(this.shape);return new gt(t-i*s.x,e-i*s.y,i,i)}executeFill(t,e){if(e)return super.executeFill(t,e)}executeStroke(t,e){if(e)return super.executeStroke(t,e)}},S([nn({equals:pu})],ig.prototype,"shape",2),S([lt()],ig.prototype,"x",2),S([lt()],ig.prototype,"y",2),S([lt({convertor:Math.abs})],ig.prototype,"size",2),wi=class extends Pp(pA(Su(ig))){static anchor(t){return t==="pin"?{x:.5,y:1}:typeof t=="function"&&"anchor"in t?t.anchor:{x:.5,y:.5}}constructor(t){super(t),t?.shape!=null&&(this.shape=t.shape)}}}});function Hz(t,e,i=e*(5/3)){const s=new Lt,a=Math.min(t.marker.strokeWidth??1,2),n=Math.min(t.line?.strokeWidth??0,2),o=Math.max(t.marker.enabled===!1?0:e,t.line==null?0:i),r=Math.max(t.marker.enabled===!1?0:e,n);if(t.line!=null){const{stroke:l,strokeOpacity:c,lineDash:h}=t.line,u=new pa;u.x1=0,u.y1=r/2,u.x2=o,u.y2=r/2,u.stroke=l,u.strokeOpacity=c,u.strokeWidth=n,u.lineDash=h,s.append(u)}if(t.marker.enabled!==!1){const{shape:l,fill:c,fillOpacity:h,stroke:u,strokeOpacity:d,lineDash:p,lineDashOffset:g}=t.marker,f=new wi;f.shape=l??"square",f.size=e,f.fill=c,f.fillOpacity=h??1,f.stroke=u,f.strokeOpacity=d??1,f.strokeWidth=a,f.lineDash=p,f.lineDashOffset=g??0;const x=wi.anchor(l),m=o/2+(x.x-.5)*e,b=r/2+(x.y-.5)*e,v=e/(e+a);f.x=m,f.y=b,f.scalingCenterX=m,f.scalingCenterY=b,f.scalingX=v,f.scalingY=v,s.append(f)}return Lt.toSVG(s,o,r)}var $z=I({"packages/ag-charts-community/src/chart/legend/legendSymbol.ts"(){"use strict";Oe(),$u(),Go()}});function Uz(t){const e=[],i=new Map;for(const s of t)if(s.type==="structured"){const{heading:a}=s,n=a!=null?i.get(a):void 0,o={type:"structured",heading:a,items:[s]};n==null?(i.set(a,o),e.push(o)):n.items.push(s)}else e.push(s);return e}function Kz(t){const e=Uz(t),i=[];return e.forEach(s=>{if(s.type==="raw")return"";s.heading!=null&&i.push(s.heading),s.items.forEach(a=>{a.title!=null&&i.push(a.title),a.data?.forEach(n=>{i.push(n.label??n.fallbackLabel,n.value)})})}),i.join("; ")}function AL(t,e,i){let s="";t==null?s+=`<span class="${hs}-label">${Xm(e)}</span>`:(s+=`<span class="${hs}-label">${Xm(t)}</span>`,s+=" ",s+=`<span class="${hs}-value">${Xm(e)}</span>`);const a=[`${hs}-row`];return i&&a.push(`${hs}-row--inline`),s=`<div class="${a.join(" ")}">${s}</div>`,s}function sQ(t){let e="";if(t.data?.length&&t.data.every(a=>a.value==null||a.value===""))return e;const i=t.title==null&&t.data?.length===1,s=t.symbol==null?void 0:Hz(t.symbol,12);return s!=null&&(t.title!=null||t.data?.length)&&(e+=`<span class="${hs}-symbol">${s}</span>`),t.title!=null&&(e+=`<span class="${hs}-title">${Xm(t.title)}</span>`,e+=" "),t.data?.forEach(a=>{e+=AL(a.label??a.fallbackLabel,a.value,i),e+=" "}),e}function Yz(t,e){if(t==null||e.length===1)return;const i=t?.t("tooltipPaginationStatus",{index:e.index+1,count:e.length});return`<div class="${hs}-footer">${i}</div>`}function Zz(t,e,i,s){const a=e.items.length===1?e.items[0]:void 0;let n,o,r;switch(i){case"compact":n=!0,o=a?.title;break;case"single":n=a!=null&&(e.heading==null||a.title==null)&&a.data?.length===1&&a.data[0].label==null&&a.data[0].value!=null,r=e.heading??a?.title;break;case"shared":n=!1}let l="";if(n&&a!=null?(o!=null&&(l+=AL(void 0,o,!1)),a.data?.forEach(h=>{l+=AL(h.label??r,h.value,!1),l+=" "})):(e.heading!=null&&(l+=`<span class="${hs}-heading">${Xm(e.heading)}</span>`,l+=" "),e.items.forEach(h=>{l+=sQ(h)})),l.length===0)return;const c=i!=="compact"&&s!=null?Yz(t,s):void 0;return c+null&&(l+=c),l=`<div class="${hs}-content">${l.trimEnd()}</div>`,l}function aQ(t,e){const i=e==null?void 0:Yz(t,e);return i==null?"":`<div class="${hs}-content">${i}</div>`}function Xz(t,e,i,s){const a=Uz(e);if(a.length!==0){if(a.length===1&&a[0].type==="structured")return Zz(t,a[0],i,s);{const n=a.map(o=>o.type==="structured"?Zz(t,o,i):o.rawHtmlString);return s!=null&&n.push(aQ(t,s)??""),n.join("")}}}var hs,CL,qz=I({"packages/ag-charts-community/src/chart/tooltip/tooltipContent.ts"(){"use strict";iQ(),$z(),hs="ag-charts-tooltip",CL="ag-charts-tooltip--dark"}}),Qz,Jz,tF,LL,eF,Fc,gn,Jm=I({"packages/ag-charts-community/src/chart/tooltip/tooltip.ts"(){"use strict";R(),Fz(),vt(),vt(),UE(),eQ(),qz(),qz(),Qz={left:-1,"top-left":-1,"bottom-left":-1,top:0,center:0,bottom:0,right:1,"top-right":1,"bottom-right":1},Jz={"top-left":-1,top:-1,"top-right":-1,left:0,center:0,right:0,"bottom-left":1,bottom:1,"bottom-right":1},tF={left:3,"top-left":void 0,"bottom-left":void 0,top:2,center:void 0,bottom:1,right:0,"top-right":void 0,"bottom-right":void 0},LL={top:2,bottom:2,left:1,right:1,"top-right":3,"top-left":3,"bottom-right":3,"bottom-left":3,center:0},eF={pointer:"top",node:"top",chart:"top-left"},Fc=class extends Nt{constructor(){super(...arguments),this.xOffset=0,this.yOffset=0}},S([k],Fc.prototype,"xOffset",2),S([k],Fc.prototype,"yOffset",2),S([k],Fc.prototype,"anchorTo",2),S([k],Fc.prototype,"placement",2),gn=class extends Nt{constructor(){super(),this.enabled=!0,this.mode="single",this.delay=0,this.range=void 0,this.wrapping="hyphenate",this.position=new Fc,this.pagination=!1,this.darkTheme=!1,this.bounds="extended",this.cleanup=new Fe,this.springAnimation=new Gz,this.enableInteraction=!1,this.wrapTypes=["always","hyphenate","on-space","never"],this.sizeMonitor=new zA,this._elementSize=void 0,this._showTimeout=void 0,this.arrowPosition=void 0,this._visible=!1,this.positionParams=void 0,this.localeManager=void 0,this.cleanup.register(this.springAnimation.events.on("update",this.updateTooltipPosition.bind(this)))}get interactive(){return this.enableInteraction}setup(t,e){return"togglePopover"in de().HTMLElement.prototype&&(this.element=e.addChild("tooltip-container",hs),this.element.setAttribute("popover","manual"),this.element.className=hs,this.element.style.positionAnchor=e.anchorName,this.sizeMonitor.observe(this.element,i=>{this._elementSize=i,this.updateTooltipPosition()})),this.localeManager=t,()=>{e.removeChild("tooltip-container",hs),this.cleanup.flush(),this.element&&this.sizeMonitor.unobserve(this.element)}}isVisible(){return this._visible}contains(t){return this.element?.contains(t)??!1}updateTooltipPosition(){const{element:t,_elementSize:e,positionParams:i}=this;if(t==null||e==null||i==null)return;const{canvasRect:s,relativeRect:a,meta:n}=i,{x:o,y:r}=this.springAnimation,l=n.position?.anchorTo??"pointer";let c=n.position?.placement??eF[l];Array.isArray(c)||(c=[c]);const h=n.position?.xOffset??0,u=n.position?.yOffset??0,d=a.x,p=a.y,g=a.width-e.width-1+d,f=a.height-e.height+p;let x=0,m,b,v=!1;do{m=c[x],x+=1;const A=this.getTooltipBounds({elementSize:e,placement:m,anchorTo:l,canvasX:o,canvasY:r,yOffset:u,xOffset:h,canvasRect:s});b=zz(e.width,e.height,a,A),v=!1,LL[m]&1&&(v||(v=b.x<d||b.x>g)),LL[m]&2&&(v||(v=b.y<p||b.y>f))}while(x<c.length&&v);const M=Et(d,b.x,g),D=Et(p,b.y,f);v||(v=M!==b.x||D!==b.y);const L=l!=="chart"&&!v&&!h&&!u,C=n.showArrow??this.showArrow??L;this.arrowPosition=C?tF[m]:void 0,this.updateClassModifiers(),t.style.translate=`${M}px ${D}px`}show(t,e,i,s,a,n=!1){const{element:o}=this;if(o!=null&&s!=null&&s.length!==0){const c=Xz(this.localeManager,s,this.mode,this.pagination?a:void 0);if(c==null){this.toggle(!1);return}o.innerHTML=c}else if(o==null||o.innerHTML===""){this.toggle(!1);return}const r={x:t.x-e.x,y:t.y-e.y,width:t.width,height:t.height};switch(this.positionParams={canvasRect:e,relativeRect:r,meta:i},i.position?.anchorTo??"pointer"){case"node":this.springAnimation.update(i.nodeCanvasX??i.canvasX,i.nodeCanvasY??i.canvasY);break;case"pointer":this.springAnimation.update(i.canvasX,i.canvasY);break;case"chart":this.springAnimation.reset()}i.enableInteraction?(this.enableInteraction=!0,o.style.pointerEvents="auto",o.removeAttribute("aria-hidden"),o.tabIndex=-1):(this.enableInteraction=!1,o.style.pointerEvents="none",o.setAttribute("aria-hidden","true"),o.removeAttribute("tabindex")),o.style.setProperty("--top",`${e.top}px`),o.style.setProperty("--left",`${e.left}px`),this.updateClassModifiers(),this.toggle(!0,n)}hide(){this.toggle(!1)}maybeEnterInteractiveTooltip({relatedTarget:t},e){const{interactive:i,interactiveLeave:s,enabled:a,element:n}=this;if(n==null)return!1;if(s)return!0;const o=i&&a&&this.isVisible()&&t instanceof Node&&this.contains(t);return o&&(this.interactiveLeave={callback:e,listener:r=>{(r.relatedTarget==null||r.relatedTarget instanceof Node&&!this.contains(r.relatedTarget))&&this.popInteractiveLeaveCallback()}},n.addEventListener("focusout",this.interactiveLeave.listener),n.addEventListener("mouseout",this.interactiveLeave.listener)),o}popInteractiveLeaveCallback(){const{interactiveLeave:t,element:e}=this;this.interactiveLeave=void 0,t&&(e&&(e.removeEventListener("focusout",t.listener),e.removeEventListener("mouseout",t.listener)),t.callback())}toggle(t,e=!1){const{delay:i}=this;t&&i>0&&!e?this._showTimeout??(this._showTimeout=setTimeout(()=>{this._showTimeout=void 0,this.toggleCallback(!0)},i)):(clearTimeout(this._showTimeout),this._showTimeout=void 0,this.toggleCallback(t))}toggleCallback(t){this.element?.isConnected&&this._visible!==t&&(this._visible=t,this.element.togglePopover(t),t?this.updateTooltipPosition():(this.springAnimation.reset(),this.popInteractiveLeaveCallback()))}updateClassModifiers(){if(!this.element?.isConnected)return;const{classList:t}=this.element,e=(i,s)=>t.toggle(`${hs}--${i}`,s);e("no-interaction",!this.enableInteraction),e("arrow-top",this.arrowPosition===1),e("arrow-right",this.arrowPosition===3),e("arrow-bottom",this.arrowPosition===2),e("arrow-left",this.arrowPosition===0),e("compact",this.mode==="compact"),t.toggle(CL,this.darkTheme);for(const i of this.wrapTypes)t.toggle(`${hs}--wrap-${i}`,i===this.wrapping)}getTooltipBounds(t){const{elementSize:e,anchorTo:i,placement:s,canvasX:a,canvasY:n,yOffset:o,xOffset:r,canvasRect:l}=t,{width:c,height:h}=e,u={width:c,height:h};if(i==="node"||i==="pointer"){const d=Qz[s],p=Jz[s];return u.top=n+o+h*(p-1)/2+8*p,u.left=a+r+c*(d-1)/2+8*d,u}switch(s){case"top":return u.top=o,u.left=l.width/2-c/2+r,u;case"right":return u.top=l.height/2-h/2+o,u.left=l.width-c/2+r,u;case"left":return u.top=l.height/2-h/2+o,u.left=r,u;case"bottom":return u.top=l.height-h+o,u.left=l.width/2-c/2+r,u;case"top-left":return u.top=o,u.left=r,u;case"top-right":return u.top=o,u.left=l.width-c+r,u;case"bottom-right":return u.top=l.height-h+o,u.left=l.width-c+r,u;case"bottom-left":return u.top=l.height-h+o,u.left=r,u}return u}},S([k],gn.prototype,"enabled",2),S([k],gn.prototype,"mode",2),S([k],gn.prototype,"showArrow",2),S([k],gn.prototype,"delay",2),S([k],gn.prototype,"range",2),S([k],gn.prototype,"wrapping",2),S([k],gn.prototype,"position",2),S([k],gn.prototype,"pagination",2),S([k],gn.prototype,"darkTheme",2),S([k],gn.prototype,"bounds",2)}});function wL(t,e){return t.series===e.series&&Wi(t.datumIndex,e.datumIndex)}function nQ(t,e){return t.type!==e}var iF,sF,oQ=I({"packages/ag-charts-community/src/chart/series/seriesAreaManager.ts"(){"use strict";R(),U7(),K7(),Wt(),ns(),_A(),Pt(),mE(),IC(),X7(),yC(),tQ(),Jm(),iF=class{constructor(){this.candidates=[]}get current(){return this.active}reset(){this.candidates.length=0,this.active=void 0}update(t,e){this.candidates=t;let i=e!=null?t.findIndex(s=>wL(s,e)):-1;return i===-1&&(i=0),this.active=t[i],{current:this.active,index:i,length:t.length}}next(){const{candidates:t,active:e}=this,i=e==null?-1:t.findIndex(a=>wL(a,e));if(i===-1)return;let s=i+1;return s>=t.length&&(s=0),this.active=t[s],{current:this.active,index:s,length:this.candidates.length}}},sF=class extends Tv{constructor(t){super(),this.chart=t,this.id=zn(this),this.series=[],this.highlight={pendingHoverEvent:void 0,appliedHoverEvent:void 0,stashedHoverEvent:void 0},this.tooltip={lastHover:void 0},this.hoverDevice="pointer",this.previousInputDevice="keyboard",this.focus={sortedSeries:[],series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.cachedTooltipContent=void 0,this.hoverScheduler=t6(()=>{if(!(!this.tooltip.lastHover&&!this.highlight.pendingHoverEvent)){if(this.chart.getUpdateType()<=5){this.hoverScheduler.schedule();return}this.highlight.pendingHoverEvent&&this.handleHoverHighlight(!1),this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!1)}}),this.tooltipCandidates=new iF;const e=t.ctx.domManager.addChild("series-area","series-area-aria-label1"),i=t.ctx.domManager.addChild("series-area","series-area-aria-label2");this.swapChain=new Rz(e,i,"img"),this.swapChain.addListener("blur",o=>this.onBlur(o)),this.swapChain.addListener("focus",()=>this.onFocus()),t.ctx.domManager.mode==="normal"&&(this.focusIndicator=new Ez(this.swapChain),this.focusIndicator.overrideFocusVisible(t.mode==="integrated"?!1:void 0));const{seriesDragInterpreter:s,seriesWidget:a,containerWidget:n}=t.ctx.widgets;a.setTabIndex(-1),this.cleanup.register(()=>t.ctx.domManager.removeChild("series-area","series-area-aria-label1"),()=>t.ctx.domManager.removeChild("series-area","series-area-aria-label2"),a.addListener("focus",()=>this.swapChain.focus({preventScroll:!0})),a.addListener("mousemove",o=>this.onHover(o,a)),a.addListener("wheel",o=>this.onWheel(o)),a.addListener("mouseleave",o=>this.onLeave(o)),a.addListener("keydown",o=>this.onKeyDown(o)),a.addListener("contextmenu",(o,r)=>this.onContextMenu(o,r)),n.addListener("contextmenu",(o,r)=>this.onContextMenu(o,r)),n.addListener("click",(o,r)=>this.onClick(o,r)),n.addListener("dblclick",(o,r)=>this.onClick(o,r)),t.ctx.animationManager.addListener("animation-start",()=>this.clearAll()),t.ctx.eventsHub.on("dom:resize",()=>this.clearAll()),t.ctx.eventsHub.on("highlight:change",o=>this.changeHighlightDatum(o)),t.ctx.eventsHub.on("layout:complete",o=>this.layoutComplete(o)),t.ctx.updateService.addListener("pre-scene-render",()=>this.preSceneRender()),t.ctx.updateService.addListener("update-complete",()=>this.updateComplete()),t.ctx.eventsHub.on("zoom:change",()=>this.clearAll()),t.ctx.eventsHub.on("zoom:pan-start",()=>this.clearAll())),s&&this.cleanup.register(s.events.on("drag-move",o=>this.onDragMove(o,a)),s.events.on("click",o=>this.onClick(o,a)),s.events.on("dblclick",o=>this.onClick(o,a)))}get bbox(){return(this.seriesRect??gt.zero).clone()}isState(t){return this.chart.ctx.interactionManager.isState(t)}isIgnoredTouch(t){return!(t.device!=="touch"||t.type==="click"||this.chart.ctx.chartService.touch.dragAction==="hover"||this.chart.ctx.chartService.touch.dragAction==="drag"&&this.isState(9))}dataChanged(){var t;this.cachedTooltipContent=void 0,(t=this.highlight).stashedHoverEvent??(t.stashedHoverEvent=this.highlight.appliedHoverEvent),this.chart.ctx.tooltipManager.removeTooltip(this.id),this.focusIndicator?.clear(),this.clearHighlight()}preSceneRender(){this.highlight.stashedHoverEvent!=null&&(this.highlight.pendingHoverEvent=this.highlight.stashedHoverEvent,this.highlight.stashedHoverEvent=void 0,this.handleHoverHighlight(!0)),this.tooltip.lastHover!=null&&this.handleHoverTooltip(this.tooltip.lastHover,!0)}updateComplete(){this.isState(34)&&this.focusIndicator?.isFocusVisible()&&this.handleSeriesFocus(0,0,!0)}update(t,e){this.chart.ctx.updateService.update(t,e)}seriesChanged(t){this.focus.sortedSeries=[...t].sort((e,i)=>{let s=e.properties.focusPriority??1/0,a=i.properties.focusPriority??1/0;return s===a&&([s,a]=[e._declarationOrder,i._declarationOrder]),s<a?-1:s>a?1:0}),this.series=t}layoutComplete(t){this.seriesRect=t.series.rect,this.hoverRect=t.series.paddedRect,this.chart.ctx.widgets.seriesWidget.setBounds(t.series.paddedRect),this.chart.ctx.domManager.mode==="normal"&&this.chart.ctx.widgets.chartWidget.setBounds(t.chart)}onContextMenu(t,e){const{sourceEvent:i}=t;if(i.currentTarget!=e.getElement())return;if(i.target==this.chart.ctx.widgets.containerWidget.getElement()){if(this.isState(36)){const{currentX:l,currentY:c}=t;this.chart.ctx.contextMenuRegistry.dispatchContext("always",{widgetEvent:t,canvasX:l,canvasY:c},void 0)}return}let s,a;if(this.focusIndicator?.isFocusVisible())s=this.chart.ctx.highlightManager.getActiveHighlight(),s&&this.seriesRect&&s.midPoint&&(a=He.toCanvasPoint(s.series.contentGroup,s.midPoint.x,s.midPoint.y));else if(this.isState(36)){const l=this.pickNodes({x:t.currentX,y:t.currentY},"context-menu");l&&(this.chart.ctx.highlightManager.updateHighlight(this.id),s=l.matches[0].datum)}const n=s?.series;this.clearAll();const o=t.currentX+e.cssLeft(),r=t.currentY+e.cssTop();n&&s?this.chart.ctx.contextMenuRegistry.dispatchContext("series-node",{widgetEvent:t,canvasX:o,canvasY:r},{pickedSeries:n,pickedNode:s},a):this.chart.ctx.contextMenuRegistry.dispatchContext("series-area",{widgetEvent:t,canvasX:o,canvasY:r},void 0,a)}onLeave(t){!this.isState(41)||t.sourceEvent.relatedTarget?.className==="ag-charts-text-input__textarea"||this.maybeEnterInteractiveTooltip(t.sourceEvent)||(this.chart.ctx.domManager.updateCursor(this.id),this.hoverDevice!=="keyboard"&&this.clearAll())}onWheel(t){this.isState(41)&&(this.focusIndicator?.overrideFocusVisible(!1),this.previousInputDevice="pointer")}onDragMove(t,e){this.isState(41)&&(this.focusIndicator?.overrideFocusVisible(!1),this.onHoverLikeEvent(t,e))}onHover(t,e){this.isState(41)&&this.onHoverLikeEvent(t,e)}onHoverLikeEvent(t,e){if(!this.isIgnoredTouch(t)&&(t.device==="touch"&&this.chart.ctx.chartService.touch.dragAction==="hover"&&t.sourceEvent.preventDefault(),e===this.chart.ctx.widgets.seriesWidget&&((t.device==="touch"||nQ(t,"drag-move"))&&(this.tooltip.lastHover=t),this.hoverDevice="pointer",this.previousInputDevice="pointer",this.highlight.pendingHoverEvent=t,this.hoverScheduler.schedule(),this.isState(32)))){const{currentX:i,currentY:s}=t,a=this.pickNodes({x:i,y:s},"event")?.matches,n=a?.[0];n?.series.hasEventListener("seriesNodeClick")||n?.series.hasEventListener("seriesNodeDoubleClick")||a!=null&&a.length>1&&this.chart.tooltip.pagination?this.chart.ctx.domManager.updateCursor(this.id,"pointer"):this.chart.ctx.domManager.updateCursor(this.id)}}onClick(t,e){if(t.device==="keyboard"||(e===this.chart.ctx.widgets.seriesWidget&&this.chart.ctx.animationManager.isActive()&&this.chart.ctx.animationManager.skipCurrentBatch(),t.device==="touch"&&e===this.chart.ctx.widgets.seriesWidget&&this.swapChain.focus({preventScroll:!0}),!this.isState(41)))return;if(e===this.chart.ctx.widgets.seriesWidget){if(!e.getElement().contains(t.sourceEvent.target))return}else if(t.sourceEvent.target!=e.getElement())return;if(this.focusIndicator?.overrideFocusVisible(!1),this.onHoverLikeEvent(t,e),!this.isState(32))return;if(e==this.chart.ctx.widgets.seriesWidget&&this.checkSeriesNodeClick(t)){this.update(5),t.sourceEvent.preventDefault();return}const i={type:t.type==="click"?"click":"doubleClick",event:t.sourceEvent};this.chart.fireEvent(i)}onFocus(){this.isState(34)&&(this.hoverDevice=this.focusIndicator?.isFocusVisible(!0)?"keyboard":"pointer",this.handleFocus(0,0))}onBlur(t){this.isState(34)&&(this.hoverDevice="pointer",this.maybeEnterInteractiveTooltip(t)||this.clearAll(),this.focusIndicator?.overrideFocusVisible(void 0))}onKeyDown(t){if(!this.isState(43))return;const e=Z7(t.sourceEvent);switch(e?.activatesFocusIndicator===!1&&this.focusIndicator?.overrideFocusVisible(this.previousInputDevice==="keyboard"),e?.name){case"redo":return this.chart.ctx.eventsHub.emit("series:redo",null);case"undo":return this.chart.ctx.eventsHub.emit("series:undo",null);case"zoomin":return this.chart.ctx.eventsHub.emit("series:keynav-zoom",{delta:1,widgetEvent:t});case"zoomout":return this.chart.ctx.eventsHub.emit("series:keynav-zoom",{delta:-1,widgetEvent:t});case"arrowup":return this.onArrow(-1,0,t);case"arrowdown":return this.onArrow(1,0,t);case"arrowleft":return this.onArrow(0,-1,t);case"arrowright":return this.onArrow(0,1,t);case"submit":return this.onSubmit(t)}}onArrow(t,e,i){this.isState(34)&&(this.hoverDevice="keyboard",this.previousInputDevice="keyboard",this.focusIndicator?.overrideFocusVisible(!0),this.focus.seriesIndex+=t,this.focus.datumIndex+=e,this.handleFocus(t,e),i.sourceEvent.preventDefault(),this.chart.ctx.eventsHub.emit("series:focus-change",null))}onSubmit(t){if(!this.isState(34))return;const{series:e,datum:i}=this.focus,s=t.sourceEvent;e!=null&&i!=null?e.fireNodeClickEvent(s,i):this.chart.fireEvent({type:"click",event:s}),s.preventDefault()}checkSeriesNodeClick(t){var e;const i=this.pickNodes({x:t.currentX,y:t.currentY},"event");if(i==null||i.matches.length===0)return;const s=this.chart.tooltip.pagination?this.tooltipCandidates.update(i.matches,this.tooltipCandidates.current)?.current:void 0,{series:a,datum:n}=s??i.matches[0],o=s==null?i.distance:0;if(t.type==="click"){const l=a.fireNodeClickEvent(t.sourceEvent,n)&&this.chart.tooltip.pagination?this.tooltipCandidates.next():void 0;if(l!=null){t.sourceEvent.preventDefault();const{currentX:c,currentY:h}=t,u=c+(this.hoverRect?.x??0),d=h+(this.hoverRect?.y??0);(e=this.highlight).pendingHoverEvent??(e.pendingHoverEvent=this.highlight.appliedHoverEvent),this.handleHoverHighlight(!1),this.showTooltip(l.current,u,d,{index:l.index,length:l.length})}return!0}return t.type==="dblclick"?(t.preventZoomDblClick=o===0,a.fireNodeDoubleClickEvent(t.sourceEvent,n),!0):!1}handleFocus(t,e){const i=this.chart.overlays.getFocusInfo(this.chart.ctx.localeManager);i==null?this.handleSeriesFocus(t,e):this.focusIndicator?.update(i.rect,this.seriesRect,!1)}handleSeriesFocus(t,e,i=!1){if(this.chart.chartType==="hierarchy"||this.chart.chartType==="gauge"){this.handleSoloSeriesFocus(t,e,i);return}const{focus:s}=this,a=s.sortedSeries.filter(c=>c.visible&&c.focusable);if(a.length===0)return;const n=s.datumIndex-e,o=s.seriesIndex-t;s.seriesIndex=Et(0,s.seriesIndex,a.length-1),s.series=a[s.seriesIndex];const r=this.focus.datumIndex,l=this.focus.seriesIndex;this.updatePickedFocus(r,e,n,l,t,o,i)}handleSoloSeriesFocus(t,e,i){this.focus.series=this.focus.sortedSeries[0];const s=this.focus.datumIndex,a=this.focus.seriesIndex,n=this.focus.datumIndex-e,o=this.focus.seriesIndex-t;this.updatePickedFocus(s,e,n,a,t,o,i)}updatePickedFocus(t,e,i,s,a,n,o){const{focus:r,hoverRect:l,seriesRect:c}=this;if(r.series==null||l==null)return;const h=r?.series?.pickFocus({datumIndex:t,datumIndexDelta:e,otherIndex:s,otherIndexDelta:a,seriesRect:c});if(!h)return;const{datum:u}=h;if(r.datum=u,r.datumIndex=h.datumIndex,h.otherIndex!=null&&(r.seriesIndex=h.otherIndex),this.focusIndicator?.isFocusVisible()){this.chart.ctx.animationManager.reset();const p=Q7(h),{x:g,y:f}=p.computeCenter();if(!l.containsPoint(g,f)&&this.chart.ctx.zoomManager.panToBBox(this.id,l,p))return;const{x1:x,x2:m,y1:b,y2:v}=Hp.from(p),M=l.containsPoint(x,b),D=l.containsPoint(m,b),L=l.containsPoint(x,v),C=l.containsPoint(m,v);if(!(M||D||L||C)){const A=Hp.from(l);h.movedBounds=p.clone(),x<A.x1&&m<A.x1?(h.movedBounds.x=A.x1-2,h.movedBounds.width=4):x>A.x2&&m>A.x2&&(h.movedBounds.x=A.x2-2,h.movedBounds.width=4),b<A.y1&&v<A.y1?(h.movedBounds.y=A.y1-2,h.movedBounds.height=4):b>A.y2&&v>A.y2&&(h.movedBounds.y=A.y2-2,h.movedBounds.height=4)}}this.focusIndicator?.update(h.movedBounds??h.bounds,this.seriesRect,h.clipFocusBox);const d=J7(r.series,l,h);if(d!=null&&this.hoverDevice==="keyboard"){this.tooltip.lastHover=void 0,this.highlight.appliedHoverEvent=void 0,this.highlight.pendingHoverEvent=void 0,this.highlight.stashedHoverEvent=void 0;const p=this.getTooltipContent(r.series,u.datumIndex,u),g=wm.makeTooltipMeta(d,r.series,u,h.movedBounds);this.chart.ctx.highlightManager.updateHighlight(this.id,u),p?this.chart.ctx.tooltipManager.updateTooltip(this.id,g,p):this.chart.ctx.tooltipManager.removeTooltip(this.id),o||(e===0&&a===0||i!==h.datumIndex||n!==(h.otherIndex??r.seriesIndex))&&p!=null&&this.swapChain.update(this.getDatumAriaText(u,p))}}getDatumAriaText(t,e){const i=e==null?"":Kz(e);return this.chart.ctx.localeManager.t("ariaAnnounceHoverDatum",{datum:t.series.getDatumAriaText?.(t,i)??i})}clearHighlight(){this.highlight.pendingHoverEvent=void 0,this.highlight.appliedHoverEvent=void 0,this.chart.ctx.highlightManager.updateHighlight(this.id)}clearTooltip(){this.chart.ctx.tooltipManager.removeTooltip(this.id),this.tooltip.lastHover=void 0}clearAll(){this.clearHighlight(),this.clearTooltip(),this.focusIndicator?.clear()}handleHoverHighlight(t){this.highlight.appliedHoverEvent=this.highlight.pendingHoverEvent,this.highlight.pendingHoverEvent=void 0;const e=this.highlight.appliedHoverEvent;if(!e||!this.isState(41))return;const{currentX:i,currentY:s}=e,a=e.currentX+(this.hoverRect?.x??0),n=e.currentY+(this.hoverRect?.y??0);if(t?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(a,n)){this.clearHighlight();return}const{range:o}=this.chart.highlight,r=o==="tooltip"?"highlight-tooltip":"highlight",l=this.pickNodes({x:i,y:s},r);if(!l||l.matches.length===0){this.chart.ctx.highlightManager.updateHighlight(this.id);return}const{current:c}=this.tooltipCandidates,u=(c==null?void 0:l.matches.find(d=>wL(d,c)))?.datum??l.matches[0].datum;this.chart.ctx.highlightManager.updateHighlight(this.id,u),this.hoverDevice="pointer"}handleHoverTooltip(t,e){const{current:i}=this.tooltipCandidates;if(this.tooltipCandidates.reset(),!this.isState(41))return;const{currentX:s,currentY:a}=t,n=s+(this.hoverRect?.x??0),o=a+(this.hoverRect?.y??0),r=t.sourceEvent.target;if(e?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(n,o)){this.hoverDevice=="pointer"&&this.clearTooltip();return}if(r&&this.chart.tooltip.interactive&&this.chart.ctx.domManager.isManagedChildDOMElement(r,"canvas-overlay",hs))return;const l=this.pickNodes({x:t.currentX,y:t.currentY},"tooltip");if(!l||l.matches.length===0){this.hoverDevice=="pointer"&&this.clearTooltip();return}if(this.hoverDevice="pointer",l.distance===0){const{current:c,index:h,length:u}=this.tooltipCandidates.update(l.matches,this.chart.tooltip.pagination?i:void 0);this.showTooltip(c,n,o,{index:h,length:u})}else this.showTooltip(l.matches[0],n,o)}showTooltip({series:t,datum:e,datumIndex:i},s,a,n){const o=this.getTooltipContent(t,i,e);if(o!=null){const l=wm.makeTooltipMeta({type:"pointermove",canvasX:s,canvasY:a},t,e,void 0);this.chart.ctx.tooltipManager.updateTooltip(this.id,l,o,n)}else this.chart.ctx.tooltipManager.removeTooltip(this.id)}maybeEnterInteractiveTooltip(t){return this.chart.tooltip.maybeEnterInteractiveTooltip(t,()=>{this.tooltip.lastHover=void 0,this.chart.ctx.tooltipManager.removeTooltip(this.id),this.chart.ctx.highlightManager.updateHighlight(this.id)})}changeHighlightDatum(t){const e=t.previousHighlight?.series,i=t.currentHighlight?.series;e?.properties.cursor&&t.previousHighlight?.datum&&this.chart.ctx.domManager.updateCursor(e.id),i?.properties.cursor&&i.properties.cursor!=="default"&&t.currentHighlight?.datum&&this.chart.ctx.domManager.updateCursor(i.id,i.properties.cursor),i==null||e==null?this.update(5):this.update(5,{seriesToUpdate:new Set([e,i].filter(Boolean))})}pickNodes(t,e,i){const s=[...this.series].reverse();let a;for(const n of s){if(!n.visible||!n.contentGroup.visible)continue;const o=n.pickNodes(t,e,i);if(o==null||o.datums.length===0)continue;const{datums:r,distance:l}=o;if(o.datums.length!==0){if(l===0){a?.distance!==0&&(a={matches:[],distance:0});for(const c of r){const{datumIndex:h}=c;a.matches.push({series:n,datum:c,datumIndex:h})}}else if(a==null||a.distance>l){const[c]=r,{datumIndex:h}=c;a={matches:[{series:n,datum:c,datumIndex:h}],distance:l}}}}return a}getTooltipContent(t,e,i){if(!(t.tooltipEnabled??this.chart.tooltip.enabled)){this.cachedTooltipContent=void 0;return}const{cachedTooltipContent:a}=this;if(a!=null&&a.series===t&&a.datumIndex===e)return a.content;{let n=this.chart.getTooltipContent(t,e,i);return n.length===0&&(n=void 0),this.cachedTooltipContent={series:t,datumIndex:e,content:n},n}}}}}),TL,aF,rQ=I({"packages/ag-charts-community/src/chart/series/seriesLayerManager.ts"(){"use strict";R(),Oe(),N_(),TL=30,aF=class{constructor(t){this.seriesRoot=t,this.groups=new Map,this.series=new Map,this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(t){this.expectedSeriesCount=t}requestGroup(t){const{internalId:e,type:i,contentGroup:s,seriesGrouping:a}=t,{groupIndex:n=e}=a??{},o=this.series.get(e);if(o!=null)throw new Error(`AG Charts - series already has an allocated layer: ${JSON.stringify(o)}`);this.series.size===0&&(this.mode=this.expectedSeriesCount>=TL?"aggressive-grouping":"normal");let r=this.groups.get(i);r==null&&(r=new Map,this.groups.set(i,r));const l=this.lookupIdx(n);let c=r.get(l);return c==null&&(c={type:i,id:l,seriesIds:[],group:this.seriesRoot.appendChild(new Lt({name:`${t.contentGroup.name??i}-managed-layer`,zIndex:t.contentGroup.zIndex,renderToOffscreenCanvas:!1}))},r.set(l,c)),this.series.set(e,{layerState:c,seriesConfig:t}),c.seriesIds.push(e),c.group.appendChild(s),c.group}changeGroup(t){const{internalId:e,seriesGrouping:i,type:s,contentGroup:a,oldGrouping:n}=t,{groupIndex:o=e}=i??{};this.groups.get(s)?.get(o)?.seriesIds.includes(e)||(this.series.has(e)&&this.releaseGroup({internalId:e,seriesGrouping:n,type:s,contentGroup:a}),this.requestGroup(t))}releaseGroup(t){const{internalId:e,contentGroup:i,type:s}=t;if(!this.series.has(e))throw new Error(`AG Charts - series doesn't have an allocated layer: ${e}`);const a=this.series.get(e)?.layerState;a&&(a.seriesIds=a.seriesIds.filter(n=>n!==e),a.group.removeChild(i)),a?.seriesIds.length===0?(this.seriesRoot.removeChild(a.group),this.groups.get(a.type)?.delete(a.id),this.groups.get(s)?.delete(e)):a!=null&&a.seriesIds.length>0&&(a.group.zIndex=this.getLowestSeriesZIndex(a.seriesIds)),this.series.delete(e)}updateLayerCompositing(){this.groups.forEach(t=>{t.forEach(e=>{const{group:i,seriesIds:s}=e;let a;s.length===0?a=!1:s.length>1?a=!0:a=this.series.get(s[0])?.seriesConfig.renderToOffscreenCanvas()===!0,i.renderToOffscreenCanvas=a,i.zIndex=this.getLowestSeriesZIndex(s)})})}lookupIdx(t){return this.mode==="normal"?t:typeof t=="string"&&(t=Number(t.split("-").at(-1)),!t)?0:Math.floor(Et(0,t/this.expectedSeriesCount,1)*TL)}destroy(){this.groups.forEach(t=>{t.forEach(e=>{this.seriesRoot.removeChild(e.group)})}),this.groups.clear(),this.series.clear()}getLowestSeriesZIndex(t){return t.reduce((i,s)=>{const n=this.series.get(s)?.seriesConfig.contentGroup.zIndex;return i==null||n==null?n:T_(i,n)<=0?i:n},void 0)??1}}}}),NL,lQ=I({"packages/ag-charts-community/src/chart/touch.ts"(){"use strict";vt(),vt(),NL=class extends Nt{constructor(){super(...arguments),this.dragAction="drag"}},S([k],NL.prototype,"dragAction",2)}}),nF,cQ=I({"packages/ag-charts-community/src/chart/update/dataWindowProcessor.ts"(){"use strict";R(),nF=class{constructor(t,e,i,s,a,n){this.chart=t,this.eventsHub=e,this.dataService=i,this.updateService=s,this.zoomManager=a,this.animationManager=n,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.cleanup=new Fe,this.cleanup.register(this.eventsHub.on("data:source-change",()=>this.onDataSourceChange()),this.eventsHub.on("data:load",()=>this.onDataLoad()),this.eventsHub.on("data:error",()=>this.onDataError()),this.updateService.addListener("update-complete",o=>this.onUpdateComplete(o)),this.eventsHub.on("zoom:change",()=>this.onZoomChange()))}destroy(){this.cleanup.flush()}onDataLoad(){this.animationManager.skip(),this.updateService.update(1)}onDataError(){this.updateService.update(4)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(t){!t.apiUpdate&&!this.dirtyZoom&&!this.dirtyDataSource||this.updateWindow(t)}onZoomChange(){this.dirtyZoom=!0}updateWindow(t){if(!this.dataService.isLazy())return;const e=this.getValidAxis();let i,s=!0;if(e){const a=this.zoomManager.getAxisZoom(e.id);(a.min!==0||a.max!==1)&&(i=this.getAxisWindow(e,a)),s=this.shouldRefresh(t,e,a)}this.dirtyZoom=!1,this.dirtyDataSource=!1,s&&this.dataService.load({windowStart:i?.min,windowEnd:i?.max})}getValidAxis(){return this.chart.axes.find(t=>t.type==="time")}shouldRefresh(t,e,i){if(t.apiUpdate||this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;const s=this.lastAxisZooms.get(e.id);return s&&i.min===s.min&&i.max===s.max?!1:(this.lastAxisZooms.set(e.id,i),!0)}getAxisWindow(t,e){const{domain:i}=t.scale;if(!e||i.length===0||isNaN(Number(i[0])))return;const s=Number(i[1])-Number(i[0]),a=new Date(Number(i[0])+s*e.min),n=new Date(Number(i[0])+s*e.max);return{min:a,max:n}}}}});function hQ(){const{userAgent:t}=de("navigator");if(oF.test(t)){const e=rF.exec(t);if(e==null)return!1;const i=parseFloat(e[1]),s=Math.floor(i)>16;return s||ut.warnOnce(`Unsupported Safari version: ${i}; ${t}`),!s}else if(lF.test(t)&&!hF.test(t)&&!uF.test(t)){const e=cF.exec(t);if(e==null)return!1;const i=parseInt(e[1],10),s=i>126;return s||ut.warnOnce(`Unsupported Chrome version: ${i}; ${t}`),!s}return!1}var oF,rF,lF,cF,hF,uF,uQ=I({"packages/ag-charts-community/src/util/browser.ts"(){"use strict";R(),oF=/^((?!chrome|android).)*safari/i,rF=/Version\/(\d+(\.\d+)?)/,lF=/Chrome/,cF=/Chrome\/(\d+)/,hF=/Edg/,uF=/OPR/}}),dF,pF,dQ=I({"packages/ag-charts-community/src/chart/update/overlaysProcessor.ts"(){"use strict";R(),uQ(),mL(),dF=new Set(["map-shape-background","map-line-background"]),pF=class{constructor(t,e,i,s,a,n,o){this.chartLike=t,this.overlays=e,this.eventsHub=i,this.dataService=s,this.localeManager=a,this.animationManager=n,this.domManager=o,this.cleanup=new Fe,this.overlayElem=this.domManager.addChild("canvas-overlay","overlay"),this.overlayElem.role="status",this.overlayElem.ariaAtomic="false",this.overlayElem.ariaLive="polite",this.overlayElem.classList.toggle(CS),this.cleanup.register(this.eventsHub.on("layout:complete",r=>this.onLayoutComplete(r)))}destroy(){this.cleanup.flush(),this.domManager.removeChild("canvas-overlay","overlay")}onLayoutComplete({series:{rect:t}}){const e=this.dataService.isLoading(),i=this.chartLike.series.some(c=>c.hasData),s=this.chartLike.series.some(c=>c.visible&&!dF.has(c.type));this.overlays.darkTheme?this.overlayElem.classList.add(fL):this.overlayElem.classList.remove(fL),this.overlayElem.style.left=`${t.x}px`,this.overlayElem.style.top=`${t.y}px`,this.overlayElem.style.width=`${t.width}px`,this.overlayElem.style.height=`${t.height}px`;const a=e,n=!e&&!i,o=i&&!s,r=this.overlays.unsupportedBrowser.enabled&&hQ();a?this.showOverlay(this.overlays.loading,t):this.hideOverlay(this.overlays.loading),n?this.showOverlay(this.overlays.noData,t):this.hideOverlay(this.overlays.noData),o?this.showOverlay(this.overlays.noVisibleSeries,t):this.hideOverlay(this.overlays.noVisibleSeries),r?this.showOverlay(this.overlays.unsupportedBrowser,t):this.hideOverlay(this.overlays.unsupportedBrowser);const l=a||n||o||r;Ut(this.overlayElem,"aria-hidden",!l)}showOverlay(t,e){if(!t.enabled)return;const i=t.getElement(this.chartLike,this.animationManager,this.localeManager,e);this.overlayElem.appendChild(i)}hideOverlay(t){t.removeElement(()=>{this.overlayElem.innerText="\xA0"},this.animationManager)}}}}),fn,wS,Ve,ty,TS=I({"packages/ag-charts-community/src/chart/chart.ts"(){"use strict";R(),xr(),Oe(),Du(),yi(),ku(),Ta(),QX(),Pt(),gE(),vA(),vt(),ta(),mE(),yl(),v6(),Oq(),Pq(),bR(),PB(),Jv(),tS(),FC(),Om(),s7(),a7(),B7(),F7(),Jp(),G7(),j7(),H7(),Qu(),oQ(),rQ(),Jm(),lQ(),cQ(),dQ(),fn=Ft.create(!0,"opts"),wS=class extends Nt{constructor(){super(...arguments),this.padding=new ml(0)}},S([k],wS.prototype,"clip",2),S([k],wS.prototype,"padding",2),Ve=class iZ extends bA{constructor(e,i){var s;super(),this.id=zn(this),this.seriesRoot=new vs({name:`${this.id}-series-root`,zIndex:6}),this.annotationRoot=new vs({name:`${this.id}-annotation-root`,zIndex:10}),this.titleGroup=new Lt({name:"titles",zIndex:14}),this.debug=Ft.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this._autoSizeNotify=new Eb,this.chartCaptions=new vm,this.padding=new ml(20),this.seriesArea=new wS,this.keyboard=new aS,this.touch=new NL,this.mode="standalone",this.styleNonce=void 0,this.formatter=void 0,this.suppressFieldDotNotation=!1,this.loadGoogleFonts=!1,this.destroyed=!1,this.cleanup=new Fe,this.chartAnimationPhase="initial",this.modulesManager=new Tz,this.processors=[],this.queuedUserOptions=[],this.queuedChartOptions=[],this.firstApply=!0,this.syncStatus="init",this.fireEventWrapper=h=>super.fireEvent(h),this.apiUpdate=!1,this._pendingFactoryUpdatesCount=0,this._performUpdateSkipAnimations=!1,this._performUpdateNotify=new Eb,this.performUpdateType=8,this.runningUpdateType=8,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new pE,this.updateRequestors={},this.performUpdateTrigger=e6(({count:h})=>{this.destroyed||this.updateMutex.acquire(async()=>{try{await this.performUpdate(h)}catch(u){ut.error("update error",u,u.stack)}}).catch(u=>ut.errorOnce(u))}),this._performUpdateSplits={},this.axes=[],this.series=[],this._cachedData=void 0,this.onSeriesNodeClick=h=>{this.fireEvent(h)},this.onSeriesNodeDoubleClick=h=>{this.fireEvent(h)},this.onSeriesVisibilityChange=h=>{this.fireEvent(h)},this.seriesGroupingChanged=h=>{if(!(h instanceof LS))return;const{series:u,seriesGrouping:d,oldGrouping:p}=h;u.contentGroup.isRoot()||this.seriesLayerManager.changeGroup({internalId:u.internalId,type:u.type,contentGroup:u.contentGroup,renderToOffscreenCanvas:()=>u.renderToOffscreenCanvas(),seriesGrouping:d,oldGrouping:p})},this.chartOptions=e;const a=i?.scene,n=i?.container??e.processedOptions.container??void 0,o=i?.styleContainer??e.specialOverrides.styleContainer;a&&(this._firstAutoSize=!1,this._lastAutoSize=[a.width,a.height,a.pixelRatio]);const r=new Lt({name:"root"});r.visible=!1,r.append(this.seriesRoot),r.append(this.annotationRoot),r.append(this.titleGroup),this.titleGroup.append(this.title.node),this.titleGroup.append(this.subtitle.node),this.titleGroup.append(this.footnote.node),this.tooltip=new gn,this.seriesLayerManager=new aF(this.seriesRoot),this.mode=e.userOptions.mode??this.mode,this.styleNonce=e.processedOptions.styleNonce;const l=this.ctx=new wB(this,{chartType:this.getChartType(),scene:a,root:r,container:n,styleContainer:o,domMode:e.optionMetadata.domMode,withDragInterpretation:e.optionMetadata.withDragInterpretation??!0,syncManager:new FB(this),fireEvent:h=>this.fireEvent(h),updateCallback:(h,u)=>this.update(h,u),updateMutex:this.updateMutex});this.cleanup.register(l.eventsHub.on("dom:resize",()=>this.parentResize(l.domManager.containerSize))),this.overlays=new Xu,(s=this.overlays.loading).renderer??(s.renderer=()=>W7(this.overlays.loading.getText(l.localeManager),l.animationManager.defaultDuration)),this.processors=[new nF(this,l.eventsHub,l.dataService,l.updateService,l.zoomManager,l.animationManager),new pF(this,this.overlays,l.eventsHub,l.dataService,l.localeManager,l.animationManager,l.domManager)],this.highlight=new TC,this.container=n;const c=this.getModuleContext();l.domManager.setDataBoolean("animating",!1),this.seriesAreaManager=new sF(this.initSeriesAreaDependencies()),this.cleanup.register(l.layoutManager.registerElement(0,h=>{h.layoutBox.shrink(this.padding.toJson()),this.chartCaptions.positionCaptions(h)}),l.eventsHub.on("layout:complete",h=>this.chartCaptions.positionAbsoluteCaptions(h)),l.eventsHub.on("data:load",h=>{this.data=h.data}),this.title.registerInteraction(c,"beforebegin"),this.subtitle.registerInteraction(c,"beforebegin"),this.footnote.registerInteraction(c,"afterend"),Eo.addWindowEvent("page-left",()=>this.destroy()),l.animationManager.addListener("animation-frame",()=>{this.update(7)}),l.animationManager.addListener("animation-start",()=>l.domManager.setDataBoolean("animating",!0)),l.animationManager.addListener("animation-stop",()=>l.domManager.setDataBoolean("animating",!1)),l.eventsHub.on("zoom:change",()=>{this.series.forEach(u=>u.animationState?.transition("updateData"));const h=this.chartAnimationPhase!=="initial";this.update(4,{forceNodeDataRefresh:!0,skipAnimations:h})})),this.parentResize(l.domManager.containerSize)}static getInstance(e){return iZ.chartsInstances.get(e)}get canvasElement(){return this.ctx.scene.canvas.element}download(e,i){this.ctx.scene.download(e,i)}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}toSVG(){return this.ctx.scene.toSVG()}get seriesAreaBoundingBox(){return this.seriesAreaManager.bbox}getOptions(){return this.queuedUserOptions.at(-1)??this.chartOptions.userOptions}getChartOptions(){return this.queuedChartOptions.at(-1)??this.chartOptions}overrideFocusVisible(e){this.seriesAreaManager.focusIndicator?.overrideFocusVisible(e)}fireEvent(e){fl(this,this.fireEventWrapper,e)}initSeriesAreaDependencies(){const{ctx:e,tooltip:i,highlight:s,overlays:a,seriesRoot:n,mode:o}=this,r=this.getChartType();return{fireEvent:this.fireEvent.bind(this),getUpdateType:()=>this.performUpdateType,getTooltipContent:(u,d,p)=>this.getTooltipContent(u,d,p),chartType:r,ctx:e,tooltip:i,highlight:s,overlays:a,seriesRoot:n,mode:o}}getModuleContext(){return this.ctx}getTooltipContent(e,i,s){const a=e.properties.tooltip.enabled!==!1?e.getTooltipContent(i,s):void 0,n=a==null?[]:[a];if(this.tooltip.mode!=="shared"||this.series.length===1)return n;const o=e.getCategoryValue(i);return o==null?n:this.series.flatMap(r=>{if(r===e)return n;if(!r.isEnabled()||r.properties.tooltip.enabled===!1)return[];const l=r.datumIndexForCategoryValue(o),c=l==null?void 0:r.getTooltipContent(l,void 0);return c==null?[]:[c]})}getCaptionText(){return[this.title,this.subtitle,this.footnote].filter(e=>e.enabled&&e.text).map(e=>e.text).join(". ")}getAriaLabel(){return this.ctx.localeManager.t("ariaAnnounceChart",{seriesCount:this.series.length})}resetAnimations(){this.chartAnimationPhase="initial";for(const e of this.series)e.resetAnimation(this.chartAnimationPhase);for(const e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}detachAndClear(){this.container=void 0,this.ctx.scene.clearCanvas()}destroy(e){if(this.destroyed)return;const i=e?.keepTransferableResources;let s;return this.performUpdateType=8,this.cleanup.flush(),this.processors.forEach(a=>a.destroy()),this.overlays.destroy(),this.modulesManager.destroy(),i?(this.ctx.scene.strip(),s={container:this.container,scene:this.ctx.scene}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach(a=>a.destroy()),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.destroyed=!0,Object.freeze(this),s}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(async()=>{if(!this.destroyed)try{await e(this)}finally{this.destroyed||this._pendingFactoryUpdatesCount--}}).catch(i=>ut.errorOnce(i)))}clearCallbackCache(){this.ctx.callbackCache.invalidateCache();for(const e of this.series)e.resetDatumCallbackCache()}update(e=0,i){if(this.destroyed)return;const{forceNodeDataRefresh:s=!1,skipAnimations:a,seriesToUpdate:n=this.series,newAnimationBatch:o,apiUpdate:r=!1}=i??{};this.apiUpdate=r,this.ctx.widgets.seriesWidget.setDragTouchEnabled(this.touch.dragAction!=="none"),s&&this.series.forEach(l=>l.markNodeDataDirty());for(const l of n)this.seriesToUpdate.add(l);if(a&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),o&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this.debug.check()){let l=new Error().stack??"<unknown>";l=l.replace(/\([^)]*/g,""),this.updateRequestors[l]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.ctx.domManager.setDataBoolean("updatePending",!0),this.performUpdateTrigger.schedule(i?.backOffMs))}async performUpdate(e){const{performUpdateType:i,extraDebugStats:s,_performUpdateSplits:a,ctx:n}=this,o=[...this.seriesToUpdate];this.clearCallbackCache(),this.performUpdateType=8,this.seriesToUpdate.clear(),this.runningUpdateType=i,this.updateShortcutCount===0&&i<7&&(n.animationManager.startBatch(this._performUpdateSkipAnimations),n.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.ctx.scene.updateDebugFlags(),this.debug("Chart.performUpdate() - start",Fp[i]);let r=performance.now();a.start??(a.start=r);const l=h=>{a[h]??(a[h]=0),a[h]+=performance.now()-r,r=performance.now()};switch(i){case 0:if(this.checkUpdateShortcut(0))break;this.ctx.updateService.dispatchPreDomUpdate(),this.updateDOM();case 1:if(this.checkUpdateShortcut(1))break;await this.updateData(),l("\u2B07\uFE0F");case 2:if(this.checkUpdateShortcut(2))break;await this.processData(),this.seriesAreaManager.dataChanged(),l("\u{1F3ED}");case 3:if(this.checkUpdateShortcut(3))break;await this.processDomains(),l("\u26F0\uFE0F");case 4:if(await this.checkFirstAutoSize(),this.checkUpdateShortcut(4))break;await this.processLayout(),l("\u2316");case 5:{if(this.checkUpdateShortcut(5))break;await this.updateSeries(o),l("\u{1F914}"),this.updateAriaLabels(),this.seriesLayerManager.updateLayerCompositing()}case 6:if(this.checkUpdateShortcut(6))break;n.updateService.dispatchPreSceneRender(),l("\u2196");case 7:if(this.checkUpdateShortcut(7))break;n.animationManager.endBatch(),s.updateShortcutCount=this.updateShortcutCount,n.scene.render({debugSplitTimes:a,extraDebugStats:s,seriesRect:this.seriesRect}),this.extraDebugStats={};for(const h of Object.keys(a))delete a[h];this.ctx.domManager.incrementDataCounter("sceneRenders"),this.ctx.domManager.postRenderUpdate();case 8:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,n.animationManager.endBatch()}this.destroyed||(n.updateService.dispatchUpdateComplete(this.apiUpdate),this.apiUpdate=!1,this.ctx.domManager.setDataBoolean("updatePending",!1),this.runningUpdateType=8,this.syncStatus="ready"),this._performUpdateNotify.notify();const c=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round((c-a.start)*100)/100,count:e,performUpdateType:Fp[i]})}updateThemeClassName(){const e="ag-charts-theme-",i=[`${e}default`,`${e}default-dark`];let s=i[0],a=!1,{theme:n}=this.chartOptions.processedOptions;for(;typeof n!="string"&&n!=null;)n=n.baseTheme;typeof n=="string"&&(s=n.replace("ag-",e),a=n.includes("-dark")),i.includes(s)||(s=a?i[1]:i[0]),this.ctx.domManager.setThemeClass(s)}updateDOM(){this.updateThemeClassName();const{enabled:e,tabIndex:i}=this.keyboard;this.ctx.domManager.setTabGuardIndex(e?i??0:-1),this.ctx.domManager.setThemeParameters(this.chartOptions.themeParameters)}updateAriaLabels(){this.ctx.domManager.updateCanvasLabel(this.getAriaLabel())}checkUpdateShortcut(e){return this.destroyed?!0:this.updateShortcutCount>3?(ut.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e?(this.updateShortcutCount++,!0):!1}async checkFirstAutoSize(){this.width!=null&&this.height!=null||this._lastAutoSize||await this._autoSizeNotify.await(500)||this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}onAxisChange(e,i){i==null&&e.length===0||this.ctx.axisManager.updateAxes(i??[],e)}onSeriesChange(e,i){const s=i?.filter(a=>!e.includes(a))??[];this.destroySeries(s),this.seriesLayerManager?.setSeriesCount(e.length);for(const a of e){if(i?.includes(a))continue;const n=this.seriesLayerManager.requestGroup(a);a.attachSeries(n,this.seriesRoot,this.annotationRoot);const o=this;a.chart={get mode(){return o.mode},get isMiniChart(){return!1},get seriesRect(){return o.seriesRect}},a.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(a),a.addChartEventListeners()}this.seriesAreaManager?.seriesChanged(e)}destroySeries(e){e?.forEach(i=>{i.removeEventListener("seriesNodeClick",this.onSeriesNodeClick),i.removeEventListener("seriesNodeDoubleClick",this.onSeriesNodeDoubleClick),i.removeEventListener("groupingChanged",this.seriesGroupingChanged),i.destroy(),this.seriesLayerManager.releaseGroup(i),i.detachSeries(void 0,this.seriesRoot,this.annotationRoot),i.chart=void 0})}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("seriesNodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("seriesNodeDoubleClick",this.onSeriesNodeDoubleClick),this.hasEventListener("seriesVisibilityChange")&&e.addEventListener("seriesVisibilityChange",this.onSeriesVisibilityChange),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}assignSeriesToAxes(){for(const e of this.axes)e.boundSeries=this.series.filter(i=>i.axes[e.direction]===e)}assignAxesToSeries(){const e=_b(this.axes,i=>i.direction);for(const i of this.series)for(const s of i.directions){const a=e[s];if(!a){ut.warnOnce(`no available axis for direction [${s}]; check series and axes configuration.`);return}const n=i.getKeys(s),o=a.find(r=>!r.keys.length||n.some(l=>r.keys.includes(l)));if(!o){ut.warnOnce(`no matching axis for direction [${s}] and keys [${n}]; check series and axes configuration.`);return}i.axes[s]=o}}parentResize(e){if(e==null||this.width!=null&&this.height!=null)return;let{width:i,height:s}=e;const{pixelRatio:a}=e;if(i=Math.floor(i),s=Math.floor(s),i===0&&s===0)return;const[n=0,o=0,r=1]=this._lastAutoSize??[];n===i&&o===s&&r===a||(this._lastAutoSize=[i,s,a],this.resize("SizeMonitor",{}))}resize(e,i){const{scene:s,animationManager:a}=this.ctx,{inWidth:n,inHeight:o,inMinWidth:r,inMinHeight:l,inOverrideDevicePixelRatio:c}=i;this.ctx.domManager.setSizeOptions(r??this.minWidth,l??this.minHeight,n??this.width,o??this.height);const h=n??this.width??this._lastAutoSize?.[0],u=o??this.height??this._lastAutoSize?.[1],d=c??this.overrideDevicePixelRatio??this._lastAutoSize?.[2];if(this.debug(`Chart.resize() from ${e}`,{width:h,height:u,pixelRatio:d,stack:new Error().stack}),!(h==null||u==null||!pe(h)||!pe(u))&&s.resize(h,u,d)){a.reset();let p=!0;(this.width==null||this.height==null)&&this._firstAutoSize&&(p=!1,this._firstAutoSize=!1),this.update(4,{forceNodeDataRefresh:!0,skipAnimations:p}),this._autoSizeNotify.notify()}}async updateData(){this.series.forEach(i=>i.setChartData(this.data));const e=this.modulesManager.mapModules(i=>i.updateData?.(this.data));await Promise.all(e)}async processData(){this.series.some(a=>a.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes());const e=new zC(this.mode,this.suppressFieldDotNotation),i=this.series.map(a=>a.processData(e)),s=this.modulesManager.mapModules(a=>a.processData?.(e));this._cachedData=e.execute(this._cachedData),await Promise.all([...i,...s]),this.updateLegends()}async processDomains(){for(const e of this.axes)e.processData();for(const e of this.series)e.updatedDomains()}updateLegends(e){for(const{legend:i,legendType:s}of this.modulesManager.legends())s==="category"?this.setCategoryLegendData(e):this.setLegendData(s,i)}setCategoryLegendData(e){var i;const{ctx:{legendManager:s,stateManager:a}}=this;e&&this.series.forEach(o=>{const r=e.find(l=>l.seriesId===o.id);o.onLegendInitialState("category",r)});const n=this.series.flatMap(o=>{const r=o.getLegendData("category");return s.updateData(o.id,r),r});if(e){a.setStateAndRestore(s,e);return}if(this.mode!=="integrated"){const o={},r=new Map(this.series.map(l=>[l.id,l.type]));for(const{seriesId:l,symbol:{marker:c},label:h}of n.filter(u=>!u.hideInLegend)){if(c.fill==null)continue;const u=r.get(l),d=o[u]??(o[u]={});d[i=h.text]??(d[i]=c.fill),d[h.text]!==c.fill&&ut.warnOnce(`legend item '${h.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}s.update()}setLegendData(e,i){i.data=this.series.filter(s=>s.properties.showInLegend).flatMap(s=>s.getLegendData(e))}async processLayout(){const e=this.animationRect,{width:i,height:s}=this.ctx.scene,a=this.ctx.layoutManager.createContext(i,s);await this.performLayout(a),e&&!this.animationRect?.equals(e)&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}async updateSeries(e){const{seriesRect:i}=this;await Promise.all(e.map(s=>s.update({seriesRect:i}))),this.ctx.seriesLabelLayoutManager.updateLabels(this.series.filter(s=>s.visible&&s.usesPlacedLabels),this.padding,this.seriesRect)}async waitForUpdate(e,i){const s=de("agChartsDebugTimeout");s==null?(e??(e=1e5),i??(i=!1)):(e=s,i??(i=!0));const a=performance.now();for(;(this._pendingFactoryUpdatesCount>0||this.performUpdateType!==8||this.runningUpdateType!==8||this.ctx.scene.waitingForUpdate())&&!this.destroyed;){if(this._pendingFactoryUpdatesCount>0&&await this.updateMutex.waitForClearAcquireQueue(),(this.performUpdateType!==8||this.runningUpdateType!==8)&&await this._performUpdateNotify.await(),performance.now()-a>e){const n=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(i)throw new Error(n);ut.warnOnce(n)}rE()&&await DI(),this.ctx.scene.waitingForUpdate()&&await DI(50)}}filterMiniChartSeries(e){return e?.filter(i=>i.showInMiniChart!==!1)}applyOptions(e){const s=this.firstApply?e.processedOptions:e.diffOptions(this.chartOptions);if(s==null||Object.keys(s).length===0){fn("Chart.applyOptions() - no delta, forcing re-layout",s),this.update(4,{apiUpdate:!0,newAnimationBatch:!0});return}const a=this.firstApply?{}:this.chartOptions.processedOptions,n=e.processedOptions;fn("Chart.applyOptions() - applying delta",s);const o=this.applyModules(n),r=["type","data","series","listeners","preset","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","locale.localeText","axes","topology","nodes","initialState","styleContainer","formatter"];s.listeners&&this.registerListeners(this,s.listeners),xm(this,s,{skip:r});let l=!1,c="no-op";s.series!=null&&(c=this.applySeries(this,s.series,a?.series),l=!0),c==="replaced"&&this.resetAnimations(),this.applyAxes(this,n,a,c,[])&&(l=!0),s.data&&(this.data=s.data),s.legend?.listeners&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,s.legend.listeners),s.locale?.localeText&&(this.modulesManager.getModule("locale").localeText=s.locale?.localeText),this.chartOptions=e;const h=this.modulesManager.getModule("navigator"),u=this.modulesManager.getModule("zoom");!h?.enabled&&!u?.enabled&&this.ctx.zoomManager.updateZoom("chart");const d=h?.miniChart,p=n.navigator?.miniChart?.series??n.series;d?.enabled===!0&&p!=null?this.applyMiniChartOptions(d,p,n,a):d?.enabled===!1&&(d.series=[],d.axes=[]),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),l||(l=this.shouldForceNodeDataRefresh(s,c));const f=l||o?0:4;this.maybeResetAnimations(c),this.shouldClearLegendData(n,a,c)&&this.ctx.legendManager.clearData(),this.applyInitialState(n),this.ctx.formatManager.setFormatter(n.formatter),fn("Chart.applyOptions() - update type",Fp[f],{seriesStatus:c,forceNodeDataRefresh:l}),this.update(f,{apiUpdate:!0,forceNodeDataRefresh:l,newAnimationBatch:!0}),this.firstApply=!1}applyInitialState(e){const{annotationManager:i,chartTypeOriginator:s,historyManager:a,stateManager:n,zoomManager:o}=this.ctx,{initialState:r}=e;if("annotations"in e&&e.annotations?.enabled&&r?.annotations!=null){const l=r.annotations.map(c=>{const h=i.getAnnotationTypeStyles(c.type);return se(c,h)});n.setState(i,l)}r?.chartType!=null&&n.setState(s,r.chartType),(e.navigator?.enabled||e.zoom?.enabled)&&r?.zoom!=null&&n.setState(o,r.zoom),r?.legend!=null&&this.updateLegends(r.legend),r!=null&&a.clear()}maybeResetAnimations(e){if(this.mode==="standalone")switch(e){case"series-grouping-change":case"replaced":this.resetAnimations();break;default:}}shouldForceNodeDataRefresh(e,i){const s=!!e.data||i==="data-change"||i==="replaced",a=eS.getKeys(),n=Object.values(a).some(r=>e[r]!=null),o=e.title!=null&&e.subtitle!=null||e.formatter!=null;return s||n||o}shouldClearLegendData(e,i,s){const a=s==="replaced"||s==="series-grouping-change"||s==="updated"&&(e.series?.length!==i.series?.length||!e.series?.every((o,r)=>o.type===i.series?.[r].type)),n=i.legend!=null&&e.legend==null;return a||n}applyMiniChartOptions(e,i,s,a){const n=a?.navigator?.miniChart?.series??a?.series,o=this.applySeries(e,this.filterMiniChartSeries(i),this.filterMiniChartSeries(n));this.applyAxes(e,s,a,o,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]);const r=e.series;for(const h of r)h.properties.id=void 0;const l=e.axes,c=l.find(h=>h.direction==="x");for(const h of l)h.nice=!1,h.gridLine.enabled=!1,h.label.enabled=h===c,h.tick.enabled=!1,h.interactionEnabled=!1;if(c!=null){const h=s.navigator?.miniChart,u=h?.label,d=h?.label?.interval;if(c.line.enabled=!1,c.label.set(dt(u,["interval","autoRotate","autoRotateAngle","itemStyler","minSpacing","rotation"])),c.type==="grouped-category"){c.label.enabled=!1,c.label.rotation=0;const{depthOptions:p}=c;if(p.length===0)p.set([{label:{enabled:!0}}]);else for(let g=1;g<p.length;g++)p[g].label.enabled=!1}else(c.type==="time"||c.type==="unit-time"||c.type==="ordinal-time")&&(c.parentLevel.enabled=!1);c.interval.step=d?.step,c.interval.values=d?.values,c.interval.minSpacing=d?.minSpacing,c.interval.maxSpacing=d?.maxSpacing}}applyModules(e){const{type:i}=this.constructor;let s=!1;for(const a of _o.byType("root","legend")){const o=e[a.optionsKey]!=null&&a.chartTypes.includes(i);o!==this.modulesManager.isEnabled(a)&&(o?(this.modulesManager.addModule(a,r=>r.moduleFactory(this.getModuleContext())),a.type==="legend"&&this.modulesManager.getModule(a)?.attachLegend(this.ctx.scene),this[a.optionsKey]=this.modulesManager.getModule(a)):(this.modulesManager.removeModule(a),delete this[a.optionsKey]),s=!0)}return s}initSeriesDeclarationOrder(e){for(let i=0;i<e.length;i++)e[i].setSeriesIndex(i)}applySeries(e,i,s){if(!i)return"no-change";const a=z7(e.series,i,s);if(a.status==="no-overlap"){fn(`Chart.applySeries() - creating new series instances, status: ${a.status}`,a);const h=i.map(u=>this.createSeries(u));return this.initSeriesDeclarationOrder(h),e.series=h,"replaced"}fn("Chart.applySeries() - matchResult",a);const n=[];let o=!1,r=!1,l=!1;const c=a.changes.toSorted((h,u)=>h.targetIdx-u.targetIdx);for(const h of c)switch(r||(r=h.status==="series-grouping"),o||(o=h.diff?.data!=null),l||(l=h.status!=="no-op"),h.status){case"add":{const u=this.createSeries(h.opts);n.push(u),fn("Chart.applySeries() - created new series",u);break}case"remove":fn(`Chart.applySeries() - removing series at previous idx ${h.idx}`,h.series);break;case"no-op":n.push(h.series),fn(`Chart.applySeries() - no change to series at previous idx ${h.idx}`,h.series);break;case"series-grouping":case"update":default:{const{series:u,diff:d,idx:p}=h;fn(`Chart.applySeries() - applying series diff previous idx ${p}`,d,u),this.applySeriesValues(u,d),u.markNodeDataDirty(),n.push(u)}}return this.initSeriesDeclarationOrder(n),fn("Chart.applySeries() - final series instances",n),e.series=n,r?"series-grouping-change":o?"data-change":l?"updated":"no-op"}applyAxes(e,i,s,a,n=[]){if(!("axes"in i)||!i.axes)return!1;n=["axes[].type",...n];const o=i.axes;return!(a==="replaced")&&e.axes.length===o.length&&e.axes.every((c,h)=>c.type===o[h].type)&&Iz(s)?(e.axes.forEach((c,h)=>{const u=s.axes?.[h]??{},d=Sr(u,o[h]);fn(`Chart.applyAxes() - applying axis diff idx ${h}`,d);const p=`axes[${h}]`;xm(c,d,{path:p,skip:n})}),!0):(fn(`Chart.applyAxes() - creating new axes instances; seriesStatus: ${a}`),e.axes=this.createAxis(o,n),!0)}createSeries(e){const i=Wn.create(e.type,this.getModuleContext());return this.applySeriesOptionModules(i,e),this.applySeriesValues(i,e),i}applySeriesOptionModules(e,i){const s=e.createModuleContext(),a=e.getModuleMap();for(const n of _o.byType("series-option"))n.optionsKey in i&&n.seriesTypes.includes(e.type)&&a.addModule(n,o=>o.moduleFactory(s))}applySeriesValues(e,i){const s=e.getModuleMap(),{type:a,data:n,listeners:o,seriesGrouping:r,showInMiniChart:l,...c}=i;for(const h of $p)if(h.type==="series-option"&&h.optionsKey in c){const u=s.getModule(h.optionsKey);if(u){const d=c[h.optionsKey];delete c[h.optionsKey],u.properties.set(d)}}c.visible!=null&&(e.visible=c.visible),e.properties.set(c),"data"in i&&e.setOptionsData(n),o&&this.registerListeners(e,o),"seriesGrouping"in i&&(r==null?e.seriesGrouping=void 0:e.seriesGrouping={...e.seriesGrouping,...r})}createAxis(e,i){const s=[],a=this.getModuleContext();for(let n=0;n<e.length;n++){const o=e[n],r=Tc.create(o.type,a);this.applyAxisModules(r,o),xm(r,o,{path:`axes[${n}]`,skip:i}),s.push(r)}return R7(s),s}applyAxisModules(e,i){const s=e.createModuleContext(),a=e.getModuleMap();for(const n of _o.byType("axis-option")){const o=i[n.optionsKey]!=null;o!==a.isEnabled(n)&&(o?(a.addModule(n,r=>r.moduleFactory(s)),e[n.optionsKey]=a.getModule(n)):(a.removeModule(n),delete e[n.optionsKey]))}}registerListeners(e,i){e.clearEventListeners();for(const[s,a]of Oo(i))e.addEventListener(s,a)}},Ve.chartsInstances=new WeakMap,S([Na({newValue(t){this.destroyed||(this.ctx.domManager.setContainer(t),Ve.chartsInstances.set(t,this))},oldValue(t){Ve.chartsInstances.delete(t)}})],Ve.prototype,"container",2),S([Na({newValue(t){this.resize("width option",{inWidth:t})}})],Ve.prototype,"width",2),S([Na({newValue(t){this.resize("height option",{inHeight:t})}})],Ve.prototype,"height",2),S([Na({newValue(t){this.resize("minWidth option",{inMinWidth:t})}})],Ve.prototype,"minWidth",2),S([Na({newValue(t){this.resize("minHeight option",{inMinHeight:t})}})],Ve.prototype,"minHeight",2),S([Na({newValue(t){this.resize("overrideDevicePixelRatio option",{inOverrideDevicePixelRatio:t})}})],Ve.prototype,"overrideDevicePixelRatio",2),S([k],Ve.prototype,"padding",2),S([k],Ve.prototype,"seriesArea",2),S([k],Ve.prototype,"keyboard",2),S([k],Ve.prototype,"touch",2),S([k],Ve.prototype,"mode",2),S([k],Ve.prototype,"styleNonce",2),S([ge("chartCaptions.title")],Ve.prototype,"title",2),S([ge("chartCaptions.subtitle")],Ve.prototype,"subtitle",2),S([ge("chartCaptions.footnote")],Ve.prototype,"footnote",2),S([k],Ve.prototype,"formatter",2),S([k],Ve.prototype,"suppressFieldDotNotation",2),S([k],Ve.prototype,"loadGoogleFonts",2),S([Na({changeValue(t,e){this.onAxisChange(t,e)}})],Ve.prototype,"axes",2),S([Na({changeValue(t,e){this.onSeriesChange(t,e)}})],Ve.prototype,"series",2),ty=Ve}});function gF(t,e){let i=[];const s=gL(t),a=t?.series?.[0]?.type,n=a?Se.get(a):"unknown";for(const o of $p)if(!(n!=="unknown"&&!o.chartTypes.includes(n))){if(o.type==="root"||o.type==="legend"){const r=t[o.optionsKey];if(r==null)continue;o.optionsInnerKey?r[o.optionsInnerKey]&&(i.push(`${o.optionsKey}.${o.optionsInnerKey}`),delete r[o.optionsInnerKey]):(i.push(o.optionsKey),delete t[o.optionsKey])}else if(o.type==="axis"){if(!("axes"in t)||!ss(t.axes)||!t.axes?.some(r=>r.type===o.identifier))continue;i.push(`axis[type=${o.identifier}]`),t.axes=t.axes.filter(r=>r.type!==o.identifier)}else if(o.type==="axis-option"){if(!("axes"in t)||!ss(t.axes)||!t.axes?.some(r=>r[o.optionsKey]))continue;i.push(`axis.${o.optionsKey}`),t.axes.forEach(r=>{r[o.optionsKey]&&delete r[o.optionsKey]})}else if(o.type==="series"){if(o.community||!ss(t.series)||!t.series?.some(r=>r.type===o.identifier))continue;i.push(`series[type=${o.identifier}]`),t.series=t.series.filter(r=>r.type!==o.identifier)}else if(o.type==="series-option"){if(!ss(t.series)||!t.series?.some(r=>r[o.optionsKey]))continue;i.push(`series.${o.optionsKey}`),t.series.forEach(r=>{r[o.optionsKey]&&delete r[o.optionsKey]})}}if(i.length&&!e){s&&(i=["AgCharts.createGauge"]);let o="ag-charts-enterprise",r="https://www.ag-grid.com/charts/javascript/installation/";t.mode==="integrated"&&(o="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",r="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),ut.warnOnce([`unable to use these enterprise features as '${o}' has not been loaded:`,"",...i,"",`See: ${r}`].join(`
`))}}function pQ(t){const e="mode"in t&&t.mode==="integrated";for(const i of _o.byType("root","legend")){const s=t[i.optionsKey],a=s!=null&&s.enabled===!1,n=!("removable"in i)||i.removable===!0||i.removable==="standalone-only"&&!e;a&&n&&delete t[i.optionsKey]}}var gQ=I({"packages/ag-charts-community/src/chart/factory/processEnterpriseOptions.ts"(){"use strict";R(),xr(),Jp(),Wu(),tS()}});function fF(t){return t?.up||t?.down||t?.neutral?"user-full":t?.fills||t?.strokes?"user-indexed":"inbuilt"}var mF=I({"packages/ag-charts-community/src/module/coreModulesTypes.ts"(){"use strict"}}),ri,jo,NS=I({"packages/ag-charts-community/src/chart/themes/defaultColors.ts"(){"use strict";ri={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},jo={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"}}}),OL={};La(OL,{DEFAULT_ANNOTATION_HANDLE_FILL:()=>og,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>cg,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>hg,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>ug,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>dg,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>rg,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>lg,DEFAULT_CAPTION_ALIGNMENT:()=>wl,DEFAULT_CAPTION_LAYOUT_STYLE:()=>Ll,DEFAULT_FIBONACCI_STROKES:()=>ag,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:()=>Ti,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:()=>Ye,DEFAULT_GRIDLINE_ENABLED:()=>Zn,DEFAULT_POLAR_SERIES_STROKE:()=>ry,DEFAULT_SEPARATION_LINES_COLOUR:()=>sg,DEFAULT_SHADOW_COLOUR:()=>Cl,DEFAULT_SPARKLINE_CROSSHAIR_STROKE:()=>ly,DEFAULT_TEXTBOX_COLOR:()=>fg,DEFAULT_TEXTBOX_FILL:()=>pg,DEFAULT_TEXTBOX_STROKE:()=>gg,DEFAULT_TEXT_ANNOTATION_COLOR:()=>ng,DEFAULT_TOOLBAR_POSITION:()=>mg,IS_DARK_THEME:()=>Ju,PALETTE_ALT_DOWN_FILL:()=>ES,PALETTE_ALT_DOWN_STROKE:()=>PS,PALETTE_ALT_NEUTRAL_FILL:()=>RS,PALETTE_ALT_NEUTRAL_STROKE:()=>BS,PALETTE_ALT_UP_FILL:()=>_S,PALETTE_ALT_UP_STROKE:()=>OS,PALETTE_DOWN_FILL:()=>ay,PALETTE_DOWN_STROKE:()=>iy,PALETTE_NEUTRAL_FILL:()=>oy,PALETTE_NEUTRAL_STROKE:()=>ny,PALETTE_UP_FILL:()=>sy,PALETTE_UP_STROKE:()=>ey});var Ju,sg,Cl,Ll,wl,ey,iy,sy,ay,ny,oy,OS,PS,_S,ES,RS,BS,ry,ly,Ye,ag,ng,Ti,og,rg,lg,cg,hg,ug,dg,pg,gg,fg,mg,Zn,li=I({"packages/ag-charts-community/src/chart/themes/symbols.ts"(){"use strict";Ju=Symbol("is-dark-theme"),sg=Symbol("default-separation-lines-colour"),Cl=Symbol("default-shadow-colour"),Ll=Symbol("default-caption-layout-style"),wl=Symbol("default-caption-alignment"),ey=Symbol("palette-up-stroke"),iy=Symbol("palette-down-stroke"),sy=Symbol("palette-up-fill"),ay=Symbol("palette-down-fill"),ny=Symbol("palette-neutral-stroke"),oy=Symbol("palette-neutral-fill"),OS=Symbol("palette-alt-up-stroke"),PS=Symbol("palette-alt-down-stroke"),_S=Symbol("palette-alt-up-fill"),ES=Symbol("palette-alt-down-fill"),RS=Symbol("palette-gray-fill"),BS=Symbol("palette-gray-stroke"),ry=Symbol("default-polar-series-stroke"),ly=Symbol("default-sparkline-crosshair-stroke"),Ye=Symbol("default-financial-charts-annotation-stroke"),ag=Symbol("default-hierarchy-strokes"),ng=Symbol("default-text-annotation-color"),Ti=Symbol("default-financial-charts-annotation-background-fill"),og=Symbol("default-annotation-handle-fill"),rg=Symbol("default-annotation-statistics-fill"),lg=Symbol("default-annotation-statistics-stroke"),cg=Symbol("default-annotation-statistics-color"),hg=Symbol("default-annotation-statistics-divider-stroke"),ug=Symbol("default-annotation-statistics-fill"),dg=Symbol("default-annotation-statistics-stroke"),pg=Symbol("default-textbox-fill"),gg=Symbol("default-textbox-stroke"),fg=Symbol("default-textbox-color"),mg=Symbol("default-toolbar-position"),Zn=Symbol("default-gridline-enabled")}});function mn(t){return C_(t,e=>{const i=be.fromString(e);return[be.darken(i,.15).toString(),e,be.lighten(i,.15).toString()]})}function Vc(t=!0){return{enabled:!0,highlightedItem:t?_L:FS,unhighlightedItem:{strokeWidth:{$path:["../../highlightStyle/series/strokeWidth",void 0]}},highlightedSeries:{strokeWidth:{$path:["../../highlightStyle/series/strokeWidth",void 0]}},unhighlightedSeries:{opacity:{$path:["../../highlightStyle/series/dimOpacity",void 0]}}}}function yF(t=!0){return{enabled:!0,highlightedItem:t?_L:FS,unhighlightedItem:{strokeWidth:{$path:["../../highlightStyle/series/strokeWidth",void 0]},opacity:{$path:["../../highlightStyle/series/dimOpacity",void 0]}}}}var PL,xF,zS,cy,bF,Tl,Gc,FS,_L,bi=I({"packages/ag-charts-community/src/chart/themes/util.ts"(){"use strict";fu(),Pt(),PL=[{type:"number",position:{$if:[{$eq:[{$path:["/series/0/direction",void 0]},"horizontal"]},"bottom","left"]}},{type:"category",position:{$if:[{$eq:[{$path:["/series/0/direction",void 0]},"horizontal"]},"left","bottom"]}}],xF={$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isPattern:{$palette:"fill"}},{$isImage:{$value:"$1"}}]},{$palette:"fillFallback"},{$palette:"fill"}]},zS={$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isPattern:{$palette:"fill"}},{$isImage:{$value:"$1"}}]},{$palette:"fillsFallback"},{$palette:"fills"}]},cy={$if:[{$isGradient:{$palette:"fill"}},{$palette:"fillFallback"},{$if:[{$isPattern:{$palette:"fill"}},{$path:["/stroke",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},bF={$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isPattern:{$palette:"fill"}},{$isImage:{$value:"$1"}}]},[{$palette:"fillFallback"},{$palette:"fillFallback"}],{$palette:"range2"}]},Tl={type:"pattern",pattern:"forward-slanted-lines",width:10,height:10,padding:2,fill:{$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isImage:{$palette:"fill"}}]},{$palette:"fillFallback"},{$if:[{$isPattern:{$palette:"fill"}},{$path:["/fill",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},fillOpacity:1,stroke:cy,strokeOpacity:1,strokeWidth:4,backgroundFill:"none",backgroundFillOpacity:1,rotation:0,scale:1},Gc={type:"image",backgroundFill:{$palette:"fillFallback"},backgroundFillOpacity:1,repeat:"no-repeat",fit:"contain",rotation:0},FS={stroke:{$path:["../../highlightStyle/item/stroke","rgba(0, 0, 0, 0.4)"]},strokeWidth:{$path:["../../highlightStyle/item/strokeWidth",2]},strokeOpacity:{$path:["../../highlightStyle/item/strokeOpacity",void 0]},opacity:{$path:["../../highlightStyle/item/opacity",1]}},_L={...FS,fill:{$path:["../../highlightStyle/item/fill","rgba(255,255,255, 0.33)"]},fillOpacity:{$path:["../../highlightStyle/item/fillOpacity",void 0]}}}});function fQ(t){return SF[t]===!0}var VS,vF,SF,Ra,Xn,Nl=I({"packages/ag-charts-community/src/chart/themes/chartTheme.ts"(){"use strict";R(),mF(),fu(),Ta(),Pt(),Jv(),Wu(),FC(),Om(),Rp(),NS(),li(),bi(),VS="white",vF={get cartesian(){return{seriesTypes:Se.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:Se.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:Se.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:Se.topologyTypes,commonOptions:[]}},get"flow-proportion"(){return{seriesTypes:Se.flowProportionTypes,commonOptions:[]}},get standalone(){return{seriesTypes:Se.standaloneTypes,commonOptions:[]}},get gauge(){return{seriesTypes:Se.gaugeTypes,commonOptions:[]}}},SF={"radial-gauge":!0,"linear-gauge":!0},Ra=class xb{static getDefaultColors(){return{fills:ri,fillsFallback:Object.values(ri),strokes:jo,sequentialColors:mn(ri),divergingColors:[ri.ORANGE,ri.YELLOW,ri.GREEN],hierarchyColors:["#fff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"],secondSequentialColors:be.interpolate([be.fromHexString(ri.BLUE),be.fromHexString("#cbdef5")],8).map(e=>e.toString()),secondDivergingColors:[ri.GREEN,ri.YELLOW,ri.RED],secondHierarchyColors:["#fff","#c5cbd1","#a4b1bd","#8498a9","#648096"],up:{fill:ri.GREEN,stroke:jo.GREEN},down:{fill:ri.RED,stroke:jo.RED},neutral:{fill:ri.GRAY,stroke:jo.GRAY},altUp:{fill:ri.BLUE,stroke:jo.BLUE},altDown:{fill:ri.ORANGE,stroke:jo.ORANGE},altNeutral:{fill:ri.GRAY,stroke:jo.GRAY}}}static getDefaultPublicParameters(){return{accentColor:"#2196f3",axisColor:{$foregroundBackgroundMix:.325},backgroundColor:VS,borderColor:{$foregroundOpacity:.15},borderRadius:4,chartBackgroundColor:{$ref:"backgroundColor"},chartPadding:20,focusShadow:"0 0 0 3px var(--ag-charts-accent-color)",foregroundColor:"#181d1f",fontFamily:"Verdana, sans-serif",fontSize:kr,fontWeight:400,gridLineColor:{$foregroundBackgroundMix:.1},popupShadow:"0 0 16px rgba(0, 0, 0, 0.15)",subtleTextColor:{$mix:[{$ref:"textColor"},{$ref:"chartBackgroundColor"},.38]},textColor:{$ref:"foregroundColor"},chromeBackgroundColor:{$foregroundBackgroundMix:.02},chromeFontFamily:{$ref:"fontFamily"},chromeFontSize:{$ref:"fontSize"},chromeFontWeight:{$ref:"fontWeight"},chromeTextColor:{$ref:"foregroundColor"},chromeSubtleTextColor:{$mix:[{$ref:"chromeTextColor"},{$ref:"backgroundColor"},.38]},buttonBackgroundColor:{$ref:"backgroundColor"},buttonBorder:!0,buttonFontWeight:400,buttonTextColor:{$ref:"textColor"},inputBackgroundColor:{$ref:"backgroundColor"},inputBorder:!0,inputTextColor:{$ref:"textColor"},menuBackgroundColor:{$ref:"chromeBackgroundColor"},menuBorder:!0,menuTextColor:{$ref:"chromeTextColor"},panelBackgroundColor:{$ref:"chromeBackgroundColor"},panelSubtleTextColor:{$ref:"chromeSubtleTextColor"},tooltipBackgroundColor:{$ref:"chromeBackgroundColor"},tooltipBorder:!0,tooltipTextColor:{$ref:"chromeTextColor"},tooltipSubtleTextColor:{$ref:"chromeSubtleTextColor"},crosshairLabelBackgroundColor:{$ref:"foregroundColor"},crosshairLabelTextColor:{$ref:"chartBackgroundColor"}}}static getAxisDefaults(e,{title:i,time:s}){return se(e,i&&{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:Oa.MEDIUM},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}}},s&&{parentLevel:{enabled:!1,label:{enabled:{$path:"../../label/enabled"},fontSize:{$path:"../../label/fontSize"},fontFamily:{$path:"../../label/fontFamily"},fontWeight:"bold",spacing:{$path:"../../label/spacing"},color:{$path:"../../label/color"},avoidCollisions:{$path:"../../label/avoidCollisions"}},tick:{enabled:{$path:"../../tick/enabled"},width:{$path:"../../tick/width"},size:{$path:"../../tick/size"},stroke:{$path:"../../tick/stroke"}}}},{label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:11,color:{$ref:"textColor"},avoidCollisions:!0},line:{enabled:!0,width:1,stroke:{$ref:"axisColor"}},tick:{enabled:!1,size:6,width:1,stroke:{$ref:"axisColor"}},gridLine:{enabled:!0,style:{$apply:[{stroke:{$ref:"gridLineColor"},lineDash:[]},[{stroke:{$ref:"gridLineColor"},lineDash:[]}]]}},crossLines:{$apply:[{enabled:!0,fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},fillOpacity:.08,strokeWidth:1,label:{fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},padding:5,color:{$ref:"textColor"}}},void 0,{$pathString:["/common/axes/$axisType/crossLines",{axisType:{$path:["/axes/$index/type"]}}]},{$pathString:["/$seriesType/axes/$axisType/crossLines",{seriesType:{$path:["/series/0/type","line"]},axisType:{$path:["/axes/$index/type"]}}]}]}})}getChartDefaults(){return{minHeight:300,minWidth:300,background:{visible:!0,fill:{$ref:"chartBackgroundColor"}},padding:{top:{$ref:"chartPadding"},right:{$ref:"chartPadding"},bottom:{$ref:"chartPadding"},left:{$ref:"chartPadding"}},seriesArea:{padding:{top:0,right:0,bottom:0,left:0}},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",spacing:{$if:[{$path:"../subtitle/enabled"},10,20]},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:Oa.LARGEST},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},wrapping:"hyphenate",layoutStyle:Ll,textAlign:wl},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:Oa.MEDIUM},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},wrapping:"hyphenate",layoutStyle:Ll,textAlign:wl},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:{$rem:Oa.MEDIUM},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"subtleTextColor"},wrapping:"hyphenate",layoutStyle:Ll,textAlign:wl},legend:{enabled:{$and:[{$greaterThan:[{$size:[{$path:"/series"}]},1]},{$or:[{$isChartType:"cartesian"},{$isChartType:"standalone"},{$and:[{$isChartType:"polar"},{$not:{$isSeriesType:"pie"}},{$not:{$isSeriesType:"donut"}}]}]}]},position:"bottom",orientation:{$if:[{$or:[{$eq:[{$path:"./position"},"left"]},{$eq:[{$path:"./position"},"right"]}]},"vertical","horizontal"]},spacing:30,listeners:{},toggleSeries:!0,item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},showSeriesStroke:!0,label:{color:{$ref:"textColor"},fontSize:{$rem:Oa.SMALL},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"}}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:{$ref:"foregroundColor"}},inactiveStyle:{fill:{$ref:"subtleTextColor"}},highlightStyle:{fill:{$ref:"foregroundColor"}},label:{color:{$ref:"textColor"}}}},tooltip:{enabled:!0,darkTheme:Ju,delay:0,pagination:!1,mode:{$if:[{$and:[{$isChartType:"cartesian"},{$not:{$hasSeriesType:"bubble"}},{$not:{$hasSeriesType:"scatter"}},{$greaterThan:[{$size:[{$path:"/series"}]},1]},{$lessThan:[{$size:[{$path:"/series"}]},4]}]},"shared","single"]}},overlays:{darkTheme:Ju},listeners:{},series:{tooltip:{range:{$path:["/tooltip/range","exact"]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","pointer"]},placement:{$path:["/tooltip/position/placement",void 0]},xOffset:{$path:["/tooltip/position/xOffset",0]},yOffset:{$path:["/tooltip/position/yOffset",0]}}}}}}constructor(e={}){const{overrides:i,palette:s,params:a}=$e(e),n=this.createChartConfigPerChartType(this.getDefaults()),o={};i&&this.processOverrides(o,i);const{fills:r,strokes:l,sequentialColors:c,...h}=this.getDefaultColors();this.palette=dl(se(s,{fills:Object.values(r),strokes:Object.values(l),sequentialColors:Object.values(c),...h})),this.paletteType=fF(s),this.params=se(a,this.getPublicParameters()),this.config=dl($e(n)),this.overrides=dl(i),this.presets=dl(o)}processOverrides(e,i){Se.seriesTypes.forEach(s=>{const a=s,n=i[a];fQ(a)&&(e[a]=n,delete i[a])})}createChartConfigPerChartType(e){for(const[i,{seriesTypes:s}]of Oo(vF)){const a=iS.get(i);for(const n of s)e[n]??(e[n]=$e(a))}return e}getDefaults(){const e=(i,s)=>{const a={},n={axes:{},...eS.getThemeTemplates(),...this.getChartDefaults(),...iS.get(i)};for(const o of s){a[o]=se(Wn.getThemeTemplate(o),a[o]??$e(n));const{axes:r}=a[o];for(const l of Tc.keys())r[l]=se(r[l],Tc.getThemeTemplate(l),xb.axisDefault[l]);(o==="map-shape-background"||o==="map-line-background")&&delete a[o].series.tooltip}return a};return se(e("cartesian",Se.cartesianTypes),e("polar",Se.polarTypes),e("hierarchy",Se.hierarchyTypes),e("topology",Se.topologyTypes),e("flow-proportion",Se.flowProportionTypes),e("standalone",Se.standaloneTypes),e("gauge",Se.gaugeTypes))}static applyTemplateTheme(e,i,s){if(ss(e))for(let a=0;a<e.length;a++){const n=e[a];typeof n=="symbol"&&s?.has(n)&&(e[a]=s.get(n))}else for(const a of Object.keys(e)){const n=e[a];typeof n=="symbol"&&s?.has(n)&&(e[a]=s.get(n))}}templateTheme(e,i=!0){const s=i?$e(e):e,a=this.getTemplateParameters();return Dc(s,xb.applyTemplateTheme,void 0,void 0,a),s}getDefaultColors(){return xb.getDefaultColors()}getPublicParameters(){return xb.getDefaultPublicParameters()}getTemplateParameters(){const e=new Map;e.set(Ju,!1),e.set(sg,"#d9d9d9"),e.set(Cl,"#00000080"),e.set(ly,"#aaa"),e.set(Ll,"block"),e.set(wl,"center"),e.set(ag,["#797b86","#e24c4a","#f49d2d","#65ab58","#409682","#4db9d2","#5090dc","#3068f9","#e24c4a","#913aac","#d93e64"]),e.set(ry,VS),e.set(Ye,ri.BLUE),e.set(Ti,ri.BLUE),e.set(ng,ri.BLUE),e.set(og,VS),e.set(rg,"#fafafa"),e.set(lg,"#ddd"),e.set(cg,"#000"),e.set(hg,"#181d1f"),e.set(ug,"#e35c5c"),e.set(dg,"#e35c5c"),e.set(pg,"#fafafa"),e.set(gg,"#ddd"),e.set(fg,"#000"),e.set(mg,"top"),e.set(Zn,!1);const i=this.getDefaultColors();return e.set(ey,this.palette.up?.stroke??i.up.stroke),e.set(sy,this.palette.up?.fill??i.up.fill),e.set(iy,this.palette.down?.stroke??i.down.stroke),e.set(ay,this.palette.down?.fill??i.down.fill),e.set(ny,this.palette.neutral?.stroke??i.neutral.stroke),e.set(oy,this.palette.neutral?.fill??i.neutral.fill),e.set(OS,this.palette.altUp?.stroke??i.up.stroke),e.set(_S,this.palette.altUp?.fill??i.up.fill),e.set(PS,this.palette.altDown?.stroke??i.down.stroke),e.set(ES,this.palette.altDown?.fill??i.down.fill),e.set(RS,this.palette.altNeutral?.fill??i.altNeutral.fill),e.set(BS,this.palette.altNeutral?.stroke??i.altNeutral.stroke),e}},Ra.axisDefault={number:Ra.getAxisDefaults({keys:[],line:{enabled:!1},crosshair:{enabled:!0}},{title:!0,time:!1}),log:Ra.getAxisDefaults({keys:[],base:10,line:{enabled:!1},crosshair:{enabled:!0}},{title:!0,time:!1}),category:Ra.getAxisDefaults({keys:[],groupPaddingInner:.1,label:{autoRotate:!0,wrapping:"on-space"},gridLine:{enabled:Zn},crosshair:{enabled:!1}},{title:!0,time:!1}),"grouped-category":Ra.getAxisDefaults({keys:[],tick:{enabled:!0,stroke:sg},label:{spacing:10,rotation:270},maxThicknessRatio:.5,paddingInner:.4,groupPaddingInner:.2,crosshair:{enabled:!1}},{title:!0,time:!1}),time:Ra.getAxisDefaults({keys:[],gridLine:{enabled:Zn},crosshair:{enabled:!0}},{title:!0,time:!0}),"unit-time":Ra.getAxisDefaults({keys:[],groupPaddingInner:.1,label:{autoRotate:!1},gridLine:{enabled:Zn},crosshair:{enabled:!0},parentLevel:{enabled:!0}},{title:!0,time:!0}),"ordinal-time":Ra.getAxisDefaults({keys:[],groupPaddingInner:0,label:{autoRotate:!1},gridLine:{enabled:Zn},crosshair:{enabled:!0}},{title:!0,time:!0}),"angle-category":Ra.getAxisDefaults({label:{spacing:5},gridLine:{enabled:Zn},shape:{$findFirstSiblingNotOperation:void 0}},{title:!1,time:!1}),"angle-number":Ra.getAxisDefaults({label:{spacing:5},gridLine:{enabled:Zn}},{title:!1,time:!1}),"radius-category":Ra.getAxisDefaults({positionAngle:0,line:{enabled:!1}},{title:!0,time:!1}),"radius-number":Ra.getAxisDefaults({positionAngle:0,line:{enabled:!1},shape:{$findFirstSiblingNotOperation:void 0}},{title:!0,time:!1})},Xn=Ra}}),GS,Ss,jc,td,yg=I({"packages/ag-charts-community/src/chart/themes/darkTheme.ts"(){"use strict";Nl(),li(),bi(),GS="#192232",Ss={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},jc={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},td=class extends Xn{getDefaultColors(){return{fills:Ss,fillsFallback:Object.values(Ss),strokes:jc,sequentialColors:mn(Ss),divergingColors:[Ss.ORANGE,Ss.YELLOW,Ss.GREEN],hierarchyColors:["#192834","#253746","#324859","#3f596c","#4d6a80"],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],secondDivergingColors:[Ss.GREEN,Ss.YELLOW,Ss.RED],secondHierarchyColors:["#192834","#3b5164","#496275","#577287","#668399"],up:{fill:Ss.GREEN,stroke:jc.GREEN},down:{fill:Ss.RED,stroke:jc.RED},neutral:{fill:Ss.GRAY,stroke:jc.GRAY},altUp:{fill:Ss.BLUE,stroke:jc.BLUE},altDown:{fill:Ss.ORANGE,stroke:jc.ORANGE},altNeutral:{fill:Ss.GRAY,stroke:jc.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),axisColor:{$foregroundBackgroundMix:.737},backgroundColor:GS,borderColor:{$foregroundBackgroundMix:.216},chromeBackgroundColor:{$foregroundBackgroundMix:.07},foregroundColor:"#fff",gridLineColor:{$foregroundBackgroundMix:.257},popupShadow:"0 0 16px rgba(0, 0, 0, 0.33)",subtleTextColor:{$mix:[{$ref:"textColor"},{$ref:"chartBackgroundColor"},.57]},crosshairLabelBackgroundColor:{$foregroundBackgroundMix:.65}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ju,!0),t.set(ry,GS),t.set(sg,"#7f8389"),t.set(Ye,Ss.BLUE),t.set(ng,"#fff"),t.set(Ti,Ss.BLUE),t.set(og,GS),t.set(rg,"#28313e"),t.set(lg,"#4b525d"),t.set(cg,"#fff"),t.set(hg,"#fff"),t.set(pg,"#28313e"),t.set(gg,"#4b525d"),t.set(fg,"#fff"),t}constructor(t){super(t)}}}}),fa,Wc,MF,mQ=I({"packages/ag-charts-community/src/chart/themes/financialDark.ts"(){"use strict";yg(),li(),bi(),fa={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},Wc={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},MF=class extends td{getDefaultColors(){return{...super.getDefaultColors(),fills:{...fa},fillsFallback:Object.values({...fa}),strokes:{...Wc},sequentialColors:mn(fa),divergingColors:[fa.GREEN,fa.BLUE,fa.RED],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],up:{fill:fa.GREEN,stroke:Wc.GREEN},down:{fill:fa.RED,stroke:Wc.RED},neutral:{fill:fa.BLUE,stroke:Wc.BLUE},altUp:{fill:fa.GREEN,stroke:Wc.GREEN},altDown:{fill:fa.RED,stroke:Wc.RED},altNeutral:{fill:fa.GRAY,stroke:Wc.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),chartPadding:0,gridLineColor:{$foregroundBackgroundMix:.12}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,fa.BLUE),t.set(Ti,fa.BLUE),t.set(Ll,"overlay"),t.set(wl,"left"),t.set(mg,"bottom"),t.set(Zn,!0),t}}}}),ma,Hc,DF,yQ=I({"packages/ag-charts-community/src/chart/themes/financialLight.ts"(){"use strict";Nl(),li(),bi(),ma={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},Hc={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},DF=class extends Xn{getDefaultColors(){return{...super.getDefaultColors(),fills:{...ma},fillsFallback:Object.values({...ma}),strokes:{...Hc},sequentialColors:mn(ma),divergingColors:[ma.GREEN,ma.BLUE,ma.RED],up:{fill:ma.GREEN,stroke:Hc.GREEN},down:{fill:ma.RED,stroke:Hc.RED},neutral:{fill:ma.BLUE,stroke:Hc.BLUE},altUp:{fill:ma.GREEN,stroke:Hc.GREEN},altDown:{fill:ma.RED,stroke:Hc.RED},altNeutral:{fill:ma.GRAY,stroke:Hc.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),chartPadding:0,gridLineColor:{$foregroundBackgroundMix:.06}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,ma.BLUE),t.set(Ti,ma.BLUE),t.set(Ll,"overlay"),t.set(wl,"left"),t.set(mg,"bottom"),t.set(Zn,!0),t}}}}),Ms,$c,kF,xQ=I({"packages/ag-charts-community/src/chart/themes/materialDark.ts"(){"use strict";yg(),li(),bi(),Ms={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},$c={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},kF=class extends td{getDefaultColors(){return{...super.getDefaultColors(),fills:Ms,fillsFallback:Object.values(Ms),strokes:$c,sequentialColors:mn(Ms),divergingColors:[Ms.ORANGE,Ms.YELLOW,Ms.GREEN],secondSequentialColors:["#2196f3","#208FEC","#1E88E5","#1C7FDC","#1976d2","#176EC9","#1565c0"],secondDivergingColors:[Ms.GREEN,Ms.YELLOW,Ms.RED],up:{fill:Ms.GREEN,stroke:$c.GREEN},down:{fill:Ms.RED,stroke:$c.RED},neutral:{fill:Ms.GRAY,stroke:$c.GRAY},altUp:{fill:Ms.BLUE,stroke:$c.BLUE},altDown:{fill:Ms.RED,stroke:$c.RED},altNeutral:{fill:Ms.GRAY,stroke:$c.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,Ms.BLUE),t.set(Ti,Ms.BLUE),t}}}}),Ds,Uc,IF,bQ=I({"packages/ag-charts-community/src/chart/themes/materialLight.ts"(){"use strict";Nl(),li(),bi(),Ds={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Uc={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},IF=class extends Xn{getDefaultColors(){return{...super.getDefaultColors(),fills:Ds,fillsFallback:Object.values(Ds),strokes:Uc,sequentialColors:mn(Ds),divergingColors:[Ds.ORANGE,Ds.YELLOW,Ds.GREEN],secondSequentialColors:["#2196f3","#329EF4","#42a5f5","#53ADF6","#64b5f6","#7AC0F8","#90caf9"],secondDivergingColors:[Ds.GREEN,Ds.YELLOW,Ds.RED],up:{fill:Ds.GREEN,stroke:Uc.GREEN},down:{fill:Ds.RED,stroke:Uc.RED},neutral:{fill:Ds.GRAY,stroke:Uc.GRAY},altUp:{fill:Ds.BLUE,stroke:Uc.BLUE},altDown:{fill:Ds.RED,stroke:Uc.RED},altNeutral:{fill:Ds.GRAY,stroke:Uc.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,Ds.BLUE),t.set(Ti,Ds.BLUE),t}}}}),Ze,Kc,AF,vQ=I({"packages/ag-charts-community/src/chart/themes/polychromaDark.ts"(){"use strict";yg(),li(),bi(),Ze={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},Kc={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff",GRAY:"#eeeeee"},AF=class extends td{getDefaultColors(){return{fills:Ze,fillsFallback:Object.values(Ze),strokes:Kc,sequentialColors:mn(Ze),divergingColors:[Ze.BLUE,Ze.RED],hierarchyColors:[],secondSequentialColors:[Ze.BLUE,Ze.PURPLE,Ze.MAGENTA,Ze.PINK,Ze.RED,Ze.ORANGE,Ze.YELLOW,Ze.GREEN],secondDivergingColors:[Ze.BLUE,Ze.RED],secondHierarchyColors:[],up:{fill:Ze.GREEN,stroke:Kc.GREEN},down:{fill:Ze.RED,stroke:Kc.RED},neutral:{fill:Ze.GRAY,stroke:Kc.GRAY},altUp:{fill:Ze.BLUE,stroke:Kc.BLUE},altDown:{fill:Ze.RED,stroke:Kc.RED},altNeutral:{fill:Ze.GRAY,stroke:Kc.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,Ze.BLUE),t.set(Ti,Ze.BLUE),t}}}}),Xe,Yc,CF,SQ=I({"packages/ag-charts-community/src/chart/themes/polychromaLight.ts"(){"use strict";Nl(),li(),bi(),Xe={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},Yc={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb",GRAY:"#888888"},CF=class extends Xn{getDefaultColors(){return{...super.getDefaultColors(),fills:Xe,fillsFallback:Object.values(Xe),strokes:Yc,sequentialColors:mn(Xe),divergingColors:[Xe.BLUE,Xe.RED],hierarchyColors:[],secondSequentialColors:[Xe.BLUE,Xe.PURPLE,Xe.MAGENTA,Xe.PINK,Xe.RED,Xe.ORANGE,Xe.YELLOW,Xe.GREEN],secondDivergingColors:[Xe.BLUE,Xe.RED],secondHierarchyColors:[],up:{fill:Xe.GREEN,stroke:Yc.GREEN},down:{fill:Xe.RED,stroke:Yc.RED},neutral:{fill:Xe.GRAY,stroke:Yc.GRAY},altUp:{fill:Xe.BLUE,stroke:Yc.BLUE},altDown:{fill:Xe.RED,stroke:Yc.RED},altNeutral:{fill:Xe.GRAY,stroke:Yc.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,Xe.BLUE),t.set(Ti,Xe.BLUE),t}}}}),Ni,Ol,LF,MQ=I({"packages/ag-charts-community/src/chart/themes/sheetsDark.ts"(){"use strict";yg(),li(),bi(),Ni={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},Ol={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},LF=class extends td{getDefaultColors(){return{...super.getDefaultColors(),fills:{...Ni,RED:Ni.ORANGE},fillsFallback:Object.values({...Ni,RED:Ni.ORANGE}),strokes:{...Ol,RED:Ol.ORANGE},sequentialColors:mn({...Ni,RED:Ni.ORANGE}),divergingColors:[Ni.ORANGE,Ni.YELLOW,Ni.GREEN],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],secondDivergingColors:[Ni.GREEN,Ni.YELLOW,Ni.ORANGE],up:{fill:Ni.GREEN,stroke:Ol.GREEN},down:{fill:Ni.ORANGE,stroke:Ol.ORANGE},neutral:{fill:Ni.GRAY,stroke:Ol.GRAY},altUp:{fill:Ni.BLUE,stroke:Ol.BLUE},altDown:{fill:Ni.ORANGE,stroke:Ol.ORANGE},altNeutral:{fill:Ni.GRAY,stroke:Ol.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,Ni.BLUE),t.set(Ti,Ni.BLUE),t}}}}),Ki,Tr,wF,DQ=I({"packages/ag-charts-community/src/chart/themes/sheetsLight.ts"(){"use strict";Nl(),li(),bi(),Ki={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},Tr={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},wF=class extends Xn{getDefaultColors(){return{...super.getDefaultColors(),fills:{...Ki,RED:Ki.ORANGE},fillsFallback:Object.values({...Ki,RED:Ki.ORANGE}),strokes:{...Tr,RED:Tr.ORANGE},sequentialColors:mn({...Ki,RED:Ki.ORANGE}),divergingColors:[Ki.ORANGE,Ki.YELLOW,Ki.GREEN],secondSequentialColors:["#5090dc","#629be0","#73a6e3","#85b1e7","#96bcea","#a8c8ee","#b9d3f1","#cbdef5"],secondDivergingColors:[Ki.GREEN,Ki.YELLOW,Ki.ORANGE],secondHierarchyColors:[],up:{fill:Ki.GREEN,stroke:Tr.GREEN},down:{fill:Ki.ORANGE,stroke:Tr.ORANGE},neutral:{fill:Tr.GRAY,stroke:Tr.GRAY},altUp:{fill:Ki.BLUE,stroke:Tr.BLUE},altDown:{fill:Ki.ORANGE,stroke:Tr.ORANGE},altNeutral:{fill:Ki.GRAY,stroke:Tr.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,Ki.BLUE),t.set(Ti,Ki.BLUE),t}}}});function Zc(t,e){const i={enabled:Y,xOffset:nt,yOffset:nt,formatter:hl(Q),renderer:hl(Bt(Q,mi({text:Q,color:pt,backgroundColor:pt,opacity:Mt},"crosshair label renderer result object")))};let s;return t&&(s={...i,format:e?Bt(Q,mi({millisecond:Q,second:Q,hour:Q,day:Q,month:Q,year:Q})):Q}),{enabled:Y,snap:Y,label:s??i,...rt,...yt}}function Xc(t,e){return{min:ze(t,fr("max")),max:ze(t,mr("min")),nice:Y,interval:{step:e?Bt(vp,hy,jS):vp,values:wt(t),minSpacing:ze(K,fr("maxSpacing")),maxSpacing:ze(K,mr("minSpacing"))}}}var hy,EL,jS,qn,qc,Wo,Nr,Or,xg,WS,bg,RL,uy,Qc,Pr,vg,Jc=I({"packages/ag-charts-community/src/chart/axesOptionsDefs.ts"(){"use strict";R(),hy=ot("millisecond","second","minute","hour","day","month","year"),EL={unit:mt(hy),step:vp,epoch:ll,utc:Y},EL.every=oe,jS=mi(EL,"a time interval object"),qn=Qt(p_,"a valid number format string"),qc={enabled:Y,text:Q,padding:nt,...Ie},Wo=Qt({enabled:Y,type:mt(ot("line","range")),range:ze(Qt((t,{options:e})=>e.type==="range","crossLine type to be 'range'"),wt(Ct),cl(2,2)),value:ze(Qt((t,{options:e})=>e.type==="line","crossLine type to be 'line'"),Ct),label:qc,fill:pt,fillOpacity:Mt,...rt,...yt},"cross-line options"),Nr={...Wo,label:{...qc,position:ot("top","left","right","bottom","top-left","top-right","bottom-left","bottom-right","inside","inside-left","inside-right","inside-top","inside-bottom","inside-top-left","inside-bottom-left","inside-top-right","inside-bottom-right"),rotation:nt}},Or={enabled:Y,rotation:nt,avoidCollisions:Y,minSpacing:K,spacing:K,formatter:oe,itemStyler:Ne({...Ie,spacing:nt}),...Ie},xg={autoRotate:Y,autoRotateAngle:nt,wrapping:ot("never","always","hyphenate","on-space"),truncate:_t(Y),...Or},WS={format:qn,...xg},bg={format:Bt(Q,bp),...xg},RL={enabled:Y,width:K,size:K,stroke:pt},uy={enabled:Y,label:bg,tick:RL},Qc={reverse:Y,gridLine:{enabled:Y,width:K,style:bs({stroke:Bt(pt,Sp),lineDash:wt(K)},"a grid-line style object array")},interval:{values:wt(Ct),minSpacing:K},label:Or,line:{enabled:Y,width:K,stroke:pt},tick:RL,context:()=>!0},Qc.layoutConstraints=_t({stacked:mt(Y),align:mt(ot("start","end")),unit:mt(ot("percent","px")),width:mt(K)}),Pr={...Qc,keys:wt(Q),crossLines:bs(Nr,"a cross-line options array"),position:ot("top","right","bottom","left"),thickness:K,maxThicknessRatio:Mt,title:{enabled:Y,text:Q,spacing:K,formatter:oe,...Ie}},vg={enabled:Y,...ft,...rt,...yt},Pr.title._enabledFromTheme=_t(Y)}}),dy,BL,py,gy,zL,fy,my,HS,FL,TF,NF,VL,th,Qn,GL,Tt,Kt,Jn,_r,ye,Pl,Sg,yy,te,Ho,xy,Ba=I({"packages/ag-charts-community/src/chart/commonOptionsDefs.ts"(){"use strict";R(),xl(),Jc(),dy=Bt(ot("circle","cross","diamond","heart","plus","pin","square","star","triangle"),oe),BL=ot("never","always","hyphenate","on-space"),py=ot("top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"),gy=Bt(K,ot("exact","nearest")),zL=ot("pointer","start","middle","end"),fy={enabled:Y,text:Q,textAlign:ot("left","center","right"),wrapping:ot("never","always","hyphenate","on-space"),spacing:K,maxWidth:K,maxHeight:K,...Ie},fy.padding=_t(K),my={enabled:Y,text:Q,renderer:hl(Bt(Q,Lb))},HS=["defaults","download","zoom-to-cursor","pan-to-cursor","reset-zoom","toggle-series-visibility","toggle-other-series","separator"],FL={type:ot("action","separator"),showOn:ot("always","series-area","series-node","legend-item"),label:mt(Q),enabled:Y,action:oe,items:(t,e)=>VL(t,e)},FL.iconUrl=_t(Q),TF=mi(FL),NF=Qt((t,e)=>{let i;return typeof t=="string"?HS.includes(t)?i=!0:(i={valid:!1,invalid:[],cleared:null},i.invalid.push(new yc("invalid",`a context menu item string alias: ["${HS.join('", "')}"]`,t,e.path))):i=TF(t,e),i},`a context menu item object or string alias: [${HS.join(", ")}]`),VL=wt(NF,"a menu items array",!1),th={label:Q,ariaLabel:Q,tooltip:Q,icon:ot("align-center","align-left","align-right","arrow-drawing","arrow-down-drawing","arrow-up-drawing","callout-annotation","candlestick-series","close","comment-annotation","date-range-drawing","date-price-range-drawing","delete","disjoint-channel-drawing","drag-handle","fill-color","line-style-solid","line-style-dashed","line-style-dotted","high-low-series","hlc-series","hollow-candlestick-series","horizontal-line-drawing","line-color","line-series","line-with-markers-series","locked","measurer-drawing","note-annotation","ohlc-series","pan-end","pan-left","pan-right","pan-start","parallel-channel-drawing","position-bottom","position-center","position-top","price-label-annotation","price-range-drawing","reset","settings","step-line-series","text-annotation","trend-line-drawing","fibonacci-retracement-drawing","fibonacci-retracement-trend-based-drawing","unlocked","vertical-line-drawing","zoom-in","zoom-out")},Qn=Bt(Q,hl(Q)),GL=mi({x:Qn,y:Qn,angle:Qn,radius:Qn,size:Qn,color:Qn,label:Qn,secondaryLabel:Qn,sectorLabel:Qn,calloutLabel:Qn,legendItem:Qn}),Tt={width:K,height:K,minWidth:K,minHeight:K,suppressFieldDotNotation:Y,title:fy,subtitle:fy,footnote:fy,padding:{top:K,right:K,bottom:K,left:K},seriesArea:{clip:Y,padding:{top:K,right:K,bottom:K,left:K}},legend:{enabled:Y,position:ot("top","right","bottom","left"),orientation:ot("horizontal","vertical"),maxWidth:K,maxHeight:K,spacing:K,preventHidingAll:Y,reverseOrder:Y,toggleSeries:Y,item:{marker:{size:K,shape:dy,padding:K,strokeWidth:K},line:{length:K,strokeWidth:K},label:{maxLength:K,formatter:oe,...Ie},maxWidth:K,paddingX:K,paddingY:K,showSeriesStroke:Y},pagination:{marker:{size:K,shape:dy,padding:K},activeStyle:{...ft,...rt},inactiveStyle:{...ft,...rt},highlightStyle:{...ft,...rt},label:Ie},listeners:{legendItemClick:oe,legendItemDoubleClick:oe}},gradientLegend:{enabled:Y,position:ot("top","right","bottom","left"),spacing:K,reverseOrder:Y,gradient:{preferredLength:K,thickness:K},scale:{label:{...Ie,minSpacing:K,format:qn,formatter:oe},padding:K,interval:{step:nt,values:Js,minSpacing:ze(K,fr("maxSpacing")),maxSpacing:ze(K,mr("minSpacing"))}}},listeners:{seriesNodeClick:oe,seriesNodeDoubleClick:oe,seriesVisibilityChange:oe,click:oe,doubleClick:oe,annotations:oe,zoom:oe},loadGoogleFonts:Y,highlight:{range:ot("tooltip","node")},overlays:{loading:my,noData:my,noVisibleSeries:my,unsupportedBrowser:my},tooltip:{enabled:Y,showArrow:Y,pagination:Y,delay:K,range:gy,wrapping:BL,mode:ot("single","shared","compact"),position:{anchorTo:ot("pointer","node","chart"),placement:Bt(py,wt(py)),xOffset:nt,yOffset:nt}},animation:{enabled:Y,duration:K},contextMenu:{enabled:Y,items:VL},context:()=>!0,dataSource:{getData:oe},keyboard:{enabled:Y,tabIndex:nt},touch:{dragAction:ot("none","drag","hover")},ranges:{enabled:Y,buttons:bs({...th,value:Bt(nt,ze(wt(Bt(nt,ll)),cl(2,2)),oe)},"range button options array")},locale:{localeText:bp,getLocaleText:hl(Q)},background:{visible:Y,fill:pt,image:{url:mt(Q),top:nt,right:nt,bottom:nt,left:nt,width:K,height:K,opacity:Mt}},styleNonce:Q,sync:{enabled:Y,groupId:Q,axes:ot("x","y","xy"),nodeInteraction:Y,zoom:Y},zoom:{enabled:Y,enableAxisDragging:Y,enableDoubleClickToReset:Y,enablePanning:Y,enableScrolling:Y,enableSelecting:Y,enableTwoFingerZoom:Y,keepAspectRatio:Y,anchorPointX:zL,anchorPointY:zL,axes:ot("x","y","xy"),deceleration:Bt(ot("off","short","long"),Mt),minVisibleItems:K,panKey:ot("alt","ctrl","meta","shift"),scrollingStep:Mt,autoScaling:{enabled:Y,padding:Mt},buttons:{enabled:Y,buttons:bs({...th,value:ot("reset","zoom-in","zoom-out","pan-left","pan-right","pan-start","pan-end"),section:Q},"zoom button options array"),visible:ot("always","zoomed","hover")}},formatter:Bt(hl(Q),GL)},Tt.dataSource.requestThrottle=_t(K),Tt.dataSource.updateThrottle=_t(K),Tt.dataSource.updateDuringInteraction=_t(Y),Tt.zoom.enableIndependentAxes=_t(Y),Tt.statusBar=_t(Ct),Tt.foreground=_t({visible:Y,text:Q,image:{url:Q,top:nt,right:nt,bottom:nt,left:nt,width:K,height:K,opacity:Mt},...ft}),Tt.overrideDevicePixelRatio=_t(nt),Tt.sync.domainMode=_t(ot("direction","position","key")),Kt={cursor:Q,context:()=>!0,showInLegend:Y,nodeClickRange:gy,listeners:{seriesNodeClick:oe,seriesNodeDoubleClick:oe},highlightStyle:{item:{...ft,...rt},series:{enabled:Y,dimOpacity:Mt,strokeWidth:K}},highlight:bI(Le)},Jn={...Kt,id:Q,visible:Y,context:()=>!0,data:Js},Jn.seriesGrouping=_t(Ct),_r={enabled:Y,shape:dy,size:K,itemStyler:Ne({...ft,...rt,...yt,shape:dy,size:K}),...ft,...rt,...yt},ye={enabled:Y,formatter:oe,format:qn,...Ie},Pl={...ye,lineHeight:K,minimumFontSize:K,wrapping:BL,overflowStrategy:ot("ellipsis","hide")},Sg={visible:Y,cap:{visible:Y,length:K,lengthRatio:Mt,...rt,...yt},...rt,...yt},yy={...Sg,xLowerKey:Q,xUpperKey:Q,yLowerKey:Q,yUpperKey:Q,xLowerName:Q,xUpperName:Q,yLowerName:Q,yUpperName:Q,itemStyler:Ne({visible:Y,...rt,...yt,cap:{visible:Y,length:K,lengthRatio:Mt,...rt,...yt}})},te={enabled:Y,showArrow:Y,range:gy,renderer:hl(Bt(Q,mi({heading:Q,title:Q,data:bs({label:mt(Q),value:mt(Q)})},"tooltip renderer result object"))),position:{anchorTo:ot("node","pointer","chart"),placement:Bt(py,wt(py)),xOffset:nt,yOffset:nt},interaction:{enabled:Y}},Ho={enabled:Y,xOffset:nt,yOffset:nt,blur:K,color:pt},xy=ou({linear:{},smooth:{tension:Mt},step:{position:ot("start","middle","end")}},"interpolation line options")}}),Mg,by,vy,Sy,_l,My,Dg,jL=I({"packages/ag-charts-community/src/api/preset/gaugeOptionsDefs.ts"(){"use strict";R(),Jc(),Ba(),Pt(),Mg={fills:ze(cl(2),wt(mi({color:pt,stop:nt},"")),Nb),fillMode:ot("continuous","discrete")},by={value:mt(nt),text:Q,shape:Bt(ot("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),oe),placement:ot("before","after","middle"),spacing:K,size:K,rotation:nt,...ft,...rt,...yt},vy={value:mt(nt),text:Q,shape:Bt(ot("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),oe),placement:ot("inside","outside","middle"),spacing:K,size:K,rotation:nt,label:{...ye,spacing:K},...ft,...rt,...yt},Sy={direction:ot("horizontal","vertical"),cornerMode:ot("container","item"),cornerRadius:K,thickness:K,segmentation:{enabled:Y,spacing:K,interval:{values:wt(nt),step:nt,count:nt}},bar:{enabled:Y,thickness:K,thicknessRatio:Mt,...Mg,...ft,...rt,...yt},label:{...Pl,text:Q,spacing:K,avoidCollisions:Y,placement:ot("inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end")},tooltip:te,...dt(Kt,["listeners"])},_l={...Sy,...dt(Jn,["listeners"]),type:mt(ve("linear-gauge")),value:mt(nt),scale:{min:ze(nt,fr("max")),max:ze(nt,mr("min")),label:{enabled:Y,formatter:oe,rotation:nt,spacing:K,minSpacing:K,placement:ot("before","after"),avoidCollisions:Y,format:qn,...Ie},interval:{values:wt(nt),step:nt},...Mg,...ft,...rt,...yt},targets:bs(by,"target options array")},_l.margin=_t(nt),_l.defaultColorRange=_t(wt(pt)),_l.defaultTarget=_t({...by,value:nt,label:{...ye,spacing:nt}}),_l.defaultScale=_t(_l.scale),_l.scale.defaultFill=_t(pt),My={outerRadius:K,innerRadius:K,outerRadiusRatio:Mt,innerRadiusRatio:Mt,startAngle:nt,endAngle:nt,spacing:K,cornerMode:ot("container","item"),cornerRadius:K,scale:{min:ze(nt,fr("max")),max:ze(nt,mr("min")),label:{enabled:Y,formatter:oe,rotation:nt,spacing:K,minSpacing:K,avoidCollisions:Y,format:qn,...Ie},interval:{values:wt(nt),step:nt},...Mg,...ft,...rt,...yt},segmentation:{enabled:Y,spacing:K,interval:{values:wt(nt),step:nt,count:nt}},bar:{enabled:Y,...Mg,...ft,...rt,...yt},needle:{enabled:Y,spacing:K,radiusRatio:Mt,...ft,...rt,...yt},label:{text:Q,spacing:K,...Pl},secondaryLabel:{text:Q,...Pl},tooltip:te,...Kt},Dg={...My,...Jn,type:mt(ve("radial-gauge")),value:mt(nt),targets:bs(vy,"target options array")},Dg.defaultColorRange=_t(wt(pt)),Dg.defaultTarget=_t({...vy,value:nt,label:{...ye,spacing:nt}}),Dg.scale.defaultFill=_t(pt)}});function OF(t,e,i){if(i==null||i[0]===0&&i[1]===1)return{ticks:t,count:t.length};const s=Et(0,Math.floor(i[0]*t.length),t.length),a=Et(0,Math.ceil(i[1]*t.length),t.length),n=e?t.length-a:s,o=e?t.length-s:a;return{ticks:t.slice(n,o),count:t.length}}var PF=I({"packages/ag-charts-community/src/scale/scaleUtil.ts"(){"use strict";R()}});function _F(t){let e;const i=new Set;for(const s of t){const a=dn(s),n=i.size;i.add(a),i.size!==n?e?.push(s):e??(e=t.slice(0,i.size))}return e??t}function kQ(t,e){let i=-1;for(const s of t){const a=e.indexOf(s);if(a===-1)i=1/0;else{if(a<=i)return!1;i=a}}return!0}var kg,Dy=I({"packages/ag-charts-community/src/scale/categoryScale.ts"(){"use strict";Hm(),zu(),PF(),kg=class sZ extends wc{constructor(){super(...arguments),this.type="band",this.defaultTickCount=0,this.index=new Map,this.indexInitialised=!1,this._domain=[]}static is(e){return e instanceof sZ}set domain(e){this._domain!==e&&(this.invalid=!0,this._domain=e,this.index.clear(),this.indexInitialised=!1)}get domain(){return this._domain}get bands(){return this._domain}normalizeDomains(...e){let i;const s=new Set;let a=!0;for(const n of e)s.has(n)||(s.add(n),i==null?i=_F(n):(a&&(a=kQ(n,i)),i=_F([...i,...n])));return i??(i=[]),{domain:i,animatable:a}}toDomain(e){}invert(e,i=!1){this.refresh();const s=i?this.bandwidth/2:0,a=this.invertNearestIndex(Math.max(0,e-s));return i||e===this.ordinalRange(a)?this.domain[a]:void 0}ticks(e,i=this.domain,s){return OF(i,!1,s)}findIndex(e){const{index:i,indexInitialised:s}=this;if(!s){const{domain:a}=this;for(let n=0;n<a.length;n++)i.set(dn(a[n]),n);this.indexInitialised=!0}return i.get(dn(e))}}}}),ed,eh,id=I({"packages/ag-charts-community/src/chart/axis/categoryAxis.ts"(){"use strict";R(),Dy(),vt(),Km(),ed=class aZ extends Qp{constructor(e,i=new kg){super(e,i),this.groupPaddingInner=.1,this.includeInvisibleDomains=!0,this.nice=!1}static is(e){return e instanceof aZ}normaliseDataDomain(e){return{domain:e,clipped:!1}}updateScale(){super.updateScale();let{paddingInner:e,paddingOuter:i}=this;if(!pe(e)||!pe(i)){const s=this.reduceBandScalePadding();e??(e=s.inner),i??(i=s.outer)}this.scale.paddingInner=e??0,this.scale.paddingOuter=i??0}reduceBandScalePadding(){return this.boundSeries.reduce((e,i)=>{const s=i.getBandScalePadding?.();return s&&(e.inner>s.inner&&(e.inner=s.inner),e.outer<s.outer&&(e.outer=s.outer)),e},{inner:1/0,outer:-1/0})}tickFormatParams(e,i,s,a){return{type:"category"}}datumFormatParams(e,i,s,a,n){const{datum:o,seriesId:r,legendItemName:l,key:c,source:h,property:u,domain:d,boundSeries:p}=i;return Array.isArray(e)&&e.some(g=>typeof g!="string")?e=e.map(String):!Array.isArray(e)&&typeof e!="string"&&typeof e!="number"&&!(e instanceof Date)&&(e=String(e)),{type:"category",value:e,datum:o,seriesId:r,legendItemName:l,key:c,source:h,property:u,domain:d,boundSeries:p}}},ed.className="CategoryAxis",ed.type="category",S([k],ed.prototype,"groupPaddingInner",2),S([k],ed.prototype,"paddingInner",2),S([k],ed.prototype,"paddingOuter",2),eh=ed}}),WL,IQ=I({"packages/ag-charts-community/src/scale/groupedCategoryScale.ts"(){"use strict";Dy(),WL=class nZ extends kg{static is(e){return e instanceof nZ}normalizeDomains(...e){const{domain:i}=super.normalizeDomains(...e);return{domain:i,animatable:!1}}findIndex(e){return super.findIndex(e)??this.getMatchIndex(e)}getMatchIndex(e){const i=JSON.stringify(e),s=this._domain.find(a=>JSON.stringify(a)===i);if(s!=null)return super.findIndex(s)}}}});function El(t){if(t.length===0)return null;let e=1/0,i=-1/0;for(const a of t){const n=a instanceof Date?a.getTime():a;typeof n=="number"&&(n<e&&(e=n),n>i&&(i=n))}const s=[e,i];return s.every(isFinite)?s:null}function HL(t,e,i){let s=!1;return t.length>2&&(t=El(t)??[NaN,NaN]),e!=null&&(s||(s=e>t[0]),t=[e,t[1]]),i!=null&&(s||(s=i<t[1]),t=[t[0],i]),t[0]>t[1]&&(t=[]),{extent:t,clipped:s}}var Er=I({"packages/ag-charts-community/src/util/extent.ts"(){"use strict"}});function $S(t,e=[0,0]){for(const i of t)typeof i=="number"&&(i<0&&(e[0]+=i),i>0&&(e[1]+=i));return e}function AQ(t,e){return{id:t,matchGroupIds:[e],type:"aggregate",aggregateFunction:s=>$S(s)}}function EF(t,e){return{id:t,type:"aggregate",matchGroupIds:e?[e]:void 0,aggregateFunction:i=>$S(i),groupAggregateFunction:(i,s=[0,0])=>(s[0]+=i?.[0]??0,s[1]+=i?.[1]??0,s)}}function CQ(t,e){return{id:t,matchGroupIds:[e],type:"aggregate",aggregateFunction:s=>bl.extendDomain(s)}}function $L(t){return{id:t,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,i=[0,0])=>(i[0]+=e?.[0]??0,i[1]+=e?.[1]??0,i)}}function RF(t,e){return{id:t,matchGroupIds:e?[e]:void 0,type:"aggregate",aggregateFunction:s=>$S(s),groupAggregateFunction:(s,a=[0,0,-1])=>(a[0]+=s?.[0]??0,a[1]+=s?.[1]??0,a[2]++,a),finalFunction:(s=[0,0,0])=>{const a=s[0]+s[1];return a>=0?[0,a/s[2]]:[a/s[2],0]}}}function UL(t,e,i){const s={id:t,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(a,n=[])=>{const o=n[1]-n[0];return e.aggregateFunction(a).map(r=>r/o)}};return e.groupAggregateFunction&&(s.groupAggregateFunction=e.groupAggregateFunction),s}function BF(t){return()=>{let e=0;return i=>pe(i)?(e+=t?Math.max(0,i):i,e):i}}function zF(){return()=>{let t=0;return e=>{if(!pe(e))return e;const i=t;return t+=e,i}}}var KL=I({"packages/ag-charts-community/src/chart/data/aggregateFunctions.ts"(){"use strict";R(),TB()}});function FF(t){return t!=null&&cS(t)}function LQ(t){return t!=null}function VF(t){switch(t){case"number":case"log":case"time":case"unit-time":case"ordinal-time":case"color":return FF;default:return LQ}}function GF(t){switch(t){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function $o(t,e,i={}){return{property:t,type:"key",valueType:GF(e),validation:VF(e),...i}}function Yt(t,e,i={}){return{property:t,type:"value",valueType:GF(e),validation:VF(e),...i}}function jF(t,e={}){return{property:t,type:"value",valueType:"range",missingValue:1,processor:()=>()=>1,...e}}function WF(...t){const e=t.filter(i=>i!=null);return e.length===0?()=>ZF:e.length===1?e[0]:()=>{const i=e.map(s=>s());return(s,a)=>i.reduce((n,o)=>o(n,a),s)}}function YL(t,e={}){const{min:i=-1/0,max:s=1/0,processor:a,...n}=e;return{type:"value",property:t,valueType:"range",validation:FF,processor:WF(a,()=>o=>pe(o)?Et(i,o,s):o),...n}}function ky(t,e,i={}){const{onlyPositive:s,processor:a,...n}=i;return{...Yt(t,e,n),processor:WF(a,BF(s))}}function wQ(t,e,i={}){return{...Yt(t,e,i),processor:zF()}}function ih(t,e,i,s,a){return[Yt(t,a,s),UF(s.groupId,e,i,s.separateNegative),...s.rangeId!=null?[CQ(s.rangeId,s.groupId)]:[]]}function HF(t,e,i){return[Yt(t,e,i),KF(i.groupId)]}function TQ({normaliseTo:t}){const e=(i,s)=>{if(s===0)return null;const a=(i??0)*t/s;return a>=0?Math.min(t,a):Math.max(-t,a)};return()=>()=>(i,s,a)=>{const n=NQ(i,s,a);for(const o of s)for(const r of a.datumIndices[o]??[]){const l=i[o],c=l[r];if(c==null){l[r]=void 0;continue}l[r]=typeof c=="number"?e(c,n):c.map(h=>e(h,n))}}}function NQ(t,e,i){const s=[0,0];for(const a of e){const n=t[a];for(const o of i.datumIndices[a]??[]){const r=n[o];if(r==null)continue;const l=typeof r=="number"?r:Math.max(...r.map(h=>h??0)),c=l<0?0:1;c===0?s[c]=Math.min(s[c],l):s[c]=Math.max(s[c],l)}}return Math.max(Math.abs(s[0]),s[1])}function US(t,e){return{type:"group-value-processor",matchGroupIds:t,adjust:Hv({normaliseTo:e},TQ)}}function OQ({normaliseTo:t,zeroDomain:e,rangeMin:i,rangeMax:s}){const a=t[1]-t[0],n=(o,r,l)=>{const c=t[0]+(o-r)/l*a;return l===0?e:c>=t[1]?t[1]:c<t[0]?t[0]:c};return()=>(o,r)=>{let[l,c]=o.domain.values[r];i!=null&&(l=i),s!=null&&(c=s);const h=c-l;o.domain.values[r]=[t[0],t[1]];const u=o.columns[r];for(let d=0;d<u.length;d+=1)u[d]=n(u[d],l,h)}}function sd(t,e,i,s,a){return{type:"property-value-processor",property:t,adjust:Hv({normaliseTo:e,rangeMin:s,rangeMax:a,zeroDomain:i},OQ)}}function $F(t,e,i,s){let a=Cg|Iy;if(e.valueType==="category")return i.length<t&&(a&=~Cg),a;let n=s[0]?.valueOf();for(let o=1;a!==0&&o<s.length;o++){const r=s[o]?.valueOf();(!Number.isFinite(r)||n>r)&&(a&=~Iy),Number.isFinite(r)&&n===r&&(a&=~Cg),n=r}return a}function Ig(t){return{type:"processor",property:"animationValidation",calculate(e){const{keys:i,values:s}=e.defs,{input:{count:a},domain:{keys:n,values:o},keys:r,columns:l}=e;let c=Cg|Iy;if(a!==0){for(let h=0;c!==0&&h<i.length;h++)for(const u of i[h].scopes)c&=$F(a,i[h],n[h],r[h].get(u));for(let h=0;c!==0&&h<s.length;h++){const u=s[h];t?.includes(u.id)&&(c&=$F(a,u,o[h],l[h]))}}return{uniqueKeys:(c&Cg)!==0,orderedKeys:(c&Iy)!==0}}}}function PQ({mode:t,separateNegative:e}){return()=>()=>(i,s,a)=>{const n=[0,0];for(const o of s)for(const r of a.datumIndices[o]??[]){const l=i[o],c=l[r],h=zb(c)&&e?0:1;pe(c)&&(t==="normal"&&(n[h]+=c),l[r]=n[h],t==="trailing"&&(n[h]+=c))}}}function _Q({mode:t,sum:e}){return()=>{const i=[];let s=!0;return()=>(a,n,o)=>{let r=0;for(const l of n){const c=a[l];for(const h of o.datumIndices[l]??[]){const u=c[h],d=s&&e==="current"?0:i[l];i[l]=u;const p=e==="current"?u:d;if(!pe(u)||!pe(d)){c[h]=r;continue}t==="normal"&&(r+=p),c[h]=r,t==="trailing"&&(r+=p)}}s=!1}}}function UF(t,e,i,s=!1){let a;if(e.startsWith("window")){const n=e.endsWith("-trailing")?"trailing":"normal";a=Hv({mode:n,sum:i},_Q)}else a=Hv({mode:e,separateNegative:s},PQ);return{type:"group-value-processor",matchGroupIds:[t],adjust:a}}function EQ(){return()=>(t,e,i)=>{const s=new Float64Array(e.length);let a=0;for(const n of e){const o=t[n];for(const r of i.datumIndices[n]??[]){const l=o[r];s[a]=Number.isFinite(l)?l:NaN,a+=1,o[r]=s.subarray(0,a)}}}}function KF(t){return{type:"group-value-processor",matchGroupIds:[t],adjust:EQ}}function YF(t){return t.id??t.property}function RQ(t,e,i){const s=new Map,a=e.defs.values;for(let r=0;r<a.length;r+=1){const l=a[r];if(l.scopes?.includes(t)===!1)continue;const c=YF(l);if(s.has(c))return;s.set(c,r)}const n=[],o=i.defs.values;for(let r=0;r<o.length;r+=1){const l=o[r];if(l.scopes?.includes(t)===!1)continue;const c=YF(l),h=s.get(c);if(h==null)return;s.delete(c),n.push({previousIndex:h,nextIndex:r})}if(s.size===0)return n}function ZL(t,e,i,s,a){for(const{previousIndex:n,nextIndex:o}of i){const r=t[n],l=e[o],c=r[s],h=l[a];if(c!==h)return!1}return!0}function Ag(t,e,i=!0){return{type:"processor",property:"diff",calculate(s,a){const n=new Map,o=new Map,r=new Map,l=new Map,c=e.keys,h=s.keys,u=e.columns,d=s.columns,p=RQ(t,e,s);if(p==null)return a;const g=Math.max(e.input.count,s.input.count);for(let m=0;m<g;m++){const b=m<e.input.count,v=m<s.input.count,M=b?Qv(c,t,m):void 0,D=M!=null?yn(M):"",L=v?Qv(h,t,m):void 0,C=L!=null?yn(L):"";if(v&&b&&D===C){ZL(u,d,p,m,m)||r.set(C,m);continue}const A=l.get(C);A!=null?((i||!ZL(u,d,p,A,m))&&(r.set(C,m),n.set(C,m)),l.delete(C)):v&&o.set(C,m);const T=o.get(D);T!=null?((i||!ZL(u,d,p,T,m))&&(r.set(D,m),n.set(D,m)),o.delete(D)):b&&(r.delete(D),l.set(D,m))}const x={changed:o.size>0||r.size>0||l.size>0,added:new Set(o.keys()),updated:new Set(r.keys()),removed:new Set(l.keys()),moved:new Set(n.keys())};return{...a,[t]:x}}}}function yn(t,...e){let i;return ss(t)?i=t.map(a=>HC(a)).join("___"):i=HC(t),(typeof i=="string"||typeof i=="number"||typeof i=="boolean"||i instanceof Date)&&e.length>0&&(i+=`___${e.join("___")}`),i}var ZF,XL,qL,QL,Cg,Iy,Rr=I({"packages/ag-charts-community/src/chart/data/processors.ts"(){"use strict";R(),Im(),_m(),KL(),jn(),ZF=function(t){return t},XL={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let t=NaN;return(e=1/0,i)=>{const s=typeof i[0]=="number"?i[0]:Number(i[0]),a=Math.abs(s-t);return t=s,!isNaN(a)&&a>0&&a<e?a:e}}},qL={type:"reducer",property:"largestKeyInterval",initialValue:-1/0,reducer:()=>{let t=NaN;return(e=-1/0,i)=>{const s=typeof i[0]=="number"?i[0]:Number(i[0]),a=Math.abs(s-t);return t=s,!isNaN(a)&&a>0&&a>e?a:e}}},QL={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:t}})=>t?.slice().sort((e,i)=>{for(let s=0;s<e.length;s++){const a=e[s]-i[s];if(a!==0)return a}return 0})},Cg=1,Iy=2}});function BQ(t){const e=t.reduce((s,a)=>s<a.length?a.length:s,0),i=new tV;for(let s=0;s<t.length;s++){const a=t[s];for(;a.length<e;)a.push("");i.insertTick(a,s)}return i}function zQ(t,e,i){const s=e.index-t.index,a=i/s;e.change-=a,e.shift+=i,t.change+=a,e.prelim+=i,e.mod+=i}function FQ(t,e,i){return e.getSiblings().indexOf(t.ancestor)>=0?t.ancestor:i}function VQ({children:t}){let e=0,i=0;for(let s=t.length-1;s>=0;s--){const a=t[s];a.prelim+=e,a.mod+=e,i+=a.change,e+=a.shift+i}}function GQ(t,e){const i=t.getLeftSibling();if(i){let s=t,a=t,n=i,o=a.getLeftmostSibling(),r=a.mod,l=s.mod,c=n.mod,h=o.mod;for(;n.nextRight()&&a.nextLeft();){n=n.nextRight(),a=a.nextLeft(),o=o.nextLeft(),s=s.nextRight(),s.ancestor=t;const u=n.prelim+c-(a.prelim+r)+1;u>0&&(zQ(FQ(n,t,e),t,u),r+=u,l+=u),c+=n.mod,r+=a.mod,h+=o.mod,l+=s.mod}n.nextRight()&&!s.nextRight()?s.mod+=c-l:(a.nextLeft()&&!o.nextLeft()&&(o.mod+=r-h),e=t)}return e}function XF(t){const{children:e}=t;if(e.length){let[i]=e;for(const n of e)XF(n),i=GQ(n,i);VQ(t);const s=(e[0].prelim+e.at(-1).prelim)/2,a=t.getLeftSibling();a?(t.prelim=a.prelim+1,t.mod=t.prelim-s):t.prelim=s}else{const i=t.getLeftSibling();t.prelim=i?i.prelim+1:0}}function qF(t,e,i){t.position=t.prelim+e,i.insertNode(t);for(const s of t.children)qF(s,e+t.mod,i)}function QF(t){const{children:e}=t;let i=0;for(const s of e)QF(s),s.children.length?i+=s.leafCount:i++;t.leafCount=i,e.length?(t.subtreeLeft=e[0].subtreeLeft,t.subtreeRight=e[e.length-1].subtreeRight,t.position=(t.subtreeLeft+t.subtreeRight)/2):(t.subtreeLeft=t.position,t.subtreeRight=t.position)}function jQ(t){const e=new eV,i=BQ(t);return XF(i),qF(i,-i.prelim,e),QF(i),e}var JF,tV,eV,WQ=I({"packages/ag-charts-community/src/chart/axis/tree.ts"(){"use strict";JF=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(t,e){t>this.right&&(this.right=t),t<this.left&&(this.left=t),e>this.bottom&&(this.bottom=e),e<this.top&&(this.top=e)}},tV=class oZ{constructor(e="",i,s){this.label=e,this.parent=i,this.refId=s,this.position=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.index=0,this.screen=0,this.depth=i?i.depth+1:0}insertTick(e,i){let s=this;for(let a=0;a<e.length;a++){const n=e[a],o=a!==e.length-1,{children:r}=s,l=r.find(c=>c.label===n);if(l&&o)s=l;else{const c=new oZ(n,s,i);c.index=r.length,r.push(c),o&&(s=c)}}}getLeftSibling(){return this.index>0?this.parent?.children[this.index-1]:void 0}getLeftmostSibling(){return this.index>0?this.parent?.children[0]:void 0}nextLeft(){return this.children[0]}nextRight(){return this.children.at(-1)}getSiblings(){return this.parent?.children.filter((e,i)=>i!==this.index)??[]}},eV=class{constructor(){this.dimensions=new JF,this.nodes=[],this.depth=0}insertNode(t){this.depth<t.depth&&(this.depth=t.depth),this.dimensions.update(t.position,t.depth),this.nodes.push(t)}scaling(t,e){let i=1;if(t>0){const{left:s,right:a}=this.dimensions;a!==s&&(i=t/(a-s))}return e&&(i*=-1),i}}}}),Uo,Ay,KS,sh,YS=I({"packages/ag-charts-community/src/chart/axis/groupedCategoryAxis.ts"(){"use strict";R(),IQ(),Wt(),cn(),ns(),$i(),Er(),vt(),hL(),ln(),Rr(),id(),WQ(),Uo=class extends Nt{constructor(){super(...arguments),this.enabled=!0}},S([k],Uo.prototype,"enabled",2),S([k],Uo.prototype,"avoidCollisions",2),S([k],Uo.prototype,"color",2),S([k],Uo.prototype,"spacing",2),S([k],Uo.prototype,"rotation",2),S([k],Uo.prototype,"fontStyle",2),S([k],Uo.prototype,"fontWeight",2),S([k],Uo.prototype,"fontSize",2),S([k],Uo.prototype,"fontFamily",2),Ay=class extends Nt{constructor(){super(...arguments),this.enabled=!0}},S([k],Ay.prototype,"enabled",2),S([k],Ay.prototype,"width",2),S([k],Ay.prototype,"stroke",2),KS=class extends Nt{constructor(){super(...arguments),this.label=new Uo,this.tick=new Ay}},S([k],KS.prototype,"label",2),S([k],KS.prototype,"tick",2),sh=class extends eh{constructor(t){super(t,new WL),this.tickScale=new WL,this.depthOptions=new Np(KS),this.includeInvisibleDomains=!0,this.tickScale.paddingInner=1,this.tickScale.paddingOuter=0}resizeTickTree(){if(!this.tickTreeLayout)return;const{nodes:t}=this.tickTreeLayout,{range:e,step:i,inset:s,bandwidth:a}=this.scale,n=Math.abs(e[1]-e[0])-i,o=this.tickTreeLayout.scaling(n,e[0]>e[1]),r=s+a/2;let l=0;for(const c of t){const h=c.position*o;l>h&&(l=h),c.screen=h+r}for(const c of t)c.screen-=l}getDepthOptionsMap(t){const e=[],{depthOptions:i,label:s}=this,a=this.horizontal?0:-90;for(let n=0;n<t;n++)e.push(i[n]?.label.enabled??s.enabled?{enabled:!0,spacing:i[n]?.label.spacing??s.spacing,rotation:i[n]?.label.rotation??(n?a:s.rotation),avoidCollisions:i[n]?.label.avoidCollisions??s.avoidCollisions}:{enabled:!1,spacing:0,rotation:0,avoidCollisions:!1});return e}updateCategoryLabels(){this.computedLayout&&this.tickLabelGroupSelection.update(this.computedLayout.tickLabelLayout).each((t,e)=>t.setProperties(e))}updateAxisLine(){this.computedLayout&&(this.lineNode.visible=this.line.enabled,this.lineNode.stroke=this.line.stroke,this.lineNode.strokeWidth=this.line.width)}computeLayout(){this.updateDirection(),this.updateScale();const{step:t}=this.scale,{title:e,label:i,range:s,depthOptions:a,horizontal:n,line:o}=this;if(this.lineNode.datum=n?{x1:s[0],x2:s[1],y1:0,y2:0}:{x1:0,x2:0,y1:s[0],y2:s[1]},this.lineNode.setProperties({stroke:o.stroke,strokeWidth:o.enabled?o.width:0}),this.resizeTickTree(),!this.tickTreeLayout?.depth)return{bbox:gt.zero,spacing:0,separatorLayout:[],tickLabelLayout:[]};const{depth:r,nodes:l}=this.tickTreeLayout,c=Math.ceil(i.fontSize/t),h=n?-i.getSideFlag():i.getSideFlag(),u=[],d=new Map,p=new Cu,g=this.getDepthOptionsMap(r),f=h*g[0].spacing,x=this.tickFormatter(this.scale.domain,this.scale.domain,!1),m=(N,O)=>{const E=r-N.depth;if(!g[E]?.enabled||O%c!==0||!l_(N.screen,s))return!1;const z=x(N.label,O-1),B=this.getLabelStyles({value:z,depth:E},a[E]?.label);return p.setProperties({...B,text:z,textAlign:"center",textBaseline:i.parallel?"top":"bottom",lineHeight:we.getLineHeight(B.fontSize),x:n?N.screen:f,y:n?f:N.screen,rotation:0}),!0},b={};l.forEach((N,O)=>{const E=r-N.depth;if(b[E]??(b[E]=0),!m(N,O)||!p.getBBox())return;d.set(O,p.getBBox()),p.rotation=gl(g[E]?.rotation);const{width:B,height:F}=p.getBBox(),V=n?F:B;b[E]<V&&(b[E]=V)});const v=cL(),M=new Map,D=N=>{if(N===0)return 0;let O=b[0];for(let E=1;E<=N;E++)O+=g[E].spacing,E!==N&&(O+=b[E]);return O};l.forEach((N,O)=>{if(O===0)return;const E=m(N,O),z=!N.children.length,B=r-N.depth;if(N.parent){const W=z?N.position:N.position-(N.leafCount-1)/2;if(!M.has(W)){const j=this.depthOptions[B]?.tick;let U=b[0];for(let Z=0;Z<=B;Z++)U+=g[Z].spacing,Z!==0&&(U+=b[Z]);M.set(W,{tickSize:U,tickStroke:j?.stroke,tickWidth:j?.enabled!==!1?j?.width:0})}}if(!E)return;const F=gl(g[B].rotation),{width:V,height:G}=d.get(O),H=D(B);if(p.textAlign="end",p.textBaseline="middle",p.rotation=F,n?(p.x+=V/2,p.y+=(H+QI(V/2,G/2,F))*h,p.rotationCenterX=N.screen,p.rotationCenterY=p.y):(p.x+=H*h+QI((g[B].spacing*h+V)/2,i.mirrored?V:0,F),p.rotationCenterX=p.x-V/2,p.rotationCenterY=N.screen),g[B].avoidCollisions){const{width:W,height:j}=p.getBBox(),U=n?W:j,Z=z?t:N.leafCount*t;if(U>Z){d.delete(O);return}}const{text:$=""}=p;u.push({text:$,visible:!0,range:this.scale.range,tickId:v($),fill:p.fill,fontFamily:p.fontFamily,fontSize:p.fontSize,fontStyle:p.fontStyle,fontWeight:p.fontWeight,rotation:p.rotation,rotationCenterX:p.rotationCenterX,rotationCenterY:p.rotationCenterY,textAlign:p.textAlign,textBaseline:p.textBaseline,x:p.x,y:p.y}),d.set(O,He.toCanvas(p))});const L=[...M.values()];L.push(L[0]);const C=[this.lineNodeBBox(),gt.merge(d.values()),new gt(0,0,L[0].tickSize*h,0)];let A=0;if(e.enabled){const N=gt.merge(C);A=n?N.height:N.width,C.push(this.titleBBox(this.scale.domain,A))}const T=gt.merge(C);return this.layoutCrossLines(),{bbox:T,spacing:A,separatorLayout:L,tickLabelLayout:u}}update(){if(!this.computedLayout)return;this.moduleCtx.animationManager.skipCurrentBatch();const{tickScale:t,tick:e,gridLine:i,gridLength:s}=this,{separatorLayout:a,spacing:n}=this.computedLayout,{position:o,horizontal:r,gridPadding:l}=this,c=o==="bottom"||o==="right"?-1:1,h=l,u=c*s-l,d=t.ticks({nice:!1,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0}).ticks.map((p,g)=>({tickId:yn(p,g),offset:Math.round(t.convert(p))}));this.gridLineGroupSelection.update(i.enabled&&s?d.map(({tickId:p,offset:g},f)=>{const[x,m,b,v]=r?[g,g,h,u]:[h,u,g,g],{style:M,width:D}=i,{stroke:L,lineDash:C}=M[f%M.length]??{};return{tickId:p,offset:g,x1:x,y1:b,x2:m,y2:v,stroke:L,strokeWidth:D,lineDash:C}}):[]),this.tickLineGroupSelection.update(e.enabled?d.map(({tickId:p,offset:g},f)=>{const{tickSize:x=this.getTickSize(),tickStroke:m=e.stroke,tickWidth:b=e.width}=a[f]??{},v=-c*x,[M,D,L,C]=r?[g,g,0,v]:[0,v,g,g];return{tickId:p,offset:g,x1:M,y1:L,x2:D,y2:C,stroke:m,strokeWidth:b,lineDash:void 0}}):[]),this.updatePosition(),this.updateCategoryLabels(),this.updateAxisLine(),this.updateGridLines(),this.updateTickLines(),this.updateTitle(this.scale.domain,n),this.updateCrossLines(),this.resetSelectionNodes()}calculateLayout(){const{separatorLayout:t,tickLabelLayout:e,spacing:i,bbox:s}=this.computeLayout();return this.computedLayout={separatorLayout:t,tickLabelLayout:e,spacing:i},{bbox:s,niceDomain:this.scale.domain}}onGridVisibilityChange(){this.gridLineGroupSelection.clear(),this.tickLabelGroupSelection.clear()}updateScale(){super.updateScale(),this.tickScale.range=this.scale.range,this.scale.paddingOuter=this.scale.paddingInner/2}processData(){const{direction:t}=this,e=this.boundSeries.filter(a=>a.visible).flatMap(a=>a.getDomain(t));this.dataDomain={domain:El(e)??this.filterDuplicateArrays(e),clipped:!1},this.isReversed()&&this.dataDomain.domain.reverse();const i=this.dataDomain.domain.map(a=>nm(xs(a)&&"value"in a?a.value:a));this.tickTreeLayout=jQ(i);const s=[];for(const a of this.tickTreeLayout.nodes)a.leafCount||a.refId==null||s.push(this.dataDomain.domain[a.refId]);this.scale.domain=JP(this.dataDomain.domain,s),this.tickScale.domain=i.concat([[""]])}filterDuplicateArrays(t){const e=new Set;return t.filter(i=>{const s=ss(i)?JSON.stringify(i):i;return e.has(s)?!1:(e.add(s),!0)})}},sh.className="GroupedCategoryAxis",sh.type="grouped-category",S([k],sh.prototype,"depthOptions",2)}});function JL(t,e,i){const s=Math.min(...e),a=iV[t]??sV;return s>=0?a(t,i):-a(t,-i)}function t2(t,e,i){const s=Math.min(...e),a=aV[t]??nV;return s>=0?a(t,i):-a(t,-i)}var iV,sV,aV,nV,ZS,e2=I({"packages/ag-charts-community/src/scale/logScale.ts"(){"use strict";R(),Gn(),Rc(),Bs(),PF(),iV={2:(t,e)=>Math.log2(e),[Math.E]:(t,e)=>Math.log(e),10:(t,e)=>Math.log10(e)},sV=(t,e)=>Math.log(e)/Math.log(t),aV={[Math.E]:(t,e)=>Math.exp(e),10:(t,e)=>e>=0?10**e:1/10**-e},nV=(t,e)=>t**e,ZS=class rZ extends me{constructor(e=[1,10],i=[0,1]){super(e,i),this.type="log",this.defaultClamp=!0,this.base=10,this.log=s=>JL(this.base,this.domain,s),this.pow=s=>t2(this.base,this.domain,s)}static is(e){return e instanceof rZ}transform(e){const[i,s]=ls(this.domain);return i>=0!=s>=0?NaN:i>=0?Math.log(e):-Math.log(-e)}transformInvert(e){const[i,s]=ls(this.domain);return i>=0!=s>=0?NaN:i>=0?Math.exp(e):-Math.exp(-e)}toDomain(e){return e}niceDomain(e,i=this.domain){if(i.length<2)return[];const{base:s}=this,[a,n]=i,o=a>n?Math.ceil:Math.floor,r=a>n?Math.floor:Math.ceil,l=t2(s,i,o(JL(s,i,a))),c=t2(s,i,r(JL(s,i,n)));return[l,c]}ticks({interval:e,tickCount:i=me.defaultTickCount},s=this.domain,a){if(!s||s.length<2||i<1)return;const n=this.base,[o,r]=s,l=Math.min(o,r),c=Math.max(o,r);let h=this.log(l),u=this.log(c);if(e){const x=D=>D>=l&&D<=c,m=Math.min(Math.abs(e),Math.abs(u-h)),{ticks:b,count:v}=bS(h,u,m,a),M=b.map(this.pow).filter(x);if(!Xp(M.length,this.getPixelRange()))return{ticks:M,count:v}}if(!c_(n)||u-h>=i){const x=Math.min(u-h,i),{ticks:m,count:b}=jm(h,u,x,void 0,void 0,a);return{ticks:m.map(this.pow),count:b}}const d=[],p=l>0;h=Math.floor(h)-1,u=Math.round(u)+1;const g=Nm(this.range)/i;let f=1/0;for(let x=h;x<=u;x++){const m=this.convert(this.pow(x+1));for(let b=1;b<n;b++){const v=p?b:n-b+1,M=this.pow(x)*v,D=this.convert(M),L=Math.abs(f-D),C=Math.abs(D-m),A=L>=g&&C>=g;M>=l&&M<=c&&(b===1||A||d.length===0)&&(d.push(M),f=D)}}return OF(d,p,a)}}}}),Ko,Lg=I({"packages/ag-charts-community/src/scale/linearScale.ts"(){"use strict";Rc(),Bs(),Ko=class vP extends me{constructor(){super([0,1],[0,1]),this.type="number"}static is(e){return e instanceof vP}static getTickStep(e,i,s){const{interval:a,tickCount:n=me.defaultTickCount,minTickCount:o,maxTickCount:r}=s;return a??Wm(e,i,n,o,r)}toDomain(e){return e}ticks({interval:e,tickCount:i=me.defaultTickCount,minTickCount:s,maxTickCount:a},n=this.domain,o){if(!n||n.length<2||i<1||!n.every(isFinite))return{ticks:[],count:0};const[r,l]=n;if(e){const c=Math.abs(e);if(!Xp((l-r)/c,this.getPixelRange()))return bS(r,l,c,o)}return jm(r,l,i,s,a,o)}niceDomain(e,i=this.domain){if(i.length<2)return[];const{tickCount:s=me.defaultTickCount}=e;let[a,n]=i;if(s===1)[a,n]=fz(a,n);else if(s>1){const o=a>n?Math.ceil:Math.floor,r=a>n?Math.floor:Math.ceil,l=4;for(let c=0;c<l;c++){const h=a,u=n,d=vP.getTickStep(a,n,e),[p,g]=i;if(a=o(p/d)*d,n=r(g/d)*d,a===h&&n===u)break}}return[a,n]}}}}),Yo,wg=I({"packages/ag-charts-community/src/chart/axis/numberAxis.ts"(){"use strict";Lg(),Er(),vt(),Rc(),Km(),Yo=class extends Qp{constructor(t,e=new Ko){super(t,e)}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:s,clipped:a}=HL(t,e,i);return{domain:s,clipped:a}}createDatumFormatter(t,e){const{format:i}=this.label;return typeof i=="number"?gz(e,i):void 0}tickFormatParams(t,e,i){return{type:"number",fractionDigits:i}}datumFormatParams(t,e,i){const{datum:s,seriesId:a,legendItemName:n,key:o,source:r,property:l,domain:c,boundSeries:h}=e;return{type:"number",value:t,datum:s,seriesId:a,legendItemName:n,key:o,source:r,property:l,domain:c,boundSeries:h,fractionDigits:i}}},Yo.className="NumberAxis",Yo.type="number",S([k],Yo.prototype,"min",2),S([k],Yo.prototype,"max",2)}}),ad,XS=I({"packages/ag-charts-community/src/chart/axis/logAxis.ts"(){"use strict";R(),e2(),Er(),wg(),ad=class extends Yo{normaliseDataDomain(t){const{min:e,max:i}=this,{extent:s,clipped:a}=HL(t,e,i);return s[0]<0&&s[1]>0||t[0]<0&&t[1]>0?(ut.warn("The log axis domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."),{domain:[],clipped:a}):s[0]===0||s[1]===0||t[0]===0||t[1]===0?(ut.warn("The log axis domain contains a value of 0, the chart data cannot be rendered. See log axis documentation for more information."),{domain:[],clipped:a}):{domain:s,clipped:a}}set base(t){this.scale.base=t}get base(){return this.scale.base}constructor(t){super(t,new ZS)}},ad.className="LogAxis",ad.type="log"}});function oV(t,e,i,s){const a=t.reduce((n,o)=>Math.min(o.minTimeInterval()??1/0,n),1/0);return Number.isFinite(a)?SS(a):rV(t,e,i,s)?.unit}function rV(t,e,i,s){let a=1/0,n=-1/0,o,r=0;const l=[];for(const d of t){if(!d.visible)continue;const{domain:p}=i2(d.getDomain(e),void 0,void 0);if(p.length===0)continue;const g=p[0].valueOf(),f=p[p.length-1].valueOf();l.push(g,f),a=Math.min(a??1/0,g,f),n=Math.max(n??-1/0,g,f);const x=Math.abs(f-g);if(x===0)continue;const m=d.dataCount();if(r=Math.max(r,m),m<=1)continue;const b=x/(m-1);o=Math.min(o??1/0,b)}if(a=Math.min(a,i?.valueOf()??1/0,s?.valueOf()??1/0),n=Math.max(n,i?.valueOf()??-1/0,s?.valueOf()??-1/0),!Number.isFinite(a)||!Number.isFinite(n))return;o??(o=Math.abs(n-a)),o=Math.min(o,HQ(l));const c=SS(o);let h=o/un(c);r<=2?h=Math.floor(h):h=Math.round(h),h=Math.max(h,1);const u=h===1?void 0:Un(c,a);return{unit:c,step:h,epoch:u}}function HQ(t){t.sort((i,s)=>i-s);let e=1/0;for(let i=1;i<t.length;i++){const s=t[i-1],a=t[i];a-s>0&&(e=Math.min(e,Math.abs(a-s)))}return e}function i2(t,e,i){let s=!1;return typeof e=="number"&&(e=new Date(e)),typeof i=="number"&&(i=new Date(i)),t.length>2&&(t=El(t)?.map(a=>new Date(a))??[]),e instanceof Date&&(s||(s=e>t[0]),t=[e,t[1]]),i instanceof Date&&(s||(s=i<t[1]),t=[t[0],i]),t[0]>t[1]&&(t=[]),{domain:t,clipped:s}}var nd,Zo,Tg=I({"packages/ag-charts-community/src/chart/axis/timeAxis.ts"(){"use strict";R(),DS(),Er(),vt(),ta(),Ar(),Hm(),hS(),$C(),Km(),nd=class extends Nt{constructor(){super(...arguments),this.enabled=!1,this.label=new Ui,this.tick=new Oc}},S([k],nd.prototype,"enabled",2),S([k],nd.prototype,"label",2),S([k],nd.prototype,"tick",2),Zo=class extends Qp{constructor(t){super(t,new Bc),this.parentLevel=new nd,this.min=void 0,this.max=void 0,this.minGranularity=void 0}get _unit(){}set _unit(t){ut.warnOnce("To use 'unit', use an axis with type 'unit-time' instead of 'time'.")}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}normaliseDataDomain(t){return i2(t,this.min,this.max)}processData(){super.processData();const{boundSeries:t,direction:e,min:i,max:s}=this;this.minGranularity=oV(t,e,i,s)}tickFormatParams(t,e,i,s){s??(s=aL(e));const a=nL(t),n=Ml(s),o=Ec(s),r=Vm(s);return{type:"date",unit:n,step:o,epoch:r,truncateDate:a}}datumFormatParams(t,e,i,s,a){if(typeof t=="number"&&(t=new Date(t)),s==null){const{minGranularity:x}=this,m=MS(t);x!=null&&un(x)<un(m)?s=x:s=m}const{datum:n,seriesId:o,legendItemName:r,key:l,source:c,property:h,domain:u,boundSeries:d}=e,p=Ml(s),g=Ec(s),f=Vm(s);return{type:"date",value:t,datum:n,seriesId:o,legendItemName:r,key:l,source:c,property:h,domain:u,boundSeries:d,unit:p,step:g,epoch:f,style:a}}},Zo.className="TimeAxis",Zo.type="time",S([k],Zo.prototype,"parentLevel",2),S([k],Zo.prototype,"min",2),S([k],Zo.prototype,"max",2),S([k,os("_unit")],Zo.prototype,"unit",2)}}),Rl,lV=I({"packages/ag-charts-community/src/chart/axis/unitTimeAxis.ts"(){"use strict";AS(),Pt(),vt(),Ar(),Uv(),Hm(),Vo(),id(),Tg(),UR(),Rl=class extends eh{constructor(t){super(t,new Fo),this.parentLevel=new nd,this.min=void 0,this.max=void 0,this.unit=void 0,this.defaultUnit=void 0}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}processData(){super.processData();let t;const{domain:e}=this.dataDomain;if(e.length===2&&e[0].valueOf()===e[1].valueOf())t=MS(e[0]);else{const{boundSeries:i,direction:s,min:a,max:n}=this;t=rV(i,s,a,n)}Wi(this.defaultUnit,t)||(this.defaultUnit=t)}updateScale(){super.updateScale(),this.scale.interval=this.unit??this.defaultUnit}normaliseDataDomain(t){return i2(t,this.min,this.max)}createDatumFormatter(t,e){const i=this.scale.interval,{format:s}=this.label;if(s==null)return;const a=uL(i!=null?BR(s,Ml(i)):s,i);if(a!=null)return Pu(a)}tickFormatParams(t,e,i,s){s??(s=aL(e));const a=nL(t),n=Ml(s),o=Ec(s),r=Vm(s);return{type:"date",unit:n,step:o,epoch:r,truncateDate:a}}datumFormatParams(t,e,i,s,a){const n=this.unit??this.defaultUnit??"millisecond";t=Un(n,t),typeof t=="number"&&(t=new Date(t)),s??(s=n);const{datum:o,seriesId:r,legendItemName:l,key:c,source:h,property:u,domain:d,boundSeries:p}=e,g=Ml(s),f=Ec(s),x=Vm(s);return{type:"date",value:t,datum:o,seriesId:r,legendItemName:l,key:c,source:h,property:u,domain:d,boundSeries:p,unit:g,step:f,epoch:x,style:a}}},Rl.className="UnitTimeAxis",Rl.type="unit-time",S([k],Rl.prototype,"parentLevel",2),S([k],Rl.prototype,"min",2),S([k],Rl.prototype,"max",2),S([k],Rl.prototype,"unit",2)}}),od,rd,ld,cd,hd,ud,cV,hV,uV,dV,pV,gV,fV=I({"packages/ag-charts-community/src/module/axisModules.ts"(){"use strict";R(),Jc(),id(),YS(),XS(),wg(),Tg(),lV(),Pt(),od={...Pr,...Xc(nt),type:mt(ve("number")),label:WS,crosshair:Zc(!0)},rd={...Pr,...Xc(nt),type:mt(ve("log")),base:ze(vp,Qt(t=>t!==1,"not equal to 1")),label:WS,crosshair:Zc(!0)},ld={...Pr,...Xc(Bt(nt,ll),!0),type:mt(ve("time")),label:bg,parentLevel:uy,crosshair:Zc(!0,!0)},cd={...Pr,type:mt(ve("category")),label:xg,paddingInner:Mt,paddingOuter:Mt,groupPaddingInner:Mt,crosshair:Zc(),bandHighlight:vg},hd={...Pr,type:mt(ve("grouped-category")),label:xg,crosshair:Zc(),bandHighlight:vg,paddingInner:Mt,groupPaddingInner:Mt,depthOptions:bs({label:{enabled:Y,avoidCollisions:Y,rotation:nt,spacing:nt,...Ie},tick:{enabled:Y,stroke:pt,width:K}},"depth options objects array")},ud={...Pr,...dt(Xc(Bt(nt,ll),!0),["nice"]),type:mt(ve("unit-time")),unit:Bt(jS,hy),label:bg,parentLevel:uy,paddingInner:Mt,paddingOuter:Mt,groupPaddingInner:Mt,crosshair:Zc(!0,!0),bandHighlight:vg},cV={type:"axis",name:"number",chartType:"cartesian",options:od,create:t=>new Yo(t)},hV={type:"axis",name:"log",chartType:"cartesian",options:rd,create:t=>new ad(t)},uV={type:"axis",name:"time",chartType:"cartesian",options:ld,create:t=>new Zo(t)},dV={type:"axis",name:"category",chartType:"cartesian",options:cd,create:t=>new eh(t)},pV={type:"axis",name:"grouped-category",chartType:"cartesian",options:hd,create:t=>new sh(t)},gV={type:"axis",name:"unit-time",chartType:"cartesian",options:ud,create:t=>new Rl(t)}}}),dd,s2,mV,a2,n2,o2,yV=I({"packages/ag-charts-community/src/chart/axesOptionsEnterpriseDefs.ts"(){"use strict";R(),Jc(),dd={...Pr,type:mt(ve("ordinal-time")),paddingInner:Mt,paddingOuter:Mt,groupPaddingInner:Mt,label:bg,parentLevel:uy,interval:Xc(Bt(nt,ll),!0).interval,crosshair:Zc(!0,!0),bandHighlight:vg},s2={...Qc,...Xc(nt),type:mt(ve("angle-number")),crossLines:bs(Wo),startAngle:nt,endAngle:nt,label:{...Or,orientation:ot("fixed","parallel","perpendicular"),format:qn}},mV={innerRadiusRatio:Mt},a2={...Qc,...mV,type:mt(ve("angle-category")),shape:ot("polygon","circle"),crossLines:bs(Wo),startAngle:nt,endAngle:nt,paddingInner:Mt,groupPaddingInner:Mt,label:{...Or,orientation:ot("fixed","parallel","perpendicular")}},n2={...Qc,...Xc(nt),type:mt(ve("radius-number")),shape:ot("polygon","circle"),positionAngle:nt,innerRadiusRatio:Mt,crossLines:bs({...Wo,label:{...qc,positionAngle:nt}},"cross-line options"),title:{enabled:Y,text:Q,spacing:K,formatter:oe,...Ie},label:{...Or,format:qn}},o2={...Qc,type:mt(ve("radius-category")),positionAngle:nt,innerRadiusRatio:Mt,paddingInner:Mt,paddingOuter:Mt,groupPaddingInner:Mt,label:Or,crossLines:bs({...Wo,label:{...qc,positionAngle:nt}},"cross-line options"),title:{enabled:Y,text:Q,spacing:K,formatter:oe,...Ie}}}}),r2,l2,c2,h2=I({"packages/ag-charts-community/src/chart/series/cartesian/areaSeriesOptionsDef.ts"(){"use strict";R(),Ba(),r2=oi(Le,Le),l2={showInMiniChart:Y,connectMissingData:Y,interpolation:xy,label:ye,marker:_r,tooltip:te,shadow:Ho,...Kt,...ft,...rt,...yt,highlight:r2},c2={...l2,...Jn,highlight:r2,type:mt(ve("area")),xKey:mt(Q),yKey:mt(Q),xName:Q,yName:Q,stacked:Y,stackGroup:Q,normalizedTo:nt}}}),u2,qS,Ng,d2=I({"packages/ag-charts-community/src/chart/series/cartesian/barSeriesOptionsDef.ts"(){"use strict";R(),Ba(),u2=oi(Bn,Bn),qS={direction:ot("horizontal","vertical"),showInMiniChart:Y,cornerRadius:K,itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K}),crisp:Y,label:{...ye,placement:ot("inside-center","inside-start","inside-end","outside-start","outside-end"),padding:K},errorBar:Sg,shadow:Ho,tooltip:te,...Kt,highlight:u2,...ft,...rt,...yt},qS.sparklineMode=_t(Y),Ng={...qS,...Jn,highlight:u2,type:mt(ve("bar")),xKey:mt(Q),yKey:mt(Q),xName:Q,yName:Q,direction:ot("horizontal","vertical"),grouped:Y,stacked:Y,stackGroup:Q,normalizedTo:nt,legendItemName:Q,errorBar:yy},Ng.pickOutsideVisibleMinorAxis=_t(Y),Ng.fastDataProcessing=_t(Y),Ng.focusPriority=_t(nt)}}),p2,xV,bV=I({"packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesOptionsDef.ts"(){"use strict";R(),Pt(),Ba(),p2={title:Q,domain:wt(nt),maxSize:K,showInMiniChart:Y,label:{placement:ot("top","right","bottom","left"),...ye},tooltip:te,...Kt,...dt(_r,["enabled"]),highlight:oi(Le,Le)},xV={...p2,...Jn,type:mt(ve("bubble")),xKey:mt(Q),yKey:mt(Q),sizeKey:mt(Q),labelKey:Q,xName:Q,yName:Q,sizeName:Q,labelName:Q,highlight:oi(Le,Le)}}}),g2,vV,SV=I({"packages/ag-charts-community/src/chart/series/cartesian/histogramSeriesOptionsDef.ts"(){"use strict";R(),Ba(),g2={showInMiniChart:Y,cornerRadius:K,label:ye,tooltip:te,shadow:Ho,...Kt,...ft,...rt,...yt,highlight:oi(Le,Le)},vV={...Jn,...g2,type:mt(ve("histogram")),xKey:mt(Q),yKey:Q,xName:Q,yName:Q,areaPlot:Y,aggregation:ot("count","sum","mean"),bins:wt(wt(nt)),binCount:K}}}),f2,QS,Cy,m2=I({"packages/ag-charts-community/src/chart/series/cartesian/lineSeriesOptionsDef.ts"(){"use strict";R(),Ba(),f2=oi(Le,ul),QS={title:Q,showInMiniChart:Y,connectMissingData:Y,interpolation:xy,label:ye,marker:_r,tooltip:te,errorBar:Sg,...Kt,...rt,...yt,highlight:f2},QS.sparklineMode=_t(Y),Cy={...QS,...Jn,highlight:f2,type:mt(ve("line")),xKey:mt(Q),yKey:mt(Q),xName:Q,yName:Q,stacked:Y,stackGroup:Q,normalizedTo:nt,legendItemName:Q,errorBar:yy},Cy.pickOutsideVisibleMinorAxis=_t(Y),Cy.focusPriority=_t(nt)}}),y2,MV,DV=I({"packages/ag-charts-community/src/chart/series/cartesian/scatterSeriesOptionsDef.ts"(){"use strict";R(),Pt(),Ba(),y2={title:Q,showInMiniChart:Y,label:{placement:ot("top","right","bottom","left"),...ye},tooltip:te,errorBar:Sg,...Kt,...dt(_r,["enabled"]),highlight:oi(Le,Le)},MV={...y2,...Jn,type:mt(ve("scatter")),xKey:mt(Q),yKey:mt(Q),labelKey:Q,xName:Q,yName:Q,labelName:Q,errorBar:yy,highlight:oi(Le,Le)}}}),x2,JS,ah,b2=I({"packages/ag-charts-community/src/chart/series/polar/pieSeriesOptionsDef.ts"(){"use strict";R(),Pt(),Ba(),x2=oi(Le,Le),JS={...Kt,radiusMin:K,radiusMax:K,rotation:nt,outerRadiusOffset:nt,outerRadiusRatio:Mt,hideZeroValueSectorsInLegend:Y,sectorSpacing:K,cornerRadius:K,itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K}),title:{enabled:Y,text:Q,showInLegend:Y,spacing:K,...Ie},calloutLabel:{enabled:Y,offset:nt,minAngle:K,avoidCollisions:Y,formatter:oe,format:Q,...Ie},sectorLabel:{enabled:Y,positionOffset:nt,positionRatio:Mt,formatter:oe,format:Q,...Ie},calloutLine:{colors:wt(pt),length:K,strokeWidth:K},fills:wt(Rn),strokes:wt(pt),tooltip:te,shadow:Ho,highlight:x2,...yt,...dt(ft,["fill"]),...dt(rt,["stroke"])},ah={...JS,...Jn,type:mt(ve("pie")),angleKey:mt(Q),radiusKey:Q,calloutLabelKey:Q,sectorLabelKey:Q,legendItemKey:Q,angleName:Q,radiusName:Q,calloutLabelName:Q,sectorLabelName:Q,highlight:x2},ah.defaultColorRange=_t(wt(wt(pt))),ah.defaultPatternFills=_t(wt(pt)),ah.title._enabledFromTheme=_t(Y),ah.calloutLabel._enabledFromTheme=_t(Y),ah.sectorLabel._enabledFromTheme=_t(Y)}}),v2,kV,IV=I({"packages/ag-charts-community/src/chart/series/polar/donutSeriesOptionsDef.ts"(){"use strict";R(),b2(),v2={...JS,innerRadiusOffset:nt,innerRadiusRatio:Mt,innerCircle:{fill:Q,fillOpacity:Mt},innerLabels:{spacing:K,...Ie}},kV={...v2,...ah,type:mt(ve("donut")),innerLabels:bs({text:mt(Q),spacing:K,...Ie},"inner label options array")}}}),pd,nh,Og,Ly,S2,AV,CV,M2,D2,wy,t0,e0,k2,I2,i0,A2,C2,L2,s0,Ty,w2,gd,LV=I({"packages/ag-charts-community/src/chart/themes/annotationOptionsDef.ts"(){"use strict";R(),Ba(),pd={lineStyle:ot("solid","dashed","dotted"),...yt},nh={...ft,...rt,...yt},Og={visible:Y,locked:Y,handle:nh,...Ie},Ly={position:ot("top","center","bottom"),alignment:ot("left","center","right"),...Ie},S2={position:ot("top","inside","bottom"),alignment:ot("left","center","right"),...Ie},AV={enabled:Y,cornerRadius:K,formatter:oe,...Ie,...ft,...rt,...yt},CV={visible:Y,...pd,...rt},M2={divider:rt,...ft,...rt,...Ie},D2={handle:nh,statistics:M2,...pd,...ft,...rt},wy={visible:Y,locked:Y,extendStart:Y,extendEnd:Y,handle:nh,text:Ly,...pd,...rt},t0={visible:Y,locked:Y,axisLabel:AV,handle:nh,text:Ly,...pd,...rt},e0={visible:Y,locked:Y,extendStart:Y,extendEnd:Y,handle:nh,text:S2,background:ft,...pd,...rt},k2={...e0},I2={...e0,middle:CV},i0={label:Ie,showFill:Y,isMultiColor:Y,strokes:wt(pt),rangeStroke:pt,bands:ot(4,6,10),...wy},A2={...ft,...rt,...Og},C2={...ft,...rt,...Og},L2={...ft,...rt,...Og,background:{...ft,...rt}},s0={visible:Y,locked:Y,handle:nh,...ft},Ty={visible:Y,locked:Y,extendStart:Y,extendEnd:Y,handle:nh,text:Ly,background:ft,statistics:M2,...pd,...rt},w2={visible:Y,up:D2,down:D2},gd={enabled:Y,axesButtons:{enabled:Y,axes:ot("x","y","xy")},toolbar:{enabled:Y,padding:K,buttons:bs({...th,value:ot("line-menu","fibonacci-menu","text-menu","shape-menu","measurer-menu","line","horizontal-line","vertical-line","parallel-channel","disjoint-channel","fibonacci-retracement","fibonacci-retracement-trend-based","text","comment","callout","note","clear")},"annotation toolbar buttons array")},optionsToolbar:{enabled:Y,buttons:wt(Bt(mi({...th,value:mt(ot("line-stroke-width","line-style-type","line-color","fill-color","text-color","text-size","delete","settings"))}),mi({...th,value:mt(ot("lock")),checkedOverrides:th})))}},gd.data=_t(Js),gd.xKey=_t(Q),gd.volumeKey=_t(Q),gd.snap=_t(Y)}}),a0,n0,T2,o0,N2,O2,P2,_2,E2,R2,B2,z2,F2,V2,G2,j2,W2,H2,$2,U2,K2,Y2,Z2,X2,q2,Q2,J2,r0,tw,wV=I({"packages/ag-charts-community/src/chart/themes/enterpriseThemeableOptionsDef.ts"(){"use strict";R(),Pt(),Jc(),Ba(),a0={...ft,...rt,...yt,cornerRadius:K,whisker:{...rt,...yt},cap:{lengthRatio:Mt}},n0={...a0,opacity:Mt},T2={direction:ot("horizontal","vertical"),showInMiniChart:Y,itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K,whisker:{...rt,...yt},cap:{lengthRatio:Mt}}),tooltip:te,...Kt,...a0,highlight:oi(n0,n0)},o0={cornerRadius:K,wick:{...rt,...yt},...ft,...rt,...yt},N2={...o0,opacity:Mt},O2={item:{up:o0,down:o0},itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K,wick:{...rt,...yt}}),showInMiniChart:Y,tooltip:te,...Kt,highlight:oi(N2,N2)},P2={fills:wt(Rn),strokes:wt(pt),label:{spacing:K,maxWidth:K,...ye},link:{tension:Mt,itemStyler:Ne({...ft,...rt,...yt,tension:Mt}),...ft,...rt,...yt},node:{width:K,spacing:K,itemStyler:Ne({...ft,...rt,...yt}),...ft,...rt,...yt},tooltip:te,...Kt},_2={direction:ot("horizontal","vertical"),fills:wt(Rn),strokes:wt(pt),label:{spacing:K,placement:ot("before","middle","after"),...ye},stageLabel:{placement:ot("before","after"),format:qn,...Or},tooltip:te,...dt(Kt,["showInLegend"]),...dt(ft,["fill"]),...dt(rt,["stroke"]),...yt,highlight:bI(ul)},E2={direction:ot("horizontal","vertical"),fills:wt(Rn),strokes:wt(pt),itemStyler:Ne({...ft,...rt,...yt}),spacingRatio:Mt,crisp:Y,dropOff:{enabled:Y,...ft,...rt,...yt},stageLabel:{placement:ot("before","after"),format:qn,...Or},label:ye,tooltip:te,shadow:Ho,...dt(Kt,["showInLegend"]),...dt(ft,["fill"]),...dt(rt,["stroke"]),...yt},R2={title:Q,textAlign:ot("left","center","right"),verticalAlign:ot("top","middle","bottom"),itemPadding:K,itemStyler:Ne({...ft,...rt}),showInMiniChart:Y,label:Pl,tooltip:te,...Kt,...rt},B2={showInMiniChart:Y,itemStyler:Ne({...rt,...yt}),item:{up:{...rt,...yt},down:{...rt,...yt}},tooltip:te,...Kt,highlight:oi(ul,ul)},z2={maxStrokeWidth:K,itemStyler:Ne({...rt,...yt}),sizeDomain:wt(K),label:ye,tooltip:te,...Kt,...rt,...yt,highlightStyle:{...Kt.highlightStyle,...rt},highlight:oi(ul,ul)},F2={...rt,...yt},V2={colorRange:wt(pt),maxSize:K,sizeDomain:wt(K),label:{placement:ot("top","bottom","left","right"),...ye},tooltip:te,...Kt,...dt(_r,["enabled"]),highlightStyle:{...Kt.highlightStyle,...ft,...rt},highlight:oi(Le,Le)},G2={colorRange:wt(pt),padding:K,itemStyler:Ne({...ft,...rt,...yt}),label:Pl,tooltip:te,...Kt,...ft,...rt,...yt,highlightStyle:{...Kt.highlightStyle,...ft,...rt},highlight:oi(Le,Le)},j2={...Kt,...ft,...rt,...yt},W2={cornerRadius:K,itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K}),label:ye,tooltip:te,...Kt,...ft,...rt,...yt,highlight:oi(Bn,Bn)},H2={direction:ot("horizontal","vertical"),aspectRatio:K,spacing:K,reverse:Y,itemStyler:Ne({...ft,...rt,...yt}),fills:wt(Rn),strokes:wt(pt),label:ye,stageLabel:{spacing:K,placement:ot("before","after"),...ye},tooltip:te,shadow:Ho,...Kt,...dt(ft,["fill"]),...dt(rt,["stroke"]),...yt},$2={connectMissingData:Y,marker:_r,label:ye,tooltip:te,...Kt,...ft,...rt,...yt,highlight:oi(Le,Le)},U2={connectMissingData:Y,marker:_r,label:ye,tooltip:te,...Kt,...rt,...yt,highlight:oi(Le,ul)},K2={cornerRadius:K,itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K}),label:ye,tooltip:te,...Kt,...ft,...rt,...yt,highlight:oi(Bn,Bn)},Y2={cornerRadius:K,columnWidthRatio:Mt,maxColumnWidthRatio:Mt,itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K}),label:ye,tooltip:te,...Kt,...ft,...rt,...yt,highlight:oi(Bn,Bn)},Z2={showInMiniChart:Y,connectMissingData:Y,interpolation:xy,label:{...ye,padding:K,placement:ot("inside","outside")},marker:_r,tooltip:te,shadow:Ho,...Kt,...ft,...rt,...yt,highlight:oi(Le,Le)},X2={direction:ot("horizontal","vertical"),grouped:Y,showInMiniChart:Y,cornerRadius:K,itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K}),label:{...ye,padding:K,placement:ot("inside","outside")},tooltip:te,shadow:Ho,...Kt,...ft,...rt,...yt,highlight:oi(Bn,Bn)},q2={fills:wt(Rn),strokes:wt(pt),label:{...ye,spacing:K},link:{itemStyler:Ne({...ft,...rt,...yt}),...ft,...rt,...yt},node:{width:K,spacing:K,alignment:ot("left","center","right","justify"),itemStyler:Ne({...ft,...rt,...yt}),...ft,...rt,...yt},tooltip:te,...Kt},Q2={fills:wt(Rn),strokes:wt(pt),colorRange:wt(pt),sectorSpacing:K,cornerRadius:K,padding:K,itemStyler:Ne({...ft,...rt}),label:{spacing:K,...Pl},secondaryLabel:Pl,tooltip:te,...dt(Kt,["highlight","showInLegend"]),...dt(ft,["fill"]),...dt(rt,["stroke"]),highlightStyle:{label:{color:pt},secondaryLabel:{color:pt},...ft,...rt}},J2={fills:wt(Rn),strokes:wt(pt),colorRange:wt(pt),itemStyler:Ne({...ft,...rt}),group:{gap:K,padding:K,cornerRadius:K,textAlign:ot("left","center","right"),interactive:Y,label:{...ye,spacing:K},...ft,...rt},tile:{gap:K,padding:K,cornerRadius:K,textAlign:ot("left","center","right"),verticalAlign:ot("top","middle","bottom"),label:{...ye,spacing:K,lineHeight:K,minimumFontSize:K,wrapping:ot("never","always","hyphenate","on-space"),overflowStrategy:ot("ellipsis","hide")},secondaryLabel:{...ye,lineHeight:K,minimumFontSize:K,wrapping:ot("never","always","hyphenate","on-space"),overflowStrategy:ot("ellipsis","hide")},...ft,...rt},tooltip:te,...dt(Kt,["highlight","showInLegend"]),highlightStyle:{group:{label:{color:pt},...ft,...rt},tile:{label:{color:pt},secondaryLabel:{color:pt},...ft,...rt}}},r0={name:Q,cornerRadius:K,itemStyler:Ne({...ft,...rt,...yt,cornerRadius:K}),label:{...ye,padding:K,placement:ot("inside-start","inside-center","inside-end","outside-start","outside-end")},tooltip:te,shadow:Ho,...ft,...rt,...yt},tw={direction:ot("horizontal","vertical"),showInMiniChart:Y,item:{positive:r0,negative:r0,total:r0},line:{enabled:Y,...rt,...yt},tooltip:te,...Kt}}});function l0(t,e){const i={};for(const s of Reflect.ownKeys(t))i[s]=e(t[s],s,t);return i}var Ny,ew,ae,Vs,fd,re,TV,NV,$Q=I({"packages/ag-charts-community/src/chart/themes/themeOptionsDef.ts"(){"use strict";R(),jL(),fV(),Pt(),Jc(),yV(),Ba(),h2(),d2(),bV(),SV(),m2(),DV(),IV(),b2(),LV(),wV(),Ny=mi({__type:mt(ve("date")),value:Bt(Q,nt)},"a serializable date object"),ew={width:K,height:K,grip:Y,fill:pt,stroke:pt,strokeWidth:K,cornerRadius:K},ae={enabled:Y,height:K,spacing:K,cornerRadius:nt,mask:{fill:pt,fillOpacity:Mt,stroke:pt,strokeWidth:K},minHandle:ew,maxHandle:ew,miniChart:{enabled:Y,padding:{top:K,bottom:K},label:{enabled:Y,avoidCollisions:Y,spacing:K,format:qn,formatter:oe,interval:{minSpacing:K,maxSpacing:K,values:Js,step:nt},...Ie},series:Ct}},Vs={number:{...dt(od,["type","crossLines"]),top:dt(od,["type","crossLines","position"]),right:dt(od,["type","crossLines","position"]),bottom:dt(od,["type","crossLines","position"]),left:dt(od,["type","crossLines","position"]),crossLines:dt(Nr,["type"])},log:{...dt(rd,["type","crossLines"]),top:dt(rd,["type","crossLines","position"]),right:dt(rd,["type","crossLines","position"]),bottom:dt(rd,["type","crossLines","position"]),left:dt(rd,["type","crossLines","position"]),crossLines:dt(Nr,["type"])},category:{...dt(cd,["type","crossLines"]),top:dt(cd,["type","crossLines","position"]),right:dt(cd,["type","crossLines","position"]),bottom:dt(cd,["type","crossLines","position"]),left:dt(cd,["type","crossLines","position"]),crossLines:dt(Nr,["type"])},time:{...dt(ld,["type","crossLines"]),top:dt(ld,["type","crossLines","position"]),right:dt(ld,["type","crossLines","position"]),bottom:dt(ld,["type","crossLines","position"]),left:dt(ld,["type","crossLines","position"]),crossLines:dt(Nr,["type"])},"unit-time":{...dt(ud,["type","crossLines"]),top:dt(ud,["type","crossLines","position"]),right:dt(ud,["type","crossLines","position"]),bottom:dt(ud,["type","crossLines","position"]),left:dt(ud,["type","crossLines","position"]),crossLines:dt(Nr,["type"])},"grouped-category":{...dt(hd,["type"]),top:dt(hd,["type","position"]),right:dt(hd,["type","position"]),bottom:dt(hd,["type","position"]),left:dt(hd,["type","position"]),crossLines:dt(Nr,["type"])},"ordinal-time":{...dt(dd,["type","crossLines"]),top:dt(dd,["type","crossLines","position"]),right:dt(dd,["type","crossLines","position"]),bottom:dt(dd,["type","crossLines","position"]),left:dt(dd,["type","crossLines","position"]),crossLines:dt(Nr,["type"])}},fd={"angle-category":{...dt(a2,["type","crossLines"]),crossLines:dt(Wo,["type"])},"angle-number":{...dt(s2,["type","crossLines"]),crossLines:dt(Wo,["type"])},"radius-category":{...dt(o2,["type","crossLines"]),crossLines:{...dt(Wo,["type"]),label:{...qc,positionAngle:nt}}},"radius-number":{...dt(n2,["type","crossLines"]),crossLines:{...dt(Wo,["type"]),label:{...qc,positionAngle:nt}}}},re={visible:Y},TV={common:{...Tt,navigator:ae,axes:{...Vs,...fd},annotations:{...gd,line:wy,"horizontal-line":t0,"vertical-line":t0,"disjoint-channel":k2,"parallel-channel":I2,"fibonacci-retracement":i0,"fibonacci-retracement-trend-based":i0,callout:A2,comment:C2,note:L2,text:Og,arrow:wy,"arrow-up":s0,"arrow-down":s0,"date-range":Ty,"price-range":Ty,"date-price-range":Ty,"quick-date-price-range":w2},chartToolbar:{enabled:Y},initialState:{legend:bs({visible:Y,seriesId:Q,itemId:Q,legendItemName:Q},"legend state array"),zoom:{rangeX:{start:Bt(nt,Ny),end:Bt(nt,Ny)},rangeY:{start:Bt(nt,Ny),end:Bt(nt,Ny)},ratioX:{start:Mt,end:Mt},ratioY:{start:Mt,end:Mt},autoScaledAxes:wt(ve("y"))}}},line:{...Tt,axes:Vs,series:QS,navigator:ae,...re},scatter:{...Tt,axes:Vs,series:y2,navigator:ae,...re},bubble:{...Tt,axes:Vs,series:p2,navigator:ae,...re},area:{...Tt,axes:Vs,series:l2,navigator:ae,...re},bar:{...Tt,axes:Vs,series:qS,navigator:ae,...re},"box-plot":{...Tt,axes:Vs,series:T2,navigator:ae,...re},candlestick:{...Tt,axes:Vs,series:O2,navigator:ae,...re},"cone-funnel":{...Tt,axes:Vs,series:_2,navigator:ae,...re},funnel:{...Tt,axes:Vs,series:E2,navigator:ae,...re},ohlc:{...Tt,axes:Vs,series:B2,navigator:ae,...re},histogram:{...Tt,axes:dt(Vs,["category","grouped-category","unit-time","ordinal-time"]),series:g2,navigator:ae,...re},heatmap:{...Tt,axes:Vs,series:R2,navigator:ae,...re},waterfall:{...Tt,axes:Vs,series:tw,navigator:ae,...re},"range-bar":{...Tt,axes:Vs,series:X2,navigator:ae,...re},"range-area":{...Tt,axes:Vs,series:Z2,navigator:ae,...re},donut:{...Tt,series:v2,navigator:ae,...re},pie:{...Tt,series:JS,navigator:ae,...re},"radar-line":{...Tt,axes:fd,series:U2,navigator:ae,...re},"radar-area":{...Tt,axes:fd,series:$2,navigator:ae,...re},"radial-bar":{...Tt,axes:fd,series:K2,navigator:ae,...re},"radial-column":{...Tt,axes:fd,series:Y2,navigator:ae,...re},nightingale:{...Tt,axes:fd,series:W2,navigator:ae,...re},sunburst:{...Tt,series:Q2,navigator:ae,...re},treemap:{...Tt,series:J2,navigator:ae,...re},"map-shape":{...Tt,series:G2,navigator:ae,...re},"map-line":{...Tt,series:z2,navigator:ae,...re},"map-marker":{...Tt,series:V2,navigator:ae,...re},"map-shape-background":{...Tt,series:j2,navigator:ae,...re},"map-line-background":{...Tt,series:F2,navigator:ae,...re},sankey:{...Tt,series:q2,navigator:ae,...re},chord:{...Tt,series:P2,navigator:ae,...re},pyramid:{...Tt,series:H2,navigator:ae,...re},"radial-gauge":{...Tt,...My,targets:dt(vy,["value"]),tooltip:{...My.tooltip,...Tt.tooltip}},"linear-gauge":{...Tt,...Sy,targets:dt(by,["value"]),tooltip:{...Sy.tooltip,...Tt.tooltip}}},NV=l0(TV,function t(e,i){if(Xf(i))return e;if(rl(e))return Bt(e,Sp,Xf);if(xs(e))return Bt(mi(xp in e?l0(e,s=>xs(s)?l0(s,t):s):l0(e,t)),Sp,Xf);throw new Error(`Invalid theme override value: ${String(e)}`)})}}),ks,oh,OV,UQ=I({"packages/ag-charts-community/src/chart/themes/vividDark.ts"(){"use strict";yg(),li(),bi(),ks={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},oh={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#fff653",YELLOW:"#c18aff",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},OV=class extends td{getDefaultColors(){return{fills:ks,fillsFallback:Object.values(ks),strokes:oh,sequentialColors:mn(ks),divergingColors:[ks.ORANGE,ks.YELLOW,ks.GREEN],hierarchyColors:[],secondSequentialColors:["#0083ff","#0076e6","#0069cc","#005cb3","#004f99","#004280","#003466","#00274c"],secondDivergingColors:[ks.GREEN,ks.YELLOW,ks.RED],secondHierarchyColors:[],up:{fill:ks.GREEN,stroke:oh.GREEN},down:{fill:ks.RED,stroke:oh.RED},neutral:{fill:ks.GRAY,stroke:oh.GRAY},altUp:{fill:ks.BLUE,stroke:oh.BLUE},altDown:{fill:ks.ORANGE,stroke:oh.ORANGE},altNeutral:{fill:ks.GRAY,stroke:oh.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,ks.BLUE),t.set(Ti,ks.BLUE),t}}}}),Is,rh,PV,KQ=I({"packages/ag-charts-community/src/chart/themes/vividLight.ts"(){"use strict";Nl(),li(),bi(),Is={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},rh={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},PV=class extends Xn{getDefaultColors(){return{...super.getDefaultColors(),fills:Is,fillsFallback:Object.values(Is),strokes:rh,sequentialColors:mn(Is),divergingColors:[Is.ORANGE,Is.YELLOW,Is.GREEN],hierarchyColors:[],secondSequentialColors:["#0083ff","#1a8fff","#339cff","#4da8ff","#66b5ff","#80c1ff","#99cdff","#b3daff"],secondDivergingColors:[Is.GREEN,Is.YELLOW,Is.RED],secondHierarchyColors:[],up:{fill:Is.GREEN,stroke:rh.GREEN},down:{fill:Is.RED,stroke:rh.RED},neutral:{fill:Is.GRAY,stroke:rh.GRAY},altUp:{fill:Is.BLUE,stroke:rh.BLUE},altDown:{fill:Is.ORANGE,stroke:rh.ORANGE},altNeutral:{fill:Is.GRAY,stroke:rh.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ye,Is.BLUE),t.set(Ti,Is.BLUE),t}}}});function YQ(t){if(t instanceof Xn)return t;if(!XQ(t))return c0();if(t==null||typeof t=="string"){const a=h0[t??"ag-default"];if(a)return a();throw new Error(`Cannot find theme \`${t}\`.`)}const{cleared:e,invalid:i}=Qs(ZQ(t),EV,"theme");for(const a of i)ut.warnOnce(String(a));const s=e?.baseTheme?Oy(e.baseTheme):c0();return e?new s.constructor(e):s}function ZQ(t){if(!xs(t)||!xs(t.baseTheme))return t;let e=t,i,s;const a=[];for(;typeof e=="object";)i??(i=e.palette),s??(s=e.params),e.overrides&&a.push(e.overrides),e=e.baseTheme;return{baseTheme:e,overrides:se(...a),params:s,palette:i}}function XQ(t){const{invalid:e}=Qs({theme:t},{theme:Bt(RV,bp)});for(const i of e)ut.warnOnce(String(i));return e.length===0}var c0,_V,to,h0,Oy,EV,RV,u0=I({"packages/ag-charts-community/src/chart/mapping/themes.ts"(){"use strict";R(),yi(),Im(),Pt(),Nl(),yg(),mQ(),yQ(),xQ(),bQ(),vQ(),SQ(),MQ(),DQ(),$Q(),UQ(),KQ(),c0=ea(()=>new Xn),_V=Ft.create(!0,"perf"),to=(t,e,i)=>{_V("[CACHE] ChartTheme",t,e.name,i)},h0={"ag-default-dark":ea(()=>new td),"ag-sheets-dark":ea(()=>new LF,to),"ag-polychroma-dark":ea(()=>new AF,to),"ag-vivid-dark":ea(()=>new OV,to),"ag-material-dark":ea(()=>new kF,to),"ag-financial-dark":ea(()=>new MF,to),"ag-default":c0,"ag-sheets":ea(()=>new wF,to),"ag-polychroma":ea(()=>new CF,to),"ag-vivid":ea(()=>new PV,to),"ag-material":ea(()=>new IF,to),"ag-financial":ea(()=>new DF,to)},Oy=ea(YQ,to),EV={baseTheme:Bt(Q,bp),overrides:NV,params:{accentColor:pt,axisColor:pt,backgroundColor:pt,borderColor:pt,borderRadius:nt,chartBackgroundColor:pt,chartPadding:nt,focusShadow:Q,foregroundColor:pt,fontFamily:am,fontSize:nt,fontWeight:Bt(Q,nt),gridLineColor:pt,popupShadow:Q,subtleTextColor:pt,textColor:pt,chromeBackgroundColor:pt,chromeFontFamily:am,chromeFontSize:nt,chromeFontWeight:Bt(Q,nt),chromeSubtleTextColor:pt,chromeTextColor:pt,buttonBackgroundColor:pt,buttonBorder:Y,buttonFontWeight:nt,buttonTextColor:pt,inputBackgroundColor:pt,inputBorder:Y,inputTextColor:pt,menuBackgroundColor:pt,menuBorder:Y,menuTextColor:pt,panelBackgroundColor:pt,panelSubtleTextColor:pt,tooltipBackgroundColor:pt,tooltipBorder:Y,tooltipTextColor:pt,tooltipSubtleTextColor:pt,crosshairLabelBackgroundColor:pt,crosshairLabelTextColor:pt},palette:{fills:wt(Rn),strokes:wt(pt),up:{fill:Bt(pt,sm),stroke:pt},down:{fill:Bt(pt,sm),stroke:pt},neutral:{fill:Bt(pt,sm),stroke:pt}}},RV=ot("ag-default","ag-default-dark","ag-sheets","ag-sheets-dark","ag-polychroma","ag-polychroma-dark","ag-vivid","ag-vivid-dark","ag-material","ag-material-dark","ag-financial","ag-financial-dark")}}),Bl,iw=I({"packages/ag-charts-community/src/module/enterpriseModule.ts"(){"use strict";Bl={isEnterprise:!1}}});function Py(t,e){return typeof t=="string"&&e!=null&&(typeof e=="object"||Array.isArray(e))&&t in e}function sw(t){return zV(t)&&t>=0&&t<=1}function Xo(t,e){let i=t;for(const s of e){if(!(typeof s=="string"&&i!=null&&(typeof i=="object"||Array.isArray(i))&&s in i))return;i=i[s]}return i}function aw(t,e,i){const s=e.length;if(s===0)return;let a=t;const n=s-1,o=e[n];for(let r=0;r<n;r++){const l=e[r],c=e[r+1];let h=a[l];h==null?(h=isNaN(Number(c))?{}:[],a[l]=h):FV(h)||(h={},a[l]=h),a=h}a[o]=i}function BV(t){return t.findLastIndex(e=>!isNaN(Number(e)))}function _y(t){const e=BV(t);return Number(t[e])}function Pg(t,e,i){const s=e.split("/");let a=[...t];e.startsWith("/")&&(a=[],s.shift());let n=!1;for(const o of s){if(o==="..")a.pop(),n||a.pop();else if(o===".")a.pop();else if(o==="$index"){const r=_y(t);if(isNaN(r))return Br;a.push(`${r}`)}else if(o==="$prevIndex"){const r=_y(t);if(isNaN(r)||Number(r)<=0)return Br;a.push(`${Number(r)-1}`)}else if(o.startsWith("$")){const r=i?.[o.slice(1)];if(r==null)return Br;a.push(r)}else o.length!==0&&a.push(o);n=o===".."}return a}var zV,FV,us,eo,ds,io,lh,_g,Eg,d0,p0,nw,Br,md,VV=I({"packages/ag-charts-community/src/module/optionsGraphUtils.ts"(){"use strict";R(),{isNumber:zV,isObjectLike:FV}=st,us="path",eo="pathArray",ds="default",io="override",lh="user",_g="operation",Eg="operationValue",d0="dependency",p0="autoEnable",nw="autoEnableValue",Br=Symbol("unresolvable-path"),md=Symbol("resolved-to-branch")}});function Rg(t){if(t==null||typeof t!="object"||Array.isArray(t))return;const e=Object.getOwnPropertyNames(t);if(e.length===0)return;const i=e[0];if(qV.has(i))return{operation:i,values:Array.isArray(t[i])?t[i]:[t[i]]}}function qQ(t,e,i){const s=Rg(t.getVertexValue(i));switch(s?.operation){case"$path":const[a]=s.values,n=t.getPathArray(e),o=Pg(n,a);return o===Br?void 0:t.findVertexAtPath(o);case"$value":return e}}function ow(t,e,i){const s=t.findVertexAtPath(["series","0","type"]);s&&t.addEdge(e,s,d0)}function QQ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s),n=t.getResolvedPath(["series"]);if(!Array.isArray(n))return!1;for(const o of n)if(o.type===a)return!0;return!1}function JQ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s);return t.getResolvedPath(["series","0","type"])===a}function tJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s),n=t.getResolvedPath(["series","0","type"]);if(typeof n!="string")return!1;switch(a){case"cartesian":return Se.isCartesian(n);case"polar":return Se.isPolar(n);case"standalone":return Se.isStandalone(n)}return!1}function eJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s),n=t.getParamValue("foregroundColor"),o=t.getParamValue("backgroundColor");if(typeof n=="string"&&typeof o=="string"&&sw(a))return be.mix(be.fromString(n),be.fromString(o),1-a).toString();Ft.inDevelopmentMode(()=>ch.warnOnce(`\`$foregroundBackgroundMix\` json operation failed on [${String(a)}}}] at [${t.getPathArray(e).join(".")}], expecting a number between 0 and 1.`))}function iJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s),n=t.getParamValue("foregroundColor");if(typeof n=="string"&&sw(a)){const o=be.fromString(n);return new be(o.r,o.g,o.b,a).toString()}Ft.inDevelopmentMode(()=>ch.warnOnce(`\`$foregroundOpacity\` json operation failed on [${String(a)}}}] at [${t.getPathArray(e).join(".")}], expecting a number between 0 and 1.`))}function sJ(t,e,i){const[s,a]=i,n=t.resolveVertexValue(e,s),o=t.resolveVertexValue(e,a);if(!(!GV(n)||!jV(o)))return be.interpolate(n.map(r=>be.fromString(r)),o).map(r=>r.toString())}function aJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s);return rn(a)}function nJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s);return xu(a)}function oJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s);return Sc(a)}function rJ(t,e,i){const[s,a,n]=i,o=t.resolveVertexValue(e,s),r=t.resolveVertexValue(e,a),l=t.resolveVertexValue(e,n),c=t.getPathArray(e),h=`\`$mix\` json operation failed on [${String(o)}, ${String(r)}, ${String(l)}] at [${c.join(".")}], expecting`,u=`${h} two colors and a number between 0 and 1.`;if(typeof r!="string"||!sw(l)){Ft.inDevelopmentMode(()=>ch.warnOnce(u));return}if(typeof o=="string")try{return be.mix(be.fromString(o),be.fromString(r),l).toString()}catch{Ft.inDevelopmentMode(()=>ch.warnOnce(u));return}if(!rn(o)){Ft.inDevelopmentMode(()=>ch.warnOnce(u));return}let d=o.colorStops;try{d=d?.map(p=>{let g;return typeof p.color=="string"&&(g=be.mix(be.fromString(p.color),be.fromString(r),l).toString()),{...p,color:g}})}catch{Ft.inDevelopmentMode(()=>ch.warnOnce(`${h} a gradient, a color and a number between 0 and 1.`));return}return{...o,colorStops:d}}function lJ(t,e,i){const[s]=i,a=t.getVertexValue(s),n=t.getParamValue("fontSize");if(typeof n=="number"&&typeof a=="number")return Math.round(a*n);Ft.inDevelopmentMode(()=>ch.warnOnce(`\`$rem\` json operation failed on [${String(a)}] at [${t.getPathArray(e).join(".")}], expecting a number.`))}function cJ(t,e,i){for(const s of i)if(!t.resolveVertexValue(e,s))return!1;return!0}function hJ(t,e,i){let s,a=!0;for(const n of i){const o=t.resolveVertexValue(e,n);if(a)s=o,a=!1;else if(o!==s)return!1}return!0}function uJ(t,e,i){const[s,a]=i;return t.resolveVertexValue(e,s)>t.resolveVertexValue(e,a)}function dJ(t,e,i){const[s,a,n]=i,r=t.resolveVertexValue(e,s)?a:n;for(const l of t.neighboursWithEdgeValue(r,us))t.addEdge(e,l,us);return t.resolveVertexValue(e,r)}function pJ(t,e,i){const[s,a]=i;return t.resolveVertexValue(e,s)<t.resolveVertexValue(e,a)}function gJ(t,e,i){for(const s of i)return!t.resolveVertexValue(e,s)}function fJ(t,e,i){for(const s of i)if(t.resolveVertexValue(e,s))return!0;return!1}function mJ(t,e,i){const[s,a,...n]=i,o=t.resolveVertexValue(e,s);for(const r of n){const l=t.getVertexValue(r);if(!Array.isArray(l))continue;const[c,h]=l;if(o===c||Array.isArray(c)&&c.includes(o))return h}return t.getVertexValue(a)}function yJ(t,e,i){const[s,a,n]=i,o=t.resolveVertexValue(e,s);if(!yd(o))throw new Error(`\`$path\` json operation failed on [${String(o)}], expecting a string.`);const r=t.getPathArray(e),l=Pg(r,o);if(l===Br)return;const c=t.findVertexAtPath(l);return c&&t.findNeighbour(c,lh)?t.resolveVertexValue(e,a):t.resolveVertexValue(e,n)}function xJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s);if(!yd(a))return;if(lw.has(a)){const o=t.getPathArray(e),r=_y(o);if(isNaN(r))return;switch(a){case"fill":return qo(t.palette.fills,1,r)[0];case"fillFallback":return qo(t.palette.fillsFallback,1,r)[0];case"stroke":return qo(t.palette.strokes,1,r)[0];case"gradient":return qo(t.palette.sequentialColors,1,r)[0];case"range2":return qo(t.palette.fills,2,r)}return}if(a==="gradients")return t.palette.sequentialColors;const n=Xo(t.palette,a.split("."));return Array.isArray(n)?[...n]:typeof n=="object"?{...n}:n}function bJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s);if(!yd(a))return;if(lw.has(a)){const o=t.getPathArray(e);let r=_y(o),l=0;const c=["series","0","type"];for(let h=0;h<r;h++){c[1]=`${h}`;const u=t.getResolvedPath(c);(u==="map-shape-background"||u==="map-line-background")&&l++}if(r-=l,isNaN(r))return;switch(a){case"fill":return qo(t.palette.fills,1,r)[0];case"fillFallback":return qo(t.palette.fillsFallback,1,r)[0];case"stroke":return qo(t.palette.strokes,1,r)[0];case"gradient":return qo(t.palette.sequentialColors,1,r)[0];case"range2":return qo(t.palette.fills,2,r)}return}if(a==="gradients")return t.palette.sequentialColors;const n=Xo(t.palette,a.split("."));return Array.isArray(n)?[...n]:typeof n=="object"?{...n}:n}function rw(t,e,i){const[s]=i,a=t.getVertexValue(s);if(yd(a)){const n=t.getPathArray(e),o=Pg(n,a);if(o===Br)return;const r=t.findVertexAtPath(o);r&&t.addEdge(e,r,d0)}}function vJ(t,e,i){const s=i.length>1,a=i.length>2,[n,o,r]=i,l=t.resolveVertexValue(e,n),c=a?t.resolveVertexValue(e,r):null;if(!yd(l))throw new Error(`\`$path\` json operation failed on [${String(l)}], expecting a string.`);const h=t.getPathArray(e),u=Pg(h,l);if(u===Br)return;const d=c?Xo(c,u):t.getResolvedPath(u);if(d!=null)return d;if(s)return t.resolveVertexValue(e,o)}function SJ(t,e,i){const[s,a]=i,n=t.resolveVertexValue(e,s);if(!yd(n))throw new Error(`\`$path\` json operation failed on [${String(n)}], expecting a string.`);let o;a&&(o=t.graftAndResolveOrphan(e,a));const r=t.getPathArray(e),l=Pg(r,n,o);if(l===Br)throw new Error(`Unresolvable path [${n}] at [${r.join(".")}]`);return l}function MJ(t,e,i){const[s]=i,a=t.getVertexValue(s);return t.getParamValue(a)}function DJ(t,e,i){const[s,a,n,o]=i,r=t.getVertexValue(s);if(!Ey(r))return;const l=a?t.getVertexValue(a):void 0,c=t.neighboursWithEdgeValue(e,us),h=n?t.resolveVertexValue(e,n):void 0,u=o?t.resolveVertexValue(e,o):void 0;if(c.length===0&&l!=null)if(Rg(l)){const d=t.resolveVertexValue(e,a);Ey(d)&&t.graftObject(e,d,[h,u])}else t.graftObject(e,l,[h,u]);for(const d of c)if(t.neighboursWithEdgeValue(d,us).length===0){const p=t.addVertex({});t.addEdge(d,p,ds)}else t.graftObject(d,r,[h,u]);return md}function kJ(t,e,i){const[s,a,n]=i;let o=t.getVertexValue(s);if(typeof o=="string"&&(o=[o]),!Array.isArray(o))return;const r=t.neighboursWithEdgeValue(e,us),l=n?t.getVertexValue(n):[],c=Array.isArray(l)?new Set(l):new Set;for(const h of r){const u=t.graftAndResolveOrphan(h,a);for(const d of o){const p=Pg([],d,u);p!==Br&&t.graftConfig(h,p,c)}}return md}function IJ(t,e,i){const[s]=i,a=t.getPathArray(e),n=BV(a);if(n<0)return t.resolveVertexValue(e,s);const o=a.slice(0,n),r=t.findVertexAtPath(o);if(!r)return t.resolveVertexValue(e,s);const l=t.neighboursWithEdgeValue(r,us);for(let c=0;c<l.length;c++){if(`${c}`===a[n])continue;const h=o.concat([`${c}`,...a.slice(n+1)]),u=t.findVertexAtPath(h);if(!u)continue;const d=t.findNeighbourValue(u,lh);if(d!=null)return d;const p=t.findNeighbourValue(u,io);if(p!=null)return p}return t.resolveVertexValue(e,s)}function AJ(t,e,i){const[s,a]=i,n=t.getVertexValue(s),o=t.resolveVertexValue(e,a);if(!Array.isArray(o))return;if(!Rg(n))return o.map(()=>n);let r=0;for(const l of o)t.graftValue(e,`${r}`,n,l),r++;return md}function CJ(t,e,i){for(const s of i){const a=t.resolveVertexValue(e,s);Ey(a)&&t.graftObject(e,a)}return md}function LJ(t,e,i){const[s,a]=i;let n=t.getVertexValue(s);if(!Array.isArray(n)){const r=qQ(t,e,a);if(!r)return;n=t.resolveVertexValue(r,s)}const o=t.resolveVertexValue(e,a);if(!(!Array.isArray(n)||!Ey(o)))return dt(o,n)}function wJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s);return WV(a)?Object.keys(a).length:0}function TJ(t,e,i){const s=[];for(const a of i)s.push(t.getVertexValue(a));return s}function NJ(t,e,i){const[s]=i,a=t.getVertexValue(s),n=t.getPathArray(e);if(a==="$index")return _y(n);if(a==="$1")return t.resolveValue$1(n)}function OJ(t,e,i){const[s]=i,a=t.resolveVertexValue(e,s);return isNaN(Number(a))?!1:Number(a)%2===0}function PJ(t,e,i){let s;for(const a of i){const n=t.resolveVertexValue(e,a);s==null?s=Number(n):s*=Number(n)}return s}function _J(t,e,i){for(const s of i)return Math.round(Number(t.resolveVertexValue(e,s)))}var ch,qo,GV,jV,WV,Ey,yd,HV,$V,UV,KV,YV,lw,ZV,XV,Qo,qV,EJ=I({"packages/ag-charts-community/src/module/optionsGraphOperations.ts"(){"use strict";R(),Wu(),bu(),fu(),yi(),Pt(),VV(),{Logger:ch,circularSliceArray:qo,isArray:GV,isNumber:jV,isObjectLike:WV,isPlainObject:Ey,isString:yd}=st,HV={$hasSeriesType:{dependencies:ow,resolve:QQ},$isChartType:{dependencies:ow,resolve:tJ},$isSeriesType:{dependencies:ow,resolve:JQ}},$V={$foregroundBackgroundMix:eJ,$foregroundOpacity:iJ,$interpolate:sJ,$isGradient:aJ,$isImage:nJ,$isPattern:oJ,$mix:rJ},UV={$rem:lJ},KV={$and:cJ,$eq:hJ,$greaterThan:uJ,$if:dJ,$lessThan:pJ,$not:gJ,$or:fJ,$switch:mJ},YV={$isUserOption:{dependencies:rw,resolve:yJ},$palette:xJ,$mapPalette:bJ,$path:{dependencies:rw,resolve:vJ},$pathString:{dependencies:rw,resolve:SJ},$ref:MJ},lw=new Set(["fill","fillFallback","stroke","gradient","range2"]),ZV={$apply:DJ,$applyTheme:kJ,$findFirstSiblingNotOperation:IJ,$map:AJ,$merge:CJ,$omit:LJ,$size:wJ,$shallow:TJ,$value:NJ},XV={$isEven:OJ,$mul:PJ,$round:_J},Qo={...HV,...$V,...UV,...YV,...KV,...XV,...ZV},qV=new Set(Object.keys(Qo))}});function RJ(t,e){return new hw(t.config,e,t.params,t.palette,t.overrides,t.getTemplateParameters())}var QV,cw,Ry,JV,Bg,hw,t4=I({"packages/ag-charts-community/src/module/optionsGraph.ts"(){"use strict";R(),Wu(),Om(),Ta(),Im(),Pt(),mF(),EJ(),VV(),{isObject:QV,isObjectLike:cw,isPlainObject:Ry}=st,JV=ea(RJ),Bg=class pr extends TI{constructor(e={},i={},s={},a={},n={},o=new Map){super(us,_g),this.resolvedParams={},this.resolvedAnnotations={},this.value$1={},this.cachedPathVertices=new Map,this.EMPTY_PATH_ARRAY_VERTEX=this.addVertex([]),this.root=this.addVertex("root"),this.params=this.addVertex("params"),this.annotations=this.addVertex("annotations"),this.config=e,this.overrides=n,this.internalParams=o,this.palette=$e(a),this.palette.type=QV(i?.theme)?fF(i.theme?.palette):"inbuilt";const r="line",l=i.series?.[0]?.type??r,c=Wn.cloneDefaultAxes(l);i.axes??(i.axes=c?.axes??[]),this.buildGraphFromObject(this.root,lh,dt(i,["theme"])),this.buildGraphFromObject(this.root,ds,dt(e[l],pr.COMPLEX_KEYS));const h=n?dt(n[l],pr.COMPLEX_KEYS):{};Object.keys(h).length>0&&this.buildGraphFromObject(this.root,io,h);const u=n?dt(n.common,pr.COMPLEX_KEYS):{};Object.keys(u).length>0&&this.buildGraphFromObject(this.root,io,Se.isCartesian(l)?u:dt(u,["zoom","navigator"])),this.buildGraphFromObject(this.params,ds,s);const d=this.findNeighbourWithValue(this.root,"axes",us),p=this.findNeighbourWithValue(this.root,"series",us);d&&this.buildGraphFromObject(d,ds,{$applyTheme:[["/$seriesType/axes/$axisType/$position","/$seriesType/axes/$axisType"],{seriesType:{$path:["/series/0/type","line"]},axisType:{$path:["./type","category"]},position:{$path:["./position"]}},["top","right","bottom","left"]]}),p&&this.buildGraphFromObject(p,ds,{$applyTheme:["/$seriesType/series",{seriesType:{$path:["./type","line"]}}]});const g=dt(e[l]?.annotations??{},pr.ANNOTATIONS_OPTIONS_KEYS);Object.keys(g).length>0&&this.buildGraphFromObject(this.annotations,ds,g);const f=dt(n?.common?.annotations??{},pr.ANNOTATIONS_OPTIONS_KEYS);Object.keys(f).length>0&&this.buildGraphFromObject(this.annotations,io,f);const x=HI(e[l]?.annotations??{},pr.ANNOTATIONS_OPTIONS_KEYS);Object.keys(x).length>0&&this.buildGraphFromObject(this.root,ds,{annotations:x});const m=HI(n?.common?.annotations??{},pr.ANNOTATIONS_OPTIONS_KEYS);Object.keys(m).length>0&&this.buildGraphFromObject(this.root,io,{annotations:m}),this.buildDependencyGraph()}clear(){super.clear(),this.cachedPathVertices.clear()}resolve(){return this.resolved={},this.resolvedParams={},this.resolvedAnnotations={},this.resolveVertex(this.params,this.resolvedParams),this.resolveVertex(this.annotations,this.resolvedAnnotations),this.resolveVertex(this.root),this.resolved}resolveParams(){return this.resolvedParams}resolveAnnotationThemes(){return this.resolvedAnnotations}findVertexAtPath(e){const i=e.join(".");if(this.cachedPathVertices.has(i))return this.cachedPathVertices.get(i);const s=this.findVertexAlongEdge(this.root,e,us);if(s)return this.cachedPathVertices.set(i,s),s}getParamValue(e){if(this.resolvedParams[e]!=null)return this.resolvedParams[e];const i=this.findVertexAlongEdge(this.params,[e],us);if(!i)return;const s=this.findNeighbour(i,ds);if(!s)return;const a=this.resolveVertexValue(i,s);return this.resolvedParams[e]=a,a}getPathArray(e){return this.findNeighbourValue(e,eo)??[]}getResolvedPath(e){return Xo(this.resolved,e)}resolveVertexValue(e,i){this.resolveVertexDependencies(i);const s=this.findNeighbourValue(i,_g);if(s&&Py(s,Qo)){const n=this.neighboursWithEdgeValue(i,Eg),o=Qo[s],l=(typeof o=="function"?o:o.resolve)?.(this,e,n);return l===md?void 0:l}let a=this.getVertexValue(i);if(Array.isArray(a)){const n={};this.resolveVertexChildren(i,n),a=Xo(n,this.getPathArray(e))}return this.resolveValueOrSymbol(a)}resolveValue$1(e){return Xo(this.value$1,e)}graftConfig(e,i,s){const a=Xo(this.config,i),n=this.findNeighbour(e,eo);if(Ry(a)&&this.buildGraphFromObject(e,ds,a,n,void 0,s),this.overrides){const o=Xo(this.overrides,i);Ry(o)&&this.buildGraphFromObject(e,io,o,n,void 0,s);const r=Xo(this.overrides,["common",...i.slice(1)]);Ry(r)&&this.buildGraphFromObject(e,io,r,n,void 0,s)}this.buildDependencyGraph()}graftObject(e,i,s){const a=this.findNeighbour(e,eo);if(this.buildGraphFromObject(e,ds,i,a),this.overrides&&s)for(const n of s){if(n==null)continue;const o=Xo(this.overrides,n);o&&this.buildGraphFromObject(e,io,o,a)}this.buildDependencyGraph()}graftValue(e,i,s,a){const n=[...this.getPathArray(e),i];aw(this.value$1,n,a);const o=this.findVertexAtPath(n)??this.addVertex(i);this.buildGraphFromValue(e,o,ds,n,s),this.buildDependencyGraph()}graftAndResolveOrphan(e,i){const s={},a=this.addVertex(s),n=this.getPathArray(e);return this.graftAndResolveChildren(i,a,n,[]),this.resolveVertex(a,s),Xo(s,n)}buildGraphFromObject(e,i,s,a,n=pr.SHALLOW_KEYS,o){const r=Rg(s);if(r){const u=this.addVertex(s);this.addEdge(e,u,i),this.buildGraphFromOperation(u,i,r,a);return}if(Object.keys(s).length===0){this.addEdge(e,this.addVertex(Array.isArray(s)?[]:{}),i),this.buildGraphAutoEnable(e,i,s,void 0);return}const l=this.getVertexChildrenByKey(e),c=a?this.getVertexValue(a):[];let h;for(const u of Object.keys(s)){if(o?.has(u))continue;const d=l.get(u)??this.addVertex(u),p=[...c,u];n?.has(u)?this.buildShallowGraphFromValue(e,d,i,p,s[u]):this.buildGraphFromValue(e,d,i,p,s[u],n),u==="enabled"&&(h=d)}this.buildGraphAutoEnable(e,i,s,h)}buildGraphAutoEnable(e,i,s,a){if(i===ds&&!a||i===lh&&a||i!==ds&&i!==lh&&i!==io)return;let n=this.findNeighbour(e,p0);n||(n=this.addVertex(p0),this.addEdge(e,n,p0)),a&&this.addEdge(a,n,nw);const{enabled:o,_enabledFromTheme:r}=s;this.addEdge(n,this.addVertex({enabled:o,_enabledFromTheme:r,keys:Object.keys(s).length}),i)}getVertexChildrenByKey(e){const i=this.neighboursWithEdgeValue(e,us),s=new Map;for(const a of i)s.set(this.getVertexValue(a),a);return s}buildGraphFromValue(e,i,s,a,n,o){this.addEdge(e,i,us);let r=this.findNeighbour(i,eo);r||(r=this.addVertex(a),this.addEdge(i,r,eo));const l=Rg(n);if(l){const c=this.addVertex(n);this.addEdge(i,c,s),this.addEdge(c,r,eo),this.buildGraphFromOperation(c,s,l,r)}else if(cw(n))this.buildGraphFromObject(i,s,n,r,o);else{const c=this.addVertex(n);this.addEdge(i,c,s)}}buildShallowGraphFromValue(e,i,s,a,n){this.addEdge(e,i,us);let o=this.findNeighbour(i,eo);o||(o=this.addVertex(a),this.addEdge(i,o,eo));const r=this.addVertex(n);this.addEdge(i,r,s)}buildGraphFromOperation(e,i,s,a){const n=this.addVertex(s.operation);this.addEdge(e,n,_g);for(const o of s.values)this.buildGraphFromOperationValue(e,o,i,a)}buildGraphFromOperationValue(e,i,s,a=this.EMPTY_PATH_ARRAY_VERTEX){const n=this.addVertex(i);this.addEdge(e,a,eo),this.addEdge(e,n,Eg);const o=Rg(i);o?this.buildGraphFromOperation(n,s,o,a):cw(i)&&this.buildGraphFromObject(n,s,i,a)}buildDependencyGraph(){for(const[e,i]of this.pendingProcessingEdges){const s=this.getVertexValue(i);if(!Py(s,Qo))continue;const a=this.neighboursWithEdgeValue(e,Eg),n=Qo[s];(typeof n=="function"?void 0:n.dependencies)?.(this,e,a)}this.pendingProcessingEdges=[]}resolveVertex(e,i=this.resolved){const s=this.getPathArray(e);this.resolveVertexInEdgePriority(e,i,s),this.resolveVertexAutoEnable(e,i,s),this.resolveVertexChildren(e,i)}resolveVertexInEdgePriority(e,i,s){const a=this.neighboursWithEdgeValue(e,us),[n]=pr.EDGE_PRIORITY;for(const o of pr.EDGE_PRIORITY){const r=this.findNeighbour(e,o);if(r==null)continue;const l=this.resolveVertexValueInternal(e,r);if(!(l==null&&o!==n)&&!(a.length>0&&Array.isArray(l)&&o!==n)){if(s.length===0){if(l==null)continue;this.resolved=l}else aw(i,s,l);break}}}resolveVertexValueInternal(e,i){this.resolveVertexDependencies(i);const s=this.findNeighbourValue(i,_g);if(s&&Py(s,Qo)){const a=this.neighboursWithEdgeValue(i,Eg),n=Qo[s],r=(typeof n=="function"?n:n.resolve)?.(this,e,a);return r===md?void 0:r}return this.resolveValueOrSymbol(this.getVertexValue(i))}resolveVertexAutoEnable(e,i,s){const[a]=this.neighboursWithEdgeValue(e,nw);if(!a)return;const n=this.findNeighbourValue(a,ds),o=this.findNeighbourValue(a,io),r=this.findNeighbourValue(a,lh);r&&r.enabled==null&&!n?._enabledFromTheme&&!o?._enabledFromTheme&&aw(i,s,!0)}resolveVertexChildren(e,i){const s=this.neighboursWithEdgeValue(e,us);for(const a of s){const n=this.getVertexValue(a);s.length>1&&Py(n,Qo)||n!=="_enabledFromTheme"&&this.resolveVertex(a,i)}}resolveVertexDependencies(e){const i=this.neighboursWithEdgeValue(e,d0);for(const s of i)this.resolveVertex(s)}graftAndResolveChildren(e,i,s,a){for(const n of this.neighboursWithEdgeValue(e,us)){const o=this.getVertexValue(n),r=[...s,o],l=[...a,o],c=this.addVertex(o),h=this.findNeighbourValue(n,ds);this.addEdge(i,c,us);const u=this.addVertex(r);if(this.addEdge(c,u,eo),Ry(h)){this.buildGraphFromObject(c,ds,h,u);const d=this.findNeighbour(c,ds);this.addEdge(d,this.addVertex(r),eo);const p=this.findNeighbourValue(d,_g);if(Py(p,Qo)){const g=this.neighboursWithEdgeValue(d,Eg),f=Qo[p];(typeof f=="function"?void 0:f.dependencies)?.(this,d,g)}}this.graftAndResolveChildren(n,c,r,l)}}resolveValueOrSymbol(e){return typeof e=="symbol"&&this.internalParams?.has(e)?this.internalParams.get(e):e}},Bg.EDGE_PRIORITY=[lh,io,ds],Bg.SHALLOW_KEYS=new Set(["context","data","topology"]),Bg.COMPLEX_KEYS=["annotations","axes","series"],Bg.ANNOTATIONS_OPTIONS_KEYS=["axesButtons","data","enabled","optionsToolbar","snap","toolbar","xKey","volumeKey"],hw=Bg}}),uw,hh,zg,dw=I({"packages/ag-charts-community/src/module/optionsModule.ts"(){"use strict";R(),xl(),gQ(),Om(),u0(),yi(),Ta(),Pt(),iw(),t4(),uw=t=>`'${t}'`,hh=class _s{constructor(e,i,s,a,n,o,r=!1){this.themeParameters={},this.optionMetadata=n??{},this.processedOverrides=s??{};let l=null;e instanceof _s?(l=e,this.specialOverrides=l.specialOverrides,o===void 0&&(o=Sr(l.userOptions,i,_s.JSON_DIFF_OPTS)),this.userOptions=$e(um(o,l.userOptions),{..._s.OPTIONS_CLONE_OPTS_SLOW,seen:[]})):(this.userOptions=$e(e??i,{..._s.OPTIONS_CLONE_OPTS_SLOW,seen:[]}),this.specialOverrides=this.specialOverridesDefaults({...a})),r&&this.removeLeftoverSymbols(this.userOptions);let c,h,u,d,p,g;!r&&o!==void 0&&_s.isFastPathDelta(o)&&l!=null?({activeTheme:c,processedOptions:h,fastDelta:u}=this.fastSetup(o,l),d=l.themeParameters,p=l.annotationThemes):(_s.perfDebug("ChartOptions.slowSetup()"),{activeTheme:c,processedOptions:h,themeParameters:d,annotationThemes:p,googleFonts:g}=this.slowSetup(s,o,r)),this.activeTheme=c,this.processedOptions=h,this.fastDelta=u??void 0,this.themeParameters=d,this.annotationThemes=p,this.googleFonts=g,Ft.inDevelopmentMode(()=>dl(this))}static isFastPathDelta(e){for(const i of Object.keys(e??{}))if(!this.FAST_PATH_OPTIONS.has(i))return _s.perfDebug("ChartOptions.isFastPathDelta() - slow path required due to presence of: ",i),!1;return _s.perfDebug("ChartOptions.isFastPathDelta() - fast path possible."),!0}fastSetup(e,i){const{activeTheme:s,processedOptions:a}=i,{presetType:n}=this.optionMetadata;if(n!=null&&e?.data!=null){const r=qs.getPresetModule(n);if(r?.processData){const{series:l,data:c}=r.processData(e.data);e=se({series:l,data:c},e)}}this.fastSeriesSetup(e,a);const o=se(e,a);return _s.debug("ChartOptions.fastSetup() - processed options",o),{activeTheme:s,processedOptions:o,fastDelta:e}}fastSeriesSetup(e,i){e?.series&&(e.series?.every((s,a)=>lE(s,i.series?.[a]??{}))?delete e.series:e.series=e.series.map((s,a)=>um(s,i.series?.[a]??{})))}slowSetup(e,i,s=!1){let a=$e(this.userOptions,_s.OPTIONS_CLONE_OPTS_FAST);i&&(a=se(i,a),s&&this.removeLeftoverSymbols(a));const{presetType:n}=this.optionMetadata;if(n!=null){const p=qs.getPresetModule(n);if(p){const{validate:g=Qs}=p,f=a,x=a.type,m=x!=null?Oy(a.theme).presets[x]:void 0,{cleared:b,invalid:v}=g(f,p.options,"");v.forEach(M=>ut.warn(M)),nu(v,"")?a={}:(_s.debug(">>> AgCharts.createOrUpdate() - applying preset",b),a=p.create(b,m,()=>this.activeTheme))}}this.soloSeriesIntegrity(a),Bl.isEnterprise||gF(a);const o=Oy(a.theme);if(n!=null&&o.templateTheme(a,!1),this.validateSeriesOptions(a),this.chartDef=qs.detectChartDefinition(a),!this.chartDef.placeholder){const{validate:p=Qs}=this.chartDef,{cleared:g,invalid:f}=p(a,this.chartDef.options,"");f.forEach(x=>ut.warn(x)),a=g}this.validateAxesOptions(a),this.removeDisabledOptions(a);let r=this.processFonts(o.params);r=this.processFonts(a,r),this.processSeriesOptions(a);const l=JV(o,a),c=l.resolve(),h=l.resolveParams(),u=l.resolveAnnotationThemes();l.clear();const d=se(e,c);return pQ(d),Bl.isEnterprise||gF(d,!0),this.validateSeriesOptions(d),this.validateAxesOptions(d),this.validatePluginOptions(d),this.processMiniChartSeriesOptions(d),d.loadGoogleFonts||r.clear(),_s.debug(()=>["ChartOptions.slowSetup() - processed options",$e(d)]),{activeTheme:o,processedOptions:d,themeParameters:h,annotationThemes:u,googleFonts:r}}validatePluginOptions(e){for(const i of qs.listModulesByType("plugin")){const s=i.name;if(s in e&&(!i.chartType||i.chartType===this.chartDef?.name)){const{cleared:a,invalid:n}=Qs(e[s],i.options,i.name);n.forEach(o=>ut.warn(o)),e[s]=a}}}validateSeriesOptions(e){const i=this.chartDef?.name,s=[],a=e.series?.length??0;let n;for(let o=0;o<a;o++){const r=`series[${o}]`,l=e.series[o],c=qs.getSeriesModule(l.type);if(c==null){n??(n=yp(Array.from(qs.listModulesByType("series")).filter(p=>!i||p.chartType===i).map(p=>p.name),"or",uw)),ut.warn(l.type==null?`Option \`${r}.type\` is required and has not been provided; expecting ${n}, ignoring.`:`Unknown type \`${l.type}\` at \`${r}.type\`; expecting ${n}, ignoring.`);continue}else if(i&&c.chartType!==i){ut.warn(`Series type \`${c.name}\` at \`${r}.type\` is not supported by chart type \`${i}\`, ignoring.`);continue}const{validate:h=Qs}=c,{cleared:u,invalid:d}=h(l,c.options,r);d.forEach(p=>ut.warn(p)),nu(d,r)||s.push(u)}e.series=s}validateAxesOptions(e){if(!("axes"in e)||!e.axes)return;const i=this.chartDef?.name,s=[],a=e.axes.length??0;let n;for(let o=0;o<a;o++){const r=`axes[${o}]`,l=e.axes[o],c=qs.getAxisModule(l.type);if(c==null){n??(n=yp(Array.from(qs.listModulesByType("axis")).filter(p=>p.chartType===i).map(p=>p.name),"or",uw)),ut.warn(`Unknown type \`${l.type}\` at \`${r}.type\`; expecting one of ${n}, ignoring all axes options.`),delete e.axes;break}else if(c.chartType!==i){ut.warn(`Axis type \`${c.name}\` at \`${r}.type\` is not supported by chart type \`${i}\`, ignoring.`);break}const{validate:h=Qs}=c,{cleared:u,invalid:d}=h(l,c.options,r);d.forEach(p=>ut.warn(p)),nu(d,r)||s.push(u)}e.axes=s}diffOptions(e){return this===e?{}:e==null?this.processedOptions:this.fastDelta??Sr(e.processedOptions,this.processedOptions,_s.JSON_DIFF_OPTS)}optionsType(e){return e.series?.[0]?.type??"line"}processSeriesOptions(e){const i=e.series?.map(s=>{s.type??(s.type="line");const n=!!qs.getSeriesModule(s.type)?.options.visible;return se(this.getSeriesGroupingOptions(s),s,n&&{visible:!0})});e.series=this.setSeriesGroupingOptions(i??[])}processMiniChartSeriesOptions(e){const i=e.navigator?.miniChart?.series;i!=null&&(e.navigator.miniChart.series=this.setSeriesGroupingOptions(i))}getSeriesGroupingOptions(e){const i=Wn.isGroupable(e.type),s=Wn.isStackable(e.type),a=Wn.isStackedByDefault(e.type);e.grouped&&!i&&ut.warnOnce(`unsupported grouping of series type "${e.type}".`),(e.stacked||e.stackGroup)&&!s&&ut.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:n,stacked:o}=e;return o??(o=(a||e.stackGroup!=null)&&!(i&&n)),n??(n=!0),{stacked:s&&o,grouped:i&&n&&!(s&&o)}}setSeriesGroupingOptions(e){const i=this.getSeriesGrouping(e);_s.debug("ChartOptions.setSeriesGroupingOptions() - series grouping: ",i);const s={},a=i.reduce((n,o)=>{var r;return o.groupType==="default"||(n[r=o.seriesType]??(n[r]=0),n[o.seriesType]+=o.groupType==="stack"?1:o.series.length),n},{});return i.flatMap(n=>{var o;switch(s[o=n.seriesType]??(s[o]=0),n.groupType){case"stack":{const r=s[n.seriesType]++;return n.series.map((l,c)=>Object.assign(l,{seriesGrouping:{groupId:n.groupId,groupIndex:r,groupCount:a[n.seriesType],stackIndex:c,stackCount:n.series.length}}))}case"group":return n.series.map(r=>Object.assign(r,{seriesGrouping:{groupId:n.groupId,groupIndex:s[n.seriesType]++,groupCount:a[n.seriesType],stackIndex:0,stackCount:0}}))}return n.series}).map(({stacked:n,grouped:o,...r})=>r)}getSeriesGroupId(e){return[e.type,e.xKey,e.stacked?e.stackGroup??"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){const i=new Map;return e.reduce((s,a)=>{const n=a.type;if(!a.stacked&&!a.grouped)s.push({groupType:"default",seriesType:n,series:[a],groupId:"__default__"});else{const o=this.getSeriesGroupId(a);if(!i.has(o)){const l={groupType:a.stacked?"stack":"group",seriesType:n,series:[],groupId:o};i.set(o,l),s.push(l)}i.get(o).series.push(a)}return s},[])}soloSeriesIntegrity(e){if(!ss(e.series))return;const i=e.series;if(i&&i.length>1&&i.some(s=>Wn.isSolo(s.type))){const s=this.optionsType(e);if(Wn.isSolo(s))ut.warn(`series[0] of type '${s}' is incompatible with other series types. Only processing series[0]`),e.series=i.slice(0,1);else{const{solo:a,nonSolo:n}=_b(i,r=>Wn.isSolo(r.type)?"solo":"nonSolo"),o=QP(a.map(r=>r.type)).join(", ");ut.warn(`Unable to mix these series types with the lead series type: ${o}`),e.series=n}}}static processFontOptions(e,i,s,a=new Set){if(typeof e=="object"&&"fontFamily"in e)if(Array.isArray(e.fontFamily)){const n=[];for(const o of e.fontFamily)typeof o=="object"&&"googleFont"in o?(n.push(o.googleFont),a?.add(o.googleFont)):n.push(o);e.fontFamily=n.join(", ")}else typeof e.fontFamily=="object"&&"googleFont"in e.fontFamily&&(e.fontFamily=e.fontFamily.googleFont,a?.add(e.fontFamily));return a}processFonts(e,i=new Set){return Dc(e,_s.processFontOptions,new Set(["data","theme"]),void 0,void 0,i)}static removeDisabledOptionJson(e){"enabled"in e&&e.enabled===!1&&Object.keys(e).forEach(i=>{i!=="enabled"&&delete e[i]})}removeDisabledOptions(e){Dc(e,_s.removeDisabledOptionJson,new Set(["data","theme","contextMenu"]))}static removeLeftoverSymbolsJson(e){if(!(!e||!xs(e)))for(const i of Object.keys(e)){const s=e[i];Xf(s)&&delete e[i]}}removeLeftoverSymbols(e){Dc(e,_s.removeLeftoverSymbolsJson,new Set(["data"]))}specialOverridesDefaults(e){if(e.window==null?e.window=de():PP(e.window),e.document==null?e.document=wo():OP(e.document),e.window==null)throw new Error("AG Charts - unable to resolve global window");if(e.document==null)throw new Error("AG Charts - unable to resolve global document");return e}},hh.OPTIONS_CLONE_OPTS_SLOW={shallow:new Set(["data","container"]),assign:new Set(["context","theme"])},hh.OPTIONS_CLONE_OPTS_FAST={shallow:new Set(["container"]),assign:new Set(["data","context","theme"])},hh.JSON_DIFF_OPTS=new Set(["data"]),hh.perfDebug=Ft.create(!0,"perf"),hh.FAST_PATH_OPTIONS=new Set(["data","width","height","container"]),hh.debug=Ft.create(!0,"opts"),zg=hh}}),pw,uh,Fg,gw,BJ=I({"packages/ag-charts-community/src/chart/chartProxy.ts"(){"use strict";xr(),dw(),yi(),Ta(),ta(),pw=Ft.create(!0,"opts"),uh="AG Charts - Chart was destroyed, cannot perform request.",Fg=class{constructor(e,i,s){this.factoryApi=i,this.licenseManager=s,this.chart=e}async update(e){if(!this.chart)throw new Error(uh);return pw.group("AgChartInstance.update()",async()=>{this.factoryApi.update(e,this),await this.chart?.waitForUpdate()})}async updateDelta(e){if(!this.chart)throw new Error(uh);return pw.group("AgChartInstance.updateDelta()",async()=>{this.factoryApi.updateUserDelta(this,e),await this.chart?.waitForUpdate()})}getOptions(){if(!this.chart)throw new Error(uh);const e=$e(this.chart.getOptions(),zg.OPTIONS_CLONE_OPTS_FAST);for(const i of Object.keys(e))i.startsWith("_")&&delete e[i];return e}waitForUpdate(){if(!this.chart)throw new Error(uh);return this.chart.waitForUpdate()}async download(e){if(!this.chart)throw new Error(uh);const i=await this.prepareResizedChart(this,this.chart,e);try{i.chart?.download(e?.fileName,e?.fileFormat)}finally{i.destroy()}}async __toSVG(e){if(!this.chart)throw new Error(uh);const i=await this.prepareResizedChart(this,this.chart,{width:600,height:300,...e});try{return i?.chart?.toSVG()}finally{i?.destroy()}}async getImageDataURL(e){if(!this.chart)throw new Error(uh);const i=await this.prepareResizedChart(this,this.chart,e);try{return i.chart.getCanvasDataURL(e?.fileFormat)}finally{i.destroy()}}getState(){return this.factoryApi.caretaker.save(...this.getEnabledOriginators())}async setState(e){const{chart:i}=this;if(!i)return;const s=this.getEnabledOriginators();if(!s.includes(i.ctx.legendManager)){await this.setStateOriginators(e,s);return}await this.setStateOriginators(e,s.filter(a=>a!==i.ctx.zoomManager)),await this.setStateOriginators(e,[i.ctx.zoomManager])}resetAnimations(){this.chart?.resetAnimations()}skipAnimations(){this.chart?.skipAnimations()}destroy(){this.releaseChart?(this.releaseChart(),this.releaseChart=void 0):this.chart&&(this.chart.publicApi=void 0,this.chart.destroy()),this.chart=void 0}async prepareResizedChart(e,i,s={}){const a=s.width??i.width??i.ctx.scene.canvas.width,n=s.height??i.height??i.ctx.scene.canvas.height,o=e.getState(),r=_o.hasEnterpriseModules(),l={...i.chartOptions.processedOverrides,container:document.createElement("div"),width:a,height:n};s.width!=null&&s.height!=null&&(l.overrideDevicePixelRatio=1);const c=i.getOptions();r&&(l.animation={enabled:!1},this.licenseManager?.isDisplayWatermark()&&(l.foreground={text:this.licenseManager.getWatermarkMessage(),image:{url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=",width:170,height:25,right:25,bottom:50,opacity:.7}}));const h={...i.chartOptions.specialOverrides},u={...i.chartOptions.optionMetadata},d=await this.chart?.ctx.dataService.getData(),p=this.factoryApi.create(c,l,h,u,d);await p.setState(o),p.chart?.ctx.zoomManager.updateZoom("chartProxy",i.ctx.zoomManager.getZoom()),p.chart?.ctx.legendManager.clearData(),p.chart?.ctx.legendManager.update(i.ctx.legendManager.getData()),i.series.forEach((f,x)=>{p.chart.series[x].visible=f.visible});const g=[];for(const f of i.modulesManager.legends())g.push(f.legend.pagination?.currentPage??0);for(const f of p.chart.modulesManager.legends()){const x=g.shift()??0;f.legend.pagination&&f.legend.pagination.setPage(x)}return p.chart?.update(0,{forceNodeDataRefresh:!0}),await p.waitForUpdate(),p}getEnabledOriginators(){if(!this.chart)return[];const{chartOptions:{processedOptions:e,optionMetadata:i},ctx:{annotationManager:s,chartTypeOriginator:a,zoomManager:n,legendManager:o}}=this.chart,r=[];return"annotations"in e&&e.annotations?.enabled&&r.push(s),i.presetType==="price-volume"&&r.push(a),(e.navigator?.enabled||e.zoom?.enabled)&&r.push(n),"legend"in this.chart&&r.push(o),r}async setStateOriginators(e,i){this.factoryApi.caretaker.restore(e,...i),this.chart?.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),await this.chart?.waitForUpdate()}},Fg.chartInstances=new WeakMap,S([Na({oldValue(t){t.destroyed||(t.publicApi=void 0),Fg.chartInstances.delete(t)},newValue(t){t&&(t.publicApi=this,Fg.chartInstances.set(t,this))}})],Fg.prototype,"chart",2),gw=Fg}}),g0,zJ=I({"packages/ag-charts-community/src/locale/locale.ts"(){"use strict";xr(),vt(),ta(),g0=class extends rm{constructor(t){super(),this.ctx=t,this.localeText=void 0}},S([kc(t=>{t.ctx.localeManager.setLocaleText(t.localeText)}),k],g0.prototype,"localeText",2),S([kc(t=>{t.ctx.localeManager.setLocaleTextFormatter(t.getLocaleText)}),k],g0.prototype,"getLocaleText",2)}}),e4,FJ=I({"packages/ag-charts-community/src/locale/localeModule.ts"(){"use strict";zJ(),e4={type:"root",optionsKey:"locale",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new g0(t)}}}),Vg,i4=I({"packages/ag-charts-community/src/scene/util/corner.ts"(){"use strict";Vg=(t,{x0:e,y0:i,x1:s,y1:a,cx:n,cy:o},r,l)=>{if(l&&t.moveTo(e,i),e!==s||i!==a){const c=Math.atan2(i-o,e-n),h=Math.atan2(a-o,s-n);t.arc(n,o,r,c,h)}else t.lineTo(e,i)}}}),fw,By,zy,Gs,Fy=I({"packages/ag-charts-community/src/scene/shape/rect.ts"(){"use strict";R(),Wt(),Fn(),hv(),i4(),Yn(),fw=1e-6,By=(t,e,i,s,a)=>{let n=!1,o=!1,r=s-Math.sqrt(Math.max(a**2-i**2,0)),l=0,c=0,h=i-Math.sqrt(Math.max(a**2-s**2,0));return r>t?(n=!0,r=t,l=i-Math.sqrt(Math.max(a**2-(s-t)**2))):r<fw&&(r=0),h>e?(o=!0,c=s-Math.sqrt(Math.max(a**2-(i-e)**2)),h=e):h<fw&&(h=0),{leading0:r,leading1:l,trailing0:c,trailing1:h,leadingClipped:n,trailingClipped:o}},zy=(t,e,i,s,a,n,o)=>{let{topLeft:r,topRight:l,bottomRight:c,bottomLeft:h}=n;const u=Math.max(r+h,l+c),d=Math.max(r+l,h+c);if(u<=0&&d<=0){o==null?t.rect(e,i,s,a):t.rect(o.x,o.y,o.width,o.height);return}else if(o==null&&r===l&&r===c&&r===h){t.roundRect(e,i,s,a,r);return}if(s<0&&(e+=s,s=Math.abs(s)),a<0&&(i+=a,a=Math.abs(a)),s<=0||a<=0)return;if(o==null)o=new gt(e,i,s,a);else{const C=Math.max(e,o.x),A=Math.min(e+s,o.x+o.width),T=Math.max(i,o.y),N=Math.min(i+a,o.y+o.height);o=new gt(C,T,A-C,N-T)}const p=Math.max(u/a,d/s,1);p>1&&(r/=p,l/=p,c/=p,h/=p);let g=!0,f=!0,x=!0,m=!0,b,v,M,D;if(g){const C=By(o.height,o.width,Math.max(e+r-o.x,0),Math.max(i+r-o.y,0),r);C.leadingClipped&&(m=!1),C.trailingClipped&&(f=!1);const A=Math.max(o.x+C.leading1,o.x),T=Math.max(o.y+C.leading0,o.y),N=Math.max(o.x+C.trailing1,o.x),O=Math.max(o.y+C.trailing0,o.y),E=e+r,z=i+r;b={x0:A,y0:T,x1:N,y1:O,cx:E,cy:z}}if(f){const C=By(o.width,o.height,Math.max(i+l-o.y,0),Math.max(o.x+o.width-(e+s-l),0),l);C.leadingClipped&&(g=!1),C.trailingClipped&&(x=!1);const A=Math.min(o.x+o.width-C.leading0,o.x+o.width),T=Math.max(o.y+C.leading1,o.y),N=Math.min(o.x+o.width-C.trailing0,o.x+o.width),O=Math.max(o.y+C.trailing1,o.y),E=e+s-l,z=i+l;v={x0:A,y0:T,x1:N,y1:O,cx:E,cy:z}}if(x){const C=By(o.height,o.width,Math.max(o.x+o.width-(e+s-c),0),Math.max(o.y+o.height-(i+a-c),0),c);C.leadingClipped&&(f=!1),C.trailingClipped&&(m=!1);const A=Math.min(o.x+o.width-C.leading1,o.x+o.width),T=Math.min(o.y+o.height-C.leading0,o.y+o.height),N=Math.min(o.x+o.width-C.trailing1,o.x+o.width),O=Math.min(o.y+o.height-C.trailing0,o.y+o.height),E=e+s-c,z=i+a-c;M={x0:A,y0:T,x1:N,y1:O,cx:E,cy:z}}if(m){const C=By(o.width,o.height,Math.max(o.y+o.height-(i+a-h),0),Math.max(e+h-o.x,0),h);C.leadingClipped&&(x=!1),C.trailingClipped&&(g=!1);const A=Math.max(o.x+C.leading0,o.x),T=Math.min(o.y+o.height-C.leading1,o.y+o.height),N=Math.max(o.x+C.trailing0,o.x),O=Math.min(o.y+o.height-C.trailing1,o.y+o.height),E=e+h,z=i+a-h;D={x0:A,y0:T,x1:N,y1:O,cx:E,cy:z}}let L=!1;g&&b!=null&&(Vg(t,b,r,!L),L||(L=!0)),f&&v!=null&&(Vg(t,v,l,!L),L||(L=!0)),x&&M!=null&&(Vg(t,M,c,!L),L||(L=!0)),m&&D!=null&&Vg(t,D,h,!L),t.closePath()},Gs=class extends Fs{constructor(){super(...arguments),this.borderPath=new yu,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=this.strokeWidth,this.effectiveStrokeWidth=this.strokeWidth,this.hittester=super.isPointInPath.bind(this),this.distanceCalculator=super.distanceSquaredTransformedPoint.bind(this),this.microPixelEffectOpacity=1}set cornerRadius(t){this.topLeftCornerRadius=t,this.topRightCornerRadius=t,this.bottomRightCornerRadius=t,this.bottomLeftCornerRadius=t}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){const{path:t,borderPath:e,crisp:i,topLeftCornerRadius:s,topRightCornerRadius:a,bottomRightCornerRadius:n,bottomLeftCornerRadius:o}=this;let{x:r,y:l,width:c,height:h,strokeWidth:u,clipBBox:d}=this;const g=1/(this.layerManager?.canvas.pixelRatio??1);let f=1;if(t.clear(!0),e.clear(!0),i&&(c<=g&&(f*=c/g),h<=g&&(f*=h/g),c=this.align(r,c),h=this.align(l,h),r=this.align(r),l=this.align(l),d=d!=null?new gt(this.align(d.x),this.align(d.y),this.align(d.x,d.width),this.align(d.y,d.height)):void 0),u)if(c<g){const x=r+g/2;e.moveTo(x,l),e.lineTo(x,l+h),u=g,this.borderClipPath=void 0}else if(h<g){const x=l+g/2;e.moveTo(r,x),e.lineTo(r+c,x),u=g,this.borderClipPath=void 0}else if(u<c&&u<h){const x=u/2;r+=x,l+=x,c-=u,h-=u;const m=d?.clone().shrink(x),b={topLeft:s>0?s-u:0,topRight:a>0?a-u:0,bottomRight:n>0?n-u:0,bottomLeft:o>0?o-u:0};this.borderClipPath=void 0,c>0&&h>0&&(m==null||m?.width>0&&m?.height>0)&&(zy(t,r,l,c,h,b,m),zy(e,r,l,c,h,b,m))}else this.borderClipPath=this.borderClipPath??new yu,this.borderClipPath.clear(!0),this.borderClipPath.rect(r,l,c,h),e.rect(r,l,c,h);else{const x={topLeft:s,topRight:a,bottomRight:n,bottomLeft:o};this.borderClipPath=void 0,zy(t,r,l,c,h,x,d)}if([s,a,n,o].every(x=>x===0)){const x=this.getBBox();this.hittester=x.containsPoint.bind(x),this.distanceSquared=(m,b)=>this.getBBox().distanceSquared(m,b)}else this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint;this.effectiveStrokeWidth=u,this.lastUpdatePathStrokeWidth=u,this.microPixelEffectOpacity=f}computeBBox(){const{x:t,y:e,width:i,height:s,clipBBox:a}=this;return a?.clone()??new gt(t,e,i,s)}isPointInPath(t,e){return this.hittester(t,e)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(t,e){return this.distanceCalculator(t,e)}applyFillAndAlpha(t){super.applyFillAndAlpha(t),t.globalAlpha*=this.microPixelEffectOpacity}applyStrokeAndAlpha(t){super.applyStrokeAndAlpha(t),t.globalAlpha*=this.microPixelEffectOpacity}renderStroke(t){const{stroke:e,effectiveStrokeWidth:i}=this;if(e&&i){const{globalAlpha:s}=t,{lineDash:a,lineDashOffset:n,lineCap:o,lineJoin:r,borderPath:l,borderClipPath:c}=this;c&&t.clip(c.getPath2D()),this.applyStrokeAndAlpha(t),t.lineWidth=i,a&&t.setLineDash(a),n&&(t.lineDashOffset=n),o&&(t.lineCap=o),r&&(t.lineJoin=r),t.stroke(l.getPath2D()),t.globalAlpha=s}}},Gs.className="Rect",S([lt()],Gs.prototype,"x",2),S([lt()],Gs.prototype,"y",2),S([lt()],Gs.prototype,"width",2),S([lt()],Gs.prototype,"height",2),S([lt()],Gs.prototype,"topLeftCornerRadius",2),S([lt()],Gs.prototype,"topRightCornerRadius",2),S([lt()],Gs.prototype,"bottomRightCornerRadius",2),S([lt()],Gs.prototype,"bottomLeftCornerRadius",2),S([nn({equals:Bb})],Gs.prototype,"clipBBox",2),S([lt()],Gs.prototype,"crisp",2)}}),xd,s4=I({"packages/ag-charts-community/src/chart/background/background.ts"(){"use strict";xr(),Oe(),Fy(),cn(),vt(),ta(),xd=class extends rm{constructor(t){super(),this.ctx=t,this.rectNode=new Gs,this.textNode=new rs,this.fill="white",this.node=this.createNode(),this.node.append([this.rectNode,this.textNode]),this.visible=!0,this.cleanup.register(t.scene.attachNode(this.node),t.eventsHub.on("layout:complete",e=>this.onLayoutComplete(e)))}createNode(){return new Lt({name:"background",zIndex:0})}onLayoutComplete(t){const{width:e,height:i}=t.chart;this.rectNode.width=e,this.rectNode.height=i}},S([k,os("node","visible")],xd.prototype,"visible",2),S([k,os("rectNode","fill")],xd.prototype,"fill",2),S([k],xd.prototype,"image",2),S([k,os("textNode")],xd.prototype,"text",2)}}),mw,a4=I({"packages/ag-charts-community/src/chart/background/backgroundModule.ts"(){"use strict";s4(),mw={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new xd(t)}}});function VJ({orientation:t,bboxes:e,maxHeight:i,maxWidth:s,itemPaddingY:a=0,itemPaddingX:n=0,forceResult:o=!1}){const r=t==="horizontal",l={max:r?s:i,fn:r?d=>d.width:d=>d.height,padding:r?n:a},c={max:r?i:s,fn:r?d=>d.height:d=>d.width,padding:r?a:n};let h=0;const u=[];for(;h<e.length;){const d=e.slice(h),p=GJ(d,h,l,c,o);if(!p)return;h+=p.processedBBoxCount,u.push(p.pageIndices)}return WJ(u,t,e,a,n)}function GJ(t,e,i,s,a){let o=$J(t,i);if(o<1){if(!a)return;o=1}let r=o;for(;r>=1;){const l=jJ(t,e,r,i,s,a);if(l==null&&r<=1)return;if(l==null){r--;continue}if(typeof l=="number"){if(l<=1)return;r=l<r&&l>1?l:r,r--;continue}return{processedBBoxCount:l.length*l[0].length,pageIndices:l}}}function jJ(t,e,i,s,a,n){const o=[];let r=0,l=0,c=[];const h=[];for(let u=0;u<t.length;u++){const d=(u+i)%i;d===0&&(r+=l,l=0,c.length>0&&o.push(c),c=[]);const p=s.fn(t[u])+s.padding;h[d]=Math.max(h[d]??0,p),l=Math.max(l,a.fn(t[u])+a.padding);const g=r+l,f=!n||o.length>0;if(g>a.max&&f){c=[];break}if(h.reduce((m,b)=>m+b,0)>s.max&&!n)return h.length<i?h.length:void 0;c.push(u+e)}return c.length>0&&o.push(c),o.length>0?o:void 0}function WJ(t,e,i,s,a){let n=0,o=0;return{pages:t.map(l=>{e==="horizontal"&&(l=HJ(l));let c=0;const h=l.map(p=>{const g=p.map(m=>(c=Math.max(m,c),i[m]));let f=0,x=0;return g.forEach(m=>{f+=m.height+s,x=Math.max(x,m.width+a)}),{indices:p,bboxes:g,columnHeight:Math.ceil(f),columnWidth:Math.ceil(x)}});let u=0,d=0;return h.forEach(p=>{u+=p.columnWidth,d=Math.max(d,p.columnHeight)}),n=Math.max(u,n),o=Math.max(d,o),{columns:h,startIndex:l[0][0],endIndex:c,pageWidth:u,pageHeight:d}}),maxPageWidth:n,maxPageHeight:o}}function HJ(t){const e=[];for(const i of t[0])e.push([]);return t.forEach((i,s)=>{i.forEach((a,n)=>{e[n][s]=a})}),e}function $J(t,e){const i=t.length;let s=0;for(let a=0;a<i;a++)if(s+=e.fn(t[a])+e.padding,s>e.max)return i/a<2?Math.ceil(i/2):a;return i}var UJ=I({"packages/ag-charts-community/src/chart/gridLayout.ts"(){"use strict"}}),bd,zr,Vy,dh,KJ=I({"packages/ag-charts-community/src/chart/pagination/pagination.ts"(){"use strict";R(),Oe(),cn(),ns(),vt(),vt(),ta(),Go(),bd=class extends Nt{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}},S([k],bd.prototype,"color",2),S([k],bd.prototype,"fontStyle",2),S([k],bd.prototype,"fontWeight",2),S([k],bd.prototype,"fontSize",2),S([k],bd.prototype,"fontFamily",2),zr=class extends Nt{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}},S([k],zr.prototype,"size",2),S([k],zr.prototype,"fill",2),S([k],zr.prototype,"fillOpacity",2),S([k],zr.prototype,"stroke",2),S([k],zr.prototype,"strokeWidth",2),S([k],zr.prototype,"strokeOpacity",2),Vy=class extends Nt{constructor(t){super(),this.parent=t,this.shape="triangle",this.size=15,this.padding=8}},S([Na({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],Vy.prototype,"shape",2),S([k],Vy.prototype,"size",2),S([k],Vy.prototype,"padding",2),dh=class extends Nt{constructor(t,e){super(),this.chartUpdateCallback=t,this.pageUpdateCallback=e,this.id=zn(this),this.marker=new Vy(this),this.activeStyle=new zr,this.inactiveStyle=new zr,this.highlightStyle=new zr,this.label=new bd,this.group=new vs({name:"pagination"}),this.labelNode=new rs,this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this.nextButton=new wi,this.previousButton=new wi,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]),this.update(),this.updateMarkers()}set visible(t){this._visible=t,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(t){this._enabled=t,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(t){switch(this._orientation=t,t){case"horizontal":{this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2;break}case"vertical":default:this.previousButton.rotation=0,this.nextButton.rotation=Math.PI}}get orientation(){return this._orientation}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){const{size:t,padding:e}=this.marker;this.nextButton.size=t,this.previousButton.size=t,this.labelNode.x=t/2+e}updateNextButtonPosition(){const t=this.labelNode.getBBox();this.nextButton.translationX=t.width+(this.marker.size/2+this.marker.padding)*2}updateLabel(){const{currentPage:t,totalPages:e,labelNode:i,label:{color:s,fontStyle:a,fontWeight:n,fontSize:o,fontFamily:r}}=this;i.text=`${t+1} / ${e}`,i.fill=s,i.fontStyle=a,i.fontWeight=n,i.fontSize=o,i.fontFamily=r}updateMarkers(){const{nextButton:t,previousButton:e,nextButtonDisabled:i,previousButtonDisabled:s,activeStyle:a,inactiveStyle:n,highlightStyle:o,highlightActive:r}=this,l=(c,h)=>h?n:c===r?o:a;this.updateMarker(t,l("next",i)),this.updateMarker(e,l("previous",s))}updateMarker(t,e){const{shape:i,size:s}=this.marker;t.shape=i,t.size=s,t.fill=e.fill,t.fillOpacity=e.fillOpacity??1,t.stroke=e.stroke,t.strokeWidth=e.strokeWidth,t.strokeOpacity=e.strokeOpacity}enableOrDisableButtons(){const{currentPage:t,totalPages:e}=this,i=e===0,s=t===e-1,a=t===0;this.nextButtonDisabled=s||i,this.previousButtonDisabled=a||i}setPage(t){t=Et(0,t,Math.max(0,this.totalPages-1)),this.currentPage!==t&&(this.currentPage=t,this.onPaginationChanged())}getCursor(t){return{previous:this.previousButtonDisabled,next:this.nextButtonDisabled}[t]?void 0:"pointer"}onClick(t,e){t.preventDefault(),e==="next"&&!this.nextButtonDisabled?(this.incrementPage(),this.onPaginationChanged()):e==="previous"&&!this.previousButtonDisabled&&(this.decrementPage(),this.onPaginationChanged())}onMouseHover(t){this.highlightActive=t,this.updateMarkers(),this.chartUpdateCallback(7)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(7)}attachPagination(t){t.append(this.group)}getBBox(){return this.group.getBBox()}computeCSSBounds(){const t=He.toCanvas(this.previousButton),e=He.toCanvas(this.nextButton);return{prev:t,next:e}}},dh.className="Pagination",S([k],dh.prototype,"marker",2),S([k],dh.prototype,"activeStyle",2),S([k],dh.prototype,"inactiveStyle",2),S([k],dh.prototype,"highlightStyle",2),S([k],dh.prototype,"label",2)}}),n4,YJ=I({"packages/ag-charts-community/src/chart/legend/legendDOMProxy.ts"(){"use strict";R(),ns(),n4=class{constructor(t,e){this.dirty=!0,this.itemList=t.proxyInteractionService.createProxyContainer({type:"list",domManagerId:`${e}-toolbar`,classList:["ag-charts-proxy-legend-toolbar"],ariaLabel:{id:"ariaLabelLegend"}}),this.paginationGroup=t.proxyInteractionService.createProxyContainer({type:"group",domManagerId:`${e}-pagination`,classList:["ag-charts-proxy-legend-pagination"],ariaLabel:{id:"ariaLabelLegendPagination"},ariaOrientation:"horizontal"}),this.itemDescription=zt("p"),this.itemDescription.style.display="none",this.itemDescription.id=om(),this.itemDescription.textContent=this.getItemAriaDescription(t.localeManager),this.itemList.getElement().append(this.itemDescription)}initLegendList(t){if(!this.dirty)return;const{ctx:e,itemSelection:i,datumReader:s,itemListener:a}=t,n=e.localeManager,o=i.length;i.each((r,l,c)=>{r.proxyButton?.destroy(),r.proxyButton=e.proxyInteractionService.createProxyElement({type:"listswitch",textContent:this.getItemAriaText(n,s.getItemLabel(l),c,o),ariaChecked:!!r.datum.enabled,ariaDescribedBy:this.itemDescription.id,parent:this.itemList});const h=r.proxyButton;h.addListener("click",u=>a.onClick(u.sourceEvent,r.datum,h)),h.addListener("dblclick",u=>a.onDoubleClick(u.sourceEvent,r.datum)),h.addListener("mouseenter",u=>a.onHover(u.sourceEvent,r)),h.addListener("mouseleave",()=>a.onLeave()),h.addListener("contextmenu",u=>a.onContextClick(u,r)),h.addListener("blur",()=>a.onLeave()),h.addListener("focus",u=>a.onHover(u.sourceEvent,r)),h.addListener("drag-start",()=>{})}),this.dirty=!1}update(t){t.visible&&(this.initLegendList(t),this.updateItemProxyButtons(t),this.updatePaginationProxyButtons(t,!0)),this.updateVisibility(t.visible)}updateVisibility(t){this.itemList.setHidden(!t),this.paginationGroup.setHidden(!t)}updateItemProxyButtons({itemSelection:t,group:e,pagination:i,interactive:s}){const a=He.toCanvas(e);this.itemList.setBounds(a);const n=Math.max(...t.nodes().map(o=>o.getBBox().height));t.each((o,r)=>{if(o.proxyButton){const l=o.pageIndex===i.currentPage,{x:c,y:h,height:u,width:d}=He.toCanvas(o),p=(n-u)/2,g={x:c-a.x,y:h-p-a.y,height:n,width:d},f=s&&l;o.proxyButton.setCursor("pointer"),o.proxyButton.setEnabled(f),o.proxyButton.setPointerEvents(f?void 0:"none"),o.proxyButton.setBounds(g)}})}updatePaginationProxyButtons(t,e){const{pagination:i}=t;if(this.paginationGroup.setHidden(!i.visible),e&&"ctx"in t){const{ctx:n,oldPages:o,newPages:r}=t,l=(o?.length??r.length)>1,c=r.length>1;l!==c&&(c?(this.prevButton=n.proxyInteractionService.createProxyElement({type:"button",textContent:{id:"ariaLabelLegendPagePrevious"},tabIndex:0,parent:this.paginationGroup}),this.prevButton.addListener("click",h=>this.onPageButton(t,h,"previous")),this.prevButton.addListener("mouseenter",()=>i.onMouseHover("previous")),this.prevButton.addListener("mouseleave",()=>i.onMouseHover(void 0)),this.nextButton??(this.nextButton=n.proxyInteractionService.createProxyElement({type:"button",textContent:{id:"ariaLabelLegendPageNext"},tabIndex:0,parent:this.paginationGroup})),this.nextButton.addListener("click",h=>this.onPageButton(t,h,"next")),this.nextButton.addListener("mouseenter",()=>i.onMouseHover("next")),this.nextButton.addListener("mouseleave",()=>i.onMouseHover(void 0))):(this.nextButton?.destroy(),this.prevButton?.destroy(),this.nextButton=void 0,this.prevButton=void 0))}const{prev:s,next:a}=i.computeCSSBounds();this.prevButton?.setBounds(s),this.nextButton?.setBounds(a),this.prevButton?.setEnabled(i.currentPage!==0),this.nextButton?.setEnabled(i.currentPage!==i.totalPages-1),this.nextButton?.setCursor(i.getCursor("next")),this.prevButton?.setCursor(i.getCursor("previous"))}onPageButton(t,e,i){t.pagination.onClick(e.sourceEvent,i),this.updatePaginationProxyButtons(t,!1)}onDataUpdate(t,e){this.dirty=t.length!==e.length||t.some((i,s,a)=>{const[n,o]=[e[s],t[s]];return n.id!==o.id})}onLocaleChanged(t,e,i){const s=e.length;e.each(({proxyButton:a},n,o)=>{const r=a?.getElement();if(r!=null){const l=i.getItemLabel(n);r.textContent=this.getItemAriaText(t,l,o,s)}}),this.itemDescription.textContent=this.getItemAriaDescription(t)}onPageChange(t){this.updateItemProxyButtons(t),this.updatePaginationProxyButtons(t,!1)}getItemAriaText(t,e,i,s){return i>=0&&e?(i++,t.t("ariaLabelLegendItem",{label:e,index:i,count:s})):t.t("ariaLabelLegendItemUnknown")}getItemAriaDescription(t){return t.t("ariaDescriptionLegendItem")}}}});function o4(t,{itemId:e,seriesId:i,label:{text:s}},a){const n={defaultPrevented:!1,apiEvent:{type:t,itemId:e,seriesId:i,text:s,event:a,preventDefault:()=>n.defaultPrevented=!0}};return n}var ZJ=I({"packages/ag-charts-community/src/chart/legend/legendEvent.ts"(){"use strict"}}),xn,r4=I({"packages/ag-charts-community/src/chart/legend/legendMarkerLabel.ts"(){"use strict";Wt(),Fn(),Oe(),$u(),cn(),ns(),ta(),Go(),xn=class extends Su(Lt){constructor(){super({name:"markerLabelGroup"}),this.symbolsGroup=this.appendChild(new Lt({name:"legend-markerLabel-symbols"})),this.label=this.appendChild(new rs),this.enabled=!0,this.pageIndex=NaN,this.spacing=0,this.length=0,this.isCustomMarker=!1,this.marker=this.symbolsGroup.appendChild(new wi({zIndex:1})),this.line=this.symbolsGroup.appendChild(new pa({zIndex:0}));const{label:t,line:e,symbolsGroup:i}=this;e.visible=!1,i.renderToOffscreenCanvas=!0,i.optimizeForInfrequentRedraws=!0,t.textBaseline="middle",t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.y=1}destroy(){super.destroy(),this.proxyButton?.destroy()}setEnabled(t){this.enabled=t,this.refreshVisibilities()}getTextMeasureBBox(){return this.layout(),gt.merge([this.symbolsGroup.getBBox(),this.label.getTextMeasureBBox()])}refreshVisibilities(){const t=this.enabled?1:.5;this.label.opacity=t,this.opacity=t}layout(){const{marker:t,line:e,length:i,isCustomMarker:s}=this;let a=0,n=0;if(t.visible){const{size:o}=t,r=wi.anchor(t.shape);a=(r.x-.5)*o+i/2,n=(r.y-.5)*o,s?(t.x=0,t.y=0,t.translationX=a,t.translationY=n):(t.x=a,t.y=n,t.translationX=0,t.translationY=0)}e.visible&&(e.x1=0,e.x2=i,e.y1=0,e.y2=0)}preRender(t){const e=super.preRender(t);return this.layout(),e}layoutLabel(){const{length:t,spacing:e}=this;this.label.x=t+e}computeBBox(){return this.layout(),super.computeBBox()}},xn.className="MarkerLabel",S([os("label")],xn.prototype,"text",2),S([os("label")],xn.prototype,"fontStyle",2),S([os("label")],xn.prototype,"fontWeight",2),S([os("label")],xn.prototype,"fontSize",2),S([os("label")],xn.prototype,"fontFamily",2),S([os("label","fill")],xn.prototype,"color",2),S([kc(t=>t.layoutLabel())],xn.prototype,"spacing",2),S([kc(t=>t.layoutLabel())],xn.prototype,"length",2),S([lt()],xn.prototype,"isCustomMarker",2)}}),zl,vd,f0,Fl,m0,l4,c4,h4,ya,XJ=I({"packages/ag-charts-community/src/chart/legend/legend.ts"(){"use strict";R(),Wt(),Oe(),Nc(),ns(),bu(),Du(),Pt(),vt(),ta(),ln(),Av(),UJ(),Go(),KJ(),Al(),YJ(),ZJ(),r4(),zl=class extends Nt{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}},S([k],zl.prototype,"maxLength",2),S([k],zl.prototype,"color",2),S([k],zl.prototype,"fontStyle",2),S([k],zl.prototype,"fontWeight",2),S([k],zl.prototype,"fontSize",2),S([k],zl.prototype,"fontFamily",2),S([k],zl.prototype,"formatter",2),vd=class extends Nt{constructor(){super(...arguments),this.shape=void 0,this.size=15,this.padding=8}},S([k],vd.prototype,"shape",2),S([k],vd.prototype,"size",2),S([k],vd.prototype,"padding",2),S([k],vd.prototype,"strokeWidth",2),S([k],vd.prototype,"enabled",2),f0=class extends Nt{},S([k],f0.prototype,"strokeWidth",2),S([k],f0.prototype,"length",2),Fl=class extends Nt{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.showSeriesStroke=!1,this.marker=new vd,this.label=new zl,this.line=new f0}},S([k],Fl.prototype,"maxWidth",2),S([k],Fl.prototype,"paddingX",2),S([k],Fl.prototype,"paddingY",2),S([k],Fl.prototype,"showSeriesStroke",2),S([k],Fl.prototype,"marker",2),S([k],Fl.prototype,"label",2),S([k],Fl.prototype,"line",2),m0=class extends Nt{},S([k],m0.prototype,"legendItemClick",2),S([k],m0.prototype,"legendItemDoubleClick",2),l4={type:"gradient",bounds:"item",gradient:"linear",colorStops:[{color:"black"}],rotation:0,reverse:!1},c4={type:"pattern",pattern:"forward-slanted-lines",width:8,height:8,padding:1,fill:"black",fillOpacity:1,backgroundFill:"white",backgroundFillOpacity:1,stroke:"black",strokeOpacity:1,strokeWidth:0,rotation:0,scale:1},h4={type:"image",backgroundFill:"black",backgroundFillOpacity:1,rotation:0,repeat:"no-repeat",fit:"contain",width:8,height:8},ya=class extends Nt{constructor(t){super(),this.ctx=t,this.id=zn(this),this.group=new vs({name:"legend",zIndex:15}),this.itemSelection=Ci.select(this.group,xn),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this.toggleSeries=!0,this.item=new Fl,this.listeners=new m0,this.enabled=!0,this.position="bottom",this.spacing=20,this.cleanup=new Fe,this.size=[0,0],this._visible=!0,this.pagination=new dh(i=>t.updateService.update(i),i=>this.updatePageNumber(i)),this.pagination.attachPagination(this.group);const{items:e}=t.contextMenuRegistry.builtins;e["toggle-series-visibility"].action=i=>this.contextToggleVisibility(i),e["toggle-other-series"].action=i=>this.contextToggleOtherSeries(i),this.cleanup.register(t.eventsHub.on("legend:change",this.onLegendDataChange.bind(this)),t.layoutManager.registerElement(1,i=>this.positionLegend(i)),t.eventsHub.on("locale:change",()=>this.onLocaleChanged()),()=>delete e["toggle-series-visibility"].action,()=>delete e["toggle-other-series"].action,()=>this.group.remove()),this.domProxy=new n4(this.ctx,this.id),this.ctx.historyManager.addMementoOriginator(t.legendManager)}set data(t){Wi(t,this._data)||(this.domProxy.onDataUpdate(this._data,t),this._data=t,this.updateGroupVisibility())}get data(){return this._data}onLegendDataChange({legendData:t=[]}){this.enabled&&(this.data=t.filter(e=>!e.hideInLegend))}destroy(){this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-toolbar`),this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-pagination`),this.cleanup.flush(),this.itemSelection.clear()}getOrientation(){return this.orientation??"horizontal"}set visible(t){this._visible=t,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(t){t.appendChild(this.group)}getItemLabel(t){const{formatter:e}=this.item.label;if(e){const i=t.datum;return this.cachedCallWithContext(e,{itemId:t.itemId,value:t.label.text,seriesId:t.seriesId,...i&&{datum:i}})}return t.label.text}calcLayout(t,e){const{paddingX:i,paddingY:s,label:a,maxWidth:n,label:{maxLength:o=1/0,fontStyle:r,fontWeight:l,fontSize:c,fontFamily:h}}=this.item,u=[...this.data];this.reverseOrder&&u.reverse(),this.itemSelection.update(u);const d=[],p=Dr.getMeasurer({font:a}),f=n??t*.8,{markerWidth:x,anyLineEnabled:m}=this.calculateMarkerWidth();if(this.itemSelection.each((N,O)=>{N.fontStyle=r,N.fontWeight=l,N.fontSize=c,N.fontFamily=h;const E=this.updateMarkerLabel(N,O,x,m),z=O.itemId??O.id,F=(this.getItemLabel(O)??"<unknown>").replace(/\r?\n/g," ");N.text=this.truncate(F,o,f,E,p,z),d.push(N.getTextMeasureBBox())}),t=Math.max(1,t),e=Math.max(1,e),!isFinite(t))return{};const b=this.size,v=this.oldSize;b[0]=t,b[1]=e,(b[0]!==v[0]||b[1]!==v[1])&&(v[0]=b[0],v[1]=b[1]);const{pages:M,maxPageHeight:D,maxPageWidth:L}=this.updatePagination(d,t,e),C=this.pages;this.pages=M,this.maxPageSize=[L-i,D-s];const A=this.pagination.currentPage,T=this.pages[A];return this.pages.length<1||!T?(this.visible=!1,{oldPages:C}):(this.visible=!0,this.updatePositions(A),this.update(),{oldPages:C})}isCustomMarker(t,e){return t&&e!==void 0&&typeof e!="string"}calcSymbolsEnabled(t){const{showSeriesStroke:e,marker:i}=this.item,s=!!i.enabled||!e||(t.marker.enabled??!0),a=!!(t.line&&e),n=this.isCustomMarker(s,t.marker.shape);return{markerEnabled:s,lineEnabled:a,isCustomMarker:n}}calcSymbolsLengths(t,e,i){const{marker:s,line:a}=this.item;let n;const{shape:o}=t.marker;if(this.isCustomMarker(e,o)){const c=new wi;c.shape=o,c.updatePath();const h=c.getBBox();n=Math.max(h.width,h.height)}const r=e?s.size:0,l=i?a.length??25:0;return{markerLength:r,lineLength:l,customMarkerSize:n}}calculateMarkerWidth(){let t=0,e=!1;return this.itemSelection.each((i,s)=>{const{symbol:a}=s,{lineEnabled:n,markerEnabled:o}=this.calcSymbolsEnabled(a),{markerLength:r,lineLength:l,customMarkerSize:c=-1/0}=this.calcSymbolsLengths(a,o,n);t=Math.max(t,l,c,r),e||(e=n)}),{markerWidth:t,anyLineEnabled:e}}updateMarkerLabel(t,e,i,s){const{marker:a,paddingX:n}=this.item,{symbol:o}=e;let r=n;const{markerEnabled:l,isCustomMarker:c}=this.calcSymbolsEnabled(o),h=a.padding;(l||s)&&(r+=h+i);const{marker:u,line:d}=t;return u.visible=l,u.visible&&(u.shape=a.shape??o.marker.shape??"square",u.size=a.size,Il(u,this.getMarkerStyles(o))),d.visible=s,d.visible&&Il(d,this.getLineStyles(o)),t.length=i,t.spacing=h,t.isCustomMarker=c,r}truncate(t,e,i,s,a,n){let o=!1;t.length>e&&(t=t.substring(0,e),o=!0);const r=bm.truncateLine(t,a,i-s,o);return r.endsWith(we.EllipsisChar)?this.truncatedItems.add(n):this.truncatedItems.delete(n),r}updatePagination(t,e,i){const s=this.getOrientation(),a=Math.min(this.paginationTrackingIndex,t.length);this.pagination.orientation=s,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:n,maxPageHeight:o,maxPageWidth:r,paginationBBox:l,paginationVertical:c}=this.calculatePagination(t,e,i),h=n.findIndex(v=>v.endIndex>=a);this.pagination.currentPage=Et(0,h,n.length-1);const{paddingX:u,paddingY:d}=this.item,p=8,g=r-u,f=o-d;let x=0,m=-l.y-this.item.marker.size/2;c?m+=f+p:(x+=-l.x+g+p,m+=(f-l.height)/2),this.pagination.translationX=x,this.pagination.translationY=m,this.pagination.update(),this.pagination.updateMarkers();let b=0;return this.itemSelection.each((v,M,D)=>{D>(n[b]?.endIndex??1/0)&&b++,v.pageIndex=b}),{maxPageHeight:o,maxPageWidth:r,pages:n}}calculatePagination(t,e,i){const{paddingX:s,paddingY:a}=this.item,n=this.getOrientation(),o=["left","right"].includes(this.position);let r=this.pagination.getBBox(),l=new gt(0,0,0,0),c=[],h=0,u=0,d=0;const p=f=>f.width===r.width&&f.height===r.height,g=this.maxWidth!==void 0&&this.maxHeight!==void 0;do{if(d++>10){ut.warn("unable to find stable legend layout.");break}r=l;const f=e-(o?0:r.width),x=i-(o?r.height:0),m=VJ({orientation:n,bboxes:t,maxHeight:x,maxWidth:f,itemPaddingY:a,itemPaddingX:s,forceResult:g});c=m?.pages??[],h=m?.maxPageWidth??0,u=m?.maxPageHeight??0;const b=c.length;if(this.pagination.visible=b>1,this.pagination.totalPages=b,this.pagination.update(),this.pagination.updateMarkers(),l=this.pagination.getBBox(),!this.pagination.visible)break}while(!p(l));return{maxPageWidth:h,maxPageHeight:u,pages:c,paginationBBox:l,paginationVertical:o}}updatePositions(t=0){const{item:{paddingY:e},itemSelection:i,pages:s}=this;if(s.length<1||!s[t])return;const{columns:a,startIndex:n,endIndex:o}=s[t];let r=0,l=0;const c=a.length,h=a[0].indices.length,u=this.getOrientation()==="horizontal",d=a[0].bboxes[0].height+e,p=[];i.each((g,f,x)=>{if(x<n||x>o){g.visible=!1;return}const m=x-n;let b,v;u?(b=m%c,v=Math.floor(m/c)):(b=Math.floor(m/h),v=m%h),g.visible=!0;const M=a[b];M&&(l=Math.floor(d*v),r=Math.floor(p[v]??0),p[v]=(p[v]??0)+M.columnWidth,g.translationX=r,g.translationY=l)})}updatePageNumber(t){const{itemSelection:e,group:i,pagination:s,pages:a,toggleSeries:n}=this,{startIndex:o,endIndex:r}=a[t];o===0?this.paginationTrackingIndex=0:t===a.length-1?this.paginationTrackingIndex=r:this.paginationTrackingIndex=Math.floor((o+r)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(t),this.domProxy.onPageChange({itemSelection:e,group:i,pagination:s,interactive:n}),this.ctx.updateService.update(7)}update(){const{label:{color:t}}=this.item;this.itemSelection.each((e,i)=>{e.setEnabled(i.enabled),e.color=t}),this.updateContextMenu()}updateContextMenu(){this.ctx.contextMenuRegistry.setVisible("toggle-series-visibility",this.toggleSeries),this.ctx.contextMenuRegistry.setVisible("toggle-other-series",this.toggleSeries)}getLineStyles(t){const{stroke:e,strokeOpacity:i=1,strokeWidth:s,lineDash:a}=t.line??{},n=Math.min(2,s??1);return{stroke:e,strokeOpacity:i,strokeWidth:this.item.line.strokeWidth??n,lineDash:a}}getMarkerStyles({marker:t}){const{fill:e,stroke:i,strokeOpacity:s=1,fillOpacity:a=1,strokeWidth:n,lineDash:o,lineDashOffset:r}=t,l=Math.min(2,n??1);return Sc(e)&&(e.width=8,e.height=8,e.padding=1,e.strokeWidth=Math.min(2,e.strokeWidth??2)),xu(e)&&(e.fit="contain",e.width=void 0,e.height=void 0,e.repeat="no-repeat"),wr({fill:e,stroke:i,strokeOpacity:s,fillOpacity:a,strokeWidth:this.item.marker.strokeWidth??l,lineDash:o,lineDashOffset:r},l4,c4,h4)}computePagedBBox(){const t=Lt.computeChildrenBBox(this.group.children());if(this.pages.length>1){const[e,i]=this.maxPageSize;t.height=Math.max(i,t.height),t.width=Math.max(e,t.width)}return t}findNode(t){const{datum:e,proxyButton:i}=this.itemSelection.select(s=>s.datum?.itemId===t.itemId)[0]??{};if(e===void 0||i===void 0)throw new Error(`AG Charts - Missing required properties { datum: ${e}, proxyButton: ${JSON.stringify(i)} }`);return{datum:e,proxyButton:i}}contextToggleVisibility(t){const{datum:e,proxyButton:i}=this.findNode(t);this.doClick(t.event,e,i)}contextToggleOtherSeries(t){this.doDoubleClick(t.event,this.findNode(t).datum)}onContextClick(t,e){const{sourceEvent:i}=t,s=e.datum;this.preventHidingAll&&this.contextMenuDatum?.enabled&&this.getVisibleItemCount()<=1?this.ctx.contextMenuRegistry.builtins.items["toggle-series-visibility"].enabled=!1:this.ctx.contextMenuRegistry.builtins.items["toggle-series-visibility"].enabled=!0;const a=this.ctx.chartService.series.length>1&&this.ctx.chartService.series[0]?.getLegendData("category")[0]?.hideToggleOtherSeries!==!0;this.ctx.contextMenuRegistry.setVisible("toggle-other-series",a);const{offsetX:n,offsetY:o}=i,{x:r,y:l}=He.toCanvasPoint(e,n,o);this.ctx.contextMenuRegistry.dispatchContext("legend-item",{widgetEvent:t,canvasX:r,canvasY:l},{legendItem:s})}onClick(t,e,i){this.doClick(t,e,i)&&t.preventDefault()}getVisibleItemCount(){return this.ctx.chartService.series.flatMap(t=>t.getLegendData("category")).filter(t=>t.enabled).length}doClick(t,e,i){const{listeners:{legendItemClick:s},ctx:{chartService:a,highlightManager:n},preventHidingAll:o,toggleSeries:r}=this;if(!e)return!1;const{legendType:l,seriesId:c,itemId:h,enabled:u,legendItemName:d}=e,p=a.series.find(x=>x.id===c);if(!p)return!1;let g=u;const f=o4("click",e,t);return s&&fl([p.properties,this.ctx.chartService],s,f.apiEvent),f.defaultPrevented||(r&&(g=!u,o&&!g&&this.getVisibleItemCount()<2&&(g=!0),i.setChecked(g),this.ctx.eventsHub.emit("legend:item-click",{legendType:l,series:p,itemId:h,enabled:g,legendItemName:d})),g?n.updateHighlight(this.id,{series:p,itemId:h,datum:void 0,datumIndex:void 0,legendItemName:d}):n.updateHighlight(this.id),this.ctx.legendManager.update(),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0,skipAnimations:e.skipAnimations??!1})),!0}onDoubleClick(t,e){this.doDoubleClick(t,e)&&t.preventDefault()}doDoubleClick(t,e){const{listeners:{legendItemDoubleClick:i},ctx:{chartService:s},toggleSeries:a}=this;if(!e)return!1;const{legendType:n,id:o,itemId:r,seriesId:l}=e,c=s.series.find(u=>u.id===o);if(!c)return!1;const h=o4("dblclick",e,t);if(i&&fl([c.properties,this.ctx.chartService],i,h.apiEvent),h.defaultPrevented)return!0;if(a){const u=s.series.flatMap(f=>f.getLegendData("category"));let d=0;const p=new Set;for(const f of u)f.enabled&&(d+=1,f.legendItemName!=null&&p.add(f.legendItemName));p.size>0&&(d=p.size);const g=u.find(f=>f.itemId===r&&f.seriesId===l);this.ctx.eventsHub.emit("legend:item-double-click",{legendType:n,series:c,itemId:r,numVisibleItems:d,enabled:g?.enabled??!1,legendItemName:g?.legendItemName})}return this.ctx.legendManager.update(),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),!0}toTooltipMeta(t,e){let i;return t instanceof FocusEvent?i=He.toCanvas(e).computeCenter():(t.preventDefault(),i=He.toCanvasPoint(e,t.offsetX,t.offsetY)),{canvasX:i.x,canvasY:i.y,showArrow:!1}}onHover(t,e){if(!this.enabled)throw new Error("AG Charts - onHover handler called on disabled legend");this.pagination.setPage(e.pageIndex);const i=e.datum,s=i?this.ctx.chartService.series.find(a=>a.id===i?.id):void 0;if(i&&this.truncatedItems.has(i.itemId??i.id)){const a=this.toTooltipMeta(t,e);this.ctx.tooltipManager.updateTooltip(this.id,a,[{type:"structured",title:this.getItemLabel(i)}])}else this.ctx.tooltipManager.removeTooltip(this.id);i?.enabled&&s?this.updateHighlight({series:s,itemId:i?.itemId,datum:void 0,datumIndex:void 0,legendItemName:i?.legendItemName}):this.updateHighlight()}onLeave(){this.ctx.tooltipManager.removeTooltip(this.id),this.updateHighlight()}updateHighlight(t){this.ctx.interactionManager.isState(32)?this.ctx.highlightManager.updateHighlight(this.id,t):this.ctx.interactionManager.isState(2)&&(this.pendingHighlightDatum=t,this.ctx.animationManager.onBatchStop(()=>{this.ctx.highlightManager.updateHighlight(this.id,this.pendingHighlightDatum)}))}onLocaleChanged(){this.domProxy.onLocaleChanged(this.ctx.localeManager,this.itemSelection,this)}positionLegend(t){const e=this.positionLegendScene(t);this.positionLegendDOM(e)}positionLegendScene(t){if(!this.enabled||!this.data.length)return;const{layoutBox:e}=t,{x:i,y:s,width:a,height:n}=e,[o,r]=this.calculateLegendDimensions(e),{oldPages:l}=this.calcLayout(o,r),c=this.computePagedBBox(),h=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return n-c.height;case"right":default:return a-c.width}};if(this.visible){const u=this.spacing;let d,p;switch(this.position){case"top":case"bottom":d=(a-c.width)/2,p=h(),e.shrink(c.height+u,this.position);break;case"left":case"right":default:d=h(),p=(n-c.height)/2,e.shrink(c.width+u,this.position)}this.group.translationX=Math.floor(i+d-c.x),this.group.translationY=Math.floor(s+p-c.y)}return l}positionLegendDOM(t){const{ctx:e,itemSelection:i,pagination:s,pages:a,toggleSeries:n,group:o,listeners:{legendItemClick:r,legendItemDoubleClick:l}}=this,c=this.visible&&this.enabled,h=n||l!=null||r!=null;this.domProxy.update({visible:c,interactive:h,ctx:e,itemSelection:i,group:o,pagination:s,oldPages:t,newPages:a,datumReader:this,itemListener:this})}calculateLegendDimensions(t){const{width:e,height:i}=t,s=e/i,a=.5,n=.2,o=.25;let r,l;switch(this.position){case"top":case"bottom":{const c=s<1?Math.min(a,n*(1/s)):n;r=this.maxWidth?Math.min(this.maxWidth,e):e,l=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*c);break}case"left":case"right":default:{const c=s>1?Math.min(a,o*s):o;r=this.maxWidth?Math.min(this.maxWidth,e):Math.round(e*c),l=this.maxHeight?Math.min(this.maxHeight,i):i}}return[r,l]}cachedCallWithContext(t,...e){const{callbackCache:i,chartService:s}=this.ctx;return i.call([this,s],t,...e)}},ya.className="Legend",S([k],ya.prototype,"toggleSeries",2),S([k],ya.prototype,"pagination",2),S([k],ya.prototype,"item",2),S([k],ya.prototype,"listeners",2),S([kc((t,e,i)=>{if(t.updateGroupVisibility(),e===i)return;const{ctx:{legendManager:s,stateManager:a}}=t;i===!1&&e===!0&&a.restoreState(s)}),k],ya.prototype,"enabled",2),S([k],ya.prototype,"position",2),S([k],ya.prototype,"maxWidth",2),S([k],ya.prototype,"maxHeight",2),S([k],ya.prototype,"reverseOrder",2),S([k],ya.prototype,"orientation",2),S([k],ya.prototype,"preventHidingAll",2),S([k],ya.prototype,"spacing",2)}}),u4,qJ=I({"packages/ag-charts-community/src/chart/legend/legendModule.ts"(){"use strict";XJ(),u4={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new ya(t),packageType:"community",removable:"standalone-only"}}});function y0(t,e,i,s,a){const n=(u,d,p,g)=>{i.animate({id:`${t}_${e}_${d.id}_${u}`,groupId:t,from:p?1:0,to:1,ease:Gp,collapsable:p,onUpdate(f,x){x&&u!=="removed"||(d.path.clear(!0),g(f,d),d.checkPathDirty())},onStop(){u==="added"&&(d.path.clear(!0),g(1,d),d.checkPathDirty())},phase:Hn[u]})},o=new Fs,r=u=>(o.resetPathDirty(),u(0,o),o.resetPathDirty(),u(1,o),o.checkPathDirty(),o.isPathDirty()),{addPhaseFn:l,updatePhaseFn:c,removePhaseFn:h}=a;for(const u of s)i.isSkipped()||(n("removed",u,!r(h),h),n("updated",u,!r(c),c)),n("added",u,!r(l),l)}var yw=I({"packages/ag-charts-community/src/motion/pathMotion.ts"(){"use strict";Yn(),jp(),zs()}});function le({id:t},e,i,...s){for(const a of s)a.cleanup();vl(t,e,i,s,{opacity:0},{opacity:1},{phase:"trailing"})}function ph({id:t},e,i,...s){vl(t,e,i,s,{opacity:1},{opacity:0},{phase:"remove"})}function Vl(t){return{opacity:1}}var Gl=I({"packages/ag-charts-community/src/chart/series/seriesLabelUtil.ts"(){"use strict";zs()}}),x0,xw=I({"packages/ag-charts-community/src/scene/util/changeDetectableProperties.ts"(){"use strict";vt(),x0=class extends Nt{constructor(){super(...arguments),this._dirty=!0}markDirty(){this._dirty=!0}markClean(t){this._dirty=!1}isDirty(){return this._dirty}onChangeDetection(t){this.markDirty()}}}}),so,Gg=I({"packages/ag-charts-community/src/scene/dropShadow.ts"(){"use strict";vt(),Vn(),xw(),so=class extends x0{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}},S([k,lt()],so.prototype,"enabled",2),S([k,lt()],so.prototype,"color",2),S([k,lt()],so.prototype,"xOffset",2),S([k,lt()],so.prototype,"yOffset",2),S([k,lt()],so.prototype,"blur",2)}}),Yi,Gy=I({"packages/ag-charts-community/src/chart/series/seriesMarker.ts"(){"use strict";Fn(),xw(),Pt(),vt(),kl(),Yi=class extends x0{constructor(){super(...arguments),this.enabled=!0,this.shape="circle",this.size=6,this.fillGradientDefaults=new pn,this.fillPatternDefaults=new _e,this.fillImageDefaults=new ga,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}getStyle(){const{size:t,shape:e,fill:i,fillOpacity:s,stroke:a,strokeWidth:n,strokeOpacity:o,lineDash:r,lineDashOffset:l}=this;return{size:t,shape:e,fill:i,fillOpacity:s,stroke:a,strokeWidth:n,strokeOpacity:o,lineDash:r,lineDashOffset:l}}getDiameter(){return this.size+this.strokeWidth}},S([k,lt()],Yi.prototype,"enabled",2),S([k,nn({equals:pu})],Yi.prototype,"shape",2),S([k,lt()],Yi.prototype,"size",2),S([k,nn({equals:Wi})],Yi.prototype,"fill",2),S([k],Yi.prototype,"fillGradientDefaults",2),S([k],Yi.prototype,"fillPatternDefaults",2),S([k],Yi.prototype,"fillImageDefaults",2),S([k,lt()],Yi.prototype,"fillOpacity",2),S([k,lt()],Yi.prototype,"stroke",2),S([k,lt()],Yi.prototype,"strokeWidth",2),S([k,lt()],Yi.prototype,"strokeOpacity",2),S([k],Yi.prototype,"lineDash",2),S([k],Yi.prototype,"lineDashOffset",2),S([k,nn({equals:pu})],Yi.prototype,"itemStyler",2)}});function jl(){return new Fr}var bw,Fr,Wl=I({"packages/ag-charts-community/src/chart/series/seriesTooltip.ts"(){"use strict";Du(),vt(),vt(),Jm(),bw=class extends Nt{constructor(){super(...arguments),this.enabled=!1}},S([k],bw.prototype,"enabled",2),Fr=class extends Nt{constructor(){super(...arguments),this.interaction=new bw,this.position=new Fc,this.range=void 0,this.class=void 0}formatTooltip(t,e,i){const s=this.renderer==null?void 0:fl(t,this.renderer,i);return typeof s=="string"?{type:"raw",rawHtmlString:s}:s!=null?{type:"structured",...e,...s}:{type:"structured",...e}}},S([k],Fr.prototype,"enabled",2),S([k],Fr.prototype,"showArrow",2),S([k],Fr.prototype,"renderer",2),S([k],Fr.prototype,"interaction",2),S([k],Fr.prototype,"position",2),S([k],Fr.prototype,"range",2),S([k],Fr.prototype,"class",2)}}),d4,p4,g4,f4,QJ=I({"packages/ag-charts-community/src/scene/util/quadtree.ts"(){"use strict";Ub(),Wt(),d4=class{constructor(t,e,i){this.root=new f4(t,e,i)}clear(t){this.root.clear(t)}addValue(t,e){const i={hitTester:t,value:e,distanceSquared:(s,a)=>t.distanceSquared(s,a)};this.root.addElem(i)}find(t,e){const i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(t,e,i),i.best}},p4=class{constructor(t,e,i,s){this.nw=t,this.ne=e,this.sw=i,this.se=s}addElem(t){this.nw.addElem(t),this.ne.addElem(t),this.sw.addElem(t),this.se.addElem(t)}find(t,e,i){this.nw.find(t,e,i),this.ne.find(t,e,i),this.sw.find(t,e,i),this.se.find(t,e,i)}},g4=class{constructor(t,e,i){this.capacity=t,this.maxdepth=e,this.boundary=i??gt.NaN,this.elems=[],this.subdivisions=void 0}clear(t){this.elems.length=0,this.boundary=t,this.subdivisions=void 0}addElem(t){this.addCondition(t)&&(this.subdivisions===void 0?this.maxdepth===0||this.elems.length<this.capacity?this.elems.push(t):this.subdivide(t):this.subdivisions.addElem(t))}find(t,e,i){this.findCondition(t,e,i)&&(this.subdivisions===void 0?this.findAction(t,e,i):this.subdivisions.find(t,e,i))}subdivide(t){this.subdivisions=this.makeSubdivisions();for(const e of this.elems)this.subdivisions.addElem(e);this.subdivisions.addElem(t),this.elems.length=0}makeSubdivisions(){const{x:t,y:e,width:i,height:s}=this.boundary,{capacity:a}=this,n=this.maxdepth-1,o=i/2,r=s/2,l=new gt(t,e,o,r),c=new gt(t+o,e,o,r),h=new gt(t,e+r,o,r),u=new gt(t+o,e+r,o,r);return new p4(this.child(a,n,l),this.child(a,n,c),this.child(a,n,h),this.child(a,n,u))}},f4=class lZ extends g4{addCondition(e){const{x:i,y:s}=e.hitTester.midPoint;return this.boundary.containsPoint(i,s)}findCondition(e,i,s){const{best:a}=s;return a.distanceSquared!==0&&this.boundary.distanceSquared(e,i)<a.distanceSquared}findAction(e,i,s){const a=$b(e,i,this.elems,s.best.distanceSquared);a.nearest!==void 0&&a.distanceSquared<s.best.distanceSquared&&(s.best=a)}child(e,i,s){return new lZ(e,i,s)}}}}),b0,vw=I({"packages/ag-charts-community/src/chart/series/dataModelSeries.ts"(){"use strict";R(),Bs(),Pt(),Qu(),b0=class extends Zm{constructor({clipFocusBox:t,categoryKey:e,...i}){super(i),this.categoryKey=e,this.clipFocusBox=t??!0}dataCount(){return this.processedData?.dataSources?.get(this.id)?.length??0}getScaleInformation({xScale:t,yScale:e}){const i=me.is(t),s=me.is(e);return{isContinuousX:i,isContinuousY:s,xScaleType:t?.type,yScaleType:e?.type}}getModulePropertyDefinitions(){const t=this.axes.x?.scale,e=this.axes.y?.scale;return this.moduleMap.mapModules(i=>i.getPropertyDefinitions(this.getScaleInformation({xScale:t,yScale:e}))).flat()}async requestDataModel(t,e,i){i.props.push(...this.getModulePropertyDefinitions());const{dataModel:s,processedData:a}=await t.request(this.id,e??[],i);return this.dataModel=s,this.processedData=a,this.events.emit("data-processed",{dataModel:s,processedData:a}),{dataModel:s,processedData:a}}isProcessedDataAnimatable(){const t=this.processedData?.reduced?.animationValidation;if(!t)return!0;const{orderedKeys:e,uniqueKeys:i}=t;return e&&i}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(t){const e=this.getNodeData();if(e===void 0||e.length===0)return;const i=this.computeFocusDatumIndex(t,e);if(i===void 0)return;const{clipFocusBox:s}=this,a=e[i],n={...t,datumIndex:i},o=this.computeFocusBounds(n);if(o!==void 0)return{bounds:o,clipFocusBox:s,datum:a,datumIndex:i}}isDatumEnabled(t,e){const{missing:i=!1,enabled:s=!0,focusable:a=!0}=t[e];return!i&&s&&a}computeFocusDatumIndex(t,e){const i=(o,r)=>{for(;o>=0&&!this.isDatumEnabled(e,o);)o+=r;return o===-1?void 0:o},s=(o,r)=>{for(;o<e.length&&!this.isDatumEnabled(e,o);)o+=r;return o===e.length?void 0:o};let a;const n=Et(0,t.datumIndex,e.length-1);return t.datumIndexDelta<0?a=i(n,t.datumIndexDelta):t.datumIndexDelta>0?a=s(n,t.datumIndexDelta):a=s(n,1)??i(n,-1),a===void 0?t.datumIndexDelta===0?void 0:t.datumIndex-t.datumIndexDelta:a}keysOrValues(t){const e=this.dataModel.resolveProcessedDataIndexById(this,t);return this.processedData?.keys[e]?.get(this.id)??this.processedData?.columns[e]??[]}getCategoryKey(){return this.categoryKey}getCategoryValue(t){const{processedData:e,dataModel:i}=this,s=this.getCategoryKey();return!e||!i||!s||(e.invalidData?.get(this.id)?.[t]??!1)?void 0:this.keysOrValues(s)[t]}datumIndexForCategoryValue(t){const{processedData:e,dataModel:i}=this,s=this.getCategoryKey();if(!e||!i||!s)return;t=t.valueOf();const a=e.invalidData?.get(this.id),n=this.keysOrValues(s);for(let o=0;o<n.length;o+=1){if(a?.[o]===!0)continue;const r=n[o]?.valueOf();if(Wi(t,r))return o}}}}});function JJ(t){let e,i;if((t instanceof Yo||t instanceof Zo)&&({min:e,max:i}=t),!(e==null&&i==null))return e??(e=-1/0),i??(i=1/0),[e,i]}function ttt(t,e,i,s){const a=i[0].valueOf(),n=i[1].valueOf();let o=Dp(0,e-1,l=>{const c=t===1?l:e-l,h=s(c)?.valueOf();return!Number.isFinite(h)||h>=a}),r=bc(0,e-1,l=>{const c=t===1?l:e-l,h=s(c)?.valueOf();return!Number.isFinite(h)||h<=n});return o==null||r==null?[0,0]:(t===-1&&([o,r]=[e-r,e-o]),o=Math.max(o,0),r=Math.min(r+1,e),[o,r])}var gh,fh,v0,Vr,jy,Hl,za=I({"packages/ag-charts-community/src/chart/series/cartesian/cartesianSeries.ts"(){"use strict";R(),Hu(),zu(),Bs(),e2(),AS(),Wt(),Oe(),Nc(),Yn(),cn(),QJ(),yi(),Gn(),vt(),Pm(),id(),wg(),Tg(),NE(),Go(),vw(),Qu(),kl(),Bu(),gh={x:["xKey"],y:["yKey"]},fh={x:["xName"],y:["yName"]},v0=class extends eg{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.yKey=s.properties.yKey}},Vr=class extends Ea{constructor(){super(...arguments),this.pickOutsideVisibleMinorAxis=!1}},S([k],Vr.prototype,"legendItemName",2),S([k],Vr.prototype,"pickOutsideVisibleMinorAxis",2),jy=100,Hl=class extends b0{constructor({pathsPerSeries:t=["path"],hasMarkers:e=!1,hasHighlightedLabels:i=!1,pathsZIndexSubOrderOffset:s=[],datumSelectionGarbageCollection:a=!0,markerSelectionGarbageCollection:n=!0,animationAlwaysUpdateSelections:o=!1,animationResetFns:r,propertyKeys:l,propertyNames:c,...h}){if(super({propertyKeys:l,propertyNames:c,canHaveAxes:!0,...h}),this.NodeEvent=v0,this.dataNodeGroup=this.contentGroup.appendChild(new Lt({name:`${this.id}-series-dataNodes`,zIndex:0})),this.markerGroup=this.contentGroup.appendChild(new Lt({name:`${this.id}-series-markers`,zIndex:1})),this.labelGroup=this.contentGroup.appendChild(new vs({name:`${this.id}-series-labels`})),this.labelSelection=Ci.select(this.labelGroup,rs),this.highlightSelection=Ci.select(this.highlightNode,()=>this.opts.hasMarkers?new wi:this.nodeFactory()),this.highlightLabelSelection=Ci.select(this.highlightLabel,rs),this.annotationSelections=new Set,this.debug=Ft.create(),!l||!c)throw new Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:t,hasMarkers:e,hasHighlightedLabels:i,pathsZIndexSubOrderOffset:s,propertyKeys:l,propertyNames:c,animationResetFns:r,animationAlwaysUpdateSelections:o,datumSelectionGarbageCollection:a,markerSelectionGarbageCollection:n},this.paths=t.map(u=>new Fs({name:`${this.id}-${u}`})),this.datumSelection=Ci.select(this.dataNodeGroup,()=>this.nodeFactory(),a),this.markerSelection=Ci.select(this.markerGroup,wi,n),this.animationState=new Up("empty",{empty:{update:{target:"ready",action:u=>this.animateEmptyUpdateReady(u)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:u=>this.animateReadyHighlight(u),highlightMarkers:u=>this.animateReadyHighlightMarkers(u),resize:u=>this.animateReadyResize(u),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:u=>{this.ctx.animationManager.isSkipped()?this.resetAllAnimation(u):this.animateWaitingUpdateReady(u)}},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:u=>this.resetAllAnimation(u),reset:"empty"},clearing:{update:{target:"empty",action:u=>this.animateClearingUpdateEmpty(u)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData}getNodeData(){return this.contextNodeData?.nodeData}attachSeries(t,e,i){super.attachSeries(t,e,i),this.attachPaths(this.paths,e,i)}detachSeries(t,e,i){super.detachSeries(t,e,i),this.detachPaths(this.paths,e,i)}updatedDomains(){this.animationState.transition("updateData")}attachPaths(t,e,i){for(const s of t)this.contentGroup.appendChild(s)}detachPaths(t,e,i){for(const s of t)this.contentGroup.removeChild(s)}renderToOffscreenCanvas(){const t=this.getNodeData();return t!=null&&t.length>jy}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"?this.animationState.transition("skip"):t==="disabled"&&this.animationState.transition("disable")}addChartEventListeners(){this.cleanup.register(this.ctx.eventsHub.on("legend:item-click",t=>this.onLegendItemClick(t)),this.ctx.eventsHub.on("legend:item-double-click",t=>this.onLegendItemDoubleClick(t)))}destroy(){super.destroy(),this._contextNodeData=void 0}isSeriesHighlighted(t){const{series:e,legendItemName:i}=t??{},{legendItemName:s}=this.properties;return e===this||s!=null&&s===i}update({seriesRect:t}){const{visible:e,_contextNodeData:i}=this,s=this.ctx.highlightManager?.getActiveHighlight(),a=this.isSeriesHighlighted(s),n=this.checkResize(t),o=this.updateHighlightSelection(a);this.contentGroup.batchedUpdate(()=>{const l=this.updateSelections(e);this.updateNodes(o,a,e,n||l)});const r=this.getAnimationData(t,i);r&&(n&&this.animationState.transition("resize",r),this.animationState.transition("update",r))}updateSelections(t){var e;const i=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if(!t&&i)return!1;const{nodeDataRefresh:s}=this;if(!s&&!this.isPathOrSelectionDirty())return!1;if(s){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=this.createNodeData();const a=this.isProcessedDataAnimatable();this._contextNodeData&&((e=this._contextNodeData).animationValid??(e.animationValid=a));const{dataModel:n,processedData:o}=this;n!==void 0&&o!==void 0&&this.events.emit("data-update",{dataModel:n,processedData:o}),this.updateSeriesSelections()}return s}updateSeriesSelections(t){const{datumSelection:e,labelSelection:i,markerSelection:s,paths:a}=this,n=this._contextNodeData;if(!n)return;const{nodeData:o,labelData:r,itemId:l}=n;this.updatePaths({seriesHighlighted:t,itemId:l,contextData:n,paths:a}),this.datumSelection=this.updateDatumSelection({nodeData:o,datumSelection:e}),this.labelGroup.batchedUpdate(()=>{this.labelSelection=this.updateLabelSelection({labelData:r,labelSelection:i})??i}),this.opts.hasMarkers&&this.markerGroup.batchedUpdate(()=>{this.markerSelection=this.updateMarkerSelection({nodeData:o,markerSelection:s})})}getShapeFillBBox(){const{axes:t}=this,e=t.x,i=t.y,[s,a]=ls(e?.range??[0,1]),[n,o]=ls(i?.range??[0,1]),r=this.getSeriesDomain("x"),l=[e?.scale.convert(r.at(0)),e?.scale.convert(r.at(-1))],c=this.getSeriesDomain("y"),h=[i?.scale.convert(c.at(0)),i?.scale.convert(c.at(-1))],[u,d]=ls(l),[p,g]=ls(h);return{axis:new gt(s,n,a-s,o-n),series:new gt(u,p,d-u,g-p)}}updateNodes(t,e,i,s){const{highlightSelection:a,highlightLabelSelection:n,opts:{hasMarkers:o,hasHighlightedLabels:r}}=this,l=!this.ctx.animationManager.isSkipped(),c=this.visible&&this._contextNodeData!=null&&i;this.contentGroup.visible=l||c,this.highlightGroup.visible=(l||c)&&e,o?this.markerGroup.batchedUpdate(()=>{this.updateMarkerNodes({markerSelection:a,isHighlight:!0}),this.animationState.transition("highlightMarkers",a)}):(this.updateDatumNodes({datumSelection:a,isHighlight:!0}),this.animationState.transition("highlight",a)),r&&this.labelGroup.batchedUpdate(()=>{this.updateLabelNodes({labelSelection:n})});const{dataNodeGroup:h,markerGroup:u,datumSelection:d,labelSelection:p,markerSelection:g,paths:f,labelGroup:x}=this,{itemId:m}=this.contextNodeData??{};if(h.visible=l||c,x.visible=c,o&&(u.visible=c),this.updatePathNodes({seriesHighlighted:e,itemId:m,paths:f,visible:c,animationEnabled:l}),!h.visible)return;const b=this.properties.highlightStyle.series.strokeWidth!=null,{highlight:{unhighlightedItem:v,highlightedSeries:M,unhighlightedSeries:D}={}}=this.properties,L=v!=null||M!=null||D!=null;(s||b||L)&&(this.updateDatumNodes({datumSelection:d,highlightedItems:t,isHighlight:!1}),this.usesPlacedLabels||this.labelGroup.batchedUpdate(()=>{this.updateLabelNodes({labelSelection:p})}),o&&this.markerGroup.batchedUpdate(()=>{this.updateMarkerNodes({markerSelection:g,isHighlight:!1})}))}getHighlightLabelData(t,e){const i=t.filter(s=>s.datum===e.datum&&s.itemId===e.itemId);return i.length===0?void 0:i}getHighlightData(t,e){return e?[e]:void 0}updateHighlightSelection(t){const{highlightSelection:e,highlightLabelSelection:i,_contextNodeData:s}=this;if(!s)return;const a=this.ctx.highlightManager?.getActiveHighlight(),n=t&&a?.datum?a:void 0;let o,r;if(n!=null){const l=this.isLabelEnabled(),{labelData:c,nodeData:h}=s;r=this.getHighlightData(h,n),o=l?this.getHighlightLabelData(c,n):void 0}return this.highlightSelection=this.updateHighlightSelectionItem({items:r,highlightSelection:e}),this.highlightLabelSelection=this.updateHighlightSelectionLabel({items:o,highlightLabelSelection:i}),r}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(const{node:t}of this.datumSelection)t.datum.missing!==!0&&(yield t)}getQuadTree(){if(this.quadtree===void 0){const{width:t,height:e}=this.ctx.scene.canvas,i=new gt(0,0,t,e);this.quadtree=new d4(100,10,i),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(t){}pickNodesExactShape(t){const e=super.pickNodesExactShape(t);if(e.length!==0)return e;const{x:i,y:s}=t,{opts:{hasMarkers:a}}=this,{dataNodeGroup:n,markerGroup:o}=this;let r=n.pickNodes(i,s).filter(l=>l.datum.missing!==!0);if(r.length===0&&a&&(r=o?.pickNodes(i,s).filter(l=>l.datum.missing!==!0)),r.length!==0)return r.map(c=>c.datum);for(const l of this.moduleMap.modules()){const{datum:c}=l.pickNodeExact(t)??{};if(c!=null&&c?.missing!==!0)return[c]}return[]}pickNodeClosestDatum(t){const{x:e,y:i}=t,{axes:s,_contextNodeData:a}=this;if(!a)return;const n=s.x,o=s.y,r={x:e,y:i};let l=1/0,c;for(const h of a.nodeData){const{point:{x:u=NaN,y:d=NaN}={}}=h;if(isNaN(u)||isNaN(d)||!(n?.inRange(u)&&o?.inRange(d)))continue;const g=Math.max((r.x-u)**2+(r.y-d)**2,0);g<l&&(l=g,c=h)}for(const h of this.moduleMap.modules()){const u=h.pickNodeNearest(t);if(u!==void 0&&u.distanceSquared<l){l=u.distanceSquared,c=u.datum;break}}if(c){const h=Math.max(Math.sqrt(l)-(c.point?.size??0)/2,0);return{datum:c,distance:h}}}pickNodeMainAxisFirst(t,e){const{x:i,y:s}=t,{axes:a,_contextNodeData:n}=this,{pickOutsideVisibleMinorAxis:o}=this.properties;if(!n)return;const r=a.x,l=a.y,c=[r,l].filter(eh.is).map(g=>g.direction);if(e&&c.length===0)return;const[h="x"]=c,u=[i,s];h!=="x"&&u.reverse();const d=[1/0,1/0];let p;for(const g of n.nodeData){const{x:f=NaN,y:x=NaN}=g.point??g.midPoint??{};if(isNaN(f)||isNaN(x)||g.missing===!0)continue;const m=[r?.inRange(f,1),l?.inRange(x,1)];if(h!=="x"&&m.reverse(),!m[0]||!o&&!m[1])continue;const b=[f,x];h!=="x"&&b.reverse();let v=!0;for(let M=0;M<b.length;M++){const D=Math.abs(b[M]-u[M]);if(D>d[M]){v=!1;break}else D<d[M]&&(d[M]=D,d.fill(1/0,M+1,d.length))}v&&(p=g)}if(p){let g=Math.max(d[0]**2+d[1]**2-(p.point?.size??0),0);for(const f of this.moduleMap.modules()){const x=f.pickNodeMainAxisFirst(t);if(x!==void 0&&x.distanceSquared<g){p=x.datum,g=x.distanceSquared;break}}return{datum:p,distance:Math.sqrt(g)}}}isPathOrSelectionDirty(){return!1}shouldFlipXY(){return!1}visibleRange(t,e,i,s){let a;if(s==null){const{processedData:r,dataModel:l}=this;a=l.getSortOrder(this,t,r)??1}else a=s.sortOrder;const n=this.keysOrValues(t),o=0;return hB(a,i?.length??n.length,e,r=>{const l=i?.[r]??r;return this.xCoordinateRange(n[l],o,l)})}domainForVisibleRange(t,e,i,s,a){const{processedData:n,dataModel:o}=this,[r,l]=s,c=this.keysOrValues(i),h=o.getSortOrder(this,i,n);if(h!=null){const g=this.visibleRange(i,s,a,{sortOrder:h});return o.getDomainBetweenRange(this,e,g,n)}const u=e.map(g=>this.keysOrValues(g));let d=1/0,p=-1/0;return c.forEach((g,f)=>{const[x,m]=this.xCoordinateRange(g,0,f);if(!(m<r||x>l))for(let b=0;b<e.length;b++){const v=u[b][f];d=Math.min(d,v),p=Math.max(p,v)}}),d>p?[NaN,NaN]:[d,p]}domainForClippedRange(t,e,i){const{processedData:s,dataModel:a,axes:n}=this,r=JJ(n[t==="x"?"y":"x"]);if(!r)return e.flatMap(g=>a.getDomain(this,g,"value",s));const l=this.keysOrValues(i),c=a.getSortOrder(this,i,s);if(c!=null){const g=ttt(c,l.length,r,f=>l[f]);return a.getDomainBetweenRange(this,e,g,s)}const h=e.map(g=>this.keysOrValues(g)),u=r[0].valueOf(),d=r[1].valueOf(),p=[];return l.forEach((g,f)=>{const x=g.valueOf();if(x<u||x>d)return;const m=h.map(b=>b[f]);x>=u&&p.push(...m),x<=d&&p.push(...m)}),p}countVisibleItems(t,e,i,s,a){const{dataModel:n,processedData:o}=this;if(!n||!o)return 1/0;const r=this.keysOrValues(t),l=e.map(D=>n.resolveColumnById(this,D,o)),c=this.axes.x,h=this.axes.y,u=this.shouldFlipXY(),d=c.range,p=h.range,g=(D,L,C)=>D[0]+(C-L[0])/(L[1]-L[0])*(D[1]-D[0]),f=g(d,c.visibleRange,i[0]),x=g(d,c.visibleRange,i[1]),m=g(p,h.visibleRange,u?s[0]:s[1]),b=g(p,h.visibleRange,u?s[1]:s[0]),v=Math.round((i[0]+(i[1]-i[0])/2)*r.length),M=0;return uB(0,r.length-1,v,a,D=>{let[L,C]=this.xCoordinateRange(r[D],M,D),[A,T]=this.yCoordinateRange(l.map(N=>N[D]),M,D);return!pe(L)||!pe(C)||!pe(A)||!pe(T)?!1:(u&&([L,C,A,T]=[A,T,L,C]),L>=f&&C<=x&&A>=m&&T<=b)})}minTimeInterval(){let t;try{t=this.keysOrValues("xValue")}catch{}if(t==null||t.length>1e3)return;let e=1/0,i=t[0],s;for(let a=1;a<t.length;a++){const n=t[a];if(n!=null&&i!=null){const o=n.valueOf()-i.valueOf(),r=Math.sign(o);if(r===0)continue;if(s!==void 0&&r!==s)return;e=Math.min(e,Math.abs(o)),s=r}i=n}if(Number.isFinite(e))return e}updateHighlightSelectionItem(t){const{opts:{hasMarkers:e}}=this,{items:i,highlightSelection:s}=t,a=i??[];if(e){const n=s;return this.updateMarkerSelection({nodeData:a,markerSelection:n})}else return this.updateDatumSelection({nodeData:a,datumSelection:s})}updateHighlightSelectionLabel(t){return this.updateLabelSelection({labelData:t.items??[],labelSelection:t.highlightLabelSelection})}updateDatumSelection(t){return t.datumSelection}updateDatumNodes(t){}updateMarkerSelection(t){return t.markerSelection}updateMarkerNodes(t){}updatePaths(t){t.paths.forEach(e=>e.visible=!1)}updatePathNodes(t){const{paths:e,visible:i}=t;for(const s of e)s.visible=i}resetPathAnimation(t){const{path:e}=this.opts?.animationResetFns??{};e&&t.paths.forEach(i=>{cs([i],e)})}resetDatumAnimation(t){const{datum:e}=this.opts?.animationResetFns??{};e&&cs([t.datumSelection],e)}resetLabelAnimation(t){const{label:e}=this.opts?.animationResetFns??{};e&&cs([t.labelSelection],e)}resetMarkerAnimation(t){const{marker:e}=this.opts?.animationResetFns??{};e&&this.opts.hasMarkers&&cs([t.markerSelection],e)}resetAllAnimation(t){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.resetPathAnimation(t),this.resetDatumAnimation(t),this.resetLabelAnimation(t),this.resetMarkerAnimation(t),t.contextData?.animationValid===!1&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){const{datum:e}=this.opts?.animationResetFns??{};e&&cs([t],e)}animateReadyHighlightMarkers(t){const{marker:e}=this.opts?.animationResetFns??{};e&&cs([t],e)}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}getAnimationData(t,e){const{_contextNodeData:i}=this;return i?{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:e,paths:this.paths,seriesRect:t}:void 0}updateLabelSelection(t){return t.labelSelection}getScaling(t){if(t instanceof ZS){const{range:e,domain:i}=t;return{type:"log",convert:s=>t.convert(s),domain:[i[0],i[1]],range:[e[0],e[1]]}}else if(t instanceof me){const{range:e,domain:i}=t;return{type:"continuous",domain:[i[0],i[1]],range:[e[0],e[1]]}}else if(t instanceof wc)return{type:"category",domain:t instanceof Fo?t.bands:t.domain,inset:t.inset,step:t.step}}calculateScaling(){const t={};for(const e of Object.values(Lv)){const i=this.axes[e];if(!i)continue;const s=this.getScaling(i.scale);s!=null&&(t[e]=s)}return t}}}}),Sd,Sw=I({"packages/ag-charts-community/src/chart/series/cartesian/interpolationProperties.ts"(){"use strict";vt(),vt(),Sd=class extends Nt{constructor(){super(...arguments),this.type="linear",this.tension=1,this.position="end"}},S([k],Sd.prototype,"type",2),S([k],Sd.prototype,"tension",2),S([k],Sd.prototype,"position",2)}}),qe,ett=I({"packages/ag-charts-community/src/chart/series/cartesian/areaSeriesProperties.ts"(){"use strict";Gg(),vt(),Vo(),Gy(),kl(),Wl(),za(),Sw(),qe=class extends Vr{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillGradientDefaults=new pn,this.fillPatternDefaults=new _e,this.fillImageDefaults=new ga,this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new Sd,this.shadow=new so,this.marker=new Yi,this.label=new Li,this.tooltip=jl(),this.connectMissingData=!1}},S([k],qe.prototype,"xKey",2),S([k],qe.prototype,"xName",2),S([k],qe.prototype,"yKey",2),S([k],qe.prototype,"yName",2),S([k],qe.prototype,"yFilterKey",2),S([k],qe.prototype,"normalizedTo",2),S([k],qe.prototype,"fill",2),S([k],qe.prototype,"fillGradientDefaults",2),S([k],qe.prototype,"fillPatternDefaults",2),S([k],qe.prototype,"fillImageDefaults",2),S([k],qe.prototype,"fillOpacity",2),S([k],qe.prototype,"stroke",2),S([k],qe.prototype,"strokeWidth",2),S([k],qe.prototype,"strokeOpacity",2),S([k],qe.prototype,"lineDash",2),S([k],qe.prototype,"lineDashOffset",2),S([k],qe.prototype,"interpolation",2),S([k],qe.prototype,"shadow",2),S([k],qe.prototype,"marker",2),S([k],qe.prototype,"label",2),S([k],qe.prototype,"tooltip",2),S([k],qe.prototype,"connectMissingData",2)}});function Gr(t){switch(t.type){case"linear":case"step":return[{x:t.x0,y:t.y0},{x:t.x1,y:t.y1}];case"cubic":return[{x:t.cp0x,y:t.cp0y},{x:t.cp3x,y:t.cp3y}]}}function itt(t){const e=Gr(t);return e[0].x>e[1].x&&e.reverse(),e}function stt(t,e){const{x:i,y:s}=e;switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:i,y0:s,x1:i,y1:s};case"step":return{type:"step",moveTo:t.moveTo,x0:i,y0:s,x1:i,y1:s,stepX:i};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:i,cp0y:s,cp1x:i,cp1y:s,cp2x:i,cp2y:s,cp3x:i,cp3y:s}}}function Wy(t,e,i){const[s,a]=Gr(t),n=a.x!==s.x?(i.x-e.x)/(a.x-s.x):0,o=a.y!==s.y?(i.y-e.y)/(a.y-s.y):0;switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:i.x,y1:i.y};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:e.x,cp0y:e.y,cp1x:i.x-(t.cp2x-s.x)*n,cp1y:i.y-(t.cp2y-s.y)*o,cp2x:i.x-(t.cp1x-s.x)*n,cp2y:i.y-(t.cp1y-s.y)*o,cp3x:i.x,cp3y:i.y};case"step":return{type:"step",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:i.x,y1:i.y,stepX:i.x-(t.stepX-s.x)*n}}}function m4(t,e,i){const{moveTo:s}=t,[a,n]=itt(t),{x:o,y:r}=a,{x:l,y:c}=n;if(i<o)return Wy(t,a,a);if(e>l)return Wy(t,n,n);switch(t.type){case"linear":{const h=r===c?void 0:(c-r)/(l-o),u=h==null?r:h*(e-o)+r,d=h==null?r:h*(i-o)+r;return{type:"linear",moveTo:s,x0:e,y0:u,x1:i,y1:d}}case"step":if(i<=t.stepX){const h=t.y0;return{type:"step",moveTo:s,x0:e,y0:h,x1:i,y1:h,stepX:i}}else if(e>=t.stepX){const h=t.y1;return{type:"step",moveTo:s,x0:e,y0:h,x1:i,y1:h,stepX:e}}else{const{y0:h,y1:u,stepX:d}=t;return{type:"step",moveTo:s,x0:e,y0:h,x1:i,y1:u,stepX:d}}case"cubic":{const h=lv(t.cp0x,t.cp1x,t.cp2x,t.cp3x,e);let[u,d]=mm(t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,h);const p=lv(d[0].x,d[1].x,d[2].x,d[3].x,i);return[d,u]=mm(d[0].x,d[0].y,d[1].x,d[1].y,d[2].x,d[2].y,d[3].x,d[3].y,p),{type:"cubic",moveTo:s,cp0x:d[0].x,cp0y:d[0].y,cp1x:d[1].x,cp1y:d[1].y,cp2x:d[2].x,cp2y:d[2].y,cp3x:d[3].x,cp3y:d[3].y}}}}function att(t){const e=[];let i=0,s=NaN,a=NaN;for(const{x:n,y:o}of t){if(i>0){const r=i===1;e.push({type:"linear",moveTo:r,x0:s,y0:a,x1:n,y1:o})}i+=1,s=n,a=o}return e}function ntt(t,e){const i=[];let s=0,a=NaN,n=NaN;const o=typeof e=="number"?e:y4[e];for(const{x:r,y:l}of t){if(s>0){const c=s===1,h=a+(r-a)*o;i.push({type:"step",moveTo:c,x0:a,y0:n,x1:r,y1:l,stepX:h})}s+=1,a=r,n=l}return i}function ott(t,e){const i=Array.isArray(t)?t:Array.from(t);if(i.length<=1)return[];const s=i.map((n,o)=>{const r=o===0?n:i[o-1],l=o===i.length-1?n:i[o+1],c=o===0||o===i.length-1;if(Math.sign(r.y-n.y)===Math.sign(l.y-n.y))return 0;if(!c){const h=Math.abs(r.y-l.y),u=Math.abs(n.y-r.y)/h,d=Math.abs(n.y-l.y)/h;if(u<=Hy||1-u<=Hy||d<=Hy||1-d<=Hy)return 0}return(l.y-r.y)/(l.x-r.x)});s[1]===0&&(s[0]*=2),s[s.length-2]===0&&(s[s.length-1]*=2);const a=[];for(let n=1;n<i.length;n+=1){const o=i[n-1],r=s[n-1],l=i[n],c=s[n],h=l.x-o.x,u=l.y-o.y;let d=h*e/3,p=h*r*e/3,g=h*e/3,f=h*c*e/3;c===0&&Math.abs(p)>Math.abs(u)&&(d*=Math.abs(u/p),p=Math.sign(p)*Math.abs(u)),r===0&&Math.abs(f)>Math.abs(u)&&(g*=Math.abs(u/f),f=Math.sign(f)*Math.abs(u)),a.push({type:"cubic",moveTo:n===1,cp0x:o.x,cp0y:o.y,cp1x:o.x+d,cp1y:o.y+p,cp2x:l.x-g,cp2y:l.y-f,cp3x:l.x,cp3y:l.y})}return a}var y4,Hy,Mw=I({"packages/ag-charts-community/src/chart/series/cartesian/lineInterpolation.ts"(){"use strict";cv(),y4={start:0,middle:.5,end:1},Hy=.05}});function Zi(t,e,i){return(e-t)*i+t}function rtt(t,e){const{x0:i,y0:s,x1:a,y1:n}=t,r=(n-s)/(a-i)*(e-i)+s;return{leftCp1x:i,leftCp1y:s,leftCp2x:e,leftCp2y:r,stepX:e,stepY0:r,stepY1:r,rightCp1x:e,rightCp1y:r,rightCp2x:a,rightCp2y:n}}function ltt(t,e){const{cp0x:i,cp0y:s,cp1x:a,cp1y:n,cp2x:o,cp2y:r,cp3x:l,cp3y:c}=t,h=lv(i,a,o,l,e),[u,d]=mm(i,s,a,n,o,r,l,c,h),p=u[3].y;return{leftCp1x:u[1].x,leftCp1y:u[1].y,leftCp2x:u[2].x,leftCp2y:u[2].y,stepX:e,stepY0:p,stepY1:p,rightCp1x:d[1].x,rightCp1y:d[1].y,rightCp2x:d[2].x,rightCp2y:d[2].y}}function ctt(t){const{x0:e,y0:i,x1:s,y1:a,stepX:n}=t;return{leftCp1x:(e+n)/2,leftCp1y:i,leftCp2x:(e+n)/2,leftCp2y:i,stepX:n,stepY0:i,stepY1:a,rightCp1x:(n+s)/2,rightCp1y:a,rightCp2x:(n+s)/2,rightCp2y:a}}function x4(t,e){return t.type==="linear"?rtt(t,e):t.type==="cubic"?ltt(t,e):ctt(t)}function b4(t,e,i,s,a,n,o){switch(e){case 0:o?t.moveTo(a,n):t.moveTo(i,s);break;case 1:o?t.lineTo(a,n):t.lineTo(i,s);break}}function v4(t,e,i,s,a,n){n?t.lineTo(e,i):t.lineTo(s,a)}function S4(t,e,i,s,a,n,o,r,l,c){c?t.cubicCurveTo(n,o,s,a,e,i):t.cubicCurveTo(s,a,n,o,r,l)}function M4(t,e,i,s,a,n,o){o?(t.lineTo(n,a),t.lineTo(n,i),t.lineTo(e,i)):(t.lineTo(n,i),t.lineTo(n,a),t.lineTo(s,a))}function Dw(t,e,i,s){const[a,n]=Gr(e);switch(b4(t,i,a.x,a.y,n.x,n.y,s),e.type){case"linear":v4(t,e.x0,e.y0,e.x1,e.y1,s);break;case"cubic":S4(t,e.cp0x,e.cp0y,e.cp1x,e.cp1y,e.cp2x,e.cp2y,e.cp3x,e.cp3y,s);break;case"step":M4(t,e.x0,e.y0,e.x1,e.y1,e.stepX,s);break}}function D4(t,e,i){const[s,a]=Gr(t),[n,o]=Gr(e),r=Zi(s.x,n.x,i),l=Zi(s.y,n.y,i),c=Zi(a.x,o.x,i),h=Zi(a.y,o.y,i);return[{x:r,y:l},{x:c,y:h}]}function kw(t,e,i,s,a,n){const[{x:o,y:r},{x:l,y:c}]=D4(e,i,s);if(b4(t,a,o,r,l,c,n),e.type==="cubic"&&i.type==="cubic"){const h=Zi(e.cp1x,i.cp1x,s),u=Zi(e.cp1y,i.cp1y,s),d=Zi(e.cp2x,i.cp2x,s),p=Zi(e.cp2y,i.cp2y,s);S4(t,o,r,h,u,d,p,l,c,n)}else if(e.type==="step"&&i.type==="step"){const h=Zi(e.stepX,i.stepX,s);M4(t,o,r,l,c,h,n)}else if(e.type==="linear"&&i.type==="linear")v4(t,o,r,l,c,n);else{let h;e.type==="step"?h=e.stepX:i.type==="step"?h=i.stepX:h=(o+l)/2;const u=x4(e,h),d=x4(i,h),p=Zi(u.leftCp1x,d.leftCp1x,s),g=Zi(u.leftCp1y,d.leftCp1y,s),f=Zi(u.leftCp2x,d.leftCp2x,s),x=Zi(u.leftCp2y,d.leftCp2y,s),m=Zi(u.stepX,d.stepX,s),b=Zi(u.stepY0,d.stepY0,s),v=Zi(u.stepY1,d.stepY1,s),M=Zi(u.rightCp1x,d.rightCp1x,s),D=Zi(u.rightCp1y,d.rightCp1y,s),L=Zi(u.rightCp2x,d.rightCp2x,s),C=Zi(u.rightCp2y,d.rightCp2y,s);n?(t.cubicCurveTo(L,C,M,D,m,v),t.lineTo(m,b),t.cubicCurveTo(f,x,p,g,o,r)):(t.cubicCurveTo(p,g,f,x,m,b),t.lineTo(m,v),t.cubicCurveTo(M,D,L,C,l,c))}}var k4=I({"packages/ag-charts-community/src/chart/series/cartesian/lineInterpolationPlotting.ts"(){"use strict";cv(),Mw()}});function htt(t,e){return t==null||e==null||typeof t!="object"||typeof e!="object"?!1:"id"in t&&"id"in e?t.id===e.id:t.toString()===e.toString()}function Fa(t){return HC(t).valueOf()}function sa(t,e){if(!e)return NaN;if(t instanceof Date&&(t=t.getTime()),e.type==="continuous"&&typeof t=="number")return(t-e.domain[0])/(e.domain[1]-e.domain[0])*(e.range[1]-e.range[0])+e.range[0];if(e.type==="log"&&typeof t=="number")return e.convert(t);if(e.type!=="category")return NaN;const i=Fa(t);let s=e.domain.findIndex(a=>Fa(a)===i);return s===-1&&(s=e.domain.findIndex(a=>htt(t,a))),s>=0?e.inset+e.step*s:NaN}function I4({data:t},e){return t.map((i,s)=>({xValue0Index:e.indexOf(Fa(i.xValue0)),xValue1Index:e.indexOf(Fa(i.xValue1)),datumIndex:s}))}function A4(t){return Object.values(t.scales).every(e=>e.type==="category"?e.domain.length<E4:!0)}function utt(t,e){const i=e.scales.x,s=t.scales.x;if(i?.type!=="category"||s?.type!=="category")return!0;let a=-1/0;for(const n of i.domain){const o=sa(n,s);if(Number.isFinite(o)){if(o<a)return!1;a=o}}return!0}function dtt(t,e){let i=-1/0;for(const s of t){const a=sa(s.value,e.scales.x);if(Number.isFinite(a)){if(a<i)return!1;i=a}}return!0}function ptt(t,e){const i=new Map;for(const{xValue0:h,xValue1:u}of t.data){const d=Fa(h),p=Fa(u);i.set(d,h).set(p,u)}const s=Array.from(i,([h,u])=>({axisValue:h,value:u}));s.sort((h,u)=>sa(h.value,t.scales.x)-sa(u.value,t.scales.x));const a=[];for(const{xValue0:h,xValue1:u}of e.data){const d=Fa(h),p=Fa(u);i.has(d)||(i.set(d,h),a.push({axisValue:d,value:h})),i.has(p)||(i.set(p,u),a.push({axisValue:p,value:u}))}a.sort((h,u)=>sa(h.value,e.scales.x)-sa(u.value,e.scales.x));const n=s;let o=0;for(const h of a){for(let u=n.length-1;u>o;u-=1){const d=sa(h.value,e.scales.x),p=sa(n[u].value,e.scales.x);if(d>p){o=u+1;break}}n.splice(o,0,h),o+=1}if(!dtt(n,e))return;const r=n.map(h=>h.axisValue),l=I4(e,r),c=I4(t,r);return{axisValues:r,oldDataAxisIndices:l,newDataAxisIndices:c}}function C4(t,e,i){if(i.xValue1Index===i.xValue0Index+1)return t;const s=Gr(t),a=(s[1].x-s[0].x)/(i.xValue1Index-i.xValue0Index),n=s[0].x+(e-i.xValue0Index)*a,o=n+a;return m4(t,n,o)}function L4(t,e){const[i,s]=Gr(t),a=sa(0,e.scales.y);return Wy(t,{x:i.x,y:a},{x:s.x,y:a})}function w4(t){const[e,i]=Gr(t);return stt(t,{x:(e.x+i.x)/2,y:(e.y+i.y)/2})}function T4(t,e,i,s,a,n){let o,r;if(a.xValue0Index>=n.xValue1Index){const u=s.findLast(p=>p.xValue1Index<=n.xValue1Index)?.datumIndex,d=u!=null?i.data[u]:void 0;o=d?.xValue1,r=d?.yValue1}else if(a.xValue0Index<=n.xValue0Index){const u=s.find(p=>p.xValue0Index>=n.xValue0Index)?.datumIndex,d=u!=null?i.data[u]:void 0;o=d?.xValue0,r=d?.yValue0}if(o==null||r==null)switch(e){case 0:return L4(t,i);case 1:return w4(t)}const l=sa(o,i.scales.x),c=sa(r,i.scales.y),h={x:l,y:c};return Wy(t,h,h)}function Iw(t,e){if(e==null)return;const i=Fa(t.xValue0),s=Fa(t.xValue1);return e.find(a=>Fa(a.xValue0)===i&&Fa(a.xValue1)===s)?.span}function N4(t,e,i,s,a,n,o){const r=t.data[s.datumIndex],l=r.span,c=Iw(r,a);if(c!=null)o.removed.push({from:c,to:c}),o.moved.push({from:c,to:l}),o.added.push({from:l,to:l});else{const h=T4(l,e,t,i,s,n);o.added.push({from:h,to:l})}}function O4(t,e,i,s,a,n,o){const r=t.data[s.datumIndex],l=r.span,c=Iw(r,a);if(c!=null)o.removed.push({from:l,to:l}),o.moved.push({from:l,to:c}),o.added.push({from:c,to:c});else{const h=T4(l,e,t,i,s,n);o.removed.push({from:l,to:h})}}function P4(t,e,i,s,a){const n=e[a.xValue0Index],o=i.data.find(x=>Fa(x.xValue0)===n),r=e[a.xValue1Index],l=i.data.find(x=>Fa(x.xValue1)===r);if(o==null||l==null)return;const[{x:c},{x:h}]=Gr(t),u=sa(o.xValue0,i.scales.x),d=sa(o.yValue0,i.scales.y),p=sa(l.xValue1,i.scales.x),g=sa(l.yValue1,i.scales.y);let f=s.data[a.datumIndex].span;return f=Wy(f,{x:u,y:d},{x:p,y:g}),f=m4(f,c,h),f}function gtt(t,e,i,s,a,n,o,r,l){const c=a+1,h=o.find(v=>v.xValue0Index<=a&&v.xValue1Index>=c),u=n.find(v=>v.xValue0Index<=a&&v.xValue1Index>=c),d=e.zeroData,p=t.zeroData;if(h==null&&u!=null){N4(t,i,n,u,d,r,l);return}else if(h!=null&&u==null){O4(e,i,o,h,p,r,l);return}else if(h==null||u==null)return;let g;h.xValue0Index===u.xValue0Index&&h.xValue1Index===u.xValue1Index?g=0:h.xValue0Index<=u.xValue0Index&&h.xValue1Index>=u.xValue1Index?g=-1:h.xValue0Index>=u.xValue0Index&&h.xValue1Index<=u.xValue1Index?g=1:g=0;const f=e.data[h.datumIndex],x=C4(f.span,a,h),m=t.data[u.datumIndex],b=C4(m.span,a,u);if(g===1){const v=P4(x,s,e,t,u);v!=null?(l.removed.push({from:x,to:v}),l.moved.push({from:v,to:b}),l.added.push({from:b,to:b})):O4(e,i,o,h,p,r,l)}else if(g===-1){const v=P4(b,s,t,e,h);v!=null?(l.removed.push({from:x,to:x}),l.moved.push({from:x,to:v}),l.added.push({from:v,to:b})):N4(t,i,n,u,d,r,l)}else l.removed.push({from:x,to:x}),l.moved.push({from:x,to:b}),l.added.push({from:b,to:b})}function ftt(t,e,i,s){const a={removed:[],moved:[],added:[]},{axisValues:n,oldDataAxisIndices:o,newDataAxisIndices:r}=t,l={xValue0Index:Math.max(o.at(0)?.xValue0Index??-1/0,r.at(0)?.xValue0Index??-1/0),xValue1Index:Math.min(o.at(-1)?.xValue1Index??1/0,r.at(-1)?.xValue1Index??1/0)};for(let c=0;c<n.length-1;c+=1)gtt(e,i,s,n,c,r,o,l,a);return a}function _4(t,e,i){const{span:s}=e;switch(i){case 0:return Iw(e,t.zeroData)??L4(s,t);case 1:return w4(s)}}function mtt(t,e,i){const s=[],a=[];for(const n of e.data){const o=n.span,r=_4(e,n,i);a.push({from:o,to:r})}for(const n of t.data){const o=n.span,r=_4(t,n,i);s.push({from:r,to:o})}return{removed:a,moved:[],added:s}}function $y(t,e,i){if(!A4(t)||!A4(e)||!utt(t,e))return;const s=ptt(t,e);return s==null?mtt(t,e,i):ftt(s,t,e,i)}var E4,Aw,Cw=I({"packages/ag-charts-community/src/chart/series/cartesian/lineInterpolationUtil.ts"(){"use strict";_m(),Mw(),E4=1e3,Aw=(t=>(t[t.Zero=0]="Zero",t[t.Split=1]="Split",t))(Aw||{})}});function R4(t){return t.type==="continuous"||t.type==="log"}function B4(t){return t.type==="category"}function Md(t,e){return t===void 0||e===void 0?t!==void 0||e!==void 0:R4(t)&&R4(e)?t.type===e.type&&yr(t.domain,e.domain)&&yr(t.range,e.range):B4(t)&&B4(e)?t.inset===e.inset&&t.step===e.step&&yr(t.domain,e.domain):!1}function Uy(t){return t==null?!1:t.type==="category"?t.domain.every(e=>e!=null):t.domain.every(e=>Number.isFinite(e)||e instanceof Date)&&t.range.every(e=>Number.isFinite(e))}var Ky=I({"packages/ag-charts-community/src/chart/series/cartesian/scaling.ts"(){"use strict";R()}});function S0(t,e){let i;const s=t.map(a=>a.point);switch(e.type){case"linear":i=att(s);break;case"smooth":i=ott(s,e.tension);break;case"step":i=ntt(s,e.position);break}return i.map((a,n)=>({span:a,xValue0:t[n].xDatum,yValue0:t[n].yDatum,xValue1:t[n+1].xDatum,yValue1:t[n+1].yDatum}))}function z4(t,e,i=.001){return Math.abs(t.x-e.x)<i&&Math.abs(t.y-e.y)<i}function Lw({path:t},e){let i;for(const{span:s}of e){const[a,n]=Gr(s),o=i!=null&&z4(i,a)?1:0;Dw(t,s,o,!1),i=n}}function M0(t,e,i){let s;for(const a of i){const[n,o]=D4(a.from,a.to,t),r=s!=null&&z4(s,n)?1:0;kw(e.path,a.from,a.to,t,r,!1),s=o}}function ww(t,e,i){const s=(r,l)=>M0(r,l,e.removed),a=(r,l)=>M0(r,l,e.moved),n=(r,l)=>M0(r,l,e.added),o=Tw(t,i);return{status:t,path:{addPhaseFn:n,updatePhaseFn:a,removePhaseFn:s},pathProperties:o}}function Tw(t,e){const i=e==="none"?"updated":t,s={fromFn:a=>{let n;return t==="removed"?n={finish:{visible:!1}}:t==="added"?n={start:{visible:!0}}:n={},{phase:Hn[i],...n}},toFn:a=>({phase:Hn[i]})};return e==="fade"?{fromFn:a=>({opacity:t==="added"?0:a.opacity,...s.fromFn(a)}),toFn:a=>({opacity:t==="removed"?0:1,...s.toFn(a)})}:s}function F4(t,e,i){const s=t.scales.x?.type==="category",a=e.scales.x?.type==="category";if(s!==a||!Uy(t.scales.x)||!Uy(e.scales.x)||t.strokeData==null||e.strokeData==null)return;let n="updated";e.visible&&!t.visible?n="removed":!e.visible&&t.visible&&(n="added");const o=$y({scales:t.scales,data:t.strokeData.spans},{scales:e.scales,data:e.strokeData.spans},1);if(o==null)return;const r=ww(n,o,"fade"),l=(i?.changed??!0)||!Md(t.scales.x,e.scales.x)||!Md(t.scales.y,e.scales.y)||n!=="updated";return{status:n,stroke:r,hasMotion:l}}var D0=I({"packages/ag-charts-community/src/chart/series/cartesian/lineUtil.ts"(){"use strict";zs(),Mw(),k4(),Cw(),Ky()}});function V4({path:t},{spans:e,phantomSpans:i}){for(let s=0;s<e.length;s+=1){const{span:a}=e[s],n=i[s].span;Dw(t,a,0,!1),Dw(t,n,1,!0),t.closePath()}}function k0(t,{path:e},i,s){for(let a=0;a<i.length;a+=1){const n=i[a],o=s[a];kw(e,n.from,n.to,t,0,!1),kw(e,o.from,o.to,t,1,!0),e.closePath()}}function G4(t,e,i,s){const a=(l,c)=>k0(l,c,e.removed,i.removed),n=(l,c)=>k0(l,c,e.moved,i.moved),o=(l,c)=>k0(l,c,e.added,i.added),r=Tw(t,s);return{status:t,path:{addPhaseFn:o,updatePhaseFn:n,removePhaseFn:a},pathProperties:r}}function j4(t,e){const i=t.scales.x?.type==="category",s=e.scales.x?.type==="category";if(i!==s||!Uy(t.scales.x)||!Uy(e.scales.x))return;let a="updated";e.visible&&!t.visible?a="removed":!e.visible&&t.visible&&(a="added");const n=$y({scales:t.scales,data:t.fillData.spans},{scales:e.scales,data:e.fillData.spans},0);if(n==null)return;const o=$y({scales:t.scales,data:t.fillData.phantomSpans},{scales:e.scales,data:e.fillData.phantomSpans},0);if(o==null)return;const r=$y({scales:t.scales,data:t.strokeData.spans,zeroData:t.fillData.phantomSpans},{scales:e.scales,data:e.strokeData.spans,zeroData:e.fillData.phantomSpans},0);if(r==null)return;const l="none",c=G4(a,n,o,l),h=ww(a,r,l);return{status:a,fill:c,stroke:h}}var W4=I({"packages/ag-charts-community/src/chart/series/cartesian/areaUtil.ts"(){"use strict";k4(),Cw(),D0(),Ky()}});function Yy({id:t},e,i,...s){const a={phase:i?Hn[i]:"trailing"};vl(t,"markers",e,s,{opacity:0},{opacity:1},a),s.forEach(n=>n.cleanup())}function Nw({id:t},e,...i){vl(t,"markers",e,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),i.forEach(s=>s.cleanup())}function Ow({id:t,nodeDataDependencies:e},i,...s){const a=e.seriesRectWidth;Ue(t,"markers",i,s,{fromFn:(r,l)=>{const c=l.midPoint?.x??a;let h=Et(0,aC(c/a),1);return isNaN(h)&&(h=0),{scalingX:0,scalingY:0,delay:h,duration:Lm,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function Zy(t){return{opacity:1,scalingX:1,scalingY:1}}function Xy(t,e){return{x:e.point?.x??NaN,y:e.point?.y??NaN,scalingCenterX:e.point?.x??NaN,scalingCenterY:e.point?.y??NaN}}function qy(t,{datumIndex:e}){const i=t.getNodeData();if(i===void 0)return;const s=i[e],{point:a}=s??{};if(s==null||a==null)return;const n=4+(a.focusSize??t.getFormattedMarkerStyle(s).size),o=n/2,r=s.point.x-o,l=s.point.y-o;return He.toCanvas(t.contentGroup,new gt(r,l,n,n))}var Qy=I({"packages/ag-charts-community/src/chart/series/cartesian/markerUtil.ts"(){"use strict";R(),Ru(),zs(),Wt(),ns(),jp()}});function Pw({id:t,visible:e,nodeDataDependencies:i},s,...a){const{seriesRectWidth:n,seriesRectHeight:o}=i;vl(t,"path_properties",s,a,{clipX:0},{clipX:n},{phase:"initial",start:{clip:!0,clipY:o,visible:e},finish:{clip:!1,visible:e}})}function I0({id:t},e,i,s="add",...a){vl(t,e,i,a,{opacity:0},{opacity:1},{phase:s})}function _w(t){return e=>({visible:t.getVisible(),opacity:t.getOpacity(),clipScalingX:1,clip:!1})}function A0({nodeDataDependencies:t},e){const i=s=>isFinite(s)?s:0;e.clipX=i(t.seriesRectWidth),e.clipY=i(t.seriesRectHeight)}var Ew=I({"packages/ag-charts-community/src/chart/series/cartesian/pathUtil.ts"(){"use strict";zs()}}),H4,$4,Jy,ytt=I({"packages/ag-charts-community/src/chart/series/cartesian/areaSeries.ts"(){"use strict";R(),xl(),zs(),yw(),Hu(),Oe(),Er(),Pt(),_m(),XS(),Tg(),jn(),Rr(),Gl(),Al(),Bu(),ett(),W4(),za(),D0(),Qy(),Ew(),H4=.125,$4=.25,Jy=class extends Hl{constructor(t){super({moduleCtx:t,propertyKeys:gh,propertyNames:fh,categoryKey:"xValue",pathsPerSeries:["fill","stroke"],pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[2,0],animationResetFns:{path:_w({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:Vl,marker:(e,i)=>({...Zy(e),...Xy(e,i)})},clipFocusBox:!1}),this.properties=new qe,this.connectsToYAxis=!0,this.backgroundGroup=new Lt({name:`${this.id}-background`,zIndex:0}),this._isStacked=void 0}get pickModeAxis(){return"main"}renderToOffscreenCanvas(){return super.renderToOffscreenCanvas()||this.contextNodeData!=null&&(this.contextNodeData.fillData.spans.length>jy||this.contextNodeData.strokeData.spans.length>jy)}attachSeries(t,e,i){super.attachSeries(t,e,i),t.appendChild(this.backgroundGroup)}detachSeries(t,e,i){super.detachSeries(t,e,i),t?.removeChild(this.backgroundGroup)}attachPaths([t,e]){this.backgroundGroup.appendChild(t),this.contentGroup.appendChild(e),e.zIndex=-1}detachPaths([t,e]){this.backgroundGroup.removeChild(t),this.contentGroup.removeChild(e)}isStacked(){return(this.seriesGrouping?.stackCount??1)>1}setSeriesIndex(t){const e=this.isStacked();return!super.setSeriesIndex(t)&&this._isStacked===e?!1:(this._isStacked=e,e?(this.backgroundGroup.zIndex=[0,t],this.contentGroup.zIndex=[1,t,0]):(this.backgroundGroup.zIndex=[1,t,0,0],this.contentGroup.zIndex=[1,t,0,1]),!0)}async processData(t){if(this.data==null)return;const{data:e,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:a=1}={}}=this,{xKey:n,yKey:o,yFilterKey:r,connectMissingData:l,normalizedTo:c}=this.properties,h=!this.ctx.animationManager.isSkipped(),u=this.axes.x?.scale,d=this.axes.y?.scale,{xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:u,yScale:d}),f={value:`area-stack-${s}-yValue`,values:`area-stack-${s}-yValues`,stack:`area-stack-${s}-yValue-stack`,marker:`area-stack-${s}-yValues-marker`},x=[];au(c)&&x.push(US(Object.values(f),c)),h&&x.push(Ig());const m={invalidValue:null};(au(c)||l)&&a>1&&(m.invalidValue=0),i||(m.forceValue=0),await this.requestDataModel(t,e,{props:[$o(n,p,{id:"xValue"}),Yt(o,g,{id:"yValueRaw",...m}),...r!=null?[Yt(r,g,{id:"yFilterRaw"})]:[],...HF(o,g,{id:"yValueStack",...m,groupId:f.stack}),Yt(o,g,{id:"yValue",...m,groupId:f.value}),...ih(o,"window","current",{id:"yValueEnd",...m,groupId:f.values},g),...ih(o,"normal","current",{id:"yValueCumulative",...m,groupId:f.marker},g),...x],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}xCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes.x.scale.convert(t),a=i.enabled?.5*i.size*e:0;return[s-a,s+a]}yCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes.y.scale.convert(t[0]),a=i.enabled?.5*i.size*e:0;return[s-a,s+a]}getSeriesDomain(t){const{processedData:e,dataModel:i,axes:s}=this;if(!e||!i)return[];const a=s.y;if(t==="x"){const o=i.resolveProcessedDataDefById(this,"xValue"),r=i.getDomain(this,"xValue","key",e);return o?.def.type==="key"&&o.def.valueType==="category"?r:_a(El(r))}const n=this.domainForClippedRange("y",["yValueCumulative"],"xValue");if(a instanceof ad||a instanceof Zo)return _a(n);{const o=Number.isFinite(n[1]-n[0])?[n[0]>0?0:n[0],n[1]<0?0:n[1]]:[];return _a(o)}}getSeriesRange(t,e){const[i,s]=this.domainForVisibleRange("y",["yValueCumulative"],"xValue",e);return[Math.min(i,0),Math.max(s,0)]}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["yValueCumulative"],t,e,i)}createNodeData(){const{axes:t,data:e,processedData:i,dataModel:s}=this,a=t.x,n=t.y;if(!a||!n||!e||!s||i?.type!=="grouped")return;const{yKey:o,xKey:r,xName:l,yName:c,yFilterKey:h,marker:u,label:d,fill:p,stroke:g,connectMissingData:f,interpolation:x}=this.properties,{scale:m}=a,{scale:b}=n,v=this.getSeriesDomain("y"),{isContinuousY:M}=this.getScaleInformation({xScale:m,yScale:b}),D=(m.bandwidth??0)/2,L=s.resolveKeysById(this,"xValue",i),C=s.resolveColumnById(this,"yValueEnd",i),A=s.resolveColumnById(this,"yValueRaw",i),T=s.resolveColumnById(this,"yValueCumulative",i),N=h!=null?s.resolveColumnById(this,"yFilterRaw",i):void 0,O=s.resolveColumnById(this,"yValueStack",i),E=(et,it,ct)=>{let ht;return(au(this.properties.normalizedTo)?M&&cS(ct):!isNaN(ct))&&(ht=it),{x:m.convert(et)+D,y:b.convert(ht),size:u.size}},z=[],B=[],{visibleSameStackCount:F}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);let V=!1;const{dataSources:G}=i,H=G.get(this.id)??[];for(const{datumIndex:et}of s.forEachGroupDatum(this,i)){const it=L[et];if(it==null)return;const ct=H[et],ht=A[et],xt=T[et],kt=C[et],Dt=Number.isFinite(ht),St=E(it,+xt,ht),Xt=N!=null?N[et]===ht:void 0;if(Xt===!1&&(V=!0),Dt&&u&&B.push({series:this,itemId:o,datum:ct,datumIndex:et,midPoint:{x:St.x,y:St.y},cumulativeValue:kt,yValue:ht,xValue:it,yKey:o,xKey:r,point:St,fill:u.fill??p,stroke:u.stroke??g,strokeWidth:u.strokeWidth??this.getStrokeWidth(this.properties.strokeWidth),selected:Xt}),Dt&&d){const ke=this.getLabelText(ht,ct,o,"y",v,d,{value:ht,datum:ct,xKey:r,yKey:o,xName:l,yName:c});z.push({series:this,itemId:o,datum:ct,datumIndex:et,x:St.x,y:St.y,labelText:ke})}}const $=et=>et.flatMap(it=>Array.isArray(it)?S0(it,x):new Array(it.skip).fill(null)),W=(et,it)=>({point:{x:m.convert(et)+D,y:b.convert(it)},xDatum:et,yDatum:it}),j=et=>{const it=[];for(const{datumIndexes:[ct,ht,xt]}of s.forEachGroupDatumTuple(this,i)){const kt=L[ht],Dt=O[ht],St=Dt[et],Xt=Number.isFinite(St);if(f&&!Xt)continue;const ke=ct!=null?O[ct]:void 0,ce=xt!=null?O[xt]:void 0;let Ot=0,Vt=!0,qt=0,he=!0;for(let ni=0;ni<=et;ni+=1){const ys=Dt[ni];if(Number.isFinite(ys)){const Qa=ke==null||Number.isFinite(ke[ni]),ol=ce==null||Number.isFinite(ce[ni]);Qa?Ot+=ys:Vt=!1,ol?qt+=ys:he=!1}}const ai=it[it.length-1];if(!f&&(!Vt||!he||!Xt||Ot!==qt))if(!Xt&&Array.isArray(ai)&&ai.length===1)it[it.length-1]={skip:1};else{const ni=W(kt,Ot),ys=W(kt,qt);Array.isArray(ai)?ai.push(ni):ai!=null&&(ai.skip+=1),it.push(Xt?[ys]:{skip:0})}else{const ni=f?St:Math.max(Ot,qt),ys=W(kt,ni);Array.isArray(ai)?ai.push(ys):ai!=null?(ai.skip+=1,it.push([ys])):it.push([ys])}}return $(it)},U=this.seriesGrouping?.stackIndex??0,Z=()=>{const et=Array.from(s.forEachGroupDatum(this,i),({datumIndex:it})=>{const ct=L[it],xt=O[it][U];if(!(f&&!Number.isFinite(xt)))return W(ct,0)}).filter(it=>it!=null);return S0(et,x)},X=j(U),q=X.map(()=>null);for(let et=U-1;et>=-1;et-=1){let it;for(let ct=0;ct<q.length;ct+=1)q[ct]==null&&(it??(it=et!==-1?j(et):Z()),q[ct]=it[ct])}const tt=X.map((et,it)=>et??q[it]),J=X.filter(et=>et!=null);return{itemId:o,fillData:{itemId:o,spans:tt,phantomSpans:q},strokeData:{itemId:o,spans:J},labelData:z,nodeData:B,scales:this.calculateScaling(),visible:this.visible,stackVisible:F>0,crossFiltering:V}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{visible:e,animationEnabled:i}=t,[s,a]=t.paths,n=this.contextNodeData?.crossFiltering===!0,{strokeWidth:o,stroke:r,strokeOpacity:l,lineDash:c,lineDashOffset:h,fill:u,fillOpacity:d,opacity:p}=se(this.getHighlightStyle(),this.properties);a.setProperties({fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:1,stroke:r,strokeWidth:o,strokeOpacity:l*(n?$4:1),lineDash:c,lineDashOffset:h,opacity:p,visible:e||i});const g=qu(u,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults);Il(s,{fill:g,stroke:void 0,fillOpacity:d*(n?H4:1)},void 0,this.getShapeFillBBox()),s.setProperties({lineJoin:"round",pointerEvents:1,fillShadow:this.properties.shadow,opacity:p,visible:e||i}),A0(this,a),A0(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("AreaSeries")}updateFillPath(t,e){const[i]=t;i.path.clear(),V4(i,e.fillData),i.markDirty("AreaSeries")}updateStrokePath(t,e){const{spans:i}=e.strokeData,[,s]=t;s.path.clear(),Lw(s,i),s.markDirty("AreaSeries")}updateMarkerSelection(t){const{nodeData:e,markerSelection:i}=t,s=this.properties.marker.enabled||this.contextNodeData?.crossFiltering===!0;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(s?e:[])}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yKey:a,marker:n,stroke:o,strokeWidth:r,strokeOpacity:l}=this.properties,c=this.getSeriesDomain("x"),h=this.getSeriesDomain("y"),u=this.getShapeFillBBox(),d=n.getStyle();e.each((p,g)=>{const{xValue:f,yValue:x}=g,m=this.getHighlightStyle(i,g.datumIndex),b=se(m,d,{stroke:o,strokeWidth:r,strokeOpacity:l});this.updateMarkerStyle(n,p,g.datum,g.point,Lc(f,x,s,a,c,h),i,b,u,{selected:g.selected})}),i||this.properties.marker.markClean()}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{enabled:i,fontStyle:s,fontWeight:a,fontSize:n,fontFamily:o,color:r}=this.properties.label;e.each((l,c)=>{const{x:h,y:u,labelText:d}=c;d&&i&&this.visible?(l.fontStyle=s,l.fontWeight=a,l.fontSize=n,l.fontFamily=o,l.textAlign="center",l.textBaseline="bottom",l.text=d,l.x=h,l.y=u-10,l.fill=r,l.fillOpacity=this.getHighlightStyle(!1,c.datumIndex).opacity??1,l.visible=!0):l.visible=!1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n}=this,{xKey:o,xName:r,yKey:l,yName:c,tooltip:h,marker:u,legendItemName:d}=n,p=a.x,g=a.y;if(!i||!s||!p||!g)return;const f=s.dataSources.get(this.id)?.[t],x=i.resolveKeysById(this,"xValue",s)[t],m=i.resolveColumnById(this,"yValueRaw",s)[t],{xDomain:b,yDomain:v}=this.cachedDatumCallback("domain",()=>({xDomain:this.getSeriesDomain("x"),yDomain:this.getSeriesDomain("y")}));if(x==null)return;const M=u.getStyle(),D=this.getMarkerStyle(u,f,Lc(x,m,o,l,b,v),!1,void 0,M);return this.formatTooltipWithContext(h,{heading:p.formatDatum(x,"tooltip",e,d,f,o),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:g.formatDatum(m,"tooltip",e,d,f,l)}]},{seriesId:e,datum:f,title:c,xKey:o,xName:r,yKey:l,yName:c,...D,...this.getModuleTooltipParams()})}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:s,strokeWidth:a,lineDash:n,marker:o,fillGradientDefaults:r,fillPatternDefaults:l,fillImageDefaults:c}=this.properties,h=!o.enabled||o.fill===void 0,u=h?qu(t,r,l,c):qu(o.fill,o.fillGradientDefaults,o.fillPatternDefaults,o.fillImageDefaults);return{marker:{...this.getMarkerStyle(o,void 0,void 0,!1,void 0,{fill:u,fillOpacity:h?i:o.fillOpacity}),enabled:o.enabled||a<=0},line:{stroke:e,strokeOpacity:s,strokeWidth:a,lineDash:n}}}getLegendData(t){if(t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{yKey:a,yName:n,legendItemName:o,showInLegend:r}=this.properties;return[{legendType:t,id:e,itemId:a,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:a}),label:{text:o??n??a},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!r}]}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,contextData:s,paths:a}=t,{animationManager:n}=this.ctx;this.updateAreaPaths(a,s),Pw(this,n,...a),cs([e],Xy),Ow(this,n,e),le(this,"labels",n,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:s,contextData:a,paths:n,previousContextData:o}=t,[r,l]=n;if(a.visible===!1&&o?.visible===!1||r==null&&l==null)return;this.resetMarkerAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateAreaPaths(n,a)},h=()=>{e.skipCurrentBatch(),c()};if(a==null||o==null){c(),Yy(this,e,"added",i),I0(this,"fill_path_properties",e,"add",r),I0(this,"stroke_path_properties",e,"add",l),le(this,"labels",e,s);return}if(a.crossFiltering!==o.crossFiltering){h();return}const u=j4(a,o);if(u===void 0){h();return}else if(u.status==="no-op")return;Yy(this,e,void 0,i),Ue(this.id,"fill_path_properties",e,[r],u.fill.pathProperties),y0(this.id,"fill_path_update",e,[r],u.fill.path),Ue(this.id,"stroke_path_properties",e,[l],u.stroke.pathProperties),y0(this.id,"stroke_path_update",e,[l],u.stroke.path),le(this,"labels",e,s),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(n,a)})}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Lt}getFormattedMarkerStyle(t){const{xValue:e,yValue:i,xKey:s,yKey:a}=t,n=this.getSeriesDomain("x"),o=this.getSeriesDomain("y");return this.getMarkerStyle(this.properties.marker,t.datum,Lc(e,i,s,a,n,o),!0)}computeFocusBounds(t){return qy(this,t)}},Jy.className="AreaSeries",Jy.type="area"}}),U4,Rw,Bw=I({"packages/ag-charts-community/src/chart/series/cartesian/areaSeriesModule.ts"(){"use strict";li(),bi(),ytt(),h2(),U4={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",moduleFactory:t=>new Jy(t),stackable:!0,defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{nodeClickRange:"nearest",fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Tl,fillImageDefaults:Gc,stroke:{$palette:"stroke"},fillOpacity:.8,strokeOpacity:1,strokeWidth:{$isUserOption:["./stroke",2,0]},lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:Cl,xOffset:3,yOffset:3,blur:5},interpolation:{type:"linear"},marker:{enabled:!1,shape:"circle",size:7,strokeWidth:{$isUserOption:["./stroke",1,0]},fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Tl},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},tooltip:{range:{$path:["/tooltip/range","nearest"]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","node"]}}},highlight:Vc()}}},Rw={type:"series",name:"area",chartType:"cartesian",options:c2,create:t=>new Jy(t)}}});function zw(t,e){for(const i of e){const s=i.datum;s===void 0?ut.error("undefined datum"):t.addValue(i,s)}}function Fw(t,e){const{x:i,y:s}=e,{nearest:a,distanceSquared:n}=t.getQuadTree().find(i,s);if(a!==void 0)return{datum:a.value,distance:Math.sqrt(n)}}var Vw=I({"packages/ag-charts-community/src/chart/series/cartesian/quadtreeUtil.ts"(){"use strict";R()}}),C0,Gw,jw=I({"packages/ag-charts-community/src/chart/series/cartesian/abstractBarSeries.ts"(){"use strict";R(),Dy(),Bs(),Er(),vt(),id(),YS(),jn(),za(),Vw(),C0=class extends Vr{constructor(){super(...arguments),this.direction="vertical"}},S([k],C0.prototype,"direction",2),Gw=class extends Hl{constructor(){super(...arguments),this.groupScale=new kg,this.smallestDataInterval=void 0,this.largestDataInterval=void 0}padBandExtent(t,e){const i=typeof e=="boolean"?1:.5,s=pe(this.smallestDataInterval)?this.smallestDataInterval*i:0,a=El(t)??[NaN,NaN];return typeof e=="boolean"?a[e?0:1]-=(e?1:-1)*s:(a[0]-=s,a[1]+=s),_a(a)}getBandScalePadding(){return{inner:.3,outer:.15}}shouldFlipXY(){return!this.isVertical()}isVertical(){return this.properties.direction==="vertical"}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){const t=this.getBarDirection();return this.axes[t]}getCategoryAxis(){const t=this.getCategoryDirection();return this.axes[t]}getBandwidth(t,e){return me.is(t.scale)?t.scale.calcBandwidth(this.smallestDataInterval,e):t.scale.bandwidth}xCoordinateRange(t){const e=this.axes[this.getCategoryDirection()],i=e.scale,s=this.getBandwidth(e,0)??0,a=me.is(i)?s*-.5:0,n=i.convert(t)+a;return[n,n+s]}yCoordinateRange(t){const i=this.axes[this.getBarDirection()].scale,s=t.map(a=>i.convert(a));if(s.length===1){const a=i.convert(0);return[Math.min(s[0],a),Math.max(s[0],a)]}return[Math.min(...s),Math.max(...s)]}updateGroupScale(t){const e=[],{groupScale:i}=this,s=this.getBandwidth(t),{index:a,visibleGroupCount:n}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);for(let r=0;r<n;r++)e.push(String(r));return i.domain=e,i.range=[0,s??0],t instanceof sh?i.paddingInner=t.groupPaddingInner:t instanceof eh?(i.paddingInner=t.groupPaddingInner,i.round=i.padding!==0):i.padding=0,{barWidth:i.bandwidth>=1?i.bandwidth:i.rawBandwidth,groupIndex:a}}resolveKeyDirection(t){return this.getBarDirection()==="x"?t==="x"?"y":"x":t}initQuadTree(t){zw(t,this.datumNodesIter())}pickNodeClosestDatum(t){return Fw(this,t)}}}}),L0,Te,xtt=I({"packages/ag-charts-community/src/chart/series/cartesian/barSeriesProperties.ts"(){"use strict";Gg(),vt(),Vo(),kl(),Wl(),jw(),L0=class extends Li{constructor(){super(...arguments),this.placement="inside-center",this.padding=0}},S([k],L0.prototype,"placement",2),S([k],L0.prototype,"padding",2),Te=class extends C0{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new pn,this.fillPatternDefaults=new _e,this.fillImageDefaults=new ga,this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.crisp=void 0,this.shadow=new so,this.label=new L0,this.tooltip=jl(),this.sparklineMode=!1,this.fastDataProcessing=!1}},S([k],Te.prototype,"xKey",2),S([k],Te.prototype,"xName",2),S([k],Te.prototype,"yKey",2),S([k],Te.prototype,"yName",2),S([k],Te.prototype,"yFilterKey",2),S([k],Te.prototype,"stackGroup",2),S([k],Te.prototype,"normalizedTo",2),S([k],Te.prototype,"fill",2),S([k],Te.prototype,"fillGradientDefaults",2),S([k],Te.prototype,"fillPatternDefaults",2),S([k],Te.prototype,"fillImageDefaults",2),S([k],Te.prototype,"fillOpacity",2),S([k],Te.prototype,"stroke",2),S([k],Te.prototype,"strokeWidth",2),S([k],Te.prototype,"strokeOpacity",2),S([k],Te.prototype,"lineDash",2),S([k],Te.prototype,"lineDashOffset",2),S([k],Te.prototype,"cornerRadius",2),S([k],Te.prototype,"crisp",2),S([k],Te.prototype,"itemStyler",2),S([k],Te.prototype,"shadow",2),S([k],Te.prototype,"label",2),S([k],Te.prototype,"tooltip",2),S([k],Te.prototype,"sparklineMode",2),S([k],Te.prototype,"fastDataProcessing",2)}});function K4(t,e,i,s){if(e!=null){const[a,n]=e;if(a!==0||n!==1)return!1}if(me.is(t)){const a=t.calcBandwidth(s)-t.calcBandwidth(i);if(a>0&&a<1)return!1}return!0}function tx(t,e,i){const{startingX:s,startingY:a}=vtt(t,e);return{isVertical:t,calculate:(o,r)=>{let l=t?o.x:s,c=t?a:o.y,h=t?o.width:0,u=t?0:o.height;const{opacity:d=1}=o;r&&(isNaN(l)||isNaN(c))&&({x:l,y:c}=r,h=t?r.width:0,u=t?0:r.height,t&&!w0(r)?c+=r.height:!t&&w0(r)&&(l+=r.width));let p;return o.clipBBox==null?p=void 0:w0(o)?p=t?new gt(l,c-u,h,u):new gt(l-h,c,h,u):p=new gt(l,c,h,u),{x:l,y:c,width:h,height:u,clipBBox:p,opacity:d}},mode:i}}function btt(t,e){return{isVertical:t,calculate:i=>({x:t?i.x:i.x+i.width/2,y:t?i.y+i.height/2:i.y,width:t?i.width:0,height:t?0:i.height,clipBBox:i.clipBBox,opacity:i.opacity??1}),mode:e}}function ex(t){const e=n=>n==null||isNaN(n.x)||isNaN(n.y);return{toFn:(n,o,r)=>r==="removed"&&n.datum==null&&t.mode==="fade"?{...ix(n,o),opacity:0}:r==="removed"||e(o)?t.calculate(o,n.previousDatum):{x:o.x,y:o.y,width:o.width,height:o.height,clipBBox:o.clipBBox,opacity:o.opacity??1},fromFn:(n,o,r)=>{r==="updated"&&e(o)?r="removed":r==="updated"&&e(n.previousDatum)&&(r="added");let l;r==="added"&&n.previousDatum==null&&t.mode==="fade"?l={...ix(n,o),opacity:0}:r==="unknown"||r==="added"?l=t.calculate(o,n.previousDatum):l={x:n.x,y:n.y,width:n.width,height:n.height,clipBBox:n.clipBBox,opacity:n.opacity??1};const c=Hn[r];return{...l,phase:c}},applyFn:(n,o,r)=>{n.setProperties(o),n.crisp=r==="end"&&(n.datum?.crisp??!1)}}}function vtt(t,e){const i=e[t?"y":"x"];let s=1/0,a=0;return i?(t?a=i.scale.convert(me.is(i.scale)?0:Math.max(...i.range)):s=i.scale.convert(me.is(i.scale)?0:Math.min(...i.range)),{startingX:s,startingY:a}):{startingX:s,startingY:a}}function ix(t,{x:e,y:i,width:s,height:a,clipBBox:n,opacity:o=1}){return{x:e,y:i,width:s,height:a,clipBBox:n,opacity:o,crisp:t.datum?.crisp??!1}}function Ww(t,e){if(e===void 0)return;const{x:i,y:s,width:a,height:n}=e;return He.toCanvas(t.contentGroup,new gt(i,s,a,n))}var w0,Hw=I({"packages/ag-charts-community/src/chart/series/cartesian/barUtil.ts"(){"use strict";R(),zs(),Bs(),Wt(),ns(),w0=t=>zb(t.yValue??0)}});function $w(t,e,i,s,a,n){let o=n?.reduced?.diff?.[t];if(o?.changed)return o;const r=Stt(s,a);return o==null&&n?.reduced?.diff!=null?(o={changed:!0,added:new Set,updated:new Set,removed:new Set,moved:new Set},r?o.updated=new Set(Array.from(e,({datum:l})=>i(l))):o.added=new Set(Array.from(e,({datum:l})=>i(l)))):r&&(o={changed:!0,added:new Set,updated:new Set(Array.from(e,({datum:l})=>i(l))),removed:new Set,moved:new Set}),o}function Y4(t){return typeof t=="object"&&t!==null&&"groupScale"in t}function Stt(t,e){if(!e)return!1;const i=t.scales,s=e.scales;if(!Md(i.x,s.x)||!Md(i.y,s.y))return!0;if(!Y4(t)||!Y4(e))return!1;const a=t.groupScale,n=e.groupScale;return!Md(a,n)}var Uw=I({"packages/ag-charts-community/src/chart/series/cartesian/diffUtil.ts"(){"use strict";Ky()}});function Z4(t,e,i){if(e.enabled&&i){const{x:s,y:a,text:n,textAlign:o,textBaseline:r}=i,{color:l,fontStyle:c,fontWeight:h,fontSize:u,fontFamily:d}=e;t.setProperties({visible:!0,x:s,y:a,text:n,fill:l,fontStyle:c,fontWeight:h,fontSize:u,fontFamily:d,textAlign:o,textBaseline:r})}else t.visible=!1}function X4({isUpward:t,isVertical:e,placement:i,padding:s=0,rect:a}){let n=a.x+a.width/2,o=a.y+a.height/2,r="center",l="middle";if(i!=="inside-center"){const c=(t?1:-1)*(e?-1:1),{direction:h,textAlignment:u}=q4[i],d=(h+1)*.5;if(e){const p=t?a.y+a.height:a.y,g=a.height*c;o=p+g*d+s*u*c,l=u===c?"top":"bottom"}else{const p=t?a.x:a.x+a.width,g=a.width*c;n=p+g*d+s*u*c,r=u===c?"left":"right"}}return{x:n,y:o,textAlign:r,textBaseline:l}}var q4,Q4=I({"packages/ag-charts-community/src/chart/series/cartesian/labelUtil.ts"(){"use strict";q4={"inside-start":{inside:!0,direction:-1,textAlignment:1},"inside-end":{inside:!0,direction:1,textAlignment:-1},"outside-start":{inside:!1,direction:-1,textAlignment:-1},"outside-end":{inside:!1,direction:1,textAlignment:1}}}}),J4,tG,eG,iG,sG,jg,aG=I({"packages/ag-charts-community/src/chart/series/cartesian/barSeries.ts"(){"use strict";R(),zs(),Bs(),Wt(),Fy(),XS(),jn(),Rr(),Gl(),Al(),Bu(),jw(),xtt(),Hw(),za(),Uw(),Q4(),Ky(),J4=0,tG=1,eG=2,iG=3,sG=4,jg=class extends Gw{constructor(t){super({moduleCtx:t,propertyKeys:gh,propertyNames:fh,categoryKey:"xValue",pickModes:[2,1,0],pathsPerSeries:[],hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:ix,label:Vl}}),this.properties=new Te,this.connectsToYAxis=!0,this.dataAggregationFilters=void 0}get pickModeAxis(){return this.properties.sparklineMode?"main":void 0}crossFilteringEnabled(){return this.properties.yFilterKey!=null&&(this.seriesGrouping==null||this.seriesGrouping.stackIndex===0)}async processData(t){if(!this.data)return;const{xKey:e,yKey:i,yFilterKey:s,normalizedTo:a,fastDataProcessing:n}=this.properties,{seriesGrouping:{groupIndex:o=this.id}={},data:r}=this,l=this.seriesGrouping?.groupCount??0,h=(this.seriesGrouping?.stackCount??0)>=1||a!=null,u=!n||l>1||h,d=!this.ctx.animationManager.isSkipped(),p=this.getCategoryAxis()?.scale,g=this.getValueAxis()?.scale,{isContinuousX:f,xScaleType:x,yScaleType:m}=this.getScaleInformation({xScale:p,yScale:g}),b=`bar-stack-${o}-yValues`,v=`${b}-trailing`,M=this.visible?{}:{forceValue:0},D=[$o(e,x,{id:"xValue"}),Yt(i,m,{id:"yValue-raw",invalidValue:null,...M})];this.crossFilteringEnabled()&&D.push(Yt(s,m,{id:"yFilterValue",invalidValue:null,...M})),h&&D.push(...ih(i,"normal","current",{id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:b,separateNegative:!0,...M},m),...ih(i,"trailing","current",{id:"yValue-start",invalidValue:null,missingValue:0,groupId:v,separateNegative:!0,...M},m)),f&&D.push(XL,qL),pe(a)&&D.push(US([b,v],Math.abs(a))),d&&this.processedData&&D.push(Ag(this.id,this.processedData)),(d||!u)&&D.push(Ig());const{dataModel:L,processedData:C}=await this.requestDataModel(t,r,{props:D,groupByKeys:u,groupByData:!u});this.dataAggregationFilters=this.aggregateData(L,C),this.smallestDataInterval=C.reduced?.smallestKeyInterval,this.largestDataInterval=C.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(i==null||e==null)return[];if(t===this.getCategoryDirection()){const o=i.resolveProcessedDataDefById(this,"xValue"),r=i.getDomain(this,"xValue","key",e);return o?.def.type==="key"&&o.def.valueType==="category"?r:this.padBandExtent(r)}const s=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw";let a=this.domainForClippedRange(t,[s],"xValue");const n=this.crossFilteringEnabled()?i.getDomain(this,"yFilterValue","value",e):void 0;if(n!=null&&(a=[Math.min(a[0],n[0]),Math.max(a[1],n[1])]),this.getValueAxis()instanceof ad)return _a(a);{const o=Number.isFinite(a[1]-a[0])?[Math.min(0,a[0]),Math.max(0,a[1])]:[];return _a(o)}}getSeriesRange(t,e){const i=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw",[s,a]=this.domainForVisibleRange("y",[i],"xValue",e);return[Math.min(s,0),Math.max(a,0)]}getVisibleItems(t,e,i){const s=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw";return this.countVisibleItems("xValue",[s],t,e,i)}aggregateData(t,e){}createNodeData(){const{dataModel:t,processedData:e,groupScale:i,dataAggregationFilters:s}=this,a=this.getCategoryAxis(),n=this.getValueAxis();if(!t||!e||!a||!n)return;const o=e.dataSources?.get(this.id);if(o==null)return;const r=a.scale,l=n.scale,{xKey:c,yKey:h,xName:u,yName:d,legendItemName:p,label:g}=this.properties,f=this.getSeriesDomain("y"),x=n.isReversed(),{barWidth:m,groupIndex:b}=this.updateGroupScale(a),v=i.convert(String(b)),M=me.is(r)?m*-.5:0,D=t.resolveKeysById(this,"xValue",e),L=t.resolveColumnById(this,"yValue-raw",e),C=this.crossFilteringEnabled()?t.resolveColumnById(this,"yFilterValue",e):void 0,A=!this.ctx.animationManager.isSkipped(),T=j=>r.convert(D[j])+v+M,N=this.properties.crisp??K4(a?.scale,a?.visibleRange,this.smallestDataInterval,this.largestDataInterval),O=l.convert(0),E=({datum:j,datumIndex:U,valueIndex:Z,xValue:X,yValue:q,cumulativeValue:tt,phantom:J,currY:at,prevY:et,x:it,width:ct,isPositive:ht,yRange:xt,labelText:kt,opacity:Dt,crossScale:St=1})=>{const Xt=ht!==x,ke=l.convert(at),ce=l.convert(et),Ot=l.convert(xt),Vt=this.getBarDirection()==="x",qt=ct*.5*(1-St),he={x:Vt?Math.min(ke,ce):it+qt,y:Vt?it+qt:Math.min(ke,ce),width:Vt?Math.abs(ce-ke):ct*St,height:Vt?ct*St:Math.abs(ce-ke)},ai=new gt(he.x,he.y,he.width,he.height),ni={x:Vt?Math.min(O,Ot):it+qt,y:Vt?it+qt:Math.min(O,Ot),width:Vt?Math.abs(O-Ot):ct*St,height:Vt?ct*St:Math.abs(O-Ot)},ys=this.shouldFlipXY()?he.height:he.width;return{series:this,itemId:J?yn(h,J):h,datum:j,datumIndex:U,valueIndex:Z,cumulativeValue:tt,phantom:J,xValue:X,yValue:q,yKey:h,xKey:c,capDefaults:{lengthRatioMultiplier:ys,lengthMax:ys},x:ni.x,y:ni.y,width:ni.width,height:ni.height,midPoint:{x:he.x+he.width/2,y:he.y+he.height/2},opacity:Dt,topLeftCornerRadius:Vt!==Xt,topRightCornerRadius:Xt,bottomRightCornerRadius:Vt===Xt,bottomLeftCornerRadius:!Xt,clipBBox:ai,crisp:N,label:kt!=null?{text:kt,...X4({isUpward:Xt,isVertical:!Vt,placement:g.placement,padding:g.padding,rect:he})}:void 0,missing:q==null,focusable:!J}},z=[],B=[],F=[],V=(j,U,Z,X,q,tt,J,at)=>{const et=D[j];if(et==null)return;const it=o[j],ct=L[j],ht=C!=null?Number(C[j]):void 0,xt=ct>=0&&!Object.is(ct,-0);if(!Number.isFinite(tt)||ht!=null&&!Number.isFinite(ht))return;const kt=ct!=null?this.getLabelText(ht??ct,it,h,"y",f,g,{datum:it,value:ht??ct,xKey:c,yKey:h,xName:u,yName:d,legendItemName:p}):void 0,Dt=ht!=null&&ht>ct,St=E({datum:it,datumIndex:j,valueIndex:U,xValue:et,yValue:ht??ct,cumulativeValue:ht??tt,phantom:!1,currY:ht!=null?q+ht:tt,prevY:q,x:Z,width:X,isPositive:xt,yRange:Math.max(q+(ht??-1/0),J),labelText:kt,opacity:at,crossScale:Dt?.6:void 0});if(B.push(St),F.push(St),ht!=null){const Xt=E({datum:o[j],datumIndex:j,valueIndex:U,xValue:et,yValue:ht,cumulativeValue:ht,phantom:!0,currY:tt,prevY:q,x:Z,width:X,isPositive:xt,yRange:J,labelText:void 0,opacity:at,crossScale:void 0});z.push(Xt)}},[G,H]=r.range,$=H-G,W=s?.find(j=>j.maxRange>$);if(e.type==="grouped"){const j=m,U=t.hasColumnById(this,"yValue-start"),Z=U?t.resolveColumnById(this,"yValue-start",e):void 0,X=U?t.resolveColumnById(this,"yValue-end",e):void 0,q=U?t.resolveProcessedDataIndexById(this,"yValue-range"):-1;for(const{datumIndex:tt,valueIndex:J,group:{aggregation:at}}of t.forEachGroupDatum(this,e)){const et=T(tt),it=L[tt],ct=it>=0&&!Object.is(it,-0),ht=U?Number(Z?.[tt]):0,xt=U?Number(X?.[tt]):it;let kt=xt;U&&(kt=at[q][ct?1:0]),V(tt,J,et,j,ht,xt,kt,1)}}else if(W==null){const j=m;let[U,Z]=this.visibleRange("xValue",a.range);e.input.count<1e3&&(U=0,Z=e.input.count);for(let X=U;X<Z;X+=1){const q=T(X),tt=Number(L[X]);V(X,0,q,j,0,tt,tt,1)}}else{const{indexData:j,indices:U}=W,[Z,X]=this.visibleRange("xValue",a.range,U);for(let q=Z;q<X;q+=1){const tt=q*sG,J=j[tt+J4],at=j[tt+tG],et=j[tt+eG],it=j[tt+iG];if(J===-1)continue;const ct=T((J+at)/2|0),ht=Math.abs(T(at)-T(J))+m,xt=D[it]!=null?Number(L[it]):NaN,kt=D[et]!=null?Number(L[et]):NaN;if(xt>0){const Dt=kt>=0?kt/xt:1;V(it,0,ct,ht,0,xt,xt,Dt)}if(kt<0){const Dt=xt<=0?xt/kt:1;V(et,1,ct,ht,0,kt,kt,Dt)}}}return{itemId:h,nodeData:z.length>0?[...z,...B]:B,labelData:F,scales:this.calculateScaling(),visible:this.visible||A,groupScale:this.getScaling(this.groupScale)}}nodeFactory(){return new Gs}getHighlightData(t,e){const i=t.find(s=>s.datum===e.datum&&!s.phantom);return i!=null?[i]:void 0}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>this.getDatumId(e))}getItemBaseStyle(t,e){const{properties:i}=this,{cornerRadius:s,fillGradientDefaults:a,fillPatternDefaults:n,fillImageDefaults:o}=i,r=this.getHighlightStyle(t,e?.datumIndex);return wr({fill:r?.fill??i.fill,fillOpacity:r?.fillOpacity??i.fillOpacity,opacity:r?.opacity??1,stroke:r?.stroke??i.stroke,strokeWidth:r?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:r?.strokeOpacity??i.strokeOpacity,lineDash:r?.lineDash??i.lineDash??[],lineDashOffset:r?.lineDashOffset??i.lineDashOffset,cornerRadius:r?.cornerRadius??s},a,n,o)}getItemStyleOverrides(t,e,i,s,a,n){const{id:o,properties:r}=this,{xKey:l,yKey:c,itemStyler:h,fillGradientDefaults:u,fillPatternDefaults:d,fillImageDefaults:p}=r;if(h==null)return;const{xDomain:g,yDomain:f}=this.cachedDatumCallback("domain",()=>({xDomain:this.getSeriesDomain("x"),yDomain:this.getSeriesDomain("y")})),x=this.cachedDatumCallback(yn(t,n?"highlight":"node"),()=>this.callWithContext(h,{seriesId:o,...Lc(i,s,l,c,g,f),datum:e,xValue:i,yValue:s,highlighted:n,...a}));return wr(x,u,d,p)}updateDatumNodes(t){const{shadow:e}=this.properties,i=this.getCategoryDirection()==="x",s=this.getShapeFillBBox();t.datumSelection.each((a,n)=>{const o=this.getItemBaseStyle(t.isHighlight,n),r=this.getItemStyleOverrides(String(n.datumIndex),n.datum,n.xValue,n.yValue,o,t.isHighlight);Il(a,o,r,s);const l=r?.cornerRadius??o.cornerRadius;a.topLeftCornerRadius=n.topLeftCornerRadius?l:0,a.topRightCornerRadius=n.topRightCornerRadius?l:0,a.bottomRightCornerRadius=n.bottomRightCornerRadius?l:0,a.bottomLeftCornerRadius=n.bottomLeftCornerRadius?l:0,a.visible=i?(n.clipBBox?.width??n.width)>0:(n.clipBBox?.height??n.height)>0,a.crisp=n.crisp,a.fillShadow=e})}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e,i=>{i.pointerEvents=1})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{e.fillOpacity=this.getHighlightStyle(!1,i?.datumIndex).opacity??1,Z4(e,this.properties.label,i.label)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a}=this,{xKey:n,xName:o,yKey:r,yName:l,legendItemName:c,stackGroup:h,tooltip:u}=a,d=this.getCategoryAxis(),p=this.getValueAxis();if(!i||!s||!d||!p)return;const g=s.dataSources.get(this.id)?.[t],f=i.resolveKeysById(this,"xValue",s)[t],x=i.resolveColumnById(this,"yValue-raw",s)[t];if(f==null)return;const m=this.getItemBaseStyle(!1);return Object.assign(m,this.getItemStyleOverrides(String(t),g,f,x,m,!1)),this.formatTooltipWithContext(u,{heading:d.formatDatum(f,"tooltip",e,c,g,n),symbol:this.legendItemSymbol(),data:[{label:l,fallbackLabel:r,value:p.formatDatum(x,"tooltip",e,c,g,r)}]},{seriesId:e,datum:g,title:l,xKey:n,xName:o,yKey:r,yName:l,legendItemName:c,stackGroup:h,...m,...this.getModuleTooltipParams()})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,fillOpacity:s,strokeOpacity:a,lineDash:n,lineDashOffset:o,fillGradientDefaults:r,fillPatternDefaults:l,fillImageDefaults:c}=this.properties;return{marker:wr({fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:s,strokeOpacity:a,strokeWidth:i,lineDash:n,lineDashOffset:o},r,l,c)}}getLegendData(t){const{showInLegend:e}=this.properties;if(t!=="category")return[];const{id:i,ctx:{legendManager:s},visible:a}=this,{yKey:n,yName:o,legendItemName:r}=this.properties;return[{legendType:"category",id:i,itemId:n,seriesId:i,enabled:a&&s.getItemEnabled({seriesId:i,itemId:n}),label:{text:r??o??n},symbol:this.legendItemSymbol(),legendItemName:r,hideInLegend:!e}]}animateEmptyUpdateReady({datumSelection:t,labelSelection:e,annotationSelections:i}){const s=ex(tx(this.isVertical(),this.axes,"normal"));Ue(this.id,"nodes",this.ctx.animationManager,[t],s),le(this,"labels",this.ctx.animationManager,e),le(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(t){const{datumSelection:e,labelSelection:i,annotationSelections:s,contextData:a,previousContextData:n}=t;this.ctx.animationManager.stopByAnimationGroupId(this.id);const o=$w(this.id,e,this.getDatumId.bind(this),t.contextData,n,this.processedData),r=n==null?"fade":"normal",l=ex(tx(this.isVertical(),this.axes,r));Ue(this.id,"nodes",this.ctx.animationManager,[e],l,(c,h)=>this.getDatumId(h),o),(o?.changed||!Md(a.groupScale,n?.groupScale))&&(le(this,"labels",this.ctx.animationManager,i),le(this,"annotations",this.ctx.animationManager,...s))}getDatumId(t){return yn(t.xValue,t.valueIndex,t.phantom)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){const e=this.contextNodeData?.nodeData[t].clipBBox;return Ww(this,e)}},jg.className="BarSeries",jg.type="bar"}}),Kw,Yw,Zw=I({"packages/ag-charts-community/src/chart/series/cartesian/barSeriesModule.ts"(){"use strict";li(),bi(),aG(),d2(),Kw={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",moduleFactory:t=>new jg(t),stackable:!0,groupable:!0,defaultAxes:PL,themeTemplate:{series:{direction:"vertical",fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Tl,fillImageDefaults:Gc,fillOpacity:1,strokeWidth:{$isUserOption:["./stroke",2,0]},lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$if:[{$or:[{$eq:[{$path:"./placement"},"outside-start"]},{$eq:[{$path:"./placement"},"outside-end"]}]},{$ref:"textColor"},{$ref:"chartBackgroundColor"}]},placement:"inside-center"},shadow:{enabled:!1,color:Cl,xOffset:3,yOffset:3,blur:5},errorBar:{cap:{lengthRatio:.3}},highlight:Vc()}}},Yw={type:"series",name:"bar",chartType:"cartesian",options:Ng,create:t=>new jg(t)}}}),T0,Xw,xe,Mtt=I({"packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesProperties.ts"(){"use strict";Fn(),vt(),ta(),Vo(),Gy(),Wl(),za(),T0=class extends Yi{constructor(){super(...arguments),this.maxSize=30}},S([k,lt()],T0.prototype,"maxSize",2),S([k,ZI()],T0.prototype,"domain",2),Xw=class extends Li{constructor(){super(...arguments),this.placement="top"}},S([k],Xw.prototype,"placement",2),xe=class extends Vr{constructor(){super(...arguments),this.label=new Xw,this.tooltip=jl(),this.marker=new T0}},S([k],xe.prototype,"xKey",2),S([k],xe.prototype,"yKey",2),S([k],xe.prototype,"sizeKey",2),S([k],xe.prototype,"labelKey",2),S([k],xe.prototype,"xFilterKey",2),S([k],xe.prototype,"yFilterKey",2),S([k],xe.prototype,"sizeFilterKey",2),S([k],xe.prototype,"xName",2),S([k],xe.prototype,"yName",2),S([k],xe.prototype,"sizeName",2),S([k],xe.prototype,"labelName",2),S([k],xe.prototype,"title",2),S([ge("marker.shape")],xe.prototype,"shape",2),S([ge("marker.size")],xe.prototype,"size",2),S([ge("marker.maxSize")],xe.prototype,"maxSize",2),S([ge("marker.domain")],xe.prototype,"domain",2),S([ge("marker.fillGradientDefaults")],xe.prototype,"fillGradientDefaults",2),S([ge("marker.fillPatternDefaults")],xe.prototype,"fillPatternDefaults",2),S([ge("marker.fillImageDefaults")],xe.prototype,"fillImageDefaults",2),S([ge("marker.fill")],xe.prototype,"fill",2),S([ge("marker.fillOpacity")],xe.prototype,"fillOpacity",2),S([ge("marker.stroke")],xe.prototype,"stroke",2),S([ge("marker.strokeWidth")],xe.prototype,"strokeWidth",2),S([ge("marker.strokeOpacity")],xe.prototype,"strokeOpacity",2),S([ge("marker.lineDash")],xe.prototype,"lineDash",2),S([ge("marker.lineDashOffset")],xe.prototype,"lineDashOffset",2),S([ge("marker.itemStyler")],xe.prototype,"itemStyler",2),S([k],xe.prototype,"label",2),S([k],xe.prototype,"tooltip",2)}}),nG,sx,Dtt=I({"packages/ag-charts-community/src/chart/series/cartesian/bubbleSeries.ts"(){"use strict";xl(),Lg(),Oe(),Er(),Ou(),Pt(),ln(),jn(),Rr(),Go(),Gl(),Mtt(),za(),Qy(),nG=class extends v0{constructor(t,e,i,s){super(t,e,i,s),this.sizeKey=s.properties.sizeKey}},sx=class extends Hl{constructor(t){super({moduleCtx:t,propertyKeys:{...gh,label:["labelKey"],size:["sizeKey"]},propertyNames:{...fh,label:["labelName"],size:["sizeName"]},categoryKey:void 0,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:Vl,marker:Zy},usesPlacedLabels:!0,clipFocusBox:!1}),this.NodeEvent=nG,this.properties=new xe,this.sizeScale=new Ko}get pickModeAxis(){return"main-category"}async processData(t){if(this.data==null||!this.visible)return;const e=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:s,yScaleType:a}=this.getScaleInformation({xScale:e,yScale:i}),n=this.sizeScale.type,{xKey:o,yKey:r,sizeKey:l,xFilterKey:c,yFilterKey:h,sizeFilterKey:u,labelKey:d,marker:p}=this.properties,{dataModel:g,processedData:f}=await this.requestDataModel(t,this.data,{props:[Yt(o,s,{id:"xValue"}),Yt(r,a,{id:"yValue"}),...c!=null?[Yt(c,s,{id:"xFilterValue"})]:[],...h!=null?[Yt(h,a,{id:"yFilterValue"})]:[],...u!=null?[Yt(u,n,{id:"sizeFilterValue"})]:[],Yt(l,n,{id:"sizeValue"}),...d?[Yt(d,"band",{id:"labelValue"})]:[]]}),x=g.resolveProcessedDataIndexById(this,"sizeValue"),m=p.domain?[p.domain[0],p.domain[1]]:void 0;this.sizeScale.domain=m??f.domain.values[x]??[],this.animationState.transition("updateData")}xCoordinateRange(t,e,i){const{properties:s,sizeScale:a}=this,{size:n,sizeKey:o}=s,r=this.axes.x.scale.convert(t),l=o!=null?this.dataModel.resolveColumnById(this,"sizeValue",this.processedData):void 0,h=.5*(l!=null?a.convert(l[i]):n)*e;return[r-h,r+h]}yCoordinateRange(t,e,i){const{properties:s,sizeScale:a}=this,{size:n,sizeKey:o}=s,r=this.axes.y.scale.convert(t[0]),l=o!=null?this.dataModel.resolveColumnById(this,"sizeValue",this.processedData):void 0,h=.5*(l!=null?a.convert(l[i]):n)*e;return[r-h,r+h]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];const s={x:"xValue",y:"yValue"},a=s[t],n=e.resolveProcessedDataDefById(this,a),o=e.getDomain(this,a,"value",i);if(n?.def.type==="value"&&n?.def.valueType==="category")return o;const l=s[t==="x"?"y":"x"],c=this.domainForClippedRange(t,[a],l);return _a(El(c))}getSeriesRange(t,e){return this.domainForVisibleRange("y",["yValue"],"xValue",e)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["yValue"],t,e,i)}createNodeData(){const{axes:t,dataModel:e,processedData:i,sizeScale:s,visible:a}=this,{xKey:n,yKey:o,sizeKey:r,xFilterKey:l,yFilterKey:c,sizeFilterKey:h,labelKey:u,xName:d,yName:p,sizeName:g,labelName:f,label:x,marker:m}=this.properties,{placement:b}=x,v=wi.anchor(m.shape),M=t.x,D=t.y;if(!(e&&i&&a&&M&&D))return;const L=e.resolveColumnById(this,"xValue",i),C=e.resolveColumnById(this,"yValue",i),A=r!=null?e.resolveColumnById(this,"sizeValue",i):void 0,T=u!=null?e.resolveColumnById(this,"labelValue",i):void 0,N=l!=null?e.resolveColumnById(this,"xFilterValue",i):void 0,O=c!=null?e.resolveColumnById(this,"yFilterValue",i):void 0,E=h!=null?e.resolveColumnById(this,"sizeFilterValue",i):void 0;let z;u?z=[]:r?z=e.getDomain(this,"sizeValue","value",i):z=[];const B=M.scale,F=D.scale,V=(B.bandwidth??0)/2,G=(F.bandwidth??0)/2,H=[];s.range=[m.size,m.maxSize];const $=Dr.getMeasurer({font:x});return i.dataSources.get(this.id)?.forEach((W,j)=>{const U=L[j],Z=C[j],X=A?.[j],q=B.convert(U)+V,tt=F.convert(Z)+G;let J;N!=null&&O!=null&&(J=N[j]===U&&O[j]===Z,E!=null&&J&&(J=E[j]===X));const at=T!=null?T[j]:X,et=this.getLabelText(at,W,u??r,u!=null?"label":"size",z,x,{value:at,datum:W,xKey:n,yKey:o,sizeKey:r,labelKey:u,xName:d,yName:p,sizeName:g,labelName:f}),it=$.measureText(String(et)),ct=X!=null?s.convert(X):m.size;H.push({series:this,itemId:o,yKey:o,xKey:n,datum:W,datumIndex:j,xValue:U,yValue:Z,sizeValue:X,point:{x:q,y:tt,size:ct},midPoint:{x:q,y:tt},label:{text:et,...it},anchor:v,placement:b,selected:J})}),{itemId:o,nodeData:H,labelData:H,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}updateMarkerSelection(t){const{nodeData:e,markerSelection:i}=t;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());const s=this.properties.marker.enabled?e:[];return i.update(s,void 0,a=>yn([a.xValue,a.yValue,a.sizeValue,a.label.text]))}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yKey:a,sizeKey:n,labelKey:o,marker:r}=this.properties,l=r.getStyle();this.sizeScale.range=[r.size,r.maxSize];const c=this.getShapeFillBBox();e.each((h,u)=>{const d=this.getHighlightStyle(i,u.datumIndex),p=se(d,l);this.updateMarkerStyle(r,h,u.datum,u.point,{xKey:s,yKey:a,sizeKey:n,labelKey:o},i,p,c,{selected:u.selected})}),i||this.properties.marker.markClean()}updatePlacedLabelData(t){this.labelSelection.update(t.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})),e=>{e.pointerEvents=1}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{label:e}=this.properties;t.labelSelection.each((i,s)=>{i.text=s.label.text,i.fill=e.color,i.x=s.point?.x??0,i.y=s.point?.y??0,i.fontStyle=e.fontStyle,i.fontWeight=e.fontWeight,i.fontSize=e.fontSize,i.fontFamily=e.fontFamily,i.textAlign="left",i.textBaseline="top",i.fillOpacity=this.getHighlightStyle(!1,s.datumIndex).opacity??1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n,ctx:o}=this,{formatManager:r}=o,{xKey:l,xName:c,yKey:h,yName:u,sizeKey:d,sizeName:p,labelKey:g,labelName:f,title:x,tooltip:m,marker:b,legendItemName:v}=n,M=a.x,D=a.y;if(!i||!s||!M||!D)return;const L=s.dataSources.get(this.id)?.[t],C=i.resolveColumnById(this,"xValue",s)[t],A=i.resolveColumnById(this,"yValue",s)[t],T=this.contextNodeData?.nodeData[t];if(C==null||T==null)return;const N=[];if(this.isLabelEnabled()&&g!=null){const z=i.resolveColumnById(this,"labelValue",s)[t],B=r.format(this.callWithContext.bind(this),{type:"category",value:z,datum:L,seriesId:e,legendItemName:v,key:g,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});N.push({label:f,fallbackLabel:g,value:B??Cc(z)})}if(N.push({label:c,fallbackLabel:l,value:M.formatDatum(C,"tooltip",e,v,L,l)},{label:u,fallbackLabel:h,value:D.formatDatum(A,"tooltip",e,v,L,h)}),d!=null){const z=i.resolveColumnById(this,"sizeValue",s)[t],B=i.getDomain(this,"sizeValue","value",s),F=r.format(this.callWithContext.bind(this),{type:"number",value:z,datum:L,seriesId:e,legendItemName:v,key:d,source:"tooltip",property:"size",boundSeries:this.getFormatterContext("size"),domain:B,fractionDigits:void 0});N.push({label:p,fallbackLabel:d,value:F??Cc(z)})}const O=b.getStyle(),E=this.getMarkerStyle(b,L,{xKey:l,yKey:h,sizeKey:d,labelKey:g,highlighted:!0},!1,void 0,O);return this.formatTooltipWithContext(m,{title:x,symbol:this.legendItemSymbol(),data:N},{seriesId:e,datum:L,title:h,xKey:l,xName:c,yKey:h,yName:u,sizeKey:d,sizeName:p,labelKey:g,labelName:f,...E,...this.getModuleTooltipParams()})}legendItemSymbol(){return{marker:this.getMarkerStyle(this.properties.marker)}}getLegendData(){const{id:t,ctx:{legendManager:e},visible:i}=this,{yKey:s,yName:a,title:n}=this.properties;return[{legendType:"category",id:t,itemId:s,seriesId:t,enabled:i&&e.getItemEnabled({seriesId:t,itemId:s}),label:{text:n??a??s},symbol:this.legendItemSymbol()}]}animateEmptyUpdateReady({markerSelection:t,labelSelection:e}){Nw(this,this.ctx.animationManager,t),le(this,"labels",this.ctx.animationManager,e)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Lt}getFormattedMarkerStyle(t){const{xKey:e,yKey:i,sizeKey:s,labelKey:a,marker:n}=this.properties;return this.getMarkerStyle(n,t,{xKey:e,yKey:i,sizeKey:s,labelKey:a},!1,t.point.size)}computeFocusBounds(t){return qy(this,t)}},sx.className="BubbleSeries",sx.type="bubble"}}),oG,qw,Qw=I({"packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesModule.ts"(){"use strict";bi(),Dtt(),bV(),oG={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",moduleFactory:t=>new sx(t),defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,maxSize:30,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Tl,fillImageDefaults:Gc,fillOpacity:.8,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},tooltip:{range:{$path:["/tooltip/range","nearest"]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","node"]}}},highlight:Vc()}}},qw={type:"series",name:"bubble",chartType:"cartesian",options:xV,create:t=>new sx(t)}}}),Qe,ktt=I({"packages/ag-charts-community/src/chart/series/cartesian/histogramSeriesProperties.ts"(){"use strict";Gg(),vt(),Vo(),kl(),Wl(),za(),Qe=class extends Vr{constructor(){super(...arguments),this.fillGradientDefaults=new pn,this.fillPatternDefaults=new _e,this.fillImageDefaults=new ga,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new so,this.label=new Li,this.tooltip=jl()}},S([k],Qe.prototype,"xKey",2),S([k],Qe.prototype,"yKey",2),S([k],Qe.prototype,"xName",2),S([k],Qe.prototype,"yName",2),S([k],Qe.prototype,"fill",2),S([k],Qe.prototype,"fillGradientDefaults",2),S([k],Qe.prototype,"fillPatternDefaults",2),S([k],Qe.prototype,"fillImageDefaults",2),S([k],Qe.prototype,"fillOpacity",2),S([k],Qe.prototype,"stroke",2),S([k],Qe.prototype,"strokeWidth",2),S([k],Qe.prototype,"strokeOpacity",2),S([k],Qe.prototype,"lineDash",2),S([k],Qe.prototype,"lineDashOffset",2),S([k],Qe.prototype,"cornerRadius",2),S([k],Qe.prototype,"areaPlot",2),S([k],Qe.prototype,"bins",2),S([k],Qe.prototype,"aggregation",2),S([k],Qe.prototype,"binCount",2),S([k],Qe.prototype,"shadow",2),S([k],Qe.prototype,"label",2),S([k],Qe.prototype,"tooltip",2)}}),Jw,ax,Itt=I({"packages/ag-charts-community/src/chart/series/cartesian/histogramSeries.ts"(){"use strict";R(),zs(),Oe(),Fy(),Gn(),Rc(),KL(),jn(),Rr(),Gl(),Al(),Hw(),za(),Uw(),ktt(),Vw(),Jw=10,ax=class extends Hl{constructor(t){super({moduleCtx:t,propertyKeys:gh,propertyNames:fh,categoryKey:void 0,pickModes:[1,0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:ix,label:Vl}}),this.properties=new Qe,this.calculatedBins=[]}deriveBins(t){const e=jm(t[0],t[1],Jw).ticks,i=Wm(t[0],t[1],Jw),[s]=e,a=n=>[n,n+i];return[[s-i,s],...e.map(a)]}calculateNiceBins(t,e){const i=Math.floor(t[0]),s=t[1],a=e||1,{start:n,binSize:o}=this.calculateNiceStart(i,s,a);return this.getBins(n,s,o,a)}getBins(t,e,i,s){const a=[],n=this.calculatePrecision(i);for(let o=0;o<s;o++){const r=Math.round((t+o*i)*n)/n;let l=Math.round((t+(o+1)*i)*n)/n;o===s-1&&(l=Math.max(l,e)),a[o]=[r,l]}return a}calculatePrecision(t){let e=10;if(isFinite(t)&&t>0)for(;t<1;)e*=10,t*=10;return e}calculateNiceStart(t,e,i){const s=Math.abs(e-t)/i,a=Math.floor(Math.log10(s)),n=Math.pow(10,a);return{start:Math.floor(t/n)*n,binSize:s}}async processData(t){this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));const{xKey:e,yKey:i,areaPlot:s,aggregation:a}=this.properties,n=this.axes.x?.scale,o=this.axes.y?.scale,{xScaleType:r,yScaleType:l}=this.getScaleInformation({yScale:o,xScale:n}),c=[$o(e,r),QL];if(i){let u=$L("groupAgg");a==="count"||(a==="sum"?u=EF("groupAgg"):a==="mean"&&(u=RF("groupAgg"))),s&&(u=UL("groupAgg",u)),c.push(Yt(i,l,{invalidValue:void 0}),u)}else{c.push(jF("count"));let u=$L("groupAgg");s&&(u=UL("groupAgg",u)),c.push(u)}const h=u=>{const d=_a(u.domain.keys[0]);if(d.length===0)return u.domain.groups=[],()=>[];const p=uI(this.properties.binCount)?this.calculateNiceBins(d,this.properties.binCount):this.properties.bins??this.deriveBins(d),g=p.length;return this.calculatedBins=[...p],f=>{let x=f[0];if(Zf(x)&&(x=x.getTime()),!uI(x))return[];for(let m=0;m<g;m++){const b=p[m];if(x>=b[0]&&x<b[1]||m===g-1&&x<=b[1])return b}return[]}};!this.ctx.animationManager.isSkipped()&&this.processedData&&c.push(Ag(this.id,this.processedData,!1)),await this.requestDataModel(t,this.data,{props:c,groupByFn:h}),this.animationState.transition("updateData")}xCoordinateRange(){return[NaN,NaN]}yCoordinateRange(){return[NaN,NaN]}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!e||!i||!this.calculatedBins.length)return[];const s=i.getDomain(this,"groupAgg","aggregate",e),a=this.calculatedBins?.[0][0],n=this.calculatedBins?.[(this.calculatedBins?.length??0)-1][1];return _a(t==="x"?[a,n]:s)}getSeriesRange(t,[e,i]){const{dataModel:s,processedData:a}=this;if(!s||a?.type!=="grouped")return[NaN,NaN];const n=this.axes.x.scale,o=0;let r=-1/0;return a.groups.forEach(({keys:l,aggregation:c})=>{const[[h,u]=[0,0]]=c,[d,p]=l,[g,f]=ls([n.convert(d),n.convert(p)]);if(f>=e&&g<=i){const x=h+u;r=Math.max(r,x)}}),o>r?[NaN,NaN]:[o,r]}frequency(t){return t.datumIndices.reduce((e,i)=>e+i.length,0)}createNodeData(){const{id:t,axes:e,processedData:i,dataModel:s}=this,a=e.x,n=e.y;if(!a||!n||!s)return;const{scale:o}=a,{scale:r}=n,{xKey:l,yKey:c,xName:h,yName:u,legendItemName:d}=this.properties,p=this.properties.label.formatter,g=[],f={itemId:this.properties.yKey??this.id,nodeData:g,labelData:g,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};return!this.visible||i==null||i.type!=="grouped"||(i.groups.forEach((x,m)=>{const{keys:b,aggregation:v}=x,[[M,D]=[0,0]]=v,L=this.frequency(x),C=b,[A,T]=C,N=[...s.forEachDatum(this,i,x)],O=o.convert(A),E=o.convert(T),z=M+D,B=r.convert(0),F=r.convert(z),V=Math.abs(E-O),G=Math.abs(F-B),H=Math.min(O,E),$=Math.min(B,F);let W;z!==0&&(W={x:H+V/2,y:$+G/2,text:this.cachedDatumCallback(yn(m,"label"),()=>p?.({value:z,datum:N,seriesId:t,xKey:l,yKey:c,xName:h,yName:u}))??n.formatDatum(z,"series-label",t,d,N,c)});const j={x:H+V/2,y:$+G/2},U=n.isReversed();g.push({series:this,datumIndex:m,datum:N,aggregatedValue:z,frequency:L,domain:C,yKey:c,xKey:l,x:H,y:$,xValue:O,yValue:F,width:V,height:G,midPoint:j,topLeftCornerRadius:!U,topRightCornerRadius:!U,bottomRightCornerRadius:U,bottomLeftCornerRadius:U,label:W,crisp:!0})}),g.sort((x,m)=>x.x-m.x)),f}nodeFactory(){return new Gs}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t;return i.update(e,void 0,s=>s.domain.join("_"))}getItemBaseStyle(t,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return wr({fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,cornerRadius:s?.cornerRadius??i.cornerRadius,opacity:s?.opacity??1},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults)}updateDatumNodes(t){const{isHighlight:e}=t,{shadow:i}=this.properties,s=this.getShapeFillBBox();t.datumSelection.each((a,n)=>{const o=this.getItemBaseStyle(e,n),{cornerRadius:r}=o,{topLeftCornerRadius:l,topRightCornerRadius:c,bottomRightCornerRadius:h,bottomLeftCornerRadius:u}=n;Il(a,o,void 0,s),a.topLeftCornerRadius=l?r:0,a.topRightCornerRadius=c?r:0,a.bottomRightCornerRadius=h?r:0,a.bottomLeftCornerRadius=u?r:0,a.crisp=n.crisp,a.fillShadow=i,a.visible=n.height>0})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e,s=>{s.pointerEvents=1,s.textAlign="center",s.textBaseline="middle"})}updateLabelNodes(t){const{fontStyle:e,fontWeight:i,fontFamily:s,fontSize:a,color:n}=this.properties.label,o=this.isLabelEnabled();t.labelSelection.each((r,l)=>{o&&l?.label?(r.text=l.label.text,r.x=l.label.x,r.y=l.label.y,r.fontStyle=e,r.fontWeight=i,r.fontFamily=s,r.fontSize=a,r.fill=n,r.visible=!0,r.fillOpacity=this.getHighlightStyle(!1,l.datumIndex).opacity??1):r.visible=!1})}initQuadTree(t){const{value:e}=this.contentGroup.children().next();e instanceof Lt&&zw(t,e.children())}pickNodeClosestDatum(t){return Fw(this,t)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n,ctx:{localeManager:o}}=this,{xKey:r,xName:l,yKey:c,yName:h,tooltip:u,legendItemName:d}=n,p=a.x,g=a.y;if(!i||s?.type!=="grouped"||!p||!g)return;const f=s.groups[t],{aggregation:x,keys:m}=f,[[b,v]=[0,0]]=x,M=this.frequency(f),D=m,[L,C]=D,A=b+v,T={data:[...i.forEachDatum(this,s,f)],aggregatedValue:A,frequency:M,domain:D},N=[{label:l,fallbackLabel:r,value:`${p.formatDatum(L,"tooltip",e,d,T,r)} - ${p.formatDatum(C,"tooltip",e,d,T,r)}`},{label:o.t("seriesHistogramTooltipFrequency"),value:g.formatDatum(M,"tooltip",e,d,T,c)}];if(c!=null){let O;switch(n.aggregation){case"sum":O=o.t("seriesHistogramTooltipSum",{yName:h??c});break;case"mean":O=o.t("seriesHistogramTooltipMean",{yName:h??c});break;case"count":O=o.t("seriesHistogramTooltipCount",{yName:h??c});break}N.push({label:O,value:g.formatDatum(A,"tooltip",e,d,T,c)})}return this.formatTooltipWithContext(u,{symbol:this.legendItemSymbol(),data:N},{seriesId:e,datum:T,title:h,xKey:r,xName:l,yKey:c,yName:h,xRange:[L,C],frequency:M,...this.getItemBaseStyle(!1)})}legendItemSymbol(){const{fill:t,fillOpacity:e,stroke:i,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:o,fillGradientDefaults:r,fillPatternDefaults:l,fillImageDefaults:c}=this.properties;return{marker:wr({fill:t??"rgba(0, 0, 0, 0)",stroke:i??"rgba(0, 0, 0, 0)",fillOpacity:e,strokeOpacity:a,strokeWidth:s,lineDash:n,lineDashOffset:o},r,l,c)}}getLegendData(t){if(t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{xKey:a,yName:n,showInLegend:o}=this.properties;return[{legendType:"category",id:e,itemId:a,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:a}),label:{text:n??a??"Frequency"},symbol:this.legendItemSymbol(),hideInLegend:!o}]}animateEmptyUpdateReady({datumSelection:t,labelSelection:e}){const i=ex(tx(!0,this.axes,"normal"));Ue(this.id,"datums",this.ctx.animationManager,[t],i),le(this,"labels",this.ctx.animationManager,e)}animateWaitingUpdateReady(t){const e=ex(tx(!0,this.axes,"normal")),i=$w(this.id,t.datumSelection,s=>yn(s.domain),t.contextData,t.previousContextData,this.processedData);Ue(this.id,"datums",this.ctx.animationManager,[t.datumSelection],e,(s,a)=>yn(a.domain),i),i?.changed&&le(this,"labels",this.ctx.animationManager,t.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){return Ww(this,this.contextNodeData?.nodeData[t])}},ax.className="HistogramSeries",ax.type="histogram"}}),rG,tT,eT=I({"packages/ag-charts-community/src/chart/series/cartesian/histogramSeriesModule.ts"(){"use strict";li(),bi(),Itt(),SV(),rG={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",moduleFactory:t=>new ax(t),defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Tl,fillImageDefaults:Gc,strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"}},shadow:{enabled:!1,color:Cl,xOffset:3,yOffset:3,blur:5},highlight:Vc()}}},tT={type:"series",name:"histogram",chartType:"cartesian",enterprise:!0,options:vV,create:t=>new ax(t)}}}),Oi,Att=I({"packages/ag-charts-community/src/chart/series/cartesian/lineSeriesProperties.ts"(){"use strict";vt(),Vo(),Gy(),Wl(),za(),Sw(),Oi=class extends Vr{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new Sd,this.marker=new Yi,this.label=new Li,this.tooltip=jl(),this.connectMissingData=!1,this.sparklineMode=!1}},S([k],Oi.prototype,"xKey",2),S([k],Oi.prototype,"yKey",2),S([k],Oi.prototype,"xName",2),S([k],Oi.prototype,"yName",2),S([k],Oi.prototype,"yFilterKey",2),S([k],Oi.prototype,"stackGroup",2),S([k],Oi.prototype,"normalizedTo",2),S([k],Oi.prototype,"title",2),S([k],Oi.prototype,"stroke",2),S([k],Oi.prototype,"strokeWidth",2),S([k],Oi.prototype,"strokeOpacity",2),S([k],Oi.prototype,"lineDash",2),S([k],Oi.prototype,"lineDashOffset",2),S([k],Oi.prototype,"interpolation",2),S([k],Oi.prototype,"marker",2),S([k],Oi.prototype,"label",2),S([k],Oi.prototype,"tooltip",2),S([k],Oi.prototype,"connectMissingData",2),S([k],Oi.prototype,"sparklineMode",2)}}),lG,Wg,cG=I({"packages/ag-charts-community/src/chart/series/cartesian/lineSeries.ts"(){"use strict";R(),xl(),zs(),yw(),Hu(),Oe(),Er(),Pt(),jn(),Rr(),Gl(),Al(),Bu(),za(),Att(),D0(),Qy(),Ew(),lG=.25,Wg=class extends Hl{constructor(t){super({moduleCtx:t,propertyKeys:gh,propertyNames:fh,categoryKey:"xValue",hasMarkers:!0,pickModes:[2,1,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:_w({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:Vl,marker:(e,i)=>({...Zy(e),...Xy(e,i)})},clipFocusBox:!1}),this.properties=new Oi,this.dataAggregationFilters=void 0}get pickModeAxis(){return this.properties.sparklineMode?"main":"main-category"}async processData(t){if(this.data==null)return;const{data:e,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:a=0}={}}=this,{xKey:n,yKey:o,yFilterKey:r,connectMissingData:l,normalizedTo:c}=this.properties,h=!this.ctx.animationManager.isSkipped(),u=this.axes.x?.scale,d=this.axes.y?.scale,{isContinuousX:p,xScaleType:g,yScaleType:f}=this.getScaleInformation({xScale:u,yScale:d}),x=a>=1||c!=null,m={invalidValue:null};l&&x&&(m.invalidValue=0),x&&!i&&(m.forceValue=0);const b=[];if((!p||x)&&b.push($o(n,g,{id:"xKey"})),b.push(Yt(n,g,{id:"xValue"}),Yt(o,f,{id:"yValueRaw",...m,invalidValue:void 0})),r!=null&&b.push(Yt(r,f,{id:"yFilterRaw"})),x){const D=[`line-stack-${s}-yValues`,`line-stack-${s}-yValues-trailing`,`line-stack-${s}-yValues-marker`];b.push(...ih(o,"window","current",{id:"yValueEnd",...m,groupId:D[0]},f),...ih(o,"window-trailing","current",{id:"yValueStart",...m,groupId:D[1]},f),...ih(o,"normal","current",{id:"yValueCumulative",...m,groupId:D[2]},f)),au(c)&&b.push(US([D[0],D[1],D[2]],c))}h&&(b.push(Ig(p?["xValue"]:void 0)),this.processedData&&b.push(Ag(this.id,this.processedData)));const{dataModel:v,processedData:M}=await this.requestDataModel(t,e,{props:b,groupByKeys:x,groupByData:!x});this.dataAggregationFilters=this.aggregateData(v,M),this.animationState.transition("updateData")}xCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes.x.scale.convert(t),a=i.enabled?.5*i.size*e:0;return[s-a,s+a]}yCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes.y.scale.convert(t[0]),a=i.enabled?.5*i.size*e:0;return[s-a,s+a]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!e||!i)return[];if(t==="x"){const n=e.resolveProcessedDataDefById(this,"xValue"),o=e.getDomain(this,"xValue","value",i);return n?.def.type==="value"&&n.def.valueType==="category"?o:_a(El(o))}const s=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw",a=this.domainForClippedRange("y",[s],"xValue");return _a(a)}getSeriesRange(t,e){const i=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw";return this.domainForVisibleRange("y",[i],"xValue",e)}getVisibleItems(t,e,i){const s=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw";return this.countVisibleItems("xValue",[s],t,e,i)}aggregateData(t,e){}createNodeData(){const{dataModel:t,processedData:e,axes:i,dataAggregationFilters:s}=this,a=i.x,n=i.y;if(!t||!e||!a||!n)return;const{xKey:o,yKey:r,yFilterKey:l,xName:c,yName:h,marker:u,label:d,connectMissingData:p,interpolation:g,legendItemName:f}=this.properties,x=this.dataModel?.hasColumnById(this,"yValueEnd"),m=a.scale,b=n.scale,v=(m.bandwidth??0)/2,M=(b.bandwidth??0)/2,D=u.enabled?u.size:0,L=e.dataSources.get(this.id)??[],C=t.resolveColumnById(this,"xValue",e),A=t.resolveColumnById(this,"yValueRaw",e),T=x?t.resolveColumnById(this,"yValueEnd",e):void 0,N=x?t.resolveColumnById(this,"yValueCumulative",e):A,O=l!=null?t.resolveColumnById(this,"yFilterRaw",e):void 0,E=this.getSeriesDomain("y"),z={lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},B=[];let F;const V=J=>{const at=L[J],et=C[J],it=A[J],ct=T?.[J],ht=O?.[J],xt=m.convert(et)+v,kt=b.convert(N[J])+M;if(!Number.isFinite(xt))return;if(it!=null){const St=d.enabled?this.getLabelText(it,at,r,"y",E,d,{value:it,datum:at,xKey:o,yKey:r,xName:c,yName:h,legendItemName:f}):void 0;B.push({series:this,datum:at,datumIndex:J,yKey:r,xKey:o,point:{x:xt,y:kt,size:D},midPoint:{x:xt,y:kt},cumulativeValue:ct,yValue:it,xValue:et,capDefaults:z,labelText:St,selected:ht})}if(F==null)return;const Dt=F[F.length-1];if(it!=null){const St={point:{x:xt,y:kt},xDatum:et,yDatum:it};Array.isArray(Dt)?Dt.push(St):Dt!=null?(Dt.skip+=1,F.push([St])):F.push([St])}else p||(Array.isArray(Dt)||Dt==null?F.push({skip:0}):Dt.skip+=1)},[G,H]=m.range,$=H-G,j=s?.find(J=>J.maxRange>$)?.indices;let[U,Z]=this.visibleRange("xValue",a.range,j);U=Math.max(U-1,0),Z=Math.min(Z+1,j?.length??C.length),e.input.count<1e3&&(U=0,Z=e.input.count),j==null&&(F=[]);for(let J=U;J<Z;J+=1)V(j?.[J]??J);const X=F?.flatMap(J=>Array.isArray(J)?S0(J,g):[]),q=X!=null?{itemId:r,spans:X}:void 0,tt=O?.some((J,at)=>J===A[at])??!1;return{itemId:r,nodeData:B,labelData:B,strokeData:q,scales:this.calculateScaling(),visible:this.visible,crossFiltering:tt}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{paths:[e],visible:i,animationEnabled:s}=t,a=this.contextNodeData?.crossFiltering===!0,{strokeWidth:n,stroke:o,strokeOpacity:r,lineDash:l,lineDashOffset:c,opacity:h}=se(this.getHighlightStyle(),this.properties);e.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:h,stroke:o,strokeWidth:n,strokeOpacity:r*(a?lG:1),lineDash:l,lineDashOffset:c}),s||(e.visible=i),A0(this,e)}getMarkerItemBaseStyle(t){const{properties:e}=this,{marker:i}=e,s=this.getHighlightStyle(t);return wr({size:i.size,shape:i.shape,fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??i.strokeWidth,strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,opacity:s?.opacity??1},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults)}getMarkerItemStyleOverrides(t,e,i,s,a,n){const{id:o,properties:r}=this,{xKey:l,yKey:c,marker:h}=r,{itemStyler:u}=h;if(u!=null)return this.cachedDatumCallback(yn(t,n?"highlight":"node"),()=>{const d=this.getSeriesDomain("x"),p=this.getSeriesDomain("y");return this.callWithContext(u,{seriesId:o,...Lc(i,s,l,c,d,p),datum:e,highlighted:n,...a})})}updateMarkerSelection(t){let{nodeData:e}=t;const{markerSelection:i}=t;return e=this.properties.marker.enabled||this.contextNodeData?.crossFiltering===!0?e:[],this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(e,void 0,a=>yn(a.xValue))}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yKey:a,stroke:n,strokeWidth:o,strokeOpacity:r,marker:l}=this.properties,c=this.getSeriesDomain("x"),h=this.getSeriesDomain("y"),u=this.ctx.animationManager.isSkipped(),d=this.getShapeFillBBox(),p=l.getStyle();e.each((g,f)=>{const{xValue:x,yValue:m}=f,b=this.getHighlightStyle(i,f.datumIndex),v=se(b,p,{stroke:n,strokeWidth:o,strokeOpacity:r});this.updateMarkerStyle(l,g,f.datum,f.point,Lc(x,m,s,a,c,h),i,v,d,{applyTranslation:u,selected:f.selected})}),i||l.markClean()}updateLabelSelection(t){return t.labelSelection.update(this.isLabelEnabled()?t.labelData:[])}updateLabelNodes(t){const{enabled:e,fontStyle:i,fontWeight:s,fontSize:a,fontFamily:n,color:o}=this.properties.label;t.labelSelection.each((r,l)=>{e&&l?.labelText?(r.fontStyle=i,r.fontWeight=s,r.fontSize=a,r.fontFamily=n,r.textAlign="center",r.textBaseline="bottom",r.text=l.labelText,r.x=l.point.x,r.y=l.point.y-10,r.fill=o,r.visible=!0,r.fillOpacity=this.getHighlightStyle(!1,l.datumIndex).opacity??1):r.visible=!1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n}=this,{xKey:o,xName:r,yKey:l,yName:c,tooltip:h,legendItemName:u}=n,d=a.x,p=a.y;if(!i||!s||!d||!p)return;const g=s.dataSources.get(this.id)?.[t],f=i.resolveColumnById(this,"xValue",s)[t],x=i.resolveColumnById(this,"yValueRaw",s)[t];if(f==null)return;const m=this.getMarkerItemBaseStyle(!1);return Object.assign(m,this.getMarkerItemStyleOverrides(String(t),g,f,x,m,!1)),this.formatTooltipWithContext(h,{heading:d.formatDatum(f,"tooltip",e,u,g,o),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:p.formatDatum(x,"tooltip",e,u,g,l)}]},{seriesId:e,datum:g,title:c,xKey:o,xName:r,yKey:l,yName:c,...m,...this.getModuleTooltipParams()})}legendItemSymbol(){const t="rgba(0, 0, 0, 0)",{stroke:e,strokeOpacity:i,strokeWidth:s,lineDash:a,marker:n}=this.properties;return{marker:{...this.getMarkerStyle(n,void 0,void 0,!1,void 0,{fill:n.fill??t,stroke:n.stroke??e??t}),enabled:n.enabled},line:{stroke:e??t,strokeOpacity:i,strokeWidth:s,lineDash:a}}}getLegendData(t){if(t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{yKey:a,yName:n,title:o,legendItemName:r,showInLegend:l}=this.properties;return[{legendType:"category",id:e,itemId:a,legendItemName:r,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:a}),label:{text:r??o??n??a},symbol:this.legendItemSymbol(),hideInLegend:!l}]}updatePaths(t){this.updateLinePaths(t.paths,t.contextData)}plotNodeDataPoints(t,e){if(e.length===0)return;const i=e[0].point;t.moveTo(i.x,i.y);for(let s=1;s<e.length;s+=1){const{x:a,y:n}=e[s].point;t.lineTo(a,n)}}updateLinePaths(t,e){const i=e.strokeData?.spans,[s]=t;s.path.clear(),i!=null?Lw(s,i):this.plotNodeDataPoints(s.path,e.nodeData),s.markDirty("LineSeries")}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,annotationSelections:s,contextData:a,paths:n}=t,{animationManager:o}=this.ctx;this.updateLinePaths(n,a),Pw(this,o,...n),cs([e],Xy),Ow(this,o,e),le(this,"labels",o,i),le(this,"annotations",o,...s)}animateReadyResize(t){const{contextData:e,paths:i}=t;this.updateLinePaths(i,e),super.animateReadyResize(t)}animateWaitingUpdateReady(t){const{animationManager:e}=this.ctx,{markerSelection:i,labelSelection:s,annotationSelections:a,contextData:n,paths:o,previousContextData:r}=t,[l]=o;if(n.visible===!1&&r?.visible===!1)return;this.resetMarkerAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateLinePaths(o,n)},h=()=>{e.skipCurrentBatch(),c()};if(n==null||r==null){c(),Yy(this,e,"added",i),I0(this,"path_properties",e,"add",l),le(this,"labels",e,s),le(this,"annotations",e,...a);return}if(n.crossFiltering!==r.crossFiltering){h();return}const u=F4(n,r,this.processedData?.reduced?.diff?.[this.id]);if(u===void 0){h();return}else if(u.status==="no-op")return;Ue(this.id,"path_properties",e,[l],u.stroke.pathProperties),u.status==="added"?this.updateLinePaths(o,n):u.status==="removed"?this.updateLinePaths(o,r):y0(this.id,"path_update",e,[l],u.stroke.path),u.hasMotion&&(Yy(this,e,void 0,i),le(this,"labels",e,s),le(this,"annotations",e,...a))}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new Lt}getFormattedMarkerStyle(t){const{xKey:e,yKey:i}=this.properties,{xValue:s,yValue:a}=t,n=this.getSeriesDomain("x"),o=this.getSeriesDomain("y");return this.getMarkerStyle(this.properties.marker,t.datum,Lc(s,a,e,i,n,o),!0)}computeFocusBounds(t){return qy(this,t)}},Wg.className="LineSeries",Wg.type="line"}}),iT,sT,aT=I({"packages/ag-charts-community/src/chart/series/cartesian/lineSeriesModule.ts"(){"use strict";bi(),cG(),m2(),iT={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",moduleFactory:t=>new Wg(t),stackable:!0,defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{stroke:cy,strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,interpolation:{type:"linear"},marker:{shape:"circle",size:7,strokeWidth:{$isUserOption:["./stroke",1,0]},fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Tl,fillImageDefaults:Gc},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},errorBar:{cap:{lengthRatio:1}},tooltip:{range:{$path:["/tooltip/range","nearest"]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","node"]}}},highlight:Vc()}}},sT={type:"series",name:"line",chartType:"cartesian",options:Cy,create:t=>new Wg(t)}}}),nT,Ee,Ctt=I({"packages/ag-charts-community/src/chart/series/cartesian/scatterSeriesProperties.ts"(){"use strict";vt(),ta(),Vo(),Gy(),Wl(),za(),nT=class extends Li{constructor(){super(...arguments),this.placement="top"}},S([k],nT.prototype,"placement",2),Ee=class extends Vr{constructor(){super(...arguments),this.label=new nT,this.tooltip=jl(),this.marker=new Yi}},S([k],Ee.prototype,"xKey",2),S([k],Ee.prototype,"yKey",2),S([k],Ee.prototype,"labelKey",2),S([k],Ee.prototype,"xFilterKey",2),S([k],Ee.prototype,"yFilterKey",2),S([k],Ee.prototype,"xName",2),S([k],Ee.prototype,"yName",2),S([k],Ee.prototype,"labelName",2),S([k],Ee.prototype,"title",2),S([ge("marker.shape")],Ee.prototype,"shape",2),S([ge("marker.size")],Ee.prototype,"size",2),S([ge("marker.fill")],Ee.prototype,"fill",2),S([ge("marker.fillGradientDefaults")],Ee.prototype,"fillGradientDefaults",2),S([ge("marker.fillPatternDefaults")],Ee.prototype,"fillPatternDefaults",2),S([ge("marker.fillImageDefaults")],Ee.prototype,"fillImageDefaults",2),S([ge("marker.fillOpacity")],Ee.prototype,"fillOpacity",2),S([ge("marker.stroke")],Ee.prototype,"stroke",2),S([ge("marker.strokeWidth")],Ee.prototype,"strokeWidth",2),S([ge("marker.strokeOpacity")],Ee.prototype,"strokeOpacity",2),S([ge("marker.lineDash")],Ee.prototype,"lineDash",2),S([ge("marker.lineDashOffset")],Ee.prototype,"lineDashOffset",2),S([ge("marker.itemStyler")],Ee.prototype,"itemStyler",2),S([k],Ee.prototype,"label",2),S([k],Ee.prototype,"tooltip",2)}}),nx,Ltt=I({"packages/ag-charts-community/src/chart/series/cartesian/scatterSeries.ts"(){"use strict";xl(),Oe(),Er(),Ou(),Pt(),ln(),jn(),Rr(),Go(),Gl(),za(),Qy(),Ctt(),nx=class extends Hl{constructor(t){super({moduleCtx:t,propertyKeys:{...gh,label:["labelKey"]},propertyNames:{...fh,label:["labelName"]},categoryKey:void 0,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:Zy,label:Vl},usesPlacedLabels:!0,clipFocusBox:!1}),this.properties=new Ee}get pickModeAxis(){return"main-category"}async processData(t){if(this.data==null||!this.visible)return;const e=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:s,yScaleType:a}=this.getScaleInformation({xScale:e,yScale:i}),{xKey:n,yKey:o,xFilterKey:r,yFilterKey:l,labelKey:c}=this.properties;await this.requestDataModel(t,this.data,{props:[Yt(n,s,{id:"xValue"}),Yt(o,a,{id:"yValue"}),...r!=null?[Yt(r,s,{id:"xFilterValue"})]:[],...l!=null?[Yt(l,a,{id:"yFilterValue"})]:[],...c?[Yt(c,"band",{id:"labelValue"})]:[]]}),this.animationState.transition("updateData")}xCoordinateRange(t,e){const i=this.axes.x.scale.convert(t),s=.5*this.properties.size*e;return[i-s,i+s]}yCoordinateRange(t,e){const i=this.axes.y.scale.convert(t[0]),s=.5*this.properties.size*e;return[i-s,i+s]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];const s={x:"xValue",y:"yValue"},a=s[t],n=e.resolveProcessedDataDefById(this,a),o=e.getDomain(this,a,"value",i);if(n?.def.type==="value"&&n?.def.valueType==="category")return o;const l=s[t==="x"?"y":"x"],c=this.domainForClippedRange(t,[a],l);return _a(El(c))}getSeriesRange(t,e){return this.domainForVisibleRange("y",["yValue"],"xValue",e)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["yValue"],t,e,i)}createNodeData(){const{axes:t,dataModel:e,processedData:i,visible:s}=this,{xKey:a,yKey:n,xFilterKey:o,yFilterKey:r,labelKey:l,xName:c,yName:h,labelName:u,marker:d,label:p}=this.properties,{placement:g}=p,f=wi.anchor(d.shape),x=t.x,m=t.y;if(!(e&&i&&s&&x&&m))return;const b=e.resolveColumnById(this,"xValue",i),v=e.resolveColumnById(this,"yValue",i),M=l!=null?e.resolveColumnById(this,"labelValue",i):void 0,D=o!=null?e.resolveColumnById(this,"xFilterValue",i):void 0,L=r!=null?e.resolveColumnById(this,"yFilterValue",i):void 0,C=x.scale,A=m.scale,T=(C.bandwidth??0)/2,N=(A.bandwidth??0)/2,O=[],E=l==null?[]:this.getSeriesDomain("y"),z=Dr.getMeasurer({font:p});return(i.dataSources.get(this.id)??[]).forEach((F,V)=>{const G=b[V],H=v[V],$=C.convert(G)+T,W=A.convert(H)+N,j=D!=null&&L!=null?D[V]===G&&L[V]===H:void 0,U=M!=null?M?.[V]:H,Z=this.getLabelText(U,F,l??n,l!=null?"label":"y",E,p,{value:U,datum:F,xKey:a,yKey:n,labelKey:l,xName:c,yName:h,labelName:u}),X=z.measureText(Z);O.push({series:this,itemId:n,yKey:n,xKey:a,datum:F,datumIndex:V,xValue:G,yValue:H,capDefaults:{lengthRatioMultiplier:d.getDiameter(),lengthMax:1/0},point:{x:$,y:W,size:d.size},midPoint:{x:$,y:W},label:{text:Z,...X},anchor:f,placement:g,selected:j})}),{itemId:n,nodeData:O,labelData:O,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}updateMarkerSelection(t){const{nodeData:e,markerSelection:i}=t;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?e:[])}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yKey:a,labelKey:n,marker:o}=this.properties,r=o.getStyle(),l=this.getShapeFillBBox();e.each((c,h)=>{const u=this.getHighlightStyle(i,h.datumIndex),d=se(u,r);this.updateMarkerStyle(o,c,h.datum,h.point,{xKey:s,yKey:a,labelKey:n},i,d,l,{selected:h.selected})}),i||o.markClean()}updatePlacedLabelData(t){this.labelSelection.update(t.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})),e=>{e.pointerEvents=1}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{label:e}=this.properties;t.labelSelection.each((i,s)=>{i.text=s.label.text,i.fill=e.color,i.x=s.point?.x??0,i.y=s.point?.y??0,i.fontStyle=e.fontStyle,i.fontWeight=e.fontWeight,i.fontSize=e.fontSize,i.fontFamily=e.fontFamily,i.textAlign="left",i.textBaseline="top",i.fillOpacity=this.getHighlightStyle(!1,s.datumIndex).opacity??1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n,ctx:o}=this,{formatManager:r}=o,{xKey:l,xName:c,yKey:h,yName:u,labelKey:d,labelName:p,title:g,tooltip:f,marker:x,legendItemName:m}=n,b=a.x,v=a.y;if(!i||!s||!b||!v)return;const M=s.dataSources.get(this.id)?.[t],D=i.resolveColumnById(this,"xValue",s)[t],L=i.resolveColumnById(this,"yValue",s)[t],C=this.contextNodeData?.nodeData[t];if(D==null||C==null)return;const A=[];if(this.isLabelEnabled()&&d!=null){const N=i.resolveColumnById(this,"labelValue",s)[t],O=r.format(this.callWithContext.bind(this),{type:"category",value:N,datum:M,seriesId:e,legendItemName:m,key:d,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});A.push({label:p,fallbackLabel:d,value:O??Cc(N)})}A.push({label:c,fallbackLabel:l,value:b.formatDatum(D,"tooltip",e,m,M,l)},{label:u,fallbackLabel:h,value:v.formatDatum(L,"tooltip",e,m,M,h)});const T=this.getMarkerStyle(x,C.datum,{xKey:l,yKey:h,labelKey:d,highlighted:!0});return this.formatTooltipWithContext(f,{symbol:this.legendItemSymbol(),title:g,data:A},{seriesId:e,datum:M,title:u,xKey:l,xName:c,yKey:h,yName:u,labelKey:d,labelName:p,...T,...this.getModuleTooltipParams()})}legendItemSymbol(){return{marker:this.getMarkerStyle(this.properties.marker)}}getLegendData(t){if(t!=="category")return[];const{yKey:e,yName:i,title:s,showInLegend:a}=this.properties,{id:n,ctx:{legendManager:o},visible:r}=this;return[{legendType:"category",id:n,itemId:e,seriesId:n,enabled:r&&o.getItemEnabled({seriesId:n,itemId:e}),label:{text:s??i??e},symbol:this.legendItemSymbol(),hideInLegend:!a}]}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,annotationSelections:s}=t;Nw(this,this.ctx.animationManager,e),le(this,"labels",this.ctx.animationManager,i),le(this,"annotations",this.ctx.animationManager,...s)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Lt}getFormattedMarkerStyle(t){const{xKey:e,yKey:i,labelKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,t.datum,{xKey:e,yKey:i,labelKey:s},!0)}computeFocusBounds(t){return qy(this,t)}},nx.className="ScatterSeries",nx.type="scatter"}}),hG,oT,rT=I({"packages/ag-charts-community/src/chart/series/cartesian/scatterSeriesModule.ts"(){"use strict";bi(),Ltt(),DV(),hG={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",moduleFactory:t=>new nx(t),defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Tl,fillImageDefaults:Gc,fillOpacity:.8,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},errorBar:{cap:{lengthRatio:1}},tooltip:{range:{$path:["/tooltip/range","nearest"]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","node"]}}},highlight:Vc()}}},oT={type:"series",name:"scatter",chartType:"cartesian",options:MV,create:t=>new nx(t)}}}),lT,uG=I({"packages/ag-charts-community/src/scene/sectorBox.ts"(){"use strict";FI(),lT=class SP{constructor(e,i,s,a){this.startAngle=e,this.endAngle=i,this.innerRadius=s,this.outerRadius=a}clone(){const{startAngle:e,endAngle:i,innerRadius:s,outerRadius:a}=this;return new SP(e,i,s,a)}equals(e){return this.startAngle===e.startAngle&&this.endAngle===e.endAngle&&this.innerRadius===e.innerRadius&&this.outerRadius===e.outerRadius}[lm](e,i){return new SP(this.startAngle*(1-i)+e.startAngle*i,this.endAngle*(1-i)+e.endAngle*i,this.innerRadius*(1-i)+e.innerRadius*i,this.outerRadius*(1-i)+e.outerRadius*i)}}}});function dG({startAngle:t,endAngle:e,innerRadius:i,outerRadius:s}){let a=1/0,n=1/0,o=-1/0,r=-1/0;const l=(c,h)=>{a=Math.min(c,a),n=Math.min(h,n),o=Math.max(c,o),r=Math.max(h,r)};return l(i*Math.cos(t),i*Math.sin(t)),l(i*Math.cos(e),i*Math.sin(e)),l(s*Math.cos(t),s*Math.sin(t)),l(s*Math.cos(e),s*Math.sin(e)),gu(0,t,e)&&l(s,0),gu(Math.PI*.5,t,e)&&l(0,s),gu(Math.PI,t,e)&&l(-s,0),gu(Math.PI*1.5,t,e)&&l(0,-s),new gt(a,n,o-a,r-n)}function N0(t,e,i){const s=Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),{innerRadius:a,outerRadius:n}=i;if(i.startAngle===i.endAngle||s<Math.min(a,n)||s>Math.max(a,n))return!1;const o=dm(i.startAngle),r=dm(i.endAngle),l=Math.atan2(e,t);return o<r?l<=r&&l>=o:l<=r&&l>=-Math.PI||l>=o&&l<=Math.PI}function wtt(t,e,i,s,a,n,o,r,l,c){if(isNaN(t)||isNaN(e))return 0;n&&([a,s]=[s,a]);const h=(c-r)/(l-o),u=r-h*o,d=Math.pow(h,2)+1,p=2*(h*(u-e)-t),g=Math.pow(t,2)+Math.pow(u-e,2)-Math.pow(i,2),f=Math.pow(p,2)-4*d*g;if(f<0)return 0;const x=(-p+Math.sqrt(f))/2/d,m=(-p-Math.sqrt(f))/2/d;let b=0;return[x,m].forEach(v=>{if(!(v>=Math.min(o,l)&&v<=Math.max(o,l)))return;const D=h*v+u,L=v-t,C=D-e,A=Math.atan2(C,L);gu(A,s,a)&&b++}),b}function pG(t,e){const{startAngle:i,endAngle:s,innerRadius:a,outerRadius:n}=e,o={x:n*Math.cos(i),y:n*Math.sin(i)},r={x:n*Math.cos(s),y:n*Math.sin(s)},l=a===0?{x:0,y:0}:{x:a*Math.cos(i),y:a*Math.sin(i)},c=a===0?{x:0,y:0}:{x:a*Math.cos(s),y:a*Math.sin(s)};return fm(t.start.x,t.start.y,t.end.x,t.end.y,o.x,o.y,l.x,l.y)||fm(t.start.x,t.start.y,t.end.x,t.end.y,r.x,r.y,c.x,c.y)||wtt(0,0,n,i,s,!0,t.start.x,t.start.y,t.end.x,t.end.y)}function gG(t,e){const i={x:t.x,y:t.y},s={x:t.x+t.width,y:t.y},a={x:t.x,y:t.y+t.height},n={x:t.x+t.width,y:t.y+t.height};return pG({start:i,end:s},e)||pG({start:a,end:n},e)}function fG(t,e,i,s){if(i===0&&s===0)return 0;if(Math.asin(Math.abs(1*i)/(t+1*i))+Math.asin(Math.abs(1*s)/(t+1*s))-e<0)return 1;let n=0,o=1;for(let r=0;r<8;r+=1){const l=(n+o)/2;Math.asin(Math.abs(l*i)/(t+l*i))+Math.asin(Math.abs(l*s)/(t+l*s))-e<0?n=l:o=l}return n}function mh(t,e){return Jb(t,e)<mG?e:Ai(t-e)+e}function O0(t,e,i=0){const a=Math.abs(e-t)>=2*Math.PI?2*Math.PI:Ai(e-t);return t=mh(t,i),e=t+a,{startAngle:t,endAngle:e}}function P0(t,e,i,s,a,n){const o=Math.sin(n),r=Math.cos(n),l=t**2+e**2-i**2;let c,h,u,d;if(r>.5){const v=o/r,M=1+v**2,D=-2*(t+e*v),L=D**2-4*M*l;if(L<0)return;const C=(-D+Math.sqrt(L))/(2*M),A=(-D-Math.sqrt(L))/(2*M);c=C,h=C*v,u=A,d=A*v}else{const v=r/o,M=1+v**2,D=-2*(e+t*v),L=D**2-4*M*l;if(L<0)return;const C=(-D+Math.sqrt(L))/(2*M),A=(-D-Math.sqrt(L))/(2*M);c=C*v,h=C,u=A*v,d=A}const p=r,g=o,f=c*p+h*g,x=u*p+d*g,m=f>0?mh(Math.atan2(h-e,c-t),s):NaN,b=x>0?mh(Math.atan2(d-e,u-t),s):NaN;if(m>=s&&m<=a)return m;if(b>=s&&b<=a)return b}function _0(t,e,i,s,a,n){const o=Math.hypot(t,e),r=(o**2-i**2+n**2)/(2*o),l=o-r,c=Math.atan2(e,t),h=Math.acos(-l/i),u=mh(c+h,s),d=mh(c-h,s);if(u>=s&&u<=a)return u;if(d>=s&&d<=a)return d}var mG,E0=I({"packages/ag-charts-community/src/scene/util/sector.ts"(){"use strict";$i(),Wt(),K_(),mG=1e-6}}),R0,ps,B0=I({"packages/ag-charts-community/src/scene/shape/sector.ts"(){"use strict";Fn(),uG(),E0(),Yn(),R0=class{constructor(t,e,i,s,a){this.cx=t,this.cy=e,this.r=i,this.a0=s,this.a1=a,this.a0>=this.a1&&(this.a0=NaN,this.a1=NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(t){return{x:this.cx+this.r*Math.cos(t),y:this.cy+this.r*Math.sin(t)}}clipStart(t){t==null||!this.isValid()||t<this.a0||(this.a0=t,(Number.isNaN(t)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}clipEnd(t){t==null||!this.isValid()||t>this.a1||(this.a1=t,(Number.isNaN(t)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}},ps=class extends Fs{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=Math.PI*2,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(t){this.concentricEdgeInset=t,this.radialEdgeInset=t}set cornerRadius(t){this.startOuterCornerRadius=t,this.endOuterCornerRadius=t,this.startInnerCornerRadius=t,this.endInnerCornerRadius=t}computeBBox(){return dG(this).translate(this.centerX,this.centerY)}normalizedRadii(){const{concentricEdgeInset:t}=this;let{innerRadius:e,outerRadius:i}=this;return e=e>0?e+t:0,i=Math.max(i-t,0),{innerRadius:e,outerRadius:i}}normalizedClipSector(){const{clipSector:t}=this;if(t==null)return;const{startAngle:e,endAngle:i}=O0(this.startAngle,this.endAngle),{innerRadius:s,outerRadius:a}=this.normalizedRadii(),n=O0(t.startAngle,t.endAngle,e);return new lT(Math.max(e,n.startAngle),Math.min(i,n.endAngle),Math.max(s,t.innerRadius),Math.min(a,t.outerRadius))}getAngleOffset(t){return t>0?this.radialEdgeInset/t:0}arc(t,e,i,s,a,n,o,r){if(t<=0)return;const{startAngle:l,endAngle:c}=O0(this.startAngle,this.endAngle),{innerRadius:h,outerRadius:u}=this.normalizedRadii(),d=this.normalizedClipSector();if(r&&h<=0)return;const p=r?this.getAngleOffset(h+t):this.getAngleOffset(u-t),g=o?l+p+e:c-p-e,f=r?h+t:u-t,x=f*Math.cos(g),m=f*Math.sin(g);if(d!=null&&(!o&&!(g>=l-1e-6&&g<=d.endAngle-1e-6)||o&&!(g>=d.startAngle+1e-6&&g<=c-1e-6)||r&&f<d.innerRadius-1e-6||!r&&f>d.outerRadius+1e-6))return;const b=new R0(x,m,t,i,s);if(d!=null){r?(b.clipStart(P0(x,m,t,i,s,d.endAngle)),b.clipEnd(P0(x,m,t,i,s,d.startAngle))):(b.clipStart(P0(x,m,t,i,s,d.startAngle)),b.clipEnd(P0(x,m,t,i,s,d.endAngle)));let C,A;if(o?(C=_0(x,m,t,i,s,d.innerRadius),A=_0(x,m,t,i,s,d.outerRadius)):(C=_0(x,m,t,i,s,d.outerRadius),A=_0(x,m,t,i,s,d.innerRadius)),b.clipStart(C),b.clipEnd(A),C!=null){const{x:T,y:N}=b.pointAt(C),O=mh(Math.atan2(N,T),l);o?n?.clipStart(O):a.clipEnd(O)}if(A!=null){const{x:T,y:N}=b.pointAt(A),O=mh(Math.atan2(N,T),l);o?a.clipStart(O):n?.clipEnd(O)}}if(d!=null){const{x:C,y:A}=b.pointAt((b.a0+b.a1)/2);if(!N0(C,A,d))return}const{x:v,y:M}=b.pointAt(o===r?b.a0:b.a1),D=mh(Math.atan2(M,v),l),L=r?n:a;return o?L?.clipStart(D):L?.clipEnd(D),b}updatePath(){const{path:e,centerX:i,centerY:s,concentricEdgeInset:a,radialEdgeInset:n}=this;let{startOuterCornerRadius:o,endOuterCornerRadius:r,startInnerCornerRadius:l,endInnerCornerRadius:c}=this;const{startAngle:h,endAngle:u}=O0(this.startAngle,this.endAngle),{innerRadius:d,outerRadius:p}=this.normalizedRadii(),g=this.normalizedClipSector(),f=u-h,x=f>=2*Math.PI-1e-6;if(e.clear(),d===0&&p===0||d>p)return;if((g?.startAngle??h)===(g?.endAngle??u))return;if(x&&this.clipSector==null&&o===0&&r===0&&l===0&&c===0){e.moveTo(i+p*Math.cos(h),s+p*Math.sin(h)),e.arc(i,s,p,h,u),d>a&&(e.moveTo(i+d*Math.cos(u),s+d*Math.sin(u)),e.arc(i,s,d,u,h,!0)),e.closePath();return}else if(this.clipSector==null&&Math.abs(d-p)<1e-6){e.arc(i,s,p,h,u,!1),e.arc(i,s,p,u,h,!0),e.closePath();return}const m=this.getAngleOffset(d),b=this.getAngleOffset(p);if(f<2*b)return;const M=(g?.innerRadius??d)>a,D=d<a||f<2*m,L=p-d,C=Math.max(o,l,r,c),A=C>0?Math.min(L/C,1):1;o*=A,r*=A,l*=A,c*=A;const T=fG(p,f-2*b,-o,-r);if(o*=T,r*=T,!D&&M){const at=fG(d,f-2*m,l,c);l*=at,c*=at}else l=0,c=0;const N=Math.max(o+l,r+c),O=N>0?Math.min(L/N,1):1;o*=O,r*=O,l*=O,c*=O;let E=0,z=0;const B=o/(p-o),F=r/(p-r);if(B>=0&&B<1-1e-6)E=Math.asin(B);else{E=f/2;const at=p/(1/Math.sin(E)+1);o=Math.min(at,o)}if(F>=0&&F<1-1e-6)z=Math.asin(F);else{z=f/2;const at=p/(1/Math.sin(z)+1);r=Math.min(at,r)}const V=Math.asin(l/(d+l)),G=Math.asin(c/(d+c)),H=g?.outerRadius??p,$=this.getAngleOffset(H),W=new R0(0,0,H,h+$,u-$),j=g?.innerRadius??d,U=this.getAngleOffset(j),Z=M?new R0(0,0,j,h+U,u-U):void 0;g!=null&&(W.clipStart(g.startAngle),W.clipEnd(g.endAngle),Z?.clipStart(g.startAngle),Z?.clipEnd(g.endAngle));const X=this.arc(o,E,h-Math.PI*.5,h+E,W,Z,!0,!1),q=this.arc(r,z,u-z,u+Math.PI*.5,W,Z,!1,!1),tt=this.arc(c,G,u+Math.PI*.5,u+Math.PI-G,W,Z,!1,!0),J=this.arc(l,V,h+Math.PI+V,h+Math.PI*1.5,W,Z,!0,!0);if(D){const at=f<Math.PI*.5?n*(1+Math.cos(f))/Math.sin(f):NaN;let et;at>0&&at<p?et=Math.max(Math.hypot(n,at),d):et=n,et=Math.max(et,d);const it=h+f*.5;e.moveTo(i+et*Math.cos(it),s+et*Math.sin(it))}else if(!(J?.isValid()===!0||Z?.isValid()===!0)){const at=h+f/2,et=d*Math.cos(at),it=d*Math.sin(at);e.moveTo(i+et,s+it)}if(X?.isValid()===!0){const{cx:at,cy:et,r:it,a0:ct,a1:ht}=X;e.arc(i+at,s+et,it,ct,ht)}if(W.isValid()){const{r:at,a0:et,a1:it}=W;e.arc(i,s,at,et,it)}if(q?.isValid()===!0){const{cx:at,cy:et,r:it,a0:ct,a1:ht}=q;e.arc(i+at,s+et,it,ct,ht)}if(!D){if(tt?.isValid()===!0){const{cx:at,cy:et,r:it,a0:ct,a1:ht}=tt;e.arc(i+at,s+et,it,ct,ht)}if(Z?.isValid()===!0){const{r:at,a0:et,a1:it}=Z;e.arc(i,s,at,it,et,!0)}if(J?.isValid()===!0){const{cx:at,cy:et,r:it,a0:ct,a1:ht}=J;e.arc(i+at,s+et,it,ct,ht)}}e.closePath()}isPointInPath(t,e){const{startAngle:i,endAngle:s,innerRadius:a,outerRadius:n}=this.clipSector??this;return N0(t-this.centerX,e-this.centerY,{startAngle:i,endAngle:s,innerRadius:Math.min(a,n),outerRadius:Math.max(a,n)})}},ps.className="Sector",S([lt()],ps.prototype,"centerX",2),S([lt()],ps.prototype,"centerY",2),S([lt()],ps.prototype,"innerRadius",2),S([lt()],ps.prototype,"outerRadius",2),S([lt()],ps.prototype,"startAngle",2),S([lt()],ps.prototype,"endAngle",2),S([nn({equals:(t,e)=>t.equals(e)})],ps.prototype,"clipSector",2),S([lt()],ps.prototype,"concentricEdgeInset",2),S([lt()],ps.prototype,"radialEdgeInset",2),S([lt()],ps.prototype,"startOuterCornerRadius",2),S([lt()],ps.prototype,"endOuterCornerRadius",2),S([lt()],ps.prototype,"startInnerCornerRadius",2),S([lt()],ps.prototype,"endInnerCornerRadius",2)}}),cT,z0,F0,Dd,V0,ox,Gt,Ttt=I({"packages/ag-charts-community/src/chart/series/polar/donutSeriesProperties.ts"(){"use strict";Gg(),vt(),vt(),Lu(),Vo(),NS(),kl(),Wl(),cT=class extends Pe{constructor(){super(...arguments),this.showInLegend=!1}},S([k],cT.prototype,"showInLegend",2),z0=class extends Li{constructor(){super(...arguments),this.spacing=2}set(t,e){return super.set(t)}},S([k],z0.prototype,"text",2),S([k],z0.prototype,"spacing",2),F0=class extends Nt{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}},S([k],F0.prototype,"fill",2),S([k],F0.prototype,"fillOpacity",2),Dd=class extends Li{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}},S([k],Dd.prototype,"offset",2),S([k],Dd.prototype,"minAngle",2),S([k],Dd.prototype,"minSpacing",2),S([k],Dd.prototype,"maxCollisionOffset",2),S([k],Dd.prototype,"avoidCollisions",2),V0=class extends Li{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}},S([k],V0.prototype,"positionOffset",2),S([k],V0.prototype,"positionRatio",2),ox=class extends Nt{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}},S([k],ox.prototype,"colors",2),S([k],ox.prototype,"length",2),S([k],ox.prototype,"strokeWidth",2),Gt=class extends Ea{constructor(){super(...arguments),this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=Object.values(ri),this.strokes=Object.values(jo),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.hideZeroValueSectorsInLegend=!1,this.innerLabels=new Np(z0),this.title=new cT,this.innerCircle=new F0,this.shadow=new so,this.calloutLabel=new Dd,this.sectorLabel=new V0,this.calloutLine=new ox,this.tooltip=jl()}},S([k],Gt.prototype,"angleKey",2),S([k],Gt.prototype,"angleName",2),S([k],Gt.prototype,"angleFilterKey",2),S([k],Gt.prototype,"radiusKey",2),S([k],Gt.prototype,"radiusName",2),S([k],Gt.prototype,"radiusMin",2),S([k],Gt.prototype,"radiusMax",2),S([k],Gt.prototype,"calloutLabelKey",2),S([k],Gt.prototype,"calloutLabelName",2),S([k],Gt.prototype,"sectorLabelKey",2),S([k],Gt.prototype,"sectorLabelName",2),S([k],Gt.prototype,"legendItemKey",2),S([k],Gt.prototype,"defaultColorRange",2),S([k],Gt.prototype,"defaultPatternFills",2),S([k],Gt.prototype,"fills",2),S([k],Gt.prototype,"strokes",2),S([k],Gt.prototype,"fillOpacity",2),S([k],Gt.prototype,"strokeOpacity",2),S([k],Gt.prototype,"lineDash",2),S([k],Gt.prototype,"lineDashOffset",2),S([k],Gt.prototype,"cornerRadius",2),S([k],Gt.prototype,"itemStyler",2),S([k],Gt.prototype,"rotation",2),S([k],Gt.prototype,"outerRadiusOffset",2),S([k],Gt.prototype,"outerRadiusRatio",2),S([k],Gt.prototype,"innerRadiusOffset",2),S([k],Gt.prototype,"innerRadiusRatio",2),S([k],Gt.prototype,"strokeWidth",2),S([k],Gt.prototype,"sectorSpacing",2),S([k],Gt.prototype,"hideZeroValueSectorsInLegend",2),S([k],Gt.prototype,"innerLabels",2),S([k],Gt.prototype,"title",2),S([k],Gt.prototype,"innerCircle",2),S([k],Gt.prototype,"shadow",2),S([k],Gt.prototype,"calloutLabel",2),S([k],Gt.prototype,"sectorLabel",2),S([k],Gt.prototype,"calloutLine",2),S([k],Gt.prototype,"tooltip",2)}});function kd(t,e,i,s){const a=[i.convert(0),i.convert(1)],n=[s.convert(0),s.convert(1)],o=Math.PI/-2+Hi(e),r=t?"initial":"update",l=({radius:g})=>({innerRadius:a[0],outerRadius:a[0]+(a[1]-a[0])*g}),c=({radius:g})=>({innerRadius:n[0],outerRadius:n[0]+(n[1]-n[0])*g});return{nodes:{toFn:(g,f,x,{prevLive:m})=>{let{startAngle:b,endAngle:v,innerRadius:M,outerRadius:D}=f;const{stroke:L,fill:C}=f.sectorFormat;if(x==="removed"&&m?(b=m.datum?.endAngle,v=m.datum?.endAngle):x==="removed"&&!m&&(b=o,v=o),x==="removed"){const A=l(f);M=A.innerRadius,D=A.outerRadius}return{startAngle:b,endAngle:v,outerRadius:D,innerRadius:M,stroke:L,fill:C}},fromFn:(g,f,x,{prevFromProps:m})=>{let{startAngle:b,endAngle:v,innerRadius:M,outerRadius:D}=g,{fill:L,stroke:C}=f.sectorFormat;if(x==="updated"&&g.previousDatum==null&&(x="added"),x==="unknown"||x==="added"&&!m?(b=o,v=o,M=f.innerRadius,D=f.outerRadius):x==="added"&&m&&(b=m.endAngle??o,v=m.endAngle??o,M=m.innerRadius??f.innerRadius,D=m.outerRadius??f.outerRadius),x==="added"&&!t){const A=c(f);M=A.innerRadius,D=A.outerRadius}return x==="updated"&&(L=g.fill??L,C=(typeof g.stroke=="string"?g.stroke:void 0)??C),{startAngle:b,endAngle:v,innerRadius:M,outerRadius:D,fill:L,stroke:C,phase:r}}},innerCircle:{fromFn:(g,f)=>({size:g.previousDatum?.radius??g.size??0,phase:r}),toFn:(g,f)=>({size:f.radius??0})}}}function hT(t,e){return{startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,stroke:e.sectorFormat.stroke}}function uT(t,e){const i=e.y-t.centerY,s=e.x-t.centerX,a=Math.atan2(i,s),n=t.getItemNodes();for(const o of n)if(o.datum.missing!==!0&&gu(a,o.startAngle,o.endAngle)){const r=Math.sqrt(s*s+i*i);let l=0;return r<o.innerRadius?l=o.innerRadius-r:r>o.outerRadius&&(l=r-o.outerRadius),{datum:o.datum,distance:l}}}var dT=I({"packages/ag-charts-community/src/chart/series/polar/pieUtil.ts"(){"use strict";$i()}}),pT,Ntt=I({"packages/ag-charts-community/src/chart/series/polar/polarZIndexMap.ts"(){"use strict";pT=(t=>(t[t.BACKGROUND=0]="BACKGROUND",t[t.FOREGROUND=1]="FOREGROUND",t[t.HIGHLIGHT=2]="HIGHLIGHT",t[t.LABEL=3]="LABEL",t))(pT||{})}}),G0,j0,rx,W0=I({"packages/ag-charts-community/src/chart/series/polar/polarSeries.ts"(){"use strict";Hu(),Wt(),Oe(),Nc(),Yn(),cn(),Pm(),vw(),G0={angle:["angleKey"],radius:["radiusKey"]},j0={angle:["angleName"],radius:["radiusName"]},rx=class extends b0{constructor({categoryKey:t,pickModes:e=[1,0],canHaveAxes:i=!1,animationResetFns:s,...a}){super({...a,categoryKey:t,pickModes:e,canHaveAxes:i}),this.directions=["angle","radius"],this.itemGroup=this.contentGroup.appendChild(new Lt),this.nodeData=[],this.itemSelection=Ci.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=Ci.select(this.labelGroup,()=>this.labelFactory(),!1),this.highlightSelection=Ci.select(this.highlightGroup,()=>this.nodeFactory()),this.highlightLabelSelection=Ci.select(this.highlightLabel,()=>this.labelFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.animationResetFns=s,this.animationState=new Up("empty",{empty:{update:{target:"ready",action:n=>this.animateEmptyUpdateReady(n)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:n=>this.animateReadyHighlight(n),highlightMarkers:n=>this.animateReadyHighlightMarkers(n),resize:n=>this.animateReadyResize(n),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:n=>this.animateWaitingUpdateReady(n)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:n=>this.animateClearingUpdateEmpty(n)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getItemNodes(){return[...this.itemGroup.children()]}getNodeData(){return this.nodeData}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[t,1],this.highlightGroup.zIndex=[t,2],this.labelGroup.zIndex=[t,3],!0):!1}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}labelFactory(){const t=new rs;return t.pointerEvents=1,t}addChartEventListeners(){this.cleanup.register(this.ctx.eventsHub.on("legend:item-click",t=>this.onLegendItemClick(t)),this.ctx.eventsHub.on("legend:item-double-click",t=>this.onLegendItemDoubleClick(t)))}getInnerRadius(){return 0}computeLabelsBBox(t,e){return null}getShapeFillBBox(){const t=this.radius;return{series:new gt(-t,-t,t*2,t*2),axis:new gt(-t,-t,t*2,t*2)}}resetAllAnimation(){const{item:t,label:e}=this.animationResetFns??{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&cs([this.itemSelection,this.highlightSelection],t),e&&cs([this.labelSelection,this.highlightLabelSelection],e),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup(),this.highlightLabelSelection.cleanup()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(t){const{item:e,label:i}=this.animationResetFns??{};e&&cs([this.highlightSelection],e),i&&cs([this.highlightLabelSelection],i)}animateReadyHighlightMarkers(t){}animateReadyResize(t){this.resetAllAnimation()}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}computeFocusBounds(t){const e=this.getNodeData()?.[t.datumIndex];if(e!==void 0)return this.itemSelection.select(i=>i instanceof Fs&&i.datum===e)[0]}getSeriesRange(t,e){return[NaN,NaN]}isSeriesHighlighted(t,e){const{series:i,legendItemName:s,itemId:a}=t??{},n=e?.[a];return i===this||n!=null&&n===s}}}}),yG,lx,Ott=I({"packages/ag-charts-community/src/chart/series/polar/donutSeries.ts"(){"use strict";R(),zs(),Lg(),Wt(),Oe(),Nc(),$u(),B0(),cn(),bu(),E0(),$i(),Ou(),Ta(),Pt(),jn(),Rr(),Go(),Qu(),Gl(),Al(),Ttt(),dT(),W0(),yG=class extends eg{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},lx=class extends rx{constructor(t){super({moduleCtx:t,categoryKey:void 0,propertyKeys:{...G0,sectorLabel:["sectorLabelKey"],calloutLabel:["calloutLabelKey"]},propertyNames:{...j0,sectorLabel:["sectorLabelName"],calloutLabel:["calloutLabelName"]},pickModes:[1,0],animationResetFns:{item:hT,label:Vl}}),this.properties=new Gt,this.phantomNodeData=void 0,this.backgroundGroup=new vs({name:`${this.id}-background`,zIndex:0}),this.noVisibleData=!1,this.previousRadiusScale=new Ko,this.radiusScale=new Ko,this.phantomGroup=this.backgroundGroup.appendChild(new Lt({name:"phantom"})),this.phantomSelection=Ci.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new Lt({name:"pieCalloutLabels"})),this.calloutLabelSelection=new Ci(this.calloutLabelGroup,Lt),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new Lt({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new wi({shape:"circle"})),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new wi({shape:"circle"})),this.innerLabelsGroup=this.contentGroup.appendChild(new Lt({name:"innerLabels"})),this.innerCircleGroup=this.backgroundGroup.appendChild(new Lt({name:`${this.id}-innerCircle`})),this.innerLabelsSelection=Ci.select(this.innerLabelsGroup,rs),this.innerCircleSelection=Ci.select(this.innerCircleGroup,()=>new wi({shape:"circle"})),this.surroundingRadius=void 0,this.NodeEvent=yG,this.angleScale=new Ko,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2,this.innerLabelsGroup.pointerEvents=1}get calloutNodeData(){return this.phantomNodeData??this.nodeData}attachSeries(t,e,i){super.attachSeries(t,e,i),t?.appendChild(this.backgroundGroup)}detachSeries(t,e,i){super.detachSeries(t,e,i),t?.removeChild(this.backgroundGroup)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.backgroundGroup.zIndex=[0,t],!0):!1}nodeFactory(){return new ps}getSeriesDomain(t){return t==="angle"?this.angleScale.domain:this.radiusScale.domain}async processData(t){if(this.data==null)return;const{visible:e,id:i,ctx:{legendManager:s}}=this,{angleKey:a,angleFilterKey:n,radiusKey:o,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c}=this.properties,h=()=>(x,m)=>e&&s.getItemEnabled({seriesId:i,itemId:m})?x:0,u=!this.ctx.animationManager.isSkipped(),d=[],p=[];c?d.push($o(c,"band",{id:"legendItemKey"})):r?d.push($o(r,"band",{id:"calloutLabelKey"})):l&&d.push($o(l,"band",{id:"sectorLabelKey"}));const g=this.radiusScale.type,f=this.angleScale.type;o&&p.push(YL(o,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax,missingValue:this.properties.radiusMax??1,processor:h}),Yt(o,g,{id:"radiusRaw",processor:h}),sd("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),r&&p.push(Yt(r,"band",{id:"calloutLabelValue"})),l&&p.push(Yt(l,"band",{id:"sectorLabelValue"})),c&&p.push(Yt(c,"band",{id:"legendItemValue"})),n&&p.push(ky(n,f,{id:"angleFilterValue",onlyPositive:!0,invalidValue:0,processor:h}),Yt(n,f,{id:"angleFilterRaw"}),sd("angleFilterValue",[0,1],0,0)),u&&this.processedData&&d.length>0&&p.push(Ag(this.id,this.processedData)),p.push(Ig()),await this.requestDataModel(t,this.data,{props:[...d,ky(a,f,{id:"angleValue",onlyPositive:!0,invalidValue:0,processor:h}),Yt(a,f,{id:"angleRaw"}),sd("angleValue",[0,1],0,0),...p]});for(const x of this.processedData?.defs?.values??[]){const{id:m,missing:b,property:v}=x,M=OC(this,b);m!=="angleRaw"&&M>0&&ut.warnOnce(`no value was found for the key '${String(v)}' on ${M} data element${M>1?"s":""}`)}this.animationState.transition("updateData")}maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:t=[],phantomNodeData:e}=this.createNodeData()??{};this.nodeData=t,this.phantomNodeData=e,this.nodeDataRefresh=!1}getProcessedDataValues(t,e){const i=t.resolveColumnById(this,"angleValue",e),s=t.resolveColumnById(this,"angleRaw",e),a=this.properties.angleFilterKey!=null?t.resolveColumnById(this,"angleFilterValue",e):void 0,n=this.properties.angleFilterKey!=null?t.resolveColumnById(this,"angleFilterRaw",e):void 0,o=this.properties.radiusKey?t.resolveColumnById(this,"radiusValue",e):void 0,r=this.properties.radiusKey?t.resolveColumnById(this,"radiusRaw",e):void 0,l=this.properties.calloutLabelKey?t.resolveColumnById(this,"calloutLabelValue",e):void 0,c=this.properties.sectorLabelKey?t.resolveColumnById(this,"sectorLabelValue",e):void 0,h=this.properties.legendItemKey?t.resolveColumnById(this,"legendItemValue",e):void 0;return{angleValues:i,angleRawValues:s,angleFilterValues:a,angleFilterRawValues:n,radiusValues:o,radiusRawValues:r,calloutLabelValues:l,sectorLabelValues:c,legendItemValues:h}}createNodeData(){const{id:t,processedData:e,dataModel:i,angleScale:s,ctx:{legendManager:a},visible:n}=this,{rotation:o,innerRadiusRatio:r}=this.properties;if(!i||e?.type!=="ungrouped")return;const l=this.getProcessedDataValues(i,e),{angleValues:c,angleRawValues:h,angleFilterValues:u,angleFilterRawValues:d,radiusValues:p,radiusRawValues:g,legendItemValues:f}=l,x=d?.some((C,A)=>C>h[A])??!1;let m=0,b=0;const v=[],M=d!=null?[]:void 0,D=e.dataSources.get(this.id)??[],L=e.invalidData?.get(this.id);return D.forEach((C,A)=>{if(L?.[A]===!0)return;const T=x?u[A]:c[A],N=d!=null&&!x?Math.sqrt(d[A]/h[A]):1,O=s.convert(m)+Hi(o);m=T,b+=T;const E=s.convert(m)+Hi(o),z=Math.abs(E-O),B=O+z/2,F=h[A],G=(p?.[A]??1)*N,H=g?.[A],$=f?.[A],W=this.getLabels(A,C,B,z,l),j=this.getSectorFormat(C,A,!1),U={itemId:A,series:this,datum:C,datumIndex:A,angleValue:F,midAngle:B,midCos:Math.cos(B),midSin:Math.sin(B),startAngle:O,endAngle:E,radius:G,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(G),0),sectorFormat:j,radiusValue:H,legendItemValue:$,enabled:n&&a.getItemEnabled({seriesId:t,itemId:A}),focusable:!0,...W};v.push(U),M?.push({...U,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0),focusable:!1})}),this.zerosumOuterRing.visible=b===0,this.zerosumInnerRing.visible=b===0&&r!=null&&r!==1&&r>0,{itemId:t,nodeData:v,labelData:v,phantomNodeData:M}}getLabelContent(t,e,i){const{id:s,ctx:a,properties:n}=this,{formatManager:o}=a,{calloutLabel:r,sectorLabel:l,calloutLabelKey:c,sectorLabelKey:h,legendItemKey:u}=n,d=i.calloutLabelValues?.[t],p=i.sectorLabelValues?.[t],g=i.legendItemValues?.[t],f={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},x={callout:void 0,sector:void 0,legendItem:void 0};return c&&(x.callout=this.getLabelText(d,e,c,"calloutLabel",[],r,{...f,value:d})),h&&(x.sector=this.getLabelText(p,e,h,"sectorLabel",[],l,{...f,value:p})),u!=null&&g!=null&&(x.legendItem=o.format(this.callWithContext.bind(this),{type:"category",value:g,datum:e,seriesId:s,legendItemName:void 0,key:u,source:"legend-label",property:"legendItem",domain:[],boundSeries:this.getFormatterContext("legendItem")})??g),x}getLabels(t,e,i,s,a){const{properties:n}=this,{calloutLabel:o,sectorLabel:r,legendItemKey:l}=n,c=this.getLabelContent(t,e,a),h={};return o.enabled&&c.callout&&s>=Hi(o.minAngle)&&(h.calloutLabel={...this.getTextAlignment(i),text:c.callout,hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),r.enabled&&c.sector&&(h.sectorLabel={text:c.sector}),l&&c.legendItem&&(h.legendItem={key:l,text:c.legendItem}),h}getTextAlignment(t){const e=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"top"},{textAlign:"right",textBaseline:"middle"}],i=dm(t),s=-.75*Math.PI,a=i-s,n=Math.floor(a/(Math.PI/2)),o=CI(n,e.length);return e[o]}getNodeFill(t,e,i){return qu(t,{type:"gradient",bounds:"series",colorStops:e.map(s=>({color:s})),gradient:"radial",rotation:0,reverse:!0},{type:"pattern",pattern:"forward-slanted-lines",fill:i,fillOpacity:1,backgroundFill:"none",backgroundFillOpacity:1,stroke:i,strokeOpacity:1,strokeWidth:4,rotation:0},{type:"image",backgroundFill:i,backgroundFillOpacity:1,fit:"contain",repeat:"no-repeat",rotation:0})}getFillParams(t,e,i){if(!(!rn(t)||t.bounds==="item"))return{centerX:0,centerY:0,innerRadius:e,outerRadius:i}}getSectorFormat(t,e,i,s,a){const{angleKey:n,radiusKey:o,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c,fills:h,strokes:u,defaultColorRange:d,defaultPatternFills:p,itemStyler:g}=this.properties,f=u[e%u.length],x=h[e%h.length],{fill:m,fillOpacity:b,stroke:v,strokeWidth:M,strokeOpacity:D,lineDash:L,lineDashOffset:C,cornerRadius:A,opacity:T}=se(this.getHighlightStyle(i,s?.datumIndex,a),{fill:x,stroke:f},this.properties),N=d[e%d.length],O=p[e%p.length],E=m??"black";let z;return g&&(z=this.cachedDatumCallback(this.getDatumId(e)+(i?"-highlight":"-hide"),()=>this.callWithContext(g,{datum:t,angleKey:n,radiusKey:o,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c,fill:this.getNodeFill(E,N,O),fillOpacity:b,stroke:v,strokeWidth:M,strokeOpacity:D,lineDash:L,lineDashOffset:C,cornerRadius:A,highlighted:i,seriesId:this.id}))),{fill:this.getNodeFill(z?.fill??E,N,O),fillOpacity:z?.fillOpacity??b,stroke:z?.stroke??v,strokeWidth:z?.strokeWidth??M,strokeOpacity:z?.strokeOpacity??D,lineDash:z?.lineDash??L,lineDashOffset:z?.lineDashOffset??C,cornerRadius:z?.cornerRadius??A,opacity:T}}getInnerRadius(){const{radius:t}=this,{innerRadiusRatio:e=1,innerRadiusOffset:i=0}=this.properties,s=t*e+i;return s===t||s<0?0:s}getOuterRadius(){const{outerRadiusRatio:t,outerRadiusOffset:e}=this.properties;return Math.max(this.radius*t+e,0)}updateRadiusScale(t){const e=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=e,t&&(this.previousRadiusScale.range=e);const i=s=>({...s,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(s.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const t=Math.max(0,this.radiusScale.range[1]);if(t===0)return NaN;const i=2+(this.properties.title?.spacing??0),s=Math.max(0,-t);return-t-i-s}update({seriesRect:t}){const{title:e}=this.properties,i={seriesRectWidth:t?.width,seriesRectHeight:t?.height},s=Sr(this.nodeDataDependencies,i)!=null;if(s&&(this._nodeDataDependencies=i),this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),e){const a=this.getTitleTranslationY();e.node.y=isFinite(a)?a:0;const n=e.node.getBBox(!1);e.node.visible=e.enabled&&isFinite(a)&&!this.bboxIntersectsSurroundingSeries(n)}for(const a of[this.zerosumInnerRing,this.zerosumOuterRing])a.fillOpacity=0,a.stroke=this.properties.calloutLabel.color,a.strokeWidth=1,a.strokeOpacity=1;this.updateNodeMidPoint(),this.updateSelections(),this.updateNodes(t)}updateTitleNodes(){const{oldTitle:t}=this,{title:e}=this.properties;t!==e&&(t&&this.labelGroup?.removeChild(t.node),e&&(e.node.textBaseline="bottom",this.labelGroup?.appendChild(e.node)),this.oldTitle=e)}updateNodeMidPoint(){const t=e=>{const i=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,i),y:e.midSin*Math.max(0,i)}};this.nodeData.forEach(t),this.phantomNodeData?.forEach(t)}updateSelections(){this.updateGroupSelection(),this.updateInnerCircleSelection()}updateGroupSelection(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,highlightLabelSelection:s,calloutLabelSelection:a,labelSelection:n,innerLabelsSelection:o}=this,r=this.nodeData.map(c=>({...c,sectorFormat:{...c.sectorFormat}})),l=(c,h)=>{c.update(h,void 0,u=>this.getDatumId(u.datumIndex)),this.ctx.animationManager.isSkipped()&&c.cleanup()};l(t,this.nodeData),l(e,r),l(i,this.phantomNodeData??[]),a.update(this.calloutNodeData,c=>{const h=new pa;h.tag=0,h.pointerEvents=1,c.appendChild(h);const u=new rs;u.tag=1,u.pointerEvents=1,c.appendChild(u)}),n.update(this.nodeData),s.update(r),o.update(this.properties.innerLabels,c=>{c.pointerEvents=1})}updateInnerCircleSelection(){const{innerCircle:t}=this.properties;let e=0;const i=this.getInnerRadius();if(i>0){const a=Math.min(i,this.getOuterRadius()),n=1;e=Math.ceil(a*2+n)}const s=t?[{radius:e}]:[];this.innerCircleSelection.update(s)}updateNodes(t){const e=this.ctx.highlightManager.getActiveHighlight(),{visible:i,dataModel:s,processedData:a}=this;if(this.backgroundGroup.visible=i,this.contentGroup.visible=i,!s||!a)return;const{legendItemValues:n}=this.getProcessedDataValues(s,a),o=this.isSeriesHighlighted(e,n);this.highlightGroup.visible=i&&o,this.highlightLabel.visible=i&&o,this.labelGroup.visible=i,this.innerCircleSelection.each((d,{radius:p})=>{d.setProperties({fill:this.getNodeFill(this.properties.innerCircle?.fill,["black"],"black"),opacity:this.properties.innerCircle?.fillOpacity,size:p})});const r=this.radiusScale.range[0],l=this.radiusScale.range[1],c=this.getShapeFillBBox(),h=this.ctx.animationManager.isSkipped(),u=(d,p,g,f)=>{const x=this.getSectorFormat(p.datum,p.itemId,f,p,n);p.sectorFormat.fill=x.fill,p.sectorFormat.stroke=x.stroke,h&&(d.startAngle=p.startAngle,d.endAngle=p.endAngle,d.innerRadius=p.innerRadius,d.outerRadius=p.outerRadius),(f||h)&&(d.fill=x.fill,d.stroke=x.stroke);const m=this.getFillParams(x.fill,r,l);Il(d,x,void 0,c,m),d.cornerRadius=x.cornerRadius,d.fillShadow=this.properties.shadow;const b=Math.max((this.properties.sectorSpacing+(x.stroke!=null?x.strokeWidth:0))/2,0);d.inset=b,d.lineJoin=this.properties.sectorSpacing>=0||b>0?"miter":"round"};this.itemSelection.each((d,p,g)=>u(d,p,g,!1)),this.highlightSelection.each((d,p,g)=>{u(d,p,g,!0),d.visible=p.itemId===e?.itemId}),this.phantomSelection.each((d,p,g)=>u(d,p,g,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(t),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{calloutLine:{length:t,strokeWidth:e,colors:i},strokes:s}=this.properties,a=e,n=J_(i)?i??this.properties.strokes:s,{offset:o}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach(r=>{const l=r.closestDatum(),{calloutLabel:c,outerRadius:h,datumIndex:u}=l;if(c?.text&&!c.hidden&&h!==0){r.visible=!0,r.strokeWidth=a,r.stroke=n[u%n.length],r.strokeOpacity=this.getHighlightStyle(!1,l.datumIndex).opacity??1,r.fill=void 0;const d=l.midCos*h,p=l.midSin*h;let g=l.midCos*(h+t),f=l.midSin*(h+t);if((c.collisionTextAlign??c.collisionOffsetY!==0)&&c.box!=null){const m=c.box;let b=g,v=f;g<m.x?b=m.x:g>m.x+m.width&&(b=m.x+m.width),f<m.y?v=m.y:f>m.y+m.height&&(v=m.y+m.height);const M=b-g,D=v-f,L=Math.sqrt(Math.pow(M,2)+Math.pow(D,2)),C=L-o;C>0&&(g=g+M*C/L,f=f+D*C/L)}r.x1=d,r.y1=p,r.x2=g,r.y2=f}else r.visible=!1})}getLabelOverflow(t,e,i){const s=-this.centerX,a=s+i.width,n=-this.centerY,o=n+i.height,r=1;let l=1;e.x+r<s?l=(e.x+e.width-s)/e.width:e.x+e.width-r>a&&(l=(a-e.x)/e.width);const c=e.y+r<n||e.y+e.height-r>o,h=l===1?t.length:Math.floor(t.length*l)-1,u=this.bboxIntersectsSurroundingSeries(e);return{textLength:h,hasVerticalOverflow:c,hasSurroundingSeriesOverflow:u}}bboxIntersectsSurroundingSeries(t){const{surroundingRadius:e}=this;if(e==null)return!1;const i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=e**2;return i.some(a=>a.x**2+a.y**2>s)}computeCalloutLabelCollisionOffsets(){const{radiusScale:t}=this,{calloutLabel:e,calloutLine:i}=this.properties,{offset:s,minSpacing:a}=e,n=t.convert(0),o=m=>!m.calloutLabel||m.outerRadius===0,r=this.calloutNodeData,l=r.filter(m=>!o(m));if(l.forEach(m=>{const b=m.calloutLabel;b!=null&&(b.hidden=!1,b.collisionTextAlign=void 0,b.collisionOffsetY=0)}),l.length<=1)return;const c=l.filter(m=>m.midCos<0).sort((m,b)=>m.midSin-b.midSin),h=l.filter(m=>m.midCos>=0).sort((m,b)=>m.midSin-b.midSin),u=l.filter(m=>m.midSin<0&&m.calloutLabel?.textAlign==="center").sort((m,b)=>m.midCos-b.midCos),d=l.filter(m=>m.midSin>=0&&m.calloutLabel?.textAlign==="center").sort((m,b)=>m.midCos-b.midCos),p=m=>{const b=m.calloutLabel;if(b==null)return gt.zero.clone();const v=m.outerRadius+i.length+s,M=m.midCos*v,D=m.midSin*v+b.collisionOffsetY,L=b.collisionTextAlign??b.textAlign,C=b.textBaseline;return rs.computeBBox(b.text,M,D,{font:this.properties.calloutLabel,textAlign:L,textBaseline:C},!1)},g=(m,b,v)=>{const M=p(m).grow(a/2),D=p(b).grow(a/2);M.x<D.x+D.width&&M.x+M.width>D.x&&(v==="to-top"?M.y<D.y+D.height:M.y+M.height>D.y)&&(b.calloutLabel.collisionOffsetY=v==="to-top"?M.y-D.y-D.height:M.y+M.height-D.y)},f=m=>{const b=m.slice().sort((M,D)=>Math.abs(M.midSin)-Math.abs(D.midSin))[0],v=m.indexOf(b);for(let M=v-1;M>=0;M--){const D=m[M+1],L=m[M];g(D,L,"to-top")}for(let M=v+1;M<m.length;M++){const D=m[M-1],L=m[M];g(D,L,"to-bottom")}},x=m=>{const b=l.some(A=>A.calloutLabel.collisionOffsetY!==0),v=m.map(A=>p(A)),M=v.map(A=>A.clone().grow(a/2));let D=!1;for(let A=0;A<M.length&&!D;A++){const T=M[A];for(let N=A+1;N<m.length;N++){const O=M[N];if(T.collidesBBox(O)){D=!0;break}}}const L=r.map(A=>{const{startAngle:T,endAngle:N,outerRadius:O}=A;return{startAngle:T,endAngle:N,innerRadius:n,outerRadius:O}}),C=v.some(A=>L.some(T=>gG(A,T)));!D&&!b&&!C||m.filter(A=>A.calloutLabel.textAlign==="center").forEach(A=>{const T=A.calloutLabel;A.midCos<0?T.collisionTextAlign="right":A.midCos>0?T.collisionTextAlign="left":T.collisionTextAlign="center"})};f(c),f(h),x(u),x(d)}updateCalloutLabelNodes(t){const{radiusScale:e}=this,{calloutLabel:i,calloutLine:s}=this.properties,a=s.length,{offset:n,color:o}=i,r=new rs;this.calloutLabelSelection.selectByTag(1).forEach(l=>{const c=l.closestDatum(),h=c.calloutLabel,u=e.convert(c.radius),d=Math.max(0,u);if(!h?.text||d===0||h.hidden){l.visible=!1;return}const p=d+a+n,g=c.midCos*p,f=c.midSin*p+h.collisionOffsetY,x={textAlign:h.collisionTextAlign??h.textAlign,textBaseline:h.textBaseline};r.text=h.text,r.x=g,r.y=f,r.setFont(this.properties.calloutLabel),r.setAlign(x);const m=r.getBBox(!1);let b=h.text,v=!0;if(i.avoidCollisions){const{textLength:M,hasVerticalOverflow:D}=this.getLabelOverflow(h.text,m,t);b=h.text.length===M?h.text:`${h.text.substring(0,M)}\u2026`,v=!D}l.text=b,l.x=g,l.y=f,l.setFont(this.properties.calloutLabel),l.setAlign(x),l.fill=o,l.fillOpacity=this.getHighlightStyle(!1,c.datumIndex).opacity??1,l.visible=v})}computeLabelsBBox(t,e){const{calloutLabel:i,calloutLine:s}=this.properties,a=s.length,{offset:n,maxCollisionOffset:o,minSpacing:r}=i;if(!i.avoidCollisions)return null;this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new rs;let h;const{title:u}=this.properties;if(u?.text&&u.enabled){const d=this.getTitleTranslationY();isFinite(d)&&(c.text=u.text,c.x=0,c.y=d,c.setFont(u),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.getBBox(!1),l.push(h))}return this.calloutNodeData.forEach(d=>{const p=d.calloutLabel;if(!p||d.outerRadius===0)return null;const g=d.outerRadius+a+n,f=d.midCos*g,x=d.midSin*g+p.collisionOffsetY;c.text=p.text,c.x=f,c.y=x,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:p.collisionTextAlign??p.textAlign,textBaseline:p.textBaseline});const m=c.getBBox(!1);if(p.box=m,Math.abs(p.collisionOffsetY)>o){p.hidden=!0;return}if(h){const b=-this.centerY,v=new gt(h.x-r,b,h.width+2*r,h.y+h.height+r-b);if(m.collidesBBox(v)){p.hidden=!0;return}}if(t.hideWhenNecessary){const{textLength:b,hasVerticalOverflow:v,hasSurroundingSeriesOverflow:M}=this.getLabelOverflow(p.text,m,e),D=p.text.length>2&&b<2;if(v||D||M){p.hidden=!0;return}}p.hidden=!1,l.push(m)}),l.length===0?null:gt.merge(l)}updateSectorLabelNodes(){const{radiusScale:t}=this,e=t.convert(0),{fontSize:i,fontStyle:s,fontWeight:a,fontFamily:n,positionOffset:o,positionRatio:r,color:l}=this.properties.sectorLabel,c=(h,u)=>{const{sectorLabel:d,outerRadius:p}=u;let g=!1;if(d&&p!==0){const f=e*(1-r)+p*r+o;h.fill=l,h.fillOpacity=this.getHighlightStyle(!1,u.datumIndex).opacity??1,h.fontStyle=s,h.fontWeight=a,h.fontSize=i,h.fontFamily=n,h.text=d.text,h.x=u.midCos*f,h.y=u.midSin*f,h.textAlign="center",h.textBaseline="middle";const x=h.getBBox(!1),m=[[x.x,x.y],[x.x+x.width,x.y],[x.x+x.width,x.y+x.height],[x.x,x.y+x.height]],{startAngle:b,endAngle:v}=u,M={startAngle:b,endAngle:v,innerRadius:e,outerRadius:p};m.every(([D,L])=>N0(D,L,M))&&(g=!0)}h.visible=g};this.labelSelection.each(c),this.highlightLabelSelection.each(c)}updateInnerLabelNodes(){const t=[],e=[];this.innerLabelsSelection.each((h,u)=>{const{fontStyle:d,fontWeight:p,fontSize:g,fontFamily:f,color:x}=u;h.fontStyle=d,h.fontWeight=p,h.fontSize=g,h.fontFamily=f,h.text=u.text,h.x=0,h.y=0,h.fill=x,h.textAlign="center",h.textBaseline="alphabetic",t.push(h.getBBox(!1)),e.push(u.spacing)});const i=h=>h===0?0:e[h],s=h=>h===e.length-1?0:e[h],a=t.reduce((h,u,d)=>h+u.height+i(d)+s(d),0),n=Math.max(...t.map(h=>h.width)),o=this.getInnerRadius(),l=Math.sqrt(Math.pow(n/2,2)+Math.pow(a/2,2))<=(o>0?o:this.getOuterRadius()),c=[];for(let h=0,u=-a/2;h<t.length;h++){const p=t[h].height+u+i(h);c.push(p),u=p+s(h)}this.innerLabelsSelection.each((h,u,d)=>{h.y=c[d],h.visible=l})}updateZerosumRings(){this.zerosumOuterRing.size=this.getOuterRadius()*2,this.zerosumInnerRing.size=this.getInnerRadius()*2}pickNodeClosestDatum(t){return uT(this,t)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a,ctx:{formatManager:n}}=this,{legendItemKey:o,calloutLabelKey:r,calloutLabelName:l,sectorLabelKey:c,sectorLabelName:h,angleKey:u,angleName:d,radiusKey:p,radiusName:g,tooltip:f}=a,x=this.properties.title.text;if(!i||!s)return;const m=s.dataSources.get(this.id)?.[t],b=this.getProcessedDataValues(i,s),{angleRawValues:v}=b,M=v[t],D=this.getLabelContent(t,m,b),L=D.legendItem??D.callout??D.sector??d,C=i.getDomain(this,"angleRaw","value",s),A=n.format(this.callWithContext.bind(this),{type:"number",value:M,datum:m,seriesId:e,legendItemName:void 0,key:u,source:"tooltip",property:"angle",domain:C,boundSeries:this.getFormatterContext("angle"),fractionDigits:void 0})??Cc(M,3);return this.formatTooltipWithContext(f,{title:x,symbol:this.legendItemSymbol(t),data:[{label:L,fallbackLabel:u,value:A}]},{seriesId:e,datum:m,title:d,legendItemKey:o,calloutLabelKey:r,calloutLabelName:l,sectorLabelKey:c,sectorLabelName:h,angleKey:u,angleName:d,radiusKey:p,radiusName:g,...this.getSectorFormat(m,t,!1)})}legendItemSymbol(t){const e=this.processedData?.dataSources.get(this.id)?.[t],i=this.getSectorFormat(e,t,!1),{fillOpacity:s,strokeOpacity:a,strokeWidth:n,lineDash:o,lineDashOffset:r}=this.properties;let{fill:l}=i;const{stroke:c}=i;return rn(l)&&(l={...l,gradient:"linear",rotation:0,reverse:!1}),{marker:{fill:l,stroke:c,fillOpacity:s,strokeOpacity:a,strokeWidth:n,lineDash:o,lineDashOffset:r}}}getLegendData(t){const{visible:e,processedData:i,dataModel:s,id:a,ctx:{legendManager:n}}=this;if(!s||!i||t!=="category")return[];const{angleKey:o,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c,showInLegend:h}=this.properties;if(!c&&(!r||r===o)&&(!l||l===o))return[];const u=this.getProcessedDataValues(s,i),{angleRawValues:d}=u,p=this.properties.title?.showInLegend&&this.properties.title.text,g=[],f=this.properties.hideZeroValueSectorsInLegend,x=i.dataSources.get(this.id),m=i.invalidData?.get(this.id);for(let b=0;b<i.input.count;b++){const v=x?.[b],M=d[b];if(m?.[b]===!0||f&&M===0)continue;const D=[];p&&D.push(p);const L=this.getLabelContent(b,v,u);c&&L.legendItem!==void 0?D.push(L.legendItem):r&&r!==o&&L.callout!==void 0?D.push(L.callout):l&&l!==o&&L.sector!==void 0&&D.push(L.sector),D.length!==0&&g.push({legendType:"category",id:a,datum:v,itemId:b,seriesId:a,hideToggleOtherSeries:!0,enabled:e&&n.getItemEnabled({seriesId:a,itemId:b}),label:{text:D.join(" - ")},symbol:this.legendItemSymbol(b),legendItemName:c!=null?v[c]:void 0,hideInLegend:!h})}return g}setLegendState(t){const{id:e,ctx:{legendManager:i,updateService:s}}=this;t.forEach((a,n)=>i.toggleItem(a,e,n)),i.update(),s.update(5)}animateEmptyUpdateReady(t){const{animationManager:e}=this.ctx,i=kd(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);Ue(this.id,"nodes",e,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(s,a)=>this.getDatumId(a.datumIndex)),Ue(this.id,"innerCircle",e,[this.innerCircleSelection],i.innerCircle),le(this,"callout",e,this.calloutLabelSelection),le(this,"sector",e,this.labelSelection),le(this,"highlight",e,this.highlightLabelSelection),le(this,"inner",e,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,processedData:s,radiusScale:a,previousRadiusScale:n}=this,{animationManager:o}=this.ctx,r=s?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=(r?.moved.size??0)===0,c=(s?.defs.keys.length??0)>0,h=s?.reduced?.animationValidation?.uniqueKeys??!0;(!l||!c||!h)&&this.ctx.animationManager.skipCurrentBatch();const u=!this.nodeData.some(p=>p.enabled),d=kd(!1,this.properties.rotation,a,n);Ue(this.id,"nodes",o,[t,e,i],d.nodes,(p,g)=>this.getDatumId(g.datumIndex),r),Ue(this.id,"innerCircle",o,[this.innerCircleSelection],d.innerCircle),le(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),le(this,"sector",this.ctx.animationManager,this.labelSelection),le(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.noVisibleData!==u&&(this.noVisibleData=u,le(this,"inner",this.ctx.animationManager,this.innerLabelsSelection)),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,radiusScale:s,previousRadiusScale:a}=this,{animationManager:n}=this.ctx,o=kd(!1,this.properties.rotation,s,a);Ue(this.id,"nodes",n,[t,e,i],o.nodes,(r,l)=>this.getDatumId(l.datumIndex)),Ue(this.id,"innerCircle",n,[this.innerCircleSelection],o.innerCircle),ph(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),ph(this,"sector",this.ctx.animationManager,this.labelSelection),ph(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),ph(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumId(t){return`${t}`}},lx.className="DonutSeries",lx.type="donut"}}),xG,Ptt=I({"packages/ag-charts-community/src/chart/series/polar/donutTheme.ts"(){"use strict";Rp(),li(),bi(),xG={series:{title:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:Oa.LARGE},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},spacing:5},calloutLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},offset:3,minAngle:.001},sectorLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"chartBackgroundColor"},positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2,colors:{$map:[{$if:[{$or:[{$isGradient:{$value:"$1"}},{$isPattern:{$value:"$1"}},{$isImage:{$value:"$1"}}]},{$path:["../../strokes/$index",{$ref:"foregroundColor"}]},{$value:"$1"}]},{$if:[{$eq:[{$path:"../strokeWidth"},0]},{$path:"../fills"},{$path:"../strokes"}]}]}},fills:{$palette:"fills"},strokes:{$palette:"strokes"},defaultColorRange:{$palette:"gradients"},defaultPatternFills:zS,fillOpacity:1,strokeOpacity:1,strokeWidth:{$isUserOption:["./strokes/0",2,0]},lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,innerRadiusRatio:{$if:[{$eq:[{$path:["./innerRadiusOffset",void 0]},void 0]},.7,void 0]},shadow:{enabled:!1,color:Cl,xOffset:3,yOffset:3,blur:5},innerLabels:{$apply:{fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:2}},highlight:yF()},legend:{enabled:!0}}}}),bG,vG,SG=I({"packages/ag-charts-community/src/chart/series/polar/donutSeriesModule.ts"(){"use strict";Ott(),IV(),Ptt(),bG={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",moduleFactory:t=>new lx(t),themeTemplate:xG},vG={type:"series",name:"donut",chartType:"polar",options:kV,create:t=>new lx(t)}}}),gT,Id,H0,cx,Jt,_tt=I({"packages/ag-charts-community/src/chart/series/polar/pieSeriesProperties.ts"(){"use strict";Gg(),vt(),vt(),Lu(),Vo(),NS(),kl(),Wl(),gT=class extends Pe{constructor(){super(...arguments),this.showInLegend=!1}},S([k],gT.prototype,"showInLegend",2),Id=class extends Li{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}},S([k],Id.prototype,"offset",2),S([k],Id.prototype,"minAngle",2),S([k],Id.prototype,"minSpacing",2),S([k],Id.prototype,"maxCollisionOffset",2),S([k],Id.prototype,"avoidCollisions",2),H0=class extends Li{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}},S([k],H0.prototype,"positionOffset",2),S([k],H0.prototype,"positionRatio",2),cx=class extends Nt{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}},S([k],cx.prototype,"colors",2),S([k],cx.prototype,"length",2),S([k],cx.prototype,"strokeWidth",2),Jt=class extends Ea{constructor(){super(...arguments),this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=Object.values(ri),this.strokes=Object.values(jo),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.hideZeroValueSectorsInLegend=!1,this.title=new gT,this.shadow=new so,this.calloutLabel=new Id,this.sectorLabel=new H0,this.calloutLine=new cx,this.tooltip=jl()}},S([k],Jt.prototype,"angleKey",2),S([k],Jt.prototype,"angleName",2),S([k],Jt.prototype,"angleFilterKey",2),S([k],Jt.prototype,"radiusKey",2),S([k],Jt.prototype,"radiusName",2),S([k],Jt.prototype,"radiusMin",2),S([k],Jt.prototype,"radiusMax",2),S([k],Jt.prototype,"calloutLabelKey",2),S([k],Jt.prototype,"calloutLabelName",2),S([k],Jt.prototype,"sectorLabelKey",2),S([k],Jt.prototype,"sectorLabelName",2),S([k],Jt.prototype,"legendItemKey",2),S([k],Jt.prototype,"defaultColorRange",2),S([k],Jt.prototype,"defaultPatternFills",2),S([k],Jt.prototype,"fills",2),S([k],Jt.prototype,"strokes",2),S([k],Jt.prototype,"fillOpacity",2),S([k],Jt.prototype,"strokeOpacity",2),S([k],Jt.prototype,"lineDash",2),S([k],Jt.prototype,"lineDashOffset",2),S([k],Jt.prototype,"cornerRadius",2),S([k],Jt.prototype,"itemStyler",2),S([k],Jt.prototype,"rotation",2),S([k],Jt.prototype,"outerRadiusOffset",2),S([k],Jt.prototype,"outerRadiusRatio",2),S([k],Jt.prototype,"strokeWidth",2),S([k],Jt.prototype,"sectorSpacing",2),S([k],Jt.prototype,"hideZeroValueSectorsInLegend",2),S([k],Jt.prototype,"title",2),S([k],Jt.prototype,"shadow",2),S([k],Jt.prototype,"calloutLabel",2),S([k],Jt.prototype,"sectorLabel",2),S([k],Jt.prototype,"calloutLine",2),S([k],Jt.prototype,"tooltip",2)}}),MG,hx,Ett=I({"packages/ag-charts-community/src/chart/series/polar/pieSeries.ts"(){"use strict";R(),zs(),Lg(),Wt(),Oe(),Nc(),$u(),B0(),cn(),bu(),E0(),$i(),Ou(),Ta(),Pt(),jn(),Rr(),Go(),Qu(),Gl(),Al(),_tt(),dT(),W0(),MG=class extends eg{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},hx=class extends rx{constructor(t){super({moduleCtx:t,categoryKey:void 0,propertyKeys:{...G0,sectorLabel:["sectorLabelKey"],calloutLabel:["calloutLabelKey"]},propertyNames:{...j0,sectorLabel:["sectorLabelName"],calloutLabel:["calloutLabelName"]},pickModes:[1,0],animationResetFns:{item:hT,label:Vl}}),this.properties=new Jt,this.phantomNodeData=void 0,this.backgroundGroup=new vs({name:`${this.id}-background`,zIndex:0}),this.previousRadiusScale=new Ko,this.radiusScale=new Ko,this.phantomGroup=this.backgroundGroup.appendChild(new Lt({name:"phantom"})),this.phantomSelection=Ci.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new Lt({name:"pieCalloutLabels"})),this.calloutLabelSelection=new Ci(this.calloutLabelGroup,Lt),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new Lt({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new wi({shape:"circle"})),this.surroundingRadius=void 0,this.NodeEvent=MG,this.angleScale=new Ko,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2}get calloutNodeData(){return this.phantomNodeData??this.nodeData}attachSeries(t,e,i){super.attachSeries(t,e,i),t.appendChild(this.backgroundGroup)}detachSeries(t,e,i){super.detachSeries(t,e,i),t?.removeChild(this.backgroundGroup)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.backgroundGroup.zIndex=[0,t],!0):!1}nodeFactory(){const t=new ps;return t.miterLimit=1e9,t}getSeriesDomain(t){return t==="angle"?this.angleScale.domain:this.radiusScale.domain}async processData(t){if(this.data==null)return;const{visible:e,id:i,ctx:{legendManager:s}}=this,{angleKey:a,angleFilterKey:n,radiusKey:o,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c}=this.properties,h=()=>(x,m)=>e&&s.getItemEnabled({seriesId:i,itemId:m})?x:0,u=!this.ctx.animationManager.isSkipped(),d=[],p=[];c?d.push($o(c,"band",{id:"legendItemKey"})):r?d.push($o(r,"band",{id:"calloutLabelKey"})):l&&d.push($o(l,"band",{id:"sectorLabelKey"}));const g=this.radiusScale.type,f=this.angleScale.type;o&&p.push(YL(o,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax,missingValue:this.properties.radiusMax??1,processor:h}),Yt(o,g,{id:"radiusRaw",processor:h}),sd("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),r&&p.push(Yt(r,"band",{id:"calloutLabelValue"})),l&&p.push(Yt(l,"band",{id:"sectorLabelValue"})),c&&p.push(Yt(c,"band",{id:"legendItemValue"})),n&&p.push(ky(n,f,{id:"angleFilterValue",onlyPositive:!0,invalidValue:0,processor:h}),Yt(n,f,{id:"angleFilterRaw"}),sd("angleFilterValue",[0,1],0,0)),u&&this.processedData?.reduced?.animationValidation?.uniqueKeys&&d.length>0&&p.push(Ag(this.id,this.processedData)),p.push(Ig()),await this.requestDataModel(t,this.data,{props:[...d,ky(a,f,{id:"angleValue",onlyPositive:!0,invalidValue:0,processor:h}),Yt(a,f,{id:"angleRaw"}),sd("angleValue",[0,1],0,0),...p]});for(const x of this.processedData?.defs?.values??[]){const{id:m,missing:b,property:v}=x,M=OC(this,b);m!=="angleRaw"&&M>0&&ut.warnOnce(`no value was found for the key '${String(v)}' on ${M} data element${M>1?"s":""}`)}this.animationState.transition("updateData")}maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:t=[],phantomNodeData:e}=this.createNodeData()??{};this.nodeData=t,this.phantomNodeData=e,this.nodeDataRefresh=!1}getProcessedDataValues(t,e){const i=t.resolveColumnById(this,"angleValue",e),s=t.resolveColumnById(this,"angleRaw",e),a=this.properties.angleFilterKey!=null?t.resolveColumnById(this,"angleFilterValue",e):void 0,n=this.properties.angleFilterKey!=null?t.resolveColumnById(this,"angleFilterRaw",e):void 0,o=this.properties.radiusKey?t.resolveColumnById(this,"radiusValue",e):void 0,r=this.properties.radiusKey?t.resolveColumnById(this,"radiusRaw",e):void 0,l=this.properties.calloutLabelKey?t.resolveColumnById(this,"calloutLabelValue",e):void 0,c=this.properties.sectorLabelKey?t.resolveColumnById(this,"sectorLabelValue",e):void 0,h=this.properties.legendItemKey?t.resolveColumnById(this,"legendItemValue",e):void 0;return{angleValues:i,angleRawValues:s,angleFilterValues:a,angleFilterRawValues:n,radiusValues:o,radiusRawValues:r,calloutLabelValues:l,sectorLabelValues:c,legendItemValues:h}}createNodeData(){const{id:t,processedData:e,dataModel:i,angleScale:s,ctx:{legendManager:a},visible:n}=this,{rotation:o}=this.properties;if(!i||e?.type!=="ungrouped")return;const r=this.getProcessedDataValues(i,e),{angleValues:l,angleRawValues:c,angleFilterValues:h,angleFilterRawValues:u,radiusValues:d,radiusRawValues:p,legendItemValues:g}=r,f=u?.some((L,C)=>L>c[C])??!1;let x=0,m=0;const b=[],v=u!=null?[]:void 0,M=e.dataSources.get(this.id)??[],D=e.invalidData?.get(this.id);return M.forEach((L,C)=>{if(D?.[C]===!0)return;const A=f?h[C]:l[C],T=u!=null&&!f?Math.sqrt(u[C]/c[C]):1,N=s.convert(x)+Hi(o);x=A,m+=A;const O=s.convert(x)+Hi(o),E=Math.abs(O-N),z=N+E/2,B=c[C],V=(d?.[C]??1)*T,G=p?.[C],H=g?.[C],$=this.getLabels(C,L,z,E,r),W=this.getSectorFormat(L,C,!1),j={itemId:C,series:this,datum:L,datumIndex:C,angleValue:B,midAngle:z,midCos:Math.cos(z),midSin:Math.sin(z),startAngle:N,endAngle:O,radius:V,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(V),0),sectorFormat:W,radiusValue:G,legendItemValue:H,enabled:n&&a.getItemEnabled({seriesId:t,itemId:C}),...$};b.push(j),v?.push({...j,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0)})}),this.zerosumOuterRing.visible=m===0,{itemId:t,nodeData:b,labelData:b,phantomNodeData:v}}getLabelContent(t,e,i){const{id:s,ctx:a,properties:n}=this,{formatManager:o}=a,{calloutLabel:r,sectorLabel:l,calloutLabelKey:c,sectorLabelKey:h,legendItemKey:u}=n,d=i.calloutLabelValues?.[t],p=i.sectorLabelValues?.[t],g=i.legendItemValues?.[t],f={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},x={callout:void 0,sector:void 0,legendItem:void 0};return c&&(x.callout=this.getLabelText(d,e,c,"calloutLabel",[],r,{...f,value:d})),h&&(x.sector=this.getLabelText(p,e,h,"sectorLabel",[],l,{...f,value:p})),u!=null&&g!=null&&(x.legendItem=o.format(this.callWithContext.bind(this),{type:"category",value:g,datum:e,seriesId:s,legendItemName:void 0,key:u,source:"legend-label",property:"legendItem",domain:[],boundSeries:this.getFormatterContext("legendItem")})??g),x}getLabels(t,e,i,s,a){const{properties:n}=this,{calloutLabel:o,sectorLabel:r,legendItemKey:l}=n,c=this.getLabelContent(t,e,a),h={};return o.enabled&&c.callout&&s>=Hi(o.minAngle)&&(h.calloutLabel={...this.getTextAlignment(i),text:c.callout,hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),r.enabled&&c.sector&&(h.sectorLabel={text:c.sector}),l&&c.legendItem&&(h.legendItem={key:l,text:c.legendItem}),h}getTextAlignment(t){const e=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"top"},{textAlign:"right",textBaseline:"middle"}],i=dm(t),s=-.75*Math.PI,a=i-s,n=Math.floor(a/(Math.PI/2)),o=CI(n,e.length);return e[o]}getNodeFill(t,e,i){return qu(t,{type:"gradient",bounds:"series",colorStops:e.map(s=>({color:s})),gradient:"radial",rotation:0,reverse:!0},{type:"pattern",pattern:"forward-slanted-lines",fill:i,fillOpacity:1,backgroundFill:"none",backgroundFillOpacity:1,stroke:i,strokeOpacity:1,strokeWidth:4,rotation:0},{type:"image",backgroundFill:i,backgroundFillOpacity:1,fit:"contain",repeat:"no-repeat",rotation:0})}getFillParams(t,e,i){if(!(!rn(t)||t.bounds==="item"))return{centerX:0,centerY:0,innerRadius:e,outerRadius:i}}getSectorFormat(t,e,i,s,a){const{angleKey:n,radiusKey:o,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c,fills:h,strokes:u,defaultColorRange:d,defaultPatternFills:p,itemStyler:g}=this.properties,f=u[e%u.length],x=h[e%h.length],{fill:m,fillOpacity:b,stroke:v,strokeWidth:M,strokeOpacity:D,lineDash:L,lineDashOffset:C,cornerRadius:A,opacity:T}=se(this.getHighlightStyle(i,s?.datumIndex,a),{fill:x,stroke:f},this.properties),N=d[e%d.length],O=p[e%p.length],E=m??"black";let z;return g&&(z=this.cachedDatumCallback(this.getDatumId(e)+(i?"-highlight":"-hide"),()=>this.callWithContext(g,{datum:t,angleKey:n,radiusKey:o,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c,fill:this.getNodeFill(E,N,O),strokeOpacity:D,stroke:v,strokeWidth:M,fillOpacity:b,lineDash:L,lineDashOffset:C,cornerRadius:A,highlighted:i,seriesId:this.id}))),{fill:this.getNodeFill(z?.fill??E,N,O),fillOpacity:z?.fillOpacity??b,stroke:z?.stroke??v,strokeWidth:z?.strokeWidth??M,strokeOpacity:z?.strokeOpacity??D,lineDash:z?.lineDash??L,lineDashOffset:z?.lineDashOffset??C,cornerRadius:z?.cornerRadius??A,opacity:T}}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(t){const e=[0,this.getOuterRadius()];this.radiusScale.range=e,t&&(this.previousRadiusScale.range=e);const i=s=>({...s,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(s.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const t=Math.max(0,this.radiusScale.range[1]);if(t===0)return NaN;const i=2+(this.properties.title?.spacing??0),s=Math.max(0,-t);return-t-i-s}update({seriesRect:t}){const{title:e}=this.properties,i={seriesRectWidth:t?.width,seriesRectHeight:t?.height},s=Sr(this.nodeDataDependencies,i)!=null;if(s&&(this._nodeDataDependencies=i),this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),e){const a=this.getTitleTranslationY();e.node.y=isFinite(a)?a:0;const n=e.node.getBBox(!1);e.node.visible=e.enabled&&isFinite(a)&&!this.bboxIntersectsSurroundingSeries(n)}this.zerosumOuterRing.fillOpacity=0,this.zerosumOuterRing.stroke=this.properties.calloutLabel.color,this.zerosumOuterRing.strokeWidth=1,this.zerosumOuterRing.strokeOpacity=1,this.updateNodeMidPoint(),this.updateSelections(),this.updateNodes(t)}updateTitleNodes(){const{oldTitle:t}=this,{title:e}=this.properties;t!==e&&(t&&this.labelGroup?.removeChild(t.node),e&&(e.node.textBaseline="bottom",this.labelGroup?.appendChild(e.node)),this.oldTitle=e)}updateNodeMidPoint(){const t=e=>{const i=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,i),y:e.midSin*Math.max(0,i)}};this.nodeData.forEach(t),this.phantomNodeData?.forEach(t)}updateSelections(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,highlightLabelSelection:s,calloutLabelSelection:a,labelSelection:n}=this,o=this.nodeData.map(l=>({...l,sectorFormat:{...l.sectorFormat}})),r=(l,c)=>{l.update(c,void 0,h=>this.getDatumId(h.datumIndex)),this.ctx.animationManager.isSkipped()&&l.cleanup()};r(t,this.nodeData),r(e,o),r(i,this.phantomNodeData??[]),a.update(this.calloutNodeData,l=>{const c=new pa;c.tag=0,c.pointerEvents=1,l.appendChild(c);const h=new rs;h.tag=1,h.pointerEvents=1,l.appendChild(h)}),n.update(this.nodeData),s.update(o)}updateNodes(t){const e=this.ctx.highlightManager.getActiveHighlight(),{visible:i,dataModel:s,processedData:a}=this;if(this.backgroundGroup.visible=i,this.contentGroup.visible=i,!s||!a)return;const{legendItemValues:n}=this.getProcessedDataValues(s,a),o=this.isSeriesHighlighted(e,n);this.highlightGroup.visible=i&&o,this.highlightLabel.visible=i&&o,this.labelGroup&&(this.labelGroup.visible=i);const r=this.radiusScale.range[0],l=this.radiusScale.range[1],c=this.getShapeFillBBox(),h=this.ctx.animationManager.isSkipped(),u=(d,p,g,f)=>{const x=this.getSectorFormat(p.datum,p.itemId,f,p,n);p.sectorFormat.fill=x.fill,p.sectorFormat.stroke=x.stroke,h&&(d.startAngle=p.startAngle,d.endAngle=p.endAngle,d.innerRadius=p.innerRadius,d.outerRadius=p.outerRadius),(f||h)&&(d.fill=x.fill,d.stroke=x.stroke);const m=this.getFillParams(x.fill,r,l);Il(d,x,void 0,c,m),d.cornerRadius=x.cornerRadius,d.fillShadow=this.properties.shadow;const b=Math.max((this.properties.sectorSpacing+(x.stroke!=null?x.strokeWidth:0))/2,0);d.inset=b,d.lineJoin=this.properties.sectorSpacing>=0||b>0?"miter":"round"};this.itemSelection.each((d,p,g)=>u(d,p,g,!1)),this.highlightSelection.each((d,p,g)=>{u(d,p,g,!0),d.visible=p.itemId===e?.itemId}),this.phantomSelection.each((d,p,g)=>u(d,p,g,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(t),this.updateSectorLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{calloutLine:{length:t,strokeWidth:e,colors:i},strokes:s}=this.properties,a=e,n=J_(i)?i:s,{offset:o}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach(r=>{const l=r.closestDatum(),{calloutLabel:c,outerRadius:h,datumIndex:u}=l;if(c?.text&&!c.hidden&&h!==0){r.visible=!0,r.strokeWidth=a,r.stroke=n[u%n.length],r.strokeOpacity=this.getHighlightStyle(!1,l.datumIndex).opacity??1,r.fill=void 0;const d=l.midCos*h,p=l.midSin*h;let g=l.midCos*(h+t),f=l.midSin*(h+t);if((c.collisionTextAlign??c.collisionOffsetY!==0)&&c.box!=null){const m=c.box;let b=g,v=f;g<m.x?b=m.x:g>m.x+m.width&&(b=m.x+m.width),f<m.y?v=m.y:f>m.y+m.height&&(v=m.y+m.height);const M=b-g,D=v-f,L=Math.sqrt(Math.pow(M,2)+Math.pow(D,2)),C=L-o;C>0&&(g=g+M*C/L,f=f+D*C/L)}r.x1=d,r.y1=p,r.x2=g,r.y2=f}else r.visible=!1})}getLabelOverflow(t,e,i){const s=-this.centerX,a=s+i.width,n=-this.centerY,o=n+i.height,r=1;let l=1;e.x+r<s?l=(e.x+e.width-s)/e.width:e.x+e.width-r>a&&(l=(a-e.x)/e.width);const c=e.y+r<n||e.y+e.height-r>o,h=l===1?t.length:Math.floor(t.length*l)-1,u=this.bboxIntersectsSurroundingSeries(e);return{textLength:h,hasVerticalOverflow:c,hasSurroundingSeriesOverflow:u}}bboxIntersectsSurroundingSeries(t){const{surroundingRadius:e}=this;if(e==null)return!1;const i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=e**2;return i.some(a=>a.x**2+a.y**2>s)}computeCalloutLabelCollisionOffsets(){const{radiusScale:t}=this,{calloutLabel:e,calloutLine:i}=this.properties,{offset:s,minSpacing:a}=e,n=t.convert(0),o=m=>!m.calloutLabel||m.outerRadius===0,r=this.calloutNodeData,l=r.filter(m=>!o(m));if(l.forEach(m=>{const b=m.calloutLabel;b!=null&&(b.hidden=!1,b.collisionTextAlign=void 0,b.collisionOffsetY=0)}),l.length<=1)return;const c=l.filter(m=>m.midCos<0).sort((m,b)=>m.midSin-b.midSin),h=l.filter(m=>m.midCos>=0).sort((m,b)=>m.midSin-b.midSin),u=l.filter(m=>m.midSin<0&&m.calloutLabel?.textAlign==="center").sort((m,b)=>m.midCos-b.midCos),d=l.filter(m=>m.midSin>=0&&m.calloutLabel?.textAlign==="center").sort((m,b)=>m.midCos-b.midCos),p=m=>{const b=m.calloutLabel;if(b==null)return gt.zero.clone();const v=m.outerRadius+i.length+s,M=m.midCos*v,D=m.midSin*v+b.collisionOffsetY,L=b.collisionTextAlign??b.textAlign,C=b.textBaseline;return rs.computeBBox(b.text,M,D,{font:this.properties.calloutLabel,textAlign:L,textBaseline:C},!1)},g=(m,b,v)=>{const M=p(m).grow(a/2),D=p(b).grow(a/2);M.x<D.x+D.width&&M.x+M.width>D.x&&(v==="to-top"?M.y<D.y+D.height:M.y+M.height>D.y)&&(b.calloutLabel.collisionOffsetY=v==="to-top"?M.y-D.y-D.height:M.y+M.height-D.y)},f=m=>{const b=m.slice().sort((M,D)=>Math.abs(M.midSin)-Math.abs(D.midSin))[0],v=m.indexOf(b);for(let M=v-1;M>=0;M--){const D=m[M+1],L=m[M];g(D,L,"to-top")}for(let M=v+1;M<m.length;M++){const D=m[M-1],L=m[M];g(D,L,"to-bottom")}},x=m=>{const b=l.some(A=>A.calloutLabel.collisionOffsetY!==0),v=m.map(A=>p(A)),M=v.map(A=>A.clone().grow(a/2));let D=!1;for(let A=0;A<M.length&&!D;A++){const T=M[A];for(let N=A+1;N<m.length;N++){const O=M[N];if(T.collidesBBox(O)){D=!0;break}}}const L=r.map(A=>{const{startAngle:T,endAngle:N,outerRadius:O}=A;return{startAngle:T,endAngle:N,innerRadius:n,outerRadius:O}}),C=v.some(A=>L.some(T=>gG(A,T)));!D&&!b&&!C||m.filter(A=>A.calloutLabel.textAlign==="center").forEach(A=>{const T=A.calloutLabel;A.midCos<0?T.collisionTextAlign="right":A.midCos>0?T.collisionTextAlign="left":T.collisionTextAlign="center"})};f(c),f(h),x(u),x(d)}updateCalloutLabelNodes(t){const{radiusScale:e}=this,{calloutLabel:i,calloutLine:s}=this.properties,a=s.length,{offset:n,color:o}=i,r=new rs;this.calloutLabelSelection.selectByTag(1).forEach(l=>{const c=l.closestDatum(),h=c.calloutLabel,u=e.convert(c.radius),d=Math.max(0,u);if(!h?.text||d===0||h.hidden){l.visible=!1;return}const p=d+a+n,g=c.midCos*p,f=c.midSin*p+h.collisionOffsetY,x={textAlign:h.collisionTextAlign??h.textAlign,textBaseline:h.textBaseline};r.text=h.text,r.x=g,r.y=f,r.setFont(this.properties.calloutLabel),r.setAlign(x);const m=r.getBBox(!1);let b=h.text,v=!0;if(i.avoidCollisions){const{textLength:M,hasVerticalOverflow:D}=this.getLabelOverflow(h.text,m,t);b=h.text.length===M?h.text:`${h.text.substring(0,M)}\u2026`,v=!D}l.text=b,l.x=g,l.y=f,l.setFont(this.properties.calloutLabel),l.setAlign(x),l.fill=o,l.fillOpacity=this.getHighlightStyle(!1,c.datumIndex).opacity??1,l.visible=v})}computeLabelsBBox(t,e){const{calloutLabel:i,calloutLine:s}=this.properties,a=s.length,{offset:n,maxCollisionOffset:o,minSpacing:r}=i;if(!i.avoidCollisions)return null;this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new rs;let h;const{title:u}=this.properties;if(u?.text&&u.enabled){const d=this.getTitleTranslationY();isFinite(d)&&(c.text=u.text,c.x=0,c.y=d,c.setFont(u),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.getBBox(!1),l.push(h))}return this.calloutNodeData.forEach(d=>{const p=d.calloutLabel;if(!p||d.outerRadius===0)return null;const g=d.outerRadius+a+n,f=d.midCos*g,x=d.midSin*g+p.collisionOffsetY;c.text=p.text,c.x=f,c.y=x,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:p.collisionTextAlign??p.textAlign,textBaseline:p.textBaseline});const m=c.getBBox(!1);if(p.box=m,Math.abs(p.collisionOffsetY)>o){p.hidden=!0;return}if(h){const b=-this.centerY,v=new gt(h.x-r,b,h.width+2*r,h.y+h.height+r-b);if(m.collidesBBox(v)){p.hidden=!0;return}}if(t.hideWhenNecessary){const{textLength:b,hasVerticalOverflow:v,hasSurroundingSeriesOverflow:M}=this.getLabelOverflow(p.text,m,e),D=p.text.length>2&&b<2;if(v||D||M){p.hidden=!0;return}}p.hidden=!1,l.push(m)}),l.length===0?null:gt.merge(l)}updateSectorLabelNodes(){const{radiusScale:t}=this,e=t.convert(0),{fontSize:i,fontStyle:s,fontWeight:a,fontFamily:n,positionOffset:o,positionRatio:r,color:l}=this.properties.sectorLabel,c=e>0,h=this.ctx.legendManager.getData(this.id)?.filter(d=>d.enabled).length===1,u=(d,p)=>{const{sectorLabel:g,outerRadius:f,startAngle:x,endAngle:m}=p;let b=!1;if(g&&f!==0){const v=e*(1-r)+f*r+o;d.fill=l,d.fillOpacity=this.getHighlightStyle(!1,p.datumIndex).opacity??1,d.fontStyle=s,d.fontWeight=a,d.fontSize=i,d.fontFamily=n,d.text=g.text,!c&&h?(d.x=0,d.y=0):(d.x=p.midCos*v,d.y=p.midSin*v),d.textAlign="center",d.textBaseline="middle";const D=d.getBBox(!1),L=[[D.x,D.y],[D.x+D.width,D.y],[D.x+D.width,D.y+D.height],[D.x,D.y+D.height]],C={startAngle:x,endAngle:m,innerRadius:e,outerRadius:f};L.every(([A,T])=>N0(A,T,C))&&(b=!0)}d.visible=b};this.labelSelection.each(u),this.highlightLabelSelection.each(u)}updateZerosumRings(){this.zerosumOuterRing.size=this.getOuterRadius()*2}pickNodeClosestDatum(t){return uT(this,t)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a,ctx:{formatManager:n}}=this,{legendItemKey:o,calloutLabelKey:r,calloutLabelName:l,sectorLabelKey:c,sectorLabelName:h,angleKey:u,angleName:d,radiusKey:p,radiusName:g,tooltip:f}=a,x=this.properties.title.text;if(!i||!s)return;const m=s.dataSources.get(this.id)?.[t],b=this.getProcessedDataValues(i,s),{angleRawValues:v}=b,M=v[t],D=this.getLabelContent(t,m,b),L=D.legendItem??D.callout??D.sector??d,C=i.getDomain(this,"angleRaw","value",s),A=n.format(this.callWithContext.bind(this),{type:"number",value:M,datum:m,seriesId:e,legendItemName:void 0,key:u,source:"tooltip",property:"angle",domain:C,boundSeries:this.getFormatterContext("angle"),fractionDigits:void 0})??Cc(M,3);return this.formatTooltipWithContext(f,{title:x,symbol:this.legendItemSymbol(t),data:[{label:L,fallbackLabel:u,value:A}]},{seriesId:e,datum:m,title:d,legendItemKey:o,calloutLabelKey:r,calloutLabelName:l,sectorLabelKey:c,sectorLabelName:h,angleKey:u,angleName:d,radiusKey:p,radiusName:g,...this.getSectorFormat(m,t,!1)})}legendItemSymbol(t){const e=this.processedData?.dataSources.get(this.id)?.[t],i=this.getSectorFormat(e,t,!1),{fillOpacity:s,strokeOpacity:a,strokeWidth:n,lineDash:o,lineDashOffset:r}=this.properties;let{fill:l}=i;const{stroke:c}=i;return rn(l)&&(l={...l,gradient:"linear",rotation:0,reverse:!1}),{marker:{fill:l,stroke:c,fillOpacity:s,strokeOpacity:a,strokeWidth:n,lineDash:o,lineDashOffset:r}}}getLegendData(t){const{id:e,visible:i,processedData:s,dataModel:a,ctx:{legendManager:n}}=this;if(!a||!s||t!=="category")return[];const{angleKey:o,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c,showInLegend:h}=this.properties;if(!c&&(!r||r===o)&&(!l||l===o))return[];const u=this.getProcessedDataValues(a,s),{angleRawValues:d}=u,p=this.properties.title?.showInLegend&&this.properties.title.text,g=[],f=this.properties.hideZeroValueSectorsInLegend,x=s.dataSources.get(this.id),m=s.invalidData?.get(this.id);for(let b=0;b<s.input.count;b++){const v=x?.[b],M=d[b];if(m?.[b]===!0||f&&M===0)continue;const D=[];p&&D.push(p);const L=this.getLabelContent(b,v,u);c&&L.legendItem!==void 0?D.push(L.legendItem):r&&r!==o&&L.callout!==void 0?D.push(L.callout):l&&l!==o&&L.sector!==void 0&&D.push(L.sector),D.length!==0&&g.push({legendType:"category",id:e,datum:v,itemId:b,seriesId:e,hideToggleOtherSeries:!0,enabled:i&&n.getItemEnabled({seriesId:e,itemId:b}),label:{text:D.join(" - ")},symbol:this.legendItemSymbol(b),legendItemName:c!=null?v[c]:void 0,hideInLegend:!h})}return g}setLegendState(t){const{id:e,ctx:{legendManager:i,updateService:s}}=this;t.forEach((a,n)=>i.toggleItem(a,e,n)),i.update(),s.update(5)}animateEmptyUpdateReady(t){const{animationManager:e}=this.ctx,i=kd(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);Ue(this.id,"nodes",e,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(s,a)=>this.getDatumId(a.datumIndex)),le(this,"callout",e,this.calloutLabelSelection),le(this,"sector",e,this.labelSelection),le(this,"highlight",e,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,processedData:s,radiusScale:a,previousRadiusScale:n}=this,{animationManager:o}=this.ctx,r=s?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=(r?.moved.size??0)===0,c=(s?.defs.keys.length??0)>0,h=s?.reduced?.animationValidation?.uniqueKeys??!0;(!l||!c||!h)&&this.ctx.animationManager.skipCurrentBatch();const u=kd(!1,this.properties.rotation,a,n);Ue(this.id,"nodes",o,[t,e,i],u.nodes,(d,p)=>this.getDatumId(p.datumIndex),r),le(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),le(this,"sector",this.ctx.animationManager,this.labelSelection),le(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,radiusScale:s,previousRadiusScale:a}=this,{animationManager:n}=this.ctx,o=kd(!1,this.properties.rotation,s,a);Ue(this.id,"nodes",n,[t,e,i],o.nodes,(r,l)=>this.getDatumId(l.datumIndex)),ph(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),ph(this,"sector",this.ctx.animationManager,this.labelSelection),ph(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumId(t){return`${t}`}},hx.className="PieSeries",hx.type="pie"}}),DG,Rtt=I({"packages/ag-charts-community/src/chart/series/polar/pieTheme.ts"(){"use strict";Rp(),li(),bi(),DG={series:{title:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:Oa.LARGE},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},spacing:5},calloutLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},offset:3,minAngle:.001},sectorLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"chartBackgroundColor"},positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2,colors:{$map:[{$if:[{$or:[{$isGradient:{$value:"$1"}},{$isPattern:{$value:"$1"}},{$isImage:{$value:"$1"}}]},{$path:["../../strokes/$index",{$ref:"foregroundColor"}]},{$value:"$1"}]},{$if:[{$eq:[{$path:"../strokeWidth"},0]},{$path:"../fills"},{$path:"../strokes"}]}]}},fills:{$palette:"fills"},strokes:{$palette:"strokes"},defaultColorRange:{$palette:"gradients"},defaultPatternFills:zS,fillOpacity:1,strokeOpacity:1,strokeWidth:{$isUserOption:["./strokes/0",2,0]},lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:Cl,xOffset:3,yOffset:3,blur:5},highlight:Vc()},legend:{enabled:!0}}}}),kG,IG,AG=I({"packages/ag-charts-community/src/chart/series/polar/pieSeriesModule.ts"(){"use strict";Ett(),b2(),Rtt(),kG={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",moduleFactory:t=>new hx(t),themeTemplate:DG},IG={type:"series",name:"pie",chartType:"polar",options:ah,create:t=>new hx(t)}}});function fT(){_o.register(mw,u4,e4,U4,Kw,oG,iT,hG,bG,kG,rG);for(const t of[Yo,eh,Zo,sh,ad,Rl])Tc.register(t.type,{moduleFactory:e=>new t(e)})}var CG=I({"packages/ag-charts-community/src/chart/factory/registerInbuiltModules.ts"(){"use strict";FJ(),xr(),id(),YS(),XS(),wg(),Tg(),lV(),a4(),qJ(),Bw(),Zw(),Qw(),eT(),aT(),rT(),SG(),AG(),Jv()}});function Btt(){for(const t of _o.modules){if(t.packageType==="enterprise"&&!e7(t)&&ut.errorOnce("Unexpected enterprise module registered: "+t.identifier),t.type==="root"&&t.themeTemplate)for(const e of t.chartTypes)iS.set(e,t.themeTemplate);if(t.type==="series"){if(t.chartTypes.length>1)throw new Error(`AG Charts - Module definition error: ${t.identifier}`);Wn.register(t.identifier,t)}if(t.type==="series-option"&&t.themeTemplate)for(const e of t.seriesTypes)Wn.setThemeTemplate(e,t.themeTemplate);if(t.type==="axis-option"&&t.themeTemplate)for(const e of t.axisTypes){const i=Tc.getThemeTemplate(e),s=se(t.themeTemplate,i);Tc.setThemeTemplate(e,s)}t.type==="axis"&&Tc.register(t.identifier,t),t.type==="legend"&&eS.register(t.identifier,t)}if(_o.hasEnterpriseModules()){const t=i7();t.length>0&&ut.errorOnce("Enterprise modules expected but not registered: ",t)}}var ztt=I({"packages/ag-charts-community/src/chart/factory/setupModules.ts"(){"use strict";R(),xr(),Pt(),Jv(),Wu(),tS(),FC(),Om()}});function ao(t,e){const i={};for(const s of Object.keys(e)){const a=e[s];a!==xa&&Object.hasOwn(t,s)&&(i[s]=a)}return i}var xa,LG=I({"packages/ag-charts-community/src/api/preset/presetUtils.ts"(){"use strict";xa=Symbol("IGNORED_PROP")}});function wG(t){const{enabled:e,mode:i,showArrow:s,range:a,position:n,pagination:o,delay:r,wrapping:l,interaction:c,renderer:h,...u}=t,d=ao(t,{enabled:e,showArrow:s,range:a,position:n,interaction:c,renderer:h,...u});return{chartTooltipOptions:ao(t,{enabled:xa,showArrow:xa,range:xa,position:xa,mode:i,pagination:o,delay:r,wrapping:l,...u}),seriesTooltipOptions:d}}function Ftt(t){const{animation:e,background:i,container:s,contextMenu:a,context:n,footnote:o,height:r,listeners:l,locale:c,minHeight:h,minWidth:u,overrideDevicePixelRatio:d,padding:p,subtitle:g,theme:f,title:x,width:m,type:b,cursor:v,nodeClickRange:M,tooltip:D={},value:L,scale:C={},startAngle:A,endAngle:T,highlightStyle:N,highlight:O,segmentation:E,bar:z,needle:B,targets:F,outerRadius:V,innerRadius:G,outerRadiusRatio:H,innerRadiusRatio:$,cornerRadius:W,cornerMode:j,label:U,secondaryLabel:Z,spacing:X,...q}=t,{chartTooltipOptions:tt,seriesTooltipOptions:J}=wG(D),at=ao(t,{animation:e,background:i,container:s,contextMenu:a,context:n,footnote:o,height:r,listeners:l,locale:c,minHeight:h,minWidth:u,overrideDevicePixelRatio:d,padding:p,subtitle:g,theme:f,title:x,tooltip:tt,width:m}),et=ao(t,{needle:B!=null?{enabled:!0,...B}:xa,startAngle:A,endAngle:T,scale:C,type:b,cursor:v,context:n,nodeClickRange:M,tooltip:J,value:L,highlightStyle:N,highlight:O,segmentation:E,bar:z,targets:F,outerRadius:V,innerRadius:G,outerRadiusRatio:H,innerRadiusRatio:$,cornerRadius:W,cornerMode:j,label:U,secondaryLabel:Z,spacing:X,...q});return{...at,series:[et]}}function Vtt(t){const{animation:e,background:i,container:s,contextMenu:a,context:n,footnote:o,height:r,listeners:l,locale:c,minHeight:h,minWidth:u,overrideDevicePixelRatio:d,padding:p,subtitle:g,theme:f,title:x,width:m,type:b,cursor:v,nodeClickRange:M,tooltip:D={},value:L,scale:C={},direction:A="vertical",thickness:T,highlightStyle:N,highlight:O,segmentation:E,bar:z,targets:B,cornerRadius:F,cornerMode:V,label:G,...H}=t,{chartTooltipOptions:$,seriesTooltipOptions:W}=wG(D),j=ao(t,{animation:e,background:i,container:s,contextMenu:a,context:n,footnote:o,height:r,listeners:l,locale:c,minHeight:h,minWidth:u,overrideDevicePixelRatio:d,padding:p,subtitle:g,theme:f,title:x,tooltip:$,width:m}),U=ao(t,{scale:C,type:b,cursor:v,context:n,nodeClickRange:M,tooltip:W,value:L,direction:A,thickness:T,highlightStyle:N,highlight:O,segmentation:E,bar:z,targets:B,cornerRadius:F,cornerMode:V,label:G,...H});return{...j,series:[U]}}function TG(t,e){if(e==null)return t;const{targets:i,...s}=e;return t=se(t,s),t.targets!=null&&i!=null&&(t.targets=A_(t.targets,i)),t}function Gtt(t,e){switch(t.type){case"radial-gauge":const i=TG(t,e);return Ftt(i);case"linear-gauge":const s=TG(t,e);return Vtt(s);default:return{}}}var jtt=I({"packages/ag-charts-community/src/api/preset/gauge.ts"(){"use strict";xl(),Pt(),LG()}}),bn,As,mT,jr,yh,$0,U0,NG,Wtt=I({"packages/ag-charts-community/src/api/preset/priceVolumePresetTheme.ts"(){"use strict";Rp(),li(),bn={stroke:Ye},As={fill:og},mT={color:"white",fill:Ye},jr={color:Ye},yh={color:ng,fontSize:{$rem:Oa.LARGE},fontFamily:{$ref:"fontFamily"}},$0={...yh,fontSize:{$ref:"fontSize"},color:cg,fill:rg,stroke:lg,strokeWidth:1,divider:{stroke:hg,strokeWidth:1,strokeOpacity:.5}},U0={...bn,background:{fill:Ti,fillOpacity:.2},handle:{...As},text:{...jr},statistics:{...$0}},NG={line:{...bn,handle:{...As},text:{...jr}},"horizontal-line":{...bn,handle:{...As},axisLabel:{...mT},text:{...jr}},"vertical-line":{...bn,handle:{...As},axisLabel:{...mT},text:{...jr}},"disjoint-channel":{...bn,background:{fill:Ti,fillOpacity:.2},handle:{...As},text:{...jr}},"parallel-channel":{...bn,background:{fill:Ti,fillOpacity:.2},handle:{...As},text:{...jr}},"fibonacci-retracement":{...bn,strokes:ag,rangeStroke:Ye,handle:{...As},text:{...jr,position:"center"},label:{...yh,color:void 0,fontSize:{$rem:Oa.SMALLER}}},"fibonacci-retracement-trend-based":{...bn,strokes:ag,rangeStroke:Ye,handle:{...As},text:{...jr,position:"center"},label:{...yh,color:void 0,fontSize:{$rem:Oa.SMALLER}}},callout:{...bn,...yh,color:{$ref:"textColor"},handle:{...As},fill:Ti,fillOpacity:.2},comment:{...yh,color:"white",fontWeight:700,handle:{...As},fill:Ye},note:{...yh,color:fg,fill:Ye,stroke:{$ref:"chartBackgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...As},background:{fill:pg,stroke:gg,strokeWidth:1}},text:{...yh,handle:{...As}},arrow:{...bn,handle:{...As},text:{...jr}},"arrow-up":{fill:{$palette:"up.fill"},handle:{...As,stroke:Ye}},"arrow-down":{fill:{$palette:"down.fill"},handle:{...As,stroke:Ye}},"date-range":{...U0},"price-range":{...U0},"date-price-range":{...U0},"quick-date-price-range":{up:{...bn,fill:Ti,fillOpacity:.2,handle:{...As},statistics:{...$0,color:"#fff",fill:Ti,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...bn,stroke:dg,fill:ug,fillOpacity:.2,handle:{...As,stroke:dg},statistics:{...$0,color:"#fff",fill:ug,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{enabled:!0}}}});function Htt(t,e,i){const{dateKey:s="date",highKey:a="high",openKey:n="open",lowKey:o="low",closeKey:r="close",volumeKey:l="volume",chartType:c="candlestick",navigator:h=!1,volume:u=!0,rangeButtons:d=!0,statusBar:p=!0,toolbar:g=!0,zoom:f=!0,sync:x=!1,theme:m,data:b,formatter:v,...M}=t,D=Utt(c,s,a,o,n,r),L=$tt(i,n,r,u,l),A={navigator:{enabled:h,...u?{miniChart:{enabled:h,series:[{type:"line",xKey:s,yKey:l,stroke:cy,marker:{enabled:!1}}]},height:40,minHandle:{height:46},maxHandle:{height:46}}:null}},T={annotations:{enabled:g,optionsToolbar:{enabled:g},snap:!0,toolbar:{enabled:g,buttons:EG,padding:0},data:b,xKey:s,volumeKey:u?l:void 0}},N=p?{statusBar:{enabled:!0,data:b,highKey:a,openKey:n,lowKey:o,closeKey:r,volumeKey:u?l:void 0}}:null,O={zoom:{enabled:f,autoScaling:{enabled:!0},enableIndependentAxes:!0}},E={ranges:{enabled:d}},z=x?{sync:{enabled:x,nodeInteraction:!0,zoom:!0}}:null,B=u?[{type:"number",position:"left",keys:[l],label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percent",align:"end"}}]:[];return{theme:{baseTheme:typeof m=="string"?m:"ag-financial",...se(typeof m=="object"?m:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:6},chartToolbar:{enabled:g},annotations:{...NG},axes:{number:{interval:{maxSpacing:45},label:{format:".2f"}}}},bar:{series:{fillOpacity:.5}},line:{series:{marker:{enabled:!1},...PG(c,{hlc:{stroke:{$palette:"altNeutral.stroke"},strokeWidth:2},line:{stroke:{$palette:"neutral.stroke"}},"step-line":{stroke:{$palette:"neutral.stroke"},interpolation:{type:"step"}}})}},candlestick:{series:{...PG(c,{"hollow-candlestick":{item:{up:{fill:"transparent"}}}})}},"range-area":{series:{fillOpacity:.3,strokeWidth:2}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...L,...D],axes:[{type:"number",position:"right",keys:[n,r,a,o],crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percent",align:"start"}},...B,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],tooltip:{enabled:!1},data:b,formatter:v,...T,...A,...N,...O,...E,...z,...M}}function $tt(t,e,i,s,a){return s?[{type:"bar",xKey:"date",yKey:a,tooltip:{enabled:!1},itemStyler({datum:n}){const{up:o,down:r}=t().palette;return{fill:n[e]<n[i]?o?.fill:r?.fill}},focusPriority:1,fastDataProcessing:!0,highlight:{enabled:!1}}]:[]}function Utt(t,e,i,s,a,n){const o={xKey:e,openKey:a,closeKey:n,highKey:i,lowKey:s},r={xKey:e,yKey:n},l={pickOutsideVisibleMinorAxis:!0};switch(t??"candlestick"){case"ohlc":return Ktt(l,o);case"line":case"step-line":return Ytt(l,r);case"hlc":return Ztt(l,r,o);case"high-low":return Xtt(l,o);case"candlestick":case"hollow-candlestick":return OG(l,o);default:return ut.warnOnce(`unknown chart type: ${t}; expected one of: ${_G.join(", ")}`),OG(l,o)}}function Ktt(t,e){return[{type:"ohlc",focusPriority:0,...t,...e}]}function Ytt(t,e){return[{type:"line",focusPriority:0,...t,...e}]}function Ztt(t,e,{xKey:i,highKey:s,closeKey:a,lowKey:n}){return[{type:yT,focusPriority:0,...t,xKey:i,yHighKey:s,yLowKey:a,fill:sy,stroke:ey},{type:yT,focusPriority:0,...t,xKey:i,yHighKey:a,yLowKey:n,fill:ay,stroke:iy},{type:"line",...t,...e}]}function Xtt(t,{xKey:e,highKey:i,lowKey:s}){return[{type:"range-bar",...t,xKey:e,yHighKey:i,yLowKey:s,fill:oy,stroke:ny,tooltip:{range:"nearest"},focusPriority:0,fastDataProcessing:!0}]}function OG(t,e){return[{type:"candlestick",focusPriority:0,...t,...e}]}function PG(t,e){return e[t]??e.default}var _G,EG,yT,qtt=I({"packages/ag-charts-community/src/api/preset/priceVolumePreset.ts"(){"use strict";R(),li(),bi(),Pt(),Wtt(),_G=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"],EG=[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"fibonacci-retracement-drawing",tooltip:"toolbarAnnotationsFibonacciAnnotations",value:"fibonacci-menu"},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"measurer-drawing",tooltip:"toolbarAnnotationsMeasurerAnnotations",value:"measurer-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}],yT="range-area"}});function Qtt(t,e){return typeof t=="string"?{...e,baseTheme:t}:t!=null?{...t,baseTheme:bT(t.baseTheme,e)}:e}function RG(t){if(Array.isArray(t)&&t.length!==0){const e=t.find(i=>i!=null);if(typeof e=="number")return{data:t.map((s,a)=>({x:a,y:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"y"};if(Array.isArray(e))return{data:t.map(s=>({x:s?.[0],y:s?.[1],datum:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"datum"}}else if(t?.length===0)return{data:t,series:[{xKey:"x",yKey:"y"}],datumKey:"y"};return{data:t}}function Jtt(t){switch(t?.type){case"number":{const{type:a,min:n,max:o,reverse:r}=t;return ao(t,{type:a,reverse:r,min:n,max:o})}case"time":{const{type:a,min:n,max:o,reverse:r}=t;return ao(t,{type:a,reverse:r,min:n,max:o})}case"category":default:const{paddingInner:e,paddingOuter:i,reverse:s}=t??{};return ao({...t,type:"category"},{type:"category",reverse:s,paddingInner:e,paddingOuter:i})}}function tet(t,e,i){const s={};return t?.stroke!=null&&(s.style=[{stroke:t?.stroke}],s.enabled??(s.enabled=!0)),t?.strokeWidth!=null&&(s.width=t?.strokeWidth,s.enabled??(s.enabled=!0)),i.type==="bar"&&i.direction!=="horizontal"&&(s.enabled??(s.enabled=!0)),t?.visible!=null&&(s.enabled=t.visible),s.enabled??(s.enabled=e),s}function eet(t){const{background:e,container:i,height:s,listeners:a,locale:n,minHeight:o,minWidth:r,overrideDevicePixelRatio:l,padding:c,width:h,theme:u,data:d,crosshair:p,axis:g,min:f,max:x,tooltip:m,context:b,styleNonce:v,...M}=t,D=ao(t,{background:e,container:i,height:s,listeners:a,locale:n,minHeight:o,minWidth:r,overrideDevicePixelRatio:l,padding:c,width:h,styleNonce:v,tooltip:xa,context:xa,data:xa,crosshair:xa,axis:xa,min:xa,max:xa,theme:xa}),{data:L,series:[C]=[],datumKey:A}=RG(d),T=M;C!=null&&Object.assign(T,C),T.tooltip={...m,renderer:FG(b,m,A)},D.theme=bT(u,zG),D.data=L,D.series=[T];const N=T.type!=="bar"||T.direction!=="horizontal",[O,E]=N?["bottom","left"]:["left","bottom"],z={...Jtt(g),position:O,...ao(t,{crosshair:p})},B={type:"number",gridLine:tet(g,!1,t),position:E,...ao(t,{min:f,max:x})};return D.axes=N?[B,z]:[z,B],D}var xT,K0,ux,Y0,BG,zG,bT,FG,iet=I({"packages/ag-charts-community/src/api/preset/sparkline.ts"(){"use strict";li(),Im(),LG(),xT={title:{enabled:!1},label:{enabled:!1},line:{enabled:!1},gridLine:{enabled:!1},crosshair:{enabled:!1,stroke:ly,lineDash:[0],label:{enabled:!1}}},K0={...xT,nice:!1},ux={mode:"compact",position:{anchorTo:"node",placement:["right","left"]},showArrow:!1},Y0={style:[{stroke:{$ref:"gridLineColor"}}],width:2},BG={number:{gridLine:Y0},time:{gridLine:Y0},category:{gridLine:Y0}},zG={overrides:{common:{animation:{enabled:!1},contextMenu:{enabled:!1},keyboard:{enabled:!1},background:{visible:!1},navigator:{enabled:!1},padding:{top:0,right:0,bottom:0,left:0},axes:{number:{...K0,interval:{values:[0]}},log:{...K0},time:{...K0},category:{...xT}}},bar:{series:{crisp:!1,label:{placement:"inside-end",padding:4},sparklineMode:!0},tooltip:{...ux,position:{...ux.position,anchorTo:"pointer"},range:"nearest"},axes:BG},line:{seriesArea:{padding:{top:2,right:2,bottom:2,left:2}},series:{sparklineMode:!0,strokeWidth:1,marker:{enabled:!1,size:3}},tooltip:ux},area:{seriesArea:{padding:{top:1,right:0,bottom:1,left:0}},series:{strokeWidth:1,fillOpacity:.4},tooltip:ux}}},bT=ea(Qtt),FG=ea((t,e,i)=>s=>{const a=s.datum[s.xKey],n=s.datum[s.yKey],o=i!=null?s.datum[i]:s.datum,r=e?.renderer?.({context:t,datum:o,xValue:a,yValue:n});if(typeof r=="string")return r;const l=r?.content??n.toFixed(2);return r?.title?{heading:void 0,title:void 0,data:[{label:r.title,value:l}]}:{heading:void 0,title:l,data:[]}})}}),VG,Z0,X0,q0,Q0,GG,jG,WG,set=I({"packages/ag-charts-community/src/api/preset/presetModules.ts"(){"use strict";R(),Ba(),h2(),d2(),m2(),Pt(),jtt(),jL(),qtt(),iet(),VG={chartType:ot("candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"),dateKey:Q,openKey:Q,highKey:Q,lowKey:Q,closeKey:Q,volumeKey:Q,navigator:Y,volume:Y,rangeButtons:Y,statusBar:Y,toolbar:Y,zoom:Y,sync:Y,theme:Ct,container:Ct,width:Ct,height:Ct,minWidth:Ct,minHeight:Ct,listeners:Ct,initialState:Ct,title:Ct,data:Js,formatter:Ct},Z0={theme:Ct,container:Ct,animation:Ct,background:Ct,contextMenu:Ct,context:()=>!0,listeners:Ct,locale:Ct,width:Ct,height:Ct,minWidth:Ct,minHeight:Ct,title:Ct,subtitle:Ct,footnote:Ct,padding:Ct,tooltip:{...te,...Tt.tooltip}},Z0.overrideDevicePixelRatio=_t(K),X0=["showInLegend","showInMiniChart","grouped","stacked","stackGroup","tooltip","listeners","errorBar","xKey","yKey","type"],q0={visible:Y,reverse:Y,stroke:pt,strokeWidth:K},Q0={context:()=>!0,tooltip:Ct,theme:Ct,background:Ct,container:Ct,width:Ct,height:Ct,minWidth:Ct,minHeight:Ct,padding:Ct,listeners:Ct,locale:Ct,data:Ct,styleNonce:Q,axis:ou({number:{...q0,min:ze(nt,fr("max")),max:ze(nt,mr("min"))},category:{...q0,paddingInner:Mt,paddingOuter:Mt},time:{...q0,min:ze(Bt(nt,ll),fr("max")),max:ze(Bt(nt,ll),mr("min"))}},"axis options","category"),min:ze(nt,fr("max")),max:ze(nt,mr("min")),crosshair:{enabled:Y,snap:Y,...rt,...yt},xKey:Q,yKey:Q},GG={type:"preset",name:"price-volume",enterprise:!0,options:VG,create:Htt},jG={type:"preset",name:"gauge-preset",enterprise:!0,options:ou({"linear-gauge":{...dt(_l,["type"]),...Z0},"radial-gauge":{...dt(Dg,["type"]),...Z0}},"gauge options"),create:Gtt},WG={type:"preset",name:"sparkline",options:ou({area:{...Q0,...dt(c2,X0)},bar:{...Q0,...dt(Ng,X0)},line:{...Q0,...dt(Cy,X0)}},"sparkline options"),create:eet,processData:RG}}});function vT(t,e){return t?e?.width:e?.height}var HG,dx,$G,aet=I({"packages/ag-charts-community/src/chart/cartesianChart.ts"(){"use strict";R(),zs(),wg(),TS(),qB(),za(),HG=["top","right","bottom","left"],dx=class cZ extends ty{constructor(e,i){super(e,i),this.paired=!0,this.lastUpdateClipRect=void 0,this.lastLayoutWidth=NaN,this.lastLayoutHeight=NaN}onAxisChange(e,i){super.onAxisChange(e,i),this.syncAxisChanges(e,i),this.ctx!=null&&this.ctx.zoomManager.updateAxes(e)}destroySeries(e){super.destroySeries(e),this.lastLayoutWidth=NaN,this.lastLayoutHeight=NaN}getChartType(){return"cartesian"}setRootClipRects(e){const{seriesRoot:i,annotationRoot:s}=this;i.setClipRect(e),s.setClipRect(e)}async processData(){await super.processData(),this.syncStatus==="init"&&(this.syncStatus="domains-calculated"),this.ctx.updateService.dispatchProcessData({series:{shouldFlipXY:this.shouldFlipXY()}})}async processDomains(){await super.processDomains();for(const e of this.axes){const i=await this.getSyncedDomain(e);i!=null&&e.setDomains(i)}}performLayout(e){const{seriesRoot:i,annotationRoot:s}=this,{clipSeries:a,seriesRect:n,visible:o}=this.updateAxes(e.layoutBox);this.seriesRoot.visible=o,this.seriesRect=n,this.animationRect=e.layoutBox;const{x:r,y:l}=n;if(e.width!==this.lastLayoutWidth||e.height!==this.lastLayoutHeight)for(const d of[i,s])d.translationX=Math.floor(r),d.translationY=Math.floor(l);else{const{translationX:d,translationY:p}=i;vl(this.id,"seriesRect",this.ctx.animationManager,[i,s],{translationX:d,translationY:p},{translationX:Math.floor(r),translationY:Math.floor(l)},{phase:"update"})}this.lastLayoutWidth=e.width,this.lastLayoutHeight=e.height;const c=n.clone().grow(this.seriesArea.padding),h=this.seriesArea.clip||a?c:void 0,{lastUpdateClipRect:u}=this;this.lastUpdateClipRect=h,this.ctx.animationManager.isActive()&&u!=null?this.ctx.animationManager.animate({id:this.id,groupId:"clip-rect",phase:"update",from:u,to:c,onUpdate:d=>this.setRootClipRects(d),onComplete:()=>this.setRootClipRects(h)}):this.setRootClipRects(h),this.ctx.layoutManager.emitLayoutComplete(e,{axes:this.axes.map(d=>d.getLayoutState()),series:{visible:o,rect:n,paddedRect:c},clipSeries:a})}updateAxes(e){const{clipSeries:i,seriesRect:s,overflows:a}=this.resolveAxesLayout(e);for(const n of this.axes)n.update(),n.setCrossLinesVisible(!a),this.clipAxis(n,s,e);return{clipSeries:i,seriesRect:s,visible:!a}}resolveAxesLayout(e){let i,s,a=0;const n=10;do if(s=i??this.getDefaultState(),i=this.updateAxesPass(new Map(s.axisAreaWidths),e.clone()),a++>n){ut.warn("Max iterations reached. Unable to stabilize axes layout.");break}while(!this.isLayoutStable(i,s));return this.lastAreaWidths=i.axisAreaWidths,i}updateAxesPass(e,i){const s=new Map,a={};let n=!1,o=!1;for(const m of HG){const b=this.seriesArea.padding[m],v=this.axes.findLast(M=>M.position===m);v?v.seriesAreaPadding=b:i.shrink(b,m)}const r=(e.get("left")??0)+(e.get("right")??0),l=(e.get("top")??0)+(e.get("bottom")??0),c=this.buildCrossLinePadding(e),h=c.left+c.right,u=c.top+c.bottom;i.width<=r+h||i.height<=l+u?n=!0:i.shrink(c);const{scene:d}=this.ctx,p=i.clone().shrink(Object.fromEntries(e));for(const m of this.axes){const{position:b="left",direction:v}=m,M=v==="y";let D;this.sizeAxis(m,p,b),m.thickness==null?D=vT(M,d)*(m.maxThicknessRatio??1):D=m.thickness;const{primaryTickCount:L,bbox:C}=m.calculateLayout(m.nice?a[v]:void 0,{sizeLimit:D,padding:this.padding});a[v]??(a[v]=L),o||(o=m.dataDomain.clipped||m.visibleRange[0]>0||m.visibleRange[1]<1),m.thickness==null&&(D=Math.min(vT(M,C)??0,D)),s.set(m.id,Math.ceil(D))}const g=_b(this.axes,m=>m.position??"left"),f=new Map,x=new Map;for(const[m,b]of Oo(g)){let v=vT(m!=="left"&&m!=="right",d)%d.pixelRatio,M=0;for(const D of b??[]){x.set(D.id,v);const L=s.get(D.id)??0;M=Math.max(M,v+L),D.layoutConstraints.stacked&&(v+=L+cZ.AxesPadding)}f.set(m,Math.ceil(M))}for(const[m,b]of Oo(g))this.positionAxes({axes:b??[],position:m,axisWidths:s,axisOffsets:x,axisAreaWidths:f,axisBound:i,seriesRect:p});return{clipSeries:o,seriesRect:p,axisAreaWidths:f,overflows:n}}buildCrossLinePadding(e){const i={top:0,right:0,bottom:0,left:0};this.axes.forEach(s=>{const{position:a,label:n}=s;s.crossLines?.forEach(o=>{var r;o instanceof ia&&(o.position=a??"top",(r=o.label).parallel??(r.parallel=n.parallel)),o.calculatePadding?.(i)})});for(const[s,a=0]of Oo(i))i[s]=Math.max(a-(e.get(s)??0),0);return i}clampToOutsideSeriesRect(e,i,s,a){const n=s==="x"?e.x:e.y,o=s==="x"?e.width:e.height;return a===1?Math.min(i,n+o):Math.max(i,n)}async getSyncedDomain(e){const i=this.modulesManager.getModule("sync");if(i?.enabled)return await i.getSyncedDomain(e)}syncAxisChanges(e,i){const s=this.modulesManager.getModule("sync");if(!s?.enabled)return;const a=new Set(i??[]);for(const n of e)a.delete(n);for(const n of a)s.removeAxis(n)}sizeAxis(e,i,s){const a=e instanceof Yo,n=s==="left"||s==="right",{width:o,height:r}=i,l=n?r:o;let c=0,h=l,{min:u,max:d}=this.ctx.zoomManager.getAxisZoom(e.id);const{width:p,unit:g,align:f}=e.layoutConstraints;g==="px"?h=c+p:h=h*p/100,f==="end"&&(c=l-(h-c),h=l),n&&(a?[c,h]=[h,c]:[u,d]=[1-d,1-u]),e.range=[c,h],e.visibleRange=[u,d],e.gridLength=n?o:r}positionAxes(e){const{axes:i,axisBound:s,axisWidths:a,axisOffsets:n,axisAreaWidths:o,seriesRect:r,position:l}=e,c=o.get(l)??0;let h="x",u="y",d=1;(l==="top"||l==="bottom")&&(h="y",u="x");let p=s[h];(l==="right"||l==="bottom")&&(d=-1,p+=h==="x"?s.width:s.height);for(const g of i){const f=o.get(u==="x"?"left":"top")??0,x=a.get(g.id)??0,m=n.get(g.id)??0;g.gridPadding=c-m-x,g.translation[u]=s[u]+f,g.translation[h]=this.clampToOutsideSeriesRect(r,p+d*(m+x),h,d)}}shouldFlipXY(){return this.series.every(e=>e instanceof Hl&&e.shouldFlipXY())}getDefaultState(){const e=new Map;if(this.lastAreaWidths)for(const{position:i="left"}of this.axes){const s=this.lastAreaWidths.get(i);s!=null&&e.set(i,s)}return{axisAreaWidths:e,clipSeries:!1,overflows:!1}}isLayoutStable(e,i){if(i.overflows!==e.overflows||i.clipSeries!==e.clipSeries)return!1;for(const s of e.axisAreaWidths.keys())if(!i.axisAreaWidths.has(s))return!1;for(const[s,a]of i.axisAreaWidths.entries()){const n=e.axisAreaWidths.get(s);if((a!=null||n!=null)&&a!==n)return!1}return!0}clipAxis(e,i,s){const a=Math.ceil(e.gridLine?.width??0),n=Math.ceil(e.line?.width??0);let{width:o,height:r}=i;switch(o+=e.direction==="x"?a:n,r+=e.direction==="y"?a:n,e.clipGrid(i.x,i.y,o,r),e.position){case"left":case"right":e.clipTickLines(s.x,i.y-a,s.width+a,i.height+a*2);break;case"top":case"bottom":e.clipTickLines(i.x-a,s.y,i.width+a*2,s.height+a);break}}},dx.className="CartesianChart",dx.type="cartesian",dx.AxesPadding=15,$G=dx}}),xh,ST,MT,UG,KG,YG,ZG,XG,DT=I({"packages/ag-charts-community/src/chart/chartOptionsDefs.ts"(){"use strict";R(),Ba(),xh={mode:_t(ot("integrated","standalone")),container:Lb,context:()=>!0,theme:Ct,series:Js,annotations:Ct,navigator:Ct,initialState:{chartType:Q,annotations:Ct,legend:bs({visible:Y,seriesId:Q,itemId:Q,legendItemName:Q},"legend state array"),zoom:Ct}},ST={...Tt,...xh,axes:cl(2),data:Js},MT={...Tt,...xh,axes:cl(2),data:Js},UG={...Tt,...xh,data:Js,topology:wI},KG={...Tt,...xh,data:Js},YG={...Tt,...xh,data:Js},ZG={...Tt,...xh,data:Js,nodes:Js},XG={...Tt,...xh,data:Js}}}),qG,QG,JG,net=I({"packages/ag-charts-community/src/chart/cartesianChartModule.ts"(){"use strict";R(),Pt(),aet(),DT(),Jp(),qG=new Set(["number","log","time"]),QG=t=>xs(t)&&!qG.has(t.type),JG={type:"chart",name:"cartesian",options:ST,detect:Iz,create(t,e){return new $G(t,e)},validate(t,e,i){const s=[];t?.series?.[0]?.type==="histogram"&&t?.axes?.some(QG)&&(s.push(new yc("invalid","only continuous axis types when histogram series is used",t.axes,i,"axes")),t=dt(t,["axes"]));const a=Qs(t,e,i);return a.invalid.push(...s),a}}}}),Hg,tj,ej,ij,sj,aj,oet=I({"packages/ag-charts-community/src/chart/enterpriseChartModules.ts"(){"use strict";Jp(),Hg=()=>{throw new Error("Enterprise module placeholder cannot be initialised")},tj={type:"chart",name:"flow-proportion",placeholder:!0,options:{},detect:Lz,create:Hg},ej={type:"chart",name:"gauge",placeholder:!0,options:{},detect:gL,create:Hg},ij={type:"chart",name:"hierarchy",placeholder:!0,options:{},detect:Az,create:Hg},sj={type:"chart",name:"standalone",placeholder:!0,options:{},detect:wz,create:Hg},aj={type:"chart",name:"topology",placeholder:!0,options:{},detect:Cz,create:Hg}}}),Ad,nj=I({"packages/ag-charts-community/src/chart/axis/polarAxis.ts"(){"use strict";vt(),XC(),YC(),Ad=class extends pS{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}layoutCrossLines(){const t=this.label.getSideFlag(),e=this.isAnySeriesActive(),{rotation:i,parallelFlipRotation:s,regularFlipRotation:a}=this.calculateRotations();this.crossLines.forEach(n=>{n.sideFlag=-t,n.direction=i===-Math.PI/2?"angle":"radius",n.parallelFlipRotation=s,n.regularFlipRotation=a,n.calculateLayout?.(e,this.reverse)})}updatePosition(){super.updatePosition();const t=Math.floor(this.translation.x),e=Math.floor(this.translation.y);this.tickLineGroup.translationX=t,this.tickLineGroup.translationY=e,this.tickLabelGroup.translationX=t,this.tickLabelGroup.translationY=e,this.crossLineRangeGroup.translationX=t,this.crossLineRangeGroup.translationY=e,this.crossLineLineGroup.translationX=t,this.crossLineLineGroup.translationY=e,this.crossLineLabelGroup.translationX=t,this.crossLineLabelGroup.translationY=e,this.tickLabelGroupSelection.each(uS())}computeLabelsBBox(t,e){return null}computeRange(){}getAxisLinePoints(){}},S([k],Ad.prototype,"shape",2),S([k],Ad.prototype,"innerRadiusRatio",2)}});function ret(t){return t instanceof rx}function cet(t){return t instanceof Ad}var J0,het=I({"packages/ag-charts-community/src/chart/polarChart.ts"(){"use strict";R(),Wt(),vA(),nj(),TS(),W0(),J0=class extends ty{constructor(t,e){super(t,e),this.padding=new ml(40),this.ctx.axisManager.axisGroup.zIndex=7}getChartType(){return"polar"}async performLayout(t){const{layoutBox:e}=t;e.shrink(this.seriesArea.padding.toJson());const i=e.clone();this.seriesRect=i,this.animationRect=i,this.seriesRoot.translationX=i.x,this.seriesRoot.translationY=i.y,await this.computeCircle(i),this.axes.forEach(s=>s.update()),this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:i,paddedRect:i}})}updateAxes(t,e,i,s){const a=this.axes.find(l=>l.direction==="angle"),n=this.axes.find(l=>l.direction==="radius");if(!(a instanceof Ad)||!(n instanceof Ad))return;const o=a.scale,r=n.innerRadiusRatio;a.innerRadiusRatio=r,a.computeRange(),a.gridLength=s,n.gridAngles=o.ticks({nice:a.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.map(l=>o.convert(l)),n.gridRange=a.range,n.range=[s,s*r],[a,n].forEach(l=>{l.translation.x=t.x+e,l.translation.y=t.y+i,l.calculateLayout()})}async computeCircle(t){const e=this.series.filter(ret),i=this.axes.filter(cet),s=(c,h,u)=>{this.updateAxes(t,c,h,u),e.forEach(p=>{p.centerX=c,p.centerY=h,p.radius=u});const d=e.filter(p=>p.type==="donut"||p.type==="pie");if(d.length>1){const p=d.map(g=>{const f=g.getInnerRadius();return{series:g,innerRadius:f}}).sort((g,f)=>g.innerRadius-f.innerRadius);p.at(-1).series.surroundingRadius=void 0;for(let g=0;g<p.length-1;g++)p[g].series.surroundingRadius=p[g+1].innerRadius}},a=t.width/2,n=t.height/2,o=Math.max(0,Math.min(t.width,t.height)/2);let r=o;s(a,n,r);const l=async({hideWhenNecessary:c=!1}={})=>{const h=[];for(const p of ru(i,e)){const g=await p.computeLabelsBBox({hideWhenNecessary:c},t);g&&h.push(g)}if(h.length===0){s(a,n,o);return}const u=gt.merge(h),d=this.refineCircle(u,r,t);s(d.centerX,d.centerY,d.radius),r=d.radius};await l(),await l(),await l(),await l({hideWhenNecessary:!0}),await l({hideWhenNecessary:!0});for(const c of ru(i,e))await c.computeLabelsBBox({hideWhenNecessary:!0},t);return{radius:r,centerX:a,centerY:n}}refineCircle(t,e,i){const a=-e,n=-e,o=e,r=e;let l=Math.max(0,a-t.x),c=Math.max(0,n-t.y),h=Math.max(0,t.x+t.width-o),u=Math.max(0,t.y+t.height-r);l=h=Math.max(l,h),c=u=Math.max(c,u);const d=i.width-l-h,p=i.height-c-u;let g=Math.min(d,p)/2;const f=.5*i.width/2,x=.5*i.height/2,m=Math.min(f,x);if(g<m){g=m;const M=l+h,D=c+u;if(2*g+D>i.height){const L=i.height-2*g;Math.min(c,u)*2>L?(c=L/2,u=L/2):c>u?c=L-u:u=L-c}if(2*g+M>i.width){const L=i.width-2*g;Math.min(l,h)*2>L?(l=L/2,h=L/2):l>h?l=L-h:h=L-l}}const b=l+2*g+h,v=c+2*g+u;return{centerX:(i.width-b)/2+l+g,centerY:(i.height-v)/2+c+g,radius:g}}},J0.className="PolarChart",J0.type="polar"}}),oj,uet=I({"packages/ag-charts-community/src/chart/polarChartModule.ts"(){"use strict";R(),Pt(),DT(),Jp(),het(),oj={type:"chart",name:"polar",options:MT,detect:V7,create(t,e){return new J0(t,e)},validate(t,e,i){const s=[],a=t?.series?.[0]?.type;(a==="pie"||a==="donut")&&t?.axes&&(s.push(new tm([],t.axes,i,"axes")),t=dt(t,["axes"]));const n=Qs(t,e,i);return n.invalid.push(...s),n}}}}),rj,lj,cj,det=I({"packages/ag-charts-community/src/main-modules.ts"(){"use strict";set(),net(),oet(),uet(),Bw(),Zw(),Qw(),eT(),aT(),rT(),SG(),AG(),fV(),rj=[JG,cV,hV,uV,dV,pV,gV,Rw,Yw,qw,tT,sT,oT],lj=[oj,vG,IG],cj=[...rj,...lj,tj,ej,ij,sj,aj,GG,jG,WG]}}),hj,tM,uj,pet=I({"packages/ag-charts-community/src/util/pool.ts"(){"use strict";yi(),hj=1e3,tM=class iu{constructor(e,i,s,a,n,o=hj){this.name=e,this.buildItem=i,this.releaseItem=s,this.destroyItem=a,this.maxPoolSize=n,this.cleanupTimeMs=o,this.freePool=[],this.busyPool=new Set}static getPool(e,i,s,a,n){return this.pools.has(e)||this.pools.set(e,new iu(e,i,s,a,n)),this.pools.get(e)}isFull(){return this.freePool.length+this.busyPool.size>=this.maxPoolSize}hasFree(){return this.freePool.length>0}obtain(e){if(!this.hasFree()&&this.isFull())throw new Error("AG Charts - pool exhausted");let i=this.freePool.pop();return i==null?(i=this.buildItem(e),iu.debug(()=>[`Pool[name=${this.name}]: Created instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,i])):iu.debug(()=>[`Pool[name=${this.name}]: Re-used instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,i]),this.busyPool.add(i),{item:i,release:()=>this.release(i)}}obtainFree(){const e=this.freePool.pop();if(e==null)throw new Error("AG Charts - pool has no free instances");return iu.debug(()=>[`Pool[name=${this.name}]: Re-used instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,e]),this.busyPool.add(e),{item:e,release:()=>this.release(e)}}release(e){if(!this.busyPool.has(e))throw new Error("AG Charts - cannot free item from pool which is not tracked as busy.");iu.debug(()=>[`Pool[name=${this.name}]: Releasing instance (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`,e]),this.releaseItem(e),this.busyPool.delete(e),this.freePool.push(e),iu.debug(()=>[`Pool[name=${this.name}]: Returned instance to free pool (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`,e]);const i=Date.now(),s=i+this.cleanupTimeMs*.5;this.cleanPoolTimer&&(this.cleanPoolDue??1/0)<s&&(clearTimeout(this.cleanPoolTimer),this.cleanPoolTimer=void 0),this.cleanPoolTimer||(this.cleanPoolDue=i+this.cleanupTimeMs,this.cleanPoolTimer=setTimeout(this.cleanPool.bind(this),this.cleanupTimeMs))}cleanPool(){const e=this.freePool.splice(0);for(const i of e)this.destroyItem(i);iu.debug(()=>[`Pool[name=${this.name}]: Cleaned pool of ${e.length} items (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`])}destroy(){this.cleanPool();for(const e of this.busyPool.values())this.destroyItem(e);this.busyPool.clear()}},tM.pools=new Map,tM.debug=Ft.create(!0,"pool"),uj=tM}}),Wr,$l,Jo,kT,get=I({"packages/ag-charts-community/src/api/agCharts.ts"(){"use strict";R(),TS(),BJ(),CG(),ztt(),det(),iw(),dw(),yi(),Ta(),Pt(),pet(),wv(),EE(),qs.registerMany(cj,Ic),Wr=Ft.create(!0,"opts"),$l=class{static licenseCheck(t){this.licenseChecked||(this.licenseManager=Bl.licenseManager?.(t),this.licenseManager?.validateLicense(),this.licenseChecked=!0)}static getLicenseDetails(t){return Bl.licenseManager?.({}).getLicenseDetails(t)}static getInstance(t){return kT.getInstance(t)}static create(t,e){return Wr.group("AgCharts.create()",()=>{t=Ft.inDevelopmentMode(()=>dl($e(t)))??t,this.licenseCheck(t);const i=kT.createOrUpdate({userOptions:t,licenseManager:this.licenseManager,optionsMetadata:e});return this.licenseManager?.isDisplayWatermark()&&this.licenseManager&&Bl.injectWatermark?.(i.chart.ctx.domManager,this.licenseManager.getWatermarkMessage()),i})}static createFinancialChart(t){return Wr.group("AgCharts.createFinancialChart()",()=>this.create(t,{presetType:"price-volume"}))}static createGauge(t){return Wr.group("AgCharts.createGauge()",()=>this.create(t,{presetType:"gauge-preset"}))}static __createSparkline(t){return Wr.group("AgCharts.__createSparkline()",()=>{const{pool:e,...i}=t;return this.create(i,{presetType:"sparkline",pool:e??!0,domMode:"minimal",withDragInterpretation:!1})})}},$l.licenseChecked=!1,Jo=class su{static getInstance(e){const i=ty.getInstance(e);return i?gw.chartInstances.get(i):void 0}static initialiseModules(){su.initialised||(fT(),Btt(),su.initialised=!0)}static createOrUpdate(e){let{proxy:i}=e;const{userOptions:s,licenseManager:a,processedOverrides:n=i?.chart?.chartOptions.processedOverrides??{},specialOverrides:o=i?.chart?.chartOptions.specialOverrides??{},optionsMetadata:r=i?.chart?.chartOptions.optionMetadata??{},deltaOptions:l,data:c,stripSymbols:h=!1}=e,u=Bl.styles!=null?[["ag-charts-enterprise",Bl.styles]]:[];su.initialiseModules(),Wr(()=>[">>> AgCharts.createOrUpdate() user options",$e(s)]);const{presetType:d}=r;let p=s;$l.optionsMutationFn&&p&&(p=$l.optionsMutationFn($e(p,zg.OPTIONS_CLONE_OPTS_FAST),d),Wr(()=>[">>> AgCharts.createOrUpdate() MUTATED user options",$e(p)]));const g=this.getPool(r);let f=!1,x,m=i?.chart;m==null&&g?.hasFree()&&(x=g.obtainFree(),m=x.item);const{document:b,window:v,styleContainer:M,...D}=p??{},L=m?.getChartOptions(),C=new zg(L,D,n,{...o,document:b,window:v,styleContainer:M},r,l,h);return(m==null||qs.detectChartDefinition(C.processedOptions)!==qs.detectChartDefinition(m.chartOptions.processedOptions))&&(x?.release(),x=this.getPool(C.optionMetadata)?.obtain(C),x?m=x.item:(f=!0,m=su.createChartInstance(C,m))),u.forEach(([A,T])=>{m.ctx.domManager.addStyles(A,T)}),m.ctx.fontManager.updateFonts(C.googleFonts),c!=null&&m.ctx.dataService.restoreData(c),i==null?(i=new gw(m,su.callbackApi,a),i.releaseChart=x?.release):(x||f)&&(i.releaseChart?.(),i.chart=m,i.releaseChart=x?.release),Wr.check()&&typeof window<"u"&&(window.agChartInstances??(window.agChartInstances={}),window.agChartInstances[m.id]=m),m.queuedUserOptions.push(C.userOptions),m.queuedChartOptions.push(C),m.requestFactoryUpdate(A=>{Wr.group(">>>> Chart.applyOptions()",()=>{A.applyOptions(C);const T=A.queuedUserOptions.indexOf(C.userOptions)+1;A.queuedUserOptions.splice(0,T),A.queuedChartOptions.splice(0,T)})}),i}static markRemovedProperties(e,i,s=!1){if(typeof e!="object")return s;for(const a of Object.keys(e))typeof e[a]>"u"&&(Object.assign(e,{[a]:Symbol("UNSET")}),s||(s=!0));return s}static updateUserDelta(e,i){i=$e(i,zg.OPTIONS_CLONE_OPTS_FAST);const s=Dc(i,su.markRemovedProperties,new Set(["data"]),void 0,void 0,!1);Wr(()=>[">>> AgCharts.updateUserDelta() user delta",$e(i)]),su.createOrUpdate({proxy:e,deltaOptions:i,stripSymbols:s})}static createChartInstance(e,i){const s=i?.destroy({keepTransferableResources:!0});return qs.detectChartDefinition(e.processedOptions).create(e,s)}static getPool(e){if(e.pool===!0)return uj.getPool(e.presetType??"default",this.createChartInstance,this.detachAndClear,this.destroy,1/0)}},Jo.caretaker=new PA(Ic),Jo.initialised=!1,Jo.callbackApi={caretaker:Jo.caretaker,create(t,e,i,s,a){return Jo.createOrUpdate({userOptions:t,processedOverrides:e,specialOverrides:i,optionsMetadata:s,data:a})},update(t,e){return Jo.createOrUpdate({userOptions:t,proxy:e})},updateUserDelta(t,e){return Jo.updateUserDelta(t,e)}},Jo.detachAndClear=t=>t.detachAndClear(),Jo.destroy=t=>t.destroy(),kT=Jo}}),tr,dj=I({"packages/ag-charts-community/src/scene/shape/arc.ts"(){"use strict";R(),$i(),Wt(),Fn(),Yn(),tr=class extends Fs{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=Math.PI*2,this.counterClockwise=!1,this.type=0}get fullPie(){return sn(Ai(this.startAngle),Ai(this.endAngle))}updatePath(){const t=this.path;t.clear(),t.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===1?t.closePath():this.type===2&&!this.fullPie&&(t.lineTo(this.centerX,this.centerY),t.closePath())}computeBBox(){return new gt(this.centerX-this.radius,this.centerY-this.radius,this.radius*2,this.radius*2)}isPointInPath(t,e){const i=this.getBBox();return this.type!==0&&i.containsPoint(t,e)&&this.path.isPointInPath(t,e)}},tr.className="Arc",S([lt()],tr.prototype,"centerX",2),S([lt()],tr.prototype,"centerY",2),S([lt()],tr.prototype,"radius",2),S([lt()],tr.prototype,"startAngle",2),S([lt()],tr.prototype,"endAngle",2),S([lt()],tr.prototype,"counterClockwise",2),S([lt()],tr.prototype,"type",2)}});function IT(t,e,i){const s=Math.sqrt(t**2+e**2),n=Math.atan2(e,t)+i;return{x:Math.cos(n)*s,y:Math.sin(n)*s}}function pj(t,e,i,s,a){const n=Jb(t,e),o=n*(1-s)/2;if(t+=o,e-=o,n<.001)return 2*i*a;if(n>=2*Math.PI){const p=t+n/2;t=p-Math.PI,e=p+Math.PI}const r=i*Math.cos(t),l=i*Math.sin(t),c=i*Math.cos(e),h=i*Math.sin(e),u=Math.floor(Math.sqrt((r-c)**2+(l-h)**2)),d=2*i*a;return Math.max(1,Math.min(d,u))}var vn,gj=I({"packages/ag-charts-community/src/scene/shape/radialColumnShape.ts"(){"use strict";R(),$i(),Wt(),Fn(),Yn(),vn=class extends Fs{constructor(){super(...arguments),this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}set cornerRadius(t){}computeBBox(){const{innerRadius:t,outerRadius:e,columnWidth:i}=this,s=this.getRotation(),a=-i/2,n=i/2,o=-e,r=-t;let l=1/0,c=1/0,h=-1/0,u=-1/0;for(let d=0;d<4;d+=1){const{x:p,y:g}=IT(d%2===0?a:n,d<2?o:r,s);l=Math.min(p,l),c=Math.min(g,c),h=Math.max(p,h),u=Math.max(g,u)}return new gt(l,c,h-l,u-c)}getRotation(){const{startAngle:t,endAngle:e}=this,i=Jb(t,e);return Ai(t+i/2+Math.PI/2)}updatePath(){const{isBeveled:t}=this;t?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){const{columnWidth:t,innerRadius:e,outerRadius:i,path:s}=this,a=-t/2,n=t/2,o=-i,r=-e,l=this.getRotation(),c=[[a,r],[a,o],[n,o],[n,r]].map(([h,u])=>IT(h,u,l));s.clear(!0),s.moveTo(c[0].x,c[0].y),s.lineTo(c[1].x,c[1].y),s.lineTo(c[2].x,c[2].y),s.lineTo(c[3].x,c[3].y),s.closePath()}updateBeveledPath(){const{columnWidth:t,path:e,outerRadius:i,innerRadius:s,axisInnerRadius:a,axisOuterRadius:n,isRadiusAxisReversed:o}=this,r=sn(s,a),l=Math.asin(t/2/s),c=this.getRotation(),h=(A,T)=>IT(A,T,c),u=(A,T)=>Math.sqrt(A**2+T**2),d=(A,T)=>T>A?0:Math.sqrt(A**2-T**2),p=(A,T,N)=>N?A<T:A>T,g=r&&!isNaN(l)&&l<Math.PI/6;let f=-t/2,x=t/2;const m=-i,b=-s*(g?Math.cos(l):1),v=p(n,u(s,t/2),!o);if(v){const A=d(n,s);f=-A,x=A}e.clear(!0);const M=h(f,b);e.moveTo(M.x,M.y);const D=sn(s,i),L=p(n,u(i,t/2),!o);if(D&&g)e.arc(0,0,s,Ai(-l-Math.PI/2)+c,Ai(l-Math.PI/2)+c,!1);else if(L){const A=-d(n,t/2),T=d(n,i);if(!v){const N=h(f,A);e.lineTo(N.x,N.y)}if(e.arc(0,0,n,Math.atan2(A,f)+c,Math.atan2(m,-T)+c,!1),!sn(T,0)){const N=h(T,m);e.lineTo(N.x,N.y)}e.arc(0,0,n,Math.atan2(m,T)+c,Math.atan2(A,x)+c,!1)}else{const A=h(f,m),T=h(x,m);e.lineTo(A.x,A.y),e.lineTo(T.x,T.y)}const C=h(x,b);if(e.lineTo(C.x,C.y),g)e.arc(0,0,s,Ai(l-Math.PI/2)+c,Ai(-l-Math.PI/2)+c,!0);else{const A=h(f,b);e.lineTo(A.x,A.y)}e.closePath()}},vn.className="RadialColumnShape",S([lt()],vn.prototype,"isBeveled",2),S([lt()],vn.prototype,"columnWidth",2),S([lt()],vn.prototype,"startAngle",2),S([lt()],vn.prototype,"endAngle",2),S([lt()],vn.prototype,"outerRadius",2),S([lt()],vn.prototype,"innerRadius",2),S([lt()],vn.prototype,"axisInnerRadius",2),S([lt()],vn.prototype,"axisOuterRadius",2),S([lt()],vn.prototype,"isRadiusAxisReversed",2)}}),AT={};La(AT,{Arc:()=>tr,BBox:()=>gt,Caption:()=>Pe,CategoryScale:()=>kg,Group:()=>Lt,Line:()=>pa,LinearScale:()=>Ko,Marker:()=>wi,Path:()=>Fs,RadialColumnShape:()=>vn,Rect:()=>Gs,Scene:()=>Dm,Sector:()=>ps,Shape:()=>xi,TranslatableGroup:()=>vs,getRadialColumnWidth:()=>pj,toRadians:()=>Hi});var fet=I({"packages/ag-charts-community/src/integrated-charts-scene.ts"(){"use strict";Lu(),Go(),Dy(),Lg(),Wt(),Oe(),YA(),dj(),$u(),Yn(),gj(),Fy(),B0(),vu(),$i()}}),CT={};La(CT,{ChartTheme:()=>Xn,DEFAULT_ANNOTATION_HANDLE_FILL:()=>og,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>cg,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>hg,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>ug,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>dg,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>rg,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>lg,DEFAULT_CAPTION_ALIGNMENT:()=>wl,DEFAULT_CAPTION_LAYOUT_STYLE:()=>Ll,DEFAULT_FIBONACCI_STROKES:()=>ag,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:()=>Ti,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:()=>Ye,DEFAULT_GRIDLINE_ENABLED:()=>Zn,DEFAULT_POLAR_SERIES_STROKE:()=>ry,DEFAULT_SEPARATION_LINES_COLOUR:()=>sg,DEFAULT_SHADOW_COLOUR:()=>Cl,DEFAULT_SPARKLINE_CROSSHAIR_STROKE:()=>ly,DEFAULT_TEXTBOX_COLOR:()=>fg,DEFAULT_TEXTBOX_FILL:()=>pg,DEFAULT_TEXTBOX_STROKE:()=>gg,DEFAULT_TEXT_ANNOTATION_COLOR:()=>ng,DEFAULT_TOOLBAR_POSITION:()=>mg,IS_DARK_THEME:()=>Ju,PALETTE_ALT_DOWN_FILL:()=>ES,PALETTE_ALT_DOWN_STROKE:()=>PS,PALETTE_ALT_NEUTRAL_FILL:()=>RS,PALETTE_ALT_NEUTRAL_STROKE:()=>BS,PALETTE_ALT_UP_FILL:()=>_S,PALETTE_ALT_UP_STROKE:()=>OS,PALETTE_DOWN_FILL:()=>ay,PALETTE_DOWN_STROKE:()=>iy,PALETTE_NEUTRAL_FILL:()=>oy,PALETTE_NEUTRAL_STROKE:()=>ny,PALETTE_UP_FILL:()=>sy,PALETTE_UP_STROKE:()=>ey,getChartTheme:()=>Oy,resolveOperation:()=>met,themeNames:()=>fj,themeSymbols:()=>OL,themes:()=>h0});function met(t){const e=Xn.getDefaultPublicParameters(),i=Xn.getDefaultColors();return new hw({line:{operation:t}},{series:[{type:"line"}]},e,i).resolve().operation}var fj,yet=I({"packages/ag-charts-community/src/integrated-charts-theme.ts"(){"use strict";u0(),Nl(),t4(),u0(),li(),Nl(),u0(),li(),fj=Object.keys(h0)}}),LT={};La(LT,{Color:()=>be,interpolateColor:()=>KR});var xet=I({"packages/ag-charts-community/src/integrated-charts-util.ts"(){"use strict";fu(),YR()}});function mj(t,e,i,s){return{unit:t,step:e,epoch:i,utc:s,every(a){return mj(this.unit,(this.step??1)*a,this.epoch,this.utc)}}}function Pi(t,e=1,i,s=!1){ut.warnOnce("time import is deprecated, use object notation instead");const a=`${t}:${e}:${i?.getTime()??0}:${s}`;let n=wT[a];return n==null&&(n=mj(t,e,i,s),wT[a]=n),n}var wT,yj,bet=I({"packages/ag-charts-community/src/util/time-interop.ts"(){"use strict";R(),wT={},yj={get millisecond(){return Pi("millisecond")},get second(){return Pi("second")},get minute(){return Pi("minute")},get hour(){return Pi("hour")},get day(){return Pi("day")},get monday(){return Pi("day",7,new Date(1970,0,5))},get tuesday(){return Pi("day",7,new Date(1970,0,6))},get wednesday(){return Pi("day",7,new Date(1970,0,7))},get thursday(){return Pi("day",7,new Date(1970,0,1))},get friday(){return Pi("day",7,new Date(1970,0,2))},get saturday(){return Pi("day",7,new Date(1970,0,3))},get sunday(){return Pi("day",7,new Date(1970,0,4))},get month(){return Pi("month")},get year(){return Pi("year")},get utcMillisecond(){return Pi("millisecond",1,void 0,!0)},get utcSecond(){return Pi("second",1,void 0,!0)},get utcMinute(){return Pi("minute",1,void 0,!0)},get utcHour(){return Pi("hour",1,void 0,!0)},get utcDay(){return Pi("day",1,void 0,!0)},get utcMonth(){return Pi("month",1,void 0,!0)},get utcYear(){return Pi("year",1,void 0,!0)}}}});function TT(){return(t,e)=>{const i=[`Property [${t}] is deprecated.`,e].filter(Boolean).join(" ");ut.warnOnce(i)}}function vet(t,e){const i=TT(),s=e?.default;return uu((a,n,o)=>(o!==s&&i(n.toString(),t),o))}function Met(t,e){const i=TT();return uu((s,a,n)=>(n!==s[t]&&(i(a.toString(),`Use [${t}] instead.`),UI(s,t,e?e(n):n)),Zb),(s,a)=>(i(a.toString(),`Use [${t}] instead.`),$I(s,t)))}var Det=I({"packages/ag-charts-community/src/util/deprecation.ts"(){"use strict";R(),Ap(),Pt()}});function ket(t,e){return typeof e=="number"?{x:t.x+e,y:t.y+e}:{x:t.x+e.x,y:t.y+e.y}}function NT(t,e){return typeof e=="number"?{x:t.x-e,y:t.y-e}:{x:t.x-e.x,y:t.y-e.y}}function Iet(t,e){return typeof e=="number"?{x:t.x*e,y:t.y*e}:{x:t.x*e.x,y:t.y*e.y}}function OT(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function Aet(t){return t.x*t.x+t.y*t.y}function Cet(t,e){const i=NT(t,e);return Math.sqrt(i.x*i.x+i.y*i.y)}function Let(t,e){const i=NT(t,e);return i.x*i.x+i.y*i.y}function wet(t){const e=OT(t);return{x:t.x/e,y:t.y/e}}function Tet(t,e){return e==null?Math.atan2(t.y,t.x):Math.atan2(t.y,t.x)-Math.atan2(e.y,e.x)}function Net(t,e,i=xj()){const s=OT(t);return{x:i.x+s*Math.cos(e),y:i.y+s*Math.sin(e)}}function Oet(t,e,i){const s=e.x-t.x;return(i==null?e.y-t.y:i-e.y-(i-t.y))/s}function Pet(t,e,i){return(i==null?t.y:i-t.y)-e*t.x}function _et(t,e,i=0,s){return{x:t===1/0?1/0:(i-e)/t,y:s==null?i:s-i}}function Eet(t,e,i=0,s){const a=t===1/0?1/0:t*i+e;return{x:i,y:s==null?a:s-a}}function Ret(t,e=2){return{x:AI(t.x,e),y:AI(t.y,e)}}function Bet(t,e){return t.x===e.x&&t.y===e.y}function zet(t,e){if(typeof t=="number")return{x:t,y:e};if("currentX"in t)return{x:t.currentX,y:t.currentY};if("offsetWidth"in t)return{x:t.offsetWidth,y:t.offsetHeight};if("width"in t)return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y+t.height}];if("x1"in t)return[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}];throw new Error(`Values can not be converted into a vector: [${JSON.stringify(t)}] [${e}]`)}function Fet(t,e){return t.x=e.x,t.y=e.y,t}function Vet(t){return{x:t?.x??0,y:t?.y??0}}function xj(){return{x:0,y:0}}var Cd,bj=I({"packages/ag-charts-community/src/util/vector.ts"(){"use strict";R(),Cd={add:ket,angle:Tet,apply:Fet,equal:Bet,distance:Cet,distanceSquared:Let,from:zet,gradient:Oet,intercept:Pet,intersectAtX:Eet,intersectAtY:_et,length:OT,lengthSquared:Aet,multiply:Iet,normalized:wet,origin:xj,required:Vet,rotate:Net,round:Ret,sub:NT}}}),Get=I({"packages/ag-charts-community/src/module/axisModule.ts"(){"use strict"}}),jet=I({"packages/ag-charts-community/src/module/axisOptionModule.ts"(){"use strict"}}),Wet=I({"packages/ag-charts-community/src/module/baseModule.ts"(){"use strict"}}),Het=I({"packages/ag-charts-community/src/module/coreModules.ts"(){"use strict"}}),$et=I({"packages/ag-charts-community/src/core/eventsHub.ts"(){"use strict"}}),Uet=I({"packages/ag-charts-community/src/module/optionsModuleTypes.ts"(){"use strict"}}),Ket=I({"packages/ag-charts-community/src/module/axisContext.ts"(){"use strict"}}),Yet=I({"packages/ag-charts-community/src/module/moduleContext.ts"(){"use strict"}}),Zet=I({"packages/ag-charts-community/src/chart/chartAnimationPhase.ts"(){"use strict"}}),Xet=I({"packages/ag-charts-community/src/chart/series/seriesTypes.ts"(){"use strict"}}),PT,vj,Sj,qet=I({"packages/ag-charts-community/src/chart/series/hierarchy/hierarchySeries.ts"(){"use strict";R(),av(),Pm(),Qu(),PT=class lI{constructor(e,i,s,a,n,o,r,l,c){this.series=e,this.datumIndex=i,this.datum=s,this.sizeValue=a,this.colorValue=n,this.sumSize=o,this.depth=r,this.parent=l,this.children=c,this.midPoint={x:0,y:0}}get hasChildren(){return this.children.length>0}walk(e,i=lI.Walk.PreOrder){i===lI.Walk.PreOrder&&e(this),this.children.forEach(s=>{s.walk(e,i)}),i===lI.Walk.PostOrder&&e(this)}*[Symbol.iterator](){yield this;for(const e of this.children)yield*e}},PT.Walk={PreOrder:0,PostOrder:1},vj=PT,Sj=class extends Zm{constructor(t){super({moduleCtx:t,pickModes:[1,0]}),this.colorDomain=[0,0],this.maxDepth=0,this.colorScale=new mu,this.animationState=new Up("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}processData(){const{NodeClass:t}=this,{childrenKey:e,sizeKey:i,colorKey:s,colorRange:a}=this.properties;let n=0,o=1/0,r=-1/0;const l=(d,p,g)=>{const f=g.depth!=null?g.depth+1:0,x=e!=null?d[e]:void 0,m=x==null||x.length===0;let b=i!=null?d[i]:void 0;Number.isFinite(b)?b=Math.max(b,0):b=m?1:0;const v=b;n=Math.max(n,f);const M=s!=null?d[s]:void 0;return typeof M=="number"&&(o=Math.min(o,M),r=Math.max(r,M)),c(new t(this,p,d,b,M,v,f,g,[]),x)},c=(d,p)=>{const{datumIndex:g}=d;return p?.forEach((f,x)=>{const m=l(f,g.concat(x),d);d.children.push(m),d.sumSize+=m.sumSize}),d},h=c(new t(this,[],void 0,0,void 0,0,void 0,void 0,[]),this.data),u=[o,r];this.colorScale.domain=o<r?[o,r]:[0,1],this.colorScale.range=a??["black"],this.colorScale.update(),this.rootNode=h,this.maxDepth=n,this.colorDomain=u}update({seriesRect:t}){this.updateSelections(),this.updateNodes();const e=this.getAnimationData();this.checkResize(t)&&this.animationState.transition("resize",e),this.animationState.transition("update",e)}resetAllAnimation(t){this.ctx.animationManager.stopByAnimationGroupId(this.id)}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}getAnimationData(){return{}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}dataCount(){return NaN}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}getLegendData(t){const{colorKey:e,colorRange:i}=this.properties,{id:s,ctx:{legendManager:a},visible:n}=this;return t==="gradient"&&e!=null&&i!=null?[{legendType:"gradient",enabled:n&&a.getItemEnabled({seriesId:s}),seriesId:s,series:this.getFormatterContext("color"),colorRange:i,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(t){return t.datumIndex.join(":")}getDatumId(t){return this.getDatumIdFromData(t)}removeMeIndexPathForIndex(t){return this.datumSelection.at(t+1)?.datum.datumIndex??[]}removeMeIndexForIndexPath(t){for(const{index:e,datum:i}of this.datumSelection)if(yr(i.datumIndex,t))return e-1;return 0}pickFocus(t){if(!this.rootNode?.children.length)return;const e=Et(0,t.datumIndex-t.datumIndexDelta,this.datumSelection.length-1),{datumIndexDelta:i,otherIndexDelta:s}=t;let a=this.removeMeIndexPathForIndex(e);const n=a.reduce((l,c)=>l.children[c],this.rootNode);if(s>0&&n.hasChildren)a=[...a,0];else if(s<0&&a.length>1)a=a.slice(0,-1);else if(s===0&&i!==0){const l=n.parent.children.length-1;a=a.slice(),a[a.length-1]=Et(0,a[a.length-1]+i,l)}const o=a.reduce((l,c)=>l.children[c],this.rootNode),r=this.computeFocusBounds(this.datumSelection.at(e+1));if(r!=null)return{datum:o,datumIndex:this.removeMeIndexForIndexPath(a),otherIndex:o.depth,bounds:r,clipFocusBox:!0}}getDatumAriaText(t,e){if(!(t instanceof this.NodeClass)){ut.error(`datum is not HierarchyNode: ${JSON.stringify(t)}`);return}return this.ctx.localeManager.t("ariaAnnounceHierarchyDatum",{level:(t.depth??-1)+1,count:t.children.length,description:e})}getCategoryValue(t){}datumIndexForCategoryValue(t){}}}}),no,Qet=I({"packages/ag-charts-community/src/chart/series/hierarchy/hierarchySeriesProperties.ts"(){"use strict";vt(),NS(),kl(),no=class extends Ea{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(ri),this.fillGradientDefaults=new pn,this.fillPatternDefaults=new _e,this.fillImageDefaults=new ga,this.strokes=Object.values(jo)}},S([k],no.prototype,"childrenKey",2),S([k],no.prototype,"sizeKey",2),S([k],no.prototype,"colorKey",2),S([k],no.prototype,"colorName",2),S([k],no.prototype,"fills",2),S([k],no.prototype,"fillGradientDefaults",2),S([k],no.prototype,"fillPatternDefaults",2),S([k],no.prototype,"fillImageDefaults",2),S([k],no.prototype,"strokes",2),S([k],no.prototype,"colorRange",2)}}),Jet=I({"packages/ag-charts-community/src/chart/series/topologySeries.ts"(){"use strict"}}),tit=I({"packages/ag-charts-community/src/chart/series/flowProportionSeries.ts"(){"use strict"}}),eit=I({"packages/ag-charts-community/src/chart/series/topology/geojson.ts"(){"use strict"}}),Mj,iit=I({"packages/ag-charts-community/src/chart/series/topology/lonLatBbox.ts"(){"use strict";Mj=class hZ{constructor(e,i,s,a){this.lon0=e,this.lat0=i,this.lon1=s,this.lat1=a}extend(e,i,s,a){return this.lon0=Math.min(this.lon0,e),this.lat0=Math.min(this.lat0,i),this.lon1=Math.max(this.lon1,s),this.lat1=Math.max(this.lat1,a),this}merge(e){return this.extend(e.lon0,e.lat0,e.lon1,e.lat1)}static extend(e,i,s,a,n){return e?e.extend(i,s,a,n):new hZ(i,s,a,n)}}}}),px,eM,iM,sM,aM,Dj,sit=I({"packages/ag-charts-community/src/chart/series/topology/mercatorScale.ts"(){"use strict";iv(),Wt(),px=Math.PI/180,eM=t=>t*px,iM=t=>-Math.log(Math.tan(Math.PI*.25+t*px*.5)),sM=t=>t/px,aM=t=>(Math.atan(Math.exp(-t))-Math.PI*.25)/(px*.5),Dj=class MP extends pm{constructor(e,i){super(),this.domain=e,this.range=i,this.type="mercator",this.defaultTickCount=0,this.bounds=MP.bounds(e)}static bounds(e){const[[i,s],[a,n]]=e,o=eM(i),r=iM(s),l=eM(a),c=iM(n);return new gt(Math.min(o,l),Math.min(r,c),Math.abs(l-o),Math.abs(c-r))}static fixedScale(){return new MP([[sM(0),aM(0)],[sM(1),aM(1)]],[[0,0],[1,1]])}toDomain(){}normalizeDomains(...e){let i=-1/0,s=1/0,a=-1/0,n=1/0;for(const o of e)for(const[r,l]of o)i=Math.min(r,i),s=Math.max(r,s),a=Math.min(l,a),n=Math.max(l,n);return{domain:[[i,a],[s,n]],animatable:!0}}convert([e,i]){const[[s,a],[n,o]]=this.range,r=(n-s)/this.bounds.width,l=(o-a)/this.bounds.height;return[(eM(e)-this.bounds.x)*r+s,(iM(i)-this.bounds.y)*l+a]}invert([e,i]){const[[s,a],[n,o]]=this.range,r=(n-s)/this.bounds.width,l=(o-a)/this.bounds.height;return[sM((e-s)/r+this.bounds.x),aM((i-a)/l+this.bounds.y)]}}}}),ait=I({"packages/ag-charts-community/src/chart/series/gaugeSeries.ts"(){"use strict"}}),nit=I({"packages/ag-charts-community/src/chart/chartAxis.ts"(){"use strict"}});function oit({yDirection:t,padding:e=0,position:i="top",bbox:s}){const a=t?kj:Ij,{xTranslationDirection:n,yTranslationDirection:o}=a[i],r=n*(e+s.width/2),l=o*(e+s.height/2);return{xTranslation:r,yTranslation:l}}var kj,Ij,rit=I({"packages/ag-charts-community/src/chart/crossline/crossLineLabelPosition.ts"(){"use strict";kj={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},"top-left":{xTranslationDirection:1,yTranslationDirection:-1},"top-right":{xTranslationDirection:-1,yTranslationDirection:-1},"bottom-left":{xTranslationDirection:1,yTranslationDirection:1},"bottom-right":{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},"inside-left":{xTranslationDirection:1,yTranslationDirection:0},"inside-right":{xTranslationDirection:-1,yTranslationDirection:0},"inside-top":{xTranslationDirection:0,yTranslationDirection:1},"inside-bottom":{xTranslationDirection:0,yTranslationDirection:-1},"inside-top-left":{xTranslationDirection:1,yTranslationDirection:1},"inside-bottom-left":{xTranslationDirection:1,yTranslationDirection:-1},"inside-top-right":{xTranslationDirection:-1,yTranslationDirection:1},"inside-bottom-right":{xTranslationDirection:-1,yTranslationDirection:-1}},Ij={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},"top-left":{xTranslationDirection:-1,yTranslationDirection:-1},"top-right":{xTranslationDirection:-1,yTranslationDirection:1},"bottom-left":{xTranslationDirection:1,yTranslationDirection:-1},"bottom-right":{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},"inside-left":{xTranslationDirection:0,yTranslationDirection:1},"inside-right":{xTranslationDirection:0,yTranslationDirection:-1},"inside-top":{xTranslationDirection:-1,yTranslationDirection:0},"inside-bottom":{xTranslationDirection:1,yTranslationDirection:0},"inside-top-left":{xTranslationDirection:-1,yTranslationDirection:1},"inside-bottom-left":{xTranslationDirection:1,yTranslationDirection:1},"inside-top-right":{xTranslationDirection:-1,yTranslationDirection:-1},"inside-bottom-right":{xTranslationDirection:1,yTranslationDirection:-1}}}}),lit=I({"packages/ag-charts-community/src/chart/legend/legendDatum.ts"(){"use strict"}});function cit(t,e){const i=zt("button",nM("ag-charts-input ag-charts-button",e));return t.label!==void 0?i.append(t.label):(i.append(Aj(t.icon)),i.ariaLabel=t.altText),i.addEventListener("click",t.onPress),lu(i,e),i}function hit(t,e){const i=zt("input",nM("ag-charts-input ag-charts-checkbox",e));return i.type="checkbox",i.checked=t.checked,i.addEventListener("change",s=>t.onChange(i.checked,s)),i.addEventListener("keydown",s=>{Pv(s)&&(s.preventDefault(),i.click())}),lu(i,e),i}function uit(t,e){const i=zt("select",nM("ag-charts-input ag-charts-select",e));return i.append(...t.options.map(s=>{const a=zt("option");return a.value=s.value,a.textContent=s.label,a})),Ut(i,"data-preventdefault",!1),i.value=t.value,i.addEventListener("change",s=>t.onChange(i.value,s)),lu(i,e),i}function dit(t,e){const i=zt("textarea",nM("ag-charts-input ag-charts-textarea",e));return i.value=t.value,i.addEventListener("input",s=>t.onChange(i.value,s)),lu(i,e),Ut(i,"data-preventdefault",!1),i}function Aj(t){const e=zt("span",`ag-charts-icon ag-charts-icon-${t}`);return Ut(e,"aria-hidden",!0),e}function nM(t,e){return e==null?t:`${t} ${e.class}`}var pit=I({"packages/ag-charts-community/src/dom/elements.ts"(){"use strict";R(),Ac()}}),git=I({"packages/ag-charts-community/src/scale/scale.ts"(){"use strict"}}),_T,Cj,fit=I({"packages/ag-charts-community/src/scene/shape/svgPath.ts"(){"use strict";ns(),Yn(),_T=class extends Fs{constructor(t=""){super(),this._d="",this.d=t}get d(){return this._d}set d(t){t!==this._d&&(this._d=t,this.path.clear(),this.path.appendSvg(t),this.checkPathDirty())}},Cj=class extends Su(_T){isPointInPath(t,e){return super.isPointInPath(t-this.translationX,e-this.translationY)}}}}),Ld,mit=I({"packages/ag-charts-community/src/scene/image.ts"(){"use strict";Vn(),Ld=class extends br{constructor(t){super(),this.sourceImage=t,this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1}render(t){const{ctx:e}=t,i=this.sourceImage;i&&(e.globalAlpha=this.opacity,e.drawImage(i,0,0,i.width,i.height,this.x,this.y,this.width,this.height)),super.render(t)}},S([lt()],Ld.prototype,"x",2),S([lt()],Ld.prototype,"y",2),S([lt()],Ld.prototype,"width",2),S([lt()],Ld.prototype,"height",2),S([lt()],Ld.prototype,"opacity",2)}}),oM,Lj=I({"packages/ag-charts-community/src/widget/menuItemWidget.ts"(){"use strict";R(),tR(),oM=class extends jA{constructor(){super(zt("div"),"menuitem")}}}}),wj,ET,yit=I({"packages/ag-charts-community/src/widget/menuWidget.ts"(){"use strict";R(),Ac(),Lj(),WA(),wj=["Escape","ArrowLeft"],ET=class uZ extends zv{constructor(e="vertical"){super(e,"menu"),this.closeSubMenu=i=>this.openSubMenu(i,void 0)}destructor(){this.selfClose("2")}addSeparator(){const e=wo().createElement("div");return Ut(e,"role","separator"),this.elem.appendChild(e),e}onChildAdded(e){super.onChildAdded(e),e.hasPopup()||e.addListener("mouseenter",this.closeSubMenu)}onChildRemoved(e){super.onChildRemoved(e),e.hasPopup()||e.removeListener("mouseenter",this.closeSubMenu)}addSubMenu(){const e=new oM,i=om(),s=new uZ(this.orientation),a=o=>{e.isDisabled()||this.openSubMenu(o,s)},n=o=>{Sm(o.sourceEvent)&&o.sourceEvent.code==="ArrowRight"&&a(o)};return e.setAriaHasPopup("menu"),e.setAriaExpanded(!1),e.setAriaControls(i),e.addListener("click",a),e.addListener("mouseenter",a),e.addListener("keydown",n),s.addListener("close-widget",()=>e.setAriaExpanded(!1)),s.addListener("open-widget",()=>e.setAriaExpanded(!0)),s.id=i,this.addChild(e),{subMenuButton:e,subMenu:s}}openSubMenu(e,i){const{openScope:s}=this;s&&(s.openSubMenu?.selfClose("4"),i?.open(e),s.openSubMenu=i)}open(e,i){if(this.openScope!=null)return;this.openScope={lastFocus:_v(e.sourceEvent),openSubMenu:void 0,abort:()=>this.selfClose("1"),close:()=>this.selfClose("0"),removers:new Fe};const s=this.openScope,a=this.children.map(n=>n.getElement());Ut(s.lastFocus,"aria-expanded",!0),s.removers.register(EA(this.elem,s.abort),RA(this.elem,s.abort),...this.children.map(n=>Nv(n.getElement(),s.close,wj)),i?.overrideFocusVisible&&BA(this.elem,a,i.overrideFocusVisible)),this.internalListener?.dispatch("open-widget",this,{type:"open-widget"}),this.children[0]?.focus({preventScroll:!0})}selfClose(e){if(this.openScope===void 0)return;const{lastFocus:i,removers:s,openSubMenu:a}=this.openScope;this.openScope=void 0,a?.selfClose("3"),Ut(i,"aria-expanded",!1),e==="0"&&i?.focus({preventScroll:!0}),s.flush(),this.internalListener?.dispatch("close-widget",this,{type:"close-widget"})}close(){this.selfClose("0")}}}}),Tj={};La(Tj,{ButtonWidget:()=>Bp,MenuItemWidget:()=>oM,MenuWidget:()=>ET,NativeWidget:()=>Nu,SliderWidget:()=>Gv,ToolbarWidget:()=>Mm,WIDGET_HTML_EVENTS:()=>bv,Widget:()=>Eo,WidgetEventUtil:()=>Mr});var Nj=I({"packages/ag-charts-community/src/widget/exports.ts"(){"use strict";yl(),vv(),Fv(),$A(),Bv(),oR(),yit(),Lj()}}),RT,rM,BT=I({"packages/ag-charts-community/src/components/popover/popover.ts"(){"use strict";R(),xr(),Ac(),RT="canvas-overlay",rM=class extends rm{constructor(t,e,i){super(),this.ctx=t,this.hideFns=[],this.moduleId=`popover-${e}`,i?.detached?this.element=zt("div"):this.element=t.domManager.addChild(RT,this.moduleId),this.element.setAttribute("role","presentation"),this.cleanup.register(()=>t.domManager.removeChild(RT,this.moduleId))}attachTo(t){this.element.parentElement||t.element.append(this.element)}hide(t){const{lastFocus:e=this.lastFocus}=t??{};this.element.children.length!==0&&(this.hideFns.forEach(i=>i()),e?.focus(),this.lastFocus=void 0)}removeChildren(){this.element.replaceChildren()}showWithChildren(t,e){if(!this.element.parentElement)throw new Error("Can not show popover that has not been attached to a parent.");const i=zt("div","ag-charts-popover");if(e.ariaLabel!=null&&i.setAttribute("aria-label",e.ariaLabel),e.class!=null&&i.classList.add(e.class),i.replaceChildren(...t),this.element.replaceChildren(i),this.hideFns.push(()=>this.removeChildren()),e.onHide&&this.hideFns.push(e.onHide),e.initialFocus&&e.sourceEvent){const s=_v(e.sourceEvent);s!==void 0&&(this.lastFocus=s,this.initialFocus=e.initialFocus)}return i}getPopoverElement(){return this.element.firstElementChild}updatePosition(t){const e=this.getPopoverElement();e&&(e.style.setProperty("right","unset"),e.style.setProperty("bottom","unset"),t.x!=null&&e.style.setProperty("left",`${Math.floor(t.x)}px`),t.y!=null&&e.style.setProperty("top",`${Math.floor(t.y)}px`),this.initialFocus?.focus(),this.initialFocus=void 0)}}}}),zT,Oj=I({"packages/ag-charts-community/src/components/popover/anchoredPopover.ts"(){"use strict";R(),BT(),zT=class extends rM{setAnchor(t,e){this.anchor=t,this.fallbackAnchor=e,this.updatePosition(t),this.repositionWithinBounds()}showWithChildren(t,e){const i=e.anchor??this.anchor,s=e.fallbackAnchor??this.fallbackAnchor,a=super.showWithChildren(t,e);return i&&this.setAnchor(i,s),de().requestAnimationFrame(()=>{this.repositionWithinBounds()}),a}repositionWithinBounds(){const{anchor:t,ctx:e,fallbackAnchor:i}=this,s=this.getPopoverElement();if(!t||!s)return;const a=e.domManager.getBoundingClientRect(),{offsetWidth:n,offsetHeight:o}=s;let r=Et(0,t.x,a.width-n),l=Et(0,t.y,a.height-o);r!==t.x&&i?.x!=null&&(r=Et(0,i.x-n,a.width-n)),l!==t.y&&i?.y!=null&&(l=Et(0,i.y-o,a.height-o)),this.updatePosition({x:r,y:l})}}}}),Pj,xit=I({"packages/ag-charts-community/src/components/menu/menu.ts"(){"use strict";R(),ku(),Ac(),Oj(),Pj=class extends zT{show(t){const e=t.items.map(s=>this.createRow(t,s)),i=this.showWithChildren(e,t);i.classList.add("ag-charts-menu"),i.setAttribute("role","menu"),this.menuCloser=jE({orientation:"vertical",menu:i,buttons:e,sourceEvent:t.sourceEvent,closeCallback:()=>this.hide()}),this.hideFns.push(()=>{this.menuCloser?.finishClosing(),this.menuCloser=void 0})}createRow(t,e){const{menuItemRole:i="menuitem"}=t,s=e.value===t.value,a=zt("div","ag-charts-menu__row");if(a.setAttribute("role",i),i==="menuitemradio"&&a.setAttribute("aria-checked",(t.value===e.value).toString()),typeof e.value=="string"&&(a.dataset.popoverId=e.value),a.classList.toggle("ag-charts-menu__row--active",s),e.icon!=null){const l=zt("span",`ag-charts-menu__icon ${fv(e.icon)}`);a.appendChild(l)}const n=e.strokeWidth!=null;if(n&&(a.classList.toggle("ag-charts-menu__row--stroke-width-visible",n),a.style.setProperty("--strokeWidth",n?`${e.strokeWidth}px`:null)),e.label!=null){const l=zt("span","ag-charts-menu__label");l.textContent=this.ctx.localeManager.t(e.label),a.appendChild(l)}"altText"in e&&(a.ariaLabel=this.ctx.localeManager.t(e.altText));const o=()=>{t.onPress?.(e)},r=l=>{Pv(l)&&(o(),l.preventDefault(),l.stopPropagation())};return a.addEventListener("keydown",r),a.addEventListener("click",r),a.addEventListener("mousemove",()=>{a.focus({preventScroll:!0})}),a}}}}),FT,_j=I({"packages/ag-charts-community/src/components/popover/draggablePopover.ts"(){"use strict";bj(),BT(),FT=class extends rM{constructor(){super(...arguments),this.dragged=!1}setDragHandle(t){t.addListener("drag-start",e=>{t.addClass(this.dragHandleDraggingClass),this.onDragStart(e)}),t.addListener("drag-move",this.onDragMove.bind(this)),t.addListener("drag-end",()=>{t.removeClass(this.dragHandleDraggingClass),this.onDragEnd.bind(this)})}onDragStart(t){const e=this.getPopoverElement();e&&(t.sourceEvent.preventDefault(),this.dragged=!0,this.dragStartState={client:Cd.from(t.clientX,t.clientY),position:Cd.from(Number(e.style.getPropertyValue("left").replace("px","")),Number(e.style.getPropertyValue("top").replace("px","")))})}onDragMove(t){const{dragStartState:e}=this,i=this.getPopoverElement();if(!e||!i)return;const s=Cd.sub(Cd.from(t.clientX,t.clientY),e.client),a=Cd.add(e.position,s),n=this.ctx.domManager.getBoundingClientRect(),o={};a.x>=0&&a.x+i.offsetWidth<=n.width&&(o.x=a.x),a.y>=0&&a.y+i.offsetHeight<=n.height&&(o.y=a.y),this.updatePosition(o)}onDragEnd(){this.dragStartState=void 0}}}}),$g,bit=I({"packages/ag-charts-community/src/components/toolbar/toolbarButtonProperties.ts"(){"use strict";vt(),vt(),$g=class extends Nt{},S([k],$g.prototype,"icon",2),S([k],$g.prototype,"label",2),S([k],$g.prototype,"ariaLabel",2),S([k],$g.prototype,"tooltip",2)}}),VT,Ej=I({"packages/ag-charts-community/src/components/toolbar/toolbarButtonWidget.ts"(){"use strict";R(),ku(),Bv(),VT=class extends Bp{constructor(t){super(),this.localeManager=t}update(t){const{localeManager:e}=this;t.tooltip&&(this.elem.title=e.t(t.tooltip));let i="";if(t.icon!=null&&(i=`<span class="${fv(t.icon)} ag-charts-toolbar__icon"></span>`),t.label!=null){const s=e.t(t.label);i=`${i}<span class="ag-charts-toolbar__label">${s}</span>`}this.elem.innerHTML=i}setChecked(t){Ut(this.elem,"aria-checked",t)}}}}),GT,lM,Rj,Bj=I({"packages/ag-charts-community/src/components/toolbar/toolbar.ts"(){"use strict";Wt(),NR(),vt(),$A(),Ej(),GT="ag-charts-toolbar__button--active",lM=class extends Mm{constructor({eventsHub:t,localeManager:e},i,s){super(s),this.ariaLabelId=i,this.horizontalSpacing=10,this.verticalSpacing=10,this.events=new QA,this.hasPrefix=!1,this.buttonWidgets=[],this.updateAriaLabel=()=>this.setAriaLabel(this.localeManager.t(this.ariaLabelId)),this.eventsHub=t,this.localeManager=e,this.addClass("ag-charts-toolbar"),this.toggleClass("ag-charts-toolbar--horizontal",s==="horizontal"),this.toggleClass("ag-charts-toolbar--vertical",s==="vertical"),this.eventsHub.on("locale:change",this.updateAriaLabel),this.updateAriaLabel()}setAriaLabelId(t){this.ariaLabelId=t,this.updateAriaLabel()}addToolbarListener(t,e){return this.events.addListener(t,e)}clearButtons(){for(const t of this.buttonWidgets)t.destroy();this.buttonWidgets.splice(0)}updateButtons(t){const{buttonWidgets:e}=this;for(const[i,s]of t.entries())(this.buttonWidgets.at(i)??this.createButton(i,s)).update(s);for(let i=t.length;i<e.length;i++)this.buttonWidgets.at(i)?.destroy();this.buttonWidgets.splice(t.length),this.refreshButtonClasses()}updateButtonByIndex(t,e){this.buttonWidgets.at(t)?.update(e)}clearActiveButton(){for(const t of this.buttonWidgets)t.toggleClass(GT,!1)}toggleActiveButtonByIndex(t){if(t!==-1)for(const[e,i]of this.buttonWidgets.entries())i.toggleClass(GT,t!=null&&t===e)}toggleButtonEnabledByIndex(t,e){t!==-1&&this.buttonWidgets.at(t)?.setEnabled(e)}toggleSwitchCheckedByIndex(t,e){t!==-1&&this.buttonWidgets.at(t)?.setChecked(e)}getButtonBounds(){return this.buttonWidgets.map(t=>this.getButtonWidgetBounds(t))}setButtonHiddenByIndex(t,e){this.buttonWidgets.at(t)?.setHidden(e)}getButtonWidgetBounds(t){const e=this.getBounds(),i=t.getBounds();return new gt(i.x+e.x,i.y+e.y,i.width,i.height)}refreshButtonClasses(){const{buttonWidgets:t,hasPrefix:e}=this;let i,s,a;for(const[n,o]of t.entries())i=!e&&n===0||a!=o.section,s=n===t.length-1||o.section!=t.at(n+1)?.section,o.toggleClass("ag-charts-toolbar__button--first",i),o.toggleClass("ag-charts-toolbar__button--last",s),o.toggleClass("ag-charts-toolbar__button--gap",n>0&&i),a=o.section}createButton(t,e){const i=this.createButtonWidget();return i.addClass("ag-charts-toolbar__button"),i.addListener("click",s=>{const a={index:t,...e instanceof Nt?e.toJson():e},n=this.getButtonWidgetBounds(i);this.events.dispatch("button-pressed",{event:s,button:a,buttonBounds:n})}),i.addListener("focus",()=>{this.events.dispatch("button-focused",{button:{index:t}})}),e.section&&(i.section=e.section),this.buttonWidgets.push(i),this.addChild(i),i}},Rj=class extends lM{createButtonWidget(){return new VT(this.localeManager)}}}}),zj,Fj,Vj,vit=I({"packages/ag-charts-community/src/components/toolbar/floatingToolbar.ts"(){"use strict";R(),Wt(),ku(),Fv(),_j(),Bj(),zj=class extends FT{constructor(t,e,i){super(t,e),this.onPopoverMoved=i,this.dragHandleDraggingClass="ag-charts-floating-toolbar__drag-handle--dragging"}show(t,e={}){this.showWithChildren(t,{...e,class:"ag-charts-floating-toolbar"})}hide(){this.dragged=!1,super.hide()}getBounds(){const t=this.getPopoverElement();return new gt(t?.offsetLeft??0,t?.offsetTop??0,t?.offsetWidth??0,t?.offsetHeight??0)}hasBeenDragged(){return this.dragged}setAnchor(t,e,i){const s=this.getPopoverElement();if(!s)return;const a=t.position??"above",{offsetWidth:n,offsetHeight:o}=s;let r=t.y-o-i,l=t.x-n/2;a==="below"?r=t.y+i:a==="right"?(r=t.y-o/2,l=t.x+e):a==="above-left"&&(l=t.x),this.updatePosition({x:l,y:r})}ignorePointerEvents(){const t=this.getPopoverElement();t&&(t.style.pointerEvents="none")}capturePointerEvents(){const t=this.getPopoverElement();t&&(t.style.pointerEvents="unset")}updatePosition(t){const e=this.getBounds(),i=this.ctx.domManager.getBoundingClientRect();t.x=Math.floor(Et(0,t.x,i.width-e.width)),t.y=Math.floor(Et(0,t.y,i.height-e.height)),super.updatePosition(t),this.onPopoverMoved()}},Fj=class extends lM{constructor(t,e,i){super(t,e,"horizontal"),this.hasPrefix=!0,this.popover=new zj(t,i,this.onPopoverMoved.bind(this)),this.dragHandle=new Vj(t.localeManager.t("toolbarAnnotationsDragHandle")),this.popover.setDragHandle(this.dragHandle)}destroy(){super.destroy(),this.popover.destroy()}show(t={}){this.popover.show([this.dragHandle.getElement(),this.getElement()],t)}hide(){this.popover.hide()}setAnchor(t){this.popover.setAnchor(t,this.horizontalSpacing,this.verticalSpacing)}hasBeenDragged(){return this.popover.hasBeenDragged()}ignorePointerEvents(){this.popover.ignorePointerEvents()}capturePointerEvents(){this.popover.capturePointerEvents()}onPopoverMoved(){const t=this.popover.getBounds();if(this.popoverBounds?.equals(t))return;this.popoverBounds=t.clone();const e=this.getButtonBounds();this.events.dispatch("toolbar-moved",{popoverBounds:t,buttonBounds:e})}getButtonWidgetBounds(t){const e=this.popover.getBounds(),i=super.getButtonWidgetBounds(t),s=this.dragHandle.getBounds();return new gt(i.x+e.x-s.width,i.y+e.y,i.width,i.height)}},Vj=class extends Nu{constructor(t){super(zt("div","ag-charts-floating-toolbar__drag-handle"));const e=new Nu(zt("span",`${fv("drag-handle")} ag-charts-toolbar__icon`));e.setAriaHidden(!0),this.addChild(e),this.elem.title=t}}}}),Gj={};La(Gj,{AbstractBarSeries:()=>Gw,AbstractBarSeriesProperties:()=>C0,ActionOnSet:()=>Na,AnchoredPopover:()=>zT,Animation:()=>lC,AnimationManager:()=>dC,Arc:()=>tr,Axis:()=>pS,AxisGroupZIndexMap:()=>ZC,AxisInterval:()=>Uu,AxisLabel:()=>Ui,AxisTick:()=>Oc,AxisTickGenerator:()=>dL,BASE_FONT_SIZE:()=>kr,BBox:()=>gt,Background:()=>xd,BackgroundModule:()=>mw,BandScale:()=>wc,BarSeries:()=>jg,BarSeriesModule:()=>Kw,BaseModuleInstance:()=>rm,BaseProperties:()=>Nt,BaseToolbar:()=>lM,ButtonWidget:()=>Bp,CachedTextMeasurer:()=>IA,CachedTextMeasurerPool:()=>Dr,CallbackCache:()=>fA,Caption:()=>Pe,CartesianAxis:()=>Qp,CartesianSeries:()=>Hl,CartesianSeriesNodeEvent:()=>v0,CartesianSeriesProperties:()=>Vr,CategoryAxis:()=>eh,CategoryScale:()=>kg,ChangeDetectableProperties:()=>x0,Chart:()=>ty,ChartAxisDirection:()=>Lv,ChartOptions:()=>zg,ChartUpdateType:()=>Fp,CollapseMode:()=>Aw,Color:()=>be,ColorScale:()=>mu,ConicGradient:()=>sA,ContextMenuBuiltins:()=>pC,ContextMenuRegistry:()=>gC,ContinuousScale:()=>me,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>gh,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>fh,DEFAULT_POLAR_DIRECTION_KEYS:()=>G0,DEFAULT_POLAR_DIRECTION_NAMES:()=>j0,DEFAULT_TOOLTIP_CLASS:()=>hs,DEFAULT_TOOLTIP_DARK_CLASS:()=>CL,DIRECTION_SWAP_AXES:()=>PL,DOMManager:()=>GA,DataController:()=>zC,DataModel:()=>RC,DataModelSeries:()=>b0,DataService:()=>km,Debug:()=>Ft,Deprecated:()=>vet,DeprecatedAndRenamedTo:()=>Met,DiscreteTimeScale:()=>Pa,DragInterpreter:()=>SC,DraggablePopover:()=>FT,DropShadow:()=>so,ExtendedPath2D:()=>yu,FILL_IMAGE_DEFAULTS:()=>Gc,FILL_PATTERN_DEFAULTS:()=>Tl,FONT_SIZE:()=>Cv,FONT_SIZE_RATIO:()=>Oa,FillGradientDefaults:()=>pn,FillImageDefaults:()=>ga,FillPatternDefaults:()=>_e,FloatingToolbar:()=>Fj,FormatManager:()=>_u,Gradient:()=>gm,Group:()=>Lt,GroupedCategoryAxis:()=>sh,HdpiCanvas:()=>Wv,HierarchyNode:()=>vj,HierarchySeries:()=>Sj,HierarchySeriesProperties:()=>no,HighlightManager:()=>fC,HighlightOptions:()=>Lr,HighlightProperties:()=>Dl,HighlightState:()=>yL,HighlightStyle:()=>tg,Image:()=>Ld,InteractionManager:()=>uC,InteractionState:()=>hC,InterpolationProperties:()=>Sd,Invalidating:()=>wp,LARGEST_KEY_INTERVAL:()=>qL,Label:()=>Li,LayoutElement:()=>qv,LayoutManager:()=>LC,LegendMarkerLabel:()=>xn,Line:()=>pa,LineSeries:()=>Wg,LineSeriesModule:()=>iT,LinearGradient:()=>aA,LinearScale:()=>Ko,LogScale:()=>ZS,LonLatBBox:()=>Mj,Marker:()=>wi,Menu:()=>Pj,MenuItemWidget:()=>oM,MenuWidget:()=>ET,MercatorScale:()=>Dj,ModuleRegistry:()=>qs,Motion:()=>iC,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Hn,NativeWidget:()=>Nu,NewAreaSeriesModule:()=>Rw,NewBarSeriesModule:()=>Yw,NewBubbleSeriesModule:()=>qw,NewHistogramSeriesModule:()=>tT,NewLineSeriesModule:()=>sT,NewScatterSeriesModule:()=>oT,NiceMode:()=>KC,Node:()=>br,NumberAxis:()=>Yo,ObserveChanges:()=>kc,OrdinalTimeScale:()=>kS,PHASE_METADATA:()=>Wp,PHASE_ORDER:()=>Eu,PREV_NEXT_KEYS:()=>wu,Padding:()=>ml,ParallelStateMachine:()=>jB,Path:()=>Fs,PointerEvents:()=>qI,PolarAxis:()=>Ad,PolarSeries:()=>rx,PolarZIndexMap:()=>pT,Popover:()=>rM,PropertiesArray:()=>Np,Property:()=>k,ProxyInteractionService:()=>UA,ProxyOnWrite:()=>JX,ProxyProperty:()=>ge,ProxyPropertyOnWrite:()=>os,QUICK_TRANSITION:()=>Lm,RENDER_TO_OFFSCREEN_CANVAS_THRESHOLD:()=>jy,RadialColumnShape:()=>vn,Range:()=>zo,Rect:()=>Gs,RepeatType:()=>rC,Rotatable:()=>Pp,RotatableGroup:()=>aE,RotatableText:()=>CA,SAFE_FILLS_OPERATION:()=>zS,SAFE_FILL_OPERATION:()=>xF,SAFE_RANGE2_OPERATION:()=>bF,SAFE_STROKE_FILL_OPERATION:()=>cy,SKIP_JS_BUILTINS:()=>qb,SMALLEST_KEY_INTERVAL:()=>XL,SORT_DOMAIN_GROUPS:()=>QL,Scalable:()=>pA,ScalableGroup:()=>sE,Scene:()=>Dm,SceneArrayChangeDetection:()=>ZI,SceneChangeDetection:()=>lt,SceneObjectChangeDetection:()=>nn,Sector:()=>ps,SectorBox:()=>lT,Selection:()=>Ci,Series:()=>Zm,SeriesContentZIndexMap:()=>vL,SeriesGroupingChangedEvent:()=>LS,SeriesItemHighlightStyle:()=>Cr,SeriesMarker:()=>Yi,SeriesNodeEvent:()=>eg,SeriesNodePickMode:()=>ML,SeriesProperties:()=>Ea,SeriesTooltip:()=>Fr,SeriesZIndexMap:()=>bL,Shape:()=>xi,SimpleTextMeasurer:()=>Dv,SliderWidget:()=>Gv,StateMachine:()=>Up,StateMachineProperty:()=>o7,StopProperties:()=>ov,SvgPath:()=>_T,TRIPLE_EQ:()=>pu,Text:()=>rs,TextUtils:()=>we,TextWrapper:()=>bm,ThemeConstants:()=>TE,ThemeSymbols:()=>OL,TimeAxisParentLevel:()=>nd,TimeScale:()=>Bc,Toolbar:()=>Rj,ToolbarButtonProperties:()=>$g,ToolbarButtonWidget:()=>VT,ToolbarWidget:()=>Mm,Tooltip:()=>gn,TooltipManager:()=>wm,TooltipPosition:()=>Fc,Transformable:()=>He,TransformableGroup:()=>Mu,TransformableText:()=>Cu,Translatable:()=>Su,TranslatableGroup:()=>vs,TranslatableSvgPath:()=>Cj,UnitTimeScale:()=>Fo,UpdateService:()=>wC,Vec2:()=>Cd,Vec4:()=>Hp,WIDGET_HTML_EVENTS:()=>bv,Widget:()=>Eo,WidgetEventUtil:()=>Mr,ZIndexMap:()=>ZA,ZoomManager:()=>CC,accumulateGroup:()=>UF,accumulateStack:()=>KF,accumulatedValue:()=>BF,accumulativeValueProperty:()=>ky,addEscapeEventListener:()=>Nv,addHitTestersToQuadtree:()=>zw,addMouseCloseListener:()=>EA,addOverrideFocusVisibleEventListener:()=>BA,addTouchCloseListener:()=>RA,adjustLabelPlacement:()=>X4,angleBetween:()=>Jb,angleCategoryAxisOptionsDefs:()=>a2,angleNumberAxisOptionsDefs:()=>s2,angularPadding:()=>QI,animationValidation:()=>Ig,annotationCalloutStylesDefs:()=>A2,annotationChannelStyleDefs:()=>e0,annotationChannelTextDefs:()=>S2,annotationCommentStylesDefs:()=>C2,annotationCrossLineStyleDefs:()=>t0,annotationDisjointChannelStyleDefs:()=>k2,annotationFibonacciStylesDefs:()=>i0,annotationLineStyleDefs:()=>wy,annotationLineTextDefs:()=>Ly,annotationMeasurerStylesDefs:()=>Ty,annotationNoteStylesDefs:()=>L2,annotationOptionsDef:()=>gd,annotationParallelChannelStyleDefs:()=>I2,annotationQuickMeasurerStylesDefs:()=>w2,annotationShapeStylesDefs:()=>s0,annotationTextStylesDef:()=>Og,applyShapeFillBBox:()=>Nz,applyShapeStyle:()=>Il,areScalingEqual:()=>Md,area:()=>UL,autoSizedLabelOptionsDefs:()=>Pl,bezier2DDistance:()=>X_,bezier2DExtrema:()=>Z_,boxPlotHighlightStyleOptionsDef:()=>n0,boxPlotSeriesThemeableOptionsDef:()=>T2,boxPlotStyleOptionsDef:()=>a0,buildDateFormatter:()=>Pu,buildResetPathFn:()=>_w,calculateDataDiff:()=>$w,calculateLabelTranslation:()=>oit,calculatePlacement:()=>zz,callWithContext:()=>fl,candlestickSeriesThemeableOptionsDef:()=>O2,cartesianAxisBandHighlightOptions:()=>vg,cartesianAxisCrosshairOptions:()=>Zc,cartesianAxisLabelOptionsDefs:()=>xg,cartesianAxisOptionsDefs:()=>Pr,cartesianChartOptionsDefs:()=>ST,cartesianCrossLineOptionsDefs:()=>Nr,cartesianNumericAxisLabel:()=>WS,cartesianTimeAxisLabel:()=>bg,cartesianTimeAxisParentLevel:()=>uy,checkCrisp:()=>K4,chordSeriesThemeableOptionsDef:()=>P2,clampArray:()=>Tm,clippedRoundRect:()=>zy,collapsedStartingBarPosition:()=>tx,commonAxisLabelOptionsDefs:()=>Or,commonAxisOptionsDefs:()=>Qc,commonChartOptionsDefs:()=>Tt,commonCrossLineLabelOptionsDefs:()=>qc,commonCrossLineOptionsDefs:()=>Wo,commonSeriesOptionsDefs:()=>Jn,commonSeriesThemeableOptionsDefs:()=>Kt,compareDates:()=>gS,computeBarFocusBounds:()=>Ww,computeMarkerFocusBounds:()=>qy,coneFunnelSeriesThemeableOptionsDef:()=>_2,continuousAxisOptions:()=>Xc,countExpandingSearch:()=>uB,createButton:()=>cit,createCheckbox:()=>hit,createDatumId:()=>yn,createDeprecationWarning:()=>TT,createIcon:()=>Aj,createIdsGenerator:()=>cL,createSelect:()=>uit,createTextArea:()=>dit,dateToNumber:()=>dn,dateTruncationForDomain:()=>nL,datesSortOrder:()=>QC,datumKeys:()=>Qv,datumStylerProperties:()=>Lc,deconstructSelectionsOrNodes:()=>Kv,deepClone:()=>$e,deepFreeze:()=>dl,diff:()=>Ag,drawCorner:()=>Vg,drawMarkerUnitPolygon:()=>Qm,durationDay:()=>_c,durationHour:()=>Pc,durationMinute:()=>Sl,durationMonth:()=>fS,durationSecond:()=>Ku,durationWeek:()=>tL,durationYear:()=>Kp,easing:()=>iC,enterpriseModule:()=>Bl,errorBarOptionsDefs:()=>yy,errorBarThemeableOptionsDefs:()=>Sg,estimateTickCount:()=>mz,evaluateBezier:()=>Op,extent:()=>El,extractDecoratedProperties:()=>I_,fillsOptionsDef:()=>Mg,findMinMax:()=>ls,findQuadtreeMatch:()=>Fw,findRangeExtent:()=>Nm,fixNumericExtent:()=>_a,flowProportionChartOptionsDefs:()=>ZG,focusCursorAtEnd:()=>YX,formatNumber:()=>aR,formatObjectValidator:()=>GL,formatPercent:()=>sR,formatValue:()=>Cc,fromToMotion:()=>Ue,funnelSeriesThemeableOptionsDef:()=>E2,gaugeChartOptionsDefs:()=>XG,getAngleRatioRadians:()=>P_,getColorStops:()=>F_,getCrossLineValue:()=>HB,getDateTicksForInterval:()=>oL,getDatumRefPoint:()=>mC,getElementBBox:()=>oE,getIconClassNames:()=>fv,getLastFocus:()=>_v,getMissCount:()=>OC,getPath:()=>$I,getPathComponents:()=>OB,getRadialColumnWidth:()=>pj,getSequentialColors:()=>mn,getShapeFill:()=>qu,getShapeStyle:()=>wr,groupAccumulativeValueProperty:()=>ih,groupAverage:()=>RF,groupCount:()=>$L,groupStackValueProperty:()=>HF,groupSum:()=>EF,hasNoModifiers:()=>Sm,heatmapSeriesThemeableOptionsDef:()=>R2,hierarchyChartOptionsDefs:()=>YG,initMenuKeyNav:()=>jE,initRovingTabIndex:()=>GE,interpolatePoints:()=>S0,interpolationOptionsDefs:()=>xy,intervalCeil:()=>nz,intervalEpoch:()=>Vm,intervalExtent:()=>eL,intervalFloor:()=>Un,intervalHierarchy:()=>Gm,intervalMilliseconds:()=>un,intervalNext:()=>rz,intervalPrevious:()=>oz,intervalRange:()=>Kn,intervalRangeCount:()=>iL,intervalStep:()=>Ec,intervalUnit:()=>Ml,isAgFlowProportionChartOptions:()=>Lz,isAgGaugeChartOptions:()=>gL,isAgHierarchyChartOptions:()=>Az,isAgStandaloneChartOptions:()=>wz,isAgTopologyChartOptions:()=>Cz,isBetweenAngles:()=>gu,isButtonClickEvent:()=>Pv,isChartAxisDirection:()=>b6,isContinuous:()=>cS,isDecoratedObject:()=>Yb,isDenseInterval:()=>Xp,isGradientFill:()=>rn,isGradientOrPatternFill:()=>UX,isImageFill:()=>xu,isInputPending:()=>rE,isObjectWithProperty:()=>L_,isObjectWithStringProperty:()=>kX,isPatternFill:()=>Sc,isProperties:()=>Tp,isScaleValid:()=>Uy,jsonApply:()=>xm,jsonDiff:()=>Sr,jsonPropertyCompare:()=>lE,jsonWalk:()=>Dc,keyProperty:()=>$o,legendSymbolSvg:()=>Hz,lineDistanceSquared:()=>rv,linearGaugeSeriesOptionsDef:()=>_l,linearGaugeSeriesThemeableOptionsDef:()=>Sy,linearGaugeTargetOptionsDef:()=>by,listDecoratedProperties:()=>du,lowestGranularityForInterval:()=>SS,lowestGranularityUnitForTicks:()=>aL,lowestGranularityUnitForValue:()=>MS,makeAccessibleClickListener:()=>A6,makeSeriesTooltip:()=>jl,mapLineBackgroundSeriesThemeableOptionsDef:()=>F2,mapLineSeriesThemeableOptionsDef:()=>z2,mapMarkerSeriesThemeableOptionsDef:()=>V2,mapShapeBackgroundSeriesThemeableOptionsDef:()=>j2,mapShapeSeriesThemeableOptionsDef:()=>G2,mapValues:()=>C_,markerFadeInAnimation:()=>Yy,markerOptionsDefs:()=>_r,markerScaleInAnimation:()=>Nw,markerSwipeScaleInAnimation:()=>Ow,merge:()=>um,mergeArrayDefaults:()=>A_,mergeDefaults:()=>se,midpointStartingBarPosition:()=>btt,minimumTimeAxisDatumGranularity:()=>oV,moduleRegistry:()=>_o,motion:()=>jj,multiSeriesHighlightStyle:()=>Vc,nearestSquared:()=>$b,nearestSquaredInContainer:()=>MX,nightingaleSeriesThemeableOptionsDef:()=>W2,normaliseGroupTo:()=>US,normalisePropertyTo:()=>sd,normalisedExtentWithMetadata:()=>HL,normalizeAngle180:()=>dm,normalizeAngle360:()=>Ai,normalizeAngle360FromDegrees:()=>gl,normalizeAngle360Inclusive:()=>TX,normalizeContinuousDomains:()=>MC,numberFormatValidator:()=>qn,objectsEqual:()=>Wi,objectsEqualWith:()=>WI,ohlcSeriesThemeableOptionsDef:()=>B2,ordinalTimeAxisOptionsDefs:()=>dd,pairUpSpans:()=>$y,partialAssign:()=>KI,pathFadeInAnimation:()=>I0,pathMotion:()=>y0,pathSwipeInAnimation:()=>Pw,pick:()=>HI,pickByMatchingAngle:()=>uT,plotAreaPathFill:()=>V4,plotInterpolatedAreaSeriesFillSpans:()=>k0,plotInterpolatedLinePathStroke:()=>M0,plotLinePathStroke:()=>Lw,polarChartOptionsDefs:()=>MT,prepareAreaFillAnimationFns:()=>G4,prepareAreaPathAnimation:()=>j4,prepareAxisAnimationContext:()=>JB,prepareAxisAnimationFunctions:()=>tz,prepareBarAnimationFunctions:()=>ex,prepareLinePathAnimation:()=>F4,prepareLinePathPropertyAnimation:()=>Tw,prepareLinePathStrokeAnimationFns:()=>ww,preparePieSeriesAnimationFunctions:()=>kd,pyramidSeriesThemeableOptionsDef:()=>H2,radarAreaSeriesThemeableOptionsDef:()=>$2,radarLineSeriesThemeableOptionsDef:()=>U2,radialBarSeriesThemeableOptionsDef:()=>K2,radialColumnSeriesThemeableOptionsDef:()=>Y2,radialGaugeSeriesOptionsDef:()=>Dg,radialGaugeSeriesThemeableOptionsDef:()=>My,radialGaugeTargetOptionsDef:()=>vy,radiusCategoryAxisOptionsDefs:()=>o2,radiusNumberAxisOptionsDefs:()=>n2,range:()=>bS,rangeAreaSeriesThemeableOptionsDef:()=>Z2,rangeBarSeriesThemeableOptionsDef:()=>X2,rangeValidator:()=>gy,rangedValueProperty:()=>YL,resetAxisGroupFn:()=>ez,resetAxisLabelSelectionFn:()=>uS,resetAxisLineSelectionFn:()=>UC,resetBarSelectionsFn:()=>ix,resetLabelFn:()=>Vl,resetMarkerFn:()=>Zy,resetMarkerPositionFn:()=>Xy,resetMotion:()=>cs,resetPieSelectionsFn:()=>hT,rowCountProperty:()=>jF,sankeySeriesThemeableOptionsDef:()=>q2,scale:()=>sa,sectorBox:()=>dG,seriesLabelFadeInAnimation:()=>le,seriesLabelFadeOutAnimation:()=>ph,seriesLabelOptionsDefs:()=>ye,setElementBBox:()=>gv,setPath:()=>UI,shadowOptionsDefs:()=>Ho,shallowClone:()=>mA,singleSeriesHighlightStyle:()=>yF,solveBezier:()=>lv,sortAndUniqueDates:()=>qC,splitBezier2D:()=>mm,standaloneChartOptionsDefs:()=>KG,staticFromToMotion:()=>vl,stopPageScrolling:()=>WE,sum:()=>AQ,sumValues:()=>$S,sunburstSeriesThemeableOptionsDef:()=>Q2,tickFormat:()=>gz,timeInterval:()=>jS,timeIntervalUnit:()=>hy,toDegrees:()=>NX,toRadians:()=>Hi,toolbarButtonOptionsDefs:()=>th,tooltipContentAriaLabel:()=>Kz,tooltipHtml:()=>Xz,tooltipOptionsDefs:()=>te,topologyChartOptionsDefs:()=>UG,trailingAccumulatedValue:()=>zF,trailingAccumulatedValueProperty:()=>wQ,treemapSeriesThemeableOptionsDef:()=>J2,updateClipPath:()=>A0,updateLabelNode:()=>Z4,validateCrossLineValue:()=>$B,valueProperty:()=>Yt,visibleRangeIndices:()=>hB,waterfallSeriesThemeableOptionsDef:()=>tw,without:()=>dt});var jj,Sit=I({"packages/ag-charts-community/src/module-support.ts"(){"use strict";zs(),Hu(),TS(),Cm(),wg(),Jp(),R(),jL(),Ba(),Jc(),yV(),Jc(),DT(),LV(),wV(),Bw(),Qw(),eT(),rT(),$i(),Du(),JC(),Ap(),ku(),Det(),Er(),Ou(),Ta(),Ac(),Ub(),Gn(),Pt(),Fz(),vt(),ta(),Pm(),Hm(),ln(),Av(),Uv(),Ar(),vt(),bj(),IC(),Get(),jet(),Wet(),Het(),$et(),dw(),Uet(),xr(),Ket(),Yet(),iw(),s4(),a4(),Zet(),NE(),YC(),Dz(),jn(),PB(),vR(),Rr(),KL(),LB(),DB(),sB(),rB(),oB(),gB(),lB(),eB(),yC(),SB(),x9(),Qu(),Gl(),kl(),Gy(),Wl(),Xet(),$7(),Bu(),aG(),Zw(),Ky(),jw(),za(),cG(),aT(),D0(),Cw(),Hw(),W4(),Uw(),Qy(),Q4(),Ew(),Vw(),Sw(),vw(),W0(),dT(),Ntt(),qet(),Qet(),Jet(),tit(),eit(),iit(),sit(),ait(),Al(),XC(),QB(),hS(),$C(),nj(),id(),YS(),Km(),Tg(),nit(),UB(),rit(),lit(),$z(),Jm(),Ru(),jp(),Hu(),zs(),yw(),QE(),pit(),cR(),Rp(),bR(),Rc(),fu(),yi(),_m(),bu(),vA(),nA(),hL(),AS(),e2(),zu(),Dy(),Bs(),Fu(),rL(),DS(),av(),Lg(),git(),tA(),Gg(),xw(),Vn(),Fn(),ns(),Nc(),nv(),V_(),R_(),E_(),E0(),i4(),fit(),cn(),Bs(),rL(),Vo(),Go(),Wz(),r4(),Jm(),uG(),gR(),mit(),hv(),cv(),jp(),Lu(),Wt(),Oe(),YA(),dj(),$u(),WB(),Yn(),gj(),Fy(),B0(),vu(),bi(),li(),Rp(),Nj(),xit(),Oj(),_j(),BT(),bit(),Ej(),Bj(),vit(),jj={...VB,...GB}}}),P={};La(P,{AG_CHARTS_LOCALE_EN_US:()=>KA,AgCharts:()=>$l,AgChartsCommunityModule:()=>Wj,AgErrorBarSupportedSeriesTypes:()=>MR,AgTooltipAnchorToType:()=>XA,AgTooltipPlacementType:()=>qA,VERSION:()=>Ic,_ModuleSupport:()=>Gj,_Scene:()=>AT,_Theme:()=>CT,_Util:()=>LT,_Widget:()=>Tj,setupCommunityModules:()=>fT,time:()=>yj});var Wj,_=I({"packages/ag-charts-community/src/main.ts"(){"use strict";get(),CG(),fet(),yet(),xet(),wv(),hR(),xl(),bet(),Sit(),Nj(),Wj={VERSION:Ic,_Scene:AT,_Theme:CT,_Util:LT,create:$l.create.bind($l),createSparkline:$l.__createSparkline.bind($l),setup:fT,isEnterprise:!1}}}),cM=Object.defineProperty,Hj=Object.getOwnPropertyDescriptor,Mit=Object.getOwnPropertyNames,Dit=Object.prototype.hasOwnProperty,kit=(t,e)=>{for(var i in e)cM(t,i,{get:e[i],enumerable:!0})},jT=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Mit(e))!Dit.call(t,a)&&a!==i&&cM(t,a,{get:()=>e[a],enumerable:!(s=Hj(e,a))||s.enumerable});return t},Iit=(t,e,i)=>(jT(t,e,"default"),i&&jT(i,e,"default")),Ait=t=>jT(cM({},"__esModule",{value:!0}),t),y=(t,e,i,s)=>{for(var a=s>1?void 0:s?Hj(e,i):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&cM(e,i,a),a},WT={};kit(WT,{AgChartsEnterpriseModule:()=>TIt,LicenseManager:()=>wIt,setupEnterpriseModules:()=>$Y}),Co.exports=Ait(WT);var Ul=(_(),w(P)),Cit=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(t,e){let i=t[0],s=t[1],a=t[2],n=t[3];i=this.ff(i,s,a,n,e[0],7,-680876936),n=this.ff(n,i,s,a,e[1],12,-389564586),a=this.ff(a,n,i,s,e[2],17,606105819),s=this.ff(s,a,n,i,e[3],22,-1044525330),i=this.ff(i,s,a,n,e[4],7,-176418897),n=this.ff(n,i,s,a,e[5],12,1200080426),a=this.ff(a,n,i,s,e[6],17,-1473231341),s=this.ff(s,a,n,i,e[7],22,-45705983),i=this.ff(i,s,a,n,e[8],7,1770035416),n=this.ff(n,i,s,a,e[9],12,-1958414417),a=this.ff(a,n,i,s,e[10],17,-42063),s=this.ff(s,a,n,i,e[11],22,-1990404162),i=this.ff(i,s,a,n,e[12],7,1804603682),n=this.ff(n,i,s,a,e[13],12,-40341101),a=this.ff(a,n,i,s,e[14],17,-1502002290),s=this.ff(s,a,n,i,e[15],22,1236535329),i=this.gg(i,s,a,n,e[1],5,-165796510),n=this.gg(n,i,s,a,e[6],9,-1069501632),a=this.gg(a,n,i,s,e[11],14,643717713),s=this.gg(s,a,n,i,e[0],20,-373897302),i=this.gg(i,s,a,n,e[5],5,-701558691),n=this.gg(n,i,s,a,e[10],9,38016083),a=this.gg(a,n,i,s,e[15],14,-660478335),s=this.gg(s,a,n,i,e[4],20,-405537848),i=this.gg(i,s,a,n,e[9],5,568446438),n=this.gg(n,i,s,a,e[14],9,-1019803690),a=this.gg(a,n,i,s,e[3],14,-187363961),s=this.gg(s,a,n,i,e[8],20,1163531501),i=this.gg(i,s,a,n,e[13],5,-1444681467),n=this.gg(n,i,s,a,e[2],9,-51403784),a=this.gg(a,n,i,s,e[7],14,1735328473),s=this.gg(s,a,n,i,e[12],20,-1926607734),i=this.hh(i,s,a,n,e[5],4,-378558),n=this.hh(n,i,s,a,e[8],11,-2022574463),a=this.hh(a,n,i,s,e[11],16,1839030562),s=this.hh(s,a,n,i,e[14],23,-35309556),i=this.hh(i,s,a,n,e[1],4,-1530992060),n=this.hh(n,i,s,a,e[4],11,1272893353),a=this.hh(a,n,i,s,e[7],16,-155497632),s=this.hh(s,a,n,i,e[10],23,-1094730640),i=this.hh(i,s,a,n,e[13],4,681279174),n=this.hh(n,i,s,a,e[0],11,-358537222),a=this.hh(a,n,i,s,e[3],16,-722521979),s=this.hh(s,a,n,i,e[6],23,76029189),i=this.hh(i,s,a,n,e[9],4,-640364487),n=this.hh(n,i,s,a,e[12],11,-421815835),a=this.hh(a,n,i,s,e[15],16,530742520),s=this.hh(s,a,n,i,e[2],23,-995338651),i=this.ii(i,s,a,n,e[0],6,-198630844),n=this.ii(n,i,s,a,e[7],10,1126891415),a=this.ii(a,n,i,s,e[14],15,-1416354905),s=this.ii(s,a,n,i,e[5],21,-57434055),i=this.ii(i,s,a,n,e[12],6,1700485571),n=this.ii(n,i,s,a,e[3],10,-1894986606),a=this.ii(a,n,i,s,e[10],15,-1051523),s=this.ii(s,a,n,i,e[1],21,-2054922799),i=this.ii(i,s,a,n,e[8],6,1873313359),n=this.ii(n,i,s,a,e[15],10,-30611744),a=this.ii(a,n,i,s,e[6],15,-1560198380),s=this.ii(s,a,n,i,e[13],21,1309151649),i=this.ii(i,s,a,n,e[4],6,-145523070),n=this.ii(n,i,s,a,e[11],10,-1120210379),a=this.ii(a,n,i,s,e[2],15,718787259),s=this.ii(s,a,n,i,e[9],21,-343485551),t[0]=this.add32(i,t[0]),t[1]=this.add32(s,t[1]),t[2]=this.add32(a,t[2]),t[3]=this.add32(n,t[3])}cmn(t,e,i,s,a,n){return e=this.add32(this.add32(e,t),this.add32(s,n)),this.add32(e<<a|e>>>32-a,i)}ff(t,e,i,s,a,n,o){return this.cmn(e&i|~e&s,t,e,a,n,o)}gg(t,e,i,s,a,n,o){return this.cmn(e&s|i&~s,t,e,a,n,o)}hh(t,e,i,s,a,n,o){return this.cmn(e^i^s,t,e,a,n,o)}ii(t,e,i,s,a,n,o){return this.cmn(i^(e|~s),t,e,a,n,o)}md51(t){const e=t.length,i=[1732584193,-271733879,-1732584194,271733878];let s;for(s=64;s<=t.length;s+=64)this.md5cycle(i,this.md5blk(t.substring(s-64,s)));t=t.substring(s-64);const a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(s=0;s<t.length;s++)a[s>>2]|=t.charCodeAt(s)<<(s%4<<3);if(a[s>>2]|=128<<(s%4<<3),s>55)for(this.md5cycle(i,a),s=0;s<16;s++)a[s]=0;return a[14]=e*8,this.md5cycle(i,a),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="",s=0;for(;s<4;s++)i+=e[t>>s*8+4&15]+e[t>>s*8&15];return i}hex(t){for(let e=0;e<t.length;e++)t[e]=this.rhex(t[e]);return t.join("")}md5(t){return this.hex(this.md51(t))}add32(t,e){return this.ieCompatibility?this.add32Compat(t,e):this.add32Std(t,e)}add32Std(t,e){return t+e&4294967295}add32Compat(t,e){const i=(t&65535)+(e&65535);return(t>>16)+(e>>16)+(i>>16)<<16|i&65535}};function HT(t){return t==null||t.length===0}var hM={"01":"GRID","02":"CHARTS","0102":"BOTH"},$j="https://www.ag-grid.com/charts/licensing/",$T=class is{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new Cit,this.md5.init()}validateLicense(){const e=this.getLicenseDetails(is.licenseKey,is.gridContext),i=`AG ${e.currentLicenseType==="BOTH"?"Grid and ":""}Charts Enterprise`;let s="";if(e.suppliedLicenseType==="BOTH"?s="AG Grid and AG Charts Enterprise":e.suppliedLicenseType==="GRID"?s="AG Grid Enterprise":e.suppliedLicenseType!==void 0&&(s="AG Charts Enterprise"),e.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(e.expired){const a=is.getChartsReleaseDate(),n=is.formatDate(a);this.outputExpiredKey(e.expiry,n,s)}else e.valid?e.isTrial&&e.trialExpired&&this.outputExpiredTrialKey(e.expiry,i,s):this.outputInvalidLicenseKey(!!e.incorrectLicenseType,i,s)}static extractExpiry(e){const i=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt(is.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 s=i.length-32,a=i.substring(s),n=i.substring(0,s),[o,r,l]=is.extractBracketedInformation(i);return{md5:a,license:n,version:o,isTrial:r,type:l}}getLicenseDetails(e,i=!1){const s="CHARTS";if(HT(e))return{licenseKey:e,valid:!1,missing:!0,currentLicenseType:s};const a=is.getChartsReleaseDate(),{md5:n,license:o,version:r,isTrial:l,type:c}=is.extractLicenseComponents(e);let h=n===this.md5.md5(o)&&e.indexOf("For_Trialing_ag-Grid_Only")===-1,u,d,p=null,g=!1,f;function x(){u=p<new Date,d=void 0}if(h&&(p=is.extractExpiry(o),h=!isNaN(p.getTime()),h))switch(d=a>p,r){case"legacy":case"2":{h=!1;break}case"3":HT(c)?h=!1:(f=c,c!==hM["02"]&&c!==hM["0102"]?(h=!1,g=!0):l&&x())}return h?{licenseKey:e,valid:h,expiry:is.formatDate(p),expired:d,version:r,isTrial:l,trialExpired:u,invalidLicenseTypeForCombo:i?f!=="BOTH":void 0,incorrectLicenseType:g,currentLicenseType:s,suppliedLicenseType:f}:{licenseKey:e,valid:h,incorrectLicenseType:g,currentLicenseType:s,suppliedLicenseType:f}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isE2ETest()&&!this.isWebsiteUrl()&&!HT(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:s=""}=i;return s}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}isE2ETest(){const e=this.getHostname();return/^(?:172\.17\.0\.1|host\.docker\.internal)$/.exec(e)!==null}static formatDate(e){const i=["January","February","March","April","May","June","July","August","September","October","November","December"],s=e.getDate(),a=e.getMonth(),n=e.getFullYear();return s+" "+i[a]+" "+n}static getChartsReleaseDate(){return new Date(parseInt(is.decode(is.RELEASE_INFORMATION),10))}static decode(e){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let s="",a,n,o,r,l,c,h,u=0;const d=e.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<d.length;)r=i.indexOf(d.charAt(u++)),l=i.indexOf(d.charAt(u++)),c=i.indexOf(d.charAt(u++)),h=i.indexOf(d.charAt(u++)),a=r<<2|l>>4,n=(l&15)<<4|c>>2,o=(c&3)<<6|h,s=s+String.fromCharCode(a),c!=64&&(s=s+String.fromCharCode(n)),h!=64&&(s=s+String.fromCharCode(o));return s=is.utf8_decode(s),s}static utf8_decode(e){e=e.replace(/rn/g,"n");let i="";for(let s=0;s<e.length;s++){const a=e.charCodeAt(s);a<128?i+=String.fromCharCode(a):a>127&&a<2048?(i+=String.fromCharCode(a>>6|192),i+=String.fromCharCode(a&63|128)):(i+=String.fromCharCode(a>>12|224),i+=String.fromCharCode(a>>6&63|128),i+=String.fromCharCode(a&63|128))}return i}static setGridContext(e=!1){is.gridContext=e}static setLicenseKey(e){is.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 s=i.filter(r=>r==="TRIAL").length===1,a=i.filter(r=>r.startsWith("v"))[0],n=a?a.replace("v",""):"legacy",o=hM[i.filter(r=>hM[r])[0]];return[n,s,o]}centerPadAndOutput(e){const i=this.totalMessageLength-e.length;console.error(e.padStart(i/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,i="*",s=""){console.error(e.padEnd(this.totalMessageLength-s.length,i)+s)}outputInvalidLicenseKey(e,i,s){is.gridContext||(e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${s} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${$j}.`," ","*"),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 ${$j}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""))),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,i,s){is.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${s} 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){is.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,s){is.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${s} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} 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"}};$T.RELEASE_INFORMATION="MTc1MTk2ODUyNTkzNw==",$T.gridContext=!1;var Ug=$T,wd=(_(),w(P)),Lit=(_(),w(P)),Uj=(R(),w(st));function UT(t,e,i){const s=(n,o,r,l)=>{let c=t[0];for(let h=n;r>0?h<=o:h>o;h+=r){const u=t[h];if(l(c,u))return!0;c=u}return!1},a=Math.floor(t.length/2);return s(e,a,e,i)?!0:s(t.length-e,a,-e,i)}var wit=(_(),w(P)),{AxisInterval:Tit,Property:Nit}=wit._ModuleSupport,KT=class extends Tit{};y([Nit],KT.prototype,"minSpacing",2);var uM=(_(),w(P)),Td=(R(),w(st)),Kj=(_(),w(P)),Yj=(R(),w(st)),Oit=(_(),w(P)),Pit=(R(),w(st)),{BaseProperties:Zj,ChartAxisDirection:_it,Property:vi,Group:YT,FONT_SIZE:Eit}=Oit._ModuleSupport,er=class extends Zj{constructor(){super(...arguments),this.fontSize=Eit.LARGE,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};y([vi],er.prototype,"enabled",2),y([vi],er.prototype,"text",2),y([vi],er.prototype,"fontStyle",2),y([vi],er.prototype,"fontWeight",2),y([vi],er.prototype,"fontSize",2),y([vi],er.prototype,"fontFamily",2),y([vi],er.prototype,"padding",2),y([vi],er.prototype,"color",2),y([vi],er.prototype,"parallel",2);var ba=class extends Zj{constructor(){super(...arguments),this.id=(0,Pit.createId)(this),this.defaultColorRange=[],this.shape="polygon",this.label=new er,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=_it.Angle,this.axisInnerRadius=0,this.axisOuterRadius=0,this.lineGroup=new YT({name:this.id}),this.rangeGroup=new YT({name:this.id}),this.labelGroup=new YT({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,s,a){const{label:n}=this;t.x=e,t.y=i,t.text=n.text,t.textAlign="center",t.textBaseline=s,t.rotation=a,t.rotationCenterX=e,t.rotationCenterY=i,t.fill=n.color,t.fontFamily=n.fontFamily,t.fontSize=n.fontSize,t.fontStyle=n.fontStyle,t.visible=!0}};y([vi],ba.prototype,"enabled",2),y([vi],ba.prototype,"type",2),y([vi],ba.prototype,"range",2),y([vi],ba.prototype,"value",2),y([vi],ba.prototype,"defaultColorRange",2),y([vi],ba.prototype,"fill",2),y([vi],ba.prototype,"fillOpacity",2),y([vi],ba.prototype,"stroke",2),y([vi],ba.prototype,"strokeWidth",2),y([vi],ba.prototype,"strokeOpacity",2),y([vi],ba.prototype,"lineDash",2),y([vi],ba.prototype,"shape",2),y([vi],ba.prototype,"label",2);var{ChartAxisDirection:Rit,getCrossLineValue:Bit,validateCrossLineValue:zit,normalizeAngle360:ZT,Group:Fit,Path:Xj,Sector:Vit,RotatableText:Git,ContinuousScale:jit}=Kj._ModuleSupport,XT=class extends ba{constructor(){super(),this.direction=Rit.Angle,this.polygonNode=new Xj,this.sectorNode=new Vit,this.lineNode=new Xj,this.crossLineRange=new Fit,this.labelNode=new Git,this.ticks=[],this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.crossLineRange.append(this.lineNode),this.labelGroup.append(this.labelNode)}visibilityCheck(){if(!jit.is(this.scale))return!0;const[t,e]=this.scale.domain,i=Bit(this);if(this.type==="range"){const[s,a]=i;return s>=t&&s<=e&&a>=s&&a<=e}else return i>=t&&i<=e}update(t){const{scale:e}=this;if(!e||!zit(this,e)||!this.visibilityCheck()){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updateLineNode(t),this.updatePolygonNode(t),this.updateSectorNode(t),this.updateLabelNode(t)}updateLineNode(t){const{scale:e,type:i,value:s,lineNode:a}=this;if(!t||i!=="line"||!e){a.visible=!1;return}const n=e.convert(s);if(isNaN(n)){a.visible=!1;return}const{axisInnerRadius:o,axisOuterRadius:r}=this;a.visible=!0,a.stroke=this.stroke,a.strokeOpacity=this.strokeOpacity??1,a.strokeWidth=this.strokeWidth??1,a.fill=void 0,a.lineDash=this.lineDash;const l=r*Math.cos(n),c=r*Math.sin(n),h=o*Math.cos(n),u=o*Math.sin(n);a.path.clear(!0),a.path.moveTo(h,u),a.path.lineTo(l,c),this.assignCrossLineGroup(!1,this.crossLineRange)}updatePolygonNode(t){const{polygonNode:e,range:i,scale:s,shape:a,type:n,ticks:o}=this;if(!t||n!=="range"||a!=="polygon"||!s||!i){e.visible=!1;return}const{axisInnerRadius:r,axisOuterRadius:l}=this,c=o.indexOf(i[0]),h=o.indexOf(i[1]),d=(c<=h?o.slice(c,h+1):o.slice(c).concat(o.slice(0,h+1))).map(g=>s.convert(g));e.visible=!0,this.setSectorNodeProps(e);const{path:p}=e;p.clear(!0),d.forEach((g,f)=>{const x=l*Math.cos(g),m=l*Math.sin(g);f===0?p.moveTo(x,m):p.lineTo(x,m)}),r===0?p.lineTo(0,0):d.slice().reverse().forEach(g=>{const f=r*Math.cos(g),x=r*Math.sin(g);p.lineTo(f,x)}),e.path.closePath(),this.assignCrossLineGroup(!0,this.crossLineRange)}updateSectorNode(t){const{sectorNode:e,range:i,scale:s,shape:a,type:n}=this;if(!t||n!=="range"||a!=="circle"||!s||!i){e.visible=!1;return}const{axisInnerRadius:o,axisOuterRadius:r}=this,l=i.map(u=>s.convert(u)),c=s.step??0,h=s instanceof Kj._ModuleSupport.BandScale?c/2:0;e.visible=!0,this.setSectorNodeProps(e),e.centerX=0,e.centerY=0,e.innerRadius=o,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:s,scale:a,type:n,ticks:o}=this;if(!t||e.enabled===!1||!e.text||!a||n==="range"&&!s){i.visible=!1;return}i.visible=!0;const{axisInnerRadius:r,axisOuterRadius:l}=this;let c,h,u,d;if(n==="line"){const p=ZT(a.convert(this.value)),g=1.5*Math.PI,f=(0,Yj.isNumberEqual)(p,g)||p>g||p<Math.PI/2,x=(r+l)/2*Math.cos(p),m=(r+l)/2*Math.sin(p);c=x+e.padding*Math.cos(p+Math.PI/2),h=m+e.padding*Math.sin(p+Math.PI/2),d=f?"top":"bottom",u=f?p:p-Math.PI}else{const[p,g]=s.map(b=>ZT(a.convert(b)));let f=(p+g)/2;p>g&&(f-=Math.PI),f=ZT(f);const x=((0,Yj.isNumberEqual)(f,0)||f>0)&&f<Math.PI;let m;this.shape==="circle"||o.length<3?m=l-e.padding:m=l*Math.cos(Math.PI/o.length)-e.padding,c=m*Math.cos(f),h=m*Math.sin(f),d=x?"bottom":"top",u=x?f-Math.PI/2:f+Math.PI/2}this.setLabelNodeProps(i,c,h,d,u)}};XT.className="AngleCrossLine";var{ChartAxisDirection:Wit,TextWrapper:Hit,TextUtils:$it,Property:qT,toRadians:gx,normalizeAngle360:bh,normalizeAngle360Inclusive:Uit,Path:Kit,RotatableText:Yit,Transformable:Zit,BBox:Xit,Selection:qj,Line:Qj}=uM._ModuleSupport,QT=class extends uM._ModuleSupport.AxisLabel{constructor(){super(...arguments),this.orientation="fixed"}};y([qT],QT.prototype,"orientation",2);var fx=class extends uM._ModuleSupport.PolarAxis{constructor(t,e){super(t,e),this.startAngle=0,this.endAngle=void 0,this.tickLineGroupSelection=qj.select(this.tickLineGroup,Qj,!1),this.gridLineGroupSelection=qj.select(this.gridLineGroup,Qj,!1),this.labelData=[],this.tickData=[],this.radiusLineGroup=this.axisGroup.appendChild(new uM._ModuleSupport.TransformableGroup),this.radiusLine=this.radiusLineGroup.appendChild(new Kit),this.includeInvisibleDomains=!0}get direction(){return Wit.Angle}createLabel(){return new QT}calculateRotations(){const t=gx(this.startAngle),e=bh(t),i=bh(t-Math.PI/2);return{rotation:t,parallelFlipRotation:e,regularFlipRotation:i}}calculateTickLayout(t){const{nice:e,scale:i}=this,s={nice:e,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},a=e?i.niceDomain(s,t):t,n=this.generateAngleTicks(a);this.tickData=n;const o=n.map(l=>l.value),r=o.reduce((l,c)=>Math.max(typeof c=="number"?(0,Td.countFractionDigits)(c):0,l),0);return{niceDomain:a,tickDomain:a,ticks:o,rawTickCount:void 0,fractionDigits:r,timeInterval:void 0,bbox:this.getBBox()}}update(){super.update(),this.updateRadiusLine(),this.updateGridLines(),this.updateTickLines()}normalizedAngles(){const t=bh(-Math.PI/2+gx(this.startAngle)),e=this.endAngle!=null?Uit(gx(this.endAngle)-gx(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(){super.updatePosition();const{translation:t,radiusLineGroup:e}=this,i=Math.floor(t.x),s=Math.floor(t.y);e.translationX=i,e.translationY=s}updateRadiusLine(){const t=this.radiusLine,{path:e}=t;e.clear(!0);const{points:i,closePath:s}=this.getAxisLinePoints();i.forEach(({x:a,y:n,moveTo:o,arc:r,radius:l=0,startAngle:c=0,endAngle:h=0})=>{r?e.arc(a,n,l,c,h):o?e.moveTo(a,n):e.lineTo(a,n)}),s&&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,[s,a]=this.range,n=(0,Td.isNumberEqual)(a-s,2*Math.PI),o=[];if(e==="circle")n?o.push({x:i,y:0,moveTo:!0},{x:0,y:0,radius:i,startAngle:0,endAngle:2*Math.PI,arc:!0,moveTo:!1}):o.push({x:i*Math.cos(s),y:i*Math.sin(s),moveTo:!0},{x:0,y:0,radius:i,startAngle:bh(s),endAngle:bh(a),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})?.ticks?.map(l=>t.convert(l));r&&r.length>2&&r.forEach((l,c)=>{const h=i*Math.cos(l),u=i*Math.sin(l),d=c===0;o.push({x:h,y:u,moveTo:d})})}return{points:o,closePath:n}}updateGridLines(){const{scale:t,gridLength:e,gridLine:{style:i,width:s},innerRadiusRatio:a}=this;if(!(i&&e>0))return;const n=e*a,o=i.length;this.gridLineGroupSelection.each((r,l,c)=>{const{value:h}=l,{stroke:u,lineDash:d}=i[c%o],p=t.convert(h);r.x1=n*Math.cos(p),r.y1=n*Math.sin(p),r.x2=e*Math.cos(p),r.y2=e*Math.sin(p),r.stroke=u,r.strokeWidth=s,r.lineDash=d,r.fill=void 0}),this.gridLineGroupSelection.cleanup()}updateLabels(){const{label:t,tickLabelGroupSelection:e}=this;e.each((i,s,a)=>{const n=this.labelData[a];if(!n||n.hidden){i.visible=!1;return}i.text=n.text,i.setFont(t),i.fill=t.color,i.x=n.x,i.y=n.y,i.textAlign=n.textAlign,i.textBaseline=n.textBaseline,i.visible=!0,n.rotation?(i.rotation=n.rotation,i.rotationCenterX=n.x,i.rotationCenterY=n.y):i.rotation=0})}updateTickLines(){const{scale:t,gridLength:e,tick:i,tickLineGroupSelection:s}=this;s.each((a,n)=>{const{value:o}=n,r=t.convert(o),l=Math.cos(r),c=Math.sin(r);a.x1=e*l,a.y1=e*c,a.x2=(e+i.size)*l,a.y2=(e+i.size)*c,a.stroke=i.stroke,a.strokeWidth=i.width})}createLabelNodeData(t,e,i){const{label:s,gridLength:a,scale:n,tick:o}=this;if(!s.enabled)return[];const r=new Yit,l=i.x-this.translation.x,c=i.x+i.width-this.translation.x,{fractionDigits:h}=this.layout.label,u=this.tickFormatter(this.scale.domain,this.tickData,!1,h),d=t.map((p,g)=>{const{value:f}=p,x=a+s.spacing+o.size,m=n.convert(f),b=Math.cos(m),v=Math.sin(m),M=x*b,D=x*v,{textAlign:L,textBaseline:C}=this.getLabelAlign(m),A=g===t.length-1&&f!==t[0]&&(0,Td.isNumberEqual)(bh(m),bh(n.convert(t[0]))),T=this.getLabelRotation(m);let N=u(f,g);r.text=N,r.x=M,r.y=D,r.setFont(s),r.textAlign=L,r.textBaseline=C,r.rotation=T,T&&(r.rotationCenterX=M,r.rotationCenterY=D);let O=T?Zit.toCanvas(r):r.getBBox();if(O&&e.hideWhenNecessary&&!T){const E=l-O.x,z=O.x+O.width-c,B=1;if(E>B||z>B){const F=O.width-Math.max(E,z);N=Hit.wrapText(N,{maxWidth:F,font:s,textWrap:"never"}),N===$it.EllipsisChar&&(N=""),r.text=N,O=r.getBBox()}}return{text:N,x:M,y:D,textAlign:L,textBaseline:C,hidden:N===""||p.hidden||A,rotation:T,box:O}});return s.avoidCollisions&&this.avoidLabelCollisions(d),d}computeLabelsBBox(t,e){this.labelData=this.createLabelNodeData(this.tickData,t,e);const i=this.labelData.map(({box:s})=>s).filter(s=>s!=null);return!this.label.enabled||i.length===0?null:Xit.merge(i)}getLabelOrientation(){const{label:t}=this;return t instanceof QT?t.orientation:"fixed"}getLabelRotation(t){let e=gx(this.label.rotation??0);t=bh(t);const i=this.getLabelOrientation();return i==="parallel"?(e+=t,t>=0&&t<Math.PI?e-=Math.PI/2:e+=Math.PI/2):i==="perpendicular"&&(e+=t,t>=Math.PI/2&&t<1.5*Math.PI&&(e+=Math.PI)),e}getLabelAlign(t){const e=Math.cos(t),i=Math.sin(t);let s,a;const n=this.getLabelOrientation(),o=(0,Td.isNumberEqual)(e,0),r=(0,Td.isNumberEqual)(i,0),l=(0,Td.isNumberEqual)(e,1),c=(0,Td.isNumberEqual)(i,-1),h=e>0&&!o,u=i>0&&!r;return n==="parallel"?(s="center",a=l&&r||u?"top":"bottom"):n==="perpendicular"?(s=c||h?"left":"right",a="middle"):(s="right",o?s="center":h&&(s="left"),a="bottom",r?a="middle":u&&(a="top")),{textAlign:s,textBaseline:a}}updateCrossLines(){const{shape:t,gridLength:e,innerRadiusRatio:i}=this;this.crossLines.forEach(s=>{s instanceof XT&&(s.ticks=this.tickData.map(a=>a.value),s.shape=t,s.axisOuterRadius=e,s.axisInnerRadius=e*i)}),super.updateCrossLines()}};fx.CrossLineConstructor=XT,y([qT],fx.prototype,"startAngle",2),y([qT],fx.prototype,"endAngle",2);var{Property:JT,CategoryScale:qit}=Lit._ModuleSupport,vh=class extends fx{constructor(t){super(t,new qit),this.groupPaddingInner=0,this.paddingInner=0,this.interval=new KT}generateAngleTicks(t){const{scale:e,gridLength:i}=this,{values:s,minSpacing:a}=this.interval,n={nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},o=s??e.ticks(n,t)?.ticks??[];if(o.length<2||a==null)return o.map(u=>({value:u,visible:!0}));const r=o[0],l=e.convert(r),c=i*Math.cos(l),h=i*Math.sin(l);for(let u=1;u<o.length-1;u++){const d=o[u],p=e.convert(d);if(p-l>Math.PI)break;const g=i*Math.cos(p),f=i*Math.sin(p);if(Math.sqrt((g-c)**2+(f-h)**2)>a){const m=new Set([r]);return UT(o,u,(b,v)=>{m.add(v)}),o.map(b=>{const v=m.has(b);return{value:b,visible:v}})}}return[{value:r,visible:!0}]}avoidLabelCollisions(t){const{minSpacing:e}=this.label;if(t.length<3)return;const i=(l,c)=>{if(l.hidden||c.hidden)return!1;if(e==null)return l.box.collidesBBox(c.box);const h=l.box.clone().grow(e/2),u=c.box.clone().grow(e/2);return h.collidesBBox(u)},s=t[0],a=t.at(-1),n=new Set([s]),o=(0,Uj.isNumberEqual)(s.x,a.x)&&(0,Uj.isNumberEqual)(s.y,a.y),r=Math.floor(t.length/2);for(let l=1;l<=r;l++){const c=o?t.slice(0,-1):t;if(!UT(c,l,i)){UT(c,l,(u,d)=>{n.add(d)});break}}t.forEach(l=>{n.has(l)||(l.hidden=!0,l.box=void 0)})}tickFormatParams(){return{type:"category"}}datumFormatParams(t,e){const{datum:i,seriesId:s,legendItemName:a,key:n,source:o,property:r,domain:l,boundSeries:c}=e;return{type:"category",value:t,datum:i,seriesId:s,legendItemName:a,key:n,source:o,property:r,domain:l,boundSeries:c}}};vh.className="AngleCategoryAxis",vh.type="angle-category",y([JT],vh.prototype,"groupPaddingInner",2),y([JT],vh.prototype,"paddingInner",2),y([JT],vh.prototype,"interval",2);var Qit={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-category",moduleFactory:t=>new vh(t)},Jit=(_(),w(P)),Jj=(R(),w(st)),tst=(_(),w(P)),est=(R(),w(st)),{range:tW,isDenseInterval:ist,LinearScale:tN}=tst._ModuleSupport,eW=class DP extends tN{constructor(){super(...arguments),this.arcLength=0}static getNiceStepAndTickCount(e,i){const[s,a]=i;let n=tN.getTickStep(s,a,e);const o=isNaN(e.maxTickCount)?1/0:e.maxTickCount,r=Math.abs(a-s)/n;let l=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2)));return l>o&&(l/=2,n*=2),{count:l,step:n}}ticks(e,i=this.domain){const{arcLength:s}=this;if(!i||i.length<2||i.some(c=>!isFinite(c))||s<=0)return{ticks:[],count:0};const{nice:a,interval:n}=e,[o,r]=i;if(n){const c=Math.abs(n),h=this.getPixelRange();if(!ist((r-o)/c,h))return tW(o,r,c)}let l;if(a&&this.hasNiceRange()){const c=super.niceDomain(e,i);l=DP.getNiceStepAndTickCount(e,c).step}else l=tN.getTickStep(o,r,e);return tW(o,r,l)}hasNiceRange(){const e=this.range.slice().sort((s,a)=>s-a);return[Math.PI,2*Math.PI].some(s=>(0,est.isNumberEqual)(s,e[1]-e[0]))}niceDomain(e,i=this.domain){const s=super.niceDomain(e,i);if(!this.hasNiceRange())return s;const a=s[0]>s[1],n=a?s[1]:s[0],{step:o,count:r}=DP.getNiceStepAndTickCount(e,s),l=1/o,c=o>=1?Math.ceil(n/o+r)*o:Math.ceil((n+r*o)*l)/l;return a?[c,n]:[n,c]}getPixelRange(){return this.arcLength}},{Property:eN,angleBetween:sst,normalisedExtentWithMetadata:ast,findMinMax:nst}=Jit._ModuleSupport,Nd=class extends fx{constructor(t){super(t,new eW),this.shape="circle",this.interval=new KT}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:s,clipped:a}=ast(t,e,i);return{domain:s,clipped:a}}updateScale(){super.updateScale(),this.scale.arcLength=this.getRangeArcLength()}getRangeArcLength(){const{range:t}=this,e=Math.min(...t),i=Math.max(...t),s=sst(e,i)||2*Math.PI,a=this.gridLength;return s*a}generateAngleTicks(t){const{scale:e,range:i,nice:s}=this,{values:a,step:n,minSpacing:o,maxSpacing:r}=this.interval;let l;if(a==null){const{arcLength:c}=e,h=r?Math.floor(c/r):1,u=o?Math.floor(c/o):1/0,d=Math.floor(4/Math.PI*Math.abs(i[0]-i[1])),p=Math.max(h,Math.min(u,d)),g={nice:s,interval:n,tickCount:p,minTickCount:h,maxTickCount:u};l=e.ticks(g,t)?.ticks??[]}else{const[c,h]=nst(t.map(Number));l=a.filter(u=>u>=c&&u<=h).sort((u,d)=>u-d)}return l.map(c=>({value:c,visible:!0}))}avoidLabelCollisions(t){const{minSpacing:e}=this.label,i=(n,o)=>{if(n.hidden||o.hidden)return!1;if(e==null)return n.box.collidesBBox(o.box);const r=n.box.clone().grow(e/2),l=o.box.clone().grow(e/2);return r.collidesBBox(l)},s=t[0],a=t.at(-1);s!==a&&(0,Jj.isNumberEqual)(s.x,a.x)&&(0,Jj.isNumberEqual)(s.y,a.y)&&(a.hidden=!0);for(let n=1;n<t.length;n*=2){let o=!1;for(let r=n;r<t.length;r+=n){const l=t[r],c=t[r-n];if(i(c,l)){o=!0;break}}if(!o){t.forEach((r,l)=>{l%n>0&&(r.hidden=!0,r.box=void 0)});return}}t.forEach((n,o)=>{o>0&&(n.hidden=!0,n.box=void 0)})}tickFormatParams(t,e,i){return{type:"number",fractionDigits:i}}datumFormatParams(t,e,i){const{datum:s,seriesId:a,legendItemName:n,key:o,source:r,property:l,domain:c,boundSeries:h}=e;return{type:"number",value:t,datum:s,seriesId:a,legendItemName:n,key:o,source:r,property:l,domain:c,boundSeries:h,fractionDigits:i}}};Nd.className="AngleNumberAxis",Nd.type="angle-number",y([eN],Nd.prototype,"min",2),y([eN],Nd.prototype,"max",2),y([eN],Nd.prototype,"interval",2);var ost={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-number",moduleFactory:t=>new Nd(t)},iW=(_(),w(P)),{OrdinalTimeScale:rst,Property:lst,TimeAxisParentLevel:cst,lowestGranularityUnitForTicks:hst,lowestGranularityUnitForValue:ust,minimumTimeAxisDatumGranularity:dst,dateTruncationForDomain:pst,intervalUnit:sW,intervalStep:aW,intervalEpoch:nW,intervalMilliseconds:oW}=iW._ModuleSupport,mx=class extends iW._ModuleSupport.CategoryAxis{constructor(t){super(t,new rst),this.parentLevel=new cst,this.minGranularity=void 0}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}updateScale(){super.updateScale();const{boundSeries:t,direction:e}=this;this.minGranularity=dst(t,e,void 0,void 0)}tickFormatParams(t,e,i,s){s??(s=hst(e));const a=pst(t),n=sW(s),o=aW(s),r=nW(s);return{type:"date",unit:n,step:o,epoch:r,truncateDate:a}}datumFormatParams(t,e,i,s,a){if(typeof t=="number"&&(t=new Date(t)),s==null){const{minGranularity:x}=this,m=ust(t);x!=null&&oW(x)<oW(m)?s=x:s=m}const{datum:n,seriesId:o,legendItemName:r,key:l,source:c,property:h,domain:u,boundSeries:d}=e,p=sW(s),g=aW(s),f=nW(s);return{type:"date",value:t,datum:n,seriesId:o,legendItemName:r,key:l,source:c,property:h,domain:u,boundSeries:d,unit:p,step:g,epoch:f,style:a}}};mx.className="OrdinalTimeAxis",mx.type="ordinal-time",y([lst],mx.prototype,"parentLevel",2);var gst={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ordinal-time",moduleFactory:t=>new mx(t)},fst=(_(),w(P)),dM=(_(),w(P)),mst=(R(),w(st)),rW=(_(),w(P)),iN=(R(),w(st)),{ChartAxisDirection:yst,Property:xst,validateCrossLineValue:bst,normalizeAngle360FromDegrees:vst,Group:Sst,Path:Mst,Sector:Dst,RotatableText:kst}=rW._ModuleSupport,lW=class extends er{constructor(){super(...arguments),this.positionAngle=void 0}};y([xst],lW.prototype,"positionAngle",2);var sN=class extends ba{constructor(){super(),this.direction=yst.Radius,this.label=new lW,this.polygonNode=new Mst,this.sectorNode=new Dst,this.crossLineRange=new Sst,this.labelNode=new kst,this.outerRadius=0,this.innerRadius=0,this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.labelGroup.append(this.labelNode)}update(t){const{scale:e}=this;if(!e||!bst(this,e)){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.updateRadii();const{innerRadius:i,outerRadius:s}=this;t&&(t=i>=this.axisInnerRadius&&s<=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:s,axisOuterRadius:a}=this;if(!e)return{innerRadius:0,outerRadius:0};const n=l=>a+s-l;let o,r;if(i==="line")o=n(e.convert(this.value)),r=o;else{const l=Math.abs(e?.bandwidth??0),c=t.map(h=>e.convert(h));o=n(Math.max(...c)),r=n(Math.min(...c))+l}this.outerRadius=o,this.innerRadius=r}drawPolygon(t,e,i){e.forEach((s,a)=>{const n=t*Math.cos(s),o=t*Math.sin(s);a===0?i.path.moveTo(n,o):i.path.lineTo(n,o)}),i.path.closePath()}updatePolygonNode(t){const{gridAngles:e,polygonNode:i,scale:s,shape:a,type:n,innerRadius:o,outerRadius:r}=this;if(!t||a!=="polygon"||!s||!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=n==="line"?r-l:o+l;this.drawPolygon(h,c,i),this.setSectorNodeProps(i)}updateSectorNode(t){const{axisInnerRadius:e,axisOuterRadius:i,scale:s,sectorNode:a,shape:n,innerRadius:o,outerRadius:r}=this;if(!t||n!=="circle"||!s){a.visible=!1;return}a.visible=!0,a.startAngle=0,a.endAngle=2*Math.PI;const l=this.getPadding(),c=(0,iN.clamp)(e,o+l,i),h=(0,iN.clamp)(e,r-l,i);a.innerRadius=Math.min(c,h),a.outerRadius=Math.max(c,h),this.setSectorNodeProps(a)}updateLabelNode(t){const{innerRadius:e,label:i,labelNode:s,scale:a,shape:n,type:o}=this;if(!t||i.enabled===!1||!i.text||!a){s.visible=!1;return}const r=vst((i.positionAngle??0)-90),l=((0,iN.isNumberEqual)(r,0)||r>0)&&r<Math.PI,c=l?r-Math.PI/2:r+Math.PI/2;let h;const u=this.gridAngles??[];o==="line"?h=e+i.padding:n==="circle"||u.length<3?h=e-i.padding:h=e*Math.cos(Math.PI/u.length)-i.padding;const d=h*Math.cos(r),p=h*Math.sin(r);let g;o==="line"?g=l?"top":"bottom":g=l?"bottom":"top",this.setLabelNodeProps(s,d,p,g,c)}getPadding(){const{scale:t}=this;if(!t)return 0;const e=Math.abs(t.bandwidth??0),i=Math.abs(t.step??0);return t instanceof rW._ModuleSupport.BandScale?(i-e)/2:0}};sN.className="RadiusCrossLine";var{ChartAxisDirection:Ist,ZIndexMap:Ast,Property:aN,normalizeAngle360:cW,toRadians:Cst,Caption:Lst,Group:wst,TransformableGroup:hW,Path:Tst,Line:uW,Selection:dW,AxisTickGenerator:Nst,AxisGroupZIndexMap:Ost}=dM._ModuleSupport,nN=class extends dM._ModuleSupport.AxisLabel{constructor(){super(...arguments),this.autoRotateAngle=335}};y([aN],nN.prototype,"autoRotate",2),y([aN],nN.prototype,"autoRotateAngle",2);var pM=class extends dM._ModuleSupport.PolarAxis{constructor(t,e){super(t,e),this.positionAngle=0,this.gridLineGroupSelection=dW.select(this.gridLineGroup,uW,!1),this.tickGenerator=new Nst(this),this.generatedTicks=void 0,this.headingLabelGroup=this.axisGroup.appendChild(new hW({name:`${this.id}-Axis-heading`})),this.lineNodeGroup=this.axisGroup.appendChild(new hW({name:`${this.id}-Axis-line`})),this.lineNode=this.lineNodeGroup.appendChild(new uW({name:`${this.id}-Axis-line`,zIndex:Ost.AxisLine})),this.gridPathGroup=this.gridGroup.appendChild(new wst({name:`${this.id}-gridPaths`,zIndex:Ast.AXIS_GRID})),this.gridPathSelection=dW.select(this.gridPathGroup,Tst),this.headingLabelGroup.appendChild(this.title.caption.node),this.cleanup.register(this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}get direction(){return Ist.Radius}getAxisTransform(){const t=this.scale.range[0],{translation:e,positionAngle:i,innerRadiusRatio:s}=this,a=t*s,n=Cst(i);return{translationX:e.x,translationY:e.y-t-a,rotation:n,rotationCenterX:0,rotationCenterY:t+a}}update(){super.update(),this.updateTitle(),this.updateGridLines();const{enabled:t,stroke:e,width:i}=this.line;this.lineNode.setProperties({stroke:e,strokeWidth:t?i:0,x1:0,y1:this.range[0],x2:0,y2:this.range[1]})}updatePosition(){super.updatePosition();const t=this.getAxisTransform();this.tickLineGroup.setProperties(t),this.tickLabelGroup.setProperties(t),this.lineNodeGroup.setProperties(t),this.headingLabelGroup.setProperties(t)}calculateRotations(){return{rotation:0,parallelFlipRotation:0,regularFlipRotation:-Math.PI/2}}calculateTickLayout(t,e,i){const a=-Math.PI/2,n=[0,1],o=this.label.getSideFlag(),r=o*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding),{range:l,reverse:c,defaultTickMinSpacing:h}=this,u=this.tickGenerator.generateTicks({domain:t,range:l,reverse:c,niceMode:e,visibleRange:n,primaryTickCount:void 0,defaultTickMinSpacing:h,parallelFlipRotation:0,regularFlipRotation:a,labelX:r,sideFlag:o,removeOverflowLabels:!1}),{tickData:d}=u,{ticks:p,rawTicks:g,rawTickCount:f,tickDomain:x,fractionDigits:m,niceDomain:b=t}=d,v=p.map(M=>this.getTickLabelProps(M,u));return this.generatedTicks={ticks:p,labels:v},{ticks:g,tickDomain:x,niceDomain:b,rawTickCount:f,fractionDigits:m,timeInterval:void 0}}updateSelections(){const{generatedTicks:t}=this;if(!t)return;const{ticks:e,labels:i}=t;this.gridLineGroupSelection.update(this.gridLength?e:[]),this.tickLabelGroupSelection.update(i),this.gridPathSelection.update(this.gridLine.enabled?this.prepareGridPathTickData(e):[]),this.gridLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup(),this.gridPathSelection.cleanup()}updateLabels(){if(!this.label.enabled)return;const t=dM._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(){const{gridLine:{style:t,width:e},shape:i,generatedTicks:s}=this;if(!t||!s)return;const a=t.length,n=(d,p)=>{const{stroke:g,lineDash:f}=t[p%a];d.stroke=g,d.strokeWidth=e,d.lineDash=f,d.fill=void 0},[o,r]=this.gridRange??[0,2*Math.PI],l=(0,mst.isNumberEqual)(r-o,2*Math.PI),u=i==="circle"?(d,p)=>{const{path:g}=d;g.clear(!0);const f=this.getTickRadius(p);l?(g.moveTo(f,0),g.arc(0,0,f,0,2*Math.PI)):(g.moveTo(f*Math.cos(o),f*Math.sin(o)),g.arc(0,0,f,cW(o),cW(r))),l&&g.closePath()}:(d,p)=>{const{path:g}=d,f=this.gridAngles;if(g.clear(!0),!f||f.length<3)return;const x=this.getTickRadius(p);f.forEach((m,b)=>{const v=x*Math.cos(m),M=x*Math.sin(m);b===0?g.moveTo(v,M):g.lineTo(v,M),f.forEach((D,L)=>{const C=x*Math.cos(D),A=x*Math.sin(D);L===0?g.moveTo(C,A):g.lineTo(C,A)}),g.closePath()}),g.closePath()};this.gridPathSelection.each((d,p,g)=>{n(d,g),u(d,p)})}updateTitle(){const t=o=>o.defaultValue,{title:e,range:i}=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=-Lst.SMALL_PADDING,n.textAlign="center",n.textBaseline="bottom",n.text=this.callWithContext(s,this.getTitleFormatterParams(this.scale.domain))),n.visible=a}updateCrossLines(){this.crossLines.forEach(t=>{if(t instanceof sN){const{shape:e,gridAngles:i,range:s,innerRadiusRatio:a}=this,n=s[0];t.shape=e,t.gridAngles=i,t.axisOuterRadius=n,t.axisInnerRadius=n*a}}),super.updateCrossLines()}createLabel(){return new nN}getTickLabelProps(t,e){const{label:i}=this,{rotation:s,textBaseline:a,textAlign:n}=e,o=this.scale.range,r=t.tickLabel??"",c=i.getSideFlag()*(this.getTickSize()+i.spacing+this.seriesAreaPadding),h=r!==""&&r!=null,u=s;return{...this.getLabelStyles({value:t.tickLabel}),tickId:t.tickId,rotation:u,text:r,textAlign:n,textBaseline:a,visible:h,x:c,y:t.translation,rotationCenterX:c,rotationCenterY:t.translation,range:o}}};pM.CrossLineConstructor=sN,y([aN],pM.prototype,"positionAngle",2);var{ProxyPropertyOnWrite:pW,Property:oN,CategoryScale:gW}=fst._ModuleSupport,Sh=class extends pM{constructor(t){super(t,new gW),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,s=e.range[0],a=s*i;if(gW.is(e)){const n=e.domain,o=n.length-1-n.indexOf(t.tick);return o===0?a:e.inset+e.step*(o-.5)+e.bandwidth/2}else{const n=(s-a)/e.domain.length;return s-t.translation+a-n/2}}tickFormatParams(){return{type:"category"}}datumFormatParams(t,e){const{datum:i,seriesId:s,legendItemName:a,key:n,source:o,property:r,domain:l,boundSeries:c}=e;return{type:"category",value:t,datum:i,seriesId:s,legendItemName:a,key:n,source:o,property:r,domain:l,boundSeries:c}}};Sh.className="RadiusCategoryAxis",Sh.type="radius-category",y([oN],Sh.prototype,"groupPaddingInner",2),y([pW("scale","paddingInner"),oN],Sh.prototype,"paddingInner",2),y([pW("scale","paddingOuter"),oN],Sh.prototype,"paddingOuter",2);var Pst={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-category",moduleFactory:t=>new Sh(t)},_st=(_(),w(P)),{Property:fW,normalisedExtentWithMetadata:Est,LinearScale:Rst}=_st._ModuleSupport,Kg=class extends pM{constructor(t){super(t,new Rst),this.shape="polygon"}prepareGridPathTickData(t){const{scale:e}=this,i=e.domain[1];return t.filter(({tick:s})=>s!==i).sort((s,a)=>a.tick-s.tick)}getTickRadius(t){const{scale:e}=this,i=e.range[0],s=i*this.innerRadiusRatio;return i-t.translation+s}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:s,clipped:a}=Est(t,e,i);return{domain:s,clipped:a}}tickFormatParams(t,e,i){return{type:"number",fractionDigits:i}}datumFormatParams(t,e,i){const{datum:s,seriesId:a,legendItemName:n,key:o,source:r,property:l,domain:c,boundSeries:h}=e;return{type:"number",value:t,datum:s,seriesId:a,legendItemName:n,key:o,source:r,property:l,domain:c,boundSeries:h,fractionDigits:i}}};Kg.className="RadiusNumberAxis",Kg.type="radius-number",y([fW],Kg.prototype,"min",2),y([fW],Kg.prototype,"max",2);var Bst={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-number",moduleFactory:t=>new Kg(t)},mW=(_(),w(P)),{ObserveChanges:yW,Property:xW}=mW._ModuleSupport,rN=class extends mW._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!0,t.animationManager.skip(!1),this.cleanup.register(()=>{t.animationManager.skip(!0)})}};y([yW((t,e)=>{t.ctx.animationManager.skip(!e)}),xW],rN.prototype,"enabled",2),y([yW((t,e)=>{t.ctx.animationManager.defaultDuration=e}),xW],rN.prototype,"duration",2);var zst={type:"root",optionsKey:"animation",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new rN(t),themeTemplate:{animation:{enabled:!0}}},gM=(_(),w(P)),lN=(R(),w(st)),cN=(_(),w(P)),bW=(R(),w(st)),Fst='<div contenteditable="plaintext-only" class="ag-charts-text-input__textarea" tabindex="0"></div>',{focusCursorAtEnd:Vst}=cN._ModuleSupport,vW="text-input",SW="canvas-overlay",Gst=class extends cN._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(SW,vW),this.element.classList.add("ag-charts-text-input"),this.cleanup.register(()=>t.domManager.removeChild(SW,vW))}setKeyDownHandler(t){this.cleanup.register((0,bW.attachListener)(this.element,"keydown",t))}show(t){this.element.innerHTML=Fst;const e=this.element.firstElementChild;(0,bW.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",Vst(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:s,getTextInputCoords:a,getTextPosition:n,alignment:o,textAlign:r}=this.layout;t.style.setProperty("width",s?`${s}px`:"unset");const l=e.getBoundingClientRect(),c=a(l.height);let h=c.x;o==="center"?h-=(s??l.width)/2:o==="right"&&(h-=s??l.width);const u=n();let d=c.y;u==="center"?d-=l.height/2:u==="bottom"&&(d-=l.height),t.style.setProperty("top",`${d}px`),t.style.setProperty("left",`${h}px`),t.style.setProperty("max-width",`${i.width-h}px`),t.style.setProperty("text-align",o),e.style.setProperty("text-align",r)}getBBox(){const{left:t,top:e,width:i,height:s}=this.element.getBoundingClientRect();return new cN._ModuleSupport.BBox(t,e,i,s)}},jst=(_(),w(P)),{BaseProperties:Wst,Property:MW}=jst._ModuleSupport,hN=class extends Wst{constructor(){super(...arguments),this.enabled=!1,this.axes="y"}};y([MW],hN.prototype,"enabled",2),y([MW],hN.prototype,"axes",2);var Hst=(_(),w(P)),uN=(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))(uN||{}),$st=Object.values(uN);function Ust(t){for(const e of $st)if(e===t)return e}var Kst=(R(),w(st)),Yst=(_(),w(P)),Zst=(R(),w(st)),Xst=(_(),w(P)),qst=(R(),w(st)),{BaseProperties:Mh,FONT_SIZE:Qst,Property:Zt}=Xst._ModuleSupport,yx=class extends Mh{};y([Zt],yx.prototype,"x",2),y([Zt],yx.prototype,"y",2);var Jst=class extends aa(Kl(AW(Mh))){},dN=class extends aa(Kl(Hr(fN(_d(Mh))))){constructor(){super(...arguments),this.cornerRadius=2}};y([Zt],dN.prototype,"enabled",2),y([Zt],dN.prototype,"cornerRadius",2);var tat=class extends Hr(Mh){},eat=class extends aa(Kl(Hr(Mh))){},Od=class extends _d(Mh){constructor(){super(...arguments),this.label="",this.position="top",this.alignment="left"}};y([Zt],Od.prototype,"label",2),y([Zt],Od.prototype,"position",2),y([Zt],Od.prototype,"alignment",2);var iat=class extends _d(Mh){},xx=class extends _d(Mh){constructor(){super(...arguments),this.label=""}};y([Zt],xx.prototype,"label",2),y([Zt],xx.prototype,"position",2),y([Zt],xx.prototype,"alignment",2);function Pd(t){class e extends aat(AW(t)){constructor(){super(...arguments),this.id=(0,qst.generateUUID)()}}return e}function pN(t){class e extends t{constructor(){super(...arguments),this.start=new yx,this.end=new yx}}return y([Zt],e.prototype,"start",2),y([Zt],e.prototype,"end",2),e}function DW(t){class e extends t{}return y([Zt],e.prototype,"x",2),y([Zt],e.prototype,"y",2),e}function kW(t){class e extends t{}return y([Zt],e.prototype,"value",2),e}function gN(t){class e extends t{constructor(){super(...arguments),this.background=new tat}}return y([Zt],e.prototype,"background",2),e}function Dh(t){class e extends t{constructor(){super(...arguments),this.handle=new eat}}return y([Zt],e.prototype,"handle",2),e}function IW(t){class e extends t{constructor(){super(...arguments),this.axisLabel=new dN}}return y([Zt],e.prototype,"axisLabel",2),e}function fN(t){class e extends t{constructor(){super(...arguments),this.padding=void 0,this.textAlign="center",this.formatter=void 0}}return y([Zt],e.prototype,"padding",2),y([Zt],e.prototype,"textAlign",2),y([Zt],e.prototype,"formatter",2),e}function sat(t){class e extends t{}return e}function mN(t){class e extends t{}return y([Zt],e.prototype,"extendStart",2),y([Zt],e.prototype,"extendEnd",2),e}function aat(t){class e extends t{}return y([Zt],e.prototype,"locked",2),e}function yN(t){class e extends t{setLocaleManager(s){this.localeManager??(this.localeManager=s)}}return e}function AW(t){class e extends t{}return y([Zt],e.prototype,"visible",2),e}function Hr(t){class e extends t{}return y([Zt],e.prototype,"fill",2),y([Zt],e.prototype,"fillOpacity",2),e}function aa(t){class e extends t{}return y([Zt],e.prototype,"stroke",2),y([Zt],e.prototype,"strokeOpacity",2),y([Zt],e.prototype,"strokeWidth",2),e}function Kl(t){class e extends t{constructor(){super(...arguments),this.lineCap=void 0,this.computedLineDash=void 0}}return y([Zt],e.prototype,"lineDash",2),y([Zt],e.prototype,"lineDashOffset",2),y([Zt],e.prototype,"lineStyle",2),e}function _d(t){class e extends t{constructor(){super(...arguments),this.fontSize=Qst.SMALL,this.fontFamily="Verdana, sans-serif"}}return y([Zt],e.prototype,"fontStyle",2),y([Zt],e.prototype,"fontWeight",2),y([Zt],e.prototype,"fontSize",2),y([Zt],e.prototype,"fontFamily",2),y([Zt],e.prototype,"color",2),e}var nat=(_(),w(P)),oat=(_(),w(P)),xN=(R(),w(st));function CW(t){return(0,xN.isNumber)(t)||(0,xN.isString)(t)||(0,xN.isDate)(t)?{value:t,groupPercentage:0}:t??{value:void 0,groupPercentage:0}}function Xi(t){return CW(t)?.value}var{clampArray:rat}=oat._ModuleSupport;function va(t,e){if(t.start==null||t.end==null)return;const i=ci(t.start,e),s=ci(t.end,e);if(!(i==null||s==null))return{x1:i.x,y1:i.y,x2:s.x,y2:s.y}}function ci(t,e){const i=Yl(t.x,e.xAxis),s=Yl(t.y,e.yAxis);return{x:i,y:s}}function Yl(t,e){if(t==null)return 0;const{value:i,groupPercentage:s}=CW(t),{scale:a,snapToGroup:n}=e,o=a.bandwidth===0?a.step??0:a.bandwidth??0,r=n?o/2:o*s;return a.convert(i)+r}function Sa(t,e){const i=fM(t.x,e.xAxis),s=fM(t.y,e.yAxis);return{x:i,y:s}}function fM(t,e){const{scale:i}=e;if(e.continuous&&i.step==null)return e.scaleInvert(t);const s=e.scaleInvertNearest(t),a=i.bandwidth===0?i.step:i.bandwidth??0,n=i.convert(s),o=n+a,r=rat(t,i.range),l=n===o?0:(r-n)/(o-n);return{value:s,groupPercentage:l}}var lat=(_(),w(P)),{BaseProperties:cat}=lat._ModuleSupport,bN=class extends Pd(pN(Dh(cat))){constructor(){super(...arguments),this.snapToAngle=45}getDefaultColor(t){}getDefaultOpacity(t){}},{Property:hat}=nat._ModuleSupport,LW=class extends yN(fN(_d(bN))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}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 ci(this.end,t)}getTextPosition(){return this.position}};y([hat],LW.prototype,"text",2);var{Property:uat,Color:wW}=Yst._ModuleSupport,dat={top:6,right:12,bottom:9,left:12},ir=class extends Hr(aa(LW)){constructor(){super(...arguments),this.type="callout",this.position="bottom",this.alignment="left"}static is(t){return(0,Zst.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}=wW.fromString(this.color??"#888888");return new wW(t,e,i,.66).toString()}getPadding(){const{padding:t}=this;return t==null?{...dat}:{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const i=super.getTextInputCoords(t,e),s=this.getPadding(),a=s.left??0,n=s.bottom??0;return{x:i.x+a,y:i.y-n}}};y([uat],ir.prototype,"type",2);var pat=(_(),w(P)),gat=(R(),w(st)),fat=(_(),w(P)),{BaseProperties:mat,Property:yat}=fat._ModuleSupport,mM=class extends Pd(DW(Dh(fN(_d(mat))))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}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 ci(this,t)}getTextPosition(){return this.position}};y([yat],mM.prototype,"text",2);var{Property:xat,Color:TW}=pat._ModuleSupport,yM={top:8,right:14,bottom:8,left:14},$r=class extends Hr(aa(mM)){constructor(){super(...arguments),this.type="comment",this.position="bottom",this.alignment="left"}static is(t){return(0,gat.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}=TW.fromString(this.color??"#888888");return new TW(t,e,i,.66).toString()}getPadding(){const{padding:t,fontSize:e}=this;return t==null?{top:Math.max(e*.4,yM.top),bottom:Math.max(e*.4,yM.bottom),left:Math.max(e*.8,yM.left),right:Math.max(e*.8,yM.right)}:{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const i=super.getTextInputCoords(t,e),s=this.getPadding();return{x:i.x+s.left,y:i.y-s.bottom}}};y([xat],$r.prototype,"type",2);var bat=(_(),w(P)),xM=(R(),w(st)),vat=(_(),w(P)),{Vec2:Ed}=vat._ModuleSupport;function bx(t,e){return t?"dashed":e??"solid"}function NW(t,e){switch(e){case"solid":return[];case"dashed":return[t*4,t*2];case"dotted":return[0,t*2]}}function Yg(t,e,i,s){const a=bx(t,i);return e??t??NW(s??1,a)}function Zg(t,e,i){const s=bx(e,i);return t??s==="dotted"?"round":void 0}function Sat(t,e){const[i,s]=Ed.from(t),a=e.height,n=Ed.gradient(s,i,a),o=Ed.intercept(s,n,a),r=[{x:i.x,y:a??0},{x:i.x,y:a==null?e.height:a-e.height}];if(n===1/0)return r;let l=[Ed.intersectAtY(n,o,0,a),Ed.intersectAtY(n,o,e.height,a),Ed.intersectAtX(n,o,0,a),Ed.intersectAtX(n,o,e.width,a)];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<h.x?-1:1),l.length!==2?r:l}var{BaseProperties:vN,Property:Va}=bat._ModuleSupport,Mat=class extends aa(vN){},SN=class extends _d(Hr(aa(vN))){constructor(){super(...arguments),this.divider=new Mat}};y([Va],SN.prototype,"divider",2);var MN=class extends Hr(aa(Dh(vN))){constructor(){super(...arguments),this.statistics=new SN}};y([Va],MN.prototype,"statistics",2);var Xg=class extends yN(gN(aa(Kl(bN)))){constructor(){super(...arguments),this.direction="both",this.hasDateRange=!1,this.hasPriceRange=!1,this.statistics=new SN,this.getVolume=()=>{},this.text=new Od}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 Yg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Zg(this.lineCap,this.lineDash,this.lineStyle)}};y([Va],Xg.prototype,"statistics",2),y([Va],Xg.prototype,"text",2);function DN(t){class e extends t{constructor(){super(...arguments),this.hasDateRange=!0}}return e}function kN(t){class e extends t{constructor(){super(...arguments),this.hasPriceRange=!0}}return e}var oo=class extends DN(Xg){constructor(){super(...arguments),this.type="date-range",this.direction="horizontal"}static is(t){return(0,xM.isObject)(t)&&t.type==="date-range"}};y([Va],oo.prototype,"type",2),y([Va],oo.prototype,"extendAbove",2),y([Va],oo.prototype,"extendBelow",2);var ro=class extends kN(Xg){constructor(){super(...arguments),this.type="price-range",this.direction="vertical"}static is(t){return(0,xM.isObject)(t)&&t.type==="price-range"}};y([Va],ro.prototype,"type",2),y([Va],ro.prototype,"extendLeft",2),y([Va],ro.prototype,"extendRight",2);var Zl=class extends DN(kN(Xg)){constructor(){super(...arguments),this.type="date-price-range",this.direction="both"}static is(t){return(0,xM.isObject)(t)&&t.type==="date-price-range"}};y([Va],Zl.prototype,"type",2);var Sn=class extends DN(kN(Xg)){constructor(){super(...arguments),this.type="quick-date-price-range",this.up=new MN,this.down=new MN,this.direction="both"}static is(t){return(0,xM.isObject)(t)&&t.type==="quick-date-price-range"}};y([Va],Sn.prototype,"type",2),y([Va],Sn.prototype,"up",2),y([Va],Sn.prototype,"down",2);var Dat=(_(),w(P)),OW=(R(),w(st)),kat=(_(),w(P)),{TextWrapper:Iat,CachedTextMeasurerPool:Aat,BBox:Cat}=kat._ModuleSupport,vx=1.38;function PW(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:vx,avoidOrphans:!1,textWrap:"always"}}function bM(t,e,i){return i?Iat.wrapText(e,{...PW(t),maxWidth:i}):e}function Lat(t,e){const i=PW(t),{lineMetrics:s,width:a}=Aat.measureLines(e,i),n=s.length*(t.fontSize??14)*vx;return{width:a,height:n}}function IN(t,e,i,s){let a=s?.width??0,n=s?.height??0;if(!s){const o=t.width!=null?bM(t,e,t.width):e;({width:a,height:n}=Lat(t,o))}return new Cat(i.x,i.y,a,n)}function _W(t,e,i,s,{x:a,y:n},o){const{visible:r=!0,fontFamily:l,fontSize:c=14,fontStyle:h,fontWeight:u,textAlign:d}=s,p=c*vx;o??(o=s.position=="center"?"middle":s.position);const g=i?s.getPlaceholderColor():s.color;t.setProperties({x:a,y:n,visible:r,text:e,fill:g,fontFamily:l,fontSize:c,fontStyle:h,fontWeight:u,textAlign:d,lineHeight:p,textBaseline:o})}var{BaseProperties:wat,Property:EW}=Dat._ModuleSupport,Tat=10,Nat=11,RW=20,Oat=22,Pat=10,BW=RW+Pat,zW=34,_at=class extends Hr(aa(wat)){},Ga=class extends Hr(aa(mM)){constructor(){super(...arguments),this.type="note",this.background=new _at,this.position="bottom",this.alignment="center",this.width=200}static is(t){return(0,OW.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??Tat;return{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const{width:i,text:s}=this,a=super.getTextInputCoords(t,e),n=this.getPadding().top,o=IN(this,s,a);o.x=(0,OW.clamp)(i/2,o.x,t.seriesRect.width-i/2);const r=o.y-BW-n*2,l=o.y+Nat+n*2,c=Math.max(o.height,e);return r-c-zW<0?(o.y=l,this.position="top"):(o.y=r+n,this.position="bottom"),{x:o.x,y:o.y}}};y([EW],Ga.prototype,"type",2),y([EW],Ga.prototype,"background",2);var Eat=(_(),w(P)),{BaseProperties:Rat}=Eat._ModuleSupport,Bat=class extends Pd(DW(Dh(Rat))){getDefaultColor(t){}getDefaultOpacity(t){}},AN=class dZ extends Hr(Bat){constructor(){super(...arguments),this.size=32}static is(e){return e instanceof dZ}getDefaultColor(e){return e==="fill-color"?this.fill:void 0}getDefaultOpacity(e){return e==="fill-color"?this.fillOpacity:void 0}},zat=(_(),w(P)),FW=(R(),w(st)),{BaseProperties:VW,Property:vM}=zat._ModuleSupport,na=class extends Pd(kW(Dh(IW(aa(Kl(VW)))))){constructor(){super(...arguments),this.direction="horizontal",this.type="horizontal-line",this.text=new Od}static is(t){return(0,FW.isObject)(t)&&t.type==="horizontal-line"}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return Yg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Zg(this.lineCap,this.lineDash,this.lineStyle)}};y([vM],na.prototype,"type",2),y([vM],na.prototype,"text",2);var Ur=class extends Pd(kW(Dh(IW(aa(Kl(VW)))))){constructor(){super(...arguments),this.direction="vertical",this.type="vertical-line",this.text=new Od}static is(t){return(0,FW.isObject)(t)&&t.type==="vertical-line"}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return Yg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Zg(this.lineCap,this.lineDash,this.lineStyle)}};y([vM],Ur.prototype,"type",2),y([vM],Ur.prototype,"text",2);var Fat=(_(),w(P)),GW=(R(),w(st)),{BaseProperties:Vat,Property:SM}=Fat._ModuleSupport,lo=class extends Pd(gN(pN(Dh(mN(aa(Kl(Vat))))))){constructor(){super(...arguments),this.type="disjoint-channel",this.text=new xx,this.snapToAngle=45}static is(t){return(0,GW.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):GW.Logger.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),t}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 Yg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Zg(this.lineCap,this.lineDash,this.lineStyle)}};y([SM],lo.prototype,"type",2),y([SM],lo.prototype,"startHeight",2),y([SM],lo.prototype,"endHeight",2),y([SM],lo.prototype,"text",2);var Gat=(_(),w(P)),jat=(R(),w(st)),Wat=(_(),w(P)),Hat=(_(),w(P)),jW=(R(),w(st)),{Property:CN}=Hat._ModuleSupport,MM=class extends yN(sat(mN(aa(Kl(bN))))){constructor(){super(...arguments),this.text=new Od}getDefaultColor(t){switch(t){case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return Yg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Zg(this.lineCap,this.lineDash,this.lineStyle)}};y([CN],MM.prototype,"text",2);var Xl=class extends MM{constructor(){super(...arguments),this.type="arrow",this.endCap="arrow"}static is(t){return(0,jW.isObject)(t)&&t.type==="arrow"}};y([CN],Xl.prototype,"type",2);var ql=class extends MM{constructor(){super(...arguments),this.type="line"}static is(t){return(0,jW.isObject)(t)&&t.type==="line"}};y([CN],ql.prototype,"type",2);var{Property:Rd}=Wat._ModuleSupport,Ql=class extends MM{constructor(){super(...arguments),this.label=new iat,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}}};y([Rd],Ql.prototype,"label",2),y([Rd],Ql.prototype,"reverse",2),y([Rd],Ql.prototype,"showFill",2),y([Rd],Ql.prototype,"isMultiColor",2),y([Rd],Ql.prototype,"strokes",2),y([Rd],Ql.prototype,"rangeStroke",2),y([Rd],Ql.prototype,"bands",2);var{Property:WW}=Gat._ModuleSupport,Kr=class extends Ql{constructor(){super(...arguments),this.type="fibonacci-retracement-trend-based",this.endRetracement=new yx}static is(t){return(0,jat.isObject)(t)&&t.type==="fibonacci-retracement-trend-based"}};y([WW],Kr.prototype,"type",2),y([WW],Kr.prototype,"endRetracement",2);var $at=(_(),w(P)),Uat=(R(),w(st)),{Property:Kat}=$at._ModuleSupport,Jl=class extends Ql{constructor(){super(...arguments),this.type="fibonacci-retracement"}static is(t){return(0,Uat.isObject)(t)&&t.type==="fibonacci-retracement"}};y([Kat],Jl.prototype,"type",2);var Yat=(_(),w(P)),HW=(R(),w(st)),{BaseProperties:Zat,Property:DM}=Yat._ModuleSupport,co=class extends Pd(gN(pN(Dh(mN(aa(Kl(Zat))))))){constructor(){super(...arguments),this.type="parallel-channel",this.middle=new Jst,this.text=new xx,this.snapToAngle=45}static is(t){return(0,HW.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):HW.Logger.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),t}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 Yg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Zg(this.lineCap,this.lineDash,this.lineStyle)}};y([DM],co.prototype,"type",2),y([DM],co.prototype,"height",2),y([DM],co.prototype,"middle",2),y([DM],co.prototype,"text",2);var Xat=(_(),w(P)),qat=(R(),w(st)),{Property:Qat}=Xat._ModuleSupport,tc=class extends mM{constructor(){super(...arguments),this.type="text",this.position="bottom"}static is(t){return(0,qat.isObject)(t)&&t.type==="text"}};y([Qat],tc.prototype,"type",2);function kh(t){return Sn.is(t)}function kM(t){return ql.is(t)||na.is(t)||Ur.is(t)||Xl.is(t)||$W(t)}function ec(t){return lo.is(t)||co.is(t)}function $W(t){return Jl.is(t)||Kr.is(t)}function Yr(t){return ir.is(t)||$r.is(t)||Ga.is(t)||tc.is(t)}function Sx(t){return oo.is(t)||ro.is(t)||Zl.is(t)||Sn.is(t)}function LN(t){return Yr(t)&&!Ga.is(t)}function Ih(t){return kM(t)||ec(t)||Sx(t)&&!Sn.is(t)}function Jat(t){return kM(t)||ec(t)||Sx(t)||ir.is(t)||Ga.is(t)}function tnt(t){return Ga.is(t)}function ent(t){return ec(t)||Sx(t)||ir.is(t)||$r.is(t)||AN.is(t)}function int(t){return Yr(t)&&!Ga.is(t)}function qg(t){return(kM(t)||ec(t)||Sx(t))&&!kh(t)&&(0,Kst.isObject)(t.text)}function snt(t,e){"fontSize"in t&&(t.fontSize=e),qg(t)&&(t.text.fontSize=e)}function UW(t,e){const i=e?.strokeWidth??t.strokeWidth??1,s=e?.type??t.lineStyle,a=s??bx(t.lineDash,s),n=NW(i,a);t.strokeWidth=i,t.computedLineDash=n,t.lineStyle=a,t.lineCap=a==="dotted"?"round":void 0}function IM(t,e,i,s,a,n){switch(e){case"fill-color":{"fill"in t&&(t.fill=s),"fillOpacity"in t&&(t.fillOpacity=a),"background"in t&&(t.background.fill=s,t.background.fillOpacity=a);break}case"line-color":{"axisLabel"in t&&(t.axisLabel.fill=s,t.axisLabel.fillOpacity=a,t.axisLabel.stroke=s,t.axisLabel.strokeOpacity=a),"fill"in t&&"fillOpacity"in t&&tnt(t)?(t.fill=s,t.fillOpacity=a):("strokeOpacity"in t&&(t.strokeOpacity=a),"isMultiColor"in t&&"rangeStroke"in t?(t.isMultiColor=n,t.rangeStroke=s):"stroke"in t&&(t.stroke=s));break}case"text-color":{"color"in t&&(t.color=i),qg(t)&&(t.text.color=s);break}}}var{deepClone:ho}=Hst._ModuleSupport,ant=class{constructor(){this.mementoOriginatorKey="annotation-defaults",this.colors=new Map(Object.values(uN).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:ho(this.colors),fontSizes:ho(this.fontSizes),lineStyles:ho(this.lineStyles),lineTextAlignments:ho(this.lineTextAlignments),lineTextPositions:ho(this.lineTextPositions),fibonacciOptions:ho(this.fibonacciOptions)}}guardMemento(t){return!0}restoreMemento(t,e,i){this.colors=ho(i.colors),this.fontSizes=ho(i.fontSizes),this.lineStyles=ho(i.lineStyles),this.lineTextAlignments=ho(i.lineTextAlignments),this.lineTextPositions=ho(i.lineTextPositions),this.fibonacciOptions=ho(i.fibonacciOptions)}setDefaultColor(t,e,i,s,a,n){this.colors.get(t)?.set(e,[i,s,a,n])}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 s=this.fibonacciOptions.get(t);s[e]=i,this.fibonacciOptions.set(t,s)}applyDefaults(t){for(const[e,i]of this.colors)if(t.type===e)for(const[s,[a,n,o,r]=[]]of i)a&&n&&o!=null&&r!=null&&IM(t,s,a,n,o,r);for(const[e,i]of this.fontSizes)t.type!==e||i==null||snt(t,i);for(const[e,i]of this.lineStyles)t.type!==e||i==null||UW(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.keys(i).forEach(s=>{const a=i[s];a!=null&&t.set({[s]:a})})}},KW=(_(),w(P)),YW=(R(),w(st)),ZW=(_(),w(P)),Ah=(R(),w(st)),nnt='<div class="ag-charts-color-picker__palette" tabindex="0"></div><div class="ag-charts-color-picker__color-row"><button class="ag-charts-color-picker__multi-color-button" tabindex="0" type="button"></button> <input class="ag-charts-color-picker__hue-input" tabindex="0" type="range" min="0" max="360" value="0"></div><input class="ag-charts-color-picker__alpha-input" tabindex="0" type="range" min="0" max="1" value="1" step="0.01"> <label class="ag-charts-color-picker__color-field"><span class="ag-charts-color-picker__color-label">Color</span> <input class="ag-charts-color-picker__color-input" tabindex="0" value="#000"></label>',{Color:wN}=ZW._ModuleSupport,XW=t=>{try{const e=wN.fromString(t),[i,s,a]=e.toHSB();return[i,s,a,e.a]}catch{return}},qW=class extends ZW._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),s=this.showWithChildren([e],{initialFocus:i,...t});s.classList.add("ag-charts-color-picker"),s.setAttribute("role","dialog")}createColorPicker(t){let e=t.isMultiColor??!1,[i,s,a,n]=XW(t.color??"#f00")??[0,1,.5,1];n=t.opacity??n;const o=(0,Ah.createElement)("div","ag-charts-color-picker__content");o.innerHTML=nnt,o.ariaLabel=this.ctx.localeManager.t("ariaLabelColorPicker");const r=o.querySelector(".ag-charts-color-picker__palette"),l=o.querySelector(".ag-charts-color-picker__hue-input"),c=o.querySelector(".ag-charts-color-picker__multi-color-button"),h=o.querySelector(".ag-charts-color-picker__alpha-input"),u=o.querySelector(".ag-charts-color-picker__color-input"),d=o.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 v=wN.fromHSB(i,s,a,n).toHexString();if(o.style.setProperty("--h",`${i}`),o.style.setProperty("--s",`${s}`),o.style.setProperty("--v",`${a}`),o.style.setProperty("--a",`${n}`),o.style.setProperty("--color",v.slice(0,7)),o.style.setProperty("--color-a",v),l.value=`${i}`,h.value=`${n}`,h.classList.toggle("ag-charts-color-picker__alpha-input--opaque",n===1),c.classList.toggle("ag-charts-color-picker__multi-color-button--active",e),d.classList.toggle("ag-charts-color-picker__color-label--multi-color",e),document.activeElement!==u&&(u.value=e?"Multi Colour":v.toUpperCase()),m||t.color==null){const M=wN.fromHSB(i,s,a,1).toHexString();t.onChange?.(v,M,n,e)}m&&(this.hasChanged=!0)};p(!1);const g=m=>m.preventDefault(),f=m=>m.stopPropagation(),x=m=>{m.preventDefault();const b=m.currentTarget;b.focus();const v=b.getBoundingClientRect(),M=({clientX:L,clientY:C})=>{e=!1,s=Math.min(Math.max((L-v.left)/v.width,0),1),a=1-Math.min(Math.max((C-v.top)/v.height,0),1),p()};M(m);const D=(0,Ah.attachListener)((0,Ah.getWindow)(),"pointermove",M);(0,Ah.getWindow)().addEventListener("pointerup",D,{once:!0})};return o.addEventListener("mousedown",f),o.addEventListener("touchstart",f),o.addEventListener("touchmove",f),o.addEventListener("keydown",m=>{switch(m.stopPropagation(),m.key){case"Enter":case"Escape":this.hide();break;default:return}m.preventDefault()}),r.addEventListener("pointerdown",x),r.addEventListener("touchstart",g,{passive:!1}),r.addEventListener("touchmove",g,{passive:!1}),r.addEventListener("keydown",m=>{if(m.key==="ArrowLeft")s=(0,Ah.clamp)(0,s-.01,1);else if(m.key==="ArrowRight")s=(0,Ah.clamp)(0,s+.01,1);else if(m.key==="ArrowUp")a=(0,Ah.clamp)(0,a+.01,1);else if(m.key==="ArrowDown")a=(0,Ah.clamp)(0,a-.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,n=m.currentTarget.valueAsNumber??0,p()}),u.addEventListener("input",m=>{e=!1;const b=XW(m.currentTarget.value);b!=null&&([i,s,a,n]=b,p())}),u.addEventListener("blur",()=>p()),u.addEventListener("keydown",m=>{m.key==="Enter"&&(m.currentTarget.blur(),p())}),{element:o,initialFocus:r}}},QW=(_(),w(P));function JW(t){return!(t instanceof QW._ModuleSupport.LogScale)&&!(t instanceof QW._ModuleSupport.BandScale)}var ont=[{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:JW},{label:"toolbarAnnotationsDisjointChannel",icon:"disjoint-channel-drawing",value:"disjoint-channel",visible:JW}],rnt=[{label:"toolbarAnnotationsFibonacciRetracement",icon:"fibonacci-retracement-drawing",value:"fibonacci-retracement"},{label:"toolbarAnnotationsFibonacciRetracementTrendBased",icon:"fibonacci-retracement-trend-based-drawing",value:"fibonacci-retracement-trend-based"}],lnt=[{label:"Fibonacci - Extended",value:10},{label:"Fibonacci - 6 Band",value:6},{label:"Fibonacci - 4 Band",value:4}],cnt=[{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"}],hnt=[{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"}],unt=[{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"}],tH=[{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}],Mx=[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],eH=[{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}],{Color:iH,FloatingToolbar:dnt,Menu:TN,PropertiesArray:pnt,ToolbarButtonProperties:sH,ToolbarButtonWidget:gnt,Property:Bd}=KW._ModuleSupport,Qg=class extends sH{constructor(){super(...arguments),this.checkedOverrides=new sH}};y([Bd],Qg.prototype,"value",2),y([Bd],Qg.prototype,"checkedOverrides",2),y([Bd],Qg.prototype,"color",2),y([Bd],Qg.prototype,"strokeWidth",2),y([Bd],Qg.prototype,"isMultiColor",2);var fnt=class extends gnt{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`)}},mnt=class extends dnt{createButtonWidget(){return new fnt(this.localeManager)}},NN=class extends KW._ModuleSupport.BaseProperties{constructor(t,e){super(),this.ctx=t,this.getActiveDatum=e,this.enabled=!0,this.buttons=new pnt(Qg),this.cleanup=new YW.CleanupRegistry,this.events=new YW.EventEmitter,this.visibleButtons=[],this.toolbar=new mnt(this.ctx,"ariaLabelAnnotationOptionsToolbar","annotation-options"),this.colorPicker=new qW(this.ctx),this.textSizeMenu=new TN(this.ctx,"text-size"),this.lineStyleTypeMenu=new TN(this.ctx,"annotations-line-style-type"),this.lineStrokeWidthMenu=new TN(this.ctx,"annotations-line-stroke-width"),this.cleanup.register(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(),this.toolbar.destroy()})}onDragStart(){this.toolbar.ignorePointerEvents()}onDragEnd(){this.toolbar.capturePointerEvents()}destroy(){this.cleanup.flush()}show(){this.enabled&&this.toolbar.show()}hide(){this.toolbar.hide()}updateButtons(t){if(!this.enabled)return;const e={"line-style-type":Ih(t),"line-stroke-width":Ih(t),"line-color":Jat(t),"text-color":int(t),"fill-color":ent(t),"text-size":LN(t),settings:qg(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.events.emit("hid-overlays",null)}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,s){if(e!=null&&i!=null){const{r:a,g:n,b:o}=iH.fromString(e);e=iH.fromArray([a,n,o,i]).toHexString()}this.updateButtonByValue(t,{color:e,isMultiColor:s})}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})}onButtonPress({event:t,button:e}){const i=this.getActiveDatum();if(i)switch(this.hideOverlays(),e.value){case"line-style-type":{const s=Ih(i)?bx(i.lineDash,i.lineStyle):void 0;this.lineStyleTypeMenu.show({items:Mx,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStyle"),value:s,sourceEvent:t.sourceEvent,onPress:a=>this.onLineStyleTypeMenuPress(a,i),class:"ag-charts-annotations__line-style-type-menu"});break}case"line-stroke-width":{const s=Ih(i)?i.strokeWidth:void 0;this.lineStrokeWidthMenu.show({items:tH,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStrokeWidth"),value:s,sourceEvent:t.sourceEvent,onPress:a=>this.onLineStrokeWidthMenuPress(a,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:(s=>{this.events.emit("saved-color",{type:i.type,colorPickerType:e.value,color:i.getDefaultColor(s)})}).bind(this,e.value)});break}case"text-size":{const s=Yr(i)?i.fontSize:void 0;this.textSizeMenu.show({items:eH,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsTextSize"),value:s,sourceEvent:t.sourceEvent,onPress:a=>this.onTextSizeMenuPress(a,i),class:"ag-charts-annotations__text-size-menu"});break}case"delete":{this.events.emit("pressed-delete",null);break}case"lock":{i.locked=!i.locked,this.refreshButtons(i),this.events.emit("pressed-lock",null);break}case"settings":{this.toolbar.toggleActiveButtonByIndex(e.index),this.events.emit("pressed-settings",t);break}}}onToolbarMoved(t){const{buttonBounds:e,popoverBounds:i}=t,s={x:i.x,y:i.y+i.height+4},a={y:i.y-4};this.colorPicker.setAnchor(s,a);for(const[n,o]of e.entries()){const r=this.visibleButtons.at(n);if(!r)continue;const l={x:o.x,y:o.y+o.height-1},c={y:o.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,s,a,n){this.events.emit("updated-color",{type:e.type,colorPickerType:t,colorOpacity:i,color:s,opacity:a,isMultiColor:n}),this.updateColorPickerColor(t,i,a,n)}onTextSizeMenuPress(t,e){if(!LN(e))return;const i=t.value;this.events.emit("updated-font-size",{type:e.type,fontSize:i}),this.textSizeMenu.hide(),this.updateFontSize(i)}onLineStyleTypeMenuPress(t,e){if(!Ih(e))return;const i=t.value;this.events.emit("updated-line-style",{type:e.type,lineStyleType:i}),this.lineStyleTypeMenu.hide(),this.updateLineStyleType(t)}onLineStrokeWidthMenuPress(t,e){if(!Ih(e))return;const i=t.value;this.events.emit("updated-line-width",{type:e.type,strokeWidth:i}),this.lineStrokeWidthMenu.hide(),this.updateStrokeWidth(t)}refreshButtons(t){const e=t.locked??!1;for(const[i,s]of this.visibleButtons.entries())s&&(s.value==="lock"?(this.toolbar.toggleSwitchCheckedByIndex(i,e),this.updateButtonByIndex(i,e?s.checkedOverrides.toJson():s.toJson())):this.toolbar.toggleButtonEnabledByIndex(i,!e));LN(t)&&this.updateFontSize(t.fontSize),this.updateColors(t),this.updateLineStyles(t)}updateLineStyles(t){if(!Ih(t))return;const e=t.strokeWidth??1,i=bx(t.lineDash,t.lineStyle);this.updateStrokeWidth({strokeWidth:e,value:e,label:String(e)}),this.updateLineStyleType(Mx.find(s=>s.value===i)??Mx[0])}updateButtonByValue(t,e){const i=this.visibleButtons.findIndex(s=>s.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})}};y([Bd],NN.prototype,"enabled",2),y([Bd],NN.prototype,"buttons",2);var ynt=(_(),w(P)),{StateMachine:aH,StateMachineProperty:ON,Vec2:nH,Debug:xnt}=ynt._ModuleSupport,_i=class extends aH{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:s})=>{this.hasMoved=!1,this.dragStart=i,this.offset=i,this.node?.dragStart(this.datum,i,s)}}},dragging:{keyDown:e,keyUp:e,drag:({offset:i,context:s})=>{this.hasMoved=nH.lengthSquared(nH.sub(i,this.dragStart))>0,this.offset=i,this.node?.drag(this.datum,i,s,this.snapping),t.update()},dragEnd:{target:aH.parent,action:()=>{this.node?.stopDragging(),this.hasMoved&&t.recordAction("Move annotation"),t.update()}}}}),this.debug=xnt.create(!0,"annotations"),this.hasMoved=!1,this.snapping=!1}};y([ON()],_i.prototype,"snapping",2),y([ON()],_i.prototype,"datum",2),y([ON()],_i.prototype,"node",2);var bnt=(_(),w(P)),vnt=(R(),w(st)),{Property:Snt}=bnt._ModuleSupport,Ch=class extends AN{constructor(){super(...arguments),this.type="arrow-down"}static is(t){return(0,vnt.isObject)(t)&&t.type==="arrow-down"}};y([Snt],Ch.prototype,"type",2);var Mnt=(_(),w(P)),Dnt=(_(),w(P)),AM=(_(),w(P)),knt=(R(),w(st)),PN=(_(),w(P)),Int=(_(),w(P)),Jg=class extends Int._ModuleSupport.Marker{isPointInPath(t,e){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(t,e)}},oH=class pZ extends PN._ModuleSupport.Group{constructor(){super(...arguments),this.active=!1,this.locked=!1,this.visible=!1,this.zIndex=1}drag(e){const{handle:i,locked:s}=this;return s?{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=pZ.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)}};oH.INACTIVE_STROKE_WIDTH=2;var Lh=oH,_N=class gZ extends Lh{constructor(){super(),this.handle=new Jg({shape:"circle"}),this.glow=new Jg({shape:"circle"}),this.append([this.handle]),this.handle.size=gZ.HANDLE_SIZE,this.handle.strokeWidth=Lh.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2}update(e){this.handle.setProperties({...e,strokeWidth:Lh.INACTIVE_STROKE_WIDTH})}drag(e){return{point:e,offset:{x:0,y:0}}}};_N.HANDLE_SIZE=7,_N.GLOW_SIZE=9;var wh=_N,CM=class tn extends Lh{constructor(){super(),this.handle=new PN._ModuleSupport.Rect,this.glow=new PN._ModuleSupport.Rect,this.gradient="horizontal",this.append([this.glow,this.handle]),this.handle.cornerRadius=tn.CORNER_RADIUS,this.handle.width=tn.HANDLE_SIZE,this.handle.height=tn.HANDLE_SIZE,this.handle.strokeWidth=Lh.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.cornerRadius=tn.CORNER_RADIUS,this.glow.width=tn.GLOW_SIZE,this.glow.height=tn.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=(tn.HANDLE_SIZE-wh.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=wh.HANDLE_SIZE,this.handle.height=wh.HANDLE_SIZE,this.glow.width=wh.GLOW_SIZE,this.glow.height=wh.GLOW_SIZE}else this.handle.cornerRadius=tn.CORNER_RADIUS,this.handle.width=tn.HANDLE_SIZE,this.handle.height=tn.HANDLE_SIZE,this.glow.width=tn.GLOW_SIZE,this.glow.height=tn.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=(tn.HANDLE_SIZE-wh.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"}};CM.HANDLE_SIZE=12,CM.GLOW_SIZE=16,CM.CORNER_RADIUS=4;var tf=CM,EN=class bb extends Lh{constructor(){super(),this.handle=new Jg({shape:"circle"}),this.glow=new Jg({shape:"circle"}),this.append([this.glow,this.handle]),this.handle.size=bb.HANDLE_SIZE,this.handle.strokeWidth=Lh.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.size=bb.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=wh.HANDLE_SIZE,this.glow.size=wh.GLOW_SIZE):(this.handle.size=bb.HANDLE_SIZE,this.glow.size=bb.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"}};EN.HANDLE_SIZE=11,EN.GLOW_SIZE=17;var hi=EN,{ZIndexMap:Ant}=AM._ModuleSupport,Cs=class extends AM._ModuleSupport.Group{constructor(){super(...arguments),this.name="AnnotationScene",this.zIndex=Ant.CHART_ANNOTATION}static isCheck(t,e){return(0,knt.isObject)(t)&&Object.hasOwn(t,"type")&&t.type===e}toggleHovered(t){this.toggleHandles(t)}*nonHandleChildren(){for(const t of this.children())t instanceof Lh||(yield t)}computeBBoxWithoutHandles(){return AM._ModuleSupport.Transformable.toCanvas(this,AM._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}},Cnt=(_(),w(P)),Lnt=(_(),w(P)),wnt=(R(),w(st)),{ContinuousScale:Tnt,Vec2:uo,toRadians:Nnt}=Lnt._ModuleSupport;function Dx(t,e,i=!1,s,a=1){if(!i)return Sa(t,e);const n=s?ci(s,e):uo.origin();return Sa(LM(t,n,a),e)}function LM(t,e,i){const s=uo.sub(t,e),a=Nnt(i),n=Math.round(uo.angle(s)/a)*a;return uo.rotate(s,n,e)}function wM(t,e){const i={};for(const[s,a]of(0,wnt.entries)(t))i[s]=ci(a,e);return i}function ic(t,e,i,s={overflowContinuous:0,translateVectors:void 0,invertYVectors:void 0,snap:void 0}){const{xAxis:a,yAxis:n}=i,o=Object.keys(t),r=[],l=[],c=new Set(s.translateVectors??o),h=new Set(s.invertYVectors??[]),u=new Set([...c,...h]),d=uo.multiply(e,uo.from(1,-1));for(const m of o)u.has(m)&&(t[m]=uo.add(t[m],h.has(m)?d:e),s.snap&&(t[m]=LM(t[m],s.snap.vectors[m],s.snap.angle))),r.push(a.getRangeOverflow(t[m].x)),l.push(n.getRangeOverflow(t[m].y));const p=(m,b)=>Math.abs(m)-Math.abs(b),g=(m,b,v)=>s.overflowContinuous===0||!Tnt.is(m)?v.toSorted(p).at(-1)??0:o.length===u.size?v.toSorted(p).at(-s.overflowContinuous-1)??0:v.filter(D=>D!==0).length<=s.overflowContinuous?0:v.filter((D,L)=>D!==0&&Math.abs(D)<=Math.abs(b)&&u.has(o[L])).toSorted(p).at(-1)??0,f=uo.from(g(a.scale,e.x,r),g(n.scale,e.y,l));if(!uo.equal(f,uo.origin()))for(const m of o)u.has(m)&&(t[m]=uo.round(uo.sub(t[m],f),4));const x={};for(const m of o)x[m]=Sa(t[m],i);return x}var{Vec2:Ont}=Cnt._ModuleSupport,rH=class extends Cs{constructor(){super(...arguments),this.handle=new hi,this.anchor={x:0,y:0,position:"above"}}update(t,e){const i=ci(t,e);this.updateHandle(t,i),this.anchor=this.updateAnchor(t,i,e)}dragStart(t,e,i){this.dragState={offset:e,...wM({handle:t},i)}}drag(t,e,i){const{dragState:s}=this;if(t.locked||!s)return;const{point:a}=ic({point:s.handle},Ont.sub(e,s.offset),i);t.x=a.x,t.y=a.y}translate(t,e,i){if(t.locked)return;const{point:s}=ic({point:ci(t,i)},e,i);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 s=ci(t,i),a=Sa({x:s.x-30,y:s.y-30},i);return e.x=a.x,e.y=a.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:s,y:a}=this.getHandleCoords(t,e,i),n=this.getHandleStyles(t);this.handle.update({...n,x:s,y:a}),this.handle.toggleLocked(t.locked??!1)}updateAnchor(t,e,i){const s=this.getHandleCoords(t,e);return{x:s.x+i.seriesRect.x,y:s.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}}},lH=class extends rH{constructor(){super(),this.append([this.handle])}update(t,e){super.update(t,e);const i=ci(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)}},cH=[[.5,0],[1,.5],[.75,.5],[.75,1],[.25,1],[.25,.5],[0,.5]];function hH(t){Dnt._ModuleSupport.drawMarkerUnitPolygon(t,cH)}hH.anchor={x:.5,y:0};var TM=class extends lH{constructor(){super(),this.type="arrow-up",this.shape=new Jg({shape:hH}),this.append([this.shape])}static is(t){return Cs.isCheck(t,"arrow-up")}getHandleCoords(t,e){const i=hi.HANDLE_SIZE/2,s=super.getHandleCoords(t,e);return s.y-=i,s}},Pnt=cH.map(([t,e])=>[t,1-e]);function uH(t){Mnt._ModuleSupport.drawMarkerUnitPolygon(t,Pnt)}uH.anchor={x:.5,y:1};var NM=class extends lH{constructor(){super(),this.type="arrow-down",this.shape=new Jg({shape:uH}),this.append([this.shape])}static is(t){return Cs.isCheck(t,"arrow-down")}updateAnchor(t,e,i){const s=super.updateAnchor(t,e,i);return s.y-=t.size,s}getHandleCoords(t,e){const i=hi.HANDLE_SIZE/2,s=super.getHandleCoords(t,e);return s.y+=i,s}},_nt=(_(),w(P)),{StateMachine:OM,StateMachineProperty:Ent,Debug:Rnt}=_nt._ModuleSupport,RN=class extends OM{constructor(t){const e=({point:s})=>{const a=this.createDatum();a.set({x:s.x,y:s.y}),t.create(a)},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:OM.parent,reset:OM.parent},"waiting-first-render":{render:{target:OM.parent,action:i}}}),this.debug=Rnt.create(!0,"annotations")}};y([Ent()],RN.prototype,"node",2);var Bnt=class extends RN{createDatum(){return new Ch}},dH={type:"arrow-down",datum:Ch,scene:NM,isDatum:Ch.is,translate:(t,e,i,s)=>{Ch.is(e)&&NM.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Ch.is(e)&&Ch.is(i)&&NM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Ch.is(e)&&NM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Bnt({...t,create:e("arrow-down")}),dragState:t=>new _i(t)},znt=(_(),w(P)),Fnt=(R(),w(st)),{Property:Vnt}=znt._ModuleSupport,Th=class extends AN{constructor(){super(...arguments),this.type="arrow-up"}static is(t){return(0,Fnt.isObject)(t)&&t.type==="arrow-up"}};y([Vnt],Th.prototype,"type",2);var Gnt=class extends RN{createDatum(){return new Th}},pH={type:"arrow-up",datum:Th,scene:TM,isDatum:Th.is,translate:(t,e,i,s)=>{Th.is(e)&&TM.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Th.is(e)&&Th.is(i)&&TM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Th.is(e)&&TM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Gnt({...t,create:e("arrow-up")}),dragState:t=>new _i(t)},jnt=(_(),w(P)),gH=(_(),w(P)),Wnt=(_(),w(P)),Hnt=(R(),w(st)),$nt=(_(),w(P)),{Vec2:Unt,Vec4:fH}=$nt._ModuleSupport,mH=class extends Cs{constructor(){super(...arguments),this.overflowContinuous=0}extendLine({x1:t,y1:e,x2:i,y2:s},a,n){const o={x1:t,y1:e,x2:i,y2:s};if(!a.extendStart&&!a.extendEnd)return o;const[r,l]=Sat(o,n.yAxis.bounds),c=o.x2<o.x1,h=o.y1>=o.y2,u=o.x2===o.x1;return a.extendEnd&&(u?o.y2=h?l.y:r.y:(o.x2=c?r.x:l.x,o.y2=c?r.y:l.y)),a.extendStart&&(u?o.y1=h?r.y:l.y:(o.x1=c?l.x:r.x,o.y1=c?l.y:r.y)),o}dragStart(t,e,i){this.dragState={offset:e,...wM({start:t.start,end:t.end},i)}}drag(t,e,i,s){t.locked||(this.activeHandle?this.dragHandle(t,e,i,s):this.dragAll(t,e,i))}dragAll(t,e,i){const{dragState:s}=this;s&&this.translatePoints(t,s.start,s.end,Unt.sub(e,s.offset),i)}translate(t,e,i){t.locked||this.translatePoints(t,ci(t.start,i),ci(t.end,i),e,i)}copy(t,e,i){const s=va(t,i);if(!s)return;const a=this.computeBBoxWithoutHandles(),n={x:-a.width/2,y:-a.height/2};return this.translatePoints(e,fH.start(s),fH.end(s),n,i),e}translatePoints(t,e,i,s,a){const n=this.getTranslatePointsVectors(e,i),o=ic(n,s,a,{overflowContinuous:this.overflowContinuous});t.start.x=o.start.x,t.end.x=o.end.x,t.start.y=o.start.y,t.end.y=o.end.y}getTranslatePointsVectors(t,e){return{start:t,end:e}}},{Vec2:Knt,Vec4:yH}=Wnt._ModuleSupport,BN=class extends mH{constructor(){super(...arguments),this.start=new hi,this.end=new hi,this.anchor={x:0,y:0,position:"above"}}update(t,e){const i=va(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(0,Hnt.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,s){const{activeHandle:a,dragState:n}=this;if(!a||!n)return;this[a].toggleDragging(!0);const o=a==="start"?"end":"start",r=s?{vectors:{[a]:ci(t[o],i)},angle:t.snapToAngle}:void 0,{[a]:l}=ic({[a]:n[a]},Knt.sub(e,n.offset),i,{overflowContinuous:0,snap:r});t[a].x=l.x,t[a].y=l.y}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(t,e){const{start:i,end:s}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):s.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,s){this.anchor={x:e.x1+i.seriesRect.x,y:e.y1+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(t,e,i,s){return i==="start"?yH.start(e):yH.end(e)}getHandleStyles(t,e){return{fill:t.handle.fill,stroke:t.handle.stroke,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}},{Vec4:xH}=gH._ModuleSupport,Ynt=class extends BN{constructor(){super(...arguments),this.label=new gH._ModuleSupport.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(t){this.textInputBBox=t,this.markDirty("TextualStartEndScene")}update(t,e){const i=va(t,e);if(i==null)return;const s=this.getTextBBox(t,i);this.updateLabel(t,s,i),this.updateHandles(t,i,s),this.updateShape(t,s,i),this.updateAnchor(t,i,e,s)}containsPoint(t,e){return super.containsPoint(t,e)||this.label.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 IN(t,i,xH.end(e),this.textInputBBox)}updateLabel(t,e,i){const{text:s,isPlaceholder:a}=t.getText();_W(this.label,s,a,t,this.getLabelCoords(t,e,i))}updateShape(t,e,i){}getLabelCoords(t,e,i){return xH.end(i)}getHandleStyles(t,e){return{...super.getHandleStyles(t,e),stroke:t.handle.stroke??t.color}}},{drawCorner:Znt,Path:Xnt}=jnt._ModuleSupport,PM=class extends Ynt{constructor(){super(),this.type="callout",this.shape=new Xnt,this.append([this.shape,this.label,this.start,this.end])}static is(t){return Cs.isCheck(t,"callout")}drag(t,e,i,s){t.locked||(this.activeHandle==="end"?this.dragHandle(t,e,i,s):this.dragAll(t,e,i))}getLabelCoords(t,e,i){const s=t.getPadding(),{bodyBounds:a={x:0,y:0,width:0,height:0}}=this.getDimensions(t,e,i)??{};return{x:a.x+s.left,y:a.y-s.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,s){const{bodyBounds:a}=this.getDimensions(t,s,e)??{},n=a??s;this.anchor={x:n.x+i.seriesRect.x,y:n.y+i.seriesRect.y-n.height,position:this.anchor.position}}updateShape(t,e,i){const{shape:s}=this;s.fill=t.fill,s.fillOpacity=t.fillOpacity??1,s.stroke=t.stroke,s.strokeWidth=t.strokeWidth??1,s.strokeOpacity=t.strokeOpacity??1;const{tailPoint:a,bodyBounds:n}=this.getDimensions(t,e,i)??{};!a||!n||this.updatePath(a,n)}updatePath(t,e){const{x:i,y:s}=t,{x:a,y:n,width:o,height:r}=e,l=n-r,c=a+o,h=this.calculateCalloutPlacement({x:i,y:s},e),u=8,d=[{coordinates:{x0:a,x1:a+u,y0:l+u,y1:l,cx:h==="topLeft"?i:a+u,cy:h==="topLeft"?s:l+u},type:h==="topLeft"?"calloutCorner":"corner"},{coordinates:{x0:a+u,x1:c-u,y0:l,y1:l,cx:i,cy:s},type:h==="top"?"calloutSide":"side"},{coordinates:{x0:c-u,x1:c,y0:l,y1:l+u,cx:h==="topRight"?i:c-u,cy:h==="topRight"?s:l+u},type:h==="topRight"?"calloutCorner":"corner"},{coordinates:{x0:c,x1:c,y0:l+u,y1:n-u,cx:i,cy:s},type:h==="right"?"calloutSide":"side"},{coordinates:{x0:c,x1:c-u,y0:n-u,y1:n,cx:h==="bottomRight"?i:c-u,cy:h==="bottomRight"?s:n-u},type:h==="bottomRight"?"calloutCorner":"corner"},{coordinates:{x0:c-u,x1:a+u,y0:n,y1:n,cx:i,cy:s},type:h==="bottom"?"calloutSide":"side"},{coordinates:{x0:a+u,x1:a,y0:n,y1:n-u,cx:h==="bottomLeft"?i:a+u,cy:h==="bottomLeft"?s:n-u},type:h==="bottomLeft"?"calloutCorner":"corner"},{coordinates:{x0:a,x1:a,y0:n-u,y1:l+u,cx:i,cy:s},type:h==="left"?"calloutSide":"side"}],{path:p}=this.shape;p.clear(),p.moveTo(a,l+u),d.forEach(({coordinates:g,type:f})=>{this.drawPath(p,g,u,f)}),p.closePath()}drawPath(t,{x0:e,y0:i,x1:s,y1:a,cx:n,cy:o},r,l){switch(l){case"calloutCorner":{t.lineTo(n,o),t.lineTo(s,a);break}case"corner":{Znt(t,{x0:e,x1:s,y0:i,y1:a,cx:n,cy:o},r,!1);break}case"calloutSide":{if(e!==s){const h=e>s?-1:1,u=Math.min(e,s)+Math.abs(s-e)/2;t.lineTo(u-6*h,i),t.lineTo(n,o),t.lineTo(u+6*h,i),t.lineTo(s,a)}else{const h=i>a?-1:1,u=Math.min(i,a)+Math.abs(i-a)/2;t.lineTo(e,u-6*h),t.lineTo(n,o),t.lineTo(e,u+6*h),t.lineTo(s,a)}break}case"side":default:{t.lineTo(s,a);break}}}calculateCalloutPlacement(t,e){const i=e.x+e.width,s=e.y-e.height;let a,n;return t.x>i?a="right":t.x<e.x&&(a="left"),t.y>e.y?n="bottom":t.y<s&&(n="top"),a&&n?`${n}${a[0].toUpperCase()}${a.substring(1)}`:n??a}getDimensions(t,e,i){const{fontSize:s}=t,a=t.getPadding(),n=a.left+a.right,o=a.top+a.bottom,r=e.width+n,l=Math.max(e.height+o,s+o);return{tailPoint:{x:i.x1,y:i.y1},bodyBounds:{x:e.x,y:e.y,width:r,height:l}}}containsPoint(t,e){const{start:i,end:s,shape:a}=this;if(this.activeHandle=void 0,i.containsPoint(t,e))return this.activeHandle="start",!0;const n=s.containsPoint(t,e)||a.containsPoint(t,e);return n&&(this.activeHandle="end"),n}},qnt=(_(),w(P));function zN({key:t}){return t==="Escape"}function FN({key:t,shiftKey:e}){return!e&&t==="Enter"}var{StateMachine:sr,StateMachineProperty:bH,Debug:Qnt}=qnt._ModuleSupport,VN=class extends sr{constructor(t){const e=({point:d})=>{const p=this.createDatum();p.set({start:d,end:d,visible:!0}),t.create(p)},i=()=>{const{node:d}=this;d?.toggleActive(!0),d?.toggleHandles({start:!0})},s=()=>{t.showTextInput(),this.datum&&(this.datum.visible=!1)},a=()=>{t.hideTextInput(),this.datum&&(this.datum.visible=!0),t.deselect()},n=d=>{this.node?.setTextInputBBox(d),t.update()},o=({point:d})=>{const{datum:p,node:g}=this;p?.set({end:d}),g?.toggleActive(!0),g?.toggleHandles({end:!1}),t.update()},r=()=>{t.showAnnotationOptions(),this.node?.toggleHandles({end:!0})},l=({colorPickerType:d,colorOpacity:p,color:g,opacity:f,isMultiColor:x})=>{const{datum:m}=this;m&&(d==="text-color"&&t.updateTextInputColor(g),IM(m,d,p,g,f,x),t.update())},c=d=>{const{datum:p,node:g}=this;!p||!g||!Yr(p)||(p.fontSize=d,t.updateTextInputFontSize(d),t.update())},h=()=>{t.delete()},u=({textInputValue:d,bbox:p})=>{const{datum:g}=this;if(p!=null&&d!=null&&d.length>0){if(!Yr(g))return;const f=bM(g,d,p.width);g?.set({text:f}),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:sr.parent,reset:sr.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,drag:o,click:{target:"edit",action:r},dragEnd:{target:"edit",action:r},reset:{target:sr.parent,action:h},cancel:{target:sr.parent,action:h}},edit:{onEnter:s,updateTextInputBBox:n,color:l,fontSize:c,textInput:[{guard:zN,target:sr.parent,action:h},{guard:FN,target:sr.parent,action:u}],click:{target:sr.parent,action:u},dragStart:{target:sr.parent,action:u},resize:{target:sr.parent,action:u},onExit:a,cancel:{target:sr.parent,action:h}}}),this.debug=Qnt.create(!0,"annotations")}};y([bH()],VN.prototype,"datum",2),y([bH()],VN.prototype,"node",2);var Jnt=class extends VN{createDatum(){return new ir}},vH={type:"callout",datum:ir,scene:PM,isDatum:ir.is,translate:(t,e,i,s)=>{if(ir.is(e)&&PM.is(t))return t.translate(e,i,s)},copy:(t,e,i,s)=>{if(ir.is(e)&&ir.is(i)&&PM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{ir.is(e)&&PM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Jnt({...t,create:e("callout")}),dragState:t=>new _i(t)},SH=(_(),w(P)),tot=(_(),w(P)),GN=class extends rH{constructor(){super(...arguments),this.label=new tot._ModuleSupport.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(t){this.textInputBBox=t,this.markDirty("TextualPointScene")}update(t,e){const i=ci(t,e),s=this.getTextBBox(t,i,e);this.updateLabel(t,s),this.updateHandle(t,i,s),this.updateShape(t,s),this.anchor=this.updateAnchor(t,s,e)}copy(t,e,i){const s=ci(t,i),a=this.getTextBBox(t,s,i),n=t.getPadding(),o=n.left+n.right,r=n.top+n.bottom,l=(a.width+o)/2,c=a.height+r,h=Sa({x:s.x-l,y:s.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:s}=t.getText();return IN(t,s,{x:e.x,y:e.y},this.textInputBBox)}updateLabel(t,e){const{text:i,isPlaceholder:s}=t.getText();_W(this.label,i,s,t,this.getLabelCoords(t,e),this.getTextBaseline(t))}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}getTextBaseline(t){return t.position=="center"?"middle":t.position}getHandleCoords(t,e,i){return i}getHandleStyles(t){const e=super.getHandleStyles(t);return e.stroke=t.handle.stroke??t.color,e}},{drawCorner:jN}=SH._ModuleSupport,_M=class extends GN{constructor(){super(),this.type="comment",this.shape=new SH._ModuleSupport.Path,this.append([this.shape,this.label,this.handle])}static is(t){return Cs.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 s=super.updateAnchor(t,e,i),a=t.getPadding();return s.y-=a.bottom+a.top,s}updatePath(t,e){const i=t.getPadding(),{x:s,y:a}=e;let{width:n,height:o}=e;const{fontSize:r}=t,l=i.left+i.right,c=i.top+i.bottom;n=n+l,o=Math.max(o+c,r+c);const h=a-o,u=s+n,d=(r*vx+c)/2,{path:p}=this.shape;p.clear(),p.moveTo(s,a),p.lineTo(s,h+d),jN(p,{x0:s,x1:s+d,y0:h+d,y1:h,cx:s+d,cy:h+d},d,!1),p.lineTo(u-d,h),jN(p,{x0:u-d,x1:u,y0:h,y1:h+d,cx:u-d,cy:h+d},d,!1),p.lineTo(u,a-d),jN(p,{x0:u,x1:u-d,y0:a-d,y1:a,cx:u-d,cy:a-d},d,!1),p.closePath()}containsPoint(t,e){return super.containsPoint(t,e)||this.shape.containsPoint(t,e)}},eot=(_(),w(P)),{StateMachine:sc,StateMachineProperty:MH,Debug:iot}=eot._ModuleSupport,kx=class extends sc{constructor(t){const e=({point:h})=>{const u=this.createDatum();u.set({x:h.x,y:h.y}),t.create(u)},i=()=>{this.node?.toggleActive(!0),t.showAnnotationOptions(),t.update()},s=()=>{t.showTextInput(),this.datum&&(this.datum.visible=!1)},a=()=>{t.hideTextInput(),this.datum&&(this.datum.visible=!0),t.deselect()},n=h=>{this.node?.setTextInputBBox(h),t.update()},o=({colorPickerType:h,colorOpacity:u,color:d,opacity:p,isMultiColor:g})=>{this.datum&&(h==="text-color"&&t.updateTextInputColor(d),IM(this.datum,h,u,d,p,g),t.update())},r=h=>{const{datum:u,node:d}=this;!u||!d||!Yr(u)||(u.fontSize=h,t.updateTextInputFontSize(h),t.update())},l=()=>{t.delete()},c=({textInputValue:h,bbox:u})=>{if(u!=null&&h!=null&&h.length>0){const{datum:d}=this;if(!Yr(d))return;const p=bM(d,h,u.width);d?.set({text:p}),t.update(),t.recordAction(`Create ${d?.type} annotation`)}else t.delete()};super("start",{start:{click:{target:"waiting-first-render",action:e},dragStart:{target:"waiting-first-render",action:e},cancel:sc.parent,reset:sc.parent},"waiting-first-render":{render:{target:"edit",action:i}},edit:{onEnter:s,updateTextInputBBox:n,color:o,fontSize:r,textInput:[{guard:zN,target:sc.parent,action:l},{guard:FN,target:sc.parent,action:c}],click:{target:sc.parent,action:c},dragStart:{target:sc.parent,action:c},resize:{target:sc.parent,action:c},onExit:a,cancel:{target:sc.parent,action:l}}}),this.debug=iot.create(!0,"annotations")}};y([MH()],kx.prototype,"datum",2),y([MH()],kx.prototype,"node",2);var sot=class extends kx{createDatum(){return new $r}},DH={type:"comment",datum:$r,scene:_M,isDatum:$r.is,translate:(t,e,i,s)=>{$r.is(e)&&_M.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if($r.is(e)&&$r.is(i)&&_M.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{$r.is(e)&&_M.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new sot({...t,create:e("comment")}),dragState:t=>new _i(t)},aot=(_(),w(P)),EM=(_(),w(P)),{calculateLabelTranslation:not}=EM._ModuleSupport,kH=class extends EM._ModuleSupport.Group{constructor(){super({name:"AnnotationAxisLabelGroup"}),this.label=new EM._ModuleSupport.Text({zIndex:1}),this.rect=new EM._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:s,fontSize:a,fontStyle:n,fontFamily:o,textAlign:r,color:l="white",formatter:c}=e,h=c?c({value:t}):i.formatScaleValue(t,"annotation-label");this.label.setProperties({fontWeight:s,fontSize:a,fontStyle:n,fontFamily:o,textAlign:r,fill:l,text:h})}updateRect({styles:t}){const{rect:e}=this,{cornerRadius:i,fill:s,fillOpacity:a,stroke:n,strokeOpacity:o}=t;e.setProperties({cornerRadius:i,fill:s,fillOpacity:a,stroke:n,strokeOpacity:o})}updatePosition({x:t,y:e,context:i,styles:{padding:s}}){const{label:a,rect:n}=this,o=a.getBBox()?.clone(),r=s??8,l=s??4,{xTranslation:c,yTranslation:h}=not({yDirection:!0,padding:i.labelPadding,position:i.position??"left",bbox:o});o.grow(r,"horizontal"),o.grow(l,"vertical");const u=t+c,d=e+h;a.x=u,a.y=d,n.y=d-Math.round(o.height/2),n.x=u-Math.round(o.width/2),n.height=o.height,n.width=o.width}};kH.className="AxisLabel";var RM=(_(),w(P)),{Vec2:Zr}=RM._ModuleSupport,ja=class extends RM._ModuleSupport.Line{constructor(){super(...arguments),this.growCollisionBox=9,this.clipMask=new Map}setProperties(t){return super.setProperties(t),this.updateCollisionBBox(),this}updateCollisionBBox(){const{growCollisionBox:t,strokeWidth:e,x1:i,y1:s,x2:a,y2:n}=this;let o=e+t;o%2===0&&(o+=1);const r=Zr.from(i,s-Math.floor(o/2)),l=Zr.from(a,n),c=Zr.distance(r,l);this.collisionBBox=new RM._ModuleSupport.BBox(r.x,r.y,c,o)}isPointInPath(t,e){const{collisionBBox:i,x1:s,y1:a,x2:n,y2:o}=this;if(!i)return!1;const r=Zr.from(s,a),l=Zr.from(n,o),c=Zr.sub(Zr.from(t,e),r),h=Zr.sub(l,r),u=Zr.rotate(c,Zr.angle(c,h),r);return i.containsPoint(u.x,u.y)??!1}render(t){const{clipMask:e}=this,{ctx:i}=t;if(e.size===0){super.render(t);return}i.save();try{for(const s of this.clipMask.values()){const{x:a,y:n,radius:o}=s;i.beginPath(),i.rect(0,0,i.canvas.width,i.canvas.height),i.ellipse(a,n,o,o,0,Math.PI*2,0,!0),i.clip()}super.render(t)}finally{i.restore()}}setClipMask(t,e){const i=this.clipMask.get(t);RM._ModuleSupport.jsonDiff(i,e)!=null&&this.markDirty("CollidableLine"),e?this.clipMask.set(t,e):this.clipMask.delete(t)}},oot=(_(),w(P)),zd=class extends oot._ModuleSupport.TransformableText{constructor(){super(...arguments),this.growCollisionBox={top:4,right:4,bottom:4,left:4}}isPointInPath(t,e){const i=this.fromParentPoint(t,e),s=this.computeBBoxWithoutTransforms();return s?s.grow(this.growCollisionBox).containsPoint(i.x,i.y):!1}},rot=(_(),w(P)),{Vec2:oa}=rot._ModuleSupport;function ef(t,e,i,s,a,n,o){if(!n||!a||!s){e.setClipMask(t);return}const{alignment:r,position:l}=s,c=AH(i,s.fontSize,o),{point:h,textBaseline:u}=CH(c,l,r);LH(a,n,s,h,c.angle,u);const{x:d,y:p,width:g,height:f}=a.getBBox(),x=oa.length(oa.from(g,f)),m={x:d+g/2,y:p+f/2,radius:x/2+oa.length(c.offset)};return l==="center"?e.setClipMask(t,m):e.setClipMask(t),{clipMask:m,numbers:c}}function IH(t,e,i,s,a,n,o){if(!o||!n)return;const{alignment:r,position:l}=s,[c,h]=e.y1<=i.y1?[e,i]:[i,e];let u=c;l==="bottom"?u=h:l==="inside"&&(u={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 d=AH(u,s.fontSize,a),{point:p,textBaseline:g}=CH(d,l==="inside"?"center":l,r,t);LH(n,o,s,p,d.angle,g)}function AH(t,e,i){let[s,a]=oa.from(t);s.x>a.x&&([s,a]=[a,s]);const n=oa.normalized(oa.sub(a,s)),o=oa.angle(n),r=oa.multiply(n,hi.HANDLE_SIZE/2+(e??14)/2),l=oa.multiply(n,(i??2)/2+(e??14)/3);return{left:s,right:a,normal:n,angle:o,inset:r,offset:l}}function CH({left:t,right:e,normal:i,angle:s,inset:a,offset:n},o,r,l){let c;r==="right"?c=oa.sub(e,a):r==="center"?c=oa.add(t,oa.multiply(i,oa.distance(t,e)/2)):c=oa.add(t,a);let h="bottom";return o==="bottom"?(c=oa.rotate(n,s+Math.PI/2,c),h="top"):o==="center"&&!l?h="middle":c=oa.rotate(n,s-Math.PI/2,c),{point:c,textBaseline:h}}function LH(t,e,i,s,a,n){t.setProperties({text:e,x:s.x,y:s.y,rotation:a,rotationCenterX:s.x,rotationCenterY:s.y,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textAlign:i.alignment,textBaseline:n})}var{ChartAxisDirection:lot,Vec2:Fd,Vec4:WN}=aot._ModuleSupport,Nh=class extends Cs{constructor(){super(),this.type="cross-line",this.line=new ja,this.middle=new tf,this.isHorizontal=!1,this.append([this.line,this.middle])}static is(t){return Cs.isCheck(t,"cross-line")}update(t,e){const{seriesRect:i}=e;this.seriesRect=i,this.isHorizontal=na.is(t);const s=this.isHorizontal?e.yAxis:e.xAxis,a=this.convertCrossLine(t,s);if(a==null){this.visible=!1;return}this.visible=t.visible??!0,this.visible&&(this.updateLine(t,a),this.updateHandle(t,a),this.updateText(t,a),this.updateAxisLabel(t,s,a))}updateLine(t,e){const{line:i}=this,{lineDashOffset:s,stroke:a,strokeWidth:n,strokeOpacity:o}=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:s,stroke:a,strokeWidth:n,strokeOpacity:o,fillOpacity:0})}updateHandle(t,e){const{middle:i}=this,{locked:s,stroke:a,strokeWidth:n,strokeOpacity:o}=t,r={fill:t.handle.fill,stroke:t.handle.stroke??a,strokeOpacity:t.handle.strokeOpacity??o,strokeWidth:t.handle.strokeWidth??n},l=Fd.sub(WN.center(e),Fd.from(i.handle.width/2,i.handle.height/2));i.gradient=this.isHorizontal?"horizontal":"vertical",i.update({...r,...l}),i.toggleLocked(s??!1)}updateText(t,e){this.text=this.updateNode(zd,this.text,!!t.text.label),ef(this.line.id,this.line,e,t.text,this.text,t.text.label,t.strokeWidth)}createAxisLabel(t){const e=new kH;return t.attachLabel(e),e}updateAxisLabel(t,e,i){this.axisLabel||(this.axisLabel=this.createAxisLabel(e));const{axisLabel:s,seriesRect:a}=this,{direction:n,position:o}=e;if(t.axisLabel.enabled){s.visible=this.visible;const r=o==="left"||o==="top"?WN.start(i):WN.end(i),l=n===lot.X?r.x:r.y;if(!e.inRange(l)){s.visible=!1;return}const c=Xi(t.value);s.update({...Fd.add(r,Fd.required(a)),value:c,styles:t.axisLabel,context:e})}else s.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 s=na.is(t)?{x:e.x,y:Yl(t.value,i.yAxis)}:{x:Yl(t.value,i.xAxis),y:e.y};this.dragState={offset:e,middle:s}}drag(t,e,i){const{activeHandle:s,dragState:a}=this;t.locked||!a||(s&&this[s].toggleDragging(!0),this.translatePoint(t,a.middle,Fd.sub(e,a.offset),i))}translate(t,e,i){if(t.locked)return;const s=na.is(t)?Fd.from(0,Yl(t.value,i.yAxis)):Fd.from(Yl(t.value,i.xAxis),0);this.translatePoint(t,s,e,i)}translatePoint(t,e,i,s){const a=na.is(t);a?i.x=0:i.y=0;const{point:n}=ic({point:e},i,s);t.value=a?n.y:n.x}stopDragging(){this.middle.toggleDragging(!1)}copy(t,e,i){const s=na.is(t),a=this.isHorizontal?i.yAxis:i.xAxis,n=this.convertCrossLine(t,a);if(!n)return;const o=s?-30:0,r=s?0:-30,l=Sa({x:n.x1+r,y:n.y1+o},i);return e.set({value:s?l.y:l.x}),e}getCursor(){return this.activeHandle==null?"pointer":this[this.activeHandle].getCursor()}containsPoint(t,e){const{middle:i,line:s,text:a}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="middle",!0):s.isPointInPath(t,e)||!!a?.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,s=0,a,n;const{bounds:o}=e,r=Yl(t.value,e);return na.is(t)?(a=o.width,s=r,n=r):(i=r,a=r,n=o.height),{x1:i,y1:s,x2:a,y2:n}}},cot=(_(),w(P)),{StateMachine:BM,StateMachineProperty:hot,Debug:uot}=cot._ModuleSupport,HN=class extends BM{constructor(t,e){const i=({point:a})=>{const n=t==="horizontal",o=n?new na:new Ur;o.set({value:n?a.y:a.x}),e.create(o),e.recordAction(`Create ${n?"horizontal-line":"vertical-line"} annotation`)},s=()=>{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:BM.parent,cancel:BM.parent},"waiting-first-render":{render:{target:BM.parent,action:s}}}),this.debug=uot.create(!0,"annotations")}};y([hot()],HN.prototype,"node",2);var wH={type:"horizontal-line",datum:na,scene:Nh,isDatum:na.is,translate:(t,e,i,s)=>{na.is(e)&&Nh.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(na.is(e)&&na.is(i)&&Nh.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{na.is(e)&&Nh.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new HN("horizontal",{...t,create:e("horizontal-line")}),dragState:t=>new _i(t)},TH={type:"vertical-line",datum:Ur,scene:Nh,isDatum:Ur.is,translate:(t,e,i,s)=>{Ur.is(e)&&Nh.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Ur.is(e)&&Ur.is(i)&&Nh.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Ur.is(e)&&Nh.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new HN("vertical",{...t,create:e("vertical-line")}),dragState:t=>new _i(t)},dot=(_(),w(P)),NH=(_(),w(P)),pot=(_(),w(P)),{Vec4:got}=pot._ModuleSupport,OH=class{static updateBackground(t,e,i,s){const{background:a}=this,{seriesRect:n}=s;a.path.clear(!0);const o=got.from(0,0,n.width,n.height),r=this.getBackgroundPoints(t,e,i,o);for(let c=0;c<r.length;c++){const h=r[c];c===0?a.path.moveTo(h.x,h.y):a.path.lineTo(h.x,h.y)}a.path.closePath(),a.checkPathDirty();const l=this.getBackgroundStyles?.(t)??t.background;a.setProperties({fill:l.fill,fillOpacity:l.fillOpacity})}},PH=class extends mH{constructor(){super(...arguments),this.handles={},this.overflowContinuous=2,this.topLine=new ja,this.bottomLine=new ja,this.background=new NH._ModuleSupport.Path({zIndex:-1}),this.anchor={x:0,y:0},this.updateBackground=OH.updateBackground.bind(this)}update(t,e){const{locked:i,visible:s}=t,a=va(t,e),n=va(t.bottom,e);if(a==null||n==null){this.visible=!1;return}else this.visible=s??!0;const o=this.extendLine(a,t,e),r=this.extendLine(n,t,e);this.updateLines(t,o,r,e,a,n),this.updateHandles(t,a,n),this.updateText(t,a,n),this.updateBackground(t,o,r,e),this.updateAnchor(a,n);for(const l of Object.values(this.handles))l.toggleLocked(i??!1)}toggleHandles(t){const{handles:e}=this;if(typeof t=="boolean"){for(const[i,s]of Object.entries(e))s.visible=t,s.toggleHovered(this.activeHandle===i);return}for(const[i,s]of Object.entries(t)){const a=e[i];a.visible=s??!0,a.toggleHovered(this.activeHandle===i)}}toggleActive(t){this.toggleHandles(t);for(const e of Object.values(this.handles))e.toggleActive(t)}stopDragging(){const{activeHandle:t,handles:e}=this;t!=null&&e[t].toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return this.activeHandle==null?"pointer":this.handles[this.activeHandle].getCursor()}containsPoint(t,e){const{handles:i,topLine:s,bottomLine:a,text:n}=this;this.activeHandle=void 0;for(const[o,r]of Object.entries(i))if(r.containsPoint(t,e))return this.activeHandle=o,!0;return s.containsPoint(t,e)||a.containsPoint(t,e)||!!n?.containsPoint(t,e)}getNodeAtCoords(t,e){if(this.text?.containsPoint(t,e))return"text";if(this.topLine.containsPoint(t,e)||this.bottomLine.containsPoint(t,e))return"line";for(const[i,s]of Object.entries(this.handles))if(s.containsPoint(t,e))return"handle"}updateAnchor(t,e){const{x:i,y:s}=NH._ModuleSupport.Transformable.toCanvasPoint(this.topLine,(t.x1+t.x2)/2,Math.min(t.y1,t.y2,e.y1,e.y2));this.anchor.x=i,this.anchor.y=s}},{Vec2:po,Vec4:Oh}=dot._ModuleSupport,zM=class extends PH{constructor(){super(),this.type="disjoint-channel",this.handles={topLeft:new hi,topRight:new hi,bottomLeft:new hi,bottomRight:new tf},this.append([this.background,this.topLine,this.bottomLine,...Object.values(this.handles)])}static is(t){return Cs.isCheck(t,"disjoint-channel")}dragHandle(t,e,i,s){const{activeHandle:a,handles:n}=this;if(a==null)return;const{offset:o}=n[a].drag(e);n[a].toggleDragging(!0),a==="bottomRight"&&(o.x=0);let r=[],l=[],c=s;switch(a){case"topLeft":r=["topLeft"],l=["bottomLeft"];break;case"bottomLeft":r=["bottomLeft"],l=["topLeft"];break;case"topRight":r=["topRight"],l=["bottomRight"];break;case"bottomRight":r=["bottomLeft","bottomRight"],c=!1;break}const h=va(t,i),u=va(t.bottom,i);if(!h||!u)return;const d={topLeft:Oh.start(h),topRight:Oh.end(h),bottomLeft:Oh.start(u),bottomRight:Oh.end(u)},p={vectors:{topLeft:d.topRight,bottomLeft:d.bottomRight,topRight:d.topLeft,bottomRight:d.bottomLeft},angle:t.snapToAngle},g=ic(d,o,i,{overflowContinuous:this.overflowContinuous,translateVectors:r,invertYVectors:l,snap:c?p:void 0});t.start.x=g.topLeft.x,t.start.y=g.topLeft.y,t.end.x=g.topRight.x,t.end.y=g.topRight.y,t.startHeight=g.topLeft.y-g.bottomLeft.y,t.endHeight=g.topRight.y-g.bottomRight.y}getTranslatePointsVectors(t,e){const{bottomLeft:i,bottomRight:s,topLeft:a,topRight:n}=this.handles,o=i.getBBox().y-a.getBBox().y,r=s.getBBox().y-n.getBBox().y,l=po.add(t,po.from(0,o)),c=po.add(e,po.from(0,r));return{start:t,end:e,bottomStart:l,bottomEnd:c}}updateLines(t,e,i){const{topLine:s,bottomLine:a}=this,{lineDashOffset:n,stroke:o,strokeOpacity:r,strokeWidth:l}=t,c={lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:n,stroke:o,strokeOpacity:r,strokeWidth:l};s.setProperties({...e,...c}),a.setProperties({...i,...c})}updateHandles(t,e,i){const{handles:{topLeft:s,topRight:a,bottomLeft:n,bottomRight:o}}=this,r={fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth};s.update({...r,...Oh.start(e)}),a.update({...r,...Oh.end(e)}),n.update({...r,...Oh.start(i)}),o.update({...r,...po.sub(Oh.end(i),po.from(o.handle.width/2,o.handle.height/2))})}updateText(t,e,i){this.text=this.updateNode(zd,this.text,!!t.text.label),IH(!1,e,i,t.text,t.strokeWidth,this.text,t.text.label)}getBackgroundPoints(t,e,i,s){const a=e.x1>e.x2,n=e.y1>e.y2,o=n?s.y2:s.y1,r=n?s.y1:s.y2,l=po.from(e);return t.extendEnd&&e.y2===r&&l.push(po.from(a?s.x1:s.x2,n?s.y1:s.y2)),t.extendEnd&&i.y2===o&&l.push(po.from(a?s.x1:s.x2,n?s.y2:s.y1)),l.push(...po.from(i).reverse()),t.extendStart&&i.y1===r&&l.push(po.from(a?s.x2:s.x1,n?s.y1:s.y2)),t.extendStart&&e.y1===o&&l.push(po.from(a?s.x2:s.x1,n?s.y2:s.y1)),l}},fot=(_(),w(P)),sf=(R(),w(st)),{StateMachine:Ph,StateMachineProperty:$N,Debug:mot}=fot._ModuleSupport,FM=class extends Ph{constructor(t){const e=({point:l})=>{const c=new lo;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})},s=({offset:l,context:c})=>{const{datum:h,snapping:u}=this;h&&(h.set({end:Dx(l,c,u,h.start,h.snapToAngle)}),t.update())},a=()=>{this.node?.toggleHandles({topRight:!0}),t.update()},n=({point:l})=>{const{datum:c,node:h}=this,u=Xi(c?.end.y),d=Xi(c?.start.y),{y:p}=l;if(c==null||!(0,sf.isNumber)(d)||!(0,sf.isNumber)(u)||!(0,sf.isNumber)(p))return;const g=u-(p??0),f=(d-u)*2+g,x={x:c?.start.x,y:d-f},m={x:c?.end.x,y:l.y};h?.toggleHandles({bottomLeft:!0,bottomRight:!0}),!(!t.validatePoint(x,{overflowContinuous:!0})||!t.validatePoint(m,{overflowContinuous:!0}))&&(c.set({startHeight:f,endHeight:g}),t.update())},o=({point:l})=>{const{datum:c,node:h}=this,u=Xi(c?.end.y),d=Xi(c?.start.y),{y:p}=l;if(c==null||!(0,sf.isNumber)(d)||!(0,sf.isNumber)(u)||!(0,sf.isNumber)(p))return;const g=u-(p??0),f=(d-u)*2+g,x={x:c.start.x,y:d-g},m={x:c.end.x,y:l.y};h?.toggleHandles(!0),!(!t.validatePoint(x,{overflowContinuous:!0})||!t.validatePoint(m,{overflowContinuous:!0}))&&(c.set({startHeight:f,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:Ph.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:s,drag:s,click:{target:"height",action:a},dragEnd:{target:"height",action:a},reset:{target:Ph.parent,action:r},cancel:{target:Ph.parent,action:r}},height:{hover:n,click:{target:Ph.parent,action:o},drag:{target:Ph.parent,action:o},reset:{target:Ph.parent,action:r},cancel:{target:Ph.parent,action:r}}}),this.debug=mot.create(!0,"annotations"),this.snapping=!1}};y([$N()],FM.prototype,"datum",2),y([$N()],FM.prototype,"node",2),y([$N()],FM.prototype,"snapping",2);var _H={type:"disjoint-channel",datum:lo,scene:zM,isDatum:lo.is,translate:(t,e,i,s)=>{lo.is(e)&&zM.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(lo.is(e)&&lo.is(i)&&zM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{lo.is(e)&&zM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new FM({...t,create:e("disjoint-channel")}),dragState:t=>new _i(t)},yot=(_(),w(P)),xot=(R(),w(st)),ac=(_(),w(P)),UN=[0,23.6,38.2,50,61.8,78.6,100],bot=[161.8,261.8,361.8,423.6],vot=[...UN,...bot],Sot={10:vot,6:UN,4:UN.filter(t=>t!==78.6&&t!==23.6)},Mot=10;function Dot(t,e){const{x2:i,y1:s,y2:a}=t,n=s-a;return e==null?{x1:i,x2:i,y1:a-n,y2:a}:{x1:e.x1,x2:e.x2,y1:e.y2-n,y2:e.y2}}function EH({x1:t,y1:e,x2:i,y2:s},a,n,o,r=10){const l=e-s,c=n?-1:1;let h=o;const u=[];return Sot[r].forEach((d,p)=>{const g=o+l*(d/100)*c,f=a.yAxis.scaleInvert(g);u.push({id:p,x1:t,x2:i,y1:h,y2:g,tag:d==100?0:1,label:{x1:Math.min(t,i)-Mot,x2:i,y1:g,y2:g,text:`${(d/100).toFixed(3)} (${f.toFixed(2)})`}}),h=g}),u}var{Vec2:kot,Vec4:RH}=ac._ModuleSupport,BH=class extends Cs{constructor(){super(),this.trendLine=new ja,this.rangeFillsGroup=new ac._ModuleSupport.Group({name:`${this.id}-range-fills`}),this.rangeFillsGroupSelection=ac._ModuleSupport.Selection.select(this.rangeFillsGroup,ac._ModuleSupport.Range),this.rangeStrokesGroup=new ac._ModuleSupport.Group({name:`${this.id}-range-strokes`}),this.rangeStrokesGroupSelection=ac._ModuleSupport.Selection.select(this.rangeStrokesGroup,ja),this.labelsGroup=new ac._ModuleSupport.Group({name:`${this.id}-ranges-labels`}),this.labelsGroupSelection=ac._ModuleSupport.Selection.select(this.labelsGroup,zd),this.anchor={x:0,y:0,position:"above"},this.append([this.trendLine,this.rangeFillsGroup,this.rangeStrokesGroup,this.labelsGroup])}update(t,e){let i=va(t,e);if(i==null){this.visible=!1;return}if(i=RH.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:s}=t,a=this.extendLine(i,t,e),n=s?a.y1:a.y2,o=s?a.y2:a.y1,r=EH(a,e,t.reverse,n,t.bands);this.updateRanges(t,r,e);const l={...a,y1:o,y2:o};this.updateText(t,l)}extendLine({x1:t,y1:e,x2:i,y2:s},a,n){const o={x1:t,y1:e,x2:i,y2:s};if(!a.extendStart&&!a.extendEnd)return o;const{x:r,width:l}=n.xAxis.bounds;return a.extendEnd&&(o[t>i?"x1":"x2"]=r+l),a.extendStart&&(o[t>i?"x2":"x1"]=r),o}updateLine(t,e,i){if(!e||!i)return;const{lineDashOffset:s,strokeWidth:a,strokeOpacity:n,stroke:o}=t;i.setProperties({...e,lineCap:t.getLineCap(),lineDash:[3,4],lineDashOffset:s,strokeWidth:a,strokeOpacity:n,fillOpacity:0,stroke:o})}updateRangeStrokes(t){const{lineDashOffset:e,strokeWidth:i,strokeOpacity:s,strokes:a,rangeStroke:n,isMultiColor:o}=t;this.rangeStrokesGroupSelection.each((r,{x1:l,x2:c,y2:h,tag:u},d)=>{const p=h,g=o?a[d%a.length]:n;r.setProperties({x1:l,x2:c,y1:p,y2:p,stroke:g,strokeOpacity:s,strokeWidth:i,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,tag:u})})}updateRanges(t,e,i){const s=a=>a.id;this.rangeFillsGroupSelection.update(e,void 0,s),this.rangeStrokesGroupSelection.update(e,void 0,s),this.labelsGroupSelection.update(e,void 0,s),this.updateRangeFills(t),this.updateRangeStrokes(t),this.updateRangeLabels(t,i)}updateRangeFills(t){const{lineDashOffset:e,strokeWidth:i,strokeOpacity:s,strokes:a,rangeStroke:n,showFill:o,isMultiColor:r}=t;this.rangeFillsGroupSelection.each((l,{x1:c,x2:h,y1:u,y2:d},p)=>{const g=r?a[p%a.length]:n;if(!o){l.visible=!1;return}l.setProperties({x1:c,x2:h,y1:u,y2:d,startLine:!1,endLine:!1,stroke:g,strokeOpacity:s,fill:g,fillOpacity:(s??1)*.15,strokeWidth:i,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,visible:!0})})}updateRangeLabels(t,{xAxis:e}){const{rangeStrokesGroupSelection:i}=this,{strokes:s,strokeWidth:a,rangeStroke:n,isMultiColor:o,label:{fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h,color:u}}=t,d={fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h},p=this.checkWithinBounds(e,d,this.labelsGroupSelection.at(0));this.labelsGroupSelection.each((g,f,x)=>{const m=u??(o?s[x%s.length]:n),b=i.at(x);if(!b)return;const{text:v,...M}=f.label;if(p)g.setProperties({...d,text:v,x:M.x1,y:M.y1,textBaseline:"middle",textAlign:"end",fill:m}),ef(g.id,b,M);else{const D={...d,label:v,position:"center",alignment:"left",color:m};ef(g.id,b,M,D,g,v,a)}})}checkWithinBounds(t,e,i){if(!i)return!1;const{text:s,...a}=i.datum.label;i.setProperties({...e,text:s,x:a.x1,y:a.y1,textBaseline:"middle",textAlign:"end"});const{x:n}=i.getBBox();return n>=t.bounds.x&&n<=t.bounds.x+t.bounds.width}updateText(t,e){const i=this.rangeStrokesGroupSelection.selectByTag(0)[0];if(!i)return;const{text:s,strokeWidth:a}=t;this.text=this.updateNode(zd,this.text,!!s.label),ef(i.id,i,e,s,this.text,s.label,a)}updateAnchor(t,e,i,s){const a=RH.topCenter(e);kot.apply(this.anchor,ac._ModuleSupport.Transformable.toCanvasPoint(this.trendLine,a.x,a.y))}containsPoint(t,e){const{trendLine:i,rangeStrokesGroupSelection:s,text:a}=this;let n=!1;return s.each(o=>n||(n=o.isPointInPath(t,e))),n||i.isPointInPath(t,e)||!!a?.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,s){t.locked||(this.activeHandle?this.dragHandle(t,e,i,s):this.dragAll(t,e,i))}getAnchor(){return this.anchor}getCursor(){return"pointer"}},Iot=(_(),w(P)),zH=(R(),w(st)),{ContinuousScale:FH}=Iot._ModuleSupport;function VM(t,e,i={overflowContinuous:!1},s){if(e.x==null||e.y==null)return s&&zH.Logger.warnOnce(`${s}requires both an [x] and [y] property, ignoring.`),!1;const{xAxis:a,yAxis:n}=t,o=i.overflowContinuous&&FH.is(a.scale),r=i.overflowContinuous&&FH.is(n.scale),l=o||VH(e.x,a),c=r||VH(e.y,n);if(l&&c)return!0;if(s){let h="x & y domains";l&&(h="y domain"),c&&(h="x domain");const u=Xi(e.x),d=Xi(e.y);zH.Logger.warnOnce(`${s}is outside the ${h}, ignoring. - x: [${u}], y: ${d}]`)}return!1}function VH(t,e){const{domain:i}=e.scale,s=Xi(t);return i&&s!=null&&e.continuous?s>=i[0]&&s<=i.at(-1):!0}var{Vec2:Aot,Vec4:Vd}=yot._ModuleSupport,GM=class extends BH{constructor(){super(),this.type="fibonacci-retracement-trend-based",this.endRetracementLine=new ja,this.start=new hi,this.end=new hi,this.endRetracement=new hi,this.append([this.endRetracementLine,this.start,this.end,this.endRetracement])}static is(t){return Cs.isCheck(t,"fibonacci-retracement-trend-based")}update(t,e){let{coords1:i,coords2:s}=this.getCoords(t,e);if(i==null||s==null){this.visible=!1;return}if(i=Vd.round(i),s=Vd.round(s),this.visible=t.visible??!0,!this.visible)return;(t.endRetracement.x==null||t.endRetracement.y==null)&&(s=void 0),this.updateLine(t,i,this.trendLine),this.updateLine(t,s,this.endRetracementLine),this.updateHandles(t,i,s),this.updateAnchor(t,s??i,e);const{reverse:a,bands:n}=t,o=Dot(i,s),r=this.extendLine(o,t,e),l=r.y2,c=r.y1,h=s?EH(r,e,a,l,n):[];this.updateRanges(t,h,e);const u={...r,y1:c,y2:c};this.updateText(t,u)}containsPoint(t,e){const{start:i,end:s,endRetracement:a,endRetracementLine:n}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):s.containsPoint(t,e)?(this.activeHandle="end",!0):a.containsPoint(t,e)?(this.activeHandle="endRetracement",!0):n.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,...wM({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:s}=this;s&&this.translatePoints({datum:t,start:s.start,end:s.end,endRetracement:s.endRetracement,translation:Aot.sub(e,s.offset),context:i})}dragHandle(t,e,i,s){const{activeHandle:a,dragState:n}=this;if(!a||!n)return;this[a].toggleDragging(!0);const o=s?this.snapToAngle(t,e,i):Sa(this[a].drag(e).point,i);!o||!VM(i,o)||(t[a].x=o.x,t[a].y=o.y)}snapToAngle(t,e,i){const{activeHandle:s}=this,a=["start","end","endRetracement"];if(!s)return;const n=(a.indexOf(s)+1)%a.length,o=a[n];this[s].toggleDragging(!0);const r=ci(t[o],i);return Sa(LM(e,r,t.snapToAngle),i)}translatePoints({datum:t,start:e,end:i,endRetracement:s,translation:a,context:n}){const o=ic({start:e,end:i,endRetracement:s},a,n,{overflowContinuous:2});t.start.x=o.start.x,t.end.x=o.end.x,t.endRetracement.x=o.endRetracement.x,t.start.y=o.start.y,t.end.y=o.end.y,t.endRetracement.y=o.endRetracement.y}translate(t,e,i){this.translatePoints({datum:t,start:ci(t.start,i),end:ci(t.end,i),endRetracement:ci(t.endRetracement,i),translation:e,context:i})}copy(t,e,i){const{coords1:s,coords2:a}=this.getCoords(t,i);if(!s||!a)return;const n=this.computeBBoxWithoutHandles();return this.translatePoints({datum:e,start:Vd.start(s),end:Vd.end(s),endRetracement:Vd.end(a),translation:{x:-n.width/2,y:-n.height/2},context:i}),e}getCoords(t,e){return{coords1:va(t,e),coords2:va({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(0,xot.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,s){this.start.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"start")}),this.end.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"end",s)}),i&&this.endRetracement.update({...this.getHandleStyles(t),...this.getHandleCoords(t,i,"endRetracement",s)}),this.start.toggleLocked(t.locked??!1),this.end.toggleLocked(t.locked??!1),this.endRetracement.toggleLocked(t.locked??!1)}getHandleCoords(t,e,i,s){return i==="start"?Vd.start(e):Vd.end(e)}},Cot=(_(),w(P)),{StateMachine:_h,StateMachineProperty:KN,Debug:Lot}=Cot._ModuleSupport,jM=class extends _h{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})},s=({offset:c,context:h})=>{const{datum:u,snapping:d}=this;u&&(u.set({end:Dx(c,h,d,u.start,u.snapToAngle)}),t.update())},a=()=>{const{datum:c}=this;c&&(c.endRetracement.x=c.end.x,c.endRetracement.y=c.end.y,this.node?.toggleHandles({end:!0}),t.update())},n=({offset:c,context:h})=>{const{datum:u,snapping:d}=this;u&&(u.set({endRetracement:Dx(c,h,d,u.end,u.snapToAngle)}),t.update())},o=()=>{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:_h.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:s,click:{target:"endRetracement",action:a},drag:s,dragEnd:{target:"endRetracement",action:a},reset:{target:_h.parent,action:r},cancel:{target:_h.parent,action:r},onExit:l},endRetracement:{hover:n,click:{target:_h.parent,action:o},drag:{target:_h.parent,action:o},reset:{target:_h.parent,action:r},cancel:{target:_h.parent,action:r}}}),this.debug=Lot.create(!0,"annotations"),this.snapping=!1}createDatum(){return new Kr}};y([KN()],jM.prototype,"datum",2),y([KN()],jM.prototype,"node",2),y([KN()],jM.prototype,"snapping",2);var GH={type:"fibonacci-retracement-trend-based",datum:Kr,scene:GM,isDatum:Kr.is,translate:(t,e,i,s)=>{Kr.is(e)&&GM.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Kr.is(e)&&Kr.is(i)&&GM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Kr.is(e)&&GM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new jM({...t,create:e("fibonacci-retracement-trend-based")}),dragState:t=>new _i(t)},wot=(_(),w(P)),Tot=(R(),w(st)),{Vec2:Not,Vec4:jH}=wot._ModuleSupport,WM=class extends BH{constructor(){super(),this.type="fibonacci-retracement",this.start=new hi,this.end=new hi,this.append([this.start,this.end])}static is(t){return Cs.isCheck(t,"fibonacci-retracement")}containsPoint(t,e){const{start:i,end:s}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):s.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,...wM({start:t.start,end:t.end},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}dragAll(t,e,i){const{dragState:s}=this;s&&this.translatePoints({datum:t,start:s.start,end:s.end,translation:Not.sub(e,s.offset),context:i})}dragHandle(t,e,i,s){const{activeHandle:a,dragState:n}=this;if(!a||!n)return;this[a].toggleDragging(!0);const o=s?this.snapToAngle(t,e,i):Sa(this[a].drag(e).point,i);!o||!VM(i,o)||(t[a].x=o.x,t[a].y=o.y)}snapToAngle(t,e,i){const{activeHandle:s}=this,n=["start","end"].find(r=>r!==s);if(!s||!n)return;this[s].toggleDragging(!0);const o=ci(t[n],i);return Sa(LM(e,o,t.snapToAngle),i)}translatePoints({datum:t,start:e,end:i,translation:s,context:a}){const n=ic({start:e,end:i},s,a,{overflowContinuous:1});t.start.x=n.start.x,t.end.x=n.end.x,t.start.y=n.start.y,t.end.y=n.end.y}translate(t,e,i){this.translatePoints({datum:t,start:ci(t.start,i),end:ci(t.end,i),translation:e,context:i})}copy(t,e,i){const s=va(t,i);if(!s)return;const a=this.computeBBoxWithoutHandles();return this.translatePoints({datum:e,start:{x:s.x1,y:s.y1},end:{x:s.x2,y:s.y2},translation:{x:-a.width/2,y:-a.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(0,Tot.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,s){this.start.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"start")}),this.end.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"end",s)}),this.start.toggleLocked(t.locked??!1),this.end.toggleLocked(t.locked??!1)}getHandleCoords(t,e,i,s){return i==="start"?jH.start(e):jH.end(e)}},Oot=(_(),w(P)),{StateMachine:af,StateMachineProperty:YN,Debug:Pot}=Oot._ModuleSupport,nf=class extends af{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})},s=({offset:r,context:l})=>{const{datum:c,snapping:h}=this;c&&(c.set({end:Dx(r,l,h,c.start,c.snapToAngle)}),t.update())},a=()=>{this.node?.toggleHandles({end:!0}),t.update()},n=()=>t.delete(),o=()=>{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:af.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:s,click:{target:af.parent,action:a},drag:s,dragEnd:{target:af.parent,action:a},reset:{target:af.parent,action:n},cancel:{target:af.parent,action:n},onExit:o}}),this.debug=Pot.create(!0,"annotations"),this.snapping=!1}};y([YN()],nf.prototype,"datum",2),y([YN()],nf.prototype,"node",2),y([YN()],nf.prototype,"snapping",2);var _ot=class extends nf{createDatum(){return new Xl}},Eot=class extends nf{createDatum(){return new ql}},Rot=class extends nf{createDatum(){return new Jl}},WH={type:"fibonacci-retracement",datum:Jl,scene:WM,isDatum:Jl.is,translate:(t,e,i,s)=>{Jl.is(e)&&WM.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Jl.is(e)&&Jl.is(i)&&WM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Jl.is(e)&&WM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Rot({...t,create:e("fibonacci-retracement")}),dragState:t=>new _i(t)},HH=(_(),w(P)),ZN=(_(),w(P)),{Vec2:Ix}=ZN._ModuleSupport,Bot=class extends ZN._ModuleSupport.Group{},HM=class extends Bot{constructor(){super(),this.type="arrow",this.path=new ZN._ModuleSupport.Path,this.armLength=6,this.append([this.path])}update(t){const{path:e}=this,{x:i,y:s,angle:a,...n}=t,o=Ix.from(i,s),r=3*Math.PI/4,l=this.armLength+(t.strokeWidth??0)*2,c=Ix.rotate(Ix.from(0,l),a+r,o),h=Ix.rotate(Ix.from(l,0),a-r,o);e.setProperties(n),e.fillOpacity=0,e.path.clear(),e.path.moveTo(c.x,c.y),e.path.lineTo(o.x,o.y),e.path.lineTo(h.x,h.y)}},{Vec2:ar,Vec4:$H}=HH._ModuleSupport,Eh=class extends BN{constructor(){super(),this.type="line",this.line=new ja,this.append([this.line,this.start,this.end])}static is(t){return Cs.isCheck(t,"line")}update(t,e){let i=va(t,e);if(i==null){this.visible=!1;return}i=$H.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:s}=this,{lineDashOffset:a,stroke:n,strokeWidth:o,strokeOpacity:r}=t,l=this.extendLine(e,t,i);s.setProperties({...l,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:a,stroke:n,strokeWidth:o,strokeOpacity:r,fillOpacity:0})}updateText(t,e){this.text=this.updateNode(zd,this.text,!!t.text.label),ef(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:s,strokeOpacity:a}=t,[n,o]=ar.from(e),r=ar.angle(ar.sub(o,n));t.startCap&&(this.startCap&&this.startCap.type!==t.startCap&&(this.removeChild(this.startCap),this.startCap=void 0),this.startCap==null&&(this.startCap=new HM,this.append([this.startCap])),this.startCap.update({x:n.x,y:n.y,angle:r-Math.PI,stroke:i,strokeWidth:s,strokeOpacity:a})),t.endCap&&(this.endCap&&this.endCap.type!==t.endCap&&(this.removeChild(this.endCap),this.endCap=void 0),this.endCap==null&&(this.endCap=new HM,this.append([this.endCap])),this.endCap.update({x:o.x,y:o.y,angle:r,stroke:i,strokeWidth:s,strokeOpacity:a}))}updateAnchor(t,e,i,s){const a=$H.topCenter(e);ar.apply(this.anchor,HH._ModuleSupport.Transformable.toCanvasPoint(this.line,a.x,a.y))}containsPoint(t,e){const{line:i,text:s}=this;return super.containsPoint(t,e)||i.isPointInPath(t,e)||!!s?.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,s){const{startCap:a,endCap:n}=this;let[o,r]=ar.from(e);const l=ar.angle(ar.sub(r,o));return a&&(o=ar.rotate(ar.from(0,-hi.HANDLE_SIZE/2),l,o)),n&&(r=ar.rotate(ar.from(0,hi.HANDLE_SIZE/2),l,r)),i==="start"?o: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}}},UH={type:"line",datum:ql,scene:Eh,isDatum:ql.is,translate:(t,e,i,s)=>{ql.is(e)&&Eh.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(ql.is(e)&&ql.is(i)&&Eh.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{ql.is(e)&&Eh.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Eot({...t,create:e("line")}),dragState:t=>new _i(t)},KH={type:"arrow",datum:Xl,scene:Eh,isDatum:Xl.is,translate:(t,e,i,s)=>{Xl.is(e)&&Eh.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Xl.is(e)&&Xl.is(i)&&Eh.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Xl.is(e)&&Eh.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new _ot({...t,create:e("arrow")}),dragState:t=>new _i(t)},XN=(_(),w(P)),of=(R(),w(st)),Mn=(_(),w(P)),YH=(_(),w(P));function ZH(t,e=0,i=0){let s=e;for(const a of t)if(Array.isArray(a)){for(const n of a)XH(n,s);s+=YH._ModuleSupport.Group.computeChildrenBBox(a).width+i}else XH(a,s),s+=a.getBBox().width+i}function zot(t,e=0,i=0){let s=e;for(const a of t)if(Array.isArray(a)){for(const n of a)qH(n,s);s+=YH._ModuleSupport.Group.computeChildrenBBox(a).height+i}else qH(a,s),s+=a.getBBox().height+i}function XH(t,e){"x1"in t?(t.x2=e+(t.x2-t.x1),t.x1=e):t.x=e}function qH(t,e){"y1"in t?(t.y2=e+(t.y2-t.y1),t.y1=e):t.y=e}function QH(t,e){"x1"in t?(t.x1+=e,t.x2+=e):t.x+=e}function JH(t,e){"y1"in t?(t.y1+=e,t.y2+=e):t.y+=e}var{Vec4:qN}=Mn._ModuleSupport,t3=class extends Mn._ModuleSupport.Group{constructor(){super(),this.name="MeasurerStatisticsScene",this.background=new Mn._ModuleSupport.Rect,this.dateRangeBarsText=new Mn._ModuleSupport.Text,this.dateRangeDivider=new Mn._ModuleSupport.Line,this.dateRangeValueText=new Mn._ModuleSupport.Text,this.priceRangeValueText=new Mn._ModuleSupport.Text,this.priceRangeDivider=new Mn._ModuleSupport.Line,this.priceRangePercentageText=new Mn._ModuleSupport.Text,this.volumeText=new Mn._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,s,a,n,o){this.verticalDirection=n;const r=this.updateStatistics(t,e,i,o),l=Mn._ModuleSupport.Group.computeChildrenBBox(r.flat()),c=10;l.grow(c),this.updateBackground(t,l,c),this.reposition(r,c,a),this.checkVisibility(t,a,s)}checkVisibility(t,e,i){const s=qN.from(new Mn._ModuleSupport.BBox(0,0,e.seriesRect.width,e.seriesRect.height));qN.collides(i,s)?this.visible=t.visible??!0:this.visible=!1}updateStatistics(t,e,i,s){const{dateRangeBarsText:a,dateRangeDivider:n,dateRangeValueText:o,priceRangeValueText:r,priceRangeDivider:l,priceRangePercentageText:c,volumeText:h}=this,u=8,d=6,p=t.statistics.fontSize+3,g=-2,f=this.getTextStyles(t),x={...this.getDividerStyles(t),x1:0,y1:0,x2:0,y2:p},m=[a,n,o],b=[r,l,c],v=[];return e.priceRange&&(r.setProperties({...f,text:this.formatPriceRangeValue(e.priceRange.value,s)}),l.setProperties(x),c.setProperties({...f,text:this.formatPriceRangePercentage(e.priceRange.percentage,s)}),ZH(b,i.x,u),v.push(b)),e.dateRange&&(a.setProperties({...f,text:this.formatDateRangeBars(e.dateRange.bars,s)}),n.setProperties(x),o.setProperties({...f,text:this.formatDateRangeValue(e.dateRange.value)}),ZH(m,i.x,u),v.push(m)),e.volume!=null?(h.setProperties({...f,x:i.x,text:this.formatVolume(e.volume,s),visible:!0}),v.push(h)):h.visible=!1,zot(v,i.y,d),l.y1+=g,l.y2+=g,n.y1+=g,n.y2+=g,v}updateBackground(t,e,i){const s=this.getBackgroundStyles(t);this.background.setProperties({...s,...e,x:e.x-e.width/2+i,y:e.y})}reposition(t,e,i){const{width:s,height:a}=i.seriesRect,n=qN.from(this.background.getBBox());let o=0;n.x1<0&&(o=-n.x1),n.x2>s&&(o=s-n.x2);const r=Math.min(e,a-n.y2);for(const l of t)if(Array.isArray(l)){const c=Mn._ModuleSupport.Group.computeChildrenBBox(l).width;for(const h of l)QH(h,o-c/2),JH(h,r)}else QH(l,o-l.getBBox().width/2),JH(l,r);this.background.x+=o,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 s=1e3*60,a=s*60,n=a*24,o=Math.floor(t/s),r=Math.floor(t/a),l=Math.floor(t/n),c=r%(n/a),h=o%(a/s);return l>=1&&e.push(`${l}d`),r>=1&&(t<n||c!==0)&&e.push(`${c}h`),(t<a||h!==0)&&e.push(`${h}m`),e[0]=`${i}${e[0]}`,e.join(" ")}formatPriceRangeValue(t,e){return e?.t("measurerPriceRangeValue",{value:Number(t.toFixed(2))})??`${t}`}formatPriceRangePercentage(t,e){return e?.t("measurerPriceRangePercent",{value:t})??`${t}`}formatVolume(t,e){const i=isNaN(t)?"":this.volumeFormatter.format(t);return e?.t("measurerVolume",{value:i})??i}},Fot=class extends t3{getDirectionStyles(t){return this.verticalDirection==="down"?t.down.statistics:t.up.statistics}getTextStyles(t){const e=this.getDirectionStyles(t);return{...super.getTextStyles(t),fill:e.color,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight}}getDividerStyles(t){const e=this.getDirectionStyles(t);return{stroke:e.divider.stroke,strokeOpacity:e.divider.strokeOpacity,strokeWidth:e.divider.strokeWidth}}getBackgroundStyles(t){const e=this.getDirectionStyles(t);return{...super.getBackgroundStyles(t),fill:e.fill,stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeWidth:e.strokeWidth}}},{Vec2:Xr,Vec4:Gd}=XN._ModuleSupport,Dn=class extends BN{constructor(){super(),this.type="measurer",this.horizontalLine=new ja,this.verticalLine=new ja,this.horizontalStartLine=new ja,this.horizontalEndLine=new ja,this.verticalStartLine=new ja,this.verticalEndLine=new ja,this.horizontalEndCap=new HM,this.verticalEndCap=new HM,this.background=new XN._ModuleSupport.Path({zIndex:-1}),this.updateBackground=OH.updateBackground.bind(this),this.statistics=this.createStatisticsScene(),this.statistics.zIndex=1,this.append([this.background,this.verticalStartLine,this.verticalEndLine,this.horizontalStartLine,this.horizontalEndLine,this.horizontalLine,this.verticalLine,this.horizontalEndCap,this.verticalEndCap,this.start,this.end,this.statistics])}static is(t){return Cs.isCheck(t,"measurer")}createStatisticsScene(){return new t3}update(t,e){const i=va(t,e);if(i==null){this.visible=!1;return}if(this.visible=t.visible??!0,!this.visible)return;const s=this.extendPerpendicular(i,t,e),a={...s,y2:s.y1},n={...s,y1:s.y2};this.verticalDirection=i.y1<i.y2?"down":"up",this.updateVisibilities(t),this.updateLines(t,i),this.updateHandles(t,i),this.updateText(t,i),this.updateCaps(t,i),this.updateBoundingLines(t,s),this.updateBackground(t,a,n,e),this.updateStatistics(t,i,e),this.updateAnchor(t,i,e)}extendPerpendicular(t,e,i){const s={x1:Math.min(t.x1,t.x2),x2:Math.max(t.x1,t.x2),y1:Math.min(t.y1,t.y2),y2:Math.max(t.y1,t.y2)},[a,n]=Xr.from(i.yAxis.bounds);return oo.is(e)?(e.extendAbove&&(s.y1=a.y),e.extendBelow&&(s.y2=n.y)):ro.is(e)&&(e.extendLeft&&(s.x1=a.x),e.extendRight&&(s.x2=n.x)),s}updateVisibilities(t){const{horizontalStartLine:e,horizontalEndLine:i,horizontalEndCap:s,verticalStartLine:a,verticalEndLine:n,verticalEndCap:o}=this,{direction:r}=t;a.visible=r!=="vertical",n.visible=r!=="vertical",s.visible=r!=="vertical",e.visible=r!=="horizontal",i.visible=r!=="horizontal",o.visible=r!=="horizontal"}updateLines(t,e){const{horizontalLine:i,verticalLine:s}=this,{direction:a}=t,{x1:n,y1:o,x2:r,y2:l}=e,c=Xr.round(Gd.center(e),0),h=this.getLineStyles(t);a!=="vertical"&&i.setProperties({...h,x1:n,x2:r,y1:c.y,y2:c.y}),a!=="horizontal"&&s.setProperties({...h,x1:c.x,x2:c.x,y1:o,y2:l})}updateText(t,e){const{direction:i}=t,s=Xr.round(Gd.center(e),0);let a;const n={...e};i==="vertical"?(a=this.verticalLine,n.x1=s.x,n.x2=s.x):(a=this.horizontalLine,n.y1=s.y,n.y2=s.y),this.text=this.updateNode(zd,this.text,!!t.text.label);const{id:o}=a,r=ef(o,a,n,t.text,this.text,t.text.label,t.strokeWidth);let l;if(i==="both"&&r&&this.text){const c=Gd.from(this.text.getBBox()),{offset:h}=r.numbers;c.x1<=s.x+h.x&&c.x2>=s.x-h.x&&(l={x:s.x,y:r.clipMask.y,radius:this.text.getBBox().height/2+Xr.length(h)})}this.verticalLine.setClipMask(o,l)}updateCaps(t,e){const{horizontalEndCap:i,verticalEndCap:s}=this,{direction:a}=t,{x1:n,y1:o,x2:r,y2:l}=e,c=Xr.round(Gd.center(e),0),{stroke:h,strokeWidth:u,strokeOpacity:d}=this.getLineStyles(t),p={stroke:h,strokeWidth:u,strokeOpacity:d};if(a!=="vertical"){const g=n<=r?0:Math.PI;let f=r;a==="horizontal"&&(f+=n<=r?-2:2),i.update({...p,x:f,y:c.y,angle:g})}if(a!=="horizontal"){const g=o<=l?Math.PI/2:Math.PI/-2;let f=l;a==="vertical"&&(f+=o<=l?-2:2),s.update({...p,x:c.x,y:f,angle:g})}}updateBoundingLines(t,e){const{verticalStartLine:i,verticalEndLine:s,horizontalStartLine:a,horizontalEndLine:n}=this,{direction:o}=t,{x1:r,y1:l,x2:c,y2:h}=e,u=this.getLineStyles(t);o==="horizontal"&&(i.setProperties({...u,x1:r,y1:l,x2:r,y2:h}),s.setProperties({...u,x1:c,y1:l,x2:c,y2:h})),o==="vertical"&&(a.setProperties({...u,x1:r,y1:l,x2:c,y2:l}),n.setProperties({...u,x1:r,y1:h,x2:c,y2:h}))}updateStatistics(t,e,i){const s=Xr.add(Gd.bottomCenter(e),Xr.from(0,10)),a={volume:this.getVolume(t)};t.hasPriceRange&&(a.priceRange={percentage:this.getPriceRangePercentage(t),value:this.getPriceRangeValue(t)}),t.hasDateRange&&(a.dateRange={bars:this.getDateRangeBars(e,i),value:this.getDateRangeValue(t)}),this.statistics.update(t,a,s,e,i,this.verticalDirection,t.localeManager)}updateAnchor(t,e,i,s){const a=Gd.topCenter(e);Xr.apply(this.anchor,XN._ModuleSupport.Transformable.toCanvasPoint(this.horizontalLine,a.x,a.y))}getBackgroundPoints(t,e,i,s){const[a,n]=Xr.from(e),[o,r]=Xr.from(i);return[a,n,r,o]}getLineStyles(t){const{lineDashOffset:e,stroke:i,strokeWidth:s,strokeOpacity:a}=t;return{lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,stroke:i,strokeWidth:s,strokeOpacity:a,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:s,verticalLine:a,horizontalStartLine:n,horizontalEndLine:o,verticalStartLine:r,verticalEndLine:l}=this;return super.containsPoint(t,e)||i.isPointInPath(t,e)||a.isPointInPath(t,e)||n.visible&&n.isPointInPath(t,e)||o.visible&&o.isPointInPath(t,e)||r.visible&&r.isPointInPath(t,e)||l.visible&&l.isPointInPath(t,e)||!!s?.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,s=t.x1<=t.x2?1:-1;return i?Math.round(Gd.width(t)/i)*s:0}getDateRangeValue(t){const e=Xi(t.start.x),i=Xi(t.end.x);if(!(0,of.isDate)(e)||!(0,of.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 e=Xi(t.end.y),i=Xi(t.start.y);if(!(0,of.isNumber)(e)||!(0,of.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 e=Xi(t.end.y),i=Xi(t.start.y);if(!(0,of.isNumber)(e)||!(0,of.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)}},$M=class extends Dn{constructor(){super(...arguments),this.type="quick-measurer"}static is(t){return Cs.isCheck(t,"quick-measurer")}createStatisticsScene(){return new Fot}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}}},Vot=(_(),w(P)),{StateMachine:rf,StateMachineProperty:e3,Debug:Got}=Vot._ModuleSupport,lf=class extends rf{constructor(t){const e=({point:o})=>{const r=this.createDatum();r.set({start:o,end:o}),t.create(r)},i=({point:o})=>{const{datum:r,node:l}=this;r?.set({end:o}),l?.toggleActive(!0),l?.toggleHandles({end:!1}),t.update()},s=()=>{this.node?.toggleHandles({end:!0})},a=()=>t.delete(),n=()=>{t.showAnnotationOptions(),!kh(this.datum)&&t.recordAction(`Create ${this.node?.type} annotation`)};super("start",{start:{reset:rf.parent,click:{target:"end",action:e},drag:{target:"end",action:e}},end:{hover:i,drag:i,click:{target:rf.parent,action:s},dragEnd:{target:rf.parent,action:s},reset:{target:rf.parent,action:a},cancel:{target:rf.parent,action:a},onExit:n}}),this.debug=Got.create(!0,"annotations")}};y([e3()],lf.prototype,"datum",2),y([e3()],lf.prototype,"node",2);var jot=class extends lf{createDatum(){return new oo}},Wot=class extends lf{createDatum(){return new ro}},Hot=class extends lf{createDatum(){return new Zl}},$ot=class extends lf{createDatum(){return new Sn}},i3={type:"date-range",datum:oo,scene:Dn,isDatum:oo.is,translate:(t,e,i,s)=>{oo.is(e)&&Dn.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(oo.is(e)&&oo.is(i)&&Dn.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{oo.is(e)&&Dn.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new jot({...t,create:e("date-range")}),dragState:t=>new _i(t)},s3={type:"price-range",datum:ro,scene:Dn,isDatum:ro.is,translate:(t,e,i,s)=>{ro.is(e)&&Dn.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(ro.is(e)&&ro.is(i)&&Dn.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{ro.is(e)&&Dn.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Wot({...t,create:e("date-range")}),dragState:t=>new _i(t)},a3={type:"date-price-range",datum:Zl,scene:Dn,isDatum:Zl.is,translate:(t,e,i,s)=>{Zl.is(e)&&Dn.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Zl.is(e)&&Zl.is(i)&&Dn.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Zl.is(e)&&Dn.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Hot({...t,create:e("date-range")}),dragState:t=>new _i(t)},n3={type:"quick-date-price-range",datum:Sn,scene:$M,isDatum:Sn.is,translate:(t,e,i,s)=>{Sn.is(e)&&$M.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Sn.is(e)&&Sn.is(i)&&$M.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Sn.is(e)&&$M.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new $ot({...t,create:e("quick-date-price-range")}),dragState:t=>new _i(t)},Ax=(_(),w(P)),Uot=(R(),w(st)),{ZIndexMap:o3,TextWrapper:Kot}=Ax._ModuleSupport,UM=class extends GN{constructor(){super(),this.type="note",this.shape=new Ax._ModuleSupport.Rect,this.iconBackground=new Ax._ModuleSupport.TranslatableSvgPath("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 Ax._ModuleSupport.TranslatableSvgPath("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 Ax._ModuleSupport.DropShadow,this.append([this.shape,this.label,this.iconBackground,this.iconLines,this.handle])}static is(t){return Cs.isCheck(t,"note")}update(t,e){this.updateIcon(t,e),super.update(t,e)}getTextBBox(t,e,i){const s=super.getTextBBox(t,e,i);s.x-=t.width/2,s.x=(0,Uot.clamp)(0,s.x,i.seriesRect.width-t.width);const a=t.getPadding().top,n=s.y-BW-a*2,o=s.y+hi.HANDLE_SIZE+a*2;return n-s.height-zW<0?(s.y=o,t.position="top"):(s.y=n+a,t.position="bottom"),s}updateLabel(t,e){const i=t.visible===!1?!1:this.label.visible;super.updateLabel(t,e),this.label.visible=i,this.label.text=Kot.wrapText(t.text,{font:{fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight},avoidOrphans:!1,textAlign:t.textAlign,textBaseline:"top",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 s=t.getPadding().top,a=t.position==="top";i.x=e.x-s,i.width=t.width+s*2,i.height=e.height+s*2,i.y=e.y+(a?0:-e.height)-s}updateIcon(t,e){const{active:i,iconBackground:s,iconLines:a}=this,{x:n,y:o}=ci(t,e);s.translationX=n-Oat/2,s.translationY=o-RW,a.translationX=s.translationX,a.translationY=s.translationY,s.fill=t.fill,s.fillOpacity=t.fillOpacity??1,s.stroke=t.stroke,s.strokeOpacity=t.strokeOpacity??1,s.strokeWidth=t.strokeWidth??1,a.fill=t.stroke,i?s.fillShadow.color=t.fill??"rgba(0, 0, 0, 0.22)":s.fillShadow.color="rgba(0, 0, 0, 0.22)"}updateAnchor(t,e,i){const s=t.getPadding().top,a=t.position==="top",n=a?1:-1;return{x:e.x+i.seriesRect.x+t.width/2,y:e.y+i.seriesRect.y+n*(e.height+s),position:a?"below":"above"}}getLabelCoords(t,e){const i=t.position==="top",s=t.getPadding().top+t.fontSize*vx/2;return{x:e.x,y:e.y+(i?s/2:0)}}getTextBaseline(t){return t.position==="top"?"middle":t.position}getHandleCoords(t,e,i){return{x:e.x,y:e.y+hi.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?o3.CHART_ANNOTATION_FOCUSED:o3.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)}},Yot=class extends kx{createDatum(){return new Ga}},r3={type:"note",datum:Ga,scene:UM,isDatum:Ga.is,translate:(t,e,i,s)=>{Ga.is(e)&&UM.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Ga.is(e)&&Ga.is(i)&&UM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Ga.is(e)&&UM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Yot({...t,create:e("note")}),dragState:t=>new _i(t)},Zot=(_(),w(P)),{Vec2:go,Vec4:qr}=Zot._ModuleSupport,KM=class extends PH{constructor(){super(),this.type="parallel-channel",this.handles={topLeft:new hi,topMiddle:new tf,topRight:new hi,bottomLeft:new hi,bottomMiddle:new tf,bottomRight:new hi},this.middleLine=new ja,this.append([this.background,this.topLine,this.middleLine,this.bottomLine,...Object.values(this.handles)])}static is(t){return Cs.isCheck(t,"parallel-channel")}dragHandle(t,e,i,s){const{activeHandle:a,handles:n}=this;if(a==null)return;const{offset:o}=n[a].drag(e);n[a].toggleDragging(!0),(a==="topMiddle"||a==="bottomMiddle")&&(o.x=0);let r=[],l=s;switch(a){case"topLeft":case"bottomLeft":r=["topLeft","bottomLeft"];break;case"topMiddle":r=["topLeft","topRight"],o.y-=tf.HANDLE_SIZE/2,l=!1;break;case"topRight":case"bottomRight":r=["topRight","bottomRight"];break;case"bottomMiddle":r=["bottomLeft","bottomRight"],o.y-=tf.HANDLE_SIZE/2,l=!1;break}const c=va(t,i),h=va(t.bottom,i);if(!c||!h)return;const u={topLeft:qr.start(c),topRight:qr.end(c),bottomLeft:qr.start(h),bottomRight:qr.end(h)},d={vectors:{topLeft:u.topRight,bottomLeft:u.bottomRight,topRight:u.topLeft,bottomRight:u.bottomLeft},angle:t.snapToAngle},p=ic(u,o,i,{overflowContinuous:this.overflowContinuous,translateVectors:r,snap:l?d:void 0});t.start.x=p.topLeft.x,t.start.y=p.topLeft.y,t.end.x=p.topRight.x,t.end.y=p.topRight.y,t.height=p.topLeft.y-p.bottomLeft.y}getTranslatePointsVectors(t,e){const{bottomLeft:i,topLeft:s}=this.handles,a=i.getBBox().y-s.getBBox().y,n=go.add(t,go.from(0,a)),o=go.add(e,go.from(0,a));return{start:t,end:e,bottomStart:n,bottomEnd:o}}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,s,a,n){const{topLine:o,middleLine:r,bottomLine:l}=this,{lineDashOffset:c,stroke:h,strokeOpacity:u,strokeWidth:d}=t,p=t.getLineDash(),g={lineCap:t.getLineCap(),lineDash:p,lineDashOffset:c,stroke:h,strokeOpacity:u,strokeWidth:d};o.setProperties({...e,...g}),l.setProperties({...i,...g});const f=this.extendLine({x1:a.x1,y1:n.y1+(a.y1-n.y1)/2,x2:a.x2,y2:n.y2+(a.y2-n.y2)/2},t,s);r.setProperties({...f,lineDash:t.middle.lineDash??p,lineDashOffset:t.middle.lineDashOffset??c,stroke:t.middle.stroke??h,strokeOpacity:t.middle.strokeOpacity??u,strokeWidth:t.middle.strokeWidth??d,visible:t.middle.visible??!0})}updateHandles(t,e,i){const{handles:{topLeft:s,topMiddle:a,topRight:n,bottomLeft:o,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};s.update({...c,...qr.start(e)}),n.update({...c,...qr.end(e)}),o.update({...c,...qr.start(i)}),l.update({...c,...qr.end(i)}),a.update({...c,...go.sub(qr.center(e),go.from(a.handle.width/2,a.handle.height/2))}),r.update({...c,...go.sub(qr.center(i),go.from(r.handle.width/2,r.handle.height/2))})}updateText(t,e,i){this.text=this.updateNode(zd,this.text,!!t.text.label),IH(!0,e,i,t.text,t.strokeWidth,this.text,t.text.label)}getBackgroundPoints(t,e,i,s){const a=e.x1>e.x2,n=e.y1>e.y2,o=e.x1!==i.x1&&e.y1!==i.y1,r=e.x2!==i.x2&&e.y2!==i.y2,l=go.from(e);return t.extendEnd&&r&&l.push(go.from(a?s.x1:s.x2,n?s.y1:s.y2)),l.push(...go.from(i).reverse()),t.extendStart&&o&&l.push(go.from(a?s.x2:s.x1,n?s.y2:s.y1)),l}},Xot=(_(),w(P)),cf=(R(),w(st)),{StateMachine:Rh,StateMachineProperty:QN,Debug:qot}=Xot._ModuleSupport,YM=class extends Rh{constructor(t){const e=({point:l})=>{const c=new co;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})},s=({offset:l,context:c})=>{const{datum:h,snapping:u}=this;h&&(h.set({end:Dx(l,c,u,h.start,h.snapToAngle)}),t.update())},a=()=>{this.node?.toggleHandles({topRight:!0}),t.update()},n=({point:l})=>{const{datum:c,node:h}=this,u=Xi(c?.end.y),d=Xi(c?.start.y),{y:p}=l;if(c==null||!(0,cf.isNumber)(d)||!(0,cf.isNumber)(u)||!(0,cf.isNumber)(p))return;const g=u-(p??0),f=d-g;h?.toggleHandles({bottomLeft:!0,bottomRight:!0}),!(!t.validatePoint({x:c.start.x,y:f},{overflowContinuous:!0})||!t.validatePoint({x:c.end.x,y:l.y},{overflowContinuous:!0}))&&(c.set({height:g}),t.update())},o=({point:l})=>{const{datum:c,node:h}=this,u=Xi(c?.end.y),d=Xi(c?.start.y),{y:p}=l;if(c==null||!(0,cf.isNumber)(d)||!(0,cf.isNumber)(u)||!(0,cf.isNumber)(p))return;const g=u-(p??0),f=d-g;h?.toggleHandles(!0),!(!t.validatePoint({x:c.start.x,y:f},{overflowContinuous:!0})||!t.validatePoint({x:c.end.x,y:l.y},{overflowContinuous:!0}))&&(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:Rh.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:s,drag:s,click:{target:"height",action:a},dragEnd:{target:"height",action:a},reset:{target:Rh.parent,action:r},cancel:{target:Rh.parent,action:r}},height:{hover:n,click:{target:Rh.parent,action:o},drag:{target:Rh.parent,action:o},reset:{target:Rh.parent,action:r},cancel:{target:Rh.parent,action:r}}}),this.debug=qot.create(!0,"annotations"),this.snapping=!1}};y([QN()],YM.prototype,"datum",2),y([QN()],YM.prototype,"node",2),y([QN()],YM.prototype,"snapping",2);var l3={type:"parallel-channel",datum:co,scene:KM,isDatum:co.is,translate:(t,e,i,s)=>{co.is(e)&&KM.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(co.is(e)&&co.is(i)&&KM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{co.is(e)&&KM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new YM({...t,create:e("parallel-channel")}),dragState:t=>new _i(t)},ZM=class extends GN{constructor(){super(),this.type="text",this.append([this.label,this.handle])}static is(t){return Cs.isCheck(t,"text")}getHandleCoords(t,e){const i=hi.HANDLE_SIZE/2;return{x:e.x+i,y:e.y+2+i}}},Qot=class extends kx{createDatum(){return new tc}},c3={type:"text",datum:tc,scene:ZM,isDatum:tc.is,translate:(t,e,i,s)=>{tc.is(e)&&ZM.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(tc.is(e)&&tc.is(i)&&ZM.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{tc.is(e)&&ZM.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Qot({...t,create:e("text")}),dragState:t=>new _i(t)},kn={[UH.type]:UH,[wH.type]:wH,[TH.type]:TH,[l3.type]:l3,[_H.type]:_H,[WH.type]:WH,[GH.type]:GH,[vH.type]:vH,[DH.type]:DH,[r3.type]:r3,[c3.type]:c3,[KH.type]:KH,[pH.type]:pH,[dH.type]:dH,[i3.type]:i3,[s3.type]:s3,[a3.type]:a3,[n3.type]:n3};function jd(t){for(const{isDatum:e}of Object.values(kn))if(e(t))return t}var Jot=(_(),w(P)),{ActionOnSet:trt,ParallelStateMachine:ert,StateMachine:JN,StateMachineProperty:Qr,Debug:irt}=Jot._ModuleSupport,XM=class extends ert{constructor(t){super(new srt(e=>{this.snapping=e}),new art(()=>{this.node=this.active==null?void 0:t.node(this.active)}),new Bh(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}};y([Qr()],XM.prototype,"snapping",2),y([Qr()],XM.prototype,"datum",2),y([Qr()],XM.prototype,"node",2);var srt=class extends JN{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:{},translating:{},"text-input":{}})}},art=class extends JN{constructor(t){super("idle",{idle:{onEnter:t,render:t},dragging:{onEnter:t,render:t},translating:{onEnter:t,render:t},"text-input":{render:t}})}},Bh=class extends JN{constructor(t,e){const i=v=>M=>{t.create(v,M),this.active=t.selectLast()},s=()=>{this.active!=null&&t.delete(this.active),this.active=void 0,t.select()},a={createDatum:i},n={...t,delete:s,showTextInput:()=>{this.active!=null&&t.showTextInput(this.active)},deselect:()=>{const v=this.active;this.active=void 0,this.hovered=void 0,t.select(this.active,v)},showAnnotationOptions:()=>{this.active!=null&&t.showAnnotationOptions(this.active)}},o=Object.fromEntries(Object.entries(kn).map(([v,M])=>[v,M.createState(n,a)])),r=Object.fromEntries(Object.entries(kn).map(([v,M])=>[v,M.dragState(t,a)])),l=({colorPickerType:v,colorOpacity:M,color:D,opacity:L,isMultiColor:C})=>{this.datum&&(v==="text-color"&&t.updateTextInputColor(D),IM(this.datum,v,M,D,L,C),t.update())},c=v=>{const{datum:M,node:D}=this;!M||!D||(Yr(M)?(M.fontSize=v,t.updateTextInputFontSize(v)):qg(M)&&(M.text.fontSize=v),t.update())},h=v=>{const{datum:M,node:D}=this;!M||!D||!Ih(M)||(UW(M,v),t.update())},u=v=>{const{node:M}=this;!M||!("setTextInputBBox"in M)||(M.setTextInputBBox(v),t.update())},d=({textInputValue:v,bbox:M})=>{const{datum:D}=this;if(M!=null&&v!=null&&v.length>0){if(!Yr(D))return;const L=bM(D,v,M.width);D.set({text:L}),t.update(),t.recordAction(`Change ${D.type} annotation text`)}else t.delete(this.active),t.recordAction(`Delete ${D?.type} annotation`)},p=()=>{t.updateTextInputBBox(void 0)},g=()=>this.active!=null,f=()=>this.copied!=null,x=()=>{const{active:v,datum:M}=this;return v==null||!M?!1:qg(M)&&!M.locked},m=()=>this.active!=null&&!kh(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:v})=>{this.hovered=t.hoverAtCoords(v,this.active,this.hovered),this.hoverCoords=v},translate:{guard:g,target:"translating",action:({translation:v})=>{t.startInteracting(),t.translate(this.active,v),t.update()}},copy:{guard:m,action:()=>{this.copied=t.copy(this.active)}},cut:{guard:m,action:()=>{this.copied=t.copy(this.active),s()}},paste:{guard:f,action:()=>{t.paste(this.copied)}},selectLast:()=>{const v=this.active;this.active=t.selectLast(),t.select(this.active,v)},click:[{guard:()=>{const{active:v,hovered:M,datum:D}=this;return v==null||M!==v||!D?!1:Yr(D)&&!D.locked},target:"text-input"},{action:()=>{const v=this.active;this.active=this.hovered,t.select(this.active,v)}}],dblclick:{guard:x,action:({offset:v})=>{const M=t.getNodeAtCoords(v,this.active)==="text"?"text":"line";t.showAnnotationSettings(this.active,void 0,M)}},dragStart:[{guard:b,target:"dragging",action:()=>{const v=this.active;this.active=this.hovered,t.select(this.active,v),t.startInteracting()}},{action:()=>{const v=this.active;this.active=this.hovered,t.select(this.active,v)}}],color:{guard:g,action:l},fontSize:{guard:g,action:c},lineProps:{guard:g,action:v=>{const M=jd(this.datum);M?.set(v),t.update(),t.recordAction(`Change ${M?.type} ${Object.entries(v).map(([D,L])=>`${D} to ${L}`).join(", ")}`)}},lineStyle:{guard:g,action:h},lineText:{guard:g,action:v=>{const M=jd(this.datum);qg(M)&&(ec(M)&&v.position==="center"&&(v.position="inside"),M.text.set(v),t.update())}},updateTextInputBBox:{guard:g,action:u},toolbarPressSettings:{guard:x,action:v=>{t.showAnnotationSettings(this.active,v)}},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),!kh(this.datum)&&t.recordAction(`Delete ${this.datum?.type} annotation`))},deleteAll:()=>{t.deleteAll()},...o},dragging:{onEnter:(v,M)=>{if(this.active==null)return;const D=t.getAnnotationType(this.active);D&&(this.transitionRoot(D),this.transitionRoot("dragStart",M))},...r},translating:{onEnter:()=>{},translate:{guard:g,target:"translating",action:({translation:v})=>{t.startInteracting(),t.translate(this.active,v),t.update()}},translateEnd:{guard:g,target:"idle"},onExit:()=>{t.stopInteracting(),t.update(),t.recordAction("Translate annotation")}},"text-input":{onEnter:()=>{if(this.active==null)return;const v=jd(this.datum);!v||!("getTextInputCoords"in v)||(t.startInteracting(),t.showTextInput(this.active),v.visible=!1,t.update())},updateTextInputBBox:{guard:g,action:u},resize:{target:"idle",action:d},click:{target:"idle",action:d},drag:{target:"idle",action:d},textInput:[{guard:zN,target:"idle",action:p},{guard:FN,target:"idle",action:d}],color:{guard:g,action:l},fontSize:{guard:g,action:c},cancel:{target:"idle",action:p},onExit:()=>{t.stopInteracting(),t.hideTextInput();const v=this.active;if(this.active=this.hovered=void 0,t.select(this.active,v),v==null)return;const M=t.datum(v),D=t.node(v);!M||!D||(M.visible=!0)}}}),this.setActive=e,this.debug=irt.create(!0,"annotations"),this.snapping=!1}};y([trt({changeValue(t){this.setActive(t)}}),Qr()],Bh.prototype,"active",2),y([Qr()],Bh.prototype,"hovered",2),y([Qr()],Bh.prototype,"hoverCoords",2),y([Qr()],Bh.prototype,"copied",2),y([Qr()],Bh.prototype,"snapping",2),y([Qr()],Bh.prototype,"datum",2),y([Qr()],Bh.prototype,"node",2);var h3=(_(),w(P)),u3=(R(),w(st)),{ActionOnSet:nrt,LayoutElement:ort,Menu:rrt,PropertiesArray:lrt,ToolbarButtonProperties:crt,Property:qM,ChartAxisDirection:hrt}=h3._ModuleSupport,d3=class extends crt{};y([qM],d3.prototype,"value",2);var QM=class extends h3._ModuleSupport.BaseProperties{constructor(t){super(),this.ctx=t,this.enabled=!0,this.padding=20,this.buttons=new lrt(d3),this.events=new u3.EventEmitter,this.annotationMenu=new rrt(this.ctx,"annotations"),this.cleanup=new u3.CleanupRegistry,this.toolbar=t.sharedToolbar.getSharedToolbar("annotations");const e=this.onKeyDown.bind(this);this.toolbar.addListener("keydown",e),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onToolbarButtonPress.bind(this)),t.layoutManager.registerElement(ort.ToolbarLeft,this.onLayoutStart.bind(this)),()=>{this.toolbar.removeListener("keydown",e),this.toolbar.destroy()})}destroy(){this.cleanup.flush()}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()}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 s=this.ctx.axisManager.getAxisContext(hrt.Y)[0].scale;switch(e.value){case"clear":this.events.emit("pressed-clear",null);break;case"line-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsLineAnnotations",ont.filter(a=>a.visible?a.visible(s):!0));break;case"fibonacci-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsFibonacciAnnotations",rnt);break;case"text-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsTextAnnotations",cnt);break;case"shape-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsShapeAnnotations",hnt);break;case"measurer-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsMeasurerAnnotations",unt);break}}onToolbarButtonPressShowMenu(t,e,i,s,a){this.events.emit("pressed-show-menu",null);const n=this.buttons.findIndex(o=>o.value===i);this.toolbar.toggleActiveButtonByIndex(n),this.annotationMenu.setAnchor({x:e.x+e.width+6,y:e.y}),this.annotationMenu.show({items:a,ariaLabel:this.ctx.localeManager.t(s),class:"ag-charts-annotations__toolbar-menu",sourceEvent:t.sourceEvent,onPress:this.onButtonPressMenuCreateAnnotation.bind(this,i)})}onButtonPressMenuCreateAnnotation(t,e){const i=this.buttons.findIndex(s=>s.value===t);this.updateButtonByIndex(i,{icon:e.icon}),this.events.emit("pressed-create-annotation",{annotation:e.value}),this.annotationMenu.hide()}onKeyDown({sourceEvent:t}){t.key==="Escape"&&this.events.emit("cancel-create-annotation",null)}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()}))}};y([qM,nrt({changeValue(t){this.toolbar?.setHidden(!t)}})],QM.prototype,"enabled",2),y([qM],QM.prototype,"padding",2),y([qM],QM.prototype,"buttons",2);var p3=(_(),w(P)),{BaseModuleInstance:urt,InteractionState:Cx,Property:drt,ChartAxisDirection:prt,getIconClassNames:grt}=p3._ModuleSupport,Lx="ag-charts-annotations__axis-button",g3=class extends urt{constructor(t,e,i,s){super(),this.ctx=t,this.axisCtx=e,this.onButtonClick=i,this.seriesRect=s,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:a})=>{const n=a instanceof HTMLElement?a:void 0;!(n&&t.domManager.contains(n,"series-area"))&&n!==this.button.getElement()&&this.hide()}),this.cleanup.register(t.widgets.seriesWidget.addListener("drag-move",a=>this.onMouseDrag(a)),t.widgets.seriesWidget.addListener("mousemove",a=>this.onMouseMove(a)),t.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseLeave()),t.widgets.seriesDragInterpreter?.events.on("click",a=>this.onClick(a)),t.eventsHub.on("series:focus-change",()=>this.onKeyPress()),t.eventsHub.on("zoom:pan-start",()=>this.hide()),t.eventsHub.on("zoom:change",()=>this.hide()),()=>this.destroyElements(),()=>this.button.destroy())}update(t,e){this.seriesRect=t,this.padding=e}setup(){const t=new p3._Widget.ButtonWidget;return t.addClass(Lx),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",Lx)}onMouseMove(t){this.ctx.interactionManager.isState(Cx.Clickable)&&this.show(t)}onMouseDrag(t){this.ctx.interactionManager.isState(Cx.AnnotationsMoveable)&&this.show(t)}onMouseLeave(){this.ctx.interactionManager.isState(Cx.Clickable)&&this.hide()}onClick(t){this.ctx.interactionManager.isState(Cx.Clickable)&&t.device==="touch"&&this.show(t)}show(t){const{sourceEvent:e,currentX:i,currentY:s}=t;if(!(this.enabled&&this.ctx.widgets.seriesWidget.getElement().contains(e.target))){this.hide();return}this.toggleVisibility(!0);const a=this.getButtonCoordinates({x:i,y:s});this.coords={x:a.x+this.button.clientWidth/2,y:a.y+this.button.clientHeight/2},this.updatePosition(a)}hide(){this.toggleVisibility(!1)}onKeyPress(){this.snap&&this.ctx.interactionManager.isState(Cx.Default)||this.hide()}getButtonCoordinates({x:t,y:e}){const{axisCtx:{direction:i,position:s},seriesRect:a,snap:n,axisCtx:o,padding:r}=this,{clientWidth:l,clientHeight:c}=this.button,[h,u]=[0,a.height],[d,p]=[0,a.width];if(n&&(t=Yl(fM(t-a.x,o),o)+a.x,e=Yl(fM(e-a.y,o),o)+a.y),i===prt.X){const f=c-Math.max(0,r-5);t=t-l/2,e=s==="top"?h-c+f:u-f}else{const f=l-Math.max(0,r-9);t=s==="left"?d-l+f:p-f,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(`${Lx}-${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(`<span class="${grt("zoom-in")} ${Lx}-icon"></span>`)}};y([drt],g3.prototype,"enabled",2);var frt=(_(),w(P)),mrt=(R(),w(st)),yrt=(_(),w(P)),qi=(R(),w(st)),{Color:f3,DraggablePopover:xrt,NativeWidget:tO,Vec2:Qi,createButton:JM,createCheckbox:brt,createSelect:vrt,createTextArea:Srt,initRovingTabIndex:m3,getIconClassNames:Mrt,mapValues:eO}=yrt._ModuleSupport,y3=class kP extends xrt{constructor(e,i){super(e,i),this.dragHandleDraggingClass="ag-charts-dialog__drag-handle--dragging",this.colorPicker=new qW(this.ctx,{detached:!0}),this.cleanup.register(e.eventsHub.on("layout:complete",this.onLayoutComplete.bind(this)))}showWithChildren(e,i){const s=super.showWithChildren(e,i);return s.classList.add("ag-charts-dialog"),s.setAttribute("role","dialog"),s.addEventListener("mousedown",a=>{a.target.classList?.contains("ag-charts-dialog__color-picker-button")||this.colorPicker.hide()}),s.addEventListener("keydown",this.onKeyDown.bind(this)),(0,qi.getWindow)().requestAnimationFrame(()=>this.reposition()),this.colorPicker.attachTo(this),s}updatePosition(e){super.updatePosition(e);const{anchor:i,fallbackAnchor:s}=this.getColorPickerAnchors()??{};i&&this.colorPicker.setAnchor(i,s)}createTabs(e,i,s){const a=(0,qi.createElement)("div","ag-charts-dialog__tabs"),n=eO(s,()=>(0,qi.createElementId)()),o=eO(s,()=>(0,qi.createElementId)());for(const[p,g]of(0,qi.entries)(s))(0,qi.setAttributes)(g.panel,{id:o[p],role:"tabpanel","aria-labelledby":n[p]});const r=p=>{for(const[g,f]of(0,qi.entries)(s))f.panel.classList.toggle("ag-charts-dialog__tab-panel--active",g===p),h[g].classList.toggle("ag-charts-dialog__tab-button--active",g===p),(0,qi.setAttribute)(h[g],"aria-selected",g===p),g===p&&f.onShow?.()},l=new tO((0,qi.createElement)("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 krt;this.setDragHandle(c);const h=eO(s,(p,g)=>JM({label:this.ctx.localeManager.t(p.label),onPress:()=>r(g)},{id:n[g],class:"ag-charts-dialog__tab-button",role:"tab","aria-controls":o[g]})),u=(0,qi.createElement)("div","ag-charts-dialog__tab-list");(0,qi.setAttributes)(u,{role:"tablist","aria-label":this.ctx.localeManager.t(e)}),u.append(...Object.values(h));const d=this.createHeaderCloseButton();return l.getElement().append(c.getElement(),u,d),a.append(l.getElement(),...Object.values(s).map(p=>p.panel)),r(i),m3({orientation:"horizontal",buttons:Object.values(h)}),{tabs:a,initialFocus:h[i]}}createTabPanel(){return(0,qi.createElement)("div","ag-charts-dialog__tab-panel")}createInputGroupLine(){return(0,qi.createElement)("div","ag-charts-dialog__input-group-line")}createRadioGroup({label:e,options:i,value:s,onChange:a}){const n=this.createInputGroup(e);(0,qi.setAttributes)(n,{role:"radiogroup",tabindex:-1,"aria-label":this.ctx.localeManager.t(e)});const o="ag-charts-dialog__button--active",r=[];for(const l of i){const{icon:c,altText:h}=l,u=this.ctx.localeManager.t(h),d=JM({icon:c,altText:u,onPress:()=>{for(const p of Array.from(n.children))p.classList.remove(o),p.ariaChecked="false";d.classList.add(o),d.ariaChecked="true",a(l.value)}},{"aria-checked":l.value===s,class:"ag-charts-dialog__button",role:"radio",title:u});l.value===s&&d.classList.add(o),n.appendChild(d),r.push(d)}return m3({orientation:"horizontal",buttons:r}),n}createSelect({altText:e,label:i,options:s,value:a,onChange:n}){const o=this.createInputGroup(i),r=this.ctx.localeManager.t(e),l=vrt({value:a,options:s,onChange:n},{class:"ag-charts-dialog__select","aria-label":r,title:r});return o.append(l),o}createTextArea({placeholder:e,value:i,onChange:s}){const a=e?this.ctx.localeManager.t(e):void 0;return Srt({value:i,onChange:s},{placeholder:a})}createCheckbox({label:e,checked:i,onChange:s}){const a=(0,qi.createElementId)(),n=this.createInputGroup(e,{for:a}),o=brt({checked:i,onChange:s},{class:"ag-charts-dialog__checkbox",role:"switch",id:a});return n.append(o),n}createColorPicker({color:e,opacity:i,label:s,altText:a,onChange:n,onChangeHide:o,isMultiColor:r,hasMultiColorOption:l}){const c=this.createInputGroup(s),h=this.ctx.localeManager.t(a),u=JM({label:h,onPress:d=>{const{anchor:p,fallbackAnchor:g}=this.getColorPickerAnchors(u)??{};this.colorPicker.show({anchor:p,fallbackAnchor:g,color:e,opacity:i,isMultiColor:r,hasMultiColorOption:l,sourceEvent:d,onChange:(f,x,m,b)=>{u.style.setProperty("--color",f),u.classList.toggle("ag-charts-dialog__color-picker-button--multi-color",b),n(f,x,m,b)},onChangeHide:o})}},{"aria-label":h,tabindex:0,class:"ag-charts-dialog__color-picker-button",title:h});if(r)u.classList.toggle("ag-charts-dialog__color-picker-button--multi-color");else if(e){const d=f3.fromString(e),p=new f3(d.r,d.g,d.b,i);u.style.setProperty("--color",p.toHexString())}return c.append(u),this.hideFns.push(()=>{this.colorPicker.hide()}),c}createHeaderCloseButton(){return JM({icon:"close",altText:this.ctx.localeManager.t("iconAltTextClose"),onPress:()=>this.hide()},{class:"ag-charts-dialog__close-button"})}createInputGroup(e,i){const s=(0,qi.createElement)("div","ag-charts-dialog__input-group"),a=(0,qi.createElement)("label","ag-charts-dialog__input-group-label");return a.innerText=this.ctx.localeManager.t(e),(0,qi.setAttribute)(a,"for",i?.for),s.appendChild(a),s}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,s=i.domManager.getBoundingClientRect(),a=this.getPopoverElement();if(!e||!a)return;const n=Qi.from(0,e.y),o=Qi.from(s.width,e.height),r=Qi.from(a),l=Qi.from(.5,1);let c;if(e.width>1e3){const h=Qi.sub(Qi.add(n,Qi.multiply(o,l)),Qi.multiply(r,l));c=Qi.sub(h,Qi.from(0,kP.offset))}else{const h=Qi.sub(Qi.add(n,o),r);c=Qi.sub(h,kP.offset)}this.updatePosition(c)}getColorPickerAnchors(e){if(e&&(this.colorPickerAnchorElement=e),!this.colorPickerAnchorElement)return;const i=this.colorPickerAnchorElement.getBoundingClientRect(),s=this.ctx.domManager.getBoundingClientRect(),a=Qi.sub(Qi.from(i.x,i.y),Qi.from(s.left,s.top)),n=Qi.add(a,Qi.from(0,i.height+5)),o=Qi.sub(a,Qi.from(0,5));return{anchor:n,fallbackAnchor:o}}};y3.offset=60;var Drt=y3,krt=class extends tO{constructor(){super((0,qi.createElement)("div","ag-charts-dialog__drag-handle"));const t=new tO((0,qi.createElement)("span",Mrt("drag-handle")));t.setAriaHidden(!0),this.addChild(t)}},{focusCursorAtEnd:Irt}=frt._ModuleSupport,Art=class extends Drt{constructor(t){super(t,"settings"),this.events=new mrt.EventEmitter,this.hideFns.push(()=>this.events.emit("hidden",null))}show(t,e){const i=this.createLinearLineTab(t,e),s=this.createLinearTextTab(t,e);let a="dialogHeaderLine";ec(t)?a="dialogHeaderChannel":$W(t)?a="dialogHeaderFibonacciRange":t.type==="date-range"?a="dialogHeaderDateRange":t.type==="price-range"?a="dialogHeaderPriceRange":t.type==="date-price-range"&&(a="dialogHeaderDatePriceRange");const{tabs:n,initialFocus:o}=this.createTabs("ariaLabelSettingsTabBar",e.initialSelectedTab,{line:{label:a,panel:i},text:{label:"dialogHeaderText",panel:s.panel,onShow:s.onShow}});e.initialFocus=o,this.showWithChildren([n],e).classList.add("ag-charts-dialog--annotation-settings")}createLinearLineTab(t,e){const i=this.createTabPanel(),s=this.createInputGroupLine(),a=this.createInputGroupLine(),n="isMultiColor"in t,o=this.createColorPickerInput("line-color",t.getDefaultColor("line-color"),t.getDefaultOpacity("line-color"),n?t.isMultiColor:!1,n,e.onChangeLineColor,e.onChangeHideLineColor),r=this.createStrokeWidthSelect(t.strokeWidth??2,e.onChangeLineStyleWidth),l=this.createLineStyleRadioGroup(t.lineStyle??"solid",e.onChangeLineStyleType);if(s.append(o),"background"in t){const c=this.createColorPickerInput("fill-color",t.getDefaultColor("fill-color"),t.getDefaultOpacity("fill-color"),!1,!1,e.onChangeFillColor,e.onChangeHideFillColor);s.append(c),a.append(r)}else"showFill"in t?(s.append(this.createCheckbox({label:"dialogInputShowFill",checked:t.showFill??!0,onChange:c=>e.onChangeLine({showFill:c})})),a.append(r)):s.append(r);return a.append(l),i.append(s,a),"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:ec(t)?"dialogInputExtendChannelStart":"dialogInputExtendLineStart",checked:t.extendStart??!1,onChange:c=>e.onChangeLine({extendStart:c})}),this.createCheckbox({label:ec(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(),s=this.createTextArea({placeholder:"inputTextareaPlaceholder",value:t.text.label,onChange:h=>e.onChangeText({label:h})}),a=this.createFontSizeSelect(t.text.fontSize,e.onChangeTextFontSize),n=this.createColorPickerInput("text-color",t.text.color,1,!1,!1,e.onChangeTextColor,e.onChangeHideTextColor),o=t.text.position==="inside"?"center":t.text.position,r=this.createPositionRadioGroup(o??"top",h=>e.onChangeText({position:h})),l=this.createAlignmentRadioGroup(t.text.alignment??"center",h=>e.onChangeText({alignment:h})),c=this.createInputGroupLine();return c.append(a,n,r,l),i.append(s,c),{panel:i,onShow:()=>Irt(s)}}createColorPickerInput(t,e,i,s,a,n,o){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:s,hasMultiColorOption:a,onChange:n,onChangeHide:o})}createStrokeWidthSelect(t,e){return this.createSelect({label:"dialogInputStrokeWidth",altText:"dialogInputStrokeWidthAltText",options:tH.map(({label:i,value:s})=>({label:i,value:`${s}`})),value:String(t),onChange:i=>e(Number(i))})}createFibonacciRatioSelect(t,e){return this.createSelect({label:"dialogInputFibonacciBands",altText:"dialogInputFibonacciBandsAltText",options:lnt.map(({label:i,value:s})=>({label:i,value:`${s}`})),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:eH.map(({label:i,value:s})=>({label:i,value:String(s)})),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 iO(t){return t.gridPadding+t.seriesAreaPadding+t.tickSize+t.label.spacing}function Crt(t,e,i){for(const{update:s}of Object.values(kn))s(t,e,i)}var{ChartUpdateType:Lrt,InteractionState:Wa,PropertiesArray:wrt,Property:wx,ChartAxisDirection:Trt,keyProperty:Nrt,valueProperty:Ort,Vec2:Wd,Selection:Prt,BBox:_rt}=gM._ModuleSupport,hf=class fZ extends gM._ModuleSupport.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!0,this.toolbar=new QM(this.ctx),this.optionsToolbar=new NN(this.ctx,()=>{const i=this.state.getActive();if(i!=null)return jd(this.annotationData.at(i))}),this.axesButtons=new hN,this.snap=!1,this.data=void 0,this.xKey=void 0,this.volumeKey=void 0,this.annotationData=new wrt(fZ.createAnnotationDatum),this.defaults=new ant,this.container=new gM._ModuleSupport.Group({name:"static-annotations"}),this.annotations=new Prt(this.container,this.createAnnotationScene.bind(this)),this.settingsDialog=new Art(this.ctx),this.textInput=new Gst(this.ctx),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)),this.cleanup.register(()=>this.clear())}setupStateMachine(){const{ctx:e}=this;return new XM({resetToIdle:()=>{e.domManager.updateCursor("annotations"),this.popAnnotationState(Wa.Annotations),this.hideOverlays(),this.optionsToolbar.hide(),this.deleteEphemeralAnnotations(),this.update()},hoverAtCoords:(i,s,a)=>{let n;return this.annotations.each((o,r,l)=>{const c=o.containsPoint(i.x,i.y);c&&(n??(n=l)),o.toggleHovered(c||s===l)}),n!=null?e.tooltipManager.suppressTooltip("annotations"):this.isAnnotationState()||e.tooltipManager.unsuppressTooltip("annotations"),this.ctx.domManager.updateCursor("annotations",n==null?void 0:this.annotations.at(n)?.getCursor()),n!==a&&this.update(),n},getNodeAtCoords:(i,s)=>{const a=this.annotations.at(s);if(a)return a.getNodeAtCoords(i.x,i.y)},translate:(i,s)=>{const a=this.annotations.at(i),n=jd(this.annotationData.at(i));if(!(!a||!n))return this.translateNode(a,n,s)},copy:i=>{const s=this.annotations.at(i),a=jd(this.annotationData.at(i));if(!(!s||!a))return this.createAnnotationDatumCopy(s,a)},paste:i=>{this.createAnnotation(i.type,i,!1),this.postUpdateFns.push(()=>{this.state.transitionAsync("selectLast"),this.state.transitionAsync("copy")})},select:(i,s)=>{const{annotations:a,optionsToolbar:n,toolbar:o}=this;this.hideOverlays(),o.clearActiveButton(),o.resetButtonIcons();const r=i!=null?a.at(i):null,l=s!=null?a.at(s):null;l===r&&r!=null||(l?.toggleActive(!1),n.hide(),r?(this.pushAnnotationState(Wa.AnnotationsSelected),r.toggleActive(!0),n.updateButtons(this.annotationData.at(i)),this.postUpdateFns.push(()=>{n.show(),n.setAnchorScene(r)})):(this.popAnnotationState(Wa.AnnotationsSelected),this.popAnnotationState(Wa.Annotations)),this.deleteEphemeralAnnotations(),this.update())},selectLast:()=>(this.pushAnnotationState(Wa.AnnotationsSelected),this.annotationData.length-1),startInteracting:()=>{this.pushAnnotationState(Wa.Annotations)},stopInteracting:()=>{this.popAnnotationState(Wa.Annotations)},create:(i,s)=>{this.createAnnotation(i,s)},delete:i=>{this.annotationData.splice(i,1)},deleteAll:()=>{this.annotationData.splice(0,this.annotationData.length)},validatePoint:(i,s)=>{const a=this.getAnnotationContext();return a?VM(a,i,s):!0},getAnnotationType:i=>Ust(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(),s=i!=null?this.annotations.at(i):null;s!=null&&this.optionsToolbar.setAnchorScene(s)}),this.update()},showTextInput:i=>{const s=jd(this.annotationData.at(i));if(!this.annotations.at(i)||!s||!("getTextInputCoords"in s)||!("getTextPosition"in s))return;const n={color:s.color,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight,placeholderColor:s.getPlaceholderColor()},o=this.getAnnotationContext(),r=c=>Wd.add(s.getTextInputCoords(o,c),Wd.required(this.seriesRect)),l=()=>s.getTextPosition();this.textInput.show({styles:n,layout:{getTextInputCoords:r,getTextPosition:l,alignment:s.alignment,textAlign:s.textAlign,width:s.width},text:s.text,placeholderText:s.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 s=this.textInput.updateFontSize(i);this.state.transition("updateTextInputBBox",s)},updateTextInputBBox:i=>{this.state.transition("updateTextInputBBox",i)},showAnnotationOptions:i=>{const s=this.annotations.at(i);!s||kh(this.annotationData.at(i))||(this.optionsToolbar.updateButtons(this.annotationData.at(i)),this.optionsToolbar.show(),this.optionsToolbar.setAnchorScene(s))},showAnnotationSettings:(i,s,a="line")=>{const n=this.annotationData.at(i);if(!kM(n)&&!ec(n)&&!Sx(n)||kh(n))return;const o=c=>(h,u,d,p)=>{this.setColorAndDefault(n.type,c,h,u,d,p),this.optionsToolbar.updateColorPickerColor(c,u,d,p)},r=c=>()=>{this.recordActionAfterNextUpdate(`Change ${n.type} ${c} to ${n.getDefaultColor(c)}`,["annotations","defaults"]),this.update()},l={initialSelectedTab:a,ariaLabel:this.ctx.localeManager.t("ariaLabelAnnotationSettingsDialog"),sourceEvent:s,onChangeLine:c=>{this.state.transition("lineProps",c),c.bands!=null&&this.defaults.setDefaultFibonacciOptions(n.type,"bands",c.bands),c.reverse!=null&&this.defaults.setDefaultFibonacciOptions(n.type,"reverse",c.reverse),c.showFill!=null&&this.defaults.setDefaultFibonacciOptions(n.type,"showFill",c.showFill)},onChangeText:c=>{this.state.transition("lineText",c),c.alignment&&this.defaults.setDefaultLineTextAlignment(n.type,c.alignment),c.position&&this.defaults.setDefaultLineTextPosition(n.type,c.position),this.recordActionAfterNextUpdate(`Change ${n.type} text ${Object.keys(c).map(h=>`${h} to ${c[h]}`).join(", ")}`)},onChangeFillColor:o("fill-color"),onChangeHideFillColor:r("fill-color"),onChangeLineColor:o("line-color"),onChangeHideLineColor:r("line-color"),onChangeLineStyleType:c=>{this.setLineStyleTypeAndDefault(n.type,c),this.optionsToolbar.updateLineStyleType(Mx.find(h=>h.value===c)??Mx[0])},onChangeLineStyleWidth:c=>{this.setLineStyleWidthAndDefault(n.type,c),this.optionsToolbar.updateStrokeWidth({strokeWidth:c,value:c,label:String(c)})},onChangeTextColor:o("text-color"),onChangeHideTextColor:r("text-color"),onChangeTextFontSize:c=>{this.setFontSizeAndDefault(n.type,c)}};this.settingsDialog.show(n,l)}})}setupListeners(){const{ctx:e,optionsToolbar:i,settingsDialog:s,toolbar:a}=this,{seriesWidget:n,seriesDragInterpreter:o,chartWidget:r}=e.widgets;o&&this.cleanup.register(o.events.on("click",this.hoverTouchPreHandler.bind(this)),o.events.on("drag-start",this.hoverTouchPreHandler.bind(this)),o.events.on("drag-move",this.dragMoveTouchPreHandler.bind(this)),o.events.on("mousemove",this.onHover.bind(this)),o.events.on("click",this.onClick.bind(this)),o.events.on("dblclick",this.onDoubleClick.bind(this)),o.events.on("drag-start",this.onDragStart.bind(this)),o.events.on("drag-move",this.onDrag.bind(this)),o.events.on("drag-end",this.onDragEnd.bind(this))),this.cleanup.register(n.addListener("keydown",this.onKeyDown.bind(this)),n.addListener("keyup",this.onKeyUp.bind(this)),r.addListener("click",this.onCancel.bind(this)),e.eventsHub.on("annotations:restore",this.onRestoreAnnotations.bind(this)),e.eventsHub.on("layout:complete",this.onLayoutComplete.bind(this)),e.updateService.addListener("pre-scene-render",this.onPreRender.bind(this)),e.eventsHub.on("zoom:change",()=>this.onResize()),e.eventsHub.on("dom:resize",()=>this.onResize()),a.events.on("cancel-create-annotation",()=>{this.cancel(),this.reset(),this.update()}),a.events.on("pressed-create-annotation",({annotation:l})=>{this.cancel(),this.pushAnnotationState(Wa.Annotations),this.state.transition(l),this.update()}),a.events.on("pressed-clear",()=>{this.clear(),this.recordActionAfterNextUpdate("Clear all")}),a.events.on("pressed-show-menu",()=>{this.cancel(),this.reset()}),a.events.on("pressed-unrelated",()=>{this.reset()}),i.events.on("pressed-delete",()=>{this.cancel(),this.delete(),this.reset()}),i.events.on("pressed-settings",({sourceEvent:l})=>{this.state.transition("toolbarPressSettings",l)}),i.events.on("pressed-lock",()=>{this.update()}),i.events.on("hid-overlays",()=>{this.settingsDialog.hide()}),i.events.on("saved-color",({type:l,colorPickerType:c,color:h})=>{this.recordActionAfterNextUpdate(`Change ${l} ${c} to ${h}`,["annotations","defaults"])}),i.events.on("updated-color",({type:l,colorPickerType:c,colorOpacity:h,color:u,opacity:d,isMultiColor:p})=>{this.setColorAndDefault(l,c,h,u,d,p)}),i.events.on("updated-font-size",({type:l,fontSize:c})=>{this.setFontSizeAndDefault(l,c)}),i.events.on("updated-line-style",({type:l,lineStyleType:c})=>{this.setLineStyleTypeAndDefault(l,c)}),i.events.on("updated-line-width",({type:l,strokeWidth:c})=>{this.setLineStyleWidthAndDefault(l,c)}),s.events.on("hidden",()=>{this.optionsToolbar.clearActiveButton()}))}setupDOM(){const{ctx:e,toolbar:i,optionsToolbar:s}=this;this.cleanup.register(e.annotationManager.attachNode(this.container),()=>{e.domManager.removeStyles(Lx),i.destroy(),s.destroy()})}async processData(e){if(!this.enabled||this.data==null||this.xKey==null||this.volumeKey==null)return;const i=[Nrt(this.xKey,void 0,{id:"date"}),Ort(this.volumeKey,"number",{id:"volume"})],{dataModel:s,processedData:a}=await e.request("annotations",[...this.data],{props:i});this.dataModel=s,this.processedData=a}createAnnotationScene(e){if(e.type in kn)return new kn[e.type].scene;throw new Error(`AG Charts - Cannot create annotation scene of type [${e.type}], expected one of [${Object.keys(kn)}], ignoring.`)}static createAnnotationDatum(e){if(e.type in kn)return new kn[e.type].datum().set(e);throw new Error(`AG Charts - Cannot create annotation datum of unknown type [${e.type}], expected one of [${Object.keys(kn)}], ignoring.`)}createAnnotation(e,i,s=!0){if(this.annotationData.push(i),s){const a=this.ctx.annotationManager.getAnnotationTypeStyles(e);a&&i.set(a),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:s,processedData:a}=this;let n=Xi(e),o=Xi(i);if(!(0,lN.isValidDate)(n)||!(0,lN.isValidDate)(o)||!s||!a||this.volumeKey==null)return;n>o&&([n,o]=[o,n]);const r=s.resolveKeysById({id:"annotations"},"date",a),l=s.resolveColumnById({id:"annotations"},"volume",a);let c=0;for(let h=0;h<a.input.count;h++){const u=r[h];(0,lN.isValidDate)(u)&&u>=n&&u<=o&&(c+=l[h])}return c}translateNode(e,i,s){const a=this.getAnnotationConfig(i),n=this.getAnnotationContext();n&&a.translate(e,i,s,n)}createAnnotationDatumCopy(e,i){const s=this.getAnnotationConfig(i),a=new s.datum;a.set(i.toJson());const n=this.getAnnotationContext();if(n)return s.copy(e,i,a,n)}getAnnotationConfig(e){if(e.type in kn)return kn[e.type];throw new Error(`AG Charts - Cannot get annotation config of unknown type [${e.type}], expected one of [${Object.keys(kn)}], ignoring.`)}onRestoreAnnotations(e){this.enabled&&(this.clear(),this.annotationData.set(e.annotations),this.postUpdateFns.push(()=>{this.ctx.annotationManager.fireChangedEvent()}),this.update())}onLayoutComplete(e){const i=e.series.paddedRect;this.seriesRect=i,this.container.setClipRect(i);for(const s of e.axes??[])s.direction===gM._ModuleSupport.ChartAxisDirection.X?this.xAxis=this.getAxis(s,i,this.xAxis?.button):this.yAxis=this.getAxis(s,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(a=>a.hasData),s=this.yAxis.context.seriesIds().some(a=>this.ctx.chartService.series.find(o=>o.id===a)?.visible);return e&&s}animateAnnotations({from:e,to:i,phase:s}){const{annotations:a}=this;this.ctx.animationManager?.animate({from:e,to:i,id:"chart-annotations",phase:s,groupId:"opacity",onUpdate(n){a.each(o=>{o.opacity=n,"setAxisLabelOpacity"in o&&o.setAxisLabelOpacity(n)})},onStop(){a.each(n=>{n.opacity=i,"setAxisLabelOpacity"in n&&n.setAxisLabelOpacity(i)})}})}onPreRender(){this.updateAnnotations(),this.state.transition("render")}getAxis(e,i,s){const a=this.ctx.axisManager.getAxisContext(e.direction)[0],{position:n="bottom",direction:o}=a,r=e.gridPadding+e.seriesAreaPadding,l=new _rt(0,0,i.width,i.height).grow(r,n),c=a.direction===Trt.X?"vertical":"horizontal",{axesButtons:h,snap:u}=this;if(this.enabled&&h.enabled&&(h.axes==="xy"||h.axes===o)){s??(s=new g3(this.ctx,{...a,snapToGroup:u},g=>this.onAxisButtonClick(g,c),i));const p=iO(e);s.update(i,p)}else s?.destroy(),s=void 0;return{layout:e,context:a,bounds:l,button:s}}recordActionAfterNextUpdate(e,i=["annotations"]){const{defaults:s,ctx:{annotationManager:a,historyManager:n}}=this,o=i.map(r=>r==="defaults"?s:a);this.postUpdateFns.push(()=>{n.record(e,...o),a.fireChangedEvent()})}setColorAndDefault(e,i,s,a,n,o){this.state.transition("color",{colorPickerType:i,colorOpacity:s,color:a,opacity:n,isMultiColor:o}),this.defaults.setDefaultColor(e,i,s,a,n,o)}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:s,ctx:{annotationManager:a}}=this,n=this.getAnnotationContext();if(!s||!n)return;a.updateData(e.toJson().filter(r=>!kh(r)));const o=this.showAnnotations();this.toolbar.refreshButtonsEnabled(o),this.toolbar.toggleClearButtonEnabled(e.length>0&&o),i.update(e??[],void 0,r=>r.id).each((r,l)=>{if(!o){r.visible=!1,"setAxisLabelVisible"in r&&r.setAxisLabelVisible(!1);return}"setAxisLabelVisible"in r&&r.setAxisLabelVisible(!0),this.injectDatumDependencies(l),Crt(r,l,n)}),this.postUpdateFns.forEach(r=>r()),this.postUpdateFns=[]}getAnnotationContext(){const{seriesRect:e,xAxis:i,yAxis:s,snap:a}=this;if(e&&i&&s)return{seriesRect:e,xAxis:{...i.context,bounds:i.bounds,labelPadding:iO(i.layout),snapToGroup:a},yAxis:{...s.context,bounds:s.bounds,labelPadding:iO(i.layout),snapToGroup:a}}}onHover(e){const{state:i}=this,s=this.getAnnotationContext();if(!s)return;const a=e.sourceEvent.shiftKey,n=Wd.from(e),o=Sa(n,s);i.transition("hover",{offset:n,point:o,shiftKey:a,context:s})}onClick(e){const{state:i}=this,s=this.getAnnotationContext();if(!s)return;const a=e.sourceEvent.shiftKey,n=Sa(Wd.from(e),s),o=this.textInput.getValue(),r=this.textInput.getBBox();i.transition("click",{point:n,shiftKey:a,textInputValue:o,bbox:r})}onDoubleClick(e){const{state:i}=this;if(!this.getAnnotationContext())return;const a=Wd.from(e);i.transition("dblclick",{offset:a})}onAxisButtonClick(e,i){this.cancel(),this.reset();const s=this.getAnnotationContext();if(!this.annotationData||!s)return;const{state:a}=this;this.pushAnnotationState(Wa.Annotations);const n=i==="horizontal";if(a.transition(n?"horizontal-line":"vertical-line"),this.optionsToolbar.hide(),!e)return;const o=Sa(e,s);VM(s,o)&&(a.transition("click",{point:o,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(Wa.AnnotationsSelected)&&e.sourceEvent.preventDefault()}onDragStart(e){if(!this.ctx.interactionManager.isState(Wa.AnnotationsDraggable))return;const i=this.getAnnotationContext();if(!i)return;const s=Wd.from(e),a=Sa(s,i),n=this.textInput.getValue(),o=this.textInput.getBBox();this.state.transition("dragStart",{context:i,offset:s,point:a,textInputValue:n,bbox:o})}onDrag(e){if(!this.ctx.interactionManager.isState(Wa.AnnotationsDraggable))return;const i=this.getAnnotationContext();if(!i)return;const s=Wd.from(e),a=Sa(s,i),n=e.sourceEvent.shiftKey,o=this.textInput.getValue(),r=this.textInput.getBBox();this.state.transition("drag",{context:i,offset:s,point:a,shiftKey:n,textInputValue:o,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,s=this.getAnnotationContext();if(!s)return;const{key:a,shiftKey:n}=e,o=this.textInput.getValue(),r=this.textInput.getBBox();i.transition("textInput",{key:a,shiftKey:n,textInputValue:o,bbox:r,context:s})}onKeyDown(e){const{state:i}=this,s=this.getAnnotationContext();if(!s)return;const{sourceEvent:a}=e,{shiftKey:n,ctrlKey:o,metaKey:r}=a,l=o||r,c=o||n;i.transition("keyDown",{shiftKey:n,context:s});const h={x:0,y:0},u=Math.max(s?.xAxis.scale.bandwidth??0,c?10:1),d=Math.max(s?.yAxis.scale.bandwidth??0,c?10:1);switch(a.key){case"ArrowDown":h.y=d;break;case"ArrowUp":h.y=-d;break;case"ArrowLeft":h.x=-u;break;case"ArrowRight":h.x=u;break;case"Escape":this.onCancel();return;case"Backspace":case"Delete":this.onDelete();return}if((h.x||h.y)&&(i.transition("translate",{translation:h}),a.stopPropagation(),a.preventDefault()),!!l)switch(a.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,s=this.getAnnotationContext();s&&(this.state.transition("keyUp",{shiftKey:i,context:s}),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())kh(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(Wa.Annotations)||this.ctx.interactionManager.isState(Wa.AnnotationsSelected)}update(e=Lrt.PRE_SCENE_RENDER){this.ctx.updateService.update(e)}};y([wx],hf.prototype,"enabled",2),y([wx],hf.prototype,"toolbar",2),y([wx],hf.prototype,"optionsToolbar",2),y([wx],hf.prototype,"axesButtons",2),y([wx],hf.prototype,"snap",2);var Ert=hf,Rrt=(_(),w(P)),{FONT_SIZE_RATIO:sO,ThemeSymbols:js}=Rrt._ModuleSupport,fo={stroke:{$ref:"foregroundColor"},strokeOpacity:1,strokeWidth:2},Ws={fill:js.DEFAULT_ANNOTATION_HANDLE_FILL,strokeOpacity:1,strokeWidth:2},Hd={color:{$ref:"chartBackgroundColor"},fontSize:{$rem:sO.LARGE},fontFamily:{$ref:"fontFamily"}},x3={...Hd,enabled:!0,fill:{$ref:"foregroundColor"},fontSize:{$ref:"fontSize"}},tD={...Hd,textAlign:"left"},$d={...Hd,position:"top",alignment:"center",color:{$ref:"textColor"}},b3={...Hd,position:"top",alignment:"center",color:{$ref:"textColor"}},aO={...Hd,fontSize:{$ref:"fontSize"},color:js.DEFAULT_ANNOTATION_STATISTICS_COLOR,fill:js.DEFAULT_ANNOTATION_STATISTICS_FILL,stroke:js.DEFAULT_ANNOTATION_STATISTICS_STROKE,strokeWidth:1,divider:{stroke:js.DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,strokeWidth:1,strokeOpacity:.5}},nO={...fo,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...Ws},text:{...$d},statistics:{...aO}},Brt={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:"chartPadding"}},zrt={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"}]},Frt={enabled:!1,line:{...fo,handle:{...Ws},text:{...$d}},"horizontal-line":{...fo,handle:{...Ws},axisLabel:{...x3},text:{...$d}},"vertical-line":{...fo,handle:{...Ws},axisLabel:{...x3},text:{...$d}},"disjoint-channel":{...fo,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...Ws},text:{...b3}},"parallel-channel":{...fo,middle:{lineDash:[6,5],strokeWidth:1},background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...Ws},text:{...b3}},"fibonacci-retracement":{...fo,strokes:js.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...Ws},text:{...$d,position:"center"},label:{...Hd,color:void 0,fontSize:{$rem:sO.SMALLER}}},"fibonacci-retracement-trend-based":{...fo,strokes:js.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...Ws},text:{...$d,position:"center"},label:{...Hd,color:void 0,fontSize:{$rem:sO.SMALLER}}},callout:{...fo,...tD,color:{$ref:"textColor"},handle:{...Ws},fill:{$ref:"foregroundColor"},fillOpacity:.075},comment:{...tD,fontWeight:700,handle:{...Ws},fill:{$ref:"foregroundColor"}},note:{...tD,color:js.DEFAULT_TEXTBOX_COLOR,fill:js.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,stroke:{$ref:"chartBackgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...Ws},background:{fill:js.DEFAULT_TEXTBOX_FILL,stroke:js.DEFAULT_TEXTBOX_STROKE,strokeWidth:1}},text:{...tD,color:{$ref:"textColor"},handle:{...Ws}},arrow:{...fo,handle:{...Ws},text:{...$d}},"arrow-up":{fill:{$palette:"up.fill"},handle:{...Ws,stroke:{$ref:"foregroundColor"}}},"arrow-down":{fill:{$palette:"down.fill"},handle:{...Ws,stroke:{$ref:"foregroundColor"}}},"date-range":{...nO},"price-range":{...nO},"date-price-range":{...nO},"quick-date-price-range":{up:{...fo,fill:js.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,fillOpacity:.2,handle:{...Ws},statistics:{...aO,color:"#fff",fill:js.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...fo,stroke:js.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,fill:js.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,fillOpacity:.2,handle:{...Ws,stroke:js.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE},statistics:{...aO,color:"#fff",fill:js.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{},toolbar:Brt,optionsToolbar:zrt},Vrt={type:"root",optionsKey:"annotations",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Ert(t),themeTemplate:{annotations:Frt}},oO=(_(),w(P)),v3=(_(),w(P)),Grt=(R(),w(st)),{BaseProperties:jrt,ObserveChanges:Wrt,ProxyProperty:Hrt,Property:Ud,calculatePlacement:$rt}=v3._ModuleSupport,Jr=class extends jrt{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=(0,Grt.createElement)("img"),this.imageElement.onload=this.onImageLoad,this.node=new v3._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},s=$rt(this.imageElement.width,this.imageElement.height,i,this);return this.node.setProperties(this.complete?{visible:!0,opacity:this.opacity,...s}:{visible:!1}),s}};y([Ud],Jr.prototype,"top",2),y([Ud],Jr.prototype,"right",2),y([Ud],Jr.prototype,"bottom",2),y([Ud],Jr.prototype,"left",2),y([Ud],Jr.prototype,"width",2),y([Ud],Jr.prototype,"height",2),y([Ud],Jr.prototype,"opacity",2),y([Hrt("imageElement.src"),Wrt(t=>t.loadedSynchronously=t.complete)],Jr.prototype,"url",2);var{ActionOnSet:Urt,Property:Krt}=oO._ModuleSupport,S3=class extends oO._ModuleSupport.Background{constructor(){super(...arguments),this.image=new Jr}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(oO._ModuleSupport.ChartUpdateType.SCENE_RENDER)}};y([Krt,Urt({newValue(t){this.node.appendChild(t.node),t.onLoad=()=>this.onImageLoad()},oldValue(t){this.node.removeChild(t.node),t.onLoad=void 0}})],S3.prototype,"image",2);var Yrt={type:"root",optionsKey:"background",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new S3(t)},PIt=(_(),w(P)),eD=(_(),w(P)),Zrt=(R(),w(st)),{Range:Xrt,TranslatableGroup:qrt,BBox:Qrt,Property:nr,ZIndexMap:Jrt,ChartAxisDirection:tlt,FillGradientDefaults:elt,FillImageDefaults:ilt,FillPatternDefaults:slt,getShapeFill:alt,InteractionState:iD}=eD._ModuleSupport,mo=class extends eD._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.id=(0,Zrt.createId)(this),this.enabled=!1,this.stroke="rgb(195, 195, 195)",this.lineDash=[6,3],this.lineDashOffset=0,this.strokeWidth=1,this.strokeOpacity=1,this.fill="#c16068",this.fillOpacity=1,this.fillGradientDefaults=new elt,this.fillPatternDefaults=new slt,this.fillImageDefaults=new ilt,this.bounds=new Qrt(0,0,0,0),this.bandHighlightGroup=new qrt({name:"bandHighlight",zIndex:Jrt.AXIS_BAND_HIGHLIGHT}),this.rangeNode=this.bandHighlightGroup.appendChild(new Xrt),this.activeAxisHighlight=void 0,this.axisCtx=t.parent,this.hideBand(),t.domManager.addEventListener("focusin",({target:n})=>{const o=n instanceof HTMLElement&&t.domManager.contains(n,"series-area");this.bandHighlightGroup.visible&&!o&&(this.hideBand(),this.ctx.updateService.update(eD._ModuleSupport.ChartUpdateType.PERFORM_LAYOUT))});const{widgets:{seriesWidget:e,seriesDragInterpreter:i},animationManager:s,eventsHub:a}=t;this.cleanup.register(t.scene.attachNode(this.bandHighlightGroup),e.addListener("mousemove",n=>this.onHoverLikeEvent(n)),e.addListener("mouseleave",()=>this.clearAllHighlight()),s.addListener("animation-start",()=>this.clearAllHighlight()),a.on("layout:complete",n=>this.layout(n)),a.on("series:focus-change",()=>this.onKeyPress()),a.on("zoom:pan-start",()=>this.clearAllHighlight()),a.on("zoom:change",()=>this.clearAllHighlight()),a.on("dom:resize",()=>this.clearAllHighlight()),a.on("axis:change",()=>this.axisChange())),i&&this.cleanup.register(i.events.on("drag-move",n=>this.onHoverLikeEvent(n)),i.events.on("click",n=>this.onClick(n)))}axisChange(){this.onHighlightChange()}isHover(t){return t.type==="mousemove"||t.type==="click"||t.device==="touch"&&this.ctx.chartService.touch.dragAction==="hover"}onClick(t){t.device==="touch"&&this.onHoverLikeEvent(t)}clearAllHighlight(){this.ctx.interactionManager.isState(iD.Clickable)&&this.onHighlightChange()}onKeyPress(){this.ctx.interactionManager.isState(iD.Default)&&this.onHighlightChange()}onHoverLikeEvent(t){const e=this.isHover(t)?iD.Clickable:iD.AnnotationsMoveable;this.ctx.interactionManager.isState(e)&&this.handleHoverHighlight(t)}handleHoverHighlight(t){if(!t)return;const{currentX:e,currentY:i}=t;this.onHighlightChange(this.axisCtx.pickBand({x:e,y:i}))}layout({series:{rect:t,visible:e},axes:i}){if(!e||!i||!this.enabled)return;const{position:s="left",axisId:a}=this.axisCtx,n=i.find(l=>l.id===a);if(!n)return;this.axisLayout=n,this.bounds=t.clone().grow(n.gridPadding,s);const{bandHighlightGroup:o,bounds:r}=this;o.translationX=Math.round(r.x),o.translationY=Math.round(r.y),this.updateBand()}updateBand(){const{rangeNode:t,stroke:e,strokeWidth:i,strokeOpacity:s,lineDash:a,fill:n,fillOpacity:o,fillGradientDefaults:r,fillPatternDefaults:l,fillImageDefaults:c,lineDashOffset:h,axisLayout:u}=this;u&&(t.stroke=e,t.strokeWidth=i,t.strokeOpacity=s,t.lineDash=a,t.lineDashOffset=h,t.fill=alt(n,r,l,c),t.fillOpacity=o,t.startLine=!0,t.endLine=!0)}isVertical(){return this.axisCtx.direction===tlt.X}onHighlightChange(t){this.enabled&&(this.activeAxisHighlight=t,this.activeAxisHighlight?this.showBand():this.hideBand(),this.ctx.updateService.update(eD._ModuleSupport.ChartUpdateType.SCENE_RENDER))}updateBandPosition(){const{rangeNode:t,bounds:e}=this,{band:i}=this.activeAxisHighlight??{};if(i==null){this.hideBand();return}this.isVertical()?(t.y1=0,t.y2=e.height,t.x1=i[0],t.x2=i[1],t.horizontal=!0):(t.y1=i[0],t.y2=i[1],t.x1=0,t.x2=e.width,t.horizontal=!1)}showBand(){this.updateBandPosition(),this.bandHighlightGroup.visible=!0}hideBand(){this.bandHighlightGroup.visible=!1}};y([nr],mo.prototype,"enabled",2),y([nr],mo.prototype,"stroke",2),y([nr],mo.prototype,"lineDash",2),y([nr],mo.prototype,"lineDashOffset",2),y([nr],mo.prototype,"strokeWidth",2),y([nr],mo.prototype,"strokeOpacity",2),y([nr],mo.prototype,"fill",2),y([nr],mo.prototype,"fillOpacity",2),y([nr],mo.prototype,"fillGradientDefaults",2),y([nr],mo.prototype,"fillPatternDefaults",2),y([nr],mo.prototype,"fillImageDefaults",2);var nlt={type:"axis-option",optionsKey:"bandHighlight",packageType:"enterprise",chartTypes:["cartesian"],axisTypes:["category","ordinal-time","unit-time","grouped-category"],moduleFactory:t=>new mo(t),themeTemplate:{bandHighlight:{enabled:!1,strokeWidth:0,lineDash:[],fill:{$foregroundBackgroundMix:.05}}}},_It=(_(),w(P)),M3=(_(),w(P)),olt=(R(),w(st)),{ActionOnSet:rlt,LayoutElement:llt,Menu:clt,Property:hlt}=M3._ModuleSupport,rO=[{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"}],D3=class extends M3._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.menu=new clt(this.ctx,"chart-toolbar"),this.toolbar=t.sharedToolbar.getSharedToolbar("chartToolbar"),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onButtonPressed.bind(this)),t.layoutManager.registerElement(llt.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:rO,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=rO.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=>olt.Logger.error(i))}getChartType(){const t=this.ctx.chartService.publicApi?.getOptions()?.chartType;return t==null||!rO.some(e=>e.value===t)?"candlestick":t}};y([hlt,rlt({changeValue(t){this.toolbar?.setHidden(!t)}})],D3.prototype,"enabled",2);var ult={type:"root",optionsKey:"chartToolbar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new D3(t)},dlt=(_(),w(P)),uf=(_(),w(P)),tl=(R(),w(st)),plt=(R(),w(st));function glt(t,e){return t==="always"?!0:t==="series-area"?e==="series-area"||e==="series-node":t===e}function k3(t,e,i){let s=!0;if(e.type==="separator"){const a=i.at(i.length-1);s=a!==void 0&&a.type!=="separator"}if(s&&(s=glt(e.showOn??"always",t)),s){const a=new mlt(e);return i.push(a),a}}function I3(t,e,i,s){e.isVisible(i)&&k3(t,e.builtins.items[i],s)}function flt(t,e,i,s){const{builtins:a}=e;if((0,plt.isKeyOf)(i,a.lists))for(const n of a.lists[i])I3(t,e,n,s);else I3(t,e,i,s)}function A3(t,e,i,s){for(const a of i)if(typeof a=="string")flt(t,e,a,s);else{const n=k3(t,a,s);a.items&&n&&a.items.length>0&&A3(t,e,a.items,n.items)}s[s.length-1]?.type==="separator"&&s.pop()}var mlt=class{constructor(t){this.type="action",this.showOn="always",this.label="",this.iconUrl=void 0,this.enabled=!0,this.items=[],this.action=void 0,t&&this.setOptions(t),this.items=[]}setField(t,e,i){e[t]=i}setOptions(t){let e;for(e in t)t[e]!==void 0&&this.setField(e,this,t[e])}},nc="ag-charts-context-menu",{Property:lO,ContextMenuRegistry:Tx,callWithContext:sD,getIconClassNames:ylt}=uf._ModuleSupport,cO="context-menu",aD=class extends uf._ModuleSupport.BaseModuleInstance{constructor(t){if(super(),this.ctx=t,this.enabled=!0,this.darkTheme=!1,this.items=["defaults"],this.pickedNode=void 0,this.showEvent=void 0,this.x=0,this.y=0,this.closingSubMenus=0,this.menuWidget=new uf._Widget.MenuWidget,this.interactionManager=t.interactionManager,this.element=t.domManager.addChild("canvas-overlay",cO),this.element.classList.add(nc),this.element.style.display="none",this.element.addEventListener("contextmenu",e=>e.preventDefault()),this.element.addEventListener("focusout",({relatedTarget:e})=>{this.closingSubMenus>0||(e==null||e instanceof Node&&!this.element.contains(e))&&this.hide()}),this.cleanup.register(()=>this.element.parentNode?.removeChild(this.element),()=>this.menuWidget.destroy(),t.eventsHub.on("dom:hidden",()=>this.hide()),this.menuWidget.addListener("close-widget",()=>this.onClose())),this.menuWidget.addClass(`${nc}__menu`),typeof MutationObserver<"u"){const e=new MutationObserver(()=>{this.element.contains(this.menuWidget.getElement())&&this.reposition()});e.observe(this.element,{childList:!0}),this.mutationObserver=e,this.cleanup.register(()=>e.disconnect())}this.ctx.contextMenuRegistry.builtins.items.download.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(s=>{tl.Logger.error("Unable to download chart",s)})},this.cleanup.register(this.ctx.eventsHub.on("context-menu:complete",e=>this.onContext(e)))}expandItemsOptions(t){const e=[];return A3(t,this.ctx.contextMenuRegistry,this.items,e),e}onContext(t){if(!this.enabled)return;t.widgetEvent.sourceEvent.preventDefault(),this.showEvent=t.widgetEvent.sourceEvent,this.x=t.x,this.y=t.y,this.pickedNode=void 0,this.pickedLegendItem=void 0,Tx.check("series-node",t)?this.pickedNode=t.context.pickedNode:Tx.check("legend-item",t)&&(this.pickedLegendItem=t.context.legendItem);const e=this.expandItemsOptions(t.showOn);e.length!==0&&this.show(t.widgetEvent,e)}show(t,e){this.interactionManager.pushState(uf._ModuleSupport.InteractionState.ContextMenu),this.element.style.display="block";const i=t.sourceEvent.pointerType==="touch"?!1:void 0;i!==void 0&&this.ctx.chartService.overrideFocusVisible(i),this.createMenu(e),this.element.appendChild(this.menuWidget.getElement()),this.menuWidget.open(t,{overrideFocusVisible:i})}hide(){this.menuWidget.close()}onClose(){this.interactionManager.popState(uf._ModuleSupport.InteractionState.ContextMenu),this.element.removeChild(this.menuWidget.getElement()),this.element.style.display="none"}onSubMenuOpen(t,e){const i=t.getBounds();t.setFocusOverride(!0),t.getElement().insertAdjacentElement("afterend",e.getElement()),e.getElement().style.position="absolute";const s=this.ctx.domManager.getBoundingClientRect(),a=t.getBoundingClientRect(),n=s.right-a.right,o=a.left-s.left,{offsetWidth:r,offsetHeight:l}=e.getElement();let c=i.y;if(s.height>l){const h=s.bottom-a.top;h<l&&(c-=l-h)}if(n>=r)e.setBounds({x:i.x+i.width,y:c});else{const h=i.x-r,u=o+h;u>=0?e.setBounds({x:h,y:c}):e.setBounds({x:h-u,y:c})}}onSubMenuClose(t,e){t.setFocusOverride(void 0),this.closingSubMenus++,e.remove(),this.closingSubMenus--}createMenu(t){const{menuWidget:e}=this;e.clear(),e.setTabIndex(-1),this.createMenuItems(e,t)}createMenuItems(t,e){for(const i of e)switch(i.type){case"separator":const s=t.addSeparator();s.classList.add(`${nc}__divider`),this.initTableCells(s);break;case"action":if(i.items.length===0){const a=new uf._Widget.MenuItemWidget;this.initButtonElement(a,i),t.addChild(a)}else{const{subMenuButton:a,subMenu:n}=t.addSubMenu();n.addClass(`${nc}__menu`),n.addListener("open-widget",()=>this.onSubMenuOpen(a,n)),n.addListener("close-widget",()=>this.onSubMenuClose(a,n)),this.initButtonElement(a,i),this.createMenuItems(n,i.items)}break;default:throw new Error("unhandled case")}}createButtonOnClick(t,e){return Tx.checkCallback("legend-item",t,e)?i=>{const s=i.sourceEvent;if(this.pickedLegendItem){const{seriesId:a,itemId:n,label:o}=this.pickedLegendItem,{chartService:r}=this.ctx,c=[r.series.find(u=>u.id===a)?.properties,r],h={type:"contextmenu",seriesId:a,itemId:n,text:o.text,event:s};sD(c,e,h),this.hide()}else tl.Logger.error("legend item not found")}:Tx.checkCallback("series-area",t,e)?()=>{const i=this.ctx.chartService,s={type:"seriesContextMenuAction",event:this.showEvent};sD(i,e,s),this.hide()}:Tx.checkCallback("series-node",t,e)?()=>{const{showEvent:i}=this,{chartService:s}=this.ctx,a=this.pickedNode,n=[a?.series.properties,s],o=a?.series.createNodeContextMenuActionEvent(i,a);o?sD(n,e,o):tl.Logger.error("series node not found"),this.hide()}:()=>{const i=this.ctx.chartService,s={type:"contextMenuEvent",event:this.showEvent};sD(i,e,s),this.hide()}}initTableCells(t){const e=(0,tl.createElement)("div"),i=(0,tl.createElement)("div"),s=(0,tl.createElement)("div");return e.classList.toggle(`${nc}__icon`,!0),i.classList.toggle(`${nc}__cell`,!0),s.classList.toggle(`${nc}__cell`,!0),e.ariaHidden="true",i.role="presentation",s.ariaHidden="true",t.append(e,i,s),{cellIcon:e,cellLabel:i,cellArrow:s}}initButtonElement(t,e){t.addClass(`${nc}__item`),t.setEnabled(e.enabled);const i=this.ctx.localeManager.t(e.label),s=`${nc}__cellpadding`,{cellIcon:a,cellLabel:n,cellArrow:o}=this.initTableCells(t.getElement());if(n.textContent=i,n.classList.add(s),e.iconUrl!=null){const c=(0,tl.createElement)("img");c.src=e.iconUrl,a.append(c),a.classList.add(s)}if(e.items.length>0){const c=(0,tl.createElement)("span",ylt("chevron-right"));o.append(c),o.classList.add(s)}const{showOn:r,action:l}=e;l!=null&&t.addListener("click",this.createButtonOnClick(r,l)),t.addListener("mousemove",()=>t.focus({preventScroll:!0})),e.items.length===0&&(t.addListener("mouseleave",()=>t.setFocusOverride(!1)),t.addListener("focus",()=>t.setFocusOverride(void 0)))}reposition(){let{x:t,y:e}=this;this.element.style.top="unset",this.element.style.bottom="unset";const i=this.ctx.domManager.getBoundingClientRect(),{offsetWidth:s,offsetHeight:a}=this.element;t=(0,tl.clamp)(0,t,i.width-s),e=(0,tl.clamp)(0,e,i.height-a),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(cO),this.ctx.domManager.removeChild("canvas-overlay",cO)}};y([lO],aD.prototype,"enabled",2),y([lO],aD.prototype,"darkTheme",2),y([lO],aD.prototype,"items",2);var xlt={type:"root",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsKey:"contextMenu",moduleFactory:t=>new aD(t),themeTemplate:{contextMenu:{enabled:!0,darkTheme:dlt._ModuleSupport.ThemeSymbols.IS_DARK_THEME}}},EIt=(_(),w(P)),df=(_(),w(P)),blt=(R(),w(st));function pf(t){return typeof t?.datum=="object"?t.datum:null}var C3=(_(),w(P)),L3=(R(),w(st)),{FormatManager:vlt,BaseProperties:Slt,Property:gf}=C3._ModuleSupport,Mlt="ag-charts-crosshair-label",zh=class extends Slt{constructor(){super(...arguments),this.enabled=!0,this.xOffset=0,this.yOffset=0,this.format=void 0,this.renderer=void 0,this._cachedFormatter=void 0}formatValue(t,e,i,s){const{formatter:a,format:n}=this,{domain:o,boundSeries:r}=s;let l;if(a!=null){const c=s.type==="number"?s.fractionDigits:void 0,h=s.type==="date"?s.unit:void 0,u=s.type==="date"?s.step:void 0;l=t(a,{value:i,domain:o,fractionDigits:c,unit:h,step:u,boundSeries:r})}if(n!=null){let c=this._cachedFormatter;(c==null||c.type!==e||c.format!==n)&&(c={type:e,format:n,formatter:vlt.getFormatter(e,n)},this._cachedFormatter=c),l??(l=c.formatter?.(i))}return l!=null?String(l):void 0}};y([gf],zh.prototype,"enabled",2),y([gf],zh.prototype,"xOffset",2),y([gf],zh.prototype,"yOffset",2),y([gf],zh.prototype,"formatter",2),y([gf],zh.prototype,"format",2),y([gf],zh.prototype,"renderer",2);var Dlt=class extends zh{constructor(t,e,i){super(),this.domManager=t,this.id=(0,L3.createId)(this),this.element=t.addChild("canvas-overlay",`crosshair-label-${this.id}`),this.element.classList.add(Mlt),(0,L3.setAttribute)(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,s=t.y+this.yOffset;e.style.top=`${Math.round(s)}px`,e.style.left=`${Math.round(i)}px`,this.toggle(!0)}setLabelHtml({html:t,styles:e}){if(t!==void 0&&(this.element.innerHTML=t),e!==void 0){const i=this.element.children[0]??this.element;Object.assign(i.style,e)}}getBBox(){const{element:t}=this;return new C3._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{html:t,styles:{}};e=e??{};const{text:i=e.text??"",color:s=e.color,backgroundColor:a=e.backgroundColor,opacity:n=e.opacity??1}=t,o={opacity:n,"background-color":a?.toLowerCase(),color:s};return{html:`<div class="ag-charts-crosshair-label-content">
<span>${i}</span>
</div>`,styles:o}}},{Group:klt,TranslatableGroup:Ilt,Line:Alt,BBox:w3,InteractionState:nD,Property:Fh,ZIndexMap:T3,ChartAxisDirection:N3}=df._ModuleSupport,oc=class extends df._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.id=(0,blt.createId)(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 zh,this.seriesRect=new w3(0,0,0,0),this.bounds=new w3(0,0,0,0),this.crosshairGroup=new Ilt({name:"crosshairs",zIndex:T3.SERIES_CROSSHAIR}),this.lineGroup=this.crosshairGroup.appendChild(new klt({name:`${this.id}-crosshair-lines`,zIndex:T3.SERIES_CROSSHAIR})),this.lineGroupSelection=df._ModuleSupport.Selection.select(this.lineGroup,Alt,!1),this.activeHighlight=void 0,this.axisCtx=t.parent,this.labels={},this.hideCrosshairs(),t.domManager.addEventListener("focusin",({target:i})=>{const s=i instanceof HTMLElement&&t.domManager.contains(i,"series-area");this.crosshairGroup.visible&&!s&&(this.hideCrosshairs(),this.ctx.updateService.update(df._ModuleSupport.ChartUpdateType.PERFORM_LAYOUT))});const{seriesDragInterpreter:e}=t.widgets;this.cleanup.register(t.scene.attachNode(this.crosshairGroup),t.widgets.seriesWidget.addListener("mousemove",i=>this.onMouseHoverLike(i)),t.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseOut()),t.eventsHub.on("series:focus-change",()=>this.onKeyPress()),t.eventsHub.on("zoom:pan-start",()=>this.onMouseOut()),t.eventsHub.on("zoom:change",()=>this.onMouseOut()),t.eventsHub.on("highlight:change",i=>this.onHighlightChange(i)),t.eventsHub.on("layout:complete",i=>this.layout(i)),()=>Object.values(this.labels).forEach(i=>i.destroy())),e&&this.cleanup.register(e.events.on("drag-move",i=>this.onMouseHoverLike(i)),e.events.on("click",i=>this.onClick(i)))}layout({series:{rect:t,visible:e},axes:i}){if(!e||!i||!this.enabled)return;this.seriesRect=t;const{position:s="left",axisId:a}=this.axisCtx,n=i.find(c=>c.id===a);if(!n)return;this.axisLayout=n,this.bounds=t.clone().grow(n.gridPadding+n.seriesAreaPadding,s);const{crosshairGroup:o,bounds:r}=this;o.translationX=Math.round(r.x),o.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,void 0,e=>e)}updateLabels(t){const{labels:e,ctx:i}=this;for(const s of t)this.label.enabled&&(e[s]??(e[s]=new Dlt(i.domManager,s,this.axisCtx.axisId))),e[s]&&this.updateLabel(e[s])}updateLabel(t){const{enabled:e,xOffset:i,yOffset:s,format:a,renderer:n}=this.label;t.enabled=e,t.xOffset=i,t.yOffset=s,t.format=a,t.renderer=n}updateLines(){const{lineGroupSelection:t,bounds:e,stroke:i,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:o,axisLayout:r}=this;if(!r)return;const l=this.isVertical();t.each(c=>{c.stroke=i,c.strokeWidth=s,c.strokeOpacity=a,c.lineDash=n,c.lineDashOffset=o,c.y1=0,c.y2=l?e.height:0,c.x1=0,c.x2=l?0:e.width})}isVertical(){return this.axisCtx.direction===N3.X}isHover(t){return t.type==="mousemove"||t.type==="click"||t.device==="touch"&&this.ctx.chartService.touch.dragAction==="hover"}formatValue(t){return this.axisCtx.formatScaleValue(t,"crosshair",this.label)}onClick(t){t.device==="touch"&&this.onMouseHoverLike(t)}onMouseHoverLike(t){if(!this.enabled||this.snap)return;const e=this.isHover(t)?nD.Clickable:nD.AnnotationsMoveable;this.ctx.interactionManager.isState(e)&&(this.updatePositions(this.getData(t)),this.crosshairGroup.visible=!0,this.ctx.updateService.update(df._ModuleSupport.ChartUpdateType.SCENE_RENDER))}onMouseOut(){this.ctx.interactionManager.isState(nD.Clickable)&&(this.hideCrosshairs(),this.ctx.updateService.update(df._ModuleSupport.ChartUpdateType.SCENE_RENDER))}onKeyPress(){this.enabled&&!this.snap&&this.ctx.interactionManager.isState(nD.Default)&&this.hideCrosshairs()}onHighlightChange(t){if(!this.enabled)return;const{crosshairGroup:e,axisCtx:i}=this,{datum:s,series:a}=t.currentHighlight??{},n=s&&(a?.axes.x?.id===i.axisId||a?.axes.y?.id===i.axisId);if(this.activeHighlight=n?t.currentHighlight:void 0,!this.activeHighlight)this.hideCrosshairs();else if(this.snap){const o=this.getActiveHighlightData(this.activeHighlight);this.updatePositions(o),e.visible=!0}}isInRange(t){return this.axisCtx.inRange(t)}updatePositions(t){const{seriesRect:e,lineGroupSelection:i}=this;i.each((s,a)=>{const n=t[a];if(!n){s.visible=!1,this.hideLabel(a);return}s.visible=!0;const{value:o,position:r}=n;let l=0,c=0;this.isVertical()?(l=r,s.x=Math.round(l)):(c=r,s.y=Math.round(c)),this.label.enabled?this.showLabel(l+e.x,c+e.y,o,a):this.hideLabel(a)})}getData(t){const{axisCtx:e}=this,i="pointer",{xKey:s="",yKey:a=""}=this.activeHighlight??{},{currentX:n,currentY:o}=t,r=pf(this.activeHighlight),l=this.isVertical(),c=l?n:o;let h=r?.[l?s:a]??"";return e.continuous&&(h=e.scaleInvert(c)),{[i]:{position:c,value:h}}}getActiveHighlightData(t){const{axisCtx:e}=this,{series:i,xKey:s="",aggregatedValue:a,cumulativeValue:n,midPoint:o}=t,r=pf(t),l=i.getKeyProperties(e.direction),c=(e.scale.bandwidth??0)/2,h=i.axes[e.direction]?.id===e.axisId,u=l.indexOf("yKey")>-1&&h,d=l.indexOf("xKey")>-1&&h,p=a??n;if(u&&p!==void 0){const f=e.scale.convert(p)+c;return this.isInRange(f)?{yKey:{value:p,position:f}}:{}}if(d){const f=(this.isVertical()?o?.x:o?.y)??0,x=e.continuous?e.scaleInvert(f):r?.[s];return this.isInRange(f)?{xKey:{value:x,position:f}}:{}}const g={};return l.forEach(f=>{const x=i.properties[f],m=r?.[x],b=e.scale.convert(m)+c;this.isInRange(b)&&(g[f]={value:m,position:b})}),g}getLabelHtml(t,e){const i=this.axisLayout?.label?.fractionDigits??0,s={text:this.formatValue(t)};return this.label.renderer?e.toLabelHtml(this.label.renderer({value:t,fractionDigits:i}),s):e.toLabelHtml(s)}showLabel(t,e,i,s){if(!this.axisLayout)return;const{bounds:a}=this,n=this.labels[s],o=this.getLabelHtml(i,n);n.setLabelHtml(o);const{width:r,height:l}=n.getBBox(),c=this.axisCtx.position;let h=this.axisLayout.label.spacing+this.axisLayout.tickSize;this.axisCtx.direction===N3.X?(h-=4,n.show({x:t-r/2,y:c==="bottom"?a.y+a.height+h:a.y-l-h})):(h-=8,n.show({x:c==="right"?a.x+a.width+h:a.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)}};y([Fh],oc.prototype,"enabled",2),y([Fh],oc.prototype,"stroke",2),y([Fh],oc.prototype,"lineDash",2),y([Fh],oc.prototype,"lineDashOffset",2),y([Fh],oc.prototype,"strokeWidth",2),y([Fh],oc.prototype,"strokeOpacity",2),y([Fh],oc.prototype,"snap",2),y([Fh],oc.prototype,"label",2);var Clt={type:"axis-option",optionsKey:"crosshair",packageType:"enterprise",chartTypes:["cartesian"],axisTypes:["category","time","unit-time","ordinal-time","number","log"],moduleFactory:t=>new oc(t),themeTemplate:{crosshair:{snap:!0,stroke:{$ref:"subtleTextColor"},strokeWidth:1,strokeOpacity:1,lineDash:[5,6],lineDashOffset:0,label:{enabled:!0}}}},O3=(_(),w(P)),{ActionOnSet:Nx,Property:P3}=O3._ModuleSupport,ff=class extends O3._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())}};y([Nx({newValue(t){this.updateCallback(t,this.getData)}}),P3],ff.prototype,"enabled",2),y([Nx({newValue(t){this.updateCallback(this.enabled,t)}}),P3],ff.prototype,"getData",2),y([Nx({newValue(t){this.dataService.requestThrottle=t}})],ff.prototype,"requestThrottle",2),y([Nx({newValue(t){this.dataService.dispatchThrottle=t}})],ff.prototype,"updateThrottle",2),y([Nx({newValue(t){this.dataService.dispatchOnlyLatest=!t}})],ff.prototype,"updateDuringInteraction",2);var Llt={type:"root",optionsKey:"dataSource",packageType:"enterprise",chartTypes:["cartesian","hierarchy","polar","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new ff(t),themeTemplate:{dataSource:{enabled:!1}}},wlt=(_(),w(P)),Ox=(_(),w(P)),Ma=(R(),w(st)),Px=(_(),w(P)),{nearestSquared:Tlt,nearestSquaredInContainer:Nlt,partialAssign:Olt,mergeDefaults:_3,BBox:Vh}=Px._ModuleSupport,Plt=class{constructor(t){this.components=t,this.union=Vh.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}},_lt=class extends Px._ModuleSupport.Group{constructor(){super(),this.capLength=NaN,this._datum=void 0,this.whiskerPath=new Px._ModuleSupport.Path,this.capsPath=new Px._ModuleSupport.Path,this.bboxes=new Plt([]),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:s}=t,{lengthRatioMultiplier:a,lengthMax:n}=e,o=s??i*a;return Math.min(o,n)}getItemStylerParams(t,e,i){const{datum:s}=this;if(s==null||t.itemStyler==null)return;const{xLowerKey:a,xUpperKey:n,yLowerKey:o,yUpperKey:r}=t;return{...e,datum:s.datum,seriesId:s.series.id,xKey:s.xKey,yKey:s.yKey,xLowerKey:a,xUpperKey:n,yLowerKey:o,yUpperKey:r,highlighted:i}}formatStyles(t,e,i,s){let{cap:a,...n}=t;const o=this.getItemStylerParams(e,t,s);if(o!=null&&e.itemStyler!=null){const r=i.callWithContext(e.itemStyler,o);n=_3(r,n),a=_3(r?.cap,r,a)}return{whiskerStyle:n,capsStyle:a}}applyStyling(t,e){Olt(["visible","stroke","strokeWidth","strokeOpacity","lineDash","lineDashOffset"],t,e)}update(t,e,i,s){if(this.datum===void 0)return;const{whiskerStyle:a,capsStyle:n}=this.formatStyles(t,e,i,s),{xBar:o,yBar:r,capDefaults:l}=this.datum,c=this.whiskerPath;this.applyStyling(c,a),c.path.clear(!0),r!==void 0&&(c.path.moveTo(r.lowerPoint.x,r.lowerPoint.y),c.path.lineTo(r.upperPoint.x,r.upperPoint.y)),o!==void 0&&(c.path.moveTo(o.lowerPoint.x,o.lowerPoint.y),c.path.lineTo(o.upperPoint.x,o.upperPoint.y)),c.path.closePath(),this.capLength=this.calculateCapLength(n??{},l);const h=this.capLength/2,u=this.capsPath;this.applyStyling(u,n),u.path.clear(!0),r!==void 0&&(u.path.moveTo(r.lowerPoint.x-h,r.lowerPoint.y),u.path.lineTo(r.lowerPoint.x+h,r.lowerPoint.y),u.path.moveTo(r.upperPoint.x-h,r.upperPoint.y),u.path.lineTo(r.upperPoint.x+h,r.upperPoint.y)),o!==void 0&&(u.path.moveTo(o.lowerPoint.x,o.lowerPoint.y-h),u.path.lineTo(o.lowerPoint.x,o.lowerPoint.y+h),u.path.moveTo(o.upperPoint.x,o.upperPoint.y-h),u.path.lineTo(o.upperPoint.x,o.upperPoint.y+h)),u.path.closePath()}updateBBoxes(){const{capLength:t,whiskerPath:e,capsPath:i}=this,{yBar:s,xBar:a}=this.datum??{},n=t/2,o=[];if(s!==void 0){const r=s.lowerPoint.y-s.upperPoint.y;o.push(new Vh(s.lowerPoint.x,s.upperPoint.y,e.strokeWidth,r),new Vh(s.lowerPoint.x-n,s.lowerPoint.y,t,i.strokeWidth),new Vh(s.upperPoint.x-n,s.upperPoint.y,t,i.strokeWidth))}if(a!==void 0){const r=a.upperPoint.x-a.lowerPoint.x;o.push(new Vh(a.lowerPoint.x,a.upperPoint.y,r,e.strokeWidth),new Vh(a.lowerPoint.x,a.lowerPoint.y-n,i.strokeWidth,t),new Vh(a.upperPoint.x,a.upperPoint.y-n,i.strokeWidth,t))}this.bboxes.components=o,this.bboxes.union=Vh.merge(o)}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:s}=this;if(s.union.distanceSquared(t,e)>i)return{nearest:void 0,distanceSquared:1/0};const{distanceSquared:a}=Tlt(t,e,s.components);return{nearest:this,distanceSquared:a}}},Elt=class extends Px._ModuleSupport.Group{nearestSquared(t,e){const{nearest:i,distanceSquared:s}=Nlt(t,e,{children:this.children()});if(i!==void 0&&!isNaN(s))return{datum:i.datum,distanceSquared:s}}},Rlt=(_(),w(P)),{BaseProperties:E3,Property:Je}=Rlt._ModuleSupport,rc=class extends E3{};y([Je],rc.prototype,"visible",2),y([Je],rc.prototype,"stroke",2),y([Je],rc.prototype,"strokeWidth",2),y([Je],rc.prototype,"strokeOpacity",2),y([Je],rc.prototype,"lineDash",2),y([Je],rc.prototype,"lineDashOffset",2),y([Je],rc.prototype,"length",2),y([Je],rc.prototype,"lengthRatio",2);var Hs=class extends E3{constructor(){super(...arguments),this.visible=!0,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.cap=new rc}};y([Je],Hs.prototype,"yLowerKey",2),y([Je],Hs.prototype,"yLowerName",2),y([Je],Hs.prototype,"yUpperKey",2),y([Je],Hs.prototype,"yUpperName",2),y([Je],Hs.prototype,"xLowerKey",2),y([Je],Hs.prototype,"xLowerName",2),y([Je],Hs.prototype,"xUpperKey",2),y([Je],Hs.prototype,"xUpperName",2),y([Je],Hs.prototype,"visible",2),y([Je],Hs.prototype,"stroke",2),y([Je],Hs.prototype,"strokeWidth",2),y([Je],Hs.prototype,"strokeOpacity",2),y([Je],Hs.prototype,"lineDash",2),y([Je],Hs.prototype,"lineDashOffset",2),y([Je],Hs.prototype,"itemStyler",2),y([Je],Hs.prototype,"cap",2);var{fixNumericExtent:Blt,groupAccumulativeValueProperty:zlt,mergeDefaults:Flt,valueProperty:oD,ChartAxisDirection:hO}=Ox._ModuleSupport;function Vlt(t){for(const e of Ox.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: ${Ox.AgErrorBarSupportedSeriesTypes.join(", ")}`)}var Glt=class vb extends Ox._ModuleSupport.BaseModuleInstance{constructor(e){super(),this.properties=new Hs;const i=Vlt(e),{annotationGroup:s,annotationSelections:a}=i;this.cartesianSeries=i,this.groupNode=new Elt({name:`${s.id}-errorBars`}),s.appendChild(this.groupNode),this.selection=Ox._ModuleSupport.Selection.select(this.groupNode,()=>this.errorBarFactory()),a.add(this.selection),i.addEventListener("seriesVisibilityChange",n=>this.onToggleSeriesItem(n)),this.cleanup.register(i.events.on("data-processed",n=>this.onDataProcessed(n)),i.events.on("data-update",n=>this.onDataUpdate(n)),e.eventsHub.on("highlight:change",n=>this.onHighlightChange(n)),()=>s.removeChild(this.groupNode),()=>a.delete(this.selection))}hasErrorBars(){const{xLowerKey:e,xUpperKey:i,yLowerKey:s,yUpperKey:a}=this.properties;return(0,Ma.isDefined)(e)&&(0,Ma.isDefined)(i)||(0,Ma.isDefined)(s)&&(0,Ma.isDefined)(a)}isStacked(){const e=this.cartesianSeries.seriesGrouping?.stackCount;return e==null?!1:e>0}getUnstackPropertyDefinition(e){const i=[],{xLowerKey:s,xUpperKey:a,yLowerKey:n,yUpperKey:o,xErrorsID:r,yErrorsID:l}=this.getMaybeFlippedKeys(),{xScaleType:c,yScaleType:h}=e;return n!=null&&o!=null&&i.push(oD(n,h,{id:`${l}-lower`}),oD(o,h,{id:`${l}-upper`})),s!=null&&a!=null&&i.push(oD(s,c,{id:`${r}-lower`}),oD(a,c,{id:`${r}-upper`})),i}getStackPropertyDefinition(e){const i=[],{cartesianSeries:s}=this,{xLowerKey:a,xUpperKey:n,yLowerKey:o,yUpperKey:r,xErrorsID:l,yErrorsID:c}=this.getMaybeFlippedKeys(),{xScaleType:h,yScaleType:u}=e,d=s.seriesGrouping?.groupIndex??s.id,p={invalidValue:null,missingValue:0,separateNegative:!0,...s.visible?{}:{forceValue:0}},g=(x,m,b,v)=>zlt(x,"normal","current",{id:`${m}-${b}`,groupId:`errorGroup-${d}-${b}`,...p},v),f=(x,m,b,v)=>{i.push(...g(x,b,"lower",v),...g(m,b,"upper",v))};return o!=null&&r!=null&&f(o,r,c,u),a!=null&&n!=null&&f(a,n,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:s,xErrorsID:a,yLowerKey:n,yUpperKey:o,yErrorsID:r}=this.getMaybeFlippedKeys();if(e===hO.X?(0,Ma.isDefined)(i)&&(0,Ma.isDefined)(s):(0,Ma.isDefined)(n)&&(0,Ma.isDefined)(o)){const{dataModel:c,processedData:h,cartesianSeries:u}=this;if(c!=null&&h!=null){const d={x:a,y:r}[e],p=c.getDomain(u,`${d}-lower`,"value",h),g=c.getDomain(u,`${d}-upper`,"value",h),f=[Math.min(...p,...g),Math.max(...p,...g)];return Blt(f)}}return[]}onDataUpdate(e){this.dataModel=e.dataModel,this.processedData=e.processedData,(0,Ma.isDefined)(e.dataModel)&&(0,Ma.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[hO.X]?.scale,s=this.cartesianSeries.axes[hO.Y]?.scale;if(!(!i||!s||!e))for(let a=0;a<e.length;a++){const{midPoint:n,xLower:o,xUpper:r,yLower:l,yUpper:c}=this.getDatum(e,a);if(n!=null){let h,u;(0,Ma.isDefined)(o)&&(0,Ma.isDefined)(r)&&(h={lowerPoint:{x:this.convert(i,o),y:n.y},upperPoint:{x:this.convert(i,r),y:n.y}}),(0,Ma.isDefined)(l)&&(0,Ma.isDefined)(c)&&(u={lowerPoint:{x:n.x,y:this.convert(s,l)},upperPoint:{x:n.x,y:this.convert(s,c)}}),e[a].xBar=h,e[a].yBar=u}}}getMaybeFlippedKeys(){let{xLowerKey:e,xUpperKey:i,yLowerKey:s,yUpperKey:a}=this.properties,[n,o]=["xValue-errors","yValue-errors"];return this.cartesianSeries.shouldFlipXY()&&([e,s]=[s,e],[i,a]=[a,i],[n,o]=[o,n]),{xLowerKey:e,xUpperKey:i,xErrorsID:n,yLowerKey:s,yUpperKey:a,yErrorsID:o}}static getDatumKey(e,i,s){if(i==null)return;const n=pf(e)?.[i];if(n!=null){if(typeof n!="number"){Ma.Logger.warnOnce(`Found [${i}] error value of type ${typeof n}. Expected number type`);return}return n+s}}getDatum(e,i){const{xLowerKey:s,xUpperKey:a,yLowerKey:n,yUpperKey:o}=this.getMaybeFlippedKeys(),r=e[i],l=r.cumulativeValue==null||!this.isStacked()?0:r.cumulativeValue-r.yValue,[c,h]=this.cartesianSeries.shouldFlipXY()?[l,0]:[0,l];return{midPoint:r.midPoint,xLower:vb.getDatumKey(r,s,c),xUpper:vb.getDatumKey(r,a,c),yLower:vb.getDatumKey(r,n,h),yUpper:vb.getDatumKey(r,o,h)}}convert(e,i){const s=(e.bandwidth??0)/2;return e.convert(i)+s}update(){const e=this.getNodeData();e!=null&&(this.selection.update(e),this.selection.each((i,s,a)=>this.updateNode(i,s,a)))}updateNode(e,i,s){e.datum=i,e.update(this.getDefaultStyle(),this.properties,this.cartesianSeries,!1),e.updateBBoxes()}pickNodeExact(e){const{x:i,y:s}=e,a=this.groupNode.pickNode(i,s);if(a!=null)return{datum:a.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:s,yUpperKey:a,xLowerName:n=e,xUpperName:o=i,yLowerName:r=s,yUpperName:l=a}=this.properties;return{xLowerKey:e,xLowerName:n,xUpperKey:i,xUpperName:o,yLowerKey:s,yLowerName:r,yUpperKey:a,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:Flt(this.properties.cap,e)}}getDefaultStyle(){return this.makeStyle(this.getWhiskerProperties())}getHighlightStyle(){return this.makeStyle(this.getWhiskerProperties())}restyleHighlightChange(e,i,s){const a=this.getNodeData();if(a!=null){for(let n=0;n<a.length;n++)if(e===a[n]){this.selection.at(n)?.update(i,this.properties,this.cartesianSeries,s);break}}}onHighlightChange(e){const{previousHighlight:i,currentHighlight:s}=e;s?.series===this.cartesianSeries&&this.restyleHighlightChange(s,this.getHighlightStyle(),!0),i?.series===this.cartesianSeries&&this.restyleHighlightChange(i,this.getDefaultStyle(),!1),this.groupNode.opacity=this.cartesianSeries.getOpacity()}errorBarFactory(){return new _lt}getWhiskerProperties(){const{stroke:e,strokeWidth:i,visible:s,strokeOpacity:a,lineDash:n,lineDashOffset:o}=this.properties;return{stroke:e,strokeWidth:i,visible:s,strokeOpacity:a,lineDash:n,lineDashOffset:o}}},RIt=(_(),w(P)),jlt={series:{errorBar:{visible:!0,stroke:{$ref:"foregroundColor"},strokeWidth:1,strokeOpacity:1,cap:{length:void 0,lengthRatio:void 0}}}},Wlt={type:"series-option",identifier:"error-bars",optionsKey:"errorBar",packageType:"enterprise",chartTypes:["cartesian"],seriesTypes:wlt.AgErrorBarSupportedSeriesTypes,moduleFactory:t=>new Glt(t),themeTemplate:jlt},rD=(_(),w(P)),{ZIndexMap:Hlt,ActionOnSet:$lt,Property:uO,ProxyPropertyOnWrite:R3}=rD._ModuleSupport,lD=class extends rD._ModuleSupport.Background{constructor(){super(...arguments),this.image=new Jr,this.fill="transparent",this.fillOpacity=void 0}createNode(){return new rD._ModuleSupport.Group({name:"foreground",zIndex:Hlt.FOREGROUND})}onLayoutComplete(t){super.onLayoutComplete(t);const{width:e,height:i}=t.chart;let s={x:0,y:0,width:e,height:i};this.image&&(s=this.image.performLayout(e,i)),this.text&&this.updateTextNode(s)}onImageLoad(){this.ctx.updateService.update(rD._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(),s=10;e.x=t.x+t.width/2-i.width/2,e.y=t.y+t.height+s}};y([uO,$lt({newValue(t){this.node.appendChild(t.node),t.onLoad=()=>this.onImageLoad()},oldValue(t){this.node.removeChild(t.node),t.onLoad=void 0}})],lD.prototype,"image",2),y([uO,R3("rectNode","fill")],lD.prototype,"fill",2),y([uO,R3("rectNode","fillOpacity")],lD.prototype,"fillOpacity",2);var Ult={type:"root",optionsKey:"foreground",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new lD(t)},BIt=(_(),w(P)),dO=(_(),w(P)),cD=(R(),w(st)),B3=(_(),w(P)),z3=(R(),w(st)),Klt=(_(),w(P)),{TranslatableGroup:Ylt,SceneChangeDetection:F3}=Klt._ModuleSupport,pO=class extends Ylt{constructor(){super(...arguments),this.inset=0,this.cornerRadius=0}applyClip(t,e){const{cornerRadius:i,inset:s}=this,{x:a,y:n,width:o,height:r}=e,l=new Path2D;l.roundRect(a+s,n+s,o-2*s,r-2*s,i),t.clip(l)}};y([F3()],pO.prototype,"inset",2),y([F3()],pO.prototype,"cornerRadius",2);var{Property:gO,ZIndexMap:Kd,ActionOnSet:V3,CategoryAxis:Zlt,TextUtils:Xlt,Padding:qlt,Group:Yd,BBox:G3,ProxyProperty:j3}=B3._ModuleSupport,fO=class{constructor(){this.top=0,this.bottom=0}};y([gO],fO.prototype,"top",2),y([gO],fO.prototype,"bottom",2);var mf=class extends B3._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.padding=new fO,this.root=new Yd({name:"root"}),this.seriesRoot=this.root.appendChild(new pO({name:"Series-root",zIndex:Kd.SERIES_LAYER,renderToOffscreenCanvas:!0})),this.axisGridGroup=this.root.appendChild(new Yd({name:"Axes-Grids",zIndex:Kd.AXIS_GRID})),this.axisGroup=this.root.appendChild(new Yd({name:"Axes-Grids",zIndex:Kd.AXIS_GRID})),this.axisLabelGroup=this.root.appendChild(new Yd({name:"Axes-Labels",zIndex:Kd.SERIES_LABEL})),this.axisCrosslineRangeGroup=this.root.appendChild(new Yd({name:"Axes-Crosslines-Range",zIndex:Kd.SERIES_CROSSLINE_RANGE})),this.axisCrosslineLineGroup=this.root.appendChild(new Yd({name:"Axes-Crosslines-Line",zIndex:Kd.SERIES_CROSSLINE_LINE})),this.axisCrosslineLabelGroup=this.root.appendChild(new Yd({name:"Axes-Crosslines-Label",zIndex:Kd.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(s=>!t.includes(s))??[];this.destroySeries(i);for(const s of t){if(e?.includes(s))continue;s.attachSeries(this.seriesRoot,this.seriesRoot,void 0);const a=this;s.chart={get mode(){return"standalone"},get isMiniChart(){return!0},get seriesRect(){return a.seriesRect}},s.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 s=t[i];if(!s){z3.Logger.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);return}const a=e.getKeys(i),n=this.findMatchingAxis(s,a);if(!n){z3.Logger.warnOnce(`no matching axis for direction [${i}] and keys [${a}]; check series and axes configuration.`);return}e.axes[i]=n})})}findMatchingAxis(t,e){for(const i of t){if(!i.keys.length)return i;if(e){for(const s of e)if(i.keys.includes(s))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 qlt;return this.enabled&&this.axes.forEach(({position:e,thickness:i,line:s,label:a})=>{if(e==null)return;let n;i?n=i:n=(s.enabled?s.width:0)+(a.enabled?Xlt.getLineHeight(a.fontSize??0)+a.spacing:0),t[e]=Math.ceil(n)}),t}async layout(t,e){const{padding:i}=this,s=this.seriesRect!=null,a=new G3(0,0,t,e-(i.top+i.bottom));this.seriesRect=a,this.seriesRoot.translationY=i.top,this.seriesRoot.setClipRectCanvasSpace(new G3(0,-i.top,t,e)),this.axes.forEach(n=>{const{position:o="left"}=n;switch(o){case"top":case"bottom":n.range=[0,a.width],n.gridLength=a.height;break;case"right":case"left":{const r=n instanceof Zlt;n.range=r?[0,a.height]:[a.height,0],n.gridLength=a.width;break}}n.gridPadding=0,n.translation.x=0,n.translation.y=0,o==="right"?n.translation.x=t:o==="bottom"&&(n.translation.y=e),s||n.resetAnimation("initial"),n.calculateLayout(),n.update()}),await Promise.all(this.series.map(n=>n.update({seriesRect:a})))}};y([gO],mf.prototype,"enabled",2),y([j3(["seriesRoot","inset"])],mf.prototype,"inset",2),y([j3(["seriesRoot","cornerRadius"])],mf.prototype,"cornerRadius",2),y([V3({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 s of e)t.includes(s)||(s.detachAxis(i),s.destroy());for(const s of t)e?.includes(s)||s.attachAxis(i)}})],mf.prototype,"axes",2),y([V3({changeValue(t,e){this.onSeriesChange(t,e)}})],mf.prototype,"series",2);var Qlt=(_(),w(P)),Jlt=(R(),w(st)),{SliderWidget:W3}=Qlt._ModuleSupport,tct=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,s]of["min","pan","max"].entries()){const a=this.sliders[i];a.step=W3.STEP_HUNDRETH,a.keyboardStep=W3.STEP_ONE,a.orientation="horizontal",a.setPreventsDefault(!1),a.addListener("drag-start",n=>this.onDragStart(i,n,s)),a.addListener("drag-move",n=>this.onDrag(a,n,s)),a.addListener("drag-end",()=>this.updateSliderRatios()),a.addListener("contextmenu",n=>this.onContextMenu(a,n))}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(){let{_min:t,_max:e}=this;t=Math.round(t*100)/100,e=Math.round(e*100)/100;const 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 s=this.sliders[t],a=this.toolbar.cssLeft(),n=s.cssLeft();this.dragStartX=a+n+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,e){const{offsetX:i,offsetY:s}=e,{x:a,y:n}=this.toolbar.getBounds(),{x:o,y:r}=t.getBounds(),l=i+a+o,c=s+n+r;this.ctx.contextMenuRegistry.dispatchContext("always",{widgetEvent:e,canvasX:l,canvasY:c},void 0)}onPanSliderChange(){const t=this.sliders[1].getValueRatio(),e=this._max-this._min;this._min=(0,Jlt.clamp)(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()}},H3=(_(),w(P)),{Property:hD,SceneChangeDetection:uD,BBox:ect,ExtendedPath2D:ict}=H3._ModuleSupport,Gh=class extends H3._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 ict}setCenter(t,e){this.dirtyPath=!0,(this.centerX!==t||this.centerY!==e)&&(this.centerX=t,this.centerY=e,this.markDirty("center"))}static align(t,e,i,s,a,n,o,r,l){const c=t.align(i+a*o)+l,h=c+t.align(i+a*o,a*(r-o))-2*l,u=t.align(s+n/2);t.setCenter(c,u),e.setCenter(h,u)}computeBBox(){const{centerX:t,centerY:e,width:i,height:s}=this,a=t-i/2,n=e-s/2;return new ect(a,n,i,s)}isPointInPath(t,e){return this.getBBox().containsPoint(t,e)}updatePath(){const{centerX:t,centerY:e,path:i,gripPath:s,strokeWidth:a,cornerRadius:n,grip:o}=this,r=a/2,l=this.layerManager?.canvas?.pixelRatio??1;i.clear(),s.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),n);const u=3;if(o)for(let d=-.5;d<=.5;d+=1)for(let p=-1;p<=1;p+=1)s.arc(t+d*u,e+p*u,1,0,2*Math.PI),s.closePath()}renderFill(t,e){const{stroke:i}=this;super.renderFill(t,e),t.fillStyle=typeof i=="string"?i:"black",t.fill(this.gripPath.getPath2D())}};Gh.className="RangeHandle",y([hD,uD()],Gh.prototype,"width",2),y([hD,uD()],Gh.prototype,"height",2),y([hD,uD()],Gh.prototype,"cornerRadius",2),y([hD,uD()],Gh.prototype,"grip",2);var sct=(_(),w(P)),{Path:act,BBox:mO,ExtendedPath2D:nct,clippedRoundRect:oct,Property:rct,SceneChangeDetection:lct}=sct._ModuleSupport,yO=class extends act{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 nct}layout(t,e,i,s,a,n){a=isNaN(a)?this.min:a,n=isNaN(n)?this.max:n,(t!==this.x||e!==this.y||i!==this.width||this.height!==s||a!==this.min||n!==this.max)&&(this.x=t,this.y=e,this.width=i,this.height=s,this.min=a,this.max=n,this.dirtyPath=!0,this.markDirty("RangeMask.layout"))}computeBBox(){const{x:t,y:e,width:i,height:s}=this;return new mO(t,e,i,s)}computeVisibleRangeBBox(){const{x:t,y:e,width:i,height:s,min:a,max:n}=this,o=t+i*a,r=t+i*n;return new mO(o,e,r-o,s)}updatePath(){const{path:t,visiblePath:e,x:i,y:s,width:a,height:n,min:o,max:r,strokeWidth:l,cornerRadius:c}=this,h=l/2;t.clear(),e.clear();const u=this.align(i)+h,d=this.align(s)+h,p=this.align(i,a)-2*h,g=this.align(s,n)-2*h,f=this.align(i+a*o)+h,x=f+this.align(i+a*o,a*(r-o))-2*h,m={topLeft:c,topRight:c,bottomRight:c,bottomLeft:c},b=(v,M,D)=>{if(D-M<1)return;const L=new mO(M,d,D-M,g);oct(v,u,d,p,g,m,L)};b(t,u,f),b(t,x,p+u),b(e,f,x)}renderStroke(t,e){super.renderStroke(t,e),super.renderStroke(t,this.visiblePath.getPath2D())}};yO.className="RangeMask",y([rct,lct()],yO.prototype,"cornerRadius",2);var dD=(_(),w(P)),cct=class extends dD._ModuleSupport.Group{constructor(t){super({name:"rangeSelectorGroup",zIndex:dD._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 dD._ModuleSupport.TranslatableGroup({name:"navigator-background",zIndex:1})),this.append(t)}layout(t,e,i,s,a,n){this.x=t,this.y=e,this.width=i,this.height=s,this.lOffset=a,this.rOffset=n,this.background.translationX=t,this.background.translationY=e,this.markDirty("RangeSelector")}updateBackground(t,e){t!=null&&this.background.removeChild(t),e!=null&&this.background.appendChild(e),this.markDirty("RangeSelector")}computeBBox(){const{x:t,y:e,width:i,height:s,lOffset:a,rOffset:n}=this;return new dD._ModuleSupport.BBox(t-a,e,i+(a+n),s)}},{BaseModuleInstance:hct,ObserveChanges:xO,Property:pD}=dO._ModuleSupport,yf=class extends hct{constructor(t){super(),this.ctx=t,this.enabled=!1,this.mask=new yO,this.minHandle=new Gh,this.maxHandle=new Gh,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 cct([this.mask,this.minHandle,this.maxHandle]),this.cleanup.register(t.scene.attachNode(this.rangeSelector),t.eventsHub.on("locale:change",()=>this.updateZoom()),t.layoutManager.registerElement(dO._ModuleSupport.LayoutElement.Navigator,e=>this.onLayoutStart(e)),t.eventsHub.on("layout:complete",e=>this.onLayoutComplete(e)),t.eventsHub.on("zoom:change",e=>this.onZoomChange(e))),this.domProxy=new tct(t,this),this.updateGroupVisibility(),this.miniChart=new mf(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:s,height:a}=this;if(this.domProxy.updateVisibility(this.enabled),this.enabled){const{_min:n,_max:o}=this.domProxy;this.layoutNodes(e,s,i,a,n,o),this.domProxy.updateBounds({x:e,y:s,width:i,height:a})}this.x=e,this.width=i,this.miniChart?.layout(i,a).catch(n=>cD.Logger.error(n))}canDrag(){return this.enabled&&this.ctx.interactionManager.isState(dO._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:s,width:a}=this,{minRange:n}=this.domProxy;let{_min:o,_max:r}=this.domProxy;const l=(e-s)/a;if(t==="min")o=(0,cD.clamp)(0,l,r-n);else if(t==="max")r=(0,cD.clamp)(o+n,l,1);else if(t==="pan"&&i!=null){const c=r-o;o=(0,cD.clamp)(0,l-i,1-c),r=o+c}this.domProxy._min=o,this.domProxy._max=r,this.updateZoom()}onZoomChange(t){const{x:e}=t;if(!e)return;const{x:i,y:s,width:a,height:n}=this,{min:o,max:r}=e;this.domProxy.updateMinMax(o,r),this.layoutNodes(i,s,a,n,o,r)}layoutNodes(t,e,i,s,a,n){const{rangeSelector:o,mask:r,minHandle:l,maxHandle:c}=this;r.layout(t,e,i,s,a,n),o.layout(t,e,i,s,l.width/2,c.width/2),Gh.align(l,c,t,e,i,s,a,n,r.strokeWidth/2),a+(n-a)/2<.5?(l.zIndex=3,c.zIndex=4):(l.zIndex=4,c.zIndex=3),[l,this.maskVisibleRange,c].forEach((h,u)=>{const d=h.getBBox(),p={x:d.x-t,y:d.y-e,height:d.height,width:d.width};this.domProxy.updateSliderBounds(u,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)}};y([xO((t,e,i)=>{t.updateBackground(i?.root,e?.root)})],yf.prototype,"miniChart",2),y([pD,xO((t,e)=>{t.ctx.zoomManager.setNavigatorEnabled(!!e),t.updateGroupVisibility()})],yf.prototype,"enabled",2),y([pD],yf.prototype,"height",2),y([pD,xO((t,e)=>{t.mask.cornerRadius=e})],yf.prototype,"cornerRadius",2),y([pD],yf.prototype,"spacing",2);var uct=(_(),w(P)),dct=(_(),w(P)),Me=(R(),w(st)),pct=(_(),w(P)),bO=(_(),w(P)),zIt=(R(),w(st));function gct(t){return{from:t?{scalingX:1,scalingY:0}:{scalingX:0,scalingY:1},to:{scalingX:1,scalingY:1}}}function fct(t){return(e,i)=>t?{scalingCenterY:i.scaledValues.medianValue}:{scalingCenterX:i.scaledValues.medianValue}}var $3=(_(),w(P)),mct=(R(),w(st)),{ScalableGroup:yct,Rect:_x,Line:Ex,BBox:xct,Selection:U3,applyShapeFillBBox:bct}=$3._ModuleSupport,vct=class extends yct{constructor(){super(),this.append([new _x({tag:0}),new _x({tag:2}),new _x({tag:1}),new Ex({tag:3}),new Ex({tag:3}),new Ex({tag:4}),new Ex({tag:4})])}updateDatumStyles(t,e,i,s,a){const{bandwidth:n,scaledValues:{xValue:o,medianValue:r}}=t;let{minValue:l,q1Value:c,q3Value:h,maxValue:u}=t.scaledValues;(i&&!s||!i&&s)&&([u,h,c,l]=[l,c,h,u]);const d=(U,Z,X,q)=>i?{y:U,x:Z,width:q,height:X}:{x:U,y:Z,width:X,height:q},p=(U,Z,X)=>i?{y1:U,y2:Z,x:X}:{x1:U,x2:Z,y:X},g=(U,Z,X)=>i?{x1:Z,x2:X,y:U}:{x:U,y1:Z,y2:X},f=(U,Z,X,q)=>({x:U,y:Z,width:X,height:q}=d(U,Z,X,q),new xct(U,Z,X,q)),{opacity:x,fill:m,fillOpacity:b,stroke:v,strokeWidth:M,strokeOpacity:D,lineDash:L,lineDashOffset:C,cornerRadius:A,cap:T,whisker:N}=e;this.opacity=x??1;const O=U3.select(this,_x),[E]=O.selectByTag(0),[z]=O.selectByTag(2),[B]=O.selectByTag(1),F=O.selectByTag(3),V=O.selectByTag(4);N.strokeWidth>n&&(N.strokeWidth=n);const G=d(c,o,h-c,n);z.setProperties(G),E.setProperties(G),E.setProperties({cornerRadius:A});const H=Math.max(Math.round(r-M/2),c+M),$=Math.min(Math.round(r+M/2),h-M);B.setProperties(G),B.setProperties({visible:H<$,cornerRadius:A,clipBBox:f(H,o+M,$-H,Math.max(0,n-M*2))});const W=Math.floor(o+n*(1-T.lengthRatio)/2),j=Math.ceil(o+n*(1+T.lengthRatio)/2);V[0].setProperties(g(l,W,j)),V[1].setProperties(g(u,W,j)),F[0].setProperties(p(Math.round(l+N.strokeWidth/2),c,Math.floor(o+n/2))),F[1].setProperties(p(h,Math.round(u-N.strokeWidth/2),Math.floor(o+n/2))),bct(E,m,a),E.setProperties({fill:m,fillOpacity:b,strokeWidth:M*2,strokeOpacity:0}),B.setProperties({fill:v,fillOpacity:D,strokeWidth:0});for(const U of[...F,...V])U.setProperties(N);z.setProperties({stroke:v,strokeWidth:M,strokeOpacity:D,lineDash:L,lineDashOffset:C,cornerRadius:A,fillOpacity:0})}distanceSquared(t,e){const i=U3.selectByClass(this,_x,Ex);return $3._ModuleSupport.nearestSquared(t,e,i).distanceSquared}get midPoint(){const t=this.datum;return t.midPoint===void 0?(mct.Logger.error("BoxPlotGroup.datum.midPoint is undefined"),{x:NaN,y:NaN}):t.midPoint}},Sct=(_(),w(P)),{BaseProperties:K3,FillGradientDefaults:Mct,FillPatternDefaults:Dct,FillImageDefaults:kct,AbstractBarSeriesProperties:Ict,makeSeriesTooltip:Act,Property:ne,mergeDefaults:Cct}=Sct._ModuleSupport,Y3=class extends K3{constructor(){super(...arguments),this.lengthRatio=.5}};y([ne],Y3.prototype,"lengthRatio",2);var xf=class extends K3{};y([ne],xf.prototype,"stroke",2),y([ne],xf.prototype,"strokeWidth",2),y([ne],xf.prototype,"strokeOpacity",2),y([ne],xf.prototype,"lineDash",2),y([ne],xf.prototype,"lineDashOffset",2);var De=class extends Ict{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new Mct,this.fillPatternDefaults=new Dct,this.fillImageDefaults=new kct,this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.cap=new Y3,this.whisker=new xf,this.tooltip=Act()}toJson(){const{stroke:t,strokeWidth:e,strokeOpacity:i,lineDash:s,lineDashOffset:a}=this,n=super.toJson();return n.whisker=Cct(n.whisker,{stroke:t,strokeWidth:e,strokeOpacity:i,lineDash:s,lineDashOffset:a}),n}};y([ne],De.prototype,"xKey",2),y([ne],De.prototype,"minKey",2),y([ne],De.prototype,"q1Key",2),y([ne],De.prototype,"medianKey",2),y([ne],De.prototype,"q3Key",2),y([ne],De.prototype,"maxKey",2),y([ne],De.prototype,"xName",2),y([ne],De.prototype,"yName",2),y([ne],De.prototype,"minName",2),y([ne],De.prototype,"q1Name",2),y([ne],De.prototype,"medianName",2),y([ne],De.prototype,"q3Name",2),y([ne],De.prototype,"maxName",2),y([ne],De.prototype,"fill",2),y([ne],De.prototype,"fillGradientDefaults",2),y([ne],De.prototype,"fillPatternDefaults",2),y([ne],De.prototype,"fillImageDefaults",2),y([ne],De.prototype,"fillOpacity",2),y([ne],De.prototype,"stroke",2),y([ne],De.prototype,"strokeWidth",2),y([ne],De.prototype,"strokeOpacity",2),y([ne],De.prototype,"lineDash",2),y([ne],De.prototype,"lineDashOffset",2),y([ne],De.prototype,"cornerRadius",2),y([ne],De.prototype,"itemStyler",2),y([ne],De.prototype,"cap",2),y([ne],De.prototype,"whisker",2),y([ne],De.prototype,"tooltip",2);var{extractDecoratedProperties:Z3,fixNumericExtent:Lct,keyProperty:wct,mergeDefaults:vO,SeriesNodePickMode:X3,SMALLEST_KEY_INTERVAL:Tct,valueProperty:Rx,diff:Nct,animationValidation:Oct,computeBarFocusBounds:Pct,createDatumId:q3,ContinuousScale:_ct,ChartAxisDirection:Ect,motion:Q3,isGradientFill:Rct,getShapeStyle:Bx}=bO._ModuleSupport,Bct=class extends bO._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.minKey=s.properties.minKey,this.q1Key=s.properties.q1Key,this.medianKey=s.properties.medianKey,this.q3Key=s.properties.q3Key,this.maxKey=s.properties.maxKey}},gD=class extends bO._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,pickModes:[X3.NEAREST_NODE,X3.EXACT_SHAPE_MATCH],propertyKeys:{x:["xKey"],y:["medianKey","q1Key","q3Key","minKey","maxKey"]},propertyNames:{x:["xName"],y:["medianName","q1Name","q3Name","minName","maxName"]},categoryKey:"xValue",pathsPerSeries:[],hasHighlightedLabels:!0}),this.properties=new De,this.NodeEvent=Bct}async processData(t){if(!this.visible)return;const{xKey:e,minKey:i,q1Key:s,medianKey:a,q3Key:n,maxKey:o}=this.properties,r=!this.ctx.animationManager.isSkipped(),l=this.getCategoryAxis()?.scale,c=this.getValueAxis()?.scale,{isContinuousX:h,xScaleType:u,yScaleType:d}=this.getScaleInformation({xScale:l,yScale:c}),p=[];r&&this.processedData&&p.push(Nct(this.id,this.processedData)),r&&p.push(Oct());const{processedData:g}=await this.requestDataModel(t,this.data,{props:[wct(e,u,{id:"xValue"}),Rx(i,d,{id:"minValue"}),Rx(s,d,{id:"q1Value"}),Rx(a,d,{id:"medianValue"}),Rx(n,d,{id:"q3Value"}),Rx(o,d,{id:"maxValue"}),...h?[Tct]:[],...p]});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!(e&&i))return[];if(t!==this.getBarDirection()){const{index:a,def:n}=i.resolveProcessedDataDefById(this,"xValue"),o=e.domain.keys[a];return n.type==="key"&&n.valueType==="category"?o:this.padBandExtent(o)}const s=this.domainForClippedRange(t,["minValue","maxValue"],"xValue");return Lct(s)}getSeriesRange(t,e){return this.domainForVisibleRange(Ect.Y,["maxValue","minValue"],"xValue",e)}createNodeData(){const{visible:t,dataModel:e,processedData:i}=this,s=this.getCategoryAxis(),a=this.getValueAxis();if(!(e&&i&&s&&a))return;const{xKey:n,fill:o,fillOpacity:r,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d,cap:p,whisker:g}=this.properties,f=[],x=e.resolveKeysById(this,"xValue",i),m=e.resolveColumnById(this,"minValue",i),b=e.resolveColumnById(this,"q1Value",i),v=e.resolveColumnById(this,"medianValue",i),M=e.resolveColumnById(this,"q3Value",i),D=e.resolveColumnById(this,"maxValue",i),{barWidth:L,groupIndex:C}=this.updateGroupScale(s),A=_ct.is(s.scale)?L*-.5:0,{groupScale:T}=this,N=this.isVertical(),O={itemId:n,nodeData:f,labelData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible};return t&&(i.dataSources.get(this.id)??[]).forEach((z,B)=>{const F=x[B];if(F==null)return;const V=m[B],G=b[B],H=v[B],$=M[B],W=D[B];if([V,G,H,$,W].some(at=>typeof at!="number")||V>G||G>H||H>$||$>W)return;const j={xValue:Math.round(s.scale.convert(F)),minValue:Math.round(a.scale.convert(V)),q1Value:Math.round(a.scale.convert(G)),medianValue:Math.round(a.scale.convert(H)),q3Value:Math.round(a.scale.convert($)),maxValue:Math.round(a.scale.convert(W))};j.xValue+=Math.round(T.convert(String(C)))+A;const U=Math.round(L),Z=Math.abs(j.q3Value-j.q1Value),X=j.xValue+U/2,q=Math.min(j.q3Value,j.q1Value)+Z/2,tt={x:N?X:q,y:N?q:X};let J;N?J={x:tt.x-U/2,y:j.minValue,width:U,height:j.maxValue-j.minValue}:J={x:j.minValue,y:tt.y-U/2,width:j.maxValue-j.minValue,height:U},f.push({series:this,itemId:F,datum:z,datumIndex:B,xKey:n,bandwidth:U,scaledValues:j,cap:p,whisker:g,fill:o,fillOpacity:r,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d,midPoint:tt,focusRect:J})}),O}legendItemSymbol(){const{fill:t,fillOpacity:e,stroke:i,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:o,fillGradientDefaults:r,fillPatternDefaults:l,fillImageDefaults:c}=this.properties;return{marker:Bx({fill:t,fillOpacity:e,stroke:i,strokeOpacity:a,strokeWidth:s,lineDash:n,lineDashOffset:o},r,l,c)}}getLegendData(t){const{id:e,ctx:{legendManager:i},visible:s}=this,{xKey:a,yName:n,showInLegend:o,legendItemName:r}=this.properties;return!a||t!=="category"?[]:[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:e}),label:{text:r??n??e},symbol:this.legendItemSymbol(),legendItemName:r,hideInLegend:!o}]}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a}=this,{xKey:n,xName:o,yName:r,medianKey:l,medianName:c,q1Key:h,q1Name:u,q3Key:d,q3Name:p,minKey:g,minName:f,maxKey:x,maxName:m,legendItemName:b,tooltip:v}=a,M=this.getCategoryAxis(),D=this.getValueAxis();if(!i||!s||!M||!D)return;const L=s.dataSources.get(this.id)?.[t],C=i.resolveKeysById(this,"xValue",s)[t],A=i.resolveColumnById(this,"minValue",s)[t],T=i.resolveColumnById(this,"q1Value",s)[t],N=i.resolveColumnById(this,"medianValue",s)[t],O=i.resolveColumnById(this,"q3Value",s)[t],E=i.resolveColumnById(this,"maxValue",s)[t];if(C==null)return;const z=this.getItemBaseStyle(!1);Object.assign(z,this.getItemStyleOverrides(String(t),L,z,!1));const B=[{label:f,fallbackLabel:g,value:D.formatDatum(A,"tooltip",e,b,L,g)},{label:u,fallbackLabel:h,value:D.formatDatum(T,"tooltip",e,b,L,h)},{label:c,fallbackLabel:l,value:D.formatDatum(N,"tooltip",e,b,L,l)},{label:p,fallbackLabel:d,value:D.formatDatum(O,"tooltip",e,b,L,d)},{label:m,fallbackLabel:x,value:D.formatDatum(E,"tooltip",e,b,L,x)}];return this.formatTooltipWithContext(v,{heading:M.formatDatum(C,"tooltip",e,b,L,n),title:b??r,symbol:this.legendItemSymbol(),data:B},{seriesId:e,datum:L,title:r,xKey:n,xName:o,yName:r,medianKey:l,medianName:c,q1Key:h,q1Name:u,q3Key:d,q3Name:p,minKey:g,minName:f,maxKey:x,maxName:m,...z})}animateEmptyUpdateReady({datumSelection:t}){const e=this.isVertical(),{from:i,to:s}=gct(e);Q3.resetMotion([t],fct(e)),Q3.staticFromToMotion(this.id,"datums",this.ctx.animationManager,[t],i,s,{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:s,whisker:a,fillGradientDefaults:n,fillPatternDefaults:o,fillImageDefaults:r}=e,l=this.getHighlightStyle(t),c=this.getStrokeWidth(e.strokeWidth);return Bx({fill:l?.fill??e.fill,fillOpacity:l?.fillOpacity??e.fillOpacity,stroke:l?.stroke??e.stroke,strokeWidth:l?.strokeWidth??c,strokeOpacity:l?.strokeOpacity??e.strokeOpacity,lineDash:l?.lineDash??e.lineDash??[],lineDashOffset:l?.lineDashOffset??e.lineDashOffset,cornerRadius:l?.cornerRadius??i,cap:s,whisker:a,opacity:l?.opacity??1},n,o,r)}getItemStyleOverrides(t,e,i,s){const{id:a,properties:n}=this,{xKey:o,minKey:r,q1Key:l,medianKey:c,q3Key:h,maxKey:u,fillGradientDefaults:d,fillPatternDefaults:p,fillImageDefaults:g,itemStyler:f}=n;if(f==null)return;const x=this.cachedDatumCallback(q3(t,s?"highlight":"node"),()=>this.callWithContext(f,{seriesId:a,datum:e,xKey:o,minKey:r,q1Key:l,medianKey:c,q3Key:h,maxKey:u,highlighted:s,...i}));return Bx(x,d,p,g)}updateDatumNodes({datumSelection:t,isHighlight:e}){const i=this.isVertical(),s=this.getValueAxis()?.isReversed();t.each((a,n)=>{let o=this.getFormattedStyles(n,e?"highlight":"node");const r=this.getHighlightStyle(e,n?.datumIndex);o=vO(r,o);const{stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d}=o;o.whisker=vO(o.whisker,{stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d});const p=this.getShapeFillBBox();a.updateDatumStyles(n,o,i,s,p)})}updateLabelNodes(){}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e)}nodeFactory(){return new vct}getFormattedStyles(t,e){const{id:i,properties:s}=this,{xKey:a,minKey:n,q1Key:o,medianKey:r,q3Key:l,maxKey:c,itemStyler:h,cornerRadius:u,fillGradientDefaults:d,fillPatternDefaults:p,fillImageDefaults:g}=s,{stroke:f,strokeWidth:x,strokeOpacity:m,lineDash:b,lineDashOffset:v,cap:M,whisker:D}=t,L=pf(t);let C,A=1;Rct(t.fill)?C=t.fill:(C=t.fill,A=s.fillOpacity);let T=Bx({fill:C,fillOpacity:A,stroke:f,strokeWidth:x,strokeOpacity:m,lineDash:b,lineDashOffset:v,cornerRadius:u,cap:Z3(M),whisker:Z3(D)},d,p,g);if(h){const N=this.cachedDatumCallback(q3(t.datumIndex,e),()=>this.callWithContext(h,{datum:L,seriesId:i,highlighted:e==="highlight",...T,xKey:a,minKey:n,q1Key:o,medianKey:r,q3Key:l,maxKey:c}));N&&(T=Bx(vO(N,T),d,p,g))}return T}computeFocusBounds({datumIndex:t}){return Pct(this,this.contextNodeData?.nodeData[t].focusRect)}};gD.className="BoxPlotSeries",gD.type="box-plot";var zct=(_(),w(P)),ui=(R(),w(st)),{boxPlotSeriesThemeableOptionsDef:Fct,commonSeriesOptionsDefs:Vct}=zct._ModuleSupport,Gct={...Vct,...Fct,type:(0,ui.required)((0,ui.constant)("box-plot")),xKey:(0,ui.required)(ui.string),minKey:(0,ui.required)(ui.string),q1Key:(0,ui.required)(ui.string),medianKey:(0,ui.required)(ui.string),q3Key:(0,ui.required)(ui.string),maxKey:(0,ui.required)(ui.string),xName:ui.string,yName:ui.string,minName:ui.string,q1Name:ui.string,medianName:ui.string,q3Name:ui.string,maxName:ui.string,grouped:ui.boolean,legendItemName:ui.string},fD=(_(),w(P)),{ThemeConstants:{CARTESIAN_AXIS_TYPE:J3},multiSeriesHighlightStyle:jct}=fD._ModuleSupport,Wct={series:{direction:"vertical",fill:{$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isPattern:{$palette:"fill"}},{$isImage:{$palette:"fill"}}]},{$palette:"fill"},{$mix:[fD._ModuleSupport.SAFE_FILL_OPERATION,{$ref:"chartBackgroundColor"},.7]}]},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:fD._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:fD._ModuleSupport.FILL_IMAGE_DEFAULTS,strokeWidth:2,highlight:jct()},axes:{[J3.NUMBER]:{crosshair:{snap:!1}},[J3.CATEGORY]:{groupPaddingInner:.2,crosshair:{enabled:!1,snap:!1}}}},Hct={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"box-plot",moduleFactory:t=>new gD(t),defaultAxes:pct._ModuleSupport.DIRECTION_SWAP_AXES,themeTemplate:Wct,groupable:!0},t$={type:"series",name:"box-plot",chartType:"cartesian",enterprise:!0,options:Gct,create:t=>new gD(t)},$ct=(_(),w(P)),Uct=(_(),w(P)),SO=(_(),w(P)),e$=(R(),w(st)),Kct=(_(),w(P)),{findMinMax:Yct}=Kct._ModuleSupport,$s=0,Da=1,Ha=2,$a=3,In=4;function zx(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 Fx(t){return Yct(t.map(e=>Number(e)))}function mD(t,e,i){return(t.valueOf()-e)/(i-e)}function yD(t,e){return Math.min(Math.floor(t*e),e-1)*In|0}function Vx(t,e,i,s,a,n){const o=new Int32Array(n*In).fill(-1),r=new Float64Array(n*In).fill(NaN);for(let l=0;l<t.length;l+=1){const c=t[l],h=e[l],u=i[l];if(c==null||h==null||u==null)continue;const d=mD(c,s,a),p=h.valueOf(),g=u.valueOf(),f=yD(d,n),x=o[f+$s]===-1;(x||d<r[f+$s])&&(o[f+$s]=l,r[f+$s]=d),(x||d>r[f+Da])&&(o[f+Da]=l,r[f+Da]=d),(x||g<r[f+Ha])&&(o[f+Ha]=l,r[f+Ha]=g),(x||p>r[f+$a])&&(o[f+$a]=l,r[f+$a]=p)}return{indexData:o,valueData:r}}function Gx(t,e,i,{inPlace:s=!1}={}){const a=i/2|0,n=s?t:new Int32Array(a*In),o=s?e:new Float64Array(a*In);for(let r=0;r<a;r+=1){const l=r*In|0,c=l*2|0,h=c+In|0,u=t[h+$s]===-1,d=u||e[c+$s]<e[h+$s]?c:h;n[l+$s]=t[d+$s],o[l+$s]=e[d+$s];const p=u||e[c+Da]>e[h+Da]?c:h;n[l+Da]=t[p+Da],o[l+Da]=e[p+Da];const g=u||e[c+Ha]<e[h+Ha]?c:h;n[l+Ha]=t[g+Ha],o[l+Ha]=e[g+Ha];const f=u||e[c+$a]>e[h+$a]?c:h;n[l+$a]=t[f+$a],o[l+$a]=e[f+$a]}return{maxRange:a,indexData:n,valueData:o}}var Zct=1e3,i$=$s,Xct=$a,qct=Ha,s$=Da;function Qct(t,e,i,s){if(t.length<Zct)return;const[a,n]=Fx(s);let o=zx(t),{indexData:r,valueData:l}=Vx(t,e,i,a,n,o);const c=[{maxRange:o,indexData:r}];for(;o>64;)({indexData:r,valueData:l,maxRange:o}=Gx(r,l,o)),c.push({maxRange:o,indexData:r});return c.reverse(),c}var{fixNumericExtent:Jct,keyProperty:tht,createDatumId:a$,SeriesNodePickMode:n$,ChartAxisDirection:o$,SMALLEST_KEY_INTERVAL:eht,valueProperty:xD,diff:iht,animationValidation:sht,computeBarFocusBounds:aht,visibleRangeIndices:r$,ContinuousScale:nht,DiscreteTimeScale:oht,BandScale:rht,getShapeStyle:MO}=SO._ModuleSupport,lht=class extends SO._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.openKey=s.properties.openKey,this.closeKey=s.properties.closeKey,this.highKey=s.properties.highKey,this.lowKey=s.properties.lowKey}},l$=class extends SO._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,pickModes:[n$.AXIS_ALIGNED,n$.EXACT_SHAPE_MATCH],propertyKeys:{x:["xKey"],y:["lowKey","highKey","openKey","closeKey"]},propertyNames:{x:["xName"],y:["lowName","highName","openName","closeName"]},categoryKey:"xValue",pathsPerSeries:[]}),this.NodeEvent=lht,this.dataAggregationFilters=void 0}async processData(t){if(!this.visible)return;const{xKey:e,openKey:i,closeKey:s,highKey:a,lowKey:n}=this.properties,o=!this.ctx.animationManager.isSkipped(),r=this.getCategoryAxis()?.scale,l=this.getValueAxis()?.scale,{isContinuousX:c,xScaleType:h,yScaleType:u}=this.getScaleInformation({xScale:r,yScale:l}),d=[];o&&(this.processedData&&d.push(iht(this.id,this.processedData)),d.push(sht())),i&&d.push(xD(i,u,{id:"openValue",invalidValue:void 0,missingValue:void 0}));const{dataModel:p,processedData:g}=await this.requestDataModel(t,this.data,{props:[tht(e,h,{id:"xValue"}),xD(s,u,{id:"closeValue"}),xD(a,u,{id:"highValue"}),xD(n,u,{id:"lowValue"}),...c?[eht]:[],...d]});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.dataAggregationFilters=this.aggregateData(p,g),this.animationState.transition("updateData")}aggregateData(t,e){const i=this.axes[o$.X];if(i==null||!(nht.is(i.scale)||oht.is(i.scale)))return;const s=t.resolveKeysById(this,"xValue",e),a=t.resolveColumnById(this,"highValue",e),n=t.resolveColumnById(this,"lowValue",e),{index:o}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[o];return Qct(s,a,n,r)}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!(e&&i))return[];if(t!==this.getBarDirection()){const{index:a,def:n}=i.resolveProcessedDataDefById(this,"xValue"),o=e.domain.keys[a];return n.type==="key"&&n.valueType==="category"?o:this.padBandExtent(o)}const s=this.domainForClippedRange(t,["highValue","lowValue"],"xValue");return Jct(s)}getSeriesRange(t,e){return this.domainForVisibleRange(o$.Y,["highValue","lowValue"],"xValue",e)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["highValue","lowValue"],t,e,i)}createNodeData(){const{visible:t,dataModel:e,processedData:i}=this,s=this.getCategoryAxis(),a=this.getValueAxis();if(!(e&&i&&s&&a))return;const n=[],{xKey:o,highKey:r,lowKey:l}=this.properties,c=i.dataSources.get(this.id)??[],h=e.resolveKeysById(this,"xValue",i),u=e.resolveColumnById(this,"openValue",i),d=e.resolveColumnById(this,"closeValue",i),p=e.resolveColumnById(this,"highValue",i),g=e.resolveColumnById(this,"lowValue",i),{groupScale:f}=this,{barWidth:x,groupIndex:m}=this.updateGroupScale(s),b=f.convert(String(m)),v=x>=1?x:f.rawBandwidth,M=rht.is(s.scale),D={itemId:o,nodeData:n,labelData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible};if(!t)return D;const L=(B,F,V,G,H,$,W,j)=>{const U=c[B],Z=M?W/2:0,X=s.scale.convert(F)+b+Z,q=a.scale.convert(V),tt=a.scale.convert(G),J=a.scale.convert(H),at=a.scale.convert($),et=G>V,it=et?"up":"down",ct=Math.min(J,at),ht=Math.max(J,at)-ct,xt={x:X,y:ct+ht/2};n.push({series:this,itemId:it,datum:U,datumIndex:B,xKey:o,xValue:F,openValue:V,closeValue:G,highValue:H,lowValue:$,midPoint:xt,aggregatedValue:G,isRising:et,centerX:X,width:W,y:ct,height:ht,yOpen:q,yClose:tt,crisp:j})},{dataAggregationFilters:C}=this,A=s.scale,[T,N]=A.range,O=N-T,E=B=>A.convert(h[B])+b,z=C?.find(B=>B.maxRange>O);if(z==null){let[B,F]=r$(1,c.length,s.range,V=>{const G=E(V);return[G,G+v]});i.input.count<1e3&&(B=0,F=i.input.count);for(let V=B;V<F;V+=1){const G=h[V];if(G==null)continue;const H=u[V],$=d[V],W=p[V],j=g[V],U=j!=null&&j<=H&&j<=$,Z=W!=null&&W>=H&&W>=$;if(!U){e$.Logger.warnOnce(`invalid low value for key [${l}] in data element, low value cannot be higher than datum open or close values`);continue}if(!Z){e$.Logger.warnOnce(`invalid high value for key [${r}] in data element, high value cannot be lower than datum open or close values.`);continue}L(V,G,H,$,W,j,v,!0)}}else{const{maxRange:B,indexData:F}=z,[V,G]=r$(1,B,s.range,H=>{const $=H*In,W=F[$+i$],j=F[$+s$];if(W!==-1)return[E(W),E(j)+v]});for(let H=V;H<G;H+=1){const $=H*In,W=F[$+i$],j=F[$+s$],U=F[$+Xct],Z=F[$+qct];if(W===-1)continue;const X=(W+j)/2|0,q=h[X];if(q==null)continue;const tt=u[W],J=d[j],at=p[U],et=g[Z],it=Math.abs(E(j)-E(W))+v;L(X,q,tt,J,at,et,it,!1)}}return D}isVertical(){return!0}isLabelEnabled(){return!1}updateDatumSelection(t){const e=t.nodeData??[];return t.datumSelection.update(e)}updateLabelNodes(t){}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e)}getItemBaseStyle(t,e){const{properties:i}=this,s=i.item[t],a=e?i.highlightStyle.item:void 0,n={fill:a?.fill??s.fill,fillOpacity:a?.fillOpacity??s.fillOpacity,stroke:a?.stroke??s.stroke,strokeWidth:a?.strokeWidth??s.strokeWidth,strokeOpacity:a?.strokeOpacity??s.strokeOpacity,lineDash:a?.lineDash??s.lineDash,lineDashOffset:a?.lineDashOffset??s.lineDashOffset};return s.fillGradientDefaults&&s.fillPatternDefaults&&s.fillImageDefaults?MO(n,s.fillGradientDefaults,s.fillPatternDefaults,s.fillImageDefaults):n}getItemStyleOverrides(t,e,i,s,a){const{id:n,properties:o}=this,r=o.item[i],{itemStyler:l}=o;if(l==null)return;const{xKey:c,openKey:h,closeKey:u,highKey:d,lowKey:p}=o,g=this.cachedDatumCallback(a$(t,a?"highlight":"node"),()=>this.callWithContext(l,{seriesId:n,datum:e,itemId:i,xKey:c,openKey:h,closeKey:u,highKey:d,lowKey:p,highlighted:a,...s}));return r.fillGradientDefaults&&r.fillPatternDefaults&&r.fillImageDefaults?MO(g,r.fillGradientDefaults,r.fillPatternDefaults,r.fillImageDefaults):g}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a}=this,{xKey:n,xName:o,yName:r,openKey:l,openName:c,highKey:h,highName:u,lowKey:d,lowName:p,closeKey:g,closeName:f,legendItemName:x,tooltip:m}=a,b=this.getCategoryAxis(),v=this.getValueAxis();if(!i||!s||!b||!v)return;const M=s.dataSources.get(this.id)?.[t],D=i.resolveKeysById(this,"xValue",s)[t],L=i.resolveColumnById(this,"openValue",s)[t],C=i.resolveColumnById(this,"highValue",s)[t],A=i.resolveColumnById(this,"lowValue",s)[t],T=i.resolveColumnById(this,"closeValue",s)[t];if(D==null)return;const N=T>=L?"up":"down",O=this.properties.item[N],E=this.getItemBaseStyle(N,!1);Object.assign(E,this.getItemStyleOverrides(String(t),M,N,E,!1));let z={fill:O.fill??O.stroke,fillOpacity:O.fillOpacity??O.strokeOpacity??1,stroke:O.stroke,strokeWidth:O.strokeWidth??1,strokeOpacity:O.strokeOpacity??1,lineDash:O.lineDash??[0],lineDashOffset:O.lineDashOffset??0};return O.fillGradientDefaults&&O.fillPatternDefaults&&O.fillImageDefaults&&(z=MO(z,O.fillGradientDefaults,O.fillPatternDefaults,O.fillImageDefaults)),this.formatTooltipWithContext(m,{heading:b.formatDatum(D,"tooltip",e,x,M,n),title:x,symbol:{marker:z},data:[{label:c,fallbackLabel:l,value:v.formatDatum(L,"tooltip",e,x,M,l)},{label:u,fallbackLabel:h,value:v.formatDatum(C,"tooltip",e,x,M,h)},{label:p,fallbackLabel:d,value:v.formatDatum(A,"tooltip",e,x,M,d)},{label:f,fallbackLabel:g,value:v.formatDatum(T,"tooltip",e,x,M,g)}]},{seriesId:e,datum:M,title:r,itemId:N,xKey:n,xName:o,yName:r,openKey:l,openName:c,highKey:h,highName:u,lowKey:d,lowName:p,closeKey:g,closeName:f,...E})}getDatumId(t){return a$(t.xValue)}computeFocusBounds(t){const e=this.getNodeData()?.at(t.datumIndex);if(e==null)return;const{centerX:i,y:s,width:a,height:n}=e,o={x:i-a/2,y:s,width:a,height:n};return aht(this,o)}},cht=(_(),w(P)),hht=(_(),w(P)),{Path:uht,SceneChangeDetection:jh,BBox:dht}=hht._ModuleSupport,el=class extends uht{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:s}=this;return new dht(t-i/2,e,i,s)}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:s,strokeAlignment:a}=this;let{centerX:n,yOpen:o,yClose:r}=this,l=n-e/2,c=n+e/2,h=t,u=t+i;if(s&&e>1){n=this.align(n),o=this.align(o),r=this.align(r);const p=this.align(e/2);l=n-p,c=n+p,h=this.align(t),u=h+this.align(h,i)}const d=(h+u)/2;return n+=a,l+=a,c+=a,h-=a,u+=a,o+=o<d?a:-a,r+=r<d?a:-a,{centerX:n,x0:l,x1:c,y0:h,y1:u,yOpen:o,yClose:r}}executeStroke(t,e){const{width:i,strokeWidth:s}=this;i<s&&(t.lineWidth=i),super.executeStroke(t,e)}};y([jh()],el.prototype,"centerX",2),y([jh()],el.prototype,"y",2),y([jh()],el.prototype,"width",2),y([jh()],el.prototype,"height",2),y([jh()],el.prototype,"yOpen",2),y([jh()],el.prototype,"yClose",2),y([jh()],el.prototype,"crisp",2),y([jh()],el.prototype,"strokeAlignment",2);var pht=class extends el{updatePath(){const{path:t}=this,{centerX:e,x0:i,x1:s,y0:a,y1:n,yOpen:o,yClose:r}=this.alignedCoordinates();t.clear(),t.moveTo(e,a),t.lineTo(e,n),Math.abs(s-i)>1&&(t.moveTo(i,o),t.lineTo(e,o),t.moveTo(e,r),t.lineTo(s,r))}},{SceneArrayChangeDetection:ght,SceneChangeDetection:bD,ExtendedPath2D:fht,BBox:mht}=cht._ModuleSupport,bf=class extends el{constructor(){super(...arguments),this.wickPath=new fht,this.wickStroke=void 0,this.wickStrokeWidth=void 0,this.wickStrokeOpacity=void 0}computeDefaultGradientFillBBox(){const{width:t,centerX:e,yOpen:i,yClose:s}=this,a=Math.min(i,s),o=Math.max(i,s)-a,r=e-t/2,l=e+t/2;return new mht(r,a,l-r,o)}updatePath(){const{path:t,stroke:e,strokeWidth:i,strokeOpacity:s,lineDash:a,lineDashOffset:n,wickStroke:o,wickStrokeWidth:r,wickStrokeOpacity:l,wickLineDash:c,wickLineDashOffset:h,strokeAlignment:u}=this,{centerX:d,x0:p,x1:g,y0:f,y1:x,yOpen:m,yClose:b}=this.alignedCoordinates();this.path.clear(),this.wickPath.clear();const M=o!=null&&o!==e||r!=null&&r!==i||l!=null&&l!==s||c!=null&&c!==a||h!=null&&h!==n?this.wickPath:t;if(Math.abs(g-p)<=3){M.moveTo(d,f),M.lineTo(d,x);return}const D=Math.min(m,b),L=Math.max(m,b);M.moveTo(d,f),M.lineTo(d,D+i/2),M.moveTo(d,x),M.lineTo(d,L-i/2);const C=u+i/2,A=L-D-2*C;if(A>0)t.rect(p+C,D+C,g-p-2*C,A);else{const T=(D+L)/2;t.moveTo(p,T),t.lineTo(g,T)}}drawPath(t){super.drawPath(t);const{wickPath:e}=this;if(e.isEmpty())return;const{stroke:i,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:o,wickStroke:r=i,wickStrokeWidth:l=s,wickStrokeOpacity:c=a,wickLineDash:h=n,wickLineDashOffset:u=o}=this;l!==0&&(t.globalAlpha*=c,typeof r=="string"&&(t.strokeStyle=r),t.lineWidth=l,h!=null&&t.setLineDash([...h]),t.lineDashOffset=u,t.stroke(e.getPath2D()))}};y([bD()],bf.prototype,"wickStroke",2),y([bD()],bf.prototype,"wickStrokeWidth",2),y([bD()],bf.prototype,"wickStrokeOpacity",2),y([ght()],bf.prototype,"wickLineDash",2),y([bD()],bf.prototype,"wickLineDashOffset",2);var yht=(_(),w(P)),xht=(_(),w(P)),{BaseProperties:c$,Property:Ei,AbstractBarSeriesProperties:bht,makeSeriesTooltip:vht}=xht._ModuleSupport,Zd=class extends c${constructor(){super(...arguments),this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};y([Ei],Zd.prototype,"stroke",2),y([Ei],Zd.prototype,"strokeWidth",2),y([Ei],Zd.prototype,"strokeOpacity",2),y([Ei],Zd.prototype,"lineDash",2),y([Ei],Zd.prototype,"lineDashOffset",2);var DO=class extends c${constructor(){super(...arguments),this.up=new Zd,this.down=new Zd}};y([Ei],DO.prototype,"up",2),y([Ei],DO.prototype,"down",2);var An=class extends bht{};y([Ei],An.prototype,"xKey",2),y([Ei],An.prototype,"openKey",2),y([Ei],An.prototype,"closeKey",2),y([Ei],An.prototype,"highKey",2),y([Ei],An.prototype,"lowKey",2),y([Ei],An.prototype,"xName",2),y([Ei],An.prototype,"yName",2),y([Ei],An.prototype,"openName",2),y([Ei],An.prototype,"closeName",2),y([Ei],An.prototype,"highName",2),y([Ei],An.prototype,"lowName",2);var vD=class extends An{constructor(){super(...arguments),this.tooltip=vht(),this.item=new DO}};y([Ei],vD.prototype,"tooltip",2),y([Ei],vD.prototype,"item",2),y([Ei],vD.prototype,"itemStyler",2);var{FillGradientDefaults:Sht,FillPatternDefaults:Mht,FillImageDefaults:Dht,BaseProperties:kO,makeSeriesTooltip:kht,Property:Si}=yht._ModuleSupport,vf=class extends kO{};y([Si],vf.prototype,"stroke",2),y([Si],vf.prototype,"strokeWidth",2),y([Si],vf.prototype,"strokeOpacity",2),y([Si],vf.prototype,"lineDash",2),y([Si],vf.prototype,"lineDashOffset",2);var Ua=class extends kO{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new Sht,this.fillPatternDefaults=new Mht,this.fillImageDefaults=new Dht,this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.wick=new vf}};y([Si],Ua.prototype,"fill",2),y([Si],Ua.prototype,"fillGradientDefaults",2),y([Si],Ua.prototype,"fillPatternDefaults",2),y([Si],Ua.prototype,"fillImageDefaults",2),y([Si],Ua.prototype,"fillOpacity",2),y([Si],Ua.prototype,"stroke",2),y([Si],Ua.prototype,"strokeWidth",2),y([Si],Ua.prototype,"strokeOpacity",2),y([Si],Ua.prototype,"lineDash",2),y([Si],Ua.prototype,"lineDashOffset",2),y([Si],Ua.prototype,"cornerRadius",2),y([Si],Ua.prototype,"wick",2);var IO=class extends kO{constructor(){super(...arguments),this.up=new Ua,this.down=new Ua}};y([Si],IO.prototype,"up",2),y([Si],IO.prototype,"down",2);var SD=class extends An{constructor(){super(),this.item=new IO,this.tooltip=kht(),this.highlightStyle.deprecated=!1}};y([Si],SD.prototype,"item",2),y([Si],SD.prototype,"tooltip",2),y([Si],SD.prototype,"itemStyler",2);var{createDatumId:Iht,isGradientFill:h$,isPatternFill:AO,isImageFill:CO,getShapeFill:u$,applyShapeStyle:Aht,getShapeStyle:LO}=Uct._ModuleSupport,MD=class extends l${constructor(){super(...arguments),this.properties=new SD}nodeFactory(){return new bf}updateDatumNodes({datumSelection:t,isHighlight:e}){const{id:i,properties:s}=this,{xKey:a,highKey:n,lowKey:o,openKey:r,closeKey:l,item:c,itemStyler:h}=s,{up:u,down:d}=c,p=LO({fill:u.fill,fillOpacity:u.fillOpacity,stroke:u.stroke,strokeWidth:u.strokeWidth,strokeOpacity:u.strokeOpacity,lineDash:u.lineDash,lineDashOffset:u.lineDashOffset},u.fillGradientDefaults,u.fillPatternDefaults,u.fillImageDefaults),g=LO({fill:d.fill,fillOpacity:d.fillOpacity,stroke:d.stroke,strokeWidth:d.strokeWidth,strokeOpacity:d.strokeOpacity,lineDash:d.lineDash,lineDashOffset:d.lineDashOffset},d.fillGradientDefaults,d.fillPatternDefaults,d.fillImageDefaults);t.each((f,x)=>{const{isRising:m,centerX:b,width:v,y:M,height:D,yOpen:L,yClose:C,crisp:A}=x;let T;if(h!=null){const{fill:B,fillOpacity:F,stroke:V,strokeWidth:G,strokeOpacity:H,lineDash:$,lineDashOffset:W}=m?p:g;T=LO(this.cachedDatumCallback(Iht(this.getDatumId(x),e?"highlight":"node"),()=>this.callWithContext(h,{seriesId:i,itemId:x.itemId,xKey:a,highKey:n,lowKey:o,openKey:r,closeKey:l,datum:x.datum,fill:B,fillOpacity:F,strokeOpacity:H,stroke:V,strokeWidth:G,lineDash:$,lineDashOffset:W,highlighted:e})),m?u.fillGradientDefaults:d.fillGradientDefaults,m?u.fillPatternDefaults:d.fillPatternDefaults,m?u.fillImageDefaults:d.fillImageDefaults)}f.centerX=b,f.width=v,f.y=M,f.height=D,f.yOpen=L,f.yClose=C,f.crisp=A;const N=m?p:g,O=m?u.wick:d.wick,E=this.getHighlightStyle(e,x.datumIndex);Aht(f,{fill:E?.fill??T?.fill??N.fill,fillOpacity:E?.fillOpacity??T?.fillOpacity??N.fillOpacity,stroke:E?.stroke??T?.stroke??N.stroke,strokeWidth:E?.strokeWidth??T?.strokeWidth??N.strokeWidth,strokeOpacity:E?.strokeOpacity??T?.strokeOpacity??N.strokeOpacity,lineDash:E?.lineDash??T?.lineDash??N.lineDash,lineDashOffset:E?.lineDashOffset??T?.lineDashOffset??N.lineDashOffset,opacity:E.opacity??1},void 0,this.getShapeFillBBox());const z=T?.wick;f.wickStroke=E?.stroke??z?.stroke??O.stroke,f.wickStrokeWidth=E?.strokeWidth??z?.strokeWidth??O.strokeWidth,f.wickStrokeOpacity=E?.strokeOpacity??z?.strokeOpacity??O.strokeOpacity,f.wickLineDash=E?.lineDash??z?.lineDash??O.lineDash,f.wickLineDashOffset=E?.lineDashOffset??z?.lineDashOffset??O.lineDashOffset,f.strokeAlignment=(T?.strokeWidth??N.strokeWidth)/2})}legendItemSymbol(){const{up:t,down:e}=this.properties.item,i=u$(t.fill,t.fillGradientDefaults,t.fillPatternDefaults,t.fillImageDefaults),s=h$(i)?i.colorStops.map(l=>typeof l=="string"?l:{color:l.color,stop:l.stop!=null?l.stop*.5:void 0}):[{color:AO(i)||CO(i)?t.stroke:i,stop:0},{color:AO(i)||CO(i)?t.stroke:i,stop:.5}],a=u$(e.fill,e.fillGradientDefaults,e.fillPatternDefaults,e.fillImageDefaults),n=h$(a)?a.colorStops.map(l=>typeof l=="string"?l:{color:l.color,stop:l.stop!=null?l.stop*.5:void 0}):[{color:AO(a)||CO(a)?e.stroke:a,stop:.5}],o={type:"gradient",gradient:"linear",rotation:90,colorStops:[...s,...n],reverse:!1},r={type:"gradient",gradient:"linear",rotation:90,colorStops:[{color:t.stroke,stop:0},{color:t.stroke,stop:.5},{color:e.stroke,stop:.5}],reverse:!1};return{marker:{fill:o,fillOpacity:t.fillOpacity,stroke:r,strokeWidth:t.strokeWidth??1,strokeOpacity:t.strokeOpacity??1,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset}}}getLegendData(t){const{id:e,data:i,visible:s,ctx:{legendManager:a}}=this,{xKey:n,yName:o,showInLegend:r,legendItemName:l}=this.properties;return!i?.length||!n||t!=="category"?[]:[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:s&&a.getItemEnabled({seriesId:e,itemId:e}),label:{text:l??o??e},symbol:this.legendItemSymbol(),legendItemName:l,hideInLegend:!r}]}};MD.className="CandleStickSeries",MD.type="candlestick";var Cht=(_(),w(P)),Mi=(R(),w(st)),{commonSeriesOptionsDefs:Lht,candlestickSeriesThemeableOptionsDef:wht}=Cht._ModuleSupport,wO={...Lht,...wht,type:(0,Mi.required)((0,Mi.constant)("candlestick")),xKey:(0,Mi.required)(Mi.string),openKey:(0,Mi.required)(Mi.string),highKey:(0,Mi.required)(Mi.string),lowKey:(0,Mi.required)(Mi.string),closeKey:(0,Mi.required)(Mi.string),xName:Mi.string,yName:Mi.string,openName:Mi.string,highName:Mi.string,lowName:Mi.string,closeName:Mi.string};wO.pickOutsideVisibleMinorAxis=(0,Mi.undocumented)(Mi.boolean),wO.focusPriority=(0,Mi.undocumented)(Mi.number);var TO=(_(),w(P)),{ThemeConstants:{CARTESIAN_AXIS_TYPE:d$},multiSeriesHighlightStyle:Tht}=TO._ModuleSupport;function p$(t){return{fill:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},t==="up"?"transparent":{$palette:"fill"},{$palette:`${t}.fill`}]},stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:`${t}.stroke`}]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$if:[{$or:[{$isGradient:{$palette:`${t}.fill`}},{$isPattern:{$palette:`${t}.fill`}},{$isImage:{$palette:`${t}.fill`}}]},{$map:[{$path:["/color",void 0,{$value:"$1"}]},{$path:["/colorStops",void 0,{$palette:`${t}.fill`}]}]},[{$mix:[{$palette:`${t}.fill`},"black",.15]},{$mix:[{$palette:`${t}.fill`},"white",.15]}]]},rotation:0,reverse:!1},fillPatternDefaults:TO._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:TO._ModuleSupport.FILL_IMAGE_DEFAULTS}}var Nht={series:{item:{up:p$("up"),down:p$("down")},highlightStyle:{item:{strokeWidth:3}},tooltip:{range:{$path:["/tooltip/range","nearest"]}},highlight:Tht()},animation:{enabled:!1},axes:{[d$.NUMBER]:{crosshair:{snap:!1}},[d$.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},{CARTESIAN_AXIS_TYPE:g$,CARTESIAN_POSITION:f$}=$ct._ModuleSupport.ThemeConstants,Oht={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"candlestick",moduleFactory:t=>new MD(t),defaultAxes:[{type:g$.NUMBER,position:f$.LEFT},{type:g$.ORDINAL_TIME,position:f$.BOTTOM}],themeTemplate:Nht,groupable:!1},m$={type:"series",name:"candlestick",chartType:"cartesian",enterprise:!0,options:wO,create:t=>new MD(t)},Pht=(_(),w(P)),NO=(_(),w(P)),_ht=(R(),w(st)),Eht=(_(),w(P)),OO=(R(),w(st)),{CachedTextMeasurerPool:y$,TextUtils:x$,TextWrapper:DD}=Eht._ModuleSupport;function Rht(t,e){const{fontSize:i,minimumFontSize:s=i}=t,{fontSize:a,minimumFontSize:n=a}=e,o=i-s,r=a-n;let l=t.fontSize,c=e.fontSize;const h=[{labelFontSize:i,secondaryLabelFontSize:a}];for(;l>s||c>n;){const u=o>0?(l-s)/o:-1,d=r>0?(c-n)/r:-1;u>d?l--:c--,h.push({labelFontSize:l,secondaryLabelFontSize:c})}return h.reverse(),h}function Sf(t,e){return t.lineHeight!=null&&t.fontSize!=null?t.lineHeight*e/t.fontSize:x$.getLineHeight(e)}function b$(t,e,i,s,{padding:a},n){const{spacing:o=0}=e,r=2*a,l=2*a+o,c=(e.minimumFontSize??e.fontSize)+(s.minimumFontSize??s.fontSize);if(c>n(c+l,!1).height-l)return;const h=Rht(e,s),u={fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight},d={fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight};let p,g;return(0,OO.findMaxValue)(0,h.length-1,f=>{const{labelFontSize:x,secondaryLabelFontSize:m}=h[f],b=f===0,v=Sf(e,x),M=Sf(s,m),D=n(v+M+l,b),L=D.width-r,C=D.height-l;if(v+M>C||((p==null||p.fontSize!==x)&&(u.fontSize=x,p=S$(e,t,L,C,u,e.wrapping,b?e.overflowStrategy:"hide")),p==null||p.width>L||p.height>C)||((g==null||g.fontSize!==m)&&(d.fontSize=m,g=S$(s,i,L,C,d,s.wrapping,b?s.overflowStrategy:"hide")),g==null))return;const A=p.height+g.height;if(!(g.width>L||A>C))return{width:Math.max(p.width,g.width),height:A+o,meta:D.meta,label:p,secondaryLabel:g}})}function jx(t,e,{padding:i},s){const a=2*i,n=Math.min(e.minimumFontSize??e.fontSize,e.fontSize),o={fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight};return(0,OO.findMaxValue)(n,e.fontSize,r=>{const l=Sf(e,r),c=r===n,h=s(l+a,c),u=h.width-a,d=h.height-a;if(l>d)return;o.fontSize=r;const p=DD.wrapLines(t,{maxWidth:u,maxHeight:d,font:o,textWrap:e.wrapping,overflow:(c?e.overflowStrategy:void 0)??"hide"});if(!p.length)return;const g=Bht(p,{lineHeight:l,font:o,maxWidth:u,maxHeight:d});if(g)return[{fontSize:r,lineHeight:l,...g},h.meta]})}function v$(t){return t?.minimumFontSize!=null&&t?.fontSize!=null&&t?.minimumFontSize>t?.fontSize}function PO(t,e,i,s,a,n){const o=e.enabled?t:void 0,r=s.enabled?i:void 0;(v$(e)||v$(s))&&OO.Logger.warnOnce("minimumFontSize should be set to a value less than or equal to the font size");let l;o!=null&&r!=null&&(l=b$(o,e,r,s,a,n));let c;if(l==null&&o!=null&&(c=jx(o,e,a,n)),c!=null){const[u,d]=c;l={width:u.width,height:u.height,meta:d,label:u,secondaryLabel:void 0}}let h;if(l==null&&o==null&&r!=null&&(h=jx(r,s,a,n)),h!=null){const[u,d]=h;l={width:u.width,height:u.height,meta:d,label:void 0,secondaryLabel:u}}return l}function S$(t,e,i,s,a,n,o){const r=DD.wrapLines(e,{maxWidth:i,maxHeight:s,font:a,textWrap:n,overflow:o});if(!r.length)return;const l=Sf(t,a.fontSize),{width:c}=y$.measureLines(r,{font:a});return{width:c,lineHeight:l,text:r.join(`
`),height:r.length*l,fontSize:a.fontSize}}function Bht(t,{font:e,lineHeight:i=x$.defaultLineHeight,maxWidth:s,maxHeight:a=1/0}){let n=i*t.length;for(;n>a;){if(t.length===1)return;t.pop(),t[t.length-1]=DD.appendEllipsis(t.at(-1)),n=i*t.length}const o=y$.measureLines(t,{font:e});let r,l;if(o.width>s){const c=[];l=0;for(const h of o.lineMetrics){if(h.width>s){if(!c.length)return;break}c.push(h.text),l=Math.max(l,h.width)}r=DD.appendEllipsis(c.join(`
`))}else r=t.join(`
`),l=o.width;return{text:r,width:l,height:n}}var zht=(_(),w(P)),M$=(_(),w(P)),{Property:Wx}=M$._ModuleSupport,Mf=class extends M$._ModuleSupport.Label{constructor(){super(...arguments),this.wrapping="on-space",this.overflowStrategy="ellipsis"}};y([Wx],Mf.prototype,"wrapping",2),y([Wx],Mf.prototype,"overflowStrategy",2),y([Wx],Mf.prototype,"lineHeight",2),y([Wx],Mf.prototype,"minimumFontSize",2);var il=class extends Mf{constructor(){super(...arguments),this.spacing=0}};y([Wx],il.prototype,"spacing",2);var Hx=class extends Mf{},{CartesianSeriesProperties:Fht,makeSeriesTooltip:Vht,Property:Us}=zht._ModuleSupport,Ls=class extends Fht{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 il,this.tooltip=Vht()}};y([Us],Ls.prototype,"title",2),y([Us],Ls.prototype,"xKey",2),y([Us],Ls.prototype,"yKey",2),y([Us],Ls.prototype,"colorKey",2),y([Us],Ls.prototype,"xName",2),y([Us],Ls.prototype,"yName",2),y([Us],Ls.prototype,"colorName",2),y([Us],Ls.prototype,"colorRange",2),y([Us],Ls.prototype,"stroke",2),y([Us],Ls.prototype,"strokeOpacity",2),y([Us],Ls.prototype,"strokeWidth",2),y([Us],Ls.prototype,"textAlign",2),y([Us],Ls.prototype,"verticalAlign",2),y([Us],Ls.prototype,"itemPadding",2),y([Us],Ls.prototype,"itemStyler",2),y([Us],Ls.prototype,"label",2),y([Us],Ls.prototype,"tooltip",2);var{SeriesNodePickMode:D$,computeBarFocusBounds:Ght,getMissCount:jht,valueProperty:_O,ChartAxisDirection:yo,DEFAULT_CARTESIAN_DIRECTION_KEYS:Wht,DEFAULT_CARTESIAN_DIRECTION_NAMES:Hht,createDatumId:$ht,ColorScale:Uht,Rect:Kht,PointerEvents:Yht,applyShapeStyle:Zht,formatValue:Xht}=NO._ModuleSupport,qht=class extends NO._ModuleSupport.CartesianSeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.colorKey=s.properties.colorKey}},Qht={left:-.5,center:0,right:-.5},Jht={top:-.5,middle:0,bottom:-.5},kD=class extends NO._ModuleSupport.CartesianSeries{constructor(t){super({moduleCtx:t,propertyKeys:{...Wht,color:["colorKey"]},propertyNames:{...Hht,color:["colorName"]},categoryKey:void 0,pickModes:[D$.NEAREST_NODE,D$.EXACT_SHAPE_MATCH],pathsPerSeries:[],hasMarkers:!1,hasHighlightedLabels:!0}),this.properties=new Ls,this.NodeEvent=qht,this.colorScale=new Uht}async processData(t){const e=this.axes[yo.X],i=this.axes[yo.Y];if(!e||!i||!this.data?.length)return;const{xKey:s,yKey:a,colorRange:n,colorKey:o}=this.properties,r=this.axes[yo.X]?.scale,l=this.axes[yo.Y]?.scale,{xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:r,yScale:l}),u=this.colorScale.type,{dataModel:d,processedData:p}=await this.requestDataModel(t,this.data,{props:[_O(s,c,{id:"xValue"}),_O(a,h,{id:"yValue"}),...o?[_O(o,u,{id:"colorValue",invalidValue:null})]:[]]});if(this.isColorScaleValid()){const g=d.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=p.domain.values[g],this.colorScale.range=n,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 s=e.resolveProcessedDataIndexById(this,"colorValue"),a=i.input.count,n=jht(this,i.defs.values[s].missing);return!(a===0||a===n)}xCoordinateRange(t,e){const i=this.axes[yo.X].scale,s=e*(i.bandwidth??0)/2,a=i.convert(t)+s,n=e*(i.bandwidth??10);return[a,a+n]}yCoordinateRange(t,e){const i=this.axes[yo.Y].scale,s=e*(i.bandwidth??0)/2,a=i.convert(t[0])+s,n=e*(i.bandwidth??10);return[a,a+n]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;return!e||!i?[]:t===yo.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:s,processedData:a}=this,n=i[yo.X],o=i[yo.Y];if(!(t&&s&&a&&e&&n&&o))return;if(n.type!=="category"||o.type!=="category"){_ht.Logger.warnOnce(`Heatmap series expected axes to have "category" type, but received "${n.type}" and "${o.type}" instead.`);return}const{xKey:r,xName:l,yKey:c,yName:h,colorKey:u,colorName:d,textAlign:p,verticalAlign:g,itemPadding:f,label:x}=this.properties,m=s.resolveColumnById(this,"xValue",a),b=s.resolveColumnById(this,"yValue",a),v=u?s.resolveColumnById(this,"colorValue",a):void 0,M=s.getDomain(this,"colorValue","value",a),D=n.scale,L=o.scale,C=(D.bandwidth??0)/2,A=(L.bandwidth??0)/2,T=[],N=[],O=D.bandwidth??10,E=L.bandwidth??10,z=(O-2*f)*Qht[p],B=(E-2*f)*Jht[g],F=()=>({width:O,height:E,meta:null});return(a.dataSources.get(this.id)??[]).forEach((G,H)=>{const $=m[H],W=b[H],j=D.convert($)+C,U=L.convert(W)+A,Z=v?.[H],X=Z==null?void 0:this.getLabelText(Z,G,u,"color",M,x,{value:Z,datum:G,colorKey:u,colorName:d,xKey:r,yKey:c,xName:l,yName:h}),q=PO(X,this.properties.label,void 0,this.properties.label,{padding:f},F),tt={x:j,y:U,size:0};if(T.push({series:this,itemId:c,datumIndex:H,yKey:c,xKey:r,xValue:$,yValue:W,colorValue:Z,datum:G,point:tt,width:O,height:E,midPoint:{x:j,y:U},missing:v!=null&&Z==null}),q?.label!=null){const{text:J,fontSize:at,lineHeight:et,height:it}=q.label,{fontStyle:ct,fontFamily:ht,fontWeight:xt,color:kt}=this.properties.label,Dt=tt.x+z*(O-2*f),St=tt.y+B*(E-2*f)-(q.height-it)*.5;N.push({series:this,itemId:c,datum:G,datumIndex:H,text:J,fontSize:at,lineHeight:et,fontStyle:ct,fontFamily:ht,fontWeight:xt,color:kt,textAlign:p,verticalAlign:g,x:Dt,y:St})}}),{itemId:this.properties.yKey??this.id,nodeData:T,labelData:N,scales:this.calculateScaling(),visible:this.visible}}nodeFactory(){return new Kht}update(t){return this.ctx.animationManager.skipCurrentBatch(),super.update(t)}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,s=e??[];return i.update(s)}getItemBaseStyle(t,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return{fill:s?.fill,fillOpacity:s?.fillOpacity??1,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,opacity:s.opacity??1}}getItemStyleOverrides(t,e,i,s,a){const{id:n,properties:o}=this,{xKey:r,yKey:l,itemStyler:c}=o,h=this.isColorScaleValid()&&i!=null?this.colorScale.convert(i):"transparent";let u=s.fill==null?{fill:h}:void 0;if(c!=null){u??(u={});const d=this.cachedDatumCallback($ht(t,a?"highlight":"node"),()=>this.callWithContext(c,{seriesId:n,datum:e,xKey:r,yKey:l,highlighted:a,...s,fill:h}));Object.assign(u,d)}return u}updateDatumNodes(t){const{isHighlight:e}=t,i=this.axes[yo.X],[s,a]=i?.visibleRange??[],o=!(s!==0||a!==1);t.datumSelection.each((r,l)=>{const{datumIndex:c,colorValue:h,datum:u,point:d,width:p,height:g}=l,f=this.getItemBaseStyle(e,l),x=this.getItemStyleOverrides(String(c),u,h,f,e);r.crisp=o,r.x=Math.floor(d.x-p/2),r.y=Math.floor(d.y-g/2),r.width=Math.ceil(p),r.height=Math.ceil(g),Zht(r,f,x)})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t,{enabled:s}=this.properties.label,a=s?e:[];return i.update(a)}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.fillOpacity=this.getHighlightStyle(!1,i.datumIndex)?.opacity??1,e.textAlign=i.textAlign,e.textBaseline=i.verticalAlign,e.x=i.x,e.y=i.y,e.pointerEvents=Yht.None})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n,colorScale:o,ctx:r}=this,{formatManager:l}=r,{xKey:c,xName:h,yKey:u,yName:d,colorKey:p,colorName:g,colorRange:f,title:x,legendItemName:m,tooltip:b}=n,v=a[yo.X],M=a[yo.Y];if(!i||!s||!v||!M)return;const D=s.dataSources.get(this.id)?.[t],L=i.resolveColumnById(this,"xValue",s)[t],C=i.resolveColumnById(this,"yValue",s)[t],A=p!=null&&this.isColorScaleValid()?i.resolveColumnById(this,"colorValue",s)[t]:void 0;if(L==null)return;const T=[];let N;if(A==null)N=f[0];else{N=o.convert(A);const z=i.getDomain(this,"colorValue","value",s),B=l.format(this.callWithContext.bind(this),{type:"number",value:A,datum:D,seriesId:e,legendItemName:m,key:p,source:"tooltip",property:"color",domain:z,boundSeries:this.getFormatterContext("color"),fractionDigits:void 0});T.push({label:g,fallbackLabel:p,value:B??Xht(A)})}T.push({label:h,fallbackLabel:c,value:v.formatDatum(L,"tooltip",e,m,D,c)},{label:d,fallbackLabel:u,value:M.formatDatum(C,"tooltip",e,m,D,u)});const O=this.getItemBaseStyle(!1);Object.assign(O,this.getItemStyleOverrides(String(t),D,A,O,!1)),O.fill!=null&&(N=O.fill);const E=N!=null?{marker:{shape:"square",fill:N,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}}:void 0;return this.formatTooltipWithContext(b,{title:x??m,symbol:E,data:T},{seriesId:e,datum:D,title:x,xKey:c,xName:h,yKey:u,yName:d,colorKey:p,colorName:g,...O})}getLegendData(t){return t!=="gradient"||!this.isColorScaleValid()||!this.dataModel?[]:[{legendType:"gradient",enabled:this.visible,seriesId:this.id,series:this.getFormatterContext("color"),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:s,midPoint:a}=e,n={x:a.x-i/2,y:a.y-s/2,width:i,height:s};return Ght(this,n)}};kD.className="HeatmapSeries",kD.type="heatmap";var tut=(_(),w(P)),xo=(R(),w(st)),{commonSeriesOptionsDefs:eut,heatmapSeriesThemeableOptionsDef:iut,without:k$}=tut._ModuleSupport,sut={...k$(iut,["showInLegend"]),...k$(eut,["showInLegend"]),type:(0,xo.required)((0,xo.constant)("heatmap")),xKey:(0,xo.required)(xo.string),yKey:(0,xo.required)(xo.string),colorKey:xo.string,xName:xo.string,yName:xo.string,colorName:xo.string,colorRange:(0,xo.arrayOf)(xo.color)},I$=(_(),w(P)),aut={series:{stroke:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$ref:"chartBackgroundColor"},{$path:["/0",{$palette:"stroke"},{$palette:"strokes"}]}]},strokeWidth:{$isUserOption:["./stroke",2,void 0]},colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},I$._ModuleSupport.SAFE_RANGE2_OPERATION]},label:{enabled:!1,color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},wrapping:"on-space",overflowStrategy:"ellipsis"},itemPadding:3,highlight:I$._ModuleSupport.singleSeriesHighlightStyle()},gradientLegend:{enabled:!0}},{ThemeConstants:{CARTESIAN_AXIS_TYPE:A$,CARTESIAN_POSITION:C$}}=Pht._ModuleSupport,nut={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"heatmap",moduleFactory:t=>new kD(t),defaultAxes:[{type:A$.CATEGORY,position:C$.LEFT},{type:A$.CATEGORY,position:C$.BOTTOM}],themeTemplate:aut},L$={type:"series",name:"heatmap",chartType:"cartesian",enterprise:!0,options:sut,create:t=>new kD(t)},out=(_(),w(P)),rut=(_(),w(P)),{createDatumId:lut,applyShapeStyle:cut}=rut._ModuleSupport,ID=class extends l${constructor(){super(...arguments),this.properties=new vD}nodeFactory(){return new pht}updateDatumNodes({datumSelection:t,isHighlight:e}){const{id:i,properties:s}=this,{xKey:a,highKey:n,lowKey:o,openKey:r,closeKey:l,item:c,itemStyler:h}=s,{up:u,down:d}=c,{stroke:p,strokeWidth:g,strokeOpacity:f,lineDash:x,lineDashOffset:m}=u,{stroke:b,strokeWidth:v,strokeOpacity:M,lineDash:D,lineDashOffset:L}=d;t.each((C,A)=>{const{isRising:T,centerX:N,width:O,y:E,height:z,yOpen:B,yClose:F,crisp:V}=A;let G;if(h!=null){const{stroke:$,strokeWidth:W,strokeOpacity:j,lineDash:U,lineDashOffset:Z}=T?u:d;G=this.cachedDatumCallback(lut(this.getDatumId(A),e?"highlight":"node"),()=>this.callWithContext(h,{seriesId:i,itemId:A.itemId,xKey:a,highKey:n,lowKey:o,openKey:r,closeKey:l,datum:A.datum,strokeOpacity:j,stroke:$,strokeWidth:W,lineDash:U,lineDashOffset:Z,highlighted:e}))}C.centerX=N,C.width=O,C.y=E,C.height=z,C.yOpen=B,C.yClose=F,C.crisp=V;const H=this.getHighlightStyle(e,A.datumIndex);cut(C,{stroke:H?.stroke??G?.stroke??(T?p:b),strokeWidth:H?.strokeWidth??G?.strokeWidth??(T?g:v),strokeOpacity:H?.strokeOpacity??G?.strokeOpacity??(T?f:M),lineDash:H?.lineDash??G?.lineDash??(T?x:D),lineDashOffset:H?.lineDashOffset??G?.lineDashOffset??(T?m:L),opacity:H?.opacity??1}),C.strokeAlignment=(G?.strokeWidth??(T?g:v))/2})}getLegendData(t){const{id:e,data:i,ctx:{legendManager:s},visible:a}=this,{xKey:n,yName:o,item:{up:r,down:l},showInLegend:c,legendItemName:h}=this.properties;if(!i?.length||!n||t!=="category")return[];const u={type:"gradient",gradient:"linear",colorSpace:"rgb",colorStops:[{color:r.stroke,stop:0},{color:r.stroke,stop:.5},{color:l.stroke,stop:.5}],rotation:90};return[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:a&&s.getItemEnabled({seriesId:e,itemId:e}),label:{text:h??o??e},symbol:{marker:{fill:u,fillOpacity:r.strokeOpacity,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}},legendItemName:h,hideInLegend:!c}]}};ID.className="ohlc",ID.type="ohlc";var hut=(_(),w(P)),Di=(R(),w(st)),{commonSeriesOptionsDefs:uut,ohlcSeriesThemeableOptionsDef:dut}=hut._ModuleSupport,EO={...uut,...dut,type:(0,Di.required)((0,Di.constant)("ohlc")),xKey:(0,Di.required)(Di.string),openKey:(0,Di.required)(Di.string),highKey:(0,Di.required)(Di.string),lowKey:(0,Di.required)(Di.string),closeKey:(0,Di.required)(Di.string),xName:Di.string,yName:Di.string,openName:Di.string,highName:Di.string,lowName:Di.string,closeName:Di.string};EO.pickOutsideVisibleMinorAxis=(0,Di.undocumented)(Di.boolean),EO.focusPriority=(0,Di.undocumented)(Di.number);var{ThemeConstants:{CARTESIAN_AXIS_TYPE:AD,CARTESIAN_POSITION:w$},multiSeriesHighlightStyle:put}=out._ModuleSupport,gut={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ohlc",moduleFactory:t=>new ID(t),defaultAxes:[{type:AD.NUMBER,position:w$.LEFT},{type:AD.ORDINAL_TIME,position:w$.BOTTOM}],themeTemplate:{animation:{enabled:!1},series:{item:{up:{stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:"up.stroke"}]}},down:{stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:"down.stroke"}]}}},tooltip:{range:{$path:["/tooltip/range","nearest"]}},highlight:put(!1)},axes:{[AD.NUMBER]:{crosshair:{snap:!1}},[AD.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},groupable:!1},T$={type:"series",name:"ohlc",chartType:"cartesian",enterprise:!0,options:EO,create:t=>new ID(t)},fut=(_(),w(P)),CD=(_(),w(P)),mut=1e3;function N$(t,e,i,s,a,n){const o=t[n];if(o==null)return!1;const r=mD(o,e,i),l=yD(r,a);return n===s[l+$a]}function O$(t,e,i,s,a,n){const o=t[n];if(o==null)return!1;const r=mD(o,e,i),l=yD(r,a);return n===s[l+Ha]}function yut(t,e,i,s){if(t.length<mut)return;const[a,n]=Fx(s);let o=zx(t);const{indexData:r,valueData:l}=Vx(t,e,i,a,n,o);let c=[],h=[];for(let d=0;d<t.length;d+=1)N$(t,a,n,r,o,d)&&c.push(d),O$(t,a,n,r,o,d)&&h.push(d);const u=[{maxRange:o,topIndices:c,bottomIndices:h}];for(;o>64;)({maxRange:o}=Gx(r,l,o,{inPlace:!0})),c=c.filter(N$.bind(null,t,a,n,r,o)),h=h.filter(O$.bind(null,t,a,n,r,o)),u.push({maxRange:o,topIndices:c,bottomIndices:h});return u.reverse(),u}var xut=(_(),w(P)),{CartesianSeriesProperties:but,FillGradientDefaults:vut,FillPatternDefaults:Sut,FillImageDefaults:Mut,InterpolationProperties:Dut,SeriesMarker:kut,makeSeriesTooltip:Iut,Property:Ge,DropShadow:Aut,Label:Cut}=xut._ModuleSupport,RO=class extends Cut{constructor(){super(...arguments),this.placement="outside",this.padding=6}};y([Ge],RO.prototype,"placement",2),y([Ge],RO.prototype,"padding",2);var ti=class extends but{constructor(){super(...arguments),this.fill="#99CCFF",this.fillGradientDefaults=new vut,this.fillPatternDefaults=new Sut,this.fillImageDefaults=new Mut,this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new Dut,this.shadow=new Aut().set({enabled:!1}),this.marker=new kut,this.label=new RO,this.tooltip=Iut(),this.connectMissingData=!1}};y([Ge],ti.prototype,"xKey",2),y([Ge],ti.prototype,"yLowKey",2),y([Ge],ti.prototype,"yHighKey",2),y([Ge],ti.prototype,"xName",2),y([Ge],ti.prototype,"yName",2),y([Ge],ti.prototype,"yLowName",2),y([Ge],ti.prototype,"yHighName",2),y([Ge],ti.prototype,"fill",2),y([Ge],ti.prototype,"fillGradientDefaults",2),y([Ge],ti.prototype,"fillPatternDefaults",2),y([Ge],ti.prototype,"fillImageDefaults",2),y([Ge],ti.prototype,"fillOpacity",2),y([Ge],ti.prototype,"stroke",2),y([Ge],ti.prototype,"strokeWidth",2),y([Ge],ti.prototype,"strokeOpacity",2),y([Ge],ti.prototype,"lineDash",2),y([Ge],ti.prototype,"lineDashOffset",2),y([Ge],ti.prototype,"interpolation",2),y([Ge],ti.prototype,"shadow",2),y([Ge],ti.prototype,"marker",2),y([Ge],ti.prototype,"label",2),y([Ge],ti.prototype,"tooltip",2),y([Ge],ti.prototype,"connectMissingData",2);var Lut=(_(),w(P)),{CollapseMode:LD,isScaleValid:P$,pairUpSpans:wD,prepareAreaFillAnimationFns:wut,plotInterpolatedLinePathStroke:Df,prepareLinePathPropertyAnimation:Tut,areScalingEqual:_$}=Lut._ModuleSupport;function Nut(t,e,i,s){const a=(l,c)=>{Df(l,c,e.removed),Df(l,c,i.removed)},n=(l,c)=>{Df(l,c,e.moved),Df(l,c,i.moved)},o=(l,c)=>{Df(l,c,e.added),Df(l,c,i.added)},r=Tut(t,s);return{status:t,path:{addPhaseFn:o,updatePhaseFn:n,removePhaseFn:a},pathProperties:r}}function Out(t,e,i){const s=t.scales.x?.type==="category",a=e.scales.x?.type==="category";if(s!==a||!P$(t.scales.x)||!P$(e.scales.x))return;let n="updated";e.visible&&!t.visible?n="removed":!e.visible&&t.visible&&(n="added");const o=wD({scales:t.scales,data:t.fillData.spans},{scales:e.scales,data:e.fillData.spans},LD.Split);if(o==null)return;const r=wD({scales:t.scales,data:t.fillData.phantomSpans},{scales:e.scales,data:e.fillData.phantomSpans},LD.Split);if(r==null)return;const l=wD({scales:t.scales,data:t.highStrokeData.spans},{scales:e.scales,data:e.highStrokeData.spans},LD.Split);if(l==null)return;const c=wD({scales:t.scales,data:t.lowStrokeData.spans},{scales:e.scales,data:e.lowStrokeData.spans},LD.Split);if(c==null)return;const h="fade",u=wut(n,o,r,h),d=Nut(n,l,c,h),p=(i?.changed??!0)||!_$(t.scales.x,e.scales.x)||!_$(t.scales.y,e.scales.y)||n!=="updated";return{status:n,fill:u,stroke:d,hasMotion:p}}var{valueProperty:E$,keyProperty:Put,ChartAxisDirection:Ks,mergeDefaults:R$,updateLabelNode:_ut,fixNumericExtent:B$,buildResetPathFn:Eut,resetLabelFn:Rut,resetMarkerFn:But,resetMarkerPositionFn:z$,pathSwipeInAnimation:zut,resetMotion:Fut,markerSwipeScaleInAnimation:Vut,seriesLabelFadeInAnimation:BO,animationValidation:Gut,diff:jut,updateClipPath:F$,computeMarkerFocusBounds:V$,plotAreaPathFill:Wut,plotLinePathStroke:G$,interpolatePoints:j$,pathFadeInAnimation:W$,markerFadeInAnimation:H$,fromToMotion:$$,pathMotion:U$,extent:Hut,createDatumId:$ut,applyShapeFillBBox:Uut,PointerEvents:zO,Group:Kut,BBox:Yut,ContinuousScale:Zut,DiscreteTimeScale:Xut,findMinMax:qut,getShapeStyle:Qut,getShapeFill:Jut,applyShapeStyle:tdt}=CD._ModuleSupport,edt=class extends CD._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.yLowKey=s.properties.yLowKey,this.yHighKey=s.properties.yHighKey}},TD=class extends CD._ModuleSupport.CartesianSeries{constructor(t){super({moduleCtx:t,hasMarkers:!0,pathsPerSeries:["fill","stroke"],pickModes:[CD._ModuleSupport.SeriesNodePickMode.AXIS_ALIGNED],propertyKeys:{[Ks.X]:["xKey"],[Ks.Y]:["yLowKey","yHighKey"]},propertyNames:{[Ks.X]:["xName"],[Ks.Y]:["yLowName","yHighName","yName"]},categoryKey:"xValue",animationResetFns:{path:Eut({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:Rut,marker:(e,i)=>({...But(e),...z$(e,i)})},clipFocusBox:!1}),this.properties=new ti,this.NodeEvent=edt,this.dataAggregationFilters=void 0}async processData(t){const{xKey:e,yLowKey:i,yHighKey:s}=this.properties,a=this.axes[Ks.X]?.scale,n=this.axes[Ks.Y]?.scale,{xScaleType:o,yScaleType:r}=this.getScaleInformation({xScale:a,yScale:n}),l=[],c=!this.ctx.animationManager.isSkipped();!this.ctx.animationManager.isSkipped()&&this.processedData&&l.push(jut(this.id,this.processedData)),c&&l.push(Gut());const{dataModel:h,processedData:u}=await this.requestDataModel(t,this.data,{props:[Put(e,o,{id:"xValue"}),E$(i,r,{id:"yLowValue"}),E$(s,r,{id:"yHighValue"}),...l]});this.dataAggregationFilters=this.aggregateData(h,u),this.animationState.transition("updateData")}aggregateData(t,e){const i=this.axes[Ks.X];if(i==null||!(Zut.is(i.scale)||Xut.is(i.scale)))return;const s=t.resolveKeysById(this,"xValue",e),a=t.resolveColumnById(this,"yHighValue",e),n=t.resolveColumnById(this,"yLowValue",e),{index:o}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[o];return yut(s,a,n,r)}xCoordinateRange(t){const e=this.axes[Ks.X].scale.convert(t);return[e,e]}yCoordinateRange(t){const e=this.axes[Ks.Y].scale.convert(t[0]);return[e,e]}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!(e&&i))return[];const{domain:{keys:[s]}}=e;if(t===Ks.X){const a=i.resolveProcessedDataDefById(this,"xValue");return a?.def.type==="key"&&a.def.valueType==="category"?s:B$(Hut(s))}else{const a=this.domainForClippedRange(Ks.Y,["yHighValue","yLowValue"],"xValue"),n=qut(a);return B$(n)}}getSeriesRange(t,e){return this.domainForVisibleRange(Ks.Y,["yHighValue","yLowValue"],"xValue",e)}createNodeData(){const{data:t,dataModel:e,processedData:i,axes:s}=this,a=s[Ks.X],n=s[Ks.Y];if(!(t&&a&&n&&e&&i))return;const o=a.scale,r=n.scale,{xKey:l,yLowKey:c,yHighKey:h,connectMissingData:u,marker:d,interpolation:p}=this.properties,g=i.dataSources.get(this.id)??[],f=(o.bandwidth??0)/2,x=e.resolveKeysById(this,"xValue",i),m=e.resolveColumnById(this,"yHighValue",i),b=e.resolveColumnById(this,"yLowValue",i),v=W=>o.convert(x[W])+f,M=[],D=[],L=[],C=(W,j,U)=>{const Z=g[W],X=x[W];if(X==null)return;const q=L[L.length-1];if(Number.isFinite(j)&&Number.isFinite(U)){const tt=(xt,kt,Dt)=>{D.push({index:W,series:this,itemId:xt,datum:Z,datumIndex:W,midPoint:{x:at,y:Dt},yHighValue:j,yLowValue:U,xValue:X,xKey:l,yLowKey:c,yHighKey:h,point:{x:at,y:Dt,size:ct},enabled:!0});const St=this.createLabelData({datumIndex:W,point:{x:at,y:Dt},value:kt,yLowValue:U,yHighValue:j,itemId:xt,inverted:J,datum:Z,series:this});M.push(St)},J=U>j,at=v(W),et=r.convert(j),it=r.convert(U),{size:ct}=d;tt("high",j,et),tt("low",U,it);const ht={high:{point:{x:at,y:et},xDatum:X,yDatum:j},low:{point:{x:at,y:it},xDatum:X,yDatum:U}};Array.isArray(q)?q.push(ht):q!=null?(q.skip+=1,L.push([ht])):L.push([ht])}else u||(Array.isArray(q)||q==null?L.push({skip:0}):q.skip+=1)},{dataAggregationFilters:A}=this,[T,N]=o.range,O=N-T,E=A?.find(W=>W.maxRange>O),z=E?.topIndices,B=E?.bottomIndices;let[F,V]=this.visibleRange("xValue",a.range,z);F=Math.max(F-1,0),V=Math.min(V+1,z?.length??x.length),i.input.count<1e3&&(F=0,V=i.input.count);for(let W=F;W<V;W+=1){const j=z?.[W]??W,U=B?.[W]??W;C(j,m[j],b[U])}const G=L.flatMap(W=>{if(!Array.isArray(W))return[];const j=W.map(U=>U.high);return j$(j,p)}),H=L.flatMap(W=>{if(!Array.isArray(W))return[];const j=W.map(U=>U.low);return j$(j,p)});return{itemId:`${c}-${h}`,labelData:M,nodeData:D,fillData:{itemId:"high",spans:G,phantomSpans:H},highStrokeData:{itemId:"high",spans:G},lowStrokeData:{itemId:"low",spans:H},scales:this.calculateScaling(),visible:this.visible}}createLabelData({datumIndex:t,point:e,value:i,itemId:s,inverted:a,datum:n,series:o}){const{xKey:r,yLowKey:l,yHighKey:c,xName:h,yName:u,yLowName:d,yHighName:p,label:g}=this.properties,{placement:f,padding:x=10}=g;let m=s;a&&(m=s==="low"?"high":"low");const b=f==="outside"&&m==="high"||f==="inside"&&m==="low"?-1:1,v=this.getSeriesDomain(Ks.Y);return{x:e.x,y:e.y+x*b,series:o,itemId:s,datum:n,datumIndex:t,text:this.getLabelText(i,n,s==="high"?c:l,"y",v,g,{value:i,datum:n,itemId:s,xKey:r,yLowKey:l,yHighKey:c,xName:h,yLowName:d,yHighName:p,yName:u}),textAlign:"center",textBaseline:b===-1?"bottom":"top"}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{visible:e}=t,[i,s]=t.paths,{strokeWidth:a,stroke:n,strokeOpacity:o,lineDash:r,lineDashOffset:l,fill:c,fillOpacity:h,opacity:u}=R$(this.getHighlightStyle(),this.properties);s.setProperties({fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:zO.None,stroke:n,strokeWidth:a,strokeOpacity:o,lineDash:r,lineDashOffset:l,opacity:u,visible:e});const d=Jut(c,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults),p=this.getShapeFillBBox();Uut(i,d,p),tdt(i,{stroke:void 0,fill:d,fillOpacity:h,lineDash:r,lineDashOffset:l,strokeOpacity:o,strokeWidth:a,opacity:u},void 0,p),i.setProperties({pointerEvents:zO.None,lineJoin:"round",fillShadow:this.properties.shadow,opacity:u,visible:e}),F$(this,s),F$(this,i)}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("RangeArea")}updateFillPath(t,e){const[i]=t;i.path.clear(),Wut(i,e.fillData),i.markDirty("RangeArea")}updateStrokePath(t,e){const[,i]=t;i.path.clear(),G$(i,e.highStrokeData.spans),G$(i,e.lowStrokeData.spans),i.markDirty("RangeArea")}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,e){const{properties:i}=this,{marker:s}=i,a=this.getHighlightStyle(t,e?.datumIndex);return{shape:s.shape,size:s.size,fill:a?.fill??s.fill,fillOpacity:a?.fillOpacity??s.fillOpacity,stroke:a?.stroke??s.stroke,strokeWidth:a?.strokeWidth??this.getStrokeWidth(s.strokeWidth),strokeOpacity:a?.strokeOpacity??s.strokeOpacity,lineDash:a?.lineDash??s.lineDash,lineDashOffset:a?.lineDashOffset??s.lineDashOffset,opacity:a.opacity??1}}getMarkerItemStyleOverrides(t,e,i,s){const{id:a,properties:n}=this,{xKey:o,yHighKey:r,yLowKey:l,marker:c}=n,{itemStyler:h}=c;if(h!=null)return this.cachedDatumCallback($ut(t,s?"highlight":"node"),()=>this.callWithContext(h,{seriesId:a,datum:e,xKey:o,yHighKey:r,yLowKey:l,highlighted:s,...i}))}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yLowKey:a,yHighKey:n,marker:o,fill:r,stroke:l,strokeWidth:c,fillOpacity:h,strokeOpacity:u}=this.properties,d=this.getShapeFillBBox(),p=o.getStyle();e.each((g,f)=>{const x=R$(this.getHighlightStyle(i,f?.datumIndex),p,{fill:r,fillOpacity:h,stroke:l,strokeWidth:c,strokeOpacity:u});this.updateMarkerStyle(o,g,f.datum,f.point,{xKey:s,yHighKey:n,yLowKey:a},i,x,d)}),i||this.properties.marker.markClean()}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e,s=>{s.pointerEvents=zO.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{e.fillOpacity=this.getHighlightStyle(!1,i.datumIndex).opacity??1,_ut(e,this.properties.label,i)})}getHighlightLabelData(t,e){const i=t.filter(s=>s.datum===e.datum);return i.length>0?i:void 0}getHighlightData(t,e){const i=t.filter(s=>s.datum===e.datum);return i.length>0?i:void 0}getTooltipContent(t,e){const{id:i,dataModel:s,processedData:a,axes:n,properties:o}=this,{xName:r,yName:l,yLowKey:c,yLowName:h,xKey:u,yHighKey:d,yHighName:p,tooltip:g,legendItemName:f}=o,x=n[Ks.X],m=n[Ks.Y];if(!s||!a||!x||!m)return;const b=a.dataSources.get(this.id)?.[t],v=s.resolveKeysById(this,"xValue",a)[t],M=s.resolveColumnById(this,"yHighValue",a)[t],D=s.resolveColumnById(this,"yLowValue",a)[t];if(v==null)return;const L=this.getMarkerItemBaseStyle(!1);Object.assign(L,this.getMarkerItemStyleOverrides(String(t),t,L,!1));const C=`${m.formatDatum(D,"tooltip",i,f,b,c)} - ${m.formatDatum(M,"tooltip",i,f,b,d)}`;return this.formatTooltipWithContext(g,{heading:x.formatDatum(v,"tooltip",i,f,b,u),symbol:this.legendItemSymbol(),data:[{label:l,fallbackLabel:`${h??c} - ${p??d}`,value:C}]},{seriesId:i,datum:b,title:l,itemId:e?.itemId??"unknown",xName:r,yName:l,yLowKey:c,yLowName:h,xKey:u,yHighKey:d,yHighName:p,...L})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,strokeOpacity:s,lineDash:a,marker:n}=this.properties;return{marker:Qut({shape:n.shape,fill:n.fill??t,stroke:n.stroke??e,fillOpacity:n.fillOpacity,strokeOpacity:n.strokeOpacity,strokeWidth:n.strokeWidth,lineDash:n.lineDash,lineDashOffset:n.lineDashOffset},n.fillGradientDefaults,n.fillPatternDefaults,n.fillImageDefaults),line:{stroke:e,strokeOpacity:s,strokeWidth:i,lineDash:a}}}getLegendData(t){if(t!=="category")return[];const{id:e,visible:i}=this,{yLowKey:s,yHighKey:a,yName:n,yLowName:o,yHighName:r,showInLegend:l}=this.properties,c=n??`${o??s} - ${r??a}`,h=`${s}-${a}`;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 Kut}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,contextData:s,paths:a}=t,{animationManager:n}=this.ctx;this.updateAreaPaths(a,s),zut(this,n,...a),Fut([e],z$),Vut(this,n,e),BO(this,"labels",n,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:s,contextData:a,paths:n,previousContextData:o}=t,[r,l]=n;if(r==null&&l==null)return;this.resetMarkerAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateAreaPaths(n,a)},h=()=>{e.skipCurrentBatch(),c()};if(a==null||o==null){c(),H$(this,e,"added",i),W$(this,"fill_path_properties",e,"add",r),W$(this,"stroke_path_properties",e,"add",l),BO(this,"labels",e,s);return}const u=Out(a,o,this.processedData?.reduced?.diff?.[this.id]);if(u===void 0){h();return}else if(u.status==="no-op")return;$$(this.id,"fill_path_properties",e,[r],u.fill.pathProperties),$$(this.id,"stroke_path_properties",e,[l],u.stroke.pathProperties),u.status==="added"?this.updateAreaPaths(n,a):u.status==="removed"?this.updateAreaPaths(n,o):(U$(this.id,"fill_path_update",e,[r],u.fill.path),U$(this.id,"stroke_path_update",e,[l],u.stroke.path)),u.hasMotion&&(H$(this,e,void 0,i),BO(this,"labels",e,s)),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(n,a)})}getFormattedMarkerStyle(t){const{xKey:e,yLowKey:i,yHighKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,t.datum,{xKey:e,yLowKey:i,yHighKey:s},!0)}computeFocusBounds(t){const e=V$(this,t),i=V$(this,{...t,datumIndex:t.datumIndex+1});if(e&&i)return Yut.merge([e,i])}isDatumEnabled(t,e){return e%2===0&&super.isDatumEnabled(t,e)}};TD.className="RangeAreaSeries",TD.type="range-area";var idt=(_(),w(P)),ra=(R(),w(st)),{commonSeriesOptionsDefs:sdt,rangeAreaSeriesThemeableOptionsDef:adt}=idt._ModuleSupport,FO={...sdt,...adt,type:(0,ra.required)((0,ra.constant)("range-area")),xKey:(0,ra.required)(ra.string),yLowKey:(0,ra.required)(ra.string),yHighKey:(0,ra.required)(ra.string),xName:ra.string,yName:ra.string,yLowName:ra.string,yHighName:ra.string};FO.pickOutsideVisibleMinorAxis=(0,ra.undocumented)(ra.boolean),FO.focusPriority=(0,ra.undocumented)(ra.number);var $x=(_(),w(P)),ndt={series:{fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:$x._ModuleSupport.FILL_PATTERN_DEFAULTS,stroke:{$palette:"stroke"},fillOpacity:.7,nodeClickRange:"nearest",marker:{enabled:!1,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:$x._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:$x._ModuleSupport.FILL_IMAGE_DEFAULTS,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"},tooltip:{range:{$path:["/tooltip/range","nearest"]}},highlight:$x._ModuleSupport.multiSeriesHighlightStyle()},axes:{[$x._ModuleSupport.ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},{ThemeConstants:{CARTESIAN_AXIS_TYPE:K$,CARTESIAN_POSITION:Y$}}=fut._ModuleSupport,odt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"range-area",moduleFactory:t=>new TD(t),defaultAxes:[{type:K$.NUMBER,position:Y$.LEFT},{type:K$.CATEGORY,position:Y$.BOTTOM}],themeTemplate:ndt},Z$={type:"series",name:"range-area",chartType:"cartesian",enterprise:!0,options:FO,create:t=>new TD(t)},rdt=(_(),w(P)),ND=(_(),w(P)),ldt=1e3,cdt=5;function hdt(t,e,i,s){if(t.length<ldt)return;const[a,n]=Fx(s);let o=zx(t,cdt),{indexData:r,valueData:l}=Vx(t,e,i,a,n,o);const c=[{maxRange:o,indexData:r}];for(;o>64;)({indexData:r,valueData:l,maxRange:o}=Gx(r,l,o)),c.push({maxRange:o,indexData:r});return c.reverse(),c}var udt=(_(),w(P)),{AbstractBarSeriesProperties:ddt,FillGradientDefaults:pdt,FillPatternDefaults:gdt,FillImageDefaults:fdt,makeSeriesTooltip:mdt,Property:je,DropShadow:ydt,Label:xdt}=udt._ModuleSupport,VO=class extends xdt{constructor(){super(...arguments),this.placement="inside",this.padding=6}};y([je],VO.prototype,"placement",2),y([je],VO.prototype,"padding",2);var ei=class extends ddt{constructor(){super(...arguments),this.fill="#99CCFF",this.fillGradientDefaults=new pdt,this.fillPatternDefaults=new gdt,this.fillImageDefaults=new fdt,this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.shadow=new ydt().set({enabled:!1}),this.label=new VO,this.tooltip=mdt(),this.fastDataProcessing=!1}};y([je],ei.prototype,"xKey",2),y([je],ei.prototype,"yLowKey",2),y([je],ei.prototype,"yHighKey",2),y([je],ei.prototype,"xName",2),y([je],ei.prototype,"yName",2),y([je],ei.prototype,"yLowName",2),y([je],ei.prototype,"yHighName",2),y([je],ei.prototype,"fill",2),y([je],ei.prototype,"fillGradientDefaults",2),y([je],ei.prototype,"fillPatternDefaults",2),y([je],ei.prototype,"fillImageDefaults",2),y([je],ei.prototype,"fillOpacity",2),y([je],ei.prototype,"stroke",2),y([je],ei.prototype,"strokeWidth",2),y([je],ei.prototype,"strokeOpacity",2),y([je],ei.prototype,"lineDash",2),y([je],ei.prototype,"lineDashOffset",2),y([je],ei.prototype,"cornerRadius",2),y([je],ei.prototype,"itemStyler",2),y([je],ei.prototype,"shadow",2),y([je],ei.prototype,"label",2),y([je],ei.prototype,"tooltip",2),y([je],ei.prototype,"fastDataProcessing",2);var{SeriesNodePickMode:X$,valueProperty:q$,keyProperty:bdt,ChartAxisDirection:Ux,checkCrisp:vdt,updateLabelNode:Sdt,SMALLEST_KEY_INTERVAL:Mdt,LARGEST_KEY_INTERVAL:Ddt,diff:kdt,prepareBarAnimationFunctions:Q$,midpointStartingBarPosition:J$,resetBarSelectionsFn:Idt,fixNumericExtent:Adt,seriesLabelFadeInAnimation:tU,resetLabelFn:Cdt,animationValidation:Ldt,computeBarFocusBounds:wdt,visibleRangeIndices:eU,createDatumId:Tdt,ContinuousScale:iU,DiscreteTimeScale:Ndt,Rect:Odt,PointerEvents:Pdt,motion:sU,applyShapeStyle:_dt,findMinMax:Edt,getShapeStyle:GO,areScalingEqual:Rdt}=ND._ModuleSupport,Bdt=class extends ND._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.yLowKey=s.properties.yLowKey,this.yHighKey=s.properties.yHighKey}},OD=class extends ND._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,pickModes:[X$.AXIS_ALIGNED,X$.EXACT_SHAPE_MATCH],hasHighlightedLabels:!0,propertyKeys:{x:["xKey"],y:["yLowKey","yHighKey"]},propertyNames:{x:["xName"],y:["yLowName","yHighName","yName"]},categoryKey:"xValue",datumSelectionGarbageCollection:!1,animationResetFns:{datum:Idt,label:Cdt}}),this.properties=new ei,this.dataAggregationFilters=void 0,this.NodeEvent=Bdt}async processData(t){const{xKey:e,yLowKey:i,yHighKey:s,fastDataProcessing:a}=this.properties,n=!a,o=this.getCategoryAxis()?.scale,r=this.getValueAxis()?.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:o,yScale:r}),u=[];this.ctx.animationManager.isSkipped()||(this.processedData&&u.push(kdt(this.id,this.processedData)),u.push(Ldt()));const d=this.visible?{}:{forceValue:0},{dataModel:p,processedData:g}=await this.requestDataModel(t,this.data,{props:[bdt(e,c,{id:"xValue"}),q$(i,h,{id:"yLowValue",invalidValue:null,...d}),q$(s,h,{id:"yHighValue",invalidValue:null,...d}),...l?[Mdt,Ddt]:[],...u],groupByKeys:n});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[Ux.X];if(i==null||!(iU.is(i.scale)||Ndt.is(i.scale)))return;const s=t.resolveKeysById(this,"xValue",e),a=t.resolveColumnById(this,"yHighValue",e),n=t.resolveColumnById(this,"yLowValue",e),{index:o}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[o];return hdt(s,a,n,r)}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!e||!i)return[];const{keys:[s]}=e.domain;if(t===this.getCategoryDirection()){const a=i.resolveProcessedDataDefById(this,"xValue");return a?.def.type==="key"&&a?.def.valueType==="category"?s:this.padBandExtent(s)}else{const a=this.domainForClippedRange(t,["yHighValue","yLowValue"],"xValue"),n=Edt(a);return Adt(n)}}getSeriesRange(t,e){return this.domainForVisibleRange(Ux.Y,["yHighValue","yLowValue"],"xValue",e)}createNodeData(){const{data:t,dataModel:e,groupScale:i,processedData:s,visible:a}=this,n=this.getCategoryAxis(),o=this.getValueAxis();if(!(t&&n&&o&&e&&s?.dataSources))return;const r=n.scale,l=o.scale,c=this.getBarDirection()===Ux.X,{xKey:h,yLowKey:u,yHighKey:d,strokeWidth:p}=this.properties,g=`${u}-${d}`,f={itemId:g,nodeData:[],labelData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible};if(!a)return f;const x=s.dataSources.get(this.id)??[],m=e.resolveKeysById(this,"xValue",s),b=e.resolveColumnById(this,"yLowValue",s),v=e.resolveColumnById(this,"yHighValue",s),{barWidth:M,groupIndex:D}=this.updateGroupScale(n),L=iU.is(r)?M*-.5:0,C=i.convert(String(D)),A=vdt(n?.scale,n?.visibleRange,this.smallestDataInterval,this.largestDataInterval),T=V=>Math.round(r.convert(m[V]))+C+L,N=(V,G,H,$,W,j,U)=>{const Z=x[V],X=m[V];if(X==null)return;const q=b[V],tt=v[V];if(!Number.isFinite(q?.valueOf())||!Number.isFinite(tt?.valueOf()))return;const[J,at]=q<tt?[q,tt]:[tt,q],et=Math.round(l.convert(j)),it=Math.round(l.convert(W)),ct=Math.max(p,Math.abs(it-et)),ht={x:c?Math.min(et,it):H,y:c?H:Math.min(et,it),width:c?ct:$,height:c?$:ct},xt={x:ht.x+ht.width/2,y:ht.y+ht.height/2},kt=this.createLabelData({datumIndex:V,rect:ht,barAlongX:c,yLowValue:J,yHighValue:at,datum:Z,series:this}),Dt={index:G,valueIndex:V,series:this,itemId:g,datum:Z,datumIndex:V,xValue:X,yLowValue:q,yHighValue:tt,yLowKey:u,yHighKey:d,xKey:h,x:ht.x,y:ht.y,width:ht.width,height:ht.height,midPoint:xt,crisp:U,labels:kt};f.nodeData.push(Dt),f.labelData.push(...kt)},{dataAggregationFilters:O}=this,[E,z]=r.range,B=z-E,F=O?.find(V=>V.maxRange>B);if(F!=null){const{maxRange:V,indexData:G}=F,[H,$]=eU(1,V,n.range,W=>{const j=W*In,U=G[j+$s],Z=G[j+Da];if(U===-1)return;const X=(U+Z)/2|0;return[T(X),T(Z)+M]});for(let W=H;W<$;W+=1){const j=W*In,U=G[j+$s],Z=G[j+Da],X=G[j+Ha],q=G[j+$a];if(U===-1)continue;const tt=(U+Z)/2|0;if(m[tt]==null)continue;const at=T(tt),et=Math.abs(T(U)-T(Z))+M,it=b[X],ct=v[q];N(tt,0,at,et,it,ct,!1)}}else if(s.type==="ungrouped"){let[V,G]=eU(1,x.length,n.range,H=>[T(H),M]);s.input.count<1e3&&(V=0,G=s.input.count);for(let H=V;H<G;H+=1){const $=T(H),W=M,j=b[H],U=v[H];N(H,0,$,W,j,U,A)}}else for(const{datumIndex:V,groupIndex:G}of e.forEachGroupDatum(this,s)){const H=T(V),$=M,W=b[V],j=v[V];N(V,G,H,$,W,j,A)}return f}createLabelData({datumIndex:t,rect:e,barAlongX:i,yLowValue:s,yHighValue:a,datum:n,series:o}){const{xKey:r,yLowKey:l,yHighKey:c,xName:h,yLowName:u,yHighName:d,yName:p,label:g}=this.properties,f={datum:n,xKey:r,yLowKey:l,yHighKey:c,xName:h,yLowName:u,yHighName:d,yName:p},{placement:x,padding:m}=g,v=m*(x==="outside"?1:-1),M=this.getSeriesDomain(Ux.Y),D={datumIndex:t,x:e.x+(i?-v:e.width/2),y:e.y+(i?e.height/2:e.height+v),textAlign:i?"left":"center",textBaseline:i?"middle":"bottom",text:this.getLabelText(s,n,l,"y",M,g,{itemId:"low",value:s,...f}),itemId:"low",datum:n,series:o},L={datumIndex:t,x:e.x+(i?e.width+v:e.width/2),y:e.y+(i?e.height/2:-v),textAlign:i?"right":"center",textBaseline:i?"middle":"top",text:this.getLabelText(a,n,c,"y",M,g,{itemId:"high",value:a,...f}),itemId:"high",datum:n,series:o};return x==="outside"&&(D.textAlign=i?"right":"center",D.textBaseline=i?"middle":"top",L.textAlign=i?"left":"center",L.textBaseline=i?"middle":"bottom"),[D,L]}nodeFactory(){return new Odt}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,s=e??[];return i.update(s,void 0,a=>this.getDatumId(a))}getItemBaseStyle(t,e){const{properties:i}=this,{cornerRadius:s,fillGradientDefaults:a,fillPatternDefaults:n,fillImageDefaults:o}=i,r=this.getHighlightStyle(t,e?.datumIndex);return GO({fill:r?.fill??i.fill,fillOpacity:r?.fillOpacity??i.fillOpacity,stroke:r?.stroke??i.stroke,strokeWidth:r?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:r?.strokeOpacity??i.strokeOpacity,lineDash:r?.lineDash??i.lineDash??[],lineDashOffset:r?.lineDashOffset??i.lineDashOffset,cornerRadius:r?.cornerRadius??s,opacity:r?.opacity??1},a,n,o)}getItemStyleOverrides(t,e,i,s){const{id:a,properties:n}=this,{xKey:o,yHighKey:r,yLowKey:l,itemStyler:c,fillGradientDefaults:h,fillPatternDefaults:u,fillImageDefaults:d}=n;if(c==null)return;const p=this.cachedDatumCallback(Tdt(t,s?"highlight":"node"),()=>this.callWithContext(c,{seriesId:a,datum:e,xKey:o,yHighKey:r,yLowKey:l,highlighted:s,...i}));return GO(p,h,u,d)}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getCategoryDirection()===Ux.X,a=this.getShapeFillBBox();e.each((n,o)=>{const r=this.getItemBaseStyle(i,o),l=this.getItemStyleOverrides(String(o.datumIndex),o.datum,r,i);_dt(n,r,l,a),n.cornerRadius=l?.cornerRadius??r.cornerRadius,n.visible=s?o.width>0:o.height>0,n.crisp=o.crisp})}getHighlightLabelData(t,e){const i=t.filter(s=>s.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=Pdt.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{e.fillOpacity=this.getHighlightStyle(!1,i?.datumIndex).opacity??1,Sdt(e,this.properties.label,i)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a}=this,{xKey:n,xName:o,yName:r,yLowKey:l,yHighKey:c,yLowName:h,yHighName:u,tooltip:d,legendItemName:p}=a,g=this.getCategoryAxis(),f=this.getValueAxis();if(!i||!s||!g||!f)return;const x=s.dataSources.get(this.id)?.[t],m=i.resolveKeysById(this,"xValue",s)[t],b=i.resolveColumnById(this,"yHighValue",s)[t],v=i.resolveColumnById(this,"yLowValue",s)[t];if(m==null)return;const M=this.getItemBaseStyle(!1);Object.assign(M,this.getItemStyleOverrides(String(t),x,M,!1));const D=`${f.formatDatum(v,"tooltip",e,p,x,l)} - ${f.formatDatum(b,"tooltip",e,p,x,c)}`;return this.formatTooltipWithContext(d,{heading:g.formatDatum(m,"tooltip",e,p,x,n),symbol:this.legendItemSymbol(),data:[{label:r,fallbackLabel:`${h??l} - ${u??c}`,value:D}]},{seriesId:e,datum:x,title:r,xKey:n,xName:o,yName:r,yLowKey:l,yHighKey:c,yLowName:h,yHighName:u,...M})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,fillOpacity:s,strokeOpacity:a,lineDash:n,lineDashOffset:o,fillGradientDefaults:r,fillPatternDefaults:l,fillImageDefaults:c}=this.properties;return{marker:GO({fill:t,stroke:e,fillOpacity:s,strokeOpacity:a,strokeWidth:i,lineDash:n,lineDashOffset:o},r,l,c)}}getLegendData(t){if(t!=="category")return[];const{id:e,visible:i}=this,{yName:s,yLowName:a,yHighName:n,yLowKey:o,yHighKey:r,showInLegend:l}=this.properties,c=s??`${a??o} - ${n??r}`,h=`${o}-${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=Q$(J$(this.isVertical(),"normal"));sU.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],i),tU(this,"labels",this.ctx.animationManager,e)}animateWaitingUpdateReady(t){const{datumSelection:e,labelSelection:i,contextData:s,previousContextData:a}=t,n=ND._ModuleSupport.calculateDataDiff(this.id,e,this.getDatumId.bind(this),s,a,this.processedData);this.ctx.animationManager.stopByAnimationGroupId(this.id);const o=a==null?"fade":"normal",r=Q$(J$(this.isVertical(),o));sU.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],r,(l,c)=>this.getDatumId(c),n),(n?.changed||!Rdt(s.groupScale,a?.groupScale))&&tU(this,"labels",this.ctx.animationManager,i)}getDatumId(t){return`${t.xValue}-${t.valueIndex}`}isLabelEnabled(){return this.properties.label.enabled}onDataChange(){}computeFocusBounds({datumIndex:t}){return wdt(this,this.contextNodeData?.nodeData[t])}};OD.className="RangeBarSeries",OD.type="range-bar";var zdt=(_(),w(P)),ws=(R(),w(st)),{commonSeriesOptionsDefs:Fdt,rangeBarSeriesThemeableOptionsDef:Vdt}=zdt._ModuleSupport,PD={...Fdt,...Vdt,type:(0,ws.required)((0,ws.constant)("range-bar")),xKey:(0,ws.required)(ws.string),yLowKey:(0,ws.required)(ws.string),yHighKey:(0,ws.required)(ws.string),xName:ws.string,yName:ws.string,yLowName:ws.string,yHighName:ws.string};PD.pickOutsideVisibleMinorAxis=(0,ws.undocumented)(ws.boolean),PD.fastDataProcessing=(0,ws.undocumented)(ws.boolean),PD.focusPriority=(0,ws.undocumented)(ws.number);var _D=(_(),w(P)),Gdt={series:{direction:"vertical",fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:_D._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:_D._ModuleSupport.FILL_IMAGE_DEFAULTS,strokeWidth:{$isUserOption:["./stroke",2,0]},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"},placement:"inside"},highlight:_D._ModuleSupport.multiSeriesHighlightStyle()},axes:{[_D._ModuleSupport.ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},jdt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"range-bar",moduleFactory:t=>new OD(t),defaultAxes:rdt._ModuleSupport.DIRECTION_SWAP_AXES,themeTemplate:Gdt,groupable:!0},aU={type:"series",name:"range-bar",chartType:"cartesian",enterprise:!0,options:PD,create:t=>new OD(t)},Wdt=(_(),w(P)),Xd=(_(),w(P)),Hdt=(_(),w(P)),{AbstractBarSeriesProperties:$dt,BaseProperties:Kx,FillGradientDefaults:Udt,FillPatternDefaults:Kdt,FillImageDefaults:Ydt,PropertiesArray:Zdt,makeSeriesTooltip:Xdt,Property:Ht,DropShadow:qdt,Label:Qdt}=Hdt._ModuleSupport,ED=class extends Kx{};y([Ht],ED.prototype,"totalType",2),y([Ht],ED.prototype,"index",2),y([Ht],ED.prototype,"axisLabel",2);var nU=class extends Kx{};y([Ht],nU.prototype,"renderer",2);var jO=class extends Qdt{constructor(){super(...arguments),this.placement="outside-end",this.padding=6}};y([Ht],jO.prototype,"placement",2),y([Ht],jO.prototype,"padding",2);var gs=class extends Kx{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new Udt,this.fillPatternDefaults=new Kdt,this.fillImageDefaults=new Ydt,this.stroke="#c16068",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=1,this.cornerRadius=0,this.shadow=new qdt().set({enabled:!1}),this.label=new jO,this.tooltip=new nU}};y([Ht],gs.prototype,"name",2),y([Ht],gs.prototype,"fill",2),y([Ht],gs.prototype,"fillGradientDefaults",2),y([Ht],gs.prototype,"fillPatternDefaults",2),y([Ht],gs.prototype,"fillImageDefaults",2),y([Ht],gs.prototype,"stroke",2),y([Ht],gs.prototype,"fillOpacity",2),y([Ht],gs.prototype,"strokeOpacity",2),y([Ht],gs.prototype,"lineDash",2),y([Ht],gs.prototype,"lineDashOffset",2),y([Ht],gs.prototype,"strokeWidth",2),y([Ht],gs.prototype,"cornerRadius",2),y([Ht],gs.prototype,"itemStyler",2),y([Ht],gs.prototype,"shadow",2),y([Ht],gs.prototype,"label",2),y([Ht],gs.prototype,"tooltip",2);var qd=class extends Kx{constructor(){super(...arguments),this.enabled=!0,this.stroke="black",this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=2}};y([Ht],qd.prototype,"enabled",2),y([Ht],qd.prototype,"stroke",2),y([Ht],qd.prototype,"strokeOpacity",2),y([Ht],qd.prototype,"lineDash",2),y([Ht],qd.prototype,"lineDashOffset",2),y([Ht],qd.prototype,"strokeWidth",2);var RD=class extends Kx{constructor(){super(...arguments),this.positive=new gs,this.negative=new gs,this.total=new gs}};y([Ht],RD.prototype,"positive",2),y([Ht],RD.prototype,"negative",2),y([Ht],RD.prototype,"total",2);var lc=class extends $dt{constructor(){super(...arguments),this.item=new RD,this.totals=new Zdt(ED),this.line=new qd,this.tooltip=Xdt()}};y([Ht],lc.prototype,"xKey",2),y([Ht],lc.prototype,"yKey",2),y([Ht],lc.prototype,"xName",2),y([Ht],lc.prototype,"yName",2),y([Ht],lc.prototype,"item",2),y([Ht],lc.prototype,"totals",2),y([Ht],lc.prototype,"line",2),y([Ht],lc.prototype,"tooltip",2);var{adjustLabelPlacement:Jdt,SeriesNodePickMode:oU,fixNumericExtent:tpt,valueProperty:rU,keyProperty:ept,accumulativeValueProperty:BD,trailingAccumulatedValueProperty:ipt,ChartAxisDirection:zD,createDatumId:spt,checkCrisp:apt,updateLabelNode:npt,prepareBarAnimationFunctions:opt,collapsedStartingBarPosition:rpt,resetBarSelectionsFn:lpt,seriesLabelFadeInAnimation:cpt,resetLabelFn:hpt,animationValidation:upt,DEFAULT_CARTESIAN_DIRECTION_KEYS:dpt,DEFAULT_CARTESIAN_DIRECTION_NAMES:ppt,computeBarFocusBounds:gpt,isContinuous:lU,Rect:fpt,motion:mpt,applyShapeStyle:ypt,getShapeStyle:WO}=Xd._ModuleSupport,FD=class extends Xd._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,propertyKeys:dpt,propertyNames:ppt,categoryKey:void 0,pickModes:[oU.NEAREST_NODE,oU.EXACT_SHAPE_MATCH],pathsPerSeries:["connector"],hasHighlightedLabels:!0,pathsZIndexSubOrderOffset:[-1,-1],animationResetFns:{datum:lpt,label:hpt}}),this.properties=new lc,this.seriesItemTypes=new Set(["positive","negative","total"])}async processData(t){const{xKey:e,yKey:i,totals:s}=this.properties,{data:a=[]}=this;if(!this.visible)return;const n=b=>lU(b)&&Number(b)>=0,o=b=>lU(b)&&Number(b)>=0,r=b=>b==="total"||b==="subtotal",l={missingValue:void 0,invalidValue:void 0},c=[],h=s.reduce((b,v)=>{const M=b.get(v.index);return M?M.push(v):b.set(v.index,[v]),b},new Map);a.forEach((b,v)=>{c.push(b),h.get(v)?.forEach(M=>c.push({...M.toJson(),[e]:M.axisLabel}))});const u=[];this.ctx.animationManager.isSkipped()||u.push(upt());const d=this.getCategoryAxis()?.scale,p=this.getValueAxis()?.scale,{isContinuousX:g,xScaleType:f,yScaleType:x}=this.getScaleInformation({xScale:d,yScale:p}),{processedData:m}=await this.requestDataModel(t,c,{props:[ept(e,f,{id:"xValue"}),BD(i,x,{...l,id:"yCurrent"}),BD(i,x,{...l,missingValue:0,id:"yCurrentTotal"}),BD(i,x,{...l,id:"yCurrentPositive",validation:n}),BD(i,x,{...l,id:"yCurrentNegative",validation:o}),ipt(i,x,{...l,id:"yPrevious"}),rU(i,x,{id:"yRaw"}),rU("totalType","band",{id:"totalTypeValue",missingValue:void 0,validation:r}),...g?[Xd._ModuleSupport.SMALLEST_KEY_INTERVAL,Xd._ModuleSupport.LARGEST_KEY_INTERVAL]:[],...u]});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:[s],values:a}=e.domain;if(t===this.getCategoryDirection()){const n=i.resolveProcessedDataDefById(this,"xValue");if(n?.def.type==="key"&&n?.def.valueType==="category")return s;const o=t===zD.Y,r=this.getCategoryAxis().isReversed();return this.padBandExtent(s,r!==o)}else{const n=i.resolveProcessedDataIndexById(this,"yCurrent"),o=a[n],r=[Math.min(0,o[0]),Math.max(0,o[1])];return tpt(r)}}getSeriesRange(t,e){return[NaN,NaN]}createNodeData(){const{data:t,dataModel:e,processedData:i}=this,s=this.getCategoryAxis(),a=this.getValueAxis();if(!t||!s||!a||!e||!i)return;const{line:n}=this.properties,o=s.scale,r=a.scale,l=this.getBarDirection()===zD.X,c=this.getBandwidth(s)??10,h=s.isReversed(),u=a.isReversed();if(i.type!=="ungrouped")return;const d={itemId:this.properties.yKey,nodeData:[],labelData:[],pointData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible};if(!this.visible)return d;const p=[],g=e.resolveKeysById(this,"xValue",i),f=e.resolveColumnById(this,"yRaw",i),x=e.resolveColumnById(this,"totalTypeValue",i),m=e.resolveColumnById(this,"yCurrent",i),b=e.resolveColumnById(this,"yPrevious",i),v=e.resolveColumnById(this,"yCurrentTotal",i),M=this.getSeriesDomain(zD.Y),D=apt(s?.scale,s?.visibleRange,this.smallestDataInterval,this.largestDataInterval);function L(F,V,G){return F||V?{cumulativeValue:v[G],trailingValue:V?A:0}:{cumulativeValue:m[G],trailingValue:b[G]}}function C(F,V,G,H,$){return F?H:V?(H??0)-($??0):G}let A=0;const{xKey:T,yKey:N,xName:O,yName:E}=this.properties;(i.dataSources.get(this.id)??[]).forEach((F,V)=>{const G=x[V],H=this.isSubtotal(G),$=this.isTotal(G),W=$||H,j=g[V];if(j==null)return;const U=Math.round(o.convert(j)),Z=f[V],{cumulativeValue:X,trailingValue:q}=L($,H,V);W&&(A=X??0);const tt=Math.round(r.convert(X)),J=Math.round(r.convert(q)),at=C($,H,Z,X,q),et=(at??0)>=0,it=this.getSeriesItemType(et,G),{strokeWidth:ct,label:ht}=this.getItemConfig(it),xt=et?tt:J,kt=et?J:tt,Dt=Math.max(ct,Math.abs(kt-xt)),St={x:l?Math.min(xt,kt):U,y:l?U:Math.min(xt,kt),width:l?Dt:c,height:l?c:Dt},Xt={x:St.x+St.width/2,y:St.y+St.height/2},ke=W?tt:J,ce=Math.floor(n.strokeWidth)%2/2,Ot=h?tt:ke,Vt=h?ke:tt;let qt,he;l?(qt={x:Ot+ce,y:St.y},he={x:Vt+ce,y:St.y+St.height}):(qt={x:St.x,y:Ot+ce},he={x:St.x+St.width,y:Vt+ce});const ai={x:h?he.x:qt.x,y:h?he.y:qt.y,x2:h?qt.x:he.x,y2:h?qt.y:he.y,size:0};p.push(ai);const ni=it==="subtotal"?"total":it,ys=this.getLabelText(at,F,N,"y",M,ht,{itemId:ni,value:at,datum:F,xKey:T,yKey:N,xName:O,yName:E}),Qa={index:V,series:this,itemId:it,datum:F,datumIndex:V,cumulativeValue:X??0,xValue:j,yValue:at,yKey:N,xKey:T,x:St.x,y:St.y,width:St.width,height:St.height,midPoint:Xt,crisp:D,label:{text:ys,...Jdt({isUpward:(at??-1)>=0!==u,isVertical:!l,placement:ht.placement,padding:ht.padding,rect:St})}};d.nodeData.push(Qa),d.labelData.push(Qa)});const B=this.properties.line.enabled;return m!=null&&B&&(d.pointData=p),d}updateSeriesItemTypes(){const{dataModel:t,seriesItemTypes:e,processedData:i}=this;if(!t||!i)return;e.clear();const s=t.resolveProcessedDataIndexById(this,"yCurrentPositive"),a=t.resolveProcessedDataIndexById(this,"yCurrentNegative"),n=t.resolveProcessedDataIndexById(this,"totalTypeValue"),o=i.domain.values[s]??[],r=i.domain.values[a]??[];o.length>0&&e.add("positive"),r.length>0&&e.add("negative");const l=i?.domain.values[n];l&&l.forEach(c=>{(c==="total"||c==="subtotal")&&e.add("total")})}isSubtotal(t){return t==="subtotal"}isTotal(t){return t==="total"}nodeFactory(){return new fpt}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,s=e??[];return i.update(s)}getItemStyle(t,e,i,s,a){const{id:n,properties:o}=this,r=o.item[i==="subtotal"?"total":i],l=this.getHighlightStyle(s,a?.datumIndex),{itemStyler:c,fillGradientDefaults:h,fillPatternDefaults:u,fillImageDefaults:d}=r,{xKey:p,yKey:g}=o,f=WO({fill:l?.fill??r.fill,fillOpacity:l?.fillOpacity??r.fillOpacity,stroke:l?.stroke??r.stroke,strokeWidth:l?.strokeWidth??r.strokeWidth,strokeOpacity:l?.strokeOpacity??r.strokeOpacity,lineDash:l?.lineDash??r.lineDash??[],lineDashOffset:l?.lineDashOffset??r.lineDashOffset,cornerRadius:l?.cornerRadius??r.cornerRadius,opacity:l?.opacity??1},h,u,d);if(c!=null){let x=this.cachedDatumCallback(spt(t,s?"highlight":"node"),()=>this.callWithContext(c,{seriesId:n,itemId:i,datum:e,xKey:p,yKey:g,highlighted:s,...f}));x=WO(x,h,u,d),Object.assign(f,x)}return f}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getCategoryDirection()===zD.X,a=this.getShapeFillBBox();e.each((n,o)=>{const r=o.itemId,l=this.getItemStyle(String(o.datumIndex),o.datum,r,i,o);ypt(n,l,void 0,a),n.visible=s?o.width>0:o.height>0,n.crisp=o.crisp})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;if(e.length===0)return i.update([]);const s=e.filter(a=>{const{label:n}=this.getItemConfig(a.itemId);return n.enabled});return i.update(s)}updateLabelNodes(t){t.labelSelection.each((e,i)=>{e.fillOpacity=this.getHighlightStyle(!1,i.datumIndex)?.opacity??1,npt(e,this.getItemConfig(i.itemId).label,i.label)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a}=this,{xKey:n,xName:o,yKey:r,yName:l,tooltip:c,legendItemName:h}=a,u=this.getCategoryAxis(),d=this.getValueAxis();if(!i||!s||!u||!d)return;const p=s.dataSources.get(this.id)?.[t],g=i.resolveKeysById(this,"xValue",s)[t],f=i.resolveColumnById(this,"yRaw",s)[t],x=i.resolveColumnById(this,"yCurrentTotal",s),m=i.resolveColumnById(this,"totalTypeValue",s);if(g==null)return;const b=m[t],v=(f??0)>=0,M=this.getSeriesItemType(v,b);let D;if(this.isTotal(b))D=x[t];else if(this.isSubtotal(b)){D=x[t];for(let C=t-1;C>=0;C-=1)if(this.isSubtotal(m[C])){D=D-x[C];break}}else D=f;const L=this.getItemStyle(String(t),p,M,!1);return this.formatTooltipWithContext(c,{heading:u.formatDatum(g,"tooltip",e,h,p,n),symbol:this.legendItemSymbol(M),data:[{label:l,fallbackLabel:r,value:d.formatDatum(D,"tooltip",e,h,p,r)}]},{seriesId:e,datum:p,title:l,itemId:M,xKey:n,xName:o,yKey:r,yName:l,...L})}legendItemSymbol(t){const{fill:e,stroke:i,fillOpacity:s,strokeOpacity:a,strokeWidth:n,lineDash:o,lineDashOffset:r,fillGradientDefaults:l,fillPatternDefaults:c,fillImageDefaults:h}=this.getItemConfig(t);return{marker:WO({fill:e,stroke:i,fillOpacity:s,strokeOpacity:a,strokeWidth:n,lineDash:o,lineDashOffset:r},l,c,h)}}getLegendData(t){if(t!=="category")return[];const{id:e,seriesItemTypes:i}=this,s=[],a=o=>o.charAt(0).toUpperCase()+o.substring(1),{showInLegend:n}=this.properties;return i.forEach(o=>{const{name:r}=this.getItemConfig(o);s.push({legendType:"category",id:e,itemId:o,seriesId:e,enabled:!0,label:{text:r??a(o)},symbol:this.legendItemSymbol(o),hideInLegend:!n,isFixed:!0})}),s}toggleSeriesItem(){}animateEmptyUpdateReady(t){const{datumSelection:e,labelSelection:i,contextData:s}=t,a=opt(rpt(this.isVertical(),this.axes,"normal"));mpt.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],a),cpt(this,"labels",this.ctx.animationManager,i);const{pointData:n}=s;n&&(this.isVertical()?this.animateConnectorLinesVertical(t):this.animateConnectorLinesHorizontal(t))}animateConnectorLinesHorizontal(t){const{pointData:e=[]}=t.contextData,[i]=t.paths,{path:s}=i;this.updateLineNode(i);const a=this.getValueAxis(),n=a?.isReversed(),o=n?(h,u)=>h<u:(h,u)=>h>u,r=a?.scale.convert(0),l=e.reduce((h,u)=>(o(u.x,h)&&(h=u.x),h),n?1/0:0),c=(h,u,d,p,g)=>(h-u)/(d-u)*(g-p)+p;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:r,to:l,ease:Xd._ModuleSupport.Motion.easeOut,collapsable:!1,onUpdate(h){s.clear(!0),e.forEach((u,d)=>{const p=c(h,r,l,r,u.x),g=c(h,r,l,r,u.x2);d!==0&&s.lineTo(p,u.y),s.moveTo(g,u.y2)}),i.checkPathDirty()},onStop:()=>this.resetConnectorLinesPath(t)})}animateConnectorLinesVertical(t){const{pointData:e=[]}=t.contextData,[i]=t.paths,{path:s}=i;this.updateLineNode(i);const a=this.getValueAxis(),n=a?.isReversed(),o=n?(h,u)=>h>u:(h,u)=>h<u,r=a?.scale.convert(0),l=e.reduce((h,u)=>(o(u.y,h)&&(h=u.y),h),n?0:1/0),c=(h,u,d,p,g)=>(h-u)/(d-u)*(g-p)+p;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:r,to:l,ease:Xd._ModuleSupport.Motion.easeOut,collapsable:!1,onUpdate(h){s.clear(!0),e.forEach((u,d)=>{const p=c(h,r,l,r,u.y),g=c(h,r,l,r,u.y2);d!==0&&s.lineTo(u.x,p),s.moveTo(u.x2,g)}),i.checkPathDirty()},onStop:()=>this.resetConnectorLinesPath(t)})}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:s}=i;s.clear(!0);const{pointData:a}=t;a&&(a.forEach((n,o)=>{o!==0&&s.lineTo(n.x,n.y),s.moveTo(n.x2,n.y2)}),i.checkPathDirty())}updateLineNode(t){const{stroke:e,strokeWidth:i,strokeOpacity:s,lineDash:a,lineDashOffset:n}=this.properties.line;t.setProperties({fill:void 0,stroke:e,strokeWidth:this.getStrokeWidth(i),strokeOpacity:s,lineDash:a,lineDashOffset:n,lineJoin:"round",pointerEvents:Xd._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 gpt(this,this.contextNodeData?.nodeData[t])}};FD.className="WaterfallSeries",FD.type="waterfall";var xpt=(_(),w(P)),ka=(R(),w(st)),{commonSeriesOptionsDefs:bpt,waterfallSeriesThemeableOptionsDef:vpt}=xpt._ModuleSupport,Spt={...vpt,...bpt,type:(0,ka.required)((0,ka.constant)("waterfall")),xKey:(0,ka.required)(ka.string),yKey:(0,ka.required)(ka.string),xName:ka.string,yName:ka.string,totals:(0,ka.arrayOfDefs)({totalType:(0,ka.required)((0,ka.union)("total","subtotal")),index:(0,ka.required)(ka.positiveNumber),axisLabel:(0,ka.required)(ka.string)},"a total definition options array")},HO=(_(),w(P));function $O(t,e){return{fill:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$path:[`/${e}`,{$palette:"fill"},{$palette:"fills"}]},{$palette:`${t}.fill`}]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$if:[{$or:[{$isGradient:{$palette:`${t}.fill`}},{$isPattern:{$palette:`${t}.fill`}},{$isImage:{$palette:`${t}.fill`}}]},{$map:[{$path:["/color",void 0,{$value:"$1"}]},{$path:["/colorStops",void 0,{$palette:`${t}.fill`}]}]},[{$mix:[{$palette:`${t}.fill`},"black",.15]},{$mix:[{$palette:`${t}.fill`},"white",.15]}]]},rotation:0,reverse:!1},fillPatternDefaults:HO._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:HO._ModuleSupport.FILL_IMAGE_DEFAULTS,stroke:{$palette:`${t}.stroke`},strokeWidth:{$isUserOption:["./stroke",2,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"}}}var Mpt={series:{item:{positive:$O("altUp",0),negative:$O("altDown",1),total:$O("neutral",2)},line:{stroke:{$palette:"neutral.stroke"},strokeOpacity:1,lineDash:[0],lineDashOffset:0,strokeWidth:2},highlight:HO._ModuleSupport.singleSeriesHighlightStyle()},legend:{enabled:!0,toggleSeries:!1}},Dpt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"waterfall",solo:!0,moduleFactory:t=>new FD(t),defaultAxes:Wdt._ModuleSupport.DIRECTION_SWAP_AXES,themeTemplate:Mpt},cU={type:"series",name:"waterfall",chartType:"cartesian",enterprise:!0,options:Spt,create:t=>new FD(t)},{NewAreaSeriesModule:kpt,NewBarSeriesModule:Ipt,NewBubbleSeriesModule:Apt,NewHistogramSeriesModule:Cpt,NewLineSeriesModule:Lpt,NewScatterSeriesModule:wpt,numberFormatValidator:Tpt,without:Cn}=dct._ModuleSupport,hU={width:Me.positiveNumber,height:Me.positiveNumber,grip:Me.boolean,fill:Me.color,stroke:Me.color,strokeWidth:Me.positiveNumber,cornerRadius:Me.positiveNumber},Ka=["cursor","highlightStyle","listeners","nodeClickRange","showInLegend","showInMiniChart","tooltip","visible","xName","yName"],uU=[...Ka,"errorBar","label","legendItemName","direction"],dU=[...Ka,"direction","legendItemName","minName","q1Name","medianName","q3Name","maxName"],pU=[...Ka,"title","label","labelKey","labelName","sizeName"],gU=[...Ka,"title","label","colorName","textAlign","verticalAlign","itemPadding","colorRange"],fU=[...Ka,"label"],mU=[...Ka,"errorBar","title","label"],yU=[...Ka,"label","yLowName","yHighName"],xU=[...Ka,"direction","label","yLowName","yHighName"],bU=[...Ka,"errorBar","title","label","labelKey","labelName"],vU=[...Ka,"direction"],Npt={enabled:Me.boolean,height:Me.positiveNumber,spacing:Me.positiveNumber,cornerRadius:Me.number,mask:{fill:Me.color,fillOpacity:Me.ratio,stroke:Me.color,strokeWidth:Me.positiveNumber},minHandle:hU,maxHandle:hU,miniChart:{enabled:Me.boolean,padding:{top:Me.positiveNumber,bottom:Me.positiveNumber},label:{enabled:Me.boolean,avoidCollisions:Me.boolean,spacing:Me.positiveNumber,format:Tpt,formatter:Me.callback,interval:{minSpacing:Me.positiveNumber,maxSpacing:Me.positiveNumber,values:Me.array,step:Me.number},...Me.fontOptionsDef},series:(0,Me.arrayOfDefs)((0,Me.typeUnion)({area:Cn(kpt.options,[...Ka,"type"]),bar:Cn(Ipt.options,[...uU,"type"]),"box-plot":Cn(t$.options,[...dU,"type"]),bubble:Cn(Apt.options,[...pU,"type"]),candlestick:Cn(m$.options,[...Ka,"type"]),heatmap:Cn(L$.options,[...gU,"type"]),histogram:Cn(Cpt.options,[...fU,"type"]),line:Cn(Lpt.options,[...mU,"type"]),ohlc:Cn(T$.options,[...Ka,"type"]),"range-area":Cn(Z$.options,[...yU,"type"]),"range-bar":Cn(aU.options,[...xU,"type"]),scatter:Cn(wpt.options,[...bU,"type"]),waterfall:Cn(cU.options,[...vU,"type"])},"miniChart series options"))}},Opt=["area","bar","bubble","candlestick","heatmap","histogram","line","ohlc","range-area","range-bar","scatter","waterfall"],Ppt=["itemStyler","fastDataProcessing","direction","fill","fillGradientDefaults","fillPatternDefaults","fillImageDefaults","fillOpacity","shadow","focusPriority","seriesGrouping","highlight","lineDash","lineDashOffset","strokeWidth"];function SU(t,e){return{$merge:[{$switch:[e,{},[["area","line","range-area"],{marker:{enabled:{$isUserOption:["/series/$index/marker/enabled",{$path:["/series/$index/marker/enabled",!1]},!1]}}}]]},{$omit:[{$switch:[e,Ka,["bar",uU],["box-plot",dU],["bubble",pU],["heatmap",gU],["histogram",fU],["line",[...mU,...Ppt]],["range-area",yU],["range-bar",xU],["scatter",bU],["waterfall",vU]]},t]}]}}var _pt={enabled:!1,height:{$if:[{$path:"./miniChart/enabled"},40,18]},cornerRadius:4,mask:{fill:{$ref:"foregroundColor"},fillOpacity:.1,stroke:{$ref:"borderColor"},strokeWidth:1},minHandle:{fill:{$ref:"chartBackgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},maxHandle:{fill:{$ref:"chartBackgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},miniChart:{enabled:!1,label:{color:{$ref:"textColor"},fontSize:{$rem:uct._ModuleSupport.FONT_SIZE_RATIO.SMALLER},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:5},padding:{top:0,bottom:0},series:{$apply:[SU({$path:"/series/$index"},{$path:["/navigator/miniChart/series/$index/type",{$path:["type",{$path:"/series/$index/type"}]}]}),{$if:[{$or:Opt.map(t=>({$eq:[{$path:"/series/0/type"},t]}))},{$map:[SU({$value:"$1"},{$path:"/series/$index/type"}),{$path:"/series"}]},void 0]}]}}},Ept={type:"root",optionsKey:"navigator",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new yf(t),removable:!1,themeTemplate:{navigator:_pt}},MU=(_(),w(P)),Rpt=(_(),w(P)),{ToolbarButtonProperties:Bpt,Property:zpt}=Rpt._ModuleSupport,DU=class extends Bpt{};y([zpt],DU.prototype,"value",2);var{ChartAxisDirection:UO,LayoutElement:Fpt,PropertiesArray:Vpt,Toolbar:Gpt,Property:kU}=MU._ModuleSupport,KO=class extends MU._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.buttons=new Vpt(DU),this.verticalSpacing=10,this.container=t.domManager.addChild("canvas-overlay","range-buttons"),this.container.role="presentation",this.toolbar=new Gpt(this.ctx,"ariaLabelRangesToolbar","horizontal"),this.toolbar.addClass("ag-charts-range-buttons"),this.container.append(this.toolbar.getElement()),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),t.layoutManager.registerElement(Fpt.ToolbarBottom,this.onLayoutStart.bind(this)),t.eventsHub.on("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:s,toolbar:a,verticalSpacing:n}=this,{layoutBox:o}=t;if(!s||!i.zoomManager.isZoomEnabled()){a.setHidden(!0);return}a.setHidden(!1),a.updateButtons(e);const r=a.getBounds().height;a.setBounds({x:o.x,y:o.y+o.height-r,width:o.width,height:r}),o.shrink({bottom:r+n})}onZoomChanged(){this.toolbar.clearActiveButton()}onButtonPress({button:{index:t}}){const{zoomManager:e}=this.ctx,i=this.buttons.at(t);if(!i)return;const{value:s}=i;s==null?e.resetZoom("zoom-buttons"):typeof s=="number"?e.extendToEnd("zoom-buttons",UO.X,s):Array.isArray(s)?e.updateWith("zoom-buttons",UO.X,()=>s):typeof s=="function"&&e.updateWith("zoom-buttons",UO.X,s),this.toolbar.toggleActiveButtonByIndex(t)}};y([kU],KO.prototype,"enabled",2),y([kU],KO.prototype,"buttons",2);var IU=1e3*60*60*24,YO=IU*30,jpt=IU*365,Wpt={type:"root",optionsKey:"ranges",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new KO(t),themeTemplate:{ranges:{enabled:!1,buttons:{$shallow:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:YO},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:3*YO},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:6*YO},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(t,e)=>[new Date(`${new Date(e).getFullYear()}-01-01`).getTime(),e]},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:jpt},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:void 0}]}}}},FIt=(_(),w(P)),AU=(_(),w(P)),CU=class Sb extends AU._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(),e==="chartToolbar"&&this.sharedToolbar&&this.sharedToolbar.setAriaLabelId("ariaLabelFinancialCharts"),this.toolbarWithSection(e)}createSharedToolbar(){this.sharedToolbar=new AU._ModuleSupport.Toolbar(this.ctx,"ariaLabelAnnotationsToolbar","vertical"),this.sharedToolbar.addClass("ag-charts-shared-toolbar"),this.container.append(this.sharedToolbar.getElement()),this.cleanup.register(()=>{this.sharedToolbar&&(this.container.removeChild(this.sharedToolbar.getElement()),this.sharedToolbar.destroy(),this.sharedToolbar=void 0)})}toolbarWithSection(e){const i=this.sharedToolbar,s={layout:(a,n)=>{if(this.firstLayoutSection!=null&&this.firstLayoutSection!==e&&this.activeSections.has(this.firstLayoutSection))return;this.firstLayoutSection=e;const o=i.getBounds().width;i.setBounds({x:a.x,y:a.y,width:o}),a.shrink({left:o+i.horizontalSpacing+(n??0)})},addToolbarListener:(a,n)=>i.addToolbarListener(a,o=>{const r=this.getSectionIndex(e,o.button.index);if(r<0)return;const l={...o,button:this.sectionButtons[e][r]};n(l)}),updateButtons:a=>{this.sectionButtons[e]=a;const n=Sb.SECTION_ORDER.flatMap(o=>this.sectionButtons[o]);i.updateButtons(n)},updateButtonByIndex:(a,n)=>{i.updateButtonByIndex(this.getIndex(e,a),n)},toggleActiveButtonByIndex:a=>{i.toggleActiveButtonByIndex(this.getIndex(e,a))},toggleButtonEnabledByIndex:(a,n)=>{i.toggleButtonEnabledByIndex(this.getIndex(e,a),n)},setHidden:a=>{a?this.activeSections.delete(e):this.activeSections.add(e);let n=0;for(const o of Sb.SECTION_ORDER){if(o!==e){n+=this.sectionButtons[o].length;continue}for(const r of this.sectionButtons[e].keys())i.setButtonHiddenByIndex(n+r,a)}},destroy:()=>{s.setHidden(!0),this.activeSections.size===0&&this.destroy()},clearActiveButton:i.clearActiveButton.bind(i),addListener:i.addListener.bind(i),removeListener:i.removeListener.bind(i)};return s.setHidden(!1),s}getIndex(e,i){let s=0;for(const a of Sb.SECTION_ORDER){if(a===e)return s+i;s+=this.sectionButtons[a].length}return-1}getSectionIndex(e,i){let s=0;for(const a of Sb.SECTION_ORDER){if(a===e)return i>=s+this.sectionButtons[e].length?-1:i-s;s+=this.sectionButtons[a].length}return-1}};CU.SECTION_ORDER=["chartToolbar","annotations"];var Hpt=CU,$pt={type:"context",contextKey:"sharedToolbar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Hpt(t)},Upt=(_(),w(P)),ZO=(_(),w(P)),{CachedTextMeasurerPool:Yx,ZIndexMap:Kpt,LayoutElement:Ypt,Property:Ia,BaseProperties:Zpt,valueProperty:Xpt,TextUtils:qpt,Group:Qpt,Label:Zx,Rect:Jpt,Text:Ts}=ZO._ModuleSupport,LU={ohlc:62,candlestick:62,"hollow-candlestick":62,line:96,"step-line":96,hlc:184,"high-low":800},tgt={up:"positive",down:"negative"},egt={hlc:"altNeutral"},XO=class extends Zpt{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1}};y([Ia],XO.prototype,"fill",2),y([Ia],XO.prototype,"fillOpacity",2);var Ya=class extends ZO._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 Zx,this.positive=new Zx,this.negative=new Zx,this.neutral=new Zx,this.altNeutral=new Zx,this.background=new XO,this.layoutStyle="block",this.id="status-bar",this.data=void 0,this.layer=new Qpt({name:"StatusBar",zIndex:Kpt.STATUS_BAR}),this.labelGroup=this.layer.appendChild(new ZO._ModuleSupport.TranslatableGroup),this.backgroundNode=this.labelGroup.appendChild(new Jpt),this.labels=[{label:"O",configuration:2,title:this.labelGroup.appendChild(new Ts),value:this.labelGroup.appendChild(new Ts),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 Ts),value:this.labelGroup.appendChild(new Ts),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 Ts),value:this.labelGroup.appendChild(new Ts),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 Ts),value:this.labelGroup.appendChild(new Ts),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 Ts),value:this.labelGroup.appendChild(new Ts),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 Ts),value:this.labelGroup.appendChild(new Ts),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 Ts),value:this.labelGroup.appendChild(new Ts),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 Ts),value:this.labelGroup.appendChild(new Ts),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 Ts),value:this.labelGroup.appendChild(new Ts),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.cleanup.register(t.scene.attachNode(this.layer),t.layoutManager.registerElement(Ypt.Overlay,e=>this.startPerformLayout(e)),t.eventsHub.on("layout:complete",e=>this.onLayoutComplete(e)),t.eventsHub.on("highlight:change",()=>this.updateHighlight()))}async processData(t){if(!this.enabled||this.data==null)return;const e=[];for(const a of this.labels){const{id:n,key:o}=a,r=this[o];r==null?a.domain=void 0:e.push(Xpt(r,"number",{id:n}))}if(e.length===0)return;const{processedData:i,dataModel:s}=await t.request(this.id,this.data,{props:e});for(const a of this.labels){const{id:n,key:o}=a;this[o]!=null&&(a.domain=s.getDomain(this,n,"value",i))}}startPerformLayout(t){if(this.labelGroup.translationX=0,this.labelGroup.translationY=0,!this.enabled)return;const{layoutBox:e}=t,i=4,s=12,a=0,n=8;this.labelGroup.translationY=e.y+a;const o=Math.max(this.title.fontSize,this.positive.fontSize,this.negative.fontSize),r=qpt.getLineHeight(o),l=LU[this.getChartType()]??0;let c=0,h,u="alphabetic";if(this.layoutStyle==="block")e.shrink(a+r+n,"top"),h=o+(r-o)/2;else{const{title:d}=this.ctx.chartService;if(u="top",h=a+d.padding,d.enabled){const p=d.node.getBBox();c=p.x+p.width+s}else c=d.padding}for(const{label:d,configuration:p,title:g,value:f,domain:x,formatter:m}of this.labels){if(x==null||!(l&p)){g.visible=!1,f.visible=!1;continue}const b=Math.max(Yx.measureText(m.format(x[0]),{font:this.positive,textBaseline:u,textAlign:"left"}).width,Yx.measureText(m.format(x[1]),{font:this.positive,textBaseline:u,textAlign:"left"}).width,Yx.measureText(m.format(x[0]),{font:this.negative,textBaseline:u,textAlign:"left"}).width,Yx.measureText(m.format(x[1]),{font:this.negative,textBaseline:u,textAlign:"left"}).width);g.visible=!0,f.visible=!0;const v=Yx.measureText(d,{font:this.title,textBaseline:u,textAlign:"left"});g.setFont(this.title),g.fill=this.title.color,g.text=d,g.textBaseline=u,g.y=h,g.x=c,c+=v.width+i,f.textBaseline=u,f.y=h,f.x=c,c+=b+s}this.backgroundNode.x=0,this.backgroundNode.y=0,this.backgroundNode.width=c-s,this.backgroundNode.height=r+a+n,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 s=i!=null?tgt[i]:void 0;s==null&&this.openKey!=null&&this.closeKey!=null&&(e[this.openKey]<e[this.closeKey]?s="positive":s="negative");for(const{domain:a,value:n,key:o,formatter:r,style:l}of this.labels){if(a==null)continue;let c=l??s??"neutral";c==="neutral"&&(c=egt[this.getChartType()]??c);const h=this[o],u=h!=null?e?.[h]:void 0;n.setFont(this[c]),n.fill=this[c].color,n.text=typeof u=="number"?r.format(u):""}}getChartType(){let t=this.ctx.chartService.publicApi?.getOptions()?.chartType;return(t==null||LU[t]==null)&&(t="candlestick"),t}};y([Ia],Ya.prototype,"enabled",2),y([Ia],Ya.prototype,"openKey",2),y([Ia],Ya.prototype,"highKey",2),y([Ia],Ya.prototype,"lowKey",2),y([Ia],Ya.prototype,"closeKey",2),y([Ia],Ya.prototype,"volumeKey",2),y([Ia],Ya.prototype,"title",2),y([Ia],Ya.prototype,"positive",2),y([Ia],Ya.prototype,"negative",2),y([Ia],Ya.prototype,"neutral",2),y([Ia],Ya.prototype,"altNeutral",2),y([Ia],Ya.prototype,"background",2),y([Ia],Ya.prototype,"layoutStyle",2);var igt={type:"root",identifier:"status-bar",optionsKey:"statusBar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Ya(t),themeTemplate:{statusBar:{enabled:!1,layoutStyle:Upt._ModuleSupport.ThemeSymbols.DEFAULT_CAPTION_LAYOUT_STYLE,title:{color:{$ref:"textColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},positive:{color:{$palette:"up.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},negative:{color:{$palette:"down.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},neutral:{color:{$palette:"neutral.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},background:{fill:{$ref:"chartBackgroundColor"},fillOpacity:.5},altNeutral:{color:"gray",fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}}}}},wU=(_(),w(P)),Za=(R(),w(st)),VIt=(_(),w(P)),qO=(R(),w(st)),ii={min:0,max:1},Qd=ii.max-ii.min,TU="end",NU="middle",VD=(t,e=ii.min,i=ii.max)=>(0,qO.clamp)(e,t,i);function QO(){return{x:{...ii},y:{...ii}}}function Ns(t){return t.x.max-t.x.min}function Ln(t){return t.y.max-t.y.min}function OU(t,e,i=1e-10){return(0,qO.isNumberEqual)(t.min,e.min,i)&&(0,qO.isNumberEqual)(t.max,e.max,i)}function Xx(t,e,i){return OU(t.x,e.x,i)&&OU(t.y,e.y,i)}function Ys(t){return{x:{min:t?.x?.min??ii.min,max:t?.x?.max??ii.max},y:{min:t?.y?.min??ii.min,max:t?.y?.max??ii.max}}}function cc(t,e,i){if(!t)return{x:0,y:0};const s=VD(e-t.x,0,t.x+t.width),a=VD(i-t.y,0,t.y+t.height),n=1/t.width*s,o=1-1/t.height*a;return{x:VD(n),y:VD(o)}}function Jd(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 GD(t,e,i){return{x:{min:t.x.min,max:t.x.min+Ns(t)*e},y:{min:t.y.min,max:t.y.min+Ln(t)*i}}}function PU(t,e,i){const s=Ns(t),a=Ln(t),n=t.x.min+s/2,o=t.y.min+a/2;return{x:{min:n-s*e/2,max:n+s*e/2},y:{min:o-a*i/2,max:o+a*i/2}}}function wn(t,e,i,s){const{min:a,max:n}=e,o=a+(n-a)/2,r=t.max-t.min;switch(i){case"start":return{min:a,max:e.min+r};case"end":return{min:e.max-r,max:n};case"middle":return{min:o-r/2,max:o+r/2};case"pointer":return sgt(t,e,s??o);default:return{min:a,max:n}}}function sgt(t,e,i){const s=t.max-t.min,a=e.max-e.min,n=i*(1-(a-s)),o=i-n,r=t.min+o,l=t.max+o;return{min:r,max:l}}function agt(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 bo(t){return{x:jD(t.x),y:jD(t.y)}}function jD(t){const e=t.max-t.min;let i=t.max>ii.max?ii.max-e:t.min,s=t.min<ii.min?e:t.max;return i=Math.max(ii.min,i),s=Math.min(ii.max,s),{min:i,max:s}}var{BaseProperties:ngt,CartesianAxis:JO,ChartAxisDirection:tp,ContinuousScale:t1,ChartUpdateType:WD,ObserveChanges:kf,TooltipManager:ogt,Property:If,findMinMax:HD,isObjectWithStringProperty:rgt}=wU._ModuleSupport,or=wU._ModuleSupport.Debug.create("sync");function _U(t,e,i){const s=t.getKeys(e),a=t.getKeys(i);return t.shouldFlipXY?.()?[a,s]:[s,a]}function e1(t="x"){switch(t){case"x":return[tp.X];case"y":return[tp.Y];case"xy":return[tp.X,tp.Y]}}var Wh=class extends ngt{constructor(t){super(),this.moduleContext=t,this.enabled=!1,this.axes="x",this.nodeInteraction=!0,this.zoom=!0,this.domainMode="key",this.domainSync=new Za.AsyncAwaitQueue}updateSiblings(t){const{syncManager:e}=this.moduleContext;for(const i of e.getGroupSiblings(t??this.groupId))or("ChartSync.updateSiblings()",i.id,i),this.updateChart(i)}updateChart(t,e=WD.PROCESS_DOMAIN){or("ChartSync.updateChart()",t.id,WD[e],t),e===WD.PROCESS_DOMAIN?t.ctx.updateService.update(e,{forceNodeDataRefresh:!0}):t.ctx.updateService.update(e)}enabledZoomSync(){const{eventsHub:t}=this.moduleContext;this.disableZoomSync?.(),this.disableZoomSync=t.on("zoom:change",this.onZoom.bind(this))}onZoom(){const{syncManager:t}=this.moduleContext;for(const e of t.getGroupSiblings(this.groupId)){if(!e.modulesManager.getModule("sync")?.zoom)continue;const i=e.modulesManager.getModule("zoom");if(!i)continue;const s=this.prepareZoomUpdate();or("ChartsSyncManager.enabledZoomSync()",e.id,s),i.updateSyncZoom(s)}}enabledNodeInteractionSync(){this.disableNodeInteractionSync?.(),this.disableNodeInteractionSync=this.moduleContext.eventsHub.on("highlight:change",this.onHighlightChange.bind(this))}onHighlightChange(t){const{syncManager:e}=this.moduleContext;if(t.callerId.endsWith("-sync"))return;or("ChartSync.onHighlightChange()",t);const i=t.currentHighlight?.series,[s]=e1(this.axes),a=s===tp.X?tp.Y:tp.X,[n,o]=i?_U(i,s,a):[],r=pf(t.currentHighlight);let l=n?.[0]?r?.[n[0]]:void 0,c=!1;if((0,Za.isDate)(l)&&(c=!0,l=l.getTime()),!t.currentHighlight?.datum){for(const u of e.getGroupSiblings(this.groupId))u.modulesManager.getModule("sync")?.nodeInteraction&&(u.ctx.highlightManager.updateHighlight(`${u.id}-sync`),u.ctx.tooltipManager.removeTooltip(`${u.id}-sync`));return}const h=e.getGroupSyncMode(this.groupId)==="multi-series";this.findMatchingHighlightNodes(s,a,h?o:[],c,l,t)}findMatchingHighlightNodes(t,e,i,s,a,n){const{syncManager:o}=this.moduleContext;or("ChartSync.findMatchingHighlightNodes()",{mainDirection:t,secondaryKeys:i});for(const r of o.getGroupSiblings(this.groupId)){if(!r.modulesManager.getModule("sync")?.nodeInteraction)continue;let l=!1;for(const c of r.axes){if(!JO.is(c)||c.direction!==t)continue;const h=r.series.filter(u=>{if(!u.visible)return!1;if(i.length>0){const[,d]=_U(u,t,e);return i.every(p=>d.includes(p))}return!0}).map(this.findMatchingNodes(c,t,s,a)).filter(Za.isDefined);if(h.length===1&&h[0]?.nodeDatum!==r.ctx.highlightManager.getActiveHighlight()){this.dispatchHighlightUpdate(r,h[0].nodeDatum),l=!0;break}}l||(or("ChartSync.findMatchingHighlightNodes() - no matching nodes",r.id,n),this.dispatchHighlightUpdate(r))}}findMatchingNodes(t,e,i,s){return a=>{const n=a.getKeys(t.direction);if(t.keys.length&&!t.keys.some(u=>n.includes(u)))return;const o=a.contextNodeData?.nodeData??[];if(!o?.length)return;const r=o[0],l=`${e}Key`;if(!rgt(r,l))return;const c=r[l],h=o.find(u=>{const d=u.datum[c];return i?d.getTime()===s:d===s});return h?{series:a,nodeDatum:h}:null}}dispatchHighlightUpdate(t,e){or("ChartSync.dispatchHighlightUpdate()",t.id,e),t.ctx.highlightManager.updateHighlight(`${t.id}-sync`,e);const i=e?.series.tooltipEnabled??t.tooltip.enabled;if(e&&i){const s=t.seriesAreaBoundingBox,a=s.x+(e.midPoint?.x??e.point?.x??0),n=s.y+(e.midPoint?.y??e.point?.y??0),o=ogt.makeTooltipMeta({type:"pointermove",canvasX:a,canvasY:n},e.series,e,void 0);t.ctx.tooltipManager.updateTooltip(`${t.id}-sync`,o,t.getTooltipContent(e.series,e.datumIndex,e))}else t.ctx.tooltipManager.removeTooltip(`${t.id}-sync`);this.updateChart(t,WD.SERIES_UPDATE)}async getSyncedDomain(t){if(!JO.is(t)||this.axes!=="xy"&&this.axes!==t.direction)return;const{groupState:e,directionDomains:i,domainsByKey:s,positionDomains:a}=this.updateDomainState(t);return this.validateAxis(t,e),await this.waitForDomainsToBeReady(),this.domainMode==="position"?this.calculateDerivedDomain(t,a):this.domainMode==="direction"||t.keys.length===0?this.calculateDerivedDomain(t,i):this.calculateKeyDerivedDomain(t,s)}updateDomainState(t){var e,i,s,a,n;const{syncManager:o}=this.moduleContext,r=o.getChart().id,l=t.id,c=o.getGroupState(this.groupId);if(!c)throw new Error("AG Charts - no GroupState for groupId: "+this.groupId);const h=c.domains??(c.domains={}),u=h[e=t.direction]??(h[e]={derived:[],sources:{},dirty:!0}),d=(i=u.sources)[r]??(i[r]={});d[l]=t.dataDomain.domain,u.dirty=!0;const p=c.domainsByKey??(c.domainsByKey={});for(const m of t.keys??[]){const b=p[m]??(p[m]={derived:[],sources:{},dirty:!0}),v=(s=b.sources)[r]??(s[r]={});v[l]=t.dataDomain.domain,b.dirty=!0}const g=c.domainsByPosition??(c.domainsByPosition={}),f=g[a=t.position]??(g[a]={derived:[],sources:{},dirty:!0}),x=(n=f.sources)[r]??(n[r]={});return x[l]=t.dataDomain.domain,f.dirty=!0,{groupState:c,directionDomains:u,domainsByKey:p,positionDomains:f}}validateAxis(t,e){const i=this.moduleContext.syncManager.getGroupSyncMode(this.groupId)==="multi-series";e1(this.axes).includes(t.direction)&&(i?this.validateMultiSeries(t,e):this.validateSingleSeries(t,e))}validateMultiSeries(t,e){const{min:i,max:s,nice:a,reverse:n}=t,o=new Set(t.boundSeries.flatMap(r=>r.getKeys(t.direction)));for(const r of e.members){const{axes:l,modulesManager:c}=r,h=e1(c.getModule("sync")?.axes),u=l.filter(p=>h.includes(p.direction)).filter(p=>p.boundSeries.some(g=>g.getKeys(p.direction).some(f=>o.has(f))));if(u.length===0)continue;const[d]=u;if(d.min!==i||d.max!==s||d.nice!==a||d.reverse!==n){Za.Logger.warnOnce("To allow synchronization, ensure that all synchronized axes with matching keys have matching min, max, nice, and reverse properties."),this.enabled=!1;return}}}validateSingleSeries(t,e){const i=e.members,[{axes:s}]=i,{direction:a,min:n,max:o,nice:r,reverse:l}=t;for(const c of s)if(a===c.direction&&(r!==c.nice||l!==c.reverse||n!==c.min&&((0,Za.isFiniteNumber)(n)||(0,Za.isFiniteNumber)(c.min))||o!==c.max&&((0,Za.isFiniteNumber)(o)||(0,Za.isFiniteNumber)(c.max)))){Za.Logger.warnOnce("To allow synchronization, ensure that all charts have matching min, max, nice, and reverse properties on the synchronized axes."),this.enabled=!1;return}}calculateDerivedDomain(t,e){if(!e.dirty)return e.derived;const i=e.derived;return e.derived=(0,Za.unique)(Object.values(e.sources).map(s=>Object.values(s)).flat(2)),t1.is(t.scale)&&(e.derived=HD(e.derived)),e.dirty=!1,(0,Za.arraysEqual)(i,e.derived)||(or(t.id,"updated",t.keys,{before:i,after:e.derived}),this.updateSiblings()),e.derived}calculateKeyDerivedDomain(t,e){let i=[],s=[],a=!1;for(const n of t.keys??[]){const o=e[n],r=o.derived;if(i.push(...r),!o.dirty){s.push(...o.derived);continue}o.derived=(0,Za.unique)(Object.values(o.sources).map(l=>Object.values(l)).flat(2)),t1.is(t.scale)&&(o.derived=HD(o.derived)),s.push(...o.derived),o.dirty=!1,a||(a=!(0,Za.arraysEqual)(r,o.derived))}return t1.is(t.scale)&&(i=HD(i),s=HD(s)),a&&!(0,Za.arraysEqual)(i,s)&&(or(t.id,"updated",t.keys,{before:i,after:s}),this.updateSiblings()),s}removeAxis(t){if(!JO.is(t)||this.axes!=="xy"&&this.axes!==t.direction)return;const{syncManager:e}=this.moduleContext,i=e.getGroupState(this.groupId),s=e.getChart().id,a=t.id;delete i?.domains?.[t.direction]?.sources?.[s]?.[a];for(const n of t.keys??[])delete i?.domainsByKey?.[n]?.sources?.[s]?.[a];delete i?.domainsByPosition?.[t.position]?.sources?.[s]?.[a]}async waitForDomainsToBeReady(){const{syncManager:t}=this.moduleContext;let e=0;for(;t.getGroupMembers(this.groupId).some(i=>i.syncStatus==="init");)or("ChartSync.waitForDomainsToBeReady() - waiting for all domains to be calculated",this.groupId),await this.domainSync.await(),e++;e>0&&or("ChartSync.waitForDomainsToBeReady() - waited for",e,"iterations"),this.domainSync.notify()}prepareZoomUpdate(){const{zoomManager:t}=this.moduleContext,e=t.getZoom();return this.axes==="x"?delete e?.y:this.axes==="y"&&delete e?.x,Ys(e)}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?.()}};Wh.className="Sync",y([If,kf(t=>t.onEnabledChange())],Wh.prototype,"enabled",2),y([If,kf((t,e,i)=>t.onGroupIdChange(e,i))],Wh.prototype,"groupId",2),y([If,kf(t=>t.onAxesChange())],Wh.prototype,"axes",2),y([If,kf(t=>t.onNodeInteractionChange())],Wh.prototype,"nodeInteraction",2),y([If,kf(t=>t.onZoomChange())],Wh.prototype,"zoom",2),y([If,kf(t=>t.onAxesChange())],Wh.prototype,"domainMode",2);var lgt={type:"root",optionsKey:"sync",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Wh(t),themeTemplate:{sync:{enabled:!1}}},ep=(_(),w(P)),qx=(R(),w(st)),i1=(_(),w(P)),{Property:EU}=i1._ModuleSupport,RU="#2196f3",cgt="#8a8a8a",$D=class extends i1._ModuleSupport.Rect{constructor(){super(...arguments),this.fill=RU,this.fillOpacity=.2,this.zIndex=i1._ModuleSupport.ZIndexMap.ZOOM_SELECTION}updateValid(){this.fill=RU}updateInvalid(){this.fill=cgt}};$D.className="ZoomRect",y([EU],$D.prototype,"fill",2),y([EU],$D.prototype,"fillOpacity",2);var s1=(_(),w(P)),hgt=class{update(t,e,i,s,a,n){return this.oldZoom??(this.oldZoom=Ys(e===s1._ModuleSupport.ChartAxisDirection.X?{...a,x:n}:{...a,y:n})),this.updateCoords(t.currentX,t.currentY),this.updateZoom(e,i,s)}stop(){this.coords=void 0,this.oldZoom=void 0}updateCoords(t,e){this.coords?(this.coords.x2=t,this.coords.y2=e):this.coords={x1:t,y1:e,x2:t,y2:e}}updateZoom(t,e,i){const{coords:s,oldZoom:a}=this;let n=Ys(a);if(!s||!a)return t===s1._ModuleSupport.ChartAxisDirection.X?n.x:n.y;const o=cc(i,s.x1,s.y1),r=cc(i,s.x2,s.y2);if(t===s1._ModuleSupport.ChartAxisDirection.X){const c=(r.x-o.x)*Ns(a);return n.x.max+=c,n.x=wn(n.x,a.x,e,o.x),n=bo(n),n.x}const l=(r.y-o.y)*Ln(a);return n.y.max-=l,n.y=wn(n.y,a.y,e,o.y),n=bo(n),n.y}},ugt=class{constructor(t,e,i,s,a,n,o,r){this.eventsHub=t,this.contextMenuRegistry=e,this.zoomManager=i,this.getModuleProperties=s,this.canResetZoom=a,this.getRect=n,this.updateZoom=o,this.isZoomValid=r}registerActions(t){const{contextMenuRegistry:e}=this;if(t)e.setVisible("zoom-to-cursor",!0),e.setVisible("pan-to-cursor",!0),e.setVisible("reset-zoom",!0);else{e.setVisible("zoom-to-cursor",!1),e.setVisible("pan-to-cursor",!1),e.setVisible("reset-zoom",!1);return}e.builtins.items["zoom-to-cursor"].action=this.onZoomToHere.bind(this),e.builtins.items["pan-to-cursor"].action=this.onPanToHere.bind(this),e.builtins.items["reset-zoom"].action=this.onResetZoom.bind(this);const i=n=>{const o=this.getRect();if(!o)return!0;const r=cc(o,n.x,n.y);return this.iterateFindNextZoomAtPoint(r)!=null},s=()=>!Xx(Ys(this.zoomManager.getZoom()),QO()),a=this.eventsHub.on("context-menu:setup",n=>{e.builtins.items["zoom-to-cursor"].enabled=i(n),e.builtins.items["pan-to-cursor"].enabled=s(),e.builtins.items["reset-zoom"].enabled=this.canResetZoom()});return()=>{a(),e.setVisible("zoom-to-cursor",!1),e.setVisible("pan-to-cursor",!1),e.setVisible("reset-zoom",!1)}}computeOrigin(t){const e=this.getRect(),{enabled:i}=this.getModuleProperties();if(!i||!e||!t?.target||!(t instanceof MouseEvent))return;const s={x:0,y:0,width:e.width,height:e.height};return cc(s,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=Ys(this.zoomManager.getZoom()),s=Ns(i),a=Ln(i),n=e.x*s,o=e.y*a,r=Qd/2;let l={x:{min:e.x-r,max:e.x+r},y:{min:e.y-r,max:e.y+r}};l=PU(l,s,a),l=Jd(l,i.x.min-e.x+n,i.y.min-e.y+o),this.updateZoom(bo(l))}onResetZoom(t){this.zoomManager.resetZoom("zoom")}iterateFindNextZoomAtPoint(t){const{scrollingStep:e}=this.getModuleProperties();for(let i=e;i<=1-e;i+=e){const s=this.getNextZoomAtPoint(t,i);if(this.isZoomValid(s))return s}}getNextZoomAtPoint(t,e){const{isScalingX:i,isScalingY:s}=this.getModuleProperties(),a=Ys(this.zoomManager.getZoom()),n=t.x*Ns(a),o=t.y*Ln(a),r=Qd/2;let l={x:{min:t.x-r,max:t.x+r},y:{min:t.y-r,max:t.y+r}};return l=PU(l,i?Ns(a)*e:Qd,s?Ln(a)*e:Qd),l=Jd(l,a.x.min-t.x+n,a.y.min-t.y+o),bo(l)}},BU=(_(),w(P)),dgt=(R(),w(st)),{ChartAxisDirection:pgt}=BU._ModuleSupport,ggt=class{constructor(t){this.axesHandlers=t,this.axes=[]}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:s}=BU._ModuleSupport.ChartAxisDirection,a=[...e.axisManager.getAxisContext(i),...e.axisManager.getAxisContext(s)],{removed:n,added:o}=this.diffAxisIds(a);n.length>0&&(this.axes=this.axes.filter(r=>n.includes(r.axisId)?(r.div.destroy(),!1):!0));for(const r of o){const{axisId:l,direction:c}=r;this.axes.push(this.initAxis(e,l,this.axesHandlers,c))}for(const r of this.axes){const c=a.find(h=>h.axisId===r.axisId).getCanvasBounds();r.div.setHidden((0,dgt.boxEmpty)(c)),c!==void 0&&r.div.setBounds(c)}}toggleAxisDraggingCursor(t,e){for(const i of this.axes)i.direction===t&&i.div.setCursor(e?this.getCursor(t):void 0)}getCursor(t){return t===pgt.X?"ew-resize":"ns-resize"}initAxis(t,e,i,s){const a="afterend",n=t.proxyInteractionService.createProxyElement({type:"region",domManagerId:e,where:a});return n.setCursor(this.getCursor(s)),n.addListener("drag-start",o=>{o.device==="touch"&&o.sourceEvent.preventDefault(),i.onDragStart(e,s)}),n.addListener("drag-move",o=>i.onDrag(o)),n.addListener("drag-end",i.onDragEnd),n.addListener("dblclick",()=>i.onDoubleClick(e,s)),{axisId:e,div:n,direction:s}}diffAxisIds(t){const e=this.axes.map(n=>n.axisId),i=t.map(n=>n.axisId),s=e.filter(n=>!i.includes(n)),a=t.filter(n=>!e.includes(n.axisId));return{removed:s,added:a}}},GIt=(_(),w(P)),zU=(R(),w(st)),FU=16,fgt={off:1,short:.01,long:.002},mgt=class{constructor(){this.deceleration=1,this.zoomCoordsHistoryIndex=0,this.coordsHistory=[]}get decelerationValue(){const{deceleration:t}=this;return Math.max(typeof t=="number"?t:fgt[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:s=0,y2:a=0}=this.coords??{};this.onUpdate?.({type:"update",deltaX:e-s,deltaY:i-a})}start(){this.coordsMonitorTimeout=setInterval(this.recordCurrentZoomCoords.bind(this),16)}stop(){const{coordsHistory:t}=this;let e=0,i=0,s=0;if(t.length>0){const a=this.zoomCoordsHistoryIndex%FU;let n=a-1;n<0&&(n=t.length-1);let o=a;o>=t.length&&(o=0);const r=t[n],l=t[o];e=r.x-l.x,i=r.y-l.y,s=r.t-l.t}if(this.coords=void 0,clearInterval(this.coordsMonitorTimeout),this.coordsMonitorTimeout=void 0,this.zoomCoordsHistoryIndex=0,this.coordsHistory.length=0,s>0&&this.decelerationValue<1){const a=e/s,n=i/s,o=Math.hypot(a,n),r=Math.atan2(n,a),l=performance.now();this.inertiaHandle=(0,zU.getWindow)().requestAnimationFrame(c=>{this.animateInertia(c,c,l,o,r)})}}recordCurrentZoomCoords(){const{coords:t,coordsHistory:e,zoomCoordsHistoryIndex:i}=this;if(!t)return;const{x2:s,y2:a}=t,n=Date.now();e[i%FU]={x:s,y:a,t:n},this.zoomCoordsHistoryIndex+=1}animateInertia(t,e,i,s,a){const n=1-this.decelerationValue,o=-s/Math.log(n),r=s*(n**(e-i)-1)/Math.log(n),l=s*(n**(t-i)-1)/Math.log(n);this.onUpdate?.({type:"update",deltaX:-Math.cos(a)*(l-r),deltaY:-Math.sin(a)*(l-r)}),!(l>=o-1)&&(this.inertiaHandle=requestAnimationFrame(c=>{this.animateInertia(c,t,i,s,a)}))}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,s){const a=cc(t,t.x+Math.abs(i),t.y+t.height-Math.abs(s)),n=Math.sign(i)*a.x,o=-Math.sign(s)*a.y,r={};for(const[l,{direction:c,zoom:h}]of(0,zU.entries)(e)){if(h&&h.min===ii.min&&h.max===ii.max)continue;let u=Ys({[c]:h});u=bo(Jd(u,n*Ns(u),o*Ln(u))),r[l]={direction:c,zoom:u[c]}}return r}},ygt=(_(),w(P)),xgt=(R(),w(st)),bgt=200,vgt=class{update(t,e,i,s){const a=t.deltaX*e*bgt;return this.translateZooms(i,s,a)}translateZooms(t,e,i){const s={},a=cc(t,t.x+Math.abs(i),0),n=i<0?-a.x:a.x;for(const[o,{direction:r,zoom:l}]of(0,xgt.entries)(e)){if(r!==ygt._ModuleSupport.ChartAxisDirection.X)continue;let c=Ys({x:l});c=bo(Jd(c,n*Ns(c),0)),s[o]={direction:r,zoom:c.x}}return s}},VU=(_(),w(P)),Sgt=(R(),w(st)),Mgt=class{updateAxes(t,e,i,s){const a=t.sourceEvent,n={},{anchorPointX:o,anchorPointY:r,isScalingX:l,isScalingY:c,scrollingStep:h}=e,u=cc(i,a.offsetX??a.clientX,a.offsetY??a.clientY);for(const[d,{direction:p,zoom:g}]of(0,Sgt.entries)(s)){if(g==null)continue;let f={...g};const x=h*t.deltaY*(g.max-g.min);if(p===VU._ModuleSupport.ChartAxisDirection.X&&l)f.max+=x,f=wn(f,g,o,u.x);else if(p===VU._ModuleSupport.ChartAxisDirection.Y&&c)f.max+=x,f=wn(f,g,r,u.y);else continue;n[d]={direction:p,zoom:jD(f)}}return n}update(t,e,i,s){const{anchorPointX:a,anchorPointY:n,isScalingX:o,isScalingY:r,scrollingStep:l}=e,c=t.offsetX+i.x,h=t.offsetY+i.y,u=cc(i,c,h),d=t.deltaY;let p=Ys(s);return p.x.max+=o?l*d*Ns(s):0,p.y.max+=r?l*d*Ln(s):0,o&&(p.x=wn(p.x,s.x,a,u.x)),r&&(p.y=wn(p.y,s.y,n,u.y)),p=bo(p),p}updateDelta(t,e,i){const{anchorPointX:s,anchorPointY:a,isScalingX:n,isScalingY:o,scrollingStep:r}=e;let l=Ys(i);return l.x.max+=n?r*-t*Ns(i):0,l.y.max+=o?r*-t*Ln(i):0,n&&(l.x=wn(l.x,i.x,s)),o&&(l.y=wn(l.y,i.y,a)),l=bo(l),l}},Dgt=class{constructor(t,e,i){this.rect=t,this.getZoom=e,this.isZoomValid=i,this.rect.visible=!1}update(t,e,i){const s=t.currentX+(i?.x??0),a=t.currentY+(i?.y??0);this.rect.visible=!0,this.updateCoords(s,a,e,i),this.updateRect(i)}stop(t,e,i){let s=Ys();if(!t||!e)return s;this.coords&&(s=this.createZoomFromCoords(e,i));const a=e.width/t.width,n=e.height/t.height;return s=bo(agt(s,a,n)),this.reset(),s}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,s){if(!this.coords){this.coords={x1:t,y1:e,x2:t,y2:e};return}const{coords:a}=this;if(a.x2=t,a.y2=e,!s)return;const{isScalingX:n,isScalingY:o,keepAspectRatio:r}=i,l=this.getNormalisedDimensions();if(r&&n&&o){const c=s.width/s.height;a.y2<a.y1?a.y2=Math.min(a.y1-l.width/c,a.y1):a.y2=Math.max(a.y1+l.width/c,a.y1)}n||(a.x1=s.x,a.x2=s.x+s.width),o||(a.y1=s.y,a.y2=s.y+s.height)}updateRect(t){if(!t)return;const{rect:e}=this,i=this.getNormalisedDimensions(),{width:s,height:a}=i;let{x:n,y:o}=i;n=Math.max(n,t.x),n-=Math.max(0,n+s-(t.x+t.width)),o=Math.max(o,t.y),o-=Math.max(0,o+a-(t.y+t.height)),e.x=n,e.y=o,e.width=s,e.height=a;const r=this.createZoomFromCoords(t,this.getZoom());this.isZoomValid(r)?e.updateValid():e.updateInvalid()}createZoomFromCoords(t,e){const i=Ys(e),s=this.getNormalisedDimensions(),a=cc(t,s.x,s.y+s.height),n=s.width/t.width,o=s.height/t.height;let r=GD(i,n,o);const l=a.x*Ns(i),c=a.y*Ln(i);return r=Jd(r,l,c),r=bo(r),r}getNormalisedDimensions(){const{x1:t=0,y1:e=0,x2:i=0,y2:s=0}=this.coords??{},a=t<=i?t:i,n=e<=s?e:s,o=t<=i?i-t:t-i,r=e<=s?s-e:e-s;return{x:a,y:n,width:o,height:r}}},kgt=(_(),w(P)),a1=(R(),w(st)),{ActionOnSet:GU,BaseProperties:Igt,ChartAxisDirection:Agt,NativeWidget:Cgt,PropertiesArray:Lgt,Toolbar:wgt,ToolbarButtonProperties:Tgt,Property:ip}=kgt._ModuleSupport,n1=class extends Tgt{};y([ip],n1.prototype,"value",2),y([ip],n1.prototype,"section",2);var Af=class extends Igt{constructor(t,e,i,s,a,n,o){super(),this.ctx=t,this.getModuleProperties=e,this.canResetZoom=i,this.updateZoom=s,this.updateAxisZoom=a,this.resetZoom=n,this.isZoomValid=o,this.enabled=!1,this.buttons=new Lgt(n1),this.visible="hover",this.verticalSpacing=10,this.detectionRange=38,this.cleanup=new a1.CleanupRegistry,this.container=new Cgt((0,a1.createElement)("div")),this.container.addClass("ag-charts-zoom-buttons"),t.domManager.addChild("canvas-overlay","zoom-buttons",this.container.getElement()),this.toolbar=new wgt(t,"ariaLabelZoomToolbar","horizontal"),this.container.addChild(this.toolbar),this.toolbar.getElement().style.transform="translateY(54px)",this.toggleVisibility(this.visible==="always"),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),this.toolbar.addToolbarListener("button-focused",this.onButtonFocus.bind(this)),t.widgets.containerWidget.addListener("mousemove",this.onHover.bind(this)),t.widgets.containerWidget.addListener("mouseleave",this.onLeave.bind(this)),t.eventsHub.on("layout:complete",this.onLayoutComplete.bind(this)),this.teardown.bind(this))}destroy(){this.cleanup.flush()}toggleVisibleZoomed(t){this.visible==="zoomed"&&this.toggleVisibility(!t)}teardown(){this.ctx.domManager.removeChild("canvas-overlay","zoom-buttons"),this.container.destroy()}onLayoutComplete(t){const{buttons:e,container:i}=this,{rect:s}=t.series;this.toolbar.updateButtons(e),this.toggleButtons();const a=i.getBounds().height;i.setBounds({y:s.y+s.height-a})}onHover(t){if(!this.enabled||this.visible!=="hover"||this.toolbar.isHidden())return;const{container:e,detectionRange:i,ctx:{scene:s}}=this,{currentY:a,sourceEvent:{target:n}}=t,o=e.getElement(),r=o.offsetTop-i,l=a>r&&a<s.canvas.element.offsetHeight||n===o;this.toggleVisibility(l)}onLeave(){this.visible==="hover"&&this.toggleVisibility(!1)}toggleVisibility(t,e=!1){const{container:i,toolbar:s,verticalSpacing:a}=this;s.toggleClass("ag-charts-zoom-buttons__toolbar--hidden",!t);const n=s.getElement();n.style.transitionDuration=e?"0s":"",n.style.transform=t?"translateY(0)":`translateY(${i.getBounds().height+a}px)`}toggleButtons(){const t=Ys(this.ctx.zoomManager.getZoom());if(!(this.previousZoom&&Xx(this.previousZoom,t))){this.previousZoom=t;for(const[e,i]of this.buttons.entries()){let s=!0;switch(i?.value){case"pan-start":s=t.x.min>ii.min;break;case"pan-end":s=t.x.max<ii.max;break;case"pan-left":s=t.x.min>ii.min;break;case"pan-right":s=t.x.max<ii.max;break;case"zoom-out":s=!Xx(t,QO());break;case"zoom-in":s=this.isZoomValid(this.getNextZoomStateUnified("zoom-in",t,this.getModuleProperties()));break;case"reset":s=this.canResetZoom(t);break}this.toolbar.toggleButtonEnabledByIndex(e,s)}}}onButtonPress({button:t}){if(!this.enabled||this.toolbar.isHidden())return;const e=this.getModuleProperties();if(e.independentAxes&&t.value!=="reset"){const i=this.ctx.zoomManager.getAxisZooms();for(const[s,{direction:a,zoom:n}]of(0,a1.entries)(i))n!=null&&this.onButtonPressAxis(t,e,s,a,n)}else this.onButtonPressUnified(t,e)}onButtonFocus(t){this.toggleVisibility(!0,!0)}onButtonPressAxis(t,e,i,s,a){const{isScalingX:n,isScalingY:o,scrollingStep:r}=e;let l={...a};const c=a.max-a.min;switch(t.value){case"pan-start":l.max=c,l.min=0;break;case"pan-end":l.min=l.max-c,l.max=ii.max;break;case"pan-left":l.min-=c*r,l.max-=c*r;break;case"pan-right":l.min+=c*r,l.max+=c*r;break;case"zoom-in":case"zoom-out":{const h=s===Agt.X,u=h&&n||!h&&o;let d=t.value==="zoom-in"?1-r:1+r;u||(d=1);const p=h?this.getAnchorPointX(e):this.getAnchorPointY(e);l.max=l.min+(l.max-l.min)*d,l=wn(l,a,p);break}}this.updateAxisZoom(i,s,jD(l))}onButtonPressUnified(t,e){const{scrollingStep:i}=e,s=Ys(this.ctx.zoomManager.getZoom());let a=Ys(s);switch(t.value){case"reset":this.resetZoom();return;case"pan-start":a.x.max=Ns(a),a.x.min=0;break;case"pan-end":a.x.min=ii.max-Ns(a),a.x.max=ii.max;break;case"pan-left":a=Jd(a,-Ns(a)*i,0);break;case"pan-right":a=Jd(a,Ns(a)*i,0);break;case"zoom-in":case"zoom-out":{a=this.getNextZoomStateUnified(t.value,s,e);break}}this.updateZoom(bo(a))}getNextZoomStateUnified(t,e,i){const{isScalingX:s,isScalingY:a,scrollingStep:n}=i,o=t==="zoom-in"?1-n:1+n,r=GD(e,s?o:1,a?o:1);return r.x=wn(r.x,e.x,this.getAnchorPointX(i)),r.y=wn(r.y,e.y,this.getAnchorPointY(i)),r}getAnchorPointX(t){const e=this.anchorPointX??t.anchorPointX;return e==="pointer"?TU:e}getAnchorPointY(t){const e=this.anchorPointY??t.anchorPointY;return e==="pointer"?NU:e}};y([ip,GU({changeValue(t){this.toolbar?.setHidden(!t)}})],Af.prototype,"enabled",2),y([ip],Af.prototype,"buttons",2),y([ip,GU({changeValue(t,e){e!=null&&this.toggleVisibility(t==="always")}})],Af.prototype,"visible",2),y([ip],Af.prototype,"anchorPointX",2),y([ip],Af.prototype,"anchorPointY",2);var jIt=(_(),w(P)),sp=1e6;function UD({min:t,max:e},i,s,a){return a===0?0:sp*((i-s)/a*(e-t)+t)}function Ngt(t,e,i,s,a,n){[t,e]=[Math.min(t,e),Math.max(t,e)],[i,s]=[Math.min(i,s),Math.max(i,s)];const o=sp*(i-a)/n,r=sp*(s-a)/n,l=(i-a)/(s-a),c=(t-l*e)/(sp-o+l*(r-sp)),h=(e+(r-sp)*c)/r;return{min:c,max:h}}function jU(t,e,i,s){e===0&&(e=30),s===0&&(s=30);const a=t-e,n=t+e,o=i-s,r=i+s;return!(n<o||r<a)}var Ogt=class{constructor(){this.touchStart={origins:[{identifier:0,normalX:NaN,normalY:NaN},{identifier:0,normalX:NaN,normalY:NaN}]},this.initialZoom={x:{min:0,max:1},y:{min:0,max:1}},this.previous={a1:NaN,a2:NaN,b1:NaN,b2:NaN}}start(t,e,i){if(t.sourceEvent.targetTouches.length!==2)return!1;t.sourceEvent.preventDefault();const s=Array.from(t.sourceEvent.targetTouches),{x:a,y:n,width:o,height:r}=e.getBoundingClientRect();this.initialZoom.x.min=i.x?.min??0,this.initialZoom.x.max=i.x?.max??1,this.initialZoom.y.min=i.y?.min??0,this.initialZoom.y.max=i.y?.max??1,this.touchStart.origins.forEach(g=>g.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 f=s[g].clientX,x=n+r-s[g].clientY;this.touchStart.origins[g].identifier=s[g].identifier,this.touchStart.origins[g].normalX=UD(this.initialZoom.x,f,a,o),this.touchStart.origins[g].normalY=UD(this.initialZoom.y,x,n,r)}const[l,c]=s,[h,u]=this.touchStart.origins,d=jU(l.clientX,l.radiusX,c.clientX,c.radiusX);return jU(l.clientY,l.radiusY,c.clientY,c.radiusY)&&(h.normalY=u.normalY=(h.normalY+u.normalY)/2),d&&(h.normalX=u.normalX=(h.normalX+u.normalX)/2),!0}update(t,e){t.sourceEvent.preventDefault();const i=Array.from(t.sourceEvent.targetTouches),{x:s,y:a,width:n,height:o}=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,u=l[0].clientX,d=l[1].clientX,p=r[0].normalY,g=r[1].normalY,f=a+o-l[0].clientY,x=a+o-l[1].clientY;return this.twitchTolerantZoomPan4(c,h,u,d,p,g,f,x,s,a,n,o)}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,s,a,n,o,r,l,c,h,u){const{initialZoom:d,previous:p}=this,g=WU(t,e,i,s,p,"a1","a2",l,h,d.x),f=WU(a,n,o,r,p,"b1","b2",c,u,d.y);return{x:g,y:f}}};function WU(t,e,i,s,a,n,o,r,l,c){if(t!=e){const h=a[n],u=a[o];return Math.abs(i-h)+Math.abs(s-u)<=1?(i=h,s=u):(a[n]=i,a[o]=s),Ngt(t,e,i,s,r,l)}else{const h=UD(c,i,r,l),u=UD(c,s,r,l),d=(h+u)/2,p=(t-d)/sp;return{min:c.min+p,max:c.max+p}}}var{ActionOnSet:KD,ChartAxisDirection:Cf,ChartUpdateType:HU,Property:Ji,InteractionState:YD,ProxyProperty:Pgt}=ep._ModuleSupport,ZD=t=>(0,qx.roundTo)(t,10),$U="zoom-cursor",o1="zoom-tooltip",r1=class extends ep._ModuleSupport.BaseProperties{constructor(t){super(),this.onChange=t,this.enabled=!1,this.padding=0}};y([Ji,KD({changeValue(t){this.onChange({enabled:t,padding:this.padding})}})],r1.prototype,"enabled",2),y([Ji,KD({changeValue(t){this.onChange({enabled:this.enabled,padding:t})}})],r1.prototype,"padding",2);var fs=class extends ep._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=Qd/10,this.keepAspectRatio=!1,this.minVisibleItems=2,this.anchorPointX=TU,this.anchorPointY=NU,this.autoScaling=new r1(i=>{this.ctx.zoomManager.setAutoScaleYAxis(i.enabled,i.padding)}),this.canResetZoom=i=>(i??(i=this.getZoom()),!Xx(i,this.getResetZoom())),this.buttons=new Af(this.ctx,this.getModuleProperties.bind(this),this.canResetZoom,this.updateZoom.bind(this),this.updateAxisZoom.bind(this),this.resetZoom.bind(this),this.isZoomValid.bind(this)),this.axisDragger=new hgt,this.panner=new mgt,this.scroller=new Mgt,this.scrollPanner=new vgt,this.twoFingers=new Ogt,this.deceleration="short",this.dragState=0,this.isState=i=>this.ctx.interactionManager.isState(i),this.destroyContextMenuActions=void 0,this.isFirstWheelEvent=!0,this.debouncedWheelReset=(0,qx.debounce)(()=>{this.isFirstWheelEvent=!0},100);const e=new $D;this.selector=new Dgt(e,this.getZoom.bind(this),this.isZoomValid.bind(this)),this.contextMenu=new ugt(t.eventsHub,t.contextMenuRegistry,t.zoomManager,this.getModuleProperties.bind(this),this.canResetZoom,()=>this.paddedRect,this.updateZoom.bind(this),this.isZoomValid.bind(this)),this.domProxy=new ggt({onDragStart:(i,s)=>this.onAxisDragStart(i,s),onDrag:i=>{this.onDragMove({...i,currentX:i.offsetX,currentY:i.offsetY})},onDragEnd:()=>this.onDragEnd(),onDoubleClick:(i,s)=>{this.hoveredAxis={id:i,direction:s},this.onDoubleClick(),this.hoveredAxis=void 0}}),t.widgets.seriesDragInterpreter&&this.cleanup.register(t.widgets.seriesDragInterpreter.events.on("dblclick",i=>this.onDoubleClick(i)),t.widgets.seriesDragInterpreter.events.on("drag-move",i=>this.onDragMove(i)),t.widgets.seriesDragInterpreter.events.on("drag-start",i=>this.onDragStart(i)),t.widgets.seriesDragInterpreter.events.on("drag-end",()=>this.onDragEnd())),this.cleanup.register(t.scene.attachNode(e),t.eventsHub.on("series:keynav-zoom",i=>this.onNavZoom(i)),t.widgets.seriesWidget.addListener("wheel",i=>this.onWheel(i)),t.widgets.seriesWidget.addListener("touchstart",(i,s)=>this.onTouchStart(i,s)),t.widgets.seriesWidget.addListener("touchmove",(i,s)=>this.onTouchMove(i,s)),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.eventsHub.on("layout:complete",i=>this.onLayoutComplete(i)),t.eventsHub.on("zoom:change",i=>this.onZoomChange(i)),t.eventsHub.on("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:s,ctx:{zoomManager:a}}=this;!e||!i||!this.isState(YD.ZoomClickable)||(s?a.resetAxisZoom("zoom",s.id):t?.preventZoomDblClick||this.resetZoom())}onDragStart(t){const{enabled:e,enableAxisDragging:i,enablePanning:s,enableSelecting:a,hoveredAxis:n,ctx:{domManager:o,zoomManager:r}}=this;if(!e||!this.hoveredAxis&&(!this.isState(YD.ZoomDraggable)||this.dragState!==0||this.isIgnoredTouch(t)))return;this.panner.stopInteractions();let l=0;if(i&&n)l=1;else if(t!=null){const c=this.isPanningKeyPressed(t.sourceEvent);s&&(!a||c)?(o.updateCursor($U,"grabbing"),l=2,this.panner.start()):a&&!c&&(l=3)}(this.dragState=l)!==0&&r.fireZoomPanStartEvent("zoom")}onDragMove(t){const{anchorPointX:e,anchorPointY:i,axisDragger:s,dragState:a,enabled:n,paddedRect:o,panner:r,selector:l,seriesRect:c,shouldFlipXY:h,hoveredAxis:u,ctx:{interactionManager:d,tooltipManager:p,updateService:g,zoomManager:f}}=this;if(!n||!o||!c||!u&&(!this.isState(YD.ZoomDraggable)||this.isIgnoredTouch(t)))return;d.pushState(ep._ModuleSupport.InteractionState.ZoomDrag),t.device==="touch"&&t.sourceEvent.preventDefault();const x=this.getZoom();switch(a){case 1:{if(!u)break;const{id:m,direction:b}=u;let v=b===Cf.X?e:i;h&&(v=b===Cf.X?i:e);const M=f.getAxisZoom(m),D=s.update(t,b,v,c,x,M);f.setAxisManuallyAdjusted("zoom",m),this.updateAxisZoom(m,b,D);break}case 2:r.update(t);break;case 3:l.update(t,this.getModuleProperties(),o);break;case 0:return}p.updateTooltip(o1),g.update(HU.PERFORM_LAYOUT,{skipAnimations:!0})}onDragEnd(){const{axisDragger:t,dragState:e,enabled:i,panner:s,selector:a,ctx:{domManager:n,interactionManager:o,tooltipManager:r}}=this;if(o.popState(ep._ModuleSupport.InteractionState.ZoomDrag),!(!i||e===0)){switch(e){case 1:this.hoveredAxis=void 0,t.stop();break;case 2:s.stop();break;case 3:{if(!a.didUpdate())break;const l=this.getZoom(),c=a.stop(this.seriesRect,this.paddedRect,l);this.updateZoom(c);break}}this.dragState=0,n.updateCursor($U),r.removeTooltip(o1)}}onNavZoom(t){const{enabled:e,enableScrolling:i,scroller:s}=this;!this.ctx.interactionManager.isState(ep._ModuleSupport.InteractionState.Default)||!e||!i||(t.widgetEvent.sourceEvent.preventDefault(),this.updateZoom(s.updateDelta(t.delta,this.getModuleProperties(),this.getZoom())))}onWheel(t){const{enabled:e,enablePanning:i,enableScrolling:s,paddedRect:a}=this;if(!e||!s||!a||!this.isState(YD.ZoomWheelable))return;const{deltaX:n,deltaY:o}=t.sourceEvent,r=n!=null&&o!=null&&Math.abs(n)>Math.abs(o);i&&r?this.onWheelPanning(t):this.onWheelScrolling(t)}onWheelPanning(t){const{scrollingStep:e,scrollPanner:i,seriesRect:s,ctx:{zoomManager:a}}=this;if(!s)return;t.sourceEvent.preventDefault();const n=i.update(t,e,s,a.getAxisZooms());for(const[o,{direction:r,zoom:l}]of(0,qx.entries)(n))this.updateAxisZoom(o,r,l)}onWheelScrolling(t){const{enableAxisDragging:e,enableIndependentAxes:i,hoveredAxis:s,scroller:a,seriesRect:n,ctx:{zoomManager:o}}=this;if(!n)return;const r=this.getZoom();let l=t.deltaY>0&&this.isMaxZoom(r);const c=e&&s!=null;let h=this.isScalingX(),u=this.isScalingY();c&&(h=s.direction===ep._ModuleSupport.ChartAxisDirection.X,u=!h);const d=this.getModuleProperties({isScalingX:h,isScalingY:u});let p=!0;if(i===!0){const g=a.updateAxes(t,d,n,o.getAxisZooms());for(const[f,{direction:x,zoom:m}]of(0,qx.entries)(g))c&&s.id!==f||p&&(p=this.updateAxisZoom(f,x,m))}else{const g=a.update(t,d,n,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(bo(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),this.enabled&&(this.seriesRect=t.series.rect,this.paddedRect=t.series.paddedRect,this.enableAxisDragging&&this.toggleAxisDraggingCursors())}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:s,zoomManager:a}}=this;if(!i)return;const n=e.translateZooms(i,a.getAxisZooms(),t.deltaX,t.deltaY);for(const[o,{direction:r,zoom:l}]of(0,qx.entries)(n))this.updateAxisZoom(o,r,l);s.updateTooltip(o1)}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 Xx(t,QO())}isZoomValid(t){const{minVisibleItems:e,ctx:{zoomManager:i}}=this;if(e===0)return!0;const s=this.getZoom(),a=ZD(Ns(t))<ZD(Ns(s)),n=ZD(Ln(t))<ZD(Ln(s));return!a&&!n?!0:i.isVisibleItemsCountAtLeast(t,e)}isAxisZoomValid(t,e){const{minVisibleItems:i,ctx:{zoomManager:s}}=this,a=this.getZoom(),n=e.max-e.min,o=a[t].max-a[t].min,r={...a,[t]:e};return n>=o||s.isVisibleItemsCountAtLeast(r,i)}resetZoom(){this.ctx.zoomManager.resetZoom("zoom")}updateSyncZoom(t){this.updateZoom(t)}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(HU.SCENE_RENDER,{skipAnimations:!0}),!1)}updatePrimaryAxisZooms(t){this.updatePrimaryAxisZoom(t,Cf.X),this.updatePrimaryAxisZoom(t,Cf.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:s,ctx:{zoomManager:a}}=this;if(!i)return!1;const n=this.getZoom();return s!==!0?(n[e]=i,this.updateUnifiedZoom(n)):this.isAxisZoomValid(e,i)?(a.updateAxisZoom("zoom",t,i),!0):!1}toggleAxisDraggingCursors(){const{anchorPointX:t,anchorPointY:e,domProxy:i}=this,s=this.getZoom();let a=Ns(s)!==Qd,n=Ln(s)!==Qd;if(!a){const o=GD(s,.999,1);o.x=wn(o.x,s.x,t),a=this.isZoomValid(o)}if(!n){const o=GD(s,1,.999);o.y=wn(o.y,s.y,e),n=this.isZoomValid(o)}i.toggleAxisDraggingCursor(Cf.X,a),i.toggleAxisDraggingCursor(Cf.Y,n)}getZoom(){return Ys(this.ctx.zoomManager.getZoom())}getResetZoom(){return Ys(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}}};y([KD({newValue(t){this.onEnabledChange(t)}}),Ji],fs.prototype,"enabled",2),y([Ji],fs.prototype,"enableAxisDragging",2),y([Ji],fs.prototype,"enableDoubleClickToReset",2),y([KD({changeValue(t){this.ctx.zoomManager.setIndependentAxes(!!t)}}),Ji],fs.prototype,"enableIndependentAxes",2),y([Ji],fs.prototype,"enablePanning",2),y([Ji],fs.prototype,"enableScrolling",2),y([Ji],fs.prototype,"enableSelecting",2),y([Ji],fs.prototype,"enableTwoFingerZoom",2),y([Ji],fs.prototype,"panKey",2),y([Ji],fs.prototype,"axes",2),y([Ji],fs.prototype,"scrollingStep",2),y([Ji],fs.prototype,"keepAspectRatio",2),y([Ji],fs.prototype,"minVisibleItems",2),y([Ji],fs.prototype,"anchorPointX",2),y([Ji],fs.prototype,"anchorPointY",2),y([Ji],fs.prototype,"autoScaling",2),y([Ji],fs.prototype,"buttons",2),y([Pgt("panner.deceleration"),Ji],fs.prototype,"deceleration",2);var _gt={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"}]},Egt={type:"root",optionsKey:"zoom",packageType:"enterprise",chartTypes:["cartesian","topology"],moduleFactory:t=>new fs(t),themeTemplate:{zoom:{anchorPointX:"end",anchorPointY:"middle",axes:"x",buttons:_gt,enabled:!1,enableAxisDragging:!0,enableDoubleClickToReset:!0,enablePanning:!0,enableScrolling:!0,enableSelecting:!1,enableTwoFingerZoom:!0,deceleration:"short",minVisibleItems:2,panKey:"alt",scrollingStep:.1,autoScaling:{enabled:{$eq:[{$path:"../axes"},"x"]},padding:.05}}}},WIt=(_(),w(P)),Rgt=(_(),w(P)),UU=(R(),w(st)),Bgt=(_(),w(P)),KU=(R(),w(st)),zgt=(_(),w(P));function Qx(t,e,i){return zgt._ModuleSupport.callWithContext(t.chartService,e,i)}var{AxisInterval:Fgt,AxisLabel:Vgt,ZIndexMap:Ggt,LinearScale:jgt,BBox:Wgt,TranslatableGroup:Hgt,Selection:$gt,Text:Ugt,CachedTextMeasurerPool:Kgt,createIdsGenerator:Ygt,findMinMax:Zgt,findRangeExtent:Xgt,estimateTickCount:qgt}=Bgt._ModuleSupport,l1=class IP{constructor(e,i){this.ctx=e,this.dataProvider=i,this.id=(0,KU.createId)(this),this.axisGroup=new Hgt({name:`${this.id}-AxisTicks`,zIndex:Ggt.AXIS}),this.labelSelection=$gt.select(this.axisGroup,Ugt),this.interval=new Fgt,this.label=new Vgt,this.scale=new jgt,this.position="bottom",this.translationX=0,this.translationY=0,this.padding=0}get horizontal(){return this.position==="top"||this.position==="bottom"}attachAxis(e){e.appendChild(this.axisGroup)}calculateLayout(){const{position:e,translationX:i,translationY:s,horizontal:a,label:n}=this;let o,r;switch(e){case"top":o="bottom",r="center",n.mirrored=!1,n.parallel=!0;break;case"bottom":o="top",r="center",n.mirrored=!1,n.parallel=!0;break;case"right":o="middle",r="left",n.mirrored=!0,n.parallel=!1;break;case"left":o="middle",r="right",n.mirrored=!0,n.parallel=!1;break}const l=[],c=this.generateTicks(),{ticks:h}=c;return this.labelSelection.update(h,void 0,u=>u.tickId),this.axisGroup.setProperties({translationX:i,translationY:s}),this.labelSelection.each((u,d)=>{u.fontFamily=n.fontFamily,u.fontSize=n.fontSize,u.fontStyle=n.fontStyle,u.fontWeight=n.fontWeight,u.fill=n.color,u.textBaseline=o,u.textAlign=r,u.text=d.tickLabel,u.x=a?d.translation:0,u.y=a?0:d.translation,l.push(u.getBBox())}),l.length>0?Wgt.merge(l).translate(i,s):void 0}tickFormatter(e,i,s,a){const{ctx:n}=this,{formatManager:o}=n,r=this.dataProvider.data.flatMap(l=>l.series);return(l,c)=>{const h={type:"number",value:l,datum:void 0,seriesId:void 0,legendItemName:void 0,key:void 0,source:"gradient-legend",property:"color",domain:e,boundSeries:r,fractionDigits:a};return this.label.formatValue((u,d)=>Qx(n,u,d),h,c)??o.format((u,d)=>Qx(n,u,d),h)??o.defaultFormat(h)}}inRange(e,i=.001){const[s,a]=Zgt(this.scale.range);return e>=s-i&&e<=a+i}generateTicks(){const{minSpacing:e,maxSpacing:i}=this.interval,{maxTickCount:s,minTickCount:a,tickCount:n}=qgt(Xgt(this.scale.range),1,e,i,IP.DefaultTickCount,IP.DefaultMinSpacing),o=this.getTicksData({nice:!0,interval:this.interval.step,tickCount:n,minTickCount:a,maxTickCount:s});if(this.position==="bottom"||this.position==="top"){const r=Kgt.getMeasurer({font:this.label}),{domain:l}=this.scale,h=l[0]>l[1]?-1:1;let u=-1/0*h;o.ticks=o.ticks.filter(d=>Math.sign(d.translation-u)!==h?!1:(u=d.translation+r.textWidth(d.tickLabel,!0)*h,!0))}return o}getTicksData(e){const i=[],s=e.nice?this.scale.niceDomain(e):this.scale.domain,a=this.scale.ticks(e,s)?.ticks??[],n=a.reduce((l,c)=>Math.max(l,(0,KU.countFractionDigits)(c)),0),o=Ygt(),r=this.tickFormatter(s,a,!1,n);for(let l=0;l<a.length;l++){const c=a[l],h=this.scale.convert(c);if(!this.inRange(h))continue;const u=r(c,l);if(u==null||u==="")continue;const d=o(u);i.push({tick:c,tickId:d,tickLabel:u,translation:h})}return{rawTicks:a,fractionDigits:n,ticks:i}}};l1.DefaultTickCount=5,l1.DefaultMinSpacing=10;var Qgt=l1,{BaseProperties:Jgt,ZIndexMap:tft,ProxyProperty:c1,Property:ap,LayoutElement:eft,Group:ift,Rect:sft,Marker:aft,TranslatableGroup:nft,BBox:h1}=Rgt._ModuleSupport,u1=class extends Jgt{constructor(){super(...arguments),this.thickness=16,this.preferredLength=100}};y([ap],u1.prototype,"thickness",2),y([ap],u1.prototype,"preferredLength",2);var XD=class{constructor(t){this.axisTicks=t}};y([c1("axisTicks.label")],XD.prototype,"label",2),y([c1("axisTicks.interval")],XD.prototype,"interval",2),y([c1("axisTicks.padding")],XD.prototype,"padding",2);var np=class{constructor(t){this.ctx=t,this.id=(0,UU.createId)(this),this.legendGroup=new nft({name:"legend",zIndex:tft.LEGEND}),this.gradientRect=new sft,this.arrow=new aft({shape:"triangle"}),this.ticksGroup=new ift({name:"legend-axis-group"}),this.cleanup=new UU.CleanupRegistry,this.enabled=!1,this.position="bottom",this.reverseOrder=!1,this.gradient=new u1,this.spacing=20,this.data=[],this.highlightManager=t.highlightManager,this.axisTicks=new Qgt(t,this),this.axisTicks.attachAxis(this.ticksGroup),this.scale=new XD(this.axisTicks),this.legendGroup.append([this.gradientRect,this.arrow,this.ticksGroup]),this.cleanup.register(t.eventsHub.on("highlight:change",()=>this.onChartHoverChange()),t.layoutManager.registerElement(eft.Legend,e=>this.onStartLayout(e)),()=>this.legendGroup.remove())}isVertical(){return this.position==="right"||this.position==="left"}destroy(){this.cleanup.flush()}attachLegend(t){t.appendChild(this.legendGroup)}onStartLayout(t){const[e]=this.data;if(!this.enabled||!e?.enabled||e.legendType!=="gradient"){this.legendGroup.visible=!1;return}const{colorRange:i}=this.normalizeColorArrays(e);this.updateGradientRect(t.layoutBox,i);const s=this.updateAxis(e)??new h1(0,0,0,0),{left:a,top:n}=this.getMeasurements(t.layoutBox,s);this.updateArrow(),this.legendGroup.visible=!0,this.legendGroup.translationX=a,this.legendGroup.translationY=n}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[s,a]=e,n=i.length;return e=i.map((o,r)=>r===0?s:r===n-1?a:s+(a-s)*r/(n-1)),{colorDomain:e,colorRange:i}}updateGradientRect(t,e){const{gradientRect:i,gradient:s}=this,{preferredLength:a,thickness:n}=s;let o;this.isVertical()?(o=0,i.width=n,i.height=Math.min(t.height,a)):(o=90,i.width=Math.min(t.width,a),i.height=n),i.fill={type:"gradient",gradient:"linear",colorSpace:"oklch",colorStops:e.map((r,l)=>({stop:l/(e.length-1),color:r})),rotation:o}}updateAxis(t){const{position:e,axisTicks:i,gradient:s,scale:a,gradientRect:n}=this,o=this.isVertical(),r=this.reverseOrder!==o;i.position=e;const l=s.thickness+(a.padding??0);i.translationX=o?l:0,i.translationY=o?0:l,i.scale.domain=r?t.colorDomain.slice().reverse():t.colorDomain,i.scale.range=o?[0,n.height]:[0,n.width];let c=new h1(0,0,n.width,n.height);const h=i.calculateLayout();return h&&(c=h1.merge([c,h])),c}updateArrow(){const t=this.highlightManager.getActiveHighlight(),{arrow:e}=this;if(t?.colorValue==null){e.visible=!1;return}const{scale:i,label:s}=this.axisTicks,a=s.fontSize??0,n=i.convert(t.colorValue);let{x:o,y:r}=this.gradientRect,l=Math.PI;this.isVertical()?(o-=a/2,r+=n,l/=2):(o+=n,r-=a/2),e.visible=!0,e.fill=s.color,e.rotation=l,e.size=a,e.translationX=o,e.translationY=r}getMeasurements(t,e){let{x:i,y:s}=t;const{width:a,height:n}=e;switch(this.position){case"left":s+=t.height/2-n/2,t.shrink(a+this.spacing,"left");break;case"right":i+=t.width-a,s+=t.height/2-n/2,t.shrink(a+this.spacing,"right");break;case"top":i+=t.width/2-a/2,t.shrink(n+this.spacing,"top");break;case"bottom":i+=t.width/2-a/2,s+=t.height-n,t.shrink(n+this.spacing,"bottom")}return{top:s,left:i}}onChartHoverChange(){this.enabled&&this.updateArrow()}};np.className="GradientLegend",y([ap],np.prototype,"enabled",2),y([ap],np.prototype,"position",2),y([ap],np.prototype,"reverseOrder",2),y([ap],np.prototype,"gradient",2),y([ap],np.prototype,"spacing",2);var oft={type:"legend",optionsKey:"gradientLegend",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient",moduleFactory:t=>new np(t),themeTemplate:{enabled:!1,position:"bottom",spacing:20,scale:{padding:13,label:{color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},minSpacing:5},interval:{minSpacing:15}},gradient:{preferredLength:100,thickness:16},reverseOrder:!1},removable:"standalone-only"},HIt=(_(),w(P)),rft=(R(),w(st));function lft(t,e){const i=t.addChild("canvas-overlay","watermark"),s=(0,rft.createElement)("span");s.innerText=e,i.addEventListener("animationend",()=>{t.removeChild("canvas-overlay","watermark"),t.removeStyles("watermark")}),i.classList.add("ag-watermark"),i.appendChild(s)}var cft=(_(),w(P)),hft=(_(),w(P)),$It=(R(),w(st)),{ordinalTimeAxisOptionsDefs:uft,angleNumberAxisOptionsDefs:dft,angleCategoryAxisOptionsDefs:pft,radiusNumberAxisOptionsDefs:gft,radiusCategoryAxisOptionsDefs:fft}=hft._ModuleSupport,mft={type:"axis",name:"ordinal-time",chartType:"cartesian",enterprise:!0,options:uft,create:t=>new mx(t)},yft={type:"axis",name:"angle-number",chartType:"polar",enterprise:!0,options:dft,create:t=>new Nd(t)},xft={type:"axis",name:"angle-category",chartType:"polar",enterprise:!0,options:pft,create:t=>new vh(t)},bft={type:"axis",name:"radius-number",chartType:"polar",enterprise:!0,options:gft,create:t=>new Kg(t)},vft={type:"axis",name:"radius-category",chartType:"polar",enterprise:!0,options:fft,create:t=>new Sh(t)},Sft=(_(),w(P)),Mft=(_(),w(P)),{Chart:Dft,Property:kft}=Mft._ModuleSupport;function Ift(t){return t.type==="sankey"||t.type==="chord"}var qD=class extends Dft{getChartType(){return"flow-proportion"}async updateData(){await super.updateData();const t=this.getOptions();this.nodes!==t.nodes&&(this.nodes=t.nodes);const{nodes:e}=this;this.series.forEach(i=>{Ift(i)&&i.setChartNodes(e)})}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:s}=t;s.shrink(this.seriesArea.padding.toJson());const a=s.clone();this.seriesRect=a,this.animationRect=a,e.visible=this.series.some(n=>n.visible);for(const n of[e,i])n.translationX=Math.floor(a.x),n.translationY=Math.floor(a.y);this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:e.visible,rect:a,paddedRect:a}})}};qD.className="FlowProportionChart",qD.type="flow-proportion",y([kft],qD.prototype,"nodes",2);var{isAgFlowProportionChartOptions:Aft,flowProportionChartOptionsDefs:Cft}=Sft._ModuleSupport,Lft={type:"chart",name:"flow-proportion",enterprise:!0,options:Cft,detect:Aft,create(t,e){return new qD(t,e)}},wft=(_(),w(P)),Tft=(_(),w(P)),{Chart:Nft}=Tft._ModuleSupport,d1=class extends Nft{getChartType(){return"gauge"}performLayout(t){const{seriesRoot:e,annotationRoot:i,series:s,seriesArea:a}=this,{layoutBox:n}=t,o=n.clone();n.shrink(a.padding.toJson()),this.seriesRect=o.clone().translate(o.x-n.x,o.y-n.y),this.animationRect=n,e.visible=s.some(r=>r.visible);for(const r of[e,i])r.translationX=Math.floor(n.x),r.translationY=Math.floor(n.y);this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:e.visible,rect:o,paddedRect:n}})}getAriaLabel(){const t=[],e=this.getCaptionText();e.length!==0&&t.push(e);for(const s of this.series)t.push(s.getCaptionText());const i=t.join(". ");return this.ctx.localeManager.t("ariaAnnounceGaugeChart",{caption:i})}};d1.className="GaugeChart",d1.type="gauge";var{isAgGaugeChartOptions:Oft,gaugeChartOptionsDefs:Pft}=wft._ModuleSupport,_ft={type:"chart",name:"gauge",enterprise:!0,options:Pft,detect:Oft,create(t,e){return new d1(t,e)}},Eft=(_(),w(P)),Rft=(_(),w(P)),{Chart:Bft}=Rft._ModuleSupport,p1=class extends Bft{getChartType(){return"hierarchy"}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:s}=t;s.shrink(this.seriesArea.padding.toJson());const a=s.clone();this.seriesRect=a,this.animationRect=a;for(const n of[e,i])n.translationX=Math.floor(a.x),n.translationY=Math.floor(a.y);e.visible=this.series[0].visible,e.setClipRect(a.clone()),this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:a,paddedRect:a}})}getAriaLabel(){const t=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:t})}};p1.className="HierarchyChart",p1.type="hierarchy";var{isAgHierarchyChartOptions:zft,hierarchyChartOptionsDefs:Fft}=Eft._ModuleSupport,Vft={type:"chart",name:"hierarchy",enterprise:!0,options:Fft,detect:zft,create(t,e){return new p1(t,e)}},Gft=(_(),w(P)),jft=(_(),w(P)),{Chart:Wft}=jft._ModuleSupport,g1=class extends Wft{getChartType(){return"standalone"}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:s}=t;s.shrink(this.seriesArea.padding.toJson());const a=s.clone();this.seriesRect=a,this.animationRect=a;for(const n of[e,i])n.translationX=Math.floor(s.x),n.translationY=Math.floor(s.y);e.visible=this.series[0].visible,this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:a,paddedRect:s}})}getAriaLabel(){const t=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:t})}};g1.className="StandaloneChart",g1.type="standalone";var{isAgStandaloneChartOptions:Hft,standaloneChartOptionsDefs:$ft}=Gft._ModuleSupport,Uft={type:"chart",name:"standalone",enterprise:!0,options:$ft,detect:Hft,create(t,e){return new g1(t,e)}},Kft=(_(),w(P)),Yft=(_(),w(P)),{Chart:Zft,MercatorScale:YU,NumberAxis:ZU,Property:Xft}=Yft._ModuleSupport;function XU(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 QD=class extends Zft{constructor(t,e){super(t,e),this.xAxis=new ZU(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new ZU(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}async updateData(){await super.updateData();const t=this.getOptions();this.topology!==t.topology&&(this.topology=t.topology);const{topology:e}=this;this.series.forEach(i=>{XU(i)&&i.setChartTopology(e)})}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:s}=t;s.shrink(this.seriesArea.padding.toJson());const a=s.clone();this.seriesRect=a,this.animationRect=a;const n=this.series.filter(XU),o=n.reduce((c,h)=>{if(!h.visible)return c;const u=h.topologyBounds;return u==null?c:c==null?u:c.merge(u)},void 0);let r;if(o!=null){const{lon0:c,lat0:h,lon1:u,lat1:d}=o,p=[[c,h],[u,d]],g=YU.bounds(p),{width:f,height:x}=a,m=Math.min(f/g.width,x/g.height),b=g.width*m,v=g.height*m,M=(f-b)/2,D=(x-v)/2,L=M,C=D,A=M+b,T=D+v,N=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),O=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),E=(A-L)/(N.max-N.min),z=L-E*N.min,B=(T-C)/(1-O.min-(1-O.max)),F=C-B*(1-O.max);r=new YU(p,[[z,F],[z+E,F+B]])}n.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(a.x),c.translationY=Math.floor(a.y),c.setClipRect(a.clone());this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:l,rect:a,paddedRect:a}})}};QD.className="TopologyChart",QD.type="topology",y([Xft],QD.prototype,"topology",2);var{isAgTopologyChartOptions:qft,topologyChartOptionsDefs:Qft}=Kft._ModuleSupport,Jft={type:"chart",name:"topology",enterprise:!0,options:Qft,detect:qft,create(t,e){return new QD(t,e)}},tmt=(_(),w(P)),emt=(_(),w(P)),At=(R(),w(st)),{annotationCalloutStylesDefs:imt,annotationNoteStylesDefs:smt,annotationTextStylesDef:amt,annotationCommentStylesDefs:nmt,annotationMeasurerStylesDefs:f1,annotationShapeStylesDefs:qU,annotationChannelTextDefs:omt,annotationCrossLineStyleDefs:QU,annotationFibonacciStylesDefs:JU,annotationLineStyleDefs:tK,annotationLineTextDefs:rmt,annotationDisjointChannelStyleDefs:lmt,annotationParallelChannelStyleDefs:cmt}=emt._ModuleSupport,Jx=(0,At.optionsDefs)({__type:(0,At.required)((0,At.constant)("date")),value:(0,At.or)(At.string,At.number)},"a serializable date object"),eK=(0,At.or)(At.string,At.number,Jx),m1=(0,At.or)(eK,(0,At.optionsDefs)({value:eK,groupPercentage:(0,At.numberRange)(-1,1)})),iK={...omt,label:At.string},hc={...rmt,label:At.string},Re={x:m1,y:At.number},hmt=(0,At.typeUnion)({line:{...tK,start:Re,end:Re,text:hc},"horizontal-line":{...QU,value:m1,text:hc},"vertical-line":{...QU,value:m1,text:hc},"disjoint-channel":{...lmt,startHeight:At.positiveNumber,endHeight:At.positiveNumber,start:Re,end:Re,text:iK},"parallel-channel":{...cmt,height:At.positiveNumber,start:Re,end:Re,text:iK},"fibonacci-retracement":{...JU,start:Re,end:Re,text:hc,reverse:At.boolean},"fibonacci-retracement-trend-based":{...JU,start:Re,end:Re,endRetracement:Re,text:hc,reverse:At.boolean},callout:{...imt,start:Re,end:Re,text:At.string},comment:{...nmt,...Re,text:At.string},note:{...smt,...Re,text:At.string},text:{...amt,...Re,text:At.string},arrow:{...tK,text:hc,start:Re,end:Re},"arrow-up":{...qU,...Re},"arrow-down":{...qU,...Re},"date-range":{...f1,extendAbove:At.boolean,extendBelow:At.boolean,text:hc,start:Re,end:Re},"price-range":{...f1,extendLeft:At.boolean,extendRight:At.boolean,text:hc,start:Re,end:Re},"date-price-range":{...f1,text:hc,start:Re,end:Re}},"an annotation initial state object"),umt={chartType:(0,At.union)("candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"),annotations:(0,At.arrayOfDefs)(hmt),legend:(0,At.arrayOfDefs)({visible:At.boolean,seriesId:At.string,itemId:At.string,legendItemName:At.string},"legend state array"),zoom:{rangeX:{start:(0,At.or)(At.number,Jx),end:(0,At.or)(At.number,Jx)},rangeY:{start:(0,At.or)(At.number,Jx),end:(0,At.or)(At.number,Jx)},ratioX:{start:(0,At.and)(At.ratio,(0,At.lessThan)("end")),end:(0,At.and)(At.ratio,(0,At.greaterThan)("start"))},ratioY:{start:(0,At.and)(At.ratio,(0,At.lessThan)("end")),end:(0,At.and)(At.ratio,(0,At.greaterThan)("start"))},autoScaledAxes:(0,At.arrayOf)((0,At.constant)("y"))}},{annotationOptionsDef:dmt}=tmt._ModuleSupport,pmt={type:"plugin",name:"annotations",chartType:"cartesian",options:dmt,create(){return null}},gmt={type:"plugin",name:"navigator",chartType:"cartesian",options:Npt,create(){return null}},fmt={type:"plugin",name:"initialState",options:umt,create(){return null}},y1=(_(),w(P)),mmt=(_(),w(P)),ymt=(R(),w(st)),sK=(_(),w(P)),xmt=(R(),w(st));function aK(t,e,i){i||(e=bmt(e));const s=new Map;for(const n of t)s.set(n.id,{datum:n,linksBefore:[],linksAfter:[],maxPathLengthBefore:-1,maxPathLengthAfter:-1});let a=0;return s.forEach((n,o)=>{a=Math.max(a,x1(s,e,n,o,-1,[])+x1(s,e,n,o,1,[])+1)}),{links:e,nodeGraph:s,maxPathLength:a}}function nK(t,e,i,s){const a=s.indexOf(e);if(a!==-1){for(let o=a;o<s.length;o+=1)i.add(s[o]);return}s.push(e);const{toNode:n}=e;for(const o of t)o.fromNode===n&&nK(t,o,i,s);s.pop()}function bmt(t){const e=new Set;for(const i of t)nK(t,i,e,[]);return e.size!==0&&xmt.Logger.warnOnce("Some links formed circular references. These will be removed from the output."),e.size===0?t:t.filter(i=>!e.has(i))}function x1(t,e,i,s,a,n){if(n.includes(s))return 1/0;let o=a===-1?i.maxPathLengthBefore:i.maxPathLengthAfter;if(o===-1){o=0;const r=a===-1?i.linksBefore:i.linksAfter;for(const l of e){const{fromNode:c,toNode:h}=l,u=a===-1?h.id:c.id,d=a===-1?c.id:h.id,p=s===u?t.get(d):void 0;p!=null&&(r.push({node:p,link:l}),n?.push(s),o=Math.max(o,x1(t,e,p,d,a,n)+1),n?.pop())}a===-1?i.maxPathLengthBefore=o:i.maxPathLengthAfter=o}return o}var{Series:vmt,DataController:Smt,keyProperty:Mmt,valueProperty:JD,Selection:op,Group:Lf,TransformableText:Dmt}=sK._ModuleSupport,kmt=class extends sK._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s);const{datumIndex:a}=i,n=s.contextNodeData?.nodeData.find(o=>o.datumIndex.type===a.type&&o.datumIndex.index===a.index);this.size=n?.size,this.label=n?.type===1?n?.label:void 0}},oK=class extends vmt{constructor(){super(...arguments),this.NodeEvent=kmt,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 Lf({name:"linkGroup"})),this.nodeGroup=this.contentGroup.appendChild(new Lf({name:"nodeGroup"})),this.focusLinkGroup=this.highlightNode.appendChild(new Lf({name:"linkGroup"})),this.focusNodeGroup=this.highlightNode.appendChild(new Lf({name:"nodeGroup"})),this.highlightLinkGroup=this.highlightNode.appendChild(new Lf({name:"linkGroup"})),this.highlightNodeGroup=this.highlightNode.appendChild(new Lf({name:"nodeGroup"})),this.labelSelection=op.select(this.labelGroup,Dmt),this.linkSelection=op.select(this.linkGroup,()=>this.linkFactory()),this.nodeSelection=op.select(this.nodeGroup,()=>this.nodeFactory()),this.focusLinkSelection=op.select(this.focusLinkGroup,()=>this.linkFactory()),this.focusNodeSelection=op.select(this.focusNodeGroup,()=>this.nodeFactory()),this.highlightLinkSelection=op.select(this.highlightLinkGroup,()=>this.linkFactory()),this.highlightNodeSelection=op.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)return;const{fromKey:s,toKey:a,sizeKey:n,idKey:o,labelKey:r}=this.properties,l=new Smt("standalone",t.suppressFieldDotNotation),c=i!=null?l.request(this.id,i,{props:[Mmt(o,void 0,{id:"idValue",includeProperty:!1}),...r!=null?[JD(r,void 0,{id:"labelValue",includeProperty:!1})]:[]],groupByKeys:!0}):null,h=t.request(this.id,e,{props:[JD(s,void 0,{id:"fromValue",includeProperty:!1}),JD(a,void 0,{id:"toValue",includeProperty:!1}),...n!=null?[JD(n,void 0,{id:"sizeValue",includeProperty:!1,missingValue:0})]:[]],groupByKeys:!1});i!=null&&l.execute();const[u,d]=await Promise.all([c,h]);this.nodesDataModel=u?.dataModel,this.nodesProcessedData=u?.processedData,this.linksDataModel=d?.dataModel,this.linksProcessedData=d?.processedData;const p=new Map;if(u==null){const g=d.dataModel.resolveColumnById(this,"fromValue",d.processedData),f=d.dataModel.resolveColumnById(this,"toValue",d.processedData),x=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}};d.processedData.dataSources.get(this.id)?.forEach((m,b)=>{const v=g[b],M=f[b];v==null||M==null||(p.has(v)||p.set(v,x(v)),p.has(M)||p.set(M,x(M)))})}else{const g=u.dataModel.resolveColumnById(this,"idValue",u.processedData),f=r!=null?u.dataModel.resolveColumnById(this,"labelValue",u.processedData):void 0;u.processedData.dataSources.get(this.id)?.forEach((x,m)=>{const b=g[m],v=f?.[m];p.set(b,{series:this,itemId:void 0,datum:x,datumIndex:{type:1,index:m},type:1,index:m,linksBefore:[],linksAfter:[],id:b,size:0,label:v})})}this.processedNodes=p}getNodeGraph(t,e,{includeCircularReferences:i}){const{linksDataModel:s,linksProcessedData:a}=this;if(s==null||a==null){const{links:g,nodeGraph:f,maxPathLength:x}=aK(new Map().values(),[],i);return this.nodeCount=0,this.linkCount=0,{nodeGraph:f,links:g,maxPathLength:x}}const{sizeKey:n}=this.properties,o=s.resolveColumnById(this,"fromValue",a),r=s.resolveColumnById(this,"toValue",a),l=n!=null?s.resolveColumnById(this,"sizeValue",a):void 0,c=new Map;this.processedNodes.forEach(g=>{const f=t(g);c.set(g.id,f)});const h=[];a.dataSources.get(this.id)?.forEach((g,f)=>{const x=o[f],m=r[f],b=l!=null?l[f]:1,v=c.get(x),M=c.get(m);if(b<=0||v==null||M==null)return;const D=e({series:this,itemId:void 0,datum:g,datumIndex:{type:0,index:f},type:0,index:f,fromNode:v,toNode:M,size:b});h.push(D)});const{links:u,nodeGraph:d,maxPathLength:p}=aK(c.values(),h,i);return d.forEach(g=>{g.datum.linksBefore=g.linksBefore.map(f=>f.link),g.datum.linksAfter=g.linksAfter.map(f=>f.link)}),this.nodeCount=d.size,this.linkCount=u.length,{nodeGraph:d,links:u,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 s=this.contextNodeData?.nodeData??[],a=this.contextNodeData?.labelData??[];let n=this.ctx.highlightManager?.getActiveHighlight();if(n?.series===this&&n.type==null){const{itemId:h}=n;n=h!=null?s.find(u=>u.type===1&&u.id===h):void 0}else n?.series!==this&&(n=void 0);this.contentGroup.visible=this.visible,this.contentGroup.opacity=n!=null?this.properties.highlight.unhighlightedItem.opacity??1:1,this.labelSelection=this.updateLabelSelection({labelData:a,labelSelection:this.labelSelection}),this.updateLabelNodes({labelSelection:this.labelSelection}),this.linkSelection=this.updateLinkSelection({nodeData:s.filter(h=>h.type===0),datumSelection:this.linkSelection}),this.updateLinkNodes({datumSelection:this.linkSelection,isHighlight:!1}),this.nodeSelection=this.updateNodeSelection({nodeData:s.filter(h=>h.type===1),datumSelection:this.nodeSelection}),this.updateNodeNodes({datumSelection:this.nodeSelection,isHighlight:!1});let o,r,l,c;n?.type===1?(o=s.filter(h=>h.type===0&&(h.toNode===n||h.fromNode===n)),r=o.map(h=>h.fromNode===n?h.toNode:h.fromNode),r.push(n),l=[],c=[n]):n?.type===0?(o=[n],r=[n.fromNode,n.toNode],l=[n],c=[]):(o=[],r=[],l=[],c=[]),this.focusLinkSelection=this.updateLinkSelection({nodeData:o,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){}dataCount(){return NaN}getSeriesDomain(t){return[]}getSeriesRange(t,e){return[NaN,NaN]}legendItemSymbol(t,e,i={}){const{fills:s,strokes:a}=this.properties,{fill:n=s[e%s.length],fillOpacity:o=1,stroke:r=a[e%a.length],strokeWidth:l=0,strokeOpacity:c=1,lineDash:h=[0],lineDashOffset:u=0}=i;return{marker:{fill:n,fillOpacity:o,stroke:r,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}}}getLegendData(t){if(t!=="category")return[];const{showInLegend:e}=this.properties;return Array.from(this.processedNodes.values(),({id:i,label:s},a)=>({legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:!0,label:{text:s??i},symbol:this.legendItemSymbol(1,a),hideInLegend:!e,isFixed:!0}))}pickNodeClosestDatum({x:t,y:e}){let i=1/0,s;return this.linkSelection.each((a,n)=>{const o=a.containsPoint(t,e)?0:1/0;o<i&&(i=o,s=n)}),this.nodeSelection.each((a,n)=>{const o=a.distanceSquared(t,e);o<i&&(i=o,s=n)}),s!=null?{datum:s,distance:Math.sqrt(i)}:void 0}getDatumAriaText(t,e){if(t.type===0)return this.ctx.localeManager.t("ariaAnnounceFlowProportionLink",{index:t.index+1,count:this.linkCount,from:t.fromNode.id,to:t.toNode.id,size:t.size,sizeName:this.properties.sizeName??this.properties.sizeKey});if(t.type===1)return this.ctx.localeManager.t("ariaAnnounceFlowProportionNode",{index:t.index+1,count:this.nodeCount,description:e})}pickFocus(t){const{datumIndexDelta:e,otherIndexDelta:i}=t,s=this.contextNodeData?.nodeData[t.datumIndex-t.datumIndexDelta];let a=s;if(i!==0||e===0)return;if(s?.type===0){const r=Array.from(this.linkSelection,h=>h.datum),c=r.indexOf(s)+e;if(c>=0&&c<r.length)a=r[c];else if(c>0)a=r[r.length-1];else{const h=Array.from(this.nodeSelection,u=>u.datum);a=h[h.length-1]}}else if(s?.type===1){const r=Array.from(this.nodeSelection,h=>h.datum),c=r.indexOf(s)+e;c>=0&&c<r.length?a=r[c]:c<0?a=r[0]:a=Array.from(this.linkSelection,u=>u.datum)[0]}if(a==null)return;const n=a.type===1?Array.from(this.nodeSelection).find(r=>r.datum===a):Array.from(this.linkSelection).find(r=>r.datum===a);if(n==null)return;const o=this.computeFocusBounds(n.node);if(o!=null)return{datum:n.datum,datumIndex:this.contextNodeData?.nodeData.indexOf(n.datum)??0,otherIndex:0,bounds:o,clipFocusBox:!0}}getCategoryValue(t){}datumIndexForCategoryValue(t){}},Imt=(_(),w(P)),{Path:Amt,SceneChangeDetection:Hh}=Imt._ModuleSupport;function rK({radius:t,startAngle:e,endAngle:i,tension:s}){const a=t*Math.cos(e),n=t*Math.sin(e),o=t*Math.cos(i),r=t*Math.sin(i),l=a*s,c=n*s,h=o*s,u=r*s;return{x:[a,l,h,o],y:[n,c,u,r]}}var uc=class extends Amt{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}tensionedCurveTo(t,e,i,s,a,n,o,r){const{path:l,tension:c}=this,h=1-c;l.cubicCurveTo((i-t)*h+t,(s-e)*h+e,(a-o)*h+o,(n-r)*h+r,o,r)}updatePath(){const{path:t,centerX:e,centerY:i,radius:s}=this;let{startAngle1:a,endAngle1:n,startAngle2:o,endAngle2:r}=this;a>o&&([a,o]=[o,a],[n,r]=[r,n]),t.clear();const l=e+s*Math.cos(a),c=i+s*Math.sin(a);t.moveTo(l,c),this.tensionedCurveTo(l,c,e,i,e,i,e+s*Math.cos(r),i+s*Math.sin(r)),t.arc(e,i,s,r,o,!0),this.tensionedCurveTo(e+s*Math.cos(o),i+s*Math.sin(o),e,i,e,i,e+s*Math.cos(n),i+s*Math.sin(n)),t.arc(e,i,s,n,a,!0),t.closePath()}};y([Hh()],uc.prototype,"centerX",2),y([Hh()],uc.prototype,"centerY",2),y([Hh()],uc.prototype,"radius",2),y([Hh()],uc.prototype,"startAngle1",2),y([Hh()],uc.prototype,"endAngle1",2),y([Hh()],uc.prototype,"startAngle2",2),y([Hh()],uc.prototype,"endAngle2",2),y([Hh()],uc.prototype,"tension",2);var Cmt=(_(),w(P)),{FillGradientDefaults:Lmt,FillPatternDefaults:wmt,FillImageDefaults:Tmt,BaseProperties:lK,makeSeriesTooltip:Nmt,SeriesProperties:Omt,Property:$t,Label:Pmt}=Cmt._ModuleSupport,b1=class extends Pmt{constructor(){super(...arguments),this.spacing=1,this.maxWidth=1}};y([$t],b1.prototype,"spacing",2),y([$t],b1.prototype,"maxWidth",2);var sl=class extends lK{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}};y([$t],sl.prototype,"fill",2),y([$t],sl.prototype,"fillOpacity",2),y([$t],sl.prototype,"stroke",2),y([$t],sl.prototype,"strokeOpacity",2),y([$t],sl.prototype,"strokeWidth",2),y([$t],sl.prototype,"lineDash",2),y([$t],sl.prototype,"lineDashOffset",2),y([$t],sl.prototype,"tension",2),y([$t],sl.prototype,"itemStyler",2);var rr=class extends lK{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}};y([$t],rr.prototype,"spacing",2),y([$t],rr.prototype,"width",2),y([$t],rr.prototype,"fill",2),y([$t],rr.prototype,"fillOpacity",2),y([$t],rr.prototype,"stroke",2),y([$t],rr.prototype,"strokeOpacity",2),y([$t],rr.prototype,"strokeWidth",2),y([$t],rr.prototype,"lineDash",2),y([$t],rr.prototype,"lineDashOffset",2),y([$t],rr.prototype,"itemStyler",2);var ms=class extends Omt{constructor(){super(),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.fillGradientDefaults=new Lmt,this.fillPatternDefaults=new wmt,this.fillImageDefaults=new Tmt,this.fills=[],this.strokes=[],this.label=new b1,this.link=new sl,this.node=new rr,this.tooltip=Nmt(),this.highlightStyle.deprecated=!1}};y([$t],ms.prototype,"fromKey",2),y([$t],ms.prototype,"toKey",2),y([$t],ms.prototype,"idKey",2),y([$t],ms.prototype,"idName",2),y([$t],ms.prototype,"labelKey",2),y([$t],ms.prototype,"labelName",2),y([$t],ms.prototype,"sizeKey",2),y([$t],ms.prototype,"sizeName",2),y([$t],ms.prototype,"nodes",2),y([$t],ms.prototype,"fillGradientDefaults",2),y([$t],ms.prototype,"fillPatternDefaults",2),y([$t],ms.prototype,"fillImageDefaults",2),y([$t],ms.prototype,"fills",2),y([$t],ms.prototype,"strokes",2),y([$t],ms.prototype,"label",2),y([$t],ms.prototype,"link",2),y([$t],ms.prototype,"node",2),y([$t],ms.prototype,"tooltip",2);var{SeriesNodePickMode:cK,CachedTextMeasurerPool:_mt,TextWrapper:Emt,TextUtils:Rmt,createDatumId:tk,angleBetween:ek,normalizeAngle360:Bmt,isBetweenAngles:hK,Sector:zmt,evaluateBezier:ik,applyShapeStyle:uK,getShapeStyle:sk,BBox:Fmt}=mmt._ModuleSupport,ak=t=>t.startAngle+ek(t.startAngle,t.endAngle)/2,nk=class extends oK{constructor(t){super({moduleCtx:t,pickModes:[cK.NEAREST_NODE,cK.EXACT_SHAPE_MATCH]}),this.properties=new ms}isLabelEnabled(){return(this.properties.labelKey!=null||this.nodes==null)&&this.properties.label.enabled}linkFactory(){return new uc}nodeFactory(){return new zmt}createNodeData(){const{id:t,_nodeDataDependencies:{seriesRectWidth:e,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0}}=this,{fromKey:s,toKey:a,sizeKey:n,labelKey:o,label:{spacing:r,maxWidth:l,fontSize:c},node:{width:h,spacing:u}}=this.properties,d=e/2,p=i/2;let g=[];const{nodeGraph:f,links:x}=this.getNodeGraph(B=>({...B,centerX:d,centerY:p,innerRadius:NaN,outerRadius:NaN,startAngle:NaN,endAngle:NaN}),B=>({...B,centerX:d,centerY:p,radius:NaN,startAngle1:NaN,endAngle1:NaN,startAngle2:NaN,endAngle2:NaN}),{includeCircularReferences:!0});let m=0;f.forEach(({datum:B,linksBefore:F,linksAfter:V},G)=>{const H=F.reduce(($,{link:W})=>$+W.size,0)+V.reduce(($,{link:W})=>$+W.size,0);if(H===0)f.delete(G);else{B.size=H,m+=B.size;const $=this.getLabelText(B.label,B.datum,o,"label",[],this.properties.label,{datum:B.datum,value:B.label,fromKey:s,toKey:a,sizeKey:n,size:B.size});B.label=String($)}});let b=0;if(this.isLabelEnabled()){const B=_mt.getMeasurer({font:this.properties.label});let F=0;f.forEach(({datum:V})=>{const{id:G,label:H}=V;if(H==null)return;const $=Emt.wrapText(H,{maxWidth:l,font:this.properties.label,textWrap:"never"}),{width:W}=B.measureText($);F=Math.max(W,F),g.push({id:G,text:$,centerX:d,centerY:p,angle:NaN,radius:NaN})}),b=F+r}const v=f.size;let M=Math.min(e,i)/2-h-b,D=u/M;if(b!==0&&(v*D>=1.5*Math.PI||M<=0)&&(g=[],M=Math.min(e,i)/2-h,D=u/M),v*D>=2*Math.PI||M<=0){ymt.Logger.warnOnce("There was insufficient space to display the Chord Series.");return}const L=M,C=M+h,A=Math.max((2*Math.PI-v*D)/m,0);let T=0;f.forEach(({datum:B})=>{B.innerRadius=L,B.outerRadius=C,B.startAngle=T,B.endAngle=T+B.size*A,T=B.endAngle+D;const F=(B.innerRadius+B.outerRadius)/2,V=ak(B);B.midPoint={x:B.centerX+F*Math.cos(V),y:B.centerY+F*Math.sin(V)}});const N=[];f.forEach(({datum:B,linksBefore:F,linksAfter:V})=>{const G=ak(B),H=[...F.map(W=>({link:W.link,distance:ek(ak(W.node.datum),G),after:!1})),...V.map(W=>({link:W.link,distance:ek(ak(W.node.datum),G),after:!0}))];let $=B.startAngle;H.toSorted((W,j)=>W.distance-j.distance).forEach(({link:W,after:j})=>{const U=W.size*A;j?(W.startAngle1=$,W.endAngle1=$+U):(W.startAngle2=$,W.endAngle2=$+U),$+=W.size*A}),N.push(B)});const{tension:O}=this.properties.link;x.forEach(B=>{B.radius=M;const F=rK({radius:M,startAngle:B.startAngle1,endAngle:B.endAngle2,tension:O}),V=rK({radius:M,startAngle:B.startAngle2,endAngle:B.endAngle1,tension:O}),G=ik(...F.x,.5),H=ik(...F.y,.5),$=ik(...V.x,.5),W=ik(...V.y,.5);B.midPoint={x:B.centerX+(G+$)/2,y:B.centerY+(H+W)/2},N.push(B)}),g.forEach(B=>{const F=f.get(B.id)?.datum;F!=null&&(B.radius=C+r,B.angle=Bmt(F.startAngle+ek(F.startAngle,F.endAngle)/2))}),g.sort((B,F)=>B.angle-F.angle);let E=1/0,z=-1/0;return g=g.filter(B=>{const F=Rmt.getLineHeight(c),V=Math.atan2(F/2,B.radius),G=B.angle-V,H=B.angle+V;return hK(E,G,H)||hK(z,G,H)?!1:(E=Math.min(G,E),z=Math.max(H,z),!0)}),{itemId:t,nodeData:N,labelData:g}}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:a,fontSize:n,fontFamily:o}=this.properties.label;e.each((r,{text:l,centerX:c,centerY:h,radius:u,angle:d})=>{r.visible=!0,r.translationX=c+u*Math.cos(d),r.translationY=h+u*Math.sin(d),r.text=l,r.fill=i,r.fontStyle=s,r.fontWeight=a,r.fontSize=n,r.fontFamily=o,r.textBaseline="middle",Math.cos(d)>=0?(r.textAlign="left",r.rotation=d):(r.textAlign="right",r.rotation=d-Math.PI)})}updateNodeSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>tk([e.type,e.id]))}getBaseNodeStyle(t,e){const{properties:i}=this,{fill:s,fillOpacity:a,stroke:n,strokeOpacity:o,lineDash:r,lineDashOffset:l}=i.node,c=this.getHighlightStyle(t,e?.datumIndex);return sk({fill:c?.fill??s,fillOpacity:c?.fillOpacity??a,stroke:c?.stroke??n,strokeOpacity:c?.strokeOpacity??o,strokeWidth:c?.strokeWidth??this.getStrokeWidth(i.node.strokeWidth),lineDash:c?.lineDash??r,lineDashOffset:c?.lineDashOffset??l},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getNodeStyleOverrides(t,e,i,s,a,n,o){const{id:r,properties:l}=this,{fills:c,strokes:h}=l,{itemStyler:u}=l.node,d=n.fill??c[i%c.length],p=n.stroke??h[i%h.length];let g;if(o||(g??(g={}),g.fill=d,g.stroke=p),u!=null){const f=this.cachedDatumCallback(tk(t,"node",o?"highlight":"node"),()=>{const{fillOpacity:x=1,strokeOpacity:m=1,strokeWidth:b=0,lineDash:v=[],lineDashOffset:M=0}=n;return this.callWithContext(u,{seriesId:r,datum:e,highlighted:o,label:a,size:s,fill:d,fillOpacity:x,stroke:p,strokeOpacity:m,strokeWidth:b,lineDash:v,lineDashOffset:M})});g??(g={}),Object.assign(g,f)}return sk(g,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateNodeNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getShapeFillBBox();e.each((a,n)=>{const{datumIndex:o,size:r,label:l}=n,c=this.getBaseNodeStyle(i,n),h=this.getNodeStyleOverrides(String(o.index),n.datum,o.index,r,l,c,i);uK(a,c,h,s),a.centerX=n.centerX,a.centerY=n.centerY,a.innerRadius=n.innerRadius,a.outerRadius=n.outerRadius,a.startAngle=n.startAngle,a.endAngle=n.endAngle,a.inset=a.strokeWidth/2})}updateLinkSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>tk([e.type,e.index,e.fromNode.id,e.toNode.id]))}getBaseLinkStyle(t,e){const{properties:i}=this,{fill:s,fillOpacity:a,stroke:n,strokeOpacity:o,lineDash:r,lineDashOffset:l,tension:c}=i.link,h=this.getHighlightStyle(t,e?.datumIndex);return sk({fill:h?.fill??s,fillOpacity:h?.fillOpacity??a,stroke:h?.stroke??n,strokeOpacity:h?.strokeOpacity??o,strokeWidth:h?.strokeWidth??this.getStrokeWidth(i.link.strokeWidth),lineDash:h?.lineDash??r,lineDashOffset:h?.lineDashOffset??l,tension:c},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getLinkStyleOverrides(t,e,i,s,a){const{id:n,properties:o}=this,{fills:r,strokes:l}=o,{itemStyler:c}=o.link,h=s.fill??r[i%r.length],u=s.stroke??l[i%l.length];let d;if(a||(d??(d={}),d.fill=h,d.stroke=u),c!=null){const p=this.cachedDatumCallback(tk(t,"link",a?"highlight":"node"),()=>{const{fillOpacity:g=1,strokeOpacity:f=1,strokeWidth:x=0,lineDash:m=[],lineDashOffset:b=0,tension:v}=s;return this.callWithContext(c,{seriesId:n,datum:e,highlighted:a,tension:v,fill:h,fillOpacity:g,stroke:u,strokeOpacity:f,strokeWidth:x,lineDash:m,lineDashOffset:b})});d??(d={}),Object.assign(d,p)}return sk(d,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateLinkNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getShapeFillBBox();e.each((a,n)=>{const{datumIndex:o}=n,r=n.fromNode.datumIndex,l=this.getBaseLinkStyle(i,n),c=this.getLinkStyleOverrides(String(o.index),n.datum,r.index,l,i);a.centerX=n.centerX,a.centerY=n.centerY,a.radius=n.radius,a.startAngle1=n.startAngle1,a.endAngle1=n.endAngle1,a.startAngle2=n.startAngle2,a.endAngle2=n.endAngle2,uK(a,l,c,s),a.tension=c?.tension??l.tension})}getShapeFillBBox(){const t=this._nodeDataDependencies?.seriesRectWidth??0,e=this._nodeDataDependencies?.seriesRectHeight??0,i=Math.min(t,e),s=(t-i)/2,a=(e-i)/2,n=new Fmt(s,a,t,e);return{series:n,axis:n}}getTooltipContent(t){const{id:e,linksProcessedData:i,nodesProcessedData:s,properties:a,ctx:{formatManager:n}}=this,{fromKey:o,toKey:r,sizeKey:l,sizeName:c,tooltip:h}=a,u=this.contextNodeData?.nodeData.find(b=>b.datumIndex.type===t.type&&b.datumIndex.index===t.index);if(u==null)return;const d=u.type===0?u.fromNode.index:u.index,p=u.type===0?`${u.fromNode.label} - ${u.toNode.label}`:u.label,g=t.type===0?i?.dataSources.get(this.id)?.[t.index]:s?.dataSources.get(this.id)?.[t.index],f=u.size;let x;if(u.type===0){const b=u.fromNode.datumIndex,v=this.getBaseLinkStyle(!1);Object.assign(v,this.getLinkStyleOverrides(String(t.index),g,b.index,v,!1)),x=v}else{const b=u.label,v=this.getBaseNodeStyle(!1);Object.assign(v,this.getNodeStyleOverrides(String(t.index),g,t.index,f,b,v,!1)),x=v}const m=[];if(l!=null){const b=n.format(this.callWithContext.bind(this),{type:"number",value:f,datum:g,seriesId:e,legendItemName:void 0,key:l,source:"tooltip",property:"size",domain:[],boundSeries:this.getFormatterContext("size"),fractionDigits:void 0});m.push({label:c,fallbackLabel:l,value:b??String(f)})}return this.formatTooltipWithContext(h,{title:p,symbol:this.legendItemSymbol(u.type,d,x),data:m},{seriesId:e,datum:g,title:p,fromKey:o,toKey:r,sizeKey:l,sizeName:c,size:f,...x})}computeFocusBounds(t){return t}};nk.className="ChordSeries",nk.type="chord";var Vmt=(_(),w(P)),Xa=(R(),w(st)),{commonSeriesOptionsDefs:Gmt,chordSeriesThemeableOptionsDef:jmt}=Vmt._ModuleSupport,ok={...jmt,...Gmt,type:(0,Xa.required)((0,Xa.constant)("chord")),fromKey:(0,Xa.required)(Xa.string),toKey:(0,Xa.required)(Xa.string),sizeKey:Xa.string,sizeName:Xa.string};ok.fillGradientDefaults=(0,Xa.undocumented)(Xa.fillGradientDefaults),ok.fillPatternDefaults=(0,Xa.undocumented)(Xa.fillPatternDefaults),ok.fillImageDefaults=(0,Xa.undocumented)(Xa.fillImageDefaults);var Wmt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["flow-proportion"],solo:!0,identifier:"chord",moduleFactory:t=>new nk(t),themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:y1._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:y1._ModuleSupport.FILL_IMAGE_DEFAULTS,highlightStyle:{series:{dimOpacity:.2}},highlight:y1._ModuleSupport.singleSeriesHighlightStyle(),label:{fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:5,maxWidth:100},node:{spacing:8,width:10,strokeWidth:{$isUserOption:["./stroke",2,0]}},link:{fillOpacity:.5,strokeWidth:{$isUserOption:["./stroke",2,0]},tension:.4}},legend:{enabled:!1,toggleSeries:!1}}},Hmt={type:"series",name:"chord",chartType:"flow-proportion",enterprise:!0,options:ok,create:t=>new nk(t)},UIt=(_(),w(P)),rk=(_(),w(P)),{ThemeConstants:{CARTESIAN_AXIS_TYPE:wf,CARTESIAN_POSITION:Tf},ThemeSymbols:{DEFAULT_SHADOW_COLOUR:$mt}}=rk._ModuleSupport,Nf={$eq:[{$path:["/series/0/direction",void 0]},"horizontal"]},dK={autoRotate:{$path:"/series/0/stageLabel/autoRotate"},autoRotateAngle:{$path:"/series/0/stageLabel/autoRotateAngle"},avoidCollisions:{$path:["/series/0/stageLabel/avoidCollisions",!0]},color:{$path:["/series/0/stageLabel/color",{$ref:"textColor"}]},enabled:{$if:[{$eq:[{$path:"/series/0/stageLabel/enabled"},void 0]},!0,{$path:"/series/0/stageLabel/enabled"}]},fontSize:{$path:["/series/0/stageLabel/fontSize",{$ref:"fontSize"}]},fontStyle:{$path:["/series/0/stageLabel/fontStyle",{$ref:"fontStyle"}]},fontWeight:{$path:["/series/0/stageLabel/fontWeight",{$ref:"fontWeight"}]},format:{$path:"/series/0/stageLabel/format"},formatter:{$path:"/series/0/stageLabel/formatter"},itemStyler:{$path:"/series/0/stageLabel/itemStyler"},minSpacing:{$path:"/series/0/stageLabel/minSpacing"},rotation:{$path:["/series/0/stageLabel/rotation",0]}},pK=[{type:{$if:[Nf,wf.NUMBER,wf.CATEGORY]},position:{$if:[Nf,Tf.LEFT,{$if:[{$eq:[{$path:["/series/0/stageLabel/placement",void 0]},"after"]},Tf.RIGHT,Tf.LEFT]}]},label:{$if:[Nf,void 0,dK]}},{type:{$if:[Nf,wf.CATEGORY,wf.NUMBER]},position:{$if:[Nf,{$if:[{$eq:[{$path:["/series/0/stageLabel/placement",void 0]},"before"]},Tf.TOP,Tf.BOTTOM]},Tf.BOTTOM]},label:{$if:[Nf,dK,void 0]}}],Umt={series:{direction:"vertical",strokeWidth:{$isUserOption:["./strokes/0",2,0]},spacingRatio:.25,fills:[{$palette:"fill"}],strokes:[{$palette:"stroke"}],fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:rk._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:rk._ModuleSupport.FILL_IMAGE_DEFAULTS,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"}},dropOff:{enabled:!0,fillOpacity:.2,strokeWidth:{$isUserOption:["./stroke",2,0]}},shadow:{enabled:!1,color:$mt,xOffset:3,yOffset:3,blur:5},highlight:rk._ModuleSupport.singleSeriesHighlightStyle()},axes:{[wf.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1}},[wf.CATEGORY]:{line:{enabled:!1}}}},Kmt=(_(),w(P)),v1=(_(),w(P)),Ymt=(_(),w(P)),{lineDistanceSquared:lk,BBox:Zmt,Path:Xmt,SceneChangeDetection:$h}=Ymt._ModuleSupport,gK=1e-6;function fK([t,e],[i,s]){return Math.abs(t-i)<=gK&&Math.abs(e-s)<=gK}var al=class extends Xmt{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:s,x2:a,y2:n,x3:o,y3:r}=this;return{x:(t+i+a+o)/4,y:(e+s+n+r)/4}}distanceSquared(t,e){if(this.containsPoint(t,e))return 0;const{x0:i,y0:s,x1:a,y1:n,x2:o,y2:r,x3:l,y3:c}=this;return Math.min(lk(t,e,i,s,a,n,1/0),lk(t,e,a,n,o,r,1/0),lk(t,e,o,r,l,c,1/0),lk(t,e,l,c,i,s,1/0))}computeBBox(){const{x0:t,y0:e,x1:i,y1:s,x2:a,y2:n,x3:o,y3:r}=this,l=Math.min(t,i,a,o),c=Math.max(t,i,a,o)-l,h=Math.min(e,s,n,r),u=Math.max(e,s,n,r)-h;return new Zmt(l,h,c,u)}updatePath(){const{path:t,x0:e,y0:i,x1:s,y1:a,x2:n,y2:o,x3:r,y3:l}=this,c=[[e,i],[s,a],[n,o],[r,l]];t.clear();let h,u;c.forEach(d=>{if(h!=null&&fK(h,d)||u!=null&&fK(u,d))return;const[p,g]=d;h==null?t.moveTo(p,g):t.lineTo(p,g),h??(h=d),u=d}),t.closePath()}};y([$h()],al.prototype,"x0",2),y([$h()],al.prototype,"y0",2),y([$h()],al.prototype,"x1",2),y([$h()],al.prototype,"y1",2),y([$h()],al.prototype,"x2",2),y([$h()],al.prototype,"y2",2),y([$h()],al.prototype,"x3",2),y([$h()],al.prototype,"y3",2);var qmt=(_(),w(P)),{NODE_UPDATE_STATE_TO_PHASE_MAPPING:Qmt}=qmt._ModuleSupport;function mK(t,e,i,s){const{x0:a,y0:n,x1:o,y1:r,x2:l,y2:c,x3:h,y3:u,opacity:d}=t;return i?{x0:(a+h)/2,y0:(n+u)/2,x1:(o+l)/2,y1:(r+c)/2,x2:(o+l)/2,y2:(r+c)/2,x3:(a+h)/2,y3:(n+u)/2,opacity:d}:{x0:(a+o)/2,y0:(n+r)/2,x1:(a+o)/2,y1:(n+r)/2,x2:(l+h)/2,y2:(c+u)/2,x3:(l+h)/2,y3:(c+u)/2,opacity:d}}function Jmt(t,e){const i=n=>n==null;return{fromFn:(n,o,r)=>{r==="updated"&&i(o)?r="removed":r==="updated"&&i(n.previousDatum)&&(r="added");let l;r==="added"&&n.previousDatum==null&&e==="fade"?l={...tb(n,o),opacity:0}:r==="unknown"||r==="added"?l=mK(o,n.previousDatum,t,e):l={x0:n.x0,y0:n.y0,x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,x3:n.x3,y3:n.y3,opacity:n.opacity};const c=Qmt[r];return{...l,phase:c}},toFn:(n,o,r)=>{let l;return r==="removed"&&n.datum==null&&e==="fade"?l={...tb(n,o),opacity:0}:r==="removed"||i(o)?l=mK(o,n.previousDatum,t,e):l=tb(n,o),l}}}function tb(t,e){const{x0:i,y0:s,x1:a,y1:n,x2:o,y2:r,x3:l,y3:c,opacity:h}=e;return{x0:i,y0:s,x1:a,y1:n,x2:o,y2:r,x3:l,y3:c,opacity:h}}var{SeriesNodePickMode:yK,SeriesZIndexMap:xK,valueProperty:tyt,keyProperty:eyt,ChartAxisDirection:iyt,updateLabelNode:syt,SMALLEST_KEY_INTERVAL:ayt,LARGEST_KEY_INTERVAL:nyt,diff:oyt,fixNumericExtent:ryt,seriesLabelFadeInAnimation:bK,resetMotion:lyt,resetLabelFn:cyt,animationValidation:hyt,computeBarFocusBounds:uyt,ContinuousScale:dyt,Group:pyt,Selection:gyt,PointerEvents:vK,motion:fyt,checkCrisp:myt,createDatumId:yyt,applyShapeStyle:xyt,getShapeStyle:byt,getShapeFill:vyt}=v1._ModuleSupport,Syt=class extends v1._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.stageKey,this.yKey=s.properties.valueKey}},SK=class extends v1._ModuleSupport.AbstractBarSeries{constructor({moduleCtx:t,animationResetFns:e}){super({moduleCtx:t,pickModes:[yK.AXIS_ALIGNED,yK.EXACT_SHAPE_MATCH],hasHighlightedLabels:!0,propertyKeys:{x:["stageKey"],y:["valueKey"]},propertyNames:{x:[],y:[]},categoryKey:"xValue",datumSelectionGarbageCollection:!1,animationResetFns:{datum:e.datum,label:cyt}}),this.NodeEvent=Syt,this.connectorNodeGroup=this.contentGroup.appendChild(new pyt({name:`${this.id}-series-connectorNodes`,zIndex:xK.BACKGROUND})),this.connectorSelection=gyt.select(this.connectorNodeGroup,()=>this.connectionFactory()),this.connectorNodeGroup.pointerEvents=vK.None}get pickModeAxis(){return"main-category"}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.connectorNodeGroup.zIndex=[xK.BACKGROUND,t],!0):!1}isVertical(){return!super.isVertical()}connectionFactory(){return new al}async processData(t){const{stageKey:e,valueKey:i}=this.properties,{visible:s,id:a}=this,n=(g,f,x)=>s&&this.ctx.legendManager.getItemEnabled({seriesId:a,itemId:x}),o=this.getCategoryAxis()?.scale,r=this.getValueAxis()?.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:o,yScale:r}),u=[];this.ctx.animationManager.isSkipped()||(this.processedData&&u.push(oyt(this.id,this.processedData)),u.push(hyt()));const d=this.visible?{}:{forceValue:0},{processedData:p}=await this.requestDataModel(t,this.data,{props:[eyt(e,c,{id:"xValue"}),tyt(i,h,{id:"yValue",...d,validation:n,invalidValue:0}),...l?[ayt,nyt]:[],...u],groupByKeys:!1});this.smallestDataInterval=p.reduced?.smallestKeyInterval,this.largestDataInterval=p.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i,id:s,ctx:{legendManager:a}}=this;if(!e||!i)return[];const{keys:[n]}=e.domain;if(t===this.getCategoryDirection()){const o=i.resolveProcessedDataDefById(this,"xValue");return o?.def.type==="key"&&o?.def.valueType==="category"?this.hasData?n.filter((r,l)=>a.getItemEnabled({seriesId:s,itemId:l})):[]:this.padBandExtent(n)}else{const o=this.domainForClippedRange(t,["yValue"],"xValue"),r=Math.max(...o),l=[-r,r];return ryt(l)}}getSeriesRange(t,e){return[NaN,NaN]}createNodeData(){const{hasData:t,data:e,dataModel:i,groupScale:s,processedData:a,id:n,ctx:{legendManager:o}}=this,r=this.getCategoryAxis(),l=this.getValueAxis();if(!(t&&e&&r&&l&&i&&a?.type==="ungrouped"))return;const c=r.scale,h=l.scale,u=this.getBarDirection()===iyt.X,{stageKey:d,valueKey:p}=this.properties,{strokeWidth:g}=this.barStyle(),f=`${p}`,x={itemId:f,nodeData:[],labelData:[],connectorData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.groupScale),visible:this.visible},m=this.visible;if(!m)return x;const b=i.resolveKeysById(this,"xValue",a),v=i.resolveColumnById(this,"yValue",a),{barWidth:M,groupIndex:D}=this.updateGroupScale(r),L=dyt.is(c)?M*-.5:0,C=myt(r?.scale,r?.visibleRange,this.smallestDataInterval,this.largestDataInterval);let A;return(a.dataSources.get(this.id)??[]).forEach((N,O)=>{const E=m&&o.getItemEnabled({seriesId:n,itemId:O}),z=b[O];if(z==null)return;const B=Math.round(c.convert(z))+s.convert(String(D))+L,F=v[O],V=Math.round(h.convert(-F)),G=Math.round(h.convert(F)),H=Math.max(g,Math.abs(G-V)),$={x:u?Math.min(G,V):B,y:u?B:Math.min(G,V),width:u?H:M,height:u?M:H},W={x:$.x+$.width/2,y:$.y+$.height/2},j=this.createLabelData({datumIndex:O,rect:$,barAlongX:u,yDatum:F,datum:N,visible:E}),U={index:O,series:this,itemId:f,datum:N,datumIndex:O,xValue:z,yValue:F,xKey:d,yKey:p,x:$.x,y:$.y,width:$.width,height:$.height,midPoint:W,strokeWidth:g,crisp:C,label:j,visible:E};if(x.nodeData.push(U),j!=null&&x.labelData.push(j),A!=null){const Z=A.rect,X=A.nodeDatum,q=A.datumIndex;u?x.connectorData.push({datum:X,datumIndex:q,x0:Z.x,y0:Z.y+Z.height,x1:Z.x+Z.width,y1:Z.y+Z.height,x2:$.x+$.width,y2:$.y,x3:$.x,y3:$.y,opacity:1}):x.connectorData.push({datum:X,datumIndex:q,x0:Z.x+Z.width,y0:Z.y,x1:$.x,y1:$.y,x2:$.x,y2:$.y+$.height,x3:Z.x+Z.width,y3:Z.y+Z.height,opacity:1})}E&&(A={itemId:f,rect:$,nodeDatum:U,datumIndex:O})}),x}updateNodes(t,e,i,s){super.updateNodes(t,e,i,s);const{connectorSelection:a}=this,n=this.contextNodeData?.connectorData??[];this.connectorSelection=this.updateConnectorSelection({connectorSelection:a,connectorData:n}),this.updateConnectorNodes({connectorSelection:a})}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,s=e??[];return i.update(s,void 0,a=>this.getDatumId(a))}updateConnectorSelection(t){const{connectorData:e,connectorSelection:i}=t;return i.update(this.connectorEnabled()?e:[],void 0,s=>this.getDatumId(s.datum))}updateConnectorNodes(t){const{fills:e,strokes:i,fillGradientDefaults:s,fillPatternDefaults:a,fillImageDefaults:n}=this.properties,{fill:o,fillOpacity:r,stroke:l,strokeOpacity:c,strokeWidth:h,lineDash:u,lineDashOffset:d}=this.connectorStyle(),p=this.getShapeFillBBox();t.connectorSelection.each((g,f)=>{const{datumIndex:x}=f;g.setProperties(tb(g,f));const m=vyt(o??e[x%e.length],s,a,n);xyt(g,{fill:m,stroke:l??i[x%i.length],fillOpacity:r,strokeOpacity:c,strokeWidth:h,lineDash:u,lineDashOffset:d},void 0,p)})}getHighlightLabelData(t,e){const i=t.filter(s=>s.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=vK.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{e.fillOpacity=this.getHighlightStyle(!1,i.datumIndex).opacity??1,syt(e,this.properties.label,i)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a}=this,{stageKey:n,valueKey:o,tooltip:r,legendItemName:l}=a,c=this.getCategoryAxis(),h=this.getValueAxis();if(!i||!s||!c||!h)return;const u=s.dataSources.get(this.id)?.[t],d=i.resolveKeysById(this,"xValue",s)[t],p=i.resolveColumnById(this,"yValue",s)[t];if(d!=null)return this.formatTooltipWithContext(r,{symbol:this.legendItemSymbol(t),data:[{label:c.formatDatum(d,"tooltip",e,l,u,n),value:h.formatDatum(p,"tooltip",e,l,u,o)}]},{seriesId:e,datum:u,title:n,stageKey:n,valueKey:o,...this.tooltipStyle(u,t)})}resetAllAnimation(t){super.resetAllAnimation(t),lyt([this.connectorSelection],tb)}animateEmptyUpdateReady({labelSelection:t}){const{connectorSelection:e}=this,i=this.isVertical(),a=Jmt(i,"normal");fyt.fromToMotion(this.id,"connectors",this.ctx.animationManager,[e],a),bK(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(t){const{labelSelection:e}=t;this.ctx.animationManager.stopByAnimationGroupId(this.id),bK(this,"labels",this.ctx.animationManager,e)}getDatumId(t){return yyt(t.xValue)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){return uyt(this,this.contextNodeData?.nodeData[t])}legendItemSymbol(t){const{strokeWidth:e,fillOpacity:i,strokeOpacity:s,lineDash:a,lineDashOffset:n,fillGradientDefaults:o,fillPatternDefaults:r,fillImageDefaults:l}=this.barStyle(),{fills:c,strokes:h}=this.properties,u=c[t%c.length]??"black",d=h[t%h.length]??"black";return{marker:byt({fill:u,fillOpacity:i,stroke:d,strokeWidth:e,strokeOpacity:s,lineDash:a,lineDashOffset:n},o,r,l)}}getLegendData(t){const{id:e,processedData:i,dataModel:s,ctx:{legendManager:a},visible:n}=this;if(!s||!i||t!=="category")return[];const{showInLegend:o}=this.properties,r=s.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:n&&a.getItemEnabled({seriesId:e,itemId:c}),label:{text:String(h)},symbol:this.legendItemSymbol(c),skipAnimations:!0,hideInLegend:!o}}).filter(l=>l!=null)}},Myt=(_(),w(P)),{FillGradientDefaults:Dyt,FillPatternDefaults:kyt,FillImageDefaults:Iyt,Label:Ayt,AbstractBarSeriesProperties:Cyt,makeSeriesTooltip:Lyt,AxisLabel:wyt,Property:Os}=Myt._ModuleSupport,S1=class extends Ayt{constructor(){super(...arguments),this.spacing=0}};y([Os],S1.prototype,"placement",2),y([Os],S1.prototype,"spacing",2);var MK=class extends wyt{};y([Os],MK.prototype,"placement",2);var la=class extends Cyt{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new Dyt,this.fillPatternDefaults=new kyt,this.fillImageDefaults=new Iyt,this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new S1,this.stageLabel=new MK,this.tooltip=Lyt()}};y([Os],la.prototype,"stageKey",2),y([Os],la.prototype,"valueKey",2),y([Os],la.prototype,"fills",2),y([Os],la.prototype,"fillGradientDefaults",2),y([Os],la.prototype,"fillPatternDefaults",2),y([Os],la.prototype,"fillImageDefaults",2),y([Os],la.prototype,"fillOpacity",2),y([Os],la.prototype,"strokes",2),y([Os],la.prototype,"strokeWidth",2),y([Os],la.prototype,"strokeOpacity",2),y([Os],la.prototype,"lineDash",2),y([Os],la.prototype,"lineDashOffset",2),y([Os],la.prototype,"label",2),y([Os],la.prototype,"stageLabel",2),y([Os],la.prototype,"tooltip",2);function DK(t,{x:e,y:i,width:s,height:a,opacity:n}){return{x1:e,y1:i,x2:e+s,y2:i+a,opacity:n??1}}var{Line:Tyt,ChartAxisDirection:Nyt}=Kmt._ModuleSupport,ck=class extends SK{constructor(t){super({moduleCtx:t,animationResetFns:{datum:DK}}),this.properties=new la}get hasData(){const{id:t,ctx:{legendManager:e}}=this,i=this.data?.reduce((s,a,n)=>s+(e.getItemEnabled({seriesId:t,itemId:n})?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,fillGradientDefaults:this.properties.fillGradientDefaults,fillPatternDefaults:this.properties.fillPatternDefaults,fillImageDefaults:this.properties.fillImageDefaults}}connectorStyle(){const{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:s,lineDashOffset:a,fillGradientDefaults:n,fillPatternDefaults:o,fillImageDefaults:r}=this.properties;return{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:s,lineDashOffset:a,fillGradientDefaults:n,fillPatternDefaults:o,fillImageDefaults:r}}nodeFactory(){return new Tyt}createLabelData({datumIndex:t,rect:e,barAlongX:i,yDatum:s,datum:a,visible:n}){const{stageKey:o,valueKey:r,label:l}=this.properties,{spacing:c,placement:h}=l;let u,d,p,g;if(i)switch(u=e.x+e.width/2,p="center",h){case"before":d=e.y-c,g="bottom";break;case"after":d=e.y+e.height+c,g="top";break;default:d=e.y+e.height/2,g="middle"}else switch(d=e.y+e.height/2,g="middle",h){case"before":u=e.x-c,p="right";break;case"after":u=e.x+e.width+c,p="left";break;default:u=e.x+e.width/2,p="center"}const f=this.getSeriesDomain(Nyt.Y),x=this.getLabelText(s,a,r,"y",f,l,{itemId:r,value:s,datum:a,stageKey:o,valueKey:r});return{x:u,y:d,textAlign:p,textBaseline:g,text:x,itemId:r,datum:a,datumIndex:t,series:this,visible:n}}updateDatumNodes(t){const e=this.getHighlightStyle(t.isHighlight);t.datumSelection.each((i,s)=>{i.setProperties(DK(i,s)),i.stroke=e?.stroke,i.strokeWidth=e?.strokeWidth??0,i.strokeOpacity=e?.strokeOpacity??1,i.lineDash=e?.lineDash,i.lineDashOffset=e?.lineDashOffset??0,i.opacity=e?.opacity??1})}tooltipStyle(t,e){const{fills:i,strokes:s}=this.properties,a=i[e%i.length]??"black",n=s[e%s.length]??"black",{fillOpacity:o,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}=this.barStyle();return{fill:a,fillOpacity:o,stroke:n,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}}};ck.className="ConeFunnelSeries",ck.type="cone-funnel";var Oyt=(_(),w(P)),Of=(R(),w(st)),{commonSeriesOptionsDefs:Pyt,coneFunnelSeriesThemeableOptionsDef:_yt,without:Eyt}=Oyt._ModuleSupport,Ryt={...Eyt(Pyt,["showInLegend"]),..._yt,type:(0,Of.required)((0,Of.constant)("cone-funnel")),stageKey:(0,Of.required)(Of.string),valueKey:(0,Of.required)(Of.string)},Pf=(_(),w(P)),{ThemeConstants:{CARTESIAN_AXIS_TYPE:kK}}=Pf._ModuleSupport,Byt={series:{direction:"vertical",fills:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"secondSequentialColors"},Pf._ModuleSupport.SAFE_RANGE2_OPERATION]},strokes:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"secondSequentialColors"},Pf._ModuleSupport.SAFE_RANGE2_OPERATION]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Pf._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:Pf._ModuleSupport.FILL_IMAGE_DEFAULTS,strokeWidth:{$isUserOption:["./strokes/0",2,0]},label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},placement:"before",spacing:4},tooltip:{range:{$path:["/tooltip/range","nearest"]}},highlight:Pf._ModuleSupport.singleSeriesHighlightStyle(!1)},seriesArea:{padding:{top:20,bottom:20}},axes:{[kK.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1}},[kK.CATEGORY]:{line:{enabled:!1}}}},zyt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"cone-funnel",moduleFactory:t=>new ck(t),solo:!0,defaultAxes:pK,themeTemplate:Byt},Fyt={type:"series",name:"cone-funnel",chartType:"cartesian",enterprise:!0,options:Ryt,create:t=>new ck(t)},KIt=(_(),w(P)),Vyt=(_(),w(P)),Gyt=(_(),w(P)),{FillGradientDefaults:jyt,FillPatternDefaults:Wyt,FillImageDefaults:Hyt,Label:$yt,DropShadow:Uyt,AbstractBarSeriesProperties:Kyt,BaseProperties:Yyt,makeSeriesTooltip:Zyt,AxisLabel:Xyt,Property:Ce}=Gyt._ModuleSupport,qyt=class extends $yt{},IK=class extends Xyt{};y([Ce],IK.prototype,"placement",2);var dc=class extends Yyt{constructor(){super(...arguments),this.enabled=!0,this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};y([Ce],dc.prototype,"enabled",2),y([Ce],dc.prototype,"fill",2),y([Ce],dc.prototype,"fillOpacity",2),y([Ce],dc.prototype,"stroke",2),y([Ce],dc.prototype,"strokeWidth",2),y([Ce],dc.prototype,"strokeOpacity",2),y([Ce],dc.prototype,"lineDash",2),y([Ce],dc.prototype,"lineDashOffset",2);var ts=class extends Kyt{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new jyt,this.fillPatternDefaults=new Wyt,this.fillImageDefaults=new Hyt,this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.spacingRatio=0,this.dropOff=new dc,this.shadow=new Uyt().set({enabled:!1}),this.label=new qyt,this.stageLabel=new IK,this.tooltip=Zyt()}};y([Ce],ts.prototype,"stageKey",2),y([Ce],ts.prototype,"valueKey",2),y([Ce],ts.prototype,"fills",2),y([Ce],ts.prototype,"fillGradientDefaults",2),y([Ce],ts.prototype,"fillPatternDefaults",2),y([Ce],ts.prototype,"fillImageDefaults",2),y([Ce],ts.prototype,"fillOpacity",2),y([Ce],ts.prototype,"strokes",2),y([Ce],ts.prototype,"strokeWidth",2),y([Ce],ts.prototype,"strokeOpacity",2),y([Ce],ts.prototype,"lineDash",2),y([Ce],ts.prototype,"lineDashOffset",2),y([Ce],ts.prototype,"spacingRatio",2),y([Ce],ts.prototype,"itemStyler",2),y([Ce],ts.prototype,"dropOff",2),y([Ce],ts.prototype,"shadow",2),y([Ce],ts.prototype,"label",2),y([Ce],ts.prototype,"stageLabel",2),y([Ce],ts.prototype,"tooltip",2);var{ChartAxisDirection:AK,resetBarSelectionsFn:Qyt,prepareBarAnimationFunctions:CK,midpointStartingBarPosition:LK,createDatumId:Jyt,Rect:txt,motion:wK,applyShapeStyle:ext,getShapeStyle:TK}=Vyt._ModuleSupport,hk=class extends SK{constructor(t){super({moduleCtx:t,animationResetFns:{datum:Qyt}}),this.properties=new ts}getBandScalePadding(){return{inner:this.properties.spacingRatio,outer:0}}connectorEnabled(){return this.properties.dropOff.enabled}barStyle(){const{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:s,lineDashOffset:a,fillGradientDefaults:n,fillPatternDefaults:o,fillImageDefaults:r}=this.properties;return{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:s,lineDashOffset:a,fillGradientDefaults:n,fillPatternDefaults:o,fillImageDefaults:r}}connectorStyle(){const{fill:t,fillOpacity:e,stroke:i,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:o}=this.properties.dropOff;return{fill:t,fillOpacity:e,stroke:i,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:o,fillGradientDefaults:this.properties.fillGradientDefaults,fillPatternDefaults:this.properties.fillPatternDefaults,fillImageDefaults:this.properties.fillImageDefaults}}nodeFactory(){return new txt}createLabelData({datumIndex:t,rect:e,yDatum:i,datum:s,visible:a}){const{valueKey:n,stageKey:o,label:r}=this.properties,l=this.getSeriesDomain(AK.Y),c=this.getLabelText(i,s,n,"y",l,r,{itemId:n,value:i,datum:s,stageKey:o,valueKey:n});return{x:e.x+e.width/2,y:e.y+e.height/2,textAlign:"center",textBaseline:"middle",text:c,itemId:o,datum:s,datumIndex:t,series:this,visible:a}}getItemBaseStyle(t,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return TK({fill:s?.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,opacity:s?.opacity??1},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults)}getItemStyleOverrides(t,e,i,s,a){const{id:n,properties:o}=this,{stageKey:r,valueKey:l,fills:c,strokes:h,itemStyler:u}=o,d=s.fill??c[i%c.length]??"black",p=s.stroke??h[i%h.length]??"black",g={};if(a||(g.fill=d,g.stroke=p),u!=null){const f=this.cachedDatumCallback(Jyt(t,a?"highlight":"node"),()=>{const{fillOpacity:x,strokeOpacity:m,strokeWidth:b,lineDash:v,lineDashOffset:M}=s;return this.callWithContext(u,{seriesId:n,datum:e,highlighted:a,stageKey:r,valueKey:l,fill:d,fillOpacity:x,stroke:p,strokeOpacity:m,strokeWidth:b,lineDash:v,lineDashOffset:M})});Object.assign(g,f)}return TK(g,o.fillGradientDefaults,o.fillPatternDefaults,o.fillImageDefaults)}updateDatumNodes(t){const{shadow:e}=this.properties,{datumSelection:i,isHighlight:s}=t,a=this.getCategoryDirection()===AK.X,n=this.getShapeFillBBox();i.each((o,r)=>{const{datumIndex:l}=r,c=this.getItemBaseStyle(s,r),h=this.getItemStyleOverrides(String(r.datumIndex),r.datum,l,c,s);ext(o,c,h,n),o.visible=a?r.width>0:r.height>0,o.crisp=r.crisp,o.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(),a=CK(LK(i,"normal"));wK.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],a)}animateWaitingUpdateReady(t){super.animateWaitingUpdateReady(t);const{datumSelection:e}=t,{processedData:i}=this,s=i?.reduced?.diff?.[this.id],a=CK(LK(this.isVertical(),"fade"));wK.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],a,(n,o)=>o.xValue,s)}};hk.className="FunnelSeries",hk.type="funnel";var ixt=(_(),w(P)),_f=(R(),w(st)),{commonSeriesOptionsDefs:sxt,funnelSeriesThemeableOptionsDef:axt,without:nxt}=ixt._ModuleSupport,oxt={...axt,...nxt(sxt,["showInLegend"]),type:(0,_f.required)((0,_f.constant)("funnel")),stageKey:(0,_f.required)(_f.string),valueKey:(0,_f.required)(_f.string)},rxt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"funnel",moduleFactory:t=>new hk(t),solo:!0,defaultAxes:pK,themeTemplate:Umt},lxt={type:"series",name:"funnel",chartType:"cartesian",enterprise:!0,options:oxt,create:t=>new hk(t)},uk=(_(),w(P)),Ef=(_(),w(P)),NK=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,s){const a=t.nodes();if(a.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 n=a[0],o=a.toReversed().find(r=>r.datum.datum.value>r.datum.datum.segmentStart)??a[a.length-1];this.node.datum=this.datum=n.datum,s(this.node,n,o)}}},YIt=(_(),w(P)),OK={fromFn:()=>({opacity:0,phase:"initial"}),toFn:()=>({opacity:1})};function PK(t,e){if(t==null)return"";const{min:i,max:s}=e,a=i!==0?Math.ceil(Math.log10(Math.abs(i))):0,n=s!==0?Math.ceil(Math.log10(Math.abs(s))):0,o=Math.max(2-Math.max(a,n),0);return t.toFixed(o)}function eb(t,e,i,s){if(i.text!=null)return i.text;const a=s??i.value;let n;if(i?.formatter!=null&&(n=Qx(e,i.formatter,{seriesId:t,datum:void 0,value:a})),n!=null)return String(n)}var ZIt=(_(),w(P));function _K({path:t,x:e,y:i,size:s}){t.moveTo(e,i-s/2),t.lineTo(e,i+s/2)}var XIt=(_(),w(P)),M1=(R(),w(st));function EK(t,e){const i=(0,M1.iterate)(t.datumUnion.nodes(),t.targetSelection.nodes());return t.pickNodeNearestDistantObject(e,i)}function RK(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),s=(0,M1.clamp)(0,e.otherIndex+e.otherIndexDelta,i.length-1);if(i.length===0)return;const{data:a,selection:n}=i[s];if(a==null||a.length===0)return;const o=(0,M1.clamp)(0,e.datumIndex,a.length-1),r=a[o];for(const l of n)if(l.datum===r)return{bounds:l.node,clipFocusBox:!0,datum:r,datumIndex:o,otherIndex:s}}var D1=(_(),w(P)),cxt=(_(),w(P)),hxt=(R(),w(st)),{BaseProperties:BK,Property:Rf}=cxt._ModuleSupport,dk=class extends BK{getSegments(t,e){const{values:i,step:s,count:a}=this,n=Math.min(...t.domain),o=Math.max(...t.domain);let r;if(i!=null){const l=i.filter(c=>c>n&&c<o).sort((c,h)=>c-h);r=[n,...l,o]}else if(s!=null){const l=[];for(let c=n;c<o;c+=s)l.push(c);l.push(o),r=l}else if(a!=null){const l=a+1;r=Array.from({length:l+1},(c,h)=>h/l*(o-n)+n)}else{const l=t.ticks({nice:!0,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.filter(c=>c>n&&c<o);r=l!=null?[n,...l,o]:void 0}return r!=null&&r.length>e&&(hxt.Logger.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=[n,o]),r}};y([Rf],dk.prototype,"values",2),y([Rf],dk.prototype,"step",2),y([Rf],dk.prototype,"count",2);var ib=class extends BK{constructor(){super(...arguments),this.enabled=!1,this.interval=new dk,this.spacing=0}};y([Rf],ib.prototype,"enabled",2),y([Rf],ib.prototype,"interval",2),y([Rf],ib.prototype,"spacing",2);var{BaseProperties:pk,makeSeriesTooltip:uxt,SeriesProperties:dxt,PropertiesArray:k1,Property:It,Label:pxt,AxisLabel:gxt}=D1._ModuleSupport,zK=class extends pxt{};y([It],zK.prototype,"spacing",2);var Zs=class extends pk{constructor(){super(...arguments),this.value=0,this.label=new zK}};y([It],Zs.prototype,"text",2),y([It],Zs.prototype,"value",2),y([It],Zs.prototype,"shape",2),y([It],Zs.prototype,"placement",2),y([It],Zs.prototype,"spacing",2),y([It],Zs.prototype,"size",2),y([It],Zs.prototype,"rotation",2),y([It],Zs.prototype,"fill",2),y([It],Zs.prototype,"fillOpacity",2),y([It],Zs.prototype,"stroke",2),y([It],Zs.prototype,"strokeWidth",2),y([It],Zs.prototype,"strokeOpacity",2),y([It],Zs.prototype,"lineDash",2),y([It],Zs.prototype,"lineDashOffset",2),y([It],Zs.prototype,"label",2);var Tn=class extends pk{constructor(){super(...arguments),this.enabled=!0,this.thicknessRatio=1,this.fills=new k1(D1._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};y([It],Tn.prototype,"enabled",2),y([It],Tn.prototype,"thickness",2),y([It],Tn.prototype,"thicknessRatio",2),y([It],Tn.prototype,"fills",2),y([It],Tn.prototype,"fillMode",2),y([It],Tn.prototype,"fill",2),y([It],Tn.prototype,"fillOpacity",2),y([It],Tn.prototype,"stroke",2),y([It],Tn.prototype,"strokeWidth",2),y([It],Tn.prototype,"strokeOpacity",2),y([It],Tn.prototype,"lineDash",2),y([It],Tn.prototype,"lineDashOffset",2);var sb=class extends pk{constructor(){super(...arguments),this.values=void 0,this.step=void 0,this.minSpacing=0,this.maxSpacing=1e3}};y([It],sb.prototype,"values",2),y([It],sb.prototype,"step",2),y([It],sb.prototype,"minSpacing",2),y([It],sb.prototype,"maxSpacing",2);var FK=class extends gxt{constructor(){super(...arguments),this.placement=void 0}};y([It],FK.prototype,"placement",2);var ca=class extends pk{constructor(){super(...arguments),this.min=0,this.max=1,this.fills=new k1(D1._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",this.interval=new sb,this.label=new FK}};y([It],ca.prototype,"min",2),y([It],ca.prototype,"max",2),y([It],ca.prototype,"fills",2),y([It],ca.prototype,"fillMode",2),y([It],ca.prototype,"fill",2),y([It],ca.prototype,"fillOpacity",2),y([It],ca.prototype,"stroke",2),y([It],ca.prototype,"strokeWidth",2),y([It],ca.prototype,"strokeOpacity",2),y([It],ca.prototype,"lineDash",2),y([It],ca.prototype,"lineDashOffset",2),y([It],ca.prototype,"defaultFill",2),y([It],ca.prototype,"interval",2),y([It],ca.prototype,"label",2);var gk=class extends il{constructor(){super(...arguments),this.placement="inside-center",this.avoidCollisions=!0}};y([It],gk.prototype,"text",2),y([It],gk.prototype,"placement",2),y([It],gk.prototype,"avoidCollisions",2);var ha=class extends dxt{constructor(){super(...arguments),this.value=0,this.segmentation=new ib,this.defaultColorRange=[],this.targets=new k1(Zs),this.defaultTarget=new Zs,this.defaultScale=new ca,this.direction="vertical",this.thickness=1,this.cornerRadius=0,this.cornerMode="container",this.margin=0,this.scale=new ca,this.bar=new Tn,this.label=new gk,this.tooltip=uxt()}};y([It],ha.prototype,"value",2),y([It],ha.prototype,"segmentation",2),y([It],ha.prototype,"defaultColorRange",2),y([It],ha.prototype,"targets",2),y([It],ha.prototype,"defaultTarget",2),y([It],ha.prototype,"defaultScale",2),y([It],ha.prototype,"direction",2),y([It],ha.prototype,"thickness",2),y([It],ha.prototype,"cornerRadius",2),y([It],ha.prototype,"cornerMode",2),y([It],ha.prototype,"margin",2),y([It],ha.prototype,"scale",2),y([It],ha.prototype,"bar",2),y([It],ha.prototype,"label",2),y([It],ha.prototype,"tooltip",2);var fxt=(_(),w(P)),{CachedTextMeasurerPool:mxt,BBox:yxt}=fxt._ModuleSupport;function I1(t){const{x0:e,y0:i,x1:s,y1:a,horizontalInset:n,verticalInset:o}=t,r=Math.min(e,s)+n,l=Math.min(i,a)+o,c=Math.max(Math.abs(s-e)-2*n,0),h=Math.max(Math.abs(a-i)-2*o,0);return{x:r,y:l,width:c,height:h}}function xxt(t,e){if(e==null)return!0;const i=I1(t),s=1e-6,a=i.x+s,n=i.y+s,o=i.x+i.width-s,r=i.y+i.height-s,l=e.x,c=e.x+e.width,h=e.y,u=e.y+e.height;return Math.max(a,l)<=Math.min(o,c)&&Math.max(n,h)<=Math.min(r,u)}function A1(t){const{clipX0:e,clipX1:i,clipY0:s,clipY1:a}=t;return e!=null&&i!=null||s!=null&&a!=null}function bxt(t){if(!A1(t))return;const{x0:e,y0:i,x1:s,y1:a}=t,{x:n,y:o,width:r,height:l}=I1(t);let{clipX0:c,clipX1:h,clipY0:u,clipY1:d}=t;(c==null||h==null)&&(c=e,h=s),(u==null||d==null)&&(u=i,d=a);const p=Math.min(c,h),g=Math.min(u,d),f=Math.abs(h-c),x=Math.abs(d-u);return c=Math.max(n,p),u=Math.max(o,g),h=Math.min(n+r,p+f),d=Math.min(o+l,g+x),new yxt(Math.min(c,h),Math.min(u,d),Math.abs(h-c),Math.abs(d-u))}function VK(t,e){const i=t?"initial":"update";return{node:{fromFn(a,n){const o=a.previousDatum;let{x0:r,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g}=o??n;const{horizontalInset:f,verticalInset:x}=n,m=o!=null&&A1(o),b=A1(n);return m&&b||(!m&&b?({x0:r,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g}=n,t&&(e?p=n.clipX0:g=n.clipY0)):m&&!b?({x0:r,y0:l,x1:c,y1:h}=n,u=void 0,d=void 0,p=void 0,g=void 0):t&&(e?c=r:h=l)),{x0:r,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g,horizontalInset:f,verticalInset:x,phase:i}},toFn(a,n){const{x0:o,y0:r,x1:l,y1:c,clipX0:h,clipY0:u,clipX1:d,clipY1:p,horizontalInset:g,verticalInset:f}=n;return{x0:o,y0:r,x1:l,y1:c,clipX0:h,clipY0:u,clipX1:d,clipY1:p,horizontalInset:g,verticalInset:f}},applyFn(a,n){a.setProperties(fk(a,n))}}}}function fk(t,e){const{x:i,y:s,width:a,height:n}=I1(e),o=bxt(e),r=xxt(e,o);return{x:i,y:s,width:a,height:n,clipBBox:o,visible:r}}var vxt={Before:"right",Center:"center",After:"left"},Sxt={Before:"top",Center:"middle",After:"bottom"},Mxt={Before:-1,Center:-.5,After:0},Dxt={Before:0,Center:-.5,After:-1};function kxt(t,e,i,s,a,n){const{seriesRect:o,gaugeRect:r,barRect:l}=a,{padding:c,horizontal:h}=s;i.each((u,d)=>{const p=eb(t.id,e,d,n?.label);let g,f;d.placement==="outside-start"?h?(g=r.x,f=o.height):(g=o.width,f=o.height-(r.y+r.height)):d.placement==="outside-end"?h?(g=o.width-(r.x+r.width),f=o.height):(g=o.width,f=r.y):d.avoidCollisions&&(g=r.width,f=r.height);let x;if(p==null)return;if(g!=null&&f!=null)x=jx(p,d,{padding:c},()=>({width:g,height:f,meta:null}))?.[0];else{const F={fontSize:d.fontSize,fontStyle:d.fontStyle,fontWeight:d.fontWeight,fontFamily:d.fontFamily,lineHeight:d.lineHeight},{width:V,height:G}=mxt.measureText(p,{font:F});x={text:p,fontSize:d.fontSize,lineHeight:Sf(d,d.fontSize),width:V,height:G}}if(x==null){u.visible=!1;return}const m=h?r.x:r.y+r.height,b=h?r.x+r.width:r.y,v=h?l.x:l.y+l.height,M=h?l.x+l.width:l.y,D=d.spacing*(h?1:-1);let L,C,A,T;switch(d.placement){case"outside-start":L=-1/0,C=1/0,A=m-D,T="Before";break;case"outside-end":L=-1/0,C=1/0,A=b+D,T="After";break;case"inside-start":L=m,C=M,A=m+D,T="After";break;case"inside-end":L=M,C=b,A=b-D,T="Before";break;case"inside-center":L=m,C=b,A=(m+b)/2,T="Center";break;case"bar-inside":L=v,C=M,A=(v+M)/2,T="Center";break;case"bar-inside-end":L=v,C=M,A=M-D,T="Before";break;case"bar-outside-end":L=M,C=b,A=M+D,T="After";break;case"bar-end":L=-1/0,C=1/0,A=M,T="Center";break}const N=h?A:r.x+r.width/2,O=h?r.y+r.height/2:A;let E,z;h?(E=N+Mxt[T]*x.width,z=E+x.width):(E=O+Dxt[T]*x.height,z=E+x.height);const B=Math.min(E,z)>=Math.min(L,C)&&Math.max(E,z)<=Math.max(L,C);if(d.avoidCollisions&&!B){u.visible=!1;return}u.visible=!0,u.text=x.text,u.fontSize=x.fontSize,u.lineHeight=x.lineHeight,u.textAlign=h?vxt[T]:"center",u.textBaseline=h?"middle":Sxt[T],u.x=N,u.y=O})}var{fromToMotion:C1,resetMotion:Ixt,SeriesNodePickMode:GK,StateMachine:Axt,createDatumId:jK,CachedTextMeasurerPool:Cxt,toRadians:WK,BBox:Uh,Group:rp,PointerEvents:HK,Selection:lp,Rect:Lxt,Text:$K,TransformableText:wxt,Marker:Txt,LinearScale:Nxt,AxisTickGenerator:Oxt,NiceMode:Pxt,easing:_xt,getColorStops:Ext,findRangeExtent:Rxt,tickFormat:Bxt}=Ef._ModuleSupport,zxt={before:180,middle:0,after:0},Fxt={before:90,middle:0,after:-90},Vxt=class{constructor(t,e){this.gauge=t,this.ctx=e}get scale(){return this.gauge.scale}get label(){return this.gauge.properties.scale.label}get interval(){return this.gauge.properties.scale.interval}tickFormatter(t,e,i,s,a){const{format:n}=this.label;let o;return n!=null&&(o=Bxt(e,typeof n=="string"?n:void 0)),(r,l)=>{const{formatter:c}=this.label;let h;return c&&(h??(h=Qx(this.ctx,c,{value:r,index:l,domain:t,boundSeries:void 0}))),h??(h=o?.(r)),h??this.gauge.formatLabel(r)}}inRange(){return!0}},mk=class extends Ef._ModuleSupport.Series{constructor(t){super({moduleCtx:t,pickModes:[GK.EXACT_SHAPE_MATCH,GK.NEAREST_NODE]}),this.properties=new ha,this.seriesRect=Uh.NaN,this.gaugeRect=Uh.NaN,this.scale=new Nxt,this.originX=0,this.originY=0,this.scaleGroup=this.contentGroup.appendChild(new rp({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new rp({name:"itemGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new rp({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new rp({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new rp({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new rp({name:"itemTargetLabelGroup"})),this.tickGroup=this.contentGroup.appendChild(new rp({name:"tickGroup"})),this.scaleSelection=lp.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=lp.select(this.itemGroup,()=>this.nodeFactory()),this.targetSelection=lp.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=lp.select(this.itemTargetLabelGroup,$K),this.labelSelection=lp.select(this.itemLabelGroup,$K),this.highlightTargetSelection=lp.select(this.highlightTargetGroup,()=>this.markerFactory()),this.tickSelection=lp.select(this.tickGroup,wxt),this.datumUnion=new NK,this.axis=new Vxt(this,t),this.tickGenerator=new Oxt(this.axis),this.animationState=new Axt("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=HK.None,this.tickGroup.pointerEvents=HK.None}get range(){return this.horizontal?[0,this.gaugeRect.width]:[0,this.gaugeRect.height]}get horizontal(){return this.properties.direction==="horizontal"}get hasData(){return!0}nodeFactory(){const t=new Lxt;return t.crisp=!0,t}markerFactory(){return new Txt}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(t){return PK(t,this.properties.scale)}createLinearGradient(t,e,i){const{properties:s,horizontal:a}=this,{defaultColorRange:n}=s;return{type:"gradient",gradient:"linear",colorSpace:"oklch",colorStops:Ext(e,n,t.domain,i),rotation:a?90:0}}getShapeFillBBox(){const{properties:t,originX:e,originY:i,horizontal:s,scale:a}=this,{thickness:n}=t,o=Rxt(a.range);return new Uh(e,i,s?o:n,s?n:o)}getTargets(){const{properties:t}=this,e=t.defaultTarget;return Array.from(t.targets).map(i=>{const{text:s=e.text,value:a=e.value??0,shape:n=e.shape??"triangle",rotation:o=e.rotation??0,strokeWidth:r=e.strokeWidth??0,placement:l=e.placement??"middle",spacing:c=e.spacing??0,size:h=e.size??0,fill:u=e.fill??"black",fillOpacity:d=e.fillOpacity??1,stroke:p=e.stroke??"black",strokeOpacity:g=e.strokeOpacity??1,lineDash:f=e.lineDash??[0],lineDashOffset:x=e.lineDashOffset??0}=i,{enabled:m=e.label.enabled,color:b=e.label.color??"black",fontStyle:v=e.label.fontStyle??"normal",fontWeight:M=e.label.fontWeight??"normal",fontSize:D=e.label.fontSize,fontFamily:L=e.label.fontFamily,spacing:C=e.label.spacing??0}=i.label;return{text:s,value:a,shape:n,placement:l,spacing:c,size:h,rotation:o,fill:u,fillOpacity:d,stroke:p,strokeWidth:r,strokeOpacity:g,lineDash:f,lineDashOffset:x,label:{enabled:m,color:b,fontStyle:v,fontWeight:M,fontSize:D,fontFamily:L,spacing:C}}})}getTargetPoint(t){const{properties:e,originX:i,originY:s,horizontal:a,scale:n,gaugeRect:o}=this,{thickness:r}=e,{value:l,placement:c,spacing:h,size:u}=t,d=n.convert(l);let p;switch(c){case"before":p=-(h+u/2);break;case"after":p=r+h+u/2;break;default:p=r/2;break}return{x:i+o.x+(a?d:p),y:s+o.y+(a?p:d)}}getTargetLabel(t){const{size:e,placement:i,label:s}=t,{spacing:a,color:n,fontStyle:o,fontWeight:r,fontSize:l,fontFamily:c}=s,h=void 0,u=e/2+a;let d,p,g=0,f=0;return this.horizontal?(d="center",i==="after"?(p="top",f=u):(p="bottom",f=-u)):(p="middle",i==="before"?(d="right",g=-u):(d="left",g=u)),{offsetX:g,offsetY:f,fill:n,textAlign:d,textBaseline:p,fontStyle:o,fontWeight:r,fontSize:l,fontFamily:c,lineHeight:h}}labelDatum(t,e){const{placement:i,avoidCollisions:s,spacing:a,text:n,color:o,fontSize:r,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:u,lineHeight:d,wrapping:p,overflowStrategy:g,formatter:f=x=>this.formatLabel(x.value)}=t;return{placement:i,avoidCollisions:s,spacing:a,text:n,value:e,fill:o,fontSize:r,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:u,lineHeight:d,wrapping:p,overflowStrategy:g,formatter:f}}verticalLabelInset(){const{properties:t}=this,{label:e}=t,i=e.text?.split(`
`),s=Sf(e,e.fontSize)*(i?.length??1);return e.spacing+s}horizontalLabelInset(){const{scale:t,properties:e}=this,{scale:i,label:s}=e,a=s.text?.split(`
`),n=Cxt.getMeasurer({font:s}),o=i.interval.values??t.ticks({nice:!1,interval:i.interval.step,minTickCount:0,maxTickCount:6,tickCount:5})?.ticks??[],l=(a??o?.map(c=>eb(this.id,this.ctx,this.labelDatum(s,c))??"")).reduce((c,h)=>{const{width:u}=n.measureText(h);return Math.max(c,u)},0);return s.spacing+l}createNodeData(){const{id:t,properties:e,horizontal:i,scale:s,seriesRect:a}=this,{value:n,segmentation:o,thickness:r,cornerRadius:l,cornerMode:c,bar:h,scale:u,label:d}=e;s.domain=[u.min,u.max],s.range=i?[0,a.width]:[a.height,0];let p,g;i?(g=1,p=Math.PI/2):u.label.placement==="before"?(g=1,p=0):(g=-1,p=0);const f=p-Math.PI/2;let x,m,b,v;i?(x=0,m=a.width,b=(a.height-r)/2,v=b+r,d.placement==="outside-start"?x+=this.horizontalLabelInset():d.placement==="outside-end"&&(m-=this.horizontalLabelInset())):(x=(a.width-r)/2,m=x+r,v=0,b=a.height,d.placement==="outside-start"?b-=this.verticalLabelInset():d.placement==="outside-end"&&(v+=this.verticalLabelInset())),this.gaugeRect=new Uh(Math.min(x,m),Math.min(b,v),Math.abs(m-x),Math.abs(v-b));const M=0,D=0;s.domain=[u.min,u.max],s.range=i?[x,m]:[b,v];const{ticks:L}=this.tickGenerator.generateTicks({domain:s.domain,range:this.range,reverse:!1,primaryTickCount:void 0,defaultTickMinSpacing:0,visibleRange:[0,1],niceMode:Pxt.Off,labelX:0,parallelFlipRotation:p,regularFlipRotation:f,sideFlag:g,removeOverflowLabels:!1}).tickData,C=!1,A=this.getTargets(),T=[],N=[],O=[],E=[],[z,B]=s.range,F=Math.abs(B-z),V=i?s.convert(n):m,G=i?v:s.convert(n),H=o.enabled?o.spacing/2:0,$=i?H:0,W=i?0:H,j=Math.min(h.thickness??Math.round(h.thicknessRatio*r),r),U=-(r-j)/2,Z=i?0:U,X=i?U:0,q=c==="item",tt=Math.ceil(F);let J=o.enabled?o.interval.getSegments(s,tt):void 0;const at=h.fill??this.createLinearGradient(s,h.fills,h.fillMode),et=u.fill??(h.enabled&&u.fills.length===0?u.defaultFill:void 0)??this.createLinearGradient(s,u.fills,u.fillMode);if(J==null&&q){const ct=Math.min(...s.domain),ht=Math.max(...s.domain),xt={value:n,segmentStart:ct,segmentEnd:ht};if(h.enabled){const ce=Math.min(l,j/2,F/2)*(C?-1:1),Ot=i?ce:0,Vt=i?0:ce;T.push({series:this,itemId:"value",datum:xt,datumIndex:{type:0},type:0,x0:M+x-Ot-Z,y0:D+b-Vt-X,x1:M+V+Ot+Z,y1:D+G+Vt+X,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,fill:at,horizontalInset:$,verticalInset:W})}const Dt=Math.min(l,r/2,F/2)*(C?-1:1),St=i?Dt:0,Xt=i?0:Dt;E.push({series:this,itemId:"scale",datum:xt,datumIndex:{type:0},type:0,x0:M+x-St,y0:D+b-Xt,x1:M+m+St,y1:D+v+Xt,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,fill:et,horizontalInset:$,verticalInset:W})}else{J??(J=s.domain);const ct=M+x-Z,ht=D+b-X,xt=M+V+Z,kt=D+G+X;for(let Dt=0;Dt<J.length-1;Dt+=1){const St=J[Dt+0],Xt=J[Dt+1],ke={value:n,segmentStart:St,segmentEnd:Xt},ce=Dt===0,Ot=Dt===J.length-2,Vt=s.convert(St),qt=s.convert(Xt),he=q||ce?l:0,ai=q||Ot?l:0,ni=i?he:ai,ys=ai,Qa=i?ai:he,ol=he;h.enabled&&T.push({series:this,itemId:`value-${Dt}`,datum:ke,datumIndex:{type:0},type:0,x0:M+(i?Vt:x),y0:D+(i?b:Vt),x1:M+(i?qt:m),y1:D+(i?v:qt),clipX0:ct,clipY0:ht,clipX1:xt,clipY1:kt,topLeftCornerRadius:ni,topRightCornerRadius:ys,bottomRightCornerRadius:Qa,bottomLeftCornerRadius:ol,fill:at,horizontalInset:$,verticalInset:W}),E.push({series:this,itemId:`scale-${Dt}`,datum:ke,datumIndex:{type:0},type:0,x0:M+(i?Vt:x),y0:D+(i?b:Vt),x1:M+(i?qt:m),y1:D+(i?v:qt),clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:ni,topRightCornerRadius:ys,bottomRightCornerRadius:Qa,bottomLeftCornerRadius:ol,fill:et,horizontalInset:$,verticalInset:W})}}d.enabled&&O.push(this.labelDatum(d,n));const it=i?zxt:Fxt;for(let ct=0;ct<A.length;ct+=1){const ht=A[ct],{value:xt,text:kt,shape:Dt,size:St,fill:Xt,fillOpacity:ke,stroke:ce,strokeWidth:Ot,strokeOpacity:Vt,lineDash:qt,lineDashOffset:he}=ht,ai=this.getTargetPoint(ht),ni=WK(ht.rotation+it[ht.placement]);N.push({series:this,itemId:`target-${ct}`,midPoint:ai,datum:{value:xt},datumIndex:{type:1,index:ct},type:1,value:xt,text:kt,x:ai.x,y:ai.y,shape:Dt,size:St,rotation:ni,fill:Xt,fillOpacity:ke,stroke:ce,strokeOpacity:Vt,strokeWidth:Ot,lineDash:qt,lineDashOffset:he,label:this.getTargetLabel(ht)})}return{itemId:t,nodeData:T,tickData:L,targetData:N,labelData:O,scaleData:E}}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,targetSelection:s,targetLabelSelection:a,scaleSelection:n,highlightTargetSelection:o,tickSelection:r}=this;this.seriesRect=t??Uh.NaN;const 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??[],u=this.contextNodeData?.targetData??[],d=this.contextNodeData?.scaleData??[],p=this.contextNodeData?.tickData??[],g=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:d,scaleSelection:n}),this.updateScaleNodes({scaleSelection:n}),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:o}),this.updateTargetNodes({targetSelection:o,isHighlight:!0}),this.tickSelection=this.updateTickSelection({tickData:p,tickSelection:r}),this.updateTickNodes({tickSelection:r}),l&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>jK(t.nodeData.length,e.itemId))}updateDatumNodes(t){const{datumSelection:e}=t,{ctx:i,properties:s}=this,{bar:a}=s,{fillOpacity:n,stroke:o,strokeOpacity:r,lineDash:l,lineDashOffset:c}=a,h=this.getStrokeWidth(a.strokeWidth),u=i.animationManager.isSkipped(),d=this.getShapeFillBBox();e.each((p,g)=>{const{topLeftCornerRadius:f,topRightCornerRadius:x,bottomRightCornerRadius:m,bottomLeftCornerRadius:b,fill:v}=g;p.fill=v,p.fillBBox=d,p.fillOpacity=n,p.stroke=o,p.strokeOpacity=r,p.strokeWidth=h,p.lineDash=l,p.lineDashOffset=c,p.topLeftCornerRadius=f,p.topRightCornerRadius=x,p.bottomRightCornerRadius=m,p.bottomLeftCornerRadius=b,p.pointerEvents=this.properties.bar.enabled?Ef._ModuleSupport.PointerEvents.All:Ef._ModuleSupport.PointerEvents.None,(u||p.previousDatum==null)&&p.setProperties(fk(p,g))}),this.datumUnion.update(e,this.itemGroup,Ef._ModuleSupport.Rect,(p,g,f)=>{p.pointerEvents=Ef._ModuleSupport.PointerEvents.None,p.clipBBox??(p.clipBBox=new Uh(NaN,NaN,NaN,NaN)),p.x=g.x,p.y=g.y,p.clipBBox.x=g.clipBBox?.x??g.x,p.clipBBox.y=g.clipBBox?.y??g.y,this.horizontal?(p.height=p.clipBBox.height=f.height,p.width=f===g?f.width:f.x+f.width,p.clipBBox.width=p.width-(f.width-(f.clipBBox?.width??f.width)),p.topLeftCornerRadius=g.topLeftCornerRadius,p.bottomLeftCornerRadius=g.bottomLeftCornerRadius,p.topRightCornerRadius=f.topRightCornerRadius,p.bottomRightCornerRadius=f.bottomRightCornerRadius):(p.width=p.clipBBox.width=f.width,p.height=f===g?f.height:f.x+f.height,p.clipBBox.height=p.height-(f.height-(f.clipBBox?.height??f.height)),p.topLeftCornerRadius=g.topLeftCornerRadius,p.topRightCornerRadius=g.topRightCornerRadius,p.bottomLeftCornerRadius=f.bottomLeftCornerRadius,p.bottomRightCornerRadius=f.bottomRightCornerRadius)})}updateScaleSelection(t){return t.scaleSelection.update(t.scaleData,void 0,e=>jK(t.scaleData.length,e.itemId))}updateScaleNodes(t){const{scaleSelection:e}=t,{scale:i}=this.properties,{fillOpacity:s,stroke:a,strokeOpacity:n,strokeWidth:o,lineDash:r,lineDashOffset:l}=i,c=this.getShapeFillBBox();e.each((h,u)=>{const{topLeftCornerRadius:d,topRightCornerRadius:p,bottomRightCornerRadius:g,bottomLeftCornerRadius:f,fill:x}=u;h.fill=x,h.fillBBox=c,h.fillOpacity=s,h.stroke=a,h.strokeOpacity=n,h.strokeWidth=o,h.lineDash=r,h.lineDashOffset=l,h.topLeftCornerRadius=d,h.topRightCornerRadius=p,h.bottomRightCornerRadius=g,h.bottomLeftCornerRadius=f,h.setProperties(fk(h,u))})}updateTargetSelection(t){return t.targetSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetNodes(t){const{targetSelection:e,isHighlight:i}=t,s=i?this.properties.highlightStyle.item:void 0;e.each((a,n)=>{const{x:o,y:r,shape:l,size:c,rotation:h,fill:u,fillOpacity:d,stroke:p,strokeOpacity:g,strokeWidth:f,lineDash:x,lineDashOffset:m}=n;a.size=c,a.shape=l==="line"?_K:l,a.fill=s?.fill??u,a.fillOpacity=s?.fillOpacity??d,a.stroke=s?.stroke??p,a.strokeOpacity=s?.strokeOpacity??g,a.strokeWidth=s?.strokeWidth??f,a.lineDash=s?.lineDash??x,a.lineDashOffset=s?.lineDashOffset??m,a.translationX=o,a.translationY=r,a.rotation=h})}updateTargetLabelSelection(t){return t.targetLabelSelection.update(t.targetData)}updateTargetLabelNodes(t){const{targetLabelSelection:e}=t;e.each((i,s)=>{const{x:a,y:n,text:o}=s,{offsetX:r,offsetY:l,fill:c,fontStyle:h,fontWeight:u,fontSize:d,fontFamily:p,textAlign:g,textBaseline:f}=s.label;i.visible=!0,i.x=a+r,i.y=n+l,i.text=o,i.fill=c,i.fontStyle=h,i.fontWeight=u,i.fontSize=d,i.fontFamily=p,i.textAlign=g,i.textBaseline=f})}updateTickSelection(t){return t.tickSelection.update(t.tickData,void 0,e=>e.tickId)}updateTickNodes(t){const{gaugeRect:e,properties:i}=this,s=i.defaultScale,{enabled:a,color:n,fontFamily:o=s.label.fontFamily,fontSize:r=s.label.fontSize,fontStyle:l,fontWeight:c=s.label.fontWeight,spacing:h}=i.scale.label;let{placement:u}=i.scale.label;const d=WK(i.scale.label.rotation??0);let p,g,f,x;this.horizontal?(u??(u="after"),p="center",g=u==="before"?"bottom":"top",x=this.originY+e.y+(u==="before"?-h:e.height+h)):(u??(u="before"),p=u==="before"?"end":"start",g="middle",f=this.originX+e.x+(u==="before"?-h:e.width+h)),t.tickSelection.each((m,b)=>{if(!a){m.visible=!1;return}const v=f??b.translation,M=x??b.translation;m.visible=!0,m.text=b.tickLabel,m.fill=n,m.fontFamily=o,m.fontSize=r,m.fontStyle=l,m.fontWeight=c,m.textBaseline=g,m.textAlign=p,m.x=v,m.y=M,m.rotationCenterX=v,m.rotationCenterY=M,m.rotation=d})}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((s,a)=>{s.fill=a.fill,s.fontStyle=a.fontStyle,s.fontWeight=a.fontWeight,s.fontFamily=a.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,scale:s,seriesRect:a,gaugeRect:n}=this,{x:o,y:r,width:l,height:c}=n,h=t?.label??this.properties.value;let u;if(i){const g=s.convert(h);u=new Uh(o,r,g-o,c)}else{const g=s.convert(h);u=new Uh(o,g,l,c-g)}const d={seriesRect:a,gaugeRect:n,barRect:u},{margin:p}=this.properties;kxt(this,this.ctx,e,{padding:p,horizontal:i},d,t)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),Ixt([this.datumSelection],fk),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,s=0;if(this.labelSelection.each((a,n)=>{a.opacity=1,i=a.previousDatum?.value??t.from??n.value,s=n.value}),!this.labelsHaveExplicitText())if(i===s)this.formatLabelText({label:s});else{const a=`${this.id}_labels`;e.animate({id:a,groupId:"label",from:{label:i},to:{label:s},phase:t.phase??"update",ease:_xt.easeOut,onUpdate:n=>this.formatLabelText(n)})}}animateEmptyUpdateReady(){const{animationManager:t}=this.ctx,{node:e}=VK(!0,this.horizontal);C1(this.id,"node",t,[this.datumSelection],e,(i,s)=>s.itemId),C1(this.id,"label",t,[this.labelSelection],OK,()=>"primary"),this.animateLabelText({from:0,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:t}=this.ctx,{node:e}=VK(!1,this.horizontal);C1(this.id,"node",t,[this.datumSelection],e,(i,s)=>s.itemId),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}getSeriesDomain(){return[0,1]}dataCount(){return NaN}getSeriesRange(t,e){return[NaN,NaN]}getLegendData(){return[]}getTooltipContent(t){const{id:e,properties:i}=this,{tooltip:s}=i;let a,n;if(t.type===0?(a=i.value,n=i.label.text):{value:a,text:n}=i.targets[t.index],a!=null)return this.formatTooltipWithContext(s,{data:[{label:n,fallbackLabel:"Value",value:this.formatLabel(a)}]},{seriesId:e,title:void 0,datum:void 0,value:a})}pickNodeClosestDatum(t){return EK(this,t)}pickFocus(t){return RK(this,t)}getCaptionText(){return this.formatLabel(this.properties.value)}getCategoryValue(t){}datumIndexForCategoryValue(t){}};mk.className="LinearGaugeSeries",mk.type="linear-gauge";var Gxt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["gauge"],identifier:"linear-gauge",moduleFactory:t=>new mk(t),themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{thickness:50,defaultColorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$interpolate:[{$palette:"secondDivergingColors"},5]},uk._ModuleSupport.SAFE_RANGE2_OPERATION]},scale:{defaultFill:{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["/2",uk._ModuleSupport.SAFE_STROKE_FILL_OPERATION,{$palette:"hierarchyColors"}]},strokeWidth:{$isUserOption:["./stroke",2,0]},label:{spacing:11}},bar:{strokeWidth:{$isUserOption:["./stroke",2,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}},defaultScale:{label:{fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}}},label:{enabled:!1,placement:"inside-start",fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:2},minimumFontSize:uk._ModuleSupport.FONT_SIZE.SMALL,spacing:18,color:{$ref:"chartBackgroundColor"}},margin:4,tooltip:{range:{$path:["/tooltip/range",10]}}}}},jxt={type:"series",name:"linear-gauge",chartType:"gauge",enterprise:!0,options:uk._ModuleSupport.linearGaugeSeriesOptionsDef,create:t=>new mk(t)},L1=(_(),w(P)),UK=(_(),w(P)),ab={zoom:{axes:"xy",anchorPointX:"pointer",anchorPointY:"pointer",buttons:{anchorPointX:"middle",anchorPointY:"middle"}},legend:{enabled:!1},gradientLegend:{enabled:!1}};function Nn(t){const e=UK._ModuleSupport.deepClone(t);return UK._ModuleSupport.jsonWalk(e,i=>{typeof i=="object"&&"$palette"in i&&(i.$mapPalette=i.$palette,delete i.$palette)}),e}var KK=(_(),w(P)),YK=(R(),w(st)),Wxt=(_(),w(P)),Hxt=1e-9;function ZK(t,e,i,s){const[a,n]=t,[o,r]=e,l=o-a,c=r-n,h=l*l+c*c;let u,d;if(Math.abs(h)<Hxt)u=a,d=n;else{let f=((i-a)*l+(s-n)*c)/h;f=Math.max(0,Math.min(1,f)),u=a+f*(o-a),d=n+f*(r-n)}const p=i-u,g=s-d;return p*p+g*g}function XK(t,e,i){let s=1/0,a=t[t.length-1];for(const n of t)s=Math.min(s,ZK(a,n,e,i)),a=n;return Math.sqrt(s)}function w1(t){let[e,i]=t[0],s=0;for(let a=1;a<t.length;a+=1){const[n,o]=t[a],r=Math.hypot(n-e,o-i);s+=r,e=n,i=o}return s}function yk(t){if(t.length===0)return;const e=w1(t)/2;let[i,s]=t[0],a=0;for(let n=1;n<t.length;n+=1){const[o,r]=t[n],l=Math.hypot(o-i,r-s),c=a+l;if(c>e){const h=(e-a)/l,u=[i+(o-i)*h,s+(r-s)*h],d=Math.atan2(r-s,o-i);return{point:u,angle:d}}a=c,i=o,s=r}}var $xt=(_(),w(P)),{LonLatBBox:Uxt}=$xt._ModuleSupport;function cp(t,e){return t.forEach(i=>{const[s,a]=i;e=Uxt.extend(e,s,a,s,a)}),e}function Kxt(t){if(t.length===0)return;let e=0,i=0,s=0,[a,n]=t[t.length-1];for(const[o,r]of t){const l=a*r-o*n;s+=l,e+=(a+o)*l,i+=(n+r)*l,a=o,n=r}return s*=3,[e/s,i/s]}function xk(t,e,i){let s=!1,a=1/0;for(const n of t){let o=n[n.length-1],[r,l]=o;for(const c of n){const[h,u]=c;u>i!=l>i&&e<(r-h)*(i-u)/(l-u)+h&&(s=!s),a=Math.min(a,ZK(o,c,e,i)),o=c,r=h,l=u}}return(s?-1:1)*Math.sqrt(a)}var{Path:Yxt,ExtendedPath2D:Zxt,BBox:Xxt,SceneChangeDetection:qxt,SceneObjectChangeDetection:Qxt,objectsEqual:Jxt}=Wxt._ModuleSupport,Bf=class extends Yxt{constructor(){super(...arguments),this.projectedGeometry=void 0,this.renderMode=3,this.strokePath=new Zxt}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 s=this.geometryDistance(i,t,e);return s>0?s*s:0}geometryDistance(t,e,i){const{renderMode:s,strokeWidth:a}=this,n=(s&1)!==0,o=(s&2)!==0,r=Math.max(a/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 n?t.coordinates.reduce((l,c)=>Math.min(l,Math.max(xk(c,e,i),0)),1/0):1/0;case"Polygon":return n?Math.max(xk(t.coordinates,e,i),0):1/0;case"MultiLineString":return o?t.coordinates.reduce((l,c)=>Math.min(l,Math.max(XK(c,e,i)-r,0)),1/0):1/0;case"LineString":return o?Math.max(XK(t.coordinates,e,i)-r,0):1/0;case"MultiPoint":case"Point":default:return 1/0}}drawGeometry(t,e){const{renderMode:i,path:s,strokePath:a}=this,n=(i&1)!==0,o=(i&2)!==0;switch(t.type){case"GeometryCollection":t.geometries.forEach(r=>{e=this.drawGeometry(r,e)});break;case"MultiPolygon":n&&t.coordinates.forEach(r=>{e=this.drawPolygon(s,r,e)});break;case"Polygon":n&&(e=this.drawPolygon(s,t.coordinates,e));break;case"LineString":o&&(e=this.drawLineString(a,t.coordinates,e,!1));break;case"MultiLineString":o&&t.coordinates.forEach(r=>{e=this.drawLineString(a,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 s=1;s<e.length;s+=1){const a=e[s];this.drawLineString(t,a,void 0,!0)}return i}drawLineString(t,e,i,s){if(e.length<2)return i;const a=s?e.length-1:e.length;for(let n=0;n<a;n+=1){const[o,r]=e[n];if(n===0?t.moveTo(o,r):t.lineTo(o,r),i==null)i=new Xxt(o,r,0,0);else{const{x:l,y:c}=i,h=l+i.width,u=c+i.height;i.x=Math.min(l,o),i.y=Math.min(c,r),i.width=Math.max(h,o)-i.x,i.height=Math.max(u,r)-i.y}}return s&&t.closePath(),i}};y([Qxt({equals:Jxt})],Bf.prototype,"projectedGeometry",2),y([qxt()],Bf.prototype,"renderMode",2);var tbt=(_(),w(P)),{LonLatBBox:T1}=tbt._ModuleSupport;function zf(t,e){if(t.bbox!=null){const[i,s,a,n]=t.bbox;return e=T1.extend(e,i,s,a,n),e}switch(t.type){case"GeometryCollection":t.geometries.forEach(i=>{e=zf(i,e)});break;case"MultiPolygon":t.coordinates.forEach(i=>{i.length>0&&(e=cp(i[0],e))});break;case"Polygon":t.coordinates.length>0&&(e=cp(t.coordinates[0],e));break;case"MultiLineString":t.coordinates.forEach(i=>{e=cp(i,e)});break;case"LineString":e=cp(t.coordinates,e);break;case"MultiPoint":t.coordinates.forEach(i=>{const[s,a]=i;e=T1.extend(e,s,a,s,a)});break;case"Point":{const[i,s]=t.coordinates;e=T1.extend(e,i,s,i,s);break}}return e}function bk(t){switch(t.type){case"GeometryCollection":{let e,i;return t.geometries.forEach(s=>{const a=bk(s);if(a==null)return;const n=cp(a[0],void 0);if(n==null)return;const o=Math.abs(n.lat1-n.lat0)*Math.abs(n.lon1-n.lon0);(e==null||o>e)&&(e=o,i=a)}),i}case"MultiPolygon":{let e,i;return t.coordinates.forEach(s=>{const a=cp(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"Polygon":return t.coordinates;case"MultiLineString":case"LineString":case"MultiPoint":case"Point":return}}function vk(t){switch(t.type){case"GeometryCollection":{let e,i;return t.geometries.forEach(s=>{const a=vk(s);if(a==null)return;const n=w1(a);n!=null&&(e==null||n>e)&&(e=n,i=a)}),i}case"MultiLineString":{let e=0,i;return t.coordinates.forEach(s=>{const a=w1(s);a>e&&(e=a,i=s)}),i}case"LineString":return t.coordinates;case"MultiPolygon":case"Polygon":case"MultiPoint":case"Point":return}}function N1(t,e){if(t==null)return!1;switch(t.type){case"GeometryCollection":return t.geometries.some(i=>N1(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 Kh(t,e){switch(t.type){case"GeometryCollection":return{type:"GeometryCollection",geometries:t.geometries.map(i=>Kh(i,e))};case"Polygon":return{type:"Polygon",coordinates:O1(t.coordinates,e)};case"MultiPolygon":return{type:"MultiPolygon",coordinates:ebt(t.coordinates,e)};case"MultiLineString":return{type:"MultiLineString",coordinates:O1(t.coordinates,e)};case"LineString":return{type:"LineString",coordinates:P1(t.coordinates,e)};case"MultiPoint":return{type:"MultiPoint",coordinates:P1(t.coordinates,e)};case"Point":return{type:"Point",coordinates:e.convert(t.coordinates)}}}function ebt(t,e){return t.map(i=>O1(i,e))}function O1(t,e){return t.map(i=>P1(i,e))}function P1(t,e){return t.map(i=>e.convert(i))}function ibt(){return{fromFn:(i,s,a)=>a==="removed"?{scalingX:1,scalingY:1}:i.previousDatum==null?{scalingX:0,scalingY:0}:{scalingX:i.scalingX,scalingY:i.scalingY},toFn:(i,s,a)=>a==="removed"?{scalingX:0,scalingY:0}:{scalingX:1,scalingY:1}}}function qK(t,e){const i=t.contextNodeData?.nodeData[e.datumIndex];if(i!==void 0){for(const s of t.datumSelection.nodes())if(s.datum===i)return s}}var QK=(_(),w(P)),qIt=class extends QK._ModuleSupport.SeriesProperties{},nb=class extends QK._ModuleSupport.DataModelSeries{addChartEventListeners(){this.cleanup.register(this.ctx.eventsHub.on("legend:item-click",t=>{this.onLegendItemClick(t)}),this.ctx.eventsHub.on("legend:item-double-click",t=>{this.onLegendItemDoubleClick(t)}))}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}},sbt=(_(),w(P)),{Property:di,SeriesProperties:abt,makeSeriesTooltip:nbt,Label:obt}=sbt._ModuleSupport,si=class extends abt{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 obt,this.tooltip=nbt()}};y([di],si.prototype,"topology",2),y([di],si.prototype,"title",2),y([di],si.prototype,"legendItemName",2),y([di],si.prototype,"idKey",2),y([di],si.prototype,"topologyIdKey",2),y([di],si.prototype,"idName",2),y([di],si.prototype,"labelKey",2),y([di],si.prototype,"labelName",2),y([di],si.prototype,"sizeKey",2),y([di],si.prototype,"sizeName",2),y([di],si.prototype,"colorKey",2),y([di],si.prototype,"colorName",2),y([di],si.prototype,"sizeDomain",2),y([di],si.prototype,"colorRange",2),y([di],si.prototype,"maxStrokeWidth",2),y([di],si.prototype,"stroke",2),y([di],si.prototype,"strokeOpacity",2),y([di],si.prototype,"strokeWidth",2),y([di],si.prototype,"lineDash",2),y([di],si.prototype,"lineDashOffset",2),y([di],si.prototype,"itemStyler",2),y([di],si.prototype,"label",2),y([di],si.prototype,"tooltip",2);var{getMissCount:rbt,createDatumId:JK,SeriesNodePickMode:t5,valueProperty:ob,CachedTextMeasurerPool:lbt,ColorScale:cbt,LinearScale:hbt,Selection:_1,Text:ubt,Transformable:dbt}=KK._ModuleSupport,Sk=class extends nb{constructor(t){super({moduleCtx:t,categoryKey:void 0,propertyKeys:{size:["colorKey"],color:["colorKey"],label:["labelKey"]},propertyNames:{size:["sizeName"],color:["colorName"],label:["labelName"]},pickModes:[t5.EXACT_SHAPE_MATCH,t5.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new si,this._chartTopology=void 0,this.colorScale=new cbt,this.sizeScale=new hbt,this.datumSelection=_1.select(this.contentGroup,()=>this.nodeFactory()),this.labelSelection=_1.select(this.labelGroup,ubt),this.highlightDatumSelection=_1.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 Bf;return t.renderMode=2,t.lineJoin="round",t.lineCap="round",t}async processData(t){if(this.data==null)return;const{data:e,topology:i,sizeScale:s,colorScale:a}=this,{topologyIdKey:n,idKey:o,sizeKey:r,colorKey:l,labelKey:c,sizeDomain:h,colorRange:u}=this.properties,d=new Map;i?.features.forEach(v=>{const M=v.properties?.[n];M==null||!N1(v.geometry,2)||d.set(M,v)});const p=this.sizeScale.type,g=this.colorScale.type,f=this.scale?.type,{dataModel:x,processedData:m}=await this.requestDataModel(t,e,{props:[ob(o,f,{id:"idValue",includeProperty:!1}),ob(o,f,{id:"featureValue",includeProperty:!1,processor:()=>v=>d.get(v)}),...c!=null?[ob(c,"band",{id:"labelValue"})]:[],...r!=null?[ob(r,p,{id:"sizeValue"})]:[],...l!=null?[ob(l,g,{id:"colorValue"})]:[]]}),b=x.resolveColumnById(this,"featureValue",m);if(this.topologyBounds=b.reduce((v,M)=>{const D=M?.geometry;return D==null?v:zf(D,v)},void 0),r!=null){const v=x.resolveProcessedDataIndexById(this,"sizeValue"),M=m.domain.values[v]??[];s.domain=h??M}if(u!=null&&this.isColorScaleValid()){const v=x.resolveProcessedDataIndexById(this,"colorValue");a.domain=m.domain.values[v],a.range=u,a.update()}i==null&&YK.Logger.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 s=e.resolveProcessedDataIndexById(this,"colorValue"),a=i.input.count,n=rbt(this,i.defs.values[s].missing);return!(a===0||a===n)}getLabelDatum(t,e,i,s){if(e==null||i==null)return;const a=vk(i);if(a==null)return;const{idKey:n,idName:o,sizeKey:r,sizeName:l,colorKey:c,colorName:h,labelKey:u,labelName:d,label:p}=this.properties;if(u==null)return;const g=this.getLabelText(e,t,u,"label",[],p,{value:e,datum:t,idKey:n,idName:o,sizeKey:r,sizeName:l,colorKey:c,colorName:h,labelKey:u,labelName:d});if(g==null)return;const f=s.measureText(String(g)),x=yk(a);if(x==null)return;const[m,b]=x.point,{width:v,height:M}=f;return{point:{x:m,y:b,size:0},label:{width:v,height:M,text:g},anchor:void 0,placement:void 0}}createNodeData(){const{id:t,dataModel:e,processedData:i,sizeScale:s,properties:a,scale:n}=this,{idKey:o,sizeKey:r,colorKey:l,labelKey:c,label:h,legendItemName:u}=a;if(e==null||i==null)return;const d=e.resolveColumnById(this,"idValue",i),p=e.resolveColumnById(this,"featureValue",i),g=c!=null?e.resolveColumnById(this,"labelValue",i):void 0,f=r!=null?e.resolveColumnById(this,"sizeValue",i):void 0,x=l!=null?e.resolveColumnById(this,"colorValue",i):void 0,m=a.maxStrokeWidth??a.strokeWidth;s.range=[Math.min(a.strokeWidth,m),m];const b=lbt.getMeasurer({font:h}),v=new Map;i.dataSources.get(this.id)?.forEach((T,N)=>{const O=d[N],E=p[N]?.geometry??void 0,z=E!=null&&n!=null?Kh(E,n):void 0;O!=null&&z!=null&&v.set(O,z)});const M=[],D=[],L=[];(i.dataSources.get(this.id)??[]).forEach((T,N)=>{const O=d[N],E=x?.[N],z=f?.[N],B=g?.[N],F=v.get(O);F==null&&L.push(O);const V=this.getLabelDatum(T,B,F,b);V!=null&&D.push(V),M.push({series:this,itemId:o,datum:T,datumIndex:N,idValue:O,labelValue:B,colorValue:E,sizeValue:z,projectedGeometry:F,legendItemName:u})});const A=10;if(L.length>A){const T=L.length-A;L.length=A,L.push(`(+${T} more)`)}return L.length>0&&YK.Logger.warnOnce("some data items do not have matches in the provided topology",L),{itemId:t,nodeData:M,labelData:D}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t,highlightDatumSelection:e}=this;this.updateSelections(),this.contentGroup.visible=this.visible;let i=this.ctx.highlightManager?.getActiveHighlight();const{legendItemName:s}=this.properties,a=s!=null&&i?.datum==null&&s===i?.legendItemName;i!=null&&(i.series!==this&&!a||i.datum==null)&&(i=void 0);const n=this.contextNodeData?.nodeData??[];this.datumSelection=this.updateDatumSelection({nodeData:n,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=>JK(e.idValue))}getItemBaseStyle(t,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return{stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,opacity:s?.opacity??1}}getItemStyleOverrides(t,e,i,s,a,n){const{id:o,properties:r,colorScale:l,sizeScale:c}=this,{colorRange:h,itemStyler:u}=r;let d;if(!n&&i!=null&&(d??(d={}),d.stroke=this.isColorScaleValid()?l.convert(i):h?.[0]??r.stroke),s!=null&&(d??(d={}),d.strokeWidth=c.convert(s,{clamp:!0})),u!=null){const p=this.cachedDatumCallback(JK(t,n?"highlight":"node"),()=>this.callWithContext(u,{seriesId:o,datum:e,highlighted:n,...a,...d}));d??(d={}),Object.assign(d,p)}return d}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t;e.each((s,a)=>{const{datum:n,datumIndex:o,colorValue:r,sizeValue:l,projectedGeometry:c}=a;if(c==null){s.visible=!1,s.projectedGeometry=void 0;return}const h=this.getItemBaseStyle(i,a),u=this.getItemStyleOverrides(String(o),n,r,l,h,i);s.visible=!0,s.projectedGeometry=c,s.stroke=u?.stroke??h.stroke,s.strokeWidth=u?.strokeWidth??h.strokeWidth,s.strokeOpacity=u?.strokeOpacity??h.strokeOpacity,s.lineDash=u?.lineDash??h.lineDash,s.lineDashOffset=u?.lineDashOffset??h.lineDashOffset})}updatePlacedLabelData(t){this.labelSelection=this.labelSelection.update(t,e=>{e.pointerEvents=KK._ModuleSupport.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:a,fontSize:n,fontFamily:o}=this.properties.label;e.each((r,{x:l,y:c,width:h,height:u,text:d},p)=>{r.visible=!0,r.x=l+h/2,r.y=c+u/2,r.text=d,r.fill=i,r.fontStyle=s,r.fontWeight=a,r.fontSize=n,r.fontFamily=o,r.textAlign="center",r.textBaseline="middle",r.fillOpacity=this.getHighlightStyle(!1,p).opacity??1})}resetAnimation(){}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum({x:t,y:e}){let i=1/0,s;return this.datumSelection.each((a,n)=>{const o=a.distanceSquared(t,e);o<i&&(i=o,s=n)}),s!=null?{datum:s,distance:Math.sqrt(i)}:void 0}datumMidPoint(t){const{_previousDatumMidPoint:e}=this;if(e?.datum===t)return e.point;const i=t.projectedGeometry,s=i!=null?vk(i):void 0,a=s!=null?yk(s)?.point:void 0,n=a!=null?{x:a[0],y:a[1]}:void 0;return this._previousDatumMidPoint={datum:t,point:n},n}legendItemSymbol(t){const{dataModel:e,processedData:i,properties:s}=this,{strokeWidth:a,strokeOpacity:n,lineDash:o}=s;let{stroke:r}=s;if(t!=null&&this.isColorScaleValid()){const c=e.resolveColumnById(this,"colorValue",i)[t];r=this.colorScale.convert(c)}return{marker:{fill:void 0,fillOpacity:0,stroke:void 0,strokeWidth:0,strokeOpacity:0,lineDash:[0],lineDashOffset:0,enabled:!1},line:{stroke:r,strokeWidth:a,strokeOpacity:n,lineDash:o}}}getLegendData(t){const{processedData:e,dataModel:i}=this;if(e==null||i==null)return[];const{id:s,visible:a}=this,{title:n,legendItemName:o,idKey:r,idName:l,colorKey:c,colorRange:h,showInLegend:u}=this.properties;if(t==="gradient"&&c!=null&&h!=null){const d=e.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:a,seriesId:s,series:this.getFormatterContext("color"),colorRange:h,colorDomain:d}]}else return t==="category"?[{legendType:"category",id:s,itemId:s,seriesId:s,enabled:a,label:{text:o??n??l??r},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!u}]:[]}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a,ctx:{formatManager:n}}=this,{idKey:o,idName:r,colorKey:l,colorName:c,sizeKey:h,sizeName:u,labelKey:d,labelName:p,title:g,legendItemName:f,tooltip:x}=a;if(!i||!s)return;const m=s.dataSources.get(this.id)?.[t],b=i.resolveColumnById(this,"idValue",s),v=h!=null?i.resolveColumnById(this,"sizeValue",s)[t]:void 0,M=l!=null?i.resolveColumnById(this,"colorValue",s)[t]:void 0,D=[];if(this.isLabelEnabled()&&d!=null&&d!==o){const C=i.resolveColumnById(this,"labelValue",s)[t],A=n.format(this.callWithContext.bind(this),{type:"category",value:C,datum:m,seriesId:e,legendItemName:f,key:d,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});D.push({label:p,fallbackLabel:d,value:A??C})}if(v!=null&&h!=null){const C=i.getDomain(this,"sizeValue","value",s),A=n.format(this.callWithContext.bind(this),{type:"number",value:v,datum:m,seriesId:e,legendItemName:f,key:h,source:"tooltip",property:"size",domain:C,boundSeries:this.getFormatterContext("size"),fractionDigits:void 0});D.push({label:u,fallbackLabel:h,value:A??String(v)})}if(M!=null&&l!=null){const C=i.getDomain(this,"colorValue","value",s),A=n.format(this.callWithContext.bind(this),{type:"number",value:M,datum:m,seriesId:e,legendItemName:f,key:l,source:"tooltip",property:"color",domain:C,boundSeries:this.getFormatterContext("color"),fractionDigits:void 0});D.push({label:c,fallbackLabel:l,value:A??String(M)})}const L=this.getItemBaseStyle(!1);return Object.assign(L,this.getItemStyleOverrides(String(t),t,M,v,L,!1)),this.formatTooltipWithContext(x,{heading:b[t],title:g??f,symbol:this.legendItemSymbol(t),data:D},{seriesId:e,datum:m,title:g,idKey:o,idName:r,colorKey:l,colorName:c,sizeKey:h,sizeName:u,labelKey:d,labelName:p,...L})}computeFocusBounds(t){const e=qK(this,t);return e?dbt.toCanvas(this.contentGroup,e.getBBox()):void 0}};Sk.className="MapLineSeries",Sk.type="map-line";var pbt=(_(),w(P)),es=(R(),w(st)),{commonSeriesOptionsDefs:gbt,mapLineSeriesThemeableOptionsDef:fbt,without:mbt}=pbt._ModuleSupport,e5={...mbt(gbt,["highlightStyle","highlight"]),...fbt,type:(0,es.required)((0,es.constant)("map-line")),idKey:(0,es.required)(es.string),sizeKey:es.string,colorKey:es.string,labelKey:es.string,idName:es.string,sizeName:es.string,colorName:es.string,labelName:es.string,topology:es.geoJson,topologyIdKey:es.string,legendItemName:es.string,title:es.string};e5.colorRange=(0,es.undocumented)((0,es.and)((0,es.arrayOf)(es.color),(0,es.arrayLength)(1)));var ybt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-line",moduleFactory:t=>new Sk(t),themeTemplate:{...ab,series:{stroke:Nn(L1._ModuleSupport.SAFE_STROKE_FILL_OPERATION),colorRange:{$if:[{$eq:[{$mapPalette:"type"},"inbuilt"]},{$mapPalette:"divergingColors"},Nn(L1._ModuleSupport.SAFE_RANGE2_OPERATION)]},strokeWidth:1,maxStrokeWidth:3,lineDash:[0],lineDashOffset:0,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},highlight:Nn(L1._ModuleSupport.multiSeriesHighlightStyle(!1))},tooltip:{range:"exact"}}},xbt={type:"series",name:"map-line",chartType:"topology",enterprise:!0,options:e5,create:t=>new Sk(t)},QIt=(_(),w(P)),bbt=(_(),w(P)),vbt=(R(),w(st)),Sbt=(_(),w(P)),{Property:hp,SeriesProperties:Mbt,makeSeriesTooltip:Dbt}=Sbt._ModuleSupport,Yh=class extends Mbt{constructor(){super(...arguments),this.topology=void 0,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=Dbt()}};y([hp],Yh.prototype,"topology",2),y([hp],Yh.prototype,"stroke",2),y([hp],Yh.prototype,"strokeOpacity",2),y([hp],Yh.prototype,"strokeWidth",2),y([hp],Yh.prototype,"lineDash",2),y([hp],Yh.prototype,"lineDashOffset",2),y([hp],Yh.prototype,"tooltip",2);var{createDatumId:kbt,SeriesNodePickMode:Ibt,Group:Abt,Selection:Cbt,PointerEvents:Lbt}=bbt._ModuleSupport,Mk=class extends nb{constructor(t){super({moduleCtx:t,categoryKey:void 0,pickModes:[Ibt.EXACT_SHAPE_MATCH]}),this.properties=new Yh,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new Abt({name:"itemGroup"})),this.datumSelection=Cbt.select(this.itemGroup,()=>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 Bf;return t.renderMode=2,t.lineJoin="round",t.lineCap="round",t.pointerEvents=Lbt.None,t}processData(){const{topology:t}=this;this.topologyBounds=t?.features.reduce((e,i)=>{const s=i.geometry;return s==null?e:zf(s,e)},void 0),t==null&&vbt.Logger.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 s=[],a=[];return e.features.forEach((n,o)=>{const{geometry:r}=n,l=r!=null&&i!=null?Kh(r,i):void 0;l!=null&&s.push({series:this,itemId:o,datum:n,datumIndex:0,index:o,projectedGeometry:l})}),{itemId:t,nodeData:s,labelData:a}}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=>kbt(e.index))}updateDatumNodes(t){const{properties:e}=this,{datumSelection:i}=t,{stroke:s,strokeOpacity:a,lineDash:n,lineDashOffset:o}=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=s,l.strokeWidth=r,l.strokeOpacity=a,l.lineDash=n,l.lineDashOffset=o})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(t){}computeFocusBounds(t){}};Mk.className="MapLineBackgroundSeries",Mk.type="map-line-background";var wbt=(_(),w(P)),E1=(R(),w(st)),{mapLineBackgroundSeriesThemeableOptionsDef:Tbt}=wbt._ModuleSupport,Nbt={...Tbt,type:(0,E1.required)((0,E1.constant)("map-line-background")),topology:E1.geoJson},Obt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-line-background",moduleFactory:t=>new Mk(t),themeTemplate:{...ab,series:{stroke:{$path:["/1",{$mapPalette:"stroke"},{$mapPalette:"secondHierarchyColors"}]},strokeWidth:1,lineDash:[0],lineDashOffset:0}}},Pbt={type:"series",name:"map-line-background",chartType:"topology",enterprise:!0,options:Nbt,create:t=>new Mk(t)},Dk=(_(),w(P)),i5=(R(),w(st)),s5=(_(),w(P)),_bt=(R(),w(st)),Ebt=void 0,Rbt=void 0;Rbt=Ebt;var Bbt=void 0,zbt=void 0;zbt=Bbt;var Fbt=void 0,Vbt=void 0;Vbt=Fbt;var Gbt=void 0,jbt=void 0;jbt=Gbt;var Wbt=(R(),w(st));function a5(t,e,i){const s=cp(t[0],void 0);if(s==null)return;const a=(s.lon0+s.lon1)/2,n=(s.lat0+s.lat1)/2,o=Math.abs(s.lon1-s.lon0),r=Math.abs(s.lat1-s.lat0),l=Kxt(t[0]),[c,h]=l,u=-xk(t,c,h);let d;const p=(D,L)=>{const A=Math.max(L-u,0);return D-.5*A},g=(D,L,C)=>{const{distance:A,maxDistance:T}=i(t,D,L,C),N=Math.hypot(c-D,h-L),O=Math.min(Math.max(c,D-C/2),D+C/2),E=Math.min(Math.max(h,L-C/2),L+C/2),z=Math.hypot(c-O,h-E),B=p(A,N),F=p(T,z);return{distance:A,maxDistance:T,value:B,maxValue:F,x:D,y:L,stride:C}},f=(D,L,C,A)=>{const T=g(L,C,A);T.maxDistance>=0&&D.push(T)},x=Math.min(o,r)/2;let m={value:g(a,n,x),next:null};for(;m!=null;){const D=m.value,{distance:L,value:C,maxValue:A,x:T,y:N,stride:O}=D;if(m=m.next,L>0&&(d==null||C>d.value)&&(d=D),d!=null&&A-d.value<=e)continue;const E=O/2,z=[];f(z,T-E,N-E,E),f(z,T+E,N-E,E),f(z,T-E,N+E,E),f(z,T+E,N+E,E),z.sort(n5),m=(0,Wbt.insertListItemsSorted)(m,z,n5)}if(d==null)return;const{distance:b,x:v,y:M}=d;return{x:v,y:M,distance:b}}var n5=(t,e)=>e.maxValue-t.maxValue;function R1(t,e){const i=a5(t,e,(n,o,r,l)=>{const c=-xk(n,o,r),h=c+l*Math.SQRT2;return{distance:c,maxDistance:h}});if(i==null)return;const{x:s,y:a}=i;return[s,a]}function o5(t,e){let i;switch(t.type){case"GeometryCollection":return t.geometries.flatMap(s=>o5(s,e));case"MultiPoint":return t.coordinates;case"Point":return[t.coordinates];case"MultiPolygon":{const s=bk(t);i=s!=null?R1(s,e):void 0;break}case"Polygon":{const s=t.coordinates;i=s!=null?R1(s,e):void 0;break}case"MultiLineString":{const s=vk(t);i=s!=null?yk(s)?.point:void 0;break}case"LineString":{const s=t.coordinates;i=yk(s)?.point;break}}return i!=null?[i]:[]}var Hbt=(_(),w(P)),{BBox:$bt}=Hbt._ModuleSupport;function r5(t){if(!t)return;const{range:e}=t,i=e[0][0],s=e[0][1],a=e[1][0]-i,n=e[1][1]-s,o=new $bt(i,s,a,n);return{series:o,axis:o}}var Ubt=(_(),w(P)),{FillGradientDefaults:Kbt,FillPatternDefaults:Ybt,FillImageDefaults:Zbt,Property:ee,SeriesProperties:Xbt,makeSeriesTooltip:qbt,Label:Qbt}=Ubt._ModuleSupport,l5=class extends Qbt{constructor(){super(...arguments),this.placement="bottom"}};y([ee],l5.prototype,"placement",2);var ie=class extends Xbt{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.fillGradientDefaults=new Kbt,this.fillPatternDefaults=new Ybt,this.fillImageDefaults=new Zbt,this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new l5,this.tooltip=qbt()}};y([ee],ie.prototype,"topology",2),y([ee],ie.prototype,"title",2),y([ee],ie.prototype,"legendItemName",2),y([ee],ie.prototype,"idKey",2),y([ee],ie.prototype,"topologyIdKey",2),y([ee],ie.prototype,"idName",2),y([ee],ie.prototype,"latitudeKey",2),y([ee],ie.prototype,"latitudeName",2),y([ee],ie.prototype,"longitudeKey",2),y([ee],ie.prototype,"longitudeName",2),y([ee],ie.prototype,"labelKey",2),y([ee],ie.prototype,"labelName",2),y([ee],ie.prototype,"sizeKey",2),y([ee],ie.prototype,"sizeName",2),y([ee],ie.prototype,"colorKey",2),y([ee],ie.prototype,"colorName",2),y([ee],ie.prototype,"colorRange",2),y([ee],ie.prototype,"shape",2),y([ee],ie.prototype,"size",2),y([ee],ie.prototype,"maxSize",2),y([ee],ie.prototype,"sizeDomain",2),y([ee],ie.prototype,"fill",2),y([ee],ie.prototype,"fillGradientDefaults",2),y([ee],ie.prototype,"fillPatternDefaults",2),y([ee],ie.prototype,"fillImageDefaults",2),y([ee],ie.prototype,"fillOpacity",2),y([ee],ie.prototype,"stroke",2),y([ee],ie.prototype,"strokeWidth",2),y([ee],ie.prototype,"strokeOpacity",2),y([ee],ie.prototype,"lineDash",2),y([ee],ie.prototype,"lineDashOffset",2),y([ee],ie.prototype,"itemStyler",2),y([ee],ie.prototype,"label",2),y([ee],ie.prototype,"tooltip",2);var{CachedTextMeasurerPool:Jbt,fromToMotion:tvt,StateMachine:evt,getMissCount:ivt,createDatumId:c5,SeriesNodePickMode:h5,valueProperty:up,computeMarkerFocusBounds:svt,ColorScale:avt,LinearScale:nvt,Group:ovt,Selection:B1,Text:rvt,Marker:z1,applyShapeStyle:lvt,getShapeStyle:u5,LonLatBBox:cvt}=s5._ModuleSupport,kk=class extends nb{constructor(t){super({moduleCtx:t,categoryKey:void 0,propertyKeys:{size:["colorKey"],color:["colorKey"],label:["labelKey"]},propertyNames:{size:["sizeName"],color:["colorName"],label:["labelName"]},pickModes:[h5.EXACT_SHAPE_MATCH,h5.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new ie,this._chartTopology=void 0,this.colorScale=new avt,this.sizeScale=new nvt,this.markerGroup=this.contentGroup.appendChild(new ovt({name:"markerGroup"})),this.labelSelection=B1.select(this.labelGroup,rvt,!1),this.markerSelection=B1.select(this.markerGroup,z1,!1),this.highlightMarkerSelection=B1.select(this.highlightNode,z1),this.animationState=new evt("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)return;const{data:e,topology:i,sizeScale:s,colorScale:a}=this,{topologyIdKey:n,idKey:o,latitudeKey:r,longitudeKey:l,sizeKey:c,colorKey:h,labelKey:u,sizeDomain:d,colorRange:p}=this.properties,g=new Map;i?.features.forEach(A=>{const T=A.properties?.[n];T!=null&&g.set(T,A)});const f=this.sizeScale.type,x=this.colorScale.type,m=this.scale?.type,b=r!=null&&l!=null,{dataModel:v,processedData:M}=await this.requestDataModel(t,e,{props:[...o!=null?[up(o,m,{id:"idValue",includeProperty:!1}),up(o,m,{id:"featureValue",includeProperty:!1,processor:()=>A=>g.get(A)})]:[],...b?[up(r,m,{id:"latValue"}),up(l,m,{id:"lonValue"})]:[],...u?[up(u,"band",{id:"labelValue"})]:[],...c?[up(c,f,{id:"sizeValue"})]:[],...h?[up(h,x,{id:"colorValue"})]:[]]}),D=o!=null?v.resolveColumnById(this,"featureValue",M):void 0,L=b?v.resolveColumnById(this,"latValue",M):void 0,C=b?v.resolveColumnById(this,"lonValue",M):void 0;if(this.topologyBounds=M.dataSources.get(this.id)?.reduce((A,T,N)=>{const E=D?.[N]?.geometry;if(E!=null&&(A=zf(E,A)),L!=null&&C!=null){const z=C[N],B=L[N];A=cvt.extend(A,z,B,z,B)}return A},void 0),c!=null){const A=v.resolveProcessedDataIndexById(this,"sizeValue"),T=M.domain.values[A]??[];s.domain=d??T}if(p!=null&&this.isColorScaleValid()){const A=v.resolveProcessedDataIndexById(this,"colorValue");a.domain=M.domain.values[A],a.range=p,a.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 s=e.resolveProcessedDataIndexById(this,"colorValue"),a=i.input.count,n=ivt(this,i.defs.values[s].missing);return!(a===0||a===n)}getLabelDatum(t,e,i,s,a,n){if(e==null)return;const{idKey:o,idName:r,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:u,sizeKey:d,sizeName:p,colorKey:g,colorName:f,labelKey:x,labelName:m,label:b,shape:v}=this.properties;if(x==null)return;const{placement:M}=b,D=this.getLabelText(e,t,x,"label",[],b,{value:e,datum:t,idKey:o,idName:r,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:u,sizeKey:d,sizeName:p,colorKey:g,colorName:f,labelKey:x,labelName:m});if(D==null)return;const{width:L,height:C}=n.measureText(String(D)),A=z1.anchor(v);return{point:{x:i,y:s,size:a},label:{width:L,height:C,text:D},anchor:A,placement:M}}createNodeData(){const{id:t,dataModel:e,processedData:i,sizeScale:s,properties:a,scale:n}=this,{idKey:o,latitudeKey:r,longitudeKey:l,sizeKey:c,colorKey:h,labelKey:u,label:d,legendItemName:p}=a;if(e==null||i==null||n==null)return;const g=r!=null&&l!=null,f=o!=null?e.resolveColumnById(this,"idValue",i):void 0,x=o!=null?e.resolveColumnById(this,"featureValue",i):void 0,m=g?e.resolveColumnById(this,"latValue",i):void 0,b=g?e.resolveColumnById(this,"lonValue",i):void 0,v=u!=null?e.resolveColumnById(this,"labelValue",i):void 0,M=c!=null?e.resolveColumnById(this,"sizeValue",i):void 0,D=h!=null?e.resolveColumnById(this,"colorValue",i):void 0,L=a.maxSize??a.size;s.range=[Math.min(a.size,L),L];const C=Jbt.getMeasurer({font:d});let A;f!=null&&x!=null&&(A=new Map,i.dataSources.get(this.id)?.forEach((B,F)=>{const V=f[F],G=x[F]?.geometry??void 0,H=G!=null&&n!=null?Kh(G,n):void 0;V!=null&&H!=null&&A.set(V,H)}));const T=[],N=[],O=[];(i.dataSources.get(this.id)??[]).forEach((B,F)=>{const V=f?.[F],G=b?.[F],H=m?.[F],$=D?.[F],W=M?.[F],j=v?.[F],U=W!=null?s.convert(W,{clamp:!0}):a.size,Z=V!=null?A?.get(V):void 0;if(V!=null&&Kh==null&&O.push(V),G!=null&&H!=null){const[X,q]=n.convert([G,H]),tt=this.getLabelDatum(B,j,X,q,U,C);tt&&N.push(tt),T.push({series:this,itemId:r,datum:B,datumIndex:F,index:-1,idValue:V,lonValue:G,latValue:H,labelValue:j,sizeValue:W,colorValue:$,point:{x:X,y:q,size:U},midPoint:{x:X,y:q},legendItemName:p})}else Z!=null&&o5(Z,1).forEach(([X,q],tt)=>{const J=this.getLabelDatum(B,j,X,q,U,C);J&&N.push(J),T.push({series:this,itemId:r,datum:B,datumIndex:F,index:tt,idValue:V,lonValue:G,latValue:H,labelValue:j,sizeValue:W,colorValue:$,point:{x:X,y:q,size:U},midPoint:{x:X,y:q},legendItemName:p})})});const z=10;if(O.length>z){const B=O.length-z;O.length=z,O.push(`(+${B} more)`)}return O.length>0&&_bt.Logger.warnOnce("some data items do not have matches in the provided topology",O),{itemId:t,nodeData:T,labelData:N}}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:s,highlightMarkerSelection:a}=this;this.updateSelections(),this.contentGroup.visible=this.visible;let n=this.ctx.highlightManager?.getActiveHighlight();const{legendItemName:o}=this.properties,r=o!=null&&n?.datum==null&&o===n?.legendItemName;n!=null&&(n.series!==this&&!r||n.datum==null)&&(n=void 0);const l=this.contextNodeData?.nodeData??[];this.markerSelection=this.updateMarkerSelection({markerData:l,markerSelection:s}),this.updateMarkerNodes({markerSelection:s,isHighlight:!1,highlightedDatum:n}),this.highlightMarkerSelection=this.updateMarkerSelection({markerData:n!=null?[n]:[],markerSelection:a}),this.updateMarkerNodes({markerSelection:a,isHighlight:!0,highlightedDatum:n}),(i||e)&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePlacedLabelData(t){this.labelSelection=this.labelSelection.update(t,e=>{e.pointerEvents=s5._ModuleSupport.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:a,fontSize:n,fontFamily:o}=this.properties.label;e.each((r,{x:l,y:c,width:h,height:u,text:d},p)=>{r.visible=!0,r.x=l+h/2,r.y=c+u/2,r.text=d,r.fill=i,r.fontStyle=s,r.fontWeight=a,r.fontSize=n,r.fontFamily=o,r.textAlign="center",r.textBaseline="middle",r.fillOpacity=this.getHighlightStyle(!1,p).opacity??1})}updateMarkerSelection(t){const{markerData:e,markerSelection:i}=t;return i.update(e,void 0,s=>c5([s.index,s.idValue,s.lonValue,s.latValue]))}getMarkerItemBaseStyle(t,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return u5({shape:i.shape,size:i.size,fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,opacity:s.opacity??1},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getMarkerItemStyleOverrides(t,e,i,s,a,n){const{id:o,properties:r,colorScale:l,sizeScale:c}=this,{colorRange:h,itemStyler:u}=r;let d;if(d??(d={}),!n&&i!=null&&(d.fill=this.isColorScaleValid()?l.convert(i):h?.[0]??r.fill),s!=null&&(d.size=c.convert(s,{clamp:!0})),u!=null){const p=this.cachedDatumCallback(c5(t,n?"highlight":"node"),()=>this.callWithContext(u,{seriesId:o,datum:e,highlighted:n,...a,...d}));d??(d={}),Object.assign(d,p)}return d}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i,highlightedDatum:s}=t,a=r5(this.scale);e.each((n,o)=>{const{datumIndex:r,datum:l,point:c,colorValue:h,sizeValue:u}=o,d=this.getMarkerItemBaseStyle(i,o),p=this.getMarkerItemStyleOverrides(String(r),l,h,u,d,i);n.shape=p?.shape??d.shape,n.size=p?.size??d.size,lvt(n,d,p,a),n.x=c.x,n.y=c.y,n.scalingCenterX=c.x,n.scalingCenterY=c.y,n.zIndex=!i&&s!=null&&l===s.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=ibt();tvt(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 s=1/0,a;return this.contextNodeData?.nodeData.forEach(n=>{const{x:o,y:r,size:l}=n.point,c=Math.max(Math.abs(o-e)-l,0),h=Math.max(Math.abs(r-i)-l,0),u=c*c+h*h;u<s&&(s=u,a=n)}),a!=null?{datum:a,distance:Math.sqrt(s)}:void 0}legendItemSymbol(t){const{dataModel:e,processedData:i,properties:s}=this,{shape:a,fillOpacity:n,stroke:o,strokeWidth:r,strokeOpacity:l,lineDash:c,lineDashOffset:h}=s;let{fill:u}=s;if(t!=null&&this.isColorScaleValid()){const p=e.resolveColumnById(this,"colorValue",i)[t];u=this.colorScale.convert(p)}return{marker:u5({shape:a,fill:u,fillOpacity:n,stroke:o,strokeWidth:r,strokeOpacity:l,lineDash:c,lineDashOffset:h},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}}getLegendData(t){const{processedData:e,dataModel:i}=this;if(e==null||i==null)return[];const{id:s,visible:a}=this,{title:n,legendItemName:o,idName:r,idKey:l,colorKey:c,colorRange:h,showInLegend:u}=this.properties;if(t==="gradient"&&c!=null&&h!=null){const d=e.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:a,seriesId:s,series:this.getFormatterContext("color"),colorRange:h,colorDomain:d}]}else return t==="category"?[{legendType:"category",id:s,itemId:s,seriesId:s,enabled:a,label:{text:o??n??r??l??s},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!u}]:[]}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a,ctx:{formatManager:n}}=this,{idKey:o,idName:r,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:u,colorKey:d,colorName:p,sizeKey:g,sizeName:f,labelKey:x,labelName:m,title:b,legendItemName:v,tooltip:M}=a;if(!i||!s)return;const D=s.dataSources.get(this.id)?.[t],L=g!=null?i.resolveColumnById(this,"sizeValue",s)[t]:void 0,C=d!=null?i.resolveColumnById(this,"colorValue",s)[t]:void 0,A=[];if(this.isLabelEnabled()&&x!=null&&x!==o){const O=i.resolveColumnById(this,"labelValue",s)[t],E=n.format(this.callWithContext.bind(this),{type:"category",value:O,datum:D,seriesId:e,legendItemName:v,key:x,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});A.push({label:m,fallbackLabel:x,value:E??O})}if(g!=null&&L!=null){const O=i.getDomain(this,"sizeValue","value",s),E=n.format(this.callWithContext.bind(this),{type:"number",value:L,datum:D,seriesId:e,legendItemName:v,key:g,source:"tooltip",property:"size",domain:O,boundSeries:this.getFormatterContext("size"),fractionDigits:void 0});A.push({label:f,fallbackLabel:g,value:E??String(L)})}if(d!=null&&C!=null){const O=i.getDomain(this,"colorValue","value",s),E=n.format(this.callWithContext.bind(this),{type:"number",value:C,datum:D,seriesId:e,legendItemName:v,key:d,source:"tooltip",property:"color",domain:O,boundSeries:this.getFormatterContext("color"),fractionDigits:void 0});A.push({label:p,fallbackLabel:d,value:E??String(C)})}let T;if(o!=null)T=i.resolveColumnById(this,"idValue",s)[t];else if(l!=null&&h!=null){const O=i.resolveColumnById(this,"latValue",s)[t],E=i.resolveColumnById(this,"lonValue",s)[t];T=`${Math.abs(O).toFixed(4)}\xB0 ${O>=0?"N":"S"}, ${Math.abs(E).toFixed(4)}\xB0 ${E>=0?"W":"E"}`}const N=this.getMarkerItemBaseStyle(!1);return Object.assign(N,this.getMarkerItemStyleOverrides(String(t),t,C,L,N,!1)),this.formatTooltipWithContext(M,{heading:T,title:b??v,symbol:this.legendItemSymbol(t),data:A},{seriesId:e,datum:D,title:b,idKey:o,idName:r,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:u,colorKey:d,colorName:p,sizeKey:g,sizeName:f,labelKey:x,labelName:m,...N})}getFormattedMarkerStyle(t){const{datumIndex:e,colorValue:i,sizeValue:s}=t,a=this.getMarkerItemBaseStyle(!1);return Object.assign(a,this.getMarkerItemStyleOverrides(String(e),e,i,s,a,!1)),{size:a.size}}computeFocusBounds(t){return svt(this,t)}};kk.className="MapMarkerSeries",kk.type="map-marker";var hvt=(_(),w(P)),Ps=(R(),w(st)),{commonSeriesOptionsDefs:uvt,mapMarkerSeriesThemeableOptionsDef:dvt,without:pvt}=hvt._ModuleSupport,gvt={...pvt(uvt,["highlightStyle","highlight"]),...dvt,type:(0,Ps.required)((0,Ps.constant)("map-marker")),idKey:Ps.string,latitudeKey:Ps.string,longitudeKey:Ps.string,sizeKey:Ps.string,colorKey:Ps.string,labelKey:Ps.string,idName:Ps.string,latitudeName:Ps.string,longitudeName:Ps.string,sizeName:Ps.string,colorName:Ps.string,labelName:Ps.string,topology:Ps.geoJson,topologyIdKey:Ps.string,legendItemName:Ps.string,title:Ps.string},fvt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-marker",moduleFactory:t=>new kk(t),themeTemplate:{...ab,series:{shape:"circle",maxSize:30,fill:{$mapPalette:"fill"},stroke:{$mapPalette:"stroke"},colorRange:{$if:[{$eq:[{$mapPalette:"type"},"inbuilt"]},{$mapPalette:"divergingColors"},Nn(Dk._ModuleSupport.SAFE_RANGE2_OPERATION)]},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$mapPalette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Nn(Dk._ModuleSupport.FILL_PATTERN_DEFAULTS),fillImageDefaults:Nn(Dk._ModuleSupport.FILL_IMAGE_DEFAULTS),fillOpacity:.5,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},highlight:Nn(Dk._ModuleSupport.multiSeriesHighlightStyle())},tooltip:{range:"exact"}}},mvt={type:"series",name:"map-marker",chartType:"topology",enterprise:!0,options:gvt,create:t=>new kk(t),validate(t,e,i){const s=(0,i5.validate)(t,e,i),{cleared:a,invalid:n}=s;if(a?.idKey==null&&(a?.latitudeKey==null||a?.longitudeKey==null)){const o=l=>i?`${i}.${l}`:l,r=`Either \`${o("idKey")}\` or both \`${o("latitudeKey")}\` and \`${o("longitudeKey")}\` are required.`;n.push(new i5.ValidationError("required",r,null,i))}return s}},Ik=(_(),w(P)),d5=(_(),w(P)),p5=(R(),w(st));function yvt(t,{aspectRatio:e,precision:i}){const s=a5(t,i,(l,c,h,u)=>{const d=bvt(l,c,h,e),p=d+2*u*e,g=d*Math.SQRT2,f=p*Math.SQRT2;return{distance:g,maxDistance:f}});if(s==null)return;const{x:a,y:n,distance:o}=s,r=o/Math.SQRT2;return{x:a,y:n,maxWidth:r}}function xvt(t,e,i,s,a){const[n,o]=t,[r,l]=e,c=1/a,h=r-n,u=l-o,[d,p]=o<=l?t:e,[g,f]=n<=r?t:e,[x,m]=o<=l?e:t,[b,v]=n<=r?e:t;let M=1/0;if(h!==0){const N=u/h;for(let O=0;O<=1;O+=1){const E=O===0?c:-c,z=(N*n-o-E*i+s)/(N-E);if(z>=g&&z<=b){const B=Math.abs(i-z)*2;M=Math.min(M,B)}}}else for(let N=0;N<=1;N+=1){const E=(N===0?c:-c)*(n-i)+s;if(E>=p&&E<=m){const B=Math.abs(s-E)*2*a;M=Math.min(M,B)}}const D=a,L=Math.abs((d-i)/(p-s)),C=Math.abs((x-i)/(m-s));if(m<s&&C<D){const O=Math.abs(s-m)*2*a;M=Math.min(M,O)}else if(p>s&&L<D){const O=Math.abs(s-p)*2*a;M=Math.min(M,O)}const A=Math.abs((f-s)/(g-i)),T=Math.abs((v-s)/(b-i));if(b<i&&T<c){const N=Math.abs(i-b)*2;M=Math.min(M,N)}else if(g>i&&A<c){const N=Math.abs(i-g)*2;M=Math.min(M,N)}return M}function bvt(t,e,i,s){let a=!1,n=1/0;for(const o of t){let r=o[o.length-1],[l,c]=r;for(const h of o){const[u,d]=h;d>i!=c>i&&e<(l-u)*(i-d)/(c-d)+u&&(a=!a);const p=xvt(r,h,e,i,s);n=Math.min(n,p),r=h,l=u,c=d}}return(a?1:-1)*n}function Ak(t,e,i){i>=e&&(t.maxX=Math.min(t.maxX,i-e)),i<=e&&(t.minX=Math.max(t.minX,i-e))}function vvt(t,e,i,s,a,n){const o=a-n/2,r=a+n/2,[l,c]=e,[h,u]=i,d=h-l,p=u-c,[g,f]=l<=h?e:i,[x,m]=l<=h?i:e;if(d!==0){const b=p/d;for(let v=0;v<=1;v+=1){const D=((v===0?o:r)-c)/b+l;D>=g&&D<=x&&Ak(t,s,D)}}else Math.max(o,Math.min(c,u))<=Math.min(r,Math.max(c,u))&&Ak(t,s,l);return x<s&&m>=o&&m<=r?Ak(t,s,x):g>s&&f>=o&&f<=r&&Ak(t,s,g),t}function Svt(t,e,i,s){const a={minX:-1/0,maxX:1/0};for(const r of t){let l=r[r.length-1];for(const c of r)vvt(a,l,c,e,i,s),l=c}const{minX:n,maxX:o}=a;return Number.isFinite(n)&&Number.isFinite(o)?{x:e+(n+o)/2,width:o-n}:{x:e,width:0}}var Mvt=(_(),w(P)),{Property:We,SeriesProperties:Dvt,makeSeriesTooltip:kvt,FillGradientDefaults:Ivt,FillPatternDefaults:Avt,FillImageDefaults:Cvt}=Mvt._ModuleSupport,Be=class extends Dvt{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.fillGradientDefaults=new Ivt,this.fillPatternDefaults=new Avt,this.fillImageDefaults=new Cvt,this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.padding=0,this.label=new Hx,this.tooltip=kvt()}};y([We],Be.prototype,"topology",2),y([We],Be.prototype,"title",2),y([We],Be.prototype,"legendItemName",2),y([We],Be.prototype,"idKey",2),y([We],Be.prototype,"idName",2),y([We],Be.prototype,"topologyIdKey",2),y([We],Be.prototype,"labelKey",2),y([We],Be.prototype,"labelName",2),y([We],Be.prototype,"colorKey",2),y([We],Be.prototype,"colorName",2),y([We],Be.prototype,"colorRange",2),y([We],Be.prototype,"fill",2),y([We],Be.prototype,"fillGradientDefaults",2),y([We],Be.prototype,"fillPatternDefaults",2),y([We],Be.prototype,"fillImageDefaults",2),y([We],Be.prototype,"fillOpacity",2),y([We],Be.prototype,"stroke",2),y([We],Be.prototype,"strokeOpacity",2),y([We],Be.prototype,"strokeWidth",2),y([We],Be.prototype,"lineDash",2),y([We],Be.prototype,"lineDashOffset",2),y([We],Be.prototype,"padding",2),y([We],Be.prototype,"itemStyler",2),y([We],Be.prototype,"label",2),y([We],Be.prototype,"tooltip",2);var{getMissCount:Lvt,createDatumId:g5,SeriesNodePickMode:f5,valueProperty:Ck,CachedTextMeasurerPool:wvt,TextUtils:m5,ColorScale:Tvt,Group:y5,Selection:F1,Text:Nvt,PointerEvents:Ovt,applyShapeStyle:Pvt,getShapeStyle:V1}=d5._ModuleSupport,x5=d5._ModuleSupport.MercatorScale.fixedScale(),Lk=class extends nb{constructor(t){super({moduleCtx:t,categoryKey:void 0,propertyKeys:{color:["colorKey"],label:["labelKey"]},propertyNames:{color:["colorName"],label:["labelName"]},pickModes:[f5.EXACT_SHAPE_MATCH,f5.NEAREST_NODE]}),this.properties=new Be,this._chartTopology=void 0,this.colorScale=new Tvt,this.itemGroup=this.contentGroup.appendChild(new y5({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new y5({name:"itemLabelGroup"})),this.datumSelection=F1.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=F1.select(this.itemLabelGroup,Nvt),this.highlightDatumSelection=F1.select(this.highlightNode,()=>this.nodeFactory()),this.previousLabelLayouts=void 0,this._previousDatumMidPoint=void 0,this.itemLabelGroup.pointerEvents=Ovt.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 Bf;return t.renderMode=1,t.lineJoin="round",t}async processData(t){if(this.data==null)return;const{data:e,topology:i,colorScale:s}=this,{topologyIdKey:a,idKey:n,colorKey:o,labelKey:r,colorRange:l}=this.properties,c=new Map;i?.features.forEach(f=>{const x=f.properties?.[a];x==null||!N1(f.geometry,1)||c.set(x,f)});const h=this.colorScale.type,u=this.scale?.type,{dataModel:d,processedData:p}=await this.requestDataModel(t,e,{props:[Ck(n,u,{id:"idValue",includeProperty:!1}),Ck(n,u,{id:"featureValue",includeProperty:!1,processor:()=>f=>c.get(f)}),...r?[Ck(r,"band",{id:"labelValue"})]:[],...o?[Ck(o,h,{id:"colorValue"})]:[]]}),g=d.resolveColumnById(this,"featureValue",p);if(this.topologyBounds=g.reduce((f,x)=>{const m=x?.geometry;return m==null?f:zf(m,f)},void 0),l!=null&&this.isColorScaleValid()){const f=d.resolveProcessedDataIndexById(this,"colorValue");s.domain=p.domain.values[f],s.range=l,s.update()}i==null&&p5.Logger.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 s=e.resolveProcessedDataIndexById(this,"colorValue"),a=i.input.count,n=Lvt(this,i.defs.values[s].missing);return!(a===0||a===n)}getLabelLayout(t,e,i,s,a){if(e==null||s==null)return;const{idKey:n,idName:o,colorKey:r,colorName:l,labelKey:c,labelName:h,padding:u,label:d}=this.properties;if(c==null)return;const p=this.getLabelText(e,t,c,"label",[],d,{value:e,datum:t,idKey:n,idName:o,colorKey:r,colorName:l,labelKey:c,labelName:h});if(p==null)return;const g=i.measureText(String(p)),f=p.split(`
`).length,x=(g.width+2*u)/(f*m5.getLineHeight(d.fontSize)+2*u);if(a?.geometry===s&&a?.labelText===p&&a?.aspectRatio===x)return a;const m=Kh(s,x5),b=bk(m);if(b==null)return;const v=yvt(b,{aspectRatio:x,precision:.001});if(v==null)return;const{x:M,y:D,maxWidth:L}=v;return{geometry:s,labelText:p,aspectRatio:x,x:M,y:D,maxWidth:L,fixedPolygon:b}}getLabelDatum(t,e){const{scale:i}=this;if(i==null)return;const{padding:s,label:a}=this.properties,{labelText:n,aspectRatio:o,x:r,y:l,maxWidth:c,fixedPolygon:h}=t,u={width:Math.ceil(c*e),height:Math.ceil(c*e/o),meta:r},d=jx(n,a,{padding:s},(M,D)=>{if(!D)return u;const L=Svt(h,r,l,M/e);return{width:L.width*e,height:M,meta:L.x}});if(d==null)return;const[{text:p,fontSize:g,lineHeight:f,width:x},m]=d;if(p===m5.EllipsisChar)return;const b=x<u.width?r:m,v=this.scale.convert(x5.invert([b,l]));return{x:v[0],y:v[1],text:p,fontSize:g,lineHeight:f}}createNodeData(){const{id:t,dataModel:e,processedData:i,properties:s,scale:a,previousLabelLayouts:n}=this,{idKey:o,colorKey:r,labelKey:l,label:c,legendItemName:h}=s;if(e==null||i==null)return;const u=a!=null?(a.range[1][0]-a.range[0][0])/a.bounds.width:NaN,d=e.resolveColumnById(this,"idValue",i),p=e.resolveColumnById(this,"featureValue",i),g=l!=null?e.resolveColumnById(this,"labelValue",i):void 0,f=r!=null?e.resolveColumnById(this,"colorValue",i):void 0,x=wvt.getMeasurer({font:c}),m=new Map;this.previousLabelLayouts=m;const b=[],v=[],M=[];(i.dataSources.get(this.id)??[]).forEach((C,A)=>{const T=d[A],N=f?.[A],O=g?.[A],E=p[A]?.geometry??void 0;E==null&&M.push(T);const z=this.getLabelLayout(C,O,x,E,n?.get(T));z!=null&&m.set(T,z);const B=z!=null&&a!=null?this.getLabelDatum(z,u):void 0;B!=null&&v.push(B);const F=E!=null&&a!=null?Kh(E,a):void 0;b.push({series:this,itemId:o,datum:C,datumIndex:A,idValue:T,colorValue:N,labelValue:O,projectedGeometry:F,legendItemName:h})});const L=10;if(M.length>L){const C=M.length-L;M.length=L,M.push(`(+${C} more)`)}return M.length>0&&p5.Logger.warnOnce("some data items do not have matches in the provided topology",M),{itemId:t,nodeData:b,labelData:v}}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;let s=this.ctx.highlightManager?.getActiveHighlight();const{legendItemName:a}=this.properties,n=a!=null&&s?.datum==null&&a===s?.legendItemName;s!=null&&(s.series!==this&&!n||s.datum==null)&&(s=void 0);const o=this.contextNodeData?.nodeData??[],r=this.contextNodeData?.labelData??[];this.datumSelection=this.updateDatumSelection({nodeData:o,datumSelection:t}),this.updateDatumNodes({datumSelection:t,isHighlight:!1}),this.labelSelection=this.updateLabelSelection({labelData:r,labelSelection:e}),this.updateLabelNodes({labelSelection:e}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:s!=null?[s]:[],datumSelection:i}),this.updateDatumNodes({datumSelection:i,isHighlight:!0})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>g5(e.idValue))}getItemBaseStyle(t,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return V1({fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,opacity:s?.opacity??1},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getItemStyleOverrides(t,e,i,s,a){const{id:n,properties:o,colorScale:r}=this,{colorRange:l,itemStyler:c}=o;let h;if(!a&&i!=null&&(h??(h={}),h.fill=this.isColorScaleValid()?r.convert(i):l?.[0]??o.fill),c!=null){const u=this.cachedDatumCallback(g5(t,a?"highlight":"node"),()=>this.callWithContext(c,{seriesId:n,datum:e,highlighted:a,...s,...h}));h??(h={}),Object.assign(h,u)}return V1(h,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,s=r5(this.scale);e.each((a,n)=>{const{datum:o,datumIndex:r,colorValue:l,projectedGeometry:c}=n;if(c==null){a.visible=!1,a.projectedGeometry=void 0;return}const h=this.getItemBaseStyle(i,n),u=this.getItemStyleOverrides(String(r),o,l,h,i);a.visible=!0,a.projectedGeometry=c,Pvt(a,h,u,s)})}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:a,fontFamily:n}=this.properties.label;e.each((o,{x:r,y:l,text:c,fontSize:h,lineHeight:u},d)=>{o.visible=!0,o.x=r,o.y=l,o.text=c,o.fill=i,o.fontStyle=s,o.fontWeight=a,o.fontSize=h,o.lineHeight=u,o.fontFamily=n,o.textAlign="center",o.textBaseline="middle",o.fillOpacity=this.getHighlightStyle(!1,d).opacity??1})}resetAnimation(){}pickNodeClosestDatum({x:t,y:e}){let i=1/0,s;return this.datumSelection.each((a,n)=>{const o=a.distanceSquared(t,e);o<i&&(i=o,s=n)}),s!=null?{datum:s,distance:Math.sqrt(i)}:void 0}datumMidPoint(t){const{_previousDatumMidPoint:e}=this;if(e?.datum===t)return e.point;const i=t.projectedGeometry,s=i!=null?bk(i):void 0,a=s!=null?R1(s,2):void 0,n=a!=null?{x:a[0],y:a[1]}:void 0;return this._previousDatumMidPoint={datum:t,point:n},n}legendItemSymbol(t){const{dataModel:e,processedData:i,properties:s}=this,{fillOpacity:a,stroke:n,strokeWidth:o,strokeOpacity:r,lineDash:l,lineDashOffset:c}=s;let{fill:h}=s;if(t!=null&&this.isColorScaleValid()){const d=e.resolveColumnById(this,"colorValue",i)[t];h=this.colorScale.convert(d)}return{marker:V1({fill:h,fillOpacity:a,stroke:n,strokeWidth:o,strokeOpacity:r,lineDash:l,lineDashOffset:c},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}}getLegendData(t){const{processedData:e,dataModel:i}=this;if(e==null||i==null)return[];const{id:s,visible:a}=this,{title:n,legendItemName:o,idKey:r,idName:l,colorKey:c,colorRange:h,showInLegend:u}=this.properties;if(t==="gradient"&&c!=null&&h!=null){const d=e.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:a,seriesId:s,series:this.getFormatterContext("color"),colorRange:h,colorDomain:d}]}else return t==="category"?[{legendType:"category",id:s,itemId:s,seriesId:s,enabled:a,label:{text:o??n??l??r},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!u}]:[]}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:a,ctx:{formatManager:n}}=this,{idKey:o,idName:r,colorKey:l,colorName:c,labelKey:h,labelName:u,legendItemName:d,title:p,tooltip:g}=a;if(!i||!s)return;const f=s.dataSources.get(this.id)?.[t],x=i.resolveColumnById(this,"idValue",s)[t],m=l!=null?i.resolveColumnById(this,"colorValue",s)[t]:void 0,b=[];if(this.isLabelEnabled()&&h!=null&&h!==o){const M=i.resolveColumnById(this,"labelValue",s)[t],D=n.format(this.callWithContext.bind(this),{type:"category",value:M,datum:f,seriesId:e,legendItemName:d,key:h,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});b.push({label:u,fallbackLabel:h,value:D??M})}if(m!=null){const M=i.getDomain(this,"colorValue","value",s),D=n.format(this.callWithContext.bind(this),{type:"number",value:m,datum:f,seriesId:e,legendItemName:d,key:l,source:"tooltip",property:"color",domain:M,boundSeries:this.getFormatterContext("color"),fractionDigits:void 0});b.push({label:c,fallbackLabel:l,value:D??String(m)})}const v=this.getItemBaseStyle(!1);return Object.assign(v,this.getItemStyleOverrides(String(t),t,m,v,!1)),this.formatTooltipWithContext(g,{heading:x,title:p??d,symbol:this.legendItemSymbol(t),data:b},{seriesId:e,datum:f,title:p,idKey:o,idName:r,colorKey:l,colorName:c,labelKey:h,labelName:u,...v})}computeFocusBounds(t){return qK(this,t)}};Lk.className="MapShapeSeries",Lk.type="map-shape";var _vt=(_(),w(P)),On=(R(),w(st)),{commonSeriesOptionsDefs:Evt,mapShapeSeriesThemeableOptionsDef:Rvt,without:Bvt}=_vt._ModuleSupport,zvt={...Bvt(Evt,["highlightStyle","highlight"]),...Rvt,type:(0,On.required)((0,On.constant)("map-shape")),idKey:(0,On.required)(On.string),colorKey:On.string,labelKey:On.string,idName:On.string,colorName:On.string,labelName:On.string,topology:On.geoJson,topologyIdKey:On.string,legendItemName:On.string,title:On.string},Fvt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-shape",moduleFactory:t=>new Lk(t),themeTemplate:{...ab,series:{fill:{$mapPalette:"fill"},stroke:{$ref:"chartBackgroundColor"},colorRange:{$if:[{$eq:[{$mapPalette:"type"},"inbuilt"]},{$mapPalette:"divergingColors"},Nn(Ik._ModuleSupport.SAFE_RANGE2_OPERATION)]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$mapPalette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Nn(Ik._ModuleSupport.FILL_PATTERN_DEFAULTS),fillImageDefaults:Nn(Ik._ModuleSupport.FILL_IMAGE_DEFAULTS),fillOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,padding:2,label:{color:{$ref:"chartBackgroundColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:"bold",overflowStrategy:"hide"},highlight:Nn(Ik._ModuleSupport.multiSeriesHighlightStyle())},tooltip:{range:"exact"}}},Vvt={type:"series",name:"map-shape",chartType:"topology",enterprise:!0,options:zvt,create:t=>new Lk(t)},b5=(_(),w(P)),Gvt=(_(),w(P)),jvt=(R(),w(st)),Wvt=(_(),w(P)),{FillGradientDefaults:Hvt,FillPatternDefaults:$vt,FillImageDefaults:Uvt,Property:vo,SeriesProperties:Kvt,makeSeriesTooltip:Yvt}=Wvt._ModuleSupport,Pn=class extends Kvt{constructor(){super(...arguments),this.topology=void 0,this.fill="black",this.fillGradientDefaults=new Hvt,this.fillPatternDefaults=new $vt,this.fillImageDefaults=new Uvt,this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=Yvt()}};y([vo],Pn.prototype,"topology",2),y([vo],Pn.prototype,"fill",2),y([vo],Pn.prototype,"fillGradientDefaults",2),y([vo],Pn.prototype,"fillPatternDefaults",2),y([vo],Pn.prototype,"fillImageDefaults",2),y([vo],Pn.prototype,"fillOpacity",2),y([vo],Pn.prototype,"stroke",2),y([vo],Pn.prototype,"strokeOpacity",2),y([vo],Pn.prototype,"strokeWidth",2),y([vo],Pn.prototype,"lineDash",2),y([vo],Pn.prototype,"lineDashOffset",2),y([vo],Pn.prototype,"tooltip",2);var{createDatumId:Zvt,SeriesNodePickMode:Xvt,Selection:qvt,Group:Qvt,PointerEvents:Jvt,getShapeStyle:tSt}=Gvt._ModuleSupport,wk=class extends nb{constructor(t){super({moduleCtx:t,categoryKey:void 0,pickModes:[Xvt.EXACT_SHAPE_MATCH]}),this.properties=new Pn,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new Qvt({name:"itemGroup"})),this.datumSelection=qvt.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 Bf;return t.renderMode=1,t.lineJoin="round",t.pointerEvents=Jvt.None,t}processData(){const{topology:t}=this;this.topologyBounds=t?.features.reduce((e,i)=>{const s=i.geometry;return s==null?e:zf(s,e)},void 0),t==null&&jvt.Logger.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 s=[],a=[];return e.features.forEach((n,o)=>{const{geometry:r}=n,l=r!=null&&i!=null?Kh(r,i):void 0;l!=null&&s.push({series:this,itemId:o,datum:n,datumIndex:0,index:o,projectedGeometry:l})}),{itemId:t,nodeData:s,labelData:a}}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=>Zvt(e.index))}updateDatumNodes(t){const{properties:e}=this,{datumSelection:i}=t,{fill:s,fillOpacity:a,stroke:n,strokeOpacity:o,lineDash:r,lineDashOffset:l}=e,c=this.getStrokeWidth(e.strokeWidth);i.each((h,u)=>{const{projectedGeometry:d}=u;if(d==null){h.visible=!1,h.projectedGeometry=void 0;return}h.visible=!0,h.projectedGeometry=d;const p=tSt({fill:s,fillOpacity:a,stroke:n,strokeWidth:c,strokeOpacity:o,lineDash:r,lineDashOffset:l},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults);h.setProperties(p)})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(t){}pickFocus(){}computeFocusBounds(t){}};wk.className="MapShapeBackgroundSeries",wk.type="map-shape-background";var eSt=(_(),w(P)),G1=(R(),w(st)),{commonSeriesOptionsDefs:iSt,mapShapeBackgroundSeriesThemeableOptionsDef:sSt}=eSt._ModuleSupport,aSt={...sSt,...iSt,type:(0,G1.required)((0,G1.constant)("map-shape-background")),topology:G1.geoJson},nSt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-shape-background",moduleFactory:t=>new wk(t),themeTemplate:{...ab,series:{fill:{$path:["/1",{$mapPalette:"fill"},{$mapPalette:"hierarchyColors"}]},stroke:{$ref:"chartBackgroundColor"},strokeWidth:1,fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:[{$mix:[{$path:["/1",{$mapPalette:"fill"},{$mapPalette:"hierarchyColors"}]},"black",.15]},{$mix:[{$path:["/1",{$mapPalette:"fill"},{$mapPalette:"hierarchyColors"}]},"white",.15]}],rotation:0,reverse:!1},fillPatternDefaults:{...Nn(b5._ModuleSupport.FILL_PATTERN_DEFAULTS),fill:{$path:["/1",{$mapPalette:"fill"},{$mapPalette:"hierarchyColors"}]},stroke:{$path:["/1",{$mapPalette:"fill"},{$mapPalette:"hierarchyColors"}]}},fillImageDefaults:Nn(b5._ModuleSupport.FILL_IMAGE_DEFAULTS)}}},oSt={type:"series",name:"map-shape-background",chartType:"topology",enterprise:!0,options:aSt,create:t=>new wk(t)},rSt=(_(),w(P)),lSt=(_(),w(P)),Tk=(_(),w(P)),cSt=(R(),w(st)),{DEFAULT_POLAR_DIRECTION_KEYS:hSt,DEFAULT_POLAR_DIRECTION_NAMES:uSt,ChartAxisDirection:nl,PolarAxis:dSt,diff:pSt,fixNumericExtent:gSt,groupAccumulativeValueProperty:v5,keyProperty:fSt,normaliseGroupTo:mSt,resetLabelFn:ySt,seriesLabelFadeInAnimation:xSt,seriesLabelFadeOutAnimation:bSt,valueProperty:vSt,animationValidation:SSt,createDatumId:S5,SeriesNodePickMode:M5,normalizeAngle360:D5,CategoryScale:MSt,motion:k5,applyShapeStyle:DSt,isGradientFill:kSt,getShapeStyle:j1}=Tk._ModuleSupport,ISt=class extends Tk._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey}},I5=class extends Tk._ModuleSupport.PolarSeries{constructor(t,{animationResetFns:e}){super({moduleCtx:t,categoryKey:"angleValue",propertyKeys:hSt,propertyNames:uSt,canHaveAxes:!0,pickModes:[M5.NEAREST_NODE,M5.EXACT_SHAPE_MATCH],animationResetFns:{...e,label:ySt}}),this.NodeEvent=ISt,this.groupScale=new MSt,this.circleCache={r:0,cx:0,cy:0}}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===nl.Angle)return e.getDomain(this,"angleValue","key",i);{const s=e.getDomain(this,"radiusValue-end","value",i),a=Number.isFinite(s[1]-s[0])?[s[0]>0?0:s[0],s[1]<0?0:s[1]]:[];return gSt(a)}}async processData(t){const{angleKey:e,radiusKey:i,normalizedTo:s}=this.properties,a=!this.ctx.animationManager.isSkipped(),n=this.getStackId(),o=`${n}-trailing`,r=[];(0,cSt.isDefined)(s)&&r.push(mSt([n,o],Math.abs(s))),a&&this.processedData&&r.push(pSt(this.id,this.processedData)),a&&r.push(SSt());const l=this.visible?{}:{forceValue:0},c=this.axes[nl.Radius]?.scale.type,h=this.axes[nl.Angle]?.scale.type;await this.requestDataModel(t,this.data,{props:[fSt(e,h,{id:"angleValue"}),vSt(i,c,{id:"radiusValue-raw",invalidValue:null,...l}),...v5(i,"normal","current",{id:"radiusValue-end",rangeId:"radiusValue-range",invalidValue:null,groupId:n,separateNegative:!0,...l},c),...v5(i,"trailing","current",{id:"radiusValue-start",invalidValue:null,groupId:o,separateNegative:!0,...l},c),...r],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,s=this.circleCache;return t!==s.r||e!==s.cx||i!==s.cy?(this.circleCache={r:t,cx:e,cy:i},!0):!1}isRadiusAxisReversed(){return this.axes[nl.Radius]?.isReversed()}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}getAxisInnerRadius(){const t=this.axes[nl.Radius];return t instanceof dSt?this.radius*t.innerRadiusRatio:0}createNodeData(){const{processedData:t,dataModel:e,groupScale:i}=this;if(!e||!t||t.type!=="grouped")return;const s=this.axes[nl.Angle],a=this.axes[nl.Radius],n=s?.scale,o=a?.scale;if(!n||!o)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),u=e.resolveProcessedDataIndexById(this,"radiusValue-range");let d=0,p=0;s instanceof vh&&(d=s.groupPaddingInner,p=s.paddingInner);const f=(n.bandwidth??0)*(1-p),{index:x,visibleGroupCount:m}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);i.domain=Array.from({length:m}).map((G,H)=>String(H)),i.range=[-f/2,f/2],i.paddingInner=m>1?d:0;const b=this.isRadiusAxisReversed(),v=b?this.radius:this.getAxisInnerRadius(),M=b?this.getAxisInnerRadius():this.radius,D=M+v,{angleKey:L,radiusKey:C,angleName:A,radiusName:T,label:N}=this.properties,O=this.getSeriesDomain(nl.Radius),E=(G,H,$,W)=>{const j=this.getLabelText(H,G,C,"radius",O,N,{value:H,datum:G,angleKey:L,radiusKey:C,angleName:A,radiusName:T});if(j)return{x:$,y:W,text:j,textAlign:"center",textBaseline:"middle"}},z=[],B={itemId:C,nodeData:z,labelData:z};if(!this.visible)return B;const{dataSources:F}=t,V=F.get(this.id)??[];for(const{datumIndex:G,group:H}of e.forEachGroupDatum(this,t)){const $=V[G],W=r[G];if(W==null)return;const j=h[G],U=j>=0&&!Object.is(j,-0),Z=l[G],X=c[G],q=H.aggregation[u][U?1:0]??0,tt=U===b;if(Z===void 0||X===void 0)return;let J,at;if(V.length===1)J=-.5*Math.PI,at=1.5*Math.PI;else{const ce=n.convert(W);J=D5(ce+i.convert(String(x))),at=D5(J+i.bandwidth)}const et=J+i.bandwidth/2,it=D-o.convert(Z),ct=D-o.convert(X),ht=(it+ct)/2,xt=D-o.convert(0),kt=D-o.convert(q),Dt=Math.cos(et)*ht,St=Math.sin(et)*ht,Xt=this.properties.label.enabled?E($,j,Dt,St):void 0,ke=this.getColumnWidth(J,at);z.push({series:this,datum:$,datumIndex:G,point:{x:Dt,y:St,size:0},midPoint:{x:Dt,y:St},label:Xt,angleValue:W,radiusValue:j,negative:tt,innerRadius:it,outerRadius:ct,stackInnerRadius:xt,stackOuterRadius:kt,startAngle:J,endAngle:at,midAngle:et,axisInnerRadius:v,axisOuterRadius:M,columnWidth:ke,index:G})}return{itemId:C,nodeData:z,labelData:z}}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,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return j1({fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,cornerRadius:s?.cornerRadius??i.cornerRadius,opacity:s?.opacity??1},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults)}getItemStyleOverrides(t,e,i,s){const{id:a,properties:n}=this,{angleKey:o,radiusKey:r,itemStyler:l,fillGradientDefaults:c,fillPatternDefaults:h,fillImageDefaults:u}=n;if(l==null)return;const d=this.cachedDatumCallback(S5(t,s?"highlight":"node"),()=>this.callWithContext(l,{seriesId:a,datum:e,highlighted:s,angleKey:o,radiusKey:r,...i}));return j1(d,c,h,u)}updateSectorSelection(t,e){let i=[];if(e){const r=this.ctx.highlightManager?.getActiveHighlight();r?.datum&&r.series===this&&i.push(r)}else i=this.nodeData;const s=this.isRadiusAxisReversed(),a=s?this.radius:this.getAxisInnerRadius(),n=s?this.getAxisInnerRadius():this.radius,o=this.getShapeFillBBox();t.update(i,void 0,r=>this.getDatumId(r)).each((r,l)=>{const{datum:c,datumIndex:h,midPoint:u}=l,d=this.getItemBaseStyle(e,l),p=this.getItemStyleOverrides(String(h),c,d,e),g=p?.fill??d.fill,x=kSt(g)&&g.bounds==="item"?{centerX:u?.x??0,centerY:u?.y??0}:{centerX:0,centerY:0,innerRadius:a,outerRadius:n};this.updateItemPath(r,l,e),DSt(r,d,p,o,x),r.cornerRadius=p?.cornerRadius??d.cornerRadius,r.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.fillOpacity=this.getHighlightStyle(!1,i.datumIndex).opacity??1,e.visible=!0):e.visible=!1})}animateEmptyUpdateReady(){const{labelSelection:t}=this,e=this.getColumnTransitionFunctions();k5.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],e),xSt(this,"labels",this.ctx.animationManager,t)}animateClearingUpdateEmpty(){const{itemSelection:t}=this,{animationManager:e}=this.ctx,i=this.getColumnTransitionFunctions();k5.fromToMotion(this.id,"datums",e,[t],i),bSt(this,"labels",e,this.labelSelection)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n}=this,{angleKey:o,angleName:r,radiusKey:l,radiusName:c,tooltip:h}=n,u=a[nl.Angle],d=a[nl.Radius];if(!i||!s||!u||!d)return;const p=s.dataSources.get(this.id)?.[t],g=i.resolveKeysById(this,"angleValue",s)[t],f=i.resolveColumnById(this,"radiusValue-raw",s)[t];if(g==null)return;const x=this.getItemBaseStyle(!1);return Object.assign(x,this.getItemStyleOverrides(String(t),t,x,!1)),this.formatTooltipWithContext(h,{heading:u.formatDatum(g,"tooltip",e,void 0,p,o),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:d.formatDatum(f,"tooltip",e,void 0,p,l)}]},{seriesId:e,datum:p,title:r,angleKey:o,angleName:r,radiusKey:l,radiusName:c,...x})}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.itemSelection.nodes())}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:o,fillGradientDefaults:r,fillPatternDefaults:l,fillImageDefaults:c}=this.properties,h=j1({fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:o},r,l,c);return Tk._ModuleSupport.isGradientFill(h.fill)&&(h.fill={...h.fill,gradient:"linear",rotation:0,reverse:!1}),{marker:h}}getLegendData(t){if(t!=="category")return[];const{id:e,visible:i}=this,{radiusKey:s,radiusName:a,showInLegend:n}=this.properties;return[{legendType:"category",id:e,itemId:s,seriesId:e,enabled:i,label:{text:a??s},symbol:this.legendItemSymbol(),hideInLegend:!n}]}getDatumId(t){return S5(t.angleValue)}computeLabelsBBox(){return null}},ASt=(_(),w(P)),{SeriesProperties:CSt,FillGradientDefaults:LSt,FillPatternDefaults:wSt,FillImageDefaults:TSt,makeSeriesTooltip:NSt,Property:Ri,Label:OSt}=ASt._ModuleSupport,pi=class extends CSt{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new LSt,this.fillPatternDefaults=new wSt,this.fillImageDefaults=new TSt,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 OSt,this.tooltip=NSt()}};y([Ri],pi.prototype,"angleKey",2),y([Ri],pi.prototype,"angleName",2),y([Ri],pi.prototype,"radiusKey",2),y([Ri],pi.prototype,"radiusName",2),y([Ri],pi.prototype,"fill",2),y([Ri],pi.prototype,"fillGradientDefaults",2),y([Ri],pi.prototype,"fillPatternDefaults",2),y([Ri],pi.prototype,"fillImageDefaults",2),y([Ri],pi.prototype,"fillOpacity",2),y([Ri],pi.prototype,"stroke",2),y([Ri],pi.prototype,"strokeWidth",2),y([Ri],pi.prototype,"strokeOpacity",2),y([Ri],pi.prototype,"lineDash",2),y([Ri],pi.prototype,"lineDashOffset",2),y([Ri],pi.prototype,"cornerRadius",2),y([Ri],pi.prototype,"itemStyler",2),y([Ri],pi.prototype,"rotation",2),y([Ri],pi.prototype,"stackGroup",2),y([Ri],pi.prototype,"normalizedTo",2),y([Ri],pi.prototype,"label",2),y([Ri],pi.prototype,"tooltip",2);var PSt=(_(),w(P)),_St=(_(),w(P)),{motion:ESt}=_St._ModuleSupport;function A5(){const t={startAngle:new Map,endAngle:new Map},e=["startAngle","endAngle"],i=(o,r,l)=>{e.forEach(c=>{const h=t[c];let u=(l==="removed"||l==="updated"?o:r)[c],d=(l==="removed"?o:r)[c];isNaN(d)&&(d=o.previousDatum?.[c]??NaN);const p=u-d;Math.abs(p)>Math.PI&&(u-=Math.sign(p)*2*Math.PI),h.set(r,{from:u,to:d})})},s=(o,r)=>({startAngle:t.startAngle.get(o)[r],endAngle:t.endAngle.get(o)[r]});return{calculate:i,from:o=>s(o,"from"),to:o=>s(o,"to")}}function C5(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 RSt(t){const e=A5();return{toFn:(a,n,o)=>{const{startAngle:r,endAngle:l}=e.to(n);let c,h,u,d,p;return o==="removed"?(c=a.innerRadius,h=a.innerRadius,u=a.columnWidth,d=a.axisInnerRadius,p=a.axisOuterRadius):(c=isNaN(n.innerRadius)?t:n.innerRadius,h=isNaN(n.outerRadius)?t:n.outerRadius,u=isNaN(n.columnWidth)?a.columnWidth:n.columnWidth,d=n.axisInnerRadius,p=n.axisOuterRadius),{innerRadius:c,outerRadius:h,columnWidth:u,axisInnerRadius:d,axisOuterRadius:p,startAngle:r,endAngle:l}},fromFn:(a,n,o)=>{o=C5(a,n,o),e.calculate(a,n,o);const{startAngle:r,endAngle:l}=e.from(n);let c,h,u,d,p;o==="removed"||o==="updated"?(c=a.innerRadius,h=a.outerRadius,u=a.columnWidth,d=a.axisInnerRadius,p=a.axisOuterRadius):(c=t,h=t,u=n.columnWidth,d=n.axisInnerRadius,p=n.axisOuterRadius);const g=ESt.NODE_UPDATE_STATE_TO_PHASE_MAPPING[o];return{innerRadius:c,outerRadius:h,columnWidth:u,axisInnerRadius:d,axisOuterRadius:p,startAngle:r,endAngle:l,phase:g}}}}function BSt(t,{innerRadius:e,outerRadius:i,columnWidth:s,axisInnerRadius:a,axisOuterRadius:n,startAngle:o,endAngle:r}){return{innerRadius:e,outerRadius:i,columnWidth:s,axisInnerRadius:a,axisOuterRadius:n,startAngle:o,endAngle:r}}var{SectorBox:Nk,motion:zSt}=PSt._ModuleSupport;function W1(t){const{negative:e,innerRadius:i,outerRadius:s,stackInnerRadius:a,stackOuterRadius:n}=t;return{innerRadius:e?n:a,outerRadius:e?a:n,clipInnerRadius:e?s:i,clipOuterRadius:e?i:s}}function FSt(t){const e=A5();return{toFn:(a,n,o)=>{const{startAngle:r,endAngle:l}=e.to(n);let c,h,u;if(o==="removed")c=t,h=t,u=new Nk(r,l,c,h);else{let d,p;({innerRadius:c,outerRadius:h,clipInnerRadius:d,clipOuterRadius:p}=W1(n)),isNaN(c)&&(c=t),isNaN(h)&&(h=t),isNaN(d)&&(d=t),isNaN(p)&&(p=t),u=new Nk(r,l,d,p)}return{innerRadius:c,outerRadius:h,startAngle:r,endAngle:l,clipSector:u}},fromFn:(a,n,o)=>{o=C5(a,n,o),e.calculate(a,n,o);const{startAngle:r,endAngle:l}=e.from(n);let c,h,u;o==="removed"||o==="updated"?(c=a.innerRadius,h=a.outerRadius,u=a.clipSector):(c=t,h=t),u??(u=new Nk(r,l,c,h));const d=zSt.NODE_UPDATE_STATE_TO_PHASE_MAPPING[o];return{innerRadius:c,outerRadius:h,startAngle:r,endAngle:l,clipSector:u,phase:d}}}}function VSt(t,e){const{startAngle:i,endAngle:s}=e,{innerRadius:a,outerRadius:n,clipInnerRadius:o,clipOuterRadius:r}=W1(e),l=new Nk(i,s,o,r);return{innerRadius:a,outerRadius:n,startAngle:i,endAngle:s,clipSector:l}}var{Sector:GSt,SectorBox:jSt,PolarZIndexMap:H1}=lSt._ModuleSupport,Ok=class extends I5{constructor(t){super(t,{animationResetFns:{item:VSt}}),this.properties=new pi}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[0,H1.FOREGROUND,t],this.highlightGroup.zIndex=[0,H1.HIGHLIGHT,t],this.labelGroup.zIndex=[0,H1.LABEL,t],!0):!1}getStackId(){return`nightingale-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new GSt}updateItemPath(t,e,i){const{negative:s}=e;if(t.centerX=0,t.centerY=0,t.startOuterCornerRadius=s?0:this.properties.cornerRadius,t.endOuterCornerRadius=s?0:this.properties.cornerRadius,t.startInnerCornerRadius=s?this.properties.cornerRadius:0,t.endInnerCornerRadius=s?this.properties.cornerRadius:0,i){const{startAngle:a,endAngle:n}=e,{innerRadius:o,outerRadius:r,clipInnerRadius:l,clipOuterRadius:c}=W1(e);t.innerRadius=o,t.outerRadius=r,t.startAngle=a,t.endAngle=n,t.clipSector=new jSt(a,n,l,c)}}getColumnTransitionFunctions(){const t=this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius();return FSt(t)}};Ok.className="NightingaleSeries",Ok.type="nightingale";var WSt=(_(),w(P)),So=(R(),w(st)),{commonSeriesOptionsDefs:HSt,nightingaleSeriesThemeableOptionsDef:$St}=WSt._ModuleSupport,USt={...HSt,...$St,type:(0,So.required)((0,So.constant)("nightingale")),angleKey:(0,So.required)(So.string),radiusKey:(0,So.required)(So.string),angleName:So.string,radiusName:So.string,grouped:So.boolean,stacked:So.boolean,stackGroup:So.string,normalizedTo:So.number},Pk=(_(),w(P)),{ThemeConstants:{POLAR_AXIS_TYPE:L5,POLAR_AXIS_SHAPE:w5}}=Pk._ModuleSupport,KSt={series:{fill:{$palette:"fill"},stroke:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$ref:"chartBackgroundColor"},{$palette:"stroke"}]},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Pk._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:Pk._ModuleSupport.FILL_IMAGE_DEFAULTS,strokeWidth:1,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},highlight:Pk._ModuleSupport.multiSeriesHighlightStyle()},axes:{[L5.ANGLE_CATEGORY]:{shape:{$findFirstSiblingNotOperation:w5.CIRCLE},groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[L5.RADIUS_NUMBER]:{shape:{$findFirstSiblingNotOperation:w5.CIRCLE}}}},{ThemeConstants:{POLAR_AXIS_TYPE:T5}}=rSt._ModuleSupport,YSt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"nightingale",moduleFactory:t=>new Ok(t),defaultAxes:[{type:T5.ANGLE_CATEGORY},{type:T5.RADIUS_NUMBER}],themeTemplate:KSt,stackable:!0,groupable:!0,stackedByDefault:!0},ZSt={type:"series",name:"nightingale",chartType:"polar",enterprise:!0,options:USt,create:t=>new Ok(t)},JIt=(_(),w(P)),N5=(_(),w(P)),XSt=(_(),w(P)),{SeriesProperties:qSt,FillGradientDefaults:QSt,FillPatternDefaults:JSt,FillImageDefaults:t0t,makeSeriesTooltip:e0t,Property:gi,Label:O5,DropShadow:i0t}=XSt._ModuleSupport,s0t=class extends O5{},$1=class extends O5{constructor(){super(...arguments),this.spacing=0}};y([gi],$1.prototype,"spacing",2),y([gi],$1.prototype,"placement",2);var ki=class extends qSt{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new QSt,this.fillPatternDefaults=new JSt,this.fillImageDefaults=new t0t,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 i0t().set({enabled:!1}),this.label=new s0t,this.stageLabel=new $1,this.tooltip=e0t()}};y([gi],ki.prototype,"stageKey",2),y([gi],ki.prototype,"valueKey",2),y([gi],ki.prototype,"fills",2),y([gi],ki.prototype,"fillGradientDefaults",2),y([gi],ki.prototype,"fillPatternDefaults",2),y([gi],ki.prototype,"fillImageDefaults",2),y([gi],ki.prototype,"fillOpacity",2),y([gi],ki.prototype,"strokes",2),y([gi],ki.prototype,"strokeWidth",2),y([gi],ki.prototype,"strokeOpacity",2),y([gi],ki.prototype,"lineDash",2),y([gi],ki.prototype,"lineDashOffset",2),y([gi],ki.prototype,"direction",2),y([gi],ki.prototype,"reverse",2),y([gi],ki.prototype,"spacing",2),y([gi],ki.prototype,"aspectRatio",2),y([gi],ki.prototype,"itemStyler",2),y([gi],ki.prototype,"shadow",2),y([gi],ki.prototype,"label",2),y([gi],ki.prototype,"stageLabel",2),y([gi],ki.prototype,"tooltip",2);function P5(t,{x:e,y:i,top:s,right:a,bottom:n,left:o}){t.x0=e-s/2,t.x1=e+s/2,t.x2=e+n/2,t.x3=e-n/2,t.y0=i-o/2,t.y1=i-a/2,t.y2=i+a/2,t.y3=i+o/2}function a0t(t){return{fromFn:(a,n)=>{const{x:o,y:r}=n;let{top:l,right:c,bottom:h,left:u}=n;return t==="vertical"?(l=0,h=0):(u=0,c=0),{x:o,y:r,top:l,right:c,bottom:h,left:u}},toFn:(a,n)=>{const{x:o,y:r,top:l,right:c,bottom:h,left:u}=n;return{x:o,y:r,top:l,right:c,bottom:h,left:u}},applyFn:P5}}var{StateMachine:n0t,valueProperty:_5,SeriesNodePickMode:E5,CachedTextMeasurerPool:o0t,TextUtils:r0t,createDatumId:l0t,BBox:U1,Group:K1,Selection:_k,Text:R5,PointerEvents:B5,applyShapeStyle:c0t,fromToMotion:h0t,seriesLabelFadeInAnimation:u0t,getShapeStyle:Y1}=N5._ModuleSupport,Ek=class extends N5._ModuleSupport.DataModelSeries{constructor(t){super({moduleCtx:t,categoryKey:void 0,pickModes:[E5.EXACT_SHAPE_MATCH,E5.NEAREST_NODE]}),this.properties=new ki,this.itemGroup=this.contentGroup.appendChild(new K1({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new K1({name:"itemLabelGroup"})),this.stageLabelGroup=this.contentGroup.appendChild(new K1({name:"stageLabelGroup"})),this.datumSelection=_k.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=_k.select(this.itemLabelGroup,R5),this.stageLabelSelection=_k.select(this.stageLabelGroup,R5),this.highlightDatumSelection=_k.select(this.highlightNode,()=>this.nodeFactory()),this.animationState=new n0t("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{clear:"empty",reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable()),this.itemLabelGroup.pointerEvents=B5.None,this.stageLabelGroup.pointerEvents=B5.None}addChartEventListeners(){this.cleanup.register(this.ctx.eventsHub.on("legend:item-click",t=>this.onLegendItemClick(t)))}nodeFactory(){return new al}getNodeData(){return this.contextNodeData?.nodeData}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}async processData(t){if(this.data==null)return;const{id:e,visible:i,ctx:{legendManager:s}}=this,{stageKey:a,valueKey:n}=this.properties,o="band",r="number",l=(h,u,d)=>i&&s.getItemEnabled({seriesId:e,itemId:d}),c=this.visible?{}:{forceValue:0};await this.requestDataModel(t,this.data,{props:[_5(a,o,{id:"xValue"}),_5(n,r,{id:"yValue",...c,validation:l,invalidValue:0})]})}createNodeData(){const{id:t,dataModel:e,processedData:i,properties:s,visible:a,ctx:{legendManager:n}}=this,{stageKey:o,valueKey:r,direction:l,reverse:c=l==="horizontal",spacing:h,aspectRatio:u,label:d,stageLabel:p}=s;if(e==null||i==null)return;const g=l==="horizontal",f=e.resolveColumnById(this,"xValue",i),x=e.resolveColumnById(this,"yValue",i),m=e.getDomain(this,"xValue","value",i),b=e.getDomain(this,"yValue","value",i),v=o0t.getMeasurer({font:p});let M,D;g?(M="center",D=p.placement==="before"?"bottom":"top"):(M=p.placement==="after"?"left":"right",D="middle");const L=p.enabled?[]:void 0;let C=0,A=0,T=0;const N=i.dataSources.get(this.id)??[];N.forEach((U,Z)=>{const X=f[Z],q=x[Z],tt=a&&n.getItemEnabled({seriesId:t,itemId:Z});if(T+=q,L==null)return;const J=this.getLabelText(X,U,o,"x",m,this.properties.stageLabel,{datum:U,value:q,stageKey:o,valueKey:r}),{width:at}=v.measureText(J),et=J.split(`
`).length*r0t.getLineHeight(d.fontSize);C=Math.max(C,at),A=Math.max(A,et),L.push({x:NaN,y:NaN,text:J,textAlign:M,textBaseline:D,visible:tt})});const O=this._nodeDataDependencies?.seriesRectWidth??0,E=this._nodeDataDependencies?.seriesRectHeight??0,z=h*(i.input.count-1);let B;if(g){const U=A+p.spacing;B=new U1(0,p.placement==="before"?U:0,O,E-U)}else{const U=C+p.spacing;B=new U1(p.placement==="after"?0:U,0,O-U,E)}if(u!=null&&u!==0){const U=l==="horizontal"?1/u:u,Z=Math.min(B.width,B.height*U),X=Z/U;B=new U1(B.x+(B.width-Z)/2,B.y+(B.height-X)/2,Z,X)}let F,V;g?V=p.placement==="before"?B.y-p.spacing:B.y+B.height+p.spacing:F=p.placement==="after"?B.x+B.width+p.spacing:B.x-p.spacing;const G=B.width-(g?z:0),H=B.height-(g?0:z);if(G<0||H<0)return;const $=[],W=[];let j=0;return N.forEach((U,Z)=>{const X=f[Z],q=x[Z],tt=a&&n.getItemEnabled({seriesId:t,itemId:Z}),J=j+q,at=(j+J)/(2*T),et=(J-j)/T,it=g?G*at+h*Z:G*.5,ct=g?H*.5:H*at+h*Z,ht=B.x+it,xt=B.y+ct;if(L!=null){const Ot=L[Z];Ot.x=F??ht,Ot.y=V??xt}let kt,Dt,St,Xt;if(g){const Ot=G*et;kt=Ot,St=Ot;const Vt=(it+Ot/2)*(H/B.width),qt=(it-Ot/2)*(H/B.width);Dt=c?B.height-Vt:Vt,Xt=c?B.height-qt:qt}else{const Ot=H*et;Dt=Ot,Xt=Ot;const Vt=(ct-Ot/2)*(G/B.height),qt=(ct+Ot/2)*(G/B.height);kt=c?B.width-Vt:Vt,St=c?B.width-qt:qt}const ke=this.getLabelText(q,U,r,"y",b,d,{datum:U,value:q,stageKey:o,valueKey:r}),ce={x:ht,y:xt,text:ke,textAlign:"center",textBaseline:"middle",visible:tt};W.push(ce),$.push({series:this,itemId:r,datum:U,datumIndex:Z,index:Z,xValue:X,yValue:q,x:ht,y:xt,top:kt,right:Dt,bottom:St,left:Xt,label:ce,enabled:tt,midPoint:{x:ht,y:xt}}),j=J}),{itemId:t,nodeData:$,labelData:W,stageLabelData:L,bounds:B}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update({seriesRect:t}){this.checkResize(t);const{datumSelection:e,labelSelection:i,stageLabelSelection:s,highlightDatumSelection:a}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let n=this.ctx.highlightManager?.getActiveHighlight();n!=null&&(n.series!==this||n.datum==null)&&(n=void 0);const o=this.contextNodeData?.nodeData??[],r=this.contextNodeData?.labelData??[],l=this.contextNodeData?.stageLabelData??[];this.datumSelection=this.updateDatumSelection({nodeData:o,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:s}),this.updateLabelNodes({labelSelection:s,labelProperties:this.properties.stageLabel}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:n!=null?[n]:[],datumSelection:a}),this.updateDatumNodes({datumSelection:a,isHighlight:!0}),this.animationState.transition("update")}updateDatumSelection(t){return t.datumSelection.update(t.nodeData)}getItemBaseStyle(t,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return Y1({fill:s?.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,opacity:s?.opacity??1},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getItemStyleOverrides(t,e,i,s,a){const{id:n,properties:o}=this,{fills:r,strokes:l,stageKey:c,valueKey:h,itemStyler:u}=o,d=s.fill??r[i%r.length],p=s.stroke??l[i%l.length],g={};if(a||(g.fill=d,g.stroke=p),u!=null){const f=this.cachedDatumCallback(l0t(t,a?"highlight":"node"),()=>this.callWithContext(u,{seriesId:n,datum:e,stageKey:c,valueKey:h,highlighted:a,fill:d,stroke:p,...s}));Object.assign(g,f)}return Y1(g,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,{properties:s}=this,{shadow:a}=s,n=this.contextNodeData?.bounds,o=n?{series:n,axis:n}:void 0;e.each((r,l)=>{const{datumIndex:c,datum:h}=l,u=this.getItemBaseStyle(i,l),d=this.getItemStyleOverrides(String(c),h,c,u,i);c0t(r,u,d,o),P5(r,l),r.fillShadow=a})}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:s,fontSize:a,fontStyle:n,fontWeight:o,fontFamily:r}=i;e.each((l,{visible:c,x:h,y:u,text:d,textAlign:p,textBaseline:g},f)=>{l.visible=c,l.x=h,l.y=u,l.text=d,l.fill=s,l.fontStyle=n,l.fontWeight=o,l.fontSize=a,l.fontFamily=r,l.textAlign=p,l.textBaseline=g,l.fillOpacity=this.getHighlightStyle(!1,f).opacity??1})}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:s,properties:a}=this,{stageKey:n,valueKey:o,tooltip:r}=a;if(!i||!s)return;const l=s.dataSources.get(this.id)?.[t],c=i.resolveColumnById(this,"xValue",s)[t],h=i.resolveColumnById(this,"yValue",s)[t];if(c==null)return;const u=this.getLabelText(c,l,n,"x",i.getDomain(this,"xValue","value",s),this.properties.stageLabel,{datum:l,value:c,stageKey:n,valueKey:o}),d=this.getLabelText(h,l,o,"y",i.getDomain(this,"yValue","value",s),this.properties.stageLabel,{datum:l,value:h,stageKey:n,valueKey:o}),p=this.getItemBaseStyle(!1);return Object.assign(p,this.getItemStyleOverrides(String(t),t,t,p,!1)),this.formatTooltipWithContext(r,{symbol:this.legendItemSymbol(t),data:[{label:u,value:d}]},{seriesId:e,datum:l,title:void 0,stageKey:n,valueKey:o,...p})}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}pickNodeClosestDatum({x:t,y:e}){let i=1/0,s;return this.datumSelection.each((a,n)=>{const o=a.distanceSquared(t,e);o<i&&(i=o,s=n)}),s!=null?{datum:s,distance:Math.sqrt(i)}:void 0}legendItemSymbol(t){const{fills:e,strokes:i,strokeWidth:s,fillOpacity:a,strokeOpacity:n,lineDash:o,lineDashOffset:r}=this.properties,l=e[t%e.length]??"black",c=i[t%i.length]??"black";return{marker:Y1({fill:l,fillOpacity:a,stroke:c,strokeWidth:s,strokeOpacity:n,lineDash:o,lineDashOffset:r},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}}getLegendData(t){const{processedData:e,dataModel:i,id:s,ctx:{legendManager:a},visible:n}=this;if(!i||!e||t!=="category")return[];const{showInLegend:o}=this.properties,r=[],l=i.resolveColumnById(this,"xValue",e);return(e.dataSources.get(this.id)??[]).forEach((h,u)=>{const d=l[u];r.push({legendType:"category",id:s,itemId:u,seriesId:s,enabled:n&&a.getItemEnabled({seriesId:s,itemId:u}),label:{text:d},symbol:this.legendItemSymbol(u),hideInLegend:!o})}),r}animateReset(){this.ctx.animationManager.skipCurrentBatch(),this.ctx.animationManager.stopByAnimationGroupId(this.id)}animateEmptyUpdateReady(){const{datumSelection:t,labelSelection:e,properties:i}=this,s=a0t(i.direction);h0t(this.id,"nodes",this.ctx.animationManager,[t],s),u0t(this,"labels",this.ctx.animationManager,e)}};Ek.className="PyramidSeries",Ek.type="pyramid";var d0t=(_(),w(P)),Ff=(R(),w(st)),{commonSeriesOptionsDefs:p0t,pyramidSeriesThemeableOptionsDef:g0t}=d0t._ModuleSupport,f0t={...g0t,...p0t,type:(0,Ff.required)((0,Ff.constant)("pyramid")),stageKey:(0,Ff.required)(Ff.string),valueKey:(0,Ff.required)(Ff.string)},Rk=(_(),w(P)),{ThemeSymbols:{DEFAULT_SHADOW_COLOUR:m0t}}=Rk._ModuleSupport,y0t={series:{direction:"vertical",strokeWidth:{$isUserOption:["./strokes/0",2,0]},spacing:2,fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Rk._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:Rk._ModuleSupport.FILL_IMAGE_DEFAULTS,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"}},stageLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:12},shadow:{enabled:!1,color:m0t,xOffset:3,yOffset:3,blur:5},highlight:Rk._ModuleSupport.singleSeriesHighlightStyle()}},x0t={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["standalone"],identifier:"pyramid",moduleFactory:t=>new Ek(t),solo:!0,themeTemplate:y0t},b0t={type:"series",name:"pyramid",chartType:"standalone",enterprise:!0,options:f0t,create:t=>new Ek(t)},v0t=(_(),w(P)),lr=(_(),w(P)),{ThemeConstants:{POLAR_AXIS_TYPE:S0t}}=lr._ModuleSupport,z5={series:{stroke:{$palette:"stroke"},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},marker:{enabled:!0,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:lr._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:lr._ModuleSupport.FILL_IMAGE_DEFAULTS,fillOpacity:1,shape:"circle",size:6,strokeOpacity:1,strokeWidth:{$isUserOption:["./stroke",1,0]}},highlight:lr._ModuleSupport.multiSeriesHighlightStyle(),tooltip:{range:{$path:["/tooltip/range","nearest"]}}},axes:{[S0t.ANGLE_CATEGORY]:{label:{spacing:10}}}},M0t=lr._ModuleSupport.mergeDefaults({series:{stroke:lr._ModuleSupport.SAFE_STROKE_FILL_OPERATION,strokeWidth:2}},z5),D0t=lr._ModuleSupport.mergeDefaults({series:{fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:lr._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:lr._ModuleSupport.FILL_IMAGE_DEFAULTS,fillOpacity:.8,strokeWidth:2,marker:{enabled:!1,fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:lr._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:lr._ModuleSupport.FILL_IMAGE_DEFAULTS}}},z5),F5=(_(),w(P)),Z1=(_(),w(P)),Bk=(R(),w(st)),k0t=(_(),w(P)),{Label:I0t,SeriesMarker:A0t,SeriesProperties:C0t,makeSeriesTooltip:L0t,Property:qa}=k0t._ModuleSupport,ua=class extends C0t{constructor(){super(...arguments),this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.rotation=0,this.marker=new A0t,this.label=new I0t,this.tooltip=L0t(),this.connectMissingData=!1}};y([qa],ua.prototype,"angleKey",2),y([qa],ua.prototype,"radiusKey",2),y([qa],ua.prototype,"angleName",2),y([qa],ua.prototype,"radiusName",2),y([qa],ua.prototype,"stroke",2),y([qa],ua.prototype,"strokeWidth",2),y([qa],ua.prototype,"strokeOpacity",2),y([qa],ua.prototype,"lineDash",2),y([qa],ua.prototype,"lineDashOffset",2),y([qa],ua.prototype,"rotation",2),y([qa],ua.prototype,"marker",2),y([qa],ua.prototype,"label",2),y([qa],ua.prototype,"tooltip",2),y([qa],ua.prototype,"connectMissingData",2);var{DEFAULT_POLAR_DIRECTION_KEYS:w0t,DEFAULT_POLAR_DIRECTION_NAMES:T0t,ChartAxisDirection:Mo,PolarAxis:N0t,SeriesNodePickMode:V5,valueProperty:G5,fixNumericExtent:O0t,seriesLabelFadeInAnimation:P0t,markerFadeInAnimation:_0t,resetMarkerFn:E0t,animationValidation:R0t,computeMarkerFocusBounds:B0t,extent:z0t,BBox:F0t,Group:V0t,Path:G0t,PointerEvents:j0t,Selection:j5,Text:W0t,Marker:H0t,mergeDefaults:W5,getShapeStyle:$0t}=Z1._ModuleSupport,U0t=class extends Z1._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey}},X1=class extends Z1._ModuleSupport.PolarSeries{constructor(t){super({moduleCtx:t,categoryKey:"angleValue",propertyKeys:w0t,propertyNames:T0t,pickModes:[V5.NEAREST_NODE,V5.EXACT_SHAPE_MATCH],canHaveAxes:!0,animationResetFns:{item:E0t},clipFocusBox:!1}),this.properties=new ua,this.NodeEvent=U0t,this.lineGroup=this.contentGroup.appendChild(new V0t({name:"radar-line"})),this.lineSelection=j5.select(this.lineGroup,G0t),this.resetInvalidToZero=!1,this.circleCache={r:0,cx:0,cy:0},this.lineGroup.zIndex=0,this.itemGroup.zIndex=1}nodeFactory(){return new H0t}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===Mo.Angle)return e.getDomain(this,"angleValue","value",i);{const s=e.getDomain(this,"radiusValue","value",i),a=z0t(s.length===0?s:[0].concat(s));return O0t(a)}}async processData(t){const{angleKey:e,radiusKey:i}=this.properties,s=[];this.ctx.animationManager.isSkipped()||s.push(R0t());const a=this.axes[Mo.Radius]?.scale.type,n=this.axes[Mo.Angle]?.scale.type;await this.requestDataModel(t,this.data,{props:[G5(e,n,{id:"angleValue"}),G5(i,a,{id:"radiusValue",invalidValue:void 0}),...s]}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,s=this.circleCache;return t===s.r&&e===s.cx&&i===s.cy?!1:(this.circleCache={r:t,cx:e,cy:i},!0)}getAxisInnerRadius(){const t=this.axes[Mo.Radius];return t instanceof N0t?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)return;const{angleKey:i,radiusKey:s,angleName:a,radiusName:n,marker:o,label:r}=this.properties,l=this.axes[Mo.Angle]?.scale,c=this.axes[Mo.Radius]?.scale;if(!l||!c)return;const h=e.resolveColumnById(this,"angleValue",t),u=e.resolveColumnById(this,"radiusValue",t),d=this.getAxisInnerRadius(),p=this.getSeriesDomain(Mo.Radius),f=(t.dataSources.get(this.id)??[]).map((x,m)=>{const b=h[m],v=u[m],M=l.convert(b),D=this.radius+d-c.convert(v),L=Math.cos(M),C=Math.sin(M),A=L*D,T=C*D;let N;if(r.enabled){const O=this.getLabelText(v,x,s,"radius",p,r,{value:v,datum:x,angleKey:i,radiusKey:s,angleName:a,radiusName:n});if(O){let E="right";(0,Bk.isNumberEqual)(L,0)?E="center":L>0&&(E="left");let z="bottom";(0,Bk.isNumberEqual)(C,0)?z="middle":C>0&&(z="top"),N={x:A+L*o.size,y:T+C*o.size,text:O,textAlign:E,textBaseline:z}}}return{series:this,datum:x,datumIndex:m,index:m,point:{x:A,y:T,size:o.size},midPoint:{x:A,y:T},label:N,angleValue:b,radiusValue:v,missing:!(0,Bk.isFiniteNumber)(M)||!(0,Bk.isFiniteNumber)(D)}});return{itemId:s,nodeData:f,labelData:f}}update({seriesRect:t}){const e=this.checkResize(t),i=!this.ctx.animationManager.isSkipped(),{series:s}=this.ctx.highlightManager?.getActiveHighlight()??{};this.highlightGroup.visible=(i||this.visible)&&s===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.updatePathNodes(),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=j5.select(this.itemGroup,()=>this.nodeFactory(),!1)),this.itemSelection.update(this.properties.marker.enabled?this.nodeData:[])}getMarkerFill(t){return t?.fill??this.properties.marker.fill}getDatumStylerProperties(t){const{id:e,properties:i}=this,{angleKey:s,radiusKey:a}=i;return{seriesId:e,datum:t,angleKey:s,radiusKey:a}}updateMarkers(t,e){const{visible:i}=this,{marker:s,stroke:a,strokeWidth:n,strokeOpacity:o}=this.properties;let r=[];if(i&&s.shape&&s.enabled)if(e){const h=this.ctx.highlightManager?.getActiveHighlight();h?.datum&&(r=[h])}else r=this.nodeData;const l=s.getStyle(),c=this.getShapeFillBBox();t.update(r).each((h,u)=>{const d=this.getHighlightStyle(e,u.datumIndex),p=W5(d,l,{stroke:a,strokeWidth:n,strokeOpacity:o});this.updateMarkerStyle(s,h,u.datum,u.point,this.getDatumStylerProperties(u),e,p,c)})}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.fillOpacity=this.getHighlightStyle(!1,i.datumIndex).opacity??1,e.visible=!0):e.visible=!1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n}=this,{angleKey:o,angleName:r,radiusKey:l,radiusName:c,tooltip:h,marker:u}=n,d=a[Mo.Angle],p=a[Mo.Radius];if(!i||!s||!d||!p)return;const g=s.dataSources.get(this.id)?.[t],f=i.resolveColumnById(this,"angleValue",s)[t],x=i.resolveColumnById(this,"radiusValue",s)[t];if(f==null)return;const m=this.getMarkerStyle(u,g,this.getDatumStylerProperties(g),!1);return this.formatTooltipWithContext(h,{heading:d.formatDatum(f,"tooltip",e,void 0,g,o),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:p.formatDatum(x,"tooltip",e,void 0,g,l)}]},{seriesId:e,datum:g,title:r,angleKey:o,radiusKey:l,angleName:r,radiusName:c,...m})}legendItemSymbol(){const{stroke:t,strokeWidth:e,strokeOpacity:i,lineDash:s,marker:a}=this.properties;return{marker:$0t({shape:a.shape,enabled:a.enabled||e<=0,fill:this.getMarkerFill()??a.stroke??t??"rgba(0, 0, 0, 0)",stroke:a.stroke??t??"rgba(0, 0, 0, 0)",fillOpacity:a.fillOpacity,strokeOpacity:a.strokeOpacity,strokeWidth:a.strokeWidth,lineDash:a.lineDash,lineDashOffset:a.lineDashOffset},a.fillGradientDefaults,a.fillPatternDefaults,a.fillImageDefaults),line:{stroke:t,strokeOpacity:i,strokeWidth:e,lineDash:s}}}getLegendData(t){if(t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{radiusKey:a,radiusName:n,showInLegend:o}=this.properties;return[{legendType:"category",id:e,itemId:a,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:a}),label:{text:n??a},symbol:this.legendItemSymbol(),hideInLegend:!o}]}pickNodeClosestDatum(t){const{nodeData:e,centerX:i,centerY:s}=this,{x:a,y:n}=t,o=this.radius;if(Math.sqrt((a-i)**2+(n-s)**2)>o+this.properties.marker.size)return;let l=1/0,c;for(const h of e){const{point:{x:u=NaN,y:d=NaN}={}}=h;if(isNaN(u)||isNaN(d))continue;const p=Math.sqrt((t.x-u-i)**2+(t.y-d-s)**2);p<l&&(l=p,c=h)}if(c){const h=Math.max(l-(c.point?.size??0),0);return{datum:c,distance:h}}}computeLabelsBBox(){const{label:t}=this.properties;this.maybeRefreshNodeData();const e=[],i=new W0t;return this.nodeData.forEach(s=>{if(!t.enabled||!s.label)return;i.text=s.label.text,i.x=s.label.x,i.y=s.label.y,i.setFont(t),i.setAlign(s.label);const a=i.getBBox();e.push(a)}),e.length===0?null:F0t.merge(e)}getLineNode(){return this.lineSelection?.at(0)}beforePathAnimation(){this.updatePathNodes()}updatePathNodes(){const t=this.getLineNode();if(!t)return;const{strokeWidth:e,stroke:i,strokeOpacity:s,lineDash:a,lineDashOffset:n,opacity:o}=W5(this.getHighlightStyle(),this.properties);t.setProperties({fill:void 0,lineJoin:"round",lineCap:"round",pointerEvents:j0t.None,opacity:o,stroke:i,strokeWidth:e,strokeOpacity:s,lineDash:a,lineDashOffset:n})}getLinePoints(){const{nodeData:t,resetInvalidToZero:e}=this,{connectMissingData:i}=this.properties;if(t.length===0)return[];const s=this.axes[Mo.Radius],n=this.axes[Mo.Angle]?.isReversed(),r=s?.isReversed()&&!n?[...t].reverse():t,l=[];let c=!1,h;return r.forEach((u,d)=>{let{x:p,y:g}=u.point;const f=isNaN(p)||isNaN(g);f||(h??(h=u)),f&&!i&&(p=0,g=0);const x=d===0||!e&&!i&&(f||c);l.push({x:p,y:g,moveTo:x}),c=f}),h!==void 0&&l.push({x:h.point.x,y:h.point.y,moveTo:!1}),l}animateSinglePath(t,e,i){const{path:s}=t;s.clear(!0);const a=this.getAxisInnerRadius(),n=this.axes[Mo.Radius],r=n?.isReversed()?this.radius+a-n?.scale.convert(0):a;e.forEach(l=>{const{x:c,y:h,arc:u,radius:d=0,startAngle:p=0,endAngle:g=0,moveTo:f}=l,x=Math.atan2(h,c),m=r*Math.cos(x),b=r*Math.sin(x),v=i,M=m*(1-v)+c*v,D=b*(1-v)+h*v;u?s.arc(c,h,d,p,g):f?s.moveTo(M,D):s.lineTo(M,D)}),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:s=>this.animatePaths(s),onStop:()=>this.animatePaths(1)}),_0t(this,i,"added",t),P0t(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:s,y:a,moveTo:n}of i)n?e.moveTo(s,a):e.lineTo(s,a);t.checkPathDirty()}}getFormattedMarkerStyle(t){const{angleKey:e,radiusKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,t.datum,{angleKey:e,radiusKey:i},!0)}computeFocusBounds(t){return B0t(this,t)}};X1.className="RadarSeries";var K0t=(_(),w(P)),{FillGradientDefaults:Y0t,FillPatternDefaults:Z0t,FillImageDefaults:X0t,Property:rb}=K0t._ModuleSupport,Vf=class extends ua{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new Y0t,this.fillPatternDefaults=new Z0t,this.fillImageDefaults=new X0t,this.fillOpacity=1}};y([rb],Vf.prototype,"fill",2),y([rb],Vf.prototype,"fillGradientDefaults",2),y([rb],Vf.prototype,"fillPatternDefaults",2),y([rb],Vf.prototype,"fillImageDefaults",2),y([rb],Vf.prototype,"fillOpacity",2);var{Group:q0t,Path:Q0t,PointerEvents:J0t,Selection:tMt,ChartAxisDirection:H5,applyShapeStyle:$5,getShapeFill:eMt,getShapeStyle:iMt,mergeDefaults:sMt}=F5._ModuleSupport,zk=class extends X1{constructor(t){super(t),this.properties=new Vf,this.areaGroup=this.contentGroup.appendChild(new q0t({name:"radar-area"})),this.areaSelection=tMt.select(this.areaGroup,Q0t),this.resetInvalidToZero=!0,this.areaGroup.zIndex=-1}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}updatePathNodes(){super.updatePathNodes();const{fill:t,fillOpacity:e,opacity:i}=sMt(this.getHighlightStyle(),this.properties),{fill:s,fillOpacity:a}=iMt({fill:t,fillOpacity:e},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults),n=this.getAreaNode();n&&($5(n,{fill:s,fillOpacity:a,stroke:void 0},void 0,this.getShapeFillBBox()),n.setProperties({lineJoin:"round",pointerEvents:J0t.None,opacity:i}))}animatePaths(t){super.animatePaths(t);const e=this.getAreaNode();e&&this.animateSinglePath(e,this.getAreaPoints(),t)}getAreaPoints(){const t=this.getLinePoints(),e=o=>{const r=this.axes[o];return r instanceof F5._ModuleSupport.PolarAxis?r:void 0},i=e(H5.Radius),s=e(H5.Angle);if(!i?.isReversed())return t;const n=s?.getAxisLinePoints()?.points??[];return t.concat(...n)}resetPaths(){super.resetPaths();const t=this.getAreaNode();if(t){const{path:e}=t,i=this.getAreaPoints(),s=eMt(this.properties.fill,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults),a=this.getShapeFillBBox();$5(t,{fill:s,stroke:void 0,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset},void 0,a),t.lineJoin=t.lineCap="round",e.clear(!0),i.forEach(({x:n,y:o,moveTo:r,arc:l,radius:c=0,startAngle:h=0,endAngle:u=0})=>{l?e.arc(n,o,c,h,u):r?e.moveTo(n,o):e.lineTo(n,o)}),e.closePath(),t.checkPathDirty()}}};zk.className="RadarAreaSeries",zk.type="radar-area";var aMt=(_(),w(P)),Zh=(R(),w(st)),{commonSeriesOptionsDefs:nMt,radarAreaSeriesThemeableOptionsDef:oMt}=aMt._ModuleSupport,rMt={...nMt,...oMt,type:(0,Zh.required)((0,Zh.constant)("radar-area")),angleKey:(0,Zh.required)(Zh.string),radiusKey:(0,Zh.required)(Zh.string),angleName:Zh.string,radiusName:Zh.string},{ThemeConstants:{POLAR_AXIS_TYPE:U5}}=v0t._ModuleSupport,lMt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radar-area",moduleFactory:t=>new zk(t),defaultAxes:[{type:U5.ANGLE_CATEGORY},{type:U5.RADIUS_NUMBER}],themeTemplate:D0t},cMt={type:"series",name:"radar-area",chartType:"polar",enterprise:!0,options:rMt,create:t=>new zk(t)},hMt=(_(),w(P)),Fk=class extends X1{updatePathSelections(){this.lineSelection.update(this.visible?[!0]:[])}};Fk.className="RadarLineSeries",Fk.type="radar-line";var uMt=(_(),w(P)),Xh=(R(),w(st)),{commonSeriesOptionsDefs:dMt,radarLineSeriesThemeableOptionsDef:pMt}=uMt._ModuleSupport,gMt={...dMt,...pMt,type:(0,Xh.required)((0,Xh.constant)("radar-line")),angleKey:(0,Xh.required)(Xh.string),radiusKey:(0,Xh.required)(Xh.string),angleName:Xh.string,radiusName:Xh.string},{POLAR_AXIS_TYPE:K5}=hMt._ModuleSupport.ThemeConstants,fMt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radar-line",moduleFactory:t=>new Fk(t),defaultAxes:[{type:K5.ANGLE_CATEGORY},{type:K5.RADIUS_NUMBER}],themeTemplate:M0t},mMt={type:"series",name:"radar-line",chartType:"polar",enterprise:!0,options:gMt,create:t=>new Fk(t)},yMt=(_(),w(P)),lb=(_(),w(P)),xMt=(R(),w(st)),bMt=(_(),w(P)),{SeriesProperties:vMt,FillGradientDefaults:SMt,FillPatternDefaults:MMt,FillImageDefaults:DMt,makeSeriesTooltip:kMt,Property:Bi,Label:IMt}=bMt._ModuleSupport,Ii=class extends vMt{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new SMt,this.fillPatternDefaults=new MMt,this.fillImageDefaults=new DMt,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 IMt,this.tooltip=kMt()}};y([Bi],Ii.prototype,"angleKey",2),y([Bi],Ii.prototype,"radiusKey",2),y([Bi],Ii.prototype,"angleName",2),y([Bi],Ii.prototype,"radiusName",2),y([Bi],Ii.prototype,"fill",2),y([Bi],Ii.prototype,"fillGradientDefaults",2),y([Bi],Ii.prototype,"fillPatternDefaults",2),y([Bi],Ii.prototype,"fillImageDefaults",2),y([Bi],Ii.prototype,"fillOpacity",2),y([Bi],Ii.prototype,"stroke",2),y([Bi],Ii.prototype,"strokeWidth",2),y([Bi],Ii.prototype,"strokeOpacity",2),y([Bi],Ii.prototype,"lineDash",2),y([Bi],Ii.prototype,"lineDashOffset",2),y([Bi],Ii.prototype,"cornerRadius",2),y([Bi],Ii.prototype,"itemStyler",2),y([Bi],Ii.prototype,"rotation",2),y([Bi],Ii.prototype,"stackGroup",2),y([Bi],Ii.prototype,"normalizedTo",2),y([Bi],Ii.prototype,"label",2),y([Bi],Ii.prototype,"tooltip",2);var AMt=(_(),w(P)),{SectorBox:Y5,motion:CMt}=AMt._ModuleSupport;function LMt(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 Z5(t){return{toFn:(s,a,n)=>{let o,r,l,c,h;return n==="removed"?(o=t,r=t,l=a.innerRadius,c=a.outerRadius,h=new Y5(o,r,l,c)):(o=a.startAngle,r=a.endAngle,l=isNaN(a.innerRadius)?s.innerRadius:a.innerRadius,c=isNaN(a.outerRadius)?s.outerRadius:a.outerRadius,h=a.clipSector),{startAngle:o,endAngle:r,innerRadius:l,outerRadius:c,clipSector:h}},fromFn:(s,a,n)=>{n=LMt(s,a,n);let o,r,l,c,h;n==="removed"||n==="updated"?(o=s.startAngle,r=s.endAngle,l=s.innerRadius,c=s.outerRadius,h=s.clipSector):(o=t,r=t,l=a.innerRadius,c=a.outerRadius),h??(h=new Y5(o,r,l,c));const u=CMt.NODE_UPDATE_STATE_TO_PHASE_MAPPING[n];return{startAngle:o,endAngle:r,innerRadius:l,outerRadius:c,clipSector:h,phase:u}}}}function wMt(t,e){return{centerX:0,centerY:0,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clipSector:e.clipSector}}var{DEFAULT_POLAR_DIRECTION_KEYS:TMt,DEFAULT_POLAR_DIRECTION_NAMES:NMt,ChartAxisDirection:cr,PolarAxis:OMt,diff:PMt,groupAccumulativeValueProperty:X5,keyProperty:_Mt,normaliseGroupTo:EMt,valueProperty:RMt,fixNumericExtent:BMt,resetLabelFn:zMt,seriesLabelFadeInAnimation:FMt,seriesLabelFadeOutAnimation:VMt,animationValidation:GMt,angleBetween:jMt,createDatumId:q5,CategoryScale:WMt,Sector:HMt,SectorBox:$Mt,motion:Q5,isGradientFill:UMt,applyShapeStyle:KMt,getShapeStyle:q1}=lb._ModuleSupport,YMt=class extends lb._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey}},Vk=class extends lb._ModuleSupport.PolarSeries{constructor(t){super({moduleCtx:t,categoryKey:"radiusValue",propertyKeys:TMt,propertyNames:NMt,canHaveAxes:!0,animationResetFns:{item:wMt,label:zMt}}),this.properties=new Ii,this.NodeEvent=YMt,this.groupScale=new WMt,this.circleCache={r:0,cx:0,cy:0}}get defaultShapeStyle(){const t=this.axes[cr.Angle]?.scale;return{...this.properties.fillGradientDefaults.toJson(),rotation:lb._ModuleSupport.toDegrees(t.range[0])+90}}nodeFactory(){return new HMt}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===cr.Angle){const s=e.getDomain(this,"angleValue-end","value",i),a=[s[0]>0?0:s[0],s[1]<0?0:s[1]];return BMt(a)}else return e.getDomain(this,"radiusValue","key",i)}async processData(t){const{angleKey:e,radiusKey:i,normalizedTo:s}=this.properties,a=!this.ctx.animationManager.isSkipped(),n=this.getStackId(),o=`${n}-trailing`,r=[];(0,xMt.isDefined)(s)&&r.push(EMt([n,o],Math.abs(s))),a&&(this.processedData&&r.push(PMt(this.id,this.processedData)),r.push(GMt()));const l=this.visible?{}:{forceValue:0},c=this.axes[cr.Radius]?.scale.type,h=this.axes[cr.Angle]?.scale.type;await this.requestDataModel(t,this.data,{props:[_Mt(i,c,{id:"radiusValue"}),RMt(e,h,{id:"angleValue-raw",invalidValue:null,...l}),...X5(e,"normal","current",{id:"angleValue-end",rangeId:"angleValue-range",invalidValue:null,groupId:n,separateNegative:!0,...l},h),...X5(e,"trailing","current",{id:"angleValue-start",invalidValue:null,groupId:o,separateNegative:!0,...l},h),...r],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,s=this.circleCache;return t===s.r&&e===s.cx&&i===s.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[cr.Radius];return t instanceof OMt?this.radius*t.innerRadiusRatio:0}createNodeData(){const{processedData:t,dataModel:e}=this;if(!e||!t||t.type!=="grouped")return;const i=this.axes[cr.Angle],s=this.axes[cr.Radius],a=i?.scale,n=s?.scale;if(!a||!n)return;const o=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 u=0;s instanceof Sh&&(u=s.groupPaddingInner);const{groupScale:d}=this,{index:p,visibleGroupCount:g}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);d.domain=Array.from({length:g}).map((V,G)=>String(G)),d.range=[0,Math.abs(n.bandwidth??0)],d.paddingInner=g>1?u:0;const f=d.bandwidth>=1?d.bandwidth:d.rawBandwidth,x=i.isReversed(),m=s.isReversed(),b=m?this.radius:this.getAxisInnerRadius(),M=(m?this.getAxisInnerRadius():this.radius)+b,D=this.getSeriesDomain(cr.Angle),{angleKey:L,radiusKey:C,angleName:A,radiusName:T,label:N}=this.properties,O=(V,G,H,$)=>{const W=this.getLabelText(G,V,L,"angle",D,N,{value:G,datum:V,angleKey:L,radiusKey:C,angleName:A,radiusName:T});if(W)return{x:H,y:$,text:W,textAlign:"center",textBaseline:"middle"}},E=[],z={itemId:C,nodeData:E,labelData:E};if(!this.visible)return z;const{dataSources:B}=t,F=B.get(this.id)??[];for(const{datumIndex:V,group:G}of e.forEachGroupDatum(this,t)){const H=F[V],$=o[V];if($==null)return;const W=c[V],j=r[V],U=l[V],Z=W>=0&&!Object.is(W,-0),X=G.aggregation[h][Z?1:0],q=Z===x;let tt=a.convert(j,{clamp:!0}),J=a.convert(U,{clamp:!0}),at=a.convert(0,{clamp:!0}),et=a.convert(X,{clamp:!0});q&&([at,et]=[et,at],[tt,J]=[J,tt]);const ct=M-n.convert($)+d.convert(String(p)),ht=ct+f,xt=(ct+ht)/2,kt=tt+jMt(tt,J)/2,Dt=Math.cos(kt)*xt,St=Math.sin(kt)*xt,Xt=this.properties.label.enabled?O(H,W,Dt,St):void 0,ke=new $Mt(tt,J,ct,ht);E.push({series:this,datum:H,datumIndex:V,point:{x:Dt,y:St,size:0},midPoint:{x:Dt,y:St},label:Xt,angleValue:W,radiusValue:$,innerRadius:ct,outerRadius:ht,startAngle:at,endAngle:et,clipSector:ke,reversed:q,index:V})}return z}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,e){const{properties:i}=this,s=this.getHighlightStyle(t,e?.datumIndex);return q1({fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset,cornerRadius:s?.cornerRadius??i.cornerRadius,opacity:s.opacity??1},this.defaultShapeStyle,i.fillPatternDefaults,i.fillImageDefaults)}getItemStyleOverrides(t,e,i,s){const{id:a,properties:n}=this,{angleKey:o,radiusKey:r,itemStyler:l}=n;let c;return l!=null&&(c=this.cachedDatumCallback(q5(t,s?"highlight":"node"),()=>this.callWithContext(l,{seriesId:a,datum:e,highlighted:s,angleKey:o,radiusKey:r,...i}))),q1(c,this.defaultShapeStyle,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateSectorSelection(t,e){let i=[];if(e){const a=this.ctx.highlightManager?.getActiveHighlight();a?.datum&&a.series===this&&i.push(a)}else i=this.nodeData;const s=this.getShapeFillBBox();t.update(i,void 0,a=>this.getDatumId(a)).each((a,n)=>{const{datumIndex:o}=n,r=pf(n);if(r==null)return;const l=this.getItemBaseStyle(e,n),c=this.getItemStyleOverrides(String(o),r,l,e),h=c?.cornerRadius??l.cornerRadius,u=c?.fill??l.fill,d=lb._ModuleSupport.isGradientFill(u)&&u.bounds!=="item"?{centerX:0,centerY:0}:void 0;KMt(a,l,c,s,d),a.lineJoin="round",a.inset=a.stroke!=null?a.strokeWidth/2:0,a.startInnerCornerRadius=r.reversed?h:0,a.startOuterCornerRadius=r.reversed?h:0,a.endInnerCornerRadius=r.reversed?0:h,a.endOuterCornerRadius=r.reversed?0:h,e&&(a.startAngle=n.startAngle,a.endAngle=n.endAngle,a.clipSector=n.clipSector,a.innerRadius=n.innerRadius,a.outerRadius=n.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.fillOpacity=this.getHighlightStyle(!1,i.datumIndex).opacity??1,e.visible=!0):e.visible=!1})}getBarTransitionFunctions(){const t=this.axes[cr.Angle]?.scale;let e=0;if(!t)return Z5(e);const i=Math.min(t.domain[0],t.domain[1]),s=Math.max(t.domain[0],t.domain[1]);return i<=0&&s>=0&&(e=t.convert(0)),Z5(e)}animateEmptyUpdateReady(){const{labelSelection:t}=this,e=this.getBarTransitionFunctions();Q5.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],e),FMt(this,"labels",this.ctx.animationManager,t)}animateClearingUpdateEmpty(){const{itemSelection:t}=this,{animationManager:e}=this.ctx,i=this.getBarTransitionFunctions();Q5.fromToMotion(this.id,"datums",e,[t],i),VMt(this,"labels",e,this.labelSelection)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:a,properties:n}=this,{angleKey:o,angleName:r,radiusKey:l,radiusName:c,tooltip:h}=n,u=a[cr.Angle],d=a[cr.Radius];if(!i||!s||!u||!d)return;const p=s.dataSources.get(this.id)?.[t],g=i.resolveKeysById(this,"radiusValue",s)[t],f=i.resolveColumnById(this,"angleValue-raw",s)[t];if(g==null)return;const x=this.getItemBaseStyle(!1);return Object.assign(x,this.getItemStyleOverrides(String(t),t,x,!1)),this.formatTooltipWithContext(h,{heading:d.formatDatum(g,"tooltip",e,void 0,p,l),symbol:this.legendItemSymbol(),data:[{label:r,fallbackLabel:o,value:u.formatDatum(f,"tooltip",e,void 0,p,o)}]},{seriesId:e,datum:p,title:r,angleKey:o,angleName:r,radiusKey:l,radiusName:c,...x})}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.itemSelection.nodes())}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:o,fillPatternDefaults:r,fillImageDefaults:l}=this.properties,c=q1({fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:o},this.defaultShapeStyle,r,l);return UMt(c.fill)&&(c.fill={...c.fill,gradient:"linear",rotation:0,reverse:!1}),{marker:c}}getLegendData(t){if(t!=="category")return[];const{id:e,visible:i}=this,{angleKey:s,angleName:a,showInLegend:n}=this.properties;return[{legendType:"category",id:e,itemId:s,seriesId:e,enabled:i,label:{text:a??s},symbol:this.legendItemSymbol(),hideInLegend:!n}]}getDatumId(t){return q5(t.radiusValue)}computeLabelsBBox(){return null}getStackId(){return`radialBar-stack-${this.seriesGrouping?.groupIndex??this.id}-xValues`}};Vk.className="RadialBarSeries",Vk.type="radial-bar";var ZMt=(_(),w(P)),Do=(R(),w(st)),{commonSeriesOptionsDefs:XMt,radialBarSeriesThemeableOptionsDef:qMt}=ZMt._ModuleSupport,QMt={...XMt,...qMt,type:(0,Do.required)((0,Do.constant)("radial-bar")),angleKey:(0,Do.required)(Do.string),radiusKey:(0,Do.required)(Do.string),angleName:Do.string,radiusName:Do.string,grouped:Do.boolean,stacked:Do.boolean,stackGroup:Do.string,normalizedTo:Do.number},Gk=(_(),w(P)),{ThemeConstants:{POLAR_AXIS_TYPE:JMt}}=Gk._ModuleSupport,tDt={series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"conic",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Gk._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:Gk._ModuleSupport.FILL_IMAGE_DEFAULTS,strokeWidth:{$isUserOption:["./stroke",1,0]},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"}},highlight:Gk._ModuleSupport.multiSeriesHighlightStyle()},axes:{[JMt.RADIUS_CATEGORY]:{innerRadiusRatio:.2,groupPaddingInner:.2,paddingInner:.2,paddingOuter:.1}}},{POLAR_AXIS_TYPE:J5}=yMt._ModuleSupport.ThemeConstants,eDt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radial-bar",moduleFactory:t=>new Vk(t),defaultAxes:[{type:J5.ANGLE_NUMBER},{type:J5.RADIUS_CATEGORY}],themeTemplate:tDt,stackable:!0,groupable:!0},iDt={type:"series",name:"radial-bar",chartType:"polar",enterprise:!0,options:QMt,create:t=>new Vk(t)},sDt=(_(),w(P)),aDt=(_(),w(P)),nDt=(_(),w(P)),{Property:tY}=nDt._ModuleSupport,Q1=class extends pi{};y([tY],Q1.prototype,"columnWidthRatio",2),y([tY],Q1.prototype,"maxColumnWidthRatio",2);var{ChartAxisDirection:oDt,PolarAxis:rDt,RadialColumnShape:lDt,getRadialColumnWidth:cDt}=aDt._ModuleSupport,jk=class extends I5{constructor(t){super(t,{animationResetFns:{item:BSt}}),this.properties=new Q1}getStackId(){return`radarColumn-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new lDt}getColumnTransitionFunctions(){const t=this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius();return RSt(t)}isRadiusAxisCircle(){const t=this.axes[oDt.Radius];return t instanceof rDt?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:s=.5}=this.properties;return cDt(t,e,this.radius,i,s)}};jk.className="RadialColumnSeries",jk.type="radial-column";var hDt=(_(),w(P)),ko=(R(),w(st)),{commonSeriesOptionsDefs:uDt,radialColumnSeriesThemeableOptionsDef:dDt}=hDt._ModuleSupport,pDt={...uDt,...dDt,type:(0,ko.required)((0,ko.constant)("radial-column")),angleKey:(0,ko.required)(ko.string),radiusKey:(0,ko.required)(ko.string),angleName:ko.string,radiusName:ko.string,grouped:ko.boolean,stacked:ko.boolean,stackGroup:ko.string,normalizedTo:ko.number},Wk=(_(),w(P)),{ThemeConstants:{POLAR_AXIS_TYPE:eY,POLAR_AXIS_SHAPE:iY}}=Wk._ModuleSupport,gDt={series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Wk._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:Wk._ModuleSupport.FILL_IMAGE_DEFAULTS,columnWidthRatio:.5,maxColumnWidthRatio:.5,strokeWidth:{$isUserOption:["./stroke",1,0]},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},highlight:Wk._ModuleSupport.multiSeriesHighlightStyle()},axes:{[eY.ANGLE_CATEGORY]:{shape:{$findFirstSiblingNotOperation:iY.CIRCLE},groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[eY.RADIUS_NUMBER]:{shape:{$findFirstSiblingNotOperation:iY.CIRCLE},innerRadiusRatio:.5}}},{POLAR_AXIS_TYPE:sY}=sDt._ModuleSupport.ThemeConstants,fDt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radial-column",moduleFactory:t=>new jk(t),defaultAxes:[{type:sY.ANGLE_CATEGORY},{type:sY.RADIUS_NUMBER}],themeTemplate:gDt,stackable:!0,groupable:!0},mDt={type:"series",name:"radial-column",chartType:"polar",enterprise:!0,options:pDt,create:t=>new jk(t)},Hk=(_(),w(P)),dp=(_(),w(P)),yDt=(_(),w(P)),{SvgPath:xDt,Rotatable:bDt,Translatable:vDt,Scalable:SDt}=yDt._ModuleSupport,J1=class extends bDt(SDt(vDt(xDt))){constructor(){super(...arguments),this.scalingCenterX=.5,this.scalingCenterY=.5,this.rotationCenterX=.5,this.rotationCenterY=.5}};J1.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 tP=(_(),w(P)),tAt=(R(),w(st)),{BaseProperties:cb,makeSeriesTooltip:MDt,SeriesProperties:DDt,PropertiesArray:eP,AxisLabel:kDt,Property:bt,Label:IDt}=tP._ModuleSupport,aY=class extends IDt{};y([bt],aY.prototype,"spacing",2);var Xs=class extends cb{constructor(){super(...arguments),this.label=new aY}};y([bt],Xs.prototype,"text",2),y([bt],Xs.prototype,"value",2),y([bt],Xs.prototype,"shape",2),y([bt],Xs.prototype,"placement",2),y([bt],Xs.prototype,"spacing",2),y([bt],Xs.prototype,"size",2),y([bt],Xs.prototype,"rotation",2),y([bt],Xs.prototype,"fill",2),y([bt],Xs.prototype,"fillOpacity",2),y([bt],Xs.prototype,"stroke",2),y([bt],Xs.prototype,"strokeWidth",2),y([bt],Xs.prototype,"strokeOpacity",2),y([bt],Xs.prototype,"lineDash",2),y([bt],Xs.prototype,"lineDashOffset",2),y([bt],Xs.prototype,"label",2);var hr=class extends cb{constructor(){super(...arguments),this.enabled=!0,this.fills=new eP(tP._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};y([bt],hr.prototype,"enabled",2),y([bt],hr.prototype,"fills",2),y([bt],hr.prototype,"fillMode",2),y([bt],hr.prototype,"fill",2),y([bt],hr.prototype,"fillOpacity",2),y([bt],hr.prototype,"stroke",2),y([bt],hr.prototype,"strokeWidth",2),y([bt],hr.prototype,"strokeOpacity",2),y([bt],hr.prototype,"lineDash",2),y([bt],hr.prototype,"lineDashOffset",2);var hb=class extends cb{constructor(){super(...arguments),this.values=void 0,this.step=void 0,this.minSpacing=0,this.maxSpacing=1e3}};y([bt],hb.prototype,"values",2),y([bt],hb.prototype,"step",2),y([bt],hb.prototype,"minSpacing",2),y([bt],hb.prototype,"maxSpacing",2);var ADt=class extends kDt{},Aa=class extends cb{constructor(){super(...arguments),this.min=0,this.max=1,this.fills=new eP(tP._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",this.interval=new hb,this.label=new ADt}};y([bt],Aa.prototype,"min",2),y([bt],Aa.prototype,"max",2),y([bt],Aa.prototype,"fills",2),y([bt],Aa.prototype,"fillMode",2),y([bt],Aa.prototype,"fill",2),y([bt],Aa.prototype,"fillOpacity",2),y([bt],Aa.prototype,"stroke",2),y([bt],Aa.prototype,"strokeWidth",2),y([bt],Aa.prototype,"strokeOpacity",2),y([bt],Aa.prototype,"lineDash",2),y([bt],Aa.prototype,"lineDashOffset",2),y([bt],Aa.prototype,"defaultFill",2),y([bt],Aa.prototype,"interval",2),y([bt],Aa.prototype,"label",2);var ur=class extends cb{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}};y([bt],ur.prototype,"enabled",2),y([bt],ur.prototype,"radiusRatio",2),y([bt],ur.prototype,"spacing",2),y([bt],ur.prototype,"fill",2),y([bt],ur.prototype,"fillOpacity",2),y([bt],ur.prototype,"stroke",2),y([bt],ur.prototype,"strokeWidth",2),y([bt],ur.prototype,"strokeOpacity",2),y([bt],ur.prototype,"lineDash",2),y([bt],ur.prototype,"lineDashOffset",2);var nY=class extends il{};y([bt],nY.prototype,"text",2);var oY=class extends Hx{};y([bt],oY.prototype,"text",2);var zi=class extends DDt{constructor(){super(...arguments),this.startAngle=0,this.endAngle=0,this.segmentation=new ib,this.defaultColorRange=[],this.targets=new eP(Xs),this.defaultTarget=new Xs,this.outerRadiusRatio=1,this.innerRadiusRatio=1,this.cornerRadius=0,this.cornerMode="container",this.spacing=0,this.scale=new Aa,this.bar=new hr,this.needle=new ur,this.label=new nY,this.secondaryLabel=new oY,this.tooltip=MDt()}};y([bt],zi.prototype,"value",2),y([bt],zi.prototype,"startAngle",2),y([bt],zi.prototype,"endAngle",2),y([bt],zi.prototype,"segmentation",2),y([bt],zi.prototype,"defaultColorRange",2),y([bt],zi.prototype,"targets",2),y([bt],zi.prototype,"defaultTarget",2),y([bt],zi.prototype,"outerRadiusRatio",2),y([bt],zi.prototype,"innerRadiusRatio",2),y([bt],zi.prototype,"outerRadius",2),y([bt],zi.prototype,"innerRadius",2),y([bt],zi.prototype,"cornerRadius",2),y([bt],zi.prototype,"cornerMode",2),y([bt],zi.prototype,"spacing",2),y([bt],zi.prototype,"scale",2),y([bt],zi.prototype,"bar",2),y([bt],zi.prototype,"needle",2),y([bt],zi.prototype,"label",2),y([bt],zi.prototype,"secondaryLabel",2),y([bt],zi.prototype,"tooltip",2);var CDt=(_(),w(P)),{SectorBox:iP}=CDt._ModuleSupport;function LDt(t){const{startAngle:e,endAngle:i,clipStartAngle:s,clipEndAngle:a,innerRadius:n,outerRadius:o}=t;if(!(s==null||a==null))return new iP(Math.max(s,e),Math.min(a,i),n,o)}function rY(t,e,i){return Math.max(t,i.startAngle)<=Math.min(e,i.endAngle)}function sP(t){return t.clipStartAngle!=null&&t.clipEndAngle!=null}function aP(t,e){const{clipStartAngle:i,clipEndAngle:s,innerRadius:a,outerRadius:n}=t;return new iP(i,e?i:s,a,n)}function lY(t,e){const i=t?"initial":"update";return{node:{fromFn(n,o){const r=n.previousDatum;let{startAngle:l,endAngle:c}=r??o;const h=r!=null&&sP(r)?aP(r,t):void 0,u=sP(o)?aP(o,t):void 0;let d;return h!=null&&u!=null?d=h:h==null&&u!=null?(d=u,l=o.startAngle,c=o.endAngle):h!=null&&u==null?(d=void 0,l=o.startAngle,c=o.endAngle):t&&(c=l),{startAngle:l,endAngle:c,clipSector:d,phase:i}},toFn(n,o){const{startAngle:r,endAngle:l}=o;let c;return sP(o)&&(c=aP(o,!1)),{startAngle:r,endAngle:l,clipSector:c}},applyFn(n,o){const{startAngle:r,endAngle:l}=o;let{clipSector:c}=o;c!=null&&(c=new iP(Math.max(r,c.startAngle),Math.min(l,c.endAngle),c.innerRadius,c.outerRadius));const h=c==null||rY(r,l,c);n.startAngle=r,n.endAngle=l,n.clipSector=c,n.visible=h}},needle:{fromFn(n){let{angle:o}=n.previousDatum??n.datum;return t&&(o=e),{rotation:o,phase:i}},toFn(n,o){const{angle:r}=o;return{rotation:r}}}}}function nP(t,e){const{startAngle:i,endAngle:s}=e,a=LDt(e),n=a==null||rY(i,s,a);return{startAngle:i,endAngle:s,clipSector:a,visible:n}}function cY(t,e){const{angle:i}=e;return{rotation:i}}var wDt={top:0,middle:.5,bottom:1};function TDt(t,e,i,s,a,n){const{padding:o,textAlign:r,verticalAlign:l}=s;let c,h;if(i.each((D,L)=>{L.label==="primary"?c=L:L.label==="secondary"&&(h=L)}),c==null)return;const u=eb(t.id,e,c,n?.label);if(u==null)return;const d=h!=null?eb(t.id,e,h,n?.secondaryLabel):void 0,p={padding:o},g=r==="center"?2:1,f=l==="middle"?2:1,x=D=>({width:Math.sqrt(Math.max(a**2-(D/f)**2,0))*g,height:Math.min(D,f*a),meta:null});let m,b,v;if(h!=null&&d!=null){const D=b$(u,c,d,h,p,x);m=D?.label,b=D?.secondaryLabel,v=D?.height??0}else{const D=jx(u,c,p,x);m=D?.[0],b=void 0,v=D?.[0].height??0}const M=v*wDt[l];i.each((D,L)=>{let C;if(L.label==="primary"?C=m:L.label==="secondary"&&(C=b),C==null){D.visible=!1;return}D.visible=!0,D.text=C.text,D.fontSize=C.fontSize,D.lineHeight=C.lineHeight,D.textAlign=r,D.textBaseline="middle";const A=L.label==="primary"?C.height/2:v-C.height/2;D.y=L.centerY+A-M,D.x=L.centerX})}var{fromToMotion:ub,resetMotion:hY,CachedTextMeasurerPool:NDt,SeriesNodePickMode:uY,StateMachine:ODt,createDatumId:oP,normalizeAngle360:dY,normalizeAngle360Inclusive:rP,isBetweenAngles:$k,sectorBox:PDt,toDegrees:_Dt,toRadians:Uk,BBox:EDt,Group:qh,PointerEvents:Kk,Selection:Qh,Sector:RDt,SectorBox:BDt,Text:pY,Marker:zDt,getColorStops:FDt,tickFormat:VDt}=dp._ModuleSupport,GDt={inside:90,middle:0,outside:-90},jDt=[{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"},{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"}],WDt=[{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"},{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"}],Yk=class extends dp._ModuleSupport.Series{constructor(t){super({moduleCtx:t,pickModes:[uY.EXACT_SHAPE_MATCH,uY.NEAREST_NODE]}),this.centerX=0,this.centerY=0,this.radius=0,this.textAlign="center",this.verticalAlign="middle",this.properties=new zi,this.scale=new eW,this.scaleGroup=this.contentGroup.appendChild(new qh({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new qh({name:"itemGroup"})),this.itemNeedleGroup=this.contentGroup.appendChild(new qh({name:"itemNeedleGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new qh({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new qh({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new qh({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new qh({name:"itemTargetLabelGroup"})),this.tickGroup=this.contentGroup.appendChild(new qh({name:"tickGroup"})),this.scaleSelection=Qh.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=Qh.select(this.itemGroup,()=>this.nodeFactory()),this.needleSelection=Qh.select(this.itemNeedleGroup,J1),this.targetSelection=Qh.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=Qh.select(this.itemTargetLabelGroup,pY),this.labelSelection=Qh.select(this.itemLabelGroup,pY),this.highlightTargetSelection=Qh.select(this.highlightTargetGroup,()=>this.markerFactory()),this.tickSelection=Qh.select(this.tickGroup,dp._ModuleSupport.TransformableText),this.datumUnion=new NK,this.animationState=new ODt("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=Kk.None,this.tickGroup.pointerEvents=Kk.None,this.itemNeedleGroup.pointerEvents=Kk.None,this.itemLabelGroup.pointerEvents=Kk.None}get hasData(){return this.properties.value!=null}nodeFactory(){return new RDt}markerFactory(){const t=new zDt;return t.size=1,t}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(t){const{min:e,max:i}=this.properties.scale;return PK(t,{min:e,max:i})}layoutScale(){const{scale:t,properties:e}=this,{seriesRectWidth:i,seriesRectHeight:s}=this.nodeDataDependencies,{scale:a,outerRadius:n}=this.properties,{min:o,max:r,label:l,interval:c}=a,h=Uk(e.startAngle-90),u=Uk(e.endAngle-90),p=rP(u-h)>Math.PI,g=p||$k(1.5*Math.PI,h,u),f=p||$k(0*Math.PI,h,u),x=p||$k(.5*Math.PI,h,u),m=p||$k(1*Math.PI,h,u);let b;m&&!f?b="right":!m&&f?b="left":b="center";let v;g&&!x?v="bottom":!g&&x?v="top":v="middle";const M=PDt({startAngle:h,endAngle:u,innerRadius:0,outerRadius:.5}),D=-(M.x+M.width/2)*2,L=-(M.y+M.height/2)*2,C=Math.min(i/M.width,s/M.height);t.domain=[o,r],t.range=[h,u],t.arcLength=C/2;const{maxSpacing:A,minSpacing:T}=c,{arcLength:N}=t,O=A?Math.floor(N/A):1,E=T?Math.floor(N/T):1/0,z=Math.floor(4/Math.PI*Math.abs(t.range[0]-t.range[1])),B=Math.max(O,Math.min(E,z)),F=c.values??t.ticks({nice:!1,interval:c.step,minTickCount:O,maxTickCount:E,tickCount:B})?.ticks??[],V=VDt(F,typeof l.format=="string"?l.format:void 0),G=NDt.getMeasurer({font:l}),H=F.map((X,q)=>{let tt;if(l.formatter&&(tt=Qx(this.ctx,l.formatter,{value:X,index:q,domain:t.domain,boundSeries:void 0})),tt??(tt=V?.(X)),tt==null)return;const{width:J,height:at}=G.measureText(tt);return{index:q,value:X,text:tt,width:J,height:at}}).filter(X=>X!=null),$=H.reduce((X,q)=>Math.max(X,q.width),0),W=H.reduce((X,q)=>Math.max(X,q.height),0),j=l.enabled?Math.max($,W)+l.spacing:0,U=Math.max(.5*C-j,0),Z=n??U;return this.centerX=i/2+D*Z,this.centerY=s/2+L*Z,this.radius=Z,this.textAlign=b,this.verticalAlign=v,H}createConicGradient(t,e){const{scale:i}=this,{domain:s,range:a}=i,[n,o]=a,{defaultColorRange:r}=this.properties,l=dY((n+o)/2+Math.PI),c=rP(o-n);return{type:"gradient",gradient:"conic",colorSpace:"oklch",colorStops:FDt(t,r,s,e).map(({color:u,stop:d})=>(d=Math.min(Math.max(d,0),1),d=(n+c*d-l)/(2*Math.PI),d=(d%1+1)%1,{stop:d,color:u})),rotation:_Dt(l)+90}}getShapeFillBBox(){const{centerX:t,centerY:e,radius:i}=this;return new EDt(t-i,e-i,2*i,2*i)}getTargets(){const{properties:t}=this,e=t.defaultTarget;return Array.from(t.targets).map(i=>{const{text:s=e.text,value:a=e.value??0,shape:n=e.shape??"triangle",rotation:o=e.rotation??0,strokeWidth:r=e.strokeWidth??0,placement:l=e.placement??"middle",spacing:c=e.spacing??0,size:h=e.size??0,fill:u=e.fill??"black",fillOpacity:d=e.fillOpacity??1,stroke:p=e.stroke??"black",strokeOpacity:g=e.strokeOpacity??1,lineDash:f=e.lineDash??[0],lineDashOffset:x=e.lineDashOffset??0}=i,{enabled:m=e.label.enabled,color:b=e.label.color??"black",fontStyle:v=e.label.fontStyle??"normal",fontWeight:M=e.label.fontWeight??"normal",fontSize:D=e.label.fontSize,fontFamily:L=e.label.fontFamily,spacing:C=e.label.spacing??0}=i.label;return{text:s,value:a,shape:n,placement:l,spacing:c,size:h,rotation:o,fill:u,fillOpacity:d,stroke:p,strokeWidth:r,strokeOpacity:g,lineDash:f,lineDashOffset:x,label:{enabled:m,color:b,fontStyle:v,fontWeight:M,fontSize:D,fontFamily:L,spacing:C}}})}getTargetRadius(t){const{radius:e,properties:i}=this,{innerRadiusRatio:s,outerRadiusRatio:a}=i,{placement:n,spacing:o,size:r}=t,l=e*a,c=e*s;switch(n){case"inside":return Math.max(c-o-r/2,0);case"outside":return l+o+r/2;default:return(c+l)/2}}getTargetLabel(t){const{scale:e}=this,{value:i,size:s,placement:a,label:n}=t,{spacing:o,color:r,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u}=n,d=void 0,p=e.convert(i),g=dY(p)/(Math.PI/2)|0,f=s/2+o;let x,m,b,v;switch(a){case"outside":({textAlign:x,textBaseline:m}=jDt[g]),b=f*Math.cos(p),v=f*Math.sin(p);break;case"inside":({textAlign:x,textBaseline:m}=WDt[g]),b=-f*Math.cos(p),v=-f*Math.sin(p);break;default:x="center",m="bottom",b=0,v=-f;break}return{offsetX:b,offsetY:v,fill:r,textAlign:x,textBaseline:m,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u,lineHeight:d}}createNodeData(){const t=this.layoutScale(),{id:e,scale:i,properties:s,radius:a,centerX:n,centerY:o}=this,{value:r,innerRadiusRatio:l,outerRadiusRatio:c,segmentation:h,cornerRadius:u,cornerMode:d,needle:p,bar:g,scale:f,label:x,secondaryLabel:m}=s,{outerRadius:b=a*c,innerRadius:v=a*l}=s,M=this.getTargets(),D=[],L=[],C=[],A=[],T=[],N=d==="item",O=i.convert(i.domain[0]),E=i.convert(r),z=Math.ceil(rP(E-O)*a);let B=h.enabled?h.interval.getSegments(i,z):void 0;const F=g.enabled?g.fill??this.createConicGradient(g.fills,g.fillMode):"rgba(0,0,0,0)",V=f.fill??(g.enabled&&f.fills.length===0?f.defaultFill:void 0)??this.createConicGradient(f.fills,f.fillMode);if(B==null&&N){const G=Math.min(...i.domain),H=Math.max(...i.domain),$={value:r,segmentStart:G,segmentEnd:H},j=Math.min(u,(b-v)/2)/((v+b)/2);D.push({series:this,itemId:"value",datum:$,datumIndex:{type:0},type:0,centerX:n,centerY:o,outerRadius:b,innerRadius:v,startAngle:O-j,endAngle:E+j,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:u,endCornerRadius:u,fill:F}),T.push({series:this,itemId:"scale",datum:$,datumIndex:{type:0},type:0,centerX:n,centerY:o,outerRadius:b,innerRadius:v,startAngle:i.range[0]-j,endAngle:i.range[1]+j,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:u,endCornerRadius:u,fill:V})}else{B??(B=i.domain);for(let G=0;G<B.length-1;G++){const H=B[G],$=B[G+1],W={value:r,segmentStart:H,segmentEnd:$},j=G===0,U=G===B.length-2,Z=i.convert(H),X=i.convert($);D.push({series:this,itemId:`value-${G}`,datum:W,datumIndex:{type:0},type:0,centerX:n,centerY:o,outerRadius:b,innerRadius:v,startAngle:Z,endAngle:X,clipStartAngle:O,clipEndAngle:E,startCornerRadius:N||j?u:0,endCornerRadius:N||U?u:0,fill:F}),T.push({series:this,itemId:`scale-${G}`,datum:W,datumIndex:{type:0},type:0,centerX:n,centerY:o,outerRadius:b,innerRadius:v,startAngle:Z,endAngle:X,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:N||j?u:0,endCornerRadius:N||U?u:0,fill:V})}}if(!p.enabled&&x.enabled){const{text:G,color:H,fontSize:$,minimumFontSize:W,fontStyle:j,fontWeight:U,fontFamily:Z,lineHeight:X,formatter:q=tt=>this.formatLabel(tt.value)}=x;A.push({label:"primary",centerX:n,centerY:o,text:G,value:r,fill:H,fontSize:$,minimumFontSize:W,fontStyle:j,fontWeight:U,fontFamily:Z,lineHeight:X,formatter:q})}if(!p.enabled&&m.enabled){const{text:G,color:H,fontSize:$,minimumFontSize:W,fontStyle:j,fontWeight:U,fontFamily:Z,lineHeight:X,formatter:q}=m;A.push({label:"secondary",centerX:n,centerY:o,text:G,value:r,fill:H,fontSize:$,minimumFontSize:W,fontStyle:j,fontWeight:U,fontFamily:Z,lineHeight:X,formatter:q})}if(p.enabled){let G=p.radiusRatio!=null?a*p.radiusRatio:v;G=Math.max(G-p.spacing,0);const H=i.convert(r);C.push({centerX:n,centerY:o,radius:G,angle:H,series:this})}for(let G=0;G<M.length;G+=1){const H=M[G],{value:$,text:W,size:j,shape:U,fill:Z,fillOpacity:X,stroke:q,strokeWidth:tt,strokeOpacity:J,lineDash:at,lineDashOffset:et}=H;if($<Math.min(...i.domain)||$>Math.max(...i.domain))continue;const it=this.getTargetRadius(H),ct=i.convert($),ht=Uk(H.rotation+GDt[H.placement]);L.push({series:this,itemId:`target-${G}`,midPoint:{x:it*Math.cos(ct)+n,y:it*Math.sin(ct)+o},datum:{value:$},datumIndex:{type:1,index:G},type:1,value:$,text:W,centerX:n,centerY:o,shape:U,radius:it,angle:ct,rotation:ht,size:j,fill:Z,fillOpacity:X,stroke:q,strokeOpacity:J,strokeWidth:tt,lineDash:at,lineDashOffset:et,label:this.getTargetLabel(H)})}return{itemId:e,nodeData:D,needleData:C,targetData:L,labelData:A,scaleData:T,tickData:t}}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:s,targetSelection:a,targetLabelSelection:n,scaleSelection:o,highlightTargetSelection:r,tickSelection:l}=this,c=this.checkResize(t);this.updateSelections(c),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();const h=this.contextNodeData?.nodeData??[],u=this.contextNodeData?.labelData??[],d=this.contextNodeData?.needleData??[],p=this.contextNodeData?.targetData??[],g=this.contextNodeData?.scaleData??[],f=this.contextNodeData?.tickData??[],x=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:g,scaleSelection:o}),this.updateScaleNodes({scaleSelection:o}),this.needleSelection=this.updateNeedleSelection({needleData:d,needleSelection:s}),this.updateNeedleNodes({needleSelection:s}),this.targetSelection=this.updateTargetSelection({targetData:p,targetSelection:a}),this.updateTargetNodes({targetSelection:a,isHighlight:!1}),this.targetLabelSelection=this.updateTargetLabelSelection({targetData:p,targetLabelSelection:n}),this.updateTargetLabelNodes({targetLabelSelection:n}),this.datumSelection=this.updateDatumSelection({nodeData:h,datumSelection:e}),this.updateDatumNodes({datumSelection:e}),this.labelSelection=this.updateLabelSelection({labelData:u,labelSelection:i}),this.updateLabelNodes({labelSelection:i}),this.highlightTargetSelection=this.updateTargetSelection({targetData:x!=null?[x]:[],targetSelection:r}),this.updateTargetNodes({targetSelection:r,isHighlight:!0}),this.tickSelection=this.updateTickSelection({tickData:f,tickSelection:l}),this.updateTickNodes({tickSelection:l}),c&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>oP(t.nodeData.length,e.itemId))}updateDatumNodes(t){const{datumSelection:e}=t,{ctx:i,properties:s}=this,{bar:a,segmentation:n}=s,o=n.spacing??0,{fillOpacity:r,stroke:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}=a,d=this.getStrokeWidth(a.strokeWidth),p=i.animationManager.isSkipped(),g=this.getShapeFillBBox();e.each((f,x)=>{const{centerX:m,centerY:b,innerRadius:v,outerRadius:M,startCornerRadius:D,endCornerRadius:L,fill:C}=x;f.centerX=m,f.centerY=b,f.innerRadius=v,f.outerRadius=M,f.pointerEvents=this.properties.bar.enabled?dp._ModuleSupport.PointerEvents.All:dp._ModuleSupport.PointerEvents.None,f.fill=C,f.fillBBox=g,f.fillOpacity=r,f.stroke=l,f.strokeOpacity=c,f.strokeWidth=d,f.lineDash=h,f.lineDashOffset=u,f.startOuterCornerRadius=D,f.startInnerCornerRadius=D,f.endOuterCornerRadius=L,f.endInnerCornerRadius=L,f.radialEdgeInset=(o+f.strokeWidth)/2,f.concentricEdgeInset=f.strokeWidth/2,(p||f.previousDatum==null)&&f.setProperties(nP(f,x))}),this.datumUnion.update(e,this.itemGroup,dp._ModuleSupport.Sector,(f,x,m)=>{f.clipSector??(f.clipSector=new BDt(NaN,NaN,NaN,NaN)),f.centerX=x.centerX,f.centerY=x.centerY,f.outerRadius=f.clipSector.outerRadius=x.outerRadius,f.innerRadius=f.clipSector.innerRadius=x.innerRadius,f.startAngle=f.clipSector.startAngle=x.startAngle,f.startInnerCornerRadius=x.startInnerCornerRadius,f.startOuterCornerRadius=x.startOuterCornerRadius,f.endAngle=m.endAngle,f.clipSector.endAngle=m.clipSector?.endAngle??m.endAngle,f.endInnerCornerRadius=m.endInnerCornerRadius,f.endOuterCornerRadius=m.endOuterCornerRadius,f.pointerEvents=dp._ModuleSupport.PointerEvents.None})}updateScaleSelection(t){return t.scaleSelection.update(t.scaleData,void 0,e=>oP(t.scaleData.length,e.itemId))}updateScaleNodes(t){const{scaleSelection:e}=t,{scale:i,segmentation:s}=this.properties,a=s.spacing??0,{fillOpacity:n,stroke:o,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}=i,u=this.getShapeFillBBox();e.each((d,p)=>{const{centerX:g,centerY:f,innerRadius:x,outerRadius:m,startCornerRadius:b,endCornerRadius:v,fill:M}=p;d.centerX=g,d.centerY=f,d.innerRadius=x,d.outerRadius=m,d.fill=M,d.fillBBox=u,d.fillOpacity=n,d.stroke=o,d.strokeOpacity=r,d.strokeWidth=l,d.lineDash=c,d.lineDashOffset=h,d.startOuterCornerRadius=b,d.startInnerCornerRadius=b,d.endOuterCornerRadius=v,d.endInnerCornerRadius=v,d.radialEdgeInset=(a+d.strokeWidth)/2,d.concentricEdgeInset=d.strokeWidth/2,d.setProperties(nP(d,p))})}updateNeedleSelection(t){return t.needleSelection.update(t.needleData,void 0,()=>oP([]))}updateNeedleNodes(t){const{needleSelection:e}=t,{fill:i,fillOpacity:s,stroke:a,strokeOpacity:n,strokeWidth:o,lineDash:r,lineDashOffset:l}=this.properties.needle,c=this.ctx.animationManager.isSkipped();e.each((h,u)=>{const{centerX:d,centerY:p,radius:g}=u,f=g*2;h.d=J1.defaultPathData,h.fill=i,h.fillOpacity=s,h.stroke=a,h.strokeOpacity=n,h.strokeWidth=o/f,h.lineDash=r.map(x=>x/f),h.lineDashOffset=l/f,h.translationX=d,h.translationY=p,h.scalingX=f,h.scalingY=f,c&&h.setProperties(cY(h,u))})}updateTargetSelection(t){return t.targetSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetNodes(t){const{targetSelection:e,isHighlight:i}=t,s=i?this.properties.highlightStyle.item:void 0;e.each((a,n)=>{const{centerX:o,centerY:r,angle:l,radius:c,shape:h,size:u,rotation:d,fill:p,fillOpacity:g,stroke:f,strokeOpacity:x,strokeWidth:m,lineDash:b,lineDashOffset:v}=n;a.shape=h==="line"?_K:h,a.size=u,a.fill=s?.fill??p,a.fillOpacity=s?.fillOpacity??g,a.stroke=s?.stroke??f,a.strokeOpacity=s?.strokeOpacity??x,a.strokeWidth=s?.strokeWidth??m,a.lineDash=s?.lineDash??b,a.lineDashOffset=s?.lineDashOffset??v,a.translationX=o+c*Math.cos(l),a.translationY=r+c*Math.sin(l),a.rotation=l+d})}updateTargetLabelSelection(t){return t.targetLabelSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetLabelNodes(t){const{targetLabelSelection:e}=t;e.each((i,s)=>{const{centerX:a,centerY:n,radius:o,angle:r,text:l}=s,{offsetX:c,offsetY:h,fill:u,fontStyle:d,fontWeight:p,fontSize:g,fontFamily:f,textAlign:x,textBaseline:m}=s.label;if(l==null){i.visible=!1;return}i.visible=!0,i.x=a+o*Math.cos(r)+c,i.y=n+o*Math.sin(r)+h,i.text=l,i.fill=u,i.fontStyle=d,i.fontWeight=p,i.fontSize=g,i.fontFamily=f,i.textAlign=x,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((s,a)=>{s.fill=a.fill,s.fontStyle=a.fontStyle,s.fontWeight=a.fontWeight,s.fontFamily=a.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}updateTickSelection(t){return t.tickSelection.update(t.tickData,void 0,e=>e.index)}updateTickNodes(t){const{scale:e,radius:i,centerX:s,centerY:a,properties:n}=this,{enabled:o,color:r,fontFamily:l,fontSize:c,fontStyle:h,fontWeight:u,spacing:d}=n.scale.label,p=Uk(n.scale.label.rotation??0);t.tickSelection.each((g,f)=>{if(!o){g.visible=!1;return}g.visible=!0,g.text=f.text,g.fill=r,g.fontFamily=l,g.fontSize=c,g.fontStyle=h,g.fontWeight=u,g.textAlign="center",g.textBaseline="middle";const x=e.convert(f.value),{width:m,height:b}=f,v=Math.abs(i*Math.cos(x)),M=Math.abs(i*Math.sin(x)),D=Math.min(Math.max(Math.abs(i/Math.tan(x)),v-m/2),v+m/2),L=Math.min(Math.max(Math.abs(i*Math.tan(x)),M-b/2),M+b/2),C=Math.hypot(D,L),A=s+(C+d)*Math.cos(x),T=a+(C+d)*Math.sin(x);g.x=A,g.y=T,g.rotationCenterX=A,g.rotationCenterY=T,g.rotation=p})}labelsHaveExplicitText(){for(const{datum:t}of this.labelSelection)if(t.text==null)return!1;return!0}formatLabelText(t){const{labelSelection:e,radius:i,textAlign:s,verticalAlign:a}=this,{spacing:n,innerRadiusRatio:o}=this.properties;TDt(this,this.ctx,e,{padding:n,textAlign:s,verticalAlign:a},i*o,t)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),hY([this.datumSelection],nP),hY([this.needleSelection],cY),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,s,a,n;if(this.labelSelection.each((o,r)=>{o.opacity=1,r.label==="primary"?(i=o.previousDatum?.value??t.from??r.value,s=r.value):r.label==="secondary"&&(a=o.previousDatum?.value??t.from??r.value,n=r.value)}),!this.labelsHaveExplicitText())if(s==null||n==null)this.formatLabelText();else if(i===s&&a===n)this.formatLabelText({label:s,secondaryLabel:n});else{const o=`${this.id}_labels`;e.animate({id:o,groupId:"label",from:{label:i,secondaryLabel:a},to:{label:s,secondaryLabel:n},phase:t.phase??"update",onUpdate:r=>this.formatLabelText(r)})}}animateEmptyUpdateReady(){const{animationManager:t}=this.ctx,{node:e,needle:i}=lY(!0,this.scale.range[0]);ub(this.id,"node",t,[this.datumSelection],e,(s,a)=>a.itemId),ub(this.id,"needle",t,[this.needleSelection],i,()=>"needle"),ub(this.id,"label",t,[this.labelSelection],OK,(s,a)=>a.label),this.animateLabelText({from:this.properties.scale.min,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:t}=this.ctx,{node:e,needle:i}=lY(!1,this.scale.range[0]);ub(this.id,"node",t,[this.datumSelection],e,(s,a)=>a.itemId),ub(this.id,"needle",t,[this.needleSelection],i,()=>"needle"),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}dataCount(){return NaN}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}getLegendData(){return[]}getTooltipContent(t){const{id:e,properties:i}=this,{tooltip:s}=i;let a,n;if(t.type===0?(a=i.value,n=i.label.text):{value:a,text:n}=i.targets[t.index],a!=null)return this.formatTooltipWithContext(s,{data:[{label:n,fallbackLabel:"Value",value:this.formatLabel(a)}]},{seriesId:e,title:void 0,datum:void 0,value:a})}pickNodeClosestDatum(t){return EK(this,t)}pickFocus(t){return RK(this,t)}getCaptionText(){const{value:t}=this.properties,e=[];return e.push(this.formatLabel(t)),this.labelSelection.each((i,s)=>{const a=eb(this.id,this.ctx,s);a!=null&&e.push(a)}),e.join(". ")}getCategoryValue(t){}datumIndexForCategoryValue(t){}};Yk.className="RadialGaugeSeries",Yk.type="radial-gauge";var{FONT_SIZE_RATIO:HDt}=Hk._ModuleSupport,$Dt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["gauge"],identifier:"radial-gauge",moduleFactory:t=>new Yk(t),themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{outerRadiusRatio:1,innerRadiusRatio:.8,startAngle:270,endAngle:450,defaultColorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$interpolate:[{$palette:"secondDivergingColors"},5]},Hk._ModuleSupport.SAFE_RANGE2_OPERATION]},scale:{defaultFill:{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["/2",Hk._ModuleSupport.SAFE_STROKE_FILL_OPERATION,{$palette:"hierarchyColors"}]},strokeWidth:{$isUserOption:["./stroke",2,0]},label:{fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:12}},bar:{strokeWidth:{$isUserOption:["./stroke",2,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:HDt.LARGE},minimumFontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"}},tooltip:{range:{$path:["/tooltip/range",10]}}}}},UDt={type:"series",name:"radial-gauge",chartType:"gauge",enterprise:!0,options:Hk._ModuleSupport.radialGaugeSeriesOptionsDef,create:t=>new Yk(t)},Zk=(_(),w(P)),KDt=(_(),w(P)),YDt=(R(),w(st));function gY(t){t.nodes.sort((e,i)=>Math.round((e.datum.y-i.datum.y)*100)/100||-(e.datum.size-i.datum.size))}function ZDt({nodes:t,size:e},{seriesRectHeight:i,nodeSpacing:s,sizeScale:a}){const n=i*e*a;let o=(i-(n+s*(t.length-1)))/2;t.forEach(({datum:r})=>{const l=i*r.size*a;r.y=o,r.height=l,o+=l+s})}function XDt(t,e){const{nodes:i}=t,{seriesRectHeight:s,nodeSpacing:a}=e;gY(t);let n=0,o=0;for(const{datum:c}of i){const h=Math.max(o-c.y,0);c.y+=h,n+=h,o=c.y+c.height+a}if(o-a<s)return n>0;let l=s;for(let c=i.length-1;c>=0;c-=1){const{datum:h}=i[c],u=h.y+h.height,d=Math.min(l-u,0);h.y+=d,n+=d,l=h.y-a}return!0}function lP(t,e,i,s,a,n,o,r){const l=(i-t)/(s-e),c=(o-a)/(r-n),h=((n-e)*(l*c)+t*c-a*l)/(c-l);return t<i?h>t&&h<Math.min(i,o):h<t&&h>Math.max(i,o)}function fY(t,e){let i=!1;const s=t.nodes.filter(n=>e(n).length===1);let a=!0;for(let n=0;a&&n<s.length;n+=1){a=!1;for(let o=0;o<s.length-1;o+=1){const{datum:r}=s[o],l=e(s[o])[0].node.datum,{datum:c}=s[o+1],h=e(s[o+1])[0].node.datum;if(!(lP(r.x,r.y,l.x,l.y,c.x,c.y,h.x,h.y)||lP(r.x,r.y+r.height/2,l.x,l.y+l.height/2,c.x,c.y+c.height/2,h.x,h.y+h.height/2)||lP(r.x,r.y+r.height,l.x,l.y+l.height,c.x,c.y+c.height,h.x,h.y+h.height)))continue;const d=s[o];s[o]=s[o+1],s[o+1]=d;const p=r.y;r.y=c.y+c.height-r.height,c.y=p,i=!0,a=!0}}return i}function qDt(t){let e=!1;return gY(t),e=fY(t,i=>i.linksBefore)||e,e=fY(t,i=>i.linksAfter)||e,e}function QDt(t){if(t.length===0)return;let e=0,i=0;for(const{node:{datum:s}}of t)e+=s.y*s.size,i+=s.size;return e/i}function mY(t,e,i,s){return t.nodes.forEach(({datum:a,linksBefore:n,linksAfter:o})=>{const r=s===1?n:o,l=s===1?o:n,c=QDt(r);if(c!=null){const h=l.length!==0?i:1;a.y=a.y+(c-a.y)*h}}),XDt(t,e)}function yY(t,e,i){let s=!1;for(const a of t)s=mY(a,e,i,1)||s;return s}function JDt(t,e,i){let s=!1;for(let a=t.length-1;a>=0;a-=1)s=mY(t[a],e,i,-1)||s;return s}function xY(t){let e=!1;for(let i=t.length-1;i>=0;i-=1)e=qDt(t[i])||e;return e}function tkt(t,e){t.forEach(s=>{ZDt(s,e)});let i=!1;for(let s=0;s<6;s+=1){const a=yY(t,e,1);i=JDt(t,e,.5);const n=xY(t);if(!a&&!i&&!n)break}i&&(yY(t,e,1),xY(t))}var ekt=(_(),w(P)),{BBox:ikt,Path:skt,SceneChangeDetection:Gf,splitBezier2D:akt}=ekt._ModuleSupport;function Xk(t,e,i,s,a,n,o,r,l,c){let h,u;if(a!==i&&l!==o){const L=-(s-e)/(a-i),C=-(r-n)/(l-o);h=(o-i+L*e-C*n)/(L-C),u=L*(h-e)+i}else if(a===i&&l!==o)h=e,u=-(r-n)/(l-o)*(h-r)+l;else if(a!==i&&l===o)h=r,u=-(s-e)/(a-i)*(h-e)+i;else throw new Error("Offsetting flat bezier curve");const d=Math.hypot(i-u,e-h),p=(d+c)/d,g=Math.hypot(l-u,r-h),f=(g+c)/g,x=h+(s-h)*p,m=u+(a-u)*p,b=h+(n-h)*f,v=u+(o-u)*f,M=h+(r-h)*f,D=u+(l-u)*f;t.cubicCurveTo(x,m,b,v,M,D)}var pp=class extends skt{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),s=Math.max(this.y1,this.y2)-i+this.height;return new ikt(t,i,e,s)}updatePath(){const{path:t,inset:e}=this;t.clear();const i=this.x1+e,s=this.x2-e,a=this.y1+e,n=this.y2+e,o=this.height-2*e;if(o<0||i>s)return;const r=i,l=a+o/2,c=(i+s)/2,h=a+o/2,u=(i+s)/2,d=n+o/2,p=s,g=n+o/2;if(t.moveTo(r,l-o/2),Math.abs(this.y2-this.y1)<1||this.x2-this.x1<this.height*Math.SQRT2)t.cubicCurveTo(c,h-o/2,u,d-o/2,p,g-o/2),t.lineTo(p,g+o/2),t.cubicCurveTo(u,d+o/2,c,h+o/2,r,l+o/2);else{const[f,x]=akt(r,l,c,h,u,d,p,g,.5),m=(n>a?1:-1)*o/2;Xk(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),Xk(t,x[0].x,x[0].y,x[1].x,x[1].y,x[2].x,x[2].y,x[3].x,x[3].y,-m),t.lineTo(p,g+o/2),Xk(t,x[3].x,x[3].y,x[2].x,x[2].y,x[1].x,x[1].y,x[0].x,x[0].y,m),Xk(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)}t.closePath()}};y([Gf()],pp.prototype,"x1",2),y([Gf()],pp.prototype,"x2",2),y([Gf()],pp.prototype,"y1",2),y([Gf()],pp.prototype,"y2",2),y([Gf()],pp.prototype,"height",2),y([Gf()],pp.prototype,"inset",2);var nkt=(_(),w(P)),{BaseProperties:bY,FillGradientDefaults:okt,FillPatternDefaults:rkt,FillImageDefaults:lkt,makeSeriesTooltip:ckt,SeriesProperties:hkt,Property:jt,Label:ukt}=nkt._ModuleSupport,vY=class extends ukt{constructor(){super(...arguments),this.spacing=1}};y([jt],vY.prototype,"spacing",2);var pc=class extends bY{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}};y([jt],pc.prototype,"fill",2),y([jt],pc.prototype,"fillOpacity",2),y([jt],pc.prototype,"stroke",2),y([jt],pc.prototype,"strokeOpacity",2),y([jt],pc.prototype,"strokeWidth",2),y([jt],pc.prototype,"lineDash",2),y([jt],pc.prototype,"lineDashOffset",2),y([jt],pc.prototype,"itemStyler",2);var Io=class extends bY{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}};y([jt],Io.prototype,"spacing",2),y([jt],Io.prototype,"width",2),y([jt],Io.prototype,"alignment",2),y([jt],Io.prototype,"fill",2),y([jt],Io.prototype,"fillOpacity",2),y([jt],Io.prototype,"stroke",2),y([jt],Io.prototype,"strokeOpacity",2),y([jt],Io.prototype,"strokeWidth",2),y([jt],Io.prototype,"lineDash",2),y([jt],Io.prototype,"lineDashOffset",2),y([jt],Io.prototype,"itemStyler",2);var Fi=class extends hkt{constructor(){super(),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.fillGradientDefaults=new okt,this.fillPatternDefaults=new rkt,this.fillImageDefaults=new lkt,this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=[],this.strokes=[],this.label=new vY,this.link=new pc,this.node=new Io,this.tooltip=ckt(),this.highlightStyle.deprecated=!1}};y([jt],Fi.prototype,"nodes",2),y([jt],Fi.prototype,"fromKey",2),y([jt],Fi.prototype,"toKey",2),y([jt],Fi.prototype,"idKey",2),y([jt],Fi.prototype,"idName",2),y([jt],Fi.prototype,"labelKey",2),y([jt],Fi.prototype,"labelName",2),y([jt],Fi.prototype,"sizeKey",2),y([jt],Fi.prototype,"sizeName",2),y([jt],Fi.prototype,"fillGradientDefaults",2),y([jt],Fi.prototype,"fillPatternDefaults",2),y([jt],Fi.prototype,"fillImageDefaults",2),y([jt],Fi.prototype,"defaultColorRange",2),y([jt],Fi.prototype,"defaultPatternFills",2),y([jt],Fi.prototype,"fills",2),y([jt],Fi.prototype,"strokes",2),y([jt],Fi.prototype,"label",2),y([jt],Fi.prototype,"link",2),y([jt],Fi.prototype,"node",2),y([jt],Fi.prototype,"tooltip",2);var{Transformable:dkt,applyShapeStyle:SY,SeriesNodePickMode:MY,CachedTextMeasurerPool:pkt,TextWrapper:DY,TextUtils:kY,createDatumId:qk,getShapeStyle:Qk,Rect:IY,BBox:AY}=KDt._ModuleSupport,Jk=class extends oK{constructor(t){super({moduleCtx:t,pickModes:[MY.NEAREST_NODE,MY.EXACT_SHAPE_MATCH]}),this.properties=new Fi}isLabelEnabled(){return(this.properties.labelKey!=null||this.nodes==null)&&this.properties.label.enabled}linkFactory(){return new pp}nodeFactory(){return new IY}createNodeData(){const{id:t,_nodeDataDependencies:{seriesRectWidth:e,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0}}=this,{fromKey:s,toKey:a,sizeKey:n,labelKey:o,label:{spacing:r},node:{spacing:l,width:c,alignment:h}}=this.properties,{nodeGraph:u,links:d,maxPathLength:p}=this.getNodeGraph(A=>({...A,x:NaN,y:NaN,width:c,height:NaN}),A=>({...A,x1:NaN,x2:NaN,y1:NaN,y2:NaN,height:NaN}),{includeCircularReferences:!1}),g=u,f=this.isLabelEnabled()?(e-c)*(1-p/(p+1)):0,x=(e-c-2*f)/(p-1),m=[];for(let A=0;A<p;A+=1){const T=f+A*x;m.push({index:A,size:0,nodes:[],x:T})}g.forEach(A=>{const{datum:T,linksBefore:N,linksAfter:O,maxPathLengthBefore:E,maxPathLengthAfter:z}=A,B=Math.max(N.reduce((G,{link:H})=>G+H.size,0),O.reduce((G,{link:H})=>G+H.size,0));if(N.length===0&&O.length===0||B===0){A.columnIndex=-1;return}let F;switch(h){case"left":F=m[E];break;case"right":F=m[p-1-z];break;case"center":{if(N.length!==0)F=m[E];else if(O.length!==0){const G=O.reduce((H,$)=>Math.min(H,$.node.maxPathLengthBefore),p)-1;F=m[G]}else F=m[0];break}case"justify":{F=O.length===0?m[p-1]:m[E];break}}T.x=F.x,T.size=B;const V=this.getLabelText(T.label,T.datum,o,"label",[],this.properties.label,{datum:T.datum,value:T.label,fromKey:s,toKey:a,sizeKey:n,size:B});T.label=String(V),F.nodes.push(A),F.size+=B,A.columnIndex=F.index}),g.forEach(A=>{let T=1/0,N=0;A.linksAfter.forEach(O=>{const E=O.node,{columnIndex:z}=E;z<T?(T=z,N=E.datum.size):z===T&&(N=Math.max(N,E.datum.size))}),A.closestColumnIndex=T,A.maxSizeOfClosestNodesAfter=N});const b=m.reduce((A,{size:T,nodes:N})=>{const O=(1-(N.length-1)*(l/i))/T;return Math.min(A,O)},1/0);for(let A=m.length-1;A>=0;A-=1)m[A].nodes.sort((N,O)=>N.closestColumnIndex-O.closestColumnIndex||N.maxSizeOfClosestNodesAfter-O.maxSizeOfClosestNodesAfter||N.datum.size-O.datum.size);tkt(m,{seriesRectHeight:i,nodeSpacing:l,sizeScale:b});let v=!1;if(g.forEach(({datum:A,linksBefore:T,linksAfter:N})=>{v||(v=A.height<0);const O=A.y+A.height,E=F=>F.sort((V,G)=>{const H=V.node.datum,$=G.node.datum,W=H.y+H.height,j=$.y+$.height,U=Math.atan2(H.y-A.y,Math.abs(H.x-A.x))-Math.atan2($.y-A.y,Math.abs($.x-A.x)),Z=Math.atan2(W-O,Math.abs(H.x-A.x))-Math.atan2(j-O,Math.abs($.x-A.x));return U+Z});let z=A.y;E(T).forEach(({link:F})=>{F.y2=z,z+=F.size*i*b});let B=A.y;E(N).forEach(({link:F})=>{F.y1=B,B+=F.size*i*b})}),v){YDt.Logger.warnOnce("There was insufficient space to display the Sankey Series. Reduce the node spacing, or provide a larger container.");return}const M=[],D=[],{fontSize:L}=this.properties.label,C=pkt.getMeasurer({font:this.properties.label});return m.forEach((A,T)=>{const N=T===0,O=T===m.length-1;let E=-1/0;A.nodes.sort((z,B)=>z.datum.y-B.datum.y),A.nodes.forEach(({datum:z})=>{if(z.midPoint={x:z.x+z.width/2,y:z.y+z.height/2},M.push(z),z.label==null)return;const B=N?z.x-r:z.x+z.width+r,F=z.y+z.height/2;let V;if(!N&&!O){const W=F-kY.getLineHeight(L),j=F+kY.getLineHeight(L);let U=e;g.forEach(({datum:X})=>{X.x>z.x&&Math.max(X.y,W)<=Math.min(X.y+X.height,j)&&(U=Math.min(U,X.x-r))});const Z=U-z.x-2*r;V=DY.wrapText(z.label,{maxWidth:Z,maxHeight:z.height,font:this.properties.label,textWrap:"never",overflow:"hide"})}if(V==null||V===""){const W=N||O?r:r*2;V=DY.wrapText(z.label,{maxWidth:x-W,maxHeight:z.height,font:this.properties.label,textWrap:"never"})}if(V==="")return;const{height:G}=C.measureText(V),H=F-G/2,$=F+G/2;H>=E&&(D.push({x:B,y:F,leading:N,text:V}),E=$)})}),d.forEach(A=>{const{fromNode:T,toNode:N,size:O}=A;A.height=i*O*b,A.x1=T.x+c,A.x2=N.x,A.midPoint={x:(A.x1+A.x2)/2,y:(A.y1+A.y2)/2+A.height/2},M.push(A)}),{itemId:t,nodeData:M,labelData:D}}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:a,fontSize:n,fontFamily:o}=this.properties.label;e.each((r,{x:l,y:c,leading:h,text:u})=>{r.visible=!0,r.x=l,r.y=c,r.text=u,r.fill=i,r.fontStyle=s,r.fontWeight=a,r.fontSize=n,r.fontFamily=o,r.textAlign=h?"right":"left",r.textBaseline="middle"})}updateNodeSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>qk([e.type,e.id]))}getBaseNodeStyle(t,e){const{properties:i}=this,{fill:s,fillOpacity:a,stroke:n,strokeOpacity:o,lineDash:r,lineDashOffset:l}=i.node,c=this.getHighlightStyle(t,e?.datumIndex);return Qk({fill:c?.fill??s,fillOpacity:c?.fillOpacity??a,stroke:c?.stroke??n,strokeOpacity:c?.strokeOpacity??o,strokeWidth:c?.strokeWidth??this.getStrokeWidth(i.node.strokeWidth),lineDash:c?.lineDash??r,lineDashOffset:c?.lineDashOffset??l},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults)}getNodeStyleOverrides(t,e,i,s,a,n,o){const{id:r,properties:l}=this,{fills:c,strokes:h,defaultColorRange:u,defaultPatternFills:d}=l,{itemStyler:p}=l.node,g=n.fill??c[i%c.length],f=n.stroke??h[i%h.length],x=u[i%u.length].map(v=>({color:v})),m=d[i%d.length];let b;if(o||(b??(b={}),b.fill=g,b.stroke=f),p!=null){const v=this.cachedDatumCallback(qk(t,"node",o?"highlight":"node"),()=>{const{fillOpacity:M=1,strokeOpacity:D=1,strokeWidth:L=0,lineDash:C=[],lineDashOffset:A=0}=n;return this.callWithContext(p,{seriesId:r,datum:e,highlighted:o,label:a,size:s,fill:g,fillOpacity:M,stroke:f,strokeOpacity:D,strokeWidth:L,lineDash:C,lineDashOffset:A})});b??(b={}),Object.assign(b,v)}return Qk(b,{...this.properties.fillGradientDefaults.toJson(),colorStops:x},{...this.properties.fillPatternDefaults.toJson(),fill:m,stroke:m},this.properties.fillImageDefaults)}updateNodeNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getShapeFillBBox();e.each((a,n)=>{const{datumIndex:o,size:r,label:l}=n,c=this.getBaseNodeStyle(i,n),h=this.getNodeStyleOverrides(String(o.index),n.datum,o.index,r,l,c,i);a.x=n.x,a.y=n.y,a.width=Math.max(n.width,0),a.height=Math.max(n.height,0),SY(a,c,h,s)})}getShapeFillBBox(){const t=this._nodeDataDependencies?.seriesRectWidth??0,e=this._nodeDataDependencies?.seriesRectHeight??0,i=new AY(0,0,t,e);return{series:i,axis:i}}updateLinkSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>qk([e.type,e.index,e.fromNode.id,e.toNode.id]))}getBaseLinkStyle(t,e){const{properties:i}=this,{fill:s,fillOpacity:a,stroke:n,strokeOpacity:o,lineDash:r,lineDashOffset:l}=i.link,c=this.getHighlightStyle(t,e?.datumIndex);return Qk({fill:c?.fill??s,fillOpacity:c?.fillOpacity??a,stroke:c?.stroke??n,strokeOpacity:c?.strokeOpacity??o,strokeWidth:c?.strokeWidth??this.getStrokeWidth(i.link.strokeWidth),lineDash:c?.lineDash??r,lineDashOffset:c?.lineDashOffset??l},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults)}getLinkStyleOverrides(t,e,i,s,a){const{id:n,properties:o}=this,{fills:r,strokes:l,defaultColorRange:c,defaultPatternFills:h}=o,{itemStyler:u}=o.link,d=s.fill??r[i%r.length],p=s.stroke??l[i%l.length],g=c[i%c.length].map(m=>({color:m})),f=h[i%h.length];let x;if(a||(x??(x={}),x.fill=d,x.stroke=p),u!=null){const m=this.cachedDatumCallback(qk(t,"link",a?"highlight":"node"),()=>{const{fillOpacity:b=1,strokeOpacity:v=1,strokeWidth:M=0,lineDash:D=[],lineDashOffset:L=0}=s;return this.callWithContext(u,{seriesId:n,datum:e,highlighted:a,fill:d,fillOpacity:b,stroke:p,strokeOpacity:v,strokeWidth:M,lineDash:D,lineDashOffset:L})});x??(x={}),Object.assign(x,m)}return Qk(x,{...this.properties.fillGradientDefaults.toJson(),colorStops:g},{...this.properties.fillPatternDefaults.toJson(),fill:f,stroke:f},this.properties.fillImageDefaults)}updateLinkNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getShapeFillBBox();e.each((a,n)=>{const{datumIndex:o}=n,r=n.fromNode.datumIndex,l=this.getBaseLinkStyle(i,n),c=this.getLinkStyleOverrides(String(o.index),n.datum,r.index,l,i);a.x1=n.x1,a.y1=n.y1,a.x2=n.x2,a.y2=n.y2,a.height=n.height,SY(a,l,c,s),a.inset=a.strokeWidth/2})}getTooltipContent(t){const{id:e,linksProcessedData:i,nodesProcessedData:s,properties:a,ctx:{formatManager:n}}=this,{fromKey:o,toKey:r,sizeKey:l,sizeName:c,tooltip:h}=a,u=this.contextNodeData?.nodeData.find(b=>b.datumIndex.type===t.type&&b.datumIndex.index===t.index);if(u==null)return;const d=u.type===0?u.fromNode.index:u.index,p=u.type===0?`${u.fromNode.label} - ${u.toNode.label}`:u.label,g=t.type===0?i?.dataSources.get(this.id)?.[t.index]:s?.dataSources.get(this.id)?.[t.index],f=u.size;let x;if(u.type===0){const b=u.fromNode.datumIndex,v=this.getBaseLinkStyle(!1);Object.assign(v,this.getLinkStyleOverrides(String(t.index),g,b.index,v,!1)),x=v}else{const b=u.label,v=this.getBaseNodeStyle(!1);Object.assign(v,this.getNodeStyleOverrides(String(t.index),g,t.index,f,b,v,!1)),x=v}const m=[];if(l!=null){const b=n.format(this.callWithContext.bind(this),{type:"number",value:f,datum:g,seriesId:e,legendItemName:void 0,key:l,source:"tooltip",property:"size",domain:[],boundSeries:this.getFormatterContext("size"),fractionDigits:void 0});m.push({label:c,fallbackLabel:l,value:b??String(f)})}return this.formatTooltipWithContext(h,{title:p,symbol:this.legendItemSymbol(u.type,d,x),data:m},{seriesId:e,datum:g,title:p,fromKey:o,toKey:r,sizeKey:l,sizeName:c,size:f,...x})}computeFocusBounds(t){if(t instanceof IY){const{x:e,y:i,width:s,height:a}=t,n=new AY(e,i,s,a);return dkt.toCanvas(this.contentGroup,n)}return t}};Jk.className="SankeySeries",Jk.type="sankey";var gkt=(_(),w(P)),Vi=(R(),w(st)),{commonSeriesOptionsDefs:fkt,sankeySeriesThemeableOptionsDef:mkt}=gkt._ModuleSupport,jf={...mkt,...fkt,type:(0,Vi.required)((0,Vi.constant)("sankey")),fromKey:(0,Vi.required)(Vi.string),toKey:(0,Vi.required)(Vi.string),sizeKey:Vi.string,sizeName:Vi.string};jf.fillGradientDefaults=(0,Vi.undocumented)(Vi.fillGradientDefaults),jf.fillPatternDefaults=(0,Vi.undocumented)(Vi.fillPatternDefaults),jf.fillImageDefaults=(0,Vi.undocumented)(Vi.fillImageDefaults),jf.defaultColorRange=(0,Vi.undocumented)((0,Vi.arrayOf)((0,Vi.arrayOf)(Vi.color))),jf.defaultPatternFills=(0,Vi.undocumented)((0,Vi.arrayOf)(Vi.color));var ykt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["flow-proportion"],solo:!0,identifier:"sankey",moduleFactory:t=>new Jk(t),themeTemplate:{seriesArea:{padding:{top:10,bottom:10}},series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Zk._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:Zk._ModuleSupport.FILL_IMAGE_DEFAULTS,defaultColorRange:{$palette:"gradients"},defaultPatternFills:Zk._ModuleSupport.SAFE_FILLS_OPERATION,highlightStyle:{series:{dimOpacity:.2}},highlight:{...Zk._ModuleSupport.singleSeriesHighlightStyle()},label:{fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:10},node:{spacing:20,width:10,strokeWidth:{$isUserOption:["./stroke",2,0]}},link:{fillOpacity:.5,strokeWidth:{$isUserOption:["./stroke",2,0]}}},legend:{enabled:!1,toggleSeries:!1}}},xkt={type:"series",name:"sankey",chartType:"flow-proportion",enterprise:!0,options:jf,create:t=>new Jk(t)},cP=(_(),w(P)),db=(_(),w(P)),bkt=(_(),w(P)),{HierarchySeriesProperties:vkt,HighlightStyle:Skt,makeSeriesTooltip:Mkt,Property:Gi}=bkt._ModuleSupport,Jh=class extends Skt{constructor(){super(!1),this.label=new il,this.secondaryLabel=new il}};y([Gi],Jh.prototype,"fill",2),y([Gi],Jh.prototype,"fillOpacity",2),y([Gi],Jh.prototype,"stroke",2),y([Gi],Jh.prototype,"strokeWidth",2),y([Gi],Jh.prototype,"strokeOpacity",2),y([Gi],Jh.prototype,"label",2),y([Gi],Jh.prototype,"secondaryLabel",2);var Ca=class extends vkt{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=0,this.strokeOpacity=1,this.cornerRadius=0,this.highlightStyle=new Jh,this.label=new il,this.secondaryLabel=new Hx,this.tooltip=Mkt()}};y([Gi],Ca.prototype,"sizeName",2),y([Gi],Ca.prototype,"labelKey",2),y([Gi],Ca.prototype,"secondaryLabelKey",2),y([Gi],Ca.prototype,"fillOpacity",2),y([Gi],Ca.prototype,"strokeWidth",2),y([Gi],Ca.prototype,"strokeOpacity",2),y([Gi],Ca.prototype,"cornerRadius",2),y([Gi],Ca.prototype,"sectorSpacing",2),y([Gi],Ca.prototype,"padding",2),y([Gi],Ca.prototype,"itemStyler",2),y([Gi],Ca.prototype,"highlightStyle",2),y([Gi],Ca.prototype,"label",2),y([Gi],Ca.prototype,"secondaryLabel",2),y([Gi],Ca.prototype,"tooltip",2);var{fromToMotion:Dkt,normalizeAngle360:kkt,createDatumId:Ikt,Sector:hP,Group:tI,ScalableGroup:Akt,Selection:uP,TransformableText:dP,BBox:CY,applyShapeStyle:Ckt,getShapeStyle:pP}=db._ModuleSupport,Lkt=class extends db._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 LY(t,e=0,i=2*Math.PI/t.sumSize){for(const s of t.children){const a=e+s.sumSize*i;s.startAngle=e,s.endAngle=a,LY(s,e,i),e=a}}var eI=class extends db._ModuleSupport.HierarchySeries{constructor(){super(...arguments),this.NodeClass=Lkt,this.properties=new Ca,this.scalingGroup=this.contentGroup.appendChild(new Akt),this.sectorGroup=this.scalingGroup.appendChild(new tI),this.sectorLabelGroup=this.scalingGroup.appendChild(new tI),this.highlightSectorGroup=this.scalingGroup.appendChild(new tI),this.datumSelection=uP.select(this.sectorGroup,hP),this.labelSelection=uP.select(this.sectorLabelGroup,tI),this.highlightSelection=uP.select(this.highlightSectorGroup,hP)}processData(){super.processData(),LY(this.rootNode)}updateSelections(){const t=this.ctx.highlightManager?.getActiveHighlight();if(this.highlightSelection.update(t!=null?[t]:[],void 0,n=>this.getDatumId(n)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{chart:e}=this;if(e==null||e.seriesRect==null)return;const s=Array.from(this.rootNode),a=n=>{n.append([new dP({tag:0}),new dP({tag:1})])};this.datumSelection.update(s,void 0,n=>this.getDatumId(n)),this.labelSelection.update(s,a,n=>this.getDatumId(n))}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle:void 0;return pP({fill:i?.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity},e.fillGradientDefaults,e.fillPatternDefaults,e.fillImageDefaults)}getItemStyleOverrides(t,e,i,s,a,n){const{id:o,properties:r,colorScale:l}=this,{fills:c,strokes:h,itemStyler:u}=r,d=t[0],p=a.fill??c[d%c.length],g=a.stroke??h[d%h.length],f={};if(n||(f.fill=s!=null?l.convert(s):p,f.stroke=g),u!=null){const x=this.cachedDatumCallback(Ikt(t.join(":"),n?"highlight":"node"),()=>this.callWithContext(u,{seriesId:o,datum:e,depth:i,highlighted:n,fill:p,stroke:g,...a}));Object.assign(f,x)}return pP(f,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}updateNodes(){const{chart:t,data:e,maxDepth:i}=this;if(t==null||e==null)return;const{width:s,height:a}=t.seriesRect,{sectorSpacing:n=0,padding:o=0,cornerRadius:r,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g}=this.properties;this.contentGroup.translationX=s/2,this.contentGroup.translationY=a/2;const f=n*.5,x=Math.min(s,a)/2,m=x/(i+1),b=-Math.PI/2,v={series:new CY(-x,-x,2*x,2*x),axis:new CY(-x,-x,2*x,2*x)};this.rootNode?.walk(T=>{const{startAngle:N,endAngle:O}=T;if(T.depth!=null){const E=(N+O)/2+b,z=(T.depth+.5)*m;T.midPoint.x=Math.cos(E)*z,T.midPoint.y=Math.sin(E)*z}}),this.rootNode?.walk(T=>{const{datum:N,depth:O,startAngle:E,endAngle:z,parent:B,sumSize:F}=T;T.label=void 0,T.secondaryLabel=void 0,T.contentHeight=0;let V;if(N!=null&&O!=null&&u!=null){const Ot=N[u];V=this.getLabelText(Ot,N,u,"label",[],this.properties.label,{depth:O,datum:N,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g,value:Ot})}V===""&&(V=void 0);let G;if(N!=null&&O!=null&&d!=null){const Ot=N[d];G=this.getLabelText(Ot,N,d,"secondaryLabel",[],this.properties.secondaryLabel,{depth:O,datum:N,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g,value:Ot})}if(G===""&&(G=void 0),O==null)return;const H=O*m+f,$=(O+1)*m-f,W=H>f?f/H:f,j=$>f?f/$:f,U=E+W,X=z+W-U,q=E+j,J=z+j-q,at=Ot=>{if(O===0&&B?.sumSize===F)return{width:2*Math.sqrt($**2-(Ot*.5)**2),height:Ot,meta:0};const qt=Ot,he=2*Math.sqrt($**2-(H+qt)**2),ai=X<Math.PI?2*H*Math.tan(X*.5):1/0,ni=Math.min(he,ai),ys=Math.PI/4;let Qa,ol;return O===0?(Qa=Ot,ol=Math.sqrt($**2-(Qa/2)**2)-Ot/(2*Math.tan(J*.5))):kkt(X)<ys?(Qa=2*H*Math.tan(X*.5),ol=Math.sqrt($**2-(Qa/2)**2)-H):(ol=0,Qa=0),ni>=ol?{width:ni,height:qt,meta:1}:{width:ol,height:Qa,meta:2}},et=PO(V,this.properties.label,G,this.properties.secondaryLabel,{padding:o},at);if(et==null)return;const{width:it,height:ct,meta:ht,label:xt,secondaryLabel:kt}=et,Dt=b+(E+z)/2,St=Math.sin(Dt)>=0,Xt=Math.cos(Dt)>=0,ke=(St?3:12)&(Xt?6:9);let ce;switch(ht){case 0:ce=0;break;case 1:{const Vt=$-(m-ct)*.58,qt=Math.sqrt(($-o)**2-(it/2)**2);ce=Math.min(Vt,qt);break}case 2:if(O===0){const Ot=ct/(2*Math.tan(X*.5))+it*.5,Vt=Math.sqrt($**2-(ct*.5)**2)-it*.5;ce=(Ot+Vt)*.5}else ce=(H+$)*.5;break}if(xt!=null){const{fontStyle:Ot="normal",fontFamily:Vt,fontWeight:qt="normal",color:he="black"}=this.properties.label;T.label={...xt,fontStyle:Ot,fontFamily:Vt,fontWeight:qt,color:he,labelPlacement:ht,circleQuarter:ke,radius:ce,theta:Dt}}if(kt!=null){const{fontStyle:Ot="normal",fontFamily:Vt,fontWeight:qt="normal",color:he="black"}=this.properties.secondaryLabel;T.secondaryLabel={...kt,fontStyle:Ot,fontFamily:Vt,fontWeight:qt,color:he,labelPlacement:ht,circleQuarter:ke,radius:ce,theta:Dt}}T.contentHeight=et.height});const M=(T,N,O,E)=>{const{datum:z,datumIndex:B,depth:F,colorValue:V,startAngle:G,endAngle:H}=T;if(F==null){N.visible=!1;return}N.visible=!0;const $=this.getItemStyleOverrides(B,z,F,V,O,E),W=$.fill??O.fill,j=$.strokeWidth??O.strokeWidth,U=db._ModuleSupport.isGradientFill(W)&&W.bounds!=="item"?v:void 0;Ckt(N,O,$,U),N.centerX=0,N.centerY=0,N.innerRadius=F*m,N.outerRadius=(F+1)*m,N.startAngle=G+b,N.endAngle=H+b,N.inset=f+j*.5,N.cornerRadius=r},D=this.getItemBaseStyle(!1);this.datumSelection.each((T,N)=>{M(N,T,D,!1)});const L=this.getItemBaseStyle(!0);this.highlightSelection.each((T,N)=>{M(N,T,L,!0)});const C=(T,N,O,E)=>{const{depth:z,contentHeight:B}=T,F=O===0,V=F?T.label:T.secondaryLabel;if(z==null||V==null){N.visible=!1;return}const{labelPlacement:G,circleQuarter:H,radius:$,theta:W}=V;let j;switch(E&&(j=(F?this.properties.highlightStyle.label:this.properties.highlightStyle.secondaryLabel).color),N.text=V.text,N.fontSize=V.fontSize,N.lineHeight=V.lineHeight,N.fontStyle=V.fontStyle,N.fontFamily=V.fontFamily,N.fontWeight=V.fontWeight,N.fill=j??V.color,N.fillOpacity=this.getHighlightStyle(E,T.datumIndex)?.opacity??1,G){case 0:N.textAlign="center",N.textBaseline="top",N.translationX=0,N.translationY=(F?0:B-V.height)-B*.5,N.rotation=0;break;case 1:{const U=(H&3)!==0,Z=F===!U?$:$-(B-V.height);N.textAlign="center",N.textBaseline=U?"bottom":"top",N.translationX=Math.cos(W)*Z,N.translationY=Math.sin(W)*Z,N.rotation=U?W-Math.PI*.5:W+Math.PI*.5;break}case 2:{const U=(H&6)!==0,Z=F===!U?(B-V.height)*.5:(V.height-B)*.5;N.textAlign="center",N.textBaseline="middle",N.translationX=Math.cos(W)*$+Math.cos(W+Math.PI/2)*Z,N.translationY=Math.sin(W)*$+Math.sin(W+Math.PI/2)*Z,N.rotation=U?W:W+Math.PI;break}}N.visible=!0},A=this.ctx.highlightManager?.getActiveHighlight();this.labelSelection.selectByClass(dP).forEach(T=>{const N=T.closestDatum();C(N,T,T.tag,N===A)})}getTooltipContent(t){const{id:e,properties:i}=this,{labelKey:s,secondaryLabelKey:a,childrenKey:n,sizeKey:o,sizeName:r,colorKey:l,colorName:c,tooltip:h}=i,u=t.reduce((M,D)=>M?.children[D],this.rootNode);if(u==null)return;const{datum:d,depth:p}=u;if(d==null||p==null)return;const g=[],f=o!=null?d[o]:void 0;f!=null&&g.push({label:r,fallbackLabel:o,value:f});const x=l!=null?d[l]:void 0;x!=null&&g.push({label:c,fallbackLabel:l,value:x});const m=this.getItemBaseStyle(!1);Object.assign(m,this.getItemStyleOverrides(t,d,p,x,m,!1));const b=m.fill,v=pP({shape:"square",fill:b,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0},i.fillGradientDefaults,i.fillPatternDefaults,i.fillImageDefaults);return db._ModuleSupport.isGradientFill(v.fill)&&(v.fill={...v.fill,gradient:"linear",rotation:0,reverse:!1}),this.formatTooltipWithContext(h,{title:s!=null?d[s]:void 0,symbol:{marker:v},data:g},{seriesId:e,datum:d,title:void 0,depth:p,labelKey:s,secondaryLabelKey:a,childrenKey:n,sizeKey:o,sizeName:r,colorKey:l,colorName:c,...m})}createNodeData(){}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.datumSelection.selectByClass(hP))}animateEmptyUpdateReady(){Dkt(this.id,"nodes",this.ctx.animationManager,[this.scalingGroup],{toFn(){return{scalingX:1,scalingY:1}},fromFn(){return{scalingX:0,scalingY:0}}})}computeFocusBounds(t){return t}};eI.className="SunburstSeries",eI.type="sunburst";var wkt=(_(),w(P)),gc=(R(),w(st)),{commonSeriesOptionsDefs:Tkt,sunburstSeriesThemeableOptionsDef:Nkt,without:Okt}=wkt._ModuleSupport,Pkt={...Nkt,...Okt(Tkt,["highlightStyle","highlight","showInLegend"]),type:(0,gc.required)((0,gc.constant)("sunburst")),labelKey:gc.string,secondaryLabelKey:gc.string,childrenKey:gc.string,sizeKey:gc.string,colorKey:gc.string,sizeName:gc.string,colorName:gc.string},{BASE_FONT_SIZE:wY,FONT_SIZE_RATIO:TY}=cP._ModuleSupport,_kt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["hierarchy"],identifier:"sunburst",moduleFactory:t=>new eI(t),solo:!0,themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},colorRange:{$palette:"divergingColors"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:cP._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:cP._ModuleSupport.FILL_IMAGE_DEFAULTS,strokeWidth:{$isUserOption:["./strokes/0",2,0]},label:{fontFamily:{$ref:"fontFamily"},fontSize:{$rem:TY.LARGE},minimumFontSize:{$rem:9/wY},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"},overflowStrategy:"ellipsis",wrapping:"never",spacing:2},secondaryLabel:{fontFamily:{$ref:"fontFamily"},fontSize:{$rem:TY.SMALLEST},minimumFontSize:{$rem:7/wY},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"},overflowStrategy:"ellipsis",wrapping:"never"},sectorSpacing:2,padding:3,highlightStyle:{label:{color:{$ref:"chartBackgroundColor"}},secondaryLabel:{color:{$ref:"chartBackgroundColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}},gradientLegend:{enabled:!0}}},Ekt={type:"series",name:"sunburst",chartType:"hierarchy",enterprise:!0,options:Pkt,create:t=>new eI(t)},gP=(_(),w(P)),pb=(_(),w(P)),Rkt=(R(),w(st)),Bkt=(_(),w(P)),{BaseProperties:iI,HierarchySeriesProperties:zkt,HighlightStyle:Fkt,makeSeriesTooltip:Vkt,Property:Rt,Label:Gkt}=Bkt._ModuleSupport,NY=class extends Gkt{constructor(){super(...arguments),this.spacing=0}};y([Rt],NY.prototype,"spacing",2);var Ao=class extends iI{constructor(){super(...arguments),this.fill=void 0,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 NY}};y([Rt],Ao.prototype,"fill",2),y([Rt],Ao.prototype,"fillOpacity",2),y([Rt],Ao.prototype,"stroke",2),y([Rt],Ao.prototype,"strokeWidth",2),y([Rt],Ao.prototype,"strokeOpacity",2),y([Rt],Ao.prototype,"cornerRadius",2),y([Rt],Ao.prototype,"textAlign",2),y([Rt],Ao.prototype,"gap",2),y([Rt],Ao.prototype,"padding",2),y([Rt],Ao.prototype,"interactive",2),y([Rt],Ao.prototype,"label",2);var _n=class extends iI{constructor(){super(...arguments),this.fill=void 0,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 il,this.secondaryLabel=new Hx}};y([Rt],_n.prototype,"fill",2),y([Rt],_n.prototype,"fillOpacity",2),y([Rt],_n.prototype,"stroke",2),y([Rt],_n.prototype,"strokeWidth",2),y([Rt],_n.prototype,"strokeOpacity",2),y([Rt],_n.prototype,"cornerRadius",2),y([Rt],_n.prototype,"textAlign",2),y([Rt],_n.prototype,"verticalAlign",2),y([Rt],_n.prototype,"gap",2),y([Rt],_n.prototype,"padding",2),y([Rt],_n.prototype,"label",2),y([Rt],_n.prototype,"secondaryLabel",2);var gp=class extends iI{constructor(){super(...arguments),this.label=new il}};y([Rt],gp.prototype,"fill",2),y([Rt],gp.prototype,"fillOpacity",2),y([Rt],gp.prototype,"stroke",2),y([Rt],gp.prototype,"strokeWidth",2),y([Rt],gp.prototype,"strokeOpacity",2),y([Rt],gp.prototype,"label",2);var tu=class extends iI{constructor(){super(...arguments),this.label=new il,this.secondaryLabel=new Hx}};y([Rt],tu.prototype,"fill",2),y([Rt],tu.prototype,"fillOpacity",2),y([Rt],tu.prototype,"stroke",2),y([Rt],tu.prototype,"strokeWidth",2),y([Rt],tu.prototype,"strokeOpacity",2),y([Rt],tu.prototype,"label",2),y([Rt],tu.prototype,"secondaryLabel",2);var fP=class extends Fkt{constructor(){super(!1),this.group=new gp,this.tile=new tu}};y([Rt],fP.prototype,"group",2),y([Rt],fP.prototype,"tile",2);var dr=class extends zkt{constructor(){super(...arguments),this.highlightStyle=new fP,this.tooltip=Vkt(),this.group=new Ao,this.tile=new _n,this.undocumentedGroupFills=[],this.undocumentedGroupStrokes=[]}};y([Rt],dr.prototype,"sizeName",2),y([Rt],dr.prototype,"labelKey",2),y([Rt],dr.prototype,"secondaryLabelKey",2),y([Rt],dr.prototype,"itemStyler",2),y([Rt],dr.prototype,"highlightStyle",2),y([Rt],dr.prototype,"tooltip",2),y([Rt],dr.prototype,"group",2),y([Rt],dr.prototype,"tile",2),y([Rt],dr.prototype,"undocumentedGroupFills",2),y([Rt],dr.prototype,"undocumentedGroupStrokes",2);var{TextUtils:jkt,TextWrapper:Wkt,createDatumId:OY,Rect:PY,Group:_Y,BBox:Wf,Selection:mP,Text:sI,Transformable:Hkt,applyShapeStyle:$kt,getShapeStyle:gb}=pb._ModuleSupport,Ukt=class extends pb._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}},EY=new sI;function Kkt(t,e){const{fontStyle:i,fontWeight:s,fontSize:a,fontFamily:n}=e;EY.setProperties({text:t,fontStyle:i,fontWeight:s,fontSize:a,fontFamily:n,textAlign:"left",textBaseline:"top"});const{width:o,height:r}=EY.getBBox();return{width:o,height:r}}function eu(t){return t.children.length>0?t.sumSize-t.sizeValue:t.sizeValue}var RY={left:0,center:.5,right:1},Ykt={top:0,middle:.5,bottom:1},eAt=class extends pb._ModuleSupport.Group{distanceSquared(t,e){return this.getBBox().distanceSquared(t,e)}},aI=class extends pb._ModuleSupport.HierarchySeries{constructor(){super(...arguments),this.NodeClass=Ukt,this.properties=new dr,this.rectGroup=this.contentGroup.appendChild(new _Y),this.datumSelection=mP.select(this.rectGroup,PY),this.labelSelection=mP.select(this.labelGroup,_Y),this.highlightSelection=mP.select(this.rectGroup,PY)}groupTitleHeight(t,e){const{labelValue:i}=t,{label:s}=this.properties.group,a=3;if(i!=null){if(s.fontSize>e.width/a||s.fontSize>e.height/a)return;{const{height:n}=Kkt(i,s);return Math.max(n,s.fontSize)}}}getNodePadding(t,e){if(t.parent==null)return{top:0,right:0,bottom:0,left:0};if(t.children.length===0){const{padding:o}=this.properties.tile;return{top:o,right:o,bottom:o,left:o}}const{label:{spacing:i},padding:s}=this.properties.group,a=this.groupTitleHeight(t,e),n=a!=null?a+i:0;return{top:s+n,right:s,bottom:s,left:s}}sortChildren({children:t}){const e=Array.from(t,(s,a)=>a).filter(s=>eu(t[s])>0).sort((s,a)=>eu(t[a])-eu(t[s]));return{sortedChildrenIndices:e,childAt:s=>{const a=e[s];return t[a]}}}squarify(t,e){const{datum:i,children:s}=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 a=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=a,t.midPoint.x=e.x+e.width/2,t.midPoint.y=e.y);const{sortedChildrenIndices:n,childAt:o}=this.sortChildren(t),r=n.every(D=>s[D].children.length===0),l=1,c=e.width-a.left-a.right,h=e.height-a.top-a.bottom;if(c<=0||h<=0)return;const u=n.length;let d=0,p=0,g=1/0,f=n.reduce((D,L)=>D+eu(s[L]),0);const x=new Wf(e.x+a.left,e.y+a.top,c,h),m=x.clone();let b=0;for(;b<u;){const D=eu(o(b)),L=eu(o(p)),C=m.width<m.height;d+=D;const A=C?m.height:m.width,T=C?m.width:m.height,N=T*L/d;let O=A*d/f;const E=Math.max(N,O)/Math.min(N,O),z=Math.abs(l-E);if(z<g){g=z,b++;continue}d-=D,O=A*d/f;let B=C?m.x:m.y;for(let F=p;F<b;F++){const V=o(F),G=eu(V),H=C?B:m.x,$=C?m.y:B,W=T*G/d,j=C?W:O,U=C?O:W,Z=new Wf(H,$,j,U);this.applyGap(x,Z,r),this.squarify(V,Z),f-=G,B+=W}C?(m.y+=O,m.height-=O):(m.x+=O,m.width-=O),p=b,d=0,g=1/0}const v=m.width<m.height;let M=v?m.x:m.y;for(let D=p;D<u;D++){const L=o(D),C=v?M:m.x,A=v?m.y:M,T=eu(L)/f,N=m.width*(v?T:1),O=m.height*(v?1:T),E=new Wf(C,A,N,O);this.applyGap(x,E,r),this.squarify(L,E),M+=v?N:O}}applyGap(t,e,i){const s=i?this.properties.tile.gap*.5:this.properties.group.gap*.5,a=l=>({left:l.x,top:l.y,right:l.x+l.width,bottom:l.y+l.height}),n=a(t),o=a(e);["top","right","bottom","left"].forEach(l=>{(0,Rkt.isNumberEqual)(n[l],o[l])||e.shrink(s,l)})}createNodeData(){}getGroupBaseStyle(t){const{properties:e}=this,{group:i}=e,s=t?e.highlightStyle.group:void 0;return gb({fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??i.strokeWidth,strokeOpacity:s?.strokeOpacity??i.strokeOpacity},e.fillGradientDefaults,e.fillPatternDefaults,e.fillImageDefaults)}getGroupStyleOverrides(t,e,i,s,a){const{id:n,properties:o}=this,{undocumentedGroupFills:r,undocumentedGroupStrokes:l,itemStyler:c}=o,h=s.fill??r[Math.min(i??0,r.length)],u=s.stroke??l[Math.min(i??0,l.length)],d={};if(a||(d.fill=h,d.stroke=u),c!=null){const p=this.cachedDatumCallback(OY(t.join(":"),a?"highlight":"node"),()=>this.callWithContext(c,{seriesId:n,datum:e,depth:i,highlighted:a,fill:h,stroke:u,...s}));Object.assign(d,p)}return gb(d,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}getTileBaseStyle(t){const{properties:e}=this,{tile:i}=e,s=t?e.highlightStyle.tile:void 0;return gb({fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??i.strokeWidth,strokeOpacity:s?.strokeOpacity??i.strokeOpacity},e.fillGradientDefaults,e.fillPatternDefaults,e.fillImageDefaults)}getTileStyleOverrides(t,e,i,s,a,n){const{id:o,properties:r,colorScale:l}=this,{fills:c,strokes:h,itemStyler:u}=r,d=t[0],p=a.fill??c[d%c.length],g=a.stroke??h[d%h.length],f={};if(n||(f.fill=s!=null?l.convert(s):p,f.stroke=g),u!=null){const x=this.cachedDatumCallback(OY(t.join(":"),n?"highlight":"node"),()=>this.callWithContext(u,{seriesId:o,datum:e,depth:i,highlighted:n,fill:p,stroke:g,...a}));Object.assign(f,x)}return gb(f,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults)}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,a=>this.getDatumId(a)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{seriesRect:e}=this.chart??{};if(!e)return;const i=Array.from(this.rootNode),s=a=>{a.append([new sI({tag:0}),new sI({tag:1})])};this.datumSelection.update(i,void 0,a=>this.getDatumId(a)),this.labelSelection.update(i,s,a=>this.getDatumId(a))}updateNodes(){const{rootNode:t,data:e}=this,{childrenKey:i,colorKey:s,colorName:a,labelKey:n,secondaryLabelKey:o,sizeKey:r,sizeName:l,highlightStyle:c,tile:h,group:u}=this.properties,{seriesRect:d}=this.chart??{};if(!d||!e)return;this.rootNode?.walk(C=>{const{datum:A,depth:T,children:N}=C,O=N.length===0,E=O?h.label:u.label;let z;if(A!=null&&T!=null&&n!=null){const F=A[n];z=this.getLabelText(F,A,n,"label",[],E,{depth:T,datum:A,childrenKey:i,colorKey:s,colorName:a,labelKey:n,secondaryLabelKey:o,sizeKey:r,sizeName:l,value:F})}z===""&&(z=void 0);let B;if(O&&A!=null&&T!=null&&o!=null){const F=A[o];B=this.getLabelText(F,A,o,"secondaryLabel",[],h.secondaryLabel,{depth:T,datum:A,childrenKey:i,colorKey:s,colorName:a,labelKey:n,secondaryLabelKey:o,sizeKey:r,sizeName:l,value:F})}B===""&&(B=void 0),C.labelValue=z,C.secondaryLabelValue=B});const{width:p,height:g}=d;this.squarify(t,new Wf(0,0,p,g)),this.rootNode?.walk(C=>{const{bbox:A,children:T,labelValue:N,secondaryLabelValue:O}=C;if(C.label=void 0,C.secondaryLabel=void 0,A!=null)if(T.length===0){const E={width:A.width,height:A.height,meta:null},z=PO(N,this.properties.tile.label,O,this.properties.tile.secondaryLabel,{padding:h.padding},()=>E);if(z==null)return;const{height:B,label:F,secondaryLabel:V}=z,{textAlign:G,verticalAlign:H,padding:$}=h,W=RY[G]??.5,j=A.x+$+(A.width-2*$)*W,U=Ykt[H]??.5,Z=A.y+$+B*.5+(A.height-2*$-B)*U;if(F!=null){const{fontStyle:X="normal",fontFamily:q,fontWeight:tt="normal",color:J="black"}=this.properties.tile.label;C.label={text:F.text,fontSize:F.fontSize,lineHeight:F.lineHeight,fontStyle:X,fontFamily:q,fontWeight:tt,color:J,textAlign:G,verticalAlign:"middle",x:j,y:Z-(B-F.height)*.5}}if(V!=null){const{fontStyle:X="normal",fontFamily:q,fontWeight:tt="normal",color:J="black"}=this.properties.tile.secondaryLabel;C.secondaryLabel={text:V.text,fontSize:V.fontSize,lineHeight:V.fontSize,fontStyle:X,fontFamily:q,fontWeight:tt,color:J,textAlign:G,verticalAlign:"middle",x:j,y:Z+(B-V.height)*.5}}}else{if(N==null)return;{const{padding:E,textAlign:z}=u,B=this.groupTitleHeight(C,A);if(B==null)return;const F=A.width-2*E,V=Wkt.wrapText(N,{maxWidth:A.width-2*E,font:u.label,textWrap:"never"}),G=RY[z]??.5,{fontStyle:H="normal",fontFamily:$,fontWeight:W="normal",color:j="black"}=this.properties.group.label;C.label={text:V,fontSize:u.label.fontSize,lineHeight:jkt.getLineHeight(u.label.fontSize),fontStyle:H,fontFamily:$,fontWeight:W,color:j,textAlign:z,verticalAlign:"middle",x:A.x+E+F*G,y:A.y+E+B*.5}}}});const f={series:new Wf(0,0,p,g),axis:new Wf(0,0,p,g)},x=(C,A,T,N,O)=>{const{bbox:E}=C;if(E==null){A.visible=!1;return}const{datum:z,depth:B=-1,datumIndex:F,colorValue:V}=C,G=C.children.length===0,H=G?N:T,$=G?this.getTileStyleOverrides(F,z,B,V,H,O):this.getGroupStyleOverrides(F,z,B,H,O);A.crisp=!0,$kt(A,H,$,f),A.cornerRadius=G?h.cornerRadius:u.cornerRadius,A.zIndex=[0,B,O?1:0];const W=C.parent?.children.every(Z=>Z.children.length===0),j=C.parent!=null?C.parent.bbox:void 0,U=C.parent!=null?C.parent.padding:void 0;W===!0&&j!=null&&U!=null?(A.clipBBox=E,A.x=j.x+U.left,A.y=j.y+U.top,A.width=j.width-(U.left+U.right),A.height=j.height-(U.top+U.bottom)):(A.clipBBox=void 0,A.x=E.x,A.y=E.y,A.width=E.width,A.height=E.height),A.visible=!0},m=this.getGroupBaseStyle(!1),b=this.getTileBaseStyle(!1);this.datumSelection.each((C,A)=>x(A,C,m,b,!1));const v=this.getGroupBaseStyle(!0),M=this.getTileBaseStyle(!0);this.highlightSelection.each((C,A)=>{x(A,C,v,M,!0)});const D=(C,A,T,N)=>{const O=C.children.length===0,E=T===0?C.label:C.secondaryLabel;if(E==null){A.visible=!1;return}let z;if(N){const{tile:B,group:F}=c;z=B.secondaryLabel.color,O?T===0&&(z=B.label.color):z=F.label.color}A.text=E.text,A.fontSize=E.fontSize,A.lineHeight=E.lineHeight,A.fontStyle=E.fontStyle,A.fontFamily=E.fontFamily,A.fontWeight=E.fontWeight,A.fill=z??E.color,A.fillOpacity=this.getHighlightStyle(N,C.datumIndex)?.opacity??1,A.textAlign=E.textAlign,A.textBaseline=E.verticalAlign,A.x=E.x,A.y=E.y,A.visible=!0,A.zIndex=1},L=this.ctx.highlightManager?.getActiveHighlight();this.labelSelection.selectByClass(sI).forEach(C=>{const A=C.closestDatum();D(A,C,C.tag,A===L)})}pickNodesExactShape(t){const e=super.pickNodesExactShape(t);return e.sort((i,s)=>s.datumIndex.length-i.datumIndex.length),e}pickNodeClosestDatum(t){const e=this.pickNodesExactShape(t);return e.length!==0?{datum:e[0],distance:0}:this.pickNodeNearestDistantObject(t,this.datumSelection.nodes())}getTooltipContent(t){const{id:e,properties:i}=this,{labelKey:s,secondaryLabelKey:a,childrenKey:n,sizeKey:o,sizeName:r,colorKey:l,colorName:c,tooltip:h}=i,u=t.reduce((C,A)=>C?.children[A],this.rootNode);if(u==null)return;const{datum:d,depth:p,children:g}=u;if(d==null||p==null)return;const f=g.length===0,x=[],m=o!=null?d[o]:void 0;m!=null&&x.push({label:r,fallbackLabel:o,value:m});const b=l!=null?d[l]:void 0;b!=null&&x.push({label:c,fallbackLabel:l,value:b});let v;f?(v=this.getTileBaseStyle(!1),Object.assign(v,this.getTileStyleOverrides(t,d,p,b,v,!1))):(v=this.getGroupBaseStyle(!1),Object.assign(v,this.getGroupStyleOverrides(t,d,p,v,!1)));const M=v.fill,D=gb({shape:"square",fill:M,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults,this.properties.fillImageDefaults);pb._ModuleSupport.isGradientFill(D.fill)&&(D.fill={...D.fill,gradient:"linear",rotation:0,reverse:!1});const L=f?{marker:D}:void 0;return this.formatTooltipWithContext(h,{title:s!=null?d[s]:void 0,symbol:L,data:x},{seriesId:e,datum:d,title:void 0,depth:p,labelKey:s,secondaryLabelKey:a,childrenKey:n,sizeKey:o,sizeName:r,colorKey:l,colorName:c,...v})}computeFocusBounds(t){return Hkt.toCanvas(this.contentGroup,t.getBBox())}};aI.className="TreemapSeries",aI.type="treemap";var Zkt=(_(),w(P)),ji=(R(),w(st)),{commonSeriesOptionsDefs:Xkt,treemapSeriesThemeableOptionsDef:qkt,without:Qkt}=Zkt._ModuleSupport,Hf={...qkt,...Qkt(Xkt,["highlightStyle","highlight","showInLegend"]),type:(0,ji.required)((0,ji.constant)("treemap")),labelKey:ji.string,secondaryLabelKey:ji.string,childrenKey:ji.string,sizeKey:ji.string,colorKey:ji.string,sizeName:ji.string,colorName:ji.string};Hf.fillGradientDefaults=(0,ji.undocumented)(ji.fillGradientDefaults),Hf.fillPatternDefaults=(0,ji.undocumented)(ji.fillPatternDefaults),Hf.fillImageDefaults=(0,ji.undocumented)(ji.fillImageDefaults),Hf.undocumentedGroupFills=(0,ji.undocumented)((0,ji.arrayOf)(ji.color)),Hf.undocumentedGroupStrokes=(0,ji.undocumented)((0,ji.arrayOf)(ji.color));var{FONT_SIZE_RATIO:BY}=gP._ModuleSupport,Jkt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["hierarchy"],identifier:"treemap",moduleFactory:t=>new aI(t),solo:!0,themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},colorRange:{$palette:"divergingColors"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:gP._ModuleSupport.FILL_PATTERN_DEFAULTS,fillImageDefaults:gP._ModuleSupport.FILL_IMAGE_DEFAULTS,undocumentedGroupFills:{$palette:"hierarchyColors"},undocumentedGroupStrokes:{$palette:"secondHierarchyColors"},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:"chartBackgroundColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:1.5},minimumFontSize:{$rem:BY.SMALLER},fontFamily:{$ref:"fontFamily"},wrapping:"on-space",overflowStrategy:"ellipsis",spacing:2},secondaryLabel:{enabled:!0,color:{$ref:"chartBackgroundColor"},fontStyle:void 0,fontWeight:void 0,fontSize:{$ref:"fontSize"},minimumFontSize:{$rem:BY.SMALLER},fontFamily:{$ref:"fontFamily"},wrapping:"never",overflowStrategy:"ellipsis"},fill:void 0,stroke:void 0,strokeWidth:{$isUserOption:["../strokes/0",2,{$isUserOption:["./stroke",2,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:"chartBackgroundColor"}},secondaryLabel:{color:{$ref:"chartBackgroundColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}}},gradientLegend:{enabled:!0}}},tIt={type:"series",name:"treemap",chartType:"hierarchy",enterprise:!0,options:Hf,create:t=>new aI(t)},iAt=cft._ModuleSupport.ModuleRegistry,eIt=[mft,t$,m$,Fyt,lxt,L$,T$,Z$,aU,cU],iIt=[yft,xft,bft,vft,ZSt,cMt,mMt,iDt,mDt],sIt=[Lft,Hmt,xkt],aIt=[_ft,jxt,UDt],nIt=[Vft,Ekt,tIt],oIt=[Uft,b0t],rIt=[Jft,xbt,Pbt,mvt,Vvt,oSt],lIt=[...eIt,...iIt,...sIt,...aIt,...nIt,...oIt,...rIt,pmt,gmt,fmt],cIt=(_(),w(P)),zY=(_(),w(P)),sAt=(_(),w(P)),FY={xMin:$s,xMax:Da,yMin:Ha,yMax:$a,span:In},hIt=1e3,uIt=5;function VY(t,e){return Array.from({length:t},(i,s)=>{const a=s*In,n=e[a+$s],o=e[a+Da];return(n+o)/2|0})}function dIt(t,e,i){if(t.length<hIt)return;const[s,a]=Fx(i);let n=zx(t,uIt),{indexData:o,valueData:r}=Vx(t,e,e,s,a,n),l=VY(n,o);const c=[{maxRange:n,indexData:o,indices:l,indexes:FY}];for(;n>64;)({indexData:o,valueData:r,maxRange:n}=Gx(o,r,n)),l=VY(n,o),c.push({maxRange:n,indexData:o,indices:l,indexes:FY});return c.reverse(),c}var{ChartAxisDirection:pIt,ContinuousScale:gIt,DiscreteTimeScale:fIt}=zY._ModuleSupport,mIt=class extends zY._ModuleSupport.BarSeries{aggregateData(t,e){if(e?.type!=="ungrouped")return;const i=this.axes[pIt.X];if(i==null||!(gIt.is(i.scale)||fIt.is(i.scale)))return;const s=t.resolveKeysById(this,"xValue",e),a=t.resolveColumnById(this,"yValue-raw",e),{index:n}=t.resolveProcessedDataDefById(this,"xValue"),o=e.domain.keys[n];return dIt(s,a,o)}},{BarSeriesModule:yIt}=cIt._ModuleSupport,xIt={...yIt,type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"bar",moduleFactory:t=>new mIt(t)},bIt=(_(),w(P)),GY=(_(),w(P)),aAt=(_(),w(P)),vIt=1e3,jY=10;function WY(t,e,i,s,a,n){const o=t[n];if(o==null)return!1;const r=mD(o,e,i),l=yD(r,a);return n===s[l+$s]||n===s[l+Da]||n===s[l+Ha]||n===s[l+$a]}function SIt(t,e,i){if(t.length<vIt)return;const[s,a]=Fx(i);let n=zx(t,jY);const{indexData:o,valueData:r}=Vx(t,e,e,s,a,n);let l=[];for(let h=0;h<t.length;h+=1)WY(t,s,a,o,n,h)&&l.push(h);const c=[{maxRange:n,indices:l}];for(;l.length>jY&&n>64;)({maxRange:n}=Gx(o,r,n,{inPlace:!0})),l=l.filter(WY.bind(null,t,s,a,o,n)),c.push({maxRange:n,indices:l});return c.reverse(),c}var{ChartAxisDirection:MIt,ContinuousScale:DIt,DiscreteTimeScale:kIt}=GY._ModuleSupport,IIt=class extends GY._ModuleSupport.LineSeries{aggregateData(t,e){const i=this.axes[MIt.X];if(i==null||!(DIt.is(i.scale)||kIt.is(i.scale)))return;const s=t.resolveColumnById(this,"xValue",e),a=t.resolveColumnById(this,"yValueRaw",e),n=t.getDomain(this,"xValue","value",e);return SIt(s,a,n)}},{LineSeriesModule:AIt}=bIt._ModuleSupport,CIt={...AIt,type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"line",moduleFactory:t=>new IIt(t)},LIt=`.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-panel-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-panel-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;cursor:default;--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,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>');--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::-moz-range-thumb,.ag-charts-color-picker__alpha-input::-moz-range-thumb{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}.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::-moz-range-thumb{background:hsl(var(--h),100%,50%)}.ag-charts-color-picker__hue-input::-webkit-slider-thumb{background:hsl(var(--h),100%,50%)}.ag-charts-color-picker__alpha-input::-moz-range-thumb{background:transparent}.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{background:transparent}.ag-charts-color-picker__alpha-input--opaque::-moz-range-thumb{background:var(--color)}.ag-charts-color-picker__alpha-input--opaque::-webkit-slider-thumb{background:var(--color)}.ag-charts-color-picker__hue-input:focus-visible::-moz-range-thumb,.ag-charts-color-picker__alpha-input:focus-visible::-moz-range-thumb{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),var(--ag-charts-focus-border-shadow)}.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::-moz-range-track,.ag-charts-color-picker__alpha-input::-moz-range-track{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__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::-moz-range-track{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__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::-moz-range-track{background:linear-gradient(to right,transparent,var(--color)),var(--checker) top left / 4px 4px}.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{border-top-left-radius:0;border-top-right-radius:0;.ag-charts-menu__row:first-child{border-radius:0}}.ag-charts-annotations__text-size-menu{--item-padding: 4px 8px;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-button-font-family);font-size:var(--ag-charts-button-font-size);font-weight:var(--ag-charts-button-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{font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-context-menu__cover{position:fixed;left:0;top:0}.ag-charts-context-menu__menu{background:var(--ag-charts-menu-background-color);border-radius:var(--ag-charts-border-radius);border:var(--ag-charts-menu-border);box-shadow:var(--ag-charts-popup-shadow);color:var(--ag-charts-menu-text-color);display:table;flex-direction:column;padding:.5em 0;transition:transform .1s ease;white-space:nowrap}.ag-charts-context-menu__menu:focus{outline:none}.ag-charts-context-menu__item{align-items:center;background:none;border:none;box-sizing:border-box;color:inherit;cursor:pointer;display:table-row;font:inherit;justify-content:space-between;text-align:left;width:100%;-webkit-appearance:none;-moz-appearance:none}.ag-charts-context-menu__icon>img{width:var(--ag-charts-icon-size);height:var(--ag-charts-icon-size)}.ag-charts-context-menu__icon,.ag-charts-context-menu__cell{display:table-cell;vertical-align:middle}.ag-charts-context-menu__cellpadding{padding:.5em 1em}.ag-charts-context-menu__icon{padding-right:0}.ag-charts-context-menu__item[data-focus-override=true],.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-override=false]{background:inherit}.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;color:color-mix(in srgb,var(--ag-charts-input-text-color) 50%,transparent);text-align:left}.ag-charts-context-menu__item[aria-disabled=true]:focus{background:inherit;cursor:inherit}.ag-charts-context-menu__divider{display:table-row}.ag-charts-context-menu__divider>div{padding:5px 0}.ag-charts-context-menu__divider>div:after{content:"";display:block;border-top:1px solid var(--ag-charts-border-color)}.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}}
`;wd._ModuleSupport.ModuleRegistry.registerMany(lIt,wd.VERSION);function HY(){wd._ModuleSupport.moduleRegistry.register(Qit,ost,zst,Vrt,Yrt,xIt,Ult,Hct,Oht,Wmt,zyt,rxt,gut,ult,xlt,Clt,nlt,Llt,Wlt,Gxt,CIt,ybt,Obt,fvt,Fvt,nSt,Ept,igt,oft,nut,YSt,gst,lMt,fMt,eDt,fDt,Pst,$Dt,Bst,jdt,odt,Wpt,x0t,ykt,$pt,_kt,lgt,Jkt,Dpt,Egt),wd._ModuleSupport.enterpriseModule.isEnterprise=!0,wd._ModuleSupport.enterpriseModule.styles=LIt,wd._ModuleSupport.enterpriseModule.licenseManager=t=>new Ug(t.container?.ownerDocument??(typeof document>"u"?void 0:document)),wd._ModuleSupport.enterpriseModule.injectWatermark=lft}Iit(WT,(_(),w(P)),Co.exports),HY();var wIt={setLicenseKey(t){Ug.setLicenseKey(t)}};function $Y(){HY(),(0,Ul.setupCommunityModules)()}var TIt={VERSION:Ul.VERSION,_Scene:Ul._Scene,_Theme:Ul._Theme,_Util:Ul._Util,create:Ul.AgCharts.create.bind(Ul.AgCharts),createSparkline:Ul.AgCharts.__createSparkline.bind(Ul.AgCharts),setup:$Y,setGridContext:Ug.setGridContext.bind(Ug),setLicenseKey:Ug.setLicenseKey.bind(Ug),isEnterprise:!0};if(typeof Co.exports=="object"&&typeof Uf=="object"){var NIt=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Object.getOwnPropertyNames(e))!Object.prototype.hasOwnProperty.call(t,a)&&a!==i&&Object.defineProperty(t,a,{get:()=>e[a],enumerable:!(s=Object.getOwnPropertyDescriptor(e,a))||s.enumerable});return t};Co.exports=NIt(Co.exports,Uf)}return Co.exports});