PageSourceSearch

https://tp.seerene.com/newui/en/474.aa774a4bd60e3279.js

js seerene.com collected 2026-10-03 19:32:32 UTC 767,574 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkseerene_client=self.webpackChunkseerene_client||[]).push([[474],{92489(Gt,ut,y){y.d(ut,{RR:()=>V,u5:()=>Y});const Y=new class L{constructor(){this.version="5.17.2",this.licenses=[],this.entitiesById={},this.rootElements=[],this.autoDispose=!1}};function V(X){Y.licenses.push(X)}},23436(Gt,ut,y){y.d(ut,{b:()=>Mi});var L=y(72351),Y=y(5983),V=y(52118),P=y(31243),Z=y(49565),X=y(22223),f=y(41176),C=y(26864),w=y(19708);class A{constructor(){this._targets=[],this._observer=new ResizeObserver(o=>{C.__(o,d=>{C.__(this._targets,D=>{D.target===d.target&&D.callback()})})})}addTarget(o,d){this._observer.observe(o,{box:"border-box"}),this._targets.push({target:o,callback:d})}removeTarget(o){this._observer.unobserve(o),C.TW(this._targets,d=>d.target!==o)}}let b=(()=>{class St{constructor(){this._timer=null,this._targets=[]}addTarget(d,D){if(null===this._timer){let B=null;const H=()=>{const K=Date.now();(null===B||K>B+St.delay)&&(B=K,C.__(this._targets,st=>{let mt=st.target.getBoundingClientRect();(mt.width!==st.size.width||mt.height!==st.size.height)&&(st.size=mt,st.callback())})),this._timer=0===this._targets.length?null:requestAnimationFrame(H)};this._timer=requestAnimationFrame(H)}this._targets.push({target:d,callback:D,size:{width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0}})}removeTarget(d){C.TW(this._targets,D=>D.target!==d),0===this._targets.length&&null!==this._timer&&(cancelAnimationFrame(this._timer),this._timer=null)}}return St.delay=200,St})(),m=null;class c{constructor(o,d){this._disposed=!1,this._sensor=function T(){return null===m&&(m=typeof ResizeObserver<"u"?new A:new b),m}(),this._element=o,this._listener=w.n_(d),this._sensor.addTarget(o,d)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}}var r=y(55265);class g extends r.wC{}g.className="InterfaceColors",g.classNames=r.wC.classNames.concat([g.className]);var _=y(93863),l=y(28268),p=y(88327),S=y(8346),R=y(16202),W=y(21653);class j extends r.wC{_setDefaults(){this._setDefault("negativeBase",0),this._setDefault("numberFormat","#,###.#####"),this._setDefault("smallNumberThreshold",1);const o="_big_number_suffix_",d="_small_number_suffix_",D="_byte_suffix_";this._setDefault("bigNumberPrefixes",[{number:1e3,suffix:this._t(o+"3")},{number:1e6,suffix:this._t(o+"6")},{number:1e9,suffix:this._t(o+"9")},{number:1e12,suffix:this._t(o+"12")},{number:1e15,suffix:this._t(o+"15")}
1,{number:1e18,suffix:this._t(o+"18")},{number:1e21,suffix:this._t(o+"21")},{number:1e24,suffix:this._t(o+"24")}]),this._setDefault("smallNumberPrefixes",[{number:1e-24,suffix:this._t(d+"24")},{number:1e-21,suffix:this._t(d+"21")},{number:1e-18,suffix:this._t(d+"18")},{number:1e-15,suffix:this._t(d+"15")},{number:1e-12,suffix:this._t(d+"12")},{number:1e-9,suffix:this._t(d+"9")},{number:1e-6,suffix:this._t(d+"6")},{number:.001,suffix:this._t(d+"3")}]),this._setDefault("bytePrefixes",[{number:1,suffix:this._t(D+"B")},{number:1024,suffix:this._t(D+"KB")},{number:1048576,suffix:this._t(D+"MB")},{number:1073741824,suffix:this._t(D+"GB")},{number:1099511627776,suffix:this._t(D+"TB")},{number:0x4000000000000,suffix:this._t(D+"PB")}]),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(o,d,D){(null==d||W.Kg(d)&&"number"===d.toLowerCase())&&(d=this.get("numberFormat",""));let k,B=Number(o);if(W.Gv(d))try{return this.get("intlLocales")?new Intl.NumberFormat(this.get("intlLocales"),d).format(B):new Intl.NumberFormat(void 0,d).format(B)}catch{return"Invalid"}else{d=w.fZ(d);let K,H=this.parseFormat(d,this._root.language);K=B>this.get("negativeBase")?H.positive:B<this.get("negativeBase")?H.negative:H.zero,null!=D&&!K.mod&&(K=R.C(K),K.decimals.active=0==B?0:D),k=K.template.split(W.Kx).join(this.applyFormat(B,K))}return!0===this.get("forceLTR")&&(k="\u200e"+k),k}parseFormat(o,d){const D=d.translateEmpty("_thousandSeparator"),k=d.translateEmpty("_decimalSeparator");let B={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:D},decimals:{active:-1,passive:-1,separator:k},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:D},decimals:{active:-1,passive:-1,separator:k},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:D},decimals:{active:-1,passive:-1,separator:k},template:"",source:"",parsed:!1}},H=(o=o.replace("||",W.cb)).split("|");return B.positive.source=H[0],typeof H[2]>"u"?B.zero=B.positive:B.zero.source=H[2],typeof H[1]>"u"?B.negative=B.positive:B.negative.source=H[1],R.__(B,(K,st)=>{if(st.parsed)return;let mt=st.source;"number"===mt.toLowerCase()&&(mt=this.get("numberFormat","#,###.#####"));let Mt=S.g.chunk(mt,!0);for(let xt=0;xt<Mt.length;xt++){let bt=Mt[xt];if(bt.text=bt.text.replace(W.cb,"|"),"value"===bt.type){let lt=bt.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP\u2030!]?/);if(lt)if(null===lt||""===lt[0])st.template+=bt.text;else{let ct=lt[0].match(/[abespABESP%\u2030!]{2}|[abespABESP%\u2030]{1}$/);ct&&(st.mod=ct[0].toLowerCase(),st.modSpacing=!!lt[0].match(/[ ]{1}[abespABESP%\u2030!]{1}$/));let Ut=lt[0].split(".");if(""!==Ut[0]){st.thousands.active=(Ut[0].match(/0/g)||[]).length,st.thousands.passive=(Ut[0].match(/\#/g)||[]).length+st.thousands.active;let ht=Ut[0].split(",");1===ht.length||(st.thousands.interval=(ht.pop()||"").length,0===st.thousands.interval&&(st.thousands.interval=-1))}typeof Ut[1]>"u"||(st.decimals.active=(Ut[1].match(/0/g)||[]).length,st.decimals.passive=(Ut[1].match(/\#/g)||[]).length+st.decimals.active),st.template+=bt.text.split(lt[0]).join(W.Kx)}}else st.template+=bt.text}st.parsed=!0}),B}applyFormat(o,d){let D=o<0;o=Math.abs(o);let k="",B="",H=d.mod?d.mod.split(""):[];if(-1!==H.indexOf("b")){let xt=this.applyPrefix(o,this.get("bytePrefixes"),-1!==H.indexOf("!"));o=xt[0],k=xt[1],B=xt[2],d.modSpacing&&(B=" "+B)}else if(-1!==H.indexOf("a")){let xt=this.applyPrefix(o,o<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),-1!==H.indexOf("!"));o=xt[0],k=xt[1],B=xt[2],d.modSpacing&&(B=" "+B)}else if(-1!==H.indexOf("p")){let xt=Math.min(o.toString().length+2,21);o=parseFloat(o.toPrecision(xt)),k=this._root.language.translate("_percentPrefix"),B=this._root.language.translate("_percentSuffix"),""==k&&""==B&&(B="%")}else if(-1!==H.indexOf("%")){let xt=Math.min(o.toString().length+2,21);o*=100,o=parseFloat(o.toPrecision(xt)),B="%"}else if(-1!==H.indexOf("\u2030")){let xt=Math.min(o.toString().length+3,21);o*=1e3,o=parseFloat(o.toPrecision(xt)),B="\u2030"}if(-1!==H.indexOf("e")){let xt;xt=d.decimals.passive>=0?o.toExponential(d.decimals.passive).split("e"):o.toExponential().split("e"),o=Number(xt[0]),B="e"+xt[1],d.modSpacing&&(B=" "+B)}else if(0===d.decimals.passive)o=Math.round(o);else if(d.decimals.passive>0){const xt=w.w1(o);if(xt>0){const bt=Math.pow(10,d.decimals.passive);o=Math.round(parseFloat((o*bt).toFixed(xt)))/bt}}let K="",st=W.um(o).split("."),mt=st[0];if(mt.length<d.thousands.active&&(mt=Array(d.thousands.active-mt.length+1).join("0")+mt),d.thousands.interval>0){let xt=[],bt=mt.split("").reverse().join("");for(let lt=0,ct=mt.length;lt<=ct;lt+=d.thousands.interval){let Ut=bt.substr(lt,d.thousands.interval).split("").reverse().join("");""!==Ut&&xt.unshift(Ut)}mt=xt.join(d.thousands.separator)}K+=mt,1===st.length&&st.push("");let Mt=st[1];return Mt.length<d.decimals.active&&(Mt+=Array(d.decimals.active-Mt.length+1).join("0")),""!==Mt&&(K+=d.decimals.separator+Mt),""===K&&(K="0"),0!==o&&D&&-1===H.indexOf("s")&&(K="-"+K),k&&(K=k+K),B&&(K+=B),K}applyPrefix(o,d,D=!1){let k=o,B="",H="",K=!1,st=1;for(let mt=0,Mt=d.length;mt<Mt;mt++)d[mt].number<=o&&(0===d[mt].number?k=0:(k=o/d[mt].number,st=d[mt].number),B=d[mt].prefix,H=d[mt].suffix,K=!0);return!K&&D&&d.length&&0!=o&&(k=o/d[0].number,B=d[0].prefix,H=d[0].suffix,K=!0),K&&(k=parseFloat(k.toPrecision(Math.min(st.toString().length+Math.floor(k).toString().replace(/[^0-9]*/g,"").length,21)))),[k,B,H]}escape(o){return o.replace("||",W.cb)}unescape(o){return o.replace(W.cb,"|")}}function z(St,o){let d=0,D=0,k=1,B=0,H=0,K=0,st=0,mt=0;
1return St.formatToParts(o).forEach(Mt=>{switch(Mt.type){case"year":d=+Mt.value;break;case"month":D=+Mt.value-1;break;case"day":k=+Mt.value;break;case"hour":B=+Mt.value;break;case"minute":H=+Mt.value;break;case"second":K=+Mt.value;break;case"fractionalSecond":st=+Mt.value;break;case"weekday":switch(Mt.value){case"Sun":mt=0;break;case"Mon":mt=1;break;case"Tue":mt=2;break;case"Wed":mt=3;break;case"Thu":mt=4;break;case"Fri":mt=5;break;case"Sat":mt=6}}}),24===B&&(B=0),{year:d,month:D,day:k,hour:B,minute:H,second:K,millisecond:st,weekday:mt}}function U(St,o){const{year:d,month:D,day:k,hour:B,minute:H,second:K,millisecond:st}=z(St,o);return Date.UTC(d,D,k,B,H,K,st)}class nt{constructor(o,d){if(!d)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=o,this._utc=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3}),this._dtf=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:o,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(o){return new this(o,!0)}convertLocal(o){const d=this.offsetUTC(o),D=o.getTimezoneOffset(),k=new Date(o);k.setUTCMinutes(k.getUTCMinutes()-(d-D));const B=k.getTimezoneOffset();return D!=B&&k.setUTCMinutes(k.getUTCMinutes()+B-D),k}offsetUTC(o){return(U(this._utc,o)-U(this._dtf,o))/6e4}parseDate(o){return z(this._dtf,o)}}class it extends r.wC{_setDefaults(){this._setDefault("capitalize",!0),this._setDefault("dateFormat","yyyy-MM-dd"),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(o,d,D=!1){(typeof d>"u"||""===d)&&(d=this.get("dateFormat","yyyy-MM-dd"));let k,B=o;if(W.Gv(d))try{const mt=this.get("intlLocales");return mt?new Intl.DateTimeFormat(mt,d).format(B):new Intl.DateTimeFormat(void 0,d).format(B)}catch{return"Invalid"}let H=this.parseFormat(d);const K=this._root.timezone;let st=B;return K&&!this._root.utc&&!D&&(B=K.convertLocal(B)),W.Et(B.getTime())?(k=this.applyFormat(B,H,D,st),this.get("capitalize")&&(k=k.replace(/^.{1}/,k.substr(0,1).toUpperCase())),k):"Invalid date"}applyFormat(o,d,D=!1,k){let H,K,st,mt,Mt,xt,bt,lt,B=d.template,ct=o.getTime();this._root.utc&&!D?(H=o.getUTCFullYear(),K=o.getUTCMonth(),st=o.getUTCDay(),mt=o.getUTCDate(),Mt=o.getUTCHours(),xt=o.getUTCMinutes(),bt=o.getUTCSeconds(),lt=o.getUTCMilliseconds()):(H=o.getFullYear(),K=o.getMonth(),st=o.getDay(),mt=o.getDate(),Mt=o.getHours(),xt=o.getMinutes(),bt=o.getSeconds(),lt=o.getMilliseconds());for(let Ut=0,ht=d.parts.length;Ut<ht;Ut++){let _t="";switch(d.parts[Ut]){case"G":_t=this._t(H<0?"_era_bc":"_era_ad");break;case"yyyy":_t=Math.abs(H).toString(),H<0&&(_t+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":_t=Math.abs(H).toString().substr(-d.parts[Ut].length),H<0&&(_t+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let Jt=w.Ao(o,this._root.utc);_t="YYYY"==d.parts[Ut]?Math.abs(Jt).toString():Math.abs(Jt).toString().substr(-d.parts[Ut].length),Jt<0&&(_t+=this._t("_era_bc"));break;case"u":case"F":case"g":break;case"q":_t=""+Math.ceil((o.getMonth()+1)/3);break;case"MMMMM":_t=this._t(this._getMonth(K)).substr(0,1);break;case"MMMM":_t=this._t(this._getMonth(K));break;case"MMM":_t=this._t(this._getShortMonth(K));break;case"MM":_t=w.tr(K+1,2,"0");break;case"M":_t=(K+1).toString();break;case"ww":_t=w.tr(w.Nr(o,this._root.utc),2,"0");break;case"w":_t=w.Nr(o,this._root.utc).toString();break;case"W":_t=w.L_(o,this._root.utc).toString();break;case"dd":_t=w.tr(mt,2,"0");break;case"d":_t=mt.toString();break;case"DD":case"DDD":_t=w.tr(w._Q(o,this._root.utc).toString(),d.parts[Ut].length,"0");break;case"D":_t=w._Q(o,this._root.utc).toString();break;case"t":_t=this._root.language.translateFunc("_dateOrd").call(this,mt);break;case"E":_t=(st||7).toString();break;case"EE":_t=w.tr((st||7).toString(),2,"0");break;case"EEE":case"eee":_t=this._t(this._getShortWeekday(st));break;case"EEEE":case"eeee":_t=this._t(this._getWeekday(st));break;case"EEEEE":case"eeeee":_t=this._t(this._getShortWeekday(st)).substr(0,1);break;case"e":case"ee":_t=(st-(this._root.locale.firstDayOfWeek||1)+1).toString(),"ee"==d.parts[Ut]&&(_t=w.tr(_t,2,"0"));break;case"a":_t=this._t(Mt>=12?"PM":"AM");break;case"aa":_t=this._t(Mt>=12?"P.M.":"A.M.");break;case"aaa":_t=this._t(Mt>=12?"P":"A");break;case"h":_t=w.Jx(Mt).toString();break;case"hh":_t=w.tr(w.Jx(Mt),2,"0");break;case"H":_t=Mt.toString();break;case"HH":_t=w.tr(Mt,2,"0");break;case"K":_t=w.Jx(Mt,0).toString();break;case"KK":_t=w.tr(w.Jx(Mt,0),2,"0");break;case"k":_t=(Mt+1).toString();break;case"kk":_t=w.tr(Mt+1,2,"0");break;case"m":_t=xt.toString();break;case"mm":_t=w.tr(xt,2,"0");break;case"s":_t=bt.toString();break;case"ss":_t=w.tr(bt,2,"0");break;case"S":case"SS":case"SSS":_t=Math.round(lt/1e3*Math.pow(10,d.parts[Ut].length)).toString();break;case"x":_t=ct.toString();break;case"n":case"nn":case"nnn":_t=w.tr(lt,d.parts[Ut].length,"0");break;case"z":_t=w.O(k||o,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zz":_t=w.O(k||o,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"zzz":_t=w.O(k||o,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;
1case"zzzz":_t=w.O(k||o,!0,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"Z":case"ZZ":let $t=this._root.utc?"UTC":this._root.timezone;$t instanceof nt&&($t=$t.name);const Bt=$t?w.Zn($t,k||o):o.getTimezoneOffset();let qt=Math.abs(Bt)/60,he=Math.floor(qt),ne=60*qt-60*he;this._root.utc&&(he=0,ne=0),"Z"==d.parts[Ut]?(_t="GMT",_t+=Bt>0?"-":"+",_t+=w.tr(he,2)+":"+w.tr(ne,2)):(_t=Bt>0?"-":"+",_t+=w.tr(he,2)+w.tr(ne,2));break;case"i":_t=o.toISOString();break;case"I":_t=o.toUTCString()}B=B.replace(W.Kx,_t)}return B}parseFormat(o){let d={template:"",parts:[]},D=S.g.chunk(o,!0);for(let k=0;k<D.length;k++){let B=D[k];if("value"===B.type){if(B.text.match(/^date$/i)){let K=this.get("dateFormat","yyyy-MM-dd");W.Kg(K)||(K="yyyy-MM-dd"),B.text=K}let H=B.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);if(H)for(let K=0;K<H.length;K++)d.parts.push(H[K]),B.text=B.text.replace(H[K],W.Kx)}d.template+=B.text}return d}_months(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}_getMonth(o){return this._months()[o]}_shortMonths(){return["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}_getShortMonth(o){return this._shortMonths()[o]}_weekdays(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}_getWeekday(o){return this._weekdays()[o]}_shortWeekdays(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}_getShortWeekday(o){return this._shortWeekdays()[o]}parse(o,d,D){if(typeof D>"u"&&(D=this._root.utc),o instanceof Date)return o;if(W.Et(o))return new Date(o);if("x"==d)return new Date(parseInt(o));W.Kg(o)||(o=o.toString());let k,B="";d=(d=w.fZ(d)).substr(0,o.length);let H=this.parseFormat(d),K={year:-1,year3:-1,year2:-1,year1:-1,month:-1,monthShort:-1,monthLong:-1,weekdayShort:-1,weekdayLong:-1,day:-1,yearDay:-1,week:-1,hourBase0:-1,hour12Base0:-1,hourBase1:-1,hour12Base1:-1,minute:-1,second:-1,millisecond:-1,millisecondDigits:-1,am:-1,zone:-1,timestamp:-1,iso:-1},st={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:D},mt=0,Mt=0;for(let lt=0;lt<H.parts.length;lt++){switch(Mt=lt+mt+1,H.parts[lt]){case"yyyy":case"YYYY":B+="([0-9]{4})",K.year=Mt;break;case"yyy":case"YYY":B+="([0-9]{3})",K.year3=Mt;break;case"yy":case"YY":B+="([0-9]{2})",K.year2=Mt;break;case"y":case"Y":B+="([0-9]{1})",K.year1=Mt;break;case"MMMM":B+="("+this.getStringList(this._months()).join("|")+")",K.monthLong=Mt;break;case"MMM":B+="("+this.getStringList(this._shortMonths()).join("|")+")",K.monthShort=Mt;break;case"MM":case"M":B+="([0-9]{2}|[0-9]{1})",K.month=Mt;break;case"ww":case"w":B+="([0-9]{2}|[0-9]{1})",K.week=Mt;break;case"dd":case"d":B+="([0-9]{2}|[0-9]{1})",K.day=Mt;break;case"DDD":case"DD":case"D":B+="([0-9]{3}|[0-9]{2}|[0-9]{1})",K.yearDay=Mt;break;case"dddd":B+="("+this.getStringList(this._weekdays()).join("|")+")",K.weekdayLong=Mt;break;case"ddd":B+="("+this.getStringList(this._shortWeekdays()).join("|")+")",K.weekdayShort=Mt;break;case"aaa":case"aa":case"a":B+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",K.am=Mt;break;case"hh":case"h":B+="([0-9]{2}|[0-9]{1})",K.hour12Base1=Mt;break;case"HH":case"H":B+="([0-9]{2}|[0-9]{1})",K.hourBase0=Mt;break;case"KK":case"K":B+="([0-9]{2}|[0-9]{1})",K.hour12Base0=Mt;break;case"kk":case"k":B+="([0-9]{2}|[0-9]{1})",K.hourBase1=Mt;break;case"mm":case"m":B+="([0-9]{2}|[0-9]{1})",K.minute=Mt;break;case"ss":case"s":B+="([0-9]{2}|[0-9]{1})",K.second=Mt;break;case"SSS":case"SS":case"S":B+="([0-9]{3}|[0-9]{2}|[0-9]{1})",K.millisecond=Mt,K.millisecondDigits=H.parts[lt].length;break;case"nnn":case"nn":case"n":B+="([0-9]{3}|[0-9]{2}|[0-9]{1})",K.millisecond=Mt;break;case"x":B+="([0-9]{1,})",K.timestamp=Mt;break;case"Z":B+="GMT([-+]+[0-9]{2}:[0-9]{2})",K.zone=Mt;break;case"ZZ":B+="([\\-+]+[0-9]{2}[0-9]{2})",K.zone=Mt;break;case"i":B+="([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)",K.iso=Mt,mt+=7;break;case"G":case"YYYY":case"YYY":case"YY":case"Y":case"MMMMM":case"W":case"EEEEE":case"EEEE":case"EEE":case"EE":case"E":case"eeeee":case"eeee":case"eee":case"ee":case"e":case"zzzz"
1:case"zzz":case"zz":case"z":case"t":mt--}B+="[^0-9]*"}let xt=new RegExp(B),bt=o.match(xt);if(bt){if(K.year>-1&&(st.year=parseInt(bt[K.year])),K.year3>-1){let lt=parseInt(bt[K.year3]);lt+=1e3,st.year=lt}if(K.year2>-1){let lt=parseInt(bt[K.year2]);lt+=lt>50?1e3:2e3,st.year=lt}if(K.year1>-1){let lt=parseInt(bt[K.year1]);lt=10*Math.floor((new Date).getFullYear()/10)+lt,st.year=lt}if(K.monthLong>-1&&(st.month=this.resolveMonth(bt[K.monthLong])),K.monthShort>-1&&(st.month=this.resolveShortMonth(bt[K.monthShort])),K.month>-1&&(st.month=parseInt(bt[K.month])-1),K.week>-1&&-1===K.day&&(st.month=0,st.day=w.X2(parseInt(bt[K.week]),st.year,1,D)),K.day>-1&&(st.day=parseInt(bt[K.day])),K.yearDay>-1&&(st.month=0,st.day=parseInt(bt[K.yearDay])),K.hourBase0>-1&&(st.hour=parseInt(bt[K.hourBase0])),K.hourBase1>-1&&(st.hour=parseInt(bt[K.hourBase1])-1),K.hour12Base0>-1){let lt=parseInt(bt[K.hour12Base0]);11==lt&&(lt=0),K.am>-1&&!this.isAm(bt[K.am])&&(lt+=12),st.hour=lt}if(K.hour12Base1>-1){let lt=parseInt(bt[K.hour12Base1]);12==lt&&(lt=0),K.am>-1&&!this.isAm(bt[K.am])&&(lt+=12),st.hour=lt}if(K.minute>-1&&(st.minute=parseInt(bt[K.minute])),K.second>-1&&(st.second=parseInt(bt[K.second])),K.millisecond>-1){let lt=parseInt(bt[K.millisecond]);2==K.millisecondDigits?lt*=10:1==K.millisecondDigits&&(lt*=100),st.millisecond=lt}if(K.timestamp>-1){st.timestamp=parseInt(bt[K.timestamp]);const lt=new Date(st.timestamp);st.year=lt.getUTCFullYear(),st.month=lt.getUTCMonth(),st.day=lt.getUTCDate(),st.hour=lt.getUTCHours(),st.minute=lt.getUTCMinutes(),st.second=lt.getUTCSeconds(),st.millisecond=lt.getUTCMilliseconds()}K.zone>-1&&(st.offset=this.resolveTimezoneOffset(new Date(st.year,st.month,st.day),bt[K.zone])),K.iso>-1&&(st.year=W.Ro(bt[K.iso+0]),st.month=W.Ro(bt[K.iso+1])-1,st.day=W.Ro(bt[K.iso+2]),st.hour=W.Ro(bt[K.iso+3]),st.minute=W.Ro(bt[K.iso+4]),st.second=W.Ro(bt[K.iso+5]),st.millisecond=W.Ro(bt[K.iso+6]),"Z"==bt[K.iso+7]||"z"==bt[K.iso+7]?st.utc=!0:""!=bt[K.iso+7]&&(st.offset=this.resolveTimezoneOffset(new Date(st.year,st.month,st.day),bt[K.iso+7]))),k=st.utc?new Date(Date.UTC(st.year,st.month,st.day,st.hour,st.minute,st.second,st.millisecond)):new Date(st.year,st.month,st.day,st.hour,st.minute+st.offset,st.second,st.millisecond)}else k=new Date(o);return k}resolveTimezoneOffset(o,d){if(d.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){let k=d.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/),B=k[1],K=k[3],st=60*parseInt(k[2])+parseInt(K);return"+"==B&&(st*=-1),st-(o||new Date).getTimezoneOffset()}return 0}resolveMonth(o){let d=this._months().indexOf(o);return d>-1||!this._root.language.isDefault()&&(d=this._root.language.translateAll(this._months()).indexOf(o),d>-1)?d:0}resolveShortMonth(o){let d=this._shortMonths().indexOf(o);return d>-1||(d=this._months().indexOf(o),d>-1)||this._root.language&&!this._root.language.isDefault()&&(d=this._root.language.translateAll(this._shortMonths()).indexOf(o),d>-1)?d:0}isAm(o){return this.getStringList(["AM","A.M.","A"]).indexOf(o.toUpperCase())>-1}getStringList(o){let d=[];for(let D=0;D<o.length;D++)d.push(w.xp(this._root.language?this._t(o[D]):o[D]));return d}}class gt extends r.wC{constructor(){super(...arguments),this._unitAliases={Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"}}_setDefaults(){const o="_duration_millisecond",d="_duration_second",D="_duration_minute",k="_duration_hour",B="_duration_day",H="_duration_week",K="_duration_month",Mt="_minute",xt="_hour",bt="_day",lt="_week",ct="_week",Ut="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(o),second:this._t(o+"_second"),minute:this._t(o+Mt),hour:this._t(o+xt),day:this._t(o+bt),week:this._t(o+lt),month:this._t(o+ct),year:this._t(o+Ut)},second:{second:this._t(d),minute:this._t(d+Mt),hour:this._t(d+xt),day:this._t(d+bt),week:this._t(d+lt),month:this._t(d+ct),year:this._t(d+Ut)},minute:{minute:this._t(D),hour:this._t(D+xt),day:this._t(D+bt),week:this._t(D+lt),month:this._t(D+ct),year:this._t(D+Ut)},hour:{hour:this._t(k),day:this._t(k+bt),week:this._t(k+lt),month:this._t(k+ct),year:this._t(k+Ut)},day:{day:this._t(B),week:this._t(B+lt),month:this._t(B+ct),year:this._t(B+Ut)},week:{week:this._t(H),month:this._t(H+ct),year:this._t(H+Ut)},month:{month:this._t(K),year:this._t(K+Ut)},year:{year:this._t("_duration_year")}}),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(o,d,D){let k=D||this.get("baseUnit");(typeof d>"u"||""===d)&&(d=null!=this.get("durationFormat")?this.get("durationFormat"):this.getFormat(W.Ro(o),void 0,k)),d=w.fZ(d);let K,B=this.parseFormat(d,k),H=Number(o);K=H>this.get("negativeBase")?B.positive:H<this.get("negativeBase")?B.negative:B.zero;let st=this.applyFormat(H,K);return""!==K.color&&(st="["+K.color+"]"+st+"[/]"),st}parseFormat(o,d){let D=d||this.get("baseUnit"),k={positive:{color:"",template:"",parts:[],source:"",baseUnit:D,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:D,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:D,parsed:!1,absolute:!1}},B=(o=o.replace("||",W.cb)).split("|");return k.positive.source=B[0],typeof B[2]>"u"?k.zero=k.positive:k.zero.source=B[2],typeof B[1]>"u"?k.negative=k.positive:k.negative.source=B[1],R.__(k,(H,K)=>{if(K.parsed)return;let st=K.source,mt=[];mt=K.source.match(/^\[([^\]]*)\]/),mt&&mt.length&&""!==mt[0]&&(st=K.source.substr(mt[0].length),K.color=mt[1]);let Mt=S.g.chunk(st,!0);for(let xt=0;xt<Mt.length;xt++){let bt=Mt[xt];if(bt.text=bt.text.replace(W.cb,"|"),"value"===bt.type){bt.text.match(/[yYMdDwhHKkmsSn]+a/)&&(K.absolute=!0,bt.text=bt.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let lt=bt.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(lt)for(let ct=0;ct<lt.length;ct++)null==lt[ct]&&(lt[ct]=this._unitAliases[lt[ct]]),K.parts.push(lt[ct]),bt.text=bt.text.replace(lt[ct],W.Kx)}K.template+=bt.text}K.parsed=!0}),k}applyFormat(o,d){let D=!d.absolute&&o<this.get("negativeBase");o=Math.abs(o);
1let k=this.toTimeStamp(o,d.baseUnit),B=d.template;const H={millisecond:0,second:0,minute:0,hour:0,day:0,week:0,month:0,year:0};for(let K=0,st=d.parts.length;K<st;K++){let xt,Mt=this._toTimeUnit(d.parts[K].substr(0,1));const bt=this._getUnitValue(Mt);xt=K<st-1?Math.floor(k/bt):Math.round(k/bt),H[Mt]+=xt,k-=xt*bt}R.__(H,(K,st)=>{"millisecond"==K&&1e3==st?(H.second++,H.millisecond=0):"second"==K&&60==st?(H.minute++,H.second=0):"minute"==K&&60==st?(H.hour++,H.minute=0):"hour"==K&&24==st?(H.day++,H.hour=0):"day"==K&&7==st&&-1!==d.parts.indexOf("w")?(H.week++,H.day=0):"day"==K&&30==st?(H.month++,H.day=0):"month"==K&&12==st&&(H.year++,H.month=0)});for(let K=0,st=d.parts.length;K<st;K++){let mt=d.parts[K],Mt=this._toTimeUnit(mt.substr(0,1));B=B.replace(W.Kx,w.tr(H[Mt],mt.length,"0"))}return D&&(B="-"+B),B}toTimeStamp(o,d){return o*this._getUnitValue(d)}_toTimeUnit(o){switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year"}}getFormat(o,d,D){if(null!=this.get("durationFormat"))return this.get("durationFormat");if(D||(D=this.get("baseUnit")),null!=d&&o!=d){o=Math.abs(o),d=Math.abs(d);let k=this.getValueUnit(Math.max(o,d),D);return this.get("durationFormats")[D][k]}{let k=this.getValueUnit(o,D);return this.get("durationFormats")[D][k]}}getValueUnit(o,d){d||(d=this.get("baseUnit"));let D,k=this.getMilliseconds(o,d);return R.FY(this._getUnitValues(),(B,H)=>{if(B==d||D){if(k/H<=1)return D||(D=B),!1;D=B}return!0}),D}getMilliseconds(o,d){return d||(d=this.get("baseUnit")),o*this._getUnitValue(d)}_getUnitValue(o){return this._getUnitValues()[o]}_getUnitValues(){return{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}}}const N={firstDayOfWeek:1,_decimalSeparator:".",_thousandSeparator:",",_percentPrefix:null,_percentSuffix:"%",_big_number_suffix_3:"k",_big_number_suffix_6:"M",_big_number_suffix_9:"G",_big_number_suffix_12:"T",_big_number_suffix_15:"P",_big_number_suffix_18:"E",_big_number_suffix_21:"Z",_big_number_suffix_24:"Y",_small_number_suffix_3:"m",_small_number_suffix_6:"\u03bc",_small_number_suffix_9:"n",_small_number_suffix_12:"p",_small_number_suffix_15:"f",_small_number_suffix_18:"a",_small_number_suffix_21:"z",_small_number_suffix_24:"y",_byte_suffix_B:"B",_byte_suffix_KB:"KB",_byte_suffix_MB:"MB",_byte_suffix_GB:"GB",_byte_suffix_TB:"TB",_byte_suffix_PB:"PB",_date:"yyyy-MM-dd",_date_millisecond:"mm:ss SSS",_date_millisecond_full:"HH:mm:ss SSS",_date_second:"HH:mm:ss",_date_second_full:"HH:mm:ss",_date_minute:"HH:mm",_date_minute_full:"HH:mm - MMM dd, yyyy",_date_hour:"HH:mm",_date_hour_short:"HH",_date_hour_full:"HH:mm - MMM dd, yyyy",_date_day:"MMM dd",_date_day_full:"MMM dd, yyyy",_date_week:"ww",_date_week_full:"MMM dd, yyyy",_date_month:"MMM",_date_month_full:"MMM, yyyy",_date_year:"yyyy",_duration_millisecond:"SSS",_duration_millisecond_second:"ss.SSS",_duration_millisecond_minute:"mm:ss SSS",_duration_millisecond_hour:"hh:mm:ss SSS",_duration_millisecond_day:"d'd' mm:ss SSS",_duration_millisecond_week:"d'd' mm:ss SSS",_duration_millisecond_month:"M'm' dd'd' mm:ss SSS",_duration_millisecond_year:"y'y' MM'm' dd'd' mm:ss SSS",_duration_second:"ss",_duration_second_minute:"mm:ss",_duration_second_hour:"hh:mm:ss",_duration_second_day:"d'd' hh:mm:ss",_duration_second_week:"d'd' hh:mm:ss",_duration_second_month:"M'm' dd'd' hh:mm:ss",_duration_second_year:"y'y' MM'm' dd'd' hh:mm:ss",_duration_minute:"mm",_duration_minute_hour:"hh:mm",_duration_minute_day:"d'd' hh:mm",_duration_minute_week:"d'd' hh:mm",_duration_minute_month:"M'm' dd'd' hh:mm",_duration_minute_year:"y'y' MM'm' dd'd' hh:mm",_duration_hour:"hh'h'",_duration_hour_day:"d'd' hh'h'",_duration_hour_week:"d'd' hh'h'",_duration_hour_month:"M'm' dd'd' hh'h'",_duration_hour_year:"y'y' MM'm' dd'd' hh'h'",_duration_day:"d'd'",_duration_day_week:"d'd'",_duration_day_month:"M'm' dd'd'",_duration_day_year:"y'y' MM'm' dd'd'",_duration_week:"w'w'",_duration_week_month:"w'w'",_duration_week_year:"w'w'",_duration_month:"M'm'",_duration_month_year:"y'y' MM'm'",_duration_year:"y'y'",_era_ad:"AD",_era_bc:"BC",A:"",P:"",AM:"",PM:"","A.M.":"","P.M.":"",January:"",February:"",March:"",April:"",May:"",June:"",July:"",August:"",September:"",October:"",November:"",December:"",Jan:"",Feb:"",Mar:"",Apr:"","May(short)":"May",Jun:"",Jul:"",Aug:"",Sep:"",Oct:"",Nov:"",Dec:"",Sunday:"",Monday:"",Tuesday:"",Wednesday:"",Thursday:"",Friday:"",Saturday:"",Sun:"",Mon:"",Tue:"",Wed:"",Thu:"",Fri:"",Sat:"",_dateOrd:function(St){let o="th";if(St<11||St>13)switch(St%10){case 1:o="st";break;case 2:o="nd";break;case 3:o="rd"}return o},"Zoom Out":"",Play:"",Stop:"",Legend:"","Press ENTER to toggle":"",Loading:"",Home:"",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"","Chord diagram":"","TreeMap chart":"","Force directed tree":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"","Press ENTER to zoom in":"","Press ENTER to zoom out":"","Use arrow keys to zoom in and out":"","Use plus and minus keys on your keyboard to zoom in and out":"",Export:"",Image:"",Data:"",Print:"","Press ENTER or use arrow keys to navigate":"","Press ENTER to open":"","Press ENTER to print.":"","Press ENTER to export as %1.":"","(Press ESC to close this message)":"","Image Export Complete":"","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"",HTML:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"","Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"","From %1":"","To %1":"","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:"",Confirm:""};class tt extends r.wC{_setDefaults(){this.setPrivate("defaultLocale",N),super._setDefaults()}translate(o,d,...D){d||(d=this._root.locale||this.getPrivate("defaultLocale"));let k=o,B=d[o];if(null===B)k="";else if(null!=B)B&&(k=B);else if(d!==this.getPrivate("defaultLocale"))return this.translate(o,this.getPrivate("defaultLocale"),...D);if(D.length)for(let H=D.length,K=0;K<H;++K)k=k.split("%"+(K+1)).join(D[K]);return k}translateAny(o,d,...D){return this.translate(o,d,...D)}setTranslationAny(o,d,D){(D||this._root.locale)[o]=d}setTranslationsAny(o,d){R.__(o,(D,k)=>{this.setTranslationAny(D,k,d)})}translateEmpty(o,d,...D){let k=this.translate(o,d,...D);return k==o?"":k}translateFunc(o,d){return this._root.locale[o]?this._root.locale[o]:d!==this.getPrivate("defaultLocale")?this.translateFunc(o,this.getPrivate("defaultLocale")):()=>""}translateAll(o,d){return this.isDefault()?o:C.Tj(o,D=>this.translate(D,d))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}}var J=y(18788),at=y(49203),vt=y(76479),dt=y(72294);class Dt{constructor(o=1,d=0,D=0,k=1,B=0,H=0){this.a=o,this.b=d,this.c=D,this.d=k,this.tx=B,this.ty=H}setTransform(o,d,D,k,B,H=1){this.a=Math.cos(B)*H,this.b=Math.sin(B)*H,this.c=-Math.sin(B)*H,this.d=Math.cos(B)*H,this.tx=o-(D*this.a+k*this.c),this.ty=d-(D*this.b+k*this.d)}apply(o){return{x:this.a*o.x+this.c*o.y+this.tx,y:this.b*o.x+this.d*o.y+this.ty}}applyInverse(o){const d=1/(this.a*this.d+this.c*-this.b);return{x:this.d*d*o.x+-this.c*d*o.y+(this.ty*this.c-this.tx*this.d)*d,y:this.a*d*o.y+-this.b*d*o.x+(-this.ty*this.a+this.tx*this.b)*d}}append(o){const d=this.a,D=this.b,k=this.c,B=this.d;this.a=o.a*d+o.b*k,this.b=o.a*D+o.b*B,this.c=o.c*d+o.d*k,this.d=o.c*D+o.d*B,this.tx=o.tx*d+o.ty*k+this.tx,this.ty=o.tx*D+o.ty*B+this.ty}prepend(o){const d=this.tx;if(1!==o.a||0!==o.b||0!==o.c||1!==o.d){const D=this.a,k=this.c;this.a=D*o.a+this.b*o.c,this.b=D*o.b+this.b*o.d,this.c=k*o.a+this.d*o.c,this.d=k*o.b+this.d*o.d}this.tx=d*o.a+this.ty*o.c+o.tx,this.ty=d*o.b+this.ty*o.d+o.ty}copyFrom(o){this.a=o.a,this.b=o.b,this.c=o.c,this.d=o.d,this.tx=o.tx,this.ty=o.ty}}var yt=y(45760),pt=y(30903),Pt=function(){return function(o,d){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return function St(o,d){var D=[],k=!0,B=!1,H=void 0;try{for(var st,K=o[Symbol.iterator]();!(k=(st=K.next()).done)&&(D.push(st.value),!d||D.length!==d);k=!0);}catch(mt){B=!0,H=mt}finally{try{!k&&K.return&&K.return()}finally{if(B)throw H}}return D}(o,d);
1throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Rt=2*Math.PI,Tt=function(o,d,D,k,B,H,K){var st=o.x,mt=o.y;return{x:k*(st*=d)-B*(mt*=D)+H,y:B*st+k*mt+K}},Ct=function(o,d){var D=1.5707963267948966===d?.551915024494:-1.5707963267948966===d?-.551915024494:1.3333333333333333*Math.tan(d/4),k=Math.cos(o),B=Math.sin(o),H=Math.cos(o+d),K=Math.sin(o+d);return[{x:k-B*D,y:B+k*D},{x:H+K*D,y:K-H*D},{x:H,y:K}]},rt=function(o,d,D,k){var H=o*D+d*k;return H>1&&(H=1),H<-1&&(H=-1),(o*k-d*D<0?-1:1)*Math.acos(H)};const oe=function(o){var d=o.px,D=o.py,k=o.cx,B=o.cy,H=o.rx,K=o.ry,st=o.xAxisRotation,mt=void 0===st?0:st,Mt=o.largeArcFlag,xt=void 0===Mt?0:Mt,bt=o.sweepFlag,lt=void 0===bt?0:bt,ct=[];if(0===H||0===K)return[];var Ut=Math.sin(mt*Rt/360),ht=Math.cos(mt*Rt/360),_t=ht*(d-k)/2+Ut*(D-B)/2,Jt=-Ut*(d-k)/2+ht*(D-B)/2;if(0===_t&&0===Jt)return[];H=Math.abs(H),K=Math.abs(K);var $t=Math.pow(_t,2)/Math.pow(H,2)+Math.pow(Jt,2)/Math.pow(K,2);$t>1&&(H*=Math.sqrt($t),K*=Math.sqrt($t));var Bt=function(o,d,D,k,B,H,K,st,mt,Mt,xt,bt){var lt=Math.pow(B,2),ct=Math.pow(H,2),Ut=Math.pow(xt,2),ht=Math.pow(bt,2),_t=lt*ct-lt*ht-ct*Ut;_t<0&&(_t=0),_t/=lt*ht+ct*Ut;var Jt=(_t=Math.sqrt(_t)*(K===st?-1:1))*B/H*bt,$t=_t*-H/B*xt,Bt=Mt*Jt-mt*$t+(o+D)/2,qt=mt*Jt+Mt*$t+(d+k)/2,he=(xt-Jt)/B,ne=(bt-$t)/H,fe=(-xt-Jt)/B,Me=(-bt-$t)/H,_e=rt(1,0,he,ne),ve=rt(he,ne,fe,Me);return 0===st&&ve>0&&(ve-=Rt),1===st&&ve<0&&(ve+=Rt),[Bt,qt,_e,ve]}(d,D,k,B,H,K,xt,lt,Ut,ht,_t,Jt),qt=Pt(Bt,4),he=qt[0],ne=qt[1],fe=qt[2],Me=qt[3],_e=Math.abs(Me)/(Rt/4);Math.abs(1-_e)<1e-7&&(_e=1);var ve=Math.max(Math.ceil(_e),1);Me/=ve;for(var Te=0;Te<ve;Te++)ct.push(Ct(fe,Me)),fe+=Me;return ct.map(function(Ce){var si=Tt(Ce[0],H,K,ht,Ut,he,ne),Ee=si.x,Ei=si.y,be=Tt(Ce[1],H,K,ht,Ut,he,ne),Ge=be.x,Ze=be.y,ei=Tt(Ce[2],H,K,ht,Ut,he,ne);return{x1:Ee,y1:Ei,x2:Ge,y2:Ze,x:ei.x,y:ei.y}})};function ge(St,o,d){if(o!==d)throw new Error("Required "+d+" arguments for "+St+" but got "+o)}function De(St,o,d){if(o<d)throw new Error("Required at least "+d+" arguments for "+St+" but got "+o)}function ce(St,o,d){if(De(St,o,d),o%d!==0)throw new Error("Arguments for "+St+" must be in pairs of "+d)}function de(St){for(let o=0;o<St.length;o+=7){let d=o+3,D=St[d];if(D.length>1){const k=/^([01])([01])(.*)$/.exec(D);null!==k&&(St.splice(d,0,k[1]),++d,St.splice(d,0,k[2]),++d,k[3].length>0?St[d]=k[3]:St.splice(d,1))}if(++d,D=St[d],D.length>1){const k=/^([01])(.+)$/.exec(D);null!==k&&(St.splice(d,0,k[1]),++d,St[d]=k[2])}}}function Ae(St){if(0===St||1===St)return St;throw new Error("Flag must be 0 or 1")}function ke(St,o){for(;(!St.interactive||o(St))&&St._parent;)St=St._parent}function Fe(St,o,d){return w.q2(St,w.wN(o),D=>{const k=w.wt(D);let B=D.touches;B?(0==B.length&&(B=D.changedTouches),d(C.C(B),k)):d([D],k)})}function Be(St){const o=document.createElement("canvas");o.width=1,o.height=1;const d=o.getContext("2d",{willReadFrequently:!0});d.drawImage(St,0,0,1,1);try{return d.getImageData(0,0,1,1),!1}catch{return console.warn('Image "'+St.src+'" is loaded from different host and is not covered by CORS policy. For more information about the implications read here: https://www.amcharts.com/docs/v5/concepts/cors'),!0}}function Pe(St){St.width=0,St.height=0,St.style.width="0px",St.style.height="0px"}function we(St){return Math.floor(St)+.5}class Se{constructor(){this._x=0,this._y=0}get x(){return this._x}get y(){return this._y}set x(o){this._x=o}set y(o){this._y=o}}class se extends f.O_{constructor(o){super(),this.mask=null,this.visible=!0,this.exportable=!0,this.interactive=!1,this.inactive=null,this.wheelable=!1,this.cancelTouch=!1,this.isMeasured=!1,this.buttonMode=!1,this.alpha=1,this.compoundAlpha=1,this.angle=0,this.scale=1,this.x=0,this.y=0,this.crisp=!1,this.pivot=new Se,this._localMatrix=new Dt,this._matrix=new Dt,this._uMatrix=new Dt,this._renderer=o}subStatus(o){return{inactive:null==this.inactive?o.inactive:this.inactive,layer:this._layer||o.layer}}_dispose(){this._renderer._removeObject(this),this.getLayer().dirty=!0}getCanvas(){return this.getLayer().view}getLayer(){let o=this;for(;;){if(o._layer)return o._layer;if(!o._parent)return this._renderer.defaultLayer;o=o._parent}}setLayer(o,d){null==o?this._layer=void 0:(this._layer=this._renderer.getLayer(o,!0),this._layer.visible=!0,this._layer.margin=d,d&&w.Dt(this._layer.view,!1),this._renderer._ghostLayer.setMargin(this._renderer.layers
1),this._parent&&this._parent.registerChildLayer(this._layer),this._layer.dirty=!0,this._renderer.resizeLayer(this._layer),this._renderer.resizeGhost())}markDirtyLayer(){this.getLayer().dirty=!0}clear(){this.invalidateBounds()}invalidateBounds(){this._localBounds=void 0}_addBounds(o){}_getColorId(){return void 0===this._colorId&&(this._colorId=this._renderer.paintId(this)),this._colorId}_isInteractive(o){return!o.inactive&&(this.interactive||this._renderer._forceInteractive>0)}_isInteractiveMask(o){return this._isInteractive(o)}contains(o){for(;;){if(o===this)return!0;if(!o._parent)return!1;o=o._parent}}toGlobal(o){return this._matrix.apply(o)}toLocal(o){return this._matrix.applyInverse(o)}getLocalMatrix(){return this._uMatrix.setTransform(0,0,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._uMatrix}getLocalBounds(){return this._localBounds||(this._localBounds={left:1e7,top:1e7,right:-1e7,bottom:-1e7},this._addBounds(this._localBounds)),this._localBounds}getAdjustedBounds(o){this._setMatrix();const d=this.getLocalMatrix(),D=d.apply({x:o.left,y:o.top}),k=d.apply({x:o.right,y:o.top}),B=d.apply({x:o.right,y:o.bottom}),H=d.apply({x:o.left,y:o.bottom});return{left:Math.min(D.x,k.x,B.x,H.x),top:Math.min(D.y,k.y,B.y,H.y),right:Math.max(D.x,k.x,B.x,H.x),bottom:Math.max(D.y,k.y,B.y,H.y)}}on(o,d,D){return this.interactive?this._renderer._addEvent(this,o,d,D):new f.W_(()=>{})}_setMatrix(){this._localMatrix.setTransform(this.x,this.y,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._matrix.copyFrom(this._localMatrix),this._parent&&this._matrix.prepend(this._parent._matrix)}_transform(o,d){const D=this._matrix;let k=D.tx*d,B=D.ty*d;this.crisp&&(k=we(k),B=we(B)),o.setTransform(D.a*d,D.b*d,D.c*d,D.d*d,k,B)}_transformMargin(o,d,D){const k=this._matrix;o.setTransform(k.a*d,k.b*d,k.c*d,k.d*d,(k.tx+D.left)*d,(k.ty+D.top)*d)}_transformLayer(o,d,D){D.margin?this._transformMargin(o,D.scale||d,D.margin):this._transform(o,D.scale||d)}render(o,d=0){if(this.visible&&(!1!==this.exportable||!this._renderer._omitTainted)){this._setMatrix();const D=this.subStatus(o),k=this._renderer.resolution,B=this._renderer.layers,H=this._renderer._ghostLayer,K=H.context,st=this.mask;st&&st._setMatrix(),C.__(B,mt=>{if(mt){const Mt=mt.context;Mt.save(),st&&(st._transformLayer(Mt,k,mt),st._runPath(Mt),Mt.clip()),Mt.globalAlpha=this.compoundAlpha*this.alpha,this._transformLayer(Mt,k,mt),this.filter&&(Mt.filter=this.filter)}}),K.save(),st&&this._isInteractiveMask(D)&&(st._transformMargin(K,k,H.margin),st._runPath(K),K.clip()),this._transformMargin(K,k,H.margin),D.layer.order>0&&!d&&C.Cy(this._renderer._deferredGhostLayers,D.layer.order),this._render(D,d),K.restore(),C.__(B,mt=>{mt&&mt.context.restore()})}}_render(o,d=0){!1===this.exportable&&(o.layer.tainted=!0)}_ghostOnly(o=0){return o>0}_drawGhost(o,d=0){const D=this._isInteractive(o),k=o.layer.order||0;return!(!D||(0!=k||this._ghostOnly(d))&&k!=d)}hovering(){return this._renderer._hovering.has(this)}dragging(){return this._renderer._dragging.some(o=>o.value===this)}shouldCancelTouch(){const o=this._renderer;return!(o.tapToActivate&&!o._touchActive)&&(!!this.cancelTouch||!!this._parent&&this._parent.shouldCancelTouch())}}class le extends se{constructor(){super(...arguments),this.interactiveChildren=!0,this._children=[]}_isInteractiveMask(o){return this.interactiveChildren||super._isInteractiveMask(o)}addChild(o){o._parent=this,this._children.push(o),o._layer&&this.registerChildLayer(o._layer)}addChildAt(o,d){o._parent=this,this._children.splice(d,0,o),o._layer&&this.registerChildLayer(o._layer)}removeChild(o){o._parent=void 0,C.dm(this._children,o)}_render(o,d){super._render(o);const D=this._renderer;this.interactive&&this.interactiveChildren&&++D._forceInteractive,C.__(this._children,k=>{k.compoundAlpha=this.compoundAlpha*this.alpha,k.render(o,d)}),this.interactive&&this.interactiveChildren&&--D._forceInteractive}registerChildLayer(o){this._childLayers||(this._childLayers=[]),C.JJ(this._childLayers,o),this._parent&&this._parent.registerChildLayer(o)}markDirtyLayer(o=!1){super.markDirtyLayer(),o&&this._childLayers&&C.__(this._childLayers,d=>d.dirty=!0)}_dispose(){super._dispose(),this._childLayers&&C.__(this._childLayers,o=>{o.dirty=!0})}}function ue(St,o){St.left=Math.min(St.left,o.x),St.top=Math.min(St.top,o.y),St.right=Math.max(St.right,o.x),St.bottom=Math.max(St.bottom,o.y)}class me{colorize(o,d){}colorizeGhost(o,d){this.colorize(o,d)}path(o){}pathGhost(o){this.path(o)}addBounds(o){}}class Ye extends me{colorize(o,d){o.beginPath()}}class Xe extends me{constructor(o){super(),this.color=o}colorize(o,d){o.fillStyle=void 0!==d?d:this.color}}class kt extends me{constructor(o){super(),this.clearShadow=o}colorize(o,d){o.fill(),this.clearShadow&&(o.shadowColor="",o.shadowBlur=0,o.shadowOffsetX=0,o.shadowOffsetY=0)}}class ee extends me{colorize(o,d){o.stroke()}}class It extends me{constructor(o,d,D,k){super(),this.width=o,this.color=d,this.lineJoin=D,this.lineCap=k}colorize(o,d){o.strokeStyle=void 0!==d?d:this.color,o.lineWidth=this.width,this.lineJoin&&(o.lineJoin=this.lineJoin),this.lineCap&&(o.lineCap=this.lineCap)}}class jt extends me{constructor(o){super(),this.dash=o}colorize(o,d){o.setLineDash(this.dash)}}class Qt extends me{constructor(o){super(),this.dashOffset=o}colorize(o,d){o.lineDashOffset=this.dashOffset}}class re extends me{constructor(o,d,D,k){super(),this.x=o,this.y=d,this.width=D,this.height=k}path(o){o.rect(this.x,this.y,this.width,this.height)}addBounds(o){const d=this.x,D=this.y,k=d+this.width,B=D+this.height;ue(o,{x:d,y:D}),ue(o,{x:k,y:D}),ue(o,{x:d,y:B}),ue(o,{x:k,y:B})}}class xe extends me{constructor(o,d,D){super(),this.x=o,this.y=d,this.radius=D}path(o){o.moveTo(this.x+this.radius,this.y),o.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(o){ue(o,{x:this.x-this.radius,y:this.y-this.radius}),ue(o,{x:this.x+this.radius,y:this.y+this.radius})}}class ti extends me{constructor(o,d,D,k){super(),this.x=o,this.y=d,this.radiusX=D,this.radiusY=k}path(o){o.ellipse(0,0,this.radiusX,this.radiusY,0,0,2*Math.PI)}addBounds(o){ue(o,{x:this.x-this.radiusX,y:this.y-this.radiusY}),ue(o,{x:this.x+this.radiusX,y:this.y+this.radiusY})}}class ii extends me{constructor(o,d,D,k,B,H){super(),this.cx=o,this.cy=d,this.radius=D,this.startAngle=k,this.endAngle=B,this.anticlockwise=H}path(o){this.radius>0&&o.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(o){let d=pt.Ki(this.cx,this.cy,this.startAngle*pt.iR,this.endAngle*pt.iR,this.radius);ue(o,{x:d.left,y:d.top}),ue(o,{x:d.right,y:d.bottom})}}class ze extends me{constructor(o,d,D,k,B){super(),this.x1=o,this.y1=d,this.x2=D,this.y2=k,this.radius=B}path(o){this.radius>0&&o.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}addBounds(o){}}class oi extends me{constructor(o,d){super(),this.x=o,this.y=d}path(o){o.lineTo(this.x,this.y)}addBounds(o){ue(o,{x:this.x,y:this.y})}}class ri extends me{constructor(o,d){super(),this.x=o,this.y=d}path(o){o.moveTo(this.x,this.y)}addBounds(o){ue(o,{x:this.x,y:this.y})}}class mi extends me{path(o){o.closePath()}}class vi extends me{constructor(o,d,D,k,B,H){super(),this.cpX=o,this.cpY=d,this.cpX2=D,this.cpY2=k,this.toX=B,this.toY=H}path(o){o.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}
1addBounds(o){ue(o,{x:this.cpX,y:this.cpY}),ue(o,{x:this.cpX2,y:this.cpY2}),ue(o,{x:this.toX,y:this.toY})}}class Wi extends me{constructor(o,d,D,k){super(),this.cpX=o,this.cpY=d,this.toX=D,this.toY=k}path(o){o.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(o){ue(o,{x:this.cpX,y:this.cpY}),ue(o,{x:this.toX,y:this.toY})}}class Yi extends me{constructor(o,d,D,k,B){super(),this.color=o,this.blur=d,this.offsetX=D,this.offsetY=k,this.opacity=B}colorize(o,d){this.opacity&&(o.fillStyle=this.color),o.shadowColor=this.color,o.shadowBlur=this.blur,o.shadowOffsetX=this.offsetX,o.shadowOffsetY=this.offsetY}colorizeGhost(o,d){}}class yi extends me{constructor(o,d,D,k,B){super(),this.image=o,this.width=d,this.height=D,this.x=k,this.y=B}path(o){o.drawImage(this.image,this.x,this.y,this.width,this.height)}addBounds(o){ue(o,{x:this.x,y:this.y}),ue(o,{x:this.width,y:this.height})}}class wi extends se{constructor(){super(...arguments),this._operations=[],this.blendMode=vt.N.NORMAL,this._hasShadows=!1}clear(){super.clear(),this._operations.length=0}_pushOp(o){this._operations.push(o)}beginFill(o,d=1){this._fillAlpha=d,o?o instanceof dt.Q1?this._pushOp(new Xe(o.toCSS(d))):(this.isMeasured=!0,this._pushOp(new Xe(o))):this._pushOp(new Xe("rgba(0, 0, 0, "+d+")"))}endFill(){this._pushOp(new kt(this._hasShadows))}endStroke(){this._pushOp(new ee)}beginPath(){this._pushOp(new Ye)}lineStyle(o=0,d,D=1,k,B){this._strokeAlpha=D,this._pushOp(new It(o,d?d instanceof dt.Q1?d.toCSS(D):d:"rgba(0, 0, 0, "+D+")",k,B))}setLineDash(o){this._pushOp(new jt(o||[]))}setLineDashOffset(o=0){this._pushOp(new Qt(o))}drawRect(o,d,D,k){this._pushOp(new re(o,d,D,k))}drawCircle(o,d,D){this._pushOp(new xe(o,d,D))}drawEllipse(o,d,D,k){this._pushOp(new ti(o,d,D,k))}arc(o,d,D,k,B,H=!1){this._pushOp(new ii(o,d,D,k,B,H))}arcTo(o,d,D,k,B){this._pushOp(new ze(o,d,D,k,B))}lineTo(o,d){this._pushOp(new oi(o,d))}moveTo(o,d){this._pushOp(new ri(o,d))}bezierCurveTo(o,d,D,k,B,H){this._pushOp(new vi(o,d,D,k,B,H))}quadraticCurveTo(o,d,D,k){this._pushOp(new Wi(o,d,D,k))}closePath(){this._pushOp(new mi)}shadow(o,d=0,D=0,k=0,B){this._hasShadows=!0,this._pushOp(new Yi(o.toCSS(B||this._fillAlpha||this._strokeAlpha),d,D,k))}image(o,d,D,k,B){this._pushOp(new yi(o,d,D,k,B))}svgPath(o){let d=0,D=0,k=null,B=null,H=null,K=null;const st=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,mt=/[\u0009\u0020\u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009\u0020\u000A\u000C\u000D]*,?/g,Mt=this._operations.length;try{let xt;for(;null!==(xt=st.exec(o));){const bt=xt[1],lt=xt[2],ct=[];for(;null!==(xt=mt.exec(lt));)ct.push(xt[1]);switch("S"!==bt&&"s"!==bt&&"C"!==bt&&"c"!==bt&&(k=null,B=null),"Q"!==bt&&"q"!==bt&&"T"!==bt&&"t"!==bt&&(H=null,K=null),bt){case"M":ce(bt,ct.length,2),d=+ct[0],D=+ct[1],this.moveTo(d,D);for(let ht=2;ht<ct.length;ht+=2)d=+ct[ht],D=+ct[ht+1],this.lineTo(d,D);break;case"m":ce(bt,ct.length,2),d+=+ct[0],D+=+ct[1],this.moveTo(d,D);for(let ht=2;ht<ct.length;ht+=2)d+=+ct[ht],D+=+ct[ht+1],this.lineTo(d,D);break;case"L":ce(bt,ct.length,2);for(let ht=0;ht<ct.length;ht+=2)d=+ct[ht],D=+ct[ht+1],this.lineTo(d,D);break;case"l":ce(bt,ct.length,2);for(let ht=0;ht<ct.length;ht+=2)d+=+ct[ht],D+=+ct[ht+1],this.lineTo(d,D);break;case"H":De(bt,ct.length,1);for(let ht=0;ht<ct.length;++ht)d=+ct[ht],this.lineTo(d,D);break;case"h":De(bt,ct.length,1);for(let ht=0;ht<ct.length;++ht)d+=+ct[ht],this.lineTo(d,D);break;case"V":De(bt,ct.length,1);for(let ht=0;ht<ct.length;++ht)D=+ct[ht],this.lineTo(d,D);break;case"v":De(bt,ct.length,1);for(let ht=0;ht<ct.length;++ht)D+=+ct[ht],this.lineTo(d,D);break;case"C":ce(bt,ct.length,6);for(let ht=0;ht<ct.length;ht+=6)k=+ct[ht+2],B=+ct[ht+3],d=+ct[ht+4],D=+ct[ht+5],this.bezierCurveTo(+ct[ht],+ct[ht+1],k,B,d,D);break;case"c":ce(bt,ct.length,6);for(let ht=0;ht<ct.length;ht+=6){const _t=+ct[ht]+d,Jt=+ct[ht+1]+D;k=+ct[ht+2]+d,B=+ct[ht+3]+D,d+=+ct[ht+4],D+=+ct[ht+5],this.bezierCurveTo(_t,Jt,k,B,d,D)}break;case"S":ce(bt,ct.length,4),(null===k||null===B)&&(k=d,B=D);for(let ht=0;ht<ct.length;ht+=4){const _t=2*d-k,Jt=2*D-B;k=+ct[ht],B=+ct[ht+1],d=+ct[ht+2],D=+ct[ht+3],this.bezierCurveTo(_t,Jt,k,B,d,D)}break;case"s":ce(bt,ct.length,4),(null===k||null===B)&&(k=d,B=D);for(let ht=0;ht<ct.length;ht+=4){const _t=2*d-k,Jt=2*D-B;k=+ct[ht]+d,B=+ct[ht+1]+D,d+=+ct[ht+2],D+=+ct[ht+3],this.bezierCurveTo(_t,Jt,k,B,d,D)}break;case"Q":ce(bt,ct.length,4);for(let ht=0;ht<ct.length;
1ht+=4)H=+ct[ht],K=+ct[ht+1],d=+ct[ht+2],D=+ct[ht+3],this.quadraticCurveTo(H,K,d,D);break;case"q":ce(bt,ct.length,4);for(let ht=0;ht<ct.length;ht+=4)H=+ct[ht]+d,K=+ct[ht+1]+D,d+=+ct[ht+2],D+=+ct[ht+3],this.quadraticCurveTo(H,K,d,D);break;case"T":ce(bt,ct.length,2),(null===H||null===K)&&(H=d,K=D);for(let ht=0;ht<ct.length;ht+=2)H=2*d-H,K=2*D-K,d=+ct[ht],D=+ct[ht+1],this.quadraticCurveTo(H,K,d,D);break;case"t":ce(bt,ct.length,2),(null===H||null===K)&&(H=d,K=D);for(let ht=0;ht<ct.length;ht+=2)H=2*d-H,K=2*D-K,d+=+ct[ht],D+=+ct[ht+1],this.quadraticCurveTo(H,K,d,D);break;case"A":case"a":const Ut="a"===bt;de(ct),ce(bt,ct.length,7);for(let ht=0;ht<ct.length;ht+=7){let _t=+ct[ht+5],Jt=+ct[ht+6];Ut&&(_t+=d,Jt+=D);const $t=oe({px:d,py:D,rx:+ct[ht],ry:+ct[ht+1],xAxisRotation:+ct[ht+2],largeArcFlag:Ae(+ct[ht+3]),sweepFlag:Ae(+ct[ht+4]),cx:_t,cy:Jt});C.__($t,Bt=>{this.bezierCurveTo(Bt.x1,Bt.y1,Bt.x2,Bt.y2,Bt.x,Bt.y),d=Bt.x,D=Bt.y})}break;case"Z":case"z":ge(bt,ct.length,0),this.closePath()}}}catch(xt){this._operations.length=Mt,console.warn("Error when parsing svgPath:\n  "+xt.message+"\n"+o)}}_runPath(o){o.beginPath(),C.__(this._operations,d=>{d.path(o)})}_render(o,d=0){super._render(o);const D=o.layer.dirty,k=this._isInteractive(o),B=this._ghostOnly(d),H=this._drawGhost(o,d);if(D||k||B){const K=o.layer.context,st=this._renderer._ghostLayer.context;let mt;D&&!B&&(K.globalCompositeOperation=this.blendMode,K.beginPath()),H&&(st.beginPath(),mt=this._getColorId()),C.__(this._operations,Mt=>{D&&!B&&(Mt.path(K),Mt.colorize(K,void 0)),H&&(Mt.pathGhost(st),Mt.colorizeGhost(st,mt))})}}renderDetached(o){if(this.visible){this._setMatrix(),o.save();const d=this.mask;d&&(d._setMatrix(),d._transform(o,1),d._runPath(o),o.clip()),o.globalAlpha=this.compoundAlpha*this.alpha,this._transform(o,1),this.filter&&(o.filter=this.filter),o.globalCompositeOperation=this.blendMode,o.beginPath(),C.__(this._operations,D=>{D.path(o),D.colorize(o,void 0)}),o.restore()}}_addBounds(o){this.visible&&this.isMeasured&&C.__(this._operations,d=>{d.addBounds(o)})}}class Xi extends se{constructor(o,d,D){super(o),this.resolution=1,this.textVisible=!0,this._originalScale=1,this.text=d,this.style=D}invalidateBounds(){super.invalidateBounds(),this._textInfo=void 0}invalidateVisibility(){this.textVisible=!0,this.scale=this._originalScale||1}_shared(o){this.style.textAlign&&(o.textAlign=this.style.textAlign),this.style.direction&&(o.direction=this.style.direction),this.style.textBaseline&&(o.textBaseline=this.style.textBaseline)}_prerender(o,d=!1,D=!1){super._render(o);const k=o.layer.context,B=this._renderer._ghostLayer.context,H=this.style;let K=this._getFontStyle(void 0,D);k.font=K,this._isInteractive(o)&&!d&&(B.font=K),H.fill&&(k.fillStyle=H.fill instanceof dt.Q1?H.fill.toCSS(null!=H.fillOpacity?H.fillOpacity:1):H.fill),H.shadowColor&&(o.layer.context.shadowColor=H.shadowColor.toCSS(H.shadowOpacity||1)),H.shadowBlur&&(o.layer.context.shadowBlur=H.shadowBlur),H.shadowOffsetX&&(o.layer.context.shadowOffsetX=H.shadowOffsetX),H.shadowOffsetY&&(o.layer.context.shadowOffsetY=H.shadowOffsetY),this._shared(k),this._isInteractive(o)&&!d&&(B.fillStyle=this._getColorId(),this._shared(B))}_getFontStyle(o,d=!1){const D=this.style;let k=[];return o&&o.fontVariant?k.push(o.fontVariant):D.fontVariant&&k.push(D.fontVariant),d||(o&&o.fontWeight?k.push(o.fontWeight):D.fontWeight&&k.push(D.fontWeight)),o&&o.fontStyle?k.push(o.fontStyle):D.fontStyle&&k.push(D.fontStyle),o&&o.fontSize?(W.Et(o.fontSize)&&(o.fontSize=o.fontSize+"px"),k.push(o.fontSize)):D.fontSize&&(W.Et(D.fontSize)&&(D.fontSize=D.fontSize+"px"),k.push(D.fontSize)),o&&o.fontFamily?k.push(o.fontFamily):D.fontFamily?k.push(D.fontFamily):k.length&&k.push("Arial"),k.join(" ")}_render(o,d=0){if(this._textInfo||this._measure(o),this.textVisible){const D=this._isInteractive(o),k=o.layer.context,B=o.layer.dirty,H=this._renderer._ghostLayer.context,K=this._ghostOnly(d),st=this._drawGhost(o,d);k.save(),H.save(),this._prerender(o),C.__(this._textInfo,(mt,Mt)=>{C.__(mt.textChunks,(xt,bt)=>{if(xt.style&&(k.save(),H.save(),K||(k.font=xt.style),this._isInteractive(o)&&(H.font=xt.style)),xt.fill&&(k.save(),K||(k.fillStyle=xt.fill.toCSS())),B&&!K&&k.fillText(xt.text,xt.offsetX,mt.offsetY+xt.offsetY),"underline"==xt.textDecoration||"line-through"==xt.textDecoration){let lt=1,ct=1,Ut=xt.height;if(["truncate","wrap","wrap-no-break"].indexOf(this.style.oversizedBehavior||"")>-1){const $t=this._measureText(xt.text,k);xt.width=$t.actualBoundingBoxLeft+$t.actualBoundingBoxRight}let Jt,_t=xt.offsetX;switch(this.style.textAlign){case"right":case"end":_t-=xt.width;break;case"center":_t-=xt.width/2}if(xt.style)switch(S.g.getTextStyle(xt.style).fontWeight){case"bolder":case"bold":case"700":case"8
100":case"900":lt=2}Ut&&(ct=Ut/20),Jt="line-through"==xt.textDecoration?lt+mt.offsetY+xt.offsetY-xt.height/2:lt+1.5*ct+mt.offsetY+xt.offsetY,K||(k.save(),k.beginPath(),xt.fill?k.strokeStyle=xt.fill.toCSS():this.style.fill&&this.style.fill instanceof dt.Q1&&(k.strokeStyle=this.style.fill.toCSS()),k.lineWidth=lt*ct,k.moveTo(_t,Jt),k.lineTo(_t+xt.width,Jt),k.stroke(),k.restore())}D&&this.interactive&&st&&H.fillText(xt.text,xt.offsetX,mt.offsetY+xt.offsetY),xt.fill&&k.restore(),xt.style&&(k.restore(),H.restore())})}),k.restore(),H.restore()}}_addBounds(o){if(this.visible&&this.isMeasured){const d=this._measure({inactive:this.inactive,layer:this.getLayer()});ue(o,{x:d.left,y:d.top}),ue(o,{x:d.right,y:d.bottom})}}_ignoreFontWeight(){return/apple/i.test(navigator.vendor)}_measure(o){const d=o.layer.context,D=this._renderer._ghostLayer.context,k="rtl"==this.style.direction;this._textInfo=[];const B=this.style.oversizedBehavior,H=this.style.maxWidth,K=W.Et(H)&&"truncate"==B,st=W.Et(H)&&("wrap"==B||"wrap-no-break"==B);d.save(),D.save(),this._prerender(o,!0,this._ignoreFontWeight());const mt="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",Mt=this.text.toString().replace(/\r/g,"").split(/\n/);let Ut,xt=!0,bt=0,lt=0,ct=0;C.__(Mt,(_t,Jt)=>{let $t;for($t=""==_t?[{type:"value",text:""}]:S.g.chunk(_t,!1,this.style.ignoreFormatting);$t.length>0;){let Bt={offsetY:ct,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]};const qt=this._measureText(mt,d);Bt.height=qt.actualBoundingBoxAscent+qt.actualBoundingBoxDescent,Bt.ascent=qt.actualBoundingBoxAscent;let ne,Me,_e,si,fe=this.style.textDecoration,ve=!1,Te=!0,Ce=[];C.FY($t,(Ee,Ei)=>{if("format"==Ee.type)if("[/]"==Ee.text)xt||(d.restore(),D.restore(),xt=!0),Me=void 0,Ut=void 0,_e=void 0,fe=this.style.textDecoration,si=void 0,ne=Ee.text;else{xt||(d.restore(),D.restore());let be=S.g.getTextStyle(Ee.text);const Ge=this._getFontStyle(be);d.save(),D.save(),d.font=Ge,Ut=Ge,ne=Ee.text,be.textDecoration&&(fe=be.textDecoration),be.fill&&(Me=be.fill),be.width&&(_e=W.Ro(be.width)),be.verticalAlign&&(si=be.verticalAlign),xt=!1;const Ze=this._measureText(mt,d),ei=Ze.actualBoundingBoxAscent+Ze.actualBoundingBoxDescent;ei>Bt.height&&(Bt.height=ei),Ze.actualBoundingBoxAscent>Bt.ascent&&(Bt.ascent=Ze.actualBoundingBoxAscent)}else if("value"==Ee.type&&!ve){const be=this._measureText(Ee.text,d);let Ge=be.actualBoundingBoxLeft+be.actualBoundingBoxRight;if(K){this.truncated=void 0;let Je=Te||this.style.breakWords||!1;const qe=this.style.ellipsis||"",$i=this._measureText(qe,d);Bt.width+Ge>H&&(Ee.text=this._truncateText(d,Ee.text,H-Bt.width-($i.actualBoundingBoxLeft+$i.actualBoundingBoxRight),Je),Ee.text+=qe,ve=!0,this.truncated=!0)}else if(st&&Bt.width+Ge>H){const qe=this._truncateText(d,Ee.text,H-Bt.width,!1,Te&&"wrap-no-break"!=this.style.oversizedBehavior);if(""==qe)return this.textVisible=!0,!1;Ce=$t.slice(Ei+1),w.Bq(qe)!=w.Bq(Ee.text)&&(Ce.unshift({type:"value",text:Ee.text.substr(qe.length)}),ne&&Ce.unshift({type:"format",text:ne})),Ee.text=w.Bq(qe),$t=[],ve=!0}let Ze=1,ei=1;if(Ut&&_e&&_e>Ge){const Je=Ge/_e;switch(this.style.textAlign){case"right":case"end":Ze=Je;break;case"center":Ze=Je,ei=Je;break;default:ei=Je}Ge=_e}const li=be.actualBoundingBoxAscent+be.actualBoundingBoxDescent;li>Bt.height&&(Bt.height=li),be.actualBoundingBoxAscent>Bt.ascent&&(Bt.ascent=be.actualBoundingBoxAscent),Bt.width+=Ge,Bt.left+=be.actualBoundingBoxLeft/Ze,Bt.right+=be.actualBoundingBoxRight/ei,Bt.textChunks.push({style:Ut,fill:Me,text:Ee.text,width:Ge,height:li,left:be.actualBoundingBoxLeft,right:be.actualBoundingBoxRight,ascent:be.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:fe,verticalAlign:si}),Te=!1}return!0}),this.style.lineHeight instanceof yt.QE?(Bt.height*=this.style.lineHeight.value,Bt.ascent*=this.style.lineHeight.value):(Bt.height*=this.style.lineHeight||1.2,Bt.ascent*=this.style.lineHeight||1.2),bt<Bt.left&&(bt=Bt.left),lt<Bt.right&&(lt=Bt.right),this._textInfo.push(Bt),ct+=Bt.height,$t=Ce||[]}}),xt||(d.restore(),D.restore()),C.__(this._textInfo,(_t,Jt)=>{let $t=0;C.__(_t.textChunks,Bt=>
1{if(Bt.offsetX=$t+Bt.left-_t.left,Bt.offsetY+=_t.height-_t.height*(this.style.baselineRatio||.19),$t+=Bt.width*(k?-1:1),Bt.verticalAlign)switch(Bt.verticalAlign){case"super":Bt.offsetY-=_t.height/2-Bt.height/2;break;case"sub":Bt.offsetY+=Bt.height/2}})});const ht={left:k?-lt:-bt,top:0,right:k?bt:lt,bottom:ct};if("none"!==B){const _t=this._fitRatio(ht);if(_t<1)if("fit"==B)W.Et(this.style.minScale)&&_t<this.style.minScale?(this.textVisible=!1,ht.left=0,ht.top=0,ht.right=0,ht.bottom=0):(this._originalScale||(this._originalScale=this.scale),this.scale=_t,this.textVisible=!0);else if("hide"==B)this.textVisible=!1,ht.left=0,ht.top=0,ht.right=0,ht.bottom=0;else{switch(this.style.textAlign){case"right":case"end":ht.left=k?H:-H,ht.right=0;break;case"center":ht.left=-H/2,ht.right=H/2;break;default:ht.left=0,ht.right=k?-H:H}this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}else this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}return d.restore(),D.restore(),ht}_fitRatio(o){const d=this.style.maxWidth,D=this.style.maxHeight;return W.Et(d)||W.Et(D)?Math.min(d/(o.right-o.left)||1,D/(o.bottom-o.top)||1):1}_truncateText(o,d,D,k=!1,B=!0){let H;do{if(k)d=d.slice(0,-1);else{let st=d.replace(/[^,;:!?\\\/\s\u200b]+[,;:!?\\\/\s\u200b]*$/g,"");if(""!=st&&st!==d||!B){if(""==st)return d;d=st}else k=!0}const K=this._measureText(d,o);H=K.actualBoundingBoxLeft+K.actualBoundingBoxRight}while(H>D&&""!=d);return d}_measureText(o,d){let D=d.measureText(o),k={};if(null==D.actualBoundingBoxAscent){const H=document.createElement("div");H.innerText=o,H.style.visibility="hidden",H.style.position="absolute",H.style.top="-1000000px;",H.style.fontFamily=this.style.fontFamily||"",H.style.fontSize=this.style.fontSize+"",document.body.appendChild(H);const K=H.getBoundingClientRect();document.body.removeChild(H);const st=K.height,mt=D.width;k={actualBoundingBoxAscent:st,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:mt,fontBoundingBoxAscent:st,fontBoundingBoxDescent:0,width:mt}}else k={actualBoundingBoxAscent:D.actualBoundingBoxAscent,actualBoundingBoxDescent:D.actualBoundingBoxDescent,actualBoundingBoxLeft:D.actualBoundingBoxLeft,actualBoundingBoxRight:D.actualBoundingBoxRight,fontBoundingBoxAscent:D.actualBoundingBoxAscent,fontBoundingBoxDescent:D.actualBoundingBoxDescent,width:D.width};const B=D.width;switch(this.style.textAlign){case"right":case"end":k.actualBoundingBoxLeft=B,k.actualBoundingBoxRight=0;break;case"center":k.actualBoundingBoxLeft=B/2,k.actualBoundingBoxRight=B/2;break;default:k.actualBoundingBoxLeft=0,k.actualBoundingBoxRight=B}return k}}class xs{constructor(){this.lineHeight=(0,yt.KN)(120),this.baselineRatio=.19,this.oversizedBehavior="none",this.breakWords=!1,this.ellipsis="\u2026",this.ignoreFormatting=!1}}class bs extends Xi{constructor(){super(...arguments),this.textType="circular",this.inside=!1,this.orientation="auto",this.kerning=0,this._textReversed=!1}_render(o,d=0){"circular"===this.textType?this._renderCircular(o,d):super._render(o,d)}_renderCircular(o,d=0){if(this.textVisible){this._prerender(o);const D=this._isInteractive(o),k=o.layer.context,B=o.layer.dirty,H=this._renderer._ghostLayer.context;k.save(),D&&H.save(),this._textInfo||this._measure(o);let K=this.radius||0,st=this.startAngle||0,mt=0,Mt=this.orientation,xt="auto"==Mt?"auto":"inward"==Mt;const bt=this.inside,lt=this.style.textAlign||"left",ct=this.kerning||0;let Ut="left"==lt?1:-1;const ht=!this._textReversed,_t=this._ghostOnly(d),Jt=this._drawGhost(o,d);if("auto"==xt){let $t=0,Bt=0;C.__(this._textInfo,(qt,he)=>{const ne=st+qt.width/(K-qt.height)/2*-Ut;ne>$t&&($t=ne)}),Bt="left"==lt?($t+mt/2)*pt.iR:"right"==lt?($t-mt/2)*pt.iR:st*pt.iR,Bt=pt.n0(Bt),xt=Bt>=270||Bt<=90}1==xt&&ht&&(this._textInfo.reverse(),this._textReversed=!0),C.__(this._textInfo,($t,Bt)=>{const qt=$t.height;bt||(K+=qt),(-1==Ut&&xt||1==Ut&&!xt)&&ht&&$t.textChunks.reverse();let he=st;mt=0,"center"==lt&&(he+=$t.width/(K-qt)/2*-Ut,mt=he-st),he+=Math.PI*(xt?0:1),k.save(),D&&H.save(),_t||k.rotate(he),D&&H.rotate(he);let ne=0;C.__($t.textChunks,(fe,Me)=>{const _e=fe.text,ve=fe.width;ne=ve/2/(K-qt)*Ut,_t||k.rotate(ne),D&&H.rotate(ne),fe.style&&(k.save(),H.save(),_t||(k.font=fe.style),D&&(H.font=fe.style)),fe.fill&&(k.save(),_t||(k.fillStyle=fe.fill.toCSS())),_t||(k.textBaseline="middle",k.textAlign="center"),D&&(H.textBaseline="middle",H.textAlign="center"),B&&!_t&&k.fillText(_e,0,(xt?1:-1)*(0-K+qt/2)),D&&Jt&&H.fillText(_e,0,(xt?1:-1)*(0-K+qt/2)),fe.fill&&k.restore(
1),fe.style&&(k.restore(),H.restore()),ne=(ve/2+ct)/(K-qt)*Ut,_t||k.rotate(ne),D&&H.rotate(ne)}),k.restore(),D&&H.restore(),bt&&(K-=qt)}),k.restore(),D&&H.restore()}}_measure(o){return"circular"===this.textType?this._measureCircular(o):super._measure(o)}_measureCircular(o){const d=o.layer.context,D=this._renderer._ghostLayer.context,k="rtl"==this.style.direction,B=this.style.oversizedBehavior,H=this.style.maxWidth,K=W.Et(H)&&"truncate"==B,st=this.style.ellipsis||"";let mt;this.textVisible=!0,this._textInfo=[],this._textReversed=!1,d.save(),D.save(),this._prerender(o,!0);const Mt=this.text.toString().replace(/\r/g,"").split(/\n/);let xt=!0,bt=0,lt=0;return C.__(Mt,(ct,Ut)=>{let Jt,$t,Bt,ht=S.g.chunk(ct,!1,this.style.ignoreFormatting),_t={offsetY:lt,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]};C.__(ht,(qt,he)=>{if("format"==qt.type){if("[/]"==qt.text)xt||(d.restore(),D.restore(),xt=!0),$t=void 0,Jt=void 0,Bt=void 0;else{let ne=S.g.getTextStyle(qt.text);const fe=this._getFontStyle(ne);d.save(),D.save(),d.font=fe,Jt=fe,ne.fill&&($t=ne.fill),ne.width&&(Bt=W.Ro(ne.width)),xt=!1}K&&(mt=this._measureText(st,d))}else if("value"==qt.type){let ne=qt.text.match(/./gu)||[];k&&(ne=w.SX(qt.text),ne.reverse());for(let fe=0;fe<ne.length;fe++){const Me=ne[fe],_e=this._measureText(Me,d);let ve=_e.width;Jt&&Bt&&Bt>ve&&(ve=Bt);const Te=_e.actualBoundingBoxAscent+_e.actualBoundingBoxDescent;if(Te>_t.height&&(_t.height=Te),_e.actualBoundingBoxAscent>_t.ascent&&(_t.ascent=_e.actualBoundingBoxAscent),bt+=ve,K){mt||(mt=this._measureText(st,d));const Ce=mt.actualBoundingBoxLeft+mt.actualBoundingBoxRight;if(bt+Ce>H){1==_t.textChunks.length?this.textVisible=!1:(_t.width+=Ce,_t.left+=mt.actualBoundingBoxLeft,_t.right+=mt.actualBoundingBoxRight,_t.textChunks.push({style:Jt,fill:$t,text:st,width:Ce,height:Te+mt.actualBoundingBoxDescent,left:mt.actualBoundingBoxLeft,right:mt.actualBoundingBoxRight,ascent:mt.actualBoundingBoxAscent,offsetX:0,offsetY:Te,textDecoration:void 0}));break}}_t.width+=ve,_t.left+=_e.actualBoundingBoxLeft,_t.right+=_e.actualBoundingBoxRight,_t.textChunks.push({style:Jt,fill:$t,text:Me,width:ve,height:Te+_e.actualBoundingBoxDescent,left:_e.actualBoundingBoxLeft,right:_e.actualBoundingBoxRight,ascent:_e.actualBoundingBoxAscent,offsetX:0,offsetY:Te,textDecoration:void 0})}}}),_t.height*=this.style.lineHeight instanceof yt.QE?this.style.lineHeight.value:this.style.lineHeight||1.2,this._textInfo.push(_t),lt+=_t.height}),xt||(d.restore(),D.restore()),"hide"==B&&bt>H&&(this.textVisible=!1),C.__(this._textInfo,ct=>{C.__(ct.textChunks,Ut=>{Ut.offsetY+=Math.round((ct.height-Ut.height+(ct.ascent-Ut.ascent))/2)})}),d.restore(),D.restore(),{left:0,top:0,right:0,bottom:0}}}class zi extends se{constructor(o,d){super(o),this.image=d}_dispose(){super._dispose(),this._imageMask&&Pe(this._imageMask)}getLocalBounds(){if(!this._localBounds){let o=0,d=0;this.width&&(o=this.width),this.height&&(d=this.height),this._localBounds={left:0,top:0,right:o,bottom:d},this._addBounds(this._localBounds)}return this._localBounds}_render(o,d=0){if(super._render(o),this.image){if(void 0===this.tainted&&(this.tainted=Be(this.image),o.layer.tainted=!0),this.tainted&&this._renderer._omitTainted)return;const D=this._ghostOnly(d),k=this._drawGhost(o,d);if(o.layer.dirty&&!D&&(this.shadowColor&&(o.layer.context.shadowColor=this.shadowColor.toCSS(this.shadowOpacity||1)),this.shadowBlur&&(o.layer.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(o.layer.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(o.layer.context.shadowOffsetY=this.shadowOffsetY),o.layer.context.drawImage(this.image,0,0,this.width||this.image.naturalWidth,this.height||this.image.naturalHeight)),this.interactive&&this._isInteractive(o)&&k){const B=this._getMask(this.image);this._renderer._ghostLayer.context.drawImage(B,0,0)}}}clear(){super.clear(),this.image=void 0,this._imageMask=void 0}
1_getMask(o){if(void 0===this._imageMask){const d=this.width||o.naturalWidth,D=this.height||o.naturalHeight,k=document.createElement("canvas");k.width=d,k.height=D;const B=k.getContext("2d");B.imageSmoothingEnabled=!1,B.fillStyle=this._getColorId(),B.fillRect(0,0,d,D),Be(o)||(B.globalCompositeOperation="destination-in",B.drawImage(o,0,0,d,D)),this._imageMask=k}return this._imageMask}}class Hi{constructor(o,d,D,k){this.event=o,this.originalPoint=d,this.point=D,this.bbox=k,this.simulated=!1,this.native=!0,this.id=w.xY("touchevents")&&o instanceof Touch?o.identifier:null}}class Ds extends f.JZ{constructor(o){if(super(),this.view=document.createElement("div"),this._layerDom=document.createElement("div"),this.layers=[],this._dirtyLayers=[],this.defaultLayer=this.getLayer(0),this._ghostLayer=new xi,this._deferredGhostLayers=[],this._patternCanvas=document.createElement("canvas"),this._patternContext=this._patternCanvas.getContext("2d"),this._realWidth=0,this._realHeight=0,this._calculatedWidth=0,this._calculatedHeight=0,this.interactionsEnabled=!0,this._listeners={},this._events={},this._colorId=0,this._colorMap={},this._forceInteractive=0,this._omitTainted=!1,this._hovering=new Set,this._dragging=[],this._mousedown=[],this.tapToActivate=!1,this.tapToActivateTimeout=3e3,this._touchActive=!1,this.resolution=null==o?window.devicePixelRatio:o,this.view.style.position="absolute",this.view.setAttribute("aria-hidden","true"),this.view.appendChild(this._layerDom),this._disposers.push(new f.W_(()=>{R.__(this._events,(d,D)=>{D.disposer.dispose()}),C.__(this.layers,d=>{Pe(d.view),d.exportableView&&Pe(d.exportableView)}),Pe(this._ghostLayer.view),Pe(this._patternCanvas)})),this._disposers.push(w.n_(()=>{null==o&&(this.resolution=window.devicePixelRatio)})),w.xY("touchevents")){const d=D=>{0!==this._dragging.length&&C.FY(this._dragging,k=>!k.value.shouldCancelTouch()||(D.preventDefault(),!1)),this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(w.q2(window,"touchstart",d,{passive:!1})),this._disposers.push(w.q2(this.view,"touchstart",d,{passive:!1})),this._disposers.push(w.q2(this.view,"touchmove",()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()},{passive:!0})),this._disposers.push(w.q2(window,"click",D=>{this._touchActive=!1},{passive:!0})),this._disposers.push(w.q2(this.view,"click",D=>{window.setTimeout(()=>{this._touchActive=!0,this._delayTouchDeactivate()},100)},{passive:!0}))}w.xY("wheelevents")&&this._disposers.push(w.q2(this.view,"wheel",d=>{let D=!1;this._hovering.forEach(k=>{if(k.wheelable)return D=!0,!1}),D&&d.preventDefault()},{passive:!1}))}resetImageArray(){this._ghostLayer.imageArray=void 0}_delayTouchDeactivate(){this._touchActiveTimeout&&clearTimeout(this._touchActiveTimeout),this.tapToActivateTimeout>0&&(this._touchActiveTimeout=window.setTimeout(()=>{this._touchActive=!1},this.tapToActivateTimeout))}get debugGhostView(){return!!this._ghostLayer.view.parentNode}set debugGhostView(o){o?this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(o,d,D,k){return this.defaultLayer.context.createLinearGradient(o,d,D,k)}createRadialGradient(o,d,D,k,B,H){return this.defaultLayer.context.createRadialGradient(o,d,D,k,B,H)}createPattern(o,d,D,k,B){return this._patternCanvas.width=k,this._patternCanvas.height=B,this._patternContext.clearRect(0,0,k,B),d.renderDetached(this._patternContext),o.renderDetached(this._patternContext),this._patternContext.createPattern(this._patternCanvas,D)}makeContainer(){return new le(this)}makeGraphics(){return new wi(this)}makeText(o,d){return new Xi(this,o,d)}makeTextStyle(){return new xs}makeRadialText(o,d){return new bs(this,o,d)}
1makePicture(o){return new zi(this,o)}resizeLayer(o){o.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resizeGhost(){this._ghostLayer.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resize(o,d,D,k){this._realWidth=o,this._realHeight=d,this._calculatedWidth=D,this._calculatedHeight=k,C.__(this.layers,B=>{B&&(B.dirty=!0,this.resizeLayer(B))}),this.resizeGhost(),this.view.style.width=D+"px",this.view.style.height=k+"px"}createDetachedLayer(o=!1){const d=document.createElement("canvas"),D=d.getContext("2d",{willReadFrequently:o}),k=new Ts(d,D);return d.style.position="absolute",d.style.top="0px",d.style.left="0px",k}getLayerByOrder(o){const d=this.layers,D=d.length;for(let k=0;k<D;k++){const B=d[k];if(B.order==o)return B}}getLayer(o,d=!0){let D=this.getLayerByOrder(o);if(D)return D;const k=this.createDetachedLayer(99==o);k.order=o,k.visible=d,k.view.className="am5-layer-"+o,k.visible&&this.resizeLayer(k);const B=this.layers;B.push(k),B.sort((mt,Mt)=>mt.order>Mt.order?1:mt.order<Mt.order?-1:0);const H=B.length;let st;for(let mt=C.qh(B,k)+1;mt<H;mt++)if(B[mt].visible){st=B[mt];break}return k.visible&&(void 0===st?this._layerDom.appendChild(k.view):this._layerDom.insertBefore(k.view,st.view)),k}render(o){this._dirtyLayers.length=0,this._deferredGhostLayers=[],C.__(this.layers,D=>{D&&D.dirty&&D.visible&&(this._dirtyLayers.push(D),D.clear())}),this._ghostLayer.clear(),o.render({inactive:null,layer:this.defaultLayer});const d=this._deferredGhostLayers;if(d.length&&(d.sort((D,k)=>D-k),C.__(d,D=>{o.render({inactive:null,layer:this.defaultLayer},D)})),this._ghostLayer.context.restore(),C.__(this.layers,D=>{if(D){const k=D.context;k.beginPath(),k.moveTo(0,0),k.stroke()}}),C.__(this._dirtyLayers,D=>{D.context.restore(),D.dirty=!1}),this._hovering.size&&this._lastPointerMoveEvent){const{events:D,target:k,native:B}=this._lastPointerMoveEvent;C.__(D,H=>{this._dispatchGlobalMousemove(H,k,B)})}}paintId(o){const d=function Ie(St){const o=[0,0,0];for(let d=0;d<24;d++)o[d%3]<<=1,o[d%3]|=1&St,St>>=1;return(0|o[0])+(o[1]<<8)+(o[2]<<16)}(++this._colorId),D=dt.Q1.fromHex(d).toCSS();return this._colorMap[D]=o,D}_removeObject(o){void 0!==o._colorId&&delete this._colorMap[o._colorId]}_adjustBoundingBox(o){const d=this._ghostLayer.margin;return new DOMRect(-d.left,-d.top,o.width+d.left+d.right,o.height+d.top+d.bottom)}getEvent(o,d=!0){const D=this.view.getBoundingClientRect(),k=o.clientX||0,B=o.clientY||0;return new Hi(o,{x:k-D.left,y:B-D.top},{x:this._calculatedWidth/this._realWidth*(k-(d?D.left:0)),y:this._calculatedHeight/this._realHeight*(B-(d?D.top:0))},this._adjustBoundingBox(D))}_getHitTarget(o,d,D){if(0===d.width||0===d.height||o.x<d.left||o.x>d.right||o.y<d.top||o.y>d.bottom||!D||!this._layerDom.contains(D))return;const k=this._ghostLayer.getImageData(o,d);if(0===k.data[0]&&0===k.data[1]&&0===k.data[2])return!1;const B=dt.Q1.fromRGB(k.data[0],k.data[1],k.data[2]).toCSS();return this._colorMap[B]}getObjectAtPoint(o){const d=this._ghostLayer.getImageArray(o);if(0===d[0]&&0===d[1]&&0===d[2])return;const D=dt.Q1.fromRGB(d[0],d[1],d[2]).toCSS();return this._colorMap[D]}_withEvents(o,d){const D=this._events[o];if(void 0!==D){D.dispatching=!0;try{d(D)}finally{D.dispatching=!1,D.cleanup&&(D.cleanup=!1,C.TW(D.callbacks,k=>!k.disposed),0===D.callbacks.length&&(D.disposer.dispose(),delete this._events[o]))}}}_dispatchEventAll(o,d){this.interactionsEnabled&&this._withEvents(o,D=>{C.__(D.callbacks,k=>{k.disposed||k.callback.call(k.context,d)})})}_dispatchEvent(o,d,D){if(!this.interactionsEnabled)return!1;let k=!1;return this._withEvents(o,B=>{C.__(B.callbacks,H=>{!H.disposed&&H.object===d&&(H.callback.call(H.context,D),k=!0)})}),k}_dispatchMousedown(o,d){const D=o.button;if(0!=D&&2!=D&&1!=D&&void 0!==D)return;const k=this.getEvent(o),B=this._getHitTarget(k.originalPoint,k.bbox,d);if(B){const H=k.id;let K=!1;ke(B,st=>{const mt={id:H,value:st};return this._mousedown.push(mt),!K&&this._dispatchEvent("pointerdown",st,k)&&(K=!0,this._dragging.some(xt=>xt.value===st&&xt.id===H)||this._dragging.push(mt)),!0})}}_dispatchGlobalMousemove(o,d,D){const k=this.getEvent(o),B=this._getHitTarget(k.originalPoint,k.bbox,d);k.native=D,B?(this._hovering.forEach(H=>{H.contains(B)||(this._hovering.delete(H),H.cursorOverStyle&&w.eC(document.body,"cursor",H._replacedCursorStyle),this._dispatchEvent("pointerout",H,k))}),k.native&&ke(B,H=>(this._hovering.has(H)||(this._hovering.add(H),H.cursorOverStyle&&(H._replacedCursorStyle=w.gd(document.body,"cursor"),w.eC(document.body,"cursor",H.cursorOverStyle)),this._dispatchEvent("pointerover",H,k)),!0))):(this._hovering.forEach(H=>{H.cursorOverStyle&&w.eC(document.body,"cursor",H._replacedCursorStyle),this._dispatchEvent("pointerout",H,k)}),this._hovering.clear()),this._dispatchEventAll("globalpointermove",k)}removeHovering(o){this._hovering.delete(o),o.cursorOverStyle&&w.eC(document.body,"cursor",o._replacedCursorStyle)}
1_dispatchGlobalMouseup(o,d){const D=this.getEvent(o);D.native=d,this._dispatchEventAll("globalpointerup",D)}_dispatchDragMove(o){if(0!==this._dragging.length){const d=this.getEvent(o),D=d.id;this._dragging.forEach(k=>{k.id===D&&this._dispatchEvent("pointermove",k.value,d)})}}_dispatchDragEnd(o,d){const D=o.button;let k;if(0==D||void 0===D)k="click";else if(2==D)k="rightclick";else{if(1!=D)return;k="middleclick"}const B=this.getEvent(o),H=B.id;if(0!==this._mousedown.length){const K=this._getHitTarget(B.originalPoint,B.bbox,d);K&&this._mousedown.forEach(st=>{st.id===H&&st.value.contains(K)&&this._dispatchEvent(k,st.value,B)}),this._mousedown.length=0}0!==this._dragging.length&&(this._dragging.forEach(K=>{K.id===H&&this._dispatchEvent("pointerup",K.value,B)}),this._dragging.length=0)}_dispatchDoubleClick(o,d){const D=this.getEvent(o),k=this._getHitTarget(D.originalPoint,D.bbox,d);k&&ke(k,B=>!this._dispatchEvent("dblclick",B,D))}_dispatchWheel(o,d){const D=this.getEvent(o),k=this._getHitTarget(D.originalPoint,D.bbox,d);k&&ke(k,B=>!this._dispatchEvent("wheel",B,D))}_makeSharedEvent(o,d){if(void 0===this._listeners[o]){const D=d();this._listeners[o]=new f.Wr(()=>{delete this._listeners[o],D.dispose()})}return this._listeners[o].increment()}_onPointerEvent(o,d){let D=!1,k=null;function B(){k=null,D=!1}return new f.ZT([new f.W_(()=>{null!==k&&clearTimeout(k),B()}),w.q2(this.view,w.wN(o),H=>{D=!0,null!==k&&clearTimeout(k),k=window.setTimeout(B,0)}),Fe(window,o,(H,K)=>{null!==k&&(clearTimeout(k),k=null),d(H,K,D),D=!1})])}_initEvent(o){switch(o){case"globalpointermove":case"pointerover":case"pointerout":return this._makeSharedEvent("pointermove",()=>{const d=(D,k,B)=>{this._lastPointerMoveEvent={events:D,target:k,native:B},C.__(D,H=>{this._dispatchGlobalMousemove(H,k,B)})};return new f.ZT([this._onPointerEvent("pointerdown",d),this._onPointerEvent("pointermove",d)])});case"globalpointerup":return this._makeSharedEvent("pointerup",()=>{const d=this._onPointerEvent("pointerup",(k,B,H)=>{C.__(k,K=>{this._dispatchGlobalMouseup(K,H)}),this._lastPointerMoveEvent={events:k,target:B,native:H}}),D=this._onPointerEvent("pointercancel",(k,B,H)=>{C.__(k,K=>{this._dispatchGlobalMouseup(K,H)}),this._lastPointerMoveEvent={events:k,target:B,native:H}});return new f.W_(()=>{d.dispose(),D.dispose()})});case"click":case"rightclick":case"middleclick":case"pointerdown":case"pointermove":case"pointerup":return this._makeSharedEvent("pointerdown",()=>{const d=this._onPointerEvent("pointerdown",(H,K)=>{C.__(H,st=>{this._dispatchMousedown(st,K)})}),D=this._onPointerEvent("pointermove",H=>{C.__(H,K=>{this._dispatchDragMove(K)})}),k=this._onPointerEvent("pointerup",(H,K)=>{C.__(H,st=>{this._dispatchDragEnd(st,K)})}),B=this._onPointerEvent("pointercancel",(H,K)=>{C.__(H,st=>{this._dispatchDragEnd(st,K)})});return new f.W_(()=>{d.dispose(),D.dispose(),k.dispose(),B.dispose()})});case"dblclick":return this._makeSharedEvent("dblclick",()=>this._onPointerEvent("dblclick",(d,D)=>{C.__(d,k=>{this._dispatchDoubleClick(k,D)})}));case"wheel":return this._makeSharedEvent("wheel",()=>w.q2(this.view,w.wN("wheel"),d=>{this._dispatchWheel(d,w.wt(d))},{passive:!1}))}}_addEvent(o,d,D,k){let B=this._events[d];void 0===B&&(B=this._events[d]={disposer:this._initEvent(d),callbacks:[],dispatching:!1,cleanup:!1});const H={object:o,context:k,callback:D,disposed:!1};return B.callbacks.push(H),new f.W_(()=>{H.disposed=!0,B.dispatching?B.cleanup=!0:(C.dm(B.callbacks,H),0===B.callbacks.length&&(B.disposer.dispose(),delete this._events[d]))})}getCanvas(o,d){this.render(o),d||(d={});let D=this.resolution,k=Math.floor(this._calculatedWidth*this.resolution),B=Math.floor(this._calculatedHeight*this.resolution);if(d.minWidth&&d.minWidth>k){let lt=d.minWidth/k;lt>D&&(D=lt*this.resolution)}if(d.minHeight&&d.minHeight>B){let lt=d.minHeight/B;lt>D&&(D=lt*this.resolution)}if(d.maxWidth&&d.maxWidth<k){let lt=d.maxWidth/k;lt<D&&(D=lt*this.resolution)}if(d.maxHeight&&d.maxHeight>B){let lt=d.maxHeight/B;lt<D&&(D=lt*this.resolution)}d.maintainPixelRatio&&(D/=this.resolution);const H=[];let K=!1;const st=document.createElement("canvas");D!=this.resolution&&(K=!0,k=k*D/this.resolution,B=B*D/this.resolution),st.width=k,st.height=B,st.style.position="fixed",st.style.top="-10000px",this.view.appendChild(st),H.push(st);const mt=st.getContext("2d");let Mt=0,xt=0,bt=!1;return C.__(this.layers,lt=>{if(lt&&lt.visible&&(lt.tainted||K)){bt=!0,lt.exportableView=lt.view,lt.exportableContext=lt.context,lt.view=document.createElement("canvas"),lt.view.style.position="fixed",lt.view.style.top="-10000px",this.view.appendChild(lt.view
1),H.push(lt.view);let ct=0,Ut=0;lt.margin&&(ct+=lt.margin.left||0+lt.margin.right||0,Ut+=lt.margin.top||0+lt.margin.bottom||0),lt.view.width=k+ct,lt.view.height=B+Ut,lt.context=lt.view.getContext("2d"),lt.dirty=!0,lt.scale=D}}),bt&&(this._omitTainted=!0,this.render(o),this._omitTainted=!1),C.__(this.layers,lt=>{if(lt&&lt.visible){let ct=0,Ut=0;lt.margin&&(ct=-(lt.margin.left||0)*this.resolution,Ut=-(lt.margin.top||0)*this.resolution),mt.drawImage(lt.view,ct,Ut),lt.exportableView&&(lt.view=lt.exportableView,lt.exportableView=void 0),lt.exportableContext&&(lt.context=lt.exportableContext,lt.exportableContext=void 0),Mt<lt.view.clientWidth&&(Mt=lt.view.clientWidth),xt<lt.view.clientHeight&&(xt=lt.view.clientHeight),lt.scale=void 0}}),st.style.width=Mt+"px",st.style.height=xt+"px",C.__(H,lt=>{lt.style.position="",lt.style.top="",this.view.removeChild(lt)}),st}}class xi{constructor(){this.margin={left:0,right:0,top:0,bottom:0},this._resolution=1,this._width=0,this._height=0,this.view=document.createElement("canvas"),this.context=this.view.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.context.imageSmoothingEnabled=!1,this.view.style.position="absolute",this.view.style.top="0px",this.view.style.left="0px"}resize(o,d,D,k,B){this._resolution=B,o+=this.margin.left+this.margin.right,d+=this.margin.top+this.margin.bottom,D+=this.margin.left+this.margin.right,k+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px",this._width=Math.floor(o*B),this._height=Math.floor(d*B),this.view.width=this._width,this.view.style.width=D+"px",this.view.height=this._height,this.view.style.height=k+"px"}getImageData(o,d){return this.context.getImageData(Math.round((o.x-d.left)/d.width*this._width),Math.round((o.y-d.top)/d.height*this._height),1,1)}getImageArray(o){this.imageArray||(this.imageArray=this.context.getImageData(0,0,this._width,this._height).data);const d=this.imageArray,D=Math.round(o.x*this._resolution),B=4*(Math.round(o.y*this._resolution)*this._width+D);return[d[B],d[B+1],d[B+2],d[B+3]]}setMargin(o){this.margin.left=0,this.margin.right=0,this.margin.top=0,this.margin.bottom=0,C.__(o,d=>{d.margin&&(this.margin.left=Math.max(this.margin.left,d.margin.left),this.margin.right=Math.max(this.margin.right,d.margin.right),this.margin.top=Math.max(this.margin.top,d.margin.top),this.margin.bottom=Math.max(this.margin.bottom,d.margin.bottom))})}clear(){this.context.save(),this.context.fillStyle="#000",this.context.fillRect(0,0,this._width,this._height)}}class Ts{constructor(o,d){this.tainted=!0,this.order=0,this.visible=!0,this.dirty=!0,this._width=0,this._height=0,this.view=o,this.context=d}resize(o,d,D,k,B){null!=this.width&&(o=this.width,D=this.width),null!=this.height&&(d=this.height,k=this.height),this.margin?(o+=this.margin.left+this.margin.right,d+=this.margin.top+this.margin.bottom,D+=this.margin.left+this.margin.right,k+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px"):(this.view.style.left="0px",this.view.style.top="0px"),this._width=Math.floor(o*B),this._height=Math.floor(d*B),this.view.width=this._width,this.view.style.width=D+"px",this.view.height=this._height,this.view.style.height=k+"px"}clear(){this.context.save(),this.context.clearRect(0,0,this._width,this._height)}}
1var He=y(43058),Qe=y(92489),Ps=y(28973),Gi=y(2711);function Ki(St,o){null==St?requestAnimationFrame(o):setTimeout(()=>{requestAnimationFrame(o)},1e3/St)}class Mi{constructor(o,d={},D){if(this._isDirty=!1,this._isDirtyParents=!1,this._isDirtyAnimation=!1,this._dirty={},this._dirtyParents={},this._dirtyBounds={},this._dirtyPositions={},this._ticker=null,this._tickers=[],this._updateTick=!0,this.skipRenderFrame=!1,this.events=new J.Q,this.animationTime=null,this._animations=[],this.language=tt.new(this,{}),this.locale=N,this.utc=!1,this.numberFormatter=j.new(this,{}),this.dateFormatter=it.new(this,{}),this.durationFormatter=gt.new(this,{}),this.tabindex=0,this._tabindexes=[],this._a11yD=!1,this._focusElementDirty=!1,this._skipNextGroupJump=!0,this.verticalLayout=Z.N.new(this,{}),this.horizontalLayout=P.b.new(this,{}),this.gridLayout=X.J.new(this,{}),this._paused=!1,this.autoResize=!0,this._fontHash=[],this._isDisposed=!1,this._disposers=[],this._tooltips=[],this._htmlEnabledContainers=[],this.entitiesById={},!D)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");let k,B;if(this._settings=d,0==d.accessible&&(this._a11yD=!0),null==d.useSafeResolution&&(d.useSafeResolution=!0),d.useSafeResolution&&(k=w.U3()),this._renderer=new Ds(k),B=o instanceof HTMLElement?o:document.getElementById(o),C.__(Qe.u5.rootElements,st=>{if(st.dom===B){if(!Qe.u5.autoDispose)throw new Error("You cannot have multiple Roots on the same DOM node");st.dispose()}}),this.interfaceColors=g.new(this,{}),null===B)throw new Error("Could not find HTML element with id `"+o+"`");this.dom=B;let H=document.createElement("div");H.style.position="relative",H.style.width="100%",H.style.height="100%",B.appendChild(H);const K=d.tooltipContainerBounds;K&&(this._tooltipContainerSettings=K),this._inner=H,this._updateComputedStyles(),Qe.u5.rootElements.push(this)}static new(o,d){const D=new Mi(o,d,!0);return D._init(),D}moveDOM(o){let d;if(d=o instanceof HTMLElement?o:document.getElementById(o),d){for(;this.dom.childNodes.length>0;)d.appendChild(this.dom.childNodes[0]);this.dom=d,this._initResizeSensor(),this.resize()}}_handleLogo(){this._logo&&(this.dom.offsetWidth<=150||this.dom.offsetHeight<=60?this._logo.hide():this._logo.show())}_showBranding(){if(!this._logo){const o=this.tooltipContainer.children.push(Y.m.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:(0,yt.KN)(100),centerY:yt.Q2,tooltipY:10,tooltipText:"Created using amCharts 5",tooltipX:yt.Q2,cursorOverStyle:"pointer",background:l.M.new(this,{fill:(0,dt.yW)(4671320),fillOpacity:0,tooltipY:5})}));o.set("tooltip",this.systemTooltip),o.events.on("click",()=>{window.open("https://www.amcharts.com/","_blank")}),o.states.create("hover",{});
1const d=o.children.push(_.A.new(this,{stroke:(0,dt.yW)(13421772),strokeWidth:3,svgPath:"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6",dx:-50,strokeOpacity:0}));d.states.create("hover",{stroke:(0,dt.yW)(3976191)});const D=o.children.push(_.A.new(this,{stroke:(0,dt.yW)(8947848),strokeWidth:3,svgPath:"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0",dx:50,strokeOpacity:0})),k=Gi.FD(Gi.tA),B=1500;o.setTimeout(()=>{D.animate({key:"strokeOpacity",to:1,duration:B,easing:k}),D.animate({key:"dx",to:0,duration:B,easing:k}),d.animate({key:"dx",to:0,duration:B,easing:k}),d.animate({key:"strokeOpacity",to:1,duration:B,easing:k})},3e3),D.states.create("hover",{stroke:(0,dt.yW)(4671320)}),this._logo=o,this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(o){return this._settings.calculateSize?this._settings.calculateSize(o):{width:o.width,height:o.height}}_init(){const o=this._settings;!1!==o.accessible&&(o.focusable&&(this._inner.setAttribute("focusable","true"),this._inner.setAttribute("tabindex",this.tabindex+"")),o.ariaLabel&&this._inner.setAttribute("aria-label",o.ariaLabel),o.role&&this._inner.setAttribute("role",o.role));const d=this._renderer,D=this._getRealSize(),k=this._getCalculatedSize(D),B=Math.floor(k.width),H=Math.floor(k.height),K=Math.floor(D.width),st=Math.floor(D.height),mt=Y.m.new(this,{visible:!0,width:B,height:H});this._rootContainer=mt,this._rootContainer._defaultThemes.push(at.p.new(this));const Mt=mt.children.push(Y.m.new(this,{visible:!0,width:yt.Q2,height:yt.Q2}));this.container=Mt,d.resize(K,st,B,H),this._inner.appendChild(d.view),this._initResizeSensor();const xt=document.createElement("div");if(this._htmlElementContainer=xt,xt.className="am5-html-container",xt.style.position="absolute",xt.style.pointerEvents="none",this._tooltipContainerSettings||(xt.style.overflow="hidden"),this._inner.appendChild(xt),!0!==this._a11yD){const bt=document.createElement("div");bt.className="am5-reader-container",bt.setAttribute("role","alert"),bt.style.position="absolute",bt.style.width="1px",bt.style.height="1px",bt.style.overflow="hidden",bt.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=bt,this._inner.appendChild(this._readerAlertElement);const lt=document.createElement("div");lt.className="am5-focus-container",lt.style.position="absolute",lt.style.pointerEvents="none",lt.style.top="0px",lt.style.left="0px",lt.style.overflow="hidden",lt.style.width=B+"px",lt.style.height=H+"px",lt.setAttribute("role","graphics-document"),w.Dt(lt,!1),this._focusElementContainer=lt,this._inner.appendChild(this._focusElementContainer);const ct=document.createElement("div");this._tooltipElementContainer=ct,ct.className="am5-tooltip-container",this._inner.appendChild(ct),w.xY("keyboardevents")&&(this._disposers.push(w.q2(window,"keydown",Ut=>{const ht=w.K(Ut);"Shift"==ht?this._isShift=!0:"Tab"==ht&&(this._isShift=Ut.shiftKey)})),this._disposers.push(w.q2(window,"keyup",Ut=>{"Shift"==w.K(Ut)&&(this._isShift=!1)})),this._disposers.push(w.q2(lt,"click",()=>{const Ut=this._focusedSprite;if(Ut){const ht=Ut.get("clickAnnounceText","");""!==ht&&this.readerAlert(ht);const _t=d.getEvent(new MouseEvent("click"));Ut.events.dispatch("click",{type:"click",originalEvent:_t.event,point:_t.point,simulated:!0,target:Ut})}})),this._disposers.push(w.q2(lt,"keydown",Ut=>{const ht=this._focusedSprite;if(ht){"Escape"==Ut.key&&(w.Ge(),this._focusedSprite=void 0);let _t=0,Jt=0;const $t=w.K(Ut);switch($t){case"Enter":case" ":const Bt=ht.get("clickAnnounceText","");if(""!==Bt&&this.readerAlert(Bt)," "==$t&&"checkbox"!=ht.get("role"))return;Ut.preventDefault();const qt=d.getEvent(new MouseEvent("mouse"));return void ht.events.dispatch("click",{type:"click",originalEvent:qt.event,point:qt.point,simulated:!0,target:ht});case"ArrowLeft":_t=-6;break;case"ArrowRight":_t=6;break;case"ArrowUp":Jt=-6;break;case"ArrowDown":Jt=6;break;default:return}if(0!=_t||0!=Jt){if(Ut.preventDefault(),!ht.isDragging()){this._keyboardDragPoint={x:0,y:0};const he=d.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0}));he.point={x:0,y:0},ht.events.isEnabled("pointerdown")&&ht.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:he.event,point:he.point,simulated:!0,target:ht})}const Bt=this._keyboardDragPoint;Bt.x+=_t,Bt.y+=Jt;const qt=d.getEvent(new MouseEvent("mousemove",{clientX:Bt.x,clientY:Bt.y}),!1);ht.events.isEnabled("globalpointermove")&&ht.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:qt.event,point:qt.point,simulated:!0,target:ht})}}})),this._disposers.push(w.q2(lt,"keyup",Ut=>{if(this._focusedSprite){const ht=this._focusedSprite,_t=w.K(Ut);switch(_t){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":if(ht.isDragging()){const $t=this._keyboardDragPoint,Bt=d.getEvent(new MouseEvent("mouseup",{clientX:$t.x,clientY:$t.y}));return ht.events.isEnabled("globalpointerup")&&ht.events.dispatch("globalpointerup",{type:"globalpointerup",originalEvent:Bt.event,point:
1Bt.point,simulated:!0,target:ht}),void(this._keyboardDragPoint=void 0)}if(ht.get("focusableGroup")){const $t=ht.get("focusableGroup"),Bt=this._tabindexes.filter(ne=>!(ne.get("focusableGroup")!=$t||!1===ne.getPrivate("focusable")||!ne.isVisibleDeep()));let qt=Bt.indexOf(ht);const he=Bt.length-1;qt+="ArrowRight"==_t||"ArrowDown"==_t?1:-1,qt<0?qt=he:qt>he&&(qt=0),w.XC(Bt[qt].getPrivate("focusElement").dom)}break;case"Tab":const Jt=ht.get("focusableGroup");if(Jt&&this._isShift)return void(this._skipNextGroupJump||(this._focusNext(ht.getPrivate("focusElement").dom,-1,Jt),this._skipNextGroupJump=!0))}}})))}this._startTicker(),this.setThemes([]),this._addTooltip(),this._hasLicense()||this._showBranding()}get systemTooltip(){if(!this._systemTooltip){const o=p.m.new(this,{themeTags:["system"]});this._systemTooltip=o}return this._systemTooltip}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose(),this._resizeSensorDisposer=new c(this.dom,()=>{this.autoResize&&this.resize()}),this._disposers.push(this._resizeSensorDisposer)}resize(){const o=this._getRealSize(),d=this._getCalculatedSize(o),D=Math.floor(d.width),k=Math.floor(d.height);if(D>0&&k>0){const B=Math.floor(o.width),H=Math.floor(o.height),K=this._htmlElementContainer;if(K.style.width=D+"px",K.style.height=k+"px",!0!==this._a11yD){const mt=this._focusElementContainer;mt.style.width=D+"px",mt.style.height=k+"px"}this._renderer.resize(B,H,D,k);const st=this._rootContainer;st.setPrivate("width",D),st.setPrivate("height",k),this._render(),this._handleLogo()}}_render(){this.skipRenderFrame?this.skipRenderFrame=!1:(this._renderer.render(this._rootContainer._display),this._focusElementDirty&&(this._updateCurrentFocus(),this._focusElementDirty=!1))}_runTickers(o){C.__(this._tickers,d=>{d(o)})}_runAnimations(o){let d=0;return C.TW(this._animations,D=>{const k=D._runAnimation(o);return k!==L.oA.Stopped&&(k===L.oA.Playing&&++d,!0)}),this._isDirtyAnimation=!1,0===d}_runDirties(){let o={};for(;this._isDirtyParents;)this._isDirtyParents=!1,R.jO(this._dirtyParents).forEach(([H,K])=>{delete this._dirtyParents[H],K.isDisposed()||(o[K.uid]=K,K._prepareChildren())});R.jO(o).forEach(([H,K])=>{K._updateChildren()});const d=[];R.jO(this._dirty).forEach(([H,K])=>{K.isDisposed()?delete this._dirty[H]:(d.push(K),K._beforeChanged())}),d.forEach(H=>{H._changed(),delete this._dirty[H.uid],H._clearDirty()}),this._isDirty=!1;const D={},k=[];R.jO(this._dirtyBounds).forEach(([H,K])=>{delete this._dirtyBounds[H],K.isDisposed()||(D[K.uid]=K.depth(),k.push(K))}),this._positionHTMLElements(),k.sort((H,K)=>Ps.UD(D[K.uid],D[H.uid])),k.forEach(H=>{H._updateBounds()});const B=this._dirtyPositions;R.jO(B).forEach(([H,K])=>{delete B[H],K.isDisposed()||K._updatePosition()}),d.forEach(H=>{H._afterChanged()}),R.jO(o).forEach(([H,K])=>{K._childrenPrep=!1,K._childrenUpdt=!1})}_renderFrame(o){if(this._updateTick){this.events.isEnabled("framestarted")&&this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:o}),this._checkComputedStyles(),this._runTickers(o);const d=this._runAnimations(o);return this._runDirties(),this._render(),this._renderer.resetImageArray(),this._positionHTMLElements(),this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:o}),0===this._tickers.length&&d&&!this._isDirtyAnimation&&!this._isDirty}return!0}_runTicker(o,d){this.isDisposed()||(this.animationTime=o,this._renderFrame(o)?(this._ticker=null,this.animationTime=null):this._paused||d||Ki(this.fps,this._ticker))}_runTickerNow(o=1e4){if(!this.isDisposed()){const d=performance.now()+o;for(;;){const D=performance.now();if(D>=d){this.animationTime=null;break}if(this.animationTime=D,this._renderFrame(D)){this.animationTime=null;break}}}}_startTicker(){null===this._ticker&&(this.animationTime=null,this._ticker=o=>{this._runTicker(o)},Ki(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(o){this._updateTick=o,o&&this._startTicker()}_addDirtyEntity(o){this._isDirty=!0,void 0===this._dirty[o.uid]&&(this._dirty[o.uid]=o),this._startTicker()}_addDirtyParent(o){this._isDirty=!0,this._isDirtyParents=!0,void 0===this._dirtyParents[o.uid]&&(this._dirtyParents[o.uid]=o),this._startTicker()}_addDirtyBounds(o){this._isDirty=!0,void 0===this._dirtyBounds[o.uid]&&(this._dirtyBounds[o.uid]=o),this._startTicker()}_addDirtyPosition(o){this._isDirty=!0,void 0===this._dirtyPositions[o.uid]&&(this._dirtyPositions[o.uid]=o),this._startTicker()}_addAnimation(o){this._isDirtyAnimation=!0,-1===this._animations.indexOf(o)&&this._animations.push(o),this._startTicker()}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",()=>{this._isDirty=!0,this._startTicker()})}eachFrame(o){return this._tickers.push(o),this._startTicker(),new f.W_(()=>{C.dm(this._tickers,o)})}
1markDirtyGlobal(o){o||(o=this.container),o.walkChildren(d=>{d instanceof Y.m&&this.markDirtyGlobal(d),d.markDirty(),d.markDirtyBounds()})}width(){return Math.floor(this._getCalculatedSize(this._getRealSize()).width)}height(){return Math.floor(this._getCalculatedSize(this._getRealSize()).height)}dispose(){this._isDisposed||(this._isDisposed=!0,this._rootContainer.dispose(),this._renderer.dispose(),this.horizontalLayout.dispose(),this.verticalLayout.dispose(),this.interfaceColors.dispose(),C.__(this._disposers,o=>{o.dispose()}),this._inner&&w.Nz(this._inner),C.TF(Qe.u5.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(o){if(!0!==this._a11yD){const d=this._readerAlertElement;o=w.Kq(o),d.innerHTML==o&&(d.innerHTML=""),d.innerHTML=o}}setThemes(o){this._rootContainer.set("themes",o);const d=this.tooltipContainer;d&&d._applyThemes();const D=this.interfaceColors;D&&D._applyThemes()}_addTooltip(){if(!this.tooltipContainer){const o=this._tooltipContainerSettings,d=this._rootContainer.children.push(Y.m.new(this,{position:"absolute",isMeasured:!1,width:yt.Q2,height:yt.Q2,layer:o?35:30,layerMargin:o||void 0}));this.tooltipContainer=d;const D=p.m.new(this,{});this.container.set("tooltip",D),D.hide(0),this._tooltip=D}}_registerTabindexOrder(o){1!=this._a11yD&&(o.get("focusable")?C.JJ(this._tabindexes,o):C.TF(this._tabindexes,o),this._invalidateTabindexes())}_unregisterTabindexOrder(o){1!=this._a11yD&&(C.TF(this._tabindexes,o),this._invalidateTabindexes())}_invalidateTabindexes(){if(1==this._a11yD)return;this._tabindexes.sort((d,D)=>{const k=d.get("tabindexOrder",0),B=D.get("tabindexOrder",0);return k==B?0:k>B?1:-1});const o=[];C.__(this._tabindexes,(d,D)=>{d.getPrivate("focusElement")?this._moveFocusElement(D,d):this._makeFocusElement(D,d);const k=d.get("focusableGroup");k&&!1!==d.getPrivate("focusable")&&(-1!==o.indexOf(k)?d.getPrivate("focusElement").dom.setAttribute("tabindex","-1"):o.push(k))})}_updateCurrentFocus(){1!=this._a11yD&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(o,d){if(1==this._a11yD||(d||(d=o.getPrivate("focusElement").dom),!d))return;const D=o.get("role");D?d.setAttribute("role",D):d.removeAttribute("role");const k=o.get("ariaLabel");if(k){const Ut=(0,He.Iy)(o,k);d.setAttribute("aria-label",Ut)}else d.removeAttribute("aria-label");const B=o.get("ariaLive");B?d.setAttribute("aria-live",B):d.removeAttribute("aria-live");const H=o.get("ariaChecked");null!=H&&D&&-1!==["checkbox","option","radio","menuitemcheckbox","menuitemradio","treeitem"].indexOf(D)?d.setAttribute("aria-checked",H?"true":"false"):d.removeAttribute("aria-checked");const K=o.get("ariaCurrent");null!=K?d.setAttribute("aria-current",K):d.removeAttribute("aria-current");const st=o.get("ariaSelected");null!=st&&D&&-1!==["gridcell","option","row","tab","columnheader","rowheader","treeitem"].indexOf(D)?d.setAttribute("aria-selected",st?"true":"false"):d.removeAttribute("aria-selected"),o.get("ariaHidden")?d.setAttribute("aria-hidden","true"):d.removeAttribute("aria-hidden");const mt=o.get("ariaOrientation");mt?d.setAttribute("aria-orientation",mt):d.removeAttribute("aria-orientation");const Mt=o.get("ariaValueNow");Mt?d.setAttribute("aria-valuenow",Mt):d.removeAttribute("aria-valuenow");const xt=o.get("ariaValueMin");xt?d.setAttribute("aria-valuemin",xt):d.removeAttribute("aria-valuemin");const bt=o.get("ariaValueMax");bt?d.setAttribute("aria-valuemax",bt):d.removeAttribute("aria-valuemax");const lt=o.get("ariaValueText");lt?d.setAttribute("aria-valuetext",lt):d.removeAttribute("aria-valuetext");const ct=o.get("ariaControls");ct?d.setAttribute("aria-controls",ct):d.removeAttribute("aria-controls"),o.get("visible")&&0!==o.get("opacity")&&"tooltip"!=o.get("role")&&!o.isHidden()&&!1!==o.getPrivate("focusable")&&(o.height()||o.width())?("-1"!=d.getAttribute("tabindex")&&d.setAttribute("tabindex",""+this.tabindex),d.removeAttribute("aria-hidden")):(d.removeAttribute("tabindex"),d.setAttribute("aria-hidden","true"))}_makeFocusElement(o,d){if(d.getPrivate("focusElement")||1==this._a11yD)return;const D=document.createElement("div");"tooltip"!=d.get("role")&&(D.tabIndex=this.tabindex),D.style.position="absolute",w.Dt(D,!1);const k=[];d.setPrivate("focusElement",{dom:D,disposers:k}),this._decorateFocusElement(d),k.push(w.q2(D,"focus",B=>{this._handleFocus(B)})),k.push(w.q2(D,"blur",B=>
1{this._handleBlur(B)})),this._moveFocusElement(o,d)}_removeFocusElement(o){if(1==this._a11yD)return;C.TF(this._tabindexes,o);const d=o.getPrivate("focusElement");d&&(this._focusElementContainer.removeChild(d.dom),C.__(d.disposers,k=>{k.dispose()}))}_hideFocusElement(o){1!=this._a11yD&&(o.getPrivate("focusElement").dom.style.display="none")}_moveFocusElement(o,d){if(1==this._a11yD)return;const D=this._focusElementContainer,k=d.getPrivate("focusElement").dom;if(k===this._focusElementContainer.children[o])return;const B=this._focusElementContainer.children[o+1];B?D.insertBefore(k,B):D.append(k)}_positionFocusElement(o){if(1==this._a11yD||null==o)return;this._focusElementContainer.scrollTop=0;const d=o.globalBounds();let D=d.right==d.left?o.width():d.right-d.left,k=d.top==d.bottom?o.height():d.bottom-d.top;const B=void 0!==this._settings.focusPadding?this._settings.focusPadding:2;let H=d.left-B,K=d.top-B;D<0&&(H+=D,D=Math.abs(D)),k<0&&(K+=k,k=Math.abs(k));const st=o.getPrivate("focusElement").dom;st.style.top=K+"px",st.style.left=H+"px",st.style.width=D+2*B+"px",st.style.height=k+2*B+"px"}_getSpriteByFocusElement(o){let d;return C.FY(this._tabindexes,(D,k)=>D.getPrivate("focusElement").dom!==o||(d=D,!1)),d}_handleFocus(o){if(1==this._a11yD)return;const d=this._getSpriteByFocusElement(o.target);if(d){if(!d.isVisibleDeep())return void this._focusNext(o.target,this._isShift?-1:1);this._positionFocusElement(d),this._focusedSprite=d,d.events.isEnabled("focus")&&d.events.dispatch("focus",{type:"focus",originalEvent:o,target:d}),-1==d.getPrivate("focusElement").dom.tabIndex&&(this._skipNextGroupJump=!1)}}_focusNext(o,d,D){if(1==this._a11yD)return;const k=Array.from(document.querySelectorAll(["a[href]","area[href]","button:not([disabled])","details","input:not([disabled])","iframe:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contentEditable=""]','[contentEditable="true"]','[contentEditable="TRUE"]','[tabindex]:not([tabindex^="-"])'].join(",")));let B=k.indexOf(o)+d;B<0?B=k.length-1:B>=k.length&&(B=0);const H=k[B];if(D&&-1==d){const K=this._getSpriteByFocusElement(H);if(K&&K.get("focusableGroup")==D)return void this._focusNext(H,d)}H.focus()}_handleBlur(o){if(1==this._a11yD)return;const d=this._focusedSprite;d&&!d.isDisposed()&&d.events.isEnabled("blur")&&d.events.dispatch("blur",{type:"blur",originalEvent:o,target:d}),this._focusedSprite=void 0}updateTooltip(o){if(1==this._a11yD)return;const d=w.Kq(o._getText());let D=o.getPrivate("tooltipElement");"tooltip"==o.get("role")&&""!=d?(D||(D=this._makeTooltipElement(o)),D.innerHTML!=d&&(D.innerHTML=d),D.setAttribute("aria-hidden",o.isVisibleDeep()?"false":"true")):D&&(D.remove(),o.removePrivate("tooltipElement"))}_makeTooltipElement(o){const d=this._tooltipElementContainer,D=document.createElement("div");return D.style.position="absolute",D.style.width="1px",D.style.height="1px",D.style.overflow="hidden",D.style.clip="rect(1px, 1px, 1px, 1px)",w.Dt(D,!1),this._decorateFocusElement(o,D),d.append(D),o.setPrivate("tooltipElement",D),D}_removeTooltipElement(o){if(1==this._a11yD)return;const d=o.getPrivate("tooltipElement");if(d){const D=d.parentElement;D&&D.removeChild(d)}}_invalidateAccessibility(o){if(1==this._a11yD)return;this._focusElementDirty=!0;const d=o.getPrivate("focusElement");o.get("focusable")?d&&(this._decorateFocusElement(o),this._positionFocusElement(o)):d&&this._removeFocusElement(o)}focused(o){return this._focusedSprite===o}documentPointToRoot(o){const d=this._getRealSize(),D=this._getCalculatedSize(d);return{x:D.width/d.width*(o.x-d.left),y:D.height/d.height*(o.y-d.top)}}rootPointToDocument(o){const d=this._getRealSize(),D=this._getCalculatedSize(d);return{x:o.x/(D.width/d.width)+d.left,y:o.y/(D.height/d.height)+d.top}}addDisposer(o){return this._disposers.push(o),o}_updateComputedStyles(){const o=window.getComputedStyle(this.dom),d=this._fontHash,D=R.HP(o).flatMap(k=>{var B;return"string"==typeof k&&k.startsWith("font")?[null===(B=o[k])||void 0===B?void 0:B.toString()]:[]});if(d.length!==D.length)return this._fontHash=D,!0;for(let k=0;k<d.length;k++)if(d[k]!==D[k])return this._fontHash=D,!0;return!1}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(o){o instanceof Y.m?o.children.each(d=>{this._invalidateLabelBounds(d)}):o instanceof V.E&&o.markDirtyBounds()}_hasLicense(){for(let o=0;o<Qe.u5.licenses.length;o++)if(Qe.u5.licenses[o].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(o){this._renderer.debugGhostView=o}set tapToActivate(o){this._renderer.tapToActivate=o}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(o){this._renderer.tapToActivateTimeout=o}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(o){const d=this._htmlElementContainer,D=document.createElement("div");o.setPrivate("htmlElement",D);let B,H,k=!1;return o._walkParents(K=>{if(K.get("verticalScrollbar"))return k=!0,B=K,!1}),k&&(H=document.createElement("div"),o.setPrivate("htmlElementWrapper",H),o.setPrivate("wrapperContainer",B),H.style.position="absolute",H.style.overflow="hidden",H.style.boxSizing="border-box",H.style.top="0px",H.style.left="0px",H.style.width="100%",H.style.height="100%",B.events.on("boundschanged",()=>{this._positionHTMLElement(o)})),D.style.position="absolute",D.style.overflow="auto",D.style.boxSizing="border-box",w.Dt(D,o.get("interactive",!1)),o.events.isEnabled("click")&&(w.Dt(D,!0),this._disposers.push(w.q2(D,"click",K=>{const st=this._renderer.getEvent(K);o.events.dispatch("click",{type:"click",originalEvent:st.event,point:st.point,simulated:!1,target:o})}))),this._positionHTMLElement(o),k?(H.append(D),d.append(H)):d.append(D),C.JJ(this._htmlEnabledContainers,o),D}_positionHTMLElements(){C.__(this._htmlEnabledContainers,o=>{this._positionHTMLElement(o)})}_positionHTMLElement(o){const d=o.getPrivate("htmlElementWrapper");if(d){const k=o.getPrivate("wrapperContainer");if(k){const B=k.globalBounds();d.style.clipPath="rect("+B.top+"px "+B.right+"px "+B.bottom+"px "+B.left+"px)"}}const D=o.getPrivate("htmlElement");
1if(D){C.__(["paddingTop","paddingRight","paddingBottom","paddingLeft","minWidth","minHeight","maxWidth","maxHeight"],$t=>{const Bt=o.get($t);D.style[$t]=Bt?Bt+"px":""}),C.__(["fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration"],$t=>{const Bt=o.get($t);D.style[$t]=Bt?"fontSize"!=$t||W.Kg(Bt)?Bt+"":Bt+"px":""});const H=o.compositeScale()||1,K=o.compositeRotation()||0;D.style.transform="",D.style.transformOrigin="";const st=o.compositeOpacity();setTimeout(()=>{D.style.opacity=st+""},10);const mt=o.isVisibleDeep();mt&&(D.style.display="block");let Mt={x:o.x()+o.get("dx",0),y:o.y()+o.get("dy",0)};o.parent&&(Mt=o.parent.toGlobal(Mt)),D.style.top=Mt.y+"px",D.style.left=Mt.x+"px";const xt=o.get("width"),bt=o.get("height");let lt=0,ct=0;if(xt&&(lt=o.width()),bt&&(ct=o.height()),!xt||!bt){D.style.position="fixed",D.style.width="",D.style.height="";const $t=D.getBoundingClientRect();D.style.position="absolute",xt||(lt=$t.width),bt||(ct=$t.height);let Bt=lt/H,qt=ct/H,he=o.get("centerX",0),ne=o.get("centerY",0),fe=0,Me=0,_e=0,ve=0;he instanceof yt.QE?(fe=-he.value*Bt,Me=(1-he.value)*Bt):(fe=-he,Me=Bt-he),ne instanceof yt.QE?(_e=-ne.value*qt,ve=(1-ne.value)*qt):(_e=-ne,ve=qt-ne),o._localBounds={left:fe,right:Me,top:_e,bottom:ve};let Te=o._adjustedLocalBounds,Ce=o._display.getAdjustedBounds(o._localBounds);o._adjustedLocalBounds=Ce,(Te.left!==Ce.left||Te.right!==Ce.right||Te.top!==Ce.top||Te.bottom!==Ce.bottom)&&o.markDirtyBounds()}lt>0&&(D.style.minWidth=lt+"px"),ct>0&&(D.style.minHeight=ct+"px"),(!mt||0==st)&&(D.style.display="none");const Ut=o.get("centerX",0),ht=(0,yt._3)(Ut)?Ut.percent+"%":Ut+"px",_t=o.get("centerY",0),Jt=(0,yt._3)(_t)?_t.percent+"%":_t+"px";(Ut||_t)&&(D.style.transform="translate(-"+ht+", -"+Jt+")"+D.style.transform),1!=H&&(D.style.transform+="scale("+H+")"),0!=K&&(D.style.transform+=" rotate("+K+"deg)"),""!=D.style.transform&&(D.style.transformOrigin=ht+" "+Jt)}}_setHTMLContent(o,d){let D=o.getPrivate("htmlElement");D||(D=this._makeHTMLElement(o),this.autoResize||this.resize()),D.innerHTML!=d&&(D.innerHTML=d)}_removeHTMLContent(o){const d=o.getPrivate("htmlElementWrapper"),D=o.getPrivate("htmlElement");d?(this._htmlElementContainer.removeChild(d),o.removePrivate("htmlElement"),o.removePrivate("htmlElementWrapper"),o.removePrivate("wrapperContainer")):D&&(this._htmlElementContainer.removeChild(D),o.removePrivate("htmlElement"),o.removePrivate("wrapperContainer")),C.TF(this._htmlEnabledContainers,o)}}},96485(Gt,ut,y){y.d(ut,{S:()=>P});var L=y(79691),Y=y(28973),V=y(26864);class P{constructor(X,f){if(this._rules={},this._root=X,!f)throw new Error("You cannot use `new Class()`, instead use `Class.new()`")}static new(X){const f=new this(X,!0);return f.setupDefaultRules(),f}setupDefaultRules(){}_lookupRules(X){return this._rules[X]}ruleRaw(X,f=[]){let C=this._rules[X];C||(C=this._rules[X]=[]),f.sort(Y.UD);const{index:w,found:A}=V.IU(C,b=>{const m=Y.UD(b.tags.length,f.length);return 0===m?Y.HN(b.tags,f,Y.UD):m});if(A)return C[w].template;{const b=L.Bj.new({});return C.splice(w,0,{tags:f,template:b}),b}}rule(X,f=[]){return this.ruleRaw(X,f)}}},15953(Gt,ut,y){y.d(ut,{$:()=>P});var L=y(7659),Y=y(5983),V=y(19708);class P extends Y.m{_afterNew(){this._settings.themeTags=V.kE(this._settings.themeTags,["button"]),super._afterNew(),this._settings.background||this.set("background",L.T.new(this._root,{themeTags:V.kE(this._settings.themeTags,["background"])})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){const X=this._prevSettings.icon,f=this.get("icon");f!==X&&(this._disposeProperty("icon"),X&&X.dispose(),f&&this.children.push(f),this._prevSettings.icon=f)}if(this.isDirty("label")){const X=this._prevSettings.label,f=this.get("label");f!==X&&(this._disposeProperty("label"),X&&X.dispose(),f&&this.children.push(f),this._prevSettings.label=f)}}}P.className="Button",P.classNames=Y.m.classNames.concat([P.className])},35937(Gt,ut,y){y.d(ut,{j:()=>Y});var L=y(93863);class Y extends L.A{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_beforeChanged(){super._beforeChanged(),this.isDirty("radius")&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._display.drawCircle(0,0,Math.abs(this.get("radius",10)))}}
1Y.className="Circle",Y.classNames=L.A.classNames.concat([Y.className])},7781(Gt,ut,y){y.d(ut,{u:()=>A,s:()=>w});var L=y(31635),Y=y(55265),V=y(5983),P=y(34521);class Z extends P.B8{incrementRef(){}decrementRef(){}_onPush(m){this.processor&&this.processor.processRow(m),super._onPush(m)}_onInsertIndex(m,T){this.processor&&this.processor.processRow(T),super._onInsertIndex(m,T)}_onSetIndex(m,T,c){this.processor&&this.processor.processRow(c),super._onSetIndex(m,T,c)}}var f=y(26864),C=y(16202);class w extends Y.wB{constructor(m,T,c){super(c),this.dataContext=T,this.component=m,this._settings.visible=!0,this._checkDirty()}markDirty(){this.component.markDirtyValues(this)}_startAnimation(){this.component._root._addAnimation(this)}_animationTime(){return this.component._root.animationTime}_dispose(){this.component&&this.component.disposeDataItem(this),super._dispose()}show(m){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,m)}hide(m){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,m)}
1isHidden(){return!this.get("visible")}}class A extends V.m{constructor(){super(...arguments),this._data=new Z,this._dataItems=[],this._mainDataItems=this._dataItems,this.valueFields=[],this.fields=["id"],this._valuesDirty=!1,this._dataChanged=!1,this._dataGrouped=!1,this.inited=!1}set data(m){m.incrementRef(),this._data.decrementRef(),this._data=m}get data(){return this._data}_dispose(){super._dispose(),this._data.decrementRef()}_onDataClear(){}_afterNew(){super._afterNew(),this._data.incrementRef(),this._updateFields(),this._disposers.push(this.data.events.onAll(m=>{const T=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,"clear"===m.type)f.__(T,c=>{c.dispose()}),T.length=0,this._onDataClear();else if("push"===m.type){const c=new w(this,m.newValue,this._makeDataItem(m.newValue));T.push(c),this.processDataItem(c)}else if("setIndex"===m.type){const c=T[m.index],r=this._makeDataItem(m.newValue);c.bullets&&0==c.bullets.length&&(c.bullets=void 0),C.jO(r).forEach(([g,_])=>{c.get(g)!=_&&c.animate({key:g,to:_,duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})}),c.dataContext=m.newValue}else if("insertIndex"===m.type){const c=new w(this,m.newValue,this._makeDataItem(m.newValue));T.splice(m.index,0,c),this.processDataItem(c)}else if("removeIndex"===m.type)T[m.index].dispose(),T.splice(m.index,1);else{if("moveIndex"!==m.type)throw new Error("Unknown IStreamEvent type");{const c=T[m.oldIndex];T.splice(m.oldIndex,1),T.splice(m.newIndex,0,c)}}this._afterDataChange()}))}_postUpdateData(){}updateData(m){let T=0;f.__(m,(c,r)=>{const g=this.dataItems[r];if(g){const _=g.dataContext;_&&C.jO(c).forEach(([p,S])=>{_[p]=S});const l=this._makeDataItem(_);C.jO(l).forEach(([p,S])=>{var R;if(g.get(p)!=S){g.set(p,S);const W=null===(R=this._valueFieldsF[p])||void 0===R?void 0:R.workingKey;W&&g.set(W,S)}})}else this.data.push(c);T=r});for(let c=this.dataItems.length-1;c>T;c--){const r=this.dataItems[c];f.TF(this.dataItems,r),r.dispose()}this._postUpdateData()}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},f.__(this.valueFields,m=>{this.get(m+"Field")&&(this._valueFields.push(m),this._valueFieldsF[m]={fieldKey:m+"Field",workingKey:m+"Working"})})),this.fields&&(this._fields=[],this._fieldsF={},f.__(this.fields,m=>{this.get(m+"Field")&&(this._fields.push(m),this._fieldsF[m]=m+"Field")}))}get dataItems(){return this._dataItems}processDataItem(m){}_makeDataItem(m){const T={};return this._valueFields&&f.__(this._valueFields,c=>{const r=this.get(this._valueFieldsF[c].fieldKey);T[c]=m[r],T[this._valueFieldsF[c].workingKey]=T[c]}),this._fields&&f.__(this._fields,c=>{const r=this.get(this._fieldsF[c]);T[c]=m[r]}),T}makeDataItem(m,T){let c=new w(this,T,m);return this.processDataItem(c),c}
1pushDataItem(m,T){const c=this.makeDataItem(m,T);return this._mainDataItems.push(c),c}disposeDataItem(m){}showDataItem(m,T){return(0,L.sH)(this,void 0,void 0,function*(){m.set("visible",!0)})}hideDataItem(m,T){return(0,L.sH)(this,void 0,void 0,function*(){m.set("visible",!1)})}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){const m="datavalidated";this.events.isEnabled(m)&&this.events.dispatch(m,{type:m,target:this}),this._dataChanged=!1}if(this._valuesDirty){const m="valueschanged";this.events.isEnabled(m)&&this.events.dispatch(m,{type:m,target:this})}this.inited=!0}markDirtyValues(m){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}getDataItemById(m){return f.I6(this.dataItems,T=>T.get("id")==m)}}A.className="Component",A.classNames=V.m.classNames.concat([A.className])},5983(Gt,ut,y){y.d(ut,{m:()=>T});var L=y(34521),Y=y(26864);class V extends L.B8{constructor(r){super(),this._disposed=!1,this._container=r,this._events=this.events.onAll(g=>{if("clear"===g.type)Y.__(g.oldValues,_=>{this._onRemoved(_)});else if("push"===g.type)this._onInserted(g.newValue);else if("setIndex"===g.type)this._onRemoved(g.oldValue),this._onInserted(g.newValue,g.index);else if("insertIndex"===g.type)this._onInserted(g.newValue,g.index);else if("removeIndex"===g.type)this._onRemoved(g.oldValue);else{if("moveIndex"!==g.type)throw new Error("Unknown IListEvent type");this._onRemoved(g.value),this._onInserted(g.value,g.newIndex)}})}_onInserted(r,g){r._setParent(this._container,!0);const _=this._container._childrenDisplay;void 0===g?_.addChild(r._display):_.addChildAt(r._display,g)}_onRemoved(r){this._container._childrenDisplay.removeChild(r._display),this._container.markDirtyBounds(),this._container.markDirty()}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._events.dispose(),Y.__(this.values,r=>{r.dispose()}))}}var P=y(45760),Z=y(34908),X=y(28268),f=y(31243),C=y(49565),w=y(22223),A=y(43058),b=y(21653),m=y(19708);class T extends Z.k{constructor(){super(...arguments),this._display=this._root._renderer.makeContainer(),this._childrenDisplay=this._root._renderer.makeContainer(),this.children=new V(this),this._percentageSizeChildren=[],this._percentagePositionChildren=[],this._prevWidth=0,this._prevHeight=0,this._contentWidth=0,this._contentHeight=0,this._childrenPrep=!1,this._childrenUpdt=!1}_afterNew(){super._afterNew(),this._display.addChild(this._childrenDisplay)}_afterChanged(){super._afterChanged(),this._childrenPrep=!1,this._childrenUpdt=!1}_dispose(){Y.W$(this.allChildren(),r=>{r.dispose()}),this.getPrivate("htmlElement")&&this._root._removeHTMLContent(this),super._dispose()}_beforeChanged(){this._childrenPrep||this._prepareChildren(),this._childrenUpdt||this._updateChildren(),super._beforeChanged()}_changed(){if(super._changed(),this.isDirty("interactiveChildren")&&(this._display.interactiveChildren=this.get("interactiveChildren",!1)),this.isDirty("layout")&&(this._prevWidth=0,this._prevHeight=0,this.markDirtyBounds(),this._prevSettings.layout&&this.children.each(r=>{r.removePrivate("x"),r.removePrivate("y")})),(this.isDirty("paddingTop")||this.isDirty("paddingBottom")||this.isDirty("paddingLeft")||this.isDirty("paddingRight"))&&this.children.each(r=>{r.markDirtyPosition()}),this.isDirty("maskContent")){const r=this._childrenDisplay;let g=this._contentMask;this.get("maskContent")?g||(g=X.M.new(this._root,{x:-.5,y:-.5,width:this.width()+1,height:this.height()+1}),this._contentMask=g,r.addChildAt(g._display,0),r.mask=g._display):g&&(r.removeChild(g._display),r.mask=null,g.dispose(),this._contentMask=void 0)}}_updateSize(){super._updateSize(),Y.__(this._percentageSizeChildren,r=>{r._updateSize()}),Y.__(this._percentagePositionChildren,r=>{r.markDirtyPosition(),r._updateSize()}
1),this.updateBackground()}updateBackground(){const r=this.get("background");let g=this._localBounds;if(g&&!this.isHidden()){let _=g.left,l=g.top,p=g.right-_,S=g.bottom-l,R=this.get("maxWidth"),W=this.get("maxHeight");W&&S>W&&(S=W),R&&p>R&&(p=R);let j=this.width(),z=this.height();r&&(r.setAll({width:p,height:S,x:_,y:l}),this._display.interactive&&(r._display.interactive=!0));const U=this._contentMask;U&&U.setAll({width:j+1,height:z+1});const nt=this.get("verticalScrollbar");if(nt){nt.set("height",z),nt.set("x",j-nt.width()-nt.get("marginRight",0)),nt.set("end",nt.get("start",0)+z/this._contentHeight);const it=nt.get("background");it&&it.setAll({width:nt.width(),height:z});let gt=!0;this._contentHeight<=z&&(gt=!1),nt.setPrivate("visible",gt)}}}_applyThemes(r=!1){return!!super._applyThemes(r)&&(this.eachChildren(g=>{g._applyThemes(r)}),!0)}_applyState(r){super._applyState(r),this.get("setStateOnChildren")&&this.eachChildren(g=>{g.states.apply(r)})}_applyStateAnimated(r,g){super._applyStateAnimated(r,g),this.get("setStateOnChildren")&&this.eachChildren(_=>{_.states.applyAnimate(r,g)})}innerWidth(){return this.width()-this.get("paddingRight",0)-this.get("paddingLeft",0)}innerHeight(){return this.height()-this.get("paddingTop",0)-this.get("paddingBottom",0)}_getBounds(){if(this.get("html")){let r=this._localBounds;r&&(this._contentWidth=r.right-r.left,this._contentHeight=r.bottom-r.top)}else{let r=this.get("width"),g=this.get("height"),_=this.getPrivate("width"),l=this.getPrivate("height"),p={left:0,top:0,right:this.width(),bottom:this.height()},S=this.get("layout"),R=!1,W=!1;if((S instanceof f.b||S instanceof w.J)&&(R=!0),S instanceof C.N&&(W=!0),null==r&&null==_||null==g&&null==l||this.get("verticalScrollbar")){let j=Number.MAX_VALUE,z=j,U=-j,nt=j,it=-j;const gt=this.get("paddingLeft",0),N=this.get("paddingTop",0),tt=this.get("paddingRight",0),J=this.get("paddingBottom",0);this.children.each(dt=>{if("absolute"!=dt.get("position")&&dt.get("isMeasured")){let Dt=dt.adjustedLocalBounds(),yt=dt.x(),pt=dt.y(),Pt=yt+Dt.left,Rt=yt+Dt.right,Tt=pt+Dt.top,Ct=pt+Dt.bottom;R&&(Pt-=dt.get("marginLeft",0),Rt+=dt.get("marginRight",0)),W&&(Tt-=dt.get("marginTop",0),Ct+=dt.get("marginBottom",0)),Pt<z&&(z=Pt),Rt>U&&(U=Rt),Tt<nt&&(nt=Tt),Ct>it&&(it=Ct)}}),z==j&&(z=0),U==-j&&(U=0),nt==j&&(nt=0),it==-j&&(it=0),p.left=z-gt,p.top=nt-N,p.right=U+tt,p.bottom=it+J;const at=this.get("minWidth");b.Et(at)&&at>0&&p.right-p.left<at&&(p.right>=at?p.left=p.right-at:p.right=p.left+at);const vt=this.get("minHeight");b.Et(vt)&&vt>0&&p.bottom-p.top<vt&&(p.bottom>=vt?p.top=p.bottom-vt:p.bottom=p.top+vt)}this._contentWidth=p.right-p.left,this._contentHeight=p.bottom-p.top,b.Et(r)&&(p.left=0,p.right=r),b.Et(_)&&(p.left=0,p.right=_),b.Et(g)&&(p.top=0,p.bottom=g),b.Et(l)&&(p.top=0,p.bottom=l),this._localBounds=p}}_updateBounds(){const r=this.get("layout");r&&r.updateContainer(this),super._updateBounds(),this.updateBackgroun
1d()}markDirty(){super.markDirty(),this._root._addDirtyParent(this)}_prepareChildren(){this._childrenPrep=!0;const r=this.innerWidth(),g=this.innerHeight();if(r!=this._prevWidth||g!=this._prevHeight){let _=this.get("layout"),l=!1,p=!1;_&&((_ instanceof f.b||_ instanceof w.J)&&(l=!0),_ instanceof C.N&&(p=!0)),Y.__(this._percentageSizeChildren,S=>{if(!l){let R=S.get("width");R instanceof P.QE&&S.setPrivate("width",R.value*r)}if(!p){let R=S.get("height");R instanceof P.QE&&S.setPrivate("height",R.value*g)}}),Y.__(this._percentagePositionChildren,S=>{S.markDirtyPosition(),S.markDirtyBounds()}),this._prevWidth=r,this._prevHeight=g,this._sizeDirty=!0,this.updateBackground()}}_updateHTMLContent(){const r=this.get("html","");r&&""!==r?this._root._setHTMLContent(this,(0,A.Iy)(this,r)):this._root._removeHTMLContent(this),this._root._positionHTMLElement(this)}scrollToChild(r){const g=this.get("verticalScrollbar");if(g){let _=r.y(),l=this.innerHeight(),p=r.height(),S=this._contentHeight;if(_+.7*p+this._childrenDisplay.y>l||_-.3*p+this._childrenDisplay.y<0){let W=Math.max(0,Math.min(1-(l-p/2)/S,(_-p/2)/S));g.animate({key:"start",to:W,duration:g.get("animationDuration",0),easing:g.get("animationEasing")})}}}_updateChildren(){if(this._childrenUpdt=!0,this.isDirty("html")&&this._updateHTMLContent(),this.isDirty("verticalScrollbar")){const r=this.get("verticalScrollbar");
1if(r){r._setParent(this),r.startGrip.setPrivate("visible",!1),r.endGrip.setPrivate("visible",!1),this.set("maskContent",!0),this.set("paddingRight",r.width()+r.get("marginRight",0)+r.get("marginLeft",0));let g=this.get("background");g||(g=this.set("background",X.M.new(this._root,{themeTags:["background"],fillOpacity:0,fill:this._root.interfaceColors.get("alternativeBackground")}))),this._vsbd0=this.events.on("wheel",_=>{const l=_.originalEvent;if(!m.ay(l,this))return;l.preventDefault();let p=l.deltaY/5e3;const S=r.get("start",0),R=r.get("end",1);S+p<=0&&(p=-S),R+p>=1&&(p=1-R),S+p>=0&&R+p<=1&&(r.set("start",S+p),r.set("end",R+p))}),this._disposers.push(this._vsbd0),this._vsbd1=r.events.on("rangechanged",()=>{let _=this._contentHeight;const l=this._childrenDisplay,p=this._contentMask;l.y=-r.get("start",0)*_,l.markDirtyLayer(),p&&(p._display.y=-l.y,l.mask=p._display)}),this._disposers.push(this._vsbd1),this._display.addChild(r._display)}else{const g=this._prevSettings.verticalScrollbar;g&&(this._display.removeChild(g._display),this._vsbd0&&this._vsbd0.dispose(),this._vsbd1&&this._vsbd1.dispose(),this._childrenDisplay.y=0,this.setPrivate("height",void 0),this.set("maskContent",!1),this.set("paddingRight",void 0))}}if(this.isDirty("background")){const r=this._prevSettings.background;r&&this._display.removeChild(r._display);const g=this.get("background");g instanceof Z.k&&(g.set("isMeasured",!1),g._setParent(this),this._display.addChildAt(g._display,0))}if(this.isDirty("mask")){const r=this.get("mask"),g=this._prevSettings.mask;if(g&&(this._display.removeChild(g._display),g!=r&&g.dispose()),r){const _=r.parent;_&&_.children.removeValue(r),r._setParent(this),this._display.addChildAt(r._display,0),this._childrenDisplay.mask=r._display}}}_processTemplateField(){super._processTemplateField(),this.children.each(r=>{r._processTemplateField()})}walkChildren(r){this.children.each((g,_)=>{g instanceof T&&g.walkChildren(r),r(g,_)})}eachChildren(r){const g=this.get("background");g&&r(g);const _=this.get("verticalScrollbar");_&&r(_);const l=this.get("mask");l&&r(l),this.children.values.forEach(p=>{r(p)})}allChildren(){const r=[];return this.eachChildren(g=>{r.push(g)}),r}_setDataItem(r){const g=r!==this._dataItem;super._setDataItem(r);const _=this.get("html","");_&&""!==_&&g&&this._root._setHTMLContent(this,(0,A.Iy)(this,_))}contentWidth(){return this._contentWidth}contentHeight(){return this._contentHeight}}T.className="Container",T.classNames=Z.k.classNames.concat([T.className])},93863(Gt,ut,y){y.d(ut,{A:()=>w,o:()=>C});var L=y(55265);class Y extends L.wC{constructor(){super(...arguments),this._display=this._root._renderer.makeGraphics(),this._backgroundDisplay=this._root._renderer.makeGraphics(),this._clear=!1}_afterNew(){super._afterNewApplyThemes()}get pattern(){return this._pattern}_draw(){}_beforeChanged(){super._beforeChanged(),(this.isDirty("repetition")||this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation")||this.isDirty("strokeWidth")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("colorOpacity")||this.isDirty("fillOpacity"))&&(this._clear=!0),this._checkDirtyFill()}_checkDirtyFill(){(this.isDirty("color")||this.isDirty("fill"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){const b=this.get("repetition",""),m=this.get("width",100),T=this.get("height",100),c=this.get("fill"),r=this.get("fillOpacity",1),g=this._backgroundDisplay,_=this._display;_.clear(),g.clear(),c&&r>0&&(g.beginFill(c,r),g.drawRect(0,0,m,T),g.endFill()),_.angle=this.get("rotation",0),this._draw(),this._pattern=this._root._renderer.createPattern(_,g,b,m,T)}this._clear=!1}}Y.className="Pattern",Y.classNames=L.wC.classNames.concat([Y.className]);class V extends Y{_beforeChanged(){super._beforeChanged(),this._clear=!0,this.isDirty("src")&&this._load();const b=this.get("canvas");b&&(this.set("width",b.width),this.set("height",b.height))}_draw(){super._draw();const b=this.get("colorOpacity");void 0!==b&&(this._display.alpha=Math.max(0,b));const m=this._image;if(m){const c=this.get("width",100),r=this.get("height",100),g=this.get("fit","image");let _=0,l=0;"pattern"==g?(_=c,l=r,this.markDirty()):(_=m.width,l=m.height,"image"==g&&(this.set("width",_),this.set("height",l)));let S=0,R=0;this.get("centered",!0)&&(S=c/2-_/2,R=r/2-l/2),this._display.image(m,_,l,S,R)}const T=this.get("canvas");T&&this._display.image(T,T.width,T.height,0,0)}_load(){const b=this.get("src");if(b){const m=new Image;m.src=b,m.decode().then(()=>{this._image=m,this._draw(),this.events.isEnabled("loaded")&&this.events.dispatch("loaded",{type:"loaded",target:this})}).catch(T=>{})}}}
1V.className="PicturePattern",V.classNames=Y.classNames.concat([V.className]);var P=y(34908),Z=y(76479),X=y(21653),f=y(26864);const C=["fill","fillOpacity","stroke","strokeWidth","strokeOpacity","fillPattern","strokePattern","fillGradient","strokeGradient","strokeDasharray","strokeDashoffset","shadowBlur","shadowColor","shadowOpacity","shadowOffsetX","shadowOffsetY","blur","sepia","invert","brightness","hue","contrast","saturate"];class w extends P.k{constructor(){super(...arguments),this._display=this._root._renderer.makeGraphics(),this._clear=!1}_beforeChanged(){if(super._beforeChanged(),(this.isDirty("draw")||this.isDirty("svgPath"))&&this.markDirtyBounds(),(this.isDirty("fill")||this.isDirty("stroke")||this.isDirty("visible")||this.isDirty("forceHidden")||this.isDirty("scale")||this.isDirty("fillGradient")||this.isDirty("strokeGradient")||this.isDirty("fillPattern")||this.isDirty("strokePattern")||this.isDirty("fillOpacity")||this.isDirty("strokeOpacity")||this.isDirty("strokeWidth")||this.isDirty("draw")||this.isDirty("blendMode")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("svgPath")||this.isDirty("lineJoin")||this.isDirty("lineCap")||this.isDirty("shadowColor")||this.isDirty("shadowBlur")||this.isDirty("shadowOffsetX")||this.isDirty("shadowOffsetY"))&&(this._clear=!0),this._display.crisp=this.get("crisp",!1),this.isDirty("fillGradient")){const b=this.get("fillGradient");if(b){this._display.isMeasured=!0;const m=b.get("target");m&&(this._disposers.push(m.events.on("boundschanged",()=>{this._markDirtyKey("fill")})),this._disposers.push(m.events.on("positionchanged",()=>{this._markDirtyKey("fill")})))}}if(this.isDirty("strokeGradient")){const b=this.get("strokeGradient");if(b){this._display.isMeasured=!0;const m=b.get("target");m&&(this._disposers.push(m.events.on("boundschanged",()=>{this._markDirtyKey("stroke")})),this._disposers.push(m.events.on("positionchanged",()=>{this._markDirtyKey("stroke")})))}}}_changed(){if(super._changed(),this._clear){this.markDirtyBounds(),this.markDirtyLayer(),this._display.clear();let b=this.get("strokeDasharray");X.Et(b)&&(b=b<.5?[0]:[b]),this._display.setLineDash(b);const m=this.get("strokeDashoffset");m&&this._display.setLineDashOffset(m);const T=this.get("blendMode",Z.N.NORMAL);this._display.blendMode=T;const c=this.get("draw");c&&"function"==typeof c&&c(this._display,this);const r=this.get("svgPath");null!=r&&this._display.svgPath(r)}}_afterChanged(){if(super._afterChanged(),this._clear){const b=this.get("fill"),m=this.get("fillGradient"),T=this.get("fillPattern"),c=this.get("fillOpacity"),r=this.get("stroke"),g=this.get("strokeGradient"),_=this.get("strokePattern"),l=this.get("shadowColor"),p=this.get("shadowBlur"),S=this.get("shadowOffsetX"),R=this.get("shadowOffsetY"),W=this.get("shadowOpacity");if(l&&(p||S||R)&&this._display.shadow(l,p,S,R,W),b&&!m&&(this._display.beginFill(b,c),this._display.endFill()),m){if(b){const z=m.get("stops",[]);z.length&&f.__(z,U=>{(!U.color||U.colorInherited)&&b&&(U.color=b,U.colorInherited=!0),(null==U.opacity||U.opacityInherited)&&(U.opacity=c,U.opacityInherited=!0)})}const j=m.getFill(this);j&&(this._display.beginFill(j,c),this._display.endFill())}if(T){const j=T.pattern;j&&(this._display.beginFill(j,c),this._display.endFill(),T instanceof V&&T.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}if(r||g||_){const j=this.get("strokeOpacity");let z=this.get("strokeWidth",1);this.get("nonScalingStroke")&&(z/=this.get("scale",1)),this.get("crisp")&&(z/=this._root._renderer.resolution);const U=this.get("lineJoin"),nt=this.get("lineCap");if(r&&!g&&(this._display.lineStyle(z,r,j,U,nt),this._display.endStroke()),g){const it=g.get("stops",[]);it.length&&f.__(it,N=>{(!N.color||N.colorInherited)&&r&&(N.color=r,N.colorInherited=!0),(null==N.opacity||N.opacityInherited)&&(N.opacity=j,N.opacityInherited=!0)});
1const gt=g.getFill(this);gt&&(this._display.lineStyle(z,gt,j,U,nt),this._display.endStroke())}if(_){let it=_.pattern;it&&(this._display.lineStyle(z,it,j,U,nt),this._display.endStroke(),_ instanceof V&&_.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}}this.getPrivate("showingTooltip")&&this.showTooltip()}this._clear=!1}}w.className="Graphics",w.classNames=P.k.classNames.concat([w.className])},22223(Gt,ut,y){y.d(ut,{J:()=>P});var L=y(87127),Y=y(26864),V=y(30903);class P extends L.P{_afterNew(){this._setRawDefault("maxColumns",Number.MAX_VALUE),super._afterNew()}updateContainer(X){let f=X.get("paddingLeft",0),C=X.get("paddingRight",0),w=X.get("paddingTop",0),A=X.maxWidth()-f-C,b=A,m=1;(0,L.l)(X,p=>{if(p.get("visible")&&p.getPrivate("visible")&&!p.get("forceHidden")&&"absolute"!=p.get("position")){let S=p.width();S<b&&(b=S),S>m&&(m=S)}}),b=V.s_(b,1,A),m=V.s_(m,1,A);let T=1;T=this.get("fixedWidthGrid")?A/m:A/b,T=Math.max(1,Math.floor(T)),T=Math.min(this.get("maxColumns",Number.MAX_VALUE),T);let c=this.getColumnWidths(X,T,m,A),r=w,g=0,_=0;T=c.length;let l=f;(0,L.l)(X,p=>{if("relative"==p.get("position")&&p.isVisible()){const S=p.get("marginTop",0),R=p.get("marginBottom",0);let W=p.adjustedLocalBounds(),j=p.get("marginLeft",0),z=p.get("marginRight",0),nt=r+S-W.top;p.setPrivate("x",l+j-W.left),p.setPrivate("y",nt),l+=c[g]+z,_=Math.max(_,p.height()+S+R),g++,g>=T&&(g=0,l=f,r+=_,_=0)}})}getColumnWidths(X,f,C,w){let A=0,b=[],m=0;return(0,L.l)(X,T=>{let c=T.adjustedLocalBounds();"absolute"!=T.get("position")&&T.isVisible()&&(b[m]=this.get("fixedWidthGrid")?C:Math.max(0|b[m],c.right-c.left+T.get("marginLeft",0)+T.get("marginRight",0)),m<X.children.length-1&&(m++,m==f&&(m=0)))}),Y.__(b,T=>{A+=T}),A>w?f>2?this.getColumnWidths(X,f-=1,C,w):[w]:b}}P.className="GridLayout",P.classNames=L.P.classNames.concat([P.className])},31243(Gt,ut,y){y.d(ut,{b:()=>P});var L=y(87127),Y=y(21653),V=y(45760);class P extends L.P{updateContainer(X){let f=X.get("paddingLeft",0),C=X.innerWidth(),w=0;(0,L.l)(X,b=>{if(b.isVisible()&&"relative"==b.get("position")){let m=b.get("width");if(m instanceof V.QE){w+=m.value;let T=C*m.value,c=b.get("minWidth",b.getPrivate("minWidth",-1/0));c>T&&(C-=c,w-=m.value);let r=b.get("maxWidth",b.getPrivate("maxWidth",1/0));T>r&&(C-=r,w-=m.value)}else Y.Et(m)||(m=b.width()),C-=m+b.get("marginLeft",0)+b.get("marginRight",0)}}),(C<=0||C==1/0)&&(C=.1),(0,L.l)(X,b=>{if(b.isVisible()&&"relative"==b.get("position")){let m=b.get("width");if(m instanceof V.QE){let T=C*m.value/w-b.get("marginLeft",0)-b.get("marginRight",0),c=b.get("minWidth",b.getPrivate("minWidth",-1/0)),r=b.get("maxWidth",b.getPrivate("maxWidth",1/0));T=Math.min(Math.max(c,T),r),b.setPrivate("width",T)}else b._prevSettings.width instanceof V.QE&&b.setPrivate("width",void 0)}});let A=f;(0,L.l)(X,b=>{if("relative"==b.get("position"))if(b.isVisible()){let m=b.adjustedLocalBounds(),T=b.get("marginLeft",0),c=b.get("marginRight",0),r=b.get("maxWidth"),g=m.left,_=m.right;r&&_-g>r&&(_=g+r);let l=A+T-g;b.setPrivate("x",l),A=l+_+c}else b.setPrivate("x",void 0)})}}P.className="HorizontalLayout",P.classNames=L.P.classNames.concat([P.className])},88251(Gt,ut,y){y.d(ut,{J:()=>X});var L=y(52118),Y=y(45760),V=y(5983),P=y(26864),Z=y(21653);class X extends V.m{constructor(){super(...arguments),this._textKeys=["text","fill","fillGradient","fillOpacity","textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","populateText","role","ignoreFormatting","maxChars","ariaLabel"]}get text(){return this._text}_afterNew(){super._afterNew(),this._makeText(),P.__(this._textKeys,C=>{const w=this.get(C);null!=w&&this._text.set(C,w)}),""!==this.get("html","")&&this._text.set("text",""),this.onPrivate("maxWidth",()=>{this._setMaxDimentions()}),this.onPrivate("maxHeight",()=>{this._setMaxDimentions()})}_makeText(){this._text=this.children.push(L.E.new(this._root,{}))}_updateChildren(){super._updateChildren();const C=this._text;if(P.__(this._textKeys,A=>{this._text.set(A,this.get(A))}),(this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("rotation"))&&this._setMaxDimentions(),""!==this.get("html","")?C.set("text",""):(C.set("text",this.get("text")),this._maybeUpdateHTMLColor()),(this.isDirty("fill")||this.isDirty("fillGradient"))&&this._maybeUpdateHTMLColor(),this.isDirty("textAlign")||this.isDirty("width")){const A=this.get("textAlign");let b;null!=this.get("width")?b="right"==A?Y.Q2:"center"==A?Y.yP:0:"left"==A||"start"==A?b=this.get("paddingLeft",0):("right"==A||"end"==A)&&(b=-this.get("paddingRight",0)),C.set("x",b)}const w=this.get("background");w&&w.setPrivate("visible",C._display.textVisible)}_maybeUpdateHTMLColor(){const C=this.getPrivate("htmlElement");C&&this.get("fill")&&(C.style.color=this.get("fill").toCSSHex())}_setMaxDimentions(){const C=this.get("rotation"),w=90==C||270==C||-90==C,A=this._text,b=this.get("maxWidth",this.getPrivate("maxWidth",1/0));Z.Et(b)?A.set(w?"maxHeight":"maxWidth",b-this.get("paddingTop",0)-this.get("paddingBottom",0)):A.set(w?"maxHeight":"maxWidth",void 0);const m=this.get("maxHeight",this.getPrivate("maxHeight",1/0));Z.Et(m)?A.set(w?"maxWidth":"maxHeight",m-this.get("paddingLeft",0)-this.get("paddingRight",0)):A.set(w?"maxWidth":"maxHeight",void 0),this.root.events.once("frameended",()=>{A.markDirtyBounds()})}_setDataItem(C){super._setDataItem(C),this._markDirtyKey("text"),this._markDirtyKey("html");const w=this._text;w.get("populateText")&&w.markDirtyText();const A=this.get("html");A&&""!==A&&this._updateHTMLContent()}getText(){return this._text._getText()}getAccessibleText(){return this._text._getAccessibleText()}}
1X.className="Label",X.classNames=V.m.classNames.concat([X.className])},87127(Gt,ut,y){y.d(ut,{P:()=>V,l:()=>Y});var L=y(55265);function Y(P,Z){P.get("reverseChildren",!1)?P.children.eachReverse(Z):P.children.each(Z)}class V extends L.wC{}V.className="Layout",V.classNames=L.wC.classNames.concat([V.className])},59460(Gt,ut,y){y.d(ut,{s:()=>C});var L=y(97188),Y=y(5983),V=y(88251),P=y(7659),Z=y(79691),X=y(34521),f=y(19708);class C extends L.s{constructor(){super(...arguments),this.itemContainers=this.addDisposer(new X.TS(Z.Bj.new({}),()=>Y.m._new(this._root,{themeTags:f.kE(this.itemContainers.template.get("themeTags",[]),["legend","item"]),themeTagsSelf:f.kE(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"]),background:P.T.new(this._root,{themeTags:f.kE(this.itemContainers.template.get("themeTags",[]),["legend","item","background"]),themeTagsSelf:f.kE(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"])})},[this.itemContainers.template]))),this.markers=this.addDisposer(new X.TS(Z.Bj.new({}),()=>Y.m._new(this._root,{themeTags:f.kE(this.markers.template.get("themeTags",[]),["legend","marker"])},[this.markers.template]))),this.labels=this.addDisposer(new X.TS(Z.Bj.new({}),()=>V.J._new(this._root,{themeTags:f.kE(this.labels.template.get("themeTags",[]),["legend","label"])},[this.labels.template]))),this.valueLabels=this.addDisposer(new X.TS(Z.Bj.new({}),()=>V.J._new(this._root,{themeTags:f.kE(this.valueLabels.template.get("themeTags",[]),["legend","label","value"])},[this.valueLabels.template]))),this.markerRectangles=this.addDisposer(new X.TS(Z.Bj.new({}),()=>P.T._new(this._root,{themeTags:f.kE(this.markerRectangles.template.get("themeTags",[]),["legend","marker","rectangle"])},[this.markerRectangles.template])))}_afterNew(){this._settings.themeTags=f.kE(this._settings.themeTags,["legend"]),this.fields.push("name","stroke","fill"),super._afterNew()}makeItemContainer(A){const b=this.children.push(this.itemContainers.make());return b._setDataItem(A),this.itemContainers.push(b),b.states.create("disabled",{}),b}makeMarker(){const A=this.markers.make();return this.markers.push(A),A.states.create("disabled",{}),A}makeLabel(){const A=this.labels.make();return A.states.create("disabled",{}),A}makeValueLabel(){const A=this.valueLabels.make();return A.states.create("disabled",{}),A}makeMarkerRectangle(){const A=this.markerRectangles.make();return A.states.create("disabled",{}),A}processDataItem(A){super.processDataItem(A);const b=this.makeItemContainer(A),m=this.get("nameField"),T=this.get("fillField"),c=this.get("strokeField");if(b){const r=this.get("clickTarget","itemContainer"),g=A.dataContext;g&&g.set&&g.set("legendDataItem",A),b._setDataItem(A),A.set("itemContainer",b);const _=this.makeMarker();if(_){b.children.push(_),_._setDataItem(A),A.set("marker",_);const S=this.get("useDefaultMarker"),R=_.children.push(this.makeMarkerRectangle());let W=A.get("fill"),j=A.get("stroke");A.set("markerRectangle",R),g&&g.get&&(W=g.get(T,W),j=g.get(c,j)),j||(j=W),S?g.on&&(g.on(T,()=>{R.set("fill",g.get(T))}),g.on(c,()=>{R.set("stroke",g.get(c))})):g&&g.createLegendMarker&&g.createLegendMarker(),R.setAll({fill:W,stroke:j});const z=g.component;z&&z.updateLegendMarker&&z.updateLegendMarker(g)}const l=this.makeLabel();if(l){b.children.push(l),l._setDataItem(A),A.set("label",l),l.text.on("text",()=>{b.setRaw("ariaLabel",l.text._getText()+("none"!==this.get("clickTarget")?"; "+this._t("Press ENTER to toggle"):"")),b.markDirtyAccessibility()}),g&&g.get&&A.set("name",g.get(m));let S=A.get("name");S&&l.set("text",S)}const p=this.makeValueLabel();if(p&&(b.children.push(p),p._setDataItem(A),A.set("valueLabel",p)),g&&g.show&&(g.on("visible",S=>{b.set("disabled",!S)}),g.get("visible")||b.set("disabled",!0),"none"!=r)){let S=b;"marker"==r&&(S=_),this._addClickEvents(S,g,A)}this.children.values.sort((S,R)=>{const W=S.dataItem.dataContext,j=R.dataItem.dataContext;if(W&&j){const z=this.data.indexOf(W),U=this.data.indexOf(j);if(z>U)return 1;if(z<U)return-1}return 0}),g&&g.updateLegendValue&&g.updateLegendValue()}}_addClickEvents(A,b,m){A.set("cursorOverStyle","pointer"),A.events.on("pointerover",()=>{const T=b.component;T&&T.hoverDataItem&&T.hoverDataItem(b)}),A.events.on("pointerout",()=>{const T=b.component;T&&T.hoverDataItem&&T.unhoverDataItem(b)}),A.events.on("click",()=>{const T=m.get("label").text._getText();b.show&&b.isHidden&&(b.isHidden()||!1===b.get("visible"))?(b.show(),A.set("disabled",!1),this._root.readerAlert(this._t("%1 shown",this._root.locale,T))):b.hide&&(b.hide(),A.set("disabled",!0),this._root.readerAlert(this._t("%1 hidden",this._root.locale,T)))})}disposeDataItem(A){super.disposeDataItem(A);const b=A.dataContext;b&&b.get&&b.get("legendDataItem")==A&&b.set("legendDataItem",void 0);let m=A.get("itemContainer");m&&(this.itemContainers.removeValue(m),m.dispose());let T=A.get("marker");T&&(this.markers.removeValue(T),T.dispose());let c=A.get("markerRectangle");c&&(this.markerRectangles.removeValue(c),c.dispose());let r=A.get("label");r&&(this.labels.removeValue(r),r.dispose());let g=A.get("valueLabel");
1g&&(this.valueLabels.removeValue(g),g.dispose())}}C.className="Legend",C.classNames=L.s.classNames.concat([C.className])},91364(Gt,ut,y){y.d(ut,{i:()=>f});var L=y(45760),Y=y(88251),V=y(52118),P=y(30903);class Z extends V.E{constructor(){super(...arguments),this._display=this._root._renderer.makeRadialText("",this.textStyle)}_afterNew(){super._afterNew()}_beforeChanged(){super._beforeChanged(),this._display.clear(),this.isDirty("textType")&&(this._display.textType=this.get("textType"),this.markDirtyBounds()),this.isDirty("radius")&&(this._display.radius=this.get("radius"),this.markDirtyBounds()),this.isDirty("startAngle")&&(this._display.startAngle=(this.get("startAngle",0)+90)*P.nr,this.markDirtyBounds()),this.isDirty("inside")&&(this._display.inside=this.get("inside"),this.markDirtyBounds()),this.isDirty("orientation")&&(this._display.orientation=this.get("orientation"),this.markDirtyBounds()),this.isDirty("kerning")&&(this._display.kerning=this.get("kerning"),this.markDirtyBounds())}}Z.className="RadialText",Z.classNames=V.E.classNames.concat([Z.className]);var X=y(19708);class f extends Y.J{constructor(){super(...arguments),this._flipped=!1}_afterNew(){this._textKeys.push("textType","kerning"),super._afterNew()}_makeText(){this._text=this.children.push(Z.new(this._root,{}))}baseRadius(){const w=this.getPrivate("radius",0),A=this.getPrivate("innerRadius",0),b=this.get("baseRadius",0);return A+X.JY(b,w-A)}radius(){const w=this.get("inside",!1);return this.baseRadius()+this.get("radius",0)*(w?-1:1)}_updateChildren(){if(super._updateChildren(),this.isDirty("baseRadius")||this.isPrivateDirty("radius")||this.isPrivateDirty("innerRadius")||this.isDirty("labelAngle")||this.isDirty("radius")||this.isDirty("inside")||this.isDirty("orientation")||this.isDirty("textType")){const w=this.get("textType","adjusted"),A=this.get("inside",!1),b=this.get("orientation");let m=P.n0(this.get("labelAngle",0));this._text.set("startAngle",this.get("labelAngle",0)),this._text.set("inside",A);const T=P.F8(m),c=P.gn(m);let r=this.baseRadius(),g=this.radius();if(this._display.angle=0,"circular"==w)this.setAll({paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}),this.setRaw("x",void 0),this.setRaw("y",void 0),this._text.set("orientation",b),this._text.set("radius",g);else{0==r&&(m=0,g=0);let _=g*c,l=g*T;"radial"==w?(this.setRaw("x",_),this.setRaw("y",l),m<90||m>270||"auto"!=b?(this._display.angle=m,this._flipped=!1):(this._display.angle=m+180,this._flipped=!0),this._dirty.rotation=!1):"adjusted"==w?(this.setRaw("centerX",L.yP),this.setRaw("centerY",L.yP),this.setRaw("x",_),this.setRaw("y",l)):"regular"==w&&(this.setRaw("x",_),this.setRaw("y",l))}this.markDirtyPosition(),this.markDirtyBounds()}}_updatePosition(){const w=this.get("textType","regular"),A=this.get("inside",!1);let b=0,m=0,T=this.get("labelAngle",0),c=this.localBounds(),r=c.right-c.left,g=c.bottom-c.top;if("radial"==w){if(this._flipped){let _=this.get("centerX");_ instanceof L.QE&&(r*=1-2*_.value),b=r*P.gn(T),m=r*P.F8(T)}}else!A&&"adjusted"==w&&(b=r/2*P.gn(T),m=g/2*P.F8(T));this.setRaw("dx",b),this.setRaw("dy",m),super._updatePosition()}get text(){return this._text}}f.className="RadialLabel",f.classNames=Y.J.classNames.concat([f.className])},28268(Gt,ut,y){y.d(ut,{M:()=>Y});var L=y(93863);class Y extends L.A{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_beforeChanged(){super._beforeChanged(),(this.isDirty("width")||this.isDirty("height")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&!this.get("draw")&&this._draw()}_draw(){let P=this.width(),Z=this.height(),X=0,f=0,C=P/Math.abs(P),w=Z/Math.abs(Z);if(this.get("containStroke",!1)){const A=this.get("strokeWidth",0);P-=A*C,Z-=A*w,X+=A/2*C,f+=A/2*w}this._display.drawRect(X,f,P,Z)}_updateSize(){this.markDirty(),this._clear=!0}}Y.className="Rectangle",Y.classNames=L.A.classNames.concat([Y.className])},7659(Gt,ut,y){y.d(ut,{T:()=>Z});var L=y(21653),Y=y(30903),V=y(19708),P=y(28268);class Z extends P.M{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let f=this.width(),C=this.height(),w=f/Math.abs(f),A=C/Math.abs(C),b=0,m=0;const T=this.get("strokeWidth",0);this.get("containStroke",!1)&&(f-=w*T,C-=A*T,b+=w*T/2,m+=A*T/2);let c=f,r=C;if(L.Et(c)&&L.Et(r)){let g=Math.min(c,r)/2,_=V.JY(this.get("cornerRadiusTL",8),g),l=V.JY(this.get("cornerRadiusTR",8),g),p=V.JY(this.get("cornerRadiusBR",8),g),S=V.JY(this.get("cornerRadiusBL",8),g),R=Math.min(Math.abs(c/2),Math.abs(r/2));_=Y.s_(_,0,R),l=Y.s_(l,0,R),p=Y.s_(p,0,R),S=Y.s_(S,0,R);const W=this._display;W.moveTo(b+_*w,m),W.lineTo(b+c-l*w,m),l>0&&W.arcTo(b+c,m,b+c,m+l*A,l),W.lineTo(b+c,m+r-p*A),p>0&&W.arcTo(b+c,m+r,b+c-p*w,m+r,p),W.lineTo(b+S*w,m+r),S>0&&W.arcTo(b,m+r,b,m+r-S*A,S),W.lineTo(b,m+_*A),_>0&&W.arcTo(b,m,b+_*w,m,_),W.closePath()}}}
1Z.className="RoundedRectangle",Z.classNames=P.M.classNames.concat([Z.className])},97188(Gt,ut,y){y.d(ut,{s:()=>m});var L=y(31635),Y=y(7781),V=y(34521),P=y(72294),Z=y(72351),X=y(45760),f=y(5983),C=y(88251),w=y(26864),A=y(21653),b=y(77984);class m extends Y.u{constructor(){super(...arguments),this._aggregatesCalculated=!1,this._selectionAggregatesCalculated=!1,this._dataProcessed=!1,this._baseSeriesDirty=!1,this.bullets=new V.B8,this.bulletsContainer=f.m.new(this._root,{width:X.Q2,height:X.Q2,position:"absolute"})}_afterNew(){this.valueFields.push("value","customValue"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll(()=>{this._handleBullets(this.dataItems)}))}_dispose(){this.bulletsContainer.dispose(),super._dispose()}startIndex(){let c=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),c)}endIndex(){let c=this.dataItems.length;return Math.max(0,Math.min(this.getPrivate("endIndex",c),c))}_handleBullets(c){w.__(c,r=>{const g=r.bullets;g&&(w.__(g,_=>{_.dispose()}),r.bullets=void 0)}),this.markDirtyValues()}_makeBullets(c){this._shouldMakeBullet(c)&&(c.bullets=[],this.bullets.each(r=>{this._makeBullet(c,r)}))}_shouldMakeBullet(c){return!0}_makeBullet(c,r,g){const _=r(this._root,this,c);return _&&(_._index=g,this._makeBulletReal(c,_)),_}_makeBulletReal(c,r){let g=r.get("sprite");g&&(g._setDataItem(c),g.setRaw("position","absolute"),this.bulletsContainer.children.push(g)),r.series=this,c.bullets.push(r)}addBullet(c,r){c.bullets||(c.bullets=[]),r&&this._makeBulletReal(c,r)}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._baseSeriesDirty=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren();const c=this.dataItems,r=c.length;let g=this.startIndex(),_=this.endIndex();if(this.isDirty("name")&&this.updateLegendValue(),this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){const p=this.getPrivate("baseValueSeries");p&&this._disposers.push(p.onPrivate("startIndex",()=>{this._baseSeriesDirty=!0,this.markDirtyValues()}))}if(this.get("calculateAggregates")&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,r),this._aggregatesCalculated=!0,0!=g&&(this._psi=void 0))),(this._psi!=g||this._pei!=_||this.isPrivateDirty("adjustedStartIndex"))&&!this._selectionAggregatesCalculated&&(0===g&&_===r&&this._aggregatesCalculated||this._calculateAggregates(g,_),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let p=this.get("tooltip");p&&(p.hide(0),p.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let p;const S=this.get("legendDataItem");if(S&&(p=S.get("markerRectangle"),p&&this.isVisible())){if(this.isDirty("stroke")){let R=this.get("stroke");p.set("stroke",R)}if(this.isDirty("fill")){let R=this.get("fill");p.set("fill",R)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let p=this.startIndex(),S=this.endIndex();S<r&&S++;for(let R=p;R<S;R++){let W=c[R];W.bullets||this._makeBullets(W)}}}_handleRemoved(){}_adjustStartIndex(c){return c}_calculateAggregates(c,r){let g=this._valueFields;if(!g)throw new Error("No value fields are set for the series.");const _=this.get("excludeFromAggregate");_&&(g=g.filter(N=>-1==_.indexOf(N)));const l={},p={},S={},R={},W={},j={},z={},U={},nt={};for(let N=0,tt=g.length;N<tt;N++){let J=g[N];l[J]=0,p[J]=0,S[J]=0}const it=this.dataItems,gt=it.length;for(let N=0,tt=g.length;N<tt;N++){let J=g[N],at=J+"Change",vt=J+"ChangePercent",dt=J+"ChangePrevious",Dt=J+"ChangePreviousPercent",yt=J+"ChangeSelection",pt=J+"ChangeSelectionPercent",Pt="valueY";("valueX"===J||J.endsWith("ValueX"))&&(Pt="valueX");const Rt=this.getPrivate("baseValueSeries"),Tt=this.getPrivate("adjustedStartIndex",c),Ct=(rt,Xt,Ht)=>{if(0===c){const De=j[Pt],ce=Xt-De;rt.setRaw(at,ce),rt.setRaw(vt,ce/De*100)}const oe=Xt-nt[Pt],ge=Xt-j[Pt];rt.setRaw(dt,oe),rt.setRaw(Dt,oe/nt[Pt]*100),rt.setRaw(yt,ge),rt.setRaw(pt,ge/j[Pt]*100),nt[Ht]=Xt};for(let rt=Tt;rt<r;rt++){const Xt=it[rt];if(Xt){let Ht=Xt.get(J);
1if(null!=Ht){null==R[J]&&(R[J]=Ht),null==W[J]&&(W[J]=Ht),null==j[J]&&(j[J]=Ht,nt[J]=Ht,Rt&&(j[Pt]=Rt._getBase(Pt)));break}}}for(let rt=Tt;rt<r;rt++){const Xt=it[rt];if(Xt){let Ht=Xt._settings[J];null!=Ht&&(S[J]++,l[J]+=Ht,p[J]+=Math.abs(Ht),R[J]>Ht&&(R[J]=Ht),W[J]<Ht&&(W[J]=Ht),z[J]=Ht,Ct(Xt,Ht,J))}}if(U[J]=l[J]/S[J],r<gt){const rt=it[r];if(rt){let Xt=rt.get(J);null!=Xt&&Ct(rt,Xt,J)}}if(r+1<gt){const rt=it[r+1];if(rt){let Xt=rt.get(J);null!=Xt&&Ct(rt,Xt,J)}}c>0&&c--,delete nt[J];for(let rt=c;rt<Tt;rt++){const Xt=it[rt];if(Xt){let Ht=Xt.get(J);null==nt[J]&&(nt[J]=Ht),null!=Ht&&Ct(Xt,Ht,J)}}}for(let N=0,tt=g.length;N<tt;N++){let J=g[N];this.setPrivate(J+"AverageSelection",U[J]),this.setPrivate(J+"CountSelection",S[J]),this.setPrivate(J+"SumSelection",l[J]),this.setPrivate(J+"AbsoluteSumSelection",p[J]),this.setPrivate(J+"LowSelection",R[J]),this.setPrivate(J+"HighSelection",W[J]),this.setPrivate(J+"OpenSelection",j[J]),this.setPrivate(J+"CloseSelection",z[J])}if(0===c&&r===gt)for(let N=0,tt=g.length;N<tt;N++){let J=g[N];this.setPrivate(J+"Average",U[J]),this.setPrivate(J+"Count",S[J]),this.setPrivate(J+"Sum",l[J]),this.setPrivate(J+"AbsoluteSum",p[J]),this.setPrivate(J+"Low",R[J]),this.setPrivate(J+"High",W[J]),this.setPrivate(J+"Open",j[J]),this.setPrivate(J+"Close",z[J])}}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer.set("visible",this.get("visible"));const c=this.get("heatRules");if(this._valuesDirty&&c&&c.length>0&&w.__(c,r=>{const g=r.minValue||this.getPrivate(r.dataField+"Low")||0,_=r.maxValue||this.getPrivate(r.dataField+"High")||0;w.__(r.target._entities,l=>{const p=l.dataItem.get(r.dataField);if(!A.Et(p)){r.neutral&&l.set(r.key,r.neutral);const S=l.states;if(S){const R=S.lookup("default");R&&r.neutral&&R.set(r.key,r.neutral)}if(!r.customFunction)return}if(r.customFunction)r.customFunction.call(this,l,g,_,p);else{let S,R;S=r.logarithmic?(Math.log(p)*Math.LOG10E-Math.log(g)*Math.LOG10E)/(Math.log(_)*Math.LOG10E-Math.log(g)*Math.LOG10E):(p-g)/(_-g),A.Et(p)&&(!A.Et(S)||Math.abs(S)==1/0)&&(S=.5),A.Et(r.min)?R=r.min+(r.max-r.min)*S:r.min instanceof P.Q1?R=P.Q1.interpolate(S,r.min,r.max):r.min instanceof X.QE&&(R=(0,Z.zR)(S,r.min,r.max)),l.set(r.key,R);const W=l.states;if(W){const j=W.lookup("default");j&&j.set(r.key,R)}}})}),this.get("visible")){const r=this.dataItems;let g=r.length,_=this.startIndex(),l=this.endIndex();l<g&&l++,_>0&&_--;for(let p=0;p<_;p++)this._hideBullets(r[p]);for(let p=_;p<l;p++)this._positionBullets(r[p]);for(let p=l;p<g;p++)this._hideBullets(r[p])}}_positionBullets(c){c.bullets&&w.__(c.bullets,r=>{this._positionBullet(r);const g=r.get("sprite");r.get("dynamic")&&(g&&(g._markDirtyKey("fill"),g.markDirtySize()),g instanceof f.m&&g.walkChildren(_=>{_._markDirtyKey("fill"),_.markDirtySize(),_ instanceof C.J&&_.text.markDirtyText()})),g instanceof C.J&&g.get("populateText")&&g.text.markDirtyText()})}_hideBullets(c){c.bullets&&w.__(c.bullets,r=>{let g=r.get("sprite");g&&g.setPrivate("visible",!1)})}_positionBullet(c){}_placeBulletsContainer(c){c.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){const c=this.bulletsContainer;c.parent&&c.parent.children.removeValue(c)}disposeDataItem(c){const r=c.bullets;r&&(w.__(r,g=>{g.dispose()}),c.bullets=void 0)}_getItemReaderLabel(){return""}showDataItem(c,r){const g=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,L.sH)(this,void 0,void 0,function*(){const _=[g.showDataItem.call(this,c,r)],l=c.bullets;l&&w.__(l,p=>{const S=p.get("sprite");S&&_.push(S.show(r))}),yield Promise.all(_)})}hideDataItem(c,r){const g=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,L.sH)(this,void 0,void 0,function*(){const _=[g.hideDataItem.call(this,c,r)],l=c.bullets;l&&w.__(l,p=>{const S=p.get("sprite");S&&_.push(S.hide(r))}),yield Promise.all(_)})}_sequencedShowHide(c,r){return(0,L.sH)(this,void 0,void 0,function*(){if(this.get("sequencedInterpolation"))if(A.Et(r)||(r=this.get("interpolationDuration",0)),r>0){const g=this.startIndex(),_=this.endIndex();yield Promise.all(w.Tj(this.dataItems,(l,p)=>(0,L.sH)(this,void 0,void 0,function*(){let S=r||0;(p<g-10||p>_+10)&&(S=0);let R=this.get("sequencedDelay",0)+S/(_-g);
1yield b.yy(R*(p-g)),c?yield this.showDataItem(l,S):yield this.hideDataItem(l,S)})))}else yield Promise.all(w.Tj(this.dataItems,g=>c?this.showDataItem(g,0):this.hideDataItem(g,0)))})}updateLegendValue(c){if(c){const r=c.get("legendDataItem");if(r){const g=r.get("valueLabel");if(g){const l=g.text;let p="";g._setDataItem(c),p=this.get("legendValueText",l.get("text","")),g.set("text",p),l.markDirtyText()}const _=r.get("label");if(_){const l=_.text;let p="";_._setDataItem(c),p=this.get("legendLabelText",l.get("text","")),_.set("text",p),l.markDirtyText()}}}}updateLegendMarker(c){}_onHide(){super._onHide();const c=this.getTooltip();c&&c.hide()}hoverDataItem(c){}unhoverDataItem(c){}_getBase(c){const r=this.dataItems[this.startIndex()];return r?r.get(c):0}}m.className="Series",m.classNames=Y.u.classNames.concat([m.className])},39538(Gt,ut,y){y.d(ut,{J:()=>gt});var L=y(93863),Y=y(21653),V=y(45760),P=y(71859);const Z=Math.abs,X=Math.atan2,f=Math.cos,C=Math.max,w=Math.min,A=Math.sin,b=Math.sqrt,m=1e-12,T=Math.PI,c=T/2,r=2*T;function _(N){return N>=1?c:N<=-1?-c:Math.asin(N)}var l=y(96586);function p(N){return N.innerRadius}function S(N){return N.outerRadius}function R(N){return N.startAngle}function W(N){return N.endAngle}function j(N){return N&&N.padAngle}function U(N,tt,J,at,vt,dt,Dt){var yt=N-J,pt=tt-at,Pt=(Dt?dt:-dt)/b(yt*yt+pt*pt),Rt=Pt*pt,Tt=-Pt*yt,Ct=N+Rt,rt=tt+Tt,Xt=J+Rt,Ht=at+Tt,oe=(Ct+Xt)/2,ge=(rt+Ht)/2,De=Xt-Ct,ce=Ht-rt,de=De*De+ce*ce,Ae=vt-dt,Ie=Ct*Ht-Xt*rt,ke=(ce<0?-1:1)*b(C(0,Ae*Ae*de-Ie*Ie)),Fe=(Ie*ce-De*ke)/de,Be=(-Ie*De-ce*ke)/de,Pe=(Ie*ce+De*ke)/de,we=(-Ie*De+ce*ke)/de,Se=Fe-oe,se=Be-ge,le=Pe-oe,ue=we-ge;return Se*Se+se*se>le*le+ue*ue&&(Fe=Pe,Be=we),{cx:Fe,cy:Be,x01:-Rt,y01:-Tt,x11:Fe*(vt/Ae-1),y11:Be*(vt/Ae-1)}}var it=y(30903);class gt extends L.A{constructor(){super(...arguments),this.ix=0,this.iy=0,this._generator=function nt(){var N=p,tt=S,J=(0,P.A)(0),at=null,vt=R,dt=W,Dt=j,yt=null,pt=(0,l.i)(Pt);function Pt(){var Rt,Tt,Ct=+N.apply(this,arguments),rt=+tt.apply(this,arguments),Xt=vt.apply(this,arguments)-c,Ht=dt.apply(this,arguments)-c,oe=Z(Ht-Xt),ge=Ht>Xt;if(yt||(yt=Rt=pt()),rt<Ct&&(Tt=rt,rt=Ct,Ct=Tt),rt>m)if(oe>r-m)yt.moveTo(rt*f(Xt),rt*A(Xt)),yt.arc(0,0,rt,Xt,Ht,!ge),Ct>m&&(yt.moveTo(Ct*f(Ht),Ct*A(Ht)),yt.arc(0,0,Ct,Ht,Xt,ge));else{var se,le,De=Xt,ce=Ht,de=Xt,Ae=Ht,Ie=oe,ke=oe,Fe=Dt.apply(this,arguments)/2,Be=Fe>m&&(at?+at.apply(this,arguments):b(Ct*Ct+rt*rt)),Pe=w(Z(rt-Ct)/2,+J.apply(this,arguments)),we=Pe,Se=Pe;if(Be>m){var ue=_(Be/Ct*A(Fe)),me=_(Be/rt*A(Fe));(Ie-=2*ue)>m?(de+=ue*=ge?1:-1,Ae-=ue):(Ie=0,de=Ae=(Xt+Ht)/2),(ke-=2*me)>m?(De+=me*=ge?1:-1,ce-=me):(ke=0,De=ce=(Xt+Ht)/2)}var Ye=rt*f(De),Xe=rt*A(De),kt=Ct*f(Ae),ee=Ct*A(Ae);if(Pe>m){var xe,It=rt*f(ce),jt=rt*A(ce),Qt=Ct*f(de),re=Ct*A(de);if(oe<T)if(xe=function z(N,tt,J,at,vt,dt,Dt,yt){var pt=J-N,Pt=at-tt,Rt=Dt-vt,Tt=yt-dt,Ct=Tt*pt-Rt*Pt;if(!(Ct*Ct<m))return[N+(Ct=(Rt*(tt-dt)-Tt*(N-vt))/Ct)*pt,tt+Ct*Pt]}(Ye,Xe,Qt,re,It,jt,kt,ee)){var ti=Ye-xe[0],ii=Xe-xe[1],ze=It-xe[0],oi=jt-xe[1],ri=1/A(function g(N){return N>1?0:N<-1?T:Math.acos(N)}((ti*ze+ii*oi)/(b(ti*ti+ii*ii)*b(ze*ze+oi*oi)))/2),mi=b(xe[0]*xe[0]+xe[1]*xe[1]);we=w(Pe,(Ct-mi)/(ri-1)),Se=w(Pe,(rt-mi)/(ri+1))}else we=Se=0}ke>m?Se>m?(se=U(Qt,re,Ye,Xe,rt,Se,ge),le=U(It,jt,kt,ee,rt,Se,ge),yt.moveTo(se.cx+se.x01,se.cy+se.y01),Se<Pe?yt.arc(se.cx,se.cy,Se,X(se.y01,se.x01),X(le.y01,le.x01),!ge):(yt.arc(se.cx,se.cy,Se,X(se.y01,se.x01),X(se.y11,se.x11),!ge),yt.arc(0,0,rt,X(se.cy+se.y11,se.cx+se.x11),X(le.cy+le.y11,le.cx+le.x11),!ge),yt.arc(le.cx,le.cy,Se,X(le.y11,le.x11),X(le.y01,le.x01),!ge))):(yt.moveTo(Ye,Xe),yt.arc(0,0,rt,De,ce,!ge)):yt.moveTo(Ye,Xe),Ct>m&&Ie>m?we>m?(se=U(kt,ee,It,jt,Ct,-we,ge),le=U(Ye,Xe,Qt,re,Ct,-we,ge),yt.lineTo(se.cx+se.x01,se.cy+se.y01),we<Pe?yt.arc(se.cx,se.cy,we,X(se.y01,se.x01),X(le.y01,le.x01),!ge):(yt.arc(se.cx,se.cy,we,X(se.y01,se.x01),X(se.y11,se.x11),!ge),yt.arc(0,0,Ct,X(se.cy+se.y11,se.cx+se.x11),X(le.cy+le.y11,le.cx+le.x11),ge),yt.arc(le.cx,le.cy,we,X(le.y11,le.x11),X(le.y01,le.x01),!ge))):yt.arc(0,0,Ct,Ae,de,ge):yt.lineTo(kt,ee)}else yt.moveTo(0,0);if(yt.closePath(),Rt)return yt=null,Rt+""||null}return Pt.centroid=function(){var Rt=(+N.apply(this,arguments)+ +tt.apply(this,arguments))/2,Tt=(+vt.apply(this,arguments)+ +dt.apply(this,arguments))/2-T/2;return[f(Tt)*Rt,A(Tt)*Rt]},Pt.innerRadius=function(Rt){return arguments.length?(N="function"==typeof Rt?Rt:(0,P.A)(+Rt),Pt):N},Pt.outerRadius=function(Rt){return arguments.length?(tt="function"==typeof Rt?Rt:(0,P.A)(+Rt),Pt):tt},Pt.cornerRadius=function(Rt){return arguments.length?(J="function"==typeof Rt?Rt:(0,P.A)(+Rt),Pt):J},Pt.padRadius=function(Rt){return arguments.length?(at=null==Rt?null:"function"==typeof Rt?Rt:(0,P.A)(+Rt),Pt):at}
1,Pt.startAngle=function(Rt){return arguments.length?(vt="function"==typeof Rt?Rt:(0,P.A)(+Rt),Pt):vt},Pt.endAngle=function(Rt){return arguments.length?(dt="function"==typeof Rt?Rt:(0,P.A)(+Rt),Pt):dt},Pt.padAngle=function(Rt){return arguments.length?(Dt="function"==typeof Rt?Rt:(0,P.A)(+Rt),Pt):Dt},Pt.context=function(Rt){return arguments.length?(yt=Rt??null,Pt):yt},Pt}()}_getTooltipPoint(){let tt=this.get("tooltipX"),J=this.get("tooltipY"),at=0,vt=0;Y.Et(tt)&&(at=tt),Y.Et(J)&&(vt=J);let dt=this.get("radius",0),Dt=this.get("innerRadius",0);return dt+=this.get("dRadius",0),Dt+=this.get("dInnerRadius",0),Dt<0&&(Dt=dt+Dt),tt instanceof V.QE&&(at=this.ix*(Dt+(dt-Dt)*tt.value)),J instanceof V.QE&&(vt=this.iy*(Dt+(dt-Dt)*J.value)),this.get("arc")>=360&&0==Dt&&(at=0,vt=0),{x:at,y:vt}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let tt=this.get("startAngle",0),J=this.get("arc",0);const at=this._generator;J<0&&(tt+=J,J*=-1),J>.1&&at.cornerRadius(this.get("cornerRadius",0)),at.context(this._display);let vt=this.get("radius",0),dt=this.get("innerRadius",0);vt+=this.get("dRadius",0),dt+=this.get("dInnerRadius",0),dt<0&&(dt=vt+dt),at({innerRadius:dt,outerRadius:vt,startAngle:(tt+90)*it.nr,endAngle:(tt+J+90)*it.nr});let pt=tt+J/2;this.ix=it.gn(pt),this.iy=it.F8(pt);const Pt=this.get("shiftRadius",0);this.setRaw("dx",this.ix*Pt),this.setRaw("dy",this.iy*Pt),this.markDirtyPosition()}}}gt.className="Slice",gt.classNames=L.A.classNames.concat([gt.className])},34908(Gt,ut,y){y.d(ut,{k:()=>c});var L=y(31635),Y=y(55265),V=y(79691),P=y(45760),Z=y(18788),X=y(41176),f=y(72351),C=y(19708),w=y(26864),A=y(21653),b=y(16202),m=y(30903);let T=(()=>{class r extends Z.Q{constructor(_){super(),this._rendererDisposers={},this._dispatchParents=!0,this._sprite=_}_makePointerEvent(_,l){return{type:_,originalEvent:l.event,point:l.point,simulated:l.simulated,native:l.native,target:this._sprite}}_onRenderer(_,l){this._sprite.set("interactive",!0),this._sprite._display.interactive=!0;let p=this._rendererDisposers[_];if(void 0===p){const S=this._sprite._display.on(_,R=>{l.call(this,R)});p=this._rendererDisposers[_]=new X.Wr(()=>{delete this._rendererDisposers[_],S.dispose()})}return p.increment()}_on(_,l,p,S,R,W,j){const z=super._on(_,l,p,S,R,W,j),U=r.RENDERER_EVENTS[l];return void 0!==U&&(z.disposer=new X.ZT([z.disposer,this._onRenderer(l,U)])),z}stopParentDispatch(){this._dispatchParents=!1}dispatchParents(_,l){const p=this._dispatchParents;this._dispatchParents=!0;try{this.dispatch(_,l),this._dispatchParents&&this._sprite.parent&&this._sprite.parent.events.dispatchParents(_,l)}finally{this._dispatchParents=p}}}return r.RENDERER_EVENTS={click:function(g){this.isEnabled("click")&&!this._sprite.isDragging()&&this._sprite._hasDown()&&!this._sprite._hasMoved(this._makePointerEvent("click",g))&&this.dispatch("click",this._makePointerEvent("click",g))},rightclick:function(g){this.isEnabled("rightclick")&&this.dispatch("rightclick",this._makePointerEvent("rightclick",g))},middleclick:function(g){this.isEnabled("middleclick")&&this.dispatch("middleclick",this._makePointerEvent("middleclick",g))},dblclick:function(g){this.dispatchParents("dblclick",this._makePointerEvent("dblclick",g))},pointerover:function(g){const _=this._sprite;let l=!0;if(_.getPrivate("trustBounds")){_._getBounds();const p=_.globalBounds();if(_.isType("Graphics")){const S=_.get("strokeWidth",1)/2;S>=1&&(p.left-=S,p.right+=S,p.top-=S,p.bottom+=S)}m.HQ(g.point,p)||(l=!1,_._root._renderer.removeHovering(_._display))}l&&this.isEnabled("pointerover")&&this.dispatch("pointerover",this._makePointerEvent("pointerover",g))},pointerout:function(g){this.isEnabled("pointerout")&&this.dispatch("pointerout",this._makePointerEvent("pointerout",g))},pointerdown:function(g){this.dispatchParents("pointerdown",this._makePointerEvent("pointerdown",g))},pointerup:function(g){this.isEnabled("pointerup")&&this.dispatch("pointerup",this._makePointerEvent("pointerup",g))},globalpointerup:function(g){this.isEnabled("globalpointerup")&&this.dispatch("globalpointerup",this._makePointerEvent("globalpointerup",g))},globalpointermove:function(g){this.isEnabled("globalpointermove")&&this.dispatch("globalpointermove",this._makePointerEvent("globalpointermove",g))},wheel:function(g){this.dispatchParents("wheel",{type:"wheel",target:this._sprite,originalEvent:g.event,point:g.point})}},r})();class c extends Y.wC{constructor(){super(...arguments),this._adjustedLocalBounds={left:0,right:0,top:0,bottom:0},this._localBounds={left:0,right:0,top:0,bottom:0},this._sizeDirty=!1,this._isDragging=!1,this._isHidden=!1,this._isShowing=!1,this._isHiding=!1,this._isDown=!1,this._downPoints={}}_afterNew(){this.setPrivateRaw("visible",!0),super._afterNew()}markDirtyKey(g){this._markDirtyKey(g)}_markDirtyKey(g){super._markDirtyKey(g),("x"==g||"y"==g||"dx"==g||"dy"==g)&&(this.markDirtyBounds(),this._addPercentagePositionChildren(),this.markDirtyPosition())}_markDirtyPrivateKey(g){super._markDirtyPrivateKey(g),("x"==g||"y"==g)&&this.markDirtyPosition()}_removeTemplateField(){this._templateField&&this._templateField._removeObjectTemplate(this)}_createEvents(){return new T(this)}_processTemplateField(){let g;const _=this.get("templateField");if(_){const l=this.dataItem;if(l){const p=l.dataContext;p&&(g=p[_],!(g instanceof V.Bj)&&g&&(g=V.Bj.new(g)))}}this._templateField!==g&&(this._removeTemplateField(),this._templateField=g,g&&g._setObjectTemplate(this),this._applyTemplates())}_setDataItem(g){const _=this._dataItem;this._dataItem=g,this._processTemplateField();const l="dataitemchanged";g!=_&&this.events.isEnabled(l)&&this.events.dispatch(l,{type:l,target:this,oldDataItem:_,newDataItem:g})}set dataItem(g){this._setDataItem(g)}get dataItem(){if(this._dataItem)return this._dataItem;{let g=this._parent;for(;g;){if(g._dataItem)return g._dataItem;g=g._parent}}}_addPercentageSizeChildren(){let g=this.parent;g&&(this.get("width")instanceof P.QE||this.get("height")instanceof P.QE?w.JJ(g._percentageSizeChildren,this):w.dm(g._percentageSizeChildren,this))}_addPercentagePositionChildren(){let g=this.parent;g&&(this.get("x")instanceof P.QE||this.get("y")instanceof P.QE?w.JJ(g._percentagePositionChildren,this):w.dm(g._percentagePositionChildren,this))}markDirtyPosition(){this._root._addDirtyPosition(this)}updatePivotPoint(){const g=this._localBounds;if(g){const _=this.get("centerX");null!=_&&(this._display.pivot.x=g.left+C.JY(_,g.right-g.left));const l=this.get("centerY");null!=l&&(this._display.pivot.y=g.top+C.JY(l,g.bottom-g.top))}}_beforeChanged(){if(super._beforeChanged(),this._handleStates(),this.isDirty("tooltip")){const g=this._prevSettings.tooltip;g&&g.dispose()}if((this.isDirty("layer")||this.isDirty("layerMargin"))&&(this._display.setLayer(this.get("layer"),this.get("layerMargin")),this.markDirtyLayer()),this.isDirty("tooltipPosition")){const g=this._tooltipMoveDp;g&&(g.dispose(),this._tooltipMoveDp=void 0);const _=this._tooltipPointerDp;
1_&&(_.dispose(),this._tooltipPointerDp=void 0),"pointer"==this.get("tooltipPosition")&&(this.isHover()&&(this._tooltipMoveDp=this.events.on("globalpointermove",l=>{this.showTooltip(l.point)})),this._tooltipPointerDp=new X.ZT([this.events.on("pointerover",()=>{this._tooltipMoveDp=this.events.on("globalpointermove",l=>{this.showTooltip(l.point)})}),this.events.on("pointerout",()=>{const l=this._tooltipMoveDp;l&&(l.dispose(),this._tooltipMoveDp=void 0)})]))}}_handleStates(){this.isDirty("active")&&(this.get("active")?(this.states.applyAnimate("active"),this.set("ariaChecked",!0)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!1)),this.markDirtyAccessibility()),this.isDirty("disabled")&&(this.get("disabled")?(this.states.applyAnimate("disabled"),this.set("ariaChecked",!1)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!0)),this.markDirtyAccessibility())}_changed(){super._changed();const g=this._display,_=this.events;if(this.isDirty("draggable")){const p=this.get("draggable");p?(this.set("interactive",!0),this._dragDp=new X.ZT([_.on("pointerdown",S=>{this.dragStart(S)}),_.on("globalpointermove",S=>{this.dragMove(S)}),_.on("globalpointerup",S=>{this.dragStop(S)})])):this._dragDp&&(this._dragDp.dispose(),this._dragDp=void 0),g.cancelTouch=!!p}if(this.isDirty("tooltipText")||this.isDirty("tooltipHTML")||this.isDirty("showTooltipOn")){const p=this.get("tooltipText"),S=this.get("tooltipHTML"),R=this.get("showTooltipOn","hover");this._tooltipDp&&(this._tooltipDp.dispose(),this._tooltipDp=void 0),(p||S)&&("click"==R?(this._tooltipDp=new X.ZT([_.on("click",()=>{this.setTimeout(()=>{const W=this.getTooltip();W&&!W.isHidden()&&W.get("tooltipTarget")===this?this.hideTooltip():this.showTooltip()},10)}),C.q2(document,"click",W=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)):"always"==R||(this._tooltipDp=new X.ZT([_.on("pointerover",()=>{this.showTooltip()}),_.on("pointerout",()=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)))}if(this.isDirty("toggleKey")){let p=this.get("toggleKey");p&&"none"!=p?this._toggleDp=_.on("click",()=>{this._isDragging||this.set(p,!this.get(p))}):this._toggleDp&&(this._toggleDp.dispose(),this._toggleDp=void 0)}if(this.isDirty("opacity")&&(g.alpha=Math.max(0,this.get("opacity",1)),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("rotation")&&(this.markDirtyBounds(),g.angle=this.get("rotation",0)),this.isDirty("scale")&&(this.markDirtyBounds(),g.scale=this.get("scale",0)),(this.isDirty("centerX")||this.isDirty("centerY"))&&(this.markDirtyBounds(),this.updatePivotPoint()),(this.isDirty("visible")||this.isPrivateDirty("visible")||this.isDirty("forceHidden"))&&(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden")?g.visible=!0:(g.visible=!1,this.hideTooltip()),this.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("width")||this.isDirty("height")){this.markDirtyBounds(),this._addPercentageSizeChildren();const p=this.parent;p&&(this.isDirty("width")&&this.get("width")instanceof P.QE||this.isDirty("height")&&this.get("height")instanceof P.QE)&&(p.markDirty(),p._prevWidth=0),this._sizeDirty=!0}if((this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("minWidth")||this.isDirty("minHeight")||this.isPrivateDirty("maxWidth")||this.isPrivateDirty("maxHeight")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight")||this.isDirty("marginLeft")||this.isDirty("marginTop")||this.isDirty("marginRight")||this.isDirty("marginBottom"))&&(this.markDirtyBounds(),this._sizeDirty=!0),this._sizeDirty&&this._updateSize(),this.isDirty("wheelable")){const p=this.get("wheelable");p&&this.set("interactive",!0),g.wheelable=!!p}(this.isDirty("tabindexOrder")||this.isDirty("focusableGroup"))&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this)),this.isDirty("filter")&&(g.filter=this.get("filter"));let l=this.get("filter","");if(this.isDirty("blur")){const p=this.get("blur",0);0!=p&&(l+=" blur("+p+"px)")}if(this.isDirty("saturate")){const p=this.get("saturate",1);1!=p&&(l+=" saturate("+p+")")}if(this.isDirty("brightness")){const p=this.get("brightness",1);1!=p&&(l+=" brightness("+p+")")}if(this.isDirty("contrast")){const p=this.get("contrast",1);1!=p&&(l+=" contrast("+p+")")}if(this.isDirty("sepia")){const p=this.get("sepia",0);0!=p&&(l+=" sepia("+p+")")}if(this.isDirty("hue")){const p=this.get("hue",0);0!=p&&(l+=" hue-rotate("+p+"deg)")}if(this.isDirty("invert")){const p=this.get("invert",0);0!=p&&(l+=" invert("+p+")")}if(l&&(g.filter=l),this.isDirty("cursorOverStyle")&&(g.cursorOverStyle=this.get("cursorOverStyle")),this.isDirty("hoverOnFocus")&&(this.get("hoverOnFocus")?this._focusDp=new X.ZT([_.on("focus",()=>{this.showTooltip()}),_.on("blur",()=>{this.hideTooltip()})]):this._focusDp&&(this._focusDp.dispose(),this._focusDp=void 0)),this.isDirty("focusable")&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this),this.markDirtyAccessibility(),this._disposers.push(_.on("blur",()=>{this.setPrivateRaw("touchHovering",!1)})),this._disposers.push(_.once("boundschanged",()=>{this.markDirtyAccessibility()}))),this.isPrivateDirty("focusable")&&this.markDirtyAccessibility(),(this.isDirty("role")||this.isDirty("ariaLive")||this.isDirty("ariaChecked")||this.isDirty("ariaHidden")||this.isDirty("ariaOrientation")||this.isDirty("ariaValueNow")||this.isDirty("ariaValueMin")||this.isDirty("ariaValueMax")||this.isDirty("ariaValueText")||this.isDirty("ariaLabel")||this.isDirty("ariaControl
1s"))&&this.markDirtyAccessibility(),this.isDirty("exportable")&&(g.exportable=this.get("exportable")),this.isDirty("interactive")){const p=this.events;this.get("interactive")&&!p.isDisposed()?this._hoverDp=new X.ZT([p.on("click",S=>{C.kH(S.originalEvent)&&(this.getPrivate("touchHovering")||this.setTimeout(()=>{this._handleOver(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.showTooltip(),this.setPrivateRaw("touchHovering",!0),this.events.dispatch("pointerover",{type:"pointerover",target:S.target,originalEvent:S.originalEvent,point:S.point,simulated:S.simulated})},10))}),p.on("globalpointerup",S=>{C.kH(S.originalEvent)&&this.getPrivate("touchHovering")&&(this._handleOut(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.hideTooltip(),this.setPrivateRaw("touchHovering",!1),this.events.dispatch("pointerout",{type:"pointerout",target:S.target,originalEvent:S.originalEvent,point:S.point,simulated:S.simulated})),this._isDown&&this._handleUp(S)}),p.on("pointerover",()=>{this._handleOver()}),p.on("pointerout",()=>{this._handleOut()}),p.on("pointerdown",S=>{this._handleDown(S)})]):(this._display.interactive=!1,this._hoverDp&&(this._hoverDp.dispose(),this._hoverDp=void 0))}this.isDirty("forceInactive")&&(this._display.inactive=this.get("forceInactive",null)),"always"==this.get("showTooltipOn")&&this._display.visible&&this.showTooltip()}dragStart(g){this._dragEvent=g,this.events.stopParentDispatch()}dragStop(g){if(this._dragEvent=void 0,this._dragPoint=void 0,this.events.stopParentDispatch(),this._isDragging){this._isDragging=!1;const _="dragstop";this.events.isEnabled(_)&&this.events.dispatch(_,{type:_,target:this,originalEvent:g.originalEvent,point:g.point,simulated:g.simulated})}}_handleOver(){this.isHidden()||(this.get("active")&&this.states.lookup("hoverActive")?this.states.applyAnimate("hoverActive"):this.get("disabled")&&this.states.lookup("hoverDisabled")?this.states.applyAnimate("hoverDisabled"):this.states.applyAnimate("hover"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleOut(){this.isHidden()||(this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):(this.states.lookup("hover")||this.states.lookup("hoverActive"))&&this.states.applyAnimate("default"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleUp(g){if(!this.isHidden()){this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):this.states.lookup("down")&&(this.isHover()?this.states.applyAnimate("hover"):this.states.applyAnimate("default")),this._downPoint=void 0;const _=C.Dn(g.originalEvent);delete this._downPoints[_],0==b.HP(this._downPoints).length&&(this._isDown=!1)}}_hasMoved(g){const _=C.Dn(g.originalEvent),l=this._downPoints[_];if(l){const p=Math.abs(l.x-g.point.x),S=Math.abs(l.y-g.point.y);return p>5||S>5}return!1}_hasDown(){return b.HP(this._downPoints).length>0}_handleDown(g){const _=this.parent;if(_&&!this.get("draggable")&&_._handleDown(g),this.get("interactive")&&!this.isHidden()){this.states.lookup("down")&&this.states.applyAnimate("down"),this._downPoint={x:g.point.x,y:g.point.y},this._isDown=!0;const l=C.Dn(g.originalEvent);this._downPoints[l]={x:g.point.x,y:g.point.y}}}dragMove(g){let _=this._dragEvent;if(_){if(_.simulated&&!g.simulated)return!0;let l=0,p=this.parent,S=1;for(;null!=p;)l+=p.get("rotation",0),p=p.parent,p&&(S*=p.get("scale",1));let R=(g.point.x-_.point.x)/S,W=(g.point.y-_.point.y)/S;const j=this.events;if(_.simulated&&!this._isDragging){this._isDragging=!0,this._dragEvent=g,this._dragPoint={x:this.x(),y:this.y()};const z="dragstart";j.isEnabled(z)&&j.dispatch(z,{type:z,target:this,originalEvent:g.originalEvent,point:g.point,simulated:g.simulated})}if(this._isDragging){let z=this._dragPoint;this.set("x",z.x+R*m.gn(l)+W*m.F8(l)),this.set("y",z.y+W*m.gn(l)-R*m.F8(l));const U="dragged";j.isEnabled(U)&&j.dispatch(U,{type:U,target:this,originalEvent:g.originalEvent,point:g.point,simulated:g.simulated})}else if(Math.hypot(R,W)>5){this._isDragging=!0,this._dragEvent=g,this._dragPoint={x:this.x(),y:this.y()};const z="dragstart";j.isEnabled(z)&&j.dispatch(z,{type:z,target:this,originalEvent:g.originalEvent,point:g.point,simulated:g.simulated})}}}_updateSize(){}_getBounds(){this._localBounds=this._display.getLocalBounds()}depth(){let g=this.parent,_=0;for(;;){if(!g)return _;++_,g=g.parent}}markDirtySize(){this._sizeDirty=!0,this.markDirty()}markDirtyBounds(){const g=this._display;
1if(this.get("isMeasured")){this._root._addDirtyBounds(this),g.isMeasured=!0,g.invalidateBounds();const _=this.parent;_&&"absolute"!=this.get("position")&&(null==_.get("width")||null==_.get("height")||_.get("layout"))&&_.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()}}markDirtyAccessibility(){this._root._invalidateAccessibility(this)}markDirtyLayer(){this._display.markDirtyLayer(!0)}markDirty(){super.markDirty(),this.markDirtyLayer()}_updateBounds(){const g=this._adjustedLocalBounds;let _;if(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden")?(this._getBounds(),this._fixMinBounds(this._localBounds),this.updatePivotPoint(),this._adjustedLocalBounds=this._display.getAdjustedBounds(this._localBounds),_=this._adjustedLocalBounds):(_={left:0,right:0,top:0,bottom:0},this._localBounds=_,this._adjustedLocalBounds=_),!g||g.left!==_.left||g.top!==_.top||g.right!==_.right||g.bottom!==_.bottom){const l="boundschanged";this.events.isEnabled(l)&&this.events.dispatch(l,{type:l,target:this}),this.parent&&(this.parent.markDirty(),this.parent.markDirtyBounds()),this.getPrivate("showingTooltip")&&this.showTooltip()}}_fixMinBounds(g){let _=this.get("minWidth",this.getPrivate("minWidth")),l=this.get("minHeight",this.getPrivate("minHeight"));A.Et(_)&&g.right-g.left<_&&(g.right=g.left+_),A.Et(l)&&g.bottom-g.top<l&&(g.bottom=g.top+l);let p=this.getPrivate("width"),S=this.getPrivate("height");A.Et(p)&&(p>0?g.right=g.left+p:g.left=g.right+p),A.Et(S)&&(S>0?g.bottom=g.top+S:g.top=g.bottom+S)}_removeParent(g){g&&(g.children.removeValue(this),w.dm(g._percentageSizeChildren,this),w.dm(g._percentagePositionChildren,this))}_clearDirty(){super._clearDirty(),this._sizeDirty=!1}hover(){this.isDisposed()||(this.showTooltip(),this._handleOver())}unhover(){this.isDisposed()||(this.hideTooltip(),this._handleOut())}showTooltip(g){if(!this.isDisposed()){const _=this.getTooltip(),l=this.get("tooltipText"),p=this.get("tooltipHTML");if((l||p)&&_){const S=this.get("tooltipPosition"),R=this.getPrivate("tooltipTarget",this);if(("fixed"==S||!g)&&(this._display._setMatrix(),g=this.toGlobal(R._getTooltipPoint())),"pointer"==S){const z=this.getPrivate("lastTooltipCoords");if(z&&z.x==g.x&&z.y==g.y)return;this.setPrivate("lastTooltipCoords",g)}_.set("pointTo",g),_.set("tooltipTarget",R),_.get("x")||_.set("x",g.x),_.get("y")||_.set("y",g.y),l&&_.label.set("text",l),p&&_.label.set("html",p);const W=this.dataItem;if(W&&_.label._setDataItem(W),"always"==this.get("showTooltipOn")&&(g.x<0||g.x>this._root.width()||g.y<0||g.y>this._root.height()))return void this.hideTooltip();_.label.text.markDirtyText();const j=_.show();return this.setPrivateRaw("showingTooltip",!0),j}}}hideTooltip(){const g=this.getTooltip();if(g&&(this.removePrivate("lastTooltipCoords"),g.get("tooltipTarget")==this.getPrivate("tooltipTarget",this)||this.get("tooltip")==g)){let _=g.get("keepTargetHover")&&0==g.get("stateAnimationDuration",0)?400:void 0;const l=g.hide(_);return this.setPrivateRaw("showingTooltip",!1),l}}_getTooltipPoint(){const g=this._localBounds;if(g){let _=0,l=0;return this.get("isMeasured")?(_=g.left+C.JY(this.get("tooltipX",0),g.right-g.left),l=g.top+C.JY(this.get("tooltipY",0),g.bottom-g.top)):(_=C.JY(this.get("tooltipX",0),this.width()),l=C.JY(this.get("tooltipY",0),this.height())),{x:_,y:l}}return{x:0,y:0}}getTooltip(){let g=this.get("tooltip");if(g)return g;{let _=this.parent;if(_)return _.getTooltip()}}_updatePosition(){const g=this.parent;let _=this.get("dx",0),l=this.get("dy",0),p=this.get("x"),S=this.getPrivate("x"),R=0,W=0;const j=this.get("position");p instanceof P.QE&&(p=g?g.innerWidth()*p.value+g.get("paddingLeft",0):0),A.Et(p)?R=p+_:null!=S?R=S:g&&"relative"==j&&(R=g.get("paddingLeft",0)+_);let z=this.get("y"),U=this.getPrivate("y");z instanceof P.QE&&(z=g?g.innerHeight()*z.value+g.get("paddingTop",0):0),A.Et(z)?W=z+l:null!=U?W=U:g&&"relative"==j&&(W=g.get("paddingTop",0)+l);const nt=this._display;if(nt.x!=R||nt.y!=W){nt.invalidateBounds(),nt.x=R,nt.y=W;const it="positionchanged";this.events.isEnabled(it)&&this.events.dispatch(it,{type:it,target:this})}this.getPrivate("showingTooltip")&&this.showTooltip()}x(){let g=this.get("x"),_=this.getPrivate("x");const l=this.parent;return l?g instanceof P.QE?C.JY(g,l.innerWidth())+l.get("paddingLeft",0):A.Et(g)?g:_??l.get("paddingLeft",this._display.x):this._display.x}y(){let g=this.getPrivate("y");if(null!=g)return g;let _=this.get("y");const l=this.parent;
1return l?_ instanceof P.QE?C.JY(_,l.innerHeight())+l.get("paddingTop",0):A.Et(_)?_:g??l.get("paddingTop",this._display.y):this._display.y}_dispose(){super._dispose(),this._display.dispose(),this._removeTemplateField(),this._removeParent(this.parent),this._root._removeFocusElement(this);const g=this.get("tooltip");g&&g.dispose(),this.markDirty()}adjustedLocalBounds(){return this._fixMinBounds(this._adjustedLocalBounds),this._adjustedLocalBounds}localBounds(){return this._localBounds}bounds(){const g=this._adjustedLocalBounds,_=this.x(),l=this.y();return{left:g.left+_,right:g.right+_,top:g.top+l,bottom:g.bottom+l}}globalBounds(){const g=this.localBounds(),_=this.toGlobal({x:g.left,y:g.top}),l=this.toGlobal({x:g.right,y:g.top}),p=this.toGlobal({x:g.right,y:g.bottom}),S=this.toGlobal({x:g.left,y:g.bottom});return{left:Math.min(_.x,l.x,p.x,S.x),top:Math.min(_.y,l.y,p.y,S.y),right:Math.max(_.x,l.x,p.x,S.x),bottom:Math.max(_.y,l.y,p.y,S.y)}}_onShow(g){}_onHide(g){}appear(g,_){return(0,L.sH)(this,void 0,void 0,function*(){return yield this.hide(0),_?new Promise((l,p)=>{this.setTimeout(()=>{l(this.show(g))},_)}):this.show(g)})}show(g){return(0,L.sH)(this,void 0,void 0,function*(){if(!this._isShowing){this._isHidden=!1,this._isShowing=!0,this._isHiding=!1,this.states.lookup("default").get("visible")&&this.set("visible",!0),this._onShow(g);const _=this.states.applyAnimate("default",g);yield(0,f.M9)(_),this._isShowing=!1}})}hide(g){return(0,L.sH)(this,void 0,void 0,function*(){if(!this._isHiding&&!this._isHidden){this._isHiding=!0,this._isShowing=!1;let _=this.states.lookup("hidden");_||(_=this.states.create("hidden",{opacity:0,visible:!1})),this._isHidden=!0,this._onHide(g);const l=this.states.applyAnimate("hidden",g);yield(0,f.M9)(l),this._isHiding=!1}})}isHidden(){return this._isHidden}isShowing(){return this._isShowing}isHiding(){return this._isHiding}isHover(){return this._display.hovering()}isFocus(){return this._root.focused(this)}isDragging(){return this._isDragging}isVisible(){return!(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden"))}isVisibleDeep(){return this._parent?this._parent.isVisibleDeep()&&this.isVisible():this.isVisible()}compositeOpacity(){const g=this.get("opacity",1);return this._parent?this._parent.compositeOpacity()*g:g}compositeScale(){const g=this.get("scale",1);return this._parent?this._parent.compositeScale()*g:g}compositeRotation(){const g=this.get("rotation",0);return this._parent?this._parent.compositeRotation()+g:g}width(){let g=this.get("width"),_=this.get("maxWidth",this.getPrivate("maxWidth")),l=this.get("minWidth",this.getPrivate("minWidth")),p=this.getPrivate("width"),S=0;if(A.Et(p))S=p;else if(null==g)this._adjustedLocalBounds&&(S=this._adjustedLocalBounds.right-this._adjustedLocalBounds.left);else if(g instanceof P.QE){const R=this.parent;S=R?R.innerWidth()*g.value:this._root.width()*g.value}else A.Et(g)&&(S=g);return A.Et(l)&&(S=Math.max(l,S)),A.Et(_)&&(S=Math.min(_,S)),S}maxWidth(){let g=this.get("maxWidth",this.getPrivate("maxWidth"));if(A.Et(g))return g;{let l=this.get("width");if(A.Et(l))return l}const _=this.parent;return _?_.innerWidth():this._root.width()}maxHeight(){let g=this.get("maxHeight",this.getPrivate("maxHeight"));if(A.Et(g))return g;{let l=this.get("height");if(A.Et(l))return l}const _=this.parent;return _?_.innerHeight():this._root.height()}height(){let g=this.get("height"),_=this.get("maxHeight",this.getPrivate("maxHeight")),l=this.get("minHeight",this.getPrivate("minHeight")),p=this.getPrivate("height"),S=0;if(A.Et(p))S=p;else if(null==g)this._adjustedLocalBounds&&(S=this._adjustedLocalBounds.bottom-this._adjustedLocalBounds.top);else if(g instanceof P.QE){const R=this.parent;S=R?R.innerHeight()*g.value:this._root.height()*g.value}else A.Et(g)&&(S=g);return A.Et(l)&&(S=Math.max(l,S)),A.Et(_)&&(S=Math.min(_,S)),S}_findStaticTemplate(g){return this._templateField&&g(this._templateField)?this._templateField:super._findStaticTemplate(g)}_walkParents(g){(this._parent||this._virtualParent)&&this._walkParent(g)}_walkParent(g){this._parent?this._parent._walkParent(g):this._virtualParent&&this._virtualParent._walkParent(g),g(this)}set virtualParent(g){this._virtualParent!==g&&(this._virtualParent=g,this._applyThemes())}get parent(){return this._parent}_setParent(g,_=!1){const l=this._parent;g!==l&&(this.markDirtyBounds(),g.markDirty(),this._parent=g,_&&(this._removeParent(l),g&&(this._addPercentageSizeChildren(),this._addPercentagePositionChildren())),this.markDirtyPosition(),this._applyThemes())}getNumberFormatter(){return this.get("numberFormatter",this._root.numberFormatter)}getDateFormatter(){return this.get("dateFormatter",this._root.dateFormatter)}getDurationFormatter(){return this.get("durationFormatter",this._root.durationFormatter)}toGlobal(g){return this._display.toGlobal(g)}toLocal(g){return this._display.toLocal(g)}_getDownPoint(){const g=this._getDownPointId();if(g)return this._downPoints[g]}_getDownPointId(){if(this._downPoints)return b.M2(this._downPoints,(g,_)=>g>_?1:g<_?-1:0)[0]}toFront(){const g=this.parent;g&&g.children.moveValue(this,g.children.length-1)}toBack(){const g=this.parent;g&&g.children.moveValue(this,0)}}
1c.className="Sprite",c.classNames=Y.wC.classNames.concat([c.className])},52118(Gt,ut,y){y.d(ut,{E:()=>X});var L=y(34908),Y=y(43058),V=y(26864),P=y(19708),Z=y(41176);class X extends L.k{constructor(){super(...arguments),this.textStyle=this._root._renderer.makeTextStyle(),this._display=this._root._renderer.makeText("",this.textStyle),this._textStyles=["textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","maxChars"]}_updateBounds(){if(this.get("text")){super._updateBounds();let C=this.get("fillGradient");C&&(this._display.style.fill=C.getFill(this))}else this._adjustedLocalBounds={left:0,right:0,top:0,bottom:0}}_changed(){super._changed(),this._display.clear();let C=this.textStyle;if(this.isDirty("opacity")){let w=this.get("opacity",1);this._display.alpha=w}if((this.isDirty("text")||this.isDirty("populateText"))&&(this._display.text=this._getText(),this.markDirtyBounds(),"tooltip"==this.get("role")&&this._root.updateTooltip(this)),this.isPrivateDirty("tooltipElement")&&this.getPrivate("tooltipElement")&&this._disposers.push(new Z.W_(()=>{this._root._removeTooltipElement(this)})),this.isDirty("width")&&(C.wordWrapWidth=this.width(),this.markDirtyBounds()),this.isDirty("oversizedBehavior")&&(C.oversizedBehavior=this.get("oversizedBehavior","none"),this._display.invalidateVisibility(),this.markDirtyBounds()),this.isDirty("breakWords")&&(C.breakWords=this.get("breakWords",!1),this.markDirtyBounds()),this.isDirty("ellipsis")&&(C.ellipsis=this.get("ellipsis"),this.markDirtyBounds()),this.isDirty("ignoreFormatting")&&(C.ignoreFormatting=this.get("ignoreFormatting",!1),this.markDirtyBounds()),this.isDirty("minScale")&&(C.minScale=this.get("minScale",0),this.markDirtyBounds()),this.isDirty("fill")||this.isDirty("fillGradient")){const w=this.get("fill"),A=this.get("fillGradient"),b=this.get("fillOpacity");if(A){if(w){const m=A.get("stops",[]);m.length&&V.__(m,T=>{(!T.color||T.colorInherited)&&w&&(T.color=w,T.colorInherited=!0),(null==T.opacity||T.opacityInherited)&&(T.opacity=b,T.opacityInherited=!0)})}C.fill=A.getFill(this)}else w&&(C.fill=w)}if(this.isDirty("fillOpacity")){let w=this.get("fillOpacity",1);w&&(C.fillOpacity=w)}(this.isDirty("maxWidth")||this.isPrivateDirty("maxWidth"))&&(C.maxWidth=this.get("maxWidth",this.getPrivate("maxWidth")),this.markDirtyBounds()),(this.isDirty("maxHeight")||this.isPrivateDirty("maxHeight"))&&(C.maxHeight=this.get("maxHeight",this.getPrivate("maxHeight")),this.markDirtyBounds()),V.__(this._textStyles,w=>{this._dirty[w]&&(C[w]=this.get(w),this.markDirtyBounds())}),C.fontSize=this.get("fontSize"),C.fontFamily=this.get("fontFamily"),this._display.style=C,this.isDirty("role")&&"tooltip"==this.get("role")&&this._root.updateTooltip(this)}_getText(){let C=this.get("text","");return this.get("maxChars")&&(C=P.FZ(C,this.get("maxChars",1e8),this.get("breakWords"),this.get("ellipsis"))),this.get("populateText")?(0,Y.Iy)(this,C):C}_getAccessibleText(){const C=this.get("ariaLabel");return void 0!==C?this.get("populateText")?(0,Y.Iy)(this,C):C:this._getText()}markDirtyText(){this._display.text=this._getText(),"tooltip"==this.get("role")&&this._root.updateTooltip(this),this.markDirtyBounds(),this.markDirty()}_setDataItem(C){super._setDataItem(C),this.get("populateText")&&this.markDirtyText()}getNumberFormatter(){return this.parent?this.parent.getNumberFormatter():super.getNumberFormatter()}getDateFormatter(){return this.parent?this.parent.getDateFormatter():super.getDateFormatter()}getDurationFormatter(){return this.parent?this.parent.getDurationFormatter():super.getDurationFormatter()}}X.className="Text",X.classNames=L.k.classNames.concat([X.className])},67830(Gt,ut,y){y.d(ut,{g:()=>A});var L=y(93863);function V(b,m){for(let T=0,c=m.length;T<c;T++){const r=m[T];if(r.length>0){let g=r[0];if(g.length>0){let _=g[0];b.moveTo(_.x,_.y);for(let l=0,p=r.length;l<p;l++)P(b,r[l])}}}}function P(b,m){for(let T=0,c=m.length;T<c;T++){const r=m[T];b.lineTo(r.x,r.y)}}class w extends L.A{_beforeChanged(){super._beforeChanged(),(this.isDirty("points")||this.isDirty("segments")||this._sizeDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){const m=this.get("points"),T=this.get("segments");if(m&&m.length>0){let c=m[0];this._display.moveTo(c.x,c.y),V(this._display,[[m]])}else if(T)V(this._display,T);else if(!this.get("draw")){let c=this.width(),r=this.height();this._display.moveTo(0,0),this._display.lineTo(c,r)}}}}
1w.className="Line",w.classNames=L.A.classNames.concat([w.className]);class A extends w{}A.className="Tick",A.classNames=w.classNames.concat([A.className])},88327(Gt,ut,y){y.d(ut,{m:()=>b});var L=y(41176),Y=y(88251),V=y(93863),P=y(30903);class Z extends V.A{_beforeChanged(){super._beforeChanged(),(this.isDirty("pointerBaseWidth")||this.isDirty("cornerRadius")||this.isDirty("pointerLength")||this.isDirty("pointerX")||this.isDirty("pointerY")||this.isDirty("width")||this.isDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){this.markDirtyBounds();let T=this.width(),c=this.height();if(T>0&&c>0){let r=this.get("cornerRadius",8);r=P.s_(r,0,Math.min(T/2,c/2));let g=this.get("pointerX",0),_=this.get("pointerY",0),l=this.get("pointerBaseWidth",15)/2,p=0,S=0,U=0,it=(g-p)*(c-S)-(_-S)*(T-p),gt=(g-U)*(0-c)-(_-c)*(T-U);const N=this._display;if(N.moveTo(r,0),it>0&&gt>0){let tt=Math.round(P.s_(g,r+l,T-l-r));_=P.s_(_,-1/0,0),N.lineTo(tt-l,0),N.lineTo(g,_),N.lineTo(tt+l,0)}if(N.lineTo(T-r,0),N.arcTo(T,0,T,r,r),it>0&&gt<0){let tt=Math.round(P.s_(_,r+l,c-l-r));g=P.s_(g,T,1/0),N.lineTo(T,r),N.lineTo(T,Math.max(tt-l,r)),N.lineTo(g,_),N.lineTo(T,tt+l)}if(N.lineTo(T,c-r),N.arcTo(T,c,T-r,c,r),it<0&&gt<0){let tt=Math.round(P.s_(g,r+l,T-l-r));_=P.s_(_,c,1/0),N.lineTo(T-r,c),N.lineTo(tt+l,c),N.lineTo(g,_),N.lineTo(tt-l,c)}if(N.lineTo(r,c),N.arcTo(0,c,0,c-r,r),it<0&&gt>0){let tt=Math.round(P.s_(_,r+l,c-r-l));g=P.s_(g,-1/0,0),N.lineTo(0,c-r),N.lineTo(0,tt+l),N.lineTo(g,_),N.lineTo(0,Math.max(tt-l,r))}N.lineTo(0,r),N.arcTo(0,0,r,0,r),N.closePath()}}}}Z.className="PointedRectangle",Z.classNames=V.A.classNames.concat([Z.className]);var X=y(5983),f=y(45760),C=y(72294),w=y(26864),A=y(19708);class b extends X.m{constructor(T,c,r,g=[]){super(T,c,r,g),this._fx=0,this._fy=0,this._w=0,this._h=0,this._htmlContentHovered=!1}_afterNew(){this._settings.themeTags=A.kE(this._settings.themeTags,["tooltip"]),super._afterNew(),this._setDefaultFn("background",()=>Z.new(this._root,{})).set("themeTags",["tooltip","background"]),this._label=this.children.push(Y.J.new(this._root,{})),this._disposers.push(this._label.events.on("boundschanged",()=>
1{this._updateBackground()})),this._disposers.push(this.on("bounds",()=>{this._updateBackground()})),this._updateTextColor(),this._root.tooltipContainer.children.push(this),this.hide(0),this._disposers.push(this.label.onPrivate("htmlElement",c=>{c&&(this._disposers.push(A.q2(c,"pointerover",r=>{this._htmlContentHovered=!0})),this._disposers.push(A.q2(c,"pointerout",r=>{this._htmlContentHovered=!1})))})),this.on("visible",c=>{this._handleReaderAnnouncement()}),this.label.events.on("dataitemchanged",c=>{this._handleReaderAnnouncement()}),this._root._tooltips.push(this)}_handleReaderAnnouncement(){this.get("readerAnnounce")&&this.isVisibleDeep()&&this._root.readerAlert(this.label.getAccessibleText())}get label(){return this._label}_dispose(){super._dispose(),w.TF(this._root._tooltips,this)}_updateChildren(){super._updateChildren(),(this.isDirty("pointerOrientation")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight"))&&this.get("background")._markDirtyKey("width"),null!=this.get("labelText")&&this.label.set("text",this.get("labelText")),null!=this.get("labelHTML")&&this.label.set("html",this.get("labelHTML")),null!=this.get("labelAriaLabel")&&this.label.set("ariaLabel",this.get("labelAriaLabel"))}_changed(){if(super._changed(),(this.isDirty("pointTo")||this.isDirty("pointerOrientation"))&&this._updateBackgroun
1d(),this.isDirty("tooltipTarget")&&this.updateBackgroundColor(),this.isDirty("keepTargetHover"))if(this.get("keepTargetHover")){const c=this.get("background");this._keepHoverDp=new L.ZT([c.events.on("pointerover",r=>{let g=this.get("tooltipTarget");g&&(g.parent&&g.parent.getPrivate("tooltipTarget")==g&&(g=g.parent),g.hover())}),c.events.on("pointerout",r=>{let g=this.get("tooltipTarget");g&&(g.parent&&g.parent.getPrivate("tooltipTarget")==g&&(g=g.parent),this._htmlContentHovered||g.unhover())})]),this.label.onPrivate("htmlElement",r=>{this._keepHoverDp&&r&&this._keepHoverDp.disposers.push(A.q2(r,"pointerleave",g=>{const _=this.root._renderer.getEvent(g);c.events.dispatch("pointerout",{type:"pointerout",originalEvent:_.event,point:_.point,simulated:!1,target:c})}))})}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let T=this.get("tooltipTarget");const c=this.get("background");let r,g;if(T&&c){if(r=T.get("fill"),g=T.get("stroke"),null==r&&(r=g),this.get("getFillFromSprite")&&(this._fillDp&&this._fillDp.dispose(),null!=r&&c.set("fill",r),this._fillDp=T.on("fill",_=>{null!=_&&(c.set("fill",_),this._updateTextColor(_))}),this._disposers.push(this._fillDp)),this.get("getFillGradientFromSprite")){this._fillGrDp&&this._fillGrDp.dispose();let _=T.get("fillGradient");null!=_&&c.set("fillGradient",_),this._fillGrDp=T.on("fillGradient",l=>{null!=l&&c.set("fillGradient",l)}),this._disposers.push(this._fillGrDp)}this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),null!=r&&c.set("stroke",r),this._strokeDp=T.on("fill",_=>{null!=_&&c.set("stroke",_)}),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),null!=r&&this.label.set("fill",r),this._labelDp=T.on("fill",_=>{null!=_&&this.label.set("fill",_)}),this._disposers.push(this._labelDp))}this._updateTextColor(r)}_updateTextColor(T){this.get("autoTextColor")&&(null==T&&(T=this.get("background").get("fill")),null==T&&(T=this._root.interfaceColors.get("background")),T instanceof C.Q1&&this.label.set("fill",C.Q1.alternative(T,this._root.interfaceColors.get("alternativeText"),this._root.interfaceColors.get("text"))))}_setDataItem(T){super._setDataItem(T),this.label._setDataItem(T)}
1_updateBackground(){super.updateBackground();const T=this._root.container;if(T){let c=.5,r=.5,g=this.get("centerX");g instanceof f.QE&&(c=g.value);let _=this.get("centerY");_ instanceof f.QE&&(r=_.value);let l=T.width(),p=T.height(),S=this.parent,R=0,W=0;if(S){R=S.x(),W=S.y();const Rt=S.get("layerMargin");Rt&&(R+=Rt.left||0,W+=Rt.top||0,l+=(Rt.left||0)+(Rt.right||0),p+=(Rt.top||0)+(Rt.bottom||0))}const j=this.get("bounds",{left:-R,top:-W,right:l-R,bottom:p-W});this._updateBounds();let z=this.width(),U=this.height();0===z&&(z=this._w),0===U&&(U=this._h);let nt=this.get("pointTo",{x:l/2,y:p/2}),it=nt.x,gt=nt.y,N=this.get("pointerOrientation"),tt=this.get("background"),J=0,at=0,vt=0;tt instanceof Z&&(J=tt.get("pointerLength",0),at=tt.get("strokeWidth",0)/2,vt=at,tt.set("width",z),tt.set("height",U));let dt=0,Dt=0,yt=j.right-j.left,pt=j.bottom-j.top;"horizontal"==N||"left"==N||"right"==N?(at=0,"horizontal"==N?it>j.left+yt/2?(it-=z*(1-c)+J,vt*=-1):it+=z*c+J:"left"==N?it+=z*(1-c)+J:(it-=z*c+J,vt*=-1)):(vt=0,"vertical"==N?gt>j.top+U/2+J?gt-=U*(1-r)+J:(gt+=U*r+J,at*=-1):"down"==N?gt-=U*(1-r)+J:(gt+=U*r+J,at*=-1)),it=P.s_(it,j.left+z*c,j.left+yt-z*(1-c))+vt,gt=P.s_(gt,j.top+U*r,j.top+pt-U*(1-r))-at,dt=nt.x-it+z*c+vt,Dt=nt.y-gt+U*r-at,this._fx=it,this._fy=gt;const Pt=this.get("animationDuration",0);if(Pt>0&&this.get("visible")&&this.get("opacity")>.1){const Rt=this.get("animationEasing");this.animate({key:"x",to:it,duration:Pt,easing:Rt}),this.animate({key:"y",to:gt,duration:Pt,easing:Rt})}else this.set("x",it),this.set("y",gt);tt instanceof Z&&(tt.set("pointerX",dt),tt.set("pointerY",Dt)),z>0&&(this._w=z),U>0&&(this._h=U)}}}b.className="Tooltip",b.classNames=X.m.classNames.concat([b.className])},49565(Gt,ut,y){y.d(ut,{N:()=>P});var L=y(87127),Y=y(21653),V=y(45760);class P extends L.P{updateContainer(X){let f=X.get("paddingTop",0),C=X.innerHeight(),w=0;(0,L.l)(X,b=>{if(b.isVisible()&&"relative"==b.get("position")){let m=b.get("height");if(m instanceof V.QE){w+=m.value;let T=C*m.value,c=b.get("minHeight",b.getPrivate("minHeight",-1/0));c>T&&(C-=c,w-=m.value);let r=b.get("maxHeight",b.getPrivate("maxHeight",1/0));T>r&&(C-=r,w-=m.value)}else Y.Et(m)||(m=b.height()),C-=m+b.get("marginTop",0)+b.get("marginBottom",0)}}),(C<=0||C==1/0)&&(C=.1),(0,L.l)(X,b=>{if(b.isVisible()&&"relative"==b.get("position")){let m=b.get("height");if(m instanceof V.QE){let T=C*m.value/w-b.get("marginTop",0)-b.get("marginBottom",0),c=b.get("minHeight",b.getPrivate("minHeight",-1/0)),r=b.get("maxHeight",b.getPrivate("maxHeight",1/0));T=Math.min(Math.max(c,T),r),b.setPrivate("height",T)}else b._prevSettings.height instanceof V.QE&&b.setPrivate("height",void 0)}});let A=f;(0,L.l)(X,b=>{if("relative"==b.get("position"))if(b.isVisible()){let m=b.adjustedLocalBounds(),T=b.get("marginTop",0),c=m.top,r=m.bottom,g=b.get("maxHeight");g&&r-c>g&&(r=c+g);let _=b.get("marginBottom",0),l=A+T-c;b.setPrivate("y",l),A=l+r+_}else b.setPrivate("y",void 0)})}}P.className="VerticalLayout",P.classNames=L.P.classNames.concat([P.className])},39467(Gt,ut,y){y.d(ut,{V:()=>X});var L=y(5983),Y=y(15953),V=y(93863),P=y(41176),Z=y(72887);class X extends L.m{constructor(){super(...arguments),this.homeButton=this.children.push(Y.$.new(this._root,{width:35,height:35,themeTags:["home"]})),this.plusButton=this.children.push(Y.$.new(this._root,{width:35,height:35,themeTags:["plus"]})),this.minusButton=this.children.push(Y.$.new(this._root,{width:35,height:35,themeTags:["minus"]}))}_afterNew(){super._afterNew(),this.set("position","absolute"),this.set("layout",this._root.verticalLayout),this.addTag("zoomtools"),this.plusButton.setAll({icon:V.A.new(this._root,{themeTags:["icon"]}),layout:void 0}),this.minusButton.setAll({icon:V.A.new(this._root,{themeTags:["icon"]}),layout:void 0}),this.homeButton.setAll({icon:V.A.new(this._root,{themeTags:["icon"]}),layout:void 0})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("target")){const C=this.get("target"),w=this._prevSettings.target;C&&(C instanceof Z.b&&(this._targetDisposer=this.addDisposer(C.contents.on("scale",A=>{A==C.get("minZoomLevel")?this.minusButton.set("disabled",!0):this.minusButton.set("disabled",!1),A==C.get("maxZoomLevel")?this.plusButton.set("disabled",!0):this.plusButton.set("disabled",!1)})),this.root.events.once("frameended",()=>{C.get("scale")==C.get("minZoomLevel")&&this.minusButton.set("disabled",!0)})),this._disposer=new P.ZT([this.plusButton.events.on("click",()=>{C.zoomIn()}),this.minusButton.events.on("click",()=>{C.zoomOut()}),this.homeButton.events.on("click",()=>{C.goHome()})])),w&&(this._disposer&&this._disposer.dispose(),this._targetDisposer&&this._targetDisposer.dispose())}}}
1X.className="ZoomTools",X.classNames=L.m.classNames.concat([X.className])},72887(Gt,ut,y){y.d(ut,{b:()=>w});var L=y(5983),Y=y(45760),V=y(28268),P=y(72294),Z=y(19708),X=y(30903),f=y(16202),C=y(21653);class w extends L.m{constructor(){super(...arguments),this._movePoints={},this._downScale=1,this._downX=0,this._downY=0,this.contents=this.children.push(L.m.new(this._root,{width:Y.Q2,height:Y.Q2,x:0,y:0,draggable:!0,background:V.M.new(this._root,{fill:(0,P.yW)(16777215),fillOpacity:0})}))}_afterNew(){super._afterNew();const b=this.contents.events;this._disposers.push(b.on("pointerdown",c=>{this._handleThisDown(c)})),this._disposers.push(b.on("globalpointerup",c=>{this._handleThisUp(c)})),this._disposers.push(b.on("globalpointermove",c=>{this._handleThisMove(c)}));const m=this.contents.get("background");m&&(m.adapters.add("width",c=>20*Number(c)),m.adapters.add("height",c=>20*Number(c)),m.adapters.add("x",c=>Number(c)-m.width()/2),m.adapters.add("y",c=>Number(c)-m.height()/2));const T=this.contents;T.adapters.add("x",c=>{const r=T.get("scale",1);if(C.Et(c)&&r>=1){let g=this.get("maxPanOut",.4),_=T.width();c=Math.min(_*g,c),c=Math.max(this.width()-_*r*(1+g),c)}return c}),T.adapters.add("y",c=>{const r=T.get("scale",1);if(C.Et(c)&&r>=1){let g=this.get("maxPanOut",.4),_=T.height();c=Math.min(_*g,c),c=Math.max(this.height()-_*r*(1+g),c)}return c})}_prepareChildren(){super._prepareChildren(),this.isDirty("wheelable")&&this._handleSetWheel(),this.contents._display.cancelTouch=this.get("pinchZoom",!1)}_handleSetWheel(){this.get("wheelable")?(this._wheelDp&&this._wheelDp.dispose(),this._wheelDp=this.events.on("wheel",b=>{const m=b.originalEvent;if(!Z.ay(m,this))return;m.preventDefault();const T=this.toLocal(b.point);this._handleWheelZoom(m.deltaY,T)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_handleWheelZoom(b,m){let T=this.get("zoomStep",2),c=this.contents.get("scale",1),r=c;b>0?r=c/T:b<0&&(r=c*T),r!=c&&this.zoomToPoint(m,r)}zoomToPoint(b,m){m&&(m=X.s_(m,this.get("minZoomLevel",1),this.get("maxZoomLevel",32)));const T=this.contents.get("scale",1);let c=b.x,r=b.y,g=c,_=r;const l=this.contents;let p=l.x(),S=l.y();return this._animateTo(g-(c-p)/T*m,_-(r-S)/T*m,m),this._za}zoomIn(){return this.zoomToPoint({x:this.width()/2,y:this.height()/2},this.contents.get("scale",1)*this.get("zoomStep",2))}zoomOut(){return this.zoomToPoint({x:this.width()/2,y:this.height()/2},this.contents.get("scale",1)/this.get("zoomStep",2))}goHome(){return this._animateTo(0,0,1)}_animateTo(b,m,T){const c=this.get("animationDuration",0),r=this.get("animationEasing"),g=this.contents;this._txa=g.animate({key:"x",to:b,duration:c,easing:r}),this._tya=g.animate({key:"y",to:m,duration:c,easing:r}),this._za=g.animate({key:"scale",to:T,duration:c,easing:r})}_handleThisUp(b){this._downPoints={}}_handleThisDown(b){const m=this.contents;this._downScale=m.get("scale",1);const T=m._downPoints;let c=f.HP(T).length;if(1==c){let r=T[1];r||(r=T[0]),r&&r.x==b.point.x&&r.y==b.point.y&&(c=0)}if(c>0){this._downX=m.x(),this._downY=m.y();const r=m._getDownPointId();if(r){let g=this._movePoints[r];g&&(m._downPoints[r]=g)}}}_handleThisMove(b){const T=b.originalEvent.pointerId;this.get("pinchZoom")&&T&&(this._movePoints[T]=b.point,f.HP(this.contents._downPoints).length>1)&&this._handlePinch()}_handlePinch(){let b=0,m=[],T=[];if(f.__(this.contents._downPoints,(c,r)=>{m[b]=r;let g=this._movePoints[c];g&&(T[b]=g),b++}),m.length>1&&T.length>1){this.contents._isDragging=!1;let c=m[0],r=m[1],g=T[0],_=T[1];if(c&&r&&g&&_){c=this.toLocal(c),r=this.toLocal(r),g=this.toLocal(g),_=this.toLocal(_);let l=Math.hypot(r.x-c.x,r.y-c.y),S=Math.hypot(_.x-g.x,_.y-g.y)/l*this._downScale,R={x:g.x+(_.x-g.x)/2,y:g.y+(_.y-g.y)/2},W={x:c.x+(r.x-c.x)/2,y:c.y+(r.y-c.y)/2},U=this._downScale;this.contents.setAll({x:R.x-(-(this._downX||0)+W.x)/U*S,y:R.y-(-(this._downY||0)+W.y)/U*S,scale:S})}}}}w.className="ZoomableContainer",w.classNames=L.m.classNames.concat([w.className])},76479(Gt,ut,y){y.d(ut,{N:()=>L});var L=function(Y){return Y.ADD="lighter",Y.COLOR="color",Y.COLOR_BURN="color-burn",Y.COLOR_DODGE="color-dodge",Y.DARKEN="darken",Y.DIFFERENCE="difference",Y.DST_OVER="destination-over",Y.EXCLUSION="exclusion",Y.HARD_LIGHT="hard-light",Y.HUE="hue",Y.LIGHTEN="lighten",Y.LUMINOSITY="luminosity",Y.MULTIPLY="multiply",Y.NORMAL="source-over",Y.OVERLAY="overlay",Y.SATURATION="saturation",Y.SCREEN="screen",Y.SOFT_LIGHT="soft-light",Y.SRC_ATOP="source-atop",Y.XOR="xor",Y}(L||{})},2711(Gt,ut,y){function Y(N){return N}function P(N){return N*N*N}function A(N){return function(tt){return 1-N(1-tt)}}y.d(ut,{FD:()=>A,sn:()=>Y,tA:()=>P});Math;Math.asin(1)},55265(Gt,ut,y){y.d(ut,{wC:()=>r,wB:()=>c});var L=y(41176),Y=y(18788),V=y(72351),P=y(16202),Z=y(2711);class X{constructor(_,l){this._userSettings={},this._entity=_,this._settings=l,P.__(l,p=>{this._userSettings[p]=!0})}get(_,l){const p=this._settings[_];return void 0!==p?p:l}setRaw(_,l){this._settings[_]=l}set(_,l){this._userSettings[_]=!0,this.setRaw(_,l)}remove(_){delete this._userSettings[_],delete this._settings[_]}setAll(_){P.jO(_).forEach(([l,p])=>{this.set(l,p)})}_eachSetting(_){P.__(this._settings,_)}apply(){const _={stateAnimationEasing:!0,stateAnimationDuration:!0},l=this._entity.states.lookup("default");this._eachSetting((p,S)=>{_[p]||(_[p]=!0,this!==l&&(p in l._settings||(l._settings[p]=this._entity.get(p))),this._entity.set(p,S))})}applyAnimate(_){null==_&&(_=this._settings.stateAnimationDuration),null==_&&(_=this.get("stateAnimationDuration",this._entity.get("stateAnimationDuration",0)));let l=this._settings.stateAnimationEasing;null==l&&(l=this.get("stateAnimationEasing",this._entity.get("stateAnimationEasing",Z.tA)));const p=this._entity.states.lookup("default"),S={stateAnimationEasing:!0,stateAnimationDuration:!0},R={};return this._eachSetting((W,j)=>{if(!S[W]){S[W]=!0,this!=p&&(W in p._settings||(p._settings[W]=this._entity.get(W)));const z=this._entity.animate({key:W,to:j,duration:_,easing:l});z&&(R[W]=z)}}),R}}class f{constructor(_){this._states={},this._entity=_}lookup(_){return this._states[_]}create(_,l){const p=this._states[_];if(p)return p.setAll(l),p;{const S=new X(this._entity,l);return this._states[_]=S,S}}remove(_){delete this._states[_]}apply(_){const l=this._states[_];l&&l.apply(),this._entity._applyState(_)}
1applyAnimate(_,l){let p;const S=this._states[_];return S&&(p=S.applyAnimate(l)),this._entity._applyStateAnimated(_,l),p}}var C=y(92489),w=y(26864),A=y(28973);class b{constructor(_){this._callbacks={},this._disabled={},this._entity=_}add(_,l){let p=this._callbacks[_];return void 0===p&&(p=this._callbacks[_]=[]),p.push(l),this._entity._markDirtyKey(_),new L.W_(()=>{w.dm(p,l)&&this._entity._markDirtyKey(_)})}remove(_){const l=this._callbacks[_];void 0!==l&&(delete this._callbacks[_],0!==l.length&&this._entity._markDirtyKey(_))}enable(_){this._disabled[_]&&(delete this._disabled[_],this._entity._markDirtyKey(_))}disable(_){this._disabled[_]||(this._disabled[_]=!0,this._entity._markDirtyKey(_))}fold(_,l){if(!this._disabled[_]){const p=this._callbacks[_];if(void 0!==p)for(let S=0,R=p.length;S<R;++S)l=p[S](l,this._entity,_)}return l}}class m{constructor(_,l,p,S,R,W,j){this._time=0,this._stopped=!1,this._playing=!0,this.events=new Y.Q,this._animation=_,this._from=l,this._to=p,this._duration=S,this._easing=R,this._loops=W,this._interpolate=(0,V.Kh)(l,p),this._oldTime=j}get to(){return this._to}get from(){return this._from}get playing(){return this._playing}get stopped(){return this._stopped}stop(){this._stopped||(this._stopped=!0,this._playing=!1,this.events.isEnabled("stopped")&&this.events.dispatch("stopped",{type:"stopped",target:this}))}pause(){this._playing=!1,this._oldTime=null}play(){!this._stopped&&!this._playing&&(this._playing=!0,this._animation._startAnimation())}get percentage(){return this._time/this._duration}waitForStop(){return new Promise((_,l)=>{if(this._stopped)_();else{const S=this.events.on("stopped",()=>{S.dispose(),_()})}})}_checkEnded(){return!(this._loops>1&&(--this._loops,1))}_run(_){null!==this._oldTime&&(this._time+=_-this._oldTime,this._time>this._duration&&(this._time=this._duration)),this._oldTime=_}_reset(_){this._oldTime=_,this._time=0}_value(_){return _>=1?this._to:_<=0?this._from:this._interpolate(this._easing(_),this._from,this._to)}}let T=0;class c{constructor(_){this.uid=++T,this._privateSettings={},this._settingEvents={},this._privateSettingEvents={},this._prevSettings={},this._prevPrivateSettings={},this._animatingSettings={},this._animatingPrivateSettings={},this._disposed=!1,this._userProperties={},this.enableDispose=!0,this._settings=_}_checkDirty(){P.HP(this._settings).forEach(_=>{this._userProperties[_]=!0,this._markDirtyKey(_)})}resetUserSettings(){this._userProperties={}}_runAnimation(_){let l=V.oA.Stopped;if(!this.isDisposed()){let p=!1,S=!1;P.__(this._animatingSettings,(R,W)=>{if(W.stopped)this._stopAnimation(R);else if(W.playing){W._run(_);const j=W.percentage;j>=1?W._checkEnded()?this.set(R,W._value(1)):(p=!0,W._reset(_),this._set(R,W._value(1))):(p=!0,this._set(R,W._value(j)))}else S=!0}),P.__(this._animatingPrivateSettings,(R,W)=>{if(W.stopped)this._stopAnimationPrivate(R);else if(W.playing){W._run(_);const j=W.percentage;j>=1?W._checkEnded()?this.setPrivate(R,W._value(1)):(p=!0,W._reset(_),this._setPrivate(R,W._value(1))):(p=!0,this._setPrivate(R,W._value(j)))}else S=!0}),p?l=V.oA.Playing:S&&(l=V.oA.Paused)}return l}_markDirtyKey(_){this.markDirty()}_markDirtyPrivateKey(_){this.markDirty()}on(_,l){let p=this._settingEvents[_];return void 0===p&&(p=this._settingEvents[_]=[]),p.push(l),new L.W_(()=>{w.dm(p,l),0===p.length&&delete this._settingEvents[_]})}off(_,l){let p=this._settingEvents[_];void 0!==p&&void 0!==l?w.dm(p,l):delete this._settingEvents[_]}onPrivate(_,l){let p=this._privateSettingEvents[_];return void 0===p&&(p=this._privateSettingEvents[_]=[]),p.push(l),new L.W_(()=>{w.dm(p,l),0===p.length&&delete this._privateSettingEvents[_]})}offPrivate(_,l){let p=this._privateSettingEvents[_];void 0!==p&&void 0!==l?w.dm(p,l):delete this._privateSettingEvents[_]}getRaw(_,l){const p=this._settings[_];return void 0!==p?p:l}has(_){return _ in this._settings}get(_,l){return this.getRaw(_,l)}_sendKeyEvent(_,l){const p=this._settingEvents[_];void 0!==p&&w.__(p,S=>{S(l,this,_)})}_sendPrivateKeyEvent(_,l){const p=this._privateSettingEvents[_];void 0!==p&&w.__(p,S=>{S(l,this,_)})}_setRaw(_,l,p){this._prevSettings[_]=l,this._sendKeyEvent(_,p)}setRaw(_,l){const p=this._settings[_];this._settings[_]=l,p!==l&&this._setRaw(_,p,l)}_set(_,l){const p=this._settings[_];this._settings[_]=l,p!==l&&(this._setRaw(_,p,l),this._markDirtyKey(_))}_stopAnimation(_){const l=this._animatingSettings[_];l&&(delete this._animatingSettings[_],l.stop())}set(_,l){return this._set(_,l),this._stopAnimation(_),l}remove(_){_ in this._settings&&(this._prevSettings[_]=this._settings[_],delete this._settings[_],this._sendKeyEvent(_,void 0),this._markDirtyKey(_)),this._stopAnimation(_)}removeAll(){w.__(P.HP(this._settings),_=>{this.remove(_)})}getPrivate(_,l){const p=this._privateSettings[_];return void 0!==p?p:l}_setPrivateRaw(_,l,p){this._prevPrivateSettings[_]=l,this._sendPrivateKeyEvent(_,p)}setPrivateRaw(_,l){const p=this._privateSettings[_];this._privateSettings[_]=l,p!==l&&this._setPrivateRaw(_,p,l)}_setPrivate(_,l){const p=this._privateSettings[_];this._privateSettings[_]=l,p!==l&&(this._setPrivateRaw(_,p,l),this._markDirtyPrivateKey(_))}_stopAnimationPrivate(_){const l=this._animatingPrivateSettings[_];l&&(l.stop(),delete this._animatingPrivateSettings[_])}setPrivate(_,l){return this._setPrivate(_,l),this._stopAnimationPrivate(_),l}removePrivate(_){_ in this._privateSettings&&(this._prevPrivateSettings[_]=this._privateSettings[_],delete this._privateSettings[_],this._markDirtyPrivateKey(_)),this._stopAnimationPrivate(_)}setAll(_){P.__(_,(l,p)=>{this.set(l,p)})}animate(_){const l=_.key,p=_.to,S=_.duration||0,R=_.loops||1,W=void 0===_.from?this.get(l):_.from,j=void 0===_.easing?Z.sn:_.easing;if(0===S)this.set(l,p);else{if(void 0!==W&&W!==p){this.set(l,W);const U=this._animatingSettings[l]=new m(this,W,p,S,j,R,this._animationTime());return this._startAnimation(),U}this.set(l,p)}const z=new m(this,W,p,S,j,R,null);return z.stop(),z}animatePrivate(_){const l=_.key,p=_.to,S=_.duration||0,R=_.loops||1,W=void 0===_.from?this.getPrivate(l):_.from,j=void 0===_.easing?Z.sn:_.easing;if(0===S)this.setPrivate(l,p);else{if(void 0!==W&&W!==p){this.setPrivate(l,W);const U=this._animatingPrivateSettings[l]=new m(this,W,p,S,j,R,this._animationTime());return this._startAnimation(),U}this.setPrivate(l,p)}const z=new m(this,W,p,S,j,R,null);return z.stop(),z}_dispose(){}isDisposed(){return this._disposed}dispose(){this.enableDispose&&!this._disposed&&(this._disposed=!0,this._dispose())}}let r=(()=>{class g extends c{constructor(l,p,S,R=[]){if(super(p),this.states=new f(this),this.adapters=new b(this),this.events=this._createEvents(),this._userPrivateProperties={},this._dirty={},this._dirtyPrivate={},this._templates=[],this._defaultThemes=[],this._templateDisposers=[],this._disposers=[],this._runSetup=!0,this._disposerProperties={},!S)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._root=l,this._internalTemplates=R,p.id&&this._registerId(p.id)}static new(l,p,S){const R=new this(l,p,!0);return R._template=S,R._afterNew(),R}static _new(l,p,S=[]){const R=new this(l,p,!0,S);return R._afterNew(),R}_afterNew(){this._checkDirty();let l=!1;const p=this._template;p&&(l=!0,p._setObjectTemplate(this)),w.__(this._internalTemplates,S=>{l=!0,S._setObjectTemplate(this)}),l&&this._applyTemplates(!1),this.states.create("default",{}),this._setDefaults()}_afterNewApplyThemes(){this._checkDirty();const l=this._template;l&&l._setObjectTemplate(this),w.__(this._internalTemplates,p=>{p._setObjectTemplate(this)}),this.states.create("default",{}),this._setDefaults(),this._applyThemes()}_createEvents(){return new Y.Q}get classNames(){return this.constructor.classNames}get className(){return this.constructor.className}_setDefaults(){}_setDefaultFn(l,p){const S=this.get(l);if(S)return S;{const R=p();return this.set(l,R),R}}_setDefault(l,p){this.has(l)||super.set(l,p)}_setRawDefault(l,p){this.has(l)||super.setRaw(l,p)}
1_clearDirty(){P.HP(this._dirty).forEach(l=>{this._dirty[l]=!1}),P.HP(this._dirtyPrivate).forEach(l=>{this._dirtyPrivate[l]=!1})}isDirty(l){return!!this._dirty[l]}isPrivateDirty(l){return!!this._dirtyPrivate[l]}_markDirtyKey(l){this._dirty[l]=!0,super._markDirtyKey(l)}_markDirtyPrivateKey(l){this._dirtyPrivate[l]=!0,super._markDirtyKey(l)}isType(l){return-1!==this.classNames.indexOf(l)}_pushPropertyDisposer(l,p){let S=this._disposerProperties[l];return void 0===S&&(S=this._disposerProperties[l]=[]),S.push(p),p}_disposeProperty(l){const p=this._disposerProperties[l];void 0!==p&&(w.__(p,S=>{S.dispose()}),delete this._disposerProperties[l])}set template(l){const p=this._template;p!==l&&(this._template=l,p&&p._removeObjectTemplate(this),l&&l._setObjectTemplate(this),this._applyTemplates())}get template(){return this._template}markDirty(){this._root._addDirtyEntity(this)}_startAnimation(){this._root._addAnimation(this)}_animationTime(){return this._root.animationTime}_applyState(l){}_applyStateAnimated(l,p){}get(l,p){const S=this.adapters.fold(l,this._settings[l]);return void 0!==S?S:p}isUserSetting(l){return this._userProperties[l]||!1}set(l,p){return this._userProperties[l]=!0,super.set(l,p)}setRaw(l,p){this._userProperties[l]=!0,super.setRaw(l,p)}_setSoft(l,p){return this._userProperties[l]?p:super.set(l,p)}remove(l){delete this._userProperties[l],this._removeTemplateProperty(l)}setPrivate(l,p){return this._userPrivateProperties[l]=!0,super.setPrivate(l,p)}setPrivateRaw(l,p){this._userPrivateProperties[l]=!0,super.setPrivateRaw(l,p)}removePrivate(l){delete this._userPrivateProperties[l],this._removeTemplatePrivateProperty(l)}_setTemplateProperty(l,p,S){this._userProperties[p]||l===this._findTemplateByKey(p)&&super.set(p,S)}_setTemplatePrivateProperty(l,p,S){this._userPrivateProperties[p]||l===this._findTemplateByPrivateKey(p)&&super.setPrivate(p,S)}_removeTemplateProperty(l){if(!this._userProperties[l]){const p=this._findTemplateByKey(l);p?super.set(l,p._settings[l]):super.remove(l)}}_removeTemplatePrivateProperty(l){if(!this._userPrivateProperties[l]){const p=this._findTemplateByPrivateKey(l);p?super.setPrivate(l,p._privateSettings[l]):super.removePrivate(l)}}_walkParents(l){l(this._root._rootContainer),l(this)}_applyStateByKey(l){const p=this.states.create(l,{}),S={};this._eachTemplate(R=>{const W=R.states.lookup(l);W&&W._apply(p,S)}),P.__(p._settings,R=>{!S[R]&&!p._userSettings[R]&&p.remove(R)})}_applyTemplate(l,p){this._templateDisposers.push(l._apply(this,p)),P.__(l._settings,(S,R)=>{!p.settings[S]&&!this._userProperties[S]&&(p.settings[S]=!0,super.set(S,R))}),P.__(l._privateSettings,(S,R)=>{!p.privateSettings[S]&&!this._userPrivateProperties[S]&&(p.privateSettings[S]=!0,super.setPrivate(S,R))}),this._runSetup&&l.setup&&(this._runSetup=!1,l.setup(this))}_findStaticTemplate(l){if(this._template&&l(this._template))return this._template}_eachTemplate(l){this._findStaticTemplate(p=>(l(p),!1)),w.W$(this._internalTemplates,l),w.__(this._templates,l)}_applyTemplates(l=!0){l&&this._disposeTemplates();const p={settings:{},privateSettings:{},states:{}};this._eachTemplate(S=>{this._applyTemplate(S,p)}),l&&(P.__(this._settings,S=>{!this._userProperties[S]&&!p.settings[S]&&super.remove(S)}),P.__(this._privateSettings,S=>{!this._userPrivateProperties[S]&&!p.privateSettings[S]&&super.removePrivate(S)}))}_findTemplate(l){const p=this._findStaticTemplate(l);if(void 0===p){const S=w.um(this._internalTemplates,l);return void 0===S?w.I6(this._templates,l):S}return p}_findTemplateByKey(l){return this._findTemplate(p=>l in p._settings)}_findTemplateByPrivateKey(l){return this._findTemplate(p=>l in p._privateSettings)}_disposeTemplates(){w.__(this._templateDisposers,l=>{l.dispose()}),this._templateDisposers.length=0}_removeTemplates(){w.__(this._templates,l=>{l._removeObjectTemplate(this)}),this._templates.length=0}_applyThemes(l=!1){if(this.get("ignoreThemes"))return!1;let p=!1;const S=[];let R=[];const W=new Set,j=this.get("themeTagsSelf");return j&&w.__(j,z=>{W.add(z)}),this._walkParents(z=>{z===this._root._rootContainer&&(p=!0),z._defaultThemes.length>0&&S.push(z._defaultThemes);const U=z.get("themes");U&&R.push(U);const nt=z.get("themeTags");nt&&w.__(nt,it=>{W.add(it)})}),R=S.concat(R),this._removeTemplates(),(p||l)&&w.W$(this.classNames,z=>{const U=[];w.__(R,nt=>{w.__(nt,it=>{const gt=it._lookupRules(z);gt&&w.W$(gt,N=>{if(N.tags.every(J=>W.has(J))){const J=w.wo(U,at=>{const vt=A.UD(N.tags.length,at.tags.length);return 0===vt?A.HN(N.tags,at.tags,A.UD):vt});U.splice(J.index,0,N)}})})}),w.__(U,nt=>{this._templates.push(nt.template),nt.template._setObjectTemplate(this)})}),this._applyTemplates(),(p||l)&&(this._runSetup=!1),p||l}_changed(){}_beforeChanged(){if(this.isDirty("id")){const l=this.get("id");l&&this._registerId(l);const p=this._prevSettings.id;p&&(delete this._root.entitiesById[p],delete C.u5.entitiesById[p])}}_registerId(l){if(this._root.entitiesById[l]&&this._root.entitiesById[l]!==this)throw new Error('An entity with id "'+l+'" already exists.');this._root.entitiesById[l]=this,C.u5.entitiesById[l]=this}_afterChanged(){}addDisposer(l){return this._disposers.push(l),l}_dispose(){super._dispose();const l=this._template;l&&l._removeObjectTemplate(this),w.__(this._internalTemplates,S=>{S._removeObjectTemplate(this)}),this._removeTemplates(),this._disposeTemplates(),this.events.dispose(),this._disposers.forEac
1h(S=>{S.dispose()}),P.__(this._disposerProperties,(S,R)=>{w.__(R,W=>{W.dispose()})});const p=this.get("id");p&&(delete this._root.entitiesById[p],delete C.u5.entitiesById[p])}setTimeout(l,p){const S=setTimeout(()=>{this.removeDispose(R),l()},p),R=new L.W_(()=>{clearTimeout(S)});return this._disposers.push(R),R}removeDispose(l){if(!this.isDisposed()){let p=w.qh(this._disposers,l);p>-1&&this._disposers.splice(p,1)}l.dispose()}hasTag(l){return-1!==w.qh(this.get("themeTags",[]),l)}addTag(l){if(!this.hasTag(l)){const p=this.get("themeTags",[]);p.push(l),this.set("themeTags",p)}}removeTag(l){if(this.hasTag(l)){const p=this.get("themeTags",[]);w.TF(p,l),this.set("themeTags",p)}}_t(l,p,...S){return this._root.language.translate(l,p,...S)}get root(){return this._root}}return g.className="Entity",g.classNames=["Entity"],g})()},18788(Gt,ut,y){y.d(ut,{Q:()=>P});var L=y(41176),Y=y(26864),V=y(21653);class P{constructor(){this._listeners=[],this._killed=[],this._disabled={},this._iterating=0,this._enabled=!0,this._disposed=!1}isDisposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;const f=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{Y.__(f,C=>{C.disposer.dispose()})}finally{this._killed=null,this._iterating=null}}}hasListeners(){return 0!==this._listeners.length}hasListenersByType(f){return Y.bz(this._listeners,C=>(null===C.type||C.type===f)&&!C.killed)}enable(){this._enabled=!0}disable(){this._enabled=!1}enableType(f){delete this._disabled[f]}disableType(f,C=1/0){this._disabled[f]=C}_removeListener(f){if(0===this._iterating){const C=this._listeners.indexOf(f);if(-1===C)throw new Error("Invalid state: could not remove listener");this._listeners.splice(C,1)}else this._killed.push(f)}_removeExistingListener(f,C,w,A){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(b=>{b.once===f&&b.type===C&&(void 0===w||b.callback===w)&&b.context===A&&b.disposer.dispose()})}isEnabled(f){if(this._disposed)throw new Error("EventDispatcher is disposed");return this._enabled&&this._listeners.length>0&&this.hasListenersByType(f)&&void 0===this._disabled[f]}removeType(f){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(C=>{C.type===f&&C.disposer.dispose()})}has(f,C,w){return-1!==Y.SL(this._listeners,b=>!0!==b.once&&b.type===f&&(void 0===C||b.callback===C)&&b.context===w)}_shouldDispatch(f){if(this._disposed)throw new Error("EventDispatcher is disposed");const C=this._disabled[f];return V.Et(C)?(C<=1?delete this._disabled[f]:--this._disabled[f],!1):this._enabled}_eachListener(f){++this._iterating;try{Y.__(this._listeners,f)}finally{--this._iterating,0===this._iterating&&0!==this._killed.length&&(Y.__(this._killed,C=>{this._removeListener(C)}),this._killed.length=0)}}dispatch(f,C){this._shouldDispatch(f)&&this._eachListener(w=>{!w.killed&&(null===w.type||w.type===f)&&(w._debounceDelay?(w._debounceTimeout&&window.clearTimeout(w._debounceTimeout),w._debounceTimeout=window.setTimeout(()=>{w._debounceTimeout=void 0,w.killed||w.dispatch(f,C)},w._debounceDelay)):w.dispatch(f,C))})}_on(f,C,w,A,b,m,T){if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(f,C,w,A);const c={type:C,callback:w,context:A,shouldClone:b,dispatch:m,killed:!1,once:f,disposer:new L.W_(()=>{c.killed=!0,c._debounceTimeout&&window.clearTimeout(c._debounceTimeout),this._removeListener(c)}),_debounceDelay:T};return this._listeners.push(c),c}onAll(f,C,w=!0){return this._on(!1,null,f,C,w,(A,b)=>f.call(C,b)).disposer}on(f,C,w,A=!0){return this._on(!1,f,C,w,A,(b,m)=>C.call(w,m)).disposer}onDebounced(f,C,w,A,b=!0){return this._on(!1,f,C,A,b,(m,T)=>C.call(A,T),w).disposer}once(f,C,w,A=!0){const b=this._on(!0,f,C,w,A,(m,T)=>{b.disposer.dispose(),C.call(w,T)});return b.disposer}off(f,C,w){this._removeExistingListener(!1,f,C,w)}copyFrom(f){if(this._disposed)throw new Error("EventDispatcher is disposed");if(f===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");const C=[];return Y.__(f._listeners,w=>{!w.killed&&w.shouldClone&&C.push(null===w.type?this.onAll(w.callback,w.context):w.once?this.once(w.type,w.callback,w.context):this.on(w.type,w.callback,w.context))}),new L.ZT(C)}}},34521(Gt,ut,y){y.d(ut,{B8:()=>P,TS:()=>X,fo:()=>Z});var L=y(18788),Y=y(26864);
1function V(f,C){if(!(f>=0&&f<C))throw new Error("Index out of bounds: "+f)}class P{constructor(C=[]){this.events=new L.Q,this._values=C}get values(){return this._values}contains(C){return-1!==this._values.indexOf(C)}removeValue(C){let w=0,A=this._values.length;for(;w<A;)this._values[w]===C?(this.removeIndex(w),--A):++w}indexOf(C){return Y.qh(this._values,C)}get length(){return this._values.length}hasIndex(C){return C>=0&&C<this._values.length}getIndex(C){return this._values[C]}_onPush(C){this.events.isEnabled("push")&&this.events.dispatch("push",{type:"push",target:this,newValue:C})}_onInsertIndex(C,w){this.events.isEnabled("insertIndex")&&this.events.dispatch("insertIndex",{type:"insertIndex",target:this,index:C,newValue:w})}_onSetIndex(C,w,A){this.events.isEnabled("setIndex")&&this.events.dispatch("setIndex",{type:"setIndex",target:this,index:C,oldValue:w,newValue:A})}_onSwap(C,w){this.events.isEnabled("swap")&&this.events.dispatch("swap",{type:"swap",target:this,a:C,b:w})}_onRemoveIndex(C,w){this.events.isEnabled("removeIndex")&&this.events.dispatch("removeIndex",{type:"removeIndex",target:this,index:C,oldValue:w})}_onMoveIndex(C,w,A){this.events.isEnabled("moveIndex")&&this.events.dispatch("moveIndex",{type:"moveIndex",target:this,oldIndex:C,newIndex:w,value:A})}_onClear(C){this.events.isEnabled("clear")&&this.events.dispatch("clear",{type:"clear",target:this,oldValues:C})}setIndex(C,w){V(C,this._values.length);const A=this._values[C];return A!==w&&(this._values[C]=w,this._onSetIndex(C,A,w)),A}insertIndex(C,w){return V(C,this._values.length+1),Y.At(this._values,C,w),this._onInsertIndex(C,w),w}swap(C,w){const A=this._values.length;if(V(C,A),V(w,A),C!==w){const b=this._values[C],m=this._values[w];this._values[C]=m,this._values[w]=b,this._onSwap(b,m)}}removeIndex(C){V(C,this._values.length);const w=this._values[C];return Y.xR(this._values,C),this._onRemoveIndex(C,w),w}moveValue(C,w){let A=this.indexOf(C);if(-1!==A)if(Y.xR(this._values,A),null==w){const b=this._values.length;this._values.push(C),this._onMoveIndex(A,b,C)}else Y.At(this._values,w,C),this._onMoveIndex(A,w,C);else null==w?(this._values.push(C),this._onPush(C)):(Y.At(this._values,w,C),this._onInsertIndex(w,C));return C}push(C){return this._values.push(C),this._onPush(C),C}unshift(C){return this.insertIndex(0,C),C}pushAll(C){Y.__(C,w=>{this.push(w)})}copyFrom(C){this.pushAll(C._values)}pop(){return this._values.length-1<0?void 0:this.removeIndex(this._values.length-1)}shift(){return this._values.length?this.removeIndex(0):void 0}setAll(C){const w=this._values;this._values=[],this._onClear(w),Y.__(C,A=>{this._values.push(A),this._onPush(A)})}clear(){this.setAll([])}*[Symbol.iterator](){const C=this._values.length;for(let w=0;w<C;++w)yield this._values[w]}each(C){Y.__(this._values,C)}eachReverse(C){Y.W$(this._values,C)}}class Z extends P{constructor(){super(...arguments),this.autoDispose=!0,this._disposed=!1}swap(C,w){const A=this.autoDispose;this.autoDispose=!1,super.swap(C,w),this.autoDispose=A}_onSetIndex(C,w,A){this.autoDispose&&w.dispose(),super._onSetIndex(C,w,A)}_onRemoveIndex(C,w){this.autoDispose&&w.dispose(),super._onRemoveIndex(C,w)}_onClear(C){this.autoDispose&&Y.__(C,w=>{w.dispose()}),super._onClear(C)}_dispose(){this.autoDispose&&Y.__(this._values,C=>{C.dispose()})}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}}class X extends Z{constructor(C,w){super(),this.template=C,this.make=w}_dispose(){super._dispose(),this.autoDispose&&this.template.dispose()}}},30903(Gt,ut,y){y.d(ut,{F8:()=>b,HQ:()=>p,Ki:()=>r,LI:()=>X,Ml:()=>m,_H:()=>S,_Z:()=>_,gn:()=>T,iR:()=>Z,mk:()=>f,n0:()=>c,nr:()=>P,s_:()=>A});var L=y(21653);const Y=Math.PI,P=Y/180,Z=180/Y;function X(N,tt,J){if(!(0,L.Et)(tt)||tt<=0){let at=Math.round(N);return J&&at-N==.5&&at--,at}{let at=Math.pow(10,tt);return Math.round(N*at)/at}}function f(N,tt){if(!(0,L.Et)(tt)||tt<=0)return Math.ceil(N);{let J=Math.pow(10,tt);return Math.ceil(N*J)/J}}function A(N,tt,J){return Math.min(Math.max(N,tt),J)}function b(N){return Math.sin(P*N)}function m(N){return Math.tan(P*N)}function T(N){return Math.cos(P*N)}function c(N){return(N%=360)<0&&(N+=360),N}function r(N,tt,J,at,vt){let dt=Number.MAX_VALUE,Dt=Number.MAX_VALUE,yt=-Number.MAX_VALUE,pt=-Number.MAX_VALUE,Pt=[];Pt.push(g(vt,J)),Pt.push(g(vt,at));
1let Rt=Math.min(90*Math.floor(J/90),90*Math.floor(at/90)),Tt=Math.max(90*Math.ceil(J/90),90*Math.ceil(at/90));for(let Ct=Rt;Ct<=Tt;Ct+=90)Ct>=J&&Ct<=at&&Pt.push(g(vt,Ct));for(let Ct=0;Ct<Pt.length;Ct++){let rt=Pt[Ct];rt.x<dt&&(dt=rt.x),rt.y<Dt&&(Dt=rt.y),rt.x>yt&&(yt=rt.x),rt.y>pt&&(pt=rt.y)}return{left:N+dt,top:tt+Dt,right:N+yt,bottom:tt+pt}}function g(N,tt){return{x:N*T(tt),y:N*b(tt)}}function _(N){const tt=N.length;if(tt>0){let J=N[0],at=J.left,vt=J.top,dt=J.right,Dt=J.bottom;if(tt>1)for(let yt=1;yt<tt;yt++)J=N[yt],at=Math.min(J.left,at),dt=Math.max(J.right,dt),vt=Math.min(J.top,vt),Dt=Math.max(J.bottom,Dt);return{left:at,right:dt,top:vt,bottom:Dt}}return{left:0,right:0,top:0,bottom:0}}function p(N,tt){return N.x>=tt.left&&N.y>=tt.top&&N.x<=tt.right&&N.y<=tt.bottom}function S(N,tt){tt||(tt={x:2*N.x,y:2*N.y});let vt=Math.atan2(tt.y-N.y,tt.x-N.x)*Z;return vt<0&&(vt+=360),c(vt)}},28973(Gt,ut,y){function L(Z,X){return Z===X?0:Z<X?-1:1}function Y(Z,X,f){const C=Z.length,w=X.length,A=Math.min(C,w);for(let b=0;b<A;++b){const m=f(Z[b],X[b]);if(0!==m)return m}return L(C,w)}function P(Z,X){return Z===X?0:Z<X?-1:1}y.d(ut,{HN:()=>Y,UD:()=>L,r9:()=>P})},43058(Gt,ut,y){y.d(ut,{Iy:()=>Z});var L=y(21653),Y=y(19708),V=y(34908),P=y(8346);function Z(w,A){if(null!=A){let m,b=(A=P.g.escape(A=""+A)).match(/\{([^}]+)\}/g);if(b)for(m=0;m<b.length;m++){let c=X(w,b[m].replace(/\{([^}]+)\}/,"$1"),"");null==c&&(c=""),A=A.split(b[m]).join(c)}A=P.g.unescape(A)}else A="";return A}function X(w,A,b){let m;const T=w.dataItem;let g,c=[],r=/(format[a-zA-Z]*)\((.*)\)|([^.]+)/g;for(;g=r.exec(A),null!==g;)if(g[3]){c.push({prop:g[3]});const _=w.getDateFormatter().get("dateFields",[]),l=w.getNumberFormatter().get("numericFields",[]),p=w.getDurationFormatter().get("durationFields",[]);-1!==_.indexOf(g[3])?c.push({method:"formatDate",params:[]}):-1!==l.indexOf(g[3])?c.push({method:"formatNumber",params:[]}):-1!==p.indexOf(g[3])&&c.push({method:"formatDuration",params:[]})}else{let _=[];
1if(""!=Y.Bq(g[2])){let p,l=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g;for(;p=l.exec(g[2]),null!==p;)_.push(p[1]||p[2]||p[3])}c.push({method:g[1],params:_})}if(T){m=C(w,c,T._settings),(null==m||L.Gv(m))&&(m=C(w,c,T));let _=T.dataContext;null==m&&_&&(m=C(w,c,_),null==m&&(m=C(w,[{prop:A}],_)),null==m&&_.dataContext&&(m=C(w,c,_.dataContext))),null==m&&T.component&&T.component.dataItem!==T&&(m=X(T.component,A,b))}return null==m&&(m=C(w,c,w)),null==m&&w.parent&&(m=X(w.parent,A,b)),m}function f(w,A){const b=w.getPrivate("customData");if(L.Gv(b))return b[A]}function C(w,A,b,m){let T=b,c=!1;for(let r=0,g=A.length;r<g;r++){let _=A[r];if(_.prop){if(T instanceof V.k){let l=T.get(_.prop);null==l&&(l=T.getPrivate(_.prop)),null==l&&(l=f(T,_.prop)),null==l&&(l=T[_.prop]),T=l}else if(T.get){let l=T.get(_.prop);null==l&&(l=T[_.prop]),T=l}else T=T[_.prop];if(null==T)return}else switch(_.method){case"formatNumber":let l=L.Ro(T);null!=l&&(T=w.getNumberFormatter().format(l,m||_.params[0]||void 0),c=!0);break;case"formatDate":let p=L.ay(T);if(!L.$P(p)||L.yr(p.getTime()))return;null!=p&&(T=w.getDateFormatter().format(p,m||_.params[0]||void 0),c=!0);break;case"formatDuration":let S=L.Ro(T);null!=S&&(T=w.getDurationFormatter().format(S,m||_.params[0]||void 0,_.params[1]||void 0),c=!0);break;case"urlEncode":case"encodeURIComponent":T=encodeURIComponent(T);break;default:T[_.method]&&T[_.method].apply(b,_.params)}}if(!c){let r=[{method:"",params:m}];if(null==m)L.Et(T)?(r[0].method="formatNumber",r[0].params=""):L.$P(T)&&(r[0].method="formatDate",r[0].params="");else{let g=Y.gV(m);"number"===g?r[0].method="formatNumber":"date"===g?r[0].method="formatDate":"duration"===g&&(r[0].method="formatDuration")}r[0].method&&(T=C(w,r,T))}return T}},79691(Gt,ut,y){y.d(ut,{Bj:()=>A});var L=y(18788),Y=y(41176),V=y(26864),P=y(16202),Z=y(21653);function X(b){P.__(b,(m,T)=>{Z.Gv(T)&&"function"==typeof T.dispose&&(T.enableDispose=!0,T.dispose())})}class f{constructor(m,T,c){this._name=m,this._template=T,this._settings=c}_dispose(){X(this._settings)}get(m,T){const c=this._settings[m];return void 0!==c?c:T}set(m,T){this._settings[m]=T,this._template._stateChanged(this._name)}remove(m){delete this._settings[m],this._template._stateChanged(this._name)}setAll(m){P.HP(m).forEach(T=>{this._settings[T]=m[T]}),this._template._stateChanged(this._name)}_apply(m,T){P.__(this._settings,(c,r)=>{!T[c]&&!m._userSettings[c]&&(T[c]=!0,m.setRaw(c,r))})}}class C{constructor(m){this._states={},this._template=m}_dispose(){P.__(this._states,(m,T)=>{T._dispose()})}lookup(m){return this._states[m]}create(m,T){const c=this._states[m];if(c)return c.setAll(T),c;{const r=new f(m,this._template,T);return this._states[m]=r,this._template._stateChanged(m),r}}remove(m){delete this._states[m],this._template._stateChanged(m)}_apply(m,T){P.__(this._states,(c,r)=>{let g=T.states[c];null==g&&(g=T.states[c]={});const _=m.states.create(c,{});r._apply(_,g)})}}class w{constructor(){this._callbacks={}}add(m,T){let c=this._callbacks[m];return void 0===c&&(c=this._callbacks[m]=[]),c.push(T),new Y.W_(()=>{V.dm(c,T),0===c.length&&delete this._callbacks[m]})}remove(m){void 0!==this._callbacks[m]&&delete this._callbacks[m]}_apply(m){const T=[];return P.__(this._callbacks,(c,r)=>{V.__(r,g=>{T.push(m.adapters.add(c,g))})}),new Y.ZT(T)}}class A{constructor(m,T){if(this._disposed=!1,this._privateSettings={},this._settingEvents={},this._privateSettingEvents={},this._entities=[],this.states=new C(this),this.adapters=new w,this.events=new L.Q,!T)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=m}static new(m){return new A(m,!0)}_dispose(){X(this._settings),X(this._privateSettings)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}_checkDisposed(){if(this._disposed)throw new Error("Template is disposed")}get entities(){return this._entities}get(m,T){this._checkDisposed();const c=this._settings[m];return void 0!==c?c:T}setRaw(m,T){this._checkDisposed(),this._settings[m]=T}set(m,T){this._checkDisposed(),this._settings[m]!==T&&(this.setRaw(m,T),this._entities.forEac
1h(c=>{c._setTemplateProperty(this,m,T)}))}remove(m){this._checkDisposed(),m in this._settings&&(delete this._settings[m],this._entities.forEach(T=>{T._removeTemplateProperty(m)}))}removeAll(){this._checkDisposed(),P.__(this._settings,(m,T)=>{this.remove(m)})}getPrivate(m,T){this._checkDisposed();const c=this._privateSettings[m];return void 0!==c?c:T}setPrivateRaw(m,T){return this._checkDisposed(),this._privateSettings[m]=T,T}setPrivate(m,T){return this._checkDisposed(),this._privateSettings[m]!==T&&(this.setPrivateRaw(m,T),this._entities.forEach(c=>{c._setTemplatePrivateProperty(this,m,T)})),T}removePrivate(m){this._checkDisposed(),m in this._privateSettings&&(delete this._privateSettings[m],this._entities.forEach(T=>{T._removeTemplatePrivateProperty(m)}))}setAll(m){this._checkDisposed(),P.__(m,(T,c)=>{this.set(T,c)})}on(m,T){this._checkDisposed();let c=this._settingEvents[m];return void 0===c&&(c=this._settingEvents[m]=[]),c.push(T),new Y.W_(()=>{V.dm(c,T),0===c.length&&delete this._settingEvents[m]})}onPrivate(m,T){this._checkDisposed();let c=this._privateSettingEvents[m];return void 0===c&&(c=this._privateSettingEvents[m]=[]),c.push(T),new Y.W_(()=>{V.dm(c,T),0===c.length&&delete this._privateSettingEvents[m]})}_apply(m,T){this._checkDisposed();const c=[];return P.__(this._settingEvents,(r,g)=>{V.__(g,_=>{c.push(m.on(r,_))})}),P.__(this._privateSettingEvents,(r,g)=>{V.__(g,_=>{c.push(m.onPrivate(r,_))})}),this.states._apply(m,T),c.push(this.adapters._apply(m)),c.push(m.events.copyFrom(this.events)),new Y.ZT(c)}_setObjectTemplate(m){this._checkDisposed(),this._entities.push(m)}_removeObjectTemplate(m){V.TF(this._entities,m)}_stateChanged(m){this._checkDisposed(),this._entities.forEach(T=>{T._applyStateByKey(m)})}}},8346(Gt,ut,y){y.d(ut,{g:()=>V});var L=y(72294),Y=y(21653);let V=(()=>{class P{static escape(X){return X.replace(/\[\[/g,this.prefix+"1").replace(/([^\/\]]{1})\]\]/g,"$1"+this.prefix+"2").replace(/\]\]/g,this.prefix+"2").replace(/\{\{/g,this.prefix+"3").replace(/\}\}/g,this.prefix+"4").replace(/\'\'/g,this.prefix+"5")}static unescape(X){return X.replace(new RegExp(this.prefix+"1","g"),"[[").replace(new RegExp(this.prefix+"2","g"),"]]").replace(new RegExp(this.prefix+"3","g"),"{{").replace(new RegExp(this.prefix+"4","g"),"}}").replace(new RegExp(this.prefix+"5","g"),"''")}static cleanUp(X){return X.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")}static chunk(X,f=!1,C=!1){let w=[];X=this.escape(X);let A=f?X.split("'"):[X];for(let b=0;b<A.length;b++){let m=A[b];if(""!==m)if(b%2==0){m=m.replace(/\]\[/g,"]"+Y.Kx+"["),m=m.replace(/\[\]/g,"[ ]");let T=m.split(/[\[\]]+/);for(let c=0;c<T.length;c++){let r=this.cleanUp(this.unescape(T[c]));r!==Y.Kx&&""!==r&&w.push(c%2==0?{type:"value",text:r}:{type:C?"value":"format",text:"["+r+"]"})}}else{let T=m.split(/[\[\]]+/);for(let c=0;c<T.length;c++){let r=this.cleanUp(this.unescape(T[c]));""!==r&&(c%2==0?w.push({type:"text",text:r}):this.isImage(r)?w.push({type:"image",text:"["+r+"]"}):w.push({type:"format",text:"["+r+"]"}))}}}return w}static isImage(X){return!!X.match(/img[ ]?:/)}static getTextStyle(X){let f={};if(""==X||"[ ]"==X)return{};const C=X.match(/('[^']*')|("[^"]*")/gi);if(C)for(let A=0;A<C.length;A++)X=X.replace(C[A],C[A].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));let w=X.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w\-]+)|(\/)/gi);if(!w)return{};for(let A=0;A<w.length;A++)if(w[A].match(/^(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)$/i))f.fontWeight=w[A];else if(w[A].match(/^(underline|line-through)$/i))f.textDecoration=w[A];else if("/"!=w[A])if(w[A].match(/:/)){const b=w[A].replace("+"," ").split(/:[ ]*/);f[b[0]]=b[1]}else f.fill=L.Q1.fromString(w[A]);return f}}return P.prefix="__amcharts__",P})()},77984(Gt,ut,y){y.d(ut,{$_:()=>m,Ds:()=>X,Iq:()=>C,LI:()=>r,SJ:()=>f,T9:()=>g,d_:()=>c,qG:()=>Z,yy:()=>V});var Y=y(21653);function V(l){return new Promise((p,S)=>{setTimeout(p,l)})}let P={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2629742400,year:31536e6};function Z(l){switch(l){case"year":return;case"month":return"year";case"week":case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function X(l,p){return null==p&&(p=1),P[l]*p}function f(l){return l?P[l.timeUnit]*l.count:0}function C(l,p,S,R,W){const j=l.timeUnit,z=l.count;if("hour"==j||"minute"==j||"second"==j||"millisecond"==j)return P[l.timeUnit]*l.count;{const U=r(new Date(p.getTime()),j,z,S,R,void 0,W).getTime();let nt=U+z*X(j)*1.05;return nt=r(new Date(nt),j,1,S,R,void 0,W).getTime(),nt-U}}function m(l,p,S,R,W){if(p-l>X(S,1.2))return!0;let j=new Date(l),z=new Date(p);W&&(j=W.convertLocal(j),z=W.convertLocal(z));let U=0,nt=0;!R&&"millisecond"!=S&&(U=j.getTimezoneOffset(),j.setUTCMinutes(j.getUTCMinutes()-U),nt=z.getTimezoneOffset(),z.setUTCMinutes(z.getUTCMinutes()-nt));let it=!1;switch(S){case"year":j.getUTCFullYear()!=z.getUTCFullYear()&&(it=!0);break;case"month":(j.getUTCFullYear()!=z.getUTCFullYear()||j.getUTCMonth()!=z.getUTCMonth())&&(it=!0);break;case"day":(j.getUTCMonth()!=z.getUTCMonth()||j.getUTCDate()!=z.getUTCDate())&&
1(it=!0);break;case"hour":j.getUTCHours()!=z.getUTCHours()&&(it=!0);break;case"minute":j.getUTCMinutes()!=z.getUTCMinutes()&&(it=!0);break;case"second":j.getUTCSeconds()!=z.getUTCSeconds()&&(it=!0);break;case"millisecond":j.getTime()!=z.getTime()&&(it=!0)}if(it)return it;let gt=Z(S);return!!gt&&m(l,p,gt,R,W)}function c(l,p,S,R,W){let j;return null!=W&&(j=new Date(W)),r(new Date(l),p,S,R.locale.firstDayOfWeek,R.utc,j,R.timezone).getTime()}function r(l,p,S,R,W,j,z){if(!z||W){let U=0;switch(!W&&"millisecond"!=p&&(U=l.getTimezoneOffset(),l.setUTCMinutes(l.getUTCMinutes()-U)),p){case"day":let nt=l.getUTCDate();if(S>1){if(j){j=r(j,"day",1);let Dt=l.getTime()-j.getTime(),yt=Math.floor(Dt/X("day")/S),pt=X("day",yt*S);l.setTime(j.getTime()+pt-U*X("minute"))}}else l.setUTCDate(nt);l.setUTCHours(0,0,0,0);break;case"second":let it=l.getUTCSeconds();S>1&&(it=Math.floor(it/S)*S),l.setUTCSeconds(it,0);break;case"millisecond":if(1==S)return l;let gt=l.getUTCMilliseconds();gt=Math.floor(gt/S)*S,l.setUTCMilliseconds(gt);break;case"hour":let N=l.getUTCHours();S>1&&(N=Math.floor(N/S)*S),l.setUTCHours(N,0,0,0);break;case"minute":let tt=l.getUTCMinutes();S>1&&(tt=Math.floor(tt/S)*S),l.setUTCMinutes(tt,0,0);break;case"month":let J=l.getUTCMonth();S>1&&(2==S||3==S||4==S||6==S)&&(J=Math.floor(J/S)*S),l.setUTCMonth(J,1),l.setUTCHours(0,0,0,0);break;case"year":let at=l.getUTCFullYear();S>1&&(at=Math.floor(at/S)*S),l.setUTCFullYear(at,0,1),l.setUTCHours(0,0,0,0);break;case"week":if(S>1&&j){j=r(j,"week",1);let Dt=l.getTime()-j.getTime(),yt=Math.floor(Dt/X("week")/S),pt=X("week",yt*S);l.setTime(j.getTime()+pt-U*X("minute"))}let vt=l.getUTCDate(),dt=l.getUTCDay();
1Y.Et(R)||(R=1),vt=dt>=R?vt-dt+R:vt-(7+dt)+R,l.setUTCDate(vt),l.setUTCHours(0,0,0,0)}if(!W&&"millisecond"!=p&&(l.setUTCMinutes(l.getUTCMinutes()+U),"day"==p||"week"==p||"month"==p||"year"==p)){let nt=l.getTimezoneOffset();if(nt!=U){let it=nt-U;l.setUTCMinutes(l.getUTCMinutes()+it)}}return l}{if(isNaN(l.getTime()))return l;let U=l.getTime(),nt=z.offsetUTC(l),it=l.getTimezoneOffset(),gt=z.parseDate(l),N=gt.year,tt=gt.month,J=gt.day,at=gt.hour,vt=gt.minute,dt=gt.second,Dt=gt.millisecond,yt=gt.weekday,pt=nt-it;switch(p){case"day":if(S>1&&j){j=r(j,"day",1,R,W,void 0,z);let Xt=l.getTime()-j.getTime(),Ht=Math.floor(Xt/X("day")/S),oe=X("day",Ht*S);l.setTime(j.getTime()+oe),gt=z.parseDate(l),N=gt.year,tt=gt.month,J=gt.day}at=0,vt=pt,dt=0,Dt=0;break;case"second":vt+=pt,S>1&&(dt=Math.floor(dt/S)*S),Dt=0;break;case"millisecond":vt+=pt,S>1&&(Dt=Math.floor(Dt/S)*S);break;case"hour":S>1&&(at=Math.floor(at/S)*S),vt=pt,dt=0,Dt=0;break;case"minute":S>1&&(vt=Math.floor(vt/S)*S),vt+=pt,dt=0,Dt=0;break;case"month":S>1&&(tt=Math.floor(tt/S)*S),J=1,at=0,vt=pt,dt=0,Dt=0;break;case"year":S>1&&(N=Math.floor(N/S)*S),tt=0,J=1,at=0,vt=pt,dt=0,Dt=0;break;case"week":Y.Et(R)||(R=1),J=yt>=R?J-yt+R:J-(7+yt)+R,at=0,vt=pt,dt=0,Dt=0}const Pt=(l=new Date(N,tt,J,at,vt,dt,Dt)).getTime();let Rt=36e5;"hour"==p&&(Rt=36e5*S),Pt+Rt<=U&&("hour"==p||"minute"==p||"second"==p||"millisecond"==p)&&(l=new Date(Pt+Rt));let Tt=l.getTimezoneOffset(),rt=z.offsetUTC(l)-Tt;return rt!=pt&&l.setTime(l.getTime()+6e4*(rt-pt)),l}}function g(l,p,S,R){let j=f(R[l]),z=R.length-1;if(l>=z)return Object.assign({},R[z]);let U=Math.ceil(p/j);return p<j&&l>0?Object.assign({},R[l-1]):U<=S?Object.assign({},R[l]):l+1<R.length?g(l+1,p,S,R):Object.assign({},R[l])}},49203(Gt,ut,y){y.d(ut,{p:()=>C,w:()=>f});var L=y(96485),Y=y(45760),V=y(72294),P=y(22223),Z=y(88251),X=y(2711);function f(w,A,b,m){w.set(A,b.get(m)),b.on(m,T=>{w.set(A,T)})}class C extends L.S{setupDefaultRules(){super.setupDefaultRules();const A=this._root.language,b=this._root.interfaceColors,m=this._root.horizontalLayout,T=this._root.verticalLayout,c=this.rule.bind(this);c("InterfaceColors").setAll({stroke:V.Q1.fromHex(15066597),fill:V.Q1.fromHex(15987699),primaryButton:V.Q1.fromHex(6788316),primaryButtonHover:V.Q1.fromHex(6779356),primaryButtonDown:V.Q1.fromHex(6872182),primaryButtonActive:V.Q1.fromHex(6872182),primaryButtonDisabled:V.Q1.fromHex(14342874),primaryButtonTextDisabled:V.Q1.fromHex(16777215),primaryButtonText:V.Q1.fromHex(16777215),primaryButtonStroke:V.Q1.fromHex(16777215),secondaryButton:V.Q1.fromHex(14277081),secondaryButtonHover:V.Q1.fromHex(10724259),secondaryButtonDown:V.Q1.fromHex(9276813),secondaryButtonActive:V.Q1.fromHex(15132390),secondaryButtonText:V.Q1.fromHex(0),secondaryButtonStroke:V.Q1.fromHex(16777215),grid:V.Q1.fromHex(0),background:V.Q1.fromHex(16777215),alternativeBackground:V.Q1.fromHex(0),text:V.Q1.fromHex(0),alternativeText:V.Q1.fromHex(16777215),disabled:V.Q1.fromHex(11382189),positive:V.Q1.fromHex(5288704),negative:V.Q1.fromHex(11730944)});{const r=c("ColorSet");r.setAll({passOptions:{hue:.05,saturation:0,lightness:0},colors:[V.Q1.fromHex(6797276)],step:1,reuse:!1,startIndex:0}),r.setPrivate("currentStep",0),r.setPrivate("currentPass",0)}c("Entity").setAll({stateAnimationDuration:0,stateAnimationEasing:X.FD(X.tA)}),c("Component").setAll({interpolationDuration:0,interpolationEasing:X.FD(X.tA)}),c("Sprite").setAll({visible:!0,scale:1,opacity:1,rotation:0,position:"relative",tooltipX:Y.yP,tooltipY:Y.yP,tooltipPosition:"fixed",isMeasured:!0}),c("Sprite").states.create("default",{visible:!0,opacity:1}),c("Container").setAll({interactiveChildren:!0,setStateOnChildren:!1}),c("Graphics").setAll({strokeWidth:1}),c("Chart").setAll({width:Y.Q2,height:Y.Q2,interactiveChildren:!1}),c("ZoomableContainer").setAll({width:Y.Q2,height:Y.Q2,wheelable:!0,pinchZoom:!0,maxZoomLevel:32,minZoomLevel:1,zoomStep:2,animationEasing:X.FD(X.tA),animationDuration:600,maxPanOut:.4}),c("Sprite",["horizontal","center"]).setAll({centerX:Y.yP,x:Y.yP}),c("Sprite",["vertical","center"]).setAll({centerY:Y.yP,y:Y.yP}),c("Container",["horizontal","layout"]).setAll({layout:m}),c("Container",["vertical","layout"]).setAll({layout:T}),c("Pattern").setAll({repetition:"repeat",width:50,height:50,rotation:0,fillOpacity:1}),c("LinePattern").setAll({gap:6,colorOpacity:1,width:49,height:49}),c("RectanglePattern").setAll({gap:6,checkered:!1,centered:!0,maxWidth:5,maxHeight:5,width:48,height:48,strokeWidth:0}),c("CirclePattern").setAll({gap:5,checkered:!1,centered:!1,radius:3,strokeWidth:0,width:45,height:45}),c("GrainPattern").setAll({width:200,height:200,colors:[V.Q1.fromHex(0)],size:1,horizontalGap:0,verticalGap:0,density:1,minOpacity:0,maxOpacity:.2});{const r=c("PatternSet");r.setAll({step:1}),f(r,"color",b,"stroke")}c("LinearGradient").setAll({rotation:90}),c("Legend").setAll({fillField:"fill",strokeField:"stroke",nameField:"name",layout:P.J.new(this._root,{}),layer:30,clickTarget:"itemContainer"}),c("Container",["legend","item","itemcontainer"]).setAll({paddingLeft:5,paddingRight:5,paddingBottom:5,paddingTop:5,layout:m,setStateOnChildren:!0,interactiveChildren:!1,ariaChecked:!0,focusable:!0,ariaLabel:A.translate("Press ENTER to toggle"),role:"checkbox"});{const r=c("Rectangle",["legend","item","background"]);r.setAll({fillOpacity:0}),f(r,"fill",b,"background")}c("Container",["legend","marker"]).setAll({setStateOnChildren:!0,centerY:Y.yP,paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,width:18,height:18}),c("RoundedRectangle",["legend","marker","rectangle"]).setAll({width:Y.Q2,height:Y.Q2,cornerRadiusBL:3,cornerRadiusTL:3,cornerRadiusBR:3,cornerRadiusTR:3});{const r=c("RoundedRectangle",["legend","marker","rectangle"]).states.create("disabled",{});f(r,"fill",b,"disabled"),f(r,"stroke",b,"disabled")}c("Label",["legend","label"]).setAll({centerY:Y.yP,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,populateText:!0}),f(c("Label",["legend","label"]).states.create("disabled",{}),"fill",b,"disabled"),c("Label",["legend","value","label"]).setAll({centerY:Y.yP,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,width:50,centerX:Y.Q2,populateText:!0}),f(c("Label",["legend","value","label"]).states.create("disabled",{}),"fill",b,"disabled"),c("HeatLegend").setAll({stepCount:1}),c("RoundedRectangle",["heatlegend","marker"]).setAll({cornerRadiusTR:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusBL:0}),c("RoundedRectangle",["vertical","heatlegend","marker"]).setAll({height:Y.Q2,width:15}),c("RoundedRectangle",["horizontal","heatlegend","marker"]).setAll({width:Y.Q2,height:15}),c("HeatLegend",["vertical"]).setAll({height:Y.Q2}),c("HeatLegend",["horizontal"]).setAll({width:Y.Q2}),c("Label",["heatlegend","start"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5}),c("Label",["heatlegend","end"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5});{const r=c("Label");r.setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"1em",populateText:!1}),f(r,"fill",b,"text")}c("RadialLabel").setAll({textType:"regular",centerY:Y.yP,centerX:Y.yP,inside:!1,radius:0,baseRadius:Y.Q2,orientation:"auto",textAlign:"center"}),c("EditableLabel").setAll({editOn:"click",themeTags:["editablelabel"],multiLine:!0}),c("RoundedRectangle",["editablelabel","background"]).setAll({fillOpacity:0,fill:V.Q1.fromHex(0),cornerRadiusBL:3,cornerRadiusBR:3,cornerRadiusTL:3,cornerRadiusTR:3,strokeOpacity:0,stroke:V.Q1.fromHex(0)}),c("RoundedRectangle",["editablelabel","background"]).states.create("active",{strokeOpacity:.2}),c("RoundedRectangle").setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8}),c("PointedRectangle").setAll({pointerBaseWidth:15,pointerLength:10,cornerRadius:8}),c("Slice").setAll({shiftRadius:0,dRadius:0,dInnerRadius:0});{const r=c("Tick");r.setAll({strokeOpacity:.15,isMeasured:!1,length:4.5,position:"absolute",crisp:!0}),f(r,"stroke",b,"grid")}c("Bullet").setAll({locationX:.5,locationY:.5}),c("Tooltip").setAll({position:"absolute",getFillFromSprite:!0,getStrokeFromSprite:!1,autoTextColor:!0,paddingTop:9,paddingBottom:8,paddingLeft:10,paddingRight:10,marginBottom:5,pointerOrientation:"vertical",centerX:Y.yP,centerY:Y.yP,animationEasing:X.FD(X.tA),exportable:!1}),c("Tooltip",["system"]).setAll({pointerOrientation:"horizontal",paddingTop:4,paddingRight:7,paddingBottom:4,paddingLeft:7});{const r=c("PointedRectangle",["tooltip","system","background"]);r.setAll({strokeOpacity:.3}),f(r,"fill",b,"background"),f(r,"stroke",b,"grid")}c("Label",["tooltip","system"]).setAll({fontSize:12,fill:b.get("background")}),c("Polygon").setAll({animationEasing:X.FD(X.tA)}),c("Link").setAll({cornerRadius:8,setStateOnChildren:!0});{const r=c("OrthogonalLine",["link","line"]);r.setAll({isMeasured:!1,crisp:!0}),f(r.states.create("active",{strokeWidth:2}),"stroke",b,"negative")}c("OrthogonalLine",["link","hit"]).setAll({strokeWidth:10,opacity:0,strokeOpacity:0});{const r=c("OrthogonalLine");r.setAll({strokeWidth:1,strokeOpacity:1,cornerRadius:10}),f(r,"stroke",b,"grid")}{const r=c("Triangle",["link"]);r.setAll({width:14,height:10,centerY:0}),f(r,"fill",b,"grid"),f(r,"stroke",b,"grid"),r.states.create("default",{stateAnimationDuration:0});const g=r.states.create("active",{stateAnimationDuration:0,stroke:(0,V.yW)(16777215),strokeWidth:2});g.set("draw",_=>{_.arc(0,0,11,0,2*Math.PI),_.moveTo(-4,-4),_.lineTo(4,4),_.moveTo(4,-4),_.lineTo(-4,4)}),f(g,"fill",b,"negative")}c("PointedRectangle",["tooltip","background"]).setAll({strokeOpacity:.9,cornerRadius:4,pointerLength:4,pointerBaseWidth:8,fillOpacity:.9,stroke:V.Q1.fromHex(16777215)});{const r=c("Label",["tooltip"]);r.setAll({role:"tooltip",populateText:!0,paddingRight:0,paddingTop:0,paddingLeft:0,paddingBottom:0}),f(r,"fill",b,"alternativeText")}c("Button").setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,interactive:!0,layout:m,interactiveChildren:!1,setStateOnChildren:!0,focusable:!0}),c("Button").states.create("hover",{}),c("Button").states.create("down",{stateAnimationDuration:0}),c("Button").states.create("active",{}),c("Button").states.create("disabled",{forceInactive:!0});{const r=c("RoundedRectangle",["button","background"]);f(r,"fill",b,"primaryButton"),f(r,"stroke",b,"primaryButtonStroke")}f(c("RoundedRectangle",["button","background"]).states.create("hover",{}),"fill",b,"primaryButtonHover"),f(c("RoundedRectangle",["button","background"]).states.create("down",{stateAnimationDuration:0}),"fill",b,"primaryButtonDown"),f(c("RoundedRectangle",["button","background"]).states.create("active",{}),"fill",b,"primaryButtonActive"),f(c("RoundedRectangle",["button","background"]).states.create("disabled",{}),"fill",b,"primaryButtonDisabled"),f(c("Graphics",["button","icon"]).states.create("disabled",{}),"fill",b,"primaryButtonTextDisabled"),f(c("Label",["button"]).states.create("disabled",{}),"fill",b,"primaryButtonTextDisabled");{const r=c("Graphics",["button","icon"]);r.setAll({forceInactive:!0}),f(r,"stroke",b,"primaryButtonText")}f(c("Label",["button"]),"fill",b,"primaryButtonText"),c("ConfirmButton").setAll({toggleKey:"active",setStateOnChildren:!0,label:Z.J.new(this._root,{text:A.translate("C
1onfirm"),forceHidden:!0})}),f(c("RoundedRectangle",["button","background","confirm"]).states.create("active",{}),"fill",b,"negative"),c("Label",["button","confirm"]).setAll({paddingTop:0,paddingBottom:0,paddingRight:3,paddingLeft:5}),c("Label",["button","confirm"]).states.create("default",{stateAnimationDuration:0}),c("Label",["button","confirm"]).states.create("active",{forceHidden:!1,stateAnimationDuration:0});{const r=c("Graphics",["icon","confirm","button"]);r.setAll({stateAnimationDuration:0}),r.states.create("default",{stateAnimationDuration:0}),f(r,"stroke",b,"primaryButtonText")}f(c("Graphics",["icon","confirm","button"]).states.create("active",{svgPath:"M -5 1 L 0 6 L 8 -5",strokeWidth:2}),"stroke",b,"primaryButtonText"),f(c("Graphics",["icon","confirm","button","secondary"]).states.create("active",{}),"stroke",b,"primaryButtonText"),f(c("RoundedRectangle",["button","background","confirm","secondary"]).states.create("active",{fillOpacity:1}),"fill",b,"negative"),f(c("RoundedRectangle",["button","background","confirm","secondary"]).states.create("hoverActive",{fillOpacity:1}),"fill",b,"negative"),c("Button",["button","confirm"]).states.create("hoverActive",{}),c("Button",["zoom"]).setAll({paddingTop:18,paddingBottom:18,paddingLeft:12,paddingRight:12,centerX:46,centerY:-10,y:0,x:Y.Q2,role:"button",ariaLabel:A.translate("Zoom Out"),layer:30});{const r=c("RoundedRectangle",["background","button","zoom"]);r.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),f(r,"fill",b,"primaryButton")}f(c("RoundedRectangle",["background","button","zoom"]).states.create("hover",{}),"fill",b,"primaryButtonHover"),f(c("RoundedRectangle",["background","button","zoom"]).states.create("down",{stateAnimationDuration:0}),"fill",b,"primaryButtonDown");{const r=c("Graphics",["icon","button","zoom"]);r.setAll({crisp:!0,strokeOpacity:.7,draw:g=>{g.moveTo(0,0),g.lineTo(12,0)}}),f(r,"stroke",b,"primaryButtonText")}c("Button",["resize"]).setAll({paddingTop:9,paddingBottom:9,paddingLeft:13,paddingRight:13,draggable:!0,centerX:Y.yP,centerY:Y.yP,position:"absolute",role:"slider",ariaValueMin:"0",ariaValueMax:"100",ariaLabel:A.translate("Use up and down arrows to move selection")});{const r=c("RoundedRectangle",["background","resize","button"]);r.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),f(r,"fill",b,"secondaryButton"),f(r,"stroke",b,"secondaryButtonStroke")}f(c("RoundedRectangle",["background","resize","button"]).states.create("hover",{}),"fill",b,"secondaryButtonHover"),f(c("RoundedRectangle",["background","resize","button"]).states.create("down",{stateAnimationDuration:0}),"fill",b,"secondaryButtonDown");{const r=c("Graphics",["resize","button","icon"]);r.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:g=>{g.moveTo(0,.5),g.lineTo(0,12.5),g.moveTo(4,.5),g.lineTo(4,12.5)}}),f(r,"stroke",b,"secondaryButtonText")}c("Button",["resize","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize"}),c("Button",["resize","horizontal"]).setAll({cursorOverStyle:"ew-resize"}),c("Button",["play"]).setAll({paddingTop:13,paddingBottom:13,paddingLeft:14,paddingRight:14,ariaLabel:A.translate("Play"),toggleKey:"active"});{const r=c("RoundedRectangle",["play","background"]);r.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),f(r,"fill",b,"primaryButton")}{const r=c("Graphics",["play","icon"]);r.setAll({stateAnimationDuration:0,dx:1,draw:g=>{g.moveTo(0,-5),g.lineTo(8,0),g.lineTo(0,5),g.lineTo(0,-5)}}),f(r,"fill",b,"primaryButtonText")}c("Graphics",["play","icon"]).states.create("default",{stateAnimationDuration:0}),c("Graphics",["play","icon"]).states.create("active",{stateAnimationDuration:0,draw:r=>{r.moveTo(-4,-5),r.lineTo(-1,-5),r.lineTo(-1,5),r.lineTo(-4,5),r.lineTo(-4,-5),r.moveTo(4,-5),r.lineTo(1,-5),r.lineTo(1,5),r.lineTo(4,5),r.lineTo(4,-5)}}),c("Button",["switch"]).setAll({paddingTop:4,paddingBottom:4,paddingLeft:4,paddingRight:4,ariaLabel:A.translate("Press ENTER to toggle"),toggleKey:"active",width:40,height:24,layout:null});{const r=c("RoundedRectangle",["switch","background"]);r.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),f(r,"fill",b,"primaryButton")}{const r=c("Circle",["switch","icon"]);r.setAll({radius:8,centerY:0,centerX:0,dx:0}),f(r,"fill",b,"primaryButtonText")}c("Graphics",["switch","icon"]).states.create("active",{dx:16}),c("Scrollbar").setAll({start:0,end:1,layer:30,animationEasing:X.FD(X.tA)}),c("Scrollbar",["vertical"]).setAll({marginRight:13,marginLeft:13,minWidth:12,height:Y.Q2}),c("Scrollbar",["horizontal"]).setAll({marginTop:13,marginBottom:13,minHeight:12,width:Y.Q2}),this.rule("Button",["scrollbar"]).setAll({exportable:!1});{const r=c("RoundedRectangle",["scrollbar","main","background"]);r.setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8,fillOpacity:.8}),f(r,"fill",b,"fill")}{const r=c("RoundedRectangle",["scrollbar","thumb"]);r.setAll({role:"slider",ariaLive:"polite",position:"absolute",draggable:!0}),f(r,"fill",b,"secondaryButton")}f(c("RoundedRectangle",["scrollbar","thumb"]).states.create("hover",{}),"fill",b,"secondaryButtonHover"),f(c("RoundedRectangle",["scrollbar","thumb"]).states.create("down",{stateAnimationDuration:0}),"fill",b,"secondaryButtonDown"),c("RoundedRectangle",["scrollbar","thumb","vertical"]).setAll({x:Y.yP,width:Y.Q2,centerX:Y.yP,ariaLabel:A.translate("Use up and down arrows to move selection")}),c("RoundedRectangle",["scrollbar","thumb","horizontal"]).setAll({y:Y.yP,centerY:Y.yP,height:Y.Q2,ariaLabel:A.translate("Use left and right arrows to move selection")});{const r=c("PointedRectangle",["axis","tooltip","background"]);r.setAll({cornerRadius:0}
vendor: 1,301 bytes, line 1
1),f(r,"fill",b,"alternativeBackground")}c("Label",["axis","tooltip"]).setAll({role:void 0}),c("Label",["axis","tooltip","y"]).setAll({textAlign:"right"}),c("Label",["axis","tooltip","y","opposite"]).setAll({textAlign:"left"}),c("Label",["axis","tooltip","x"]).setAll({textAlign:"center"}),c("Tooltip",["categoryaxis"]).setAll({labelText:"{category}"}),c("Star").setAll({spikes:5,innerRadius:5,radius:10}),c("Tooltip",["stock"]).setAll({paddingTop:6,paddingBottom:5,paddingLeft:7,paddingRight:7}),c("Tooltip",["indicator"]).setAll({forceHidden:!0}),c("PointedRectangle",["tooltip","stock","axis"]).setAll({pointerLength:0,pointerBaseWidth:0,cornerRadius:3}),c("Label",["tooltip","stock"]).setAll({fontSize:"0.8em"}),c("SpriteResizer").setAll({rotationStep:10,isMeasured:!1}),c("Container",["resizer","grip"]).states.create("hover",{});{const r=c("RoundedRectangle",["resizer","grip"]);r.setAll({strokeOpacity:.7,strokeWidth:1,fillOpacity:1,width:12,height:12}),f(r,"fill",b,"background"),f(r,"stroke",b,"alternativeBackground")}{const r=c("RoundedRectangle",["resizer","grip","outline"]);r.setAll({strokeOpacity:0,fillOpacity:0,width:20,height:20}),r.states.create("hover",{fillOpacity:.3}),f(r,"fill",b,"alternativeBackground")}c("RoundedRectangle",["resizer","grip","left"]).setAll({cornerRadiusBL:0,
1cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0}),c("RoundedRectangle",["resizer","grip","right"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0});{const r=c("Rectangle",["resizer","rectangle"]);r.setAll({strokeDasharray:[2,2],strokeOpacity:.5,strokeWidth:1}),f(r,"stroke",b,"alternativeBackground")}c("Graphics",["button","plus","icon"]).setAll({x:Y.yP,y:Y.yP,draw:r=>{r.moveTo(-4,0),r.lineTo(4,0),r.moveTo(0,-4),r.lineTo(0,4)}}),c("Graphics",["button","minus","icon"]).setAll({x:Y.yP,y:Y.yP,draw:r=>{r.moveTo(-4,0),r.lineTo(4,0)}}),c("Graphics",["button","home","icon"]).setAll({x:Y.yP,y:Y.yP,svgPath:"M 8 -1 L 6 -1 L 6 7 L 2 7 L 2 1 L -2 1 L -2 7 L -6 7 L -6 -1 L -8 -1 L 0 -9 L 8 -1 Z M 8 -1"}),c("Button",["zoomtools"]).setAll({marginTop:1,marginBottom:2}),c("ZoomTools").setAll({x:Y.Q2,centerX:Y.Q2,y:Y.Q2,centerY:Y.Q2,paddingRight:10,paddingBottom:10}),c("ProgressPie").setAll({radius:Y.Q2,width:50,height:50,centerX:(0,Y.KN)(-50),centerY:(0,Y.KN)(-50),innerRadius:(0,Y.KN)(85),numberFormat:"#."});{const r=c("Label",["progresspie"]);r.setAll({centerX:Y.yP,centerY:Y.yP,fontSize:"0.75em"}),f(r,"fill",b,"primaryButton")}{const r=c("Circle",["progresspie"]);r.setAll({fillOpacity:.5}),f(r,"fill",b,"background")}{const r=c("Slice",["progresspie"]);r.setAll({startAngle:-90}),f(r,"fill",b,"primaryButton")}{const r=c("Slice",["progresspie","background"]);r.setAll({fillOpacity:.2,arc:360}),f(r,"fill",b,"primaryButton")}c("EditableLabel",["numericstepper"]).setAll({y:Y.yP,centerY:Y.yP,multiLine:!1,marginRight:2});{const r=c("Container",["numericstepper","buttons"]);r.setAll({layout:this._root.verticalLayout,centerY:Y.yP,y:Y.yP,marginRight:10,opacity:0}),r.states.create("active",{opacity:1}),r.states.create("default",{opacity:0})}{const r=c("Triangle",["numericstepper"]);r.setAll({width:17,height:11,marginTop:3,marginBottom:3,strokeWidth:5,strokeOpacity:0,cursorOverStyle:"pointer"}),f(r,"fill",b,"secondaryButton")}c("Triangle",["downbutton"]).setAll({rotation:180})}}},33230(Gt,ut,y){y.d(ut,{fk:()=>Y.fk,BM:()=>L.B,nD:()=>Y.nD,AS:()=>gt,YW:()=>l.Y});var L=y(94129),Y=y(80062),T=(y(75163),y(26051),y(52982),y(22555),y(63071),y(89725),y(60915),y(1661),y(44017),y(27089),y(21413)),c=y(96354),r=y(25558),g=y(56977),_=y(96562),l=y(12940),p=y(35547),S=y(37702),R=y(54643),W=y(28046),j=y(69447);function z(dt,Dt){if(1&dt&&(p.j41(0,"div",2),p.nrm(1,"tpe-report-v2-markdown",3),p.k0s()),2&dt){const yt=p.XpG(2);p.R7$(),p.Y8G("data",yt.tabDescription)}}function U(dt,Dt){if(1&dt&&(p.j41(0,"div")(1,"h3",4),p.EFF(2),p.k0s(),p.j41(3,"div",5),p.nrm(4,"tpe-report-v2-markdown",3),p.k0s(),p.nrm(5,"tpe-report-v2-viz-content",6),p.j41(6,"div",5),p.nrm(7,"tpe-llm-description",7),p.k0s()()),2&dt){const yt=Dt.$implicit,pt=Dt.$index,Pt=p.XpG(2);p.R7$(2),p.JRh(Pt.translate(yt.name)),p.R7$(2),p.Y8G("data",Pt.translate(yt.description)),p.R7$(),p.Y8G("meta",Pt.tab.reportMeta)("index",pt)("timestamp",Pt.tab.timestamp)("visualization",yt)("spaceId",Pt.tab.spaceId),p.R7$(2),p.Y8G("tab",Pt.tab)("visualization",yt)}}
1function nt(dt,Dt){if(1&dt&&(p.nVh(0,z,2,1,"div",2),p.Z7z(1,U,8,9,"div",null,p.fX1)),2&dt){const yt=p.XpG();p.vxM(yt.tabDescription?0:-1),p.R7$(),p.Dyx(yt.visualizations)}}function it(dt,Dt){1&dt&&(p.j41(0,"div",1),p.pXf(1,0),p.k0s())}let gt=(()=>{class dt{constructor(yt,pt){this.tabsService=yt,this.route=pt,this.loading=!0,this.translate=_.$x.translate,this.unsubscribe$=new T.B}ngOnInit(){this.route.params.pipe((0,c.T)(yt=>yt.tabKey),(0,r.n)(yt=>this.tabsService.getPageContent(yt)),(0,g.Q)(this.unsubscribe$)).subscribe(yt=>{this.tab=yt,this.visualizations=yt.visualizations,this.tabDescription=_.$x.translate(yt.tab.description),this.loading=!1})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(pt){return new(pt||dt)(p.rXU(l.Y),p.rXU(S.nX))}}static{this.\u0275cmp=p.VBU({type:dt,selectors:[["ng-component"]],standalone:!1,decls:2,vars:2,consts:()=>{let yt;return yt="This Portfolio is empty.",[yt,[1,"no-visualizations"],[1,"description"],[3,"data"],[1,"viz-name"],[1,"viz-description"],[3,"meta","index","timestamp","visualization","spaceId"],[3,"tab","visualization"]]},template:function(pt,Pt){1&pt&&(p.nVh(0,nt,3,1),p.nVh(1,it,2,0,"div",1)),2&pt&&(p.vxM(!Pt.loading&&Pt.visualizations.length>0?0:-1),p.R7$(),p.vxM(Pt.loading||Pt.visualizations.length?-1:1))},dependencies:[R.r,W.w,j.D],styles:["markdown[_ngcontent-%COMP%]     .katex-display, markdown[_ngcontent-%COMP%]     .katex, markdown[_ngcontent-%COMP%]     .katex-html{display:inline-block}.no-visualizations[_ngcontent-%COMP%]{font-size:18px;font-weight:700;padding:24px 0}"]})}}return dt})();y(73699),y(13811),y(95502),y(64214),y(8405)},94129(Gt,ut,y){y.d(ut,{B:()=>nt});var L=y(76939),Y=y(37702),V=y(5964),P=y(10772),Z=y(96562),X=y(36868),f=y(35547),C=y(85802),w=y(25596),A=y(21518),b=y(19714),m=y(52920);function T(it,gt){1&it&&(f.j41(0,"div",9)(1,"span"),f.pXf(2,1),f.k0s()())}function c(it,gt){if(1&it){const N=f.RV6();f.j41(0,"div",10)(1,"div",12),f.bIt("click",function(){C.eBV(N);const J=f.XpG();return C.Njj(J.navigateToLink(J.nodeLink))}),f.pXf(2,2),f.k0s(),f.j41(3,"div",13),f.bIt("click",function(){C.eBV(N);const J=f.XpG();return C.Njj(J.navigateToLink(J.nodeLink,!0))}),f.j41(4,"span"),f.pXf(5,3),f.k0s(),f.j41(6,"mat-icon",14),f.EFF(7,"open_in_new"),f.k0s()()()}}function r(it,gt){1&it&&f.nrm(0,"div",11)}function g(it,gt){1&it&&(f.j41(0,"div",9)(1,"span"),f.pXf(2,4),f.k0s()())}function _(it,gt){if(1&it){const N=f.RV6();f.j41(0,"div",10)(1,"div",12),f.bIt("click",function(){C.eBV(N);const J=f.XpG();return C.Njj(J.navigateToLink(J.drillDownLink))}),f.pXf(2,5),f.k0s(),f.j41(3,"div",13),f.bIt("click",function(){C.eBV(N);const J=f.XpG();return C.Njj(J.navigateToLink(J.drillDownLink,!0))}),f.j41(4,"span"),f.pXf(5,6),f.k0s(),f.j41(6,"mat-icon",15),f.EFF(7,"open_in_new"),f.k0s()()()}}function l(it,gt){1&it&&f.nrm(0,"div",11)}function p(it,gt){if(1&it){const N=f.RV6();f.j41(0,"div",13),f.bIt("click",function(){const J=C.eBV(N).$implicit,at=f.XpG(2);return C.Njj(at.navigateToLink(J,!0))}),f.j41(1,"span"),f.EFF(2),f.k0s(),f.j41(3,"mat-icon",17),f.EFF(4,"open_in_new"),f.k0s()()}if(2&it){const N=gt.$implicit;f.R7$(2),f.JRh(N.label)}}function S(it,gt){if(1&it&&(f.j41(0,"div",10),f.nVh(1,l,1,0,"div",11),f.Z7z(2,p,5,1,"div",16,f.fX1),f.k0s()),2&it){const N=f.XpG();f.R7$(),f.vxM(N.showMissing||N.nodeLink||N.drillDownLink?1:-1),f.R7$(),f.Dyx(N.thirdPartyLinks)}}function R(it,gt){1&it&&f.nrm(0,"div",11)}function W(it,gt){if(1&it){const N=f.RV6();f.j41(0,"div",12),f.bIt("click",function(){const J=C.eBV(N).$implicit,at=f.XpG(2);return C.Njj(at.navigateToLink(J))}),f.EFF(1),f.k0s(),f.j41(2,"div",13),f.bIt("click",function(){const J=C.eBV(N).$implicit,at=f.XpG(2);return C.Njj(at.navigateToLink(J,!0))}),f.j41(3,"span"),f.EFF(4),f.k0s(),f.j41(5,"mat-icon",18),f.EFF(6,"open_in_new"),f.k0s()()}if(2&it){const N=gt.$implicit;f.R7$(),f.JRh(N.label),f.R7$(3),f.JRh(N.label)}}function j(it,gt){if(1&it&&(f.j41(0,"div",10),f.nVh(1,R,1,0,"div",11),f.Z7z(2,W,7,2,null,null,f.fX1),f.k0s()),2&it){const N=f.XpG();f.R7$(),f.vxM(N.showMissing||N.nodeLink||N.drillDownLink||N.thirdPartyLinks.length?1:-1),f.R7$(),f.Dyx(N.customLinks)}}let z=(()=>{class it{constructor(N){this.router=N,this.thirdPartyLinks=[],this.customLinks=[],this.showMissing=!0}openFor(N,tt,J,at=!0){this.reset(),this.hideMenu=J,this.spaceId=tt,this.showMissing=at,N?.length&&this.loadLinks(N)}navigateToLink(N,tt=!1){N.type===P.X_.THIRD_PARTY_LINK?Z.rW.openUrlInNewTab(N.url):X.y.navigateToDrillDown(N.url,this.spaceId,this.router,tt),this.hideMenu()}loadLinks(N){for(const tt of N)switch(tt.type){case P.X_.NODE_LINK:this.nodeLink=tt;break;case P.X_.DRILL_DOWN_LINK:this.drillDownLink=tt;break;case P.X_.THIRD_PARTY_LINK:this.thirdPartyLinks.push(tt);break;case P.X_.CUSTOM:this.customLinks.push(tt);break;default:console.warn(`Unknown link type ${tt.type}`)}}reset(){this.nodeLink=null,this.drillDownLink=null,this.thirdPartyLinks=[],this.customLinks=[]}static{this.\u0275fac=function(tt){return new(tt||it)(f.rXU(Y.Ix))}}static{this.\u0275cmp=f.VBU({type:it,selectors:[["ng-component"]],standalone:!1,decls:10,vars:7,consts:()=>{let N,tt,J,at,vt,dt,Dt,yt,pt,Pt,Rt;return N="Navigate to",tt="Portfolio drill-down is only possible if you select a portfolio child element.",J="New tab",at="Portfolio drill-down",vt="Portfolio drill-down",dt=" Code Map drill-down is not possible. The chosen portfolio element is too high in the portfolio hierarchy, or a specific filter combination is preventing navigation to the code. ",Dt="New tab",yt="Code Map drill-down",pt="Code Map drill-down",Pt="New tab",Rt="New tab",[N,tt,at,vt,dt,yt,pt,[1,"link-menu-main",3,"contextmenu"],[1,"header"],[1,"no-links"],[1,"link-list"],[1,"divi
1der"],[1,"link",3,"click"],["fxLayout","row","fxLayoutAlign","space-between center",1,"link",3,"click"],["matTooltip",J],["matTooltip",Dt],["fxLayout","row","fxLayoutAlign","space-between center",1,"link"],["matTooltip",Pt],["matTooltip",Rt]]},template:function(tt,J){1&tt&&(f.j41(0,"mat-card",7),f.bIt("contextmenu",function(vt){return vt.preventDefault(),vt.stopPropagation()}),f.j41(1,"div",8),f.pXf(2,0),f.k0s(),f.nVh(3,T,3,0,"div",9),f.nVh(4,c,8,0,"div",10),f.nVh(5,r,1,0,"div",11),f.nVh(6,g,3,0,"div",9),f.nVh(7,_,8,0,"div",10),f.nVh(8,S,4,1,"div",10),f.nVh(9,j,4,1,"div",10),f.k0s()),2&tt&&(f.R7$(3),f.vxM(!J.nodeLink&&J.showMissing?3:-1),f.R7$(),f.vxM(J.nodeLink?4:-1),f.R7$(),f.vxM(J.showMissing||J.nodeLink?5:-1),f.R7$(),f.vxM(!J.drillDownLink&&J.showMissing?6:-1),f.R7$(),f.vxM(J.drillDownLink?7:-1),f.R7$(),f.vxM(J.thirdPartyLinks.length?8:-1),f.R7$(),f.vxM(J.customLinks.length?9:-1))},dependencies:[w.RN,A.An,b.oV,m.DJ,m.sA],styles:[".header[_ngcontent-%COMP%]{padding:8px 16px;font-weight:700;font-size:12px}.link[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.38);cursor:pointer;padding:8px 16px}.link[_ngcontent-%COMP%]:hover{background-color:#00b0ff;color:#fff}.link[_ngcontent-%COMP%]:hover   .mat-icon[_ngcontent-%COMP%]{color:#fff}.link[_ngcontent-%COMP%]:last-child{border-bottom:0 none}.link[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{font-size:20px;height:20px;width:20px;line-height:20px;color:#00000061;margin-left:16px}.no-links[_ngcontent-%COMP%]{color:#00000061;padding:8px 16px;max-width:200px}.divider[_ngcontent-%COMP%]{border-bottom:2px solid rgba(0,0,0,.54)}.new-tab-label[_ngcontent-%COMP%]{display:inline-block;margin-left:4px}"]})}}return it})();var U=y(65057);let nt=(()=>{class it{constructor(N,tt,J){this.overlay=N,this.overlayPositionBuilder=tt,this.minWidth=300,this.minHeight=300,this.openTS=null,J.events.pipe((0,V.p)(at=>at instanceof Y.Z)).subscribe(()=>this.hide()),document.body.onkeyup=at=>{"escape"===at.key.toLowerCase()&&this.hide()}}showForLinks(N,tt,J,at=!0){J.stopPropagation(),J.preventDefault(),this.createOverlay(J),this.createLinkMenu(N,tt,at)}hide(){this.overlayRef?.hasAttached()&&(this.overlayRef.detach(),this.overlayRef.dispose())}createOverlay(N){this.hide(),this.overlayRef=this.overlay.create({positionStrategy:this.getMenuPosition(N),hasBackdrop:!0,backdropClass:"invisible-backdrop",disposeOnNavigation:!0}),this.openTS=N.timeStamp}createLinkMenu(N,tt,J=!0){const at=new L.A8(z);this.overlayRef.attach(at).instance.openFor(tt,N,()=>this.hide(),J),this.overlayRef.backdropElement.oncontextmenu=dt=>{dt.stopPropagation(),dt.preventDefault(),this.openTS!==dt.timeStamp&&(this.hide(),document.elementFromPoint(dt.pageX,dt.pageY).dispatchEvent(new MouseEvent(dt.type,dt)))},this.overlayRef.backdropClick().subscribe(()=>this.hide())}getMenuPosition(N){const tt=this.overlayPositionBuilder.global();return N.pageX<=document.documentElement.clientWidth-this.minWidth?tt.left(N.pageX+"px"):tt.right(document.documentElement.clientWidth-N.pageX+"px"),N.pageY<=document.documentElement.clientHeight-this.minHeight?tt.top(N.pageY+"px"):tt.bottom(document.documentElement.clientHeight-N.pageY+"px"),tt}static{this.\u0275fac=function(tt){return new(tt||it)(C.KVO(U.hJ),C.KVO(U.lF),C.KVO(Y.Ix))}}static{this.\u0275prov=C.jDH({token:it,factory:it.\u0275fac})}}return it})()},80062(Gt,ut,y){y.d(ut,{fk:()=>Y.f,nD:()=>Y.n}),y(69447);var Y=y(83743)},69447(Gt,ut,y){y.d(ut,{D:()=>W});var L=y(21413),Y=y(56977),V=y(83743),P=y(35547),Z=y(85802),X=y(88834),f=y(21518),C=y(19714),w=y(18262),A=y(54643);function b(j,z){1&j&&(P.j41(0,"span",8),P.pXf(1,0),P.k0s())}function m(j,z){1&j&&(P.j41(0,"span",8),P.pXf(1,1),P.k0s())}function T(j,z){1&j&&(P.j41(0,"span",9),P.pXf(1,2),P.k0s())}function c(j,z){1&j&&P.nrm(0,"tpe-loading-indicator",8)}function r(j,z){1&j&&(P.j41(0,"mat-icon",8),P.EFF(1,"visibility_off"),P.k0s())}function g(j,z){1&j&&(P.j41(0,"mat-icon",8),P.EFF(1,"auto_awesome"),P.k0s())}function _(j,z){1&j&&(P.j41(0,"span",13),P.pXf(1,3),P.k0s())}function l(j,z){1&j&&(P.j41(0,"span",13),P.pXf(1,4),P.k0s())}function p(j,z){if(1&j&&(P.j41(0,"div",14),P.nrm(1,"tpe-report-v2-markdown",15),P.k0s()),2&j){const U=P.XpG(2);P.R7$(),P.Y8G("data",U.description.response)}}function S(j,z){1&j&&(P.j41(0,"div",14),P.pXf(1,5),P.k0s())}function R(j,z){if(1&j){const U=P.RV6();P.j41(0,"div",6)(1,"div",7),P.nVh(2,b,2,0,"span",8)(3,m,2,0,"span",8)(4,T,2,0,"span",9),P.nrm(5,"span",10),P.j41(6,"button",11),P.bIt("click",function(){Z.eBV(U);const it=P.XpG();return Z.Njj(it.fetchDescription())}),P.j41(7,"div",12),P.nVh(8,c,1,0,"tpe-loading-indicator",8)(9,r,2,0,"mat-icon",8)(10,g,2,0,"mat-icon",8),P.nVh(11,_,2,0,"span",13)(12,l,2,0,"span",13),P.k0s()()(),P.nVh(13,p,2,1,"div",14)(14,S,2,0,"div",14),P.k0s()}if(2&j){const U=P.XpG();P.R7$(2),P.vxM(U.description?U.description.status===U.descStatus.NEW?3:U.description.status===U.descStatus.FINISHED&&U.description.response?4:-1:2),P.R7$(4),P.Y8G("color",null!=U.description&&U.description.ready&&U.description.status!==U.descStatus.ERROR?null:"accent")("disabled",(null==U.description?null:U.description.status)===U.descStatus.NEW),P.R7$(2),P.vxM((null==U.description?null:U.description.status)===U.descStatus.NEW?8:(null==U.description?null:U.description.status)===U.descStatus.FINISHED?9:10),P.R7$(3),P.vxM(null!=U.description&&U.description.ready&&U.description.status!==U.descStatus.ERROR?12:11),P.R7$(2),P.vxM((null==U.description?null:U.description.status)===U.descStatus.FINISHED&&null!=U.description&&U.description.response?13:(null==U.description?null:U.description.status)===U.descStatus.ERROR?14:-1)}}let W=(()=>{class j{constructor(U){this.service=U,this.description=null,this.descStatus=V.f,this.unsubscribe$=new L.B}fetchDescription(){if(this.description&&this.description.status!==V.f.ERROR)return void(this.description=null);const U=!!this.description&&this.description.status===V.f.ERROR;this.description={status:V.f.NEW,reportId:this.tab.reportMeta.report.id,nodeId:this.tab.nodeId,leafId:this.tab.leafId,visualizationId:this.visualization.id},this.service.getDescription(this.tab.spaceId,this.description,U).pipe((0,Y.Q)(this.unsubscribe$)).subscribe(nt=>this.description=nt)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(nt){return new(nt||j)(P.rXU(V.n))}}static{this.\u0275cmp=P.VBU({type:j,selectors:[["tpe-llm-description"]],inputs:{tab:"tab",visualization:"visualization"},standalone:!1,decls:1,vars:1,consts:()=>{let U,nt,it,gt,N,tt,J;return U="Ad hoc AI Explanation",nt="Use AI to generate an ad hoc explanation.",it="Generating explanation\u2026 This may take a moment.",gt="AI can make mistakes. Check critical details.",N="Explain",tt="Hide",J="Something went wrong. Try again later.",[nt,it,gt,N,tt,J,[1,"container"],[1,"title","flex-layout-row","flex-align-start-center"],[1,"flex-nogrow"],[1,"flex-nogrow","disclaimer"],[1,"flex-auto"],["mat-raised-button","","matTooltip",U,1,"flex-nogrow",3,"click","color","disabled"],[1,"flex-layout-row","flex-align-start-center"],[1,"button-title"],[1,"description"],[3,"data"]]},template:function(nt,it){1&nt&&P.nVh(0,R,15,6,"div",6),2&nt&&P.vxM(it.visualization.llmOnDemand?0:-1)},dependencies:[X.$z,f.An,C.oV,w.T,A.r],styles:["\n\n\n.button-title[_ngcontent-%COMP%]{margin-left:16px}.title[_ngcontent-%COMP%]{margin-bottom:16px}.container[_ngcontent-%COMP%]{background-color:#0000000f;border:1px dashed rgba(0,0,0,.38);border-radius:4px;margin:24px 0;padding:16px 16px 0}.description[_ngcontent-%COMP%]{margin-left:-16px;margin-right:-16px;width:calc(100% + 32px);box-sizing:border-box;padding:0 16px 16px;scrollbar-color:rgba(0,0,0,.38) transparent}.disclaimer[_ngcontent-%COMP%]{color:#00000061}"]})}}return j})()},83743(Gt,ut,y){y.d(ut,{f:()=>_,n:()=>l});var L=y(92771),Y=y(7673),V=y(99437),P=y(5964),Z=y(96354),X=y(25558),f=y(96697),C=y(88141),w=y(43313),A=y(22306),b=y(96562),m=y(65352),T=y(46463),c=y(85802),r=y(91413),g=y(80888),_=function(p){return p.NEW="new",p.FINISHED="finished",p.ERROR="error",p}(_||{});let l=(()=>{class p{constructor(R,W,j,z){this.eventBus=R,this.client=W,this.store=j,this.endpoint=z,this.stateMap=new Map,this.events$=new L.m(1),this.url=`${this.endpoint}
1/companies/:companyId/spaces/:spaceId/llm-on-demand`,this.eventBus.subscribe("frontend/llm_job_updated").subscribe(U=>{this.stateMap.set(this.getKey(U.details),U.details),this.events$.next()})}getDescription(R,W,j=!1){const z=this.getKey(W);return(!this.stateMap.has(z)||j)&&this.fetchDescription(R,W,j),this.events$.pipe((0,Z.T)(()=>this.stateMap.get(z)),(0,P.p)(T.a4),(0,C.M)(U=>{(U.status===_.FINISHED&&!U.response||U.status===_.ERROR&&!U.error)&&this.fetchDescription(R,U,!1)}))}fetchDescription(R,W,j){this.store.select(m.Os.getSelectedId).pipe((0,P.p)(T.a4),(0,f.s)(1),(0,X.n)(z=>{const U=b.rW.formatUrl(this.url,{companyId:z,spaceId:R,force:j});return this.client.post(U,W).pipe((0,V.W)(()=>(0,Y.of)({...W,status:_.ERROR,error:"Communication error"})))})).subscribe(z=>{this.stateMap.set(this.getKey(W),{...W,...z,ready:!!z.response||!!z.error}),this.events$.next()})}getKey(R){return[R.reportId,R.nodeId,R.leafId||0,R.visualizationId].join("_")}static{this.\u0275fac=function(W){return new(W||p)(c.KVO(A.c),c.KVO(r.Qq),c.KVO(g.il),c.KVO(w.Ob))}}static{this.\u0275prov=c.jDH({token:p,factory:p.\u0275fac})}}return p})()},75163(Gt,ut,y){y.d(ut,{Y:()=>l});var L=y(14123),Y=y(89725),V=y(35547),P=y(80888),Z=y(93049),X=y(92367),f=y(21518),C=y(19714),w=y(49769),A=y(52920),b=y(16038);const m=p=>({disabled:p});function T(p,S){if(1&p&&(V.j41(0,"a",3),V.EFF(1),V.k0s()),2&p){const R=V.XpG().$implicit,W=V.XpG(2);V.Y8G("routerLink",W.linkWithSuffix(R.link)),V.R7$(),V.JRh(R.name)}}
1function c(p,S){if(1&p&&(V.j41(0,"div",4),V.EFF(1),V.k0s()),2&p){const R=V.XpG().$implicit;V.Y8G("ngClass",V.eq3(2,m,R.disabled)),V.R7$(),V.JRh(R.name)}}function r(p,S){1&p&&(V.j41(0,"div",5),V.EFF(1,"/"),V.k0s())}function g(p,S){if(1&p&&(V.nVh(0,T,2,2,"a",3),V.nVh(1,c,2,4,"div",4),V.nVh(2,r,2,0,"div",5)),2&p){const R=S.$implicit,W=S.$index,j=V.XpG(2);V.vxM(R.link?0:-1),V.R7$(),V.vxM(R.link?-1:1),V.R7$(),V.vxM(W<j.crumbs.length-1?2:-1)}}function _(p,S){if(1&p&&(V.j41(0,"div",2),V.Z7z(1,g,3,3,null,null,V.fX1),V.k0s()),2&p){const R=V.XpG();V.R7$(),V.Dyx(R.crumbs)}}let l=(()=>{class p{set tree(R){this.crumbs=[],this.isRoot=!R.parent,this.currentNode=R,this.parseTree(R,!0)}set tabKey(R){this.linkSuffix=["tabs",R]}constructor(R){this.store=R,this.isRoot=!1,this.linkSuffix=[]}linkWithSuffix(R){return[...R,...this.linkSuffix]}showHierarchy(){this.store.dispatch(new L.FZ({dialog:Y.L,dialogData:{spaceId:this.spaceId,accessibleSpaceIds:this.accessibleSpaceIds,reportId:this.reportId,tree:this.currentNode,linkSuffix:this.linkSuffix},config:{width:"650px",height:"600px",panelClass:["mobile-full-width"]}}))}parseTree(R,W=!1){const j=["/","spaces","detail",this.spaceId,"reports-v2",this.reportId,"node",R.id],z=this.accessibleSpaceIds.includes(R.spaceId);this.crumbs.unshift({name:R.name,link:W||!z?null:j,disabled:!z}),R.parent&&this.parseTree(R.parent)}static{this.\u0275fac=function(W){return new(W||p)(V.rXU(P.il))}}static{this.\u0275cmp=V.VBU({type:p,selectors:[["tpe-report-v2-breadcrumbs"]],inputs:{spaceId:"spaceId",accessibleSpaceIds:"accessibleSpaceIds",reportId:"reportId",tree:"tree",tabKey:"tabKey"},standalone:!1,decls:5,vars:1,consts:()=>{let R;return R="Show Portfolio hierarchy",[["fxLayout","row","fxLayoutAlign","start center"],["mat-icon-button","","matTooltip",R,"fxFlex","0 0 auto",1,"hierarchy-button",3,"click"],["fxLayout","row wrap","fxLayoutAlign","start center","fxFlex","nogrow",1,"breadcrumbs"],["fxFlex","nogrow",3,"routerLink"],["fxFlex","nogrow",3,"ngClass"],["fxFlex","nogrow"]]},template:function(W,j){1&W&&(V.j41(0,"div",0)(1,"button",1),V.bIt("click",function(){return j.showHierarchy()}),V.j41(2,"mat-icon"),V.EFF(3,"account_tree"),V.k0s()(),V.nVh(4,_,3,0,"div",2),V.k0s()),2&W&&(V.R7$(4),V.vxM(j.crumbs?4:-1))},dependencies:[Z.Wk,X.iY,f.An,C.oV,w.YU,A.DJ,A.sA,A.UI,b.PW],styles:["[_nghost-%COMP%]{display:block;margin-bottom:24px}.hierarchy-button[_ngcontent-%COMP%]{margin-right:8px}.breadcrumbs[_ngcontent-%COMP%]{font-weight:700;margin-right:8px}.breadcrumbs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:2px}.disabled[_ngcontent-%COMP%]{color:#0000008a}"]})}}return p})()},26051(Gt,ut,y){y.d(ut,{_:()=>m});var L=y(93147),Y=y(96562),V=y(94129),P=y(36868),Z=y(35547),X=y(20562),f=y(86110),C=y(24414);function w(T,c){if(1&T&&(Z.j41(0,"div",3)(1,"span",4),Z.pXf(2,0),Z.k0s()()),2&T){const r=Z.XpG();Z.xc7("height",r.visualization.height||600,"px")}}function A(T,c){if(1&T&&Z.nrm(0,"tpe-amcharts-5-graph",6),2&T){const r=c.$implicit,g=Z.XpG(2);Z.Y8G("graphType",g.graphType)("config",r)("label",r.label)("setupBullet",g.setupBullet)("setupSeries",g.setupSeries)("minMaxBubbleSize",g.bounds.z)("data",g.dataProvider)}}function b(T,c){if(1&T&&(Z.j41(0,"tpe-amcharts-5",2)(1,"tpe-amcharts-5-panel",5),Z.Z7z(2,A,1,7,"tpe-amcharts-5-graph",6,Z.fX1),Z.k0s()()),2&T){const r=Z.XpG();Z.Y8G("disableSpacer",r.dynamicSpacing),Z.R7$(),Z.Y8G("index",0)("commonValueAxisHeight",r.visualization.height||600)("showLegend",!0)("colors",r.colors)("axisType",r.axisType),Z.R7$(),Z.Dyx(r.series)}}let m=(()=>{class T{constructor(r){this.linkMenu=r,this.dynamicSpacing=!1,this.graphType=L.eF.BUBBLE,this.axisType=L.Vn.VALUE,this.colors=null,this.tooManySeries=!1,this.bounds={x:{min:0,max:0},y:{min:0,max:0},z:{min:0,max:0}},this.setupBullet=g=>this._setupBullet(g),this.setupSeries=g=>this._setupSeries(g)}ngOnInit(){this.colors=this.visualization.colors,this.mapDataProvider(),this.mapSeries()}mapDataProvider(){this.visualization.series.length>L.h4?this.tooManySeries=!0:(this.tooManySeries=!1,this.bounds={x:{min:1/0,max:-1/0},y:{min:1/0,max:-1/0},z:{min:1/0,max:-1/0}},this.dataProvider=this.visualization.data.map(r=>(this.bounds.x=this.calcMinMax(r,this.bounds.x,"x"),this.bounds.y=this.calcMinMax(r,this.bounds.y,"y"),this.bounds.z=this.calcMinMax(r,this.bounds.z,"z"),P.y.replaceLegacyLinksInObject(r),{...r,dataPointName:Y.$x.translate(r.dataPointName),dataPointUnit:Y.$x.translate(r.dataPointUnit)})))}mapSeries(){const r=Y.$x.translate(this.visualization.unit);this.series=this.visualization.series.map(g=>{const _=Y.$x.translate(g.unit)||r;return{label:Y.$x.translate(g.label),valueXField:Y.$x.toCamelCase(g.xValueField),valueYField:Y.$x.toCamelCase(g.yValueField),valueField:Y.$x.toCamelCase(g.zValueField),userData:{linksField:g.linksField,xUnit:Y.$x.translate(this.visualization.dimensions.x.unit)||_,yUnit:Y.$x.translate(this.visualization.dimensions.y.unit)||_,zUnit:Y.$x.translate(this.visualization.dimensions.z.unit)||_,xLabel:Y.$x.translate(this.visualization.dimensions.x.label),yLabel:Y.$x.translate(this.visualization.dimensions.y.label),zLabel:Y.$x.translate(this.visualization.dimensions.z.label)}}})}_setupSeries(r){this.setMin(r.chart.xAxes.values[0],this.visualization.xAxisMinimum,"x"),this.setMin(r.chart.yAxes.values[0],this.visualization.yAxisMinimum,"y")}setMin(r,g,_){r.set("min",this.calcMin(g||0,_)),r.set("extraMax",.1),r.set("strictMinMax",!0)}calcMin(r,g){return P.y.calculateMin(r,this.bounds[g].max-this.bounds[g].min)}_setupBullet(r){const g=r.get("sprite"),_=r.get("userData").series.get("userData");g.set("cursorOverStyle","pointer"),g.adapters.add("tooltipText",(l,p)=>{const S=p.dataItem.dataContext;return S.dataPointName?[`[bold]{name}[/] (${S.dataPointName})`,`${_.xLabel}: {valueX} ${S.dataPointUnit||_.xUnit}`,`${_.yLabel}: {valueY} ${S.dataPointUnit||_.yUnit}`,`${_.zLabel}: {value} ${S.dataPointUnit||_.zUnit}`].join("\n"):null}),g.events.on("rightclick",l=>{this.linkMenu.showForLinks(this.spaceId,l.target.dataItem.dataContext[_.linksField],l.originalEvent)})}calcMinMax(r,g,_){return Object.keys(r).reduce((l,p)=>p.startsWith(`${_}Value`)?{min:Math.min(l.min,r[p]||0),max:Math.max(l.max,r[p]||0)}:l,g)}static{this.\u0275fac=function(g){return new(g||T)(Z.rXU(V.B))}}static{this.\u0275cmp=Z.VBU({type:T,selectors:[["tpe-report-v2-bubble-chart"]],inputs:{meta:"meta",visualization:"visualization",spaceId:"spaceId",dynamicSpacing:"dynamicSpacing"},standalone:!1,decls:2,vars:1,consts:()=>{let r;return r="This chart contains too many data series to be rendered.",[r,[1,"too-many-series","flex-layout-column","flex-align-center-center",3,"height"],[3,"disableSpacer"],[1,"too-many-series","flex-layout-column","flex-align-center-center"],[1,"flex-nogrow"],[3,"index","commonValueAxisHeight","showLegend","colors","axisType"],[3,"graphType","config","label","setupBullet","setupSeries","minMaxBubbleSize","data"]]},template:function(g,_){1&g&&Z.nVh(0,w,3,2,"div",1)(1,b,4,6,"tpe-amcharts-5",2),2&g&&Z.vxM(_.tooManySeries?0:1)},dependencies:[X.i,f._,C.u],styles:["\n\n\n.too-many-series[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.38);background-color:#0000001f}"]})}}return T})()},52982(Gt,ut,y){y.d(ut,{f:()=>r});var L=y(39467),Y=y(72294),V=y(7659),P=y(45760),Z=y(34908),X=y(21653);class f extends Z.k{constructor(){super(...arguments),this._display=this._root._renderer.makePicture
1(void 0)}_changed(){if(super._changed(),this.isDirty("width")){const _=this.get("width");this._display.width=X.Et(_)?_:void 0}if(this.isDirty("height")){const _=this.get("height");this._display.height=X.Et(_)?_:void 0}if(this.isDirty("shadowColor")){this._display.clear();const _=this.get("shadowColor");this._display.shadowColor=_??void 0}this.isDirty("shadowBlur")&&(this._display.clear(),this._display.shadowBlur=this.get("shadowBlur")),this.isDirty("shadowOffsetX")&&(this._display.clear(),this._display.shadowOffsetX=this.get("shadowOffsetX")),this.isDirty("shadowOffsetY")&&(this._display.clear(),this._display.shadowOffsetY=this.get("shadowOffsetY")),this.isDirty("shadowOpacity")&&(this._display.clear(),this._display.shadowOpacity=this.get("shadowOpacity")),(this.isDirty("src")||this.isDirty("cors"))&&(this._display.clear(),this._load())}_load(){const _=this.get("src");if(_){const l=new Image;l.crossOrigin=this.get("cors","anonymous"),l.src=_;const p=this.events;l.decode().then(()=>{this._display.image=l,this._updateSize(),!p.isDisposed()&&p.isEnabled("loaded")&&p.dispatch("loaded",{type:"loaded",target:this})}).catch(S=>{!p.isDisposed()&&p.isEnabled("loaderror")&&p.dispatch("loaderror",{type:"loaderror",target:this})})}}_updateSize(){super._updateSize();const _=this._display.image;if(_){let l=this.getPrivate("width",this.get("width")),p=this.getPrivate("height",this.get("height"));const S=_.width&&_.height?_.width/_.height:0;X.Et(l)&&X.Et(p)?(this._display.width=l,this._display.height=p):X.Et(l)&&S?p=l/S:X.Et(p)&&S?l=p*S:(l=_.width,p=_.height),X.Et(l)&&(this._display.width=l),X.Et(p)&&(this._display.height=p),this.markDirtyBounds(),this.markDirty()}}}f.className="Picture",f.classNames=Z.k.classNames.concat([f.className]);var C=y(96562),w=y(94129),A=y(10772);class b{constructor(_){this.visualization=_}makeSVG(_){return this.visualization.type===A.vi.FORCE_DIRECTED_SEMI_DISC?this.makeHalfCircleSVG(_):this.makeTrendSVG(_)}makeHalfCircleSVG(_){const l=this.clipKpiUnit(),{circleColor:p,delta:S}=this.getDeltaValues(_);let R=`\n            <style>\n                .label {\n                    font: 8px sans-serif;\n                    overflow: hidden;\n                    text-anchor: middle;\n                    text-overflow: ellipsis;\n                    width: 50px;\n                }\n            </style>\n            ${this.renderHalvedCircles(p)}\n            <text x="50" y="25" class="label">\n                ${C.$x.humanizeNumber(_.kpiValue+_.deltaPositive)} ${l}\n            </text>\n            <text x="50" y="75" class="label">${S} ${l}</text>\n        `;return this.renderCSV(R,100)}renderHalvedCircles(_){const l=50*Math.PI,p="#cccccc"===_?[{value:l,color:"#cccccc"}]:[{value:.5*l,color:_},{value:.5*l,color:"#cccccc"}];let S="",R=0;for(const W of p)S+=`\n                <circle r="25" cx="50" cy="50" fill="transparent"\n                        stroke="${W.color}"\n                        stroke-dasharray="${W.value}, ${l}"\n                        stroke-dashoffset="${-R}"\n                        stroke-width="50">\n                </circle>\n            `,R+=W.value;return S}clipKpiUnit(){let _=C.$x.translate(this.visualization.kpiUnit);return _.length>11&&(_=_.substring(0,10).trim()+"&#8230;"),_}getDeltaValues(_){let l="#cccccc",p="&#177;0";return _.deltaPositive?(l=this.visualization.segments.find(S=>"deltaPositive"===S.selector).color,p="+"+C.$x.humanizeNumber(_.deltaPositive)):_.deltaNegative&&(l=this.visualization.segments.find(S=>"deltaNegative"===S.selector).color,p="-"+C.$x.humanizeNumber(_.deltaNegative)),{circleColor:l,delta:p}}makeTrendSVG(_){const l=this.calculateSegments(_);let p="";for(const S of l)p+=`\n                <circle r="5" cx="10" cy="10" fill="transparent"\n                        transform="rotate(-90 10 10)"\n                        stroke="${S.color}"\n                        stroke-dasharray="${S.dasharray}"\n                        stroke-dashoffset="${S.dashoffset}"\n                        stroke-width="10">\n                </circle>\n            `;return this.renderCSV(p,20)}calculateSegments(_){const l=10*Math.PI,p=this.visualization.segments.map(W=>({color:W.color,value:_[W.selector]/100})),S=[];let R=0;for(const W of p){const j=W.value*l;S.push({color:W.color,dasharray:`${j}, ${l}
1`,dashoffset:""+-R}),R+=j}return S}renderCSV(_,l){let p=`\n            <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 ${l} ${l}">\n                ${_}\n            </svg>\n        `;return p=p.replace(/\s{2,}/g," ").trim(),"data:image/svg+xml;base64,"+btoa(p)}}var m=y(35547),T=y(20562),c=y(4328);let r=(()=>{class g{set visualization(l){this.translate(l),this.renderer=new b(this.visualization),this.visualization.segments.forEach(p=>{p.selector=C.$x.toCamelCase(p.selector)})}get visualization(){return this.viz}constructor(l){this.linkMenu=l,this.headless=!1,this.dynamicSpacing=!1,this.colors=["#cccccc"],this.settings={nodePadding:10},this.setupChart=p=>this._setupChart(p)}translate(l){const p=l.data.map(S=>this.translateNode(S));this.viz={...l,data:p},this.data=p}translateNode(l){return{...l,name:C.$x.translate(l.name),label:C.$x.translate(l.label),children:l.children?.map(p=>this.translateNode(p))}}_setupChart(l){this.setupTooltips(l),this.setupLabels(l),this.setupNodes(l),this.headless&&l.parent.parent.children.values.find(S=>S instanceof L.V)?.hide()}setupTooltips(l){l.nodes.template.adapters.add("tooltipText",(p,S)=>this.formatTrendTooltip(S.dataItem.dataContext))}formatTrendTooltip(l){const p=C.$x.translate(this.visualization.kpiUnit),S=C.$x.translate(this.visualization.kpiName),R=C.$x.translate(this.visualization.sizeUnit),W=C.$x.translate(this.visualization.sizeName);let j=`[bold]${l.name}[/]`;return j+=`\n${S}: ${this.formatValue(null!==l.kpiValue?l.kpiValue+l.deltaPositive:null,p)}`,j+=this.formatSegmentDelta(l,p),j+=`\n${W}: ${this.formatValue(l.value,R)}`,l.hasOwnProperty("valueDelta")&&(j+=this.formatDelta(l.valueDelta,R)),j}formatSegmentDelta(l,p){return l.deltaPositive?` ([color=${this.visualization.segments.find(R=>"deltaPositive"===R.selector).color}]+${this.formatValue(l.deltaPositive,p)}[/])`:l.deltaNegative?` ([color=${this.visualization.segments.find(R=>"deltaNegative"===R.selector).color}]-${this.formatValue(l.deltaNegative,p)}[/])`:null!==l.kpiValue?` (\xb10 ${p})`:""}formatDelta(l,p){return l>0?` (+${this.formatValue(l,p)})`:l<0?` (${this.formatValue(l,p)})`:0===l?` (\xb10 ${p})`:""}formatValue(l,p){return null===l?"\u2013":`${C.$x.humanizeNumber(l)} ${p}`}setupLabels(l){l.labels.template.setup=p=>{p.set("fill",(0,Y.yW)("#000")),p.set("background",V.T.new(l.root,{fill:(0,Y.yW)("#fff"),fillOpacity:.5,width:(0,P.KN)(100),height:(0,P.KN)(100)})),p.set("paddingLeft",2),p.set("paddingRight",2)},l.labels.template.adapters.add("text",(p,S)=>S.dataItem?.dataContext?.label||p)}setupNodes(l){l.outerCircles.template.set("fillOpacity",0),l.nodes.template.setup=p=>{p.events.once("dataitemchanged",S=>{const R=p.dataItem?.dataContext;!R.value||null===R.kpiValue||S.target.dataItem.on("circle",W=>{W.on("radius",(j,z)=>{z.set("fill",(0,Y.yW)("#000")),z.set("fillOpacity",0),this.createOrUpdateSVG(p,z)})})})},l.nodes.template.events.on("rightclick",p=>{this.linkMenu.showForLinks(this.spaceId,p.target.dataItem.dataContext.links,p.originalEvent)})}createOrUpdateSVG(l,p){const S=2*p.get("radius");let R=p.getPrivate("customData");if(R)R.setAll({width:S,height:S});else{const W=this.renderer.makeSVG(l.dataItem?.dataContext);R=l.children.unshift(f.new(l.root,{width:S,height:S,centerX:(0,P.KN)(50),centerY:(0,P.KN)(50),src:W})),p.setPrivate("customData",R)}}static{this.\u0275fac=function(p){return new(p||g)(m.rXU(w.B))}}static{this.\u0275cmp=m.VBU({type:g,selectors:[["tpe-report-v2-force-tree"]],inputs:{spaceId:"spaceId",headless:"headless",dynamicSpacing:"dynamicSpacing",visualization:"visualization"},standalone:!1,decls:2,vars:7,consts:[[3,"noData","disableSpacer"],[3,"data","setupChart","settings","colors","height"]],template:function(p,S){1&p&&(m.j41(0,"tpe-amcharts-5",0),m.nrm(1,"tpe-amcharts-5-force-directed",1),m.k0s()),2&p&&(m.Y8G("noData",!1)("disableSpacer",S.dynamicSpacing),m.R7$(),m.Y8G("data",S.data)("setupChart",S.setupChart)("settings",S.settings)("colors",S.colors)("height",S.visualization.height))},dependencies:[T.i,c.r],styles:["\n\n\n[_nghost-%COMP%]{border:1px solid rgba(0,0,0,.12);display:block}"]})}}return g})()},63071(Gt,ut,y){y.d(ut,{l:()=>C});var L=y(10772),Y=y(96562),V=y(56945),P=y(36868),Z=y(35547);const X=w=>({headless:w});function f(w,A){if(1&w&&Z.nrm(0,"tpe-report-heatmap",0),2&w){const b=Z.XpG();Z.Y8G("ngClass",Z.eq3(8,X,b.headless))("collapsible",!0)("mapId",b.mapId)("kpiRowTitle",b.columnLabel)("nameColumnTitle",b.rowLabel)("content",b.heatmapReport)("spaceId",b.spaceId)("csvFileName",b.csvFileName)}}let C=(()=>{class w{constructor(){this.itemId=1}set visualization(b){this.translateHeatMap(b)}translateHeatMap(b){this.rowLabel=Y.$x.translate(b.rowLabel),this.columnLabel=Y.$x.translate(b.columnLabel),this.csvFileName=V.i.getCSVFileName(b,this.timestamp),this.mapId=`report_v2_${this.meta.report.id}_viz_${this.index}`;const m=b.columns.map(r=>({kpi:V.i.mapKpi(r.kpi),links:r.links,rows:[],startDate:r.kpi.name.startDate??null,endD
1ate:r.kpi.name.endDate??null})),T=this.flattenHeatMap(b.rows,m,b);this.heatmapReport={type:L.nI.HEATMAP,startDate:null,endDate:null,timestamp:null,content:{thresholds:[],items:T,columns:m,diffEnabled:b.diffEnabled,showTargetIndicator:b.showTargetIndicator}}}flattenHeatMap(b,m,T,c=[],r=null,g=0){for(const _ of b){const l={id:this.itemId++,name:Y.$x.translate(_.name),startDate:_.name.startDate??T.startDate??null,endDate:_.name.endDate??T.endDate??null,children:[],isStatistic:!1,links:_.links,childrenCollapsed:g>=T.initialDepth-1,collapsed:g>T.initialDepth-1,depth:g};c.push(l),r&&r.children.push(l);for(let p in _.values)m[p].rows.push(this.mapRow(_.values[p],l.id));this.flattenHeatMap(_.children,m,T,c,l,g+1)}return c}mapRow(b,m){return P.y.replaceLegacyLinksInObject(b.value),{...b,entityId:m,value:{...b.value,id:m,unit:Y.$x.translate(b.value.unit)}}}static{this.\u0275fac=function(m){return new(m||w)}}static{this.\u0275cmp=Z.VBU({type:w,selectors:[["tpe-report-v2-heat-map-rows"]],inputs:{meta:"meta",index:"index",spaceId:"spaceId",timestamp:"timestamp",headless:"headless",visualization:"visualization"},standalone:!1,decls:1,vars:1,consts:[[3,"ngClass","collapsible","mapId","kpiRowTitle","nameColumnTitle","content","spaceId","csvFileName"]],template:function(m,T){1&m&&Z.nVh(0,f,1,10,"tpe-report-heatmap",0),2&m&&Z.vxM(T.heatmapReport?0:-1)},styles:["\n\n\n.headless[_ngcontent-%COMP%]     .download-values{display:none!important}"]})}}return w})()},56945(Gt,ut,y){y.d(ut,{i:()=>V});var L=y(10772),Y=y(96562);class V{static getCSVFileName(Z,X){let f=Y.Em.formatForBackend(X);return f+="_"+Y.$x.translate(Z.name),f=f.toLowerCase(),f=f.replace(/[^a-z0-9_-]/gi,"-"),f=f.replace(/--+/g,"-"),f=f.replace(/(^-+|-+$)/g,""),f+".csv"}static mapKpi(Z){return{...Z,name:Y.$x.translate(Z.name),description:Y.$x.translate(Z.description),uuid:`report-v2-kpi-${Z.id}`,isNeutral:!1,unit:Y.$x.translate(Z.unit),shortUnit:"",chartType:"",kpiType:L.v7.CODE_KPI,showDelta:!1,aggregationFunction:"sum",group:{id:null,name:"Uncategorized"}}}}},22555(Gt,ut,y){y.d(ut,{G:()=>C});var L=y(10772),Y=y(96562),V=y(36868),P=y(56945),Z=y(35547);const X=w=>({headless:w});function f(w,A){if(1&w&&Z.nrm(0,"tpe-report-heatmap",0),2&w){const b=Z.XpG();Z.Y8G("ngClass",Z.eq3(7,X,b.headless))("mapId",b.mapId)("kpiRowTitle",b.columnLabel)("nameColumnTitle",b.rowLabel)("content",b.heatmapReport)("spaceId",b.spaceId)("csvFileName",b.csvFileName)}}let C=(()=>{class w{set visualization(b){this.translateHeatMap(b)}translateHeatMap(b){this.rowLabel=Y.$x.translate(b.rowLabel),this.columnLabel=Y.$x.translate(b.columnLabel),this.csvFileName=P.i.getCSVFileName(b,this.timestamp),this.mapId=`report_v2_${this.meta.report.id}_viz_${this.index}`;for(const T of b.items)V.y.replaceLegacyLinksInObject(T);for(const T of b.columns)V.y.replaceLegacyLinksInObject(T);const m={thresholds:b.thresholds,items:b.items.map(T=>({...T,name:Y.$x.translate(T.name),startDate:T.name.startDate??b.startDate??null,endD
1ate:T.name.endDate??b.endDate??null})),columns:b.columns.map(T=>({kpi:P.i.mapKpi(T.kpi),links:T.links,rows:T.rows.map(c=>this.mapRow(c)),startDate:T.kpi.name.startDate??null,endDate:T.kpi.name.endDate??null})),diffEnabled:b.diffEnabled,showTargetIndicator:b.showTargetIndicator};this.heatmapReport={type:L.nI.HEATMAP,startDate:null,endDate:null,timestamp:null,content:m}}mapRow(b){return V.y.replaceLegacyLinksInObject(b.value),{...b,value:{...b.value,unit:Y.$x.translate(b.value.unit)}}}static{this.\u0275fac=function(m){return new(m||w)}}static{this.\u0275cmp=Z.VBU({type:w,selectors:[["tpe-report-v2-heat-map"]],inputs:{meta:"meta",index:"index",spaceId:"spaceId",timestamp:"timestamp",headless:"headless",visualization:"visualization"},standalone:!1,decls:1,vars:1,consts:[[3,"ngClass","mapId","kpiRowTitle","nameColumnTitle","content","spaceId","csvFileName"]],template:function(m,T){1&m&&Z.nVh(0,f,1,9,"tpe-report-heatmap",0),2&m&&Z.vxM(T.heatmapReport?0:-1)},styles:["\n\n\n.headless[_ngcontent-%COMP%]     .download-values{display:none!important}"]})}}return w})()},89725(Gt,ut,y){y.d(ut,{L:()=>W});var L=y(75351),Y=y(93137),V=y(14123),P=y(35547),Z=y(85802),X=y(80888),f=y(37702),C=y(88834),w=y(92367),A=y(21518),b=y(19714),m=y(49769),T=y(52920),c=y(16038),r=y(16062);const g=(j,z)=>({current:j,disabled:z});function _(j,z){if(1&j){const U=P.RV6();P.j41(0,"mat-icon",16),P.bIt("click",function(){Z.eBV(U);const it=P.XpG(2).$implicit,gt=P.XpG();return Z.Njj(gt.toggleNode(it))}),P.EFF(1),P.k0s()}if(2&j){const U=P.XpG(2).$implicit;P.R7$(),P.SpI(" ",U.collapsed?"keyboard_arrow_right":"keyboard_arrow_down"," ")}}function l(j,z){if(1&j){const U=P.RV6();P.j41(0,"a",17),P.bIt("click",function(){Z.eBV(U);const it=P.XpG(2).$implicit,gt=P.XpG();return Z.Njj(gt.goToNode(it))}),P.EFF(1),P.k0s()}if(2&j){const U=P.XpG(2).$implicit;P.R7$(),P.JRh(U.name)}}function p(j,z){if(1&j&&P.EFF(0),2&j){const U=P.XpG(2).$implicit;P.SpI(" ",U.name," ")}}function S(j,z){if(1&j&&(P.j41(0,"div",11),P.nrm(1,"span",12),P.j41(2,"span",13),P.nVh(3,_,2,1,"mat-icon",14),P.k0s(),P.j41(4,"span",15),P.nVh(5,l,2,1,"a")(6,p,1,1),P.k0s()()),2&j){const U=P.XpG().$implicit;P.R7$(),P.xc7("width",16*U.depth,"px"),P.R7$(2),P.vxM(U.children.length?3:-1),P.R7$(),P.Y8G("ngClass",P.l_i(5,g,U.isCurrentNode,U.disabled)),P.R7$(),P.vxM(U.isCurrentNode||U.disabled?6:5)}}function R(j,z){1&j&&P.nVh(0,S,7,8,"div",11),2&j&&P.vxM(z.$implicit.show?0:-1)}let W=(()=>{class j{constructor(U,nt,it){this.store=U,this.router=nt,this.data=it,this.allExpanded=!1,this.allCollapsed=!1;const gt=this.getRoot(it.tree);this.root=this.mapTree(gt),this.flatNodes=Y.v.flattenTree(this.root),this.selectCurrentNode()}toggleAll(U){this.flatNodes.forEach(nt=>{nt.collapsed=U,nt.show=!U||!nt.parent}),this.updateAllExpanded()}toggleNode(U){Y.v.toggleNode(U),this.updateAllExpanded()}goToNode(U){this.router.navigate([...U.link,...this.data.linkSuffix]),this.store.dispatch(new V.$7)}updateAllExpanded(){this.allExpanded=!this.flatNodes.find(U=>U.collapsed),this.allCollapsed=!this.flatNodes.find(U=>!U.collapsed)}selectCurrentNode(){const U=this.flatNodes.find(nt=>nt.isCurrentNode);Y.v.expandTree(U),this.updateAllExpanded()}getRoot(U){return U.parent?this.getRoot(U.parent):U}mapTree(U,nt=null,it=0){const gt={name:U.name,link:this.getLink(U),show:!U.parent,depth:it,parent:nt,collapsed:!0,isCurrentNode:this.isCurrentNode(U),children:[],disabled:!this.data.accessibleSpaceIds.includes(U.spaceId)};for(const N of U.children){const tt=this.mapTree(N,gt,it+1);gt.children.push(tt)}return gt}isCurrentNode(U){const nt=this.data.tree.isLeaf?this.data.tree.parent.id:this.data.tree.id,it=this.data.tree.isLeaf?this.data.tree.id:null;return U.isLeaf?U.parent.id===nt&&U.id===it:U.id===nt&&!it}getLink(U){const nt=U.isLeaf?U.parent.id:U.id;let it=["/","spaces","detail",this.data.spaceId,"reports-v2",this.data.reportId];return U.parent&&(it=[...it,"node",nt],U.isLeaf&&(it=[...it,"leaf",U.id])),it}static{this.\u0275fac=function(nt){return new(nt||j)(P.rXU(X.il),P.rXU(f.Ix),P.rXU(L.Vh))}}static{this.\u0275cmp=P.VBU({type:j,selectors:[["ng-component"]],standalone:!1,decls:17,vars:3,consts:()=>{let U,nt,it,gt;return U="Expand all",nt="Collapse all",it="Portfolio hierarchy",gt="Close",[it,gt,[3,"flexContent"],[1,"tpe-dialog-header"],["fxLayout","row"],["fxFlex","auto"],["mat-icon-button","","fxFlex","0 0 auto","matTooltip",U,3,"click","disabled"],["mat-icon-button","","fxFlex","0 0 auto","matTooltip",nt,3,"click","disabled"],["fxLayout","column",1,"tpe-dialog-content"],[1,"tpe-dialog-actions"],["mat-button","","mat-dialog-close",""],["fxLayout","row","fxLayoutAlign","start center"],["fxFlex","0 0 auto"],["fxFlex","0 0 auto","fxLayout","start center",1,"item-toggle"],["fxFlex","nogrow"],["fxFlex","auto",1,"item-content",3,"ngClass"],["fxFlex","nogrow",3,"click"],[3,"click"]]},template:function(nt,it){1&nt&&(P.j41(0,"tpe-dialog-layout",2),P.qex(1,3),P.j41(2,"div",4)(3,"div",5),P.pXf(4,0),P.k0s(),P.j41(5,"button",6),P.bIt("click",function(){return it.toggleAll(!1)}),P.j41(6,"mat-icon"),P.EFF(7,"unfold_more_double"),P.k0s()(),P.j41(8,"button",7),P.bIt("click",function(){return it.toggleAll(!0)}),P.j41(9,"mat-icon"),P.EFF(10,"unfold_less_double"),P.k0s()()(),P.bVm(),P.j41(11,"div",8),P.Z7z(12,R,1,1,null,null,P.fX1),P.k0s(),P.qex(14,9),P.j41(15,"button",10),P.pXf(16,1),P.k0s(),P.bVm(),P.k0s()),2&nt&&(P.Y8G("flexContent",!0),P.R7$(5),P.Y8G("disabled",it.allExpanded),P.R7$(3),P.Y8G("disabled",it.allCollapsed),P.R7$(4),P.Dyx(it.flatNodes))},dependencies:[C.$z,w.iY,A.An,b.oV,L.tx,m.YU,T.DJ,T.sA,T.UI,c.PW,r.U],styles:[".scroll-area[_ngcontent-%COMP%]{max-height:600px;overflow:auto}.item-toggle[_ngcontent-%COMP%]{width:32px}.item-toggle[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{cursor:pointer}.item-content[_ngcontent-%COMP%]{padding:8px 8px 8px 0}.item-content[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{cursor:pointer}.item-content.current[_ngcontent-%COMP%]{font-weight:700}"]})}}return j})()},60915(Gt,ut,y){y.d(ut,{W:()=>l});var L=y(93147),Y=y(10772),V=y(49952),P=y(96562),Z=y(94129),X=y(36868),f=y(35547),C=y(20562),w=y(86110),A=y(24414);function b(p,S){if(1&p&&(f.j41(0,"div",3)(1,"span",4),f.pXf(2,0),f.k0s()()),2&p){const R=f.XpG();f.xc7("height",R.visualization.height||200,"px")}
1}function m(p,S){if(1&p&&f.nrm(0,"tpe-amcharts-5-graph",6),2&p){const R=S.$implicit,W=f.XpG(2);f.Y8G("config",R)("label",R.label)("graphType",W.graphType)("setupSeries",W.setupSeries)("setupBullet",W.setupBullet)("data",W.dataProvider)}}function T(p,S){if(1&p&&f.nrm(0,"tpe-amcharts-5-graph",7),2&p){const R=f.XpG().$implicit,W=f.XpG(2);f.Y8G("config",R.minSeries)("label",R.minSeries.label)("graphType","line")("setupSeries",W.setupTargetSeries)("setupBullet",W.setupTargetBullet)("bulletSpriteType",W.targetBulletSprite)("data",R.dataProvider)}}function c(p,S){if(1&p&&f.nrm(0,"tpe-amcharts-5-graph",7),2&p){const R=f.XpG().$implicit,W=f.XpG(2);f.Y8G("config",R.maxSeries)("label",R.maxSeries.label)("graphType","line")("setupSeries",W.setupTargetSeries)("setupBullet",W.setupTargetBullet)("bulletSpriteType",W.targetBulletSprite)("data",R.dataProvider)}}function r(p,S){if(1&p&&(f.nVh(0,T,1,7,"tpe-amcharts-5-graph",7),f.nVh(1,c,1,7,"tpe-amcharts-5-graph",7)),2&p){const R=S.$implicit,W=f.XpG(2);f.vxM(R.mode===W.targetMode.MIN||R.mode===W.targetMode.RANGE?0:-1),f.R7$(),f.vxM(R.mode===W.targetMode.MAX||R.mode===W.targetMode.RANGE?1:-1)}}function g(p,S){if(1&p&&f.nrm(0,"tpe-amcharts-5-graph",7),2&p){const R=S.$implicit,W=f.XpG(2);f.Y8G("config",R.series)("label",R.series.label)("graphType","line")("setupSeries",W.setupPredictionSeries)("setupBullet",W.setupPredictionBullet)("bulletSpriteType",W.targetBulletSprite)("data",R.dataProvider)}}function _(p,S){if(1&p&&(f.j41(0,"tpe-amcharts-5",2)(1,"tpe-amcharts-5-panel",5),f.Z7z(2,m,1,6,"tpe-amcharts-5-graph",6,f.fX1),f.Z7z(4,r,2,2,null,null,f.fX1),f.Z7z(6,g,1,7,"tpe-amcharts-5-graph",7,f.fX1),f.k0s()()),2&p){const R=f.XpG();f.Y8G("config",R.panelConfig),f.R7$(),f.Y8G("index",0)("commonValueAxisHeight",R.visualization.height||200)("showLegend",!0)("setupLegend",R.setupLegend)("setupPanel",R.setupPanel)("colors",R.colors)("axisType",R.visualization.categoriesAreDates?R.axisType.DATE:R.axisType.CATEGORY),f.R7$(),f.Dyx(R.series),f.R7$(2),f.Dyx(R.targets),f.R7$(2),f.Dyx(R.predictions)}}let l=(()=>{class p{constructor(R){this.linkMenu=R,this.graphType=L.eF.LINE,this.spaceId=null,this.headless=!1,this.dynamicSpacing=!1,this.axisType=L.Vn,this.targetMode=Y.xx,this.targetBulletSprite=L.ww.SQUARE,this.colors=null,this.panelConfig={},this.tooManySeries=!1,this.legendClickAdded=!1,this.setupSeries=W=>this._setupSeries(W),this.setupTargetSeries=W=>this._setupTargetSeries(W),this.setupPredictionSeries=W=>this._setupPredictionSeries(W),this.setupBullet=W=>this._setupBullet(W),this.setupTargetBullet=W=>this._setupTargetBullet(W),this.setupPredictionBullet=W=>this._setupPredictionBullet(W),this.setupLegend=W=>this._setupLegend(W),this.setupPanel=W=>this._setupPanel(W)}ngOnInit(){this.unit=P.$x.translate(this.visualization.unit),this.colors=this.visualization.colors,this.visualization.series.length>L.h4?this.tooManySeries=!0:(this.tooManySeries=!1,this.mapDataProvider(),this.mapSeries(),this.mapTargets(),this.mapPredictions(),this.dynamicSpacing&&(this.panelConfig.paddingTop=0,this.panelConfig.paddingBottom=0))}mapTargets(){this.targets=(this.visualization.targets||[]).map(R=>{const W={seriesIndex:R.seriesIndex,isMainSeries:!1},j=P.$x.translate(R.label);return{minSeries:{label:`${j} - min`,valueYField:"minValue",userData:W},maxSeries:{label:`${j} - max`,valueYField:"maxValue",userData:W},mode:R.mode,dataProvider:R.data.map(z=>({...z,category:z.date}))}})}mapPredictions(){this.predictions=(this.visualization.predictions||[]).map(R=>({series:{label:P.$x.translate(R.label),valueYField:"value",userData:{seriesIndex:R.seriesIndex,isMainSeries:!1}},dataProvider:R.data.map(W=>({...W,category:W.date}))}))}mapDataProvider(){this.dataProvider=this.visualization.data.map((R,W)=>{const j=P.$x.translate(R.category),z={};for(const U of Object.keys(R))U.startsWith("unit")&&(z[U]=P.$x.translate(R[U]));return X.y.replaceLegacyLinksInObject(R),{...R,...z,category:j,date:j}})}getMinMax(){let R=1/0,W=-1/0;return this.visualization.data.forEach(j=>{const{itemMin:z,itemMax:U}=this.getItemMinMax(j);R=Math.min(R,z),W=Math.max(W,U)}
1),this.targets.forEach(j=>j.dataProvider.forEach(z=>{(j.mode===Y.xx.MIN||j.mode===Y.xx.RANGE)&&(R=Math.min(R,+z.minValue)),(j.mode===Y.xx.MAX||j.mode===Y.xx.RANGE)&&(W=Math.max(W,+z.maxValue))})),{min:R,max:W}}getItemMinMax(R){let W=1/0,j=this.visualization.isStacked?0:-1/0;for(const z in R)!z.startsWith("value")||!Number.isFinite(R[z])||(this.visualization.isStacked?(W=Math.min(W,+R[z]),j+=+R[z]):(W=Math.min(W,+R[z]),j=Math.max(j,+R[z])));return{itemMin:W,itemMax:j}}getPredictionMinMax(){let R=1/0,W=-1/0;return this.predictions.forEach(j=>j.dataProvider.forEach(z=>{Number.isFinite(z.value)&&(R=Math.min(R,+z.value),W=Math.max(W,+z.value))})),{predictionMin:R,predictionMax:W}}mapSeries(){this.series=this.visualization.series.map((R,W)=>{X.y.replaceLegacyLinksInObject(R);const j={label:P.$x.translate(R.label),valueYField:R.valueField,userData:{links:R.links,linksField:R.linksField,unitField:R.unitField,unit:P.$x.translate(R.unit)||this.unit,isMainSeries:!0,seriesIndex:W}};return this.visualization.isPercent&&(j.valueYShow="valueYTotalPercent"),j})}_setupSeries(R){if(this.visualization.isArea&&this.graphType!==L.eF.BAR){const W=R;W.fills.template.setAll({visible:!0,interactive:!0,fillOpacity:.75}),W.fills.template.states.create("hover",{fillOpacity:1})}R.events.on("datavalidated",()=>{this.setAxisMinMax(R)}),this.visualization.isStacked&&(R.data.processor.set("emptyAs",0),R.data.processor.set("numericFields",[R.get("valueYField")])),R.set("stacked",this.visualization.isStacked)}_setupPanel(R){this.headless&&(R.get("scrollbarY").hide(),R.get("scrollbarX").hide())}_setupTargetSeries(R){this.setupAdditionalSeries(R,[10])}_setupPredictionSeries(R){this.setupAdditionalSeries(R,[1,2])}setupAdditionalSeries(R,W){R.strokes.template.setAll({strokeDasharray:W}),R.set("stroke",R.chart.get("colors").getIndex(R.get("userData").seriesIndex)),R.events.on("datavalidated",()=>{this.visualization.categoriesAreDates&&this.zoomDateAxis(R),this.setAxisMinMax(R)})}zoomDateAxis(R){if(0===this.dataProvider.length)return;const W=(0,V.n)(this.dataProvider[0].date).toDate(),j=(0,V.n)(this.dataProvider[this.dataProvider.length-1].date),z=j.diff(W,"days")/this.dataProvider.length;j.add(z,"days"),R.get("xAxis").zoomToDates(W,j.toDate())}setAxisMinMax(R){const W=R.chart.yAxes.values[0];if(this.visualization.isPercent)W.setAll({min:0,max:100,calculateTotals:!0,numberFormat:"#'%'"});else{const{min:j,max:z}=this.getMinMax(),{predictionMin:U,predictionMax:nt}=this.getPredictionMinMax(),it=this.visualization.valueAxisMinimum?j:0,gt=Math.min(it,U),N=Math.max(z,nt),tt=gt-this.padding(gt),J=N+this.padding(N);W.setAll({min:tt,max:J,extraMin:0,extraMax:0,strictMinMax:!0,autoZoom:!1});const at=it?it-this.padding(gt):0;W.setAll({start:this.calculatePercent(tt,J,at),end:this.calculatePercent(tt,J,z+this.padding(N))})}}padding(R){return Math.abs(R)*X.y.EXTRA_MIN_MAX}calculatePercent(R,W,j){return(j-R)/(W-R)}_setupBullet(R){const W=R.get("sprite"),j=R.get("userData").series.get("userData");W.set("cursorOverStyle","pointer"),W.states.create("hover",{radius:8}),W.events.on("rightclick",z=>{this.showLinkMenu(z.target.dataItem.dataContext[j.linksField],z.originalEvent)}),W.adapters.add("tooltipText",(z,U)=>{const nt=U.dataItem.dataContext;return nt.category?`{name}: {valueY} ${nt[j.unitField]||j.unit}`:null}),[L.eF.BAR,L.eF.STEP].includes(this.graphType)&&(R.set("locationX",.5),R.set("locationY",1))}_setupTargetBullet(R){this.setupAdditionalSeriesBullet(R,8)}_setupPredictionBullet(R){this.setupAdditionalSeriesBullet(R,5)}setupAdditionalSeriesBullet(R,W){const j=R.get("sprite"),z=R.get("userData").series,U=z.get("userData").seriesIndex,nt=z.chart.series.values.find(gt=>{const N=gt.get("userData");return N.seriesIndex===U&&N.isMainSeries});if(!nt)return;const it=nt.get("userData");j.adapters.add("tooltipText",()=>`{name}: {valueY} ${it.unit}`),j.setAll({width:W,height:W,fill:nt.get("stroke")}),j.states.create("hover",{width:2*W,height:2*W})}_setupLegend(R){this.legendClickAdded||(R.itemContainers.template.events.on("rightclick",W=>{const j=W.target.dataItem.dataContext.get("userData");this.showLinkMenu(j.links,W.originalEvent)}),this.legendClickAdded=!0),R.data.setAll(R.data.values.filter(W=>W.get("userData").isMainSeries))}showLinkMenu(R,W){this.linkMenu.showForLinks(this.spaceId,R,W)}static{this.\u0275fac=function(W){return new(W||p)(f.rXU(Z.B))}}static{this.\u0275cmp=f.VBU({type:p,selectors:[["tpe-report-v2-line-chart"]],inputs:{meta:"meta",visualization:"visualization",graphType:"graphType",spaceId:"spaceId",headless:"headless",dynamicSpacing:"dynamicSpacing"},standalone:!1,decls:2,vars:1,consts:()=>{let R;return R="This chart contains too many data series to be rendered.",[R,[1,"too-many-series","flex-layout-column","flex-align-center-center",3,"height"],[3,"config"],[1,"too-many-series","flex-layout-column","flex-align-center-center"],[1,"flex-nogrow"],[3,"index","commonValueAxisHeight","showLegend","setupLegend","setupPanel","colors","axisType"],[3,"config","label","graphType","setupSeries","setupBullet","data"],[3,"config","label","graphType","setupSeries","setupBullet","bulletSpriteType","data"]]},template:function(W,j){1&W&&f.nVh(0,b,3,2,"div",1)(1,_,8,8,"tpe-amcharts-5",2),2&W&&f.vxM(j.tooManySeries?0:1)},dependencies:[C.i,w._,A.u],styles:["\n\n\n.too-many-series[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.38);background-color:#0000001f}"]})}}return p})()},44017(Gt,ut,y){y.d(ut,{r:()=>f});var L=y(96562),Y=y(94129),V=y(36868),P=y(35547),Z=y(20562),X=y(19775);let f=(()=>{class C{set visualization(A){this.mapVisualization(A)}constructor(A){this.linkMenu=A,this.spaceId=null,this.dynamicSpacing=!1,this.chartHe
1ight=400,this.unit="",this.noData=!1,this.linkMap=new Map,this.nodeMap=new Map,this.setupChart=b=>this._setupChart(b)}mapVisualization(A){this.linkMap.clear(),this.nodeMap.clear(),this.unit=L.$x.translate(A.unit),this.noData=!A.nodes.length,this.chartHeight=A.height||400;const b=A.nodes.map(T=>{const c={...this.translateNode(T),fill:T.fill};return this.nodeMap.set(c.id,L.$x.translate(T.name)),c}),m=A.series.map(T=>({from:L.$x.translate(T.from),to:T.to?L.$x.translate(T.to):null,value:T.value}));this.sankeyChartData={series:m,nodes:b}}translateNode(A){const b=L.$x.translate(A.id);let m="string"==typeof A.name?A.name:L.$x.translate(A.name);return V.y.replaceLegacyLinksInObject(A),this.linkMap.set(b,A.links),A.showValue&&(m=`${m} ${L.$x.humanizeNumber(A.value)}`+(this.unit?` ${this.unit}`:"")),A.showPercentage&&(m=`${m} (${L.$x.humanizeNumber(A.percentage)}%)`),{name:m,id:b}}_setupChart(A){A.nodes.nodes.template.events.on("rightclick",b=>{this._openTabForNode(b.target.dataItem.get("id"),b.originalEvent)}),A.links.template.events.on("rightclick",b=>{this._openTabForNode(b.target.dataItem.get("targetId"),b.originalEvent)}),A.links.template.adapters.add("tooltipText",(b,m)=>{const T=this.nodeMap.get(m.dataItem.dataContext.to);return b.replace("{targetId}",T)})}_openTabForNode(A,b){const m=this.linkMap.get(A);this.linkMenu.showForLinks(this.spaceId,m,b)}static{this.\u0275fac=function(b){return new(b||C)(P.rXU(Y.B))}}static{this.\u0275cmp=P.VBU({type:C,selectors:[["tpe-report-v2-sankey-chart"]],inputs:{spaceId:"spaceId",dynamicSpacing:"dynamicSpacing",visualization:"visualization"},standalone:!1,decls:2,vars:6,consts:[[3,"noData","disableSpacer"],[3,"data","height","unit","setupChart"]],template:function(b,m){1&b&&(P.j41(0,"tpe-amcharts-5",0),P.nrm(1,"tpe-amcharts-5-sankey",1),P.k0s()),2&b&&(P.Y8G("noData",m.noData)("disableSpacer",m.dynamicSpacing),P.R7$(),P.Y8G("data",m.sankeyChartData)("height",m.chartHeight)("unit",m.unit)("setupChart",m.setupChart))},dependencies:[Z.i,X.F],encapsulation:2})}}return C})()},27089(Gt,ut,y){y.d(ut,{q:()=>f});var L=y(72294),Y=y(96562),V=y(94129),P=y(35547),Z=y(20562),X=y(97408);let f=(()=>{class C{constructor(A){this.linkMenu=A,this.dynamicSpacing=!1,this.maxDepth=1,this.setupChart=b=>this._setupChart(b)}ngOnInit(){this.data=this.translate(this.visualization.data),this.unit=Y.$x.translate(this.visualization.unit)}translate(A){const b=[];for(const m of A)this.maxDepth=Math.max(m.depth,this.maxDepth),b.push({...m,name:Y.$x.translate(m.name),label:"  "+Y.$x.translate(m.label)+"  ",children:this.translate(m.children||[])});return b}_setupChart(A){this.setupNodes(A),this.setupSlices(A),this.setupLabels(A),A.set("heatRules",[{target:A.slices.template,dataField:"depth",min:1,max:.3,minValue:1,maxValue:this.maxDepth,key:"fillOpacity"}])}setupSlices(A){A.slices.template.adapters.add("fill",(b,m)=>m.dataItem.dataContext.id===this.visualization.data[0].id?(0,L.yW)("#dddddd"):b)}setupNodes(A){A.nodes.template.adapters.add("tooltipText",(b,m)=>{const T=m.dataItem.dataContext;let c=`[bold]${T.name}[/]`;return this.visualization.showValueInTooltip&&(c+=`\n${Y.$x.humanizeNumber(T.value)} ${this.unit}`),this.visualization.showPercentageInTooltip&&(c+=`\n${Y.$x.humanizeNumber(T.percentage)}%`),c}),A.nodes.template.events.on("rightclick",b=>{this.linkMenu.showForLinks(this.spaceId,b.target.dataItem.dataContext.links,b.originalEvent)})}setupLabels(A){A.labels.template.adapters.add("fill",(b,m)=>{const T=m.dataItem?.dataContext;if(!T)return b;if(T.id===this.visualization.data[0].id)return(0,L.yW)("#000000");const c=m.dataItem.get("fill");return L.Q1.alternative(c,(0,L.yW)("#ffffff"),(0,L.yW)("#000000"))})}static{this.\u0275fac=function(b){return new(b||C)(P.rXU(V.B))}}static{this.\u0275cmp=P.VBU({type:C,selectors:[["tpe-report-v2-sunburst-chart"]],inputs:{spaceId:"spaceId",visualization:"visualization",dynamicSpacing:"dynamicSpacing"},standalone:!1,decls:2,vars:6,consts:[[3,"noData","disableSpacer"],[3,"data","setupChart","height","colors"]],template:function(b,m){1&b&&(P.j41(0,"tpe-amcharts-5",0),P.nrm(1,"tpe-amcharts-5-sunburst",1),P.k0s()),2&b&&(P.Y8G("noData",!1)("disableSpacer",m.dynamicSpacing),P.R7$(),P.Y8G("data",m.data)("setupChart",m.setupChart)("height",m.visualization.height)("colors",m.visualization.colors))},dependencies:[Z.i,X.i],encapsulation:2})}}return C})()},12940(Gt,ut,y){y.d(ut,{P:()=>w,Y:()=>A});var L=y(84412),Y=y(5964),V=y(96354),P=y(88141),Z=y(1163),X=y(96562),f=y(46463),C=y(85802);const w="_general";let A=(()=>{class b{constructor(T){this.i18n=T,this.activeTab$=new L.t(w),this.visualizations$=new L.t(null)}getPageContent(T){return T=T||w,this.visualizations$.pipe((0,Y.p)(f.a4),(0,P.M)(()=>{this.usedTabs.length>0&&!this.usedTabs.find(c=>c.key===T)&&(console.warn(`Tab ${T} not found, using ${this.tabs[0].key}`),T=this.tabs[0].key),this.activeTab$.next(T)}),(0,V.T)(c=>c.filter(r=>r.tabKey===T)),(0,V.T)(c=>({...this.tabMeta,visualizations:c,tab:this.usedTabs.find(r=>r.key===T)})))}get tabs(){return this.usedTabs}loadContent(T,c,r){r=X.BF.deepCopy(r),this.loadTabs(c,r),this.tabMeta=T,this.visualizations$.next(r)}loadTabs(T,c){const r=[];for(const g of c)g.tabKey||(g.tabKey=w),r.includes(g.tabKey)||r.push(g.tabKey);T=[{key:w,name:this.i18n.get("reportGeneralTab"),description:null},...T||[]],this.usedTabs=c.length?T.filter(g=>r.includes(g.key)):[T[0]]}static{this.\u0275fac=function(c){return new(c||b)(C.KVO(Z.SU))}}static{this.\u0275prov=C.jDH({token:b,factory:b.\u0275fac})}}return b})()},73699(Gt,ut,y){y.d(ut,{M:()=>Xe});var L=y(84412),Y=y(1163),V=y(80550),P=y(96562),Z=y(94129),X=y(36868),f=y(35547),C=y(85802),w=y(21518),A=y(19714),b=y(9454),m=y(49769),T=y(52920),c=y(16038),r=y(97160),g=y(93282),_=y(76037),l=y(6085);const p=["checkpointInfo"],S=["kpiValue"],R=["predictions"],W=["targetName"],j=kt=>({items:kt}),z=kt=>({clickable:kt}),U=kt=>({"target-failed":kt}),nt=kt=>({"target-at-risk":kt}),it=kt=>({text:kt});function gt(kt,ee){if(1&kt&&(f.j41(0,"div",18)(1,"span"),f.pXf(2,11),f.k0s(),f.EFF(3),f.nI1(4,"dateMoment"),f.k0s()),2&kt){const It=f.XpG
1();f.R7$(3),f.SpI(" ",f.i5U(4,1,It.visualization.referenceDate,It.dateFormat)," ")}}function N(kt,ee){1&kt&&(f.j41(0,"div",19),f.pXf(1,12),f.k0s())}function tt(kt,ee){1&kt&&f.eu8(0)}function J(kt,ee){if(1&kt&&f.DNE(0,tt,1,0,"ng-container",20),2&kt){const It=f.XpG(),jt=f.sdS(4);f.Y8G("ngTemplateOutlet",jt)("ngTemplateOutletContext",f.eq3(2,j,It.mappedItems))}}function at(kt,ee){if(1&kt&&f.nrm(0,"tpe-manage-table",27),2&kt){const It=f.XpG().$implicit,jt=f.XpG(2);f.Y8G("dataSubject$",It.tableData$)("displayColumns",jt.displayColumns)("search",!1)("pagination",!1)}}function vt(kt,ee){1&kt&&f.eu8(0)}function dt(kt,ee){if(1&kt&&f.DNE(0,vt,1,0,"ng-container",20),2&kt){const It=f.XpG().$implicit;f.XpG(2);const jt=f.sdS(4);f.Y8G("ngTemplateOutlet",jt)("ngTemplateOutletContext",f.eq3(2,j,It.children))}}function Dt(kt,ee){if(1&kt){const It=f.RV6();f.j41(0,"mat-expansion-panel",22)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"div",23),f.bIt("contextmenu",function(Qt){const re=C.eBV(It).$implicit,xe=f.XpG(2);return C.Njj(xe.navigateToDrillDown(re.links,Qt))}),f.EFF(4),f.k0s()(),f.j41(5,"mat-panel-description")(6,"div",24),f.PLo(7,13),f.nrm(8,"span",25)(9,"span",26)(10,"span",26),f.YFu(),f.k0s()()(),f.nVh(11,at,1,4,"tpe-manage-table",27),f.nVh(12,dt,1,4,"ng-container"),f.k0s()}if(2&kt){const It=ee.$implicit,jt=f.XpG(2);f.Y8G("expanded",0===It.depth||jt.headless),f.R7$(3),f.Y8G("ngClass",f.eq3(10,z,!!It.url)),f.R7$(),f.SpI(" ",It.label," "),f.R7$(5),f.Y8G("ngClass",f.eq3(12,U,It.numFailed>0)),f.R7$(),f.Y8G("ngClass",f.eq3(14,nt,It.numEndangered>0)),f.uP7(It.numTargets)(It.numFailed)(It.numEndangered),f.nnv(7),f.R7$(),f.vxM(It.numTargets>0?11:-1),f.R7$(),f.vxM(null!=It.children&&It.children.length?12:-1)}}function yt(kt,ee){if(1&kt&&(f.j41(0,"mat-accordion",21),f.Z7z(1,Dt,13,16,"mat-expansion-panel",22,f.fX1),f.k0s()),2&kt){const It=ee.items;f.R7$(),f.Dyx(It)}}function pt(kt,ee){1&kt&&(f.j41(0,"div",19),f.pXf(1,14),f.k0s())}function Pt(kt,ee){if(1&kt&&(f.j41(0,"div",28)(1,"tooltip-if-ellipsis"),f.EFF(2),f.nI1(3,"humanizeNumber"),f.k0s()()),2&kt){const It=ee.item;f.xc7("color",It.valueColor),f.R7$(2),f.Lme("",f.bMT(3,4,It.value)," ",It.kpiUnit)}}function Rt(kt,ee){if(1&kt){const It=f.RV6();f.j41(0,"div",29),f.bIt("contextmenu",function(Qt){const re=C.eBV(It).item,xe=f.XpG();return C.Njj(xe.navigateToDrillDown(re.links,Qt))}),f.EFF(1),f.k0s()}if(2&kt){const It=ee.item;f.Y8G("ngClass",f.eq3(2,z,!(null==It.links||!It.links.length))),f.R7$(),f.SpI(" ",It.targetName," ")}}function Tt(kt,ee){1&kt&&f.eu8(0)}function Ct(kt,ee){if(1&kt&&f.DNE(0,Tt,1,0,"ng-container",31),2&kt){f.XpG(2);const It=f.sdS(5);f.Y8G("ngTemplateOutlet",It)}}function rt(kt,ee){1&kt&&f.eu8(0)}function Xt(kt,ee){1&kt&&f.eu8(0)}function Ht(kt,ee){if(1&kt&&(f.j41(0,"div",30)(1,"div",32),f.DNE(2,rt,1,0,"ng-container",31),f.k0s(),f.j41(3,"div",33),f.DNE(4,Xt,1,0,"ng-container",20),f.k0s()()),2&kt){const It=f.XpG(2),jt=It.item,Qt=It.column,re=f.sdS(5),xe=f.sdS(9);f.R7$(2),f.Y8G("ngTemplateOutlet",re),f.R7$(2),f.Y8G("ngTemplateOutlet",xe)("ngTemplateOutletContext",f.eq3(3,it,jt[Qt.propName].infoText))}}function oe(kt,ee){if(1&kt&&f.nVh(0,Ct,1,1,"ng-container")(1,Ht,5,5,"div",30),2&kt){const It=f.XpG();f.vxM(It.item[It.column.propName].interpolated?1:0)}}function ge(kt,ee){1&kt&&f.eu8(0)}function De(kt,ee){if(1&kt&&(f.j41(0,"div",30)(1,"div",33),f.EFF(2,"\u2014"),f.k0s(),f.j41(3,"div",33),f.DNE(4,ge,1,0,"ng-container",20),f.k0s()()),2&kt){const It=f.XpG(),jt=It.item,Qt=It.column,re=f.sdS(9);f.R7$(4),f.Y8G("ngTemplateOutlet",re)("ngTemplateOutletContext",f.eq3(2,it,jt[Qt.propName].infoText))}}function ce(kt,ee){1&kt&&f.eu8(0)}function de(kt,ee){1&kt&&f.eu8(0)}function Ae(kt,ee){if(1&kt&&(f.j41(0,"div",30)(1,"div",32),f.DNE(2,ce,1,0,"ng-container",31),f.k0s(),f.j41(3,"div",33),f.DNE(4,de,1,0,"ng-container",20),f.k0s()()),2&kt){const It=f.XpG(),jt=It.item,Qt=It.column,re=f.sdS(5),xe=f.sdS(9);f.R7$(2),f.Y8G("ngTemplateOutlet",re),f.R7$(2),f.Y8G("ngTemplateOutlet",xe)("ngTemplateOutletContext",f.eq3(3,it,jt[Qt.propName].infoText))}}function Ie(kt,ee){if(1&kt&&(f.j41(0,"div",35)(1,"tooltip-if-ellipsis")(2,"span"),f.pXf(3,16),f.nI1(4,"humanizeNumber"),f.k0s()()()),2&kt){const It=f.XpG
1(2),jt=It.item,Qt=It.column;f.R7$(4),f.uP7(f.bMT(4,2,jt[Qt.propName].minValue))(jt.kpiUnit),f.nnv(3)}}function ke(kt,ee){if(1&kt&&(f.j41(0,"div",35)(1,"tooltip-if-ellipsis")(2,"span"),f.pXf(3,17),f.nI1(4,"humanizeNumber"),f.k0s()()()),2&kt){const It=f.XpG(2),jt=It.item,Qt=It.column;f.R7$(4),f.uP7(f.bMT(4,2,jt[Qt.propName].maxValue))(jt.kpiUnit),f.nnv(3)}}function Fe(kt,ee){if(1&kt&&(f.j41(0,"div",34)(1,"tooltip-if-ellipsis")(2,"span"),f.pXf(3,15),f.nI1(4,"dateMoment"),f.k0s()()(),f.nVh(5,Ie,5,4,"div",35),f.nVh(6,ke,5,4,"div",35)),2&kt){const It=f.XpG(),jt=It.item,Qt=It.column,re=f.XpG();f.R7$(4),f.uP7(f.i5U(4,3,jt[Qt.propName].date,re.dateFormat)),f.nnv(3),f.R7$(),f.vxM(null!==jt[Qt.propName].minValue?5:-1),f.R7$(),f.vxM(null!==jt[Qt.propName].maxValue?6:-1)}}function Be(kt,ee){1&kt&&f.eu8(0)}function Pe(kt,ee){if(1&kt&&(f.j41(0,"div",30)(1,"div",33),f.EFF(2,"\u2014"),f.k0s(),f.j41(3,"div",33),f.DNE(4,Be,1,0,"ng-container",20),f.k0s()()),2&kt){const It=f.XpG(),jt=It.item,Qt=It.column,re=f.sdS(9);f.R7$(4),f.Y8G("ngTemplateOutlet",re)("ngTemplateOutletContext",f.eq3(2,it,jt[Qt.propName].infoText))}}function we(kt,ee){1&kt&&(f.j41(0,"div",36)(1,"mat-icon"),f.EFF(2,"info"),f.k0s()()),2&kt&&f.Y8G("matTooltip",ee.text)}function Se(kt,ee){1&kt&&(f.nVh(0,oe,2,1)(1,De,5,4,"div",30),f.DNE(2,Ae,5,5,"ng-template",null,6,f.C5r)(4,Fe,7,6,"ng-template",null,7,f.C5r)(6,Pe,5,4,"ng-template",null,8,f.C5r)(8,we,3,1,"ng-template",null,9,f.C5r)),2&kt&&f.vxM(ee.item[ee.column.propName].exists?0:1)}function se(kt,ee){if(1&kt&&(f.j41(0,"div",38)(1,"div",39)(2,"tooltip-if-ellipsis"),f.EFF(3),f.k0s()(),f.j41(4,"div",40)(5,"tooltip-if-ellipsis"),f.EFF(6),f.k0s()()()),2&kt){const It=ee.$implicit;f.R7$(3),f.JRh(It.label),f.R7$(3),f.JRh(It.value)}}function le(kt,ee){if(1&kt&&(f.j41(0,"div",37),f.Z7z(1,se,7,2,"div",38,f.fX1),f.k0s()),2&kt){const It=f.XpG().item;f.R7$(),f.Dyx(It.mappedPredictions)}}function ue(kt,ee){1&kt&&f.EFF(0," \u2014 ")}function me(kt,ee){1&kt&&f.EFF(0,"\u2014")}function Ye(kt,ee){if(1&kt&&(f.nVh(0,le,3,0,"div",37)(1,ue,1,0),f.DNE(2,me,1,0,"ng-template",null,10,f.C5r)),2&kt){const It=ee.item;f.vxM(null!=It.mappedPredictions&&It.mappedPredictions.length?0:1)}}let Xe=(()=>{class kt{constructor(It,jt){this.i18n=It,this.linkMenu=jt,this.dateFormat=P.Em.getCurrentDateFormat()}ngOnInit(){this.mappedItems=this.visualization.data.map(It=>this.mapItem(It)),this.displayColumns=this.getTableColumns()}navigateToDrillDown(It,jt){this.linkMenu.showForLinks(this.spaceId,It,jt)}mapItem(It,jt=0){return{...It,label:P.$x.translate(It.label),depth:jt,tableData$:new L.t(It.tableData.map(Qt=>(X.y.replaceLegacyLinksInObject(Qt),{...Qt,previousCheckpoint:this.mapCheckpoint(Qt.previousCheckpoint,"noPrevCheckpointInfo"),nextCheckpoint:this.mapCheckpoint(Qt.nextCheckpoint,"noNextCheckpointInfo"),interpolatedCheckpoint:this.mapCheckpoint(Qt.interpolatedCheckpoint,"interpolatedCheckpointInfo",!0),mappedPredictions:Qt.predictions?.map(re=>X.y.formatPrediction(re,this.i18n))||[],valueColor:X.y.getTargetColor(Qt.targetStatus),kpiName:P.$x.translate(Qt.kpiName),kpiUnit:P.$x.translate(Qt.kpiUnit)}))),children:It.children?.map(Qt=>this.mapItem(Qt,jt+1))}}mapCheckpoint(It,jt,Qt=!1){return{...It?{...It,exists:!0}:{minValue:null,maxValue:null,date:null,exists:!1},infoText:this.i18n.get(jt),interpolated:Qt}}getTableColumns(){return[{propName:"targetName",titleI18nKey:"reportTargetName",type:V.g.CUSTOM,template:this.targetName},{propName:"kpiName",titleI18nKey:"reportKpi"},{propName:"value",titleI18nKey:"reportKpiValue",type:V.g.CUSTOM,template:this.kpiValue},{propName:"interpolatedCheckpoint",titleI18nKey:"interpolatedCheckpoint",type:V.g.CUSTOM,template:this.checkpointInfo},{propName:"previousCheckpoint",titleI18nKey:"previousCheckpoint",type:V.g.CUSTOM,template:this.checkpointInfo},{propName:"nextCheckpoint",titleI18nKey:"nextCheckpoint",type:V.g.CUSTOM,template:this.checkpointInfo},{propName:"mappedPredictions",titleI18nKey:"predictedGuardRailCollision",type:V.g.CUSTOM,template:this.predictions,flexSpace:2}]}static{this.\u0275fac=function(jt){return new(jt||kt)(f.rXU(Y.SU),f.rXU(Z.B))}}static{this.\u0275cmp=f.VBU({type:kt,selectors:[["tpe-report-v2-target-list"]],viewQuery:function(jt,Qt){if(1&jt&&f.GBs(p,7)(S,7)(R,7)(W,7),2&jt){let re;f.mGM(re=f.lsd())&&(Qt.checkpointInfo=re.first),f.mGM(re=f.lsd())&&(Qt.kpiValue=re.first),f.mGM(re=f.lsd())&&(Qt.predictions=re.first),f.mGM(re=f.lsd())&&(Qt.targetName=re.first)}},hostVars:2,hostBindings:function(jt,Qt){2&jt&&f.AVh("headless",Qt.headless)},inputs:{meta:"meta",visualization:"visualization",spaceId:"spaceId",headless:"headless"},standalone:!1,decls:15,vars:2,consts:()=>{let It,jt,Qt,re,xe,ti,ii;return It="Reference Date:",jt=" There are no portfolio entities with active KPI Objectives at this hierarchy level of the Report. You can define KPI Objectives for this Report in the \"Manage Reports\" section. ",Qt=" Active KPI Objectives: " + "\ufffd#8\ufffd" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#8\ufffd|\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + ", failed for the reference date: " + "\ufffd#9\ufffd" + "" + "\ufffd1\ufffd" + "" + "[\ufffd/#8\ufffd|\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + ", at risk: " + "\ufffd#10\ufffd" + " " + "\ufffd2\ufffd" + " " + "[\ufffd/#8\ufffd|\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + "",Qt=f.k04(Qt),re=" There are no portfolio entities with active KPI Objectives at this hierarchy level of the Report. You can define KPI Objectives for this Report in the \"Manage Reports\" section. ",xe="Date: " + "\ufffd0\ufffd" + "",ti="Min: " + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",ii="Max: " + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[["expansionPanel",""],["noTargets",""],["kpiValue",""],["targetName",""],["checkpointInfo",""],["predictions",""],["interpolated",""],["minMax",""],["noCheckpointInfo",""],["infoIcon",""],["noPredictions",""],It,jt,Qt,re,xe,ti,ii,[1,"reference-date"],[1,"no-targets-description"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["multi",""],["hideToggle","",3,"expanded"],[3,"contextmenu","ngClass"],[1,"target-summary"],[1,"target-number"],[1,"target-number",3,"ngClass"],[3,"dataSubject$","displayColumns","search","pagination"],[1,"kpi-value"],[1,"target-label",3,"contextmenu","ngClass"],["fxLayout","row","fxLayoutAlign","start center"],[4,"ngTemplateOutlet"],["fxFlex","nogrow",1,"minmax-with-info"],["fxFlex","nogrow"],[1,"checkpoint-date"],[1,"checkpoint-value"],[1,"info-tooltip",3,"matTooltip"],[1,"table"],[1,"table-row"],[1,"table-cell"],[1,"table-cell","prediction-value"]]},template:function(jt,Qt){1&jt&&(f.nVh(0,gt,5,4,"div",18)(1,N,2,0,"div",19),f.nVh(2,J,1,4,"ng-container"),f.DNE(3,yt,3,0,"ng-template",null,0,f.C5r)(5,pt,2,0,"ng-template",null,1,f.C5r)(7,Pt,4,6,"ng-template",null,2,f.C5r)(9,Rt,2,4,"ng-template",null,3,f.C5r)(11,Se,10,1,"ng-template",null,4,f.C5r)(13,Ye,4,1,"ng-template",null,5,f.C5r)),2&jt&&(f.vxM(Qt.visualization.data.length?0:1),f.R7$(2),f.vxM(Qt.visualization.data.length?2:-1))},dependencies:[w.An,A.oV,b.BS,b.GK,b.Z2,b.WN,b.Q6,m.YU,m.T3,T.DJ,T.
1sA,T.UI,c.PW,r.P,g.f,_.Z,l.g],styles:[".info-tooltip[_ngcontent-%COMP%]{color:#0000008a;margin:4px 0 0 4px}.no-targets-description[_ngcontent-%COMP%]{margin-top:8px}mat-expansion-panel-header[_ngcontent-%COMP%]     .mat-content, mat-expansion-panel-header[_ngcontent-%COMP%]     .mat-expansion-panel-header-description{margin-right:0}[_nghost-%COMP%]     .mat-expansion-panel-body{padding:0 0 16px 24px}tpe-manage-table[_ngcontent-%COMP%]{display:block;margin:0 0 16px -24px}.reference-date[_ngcontent-%COMP%]{margin-bottom:8px;text-align:right}.target-summary[_ngcontent-%COMP%]{letter-spacing:normal;text-align:right;width:100%}.target-number[_ngcontent-%COMP%]{font-weight:700}.target-failed[_ngcontent-%COMP%]{color:#e62325}.target-at-risk[_ngcontent-%COMP%]{color:#da7b00}.kpi-value[_ngcontent-%COMP%]{max-width:100%;text-overflow:ellipsis}.minmax-with-info[_ngcontent-%COMP%]{max-width:calc(100% - 28px);overflow:hidden;text-overflow:ellipsis}.table[_ngcontent-%COMP%]{display:table;width:100%;table-layout:fixed}.table[_ngcontent-%COMP%]   .table-row[_ngcontent-%COMP%]{display:table-row}.table[_ngcontent-%COMP%]   .table-cell[_ngcontent-%COMP%]{display:table-cell;max-width:50%;overflow:hidden;text-overflow:ellipsis}.table[_ngcontent-%COMP%]   .table-cell[_ngcontent-%COMP%]:last-child{text-align:right}.prediction-value[_ngcontent-%COMP%]{padding-left:8px}.target-label[_ngcontent-%COMP%]{font-weight:500}.clickable[_ngcontent-%COMP%]{cursor:pointer}.clickable[_ngcontent-%COMP%]:hover{color:#00b0ff}.headless[_nghost-%COMP%]    {margin-left:-16px;margin-right:-16px;width:calc(100% + 32px);border:1px solid #bdbdbd;box-sizing:border-box;display:block}.headless[_nghost-%COMP%]     *{transition:none!important;box-shadow:none!important}.headless[_nghost-%COMP%]     .reference-date{display:none}.headless[_nghost-%COMP%]     tpe-manage-table{margin-bottom:0!important}.headless[_nghost-%COMP%]     mat-expansion-panel{border:0 solid rgba(0,0,0,.12);border-left-width:1px;border-bottom-width:1px;border-radius:0!important}.headless[_nghost-%COMP%]     mat-expansion-panel:last-of-type{border-bottom-width:0}.headless[_nghost-%COMP%]    >mat-accordion>mat-expansion-panel{border-width:0}.headless[_nghost-%COMP%]     .mat-expansion-panel-body{padding-bottom:0}.headless[_nghost-%COMP%]     .mat-expansion-panel-spacing{margin:0!important}"]})}}return kt})()},64214(Gt,ut,y){y.d(ut,{l:()=>g});var L=y(96697),Y=y(31180),V=y(36895),P=y(95502),Z=y(17705),X=y(35547),f=y(18262),C=y(21659),w=y(73195);function A(_,l){1&_&&(X.j41(0,"div",4),X.nrm(1,"tpe-loading-indicator"),X.k0s())}function b(_,l){if(1&_&&X.nrm(0,"tpe-map-unit-tooltip",6),2&_){const p=X.XpG(3);X.Y8G("data",p.data)("noExtension",!0)}}function m(_,l){if(1&_&&X.nrm(0,"tpe-map-dir-tooltip",7),2&_){const p=X.XpG(3);X.Y8G("data",p.data)}}function T(_,l){1&_&&(X.j41(0,"div",8),X.EFF(1,"Right-click node to drill-down"),X.k0s())}function c(_,l){if(1&_&&(X.j41(0,"div",5),X.nVh(1,b,1,2,"tpe-map-unit-tooltip",6),X.nVh(2,m,1,1,"tpe-map-dir-tooltip",7),X.nVh(3,T,2,0,"div",8),X.k0s()),2&_){const p=X.XpG(2);X.R7$(),X.vxM(p.data.isItem?1:-1),X.R7$(),X.vxM(p.data.isItem?-1:2),X.R7$(),X.vxM(p.data.url?3:-1)}}function r(_,l){if(1&_&&(X.j41(0,"div",3,0),X.nVh(2,A,2,0,"div",4),X.nVh(3,c,4,3,"div",5),X.k0s()),2&_){const p=X.XpG();X.xc7("display",!p.showTooltipLoader&&p.tooltipLoading?"none":"")("left",p.tooltipOffset.left,"px")("top",p.tooltipOffset.top,"px")("opacity",p.tooltipHidden?0:1)("pointer-events",p.tooltipFixed?"auto":"none"),X.R7$(2),X.vxM(p.showTooltipLoader&&p.tooltipLoading?2:-1),X.R7$(),X.vxM(p.tooltipLoading?-1:3)}}let g=(()=>{class _ extends V.M{constructor(p,S,R,W){super(p,S,R),this.staticService=W}ngOnInit(){super.ngOnInit(),this.staticService.dataSet$.pipe((0,L.s)(1)).subscribe(()=>{this.setupMapInteraction()})}loadTooltipContent(p){return this.staticService.getTooltip(p.itemId,p.isLeaf).subscribe(S=>{this.tooltipSub=null,S.isItem=this.overrideMetricDataFromTreemap(S,p.itemId),this.data=S,this.tooltipLoading=!1,this.showTooltipLoader=!1,this.tooltipHidden=!0,setTimeout(()=>{this.onContentSizeChanged(),this.tooltipHidden=!1,this.cdr.detectChanges()})})}static{this.\u0275fac=function(S){return new(S||_)(X.rXU(Y.Q6),X.rXU(Y.m0),X.rXU(Z.gRc),X.rXU(P.U
1))}}static{this.\u0275cmp=X.VBU({type:_,selectors:[["tpe-map-tooltip"]],standalone:!1,features:[X.Vt3],decls:2,vars:1,consts:[["tooltipContent",""],[1,"tooltip-container"],[1,"tooltip-wrap",3,"display","left","top","opacity","pointerEvents"],[1,"tooltip-wrap"],[1,"loader"],[1,"tooltip-content"],[3,"data","noExtension"],[3,"data"],[1,"drill-down-info"]],template:function(S,R){1&S&&(X.j41(0,"div",1),X.nVh(1,r,4,12,"div",2),X.k0s()),2&S&&(X.R7$(),X.vxM(R.tooltipActive?1:-1))},dependencies:[f.T,C.d,w.g],styles:['.tooltip-container[_ngcontent-%COMP%]{inset:0;pointer-events:none;position:absolute;z-index:100}.tooltip-container[_ngcontent-%COMP%]   .tooltip-wrap[_ngcontent-%COMP%]{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;background-color:#fff;border-radius:4px;box-sizing:border-box;display:inline-block;font-size:11px;max-width:350px;padding:8px 8px 16px;position:relative;z-index:10000}.tooltip-container[_ngcontent-%COMP%]   .tooltip-wrap[_ngcontent-%COMP%]:before{background-color:#fff;bottom:0;content:"";height:20px;left:50%;margin-left:-15px;pointer-events:none;position:absolute;width:30px;z-index:200}.tooltip-container[_ngcontent-%COMP%]   .tooltip-wrap[_ngcontent-%COMP%]:after{background-color:#fff;bottom:-10px;box-shadow:0 1px 2px #0003,0 1px 3px #00000024;content:"";height:20px;left:50%;margin-left:-10px;pointer-events:none;position:absolute;transform:rotate(45deg);width:20px;z-index:100}.tooltip-container[_ngcontent-%COMP%]   .tooltip-wrap[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{position:relative;z-index:300}.drill-down-info[_ngcontent-%COMP%]{margin-left:-8px;margin-right:-8px;width:calc(100% + 16px);border-top:1px solid rgba(0,0,0,.12);box-sizing:border-box;color:#000000de;padding:8px 8px 0}']})}}return _})()},13811(Gt,ut,y){y.d(ut,{W:()=>_});var L=y(35547),Y=y(21413),V=y(56977),P=y(5964),Z=y(96354),X=y(25558),f=y(31180),C=y(91149),w=y(46463),A=y(94129),b=y(36868),m=y(64214),T=y(95502),c=y(45909);const r=["treemap"];function g(l,p){if(1&l&&L.nrm(0,"tpe-treemap-component",2,0),2&l){const S=L.XpG();L.xc7("height",S.mapHeight,"px"),L.AVh("headless",S.headless),L.Y8G("config",S.config)}}let _=(()=>{class l{constructor(S,R,W,j){this.netService=S,this.comm=R,this.linkMenu=W,this.instanceService=j,this.unsubscribe$=new Y.B}ngOnInit(){this.comm.rightClickEvent.pipe((0,V.Q)(this.unsubscribe$),(0,X.n)(S=>this.netService.getNode(S.node).pipe((0,Z.T)(R=>({event:S,node:R}))))).subscribe(S=>{b.y.replaceLegacyLinksInObject(S.node);const R=this.treemap.element.nativeElement.getBoundingClientRect(),W={pageX:S.event.point[0]+R.left,pageY:S.event.point[1]+R.top,stopPropagation:()=>{},preventDefault:()=>{}};this.linkMenu.showForLinks(this.spaceId,S.node?.links,W)}),this.comm.mapInitialized.pipe((0,V.Q)(this.unsubscribe$),(0,P.p)(w.zz)).subscribe(()=>{this.instanceService.setMapCanvas(this.comm.canvas)})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}set visualization(S){if(this.netService.setVisualizationData(S,this.spaceId),this.config=this.netService.config,this.mapHeight=S.meta.height||1024,this.headless){const R=document.body.getBoundingClientRect();this.mapHeight=R.height-200}}static{this.\u0275fac=function(R){return new(R||l)(L.rXU(T.U),L.rXU(f.Q6),L.rXU(A.B),L.rXU(c.r))}}static{this.\u0275cmp=L.VBU({type:l,selectors:[["tpe-report-v2-treemap"]],viewQuery:function(R,W){if(1&R&&L.GBs(r,5,L.c1b),2&R){let j;L.mGM(j=L.lsd())&&(W.treemap=j.first)}},inputs:{spaceId:"spaceId",headless:"headless",visualization:"visualization"},standalone:!1,features:[L.Jv_([{provide:T.U,useClass:T.U},{provide:f.CO,useExisting:T.U},{provide:f.m0,useExisting:T.U},{provide:f.rD,useExisting:T.U},{provide:C.Z,useValue:m.l},{provide:f.Q6,useClass:f.Q6},{provide:f.tN,useClass:f.tN},f.Te])],decls:1,vars:1,consts:[["treemap",""],[3,"headless","height","config"],[3,"config"]],template:function(R,W){1&R&&L.nVh(0,g,2,5,"tpe-treemap-component",1),2&R&&L.vxM(W.config?0:-1)},dependencies:[C.K],styles:["tpe-treemap-component[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.headless[_ngcontent-%COMP%]{width:100vw}.headless[_ngcontent-%COMP%]     tpe-map-legend{display:none}"]})}}return l})()},95502(Gt,ut,y){y.d(ut,{U:()=>w});var L=y(84412),Y=y(92771),V=y(5964),P=y(96354),Z=y(96697),X=y(96562),f=y(46463),C=y(85802);let w=(()=>{class A{constructor(){this.supportsCombinedData=!0,this.dataSet$=new Y.m(1),this.combinedData$=new L.t(null),this.metaData$=new L.t(null),this.nodeMap$=this.metaData$.pipe((0,V.p)(f.a4),(0,P.T)(m=>X.BF.listToMap(m.nodes,"id")))}setVisualizationData(m,T){this.config=this.mapConfig(m.meta,T);const c=Uint8Array.from(atob(m.data),r=>r.charCodeAt(0)).buffer;this.combinedData$.next(c),this.metaData$.next(m.meta),this.dataSet$.next()}getCombinedData(m){return this.combinedData$.pipe((0,V.p)(f.a4),(0,Z.s)(1))}getLabels(m,T){return this.nodeMap$.pipe((0,V.p)(f.a4),(0,Z.s)(1),(0,P.T)(c=>{const r=new Map;for(const g of[...m,...T])r.set(g,X.$x.translate(c.get(g)?.label));return r}))}getTooltip(m,T){return this.nodeMap$.pipe((0,V.p)(f.a4),(0,Z.s)(1),(0,P.T)(c=>{const r=c.get(m);return{type:"analysis",tags:null,isItem:T,location:this.getPath(m,c),area:this.getMetric(r,"area"),color:this.getMetric(r,"color"),height:this.getMetric(r,"height")}}))}getNode(m){return this.nodeMap$.pipe((0,Z.s)(1),(0,P.T)(T=>T.get(m)))}mapConfig(m,T){return{type:"analysis",apiUrl:null,appIds:[],markUnmodifiedItems:!0,viewT
1ype:null,configuration:{compare:m.compare,labelTopNArea:m.labelTopNArea,labelTopNColor:m.labelTopNColor,labelTopNHeight:m.labelTopNHeight},spaceId:T,metrics:{color:this.mappingToMetric(m,"color"),area:this.mappingToMetric(m,"area"),height:this.mappingToMetric(m,"height")}}}mappingToMetric(m,T){const c=X.$x.translate(m.unit);return{id:m.mapping[T].id,name:X.$x.translate(m.mapping[T].name),longName:X.$x.translate(m.mapping[T].name),unit:X.$x.translate(m.mapping[T].unit)||c,inverted:!!m.inverted,derived:!1,isFloat:!0,description:""}}getMetric(m,T){return{...this.config.metrics[T],name:X.$x.translate(this.config.metrics[T].name),longName:X.$x.translate(this.config.metrics[T].longName),value:null,compareValue:null,unit:this.getUnit(m,T)}}getUnit(m,T){return m.unit?m.unit.hasOwnProperty(T)?X.$x.translate(m.unit[T]):X.$x.translate(m.unit):X.$x.translate(this.config.metrics[T].unit)}getPath(m,T){const c=T.get(m);return c.parentId?this.getPath(c.parentId,T)+"/"+c.label:""}static{this.\u0275fac=function(T){return new(T||A)}}static{this.\u0275prov=C.jDH({token:A,factory:A.\u0275fac})}}return A})()},36868(Gt,ut,y){y.d(ut,{y:()=>Z});var L=y(10772),Y=y(49952),V=y(96562),P=y(88799);let Z=(()=>{class X{static{this.EXTRA_MIN_MAX=.1}static getTagDisplay(C,w,A,b){const m=A.getTagsForMask(C).map(T=>T.name);return w&&m.push(b.get("untagged")),m.join(", ")}static isDone(C){return C.runInfo.currentRun.status?C.runInfo.currentRun.status===L.n$.ERROR:[L.n$.SUCCESS,null].includes(C.runInfo.lastRun.status)}static calculateMin(C,w){let A=0;return C<0&&(A=-1/0),Math.max(A,C-w*X.EXTRA_MIN_MAX)}static legacyUrlToLinkList(C){return C?C.includes("/maps/")?[{type:L.X_.DRILL_DOWN_LINK,url:C,label:null}]:[{type:L.X_.NODE_LINK,url:C,label:null}]:[]}static replaceLegacyLinksInObject(C){if(C)for(const w of Object.keys(C)){if(!w.startsWith("url"))continue;const A=w.replace("url","links");"urlField"!==w||C.hasOwnProperty("linksField")?C.hasOwnProperty(A)||(C[A]=X.legacyUrlToLinkList(C[w])):C.linksField=C.urlField.replace("url","links")}}static navigateToDrillDown(C,w,A,b=!1){if(!C)return;const m=this.getAbsoluteURL(C,A.url,w);if(b)V.rW.openUrlInNewTab(m);else{const{url:T,params:c,fragment:r}=V.rW.parseURL(m);A.navigate(T,{queryParams:c,fragment:r})}}static parseInterval(C,w=!1){const A=/(?<length>\d+)(?<size>[dwm])/.exec(C||"");return A?{intervalLength:parseInt(A.groups.length,10),intervalSize:A.groups.size}:null}static getTimeSliceCount(C){if(C.numSlices)return C.numSlices;if(C.timeSlices?.length)return C.timeSlices.length;const w=this.parseInterval(C.targetFrequency);if(!w)return null;let A=C.endDate||this.getMinEndDate(w),b=(0,Y.n)(A).diff(C.startDate,"day")+1;return w.intervalSize===L.j7.MONTH?b=(0,Y.n)(A).diff(C.startDate,"months")+1:w.intervalSize===L.j7.WEEK&&(w.intervalLength*=7),Math.floor(b/w.intervalLength)}static getMinEndDate(C){switch(C.intervalSize){case L.j7.DAY:return(0,Y.n)().subtract(1,"day");case L.j7.WEEK:return(0,Y.n)().startOf("week");case L.j7.MONTH:return(0,Y.n)().startOf("month").subtract(1,"day")}}static formatPrediction(C,w){const A=V.$x.translate(C.label),b=C.hitDate?V.Em.formatDate(C.hitDate):null;return{label:A,value:b?`${b} | ${C.status===L.sL.PREDICTION_MIN_VIOLATION?"min":"max"}`:w.get("noGuardRailCollision")}}static getTargetColor(C){switch(C){case L.sL.ZONE_MIN_VIOLATION:case L.sL.ZONE_MAX_VIOLATION:return P.z.WARNING;case L.sL.PREDICTION_MAX_VIOLATION:case L.sL.PREDICTION_MIN_VIOLATION:return P.z.SOFT_WARNING;default:return null}}static cleanFilterIds(C){for(const w of C||[])w.isShared||(w.id=null)}static getLabelFromSplitting(C,w){switch(C.type){case L.t5.STATIC:return C.label;case L.t5.DYNAMIC_LABEL:return w.get("dynamicLabelValue");case L.t5.REVISION:case L.t5.FOLDER:case L.t5.SCOPE_CONTENT:return`${C.labelPrefix}<${w.get("splitValue")}>${C.labelSuffix}`}}static getAbsoluteURL(C,w,A){let b=null;if(w.includes("/tabs/")){const T=w.split("/tabs/");w=T[0],b="/tabs/"+T[1]}let m=C;return C.startsWith("./leaf")&&(m=w+C.replace("./leaf","/leaf")),m.includes(":spaceId")&&(m=V.rW.formatUrl(C,{spaceId:A})),b&&!C.startsWith("/maps")&&(m+=b),m}}return X})()},28046(Gt,ut,y){y.d(ut,{w:()=>Rt});var L=y(93147),Y=y(10772),V=y(35547),P=y(26051),Z=y(52982),X=y(22555),f=y(63071),C=y(60915),w=y(72294),A=y(96562),b=y(46463),m=y(94129),T=y(20562),c=y(8245),r=y(53909),g=y(84690);function _(Tt,Ct){if(1&Tt&&(V.j41(0,"div",1)(1,"span",2),V.EFF(2),V.nI1(3,"i18nKey"),V.k0s()()),2&Tt){const rt=V.XpG();V.xc7("height",rt.visualization.height||200,"px"),V.R7$(2),V.JRh(V.bMT(3,3,rt.visualization.error))}}function l(Tt,Ct){if(1&Tt&&(V.j41(0,"tpe-amcharts-5")(1,"tpe-amcharts-5-pie-chart",3),V.nrm(2,"tpe-amcharts-5-pie-series",4),V.k0s()()),2&Tt){const rt=V.XpG();V.R7$(),V.Y8G("height",rt.visualization.height||200),V.R7$(),V.Y8G("data",rt.dataProvider)("settings",rt.seriesConfig)("setupSeries",rt.setupSeries)("colors",rt.visualization.colors)}}let p=(()=>{class Tt{set visualization(rt){this._visualization=rt,this.unit=A.$x.translate(rt.unit),this.dataProvider=rt.data?this.mapDataProvider(rt.data):null}get visualization(){return this._visualization}constructor(rt){this.linkMenu=rt,this.spaceId=null,this.seriesConfig={fillField:"fill"},this.unit=null,this.setupSeries=Xt=>this.setupPieSeries(Xt)}mapDataProvider(rt){return rt.map(Xt=>({...Xt,fill:Xt.color?(0,w.yW)(Xt.color):null,label:A.$x.translate(Xt.series)}))}setupPieSeries(rt){rt.slices.template.adapters.add("tooltipText",(Xt,Ht)=>{const oe=Ht?.dataItem?.dataContext;return oe?this.formatValue(oe):Xt}),rt.slices.template.setAll({stroke:(0,w.yW)("#ffffff"),strokeWidth:1}),rt.slices.template.events.on("rightclick",Xt=>{this.linkMenu.showForLinks(this.spaceId,Xt.target.dataItem.dataContext.links,Xt.originalEvent)}),rt.labels.template.adapters.add("text",(Xt,Ht)=>{const oe=Ht?.dataItem?.dataContext;return oe?this.formatValue(oe):Xt})}formatValue(rt){const Xt=A.$x.translate(rt.unit)||this.unit;let Ht=`${rt?.label}: `;return(0,b.a4)(rt?.value)?Ht+=`${A.$x.humanizeNumber(rt.value)}${"%"===Xt?Xt:" "+Xt}`:Ht+="null","%"!==Xt&&this._visualization.showPercentageInTooltip&&(Ht+=` (${A.$x.humanizeNumber(rt.percentage)}%)`),Ht}static{this.\u0275fac=function(Xt){return new(Xt||Tt)(V.rXU(m.B))}}static{this.\u0275cmp=V.VBU({type:Tt,selectors:[["tpe-report-v2-pie-chart"]],inputs:{meta:"meta",spaceId:"spaceId",visualization:"visualization"},standalone:!1,decls:2,vars:1,consts:[[1,"chart-error","flex-layout-column","flex-align-center-center",3,"height"],[1,"chart-error","flex-layout-column","flex-align-center-center"],[1,"flex-nogrow"],[3,"height"],[3,"data","settings","setupSeries","colors"]],template:function(Xt,Ht){1&Xt&&V.nVh(0,_,4,5,"div",0)(1,l,3,5,"tpe-amcharts-5"),2&Xt&&V.vxM(Ht.visualization.error?0:1)},dependencies:[T.i,c.M,r.Z,g.N],styles:["\n\n\n.chart-error[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.38);background-color:#0000001f}"]})}}return Tt})();
1var S=y(44017),R=y(27089),W=y(73699),j=y(13811);function z(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-line-chart",0),2&Tt){const rt=V.XpG();V.Y8G("graphType",rt.graphType.LINE)("meta",rt.meta)("spaceId",rt.spaceId)("dynamicSpacing",rt.dynamicSpacing)("visualization",rt.visualization)("headless",rt.headless)}}function U(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-line-chart",0),2&Tt){const rt=V.XpG();V.Y8G("graphType",rt.graphType.BAR)("meta",rt.meta)("spaceId",rt.spaceId)("dynamicSpacing",rt.dynamicSpacing)("visualization",rt.visualization)("headless",rt.headless)}}function nt(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-line-chart",0),2&Tt){const rt=V.XpG();V.Y8G("graphType",rt.graphType.STEP)("meta",rt.meta)("spaceId",rt.spaceId)("dynamicSpacing",rt.dynamicSpacing)("visualization",rt.visualization)("headless",rt.headless)}}function it(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-pie-chart",1),2&Tt){const rt=V.XpG();V.Y8G("meta",rt.meta)("spaceId",rt.spaceId)("visualization",rt.visualization)}}function gt(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-heat-map",2),2&Tt){const rt=V.XpG();V.Y8G("headless",rt.headless)("meta",rt.meta)("index",rt.index)("spaceId",rt.spaceId)("timestamp",rt.timestamp)("visualization",rt.visualization)}}function N(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-heat-map-rows",2),2&Tt){const rt=V.XpG();V.Y8G("headless",rt.headless)("meta",rt.meta)("index",rt.index)("spaceId",rt.spaceId)("timestamp",rt.timestamp)("visualization",rt.visualization)}}function tt(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-sankey-chart",3),2&Tt){const rt=V.XpG();V.Y8G("spaceId",rt.spaceId)("dynamicSpacing",rt.dynamicSpacing)("visualization",rt.visualization)}}function J(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-sankey-chart",3),2&Tt){const rt=V.XpG();V.Y8G("spaceId",rt.spaceId)("dynamicSpacing",rt.dynamicSpacing)("visualization",rt.visualization)}}function at(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-bubble-chart",3),2&Tt){const rt=V.XpG();V.Y8G("spaceId",rt.spaceId)("dynamicSpacing",rt.dynamicSpacing)("visualization",rt.visualization)}}function vt(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-treemap",4),2&Tt){const rt=V.XpG();V.Y8G("headless",rt.headless)("spaceId",rt.spaceId)("visualization",rt.visualization)}}function dt(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-target-list",4),2&Tt){const rt=V.XpG();V.Y8G("headless",rt.headless)("spaceId",rt.spaceId)("visualization",rt.visualization)}}function Dt(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-sunburst-chart",3),2&Tt){const rt=V.XpG();V.Y8G("spaceId",rt.spaceId)("dynamicSpacing",rt.dynamicSpacing)("visualization",rt.visualization)}}function yt(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-force-tree",5),2&Tt){const rt=V.XpG();V.Y8G("spaceId",rt.spaceId)("headless",rt.headless)("visualization",rt.visualization)}}function pt(Tt,Ct){if(1&Tt&&V.nrm(0,"tpe-report-v2-force-tree",5),2&Tt){const rt=V.XpG();V.Y8G("spaceId",rt.spaceId)("headless",rt.headless)("visualization",rt.visualization)}}function Pt(Tt,Ct){if(1&Tt&&(V.j41(0,"div",6),V.EFF(1),V.k0s()),2&Tt){const rt=V.XpG();V.R7$(),V.SpI('Visualization type "',rt.visualization.type,'" not supported.')}}let Rt=(()=>{class Tt{constructor(){this.headless=!1,this.dynamicSpacing=!1,this.graphType=L.eF,this.visType=Y.vi}static{this.\u0275fac=function(Xt){return new(Xt||Tt)}}static{this.\u0275cmp=V.VBU({type:Tt,selectors:[["tpe-report-v2-viz-content"]],inputs:{visualization:"visualization",spaceId:"spaceId",meta:"meta",index:"index",timestamp:"timestamp",headless:"headless",dynamicSpacing:"dynamicSpacing"},standalone:!1,decls:15,vars:1,consts:[[3,"graphType","meta","spaceId","dynamicSpacing","visualization","headless"],[3,"meta","spaceId","visualization"],[3,"headless","meta","index","spaceId","timestamp","visualization"],[3,"spaceId","dynamicSpacing","visualization"],[3,"headless","spaceId","visualization"],[3,"spaceId","headless","visualization"],[1,"error"]],template:function(Xt,Ht){if(1&Xt&&V.nVh(0,z,1,6,"tpe-report-v2-line-chart",0)(1,U,1,6,"tpe-report-v2-line-chart",0)(2,nt,1,6,"tpe-report-v2-line-chart",0)(3,it,1,3,"tpe-report-v2-pie-chart",1)(4,gt,1,6,"tpe-report-v2-heat-map",2)(5,N,1,6,"tpe-report-v2-heat-map-rows",2)(6,tt,1,3,"tpe-report-v2-sankey-chart",3)(7,J,1,3,"tpe-report-v2-sankey-chart",3)(8,at,1,3,"tpe-report-v2-bubble-chart",3)(9,vt,1,3,"tpe-report-v2-treemap",4)(10,dt,1,3,"tpe-report-v2-target-list",4)(11,Dt,1,3,"tpe-report-v2-sunburst-chart",3)(12,yt,1,3,"tpe-report-v2-force-tree",5)(13,pt,1,3,"tpe-report-v2-force-tree",5)(14,Pt,2,1,"div",6),2&Xt){let oe;V.vxM((oe=Ht.visualization.type)===Ht.visType.LINE_CHART?0:oe===
1Ht.visType.BAR_CHART?1:oe===Ht.visType.STEP_CHART?2:oe===Ht.visType.PIE_CHART?3:oe===Ht.visType.HEAT_MAP?4:oe===Ht.visType.HEAT_MAP_ROWS?5:oe===Ht.visType.SANKEY_CHART?6:oe===Ht.visType.SANKEY_HIERARCHY_BREAKDOWN?7:oe===Ht.visType.BUBBLE_CHART?8:oe===Ht.visType.SOFTWARE_MAP?9:oe===Ht.visType.TARGET_LIST?10:oe===Ht.visType.SUNBURST_HIERARCHY?11:oe===Ht.visType.FORCE_DIRECTED_TREND?12:oe===Ht.visType.FORCE_DIRECTED_SEMI_DISC?13:14)}},dependencies:[P._,Z.f,X.G,f.l,C.W,p,S.r,R.q,W.M,j.W],encapsulation:2})}}return Tt})()},8405(Gt,ut,y){y.d(ut,{g:()=>dt});var L=y(85802),Y=y(96850),V=y(21413),P=y(84572),Z=y(7673),X=y(5964),f=y(96354),C=y(25558),w=y(56977),A=y(88141),b=y(77669),m=y(96562),T=y(59608),c=y(95902),r=y(98948),g=y(12940),_=y(17705),l=y(35547),p=y(80888),S=y(37702),R=y(93049),W=y(18262),j=y(54643),z=y(75163);function U(Dt,yt){if(1&Dt&&l.nrm(0,"tpe-report-v2-breadcrumbs",0),2&Dt){const pt=l.XpG(2);l.Y8G("spaceId",pt.spaceId)("accessibleSpaceIds",pt.accessibleSpaceIds)("reportId",pt.reportId)("tree",pt.reportTree)("tabKey",pt.activeTabKey)}}function nt(Dt,yt){if(1&Dt&&(l.j41(0,"div",1),l.nrm(1,"tpe-report-v2-markdown",4),l.k0s()),2&Dt){const pt=l.XpG(2);l.R7$(),l.Y8G("data",pt.description)}}function it(Dt,yt){if(1&Dt&&(l.j41(0,"a",7),l.EFF(1),l.k0s()),2&Dt){const pt=yt.$implicit,Pt=l.XpG(3);l.Y8G("routerLink",l.ai1("",Pt.baseUrl,"/tabs/",pt.key))("active",Pt.activeTabKey===pt.key),l.R7$(),l.JRh(Pt.translate(pt.name))}}function gt(Dt,yt){if(1&Dt&&(l.j41(0,"div",2),l.nrm(1,"div",5),l.j41(2,"nav",6),l.Z7z(3,it,2,5,"a",7,l.fX1),l.k0s()()),2&Dt){const pt=l.XpG(2);l.R7$(2),l.Y8G("mat-stretch-tabs",!1)("tabPanel",pt.tabPanel),l.R7$(),l.Dyx(pt.tabs)}}function N(Dt,yt){1&Dt&&(l.j41(0,"mat-tab-nav-panel"),l.nrm(1,"router-outlet"),l.k0s())}function tt(Dt,yt){1&Dt&&l.nrm(0,"router-outlet")}function J(Dt,yt){if(1&Dt&&(l.j41(0,"div",1),l.nrm(1,"tpe-report-v2-markdown",4),l.k0s()),2&Dt){const pt=l.XpG(2);l.R7$(),l.Y8G("data",pt.bottomDescription)}}function at(Dt,yt){if(1&Dt&&(l.nVh(0,U,1,5,"tpe-report-v2-breadcrumbs",0),l.nVh(1,nt,2,1,"div",1),l.nVh(2,gt,5,2,"div",2),l.j41(3,"div",3),l.nVh(4,N,2,0,"mat-tab-nav-panel"),l.nVh(5,tt,1,0,"router-outlet"),l.k0s(),l.nVh(6,J,2,1,"div",1)),2&Dt){const pt=l.XpG();l.vxM(pt.hasHierarchy&&pt.accessibleSpaceIds?0:-1),l.R7$(),l.vxM(pt.description?1:-1),l.R7$(),l.vxM(pt.showTabs&&pt.tabPanel?2:-1),l.R7$(2),l.vxM(pt.showTabs?4:-1),l.R7$(),l.vxM(pt.showTabs?-1:5),l.R7$(),l.vxM(pt.bottomDescription?6:-1)}}function vt(Dt,yt){1&Dt&&l.nrm(0,"tpe-loading-indicator")}let dt=(()=>{class Dt{set tabPanel(pt){this._tabPanel=pt,this.cdr.detectChanges()}get tabPanel(){return this._tabPanel}constructor(pt,Pt,Rt,Tt,Ct){this.store=pt,this.route=Pt,this.nodesService=Rt,this.tabsService=Tt,this.cdr=Ct,this.onLoadError=new L.bkB,this.loading=!0,this.spaceId=null,this.reportId=null,this.translate=m.$x.translate,this.unsubscribe$=new V.B}ngOnInit(){this.loading=!0,(0,P.z)([this.route.parent.params,this.route.params,this.store.select(T.Gw.getSpacesIfLoaded)]).pipe(b.R.debounceTime(100),(0,f.T)(([pt,Pt,Rt])=>({params:{...pt,...Pt},spaces:Rt})),(0,X.p)(({params:pt})=>Number.isFinite(+pt.reportId)),(0,w.Q)(this.unsubscribe$),(0,C.n)(({params:pt,spaces:Pt})=>(this.accessibleSpaceIds=r.p.getSpaceChildIds(+pt.spaceId,Pt),this.loadContent(+pt.spaceId,+pt.reportId,pt.nodeId?+pt.nodeId:null,pt.leafNodeId?+pt.leafNodeId:null)))).subscribe({error:pt=>{console.error(pt),this.onLoadError.emit()}}),this.tabsService.activeTab$.pipe((0,w.Q)(this.unsubscribe$)).subscribe(pt=>{this.activeTabKey=pt,this.cdr.detectChanges()})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}loadContent(pt,Pt,Rt,Tt){return this.spaceId=pt,this.reportId=Pt,this.reportTree=null,this.loading=!0,this.baseUrl=`/spaces/detail/${pt}/reports-v2/${Pt}`,Rt&&(this.baseUrl+=`/node/${Rt}`),Tt&&(this.baseUrl+=`/leaf/${Tt}`),this.nodesService.getTree(pt,Pt,Rt,Tt).pipe((0,C.n)(Ct=>{this.reportTree=Ct,this.hasHierarchy=!!Ct.parent||Ct.children.length>0;const rt=Ct.isLeaf?Ct.parent.id:Ct.id;return(0,P.z)([this.nodesService.getResult(pt,Pt,rt),Tt?this.nodesService.getLeafResult(pt,Pt,rt,Tt):(0,Z.of)(null)])}),(0,A.M)(([Ct,rt])=>{this.loadPerspective(Ct,rt),this.tabs=this.tabsService.tabs,this.showTabs=this.tabs.length>1||1===this.tabs.length&&this.tabs[0].key!==g.P,this.loading=!1}))}loadPerspective(pt,Pt){if(!pt.result)throw Error("Report result not found");const Rt={spaceId:this.spaceId,nodeId:pt.id,leafId:Pt?.leafId??null,reportMeta:pt.result.meta,timestamp:this.timestamp};let Tt=pt.result.meta.report,Ct=pt.result.visualizations;Pt&&pt.result.leafNodePerspective&&(Tt=pt.result.leafNodePerspective,Ct=Pt.result.visualizations),this.description=m.$x.translate(Tt.description),this.bottomDescription=m.$x.translate(Tt.bottomDescription),this.tabsService.loadContent(Rt,Tt.tabs,Ct)}static{this.\u0275fac=function(Pt){return new(Pt||Dt)(l.rXU(p.il),l.rXU(S.nX),l.rXU(c.$Y),l.rXU(g.Y),l.rXU(_.gRc))}}static{this.\u0275cmp=l.VBU({type:Dt,selectors:[["tpe-report-v2"]],viewQuery:function(Pt,Rt){if(1&Pt&&l.GBs(Y.hQ,5),2&Pt){let Tt;l.mGM(Tt=l.lsd())&&(Rt.tabPanel=Tt.first)}},inputs:{timestamp:"timestamp"},outputs:{onLoadError:"onLoadError"},standalone:!1,decls:2,vars:2,consts:[[3,"spaceId","accessibleSpaceIds","reportId","tree","tabKey"],[1,"description"],[1,"tab-area"],[1,"tab-content"],[3,"data"],[1,"separator-line"],["mat-tab-nav-bar","","color","accent",3,"mat-stretch-tabs","tabPanel"],["mat-tab-link","",3,"routerLink","active"]],template:function(Pt,Rt){1&Pt&&(l.nVh(0,at,7,6),l.nVh(1,vt,1,0,"tpe-loading-indicator")),2&Pt&&(l.vxM(Rt.loading?-1:0),l.R7$(),l.vxM(Rt.loading?1:-1))},dependencies:[S.n3,R.Wk,Y.Bu,Y.hQ,Y.Ql,W.T,j.r,z.Y],styles:[".tab-area[_ngcontent-%COMP%]{margin-left:-24px;margin-right:-24px;width:calc(100% + 48px)}.separator-line[_ngcontent-%COMP%]{border-bottom:2px solid rgba(0,0,0,.38);height:0;margin:64px 0 0;width:100%}"]})}}return Dt})()},54643(Gt,ut,y){y.d(ut,{r:()=>P});var L=y(35547),Y=y(11784),V=y(60247);let P=(()=>{class Z{static{this.ID=1}constructor(f){this.markdownService=f,this.inlineStyle="",this.inlineStyleItems={}}ngOnInit(){this.markdownService.renderer.image=({href:f,title:C,text:w})=>{const A=document.createElement("img");
1return A.src=`/media/reporting-v2/assets/${f}`,A.className="markdown-image-"+Z.ID++,C&&(A.title=C),this.parseText(w,A),this.updateInlineStyle(),A.outerHTML}}parseText(f,C){const w=/,? *([whd])=&quot;(\d+[%vhwempx]+?|block)&quot;/gi;let A=w.exec(f);if(!A)return void(C.alt=f);const b=A.index,m={w:"width",h:"height",d:"display"};do{this.addStyle(C.className,m[A[1]],A[2])}while(null!==(A=w.exec(f)));C.alt=f.substring(0,b)}addStyle(f,C,w){let A=[];this.inlineStyleItems[f]&&(A=this.inlineStyleItems[f]),A.push(`${C}: ${w}`),this.inlineStyleItems[f]=A}updateInlineStyle(){this.inlineStyle="<style>\n";for(const f in this.inlineStyleItems){this.inlineStyle+=`.${f} {`;for(const C of this.inlineStyleItems[f])this.inlineStyle+=`${C};`;this.inlineStyle+="}\n"}this.inlineStyle+="</style>"}static{this.\u0275fac=function(C){return new(C||Z)(L.rXU(Y.Rl))}}static{this.\u0275cmp=L.VBU({type:Z,selectors:[["tpe-report-v2-markdown"]],inputs:{data:"data"},standalone:!1,decls:3,vars:4,consts:[["katex","",3,"data"],[3,"innerHTML"]],template:function(C,w){1&C&&(L.nrm(0,"markdown",0)(1,"span",1),L.nI1(2,"safeHtml")),2&C&&(L.Y8G("data",w.data),L.R7$(),L.Y8G("innerHTML",L.bMT(2,2,w.inlineStyle),L.npT))},dependencies:[Y.NN,V.$],encapsulation:2})}}return Z})()},20562(Gt,ut,y){y.d(ut,{i:()=>b});var L=y(85802),Y=y(50672),V=y(16332),P=y(39608),Z=y(35547),X=y(45909),f=y(52920);const C=["chartDiv"],w=["*"];function A(m,T){if(1&m&&(Z.j41(0,"div",5)(1,"div",6),Z.nrm(2,"img",7),Z.j41(3,"span",8),Z.pXf(4,1),Z.k0s()()()),2&m){const c=Z.XpG();Z.R7$(2),Z.Y8G("src",c.assets.get("no-chart-data.svg"),Z.B4B)}}let b=(()=>{class m{constructor(c,r,g){this.service=c,this.instanceService=r,this.assets=g,this.noData=!1,this.disableSpacer=!1,this.config=null,this.dateFormat="yyyy-MM-dd",this.instanceService.setAmChartsInstance(c)}ngOnInit(){this.service.createRoot(this.chartDiv.nativeElement,this.dateFormat),this.config&&this.service.chart.setAll(this.config)}ngOnDestroy(){this.service.destroyRoot(),document.body.style.cursor=null}ngDoCheck(){this.service.chart&&(this.spacerHeight=this.disableSpacer?0:this.calculateChartHeight())}calculateChartHeight(){let c=0;return c+=this.service.chart.get("paddingBottom"),c+=this.service.chart.get("paddingTop"),c}static{this.\u0275fac=function(r){return new(r||m)(Z.rXU(P.Q),Z.rXU(X.r),Z.rXU(Y.T))}}static{this.\u0275cmp=Z.VBU({type:m,selectors:[["tpe-amcharts-5"]],viewQuery:function(r,g){if(1&r&&Z.GBs(C,7),2&r){let _;Z.mGM(_=Z.lsd())&&(g.chartDiv=_.first)}},inputs:{noData:"noData",disableSpacer:"disableSpacer",config:"config"},standalone:!1,features:[Z.Jv_([{provide:P.Q,useFactory:c=>new P.Q(c),deps:[L.SKi]},{provide:V.Y,useFactory:c=>new V.Y(c),deps:[P.Q]}])],ngContentSelectors:w,decls:6,vars:3,consts:()=>{let c;return c="No data available",[["chartDiv",""],c,[1,"am5-wrap"],[1,"chart-container"],[1,"spacer"],["fxLayout","column","fxLayoutAlign","center center",1,"no-data"],[1,"overlay-content"],["fxFlex","nogrow","alt","No chart data",3,"src"],["fxFlex","nogrow"]]},template:function(r,g){1&r&&(Z.NAR(),Z.j41(0,"div",2),Z.nrm(1,"div",3,0),Z.SdG(3),Z.nrm(4,"div",4),Z.nVh(5,A,5,1,"div",5),Z.k0s()),2&r&&(Z.R7$(4),Z.xc7("height",g.spacerHeight,"px"),Z.R7$(),Z.vxM(g.noData?5:-1))},dependencies:[f.DJ,f.sA,f.UI],styles:[".am5-wrap[_ngcontent-%COMP%]{position:relative}.chart-container[_ngcontent-%COMP%]{height:100%;position:absolute;width:100%}.no-data[_ngcontent-%COMP%]{background-color:#f5f5f5;inset:0;pointer-events:all;position:absolute}.no-data[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#00000061;font-size:14px;font-weight:400}"]})}}return m})()},4328(Gt,ut,y){y.d(ut,{r:()=>c});var L=y(5983),Y=y(72887),V=y(39467),P=y(72294),Z=y(45760),X=y(18551),f=y(20562),C=y(16332),w=y(39608),A=y(79320),b=y(35547),m=y(97396);function T(r,g){if(1&r&&b.nrm(0,"tpe-amcharts-5-hierarchy-legend",1),2&r){const _=b.XpG();b.Y8G("typeNames",_.typeNames)}}let c=(()=>{class r{constructor(_,l,p){this.service=_,this.legend=l,this.height=400,this.settings={},this._lastHeight=null,p||console.error("tpe-amcharts-5-force-directed requires a parent chart!"),this.legend.setParent(this)}ngOnInit(){this.panel=this.service.root.container.children.push(L.m.new(this.service.root,{layout:this.service.root.verticalLayout,height:(0,Z.KN)(100),width:(0,Z.KN)(100)})),this.chartPanel=this.panel.children.push(Y.b.new(this.service.root,{height:this.height,width:(0,Z.KN)(100),wheelable:!1,maxPanOut:0}));const _=this.chartPanel.children.push(V.V.new(this.service.root,{target:this.chartPanel}));A.$.setupZoomTools(_),this.chart=this.service.addForceDirectedChart(this.chartPanel.contents,this.settings,l=>
1{const p=this.colors?.length?this.colors:X.Z.colors.graphs;l.get("colors").set("colors",p.map(S=>(0,P.yW)(S))),this.setupChart&&this.setupChart(l)}),this.loadData()}ngOnChanges(_){_.data&&this.loadData()}ngOnDestroy(){this.chart=null}ngDoCheck(){this._lastHeight!==this.height&&(this.chartPanel.set("height",this.height),this._lastHeight=this.height)}loadData(){!this.data||!this.chart||(this.chart.data.setAll(this.data),this.typeNames&&this.legend.loadData(this.data))}static{this.\u0275fac=function(l){return new(l||r)(b.rXU(w.Q),b.rXU(C.Y),b.rXU(f.i,9))}}static{this.\u0275cmp=b.VBU({type:r,selectors:[["tpe-amcharts-5-force-directed"]],inputs:{data:"data",height:"height",settings:"settings",colors:"colors",setupChart:"setupChart",typeNames:"typeNames"},standalone:!1,features:[b.OA$],decls:2,vars:3,consts:[[1,"spacer"],[3,"typeNames"]],template:function(l,p){1&l&&(b.nrm(0,"div",0),b.nVh(1,T,1,1,"tpe-amcharts-5-hierarchy-legend",1)),2&l&&(b.xc7("height",p.height,"px"),b.R7$(),b.vxM(p.typeNames?1:-1))},dependencies:[m.q],encapsulation:2})}}return r})()},86110(Gt,ut,y){y.d(ut,{_:()=>C});var L=y(35937),Y=y(79691),V=y(77669),P=y(24414),Z=y(93147),X=y(39608),f=y(35547);let C=(()=>{class w{constructor(b,m){this.service=b,this.panel=m,this.valueAxisHeight=null,this.minValue=null,this.config={},this.setupSeries=null,this.setupBullet=null,this.bulletSpriteType=Z.ww.CIRCLE,this.minMaxBubbleSize=null,this.bulletCircleTemplate=Y.Bj.new({}),m||console.error("tpe-amcharts-5-graph requires a parent panel!")}ngOnInit(){this.series=this.panel.addGraph(this.graphType,this.label,this.valueAxisHeight,this.config,b=>this._setupBullet(b),this.bulletSpriteType),this._setupSeries(this.series),this.updateData()}ngOnDestroy(){this.series&&this.panel.removeGraph(this.series),this.series=null}ngOnChanges(b){b.data&&this.updateData(),b.minValue&&this.updateMinValue()}updateData(){this.series&&this.data&&(this.series.data.setAll(this.data),this.panel.setNoData(this.series,this.data.reduce((b,m)=>b&&null===m.value,!0)),this.panel.updateData(this.data),this.triggerBubbleResize())}updateMinValue(){if(!this.series)return;const b=this.series.get("yAxis");b.get("min")!==this.minValue&&b.set("min",this.minValue)}_setupSeries(b){this.graphType===Z.eF.BUBBLE&&(b.set("heatRules",[{target:this.bulletCircleTemplate,min:5,max:35,dataField:"value",customFunction:(m,T,c,r)=>{if(!this.minMaxBubbleSize||!Number.isFinite(r))return m.set("radius",5);m.set("radius",5+(r-this.minMaxBubbleSize.min)/(this.minMaxBubbleSize.max-this.minMaxBubbleSize.min)*30)}}]),b.get("yAxis").set("extraMax",.05),b.strokes.template.set("strokeOpacity",0),b.data.processor.set("emptyAs",0),b.data.processor.set("numericFields",[b.get("valueXField"),b.get("valueYField"),b.get("valueField")])),this.setupSeries&&this.setupSeries(this.series)}_setupBullet(b){if(this.graphType===Z.eF.BUBBLE){const m=b.get("sprite");b.set("sprite",L.j.new(this.service.root,{...m._settings},this.bulletCircleTemplate))}this.setupBullet&&this.setupBullet(b)}triggerBubbleResize(){this.graphType===Z.eF.BUBBLE&&V.R.timer(500).subscribe(()=>{if(!this.panel.legend)return;const b=this.panel.legend.itemContainers.values[0];if(!b)return;const m={target:b,originalEvent:null,point:null,simulated:!0};b.events.dispatch("pointerover",{...m,type:"pointerover"}),b.events.dispatch("pointerout",{...m,type:"pointerout"})})}static{this.\u0275fac=function(m){return new(m||w)(f.rXU(X.Q),f.rXU(P.u,9))}}static{this.\u0275cmp=f.VBU({type:w,selectors:[["tpe-amcharts-5-graph"]],inputs:{graphType:"graphType",label:"label",data:"data",valueAxisHeight:"valueAxisHeight",minValue:"minValue",config:"config",setupSeries:"setupSeries",setupBullet:"setupBullet",bulletSpriteType:"bulletSpriteType",minMaxBubbleSize:"minMaxBubbleSize"},standalone:!1,features:[f.OA$],decls:0,vars:0,template:function(m,T){},encapsulation:2})}}return w})()},97396(Gt,ut,y){y.d(ut,{q:()=>V});var L=y(16332),Y=y(35547);let V=(()=>{class P{constructor(X){this.legendService=X}ngOnInit(){this.legendService.typeNames=this.typeNames,this.legendService.setupLegends()}static{this.\u0275fac=function(f){return new(f||P)(Y.rXU(L.Y))}}static{this.\u0275cmp=Y.VBU({type:P,selectors:[["tpe-amcharts-5-hierarchy-legend"]],inputs:{typeNames:"typeNames"},standalone:!1,decls:0,vars:0,template:function(f,C){},encapsulation:2})}}return P})()},16332(Gt,ut,y){y.d(ut,{Y:()=>w});
1var L=y(5983),Y=y(59460),V=y(72294),P=y(45760),Z=y(18551),X=y(93147),f=y(39608),C=y(85802);let w=(()=>{class A{constructor(m){this.service=m,this.typesSorted=[X.ww.SQUARE,X.ww.CIRCLE,X.ww.HEXAGON,X.ww.TRIANGLE]}setParent(m){this.parent=m}loadData(m){this.seriesLegendData=this.mapCategories(m),this.setSeriesLegendData()}setupLegends(){const m=this.parent.panel.children.push(L.m.new(this.service.root,{layout:this.service.root.horizontalLayout,width:(0,P.KN)(100)}));this.seriesLegend=this.makeLegend(m,(0,P.KN)(100),{fillField:"color",strokeField:"color",paddingRight:16}),this.typeLegend=this.makeLegend(m,200),this.setupTypeLegend(),this.setSeriesLegendData()}setSeriesLegendData(){this.seriesLegend&&this.seriesLegendData&&this.seriesLegend.data.setAll(this.seriesLegendData)}makeLegend(m,T,c={}){return m.children.push(L.m.new(this.service.root,{width:T})).children.push(Y.s.new(this.service.root,{nameField:"name",width:(0,P.KN)(100),paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:16,...c}))}setupTypeLegend(){this.typeLegend.markers.template.setup=T=>{T.events.on("dataitemchanged",c=>{T.children.push(this.service.makeShape(c.target.dataItem.dataContext.type,20,(0,V.yW)(13421772),0))})};const m=this.typesSorted.map(T=>({type:T,name:this.typeNames[T]})).filter(T=>!!T.name);this.typeLegend.labels.template.set("textAlign","right"),this.typeLegend.data.setAll(m)}mapCategories(m){const T=[];let c=0;this.colorByCategoryName={};const r=g=>{if(!this.colorByCategoryName[g.categoryName]){const _=V.Q1.fromString(Z.Z.colors.graphs[c%Z.Z.colors.graphs.length]);this.colorByCategoryName[g.categoryName]=_,c++,T.push({name:g.categoryName,color:_})}g.children?.forEach(_=>r(_))};return m.forEach(g=>r(g)),T}static{this.\u0275fac=function(T){return new(T||A)(C.KVO(f.Q))}}static{this.\u0275prov=C.jDH({token:A,factory:A.\u0275fac})}}return A})()},31904(Gt,ut,y){y.d(ut,{v:()=>A});var L=y(5983),Y=y(88327),V=y(72294),P=y(45760),Z=y(20562),X=y(16332),f=y(39608),C=y(35547);const w=["*"];let A=(()=>{class b{constructor(T,c,r){this.service=T,this.legend=c,r||console.error("tpe-amcharts-5-hierarchy requires a parent chart!"),c.setParent(this)}ngOnInit(){this.panel=this.service.root.container.children.push(L.m.new(this.service.root,{layout:this.service.root.verticalLayout,height:(0,P.KN)(100),width:(0,P.KN)(100)})),this.chart=this.service.addHierarchyTree(this.panel,this.settings,T=>this.setupTree(T))}ngAfterViewInit(){this.loadData()}ngOnChanges(T){T.data&&this.loadData()}ngOnDestroy(){this.chart=null}setupTree(T){T.circles.template.setAll({radius:100,forceHidden:!0}),T.outerCircles.template.setAll({radius:100,forceHidden:!0}),T.links.template.adapters.add("stroke",()=>(0,V.yW)(0)),T.labels.template.setAll({y:10,oversizedBehavior:"truncate",paddingLeft:8,paddingRight:8,fill:(0,V.yW)(0),rotation:45,centerY:0,centerX:0}),T.set("height",(0,P.KN)(90)),T.nodes.template.set("tooltipText","{category}"),T.nodes.template.setup=c=>{c.events.on("dataitemchanged",r=>{c.children.push(this.makeNodeShape(r.target.dataItem.dataContext))})},this.setupTooltips(T),this.setup&&this.setup(T)}loadData(){!this.data||!this.chart||(this.legend.loadData(this.data),this.chart.data.setAll(this.data))}makeNodeShape(T){return this.service.makeShape(T.type,30,this.legend.colorByCategoryName[T.categoryName])}setupTooltips(T){const c=Y.m.new(this.service.root,{getFillFromSprite:!1,getStrokeFromSprite:!1,getLabelFillFromSprite:!1,autoTextColor:!1,centerX:(0,P.KN)(50),paddingRight:0,paddingLeft:0});c.label.setAll({oversizedBehavior:"wrap",fill:(0,V.yW)(0),maxWidth:200,paddingRight:4,paddingLeft:4}),c.get("background").setAll({fill:(0,V.yW)(16777215),stroke:(0,V.yW)(0)}),T.nodes.template.set("tooltip",c)}static{this.\u0275fac=function(c){return new(c||b)(C.rXU(f.Q),C.rXU(X.Y),C.rXU(Z.i,9))}}static{this.\u0275cmp=C.VBU({type:b,selectors:[["tpe-amcharts-5-hierarchy"]],inputs:{settings:"settings",data:"data",setup:"setup"},standalone:!1,features:[C.OA$],ngContentSelectors:w,decls:1,vars:0,template:function(c,r){1&c&&(C.NAR(),C.SdG(0))},encapsulation:2})}}return b})()},24414(Gt,ut,y){y.d(ut,{u:()=>c});var L=y(21413),Y=y(88141),V=y(50672),P=y(77669),Z=y(20562),X=y(93147),f=y(39608),C=y(17705),w=y(35547),A=y(85802),b=y(52920);const m=["*"];function T(r,g){if(1&r&&(w.j41(0,"div",3),w.nrm(1,"img",4),w.j41(2,"span",5),w.pXf(3,0),w.k0s()()),2&r){const _=w.XpG();w.R7$(),w.Y8G("src",_.assets.get("no-chart-data.svg"),w.B4B)}}let c=(()=>
1{class r{constructor(_,l,p,S,R){this.service=_,this.assets=l,this.chartMain=p,this.cdr=S,this.zone=R,this.axisType=X.Vn.DATE,this.commonValueAxisHeight=null,this.showLegend=!1,this.setupLegend=null,this.setupPanel=null,this.colors=null,this.showNoData=!1,this.noDataSeries=[],this.updateLegend$=new L.B,p||console.error("tpe-amcharts-5-panel requires a parent chart!")}ngOnInit(){this.noDataSeries=[],this.panel=this.service.addPanel(this.index,this.axisType,this.valueAxisHeight,this.colors),this.showLegend&&(this.legend=this.service.addLegend(this.panel)),this.setupPanel&&this.setupPanel(this.panel),this.updateLegend$.pipe(P.R.debounceTime(200),(0,Y.M)(()=>this.updateLegend())).subscribe()}ngDoCheck(){this.panel&&(this._lastHeight!==this.commonValueAxisHeight&&(this.service.updateValueAxisHeight(this.index,this.valueAxisHeight),this._lastHeight=this.commonValueAxisHeight),this.spacerHeight=this.calculatePanelHeight())}ngOnDestroy(){this.service.removePanel(this.panel),this.panel=null,this.updateLegend$.complete()}addGraph(_,l,p=400,S={},R=null,W=X.ww.CIRCLE){const j=this.service.addGraph(this.index,this.panel,_,l,p,this.axisType===X.Vn.DATE,S,{setupBullets:R,spriteType:W});return this.updateLegend$.next(),j}removeGraph(_){this.zone.runOutsideAngular(()=>{this.panel.series.removeValue(_)}),this.setNoData(_,!1),this.updateLegend$.next()}updateData(_){this.service.updateData(this.panel),this.axisType!==X.Vn.DATE&&this.zone.runOutsideAngular(()=>{this.panel.xAxes.values[0].data.setAll(_)})}setNoData(_,l){l&&!this.noDataSeries.includes(_)&&this.noDataSeries.push(_),!l&&this.noDataSeries.includes(_)&&(this.noDataSeries=this.noDataSeries.filter(p=>p!==_)),this.showNoData=this.noDataSeries.length===this.panel.series.length,this.cdr.detectChanges()}get valueAxisHeight(){if(!this.commonValueAxisHeight)return null;let _=this.commonValueAxisHeight;return _-=this.service.chart.get("paddingBottom"),_-=this.service.chart.get("paddingTop"),_}updateLegend(){!this.legend||!this.panel||this.zone.runOutsideAngular(()=>{this.legend.data.setAll(this.panel.series.values),this.setupLegend&&this.setupLegend(this.legend)})}calculatePanelHeight(){let _=35;_+=this.panel.get("paddingTop"),_+=this.panel.get("paddingBottom"),_+=this.panel.get("scrollbarX").height();for(const l of this.panel.xAxes.values)_+=l.height();for(const l of this.panel.yAxes.values)_+=l.height(),l.axisHeader&&(_+=l.axisHeader.height());return this.legend&&(_+=this.legend.height()),_}static{this.\u0275fac=function(l){return new(l||r)(w.rXU(f.Q),w.rXU(V.T),w.rXU(Z.i,9),w.rXU(C.gRc),w.rXU(A.SKi))}}static{this.\u0275cmp=w.VBU({type:r,selectors:[["tpe-amcharts-5-panel"]],inputs:{index:"index",axisType:"axisType",commonValueAxisHeight:"commonValueAxisHeight",showLegend:"showLegend",setupLegend:"setupLegend",setupPanel:"setupPanel",colors:"colors"},standalone:!1,ngContentSelectors:m,decls:4,vars:3,consts:()=>{let _;return _="No data available",[_,[1,"am5-panel-wrap"],[1,"spacer"],["fxLayout","column","fxLayoutAlign","center center",1,"no-data-overlay"],["fxFlex","nogrow","alt","No data",3,"src"],["fxFlex","nogrow"]]},template:function(l,p){1&l&&(w.NAR(),w.j41(0,"div",1),w.SdG(1),w.nrm(2,"div",2),w.nVh(3,T,4,1,"div",3),w.k0s()),2&l&&(w.R7$(2),w.xc7("height",p.spacerHeight,"px"),w.R7$(),w.vxM(p.showNoData?3:-1))},dependencies:[b.DJ,b.sA,b.UI],styles:[".am5-panel-wrap[_ngcontent-%COMP%]{pointer-events:none;position:relative}.no-data-overlay[_ngcontent-%COMP%]{background-color:#f5f5f5;inset:24px 0 0;position:absolute;z-index:1000}.no-data-overlay[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#00000061;font-size:14px;font-weight:400}"]})}}return r})()},8245(Gt,ut,y){y.d(ut,{M:()=>X});var L=y(5983),Y=y(45760),V=y(20562),P=y(39608),Z=y(35547);let X=(()=>{class f{constructor(w,A){this.service=w,this.height=400,this.settings={},A||console.error("tpe-amcharts-5-pie-chart requires a parent chart!")}ngOnInit(){this.panel=this.service.root.container.children.push(L.m.new(this.service.root,{layout:this.service.root.verticalLayout,height:this.height,width:(0,Y.KN)(100)})),this.chart=this.service.addPieChart(this.panel,this.settings,w=>{this.setupChart&&this.setupChart(w)})}ngOnDestroy(){this.chart=null}ngDoCheck(){this._lastHeight!==this.height&&(this.panel.set("height",this.height),this._lastHeight=this.height)}static{this.\u0275fac=function(A){return new(A||f)(Z.rXU(P.Q),Z.rXU(V.i,9))}}static{this.\u0275cmp=Z.VBU({type:f,selectors:[["tpe-amcharts-5-pie-chart"]],inputs:{height:"height",settings:"settings",setupChart:"setupChart"},standalone:!1,decls:1,vars:2,consts:[[1,"spacer"]],template:function(A,b){1&A&&Z.nrm(0,"div",0),2&A&&Z.xc7("height",b.height,"px")},encapsulation:2})}}return f})()},53909(Gt,ut,y){y.d(ut,{Z:()=>W});var L=y(72294),Y=y(31635),V=y(97188),P=y(5983),Z=y(93863),X=y(26864),f=y(21653);class C extends V.s{constructor(){super(...arguments),this.slice
1sContainer=this.children.push(P.m.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(P.m.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(P.m.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(z=!1){const U=this.get("colors");return U&&U.reset(),super._applyThemes(z)}makeSlice(z){const U=this.slicesContainer.children.push(this.slices.make());return U.on("fill",()=>{this.updateLegendMarker(z)}),U.on("fillPattern",()=>{this.updateLegendMarker(z)}),U.on("stroke",()=>{this.updateLegendMarker(z)}),U._setDataItem(z),z.set("slice",U),this.slices.push(U),U}makeLabel(z){const U=this.labelsContainer.children.push(this.labels.make());return U._setDataItem(z),z.set("label",U),this.labels.push(U),U}_shouldMakeBullet(z){return null!=z.get("value")}makeTick(z){const U=this.ticksContainer.children.push(this.ticks.make());return U._setDataItem(z),z.set("tick",U),this.ticks.push(U),U}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_onDataClear(){const z=this.get("colors");z&&z.reset();const U=this.get("patterns");U&&U.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let z=0,U=0,nt=0,it=1/0,gt=0;X.__(this._dataItems,N=>{let tt=N.get("valueWorking",0);z+=tt,U+=Math.abs(tt)}),X.__(this._dataItems,N=>{let tt=N.get("valueWorking",0);tt>nt&&(nt=tt),tt<it&&(it=tt),gt++;let J=tt/U;0==U&&(J=0),N.setRaw("valuePercentTotal",100*J)}),this.setPrivateRaw("valueLow",it),this.setPrivateRaw("valueHigh",nt),this.setPrivateRaw("valueSum",z),this.setPrivateRaw("valueAverage",z/gt),this.setPrivateRaw("valueAbsoluteSum",U)}}show(z){const U=Object.create(null,{show:{get:()=>super.show}});return(0,Y.sH)(this,void 0,void 0,function*(){let nt=[];nt.push(U.show.call(this,z)),nt.push(this._sequencedShowHide(!0,z)),yield Promise.all(nt)})}hide(z){const U=Object.create(null,{hide:{get:()=>super.hide}});return(0,Y.sH)(this,void 0,void 0,function*(){let nt=[];nt.push(U.hide.call(this,z)),nt.push(this._sequencedShowHide(!1,z)),yield Promise.all(nt)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&X.__(this._dataItems,z=>{z.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&X.__(this._dataItems,z=>{this.updateLegendValue(z)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),X.__(this.dataItems,z=>{this._updateTick(z)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(z){if(super.processDataItem(z),null==z.get("fill")){let U=this.get("colors");U&&z.setRaw("fill",U.next())}if(null==z.get("fillPattern")){let U=this.get("patterns");U&&z.setRaw("fillPattern",U.next())}}showDataItem(z,U){const nt=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,Y.sH)(this,void 0,void 0,function*(){const it=[nt.showDataItem.call(this,z,U)];f.Et(U)||(U=this.get("stateAnimationDuration",0));const gt=this.get("stateAnimationEasing");let N=z.get("value");const tt=z.animate({key:"valueWorking",to:N,duration:U,easing:gt});tt&&it.push(tt.waitForStop());const J=z.get("tick");J&&it.push(J.show(U));const at=z.get("label");at&&it.push(at.show(U));const vt=z.get("slice");vt&&it.push(vt.show(U)),vt.get("active")&&vt.states.applyAnimate("active"),yield Promise.all(it)})}hideDataItem(z,U){const nt=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,Y.sH)(this,void 0,void 0,function*(){const it=[nt.hideDataItem.call(this,z,U)],gt=this.states.create("hidden",{});f.Et(U)||(U=gt.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));const N=gt.get("stateAnimationEasing",this.get("stateAnimationEasing")),tt=z.animate({key:"valueWorking",to:0,duration:U,easing:N});tt&&it.push(tt.waitForStop());const J=z.get("tick");J&&it.push(J.hide(U));const at=z.get("label");at&&it.push(at.hide(U));const vt=z.get("slice");vt.hideTooltip(),vt&&it.push(vt.hide(U)),yield Promise.all(it)})}disposeDataItem(z){super.disposeDataItem(z);let U=z.get("label");U&&(this.labels.removeValue(U),U.dispose());let nt=z.get("tick");nt&&(this.ticks.removeValue(nt),nt.dispose());let it=z.get("slice");
1it&&(this.slices.removeValue(it),it.dispose())}hoverDataItem(z){const U=z.get("slice");U&&!U.isHidden()&&U.hover()}unhoverDataItem(z){const U=z.get("slice");U&&U.unhover()}updateLegendMarker(z){if(z){const U=z.get("slice");if(U){const nt=z.get("legendDataItem");if(nt){const it=nt.get("markerRectangle");X.__(Z.o,gt=>{null!=U.get(gt)&&it.set(gt,U.get(gt))})}}}}_arrangeDown(z){if(z){let U=this._getNextDown();z.sort((nt,it)=>nt.y>it.y?1:nt.y<it.y?-1:0),X.__(z,nt=>{const it=nt.label.adjustedLocalBounds();let gt=it.top;nt.y+gt<U&&(nt.y=U-gt),nt.label.set("y",nt.y),U=nt.y+it.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(z){if(z){let U=this._getNextUp();z.sort((nt,it)=>nt.y<it.y?1:nt.y>it.y?-1:0),X.__(z,nt=>{const it=nt.label.adjustedLocalBounds();let gt=it.bottom;nt.y+gt>U&&(nt.y=U-gt),nt.label.set("y",nt.y),U=nt.y+it.top})}}_arrangeRight(z){if(z){let U=0;z.sort((nt,it)=>nt.y>it.y?1:nt.y<it.y?-1:0),X.__(z,nt=>{const it=nt.label.adjustedLocalBounds();let gt=it.left;nt.y+gt<U&&(nt.y=U-gt),nt.label.set("x",nt.y),U=nt.y+it.right})}}_arrangeLeft(z){if(z){let U=this.labelsContainer.maxWidth();z.sort((nt,it)=>nt.y<it.y?1:nt.y>it.y?-1:0),X.__(z,nt=>{const it=nt.label.adjustedLocalBounds();let gt=it.right;nt.y+gt>U&&(nt.y=U-gt),nt.label.set("x",nt.y),U=nt.y+it.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(z){}_dispose(){super._dispose();const z=this.chart;z&&z.series.removeValue(this)}}C.className="PercentSeries",C.classNames=V.s.classNames.concat([C.className]);var w=y(79691),A=y(39538),b=y(67830),m=y(91364),T=y(34521),c=y(45760),r=y(30903),g=y(19708);class _ extends C{_makeSlices(){return new T.TS(w.Bj.new({}),()=>A.J._new(this._root,{themeTags:g.kE(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new T.TS(w.Bj.new({}),()=>m.i._new(this._root,{themeTags:g.kE(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new T.TS(w.Bj.new({}),()=>b.g._new(this._root,{themeTags:g.kE(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(z){super.processDataItem(z);const U=this.makeSlice(z);U.on("scale",()=>{this._updateTick(z)}),U.on("shiftRadius",()=>{this._updateTick(z)}),U.events.on("positionchanged",()=>{this._updateTick(z)});const nt=this.makeLabel(z);nt.events.on("positionchanged",()=>{this._updateTick(z)}),this.makeTick(z),U.events.on("positionchanged",()=>{nt.markDirty()})}_getNextUp(){const z=this.chart;return z?z._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){const z=this.chart;return z?-z._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();const z=this.chart;if(z){if(this.isDirty("alignLabels")){let U=this.labels.template;if(this.get("alignLabels"))U.set("textType","aligned");else{let nt=U.get("textType");(null==nt||"aligned"==nt)&&U.set("textType","adjusted")}}if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();const U=this.get("startAngle",z.get("startAngle",-90)),it=this.get("endAngle",z.get("endAngle",270))-U;let gt=U;const N=z.radius(this);this.setPrivateRaw("radius",N);let tt=z.innerRadius(this)*z.getPrivate("irModifyer",1);tt<0&&(tt=N+tt),X.__(this._dataItems,J=>{this.updateLegendValue(J);let at=it*J.get("valuePercentTotal")/100;const vt=J.get("slice");if(vt){vt.set("radius",N),vt.set("innerRadius",tt),vt.set("startAngle",gt),vt.set("arc",at);const yt=J.get("fill");vt._setDefault("fill",yt),vt._setDefault("stroke",yt);const pt=J.get("fillPattern");vt._setDefault("fillPattern",pt)}let dt=r.n0(gt+at/2);const Dt=J.get("label");if(Dt&&(Dt.setPrivate("radius",N),Dt.setPrivate("innerRadius",tt),Dt.set("labelAngle",dt),"aligned"==Dt.get("textType"))){let yt=N+Dt.get("radius",0),pt=N*r.F8(dt);dt>90&&dt<=270?(!Dt.isHidden()&&!Dt.isHiding()&&this._lLabels.push({label:Dt,y:pt}),yt*=-1,yt-=this.labelsContainer.get("paddingLeft",0),Dt.set("centerX",c.Q2),Dt.setPrivateRaw("left",!0)):(!Dt.isHidden()&&!Dt.isHiding()&&this._rLabels.push({label:Dt,y:pt}),yt+=this.labelsContainer.get("paddingRight",0),Dt.set("centerX",0),Dt.setPrivateRaw("left",!1)),Dt.set("x",yt),Dt.set("y",N*r.F8(dt))}gt+=at,this._updateTick(J)})}}}_updateTick(z){const U=z.get("tick"),nt=z.get("label"),it=z.get("slice"),gt=U.get("location",1);if(U&&nt&&it){const N=(it.get("shiftRadius",0)+it.get("radius",0))*it.get("scale",1)*gt,tt=nt.get("labelAngle",0),J=r.gn(tt),at=r.F8(tt),vt=this.labelsContainer,dt=vt.get("paddingLeft",0),Dt=vt.get("paddingRight",0);let yt=0,pt=0;yt=nt.x(),pt=nt.y();let Pt=[];if(0!=yt||0!=pt){if("circular"==nt.get("textType")){const Tt=nt.radius()-nt.get("paddingBottom",0),Ct=nt.get("labelAngle",0);yt=Tt*r.gn(Ct),pt=Tt*r.F8(Ct)}let Rt=-Dt;nt.getPrivate("left")&&(Rt=dt),Pt=[{x:it.x()+N*J,y:it.y()+N*at},{x:yt+Rt,y:pt},{x:yt,y:pt}]}U.set("points",Pt)}}_positionBullet(z){const U=z.get("sprite");if(U){const it=U.dataItem.get("slice");if(it){const gt=it.get("innerRadius",0),N=it.get("radius",0),dt=it.get("startAngle",0)+it.get("arc",0)*z.get("locationX",.5),Dt=gt+(N-gt)*z.get("locationY",.5);U.setAll({x:r.gn(dt)*Dt,y:r.F8(dt)*Dt})}}}}
1_.className="PieSeries",_.classNames=C.classNames.concat([_.className]);var l=y(18551),p=y(8245),S=y(39608),R=y(35547);let W=(()=>{class j{constructor(U,nt){this.service=U,this.chartMain=nt,this.settings={},nt||console.error("tpe-amcharts-5-pie-series requires a parent pie-chart!")}ngOnInit(){this.series=this.chartMain.chart.series.push(_.new(this.service.root,{name:"unset",valueField:"value",categoryField:"label",...this.settings}));const U=this.colors?.length?this.colors:l.Z.colors.graphs;this.series.get("colors").set("colors",U.map(nt=>(0,L.yW)(nt))),this.setupSeries&&this.setupSeries(this.series),this.loadData()}ngOnChanges(U){U.data&&this.loadData()}ngOnDestroy(){this.series=null}loadData(){!this.data||!this.series||this.series.data.setAll(this.data)}static{this.\u0275fac=function(nt){return new(nt||j)(R.rXU(S.Q),R.rXU(p.M,9))}}static{this.\u0275cmp=R.VBU({type:j,selectors:[["tpe-amcharts-5-pie-series"]],inputs:{data:"data",settings:"settings",setupSeries:"setupSeries",colors:"colors"},standalone:!1,features:[R.OA$],decls:0,vars:0,template:function(nt,it){},encapsulation:2})}}return j})()},19775(Gt,ut,y){y.d(ut,{F:()=>Z});var L=y(72294),Y=y(20562),V=y(39608),P=y(35547);let Z=(()=>{class X{constructor(C,w){this.service=C,this.chartMain=w,this.height=400,this.unit="",this.setupChart=null,w||console.error("tpe-amcharts-5-sankey requires a parent chart!")}ngOnInit(){this.chart=this.service.addSankeyChart(this.unit),this.setupChart&&this.setupChart(this.chart),this.loadData()}ngOnChanges(C){C.data&&this.loadData(),C.height&&this.chart?._updateSize()}ngOnDestroy(){this.chart=null}loadData(){if(!this.data||!this.chart)return;const C=this.data.nodes.map(w=>(w.fill&&"string"==typeof w.fill&&(w.fill=(0,L.yW)(w.fill)),w));this.chart.nodes.data.setAll(C),this.chart.data.setAll(this.data.series)}static{this.\u0275fac=function(w){return new(w||X)(P.rXU(V.Q),P.rXU(Y.i,9))}}static{this.\u0275cmp=P.VBU({type:X,selectors:[["tpe-amcharts-5-sankey"]],inputs:{data:"data",height:"height",unit:"unit",setupChart:"setupChart"},standalone:!1,features:[P.OA$],decls:1,vars:2,consts:[[1,"spacer"]],template:function(w,A){1&w&&P.nrm(0,"div",0),2&w&&P.xc7("height",A.height,"px")},encapsulation:2})}}return X})()},97408(Gt,ut,y){y.d(ut,{i:()=>C});var L=y(5983),Y=y(72294),V=y(45760),P=y(18551),Z=y(20562),X=y(39608),f=y(35547);let C=(()=>{class w{constructor(b,m){this.service=b,this.height=400,this.settings={},m||console.error("tpe-amcharts-5-sunburst requires a parent chart!")}ngOnInit(){this.panel=this.service.root.container.children.push(L.m.new(this.service.root,{layout:this.service.root.verticalLayout,height:this.height,width:(0,V.KN)(100)})),this.chart=this.service.addSunburstChart(this.panel,this.settings,b=>{const m=this.colors?.length?this.colors:P.Z.colors.graphs;b.get("colors").set("colors",m.map(T=>(0,Y.yW)(T))),this.setupChart&&this.setupChart(b)}),this.loadData()}ngOnChanges(b){b.data&&this.loadData()}ngOnDestroy(){this.chart=null}ngDoCheck(){this._lastHeight!==this.height&&(this.panel.set("height",this.height),this._lastHeight=this.height)}loadData(){!this.data||!this.chart||this.chart.data.setAll(this.data)}static{this.\u0275fac=function(m){return new(m||w)(f.rXU(X.Q),f.rXU(Z.i,9))}}static{this.\u0275cmp=f.VBU({type:w,selectors:[["tpe-amcharts-5-sunburst"]],inputs:{data:"data",height:"height",settings:"settings",colors:"colors",setupChart:"setupChart"},standalone:!1,features:[f.OA$],decls:1,vars:2,consts:[[1,"spacer"]],template:function(m,T){1&m&&f.nrm(0,"div",0),2&m&&f.xc7("height",T.height,"px")},encapsulation:2})}}return w})()},93147(Gt,ut,y){y.d(ut,{Vn:()=>Y,eF:()=>L,h4:()=>P,ww:()=>V});var L=function(Z){return Z.LINE="line",Z.STEP="step",Z.BAR="bar",Z.BUBBLE="bubble",Z}(L||{}),Y=function(Z){return Z.CATEGORY="category",Z.DATE="date",Z.VALUE="value",Z.NONE="none",Z}(Y||{}),V=function(Z){return Z.CIRCLE="circle",Z.SQUARE="square",Z.HEXAGON="hexagon",Z.TRIANGLE="triangle",Z}(V||{});const P=100},27859(Gt,ut,y){y.d(ut,{v:()=>r});var L=y(63389),m=(y(20562),y(4328),y(86110),y(31904),y(97396),y(24414),y(8245),y(53909),y(19775),y(97408),y(35547)),T=y(85802);let r=(()=>{class g{static{this.\u0275fac=function(p){return new(p||g)}}static{this.\u0275mod=m.$C({type:g})}static{this.\u0275inj=T.G2t({imports:[L.G]})}}return g})()},39608(Gt,ut,y){y.d(ut,{Q:()=>zn});var L=y(45760),Y=y(28268),V=y(93863),P=y(26864);class Z extends V.A{_beforeChanged(){if(super._beforeChanged(),this.isDirty("coordinates")){const t=[],e=this.get("coordinates");e&&P.__(e,i=>{t.push({x:i[0],y:i[1]})}),this.set("points",t)}if(this.isPrivateDirty("points")&&(this._clear=!0),this.isDirty("points")){this._clear=!0;const t=this.get("points"),e=this._prevSettings.points;if(e){if(t){let h=P.C(t),u=P.C(e),v=h.length,E=u.length;if(v>E){let M=P.C(h);for(let O=0;O<v;O++){let I=Math.floor(O/v*E);M[O]={x:u[I].x,y:u[I].y}}u=M}else if(E>v){let M=P.C(u);for(let O=0;O<E;O++){let I=Math.floor(O/E*v);M[O]={x:h[I].x,y:h[I].y}}h=M}this.setPrivateRaw("previousPoints",u),this.setPrivateRaw("points",h),this.morphAnimation=this.animatePrivate({key:"morphProgress",from:0,to:1,duration:this.get("animationDuration",0),easing:this.get("animationEasing")}),this._root.events.once("frameended",()=>{this._markDirtyPrivateKey("morphProgress")})}}else this.setPrivateRaw("previousPoints",t),this.setPrivateRaw("points",t);let i=1/0,s=-1/0,n=1/0,a=-1/0;
1if(t)for(let h=1,u=t.length;h<u;h++){const v=t[h];i=Math.min(i,v.x),s=Math.max(s,v.x),n=Math.min(n,v.y),a=Math.max(a,v.y)}this.setPrivate("minX",i),this.setPrivate("maxX",s),this.setPrivate("minY",n),this.setPrivate("maxY",n)}this.isPrivateDirty("morphProgress")&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._draw()}_draw(){const t=this.getPrivate("previousPoints"),e=this.getPrivate("points"),i=this.getPrivate("morphProgress",1);if(e&&t){const s=e[0],n=t[0];s&&this._display.moveTo(n.x+(s.x-n.x)*i,n.y+(s.y-n.y)*i);for(let a=1,h=e.length;a<h;a++){const u=e[a],v=t[a];this._display.lineTo(v.x+(u.x-v.x)*i,v.y+(u.y-v.y)*i)}this._display.closePath()}}_updateSize(){this.markDirty(),this._clear=!0}}Z.className="Polygon",Z.classNames=V.A.classNames.concat([Z.className]);class X extends V.A{_beforeChanged(){super._beforeChanged(),(this.isDirty("width")||this.isDirty("height")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&!this.get("draw")&&this._draw()}_draw(){const t=this.width(),e=this.height(),i=this._display;i.moveTo(-t/2,e/2),i.lineTo(0,-e/2),i.lineTo(t/2,e/2),i.lineTo(-t/2,e/2),i.closePath()}_updateSize(){this.markDirty(),this._clear=!0}}X.className="Triangle",X.classNames=V.A.classNames.concat([X.className]);var f=y(35937),C=y(92489),w=y(23436),A=y(72294),b=y(7659),m=y(5983),T=y(15953),c=y(21653),r=y(19708);class g extends m.m{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=r.kE(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._settings.background||(this._settings.background=b.T.new(this._root,{themeTags:r.kE(this._settings.themeTags,["main","background"])}))}_makeButton(){return this.children.push(T.$.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:V.A.new(this._root,{themeTags:["icon"]})}))}_makeThumb(){return this.children.push(b.T.new(this._root,{themeTags:["thumb",this.get("orientation")]}))}_handleAnimation(t){t&&this._disposers.push(t.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();const t=this.startGrip,e=this.endGrip,i=this.thumb,s=this.get("background");s&&this._disposers.push(s.events.on("click",n=>{this.setPrivateRaw("isBusy",!0);const a=this._display.toLocal(n.point),h=this.width(),u=this.height(),v=this.get("orientation");let E,M,O;E="vertical"==v?(a.y-i.height()/2)/u:(a.x-i.width()/2)/h,"vertical"==v?(M=E*u,O="y"):(M=E*h,O="x");const I=this.get("animationDuration",0);I>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:O,to:M,duration:I,easing:this.get("animationEasing")}))):(this.thumb.set(O,M),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(i.events.on("dblclick",n=>{if(!r.ay(n.originalEvent,this))return;const a=this.get("animationDuration",0),h=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:h}),this.animate({key:"end",to:1,duration:a,easing:h})})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(i.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(t.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(e.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(i.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(i.events.on("positionchanged",()=>{this._updateGripsByThumb()})),"vertical"==this.get("orientation")?(t.set("x",0),e.set("x",0),this._disposers.push(i.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()-i.height()),0))),this._disposers.push(i.adapters.add("x",n=>this.width()/2)),this._disposers.push(t.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("x",n=>this.width()/2)),this._disposers.push(t.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0))),this._disposers.push(e.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0)))):(t.set("y",0),e.set("y",0),this._disposers.push(i.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()-i.width()),0))),this._disposers.push(i.adapters.add("y",n=>this.height()/2)),this._disposers.push(t.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("y",n=>this.height()/2)),this._disposers.push(t.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))),this._disposers.push(e.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){const t="rangechanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._grip
1Down})}}_released(){const t="released";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}updateGrips(){const t=this.startGrip,e=this.endGrip,i=this.get("orientation"),s=this.height(),n=this.width();"vertical"==i?(t.set("y",s*this.get("start",0)),e.set("y",s*this.get("end",1))):(t.set("x",n*this.get("start",0)),e.set("x",n*this.get("end",1)));const a=this.getPrivate("positionTextFunction"),h=Math.round(100*this.get("start",0)),u=Math.round(100*this.get("end",0));let v,E;a?(v=a.call(this,this.get("start",0)),E=a.call(this,this.get("end",0))):(v=h+"%",E=u+"%"),t.set("ariaLabel",this._t("From %1",void 0,v)),t.set("ariaValueNow",""+h),t.set("ariaValueText",h+"%"),t.set("ariaValueMin","0"),t.set("ariaValueMax","100"),e.set("ariaLabel",this._t("To %1",void 0,E)),e.set("ariaValueNow",""+u),e.set("ariaValueText",u+"%"),e.set("ariaValueMin","0"),e.set("ariaValueMax","100")}_updateThumb(){const t=this.thumb,e=this.startGrip,i=this.endGrip,s=this.height(),n=this.width();let a=e.x(),h=i.x(),u=e.y(),v=i.y(),E=0,M=1;"vertical"==this.get("orientation")?c.Et(u)&&c.Et(v)&&(!this._thumbBusy&&!t.isDragging()&&(t.set("height",v-u),t.set("y",u)),E=u/s,M=v/s):c.Et(a)&&c.Et(h)&&(!this._thumbBusy&&!t.isDragging()&&(t.set("width",h-a),t.set("x",a)),E=a/n,M=h/n),this.getPrivate("isBusy")&&(this.get("start")!=E||this.get("end")!=M)&&(this.set("start",E),this.set("end",M));const O=this.getPrivate("positionTextFunction"),I=Math.round(100*this.get("start",0)),$=Math.round(100*this.get("end",0));let G,F;O?(G=O.call(this,this.get("start",0)),F=O.call(this,this.get("end",0))):(G=I+"%",F=$+"%"),t.set("ariaLabel",this._t("From %1 to %2",void 0,G,F)),t.set("ariaValueNow",""+I),t.set("ariaValueText",I+"%")}_updateGripsByThumb(){const t=this.thumb,e=this.startGrip,i=this.endGrip;if("vertical"==this.get("orientation")){const s=t.height();e.set("y",t.y()),i.set("y",t.y()+s)}else{const s=t.width();e.set("x",t.x()),i.set("x",t.x()+s)}}}g.className="Scrollbar",g.classNames=m.m.classNames.concat([g.className]);var _=y(55265),l=y(16202);class p extends _.wC{constructor(){super(...arguments),this._checkDates=!1,this._checkNumbers=!1,this._checkColors=!1,this._checkEmpty=!1,this._checkDeep=!1}_afterNew(){super._afterNew(),this._checkFeatures(),this.on("dateFields",()=>this._checkFeatures()),this.on("dateFormat",()=>this._checkFeatures()),this.on("numericFields",()=>this._checkFeatures()),this.on("colorFields",()=>this._checkFeatures()),this.on("emptyAs",()=>this._checkFeatures())}_checkFeatures(){(this.isDirty("dateFields")||this.isDirty("dateFormat"))&&(this._checkDates=this.get("dateFields")&&this.get("dateFields").length>0),this.isDirty("numericFields")&&(this._checkNumbers=this.get("numericFields")&&this.get("numericFields").length>0),this.isDirty("colorFields")&&(this._checkColors=this.get("colorFields")&&this.get("colorFields").length>0),this.isDirty("emptyAs")&&(this._checkEmpty=null!=this.get("emptyAs")),this._checkDeepFeatures()}_checkDeepFeatures(){const t=[];P.__(["dateFields","numericFields","colorFields"],e=>{P.__(this.get(e,[]),i=>{const s=i.split(".");for(s.pop();s.length>0;)t.push(s.join(".")),s.pop()})}),this._checkDeep=t.length>0,this.setPrivate("deepFields",t)}processMany(t){c.cy(t)&&(this._checkDates||this._checkNumbers||this._checkColors||this._checkEmpty)&&P.__(t,e=>{this.processRow(e)})}processRow(t,e=""){l.__(t,(i,s)=>{const n=e+i;this._checkEmpty&&(t[i]=this._maybeToEmpty(t[i])),this._checkNumbers&&(t[i]=this._maybeToNumber(n,t[i])),this._checkDates&&(t[i]=this._maybeToDate(n,t[i])),this._checkColors&&(t[i]=this._maybeToColor(n,t[i])),this._checkDeep&&-1!==this.getPrivate("deepFields",[]).indexOf(n)&&c.Gv(t[i])&&this.processRow(t[i],n+".")})}_maybeToNumber(t,e){return-1!==this.get("numericFields").indexOf(t)?c.Ro(e):e}_maybeToDate(t,e){return-1!==this.get("dateFields").indexOf(t)?this._root.dateFormatter.parse(e,this.get("dateFormat","")).getTime():e}_maybeToEmpty(t){return null!=t&&""!=t||null==this.get("emptyAs")?t:this.get("emptyAs")}_maybeToColor(t,e){return-1!==this.get("colorFields").indexOf(t)?A.Q1.fromAny(e):e}}var S=y(88327),R=y(59460),W=y(88251);
1class j extends _.wC{_afterNew(){super._afterNewApplyThemes()}_beforeChanged(){if(super._beforeChanged(),this.isDirty("sprite")){const t=this.get("sprite");t&&(t.setAll({position:"absolute",role:"figure"}),this._disposers.push(t))}(this.isDirty("locationX")||this.isDirty("locationY"))&&this.series&&this.series._positionBullet(this)}}j.className="Bullet",j.classNames=_.wC.classNames.concat([j.className]);class z extends m.m{constructor(){super(...arguments),this.chartContainer=this.children.push(m.m.new(this._root,{width:L.Q2,height:L.Q2,interactiveChildren:!1})),this.bulletsContainer=m.m.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:L.Q2,height:L.Q2})}}z.className="Chart",z.classNames=m.m.classNames.concat([z.className]);var U=y(34521);class nt extends z{constructor(){super(...arguments),this.seriesContainer=m.m.new(this._root,{width:L.Q2,height:L.Q2,isMeasured:!1}),this.series=new U.fo}_afterNew(){super._afterNew(),this._disposers.push(this.series);const t=this.seriesContainer.children;this._disposers.push(this.series.events.onAll(e=>{if("clear"===e.type){P.__(e.oldValues,n=>{this._removeSeries(n)});const i=this.get("colors");i&&i.reset();const s=this.get("patterns");s&&s.reset()}else if("push"===e.type)t.moveValue(e.newValue),this._processSeries(e.newValue);else if("setIndex"===e.type)t.setIndex(e.index,e.newValue),this._processSeries(e.newValue);else if("insertIndex"===e.type)t.insertIndex(e.index,e.newValue),this._processSeries(e.newValue);else if("removeIndex"===e.type)this._removeSeries(e.oldValue);else if("moveIndex"===e.type)t.moveValue(e.value,e.newIndex),this._processSeries(e.value);else{if("swap"!==e.type)throw new Error("Unknown IListEvent type");{const i=e.a,s=e.b,n=this.series.indexOf(i),a=this.series.indexOf(s);t.moveValue(i,a),t.moveValue(s,n),this.series.each(h=>{this._processSeries(h),h.markDirtyValues()})}}}))}_processSeries(t){t.chart=this,t._placeBulletsContainer(this)}_removeSeries(t){t._handleRemoved(),t.isDisposed()||(this.seriesContainer.children.removeValue(t),t._removeBulletsContainer())}}nt.className="SerialChart",nt.classNames=z.classNames.concat([nt.className]);var it=y(96485);class gt extends _.wC{_afterNew(){super._afterNewApplyThemes(),this._dirty.colors=!1}_beforeChanged(){this.isDirty("colors")&&this.reset()}generateColors(){this.setPrivate("currentPass",this.getPrivate("currentPass",0)+1);const t=this.getPrivate("currentPass"),e=this.get("colors",[this.get("baseColor",A.Q1.fromHex(16711680))]);this.getPrivate("numColors")||this.setPrivate("numColors",e.length);const i=this.getPrivate("numColors"),n=this.get("passOptions"),a=this.get("reuse");for(let h=0;h<i;h++)if(a)e.push(e[h]);else{const u=e[h].toHSL();let v=u.h+(n.hue||0)*t;for(;v>1;)v-=1;let E=u.s+(n.saturation||0)*t;E>1&&(E=1),E<0&&(E=0);let M=u.l+(n.lightness||0)*t;for(;M>1;)M-=1;e.push(A.Q1.fromHSL(v,E,M))}}getIndex(t){const e=this.get("colors",[]),i=this.get("saturation");return t>=e.length?(this.generateColors(),this.getIndex(t)):null!=i?A.Q1.saturate(e[t],i):e[t]}next(){let t=this.getPrivate("currentStep",this.get("startIndex",0));return this.setPrivate("currentStep",t+this.get("step",1)),this.getIndex(t)}reset(){this.setPrivate("currentStep",this.get("startIndex",0)),this.setPrivate("currentPass",0)}}gt.className="ColorSet",gt.classNames=_.wC.classNames.concat([gt.className]);var N=y(49203);class tt extends it.S{setupDefaultRules(){super.setupDefaultRules();const t=this._root.interfaceColors,e=this.rule.bind(this);e("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:gt.new(this._root,{}),width:L.Q2,height:L.Q2}),e("PieChart").setAll({radius:(0,L.KN)(80),startAngle:-90,endAngle:270}),e("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),e("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),e("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),e("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),e("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),e("Slice",["pie"]).states.create("hover",{scale:1.04}),e("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),e("Tick",["pie"]).setAll({location:1}),e("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),e("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),e("FunnelSlice").setAll({interactive:!0,expandDistance:0}),e("FunnelSlice").states.create("hover",{expandDistance:.15}),e("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:L.yP}),e("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:L.yP,rotation:-90}),e("Label",["funnel","vertical"]).setAll({centerY:L.yP,centerX:0}),e("Tick",["funnel"]).setAll({location:1}),e("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),e("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),e("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),e("PyramidSeries").setAll({valueIs:"area"}),e("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),e("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),e("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),e("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),e("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),e("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:L.yP}),e("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:L.yP,rotation:-90}),e("Label",["pyramid","vertical"]).setAll({centerY:L.yP,centerX:0}),e("Tick",["pyramid"]).setAll({location:1}),e("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),e("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:L.yP}),e("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:L.yP,rotation:-90}),e("Label",["pictorial","vertical"]).setAll({centerY:L.yP,centerX:0}),e("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),e("Tick",["pictorial"]).setAll({location:.5});{const i=e("Graphics",["pictorial","background"]);i.setAll({fillOpacity:.2}
1),(0,N.w)(i,"fill",t,"alternativeBackground")}}}class J extends nt{_afterNew(){this._defaultThemes.push(tt.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(t){super._processSeries(t),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}}J.className="PercentChart",J.classNames=nt.classNames.concat([J.className]);var at=y(30903);class vt extends J{constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:L.yP,y:L.yP})}_prepareChildren(){super._prepareChildren();const t=this.chartContainer,e=t.innerWidth(),i=t.innerHeight(),s=this.get("startAngle",0),n=this.get("endAngle",0),a=this.get("innerRadius");let h=at.Ki(0,0,s,n,1);const u=e/(h.right-h.left),v=i/(h.bottom-h.top);let E={left:0,right:0,top:0,bottom:0};if(a instanceof L.QE){let I=a.value,$=Math.min(u,v);I=Math.max($*I,$-Math.min(i,e))/$,E=at.Ki(0,0,s,n,I),this.setPrivateRaw("irModifyer",I/a.value)}h=at._Z([h,E]);const M=this._maxRadius;this._maxRadius=Math.min(u,v);const O=r.JY(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-O*(h.bottom+h.top)/2,dx:-O*(h.right+h.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||M!=this._maxRadius)&&this.series.each(I=>{I._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(I=>{I._markDirtyKey("innerRadius")})}radius(t){let e=r.JY(this.get("radius",0),this._maxRadius),i=r.JY(this.get("innerRadius",0),e);if(t){let s=this.series.indexOf(t),n=this.series.length,a=t.get("radius");return null!=a?i+r.JY(a,e-i):i+(e-i)/n*(s+1)}return e}innerRadius(t){const e=this.radius();let i=r.JY(this.get("innerRadius",0),e);if(i<0&&(i=e+i),t){let s=this.series.indexOf(t),n=this.series.length,a=t.get("innerRadius");return null!=a?i+r.JY(a,e-i):i+(e-i)/n*s}return i}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}}vt.className="PieChart",vt.classNames=J.classNames.concat([vt.className]);var dt=y(31635),Dt=y(2711);class yt extends it.S{setupDefaultRules(){super.setupDefaultRules();const t=this._root.interfaceColors,e=this.rule.bind(this);e("Flow").setAll({width:L.Q2,height:L.Q2,paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,hiddenSize:.05,minSize:0,minHiddenValue:0}),e("FlowNodes").setAll({colors:gt.new(this._root,{}),legendLabelText:"{name}",legendValueText:"{sumOutgoing.formatNumber('#.#')}"}),e("FlowNode").setAll({setStateOnChildren:!0,cursorOverStyle:"pointer",toggleKey:"disabled"}),e("FlowNode").states.create("disabled",{}),e("FlowNode",["unknown"]).setAll({draggable:!1,opacity:0}),e("Label",["flow"]).states.create("disabled",{fill:t.get("disabled")}),e("RadialLabel",["flow","node"]).setAll({text:"{name}",populateText:!0}),e("FlowLink").setAll({fillStyle:"gradient",strokeStyle:"gradient"}),e("FlowLink",["source","unknown"]).setAll({}),e("FlowLink",["target","unknown"]).setAll({}),e("FlowNode").events.on("pointerover",i=>{const s=i.target.dataItem;if(s){const a=s.get("outgoingLinks");a&&P.__(a,u=>{const v=u.get("link");v.hover(),v.hideTooltip()});const h=s.get("incomingLinks");h&&P.__(h,u=>{const v=u.get("link");v.hover(),v.hideTooltip()})}let n=s.get("slice")||s.get("rectangle");n&&n.get("tooltipText")&&n.showTooltip()}),e("FlowNode").events.on("pointerout",i=>{const s=i.target.dataItem;if(s){const n=s.get("outgoingLinks");n&&P.__(n,h=>{h.get("link").unhover()});const a=s.get("incomingLinks");a&&P.__(a,h=>{h.get("link").unhover()})}}),e("Sankey").setAll({orientation:"horizontal",nodeAlign:"justify",linkTension:.5,nodePadding:10,nodeWidth:10}),e("RoundedRectangle",["sankey","node","shape"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,
1cornerRadiusTR:0,cornerRadiusBR:0}),e("RoundedRectangle",["shape"]).states.create("disabled",{fill:t.get("disabled")}),e("SankeyLink").setAll({controlPointDistance:.2}),e("FlowNode",["sankey"]).setAll({draggable:!0});{const i=e("Graphics",["sankey","link"]);i.setAll({fillOpacity:.2,strokeOpacity:0,interactive:!0,tooltipText:"{sourceId} - {targetId}: {value}"}),(0,N.w)(i,"fill",t,"grid")}e("Graphics",["sankey","link"]).states.create("hover",{fillOpacity:.5}),e("Label",["sankey","node"]).setAll({text:"{name}",populateText:!0}),e("Label",["sankey","horizontal"]).setAll({y:L.yP,centerY:L.yP,paddingLeft:15}),e("Label",["sankey","vertical"]).setAll({x:L.yP,centerX:L.yP,paddingTop:15}),e("Chord").setAll({radius:(0,L.KN)(90),nodeWidth:10,padAngle:1,startAngle:0,sort:"none"}),e("ChordDirected").setAll({linkHeadRadius:10}),e("ChordNodes").setAll({x:L.yP,y:L.yP}),e("FlowNode",["chord"]).setAll({draggable:!0}),e("ChordLink").setAll({sourceRadius:L.Q2,targetRadius:L.Q2,fillStyle:"solid",strokeStyle:"solid",tooltipText:"{sourceId} - {targetId}: {value}"}),e("Slice",["chord","node","shape"]).setAll({cornerRadius:0}),e("Slice",["shape"]).states.create("disabled",{fill:t.get("disabled")}),e("RadialLabel",["chord","node"]).setAll({radius:5,textType:"circular"}),e("ChordLinkDirected").setAll({headRadius:10});{const i=e("Graphics",["chord","link","shape"]);i.setAll({fillOpacity:.2,strokeOpacity:0,interactive:!0}),(0,N.w)(i,"fill",t,"grid"),(0,N.w)(i,"stroke",t,"grid")}e("Graphics",["chord","link","shape"]).states.create("hover",{fillOpacity:.5}),e("ChordNonRibbon").setAll({linkType:"curve"}),e("ChordLink",["basic"]).setAll({fillStyle:"none",strokeStyle:"source"}),e("Graphics",["chord","link","shape","basic"]).setAll({strokeOpacity:.4}),e("Graphics",["chord","link","shape","basic"]).states.create("hover",{strokeWidth:2,strokeOpacity:1}),e("ArcDiagram").setAll({orientation:"horizontal",nodePadding:5,minRadius:5,radiusKey:"sum",animationEasing:Dt.FD(Dt.tA)}),e("ArcDiagramNodes",["horizontal"]).setAll({y:L.Q2,centerY:L.Q2}),e("ArcDiagramNodes",["vertical"]).setAll({centerX:0}),e("Circle",["arcdiagram","node","shape"]).setAll({tooltipText:"{name}: {sum}"}),e("Circle",["arcdiagram","node","shape"]).states.create("disabled",{fill:t.get("disabled")});{const i=e("ArcDiagramLink",["link","shape"]);i.setAll({strokeOpacity:.15,strokeStyle:"solid",fillStyle:"none",isMeasured:!1}),(0,N.w)(i,"stroke",t,"grid")}e("ArcDiagramLink",["link","shape"]).states.create("hover",{strokeOpacity:1}),e("Label",["arcdiagram","node"]).setAll({text:"{name}",populateText:!0}),e("Label",["arcdiagram","horizontal"]).setAll({y:0,centerY:L.yP,centerX:L.Q2,rotation:-90}),e("Label",["arcdiagram","vertical"]).setAll({centerY:L.yP,centerX:L.Q2,paddingRight:15})}}var pt=y(97188);class Pt extends _.wC{_afterNew(){super._afterNewApplyThemes()}getFill(t){return{addColorStop:(e,i)=>{}}}_changed(){super._changed()}getBounds(t){const e=this.get("target");if(e){let i=e.globalBounds();const s=t.toLocal({x:i.left,y:i.top}),n=t.toLocal({x:i.right,y:i.top}),a=t.toLocal({x:i.right,y:i.bottom}),h=t.toLocal({x:i.left,y:i.bottom});return{left:Math.min(s.x,n.x,a.x,h.x),top:Math.min(s.y,n.y,a.y,h.y),right:Math.max(s.x,n.x,a.x,h.x),bottom:Math.max(s.y,n.y,a.y,h.y)}}return t._display.getLocalBounds()}}Pt.className="Gradient",Pt.classNames=_.wC.classNames.concat([Pt.className]);class Rt extends Pt{getFill(t){const e=this.get("rotation",0);let i=this.getBounds(t),s=i.left||0,n=i.right||0,a=i.top||0,h=i.bottom||0,u=at.gn(e),v=at.F8(e),E=u*(n-s),M=v*(h-a);0==E&&(E=1),0==M&&(M=1);let O=Math.max(E,M);const I=this._root._renderer.createLinearGradient(s,a,s+O*u,a+O*v),$=this.get("stops");if($){let G=0;P.__($,F=>{let Q=F.offset;c.Et(Q)||(Q=G/($.length-1));let q=F.opacity;c.Et(q)||(q=1);let et=F.color;if(et){const ot=F.lighten;ot&&(et=A.Q1.lighten(et,ot));const ft=F.brighten;ft&&(et=A.Q1.brighten(et,ft)),I.addColorStop(Q,"rgba("+et.r+","+et.g+","+et.b+","+q+")")}G++})}return I}}Rt.className="LinearGradient",Rt.classNames=Pt.classNames.concat([Rt.className]);class Tt extends pt.s{constructor(){super(...arguments),this.linksContainer=this.children.push(m.m.new(this._root,{})),this._nodesData=[],this._linksData=[],this._index=0,this._nodesDataSet=!1,this._linksByIndex={}}_afterNew(){this._defaultThemes.push(yt.new(this._root)),this.fields.push("disabled","sourceId","targetId"),this.nodes&&(this.nodes.flow=this),super._afterNew(),this.children.push(this.bulletsContainer)}processDataItem(t){super.processDataItem(t);const e=this.nodes;if(e){let i=!1,s=t.get("sourceId"),n=e.getDataItemById(s);n||(null==s&&(s="undefined"+this._index,this._index++,i=!0),e.data.push({id:s,unknown:i}),n=e.getDataItemById(s),i||n.set("name",s)),i=!1;let a=t.get("targetId"),h=e.getDataItemById(a);h||(null==a&&(a="undefined"+this._index,this._index++,i=!0),e.data.push({id:a,unknown:i}),h=e.getDataItemById(a),i||h.set("name",a)),n&&(t.set("source",n),e.addOutgoingLink(n,t)),h&&(t.set("target",h),e.addincomingLink(h,t)),t.set("link",this.makeLink(t));const u=this.nodes.dataItems.indexOf(n),v=this.nodes.dataItems.indexOf(h);this._linksByIndex[u+"_"+v]=t,n.get("unknown")&&(h&&n.set("fill",h.get("fill")),t.get("link").set("fillStyle","gradient")),h.get("unknown")&&(n&&h.set("fill",n.get("fill")),t.get("link").set("fillStyle","gradient")),this._updateLinkColor(t)}}_onDataClear(){this.nodes._userDataSet||(this.nodes.data.setAll([]),this.nodes._userDataSet=!1)}_prepareChildren(){super._prepareChildren();let t=1/0,e=-1/0,i=0;
1if(this._valuesDirty){this._nodesData=[];const s=this.nodes;s&&P.__(s.dataItems,n=>{const a=n.get("d3SankeyNode");this._nodesData.push(a);const h=n.get("incomingLinks");let u=0,v=0;h&&P.__(h,I=>{const $=I.get("value"),G=I.get("valueWorking");u+=$,v+=G}),n.set("sumIncoming",u),n.set("sumIncomingWorking",v);const E=n.get("outgoingLinks");let M=0,O=0;E&&P.__(E,I=>{const $=I.get("value"),G=I.get("valueWorking");M+=$,O+=G}),n.set("sumOutgoing",M),n.set("sumOutgoingWorking",O),n.set("sum",u+M),n.set("sumWorking",v+O),s.updateLegendValue(n)}),this._linksData=[],P.__(this.dataItems,n=>{let a=n.get("value");c.Et(a)&&(a<t&&(t=a),a>e&&(e=a),i+=a)}),P.__(this.dataItems,n=>{let a=n.get("value");if(c.Et(a)){let h=n.get("valueWorking"),u=this.get("minSize",0);u>0&&h<u*i&&(h=u*i);let v={source:n.get("source").get("d3SankeyNode"),target:n.get("target").get("d3SankeyNode"),value:h};n.setRaw("d3SankeyLink",v),this._linksData.push(v),this.updateLegendValue(n)}}),this.setPrivateRaw("valueHigh",e),this.setPrivateRaw("valueLow",t),this.setPrivateRaw("valueSum",i)}}_updateLinkColor(t){const e=t.get("link"),i=e.get("fillStyle"),s=e.get("strokeStyle"),n=t.get("source"),a=t.get("target"),h=n.get("fill"),u=a.get("fill");switch(e.remove("fillGradient"),e.remove("strokeGradient"),i){case"solid":e._applyTemplates();break;case"source":e.set("fill",h);break;case"target":e.set("fill",u);break;case"gradient":let v=e._fillGradient;v||(v=Rt.new(this._root,{}));const E={color:h};n.get("unknown")&&(E.opacity=0);const M={color:u};a.get("unknown")&&(M.opacity=0),v.set("stops",[E,M]),e._fillGradient=v,e.set("fillGradient",v);break;case"none":e.set("fill",void 0)}switch(s){case"solid":e._applyTemplates();break;case"source":e.set("stroke",h);break;case"target":e.set("stroke",u);break;case"gradient":let v=e._strokeGradient;if(!v){v=Rt.new(this._root,{});const E={color:h};n.get("unknown")&&(E.opacity=0);const M={color:u};a.get("unknown")&&(M.opacity=0),v.set("stops",[E,M]),e._strokeGradient=v}e.set("strokeGradient",v);break;case"none":e.remove("stroke")}}disposeDataItem(t){super.disposeDataItem(t);let e=t.get("link");e&&(this.links.removeValue(e),e.dispose())}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],n=this.states.create("hidden",{}),a="stateAnimationDuration",h="stateAnimationEasing";c.Et(e)||(e=n.get(a,this.get(a,0)));const u=n.get(h,this.get(h));s.push(t.animate({key:"valueWorking",to:Math.max(this.get("minHiddenValue",0),this.get("hiddenSize",0)*t.get("value")),duration:e,easing:u}).waitForStop()),t.get("link").hide(),yield Promise.all(s)})}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)];c.Et(e)||(e=this.get("stateAnimationDuration",0));const n=this.get("stateAnimationEasing");s.push(t.animate({key:"valueWorking",to:t.get("value"),duration:e,easing:n}).waitForStop()),t.get("link").show(),yield Promise.all(s)})}_positionBullet(t){const e=t.get("sprite");if(e){const i=e.dataItem;if(i){const s=i.get("link"),n=t.get("sprite");if(n){const a=s.getPoint(this._getBulletLocation(t));n.setAll({x:a.x,y:a.y}),t.get("autoRotate")&&n.set("rotation",a.angle+t.get("autoRotateAngle",0))}}}}_getBulletLocation(t){return t.get("locationY",0)}}Tt.className="Flow",Tt.classNames=pt.s.classNames.concat([Tt.className]);var Ct=y(79691);class rt extends m.m{}rt.className="FlowNode",rt.classNames=m.m.classNames.concat([rt.className]);class Xt extends pt.s{constructor(){super(...arguments),this.labels=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>W.J._new(this._root,{themeTags:["flow"]},[this.labels.template]))),this.nodes=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>rt._new(this._root,{themeTags:["node"]},[this.nodes.template]))),this._userDataSet=!1}_applyThemes(t=!1){const e=this.get("colors");return e&&e.reset(),super._applyThemes(t)}_afterNew(){this.fields.push("unknown","name","fill"),this.set("idField","id"),this.set("nameField","id"),this.set("fillField","fill"),this.set("unknownField","unknown"),this.children.push(this.bulletsContainer),super._afterNew()}_onDataClear(){const t=this.get("colors");t&&t.reset();const e=this.get("patterns");e&&e.reset(),this._userDataSet=!0}processDataItem(t){if(super.processDataItem(t),t.setRaw("d3SankeyNode",{name:t.get("id"),dataItem:t}),null==t.get("fill")){let s=this.get("colors");s&&t.setRaw("fill",s.next())}if(null==t.get("fillPattern")){let s=this.get("patterns");s&&t.setRaw("fillPattern",s.next())}const e=this.makeNode(t);t.setRaw("node",e);const i=this.get("disabledField");if(i){const s=t.dataContext;s&&s[i]&&this.root.events.once("frameended",()=>{this.disableDataItem(t,0)})}}makeNode(t,e){const i=this.nodes.make();return this.nodes.push(i),e&&i.addTag(e),t.get("unknown")&&i.addTag("unknown"),this.children.push(i),i._setDataItem(t),i.series=this,i.events.on("click",
1s=>{const n=s.target;if("disabled"==n.get("toggleKey")){const a=n.dataItem;a&&(a.isHidden()?this.enableDataItem(a):this.disableDataItem(a))}}),t.on("fill",()=>{this._updateNodeColor(t)}),t.on("fillPattern",()=>{this._updateNodeColor(t)}),t.set("node",i),i}_updateNodeColor(t){}disposeDataItem(t){super.disposeDataItem(t);let e=t.get("node");e&&(this.nodes.removeValue(e),e.dispose());let i=t.get("label");i&&(this.labels.removeValue(i),i.dispose())}addincomingLink(t,e){let i=t.get("incomingLinks");i||(i=[],t.set("incomingLinks",i)),i.push(e)}addOutgoingLink(t,e){let i=t.get("outgoingLinks");i||(i=[],t.set("outgoingLinks",i)),i.push(e)}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)],n=this.flow;if(n){const a=t.get("node");a&&a.show();let h=t.get("label");h&&h.show(e);let u=t.get("outgoingLinks");u&&P.__(u,v=>{n.showDataItem(v,e)}),u=t.get("incomingLinks"),u&&P.__(u,v=>{n.showDataItem(v,e)})}yield s})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],n=this.flow;if(n){const a=t.get("node");a&&a.hide();let h=t.get("label");h&&h.hide(e);let u=t.get("outgoingLinks");u&&P.__(u,v=>{n.hideDataItem(v,e)}),u=t.get("incomingLinks"),u&&P.__(u,v=>{n.hideDataItem(v,e)})}yield s})}enableDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)],n=this.flow;if(n){const a=t.get("node");a&&this.root.events.once("frameended",()=>{a.set("disabled",!1)});let h=t.get("label");h&&h.set("disabled",!1);let u=t.get("outgoingLinks");u&&P.__(u,v=>{n.showDataItem(v,e)}),u=t.get("incomingLinks"),u&&P.__(u,v=>{n.showDataItem(v,e)})}yield s})}disableDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],n=this.flow;if(n){const a=t.get("node");a&&this.root.events.once("frameended",()=>{a.set("disabled",!0)});let h=t.get("label");h&&h.set("disabled",!0);let u=t.get("outgoingLinks");u&&P.__(u,v=>{n.hideDataItem(v,e)}),u=t.get("incomingLinks"),u&&P.__(u,v=>{n.hideDataItem(v,e)})}yield s})}}Xt.className="FlowNodes",Xt.classNames=pt.s.classNames.concat([Xt.className]);class Ht extends Xt{constructor(){super(...arguments),this.rectangles=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>b.T._new(this._root,{themeTags:["shape"]},[this.rectangles.template])))}makeNode(t){const e=this.flow,i=super.makeNode(t,"sankey"),s=i.children.insertIndex(0,this.rectangles.make());this.rectangles.push(s),s._setSoft("fill",t.get("fill")),s._setSoft("fillPattern",t.get("fillPattern")),t.set("rectangle",s),i.events.on("dragged",()=>{const a=i.dataItem.get("d3SankeyNode");a&&e&&("horizontal"==e.get("orientation")?(a.x0=i.x(),a.y0=i.y()):(a.x0=i.y(),a.y0=i.x()),e.updateSankey())});const n=this.labels.make();return this.labels.push(n),e&&n.addTag(e.get("orientation","")),i.children.push(n),t.set("label",n),n._setDataItem(t),s._setDataItem(t),i}_positionBullet(t){const e=t.get("sprite");if(e){const i=e.dataItem;if(i){const s=t.get("sprite");if(s){const n=i.get("rectangle"),a=i.get("node"),h=t.get("locationX",.5),u=t.get("locationY",.5);n&&s.setAll({x:a.x()+n.width()*h,y:a.y()+n.height()*u})}}}}disposeDataItem(t){super.disposeDataItem(t);let e=t.get("rectangle");e&&(this.rectangles.removeValue(e),e.dispose())}_updateNodeColor(t){const e=t.get("rectangle");e&&(e.set("fill",t.get("fill")),e.set("fillPattern",t.get("fillPattern")))}}Ht.className="SankeyNodes",Ht.classNames=Xt.classNames.concat([Ht.className]);class oe extends V.A{_changed(){if(super._changed(),this.isDirty("fillStyle")){const t=this.series,e=this.dataItem;t&&e&&t._updateLinkColor(e)}}_getTooltipPoint(){let t=this.get("tooltipY"),e=.5;return t instanceof L.QE&&(e=t.value),this.getPoint(e)}}oe.className="FlowLink",oe.classNames=V.A.classNames.concat([oe.className]);class ge extends oe{constructor(){super(...arguments),this._svgPath=document.createElementNS("http://www.w3.org/2000/svg","path"),this._totalLength=0}_beforeChanged(){if(super._beforeChanged(),this.isDirty("source")){const n=this.get("source");if(n){const a=n.get("node");this._disposers.push(a.events.on("positionchanged",()=>{this.markDirty()}))}}if(this.isDirty("target")){const n=this.get("target");if(n){const a=n.get("node");this._disposers.push(a.events.on("positionchanged",()=>{this.markDirty()}))}}if(this.isPrivateDirty("orientation")){const n=this.series,a=this.dataItem;a&&n&&n._updateLinkColor(a)}const t=this.get("target"),e=this.get("source");let i,s;if(e&&t){this._clear=!0,i=e.get("node"),s=t.get("node");let n=0,a=0,h=0,u=0,v=0,E=0,M=0,O=0,I=0,$=0,G=0,F=0,Q=0,q=0,et=0,ot=0,ft=0,wt=0;const Ot=this.dataItem;if(Ot){const Et=Ot.get("d3SankeyLink");if(Et){let At=Et.width||0,Ft=this.getPrivate("orientation");"vertical"==Ft?(i&&(h=i.y()+i.get("dy",0)),s&&(u=s.y()+s.get("dy",0)),ft=90,wt=90,n=Et.y0||
10,a=Et.y1||0,n+=i.get("dx",0),a+=s.get("dx",0),u<h&&([n,a]=[a,n],[h,u]=[u,h]),e.get("unknown")&&(n=a,h+=(u-h)/2),t.get("unknown")&&(a=n,u=h+(u-h)/2),v=n-At/2,E=h,M=a-At/2,O=u,I=n+At/2,$=a+At/2,G=h,F=u,Q=n,q=a,et=h,ot=u):(i&&(n=i.x()+i.get("dx",0)),s&&(a=s.x()+s.get("dx",0)),h=Et.y0||0,u=Et.y1||0,h+=i.get("dy",0),u+=s.get("dy",0),a<n&&([n,a]=[a,n],[h,u]=[u,h]),e.get("unknown")&&(h=u,n+=(a-n)/2),t.get("unknown")&&(u=h,a=n+(a-n)/2),v=n,E=h-At/2,M=a,O=u-At/2,I=n,$=a,G=h+At/2,F=u+At/2,Q=n,q=a,et=h,ot=u),at.LI(v,3)==at.LI(M,3)&&(M+=.01),at.LI(E,3)==at.LI(O,3)&&(O+=.01),at.LI(I,3)==at.LI($,3)&&($+=.01),at.LI(G,3)==at.LI(F,3)&&(F+=.01);let Vt=this.get("controlPointDistance",.2);Vt=Math.min(.4999,Vt);let te=v+(M-v)*Vt*at.gn(ft),Zt=E+(O-E)*Vt*at.F8(ft),ie=M-(M-v)*Vt*at.gn(wt),Lt=O-(O-E)*Vt*at.F8(wt),zt=Q+(q-Q)*Vt*at.gn(ft),Kt=et+(ot-et)*Vt*at.F8(ft),Yt=q-(q-Q)*Vt*at.gn(wt),Nt=ot-(ot-et)*Vt*at.F8(wt),Wt=at._H({x:te,y:Zt},{x:ie,y:Lt}),pe=(At/at.gn(Wt)-At)/at.Ml(Wt)*at.gn(ft),Ne=(At/at.F8(Wt)-At)*at.Ml(Wt)*at.F8(ft),Re=-pe/2+I+($-I)*Vt*at.gn(ft),Ke=-Ne/2+G+(F-G)*Vt*at.F8(ft),$e=-pe/2+$-($-I)*Vt*at.gn(wt),Oe=-Ne/2+F-(F-G)*Vt*at.F8(wt);te+=pe/2,Zt+=Ne/2,ie+=pe/2,Lt+=Ne/2,"vertical"==Ft?(Zt=Math.min(O,Math.max(E+1,Zt)),Ke=Math.min(F,Math.max(G+1,Ke)),Lt=Math.max(E,Math.min(O-1,Lt)),Oe=Math.max(G,Math.min(F-1,Oe))):(te=Math.min(M,Math.max(v+1,te)),Re=Math.min($,Math.max(I+1,Re)),ie=Math.max(v,Math.min(M-1,ie)),$e=Math.max(I,Math.min($-1,$e)));let je=[[v,E,I,G],[te,Zt,Re,Ke],[ie,Lt,$e,Oe],[M,O,$,F]];this.set("draw",Is=>{const ai=this.series;ai._fillGenerator.context(Is),ai._fillGenerator(je)});const ye=this.series._strokeGenerator([[Q,et],[zt,Kt],[Yt,Nt],[q,ot]]);ye&&(this._svgPath.setAttribute("d",ye),this._totalLength=this._svgPath.getTotalLength())}}}this.series&&this.dataItem&&this.series._positionBullets(this.dataItem)}getPoint(t){if(this._svgPath&&this._svgPath.getAttribute("d")){let e=this._svgPath.getPointAtLength(t*this._totalLength-.1),i=this._svgPath.getPointAtLength(t*this._totalLength+.1),s=this.toGlobal(this._svgPath.getPointAtLength(t*this._totalLength));return{x:s.x,y:s.y,angle:at._H(e,i)}}return{x:0,y:0,angle:0}}_getTooltipPoint(){return this.toLocal(super._getTooltipPoint())}}function ce(x){return"object"==typeof x&&"length"in x?x:Array.from(x)}ge.className="SankeyLink",ge.classNames=oe.classNames.concat([ge.className]);var de=y(71859);function Ae(x){this._context=x}function Ie(x){return new Ae(x)}Ae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(x,t){switch(x=+x,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(x,t):this._context.moveTo(x,t);break;case 1:this._point=2;default:this._context.lineTo(x,t)}}};var ke=y(96586);function Fe(x){return x[0]}function Be(x){return x[1]}function Pe(x,t){var e=(0,de.A)(!0),i=null,s=Ie,n=null,a=(0,ke.i)(h);function h(u){var v,M,I,E=(u=ce(u)).length,O=!1;for(null==i&&(n=s(I=a())),v=0;v<=E;++v)!(v<E&&e(M=u[v],v,u))===O&&((O=!O)?n.lineStart():n.lineEnd()),O&&n.point(+x(M,v,u),+t(M,v,u));if(I)return n=null,I+""||null}return x="function"==typeof x?x:void 0===x?Fe:(0,de.A)(x),t="function"==typeof t?t:void 0===t?Be:(0,de.A)(t),h.x=function(u){return arguments.length?(x="function"==typeof u?u:(0,de.A)(+u),h):x},h.y=function(u){return arguments.length?(t="function"==typeof u?u:(0,de.A)(+u),h):t},h.defined=function(u){return arguments.length?(e="function"==typeof u?u:(0,de.A)(!!u),h):e},h.curve=function(u){return arguments.length?(s=u,null!=i&&(n=s(i)),h):s},h.context=function(u){return arguments.length?(null==u?i=n=null:n=s(i=u),h):i},h}function we(x,t,e){var i=null,s=(0,de.A)(!0),n=null,a=Ie,h=null,u=(0,ke.i)(v);function v(M){var O,I,$,F,q,G=(M=ce(M)).length,Q=!1,et=new Array(G),ot=new Array(G);for(null==n&&(h=a(q=u())),O=0;O<=G;++O){if(!(O<G&&s(F=M[O],O,M))===Q)if(Q=!Q)I=O,h.areaStart(),h.lineStart();else{for(h.lineEnd(),h.lineStart(),$=O-1;$>=I;--$)h.point(et[$],ot[$]);h.lineEnd(),h.areaEnd()}Q&&(et[O]=+x(F,O,M),ot[O]=+t(F,O,M),h.point(i?+i(F,O,M):et[O],e?+e(F,O,M):ot[O]))}if(q)return h=null,q+""||null}function E(){return Pe().defined(s).curve(a).context(n)}return x="function"==typeof x?x:void 0===x?Fe:(0,de.A)(+x),t="function"==typeof t?t:(0,de.A)(void 0===t?0:+t),e="function"==typeof e?e:void 0===e?Be:(0,de.A)(+e),v.x=function(M){return arguments.length?(x="function"==typeof M?M:(0,de.A)(+M),i=null,v):x},v.x0=function(M){return arguments.length?(x="function"==typeof M?M:(0,de.A)(+M),v):x},v.x1=function(M){return arguments.length?(i=null==M?null:"function"==typeof M?M:(0,de.A)(+M),v):i},v.y=function(M){return arguments.length?(t="function"==typeof M?M:(0,de.A)(+M),e=null,v):t},v.y0=function(M){return arguments.length?(t="function"==typeof M?M:(0,de.A)(+M),v):t},v.y1=function(M){return arguments.length?(e=null==M?null:"function"==typeof M?M:(0,de.A)(+M),v):e},v.lineX0=v.lineY0=function(){return E().x(x).y(t)},v.lineY1=function(){return E().x(x).y(e)},v.lineX1=function(){return E().x(i).y(t)},v.defined=function(M){return arguments.length?(s="function"==typeof M?M:(0,de.A)(!!M),v):s},v.curve=function(M){return arguments.length?(a=M,null!=n&&(h=a(n)),v):a},v.context=function(M){return arguments.length?(null==M?n=h=null:h=a(n=M),v):n},v}class Se{constructor(t,e){this._line=0,this._point=0,this._x0=0,this._x1=0,this._y0=0,this._y1=0,this._t0=0,this._tension=0,this._context=t,this._tension=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0}lineEnd(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ye(this,this._t0,me(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){let i=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ye(this,me(this,i=ue(this,t,e)),i);break;default:Ye(this,this._t0,i=ue(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}}function se(x){return function t(e){return new Se(e,x)}}function le(x){return x<0?-1:1}function ue(x,t,e){let i=x._x1-x._x0,s=t-x._x1,n=(x._y1-x._y0)/(i||s<0&&-0),a=(e-x._y1)/(s||i<0&&-0),h=(n*s+a*i)/(i+s);return(le(n)+le(a))*Math.min(Math.abs(n),Math.abs(a),.5*Math.abs(h))||0}function me(x,t){let e=x._x1-x._x0;return e?(3*(x._y1-x._y0)/e-t)/2:t}function Ye(x,t,e){let i=x._x0,n=x._x1,a=x._y1,h=(n-i)/1.5*(1-x._tension);x._context.bezierCurveTo(i+h,x._y0+h*t,n-h,a-h*e,n,a)}class Xe{constructor(t,e){this._line=0,this._point=0,this._x0=0,this._x1=0,this._y0=0,this._y1=0,this._t0=0,this._tension=0,this._context=t,this._tension=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0}lineEnd(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Qt(this,this._t0,jt(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){[t,e]=[e,t];let i=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Qt(this,jt(this,i=It(this,t,e)),i);break;default:Qt(this,this._t0,i=It(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}}function kt(x){function t(e){return new Xe(e,x)}return t.tension=function(e){return kt(+e)},t}function ee(x){return x<0?-1:1}function It(x,t,e){let i=x._x1-x._x0,s=t-x._x1,n=(x._y1-x._y0)/(i||s<0&&-0),a=(e-x._y1)/(s||i<0&&-0),h=(n*s+a*i)/(i+s);return(ee(n)+ee(a))*Math.min(Math.abs(n),Math.abs(a),.5*Math.abs(h))||0}function jt(x,t){let e=x._x1-x._x0;return e?(3*(x._y1-x._y0)/e-t)/2:t}function Qt(x,t,e){let i=x._x0,n=x._x1,a=x._y1,h=(n-i)/1.5*(1-x._tension);x._context.bezierCurveTo(x._y0+h*t,i+h,a-h*e,n-h,a,n)}function re(x,t){let e=0;if(void 0===t)for(let i of x)(i=+i)&&(e+=i);else{let i=-1;for(let s of x)(s=+t(s,++i,x))&&(e+=s)}return e}function xe(x,t){let e;if(void 0===t)for(const i of x)null!=i&&(e<i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of x)null!=(s=t(s,++i,x))&&(e<s||void 0===e&&s>=s)&&(e=s)}return e}function ti(x,t){let e;if(void 0===t)for(const i of x)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of x)null!=(s=t(s,++i,x))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function ii(x){return x.target.depth}function ze(x){return x.depth}function oi(x,t){return t-1-x.height}function ri(x,t){return x.sourceLinks.length?x.depth:t-1}function mi(x){return x.targetLinks.length?x.depth:x.sourceLinks.length?ti(x.sourceLinks,ii)-1:0}function vi(x){return function(){return x}}function Wi(x,t){return yi(x.source,t.source)||x.index-t.index}function Yi(x,t){return yi(x.target,t.target)||x.index-t.index}function yi(x,t){return x.y0-t.y0}function wi(x){return x.value}function Xi(x){return x.index}function xs(x){return x.nodes}function bs(x){return x.links}function zi(x,t){const e=x.get(t);if(!e)throw new Error("missing: "+t);return e}function Hi({nodes:x}){for(const t of x){let e=t.y0,i=e;for(const s of t.sourceLinks)s.y0=e+s.width/2,e+=s.width;for(const s of t.targetLinks)s.y1=i+s.width/2,i+=s.width}}class xi extends Tt{constructor(){super(...arguments),this.links=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>ge._new(this._root,{themeTags:["link","shape"]},[this.links.template]))),this.nodes=this.children.push(Ht.new(this._root,{})),this._d3Sankey=function Ds(){let a,v,E,x=0,t=0,e=1,i=1,s=24,n=8,h=Xi,u=ri,M=xs,O=bs,I=6;function $(){const Lt={nodes:M.apply(null,arguments),links:O.apply(null,arguments)};return function G({nodes:Lt,links:zt}){for(const[Yt,Nt]of Lt.entries())Nt.index=Yt,Nt.sourceLinks=[],Nt.targetLinks=[];
vendor: 4,350 bytes, line 1
1const Kt=new Map(Lt.map((Yt,Nt)=>[h(Yt,Nt,Lt),Yt]));for(const[Yt,Nt]of zt.entries()){Nt.index=Yt;let{source:Wt,target:pe}=Nt;"object"!=typeof Wt&&(Wt=Nt.source=zi(Kt,Wt)),"object"!=typeof pe&&(pe=Nt.target=zi(Kt,pe)),Wt.sourceLinks.push(Nt),pe.targetLinks.push(Nt)}if(null!=E)for(const{sourceLinks:Yt,targetLinks:Nt}of Lt)Yt.sort(E),Nt.sort(E)}(Lt),function F({nodes:Lt}){for(const zt of Lt)zt.value=void 0===zt.fixedValue?Math.max(re(zt.sourceLinks,wi),re(zt.targetLinks,wi)):zt.fixedValue}(Lt),function Q({nodes:Lt}){const zt=Lt.length;let Kt=new Set(Lt),Yt=new Set,Nt=0;for(;Kt.size;){for(const Wt of Kt){Wt.depth=Nt;for(const{target:pe}of Wt.sourceLinks)Yt.add(pe)}if(++Nt>zt)throw new Error("circular link");Kt=Yt,Yt=new Set}}(Lt),function q({nodes:Lt}){const zt=Lt.length;let Kt=new Set(Lt),Yt=new Set,Nt=0;for(;Kt.size;){for(const Wt of Kt){Wt.height=Nt;for(const{source:pe}of Wt.targetLinks)Yt.add(pe)}if(++Nt>zt)throw new Error("circular link");Kt=Yt,Yt=new Set}}(Lt),function ft(Lt){const zt=function et({nodes:Lt}){const zt=xe(Lt,Nt=>Nt.depth)+1,Kt=(e-x-s)/(zt-1),Yt=new Array(zt);for(const Nt of Lt){const Wt=Math.max(0,Math.min(zt-1,Math.floor(u.call(null,Nt,zt))));Nt.layer=Wt,Nt.x0=x+Wt*Kt,Nt.x1=Nt.x0+s,Yt[Wt]?Yt[Wt].push(Nt):Yt[Wt]=[Nt]}if(v)for(const Nt of Yt)Nt.sort(v);return Yt}(Lt);a=Math.min(n,(i-t)/(xe(zt,Kt=>Kt.length)-1)),function ot(Lt){const zt=ti(Lt,Kt=>(i-t-(Kt.length-1)*a)/re(Kt,wi));for(const Kt of Lt){let Yt=t;for(const Nt of Kt){Nt.y0=Yt,Nt.y1=Yt+Nt.value*zt,Yt=Nt.y1+a;for(const Wt of Nt.sourceLinks)Wt.width=Wt.value*zt}Yt=(i-Yt+a)/(Kt.length+1);for(let Nt=0;Nt<Kt.length;++Nt){const Wt=Kt[Nt];Wt.y0+=Yt*(Nt+1),Wt.y1+=Yt*(Nt+1)}te(Kt)}}(zt);for(let Kt=0;Kt<I;++Kt){const Yt=Math.pow(.99,Kt),Nt=Math.max(1-Yt,(Kt+1)/I);Ot(zt,Yt,Nt),wt(zt,Yt,Nt)}}(Lt),Hi(Lt),Lt}function wt(Lt,zt,Kt){for(let Yt=1,Nt=Lt.length;Yt<Nt;++Yt){const Wt=Lt[Yt];for(const pe of Wt){let Ne=0,Re=0;for(const{source:$e,value:Oe}of pe.targetLinks){let je=Oe*(pe.layer-$e.layer);Ne+=Zt($e,pe)*je,Re+=je}if(!(Re>0))continue;let Ke=(Ne/Re-pe.y0)*zt;pe.y0+=Ke,pe.y1+=Ke,Vt(pe)}void 0===v&&Wt.sort(yi),Et(Wt,Kt)}}function Ot(Lt,zt,Kt){for(let Nt=Lt.length-2;Nt>=0;--Nt){const Wt=Lt[Nt];for(const pe of Wt){let Ne=0,Re=0;for(const{target:$e,value:Oe}of pe.sourceLinks){let je=Oe*($e.layer-pe.layer);Ne+=ie(pe,$e)*je,Re+=je}if(!(Re>0))continue;let Ke=(Ne/Re-pe.y0)*zt;pe.y0+=Ke,pe.y1+=Ke,Vt(pe)}void 0===v&&Wt.sort(yi),Et(Wt,Kt)}}function Et(Lt,zt){const Kt=Lt.length>>1,Yt=Lt[Kt];Ft(Lt,Yt.y0-a,Kt-1,zt),At(Lt,Yt.y1+a,Kt+1,zt),Ft(Lt,i,Lt.length-1,zt),At(Lt,t,0,zt)}function At(Lt,zt,Kt,Yt){for(;Kt<Lt.length;++Kt){const Nt=Lt[Kt],Wt=(zt-Nt.y0)*Yt;Wt>1e-6&&(Nt.y0+=Wt,Nt.y1+=Wt),zt=Nt.y1+a}}function Ft(Lt,zt,Kt,Yt){for(;Kt>=0;--Kt){const Nt=Lt[Kt],Wt=(Nt.y1-zt)*Yt;Wt>1e-6&&(Nt.y0-=Wt,Nt.y1-=Wt),zt=Nt.y0-a}}function Vt({sourceLinks:Lt,targetLinks:zt}){if(void 0===E){for(const{source:{sourceLinks:Kt}}of zt)Kt.sort(Yi);for(const{target:{targetLinks:Kt}}of Lt)Kt.sort(Wi)}}function te(Lt){if(void 0===E)for(const{sourceLinks:zt,targetLinks:Kt}of Lt)zt.sort(Yi),Kt.sort(Wi)}function Zt(Lt,zt){let Kt=Lt.y0-(Lt.sourceLinks.length-1)*a/2;for(const{target:Yt,width:Nt}of Lt.sourceLinks){if(Yt===zt)break;Kt+=Nt+a}for(const{source:Yt,width:Nt}of zt.targetLinks){if(Yt===Lt)break;Kt-=Nt}return Kt}function ie(Lt,zt){let Kt=zt.y0-(zt.targetLinks.length-1)*a/2;for(const{source:Yt,width:Nt}of zt.targetLinks){if(Yt===Lt)break;Kt+=Nt+a}for(const{target:Yt,width:Nt}of Lt.sourceLinks){if(Yt===zt)break;Kt-=Nt}return Kt}return $.update=function(Lt){return Hi(Lt),Lt},$.nodeId=function(Lt){return arguments.length?(h="function"==typeof Lt?Lt:vi(Lt),$):h},$.nodeAlign=function(Lt){return arguments.length?(u="function"==typeof Lt?Lt:vi(Lt),$):u},$.nodeSort=function(Lt){return arguments.length?(v=Lt,$):v},$.nodeWidth=function(Lt){return arguments.length?(s=+Lt,$):s},$.nodePadding=function(Lt){return arguments.length?(n=a=+Lt,$):n},$.nodes=function(Lt){return arguments.length?(M="function"==typeof Lt?Lt:vi(Lt),$):M},$.links=function(Lt){return arguments.length?(O="function"==typeof Lt?Lt:vi(Lt),$):O},$.linkSort=function(Lt){return arguments.length?(E=Lt,$):E},$.size=function(Lt){return arguments.length?(x=t=0,e=+Lt[0],i=+Lt[1],$):[e-x,i-t]},$.extent=function(Lt){return arguments.length?(x=+Lt[0][0],e=+Lt[1][0],t=+Lt[0][1],i=+Lt[1][1],$):[[x,t],[e,i]]}
1,$.iterations=function(Lt){return arguments.length?(I=+Lt,$):I},$}(),this._fillGenerator=we(),this._strokeGenerator=Pe()}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["sankey",this._settings.orientation||"horizontal"]),this._fillGenerator.y0(function(t){return t[3]}),this._fillGenerator.x0(function(t){return t[2]}),this._fillGenerator.y1(function(t){return t[1]}),this._fillGenerator.x1(function(t){return t[0]}),super._afterNew()}makeLink(t){const e=t.get("source"),i=t.get("target"),s=this.links.make();return e.get("unknown")&&(s.addTag("source"),s.addTag("unknown")),i.get("unknown")&&(s.addTag("target"),s.addTag("unknown")),this.linksContainer.children.push(s),s._setDataItem(t),s.set("source",e),s.set("target",i),s.series=this,this.links.push(s),s}updateSankey(){const t=this._d3Graph;t&&(this._d3Sankey.update(t),P.__(this.dataItems,e=>{const i=e.get("link");i.setPrivate("orientation",this.get("orientation")),i.markDirty()}))}_updateLinkColor(t){super._updateLinkColor(t);const e=this.get("orientation"),i=t.get("link")._fillGradient,s=t.get("link")._strokeGradient;"vertical"==e?(i&&i.set("rotation",90),s&&s.set("rotation",90)):(i&&i.set("rotation",0),s&&s.set("rotation",0))}_getBulletLocation(t){return"vertical"==this.get("orientation")?t.get("locationY",0):t.get("locationX",0)}_prepareChildren(){super._prepareChildren();let t=!1;if("vertical"==this.get("orientation")&&(t=!0),this.isDirty("orientation")||this.isDirty("linkTension")){const e=this.get("linkTension",.5);t?(this._fillGenerator.curve(kt(e)),this._strokeGenerator.curve(kt(e))):(this._fillGenerator.curve(se(e)),this._strokeGenerator.curve(se(e)))}if((this._valuesDirty||this._sizeDirty||this.isDirty("nodePadding")||this.isDirty("nodeWidth")||this.isDirty("nodeAlign")||this.isDirty("nodeSort")||this.isDirty("orientation")||this.isDirty("linkTension")||this.isDirty("linkSort"))&&this._nodesData.length>0){const e=this._d3Sankey;let i=this.innerWidth(),s=this.innerHeight();switch(t&&([i,s]=[s,i]),e.size([i,s]),e.nodePadding(this.get("nodePadding",10)),e.nodeWidth(this.get("nodeWidth",10)),e.nodeSort(this.get("nodeSort",null)),e.linkSort(this.get("linkSort")),this.get("nodeAlign")){case"right":e.nodeAlign(oi);break;case"justify":e.nodeAlign(ri);break;case"center":e.nodeAlign(mi);break;default:e.nodeAlign(ze)}this._d3Graph=e({nodes:this._nodesData,links:this._linksData}),P.__(this.dataItems,a=>{const h=a.get("link");h.setPrivate("orientation",this.get("orientation")),h.markDirty()});const n=this._d3Graph;n&&P.__(n.nodes,h=>{const u=h.dataItem,v=u.get("node");let E,M,O,I;t?(E=h.y0,M=h.y1,O=h.x0,I=h.x1):(E=h.x0,M=h.x1,O=h.y0,I=h.y1),c.Et(E)&&c.Et(M)&&c.Et(O)&&c.Et(I)&&(v.setAll({x:E,y:O,width:M-E,height:I-O}),u.get("rectangle").setAll({width:M-E,height:I-O}))})}}}xi.className="Sankey",xi.classNames=Tt.classNames.concat([xi.className]);class Ts extends it.S{setupDefaultRules(){super.setupDefaultRules();const t=this._root.interfaceColors,e=this._root.gridLayout,i=this.rule.bind(this);i("Hierarchy").setAll({legendLabelText:"{category}",legendValueText:"{sum.formatNumber('#.#')}",width:L.Q2,height:L.Q2,colors:gt.new(this._root,{step:2}),childDataField:"children",downDepth:1,initialDepth:5,singleBranchOnly:!0,maskContent:!0,animationEasing:Dt.FD(Dt.tA)}),i("HierarchyNode").setAll({toggleKey:"disabled",setStateOnChildren:!0,position:"absolute",isMeasured:!1,cursorOverStyle:"pointer",tooltipText:"{category}: {sum}"}),i("HierarchyNode",["last"]).setAll({cursorOverStyle:"default"});{const s=i("Label",["hierarchy","node"]);s.setAll({centerX:L.yP,centerY:L.yP,position:"absolute",paddingBottom:1,paddingTop:1,paddingRight:4,paddingLeft:4,text:"{category}",populateText:!0,oversizedBehavior:"fit",minScale:.3}),(0,N.w)(s,"fill",t,"alternativeText")}{const s=i("HierarchyLink");s.setAll({isMeasured:!1,position:"absolute",strokeWidth:1,strokeOpacity:1,strength:.9,distance:1.1}),(0,N.w)(s,"stroke",t,"grid")}i("Circle",["linkedhierarchy","shape"]).setAll({position:"absolute",fillOpacity:1,strokeOpacity:0,radius:15,tooltipY:0}),i("Circle",["linkedhierarchy","shape","outer"]).setAll({position:"absolute",opacity:1,fillOpacity:0,strokeDasharray:0,strokeOpacity:1,radius:15,scale:1.1,interactive:!1}),i("Circle",["linkedhierarchy","shape","outer"]).states.create("disabled",{opacity:1,scale:1.1,strokeDasharray:2}),i("Circle",["linkedhierarchy","shape","outer"]).states.create("hoverDisabled",{scale:1.2,opacity:1,strokeDasharray:2}),i("Circle",["linkedhierarchy","shape","outer"]).states.create("hover",{scale:1.05,strokeDasharray:0}),i("Circle",["linkedhierarchy","shape","outer"]).states.create("hidden",{opacity:0,strokeDasharray:0}),i("BreadcrumbBar").setAll({paddingLeft:8,layout:e});{const s=i("Label",["breadcrumb"]);s.setAll({paddingRight:4,paddingLeft:4,cursorOverStyle:"pointer",populateText:!0,text:"{category}:"}),(0,N.w)(s,"fill",t,"primaryButton")}{const s=i("Label",["breadcrumb"]).states.create("hover",{});(0,N.w)(s,"fill",t,"primaryButtonHover")}{const s=i("Label",["breadcrumb"]).states.create("down",{stateAnimationDuration:0});(0,N.w)(s,"fill",t,"primaryButtonDown")}{const s=i("Label",["breadcrumb","last"]);s.setAll({populateText:!0,text:"{category}",fontWeight:"bold",cursorOverStyle:"default"}),(0,N.w)(s,"fill",t,"primaryButton")}{const s=i("RoundedRectangle",["breadcrumb","label","background"]);s.setAll({fillOpacity:0}),(0,N.w)(s,"fill",t,"background")}i("Partition").setAll({downDepth:1,upDepth:0,initialDepth:5}),i("HierarchyNode",["partition"]).setAll({setStateOnChildren:!1}),i("HierarchyNode",["partition"]).states.create("hidden",{opacity:1,visible:!0});{const s=i("Label",["partition","node"]);s.setAll({x:L.yP,y:L.yP,centerY:L.yP,centerX:L.yP,paddingBottom:1,paddingTop:1,paddingLeft:1,paddingRight:1,rotation:90,populateText:!0,text:"{category}",oversizedBehavior:"fit",minScale:.4}),(0,N.w)(s,"fill",t,"alternativeText")}i("Label",["horizontal","partition","node"]).setAll({rotation:0});{const s=i("RoundedRectangle",["partition","node","shape"]);s.setAll({strokeOpacity:1,strokeWidth:1,cornerRadiusBR:0,cornerRadiusTR:0,cornerRadiusBL:0,
1cornerRadiusTL:0}),(0,N.w)(s,"stroke",t,"background")}i("RoundedRectangle",["partition","node","shape","last"]).setAll({fillOpacity:.75}),i("Sunburst").setAll({singleBranchOnly:!0}),i("HierarchyNode",["sunburst"]).setAll({setStateOnChildren:!1}),i("HierarchyNode",["sunburst"]).states.create("hidden",{opacity:0,visible:!1});{const s=i("Slice",["sunburst","node","shape"]);s.setAll({strokeOpacity:1,strokeWidth:1,cornerRadius:0}),(0,N.w)(s,"stroke",t,"background")}i("Slice",["sunburst","node","shape","last"]).setAll({fillOpacity:.75});{const s=i("RadialLabel",["sunburst","node"]);s.setAll({x:0,y:0,textType:"radial",paddingBottom:1,paddingTop:1,paddingLeft:1,paddingRight:1,centerX:L.yP,populateText:!0,text:"{category}",oversizedBehavior:"fit",minScale:.4,baseRadius:L.yP,rotation:0}),(0,N.w)(s,"fill",t,"alternativeText")}i("ForceDirected").setAll({minRadius:(0,L.KN)(1),maxRadius:(0,L.KN)(8),initialFrames:500,centerStrength:.8,manyBodyStrength:-14,velocityDecay:.5,linkWithStrength:.5,showOnFrame:10,singleBranchOnly:!1,upDepth:1/0,downDepth:1,initialDepth:5,topDepth:0}),i("Tree").setAll({orientation:"vertical",paddingLeft:20,paddingRight:20,paddingTop:20,paddingBottom:20,singleBranchOnly:!1,upDepth:1/0,downDepth:1,initialDepth:5,topDepth:0}),i("Pack").setAll({paddingLeft:20,paddingTop:20,paddingBottom:20,paddingRight:20,nodePadding:0});{const s=i("Label",["pack","node"]);s.setAll({centerY:L.yP,centerX:L.yP,paddingBottom:1,paddingTop:1,paddingLeft:1,paddingRight:1,populateText:!0,text:"{category}",oversizedBehavior:"fit",minScale:.4}),(0,N.w)(s,"fill",t,"alternativeText")}{const s=i("Circle",["pack","node","shape"]);s.setAll({strokeOpacity:.5,fillOpacity:.8,strokeWidth:1}),(0,N.w)(s,"stroke",t,"background")}i("LinkedHierarchyNode").setAll({draggable:!0}),i("LinkedHierarchyNode").states.create("hidden",{scale:0,opacity:0,visible:!1}),i("Treemap").setAll({upDepth:0,layoutAlgorithm:"squarify"});{const s=i("Label",["treemap","node"]);s.setAll({x:L.yP,y:L.yP,centerY:L.yP,centerX:L.yP,paddingBottom:1,paddingTop:1,paddingLeft:1,paddingRight:1,populateText:!0,text:"{category}",oversizedBehavior:"fit",minScale:.4}),(0,N.w)(s,"fill",t,"alternativeText")}i("HierarchyNode",["treemap","node"]).setAll({tooltipY:(0,L.KN)(40),isMeasured:!1,position:"absolute",cursorOverStyle:"pointer"}),i("HierarchyNode",["treemap","node","last"]).setAll({cursorOverStyle:"default"});{const s=i("RoundedRectangle",["treemap","node","shape"]);s.setAll({strokeOpacity:1,strokeWidth:1,cornerRadiusBR:0,cornerRadiusTR:0,cornerRadiusBL:0,
1cornerRadiusTL:0,fillOpacity:1}),(0,N.w)(s,"stroke",t,"background")}i("VoronoiTreemap").setAll({type:"polygon",minWeightRatio:.005,convergenceRatio:.005,maxIterationCount:100,singleBranchOnly:!0});{const s=i("Graphics",["voronoitreemap","node","shape"]);s.setAll({strokeOpacity:1,strokeWidth:1,fillOpacity:1}),(0,N.w)(s,"stroke",t,"background")}i("Polygon",["hierarchy","node","shape","depth1"]).setAll({strokeWidth:3});{const s=i("Label",["voronoitreemap"]);s.setAll({centerY:L.yP,centerX:L.yP,paddingBottom:1,paddingTop:1,paddingLeft:1,paddingRight:1,populateText:!0,text:"{category}",oversizedBehavior:"fit",minScale:.4,layer:30}),(0,N.w)(s,"fill",t,"alternativeText")}}}var He=y(7781);class Qe extends m.m{_afterNew(){super._afterNew(),this.states.create("disabled",{}),this.states.create("hover",{}),this.states.create("hoverDisabled",{}),this.on("disabled",()=>{const t=this.dataItem;if(!t.get("children"))return void this.set("disabled",!0);const e=this.get("disabled"),i=this.series;t&&i&&t.get("disabled")!=e&&(e?i.disableDataItem(t):i.enableDataItem(t,i.get("downDepth",1),0))})}_changed(){super._changed(),this.isDirty("toggleKey")&&("disabled"==this.get("toggleKey")?this._clickDisposer=this.events.on("click",()=>{if(!this._isDragging){let e=this.series;e&&e.selectDataItem(this.dataItem)}}):this._clickDisposer&&this._clickDisposer.dispose())}}function Ps(x){var t=0,e=x.children,i=e&&e.length;if(i)for(;--i>=0;)t+=e[i].value;else t=1;x.value=t}function xt(x,t){x instanceof Map?(x=[void 0,x],void 0===t&&(t=ct)):void 0===t&&(t=lt);for(var i,n,a,h,u,e=new _t(x),s=[e];i=s.pop();)if((a=t(i.data))&&(u=(a=Array.from(a)).length))for(i.children=a,h=u-1;h>=0;--h)s.push(n=a[h]=new _t(a[h])),n.parent=i,n.depth=i.depth+1;return e.eachBefore(ht)}function lt(x){return x.children}function ct(x){return Array.isArray(x)?x[1]:null}function Ut(x){void 0!==x.data.value&&(x.value=x.data.value),x.data=x.data.data}function ht(x){var t=0;do{x.height=t}while((x=x.parent)&&x.height<++t)}function _t(x){this.data=x,this.depth=this.height=0,this.parent=null}Qe.className="HierarchyNode",Qe.classNames=m.m.classNames.concat([Qe.className]),_t.prototype=xt.prototype={constructor:_t,count:function Gi(){return this.eachAfter(Ps)},each:function Ki(x,t){let e=-1;for(const i of this)x.call(t,i,++e,this);return this},eachAfter:function St(x,t){for(var n,a,h,e=this,i=[e],s=[],u=-1;e=i.pop();)if(s.push(e),n=e.children)for(a=0,h=n.length;a<h;++a)i.push(n[a]);for(;e=s.pop();)x.call(t,e,++u,this);return this},eachBefore:function Mi(x,t){for(var s,n,e=this,i=[e],a=-1;e=i.pop();)if(x.call(t,e,++a,this),s=e.children)for(n=s.length-1;n>=0;--n)i.push(s[n]);return this},find:function o(x,t){let e=-1;for(const i of this)if(x.call(t,i,++e,this))return i},sum:function d(x){return this.eachAfter(function(t){for(var e=+x(t.data)||0,i=t.children,s=i&&i.length;--s>=0;)e+=i[s].value;t.value=e})},sort:function D(x){return this.eachBefore(function(t){t.children&&t.children.sort(x)})},path:function k(x){for(var t=this,e=function B(x,t){if(x===t)return x;var e=x.ancestors(),i=t.ancestors(),s=null;for(x=e.pop(),t=i.pop();x===t;)s=x,x=e.pop(),t=i.pop();return s}(t,x),i=[t];t!==e;)i.push(t=t.parent);for(var s=i.length;x!==e;)i.splice(s,0,x),x=x.parent;return i},ancestors:function H(){for(var x=this,t=[x];x=x.parent;)t.push(x);return t},descendants:function K(){return Array.from(this)},leaves:function st(){var x=[];return this.eachBefore(function(t){t.children||x.push(t)}),x},links:function mt(){var x=this,t=[];return x.each(function(e){e!==x&&t.push({source:e.parent,target:e})}),t},copy:function bt(){return xt(this).eachBefore(Ut)},[Symbol.iterator]:function*Mt(){var t,i,s,n,x=this,e=[x];do{for(t=e.reverse(),e=[];x=t.pop();)if(yield x,i=x.children)for(s=0,n=i.length;s<n;++s)e.push(i[s])}while(e.length)}};class Jt extends pt.s{constructor(){super(...arguments),this.nodesContainer=this.children.push(m.m.new(this._root,{isMeasured:!1})),this._index=0,this._tag="hierarchy",this.nodes=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>Qe.new(this._root,{themeTags:r.kE(this.nodes.template.get("themeTags",[]),[this._tag,"hierarchy","node"])},this.nodes.template))),this.labels=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>W.J.new(this._root,{themeTags:r.kE(this.labels.template.get("themeTags",[]),[this._tag])},this.labels.template)))}_applyThemes(t=!1){const e=this.get("colors");return e&&e.reset(),super._applyThemes(t)}makeNode(t){const e=t.get("childData"),i=this.nodes.make();i.series=this,i._setDataItem(t),this.nodes.push(i),t.setRaw("node",i);const s=this.labels.make();s._setDataItem(t),t.setRaw("label",s),this.labels.push(s),(!e||0==e.length)&&i.addTag("last");const n=t.get("depth");return i.addTag("depth"+n),this.nodesContainer.children.push(i),i.children.push(s),i}_afterNew(){this._defaultThemes.push(Ts.new(this._root)),this.fields.push("category","childData","disabled","fill"),this.children.push(this.bulletsContainer),super._afterNew()}
1_prepareChildren(){if(super._prepareChildren(),this._valuesDirty){this._treeData={};const t=this.dataItems[0];if(t&&(this._makeHierarchyData(this._treeData,t),this._index=0,this._rootNode=xt(this._treeData),this._rootNode)){this._rootNode.sum(i=>i.value);const e=this.get("sort");"descending"==e?this._rootNode.sort((i,s)=>s.value-i.value):"ascending"==e&&this._rootNode.sort((i,s)=>i.value-s.value),this.setPrivateRaw("valueLow",1/0),this.setPrivateRaw("valueHigh",-1/0),this.setPrivateRaw("maxDepth",0),this._updateValues(this._rootNode)}}if((this._valuesDirty||this._sizeDirty)&&this._updateVisuals(),this._sizeDirty){const t=this.get("selectedDataItem");t&&this._zoom(t)}}_changed(){super._changed(),this.isDirty("selectedDataItem")&&this._selectDataItem(this.get("selectedDataItem"))}_updateVisuals(){this._rootNode&&this._updateNodes(this._rootNode)}_updateNodes(t){const e=t.data.dataItem;if(e){this._updateNode(e),this.bullets.length>0&&!e.bullets&&this._makeBullets(e);const i=t.children;i&&P.__(i,s=>{this._updateNodes(s)})}}_updateNode(t){}getDataItemById(t){return this._getDataItemById(this.dataItems,t)}_getDataItemById(t,e){let i;return P.FY(t,s=>{if(s.get("id")==e)return i=s,!1;const n=s.get("children");if(n){let a=this._getDataItemById(n,e);if(a)return i=a,!1}return!0}),i}_handleBullets(t){P.__(t,e=>{const i=e.bullets;i&&(P.__(i,n=>{n.dispose()}),e.bullets=void 0);const s=e.get("children");s&&this._handleBullets(s)}),this._updateVisuals()}_onDataClear(){super._onDataClear();const t=this.get("colors");t&&t.reset();const e=this.get("patterns");e&&e.reset()}processDataItem(t){super.processDataItem(t);let e=t.get("childData");if(!e){const v=this.get("childDataField","children");e=t.dataContext[v],e&&t.setRaw("childData",e)}const i=this.get("colors"),s=this.get("patterns"),n=this.get("topDepth",0);t.get("parent")||(t.setRaw("depth",0),i&&0==n&&null==t.get("fill")&&(t.setRaw("fill",i.next()),s&&t.setRaw("fillPattern",s.next())));let a=t.get("depth");const h=this.get("initialDepth",1);if(this.makeNode(t),this._processDataItem(t),e){const v=[];t.setRaw("children",v),P.__(e,E=>{const M=new He.s(this,E,this._makeDataItem(E));v.push(M),M.setRaw("parent",t),M.setRaw("depth",a+1),1==this.dataItems.length&&0==a?(i&&null==M.get("fill")&&M.setRaw("fill",i.next()),s&&null==M.get("fillPattern")&&M.setRaw("fillPattern",s.next())):(null==M.get("fill")&&M.setRaw("fill",t.get("fill")),null==M.get("fillPattern")&&M.setRaw("fillPattern",t.get("fillPattern"))),this.processDataItem(M)})}const u=t.get("children");(!u||0==u.length)&&t.get("node").setAll({toggleKey:void 0}),null==t.get("disabled")&&a>=n+h&&this.disableDataItem(t,0)}setFlatData(t){const e=this.get("idField","id"),i=this.get("parentIdField","parentId"),s=this.get("childDataField","children"),n=new Map,a=[];let h;P.__(t,u=>{const v=Object.assign({},u);n.set(v[e],v),a.push(v)}),P.__(a,u=>{const v=u[i];if(null==v||""===v)h=u;else{const E=n.get(v);E&&(E[s]||(E[s]=[]),E[s].push(u))}}),h&&this.data.setAll([h])}addChildData(t,e){const i=t.dataContext,s=this.get("childDataField","children");let n=i[s];n?n.push(...e):(n=e,i[s]=n);let a=t.get("children");a||(a=[],t.set("children",a));const h=t.get("node");h&&h.set("toggleKey",this.nodes.template.get("toggleKey","disabled"));let u=t.get("depth");P.__(n,v=>{let E=!1;if(P.FY(a,M=>M.dataContext!=v||(E=!0,!1)),!E){const M=new He.s(this,v,this._makeDataItem(v));if(a.push(M),M.setRaw("parent",t),M.setRaw("depth",u+1),null==M.get("fill")){let O=t.get("fill");if(null==O){const I=this.get("colors");I&&(O=I.next())}M.setRaw("fill",O)}this.processDataItem(M)}})}_processDataItem(t){}_updateValues(t){const e=t.data.dataItem;if(t.depth>this.getPrivate("maxDepth")&&this.setPrivateRaw("maxDepth",t.depth),e){e.setRaw("d3HierarchyNode",t),t.index=this._index,this._index++,this.root.events.once("frameended",()=>{e.get("node").set("disabled",e.get("disabled"))});let s=t.data.value,n=t.value;if(null!=s&&(n=s,t.value=n),c.Et(n)){e.setRaw("sum",n),e.setRaw("valuePercentTotal",n/this.dataItems[0].get("sum")*100);let a=100;const h=e.get("parent");h&&(a=n/h.get("sum")*100),e.get("label").text.markDirtyText(),e.setRaw("valuePercent",a);const u=this.getPrivate("valueLow");null!=u&&u>n&&this.setPrivateRaw("valueLow",n);const v=this.getPrivate("valueHigh");null!=v&&v<n&&this.setPrivateRaw("valueHigh",n)}this.updateLegendValue(e)}const i=t.children;i&&P.__(i,s=>
1{this._updateValues(s)})}_makeHierarchyData(t,e){t.dataItem=e;const i=e.get("children");if(i){const s=[];t.children=s,P.__(i,a=>{const h={};s.push(h),this._makeHierarchyData(h,a)});const n=e.get("valueWorking");c.Et(n)&&(t.value=n)}else{const s=e.get("valueWorking");c.Et(s)&&(t.value=s)}}disposeDataItem(t){super.disposeDataItem(t);const e=t.get("node");e&&(this.nodes.removeValue(e),e.dispose());const i=t.get("label");i&&(this.labels.removeValue(i),i.dispose());const s=t.get("children");s&&P.__(s,n=>{this.disposeDataItem(n)})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],n=this.states.create("hidden",{});if(!c.Et(e)){const E="stateAnimationDuration";e=n.get(E,this.get(E,0))}const a="stateAnimationEasing",h=n.get(a,this.get(a)),u=t.get("children");(!u||0==u.length)&&c.Et(t.get("value"))&&s.push(t.animate({key:"valueWorking",to:0,duration:e,easing:h}).waitForStop());const v=t.get("node");v.hide(),v.hideTooltip(),u&&P.__(u,E=>{s.push(this.hideDataItem(E))}),yield Promise.all(s)})}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)];c.Et(e)||(e=this.get("stateAnimationDuration",0));const n=this.get("stateAnimationEasing"),a=t.get("children");(!a||0==a.length)&&c.Et(t.get("value"))&&s.push(t.animate({key:"valueWorking",to:t.get("value"),duration:e,easing:n}).waitForStop()),t.get("node").show(),a&&P.__(a,u=>{s.push(this.showDataItem(u))}),yield Promise.all(s)})}enableDataItem(t,e,i,s){null==i&&(i=0),null==e&&(e=1),t.set("disabled",!1),t.get("node").set("disabled",!1),t.isHidden()||t.get("node").show(s);const n=this.get("topDepth",0);if(t.get("depth")<n&&t.get("node").hide(0),0==i){const h=this.get("upDepth",1/0);let u=t,v=0;for(;void 0!==u;)v>h&&u.get("node").hide(),u=u.get("parent"),v++}let a=t.get("children");a&&P.__(a,i<e-1?h=>{const u=this.get("disabledField");u?1!=h.dataContext[u]?this.enableDataItem(h,e,i+1,s):this.disableDataItem(h):this.enableDataItem(h,e,i+1,s)}:h=>{h.isHidden()||(h.get("node").show(s),h.get("node").states.applyAnimate("disabled"),h.set("disabled",!0),this.disableDataItem(h))})}disableDataItem(t,e){t.set("disabled",!0);let i=t.get("children");i&&P.__(i,s=>{this.disableDataItem(s,e),s.get("node").hide(e)})}_selectDataItem(t,e,i){if(t){if(!i){const v="dataitemselected";this.events.dispatch(v,{type:v,target:this,dataItem:t})}let s=this.getPrivate("maxDepth",1);const n=this.get("topDepth",0);null==e&&(e=Math.min(this.get("downDepth",1),s-t.get("depth")));const a=t.get("d3HierarchyNode");let h=a.depth;this.inited||(e=Math.min(this.get("initialDepth",1),s-n),e=Math.max(0,e)),this._currentDownDepth=e,h+e>s&&(e=s-h),h<n&&(e+=n-h,h=n);const u=t.get("children");u&&u.length>0?(e>0?this.enableDataItem(t,e):(t.get("node").show(),P.__(u,v=>{v.get("node").hide()})),a.depth<n&&t.get("node").hide(0),this.get("singleBranchOnly")&&this._handleSingle(t)):this.enableDataItem(t,e),this._root.events.once("frameended",()=>{this._zoom(t)})}}_zoom(t){}_handleSingle(t){const e=t.get("parent");if(e){const i=e.get("children");i&&P.__(i,s=>{s!=t&&this.disableDataItem(s)})}}selectDataItem(t){const e=t.get("parent"),i=this.getPrivate("maxDepth",1);if(this.get("selectedDataItem")==t)if(e)this.set("selectedDataItem",e);else{let s=Math.min(this.get("downDepth",1),i-t.get("depth"));this._currentDownDepth==s&&(s=Math.min(this.get("initialDepth",1),i-this.get("topDepth",0))),this._selectDataItem(t,s)}else this.set("selectedDataItem",t)}_makeBullet(t,e,i){const s=super._makeBullet(t,e,i);if(s){const n=s.get("sprite"),a=t.get("node");n&&(a.children.push(n),a.on("width",()=>{this._positionBullet(s)}),a.on("height",()=>{this._positionBullet(s)}))}return s}_positionBullet(t){const e=t.get("sprite");if(e){const i=e.dataItem,s=t.get("locationX",.5),n=t.get("locationY",.5),a=i.get("node");e.set("x",a.width()*s),e.set("y",a.height()*n)}}hoverDataItem(t){const e=t.get("node");e&&!e.isHidden()&&e.hover()}unhoverDataItem(t){const e=t.get("node");e&&e.unhover()}}
1Jt.className="Hierarchy",Jt.classNames=pt.s.classNames.concat([Jt.className]);class $t extends Qe{_afterNew(){super._afterNew(),this.states.create("disabled",{}),this.states.create("hover",{}),this.states.create("hoverDisabled",{})}_updateLinks(t){const e=this.dataItem;if(e){let i=e.get("links");P.__(i,s=>{let n=s.get("source"),a=s.get("target");n&&a&&(n.get("node").isHidden()||a.get("node").isHidden()?s.hide(t):s.show(t))})}}_prepareChildren(){super._prepareChildren(),this.isDirty("disabled")&&this._updateLinks()}_onHide(t){super._onHide(t),this._updateLinks(t)}_onShow(t){super._onShow(t),this._updateLinks(t)}}$t.className="LinkedHierarchyNode",$t.classNames=Qe.classNames.concat([$t.className]);class Bt extends V.A{constructor(){super(...arguments),this.bullets=[]}_handleBullets(t){P.__(this.bullets,e=>{e.dispose()}),t.each(e=>{const i=e(this._root,this.get("source"),this.get("target"));if(i){this.bullets.push(i);const s=i.get("sprite");if(this.addDisposer(i.on("locationX",()=>{this._clear=!0,this.markDirty()})),s){const n=this.series;n&&n.linksContainer.children.push(s)}}})}_changed(){var t,e;if(super._changed(),this._clear){let i=this.get("source"),s=this.get("target");if(i&&s){const n=i.get("node"),a=s.get("node"),h=n.x(),u=n.y(),v=a.x(),E=a.y();this._display.moveTo(h,u),this._display.lineTo(v,E);const M=null===(t=n.dataItem)||void 0===t?void 0:t.get("outerCircle").get("radius",0),O=null===(e=a.dataItem)||void 0===e?void 0:e.get("outerCircle").get("radius",0),I=Math.hypot(v-h,E-u),$=I-M-O;P.__(this.bullets,G=>{const F=G.get("sprite");if(F){const Q=G.get("locationX",.5);F.set("x",h+M/I*(v-h)+$/I*(v-h)*Q),F.set("y",u+M/I*(E-u)+$/I*(E-u)*Q),G.get("autoRotate")&&F.set("rotation",180*Math.atan2(E-u,v-h)/Math.PI+G.get("autoRotateAngle",0))}})}}}hide(t){return P.__(this.bullets,e=>{if(e){const i=e.get("sprite");i&&i.hide(t)}}),super.hide()}show(t){return P.__(this.bullets,e=>{if(e){const i=e.get("sprite");i&&i.show(t)}}),super.show()}_beforeChanged(){if(super._beforeChanged(),this.isDirty("source")){const t=this.get("source");t&&t.get("node").events.on("positionchanged",()=>{this._markDirtyKey("stroke")})}if(this.isDirty("target")){const t=this.get("target");t&&t.get("node").events.on("positionchanged",()=>{this._markDirtyKey("stroke")})}}_dispose(){super._dispose(),P.__(this.bullets,t=>{t.dispose()}),this.bullets=[]}}Bt.className="HierarchyLink",Bt.classNames=V.A.classNames.concat([Bt.className]);class qt extends Jt{constructor(){super(...arguments),this.linkBullets=new U.B8,this.nodes=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>$t._new(this._root,{themeTags:r.kE(this.nodes.template.get("themeTags",[]),[this._tag,"linkedhierarchy","hierarchy","node"]),x:this.width()/2,y:this.height()/2},[this.nodes.template]))),this.circles=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>f.j._new(this._root,{themeTags:r.kE(this.circles.template.get("themeTags",[]),[this._tag,"shape"])},[this.circles.template]))),this.outerCircles=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>f.j._new(this._root,{themeTags:r.kE(this.outerCircles.template.get("themeTags",[]),[this._tag,"outer","shape"])},[this.outerCircles.template]))),this.links=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>Bt._new(this._root,{themeTags:r.kE(this.links.template.get("themeTags",[]),[this._tag,"linkedhierarchy","hierarchy","link"])},[this.links.template]))),this.linksContainer=this.children.moveValue(m.m.new(this._root,{}),0)}_afterNew(){this.fields.push("linkWith","x","y"),this._disposers.push(this.linkBullets.events.onAll(()=>{this.links.each(t=>{t._handleBullets(this.linkBullets)})})),super._afterNew()}makeNode(t){const e=super.makeNode(t),i=e.children.moveValue(this.circles.make(),0);this.circles.push(i),e.setPrivate("tooltipTarget",i),t.setRaw("circle",i);const s=e.children.moveValue(this.outerCircles.make(),0);this.outerCircles.push(s),t.setRaw("outerCircle",s);const n=t.get("label");i.on("radius",()=>{const h=2*i.get("radius",this.width());n.setAll({maxWidth:h,maxHeight:h}),s.set("radius",h/2),this._handleRadiusChange()});const a=2*i.get("radius",this.width());return n.setAll({maxWidth:a,maxHeight:a}),i._setDataItem(t),s._setDataItem(t),e}_handleRadiusChange(){}processDataItem(t){t.setRaw("childLinks",[]),t.setRaw("links",[]),super.processDataItem(t),t.get("parent")||this.updateLinkWith(this.dataItems)}addChildData(t,e){super.addChildData(t,e),this.updateLinkWith(this.dataItems)}_processDataItem(t){super._processDataItem(t);const e=t.get("parent");
1if(e&&e.get("depth")>=this.get("topDepth",0)){const s=this.linkDataItems(e,t);t.setRaw("parentLink",s)}t.get("node")._updateLinks(0)}updateLinkWith(t){P.__(t,e=>{const i=e.get("linkWith");i&&P.__(i,n=>{const a=this._getDataItemById(this.dataItems,n);a&&this.linkDataItems(e,a)});const s=e.get("children");s&&this.updateLinkWith(s)})}_getPoint(t){return{x:t.x,y:t.y}}_animatePositions(t){const e=t.get("node"),i=t.get("d3HierarchyNode"),s=this._getPoint(i),n=this.get("animationDuration",0),a=this.get("animationEasing");e.animate({key:"x",to:s.x,duration:n,easing:a}),e.animate({key:"y",to:s.y,duration:n,easing:a})}_updateNode(t){super._updateNode(t),this._animatePositions(t);const e=t.get("fill"),i=t.get("fillPattern"),s=t.get("circle"),n=t.get("children");s&&(s._setDefault("fill",e),s._setDefault("fillPattern",i),s._setDefault("stroke",e));const a=t.get("outerCircle");a&&(a._setDefault("fill",e),a._setDefault("stroke",e),a.setPrivate("visible",!(!n||0==n.length)))}linkDataItems(t,e,i){let s;const n=t.get("links");n&&P.__(n,h=>{h.get("target")==e&&(s=h)});const a=e.get("links");return a&&P.__(a,h=>{h.get("target")==t&&(s=h)}),s||(s=this.links.make(),s.series=this,this.links.push(s),this.linksContainer.children.push(s),s.set("source",t),s.set("target",e),s._setDataItem(t),s._handleBullets(this.linkBullets),s.set("stroke",t.get("fill")),null!=i&&s.set("strength",i),t.get("childLinks").push(s),P.Cy(t.get("links"),s),P.Cy(e.get("links"),s),this._processLink(s,t,e)),s}unlinkDataItems(t,e){let i;const s=t.get("links");s&&P.__(s,a=>{a&&a.get("target")==e&&(i=a,P.TF(s,i))});const n=e.get("links");n&&P.__(n,a=>{a&&a.get("target")==t&&(i=a,P.TF(n,i))}),i&&this._disposeLink(i),this._handleUnlink()}_handleUnlink(){}_disposeLink(t){this.links.removeValue(t),t.dispose()}areLinked(t,e){const i=t.get("links");let s=!1;i&&P.__(i,a=>{a.get("target")==e&&(s=!0)});const n=e.get("links");return n&&P.__(n,a=>{a.get("target")==t&&(s=!0)}),s}_processLink(t,e,i){}disposeDataItem(t){super.disposeDataItem(t);const e=t.get("links");e&&P.__(e,i=>{this._disposeLink(i)})}selectDataItem(t){const e=t.get("parent");if(t.get("disabled")){if(e){this.setRaw("selectedDataItem",e);const i="dataitemselected";this.events.dispatch(i,{type:i,target:this,dataItem:e}),this.disableDataItem(t)}}else this.set("selectedDataItem",t)}}function he(x,t){return x.parent===t.parent?1:2}function ne(x){var t=x.children;return t?t[0]:x.t}function fe(x){var t=x.children;return t?t[t.length-1]:x.t}function Me(x,t,e){var i=e/(t.i-x.i);t.c-=i,t.s+=e,x.c+=i,t.z+=e,t.m+=e}function ve(x,t,e){return x.a.parent===t.parent?x.a:e}function Te(x,t){this._=x,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function si(){var x=he,t=1,e=1,i=null;function s(v){var E=function Ce(x){for(var e,s,n,a,h,t=new Te(x,0),i=[t];e=i.pop();)if(n=e._.children)for(e.children=new Array(h=n.length),a=h-1;a>=0;--a)i.push(s=e.children[a]=new Te(n[a],a)),s.parent=e;return(t.parent=new Te(null,0)).children=[t],t}(v);if(E.eachAfter(n),E.parent.m=-E.z,E.eachBefore(a),i)v.eachBefore(u);else{var M=v,O=v,I=v;v.eachBefore(function(q){q.x<M.x&&(M=q),q.x>O.x&&(O=q),q.depth>I.depth&&(I=q)});var $=M===O?1:x(M,O)/2,G=$-M.x,F=t/(O.x+$+G),Q=e/(I.depth||1);v.eachBefore(function(q){q.x=(q.x+G)*F,q.y=q.depth*Q})}return v}function n(v){var E=v.children,M=v.parent.children,O=v.i?M[v.i-1]:null;if(E){!function _e(x){for(var n,t=0,e=0,i=x.children,s=i.length;--s>=0;)(n=i[s]).z+=t,n.m+=t,t+=n.s+(e+=n.c)}(v);var I=(E[0].z+E[E.length-1].z)/2;O?(v.z=O.z+x(v._,O._),v.m=v.z-I):v.z=I}else O&&(v.z=O.z+x(v._,O._));v.parent.A=function h(v,E,M){if(E){for(var ot,O=v,I=v,$=E,G=O.parent.children[0],F=O.m,Q=I.m,q=$.m,et=G.m;$=fe($),O=ne(O),$&&O;)G=ne(G),(I=fe(I)).a=v,(ot=$.z+q-O.z-F+x($._,O._))>0&&(Me(ve($,v,M),v,ot),F+=ot,Q+=ot),q+=$.m,F+=O.m,et+=G.m,Q+=I.m;$&&!fe(I)&&(I.t=$,I.m+=q-Q),O&&!ne(G)&&(G.t=O,G.m+=F-et,M=v)}return M}(v,O,v.parent.A||M[0])}function a(v){v._.x=v.z+v.parent.m,v.m+=v.parent.m}function u(v){v.x*=t,v.y=v.depth*e}return s.separation=function(v){return arguments.length?(x=v,s):x},s.size=function(v){return arguments.length?(i=!1,t=+v[0],e=+v[1],s):i?null:[t,e]},s.nodeSize=function(v){return arguments.length?(i=!0,t=+v[0],e=+v[1],s):i?[t,e]:null},s}function Ee(x,t){return x.parent===t.parent?1:2}function be(x,t){return x+t.x}function Ze(x,t){return Math.max(x,t.y)}
1qt.className="LinkedHierarchy",qt.classNames=Jt.classNames.concat([qt.className]),Te.prototype=Object.create(_t.prototype);class qe extends qt{constructor(){super(...arguments),this._tag="tree",this._hierarchyLayout=si()}_prepareChildren(){super._prepareChildren(),this.isDirty("clustered")&&(this._hierarchyLayout=this.get("clustered")?function Je(){var x=Ee,t=1,e=1,i=!1;function s(n){var a,h=0;n.eachAfter(function(O){var I=O.children;I?(O.x=function Ei(x){return x.reduce(be,0)/x.length}(I),O.y=function Ge(x){return 1+x.reduce(Ze,0)}(I)):(O.x=a?h+=x(O,a):0,O.y=0,a=O)});var u=function ei(x){for(var t;t=x.children;)x=t[0];return x}(n),v=function li(x){for(var t;t=x.children;)x=t[t.length-1];return x}(n),E=u.x-x(u,v)/2,M=v.x+x(v,u)/2;return n.eachAfter(i?function(O){O.x=(O.x-n.x)*t,O.y=(n.y-O.y)*e}:function(O){O.x=(O.x-E)/(M-E)*t,O.y=(1-(n.y?O.y/n.y:1))*e})}return s.separation=function(n){return arguments.length?(x=n,s):x},s.size=function(n){return arguments.length?(i=!1,t=+n[0],e=+n[1],s):i?null:[t,e]},s.nodeSize=function(n){return arguments.length?(i=!0,t=+n[0],e=+n[1],s):i?[t,e]:null},s}():si(),this._updateVisuals()),(this.isDirty("orientation")||this.isDirty("inversed")||this.isDirty("nodeSeparation"))&&this._updateVisuals()}_updateVisuals(){if(this._rootNode){const t=this._hierarchyLayout;"vertical"==this.get("orientation")?t.size([this.innerWidth(),this.innerHeight()]):t.size([this.innerHeight(),this.innerWidth()]);const e=this.get("nodeSeparation");e&&t.separation((i,s)=>e(i.data.dataItem,s.data.dataItem)),t(this._rootNode)}super._updateVisuals()}_getPoint(t){const e=this.get("inversed");return"vertical"==this.get("orientation")?e?{x:t.x,y:this.innerHeight()-t.y}:{x:t.x,y:t.y}:e?{x:this.innerWidth()-t.y,y:t.x}:{x:t.y,y:t.x}}}function $i(x){x.x0=Math.round(x.x0),x.y0=Math.round(x.y0),x.x1=Math.round(x.x1),x.y1=Math.round(x.y1)}function ji(){var x=1,t=1,e=0,i=!1;function s(a){var h=a.height+1;return a.x0=a.y0=e,a.x1=x,a.y1=t/h,a.eachBefore(function n(a,h){return function(u){u.children&&function Cs(x,t,e,i,s){for(var a,n=x.children,h=-1,u=n.length,v=x.value&&(i-t)/x.value;++h<u;)(a=n[h]).y0=e,a.y1=s,a.x0=t,a.x1=t+=a.value*v}(u,u.x0,a*(u.depth+1)/h,u.x1,a*(u.depth+2)/h);var v=u.x0,E=u.y0,M=u.x1-e,O=u.y1-e;M<v&&(v=M=(v+M)/2),O<E&&(E=O=(E+O)/2),u.x0=v,u.y0=E,u.x1=M,u.y1=O}}(t,h)),i&&a.eachBefore($i),a}return s.round=function(a){return arguments.length?(i=!!a,s):i},s.size=function(a){return arguments.length?(x=+a[0],t=+a[1],s):[x,t]},s.padding=function(a){return arguments.length?(e=+a,s):e},s}qe.className="Tree",qe.classNames=qt.classNames.concat([qe.className]);class Ai extends Jt{constructor(){super(...arguments),this._tag="partition",this.rectangles=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>b.T._new(this._root,{themeTags:r.kE(this.rectangles.template.get("themeTags",[]),[this._tag,"shape"])},[this.rectangles.template]))),this._partitionLayout=ji()}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["partition",this._settings.orientation||"vertical"]),super._afterNew(),this.setPrivate("scaleX",1),this.setPrivate("scaleY",1)}_prepareChildren(){super._prepareChildren(),this.isDirty("nodePadding")&&this._rootNode&&this._updateNodes(this._rootNode),(this.isPrivateDirty("scaleX")||this.isPrivateDirty("scaleY"))&&this._rootNode&&this._updateNodesScale(this._rootNode),this.isDirty("orientation")&&this._updateVisuals()}_updateVisuals(){if(this._rootNode){const t=this._partitionLayout;let e=this.innerWidth(),i=this.innerHeight();"horizontal"==this.get("orientation")&&([e,i]=[i,e]),t.size([e,i]);const s=this.get("nodePadding");c.Et(s)&&t.padding(s),t(this._rootNode),this._updateNodes(this._rootNode)}}_updateNode(t){super._updateNode(t);const e=t.get("node"),i=t.get("rectangle"),s=t.get("d3HierarchyNode"),n=this.getPrivate("scaleX",1),a=this.getPrivate("scaleY",1);let h,u,v,E;"horizontal"==this.get("orientation")?(h=s.y0*n,u=s.y1*n,v=s.x0*a,E=s.x1*a):(h=s.x0*n,u=s.x1*n,v=s.y0*a,E=s.y1*a);let M=u-h,O=E-v;const I=this.get("animationDuration",0),$=this.get("animationEasing");if(e.animate({key:"x",to:h,duration:I,easing:$}),e.animate({key:"y",to:v,duration:I,easing:$}),e.animate({key:"width",to:M,duration:I,easing:$}),e.animate({key:"height",to:O,duration:I,easing:$}),i){const G=t.get("fill"),F=t.get("fillPattern");i.animate({key:"width",to:M,duration:I,easing:$}),i.animate({key:"height",to:O,duration:I,easing:$}),i._setDefault("fill",G),i._setDefault("fillPattern",F),i._setDefault("stroke",G)}}_updateNodesScale(t){const e=t.data.dataItem;if(e){const i=e.get("node"),s=e.get("rectangle"),n=this.getPrivate("scaleX",1),a=this.getPrivate("scaleY",1);let h,u,v,E;"horizontal"==this.get("orientation")?(h=t.y0*n,u=t.y1*n,v=t.x0*a,E=t.x1*a):(h=t.x0*n,u=t.x1*n,v=t.y0*a,E=t.y1*a);const M=u-h,O=E-v;i.setAll({x:h,y:v,width:M,height:O}),s.setAll({width:M,height:O});const I=t.children;I&&P.__(I,$=>{this._updateNodesScale($)})}}makeNode(t){const e=super.makeNode(t);return this._makeNode(t,e),e}_makeNode(t,e){const i=e.children.moveValue(this.rectangles.make(),0);e.setPrivate("tooltipTarget",i),t.setRaw("rectangle",i),i._setDataItem(t);const s=t.get("label");i.on("width",()=>{s.set("maxWidth",i.width())}),i.on("height",()=>{s.set("maxHeight",i.height())})}_zoom(t){let e=0,i=0,s=0,n=0;const a=this.get("upDepth",0)+1,h=this.get("topDepth",0),u=this.innerWidth(),v=this.innerHeight(),E=this.getPrivate("maxDepth",1),M=v/(E+1),O=u/(E+1),I=Math.min(this.get("initialDepth",1),E);let $=this._currentDownDepth;if(null==$&&($=this.get("downDepth",1)),t){const et=t.get("d3HierarchyNode");let ot=et.depth;"horizontal"==this.get("orientation")?(e=et.y0,i=et.y1,s=et.x0,n=et.x1,e=i-O*a,i=e+O*($+1),ot<h&&(s=0,n=v,e=O*h,i=e+O*I)):(e=et.x0,i=et.x1,s=et.y0,n=et.y1,s=n-M*a,n=s+M*($+1),ot<h&&(e=0,i=u,s=M*h,n=s+M*I))}let G=u/(i-e),F=v/(n-s);const Q=this.get("animationEasing");let q=this.get("animationDuration",0);this.inited||(q=0),this.animatePrivate({key:"scaleX",to:G,duration:q,easing:Q}),this.animatePrivate({key:"scaleY",to:F,duration:q,easing:Q}),this.animate({key:"_d",from:0,to:1,duration:q,easing:Q}),this.nodesContainer.animate({key:"x",to:-e*G,duration:q,easing:Q}),this.nodesContainer.animate({key:"y",to:-s*F,duration:q,easing:Q})}}
1Ai.className="Partition",Ai.classNames=Jt.classNames.concat([Ai.className]);var js=y(39538),Qs=y(91364);class Qi extends Ai{constructor(){super(...arguments),this._tag="sunburst",this._partitionLayout=ji(),this.slices=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>js.J._new(this._root,{themeTags:r.kE(this.slices.template.get("themeTags",[]),[this._tag,"hierarchy","node","shape"])},[this.slices.template]))),this.labels=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>Qs.i._new(this._root,{themeTags:r.kE(this.labels.template.get("themeTags",[]),[this._tag])},[this.labels.template])))}_afterNew(){super._afterNew(),this.nodesContainer.setAll({x:L.yP,y:L.yP}),this.setPrivateRaw("dx",0),this.setPrivateRaw("dr",0)}_prepareChildren(){super._prepareChildren(),(this.isPrivateDirty("dr")||this.isPrivateDirty("dx"))&&this._rootNode&&this._updateNodesScale(this._rootNode)}_updateVisuals(){if(this._rootNode){const t=this._partitionLayout;let e=at.Ki(0,0,this.get("startAngle",0),this.get("endAngle",360),1),i=this.innerWidth(),s=this.innerHeight(),h=Math.min(i/(e.right-e.left),s/(e.bottom-e.top)),u=r.JY(this.get("radius",L.Q2),h),v=r.JY(this.get("innerRadius",0),u);v<0&&(v=u+v),h=u-v,this.setPrivateRaw("innerRadius",v),this.setPrivateRaw("hierarchySize",h),t.size([h,h]),this.nodesContainer.setAll({dy:-u*(e.bottom+e.top)/2,dx:-u*(e.right+e.left)/2});const E=this.get("nodePadding");c.Et(E)&&t.padding(E),t(this._rootNode),this._updateNodes(this._rootNode)}}_updateNode(t){super._updateNode(t);const e=t.get("d3HierarchyNode");t.get("node").setAll({x:0,y:0});const s=this.get("animationDuration",0),n=this.get("animationEasing"),a=this.getPrivate("scaleX",1),h=this.getPrivate("scaleY",1),u=this.getPrivate("dr",0),v=this.getPrivate("dx",0),E=e.x0*a+v,M=e.x1*a+v,O=e.y0*h,I=e.y1*h,$=this.getPrivate("innerRadius"),G=this.getPrivate("hierarchySize",0),F=t.get("slice");if(F){const Q=this.get("startAngle",-90),q=this.get("endAngle",270),et=Q+E/G*(q-Q),ot=Q+M/G*(q-Q)-et;let ft=$+O,wt=$+I;ft-=u,wt-=u,wt=Math.max(0,wt),ft=Math.max(0,ft),F.animate({key:"radius",to:wt,duration:s,easing:n}),F.animate({key:"innerRadius",to:ft,duration:s,easing:n}),F.animate({key:"startAngle",to:et,duration:s,easing:n}),F.animate({key:"arc",to:ot,duration:s,easing:n});const Ot=t.get("fill"),Et=t.get("fillPattern");F._setDefault("fill",Ot),F._setDefault("fillPattern",Et),F._setDefault("stroke",Ot)}}_updateNodesScale(t){const e=t.data.dataItem;if(e){const i=this.getPrivate("scaleX",1),s=this.getPrivate("scaleY",1),n=this.getPrivate("dr",0),a=this.getPrivate("dx",0),h=t.x0*i+a,u=t.x1*i+a,v=t.y0*s,E=t.y1*s,M=this.getPrivate("innerRadius"),O=this.getPrivate("hierarchySize",0),I=e.get("slice");if(I){const G=this.get("startAngle",-90),F=this.get("endAngle",270),Q=G+h/O*(F-G),q=G+u/O*(F-G)-Q;let et=M+v,ot=M+E;et-=n,ot-=n,ot=Math.max(0,ot),et=Math.max(0,et),I.setAll({radius:ot,innerRadius:et,startAngle:Q,arc:q})}const $=t.children;$&&P.__($,G=>{this._updateNodesScale(G)})}}
1_makeNode(t,e){const i=e.children.moveValue(this.slices.make(),0);e.setPrivate("tooltipTarget",i),t.setRaw("slice",i),i._setDataItem(t),i.on("arc",()=>{this._updateLabel(t)}),i.on("innerRadius",()=>{this._updateLabel(t)}),i.on("radius",()=>{this._updateLabel(t)})}_updateLabel(t){const e=t.get("slice"),i=t.get("label");if(e&&i){let s=e.get("innerRadius",0),n=e.get("radius",0),a=e.get("startAngle",0),h=Math.abs(e.get("arc",0)),u=a+h/2,v=i.get("textType"),E=n-s,M=n*h*at.nr;0==s&&h>=360&&"radial"==v&&(n=1,u=0,E*=2,M=E),Math.round(h)>=360&&"radial"==v&&(u=0),"circular"==v&&(E=h*at.nr*(s+(n-s)/2)-10),i.setAll({labelAngle:u}),i.setPrivate("radius",n),i.setPrivate("innerRadius",s),i.setAll({maxHeight:M,maxWidth:E})}}_zoom(t){let e=0,i=0,s=this.getPrivate("hierarchySize",0);const n=t.get("d3HierarchyNode");let a=this.get("upDepth",0),h=this.get("topDepth",0),u=n.depth,v=this.getPrivate("maxDepth",1),E=this._currentDownDepth;null==E&&(E=this.get("downDepth",1));const M=s/(v+1);u<h&&(u=h),u-a<0&&(a=u),e=n.x0,i=n.x1;let O=E+a+1;O>v-h+1&&(O=v-h+1);let I=s/(i-e),$=s/(M*O),G=Math.max(u-a,h)*M*$;const F=this.get("animationEasing");let Q=this.get("animationDuration",0);this.inited||(Q=0);let q=-e*I;this.animatePrivate({key:"scaleX",to:I,duration:Q,easing:F}),this.animatePrivate({key:"scaleY",to:$,duration:Q,easing:F}),this.animatePrivate({key:"dr",to:G,duration:Q,easing:F}),this.animatePrivate({key:"dx",to:q,duration:Q,easing:F})}_handleSingle(t){const e=t.get("parent");if(e){const i=e.get("children");i&&P.__(i,s=>{s!=t&&(this.disableDataItem(s),s.get("node").hide())}),this._handleSingle(e)}}_positionBullet(t){const e=t.get("sprite");if(e){const i=e.dataItem,s=t.get("locationX",.5),n=t.get("locationY",.5),a=i.get("slice"),h=a.get("arc",0),u=a.get("startAngle",0)+a.get("arc",0)*s,v=a.get("innerRadius",0),E=v+(a.get("radius",0)-v)*n;let M=at.gn(u)*E,O=at.F8(u)*E;360===at.LI(h,5)&&0===at.LI(v,2)&&(M=0,O=0),e.set("x",M),e.set("y",O)}}_makeBullet(t,e,i){const s=super._makeBullet(t,e,i);if(s){const n=s.get("sprite"),a=t.get("slice");return n&&a&&(a.on("arc",()=>{this._positionBullet(s)}),a.on("radius",()=>{this._positionBullet(s)})),s}}}Qi.className="Sunburst",Qi.classNames=Ai.classNames.concat([Qi.className]);var Zs={value:()=>{}};function Ns(){for(var i,x=0,t=arguments.length,e={};x<t;++x){if(!(i=arguments[x]+"")||i in e||/[\s.]/.test(i))throw new Error("illegal type: "+i);e[i]=[]}return new Zi(e)}function Zi(x){this._=x}function qs(x,t){for(var s,e=0,i=x.length;e<i;++e)if((s=x[e]).name===t)return s.value}function Bs(x,t,e){for(var i=0,s=x.length;i<s;++i)if(x[i].name===t){x[i]=Zs,x=x.slice(0,i).concat(x.slice(i+1));break}return null!=e&&x.push({name:t,value:e}),x}Zi.prototype=Ns.prototype={constructor:Zi,on:function(x,t){var s,e=this._,i=function Js(x,t){return x.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0&&(i=e.slice(s+1),e=e.slice(0,s)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(x+"",e),n=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++n<a;)if(s=(x=i[n]).type)e[s]=Bs(e[s],x.name,t);else if(null==t)for(s in e)e[s]=Bs(e[s],x.name,null);return this}for(;++n<a;)if((s=(x=i[n]).type)&&(s=qs(e[s],x.name)))return s},copy:function(){var x={},t=this._;for(var e in t)x[e]=t[e].slice();return new Zi(x)},call:function(x,t){if((s=arguments.length-2)>0)for(var s,n,e=new Array(s),i=0;i<s;++i)e[i]=arguments[i+2];if(!this._.hasOwnProperty(x))throw new Error("unknown type: "+x);for(i=0,s=(n=this._[x]).length;i<s;++i)n[i].value.apply(t,e)},apply:function(x,t,e){if(!this._.hasOwnProperty(x))throw new Error("unknown type: "+x);for(var i=this._[x],s=0,n=i.length;s<n;++s)i[s].value.apply(t,e)}};const tn=Ns;var Ji,Li,bi=0,ki=0,Si=0,qi=0,hi=0,ts=0,Ri="object"==typeof performance&&performance.now?performance:Date,Us="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(x){setTimeout(x,17)};function Vs(){return hi||(Us(en),hi=Ri.now()+ts)}function en(){hi=0}function ws(){this._call=this._time=this._next=null}function Ws(x,t,e){var i=new ws;return i.restart(x,t,e),i}function Ys(){hi=(qi=Ri.now())+ts,bi=ki=0;try{!function sn(){Vs(),++bi;for(var t,x=Ji;x;)(t=hi-x._time)>=0&&x._call.call(void 0,t),x=x._next;--bi}()}finally{bi=0,function an(){for(var x,e,t=Ji,i=1/0;t;)t._call?(i>t._time&&(i=t._time),x=t,t=t._next):(e=t._next,t._next=null,t=x?x._next=e:Ji=e);Li=x,Ms(i)}(),hi=0}}function nn(){var x=Ri.now(),t=x-qi;t>1e3&&(ts-=t,qi=x)}function Ms(x){bi||(ki&&(ki=clearTimeout(ki)),x-hi>24?(x<1/0&&(ki=setTimeout(Ys,x-Ri.now()-ts)),Si&&(Si=clearInterval(Si))
1):(Si||(qi=Ri.now(),Si=setInterval(nn,1e3)),bi=1,Us(Ys)))}ws.prototype=Ws.prototype={constructor:ws,restart:function(x,t,e){if("function"!=typeof x)throw new TypeError("callback is not a function");e=(null==e?Vs():+e)+(null==t?0:+t),!this._next&&Li!==this&&(Li?Li._next=this:Ji=this,Li=this),this._call=x,this._time=e,Ms()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ms())}};const Xs=4294967296;function hn(x){return x.x}function cn(x){return x.y}var un=Math.PI*(3-Math.sqrt(5));function zs(x,t,e,i){if(isNaN(t)||isNaN(e))return x;var s,M,O,I,$,G,F,Q,q,n=x._root,a={data:i},h=x._x0,u=x._y0,v=x._x1,E=x._y1;if(!n)return x._root=a,x;for(;n.length;)if((G=t>=(M=(h+v)/2))?h=M:v=M,(F=e>=(O=(u+E)/2))?u=O:E=O,s=n,!(n=n[Q=F<<1|G]))return s[Q]=a,x;if(I=+x._x.call(null,n.data),$=+x._y.call(null,n.data),t===I&&e===$)return a.next=n,s?s[Q]=a:x._root=a,x;do{s=s?s[Q]=new Array(4):x._root=new Array(4),(G=t>=(M=(h+v)/2))?h=M:v=M,(F=e>=(O=(u+E)/2))?u=O:E=O}while((Q=F<<1|G)==(q=($>=O)<<1|I>=M));return s[q]=n,s[Q]=a,x}function Ue(x,t,e,i,s){this.node=x,this.x0=t,this.y0=e,this.x1=i,this.y1=s}function wn(x){return x[0]}function En(x){return x[1]}function Es(x,t,e){var i=new As(t??wn,e??En,NaN,NaN,NaN,NaN);return null==x?i:i.addAll(x)}function As(x,t,e,i,s,n){this._x=x,this._y=t,this._x0=e,this._y0=i,this._x1=s,this._y1=n,this._root=void 0}function Hs(x){for(var t={data:x.data},e=t;x=x.next;)e=e.next={data:x.data};return t}var Ve=Es.prototype=As.prototype;function We(x){return function(){return x}}function ni(x){return 1e-6*(x()-.5)}function kn(x){return x.x+x.vx}
vendor: 4,990 bytes, line 1
1function Sn(x){return x.y+x.vy}function Rn(x){return x.index}function Gs(x,t){var e=x.get(t);if(!e)throw new Error("node not found: "+t);return e}function ks(x){var i,n,a,h,u,v,t=Rn,e=function M(F){return 1/Math.min(h[F.source.index],h[F.target.index])},s=We(30),E=1;function O(F){for(var Q=0,q=x.length;Q<E;++Q)for(var ot,ft,wt,Ot,Et,At,Ft,et=0;et<q;++et)Ot=(wt=(ot=x[et]).target).x+wt.vx-(ft=ot.source).x-ft.vx||ni(v),Et=wt.y+wt.vy-ft.y-ft.vy||ni(v),Et*=At=((At=Math.sqrt(Ot*Ot+Et*Et))-n[et])/At*F*i[et],wt.vx-=(Ot*=At)*(Ft=u[et]),wt.vy-=Et*Ft,ft.vx+=Ot*(Ft=1-Ft),ft.vy+=Et*Ft}function I(){if(a){var F,ot,Q=a.length,q=x.length,et=new Map(a.map((ft,wt)=>[t(ft,wt,a),ft]));for(F=0,h=new Array(Q);F<q;++F)(ot=x[F]).index=F,"object"!=typeof ot.source&&(ot.source=Gs(et,ot.source)),"object"!=typeof ot.target&&(ot.target=Gs(et,ot.target)),h[ot.source.index]=(h[ot.source.index]||0)+1,h[ot.target.index]=(h[ot.target.index]||0)+1;for(F=0,u=new Array(q);F<q;++F)u[F]=h[(ot=x[F]).source.index]/(h[ot.source.index]+h[ot.target.index]);i=new Array(q),$(),n=new Array(q),G()}}function $(){if(a)for(var F=0,Q=x.length;F<Q;++F)i[F]=+e(x[F],F,x)}function G(){if(a)for(var F=0,Q=x.length;F<Q;++F)n[F]=+s(x[F],F,x)}return null==x&&(x=[]),O.initialize=function(F,Q){a=F,v=Q,I()},O.links=function(F){return arguments.length?(x=F,I(),O):x},O.id=function(F){return arguments.length?(t=F,O):t},O.iterations=function(F){return arguments.length?(E=+F,O):E},O.strength=function(F){return arguments.length?(e="function"==typeof F?F:We(+F),$(),O):e},O.distance=function(F){return arguments.length?(s="function"==typeof F?F:We(+F),G(),O):s},O}Ve.copy=function(){var e,i,x=new As(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root;if(!t)return x;if(!t.length)return x._root=Hs(t),x;for(e=[{source:t,target:x._root=new Array(4)}];t=e.pop();)for(var s=0;s<4;++s)(i=t.source[s])&&(i.length?e.push({source:i,target:t.target[s]=new Array(4)}):t.target[s]=Hs(i));return x},Ve.add=function gn(x){const t=+this._x.call(null,x),e=+this._y.call(null,x);return zs(this.cover(t,e),t,e,x)},Ve.addAll=function fn(x){var t,e,s,n,i=x.length,a=new Array(i),h=new Array(i),u=1/0,v=1/0,E=-1/0,M=-1/0;for(e=0;e<i;++e)isNaN(s=+this._x.call(null,t=x[e]))||isNaN(n=+this._y.call(null,t))||(a[e]=s,h[e]=n,s<u&&(u=s),s>E&&(E=s),n<v&&(v=n),n>M&&(M=n));if(u>E||v>M)return this;for(this.cover(u,v).cover(E,M),e=0;e<i;++e)zs(this,a[e],h[e],x[e]);return this},Ve.cover=function _n(x,t){if(isNaN(x=+x)||isNaN(t=+t))return this;var e=this._x0,i=this._y0,s=this._x1,n=this._y1;if(isNaN(e))s=(e=Math.floor(x))+1,n=(i=Math.floor(t))+1;else{for(var u,v,a=s-e||1,h=this._root;e>x||x>=s||i>t||t>=n;)switch(v=(t<i)<<1|x<e,u=new Array(4),u[v]=h,h=u,a*=2,v){case 0:s=e+a,n=i+a;break;case 1:e=s-a,n=i+a;break;case 2:s=e+a,i=n-a;break;case 3:e=s-a,i=n-a}this._root&&this._root.length&&(this._root=h)}return this._x0=e,this._y0=i,this._x1=s,this._y1=n,this},Ve.data=function mn(){var x=[];return this.visit(function(t){if(!t.length)do{x.push(t.data)}while(t=t.next)}),x},Ve.extent=function vn(x){return arguments.length?this.cover(+x[0][0],+x[0][1]).cover(+x[1][0],+x[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ve.find=function yn(x,t,e){var i,a,h,u,v,$,G,s=this._x0,n=this._y0,E=this._x1,M=this._y1,O=[],I=this._root;for(I&&O.push(new Ue(I,s,n,E,M)),null==e?e=1/0:(s=x-e,n=t-e,E=x+e,M=t+e,e*=e);$=O.pop();)if(!(!(I=$.node)||(a=$.x0)>E||(h=$.y0)>M||(u=$.x1)<s||(v=$.y1)<n))if(I.length){var F=(a+u)/2,Q=(h+v)/2;O.push(new Ue(I[3],F,Q,u,v),new Ue(I[2],a,Q,F,v),new Ue(I[1],F,h,u,Q),new Ue(I[0],a,h,F,Q)),(G=(t>=Q)<<1|x>=F)&&($=O[O.length-1],O[O.length-1]=O[O.length-1-G],O[O.length-1-G]=$)}else{var q=x-+this._x.call(null,I.data),et=t-+this._y.call(null,I.data),ot=q*q+et*et;if(ot<e){var ft=Math.sqrt(e=ot);s=x-ft,n=t-ft,E=x+ft,M=t+ft,i=I.data}}return i},Ve.remove=function xn(x){if(isNaN(E=+this._x.call(null,x))||isNaN(M=+this._y.call(null,x)))return this;var t,i,s,n,E,M,O,I,$,G,F,Q,e=this._root,a=this._x0,h=this._y0,u=this._x1,v=this._y1;if(!e)return this;if(e.length)for(;;){if(($=E>=(O=(a+u)/2))?a=O:u=O,(G=M>=(I=(h+v)/2))?h=I:v=I,t=e,!(e=e[F=G<<1|$]))return this;if(!e.length)break;(t[F+1&3]||t[F+2&3]||t[F+3&3])&&(i=t,Q=F)}for(;e.data!==x;)if(s=e,!(e=e.next))return this;return(n=e.next)&&delete e.next,s?(n?s.next=n:delete s.next,this):t?(n?t[F]=n:delete t[F],(e=t[0]||t[1]||t[2]||t[3])&&e===(t[3]||t[2]||t[1]||t[0])&&!e.length&&(i?i[Q]=e:this._root=e),this):(this._root=n,this)},Ve.removeAll=function bn(x){for(var t=0,e=x.length;t<e;++t)this.remove(x[t]);return this},Ve.root=function Dn(){return this._root},Ve.size=function Tn(){var x=0;return this.visit(function(t){if(!t.length)do{++x}while(t=t.next)}),x},Ve.visit=function Pn(x){var e,s,n,a,h,u,t=[],i=this._root;for(i&&t.push(new Ue(i,this._x0,this._y0,this._x1,this._y1));e=t.pop();)if(!x(i=e.node,n=e.x0,a=e.y0,h=e.x1,u=e.y1)&&i.length){var v=(n+h)/2,E=(a+u)/2;(s=i[3])&&t.push(new Ue(s,v,E,h,u)),(s=i[2])&&t.push(new Ue(s,n,E,v,u)),(s=i[1])&&t.pu
1sh(new Ue(s,v,a,h,E)),(s=i[0])&&t.push(new Ue(s,n,a,v,E))}return this},Ve.visitAfter=function Cn(x){var i,t=[],e=[];for(this._root&&t.push(new Ue(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var s=i.node;if(s.length){var n,a=i.x0,h=i.y0,u=i.x1,v=i.y1,E=(a+u)/2,M=(h+v)/2;(n=s[0])&&t.push(new Ue(n,a,h,E,M)),(n=s[1])&&t.push(new Ue(n,E,h,u,M)),(n=s[2])&&t.push(new Ue(n,a,M,E,v)),(n=s[3])&&t.push(new Ue(n,E,M,u,v))}e.push(i)}for(;i=e.pop();)x(i.node,i.x0,i.y0,i.x1,i.y1);return this},Ve.x=function Mn(x){return arguments.length?(this._x=x,this):this._x},Ve.y=function An(x){return arguments.length?(this._y=x,this):this._y};class es extends qt{constructor(){super(...arguments),this._tag="forcedirected",this.d3forceSimulation=function pn(x){var t,e=1,i=.001,s=1-Math.pow(i,1/300),n=0,a=.6,h=new Map,u=Ws(M),v=tn("tick","end"),E=function ln(){let x=1;return()=>(x=(1664525*x+1013904223)%Xs)/Xs}();function M(){O(),v.call("tick",t),e<i&&(u.stop(),v.call("end",t))}function O(G){var F,q,Q=x.length;void 0===G&&(G=1);for(var et=0;et<G;++et)for(e+=(n-e)*s,h.forEach(function(ot){ot(e)}),F=0;F<Q;++F)null==(q=x[F]).fx?q.x+=q.vx*=a:(q.x=q.fx,q.vx=0),null==q.fy?q.y+=q.vy*=a:(q.y=q.fy,q.vy=0);return t}function I(){for(var Q,G=0,F=x.length;G<F;++G){if((Q=x[G]).index=G,null!=Q.fx&&(Q.x=Q.fx),null!=Q.fy&&(Q.y=Q.fy),isNaN(Q.x)||isNaN(Q.y)){var q=10*Math.sqrt(.5+G),et=G*un;Q.x=q*Math.cos(et),Q.y=q*Math.sin(et)}(isNaN(Q.vx)||isNaN(Q.vy))&&(Q.vx=Q.vy=0)}}function $(G){return G.initialize&&G.initialize(x,E),G}return null==x&&(x=[]),I(),t={tick:O,restart:function(){return u.restart(M),t},stop:function(){return u.stop(),t},nodes:function(G){return arguments.length?(x=G,I(),h.forEach($),t):x},alpha:function(G){return arguments.length?(e=+G,t):e},alphaMin:function(G){return arguments.length?(i=+G,t):i},alphaDecay:function(G){return arguments.length?(s=+G,t):+s},alphaTarget:function(G){return arguments.length?(n=+G,t):n},velocityDecay:function(G){return arguments.length?(a=1-G,t):1-a},randomSource:function(G){return arguments.length?(E=G,h.forEach($),t):E},force:function(G,F){return arguments.length>1?(null==F?h.delete(G):h.set(G,$(F)),t):h.get(G)},find:function(G,F,Q){var ot,ft,wt,Ot,Et,q=0,et=x.length;for(null==Q?Q=1/0:Q*=Q,q=0;q<et;++q)(wt=(ot=G-(Ot=x[q]).x)*ot+(ft=F-Ot.y)*ft)<Q&&(Et=Ot,Q=wt);return Et},on:function(G,F){return arguments.length>1?(v.on(G,F),t):v.on(G)}}}(),this.collisionForce=function Ln(x){var t,e,i,s=1,n=1;function a(){for(var v,M,O,I,$,G,F,E=t.length,Q=0;Q<n;++Q)for(M=Es(t,kn,Sn).visitAfter(h),v=0;v<E;++v)F=(G=e[(O=t[v]).index])*G,I=O.x+O.vx,$=O.y+O.vy,M.visit(q);function q(et,ot,ft,wt,Ot){var Et=et.data,At=et.r,Ft=G+At;if(!Et)return ot>I+Ft||wt<I-Ft||ft>$+Ft||Ot<$-Ft;if(Et.index>O.index){var Vt=I-Et.x-Et.vx,te=$-Et.y-Et.vy,Zt=Vt*Vt+te*te;Zt<Ft*Ft&&(0===Vt&&(Zt+=(Vt=ni(i))*Vt),0===te&&(Zt+=(te=ni(i))*te),Zt=(Ft-(Zt=Math.sqrt(Zt)))/Zt*s,O.vx+=(Vt*=Zt)*(Ft=(At*=At)/(F+At)),O.vy+=(te*=Zt)*Ft,Et.vx-=Vt*(Ft=1-Ft),Et.vy-=te*Ft)}}}function h(v){if(v.data)return v.r=e[v.data.index];for(var E=v.r=0;E<4;++E)v[E]&&v[E].r>v.r&&(v.r=v[E].r)}function u(){if(t){var v,M,E=t.length;for(e=new Array(E),v=0;v<E;++v)e[(M=t[v]).index]=+x(M,v,t)}}return"function"!=typeof x&&(x=We(null==x?1:+x)),a.initialize=function(v,E){t=v,i=E,u()},a.iterations=function(v){return arguments.length?(n=+v,a):n},a.strength=function(v){return arguments.length?(s=+v,a):s},a.radius=function(v){return arguments.length?(x="function"==typeof v?v:We(+v),u(),a):x},a}(20),this.linkForce=ks(),this._nodes=[],this._links=[],this._tick=0,this._nodesDirty=!1}_afterNew(){super._afterNew(),this.d3forceSimulation.on("tick",()=>{this._tick++,this.updateNodePositions()})}_prepareChildren(){super._prepareChildren(),this.isDirty("showOnFrame")&&this.get("showOnFrame")>this._tick&&(this.nodesContainer.setPrivate("visible",!1),this.linksContainer.setPrivate("visible",!1));const t=this.d3forceSimulation;this.isDirty("velocityDecay")&&t.velocityDecay(this.get("velocityDecay",0)),this.isDirty("initialFrames")&&t.alphaDecay(1-Math.pow(.001,1/this.get("initialFrames",500)))}restartSimulation(t){const e=this.d3forceSimulation;e.alpha()<.25&&(e.alpha(t),e.restart())}_handleRadiusChange(){this._updateForces()}processDataItem(t){const e={index:this._index,x:this.innerWidth()/2,y:this.innerHeight()/2,dataItem:t},i=this._nodes.push(e)-1;e.index=i,this.d3forceSimulation.nodes(this._nodes),t.set("d3ForceNode",e),super.processDataItem(t);const s=t.get("node");s.set("x",-1e4),s.on("scale",()=>{this._updateForces()}),s.events.on("dragged",()=>{e.fx=s.x(),e.fy=s.y(),this._updateForces()}),s.events.on("dragstop",()=>{null==t.get("x")&&(e.fx=void 0),null==t.get("y")&&(e.fy=void 0)})}
1_updateValues(t){super._updateValues(t),this._nodesDirty=!0;const e=this.d3forceSimulation;e.force("collision",this.collisionForce),e.nodes(this._nodes),this.linkForce=ks(this._links),e.force("link",this.linkForce)}_updateVisuals(){super._updateVisuals(),this.restartSimulation(.3)}_updateChildren(){super._updateChildren();const t=this.d3forceSimulation;if(this._sizeDirty){let e=Math.max(50,this.innerWidth()),i=Math.max(50,this.innerHeight()),s=this.get("paddingTop",0),n=this.get("paddingLeft",0),a=this.get("centerStrength",1);t.force("x",function On(x){var e,i,s,t=We(.1);function n(h){for(var E,u=0,v=e.length;u<v;++u)(E=e[u]).vx+=(s[u]-E.x)*i[u]*h}function a(){if(e){var h,u=e.length;for(i=new Array(u),s=new Array(u),h=0;h<u;++h)i[h]=isNaN(s[h]=+x(e[h],h,e))?0:+t(e[h],h,e)}}return"function"!=typeof x&&(x=We(null==x?0:+x)),n.initialize=function(h){e=h,a()},n.strength=function(h){return arguments.length?(t="function"==typeof h?h:We(+h),a(),n):t},n.x=function(h){return arguments.length?(x="function"==typeof h?h:We(+h),a(),n):x},n}().x(e/2+n).strength(100*a/e)),t.force("y",function In(x){var e,i,s,t=We(.1);function n(h){for(var E,u=0,v=e.length;u<v;++u)(E=e[u]).vy+=(s[u]-E.y)*i[u]*h}function a(){if(e){var h,u=e.length;for(i=new Array(u),s=new Array(u),h=0;h<u;++h)i[h]=isNaN(s[h]=+x(e[h],h,e))?0:+t(e[h],h,e)}}return"function"!=typeof x&&(x=We(null==x?0:+x)),n.initialize=function(h){e=h,a()},n.strength=function(h){return arguments.length?(t="function"==typeof h?h:We(+h),a(),n):t},n.y=function(h){return arguments.length?(x="function"==typeof h?h:We(+h),a(),n):x},n}().y(i/2+s).strength(100*a/i))}this._nodesDirty&&this._updateForces()}_updateForces(){this.d3forceSimulation.force("manybody",function Nn(){var x,t,e,i,n,s=We(-30),a=1,h=1/0,u=.81;function v(I){var $,G=x.length,F=Es(x,hn,cn).visitAfter(M);for(i=I,$=0;$<G;++$)t=x[$],F.visit(O)}function E(){if(x){var I,G,$=x.length;for(n=new Array($),I=0;I<$;++I)n[(G=x[I]).index]=+s(G,I,x)}}function M(I){var G,F,q,et,ot,$=0,Q=0;if(I.length){for(q=et=ot=0;ot<4;++ot)(G=I[ot])&&(F=Math.abs(G.value))&&($+=G.value,Q+=F,q+=F*G.x,et+=F*G.y);I.x=q/Q,I.y=et/Q}else{(G=I).x=G.data.x,G.y=G.data.y;do{$+=n[G.data.index]}while(G=G.next)}I.value=$}function O(I,$,G,F){if(!I.value)return!0;var Q=I.x-t.x,q=I.y-t.y,et=F-$,ot=Q*Q+q*q;if(et*et/u<ot)return ot<h&&(0===Q&&(ot+=(Q=ni(e))*Q),0===q&&(ot+=(q=ni(e))*q),ot<a&&(ot=Math.sqrt(a*ot)),t.vx+=Q*I.value*i/ot,t.vy+=q*I.value*i/ot),!0;if(!(I.length||ot>=h)){(I.data!==t||I.next)&&(0===Q&&(ot+=(Q=ni(e))*Q),0===q&&(ot+=(q=ni(e))*q),ot<a&&(ot=Math.sqrt(a*ot)));do{I.data!==t&&(t.vx+=Q*(et=n[I.data.index]*i/ot),t.vy+=q*et)}while(I=I.next)}}return v.initialize=function(I,$){x=I,e=$,E()},v.strength=function(I){return arguments.length?(s="function"==typeof I?I:We(+I),E(),v):s},v.distanceMin=function(I){return arguments.length?(a=I*I,v):Math.sqrt(a)},v.distanceMax=function(I){return arguments.length?(h=I*I,v):Math.sqrt(h)},v.theta=function(I){return arguments.length?(u=I*I,v):Math.sqrt(u)},v}().strength(e=>{let i=e.dataItem,s=i.get("node"),n=i.get("circle"),a=this.get("manyBodyStrength",-15);return n?n.get("radius",1)*s.get("scale",1)*a:0})),this.collisionForce.radius(e=>{let i=e.dataItem,s=i.get("node"),n=i.get("circle"),a=i.get("outerCircle");if(n&&a){let h=n.get("radius",1);return a.isHidden()||(h*=a.get("scale",1.1)),h*=s.get("scale",1),h+this.get("nodePadding",0)}}),this.restartSimulation(.3)}_animatePositions(t){}_clearDirty(){super._clearDirty(),this._nodesDirty=!1}updateNodePositions(){const t=this.linkForce;t&&(t.distance(i=>this.getDistance(i)),t.strength(i=>this.getStrength(i))),this._tick==this.get("showOnFrame")&&(this.nodesContainer.setPrivate("visible",!0),this.linksContainer.setPrivate("visible",!0));let e=this.d3forceSimulation.nodes();P.__(e,i=>{const n=i.dataItem.get("node");n.set("x",i.x),n.set("y",i.y)})}updateLinkWith(t){P.__(t,e=>{const i=e.get("linkWith");i&&P.__(i,n=>{const a=this._getDataItemById(this.dataItems,n);a&&this.linkDataItems(e,a,this.get("linkWithStrength"))});const s=e.get("children");s&&this.updateLinkWith(s)})}getDistance(t){let e=t.sourceDataItem,i=t.targetDataItem,s=0;if(e&&i){const n=i.get("node");if(n.isHidden())return 0;let a=t.link;a&&(s=a.get("distance",1));const h=e.get("node");
1return n.isHidden()&&(s=1),s*(e.get("circle").get("radius",1)*h.get("scale",1)+i.get("circle").get("radius",1)*n.get("scale",1))}return s}getStrength(t){let e=0,i=t.link;return i&&(e=i.get("strength",1)),e*=t.targetDataItem.get("node").get("scale"),e}_updateNode(t){super._updateNode(t),this._updateRadius(t);const e=t.get("x"),i=t.get("y"),s=t.get("d3ForceNode");s.fx=null!=e?r.JY(e,this.innerWidth()):void 0,null!=i?s.fy=r.JY(i,this.innerHeight()):s.fx=void 0}_updateRadius(t){let e=(this.innerWidth()+this.innerHeight())/2,i=r.JY(this.get("minRadius",1),e),s=r.JY(this.get("maxRadius",5),e),n=t.get("sum"),a=s;const h=this.getPrivate("valueLow",0),u=this.getPrivate("valueHigh",0);u>0&&(a=i+(n-h)/(u-h)*(s-i)),c.Et(a)||(a=i);const v=this.get("animationDuration",0),E=this.get("animationEasing");t.get("circle").animate({key:"radius",to:a,duration:v,easing:E})}_processLink(t,e,i){const s={link:t,source:e.get("d3ForceNode").index,target:i.get("d3ForceNode").index,sourceDataItem:e,targetDataItem:i};this._links.push(s),t.setPrivate("d3Link",s),this.linkForce=ks(this._links),this.d3forceSimulation.force("link",this.linkForce),this.restartSimulation(.5)}_disposeLink(t){super._disposeLink(t),P.TF(this._links,t.getPrivate("d3Link"))}_handleUnlink(){this.restartSimulation(.5)}_onDataClear(){super._onDataClear(),this._nodes=[],this._links=[]}}es.className="ForceDirected",es.classNames=qt.classNames.concat([es.className]);var ae=y(77984);class Ks extends it.S{setupDefaultRules(){super.setupDefaultRules();const t=this._root.interfaceColors,e=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:gt.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1}),i("XYSeries").setAll({legendLabelText:"{name}"}),i("Rectangle",["plotbackground","xy","background"]).setAll({fill:A.Q1.fromHex(0),fillOpacity:0}),i("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:gt.new(this._root,{saturation:0})});{const u=i("Graphics",["scrollbar","overlay"]);u.setAll({fillOpacity:.5}),(0,N.w)(u,"fill",t,"background")}i("RoundedRectangle",["xy","scrollbar","thumb"]).setAll({cornerRadiusTR:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusBL:0,fillOpacity:0,focusable:!0}),i("RoundedRectangle",["xy","scrollbar","thumb"]).states.create("hover",{fillOpacity:.4}),i("RoundedRectangle",["xy","scrollbar","chart","background"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,
1cornerRadiusTR:0,cornerRadiusBR:0}),i("RoundedRectangle",["xy","scrollbar","chart","background","resize","button"]).setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),i("AxisRendererX",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0}),i("AxisRendererY",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0,minGridDistance:5}),i("AxisLabel",["xy","scrollbar","x"]).setAll({opacity:.5,centerY:L.Q2,minPosition:.01,maxPosition:.99,fontSize:"0.8em"}),i("AxisLabel",["category"]).setAll({text:"{category}",populateText:!0}),i("AxisLabel",["x"]).setAll({centerY:0}),i("AxisLabel",["x","inside"]).setAll({centerY:L.Q2}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:L.Q2}),i("AxisLabel",["y"]).setAll({centerX:L.Q2}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:L.Q2}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["minor"]).setAll({fontSize:"0.6em"}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}
1),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{const u=i("Grid",["cursor","x"]);u.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use left and right arrows to move selection")}),(0,N.w)(u,"stroke",t,"alternativeBackground")}{const u=i("Grid",["cursor","y"]);u.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use up and down arrows to move selection")}),(0,N.w)(u,"stroke",t,"alternativeBackground")}{const u=i("Graphics",["cursor","selection"]);u.setAll({fillOpacity:.15}),(0,N.w)(u,"fill",t,"alternativeBackground")}i("Axis").setAll({zoomOut:!0,start:0,end:1,minZoomCount:1,maxZoomCount:1/0,maxZoomFactor:1e3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0}),i("AxisLabel").setAll({location:.5,multiLocation:0,centerX:L.yP,centerY:L.yP,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{const u=i("AxisRenderer");u.setAll({crisp:!0,strokeOpacity:0}),(0,N.w)(u,"stroke",t,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:L.Q2}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:L.Q2});{const u=i("Rectangle",["axis","thumb","zoomgrip"]);u.setAll({fillOpacity:0}),(0,N.w)(u,"fill",t,"alternativeBackground"),u.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x","zoomgrip"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y","zoomgrip"]).setAll({cursorOverStyle:"ns-resize"});{const u=i("Grid");u.setAll({location:0,strokeOpacity:.15,crisp:!0}),(0,N.w)(u,"stroke",t,"grid")}{const u=i("Grid",["minor"]);u.setAll({location:0,strokeOpacity:.07,crisp:!0}),(0,N.w)(u,"stroke",t,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{const u=i("Graphics",["axis","fill"]);u.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),(0,N.w)(u,"fill",t,"alternativeBackground")}i("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}),i("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0}),i("Grid",["series","range"]).setAll({visible:!1}),i("AxisTick",["series","range"]).setAll({visible:!1}),i("AxisLabel",["series","range"]).setAll({visible:!1});{const u=i("AxisTick");u.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),(0,N.w)(u,"stroke",t,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(u,v)=>{const E=u.get("axisFill");E&&(c.Et(v)&&v%2!=0?E.setPrivate("visible",!1):E.setPrivate("visible",!0))}});const s=[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}],n={millisecond:e.translate("_date_millisecond"),second:e.translate("_date_second"),minute:e.translate("_date_minute"),hour:e.translate("_date_hour"),day:e.translate("_date_day"),week:e.translate("_date_day"),month:e.translate("_date_month"),year:e.translate("_date_year")},a={millisecond:e.translate("_date_millisecond"),second:e.translate("_date_second"),minute:e.translate("_date_minute"),hour:e.translate("_date_day"),day:e.translate("_date_day"),week:e.translate("_date_day"),month:e.translate("_date_month")+" "+e.translate("_date_year"),year:e.translate("_date_year")},h={millisecond:e.translate("_date_millisecond_full"),second:e.translate("_date_second_full"),minute:e.translate("_date_minute_full"),hour:e.translate("_date_hour_full"),day:e.translate("_date_day_full"),week:e.translate("_date_week_full"),month:e.translate("_date_month_full"),year:e.translate("_date_year")};i("CategoryDateAxis").setAll({markUnitChange:!0,gridIntervals:P.C(s),dateFormats:l.C(n),periodChangeDateFormats:l.C(a)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,skipFirstMinor:!0,weekLabelLocation:0,gridIntervals:P.C(s),dateFormats:l.C(n),periodChangeDateFormats:l.C(a),tooltipDateFormats:h,groupIntervals:[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}],fillRule:u=>{const v=u.get("axisFill");
1if(v){const E=u.component,M=u.get("value"),O=u.get("endValue"),I=E.intervalDuration(),$=E.getPrivate("baseInterval"),G=E.getPrivate("gridInterval",$);let F=E.getPrivate("min",0);if(F=ae.LI(new Date(F),G.timeUnit,G.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),null!=M&&null!=O){const Q=Math.round(Math.round((M-F)/I))/2;Q==Math.round(Q)?v.setPrivate("visible",!0):v.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:u=>{const v=u.get("axisFill");if(v){const E=u.get("index");let M=!1;(!c.Et(E)||E%2==0)&&(M=!0),v.setPrivate("visible",M)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:u=>{const v=u.get("axisFill");if(v){const E=u.component,M=u.get("value"),O=E.getPrivate("step");c.Et(M)&&c.Et(O)&&(at.LI(M/O/2,5)==Math.round(M/O/2)?v.setPrivate("visible",!1):v.setPrivate("visible",!0))}}}),i("DurationAxis").setAll({baseUnit:"second"}),i("XYSeries").setAll({maskBullets:!0,stackToNegative:!0,locationX:.5,locationY:.5,snapTooltip:!1,openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close",seriesTooltipTarget:"series"}),i("BaseColumnSeries").setAll({adjustBulletPosition:!0}),i("ColumnSeries").setAll({clustered:!0}),i("RoundedRectangle",["series","column"]).setAll({position:"absolute",isMeasured:!1,width:(0,L.KN)(70),height:(0,L.KN)(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,
1cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("LineSeries").setAll({connect:!0,autoGapCount:1.1,stackToNegative:!1}),i("Graphics",["series","stroke"]).setAll({position:"absolute",strokeWidth:1,strokeOpacity:1,isMeasured:!1}),i("Graphics",["series","fill"]).setAll({visible:!1,fillOpacity:0,position:"absolute",strokeWidth:0,strokeOpacity:0,isMeasured:!1}),i("Graphics",["line","series","legend","marker","stroke"]).setAll({draw:(u,v)=>{const E=v.parent;if(E){const M=E.height(),O=E.width();u.moveTo(0,M/2),u.lineTo(O,M/2)}}});{const u=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});(0,N.w)(u,"stroke",t,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(u,v)=>{const E=v.parent;if(E){const M=E.height(),O=E.width();u.moveTo(0,0),u.lineTo(O,0),u.lineTo(O,M),u.lineTo(0,M),u.lineTo(0,0)}}});{const u=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});(0,N.w)(u,"stroke",t,"disabled")}i("SmoothedXYLineSeries").setAll({tension:.5}),i("SmoothedXLineSeries").setAll({tension:.5}),i("SmoothedYLineSeries").setAll({tension:.5}),i("Candlestick").setAll({position:"absolute",isMeasured:!1,width:(0,L.KN)(50),height:(0,L.KN)(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,
1cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:(0,L.KN)(80),height:(0,L.KN)(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{const u=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});(0,N.w)(u,"fill",t,"positive"),(0,N.w)(u,"stroke",t,"positive")}{const u=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});(0,N.w)(u,"fill",t,"negative"),(0,N.w)(u,"stroke",t,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{const u=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});(0,N.w)(u,"fill",t,"positive"),(0,N.w)(u,"stroke",t,"positive")}{const u=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});(0,N.w)(u,"fill",t,"negative"),(0,N.w)(u,"stroke",t,"negative")}i("RoundedRectangle",["rangegrip"]).setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12});{const u=i("Graphics",["rangegrip","button","icon"]);u.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:v=>{v.moveTo(0,.5),v.lineTo(0,12.5),v.moveTo(2,.5),v.lineTo(2,12.5),v.moveTo(4,.5),v.lineTo(4,12.5)}}),(0,N.w)(u,"stroke",t,"secondaryButtonText")}i("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0}),i("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:L.yP}),i("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:L.yP}),i("Button",["rangegrip","vertical","left"]).setAll({centerY:L.Q2}),i("Button",["rangegrip","vertical","right"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","top"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","bottom"]).setAll({centerY:L.Q2})}}var Oi=y(28973);class Ii extends nt{constructor(){super(...arguments),this.xAxes=new U.fo,this.yAxes=new U.fo,this.topAxesContainer=this.chartContainer.children.push(m.m.new(this._root,{width:L.Q2,layout:this._root.verticalLayout})),this.yAxesAndPlotContainer=this.chartContainer.children.push(m.m.new(this._root,{width:L.Q2,height:L.Q2,layout:this._root.horizontalLayout})),this.bottomAxesContainer=this.chartContainer.children.push(m.m.new(this._root,{width:L.Q2,layout:this._root.verticalLayout})),this.leftAxesContainer=this.yAxesAndPlotContainer.children.push(m.m.new(this._root,{height:L.Q2,layout:this._root.horizontalLayout})),this.plotsContainer=this.yAxesAndPlotContainer.children.push(m.m.new(this._root,{width:L.Q2,height:L.Q2,maskContent:!1})),this.plotContainer=this.plotsContainer.children.push(m.m.new(this._root,{width:L.Q2,height:L.Q2})),this.topPlotContainer=this.plotsContainer.children.push(m.m.new(this._root,{width:L.Q2,height:L.Q2})),this.gridContainer=this.plotContainer.children.push(m.m.new(this._root,{width:L.Q2,height:L.Q2,isMeasured:!1})),this.topGridContainer=m.m.new(this._root,{width:L.Q2,height:L.Q2,isMeasured:!1}),this.rightAxesContainer=this.yAxesAndPlotContainer.children.push(m.m.new(this._root,{height:L.Q2,layout:this._root.horizontalLayout})),this.axisHeadersContainer=this.plotContainer.children.push(m.m.new(this._root,{})),this.zoomOutButton=this.topPlotContainer.children.push(T.$.new(this._root,{themeTags:["zoom"],icon:V.A.new(this._root,{themeTags:["button","icon"]})})),this._movePoint={x:0,y:0},this._movePoints={}}_afterNew(){this._defaultThemes.push(Ks.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);const t=this._root;let e=this._root.verticalLayout;const i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default").set("opacity",1),this.chartContainer.set("layout",e);const s=this.plotContainer;s.children.push(this.seriesContainer),this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer)),this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)),s.children.push(this.topGridContainer),s.children.push(this.bulletsContainer),s.set("interactive",!0),s.set("interactiveChildren",!1),s.set("background",Y.M.new(t,{themeTags:["plotbackground","xy","background"]}
1)),this._disposers.push(s.events.on("pointerdown",n=>{this._handlePlotDown(n)})),this._disposers.push(s.events.on("globalpointerup",n=>{this._handlePlotUp(n)})),this._disposers.push(s.events.on("globalpointermove",n=>{this._handlePlotMove(n)})),this._maskGrid(),this._setUpTouch()}_beforeChanged(){super._beforeChanged(),(this.isDirty("pinchZoomX")||this.isDirty("pinchZoomY")||this.get("panX")||this.get("panY"))&&this._setUpTouch()}_setUpTouch(){this.plotContainer._display.cancelTouch||(this.plotContainer._display.cancelTouch=!!(this.get("pinchZoomX")||this.get("pinchZoomY")||this.get("panX")||this.get("panY")))}_maskGrid(){this.gridContainer.set("maskContent",!0),this.topGridContainer.set("maskContent",!0)}_removeSeries(t){t._unstack(),t._posXDp&&t._posXDp.dispose(),t._posYDp&&t._posYDp.dispose(),t.set("baseAxis",void 0);const e=t.get("xAxis");e&&(P.TF(e.series,t),e.markDirtyExtremes());const i=t.get("yAxis");i&&(P.TF(i.series,t),i.markDirtyExtremes());const s=this.get("cursor");if(s){const n=s.get("snapToSeries");n&&P.TF(n,t)}super._removeSeries(t)}_applyThemes(t=!1){const e=this.get("colors");return e&&e.reset(),super._applyThemes(t)}handleWheel(t){const e=this.get("wheelX"),i=this.get("wheelY"),s=this.plotContainer,n=t.originalEvent;let a=!1;if(!r.ay(n,this))return;a=!0;const h=s.toLocal(t.point),u=this.get("wheelStep",.2),v=n.deltaY/100,E=n.deltaX/100,M=this.get("wheelZoomPositionX"),O=this.get("wheelZoomPositionY");("zoomX"===e||"zoomXY"===e)&&0!=E&&this.xAxes.each(I=>{if(I.get("zoomX")){let $=I.get("start"),G=I.get("end"),F=I.fixPosition(h.x/s.width());null!=M&&(F=M);let Q=I.get("maxDeviation",0),q=Math.min(1+Q,Math.max(-Q,$-u*(G-$)*E*F)),et=Math.max(-Q,Math.min(1+Q,G+u*(G-$)*E*(1-F)));q==$&&et==G&&(a=!1),1/(et-q)<I.getPrivate("maxZoomFactor",1/0)/I.get("minZoomCount",1)?this._handleWheelAnimation(I.zoom(q,et)):a=!1}}),("zoomX"===i||"zoomXY"===i)&&0!=v&&this.xAxes.each(I=>{if(I.get("zoomX")){let $=I.get("start"),G=I.get("end"),F=I.fixPosition(h.x/s.width());null!=M&&(F=M);let Q=I.get("maxDeviation",0),q=Math.min(1+Q,Math.max(-Q,$-u*(G-$)*v*F)),et=Math.max(-Q,Math.min(1+Q,G+u*(G-$)*v*(1-F)));q==$&&et==G&&(a=!1),1/(et-q)<I.getPrivate("maxZoomFactor",1/0)/I.get("minZoomCount",1)?this._handleWheelAnimation(I.zoom(q,et)):a=!1}}),("zoomY"===e||"zoomXY"===e)&&0!=E&&this.yAxes.each(I=>{if(I.get("zoomY")){let $=I.get("start"),G=I.get("end"),F=I.fixPosition(h.y/s.height());null!=O&&(F=O);let Q=I.get("maxDeviation",0),q=Math.min(1+Q,Math.max(-Q,$-u*(G-$)*E*F)),et=Math.max(-Q,Math.min(1+Q,G+u*(G-$)*E*(1-F)));q==$&&et==G&&(a=!1),1/(et-q)<I.getPrivate("maxZoomFactor",1/0)/I.get("minZoomCount",1)?this._handleWheelAnimation(I.zoom(q,et)):a=!1}}),("zoomY"===i||"zoomXY"===i)&&0!=v&&this.yAxes.each(I=>{if(I.get("zoomY")){let $=I.get("start"),G=I.get("end"),F=I.fixPosition(h.y/s.height());null!=O&&(F=O);let Q=I.get("maxDeviation",0),q=Math.min(1+Q,Math.max(-Q,$-u*(G-$)*v*F)),et=Math.max(-Q,Math.min(1+Q,G+u*(G-$)*v*(1-F)));q==$&&et==G&&(a=!1),1/(et-q)<I.getPrivate("maxZoomFactor",1/0)/I.get("minZoomCount",1)?this._handleWheelAnimation(I.zoom(q,et)):a=!1}}),("panX"===e||"panXY"===e)&&0!=E&&this.xAxes.each(I=>{if(I.get("panX")){let $=I.get("start"),G=I.get("end"),F=this._getWheelSign(I)*u*(G-$)*E,Q=$+F,q=G+F,et=this._fixWheel(Q,q);Q=et[0],q=et[1],Q==$&&q==G&&(a=!1),this._handleWheelAnimation(I.zoom(Q,q))}}),("panX"===i||"panXY"===i)&&0!=v&&this.xAxes.each(I=>{if(I.get("panX")){let $=I.get("start"),G=I.get("end"),F=this._getWheelSign(I)*u*(G-$)*v,Q=$+F,q=G+F,et=this._fixWheel(Q,q);Q=et[0],q=et[1],Q==$&&q==G&&(a=!1),this._handleWheelAnimation(I.zoom(Q,q))}}),("panY"===e||"panXY"===e)&&0!=E&&this.yAxes.each(I=>{if(I.get("panY")){let $=I.get("start"),G=I.get("end"),F=this._getWheelSign(I)*u*(G-$)*E,Q=$+F,q=G+F,et=this._fixWheel(Q,q);Q=et[0],q=et[1],Q==$&&q==G&&(a=!1),this._handleWheelAnimation(I.zoom(Q,q))}}),("panY"===i||"panXY"===i)&&0!=v&&this.yAxes.each(I=>{if(I.get("panY")){let $=I.get("start"),G=I.get("end"),F=this._getWheelSign(I)*u*(G-$)*v,Q=$-F,q=G-F,et=this._fixWheel(Q,q);Q=et[0],q=et[1],Q==$&&q==G&&(a=!1),this._handleWheelAnimation(I.zoom(Q,q))}}),a&&n.preventDefault()}_handleSetWheel(){const t=this.get("wheelX"),e=this.get("wheelY");"none"!==t||"none"!==e?(this._wheelDp=this.plotContainer.events.on("wheel",s=>{const n=s.originalEvent;("none"!==t&&0!=Math.abs(n.deltaX)||"none"!==e&&0!=Math.abs(n.deltaY))&&this.handleWheel(s)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_getWheelSign(t){let e=1;return t.get("renderer").get("inversed")&&(e=-1),e}_fixWheel(t,e){const i=e-t;return t<0&&(e=(t=0)+i),e>1&&(t=(e=1)-i),[t,e]}_handlePlotDown(t){const e=t.originalEvent;if(2==e.button)return;const i=this.plotContainer;let s=i.toLocal(t.point);if((this.get("pinchZoomX")||this.get("pinchZoomY"))&&e.pointerId&&l.HP(i._downPoints).length>0){const a=this.xAxes.getIndex(0),h=this.yAxes.getIndex(0);a&&(this._downStartX=a.get("start",0),this._downEndX=a.get("end",1)),h&&(this._downStartY=h.get("start",0),this._downEndY=h.get("end",1))}if((this.get("panX")||this.get("panY"))&&s.x>=0&&s.y>=0&&s.x<=i.width()&&s.y<=this.height()){this._downPoint={x:e.clientX,y:e.clientY};const n=this.get("panX"),a=this.get("panY");n&&this.xAxes.each(u=>{u._panStart=u.get("start"),u._panEnd=u.get("end")}),a&&this.yAxes.each(u=>{u._panStart=u.get("start"),u._panEnd=u.get("end")});const h="panstarted";this.events.isEnabled(h)&&this.events.dispatch(h,{type:h,target:this,originalEvent:t.originalEvent})}}_handleWheelAnimation(t){t?t.events.on("stopped",()=>{this._dispatchWheelAnimation()}):this._dispatchWheelAnimation()}_dispatchWheelAnimation(){const t="wheelended";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}_handlePlotUp(t){const e=this._downPoint;if(e&&(this.get("panX")||this.get("panY"))){if(t.originalEvent.clientX==e.x&&t.originalEvent.clientY==e.y){const s="pancancelled";this.events.isEnabled(s)&&this.events.dispatch(s,{type:s,target:this,originalEvent:t.originalEvent})}const i="panended";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,originalEvent:t.originalEvent})}this._downPoint=void 0,this.xAxes.each(i=>{i._isPanning=!1}),this.yAxes.each(i=>{i._isPanning=!1})}_handlePlotMove(t){const e=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){const n=t.originalEvent.pointerId;if(n&&(this._movePoints[n]=t.point,l.HP(e._downPoints).length>1))return void this._handlePinch()}let i=this._downPoint;
1if(i){i=e.toLocal(this._root.documentPointToRoot(i));let s=e.toLocal(t.point);const n=this.get("panX"),a=this.get("panY");if(n){let h=this.get("scrollbarX");h&&h.events.disableType("rangechanged"),this.xAxes.each(u=>{if(u.get("panX")){u._isPanning=!0;let v=u._panStart,E=u._panEnd,O=(E-v)*(i.x-s.x)/e.width();u.get("renderer").get("inversed")&&(O*=-1);let I=v+O,$=E+O;$-I<1+2*u.get("maxDeviation",1)&&(u.set("start",I),u.set("end",$))}}),h&&h.events.enableType("rangechanged")}if(a){let h=this.get("scrollbarY");h&&h.events.disableType("rangechanged"),this.yAxes.each(u=>{if(u.get("panY")){u._isPanning=!0;let v=u._panStart,E=u._panEnd,O=(E-v)*(i.y-s.y)/e.height();u.get("renderer").get("inversed")&&(O*=-1);let I=v-O,$=E-O;$-I<1+2*u.get("maxDeviation",1)&&(u.set("start",I),u.set("end",$))}}),h&&h.events.enableType("rangechanged")}}}_handlePinch(){const t=this.plotContainer;let e=0,i=[],s=[];if(l.__(t._downPoints,(n,a)=>{i[e]=a;let h=this._movePoints[n];h&&(s[e]=h),e++}),i.length>1&&s.length>1){const n=t.width(),a=t.height();let h=i[0],u=i[1],v=s[0],E=s[1];if(h&&u&&v&&E){if(v=t.toLocal(v),E=t.toLocal(E),h=t.toLocal(h),u=t.toLocal(u),this.get("pinchZoomX")){const M=this._downStartX,O=this._downEndX;if(null!=M&&null!=O){h.x>u.x&&([h,u]=[u,h],[v,E]=[E,v]);let I=M+h.x/n*(O-M),$=M+u.x/n*(O-M),G=M+v.x/n*(O-M),F=M+E.x/n*(O-M),et=Math.max(.001,$-I)/Math.max(.001,F-G),ot=M*et+I-G*et,ft=O*et+$-F*et;this.xAxes.each(wt=>{let Ot=wt.fixPosition(ot),Et=wt.fixPosition(ft);wt.zoom(Ot,Et,0)})}}if(this.get("pinchZoomY")){const M=this._downStartY,O=this._downEndY;if(null!=M&&null!=O){h.y<u.y&&([h,u]=[u,h],[v,E]=[E,v]);let I=M+(1-h.y/a)*(O-M),$=M+(1-u.y/a)*(O-M),G=M+(1-v.y/a)*(O-M),F=M+(1-E.y/a)*(O-M),et=Math.max(.001,$-I)/Math.max(.001,F-G),ot=M*et+I-G*et,ft=O*et+$-F*et;this.yAxes.each(wt=>{let Ot=wt.fixPosition(ot),Et=wt.fixPosition(ft);wt.zoom(Ot,Et,0)})}}}}}_handleCursorPosition(){const t=this.get("cursor");if(t){const e=t.getPrivate("point");let i=t.get("snapToSeries");if(t._downPoint&&(i=void 0),i&&e){const s=t.get("snapToSeriesBy"),n=[];P.__(i,u=>{if(!u.isHidden()&&!u.isHiding())if("x!"!=s&&"y!"!=s){const v=u.startIndex(),E=u.endIndex();for(let M=v;M<E;M++){const O=u.dataItems[M];O&&!O.isHidden()&&n.push(O)}}else{const v=u.get("tooltipDataItem");v&&n.push(v)}});let h,a=1/0;if(P.__(n,u=>{const v=u.get("point");if(v){let E=0;E="x"==s||"x!"==s?Math.abs(e.x-v.x):"y"==s||"y!"==s?Math.abs(e.y-v.y):Math.hypot(e.x-v.x,e.y-v.y),E<a&&(a=E,h=u)}}),P.__(i,u=>{const v=u.get("tooltip");v&&v._setDataItem(void 0)}),h){let u=h.component;u.showDataItemTooltip(h),u.setRaw("tooltipDataItem",h);const v=h.get("point");v&&t.handleMove(u.toGlobal({x:v.x-u.x(),y:v.y-u.y()}),!0)}}}}_updateCursor(){let t=this.get("cursor");t&&t.updateCursor()}_addCursor(t){this.plotContainer.children.push(t)}_prepareChildren(){if(super._prepareChildren(),this.series.each(t=>{this._colorize(t)}),(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this.isDirty("cursor")){const t=this._prevSettings.cursor,e=this.get("cursor");e!==t&&(this._disposeProperty("cursor"),t&&t.dispose(),e&&(e._setChart(this),this._addCursor(e),this._pushPropertyDisposer("cursor",e.events.on("selectended",()=>{this._handleCursorSelectEnd()}))),this._prevSettings.cursor=e)}if(this.isDirty("scrollbarX")){const t=this._prevSettings.scrollbarX,e=this.get("scrollbarX");e!==t&&(this._disposeProperty("scrollbarX"),t&&t.dispose(),e&&(e.parent||this.topAxesContainer.children.push(e),this._pushPropertyDisposer("scrollbarX",e.events.on("rangechanged",i=>{this._handleScrollbar(this.xAxes,i.start,i.end,i.grip)})),this._pushPropertyDisposer("scrollbarX",e.events.on("released",()=>{this.xAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),e.setPrivate("positionTextFunction",i=>{const s=this.xAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarX=e)}if(this.isDirty("scrollbarY")){const t=this._prevSettings.scrollbarY,e=this.get("scrollbarY");e!==t&&(this._disposeProperty("scrollbarY"),t&&t.dispose(),e&&(e.parent||this.rightAxesContainer.children.push(e),this._pushPropertyDisposer("scrollbarY",e.events.on("rangechanged",i=>{this._handleScrollbar(this.yAxes,i.start,i.end,i.grip)})),this._pushPropertyDisposer("scrollbarY",e.events.on("released",()=>{this.yAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),e.setPrivate("positionTextFunction",i=>{const s=this.yAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarY=e)}this._handleZoomOut()}_processSeries(t){super._processSeries(t);const e=t.get("xAxis"),i=t.get("yAxis");P.Cy(e.series,t),P.Cy(i.series,t),t._posXDp=t.addDisposer(e.events.on("positionchanged",()=>{t._fixPosition()})),t._posXDp=t.addDisposer(i.events.on("positionchanged",()=>{t._fixPosition()}
1)),t.get("baseAxis")||(i.isType("CategoryAxis")||i.isType("DateAxis")?t.set("baseAxis",i):t.set("baseAxis",e)),t.get("stacked")&&(t._markDirtyKey("stacked"),P.__(t.dataItems,s=>{s.set("stackToItemY",void 0),s.set("stackToItemX",void 0)})),t._markDirtyAxes(),i.markDirtyExtremes(),e.markDirtyExtremes(),e._seriesAdded=!0,i._seriesAdded=!0,this._colorize(t)}_colorize(t){const e=this.get("colors");if(e&&null==t.get("fill")){const s=e.next();t._setSoft("stroke",s),t._setSoft("fill",s)}const i=this.get("patterns");if(i&&null==t.get("fillPattern")){const s=i.next();t._setSoft("fillPattern",s)}}_handleCursorSelectEnd(){const t=this.get("cursor"),e=t.get("behavior"),i=t.getPrivate("downPositionX",0),s=t.getPrivate("downPositionY",0),n=Math.min(1,Math.max(0,t.getPrivate("positionX",.5))),a=Math.min(1,Math.max(0,t.getPrivate("positionY",.5)));this.xAxes.each(h=>{if("zoomX"===e||"zoomXY"===e){let u=h.toAxisPosition(i),v=h.toAxisPosition(n);h.zoom(u,v)}h.setPrivate("updateScrollbar",!0)}),this.yAxes.each(h=>{if("zoomY"===e||"zoomXY"===e){let u=h.toAxisPosition(s),v=h.toAxisPosition(a);h.zoom(u,v)}h.setPrivate("updateScrollbar",!0)})}_handleScrollbar(t,e,i,s){t.each(n=>{let a=n.fixPosition(e),h=n.fixPosition(i),u=n.zoom(a,h,void 0,s);const v="updateScrollbar";n.setPrivateRaw(v,!1),u?u.events.on("stopped",()=>{n.setPrivateRaw(v,!0)}):n.setPrivateRaw(v,!0)})}_processAxis(t,e){return t.events.onAll(i=>{if("clear"===i.type)P.__(i.oldValues,s=>{this._removeAxis(s)});else if("push"===i.type)e.children.push(i.newValue),i.newValue.processChart(this);else if("setIndex"===i.type)e.children.setIndex(i.index,i.newValue),i.newValue.processChart(this);else if("insertIndex"===i.type)e.children.insertIndex(i.index,i.newValue),i.newValue.processChart(this);else if("removeIndex"===i.type)this._removeAxis(i.oldValue);else{if("moveIndex"!==i.type)throw new Error("Unknown IListEvent type");e.children.moveValue(i.value,i.newIndex),i.value.processChart(this)}})}_removeAxis(t){if(!t.isDisposed()){const e=t.parent;e&&e.children.removeValue(t);const i=t.gridContainer,s=i.parent;s&&s.children.removeValue(i);const n=t.topGridContainer,a=n.parent;a&&a.children.removeValue(n)}}_updateChartLayout(){const t=this.leftAxesContainer.width(),e=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",t),i.set("paddingRight",e);const s=this.topAxesContainer;s.set("paddingLeft",t),s.set("paddingRight",e)}processAxis(t){this.get("cursor")&&(this.addDisposer(t.on("start",()=>{this._updateCursor()})),this.addDisposer(t.on("end",()=>{this._updateCursor()})))}_handleAxisSelection(t,e){let i=t.fixPosition(t.get("start",0)),s=t.fixPosition(t.get("end",1));if(i>s&&([i,s]=[s,i]),-1!=this.xAxes.indexOf(t)){if(e||t.getPrivate("updateScrollbar")){let n=this.get("scrollbarX");n&&(!n.getPrivate("isBusy")||e)&&(n.setRaw("start",i),n.setRaw("end",s),n.updateGrips())}}else if(-1!=this.yAxes.indexOf(t)&&(e||t.getPrivate("updateScrollbar"))){let n=this.get("scrollbarY");n&&(!n.getPrivate("isBusy")||e)&&(n.setRaw("start",i),n.setRaw("end",s),n.updateGrips())}this._handleZoomOut()}_handleZoomOut(){let t=this.zoomOutButton;if(t&&t.parent){let e=!1;this.xAxes.each(i=>{i.get("zoomOut",!0)&&(0!=at.LI(i.get("start",0),5)||1!=at.LI(i.get("end",1),5))&&(e=!0)}),this.yAxes.each(i=>{i.get("zoomOut",!0)&&(0!=at.LI(i.get("start",0),5)||1!=at.LI(i.get("end",1),5))&&(e=!0)}),e?t.isHidden()&&t.show():t.hide()}}inPlot(t){const e=this.plotContainer,i=this.getPrivate("otherCharts",this._otherCharts),s=e.toGlobal(t);if(t.x>=-.5&&t.y>=-.5&&t.x<=e.width()+.5&&t.y<=e.height()+.5)return!0;if(i)for(let n=i.length-1;n>=0;n--){const a=i[n];if(a!=this){const h=a.plotContainer,u=this._root.rootPointToDocument(s),v=a._root.documentPointToRoot(u),E=h.toLocal(v);if(E.x>=-.1&&E.y>=-.1&&E.x<=h.width()+.1&&E.y<=h.height()+.1)return!0}}return!1}arrangeTooltips(){const t=this.plotContainer,e=t.width(),i=t.height();let s=this.height();const n=this._root.tooltipContainer.get("layerMargin");n&&n.bottom>s&&(s=n.bottom);let a=t._display.toGlobal({x:0,y:0}),h=t._display.toGlobal({x:e,y:i});const u=[];let $,G,v=0,E=1/0,M=this._movePoint,O=this.get("maxTooltipDistance"),I=this.get("maxTooltipDistanceBy","xy");
1c.Et(O)&&this.series.each(Q=>{if(!Q.isHidden()){const q=Q.get("tooltip");if(q){let et=q.get("pointTo");if(et){let ot=Math.hypot(M.x-et.x,M.y-et.y);"x"==I?ot=Math.abs(M.x-et.x):"y"==I&&(ot=Math.abs(M.y-et.y)),ot<E&&(E=ot,$=Q,G=et)}}}});const F=[];if(this.series.each(Q=>{const q=Q.get("tooltip");if(q&&!q.get("forceHidden")){let et=!1,ot=q.get("pointTo");if(ot){if(O>=0){let ft=q.get("pointTo");if(ft&&G&&Q!=$){let wt=Math.hypot(G.x-ft.x,G.y-ft.y);"x"==I?wt=Math.abs(G.x-ft.x):"y"==I&&(wt=Math.abs(G.y-ft.y)),wt>O&&(et=!0)}}else-1==O&&Q!=$&&(et=!0);this.inPlot(this._tooltipToLocal(ot))&&q.dataItem?et||(v+=ot.y):et=!0,et||Q.isHidden()||Q.isHiding()?q.hide(0):(q.show(),u.push(q),F.push(Q))}}}),this.setPrivate("tooltipSeries",F),this.get("arrangeTooltips")){let Q=0,q=0;const et=this._root.tooltipContainer;if(v/u.length>i/2+a.y){u.sort((Ot,Et)=>Oi.r9(Et.get("pointTo").y,Ot.get("pointTo").y));let wt=h.y;if(P.__(u,Ot=>{let Et=Ot.height();q++,Q+=Et;let At=Ot.get("centerY");At instanceof L.QE&&(Et*=At.value),Et+=Ot.get("marginBottom",0),Ot.set("bounds",{left:a.x,top:a.y,right:h.x,bottom:wt}),Ot.setPrivate("customData",{left:a.x,top:a.y,right:h.x,bottom:wt}),wt=Math.min(wt-Et,Ot._fy-Et),Ot.parent==et&&et.children.moveValue(Ot,0)}),wt<0){u.reverse();let Ot=wt;P.__(u,Et=>{q++;let At=Et.get("bounds");if(At){let Ft=At.top-wt,Vt=At.bottom-wt;Ft<Ot&&(Ft=Ot,Vt=Ft+Et.height()),Et.set("bounds",{left:At.left,top:Ft,right:At.right,bottom:Vt}),Ot=At.bottom-wt+Et.get("marginBottom",0)}})}}else{u.reverse(),u.sort((Ot,Et)=>Oi.r9(Ot.get("pointTo").y,Et.get("pointTo").y));let wt=0;if(P.__(u,Ot=>{q++;let Et=Ot.height();Q+=Et;let At=Ot.get("centerY");At instanceof L.QE&&(Et*=At.value),Et+=Ot.get("marginBottom",0),Ot.set("bounds",{left:a.x,top:wt,right:h.x,bottom:Math.max(a.y+s,wt+Et)}),Ot.parent==et&&et.children.moveValue(Ot,0),wt=Math.max(wt+Et,Ot._fy+Et)}),wt>s){u.reverse();let Ot=s;P.__(u,Et=>{q++;let At=Et.get("bounds");if(At){let Ft=At.top-(s-wt),Vt=At.bottom-(s-wt);Vt>Ot&&(Vt=Ot,Ft=Vt-Et.height()),Et.set("bounds",{left:At.left,top:Ft,right:At.right,bottom:Vt}),Ot=Vt-Et.height()-Et.get("marginBottom",0)}})}}0==Q&&q>0&&this._disposers.push(this.root.events.once("frameended",()=>{this.arrangeTooltips()}))}}_tooltipToLocal(t){return this.plotContainer.toLocal(t)}zoomOut(){this.xAxes.each(t=>{t.get("zoomOut",!0)&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))}),this.yAxes.each(t=>{t.get("zoomOut",!0)&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))})}_dispose(){super._dispose();const t=this.get("cursor");t&&t.dispose()}}Ii.className="XYChart",Ii.classNames=nt.classNames.concat([Ii.className]);class is extends Ii{constructor(){super(...arguments),this.drawings=new U.fo}_afterNew(){super._afterNew(),this._disposers.push(this.drawings.events.onAll(t=>{if("clear"===t.type)P.__(t.oldValues,e=>{this.series.removeValue(e)});else if("push"===t.type)this.series.push(t.newValue);else if("setIndex"===t.type)this.series.setIndex(t.index,t.newValue);else if("insertIndex"===t.type)this.series.insertIndex(t.index,t.newValue);else{if("removeIndex"!==t.type)throw new Error("Unknown IListEvent type");this.series.removeIndex(t.index)}}))}moveUp(){const t=this.getPrivate("stockChart"),e=t.panelsContainer.children,i=e.indexOf(this);if(i>0){e.moveValue(this,i-1);const s="moved";this.events.isEnabled(s)&&this.events.dispatch(s,{type:s,oldIndex:i,newIndex:i-1,target:this})}t._updateControls()}moveDown(){const t=this.getPrivate("stockChart"),e=t.panelsContainer.children,i=e.indexOf(this);if(i<e.length-1){e.moveValue(this,i+1);const s="moved";this.events.isEnabled(s)&&this.events.dispatch(s,{type:s,oldIndex:i,newIndex:i+1,target:this})}t._updateControls()}close(){const t=this.getPrivate("stockChart"),e="closed";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this}),t.panels.removeValue(this),t._updateControls()}expand(){const t=this.getPrivate("stockChart"),e=[];if(t.panels.each(i=>{i.isVisible()||e.push(i)}),P.__(e,i=>{i.setPrivate("visible",!0)}),0==e.length){t.panels.each(s=>{s!=this&&s.setPrivate("visible",!1)});const i="expanded";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this})}else{const i="collapsed";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this})}if(t._updateControls(),0==e.length){const i=this.panelControls;i.upButton.setPrivate("visible",!1),i.downButton.setPrivate("visible",!1),i.closeButton.setPrivate("visible",!1)}}}
1is.className="StockPanel",is.classNames=Ii.classNames.concat([is.className]);var Di=y(41176);class ss extends m.m{constructor(){super(...arguments),this.rectangle=this.children.push(Y.M.new(this._root,{themeTags:["rectangle"],fillOpacity:0,fill:(0,A.yW)(16777215)})),this.gripL=this._createGrip("left"),this.gripR=this._createGrip("right"),this.gripT=this._createGrip("top"),this.gripB=this._createGrip("bottom"),this._is=1,this._ix=0,this._iw=0,this._isHover=!1}_afterNew(){super._afterNew(),this.addTag("resizer"),this.set("visible",!1),this.gripL.events.on("dragged",t=>{this._resize(t.target,-1)}),this.gripR.events.on("dragged",t=>{this._resize(t.target,1)}),this.gripL.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripR.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripT.events.on("dragged",t=>{this._rotate(t,90)}),this.gripB.events.on("dragged",t=>{this._rotate(t,-90)}),this.gripT.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripB.events.on("dragstart",t=>{this._resizeStart(t.target)})}_resizeStart(t){const e=this.get("sprite");e&&(this._is=e.get("scale",1),this._ix=t.x(),this._iw=this.width()/2)}_resize(t,e){const i=this.get("sprite"),s=this.get("spriteTemplate");if(i){const n=Math.max(.01,this._is*(1+e*(t.x()-this._ix)/this._iw));s?s.set("scale",n):i.set("scale",n),i.states.lookup("default").set("scale",n),this._updatePositions()}}_rotate(t,e){const i=this.get("sprite"),s=this.get("spriteTemplate");if(i){const n=this.parent;if(n){const a=this.get("rotationStep",10);let h=Math.round((at._H({x:this.x(),y:this.y()},n.toLocal(t.point))+e)/a)*a;s?s.set("rotation",h):i.set("rotation",h),i.states.lookup("default").set("rotation",h),this._updatePositions()}}}_createGrip(t){const e=this.children.push(m.m.new(this._root,{themeTags:["grip",t],setStateOnChildren:!0,draggable:!0}));return e.children.push(b.T.new(this._root,{themeTags:["outline"],centerX:L.yP,centerY:L.yP})),e.children.push(b.T.new(this._root,{centerX:L.yP,centerY:L.yP})),e}_updateChildren(){if(super._updateChildren(),this.isDirty("sprite")){const t=this.get("sprite");if(t){this.show(0),this.setPrivate("visible",!0),this._updatePositions();const e=t.parent;e&&e.children.moveValue(this,0),this._positionDP=t.events.on("positionchanged",()=>{this._updatePositions()}),this._positionDP=t.events.on("boundschanged",()=>{this._updatePositions()})}else this.hide(0),this.setPrivate("visible",!1),this._positionDP&&this._positionDP.dispose()}(this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation"))&&this._updatePositions()}_updatePositions(){const t=this.get("sprite");if(t){let e=t.localBounds(),i=t.get("scale",1),s=20,n=(e.right-e.left)*i+s,a=(e.bottom-e.top)*i+s,h=t.get("rotation",0);const u=this.rectangle;let v=t.get("centerX",L.yP),E=t.get("centerY",L.yP),M=0;v instanceof L.QE&&(M=v.value);let O=0;E instanceof L.QE&&(O=E.value),u.setAll({centerX:v,centerY:E,width:n,height:a}),this.setAll({x:t.x()+s*(M-.5)*at.gn(h)-s*(O-.5)*at.F8(h),y:t.y()+s*(O-.5)*at.gn(h)+s*(M-.5)*at.F8(h),width:n,height:a,rotation:h}),this.gripT.setAll({x:(.5-M)*n,y:-O*a}),this.gripB.setAll({x:(.5-M)*n,y:(1-O)*a}),this.gripL.setAll({x:-M*n,y:(.5-O)*a}),this.gripR.setAll({x:(1-M)*n,y:(.5-O)*a}),this.rectangle.setAll({width:n,height:a})}}}ss.className="SpriteResizer",ss.classNames=m.m.classNames.concat([ss.className]);class ns extends m.m{constructor(){super(...arguments),this.upButton=this.children.push(T.$.new(this._root,{themeTags:["up","control","panel"],icon:V.A.new(this._root,{themeTags:["icon","button"]})})),this.downButton=this.children.push(T.$.new(this._root,{themeTags:["down","control","panel"],icon:V.A.new(this._root,{themeTags:["icon","button"]})})),this.expandButton=this.children.push(T.$.new(this._root,{themeTags:["expand","control","panel"],icon:V.A.new(this._root,{themeTags:["icon","button"]})})),this.closeButton=this.children.push(T.$.new(this._root,{themeTags:["close","control","panel"],icon:V.A.new(this._root,{themeTags:["icon","button"]})}))}_afterNew(){super._afterNew();const t=this.upButton;this.downButton.events.on("click",()=>{this.get("stockPanel").moveDown()}),t.events.on("click",()=>{this.get("stockPanel").moveUp()}),this.closeButton.events.on("click",()=>{this.get("stockPanel").close()}),this.expandButton.events.on("click",()=>{this.get("stockPanel").expand()})}}
1ns.className="PanelControls",ns.classNames=m.m.classNames.concat([ns.className]);let os,ls,Ti=(()=>{class x{static getIcon(e){const i=x.icons;return x._getSVG(i[e]||i.Default)}static _getSVG(e){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox",e.viewbox),i.setAttribute("class","am5stock_control_default_icon");const s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",e.path),i.appendChild(s),e.style&&s.setAttribute("style",e.style),i}}return x.icons={Default:{viewbox:"0 0 50 50",path:"M 25 10 L 25 40 M 10 25 L 41 25"},Indicator:{viewbox:"0 0 50 50",path:"M 2 10 C 28 27 31 1 48 11 M 1 49 C 24 22 25 38 48 44 M 3 25 L 48 25 L 41 19 M 48 25 L 41 31"},Color:{viewbox:"0 0 50 50",path:""},Dash:{viewbox:"0 0 60 16",path:"M0,8 60,8"},Calendar:{viewbox:"0 0 50 50",path:"M 3 8 L 47 8 L 47 48 L 3 48 L 3 8 M 3 19 L 47 19 M 9 28 L 15 28 M 22 28 L 28 28 M 35 28 L 41 28 M 9 39 L 15 39 M 22 39 L 28 39 M 35 39 L 41 39 M 12 14 L 12 1 M 38 14 L 38 1"},Period:{viewbox:"0 0 50 50",path:"M 3 3 L 47 3 L 47 48 L 3 48 L 3 3 M 3 12 L 47 12 M 9 21 L 15 21 M 22 21 L 28 21 M 35 21 L 41 21 M 9 30 L 15 30 M 22 30 L 28 30 M 35 30 L 41 30 M 9 39 L 15 39 M 22 39 L 28 39 M 35 39 L 41 39"},Interval:{viewbox:"0 0 50 50",path:"M 3 10 L 3 48 M 3 10 L 43 10 M 13 10 L 13 36 M 23 10 L 23 36 M 43 10 L 43 48 M 33 10 L 33 36"},Comparison:{viewbox:"0 0 50 50",path:"M 25 10 L 25 40 M 10 25 L 41 25"},Settings:{viewbox:"0 0 50 50",path:"M49,25 L47.6,33.2 L41.3,32.6 L39.7,35.3 L43.4,40.4 L37,45.8 L32.6,41.3 L29.7,42.4 L29.2,48.6 L20.8,48.6 L20.3,42.4 L17.4,41.3 L13,45.8 L6.6,40.4 L10.3,35.3 L8.7,32.6 L2.4,33.2 L1,25 L7.1,23.4 L7.6,20.3 L2.4,16.8 L6.6,9.6 L12.3,12.3 L14.7,10.3 L13,4.2 L20.8,1.4 L23.4,7.1 L26.6,7.1 L29.2,1.4 L37,4.2 L35.3,10.3 L37.7,12.3 L43.4,9.6 L47.6,16.8 L42.4,20.3 L42.9,23.4 L49,25 M 17 25 A 1 1 0 0 0 33 25 A 1 1 0 0 0 17 25"},Save:{viewbox:"0 0 50 50",path:"M47 47 47 15 35 3 3 3 3 47 47 47ZM13 3 13 13 33 13 33 3M9 42 9 25 39 25 39 42 9 42"},"Line Series":{viewbox:"0 0 50 50",path:"M 3 28 L 14 18 L 25 32 L 36 9 L 47 19"},"Area Series":{viewbox:"0 0 50 50",path:"M 3 20 L 14 13 L 25 20.95 L 37 9 L 48 16 L 48 48 M 8 17 L 8 48 M 13 14 L 13 48 M 18 16 L 18 48 M 23 20 L 23 48 M 28 18 L 28 48 M 33 13 L 33 48 M 38 10 L 38 48 M 43 13 L 43 48 M 3 20 L 3 48"},"Candlestick Series":{viewbox:"0 0 50 50",path:"M 3 17 L 3 37 L 19 37 M 19 37 L 19 17 L 3 17 M 11 17 L 11 6 M 11 37 L 11 50 M 30 11 L 30 31 L 46 31 L 46 11 L 30 11 M 38 11 L 38 0 M 38 31 L 38 44 M 3 22 L 19 22 M 3 27 L 19 27 M 3 32 L 19 32 M 30 16 L 46 16 M 30 21 L 46 21 M 30 26 L 46 26"},"Pro Candlestick Series":{viewbox:"0 0 50 50",path:"M 3 10 L 3 31 L 19 31 M 19 31 L 19 10 L 3 10 M 11 10 L 11 0 M 11 31 L 11 43 M 30 17 L 30 37 L 46 37 L 46 17 L 30 17 M 38 17 L 38 4 M 38 37 L 38 50 M 30 22 L 46 22 M 30 27 L 46 27 M 30 32 L 46 32"},"OHLC Series":{viewbox:"0 0 50 50",path:"M 11 31 L 20 31 M 11 3 L 11 43 M 38 5 L 38 50 M 29 36 L 38 36 M 38 12 L 47 12 M 11 17 L 2 17"},Draw:{viewbox:"0 0 50 50",path:"M 29 2 L 48 21 L 22 47 L 3 47 L 3 28 L 29 2 M 23 8 L 42 27 M 3 42 L 8 47 M 18 39 L 36 21 M 11 32 L 29 14 M 3 28 L 11 32 L 13 38 L 18 39 L 22 47 M 25 6 L 44 25 M 27 4 L 46 23 M 3 44 L 6 47 M 3 40 L 10 47"},Average:{viewbox:"0 0 50 50",path:"M2 24a5 5 0 1 0 10 0 5 5 0 1 0-10 0M12 24h26M38 24a5 5 0 1 0 10 0 5 5 0 1 0-10 0"},Callout:{viewbox:"0 0 50 50",path:"M 3 3 L 47 3 L 47 39 L 31 39 L 25 45 L 19 39 L 3 39 L 3 3 M 11 12 L 39 12 M 11 20 L 39 20 M 11 28 L 39 28"},Doodle:{viewbox:"0 0 48 48",path:"M 43.036,2.509 C 32.59,9.83 8.05,6.67 6.29,15.01 5.19,26.29 34.40,18.9 37.4,27.5 c 1.4,3.78 -4.0,8 -15.7,13.18"},Ellipse:{viewbox:"0 0 50 50",path:"M 25 5 a 22 20 0 1 0 1 0 z"},Fibonacci:{viewbox:"0 0 50 50",path:"M2 3 h46 M2 11.5 h46 M2 24 h46 M2 49 h46"},"Fibonacci Timezone":{viewbox:"0 0 50 50",path:"M5 2.5 v46 M13.5 2.5 v46 M26 2.5 v46 M46.5 2.5 v46"},"Horizontal Line":{viewbox:"0 0 50 50",path:"M20 24a5 5 0 1 0 10 0 5 5 0 1 0-10 0M2 24h18 M32,24 h18"},"Horizontal Ray":{viewbox:"0 0 50 50",path:"M2 24a5 5 0 1 0 10 0 5 5 0 1 0-10 0 M14,24 h36"},"Arrows &amp; Icons":{viewbox:"0 0 50 50",path:"M 5 35 L 5 15 L 26 15 M 26 15 L 26 5 L 45 26 L 26 45 L 26 35 L 5 35"},Label:{viewbox:"0 0 50 50",path:"M 10 45 l 15 -32 l 15 32 m -24 -13 l 18 0",style:"stroke-width: 1.2px"},Line:{viewbox:"0 0 50 50",path:"M 4 46 L 46 4"},"Line Arrow":{viewbox:"0 0 50 50",path:"M 4 46 L 46 4 M 30 4 L 46 4 L 46 20"},Polyline:{viewbox:"0 0 50 50",path:"M 2 15 L 16 42 L 36 22 L 48 29"},Polyfill:{viewbox:"0 0 50 50",path:"M 2 15 L 8 44 L 20 26 L 41 32 L 47 13 L 24 4 L 2 15"},"Quadrant Line":{viewbox:"0 0 50 50",path:"M2 3 h46 M2 15 h46 M2 29 h46 M2 43 h46"},Rectangle:{viewbox:"0 0 50 50",path:"M3 3 L47 3 L47 47 L3 47 L3 3"},Regression:{viewbox:"0 0 50 50",path:"M 2 15 a 5 5 0 1 0 10 0 a 5 5 0 1 0 -10 0 M 11.36 17.369 L 38.661 32.505 M 38 35 a 5 5 0 1 0 10 0 a 5 5 0 1 0 -10 0"},"Trend Line":{viewbox:"0 0 50 50",path:"M 2 35 a 5 5 0 1 0 10 0 a 5 5 0 1 0 -10 0 M 11.343 32.542 L 38.614 17.398 M 38 15 a 5 5 0 1 0 10 0 a 5 5 0 1 0 -10 0"},Triangle:{viewbox:"0 0 50 50",path:"M 2 15 L 22 47 L 48 20 L 2 15"},"Vertical Line":{viewbox:"0 0 50 50",path:"M19 25a5 5 0 1 0 10 0 5 5 0 1 0-10 0M24 2v18 M24,32 v18"},"Parallel Channel":{viewbox:"0 0 50 50",path:"M 3 37 L 37 3 M 13 47 L 47 13"},Eraser:{viewbox:"0 0 50 50",path:"M 13 48 L 21 48 L 45 24 L 29 8 L 1 36 L 13 48 M 32 48 L 38 48 M 43 48 L 49 48 M 23 14 L 39 30 M 20 17 L 36 33 M 26 11 L 42 27"},Select:{viewbox:"0 0 50 50",path:"M 8 6 L 35 18 L 24 25 L 38 43 L 33 47 L 20 28 L 11 36 L 8 6"},Clear:{viewbox:"0 0 50 50",path:"M 6 10 L 12 48 L 38 48 L 44 10 L 6 10 M 14 14 L 18 43 M 25 14 L 25 43 M 36 14 L 32 43 M 6 8 L 44 8 M 21 8 L 21 3 L 30 3 L 30 8"},Bold:{viewbox:"0 0 50 50",path:"M 12 4 L 12 47 L 32 47 C 45 47 47 23 32 23 C 42 23 42 4 31 4 L 12 4 Z M 32 23 L 12 23 Z",style:"stroke-width: 1.8px"},Italic:{viewbox:"0 0 50 50",path:"M 17 5 L 38 5 M 27 5 L 18 47 M 8 47 L 28 47"},"Show Extension":{viewbox:"0 0 50 50",path:"M 10 15 a 5 5 0 1 0 10 0 a 5 5 0 1 0 -10 0 M 30 36 a 5 5 0 1 0 10 0 a 5 5 0 1 0 -10 0 M 40 41 L 50 50 M 20 20 L 30 30 M 10 10 L 0 0"},Snap:{viewbox:"0 0 50 50",path:"M 17 29 L 29 29 M 33 39 a 5 5 0 1 0 15 0 a 5 5 0 1 0 -15 0 M 29 17 L 29 29 L 3 3"},Reset:{viewbox:"0 0 50 50",path:"M 4 25 A 1 1 0 0 0 46 25 Q 46 4 25 4 Q 18 4 11 10 L 5 4 L 5 16 L 17 16 L 11 10"},Search:{viewbox:"0 0 50 50",path:"M 5 11 A 1 1 90 0 0 36 27 A 1 1 90 0 0 5 11 M 34 30 L 49 45 L 47 47 L 32 32"},Measure:{viewbox:"0 0 50 50",path:"M 3 38 L 35 6 L 46 17 L 14 49 L 3 38 M 10 31 L 16 37 M 16 25 L 20 29 M 22 19 L 26 23 M 28 13 L 34 19 M 50 50"}},x})();class Bn extends it.S{setupDefaultRules(){super.setupDefaultRules();const t=this._root.language,e=this.rule.bind(this),i=this._root.verticalLayout,s=this._root.interfaceColors;e("StockChart").setAll({paddingLeft:18,paddingRight:18,paddingTop:5,paddingBottom:15,width:L.Q2,height:L.Q2,layout:i,percentScaleSeriesSettings:{valueYShow:"valueYChangeSelectionPercent",openValueYShow:"openValueYChangeSelectionPercent",highValueYShow:"highValueYChangeSelectionPercent",lowValueYShow:"lowValueYChangeSelectionPercent"},percentScaleValueAxisSettings:{numberFormat:"#.##'%'",interpolationDuration:0,extraMax:.05,strictMinMaxSelection:!0}
1,autoSetPercentScale:!0,autoHidePanelControls:!1}),e("StockPanel").setAll({panY:!0,wheelY:"zoomX",panX:!0,minHeight:1}),e("StockPanel").states.create("hidden",{height:L.p0,visible:!1}),e("XYChart",["stock"]).setAll({paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:15,minHeight:80,wheelZoomPositionX:1}),e("XYChart",["stock","scrollbar"]).setAll({minHeight:0}),e("StockLegend").setAll({clickTarget:"marker"}),e("Label").setAll({fontSize:"0.8em"}),e("Legend",["stocklegend"]).setAll({paddingTop:6,paddingLeft:6}),e("Container",["itemcontainer","legend","stocklegend"]).setAll({marginLeft:2,marginRight:2,marginTop:2,marginBottom:2}),e("Label",["legend","value","label","stocklegend"]).setAll({width:null,paddingRight:5}),e("ColumnSeries").setAll({useLastColorForLegendMarker:!0}),e("Grid",["middlegrid"]).setAll({forceHidden:!1,strokeOpacity:.4,strokeDasharray:[2,2]});{const a=e("RoundedRectangle",["legend","itemcontainer","background","stocklegend"]);a.setAll({fillOpacity:1,cornerRadiusBL:4,cornerRadiusBR:4,cornerRadiusTL:4,cornerRadiusTR:4,shadowOffsetX:0,shadowOffsetY:0,shadowOpacity:.3,shadowBlur:5,interactive:!0}),(0,N.w)(a,"shadowColor",s,"alternativeBackground"),(0,N.w)(a,"fill",s,"background")}{const a=e("Rectangle",["panelresizer"]);a.setAll({width:L.Q2,height:15,centerY:L.Q2,fillOpacity:0,fill:s.get("alternativeBackground"),cursorOverStyle:"row-resize",interactive:!0}),a.states.create("hover",{fillOpacity:.07})}e("Grid",["renderer","base","y"]).setAll({strokeOpacity:.4}),e("Button",["zoom"]).setAll({forceHidden:!0}),e("AxisRendererY",["y"]).setAll({opposite:!0,pan:"zoom"}),e("Container",["legend","item"]).setAll({});{const a=e("Graphics",["axis","fill"]);a.setAll({visible:!0,position:"absolute",fillOpacity:.05}),(0,N.w)(a,"fill",s,"alternativeBackground")}{const a=e("PanelControls");a.setAll({x:L.Q2,y:0,centerX:L.Q2,paddingTop:10,paddingRight:10,layer:30,layout:this._root.horizontalLayout,opacity:.5}),a.states.create("hover",{opacity:1})}e("Button",["control","item"]).setAll({paddingTop:1,paddingBottom:1,paddingLeft:2,paddingRight:2,centerX:L.yP,centerY:L.yP,forceHidden:!0}),e("Button",["control","item","settings"]).setAll({forceHidden:!1}),e("RoundedRectangle",["background","control","button"]).setAll({fillOpacity:0,strokeOpacity:0});{const a=e("Graphics",["control","button","icon"]).states.create("hover",{fillOpacity:.3});(0,N.w)(a,"fill",s,"secondaryButtonHover")}e("Button",["panel"]).setAll({scale:1.2,paddingLeft:0,paddingRight:0,marginLeft:6});{const a=e("Graphics",["close","button","icon"]);a.setAll({strokeOpacity:.7,strokeWidth:.5,draw:h=>{h.moveTo(-5,-5),h.lineTo(5,5),h.moveTo(-5,5),h.lineTo(5,-5),h.moveTo(0,0),h.drawCircle(0,0,10)}}),(0,N.w)(a,"stroke",s,"secondaryButtonText"),(0,N.w)(a,"fill",s,"background")}{const a=e("Graphics",["settings","button","icon"]);a.setAll({strokeOpacity:.7,strokeWidth:.5,draw:h=>{const M=40*at.nr/2;h.moveTo(10,0);let O=0,I=5*at.nr;for(let $=0;$<9;$++)O+=M,h.lineTo(10*Math.cos(O),10*Math.sin(O)),h.lineTo(8*Math.cos(O+I),8*Math.sin(O+I)),O+=M,h.lineTo(8*Math.cos(O-I),8*Math.sin(O-I)),h.lineTo(10*Math.cos(O),10*Math.sin(O));h.drawCircle(0,0,4)}}),(0,N.w)(a,"stroke",s,"secondaryButtonText"),(0,N.w)(a,"fill",s,"background")}{const a=e("Graphics",["up","button","icon"]);a.setAll({strokeOpacity:.7,strokeWidth:.5,draw:h=>{h.moveTo(0,5),h.lineTo(0,-5),h.moveTo(0,-5),h.lineTo(-5,0),h.moveTo(0,-5),h.lineTo(5,0),h.drawCircle(0,0,10)}}),(0,N.w)(a,"stroke",s,"secondaryButtonText"),(0,N.w)(a,"fill",s,"background")}{const a=e("Graphics",["expand","button","icon"]);a.setAll({strokeOpacity:.7,strokeWidth:.5,draw:h=>{h.moveTo(-5,-2),h.lineTo(-5,-5),h.lineTo(5,-5),h.lineTo(5,-2),h.moveTo(5,2),h.lineTo(5,5),h.lineTo(-5,5),h.lineTo(-5,2),h.drawCircle(0,0,10)}}),(0,N.w)(a,"stroke",s,"secondaryButtonText"),(0,N.w)(a,"fill",s,"background")}{const a=e("Graphics",["down","button","icon"]);a.setAll({strokeOpacity:.7,strokeWidth:.5,draw:h=>{h.moveTo(0,-5),h.lineTo(0,5),h.moveTo(0,5),h.lineTo(-5,0),h.moveTo(0,5),h.lineTo(5,0),h.drawCircle(0,0,10)}}),(0,N.w)(a,"stroke",s,"secondaryButtonText"),(0,N.w)(a,"fill",s,"background")}e("Indicator").setAll({position:"absolute",autoOpenSettings:!0}),e("DrawingSeries").setAll({field:"value",selectorPadding:10}),e("Container",["drawing","grip"]).states.create("hover",{});{const a=e("Circle",["drawing","grip"]);a.setAll({strokeOpacity:.7,strokeWidth:1,radius:5}),(0,N.w)(a,"fill",s,"background"),(0,N.w)(a,"stroke",s,"alternativeBackgroun
1d");const h=a.states.create("hover",{strokeWidth:2});(0,N.w)(h,"stroke",s,"negative")}e("Circle",["drawing","grip","outline"]).setAll({radius:8,strokeWidth:4,strokeOpacity:0,fillOpacity:0}),e("Circle",["drawing","grip","outline"]).states.create("hover",{radius:10,strokeWidth:4,strokeOpacity:.3}),e("Circle",["drawing","grip","outline","label"]).setAll({forceHidden:!0}),e("Circle",["drawing","grip","label"]).setAll({forceHidden:!0}),e("Circle",["drawing","grip","callout"]).setAll({fillOpacity:0,forceHidden:!0}),e("Circle",["drawing","grip","outline","callout"]).setAll({forceHidden:!1}),e("Triangle",["drawing","arrow"]).setAll({width:22,height:17});{const a=e("Graphics",["series","fill","drawing"]);a.setAll({fillOpacity:.2,visible:!0,draggable:!0}),a.states.create("hover",{fillOpacity:.4})}e("Line",["drawing"]).setAll({strokeDasharray:[2,2],strokeWidth:1,draggable:!0}),e("Line",["drawing","hit"]).setAll({strokeWidth:22,strokeOpacity:0,strokeDasharray:0,draggable:!0}),e("Line",["drawing","hit","horizontal"]).setAll({
1strokeWidth:22}),e("Line",["drawing","hit","vertical"]).setAll({strokeWidth:22}),e("Line",["drawing","hit","ray"]).setAll({strokeWidth:22});{const a=e("Graphics",["series","fill","drawing","doodle"]);a.setAll({fillOpacity:0}),a.states.create("hover",{fillOpacity:0})}e("Graphics",["series","stroke","drawing","measure"]).setAll({strokeOpacity:0}),e("Line",["drawing","measure"]).setAll({strokeDasharray:[],strokeWidth:1,crisp:!0,strokeOpacity:.7,draggable:!1});{const a=e("Graphics",["line","series","stroke","drawing"]);a.setAll({strokeWidth:2,draggable:!0});const h=a.states.create("hover",{});(0,N.w)(h,"stroke",s,"negative")}{const a=e("Graphics",["drawing","icon"]);a.setAll({centerX:L.yP,centerY:L.Q2,strokeOpacity:1,strokeWidth:2});const h=a.states.create("hover",{});(0,N.w)(h,"stroke",s,"negative")}e("Label",["drawing","label"]).setAll({centerX:L.p0,centerY:L.yP,minHeight:28,minWidth:28}),e("Label",["drawing","measure"]).setAll({centerX:L.yP,centerY:L.yP,fill:s.get("alternativeText"),textAlign:"center"}),e("RoundedRectangle",["background","drawing","measure"]).setAll({centerX:L.yP,centerY:L.yP,fillOpacity:.7}),e("PointedRectangle",["drawing","callout"]).setAll({fillOpacity:1,strokeOpacity:0});{const a=e("Ellipse",["drawing"]);a.setAll({strokeOpacity:1,strokeWidth:2,isMeasured:!1,position:"absolute",draggable:!0,fillOpacity:.25});const h=a.states.create("hover",{fillOpacity:.5});(0,N.w)(h,"stroke",s,"negative")}e("FibonacciSeries").setAll({sequence:[0,.236,.382,.5,.618,.768,1,1.618,2.618,3.618,4.236],colors:[(0,A.yW)(8816262),(0,A.yW)(15550524),(0,A.yW)(8635526),(0,A.yW)(5221203),(0,A.yW)(364931),(0,A.yW)(6927601),(0,A.yW)(8816262),(0,A.yW)(3171832),(0,A.yW)(15550524),(0,A.yW)(9972651),(0,A.yW)(14820453)]}),e("Graphics",["line","series","stroke","drawing","fibonacci"]).setAll({strokeWidth:.5,strokeOpacity:1}),e("Label",["fibonacci"]).setAll({populateText:!0,text:"{sequence} ({value.formatNumber('#.00')})",centerX:L.Q2,centerY:L.Q2,paddingBottom:2,fontSize:"0.8em"}),e("Label",["fibonaccitimezone"]).setAll({populateText:!0,text:"{value.formatNumber('#')}",centerX:0,centerY:L.Q2,paddingBottom:2,paddingLeft:3,fontSize:"0.8em"}),e("FibonacciTimezoneSeries").setAll({sequence:[0,1,2,3,5,8,13,21,34,55,89],colors:[]}),e("Graphics",["line","series","fill","drawing","fibonaccitimezone"]).setAll({draggable:!1,fillOpacity:.1}),e("Graphics",["line","series","stroke","drawing","fibonaccitimezone"]).setAll({draggable:!1,strokeWidth:.5,strokeOpacity:1}),e("Grid",["overbought"]).setAll({strokeOpacity:.4}),e("Grid",["oversold"]).setAll({strokeOpacity:.4}),e("Graphics",["overboughtoversold","oversold","fill"]).setAll({visible:!0,fillOpacity:.2}),e("Graphics",["overboughtoversold","overbought","fill"]).setAll({visible:!0,fillOpacity:.2}),e("Graphics",["fill","supertrend","upper"]).setAll({fillOpacity:.2}),e("Graphics",["fill","supertrend","lower"]).setAll({fillOpacity:.2}),e("Graphics",["fill","bollingerbands","upper"]).setAll({fillOpacity:.2}),e("Graphics",["fill","movingaverageenvelope","upper"]).setAll({fillOpacity:.2}),e("Graphics",["series","line","accumulativeswingindex"]).setAll({fillOpacity:.2,visible:!0}),e("XYChart",["indicator"]).setAll({height:(0,L.KN)(30),minHeight:80}),e("AxisLabel",["x","indicator"]).setAll({forceHidden:!0}),e("XYSeries").setAll({excludeFromAggregate:["valueX"]}),e("XYSeries",["indicator"]).setAll({legendLabelText:"{name}"}),e("ColumnSeries",["indicator"]).setAll({turboMode:!0}),e("LineSeries",["accumulationdistribution"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.000a')}[/]",legendLabelText:"{shortName} ({useVolume})"}),e("LineSeries",["accumulativeswingindex"]).setAll({legendValueText:"[{swingColor} bold]{valueY.formatNumber('#.0000')}[/]",legendLabelText:"{shortName} ({limitMoveValue})"}),e("LineSeries",["aroon"]).setAll({legendValueText:"[{upColor} bold]{up.formatNumber('#.00')}%[/] [{downColor} bold]{down.formatNumber('#.00')}%[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("ColumnSeries",["awesomeoscillator"]).setAll({legendValueText:"[{oscillatorColor}; bold]{valueY.formatNumber('#.00')}[/]"}),e("CandlestickSeries",["heikinashi"]).setAll({legendValueText:"open: [bold]{openValueY.formatNumber('#.00')}[/] low: [bold]{lowValueY.formatNumber('#.00')}[/] high: [bold]{highValueY.formatNumber('#.00')}[/] close: [bold]{valueY.formatNumber('#.00')}[/]",legendRangeValueText:""}),e("LineSeries",["indicator","bollingerbands"]).setAll({legendValueText:"[{lowerColor} bold]{lower.formatNumber('#.00')}[/] [{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{upperColor} bold]{upper.formatNumber('#.00')}
1[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{field},{standardDeviations.formatNumber('#.')},{type})"}),e("LineSeries",["indicator","macross"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{fastColor} bold]{maf.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{fastPeriod.formatNumber('#.')})"}),e("LineSeries",["indicator","accelerationbands"]).setAll({legendValueText:"[{lowerColor} bold]{lower.formatNumber('#.00')}[/] [{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{upperColor} bold]{upper.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{factor.formatNumber('#.#####')})"}),e("LineSeries",["chaikinmoneyflow"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("LineSeries",["chaikinoscillator"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.000a')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{slowPeriod.formatNumber('#.')})"}),e("LineSeries",["bullbearpower"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber()}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("LineSeries",["commoditychannelindex"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("LineSeries",["disparityindex"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{field},{movingAverageType})"}),e("LineSeries",["macd"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{signalColor} bold]{signal.formatNumber('#.00')}[/] [bold {differenceColor}]{difference.formatNumber('#.00')}[/b]",legendLabelText:"{shortName} ({fastPeriod.formatNumber('#.')},{slowPeriod.formatNumber('#.')},{signalPeriod.formatNumber('#.')})"}),e("LineSeries",["medianprice"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("LineSeries",["momentum"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{field})"}),e("LineSeries",["movingaverage"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{field},{type},{offset.formatNumber('#.')})"}),e("ColumnSeries",["movingaveragedeviation"]).setAll({legendValueText:"[{deviationColor}; bold]{valueY.formatNumber('#.00')}[/]"}),e("LineSeries",["indicator","movingaverageenvelope"]).setAll({legendValueText:"[{lowerColor} bold]{lower.formatNumber('#.00')}[/] [{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{upperColor} bold]{upper.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{field},{shiftType},{shift.formatNumber('#.')},{type})"}),e("LineSeries",["onbalancevolume"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.000a')}[/]",legendLabelText:"{shortName}"}),e("LineSeries",["pvt"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.000a')}[/]",legendLabelText:"{shortName}"}),e("LineSeries",["rsi"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{smaColor} bold]{sma.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{smaPeriod.formatNumber('#.')},{field})"}),e("LineSeries",["standarddeviation"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{field})"}),e("LineSeries",["stochasticmomentum"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{emaColor} bold]{ema.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{dPeriod.formatNumber('#.')},{emaPeriod.formatNumber('#.')})"}),e("LineSeries",["stochastic"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{slowColor}
1 bold]{slow.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{kSmoothing.formatNumber('#.')},{dSmoothing.formatNumber('#.')})"}),e("LineSeries",["supertrend"]).setAll({legendValueText:"",legendLabelText:"{shortName} ({period.formatNumber('#.')},{multiplier.formatNumber('#.')})"}),e("LineSeries",["trix"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{signalColor} bold]{signal.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("LineSeries",["typicalprice"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("LineSeries",["averagetruerange"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("ColumnSeries",["volume"]).setAll({legendValueText:"[{volumeColor}; bold]{valueY.formatNumber('#.000a')}[/]"}),e("ColumnSeries",["volumeprofile"]).setAll({legendLabelText:"{shortName}",legendValueText:"[{downColor}; bold]{down.formatNumber('#.000a')}[/] [{upColor}; bold]{up.formatNumber('#.000a')}[/]  [bold]{total.formatNumber('#.000a')}[/]"}),e("LineSeries",["vwap"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')},{field})"}),e("LineSeries",["williamsr"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({period.formatNumber('#.')})"}),e("LineSeries",["zigzag"]).setAll({legendValueText:"[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",legendLabelText:"{shortName} ({deviation.formatNumber('#.')}, {depth.formatNumber('#.')})"}),e("RoundedRectangle",["series","column","volumeprofile"]).setAll({fillOpacity:.3,strokeWidth:2,strokeOpacity:0}),e("RoundedRectangle",["series","column","volumeprofile"]).states.create("hover",{strokeOpacity:1}),e("RoundedRectangle",["macd","difference"]).setAll({fillOpacity:.5,strokeOpacity:0}),e("RoundedRectangle",["series","column","awesomeoscillator"]).setAll({fillOpacity:.5,strokeOpacity:0});{const a=e("RoundedRectangle",["series","column","volume"]);a.setAll({fillOpacity:.5,stroke:s.get("background"),strokeOpacity:.2}),a.adapters.add("fill",(h,u)=>{const v=u.dataItem;if(v){const E=v.dataContext;if(null!=E.volumeColor)return E.volumeColor}return h})}e("RoundedRectangle",["series","column","movingaveragedeviation"]).setAll({fillOpacity:.5,strokeOpacity:0}),e("Grid",["renderer","y","overboughtoversold"]).setAll({forceHidden:!0}),e("Grid",["renderer","y","overboughtoversold"]).setAll({forceHidden:!0}),e("AxisLabel",["renderer","y","overboughtoversold"]).setAll({forceHidden:!0}),e("MovingAverage").setAll({name:t.translateAny("Moving Average"),shortName:t.translateAny("MA"),seriesColor:(0,A.yW)(11240154),type:"simple",field:"close",period:20,offset:0}),e("MACross").setAll({name:t.translateAny("Moving Average Cross"),shortName:t.translateAny("MACross"),seriesColor:(0,A.yW)(11240154),fastColor:(0,A.yW)(1536734),field:"close",period:9,fastPeriod:21}),e("ZigZag").setAll({name:t.translateAny("ZigZag"),shortName:t.translateAny("ZigZag"),seriesColor:s.get("alternativeBackground"),deviation:5,depth:3}),e("MovingAverageEnvelope").setAll({name:t.translateAny("Moving Average Envelope"),shortName:t.translateAny("MA ENV"),seriesColor:(0,A.yW)(16748607),upperColor:(0,A.yW)(16763208),lowerColor:(0,A.yW)(16756596),type:"simple",field:"close",period:20,offset:0,shift:5,shiftType:"percent"}),e("MovingAverageDeviation").setAll({name:t.translateAny("Moving Average Deviation"),shortName:t.translateAny("MA Dev"),increasingColor:s.get("positive"),decreasingColor:s.get("negative"),type:"simple",field:"close",period:20}),e("StandardDeviation").setAll({name:t.translateAny("Standard Deviation"),seriesColor:s.get("alternativeBackground"),shortName:t.translateAny("STDEV"),field:"close",period:20}),e("TypicalPrice").setAll({name:t.translateAny("Typical Price"),seriesColor:s.get("alternativeBackground"),shortName:t.translateAny("Typical Price"),field:"hlc/3",period:20}),e("AverageTrueRange").setAll({name:t.translateAny("Average True Range"),seriesColor:(0,A.yW)(16748607),shortName:t.translateAny("ATR"),period:14}),e("Trix").setAll({name:t.translateAny("Trix"),seriesColor:s.get("alternativeBackgroun
1d"),signalColor:(0,A.yW)(16748607),shortName:t.translateAny("Trix"),field:"close",period:20,signalPeriod:9}),e("MedianPrice").setAll({name:t.translateAny("Median Price"),seriesColor:s.get("alternativeBackground"),shortName:t.translateAny("Median Price"),field:"hl/2",period:20}),e("VWAP").setAll({name:t.translateAny("Volume-Weighted Average Price"),shortName:t.translateAny("VWAP"),seriesColor:(0,A.yW)(11240154),field:"hlc/3",period:30}),e("AccumulationDistribution").setAll({name:t.translateAny("Accumulation/Distribution"),shortName:t.translateAny("Accum/Dist"),seriesColor:(0,A.yW)(7368816),useVolume:!0}),e("DisparityIndex").setAll({name:t.translateAny("Disparity Index"),shortName:t.translateAny("Disparity"),seriesColor:(0,A.yW)(7368816),period:14,field:"close",movingAverageType:"simple"}),e("ChaikinMoneyFlow").setAll({name:t.translateAny("Chaikin Money Flow"),shortName:t.translateAny("Chaikin MF"),seriesColor:(0,A.yW)(7368816),period:20}),e("ChaikinOscillator").setAll({name:t.translateAny("Chaikin Oscillator"),period:3,slowPeriod:10,shortName:t.translateAny("Chaikin Osc"),seriesColor:(0,A.yW)(7368816)}),e("BullBearPower").setAll({name:t.translateAny("Bull Bear Power"),period:13,shortName:t.translateAny("BBP"),seriesColor:(0,A.yW)(7368816)}),e("OnBalanceVolume").setAll({name:t.translateAny("On Balance Volume"),shortName:t.translateAny("On Bal Vol"),seriesColor:(0,A.yW)(7368816)}),e("PVT").setAll({name:t.translateAny("Price Volume Trend"),shortName:t.translateAny("PVT"),seriesColor:(0,A.yW)(7368816)}),e("BollingerBands").setAll({name:t.translateAny("Bollinger Bands"),shortName:t.translateAny("Bollinger"),standardDeviations:2,seriesColor:(0,A.yW)(16748607),upperColor:(0,A.yW)(16763208),lowerColor:(0,A.yW)(16756596)}),e("AccelerationBands").setAll({name:t.translateAny("Acceleration Bands"),shortName:t.translateAny("Acceleration"),factor:.001,period:20,seriesColor:(0,A.yW)(16748607),upperColor:(0,A.yW)(15092891),lowerColor:(0,A.yW)(15092891)}),e("RelativeStrengthIndex").setAll({name:t.translateAny("Relative Strength Index"),shortName:t.translateAny("RSI"),period:14,smaPeriod:3,field:"close",overSold:20,overBought:80,overSoldColor:(0,A.yW)(14942208),overBoughtColor:(0,A.yW)(6797276),seriesColor:(0,A.yW)(11240154),smaColor:(0,A.yW)(16748607)}),e("Momentum").setAll({name:t.translateAny("Momentum"),shortName:t.translateAny("Mom"),period:14,field:"close",seriesColor:(0,A.yW)(11240154)}),e("SuperTrend").setAll({name:t.translateAny("Super Trend"),shortName:t.translateAny("Super Trend"),period:10,upperColor:s.get("negative"),lowerColor:s.get("positive"),multiplier:3}),e("WilliamsR").setAll({name:t.translateAny("Williams %R"),shortName:t.translateAny("Williams %R"),period:14,field:"close",overSold:-80,overBought:-20,overSoldColor:(0,A.yW)(14942208),overBoughtColor:(0,A.yW)(6797276),seriesColor:(0,A.yW)(11240154)}),e("CommodityChannelIndex").setAll({name:t.translateAny("Commodity Channel Index"),shortName:t.translateAny("CCI"),period:20,field:"close",overSold:-100,overBought:100,overSoldColor:(0,A.yW)(14942208),overBoughtColor:(0,A.yW)(6797276),seriesColor:(0,A.yW)(11240154)}),e("StochasticOscillator").setAll({name:t.translateAny("Stochastic Oscillator"),shortName:t.translateAny("Stochastic Osc"),period:14,kSmoothing:1,dSmoothing:3,field:"close",overSold:20,overBought:80,overSoldColor:(0,A.yW)(14942208),overBoughtColor:(0,A.yW)(6797276),seriesColor:(0,A.yW)(11240154),slowColor:(0,A.yW)(16748607)}),e("StochasticMomentumIndex").setAll({name:t.translateAny("Stochastic Momentum Index"),shortName:t.translateAny("Stochastic MI"),period:10,dPeriod:3,emaPeriod:3,field:"close",overSold:-40,overBought:40,overSoldColor:(0,A.yW)(14942208),overBoughtColor:(0,A.yW)(6797276),seriesColor:(0,A.yW)(11240154),emaColor:(0,A.yW)(16748607)}),e("AccumulativeSwingIndex").setAll({name:t.translateAny("Accumulative Swing Index"),shortName:t.translateAny("ACC Swing"),limitMoveValue:1e3,positiveColor:s.get("positive"),negativeColor:s.get("negative")}),e("Aroon").setAll({name:t.translateAny("Aroon"),shortName:t.translateAny("Aroon"),period:14,upColor:s.get("positive"),downColor:s.get("negative")}),e("AwesomeOscillator").setAll({name:t.translateAny("Awesome Oscillator"),short
1Name:t.translateAny("Awesome"),increasingColor:s.get("positive"),decreasingColor:s.get("negative")}),e("HeikinAshi").setAll({name:t.translateAny("Heikin Ashi"),shortName:t.translateAny("Heikin Ashi"),increasingColor:s.get("positive"),decreasingColor:s.get("negative")}),e("Volume").setAll({name:t.translateAny("Volume"),shortName:t.translateAny("Volume"),increasingColor:s.get("positive"),decreasingColor:s.get("negative")}),e("VolumeProfile").setAll({name:t.translateAny("Volume Profile"),shortName:t.translateAny("Volume Profile"),upColor:A.Q1.fromHex(14922508),downColor:A.Q1.fromHex(3045603),countType:"rows",count:24,axisWidth:40,valueArea:70,valueAreaOpacity:.7}),e("MACD").setAll({name:t.translateAny("MACD"),field:"close",shortName:t.translateAny("MACD"),fastPeriod:12,slowPeriod:26,signalPeriod:9,increasingColor:s.get("positive"),decreasingColor:s.get("negative"),seriesColor:(0,A.yW)(11240154),signalColor:(0,A.yW)(16748607)}),e("Grid",["cursor","y","indicator"]).set("forceHidden",!0),e("StockControl").setAll({visible:!0,active:!1}),e("IndicatorControl").setAll({name:t.translateAny("Indicators"),scrollable:!0,fixedLabel:!0,searchable:!0,indicators:["Acceleration Bands","Accumulation Distribution","Accumulative Swing Index","Aroon","Average True Range","Awesome Oscillator","Bollinger Bands","Bull Bear Power","Chaikin Money Flow","Chaikin Oscillator","Commodity Channel Index","Disparity Index","Heikin Ashi","MACD","Median Price","Momentum","Moving Average","Moving Average Cross","Moving Average Deviation","Moving Average Envelope","On Balance Volume","Price Volume Trend","Relative Strength Index","Standard Deviation","Stochastic Momentum Index","Stochastic Oscillator","Super Trend","Trix","Typical Price","Volume","Volume Profile","VWAP","Williams R","ZigZag"]}),e("ComparisonControl").setAll({name:t.translateAny("Comparison")});const n=[{svgPath:"M 5 35 L 5 15 L 26 15 L 26 5 L 45 25 L 26 45 L 26 35 L 5 35 Z",scale:1,centerX:(0,L.KN)(100),centerY:(0,L.KN)(50)},{svgPath:"M 45 35 L 45 15 L 24 15 L 24 5 L 5 25 L 24 45 L 24 35 L 45 35 Z",scale:1,centerX:(0,L.KN)(0),centerY:(0,L.KN)(50)},{svgPath:"M 35 5 L 15 5 L 15 26 L 5 26 L 25 45 L 45 26 L 35 26 L 35 5 Z",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(100)},{svgPath:"M 35 45 L 15 45 L 15 24 L 5 24 L 25 5 L 45 24 L 35 24 L 35 45 Z",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(0)},{svgPath:"M 5 25 A 1 1 0 0 0 45 25 A 1 1 0 0 0 5 25 M 14 19 A 1 1 0 0 0 19 19 A 1 1 0 0 0 14 19 M 36 19 A 1 1 0 0 0 31 19 A 1 1 0 0 0 36 19 M 16 32 C 20 39 30 39 34 32",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(50)},{svgPath:"M 5 25 A 1 1 0 0 0 45 25 A 1 1 0 0 0 5 25 M 14 19 A 1 1 0 0 0 19 19 A 1 1 0 0 0 14 19 M 36 19 A 1 1 0 0 0 31 19 A 1 1 0 0 0 36 19 M 33 37 C 28 32 21 32 16 37",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(50)},{svgPath:"M 5 25 A 1 1 0 0 0 45 25 A 1 1 0 0 0 5 25 M 14 19 A 1 1 0 0 0 19 19 A 1 1 0 0 0 14 19 M 36 19 A 1 1 0 0 0 31 19 A 1 1 0 0 0 36 19 M 32 35 L 18 35",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(50)},{svgPath:"M 25 46 C 25 38 -6 18 10 5 C 16 1 25 3 25 10 C 25 3 34 1 40 5 C 56 18 25 38 25 46",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(100)},{svgPath:"M 2 43 L 2 4 L 26 4 L 17 15 L 26 26 L 2 26 Z",scale:1,centerX:(0,L.KN)(0),centerY:(0,L.KN)(100)},{svgPath:"M 25,2 L 25,2 L 33,14 L 47,18 L 37,29 L 39,44 L 25,38 L 11,44 L 13,29 L 3,18 L 17,14 L 25,2 Z",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(50)},{svgPath:"M 25,2 L 25,2 L 30,13 L 41,9 L 37,20 L 48,25 L 37,30 L 41,41 L 30,37 L 25,48 L 20,37 L 9,41 L 13,30 L 2,25 L 13,20 L 9,9 L 20,13 L 25,2 Z",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(50)},{svgPath:"M 25,2 L 25,2 L 30,10 L 39,6 L 38,16 L 47,18 L 41,25 L 47,32 L 38,34 L 39,44 L 30,40 L 25,48 L 20,40 L 11,44 L 12,34 L 3,32 L 9,25 L 3,18 L 12,16 L 11,6 L 20,10 L 25,2 Z",scale:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(50),style:{fillOpacity:0}},{svgPath:"M 8 8 L 25 25 L 8 42 M 20 8 L 37 25 L 20 42",scale:1,centerX:(0,L.KN)(100),centerY:(0,L.KN)(50),fillDisabled:!0},{svgPath:"M 42 8 L 25 25 L 42 42 M 30 8 L 13 25 L 30 42",scale:1,centerX:(0,L.KN)(0),centerY:(0,L.KN)(50),fillDisabled:!0},{svgPath:"M 42 42 L 25 25 L 9 42 M 9 29 L 25 13 L 42 30",scale:1,centerX:(0,L.KN)(100),centerY:(0,L.KN)(50),fillDisabled:!0},{svgPath:"M 42 8 L 25 25 L 8 8 M 8 20 L 25 37 L 42 20",scale:1,centerX:(0,L.KN)(100),centerY:(0,L.KN)(50),fillDisabled:!0}];e("DrawingControl").setAll({name:t.translateAny("Draw"),tool:"Line",tools:["Arrows &amp; Icons","Average","Callout","Doodle","Ellipse","Fibonacci","Fibonacci Timezone","Horizontal Line","Horizontal Ray","
1Label","Line","Line Arrow","Measure","Parallel Channel","Polyline","Polyfill","Quadrant Line","Rectangle","Regression","Trend Line","Triangle","Vertical Line"],togglable:!0,strokeColor:(0,A.yW)(8924671),strokeWidth:2,strokeWidths:[1,2,4,8,16],strokeDasharray:[],strokeDasharrays:[[],[2,2],[6,3],[8,4,2,4]],strokeOpacity:1,showExtension:!0,fillColor:(0,A.yW)(11366143),fillOpacity:.2,labelFill:(0,A.yW)(0),labelFontSize:"12px",labelFontSizes:["8px","10px","11px","12px","14px","16px","20px","24px","36px","48px"],labelFontWeight:"normal",labelFontStyle:"normal",labelFontFamily:"Arial",labelFontFamilies:["Arial","Courier New","Garamond","Georgia","Times New Roman"],drawingIcon:n[0],drawingIcons:n,snapToData:!1,scrollable:!0}),e("ColorControl").setAll({useOpacity:!0}),e("DateRangeSelector").setAll({description:t.translateAny("Date Range"),minDate:"auto",maxDate:"auto",allowInput:!0}),e("PeriodSelector").setAll({description:t.translateAny("Period selector"),togglable:!1,icon:"none",periods:[{timeUnit:"day",count:5,name:"5"+t.translateAny("D")},{timeUnit:"month",count:1,name:"1"+t.translateAny("M")},{timeUnit:"month",count:3,name:"3"+t.translateAny("M")},{timeUnit:"month",count:6,name:"6"+t.translateAny("M")},{timeUnit:"ytd",name:t.translateAny("YTD")},{timeUnit:"year",count:1,name:"1"+t.translateAny("Y")},{timeUnit:"year",count:2,name:"2"+t.translateAny("Y")},{timeUnit:"year",count:5,name:"5"+t.translateAny("Y")},{timeUnit:"max",name:t.translateAny("Max")}]}),e("DropdownListControl").setAll({fixedLabel:!1}),e("DropdownList").setAll({searchable:!0,maxSearchItems:10,items:[]}),e("ComparisonControl").setAll({fixedLabel:!0}),e("SeriesTypeControl").setAll({currentItem:"candlestick",items:[{id:"line",label:t.translateAny("Line"),icon:Ti.getIcon("Line Series")},{id:"candlestick",label:t.translateAny("Candles"),icon:Ti.getIcon("Candlestick Series")},{id:"procandlestick",label:t.translateAny("Hollow Candles"),icon:Ti.getIcon("Pro Candlestick Series")},{id:"ohlc",label:t.translateAny("Sticks"),icon:Ti.getIcon("OHLC Series")}]}),e("IntervalControl").setAll({currentItem:"1 day",items:[{id:"1 minute",label:"1 "+t.translateAny("minute"),interval:{timeUnit:"minute",count:1}},{id:"2 minute",label:"2 "+t.translateAny("minutes"),interval:{timeUnit:"minute",count:2}},{id:"5 minute",label:"5 "+t.translateAny("minutes"),interval:{timeUnit:"minute",count:5}},{id:"15 minute",label:"15 "+t.translateAny("minutes"),interval:{timeUnit:"minute",count:15}},{id:"30 minute",label:"30 "+t.translateAny("minutes"),interval:{timeUnit:"minute",count:30}},{id:"1 hour",label:"1 "+t.translateAny("hour"),interval:{timeUnit:"hour",count:1}},{id:"4 hour",label:"4 "+t.translateAny("hours"),interval:{timeUnit:"hour",count:4}},{id:"1 day",label:"1 "+t.translateAny("day"),interval:{timeUnit:"day",count:1}},{id:"1 week",label:"1 "+t.translateAny("week"),interval:{timeUnit:"week",count:1}},{id:"1 month",label:"1 "+t.translateAny("month"),interval:{timeUnit:"month",count:1}},{id:"1 year",label:"1 "+t.translateAny("year"),interval:{timeUnit:"year",count:1}}]}),e("DropdownColors").setAll({colors:gt.new(this._root,{colors:[(0,A.yW)(0),(0,A.yW)(4607574),(0,A.yW)(5989226),(0,A.yW)(7765380),(0,A.yW)(12172741),(0,A.yW)(14738665),(0,A.yW)(16251135),(0,A.yW)(16777215),(0,A.yW)(7525375),(0,A.yW)(11366143),(0,A.yW)(16744645),(0,A.yW)(16760180),(0,A.yW)(16770950),(0,A.yW)(6615513),(0,A.yW)(16744580),(0,A.yW)(7992509),(0,A.yW)(2866431),(0,A.yW)(8924671),(0,A.yW)(16730797),(0,A.yW)(16753471),(0,A.yW)(16767816),(0,A.yW)(2284476),(0,A.yW)(16724794),(0,A.yW)(45153),(0,A.yW)(491755),(0,A.yW)(6619368),(0,A.yW)(13041797),(0,A.yW)(15033130),(0,A.yW)(15710976),(0,A.yW)(41370),(0,A.yW)(14423085),(0,A.yW)(40022),(0,A.yW)(25035),(0,A.yW)(4391084),(0,A.yW)(9896036),(0,A.yW)(13056778),(0,A.yW)(1472e4),(0,A.yW)(27780),(0,A.yW)(11407653),(0,A.yW)(35148)]})}),e("ResetControl").setAll({description:t.translateAny("Reset"),togglable:!1}),e("SettingsControl").setAll({description:t.translateAny("Settings"),togglable:!0,fixedLabel:!0,items:[{id:"fills",label:t.translateAny("X-axis fills"),className:"am5stock-list-info am5stock-list-heading"},{form:"checkbox",id:"fills",label:t.translateAny("Fills")},{id:"y-scale",label:t.translateAny("Y-axis scale"),className:"am5stock-list-info am5stock-list-heading"},{id:"y-scale",form:"radio",value:"percent",label:t.translateAny("Change percent")},{id:"y-scale",form:"radio",value:"regular",label:t.translateAny("Regular")},{id:"y-scale",form:"radio",value:"logarithmic",label:t.translateAny("Logarithmic")},{id:"autosave",label:t.translateAny("Drawings &amp; Indicators"),className:"am5stock-list-info am5stock-list-heading"},{id:"autosave",form:"checkbox",label:t.translateAny("Auto-save")}]}),e("DataSaveControl").setAll({description:t.translateAny("Save drawings and indicators"),togglable:!0,fixedLabel:!0,autoSave:!1,items:[{id:"autosave",form:"checkbox",label:t.translateAny("Auto-save drawings and indicators")},{id:"save",label:t.translateAny("Save drawings &amp; indicators"),subLabel:t.translateAny("Saves drawings/indicators to browser local storage")},{id:"restore",label:t.translateAny("Restore saved data"),subLabel:t.translateAny("Restores saved data from browser local storage")},{id:"clear",label:t.translateAny("Clear"),subLabel:t.translateAny("Clears saved data from browser local storage")}]}),e("Measure").setAll({labelText:"{value} ({percent})\n{count.formatNumber('#,###.')} "+t.translateAny("bars")+" {intervalCount.formatNumber('#,###.')} {intervalUnit}
1",labelVolumeText:"\nVolume: {volume.formatNumber('#.##a')}"});{const a=e("Rectangle",["selector"]);a.setAll({isMeasured:!1,strokeDasharray:[2,2],strokeOpacity:.5,strokeWidth:1}),(0,N.w)(a,"stroke",s,"alternativeBackground")}}}function Ss(x,t){return null==x?t:null==t?x:t<x?t:x}function Ls(x,t){return null==x?t:null==t||x>t?x:t}class ci extends pt.s{constructor(){super(...arguments),this._axesDirty=!1,this._stackDirty=!1,this._selectionProcessed=!1,this._dataSets={},this._x=0,this._y=0,this._bullets={},this.mainContainer=this.children.push(m.m.new(this._root,{})),this.axisRanges=new U.B8,this._skipped=!1,this._couldStackTo=[],this._reallyStackedTo={},this._stackedSeries={},this._aLocationX0=0,this._aLocationX1=1,this._aLocationY0=0,this._aLocationY1=1,this._showBullets=!0,this.valueXFields=["valueX","openValueX","lowValueX","highValueX"],this.valueYFields=["valueY","openValueY","lowValueY","highValueY"],this._emptyDataItem=new He.s(this,void 0,{})}_afterNew(){this.fields.push("categoryX","categoryY","openCategoryX","openCategoryY"),this.valueFields.push("valueX","valueY","openValueX","openValueY","lowValueX","lowValueY","highValueX","highValueY"),this._setRawDefault("vcx",1),this._setRawDefault("vcy",1),this._setRawDefault("valueXShow","valueXWorking"),this._setRawDefault("valueYShow","valueYWorking"),this._setRawDefault("openValueXShow","openValueXWorking"),this._setRawDefault("openValueYShow","openValueYWorking"),this._setRawDefault("lowValueXShow","lowValueXWorking"),this._setRawDefault("lowValueYShow","lowValueYWorking"),this._setRawDefault("highValueXShow","highValueXWorking"),this._setRawDefault("highValueYShow","highValueYWorking"),this._setRawDefault("lowValueXGrouped","low"),this._setRawDefault("lowValueYGrouped","low"),this._setRawDefault("highValueXGrouped","high"),this._setRawDefault("highValueYGrouped","high");const t=this.get("xAxis");t&&(this._xRenderer=t.get("renderer"));const e=this.get("yAxis");e&&(this._yRenderer=e.get("renderer")),super._afterNew(),this.set("maskContent",!0),this._disposers.push(this.axisRanges.events.onAll(i=>{if("clear"===i.type)P.__(i.oldValues,s=>{this._removeAxisRange(s)});else if("push"===i.type)this._processAxisRange(i.newValue);else if("setIndex"===i.type)this._processAxisRange(i.newValue);else if("insertIndex"===i.type)this._processAxisRange(i.newValue);else if("removeIndex"===i.type)this._removeAxisRange(i.oldValue);else{if("moveIndex"!==i.type)throw new Error("Unknown IStreamEvent type");this._processAxisRange(i.value)}})),this.states.create("hidden",{opacity:1,visible:!1}),this.onPrivate("startIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this.onPrivate("endIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this._makeFieldNames()}_processAxisRange(t){const e=m.m.new(this._root,{});t.container=e,this.children.push(e),t.series=this;const i=t.axisDataItem;i.setRaw("isRange",!0);const s=i.component;if(s){s._processAxisRange(i,["range","series"]);const n=i.get("bullet");if(n){const h=n.get("sprite");h&&h.setPrivate("visible",!1)}const a=i.get("axisFill");a&&e.set("mask",a),s._seriesAxisRanges.push(i)}}_onDataClear(){super._onDataClear(),l.__(this._dataSets,(t,e)=>{P.__(e,i=>{i.dispose()}),e.length=0})}_removeAxisRange(t){const e=t.axisDataItem,i=e.component;e.dispose(),P.TF(i._seriesAxisRanges,e);const s=t.container;s&&s.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&P.__(this.valueXFields,t=>{if(this.get(t+"Field")){this._valueXFields.push(t);let i=this.get(t+"Show");this.__valueXShowFields.push(i),-1!=i.indexOf("Working")?this._valueXShowFields.push(i.split("Working")[0]):this._valueXShowFields.push(i)}}),this.valueYFields&&P.__(this.valueYFields,t=>{if(this.get(t+"Field")){this._valueYFields.push(t);let i=this.get(t+"Show");this.__valueYShowFields.push(i),-1!=i.indexOf("Working")?this._valueYShowFields.push(i.split("Working")[0]):this._valueYShowFields.push(i)}})}_dispose(){super._dispose(),this._bullets={};const t=this.chart;t&&t.series.removeValue(this),P.dm(this.get("xAxis").series,this),P.dm(this.get("yAxis").series,this)}_min(t,e){let i=Ss(this.getPrivate(t),e);this.setPrivate(t,i)}_max(t,e){let i=Ls(this.getPrivate(t),e);this.setPrivate(t,i)}_shouldMakeBullet(t){const e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");if(!e.inited||!i.inited)return!1;const n=this.get("minBulletDistance",0);if(n>0){let a=this.startIndex(),u=this.endIndex()-a;if(e==s){if(this._xRenderer.axisLength()/u<n/5)return!1}else if(i==s&&this._yRenderer.axisLength()/u<n/5)return!1}return null!=t.get(this._xField)&&null!=t.get(this._yField)}_makeFieldNames(){const t=this.get("xAxis"),e=this.get("yAxis"),i=t.getPrivate("name"),s=r.ND(i),n=e.getPrivate("name"),a=r.ND(n),h=t.get("renderer").getPrivate("letter"),u=e.get("renderer").getPrivate("letter"),v="open",E="low",M="high",O="Show";"ValueAxis"===t.className?(this._xField=this.get(i+h+O),this._xOpenField=this.get(v+s+h+O),this._xLowField=this.get(E+s+h+O),this._xHighField=this.get(M+s+h+O)):(this._xField=i+h,this._xOpenField=v+s+h,this._xLowField=E+s+h,this._xHighField=M+s+h),"ValueAxis"===e.className?(this._yField=this.get(n+u+O),this._yOpenField=this.get(v+a+u+O),this._yLowField=this.get(E+a+u+O),this._yHighField=this.get(M+a+u+O)):(this._yField=n+u,this._yOpenField=v+a+u,this._yLowField=E+a+u,this._yHighField=M+a+u)}_fixVC(){const t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis"),s=this.states.lookup("hidden"),n=this.get("sequencedInterpolation");if(s){let a=0;n&&(a=.999999999999),t===i?s.set("vcy",a):(e===i||s.set("vcy",a),s.set("vcx",a))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){const t=this.get("xAxis"),e=this.get("yAxis");this.set("x",t.x()-r.JY(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0)),this.set("y",e.y()-r.JY(e.get("centerY",0),e.height())-e.parent.get("paddingTop",0)),this.bulletsContainer.set("y",this.y()),this.bulletsContainer.set("x",this.x())}_prepareChildren(){super._prepareChildren(),this._xRenderer=this.get("xAxis").get("renderer"),this._yRenderer=this.get("yAxis").get("renderer"),this._bullets={},(this.isDirty("valueYShow")||this.isDirty("valueXShow")||this.isDirty("openValueYShow")||this.isDirty("openValueXShow")||this.isDirty("lowValueYShow")||this.isDirty("lowValueXShow")||this.isDirty("highValueYShow")||this.isDirty("highValueXShow"))&&(this._updateFields(),this._makeFieldNames(),this._valuesDirt
1y=!0),(this.isDirty("xAxis")||this.isDirty("yAxis"))&&(this._valuesDirty=!0),this.set("width",this.get("xAxis").width()),this.set("height",this.get("yAxis").height()),this._handleMaskBullets();const t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis");let n,h;switch(this.get("tooltipPositionX")){case"open":n=this._xOpenField;break;case"low":n=this._xLowField;break;case"high":n=this._xHighField;break;default:n=this._xField}switch(this._tooltipFieldX=n,this.get("tooltipPositionY")){case"open":h=this._yOpenField;break;case"low":h=this._yLowField;break;case"high":h=this._yHighField;break;default:h=this._yField}this._tooltipFieldY=h,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();const u=this.get("stacked");if(this.isDirty("stacked")&&(u?this._valuesDirty&&!this._dataProcessed||this._stack():this._unstack()),this._valuesDirty&&!this._dataProcessed){let v,E,M,O;this._dataProcessed=!0,u&&this._stack(),P.__(this.dataItems,I=>{P.__(this._valueXShowFields,$=>{let G=I.get($);null!=G&&(u&&(G+=this.getStackedXValue(I,$)),v=Ss(v,G),E=Ls(E,G))}),P.__(this._valueYShowFields,$=>{let G=I.get($);null!=G&&(u&&(G+=this.getStackedYValue(I,$)),M=Ss(M,G),O=Ls(O,G))}),t.processSeriesDataItem(I,this._valueXFields),e.processSeriesDataItem(I,this._valueYFields)}),this._min("minX",v),this._max("maxX",E),this._min("minY",M),this._max("maxY",O),t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&t.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&&e.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0)}if((this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack(),this._dataGrouped||(t._groupSeriesD
1ata(this),e._groupSeriesData(this),this._dataGrouped=!0),this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty||this.isDirty("minBulletDistance")){let v=this.startIndex(),E=this.endIndex(),M=this.get("minBulletDistance",0);if(M>0&&i&&(this._showBullets=i.get("renderer").axisLength()/(E-v)>M),(this._psi!=v||this._pei!=E||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;const O=this.get("vcx",1),I=this.get("vcy",1),$=this.get("stacked",!1),G=this.getPrivate("outOfSelection");if(i===t||!i)if(e._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),G)e.markDirtySelectionExtremes();else for(let F=v;F<E;F++)this.processYSelectionDataItem(this.dataItems[F],I,$);if(i===e||!i)if(t._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),G)e.markDirtySelectionExtremes();else for(let F=v;F<E;F++)this.processXSelectionDataItem(this.dataItems[F],O,$);if((i===t||!i)&&("valueYWorking"!==this.get("valueYShow")||this.get("useSelectionExtremes"))){const F=this.getPrivate("selectionMinY");null!=F&&(this.setPrivateRaw("minY",F),e.markDirtyExtremes());const Q=this.getPrivate("selectionMaxY");null!=Q&&(this.setPrivateRaw("maxY",Q),e.markDirtyExtremes())}if((i===e||!i)&&("valueXWorking"!==this.get("valueXShow")||this.get("useSelectionExtremes"))){const F=this.getPrivate("selectionMinX");null!=F&&(this.setPrivateRaw("minX",F),e.markDirtyExtremes());const Q=this.getPrivate("selectionMaxX");null!=Q&&(this.setPrivateRaw("maxX",Q),t.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&t.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&e.markDirtySelectionExtremes()}}}_postUpdateData(){const t=this.get("xAxis"),e=this.get("yAxis");t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,P.__(this.dataItems,i=>{i.open=void 0,i.close=void 0,t.processSeriesDataItem(i,this._valueXFields),e.processSeriesDataItem(i,this._valueYFields)})}_makeRangeMask(){if(this.axisRanges.length>0){let t=this._mainContainerMask;null==t&&(t=this.children.push(V.A.new(this._root,{})),this._mainContainerMask=t,t.set("draw",(e,i)=>{const s=this.parent;if(s){const n=this._root.container.width(),a=this._root.container.height();e.moveTo(-n,-a),e.lineTo(-n,2*a),e.lineTo(2*n,2*a),e.lineTo(2*n,-a),e.lineTo(-n,-a),this.axisRanges.each(h=>{const u=h.axisDataItem.get("axisFill");if(s&&u){let v=u.get("draw");v&&v(e,i)}})}this.mainContainer._display.mask=t._display})),t.markDirty(),t._markDirtyKey("fill")}else this.mainContainer._display.mask=null}_updateChildren(){super._updateChildren(),this._x=this.x(),this._y=this.y(),this._makeRangeMask()}_stack(){const t=this.chart;if(t){const e=t.series.indexOf(this);if(this._couldStackTo=[],e>0){let i;for(let s=e-1;s>=0&&(i=t.series.getIndex(s),i.get("xAxis")!==this.get("xAxis")||i.get("yAxis")!==this.get("yAxis")||i.className!==this.className||(this._couldStackTo.push(i),i.get("stacked")));s--);}this._stackDataItems()}}_unstack(){l.__(this._reallyStackedTo,(t,e)=>{delete e._stackedSeries[this.uid]}),this._reallyStackedTo={},P.__(this.dataItems,t=>{t.setRaw("stackToItemY",void 0),t.setRaw("stackToItemX",void 0)})}_handleRemoved(){const t=this.get("xAxis");t&&t._handleSeriesRemoved();const e=this.get("yAxis");e&&e._handleSeriesRemoved()}_stackDataItems(){const t=this.get("baseAxis"),e=this.get("xAxis"),i=this.get("yAxis");let s,n;t===e?(s="valueY",n="stackToItemY"):t===i&&(s="valueX",n="stackToItemX");let a=this._couldStackTo.length,h=0;const u=this.get("stackToNegative");this._reallyStackedTo={},P.__(this.dataItems,v=>{for(let E=0;E<a;E++){let M=this._couldStackTo[E],O=M.dataItems[h],I=v.get(s);if(O){let $=O.get(s);if(u){if(!c.Et(I))break;if(c.Et($)){if(E==a-1&&v.setRaw(n,void 0),I>=0&&$>=0){v.setRaw(n,O),this._reallyStackedTo[M.uid]=M,M._stackedSeries[this.uid]=this;break}if(I<0&&$<0){v.setRaw(n,O),this._reallyStackedTo[M.uid]=M,M._stackedSeries[this.uid]=this;break}}}else if(c.Et(I)&&c.Et($)){v.setRaw(n,O),this._reallyStackedTo[M.uid]=M,M._stackedSeries[this.uid]=this;break}}}h++})}processXSelectionDataItem(t,e,i){P.__(this.__valueXShowFields,s=>{let n=t.get(s);null!=n&&(i&&(n+=this.getStackedXValueWorking(t,s)),this._min("selectionMinX",n),this._max("selectionMaxX",n*e))})}processYSelectionDataItem(t,e,i){P.__(this.__valueYShowFields,s=>{let n=t.get(s);null!=n&&(i&&(n+=this.getStackedYValueWorking(t,s)),this._min("selectionMinY",n),this._max("selectionMaxY",n*e))})}getStackedYValueWorking(t,e){const i=t.get("stackToItemY");
1if(i){const s=i.component;return i.get(e,0)*s.get("vcy",1)+this.getStackedYValueWorking(i,e)}return 0}getStackedXValueWorking(t,e){const i=t.get("stackToItemX");if(i){const s=i.component;return i.get(e,0)*s.get("vcx",1)+this.getStackedXValueWorking(i,e)}return 0}getStackedYValue(t,e){const i=t.get("stackToItemY");return i?i.get(e,0)+this.getStackedYValue(i,e):0}getStackedXValue(t,e){const i=t.get("stackToItemX");return i?i.get(e,0)+this.getStackedXValue(i,e):0}createLegendMarker(t){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0,this.markDirty()}_markDataSetDirty(){this._afterDataChange(),this._valuesDirty=!0,this._dataProcessed=!1,this._aggregatesCalculated=!1,this.markDirty()}_clearDirty(){super._clearDirty(),this._axesDirty=!1,this._selectionProcessed=!1,this._stackDirty=!1,this._dataProcessed=!1}_positionBullet(t){let e=t.get("sprite");if(e){let i=e.dataItem,s=t.get("locationX",i.get("locationX",.5)),n=t.get("locationY",i.get("locationY",.5)),a=this.get("xAxis"),h=this.get("yAxis"),u=this.get("exactLocationX",!1),v=this.get("exactLocationY",!1),E=a.getDataItemPositionX(i,this._xField,s,this.get("vcx",1),u),M=h.getDataItemPositionY(i,this._yField,n,this.get("vcy",1),v),O=this.getPoint(E,M),I=i.get("left",O.x),$=i.get("right",O.x),G=i.get("top",O.y),F=i.get("bottom",O.y),Q=0,q=0,et=$-I,ot=F-G;if(this._shouldShowBullet(E,M)){e.setPrivate("visible",!t.getPrivate("hidden"));let ft=t.get("field");const wt=this.get("baseAxis"),Ot=this.get("xAxis"),Et=this.get("yAxis");if(null!=ft){let Ft;wt==Ot?("value"==ft?Ft=this._yField:"open"==ft?Ft=this._yOpenField:"high"==ft?Ft=this._yHighField:"low"==ft&&(Ft=this._yLowField),Ft&&(M=Et.getDataItemPositionY(i,Ft,0,this.get("vcy",1),v),O=this._yRenderer.positionToPoint(M),q=O.y,Q=I+et*s)):("value"==ft?Ft=this._xField:"open"==ft?Ft=this._xOpenField:"high"==ft?Ft=this._xHighField:"low"==ft&&(Ft=this._xLowField),Ft&&(E=Ot.getDataItemPositionX(i,Ft,0,this.get("vcx",1),u),O=this._xRenderer.positionToPoint(E),Q=O.x,q=F-ot*n))}else Q=I+et*s,q=F-ot*n;const At=t.get("stacked");if(At){const Ft=this.chart;if(wt==Ot){let Vt=this._bullets[E+"_"+M];if(Vt){let te=Vt.bounds(),Zt=e.localBounds(),ie=q;q=te.top,"down"==At?q=te.bottom-Zt.top:"auto"==At?Ft&&(ie<Ft.plotContainer.height()/2?q=te.bottom-Zt.top:q+=Zt.bottom):q+=Zt.bottom}this._bullets[E+"_"+M]=e}else{let Vt=this._bullets[E+"_"+M];if(Vt){let te=Vt.bounds(),Zt=e.localBounds(),ie=Q;Q=te.right,"down"==At?Q=te.left-Zt.right:"auto"==At?Ft&&(ie<Ft.plotContainer.width()/2?Q=te.left-Zt.right:Q-=Zt.left):Q-=Zt.left}this._bullets[E+"_"+M]=e}}e.isType("Label")&&(e.setPrivate("maxWidth",Math.abs(et)),e.setPrivate("maxHeight",Math.abs(ot))),e.setAll({x:Q,y:q})}else e.setPrivate("visible",!1)}}_shouldShowBullet(t,e){return this._showBullets}setDataSet(t){if(this._dataSets[t]){this._handleDataSetChange(),this._dataItems=this._dataSets[t],this._markDataSetDirty(),this._dataSetId=t;const e="datasetchanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,id:t})}}resetGrouping(){l.__(this._dataSets,(t,e)=>{e!=this._mainDataItems&&P.__(e,i=>{i.dispose()})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){P.__(this._dataItems,t=>{let e=t.bullets;e&&P.__(e,i=>{if(i){let s=i.get("sprite");s&&s.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(t){const e=Object.create(null,{show:{get:()=>super.show}});return(0,dt.sH)(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.show.call(this,t).then(()=>{this._isShowing=!1;let s=this.get("xAxis"),n=this.get("yAxis"),a=this.get("baseAxis");n!==a&&n.markDirtySelectionExtremes(),s!==a&&s.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(t)),i.push(this._sequencedShowHide(!0,t)),yield Promise.all(i)})}hide(t){const e=Object.create(null,{hide:{get:()=>super.hide}});return(0,dt.sH)(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.hide.call(this,t).then(()=>{this._isHiding=!1})),i.push(this.bulletsContainer.hide(t)),i.push(this._sequencedShowHide(!1,t)),yield Promise.all(i)})}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)];c.Et(e)||(e=this.get("stateAnimationDuration",0));const n=this.get("stateAnimationEasing");P.__(this._valueFields,a=>{s.push(t.animate({key:a+"Working",to:t.get(a),duration:e,easing:n}).waitForStop())}),yield Promise.all(s)})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)];let n=this.states.lookup("hidden");n||(n=this.states.create("hidden",{})),c.Et(e)||(e=n.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));const a=n.get("stateAnimationEasing",this.get("stateAnimationEasing")),h=this.get("xAxis"),u=this.get("yAxis"),v=this.get("baseAxis"),E=this.get("stacked");if((v===h||!v)&&P.__(this._valueYFields,M=>{let O=u.getPrivate("min"),I=u.baseValue();c.Et(O)&&O>I&&(I=O),E&&(I=0),null!=t.get(M)&&s.push(t.animate({key:M+"Working",to:I,duration:e,easing:a}).waitForStop())}),v===u||!v){let M=h.getPrivate("min"),O=h.baseValue();c.Et(M)&&M>O&&(O=M),E&&(O=0),P.__(this._valueXFields,I=>{null!=t.get(I)&&s.push(t.animate({key:I+"Working",to:O,duration:e,easing:a}).waitForStop())})}yield Promise.all(s)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){const t=this._stackedSeries;
1t&&l.__(t,(e,i)=>{i._stackDirty||i._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(t){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(t),this.updateLegendValue(t));const e=this.get("tooltip"),i=this.get("exactLocationX",!1),s=this.get("exactLocationY",!1);if(e)if(!this.isHidden()&&this.get("visible")){if(e._setDataItem(t),t){let n=this.get("locationX",0),a=this.get("locationY",1),h=t.get("locationX",n),u=t.get("locationY",a);const v=this.get("xAxis"),E=this.get("yAxis"),M=this.get("vcx",1),O=this.get("vcy",1),I=v.getDataItemPositionX(t,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*h,M,i),$=E.getDataItemPositionY(t,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*u,O,s),G=this.getPoint(I,$);let F=!0;if(P.__(this._valueFields,Q=>{null==t.get(Q)&&(F=!1)}),F){const Q=this.chart;Q&&Q.inPlot(G)?(e.label.text.markDirtyText(),e.set("tooltipTarget",this._getTooltipTarget(t)),e.set("pointTo",this._display.toGlobal({x:G.x,y:G.y}))):e._setDataItem(void 0)}else e._setDataItem(void 0)}}else this.hideTooltip()}hideTooltip(){const t=this.get("tooltip");return t&&t.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(t){if("bullet"==this.get("seriesTooltipTarget")){const e=t.bullets;if(e&&e.length>0){const s=e[0].get("sprite");if(s)return s}}return this}updateLegendValue(t){const e=this.get("legendDataItem");if(e){const i=e.get("label");if(i){let n="";t?(i._setDataItem(t),n=this.get("legendLabelText",i.get("text",this.get("name","")))):(i._setDataItem(this._emptyDataItem),n=this.get("legendRangeLabelText",this.get("legendLabelText",i.get("text",this.get("name",""))))),i.set("text",n)}const s=e.get("valueLabel");if(s){let n="";t?(s._setDataItem(t),n=this.get("legendValueText",s.get("text",""))):(s._setDataItem(this._emptyDataItem),n=this.get("legendRangeValueText",s.get("text",""))),s.set("text",n)}}}_getItemReaderLabel(){let t="X: {"+this._xField;return this.get("xAxis").isType("DateAxis")&&(t+=".formatDate()"),t+="}; Y: {"+this._yField,this.get("yAxis").isType("DateAxis")&&(t+=".formatDate()"),t+="}",t}getPoint(t,e){let i=this._xRenderer.positionToCoordinate(t),s=this._yRenderer.positionToCoordinate(e),n=999999999;return s<-n?s=-n:s>n&&(s=n),i<-n?i=-n:i>n&&(i=n),{x:i,y:s}}_shouldInclude(t){return!0}handleCursorHide(){this.hideTooltip(),this.updateLegendValue(void 0),this.updateLegendMarker(void 0)}_afterDataChange(){super._afterDataChange(),this.get("xAxis")._markDirtyKey("start"),this.get("yAxis")._markDirtyKey("start"),this.resetExtremes()}resetExtremes(){this.setPrivate("selectionMinX",void 0),this.setPrivate("selectionMaxX",void 0),this.setPrivate("selectionMinY",void 0),this.setPrivate("selectionMaxY",void 0),this.setPrivate("minX",void 0),this.setPrivate("minY",void 0),this.setPrivate("maxX",void 0),this.setPrivate("maxY",void 0)}createAxisRange(t){return this.axisRanges.push({axisDataItem:t})}get mainDataItems(){return this._mainDataItems}_adjustStartIndex(t){const e=this.get("xAxis");if(this.get("baseAxis")==e&&e.isType("DateAxis")){const s=e.baseDuration(),n=e.getPrivate("selectionMin",e.getPrivate("min",0)),a=s*this.get("locationX",.5);let h=-1/0;for(;h<n;){const u=this.dataItems[t];if(!u)break;{const v=u.open;if(h=v?v.valueX:u.get("valueX",0),h+=a,!(h<n))break;t++}}}return t}}ci.className="XYSeries",ci.classNames=pt.s.classNames.concat([ci.className]);class di extends ci{constructor(){super(...arguments),this._ph=0,this._pw=0,this._columnsUpdated=!1}_makeGraphics(t,e){return this.makeColumn(e,t)}_makeFieldNames(){super._makeFieldNames();const t=this.get("xAxis"),e=this.get("yAxis"),i="CategoryAxis",s="ValueAxis";t.isType(i)&&(this.get("openCategoryXField")||(this._xOpenField=this._xField)),t.isType(s)&&(this.get("openValueXField")||(this._xOpenField=this._xField)),e.isType(i)&&(this.get("openCategoryYField")||(this._yOpenField=this._yField)),e.isType(s)&&(this.get("openValueYField")||(this._yOpenField=this._yField))}_prepareChildren(){super._prepareChildren();const t=this.get("xAxis"),e=this.get("yAxis"),i=this.dataItems.length,s=Math.max(0,this.startIndex()-2),n=Math.min(this.endIndex()+2,i-1);if(t.inited&&e.inited)for(let a=s;a<=n;a++)this._createGraphics(this.dataItems[a])}_updateChildren(){const t=this.chart;t&&(this._ph=t.plotContainer.height(),this._pw=t.plotContainer.width());const e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis"),n=this.columns.template;this.isDirty("fill")&&null==n.get("fill")&&n.set("fill",this.get("fill")),this.isDirty("fillPattern")&&null==n.get("fillPattern")&&n.set("fillPattern",this.get("fillPattern")),this.isDirty("stroke")&&null==n.get("stroke")&&n.set("stroke",this.get("stroke"));let a=0,h=0,u=0;s&&P.__(s.series,G=>{if(G instanceof di){const F=G.get("stacked");F&&0==u&&h++,!F&&G.get("clustered")&&h++}G===this&&(a=h-1),u++}),this.get("clustered")||(a=0,h=1),0===h&&(h=1,a=0);const v="cellStartLocation",E="cellEndLocation",M=this._xRenderer.get(v,0),O=this._xRenderer.get(E,1),I=this._yRenderer.get(v,0),$=this._yRenderer.get(E,1);if(this._aLocationX0=M+a/h*(O-M),this._aLocationX1=M+(a+1)/h*(O-M),this._aLocationY0=I+a/h
1*($-I),this._aLocationY1=I+(a+1)/h*($-I),e.inited&&i.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty){const G=this.dataItems.length;let F=Math.max(0,this.startIndex()-2),Q=Math.min(this.endIndex()+2,G-1);for(let ot=0;ot<F;ot++)this._toggleColumn(this.dataItems[ot],!1);let q=this.dataItems[F];for(let ot=F;ot<=Q;ot++){let ft=this.dataItems[ot];if(null!=ft.get("valueX")&&null!=ft.get("valueY")){if(q=ft,ot>0&&F>0)for(let wt=ot-1;wt>=0;wt--){let Ot=this.dataItems[wt];if(null!=Ot.get("valueX")&&null!=Ot.get("valueY")){q=Ot;break}}break}this._toggleColumn(ft,!1)}this._beforeColumnsDraw();let et=0;i.isType("CategoryAxis")&&e.isType("CategoryAxis")?et=2:e===s?et=0:i===s&&(et=1);for(let ot=F;ot<=Q;ot++){let ft=this.dataItems[ot];this._updateGraphics(ft,q,et),null!=ft.get("valueX")&&null!=ft.get("valueY")&&(q=ft)}this._afterColumnsDraw();for(let ot=Q+1;ot<G;ot++)this._toggleColumn(this.dataItems[ot],!1);this._columnsUpdated=!0}}else this._skipped=!0;this.getPrivate("doNotUpdateLegend")||this.updateLegendMarker(this.get("tooltipDataItem")),super._updateChildren()}_afterChanged(){super._afterChanged(),this._columnsUpdated=!1}_beforeColumnsDraw(){}_afterColumnsDraw(){}_createGraphics(t){let e=t.get("graphics");if(!e){e=this._makeGraphics(this.columns,t),t.set("graphics",e),e._setDataItem(t);const i=t.get("legendDataItem");if(i){const n=i.get("markerRectangle");if(n){const a=n.states.lookup("default");P.__(V.o,h=>{const u=e.get(h,this.get(h));n.set(h,u),a.set(h,u)})}}let s=t.get("rangeGraphics");s&&P.__(s,n=>{n.dispose()}),s=[],t.setRaw("rangeGraphics",s),this.axisRanges.each(n=>{const a=n.container,h=this._makeGraphics(n.columns,t);s&&s.push(h),h.setPrivate("list",n.columns),a.children.push(h)})}}createAxisRange(t){return P.__(this.dataItems,e=>{const i=e.get("graphics");i&&(i.dispose(),e.set("graphics",void 0))}),super.createAxisRange(t)}_updateGraphics(t,e,i){let s=t.get("graphics");const n=this._xField,a=this._yField,h=t.get(n),u=t.get(a),v=this.get("exactLocationX",!1);if(null!=h&&null!=u){const E=this._xOpenField,M=this._yOpenField,O=this.get("locationX",t.get("locationX",.5)),I=this.get("locationY",t.get("locationY",.5)),$=this.get("openLocationX",t.get("openLocationX",O)),G=this.get("openLocationY",t.get("openLocationY",I)),F=s.get("width"),Q=s.get("height"),q=this.get("stacked"),et=this.get("xAxis"),ot=this.get("yAxis"),ft=et.get("start"),wt=et.get("end"),Ot=ot.get("start"),Et=ot.get("end");let At,Ft,Vt,te,Zt=this.get("vcy",1),ie=this.get("vcx",1),Lt=!1,zt=!1;if(0==i){let Yt=this._aLocationX0+$-.5,Nt=this._aLocationX1+O-.5;if(F instanceof L.QE){let Wt=(Nt-Yt)*(1-F.value)/2;Yt+=Wt,Nt-=Wt}if(At=et.getDataItemPositionX(t,E,Yt,ie,v),Ft=et.getDataItemPositionX(t,n,Nt,ie,v),Vt=ot.getDataItemPositionY(t,a,I,Zt),this._yOpenField!==this._yField)te=ot.getDataItemPositionY(t,M,G,Zt);else if(q){let Wt=t.get("stackToItemY");te=Wt?ot.getDataItemPositionY(Wt,a,G,Wt.component.get("vcy")):ot.basePosition()}else te=ot.basePosition();t.setRaw("point",{x:At+(Ft-At)/2,y:Vt}),zt=!0}else if(1==i){let Yt=this._aLocationY0+G-.5,Nt=this._aLocationY1+I-.5;if(Q instanceof L.QE){let Wt=(Nt-Yt)*(1-Q.value)/2;Yt+=Wt,Nt-=Wt}if(Vt=ot.getDataItemPositionY(t,M,Yt,Zt),te=ot.getDataItemPositionY(t,a,Nt,Zt),Ft=et.getDataItemPositionX(t,n,O,ie,v),this._xOpenField!==this._xField)At=et.getDataItemPositionX(t,E,$,ie,v);else if(q){let Wt=t.get("stackToItemX");At=Wt?et.getDataItemPositionX(Wt,n,$,Wt.component.get("vcx"),v):et.basePosition()}else At=et.basePosition();Lt=!0,t.setRaw("point",{x:Ft,y:Vt+(te-Vt)/2})}else if(2==i){let Yt=this._aLocationX0+$-.5,Nt=this._aLocationX1+O-.5;if(F instanceof L.QE){let Wt=(Nt-Yt)*(1-F.value)/2;Yt+=Wt,Nt-=Wt}if(At=et.getDataItemPositionX(t,E,Yt,ie),Ft=et.getDataItemPositionX(t,n,Nt,ie),Yt=this._aLocationY0+G-.5,Nt=this._aLocationY1+I-.5,Q instanceof L.QE){let Wt=(Nt-Yt)*(1-Q.value)/2;Yt+=Wt,Nt-=Wt}Vt=ot.getDataItemPositionY(t,M,Yt,Zt),te=ot.getDataItemPositionY(t,a,Nt,Zt),t.setRaw("point",{x:At+(Ft-At)/2,y:Vt+(te-Vt)/2})}this._applyGraphicsStates(t,e),this._updateSeriesGraphics(t,s,At,Ft,Vt,te,Lt,zt),At<ft&&Ft<ft||At>wt&&Ft>wt||Vt<Ot&&te<=Ot||Vt>=Et&&te>Et||c.yr(At)||c.yr(Vt)?this._toggleColumn(t,!1):this._toggleColumn(t,!0);let Kt=t.get("rangeGraphics");Kt&&P.__(Kt,Yt=>{this._updateSeriesGraphics(t,Yt,At,Ft,Vt,te,Lt,zt)})}else this._toggleColumn(t,!1)}_updateSeriesGraphics(t,e,i,s,n,a,h,u){const v=e.get("width"),E=e.get("height"),M=e.get("maxWidth"),O=e.get("maxHeight"),I=this.getPoint(i,n),$=this.getPoint(s,a),G=t.get("point");if(G){const F=this.getPoint(G.x,G.y);G.x=F.x+this._x,G.y=F.y+this._y}if(i=I.x,s=$.x,n=I.y,a=$.y,c.Et(v)){const F=(s-i-v)/2;i+=F,s-=F}if(c.Et(M)&&M<Math.abs(s-i)){const F=(s-i-M)/2;i+=F,s-=F}if(c.Et(E)){const F=(a-n-E)/2;n+=F,a-=F}if(c.Et(O)&&O<Math.abs(a-n)){const F=(a-n-O)/2;n+=F,a-=F}this.get("adjustBulletPosition")&&(h&&(s=Math.min(Math.max(0,s),this._pw),i=Math.min(Math.max(0,i),this._pw)),u&&(n=Math.min(Math.max(0,n),this._ph),a=Math.min(Math.max(0,a),this._ph))),t.setRaw("left",i),t.setRaw("right",s),t.setRaw("top",n),t.setRaw("bottom",a),e.setPrivate("width",s-i),e.setPrivate("height",a-n),e.set("x",i),e.set("y",a-(a-n))}_handleDataSetChange(){super._handleDataSetChange(),P.__(this._dataItems,t=>{this._toggleColumn(t,!1)})}_applyGraphicsStates(t,e){const i=t.get("graphics"),s=i.states.lookup("dropFromOpen"),n=i.states.lookup("riseFromOpen"),a=i.states.lookup("dropFromPrevious"),h=i.states.lookup("riseFromPrevious");if(s||a||n||h){const u=this.get("xAxis"),v=this.get("yAxis"),E=this.get("baseAxis");let M,O,I;E===u&&v.isType("ValueAxis")?(M=t.get(this._yOpenField),O=t.get(this._yField),I=e.get(this._yField)):E===v&&u.isType("ValueAxis")&&(M=t.get(this._xOpenField),O=t.get(this._xField),I=e.get(this._xField)),c.Et(M)&&c.Et(O)&&(O<M?s&&s.apply():n&&n.apply(),c.Et(I)&&(O<I?a&&a.apply():h&&h.apply()))}}disposeDataItem(t){super.disposeDataItem(t);const e=t.get("graphics");e&&(this.columns.removeValue(e),e.dispose());const i=t.get("rangeGraphics");i&&P.__(i,s=>{const n=s.getPrivate("list");n&&n.removeValue(s),s.dispose()})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],n=t.get("graphics");n&&s.push(n.hide(e));const a=t.get("rangeGraphics");a&&P.__(a,h=>{s.push(h.hide(e))}),yield Promise.all(s)})}_toggleColumn(t,e){const i=t.get("graphics");i&&i.setPrivate("visible",e);const s=t.get("rangeGraphics");s&&P.__(s,a=>{a.setPrivate("visible",e)});const n=t.bullets;n&&P.__(n,a=>{a.setPrivate("hidden",!e)})}
1showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,dt.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)],n=t.get("graphics");n&&s.push(n.show(e));const a=t.get("rangeGraphics");a&&P.__(a,h=>{s.push(h.show(e))}),yield Promise.all(s)})}updateLegendMarker(t){let e=this.get("legendDataItem");if(this.get("useLastColorForLegendMarker")&&!t){const i=this.dataItems[this.endIndex()-1];i&&(t=i)}if(e){let i=this.columns.template;if(t){let n=t.get("graphics");n&&(i=n)}const s=e.get("markerRectangle");if(s&&!e.get("itemContainer").get("disabled")){const n=s.states.lookup("default");P.__(V.o,a=>{const h=i.get(a,this.get(a));s.set(a,h),n.set(a,h)})}}}_getTooltipTarget(t){return"bullet"==this.get("seriesTooltipTarget")?super._getTooltipTarget(t):t.get("graphics")||this}}di.className="BaseColumnSeries",di.classNames=ci.classNames.concat([di.className]);class Pi extends di{constructor(){super(...arguments),this.allColumns=this.children.push(V.A.new(this._root,{})),this.allColumnsData=[],this.columns=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>b.T._new(this._root,{position:"absolute",themeTags:r.kE(this.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template])))}makeColumn(t,e){const i=e.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(t),e.push(i),i}_processAxisRange(t){super._processAxisRange(t),t.columns=new U.TS(Ct.Bj.new({}),()=>b.T._new(this._root,{position:"absolute",themeTags:r.kE(t.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template,t.columns.template]))}_beforeColumnsDraw(){this.allColumnsData=[]}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",t=>{t.clear(),P.__(this.allColumnsData,e=>{const i=e.width,s=e.height,n=e.x,a=e.y,h=e.stroke,v=e.strokeWidth,E=e.strokeOpacity;t.beginFill(e.fill,e.fillOpacity),t.beginPath(),t.lineStyle(v,h,E),t.drawRect(n,a,i,s),t.endStroke(),t.endFill()})})}_updateChildren(){this.isDirty("turboMode")&&(this.markDirtyValues(),this.get("turboMode")||this.allColumns.set("draw",void 0)),super._updateChildren()}_updateSeriesGraphics(t,e,i,s,n,a,h,u){if(this.get("turboMode")){e.virtualParent=this.chart,e.parent&&(this.mainContainer.children.removeValue(e),e._parent=void 0);const v=e.get("stroke"),E=e.get("fillOpacity",1),M=e.get("strokeOpacity",1),O=e.get("strokeWidth",1),I=e.get("fill"),$=this.getPoint(i,n),G=this.getPoint(s,a),F=t.get("point");if(F){const Q=this.getPoint(F.x,F.y);F.x=Q.x+this._x,F.y=Q.y+this._y}s=G.x,n=$.y,a=G.y,t.setRaw("left",i=$.x),t.setRaw("right",s),t.setRaw("top",n),t.setRaw("bottom",a),this.allColumnsData.push({width:s-i,height:a-n,x:i,y:n,stroke:v,fill:I,strokeWidth:O,strokeOpacity:M,fillOpacity:E})}else e.parent||this.mainContainer.children.push(e),super._updateSeriesGraphics(t,e,i,s,n,a,h,u)}}Pi.className="ColumnSeries",Pi.classNames=di.classNames.concat([Pi.className]);class Ni extends b.T{_beforeChanged(){super._beforeChanged(),(this.isDirty("lowX0")||this.isDirty("lowY0")||this.isDirty("lowX1")||this.isDirty("lowY1")||this.isDirty("highX0")||this.isDirty("highX1")||this.isDirty("highY0")||this.isDirty("highY1"))&&(this._clear=!0)}_draw(){super._draw();const t=this._display;t.moveTo(this.get("lowX0",0),this.get("lowY0",0)),t.lineTo(this.get("lowX1",0),this.get("lowY1",0)),t.moveTo(this.get("highX0",0),this.get("highY0",0)),t.lineTo(this.get("highX1",0),this.get("highY1",0))}}Ni.className="Candlestick",Ni.classNames=b.T.classNames.concat([Ni.className]);class as extends Pi{constructor(){super(...arguments),this.columns=this.addDisposer(new U.TS(Ct.Bj.new({themeTags:["autocolor"]}),()=>Ni._new(this._root,{themeTags:r.kE(this.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template])))}makeColumn(t,e){const i=e.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(t),e.push(i),i}_updateGraphics(t,e,i){super._updateGraphics(t,e,i);const s=this.getRaw("xAxis"),n=this.getRaw("yAxis");let u,v,E,M,O,I,$,G,ot,a=this.get("vcy",1),h=this.get("vcx",1),F=this.get("locationX",t.get("locationX",.5)),Q=this.get("locationY",t.get("locationY",.5)),q=this.get("openLocationX",t.get("openLocationX",F)),et=this.get("openLocationY",t.get("openLocationY",Q));if(0==i){let ft=n.getDataItemPositionY(t,this._yOpenField,1,a),wt=n.getDataItemPositionY(t,this._yField,1,a);M=n.getDataItemPositionY(t,this._yLowField,1,a),G=n.getDataItemPositionY(t,this._yHighField,1,a),$=Math.max(ft,wt),E=Math.min(ft,wt);let Ot=this._aLocationX0+q-.5;u=s.getDataItemPositionX(t,this._xField,Ot+(this._aLocationX1+F-.5-Ot)/2,h),v=u,O=u,I=u,ot="vertical"}else{let ft=s.getDataItemPositionX(t,this._xOpenField,1,h),wt=s.getDataItemPositionX(t,this._xField,1,h);v=s.getDataItemPositionX(t,this._xLowField,1,h),I=s.getDataItemPositionX(t,this._xHighField,1,h),O=Math.max(ft,wt),u=Math.min(ft,wt);let Ot=this._aLocationY0+et-.5;E=n.getDataItemPositionY(t,this._yField,Ot+(this._aLocationY1+Q-.5-Ot)/2,a),M=E,$=E,G=E,ot="horizontal"}this._updateCandleGraphics(t,u,v,E,M,O,I,$,G,ot)}_updateCandleGraphics(t,e,i,s,n,a,h,u,v,E){let M=t.get("graphics");
1if(M){let O=this.getPoint(e,s),I=this.getPoint(i,n),$=this.getPoint(a,u),G=this.getPoint(h,v);if(this.get("turboMode")){const F=this.allColumnsData[this.allColumnsData.length-1];F.lowX0=O.x,F.lowY0=O.y,F.lowX1=I.x,F.lowY1=I.y,F.highX0=$.x,F.highY0=$.y,F.highX1=G.x,F.highY1=G.y}else{let F=M.x(),Q=M.y();M.set("lowX0",O.x-F),M.set("lowY0",O.y-Q),M.set("lowX1",I.x-F),M.set("lowY1",I.y-Q),M.set("highX0",$.x-F),M.set("highY0",$.y-Q),M.set("highX1",G.x-F),M.set("highY1",G.y-Q),M.set("orientation",E);let q=t.get("rangeGraphics");q&&P.__(q,et=>{et.set("lowX0",O.x-F),et.set("lowY0",O.y-Q),et.set("lowX1",I.x-F),et.set("lowY1",I.y-Q),et.set("highX0",$.x-F),et.set("highY0",$.y-Q),et.set("highX1",G.x-F),et.set("highY1",G.y-Q),et.set("orientation",E)})}}}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",t=>{t.clear(),P.__(this.allColumnsData,e=>{const i=e.width,s=e.height,n=e.x,a=e.y,h=e.stroke,v=e.strokeWidth,E=e.strokeOpacity,O=e.lowX0,I=e.lowY0,$=e.lowX1,G=e.lowY1,F=e.highX0,Q=e.highY0,q=e.highX1,et=e.highY1;t.beginFill(e.fill,e.fillOpacity),t.beginPath(),t.lineStyle(v,h,E),t.drawRect(n,a,i,s),t.moveTo(O,I),t.lineTo($,G),t.moveTo(F,Q),t.lineTo(q,et),t.endStroke(),t.endFill()})})}_processAxisRange(t){super._processAxisRange(t),t.columns=new U.TS(Ct.Bj.new({}),()=>Ni._new(this._root,{themeTags:r.kE(t.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template,t.columns.template]))}}as.className="CandlestickSeries",as.classNames=Pi.classNames.concat([as.className]);class ui extends ci{constructor(){super(...arguments),this._strokeGenerator=Pe(),this._fillGenerator=we(),this.strokes=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>V.A._new(this._root,{themeTags:r.kE(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template]))),this.fills=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>V.A._new(this._root,{themeTags:r.kE(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template]))),this._previousPoint=[0,0,0,0],this._dindex=0,this._sindex=0}_afterNew(){this._fillGenerator.y0(function(t){return t[3]}),this._fillGenerator.x0(function(t){return t[2]}),this._fillGenerator.y1(function(t){return t[1]}),this._fillGenerator.x1(function(t){return t[0]}),super._afterNew()}makeStroke(t){const e=this.mainContainer.children.push(t.make());return t.push(e),e}makeFill(t){const e=this.mainContainer.children.push(t.make());return t.push(e),e}_updateChildren(){this._strokeTemplate=void 0,this._fillTemplate=void 0;let t=this.get("xAxis"),e=this.get("yAxis");if(this.isDirty("stroke")){const i=this.get("stroke");this.strokes.template.set("stroke",i);const s=this._legendStroke;s&&s.states.lookup("default").set("stroke",i)}if(this.isDirty("fill")){const i=this.get("fill");this.fills.template.set("fill",i);const s=this._legendFill;s&&s.states.lookup("default").set("fill",i)}if(this.isDirty("fillPattern")){const i=this.get("fillPattern");this.fills.template.set("fillPattern",i);const s=this._legendFill;s&&s.states.lookup("default").set("fillPattern",i)}if(this.isDirty("curveFactory")){const i=this.get("curveFactory");i&&(this._strokeGenerator.curve(i),this._fillGenerator.curve(i))}if(t.inited&&e.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty||this.isDirty("connect")||this.isDirty("curveFactory")){const i=this.dataItems;this.fills.each(M=>{M.setPrivate("visible",!1)}),this.strokes.each(M=>{M.setPrivate("visible",!1)}),this.axisRanges.each(M=>{let O=M.fills;O&&O.each($=>{$.setPrivate("visible",!1)});let I=M.strokes;I&&I.each($=>{$.setPrivate("visible",!1)})});let s=this.startIndex(),n=this.strokes.template.get("templateField"),a=this.fills.template.get("templateField"),h=!0,u=!0;n&&(h=!1),a&&(u=!1);for(let M=s-1;M>=0;M--){let O=i[M],I=!0,$=O.dataContext;n&&$[n]&&(h=!0),a&&$[a]&&(u=!0);for(let G=0,F=this._valueFields.length;G<F;G++)if(!c.Et(O.get(this._valueFields[G]))){I=!1;break}if(I&&h&&u){s=M;break}}let v=i.length,E=this.endIndex();if(E<v){E++;for(let M=E;M<v;M++){let O=i[M],I=!0;for(let $=0,G=this._valueFields.length;$<G;$++)if(!c.Et(O.get(this._valueFields[$]))){I=!1;break}if(I){E=M+1;break}}}if(s>0&&s--,this._endIndex=E,this._clearGraphics(),this._sindex=0,this._dindex=s,1==v)this._startSegment(0);else for(;this._dindex<E-1;)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear(),this.axisRanges.each(t=>{t.fills.clear(),t.strokes.clear()})}_startSegment(t){const e=this.dataItems;let i=this._endIndex,s=i;const n=this.get("autoGapCount"),a=this.get("connect"),h=this.makeFill(this.fills),u=this._fillTemplate;u&&u!=this.fills.template&&(h.template=u),h.setPrivate("visible",!0);const E=this.makeStroke(this.strokes),M=this._strokeTemplate;M&&M!=this.strokes.template&&(E.template=M),E.setPrivate("visible",!0);let O=this.get("xAxis"),I=this.get("yAxis"),$=this.get("baseAxis"),G=this.get("vcx",1),F=this.get("vcy",1),Q=this._xField,q=this._yField,et=this._xOpenField,ot=this._yOpenField;
1const ft=this.get("openValueXField"),wt=this.get("openValueYField");ft||(et=this._xField),wt||(ot=this._yField);const Ot=this.get("stacked"),Et=O.basePosition(),At=I.basePosition();let Ft;Ft=$===I?this._yField:this._xField;const Vt=[];let te=[];Vt.push(te);const Zt=this.strokes.template.get("templateField"),ie=this.fills.template.get("templateField");let Lt=this.get("locationX",.5),zt=this.get("locationY",.5),Kt=this.get("openLocationX",Lt),Yt=this.get("openLocationY",zt);const Nt=this.get("minDistance",0);let Wt,pe=this.fills.template.get("visible");this.axisRanges.length>0&&(pe=!0);let Ne=!1;(Ot||ft||wt)&&(Ne=!0);const Re={points:te,segments:Vt,stacked:Ot,getOpen:Ne,basePosX:Et,basePosY:At,fillVisible:pe,xField:Q,yField:q,xOpenField:et,yOpenField:ot,vcx:G,vcy:F,baseAxis:$,xAxis:O,yAxis:I,locationX:Lt,locationY:zt,openLocationX:Kt,openLocationY:Yt,minDistance:Nt};let Ke=this._strokeTemplate,$e=this._fillTemplate;for(Wt=t;Wt<s;Wt++){this._dindex=Wt;const Oe=e[Wt];let je=Oe.get(Q),Vi=Oe.get(q);if(null==je||null==Vi?a||(te=[],Vt.push(te),Re.points=te):this._getPoints(Oe,Re),Zt){let ye=Oe.dataContext[Zt];if(ye){if(ye instanceof Ct.Bj||(ye=Ct.Bj.new(ye)),this._strokeTemplate=ye,Wt>t){s=Wt;break}Ke=ye,E.template=ye}}if(ie){let ye=Oe.dataContext[ie];if(ye){if(ye instanceof Ct.Bj||(ye=Ct.Bj.new(ye)),this._fillTemplate=ye,Wt>t){s=Wt;break}$e=ye,h.template=ye}}if(!a){let ye=e[Wt+1];ye&&$.shouldGap(Oe,ye,n,Ft)&&(te=[],Vt.push(te),Re.points=te)}}h.setRaw("userData",[t,Wt]),E.setRaw("userData",[t,Wt]),Wt===i&&this._endLine(te,Vt[0][0]),E&&this._drawStroke(E,Vt),h&&this._drawFill(h,Vt),this.axisRanges.each(Oe=>{const je=Oe.container,ye=this.makeFill(Oe.fills);je&&je.children.push(ye),ye.setPrivate("visible",!0),this._drawFill(ye,Vt);const ai=this.makeStroke(Oe.strokes);je&&je.children.push(ai),Ke&&Ke!=this.strokes.template&&(ai.template=Ke),$e&&$e!=this.fills.template&&(ye.template=$e),ai.setPrivate("visible",!0),this._drawStroke(ai,Vt),ye.setRaw("userData",[t,Wt]),ai.setRaw("userData",[t,Wt])})}_getPoints(t,e){let i=e.points,s=t.get("locationX",e.locationX),n=t.get("locationY",e.locationY);const a=this.get("exactLocationX",!1),h=this.get("exactLocationY",!1);let u=e.xAxis.getDataItemPositionX(t,e.xField,s,e.vcx,a),v=e.yAxis.getDataItemPositionY(t,e.yField,n,e.vcy,h);if(this._shouldInclude(u)){const E=this.getPoint(u,v),M=[E.x,E.y];if(E.x+=this._x,E.y+=this._y,t.set("point",E),e.fillVisible){let O=u,I=v;if(e.baseAxis===e.xAxis?I=e.basePosY:e.baseAxis===e.yAxis&&(O=e.basePosX),e.getOpen){let G=t.get(e.xOpenField),F=t.get(e.yOpenField);if(null!=G&&null!=F){let Q=t.get("openLocationX",e.openLocationX),q=t.get("openLocationY",e.openLocationY);if(e.stacked){let et=t.get("stackToItemX"),ot=t.get("stackToItemY");et?(O=e.xAxis.getDataItemPositionX(et,e.xField,Q,et.component.get("vcx"),a),c.yr(O)&&(O=e.basePosX)):O=e.yAxis===e.baseAxis?e.basePosX:e.xAxis.getDataItemPositionX(t,e.xOpenField,Q,e.vcx,a),ot?(I=e.yAxis.getDataItemPositionY(ot,e.yField,q,ot.component.get("vcy"),h),c.yr(I)&&(I=e.basePosY)):I=e.xAxis===e.baseAxis?e.basePosY:e.yAxis.getDataItemPositionY(t,e.yOpenField,q,e.vcy,h)}else O=e.xAxis.getDataItemPositionX(t,e.xOpenField,Q,e.vcx,a),I=e.yAxis.getDataItemPositionY(t,e.yOpenField,q,e.vcy,h)}}let $=this.getPoint(O,I);M[2]=$.x,M[3]=$.y}if(e.minDistance>0){const $=M[2],G=M[3],F=this._previousPoint,et=F[2],ot=F[3];(Math.hypot(M[0]-F[0],M[1]-F[1])>e.minDistance||$&&G&&Math.hypot($-et,G-ot)>e.minDistance)&&(i.push(M),this._previousPoint=M)}else i.push(M)}}_endLine(t,e){}_drawStroke(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",i=>{P.__(e,s=>{this._strokeGenerator.context(i),this._strokeGenerator(s)})})}_drawFill(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",i=>{P.__(e,s=>{this._fillGenerator.context(i),this._fillGenerator(s)})})}_processAxisRange(t){super._processAxisRange(t),t.fills=new U.TS(Ct.Bj.new({}),()=>V.A._new(this._root,{themeTags:r.kE(t.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,t.fills.template])),t.strokes=new U.TS(Ct.Bj.new({}),()=>V.A._new(this._root,{themeTags:r.kE(t.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,t.strokes.template]))}createLegendMarker(t){const e=this.get("legendDataItem");if(e){const i=e.get("marker"),s=e.get("markerRectangle");s&&s.setPrivate("visible",!1),i.set("background",Y.M.new(i._root,{fillOpacity:0,fill:(0,A.yW)(0)}));
1const n=i.children.push(V.A._new(i._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=n;const a=i.children.push(V.A._new(i._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=a;const h=this._root.interfaceColors.get("disabled");if(n.states.create("disabled",{fill:h,stroke:h}),a.states.create("disabled",{fill:h,stroke:h}),this.bullets.length>0){const u=this.bullets.getIndex(0);if(u){const v=u(i._root,this,new He.s(this,{legend:!0},{}));if(v){const E=v.get("sprite");E instanceof V.A&&E.states.create("disabled",{fill:h,stroke:h}),E&&(E.setAll({tooltipText:void 0,tooltipHTML:void 0,focusable:void 0,focusableGroup:void 0,ariaLabel:void 0}),i.children.push(E),E.setAll({x:i.width()/2,y:i.height()/2}),i.events.on("boundschanged",()=>{E.setAll({x:i.width()/2,y:i.height()/2})}))}}}}}}ui.className="LineSeries",ui.classNames=ci.classNames.concat([ui.className]);class Bi extends _.wC{_afterNew(){super._afterNewApplyThemes(),this._setRawDefault("deactivateRoot",!0),function Fn(x,t){const i=t.interfaceColors,s=i.get("secondaryButton").toCSS(),n=i.get("text").toCSS(),a=i.get("alternativeBackground").toCSS(.45);if(!os){const h=new Di.ZT([new r.aq(x,".am5-modal",{width:"100%",height:"100%",position:"absolute","z-index":"100000",top:"0",left:"0"},t.nonce),new r.aq(x,".am5-modal-curtain",{top:"0",left:"0",width:"100%",height:"100%",position:"absolute",background:i.get("background").toCSS(.5),"z-index":"100"},t.nonce),new r.aq(x,".am5-modal-wrapper",{top:"0",left:"0",width:"100%",height:"100%",position:"absolute","text-align":"center","white-space":"nowrap",background:i.get("background").toCSS(.5),"z-index":"101"},t.nonce),new r.aq(x,".am5-modal-wrapper:before",{content:"''",display:"inline-block",height:"100%","vertical-align":"middle","margin-right":"-0.25em"},t.nonce),new r.aq(x,".am5-modal-content",{display:"inline-block",padding:"1.2em","vertical-align":"middle","text-align":"start","white-space":"normal",background:i.get("background").toCSS(),"border-radius":"4px","-webkit-box-shadow":"0px 0px 36px 0px "+a,"box-shadow":"0px 0px 36px 0px "+a,color:n},t.nonce),new r.aq(x,".am5-modal-content h1",{"font-size":"1em",margin:"0 0 0.5em 0"},t.nonce),new r.aq(x,".am5-modal-table",{display:"table",margin:"1em 0"},t.nonce),new r.aq(x,".am5-modal-table-row",{display:"table-row"},t.nonce),new r.aq(x,".am5-modal-table-heading",{display:"table-heading",padding:"3px 10px 3px 0"},t.nonce),new r.aq(x,".am5-modal-table-cell",{display:"table-cell",padding:"3px 0 3px 0"},t.nonce),new r.aq(x,".am5-modal-table-cell > *",{"vertical-align":"middle"},t.nonce),new r.aq(x,".am5-modal-content input[type=text], .am5-modal-content input[type=number], .am5-modal-content select",{border:"1px solid "+s,"border-radius":"4px",padding:"3px 5px",margin:"2px"},t.nonce),new r.aq(x,".am5-modal-input-narrow",{width:"50px"},t.nonce),new r.aq(x,".am5-modal-button",{"font-weight":"400",color:i.get("secondaryButtonText").toCSS(),"line-height":"1.5","text-align":"center","text-decoration":"none","vertical-align":"middle",cursor:"pointer",padding:"0.2em 0.8em","font-size":"1em","border-radius":"0.25em",margin:"0 0.25em 0 0",border:"1px solid "+i.get("secondaryButtonStroke").toCSS(),background:i.get("secondaryButton").toCSS()},t.nonce),new r.aq(x,".am5-modal-button:hover",{background:i.get("secondaryButtonHover").toCSS()},t.nonce),new r.aq(x,".am5-modal-button.am5-modal-primary",{color:i.get("primaryButtonText").toCSS(),border:"1px solid "+i.get("primaryButtonStroke").toCSS(),background:i.get("primaryButton").toCSS()},t.nonce),new r.aq(x,".am5-modal-button.am5-modal-primary:hover",{background:i.get("primaryButtonHover").toCSS()},t.nonce)]);os=new Di.Wr(()=>{os=void 0,h.dispose()})}os.increment()}(r.jG(this._root.dom),this._root);const t=document.createElement("div");t.className="am5-modal",t.style.display="none",this.root._inner.appendChild(t),this.setPrivate("container",t);const e=document.createElement("div");e.className="am5-modal-curtain",t.appendChild(e),this.setPrivate("curtain",e),this._disposers.push(r.q2(e,"click",()=>{this.cancel()}));const i=document.createElement("div");i.className="am5-modal-wrapper",t.appendChild(i),this.setPrivate("wrapper",i);const s=document.createElement("div");s.className="am5-modal-content",i.appendChild(s),this.setPrivate("content",s);const n=this.get("content");n&&(s.innerHTML=n),r.xY("keyboardevents")&&this._disposers.push(r.q2(document,"keydown",a=>{this.isOpen()&&"Escape"==r.K(a)&&this.cancel()}))}_beforeChanged(){super._beforeChanged(),this.isDirty("content")&&(this.getPrivate("content").innerHTML=this.get("content",""))}isOpen(){return"none"!=this.getPrivate("container").style.display}open(){this.getPrivate("container").style.display="block",this.get("deactivateRoot")&&this.setTimeout(()=>{this._root._renderer.interactionsEnabled=!1},10),this.events.dispatch("opened",{type:"opened",target:this})}close(){this.getPrivate("container").style.display="none",this.get("deactivateRoot")&&(this._root._renderer.interactionsEnabled=!0),this.events.dispatch("closed",{type:"closed",target:this})}cancel(){this.getPrivate("container").style.display="none",this.get("deactivateRoot")&&(this._root._renderer.interactionsEnabled=!0),this.events.dispatch("cancelled",{type:"cancelled",target:this})}_dispose(){super._dispose();const t=this.getPrivate("container");t.parentElement&&t.parentElement.removeChild(t)}}
1Bi.className="Modal",Bi.classNames=_.wC.classNames.concat([Bi.className]);class Fi extends _.wC{_afterNew(){super._afterNew(),this.get("stockChart").controls.push(this),this._defaultThemes=this.get("stockChart")._defaultThemes,super._afterNewApplyThemes(),this._initElements(),this._applyClassNames(),this._maybeMakeAccessible(),this._root.addDisposer(this)}_initElements(){const t=document.createElement("div");t.setAttribute("title",this.get("description",this.get("name",""))),this.setPrivate("button",t);const e=document.createElement("div");e.appendChild(this._getIcon()),"none"==this.get("icon")&&(e.style.display="none"),t.appendChild(e),this.setPrivate("icon",e);const i=this.get("name",""),s=document.createElement("div");s.innerHTML=i,""==i&&(s.style.display="none"),t.appendChild(s),this.setPrivate("label",s),this._disposers.push(r.q2(t,"click",n=>{0!=this.get("togglable")&&this._handleClick(),this.events.isEnabled("click")&&this.events.dispatch("click",{type:"click",target:this,originalEvent:n})}))}_applyClassNames(){this.getPrivate("button").className="am5stock am5stock-control am5stock-control-button",this.getPrivate("label").className="am5stock-control-label",this.getPrivate("icon").className="am5stock-control-icon"}_getIcon(){const t=this.get("icon");
1return t&&"none"!=t?t:this._getDefaultIcon()}_getDefaultIcon(){return Ti.getIcon("Default")}_beforeChanged(){if(super._beforeChanged(),this.isDirty("visible")&&!this.get("visible")&&(this.getPrivate("button").style.display="none"),this.isDirty("forceHidden")&&this.get("forceHidden")&&(this.getPrivate("button").style.display="none"),this.isDirty("name")&&this._setLabel(this.get("name","")),this.isDirty("active")){const t=this.getPrivate("button");this.get("active")?r.iQ(t,"am5stock-control-button-active"):r.vy(t,"am5stock-control-button-active")}this.isDirty("align")&&("right"==this.get("align")?r.iQ(this.getPrivate("button"),"am5stock-align-right"):r.vy(this.getPrivate("button"),"am5stock-align-right")),this.isPrivateDirty("toolbar")&&this._maybeMakeAccessible()}_dispose(){super._dispose(),r.Nz(this.getPrivate("button"))}_setLabel(t){const e=this.getPrivate("label");e.innerHTML=t,e.style.display=""==t?"none":"",this.getPrivate("button").setAttribute("title",this.get("description",this.get("name","")))}hide(){this.getPrivate("button").style.display="none"}show(){!0!==this.get("forceHidden")&&(this.getPrivate("button").style.display="")}_handleClick(){this.set("active",!this.get("active"))}_maybeMakeAccessible(){if(this.isAccessible()){const t=this.getPrivate("button");t.setAttribute("tabindex",this._root.tabindex.toString()),t.setAttribute("role","button"),r.xY("keyboardevents")&&(t.setAttribute("aria-label",t.getAttribute("title")+"; "+this._t("Press ENTER to toggle")),this._disposers.push(r.q2(document,"keydown",e=>{document.activeElement==t&&13==e.keyCode&&(this.get("togglable")?this._handleClick():document.activeElement.click())})))}}isAccessible(){const t=this.getPrivate("toolbar");return!(!t||!t.get("focusable"))}}Fi.className="StockControl",Fi.classNames=_.wC.classNames.concat([Fi.className]);class Ui extends _.wC{_afterNew(){super._afterNew(),this._defaultThemes=this.get("control")._defaultThemes,super._afterNewApplyThemes(),this._initElements(),this._root.addDisposer(this),r.xY("keyboardevents")&&this._disposers.push(r.q2(document,"keydown",t=>{this.isOpen()&&27==t.keyCode&&this.hide()})),this._disposers.push(r.q2(this.getPrivate("container"),"click",t=>{this.isOpen()&&t.preventDefault()})),this._disposers.push(r.q2(document,"click",()=>{this.isOpen()&&this.hide()}))}_initElements(){const t=document.createElement("div");t.className="am5stock-control-list-container",this._disposers.push(r.q2(t,"click",s=>{s.stopPropagation()})),this.setPrivate("container",t);const e=document.createElement("div");e.className="am5stock-control-list-arrow",t.appendChild(e),this.setPrivate("arrow",e);const i=this.get("parent");i&&i.appendChild(t),this.get("scrollable")&&(this._sizeItems(),this.root.container.onPrivate("height",()=>{this._sizeItems()})),this.hide()}_sizeItems(){const t=this.getPrivate("container");t.style.maxHeight=this.root.container.height()-100+"px",t.style.overflow="auto"}_beforeChanged(){if(super._beforeChanged(),this.isDirty("parent")){const t=this.get("parent"),e=this.getPrivate("container");t&&e&&t.appendChild(e)}}_dispose(){super._dispose()}isOpen(){return"none"!=this.getPrivate("container").style.display}hide(){const t=this.getPrivate("arrow"),e=this.getPrivate("container");e.style.display="none",this.events.dispatch("closed",{type:"closed",target:this}),e.style.marginLeft="",t.style.marginLeft=""}show(){const t=this.getPrivate("arrow"),e=this.getPrivate("container");e.style.display="";let i=0;if(this.get("control").getPrivate("toolbar")){const n=this.get("control").getPrivate("toolbar").get("container");i=Math.round(n.getBoundingClientRect().right-e.getBoundingClientRect().right)}i<0?(e.style.marginLeft=i+"px",t.style.marginLeft=Math.abs(i)+"px"):(e.style.marginLeft="",t.style.marginLeft=""),this.events.dispatch("opened",{type:"opened",target:this})}toggle(){"none"==this.getPrivate("container").style.display?this.show():this.hide()}_maybeMakeAccessible(){this.isAccessible()}isAccessible(){const t=this.get("control").getPrivate("toolbar");return!(!t||!t.get("focusable"))}}
1Ui.className="Dropdown",Ui.classNames=_.wC.classNames.concat([Ui.className]);class rs extends Ui{_afterNew(){super._afterNew(),this._setupKeyboardNav(),this._root.addDisposer(this)}_initElements(){super._initElements();const t=this.getPrivate("container"),e=document.createElement("ul");e.className="am5stock-control-colors",t.appendChild(e),this.setPrivate("list",e),this._initItems()}_initItems(){this.getPrivate("list").innerHTML="";let e=this.get("colors");e||(e=gt.new(this._root,{}));const i=e.get("colors",[]);P.__(i,s=>{this.addItem(s)}),this._initOpacity(),this._maybeMakeAccessible()}_beforeChanged(){super._beforeChanged(),(this.isDirty("colors")||this.isDirty("useOpacity")||this.isPrivateDirty("color")||this.isPrivateDirty("opacity"))&&this._initItems(),this.isDirty("control")&&this._maybeMakeAccessible()}_dispose(){super._dispose()}addItem(t){const e=this.getPrivate("color")?this.getPrivate("color").hex:0,i=this.getPrivate("list"),s=document.createElement("li");s.className="am5stock-control-color",e==t.hex&&(s.className+=" am5stock-control-active"),s.style.background=t.toCSS(),i.appendChild(s),this._disposers.push(r.q2(s,"click",n=>{this.hide(),this.events.dispatch("invoked",{type:"invoked",color:t,target:this})}))}_initOpacity(){if(this.get("useOpacity")){const t=this.getPrivate("opacity",1),e=this.getPrivate("list"),i=document.createElement("hr");e.appendChild(i);for(let s=100;s>=0;s-=25){const n=(0,A.yW)(0),a=document.createElement("li");a.innerHTML=s+"%",a.className="am5stock-control-opacity am5stock-control-opacity-"+s,100*t==s&&(a.className+=" am5stock-control-active"),a.style.background=n.toCSS(s/100),e.appendChild(a),this._disposers.push(r.q2(a,"click",h=>{this.hide(),this.events.dispatch("invokedOpacity",{type:"invokedOpacity",opacity:s/100,target:this})}))}}}_setupKeyboardNav(){if(r.xY("keyboardevents")){const t=this.get("control").getPrivate("button");this._disposers.push(r.q2(document,"keydown",e=>{if(this.isAccessible()&&document.activeElement&&(document.activeElement===t||r.gR(t,document.activeElement)))if(13==e.keyCode)document.activeElement!==t&&document.activeElement.click();else if(-1!==[37,38,39,40].indexOf(e.keyCode)){const i=37==e.keyCode||38==e.keyCode?-1:1,s=this._getActiveItems(),n=t.querySelectorAll(".am5stock-control-color:focus, .am5stock-control-opacity:focus");let a=-1;n.length>0&&s.forEach((h,u)=>{h===n.item(0)&&(a=u)}),a+=i,a<0?a=s.length-1:a>=s.length&&(a=0),r.XC(s.item(a))}}))}}_maybeMakeAccessible(){super._maybeMakeAccessible(),this.isAccessible()&&this._getActiveItems().forEac
1h((e,i)=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-label",this.root.language.translateAny("Selection")+" #"+(i+1))})}_getActiveItems(){return this.getPrivate("list").querySelectorAll(".am5stock-control-color, .am5stock-control-opacity")}}rs.className="DropdownColors",rs.classNames=Ui.classNames.concat([rs.className]);class hs extends Fi{_afterNew(){super._afterNew();const t=this.getPrivate("button");t.className=t.className+" am5stock-control-color";const e={control:this,parent:this.getPrivate("button"),useOpacity:this.get("useOpacity")};this.get("colors")&&(e.colors=this.get("colors"));const i=rs.new(this._root,e);this.setPrivate("dropdown",i),i.events.on("closed",n=>{this.set("active",!1)}),i.events.on("invoked",n=>{this.setPrivate("color",n.color),this.events.dispatch("selected",{type:"selected",color:n.color,target:this})}),i.events.on("invokedOpacity",n=>{this.setPrivate("opacity",n.opacity),this.events.dispatch("selectedOpacity",{type:"selectedOpacity",opacity:n.opacity,target:this})}),this.on("active",n=>{n?(i.setPrivate("color",this.getPrivate("color")),i.setPrivate("opacity",this.getPrivate("opacity")),this.setTimeout(()=>i.show(),10)):i.hide()}),this.onPrivate("color",()=>{const n=this.getPrivate("color");this.getPrivate("icon").style.backgroundColor=n?n.toCSS(this.getPrivate("opacity",1)):""}),this.onPrivate("opacity",()=>{const n=this.getPrivate("color");this.getPrivate("icon").style.backgroundColor=n?n.toCSS(this.getPrivate("opacity",1)):""});const s=document.createElement("div");s.className="am5stock-control-icon-color-bg",this.getPrivate("icon").appendChild(s),this.loadDefaultCSS()}setColor(t){this.setPrivate("color",t),this.events.dispatch("selected",{type:"selected",color:t,target:this})}setOpacity(t){this.setPrivate("opacity",t),this.events.dispatch("selectedOpacity",{type:"selectedOpacity",opacity:t,target:this})}_getDefaultIcon(){const t=Ti.getIcon("Color");return r.iQ(t,"am5stock-control-icon-color"),t}loadDefaultCSS(){const t=function Un(x,t){const i=t.interfaceColors,s=i.get("secondaryButton").toCSS(),n=i.get("secondaryButtonHover").toCSS(),a=i.get("text").toCSS(),h=i.get("disabled").toCSS(),u=i.get("secondaryButtonActive").toCSS(),v=i.get("background").toCSS(),E=i.get("primaryButton").toCSS();if(!ls){const M=new Di.ZT([new r.aq(x,".am5stock-control-button",{display:"inline-block",position:"relative",border:"1px solid "+u,"border-radius":"4px",padding:"3px 0 3px 5px",margin:"2px","z-index":"1",cursor:"default","line-height":"1.5em",color:a},t.nonce),new r.aq(x,".am5stock-control-button div",{"box-sizing":"initial"},t.nonce),new r.aq(x,".am5stock-control-button:hover",{"border-color":n},t.nonce),new r.aq(x,".am5stock-control-button.am5stock-no-hover:hover",{background:"initial"},t.nonce),new r.aq(x,".am5-modal-content .am5stock-control-button",{padding:"5px 6px","line-height":"0.8em"},t.nonce),new r.aq(x,".am5stock-control-color .am5stock-control-icon",{"border-radius":"3px","min-height":"1em","max-width":"50px","line-height":"0.8em"},t.nonce),new r.aq(x,".am5-modal-content .am5stock-control-color .am5stock-control-icon",{margin:"0",width:"48px","min-height":"1em","max-width":"50px","line-height":"0.8em"},t.nonce),new r.aq(x,".am5-modal-content .am5stock-control-button .am5stock-control-icon > .am5stock-control-icon-color",{width:"1px"},t.nonce),new r.aq(x,'.am5-modal-content input[type="text"], .am5-modal-content input[type="number"], .am5-modal-content select',{border:"1px solid "+u},t.nonce),new r.aq(x,".am5stock-control-button.am5stock-align-right",{float:"right"},t.nonce),new r.aq(x,".am5stock-control-button.am5stock-control-button-active",{background:s,"z-index":"2"},t.nonce),new r.aq(x,".am5stock-control-button.am5stock-control-dropdown.am5stock-control-button-active",{"z-index":"3"},t.nonce),new r.aq(x,".am5-modal-content .am5stock-control-button.am5stock-control-button-active, .am5-modal-content .am5stock-control-button:hover",{background:"none"},t.nonce),new r.aq(x,".am5-modal-content .am5-modal-link-reset",{display:"block",color:E,"text-transform":"uppercase","font-weight":"500","margin-top":"0.5em","font-size":"0.8em",cursor:"pointer"},t.nonce),new r.aq(x,".am5stock-control-icon",{"min-width":"1.2em","min-height":"1.2em","max-width":"1.2em",display:"inline-block",position:"relative",margin:"0 5px 0 0"},t.nonce),new r.aq(x,".am5stock-control-icon.am5stock-icon-wide",{"max-width":"60px"},t.nonce),new r.aq(x,".am5stock-control-icon > *",{"vertical-align":"sub"},t.nonce),new r.aq(x,".am5stock-control-icon > .am5stock-control-icon-color",{"max-width":"20px",width:"20px"},t.nonce),new r.aq(x,".am5stock-control-icon > .am5stock-control-icon-color-bg",{width:"100%",height:"100%",display:"block",position:"absolute",left:"0",top:"0","z-index":"-1",overflow:"hidden","border-radius":"3px","background-image":"linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%)","background-size":"10px 10px","background-position":"0 0, 0 5px, 5px -5px, -5px 0px"},t.nonce),new r.aq(x,".am5stock-control-button path",{"stroke-width":"0.5",stroke:a,fill:"none","vector-effect":"non-scaling-stroke"},t.nonce),new r.aq(x,".am5stock-control-label",{display:"inline-block",margin:"0 5px 0 0"},t.nonce),new r.aq(x,".am5stock-control-list-container",{position:"absolute",left:"0",top:"100%","margin-top":"10px",background:v,border:"1px solid "+u,"border-radius":"3px"},t.nonce),new r.aq(x,".am5stock-align-right .am5stock-control-list-container",{left:"auto",right:"0"},t.nonce),new r.aq(x,".am5stock-control-list-arrow",{position:"absolute",left:"5px",top:"-5px",border:"solid "+u,"border-width":"0 1px 1px 0",background:v,dis
1play:"inline-block",padding:"5px",transform:"rotate(-135deg)"},t.nonce),new r.aq(x,".am5stock-align-right .am5stock-control-list-arrow",{right:"5px",left:"auto"},t.nonce),new r.aq(x,".am5stock-control-list",{"list-style":"none",margin:"5px",padding:"2px","white-space":"nowrap"},t.nonce),new r.aq(x,".am5stock-control-list li",{padding:"2px 6px 2px 6px",position:"relative"},t.nonce),new r.aq(x,".am5stock-control-list li:hover",{background:s},t.nonce),new r.aq(x,".am5stock-control-list li.am5stock-list-info",{"font-style":"italic",color:n},t.nonce),new r.aq(x,".am5stock-control-list .am5stock-list-sub",{"font-size":"0.7em",color:n,display:"block"},t.nonce),new r.aq(x,".am5stock-control-list li.am5stock-list-info:hover",{background:"none"},t.nonce),new r.aq(x,".am5stock-control-list li.am5stock-list-heading",{"font-style":"normal","font-weight":"bold",color:"initial","margin-top":"0.3em"},t.nonce),new r.aq(x,".am5stock-control-list li.am5stock-disabled:hover, .am5stock-control-list li.am5stock-disabled > *",{background:"none",color:h},t.nonce),new r.aq(x,".am5stock-control-list li svg",{"max-width":"1em","max-height":"1em","margin-right":"0.8em",left:"0px",top:"2px",display:"inline-block"},t.nonce),new r.aq(x,".am5stock-control-list li svg.am5stock-icon-wide, .am5stock-control-icon > *.am5stock-icon-wide",{width:"60px","max-width":"60px","margin-right":"0"},t.nonce),new r.aq(x,".am5stock-control-list li div, .am5stock-control-list li label",{display:"inline-block","margin-right":"1em"},t.nonce),new r.aq(x,".am5stock-control-list li input",{"margin-right":"1em"},t.nonce),new r.aq(x,".am5stock-list-search",{margin:"0.5em 0.7em","padding-bottom":"0.25em",position:"relative"},t.nonce),new r.aq(x,".am5stock-list-search input",{border:"1px solid "+s,padding:"6px 10px 6px 30px","margin-top":"5px",background:"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTAuNSIgY3k9IjEwLjUiIHI9IjcuNSIvPjxsaW5lIHgxPSIyMSIgeDI9IjE1LjgiIHkxPSIyMSIgeTI9IjE1LjgiLz48L3N2Zz4=) 5px / 20px 20px no-repeat","background-color":"#fff",color:"#888"},t.nonce),new r.aq(x,".am5stock-list-search input::placeholder",{color:"#888"},t.nonce),new r.aq(x,".am5stock-control-colors, .am5stock-control-icons",{"list-style":"none",margin:"5px",padding:"2px",width:"240px"},t.nonce),new r.aq(x,".am5stock-control-colors li, .am5stock-control-icons li",{display:"inline-block",padding:"0",margin:"0",border:"3px solid "+v,width:"24px",height:"24px",position:"relative"},t.nonce),new r.aq(x,".am5stock-control-colors li:hover, .am5stock-control-colors li.am5stock-control-active, .am5stock-control-icons li:hover, .am5stock-control-icons li.am5stock-control-active",{"border-color":"rgba(200, 200, 200, 1)"},t.nonce),new r.aq(x,".am5stock-control-colors li.am5stock-control-opacity",{width:"42px","text-align":"center"},t.nonce),new r.aq(x,".am5stock-control-colors li.am5stock-control-opacity",{width:"42px","text-align":"center","font-size":"12px","line-height":"24px"},t.nonce),new r.aq(x,".am5stock-control-opacity-100, .am5stock-control-opacity-75, .am5stock-control-opacity-50",{color:"#fff"},t.nonce),new r.aq(x,".am5stock-row",{display:"flex","flex-direction":"row"},t.nonce),new r.aq(x,".am5stock-column",{"min-width":"200px",display:"inline-block",padding:"1em"},t.nonce),new r.aq(x,".am5stock-group",{"white-space":"nowrap","padding-bottom":"0.25em","border-bottom":"1px solid "+s,position:"relative"},t.nonce),new r.aq(x,".am5stock-group input",{border:"none",padding:"3px 5px",width:"100%","box-sizing":"border-box"},t.nonce),new r.aq(x,".am5stock-small",{"font-size":"0.7em"},t.nonce),new r.aq(x,".am5stock-link",{display:"inline-block",margin:"0 0.15em",padding:"0 3px","border-radius":"3px"},t.nonce),new r.aq(x,".am5stock-link.am5stock-active, .am5stock-link:hover",{background:s},t.nonce),new r.aq(x,".am5stock-link.am5stock-hidden",{display:"none"},t.nonce),new r.aq(x,".am5stock-drawing-label-wrapper",{"background-color":v,"bakcgroun
1d-opacity":"0.5",padding:"0.5em","border-radius":"4px","-webkit-box-shadow":"0px 0px 36px 0px rgba(0,0,0,0.45)","box-shadow":"0px 0px 36px 0px rgba(0,0,0,0.45)"},t.nonce),new r.aq(x,".am5stock-drawing-label-input",{width:"250px","min-height":"50px"},t.nonce)]);ls=new Di.Wr(()=>{ls=void 0,M.dispose()})}return ls.increment()}(r.jG(this._root.dom),this._root);this._disposers.push(t)}hide(){super.hide()}_maybeMakeAccessible(){if(super._maybeMakeAccessible(),this.isAccessible()){const t=this.getPrivate("button");t.setAttribute("aria-label",t.getAttribute("title")+"; "+this._t("Press ENTER or use arrow keys to navigate")),r.xY("keyboardevents")&&this._disposers.push(r.q2(document,"keydown",e=>{document.activeElement==t&&(38==e.keyCode||40==e.keyCode)&&(this.get("active")||this._handleClick())}))}}}hs.className="ColorControl",hs.classNames=Fi.classNames.concat([hs.className]);class cs extends Bi{constructor(){super(...arguments),this._updatedSettings={}}_afterNew(){super._afterNew(),this._defaultThemes=this.get("stockChart")._defaultThemes,super._afterNewApplyThemes()}_beforeChanged(){super._beforeChanged()}openIndicator(t){this._settingsTarget=t,this.initContent(t._editableSettings,t)}openSeries(t){this._settingsTarget=t;const e=this._root.language,i=this.get("stockChart"),s=t instanceof ui;let n=[];if(t!=i.get("stockSeries")||s)if(t!=i.get("volumeSeries")||s)if(t instanceof as&&t.columns.length){const a=t.columns.getIndex(0);n.push({id:"riseFromOpen.fill",key:"fill",additionalKeys:["stroke"],name:e.translateAny("Increase"),type:"color",currentValue:a.states.lookup("riseFromOpen").get("fill"),target:t.columns.template.states.create("riseFromOpen",{}),invalidateTarget:t}),n.push({id:"dropFromOpen.fill",key:"fill",additionalKeys:["stroke"],name:e.translateAny("Decrease"),type:"color",currentValue:a.states.lookup("dropFromOpen").get("fill"),target:t.columns.template.states.create("dropFromOpen",{}),invalidateTarget:t})}else if(s){const h=this.get("strokeWidths",[1,2,4,10]).map(u=>({value:u,text:u+"px"}));n=[{key:"stroke",name:e.translateAny("Line"),type:"color",additionalKeys:["fill"],target:t},{key:"strokeWidth",name:e.translateAny("Line"),type:"dropdown",options:h,currentValue:t.strokes.template.get("strokeWidth",1),target:t.strokes.template,invalidateTarget:t}],t.fills.template.get("visible")&&n.push({key:"fill",name:e.translateAny("Fill"),type:"color"})}else n=[{key:"stroke",name:e.translateAny("Line"),type:"color"},{key:"fill",name:e.translateAny("Fill"),type:"color"}];else n.push({id:"volumePositiveColor",key:"volumePositiveColor",name:e.translateAny("Increase"),type:"color",currentValue:i.get("volumePositiveColor",this._root.interfaceColors.get("positive")),target:i}),n.push({id:"volumeNegativeColor",key:"volumeNegativeColor",name:e.translateAny("Decrease"),type:"color",currentValue:i.get("volumeNegativeColor",this._root.interfaceColors.get("negative")),target:i});else n.push({id:"stockPositiveColor",key:"stockPositiveColor",name:e.translateAny("Increase"),type:"color",currentValue:i.get("stockPositiveColor",this._root.interfaceColors.get("positive")),target:i}),n.push({id:"stockNegativeColor",key:"stockNegativeColor",name:e.translateAny("Decrease"),type:"color",currentValue:i.get("stockNegativeColor",this._root.interfaceColors.get("negative")),target:i});this.initContent(n,t)}initContent(t,e){this._updatedSettings={};const i=this.getPrivate("content");this.clear(),this.events.dispatch("initstarted",{type:"initstarted",settings:t,settingsTarget:e,target:this});const s=document.createElement("h1");s.innerHTML=e.get("name"),i.appendChild(s);const n=document.createElement("div");n.className="am5-modal-table",i.appendChild(n);let a=!1,h={};e.get("userData")||e.set("userData",{}),e.get("userData").__defaults?h=e.get("userData").__defaults:(e.get("userData").__defaults=h,a=!0);const u={},v={},E={};let O,M="";if(P.__(t,G=>{const F=this._getSettingKey(G),q=G.currentValue||(G.target||e).get(G.key);let et;switch(a&&(h[F]=q),G.target&&(E[F]=G),G.type){case"dropdown":et=this.getDropdown(G,q),u[F]=et,this._disposers.push(r.q2(et,"change",ft=>{const wt=ft.target,Ot=wt.options[wt.selectedIndex],Et=Ot.getAttribute("data-target");Et&&(u[Et].value=Ot.getAttribute("data-target-value")+"",u[Et].setAttribute("data-min-value",Ot.getAttribute("data-target-min-value")+""))}));break;case"number":et=this.getNumber(G,q),u[F]=et,void 0!==G.minValue&&(et.setAttribute("data-min-value",G.minValue+""),this._disposers.push(r.q2(et,"change",ft=>{const wt=ft.target,Ot=Number(wt.getAttribute("data-min-value"));Number(wt.value)<Ot&&(wt.value=Ot+"")}
1)));break;case"color":const ot=this.getColor(G,q);et=ot.getPrivate("button"),v[F]=ot;break;case"checkbox":et=this.getCheckbox(G,q),u[F]=et;break;case"text":et=this.getText(G,q),u[F]=et}if(et){let ot;if(G.name==M&&O)ot=O;else{ot=document.createElement("div"),ot.className="am5-modal-table-row",n.appendChild(ot);const wt=document.createElement("div");wt.className="am5-modal-table-heading",wt.innerHTML=G.name,ot.appendChild(wt)}const ft=document.createElement("div");ft.className="am5-modal-table-cell",ot.appendChild(ft),ft.appendChild(et),M=G.name,O=ot}}),this.get("showResetLink",!0)){const G=document.createElement("a");G.className="am5-modal-link am5-modal-table-cell am5-modal-link-reset",G.innerHTML=this._root.language.translateAny("Reset to default"),n.appendChild(G),this._disposers.push(r.q2(G,"click",()=>{const F=e.get("userData").__defaults;l.__(u,(Q,q)=>{"checkbox"===q.type?q.checked=F[Q]:q.value=F[Q]}),l.__(v,(Q,q)=>{q.setColor(F[Q])})}))}const I=document.createElement("input");I.type="button",I.value=this._root.language.translateAny("Save"),I.className="am5-modal-button am5-modal-primary",i.appendChild(I),this._disposers.push(r.q2(I,"click",()=>{l.__(u,(G,F)=>{this._updatedSettings[G]="checkbox"==F.type?F.checked:"number"==F.type?c.Ro(F.value):F.value}),l.__(this._updatedSettings,(G,F)=>{const Q=G.split(".").pop();Q&&-1!=["fill","stroke"].indexOf(Q)&&"ColumnSeries"==e.className&&e.columns.template.remove(Q),c.Gv(F)&&F.value?F.setting&&F.setting.target?(F.setting.target.set(Q,F.value),F.setting.additionalKeys&&P.__(F.setting.additionalKeys,q=>{F.setting.target.set(q,F.value)})):e.set(Q,F.value):E[Q]?E[Q].target.set(Q,F):e.set(Q,F),F.setting&&F.setting.invalidateTarget&&F.setting.invalidateTarget.markDirtyValues()}),this.close()}));const $=document.createElement("input");$.type="button",$.value=this._root.language.translateAny("Cancel"),$.className="am5-modal-button am5-modal-scondary",i.appendChild($),this._disposers.push(r.q2($,"click",()=>{this.cancel()})),this.open(),this.setTimeout(()=>{I.focus()},10)}getDropdown(t,e){const i=document.createElement("select");return P.__(t.options,s=>{if(s){const n=document.createElement("option");let a;c.Gv(s)?(n.value=s.value,n.text=s.text,a=s.value,s.minValue&&n.setAttribute("data-min-value",s.minValue),s.extTarget&&n.setAttribute("data-target",s.extTarget),s.extTargetValue&&n.setAttribute("data-target-value",s.extTargetValue),s.extTargetMinValue&&n.setAttribute("data-target-min-value",s.extTargetMinValue)):(n.value=s,n.text=s,a=s),a==e&&(n.selected=!0),i.appendChild(n)}}),i}getNumber(t,e){const i=document.createElement("input");return i.type="number",i.value=e,i.className="am5-modal-input-narrow",i}getText(t,e){const i=document.createElement("input");return i.type="text",i.value=e,i.className="am5-modal-input",i}getCheckbox(t,e){const i=document.createElement("input");return i.type="checkbox",i.checked=!0===e,i}getColor(t,e){const i=hs.new(this.root,{stockChart:this.get("stockChart"),useOpacity:!1});return i.setPrivate("color",e),i.events.on("selected",s=>{this._updatedSettings[this._getSettingKey(t)]={value:s.color,setting:t}}),this._disposers.push(i),i}close(){super.close(),this.events.dispatch("done",{type:"done",settings:this._updatedSettings,settingsTarget:this._settingsTarget,target:this})}cancel(){super.cancel(),this.events.dispatch("done",{type:"done",settings:null,target:this})}clear(){this.getPrivate("content").innerHTML="",this._colorControl&&this._colorControl.dispose()}_getSettingKey(t){return t.id||t.key}}cs.className="SettingsModal",cs.classNames=Bi.classNames.concat([cs.className]);class ds extends m.m{constructor(){super(...arguments),this._xAxes=[],this._drawingsChanged=!1,this._indicatorsChanged=!1,this.panels=new U.fo,this.indicators=new U.fo,this.toolsContainer=this.children.push(m.m.new(this._root,{width:L.Q2,themeTags:[]})),this.panelsContainer=this.children.push(m.m.new(this._root,{width:L.Q2,height:L.Q2,layout:this._root.verticalLayout,themeTags:["chartscontainer"]})),this.controls=[],this.spriteResizer=this.children.push(ss.new(this._root,{}))}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["stock"]),this._defaultThemes.push(Bn.new(this._root)),this._defaultThemes.push(Ks.new(this._root));const t=this._root.tooltipContainer;t.set("themeTags",r.kE(t.get("themeTags",[]),["stock"])),super._afterNew(),r.xY("keyboardevents")&&this._disposers.push(r.q2(document,"keyup",s=>{46==s.keyCode&&this.deleteSelectedDrawings(),27==s.keyCode&&(this.unselectDrawings(),this.cancelDrawing(),this.spriteResizer.set("sprite",void 0))}));const e=this.panelsContainer.children;this._disposers.push(this.panels.events.onAll(s=>{if("clear"===s.type)P.__(s.oldValues,n=>{this._removePanel(n)});else if("push"===s.type)e.moveValue(s.newValue),this._processPanel(s.newValue);else if("setIndex"===s.type)e.setIndex(s.index,s.newValue),this._processPanel(s.newValue);else if("insertIndex"===s.type)e.insertIndex(s.index,s.newValue),this._processPanel(s.newValue);else{if("removeIndex"!==s.type)throw new Error("Unknown IListEvent type");this._removePanel(s.oldValue)}})),this._disposers.push(this.indicators.events.onAll(s=>{if("clear"===s.type)P.__(s.oldValues,n=>{this._removeIndicator(n)});else if("push"===s.type)this._processIndicator(s.newValue);else if("setIndex"===s.type)this._processIndicator(s.newValue);else if("insertIndex"===s.type)this._processIndicator(s.newValue);else{if("removeIndex"!==s.type)throw new Error("Unknown IListEvent type");this._removeIndicator(s.oldValue)}})),this.setPrivateRaw("settingsModal",cs.new(this.root,{stockChart:this}));let i=!1;for(let s=0;s<C.u5.licenses.length;s++)C.u5.licenses[s].match(/^AM5S.{5,}/i)&&(i=!0);i?this._root._licenseApplied():this._root._showBranding()}_dispose(){super._dispose();const t=this.getPrivate("settingsModal");t&&t.dispose()}markDirtyDrawings(){this._drawingsChanged=!0,this.markDirty()}markDirtyIndicators(){this._indicatorsChanged=!0,this.markDirty()}toggleDrawing(t){this.panels.each(e=>{e.series.each(i=>{i.isType("DrawingSeries")&&i.toggleDrawing(t)})})}_prepareChildren(){if(this.isDirty("drawingSelectionEnabled")){const e=this.get("drawingSelectionEnabled");void 0!==e&&this._root.events.once("frameended",()=>{this.setPrivate("drawingSelectionEnabled",e)})}if(this.isPrivateDirty("drawingSelectionEnabled")){const e=this.getPrivate("drawingSelectionEnabled",!1);e?this.set("erasingEnabled",!1):this.unselectDrawings(),this.panels.each(i=>{i.series.each(s=>{s.isType("DrawingSeries")&&s.enableDrawingSelection(e)})})}if(this.isDirty("erasingEnabled")){const e=this.get("erasingEnabled",!1);e&&this.setPrivate("drawingSelectionEnabled",!1),this.panels.each(i=>{i.series.each(s=>{s.isType("DrawingSeries")&&(e?s.enableErasing():s.disableErasing())})})}if(this.isDirty("volumeNegativeColor")||this.isDirty("volumePositiveColor")){const e=this.get("volumeSeries");
1e&&e.isType("BaseColumnSeries")&&e.columns.each(i=>{i._markDirtyKey("fill")})}const t=this.get("stockSeries");if(this.isDirty("stockSeries")&&t){const e=this._prevSettings.stockSeries;this.indicators.each(s=>{e==s.get("stockSeries")?s.set("stockSeries",t):s._setSoft("stockSeries",t)});const i=t.chart;if(i){i.series.each(n=>{n.isType("DrawingSeries")&&(n.get("series")==e?n.set("series",t):n._setSoft("series",t))});const s=i.xAxes.getIndex(0);s&&(this._syncExtremesDp&&this._syncExtremesDp.dispose(),this.setPrivateRaw("mainAxis",s),this._baseDP&&this._baseDP.dispose(),this._baseDP=s.on("baseInterval",n=>{this.indicators.each(a=>{a.isType("ChartIndicator")&&a.xAxis.set("baseInterval",n)})}),this._syncExtremesDp=new Di.ZT([s.onPrivate("max",()=>{this._syncExtremes()}),s.onPrivate("min",()=>{this._syncExtremes()})]))}this.getPrivate("comparing")&&this.setPercentScale(!0)}super._prepareChildren()}_afterChanged(){if(super._afterChanged(),this._drawingsChanged){this._drawingsChanged=!1;const t="drawingsupdated";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}if(this._indicatorsChanged){this._indicatorsChanged=!1;const t="indicatorsupdated";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}}_updateChildren(){super._updateChildren();const t=this.get("stockSeries");if(this.isDirty("volumeSeries")){const e=this.get("volumeSeries");if(e){const i=e.chart;i&&i.series.events.on("removeIndex",s=>{s.oldValue==e&&this.set("volumeSeries",void 0)})}}if((this.isDirty("stockNegativeColor")||this.isDirty("stockPositiveColor")||this.isDirty("stockSeries"))&&t&&t.isType("BaseColumnSeries")){const e=this._root.interfaceColors,i=this.get("stockNegativeColor",e.get("negative")),s=this.get("stockPositiveColor",e.get("positive"));let n=t.dataItems[0];if(s&&s){P.__(t.dataItems,v=>{const E=v.get("graphics");if(E){const M=E.states.lookup("dropFromOpen");M&&M.setAll({fill:i,stroke:i});const O=E.states.lookup("riseFromOpen");O&&O.setAll({fill:s,stroke:s});const I=E.states.lookup("dropFromPrevious");I&&I.setAll({fill:i,stroke:i});const $=E.states.lookup("riseFromPrevious");$&&$.setAll({fill:s,stroke:s}),t._applyGraphicsStates(v,n),n=v}});const a=t.columns.template.states,h=a.lookup("riseFromOpen"),u=t.columns.template.get("themeTags");if(s){h?h.setAll({fill:s,stroke:s}):a.create("riseFromOpen",{fill:s,stroke:s});const v=a.lookup("riseFromPrevious");v?v.setAll({fill:s,stroke:s}):u&&-1!=u.indexOf("pro")&&a.create("riseFromPrevious",{fill:s,stroke:s})}if(i){const v=a.lookup("dropFromOpen");v?v.setAll({fill:i,stroke:i}):a.create("dropFromOpen",{fill:i,stroke:i});const E=a.lookup("dropFromPrevious");E?E.setAll({fill:i,stroke:i}):u&&-1!=u.indexOf("pro")&&a.create("dropFromPrevious",{fill:i,stroke:i})}}t.markDirtyValues()}}setPercentScale(t){const e=this.get("stockSeries"),i=this.get("percentScaleSeriesSettings"),s=this.get("percentScaleValueAxisSettings");if(e){const n=e.chart,a=e.get("yAxis");if(a.set("logarithmic",!1),this._maybePrepAxisDefaults(),n){const h=[];n.series.each(u=>{u.get("yAxis")==a&&(h.push(u),this._maybePrepSeriesDefaults(u))}),null==t&&(t=this.getPrivate("comparedSeries",[]).length>0),this.setPrivate("comparing",t),i&&P.__(h,u=>{if(t)u.setAll(i),u.states.lookup("default").setAll(i);else{u.states.apply("comparingDefaults");const v=u.states.lookup("comparingDefaults");v&&u.states.lookup("default").setAll(v._settings)}}),s&&(t?a.setAll(s):a.states.apply("comparingDefaults"))}}this.indicators.each(n=>{n.markDataDirty()})}addComparingSeries(t){const e=this.get("stockSeries");if(e){const i=e.chart;i&&i.series.push(t);const s=this.get("comparingSeriesSettings");s&&t.setAll(s);const n=this.getPrivate("comparedSeries");n?n.push(t):this.setPrivate("comparedSeries",[t]);const a=e.get("legendDataItem");if(a){const h=a.component;if(h.isType("StockLegend")){h.data.push(t);const u=t.get("legendDataItem");if(u){const v=u.get("closeButton");v.set("forceHidden",!1),v.events.on("click",()=>{this.removeComparingSeries(t)})}}}this.get("autoSetPercentScale")&&this.setPercentScale(!0)}return t}removeComparingSeries(t){const e=this.get("stockSeries");if(e){const s=e.chart;s&&s.series.removeValue(t);const n=this.getPrivate("comparedSeries");n&&(P.TF(n,t),0==n.length&&this.get("autoSetPercentScale")&&this.setPercentScale(!1))}const i=t.get("legendDataItem");i&&i.component.data.removeValue(t)}
1_maybePrepSeriesDefaults(t){if(!t.states.lookup("comparingDefaults")){const e=this.get("percentScaleSeriesSettings"),i={};l.__(e,(s,n)=>{i[s]=t.get(s)}),t.states.create("comparingDefaults",i)}}getSeriesDefault(t,e){const i=t.states.lookup("comparingDefaults");return i?i.get(e):t.get(e)}_maybePrepAxisDefaults(){const e=this.get("stockSeries").get("yAxis");if(!e.states.lookup("comparingDefaults")){const i=this.get("percentScaleValueAxisSettings"),s={};l.__(i,(n,a)=>{s[n]=e.get(n)}),e.states.create("comparingDefaults",s)}}_processIndicator(t){this.children.push(t);const e=this.get("stockSeries");e&&t._setSoft("stockSeries",e);const i=this.get("volumeSeries");i&&t._setSoft("volumeSeries",i),this.getPrivate("comparing")&&this.setPercentScale(!0),P.__(t._editableSettings,s=>{t.on(s.key,()=>{this.markDirtyIndicators()})}),this.markDirtyIndicators(),t.prepareData(),this._syncExtremes()}_removeIndicator(t){this.children.removeValue(t),this.markDirtyIndicators()}_removePanel(t){this.panelsContainer.children.removeValue(t)}_updateControls(){const t=this.get("stockSeries");this.panels.each(e=>{const i=e.panelControls,s=this.panelsContainer.children.indexOf(e),n=this.panels.length,a="visible",h=this.get("autoHidePanelControls",!1);i.set(a,!h),i.upButton.setPrivate(a,!1),i.downButton.setPrivate(a,!1),i.expandButton.setPrivate(a,!1),i.closeButton.setPrivate(a,!1),h&&(e.plotContainer.events.on("pointerover",()=>{i.show()}),i.events.on("pointerover",()=>{i.show()}),e.plotContainer.events.on("pointerout",()=>{i.isHover()||i.hide()})),n>1&&(i.expandButton.setPrivate(a,!0),0!=s&&i.upButton.setPrivate(a,!0),s!=n-1&&i.downButton.setPrivate(a,!0),(!t||t.chart!=e)&&i.closeButton.setPrivate(a,!0)),t&&this.indicators.each(u=>{u.set("stockSeries",t)})}),this._updateResizers()}_processPanel(t){t.setPrivate("otherCharts",this.panels.values),t.setPrivate("stockChart",this),t.panelControls=t.topPlotContainer.children.push(ns.new(this._root,{stockPanel:t,stockChart:this})),this._updateControls();const e=t.children.push(Y.M.new(this._root,{themeTags:["panelresizer"]}));t.panelResizer=e,e.events.on("pointerdown",i=>{const s=this.panelsContainer;this._downResizer=i.target,this.panels.each(a=>{a.set("height",(0,L.KN)(a.height()/s.height()*100))}),this._downY=s.toLocal(i.point).y;const n=s.children.getIndex(s.children.indexOf(t)-1);this._upperPanel=n,n&&(this._uhp=n.get("height")),this._dhp=t.get("height")}),e.events.on("pointerup",()=>{this._downResizer=void 0}),e.events.on("globalpointermove",i=>{if(i.target==this._downResizer){const s=this.panelsContainer,n=s.height(),a=this._upperPanel;if(a){const h=s.children.indexOf(a)+2;let u=n-t.get("minHeight",0);const v=s.children.getIndex(h);v&&(u=v.y()-t.get("minHeight",0));const E=Math.max(a.y()+a.get("minHeight",0)+a.get("paddingTop",0),Math.min(s.toLocal(i.point).y,u)),M=this._downY,O=this._dhp,I=this._uhp;if(null!=M&&null!=O&&null!=I){const $=(M-E)/n;t.set("height",(0,L.KN)(100*(O.value+$))),a.set("height",(0,L.KN)(100*(I.value-$)))}}}}),t.xAxes.events.onAll(i=>{if("clear"===i.type)P.__(i.oldValues,s=>{this._removeXAxis(s)});else if("push"===i.type)this._processXAxis(i.newValue);else if("setIndex"===i.type)this._processXAxis(i.newValue);else if("insertIndex"===i.type)this._processXAxis(i.newValue);else{if("removeIndex"!==i.type)throw new Error("Unknown IListEvent type");this._removeXAxis(i.oldValue)}}),t.leftAxesContainer.events.on("boundschanged",()=>{this.root.events.once("frameended",()=>{this._syncYAxesSize()})}),t.rightAxesContainer.events.on("boundschanged",()=>{this.root.events.once("frameended",()=>{this._syncYAxesSize()})}),this._updateResizers()}_updateResizers(){this.panels.each(t=>{var e;let i=!1;0==this.panelsContainer.children.indexOf(t)&&(i=!0),null===(e=t.panelResizer)||void 0===e||e.set("forceHidden",i)})}_syncYAxesSize(){let t=0,e=0;this.panels.each(i=>{let s=i.leftAxesContainer.width(),n=i.rightAxesContainer.width();s>t&&(t=s),n>e&&(e=n)}),this.panels.each(i=>{i.leftAxesContainer.set("minWidth",t),i.rightAxesContainer.set("minWidth",e)}),this.toolsContainer.set("paddingLeft",t),this.toolsContainer.set("paddingRight",e)}_removeXAxis(t){}_processXAxis(t){P.Cy(this._xAxes,t),t.on("start",()=>{1!=t._skipSync&&this._syncXAxes(t)}),t.on("end",()=>{1!=t._skipSync&&this._syncXAxes(t)}),this._xAxes[0]&&this._root.events.once("frameended",()=>{this._syncXAxes(this._xAxes[0])})}_syncExtremes(){const t=this.getPrivate("mainAxis");if(t){const e=t.getPrivate("min"),i=t.getPrivate("max");this.panels.each(s=>{s.xAxes.each(n=>{if(n!=t&&n.isType("DateAxis")){let a=n.getPrivate("min"),h=n.getPrivate("max");a!=e&&n.set("min",e),h!=i&&n.set("max",i);const u="GaplessDateAxis";n.isType(u)&&t.isType(u)&&(n._customDates=t._dates)}})})}}_syncXAxes(t){P.__(this._xAxes,e=>{e!=t&&e.isType("DateAxis")&&e.get("zoomable",!0)&&(e._skipSync=!0,e.set("start",t.get("start")),e.set("end",t.get("end")),e._skipSync=!1)})}getVolumeColor(t,e,i){if(t){const s=this.get("stockSeries"),n=t.component;if(e||(e=this.get("volumeNegativeColor",this.root.interfaceColors.get("negative",A.Q1.fromHex(16711680)))),i||(i=this.get("volumePositiveColor",this.root.interfaceColors.get("positive",A.Q1.fromHex(65280)))),e&&i&&s&&n){const a=n.dataItems.indexOf(t);if(a>0){let h=s.dataItems[a];if(h){let u=h.get("valueY");
1if(null!=u)for(let v=a-1;v>=0;v--){let M=s.dataItems[v].get("valueY");if(null!=M)return u<M?e:i}}}}}return i}getControl(t){let e;return P.FY(this.controls,i=>i.className!=t||(e=i,!1)),e}_dragStartDrawing(t){this.panels.each(e=>{e.series.each(i=>{i.isType("DrawingSeries")&&i._dragStart(t)})})}_dragStopDrawing(t){this.panels.each(e=>{e.series.each(i=>{i.isType("DrawingSeries")&&i._dragStop(t)})})}drawingsInteractive(t,e){this.panels.each(i=>{i.series.each(s=>{s!=e&&s.isType("DrawingSeries")&&s.setInteractive(t)})})}unselectDrawings(){let t=0;return this.panels.each(e=>{e.series.each(i=>{i.isType("DrawingSeries")&&(t+=i.unselectDrawings())})}),this.spriteResizer.set("sprite",void 0),t}cancelDrawing(){this.panels.each(t=>{t.series.each(e=>{e.isType("DrawingSeries")&&e.cancelDrawing()})})}deleteSelectedDrawings(){this.panels.each(t=>{t.series.each(e=>{e.isType("DrawingSeries")&&e.deleteSelected()})})}selectDrawing(t,e){this.panels.each(i=>{i.series.each(s=>{s.isType("DrawingSeries")&&s.selectDrawing(t,e)})})}unselectDrawing(t){this.panels.each(e=>{e.series.each(i=>{i.isType("DrawingSeries")&&i.unselectDrawing(t)})})}deleteDrawing(t){this.panels.each(e=>{e.series.each(i=>{i.isType("DrawingSeries")&&i.deleteDrawing(t)})})}}ds.className="StockChart",ds.classNames=m.m.classNames.concat([ds.className]);class Ci extends V.A{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}}Ci.className="Grid",Ci.classNames=V.A.classNames.concat([Ci.className]);class us extends m.m{constructor(){super(...arguments),this._alwaysShow=!1,this.lineX=this.children.push(Ci.new(this._root,{themeTags:["x"]})),this.lineY=this.children.push(Ci.new(this._root,{themeTags:["y"]})),this.selection=this.children.push(V.A.new(this._root,{themeTags:["selection","cursor"],layer:30})),this._lastPoint={x:0,y:0},this._lastPoint2={x:0,y:0},this._tooltipX=!1,this._tooltipY=!1}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this.setAll({width:L.Q2,height:L.Q2,isMeasured:!0,position:"absolute"}),this.states.create("hidden",{visible:!0,opacity:0}),this._drawLines(),this.setPrivateRaw("visible",!1),this._disposers.push(this.setTimeout(()=>{this.setPrivate("visible",!0)},500)),this._disposers.push(this.lineX.events.on("positionchanged",()=>{this._handleXLine()})),this._disposers.push(this.lineY.events.on("positionchanged",()=>{this._handleYLine()})),this._disposers.push(this.lineX.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineX.events.on("blur",()=>this._handleLineBlur())),this._disposers.push(this.lineY.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineY.events.on("blur",()=>this._handleLineBlur())),r.xY("keyboardevents")&&this._disposers.push(r.q2(document,"keydown",t=>{this._handleLineMove(r.K(t),t.ctrlKey)}))}_setUpTouch(){const t=this.chart;t&&(t.plotContainer._display.cancelTouch="none"!=this.get("behavior"))}_handleXLine(){let t=this.lineX.x(),e=!0;(t<0||t>this.width())&&(e=!1),this.lineX.setPrivate("visible",e)}_handleYLine(){let t=this.lineY.y(),e=!0;(t<0||t>this.height())&&(e=!1),this.lineY.setPrivate("visible",e)}_handleLineMove(t,e){let i="";const s=this.chart;let n;if(s&&s.xAxes.length){this._root.focused(this.lineX)?(i="positionX",n=s.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(n=s.yAxes.getIndex(0),i="positionY");let a=1;if(e&&(a=5),n){let u,h=n.get("renderer").get("inversed",!1);"ArrowRight"==t||"ArrowDown"==t?u=1:"ArrowLeft"==t||"ArrowUp"==t?u=-1:"Tab"==t&&(u=0),null!=u&&(h&&(u*=-1),this.set(i,n.nextPosition(u*a)))}}}_handleLineFocus(){this._alwaysShow=this.get("alwaysShow",!1),this.setAll({positionX:this.getPrivate("positionX",0),positionY:this.getPrivate("positionY",0),alwaysShow:!0}),this._handleLineMove("Tab")}_handleLineBlur(){(this.lineX.isFocus()||this.lineY.isFocus())&&this.setAll({positionX:void 0,positionY:void 0,alwaysShow:this._alwaysShow})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;const t=this.get("xAxis");if(t){const e=t.get("tooltip");e&&(this._tooltipX=!0,this._disposers.push(e.on("pointTo",()=>{this._updateXLine(e)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;const t=this.get("yAxis");if(t){const e=t.get("tooltip");e&&(this._tooltipY=!0,this._disposers.push(e.on("pointTo",()=>{this._updateYLine(e)})))}}}_handleSyncWith(){const t=this.chart;if(t){const e=this.get("syncWith"),i=[];e&&P.__(e,s=>{const n=s.chart;n&&i.push(n)}),t._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){const t=this.get("positionX"),e=this.get("positionY");null==t&&null==e?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(t){let e=at.LI(this._display.toLocal(t.get("pointTo",{x:0,y:0})).x,3);this._toX!=e&&(this.lineX.animate({key:"x",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toX=e)}_updateYLine(t){let e=at.LI(this._display.toLocal(t.get("pointTo",{x:0,y:0})).y,3);this._toY!=e&&(this.lineY.animate({key:"y",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toY=e)}_drawLines(){this.lineX.set("draw",t=>{t.moveTo(0,0),t.lineTo(0,this.height())}),this.lineY.set("draw",t=>{t.moveTo(0,0),t.lineTo(this.width(),0)})}
1updateCursor(){this.get("alwaysShow")&&(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0)))),this.handleMove()}_setChart(t){this.chart=t,this._handleSyncWith();const e=t.plotContainer;this.events.on("boundschanged",()=>{this._disposers.push(this.setTimeout(()=>{this.updateCursor()},50))}),r.xY("touchevents")&&(this._disposers.push(e.events.on("click",s=>{r.kH(s.originalEvent)&&this._handleMove(s)})),this._setUpTouch()),this._disposers.push(e.events.on("pointerdown",s=>{this._handleCursorDown(s)})),this._disposers.push(e.events.on("globalpointerup",s=>{this._handleCursorUp(s),!s.native&&!this.isHidden()&&this._handleMove(s)})),this._disposers.push(e.events.on("globalpointermove",s=>{!this.get("syncWith")&&0==l.HP(e._downPoints).length&&!s.native&&this.isHidden()||(this._handleMove(s),Math.hypot(this._lastPoint2.x-s.point.x,this._lastPoint2.y-s.point.y)>1&&(this._handleLineBlur(),this._lastPoint2=s.point))}));const i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(t){const e=this.chart;return!!e&&e.inPlot(t)}_handleCursorDown(t){if(2==t.originalEvent.button)return;let i=this._display.toLocal(t.point);const s=this.chart;if(this.selection.set("draw",()=>{}),s&&this._inPlot(i)){if(this._downPoint=i,"none"!=this.get("behavior")){this.selection.show();const h="selectstarted";this.events.isEnabled(h)&&this.events.dispatch(h,{type:h,target:this,originalEvent:t.originalEvent})}let n=this._getPosition(i).x,a=this._getPosition(i).y;this.setPrivate("downPositionX",n),this.setPrivate("downPositionY",a)}}_handleCursorUp(t){if(this._downPoint){const e=this.get("behavior","none");if("none"!=e){"z"===e.charAt(0)&&this.selection.hide();let s=this._display.toLocal(t.point);const n=this._downPoint,a=this.get("moveThreshold",1);if(s&&n){let h=!1;if(("zoomX"===e||"zoomXY"===e||"selectX"===e||"selectXY"===e)&&Math.abs(s.x-n.x)>a&&(h=!0),("zoomY"===e||"zoomXY"===e||"selectY"===e||"selectXY"===e)&&Math.abs(s.y-n.y)>a&&(h=!0),h){const u="selectended";this.events.isEnabled(u)&&this.events.dispatch(u,{type:u,target:this,originalEvent:t.originalEvent})}else{const u="selectcancelled";this.events.isEnabled(u)&&this.events.dispatch(u,{type:u,target:this,originalEvent:t.originalEvent})}}}}this._downPoint=void 0}_handleMove(t){if(this.getPrivate("visible")){const e=this.chart;if(e&&l.HP(e.plotContainer._downPoints).length>1)return void this.set("forceHidden",!0);this.set("forceHidden",!1);const i=t.point,s=this._lastPoint;if(Math.round(s.x)===Math.round(i.x)&&Math.round(s.y)===Math.round(i.y))return;this._lastPoint=i,this.setPrivate("lastPoint",i),this.handleMove({x:i.x,y:i.y},!1,t.originalEvent)}}_getPosition(t){return{x:t.x/this.width(),y:t.y/this.height()}}handleMove(t,e,i){t||(t=this._movePoint);const s=this.get("alwaysShow");if(!t)return void this.hide(0);this._movePoint=t;let n=this._display.toLocal(t),a=this.chart;if(a&&(this._inPlot(n)||this._downPoint)){a._movePoint=t,this.isHidden()&&(this.show(),"z"==this.get("behavior","").charAt(0)&&this.selection.set("draw",()=>{}));let h=n.x,u=n.y,v=this._getPosition(n);this.setPrivate("point",n);let E=this.get("snapToSeries");this._downPoint&&(E=void 0);let M=this.get("positionX"),O=v.x;c.Et(M)&&(O=M);let I=this.get("positionY"),$=v.y;c.Et(I)&&($=I),this.setPrivate("positionX",O),this.setPrivate("positionY",$);const G=this._getPoint(O,$);if(h=G.x,u=G.y,a.xAxes.each(F=>{F._handleCursorPosition(O,E),s&&F.handleCursorShow()}),a.yAxes.each(F=>{F._handleCursorPosition($,E),s&&F.handleCursorShow()}),!e){a._handleCursorPosition();const F="cursormoved";this.events.isEnabled(F)&&this.events.dispatch(F,{type:F,target:this,point:t,originalEvent:i})}this._updateLines(h,u),a.arrangeTooltips()}else if(!this._downPoint&&!s){this.hide(0);const h="cursorhidden";this.events.isEnabled(h)&&this.events.dispatch(h,{type:h,target:this})}this._downPoint&&"none"!=this.get("behavior")&&this._updateSelection(n)}_getPoint(t,e){return{x:this.width()*t,y:this.height()*e}}_updateLines(t,e){this._tooltipX||this.lineX.set("x",t),this._tooltipY||this.lineY.set("y",e),this._drawLines()}_updateSelection(t){const e=this.selection,i=this.get("behavior"),s=this.width(),n=this.height();t.x<0&&(t.x=0),t.x>s&&(t.x=s),t.y<0&&(t.y=0),t.y>n&&(t.y=n),e.set("draw",a=>{const h=this._downPoint;h&&("zoomXY"===i||"selectXY"===i?(a.moveTo(h.x,h.y),a.lineTo(h.x,t.y),a.lineTo(t.x,t.y),a.lineTo(t.x,h.y),a.lineTo(h.x,h.y)):"zoomX"===i||"selectX"===i?(a.moveTo(h.x,0),a.lineTo(h.x,n),a.lineTo(t.x,n),a.lineTo(t.x,0),a.lineTo(h.x,0)):("zoomY"===i||"selectY"===i)&&(a.moveTo(0,h.y),a.lineTo(s,h.y),a.lineTo(s,t.y),a.lineTo(0,t.y),a.lineTo(0,h.y)))})}
1_onHide(){if(this.isHidden()){let t=this.chart;t&&(t.xAxes.each(e=>{e.handleCursorHide()}),t.yAxes.each(e=>{e.handleCursorHide()}),t.series.each(e=>{e.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let t=this.chart;t&&(t.xAxes.each(e=>{e.handleCursorShow()}),t.yAxes.each(e=>{e.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose(),this.selection.dispose()}}us.className="XYCursor",us.classNames=m.m.classNames.concat([us.className]);var $s=y(67830);class ps extends $s.g{constructor(){super(...arguments),this._tickPoints=[]}}ps.className="AxisTick",ps.classNames=$s.g.classNames.concat([ps.className]);class gs extends W.J{constructor(){super(...arguments),this._tickPoints=[]}}gs.className="AxisLabel",gs.classNames=W.J.classNames.concat([gs.className]);class pi extends V.A{constructor(){super(...arguments),this._axisLength=100,this._start=0,this._end=1,this._inversed=!1,this._minSize=0,this._lc=1,this._ls=0,this.ticks=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>ps._new(this._root,{themeTags:r.kE(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template]))),this.grid=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>Ci._new(this._root,{themeTags:r.kE(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template]))),this.axisFills=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>V.A._new(this._root,{themeTags:r.kE(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template]))),this.labels=this.addDisposer(new U.TS(Ct.Bj.new({}),()=>gs._new(this._root,{themeTags:r.kE(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}makeTick(t,e){const i=this.ticks.make();return i._setDataItem(t),t.setRaw("tick",i),i.set("themeTags",r.kE(i.get("themeTags"),e)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(t,e){const i=this.grid.make();return i._setDataItem(t),t.setRaw("grid",i),i.set("themeTags",r.kE(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(t,e){const i=this.axisFills.make();return i._setDataItem(t),i.set("themeTags",r.kE(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),t.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(t,e){const i=this.labels.make();return i.set("themeTags",r.kE(i.get("themeTags"),e)),t.get("isRange")?this.axis.labelsContainer.children.push(i):this.axis.labelsContainer.children.moveValue(i,0),i._setDataItem(t),t.setRaw("label",i),this.labels.push(i),i}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(),this.set("isMeasured",!1);const t=this.thumb;t&&(this._disposers.push(t.events.on("pointerdown",e=>{this._handleThumbDown(e)})),this._disposers.push(t.events.on("globalpointerup",e=>{this._handleThumbUp(e)})),this._disposers.push(t.events.on("globalpointermove",e=>{this._handleThumbMove(e)})))}_beforeChanged(){super._beforeChanged(),this.isDirty("minGridDistance")&&this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){if(super._changed(),this.isDirty("pan")){const t=this.thumb;if(t){const e=this.axis.labelsContainer,i=this.get("pan");"zoom"==i?e.children.push(t):"none"==i&&e.children.removeValue(t)}}}_handleThumbDown(t){this._thumbDownPoint=this.toLocal(t.point);const e=this.axis;this._downStart=e.get("start"),this._downEnd=e.get("end")}_handleThumbUp(t){this._thumbDownPoint=void 0}_handleThumbMove(t){const e=this._thumbDownPoint;if(e){const i=this.toLocal(t.point),s=this._downStart,n=this._downEnd,a=this._getPan(i,e)*Math.min(1,n-s)/2*this.get("panSensitivity",1);this.axis.zoom(s-a,n+a,0)}}_getPan(t,e){return 0}positionToCoordinate(t){return this._inversed?(this._end-t)*this._axisLength:(t-this._start)*this._axisLength}updateTooltipBounds(t){}_updateSize(){this.markDirty(),this._clear=!0}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t*=i-e,this.get("inversed")?i-t:e+t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,t/(i-e)}fixPosition(t){return this.get("inversed")?1-t:t}_updateLC(){}toggleVisibility(t,e,i,s){let n=this.axis;const a=n.get("start",0),h=n.get("end",1);t.setPrivate("visible",!(e<a+(h-a)*(i-1e-4)||e>a+(h-a)*(s+1e-4)))}_positionTooltip(t,e){const i=this.chart;i&&(t.set("pointTo",this._display.toGlobal(e)),i.inPlot(e)||t.hide())}processAxis(){}}
1pi.className="AxisRenderer",pi.classNames=V.A.classNames.concat([pi.className]);class fs extends pi{constructor(){super(...arguments),this.thumb=Y.M.new(this._root,{height:L.Q2,isMeasured:!1,themeTags:["axis","y","thumb","zoomgrip"]})}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");const t=this.grid.template;t.set("width",L.Q2),t.set("height",0),t.set("draw",(e,i)=>{e.moveTo(0,0),e.lineTo(i.width(),0)}),this.set("draw",(e,i)=>{e.moveTo(0,0),e.lineTo(0,i.height())})}_getPan(t,e){return(t.y-e.y)/this.height()}_changed(){var t;super._changed();const e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("y",-1e3));const s=this.thumb,n="opposite",a="inside",h=this.chart;if(this.isDirty(n)||this.isDirty(a)){const v=e.children;if(this.get(a)?e.addTag(a):e.removeTag(a),h){if(this.get(n)){const E=h.rightAxesContainer.children;-1==E.indexOf(e)&&E.moveValue(e,0),e.addTag(n),v.moveValue(this,0)}else{const E=h.leftAxesContainer.children;-1==E.indexOf(e)&&E.moveValue(e),e.removeTag(n),v.moveValue(this)}null===(t=e.ghostLabel)||void 0===t||t._applyThemes(),this.labels.each(E=>{E._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}const u=e.labelsContainer.width();h&&(this.get(n)?s.set("centerX",0):s.set("centerX",u)),s.setPrivate("width",u)}processAxis(){super.processAxis();const t=this.axis;null==t.get("height")&&t.set("height",L.Q2);const e=this._root.horizontalLayout;t.set("layout",e),t.labelsContainer.set("height",L.Q2),t.axisHeader.set("layout",e)}_updatePositions(){const t=this.axis,e=t.y()-r.JY(t.get("centerY",0),t.height());t.gridContainer.set("y",e),t.topGridContainer.set("y",e),t.bulletsContainer.set("x",this.x());const i=t.chart;if(i){const s=i.plotContainer,n=t.axisHeader;let a=t.get("marginTop",0);n.children.length>0?(a=t.axisHeader.height(),t.set("marginTop",a+1)):n.set("height",a),n.setAll({y:t.y()-a,x:-1,width:s.width()+2})}}axisLength(){return this.axis.innerHeight()}positionToPoint(t){return{x:0,y:this.positionToCoordinate(t)}}updateLabel(t,e,i,s){if(t){c.Et(e)||(e=0);let n=.5;n=c.Et(s)&&s>1?t.get("multiLocation",n):t.get("location",n);const a=this.get("opposite"),h=t.get("inside",this.get("inside",!1));a?(t.set("x",0),t.set("position",h?"absolute":"relative")):h?(t.set("x",0),t.set("position","absolute")):(t.set("x",void 0),t.set("position","relative")),c.Et(i)&&i!=e&&(e+=(i-e)*n),t.set("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){c.Et(e)||(e=0);let s=t.get("location",.5);c.Et(i)&&i!=e&&(e+=(i-e)*s),t.set("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateTick(t,e,i,s){if(t){c.Et(e)||(e=0);let n=.5;n=c.Et(s)&&s>1?t.get("multiLocation",n):t.get("location",n),c.Et(i)&&i!=e&&(e+=(i-e)*n),t.set("y",this.positionToCoordinate(e));let a=t.get("length",0);const h=t.get("inside",this.get("inside",!1));this.get("opposite")?(t.set("x",0),h&&(a*=-1)):h||(a*=-1),t.set("draw",u=>{u.moveTo(0,0),u.lineTo(a,0)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateBullet(t,e,i){if(t){const s=t.get("sprite");if(s){c.Et(e)||(e=0);let n=t.get("location",.5);c.Et(i)&&i!=e&&(e+=(i-e)*n);let a=this.axis.roundAxisPosition(e,n),h=this.axis._bullets[a],u=1;if(this.get("opposite")&&(u=-1),t.get("stacked"))if(h){let v=h.get("sprite");v&&s.set("x",v.x()+v.width()*u)}else s.set("x",0);this.axis._bullets[a]=t,s.set("y",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){c.Et(e)||(e=0),c.Et(i)||(i=1);let s=this.positionToCoordinate(e),n=this.positionToCoordinate(i);this.fillDrawMethod(t,s,n)}}fillDrawMethod(t,e,i){t.set("draw",s=>{const n=this.axis.gridContainer.width(),a=this.height();i<e&&([i,e]=[e,i]),!(e>a||i<0)&&(s.moveTo(0,e),s.lineTo(n,e),s.lineTo(n,i),s.lineTo(0,i),s.lineTo(0,e))})}positionToCoordinate(t){return this._inversed?(t-this._start)*this._axisLength:(this._end-t)*this._axisLength}positionTooltip(t,e){this._positionTooltip(t,{x:0,y:this.positionToCoordinate(e)})}updateTooltipBounds(t){const e=this.get("inside"),i=1e5;let s=this._display.toGlobal({x:0,y:0}),n=s.y,a=0,h=this.axisLength(),u=i,v="right";this.get("opposite")?e?(v="right",a=s.x-i,u=i):(v="left",a=s.x,u=i):e?(v="left",a=s.x,u=i):(v="right",a=s.x-i,u=i);const E={left:a,right:a+u,top:n,bottom:n+h},M=t.get("bounds");r.MI(E,M)||(t.set("bounds",E),t.set("pointerOrientation",v))}_updateLC(){const t=this.axis,e=t.parent;
1if(e){const i=e.innerHeight();this._lc=this.axisLength()/i,this._ls=t.y()/i}}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t=(t-=this._ls)*(i-e)/this._lc,this.get("inversed")?e+t:i-t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t-=e:t=i-t,(t=t/(i-e)*this._lc)+this._ls}fixPosition(t){return this.get("inversed")?t:1-t}}fs.className="AxisRendererY",fs.classNames=pi.classNames.concat([fs.className]);class _s extends pi{constructor(){super(...arguments),this.thumb=Y.M.new(this._root,{width:L.Q2,isMeasured:!1,themeTags:["axis","x","thumb","zoomgrip"]})}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");const t=this.grid.template;t.set("height",L.Q2),t.set("width",0),t.set("draw",(e,i)=>{e.moveTo(0,0),e.lineTo(0,i.height())}),this.set("draw",(e,i)=>{e.moveTo(0,0),e.lineTo(i.width(),0)})}_changed(){var t;super._changed();const e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("x",-1e3));const s="opposite",n="inside";if(this.isDirty(s)||this.isDirty(n)){const a=this.chart,h=e.children;if(this.get(n)?e.addTag(n):e.removeTag(n),a){if(this.get(s)){const u=a.topAxesContainer.children;-1==u.indexOf(e)&&u.insertIndex(0,e),e.addTag(s),h.moveValue(this)}else{const u=a.bottomAxesContainer.children;-1==u.indexOf(e)&&u.moveValue(e),e.removeTag(s),h.moveValue(this,0)}null===(t=e.ghostLabel)||void 0===t||t._applyThemes(),this.labels.each(u=>{u._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}this.thumb.setPrivate("height",e.labelsContainer.height())}_getPan(t,e){return(e.x-t.x)/this.width()}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t=(t-=this._ls)*(i-e)/this._lc,this.get("inversed")?i-t:e+t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,(t=t/(i-e)*this._lc)+this._ls}_updateLC(){const t=this.axis,e=t.parent;if(e){const i=e.innerWidth();this._lc=this.axisLength()/i,this._ls=(t.x()-e.get("paddingLeft",0))/i}}_updatePositions(){const t=this.axis,e=t.x()-r.JY(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0);t.gridContainer.set("x",e),t.topGridContainer.set("x",e),t.bulletsContainer.set("y",this.y());const i=t.chart;if(i){const s=i.plotContainer,n=t.axisHeader;let a=t.get("marginLeft",0),h=t.x()-a;const u=t.parent;u&&(h-=u.get("paddingLeft",0)),n.children.length>0?(a=t.axisHeader.width(),t.set("marginLeft",a+1)):n.set("width",a),n.setAll({x:h,y:-1,height:s.height()+2})}}processAxis(){super.processAxis();const t=this.axis;null==t.get("width")&&t.set("width",L.Q2);const e=this._root.verticalLayout;t.set("layout",e),t.labelsContainer.set("width",L.Q2),t.axisHeader.setAll({layout:e})}axisLength(){return this.axis.width()}positionToPoint(t){return{x:this.positionToCoordinate(t),y:0}}updateTick(t,e,i,s){if(t){c.Et(e)||(e=0);let n=.5;n=c.Et(s)&&s>1?t.get("multiLocation",n):t.get("location",n),c.Et(i)&&i!=e&&(e+=(i-e)*n),t.set("x",this.positionToCoordinate(e));let a=t.get("length",0);const h=t.get("inside",this.get("inside",!1));this.get("opposite")?(t.set("y",L.Q2),h||(a*=-1)):(t.set("y",0),h&&(a*=-1)),t.set("draw",u=>{u.moveTo(0,0),u.lineTo(0,a)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateLabel(t,e,i,s){if(t){let n=.5;n=c.Et(s)&&s>1?t.get("multiLocation",n):t.get("location",n),c.Et(e)||(e=0);const a=t.get("inside",this.get("inside",!1));this.get("opposite")?a?(t.set("position","absolute"),t.set("y",0)):(t.set("position","relative"),t.set("y",L.Q2)):a?(t.set("y",0),t.set("position","absolute")):(t.set("y",void 0),t.set("position","relative")),c.Et(i)&&i!=e&&(e+=(i-e)*n),t.set("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){c.Et(e)||(e=0);let s=t.get("location",.5);c.Et(i)&&i!=e&&(e+=(i-e)*s),t.set("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateBullet(t,e,i){if(t){const s=t.get("sprite");if(s){c.Et(e)||(e=0);let n=t.get("location",.5);c.Et(i)&&i!=e&&(e+=(i-e)*n);let a=this.axis.roundAxisPosition(e,n),h=this.axis._bullets[a],u=-1;if(this.get("opposite")&&(u=1),t.get("stacked"))if(h){let v=h.get("sprite");v&&s.set("y",v.y()+v.height()*u)}else s.set("y",0);this.axis._bullets[a]=t,s.set("x",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){c.Et(e)||(e=0),c.Et(i)||(i=1);let s=this.positionToCoordinate(e),n=this.positionToCoordinate(i);this.fillDrawMethod(t,s,n)}}fillDrawMethod(t,e,i){t.set("draw",s=>{const n=this.axis.gridContainer.height(),a=this.width();i<e&&([i,e]=[e,i]),!(e>a||i<0)&&(s.moveTo(e,0),s.lineTo(i,0),s.lineTo(i,n),s.lineTo(e,n),s.lineTo(e,0))})}positionTooltip(t,e){this._positionTooltip(t,{x:this.positionToCoordinate(e),y:0})}updateTooltipBounds(t){const e=this.get("inside"),i=1e5;let s=this._display.toGlobal({x:0,y:0}),n=s.x,a=0,h=this.axisLength(),u=i,v="up";this.get("opposite")?e?(v="up",a=s.y,u=i):(v="down",a=s.y-i,u=i):e?(v="down",a=s.y-i,u=i):(v="up",a=s.y,u=i);const E={left:n,right:n+h,top:a,bottom:a+u},M=t.get("bounds");r.MI(E,M)||(t.set("bounds",E),t.set("pointerOrientation",v))}}
1_s.className="AxisRendererX",_s.classNames=pi.classNames.concat([_s.className]);class gi extends He.u{constructor(){super(...arguments),this._series=[],this._isPanning=!1,this.minorDataItems=[],this.labelsContainer=this.children.push(m.m.new(this._root,{})),this.gridContainer=m.m.new(this._root,{width:L.Q2,height:L.Q2}),this.topGridContainer=m.m.new(this._root,{width:L.Q2,height:L.Q2}),this.bulletsContainer=this.children.push(m.m.new(this._root,{isMeasured:!1,width:L.Q2,height:L.Q2,position:"absolute"})),this._rangesDirty=!1,this._panStart=0,this._panEnd=1,this._skipSync=!1,this.axisRanges=new U.B8,this._seriesAxisRanges=[],this._cursorPosition=-1,this._seriesValuesDirty=!1,this._seriesAdded=!1,this.axisHeader=this.children.push(m.m.new(this._root,{themeTags:["axis","header"],position:"absolute",background:Y.M.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})})),this._bullets={}}_dispose(){this.gridContainer.dispose(),this.topGridContainer.dispose(),this.bulletsContainer.dispose(),this.labelsContainer.dispose(),this.axisHeader.dispose(),super._dispose()}_afterNew(){super._afterNew(),this.setPrivate("updateScrollbar",!0),this._disposers.push(this.axisRanges.events.onAll(e=>{if("clear"===e.type)P.__(e.oldValues,i=>{i.dispose()});else if("push"===e.type)this._processAxisRange(e.newValue,["range"]);else if("setIndex"===e.type)this._processAxisRange(e.newValue,["range"]);else if("insertIndex"===e.type)this._processAxisRange(e.newValue,["range"]);else if("removeIndex"===e.type)this.disposeDataItem(e.oldValue);else{if("moveIndex"!==e.type)throw new Error("Unknown IStreamEvent type");this._processAxisRange(e.value,["range"])}}));const t=this.get("renderer");t&&(t.axis=this,t.processAxis()),this.children.push(t),this._createGhostLabel()}_createGhostLabel(){const e=this.get("renderer").makeLabel(new He.s(this,void 0,{}),[]);e.adapters.disable("text"),e.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),e.events.disable(),this.ghostLabel=e}_updateFinals(t,e){}zoom(t,e,i,s){if(this.get("zoomable",!0))if(this._updateFinals(t,e),this.get("start")!==t||this.get("end")!=e){let n=this._sAnimation,a=this._eAnimation;t>e&&([t,e]=[e,t]);let h=this.get("maxDeviation",.5)*Math.min(1,e-t);t<-h&&(t=-h),e>1+h&&(e=1+h);let u=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),v=u;c.Et(i)||(i=this.get("interpolationDuration",0)),s||(s="end"),1===e&&0!==t&&(s=t<this.get("start",0)?"start":"end"),0===t&&1!==e&&(s=e>this.get("end",1)?"end":"start");let E=this.get("minZoomCount",0);const M=this.dataItems;M&&M.length<E&&(E=M.length);let O=this.get("maxZoomCount",1/0);c.Et(E)&&(u=v/E);let I=1;if(c.Et(O)&&(I=v/O),t>e&&([t,e]=[e,t]),"start"===s?(O>0&&1/(e-t)<I&&(e=t+1/I),1/(e-t)>u&&(e=t+1/u),e>1&&e-t<1/u&&(t=e-1/u)):(O>0&&1/(e-t)<I&&(t=e-1/I),1/(e-t)>u&&(t=e-1/u),t<0&&e-t<1/u&&(e=t+1/u)),1/(e-t)>u&&(e=t+1/u),1/(e-t)>u&&(t=e-1/u),null!=O&&null!=E&&t==this.get("start")&&e==this.get("end")){const $=this.chart;$&&$._handleAxisSelection(this,!0)}if((n&&n.playing&&n.to==t||this.get("start")==t)&&(a&&a.playing&&a.to==e||this.get("end")==e))return;if(i>0){let G,F,$=this.get("interpolationEasing");if(this.get("start")!=t&&(G=this.animate({key:"start",to:t,duration:i,easing:$})),this.get("end")!=e&&(F=this.animate({key:"end",to:e,duration:i,easing:$})),this._sAnimation=G,this._eAnimation=F,G)return G;if(F)return F}else this.set("start",t),this.set("end",e),this.root.events.once("frameended",()=>{this.markDirtyKey("start")})}else this._sAnimation&&this._sAnimation.stop(),this._eAnimation&&this._eAnimation.stop()}get series(){return this._series}_processAxisRange(t,e){t.setRaw("isRange",!0),this._createAssets(t,e),this._rangesDirty=!0,this._prepareDataItem(t);const i=t.get("above"),s=this.topGridContainer,n=t.get("grid");i&&n&&s.children.moveValue(n);const a=t.get("axisFill");i&&a&&s.children.moveValue(a)}_prepareDataItem(t,e){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(t=>{this._prepareDataItem(t)}),P.__(this._seriesAxisRanges,t=>{this._prepareDataItem(t)})}_prepareChildren(){super._prepareChildren();const t=this.ghostLabel;if(t&&(this.get("fixAxisSize")?t.set("visible",!0):t.set("visible",!1)),this.isDirty("start")||this.isDirty("end")){const i=this.chart;
1i&&i._updateCursor();let s=this.get("start",0),n=this.get("end",1),a=this.get("maxDeviation",.5)*Math.min(1,n-s);if(s<-a){let h=s+a;s=-a,this.setRaw("start",s),this.isDirty("end")&&this.setRaw("end",n-h)}if(n>1+a){let h=n-1-a;n=1+a,this.setRaw("end",n),this.isDirty("start")&&this.setRaw("start",s-h)}}const e=this.get("renderer");if(e._start=this.get("start"),e._end=this.get("end"),e._inversed=e.get("inversed",!1),e._axisLength=e.axisLength()/(e._end-e._start),e._updateLC(),this.isDirty("tooltip")){const i=this.get("tooltip");if(i){const s=e.get("themeTags");i.addTag("axis"),i.addTag(this.className.toLowerCase()),i._applyThemes(),s&&(i.set("themeTags",r.kE(i.get("themeTags"),s)),i.label._applyThemes())}}}_updateTooltipBounds(){const t=this.get("tooltip");t&&this.get("renderer").updateTooltipBounds(t)}_updateBounds(){super._updateBounds(),this._updateTooltipBounds()}processChart(t){this.chart=t,this.get("renderer").chart=t,t.gridContainer.children.push(this.gridContainer),t.topGridContainer.children.push(this.topGridContainer),t.axisHeadersContainer.children.push(this.axisHeader),this.on("start",()=>{t._handleAxisSelection(this)}),this.on("end",()=>{t._handleAxisSelection(this)}),t.plotContainer.onPrivate("width",()=>{this.markDirtySize()}),t.plotContainer.onPrivate("height",()=>{this.markDirtySize()}),t.processAxis(this)}hideDataItem(t){return this._toggleFHDataItem(t,!0),super.hideDataItem(t)}showDataItem(t){return this._toggleFHDataItem(t,!1),super.showDataItem(t)}_toggleFHDataItem(t,e){const i="forceHidden",s=t.get("label");s&&s.set(i,e);const n=t.get("grid");n&&n.set(i,e);const a=t.get("tick");a&&a.set(i,e);const h=t.get("axisFill");h&&h.set(i,e);const u=t.get("bullet");if(u){const v=u.get("sprite");v&&v.set(i,e)}}_toggleDataItem(t,e){const i=t.get("label"),s="visible";i&&i.setPrivate(s,e);const n=t.get("grid");n&&n.setPrivate(s,e);const a=t.get("tick");a&&a.setPrivate(s,e);const h=t.get("axisFill");h&&h.setPrivate(s,e);const u=t.get("bullet");if(u){const v=u.get("sprite");v&&v.setPrivate(s,e)}}_createAssets(t,e,i){var s,n,a;const h=this.get("renderer");let u="minor";const v=t.get("label");if(v){let O=v.get("themeTags"),I=!1;i?-1==O?.indexOf(u)&&(I=!0):-1!=O?.indexOf(u)&&(I=!0),I&&(null===(s=v.parent)||void 0===s||s.children.removeValue(v),h.makeLabel(t,e),v.dispose(),h.labels.removeValue(v))}else h.makeLabel(t,e);const E=t.get("grid");if(E){let O=E.get("themeTags"),I=!1;i?-1==O?.indexOf(u)&&(I=!0):-1!=O?.indexOf(u)&&(I=!0),I&&(null===(n=E.parent)||void 0===n||n.children.removeValue(E),h.makeGrid(t,e),E.dispose(),h.grid.removeValue(E))}else h.makeGrid(t,e);const M=t.get("tick");if(M){let O=!1,I=M.get("themeTags");i?-1==I?.indexOf(u)&&(O=!0):-1!=I?.indexOf(u)&&(O=!0),O&&(null===(a=M.parent)||void 0===a||a.children.removeValue(M),h.makeTick(t,e),M.dispose(),h.ticks.removeValue(M))}else h.makeTick(t,e);(!i&&!t.get("axisFill")||i&&!t.get("axisFill")&&this.get("minorAxisFillsEnabled"))&&h.makeAxisFill(t,e),this._processBullet(t)}_processBullet(t){let e=t.get("bullet"),i=this.get("bullet");if(!e&&i&&!t.get("isRange")&&(e=i(this._root,this,t)),e){e.axis=this;const s=e.get("sprite");s&&(s._setDataItem(t),t.setRaw("bullet",e),s.parent||this.bulletsContainer.children.push(s))}}_afterChanged(){super._afterChanged();const t=this.chart;t&&(t._updateChartLayout(),t.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions(),this._seriesAdded=!1}disposeDataItem(t){super.disposeDataItem(t);const e=this.get("renderer"),i=t.get("label");i&&(e.labels.removeValue(i),i.dispose());const s=t.get("tick");s&&(e.ticks.removeValue(s),s.dispose());const n=t.get("grid");n&&(e.grid.removeValue(n),n.dispose());const a=t.get("axisFill");a&&(e.axisFills.removeValue(a),a.dispose());const h=t.get("bullet");h&&h.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());const t=this.ghostLabel;if(t){if(!t.isHidden()){const s=t.localBounds(),n=Math.ceil(s.right-s.left);let a=t.get("text");P.__(this.dataItems,h=>{const u=h.get("label");if(u&&!u.isHidden()){const v=u.localBounds();
1Math.ceil(v.right-v.left)>n&&(a=u.text._getText())}}),t.set("text",a)}let e=this.get("start",0),i=this.get("end",1);this.get("renderer").updateLabel(t,e+.5*(i-e))}}_handleCursorPosition(t,e){t=this.get("renderer").toAxisPosition(t),this._cursorPosition=t,this._snapToSeries=e,this.updateTooltip()}updateTooltip(){const t=this._snapToSeries;let e=this._cursorPosition;const i=this.get("tooltip"),s=this.get("renderer");c.Et(e)&&(P.__(this.series,n=>{if(n.get("baseAxis")===this){const a=this.getSeriesItem(n,e,this.get("tooltipLocation"));t&&-1!=t.indexOf(n)?(n.updateLegendMarker(a),n.updateLegendValue(a),n._settings.tooltipDataItem=a):(n.showDataItemTooltip(a),n.setRaw("tooltipDataItem",a))}}),this.get("snapTooltip")&&(e=this.roundAxisPosition(e,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",e),i&&(s.updateTooltipBounds(i),c.yr(e)?i.hide(0):(this._updateTooltipText(i,e),s.positionTooltip(i,e),e<this.get("start",0)||e>this.get("end",1)?i.hide(0):i.show(0))))}_updateTooltipText(t,e){t.label.set("text",this.getTooltipText(e))}roundAxisPosition(t,e){return t}_handleSeriesRemoved(){}handleCursorShow(){let t=this.get("tooltip");t&&t.show()}handleCursorHide(){let t=this.get("tooltip");t&&t.hide()}processSeriesDataItem(t,e){}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._rangesDirty=!1}coordinateToPosition(t){const e=this.get("renderer");return e.toAxisPosition(t/e.axisLength())}toAxisPosition(t){return this.get("renderer").toAxisPosition(t)}toGlobalPosition(t){return this.get("renderer").toGlobalPosition(t)}fixPosition(t){return this.get("renderer").fixPosition(t)}shouldGap(t,e,i,s){return!1}createAxisRange(t){return this.axisRanges.push(t)}
1_groupSeriesData(t){}getCellWidthPosition(){return.05}}gi.className="Axis",gi.classNames=He.u.classNames.concat([gi.className]);var Wn=y(43058);class fi extends gi{constructor(){super(...arguments),this._dirtyExtremes=!1,this._dirtySelectionExtremes=!1,this._dseHandled=!1,this._deltaMinMax=1,this._baseValue=0,this._minLogAdjusted=1}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){var t;if(super._prepareChildren(),this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&&this._syncDp&&this._syncDp.dispose();let s=this.get("syncWithAxis");s&&(this._syncDp=new Di.ZT([s.onPrivate("selectionMinFinal",()=>{this._dirtySelectionExtremes=!0}),s.onPrivate("selectionMaxFinal",()=>{this._dirtySelectionExtremes=!0})]))}let e=!1;if((this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(e=!0,null===(t=this.ghostLabel)||void 0===t||t.set("text","")),(this._sizeDirty||this._dirtyExtremes||this._valuesDirty||e||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection"))&&(this._getMinMax(),this._dirtyExtremes=!1),this._handleSizeDirty(),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)){const i=this.chart;let s=!1;if(i){const n=this.get("renderer").getPrivate("letter");"Y"==n?i.xAxes.each(a=>{"ValueAxis"!=a.className&&(s=!0)}):"X"==n&&i.yAxes.each(a=>{"ValueAxis"!=a.className&&(s=!0)})}s&&this._getSelectionMinMax(),this._dirtySelectionExtremes=!1}this._groupData(),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("min")||this.isPrivateDirty("selectionMax")||this.isPrivateDirty("selectionMin")||this.isPrivateDirty("max")||this.isPrivateDirty("step")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("logarithmic"))&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges()),this._baseValue=this.baseValue()}_handleSizeDirty(){this._sizeDirty&&!this._dseHandled&&(this._dirtySelectionExtremes=!0,this._dseHandled=!0,(this.getPrivate("selectionMinFinal")!=this.getPrivate("selectionMin")||this.getPrivate("selectionMaxFinal")!=this.getPrivate("selectionMax"))&&(this._dirtySelectionExtremes=!1))}_clearDirty(){super._clearDirty(),this._dseHandled=!1}_groupData(){}_formatText(t){const e=this.get("numberFormat"),i=this.getNumberFormatter();let s="";return s=e?i.format(t,e):i.format(t,void 0,this.getPrivate("stepDecimalPlaces")),s}_prepareAxisItems(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(c.Et(t)&&c.Et(e)){const i=this.get("logarithmic"),s=this.getPrivate("step"),n=this.getPrivate("selectionMin"),a=this.getPrivate("selectionMax")+s;let h=n-s,u=1,v=t;if(i){if(h=this._minLogAdjusted,h<n)for(;h<n;)h+=s;if(v=h,v<=0){let ft=this._minRealLog;c.Et(ft)||(ft=1),v=Math.pow(10,Math.log(ft)*Math.LOG10E),s<1&&(v=c.Et(this._minRealLog)?this._minRealLog:Math.pow(10,-50))}u=Math.log(a-s)*Math.LOG10E-Math.log(v)*Math.LOG10E,u>2&&(h=Math.pow(10,Math.log(v)*Math.LOG10E-50))}const E=this.get("renderer"),M=E.get("minorLabelsEnabled"),O=E.get("minorGridEnabled",M);let I=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E));const $=Math.round(s/I);let G=2;at.LI($/5,10)%1==0&&(G=5),at.LI($/10,10)%1==0&&(G=10);let F=s/G,Q=0,q=0,et=-1/0;const ot=this.get("renderer").gridCount();for(;h<a;){let ft;this.dataItems.length<Q+1?(ft=new He.s(this,void 0,{}),this._dataItems.push(ft),this.processDataItem(ft)):ft=this.dataItems[Q],this._createAssets(ft,[]),this._toggleDataItem(ft,!0),ft.setRaw("value",h);const wt=ft.get("label");wt&&wt.set("text",this._formatText(h)),this._prepareDataItem(ft);let Ot=h;if(i)if(u>
12){const At=Math.max(1,ot),Ft=Math.max(1,Math.ceil(u/At)),Vt=Math.log(v)*Math.LOG10E+(Q+1)*Ft-50;Ot=Math.pow(10,Vt)}else Ot+=s;else Ot+=s;if(O){let At=h+F;for(i&&(u>2&&(F=this._adjustMinMax(h,Ot,10).step),At=h+F);At<Ot-1e-11*s;){let Ft;this.minorDataItems.length<q+1?(Ft=new He.s(this,void 0,{}),this.minorDataItems.push(Ft),this.processDataItem(Ft)):Ft=this.minorDataItems[q],this._createAssets(Ft,["minor"],!0),this._toggleDataItem(Ft,!0),Ft.setRaw("value",At);const Vt=Ft.get("label");Vt&&(M?Vt.set("text",this._formatText(At)):Vt.setPrivate("visible",!1)),this._prepareDataItem(Ft),At+=F,q++}}if(h=Ot,et==h)break;let Et=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E));if(Et<1&&!i){let At=Math.round(Math.abs(Math.log(Math.abs(Et))*Math.LOG10E))+2;h=at.LI(h,At)}Q++,i&&u<=2&&h-s<s&&(h=s),et=h}for(let ft=Q;ft<this.dataItems.length;ft++)this._toggleDataItem(this.dataItems[ft],!1);for(let ft=q;ft<this.minorDataItems.length;ft++)this._toggleDataItem(this.minorDataItems[ft],!1);P.__(this.series,ft=>{ft.inited&&ft._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(t,e){let i=this.get("renderer"),s=t.get("value"),n=t.get("endValue"),a=this.valueToPosition(s),h=a,u=this.valueToPosition(s+this.getPrivate("step"));c.Et(n)&&(h=this.valueToPosition(n),u=h),t.get("isRange")&&null==n&&(u=a);let v=h,E=t.get("labelEndValue");null!=E&&(v=this.valueToPosition(E)),i.updateLabel(t.get("label"),a,v,e);const M=t.get("grid");if(i.updateGrid(M,a,h),M&&(s==this.get("baseValue",0)?(M.addTag("base"),M._applyThemes()):M.hasTag("base")&&(M.removeTag("base"),M._applyThemes())),i.updateTick(t.get("tick"),a,v,e),i.updateFill(t.get("axisFill"),a,u),this._processBullet(t),i.updateBullet(t.get("bullet"),a,h),!t.get("isRange")){const O=this.get("fillRule");O&&O(t)}}_handleRangeChange(){let t=this.positionToValue(this.get("start",0)),e=this.positionToValue(this.get("end",1));const i=this.get("renderer").gridCount();let s=this._adjustMinMax(t,e,i,!0),n=r.w1(s.step);this.setPrivateRaw("stepDecimalPlaces",n),t=at.LI(t,n),e=at.LI(e,n),s=this._adjustMinMax(t,e,i,!0);let a=s.step;t=s.min,e=s.max,(this.getPrivate("selectionMin")!==t||this.getPrivate("selectionMax")!==e||this.getPrivate("step")!==a)&&(this.setPrivateRaw("selectionMin",t),this.setPrivateRaw("selectionMax",e),this.setPrivateRaw("step",a))}positionToValue(t){const e=this.getPrivate("min"),i=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(t*(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)+Math.log(e)*Math.LOG10E)/Math.LOG10E):t*(i-e)+e}valueToPosition(t){const e=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(t<=0){let s=this.get("treatZeroAs");c.Et(s)&&(t=s)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}return(t-e)/(i-e)}valueToFinalPosition(t){const e=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(t<=0){let s=this.get("treatZeroAs");c.Et(s)&&(t=s)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}return(t-e)/(i-e)}getX(t,e,i){const s=this.valueToPosition(t=i+(t-i)*e);return this._settings.renderer.positionToCoordinate(s)}getY(t,e,i){const s=this.valueToPosition(t=i+(t-i)*e);return this._settings.renderer.positionToCoordinate(s)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionX(t,e,i,s){let n=t.get(e);return n=t.get("stackToItemX")?n*s+t.component.getStackedXValueWorking(t,e):this._baseValue+(n-this._baseValue)*s,this.valueToPosition(n)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}getDataItemPositionY(t,e,i,s){let n=t.get(e);return n=t.get("stackToItemY")?n*s+t.component.getStackedYValueWorking(t,e):this._baseValue+(n-this._baseValue)*s,this.valueToPosition(n)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){const t=Math.min(this.getPrivate("minFinal",-1/0),this.getPrivate("selectionMin",-1/0)),e=Math.max(this.getPrivate("maxFinal",1/0),this.getPrivate("selectionMax",1/0));let i=this.get("baseValue",0);return i<t&&(i=t),i>e&&(i=e),i}cellEndValue(t){return t}fixSmallStep(t){return 1+t===1?this.fixSmallStep(t*=2):t}_fixMin(t){return t}_fixMax(t){return t}_calculateTotals(){if(this.get("calculateTotals")){let t=this.series[0];if(t){let e=t.startIndex();if(t.dataItems.length>0){e>0&&e--;let s,n,i=t.endIndex();i<t.dataItems.length&&i++,t.get("yAxis")==this?(s="valueY",n="vcy"):t.get("xAxis")==this&&(s="valueX",n="vcx");let a=s+"Working";if(s){let h=this.series.length,u=[],v=[];for(let $=0;$<h;$++){let G=this.series[$];
1G.get("excludeFromTotal")||(u.push(G),v.push(G.get(n)))}let E=u.length,M=s+"Total",O=s+"Sum",I=s+"TotalPercent";for(let $=e;$<i;$++){let G=0,F=0;for(let Q=0;Q<E;Q++){let q=u[Q].dataItems[$];if(q){let et=q.get(a)*v[Q];c.yr(et)||(G+=et,F+=Math.abs(et))}}for(let Q=0;Q<E;Q++){let q=u[Q].dataItems[$];if(q){let et=q.get(a)*v[Q];c.yr(et)||(q.set(M,F),q.set(O,G),q.set(I,0==F?0:et/F*100))}}}}}}}}_getSelectionMinMax(){const t=this.getPrivate("minFinal"),e=this.getPrivate("maxFinal"),i=this.get("min"),s=this.get("max");let n=this.get("extraMin",0),a=this.get("extraMax",0);this.get("logarithmic")&&(null==this.get("extraMin")&&(n=.1),null==this.get("extraMax")&&(a=.2));const h=this.get("renderer").gridCount(),u=this.get("strictMinMaxSelection");let v=this.get("strictMinMax");if(c.Et(t)&&c.Et(e)){let E=e,M=t;if(P.__(this.series,ot=>{if(!ot.get("ignoreMinMax")){let ft,wt;const Ot=ot.getPrivate("outOfSelection");if(ot.get("xAxis")===this){if(!Ot){let Et=ot.getPrivate("minX"),At=ot.getPrivate("maxX");(0!=ot.startIndex()||ot.endIndex()!=ot.dataItems.length)&&(Et=void 0,At=void 0),ft=ot.getPrivate("selectionMinX",Et),wt=ot.getPrivate("selectionMaxX",At)}}else if(ot.get("yAxis")===this&&!Ot){let Et=ot.getPrivate("minY"),At=ot.getPrivate("maxY");(0!=ot.startIndex()||ot.endIndex()!=ot.dataItems.length)&&(Et=void 0,At=void 0),ft=ot.getPrivate("selectionMinY",Et),wt=ot.getPrivate("selectionMaxY",At)}!ot.isHidden()&&!ot.isShowing()&&(c.Et(ft)&&(E=Math.min(E,ft)),c.Et(wt)&&(M=Math.max(M,wt)))}}),this.axisRanges.each(ot=>{if(ot.get("affectsMinMax")){let ft=ot.get("value");null!=ft&&(E=Math.min(E,ft),M=Math.max(M,ft)),ft=ot.get("endValue"),null!=ft&&(E=Math.min(E,ft),M=Math.max(M,ft))}}),E>M&&([E,M]=[M,E]),c.Et(i)?E=v?i:t:v&&c.Et(this._minReal)&&(E=this._minReal),c.Et(s)?M=v?s:e:v&&c.Et(this._maxReal)&&(M=this._maxReal),E===M){let ot=E;if(E-=this._deltaMinMax,M+=this._deltaMinMax,E<t){let wt=ot-t;0==wt&&(wt=this._deltaMinMax),E=ot-wt,M=ot+wt,v=!0}let ft=this._adjustMinMax(E,M,h,v);E=ft.min,M=ft.max}let O=E,I=M,$=M-E;E-=$*n,M+=$*a;let G=this._adjustMinMax(E,M,h);E=G.min,M=G.max,E=at.s_(E,t,e),M=at.s_(M,t,e),G=this._adjustMinMax(E,M,h,!0),v||(E=G.min,M=G.max);const F=this.get("syncWithAxis");if(F&&(G=this._syncAxes(E,M,G.step,F.getPrivate("selectionMinFinal",F.getPrivate("minFinal",0)),F.getPrivate("selectionMaxFinal",F.getPrivate("maxFinal",1)),F.getPrivate("selectionStepFinal",F.getPrivate("step",1))),E=G.min,M=G.max),v&&!F&&(c.Et(i)&&(E=Math.max(E,i)),c.Et(s)&&(M=Math.min(M,s))),u&&!F&&(E=O-(I-O)*n,M=I+(I-O)*a),v&&!F){E=c.Et(i)?i:O,M=c.Et(s)?s:I,M-E<=1e-8&&(E-=this._deltaMinMax,M+=this._deltaMinMax);let ot=M-E;E-=ot*n,M+=ot*a}this.get("logarithmic")&&(E<=0&&(E=O*(1-Math.min(n,.99))),E<t&&(E=t),M>e&&(M=e));let Q=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2),q=at.LI(this.valueToFinalPosition(E),Q),et=at.LI(this.valueToFinalPosition(M),Q);this.setPrivateRaw("selectionMinFinal",E),this.setPrivateRaw("selectionMaxFinal",M),this.setPrivateRaw("selectionStepFinal",G.step),this.zoom(q,et)}}_getMinMax(){let t=this.get("min"),e=this.get("max"),i=1/0,s=-1/0,n=this.get("extraMin",0),a=this.get("extraMax",0);this.get("logarithmic")&&(this.get("strictMinMax")||(null==this.get("extraMin")&&(n=.1),null==this.get("extraMax")&&(a=.2)));let h=1/0;if(P.__(this.series,et=>{if(!et.get("ignoreMinMax")){let ot,ft;if(et.get("xAxis")===this?(ot=et.getPrivate("minX"),ft=et.getPrivate("maxX")):et.get("yAxis")===this&&(ot=et.getPrivate("minY"),ft=et.getPrivate("maxY")),c.Et(ot)&&c.Et(ft)){i=Math.min(i,ot),s=Math.max(s,ft);let wt=ft-ot;wt<=0&&(wt=Math.abs(ft/100)),wt<h&&(h=wt)}}}),this.axisRanges.each(et=>{if(et.get("affectsMinMax")){let ot=et.get("value");null!=ot&&(i=Math.min(i,ot),s=Math.max(s,ot)),ot=et.get("endValue"),null!=ot&&(i=Math.min(i,ot),s=Math.max(s,ot))}}),this.get("logarithmic")){let et=this.get("treatZeroAs");c.Et(et)&&i<=0&&(i=et),i<=0&&new Error("Logarithmic value axis can not have values <= 0.")}if(0===i&&0===s&&(s=.9,i=-.9),c.Et(t)&&(i=t),c.Et(e)&&(s=e),i===1/0||s===-1/0)return this.setPrivate("minFinal",void 0),void this.setPrivate("maxFinal",void 0);i>s&&([i,s]=[s,i]);const u=i,v=s;let E=this.adapters.fold("min",i),M=this.adapters.fold("max",s);this._minRealLog=i,c.Et(E)&&(i=E),c.Et(M)&&(s=M),i=this._fixMin(i),s=this._fixMax(s),s-i<=1/Math.pow(10,15)&&(s-i!==0?this._deltaMinMax=(s-i)/2:this._getDelta(s),i-=this._deltaMinMax,s+=this._deltaMinMax),i-=(s-i)*n,s+=(s-i)*a,this.get("logarithmic")&&(i<0&&u>=0&&(i=0),s>0&&v<=0&&(s=0)),this._minReal=i,this._maxReal=s;let O=this.get("strictMinMax"),I=this.get("strictMinMaxSelection",!1);I&&(O=I);let $=O;c.Et(e)&&($=!0);let G=this.get("renderer").gridCount(),F=this._adjustMinMax(i,s,G,$);if(i=F.min,s=F.max,F=this._adjustMinMax(i,s,G,!0),i=F.min,s=F.max,O){i=c.Et(t)?t:this._minReal,s=c.Et(e)?e:this._maxReal,s-i<=1e-8&&(i-=this._deltaMinMax,s+=this._deltaMinMax);let et=s-i;i-=et*n,s+=et*a}E=this.adapters.fold("min",i),M=this.adapters.fold("max",s),c.Et(E)&&(i=E),c.Et(M)&&(s=M),h==1/0&&(h=s-i);let Q=Math.round(Math.abs(Math.log(Math.abs(s-i))*Math.LOG10E))+5;i=at.LI(i,Q),s=at.LI(s,Q);const q=this.get("syncWithAxis");if(q&&(F=this._syncAxes(i,s,F.step,q.getPrivate("minFinal",q.getPrivate("min",0)),q.getPrivate("maxFinal",q.getPrivate("max",1)),q.getPrivate("step",1)),i=F.min,s=F.max),this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((s-i)/h
1*this.get("maxZoomFactor",100)))),this._fixZoomFactor(),this.get("logarithmic")&&(this._minLogAdjusted=i,i=this._minReal,s=this._maxReal,i<=0&&(i=u*(1-Math.min(n,.99)))),c.Et(i)&&c.Et(s)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==s)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",s),this._saveMinMax(i,s);const et=this.get("interpolationDuration",0),ot=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:et,easing:ot}),this.animatePrivate({key:"max",to:s,duration:et,easing:ot})}}_fixZoomFactor(){}_getDelta(t){let e=Math.log(Math.abs(t))*Math.LOG10E,i=Math.pow(10,Math.floor(e));i/=10,this._deltaMinMax=i}_saveMinMax(t,e){}_adjustMinMax(t,e,i,s){i<=1&&(i=1),i=Math.round(i);let n=t,a=e,h=e-t;0===h&&(h=Math.abs(e));let u=Math.log(Math.abs(h))*Math.LOG10E,v=Math.pow(10,Math.floor(u));v/=10;let E=v;s&&(E=0),s?(t=Math.floor(t/v)*v,e=Math.ceil(e/v)*v):(t=Math.ceil(t/v)*v-E,e=Math.floor(e/v)*v+E),t<0&&n>=0&&(t=0),e>0&&a<=0&&(e=0),u=Math.log(Math.abs(h))*Math.LOG10E,v=Math.pow(10,Math.floor(u)),v/=100;let M=Math.ceil(h/i/v)*v,O=Math.pow(10,Math.floor(Math.log(Math.abs(M))*Math.LOG10E)),I=Math.ceil(M/O);I>5?I=10:I<=5&&I>2&&(I=5),M=Math.ceil(M/(O*I))*O*I;let $=this.get("maxPrecision");if(c.Et($)){let q=at.mk(M,$);$<Number.MAX_VALUE&&M!==q&&(M=q,0==M&&(M=1))}let G=0;O<1&&(G=Math.round(Math.abs(Math.log(Math.abs(O))*Math.LOG10E))+1,M=at.LI(M,G));let Q,F=Math.floor(t/M);return t=at.LI(M*F,G),Q=s?Math.floor(e/M):Math.ceil(e/M),Q===F&&Q++,(e=at.LI(M*Q,G))<a&&(e+=M),t>n&&(t-=M),M=this.fixSmallStep(M),{min:t,max:e,step:M}}getTooltipText(t,e){const i=this.get("tooltipNumberFormat",this.get("numberFormat")),s=this.getNumberFormatter(),n=this.get("extraTooltipPrecision",0),a=this.getPrivate("stepDecimalPlaces",0)+n,h=at.LI(this.positionToValue(t),a);return i?s.format(h,i):s.format(h,void 0,a)}getSeriesItem(t,e){let n,a,i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.positionToValue(e);if(P.__(t.dataItems,(h,u)=>{const v=Math.abs(h.get(i)-s);(void 0===n||v<a)&&(n=u,a=v)}),null!=n)return t.dataItems[n]}zoomToValues(t,e,i){const s=this.getPrivate("minFinal",this.getPrivate("min",0)),n=this.getPrivate("maxFinal",this.getPrivate("max",1));null!=this.getPrivate("min")&&null!=this.getPrivate("max")&&this.zoom((t-s)/(n-s),(e-s)/(n-s),i)}_syncAxes(t,e,i,s,n,a){if(this.get("syncWithAxis")){let u=Math.round((n-s)/a);if(u>0)if(this.get("syncZeros")&&s<=0&&n>=0){let v=Math.round((0-s)/a),E=u-v,M=0;v>0&&t<0&&(M=Math.abs(t)/v),E>0&&e>0&&(M=Math.max(M,e/E)),0==M&&(M=(e-t)/u),t=-(i=this._niceStep(M))*v,e=i*E}else{i=this._niceStep((e-t)/u);let E=Math.floor(t/i)*i,M=E+i*u;M<e&&(E=Math.ceil(e/i)*i-i*u,M=E+i*u),t>=0&&E<0&&(E=0,M=i*u),e<=0&&M>0&&(M=0,E=-i*u),t=E,e=M}}return{min:t,max:e,step:i}}_niceStep(t){let e=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),i=t/e;i=i<=1?1:i<=2?2:i<=5?5:10;let s=i*e,n=this.get("maxPrecision");if(c.Et(n)){let a=at.mk(s,n);n<Number.MAX_VALUE&&s!==a&&(s=a,0==s&&(s=1))}return s}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return c.Et(t)&&c.Et(e)?this.getPrivate("step",1)/(t-e):.05}nextPosition(t){null==t&&(t=1),"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);let e=this.positionToValue(this.getPrivate("tooltipPosition",0));return e+=this.getPrivate("step",1)*t,e=at.s_(e,this.getPrivate("selectionMin",0),this.getPrivate("selectionMax",1)),this.toGlobalPosition(this.valueToPosition(e))}}fi.className="ValueAxis",fi.classNames=gi.classNames.concat([fi.className]);class _i extends gi{constructor(){super(...arguments),this._frequency=1,this._itemMap={}}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["axis"]),this.fields.push("category","id","cellSize"),this.setPrivateRaw("name","category"),this.addTag("category"),super._afterNew()}_afterDataChange(){super._afterDataChange();const t=this.dataItems.length;t>0&&this.setPrivateRaw("maxZoomFactor",t),this.setPrivateRaw("startIndex",Math.min(this.getPrivate("startIndex",0),t)),this.setPrivateRaw("endIndex",Math.min(this.getPrivate("endIndex",t),1))}_prepareChildren(){super._prepareChildren();const t=this.dataItems.length;let e=0;
vendor: 4,984 bytes, line 1
1this._valuesDirty&&(this._itemMap={},P.__(this.dataItems,a=>{a.setRaw("index",e),this._itemMap[a.get("category")]=a,e++}),this.setPrivateRaw("maxZoomFactor",t));let i=this.get("start",0),s=this.get("end",1),n=this._getIndices(i,s);this.setPrivateRaw("startIndex",n.startIndex),this.setPrivateRaw("endIndex",n.endIndex),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("endIndex")||this.isPrivateDirty("startIndex")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&this.dataItems.length>0&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges())}adjustZoom(){const t=this.dataItems.length;if(t>1){let e=this.get("maxZoomCount",this.dataItems.length),i=this.get("minZoomCount",1),s=0,n=this.getPrivate("startIndex",0),a=this.getPrivate("endIndex",0);const h=this._sAnimation,u=this._eAnimation;let v=this.get("start",0),E=!1;h&&!h.stopped&&(v=Number(h.to),E=!0);let M=this.get("end",1);if(u&&!u.stopped&&(M=Number(u.to),E=!0),E){const O=this._getIndices(v,M);n=O.startIndex,a=O.endIndex}for(let O=n;O<a;O++)s+=this.dataItems[O].get("finalCellSize",1);if(s<=i){let O=0;for(let I=n;I<t&&(O+=this.dataItems[I].get("finalCellSize",1),a=I+1,!(O>=i));I++);if(O<i)for(let I=n-1;I>=0&&(O+=this.dataItems[I].get("finalCellSize",1),n=I,!(O>=i));I--);this.zoomToIndexes(n,a)}else if(s>=e){let O=s;for(let I=a-1;I>=n;I--)if(O-=this.dataItems[I].get("finalCellSize",1),O<=e){a=I+1;break}this.zoomToIndexes(n,a)}}}_handleRangeChange(){P.__(this.series,t=>{let e=this.dataItems[this.startIndex()].get("category"),i=this.dataItems[this.endIndex()-1].get("category"),s=t.get("baseAxis"),n=t.get("xAxis"),a=t.get("yAxis");if(n instanceof _i&&a instanceof _i)t._markDirtyAxes();else if(s===this){let h,u,v=a;if(n===s?(t.get("categoryXField")&&(h="categoryX"),t.get("openCategoryXField")&&(u="openCategoryX")):a===s&&(t.get("categoryYField")&&(h="categoryY"),t.get("openCategoryYField")&&(u="openCategoryY"),v=n),v instanceof fi&&(h||u)){let E,M,O=function(F,Q,q,et,ot,ft){let wt,Ot=Q.categoryToIndex(ot);for(;!wt&&Ot>=0&&Ot<Q.dataItems.length;){let Et=Q.dataItems[Ot].get("category");if("previous"==ft)for(let At=F.dataItems.length-1;At>=0;At--){let Ft=F.dataItems[At];if(q&&Ft.get(q)===Et){wt=Ft;break}if(et&&Ft.get(et)===Et){wt=Ft;break}}else for(let At=0,Ft=F.dataItems.length;At<Ft;At++){let Vt=F.dataItems[At];if(q&&Vt.get(q)===Et){wt=Vt;break}if(et&&Vt.get(et)===Et){wt=Vt;break}}wt||(Ot+="previous"===ft?-1:1)}return wt};E=O(t,this,h,u,e,"next"),M=O(t,this,h,u,i,"previous");let I=0,$=t.dataItems.length;E&&(I=t.dataItems.indexOf(E)),M&&($=t.dataItems.indexOf(M)+1),t.setPrivate("startIndex",I),t.setPrivate("endIndex",$);let G=!1;for(let F=I;F<$;F++){const Q=t.dataItems[F];if(P.__(t.__valueXShowFields,q=>{null!=Q.get(q)&&(G=!0)}),P.__(t.__valueYShowFields,q=>{null!=Q.get(q)&&(G=!0)}),G)break}t.setPrivate("outOfSelection",!G)}t._markDirtyAxes()}})}_prepareAxisItems(){var t;const e=this.get("renderer"),i=this.dataItems.length;let s=this.startIndex();s>0&&s--;let n=this.endIndex();n<i&&n++;const a=e.get("minorLabelsEnabled"),h=e.get("minorGridEnabled",a);let u=e.axisLength()/Math.max(e.get("minGridDistance"),1),v=Math.max(1,Math.min(i,Math.ceil((n-s)/u)));s=Math.floor(s/v)*v,this._frequency=v;for(let M=0;M<i;M++)this._toggleDataItem(this.dataItems[M],!1);let E=this.dataItems[s].get("index",0);for(let M=s;M<n;M+=v){let O=this.dataItems[M];this._createAssets(O,[]),this._toggleDataItem(O,!0);let I=v;h&&(I=1),this._prepareDataItem(O,E,I),E++}if(e.get("minorGridEnabled"))for(let M=s;M<n;M++){let O=this.dataItems[M];M%v!=0&&(this._createAssets(O,["minor"],!0),this._toggleDataItem(O,!0),this._prepareDataItem(O,0,1),a||null===(t=O.get("label"))||void 0===t||t.setPrivate("visible",!1))}this._updateGhost()}_prepareDataItem(t,e,i){let s=this.get("renderer"),n=t.get("categoryLocation",0),a=t.get("endCategoryLocation",1),h=t.get("index");c.Et(h)||(h=this.categoryToIndex(t.get("category")));let E,u=this.indexToPosition(h,n),v=t.get("endCategory");v?(E=this.categoryToIndex(v),c.Et(E)||(E=h)):E=h;let O,I,M=this.indexToPosition(E,a);if(t.get("isRange")){if(O=E,!c.Et(h))return void this._toggleDataItem(t,!1)}else O=h+this._frequency-1;I=this.indexToPosition(O,a),s.updateLabel(t.get("label"),u,M,i),s.updateGrid(t.get("grid"),u,M),s.updateTick(t.get("tick"),u,M,i),s.updateFill(t.get("axisFill"),u,I),this._processBullet(t),s.updateBullet(t.get("bullet"),u,M);const $=this.get("fillRule");$&&$(t,e)}startIndex(){let t=this.dataItems.length;return Math.min(Math.max(this.getPrivate("startIndex",0),0),t-1)}endIndex(){let t=this.dataItems.length;return Math.max(1,Math.min(this.getPrivate("endIndex",t),t))}baseValue(){}basePosition(){return 0}getX(t){let e=this._itemMap[t];return e?this._settings.renderer.positionToCoordinate(this.indexToPosition(e.get("index",0))):NaN}getY(t){let e=this._itemMap[t];return e?this._settings.renderer.positionToCoordinate(this.indexToPosition(e.get("index",0))):NaN}
1getDataItemPositionX(t,e,i,s){const n=t.get(e),a=this._itemMap[n];return a?this.indexToPosition(a.get("index",0),i):NaN}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionY(t,e,i,s){const n=t.get(e),a=this._itemMap[n];return a?this.indexToPosition(a.get("index",0),i):NaN}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}indexToPosition(t,e,i){let s=this.dataItems.length,n=0;if(0==s||(t>=s&&(t=s-1,e=1),c.Et(e)||(e=.5),!c.Et(t)))return 0;let a=this.get("startLocation",0),h=this.get("endLocation",1);if(this.get("cellSizeField")){let u=i?"finalCellSize":"cellSize";const v=this.dataItems;let E=0;P.__(this.dataItems,I=>{E+=I.get(u,1)}),E-=a*v[0].get(u,1),E-=(1-h)*v[v.length-1].get(u,1);let M=0;for(let I=0;I<t;I++)M+=v[I].get(u,1);n=(M+e*v[t].get(u,1)-a*v[0].get(u,1))/E}else s-=a,s-=1-h,n=(t+e-a)/s;if(!i){let u=this.dataItems[t];u&&(n+=u.get("deltaPosition",0))}return n}categoryToPosition(t){let e=this._itemMap[t];return e?this.indexToPosition(e.get("index")):NaN}categoryToIndex(t){let e=this._itemMap[t];return e?e.get("index"):NaN}dataItemToPosition(t){return this.indexToPosition(t.get("index"))}roundAxisPosition(t,e){return this.indexToPosition(this.axisPositionToIndex(t+=(.5-e)/this.dataItems.length),e)}axisPositionToIndex(t){let e=this.dataItems.length;if(0===e)return 0;if(this.get("cellSizeField")){let i=0,s=[];P.__(this.dataItems,v=>{const E=v.get("cellSize",1);s.push(E),i+=E});let n=this.get("startLocation",0),a=this.get("endLocation",1);i-=n,i-=1-a;let h=t*i+n,u=0;for(let v=0;v<e;v++){const E=s[v];if(h<u+E)return v;u+=E}return e-1}return at.s_(Math.floor(t*e),0,e-1)}getTooltipText(t,e){const i=this.dataItems[this.axisPositionToIndex(t)];if(i){const s=i.get("label");if(s)return(0,Wn.Iy)(s,this.get("tooltipText",""))}}_updateTooltipText(t,e){t._setDataItem(this.dataItems[this.axisPositionToIndex(e)]),t.label.text.markDirtyText()}getSeriesItem(t,e){if(this.dataItems.length>0){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.axisPositionToIndex(e),n=t.dataItems[s],a=this.dataItems[s],h=a.get("category");if(n&&a&&n.get(i)===h)return n;for(let u=0,v=t.dataItems.length;u<v;u++){let E=t.dataItems[u];if(E.get(i)===h)return E}}}_getIndices(t,e){let i=this.dataItems.length,s=0,n=i,a="cellSize";if(this.get("cellSizeField")){let h=0;const u=this.dataItems;if(0==u.length)return{startIndex:0,endIndex:0};P.__(u,E=>{h+=E.get(a,1)}),h-=this.get("startLocation",0)*u[0].get(a,1),h-=(1-this.get("endLocation",1))*u[u.length-1].get(a,1);let v=0;for(let E=0;E<i;E++)if(v+=this.dataItems[E].get(a,1),Math.round(v)>Math.round(t*h)){s=E;break}for(let E=s+1;E<i;E++)if(v+=this.dataItems[E].get(a,1),Math.round(v)>=Math.round(e*h)){n=E+1;break}s=Math.max(s,0),n=Math.min(n,i)}else s=Math.max(Math.round(this.get("start",0)*i),0),n=Math.min(Math.round(this.get("end",1)*i),i);return{startIndex:s,endIndex:n}}zoomToIndexes(t,e,i){let s=this.dataItems.length;this.get("cellSizeField")?(t=Math.min(Math.max(t,0),s),e=Math.max(Math.min(e,s),1),this.setPrivateRaw("startIndex",t),this.setPrivateRaw("endIndex",e),this.zoom(this.indexToPosition(t,0,!0),this.indexToPosition(e,0,!0),i)):this.zoom(t/s,e/s,i)}zoomToCategories(t,e,i){this.zoomToIndexes(this.categoryToIndex(t),this.categoryToIndex(e)+1,i)}getCellWidthPosition(){return this._frequency/this.dataItems.length/(this.get("end",1)-this.get("start",0))}nextPosition(t){null==t&&(t=1),"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);const e=this.getPrivate("tooltipPosition",0),i=at.s_(this.axisPositionToIndex(e)+t,0,this.dataItems.length-1);return this.toGlobalPosition(this.indexToPosition(i))}}_i.className="CategoryAxis",_i.classNames=gi.classNames.concat([_i.className]);class ms extends fi{constructor(){super(...arguments),this._dataGrouped=!1,this._seriesDataGrouped=!1,this._groupingCalculated=!1,this._intervalDuration=1,this._baseDuration=1,this._intervalMax={},this._intervalMin={}}_afterNew(){this._settings.themeTags=r.kE(this._settings.themeTags,["axis"]),super._afterNew(),this.addTag("date"),this._setBaseInterval(this.get("baseInterval")),this.on("baseInterval",()=>{this._setBaseInterval(this.get("baseInterval"))})}_setBaseInterval(t){this.setPrivateRaw("baseInterval",t),this._baseDuration=ae.SJ(t)}
1_fixZoomFactor(){const t=this.get("maxZoomFactor");this.setPrivateRaw("maxZoomFactor",null!=t&&t!=1/0?t:Math.round((this.getPrivate("max",0)-this.getPrivate("min",0))/this.baseMainDuration()))}_groupData(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(c.Et(t)&&c.Et(e)){this._fixZoomFactor();const i=this.getPrivate("groupInterval");if(this._setBaseInterval(i||this.get("baseInterval")),this.isDirty("groupInterval")){let s=this.get("groupInterval");s&&(this.setRaw("groupIntervals",[s]),this._handleRangeChange())}if(this.isDirty("groupData")&&!this._dataGrouped){if(this.get("groupData"))P.__(this.series,s=>{this._groupSeriesData(s)}),this._handleRangeChange();else{let s=this.get("baseInterval"),n=s.timeUnit+s.count;P.__(this.series,a=>{a.setDataSet(n),a.resetGrouping()}),this._setBaseInterval(s),this.setPrivateRaw("groupInterval",void 0),this.markDirtyExtremes()}this._dataGrouped=!0}}}_groupSeriesData(t){if(this.get("groupData")&&!t.get("groupDataDisabled")){this._dataGrouped=!0,this._seriesDataGrouped=!0;let e=[],i=this.baseMainDuration(),s=this.get("groupIntervals");P.__(s,I=>{ae.SJ(I)>i&&e.push(I)}),t._dataSets={};const n=this.getPrivate("name")+this.get("renderer").getPrivate("letter");let a;const h=t.get("baseAxis");t.get("xAxis")===h?a=t._valueYFields:t.get("yAxis")===h&&(a=t._valueXFields);let u=t._mainDataItems,v=this.get("baseInterval");t._dataSets[v.timeUnit+v.count]=u;const M=t.get("groupDataCallback");let O=t.get("groupDataWithOriginals",!1);M&&(O=!0),P.__(e,I=>{let $=-1/0,G=I.timeUnit+I.count;t._dataSets[G]=[];let F,Q={},q={},et={},ot={};P.__(a,At=>{Q[At]=0,q[At]=0,et[At]=t.get(At+"Grouped"),ot[At]=At+"Working"});let Ot,Et,ft=ae.Ds(I.timeUnit);u[0]&&(Ot=u[0].get(n)),P.__(u,At=>{let te,Ft=At.get(n),Vt=ae.d_(Ft,I.timeUnit,I.count,this._root,Ot);if($<Vt-ft/24)te=l.C(At.dataContext),F=new He.s(t,te,t._makeDataItem(te)),F.setRaw(n,Vt),t._dataSets[G].push(F),P.__(a,Zt=>{let ie=At.get(Zt);c.Et(ie)?(F.setRaw(Zt,ie),F.setRaw(ot[Zt],ie),q[Zt]=1,Q[Zt]=ie):(Q[Zt]=0,q[Zt]=0)}),O&&F.set("originals",[At]),M&&Et&&M(Et,I),Et=F;else{let Zt=!1;if(P.__(a,ie=>{let Lt=et[ie],zt=At.get(ie);if(null!=zt){Zt=!0;let Kt=F.get(ie);switch(Lt){case"close":F.setRaw(ie,zt);break;case"sum":F.setRaw(ie,Kt+zt);break;case"open":break;case"low":zt<Kt&&F.setRaw(ie,zt);break;case"high":zt>Kt&&F.setRaw(ie,zt);break;case"average":q[ie]++,Q[ie]+=zt,F.setRaw(ie,Q[ie]/q[ie]);break;case"extreme":Math.abs(zt)>Math.abs(Kt)&&F.setRaw(ie,zt)}F.setRaw(ot[ie],F.get(ie))}}),Zt){let ie=l.C(At.dataContext);ie[n]=Vt,F.dataContext=ie}O&&F.get("originals").push(At)}$=Vt}),M&&Et&&M(Et,I)}),t._dataSetId&&t.setDataSet(t._dataSetId),this.markDirtySize(),this._seriesAdded&&this._root.events.once("frameended",()=>{this.markDirtySize()})}}_clearDirty(){super._clearDirty(),this._groupingCalculated=!1,this._dataGrouped=!1}getGroupInterval(t){let e=this.get("baseInterval"),i=ae.T9(0,t,this.get("groupCount",1/0),this.get("groupIntervals"));return ae.SJ(i)<ae.SJ(e)&&(i=Object.assign({},e)),i}getIntervalMax(t){return this._intervalMax[t.timeUnit+t.count]}getIntervalMin(t){return this._intervalMin[t.timeUnit+t.count]}_handleRangeChange(){super._handleRangeChange();let t=Math.round(this.getPrivate("selectionMin")),e=Math.round(this.getPrivate("selectionMax"));if(c.Et(t)&&c.Et(e)){if(0==this.get("endLocation")&&(e+=1),this.get("groupData")&&!this._groupingCalculated){this._groupingCalculated=!0;let i=this.get("groupInterval"),s=this.getPrivate("groupInterval"),n=e-t+(this.get("startLocation",0)+(1-this.get("endLocation",1))*this._baseDuration);if(s){let a=ae.SJ(s);n=Math.ceil(n/a)*a}if(i||(i=this.getGroupInterval(n)),i&&(!s||s.timeUnit!==i.timeUnit||s.count!==i.count||this._seriesDataGrouped)){this._seriesDataGrouped=!1,this.setPrivateRaw("groupInterval",i),this._setBaseInterval(i);let a=i.timeUnit+i.count;P.__(this.series,h=>{h.get("baseAxis")===this&&h.setDataSet(a)}),this.markDirtyExtremes(),this._root.events.once("frameended",()=>{this._root.events.once("frameended",()=>{const h="groupintervalchanged";this.events.isEnabled(h)&&this.events.dispatch(h,{type:h,target:this})})})}}P.__(this.series,i=>{if(i.get("baseAxis")===this){let s=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),a=P.wo(i.dataItems,F=>Oi.UD(F.get(s),t)).index;a>0&&(a-=1),e+=this._baseDuration*(1-this.get("endLocation",1));let u=P.IU(i.dataItems,F=>Oi.UD(F.get(s),e)).index,v=u;v>1&&v--;const E=i.dataItems[a],M=i.dataItems[v];let O,I;E&&(I=E.get(s)),M&&(O=M.get(s));let $=!1;null!=O&&null!=I&&(O<t||I>e)&&($=!0),i.setPrivate("outOfSelection",$),i.setPrivate("startIndex",a);
1let G=i._adjustStartIndex(a);i.getPrivate("adjustedStartIndex")!==G&&(i.setPrivate("adjustedStartIndex",G),this.root.events.once("frameended",()=>{i._markDirtyPrivateKey("adjustedStartIndex")})),i.setPrivate("endIndex",u)}})}}_adjustMinMax(t,e,i,s){return{min:t,max:e,step:(e-t)/i}}intervalDuration(){return this._intervalDuration}_saveMinMax(t,e){let i=this.getPrivate("groupInterval");i||(i=this.get("baseInterval"));let s=i.timeUnit+i.count;this._intervalMin[s]=t,this._intervalMax[s]=e}_getM(t){return"day"==t||"month"==t||"year"==t?1.05:1.01}_getMinorInterval(t){var e;let i,s=t.count,n=t.timeUnit;return s>1&&(10==s||15==s?s=5:12==s?s=2:6==s?s=1:30==s?s=10:s<10&&(s=1),i={timeUnit:n,count:s}),"week"==n&&(i="week"!=(null===(e=this.getPrivate("baseInterval"))||void 0===e?void 0:e.timeUnit)?{timeUnit:"day",count:1}:{timeUnit:"week",count:1}),"year"==n&&1==s&&this.getPrivate("selectionMax",0)-this.getPrivate("selectionMin",0)<1264896e5&&(i={timeUnit:"month",count:1}),i}_prepareAxisItems(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(c.Et(t)&&c.Et(e)){const i=this._root,s=Math.round(this.getPrivate("selectionMin")),n=Math.round(this.getPrivate("selectionMax")),a=this.get("renderer"),h=this.getPrivate("baseInterval");let u=s,v=0;const E=this.get("gridIntervals");let M=ae.T9(0,n-s,a.gridCount(),E);ae.SJ(M)<this._baseDuration&&(M=Object.assign({},h));const O=ae.SJ(M);this._intervalDuration=O;const I=ae.qG(M.timeUnit),$=i.utc,G=i.timezone;u=ae.d_(s-O,M.timeUnit,M.count,i,t);let Q,F=u-O;const q=this.get("dateFormats");this.setPrivateRaw("gridInterval",M);const et=a.get("minorLabelsEnabled"),ot=a.get("minorGridEnabled",et);let ft,wt=0;ot&&(ft=this._getMinorInterval(M),wt=ae.SJ(ft));let Ot=0;for(;u<n+O;){let Et;this.dataItems.length<v+1?(Et=new He.s(this,void 0,{}),this._dataItems.push(Et),this.processDataItem(Et)):Et=this.dataItems[v],this._createAssets(Et,[]),this._toggleDataItem(Et,!0),Et.setRaw("value",u),Et.setRaw("labelEndValue",void 0);let At=u+ae.Ds(M.timeUnit,M.count*this._getM(M.timeUnit));At=ae.d_(At,M.timeUnit,1,i),Et.setRaw("endValue",At);let Ft=new Date(u);Q=q[M.timeUnit],I&&this.get("markUnitChange")&&c.Et(F)&&"year"!=M.timeUnit&&ae.$_(u,F,I,$,G)&&(Q=this.get("periodChangeDateFormats")[M.timeUnit]);const Vt=Et.get("label");Vt&&Vt.set("text",i.dateFormatter.format(Ft,Q));let te=M.count;if(Vt?.set("location","week"==M.timeUnit?this.get("weekLabelLocation",0):a.labels.template.get("location")),ot){te=1;let Zt=M.timeUnit;"week"==Zt&&this.get("skipFirstMinor")&&(Zt="day");let ie=u+ae.Ds(Zt,this._getM(Zt));ie=ae.d_(ie,Zt,1,i),Et.setRaw("labelEndValue",ie)}if(this._prepareDataItem(Et,te),F=u,u=At,ft){const Zt=ft.timeUnit,ie=ft.count,Lt=this._getM(Zt);this.get("skipFirstMinor")||(F-=wt*Lt);let Kt,zt=ae.d_(F+wt*Lt,Zt,ie,i,F),Yt=this.get("minorDateFormats",this.get("dateFormats"));for(;zt<u-.01*wt;){let Nt;this.minorDataItems.length<Ot+1?(Nt=new He.s(this,void 0,{}),this.minorDataItems.push(Nt),this.processDataItem(Nt)):Nt=this.minorDataItems[Ot],this._createAssets(Nt,["minor"],!0),this._toggleDataItem(Nt,!0),Nt.setRaw("value",zt);let Wt=zt+ae.Ds(Zt,ie*Lt);Wt=ae.d_(Wt,Zt,1,i),Nt.setRaw("endValue",Wt);let pe=new Date(zt);Q=Yt[Zt];const Ne=Nt.get("label");if(Ne&&(et?Ne.set("text",i.dateFormatter.format(pe,Q)):Ne.setPrivate("visible",!1)),this._prepareDataItem(Nt,1),zt==Kt)break;if(!Nt.get("isRange")){const Re=this.get("fillRule");Re&&Re(Nt)}Kt=zt,zt=Wt,Ot++}}if(u==F)break;v++}for(let Et=v;Et<this.dataItems.length;Et++)this._toggleDataItem(this.dataItems[Et],!1);for(let Et=Ot;Et<this.minorDataItems.length;Et++)this._toggleDataItem(this.minorDataItems[Et],!1);P.__(this.series,Et=>{Et.inited&&Et._markDirtyAxes()})}this._updateGhost()}_updateFinals(t,e){this.setPrivateRaw("selectionMinFinal",this.positionToValue(t)),this.setPrivateRaw("selectionMaxFinal",this.positionToValue(e))}_getDelta(){this._deltaMinMax=this._baseDuration/2}_fixMin(t){const e=this.getPrivate("baseInterval"),i=e.timeUnit;let s=ae.d_(t,i,e.count,this._root),n=s+ae.Ds(i,e.count*this._getM(i));return n=ae.d_(n,i,1,this._root),s+(n-s)*this.get("startLocation",0)}_fixMax(t){const e=this.getPrivate("baseInterval"),i=e.timeUnit;let s=ae.d_(t,i,e.count,this._root),n=s+ae.Ds(i,e.count*this._getM(i));return n=ae.d_(n,i,1,this._root),s+(n-s)*this.get("endLocation",1)}_updateDates(t,e){}_handleSeriesRemoved(){this.setPrivate("baseInterval",this.get("baseInterval")),this.setPrivate("min",void 0),this.setPrivate("minFinal",void 0)}baseDuration(){return this._baseDuration}baseMainDuration(){return ae.SJ(this.get("baseInterval"))}
1processSeriesDataItem(t,e){const i=this.getPrivate("baseInterval");t.open||(t.open={}),t.close||(t.close={}),P.__(e,s=>{let n=t.get(s);if(c.Et(n)){let a=t.open[s],h=t.close[s];if(!(n>=a&&n<=h)){const u=i.timeUnit,v=i.count;a=ae.d_(n,u,v,this._root),h=a+ae.Ds(u,v*this._getM(u)),h=ae.d_(h,u,1,this._root),t.open[s]=a,t.close[s]=h}this._updateDates(a,t.component)}})}_handleSizeDirty(){}getDataItemPositionX(t,e,i,s,n){let a,h,u;return n?u=t.get(e):(t.open&&t.close?(a=t.open[e],h=t.close[e]):(a=t.get(e),h=a),u=a+(h-a)*i,u=this._baseValue+(u-this._baseValue)*s),this.valueToPosition(u)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionY(t,e,i,s,n){let a,h,u;return n?u=t.get(e):(t.open&&t.close?(a=t.open[e],h=t.close[e]):(a=t.get(e),h=a),u=a+(h-a)*i,u=this._baseValue+(u-this._baseValue)*s),this.valueToPosition(u)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}roundAxisPosition(t,e){let i=this.positionToValue(t);i-=(e-.5)*this._baseDuration;let s=this.getPrivate("baseInterval");if(!c.yr(i)){const n=this._root.locale.firstDayOfWeek,a=s.timeUnit,h=this._root.utc,u=this._root.timezone,v=s.count;i=ae.d_(i,a,v,this._root,this.getPrivate("min",0));let E=ae.Iq(s,new Date(i),n,h,u);return u&&(i=ae.d_(i+.05*this._baseDuration,a,v,this._root,this.getPrivate("min",0)),E=ae.Iq(s,new Date(i+E*e),n,h,u)),this.valueToPosition(i+E*e)}return NaN}getTooltipText(t,e){if(null!=this.getPrivate("min")){let i=this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit],s=this.positionToValue(t);if(c.Et(s)){let n=new Date(s),a=this.getPrivate("baseInterval"),h=ae.Iq(a,n,this._root.locale.firstDayOfWeek,this._root.utc,this._root.timezone);return!1!==e&&(n=new Date(s+this.get("tooltipIntervalOffset",-this.get("tooltipLocation",.5))*h)),this._root.dateFormatter.format(n,this.get("tooltipDateFormat",i))}}return""}getSeriesItem(t,e,i,s){let n=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),a=this.positionToValue(e);null==i&&(i=.5),a-=(i-.5)*this._baseDuration;const h=P.IU(t.dataItems,u=>{let v=0;return u.open&&(v=u.open[n]),Oi.UD(v,a)});if(s||t.get("snapTooltip")){let u=t.dataItems[h.index-1],v=t.dataItems[h.index];if(u&&v&&u.open&&v.close){let M=v.close[n];if(Math.abs(a-u.open[n])>Math.abs(a-M))return v}if(u)return u;if(v)return v}else{const u=t.dataItems[h.index-1];if(u&&u.open&&u.close&&a>=u.open[n]&&a<=u.close[n])return u}}shouldGap(t,e,i,s){const n=t.get(s);return e.get(s)-n>this._baseDuration*i}zoomToDates(t,e,i){this.zoomToValues(t.getTime(),e.getTime(),i)}zoomToValues(t,e,i){const s=this.getPrivate("minFinal",this.getPrivate("min",0)),n=this.getPrivate("maxFinal",this.getPrivate("max",0));if(null!=this.getPrivate("min")&&null!=this.getPrivate("max"))if(this.get("groupData")){const a=this.getGroupInterval(e-t),h=this.get("baseInterval");let u=this.getIntervalMin(h),v=this.getIntervalMax(h)-1;v=ae.d_(v,a.timeUnit,a.count,this.root),v+=this._getM(a.timeUnit)*ae.SJ(a),v=ae.d_(v,a.timeUnit,a.count,this.root);let E=ae.d_(u,a.timeUnit,a.count,this.root),M=ae.d_(v,a.timeUnit,a.count,this.root);this.zoom((t-E)/(M-E),(e-E)/(M-E),i)}else this.zoom((t-s)/(n-s),(e-s)/(n-s),i)}positionToDate(t){return new Date(this.positionToValue(t))}dateToPosition(t){return this.valueToPosition(t.getTime())}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return c.Et(t)&&c.Et(e)?this._intervalDuration/(t-e):.05}nextPosition(t){null==t&&(t=1);let e=this.get("tooltipLocation",.5)*this._baseDuration;"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);let i=this.positionToValue(this.getPrivate("tooltipPosition",0));const s=this.getPrivate("baseInterval");let n=this._nextTime(i,t,s),a=this.getPrivate("selectionMin",0),h=this.getPrivate("selectionMax",0),u=ae.d_(a,s.timeUnit,s.count,this._root),v=ae.d_(h,s.timeUnit,s.count,this._root);return n+=e,n=at.s_(n,u+e,v-e),this.toGlobalPosition(this.valueToPosition(n))}_nextTime(t,e,i){return ae.d_(t+e*this._baseDuration,i.timeUnit,i.count,this._root)}}function vs(x,t){this._context=x,this._t=t}function Yn(x){return new vs(x,1)}
1ms.className="DateAxis",ms.classNames=fi.classNames.concat([ms.className]),vs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(x,t){switch(x=+x,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(x,t):this._context.moveTo(x,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(x,t);else{var e=this._x*(1-this._t)+x*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,t)}}this._x=x,this._y=t}};class ys extends ui{_afterNew(){this._setDefault("curveFactory",Yn),super._afterNew()}_getPoints(t,e){let i=e.points,s=this.get("stepWidth",L.Q2).value/2,n=t.get("locationX",e.locationX),a=t.get("locationY",e.locationY),h=n,u=a;e.baseAxis===e.xAxis?(n-=s,h+=s):e.baseAxis===e.yAxis&&(a-=s,u+=s);let v=e.xAxis.getDataItemPositionX(t,e.xField,n,e.vcx),E=e.yAxis.getDataItemPositionY(t,e.yField,a,e.vcy),M=e.xAxis.getDataItemPositionX(t,e.xField,h,e.vcx),O=e.yAxis.getDataItemPositionY(t,e.yField,u,e.vcy);if(this._shouldInclude(v)){const I=this.getPoint(v,E),$=[I.x,I.y],G=this.getPoint(M,O),F=[G.x,G.y];if(e.fillVisible){let Q=v,q=E,et=M,ot=O;if(e.baseAxis===e.xAxis?(q=e.basePosY,ot=e.basePosY):e.baseAxis===e.yAxis&&(Q=e.basePosX,et=e.basePosX),e.getOpen){let Ot=t.get(e.xOpenField),Et=t.get(e.yOpenField);if(null!=Ot&&null!=Et)if(n=t.get("openLocationX",e.openLocationX),a=t.get("openLocationY",e.openLocationY),h=n,u=a,e.baseAxis===e.xAxis?(n-=s,h+=s):e.baseAxis===e.yAxis&&(a-=s,u+=s),e.stacked){let At=t.get("stackToItemX"),Ft=t.get("stackToItemY");At?(Q=e.xAxis.getDataItemPositionX(At,e.xField,n,At.component.get("vcx")),et=e.xAxis.getDataItemPositionX(At,e.xField,h,At.component.get("vcx"))):e.yAxis===e.baseAxis?(Q=e.basePosX,et=e.basePosX):e.baseAxis===e.yAxis&&(Q=e.xAxis.getDataItemPositionX(t,e.xOpenField,n,e.vcx),et=e.xAxis.getDataItemPositionX(t,e.xOpenField,h,e.vcx)),Ft?(q=e.yAxis.getDataItemPositionY(Ft,e.yField,a,Ft.component.get("vcy")),ot=e.yAxis.getDataItemPositionY(Ft,e.yField,u,Ft.component.get("vcy"))):e.xAxis===e.baseAxis?(q=e.basePosY,ot=e.basePosY):e.baseAxis===e.yAxis&&(q=e.yAxis.getDataItemPositionY(t,e.yOpenField,a,e.vcy),ot=e.yAxis.getDataItemPositionY(t,e.yOpenField,u,e.vcy))}else Q=e.xAxis.getDataItemPositionX(t,e.xOpenField,n,e.vcx),q=e.yAxis.getDataItemPositionY(t,e.yOpenField,a,e.vcy),et=e.xAxis.getDataItemPositionX(t,e.xOpenField,h,e.vcx),ot=e.yAxis.getDataItemPositionY(t,e.yOpenField,u,e.vcy)}let ft=this.getPoint(Q,q),wt=this.getPoint(et,ot);$[2]=ft.x,$[3]=ft.y,F[2]=wt.x,F[3]=wt.y}i.push($),i.push(F),t.set("point",{x:$[0]+(F[0]-$[0])/2,y:$[1]+(F[1]-$[1])/2})}this.get("noRisers")&&(e.points=[],e.segments.push(i))}}ys.className="StepLineSeries",ys.classNames=ui.classNames.concat([ys.className]);var Rs=y(18551),Le=y(93147),Xn=y(79320),Os=y(85802);let zn=(()=>{class x{static{this.GRAPH_ID=1}constructor(e){this.zone=e,this.commonValueAxis={},this.bulletSettings={},this.bulletSprites={}}createRoot(e,i){this.zone.runOutsideAngular(()=>this._createRoot(e,i))}destroyRoot(){this.zone.runOutsideAngular(()=>this._destroyRoot())}removePanel(e){this.zone.runOutsideAngular(()=>this.chart.panels.removeValue(e))}addPanel(e=0,i=Le.Vn.DATE,s=null,n=null){return this.zone.runOutsideAngular(()=>
1this._addPanel(e,i,s,n))}addGraph(e,i,s,n,a=400,h=!0,u={},v=null){v||(v={setupBullets:()=>{},spriteType:Le.ww.CIRCLE});const E=x.GRAPH_ID++;return this.bulletSettings[E]=v,this.zone.runOutsideAngular(()=>this._addGraph(e,i,s,n,a,h,u,E))}addLegend(e){return this.zone.runOutsideAngular(()=>this._addLegend(e))}updateData(e){this.zone.runOutsideAngular(()=>{e.get("cursor").setAll({xAxis:e.xAxes.getIndex(0),yAxis:e.yAxes.getIndex(0),snapToSeries:e.series.values})})}addSankeyChart(e=""){return this.zone.runOutsideAngular(()=>{const i=this.root.container.children.push(xi.new(this.root,{sourceIdField:"from",targetIdField:"to",valueField:"value",paddingRight:224,paddingTop:24,calculateAggregates:!0}));return i.nodes.setAll({nameField:"name"}),i.nodes.nodes.template.setAll({draggable:!1,toggleKey:"none",cursorOverStyle:"default"}),i.links.template.setAll({tooltipText:`{targetId} {value} ${e}`}),i.nodes.labels.template.setAll({maxWidth:200,oversizedBehavior:"wrap",text:"{name}"}),i})}addHierarchyTree(e,i,s){return this.zone.runOutsideAngular(()=>{const n=e.children.push(qe.new(this.root,{idField:"id",categoryField:"name",childDataField:"children",linkWithField:"link",...i}));return s(n),n})}addSunburstChart(e,i,s){return this.zone.runOutsideAngular(()=>{const n=e.children.push(Qi.new(this.root,{valueField:"value",categoryField:"label",childDataField:"children",...i}));return s(n),n})}addPieChart(e,i,s){return this.zone.runOutsideAngular(()=>{const n=e.children.push(vt.new(this.root,i));return s(n),n})}addForceDirectedChart(e,i,s){return this.zone.runOutsideAngular(()=>{const n=e.children.push(es.new(this.root,{valueField:"value",categoryField:"name",childDataField:"children",...i}));return s(n),n})}updateValueAxisHeight(e,i){return this.zone.runOutsideAngular(()=>{this.commonValueAxis[e].set("height",i)})}makeShape(e,i,s,n=50){const a={centerX:(0,L.KN)(n),centerY:(0,L.KN)(n),fill:s};switch(e){case Le.ww.SQUARE:return Y.M.new(this.root,{...a,width:i,height:i});case Le.ww.HEXAGON:const h=(i/=2)*Math.sqrt(3)/2;return Z.new(this.root,{...a,points:[{x:i,y:0},{x:i/2,y:h},{x:-i/2,y:h},{x:-i,y:0},{x:-i/2,y:-h},{x:i/2,y:-h}]});case Le.ww.TRIANGLE:return X.new(this.root,{...a,width:i,height:i});default:return f.j.new(this.root,{...a,radius:i/2})}}_createRoot(e,i){(0,C.RR)("AM5C91242378"),this.root=w.b.new(e),this.root._showBranding=()=>{},this.root.setThemes([Xn.$.new(this.root)]),this.root.utc=!0,this.dateFormat=i,this.buildChart()}_destroyRoot(){this.root&&this.root.dispose(),this.root=null,this.chart=null,this.commonValueAxis={},this.bulletSprites={},this.bulletSettings={}}_addPanel(e=0,i=Le.Vn.DATE,s=null,n=null){const a=this.chart.panels.push(is.new(this.root,{panX:!1,panY:!1,paddingTop:0,paddingBottom:32,layout:this.root.verticalLayout,scrollbarX:this.createScrollbar("horizontal"),scrollbarY:this.createScrollbar("vertical"),wheelX:"none",wheelY:"none",wheelable:!1}));if(this.addCursor(e,a),a.panelControls.set("forceHidden",!0),i!==Le.Vn.NONE&&(this.createXAxis(a,i),a.leftAxesContainer.set("layout",this.root.verticalLayout)),s)this.commonValueAxis[e]=this.createYAxis(a,null,s),a.get("colors").set("colors",Rs.Z.colors.graphs.map(h=>(0,A.yW)(h)));else{const h=e%Rs.Z.colors.graphs.length;a.get("colors").set("colors",[(0,A.yW)(Rs.Z.colors.graphs[h])])}return n?.length&&a.get("colors").set("colors",n.map(h=>(0,A.yW)(h))),a}createScrollbar(e){const i=g.new(this.root,{orientation:e});return i.set("horizontal"===e?"minHeight":"minWidth",8),i.startGrip.set("scale",.8),i.endGrip.set("scale",.8),i}addCursor(e,i){const s=us.new(this.root,{});return s.events.on("cursormoved",()=>{(this.bulletSprites[e]||[]).forEach(n=>n.unhover()),this.bulletSprites[e]=[],i.series.each(n=>{const a=n.get("tooltip").dataItem;if(a?.bullets?.length){const h=a.bullets[0].get("sprite");h.hover(),this.bulletSprites[e].push(h)}})}),i.set("cursor",s),s}
1_addGraph(e,i,s,n,a=400,h=!0,u={},v=null){const E=this.commonValueAxis[e]||this.createYAxis(i,n,a),M=i.series.push(this.getSeries(s,{name:n,valueYField:"value",valueXField:h?"date":"category",categoryXField:h?"date":"category",valueYGrouped:"close",xAxis:i.xAxes.values[0],yAxis:E,calculateAggregates:!0,setStateOnChildren:!0,...u},v));return M.data.processor=p.new(this.root,{}),h&&(M.data.processor.set("dateFields",["date"]),M.data.processor.set("dateFormat",this.dateFormat)),M.set("tooltip",S.m.new(this.root,{labelText:void 0,forceHidden:!0,animationDuration:0})).get("background").set("fill",this.root.interfaceColors.get("background")),M}_addLegend(e){const i=e.children.push(R.s.new(this.root,{}));return i.itemContainers.template.events.on("pointerover",s=>{const n=s.target.dataItem.dataContext,a=n.get("userData");Number.isFinite(a?.seriesIndex)?this.hideSeriesBySeriesIndex(e,a.seriesIndex):this.hideSeriesByIdentity(e,n)}),i.itemContainers.template.events.on("pointerout",()=>{e.series.each(s=>{this.setChartOpacity(s,1)})}),i.itemContainers.template.events.on("click",s=>{this.toggleSeries(e,s.target.dataItem.dataContext)}),i}hideSeriesByIdentity(e,i){e.series.each(s=>{this.setChartOpacity(s,s!==i?.2:1)})}hideSeriesBySeriesIndex(e,i){e.series.each(s=>{s.get("userData").seriesIndex!==i?this.setChartOpacity(s,.2):this.setChartOpacity(s,1)})}toggleSeries(e,i){const s=i.get("userData").seriesIndex;Number.isFinite(s)&&e.series.each(n=>{n.get("userData").seriesIndex!==s||i===n||(n.isHidden()?n.show():n.hide())})}setChartOpacity(e,i){e.set("opacity",i),e.bullets.length&&(e.bullets.clear(),this.createBullet(e,i))}buildChart(){this.chart=this.root.container.children.push(ds.new(this.root,{}))}createYAxis(e,i,s){const n=fs.new(this.root,{inside:!1});return n.labels.template.setAll({centerY:(0,L.KN)(100)}),e.yAxes.push(this.createValueAxis(n,i,s))}createXAxis(e,i=Le.Vn.DATE){const s=_s.new(this.root,{});let n;switch(i){case Le.Vn.DATE:n=this.createDateAxis(s);break;case Le.Vn.VALUE:n=this.createValueAxis(s);break;default:n=this.createCategoryAxis(s)}return e.xAxes.push(n),n.set("tooltip",S.m.new(this.root,{})),n}createCategoryAxis(e){return _i.new(this.root,{categoryField:"category",renderer:e})}createDateAxis(e){return ms.new(this.root,{groupData:!1,groupCount:32,groupIntervals:[{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}],baseInterval:{timeUnit:"day",count:1},renderer:e})}
1createValueAxis(e,i=null,s=null){const n=fi.new(this.root,{renderer:e,min:0,height:s});return s&&n.set("height",s),i&&n.axisHeader.children.push(W.J.new(this.root,{text:i,fontWeight:"bold",paddingBottom:8,paddingTop:0})),n}getSeries(e,i,s){switch(e){case Le.eF.STEP:return this.setupLineSeries(s,ys.new(this.root,i));case Le.eF.BAR:return this.setupColumnSeries(s,Pi.new(this.root,i));default:return this.setupLineSeries(s,ui.new(this.root,i))}}setupLineSeries(e,i){return i.get("userData").graphId=e,this.createBullet(i),i}setupColumnSeries(e,i){return i.get("userData").graphId=e,this.createBullet(i),i.setAll({stacked:!0,clustered:!0}),i.columns.template.setAll({fillOpacity:.5,strokeWidth:1,width:(0,L.KN)(80)}),i}createBullet(e,i=1){const s=this.bulletSettings[e.get("userData").graphId];e.bullets.push(()=>{const n=this.createBulletSprite(s.spriteType,e.get("fill"),i),a=j.new(this.root,{locationY:0,sprite:n,userData:{series:e}});return s.setupBullets&&s.setupBullets(a),a})}createBulletSprite(e,i,s){let n;return n=e===Le.ww.SQUARE?Y.M.new(this.root,{width:8,height:8}):f.j.new(this.root,{radius:4}),n.setAll({opacity:s,fill:i,stroke:this.root.interfaceColors.get("background"),strokeWidth:1,centerX:(0,L.KN)(50),centerY:(0,L.KN)(50),tooltipText:"{name}: {valueY} {unit}",tooltip:S.m.new(this.root,{getFillFromSprite:!1,getStrokeFromSprite:!0,getLabelFillFromSprite:!0,autoTextColor:!1,pointerOrientation:"horizontal"})}),n.get("tooltip").get("background").set("fill",this.root.interfaceColors.get("background")),n}static{this.\u0275fac=function(i){return new(i||x)(Os.KVO(Os.SKi))}}static{this.\u0275prov=Os.jDH({token:x,factory:x.\u0275fac})}}return x})()},79320(Gt,ut,y){y.d(ut,{$:()=>Z});var L=y(72294),Y=y(96485);const P=class V extends Y.S{setupDefaultRules(){super.setupDefaultRules(),this.rule("ColorSet").setAll({colors:[L.Q1.fromHex(16007990),L.Q1.fromHex(15277667),L.Q1.fromHex(10233776),L.Q1.fromHex(6765239),L.Q1.fromHex(4149685),L.Q1.fromHex(2201331),L.Q1.fromHex(240116),L.Q1.fromHex(48340),L.Q1.fromHex(38536),L.Q1.fromHex(5025616),L.Q1.fromHex(9159498),L.Q1.fromHex(13491257),L.Q1.fromHex(16771899),L.Q1.fromHex(16761095),L.Q1.fromHex(16750592),L.Q1.fromHex(16733986),L.Q1.fromHex(7951688),L.Q1.fromHex(10395294),L.Q1.fromHex(6323595)],reuse:!0})}};class Z extends P{setupDefaultRules(){super.setupDefaultRules(),this.rule("InterfaceColors").setAll({primaryButton:(0,L.yW)("#fff"),primaryButtonHover:(0,L.yW)("#00b0ff"),primaryButtonDown:(0,L.yW)("#0071a3"),primaryButtonActive:(0,L.yW)("#00b0ff"),primaryButtonText:(0,L.yW)("#757575"),primaryButtonStroke:(0,L.yW)("#e0e0e0")})}static setupZoomTools(f){f.plusButton.get("icon").states.create("hover",{stroke:(0,L.yW)("#fff")}),f.minusButton.get("icon").states.create("hover",{stroke:(0,L.yW)("#fff")}),f.homeButton.get("icon").states.create("hover",{stroke:(0,L.yW)("#fff")})}}},71859(Gt,ut,y){function L(Y){return function(){return Y}}y.d(ut,{A:()=>L})},96586(Gt,ut,y){y.d(ut,{i:()=>A});const L=Math.PI,Y=2*L,V=1e-6,P=Y-V;function Z(b){this._+=b[0];for(let m=1,T=b.length;m<T;++m)this._+=arguments[m]+b[m]}class f{constructor(m){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==m?Z:function X(b){let m=Math.floor(b);if(!(m>=0))throw new Error(`invalid digits: ${b}`);if(m>15)return Z;const T=10**m;return function(c){this._+=c[0];for(let r=1,g=c.length;r<g;++r)this._+=Math.round(arguments[r]*T)/T+c[r]}}(m)}moveTo(m,T){this._append`M${this._x0=this._x1=+m},${this._y0=this._y1=+T}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(m,T){this._append`L${this._x1=+m},${this._y1=+T}`}quadraticCurveTo(m,T,c,r){this._append`Q${+m},${+T},${this._x1=+c},${this._y1=+r}`}bezierCurveTo(m,T,c,r,g,_){this._append`C${+m},${+T},${+c},${+r},${this._x1=+g},${this._y1=+_}`}arcTo(m,T,c,r,g){if(m=+m,T=+T,c=+c,r=+r,(g=+g)<0)throw new Error(`negative radius: ${g}`);let _=this._x1,l=this._y1,p=c-m,S=r-T,R=_-m,W=l-T,j=R*R+W*W;if(null===this._x1)this._append`M${this._x1=m},${this._y1=T}`;else if(j>V)if(Math.abs(W*p-S*R)>V&&g){let z=c-_,U=r-l,nt=p*p+S*S,it=z*z+U*U,gt=Math.sqrt(nt),N=Math.sqrt(j),tt=g*Math.tan((L-Math.acos((nt+j-it)/(2*gt*N))
vendor: 1,028 bytes, line 1
1)/2),J=tt/N,at=tt/gt;Math.abs(J-1)>V&&this._append`L${m+J*R},${T+J*W}`,this._append`A${g},${g},0,0,${+(W*z>R*U)},${this._x1=m+at*p},${this._y1=T+at*S}`}else this._append`L${this._x1=m},${this._y1=T}`}arc(m,T,c,r,g,_){if(m=+m,T=+T,_=!!_,(c=+c)<0)throw new Error(`negative radius: ${c}`);let l=c*Math.cos(r),p=c*Math.sin(r),S=m+l,R=T+p,W=1^_,j=_?r-g:g-r;null===this._x1?this._append`M${S},${R}`:(Math.abs(this._x1-S)>V||Math.abs(this._y1-R)>V)&&this._append`L${S},${R}`,c&&(j<0&&(j=j%Y+Y),j>P?this._append`A${c},${c},0,1,${W},${m-l},${T-p}A${c},${c},0,1,${W},${this._x1=S},${this._y1=R}`:j>V&&this._append`A${c},${c},0,${+(j>=L)},${W},${this._x1=m+c*Math.cos(g)},${this._y1=T+c*Math.sin(g)}`)}rect(m,T,c,r){this._append`M${this._x0=this._x1=+m},${this._y0=this._y1=+T}h${c=+c}v${+r}h${-c}Z`}toString(){return this._}}function A(b){let m=3;return b.digits=function(T){if(!arguments.length)return m;if(null==T)m=null;else{const c=Math.floor(T);if(!(c>=0))throw new RangeError(`invalid digits: ${T}`);m=c}return b},()=>new f(m)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.