ag-charts-core
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
2 lines • 164 kB
JavaScript
var lo=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,ue=(t,e)=>{for(var n in e)lo(t,n,{get:e[n],enumerable:!0})},xt=(t,e,n,r)=>{for(var i=r>1?void 0:r?Wc(e,n):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(r?s(e,n,i):s(i))||i);return r&&i&&lo(e,n,i),i},uo=(t=>(t.Chart="chart",t.Axis="axis",t.Series="series",t.Plugin="plugin",t.AxisPlugin="axis:plugin",t.SeriesPlugin="series:plugin",t.Preset="preset",t))(uo||{});function Hc(t){return t.domain}var fo=(t=>(t[t.Leading=0]="Leading",t[t.Trailing=1]="Trailing",t[t.Interpolate=2]="Interpolate",t))(fo||{}),jc=class{constructor(t){this.length=t,this.buffer=new Uint32Array(Math.ceil(t/32))}clear(){this.buffer.fill(0)}getBit(t){return this.buffer[t>>>5]>>>(t&31)&1}setBit(t){this.buffer[t>>>5]|=1<<(t&31)}unsetBit(t){this.buffer[t>>>5]&=~(1<<(t&31))}toggleBit(t){this.buffer[t>>>5]^=1<<(t&31)}fill(t,e,n){if(e>=n)return;const r=e>>>5,i=e&31,o=n>>>5,s=n&31;if(r===o){const l=(1<<s-i)-1<<i;t?this.buffer[r]|=l:this.buffer[r]&=~l;return}const a=4294967295<<i;t?this.buffer[r]|=a:this.buffer[r]&=~a,this.buffer.fill(4294967295*t,r+1,o);const c=(1<<s)-1;t?this.buffer[o]|=c:this.buffer[o]&=~c}},Vc=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 n=this.events.get(t);n&&(n.delete(e),n.size===0&&this.events.delete(t))}emit(t,e){const n=this.events.get(t);if(n)for(const r of n)r(e)}clear(t){t?this.events.delete(t):this.events.clear()}},Cr=class{constructor(t){if(this.maxCacheSize=t,this.store=new Map,t<=0)throw new Error("LRUCache size must be greater than 0")}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 n=this.store.keys().next();n.done||this.store.delete(n.value)}return e}clear(){this.store.clear()}},ho={};ue(ho,{Time:()=>gl,check:()=>de,create:()=>Eo,inDevelopmentMode:()=>Mo});function Ir(t){return t===void 0?[]:Array.isArray(t)?t:[t]}function Kc(t){return Array.from(new Set(t))}function zc(t,e){return t.reduce((n,r)=>{const i=e(r);return n[i]??(n[i]=[]),n[i].push(r),n},{})}function fe(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(Array.isArray(t[n])&&Array.isArray(e[n])){if(!fe(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function qc(t,e,n=0){if(t.length===0)return[];const r=[];for(let i=0;i<e;i++)r.push(t.at((i+n)%t.length));return r}function Yc(t,e){const n=new Map;for(const[r,i]of e.entries())n.set(i,r);return t.sort((r,i)=>{const o=n.get(r)??1/0,s=n.get(i)??1/0;return o-s})}function Xc(t,e){let n=0;for(;n<t.length&&e(t[n]);)n+=1;const r=n;r!==0&&t.splice(0,r)}function Jc(t,e){let n=t.length-1;for(;n>=0&&e(t[n]);)n-=1;const r=t.length-1-n;r!==0&&t.splice(t.length-r,r)}function Qc(t,e,n){const r=[t],i=Math.round((e-t)/(n-1));if(i>0)for(let o=t+i;o<e&&!(r.push(o)>=n-1);o+=i);return r.push(e),r}function Zc(t,e){for(let n=e.length-1;n>=0;n--)t.push(e[n]);return t}var it={};typeof globalThis.window<"u"&&(it.window=globalThis.window),typeof document<"u"?it.document=document:typeof globalThis.global<"u"&&(it.document=globalThis.document);function yn(t){return t?it.document?.[t]:it.document}function bn(t){return t?it.window?.[t]:it.window}function tl(t){it.document=t}function el(t){it.window=t}function go(){return it.window?.OffscreenCanvas??globalThis.OffscreenCanvas}function nl(){return it.window?.Path2D??globalThis.Path2D}function rl(){return it.window?.DOMMatrix??globalThis.DOMMatrix}function il(){return it.window?.Image??globalThis.Image}function ol(){return it.window?.ResizeObserver??globalThis.ResizeObserver}var po=1,sl=11;function mo(t){return t!=null&&typeof t.nodeType=="number"}function Nr(t){return t!=null&&t.nodeType===po}function al(t){return t!=null&&t.nodeType===sl}function yo(t){return t!=null&&t.nodeType===po&&"style"in t}var bo={};ue(bo,{error:()=>vo,errorOnce:()=>ll,log:()=>vn,logGroup:()=>xo,reset:()=>ul,table:()=>cl,warn:()=>he,warnOnce:()=>ot});var Lr=new Set;function vn(...t){console.log(...t)}function he(t,...e){console.warn(`AG Charts - ${t}`,...e)}function vo(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)}function cl(...t){console.table(...t)}function wo(t,e,n){let r;t instanceof Error?r=t.message:typeof t=="string"?r=t:typeof t=="object"?r=JSON.stringify(t):r=String(t);const i=`${e}: ${r}`;Lr.has(i)||(n(t),Lr.add(i))}function ot(t,...e){wo(t,"Logger.warn",n=>he(n,...e))}function ll(t,...e){wo(t,"Logger.error",n=>vo(n,...e))}function ul(){Lr.clear()}function fl(t){return typeof t=="object"&&t!==null&&"then"in t}function xo(t,e){console.groupCollapsed(t);let n=!0;try{const r=e();return fl(r)?(n=!1,r.finally(()=>{console.groupEnd()})):r}finally{n&&console.groupEnd()}}var hl=2e3,So=Date.now();function dl(){const t=Date.now()-So;if(t>hl){const e=(Math.floor(t/100)/10).toFixed(1);vn(`**** ${e}s since last log message ****`)}So=Date.now()}function Eo(...t){return Object.assign((...n)=>{de(...t)&&(typeof n[0]=="function"&&(n=Ir(n[0]())),dl(),vn(...n))},{check:()=>de(...t),group:(n,r)=>de(...t)?xo(n,r):r()})}function de(...t){return t.length===0&&t.push(!0),Ir(bn("agChartsDebug")).some(n=>t.includes(n))}function Mo(t){if(de("dev"))return t()}function gl(t,e={}){const{logResult:n=!0,logStack:r=!1,logArgs:i=!1,logData:o}=e;return function(s,a,c){const l=c.value;c.value=function(...u){const f=performance.now(),h=l.apply(this,u),g={duration:performance.now()-f};return n&&(g.result=h),i&&(g.args=u),r&&(g.stack=new Error("Stack trace for timing debug").stack),o&&(g.logData=o(this)),vn(t,g),h}}}var To={};ue(To,{flush:()=>Ao,record:()=>Oo});var $r=new Map;function Oo(t,e){de("scene:stats:verbose")&&$r.set(t,e)}function Ao(){const t=Object.fromEntries($r);return $r.clear(),t}var pl={},Do={};ue(Do,{RegistryMode:()=>Fo,getAxisModule:()=>Ol,getChartModule:()=>Al,getPresetModule:()=>Dl,getSeriesModule:()=>Fl,hasModule:()=>El,ifRegistryChanged:()=>wl,isEnterprise:()=>ko,isIntegrated:()=>bl,isModuleType:()=>ge,isUmd:()=>vl,listModules:()=>Ml,listModulesByType:()=>Tl,register:()=>Rr,registerModules:()=>xl,reset:()=>Sl,setRegistryMode:()=>ml});var Fo=(t=>(t.Enterprise="enterprise",t.Integrated="integrated",t.UMD="umd",t))(Fo||{}),He=new Set;function ml(t){He.add(t)}function yl(){He.clear()}function ko(){return He.has("enterprise")}function bl(){return He.has("integrated")}function vl(){return He.has("umd")}var Mt=new Map,wn=0;function Co(t){if(Mt.set(t.name,t),wn++,t.dependencies)for(const e of t.dependencies)Rr(e)}function wl(t,e){return wn!==t&&e(),wn}function Rr(t){const e=Mt.get(t.name);if(!e){Co(t);return}if(e.version===t.version){!e.enterprise&&t.enterprise&&Co(t);return}throw new Error([`AG Charts - Module '${t.name}' already registered with different version:`,`${e.version} vs ${t.version}`,"","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 xl(t){for(const e of t.flat())Rr(e)}function Sl(){yl(),Mt.clear(),wn++}function El(t){return Mt.has(t)}function*Ml(){for(const t of Mt.values())yield t}function*Tl(t){for(const e of Mt.values())ge(t,e)&&(yield e)}function Ol(t){const e=Mt.get(t);if(ge("axis",e))return e}function Al(t){const e=Mt.get(t);if(ge("chart",e))return e;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function Dl(t){const e=Mt.get(t);if(ge("preset",e))return e}function Fl(t){const e=Mt.get(t);if(ge("series",e))return e}function ge(t,e){return e?.type===t}var xn=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)}},kl=class{constructor(){this.cleanup=new xn}destroy(){this.cleanup.flush()}};function oy(t){return t}var Io=new WeakMap;function Tt(t){const e=Io.get(t);if(!e)throw new Error("AG Charts - DynamicContext: missing internal state.");return e}var Cl=class Pc{constructor(e){const n={cleanup:new xn,self:this,resolving:new Set,children:new Set,refs:new Set,parent:e,destroyed:!1};Io.set(this,n),e&&Tt(e).children.add(this)}get cleanup(){return Tt(this).cleanup}constant(e,n){return this.assertNotDestroyed(),Object.defineProperty(this,e,{value:n,configurable:!0,enumerable:!0}),Tt(this).self}ref(e,n){this.assertNotDestroyed();const r=Tt(this);return r.refs.add(e),Object.defineProperty(this,e,{value:n,configurable:!0,enumerable:!0}),r.self}service(e,n){return this.assertNotDestroyed(),Object.defineProperty(this,e,{configurable:!0,enumerable:!0,get:()=>{const r=this.resolve(e,n);return Object.defineProperty(this,e,{value:r,configurable:!0,enumerable:!0}),r}}),Tt(this).self}factory(e,n){return this.assertNotDestroyed(),Object.defineProperty(this,e,{configurable:!0,enumerable:!0,get:()=>this.resolve(e,n)}),Tt(this).self}has(e){return e in this}child(){const e=new Pc(this);return Object.setPrototypeOf(e,this),e}destroy(){const e=Tt(this);if(e.destroyed)return;e.destroyed=!0;for(const r of e.children)r.destroy();e.children.clear();const n=Object.keys(this);for(let r=n.length-1;r>=0;r--){const i=n[r];if(e.refs.has(i))continue;const o=Object.getOwnPropertyDescriptor(this,i);o?.value!=null&&typeof o.value=="object"&&o.value.destroy?.()}e.cleanup.flush(),e.parent&&Tt(e.parent).children.delete(this)}resolve(e,n){const r=Tt(this);if(r.destroyed)throw new Error(`AG Charts - DynamicContext: cannot resolve '${e}' on a destroyed context.`);if(r.resolving.has(e))throw new Error(`AG Charts - DynamicContext: circular dependency detected while resolving '${e}'.`);r.resolving.add(e);try{return n(r.self)}finally{r.resolving.delete(e)}}assertNotDestroyed(){if(Tt(this).destroyed)throw new Error("AG Charts - DynamicContext: cannot register on a destroyed context.")}};function Il(){return new Cl}function z(t,e,n){return Math.min(n,Math.max(t,e))}function pe(t){if(typeof t=="number")return t;const e=Number(t);return Number.isFinite(e)||ot(`the value ${t} exceeds the representable Number range and cannot be rendered.`),e}function Nl(t){return typeof t=="bigint"?pe(t):Number(t)}function Sn(t){return t==null?void 0:Number(t)}function No(t,e){return(typeof t=="bigint"||Number.isInteger(t))&&(typeof e=="bigint"||Number.isInteger(e))}function Ll(t,e){return typeof t=="bigint"||typeof e=="bigint"?No(t,e)?BigInt(t)+BigInt(e):Number(t)+Number(e):t+e}function $l(t,e){return typeof t=="bigint"||typeof e=="bigint"?No(t,e)?BigInt(t)-BigInt(e):Number(t)-Number(e):t-e}function Rl(t,e){return typeof t=="number"&&typeof e=="number"?Math.min(t,e):typeof t=="number"&&Number.isNaN(t)?t:typeof e=="number"&&Number.isNaN(e)?e:t<e?t:e}function _l(t,e){return typeof t=="number"&&typeof e=="number"?Math.max(t,e):typeof t=="number"&&Number.isNaN(t)?t:typeof e=="number"&&Number.isNaN(e)?e:t>e?t:e}function Pl(t){return typeof t=="bigint"?t<0n?-t:t:Math.abs(t)}function Bl(t){return typeof t=="bigint"?0n:0}function Gl(t,e,n=1e-10){return t>=e[0]-n&&t<=e[1]+n}function _r(t,e,n=1e-10){return t===e||Math.abs(t-e)<n}function Ul(t){return typeof t=="bigint"?t<0n:Math.sign(t)===-1||Object.is(t,-0)}function Wl(t){return t%1===0}function Pr(t,e=2){const n=10**e;return Math.round(t*n)/n}function Hl(t,e=2){const n=10**e;return Math.ceil(t*n)/n}function jl(t,e){return Math.floor(t%e+(t<0?Math.abs(e):0))}function Lo(t){if(Math.floor(t)===t)return 0;let e=String(t),n=0;if(t<1e-6||t>=1e21){let i;[e,i]=e.split("e"),i!=null&&(n=Number(i))}const r=e.split(".")[1]?.length??0;return Math.max(r-n,0)}function Vl(t,e){for(let n=e+1;n<t.length;n++)if(t[n]?.stop!=null)return n;return t.length-1}function $o(t,e,n,r){const i=new Array(t.length);let o=0,s=-1;for(let a=0;a<t.length;a++){a>=s&&(s=Vl(t,a));const c=Sn(t[a]?.stop);if(c==null){const l=Sn(t[o]?.stop),u=Sn(t[s]?.stop),f=l??e,h=u??n,d=r&&l==null?1:0;i[a]=f+(h-f)*(a-o+d)/(s-o+d)}else i[a]=c,o=a}return i}function Ro(t,e,n,r){if(t.name!=null)return t.name;const i=e===n.length-1;return Number.isInteger(t.start)&&Number.isInteger(t.end)&&!i&&t.end-t.start>=1?`${r(t.start,0)}\u2013${r(t.end-1,0)}`:`${r(t.start)}\u2013${r(t.end)}`}function Kl(t,e,n){if(t.length===0)return{domain:[],range:[],bins:[]};const r=pe(e[0]),i=pe(e[1]),o=n==="discrete",s=$o(t,r,i,o),a=t.map(c=>c.color);return o?zl(s,a,t,r,i):{domain:s,range:a,bins:[]}}function zl(t,e,n,r,i){const o=[],s=[],a=[];for(let c=0;c<n.length;c++){const l=c===0?r:t[c-1],u=t[c],f=z(r,l,i),h=Math.max(f,z(r,u,i));o.push(f),s.push(e[c]),a.push({start:f,end:h,color:e[c],name:n[c].name})}return o.push(a.at(-1).end),{domain:o,range:s,bins:a}}function ql(t){const{domain:e,range:n,mode:r,displayDomain:i}=t;if(n.length===0)return[];const[o,s]=i?[pe(i[0]),pe(i[1])]:[e[0],e.at(-1)],a=s-o||1;if(r==="discrete"){const c=[];for(let l=0;l<n.length;l++){const u=z(0,(e[l]-o)/a,1),f=z(0,(e[l+1]-o)/a,1);f<u||(c.push({stop:u,color:n[l]}),f>u&&c.push({stop:f,color:n[l]}))}return c}if(e.length<n.length){const c=Math.max(n.length-1,1);return n.map((l,u)=>({stop:u/c,color:l}))}return e.map((c,l)=>({stop:(c-o)/a,color:n[l]}))}function _o(t,e,n,r,i){return Ro({start:t,end:e,color:""},n,{length:r},i)}function Yl(t,e,n,r){const{domain:i,range:o,mode:s}=t;if(s!=="discrete"||o.length===0)return;let a=0;for(;a<o.length-1&&n>=i[a+1];)a++;return e[a]?.name??_o(i[a],i[a+1],a,o.length,r)}function Xl(t){return t.flatMap((e,n)=>{const{stop:r}=e,i=t.at(n+1)?.color;return i==null?[e]:[e,{stop:r,color:i}]})}var Jl=void 0,Ql=void 0,Zl=void 0,tu=void 0,eu=void 0,nu=void 0,ru=void 0,iu=void 0,je="\u2026",En=/\r?\n/g,Ve="\u200B",Po=/[\s.,;:-]{1,5}$/,Ke;function Bo(t){if(Ke==null){const n=bn("Option");Ke=new n().style}Ke.color=t;const e=Ke.color||null;return Ke.color="",e}function Go(t){return t?.ownerDocument.defaultView?.getComputedStyle(t).direction==="rtl"}function ou(t,e){if(!t)return;const{x:n,y:r,width:i,height:o}=uu(e);Mn(t.style,"width",i),Mn(t.style,"height",o),Mn(t.style,"left",n),Mn(t.style,"top",r)}function su(t){const e=Number.parseFloat(t.style.width),n=Number.parseFloat(t.style.height),r=Number.parseFloat(t.style.left),i=Number.parseFloat(t.style.top),o=Number.isFinite(e)?e:t.offsetWidth,s=Number.isFinite(n)?n:t.offsetHeight,a=Number.isFinite(r)?r:t.offsetLeft,c=Number.isFinite(i)?i:t.offsetTop;return{x:a,y:c,width:o,height:s}}function au(t){if(t.focus({preventScroll:!0}),t.lastChild?.textContent==null)return;const{ownerDocument:e}=t,n=e.createRange();n.setStart(t.lastChild,t.lastChild.textContent.length),n.setEnd(t.lastChild,t.lastChild.textContent.length);const r=e.defaultView?.getSelection();r?.removeAllRanges(),r?.addRange(n)}function cu(){const t=bn("navigator");if("scheduling"in t){const e=t.scheduling;if("isInputPending"in e)return e.isInputPending({includeContinuous:!0})}return!1}function lu(t){return`ag-charts-icon ag-charts-icon-${t}`}function uu(t){let{x:e,y:n,width:r,height:i}=t;return(r==null||r>0)&&(i==null||i>0)?t:(e!=null&&r!=null&&r<0&&(r=-r,e=e-r),n!=null&&i!=null&&i<0&&(i=-i,n=n-i),{x:e,y:n,width:r,height:i})}function Mn(t,e,n){n==null?t.removeProperty(e):t.setProperty(e,`${n}px`)}function Tn(t){return t!=null}function j(t){return Array.isArray(t)}function Uo(t){return typeof t=="boolean"}function me(t){return t instanceof Date}function On(t){return me(t)&&!Number.isNaN(Number(t))}function Wo(t){return t instanceof RegExp}function Ft(t){return typeof t=="function"}function Y(t){return typeof t=="object"&&t!==null&&!j(t)}function fu(t){return j(t)||X(t)}function X(t){return typeof t=="object"&&t!==null&&t.constructor?.name==="Object"}function hu(t){if(typeof t!="object"||t===null)return!1;for(const e in t)return!1;return!0}function Ot(t){return typeof t=="string"}function ye(t){return typeof t=="number"}function At(t){return Number.isFinite(t)}function du(t){return typeof t=="bigint"}function An(t){return typeof t=="number"||typeof t=="bigint"}function zt(t){return typeof t=="bigint"||Number.isFinite(t)}function Ho(t){return t!=null&&t.nodeType===1&&"style"in t}function gu(t,e){return Ot(e)&&Object.keys(t).includes(e)}function pu(t,e){return Object.values(t).includes(e)}function mu(t){return typeof t=="symbol"}function jo(t){return Ot(t)&&(t==="none"||Bo(t)!=null)}function yu(t,e){return t in e}var Vo=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function bu(t){return t?t.split(",").map(e=>{const n=e.trim();return!n||n.startsWith('"')||n.startsWith("'")||Vo.has(n)?n:/\s/.test(n)?`"${n}"`:n}).join(", "):""}function Ko({fontSize:t,fontStyle:e,fontWeight:n,fontFamily:r}){let i="";return e&&e!=="normal"&&(i+=`${e} `),n&&n!=="normal"&&n!==400&&(i+=`${n===700?"bold":n} `),i+=`${t}px`,i+=` ${bu(r)}`,i}function vu(t,e=1.15){return Math.round(t*e)}function $t(t){return String(t??"")}function wu(t){return ye(t)||me(t)?$t(t):t}function Br(t){return Gr(t.replace(Po,""))+je}var xu=new Set([1575,1577,1583,1584,1585,1586,1608]);function Su(t){return t>=1568&&t<=1610&&!xu.has(t)}function Gr(t){if(!t)return t;const e=t.codePointAt(t.length-1);return Su(e)?t+"\u200D":t}function zo(t){return Ve+t+Ve}function qo(t){return t.replaceAll(Ve,"")}function Eu(t){return j(t)?Yo(t.at(-1)):be($t(t))}function be(t){return t.endsWith(je)}function Yo(t){return!t||t.type==="image"?!1:$t(t.text).endsWith(je)}var Xo=typeof Intl<"u"&&typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function kt(t){return Xo?Array.from(Xo.segment(t),e=>e.segment):Array.from(t)}function ve(t,e="and",n=String,r=1/0){if(t.length===0)return"";if(t.length===1)return n(t[0]);t=t.map(n);const i=t.pop();if(t.length>=r){const o=t.length-(r-1);return`${t.slice(0,r-1).join(", ")}, and ${o} more ${e} ${i}`}return`${t.join(", ")} ${e} ${i}`}function Dn(t,e=1/0){if(typeof t=="number"){if(Number.isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity"}else if(typeof t=="bigint")return`${t}`;const n=JSON.stringify(t)??typeof t;return n.length>e?`${n.slice(0,e)}... (+${n.length-e} characters)`:n}function Mu(t){let e=1;for(let n=0;n<t.length;n++)t.codePointAt(n)===10&&e++;return e}function Jo(t,e){if(t===e)return 0;const[n,r]=t.length<e.length?[t,e]:[e,t],i=n.length,o=r.length;let s=new Array(i+1).fill(0).map((c,l)=>l),a=new Array(i+1);for(let c=1;c<=o;c++){a[0]=c;for(let l=1;l<=i;l++){const u=r[c-1]===n[l-1]?0:1;a[l]=Math.min(s[l]+1,a[l-1]+1,s[l-1]+u)}[s,a]=[a,s]}return s[i]}function Tu(t){return t.replaceAll(Ou,(e,n)=>(n>0?"-":"")+e.toLowerCase())}var Ou=/[A-Z]+(?![a-z])|[A-Z]/g;function Au(t,e=""){return t==null?e:j(t)?t.map(n=>n.type==="image"?n.alt??"":$t(n.text)).join(""):Ot(t)?t:String(t)}function Du(t,e=0,n){const{leading:r=!1,trailing:i=!0,maxWait:o=1/0}=n??{};let s,a;if(o<e)throw new Error("Value of maxWait cannot be lower than waitMs.");function c(...l){if(r&&!a){a=Date.now(),s=setTimeout(()=>a=null,e),t(...l);return}let u=e;if(o!==1/0&&a){const f=Date.now()-a;e>o-f&&(u=o-f)}clearTimeout(s),a??(a=Date.now()),s=setTimeout(()=>{a=null,i&&t(...l)},u)}return Object.assign(c,{cancel(){clearTimeout(s),a=null}})}function Fu(t,e,n){const{leading:r=!0,trailing:i=!0}=n??{};let o,s,a=!1;function c(){i&&s?(o=setTimeout(c,e),t(...s)):a=!1,s=null}function l(...u){a?s=u:(a=!0,o=setTimeout(c,e),r?t(...u):s=u)}return Object.assign(l,{cancel(){clearTimeout(o),a=!1,s=null}})}function Ur(t,e,n=""){try{return t(...e)}catch(r){const i=n?` \`${n}\``:"";ot(`Uncaught exception in user callback${i}`,r)}}var st=Symbol("description"),Wr=Symbol("required"),Fn=Symbol("marked"),kn=Symbol("undocumented"),Qo=Symbol("enterprise"),Cn=Symbol("union"),Zo=new WeakMap,ku=[["placement","position"],["padding","spacing","gap"],["color","fill","stroke"],["whisker","wick"],["src","url"],["width","thickness"],["show","visible","enabled"],["value","range"]].reduce((t,e)=>{for(const n of e)t.set(n.toLowerCase(),new Set(e.filter(r=>r!==n)));return t},new Map),ts=(t=>(t.Enterprise="enterprise",t.Invalid="invalid",t.Required="required",t.Unknown="unknown",t))(ts||{});function ze(t,e){return At(e)?`${t}[${e}]`:t?`${t}.${e}`:e}var Rt=class{constructor(t,e,n,r,i){this.type=t,this.description=e,this.value=n,this.path=r,this.key=i}setUnionType(t,e){if(this.path.startsWith(e)){const n=this.path.slice(e.length);this.altPath=`${e}[type=${t}]${n}`}}getPrefix(){const{altPath:t=this.path,key:e}=this;return!t&&!e?"Value":`Option \`${e?ze(t,e):t}\``}toString(){const{description:t="unknown",type:e,value:n}=this;return e==="required"&&n==null?`${this.getPrefix()} is required and has not been provided; expecting ${t}, ignoring.`:e==="enterprise"?`${this.getPrefix()} is an AG Charts Enterprise feature; ignoring.`:`${this.getPrefix()} cannot be set to \`${Dn(n,50)}\`; expecting ${t}, ignoring.`}},Hr=class extends Rt{constructor(t,e,n,r){super("unknown",void 0,e,n,r),this.suggestions=t,this.key=r}getPrefix(){return`Unknown option \`${ze(this.altPath??this.path,this.key)}\``}getPostfix(){const t=ve(Cu(this.key,this.suggestions),"or",e=>`\`${e}\``);return t?`; Did you mean ${t}? Ignoring.`:", ignoring."}toString(){return`${this.getPrefix()}${this.getPostfix()}`}};function qt(t,e,n="",r={}){if(!Y(t))return{cleared:null,invalid:[new Rt("required","an object",t,n)]};const i={},o=[],s=new Set(Object.keys(t)),a=[],c=r.skipDisabledNodeValidation===!0&&t.enabled===!1;let l=Zo.get(e);l===void 0&&(l=Object.keys(e),Zo.set(e,l));const u=e;if(Cn in e){const f=l,h=e[Cn];if(t.type!=null&&f.includes(t.type)||t.type==null&&h!=null){const{type:d=h,...g}=t,p=qt(g,u[d],n,r);Object.assign(i,{type:d},p.cleared);for(const y of p.invalid)y.setUnionType(d,n);o.push(...p.invalid)}else if(c)Object.assign(i,{enabled:!1});else{const d=ve(f,"or",g=>`'${g}'`);o.push(new Rt("required",`a keyword such as ${d}`,t.type,n,"type"))}return{cleared:i,invalid:o}}for(const f of l){const h=e[f],d=h[Wr],g=t[f];if(s.delete(f),g===void 0&&(h[kn]||a.push(f),!d||c))continue;const p=ze(n,f);if(Ft(h)){const b=h(g,{options:t,path:p,params:r});if(typeof b=="object"){if(o.push(...b.invalid),b.valid){i[f]=b.cleared;continue}else if($n(b.invalid,p))continue}else if(b){i[f]=g;continue}o.push(new Rt(d?"required":"invalid",h[st],g,n,f))}else{const y=qt(g,h,p,r);y.cleared!=null&&(i[f]=y.cleared),o.push(...y.invalid)}}for(const f of s){const h=t[f];h!==void 0&&o.push(new Hr(a,h,n,f))}return{cleared:i,invalid:o}}function Cu(t,e,n=2){const r=t.toLowerCase(),i=ku.get(r);return e.filter(o=>{const s=o.toLowerCase();return i?.has(o)===!0||s.includes(r)||Jo(r,s)<=n})}function C(t,e){if(Ft(t)){let r=function(i,o){return t(i,o)};var n=r;return r[st]=e,r}else return{...t,[st]:e}}function T(t){if(t[Qo])throw new Error("`required()` cannot wrap an `enterprise()` validator; enterprise options must remain optional.");return Object.assign(Ft(t)?(e,n)=>t(e,n):B(t),{[Wr]:!0,[st]:t[st]})}function I(t){return Object.assign(Ft(t)?(e,n)=>t(e,n):B(t),{[kn]:!0,[st]:t[st]})}function Iu(t){if(t[Wr])throw new Error("`enterprise()` cannot wrap a `required()` validator; enterprise options must remain optional.");const e=Ft(t)?t:B(t),n=t[st];return Object.assign((i,o)=>i!==void 0&&!ko()?(ot(new Rt("enterprise",n,i,o.path).toString()),{valid:!0,cleared:null,invalid:[]}):e(i,o),{[Qo]:!0,[st]:n})}var B=(t,e="an object",n=!1)=>C((r,i)=>{const o=qt(r,t,i.path),s=!$n(o.invalid,i.path);return{valid:s,cleared:s||!n?o.cleared:null,invalid:o.invalid}},e),jr=(t,e,n)=>({...t,[st]:e,[Cn]:n}),at=(...t)=>C((e,n)=>{const r=[];for(const i of t){const o=i(e,n);if(typeof o=="object"){if(r.push(...o.invalid),!o.valid)return{valid:!1,cleared:e,invalid:r};e=o.cleared}else if(!o)return!1}return{valid:!0,cleared:e,invalid:r}},ve(t.filter(e=>!e[kn]).map(e=>e[st]).filter(Tn),"and")),_=(...t)=>C((e,n)=>{for(const r of t){const i=r(e,n);if(typeof i=="object"?i.valid:i)return i}return!1},ve(t.filter(e=>!e[kn]).map(e=>e[st]).filter(Tn),"or")),we=t=>zt(t)||On(t),Nu=t=>me(t)||(At(t)||Ot(t))&&On(new Date(t)),Vr=C(j,"an array"),v=C(Uo,"a boolean"),P=C(Ft,"a function"),Ct=C(jo,"a color string"),_t=C(Nu,"a date"),ct=C(Tn,"a defined value"),S=C(At,"a number"),V=C(zt,"a number or bigint"),es=C(Y,"an object"),O=C(Ot,"a string"),ns=C(Ho,"an html element"),Yt=(t,e=1/0)=>{let n;return e===1/0?n=`an array of at least ${t} items`:t===e?n=`an array of exactly ${t} items`:t===0?n=`an array of no more than ${e} items`:n=`an array of at least ${t} and no more than ${e} items`,C(r=>j(r)&&r.length>=t&&r.length<=e,n)},Kr=(t,e=1/0)=>{let n;return e===1/0?n=`a string of at least ${t} characters`:t===e?n=`an string of exactly ${t} characters`:t===0?n=`an string of no more than ${e} characters`:n=`an string of at least ${t} and no more than ${e} characters`,C(r=>Ot(r)&&r.length>=t&&r.length<=e,n)},zr=(t,e=!0)=>C(n=>At(n)&&(n>t||e&&n===t),`a number greater than ${e?"or equal to ":""}${t}`),rs=(t,e)=>C(n=>At(n)&&n>=t&&n<=e,`a number between ${t} and ${e} inclusive`),m=zr(0),is=zr(0,!1),Lu=C(t=>zt(t)&&t>=0,"a number or bigint greater than or equal to 0"),$u=C(t=>zt(t)&&t>0,"a number or bigint greater than 0"),R=rs(0,1),In=t=>C((e,{options:n})=>!we(e)||!we(n[t])||e<n[t],`the value to be less than \`${t}\``),Ru=t=>C((e,{options:n})=>!we(e)||!we(n[t])||e<=n[t],`the value to be less than or equal to \`${t}\``),Nn=t=>C((e,{options:n})=>!we(e)||!we(n[t])||e>n[t],`the value to be greater than \`${t}\``);function w(...t){Y(t[0])&&(t=Object.values(t[0]));const e=ve(t,"or",n=>`'${n}'`);return C(n=>t.includes(n),`a keyword such as ${e}`)}function qr(){return w}var It=t=>C(e=>t===e,`the value ${JSON.stringify(t)}`),_u=(t,e)=>C(n=>n instanceof t,e??`an instance of ${t.name}`),q=(t,e,n=!0)=>C((r,i)=>{if(!j(r))return!1;let o=n;const s=[],a=[],c=l=>{o=n?o&&l:o||l};if(r.length===0)return{valid:!0,cleared:s,invalid:a};for(let l=0;l<r.length;l++){const u=r[l],f=t(u,{options:u,path:`${i.path}[${l}]`,params:i.params});typeof f=="object"?(c(f.valid),a.push(...f.invalid),f.cleared!=null&&s.push(f.cleared)):(c(f),f&&s.push(u))}return{valid:o,cleared:o||!n?s:null,invalid:a}},e??`${t[st]} array`),Xt=(t,e="an object array")=>C((n,r)=>{if(!j(n))return!1;const i=[],o=[];for(let s=0;s<n.length;s++){const a=`${r.path}[${s}]`,c=qt(n[s],t,a,r.params);$n(c.invalid,a)||i.push(c.cleared),o.push(...c.invalid)}return{valid:!0,cleared:i,invalid:o}},e),Pt=(t,e)=>C((n,r)=>{if(!Ft(n))return!1;if(Fn in n)return!0;const i=e??t[st];return{valid:!0,cleared:Object.assign((...s)=>{const a=Ur(n,s);if(a==null)return;const c=t(a,{options:a,path:""});if(typeof c=="object"){if(os(c,r,i),c.valid)return c.cleared}else{if(c)return a;ot(`Callback \`${r.path}\` returned an invalid value \`${Dn(a,50)}\`; expecting ${i}, ignoring.`)}},{[Fn]:!0}),invalid:[]}},"a function"),Ln=(t,e="an object")=>C((n,r)=>{if(!Ft(n))return!1;if(Fn in n)return!0;const i=e;return{valid:!0,cleared:Object.assign((...s)=>{const a=Ur(n,s,r.path);if(a==null)return;const c=qt(a,t);return os(c,r,i),c.cleared},{[Fn]:!0}),invalid:[]}},"a function");function $n(t,e){return t.some(n=>n.type==="required"&&n.path===e)}function os(t,e,n){if(t.invalid.length!==0)for(const r of t.invalid){if(r instanceof Hr)return ot(`Callback \`${e.path}\` returned an unknown property \`${ze(r.path,r.key)}\`${r.getPostfix()}`);const i=Dn(r.value,50);ot(r.key?`Callback \`${e.path}\` returned an invalid property \`${ze(r.path,r.key)}\`: \`${i}\`; expecting ${r.description}, ignoring.`:`Callback \`${e.path}\` returned an invalid value \`${i}\`; expecting ${n??r.description}, ignoring.`)}}var ss=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,as=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/;function cs(t){if(!Ot(t))return!1;const e=as.exec(t);return ss.test(e?e[2]:t)}function Yr(t){let e,n;const r=as.exec(t);r&&([,e,t,n]=r);const i=ss.exec(t);if(!i){ot(`The number formatter is invalid: ${t}`);return}const[,o,s,a,c,l,u,f,h,d,g]=i;return{fill:o,align:s,sign:a,symbol:c,zero:l,width:Number.parseInt(u),comma:f,precision:Number.parseInt(h),trim:!!d,type:g,prefix:e,suffix:n}}function ls(t){const e=typeof t=="string"?Yr(t):t;if(e==null)return;const{fill:n,align:r,sign:i="-",symbol:o,zero:s,width:a,comma:c,type:l,prefix:u="",suffix:f="",precision:h}=e;let{trim:d}=e;const g=h==null||Number.isNaN(h);let p;if(!l)p=yt.g,d=!0;else if(l in yt&&l in xe)p=g?xe[l]:yt[l];else if(l in yt)p=yt[l];else if(l in xe)p=xe[l];else throw new Error(`The number formatter type is invalid: ${l}`);const y=l?6:12;let b;g||(b=h);let E=r,x=n;return s&&(x??(x="0"),E??(E="=")),(A,k)=>{if(typeof A=="bigint")return`${u}${A.toLocaleString("en-US")}${f}`;let D;b!=null?D=b:l==="f"||l==="%"?D=k??y:l?D=y:D=k??y;let M=p(A,D);d&&(M=Gu(M)),c&&(M=Uu(M,c));const $=Vu(o,l),Nt=$?.length??0;$&&(M=`${$}${M}`),l==="s"&&(M=`${M}${Wu(A)}`),(l==="%"||l==="p")&&(M=`${M}%`);const{value:Vt,prefixLength:Lt}=Hu(A,M,i),Kt=Lt+Nt;let pt=Vt;return a!=null&&!Number.isNaN(a)&&(pt=ju(pt,a,x??" ",E,Kt)),pt=`${u}${pt}${f}`,pt}}var xe={b:t=>Rn(t).toString(2),c:t=>String.fromCodePoint(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>Rn(t).toString(8),x:t=>Rn(t).toString(16),X:t=>xe.x(t).toUpperCase(),n:t=>xe.d(t),"%":t=>`${Rn(t*100).toFixed(0)}`},yt={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>yt.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>yt.f(t,e).toUpperCase(),g:(t,e)=>{if(t===0)return"0";const n=Math.abs(t),r=Math.floor(Math.log10(n));return r>=-4&&r<e?n.toFixed(e-1-r):n.toExponential(e-1)},G:(t,e)=>yt.g(t,e).toUpperCase(),n:(t,e)=>yt.g(t,e),p:(t,e)=>yt.r(t*100,e),r:(t,e)=>{if(t===0)return"0";const n=Math.abs(t),i=Math.floor(Math.log10(n))-(e-1);if(i<=0)return n.toFixed(-i);const o=10**i;return(Math.round(n/o)*o).toFixed()},s:(t,e)=>{const n=hs(t);return yt.r(t/10**n,e)},"%":(t,e)=>yt.f(t*100,e)},us=-24,fs=24,Pu={[us]:"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",[fs]:"Y"},Bu="\u2212";function Rn(t){return Math.floor(Math.abs(t))}function Gu(t){if(!t.endsWith("0")||!t.includes("."))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 Uu(t,e){let n=t.indexOf(".");n<0&&(n=t.length);const r=t.substring(0,n).split(""),i=t.substring(n);for(let o=r.length-3;o>0;o-=3)r.splice(o,0,e);return`${r.join("")}${i}`}function Wu(t){return Pu[hs(t)]}function hs(t){return z(us,t?Math.floor(Math.log10(Math.abs(t))/3)*3:0,fs)}function Hu(t,e,n=""){if(n==="(")return t>=0?{value:e,prefixLength:0}:{value:`(${e})`,prefixLength:1};let r="";return t<0?r=Bu:n==="+"?r="+":n===" "&&(r=" "),{value:`${r}${e}`,prefixLength:r.length}}function ju(t,e,n=" ",r=">",i=0){const o=e-t.length;if(o<=0)return t;const s=n.repeat(o);if(r==="="){const a=Math.min(Math.max(i,0),t.length),c=t.slice(0,a),l=t.slice(a);return`${c}${s}${l}`}if(r===">"||!r)return s+t;if(r==="<")return`${t}${s}`;if(r==="^"){const a=Math.ceil(o/2),c=Math.floor(o/2);return`${n.repeat(a)}${t}${n.repeat(c)}`}return s+t}function Vu(t,e){if(t==="#")switch(e){case"b":return"0b";case"o":return"0o";case"x":return"0x";case"X":return"0X";default:return""}return t??""}var Se=t=>{if(!Y(t))return!1;const e=Object.keys(t);return e.length===1&&e[0].startsWith("$")},Ku=["accentColor","axisLineColor","backgroundColor","borderColor","borderRadius","chartBackgroundColor","chartPadding","focusShadow","foregroundColor","fontFamily","fontSize","fontWeight","gridLineColor","popupShadow","subtleTextColor","textColor","chromeBackgroundColor","chromeFontFamily","chromeFontSize","chromeFontWeight","chromeTextColor","chromeSubtleTextColor","buttonBackgroundColor","buttonBorder","buttonFontWeight","buttonTextColor","inputBackgroundColor","inputBorder","inputTextColor","menuBackgroundColor","menuBorder","menuTextColor","panelBackgroundColor","panelSubtleTextColor","tooltipBackgroundColor","tooltipBorder","tooltipTextColor","tooltipSubtleTextColor","crosshairLabelBackgroundColor","crosshairLabelTextColor","groupedCategoryLineColor"],ds=w(...Ku),zu=C(B({ref:ds,mix:m,onto:ds}),"a color ref"),qu=C(t=>!Y(t)||!("onto"in t)||"mix"in t,"where a color ref with [onto] must also have [mix]"),gs=at(zu,qu),L=_(Ct,Se,gs),Yu=B({color:L,stop:R},""),_n=C(t=>{let e=-1/0;for(const n of t)if(n?.stop!=null){if(n.stop<e)return!1;e=n.stop}return!0},"colour stops to be defined in ascending order"),Pn=at(Yt(2),q(Yu),_n),Xu=B({color:T(L),stop:V,name:O},"a color scale color stop"),Ju=B({fills:at(Yt(2),q(Xu),_n),domain:at(Yt(2),q(V),C(t=>t[0]<=t[1],"domain to be in ascending order")),mode:w("continuous","discrete"),missingDataFill:L},"a colour scale configuration"),Xr=w("axis","item","series"),Qu={type:T(It("gradient")),colorStops:T(Pn),rotation:S,gradient:I(w("linear","radial","conic")),bounds:I(Xr),reverse:I(v),colorSpace:I(w("rgb","oklch"))},Zu=B(Qu,"a gradient object with colour stops"),N={stroke:L,strokeWidth:m,strokeOpacity:R},ps=B({type:T(It("gradient")),gradient:T(w("linear","radial","conic")),bounds:T(Xr),colorStops:T(_(Pn,at(Yt(2),q(L)))),rotation:T(S),reverse:T(v),colorSpace:T(w("rgb","oklch"))}),ms=B({type:T(It("pattern")),pattern:T(w("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),path:Kr(2),width:T(m),height:T(m),fill:T(L),fillOpacity:T(R),backgroundFill:T(L),backgroundFillOpacity:T(R),padding:T(m),rotation:T(S),scale:T(m),stroke:T(L),strokeWidth:T(m),strokeOpacity:T(R)}),ys=B({type:T(It("image")),url:O,width:m,height:m,rotation:T(S),backgroundFill:T(L),backgroundFillOpacity:R,fit:T(w("stretch","contain","cover")),repeat:T(w("repeat","repeat-x","repeat-y","no-repeat"))}),tf={gradient:{colorStops:Pn,rotation:S,gradient:I(w("linear","radial","conic")),bounds:I(Xr),reverse:I(v),colorSpace:I(w("rgb","oklch"))},pattern:{pattern:w("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),path:Kr(2),width:m,height:m,rotation:S,scale:m,fill:L,fillOpacity:R,backgroundFill:L,backgroundFillOpacity:R,...N,padding:I(m)},image:{url:T(O),backgroundFill:L,backgroundFillOpacity:R,width:m,height:m,fit:w("stretch","contain","cover","none"),repeat:w("repeat","repeat-x","repeat-y","no-repeat"),rotation:S}},bs=jr(tf,"a color object"),Bn=_(Ct,B(bs,"a color object"),Se,gs),ef=_(Ct,B(bs,"a color object")),H={fill:Bn,fillOpacity:R};H.fillGradientDefaults=I(ps),H.fillPatternDefaults=I(ms),H.fillImageDefaults=I(ys);var ft={fill:L,fillOpacity:R},K={lineDash:q(m),lineDashOffset:S},nf={...H,...N,...K,opacity:R,cornerRadius:m},rf={...N,...K,opacity:R},Jr={...H,...N,...K,opacity:R},vs=Jr,ws=qr()("any","all");function xs(t){return{enabled:v,range:w("tooltip","node"),highlightedItem:t,unhighlightedItem:t}}function Ss(t){return{enabled:v,containment:ws,selectedItem:t,unselectedItem:t,unselectedSeries:t}}function of(t,e){return{enabled:v,range:w("tooltip","node"),highlightedItem:t,unhighlightedItem:t,highlightedSeries:e,unhighlightedSeries:e,bringToFront:v}}var Es={start:ct,stop:ct,...N,...H,...K},Ms={start:ct,stop:ct,...N,...K},sf=B({enabled:v,key:T(w("x","y")),segments:Xt(Es,"path segments array")},"a segmentation object",!0),af=B({enabled:v,key:T(w("x","y")),segments:Xt(Ms,"path segments array")},"a segmentation object",!0),Qr=B({googleFont:O},"google font"),Ts=_(O,Se,Qr,q(_(O,Qr))),Os=_(m,w("normal","bold","bolder","lighter")),ht={color:L,fontFamily:Ts,fontSize:m,fontStyle:w("normal","italic","oblique"),fontWeight:Os},Gn=w("never","always","hyphenate","on-space"),cf=w("left","center","right"),As=w("ellipsis","hide"),Ds=B({top:S,right:S,bottom:S,left:S},"padding object"),bt=_(S,Ds),qe={enabled:v,stroke:L,strokeWidth:m,strokeOpacity:R},Zr={border:qe,cornerRadius:S,padding:bt,...H},ti=["top","top-right","top-left","bottom","bottom-right","bottom-left","right","right-top","right-bottom","left","left-top","left-bottom"],lf={floating:v,placement:w(...ti),xOffset:S,yOffset:S},ei=C((t,e)=>{let n;if(typeof t=="string")ti.includes(t)?n=!0:(n={valid:!1,invalid:[],cleared:null},n.invalid.push(new Rt("invalid",`a legend placement string: ["${ti.join('", "')}"]`,t,e.path)));else{const{cleared:r,invalid:i}=qt(t,lf);n={valid:i.length===0,cleared:r,invalid:i}}return n},"a legend position object or placement string"),Ee=_(w("circle","cross","diamond","heart","plus","pin","square","star","triangle"),P),Un=w("top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"),Wn=_(m,w("exact","nearest","area")),Fs=_(m,w("exact","nearest")),ks=w("baseline","top","middle","bottom"),uf=B({type:It("text"),text:T(O),verticalAlign:ks,lineHeight:m,...ht}),ff=B({type:T(It("image")),url:T(O),width:T(m),height:T(m),alt:O,verticalAlign:ks,overflowStrategy:w("keep","hide"),padding:bt,cornerRadius:m,backgroundFill:Ct,block:v}),hf=_(uf,ff),Me=_(O,V,_t,q(hf,"text or image segments array",!1)),Ye={enabled:v,text:Me,textAlign:w("left","center","right"),wrapping:Gn,spacing:m,maxWidth:m,maxHeight:m,...ht,tooltip:{visible:w("auto","always","never"),text:O,renderer:Pt(_(O,S,_t))}};Ye.padding=I(m),Ye.truncate=I(v);var Hn={enabled:v,text:Me,renderer:Pt(_(O,S,_t,ns))},ni=["defaults","download","zoom-to-cursor","pan-to-cursor","reset-zoom","toggle-series-visibility","toggle-other-series","separator"],Cs={type:w("action","separator"),showOn:w("always","series-area","series-node","legend-item"),label:T(O),enabled:v,action:P,items:(t,e)=>Is(t,e)};Cs.iconUrl=I(O);var df=B(Cs),gf=C((t,e)=>{let n;return typeof t=="string"?ni.includes(t)?n=!0:(n={valid:!1,invalid:[],cleared:null},n.invalid.push(new Rt("invalid",`a context menu item string alias: ["${ni.join('", "')}"]`,t,e.path))):n=df(t,e),n},`a context menu item object or string alias: [${ni.join(", ")}]`),Is=q(gf,"a menu items array",!1),Ns={label:O,ariaLabel:O,tooltip:O,iconPosition:w("before","after"),icon:w("align-center","align-left","align-right","arrow-drawing","arrow-down-drawing","arrow-up-drawing","callout-annotation","candlestick-series","chevron-filled-down","chevron-right","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")},St=_(O,Pt(Me)),Ls=B({x:St,y:St,angle:St,radius:St,size:St,color:St,label:St,secondaryLabel:St,sectorLabel:St,calloutLabel:St,legendItem:St}),Xe=C(cs,"a valid number format string"),ri=w("millisecond","second","minute","hour","day","month","year"),$s={unit:T(ri),step:is,epoch:_t,utc:v};$s.every=P;var Rs=B($s,"a time interval object"),Dt={width:m,height:m,minWidth:m,minHeight:m,suppressFieldDotNotation:v,title:Ye,subtitle:Ye,footnote:Ye,padding:_(Se,bt),seriesArea:{border:qe,clip:v,cornerRadius:S,padding:_(Se,bt)},legend:{enabled:v,position:ei,orientation:w("horizontal","vertical"),maxWidth:m,maxHeight:m,spacing:m,border:qe,cornerRadius:S,padding:bt,fill:Bn,fillOpacity:R,preventHidingAll:v,reverseOrder:v,toggleSeries:v,item:{marker:{size:m,shape:Ee,padding:bt,strokeWidth:m},line:{length:m,strokeWidth:m},label:{maxLength:m,formatter:P,...ht},tooltip:{visible:w("auto","always","never"),text:O,renderer:P},maxWidth:m,padding:bt,showSeriesStroke:v},pagination:{marker:{size:m,shape:Ee,padding:m},activeStyle:{...H,...N},inactiveStyle:{...H,...N},highlightStyle:{...H,...N},label:ht},listeners:{legendItemClick:P,legendItemDoubleClick:P}},gradientLegend:{enabled:v,position:ei,spacing:m,reverseOrder:v,border:qe,cornerRadius:S,padding:bt,fill:Bn,fillOpacity:R,gradient:{preferredLength:m,thickness:m},scale:{label:{...ht,minSpacing:m,format:Xe,formatter:P},padding:m,interval:{step:S,values:Vr,minSpacing:at(m,In("maxSpacing")),maxSpacing:at(m,Nn("minSpacing"))}}},listeners:{seriesNodeClick:P,seriesNodeDoubleClick:P,seriesVisibilityChange:P,activeChange:P,selectionChange:P,click:P,doubleClick:P,annotations:P,zoom:P},loadGoogleFonts:v,highlight:{enabled:v,drawingMode:w("overlay","cutout"),range:w("tooltip","node")},overlays:{loading:Hn,noData:Hn,noVisibleSeries:Hn,unsupportedBrowser:Hn},tooltip:{enabled:v,showArrow:v,pagination:v,delay:m,range:Wn,wrapping:Gn,mode:w("single","shared","compact"),position:{anchorTo:w("pointer","node","chart"),placement:_(Un,q(Un)),xOffset:S,yOffset:S,offset:m}},animation:ct,flashOnUpdate:ct,contextMenu:ct,context:()=>!0,dataSource:{getData:P},keyboard:{enabled:v,tabIndex:S,initialFocus:qr()("data-start","data-end","viewport-start","viewport-end")},touch:{dragAction:w("none","drag","hover")},selection:ct,ranges:{enabled:v,enableOutOfRange:v,position:w("top-left","top","top-right","bottom-left","bottom","bottom-right"),spacing:m,button:{...ft,...N,textColor:L,...ht,cornerRadius:m,padding:bt,active:{...ft,stroke:N.stroke,textColor:L},disabled:{...ft,stroke:N.stroke,textColor:L},hover:{...ft,stroke:N.stroke,textColor:L}},dropdown:{visible:w("auto","always","never"),...ft,...N,textColor:L,...ht,cornerRadius:m,padding:bt,active:{...ft,stroke:N.stroke,textColor:L},disabled:{...ft,stroke:N.stroke,textColor:L},hover:{...ft,stroke:N.stroke,textColor:L}},gap:m,...ft,...N,textColor:L,...ht,cornerRadius:m,padding:bt,active:{...ft,stroke:N.stroke,textColor:L},disabled:{...ft,stroke:N.stroke,textColor:L},hover:{...ft,stroke:N.stroke,textColor:L},buttons:Xt({...Ns,enabled:v,value:_(S,at(q(_(S,_t)),Yt(2,2)),Rs,ri,P)},"range button options array")},locale:{localeText:es,getLocaleText:Pt(O)},background:{visible:v,fill:L,image:{url:T(O),top:S,right:S,bottom:S,left:S,width:m,height:m,opacity:R}},styleNonce:O,sync:ct,zoom:ct,scrollbar:ct,formatter:_(Pt(Me),Ls),enableRtl:v};Dt.dataSource.requestThrottle=I(m),Dt.dataSource.updateThrottle=I(m),Dt.dataSource.updateDuringInteraction=I(v),Dt.statusBar=I(ct),Dt.ranges.minSize=I(m),Dt.foreground=I({visible:v,text:O,image:{url:O,top:S,right:S,bottom:S,left:S,width:m,height:m,opacity:R},...H}),Dt.overrideDevicePixelRatio=I(S),Dt.sync.domainMode=I(w("direction","position","key")),Dt.displayNullData=I(v);var Je={cursor:O,context:()=>!0,showInLegend:v,nodeClickRange:Wn,listeners:{seriesNodeClick:P,seriesNodeDoubleClick:P},highlight:xs(Jr),selection:Ss(vs)};Je.allowNullKeys=I(v);var jn={...Je,id:O,visible:v,context:()=>!0,data:Vr};jn.seriesGrouping=I(ct);var _s={shape:Ee,size:m,...H,...N,...K},pf={enabled:v,itemStyler:Ln({...H,...N,...K,shape:Ee,size:m}),..._s},Qe={enabled:v,formatter:Pt(Me),format:Xe,itemStyler:Ln({enabled:v,...Zr,...ht}),...Zr,...ht},Vn={...Qe,lineHeight:m,minimumFontSize:m,wrapping:Gn,overflowStrategy:As},Ps={visible:v,cap:{visible:v,length:m,lengthRatio:R,...N,...K},...N,...K},mf={...Ps,xLowerKey:O,xUpperKey:O,yLowerKey:O,yUpperKey:O,xLowerName:O,xUpperName:O,yLowerName:O,yUpperName:O,itemStyler:Ln({visible:v,...N,...K,cap:{visible:v,length:m,lengthRatio:R,...N,...K}})},Kn={enabled:v,showArrow:v,range:Fs,renderer:Pt(_(O,S,_t,B({heading:O,title:O,symbol:{marker:{enabled:v,shape:Ee,...H,stroke:L,strokeOpacity:R,strokeWidth:m,...K},line:{enabled:v,stroke:L,strokeWidth:m,strokeOpacity:R,...K}},data:Xt({label:T(O),value:T(_(O,S,_t))})},"tooltip renderer result object"))),position:{anchorTo:w("node","pointer","chart"),placement:_(Un,q(Un)),xOffset:S,yOffset:S,offset:m},interaction:{enabled:v}},yf={...Kn,range:Wn},bf={enabled:v,xOffset:S,yOffset:S,blur:m,color:L},vf=jr({linear:{},smooth:{tension:R},step:{position:w("start","middle","end")}},"interpolation line options"),zn=Symbol("BREAK"),Ze="__decorator_config",qn="__decorator_accessors";function dt(t,e){ii(t,e).optional=!0}function ii(t,e){if(Object.getOwnPropertyDescriptor(t,Ze)==null&&Object.defineProperty(t,Ze,{value:{}}),Object.getOwnPropertyDescriptor(t,qn)==null){const f=Object.getPrototypeOf(t)?.[qn]?.slice()??[];Object.defineProperty(t,qn,{value:f})}const n=t[Ze],r=e.toString();if(n[r]!=null)return n[r];n[r]={setters:[],getters:[],observers:[]};const i=Object.getOwnPropertyDescriptor(t,e);let o=i?.get,s=i?.set;if(o==null||s==null){const u=t[qn];let f=u.indexOf(e);f===-1&&(f=u.push(e)-1),o??(o=function(){let h=this.__accessors;return h==null&&(h=u.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:h})),h[f]}),s??(s=function(h){let d=this.__accessors;d==null&&(d=u.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:d})),d[f]=h})}const a=n[r];return Object.defineProperty(t,e,{set:function(u){const f=a.setters,h=a.observers;let d;for(let g=0,p=f.length;g<p;g++)if(f[g].length>2){d=o.call(this);break}for(let g=0,p=f.length;g<p;g++)if(u=f[g](this,e,u,d),u===zn)return;s.call(this,u);for(let g=0,p=h.length;g<p;g++)h[g](this,u,d)},get:function(){const u=o.call(this),f=a.getters;if(f.length===0)return u;let h=u;for(let d=0,g=f.length;d<g;d++)if(h=f[d](this,e,h),h===zn)return;return h},enumerable:!0,configurable:!1}),n[r]}function Bt(t,e,n){return(r,i)=>{const o=ii(r,i);o.setters.push(t),e&&o.getters.unshift(e),n&&Object.assign(o,n)}}function oi(t){return(e,n)=>{ii(e,n).observers.push(t)}}function Yn(t){return t!==void 0&&Ze in t}function Gt(t){const e=new Set;for(;Yn(t);)e.add(t?.[Ze]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(n=>Object.keys(n))}function Bs(t){return Gt(t).reduce((e,n)=>(e[String(n)]=t[n]??null,e),{})}function*wf(...t){for(const e of t)e!=null&&(e[Symbol.iterator]?yield*e:yield e)}function xf(t){return t!=null&&typeof t=="object"&&Symbol.iterator in t?t:[t]}function Sf(t){for(const e of t)return e;throw new Error("AG Charts - no first() value found")}function*tn(t){const e=[void 0,void 0];for(const n of Object.keys(t))e[0]=n,e[1]=t[n],yield e}function Ef(t){return Object.keys(t)}function si(t,e){return Array.isArray(t)?!Array.isArray(e)||t.length!==e.length?!1:t.every((n,r)=>si(n,e[r])):X(t)?X(e)?Gs(t,e,si):!1:t===e}function Gs(t,e,n){if(Object.is(t,e))return!0;for(const r of Object.keys(e))if(!(r in t))return!1;for(const r of Object.keys(t))if(!(r in e)||!n(t[r],e[r]))return!1;return!0}function ai(...t){const e={};for(const n of t){if(!Y(n))continue;const r=Yn(n)?Gt(n):Object.keys(n);for(const i of r)X(e[i])&&X(n[i])?e[i]=ai(e[i],n[i]):e[i]??(e[i]=n[i])}return e}function ci(...t){const e={};for(const n of t){if(!Y(n))continue;const r=Yn(n)?Gt(n):Object.keys(n);for(const i of r)X(e[i])&&X(n[i])?e[i]=ci(e[i],n[i]):i in e||(e[i]??(e[i]=n[i]))}return e}function Mf(t,...e){return e&&j(t)?t.map(n=>ai(n,...e)):t}function Us(t,e){const n={};for(const[r,i]of tn(t))n[r]=e(i,r,t);return n}function en(t,e){const n={...t};for(const r of e)delete n[r];return n}function Tf(t,e){if(t==null)return;const n={};for(const r of e)Object.hasOwn(t,r)&&(n[r]=t[r]);return n}function Of(t,e){if(t==null)return!0;for(const[n,r]of tn(t))if(!e(n,r))return!1;return!0}function Af(t){const e={};if(t==null)return e;for(const[n,r]of t)e[n]=r;return e}function li(t,e){return(j(e)?e:e.split(".")).reduce((r,i)=>r[i],t)}var Ws=new Set(["__proto__","constructor","prototype"]);function ui(t,e,n){const r=j(e)?e.slice():e.split("."),i=r.pop();if(r.some(s=>Ws.has(s)))return;const o=r.reduce((s,a)=>s[a],t);return o[i]=n,o[i]}function Df(t,e,n){if(n===void 0)return e;for(const r of t){const i=n[r];i!==void 0&&(e[r]=i)}return e}function Ff(t,e,n){const r=n??Object.keys(e);for(let i=0,o=r.length;i<o;i++){const s=r[i],a=e[s];t[s]!==a&&(t[s]=a)}return t}function Hs(t){if(t==null||typeof t!="object"||!X(t))return t;Object.freeze(t);for(const e of Object.getOwnPropertyNames(t)){const n=t[e];n!==null&&(typeof n=="object"||typeof n=="function")&&!Object.isFrozen(n)&&Hs(n)}return t}function js(t,e){return X(t)&&e in t}function kf(t,e){return js(t,e)&&typeof t[e]=="string"}var Xn={fills:at(Yt(2),q(B({color:L,stop:V},"")),_n),fillMode:w("continuous","discrete")},fi={value:T(V),text:O,shape:_(w("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),P),placement:w("before","after","middle"),spacing:m,size:m,rotation:S,...H,...N,...K},hi={value:T(V),text:O,shape:_(w("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),P),placement:w("inside","outside","middle"),spacing:m,size:m,rotation:S,label:{...Qe,spacing:m},...H,...N,...K},Vs={...en(Je,["listeners"]),direction:w("horizontal","vertical"),cornerMode:w("container","item"),cornerRadius:m,thickness:m,segmentation:{enabled:v,spacing:m,interval:{values:q(V),step:V,count:S}},bar:{enabled:v,thickness:m,thicknessRatio:R,...Xn,...H,...N,...K},label:{...Vn,text:O,spacing:m,avoidCollisions:v,placement:w("inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end")},tooltip:Kn},Jt={...en(jn,["listeners"]),...Vs,type:T(It("linear-gauge")),value:T(V),scale:{min:at(V,In("max")),max:at(V,Nn("min")),label:{enabled:v,formatter:P,rotation:S,spacing:m,minSpacing:m,placement:w("before","after"),avoidCollisions:v,format:Xe,...ht},interval:{values:q(V),step:V},...Xn,...H,...N,...K},targets:Xt(fi,"target options array")};Jt.margin=I(S),Jt.defaultColorRange=I(q(Ct)),Jt.defaultTarget=I({...fi,value:S,label:{...Qe,spacing:S}}),Jt.defaultScale=I(Jt.scale),Jt.scale.defaultFill=I(Ct);var Ks={...en(Je,["listeners"]),outerRadius:m,innerRadius:m,outerRadiusRatio:R,innerRadiusRatio:R,startAngle:S,endAngle:S,spacing:m,cornerMode:w("container","item"),cornerRadius:m,scale:{min:at(V,In("max")),max:at(V,Nn("min")),label:{enabled:v,formatter:P,rotation:S,spacing:m,minSpacing:m,avoidCollisions:v,format:Xe,...ht},interval:{values:q(V),st