1import{A as Cs,B as Ms,N as Bs,f as js,o as Hs,d as Rs}from"./app-CrgWC8i3.js";function Re(a,e,t,i){function r(n){return n instanceof t?n:new t(function(s){s(n)})}return new(t||(t=Promise))(function(n,s){function o(u){try{h(i.next(u))}catch(c){s(c)}}function l(u){try{h(i.throw(u))}catch(c){s(c)}}function h(u){u.done?n(u.value):r(u.value).then(o,l)}h((i=i.apply(a,e||[])).next())})}class F{constructor(e){Object.defineProperty(this,"_value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._value=e}get value(){return this._value/100}get percent(){return this._value}toString(){return""+this._value+"%"}interpolate(e,t){return e+this.value*(t-e)}static normalize(e,t,i){return e instanceof F?e:t===i?new F(0):new F(Math.min(Math.max((e-t)*(1/(i-t)),0),1)*100)}}function qe(a){return new F(a)}qe(0);const I=qe(100),Y=qe(50);function $r(a){return a instanceof F}function Rr(a){return Number(a)!==a}function Is(a){return{}.toString.call(a)}function Pe(a){if(a!=null&&!M(a)){let e=Number(a);if(Rr(e)&&Je(a)&&a!=""&&a.match(/[0-9]+/)){const t=a.replace(/[^0-9.\-]+/g,"");return a===t?e:Pe(t)}return e}return a}function Fs(a){if(sr(a))return new Date(a);if(M(a))return new Date(a);{let e=Number(a);return M(e)?new Date(e):new Date(a)}}function Rn(a){if(Rr(a))return"NaN";if(a===1/0)return"Infinity";if(a===-1/0)return"-Infinity";if(a===0&&1/a===-1/0)return"-0";let e=a<0;a=Math.abs(a);let t=/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec(""+a),i=t[1],r=t[2]||"",n;if(t[3]===void 0)n=r===""?i:i+"."+r;else{let s=+t[3];if(a<1){let o=s-1;n="0."+qr("0",o)+i+r}else{let o=s-r.length;o===0?n=i+r:o<0?n=i+r.slice(0,o)+"."+r.slice(o):n=i+r+qr("0",o)}}return e?"-"+n:n}function qr(a,e){return new Array(e+1).join(a)}function sr(a){return Is(a)==="[object Date]"}function Je(a){return typeof a=="string"}function M(a){return typeof a=="number"&&Number(a)==a}function St(a){return typeof a=="object"&&a!==null}function Jr(a){return Array.isArray(a)}const Qe="__§§§__",gt="__§§§§__";function Nt(a,e){const t=a.length;for(let i=0;i<t;++i)if(a[i]===e)return i;return-1}function Ns(a,e){const t=a.length;for(let i=0;i<t;++i)if(e(a[i]))return!0;return!1}function ar(a,e){const t=a.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=e(a[r],r);return i}function x(a,e){const t=a.length;for(let i=0;i<t;++i)e(a[i],i)}function Ht(a,e){let t=a.length;for(;t>0;)--t,e(a[t],t)}function Ir(a,e){const t=a.length;for(let i=0;i<t&&e(a[i],i);++i);}function zs(a,e){const t=e.length;for(let i=0;i<t;++i)a.push(e[i])}function Me(a,e){let t=!1,i=0;for(;;){if(i=a.indexOf(e,i),i===-1)return t;t=!0,a.splice(i,1)}}function ge(a,e){let t=a.indexOf(e);return t!==-1?(a.splice(t,1),!0):!1}function or(a,e,t){let i=Nt(a,e);i!==-1&&lr(a,i),a.push(e)}function zt(a,e){a.indexOf(e)===-1&&a.push(e)}function Gs(a){const e=a.length,t=new Array(e);for(let i=0;i<e;++i)t[i]=a[i];return t}function Xi(a,e,t){a.splice(e,0,t)}function lr(a,e){a.splice(e,1)}function In(a,e){const t=a.length;for(let i=0;i<t;++i)if(e(a[i],i))return i;return-1}function Ws(a,e){let t=a.length;for(;t>0;)if(--t,e(a[t],t))return t;return-1}function Fr(a,e){const t=In(a,e);if(t!==-1)return a[t]}function Ys(a,e){const t=Ws(a,e);if(t!==-1)return a[t]}function Us(a,e){let t=0,i=a.length,r=!1;for(;t<i;){const n=t+i>>1,s=e(a[n]);s<0?t=n+1:s===0?(r=!0,t=n+1):i=n}return{found:r,index:r?t-1:t}}function Vs(a,e){let t=0,i=a.length,r=!1;for(;t<i;){const n=t+i>>1,s=e(a[n]);s<0?t=n+1:(s===0&&(r=!0),i=n)}return{found:r,index:t}}function Gi(a,e){let t=a.length;for(;t>0;)--t,e(a[t])||a.splice(t,1)}function te(a){return Object.keys(a)}function Xs(a,e){return te(a).sort(e)}function Ks(a){return Object.assign({},a)}function V(a,e){te(a).forEach(t=>{e(t,a[t])})}function Zs(a,e){for(let t in a)if($s(a,t)&&!e(t,a[t]))break}function $s(a,e){return{}.hasOwnProperty.call(a,e)}function qs(a,e){return V(a,(t,i)=>{i!=null&&e[t]==null&&(e[t]=i)}),e}class Nr{constructor(){Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposed=!1}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}}class re{constructor(e){Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dispose",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposed=!1,this._dispose=e}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}}class Js extends Nr{constructor(){super(...arguments),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}_dispose(){x(this._disposers,e=>{e.dispose()})}}class De extends Nr{constructor(e){super(),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposers=e}_dispose(){x(this._disposers,e=>{e.dispose()})}get disposers(){return this._disposers}}class Fn extends re{constructor(){super(...arguments),Object.defineProperty(this,"_counter",{enumerable:!0,configurable:!0,writable:!0,value:0})}increment(){return++this._counter,new re(()=>{--this._counter,this._counter===0&&this.dispose()})}}function Qs(a){a.parentNode&&a.parentNode.removeChild(a)}function Q(a,e,t,i){return a.addEventListener(e,t,i||!1),new re(()=>{a.removeEventListener(e,t,i||!1)})}function Nn(a){return Q(window,"resize",e=>{a()})}function st(a){switch(a){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function Ki(a){return a.pointerId||0}function ea(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let a=document.createElement("button");a.style.position="fixed",a.style.top="0px",a.style.left="-10000px",document.body.appendChild(a),a.focus(),a.blur(),document.body.removeChild(a)}}function ta(a){a&&a.focus()}function ur(a){if(st("pointerevents"))return a;
1if(st("touchevents"))switch(a){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(st("mouseevents"))switch(a){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return a}function Qr(a){if(typeof Touch<"u"&&a instanceof Touch)return!0;if(typeof PointerEvent<"u"&&a instanceof PointerEvent&&a.pointerType!=null)switch(a.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(a instanceof MouseEvent)}else if(a.type!=null&&a.type.match(/^mouse/))return!1;return!0}function ti(a,e,t){a.style[e]=t}function ia(a,e){return a.style[e]}function zn(a){if(a.composedPath){const e=a.composedPath();return e.length===0?null:e[0]}else return a.target}function ra(a,e){let t=e;for(;;){if(a===t)return!0;if(t.parentNode===null){if(t.host==null)return!1;t=t.host}else t=t.parentNode}}function Gn(a,e){return a.target&&ra(e.root.dom,a.target)}function pt(a,e){e?a.style.pointerEvents="auto":a.style.pointerEvents="none"}function ii(a){if(a.key!==void 0)return a.key;switch(a.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+a.keyCode}function na(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function sa(){return na()?1:void 0}function Xe(a,e){return M(a)?a:a!=null&&M(a.value)&&M(e)?e*a.value:0}function aa(a){let e=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function ee(a,e=0,t="0"){return typeof a!="string"&&(a=a.toString()),e>a.length?Array(e-a.length+1).join(t)+a:a}function oa(a){return a.replace(/^[\s]*/,"")}function la(a){return a.replace(/[\s]*$/,"")}function _t(a){return oa(la(a))}function ua(a,e,t=!1,i="..."){if(a.length>e){let r=e-1;for(;r>=0&&a.charAt(r).match(/\w/);)r--;return r>=0&&t==!1?a.substring(0,r+1)+"...":a.substring(0,e)+i}else return a}function zr(a){return a.replace(/\/(date|number|duration)$/i,"")}function en(a){return a&&a.replace(/<[^>]*>/g,"")}function tn(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function ha(a){const e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,t=/([^اأدذرزÙ]*[اأدذرزÙ])/gi;let i=a.split(/(\s+)/),r=[];return i.forEach(n=>{if(n.match(/^\s+$/))(n=" ")&&(n=" "),r.push(n);else if(e.test(n)){let s=n.split(t).filter(o=>o!=="");r=r.concat(s)}else r=r.concat([...n])}),r}function rn(a,e=!1){const t=new Date(a.getFullYear(),0,0),i=a.getTime()-t.getTime()+(t.getTimezoneOffset()-a.getTimezoneOffset())*60*1e3,r=1e3*60*60*24;return Math.floor(i/r)}function _i(a,e=!1){const t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),i=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-i);const r=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7)}function ca(a,e=!1){const t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),i=t.getUTCDay()||7;return t.setUTCDate(t.getUTCDate()+4-i),new Date(Date.UTC(t.getUTCFullYear(),0,1)).getFullYear()}function da(a,e=!1){const t=_i(new Date(a.getFullYear(),a.getMonth(),1),e);let i=_i(a,e);return i==1&&(i=53),i-t+1}function fa(a,e,t=1,i=!1){let r=new Date(e,0,4,0,0,0,0);return i&&r.setUTCFullYear(e),a*7+t-((r.getDay()||7)+3)}function ri(a,e){return a>12?a-=12:a===0&&(a=12),e!=null?a+(e-1):a}function ni(a,e=!1,t=!1,i=!1,r){if(i)return e?"Coordinated Universal Time":"UTC";if(r){const o=a.toLocaleString("en-US",{timeZone:r}),l=a.toLocaleString("en-US",{timeZone:r,timeZoneName:e?"long":"short"});return _t(l.substr(o.length))}
1let n=a.toLocaleString("UTC"),s=a.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(n.length);return t===!1&&(s=s.replace(/ (standard|daylight|summer|winter) /i," ")),_t(s)}function pa(a,e){const t=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),i=new Date(t.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(t.toLocaleString("en-US",{timeZone:a})).getTime()-i.getTime())/6e4*-1}function Wn(a){let e,t,i,r=a.h,n=a.s,s=a.l;if(n==0)e=t=i=s;else{let o=function(c,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?c+(d-c)*6*f:f<.5?d:f<.6666666666666666?c+(d-c)*(.6666666666666666-f)*6:c},l=s<.5?s*(1+n):s+n-s*n,h=2*s-l;e=o(h,l,r+1/3),t=o(h,l,r),i=o(h,l,r-1/3)}return{r:Math.round(e*255),g:Math.round(t*255),b:Math.round(i*255)}}function Yn(a){let e=a.r/255,t=a.g/255,i=a.b/255,r=Math.max(e,t,i),n=Math.min(e,t,i),s=0,o=0,l=(r+n)/2;if(r===n)s=o=0;else{let h=r-n;switch(o=l>.5?h/(2-r-n):h/(r+n),r){case e:s=(t-i)/h+(t<i?6:0);break;case t:s=(i-e)/h+2;break;case i:s=(e-t)/h+4;break}s/=6}return{h:s,s:o,l}}function ga(a,e){return a&&{r:Math.max(0,Math.min(255,a.r+fi(a.r,e))),g:Math.max(0,Math.min(255,a.g+fi(a.g,e))),b:Math.max(0,Math.min(255,a.b+fi(a.b,e))),a:a.a}}function fi(a,e){let t=e>0?255-a:a;return Math.round(t*e)}function ma(a,e){if(a){let t=Math.min(Math.max(a.r,a.g,a.b),230),i=fi(t,e);return{r:Math.max(0,Math.min(255,Math.round(a.r+i))),g:Math.max(0,Math.min(255,Math.round(a.g+i))),b:Math.max(0,Math.min(255,Math.round(a.b+i))),a:a.a}}else return a}function nn(a){return(a.r*299+a.g*587+a.b*114)/1e3>=128}function _a(a,e){if(a===void 0||e==1)return a;let t=Yn(a);return t.s=e,Wn(t)}function ba(a,e={r:255,g:255,b:255},t={r:255,g:255,b:255}){let i=e,r=t;return nn(t)&&(i=t,r=e),nn(a)?r:i}function Un(a,e){return a||(a=[]),[...a,...e].filter((t,i,r)=>r.indexOf(t)===i)}function ya(a,e){return!(!e||a.left!=e.left||a.right!=e.right||a.top!=e.top||a.bottom!=e.bottom)}function Vn(a){return a[0]==="#"&&(a=a.substr(1)),a.length==3&&(a=a[0].repeat(2)+a[1].repeat(2)+a[2].repeat(2)),parseInt(a,16)}function va(a){a=a.replace(/[ ]/g,"");let e=a.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=a.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let t="";for(let i=1;i<=3;i++){let r=parseInt(e[i]).toString(16);r.length==1&&(r="0"+r),t+=r}return Vn(t)}function Be(a){return C.fromAny(a)}class C{constructor(e){Object.defineProperty(this,"_hex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+ee(this.r.toString(16),2)+ee(this.g.toString(16),2)+ee(this.b.toString(16),2)}toHSL(e=1){return Yn({r:this.r,g:this.g,b:this.b})}static fromHSL(e,t,i){const r=Wn({h:e,s:t,l:i});return this.fromRGB(r.r,r.g,r.b)}toString(){return this.toCSSHex()}static fromHex(e){return new C(e)}static fromRGB(e,t,i){return new C((i|0)+(t<<8)+(e<<16))}static fromString(e){return new C(Vn(e))}static fromCSS(e){return new C(va(e))}static fromAny(e){if(Je(e)){if(e[0]=="#")return C.fromString(e);if(e.substr(0,3)=="rgb")return C.fromCSS(e)}else{if(M(e))return C.fromHex(e);if(e instanceof C)return C.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,t,i){const r=ba({r:e.r,g:e.g,b:e.b},t?{r:t.r,g:t.g,b:t.b}:void 0,i?{r:i.r,g:i.g,b:i.b}:void 0);return this.fromRGB(r.r,r.g,r.b)}static interpolate(e,t,i,r="rgb"){if(r=="hsl"){const n=t.toHSL(),s=i.toHSL();return C.fromHSL(Ke(e,n.h,s.h),Ke(e,n.s,s.s),Ke(e,n.l,s.l))}else return C.fromRGB(Ke(e,t.r,i.r),Ke(e,t.g,i.g),Ke(e,t.b,i.b))}static lighten(e,t){const i=ga({r:e.r,g:e.g,b:e.b},t);return C.fromRGB(i.r,i.g,i.b)}static brighten(e,t){const i=ma({r:e.r,g:e.g,b:e.b},t);return C.fromRGB(i.r,i.g,i.b)}static saturate(e,t){const i=_a({r:e.r,g:e.g,b:e.b},t);return C.fromRGB(i.r,i.g,i.b)}}class Ot{constructor(){Object.defineProperty(this,"_listeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_killed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_disabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_iterating",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_enabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),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 e=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{x(e,t=>{t.disposer.dispose()})}finally{this._killed=null,this._iterating=null}}}hasListeners(){return this._listeners.length!==0}hasListenersByType(e){return Ns(this._listeners,t=>(t.type===null||t.type===e)&&!t.killed)}enable(){this._enabled=!0}disable(){this._enabled=!1}enableType(e){delete this._disabled[e]}disableType(e,t=1/0){this._disabled[e]=t}_removeListener(e){if(this._iterating===0){const t=this._listeners.indexOf(e);if(t===-1)throw new Error("Invalid state: could not remove listener");this._listeners.splice(t,1)}else this._killed.push(e)}_removeExistingListener(e,t,i,r){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(n=>{n.once===e&&n.type===t&&(i===void 0||n.callback===i)&&n.context===r&&n.disposer.dispose()})}isEnabled(e){if(this._disposed)throw new Error("EventDispatcher is disposed");return this._enabled&&this._listeners.length>0&&this.hasListenersByType(e)&&this._disabled[e]===void 0}removeType(e){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(t=>{t.type===e&&t.disposer.dispose()})}has(e,t,i){return In(this._listeners,n=>n.once!==!0&&n.type===e&&(t===void 0||n.callback===t)&&n.context===i)!==-1}_shouldDispatch(e){if(this._disposed)throw new Error("EventDispatcher is disposed");const t=this._disabled[e];return M(t)?(t<=1?delete this._disabled[e]:--this._disabled[e],!1):this._enabled}_eachListener(e){++this._iterating;try{x(this._listeners,e)}finally{--this._iterating,this._iterating===0&&this._killed.length!==0&&(x(this._killed,t=>{this._removeListener(t)}),this._killed.length=0)}}dispatch(e,t){this._shouldDispatch(e)&&this._eachListener(i=>{!i.killed&&(i.type===null||i.type===e)&&(i._debounceDelay?(i._debounceTimeout&&window.clearTimeout(i._debounceTimeout),i._debounceTimeout=window.setTimeout(()=>{i._debounceTimeout=void 0,i.killed||i.dispatch(e,t)},i._debounceDelay)):i.dispatch(e,t))})}_on(e,t,i,r,n,s,o){if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(e,t,i,r);const l={type:t,callback:i,context:r,shouldClone:n,dispatch:s,killed:!1,once:e,disposer:new re(()=>{l.killed=!0,l._debounceTimeout&&window.clearTimeout(l._debounceTimeout),this._removeListener(l)}),_debounceDelay:o};return this._listeners.push(l),l}onAll(e,t,i=!0){return this._on(!1,null,e,t,i,(r,n)=>e.call(t,n)).disposer}on(e,t,i,r=!0){return this._on(!1,e,t,i,r,(n,s)=>t.call(i,s)).disposer}onDebounced(e,t,i,r,n=!0){return this._on(!1,e,t,r,n,(s,o)=>t.call(r,o),i).disposer}once(e,t,i,r=!0){const n=this._on(!0,e,t,i,r,(s,o)=>{n.disposer.dispose(),t.call(i,o)});return n.disposer}off(e,t,i){this._removeExistingListener(!1,e,t,i)}copyFrom(e){if(this._disposed)throw new Error("EventDispatcher is disposed");if(e===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");const t=[];return x(e._listeners,i=>{!i.killed&&i.shouldClone&&(i.type===null?t.push(this.onAll(i.callback,i.context)):i.once?t.push(this.once(i.type,i.callback,i.context)):t.push(this.on(i.type,i.callback,i.context)))}),new De(t)}}function sn(a){return Re(this,void 0,void 0,function*(){if(a!==void 0){const e=[];V(a,(t,i)=>{e.push(i.waitForStop())}),yield Promise.all(e)}})}function Ke(a,e,t){return e+a*(t-e)}function wa(a,e,t){return a>=1?t:e}function Xn(a,e,t){return new F(Ke(a,e.percent,t.percent))}function xa(a,e,t){return C.interpolate(a,e,t)}function Pa(a,e){return typeof a=="number"&&typeof e=="number"?Ke:a instanceof F&&e instanceof F?Xn:a instanceof C&&e instanceof C?xa:wa}var at;(function(a){a[a.Stopped=0]="Stopped",a[a.Playing=1]="Playing",a[a.Paused=2]="Paused"})(at||(at={}));function At(a,e){if(!(a>=0&&a<e))throw new Error("Index out of bounds: "+a)}class Wi{constructor(e=[]){Object.defineProperty(this,"_values",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Ot}),this._values=e}get values(){return this._values}contains(e){return this._values.indexOf(e)!==-1}removeValue(e){let t=0,i=this._values.length;for(;t<i;)this._values[t]===e?(this.removeIndex(t),--i):++t}indexOf(e){return Nt(this._values,e)}get length(){return this._values.length}hasIndex(e){return e>=0&&e<this._values.length}getIndex(e){return this._values[e]}_onPush(e){this.events.isEnabled("push")&&this.events.dispatch("push",{type:"push",target:this,newValue:e})}_onInsertIndex(e,t){this.events.isEnabled("insertIndex")&&this.events.dispatch("insertIndex",{type:"insertIndex",target:this,index:e,newValue:t})}_onSetIndex(e,t,i){this.events.isEnabled("setIndex")&&this.events.dispatch("setIndex",{type:"setIndex",target:this,index:e,oldValue:t,newValue:i})}_onSwap(e,t){this.events.isEnabled("swap")&&this.events.dispatch("swap",{type:"swap",target:this,a:e,b:t})}_onRemoveIndex(e,t){this.events.isEnabled("removeIndex")&&this.events.dispatch("removeIndex",{type:"removeIndex",target:this,index:e,oldValue:t})}_onMoveIndex(e,t,i){this.events.isEnabled("moveIndex")&&this.events.dispatch("moveIndex",{type:"moveIndex",target:this,oldIndex:e,newIndex:t,value:i})}_onClear(e){this.events.isEnabled("clear")&&this.events.dispatch("clear",{type:"clear",target:this,oldValues:e})}setIndex(e,t){At(e,this._values.length);const i=this._values[e];return i!==t&&(this._values[e]=t,this._onSetIndex(e,i,t)),i}insertIndex(e,t){return At(e,this._values.length+1),Xi(this._values,e,t),this._onInsertIndex(e,t),t}swap(e,t){const i=this._values.length;if(At(e,i),At(t,i),e!==t){const r=this._values[e],n=this._values[t];this._values[e]=n,this._values[t]=r,this._onSwap(r,n)}}removeIndex(e){At(e,this._values.length);const t=this._values[e];return lr(this._values,e),this._onRemoveIndex(e,t),t}moveValue(e,t){let i=this.indexOf(e);if(i!==-1)if(lr(this._values,i),t==null){const r=this._values.length;this._values.push(e),this._onMoveIndex(i,r,e)}else Xi(this._values,t,e),this._onMoveIndex(i,t,e);else t==null?(this._values.push(e),this._onPush(e)):(Xi(this._values,t,e),this._onInsertIndex(t,e));return e}push(e){return this._values.push(e),this._onPush(e),e}unshift(e){return this.insertIndex(0,e),e}pushAll(e){x(e,t=>{this.push(t)})}copyFrom(e){this.pushAll(e._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(e){const t=this._values;this._values=[],this._onClear(t),x(e,i=>{this._values.push(i),this._onPush(i)})}clear(){this.setAll([])}*[Symbol.iterator](){const e=this._values.length;for(let t=0;t<e;++t)yield this._values[t]}each(e){x(this._values,e)}eachReverse(e){Ht(this._values,e)}}class Kn extends Wi{constructor(){super(...arguments),Object.defineProperty(this,"autoDispose",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1})}swap(e,t){const i=this.autoDispose;this.autoDispose=!1,super.swap(e,t),this.autoDispose=i}_onSetIndex(e,t,i){this.autoDispose&&t.dispose(),super._onSetIndex(e,t,i)}_onRemoveIndex(e,t){this.autoDispose&&t.dispose(),super._onRemoveIndex(e,t)}_onClear(e){this.autoDispose&&x(e,t=>{t.dispose()}),super._onClear(e)}_dispose(){this.autoDispose&&x(this._values,e=>{e.dispose()})}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}}class Da extends Kn{constructor(e,t){super(),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"make",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.template=e,this.make=t}_dispose(){super._dispose(),this.autoDispose&&this.template.dispose()}}class Sa extends Wi{constructor(e){super(),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_events",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._container=e,this._events=this.events.onAll(t=>
1{if(t.type==="clear")x(t.oldValues,i=>{this._onRemoved(i)});else if(t.type==="push")this._onInserted(t.newValue);else if(t.type==="setIndex")this._onRemoved(t.oldValue),this._onInserted(t.newValue,t.index);else if(t.type==="insertIndex")this._onInserted(t.newValue,t.index);else if(t.type==="removeIndex")this._onRemoved(t.oldValue);else if(t.type==="moveIndex")this._onRemoved(t.value),this._onInserted(t.value,t.newIndex);else throw new Error("Unknown IListEvent type")})}_onInserted(e,t){e._setParent(this._container,!0);const i=this._container._childrenDisplay;t===void 0?i.addChild(e._display):i.addChildAt(e._display,t)}_onRemoved(e){this._container._childrenDisplay.removeChild(e._display),this._container.markDirtyBounds(),this._container.markDirty()}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._events.dispose(),x(this.values,e=>{e.dispose()}))}}const Zn=Math.PI,$n=Zn/180,Rt=180/Zn;function si(a,e,t){if(!M(e)||e<=0)return Math.round(a);{let i=Math.pow(10,e);return Math.round(a*i)/i}}function ce(a,e,t){return Math.min(Math.max(a,e),t)}function hr(a){return Math.sin($n*a)}function cr(a){return Math.cos($n*a)}function Oa(a){return a=a%360,a<0&&(a+=360),a}function Aa(a,e,t,i,r){let n=Number.MAX_VALUE,s=Number.MAX_VALUE,o=-Number.MAX_VALUE,l=-Number.MAX_VALUE,h=[];h.push(Zi(r,t)),h.push(Zi(r,i));let u=Math.min(Math.floor(t/90)*90,Math.floor(i/90)*90),c=Math.max(Math.ceil(t/90)*90,Math.ceil(i/90)*90);for(let d=u;d<=c;d+=90)d>=t&&d<=i&&h.push(Zi(r,d));for(let d=0;d<h.length;d++){let f=h[d];f.x<n&&(n=f.x),f.y<s&&(s=f.y),f.x>o&&(o=f.x),f.y>l&&(l=f.y)}return{left:a+n,top:e+s,right:a+o,bottom:e+l}}function Zi(a,e){return{x:a*cr(e),y:a*hr(e)}}function Ta(a,e){return a.x>=e.left&&a.y>=e.top&&a.x<=e.right&&a.y<=e.bottom}function an(a){return a}function Ce(a){return a*a*a}function Fe(a){return function(e){return 1-a(1-e)}}class ka{constructor(e,t){Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._entity=e,this._settings=t,V(t,i=>{this._userSettings[i]=!0})}get(e,t){const i=this._settings[e];return i!==void 0?i:t}setRaw(e,t){this._settings[e]=t}set(e,t){this._userSettings[e]=!0,this.setRaw(e,t)}remove(e){delete this._userSettings[e],delete this._settings[e]}setAll(e){te(e).forEach(t=>{this.set(t,e[t])})}_eachSetting(e){V(this._settings,e)}apply(){const e={};e.stateAnimationEasing=!0,e.stateAnimationDuration=!0;const t=this._entity.states.lookup("default");this._eachSetting((i,r)=>{e[i]||(e[i]=!0,this!==t&&(i in t._settings||(t._settings[i]=this._entity.get(i))),this._entity.set(i,r))})}applyAnimate(e){e==null&&(e=this._settings.stateAnimationDuration),e==null&&(e=this.get("stateAnimationDuration",this._entity.get("stateAnimationDuration",0)));let t=this._settings.stateAnimationEasing;t==null&&(t=this.get("stateAnimationEasing",this._entity.get("stateAnimationEasing",Ce)));const i=this._entity.states.lookup("default"),r={};r.stateAnimationEasing=!0,r.stateAnimationDuration=!0;const n={};return this._eachSetting((s,o)=>
1{if(!r[s]){r[s]=!0,this!=i&&(s in i._settings||(i._settings[s]=this._entity.get(s)));const l=this._entity.animate({key:s,to:o,duration:e,easing:t});l&&(n[s]=l)}}),n}}class Ea{constructor(e){Object.defineProperty(this,"_states",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._entity=e}lookup(e){return this._states[e]}create(e,t){const i=this._states[e];if(i)return i.setAll(t),i;{const r=new ka(this._entity,t);return this._states[e]=r,r}}remove(e){delete this._states[e]}apply(e){const t=this._states[e];t&&t.apply(),this._entity._applyState(e)}applyAnimate(e,t){let i;const r=this._states[e];return r&&(i=r.applyAnimate(t)),this._entity._applyStateAnimated(e,t),i}}class La{constructor(){Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.15.3"}),Object.defineProperty(this,"licenses",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"entitiesById",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"rootElements",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"autoDispose",{enumerable:!0,configurable:!0,writable:!0,value:!1})}}const Ae=new La;function ot(a,e){return a===e?0:a<e?-1:1}function qn(a,e,t){const i=a.length,r=e.length,n=Math.min(i,r);for(let s=0;s<n;++s){const o=t(a[s],e[s]);if(o!==0)return o}return ot(i,r)}class Ca{constructor(e){Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_callbacks",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_disabled",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._entity=e}add(e,t){let i=this._callbacks[e];return i===void 0&&(i=this._callbacks[e]=[]),i.push(t),this._entity._markDirtyKey(e),new re(()=>{ge(i,t)&&this._entity._markDirtyKey(e)})}remove(e){const t=this._callbacks[e];t!==void 0&&(delete this._callbacks[e],t.length!==0&&this._entity._markDirtyKey(e))}enable(e){this._disabled[e]&&(delete this._disabled[e],this._entity._markDirtyKey(e))}disable(e){this._disabled[e]||(this._disabled[e]=!0,this._entity._markDirtyKey(e))}fold(e,t){if(!this._disabled[e]){const i=this._callbacks[e];if(i!==void 0)for(let r=0,n=i.length;r<n;++r)t=i[r](t,this._entity,e)}return t}}class ai{constructor(e,t,i,r,n,s,o){Object.defineProperty(this,"_animation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_from",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_to",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_duration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_easing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_loops",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interpolate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_time",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_stopped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_playing",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Ot}),this._animation=e,this._from=t,this._to=i,this._duration=r,this._easing=n,this._loops=s,this._interpolate=Pa(t,i),this._oldTime=o}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((e,t)=>
1{if(this._stopped)e();else{const i=()=>{r.dispose(),e()},r=this.events.on("stopped",i)}})}_checkEnded(){return this._loops>1?(--this._loops,!1):!0}_run(e){this._oldTime!==null&&(this._time+=e-this._oldTime,this._time>this._duration&&(this._time=this._duration)),this._oldTime=e}_reset(e){this._oldTime=e,this._time=0}_value(e){return this._interpolate(this._easing(e),this._from,this._to)}}let Ma=0;class Jn{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:++Ma}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_privateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_settingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_privateSettingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_prevSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_prevPrivateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_animatingSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_animatingPrivateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_userProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"enableDispose",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this._settings=e}_checkDirty(){te(this._settings).forEach(e=>{this._userProperties[e]=!0,this._markDirtyKey(e)})}resetUserSettings(){this._userProperties={}}_runAnimation(e){let t=at.Stopped;
1if(!this.isDisposed()){let i=!1,r=!1;V(this._animatingSettings,(n,s)=>{if(s.stopped)this._stopAnimation(n);else if(s.playing){s._run(e);const o=s.percentage;o>=1?s._checkEnded()?this.set(n,s._value(1)):(i=!0,s._reset(e),this._set(n,s._value(1))):(i=!0,this._set(n,s._value(o)))}else r=!0}),V(this._animatingPrivateSettings,(n,s)=>{if(s.stopped)this._stopAnimationPrivate(n);else if(s.playing){s._run(e);const o=s.percentage;o>=1?s._checkEnded()?this.setPrivate(n,s._value(1)):(i=!0,s._reset(e),this._setPrivate(n,s._value(1))):(i=!0,this._setPrivate(n,s._value(o)))}else r=!0}),i?t=at.Playing:r&&(t=at.Paused)}return t}_markDirtyKey(e){this.markDirty()}_markDirtyPrivateKey(e){this.markDirty()}on(e,t){let i=this._settingEvents[e];return i===void 0&&(i=this._settingEvents[e]=[]),i.push(t),new re(()=>{ge(i,t),i.length===0&&delete this._settingEvents[e]})}off(e,t){let i=this._settingEvents[e];i!==void 0&&t!==void 0?ge(i,t):delete this._settingEvents[e]}onPrivate(e,t){let i=this._privateSettingEvents[e];return i===void 0&&(i=this._privateSettingEvents[e]=[]),i.push(t),new re(()=>{ge(i,t),i.length===0&&delete this._privateSettingEvents[e]})}offPrivate(e,t){let i=this._privateSettingEvents[e];i!==void 0&&t!==void 0?ge(i,t):delete this._privateSettingEvents[e]}getRaw(e,t){const i=this._settings[e];return i!==void 0?i:t}has(e){return e in this._settings}get(e,t){return this.getRaw(e,t)}_sendKeyEvent(e,t){const i=this._settingEvents[e];i!==void 0&&x(i,r=>{r(t,this,e)})}_sendPrivateKeyEvent(e,t){const i=this._privateSettingEvents[e];i!==void 0&&x(i,r=>{r(t,this,e)})}_setRaw(e,t,i){this._prevSettings[e]=t,this._sendKeyEvent(e,i)}setRaw(e,t){const i=this._settings[e];this._settings[e]=t,i!==t&&this._setRaw(e,i,t)}_set(e,t){const i=this._settings[e];this._settings[e]=t,i!==t&&(this._setRaw(e,i,t),this._markDirtyKey(e))}_stopAnimation(e){const t=this._animatingSettings[e];t&&(delete this._animatingSettings[e],t.stop())}set(e,t){return this._set(e,t),this._stopAnimation(e),t}remove(e){e in this._settings&&(this._prevSettings[e]=this._settings[e],delete this._settings[e],this._sendKeyEvent(e,void 0),this._markDirtyKey(e)),this._stopAnimation(e)}removeAll(){x(te(this._settings),e=>{this.remove(e)})}getPrivate(e,t){const i=this._privateSettings[e];return i!==void 0?i:t}_setPrivateRaw(e,t,i){this._prevPrivateSettings[e]=t,this._sendPrivateKeyEvent(e,i)}setPrivateRaw(e,t){const i=this._privateSettings[e];this._privateSettings[e]=t,i!==t&&this._setPrivateRaw(e,i,t)}_setPrivate(e,t){const i=this._privateSettings[e];this._privateSettings[e]=t,i!==t&&(this._setPrivateRaw(e,i,t),this._markDirtyPrivateKey(e))}_stopAnimationPrivate(e){const t=this._animatingPrivateSettings[e];t&&(t.stop(),delete this._animatingPrivateSettings[e])}setPrivate(e,t){return this._setPrivate(e,t),this._stopAnimationPrivate(e),t}removePrivate(e){e in this._privateSettings&&(this._prevPrivateSettings[e]=this._privateSettings[e],delete this._privateSettings[e],this._markDirtyPrivateKey(e)),this._stopAnimationPrivate(e)}setAll(e){V(e,(t,i)=>{this.set(t,i)})}animate(e){const t=e.key,i=e.to,r=e.duration||0,n=e.loops||1,s=e.from===void 0?this.get(t):e.from,o=e.easing===void 0?an:e.easing;if(r===0)this.set(t,i);else if(s===void 0||s===i)this.set(t,i);else{this.set(t,s);const h=this._animatingSettings[t]=new ai(this,s,i,r,o,n,this._animationTime());return this._startAnimation(),h}const l=new ai(this,s,i,r,o,n,null);return l.stop(),l}animatePrivate(e){const t=e.key,i=e.to,r=e.duration||0,n=e.loops||1,s=e.from===void 0?this.getPrivate(t):e.from,o=e.easing===void 0?an:e.easing;if(r===0)this.setPrivate(t,i);else if(s===void 0||s===i)this.setPrivate(t,i);else{this.setPrivate(t,s);const h=this._animatingPrivateSettings[t]=new ai(this,s,i,r,o,n,this._animationTime());return this._startAnimation(),h}const l=new ai(this,s,i,r,o,n,null);return l.stop(),l}_dispose(){}isDisposed(){return this._disposed}dispose(){this.enableDispose&&!this._disposed&&(this._disposed=!0,this._dispose())}}class ve extends Jn{constructor(e,t,i,r=[]){if(super(t),Object.defineProperty(this,"_root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_user_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"states",{enumerable:!0,configurable:!0,writable:!0,value:new Ea(this)}),Object.defineProperty(this,"adapters",{enumerable:!0,configurable:!0,writable:!0,value:new Ca(this)}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:this._createEvents()}),Object.defineProperty(this,"_userPrivateProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirty",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyPrivate",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_templates",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_internalTemplates",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_defaultThemes",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_templateDisposers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_runSetup",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_disposerProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._root=e,this._internalTemplates=r,t.id&&this._registerId(t.id)}static new(e,t,i){const r=new this(e,t,!0);return r._template=i,r._afterNew(),r}static _new(e,t,i=[]){const r=new this(e,t,!0,i);return r._afterNew(),r}_afterNew(){this._checkDirty();let e=!1;const t=this._template;t&&(e=!0,t._setObjectTemplate(this)),x(this._internalTemplates,i=>{e=!0,i._setObjectTemplate(this)}),e&&this._applyTemplates(!1),this.states.create("default",{}),this._setDefaults()}_afterNewApplyThemes(){this._checkDirty();const e=this._template;e&&e._setObjectTemplate(this),x(this._internalTemplates,t=>{t._setObjectTemplate(this)}),this.states.create("default",{}),this._setDefaults(),this._applyThemes()}_createEvents(){return new Ot}get classNames(){return this.constructor.classNames}get className(){return this.constructor.className}_setDefaults(){}_setDefaultFn(e,t){const i=this.get(e);if(i)return i;{const r=t();return this.set(e,r),r}}_setDefault(e,t){this.has(e)||super.set(e,t)}_setRawDefault(e,t){this.has(e)||super.setRaw(e,t)}
1_clearDirty(){te(this._dirty).forEach(e=>{this._dirty[e]=!1}),te(this._dirtyPrivate).forEach(e=>{this._dirtyPrivate[e]=!1})}isDirty(e){return!!this._dirty[e]}isPrivateDirty(e){return!!this._dirtyPrivate[e]}_markDirtyKey(e){this._dirty[e]=!0,super._markDirtyKey(e)}_markDirtyPrivateKey(e){this._dirtyPrivate[e]=!0,super._markDirtyKey(e)}isType(e){return this.classNames.indexOf(e)!==-1}_pushPropertyDisposer(e,t){let i=this._disposerProperties[e];return i===void 0&&(i=this._disposerProperties[e]=[]),i.push(t),t}_disposeProperty(e){const t=this._disposerProperties[e];t!==void 0&&(x(t,i=>{i.dispose()}),delete this._disposerProperties[e])}set template(e){const t=this._template;t!==e&&(this._template=e,t&&t._removeObjectTemplate(this),e&&e._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(e){}_applyStateAnimated(e,t){}get(e,t){const i=this.adapters.fold(e,this._settings[e]);return i!==void 0?i:t}isUserSetting(e){return this._userProperties[e]||!1}set(e,t){return this._userProperties[e]=!0,super.set(e,t)}setRaw(e,t){this._userProperties[e]=!0,super.setRaw(e,t)}_setSoft(e,t){return this._userProperties[e]?t:super.set(e,t)}remove(e){delete this._userProperties[e],this._removeTemplateProperty(e)}setPrivate(e,t){return this._userPrivateProperties[e]=!0,super.setPrivate(e,t)}setPrivateRaw(e,t){this._userPrivateProperties[e]=!0,super.setPrivateRaw(e,t)}removePrivate(e){delete this._userPrivateProperties[e],this._removeTemplatePrivateProperty(e)}_setTemplateProperty(e,t,i){if(!this._userProperties[t]){const r=this._findTemplateByKey(t);e===r&&super.set(t,i)}}_setTemplatePrivateProperty(e,t,i){if(!this._userPrivateProperties[t]){const r=this._findTemplateByPrivateKey(t);e===r&&super.setPrivate(t,i)}}_removeTemplateProperty(e){if(!this._userProperties[e]){const t=this._findTemplateByKey(e);t?super.set(e,t._settings[e]):super.remove(e)}}_removeTemplatePrivateProperty(e){if(!this._userPrivateProperties[e]){const t=this._findTemplateByPrivateKey(e);t?super.setPrivate(e,t._privateSettings[e]):super.removePrivate(e)}}_walkParents(e){e(this._root._rootContainer),e(this)}_applyStateByKey(e){const t=this.states.create(e,{}),i={};this._eachTemplate(r=>{const n=r.states.lookup(e);n&&n._apply(t,i)}),V(t._settings,r=>{!i[r]&&!t._userSettings[r]&&t.remove(r)})}_applyTemplate(e,t){this._templateDisposers.push(e._apply(this,t)),V(e._settings,(i,r)=>{!t.settings[i]&&!this._userProperties[i]&&(t.settings[i]=!0,super.set(i,r))}),V(e._privateSettings,(i,r)=>{!t.privateSettings[i]&&!this._userPrivateProperties[i]&&(t.privateSettings[i]=!0,super.setPrivate(i,r))}),this._runSetup&&e.setup&&(this._runSetup=!1,e.setup(this))}_findStaticTemplate(e){if(this._template&&e(this._template))return this._template}_eachTemplate(e){this._findStaticTemplate(t=>(e(t),!1)),Ht(this._internalTemplates,e),x(this._templates,e)}_applyTemplates(e=!0){e&&this._disposeTemplates();const t={settings:{},privateSettings:{},states:{}};this._eachTemplate(i=>{this._applyTemplate(i,t)}),e&&(V(this._settings,i=>{!this._userProperties[i]&&!t.settings[i]&&super.remove(i)}),V(this._privateSettings,i=>{!this._userPrivateProperties[i]&&!t.privateSettings[i]&&super.removePrivate(i)}))}_findTemplate(e){const t=this._findStaticTemplate(e);if(t===void 0){const i=Ys(this._internalTemplates,e);return i===void 0?Fr(this._templates,e):i}else return t}_findTemplateByKey(e){return this._findTemplate(t=>e in t._settings)}_findTemplateByPrivateKey(e){return this._findTemplate(t=>e in t._privateSettings)}_disposeTemplates(){x(this._templateDisposers,e=>{e.dispose()}),this._templateDisposers.length=0}_removeTemplates(){x(this._templates,e=>{e._removeObjectTemplate(this)}),this._templates.length=0}_applyThemes(e=!1){let t=!1;const i=[];let r=[];const n=new Set,s=this.get("themeTagsSelf");return s&&x(s,o=>{n.add(o)}),this._walkParents(o=>{o===this._root._rootContainer&&(t=!0),o._defaultThemes.length>0&&i.push(o._defaultThemes);const l=o.get("themes");l&&r.push(l);const h=o.get("themeTags");h&&x(h,u=>{n.add(u)})}),r=i.concat(r),this._removeTemplates(),(t||e)&&Ht(this.classNames,o=>{const l=[];x(r,h=>{x(h,u=>{const c=u._lookupRules(o);c&&Ht(c,d=>{if(d.tags.every(p=>n.has(p))){const p=Vs(l,b=>{const g=ot(d.tags.length,b.tags.length);return g===0?qn(d.tags,b.tags,ot):g});l.splice(p.index,0,d)}})})}),x(l,h=>{this._templates.push(h.template),h.template._setObjectTemplate(this)})}),this._applyTemplates(),(t||e)&&(this._runSetup=!1),t||e}_changed(){}_beforeChanged(){if(this.isDirty("id")){const e=this.get("id");e&&this._registerId(e);const t=this._prevSettings.id;t&&(delete this._root.entitiesById[t],delete Ae.entitiesById[t])}}_registerId(e){if(this._root.entitiesById[e]&&this._root.entitiesById[e]!==this)throw new Error('An entity with id "'+e+'" already exists.');this._root.entitiesById[e]=this,Ae.entitiesById[e]=this}_afterChanged(){}addDisposer(e){return this._disposers.push(e),e}_dispose(){super._dispose();const e=this._template;e&&e._removeObjectTemplate(this),x(this._internalTemplates,i=>{i._removeObjectTemplate(this)}),this._removeTemplates(),this._disposeTemplates(),this.events.dispose(),this._disposers.forEac
1h(i=>{i.dispose()}),V(this._disposerProperties,(i,r)=>{x(r,n=>{n.dispose()})});const t=this.get("id");t&&(delete this._root.entitiesById[t],delete Ae.entitiesById[t])}setTimeout(e,t){const i=setTimeout(()=>{this.removeDispose(r),e()},t),r=new re(()=>{clearTimeout(i)});return this._disposers.push(r),r}removeDispose(e){if(!this.isDisposed()){let t=Nt(this._disposers,e);t>-1&&this._disposers.splice(t,1)}e.dispose()}hasTag(e){return Nt(this.get("themeTags",[]),e)!==-1}addTag(e){if(!this.hasTag(e)){const t=this.get("themeTags",[]);t.push(e),this.set("themeTags",t)}}removeTag(e){if(this.hasTag(e)){const t=this.get("themeTags",[]);Me(t,e),this.set("themeTags",t)}}_t(e,t,...i){return this._root.language.translate(e,t,...i)}get root(){return this._root}}Object.defineProperty(ve,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Entity"});Object.defineProperty(ve,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:["Entity"]});function dr(a){V(a,(e,t)=>{St(t)&&typeof t.dispose=="function"&&(t.enableDispose=!0,t.dispose())})}class Ba{constructor(e,t,i){Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._name=e,this._template=t,this._settings=i}_dispose(){dr(this._settings)}get(e,t){const i=this._settings[e];return i!==void 0?i:t}set(e,t){this._settings[e]=t,this._template._stateChanged(this._name)}remove(e){delete this._settings[e],this._template._stateChanged(this._name)}setAll(e){te(e).forEach(t=>{this._settings[t]=e[t]}),this._template._stateChanged(this._name)}_apply(e,t){V(this._settings,(i,r)=>{!t[i]&&!e._userSettings[i]&&(t[i]=!0,e.setRaw(i,r))})}}class ja{constructor(e){Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_states",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._template=e}_dispose(){V(this._states,(e,t)=>{t._dispose()})}lookup(e){return this._states[e]}create(e,t){const i=this._states[e];if(i)return i.setAll(t),i;{const r=new Ba(e,this._template,t);return this._states[e]=r,this._template._stateChanged(e),r}}remove(e){delete this._states[e],this._template._stateChanged(e)}_apply(e,t){V(this._states,(i,r)=>{let n=t.states[i];n==null&&(n=t.states[i]={});const s=e.states.create(i,{});r._apply(s,n)})}}class Ha{constructor(){Object.defineProperty(this,"_callbacks",{enumerable:!0,configurable:!0,writable:!0,value:{}})}add(e,t){let i=this._callbacks[e];return i===void 0&&(i=this._callbacks[e]=[]),i.push(t),new re(()=>{ge(i,t),i.length===0&&delete this._callbacks[e]})}remove(e){this._callbacks[e]!==void 0&&delete this._callbacks[e]}_apply(e){const t=[];return V(this._callbacks,(i,r)=>{x(r,n=>{t.push(e.adapters.add(i,n))})}),new De(t)}}class vt{constructor(e,t){if(Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_privateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_settingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_privateSettingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_entities",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"states",{enumerable:!0,configurable:!0,writable:!0,value:new ja(this)}),Object.defineProperty(this,"adapters",{enumerable:!0,configurable:!0,writable:!0,value:new Ha}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Ot}),Object.defineProperty(this,"setup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=e}static new(e){return new vt(e,!0)}_dispose(){dr(this._settings),dr(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(e,t){this._checkDisposed();const i=this._settings[e];return i!==void 0?i:t}setRaw(e,t){this._checkDisposed(),this._settings[e]=t}set(e,t){this._checkDisposed(),this._settings[e]!==t&&(this.setRaw(e,t),this._entities.forEac
1h(i=>{i._setTemplateProperty(this,e,t)}))}remove(e){this._checkDisposed(),e in this._settings&&(delete this._settings[e],this._entities.forEach(t=>{t._removeTemplateProperty(e)}))}removeAll(){this._checkDisposed(),V(this._settings,(e,t)=>{this.remove(e)})}getPrivate(e,t){this._checkDisposed();const i=this._privateSettings[e];return i!==void 0?i:t}setPrivateRaw(e,t){return this._checkDisposed(),this._privateSettings[e]=t,t}setPrivate(e,t){return this._checkDisposed(),this._privateSettings[e]!==t&&(this.setPrivateRaw(e,t),this._entities.forEach(i=>{i._setTemplatePrivateProperty(this,e,t)})),t}removePrivate(e){this._checkDisposed(),e in this._privateSettings&&(delete this._privateSettings[e],this._entities.forEach(t=>{t._removeTemplatePrivateProperty(e)}))}setAll(e){this._checkDisposed(),V(e,(t,i)=>{this.set(t,i)})}on(e,t){this._checkDisposed();let i=this._settingEvents[e];return i===void 0&&(i=this._settingEvents[e]=[]),i.push(t),new re(()=>{ge(i,t),i.length===0&&delete this._settingEvents[e]})}onPrivate(e,t){this._checkDisposed();let i=this._privateSettingEvents[e];return i===void 0&&(i=this._privateSettingEvents[e]=[]),i.push(t),new re(()=>{ge(i,t),i.length===0&&delete this._privateSettingEvents[e]})}_apply(e,t){this._checkDisposed();const i=[];return V(this._settingEvents,(r,n)=>{x(n,s=>{i.push(e.on(r,s))})}),V(this._privateSettingEvents,(r,n)=>{x(n,s=>{i.push(e.onPrivate(r,s))})}),this.states._apply(e,t),i.push(this.adapters._apply(e)),i.push(e.events.copyFrom(this.events)),new De(i)}_setObjectTemplate(e){this._checkDisposed(),this._entities.push(e)}_removeObjectTemplate(e){Me(this._entities,e)}_stateChanged(e){this._checkDisposed(),this._entities.forEach(t=>{t._applyStateByKey(e)})}}class Yi extends Ot{constructor(e){super(),Object.defineProperty(this,"_sprite",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rendererDisposers",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dispatchParents",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this._sprite=e}_makePointerEvent(e,t){return{type:e,originalEvent:t.event,point:t.point,simulated:t.simulated,native:t.native,target:this._sprite}}_onRenderer(e,t){this._sprite.set("interactive",!0),this._sprite._display.interactive=!0;let i=this._rendererDisposers[e];if(i===void 0){const r=this._sprite._display.on(e,n=>{t.call(this,n)});i=this._rendererDisposers[e]=new Fn(()=>{delete this._rendererDisposers[e],r.dispose()})}return i.increment()}_on(e,t,i,r,n,s,o){const l=super._on(e,t,i,r,n,s,o),h=Yi.RENDERER_EVENTS[t];return h!==void 0&&(l.disposer=new De([l.disposer,this._onRenderer(t,h)])),l}stopParentDispatch(){this._dispatchParents=!1}dispatchParents(e,t){const i=this._dispatchParents;this._dispatchParents=!0;try{this.dispatch(e,t),this._dispatchParents&&this._sprite.parent&&this._sprite.parent.events.dispatchParents(e,t)}finally{this._dispatchParents=i}}}Object.defineProperty(Yi,"RENDERER_EVENTS",{enumerable:!0,configurable:!0,writable:!0,value:{click:function(a){this.isEnabled("click")&&!this._sprite.isDragging()&&this._sprite._hasDown()&&!this._sprite._hasMoved(this._makePointerEvent("click",a))&&this.dispatch("click",this._makePointerEvent("click",a))},rightclick:function(a){this.isEnabled("rightclick")&&this.dispatch("rightclick",this._makePointerEvent("rightclick",a))},middleclick:function(a){this.isEnabled("middleclick")&&this.dispatch("middleclick",this._makePointerEvent("middleclick",a))},dblclick:function(a){this.dispatchParents("dblclick",this._makePointerEvent("dblclick",a))},pointerover:function(a){const e=this._sprite;let t=!0;if(e.getPrivate("trustBounds")){e._getBounds();const i=e.globalBounds();if(e.isType("Graphics")){const r=e.get("strokeWidth",1)/2;r>=1&&(i.left-=r,i.right+=r,i.top-=r,i.bottom+=r)}Ta(a.point,i)||(t=!1,e._root._renderer.removeHovering(e._display))}t&&this.isEnabled("pointerover")&&this.dispatch("pointerover",this._makePointerEvent("pointerover",a))},pointerout:function(a){this.isEnabled("pointerout")&&this.dispatch("pointerout",this._makePointerEvent("pointerout",a))},pointerdown:function(a){this.dispatchParents("pointerdown",this._makePointerEvent("pointerdown",a))},pointerup:function(a){this.isEnabled("pointerup")&&this.dispatch("pointerup",this._makePointerEvent("pointerup",a))},globalpointerup:function(a){this.isEnabled("globalpointerup")&&this.dispatch("globalpointerup",this._makePointerEvent("globalpointerup",a))},globalpointermove:function(a){this.isEnabled("globalpointermove")&&this.dispatch("globalpointermove",this._makePointerEvent("globalpointermove",a))},wheel:function(a){this.dispatchParents("wheel",{type:"wheel",target:this._sprite,originalEvent:a.event,point:a.point})}}});class Ee extends ve{constructor(){super(...arguments),Object.defineProperty(this,"_adjustedLocalBounds",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_localBounds",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dataItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_templateField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_sizeDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dragEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dragPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isHidden",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isShowing",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isHiding",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDown",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_downPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downPoints",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_toggleDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dragDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hoverDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_focusDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipMoveDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipPointerDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_virtualParent",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this.setPrivateRaw("visible",!0),super._afterNew()}markDirtyKey(e){this._markDirtyKey(e)}_markDirtyKey(e){super._markDirtyKey(e),(e=="x"||e=="y"||e=="dx"||e=="dy")&&(this.markDirtyBounds(),this._addPercentagePositionChildren(),this.markDirtyPosition())}_markDirtyPrivateKey(e){super._markDirtyPrivateKey(e),(e=="x"||e=="y")&&this.markDirtyPosition()}_removeTemplateField(){this._templateField&&this._templateField._removeObjectTemplate(this)}_createEvents(){return new Yi(this)}_processTemplateField(){let e;const t=this.get("templateField");if(t){const i=this.dataItem;if(i){const r=i.dataContext;r&&(e=r[t],!(e instanceof vt)&&e&&(e=vt.new(e)))}}this._templateField!==e&&(this._removeTemplateField(),this._templateField=e,e&&e._setObjectTemplate(this),this._applyTemplates())}_setDataItem(e){const t=this._dataItem;this._dataItem=e,this._processTemplateField();const i="dataitemchanged";e!=t&&this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,oldDataItem:t,newDataItem:e})}set dataItem(e){this._setDataItem(e)}get dataItem(){if(this._dataItem)return this._dataItem;{let e=this._parent;for(;e;){if(e._dataItem)return e._dataItem;e=e._parent}}}_addPercentageSizeChildren(){let e=this.parent;e&&(this.get("width")instanceof F||this.get("height")instanceof F?zt(e._percentageSizeChildren,this):ge(e._percentageSizeChildren,this))}_addPercentagePositionChildren(){let e=this.parent;e&&(this.get("x")instanceof F||this.get("y")instanceof F?zt(e._percentagePositionChildren,this):ge(e._percentagePositionChildren,this))}markDirtyPosition(){this._root._addDirtyPosition(this)}updatePivotPoint(){const e=this._localBounds;if(e){const t=this.get("centerX");t!=null&&(this._display.pivot.x=e.left+Xe(t,e.right-e.left));const i=this.get("centerY");i!=null&&(this._display.pivot.y=e.top+Xe(i,e.bottom-e.top))}}_beforeChanged(){if(super._beforeChanged(),this._handleStates(),this.isDirty("tooltip")){const e=this._prevSettings.tooltip;e&&e.dispose()}if((this.isDirty("layer")||this.isDirty("layerMargin"))&&(this._display.setLayer(this.get("layer"),this.get("layerMargin")),this.markDirtyLayer()),this.isDirty("tooltipPosition")){const e=this._tooltipMoveDp;
1e&&(e.dispose(),this._tooltipMoveDp=void 0);const t=this._tooltipPointerDp;t&&(t.dispose(),this._tooltipPointerDp=void 0),this.get("tooltipPosition")=="pointer"&&(this.isHover()&&(this._tooltipMoveDp=this.events.on("globalpointermove",i=>{this.showTooltip(i.point)})),this._tooltipPointerDp=new De([this.events.on("pointerover",()=>{this._tooltipMoveDp=this.events.on("globalpointermove",i=>{this.showTooltip(i.point)})}),this.events.on("pointerout",()=>{const i=this._tooltipMoveDp;i&&(i.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 e=this._display,t=this.events;if(this.isDirty("draggable")){const r=this.get("draggable");r?(this.set("interactive",!0),this._dragDp=new De([t.on("pointerdown",n=>{this.dragStart(n)}),t.on("globalpointermove",n=>{this.dragMove(n)}),t.on("globalpointerup",n=>{this.dragStop(n)})])):this._dragDp&&(this._dragDp.dispose(),this._dragDp=void 0),e.cancelTouch=!!r}if(this.isDirty("tooltipText")||this.isDirty("tooltipHTML")||this.isDirty("showTooltipOn")){const r=this.get("tooltipText"),n=this.get("tooltipHTML"),s=this.get("showTooltipOn","hover");this._tooltipDp&&(this._tooltipDp.dispose(),this._tooltipDp=void 0),(r||n)&&(s=="click"?(this._tooltipDp=new De([t.on("click",()=>{this.setTimeout(()=>{const o=this.getTooltip();o&&!o.isHidden()&&o.get("tooltipTarget")===this?this.hideTooltip():this.showTooltip()},10)}),Q(document,"click",o=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)):s=="always"||(this._tooltipDp=new De([t.on("pointerover",()=>{this.showTooltip()}),t.on("pointerout",()=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)))}if(this.isDirty("toggleKey")){let r=this.get("toggleKey");r&&r!="none"?this._toggleDp=t.on("click",()=>{this._isDragging||this.set(r,!this.get(r))}):this._toggleDp&&(this._toggleDp.dispose(),this._toggleDp=void 0)}if(this.isDirty("opacity")&&(e.alpha=Math.max(0,this.get("opacity",1)),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("rotation")&&(this.markDirtyBounds(),e.angle=this.get("rotation",0)),this.isDirty("scale")&&(this.markDirtyBounds(),e.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")?(e.visible=!1,this.hideTooltip()):e.visible=!0,this.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("width")||this.isDirty("height")){this.markDirtyBounds(),this._addPercentageSizeChildren();const r=this.parent;r&&(this.isDirty("width")&&this.get("width")instanceof F||this.isDirty("height")&&this.get("height")instanceof F)&&(r.markDirty(),r._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 r=this.get("wheelable");r&&this.set("interactive",!0),e.wheelable=!!r}(this.isDirty("tabindexOrder")||this.isDirty("focusableGroup"))&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this)),this.isDirty("filter")&&(e.filter=this.get("filter"));let i=this.get("filter","");if(this.isDirty("blur")){const r=this.get("blur",0);r!=0&&(i+=" blur("+r+"px)")}if(this.isDirty("saturate")){const r=this.get("saturate",1);r!=1&&(i+=" saturate("+r+")")}if(this.isDirty("brightness")){const r=this.get("brightness",1);r!=1&&(i+=" brightness("+r+")")}if(this.isDirty("contrast")){const r=this.get("contrast",1);r!=1&&(i+=" contrast("+r+")")}if(this.isDirty("sepia")){const r=this.get("sepia",0);r!=0&&(i+=" sepia("+r+")")}if(this.isDirty("hue")){const r=this.get("hue",0);r!=0&&(i+=" hue-rotate("+r+"deg)")}if(this.isDirty("invert")){const r=this.get("invert",0);r!=0&&(i+=" invert("+r+")")}if(i&&(e.filter=i),this.isDirty("cursorOverStyle")&&(e.cursorOverStyle=this.get("cursorOverStyle")),this.isDirty("hoverOnFocus")&&(this.get("hoverOnFocus")?this._focusDp=new De([t.on("focus",()=>{this.showTooltip()}),t.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(t.on("blur",()=>{this.setPrivateRaw("touchHovering",!1)})),this._disposers.push(t.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")&&(e.exportable=this.get("exportable")),this.isDirty("interactive")){const r=this.events;this.get("interactive")&&!r.isDisposed()?this._hoverDp=new De([r.on("click",n=>{Qr(n.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:n.target,originalEvent:n.originalEvent,point:n.point,simulated:n.simulated})},10))}),r.on("globalpointerup",n=>{Qr(n.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:n.target,originalEvent:n.originalEvent,point:n.point,simulated:n.simulated})),this._isDown&&this._handleUp(n)}),r.on("pointerover",()=>{this._handleOver()}),r.on("pointerout",()=>{this._handleOut()}),r.on("pointerdown",n=>{this._handleDown(n)})]):(this._display.interactive=!1,this._hoverDp&&(this._hoverDp.dispose(),this._hoverDp=void 0))}this.isDirty("forceInactive")&&(this._display.inactive=this.get("forceInactive",null)),this.get("showTooltipOn")=="always"&&this._display.visible&&this.showTooltip()}dragStart(e){this._dragEvent=e,this.events.stopParentDispatch()}dragStop(e){if(this._dragEvent=void 0,this._dragPoint=void 0,this.events.stopParentDispatch(),this._isDragging){this._isDragging=!1;const t="dragstop";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.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(e){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 t=Ki(e.originalEvent);delete this._downPoints[t],te(this._downPoints).length==0&&(this._isDown=!1)}}_hasMoved(e){const t=Ki(e.originalEvent),i=this._downPoints[t];if(i){const r=Math.abs(i.x-e.point.x),n=Math.abs(i.y-e.point.y);return r>5||n>5}return!1}_hasDown(){return te(this._downPoints).length>0}_handleDown(e){const t=this.parent;if(t&&!this.get("draggable")&&t._handleDown(e),this.get("interactive")&&!this.isHidden()){this.states.lookup("down")&&this.states.applyAnimate("down"),this._downPoint={x:e.point.x,y:e.point.y},this._isDown=!0;const i=Ki(e.originalEvent);this._downPoints[i]={x:e.point.x,y:e.point.y}}}dragMove(e){let t=this._dragEvent;if(t){if(t.simulated&&!e.simulated)return!0;let i=0,r=this.parent,n=1;for(;r!=null;)i+=r.get("rotation",0),r=r.parent,r&&(n*=r.get("scale",1));let s=(e.point.x-t.point.x)/n,o=(e.point.y-t.point.y)/n;const l=this.events;if(t.simulated&&!this._isDragging){this._isDragging=!0,this._dragEvent=e,this._dragPoint={x:this.x(),y:this.y()};const h="dragstart";l.isEnabled(h)&&l.dispatch(h,{type:h,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}if(this._isDragging){let h=this._dragPoint;this.set("x",h.x+s*cr(i)+o*hr(i)),this.set("y",h.y+o*cr(i)-s*hr(i));const u="dragged";l.isEnabled(u)&&l.dispatch(u,{type:u,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}else if(Math.hypot(s,o)>5){this._isDragging=!0,this._dragEvent=e,this._dragPoint={x:this.x(),y:this.y()};const h="dragstart";l.isEnabled(h)&&l.dispatch(h,{type:h,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}}}_updateSize(){}_getBounds(){this._localBounds=this._display.getLocalBounds()}depth(){let e=this.parent,t=0;for(;;)if(e)++t,e=e.parent;else return t}markDirtySize(){this._sizeDirty=!0,this.markDirty()}markDirtyBounds(){const e=this._display;
1if(this.get("isMeasured")){this._root._addDirtyBounds(this),e.isMeasured=!0,e.invalidateBounds();const t=this.parent;t&&this.get("position")!="absolute"&&(t.get("width")==null||t.get("height")==null||t.get("layout"))&&t.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()}}markDirtyAccessibility(){this._root._invalidateAccessibility(this)}markDirtyLayer(){this._display.markDirtyLayer(!0)}markDirty(){super.markDirty(),this.markDirtyLayer()}_updateBounds(){const e=this._adjustedLocalBounds;let t;if(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden")?(t={left:0,right:0,top:0,bottom:0},this._localBounds=t,this._adjustedLocalBounds=t):(this._getBounds(),this._fixMinBounds(this._localBounds),this.updatePivotPoint(),this._adjustedLocalBounds=this._display.getAdjustedBounds(this._localBounds),t=this._adjustedLocalBounds),!e||e.left!==t.left||e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom){const i="boundschanged";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this}),this.parent&&(this.parent.markDirty(),this.parent.markDirtyBounds()),this.getPrivate("showingTooltip")&&this.showTooltip()}}_fixMinBounds(e){let t=this.get("minWidth",this.getPrivate("minWidth")),i=this.get("minHeight",this.getPrivate("minHeight"));M(t)&&e.right-e.left<t&&(e.right=e.left+t),M(i)&&e.bottom-e.top<i&&(e.bottom=e.top+i);let r=this.getPrivate("width"),n=this.getPrivate("height");M(r)&&(r>0?e.right=e.left+r:e.left=e.right+r),M(n)&&(n>0?e.bottom=e.top+n:e.top=e.bottom+n)}_removeParent(e){e&&(e.children.removeValue(this),ge(e._percentageSizeChildren,this),ge(e._percentagePositionChildren,this))}_clearDirty(){super._clearDirty(),this._sizeDirty=!1}hover(){this.isDisposed()||(this.showTooltip(),this._handleOver())}unhover(){this.isDisposed()||(this.hideTooltip(),this._handleOut())}showTooltip(e){if(!this.isDisposed()){const t=this.getTooltip(),i=this.get("tooltipText"),r=this.get("tooltipHTML");if((i||r)&&t){const n=this.get("tooltipPosition"),s=this.getPrivate("tooltipTarget",this);if((n=="fixed"||!e)&&(this._display._setMatrix(),e=this.toGlobal(s._getTooltipPoint())),n=="pointer"){const h=this.getPrivate("lastTooltipCoords");if(h&&h.x==e.x&&h.y==e.y)return;this.setPrivate("lastTooltipCoords",e)}t.set("pointTo",e),t.set("tooltipTarget",s),t.get("x")||t.set("x",e.x),t.get("y")||t.set("y",e.y),i&&t.label.set("text",i),r&&t.label.set("html",r);const o=this.dataItem;if(o&&t.label._setDataItem(o),this.get("showTooltipOn")=="always"&&(e.x<0||e.x>this._root.width()||e.y<0||e.y>this._root.height())){this.hideTooltip();return}t.label.text.markDirtyText();const l=t.show();return this.setPrivateRaw("showingTooltip",!0),l}}}hideTooltip(){const e=this.getTooltip();if(e&&(this.removePrivate("lastTooltipCoords"),e.get("tooltipTarget")==this.getPrivate("tooltipTarget",this)||this.get("tooltip")==e)){let t=e.get("keepTargetHover")&&e.get("stateAnimationDuration",0)==0?400:void 0;const i=e.hide(t);return this.setPrivateRaw("showingTooltip",!1),i}}_getTooltipPoint(){const e=this._localBounds;if(e){let t=0,i=0;return this.get("isMeasured")?(t=e.left+Xe(this.get("tooltipX",0),e.right-e.left),i=e.top+Xe(this.get("tooltipY",0),e.bottom-e.top)):(t=Xe(this.get("tooltipX",0),this.width()),i=Xe(this.get("tooltipY",0),this.height())),{x:t,y:i}}return{x:0,y:0}}getTooltip(){let e=this.get("tooltip");if(e)return e;{let t=this.parent;if(t)return t.getTooltip()}}_updatePosition(){const e=this.parent;let t=this.get("dx",0),i=this.get("dy",0),r=this.get("x"),n=this.getPrivate("x"),s=0,o=0;const l=this.get("position");r instanceof F&&(e?r=e.innerWidth()*r.value+e.get("paddingLeft",0):r=0),M(r)?s=r+t:n!=null?s=n:e&&l=="relative"&&(s=e.get("paddingLeft",0)+t);let h=this.get("y"),u=this.getPrivate("y");h instanceof F&&(e?h=e.innerHeight()*h.value+e.get("paddingTop",0):h=0),M(h)?o=h+i:u!=null?o=u:e&&l=="relative"&&(o=e.get("paddingTop",0)+i);const c=this._display;if(c.x!=s||c.y!=o){c.invalidateBounds(),c.x=s,c.y=o;const d="positionchanged";this.events.isEnabled(d)&&this.events.dispatch(d,{type:d,target:this})}this.getPrivate("showingTooltip")&&this.showTooltip()}x(){let e=this.get("x"),t=this.getPrivate("x");const i=this.parent;return i?e instanceof F?Xe(e,i.innerWidth())+i.get("paddingLeft",0):M(e)?e:t??i.get("paddingLeft",this._display.x):this._display.x}y(){let e=this.getPrivate("y");if(e!=null)return e;let t=this.get("y");const i=this.parent;return i?t instanceof F?Xe(t,i.innerHeight())+i.get("paddingTop",0):M(t)?t:e??i.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 e=this.get("tooltip");e&&e.dispose(),this.markDirty()}adjustedLocalBounds(){return this._fixMinBounds(this._adjustedLocalBounds),this._adjustedLocalBounds}localBounds(){return this._localBounds}bounds(){const e=this._adjustedLocalBounds,t=this.x(),i=this.y();
1return{left:e.left+t,right:e.right+t,top:e.top+i,bottom:e.bottom+i}}globalBounds(){const e=this.localBounds(),t=this.toGlobal({x:e.left,y:e.top}),i=this.toGlobal({x:e.right,y:e.top}),r=this.toGlobal({x:e.right,y:e.bottom}),n=this.toGlobal({x:e.left,y:e.bottom});return{left:Math.min(t.x,i.x,r.x,n.x),top:Math.min(t.y,i.y,r.y,n.y),right:Math.max(t.x,i.x,r.x,n.x),bottom:Math.max(t.y,i.y,r.y,n.y)}}_onShow(e){}_onHide(e){}appear(e,t){return Re(this,void 0,void 0,function*(){return yield this.hide(0),t?new Promise((i,r)=>{this.setTimeout(()=>{i(this.show(e))},t)}):this.show(e)})}show(e){return Re(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(e);const t=this.states.applyAnimate("default",e);yield sn(t),this._isShowing=!1}})}hide(e){return Re(this,void 0,void 0,function*(){if(!this._isHiding&&!this._isHidden){this._isHiding=!0,this._isShowing=!1;let t=this.states.lookup("hidden");t||(t=this.states.create("hidden",{opacity:0,visible:!1})),this._isHidden=!0,this._onHide(e);const i=this.states.applyAnimate("hidden",e);yield sn(i),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 e=this.get("opacity",1);return this._parent?this._parent.compositeOpacity()*e:e}compositeScale(){const e=this.get("scale",1);return this._parent?this._parent.compositeScale()*e:e}compositeRotation(){const e=this.get("rotation",0);return this._parent?this._parent.compositeRotation()+e:e}width(){let e=this.get("width"),t=this.get("maxWidth",this.getPrivate("maxWidth")),i=this.get("minWidth",this.getPrivate("minWidth")),r=this.getPrivate("width"),n=0;if(M(r))n=r;else if(e==null)this._adjustedLocalBounds&&(n=this._adjustedLocalBounds.right-this._adjustedLocalBounds.left);else if(e instanceof F){const s=this.parent;s?n=s.innerWidth()*e.value:n=this._root.width()*e.value}else M(e)&&(n=e);return M(i)&&(n=Math.max(i,n)),M(t)&&(n=Math.min(t,n)),n}maxWidth(){let e=this.get("maxWidth",this.getPrivate("maxWidth"));if(M(e))return e;{let i=this.get("width");if(M(i))return i}const t=this.parent;return t?t.innerWidth():this._root.width()}maxHeight(){let e=this.get("maxHeight",this.getPrivate("maxHeight"));if(M(e))return e;{let i=this.get("height");if(M(i))return i}const t=this.parent;return t?t.innerHeight():this._root.height()}height(){let e=this.get("height"),t=this.get("maxHeight",this.getPrivate("maxHeight")),i=this.get("minHeight",this.getPrivate("minHeight")),r=this.getPrivate("height"),n=0;if(M(r))n=r;else if(e==null)this._adjustedLocalBounds&&(n=this._adjustedLocalBounds.bottom-this._adjustedLocalBounds.top);else if(e instanceof F){const s=this.parent;s?n=s.innerHeight()*e.value:n=this._root.height()*e.value}else M(e)&&(n=e);return M(i)&&(n=Math.max(i,n)),M(t)&&(n=Math.min(t,n)),n}_findStaticTemplate(e){return this._templateField&&e(this._templateField)?this._templateField:super._findStaticTemplate(e)}_walkParents(e){(this._parent||this._virtualParent)&&this._walkParent(e)}_walkParent(e){this._parent?this._parent._walkParent(e):this._virtualParent&&this._virtualParent._walkParent(e),e(this)}set virtualParent(e){this._virtualParent=e,this._applyThemes()}get parent(){return this._parent}_setParent(e,t=!1){const i=this._parent;e!==i&&(this.markDirtyBounds(),e.markDirty(),this._parent=e,t&&(this._removeParent(i),e&&(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(e){return this._display.toGlobal(e)}toLocal(e){return this._display.toLocal(e)}_getDownPoint(){const e=this._getDownPointId();if(e)return this._downPoints[e]}_getDownPointId(){if(this._downPoints)return Xs(this._downPoints,(e,t)=>e>t?1:e<t?-1:0)[0]}toFront(){const e=this.parent;e&&e.children.moveValue(this,e.children.length-1)}toBack(){const e=this.parent;e&&e.children.moveValue(this,0)}}Object.defineProperty(Ee,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Sprite"});Object.defineProperty(Ee,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ve.classNames.c
1oncat([Ee.className])});class Gt extends ve{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_backgroundDisplay",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_clear",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_pattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_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 e=this.get("repetition",""),t=this.get("width",100),i=this.get("height",100),r=this.get("fill"),n=this.get("fillOpacity",1),s=this._backgroundDisplay,o=this._display;o.clear(),s.clear(),r&&n>0&&(s.beginFill(r,n),s.drawRect(0,0,t,i),s.endFill()),o.angle=this.get("rotation",0),this._draw(),this._pattern=this._root._renderer.createPattern(o,s,e,t,i)}this._clear=!1}}Object.defineProperty(Gt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Pattern"});Object.defineProperty(Gt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ve.classNames.concat([Gt.className])});class Wt extends Gt{constructor(){super(...arguments),Object.defineProperty(this,"_image",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_beforeChanged(){super._beforeChanged(),this._clear=!0,this.isDirty("src")&&this._load();const e=this.get("canvas");e&&(this.set("width",e.width),this.set("height",e.height))}_draw(){super._draw();const e=this.get("colorOpacity");e!==void 0&&(this._display.alpha=Math.max(0,e));const t=this._image;if(t){const r=this.get("width",100),n=this.get("height",100),s=this.get("fit","image");let o=0,l=0;s=="pattern"?(o=r,l=n,this.markDirty()):(o=t.width,l=t.height,s=="image"&&(this.set("width",o),this.set("height",l)));const h=this.get("centered",!0);let u=0,c=0;h&&(u=r/2-o/2,c=n/2-l/2),this._display.image(t,o,l,u,c)}const i=this.get("canvas");i&&this._display.image(i,i.width,i.height,0,0)}_load(){const e=this.get("src");if(e){const t=new Image;t.src=e,t.decode().then(()=>{this._image=t,this._draw(),this.events.isEnabled("loaded")&&this.events.dispatch("loaded",{type:"loaded",target:this})}).catch(i=>{})}}}Object.defineProperty(Wt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"PicturePattern"});Object.defineProperty(Wt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Gt.classNames.concat([Wt.className])});var bi;(function(a){a.ADD="lighter",a.COLOR="color",a.COLOR_BURN="color-burn",a.COLOR_DODGE="color-dodge",a.DARKEN="darken",a.DIFFERENCE="difference",a.DST_OVER="destination-over",a.EXCLUSION="exclusion",a.HARD_LIGHT="hard-light",a.HUE="hue",a.LIGHTEN="lighten",a.LUMINOSITY="luminosity",a.MULTIPLY="multiply",a.NORMAL="source-over",a.OVERLAY="overlay",a.SATURATION="saturation",a.SCREEN="screen",a.SOFT_LIGHT="soft-light",a.SRC_ATOP="source-atop",a.XOR="xor"})(bi||(bi={}));class Le extends Ee{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_clear",{enumerable:!0,configurable:!0,writable:!0,value:!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 e=this.get("fillGradient");if(e){this._display.isMeasured=!0;const t=e.get("target");t&&(this._disposers.push(t.events.on("boundschanged",()=>{this._markDirtyKey("fill")})),this._disposers.push(t.events.on("positionchanged",()=>{this._markDirtyKey("fill")})))}}if(this.isDirty("strokeGradient")){const e=this.get("strokeGradient");if(e){this._display.isMeasured=!0;const t=e.get("target");t&&(this._disposers.push(t.events.on("boundschanged",()=>{this._markDirtyKey("stroke")})),this._disposers.push(t.events.on("positionchanged",()=>{this._markDirtyKey("stroke")})))}}}_changed(){if(super._changed(),this._clear){this.markDirtyBounds(),this.markDirtyLayer(),this._display.clear();let e=this.get("strokeDasharray");M(e)&&(e<.5?e=[0]:e=[e]),this._display.setLineDash(e);const t=this.get("strokeDashoffset");t&&this._display.setLineDashOffset(t);const i=this.get("blendMode",bi.NORMAL);this._display.blendMode=i;const r=this.get("draw");r&&typeof r=="function"&&r(this._display,this);const n=this.get("svgPath");n!=null&&this._display.svgPath(n)}}_afterChanged(){if(super._afterChanged(),this._clear){const e=this.get("fill"),t=this.get("fillGradient"),i=this.get("fillPattern"),r=this.get("fillOpacity"),n=this.get("stroke"),s=this.get("strokeGradient"),o=this.get("strokePattern"),l=this.get("shadowColor"),h=this.get("shadowBlur"),u=this.get("shadowOffsetX"),c=this.get("shadowOffsetY"),d=this.get("shadowOpacity");if(l&&(h||u||c)&&this._display.shadow(l,h,u,c,d),e&&!t&&(this._display.beginFill(e,r),this._display.endFill()),t){if(e){const p=t.get("stops",[]);p.length&&x(p,b=>{(!b.color||b.colorInherited)&&e&&(b.color=e,b.colorInherited=!0),(b.opacity==null||b.opacityInherited)&&(b.opacity=r,b.opacityInherited=!0)})}
1const f=t.getFill(this);f&&(this._display.beginFill(f,r),this._display.endFill())}if(i){const f=i.pattern;f&&(this._display.beginFill(f,r),this._display.endFill(),i instanceof Wt&&i.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}if(n||s||o){const f=this.get("strokeOpacity");let p=this.get("strokeWidth",1);this.get("nonScalingStroke")&&(p=p/this.get("scale",1)),this.get("crisp")&&(p/=this._root._renderer.resolution);const b=this.get("lineJoin"),g=this.get("lineCap");if(n&&!s&&(this._display.lineStyle(p,n,f,b,g),this._display.endStroke()),s){const m=s.get("stops",[]);m.length&&x(m,v=>{(!v.color||v.colorInherited)&&n&&(v.color=n,v.colorInherited=!0),(v.opacity==null||v.opacityInherited)&&(v.opacity=f,v.opacityInherited=!0)});const _=s.getFill(this);_&&(this._display.lineStyle(p,_,f,b,g),this._display.endStroke())}if(o){let m=o.pattern;m&&(this._display.lineStyle(p,m,f,b,g),this._display.endStroke(),o instanceof Wt&&o.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}}this.getPrivate("showingTooltip")&&this.showTooltip()}this._clear=!1}}Object.defineProperty(Le,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Graphics"});Object.defineProperty(Le,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Ee.classNames.concat([Le.className])});class lt extends Le{_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 e=this.width(),t=this.height(),i=0,r=0,n=e/Math.abs(e),s=t/Math.abs(t);if(this.get("containStroke",!1)){const o=this.get("strokeWidth",0);e-=o*n,t-=o*s,i+=o/2*n,r+=o/2*s}this._display.drawRect(i,r,e,t)}_updateSize(){this.markDirty(),this._clear=!0}}Object.defineProperty(lt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Rectangle"});Object.defineProperty(lt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Le.classNames.concat([lt.className])});function We(a,e){a.get("reverseChildren",!1)?a.children.eachReverse(e):a.children.each(e)}class Ye extends ve{}Object.defineProperty(Ye,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Layout"});Object.defineProperty(Ye,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ve.classNames.concat([Ye.className])});class wt extends Ye{updateContainer(e){let t=e.get("paddingLeft",0),i=e.innerWidth(),r=0;We(e,s=>{if(s.isVisible()&&s.get("position")=="relative"){let o=s.get("width");if(o instanceof F){r+=o.value;let l=i*o.value,h=s.get("minWidth",s.getPrivate("minWidth",-1/0));h>l&&(i-=h,r-=o.value);let u=s.get("maxWidth",s.getPrivate("maxWidth",1/0));l>u&&(i-=u,r-=o.value)}
1else M(o)||(o=s.width()),i-=o+s.get("marginLeft",0)+s.get("marginRight",0)}}),(i<=0||i==1/0)&&(i=.1),We(e,s=>{if(s.isVisible()&&s.get("position")=="relative"){let o=s.get("width");if(o instanceof F){let l=i*o.value/r-s.get("marginLeft",0)-s.get("marginRight",0),h=s.get("minWidth",s.getPrivate("minWidth",-1/0)),u=s.get("maxWidth",s.getPrivate("maxWidth",1/0));l=Math.min(Math.max(h,l),u),s.setPrivate("width",l)}else s._prevSettings.width instanceof F&&s.setPrivate("width",void 0)}});let n=t;We(e,s=>{if(s.get("position")=="relative")if(s.isVisible()){let o=s.adjustedLocalBounds(),l=s.get("marginLeft",0),h=s.get("marginRight",0),u=s.get("maxWidth"),c=o.left,d=o.right;u&&d-c>u&&(d=c+u);let f=n+l-c;s.setPrivate("x",f),n=f+d+h}else s.setPrivate("x",void 0)})}}Object.defineProperty(wt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"HorizontalLayout"});Object.defineProperty(wt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Ye.classNames.concat([wt.className])});class xt extends Ye{updateContainer(e){let t=e.get("paddingTop",0),i=e.innerHeight(),r=0;We(e,s=>{if(s.isVisible()&&s.get("position")=="relative"){let o=s.get("height");if(o instanceof F){r+=o.value;let l=i*o.value,h=s.get("minHeight",s.getPrivate("minHeight",-1/0));h>l&&(i-=h,r-=o.value);let u=s.get("maxHeight",s.getPrivate("maxHeight",1/0));l>u&&(i-=u,r-=o.value)}
1else M(o)||(o=s.height()),i-=o+s.get("marginTop",0)+s.get("marginBottom",0)}}),(i<=0||i==1/0)&&(i=.1),We(e,s=>{if(s.isVisible()&&s.get("position")=="relative"){let o=s.get("height");if(o instanceof F){let l=i*o.value/r-s.get("marginTop",0)-s.get("marginBottom",0),h=s.get("minHeight",s.getPrivate("minHeight",-1/0)),u=s.get("maxHeight",s.getPrivate("maxHeight",1/0));l=Math.min(Math.max(h,l),u),s.setPrivate("height",l)}else s._prevSettings.height instanceof F&&s.setPrivate("height",void 0)}});let n=t;We(e,s=>{if(s.get("position")=="relative")if(s.isVisible()){let o=s.adjustedLocalBounds(),l=s.get("marginTop",0),h=o.top,u=o.bottom,c=s.get("maxHeight");c&&u-h>c&&(u=h+c);let d=s.get("marginBottom",0),f=n+l-h;s.setPrivate("y",f),n=f+u+d}else s.setPrivate("y",void 0)})}}Object.defineProperty(xt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"VerticalLayout"});Object.defineProperty(xt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Ye.classNames.concat([xt.className])});class ut extends Ye{_afterNew(){this._setRawDefault("maxColumns",Number.MAX_VALUE),super._afterNew()}updateContainer(e){let t=e.get("paddingLeft",0),i=e.get("paddingRight",0),r=e.get("paddingTop",0),n=e.maxWidth()-t-i,s=n,o=1;We(e,p=>{if(p.get("visible")&&p.getPrivate("visible")&&!p.get("forceHidden")&&p.get("position")!="absolute"){let b=p.width();b<s&&(s=b),b>o&&(o=b)}}),s=ce(s,1,n),o=ce(o,1,n);let l=1;this.get("fixedWidthGrid")?l=n/o:l=n/s,l=Math.max(1,Math.floor(l)),l=Math.min(this.get("maxColumns",Number.MAX_VALUE),l);let h=this.getColumnWidths(e,l,o,n),u=r,c=0,d=0;l=h.length;let f=t;We(e,p=>{if(p.get("position")=="relative"&&p.isVisible()){const b=p.get("marginTop",0),g=p.get("marginBottom",0);let m=p.adjustedLocalBounds(),_=p.get("marginLeft",0),v=p.get("marginRight",0),y=f+_-m.left,P=u+b-m.top;p.setPrivate("x",y),p.setPrivate("y",P),f+=h[c]+v,d=Math.max(d,p.height()+b+g),c++,c>=l&&(c=0,f=t,u+=d,d=0)}})}getColumnWidths(e,t,i,r){let n=0,s=[],o=0;return We(e,l=>{let h=l.adjustedLocalBounds();l.get("position")!="absolute"&&l.isVisible()&&(this.get("fixedWidthGrid")?s[o]=i:s[o]=Math.max(s[o]|0,h.right-h.left+l.get("marginLeft",0)+l.get("marginRight",0)),o<e.children.length-1&&(o++,o==t&&(o=0)))}),x(s,l=>{n+=l}),n>r?t>2?(t-=1,this.getColumnWidths(e,t,i,r)):[r]:s}}Object.defineProperty(ut,"className",{enumerable:!0,configurable:!0,writable:!0,value:"GridLayout"});Object.defineProperty(ut,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Ye.classNames.concat([ut.className])});class ke{static escape(e){return e.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(e){return e.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(e){return e.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")}static chunk(e,t=!1,i=!1){let r=[];e=this.escape(e);let n=t?e.split("'"):[e];for(let s=0;s<n.length;s++){let o=n[s];if(o!=="")if(s%2===0){o=o.replace(/\]\[/g,"]"+Qe+"["),o=o.replace(/\[\]/g,"[ ]");let l=o.split(/[\[\]]+/);for(let h=0;h<l.length;h++){let u=this.cleanUp(this.unescape(l[h]));u!==Qe&&u!==""&&(h%2===0?r.push({type:"value",text:u}):r.push({type:i?"value":"format",text:"["+u+"]"}))}}else{let l=o.split(/[\[\]]+/);for(let h=0;h<l.length;h++){let u=this.cleanUp(this.unescape(l[h]));u!==""&&(h%2===0?r.push({type:"text",text:u}):this.isImage(u)?r.push({type:"image",text:"["+u+"]"}):r.push({type:"format",text:"["+u+"]"}))}}}return r}static isImage(e){return!!e.match(/img[ ]?:/)}static getTextStyle(e){let t={};if(e==""||e=="[ ]")return{};const i=e.match(/('[^']*')|("[^"]*")/gi);if(i)for(let n=0;n<i.length;n++)e=e.replace(i[n],i[n].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));let r=e.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w\-]+)|(\/)/gi);if(!r)return{};for(let n=0;n<r.length;n++)if(r[n].match(/^(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)$/i))t.fontWeight=r[n];else if(r[n].match(/^(underline|line-through)$/i))t.textDecoration=r[n];else if(r[n]!="/")if(!r[n].match(/:/))t.fill=C.fromString(r[n]);
1else{const s=r[n].replace("+"," ").split(/:[ ]*/);t[s[0]]=s[1]}return t}}Object.defineProperty(ke,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:"__amcharts__"});function Yt(a,e){if(e!=null){e=""+e,e=ke.escape(e);let t=e.match(/\{([^}]+)\}/g),i;if(t)for(i=0;i<t.length;i++){let r=t[i].replace(/\{([^}]+)\}/,"$1"),n=fr(a,r);n==null&&(n=""),e=e.split(t[i]).join(n)}e=ke.unescape(e)}else e="";return e}function fr(a,e,t){let i;const r=a.dataItem;let n=[],s=/(format[a-zA-Z]*)\((.*)\)|([^.]+)/g,o;for(;o=s.exec(e),o!==null;)if(o[3]){n.push({prop:o[3]});const l=a.getDateFormatter().get("dateFields",[]),h=a.getNumberFormatter().get("numericFields",[]),u=a.getDurationFormatter().get("durationFields",[]);l.indexOf(o[3])!==-1?n.push({method:"formatDate",params:[]}):h.indexOf(o[3])!==-1?n.push({method:"formatNumber",params:[]}):u.indexOf(o[3])!==-1&&n.push({method:"formatDuration",params:[]})}else{let l=[];if(_t(o[2])!=""){let h=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g,u;for(;u=h.exec(o[2]),u!==null;)l.push(u[1]||u[2]||u[3])}n.push({method:o[1],params:l})}if(r){i=rt(a,n,r._settings),(i==null||St(i))&&(i=rt(a,n,r));let l=r.dataContext;i==null&&l&&(i=rt(a,n,l),i==null&&(i=rt(a,[{prop:e}],l)),i==null&&l.dataContext&&(i=rt(a,n,l.dataContext))),i==null&&r.component&&r.component.dataItem!==r&&(i=fr(r.component,e))}return i==null&&(i=rt(a,n,a)),i==null&&a.parent&&(i=fr(a.parent,e)),i}function Ra(a,e){const t=a.getPrivate("customData");if(St(t))return t[e]}function rt(a,e,t,i){let r=t,n=!1;for(let s=0,o=e.length;s<o;s++){let l=e[s];if(l.prop){if(r instanceof Ee){let h=r.get(l.prop);h==null&&(h=r.getPrivate(l.prop)),h==null&&(h=Ra(r,l.prop)),h==null&&(h=r[l.prop]),r=h}else if(r.get){let h=r.get(l.prop);h==null&&(h=r[l.prop]),r=h}else r=r[l.prop];if(r==null)return}else switch(l.method){case"formatNumber":let h=Pe(r);h!=null&&(r=a.getNumberFormatter().format(h,l.params[0]||void 0),n=!0);break;case"formatDate":let u=Fs(r);if(!sr(u)||Rr(u.getTime()))return;u!=null&&(r=a.getDateFormatter().format(u,l.params[0]||void 0),n=!0);break;case"formatDuration":let c=Pe(r);c!=null&&(r=a.getDurationFormatter().format(c,l.params[0]||void 0,l.params[1]||void 0),n=!0);break;case"urlEncode":case"encodeURIComponent":r=encodeURIComponent(r);break;default:r[l.method]&&r[l.method].apply(t,l.params);break}}if(!n){let s=[{method:"",params:i}];M(r)?(s[0].method="formatNumber",s[0].params=""):sr(r)&&(s[0].method="formatDate",s[0].params=""),s[0].method&&(r=rt(a,s,r))}return r}class $ extends Ee{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeContainer()}),Object.defineProperty(this,"_childrenDisplay",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeContainer()}),Object.defineProperty(this,"children",{enumerable:!0,configurable:!0,writable:!0,value:new Sa(this)}),Object.defineProperty(this,"_percentageSizeChildren",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_percentagePositionChildren",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_prevWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_prevHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_vsbd0",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_vsbd1",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hsbd0",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hsbd1",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_childrenPrep",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_childrenUpdt",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_afterNew(){super._afterNew(),this._display.addChild(this._childrenDisplay)}_afterChanged(){super._afterChanged(),this._childrenPrep=!1,this._childrenUpdt=!1}_dispose(){Ht(this.allChildren(),e=>{e.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(e=>{e.removePrivate("x"),e.removePrivate("y")})),(this.isDirty("paddingTop")||this.isDirty("paddingBottom")||this.isDirty("paddingLeft")||this.isDirty("paddingRight"))&&this.children.each(e=>{e.markDirtyPosition()}),this.isDirty("maskContent")){const e=this._childrenDisplay;let t=this._contentMask;this.get("maskContent")?t||(t=lt.new(this._root,{x:-.5,y:-.5,width:this.width()+1,height:this.height()+1}),this._contentMask=t,e.addChildAt(t._display,0),e.mask=t._display):t&&(e.removeChild(t._display),e.mask=null,t.dispose(),this._contentMask=void 0)}}_updateSize(){super._updateSize(),x(this._percentageSizeChildren,e=>{e._updateSize()}),x(this._percentagePositionChildren,e=>{e.markDirtyPosition(),e._updateSize()}
1),this.updateBackground()}updateBackground(){const e=this.get("background");let t=this._localBounds;if(t&&!this.isHidden()){let i=t.left,r=t.top,n=t.right-i,s=t.bottom-r,o=this.get("maxWidth"),l=this.get("maxHeight");l&&s>l&&(s=l),o&&n>o&&(n=o);let h=this.width(),u=this.height();e&&(e.setAll({width:n,height:s,x:i,y:r}),this._display.interactive&&(e._display.interactive=!0));const c=this._contentMask;c&&c.setAll({width:h+1,height:u+1});const d=this.get("verticalScrollbar");if(d){d.set("height",u),d.set("x",h-d.width()-d.get("marginRight",0)),d.set("end",d.get("start",0)+u/this._contentHeight);const f=d.get("background");f&&f.setAll({width:d.width(),height:u});let p=!0;this._contentHeight<=u&&(p=!1),d.setPrivate("visible",p)}}}_applyThemes(e=!1){return super._applyThemes(e)?(this.eachChildren(t=>{t._applyThemes(e)}),!0):!1}_applyState(e){super._applyState(e),this.get("setStateOnChildren")&&this.eachChildren(t=>{t.states.apply(e)})}_applyStateAnimated(e,t){super._applyStateAnimated(e,t),this.get("setStateOnChildren")&&this.eachChildren(i=>{i.states.applyAnimate(e,t)})}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 e=this._localBounds;e&&(this._contentWidth=e.right-e.left,this._contentHeight=e.bottom-e.top)}else{let e=this.get("width"),t=this.get("height"),i=this.getPrivate("width"),r=this.getPrivate("height"),n={left:0,top:0,right:this.width(),bottom:this.height()},s=this.get("layout"),o=!1,l=!1;if((s instanceof wt||s instanceof ut)&&(o=!0),s instanceof xt&&(l=!0),!((e!=null||i!=null)&&(t!=null||r!=null)&&!this.get("verticalScrollbar"))){let h=Number.MAX_VALUE,u=h,c=-h,d=h,f=-h;const p=this.get("paddingLeft",0),b=this.get("paddingTop",0),g=this.get("paddingRight",0),m=this.get("paddingBottom",0);this.children.each(y=>{if(y.get("position")!="absolute"&&y.get("isMeasured")){let P=y.adjustedLocalBounds(),D=y.x(),O=y.y(),A=D+P.left,E=D+P.right,T=O+P.top,S=O+P.bottom;o&&(A-=y.get("marginLeft",0),E+=y.get("marginRight",0)),l&&(T-=y.get("marginTop",0),S+=y.get("marginBottom",0)),A<u&&(u=A),E>c&&(c=E),T<d&&(d=T),S>f&&(f=S)}}),u==h&&(u=0),c==-h&&(c=0),d==h&&(d=0),f==-h&&(f=0),n.left=u-p,n.top=d-b,n.right=c+g,n.bottom=f+m;const _=this.get("minWidth");M(_)&&_>0&&n.right-n.left<_&&(n.right>=_?n.left=n.right-_:n.right=n.left+_);const v=this.get("minHeight");M(v)&&v>0&&n.bottom-n.top<v&&(n.bottom>=v?n.top=n.bottom-v:n.bottom=n.top+v)}this._contentWidth=n.right-n.left,this._contentHeight=n.bottom-n.top,M(e)&&(n.left=0,n.right=e),M(i)&&(n.left=0,n.right=i),M(t)&&(n.top=0,n.bottom=t),M(r)&&(n.top=0,n.bottom=r),this._localBounds=n}}_updateBounds(){const e=this.get("layout");e&&e.updateContainer(this),super._updateBounds(),this.updateBackgroun
1d()}markDirty(){super.markDirty(),this._root._addDirtyParent(this)}_prepareChildren(){this._childrenPrep=!0;const e=this.innerWidth(),t=this.innerHeight();if(e!=this._prevWidth||t!=this._prevHeight){let i=this.get("layout"),r=!1,n=!1;i&&((i instanceof wt||i instanceof ut)&&(r=!0),i instanceof xt&&(n=!0)),x(this._percentageSizeChildren,s=>{if(!r){let o=s.get("width");o instanceof F&&s.setPrivate("width",o.value*e)}if(!n){let o=s.get("height");o instanceof F&&s.setPrivate("height",o.value*t)}}),x(this._percentagePositionChildren,s=>{s.markDirtyPosition(),s.markDirtyBounds()}),this._prevWidth=e,this._prevHeight=t,this._sizeDirty=!0,this.updateBackground()}}_updateHTMLContent(){const e=this.get("html","");e&&e!==""?this._root._setHTMLContent(this,Yt(this,e)):this._root._removeHTMLContent(this),this._root._positionHTMLElement(this)}scrollToChild(e){const t=this.get("verticalScrollbar");if(t){let i=e.y(),r=this.innerHeight(),n=e.height(),s=this._contentHeight,o=1-(r-n/2)/s;if(i+n*.7+this._childrenDisplay.y>r||i-n*.3+this._childrenDisplay.y<0){let l=Math.max(0,Math.min(o,(i-n/2)/s));t.animate({key:"start",to:l,duration:t.get("animationDuration",0),easing:t.get("animationEasing")})}}}_updateChildren(){if(this._childrenUpdt=!0,this.isDirty("html")&&this._updateHTMLContent(),this.isDirty("verticalScrollbar")){const e=this.get("verticalScrollbar");
1if(e){e._setParent(this),e.startGrip.setPrivate("visible",!1),e.endGrip.setPrivate("visible",!1),this.set("maskContent",!0),this.set("paddingRight",e.width()+e.get("marginRight",0)+e.get("marginLeft",0));let t=this.get("background");t||(t=this.set("background",lt.new(this._root,{themeTags:["background"],fillOpacity:0,fill:this._root.interfaceColors.get("alternativeBackground")}))),this._vsbd0=this.events.on("wheel",i=>{const r=i.originalEvent;if(Gn(r,this))r.preventDefault();else return;let n=r.deltaY/5e3;const s=e.get("start",0),o=e.get("end",1);s+n<=0&&(n=-s),o+n>=1&&(n=1-o),s+n>=0&&o+n<=1&&(e.set("start",s+n),e.set("end",o+n))}),this._disposers.push(this._vsbd0),this._vsbd1=e.events.on("rangechanged",()=>{let i=this._contentHeight;const r=this._childrenDisplay,n=this._contentMask;r.y=-e.get("start",0)*i,r.markDirtyLayer(),n&&(n._display.y=-r.y,r.mask=n._display)}),this._disposers.push(this._vsbd1),this._display.addChild(e._display)}else{const t=this._prevSettings.verticalScrollbar;if(t){this._display.removeChild(t._display),this._vsbd0&&this._vsbd0.dispose(),this._vsbd1&&this._vsbd1.dispose();const i=this._childrenDisplay;i.y=0,this.setPrivate("height",void 0),this.set("maskContent",!1),this.set("paddingRight",void 0)}}}if(this.isDirty("background")){const e=this._prevSettings.background;e&&this._display.removeChild(e._display);const t=this.get("background");t instanceof Ee&&(t.set("isMeasured",!1),t._setParent(this),this._display.addChildAt(t._display,0))}if(this.isDirty("mask")){const e=this.get("mask"),t=this._prevSettings.mask;if(t&&(this._display.removeChild(t._display),t!=e&&t.dispose()),e){const i=e.parent;i&&i.children.removeValue(e),e._setParent(this),this._display.addChildAt(e._display,0),this._childrenDisplay.mask=e._display}}}_processTemplateField(){super._processTemplateField(),this.children.each(e=>{e._processTemplateField()})}walkChildren(e){this.children.each((t,i)=>{t instanceof $&&t.walkChildren(e),e(t,i)})}eachChildren(e){const t=this.get("background");t&&e(t);const i=this.get("verticalScrollbar");i&&e(i);const r=this.get("mask");r&&e(r),this.children.values.forEach(n=>{e(n)})}allChildren(){const e=[];return this.eachChildren(t=>{e.push(t)}),e}_setDataItem(e){const t=e!==this._dataItem;super._setDataItem(e);const i=this.get("html","");i&&i!==""&&t&&this._root._setHTMLContent(this,Yt(this,i))}contentWidth(){return this._contentWidth}contentHeight(){return this._contentHeight}}Object.defineProperty($,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Container"});Object.defineProperty($,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Ee.classNames.concat([$.className])});class Ut extends Ee{constructor(){super(...arguments),Object.defineProperty(this,"textStyle",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeTextStyle()}),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeText("",this.textStyle)}),Object.defineProperty(this,"_textStyles",{enumerable:!0,configurable:!0,writable:!0,value:["textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","maxChars"]}),Object.defineProperty(this,"_originalScale",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_updateBounds(){if(this.get("text")){super._updateBounds();let e=this.get("fillGradient");e&&(this._display.style.fill=e.getFill(this))}else{let e={left:0,right:0,top:0,bottom:0};this._adjustedLocalBounds=e}}_changed(){super._changed(),this._display.clear();let e=this.textStyle;if(this.isDirty("opacity")){let t=this.get("opacity",1);this._display.alpha=t}if((this.isDirty("text")||this.isDirty("populateText"))&&(this._display.text=this._getText(),this.markDirtyBounds(),this.get("role")=="tooltip"&&this._root.updateTooltip(this)),this.isPrivateDirty("tooltipElement")&&this.getPrivate("tooltipElement")&&this._disposers.push(new re(()=>{this._root._removeTooltipElement(this)})),this.isDirty("width")&&(e.wordWrapWidth=this.width(),this.markDirtyBounds()),this.isDirty("oversizedBehavior")&&(e.oversizedBehavior=this.get("oversizedBehavior","none"),this._display.invalidateVisibility(),this.markDirtyBounds()),this.isDirty("breakWords")&&(e.breakWords=this.get("breakWords",!1),this.markDirtyBounds()),this.isDirty("ellipsis")&&(e.ellipsis=this.get("ellipsis"),this.markDirtyBounds()),this.isDirty("ignoreFormatting")&&(e.ignoreFormatting=this.get("ignoreFormatting",!1),this.markDirtyBounds()),this.isDirty("minScale")&&(e.minScale=this.get("minScale",0),this.markDirtyBounds()),this.isDirty("fill")||this.isDirty("fillGradient")){const t=this.get("fill"),i=this.get("fillGradient"),r=this.get("fillOpacity");if(i){if(t){const n=i.get("stops",[]);n.length&&x(n,s=>{(!s.color||s.colorInherited)&&t&&(s.color=t,s.colorInherited=!0),(s.opacity==null||s.opacityInherited)&&(s.op
1acity=r,s.opacityInherited=!0)})}e.fill=i.getFill(this)}else t&&(e.fill=t)}if(this.isDirty("fillOpacity")){let t=this.get("fillOpacity",1);t&&(e.fillOpacity=t)}(this.isDirty("maxWidth")||this.isPrivateDirty("maxWidth"))&&(e.maxWidth=this.get("maxWidth",this.getPrivate("maxWidth")),this.markDirtyBounds()),(this.isDirty("maxHeight")||this.isPrivateDirty("maxHeight"))&&(e.maxHeight=this.get("maxHeight",this.getPrivate("maxHeight")),this.markDirtyBounds()),x(this._textStyles,t=>{this._dirty[t]&&(e[t]=this.get(t),this.markDirtyBounds())}),e.fontSize=this.get("fontSize"),e.fontFamily=this.get("fontFamily"),this._display.style=e,this.isDirty("role")&&this.get("role")=="tooltip"&&this._root.updateTooltip(this)}_getText(){let e=this.get("text","");return this.get("maxChars")&&(e=ua(e,this.get("maxChars",1e8),this.get("breakWords"),this.get("ellipsis"))),this.get("populateText")?Yt(this,e):e}_getAccessibleText(){const e=this.get("ariaLabel");return e!==void 0?this.get("populateText")?Yt(this,e):e:this._getText()}markDirtyText(){this._display.text=this._getText(),this.get("role")=="tooltip"&&this._root.updateTooltip(this),this.markDirtyBounds(),this.markDirty()}_setDataItem(e){super._setDataItem(e),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()}}Object.defineProperty(Ut,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Text"});Object.defineProperty(Ut,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Ee.classNames.concat([Ut.className])});class Ia{constructor(){Object.defineProperty(this,"_observer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_targets",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this._observer=new ResizeObserver(e=>{x(e,t=>{x(this._targets,i=>{i.target===t.target&&i.callback()})})})}addTarget(e,t){this._observer.observe(e,{box:"border-box"}),this._targets.push({target:e,callback:t})}removeTarget(e){this._observer.unobserve(e),Gi(this._targets,t=>t.target!==e)}}class Ui{constructor(){Object.defineProperty(this,"_timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_targets",{enumerable:!0,configurable:!0,writable:!0,value:[]})}addTarget(e,t){if(this._timer===null){let r=null;const n=()=>{const s=Date.now();(r===null||s>r+Ui.delay)&&(r=s,x(this._targets,o=>{let l=o.target.getBoundingClientRect();(l.width!==o.size.width||l.height!==o.size.height)&&(o.size=l,o.callback())})),this._targets.length===0?this._timer=null:this._timer=requestAnimationFrame(n)};this._timer=requestAnimationFrame(n)}let i={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};this._targets.push({target:e,callback:t,size:i})}removeTarget(e){Gi(this._targets,t=>t.target!==e),this._targets.length===0&&this._timer!==null&&(cancelAnimationFrame(this._timer),this._timer=null)}}Object.defineProperty(Ui,"delay",{enumerable:!0,configurable:!0,writable:!0,value:200});let oi=null;function Fa(){return oi===null&&(typeof ResizeObserver<"u"?oi=new Ia:oi=new Ui),oi}class Na{constructor(e,t){Object.defineProperty(this,"_sensor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_listener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this._sensor=Fa(),this._element=e,this._listener=Nn(t),this._sensor.addTarget(e,t)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}}class yi extends ve{}Object.defineProperty(yi,"className",{enumerable:!0,configurable:!0,writable:!0,value:"InterfaceColors"});Object.defineProperty(yi,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ve.classNames.c
1oncat([yi.className])});class ht extends ${constructor(){super(...arguments),Object.defineProperty(this,"_text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_textKeys",{enumerable:!0,configurable:!0,writable:!0,value:["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(),x(this._textKeys,e=>{const t=this.get(e);t!=null&&this._text.set(e,t)}),this.get("html","")!==""&&this._text.set("text",""),this.onPrivate("maxWidth",()=>{this._setMaxDimentions()}),this.onPrivate("maxHeight",()=>{this._setMaxDimentions()})}_makeText(){this._text=this.children.push(Ut.new(this._root,{}))}_updateChildren(){super._updateChildren();const e=this._text;if(x(this._textKeys,i=>{this._text.set(i,this.get(i))}),(this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("rotation"))&&this._setMaxDimentions(),this.get("html","")!==""?e.set("text",""):(e.set("text",this.get("text")),this._maybeUpdateHTMLColor()),(this.isDirty("fill")||this.isDirty("fillGradient"))&&this._maybeUpdateHTMLColor(),this.isDirty("textAlign")||this.isDirty("width")){const i=this.get("textAlign");let r;this.get("width")!=null?i=="right"?r=I:i=="center"?r=Y:r=0:i=="left"||i=="start"?r=this.get("paddingLeft",0):(i=="right"||i=="end")&&(r=-this.get("paddingRight",0)),e.set("x",r)}const t=this.get("background");t&&t.setPrivate("visible",e._display.textVisible)}_maybeUpdateHTMLColor(){const e=this.getPrivate("htmlElement");e&&this.get("fill")&&(e.style.color=this.get("fill").toCSSHex())}_setMaxDimentions(){const e=this.get("rotation"),t=e==90||e==270||e==-90,i=this._text,r=this.get("maxWidth",this.getPrivate("maxWidth",1/0));M(r)?i.set(t?"maxHeight":"maxWidth",r-this.get("paddingTop",0)-this.get("paddingBottom",0)):i.set(t?"maxHeight":"maxWidth",void 0);const n=this.get("maxHeight",this.getPrivate("maxHeight",1/0));M(n)?i.set(t?"maxWidth":"maxHeight",n-this.get("paddingLeft",0)-this.get("paddingRight",0)):i.set(t?"maxWidth":"maxHeight",void 0),this.root.events.once("frameended",()=>{i.markDirtyBounds()})}_setDataItem(e){super._setDataItem(e),this._markDirtyKey("text"),this._markDirtyKey("html");const t=this._text;t.get("populateText")&&t.markDirtyText();const i=this.get("html");i&&i!==""&&this._updateHTMLContent()}getText(){return this._text._getText()}getAccessibleText(){return this._text._getAccessibleText()}}Object.defineProperty(ht,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Label"});Object.defineProperty(ht,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:$.classNames.concat([ht.className])});class bt extends Le{_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 e=this.width(),t=this.height();if(e>0&&t>0){let i=this.get("cornerRadius",8);i=ce(i,0,Math.min(e/2,t/2));let r=this.get("pointerX",0),n=this.get("pointerY",0),s=this.get("pointerBaseWidth",15)/2,o=0,l=0,h=e,u=0,c=e,d=t,f=0,p=t,b=(r-o)*(d-l)-(n-l)*(c-o),g=(r-f)*(u-p)-(n-p)*(h-f);const m=this._display;if(m.moveTo(i,0),b>0&&g>0){let _=Math.round(ce(r,i+s,e-s-i));n=ce(n,-1/0,0),m.lineTo(_-s,0),m.lineTo(r,n),m.lineTo(_+s,0)}if(m.lineTo(e-i,0),m.arcTo(e,0,e,i,i),b>0&&g<0){let _=Math.round(ce(n,i+s,t-s-i));r=ce(r,e,1/0),m.lineTo(e,i),m.lineTo(e,Math.max(_-s,i)),m.lineTo(r,n),m.lineTo(e,_+s)}if(m.lineTo(e,t-i),m.arcTo(e,t,e-i,t,i),b<0&&g<0){let _=Math.round(ce(r,i+s,e-s-i));n=ce(n,t,1/0),m.lineTo(e-i,t),m.lineTo(_+s,t),m.lineTo(r,n),m.lineTo(_-s,t)}if(m.lineTo(i,t),m.arcTo(0,t,0,t-i,i),b<0&&g>0){let _=Math.round(ce(n,i+s,t-i-s));r=ce(r,-1/0,0),m.lineTo(0,t-i),m.lineTo(0,_+s),m.lineTo(r,n),m.lineTo(0,Math.max(_-s,i))}m.lineTo(0,i),m.arcTo(0,0,i,0,i),m.closePath()}}}}Object.defineProperty(bt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"PointedRectangle"});Object.defineProperty(bt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Le.classNames.c
1oncat([bt.className])});class Vt extends ${constructor(e,t,i,r=[]){super(e,t,i,r),Object.defineProperty(this,"_fx",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_fy",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_label",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fillDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fillGrDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_labelDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_w",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_h",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_keepHoverDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_htmlContentHovered",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_afterNew(){this._settings.themeTags=Un(this._settings.themeTags,["tooltip"]),super._afterNew(),this._setDefaultFn("background",()=>bt.new(this._root,{})).set("themeTags",["tooltip","background"]),this._label=this.children.push(ht.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",t=>{t&&(this._disposers.push(Q(t,"pointerover",i=>{this._htmlContentHovered=!0})),this._disposers.push(Q(t,"pointerout",i=>{this._htmlContentHovered=!1})))})),this.on("visible",t=>{this._handleReaderAnnouncement()}),this.label.events.on("dataitemchanged",t=>{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(),Me(this._root._tooltips,this)}_updateChildren(){super._updateChildren(),(this.isDirty("pointerOrientation")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight"))&&this.get("background")._markDirtyKey("width"),this.get("labelText")!=null&&this.label.set("text",this.get("labelText")),this.get("labelHTML")!=null&&this.label.set("html",this.get("labelHTML")),this.get("labelAriaLabel")!=null&&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 t=this.get("background");this._keepHoverDp=new De([t.events.on("pointerover",i=>{let r=this.get("tooltipTarget");r&&(r.parent&&r.parent.getPrivate("tooltipTarget")==r&&(r=r.parent),r.hover())}),t.events.on("pointerout",i=>{let r=this.get("tooltipTarget");r&&(r.parent&&r.parent.getPrivate("tooltipTarget")==r&&(r=r.parent),this._htmlContentHovered||r.unhover())})]),this.label.onPrivate("htmlElement",i=>{this._keepHoverDp&&i&&this._keepHoverDp.disposers.push(Q(i,"pointerleave",r=>{const n=this.root._renderer.getEvent(r);t.events.dispatch("pointerout",{type:"pointerout",originalEvent:n.event,point:n.point,simulated:!1,target:t})}))})}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let e=this.get("tooltipTarget");const t=this.get("background");let i,r;if(e&&t){if(i=e.get("fill"),r=e.get("stroke"),i==null&&(i=r),this.get("getFillFromSprite")&&(this._fillDp&&this._fillDp.dispose(),i!=null&&t.set("fill",i),this._fillDp=e.on("fill",n=>{n!=null&&(t.set("fill",n),this._updateTextColor(n))}),this._disposers.push(this._fillDp)),this.get("getFillGradientFromSprite")){this._fillGrDp&&this._fillGrDp.dispose();let n=e.get("fillGradient");n!=null&&t.set("fillGradient",n),this._fillGrDp=e.on("fillGradient",s=>{s!=null&&t.set("fillGradient",s)}),this._disposers.push(this._fillGrDp)}this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),i!=null&&t.set("stroke",i),this._strokeDp=e.on("fill",n=>{n!=null&&t.set("stroke",n)}),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),i!=null&&this.label.set("fill",i),this._labelDp=e.on("fill",n=>{n!=null&&this.label.set("fill",n)}),this._disposers.push(this._labelDp))}this._updateTextColor(i)}_updateTextColor(e){this.get("autoTextColor")&&(e==null&&(e=this.get("background").get("fill")),e==null&&(e=this._root.interfaceColors.get("background")),e instanceof C&&this.label.set("fill",C.alternative(e,this._root.interfaceColors.get("alternativeText"),this._root.interfaceColors.get("text"))))}_setDataItem(e){super._setDataItem(e),this.label._setDataItem(e)}
1_updateBackground(){super.updateBackground();const e=this._root.container;if(e){let t=.5,i=.5,r=this.get("centerX");r instanceof F&&(t=r.value);let n=this.get("centerY");n instanceof F&&(i=n.value);let s=e.width(),o=e.height(),l=this.parent,h=0,u=0;if(l){h=l.x(),u=l.y();const S=l.get("layerMargin");S&&(h+=S.left||0,u+=S.top||0,s+=(S.left||0)+(S.right||0),o+=(S.top||0)+(S.bottom||0))}const c=this.get("bounds",{left:-h,top:-u,right:s-h,bottom:o-u});this._updateBounds();let d=this.width(),f=this.height();d===0&&(d=this._w),f===0&&(f=this._h);let p=this.get("pointTo",{x:s/2,y:o/2}),b=p.x,g=p.y,m=this.get("pointerOrientation"),_=this.get("background"),v=0,y=0,P=0;_ instanceof bt&&(v=_.get("pointerLength",0),y=_.get("strokeWidth",0)/2,P=y,_.set("width",d),_.set("height",f));let D=0,O=0,A=c.right-c.left,E=c.bottom-c.top;m=="horizontal"||m=="left"||m=="right"?(y=0,m=="horizontal"?b>c.left+A/2?(b-=d*(1-t)+v,P*=-1):b+=d*t+v:m=="left"?b+=d*(1-t)+v:(b-=d*t+v,P*=-1)):(P=0,m=="vertical"?g>c.top+f/2+v?g-=f*(1-i)+v:(g+=f*i+v,y*=-1):m=="down"?g-=f*(1-i)+v:(g+=f*i+v,y*=-1)),b=ce(b,c.left+d*t,c.left+A-d*(1-t))+P,g=ce(g,c.top+f*i,c.top+E-f*(1-i))-y,D=p.x-b+d*t+P,O=p.y-g+f*i-y,this._fx=b,this._fy=g;const T=this.get("animationDuration",0);if(T>0&&this.get("visible")&&this.get("opacity")>.1){const S=this.get("animationEasing");this.animate({key:"x",to:b,duration:T,easing:S}),this.animate({key:"y",to:g,duration:T,easing:S})}else this.set("x",b),this.set("y",g);_ instanceof bt&&(_.set("pointerX",D),_.set("pointerY",O)),d>0&&(this._w=d),f>0&&(this._h=f)}}}Object.defineProperty(Vt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Tooltip"});Object.defineProperty(Vt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:$.classNames.concat([Vt.className])});class za extends ve{_setDefaults(){this._setDefault("negativeBase",0),this._setDefault("numberFormat","#,###.#####"),this._setDefault("smallNumberThreshold",1);const e="_big_number_suffix_",t="_small_number_suffix_",i="_byte_suffix_";this._setDefault("bigNumberPrefixes",[{number:1e3,suffix:this._t(e+"3")},{number:1e6,suffix:this._t(e+"6")},{number:1e9,suffix:this._t(e+"9")},{number:1e12,suffix:this._t(e+"12")},{number:1e15,suffix:this._t(e+"15")},{number:1e18,suffix:this._t(e+"18")},{number:1e21,suffix:this._t(e+"21")},{number:1e24,suffix:this._t(e+"24")}]),this._setDefault("smallNumberPrefixes",[{number:1e-24,suffix:this._t(t+"24")},{number:1e-21,suffix:this._t(t+"21")},{number:1e-18,suffix:this._t(t+"18")},{number:1e-15,suffix:this._t(t+"15")},{number:1e-12,suffix:this._t(t+"12")},{number:1e-9,suffix:this._t(t+"9")},{number:1e-6,suffix:this._t(t+"6")},{number:.001,suffix:this._t(t+"3")}]),this._setDefault("bytePrefixes",[{number:1,suffix:this._t(i+"B")},{number:1024,suffix:this._t(i+"KB")},{number:1048576,suffix:this._t(i+"MB")},{number:1073741824,suffix:this._t(i+"GB")},{number:1099511627776,suffix:this._t(i+"TB")},{number:0x4000000000000,suffix:this._t(i+"PB")}]),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i){(t==null||Je(t)&&t.toLowerCase()==="number")&&(t=this.get("numberFormat",""));let r,n=Number(e);if(St(t))try{return this.get("intlLocales")?new Intl.NumberFormat(this.get("intlLocales"),t).format(n):new Intl.NumberFormat(void 0,t).format(n)}catch{return"Invalid"}else{t=zr(t);let s=this.parseFormat(t,this._root.language),o;n>this.get("negativeBase")?o=s.positive:n<this.get("negativeBase")?o=s.negative:o=s.zero,i!=null&&!o.mod&&(o=Ks(o),o.decimals.active=n==0?0:i),r=o.template.split(Qe).join(this.applyFormat(n,o))}return this.get("forceLTR")===!0&&(r="â"+r),r}parseFormat(e,t){const i=t.translateEmpty("_thousandSeparator"),r=t.translateEmpty("_decimalSeparator");let n={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1}};e=e.replace("||",gt);let s=e.split("|");return n.positive.source=s[0],typeof s[2]>"u"?n.zero=n.positive:n.zero.source=s[2],typeof s[1]>"u"?n.negative=n.positive:n.negative.source=s[1],V(n,(o,l)=>{if(l.parsed)return;
1let h=l.source;h.toLowerCase()==="number"&&(h=this.get("numberFormat","#,###.#####"));let u=ke.chunk(h,!0);for(let c=0;c<u.length;c++){let d=u[c];if(d.text=d.text.replace(gt,"|"),d.type==="value"){let f=d.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESPâ°!]?/);if(f)if(f===null||f[0]==="")l.template+=d.text;else{let p=f[0].match(/[abespABESP%â°!]{2}|[abespABESP%â°]{1}$/);p&&(l.mod=p[0].toLowerCase(),l.modSpacing=!!f[0].match(/[ ]{1}[abespABESP%â°!]{1}$/));let b=f[0].split(".");if(b[0]!==""){l.thousands.active=(b[0].match(/0/g)||[]).length,l.thousands.passive=(b[0].match(/\#/g)||[]).length+l.thousands.active;let g=b[0].split(",");g.length===1||(l.thousands.interval=(g.pop()||"").length,l.thousands.interval===0&&(l.thousands.interval=-1))}typeof b[1]>"u"||(l.decimals.active=(b[1].match(/0/g)||[]).length,l.decimals.passive=(b[1].match(/\#/g)||[]).length+l.decimals.active),l.template+=d.text.split(f[0]).join(Qe)}}else l.template+=d.text}l.parsed=!0}),n}applyFormat(e,t){let i=e<0;e=Math.abs(e);let r="",n="",s=t.mod?t.mod.split(""):[];if(s.indexOf("b")!==-1){let c=this.applyPrefix(e,this.get("bytePrefixes"),s.indexOf("!")!==-1);e=c[0],r=c[1],n=c[2],t.modSpacing&&(n=" "+n)}else if(s.indexOf("a")!==-1){let c=this.applyPrefix(e,e<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),s.indexOf("!")!==-1);e=c[0],r=c[1],n=c[2],t.modSpacing&&(n=" "+n)}else if(s.indexOf("p")!==-1){let c=Math.min(e.toString().length+2,21);e=parseFloat(e.toPrecision(c)),r=this._root.language.translate("_percentPrefix"),n=this._root.language.translate("_percentSuffix"),r==""&&n==""&&(n="%")}else if(s.indexOf("%")!==-1){let c=Math.min(e.toString().length+2,21);e*=100,e=parseFloat(e.toPrecision(c)),n="%"}else if(s.indexOf("â°")!==-1){let c=Math.min(e.toString().length+3,21);e*=1e3,e=parseFloat(e.toPrecision(c)),n="â°"}if(s.indexOf("e")!==-1){let c;t.decimals.passive>=0?c=e.toExponential(t.decimals.passive).split("e"):c=e.toExponential().split("e"),e=Number(c[0]),n="e"+c[1],t.modSpacing&&(n=" "+n)}else if(t.decimals.passive===0)e=Math.round(e);else if(t.decimals.passive>0){const c=aa(e);if(c>0){const d=Math.pow(10,t.decimals.passive);e=Math.round(parseFloat((e*d).toFixed(c)))/d}}let o="",l=Rn(e).split("."),h=l[0];if(h.length<t.thousands.active&&(h=Array(t.thousands.active-h.length+1).join("0")+h),t.thousands.interval>0){let c=[],d=h.split("").reverse().join("");for(let f=0,p=h.length;f<=p;f+=t.thousands.interval){let b=d.substr(f,t.thousands.interval).split("").reverse().join("");b!==""&&c.unshift(b)}h=c.join(t.thousands.separator)}o+=h,l.length===1&&l.push("");let u=l[1];return u.length<t.decimals.active&&(u+=Array(t.decimals.active-u.length+1).join("0")),u!==""&&(o+=t.decimals.separator+u),o===""&&(o="0"),e!==0&&i&&s.indexOf("s")===-1&&(o="-"+o),r&&(o=r+o),n&&(o+=n),o}applyPrefix(e,t,i=!1){let r=e,n="",s="",o=!1,l=1;for(let h=0,u=t.length;h<u;h++)t[h].number<=e&&(t[h].number===0?r=0:(r=e/t[h].number,l=t[h].number),n=t[h].prefix,s=t[h].suffix,o=!0);return!o&&i&&t.length&&e!=0&&(r=e/t[0].number,n=t[0].prefix,s=t[0].suffix,o=!0),o&&(r=parseFloat(r.toPrecision(Math.min(l.toString().length+Math.floor(r).toString().replace(/[^0-9]*/g,"").length,21)))),[r,n,s]}escape(e){return e.replace("||",gt)}unescape(e){return e.replace(gt,"|")}}function Qn(a,e){let t=0,i=0,r=1,n=0,s=0,o=0,l=0,h=0;return a.formatToParts(e).forEach(u=>{switch(u.type){case"year":t=+u.value;break;case"month":i=+u.value-1;break;case"day":r=+u.value;break;case"hour":n=+u.value;break;case"minute":s=+u.value;break;case"second":o=+u.value;break;case"fractionalSecond":l=+u.value;break;case"weekday":switch(u.value){case"Sun":h=0;break;case"Mon":h=1;break;case"Tue":h=2;break;case"Wed":h=3;break;case"Thu":h=4;break;case"Fri":h=5;break;case"Sat":h=6;break}}}),n===24&&(n=0),{year:t,month:i,day:r,hour:n,minute:s,second:o,millisecond:l,weekday:h}}function on(a,e){const{year:t,month:i,day:r,hour:n,minute:s,second:o,millisecond:l}=Qn(a,e);return Date.UTC(t,i,r,n,s,o,l)}class Ga{constructor(e,t){if(Object.defineProperty(this,"_utc",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dtf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=e,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:e,
1year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(e){return new this(e,!0)}convertLocal(e){const t=this.offsetUTC(e),i=e.getTimezoneOffset(),r=new Date(e);r.setUTCMinutes(r.getUTCMinutes()-(t-i));const n=r.getTimezoneOffset();return i!=n&&r.setUTCMinutes(r.getUTCMinutes()+n-i),r}offsetUTC(e){const t=on(this._utc,e),i=on(this._dtf,e);return(t-i)/6e4}parseDate(e){return Qn(this._dtf,e)}}class Wa extends ve{_setDefaults(){this._setDefault("capitalize",!0),this._setDefault("dateFormat","yyyy-MM-dd"),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i=!1){(typeof t>"u"||t==="")&&(t=this.get("dateFormat","yyyy-MM-dd"));let r,n=e;if(St(t))try{const h=this.get("intlLocales");return h?new Intl.DateTimeFormat(h,t).format(n):new Intl.DateTimeFormat(void 0,t).format(n)}catch{return"Invalid"}let s=this.parseFormat(t);const o=this._root.timezone;let l=n;return o&&!this._root.utc&&!i&&(n=o.convertLocal(n)),M(n.getTime())?(r=this.applyFormat(n,s,i,l),this.get("capitalize")&&(r=r.replace(/^.{1}/,r.substr(0,1).toUpperCase())),r):"Invalid date"}applyFormat(e,t,i=!1,r){let n=t.template,s,o,l,h,u,c,d,f,p=e.getTime();this._root.utc&&!i?(s=e.getUTCFullYear(),o=e.getUTCMonth(),l=e.getUTCDay(),h=e.getUTCDate(),u=e.getUTCHours(),c=e.getUTCMinutes(),d=e.getUTCSeconds(),f=e.getUTCMilliseconds()):(s=e.getFullYear(),o=e.getMonth(),l=e.getDay(),h=e.getDate(),u=e.getHours(),c=e.getMinutes(),d=e.getSeconds(),f=e.getMilliseconds());for(let b=0,g=t.parts.length;b<g;b++){let m="";switch(t.parts[b]){case"G":m=this._t(s<0?"_era_bc":"_era_ad");break;case"yyyy":m=Math.abs(s).toString(),s<0&&(m+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":m=Math.abs(s).toString().substr(-t.parts[b].length),s<0&&(m+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let _=ca(e,this._root.utc);t.parts[b]=="YYYY"?m=Math.abs(_).toString():m=Math.abs(_).toString().substr(-t.parts[b].length),_<0&&(m+=this._t("_era_bc"));break;case"u":break;case"q":m=""+Math.ceil((e.getMonth()+1)/3);break;case"MMMMM":m=this._t(this._getMonth(o)).substr(0,1);break;case"MMMM":m=this._t(this._getMonth(o));break;case"MMM":m=this._t(this._getShortMonth(o));break;case"MM":m=ee(o+1,2,"0");break;case"M":m=(o+1).toString();break;case"ww":m=ee(_i(e,this._root.utc),2,"0");break;case"w":m=_i(e,this._root.utc).toString();break;case"W":m=da(e,this._root.utc).toString();break;case"dd":m=ee(h,2,"0");break;case"d":m=h.toString();break;case"DD":case"DDD":m=ee(rn(e,this._root.utc).toString(),t.parts[b].length,"0");break;case"D":m=rn(e,this._root.utc).toString();break;case"F":break;case"g":break;case"t":m=this._root.language.translateFunc("_dateOrd").call(this,h);break;case"E":m=(l||7).toString();break;case"EE":m=ee((l||7).toString(),2,"0");break;case"EEE":case"eee":m=this._t(this._getShortWeekday(l));break;case"EEEE":case"eeee":m=this._t(this._getWeekday(l));break;case"EEEEE":case"eeeee":m=this._t(this._getShortWeekday(l)).substr(0,1);break;case"e":case"ee":m=(l-(this._root.locale.firstDayOfWeek||1)+1).toString(),t.parts[b]=="ee"&&(m=ee(m,2,"0"));break;case"a":u>=12?m=this._t("PM"):m=this._t("AM");break;case"aa":u>=12?m=this._t("P.M."):m=this._t("A.M.");break;case"aaa":u>=12?m=this._t("P"):m=this._t("A");break;case"h":m=ri(u).toString();break;case"hh":m=ee(ri(u),2,"0");break;case"H":m=u.toString();break;case"HH":m=ee(u,2,"0");break;case"K":m=ri(u,0).toString();break;case"KK":m=ee(ri(u,0),2,"0");break;case"k":m=(u+1).toString();break;case"kk":m=ee(u+1,2,"0");break;case"m":m=c.toString();break;case"mm":m=ee(c,2,"0");break;case"s":m=d.toString();break;case"ss":m=ee(d,2,"0");break;case"S":case"SS":case"SSS":m=Math.round(f/1e3*Math.pow(10,t.parts[b].length)).toString();break;case"x":m=p.toString();break;case"n":case"nn":case"nnn":m=ee(f,t.parts[b].length,"0");break;case"z":m=ni(r||e,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zz":m=ni(r||e,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"zzz":m=ni(r||e,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;
1case"zzzz":m=ni(r||e,!0,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"Z":case"ZZ":let v=this._root.utc?"UTC":this._root.timezone;v instanceof Ga&&(v=v.name);const y=v?pa(v,r||e):e.getTimezoneOffset();let P=Math.abs(y)/60,D=Math.floor(P),O=P*60-D*60;this._root.utc&&(D=0,O=0),t.parts[b]=="Z"?(m="GMT",m+=y>0?"-":"+",m+=ee(D,2)+":"+ee(O,2)):(m=y>0?"-":"+",m+=ee(D,2)+ee(O,2));break;case"i":m=e.toISOString();break;case"I":m=e.toUTCString();break}n=n.replace(Qe,m)}return n}parseFormat(e){let t={template:"",parts:[]},i=ke.chunk(e,!0);for(let r=0;r<i.length;r++){let n=i[r];if(n.type==="value"){if(n.text.match(/^date$/i)){let o=this.get("dateFormat","yyyy-MM-dd");Je(o)||(o="yyyy-MM-dd"),n.text=o}let s=n.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(s)for(let o=0;o<s.length;o++)t.parts.push(s[o]),n.text=n.text.replace(s[o],Qe)}t.template+=n.text}return t}_months(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}_getMonth(e){return this._months()[e]}_shortMonths(){return["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}_getShortMonth(e){return this._shortMonths()[e]}_weekdays(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}_getWeekday(e){return this._weekdays()[e]}_shortWeekdays(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}_getShortWeekday(e){return this._shortWeekdays()[e]}parse(e,t,i){if(typeof i>"u"&&(i=this._root.utc),e instanceof Date)return e;if(M(e))return new Date(e);if(t=="x")return new Date(parseInt(e));Je(e)||(e=e.toString());let r,n="";t=zr(t),t=t.substr(0,e.length);let s=this.parseFormat(t),o={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},l={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:i},h=0,u=0;for(let f=0;f<s.parts.length;f++){switch(u=f+h+1,s.parts[f]){case"yyyy":case"YYYY":n+="([0-9]{4})",o.year=u;break;case"yyy":case"YYY":n+="([0-9]{3})",o.year3=u;break;case"yy":case"YY":n+="([0-9]{2})",o.year2=u;break;case"y":case"Y":n+="([0-9]{1})",o.year1=u;break;case"MMMM":n+="("+this.getStringList(this._months()).join("|")+")",o.monthLong=u;break;case"MMM":n+="("+this.getStringList(this._shortMonths()).join("|")+")",o.monthShort=u;break;case"MM":case"M":n+="([0-9]{2}|[0-9]{1})",o.month=u;break;case"ww":case"w":n+="([0-9]{2}|[0-9]{1})",o.week=u;break;case"dd":case"d":n+="([0-9]{2}|[0-9]{1})",o.day=u;break;case"DDD":case"DD":case"D":n+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.yearDay=u;break;case"dddd":n+="("+this.getStringList(this._weekdays()).join("|")+")",o.weekdayLong=u;break;case"ddd":n+="("+this.getStringList(this._shortWeekdays()).join("|")+")",o.weekdayShort=u;break;case"aaa":case"aa":case"a":n+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",o.am=u;break;case"hh":case"h":n+="([0-9]{2}|[0-9]{1})",o.hour12Base1=u;break;case"HH":case"H":n+="([0-9]{2}|[0-9]{1})",o.hourBase0=u;break;case"KK":case"K":n+="([0-9]{2}|[0-9]{1})",o.hour12Base0=u;break;case"kk":case"k":n+="([0-9]{2}|[0-9]{1})",o.hourBase1=u;break;case"mm":case"m":n+="([0-9]{2}|[0-9]{1})",o.minute=u;break;case"ss":case"s":n+="([0-9]{2}|[0-9]{1})",o.second=u;break;case"SSS":case"SS":case"S":n+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=u,o.millisecondDigits=s.parts[f].length;break;case"nnn":case"nn":case"n":n+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=u;break;case"x":n+="([0-9]{1,})",o.timestamp=u;break;case"Z":n+="GMT([-+]+[0-9]{2}:[0-9]{2})",o.zone=u;break;case"ZZ":n+="([\\-+]+[0-9]{2}[0-9]{2})",o.zone=u;break;case"i":n+="([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}|$)",o.iso=u,h+=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":h--;break}n+="[^0-9]*"}let c=new RegExp(n),d=e.match(c);if(d){if(o.year>-1&&(l.year=parseInt(d[o.year])),o.year3>-1){let f=parseInt(d[o.year3]);f+=1e3,l.year=f}if(o.year2>-1){let f=parseInt(d[o.year2]);f>50?f+=1e3:f+=2e3,l.year=f}if(o.year1>-1){let f=parseInt(d[o.year1]);f=Math.floor(new Date().getFullYear()/10)*10+f,l.year=f}if(o.monthLong>-1&&(l.month=this.resolveMonth(d[o.monthLong])),o.monthShort>-1&&(l.month=this.resolveShortMonth(d[o.monthShort])),o.month>-1&&(l.month=parseInt(d[o.month])-1),o.week>-1&&o.day===-1&&(l.month=0,l.day=fa(parseInt(d[o.week]),l.year,1,i)),o.day>-1&&(l.day=parseInt(d[o.day])),o.yearDay>-1&&(l.month=0,l.day=parseInt(d[o.yearDay])),o.hourBase0>-1&&(l.hour=parseInt(d[o.hourBase0])),o.hourBase1>-1&&(l.hour=parseInt(d[o.hourBase1])-1),o.hour12Base0>-1){let f=parseInt(d[o.hour12Base0]);f==11&&(f=0),o.am>-1&&!this.isAm(d[o.am])&&(f+=12),l.hour=f}if(o.hour12Base1>-1){let f=parseInt(d[o.hour12Base1]);f==12&&(f=0),o.am>-1&&!this.isAm(d[o.am])&&(f+=12),l.hour=f}if(o.minute>-1&&(l.minute=parseInt(d[o.minute])),o.second>-1&&(l.second=parseInt(d[o.second])),o.millisecond>-1){let f=parseInt(d[o.millisecond]);o.millisecondDigits==2?f*=10:o.millisecondDigits==1&&(f*=100),l.millisecond=f}if(o.timestamp>-1){l.timestamp=parseInt(d[o.timestamp]);const f=new Date(l.timestamp);l.year=f.getUTCFullYear(),l.month=f.getUTCMonth(),l.day=f.getUTCDate(),l.hour=f.getUTCHours(),l.minute=f.getUTCMinutes(),l.second=f.getUTCSeconds(),l.millisecond=f.getUTCMilliseconds()}o.zone>-1&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),d[o.zone])),o.iso>-1&&(l.year=Pe(d[o.iso+0]),l.month=Pe(d[o.iso+1])-1,l.day=Pe(d[o.iso+2]),l.hour=Pe(d[o.iso+3]),l.minute=Pe(d[o.iso+4]),l.second=Pe(d[o.iso+5]),l.millisecond=Pe(d[o.iso+6]),d[o.iso+7]=="Z"||d[o.iso+7]=="z"?l.utc=!0:d[o.iso+7]!=""&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),d[o.iso+7]))),l.utc?r=new Date(Date.UTC(l.year,l.month,l.day,l.hour,l.minute,l.second,l.millisecond)):r=new Date(l.year,l.month,l.day,l.hour,l.minute+l.offset,l.second,l.millisecond)}else r=new Date(e);return r}resolveTimezoneOffset(e,t){if(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){let r=t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/),n=r[1],s=r[2],o=r[3],l=parseInt(s)*60+parseInt(o);n=="+"&&(l*=-1);let h=(e||new Date).getTimezoneOffset();return l-h}return 0}resolveMonth(e){let t=this._months().indexOf(e);return t>-1||!this._root.language.isDefault()&&(t=this._root.language.translateAll(this._months()).indexOf(e),t>-1)?t:0}resolveShortMonth(e){let t=this._shortMonths().indexOf(e);return t>-1||(t=this._months().indexOf(e),t>-1)||this._root.language&&!this._root.language.isDefault()&&(t=this._root.language.translateAll(this._shortMonths()).indexOf(e),t>-1)?t:0}isAm(e){return this.getStringList(["AM","A.M.","A"]).indexOf(e.toUpperCase())>-1}getStringList(e){let t=[];for(let i=0;i<e.length;i++)this._root.language?t.push(tn(this._t(e[i]))):t.push(tn(e[i]));return t}}class Ya extends ve{constructor(){super(...arguments),Object.defineProperty(this,"_unitAliases",{enumerable:!0,configurable:!0,writable:!0,value:{Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"}})}_setDefaults(){const e="_duration_millisecond",t="_duration_second",i="_duration_minute",r="_duration_hour",n="_duration_day",s="_duration_week",o="_duration_month",l="_duration_year",h="_second",u="_minute",c="_hour",d="_day",f="_week",p="_week",b="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(e),second:this._t(e+h),minute:this._t(e+u),hour:this._t(e+c),day:this._t(e+d),week:this._t(e+f),month:this._t(e+p),year:this._t(e+b)},second:{second:this._t(t),minute:this._t(t+u),hour:this._t(t+c),day:this._t(t+d),week:this._t(t+f),month:this._t(t+p),year:this._t(t+b)},minute:{minute:this._t(i),hour:this._t(i+c),day:this._t(i+d),week:this._t(i+f),month:this._t(i+p),year:this._t(i+b)},hour:{hour:this._t(r),day:this._t(r+d),week:this._t(r+f),month:this._t(r+p),year:this._t(r+b)},day:{day:this._t(n),week:this._t(n+f),month:this._t(n+p),year:this._t(n+b)},week:{week:this._t(s),month:this._t(s+p),year:this._t(s+b)},month:{month:this._t(o),year:this._t(o+b)},year:{year:this._t(l)}}),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i){let r=i||this.get("baseUnit");(typeof t>"u"||t==="")&&(this.get("durationFormat")!=null?t=this.get("durationFormat"):t=this.getFormat(Pe(e),void 0,r)),t=zr(t);let n=this.parseFormat(t,r),s=Number(e),o;s>this.get("negativeBase")?o=n.positive:s<this.get("negativeBase")?o=n.negative:o=n.zero;let l=this.applyFormat(s,o);return o.color!==""&&(l="["+o.color+"]"+l+"[/]"),l}parseFormat(e,t){let i=t||this.get("baseUnit"),r={positive:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1}};e=e.replace("||",gt);let n=e.split("|");return r.positive.source=n[0],typeof n[2]>"u"?r.zero=r.positive:r.zero.source=n[2],typeof n[1]>"u"?r.negative=r.positive:r.negative.source=n[1],V(r,(s,o)=>
1{if(o.parsed)return;let l=o.source,h=[];h=o.source.match(/^\[([^\]]*)\]/),h&&h.length&&h[0]!==""&&(l=o.source.substr(h[0].length),o.color=h[1]);let u=ke.chunk(l,!0);for(let c=0;c<u.length;c++){let d=u[c];if(d.text=d.text.replace(gt,"|"),d.type==="value"){d.text.match(/[yYMdDwhHKkmsSn]+a/)&&(o.absolute=!0,d.text=d.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let f=d.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(f)for(let p=0;p<f.length;p++)f[p]==null&&(f[p]=this._unitAliases[f[p]]),o.parts.push(f[p]),d.text=d.text.replace(f[p],Qe)}o.template+=d.text}o.parsed=!0}),r}applyFormat(e,t){let i=!t.absolute&&e<this.get("negativeBase");e=Math.abs(e);let r=this.toTimeStamp(e,t.baseUnit),n=t.template;const s={millisecond:0,second:0,minute:0,hour:0,day:0,week:0,month:0,year:0};for(let o=0,l=t.parts.length;o<l;o++){let h=t.parts[o],u=this._toTimeUnit(h.substr(0,1)),c;const d=this._getUnitValue(u);o<l-1?c=Math.floor(r/d):c=Math.round(r/d),s[u]+=c,r-=c*d}V(s,(o,l)=>{o=="millisecond"&&l==1e3?(s.second++,s.millisecond=0):o=="second"&&l==60?(s.minute++,s.second=0):o=="minute"&&l==60?(s.hour++,s.minute=0):o=="hour"&&l==24?(s.day++,s.hour=0):o=="day"&&l==7&&t.parts.indexOf("w")!==-1?(s.week++,s.day=0):o=="day"&&l==30?(s.month++,s.day=0):o=="month"&&l==12&&(s.year++,s.month=0)});for(let o=0,l=t.parts.length;o<l;o++){let h=t.parts[o],u=this._toTimeUnit(h.substr(0,1)),c=h.length;n=n.replace(Qe,ee(s[u],c,"0"))}return i&&(n="-"+n),n}toTimeStamp(e,t){return e*this._getUnitValue(t)}_toTimeUnit(e){switch(e){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(e,t,i){if(this.get("durationFormat")!=null)return this.get("durationFormat");if(i||(i=this.get("baseUnit")),t!=null&&e!=t){e=Math.abs(e),t=Math.abs(t);let r=this.getValueUnit(Math.max(e,t),i);return this.get("durationFormats")[i][r]}else{let r=this.getValueUnit(e,i);return this.get("durationFormats")[i][r]}}getValueUnit(e,t){t||(t=this.get("baseUnit"));let i,r=this.getMilliseconds(e,t);return Zs(this._getUnitValues(),(n,s)=>{if(n==t||i){if(r/s<=1)return i||(i=n),!1;i=n}return!0}),i}getMilliseconds(e,t){return t||(t=this.get("baseUnit")),e*this._getUnitValue(t)}_getUnitValue(e){return this._getUnitValues()[e]}_getUnitValues(){return{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}}}const es={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:"μ",_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(a){let e="th";if(a<11||a>13)switch(a%10){case 1:e="st";break;case 2:e="nd";break;case 3:e="rd";break}return e},"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 Ua extends ve{_setDefaults(){this.setPrivate("defaultLocale",es),super._setDefaults()}translate(e,t,...i){t||(t=this._root.locale||this.getPrivate("defaultLocale"));let r=e,n=t[e];if(n===null)r="";else if(n!=null)n&&(r=n);else if(t!==this.getPrivate("defaultLocale"))return this.translate(e,this.getPrivate("defaultLocale"),...i);if(i.length)for(let s=i.length,o=0;o<s;++o)r=r.split("%"+(o+1)).join(i[o]);return r}translateAny(e,t,...i){return this.translate(e,t,...i)}setTranslationAny(e,t,i){const r=i||this._root.locale;r[e]=t}setTranslationsAny(e,t){V(e,(i,r)=>{this.setTranslationAny(i,r,t)})}translateEmpty(e,t,...i){let r=this.translate(e,t,...i);return r==e?"":r}translateFunc(e,t){return this._root.locale[e]?this._root.locale[e]:t!==this.getPrivate("defaultLocale")?this.translateFunc(e,this.getPrivate("defaultLocale")):()=>""}translateAll(e,t){return this.isDefault()?e:ar(e,i=>this.translate(i,t))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}}class Gr{constructor(e,t){if(Object.defineProperty(this,"_root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rules",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._root=e,!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`")}static new(e){const t=new this(e,!0);return t.setupDefaultRules(),t}setupDefaultRules(){}_lookupRules(e){return this._rules[e]}ruleRaw(e,t=[]){let i=this._rules[e];i||(i=this._rules[e]=[]),t.sort(ot);const{index:r,found:n}=Us(i,s=>{const o=ot(s.tags.length,t.length);return o===0?qn(s.tags,t,ot):o});if(n)return i[r].template;{const s=vt.new({});return i.splice(r,0,{tags:t,template:s}),s}}rule(e,t=[]){return this.ruleRaw(e,t)}}function L(a,e,t,i){a.set(e,t.get(i)),t.on(i,r=>{a.set(e,r)})}class Va extends Gr{setupDefaultRules(){super.setupDefaultRules();const e=this._root.language,t=this._root.interfaceColors,i=this._root.horizontalLayout,r=this._root.verticalLayout,n=this.rule.bind(this);n("InterfaceColors").setAll({stroke:C.fromHex(15066597),fill:C.fromHex(15987699),primaryButton:C.fromHex(6788316),primaryButtonHover:C.fromHex(6779356),primaryButtonDown:C.fromHex(6872182),primaryButtonActive:C.fromHex(6872182),primaryButtonDisabled:C.fromHex(14342874),primaryButtonTextDisabled:C.fromHex(16777215),primaryButtonText:C.fromHex(16777215),primaryButtonStroke:C.fromHex(16777215),secondaryButton:C.fromHex(14277081),secondaryButtonHover:C.fromHex(10724259),secondaryButtonDown:C.fromHex(9276813),secondaryButtonActive:C.fromHex(15132390),secondaryButtonText:C.fromHex(0),secondaryButtonStroke:C.fromHex(16777215),grid:C.fromHex(0),background:C.fromHex(16777215),alternativeBackgroun
1d:C.fromHex(0),text:C.fromHex(0),alternativeText:C.fromHex(16777215),disabled:C.fromHex(11382189),positive:C.fromHex(5288704),negative:C.fromHex(11730944)});{const s=n("ColorSet");s.setAll({passOptions:{hue:.05,saturation:0,lightness:0},colors:[C.fromHex(6797276)],step:1,reuse:!1,startIndex:0}),s.setPrivate("currentStep",0),s.setPrivate("currentPass",0)}n("Entity").setAll({stateAnimationDuration:0,stateAnimationEasing:Fe(Ce)}),n("Component").setAll({interpolationDuration:0,interpolationEasing:Fe(Ce)}),n("Sprite").setAll({visible:!0,scale:1,opacity:1,rotation:0,position:"relative",tooltipX:Y,tooltipY:Y,tooltipPosition:"fixed",isMeasured:!0}),n("Sprite").states.create("default",{visible:!0,opacity:1}),n("Container").setAll({interactiveChildren:!0,setStateOnChildren:!1}),n("Graphics").setAll({strokeWidth:1}),n("Chart").setAll({width:I,height:I,interactiveChildren:!1}),n("ZoomableContainer").setAll({width:I,height:I,wheelable:!0,pinchZoom:!0,maxZoomLevel:32,minZoomLevel:1,zoomStep:2,animationEasing:Fe(Ce),animationDuration:600,maxPanOut:.4}),n("Sprite",["horizontal","center"]).setAll({centerX:Y,x:Y}),n("Sprite",["vertical","center"]).setAll({centerY:Y,y:Y}),n("Container",["horizontal","layout"]).setAll({layout:i}),n("Container",["vertical","layout"]).setAll({layout:r}),n("Pattern").setAll({repetition:"repeat",width:50,height:50,rotation:0,fillOpacity:1}),n("LinePattern").setAll({gap:6,colorOpacity:1,width:49,height:49}),n("RectanglePattern").setAll({gap:6,checkered:!1,centered:!0,maxWidth:5,maxHeight:5,width:48,height:48,strokeWidth:0}),n("CirclePattern").setAll({gap:5,checkered:!1,centered:!1,radius:3,strokeWidth:0,width:45,height:45}),n("GrainPattern").setAll({width:200,height:200,colors:[C.fromHex(0)],size:1,horizontalGap:0,verticalGap:0,density:1,minOpacity:0,maxOpacity:.2});{const s=n("PatternSet");s.setAll({step:1}),L(s,"color",t,"stroke")}n("LinearGradient").setAll({rotation:90}),n("Legend").setAll({fillField:"fill",strokeField:"stroke",nameField:"name",layout:ut.new(this._root,{}),layer:30,clickTarget:"itemContainer"}),n("Container",["legend","item","itemcontainer"]).setAll({paddingLeft:5,paddingRight:5,paddingBottom:5,paddingTop:5,layout:i,setStateOnChildren:!0,interactiveChildren:!1,ariaChecked:!0,focusable:!0,ariaLabel:e.translate("Press ENTER to toggle"),role:"checkbox"});{const s=n("Rectangle",["legend","item","background"]);s.setAll({fillOpacity:0}),L(s,"fill",t,"background")}n("Container",["legend","marker"]).setAll({setStateOnChildren:!0,centerY:Y,paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,width:18,height:18}),n("RoundedRectangle",["legend","marker","rectangle"]).setAll({width:I,height:I,cornerRadiusBL:3,cornerRadiusTL:3,cornerRadiusBR:3,cornerRadiusTR:3});{const s=n("RoundedRectangle",["legend","marker","rectangle"]).states.create("disabled",{});L(s,"fill",t,"disabled"),L(s,"stroke",t,"disabled")}n("Label",["legend","label"]).setAll({centerY:Y,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,populateText:!0});{const s=n("Label",["legend","label"]).states.create("disabled",{});L(s,"fill",t,"disabled")}n("Label",["legend","value","label"]).setAll({centerY:Y,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,width:50,centerX:I,populateText:!0});{const s=n("Label",["legend","value","label"]).states.create("disabled",{});L(s,"fill",t,"disabled")}n("HeatLegend").setAll({stepCount:1}),n("RoundedRectangle",["heatlegend","marker"]).setAll({cornerRadiusTR:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusBL:0}),n("RoundedRectangle",["vertical","heatlegend","marker"]).setAll({height:I,width:15}),n("RoundedRectangle",["horizontal","heatlegend","marker"]).setAll({width:I,height:15}),n("HeatLegend",["vertical"]).setAll({height:I}),n("HeatLegend",["horizontal"]).setAll({width:I}),n("Label",["heatlegend","start"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5}),n("Label",["heatlegend","end"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5});{const s=n("Label");s.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}),L(s,"fill",t,"text")}n("RadialLabel").setAll({textType:"regular",centerY:Y,centerX:Y,inside:!1,radius:0,baseRadius:I,orientation:"auto",textAlign:"center"}),n("EditableLabel").setAll({editOn:"click",themeTags:["editablelabel"],multiLine:!0}),n("RoundedRectangle",["editablelabel","background"]).setAll({fillOpacity:0,fill:C.fromHex(0),cornerRadiusBL:3,cornerRadiusBR:3,cornerRadiusTL:3,cornerRadiusTR:3,strokeOpacity:0,stroke:C.fromHex(0)}),n("RoundedRectangle",["editablelabel","background"]).states.create("active",{strokeOpacity:.2}),n("RoundedRectangle").setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8}),n("PointedRectangle").setAll({pointerBaseWidth:15,pointerLength:10,cornerRadius:8}),n("Slice").setAll({shiftRadius:0,dRadius:0,dInnerRadius:0});{const s=n("Tick");s.setAll({strokeOpacity:.15,isMeasured:!1,length:4.5,position:"absolute",crisp:!0}),L(s,"stroke",t,"grid")}n("Bullet").setAll({locationX:.5,locationY:.5}),n("Tooltip").setAll({position:"absolute",getFillFromSprite:!0,getStrokeFromSprite:!1,autoTextColor:!0,paddingTop:9,paddingBottom:8,paddingLeft:10,paddingRight:10,marginBottom:5,pointerOrientation:"vertical",centerX:Y,centerY:Y,animationEasing:Fe(Ce),exportable:!1}),n("Tooltip",["system"]).setAll({pointerOrientation:"horizontal",paddingTop:4,paddingRight:7,paddingBottom:4,paddingLeft:7});{const s=n("PointedRectangle",["tooltip","system","background"]);s.setAll({strokeOpacity:.3}),L(s,"fill",t,"background"),L(s,"stroke",t,"grid")}n("Label",["tooltip","system"]).setAll({fontSize:12,fill:t.get("background")}),n("Polygon").setAll({animationEasing:Fe(Ce)}),n("Link").setAll({cornerRadius:8,setStateOnChildren:!0});{const s=n("OrthogonalLine",["link","line"]);s.setAll({isMeasured:!1,crisp:!0});const o=s.states.create("active",{strokeWidth:2});L(o,"stroke",t,"negative")}n("OrthogonalLine",["link","hit"]).setAll({strokeWidth:10,opacity:0,strokeOpacity:0});{const s=n("OrthogonalLine");s.setAll({strokeWidth:1,strokeOpacity:1,cornerRadius:10}),L(s,"stroke",t,"grid")}{const s=n("Triangle",["link"]);s.setAll({width:14,height:10,centerY:0}),L(s,"fill",t,"grid"),L(s,"stroke",t,"grid"),s.states.create("default",{stateAnimationDuration:0});const o=s.states.create("active",{stateAnimationDuration:0,stroke:Be(16777215),strokeWidth:2});o.set("draw",l=>{l.arc(0,0,11,0,Math.PI*2),l.moveTo(-4,-4),l.lineTo(4,4),l.moveTo(4,-4),l.lineTo(-4,4)}),L(o,"fill",t,"negative")}n("PointedRectangle",["tooltip","background"]).setAll({strokeOpacity:.9,cornerRadius:4,pointerLength:4,pointerBaseWidth:8,fillOpacity:.9,stroke:C.fromHex(16777215)});{const s=n("Label",["tooltip"]);s.setAll({role:"tooltip",populateText:!0,paddingRight:0,paddingTop:0,paddingLeft:0,paddingBottom:0}),L(s,"fill",t,"alternativeText")}n("Button").setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,interactive:!0,layout:i,interactiveChildren:!1,setStateOnChildren:!0,focusable:!0}),n("Button").states.create("hover",{}),n("Button").states.create("down",{stateAnimationDuration:0}),n("Button").states.create("active",{}),n("Button").states.create("disabled",{forceInactive:!0});{const s=n("RoundedRectangle",["button","background"]);L(s,"fill",t,"primaryButton"),L(s,"stroke",t,"primaryButtonStroke")}{const s=n("RoundedRectangle",["button","background"]).states.create("hover",{});L(s,"fill",t,"primaryButtonHover")}{const s=n("RoundedRectangle",["button","background"]).states.create("down",{stateAnimationDuration:0});L(s,"fill",t,"primaryButtonDown")}{const s=n("RoundedRectangle",["button","background"]).states.create("active",{});L(s,"fill",t,"primaryButtonActive")}{const s=n("RoundedRectangle",["button","background"]).states.create("disabled",{});L(s,"fill",t,"primaryButtonDisabled")}{const s=n("Graphics",["button","icon"]).states.create("disabled",{});L(s,"fill",t,"primaryButtonTextDisabled")}{const s=n("Label",["button"]).states.create("disabled",{});L(s,"fill",t,"primaryButtonTextDisabled")}{const s=n("Graphics",["button","icon"]);s.setAll({forceInactive:!0}),L(s,"stroke",t,"primaryButtonText")}{const s=n("Label",["button"]);L(s,"fill",t,"primaryButtonText")}n("ConfirmButton").setAll({toggleKey:"active",setStateOnChildren:!0,label:ht.new(this._root,{text:e.translate("C
1onfirm"),forceHidden:!0})});{const s=n("RoundedRectangle",["button","background","confirm"]).states.create("active",{});L(s,"fill",t,"negative")}n("Label",["button","confirm"]).setAll({paddingTop:0,paddingBottom:0,paddingRight:3,paddingLeft:5}),n("Label",["button","confirm"]).states.create("default",{stateAnimationDuration:0}),n("Label",["button","confirm"]).states.create("active",{forceHidden:!1,stateAnimationDuration:0});{const s=n("Graphics",["icon","confirm","button"]);s.setAll({stateAnimationDuration:0}),s.states.create("default",{stateAnimationDuration:0}),L(s,"stroke",t,"primaryButtonText")}{const s=n("Graphics",["icon","confirm","button"]).states.create("active",{svgPath:"M -5 1 L 0 6 L 8 -5",strokeWidth:2});L(s,"stroke",t,"primaryButtonText")}{const s=n("Graphics",["icon","confirm","button","secondary"]).states.create("active",{});L(s,"stroke",t,"primaryButtonText")}{const s=n("RoundedRectangle",["button","background","confirm","secondary"]).states.create("active",{fillOpacity:1});L(s,"fill",t,"negative")}{const s=n("RoundedRectangle",["button","background","confirm","secondary"]).states.create("hoverActive",{fillOpacity:1});L(s,"fill",t,"negative")}n("Button",["button","confirm"]).states.create("hoverActive",{}),n("Button",["zoom"]).setAll({paddingTop:18,paddingBottom:18,paddingLeft:12,paddingRight:12,centerX:46,centerY:-10,y:0,x:I,role:"button",ariaLabel:e.translate("Zoom Out"),layer:30});{const s=n("RoundedRectangle",["background","button","zoom"]);s.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),L(s,"fill",t,"primaryButton")}{const s=n("RoundedRectangle",["background","button","zoom"]).states.create("hover",{});L(s,"fill",t,"primaryButtonHover")}{const s=n("RoundedRectangle",["background","button","zoom"]).states.create("down",{stateAnimationDuration:0});L(s,"fill",t,"primaryButtonDown")}{const s=n("Graphics",["icon","button","zoom"]);s.setAll({crisp:!0,strokeOpacity:.7,draw:o=>{o.moveTo(0,0),o.lineTo(12,0)}}),L(s,"stroke",t,"primaryButtonText")}n("Button",["resize"]).setAll({paddingTop:9,paddingBottom:9,paddingLeft:13,paddingRight:13,draggable:!0,centerX:Y,centerY:Y,position:"absolute",role:"slider",ariaValueMin:"0",ariaValueMax:"100",ariaLabel:e.translate("Use up and down arrows to move selection")});{const s=n("RoundedRectangle",["background","resize","button"]);s.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),L(s,"fill",t,"secondaryButton"),L(s,"stroke",t,"secondaryButtonStroke")}{const s=n("RoundedRectangle",["background","resize","button"]).states.create("hover",{});L(s,"fill",t,"secondaryButtonHover")}{const s=n("RoundedRectangle",["background","resize","button"]).states.create("down",{stateAnimationDuration:0});L(s,"fill",t,"secondaryButtonDown")}{const s=n("Graphics",["resize","button","icon"]);s.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:o=>{o.moveTo(0,.5),o.lineTo(0,12.5),o.moveTo(4,.5),o.lineTo(4,12.5)}}),L(s,"stroke",t,"secondaryButtonText")}n("Button",["resize","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize"}),n("Button",["resize","horizontal"]).setAll({cursorOverStyle:"ew-resize"}),n("Button",["play"]).setAll({paddingTop:13,paddingBottom:13,paddingLeft:14,paddingRight:14,ariaLabel:e.translate("Play"),toggleKey:"active"});{const s=n("RoundedRectangle",["play","background"]);s.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),L(s,"fill",t,"primaryButton")}{const s=n("Graphics",["play","icon"]);s.setAll({stateAnimationDuration:0,dx:1,draw:o=>{o.moveTo(0,-5),o.lineTo(8,0),o.lineTo(0,5),o.lineTo(0,-5)}}),L(s,"fill",t,"primaryButtonText")}n("Graphics",["play","icon"]).states.create("default",{stateAnimationDuration:0}),n("Graphics",["play","icon"]).states.create("active",{stateAnimationDuration:0,draw:s=>{s.moveTo(-4,-5),s.lineTo(-1,-5),s.lineTo(-1,5),s.lineTo(-4,5),s.lineTo(-4,-5),s.moveTo(4,-5),s.lineTo(1,-5),s.lineTo(1,5),s.lineTo(4,5),s.lineTo(4,-5)}}),n("Button",["switch"]).setAll({paddingTop:4,paddingBottom:4,paddingLeft:4,paddingRight:4,ariaLabel:e.translate("Press ENTER to toggle"),toggleKey:"active",width:40,height:24,layout:null});{const s=n("RoundedRectangle",["switch","background"]);s.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),L(s,"fill",t,"primaryButton")}{const s=n("Circle",["switch","icon"]);s.setAll({radius:8,centerY:0,centerX:0,dx:0}),L(s,"fill",t,"primaryButtonText")}n("Graphics",["switch","icon"]).states.create("active",{dx:16}),n("Scrollbar").setAll({start:0,end:1,layer:30,animationEasing:Fe(Ce)}),n("Scrollbar",["vertical"]).setAll({marginRight:13,marginLeft:13,minWidth:12,height:I}),n("Scrollbar",["horizontal"]).setAll({marginTop:13,marginBottom:13,minHeight:12,width:I}),this.rule("Button",["scrollbar"]).setAll({exportable:!1});{const s=n("RoundedRectangle",["scrollbar","main","background"]);s.setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8,fillOpacity:.8}),L(s,"fill",t,"fill")}{const s=n("RoundedRectangle",["scrollbar","thumb"]);s.setAll({role:"slider",ariaLive:"polite",position:"absolute",draggable:!0}),L(s,"fill",t,"secondaryButton")}{const s=n("RoundedRectangle",["scrollbar","thumb"]).states.create("hover",{});L(s,"fill",t,"secondaryButtonHover")}{const s=n("RoundedRectangle",["scrollbar","thumb"]).states.create("down",{stateAnimationDuration:0});L(s,"fill",t,"secondaryButtonDown")}n("RoundedRectangle",["scrollbar","thumb","vertical"]).setAll({x:Y,width:I,centerX:Y,ariaLabel:e.translate("Use up and down arrows to move selection")}),n("RoundedRectangle",["scrollbar","thumb","horizontal"]).setAll({y:Y,centerY:Y,height:I,ariaLabel:e.translate("Use left and right arrows to move selection")});{const s=n("PointedRectangle",["axis","tooltip","background"]);s.setAll({cornerRadius:0}
1),L(s,"fill",t,"alternativeBackground")}n("Label",["axis","tooltip"]).setAll({role:void 0}),n("Label",["axis","tooltip","y"]).setAll({textAlign:"right"}),n("Label",["axis","tooltip","y","opposite"]).setAll({textAlign:"left"}),n("Label",["axis","tooltip","x"]).setAll({textAlign:"center"}),n("Tooltip",["categoryaxis"]).setAll({labelText:"{category}"}),n("Star").setAll({spikes:5,innerRadius:5,radius:10}),n("Tooltip",["stock"]).setAll({paddingTop:6,paddingBottom:5,paddingLeft:7,paddingRight:7}),n("Tooltip",["indicator"]).setAll({forceHidden:!0}),n("PointedRectangle",["tooltip","stock","axis"]).setAll({pointerLength:0,pointerBaseWidth:0,cornerRadius:3}),n("Label",["tooltip","stock"]).setAll({fontSize:"0.8em"}),n("SpriteResizer").setAll({rotationStep:10,isMeasured:!1}),n("Container",["resizer","grip"]).states.create("hover",{});{const s=n("RoundedRectangle",["resizer","grip"]);s.setAll({strokeOpacity:.7,strokeWidth:1,fillOpacity:1,width:12,height:12}),L(s,"fill",t,"background"),L(s,"stroke",t,"alternativeBackground")}{const s=n("RoundedRectangle",["resizer","grip","outline"]);s.setAll({strokeOpacity:0,fillOpacity:0,width:20,height:20}),s.states.create("hover",{fillOpacity:.3}),L(s,"fill",t,"alternativeBackground")}n("RoundedRectangle",["resizer","grip","left"]).setAll({cornerRadiusBL:0,
1cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0}),n("RoundedRectangle",["resizer","grip","right"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0});{const s=n("Rectangle",["resizer","rectangle"]);s.setAll({strokeDasharray:[2,2],strokeOpacity:.5,strokeWidth:1}),L(s,"stroke",t,"alternativeBackground")}n("Graphics",["button","plus","icon"]).setAll({x:Y,y:Y,draw:s=>{s.moveTo(-4,0),s.lineTo(4,0),s.moveTo(0,-4),s.lineTo(0,4)}}),n("Graphics",["button","minus","icon"]).setAll({x:Y,y:Y,draw:s=>{s.moveTo(-4,0),s.lineTo(4,0)}}),n("Graphics",["button","home","icon"]).setAll({x:Y,y:Y,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"}),n("Button",["zoomtools"]).setAll({marginTop:1,marginBottom:2}),n("ZoomTools").setAll({x:I,centerX:I,y:I,centerY:I,paddingRight:10,paddingBottom:10}),n("ProgressPie").setAll({radius:I,width:50,height:50,centerX:qe(-50),centerY:qe(-50),innerRadius:qe(85),numberFormat:"#."});{const s=n("Label",["progresspie"]);s.setAll({centerX:Y,centerY:Y,fontSize:"0.75em"}),L(s,"fill",t,"primaryButton")}{const s=n("Circle",["progresspie"]);s.setAll({fillOpacity:.5}),L(s,"fill",t,"background")}{const s=n("Slice",["progresspie"]);s.setAll({startAngle:-90}),L(s,"fill",t,"primaryButton")}{const s=n("Slice",["progresspie","background"]);s.setAll({fillOpacity:.2,arc:360}),L(s,"fill",t,"primaryButton")}n("EditableLabel",["numericstepper"]).setAll({y:Y,centerY:Y,multiLine:!1,marginRight:2});{const s=n("Container",["numericstepper","buttons"]);s.setAll({layout:this._root.verticalLayout,centerY:Y,y:Y,marginRight:10,opacity:0}),s.states.create("active",{opacity:1}),s.states.create("default",{opacity:0})}{const s=n("Triangle",["numericstepper"]);s.setAll({width:17,height:11,marginTop:3,marginBottom:3,strokeWidth:5,strokeOpacity:0,cursorOverStyle:"pointer"}),L(s,"fill",t,"secondaryButton")}n("Triangle",["downbutton"]).setAll({rotation:180})}}class $i{constructor(e=1,t=0,i=0,r=1,n=0,s=0){Object.defineProperty(this,"a",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"b",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"c",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"d",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ty",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.a=e,this.b=t,this.c=i,this.d=r,this.tx=n,this.ty=s}setTransform(e,t,i,r,n,s=1){this.a=Math.cos(n)*s,this.b=Math.sin(n)*s,this.c=-Math.sin(n)*s,this.d=Math.cos(n)*s,this.tx=e-(i*this.a+r*this.c),this.ty=t-(i*this.b+r*this.d)}apply(e){return{x:this.a*e.x+this.c*e.y+this.tx,y:this.b*e.x+this.d*e.y+this.ty}}applyInverse(e){const t=1/(this.a*this.d+this.c*-this.b);return{x:this.d*t*e.x+-this.c*t*e.y+(this.ty*this.c-this.tx*this.d)*t,y:this.a*t*e.y+-this.b*t*e.x+(-this.ty*this.a+this.tx*this.b)*t}}append(e){const t=this.a,i=this.b,r=this.c,n=this.d;this.a=e.a*t+e.b*r,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*r,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*i+e.ty*n+this.ty}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,r=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty}copyFrom(e){this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty}}var Xa=function(){function a(e,t){var i=[],r=!0,n=!1,s=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(i.push(l.value),!(t&&i.length===t));r=!0);}catch(h){n=!0,s=h}finally{try{!r&&o.return&&o.return()}finally{if(n)throw s}}return i}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return a(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),It=Math.PI*2,qi=function(e,t,i,r,n,s,o){var l=e.x,h=e.y;l*=t,h*=i;var u=r*l-n*h,c=n*l+r*h;return{x:u+s,y:c+o}},Ka=function(e,t){var i=t===1.5707963267948966?.551915024494:t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),r=Math.cos(e),n=Math.sin(e),s=Math.cos(e+t),o=Math.sin(e+t);return[{x:r-n*i,y:n+r*i},{x:s+o*i,y:o-s*i},{x:s,y:o}]},ln=function(e,t,i,r){var n=e*r-t*i<0?-1:1,s=e*i+t*r;return s>1&&(s=1),s<-1&&(s=-1),n*Math.acos(s)},Za=function(e,t,i,r,n,s,o,l,h,u,c,d){var f=Math.pow(n,2),p=Math.pow(s,2),b=Math.pow(c,2),g=Math.pow(d,2),m=f*p-f*g-p*b;m<0&&(m=0),m/=f*g+p*b,m=Math.sqrt(m)*(o===l?-1:1);var _=m*n/s*d,v=m*-s/n*c,y=u*_-h*v+(e+i)/2,P=h*_+u*v+(t+r)/2,D=(c-_)/n,O=(d-v)/s,A=(-c-_)/n,E=(-d-v)/s,T=ln(1,0,D,O),S=ln(D,O,A,E);return l===0&&S>0&&(S-=It),l===1&&S<0&&(S+=It),[y,P,T,S]},$a=function(e){var t=e.px,i=e.py,r=e.cx,n=e.cy,s=e.rx,o=e.ry,l=e.xAxisRotation,h=l===void 0?0:l,u=e.largeArcFlag,c=u===void 0?0:u,d=e.sweepFlag,f=d===void 0?0:d,p=[];if(s===0||o===0)return[];var b=Math.sin(h*It/360),g=Math.cos(h*It/360),m=g*(t-r)/2+b*(i-n)/2,_=-b*(t-r)/2+g*(i-n)/2;if(m===0&&_===0)return[];s=Math.abs(s),o=Math.abs(o);var v=Math.pow(m,2)/Math.pow(s,2)+Math.pow(_,2)/Math.pow(o,2);v>1&&(s*=Math.sqrt(v),o*=Math.sqrt(v));var y=Za(t,i,r,n,s,o,c,f,b,g,m,_),P=Xa(y,4),D=P[0],O=P[1],A=P[2],E=P[3],T=Math.abs(E)/(It/4);Math.abs(1-T)<1e-7&&(T=1);var S=Math.max(Math.ceil(T),1);E/=S;for(var R=0;R<S;R++)p.push(Ka(A,E)),A+=E;return p.map(function(k){var B=qi(k[0],s,o,g,b,D,O),w=B.x,H=B.y,j=qi(k[1],s,o,g,b,D,O),U=j.x,K=j.y,ue=qi(k[2],s,o,g,b,D,O),he=ue.x,se=ue.y;return{x1:w,y1:H,x2:U,y2:K,x:he,y:se}})};function qa(a,e,t){if(e!==t)throw new Error("Required "+t+" arguments for "+a+" but got "+e)}function Tt(a,e,t){if(e<t)throw new Error("Required at least "+t+" arguments for "+a+" but got "+e)}function we(a,e,t){if(Tt(a,e,t),e%t!==0)throw new Error("Arguments for "+a+" must be in pairs of "+t)}function Ja(a){for(let e=0;e<a.length;e+=7){let t=e+3,i=a[t];if(i.length>1){const r=/^([01])([01])(.*)$/.exec(i);r!==null&&(a.splice(t,0,r[1]),++t,a.splice(t,0,r[2]),++t,r[3].length>
10?a[t]=r[3]:a.splice(t,1))}if(++t,i=a[t],i.length>1){const r=/^([01])(.+)$/.exec(i);r!==null&&(a.splice(t,0,r[1]),++t,a[t]=r[2])}}}function un(a){if(a===0||a===1)return a;throw new Error("Flag must be 0 or 1")}function Qa(a){const e=[0,0,0];for(let t=0;t<24;t++)e[t%3]<<=1,e[t%3]|=a&1,a>>=1;return(e[0]|0)+(e[1]<<8)+(e[2]<<16)}function li(a,e){for(;!(a.interactive&&!e(a));)if(a._parent)a=a._parent;else break}function eo(a,e,t){return Q(a,ur(e),i=>{const r=zn(i);let n=i.touches;n?(n.length==0&&(n=i.changedTouches),t(Gs(n),r)):t([i],r)})}function hn(a){const e=document.createElement("canvas");e.width=1,e.height=1;const t=e.getContext("2d",{willReadFrequently:!0});t.drawImage(a,0,0,1,1);try{return t.getImageData(0,0,1,1),!1}catch{return console.warn('Image "'+a.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 kt(a){a.width=0,a.height=0,a.style.width="0px",a.style.height="0px"}function cn(a){return Math.floor(a)+.5}class to{constructor(){Object.defineProperty(this,"_x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y",{enumerable:!0,configurable:!0,writable:!0,value:0})}get x(){return this._x}get y(){return this._y}set x(e){this._x=e}set y(e){this._y=e}}class Vi extends Nr{constructor(e){super(),Object.defineProperty(this,"_layer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"mask",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"visible",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"exportable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"interactive",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"inactive",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"wheelable",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"cancelTouch",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isMeasured",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"buttonMode",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"alpha",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"compoundAlpha",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"angle",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"scale",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"crisp",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"pivot",{enumerable:!0,configurable:!0,writable:!0,value:new to}),Object.defineProperty(this,"filter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cursorOverStyle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_replacedCursorStyle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_localMatrix",{enumerable:!0,configurable:!0,writable:!0,value:new $i}),Object.defineProperty(this,"_matrix",{enumerable:!0,configurable:!0,writable:!0,value:new $i}),Object.defineProperty(this,"_uMatrix",{enumerable:!0,configurable:!0,writable:!0,value:new $i}),Object.defineProperty(this,"_renderer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_localBounds",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bounds",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_colorId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._renderer=e}subStatus(e){return{inactive:this.inactive==null?e.inactive:this.inactive,layer:this._layer||e.layer}}
1_dispose(){this._renderer._removeObject(this),this.getLayer().dirty=!0}getCanvas(){return this.getLayer().view}getLayer(){let e=this;for(;;){if(e._layer)return e._layer;if(e._parent)e=e._parent;else return this._renderer.defaultLayer}}setLayer(e,t){e==null?this._layer=void 0:(this._layer=this._renderer.getLayer(e,!0),this._layer.visible=!0,this._layer.margin=t,t&&pt(this._layer.view,!1),this._renderer._ghostLayer.setMargin(this._renderer.layers),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(e){}_getColorId(){return this._colorId===void 0&&(this._colorId=this._renderer.paintId(this)),this._colorId}_isInteractive(e){return!e.inactive&&(this.interactive||this._renderer._forceInteractive>0)}_isInteractiveMask(e){return this._isInteractive(e)}contains(e){for(;;){if(e===this)return!0;if(e._parent)e=e._parent;else return!1}}toGlobal(e){return this._matrix.apply(e)}toLocal(e){return this._matrix.applyInverse(e)}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(e){this._setMatrix();const t=this.getLocalMatrix(),i=t.apply({x:e.left,y:e.top}),r=t.apply({x:e.right,y:e.top}),n=t.apply({x:e.right,y:e.bottom}),s=t.apply({x:e.left,y:e.bottom});return{left:Math.min(i.x,r.x,n.x,s.x),top:Math.min(i.y,r.y,n.y,s.y),right:Math.max(i.x,r.x,n.x,s.x),bottom:Math.max(i.y,r.y,n.y,s.y)}}on(e,t,i){return this.interactive?this._renderer._addEvent(this,e,t,i):new re(()=>{})}_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(e,t){const i=this._matrix;let r=i.tx*t,n=i.ty*t;this.crisp&&(r=cn(r),n=cn(n)),e.setTransform(i.a*t,i.b*t,i.c*t,i.d*t,r,n)}_transformMargin(e,t,i){const r=this._matrix;e.setTransform(r.a*t,r.b*t,r.c*t,r.d*t,(r.tx+i.left)*t,(r.ty+i.top)*t)}_transformLayer(e,t,i){i.margin?this._transformMargin(e,i.scale||t,i.margin):this._transform(e,i.scale||t)}render(e,t=0){if(this.visible&&(this.exportable!==!1||!this._renderer._omitTainted)){this._setMatrix();const i=this.subStatus(e),r=this._renderer.resolution,n=this._renderer.layers,s=this._renderer._ghostLayer,o=s.context,l=this.mask;l&&l._setMatrix(),x(n,h=>{if(h){const u=h.context;u.save(),l&&(l._transformLayer(u,r,h),l._runPath(u),u.clip()),u.globalAlpha=this.compoundAlpha*this.alpha,this._transformLayer(u,r,h),this.filter&&(u.filter=this.filter)}}),o.save(),l&&this._isInteractiveMask(i)&&(l._transformMargin(o,r,s.margin),l._runPath(o),o.clip()),this._transformMargin(o,r,s.margin),i.layer.order>0&&!t&&or(this._renderer._deferredGhostLayers,i.layer.order),this._render(i,t),o.restore(),x(n,h=>{h&&h.context.restore()})}}_render(e,t=0){this.exportable===!1&&(e.layer.tainted=!0)}_ghostOnly(e=0){return e>0}_drawGhost(e,t=0){const i=this._isInteractive(e),r=e.layer.order||0;return!!(i&&(r==0&&!this._ghostOnly(t)||r==t))}hovering(){return this._renderer._hovering.has(this)}dragging(){return this._renderer._dragging.some(e=>e.value===this)}shouldCancelTouch(){const e=this._renderer;return e.tapToActivate&&!e._touchActive?!1:this.cancelTouch?!0:this._parent?this._parent.shouldCancelTouch():!1}}class io extends Vi{constructor(){super(...arguments),Object.defineProperty(this,"interactiveChildren",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_childLayers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_children",{enumerable:!0,configurable:!0,writable:!0,value:[]})}_isInteractiveMask(e){return this.interactiveChildren||super._isInteractiveMask(e)}addChild(e){e._parent=this,this._children.push(e),e._layer&&this.registerChildLayer(e._layer)}addChildAt(e,t){e._parent=this,this._children.splice(t,0,e),e._layer&&this.registerChildLayer(e._layer)}removeChild(e){e._parent=void 0,ge(this._children,e)}_render(e,t){super._render(e);const i=this._renderer;this.interactive&&this.interactiveChildren&&++i._forceInteractive,x(this._children,r=>{r.compoundAlpha=this.compoundAlpha*this.alpha,r.render(e,t)}),this.interactive&&this.interactiveChildren&&--i._forceInteractive}registerChildLayer(e){this._childLayers||(this._childLayers=[]),zt(this._childLayers,e),this._parent&&this._parent.registerChildLayer(e)}markDirtyLayer(e=!1){super.markDirtyLayer(),e&&this._childLayers&&x(this._childLayers,t=>t.dirty=!0)}_dispose(){super._dispose(),this._childLayers&&x(this._childLayers,e=>{e.dirty=!0})}}function ie(a,e){a.left=Math.min(a.left,e.x),a.top=Math.min(a.top,e.y),a.right=Math.max(a.right,e.x),a.bottom=Math.max(a.bottom,e.y)}class ne{colorize(e,t){}colorizeGhost(e,t){this.colorize(e,t)}path(e){}pathGhost(e){this.path(e)}addBounds(e){}}class ro extends ne{colorize(e,t){e.beginPath()}}class Ji extends ne{constructor(e){super(),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){t!==void 0?e.fillStyle=t:e.fillStyle=this.color}}class no extends ne{constructor(e){super(),Object.defineProperty(this,"clearShadow",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.fill(),this.clearShadow&&(e.shadowColor="",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}}class so extends ne{colorize(e,t){e.stroke()}}class Qi extends ne{constructor(e,t,i,r){super(),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:t}
vendor: 4,621 bytes, line 1
1),Object.defineProperty(this,"lineJoin",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"lineCap",{enumerable:!0,configurable:!0,writable:!0,value:r})}colorize(e,t){t!==void 0?e.strokeStyle=t:e.strokeStyle=this.color,e.lineWidth=this.width,this.lineJoin&&(e.lineJoin=this.lineJoin),this.lineCap&&(e.lineCap=this.lineCap)}}class ao extends ne{constructor(e){super(),Object.defineProperty(this,"dash",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.setLineDash(this.dash)}}class oo extends ne{constructor(e){super(),Object.defineProperty(this,"dashOffset",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.lineDashOffset=this.dashOffset}}class lo extends ne{constructor(e,t,i,r){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:r})}path(e){e.rect(this.x,this.y,this.width,this.height)}addBounds(e){const t=this.x,i=this.y,r=t+this.width,n=i+this.height;ie(e,{x:t,y:i}),ie(e,{x:r,y:i}),ie(e,{x:t,y:n}),ie(e,{x:r,y:n})}}class uo extends ne{constructor(e,t,i){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:i})}path(e){e.moveTo(this.x+this.radius,this.y),e.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(e){ie(e,{x:this.x-this.radius,y:this.y-this.radius}),ie(e,{x:this.x+this.radius,y:this.y+this.radius})}}class ho extends ne{constructor(e,t,i,r){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radiusX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"radiusY",{enumerable:!0,configurable:!0,writable:!0,value:r})}path(e){e.ellipse(0,0,this.radiusX,this.radiusY,0,0,Math.PI*2)}addBounds(e){ie(e,{x:this.x-this.radiusX,y:this.y-this.radiusY}),ie(e,{x:this.x+this.radiusX,y:this.y+this.radiusY})}}class co extends ne{constructor(e,t,i,r,n,s){super(),Object.defineProperty(this,"cx",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cy",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"startAngle",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"endAngle",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"anticlockwise",{enumerable:!0,configurable:!0,writable:!0,value:s})}path(e){this.radius>0&&e.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(e){let t=Aa(this.cx,this.cy,this.startAngle*Rt,this.endAngle*Rt,this.radius);ie(e,{x:t.left,y:t.top}),ie(e,{x:t.right,y:t.bottom})}}class fo extends ne{constructor(e,t,i,r,n){super(),Object.defineProperty(this,"x1",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y1",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"x2",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"y2",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:n})}path(e){this.radius>0&&e.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}addBounds(e){}}class po extends ne{constructor(e,t){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t})}path(e){e.lineTo(this.x,this.y)}addBounds(e){ie(e,{x:this.x,y:this.y})}}class go extends ne{constructor(e,t){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t})}path(e){e.moveTo(this.x,this.y)}addBounds(e){ie(e,{x:this.x,y:this.y})}}class mo extends ne{path(e){e.closePath()}}class _o extends ne{constructor(e,t,i,r,n,s){super(),Object.defineProperty(this,"cpX",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cpY",{enumerable:!0,configurable:!0,writable:!0,value:t}
1),Object.defineProperty(this,"cpX2",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"cpY2",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"toX",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"toY",{enumerable:!0,configurable:!0,writable:!0,value:s})}path(e){e.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}addBounds(e){ie(e,{x:this.cpX,y:this.cpY}),ie(e,{x:this.cpX2,y:this.cpY2}),ie(e,{x:this.toX,y:this.toY})}}class bo extends ne{constructor(e,t,i,r){super(),Object.defineProperty(this,"cpX",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cpY",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"toX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"toY",{enumerable:!0,configurable:!0,writable:!0,value:r})}path(e){e.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(e){ie(e,{x:this.cpX,y:this.cpY}),ie(e,{x:this.toX,y:this.toY})}}class yo extends ne{constructor(e,t,i,r,n){super(),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"blur",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"offsetX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"offsetY",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"opacity",{enumerable:!0,configurable:!0,writable:!0,value:n})}colorize(e,t){this.opacity&&(e.fillStyle=this.color),e.shadowColor=this.color,e.shadowBlur=this.blur,e.shadowOffsetX=this.offsetX,e.shadowOffsetY=this.offsetY}colorizeGhost(e,t){}}class vo extends ne{constructor(e,t,i,r,n){super(),Object.defineProperty(this,"image",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:n})}path(e){e.drawImage(this.image,this.x,this.y,this.width,this.height)}addBounds(e){ie(e,{x:this.x,y:this.y}),ie(e,{x:this.width,y:this.height})}}class wo extends Vi{constructor(){super(...arguments),Object.defineProperty(this,"_operations",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"blendMode",{enumerable:!0,configurable:!0,writable:!0,value:bi.NORMAL}),Object.defineProperty(this,"_hasShadows",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_fillAlpha",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeAlpha",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}clear(){super.clear(),this._operations.length=0}_pushOp(e){this._operations.push(e)}beginFill(e,t=1){this._fillAlpha=t,e?e instanceof C?this._pushOp(new Ji(e.toCSS(t))):(this.isMeasured=!0,this._pushOp(new Ji(e))):this._pushOp(new Ji("rgba(0, 0, 0, "+t+")"))}endFill(){this._pushOp(new no(this._hasShadows))}endStroke(){this._pushOp(new so)}beginPath(){this._pushOp(new ro)}lineStyle(e=0,t,i=1,r,n){this._strokeAlpha=i,t?t instanceof C?this._pushOp(new Qi(e,t.toCSS(i),r,n)):this._pushOp(new Qi(e,t,r,n)):this._pushOp(new Qi(e,"rgba(0, 0, 0, "+i+")",r,n))}setLineDash(e){this._pushOp(new ao(e||[]))}setLineDashOffset(e=0){this._pushOp(new oo(e))}drawRect(e,t,i,r){this._pushOp(new lo(e,t,i,r))}drawCircle(e,t,i){this._pushOp(new uo(e,t,i))}drawEllipse(e,t,i,r){this._pushOp(new ho(e,t,i,r))}arc(e,t,i,r,n,s=!1){this._pushOp(new co(e,t,i,r,n,s))}arcTo(e,t,i,r,n){this._pushOp(new fo(e,t,i,r,n))}lineTo(e,t){this._pushOp(new po(e,t))}moveTo(e,t){this._pushOp(new go(e,t))}bezierCurveTo(e,t,i,r,n,s){this._pushOp(new _o(e,t,i,r,n,s))}quadraticCurveTo(e,t,i,r){this._pushOp(new bo(e,t,i,r))}closePath(){this._pushOp(new mo)}shadow(e,t=0,i=0,r=0,n){this._hasShadows=!0,this._pushOp(new yo(n?e.toCSS(n):e.toCSS(this._fillAlpha||this._strokeAlpha),t,i,r))}image(e,t,i,r,n){this._pushOp(new vo(e,t,i,r,n))}
1svgPath(e){let t=0,i=0,r=null,n=null,s=null,o=null;const l=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,h=/[\u0009\u0020\u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009\u0020\u000A\u000C\u000D]*,?/g,u=this._operations.length;try{let c;for(;(c=l.exec(e))!==null;){const d=c[1],f=c[2],p=[];for(;(c=h.exec(f))!==null;)p.push(c[1]);switch(d!=="S"&&d!=="s"&&d!=="C"&&d!=="c"&&(r=null,n=null),d!=="Q"&&d!=="q"&&d!=="T"&&d!=="t"&&(s=null,o=null),d){case"M":we(d,p.length,2),t=+p[0],i=+p[1],this.moveTo(t,i);for(let g=2;g<p.length;g+=2)t=+p[g],i=+p[g+1],this.lineTo(t,i);break;case"m":we(d,p.length,2),t+=+p[0],i+=+p[1],this.moveTo(t,i);for(let g=2;g<p.length;g+=2)t+=+p[g],i+=+p[g+1],this.lineTo(t,i);break;case"L":we(d,p.length,2);for(let g=0;g<p.length;g+=2)t=+p[g],i=+p[g+1],this.lineTo(t,i);break;case"l":we(d,p.length,2);for(let g=0;g<p.length;g+=2)t+=+p[g],i+=+p[g+1],this.lineTo(t,i);break;case"H":Tt(d,p.length,1);for(let g=0;g<p.length;++g)t=+p[g],this.lineTo(t,i);break;case"h":Tt(d,p.length,1);for(let g=0;g<p.length;++g)t+=+p[g],this.lineTo(t,i);break;case"V":Tt(d,p.length,1);for(let g=0;g<p.length;++g)i=+p[g],this.lineTo(t,i);break;case"v":Tt(d,p.length,1);for(let g=0;g<p.length;++g)i+=+p[g],this.lineTo(t,i);break;case"C":we(d,p.length,6);for(let g=0;g<p.length;g+=6){const m=+p[g],_=+p[g+1];r=+p[g+2],n=+p[g+3],t=+p[g+4],i=+p[g+5],this.bezierCurveTo(m,_,r,n,t,i)}break;case"c":we(d,p.length,6);for(let g=0;g<p.length;g+=6){const m=+p[g]+t,_=+p[g+1]+i;r=+p[g+2]+t,n=+p[g+3]+i,t+=+p[g+4],i+=+p[g+5],this.bezierCurveTo(m,_,r,n,t,i)}break;case"S":we(d,p.length,4),(r===null||n===null)&&(r=t,n=i);for(let g=0;g<p.length;g+=4){const m=2*t-r,_=2*i-n;r=+p[g],n=+p[g+1],t=+p[g+2],i=+p[g+3],this.bezierCurveTo(m,_,r,n,t,i)}break;case"s":we(d,p.length,4),(r===null||n===null)&&(r=t,n=i);for(let g=0;g<p.length;g+=4){const m=2*t-r,_=2*i-n;r=+p[g]+t,n=+p[g+1]+i,t+=+p[g+2],i+=+p[g+3],this.bezierCurveTo(m,_,r,n,t,i)}break;case"Q":we(d,p.length,4);for(let g=0;g<p.length;g+=4)s=+p[g],o=+p[g+1],t=+p[g+2],i=+p[g+3],this.quadraticCurveTo(s,o,t,i);break;case"q":we(d,p.length,4);for(let g=0;g<p.length;g+=4)s=+p[g]+t,o=+p[g+1]+i,t+=+p[g+2],i+=+p[g+3],this.quadraticCurveTo(s,o,t,i);break;case"T":we(d,p.length,2),(s===null||o===null)&&(s=t,o=i);for(let g=0;g<p.length;g+=2)s=2*t-s,o=2*i-o,t=+p[g],i=+p[g+1],this.quadraticCurveTo(s,o,t,i);break;case"t":we(d,p.length,2),(s===null||o===null)&&(s=t,o=i);for(let g=0;g<p.length;g+=2)s=2*t-s,o=2*i-o,t+=+p[g],i+=+p[g+1],this.quadraticCurveTo(s,o,t,i);break;case"A":case"a":const b=d==="a";
1Ja(p),we(d,p.length,7);for(let g=0;g<p.length;g+=7){let m=+p[g+5],_=+p[g+6];b&&(m+=t,_+=i);const v=$a({px:t,py:i,rx:+p[g],ry:+p[g+1],xAxisRotation:+p[g+2],largeArcFlag:un(+p[g+3]),sweepFlag:un(+p[g+4]),cx:m,cy:_});x(v,y=>{this.bezierCurveTo(y.x1,y.y1,y.x2,y.y2,y.x,y.y),t=y.x,i=y.y})}break;case"Z":case"z":qa(d,p.length,0),this.closePath();break}}}catch(c){this._operations.length=u,console.warn(`Error when parsing svgPath: 2 `+c.message+` 3`+e)}}_runPath(e){e.beginPath(),x(this._operations,t=>{t.path(e)})}_render(e,t=0){super._render(e);const i=e.layer.dirty,r=this._isInteractive(e),n=this._ghostOnly(t),s=this._drawGhost(e,t);if(i||r||n){const o=e.layer.context,l=this._renderer._ghostLayer.context;i&&!n&&(o.globalCompositeOperation=this.blendMode,o.beginPath());let h;s&&(l.beginPath(),h=this._getColorId()),x(this._operations,u=>{i&&!n&&(u.path(o),u.colorize(o,void 0)),s&&(u.pathGhost(l),u.colorizeGhost(l,h))})}}renderDetached(e){if(this.visible){this._setMatrix(),e.save();const t=this.mask;t&&(t._setMatrix(),t._transform(e,1),t._runPath(e),e.clip()),e.globalAlpha=this.compoundAlpha*this.alpha,this._transform(e,1),this.filter&&(e.filter=this.filter),e.globalCompositeOperation=this.blendMode,e.beginPath(),x(this._operations,i=>{i.path(e),i.colorize(e,void 0)}),e.restore()}}_addBounds(e){this.visible&&this.isMeasured&&x(this._operations,t=>{t.addBounds(e)})}}class ts extends Vi{constructor(e,t,i){super(e),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"style",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolution",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"textVisible",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"truncated",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_textInfo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalScale",{enumerable:!0,configurable:!0,writable:!0,value:1}),this.text=t,this.style=i}invalidateBounds(){super.invalidateBounds(),this._textInfo=void 0}invalidateVisibility(){this.textVisible=!0,this.scale=this._originalScale||1}_shared(e){this.style.textAlign&&(e.textAlign=this.style.textAlign),this.style.direction&&(e.direction=this.style.direction),this.style.textBaseline&&(e.textBaseline=this.style.textBaseline)}_prerender(e,t=!1,i=!1){super._render(e);const r=e.layer.context,n=this._renderer._ghostLayer.context,s=this.style;let o=this._getFontStyle(void 0,i);r.font=o,this._isInteractive(e)&&!t&&(n.font=o),s.fill&&(s.fill instanceof C?r.fillStyle=s.fill.toCSS(s.fillOpacity!=null?s.fillOpacity:1):r.fillStyle=s.fill),s.shadowColor&&(e.layer.context.shadowColor=s.shadowColor.toCSS(s.shadowOpacity||1)),s.shadowBlur&&(e.layer.context.shadowBlur=s.shadowBlur),s.shadowOffsetX&&(e.layer.context.shadowOffsetX=s.shadowOffsetX),s.shadowOffsetY&&(e.layer.context.shadowOffsetY=s.shadowOffsetY),this._shared(r),this._isInteractive(e)&&!t&&(n.fillStyle=this._getColorId(),this._shared(n))}_getFontStyle(e,t=!1){const i=this.style;let r=[];return e&&e.fontVariant?r.push(e.fontVariant):i.fontVariant&&r.push(i.fontVariant),t||(e&&e.fontWeight?r.push(e.fontWeight):i.fontWeight&&r.push(i.fontWeight)),e&&e.fontStyle?r.push(e.fontStyle):i.fontStyle&&r.push(i.fontStyle),e&&e.fontSize?(M(e.fontSize)&&(e.fontSize=e.fontSize+"px"),r.push(e.fontSize)):i.fontSize&&(M(i.fontSize)&&(i.fontSize=i.fontSize+"px"),r.push(i.fontSize)),e&&e.fontFamily?r.push(e.fontFamily):i.fontFamily?r.push(i.fontFamily):r.length&&r.push("Arial"),r.join(" ")}_render(e,t=0){if(this._textInfo||this._measure(e),this.textVisible){const i=this._isInteractive(e),r=e.layer.context,n=e.layer.dirty,s=this._renderer._ghostLayer.context,o=this._ghostOnly(t),l=this._drawGhost(e,t);r.save(),s.save(),this._prerender(e),x(this._textInfo,(h,u)=>{x(h.textChunks,(c,d)=>{if(c.style&&(r.save(),s.save(),o||(r.font=c.style),this._isInteractive(e)&&(s.font=c.style)),c.fill&&(r.save(),o||(r.fillStyle=c.fill.toCSS())),n&&!o&&r.fillText(c.text,c.offsetX,h.offsetY+c.offsetY),c.textDecoration=="underline"||c.textDecoration=="line-through"){let f=1,p=1,b=c.height;const g=this.style.oversizedBehavior||"";if(["truncate","wrap","wrap-no-break"].indexOf(g)>-1){const v=this._measureText(c.text,r);c.width=v.actualBoundingBoxLeft+v.actualBoundingBoxRight}let m=c.offsetX;switch(this.style.textAlign){case"right":case"end":m-=c.width;break;case"center":m-=c.width/2;break}if(c.style)switch(ke.getTextStyle(c.style).fontWeight){case"bolder":case"bold":case"700":case"8
300":case"900":f=2;break}b&&(p=b/20);let _;c.textDecoration=="line-through"?_=f+h.offsetY+c.offsetY-c.height/2:_=f+p*1.5+h.offsetY+c.offsetY,o||(r.save(),r.beginPath(),c.fill?r.strokeStyle=c.fill.toCSS():this.style.fill&&this.style.fill instanceof C&&(r.strokeStyle=this.style.fill.toCSS()),r.lineWidth=f*p,r.moveTo(m,_),r.lineTo(m+c.width,_),r.stroke(),r.restore())}i&&this.interactive&&l&&s.fillText(c.text,c.offsetX,h.offsetY+c.offsetY),c.fill&&r.restore(),c.style&&(r.restore(),s.restore())})}),r.restore(),s.restore()}}_addBounds(e){if(this.visible&&this.isMeasured){const t=this._measure({inactive:this.inactive,layer:this.getLayer()});ie(e,{x:t.left,y:t.top}),ie(e,{x:t.right,y:t.bottom})}}_ignoreFontWeight(){return/apple/i.test(navigator.vendor)}_measure(e){const t=e.layer.context,i=this._renderer._ghostLayer.context,r=this.style.direction=="rtl";this._textInfo=[];const n=this.style.oversizedBehavior,s=this.style.maxWidth,o=M(s)&&n=="truncate",l=M(s)&&(n=="wrap"||n=="wrap-no-break");t.save(),i.save(),this._prerender(e,!0,this._ignoreFontWeight());const h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",u=this.text.toString().replace(/\r/g,"").split(/\n/);let c=!0,d=0,f=0,p=0,b;x(u,(m,_)=>{let v;for(m==""?v=[{type:"value",text:""}]:v=ke.chunk(m,!1,this.style.ignoreFormatting);v.length>0;){let y={offsetY:p,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]};const P=this._measureText(h,t),D=P.actualBoundingBoxAscent+P.actualBoundingBoxDescent;y.height=D,y.ascent=P.actualBoundingBoxAscent;let O,A=this.style.textDecoration,E,T,S=!1,R=!0,k=[],B;Ir(v,(w,H)=>{if(w.type=="format")if(w.text=="[/]")c||(t.restore(),i.restore(),c=!0),E=void 0,b=void 0,T=void 0,A=this.style.textDecoration,B=void 0,O=w.text;else{c||(t.restore(),i.restore());let j=ke.getTextStyle(w.text);const U=this._getFontStyle(j);t.save(),i.save(),t.font=U,b=U,O=w.text,j.textDecoration&&(A=j.textDecoration),j.fill&&(E=j.fill),j.width&&(T=Pe(j.width)),j.verticalAlign&&(B=j.verticalAlign),c=!1;const K=this._measureText(h,t),ue=K.actualBoundingBoxAscent+K.actualBoundingBoxDescent;ue>y.height&&(y.height=ue),K.actualBoundingBoxAscent>y.ascent&&(y.ascent=K.actualBoundingBoxAscent)}else if(w.type=="value"&&!S){const j=this._measureText(w.text,t);let U=j.actualBoundingBoxLeft+j.actualBoundingBoxRight;if(o){this.truncated=void 0;let se=R||this.style.breakWords||!1;const oe=this.style.ellipsis||"",it=this._measureText(oe,t),Ve=it.actualBoundingBoxLeft+it.actualBoundingBoxRight;if(y.width+U>s){const Ls=s-y.width-Ve;w.text=this._truncateText(t,w.text,Ls,se),w.text+=oe,S=!0,this.truncated=!0}}else if(l&&y.width+U>s){const se=s-y.width,oe=this._truncateText(t,w.text,se,!1,R&&this.style.oversizedBehavior!="wrap-no-break");if(oe=="")return this.textVisible=!0,!1;k=v.slice(H+1),_t(oe)!=_t(w.text)&&(k.unshift({type:"value",text:w.text.substr(oe.length)}),O&&k.unshift({type:"format",text:O})),w.text=_t(oe),v=[],S=!0}let K=1,ue=1;if(b&&T&&T>U){const se=U/T;switch(this.style.textAlign){case"right":case"end":K=se;break;case"center":K=se,ue=se;break;default:ue=se}U=T}const he=j.actualBoundingBoxAscent+j.actualBoundingBoxDescent;he>y.height&&(y.height=he),j.actualBoundingBoxAscent>y.ascent&&(y.ascent=j.actualBoundingBoxAscent),y.width+=U,y.left+=j.actualBoundingBoxLeft/K,y.right+=j.actualBoundingBoxRight/ue,y.textChunks.push({style:b,fill:E,text:w.text,width:U,height:he,left:j.actualBoundingBoxLeft,right:j.actualBoundingBoxRight,ascent:j.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:A,verticalAlign:B}),R=!1}return!0}),this.style.lineHeight instanceof F?(y.height*=this.style.lineHeight.value,y.ascent*=this.style.lineHeight.value):(y.height*=this.style.lineHeight||1.2,y.ascent*=this.style.lineHeight||1.2),d<y.left&&(d=y.left),f<y.right&&(f=y.right),this._textInfo.push(y),p+=y.height,v=k||[]}}),c||(t.restore(),i.restore()),x(this._textInfo,(m,_)=>{let v=0;x(m.textChunks,y=>{if(y.offsetX=v+y.left-m.left,y.offsetY+=m.height-m.height*(this.style.baselineRatio||.19),v+=y.width*(r?-1:1),y.verticalAlign)switch(y.verticalAlign){case"super":y.offsetY-=m.height/2-y.height/2;break;case"sub":y.offsetY+=y.height/2;break}})});const g={left:r?-f:-d,top:0,right:r?d:f,bottom:p};if(n!=="none"){const m=this._fitRatio(g);if(m<1)if(n=="fit")M(this.style.minScale)&&m<this.style.minScale?(this.textVisible=!1,g.left=0,g.top=0,g.right=0,g.bottom=0):(this._originalScale||(this._originalScale=this.scale),this.scale=m,this.textVisible=!0);else if(n=="hide")this.textVisible=!1,g.left=0,g.top=0,g.right=0,g.bottom=0;else{switch(this.style.textAlign){case"right":case"end":g.left=r?s:-s,g.right=0;break;case"center":g.left=-s/2,g.right=s/2;break;default:g.left=0,g.right=r?-s:s}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}
3return t.restore(),i.restore(),g}_fitRatio(e){const t=this.style.maxWidth,i=this.style.maxHeight;if(!M(t)&&!M(i))return 1;const r=e.right-e.left,n=e.bottom-e.top;return Math.min(t/r||1,i/n||1)}_truncateText(e,t,i,r=!1,n=!0){let s;do{if(r)t=t.slice(0,-1);else{let l=t.replace(/[^,;:!?\\\/\sâ]+[,;:!?\\\/\sâ]*$/g,"");if((l==""||l===t)&&n)r=!0;else{if(l=="")return t;t=l}}const o=this._measureText(t,e);s=o.actualBoundingBoxLeft+o.actualBoundingBoxRight}while(s>i&&t!="");return t}_measureText(e,t){let i=t.measureText(e),r={};if(i.actualBoundingBoxAscent==null){const s=document.createElement("div");s.innerText=e,s.style.visibility="hidden",s.style.position="absolute",s.style.top="-1000000px;",s.style.fontFamily=this.style.fontFamily||"",s.style.fontSize=this.style.fontSize+"",document.body.appendChild(s);const o=s.getBoundingClientRect();document.body.removeChild(s);const l=o.height,h=i.width;r={actualBoundingBoxAscent:l,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:h,fontBoundingBoxAscent:l,fontBoundingBoxDescent:0,width:h}}else r={actualBoundingBoxAscent:i.actualBoundingBoxAscent,actualBoundingBoxDescent:i.actualBoundingBoxDescent,actualBoundingBoxLeft:i.actualBoundingBoxLeft,actualBoundingBoxRight:i.actualBoundingBoxRight,fontBoundingBoxAscent:i.actualBoundingBoxAscent,fontBoundingBoxDescent:i.actualBoundingBoxDescent,width:i.width};const n=i.width;switch(this.style.textAlign){case"right":case"end":r.actualBoundingBoxLeft=n,r.actualBoundingBoxRight=0;break;case"center":r.actualBoundingBoxLeft=n/2,r.actualBoundingBoxRight=n/2;break;default:r.actualBoundingBoxLeft=0,r.actualBoundingBoxRight=n}return r}}class xo{constructor(){Object.defineProperty(this,"fill",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fillOpacity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"textAlign",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontFamily",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontWeight",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontVariant",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"textDecoration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowColor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowBlur",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOpacity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineHeight",{enumerable:!0,configurable:!0,writable:!0,value:qe(120)}),Object.defineProperty(this,"baselineRatio",{enumerable:!0,configurable:!0,writable:!0,value:.19}),Object.defineProperty(this,"direction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"textBaseline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oversizedBehavior",{enumerable:!0,configurable:!0,writable:!0,value:"none"}),Object.defineProperty(this,"breakWords",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ellipsis",{enumerable:!0,configurable:!0,writable:!0,value:"â¦"}),Object.defineProperty(this,"maxWidth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxHeight",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"minScale",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ignoreFormatting",{enumerable:!0,configurable:!0,writable:!0,value:!1})}}class Po extends ts{constructor(){super(...arguments),Object.defineProperty(this,"textType",{enumerable:!0,configurable:!0,writable:!0,value:"circular"}
3),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startAngle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inside",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"orientation",{enumerable:!0,configurable:!0,writable:!0,value:"auto"}),Object.defineProperty(this,"kerning",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_textReversed",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_render(e,t=0){switch(this.textType){case"circular":this._renderCircular(e,t);break;default:super._render(e,t);break}}_renderCircular(e,t=0){if(this.textVisible){this._prerender(e);const i=this._isInteractive(e),r=e.layer.context,n=e.layer.dirty,s=this._renderer._ghostLayer.context;r.save(),i&&s.save(),this._textInfo||this._measure(e);let o=this.radius||0,l=this.startAngle||0,h=0,u=this.orientation,c=u=="auto"?"auto":u=="inward";const d=this.inside,f=this.style.textAlign||"left",p=this.kerning||0;let b=f=="left"?1:-1;const g=!this._textReversed,m=this._ghostOnly(t),_=this._drawGhost(e,t);if(c=="auto"){let v=0,y=0;x(this._textInfo,(P,D)=>{const O=l+P.width/(o-P.height)/2*-b;O>v&&(v=O)}),f=="left"?y=(v+h/2)*Rt:f=="right"?y=(v-h/2)*Rt:y=l*Rt,y=Oa(y),c=y>=270||y<=90}c==!0&&g&&(this._textInfo.reverse(),this._textReversed=!0),x(this._textInfo,(v,y)=>{const P=v.height;d||(o+=P),(b==-1&&c||b==1&&!c)&&g&&v.textChunks.reverse();let D=l;h=0,f=="center"&&(D+=v.width/(o-P)/2*-b,h=D-l),D+=Math.PI*(c?0:1),r.save(),i&&s.save(),m||r.rotate(D),i&&s.rotate(D);let O=0;x(v.textChunks,(A,E)=>{const T=A.text,S=A.width;O=S/2/(o-P)*b,m||r.rotate(O),i&&s.rotate(O),A.style&&(r.save(),s.save(),m||(r.font=A.style),i&&(s.font=A.style)),A.fill&&(r.save(),m||(r.fillStyle=A.fill.toCSS())),m||(r.textBaseline="middle",r.textAlign="center"),i&&(s.textBaseline="middle",s.textAlign="center"),n&&!m&&r.fillText(T,0,(c?1:-1)*(0-o+P/2)),i&&_&&s.fillText(T,0,(c?1:-1)*(0-o+P/2)),A.fill&&r.restore(),A.style&&(r.restore(),s.restore()),O=(S/2+p)/(o-P)*b,m||r.rotate(O),i&&s.rotate(O)}),r.restore(),i&&s.restore(),d&&(o-=P)}),r.restore(),i&&s.restore()}}_measure(e){switch(this.textType){case"circular":return this._measureCircular(e);default:return super._measure(e)}}_measureCircular(e){const t=e.layer.context,i=this._renderer._ghostLayer.context,r=this.style.direction=="rtl",n=this.style.oversizedBehavior,s=this.style.maxWidth,o=M(s)&&n=="truncate",l=this.style.ellipsis||"";let h;this.textVisible=!0,this._textInfo=[],this._textReversed=!1,t.save(),i.save(),this._prerender(e,!0);const u=this.text.toString().replace(/\r/g,"").split(/\n/);let c=!0,d=0,f=0;return x(u,(p,b)=>{let g=ke.chunk(p,!1,this.style.ignoreFormatting),m={offsetY:f,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},_,v,y;x(g,(P,D)=>{if(P.type=="format"){if(P.text=="[/]")c||(t.restore(),i.restore(),c=!0),v=void 0,_=void 0,y=void 0;else{let O=ke.getTextStyle(P.text);const A=this._getFontStyle(O);t.save(),i.save(),t.font=A,_=A,O.fill&&(v=O.fill),O.width&&(y=Pe(O.width)),c=!1}o&&(h=this._measureText(l,t))}else if(P.type=="value"){let O=P.text.match(/./ug)||[];r&&(O=ha(P.text),O.reverse());for(let A=0;A<O.length;A++){const E=O[A],T=this._measureText(E,t);let S=T.width;_&&y&&y>S&&(S=y);const R=T.actualBoundingBoxAscent+T.actualBoundingBoxDescent;if(R>m.height&&(m.height=R),T.actualBoundingBoxAscent>m.ascent&&(m.ascent=T.actualBoundingBoxAscent),d+=S,o){h||(h=this._measureText(l,t));const k=h.actualBoundingBoxLeft+h.actualBoundingBoxRight;if(d+k>s){m.textChunks.length==1?this.textVisible=!1:(m.width+=k,m.left+=h.actualBoundingBoxLeft,m.right+=h.actualBoundingBoxRight,m.textChunks.push({style:_,fill:v,text:l,width:k,height:R+h.actualBoundingBoxDescent,left:h.actualBoundingBoxLeft,right:h.actualBoundingBoxRight,ascent:h.actualBoundingBoxAscent,offsetX:0,offsetY:R,textDecoration:void 0}));break}}m.width+=S,m.left+=T.actualBoundingBoxLeft,m.right+=T.actualBoundingBoxRight,m.textChunks.push({style:_,fill:v,text:E,width:S,height:R+T.actualBoundingBoxDescent,left:T.actualBoundingBoxLeft,right:T.actualBoundingBoxRight,ascent:T.actualBoundingBoxAscent,offsetX:0,offsetY:R,textDecoration:void 0})}}}),this.style.lineHeight instanceof F?m.height*=this.style.lineHeight.value:m.height*=this.style.lineHeight||1.2,this._textInfo.push(m),f+=m.height}
3),c||(t.restore(),i.restore()),n=="hide"&&d>s&&(this.textVisible=!1),x(this._textInfo,p=>{x(p.textChunks,b=>{b.offsetY+=Math.round((p.height-b.height+(p.ascent-b.ascent))/2)})}),t.restore(),i.restore(),{left:0,top:0,right:0,bottom:0}}}class Do extends Vi{constructor(e,t){super(e),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"image",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tainted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowColor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowBlur",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOpacity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_imageMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.image=t}_dispose(){super._dispose(),this._imageMask&&kt(this._imageMask)}getLocalBounds(){if(!this._localBounds){let e=0,t=0;this.width&&(e=this.width),this.height&&(t=this.height),this._localBounds={left:0,top:0,right:e,bottom:t},this._addBounds(this._localBounds)}return this._localBounds}_render(e,t=0){if(super._render(e),this.image){if(this.tainted===void 0&&(this.tainted=hn(this.image),e.layer.tainted=!0),this.tainted&&this._renderer._omitTainted)return;const i=this._ghostOnly(t),r=this._drawGhost(e,t);if(e.layer.dirty&&!i){this.shadowColor&&(e.layer.context.shadowColor=this.shadowColor.toCSS(this.shadowOpacity||1)),this.shadowBlur&&(e.layer.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(e.layer.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(e.layer.context.shadowOffsetY=this.shadowOffsetY);const n=this.width||this.image.naturalWidth,s=this.height||this.image.naturalHeight;e.layer.context.drawImage(this.image,0,0,n,s)}if(this.interactive&&this._isInteractive(e)&&r){const n=this._getMask(this.image);this._renderer._ghostLayer.context.drawImage(n,0,0)}}}clear(){super.clear(),this.image=void 0,this._imageMask=void 0}_getMask(e){if(this._imageMask===void 0){const t=this.width||e.naturalWidth,i=this.height||e.naturalHeight,r=document.createElement("canvas");r.width=t,r.height=i;const n=r.getContext("2d");n.imageSmoothingEnabled=!1,n.fillStyle=this._getColorId(),n.fillRect(0,0,t,i),hn(e)||(n.globalCompositeOperation="destination-in",n.drawImage(e,0,0,t,i)),this._imageMask=r}return this._imageMask}}class So{constructor(e,t,i,r){Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"originalPoint",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"point",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"bbox",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"simulated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"native",{enumerable:!0,configurable:!0,writable:!0,value:!0}),st("touchevents")&&e instanceof Touch?this.id=e.identifier:this.id=null}}class Oo extends Js{constructor(e){if(super(),Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("div")}),Object.defineProperty(this,"_layerDom",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("div")}),Object.defineProperty(this,"layers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_dirtyLayers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"defaultLayer",{enumerable:!0,configurable:!0,writable:!0,value:this.getLayer(0)}),Object.defineProperty(this,"_ghostLayer",{enumerable:!0,configurable:!0,writable:!0,value:new Ao}),Object.defineProperty(this,"_deferredGhostLayers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_patternCanvas",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("canvas")}),Object.defineProperty(this,"_patternContext",{enumerable:!0,configurable:!0,writable:!0,value:this._patternCanvas.getContext("2d")}),Object.defineProperty(this,"_realWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_realHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_calculatedWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_calculatedHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"resolution",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"interactionsEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_listeners",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_events",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_colorId",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_colorMap",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_forceInteractive",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_omitTainted",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_hovering",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"_dragging",{enumerable:!0,configurable:!0,writable:!0,value:[]}
3),Object.defineProperty(this,"_mousedown",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_lastPointerMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tapToActivate",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"tapToActivateTimeout",{enumerable:!0,configurable:!0,writable:!0,value:3e3}),Object.defineProperty(this,"_touchActive",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_touchActiveTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),e==null?this.resolution=window.devicePixelRatio:this.resolution=e,this.view.style.position="absolute",this.view.setAttribute("aria-hidden","true"),this.view.appendChild(this._layerDom),this._disposers.push(new re(()=>{V(this._events,(t,i)=>{i.disposer.dispose()}),x(this.layers,t=>{kt(t.view),t.exportableView&&kt(t.exportableView)}),kt(this._ghostLayer.view),kt(this._patternCanvas)})),this._disposers.push(Nn(()=>{e==null&&(this.resolution=window.devicePixelRatio)})),st("touchevents")){const t=i=>{this._dragging.length!==0&&Ir(this._dragging,r=>r.value.shouldCancelTouch()?(i.preventDefault(),!1):!0),this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(Q(window,"touchstart",t,{passive:!1})),this._disposers.push(Q(this.view,"touchstart",t,{passive:!1})),this._disposers.push(Q(this.view,"touchmove",()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()},{passive:!0})),this._disposers.push(Q(window,"click",i=>{this._touchActive=!1},{passive:!0})),this._disposers.push(Q(this.view,"click",i=>{window.setTimeout(()=>{this._touchActive=!0,this._delayTouchDeactivate()},100)},{passive:!0}))}st("wheelevents")&&this._disposers.push(Q(this.view,"wheel",t=>{let i=!1;this._hovering.forEach(r=>{if(r.wheelable)return i=!0,!1}),i&&t.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(e){e?this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(e,t,i,r){return this.defaultLayer.context.createLinearGradient(e,t,i,r)}createRadialGradient(e,t,i,r,n,s){return this.defaultLayer.context.createRadialGradient(e,t,i,r,n,s)}createPattern(e,t,i,r,n){return this._patternCanvas.width=r,this._patternCanvas.height=n,this._patternContext.clearRect(0,0,r,n),t.renderDetached(this._patternContext),e.renderDetached(this._patternContext),this._patternContext.createPattern(this._patternCanvas,i)}makeContainer(){return new io(this)}makeGraphics(){return new wo(this)}makeText(e,t){return new ts(this,e,t)}makeTextStyle(){return new xo}makeRadialText(e,t){return new Po(this,e,t)}
3makePicture(e){return new Do(this,e)}resizeLayer(e){e.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(e,t,i,r){this._realWidth=e,this._realHeight=t,this._calculatedWidth=i,this._calculatedHeight=r,x(this.layers,n=>{n&&(n.dirty=!0,this.resizeLayer(n))}),this.resizeGhost(),this.view.style.width=i+"px",this.view.style.height=r+"px"}createDetachedLayer(e=!1){const t=document.createElement("canvas"),i=t.getContext("2d",{willReadFrequently:e}),r=new To(t,i);return t.style.position="absolute",t.style.top="0px",t.style.left="0px",r}getLayerByOrder(e){const t=this.layers,i=t.length;for(let r=0;r<i;r++){const n=t[r];if(n.order==e)return n}}getLayer(e,t=!0){let i=this.getLayerByOrder(e);if(i)return i;const r=this.createDetachedLayer(e==99);r.order=e,r.visible=t,r.view.className="am5-layer-"+e,r.visible&&this.resizeLayer(r);const n=this.layers;n.push(r),n.sort((h,u)=>h.order>u.order?1:h.order<u.order?-1:0);const s=n.length,o=Nt(n,r);let l;for(let h=o+1;h<s;h++)if(n[h].visible){l=n[h];break}return r.visible&&(l===void 0?this._layerDom.appendChild(r.view):this._layerDom.insertBefore(r.view,l.view)),r}render(e){this._dirtyLayers.length=0,this._deferredGhostLayers=[],x(this.layers,i=>{i&&i.dirty&&i.visible&&(this._dirtyLayers.push(i),i.clear())}),this._ghostLayer.clear(),e.render({inactive:null,layer:this.defaultLayer});const t=this._deferredGhostLayers;if(t.length&&(t.sort((i,r)=>i-r),x(t,i=>{e.render({inactive:null,layer:this.defaultLayer},i)})),this._ghostLayer.context.restore(),x(this.layers,i=>{if(i){const r=i.context;r.beginPath(),r.moveTo(0,0),r.stroke()}}),x(this._dirtyLayers,i=>{i.context.restore(),i.dirty=!1}),this._hovering.size&&this._lastPointerMoveEvent){const{events:i,target:r,native:n}=this._lastPointerMoveEvent;x(i,s=>{this._dispatchGlobalMousemove(s,r,n)})}}paintId(e){const t=Qa(++this._colorId),i=C.fromHex(t).toCSS();return this._colorMap[i]=e,i}_removeObject(e){e._colorId!==void 0&&delete this._colorMap[e._colorId]}_adjustBoundingBox(e){const t=this._ghostLayer.margin;return new DOMRect(-t.left,-t.top,e.width+t.left+t.right,e.height+t.top+t.bottom)}getEvent(e,t=!0){const i=this.view.getBoundingClientRect(),r=e.clientX||0,n=e.clientY||0,s=this._calculatedWidth/this._realWidth,o=this._calculatedHeight/this._realHeight,l={x:r-i.left,y:n-i.top},h={x:(r-(t?i.left:0))*s,y:(n-(t?i.top:0))*o};return new So(e,l,h,this._adjustBoundingBox(i))}_getHitTarget(e,t,i){if(t.width===0||t.height===0||e.x<t.left||e.x>t.right||e.y<t.top||e.y>t.bottom||!i||!this._layerDom.contains(i))return;const r=this._ghostLayer.getImageData(e,t);if(r.data[0]===0&&r.data[1]===0&&r.data[2]===0)return!1;const n=C.fromRGB(r.data[0],r.data[1],r.data[2]).toCSS();return this._colorMap[n]}getObjectAtPoint(e){const t=this._ghostLayer.getImageArray(e);if(t[0]===0&&t[1]===0&&t[2]===0)return;const i=C.fromRGB(t[0],t[1],t[2]).toCSS();return this._colorMap[i]}_withEvents(e,t){const i=this._events[e];if(i!==void 0){i.dispatching=!0;try{t(i)}finally{i.dispatching=!1,i.cleanup&&(i.cleanup=!1,Gi(i.callbacks,r=>!r.disposed),i.callbacks.length===0&&(i.disposer.dispose(),delete this._events[e]))}}}_dispatchEventAll(e,t){this.interactionsEnabled&&this._withEvents(e,i=>{x(i.callbacks,r=>{r.disposed||r.callback.call(r.context,t)})})}_dispatchEvent(e,t,i){if(!this.interactionsEnabled)return!1;let r=!1;return this._withEvents(e,n=>{x(n.callbacks,s=>{!s.disposed&&s.object===t&&(s.callback.call(s.context,i),r=!0)})}),r}_dispatchMousedown(e,t){const i=e.button;if(i!=0&&i!=2&&i!=1&&i!==void 0)return;const r=this.getEvent(e),n=this._getHitTarget(r.originalPoint,r.bbox,t);if(n){const s=r.id;let o=!1;li(n,l=>{const h={id:s,value:l};return this._mousedown.push(h),!o&&this._dispatchEvent("pointerdown",l,r)&&(o=!0,this._dragging.some(c=>c.value===l&&c.id===s)||this._dragging.push(h)),!0})}}_dispatchGlobalMousemove(e,t,i){const r=this.getEvent(e),n=this._getHitTarget(r.originalPoint,r.bbox,t);r.native=i,n?(this._hovering.forEach(s=>{s.contains(n)||(this._hovering.delete(s),s.cursorOverStyle&&ti(document.body,"cursor",s._replacedCursorStyle),this._dispatchEvent("pointerout",s,r))}),r.native&&li(n,s=>(this._hovering.has(s)||(this._hovering.add(s),s.cursorOverStyle&&(s._replacedCursorStyle=ia(document.body,"cursor"),ti(document.body,"cursor",s.cursorOverStyle)),this._dispatchEvent("pointerover",s,r)),!0))):(this._hovering.forEach(s=>{s.cursorOverStyle&&ti(document.body,"cursor",s._replacedCursorStyle),this._dispatchEvent("pointerout",s,r)}),this._hovering.clear()),this._dispatchEventAll("globalpointermove",r)}removeHovering(e){this._hovering.delete(e),e.cursorOverStyle&&ti(document.body,"cursor",e._replacedCursorStyle)}
3_dispatchGlobalMouseup(e,t){const i=this.getEvent(e);i.native=t,this._dispatchEventAll("globalpointerup",i)}_dispatchDragMove(e){if(this._dragging.length!==0){const t=this.getEvent(e),i=t.id;this._dragging.forEach(r=>{r.id===i&&this._dispatchEvent("pointermove",r.value,t)})}}_dispatchDragEnd(e,t){const i=e.button;let r;if(i==0||i===void 0)r="click";else if(i==2)r="rightclick";else if(i==1)r="middleclick";else return;const n=this.getEvent(e),s=n.id;if(this._mousedown.length!==0){const o=this._getHitTarget(n.originalPoint,n.bbox,t);o&&this._mousedown.forEach(l=>{l.id===s&&l.value.contains(o)&&this._dispatchEvent(r,l.value,n)}),this._mousedown.length=0}this._dragging.length!==0&&(this._dragging.forEach(o=>{o.id===s&&this._dispatchEvent("pointerup",o.value,n)}),this._dragging.length=0)}_dispatchDoubleClick(e,t){const i=this.getEvent(e),r=this._getHitTarget(i.originalPoint,i.bbox,t);r&&li(r,n=>!this._dispatchEvent("dblclick",n,i))}_dispatchWheel(e,t){const i=this.getEvent(e),r=this._getHitTarget(i.originalPoint,i.bbox,t);r&&li(r,n=>
3!this._dispatchEvent("wheel",n,i))}_makeSharedEvent(e,t){if(this._listeners[e]===void 0){const i=t();this._listeners[e]=new Fn(()=>{delete this._listeners[e],i.dispose()})}return this._listeners[e].increment()}_onPointerEvent(e,t){let i=!1,r=null;function n(){r=null,i=!1}return new De([new re(()=>{r!==null&&clearTimeout(r),n()}),Q(this.view,ur(e),s=>{i=!0,r!==null&&clearTimeout(r),r=window.setTimeout(n,0)}),eo(window,e,(s,o)=>{r!==null&&(clearTimeout(r),r=null),t(s,o,i),i=!1})])}_initEvent(e){switch(e){case"globalpointermove":case"pointerover":case"pointerout":return this._makeSharedEvent("pointermove",()=>{const t=(i,r,n)=>{this._lastPointerMoveEvent={events:i,target:r,native:n},x(i,s=>{this._dispatchGlobalMousemove(s,r,n)})};return new De([this._onPointerEvent("pointerdown",t),this._onPointerEvent("pointermove",t)])});case"globalpointerup":return this._makeSharedEvent("pointerup",()=>{const t=this._onPointerEvent("pointerup",(r,n,s)=>{x(r,o=>{this._dispatchGlobalMouseup(o,s)}),this._lastPointerMoveEvent={events:r,target:n,native:s}}),i=this._onPointerEvent("pointercancel",(r,n,s)=>{x(r,o=>{this._dispatchGlobalMouseup(o,s)}),this._lastPointerMoveEvent={events:r,target:n,native:s}});return new re(()=>{t.dispose(),i.dispose()})});case"click":case"rightclick":case"middleclick":case"pointerdown":case"pointermove":case"pointerup":return this._makeSharedEvent("pointerdown",()=>{const t=this._onPointerEvent("pointerdown",(s,o)=>{x(s,l=>{this._dispatchMousedown(l,o)})}),i=this._onPointerEvent("pointermove",s=>{x(s,o=>{this._dispatchDragMove(o)})}),r=this._onPointerEvent("pointerup",(s,o)=>{x(s,l=>{this._dispatchDragEnd(l,o)})}),n=this._onPointerEvent("pointercancel",(s,o)=>{x(s,l=>{this._dispatchDragEnd(l,o)})});return new re(()=>{t.dispose(),i.dispose(),r.dispose(),n.dispose()})});case"dblclick":return this._makeSharedEvent("dblclick",()=>this._onPointerEvent("dblclick",(t,i)=>{x(t,r=>{this._dispatchDoubleClick(r,i)})}));case"wheel":return this._makeSharedEvent("wheel",()=>Q(this.view,ur("wheel"),t=>{this._dispatchWheel(t,zn(t))},{passive:!1}))}}_addEvent(e,t,i,r){let n=this._events[t];n===void 0&&(n=this._events[t]={disposer:this._initEvent(t),callbacks:[],dispatching:!1,cleanup:!1});const s={object:e,context:r,callback:i,disposed:!1};return n.callbacks.push(s),new re(()=>{s.disposed=!0,n.dispatching?n.cleanup=!0:(ge(n.callbacks,s),n.callbacks.length===0&&(n.disposer.dispose(),delete this._events[t]))})}getCanvas(e,t){this.render(e),t||(t={});let i=this.resolution,r=Math.floor(this._calculatedWidth*this.resolution),n=Math.floor(this._calculatedHeight*this.resolution);if(t.minWidth&&t.minWidth>r){let f=t.minWidth/r;f>i&&(i=f*this.resolution)}if(t.minHeight&&t.minHeight>n){let f=t.minHeight/n;f>i&&(i=f*this.resolution)}if(t.maxWidth&&t.maxWidth<r){let f=t.maxWidth/r;f<i&&(i=f*this.resolution)}if(t.maxHeight&&t.maxHeight>n){let f=t.maxHeight/n;f<i&&(i=f*this.resolution)}t.maintainPixelRatio&&(i/=this.resolution);const s=[];let o=!1;const l=document.createElement("canvas");i!=this.resolution&&(o=!0,r=r*i/this.resolution,n=n*i/this.resolution),l.width=r,l.height=n,l.style.position="fixed",l.style.top="-10000px",this.view.appendChild(l),s.push(l);const h=l.getContext("2d");let u=0,c=0,d=!1;return x(this.layers,f=>{if(f&&f.visible&&(f.tainted||o)){d=!0,f.exportableView=f.view,f.exportableContext=f.context,f.view=document.createElement("canvas"),f.view.style.position="fixed",f.view.style.top="-10000px",this.view.appendChild(f.view),s.push(f.view);let p=0,b=0;f.margin&&(p+=f.margin.left||0+f.margin.right||0,b+=f.margin.top||0+f.margin.bottom||0),f.view.width=r+p,f.view.height=n+b,f.context=f.view.getContext("2d"),f.dirty=!0,f.scale=i}}),d&&(this._omitTainted=!0,this.render(e),this._omitTainted=!1),x(this.layers,f=>{if(f&&f.visible){let p=0,b=0;f.margin&&(p=-(f.margin.left||0)*this.resolution,b=-(f.margin.top||0)*this.resolution),h.drawImage(f.view,p,b),f.exportableView&&(f.view=f.exportableView,f.exportableView=void 0),f.exportableContext&&(f.context=f.exportableContext,f.exportableContext=void 0),u<f.view.clientWidth&&(u=f.view.clientWidth),c<f.view.clientHeight&&(c=f.view.clientHeight),f.scale=void 0}}
3),l.style.width=u+"px",l.style.height=c+"px",x(s,f=>{f.style.position="",f.style.top="",this.view.removeChild(f)}),l}}class Ao{constructor(){Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"margin",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_resolution",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_width",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_height",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"imageArray",{enumerable:!0,configurable:!0,writable:!0,value:void 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(e,t,i,r,n){this._resolution=n,e+=this.margin.left+this.margin.right,t+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,r+=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(e*n),this._height=Math.floor(t*n),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=r+"px"}getImageData(e,t){return this.context.getImageData(Math.round((e.x-t.left)/t.width*this._width),Math.round((e.y-t.top)/t.height*this._height),1,1)}getImageArray(e){this.imageArray||(this.imageArray=this.context.getImageData(0,0,this._width,this._height).data);const t=this.imageArray,i=Math.round(e.x*this._resolution),n=(Math.round(e.y*this._resolution)*this._width+i)*4;return[t[n],t[n+1],t[n+2],t[n+3]]}setMargin(e){this.margin.left=0,this.margin.right=0,this.margin.top=0,this.margin.bottom=0,x(e,t=>{t.margin&&(this.margin.left=Math.max(this.margin.left,t.margin.left),this.margin.right=Math.max(this.margin.right,t.margin.right),this.margin.top=Math.max(this.margin.top,t.margin.top),this.margin.bottom=Math.max(this.margin.bottom,t.margin.bottom))})}clear(){this.context.save(),this.context.fillStyle="#000",this.context.fillRect(0,0,this._width,this._height)}}class To{constructor(e,t){Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tainted",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"margin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"order",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"visible",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scale",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dirty",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"exportableView",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"exportableContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_width",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_height",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.view=e,this.context=t}resize(e,t,i,r,n){this.width!=null&&(e=this.width,i=this.width),this.height!=null&&(t=this.height,r=this.height),this.margin?(e+=this.margin.left+this.margin.right,t+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,r+=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(e*n),this._height=Math.floor(t*n),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=r+"px"}clear(){this.context.save(),this.context.clearRect(0,0,this._width,this._height)}}function dn(a,e){a==null?requestAnimationFrame(e):setTimeout(()=>{requestAnimationFrame(e)},1e3/a)}
3class Wr{constructor(e,t={},i){if(Object.defineProperty(this,"dom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_inner",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDirtyParents",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDirtyAnimation",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dirty",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyParents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyBounds",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyPositions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_ticker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_tickers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_updateTick",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Ot}),Object.defineProperty(this,"animationTime",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_animations",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_renderer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rootContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tooltipContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipContainerSettings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltip",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"language",{enumerable:!0,configurable:!0,writable:!0,value:Ua.new(this,{})}),Object.defineProperty(this,"locale",{enumerable:!0,configurable:!0,writable:!0,value:es}),Object.defineProperty(this,"utc",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timezone",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fps",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"numberFormatter",{enumerable:!0,configurable:!0,writable:!0,value:za.new(this,{})}),Object.defineProperty(this,"dateFormatter",{enumerable:!0,configurable:!0,writable:!0,value:Wa.new(this,{})}),Object.defineProperty(this,"durationFormatter",{enumerable:!0,configurable:!0,writable:!0,value:Ya.new(this,{})}),Object.defineProperty(this,"tabindex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_tabindexes",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_a11yD",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_focusElementDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_focusElementContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_focusedSprite",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isShift",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_keyboardDragPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipElementContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_readerAlertElement",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_skipNextGroupJump",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_logo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipDiv",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nonce",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"interfaceColors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"verticalLayout",{enumerable:!0,configurable:!0,writable:!0,value:xt.new(this,{})}),Object.defineProperty(this,"horizontalLayout",{enumerable:!0,configurable:!0,writable:!0,value:wt.new(this,{})}),Object.defineProperty(this,"gridLayout",{enumerable:!0,configurable:!0,writable:!0,value:ut.new(this,{})}),Object.defineProperty(this,"_paused",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"autoResize",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_fontHash",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"_isDisposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_resizeSensorDisposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltips",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_htmlElementContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_htmlEnabledContainers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"entitiesById",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_systemTooltip",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=t,t.accessible==!1&&(this._a11yD=!0),t.useSafeResolution==null&&(t.useSafeResolution=!0);let r;t.useSafeResolution&&(r=sa()),this._renderer=new Oo(r);let n;if(e instanceof HTMLElement?n=e:n=document.getElementById(e),x(Ae.rootElements,l=>{if(l.dom===n)if(Ae.autoDispose)l.dispose();else throw new Error("You cannot have multiple Roots on the same DOM node")}),this.interfaceColors=yi.new(this,{}),n===null)throw new Error("Could not find HTML element with id `"+e+"`");this.dom=n;let s=document.createElement("div");s.style.position="relative",s.style.width="100%",s.style.height="100%",
3n.appendChild(s);const o=t.tooltipContainerBounds;o&&(this._tooltipContainerSettings=o),this._inner=s,this._updateComputedStyles(),Ae.rootElements.push(this)}static new(e,t){const i=new Wr(e,t,!0);return i._init(),i}moveDOM(e){let t;if(e instanceof HTMLElement?t=e:t=document.getElementById(e),t){for(;this.dom.childNodes.length>0;)t.appendChild(this.dom.childNodes[0]);this.dom=t,this._initResizeSensor(),this.resize()}}_handleLogo(){if(this._logo){const e=this.dom.offsetWidth,t=this.dom.offsetHeight;e<=150||t<=60?this._logo.hide():this._logo.show()}}_showBranding(){if(!this._logo){const e=this.tooltipContainer.children.push($.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:qe(100),centerY:I,tooltipY:10,tooltipText:"Created using amCharts 5",tooltipX:I,cursorOverStyle:"pointer",background:lt.new(this,{fill:Be(4671320),fillOpacity:0,tooltipY:5})}));e.set("tooltip",this.systemTooltip),e.events.on("click",()=>{window.open("https://www.amcharts.com/","_blank")}),e.states.create("hover",{});const t=e.children.push(Le.new(this,{stroke:Be(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}));t.states.create("hover",{stroke:Be(3976191)});const i=e.children.push(Le.new(this,{stroke:Be(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})),r=Fe(Ce),n=1500;e.setTimeout(()=>{i.animate({key:"strokeOpacity",to:1,duration:n,easing:r}),i.animate({key:"dx",to:0,duration:n,easing:r}),t.animate({key:"dx",to:0,duration:n,easing:r}),t.animate({key:"strokeOpacity",to:1,duration:n,easing:r})},3e3),i.states.create("hover",{stroke:Be(4671320)}),this._logo=e,this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(e){return this._settings.calculateSize?this._settings.calculateSize(e):{width:e.width,height:e.height}}_init(){const e=this._settings;e.accessible!==!1&&(e.focusable&&(this._inner.setAttribute("focusable","true"),this._inner.setAttribute("tabindex",this.tabindex+"")),e.ariaLabel&&this._inner.setAttribute("aria-label",e.ariaLabel),e.role&&this._inner.setAttribute("role",e.role));const t=this._renderer,i=this._getRealSize(),r=this._getCalculatedSize(i),n=Math.floor(r.width),s=Math.floor(r.height),o=Math.floor(i.width),l=Math.floor(i.height),h=$.new(this,{visible:!0,width:n,height:s});this._rootContainer=h,this._rootContainer._defaultThemes.push(Va.new(this));const u=h.children.push($.new(this,{visible:!0,width:I,height:I}));this.container=u,t.resize(o,l,n,s),this._inner.appendChild(t.view),this._initResizeSensor();const c=document.createElement("div");if(this._htmlElementContainer=c,c.className="am5-html-container",c.style.position="absolute",c.style.pointerEvents="none",this._tooltipContainerSettings||(c.style.overflow="hidden"),this._inner.appendChild(c),this._a11yD!==!0){const d=document.createElement("div");d.className="am5-reader-container",d.setAttribute("role","alert"),d.style.position="absolute",d.style.width="1px",d.style.height="1px",d.style.overflow="hidden",d.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=d,this._inner.appendChild(this._readerAlertElement);const f=document.createElement("div");f.className="am5-focus-container",f.style.position="absolute",f.style.pointerEvents="none",f.style.top="0px",f.style.left="0px",f.style.overflow="hidden",f.style.width=n+"px",f.style.height=s+"px",f.setAttribute("role","graphics-document"),pt(f,!1),this._focusElementContainer=f,this._inner.appendChild(this._focusElementContainer);const p=document.createElement("div");this._tooltipElementContainer=p,p.className="am5-tooltip-container",this._inner.appendChild(p),st("keyboardevents")&&(this._disposers.push(Q(window,"keydown",b=>{const g=ii(b);g=="Shift"?this._isShift=!0:g=="Tab"&&(this._isShift=b.shiftKey)})),this._disposers.push(Q(window,"keyup",b=>{ii(b)=="Shift"&&(this._isShift=!1)})),this._disposers.push(Q(f,"click",()=>{const b=this._focusedSprite;if(b){const g=b.get("clickAnnounceText","");g!==""&&this.readerAlert(g);const m=t.getEvent(new MouseEvent("click"));b.events.dispatch("click",{type:"click",originalEvent:m.event,point:m.point,simulated:!0,target:b})}})),this._disposers.push(Q(f,"keydown",b=>{const g=this._focusedSprite;if(g){b.key=="Escape"&&(ea(),this._focusedSprite=void 0);let m=0,_=0;const v=ii(b);switch(v){case"Enter":case" ":const y=g.get("clickAnnounceText","");if(y!==""&&this.readerAlert(y),v==" "&&g.get("role")!="checkbox")return;b.preventDefault();const P=t.getEvent(new MouseEvent("mouse"));g.events.dispatch("click",{type:"click",originalEvent:P.event,point:P.point,simulated:!0,target:g});return;case"ArrowLeft":m=-6;break;case"ArrowRight":m=6;break;case"ArrowUp":_=-6;break;case"ArrowDown":_=6;break;default:return}if(m!=0||_!=0){if(b.preventDefault(),!g.isDragging()){this._keyboardDragPoint={x:0,y:0};const D=t.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0}));D.point={x:0,y:0},g.events.isEnabled("pointerdown")&&g.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:D.event,point:D.point,simulated:!0,target:g})}const y=this._keyboardDragPoint;y.x+=m,y.y+=_;const P=t.getEvent(new MouseEvent("mousemove",{clientX:y.x,clientY:y.y}),!1);g.events.isEnabled("globalpointermove")&&g.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:P.event,point:P.point,simulated:!0,target:g})}}})),this._disposers.push(Q(f,"keyup",b=>{if(this._focusedSprite){const g=this._focusedSprite,m=ii(b);switch(m){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":if(g.isDragging()){const v=this._keyboardDragPoint,y=t.getEvent(new MouseEvent("mouseup",{clientX:v.x,clientY:v.y}));g.events.isEnabled("globalpointerup")&&g.events.dispatch("globalpointerup",{type:"globalpointerup",originalEvent:y.event,point:y.point,simulated:!0,target:g}),this._keyboardDragPoint=void 0;return}else if(g.get("focusableGroup")){const v=g.get("focusableGroup"),y=this._tabindexes.filter(O=>!!(O.get("focusableGroup")==v&&O.getPrivate("focusable")!==!1&&O.isVisibleDeep()));let P=y.indexOf(g);const D=y.length-1;P+=m=="ArrowRight"||m=="ArrowDown"?1:-1,P<0?P=D:P>D&&(P=0),ta(y[P].getPrivate("focusElement").dom)}break;case"Tab":const _=g.get("focusableGroup");if(_&&this._isShift){this._skipNextGroupJump||(this._focusNext(g.getPrivate("focusElement").dom,-1,_),this._skipNextGroupJump=!0);return}break}}})))}this._startTicker(),this.setThemes([]),this._addTooltip(),this._hasLicense()||this._showBranding()}get systemTooltip(){if(!this._systemTooltip){const e=Vt.new(this,{themeTags:["system"]});this._systemTooltip=e}return this._systemTooltip}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose(),this._resizeSensorDisposer=new Na(this.dom,()=>{this.autoResize&&this.resize()}),this._disposers.push(this._resizeSensorDisposer)}resize(){const e=this._getRealSize(),t=this._getCalculatedSize(e),i=Math.floor(t.width),r=Math.floor(t.height);if(i>0&&r>0){const n=Math.floor(e.width),s=Math.floor(e.height),o=this._htmlElementContainer;if(o.style.width=i+"px",o.style.height=r+"px",this._a11yD!==!0){const h=this._focusElementContainer;h.style.width=i+"px",h.style.height=r+"px"}this._renderer.resize(n,s,i,r);const l=this._rootContainer;l.setPrivate("width",i),l.setPrivate("height",r),this._render(),this._handleLogo()}}_render(){this._renderer.render(this._rootContainer._display),this._focusElementDirty&&(this._updateCurrentFocus(),this._focusElementDirty=!1)}_runTickers(e){x(this._tickers,t=>{t(e)})}_runAnimations(e){let t=0;return Gi(this._animations,i=>{const r=i._runAnimation(e);return r===at.Stopped?!1:(r===at.Playing&&++t,!0)}),this._isDirtyAnimation=!1,t===0}_runDirties(){let e={};for(;this._isDirtyParents;
3)this._isDirtyParents=!1,te(this._dirtyParents).forEach(s=>{const o=this._dirtyParents[s];delete this._dirtyParents[s],o.isDisposed()||(e[o.uid]=o,o._prepareChildren())});te(e).forEach(s=>{e[s]._updateChildren()});const t=[];te(this._dirty).forEach(s=>{const o=this._dirty[s];o.isDisposed()?delete this._dirty[o.uid]:(t.push(o),o._beforeChanged())}),t.forEach(s=>{s._changed(),delete this._dirty[s.uid],s._clearDirty()}),this._isDirty=!1;const i={},r=[];te(this._dirtyBounds).forEach(s=>{const o=this._dirtyBounds[s];delete this._dirtyBounds[s],o.isDisposed()||(i[o.uid]=o.depth(),r.push(o))}),this._positionHTMLElements(),r.sort((s,o)=>ot(i[o.uid],i[s.uid])),r.forEach(s=>{s._updateBounds()});const n=this._dirtyPositions;te(n).forEach(s=>{const o=n[s];delete n[s],o.isDisposed()||o._updatePosition()}),t.forEach(s=>{s._afterChanged()}),te(e).forEach(s=>{e[s]._childrenPrep=!1,e[s]._childrenUpdt=!1})}_renderFrame(e){if(this._updateTick){this.events.isEnabled("framestarted")&&this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:e}),this._checkComputedStyles(),this._runTickers(e);const t=this._runAnimations(e);return this._runDirties(),this._render(),this._renderer.resetImageArray(),this._positionHTMLElements(),this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:e}),this._tickers.length===0&&t&&!this._isDirtyAnimation&&!this._isDirty}else return!0}_runTicker(e,t){this.isDisposed()||(this.animationTime=e,this._renderFrame(e)?(this._ticker=null,this.animationTime=null):this._paused||(t?this._ticker:dn(this.fps,this._ticker)))}_runTickerNow(e=1e4){if(!this.isDisposed()){const t=performance.now()+e;for(;;){const i=performance.now();if(i>=t){this.animationTime=null;break}if(this.animationTime=i,this._renderFrame(i)){this.animationTime=null;break}}}}_startTicker(){this._ticker===null&&(this.animationTime=null,this._ticker=e=>{this._runTicker(e)},dn(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(e){this._updateTick=e,e&&this._startTicker()}_addDirtyEntity(e){this._isDirty=!0,this._dirty[e.uid]===void 0&&(this._dirty[e.uid]=e),this._startTicker()}_addDirtyParent(e){this._isDirty=!0,this._isDirtyParents=!0,this._dirtyParents[e.uid]===void 0&&(this._dirtyParents[e.uid]=e),this._startTicker()}_addDirtyBounds(e){this._isDirty=!0,this._dirtyBounds[e.uid]===void 0&&(this._dirtyBounds[e.uid]=e),this._startTicker()}_addDirtyPosition(e){this._isDirty=!0,this._dirtyPositions[e.uid]===void 0&&(this._dirtyPositions[e.uid]=e),this._startTicker()}_addAnimation(e){this._isDirtyAnimation=!0,this._animations.indexOf(e)===-1&&this._animations.push(e),this._startTicker()}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",()=>{this._isDirty=!0,this._startTicker()})}eachFrame(e){return this._tickers.push(e),this._startTicker(),new re(()=>{ge(this._tickers,e)})}markDirtyGlobal(e){e||(e=this.container),e.walkChildren(t=>{t instanceof $&&this.markDirtyGlobal(t),t.markDirty(),t.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(),x(this._disposers,e=>{e.dispose()}),this._inner&&Qs(this._inner),Me(Ae.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(e){if(this._a11yD!==!0){const t=this._readerAlertElement;e=en(e),t.innerHTML==e&&(t.innerHTML=""),t.innerHTML=e}}setThemes(e){this._rootContainer.set("themes",e);const t=this.tooltipContainer;t&&t._applyThemes();const i=this.interfaceColors;i&&i._applyThemes()}_addTooltip(){if(!this.tooltipContainer){const e=this._tooltipContainerSettings,t=this._rootContainer.children.push($.new(this,{position:"absolute",isMeasured:!1,width:I,height:I,layer:e?35:30,layerMargin:e||void 0}));this.tooltipContainer=t;const i=Vt.new(this,{});this.container.set("tooltip",i),i.hide(0),this._tooltip=i}}_registerTabindexOrder(e){this._a11yD!=!0&&(e.get("focusable")?zt(this._tabindexes,e):Me(this._tabindexes,e),this._invalidateTabindexes())}_unregisterTabindexOrder(e){this._a11yD!=!0&&(Me(this._tabindexes,e),this._invalidateTabindexes())}
3_invalidateTabindexes(){if(this._a11yD==!0)return;this._tabindexes.sort((t,i)=>{const r=t.get("tabindexOrder",0),n=i.get("tabindexOrder",0);return r==n?0:r>n?1:-1});const e=[];x(this._tabindexes,(t,i)=>{t.getPrivate("focusElement")?this._moveFocusElement(i,t):this._makeFocusElement(i,t);const r=t.get("focusableGroup");r&&t.getPrivate("focusable")!==!1&&(e.indexOf(r)!==-1?t.getPrivate("focusElement").dom.setAttribute("tabindex","-1"):e.push(r))})}_updateCurrentFocus(){this._a11yD!=!0&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(e,t){if(this._a11yD==!0||(t||(t=e.getPrivate("focusElement").dom),!t))return;const i=e.get("role");i?t.setAttribute("role",i):t.removeAttribute("role");const r=e.get("ariaLabel");if(r){const b=Yt(e,r);t.setAttribute("aria-label",b)}else t.removeAttribute("aria-label");const n=e.get("ariaLive");n?t.setAttribute("aria-live",n):t.removeAttribute("aria-live");const s=e.get("ariaChecked");s!=null&&i&&["checkbox","option","radio","menuitemcheckbox","menuitemradio","treeitem"].indexOf(i)!==-1?t.setAttribute("aria-checked",s?"true":"false"):t.removeAttribute("aria-checked");const o=e.get("ariaCurrent");o!=null?t.setAttribute("aria-current",o):t.removeAttribute("aria-current");const l=e.get("ariaSelected");l!=null&&i&&["gridcell","option","row","tab","columnheader","rowheader","treeitem"].indexOf(i)!==-1?t.setAttribute("aria-selected",l?"true":"false"):t.removeAttribute("aria-selected"),e.get("ariaHidden")?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden");const h=e.get("ariaOrientation");h?t.setAttribute("aria-orientation",h):t.removeAttribute("aria-orientation");const u=e.get("ariaValueNow");u?t.setAttribute("aria-valuenow",u):t.removeAttribute("aria-valuenow");const c=e.get("ariaValueMin");c?t.setAttribute("aria-valuemin",c):t.removeAttribute("aria-valuemin");const d=e.get("ariaValueMax");d?t.setAttribute("aria-valuemax",d):t.removeAttribute("aria-valuemax");const f=e.get("ariaValueText");f?t.setAttribute("aria-valuetext",f):t.removeAttribute("aria-valuetext");const p=e.get("ariaControls");p?t.setAttribute("aria-controls",p):t.removeAttribute("aria-controls"),e.get("visible")&&e.get("opacity")!==0&&e.get("role")!="tooltip"&&!e.isHidden()&&e.getPrivate("focusable")!==!1&&(e.height()||e.width())?(t.getAttribute("tabindex")!="-1"&&t.setAttribute("tabindex",""+this.tabindex),t.removeAttribute("aria-hidden")):(t.removeAttribute("tabindex"),t.setAttribute("aria-hidden","true"))}_makeFocusElement(e,t){if(t.getPrivate("focusElement")||this._a11yD==!0)return;const i=document.createElement("div");t.get("role")!="tooltip"&&(i.tabIndex=this.tabindex),i.style.position="absolute",pt(i,!1);const r=[];t.setPrivate("focusElement",{dom:i,disposers:r}),this._decorateFocusElement(t),r.push(Q(i,"focus",n=>{this._handleFocus(n)})),r.push(Q(i,"blur",n=>{this._handleBlur(n)})),this._moveFocusElement(e,t)}_removeFocusElement(e){if(this._a11yD==!0)return;Me(this._tabindexes,e);const t=e.getPrivate("focusElement");t&&(this._focusElementContainer.removeChild(t.dom),x(t.disposers,r=>{r.dispose()}))}_hideFocusElement(e){if(this._a11yD==!0)return;const t=e.getPrivate("focusElement");t.dom.style.display="none"}_moveFocusElement(e,t){if(this._a11yD==!0)return;const i=this._focusElementContainer,r=t.getPrivate("focusElement").dom;if(r===this._focusElementContainer.children[e])return;const n=this._focusElementContainer.children[e+1];n?i.insertBefore(r,n):i.append(r)}_positionFocusElement(e){if(this._a11yD==!0||e==null)return;this._focusElementContainer.scrollTop=0;const t=e.globalBounds();let i=t.right==t.left?e.width():t.right-t.left,r=t.top==t.bottom?e.height():t.bottom-t.top;const n=this._settings.focusPadding!==void 0?this._settings.focusPadding:2;let s=t.left-n,o=t.top-n;i<0&&(s+=i,i=Math.abs(i)),r<0&&(o+=r,r=Math.abs(r));const l=e.getPrivate("focusElement").dom;l.style.top=o+"px",l.style.left=s+"px",l.style.width=i+n*2+"px",l.style.height=r+n*2+"px"}_getSpriteByFocusElement(e){let t;return Ir(this._tabindexes,(i,r)=>i.getPrivate("focusElement").dom===e?(t=i,!1):!0),t}_handleFocus(e){if(this._a11yD==!0)return;const t=this._getSpriteByFocusElement(e.target);if(t){if(!t.isVisibleDeep()){this._focusNext(e.target,this._isShift?-1:1);return}this._positionFocusElement(t),this._focusedSprite=t,t.events.isEnabled("focus")&&t.events.dispatch("focus",{type:"focus",originalEvent:e,target:t}),t.getPrivate("focusElement").dom.tabIndex==-1&&(this._skipNextGroupJump=!1)}}_focusNext(e,t,i){if(this._a11yD==!0)return;const r=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
3([tabindex^="-"])'].join(",")));let n=r.indexOf(e)+t;n<0?n=r.length-1:n>=r.length&&(n=0);const s=r[n];if(i&&t==-1){const o=this._getSpriteByFocusElement(s);if(o&&o.get("focusableGroup")==i){this._focusNext(s,t);return}}s.focus()}_handleBlur(e){if(this._a11yD==!0)return;const t=this._focusedSprite;t&&!t.isDisposed()&&t.events.isEnabled("blur")&&t.events.dispatch("blur",{type:"blur",originalEvent:e,target:t}),this._focusedSprite=void 0}updateTooltip(e){if(this._a11yD==!0)return;const t=en(e._getText());let i=e.getPrivate("tooltipElement");e.get("role")=="tooltip"&&t!=""?(i||(i=this._makeTooltipElement(e)),i.innerHTML!=t&&(i.innerHTML=t),i.setAttribute("aria-hidden",e.isVisibleDeep()?"false":"true")):i&&(i.remove(),e.removePrivate("tooltipElement"))}_makeTooltipElement(e){const t=this._tooltipElementContainer,i=document.createElement("div");return i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.overflow="hidden",i.style.clip="rect(1px, 1px, 1px, 1px)",pt(i,!1),this._decorateFocusElement(e,i),t.append(i),e.setPrivate("tooltipElement",i),i}_removeTooltipElement(e){if(this._a11yD==!0)return;const t=e.getPrivate("tooltipElement");if(t){const i=t.parentElement;i&&i.removeChild(t)}}_invalidateAccessibility(e){if(this._a11yD==!0)return;this._focusElementDirty=!0;const t=e.getPrivate("focusElement");e.get("focusable")?t&&(this._decorateFocusElement(e),this._positionFocusElement(e)):t&&this._removeFocusElement(e)}focused(e){return this._focusedSprite===e}documentPointToRoot(e){const t=this._getRealSize(),i=this._getCalculatedSize(t),r=i.width/t.width,n=i.height/t.height;return{x:(e.x-t.left)*r,y:(e.y-t.top)*n}}rootPointToDocument(e){const t=this._getRealSize(),i=this._getCalculatedSize(t),r=i.width/t.width,n=i.height/t.height;return{x:e.x/r+t.left,y:e.y/n+t.top}}addDisposer(e){return this._disposers.push(e),e}_updateComputedStyles(){const e=window.getComputedStyle(this.dom);let t="";V(e,(r,n)=>{Je(r)&&r.match(/^font/)&&(t+=n)});const i=t!=this._fontHash;return i&&(this._fontHash=t),i}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(e){e instanceof $?e.children.each(t=>{this._invalidateLabelBounds(t)}):e instanceof Ut&&e.markDirtyBounds()}_hasLicense(){for(let e=0;e<Ae.licenses.length;e++)if(Ae.licenses[e].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(e){this._renderer.debugGhostView=e}set tapToActivate(e){this._renderer.tapToActivate=e}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(e){this._renderer.tapToActivateTimeout=e}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(e){const t=this._htmlElementContainer,i=document.createElement("div");e.setPrivate("htmlElement",i);let r=!1,n;e._walkParents(o=>{if(o.get("verticalScrollbar"))return r=!0,n=o,!1});let s;return r&&(s=document.createElement("div"),e.setPrivate("htmlElementWrapper",s),e.setPrivate("wrapperContainer",n),s.style.position="absolute",s.style.overflow="hidden",s.style.boxSizing="border-box",s.style.top="0px",s.style.left="0px",s.style.width="100%",s.style.height="100%",n.events.on("boundschanged",()=>{this._positionHTMLElement(e)})),i.style.position="absolute",i.style.overflow="auto",i.style.boxSizing="border-box",pt(i,e.get("interactive",!1)),e.events.isEnabled("click")&&(pt(i,!0),this._disposers.push(Q(i,"click",o=>{const l=this._renderer.getEvent(o);e.events.dispatch("click",{type:"click",originalEvent:l.event,point:l.point,simulated:!1,target:e})}))),this._positionHTMLElement(e),r?(s.append(i),t.append(s)):t.append(i),zt(this._htmlEnabledContainers,e),i}_positionHTMLElements(){x(this._htmlEnabledContainers,e=>{this._positionHTMLElement(e)})}_positionHTMLElement(e){const t=e.getPrivate("htmlElementWrapper");if(t){const r=e.getPrivate("wrapperContainer");if(r){const n=r.globalBounds();t.style.clipPath="rect("+n.top+"px "+n.right+"px "+n.bottom+"px "+n.left+"px)"}}const i=e.getPrivate("htmlElement");
3if(i){x(["paddingTop","paddingRight","paddingBottom","paddingLeft","minWidth","minHeight","maxWidth","maxHeight"],v=>{const y=e.get(v);y?i.style[v]=y+"px":i.style[v]=""}),x(["fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration"],v=>{const y=e.get(v);y?v=="fontSize"&&!Je(y)?i.style[v]=y+"px":i.style[v]=y+"":i.style[v]=""});const s=e.compositeScale()||1,o=e.compositeRotation()||0;i.style.transform="",i.style.transformOrigin="";const l=e.compositeOpacity();setTimeout(()=>{i.style.opacity=l+""},10);const h=e.isVisibleDeep();h&&(i.style.display="block");let u={x:e.x()+e.get("dx",0),y:e.y()+e.get("dy",0)};e.parent&&(u=e.parent.toGlobal(u)),i.style.top=u.y+"px",i.style.left=u.x+"px";const c=e.get("width"),d=e.get("height");let f=0,p=0;if(c&&(f=e.width()),d&&(p=e.height()),!c||!d){i.style.position="fixed",i.style.width="",i.style.height="";const v=i.getBoundingClientRect();i.style.position="absolute",c||(f=v.width),d||(p=v.height);let y=f/s,P=p/s,D=e.get("centerX",0),O=e.get("centerY",0),A=0,E=0,T=0,S=0;D instanceof F?(A=-D.value*y,E=(1-D.value)*y):(A=-D,E=y-D),O instanceof F?(T=-O.value*P,S=(1-O.value)*P):(T=-O,S=P-O),e._localBounds={left:A,right:E,top:T,bottom:S};let R=e._adjustedLocalBounds,k=e._display.getAdjustedBounds(e._localBounds);e._adjustedLocalBounds=k,(R.left!==k.left||R.right!==k.right||R.top!==k.top||R.bottom!==k.bottom)&&e.markDirtyBounds()}f>0&&(i.style.minWidth=f+"px"),p>0&&(i.style.minHeight=p+"px"),(!h||l==0)&&(i.style.display="none");const b=e.get("centerX",0),g=$r(b)?b.percent+"%":b+"px",m=e.get("centerY",0),_=$r(m)?m.percent+"%":m+"px";(b||m)&&(i.style.transform="translate(-"+g+", -"+_+")"+i.style.transform),s!=1&&(i.style.transform+="scale("+s+")"),o!=0&&(i.style.transform+=" rotate("+o+"deg)"),i.style.transform!=""&&(i.style.transformOrigin=g+" "+_)}}_setHTMLContent(e,t){let i=e.getPrivate("htmlElement");i||(i=this._makeHTMLElement(e),this.autoResize||this.resize()),i.innerHTML!=t&&(i.innerHTML=t)}_removeHTMLContent(e){const t=e.getPrivate("htmlElementWrapper"),i=e.getPrivate("htmlElement");t?(this._htmlElementContainer.removeChild(t),e.removePrivate("htmlElement"),e.removePrivate("htmlElementWrapper"),e.removePrivate("wrapperContainer")):i&&(this._htmlElementContainer.removeChild(i),e.removePrivate("htmlElement"),e.removePrivate("wrapperContainer")),Me(this._htmlEnabledContainers,e)}}class ko extends Wi{constructor(){super(...arguments),Object.defineProperty(this,"processor",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}incrementRef(){}decrementRef(){}_onPush(e){this.processor&&this.processor.processRow(e),super._onPush(e)}_onInsertIndex(e,t){this.processor&&this.processor.processRow(t),super._onInsertIndex(e,t)}_onSetIndex(e,t,i){this.processor&&this.processor.processRow(i),super._onSetIndex(e,t,i)}}class er extends Jn{constructor(e,t,i){super(i),Object.defineProperty(this,"component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dataContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"open",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"close",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dataContext=t,this.component=e,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(e){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,e)}hide(e){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,e)}isHidden(){return!this.get("visible")}}class Xt extends ${constructor(){super(...arguments),Object.defineProperty(this,"_data",{enumerable:!0,configurable:!0,writable:!0,value:new ko}),Object.defineProperty(this,"_dataItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_mainDataItems",{enumerable:!0,configurable:!0,writable:!0,value:this._dataItems}),Object.defineProperty(this,"valueFields",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"fields",{enumerable:!0,configurable:!0,writable:!0,value:["id"]}),Object.defineProperty(this,"_valueFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueFieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}
3),Object.defineProperty(this,"_valuesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataChanged",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"inited",{enumerable:!0,configurable:!0,writable:!0,value:!1})}set data(e){e.incrementRef(),this._data.decrementRef(),this._data=e}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(e=>{const t=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,e.type==="clear")x(t,i=>{i.dispose()}),t.length=0,this._onDataClear();else if(e.type==="push"){const i=new er(this,e.newValue,this._makeDataItem(e.newValue));t.push(i),this.processDataItem(i)}else if(e.type==="setIndex"){const i=t[e.index],r=this._makeDataItem(e.newValue);i.bullets&&i.bullets.length==0&&(i.bullets=void 0),te(r).forEach(n=>{i.get(n)!=r[n]&&i.animate({key:n,to:r[n],duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})}),i.dataContext=e.newValue}else if(e.type==="insertIndex"){const i=new er(this,e.newValue,this._makeDataItem(e.newValue));t.splice(e.index,0,i),this.processDataItem(i)}else if(e.type==="removeIndex")t[e.index].dispose(),t.splice(e.index,1);else if(e.type==="moveIndex"){const i=t[e.oldIndex];t.splice(e.oldIndex,1),t.splice(e.newIndex,0,i)}else throw new Error("Unknown IStreamEvent type");this._afterDataChange()}))}updateData(e){let t=0;x(e,(i,r)=>{const n=this.dataItems[r];if(!n)this.data.push(i);else{const s=n.dataContext;s&&te(i).forEach(u=>{s[u]=i[u]});const o=this._makeDataItem(s),l=this.get("interpolationDuration",0),h=this.get("interpolationEasing");te(o).forEach(u=>{n.get(u)!=o[u]&&n.animate({key:u,to:o[u],duration:l,easing:h})})}t=r});for(let i=t+1;i<this.dataItems.length;i++){const r=this.dataItems[i];Me(this.dataItems,r),r.dispose()}}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},x(this.valueFields,e=>{this.get(e+"Field")&&(this._valueFields.push(e),this._valueFieldsF[e]={fieldKey:e+"Field",workingKey:e+"Working"})})),this.fields&&(this._fields=[],this._fieldsF={},x(this.fields,e=>{this.get(e+"Field")&&(this._fields.push(e),this._fieldsF[e]=e+"Field")}))}get dataItems(){return this._dataItems}processDataItem(e){}_makeDataItem(e){const t={};return this._valueFields&&x(this._valueFields,i=>{const r=this.get(this._valueFieldsF[i].fieldKey);t[i]=e[r],t[this._valueFieldsF[i].workingKey]=t[i]}),this._fields&&x(this._fields,i=>{const r=this.get(this._fieldsF[i]);t[i]=e[r]}),t}makeDataItem(e,t){let i=new er(this,t,e);return this.processDataItem(i),i}pushDataItem(e,t){const i=this.makeDataItem(e,t);return this._mainDataItems.push(i),i}disposeDataItem(e){}showDataItem(e,t){return Re(this,void 0,void 0,function*(){e.set("visible",!0)})}hideDataItem(e,t){return Re(this,void 0,void 0,function*(){e.set("visible",!1)})}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){const e="datavalidated";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this}),this._dataChanged=!1}if(this._valuesDirty){const e="valueschanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}this.inited=!0}markDirtyValues(e){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}getDataItemById(e){return Fr(this.dataItems,t=>t.get("id")==e)}}Object.defineProperty(Xt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Component"});Object.defineProperty(Xt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:$.classNames.concat([Xt.className])});function Eo(a){return new Promise((e,t)=>{setTimeout(e,a)})}class Kt extends Xt{constructor(){super(...arguments),Object.defineProperty(this,"_aggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_selectionAggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_psi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pei",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_baseSeriesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:new Wi}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:$.new(this._root,{width:I,height:I,position:"absolute"})})}_afterNew(){this.valueFields.push("value","customValue"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll(()=>{this._handleBullets(this.dataItems)}))}
3_dispose(){this.bulletsContainer.dispose(),super._dispose()}startIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),e)}endIndex(){let e=this.dataItems.length;return Math.max(0,Math.min(this.getPrivate("endIndex",e),e))}_handleBullets(e){x(e,t=>{const i=t.bullets;i&&(x(i,r=>{r.dispose()}),t.bullets=void 0)}),this.markDirtyValues()}_makeBullets(e){this._shouldMakeBullet(e)&&(e.bullets=[],this.bullets.each(t=>{this._makeBullet(e,t)}))}_shouldMakeBullet(e){return!0}_makeBullet(e,t,i){const r=t(this._root,this,e);return r&&(r._index=i,this._makeBulletReal(e,r)),r}_makeBulletReal(e,t){let i=t.get("sprite");i&&(i._setDataItem(e),i.setRaw("position","absolute"),this.bulletsContainer.children.push(i)),t.series=this,e.bullets.push(t)}addBullet(e,t){e.bullets||(e.bullets=[]),t&&this._makeBulletReal(e,t)}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._baseSeriesDirty=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren();const e=this.dataItems,t=e.length;let i=this.startIndex(),r=this.endIndex();if(this.isDirty("name")&&this.updateLegendValue(),this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){const s=this.getPrivate("baseValueSeries");s&&this._disposers.push(s.onPrivate("startIndex",()=>{this._baseSeriesDirty=!0,this.markDirtyValues()}))}if(this.get("calculateAggregates")&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,t),this._aggregatesCalculated=!0,i!=0&&(this._psi=void 0))),(this._psi!=i||this._pei!=r||this.isPrivateDirty("adjustedStartIndex"))&&!this._selectionAggregatesCalculated&&(i===0&&r===t&&this._aggregatesCalculated||this._calculateAggregates(i,r),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let s=this.get("tooltip");s&&(s.hide(0),s.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let s;const o=this.get("legendDataItem");if(o&&(s=o.get("markerRectangle"),s&&this.isVisible())){if(this.isDirty("stroke")){let l=this.get("stroke");s.set("stroke",l)}if(this.isDirty("fill")){let l=this.get("fill");s.set("fill",l)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let s=this.startIndex(),o=this.endIndex();o<t&&o++;for(let l=s;l<o;l++){let h=e[l];h.bullets||this._makeBullets(h)}}}_handleRemoved(){}_adjustStartIndex(e){return e}_calculateAggregates(e,t){let i=this._valueFields;if(!i)throw new Error("No value fields are set for the series.");const r=this.get("excludeFromAggregate");r&&(i=i.filter(g=>r.indexOf(g)==-1));const n={},s={},o={},l={},h={},u={},c={},d={},f={};for(let g=0,m=i.length;g<m;g++){let _=i[g];n[_]=0,s[_]=0,o[_]=0}const p=this.dataItems,b=p.length;for(let g=0,m=i.length;g<m;g++){let _=i[g],v=_+"Change",y=_+"ChangePercent",P=_+"ChangePrevious",D=_+"ChangePreviousPercent",O=_+"ChangeSelection",A=_+"ChangeSelectionPercent",E="valueY";(_==="valueX"||_.endsWith("ValueX"))&&(E="valueX");const T=this.getPrivate("baseValueSeries"),S=this.getPrivate("adjustedStartIndex",e),R=(k,B,w)=>{if(e===0){const U=u[E],K=B-U;k.setRaw(v,K),k.setRaw(y,K/U*100)}const H=B-f[E],j=B-u[E];k.setRaw(P,H),k.setRaw(D,H/f[E]*100),k.setRaw(O,j),k.setRaw(A,j/u[E]*100),f[w]=B};for(let k=S;k<t;k++){const B=p[k];if(B){let w=B.get(_);if(w!=null){l[_]==null&&(l[_]=w),h[_]==null&&(h[_]=w),u[_]==null&&(u[_]=w,f[_]=w,T&&(u[E]=T._getBase(E)));break}}}for(let k=S;k<t;k++){const B=p[k];if(B){let w=B._settings[_];w!=null&&(o[_]++,n[_]+=w,s[_]+=Math.abs(w),l[_]>w&&(l[_]=w),h[_]<w&&(h[_]=w),c[_]=w,R(B,w,_))}}if(d[_]=n[_]/o[_],t<b){const k=p[t];if(k){let B=k.get(_);B!=null&&R(k,B,_)}}if(t+1<b){const k=p[t+1];if(k){let B=k.get(_);B!=null&&R(k,B,_)}}e>0&&e--,delete f[_];for(let k=e;k<S;k++){const B=p[k];if(B){let w=B.get(_);f[_]==null&&(f[_]=w),w!=null&&R(B,w,_)}}}for(let g=0,m=i.length;g<m;g++){let _=i[g];this.setPrivate(_+"AverageSelection",d[_]),this.setPrivate(_+"CountSelection",o[_]),this.setPrivate(_+"SumSelection",n[_]),this.setPrivate(_+"AbsoluteSumSelection",s[_]),this.setPrivate(_+"LowSelection",l[_]),this.setPrivate(_+"HighSelection",h[_]),this.setPrivate(_+"OpenSelection",u[_]),this.setPrivate(_+"CloseSelection",c[_])}if(e===0&&t===b)for(let g=0,m=i.length;g<m;g++){let _=i[g];this.setPrivate(_+"Average",d[_]),this.setPrivate(_+"Count",o[_]),this.setPrivate(_+"Sum",n[_]),this.setPrivate(_+"AbsoluteSum",s[_]),this.setPrivate(_+"Low",l[_]),this.setPrivate(_+"High",h[_]),this.setPrivate(_+"Open",u[_]),this.setPrivate(_+"Close",c[_])}}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer.set("visible",this.get("visible"));const e=this.get("heatRules");
3if(this._valuesDirty&&e&&e.length>0&&x(e,t=>{const i=t.minValue||this.getPrivate(t.dataField+"Low")||0,r=t.maxValue||this.getPrivate(t.dataField+"High")||0;x(t.target._entities,n=>{const s=n.dataItem.get(t.dataField);if(!M(s)){t.neutral&&n.set(t.key,t.neutral);const o=n.states;if(o){const l=o.lookup("default");l&&t.neutral&&l.set(t.key,t.neutral)}if(!t.customFunction)return}if(t.customFunction)t.customFunction.call(this,n,i,r,s);else{let o;t.logarithmic?o=(Math.log(s)*Math.LOG10E-Math.log(i)*Math.LOG10E)/(Math.log(r)*Math.LOG10E-Math.log(i)*Math.LOG10E):o=(s-i)/(r-i),M(s)&&(!M(o)||Math.abs(o)==1/0)&&(o=.5);let l;M(t.min)?l=t.min+(t.max-t.min)*o:t.min instanceof C?l=C.interpolate(o,t.min,t.max):t.min instanceof F&&(l=Xn(o,t.min,t.max)),n.set(t.key,l);const h=n.states;if(h){const u=h.lookup("default");u&&u.set(t.key,l)}}})}),this.get("visible")){const t=this.dataItems;let i=t.length,r=this.startIndex(),n=this.endIndex();n<i&&n++,r>0&&r--;for(let s=0;s<r;s++)this._hideBullets(t[s]);for(let s=r;s<n;s++)this._positionBullets(t[s]);for(let s=n;s<i;s++)this._hideBullets(t[s])}}_positionBullets(e){e.bullets&&x(e.bullets,t=>{this._positionBullet(t);const i=t.get("sprite");t.get("dynamic")&&(i&&(i._markDirtyKey("fill"),i.markDirtySize()),i instanceof $&&i.walkChildren(r=>{r._markDirtyKey("fill"),r.markDirtySize(),r instanceof ht&&r.text.markDirtyText()})),i instanceof ht&&i.get("populateText")&&i.text.markDirtyText()})}_hideBullets(e){e.bullets&&x(e.bullets,t=>{let i=t.get("sprite");i&&i.setPrivate("visible",!1)})}_positionBullet(e){}_placeBulletsContainer(e){e.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){const e=this.bulletsContainer;e.parent&&e.parent.children.removeValue(e)}disposeDataItem(e){const t=e.bullets;t&&(x(t,i=>{i.dispose()}),e.bullets=void 0)}_getItemReaderLabel(){return""}showDataItem(e,t){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return Re(this,void 0,void 0,function*(){const r=[i.showDataItem.call(this,e,t)],n=e.bullets;n&&x(n,s=>{const o=s.get("sprite");o&&r.push(o.show(t))}),yield Promise.all(r)})}hideDataItem(e,t){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return Re(this,void 0,void 0,function*(){const r=[i.hideDataItem.call(this,e,t)],n=e.bullets;n&&x(n,s=>{const o=s.get("sprite");o&&r.push(o.hide(t))}),yield Promise.all(r)})}_sequencedShowHide(e,t){return Re(this,void 0,void 0,function*(){if(this.get("sequencedInterpolation"))if(M(t)||(t=this.get("interpolationDuration",0)),t>0){const i=this.startIndex(),r=this.endIndex();yield Promise.all(ar(this.dataItems,(n,s)=>Re(this,void 0,void 0,function*(){let o=t||0;(s<i-10||s>r+10)&&(o=0);let l=this.get("sequencedDelay",0)+o/(r-i);yield Eo(l*(s-i)),e?yield this.showDataItem(n,o):yield this.hideDataItem(n,o)})))}else yield Promise.all(ar(this.dataItems,i=>e?this.showDataItem(i,0):this.hideDataItem(i,0)))})}updateLegendValue(e){if(e){const t=e.get("legendDataItem");if(t){const i=t.get("valueLabel");if(i){const n=i.text;let s="";i._setDataItem(e),s=this.get("legendValueText",n.get("text","")),i.set("text",s),n.markDirtyText()}const r=t.get("label");if(r){const n=r.text;let s="";r._setDataItem(e),s=this.get("legendLabelText",n.get("text","")),r.set("text",s),n.markDirtyText()}}}}updateLegendMarker(e){}_onHide(){super._onHide();const e=this.getTooltip();e&&e.hide()}hoverDataItem(e){}unhoverDataItem(e){}_getBase(e){const t=this.dataItems[this.startIndex()];return t?t.get(e):0}}Object.defineProperty(Kt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Series"});Object.defineProperty(Kt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Xt.classNames.concat([Kt.className])});class Zt extends ${constructor(){super(...arguments),Object.defineProperty(this,"chartContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push($.new(this._root,{width:I,height:I,interactiveChildren:!1}))}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:$.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:I,height:I})})}}Object.defineProperty(Zt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Chart"});Object.defineProperty(Zt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:$.classNames.c
3oncat([Zt.className])});class $t extends Zt{constructor(){super(...arguments),Object.defineProperty(this,"seriesContainer",{enumerable:!0,configurable:!0,writable:!0,value:$.new(this._root,{width:I,height:I,isMeasured:!1})}),Object.defineProperty(this,"series",{enumerable:!0,configurable:!0,writable:!0,value:new Kn})}_afterNew(){super._afterNew(),this._disposers.push(this.series);const e=this.seriesContainer.children;this._disposers.push(this.series.events.onAll(t=>{if(t.type==="clear"){x(t.oldValues,n=>{this._removeSeries(n)});const i=this.get("colors");i&&i.reset();const r=this.get("patterns");r&&r.reset()}else if(t.type==="push")e.moveValue(t.newValue),this._processSeries(t.newValue);else if(t.type==="setIndex")e.setIndex(t.index,t.newValue),this._processSeries(t.newValue);else if(t.type==="insertIndex")e.insertIndex(t.index,t.newValue),this._processSeries(t.newValue);else if(t.type==="removeIndex")this._removeSeries(t.oldValue);else if(t.type==="moveIndex")e.moveValue(t.value,t.newIndex),this._processSeries(t.value);else if(t.type==="swap"){const i=t.a,r=t.b,n=this.series.indexOf(i),s=this.series.indexOf(r);e.moveValue(i,s),e.moveValue(r,n),this.series.each(o=>{this._processSeries(o),o.markDirtyValues()})}else throw new Error("Unknown IListEvent type")}))}_processSeries(e){e.chart=this,e._placeBulletsContainer(this)}_removeSeries(e){e._handleRemoved(),e.isDisposed()||(this.seriesContainer.children.removeValue(e),e._removeBulletsContainer())}}Object.defineProperty($t,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SerialChart"});Object.defineProperty($t,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Zt.classNames.concat([$t.className])});class Lo{static parse(e,t){t=this._applyDefaults(t);try{if(Je(e)){let i=JSON.parse(e);return t.reverse&&Jr(i)&&i.reverse(),i}else{if(Jr(e)||St(e))return e;throw"Unable to parse JSON data"}}catch{return}}static _applyDefaults(e){const t={},i={reverse:!1};return e||(e={}),V(i,(r,n)=>{t[r]=e[r]||n}),t}}function Co(a,e,t){return new Promise((i,r)=>{let n=new XMLHttpRequest;n.onload=()=>{if(n.status===200){let s,o;s=n.responseText||n.response;let l={xhr:n,error:!1,response:s,blob:o,type:n.getResponseHeader("Content-Type"),target:e};i(l)}else r({xhr:n,error:!0,type:n.getResponseHeader("Content-Type"),target:e})},n.onerror=()=>{r({xhr:n,error:!0,type:n.getResponseHeader("Content-Type"),target:e})},n.open("GET",a,!0),n.send()})}class qt extends Kt{constructor(){super(...arguments),Object.defineProperty(this,"_types",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_geometries",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_geoJSONparsed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_excluded",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_notIncluded",{enumerable:!0,configurable:!0,writable:!0,value:[]})}_afterNew(){this.fields.push("geometry","geometryType"),this._setRawDefault("geometryField","geometry"),this._setRawDefault("geometryTypeField","geometryType"),this._setRawDefault("idField","id"),this.on("geoJSON",e=>{let t=this._prevSettings.geoJSON;t&&t!=e&&this.data.clear()}),super._afterNew()}_handleDirties(){const e=this.get("geoJSON");let t=this._prevSettings.geoJSON;t&&t!=e&&(this._prevSettings.geoJSON=void 0,this._geoJSONparsed=!1),this._geoJSONparsed||(this._parseGeoJSON(),this._geoJSONparsed=!0)}_prepareChildren(){if(super._prepareChildren(),this._valuesDirty&&this._handleDirties(),this.get("geoJSON")&&(this.isDirty("geoJSON")||this.isDirty("include")||this.isDirty("exclude"))){this._handleDirties();const e=this.chart,t=this.get("exclude");t&&(e&&(e._centerLocation=null),x(t,r=>{const n=this.getDataItemById(r);n&&this._excludeDataItem(n)}),x(this._excluded,r=>{const n=r.get("id");n&&t.indexOf(n)==-1&&this._unexcludeDataItem(r)})),(!t||t.length==0)&&(x(this._excluded,r=>{this._unexcludeDataItem(r)}),this._excluded=[]);const i=this.get("include");i&&(e&&(e._centerLocation=null),x(this.dataItems,r=>{const n=r.get("id");n&&i.indexOf(n)==-1?this._notIncludeDataItem(r):this._unNotIncludeDataItem(r)})),i||(x(this._notIncluded,r=>{this._unNotIncludeDataItem(r)}),this._notIncluded=[])}}_excludeDataItem(e){this._removeGeometry(e.get("geometry")),or(this._excluded,e)}_unexcludeDataItem(e){this._addGeometry(e.get("geometry"),this)}_notIncludeDataItem(e){this._removeGeometry(e.get("geometry")),or(this._notIncluded,e)}_unNotIncludeDataItem(e){this._addGeometry(e.get("geometry"),this)}checkInclude(e,t,i){if(t){if(t.length==0)return!1;if(t.indexOf(e)==-1)return!1}return!(i&&i.length>0&&i.indexOf(e)!=-1)}_parseGeoJSON(){const e=this.get("geoJSON");if(e){let t;e.type=="FeatureCollection"?t=e.features:e.type=="Feature"?t=[e]:["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"].indexOf(e.type)!=-1?t=[{geometry:e}]:console.log("nothing found in geoJSON");const i=this.get("geodataNames");if(t){const n=this.get("idField","id");for(let s=0,o=t.length;s<o;s++){let l=t[s],h=l.geometry;if(h){let u=h.type,c=l[n];if(i&&i[c]&&(l.properties.name=i[c]),this._types.indexOf(u)!=-1){let d;c!=null&&(d=Fr(this.dataItems,p=>p.get("id")==c));let f;d&&(f=d.dataContext),d?f.geometry||(f.geometry=h,f.geometryType=u,d.set("geometry",h),d.set("geometryType",u),this.processDataItem(d)):(f={geometry:h,geometryType:u,madeFromGeoData:!0},f[n]=c,this.data.push(f)),qs(l.properties,f)}}}}const r="geodataprocessed";this.events.isEnabled(r)&&this.events.dispatch(r,{type:r,target:this})}}_placeBulletsContainer(e){this.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){}projection(){const e=this.chart;if(e)return e.get("projection")}geoPath(){const e=this.chart;if(e)return e.getPrivate("geoPath")}_addGeometry(e,t){if(e&&t.get("affectsBounds",!0)){this._geometries.push(e);const i=this.chart;i&&i.markDirtyGeometries()}}_removeGeometry(e){if(e){Me(this._geometries,e);const t=this.chart;t&&t.markDirtyGeometries()}}_dispose(){super._dispose();const e=this.chart;e&&e.series.removeValue(this)}_onDataClear(){super._onDataClear(),this._geoJSONparsed=!1,this._markDirtyKey("exclude")}}Object.defineProperty(qt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"MapSeries"});Object.defineProperty(qt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Kt.classNames.c
vendor: 10,275 bytes, line 3
3oncat([qt.className])});class me{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let i=0;for(let r=0;r<this._n&&r<32;r++){const n=t[r],s=e+n,o=Math.abs(e)<Math.abs(n)?e-(s-n):n-(s-e);o&&(t[i++]=o),e=s}return t[i]=e,this._n=i+1,this}valueOf(){const e=this._partials;let t=this._n,i,r,n,s=0;if(t>0){for(s=e[--t];t>0&&(i=s,r=e[--t],s=i+r,n=r-(s-i),!n););t>0&&(n<0&&e[t-1]<0||n>0&&e[t-1]>0)&&(r=n*2,i=s+r,r==i-s&&(s=i))}return s}}function*Mo(a){for(const e of a)yield*e}function is(a){return Array.from(Mo(a))}var X=1e-6,pr=1e-12,z=Math.PI,ye=z/2,vi=z/4,_e=z*2,ae=180/z,N=z/180,Z=Math.abs,rs=Math.atan,et=Math.atan2,G=Math.cos,Bo=Math.exp,gr=Math.hypot,jo=Math.log,W=Math.sin,Ho=Math.sign||function(a){return a>0?1:a<0?-1:0},tt=Math.sqrt,Ro=Math.tan;function Io(a){return a>1?0:a<-1?z:Math.acos(a)}function ct(a){return a>1?ye:a<-1?-ye:Math.asin(a)}function le(){}function wi(a,e){a&&pn.hasOwnProperty(a.type)&&pn[a.type](a,e)}var fn={Feature:function(a,e){wi(a.geometry,e)},FeatureCollection:function(a,e){for(var t=a.features,i=-1,r=t.length;++i<r;)wi(t[i].geometry,e)}},pn={Sphere:function(a,e){e.sphere()},Point:function(a,e){a=a.coordinates,e.point(a[0],a[1],a[2])},MultiPoint:function(a,e){for(var t=a.coordinates,i=-1,r=t.length;++i<r;)a=t[i],e.point(a[0],a[1],a[2])},LineString:function(a,e){mr(a.coordinates,e,0)},MultiLineString:function(a,e){for(var t=a.coordinates,i=-1,r=t.length;++i<r;)mr(t[i],e,0)},Polygon:function(a,e){gn(a.coordinates,e)},MultiPolygon:function(a,e){for(var t=a.coordinates,i=-1,r=t.length;++i<r;)gn(t[i],e)},GeometryCollection:function(a,e){for(var t=a.geometries,i=-1,r=t.length;++i<r;)wi(t[i],e)}};function mr(a,e,t){var i=-1,r=a.length-t,n;for(e.lineStart();++i<r;)n=a[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function gn(a,e){var t=-1,i=a.length;for(e.polygonStart();++t<i;)mr(a[t],e,1);e.polygonEnd()}function ze(a,e){a&&fn.hasOwnProperty(a.type)?fn[a.type](a,e):wi(a,e)}var xi=new me,Pi=new me,ns,ss,_r,br,yr,Ie={point:le,lineStart:le,lineEnd:le,polygonStart:function(){xi=new me,Ie.lineStart=Fo,Ie.lineEnd=No},polygonEnd:function(){var a=+xi;Pi.add(a<0?_e+a:a),this.lineStart=this.lineEnd=this.point=le},sphere:function(){Pi.add(_e)}};function Fo(){Ie.point=zo}function No(){as(ns,ss)}function zo(a,e){Ie.point=as,ns=a,ss=e,a*=N,e*=N,_r=a,br=G(e=e/2+vi),yr=W(e)}function as(a,e){a*=N,e*=N,e=e/2+vi;var t=a-_r,i=t>=0?1:-1,r=i*t,n=G(e),s=W(e),o=yr*s,l=br*n+o*G(r),h=o*i*W(r);xi.add(et(h,l)),_r=a,br=n,yr=s}function Go(a){return Pi=new me,ze(a,Ie),Pi*2}function Di(a){return[et(a[1],a[0]),ct(a[2])]}function dt(a){var e=a[0],t=a[1],i=G(t);return[i*G(e),i*W(e),W(t)]}function ui(a,e){return a[0]*e[0]+a[1]*e[1]+a[2]*e[2]}function Pt(a,e){return[a[1]*e[2]-a[2]*e[1],a[2]*e[0]-a[0]*e[2],a[0]*e[1]-a[1]*e[0]]}function tr(a,e){a[0]+=e[0],a[1]+=e[1],a[2]+=e[2]}function hi(a,e){return[a[0]*e,a[1]*e,a[2]*e]}function Si(a){var e=tt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=e,a[1]/=e,a[2]/=e}var q,be,J,Se,nt,os,ls,yt,Ft,Ze,Ue,Ne={point:vr,lineStart:mn,lineEnd:_n,polygonStart:function(){Ne.point=hs,Ne.lineStart=Wo,Ne.lineEnd=Yo,Ft=new me,Ie.polygonStart()},polygonEnd:function(){Ie.polygonEnd(),Ne.point=vr,Ne.lineStart=mn,Ne.lineEnd=_n,xi<0?(q=-(J=180),be=-(Se=90)):Ft>X?Se=90:Ft<-X&&(be=-90),Ue[0]=q,Ue[1]=J},sphere:function(){q=-(J=180),be=-(Se=90)}};function vr(a,e){Ze.push(Ue=[q=a,J=a]),e<be&&(be=e),e>Se&&(Se=e)}function us(a,e){var t=dt([a*N,e*N]);if(yt){var i=Pt(yt,t),r=[i[1],-i[0],0],n=Pt(r,i);Si(n),n=Di(n);var s=a-nt,o=s>0?1:-1,l=n[0]*ae*o,h,u=Z(s)>180;u^(o*nt<l&&l<o*a)?(h=n[1]*ae,h>Se&&(Se=h)):(l=(l+360)%360-180,u^(o*nt<l&&l<o*a)?(h=-n[1]*ae,h<be&&(be=h)):(e<be&&(be=e),e>Se&&(Se=e))),u?a<nt?xe(q,a)>xe(q,J)&&(J=a):xe(a,J)>xe(q,J)&&(q=a):J>=q?(a<q&&(q=a),a>J&&(J=a)):a>nt?xe(q,a)>xe(q,J)&&(J=a):xe(a,J)>xe(q,J)&&(q=a)}else Ze.push(Ue=[q=a,J=a]);e<be&&(be=e),e>Se&&(Se=e),yt=t,nt=a}function mn(){Ne.point=us}function _n(){Ue[0]=q,Ue[1]=J,Ne.point=vr,yt=null}function hs(a,e){if(yt){var t=a-nt;Ft.add(Z(t)>180?t+(t>0?360:-360):t)}else os=a,ls=e;Ie.point(a,e),us(a,e)}function Wo(){Ie.lineStart()}function Yo(){hs(os,ls),Ie.lineEnd(),Z(Ft)>X&&(q=-(J=180)),Ue[0]=q,Ue[1]=J,yt=null}function xe(a,e){return(e-=a)<0?e+360:e}function Uo(a,e){return a[0]-e[0]}function bn(a,e){return a[0]<=a[1]?a[0]<=e&&e<=a[1]:e<a[0]||a[1]<e}function Vo(a){var e,t,i,r,n,s,o;if(Se=J=-(q=be=1/0),Ze=[],ze(a,Ne),t=Ze.length){for(Ze.sort(Uo),e=1,i=Ze[0],n=[i];e<t;++e)r=Ze[e],bn(i,r[0])||bn(i,r[1])?(xe(i[0],r[1])>xe(i[0],i[1])&&(i[1]=r[1]),xe(r[0],i[1])>xe(i[0],i[1])&&(i[0]=r[0])):n.push(i=r);for(s=-1/0,t=n.length-1,e=0,i=n[t];e<=t;i=r,++e)r=n[e],(o=xe(i[1],r[0]))>s&&(s=o,q=r[0],J=i[1])}return Ze=Ue=null,q===1/0||be===1/0?[[NaN,NaN],[NaN,NaN]]:[[q,be],[J,Se]]}var Et,Oi,Ai,Ti,ki,Ei,Li,Ci,wr,xr,Pr,cs,ds,de,fe,pe,Te={sphere:le,point:Yr,lineStart:yn,lineEnd:vn,polygonStart:function(){Te.lineStart=Zo,Te.lineEnd=$o},polygonEnd:function(){Te.lineStart=yn,Te.lineEnd=vn}};function Yr(a,e){a*=N,e*=N;var t=G(e);ei(t*G(a),t*W(a),W(e))}function ei(a,e,t){++Et,Ai+=(a-Ai)/Et,Ti+=(e-Ti)/Et,ki+=(t-ki)/Et}function yn(){Te.point=Xo}function Xo(a,e){a*=N,e*=N;var t=G(e);de=t*G(a),fe=t*W(a),pe=W(e),Te.point=Ko,ei(de,fe,pe)}function Ko(a,e){a*=N,e*=N;var t=G(e),i=t*G(a),r=t*W(a),n=W(e),s=et(tt((s=fe*n-pe*r)*s+(s=pe*i-de*n)*s+(s=de*r-fe*i)*s),de*i+fe*r+pe*n);Oi+=s,Ei+=s*(de+(de=i)),Li+=s*(fe+(fe=r)),Ci+=s*(pe+(pe=n)),ei(de,fe,pe)}function vn(){Te.point=Yr}function Zo(){Te.point=qo}function $o(){fs(cs,ds),Te.point=Yr}function qo(a,e){cs=a,ds=e,a*=N,e*=N,Te.point=fs;var t=G(e);de=t*G(a),fe=t*W(a),pe=W(e),ei(de,fe,pe)}function fs(a,e){a*=N,e*=N;var t=G(e),i=t*G(a),r=t*W(a),n=W(e),s=fe*n-pe*r,o=pe*i-de*n,l=de*r-fe*i,h=gr(s,o,l),u=ct(h),c=h&&-u/h;wr.add(c*s),xr.add(c*o),Pr.add(c*l),Oi+=u,Ei+=u*(de+(de=i)),Li+=u*(fe+(fe=r)),Ci+=u*(pe+(pe=n)),ei(de,fe,pe)}function Jo(a){Et=Oi=Ai=Ti=ki=Ei=Li=Ci=0,wr=new me,xr=new me,Pr=new me,ze(a,Te);var e=+wr,t=+xr,i=+Pr,r=gr(e,t,i);return r<pr&&(e=Ei,t=Li,i=Ci,Oi<X&&(e=Ai,t=Ti,i=ki),r=gr(e,t,i),r<pr)?[NaN,NaN]:[et(t,e)*ae,ct(i/r)*ae]}function Dr(a,e){function t(i,r){return i=a(i,r),e(i[0],i[1])}return a.invert&&e.invert&&(t.invert=function(i,r){return i=e.invert(i,r),i&&a.invert(i[0],i[1])}),t}function Sr(a,e){return Z(a)>z&&(a-=Math.round(a/_e)*_e),[a,e]}Sr.invert=Sr;function ps(a,e,t){return(a%=_e)?e||t?Dr(xn(a),Pn(e,t)):xn(a):e||t?Pn(e,t):Sr}function wn(a){return function(e,t){return e+=a,Z(e)>z&&(e-=Math.round(e/_e)*_e),[e,t]}}function xn(a){var e=wn(a);return e.invert=wn(-a),e}function Pn(a,e){var t=G(a),i=W(a),r=G(e),n=W(e);function s(o,l){var h=G(l),u=G(o)*h,c=W(o)*h,d=W(l),f=d*t+u*i;return[et(c*r-f*n,u*t-d*i),ct(f*r+c*n)]}return s.invert=function(o,l){var h=G(l),u=G(o)*h,c=W(o)*h,d=W(l),f=d*r-c*n;return[et(c*r+d*n,u*t+f*i),ct(f*t-u*i)]},s}function Qo(a){a=ps(a[0]*N,a[1]*N,a.length>2?a[2]*N:0);function e(t){return t=a(t[0]*N,t[1]*N),t[0]*=ae,t[1]*=ae,t}return e.invert=function(t){return t=a.invert(t[0]*N,t[1]*N),t[0]*=ae,t[1]*=ae,t},e}function el(a,e,t,i,r,n){if(t){var s=G(e),o=W(e),l=i*t;r==null?(r=e+i*_e,n=e-l/2):(r=Dn(s,r),n=Dn(s,n),(i>0?r<n:r>n)&&(r+=i*_e));for(var h,u=r;i>0?u>n:u<n;u-=l)h=Di([s,-o*G(u),-o*W(u)]),a.point(h[0],h[1])}}function Dn(a,e){e=dt(e),e[0]-=a,Si(e);var t=Io(-e[1]);return((-e[2]<0?-t:t)+_e-X)%_e}function gs(){var a=[],e;return{point:function(t,i,r){e.push([t,i,r])},lineStart:function(){a.push(e=[])},lineEnd:le,rejoin:function(){a.length>1&&a.push(a.pop().concat(a.shift()))},result:function(){var t=a;return a=[],e=null,t}}}function pi(a,e){return Z(a[0]-e[0])<X&&Z(a[1]-e[1])<X}function ci(a,e,t,i){this.x=a,this.z=e,this.o=t,this.e=i,this.v=!1,this.n=this.p=null}function ms(a,e,t,i,r){var n=[],s=[],o,l;if(a.forEach(function(p){if(!((b=p.length-1)<=0)){var b,g=p[0],m=p[b],_;if(pi(g,m)){if(!g[2]&&!m[2]){for(r.lineStart(),o=0;o<b;++o)r.point((g=p[o])[0],g[1]);r.lineEnd();return}m[0]+=2*X}n.push(_=new ci(g,p,null,!0)),s.push(_.o=new ci(g,null,_,!1)),n.push(_=new ci(m,p,null,!1)),s.push(_.o=new ci(m,null,_,!0))}}),!!n.length){for(s.sort(e),Sn(n),Sn(s),o=0,l=s.length;o<l;++o)s[o].e=t=!t;for(var h=n[0],u,c;;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;u=d.z,r.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(o=0,l=u.length;o<l;++o)r.point((c=u[o])[0],c[1]);else i(d.x,d.n.x,1,r);d=d.n}else{if(f)for(u=d.p.z,o=u.length-1;o>=0;--o)r.point((c=u[o])[0],c[1]);else i(d.x,d.p.x,-1,r);d=d.p}d=d.o,u=d.z,f=!f}while(!d.v);r.lineEnd()}}}function Sn(a){if(e=a.length){for(var e,t=0,i=a[0],r;++t<e;)i.n=r=a[t],r.p=i,i=r;i.n=r=a[0],r.p=i}}function ir(a){return Z(a[0])<=z?a[0]:Ho(a[0])*((Z(a[0])+z)%_e-z)}function tl(a,e){var t=ir(e),i=e[1],r=W(i),n=[W(t),-G(t),0],s=0,o=0,l=new me;r===1?i=ye+X:r===-1&&(i=-ye-X);for(var h=0,u=a.length;h<u;++h)if(d=(c=a[h]).length)for(var c,d,f=c[d-1],p=ir(f),b=f[1]/2+vi,g=W(b),m=G(b),_=0;_<d;++_,p=y,g=D,m=O,f=v){var v=c[_],y=ir(v),P=v[1]/2+vi,D=W(P),O=G(P),A=y-p,E=A>=0?1:-1,T=E*A,S=T>z,R=g*D;if(l.add(et(R*E*W(T),m*O+R*G(T))),s+=S?A+E*_e:A,S^p>=t^y>=t){var k=Pt(dt(f),dt(v));Si(k);var B=Pt(n,k);Si(B);var w=(S^A>=0?-1:1)*ct(B[2]);(i>w||i===w&&(k[0]||k[1]))&&(o+=S^A>=0?1:-1)}}return(s<-X||s<X&&l<-pr)^o&1}function _s(a,e,t,i){return function(r){var n=e(r),s=gs(),o=e(s),l=!1,h,u,c,d={point:f,lineStart:b,lineEnd:g,polygonStart:function(){d.point=m,d.lineStart=_,d.lineEnd=v,u=[],h=[]},polygonEnd:function(){d.point=f,d.lineStart=b,d.lineEnd=g,u=is(u);var y=tl(h,i);u.length?(l||(r.polygonStart(),l=!0),ms(u,rl,y,t,r)):y&&(l||(r.polygonStart(),l=!0),r.lineStart(),t(null,null,1,r),r.lineEnd()),l&&(r.polygonEnd(),l=!1),u=h=null},sphere:function(){r.polygonStart(),r.lineStart(),t(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(y,P){a(y,P)&&r.point(y,P)}function p(y,P){n.point(y,P)}function b(){d.point=p,n.lineStart()}function g(){d.point=f,n.lineEnd()}function m(y,P){c.push([y,P]),o.point(y,P)}function _(){o.lineStart(),c=[]}function v(){m(c[0][0],c[0][1]),o.lineEnd();var y=o.clean(),P=s.result(),D,O=P.length,A,E,T;if(c.pop(),h.push(c),c=null,!!O){if(y&1){if(E=P[0],(A=E.length-1)>0){for(l||(r.polygonStart(),l=!0),r.lineStart(),D=0;D<A;++D)r.point((T=E[D])[0],T[1]);r.lineEnd()}return}O>1&&y&2&&P.push(P.pop().concat(P.shift())),u.push(P.filter(il))}}return d}}function il(a){return a.length>1}function rl(a,e){return((a=a.x)[0]<0?a[1]-ye-X:ye-a[1])-((e=e.x)[0]<0?e[1]-ye-X:ye-e[1])}
vendor: 2,713 bytes, line 3
3const On=_s(function(){return!0},nl,al,[-z,-ye]);function nl(a){var e=NaN,t=NaN,i=NaN,r;return{lineStart:function(){a.lineStart(),r=1},point:function(n,s){var o=n>0?z:-z,l=Z(n-e);Z(l-z)<X?(a.point(e,t=(t+s)/2>0?ye:-ye),a.point(i,t),a.lineEnd(),a.lineStart(),a.point(o,t),a.point(n,t),r=0):i!==o&&l>=z&&(Z(e-i)<X&&(e-=i*X),Z(n-o)<X&&(n-=o*X),t=sl(e,t,n,s),a.point(i,t),a.lineEnd(),a.lineStart(),a.point(o,t),r=0),a.point(e=n,t=s),i=o},lineEnd:function(){a.lineEnd(),e=t=NaN},clean:function(){return 2-r}}}function sl(a,e,t,i){var r,n,s=W(a-t);return Z(s)>X?rs((W(e)*(n=G(i))*W(t)-W(i)*(r=G(e))*W(a))/(r*n*s)):(e+i)/2}function al(a,e,t,i){var r;if(a==null)r=t*ye,i.point(-z,r),i.point(0,r),i.point(z,r),i.point(z,0),i.point(z,-r),i.point(0,-r),i.point(-z,-r),i.point(-z,0),i.point(-z,r);else if(Z(a[0]-e[0])>X){var n=a[0]<e[0]?z:-z;r=t*n/2,i.point(-n,r),i.point(0,r),i.point(n,r)}else i.point(e[0],e[1])}function ol(a){var e=G(a),t=2*N,i=e>0,r=Z(e)>X;function n(u,c,d,f){el(f,a,t,d,u,c)}function s(u,c){return G(u)*G(c)>e}function o(u){var c,d,f,p,b;return{lineStart:function(){p=f=!1,b=1},point:function(g,m){var _=[g,m],v,y=s(g,m),P=i?y?0:h(g,m):y?h(g+(g<0?z:-z),m):0;if(!c&&(p=f=y)&&u.lineStart(),y!==f&&(v=l(c,_),(!v||pi(c,v)||pi(_,v))&&(_[2]=1)),y!==f)b=0,y?(u.lineStart(),v=l(_,c),u.point(v[0],v[1])):(v=l(c,_),u.point(v[0],v[1],2),u.lineEnd()),c=v;else if(r&&c&&i^y){var D;!(P&d)&&(D=l(_,c,!0))&&(b=0,i?(u.lineStart(),u.point(D[0][0],D[0][1]),u.point(D[1][0],D[1][1]),u.lineEnd()):(u.point(D[1][0],D[1][1]),u.lineEnd(),u.lineStart(),u.point(D[0][0],D[0][1],3)))}y&&(!c||!pi(c,_))&&u.point(_[0],_[1]),c=_,f=y,d=P},lineEnd:function(){f&&u.lineEnd(),c=null},clean:function(){return b|(p&&f)<<1}}}function l(u,c,d){var f=dt(u),p=dt(c),b=[1,0,0],g=Pt(f,p),m=ui(g,g),_=g[0],v=m-_*_;if(!v)return!d&&u;var y=e*m/v,P=-e*_/v,D=Pt(b,g),O=hi(b,y),A=hi(g,P);tr(O,A);var E=D,T=ui(O,E),S=ui(E,E),R=T*T-S*(ui(O,O)-1);if(!(R<0)){var k=tt(R),B=hi(E,(-T-k)/S);if(tr(B,O),B=Di(B),!d)return B;var w=u[0],H=c[0],j=u[1],U=c[1],K;H<w&&(K=w,w=H,H=K);var ue=H-w,he=Z(ue-z)<X,se=he||ue<X;if(!he&&U<j&&(K=j,j=U,U=K),se?he?j+U>0^B[1]<(Z(B[0]-w)<X?j:U):j<=B[1]&&B[1]<=U:ue>z^(w<=B[0]&&B[0]<=H)){var oe=hi(E,(-T+k)/S);return tr(oe,O),[B,Di(oe)]}}}function h(u,c){var d=i?a:z-a,f=0;return u<-d?f|=1:u>d&&(f|=2),c<-d?f|=4:c>d&&(f|=8),f}return _s(s,o,n,i?[0,-a]:[-z,a-z])}function ll(a,e,t,i,r,n){var s=a[0],o=a[1],l=e[0],h=e[1],u=0,c=1,d=l-s,f=h-o,p;if(p=t-s,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<c&&(c=p)}else if(d>0){if(p>c)return;p>u&&(u=p)}if(p=r-s,!(!d&&p<0)){if(p/=d,d<0){if(p>c)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<c&&(c=p)}if(p=i-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<c&&(c=p)}else if(f>0){if(p>c)return;p>u&&(u=p)}
vendor: 12,366 bytes, line 3
3if(p=n-o,!(!f&&p<0)){if(p/=f,f<0){if(p>c)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<c&&(c=p)}return u>0&&(a[0]=s+u*d,a[1]=o+u*f),c<1&&(e[0]=s+c*d,e[1]=o+c*f),!0}}}}}var Lt=1e9,di=-Lt;function ul(a,e,t,i){function r(h,u){return a<=h&&h<=t&&e<=u&&u<=i}function n(h,u,c,d){var f=0,p=0;if(h==null||(f=s(h,c))!==(p=s(u,c))||l(h,u)<0^c>0)do d.point(f===0||f===3?a:t,f>1?i:e);while((f=(f+c+4)%4)!==p);else d.point(u[0],u[1])}function s(h,u){return Z(h[0]-a)<X?u>0?0:3:Z(h[0]-t)<X?u>0?2:1:Z(h[1]-e)<X?u>0?1:0:u>0?3:2}function o(h,u){return l(h.x,u.x)}function l(h,u){var c=s(h,1),d=s(u,1);return c!==d?c-d:c===0?u[1]-h[1]:c===1?h[0]-u[0]:c===2?h[1]-u[1]:u[0]-h[0]}return function(h){var u=h,c=gs(),d,f,p,b,g,m,_,v,y,P,D,O={point:A,lineStart:R,lineEnd:k,polygonStart:T,polygonEnd:S};function A(w,H){r(w,H)&&u.point(w,H)}function E(){for(var w=0,H=0,j=f.length;H<j;++H)for(var U=f[H],K=1,ue=U.length,he=U[0],se,oe,it=he[0],Ve=he[1];K<ue;++K)se=it,oe=Ve,he=U[K],it=he[0],Ve=he[1],oe<=i?Ve>i&&(it-se)*(i-oe)>(Ve-oe)*(a-se)&&++w:Ve<=i&&(it-se)*(i-oe)<(Ve-oe)*(a-se)&&--w;return w}function T(){u=c,d=[],f=[],D=!0}function S(){var w=E(),H=D&&w,j=(d=is(d)).length;(H||j)&&(h.polygonStart(),H&&(h.lineStart(),n(null,null,1,h),h.lineEnd()),j&&ms(d,o,w,n,h),h.polygonEnd()),u=h,d=f=p=null}function R(){O.point=B,f&&f.push(p=[]),P=!0,y=!1,_=v=NaN}function k(){d&&(B(b,g),m&&y&&c.rejoin(),d.push(c.result())),O.point=A,y&&u.lineEnd()}function B(w,H){var j=r(w,H);if(f&&p.push([w,H]),P)b=w,g=H,m=j,P=!1,j&&(u.lineStart(),u.point(w,H));else if(j&&y)u.point(w,H);else{var U=[_=Math.max(di,Math.min(Lt,_)),v=Math.max(di,Math.min(Lt,v))],K=[w=Math.max(di,Math.min(Lt,w)),H=Math.max(di,Math.min(Lt,H))];ll(U,K,a,e,t,i)?(y||(u.lineStart(),u.point(U[0],U[1])),u.point(K[0],K[1]),j||u.lineEnd(),D=!1):j&&(u.lineStart(),u.point(w,H),D=!1)}_=w,v=H,y=j}return O}}const Or=a=>a;var rr=new me,Ar=new me,bs,ys,Tr,kr,Ge={point:le,lineStart:le,lineEnd:le,polygonStart:function(){Ge.lineStart=hl,Ge.lineEnd=dl},polygonEnd:function(){Ge.lineStart=Ge.lineEnd=Ge.point=le,rr.add(Z(Ar)),Ar=new me},result:function(){var a=rr/2;return rr=new me,a}};function hl(){Ge.point=cl}function cl(a,e){Ge.point=vs,bs=Tr=a,ys=kr=e}function vs(a,e){Ar.add(kr*a-Tr*e),Tr=a,kr=e}function dl(){vs(bs,ys)}var Dt=1/0,Mi=Dt,Jt=-Dt,Bi=Jt,ji={point:fl,lineStart:le,lineEnd:le,polygonStart:le,polygonEnd:le,result:function(){var a=[[Dt,Mi],[Jt,Bi]];return Jt=Bi=-(Mi=Dt=1/0),a}};function fl(a,e){a<Dt&&(Dt=a),a>Jt&&(Jt=a),e<Mi&&(Mi=e),e>Bi&&(Bi=e)}var Er=0,Lr=0,Ct=0,Hi=0,Ri=0,mt=0,Cr=0,Mr=0,Mt=0,ws,xs,je,He,Oe={point:ft,lineStart:An,lineEnd:Tn,polygonStart:function(){Oe.lineStart=ml,Oe.lineEnd=_l},polygonEnd:function(){Oe.point=ft,Oe.lineStart=An,Oe.lineEnd=Tn},result:function(){var a=Mt?[Cr/Mt,Mr/Mt]:mt?[Hi/mt,Ri/mt]:Ct?[Er/Ct,Lr/Ct]:[NaN,NaN];return Er=Lr=Ct=Hi=Ri=mt=Cr=Mr=Mt=0,a}};function ft(a,e){Er+=a,Lr+=e,++Ct}function An(){Oe.point=pl}function pl(a,e){Oe.point=gl,ft(je=a,He=e)}function gl(a,e){var t=a-je,i=e-He,r=tt(t*t+i*i);Hi+=r*(je+a)/2,Ri+=r*(He+e)/2,mt+=r,ft(je=a,He=e)}function Tn(){Oe.point=ft}function ml(){Oe.point=bl}function _l(){Ps(ws,xs)}function bl(a,e){Oe.point=Ps,ft(ws=je=a,xs=He=e)}function Ps(a,e){var t=a-je,i=e-He,r=tt(t*t+i*i);Hi+=r*(je+a)/2,Ri+=r*(He+e)/2,mt+=r,r=He*a-je*e,Cr+=r*(je+a),Mr+=r*(He+e),Mt+=r*3,ft(je=a,He=e)}function Ds(a){this._context=a}Ds.prototype={_radius:4.5,pointRadius:function(a){return this._radius=a,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(a,e){switch(this._point){case 0:{this._context.moveTo(a,e),this._point=1;break}case 1:{this._context.lineTo(a,e);break}default:{this._context.moveTo(a+this._radius,e),this._context.arc(a,e,this._radius,0,_e);break}}},result:le};var Br=new me,nr,Ss,Os,Bt,jt,Qt={point:le,lineStart:function(){Qt.point=yl},lineEnd:function(){nr&&As(Ss,Os),Qt.point=le},polygonStart:function(){nr=!0},polygonEnd:function(){nr=null},result:function(){var a=+Br;return Br=new me,a}};function yl(a,e){Qt.point=As,Ss=Bt=a,Os=jt=e}function As(a,e){Bt-=a,jt-=e,Br.add(tt(Bt*Bt+jt*jt)),Bt=a,jt=e}let kn,Ii,En,Ln;class Cn{constructor(e){this._append=e==null?Ts:vl(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,t){switch(this._point){case 0:{this._append`M${e},${t}`,this._point=1;break}case 1:{this._append`L${e},${t}`;break}default:{if(this._append`M${e},${t}`,this._radius!==En||this._append!==Ii){const i=this._radius,r=this._;this._="",this._append`m0,${i}a${i},${i} 0 1,1 0,${-2*i}a${i},${i} 0 1,1 0,${2*i}z`,En=i,Ii=this._append,Ln=this._,this._=r}this._+=Ln;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Ts(a){let e=1;this._+=a[0];for(const t=a.length;e<t;++e)this._+=arguments[e]+a[e]}function vl(a){const e=Math.floor(a);if(!(e>=0))throw new RangeError(`invalid digits: ${a}`);if(e>15)return Ts;if(e!==kn){const t=10**e;kn=e,Ii=function(r){let n=1;this._+=r[0];for(const s=r.length;n<s;++n)this._+=Math.round(arguments[n]*t)/t+r[n]}}return Ii}function wl(a,e){let t=3,i=4.5,r,n;function s(o){return o&&(typeof i=="function"&&n.pointRadius(+i.apply(this,arguments)),ze(o,r(n))),n.result()}return s.area=function(o){return ze(o,r(Ge)),Ge.result()},s.measure=function(o){return ze(o,r(Qt)),Qt.result()},s.bounds=function(o){return ze(o,r(ji)),ji.result()},s.centroid=function(o){return ze(o,r(Oe)),Oe.result()},s.projection=function(o){return arguments.length?(r=o==null?(a=null,Or):(a=o).stream,s):a},s.context=function(o){return arguments.length?(n=o==null?(e=null,new Cn(t)):new Ds(e=o),typeof i!="function"&&n.pointRadius(i),s):e},s.pointRadius=function(o){return arguments.length?(i=typeof o=="function"?o:(n.pointRadius(+o),+o),s):i},s.digits=function(o){if(!arguments.length)return t;if(o==null)t=null;else{const l=Math.floor(o);if(!(l>=0))throw new RangeError(`invalid digits: ${o}`);t=l}return e===null&&(n=new Cn(t)),s},s.projection(a).digits(t).context(e)}function Ur(a){return function(e){var t=new jr;for(var i in a)t[i]=a[i];return t.stream=e,t}}function jr(){}jr.prototype={constructor:jr,point:function(a,e){this.stream.point(a,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Vr(a,e,t){var i=a.clipExtent&&a.clipExtent();return a.scale(150).translate([0,0]),i!=null&&a.clipExtent(null),ze(t,a.stream(ji)),e(ji.result()),i!=null&&a.clipExtent(i),a}function ks(a,e,t){return Vr(a,function(i){var r=e[1][0]-e[0][0],n=e[1][1]-e[0][1],s=Math.min(r/(i[1][0]-i[0][0]),n/(i[1][1]-i[0][1])),o=+e[0][0]+(r-s*(i[1][0]+i[0][0]))/2,l=+e[0][1]+(n-s*(i[1][1]+i[0][1]))/2;a.scale(150*s).translate([o,l])},t)}function xl(a,e,t){return ks(a,[[0,0],e],t)}function Pl(a,e,t){return Vr(a,function(i){var r=+e,n=r/(i[1][0]-i[0][0]),s=(r-n*(i[1][0]+i[0][0]))/2,o=-n*i[0][1];a.scale(150*n).translate([s,o])},t)}function Dl(a,e,t){return Vr(a,function(i){var r=+e,n=r/(i[1][1]-i[0][1]),s=-n*i[0][0],o=(r-n*(i[1][1]+i[0][1]))/2;a.scale(150*n).translate([s,o])},t)}var Mn=16,Sl=G(30*N);function Bn(a,e){return+e?Al(a,e):Ol(a)}function Ol(a){return Ur({point:function(e,t){e=a(e,t),this.stream.point(e[0],e[1])}})}function Al(a,e){function t(i,r,n,s,o,l,h,u,c,d,f,p,b,g){var m=h-i,_=u-r,v=m*m+_*_;if(v>4*e&&b--){var y=s+d,P=o+f,D=l+p,O=tt(y*y+P*P+D*D),A=ct(D/=O),E=Z(Z(D)-1)<X||Z(n-c)<X?(n+c)/2:et(P,y),T=a(E,A),S=T[0],R=T[1],k=S-i,B=R-r,w=_*k-m*B;(w*w/v>e||Z((m*k+_*B)/v-.5)>.3||s*d+o*f+l*p<Sl)&&(t(i,r,n,s,o,l,S,R,E,y/=O,P/=O,D,b,g),g.point(S,R),t(S,R,E,y,P,D,h,u,c,d,f,p,b,g))}}return function(i){var r,n,s,o,l,h,u,c,d,f,p,b,g={point:m,lineStart:_,lineEnd:y,polygonStart:function(){i.polygonStart(),g.lineStart=P},polygonEnd:function(){i.polygonEnd(),g.lineStart=_}};function m(A,E){A=a(A,E),i.point(A[0],A[1])}function _(){c=NaN,g.point=v,i.lineStart()}function v(A,E){var T=dt([A,E]),S=a(A,E);t(c,d,u,f,p,b,c=S[0],d=S[1],u=A,f=T[0],p=T[1],b=T[2],Mn,i),i.point(c,d)}function y(){g.point=m,i.lineEnd()}function P(){_(),g.point=D,g.lineEnd=O}function D(A,E){v(r=A,E),n=c,s=d,o=f,l=p,h=b,g.point=v}function O(){t(c,d,u,f,p,b,n,s,r,o,l,h,Mn,i),g.lineEnd=y,y()}return g}}var Tl=Ur({point:function(a,e){this.stream.point(a*N,e*N)}});function kl(a){return Ur({point:function(e,t){var i=a(e,t);return this.stream.point(i[0],i[1])}})}function El(a,e,t,i,r){function n(s,o){return s*=i,o*=r,[e+a*s,t-a*o]}return n.invert=function(s,o){return[(s-e)/a*i,(t-o)/a*r]},n}function jn(a,e,t,i,r,n){if(!n)return El(a,e,t,i,r);var s=G(n),o=W(n),l=s*a,h=o*a,u=s/a,c=o/a,d=(o*t-s*e)/a,f=(o*e+s*t)/a;function p(b,g){return b*=i,g*=r,[l*b-h*g+e,t-h*b-l*g]}return p.invert=function(b,g){return[i*(u*b-c*g+d),r*(f-c*b-u*g)]},p}function Ll(a){return Cl(function(){return a})()}function Cl(a){var e,t=150,i=480,r=250,n=0,s=0,o=0,l=0,h=0,u,c=0,d=1,f=1,p=null,b=On,g=null,m,_,v,y=Or,P=.5,D,O,A,E,T;function S(w){return A(w[0]*N,w[1]*N)}function R(w){return w=A.invert(w[0],w[1]),w&&[w[0]*ae,w[1]*ae]}S.stream=function(w){return E&&T===w?E:E=Tl(kl(u)(b(D(y(T=w)))))},S.preclip=function(w){return arguments.length?(b=w,p=void 0,B()):b},S.postclip=function(w){return arguments.length?(y=w,g=m=_=v=null,B()):y},S.clipAngle=function(w){return arguments.length?(b=+w?ol(p=w*N):(p=null,On),B()):p*ae},S.clipExtent=function(w){return arguments.length?(y=w==null?(g=m=_=v=null,Or):ul(g=+w[0][0],m=+w[0][1],_=+w[1][0],v=+w[1][1]),B()):g==null?null:[[g,m],[_,v]]},S.scale=function(w){return arguments.length?(t=+w,k()):t},S.translate=function(w){return arguments.length?(i=+w[0],r=+w[1],k()):[i,r]},S.center=function(w){return arguments.length?(n=w[0]%360*N,s=w[1]%360*N,k()):[n*ae,s*ae]},S.rotate=function(w){return arguments.length?(o=w[0]%360*N,l=w[1]%360*N,h=w.length>2?w[2]%360*N:0,k()):[o*ae,l*ae,h*ae]},S.angle=function(w){return arguments.length?(c=w%360*N,k()):c*ae},S.reflectX=function(w){return arguments.length?(d=w?-1:1,k()):d<0},S.reflectY=function(w){return arguments.length?(f=w?-1:1,k()):f<0},S.precision=function(w){return arguments.length?(D=Bn(O,P=w*w),B()):tt(P)},S.fitExtent=function(w,H){return ks(S,w,H)},S.fitSize=function(w,H){return xl(S,w,H)},S.fitWidth=function(w,H){return Pl(S,w,H)},S.fitHeight=function(w,H){return Dl(S,w,H)};function k(){var w=jn(t,0,0,d,f,c).apply(null,e(n,s)),H=jn(t,i-w[0],r-w[1],d,f,c);return u=ps(o,l,h),O=Dr(e,H),A=Dr(u,O),D=Bn(O,P),B()}function B(){return E=T=null,S}return function(){return e=a.apply(this,arguments),S.invert=e.invert&&R,k()}}function Xr(a,e){return[a,jo(Ro((ye+e)/2))]}Xr.invert=function(a,e){return[a,2*rs(Bo(e))-ye]};function Hr(){return Ml(Xr).scale(961/_e)}function Ml(a){var e=Ll(a),t=e.center,i=e.scale,r=e.translate,n=e.clipExtent,s=null,o,l,h;e.scale=function(c){return arguments.length?(i(c),u()):i()},e.translate=function(c){return arguments.length?(r(c),u()):r()},e.center=function(c){return arguments.length?(t(c),u()):t()},e.clipExtent=function(c){return arguments.length?(c==null?s=o=l=h=null:(s=+c[0][0],o=+c[0][1],l=+c[1][0],h=+c[1][1]),u()):s==null?null:[[s,o],[l,h]]};function u(){var c=z*i(),d=e(Qo(e.rotate()).invert([0,0]));return n(s==null?[[d[0]-c,d[1]-c],[d[0]+c,d[1]+c]]:a===Xr?[[Math.max(d[0]-c,s),o],[Math.min(d[0]+c,l),h]]:[[s,Math.max(d[1]-c,o)],[l,Math.min(d[1]+c,h)]])}return u()}class Bl extends Gr{setupDefaultRules(){super.setupDefaultRules();const e=this._root.interfaceColors,t=this.rule.bind(this);t("MapChart").setAll({projection:Hr(),panX:"translateX",panY:"translateY",pinchZoom:!0,zoomStep:2,zoomLevel:1,rotationX:0,rotationY:0,rotationZ:0,maxZoomLevel:32,minZoomLevel:1,wheelY:"zoom",wheelX:"none",animationEasing:Fe(Ce),wheelEasing:Fe(Ce),wheelDuration:0,wheelSensitivity:1,maxPanOut:.4,centerMapOnZoomOut:!0});{const i=t("MapLine");i.setAll({precision:.5,role:"figure"}),L(i,"stroke",e,"grid")}t("MapPolygonSeries").setAll({affectsBounds:!0}),t("MapPointSeries").setAll({affectsBounds:!1,clipFront:!1,clipBack:!0,autoScale:!1}),t("ClusteredPointSeries").setAll({minDistance:20,scatterDistance:3,scatterRadius:8,stopClusterZoom:.95}),t("MapLineSeries").setAll({affectsBounds:!1});{const i=t("MapPolygon");
3i.setAll({precision:.5,isMeasured:!1,role:"figure",fillOpacity:1,position:"absolute",strokeWidth:.2,strokeOpacity:1}),L(i,"fill",e,"primaryButton"),L(i,"stroke",e,"background")}t("Button",["zoomtools","home"]).setAll({visible:!1}),t("GraticuleSeries").setAll({step:10})}}function Kr(a){const e=Jo(a);return{longitude:e[0],latitude:e[1]}}function gi(a){const e=Vo(a);if(e){const t={left:e[0][0],right:e[1][0],top:e[1][1],bottom:e[0][1]};return t.right<t.left&&(t.right=180,t.left=-180),t}return{left:0,right:0,top:0,bottom:0}}class Fi extends $t{constructor(){super(...arguments),Object.defineProperty(this,"_downTranslateX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downTranslateY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downRotationX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downRotationY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downRotationZ",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pLat",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_pLon",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_movePoints",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_downZoomLevel",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_doubleDownDistance",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_dirtyGeometries",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_geometryColection",{enumerable:!0,configurable:!0,writable:!0,value:{type:"GeometryCollection",geometries:[]}}),Object.defineProperty(this,"_centerLocation",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_za",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rxa",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rya",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_txa",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tya",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_mapBounds",{enumerable:!0,configurable:!0,writable:!0,value:[[0,0],[0,0]]}),Object.defineProperty(this,"_geoCentroid",{enumerable:!0,configurable:!0,writable:!0,value:{longitude:0,latitude:0}}),Object.defineProperty(this,"_geoBounds",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_prevGeoBounds",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_dispatchBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_wheelDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_ph",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_mapFitted",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_centerX",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_centerY",{enumerable:!0,configurable:!0,writable:!0,value:0})}_makeGeoPath(){const e=this.get("projection"),t=wl();t.projection(e),this.setPrivateRaw("geoPath",t)}geoPoint(){return this.invert(this.seriesContainer.toGlobal({x:this.width()/2,y:this.height()/2}))}geoCentroid(){return this._geoCentroid}geoBounds(){return this._geoBounds}_handleSetWheel(){const e=this.get("wheelX"),t=this.get("wheelY"),i=this.chartContainer;e!="none"||t!="none"?(this._wheelDp&&this._wheelDp.dispose(),this._wheelDp=i.events.on("wheel",r=>{const n=this.get("wheelEasing"),s=this.get("wheelSensitivity",1),o=this.get("wheelDuration",0),l=r.originalEvent;let h=!1;if(Gn(l,this))h=!0;else return;const u=i._display.toLocal(r.point);if(t=="zoom"){if(this.get("zoomLevel")==this.get("minZoomLevel",1)&&l.deltaY>0)return;this._handleWheelZoom(l.deltaY,u)}else t=="rotateY"?this._handleWheelRotateY(l.deltaY/5*s,o,n):t=="rotateX"&&this._handleWheelRotateX(l.deltaY/5*s,o,n);e=="zoom"?this._handleWheelZoom(l.deltaX,u):e=="rotateY"?this._handleWheelRotateY(l.deltaX/5*s,o,n):e=="rotateX"&&this._handleWheelRotateX(l.deltaX/5*s,o,n),h&&l.preventDefault()}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_prepareChildren(){super._prepareChildren();const e=this.get("projection"),t=this.innerWidth(),i=this.innerHeight(),r=this._geometryColection.geometries;if(this.isDirty("projection")){this._makeGeoPath(),this.markDirtyProjection(),this._fitMap(),e.scale(this.getPrivate("mapScale")*this.get("zoomLevel",1)),e.rotate&&e.rotate([this.get("rotationX",0),this.get("rotationY",0),this.get("rotationZ",0)]);let n=this._prevSettings.projection;if(n&&n!=e){let s=t/2,o=i/2;if(n.invert){let l=n.invert([s,o]);if(l){let h=e(l);if(h){let u=e.translate(),c=s-(h[0]-u[0]),d=o-(h[1]-u[1]);e.translate([c,d]),this.setRaw("translateX",c),this.setRaw("translateY",d)}}}}}if((this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this._dirtyGeometries&&(this._geometryColection.geometries=[],this.series.each(n=>{zs(this._geometryColection.geometries,n._geometries)}),this._fitMap()),r.length!=0&&(t!=this._pw||i!=this._ph||this._dirtyGeometries)&&t>0&&i>0){let n=t/2,s=i/2;e.fitSize([t,i],this._geometryColection);const o=e.scale();if(this.setPrivateRaw("mapScale",o),e.scale(o*this.get("zoomLevel",1)),this._centerLocation){let h=e(this._centerLocation);if(h){let u=e.translate(),c=n-(h[0]-u[0]),d=s-(h[1]-u[1]);e.translate([c,d]),this.setRaw("translateX",c),this.setRaw("translateY",d),this._centerX=u[0],this._centerY=u[1]}}this.markDirtyProjection();const l=this.getPrivate("geoPath");this._mapBounds=l.bounds(this._geometryColection)}if(this._pw=t,this._ph=i,this.isDirty("zoomControl")){const n=this._prevSettings.zoomControl,s=this.get("zoomControl");s!==n&&(this._disposeProperty("zoomControl"),n&&n.dispose(),s&&(s.setPrivate("chart",this),this.children.push(s)),this.setRaw("zoomControl",s))}
3if(this.isDirty("zoomLevel")){e.scale(this.getPrivate("mapScale")*this.get("zoomLevel",1)),this.markDirtyProjection(),this.series.each(s=>{s.isType("MapPointSeries")&&s.get("autoScale")&&x(s.dataItems,o=>{const l=o.bullets;l&&x(l,h=>{const u=h.get("sprite");u&&u.set("scale",this.get("zoomLevel"))})})});const n=this.get("zoomControl");if(n){const s=this.get("zoomLevel",1);s==this.get("minZoomLevel",1)?n.minusButton.set("disabled",!0):n.minusButton.set("disabled",!1),s==this.get("maxZoomLevel",32)?n.plusButton.set("disabled",!0):n.plusButton.set("disabled",!1)}}(this.isDirty("translateX")||this.isDirty("translateY"))&&(e.translate([this.get("translateX",this.width()/2),this.get("translateY",this.height()/2)]),this.markDirtyProjection()),e.rotate&&(this.isDirty("rotationX")||this.isDirty("rotationY")||this.isDirty("rotationZ"))&&(e.rotate([this.get("rotationX",0),this.get("rotationY",0),this.get("rotationZ",0)]),this.markDirtyProjection()),(this.isDirty("pinchZoom")||this.get("panX")||this.get("panY"))&&this._setUpTouch()}_fitMap(){const e=this.get("projection");let t=this.innerWidth(),i=this.innerHeight();if(t>0&&i>0){e.fitSize([t,i],this._geometryColection),this.setPrivateRaw("mapScale",e.scale());const r=e.translate();this.setRaw("translateX",r[0]),this.setRaw("translateY",r[1]),this._centerX=r[0],this._centerY=r[1];const n=this.getPrivate("geoPath");this._mapBounds=n.bounds(this._geometryColection),this._geoCentroid=Kr(this._geometryColection);const s=gi(this._geometryColection);if(this._geoBounds=s,this._geometryColection.geometries.length>0){s.left=si(this._geoBounds.left,3),s.right=si(this._geoBounds.right,3),s.top=si(this._geoBounds.top,3),s.bottom=si(this._geoBounds.bottom,3);const o=this._prevGeoBounds;o&&!ya(s,o)&&(this._dispatchBounds=!0,this._prevGeoBounds=s)}this._mapFitted=!0}}homeGeoPoint(){let e=this.get("homeGeoPoint");if(!e){const i=this.getPrivate("geoPath").bounds(this._geometryColection),r=i[0][0],n=i[0][1],s=i[1][0],o=i[1][1];e=this.invert({x:r+(s-r)/2,y:n+(o-n)/2})}return e}goHome(e){this.zoomToGeoPoint(this.homeGeoPoint(),this.get("homeZoomLevel",1),!0,e,this.get("homeRotationX"),this.get("homeRotationY"))}_updateChildren(){const e=this.get("projection");if(e.invert){let t=this.innerWidth(),i=this.innerHeight();t>0&&i>0&&(this._centerLocation=e.invert([this.innerWidth()/2,this.innerHeight()/2]))}super._updateChildren()}_afterChanged(){if(super._afterChanged(),this._dispatchBounds){this._dispatchBounds=!1;const e="geoboundschanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}}_setUpTouch(){this.chartContainer._display.cancelTouch||(this.chartContainer._display.cancelTouch=!!(this.get("pinchZoom")||this.get("panX")||this.get("panY")))}markDirtyGeometries(){this._dirtyGeometries=!0,this.markDirty()}markDirtyProjection(){this.series.each(e=>{e.markDirtyProjection()})}_afterNew(){this._defaultThemes.push(Bl.new(this._root)),this._settings.themeTags=Un(this._settings.themeTags,["map"]),this.children.push(this.bulletsContainer),super._afterNew(),this._makeGeoPath(),this.chartContainer.children.push(this.seriesContainer),this.get("translateX")==null&&this.set("translateX",this.width()/2),this.get("translateY")==null&&this.set("translateY",this.height()/2),this.chartContainer.set("interactive",!0),this.chartContainer.set("interactiveChildren",!1),this.chartContainer.set("background",lt.new(this._root,{themeTags:["map","background"],fill:C.fromHex(0),fillOpacity:0})),this._disposers.push(this.chartContainer.events.on("pointerdown",t=>{this._handleChartDown(t)})),this._disposers.push(this.chartContainer.events.on("globalpointerup",t=>{this._handleChartUp(t)})),this._disposers.push(this.chartContainer.events.on("globalpointermove",t=>{this._handleChartMove(t)}));let e=!1;for(let t=0;t<Ae.licenses.length;t++)Ae.licenses[t].match(/^AM5M.{5,}/i)&&(e=!0);e?this._root._licenseApplied():this._root._showBranding(),this._setUpTouch()}_handleChartDown(e){this._downZoomLevel=this.get("zoomLevel",1);const t=this.chartContainer._downPoints;let i=te(t).length;if(i==1){let r=t[1];r||(r=t[0]),r&&r.x==e.point.x&&r.y==e.point.y&&(i=0)}if(i>0){this._downTranslateX=this.get("translateX"),this._downTranslateY=this.get("translateY"),this._downRotationX=this.get("rotationX"),this._downRotationY=this.get("rotationY"),this._downRotationZ=this.get("rotationZ");const r=this.chartContainer._getDownPointId();if(r){let n=this._movePoints[r];n&&(this.chartContainer._downPoints[r]=n)}}else if(i==0){let r=this.chartContainer.get("background");if(r&&r.events.enableType("click"),this.get("panX")||this.get("panY")){this._za&&this._za.stop(),this._txa&&this._txa.stop(),this._tya&&this._tya.stop(),this._rxa&&this._rxa.stop(),this._rya&&this._rya.stop();const n=this.chartContainer._display.toLocal(e.point);this._downTranslateX=this.get("translateX"),this._downTranslateY=this.get("translateY"),this._downRotationX=this.get("rotationX"),this._downRotationY=this.get("rotationY"),this._downRotationZ=this.get("rotationZ");let s=this.get("projection");if(s.invert){let o=s.invert([n.x,n.y]),l=s.invert([n.x+1,n.y+1]);o&&l&&(this._pLon=Math.abs(l[0]-o[0]),this._pLat=Math.abs(l[1]-o[1]))}}}}invert(e){let t=this.get("projection");if(t.invert){const i=t.invert([e.x,e.y]);if(i)return{longitude:i[0],latitude:i[1]}}return{longitude:0,latitude:0}}convert(e,t,i){let r=this.get("projection"),n;if(r.rotate||(t=void 0,i=void 0),t!=null||i!=null){t==null&&(t=0),i==null&&(i=0);let s=r.rotate();r.rotate([t,i,0]),n=r([e.longitude,e.latitude]),r.rotate(s)}else n=r([e.longitude,e.latitude]);return n?{x:n[0],y:n[1]}:{x:0,y:0}}_handleChartUp(e){this.chartContainer._downPoints={}}_handlePinch(){const e=this.chartContainer;let t=0,i=[],r=[];if(V(e._downPoints,(n,s)=>{i[t]=s;let o=this._movePoints[n];o&&(r[t]=o),t++}),i.length>1&&r.length>1){const n=e._display;let s=i[0],o=i[1],l=r[0],h=r[1];if(s&&o&&l&&h){s=n.toLocal(s),o=n.toLocal(o),l=n.toLocal(l),h=n.toLocal(h);let u=Math.hypot(o.x-s.x,o.y-s.y),d=Math.hypot(h.x-l.x,h.y-l.y)/u*this._downZoomLevel;d=ce(d,this.get("minZoomLevel",1),this.get("maxZoomLevel",32));let f={x:l.x+(h.x-l.x)/2,y:l.y+(h.y-l.y)/2},p={x:s.x+(o.x-s.x)/2,y:s.y+(o.y-s.y)/2},b=this._downTranslateX||0,g=this._downTranslateY||0,m=this._downZoomLevel,_=f.x-(-b+p.x)/m*d,v=f.y-(-g+p.y)/m*d;this.set("zoomLevel",d),this.set("translateX",_),this.set("translateY",v)}}}_handleChartMove(e){const t=this.chartContainer;let i=t._getDownPoint();const r=t._getDownPointId(),s=e.originalEvent.pointerId;if(this.get("pinchZoom")&&s&&(this._movePoints[s]=e.point,te(t._downPoints).length>1)){this._handlePinch();return}if(!(r&&s&&s!=r)&&i){const o=this.get("panX"),l=this.get("panY");if(o!="none"||l!="none"){const h=t._display;let u=h.toLocal(e.point);i=h.toLocal(i);let c=this._downTranslateX,d=this._downTranslateY;if(Math.hypot(i.x-u.x,i.y-u.y)>5){let f=t.get("background");if(f&&f.events.disableType("click"),M(c)&&M(d)){let p=this.get("projection");const b=this.get("zoomLevel",1),g=this.get("maxPanOut",.4),m=this._mapBounds,_=this.width(),v=this.height(),y=m[1][0]-m[0][0],P=m[1][1]-m[0][1];if(o=="translateX"){c+=u.x-i.x;const D=_/2-(_/2-this._centerX)*b;c=Math.min(c,D+y*g*b),c=Math.max(c,D-y*g*b)}if(l=="translateY"){d+=u.y-i.y;const D=v/2-(v/2-this._centerY)*b;d=Math.min(d,D+P*g*b),d=Math.max(d,D-P*g*b)}if(this.set("translateX",c),this.set("translateY",d),p.invert){let D=p.invert([i.x,i.y]);location&&D&&(o=="rotateX"&&this.set("rotationX",this._downRotationX-(i.x-u.x)*this._pLon),l=="rotateY"&&this.set("rotationY",this._downRotationY+(i.y-u.y)*this._pLat))}}}}}}_handleWheelRotateY(e,t,i){this._rya=this.animate({key:"rotationY",to:this.get("rotationY",0)-e,duration:t,easing:i})}_handleWheelRotateX(e,t,i){this._rxa=this.animate({key:"rotationX",to:this.get("rotationX",0)-e,duration:t,easing:i})}_handleWheelZoom(e,t){let i=this.get("zoomStep",2),r=this.get("zoomLevel",1),n=r;e>0?n=r/i:e<0&&(n=r*i),n!=r&&this.zoomToPoint(t,n)}zoomToGeoBounds(e,t,i,r){e.right<e.left&&(e.right=180,e.left=-180);const s=this.getPrivate("geoPath").bounds(this._geometryColection);let o=this.convert({longitude:e.left,latitude:e.top},i,r),l=this.convert({longitude:e.right,latitude:e.bottom},i,r);o.y<s[0][1]&&(o.y=s[0][1]),l.y>s[1][1]&&(l.y=s[1][1]);let h=this.get("zoomLevel",1),u={left:o.x,right:l.x,top:o.y,bottom:l.y},c=this.seriesContainer,d=.9*Math.min(c.innerWidth()/(u.right-u.left)*h,c.innerHeight()/(u.bottom-u.top)*h),f=u.left+(u.right-u.left)/2,p=u.top+(u.bottom-u.top)/2,b=this.invert({x:f,y:p});return(i!=null||r!=null)&&this.rotate(i,r),this.zoomToGeoPoint(b,d,!0,t)}zoomToPoint(e,t,i,r){t&&(t=ce(t,this.get("minZoomLevel",1),this.get("maxZoomLevel",32))),M(r)||(r=this.get("animationDuration",0));const n=this.get("animationEasing"),s=this.get("zoomLevel",1);this.get("centerMapOnZoomOut")&&t==this.get("homeZoomLevel",1)&&(e=this.convert(this.homeGeoPoint(),this.get("homeRotationX"),this.get("homeRotationY")),i=!0);let o=e.x,l=e.y,h=this.get("translateX",0),u=this.get("translateY",0),c=o,d=l;i&&(c=this.width()/2,d=this.height()/2);let f=c-(o-h)/s*t,p=d-(l-u)/s*t;return this._txa=this.animate({key:"translateX",to:f,duration:r,easing:n}),this._tya=this.animate({key:"translateY",to:p,duration:r,easing:n}),this._za=this.animate({key:"zoomLevel",to:t,duration:r,easing:n}),s!=t&&this._root.readerAlert(this._t("Zoom level changed to %1",this._root.locale,Rn(t))),this._za}zoomToGeoPoint(e,t,i,r,n,s){let o=this.convert(e,n,s);if((n!=null||s!=null)&&this.rotate(n,s,r),o)return this.zoomToPoint(o,t,i,r)}rotate(e,t,i){if(this.get("projection").rotate){M(i)||(i=this.get("animationDuration",0));const n=this.get("animationEasing");e!=null&&this.animate({key:"rotationX",to:e,duration:i,easing:n}),t!=null&&this.animate({key:"rotationY",to:t,duration:i,easing:n})}}zoomIn(){return this.zoomToPoint({x:this.width()/2,y:this.height()/2},this.get("zoomLevel",1)*this.get("zoomStep",2))}zoomOut(){return this.zoomToPoint({x:this.width()/2,y:this.height()/2},this.get("zoomLevel",1)/this.get("zoomStep",2))}_clearDirty(){super._clearDirty(),this._dirtyGeometries=!1,this._mapFitted=!1}getArea(e){const t=this.getPrivate("geoPath"),i=e.get("geometry");return i?t.area(i):0}}Object.defineProperty(Fi,"className",{enumerable:!0,configurable:!0,writable:!0,value:"MapChart"});Object.defineProperty(Fi,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:$t.classNames.c
3oncat([Fi.className])});var Zr={exports:{}};class jl{constructor(e=[],t=Hl){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:i}=this,r=t[e];for(;e>0;){const n=e-1>>1,s=t[n];if(i(r,s)>=0)break;t[e]=s,e=n}t[e]=r}_down(e){const{data:t,compare:i}=this,r=this.length>>1,n=t[e];for(;e<r;){let s=(e<<1)+1,o=t[s];const l=s+1;if(l<this.length&&i(t[l],o)<0&&(s=l,o=t[l]),i(o,n)>=0)break;t[e]=o,e=s}t[e]=n}}function Hl(a,e){return a<e?-1:a>e?1:0}const Rl=Object.freeze(Object.defineProperty({__proto__:null,default:jl},Symbol.toStringTag,{value:"Module"})),Il=Cs(Rl);var mi=Il;mi.default&&(mi=mi.default);Zr.exports=Es;Zr.exports.default=Es;function Es(a,e,t){e=e||1;for(var i,r,n,s,o=0;o<a[0].length;o++){var l=a[0][o];(!o||l[0]<i)&&(i=l[0]),(!o||l[1]<r)&&(r=l[1]),(!o||l[0]>n)&&(n=l[0]),(!o||l[1]>s)&&(s=l[1])}var h=n-i,u=s-r,c=Math.min(h,u),d=c/2;if(c===0){var f=[i,r];return f.distance=0,f}for(var p=new mi(void 0,Fl),b=i;b<n;b+=c)for(var g=r;g<s;g+=c)p.push(new $e(b+d,g+d,d,a));var m=zl(a),_=new $e(i+h/2,r+u/2,0,a);_.d>m.d&&(m=_);for(var v=p.length;p.length;){var y=p.pop();y.d>m.d&&(m=y,t&&console.log("found best %d after %d probes",Math.round(1e4*y.d)/1e4,v)),!(y.max-m.d<=e)&&(d=y.h/2,p.push(new $e(y.x-d,y.y-d,d,a)),p.push(new $e(y.x+d,y.y-d,d,a)),p.push(new $e(y.x-d,y.y+d,d,a)),p.push(new $e(y.x+d,y.y+d,d,a)),v+=4)}t&&(console.log("num probes: "+v),console.log("best distance: "+m.d));var P=[m.x,m.y];return P.distance=m.d,P}function Fl(a,e){return e.max-a.max}function $e(a,e,t,i){this.x=a,this.y=e,this.h=t,this.d=Nl(a,e,i),this.max=this.d+this.h*Math.SQRT2}function Nl(a,e,t){for(var i=!1,r=1/0,n=0;n<t.length;n++)for(var s=t[n],o=0,l=s.length,h=l-1;o<l;h=o++){var u=s[o],c=s[h];u[1]>e!=c[1]>e&&a<(c[0]-u[0])*(e-u[1])/(c[1]-u[1])+u[0]&&(i=!i),r=Math.min(r,Gl(a,e,u,c))}return r===0?0:(i?1:-1)*Math.sqrt(r)}function zl(a){for(var e=0,t=0,i=0,r=a[0],n=0,s=r.length,o=s-1;n<s;o=n++){var l=r[n],h=r[o],u=l[0]*h[1]-h[0]*l[1];t+=(l[0]+h[0])*u,i+=(l[1]+h[1])*u,e+=u*3}return e===0?new $e(r[0][0],r[0][1],0,a):new $e(t/e,i/e,0,a)}function Gl(a,e,t,i){var r=t[0],n=t[1],s=i[0]-r,o=i[1]-n;if(s!==0||o!==0){var l=((a-r)*s+(e-n)*o)/(s*s+o*o);l>1?(r=i[0],n=i[1]):l>0&&(r+=s*l,n+=o*l)}return s=a-r,o=e-n,s*s+o*o}var Wl=Zr.exports;const Yl=Ms(Wl);class Ni extends Le{constructor(){super(...arguments),Object.defineProperty(this,"_projectionDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"series",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){super._afterNew(),this.setPrivate("trustBounds",!0)}_beforeChanged(){if(super._beforeChanged(),this._projectionDirty||this.isDirty("geometry")||this.isDirty("precision")){const e=this.get("geometry");if(e){const t=this.series;if(t){const i=t.projection();i&&i.precision(this.get("precision",.5));const r=t.geoPath();r&&(this._clear=!0,this.set("draw",n=>{r.context(this._display),r(e),r.context(null)}),this.isHover()&&this.showTooltip())}}}}markDirtyProjection(){this.markDirty(),this._projectionDirty=!0}_clearDirty(){super._clearDirty(),this._projectionDirty=!1}geoCentroid(){const e=this.get("geometry");return e?Kr(e):{latitude:0,longitude:0}}visualCentroid(){let e=0,t=[];const i=this.get("geometry");if(i){if(i.type=="Polygon")t=i.coordinates;else if(i.type=="MultiPolygon")for(let r=0;r<i.coordinates.length;r++){let n=i.coordinates[r],s=Go({type:"Polygon",coordinates:n});s>e&&(t=n,e=s)}if(t){let r=Yl(t);return{longitude:r[0],latitude:r[1]}}}return{longitude:0,latitude:0}}_getTooltipPoint(){const e=this.series;if(e){const t=e.projection();if(t){const i=this.visualCentroid(),r=t([i.longitude,i.latitude]);if(r)return{x:r[0],y:r[1]}}}return{x:0,y:0}}}Object.defineProperty(Ni,"className",{enumerable:!0,configurable:!0,writable:!0,value:"MapPolygon"});Object.defineProperty(Ni,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Le.classNames.c
3oncat([Ni.className])});class zi extends qt{constructor(){super(...arguments),Object.defineProperty(this,"mapPolygons",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new Da(vt.new({}),()=>Ni._new(this._root,{},[this.mapPolygons.template])))}),Object.defineProperty(this,"_types",{enumerable:!0,configurable:!0,writable:!0,value:["Polygon","MultiPolygon"]})}makeMapPolygon(e){const t=this.children.push(this.mapPolygons.make());return t._setDataItem(e),this.mapPolygons.push(t),t}markDirtyProjection(){x(this.dataItems,e=>{let t=e.get("mapPolygon");t&&t.markDirtyProjection()})}_prepareChildren(){super._prepareChildren(),this.isDirty("fill")&&this.mapPolygons.template.set("fill",this.get("fill")),this.isDirty("stroke")&&this.mapPolygons.template.set("stroke",this.get("stroke"))}processDataItem(e){super.processDataItem(e);let t=e.get("mapPolygon");t||(t=this.makeMapPolygon(e)),e.set("mapPolygon",t);let i=e.get("geometry");if(i){if(this.get("reverseGeodata")&&i.coordinates)for(let n=0;n<i.coordinates.length;n++)if(i.type=="MultiPolygon")for(let s=0;s<i.coordinates[n].length;s++)i.coordinates[n][s].reverse();else i.coordinates[n].reverse();t.set("geometry",i)}t.series=this,this._addGeometry(e.get("geometry"),this)}disposeDataItem(e){super.disposeDataItem(e);const t=e.get("mapPolygon");t&&(this.mapPolygons.removeValue(t),t.dispose()),this._removeGeometry(e.get("geometry"))}_excludeDataItem(e){super._excludeDataItem(e);const t=e.get("mapPolygon");t&&t.setPrivate("visible",!1)}_unexcludeDataItem(e){super._unexcludeDataItem(e);const t=e.get("mapPolygon");t&&t.setPrivate("visible",!0)}_notIncludeDataItem(e){super._notIncludeDataItem(e);const t=e.get("mapPolygon");t&&t.setPrivate("visible",!1)}_unNotIncludeDataItem(e){super._unNotIncludeDataItem(e);const t=e.get("mapPolygon");t&&t.setPrivate("visible",!0)}markDirtyValues(e){if(super.markDirtyValues(),e){const t=e.get("mapPolygon");t&&t.set("geometry",e.get("geometry"))}}zoomToDataItem(e,t){const i=e.get("mapPolygon");if(i){const r=i.get("geometry"),n=this.chart;if(r&&n){if(t){const s=Kr(r);return n.rotate(-s.longitude,-s.latitude),n.zoomToGeoBounds(gi(r),void 0,-s.longitude,-s.latitude)}return n.zoomToGeoBounds(gi(r))}}}zoomToDataItems(e,t){let i,r,n,s;if(x(e,o=>{const l=o.get("mapPolygon");if(l){const h=l.get("geometry");if(h){let u=gi(h);i==null&&(i=u.left),r==null&&(r=u.right),n==null&&(n=u.top),s==null&&(s=u.bottom),i=Math.min(u.left,i),r=Math.max(u.right,r),n=Math.max(u.top,n),s=Math.min(u.bottom,s)}}}),i!=null&&r!=null&&n!=null&&s!=null){const o=this.chart;if(o){if(t){const l=i+(r-i)/2,h=s+(n-s)/2;return o.rotate(-l,-h),o.zoomToGeoBounds({left:i,right:r,top:n,bottom:s},void 0,-l,-h)}return o.zoomToGeoBounds({left:i,right:r,top:n,bottom:s})}}}getPolygonByPoint(e){let t;const r=this._display._renderer.getObjectAtPoint(e);if(r)return this.mapPolygons.each(function(n){n._display==r&&(t=n)}),t}getPolygonByGeoPoint(e){return this.getPolygonByPoint(this.chart.convert(e))}}Object.defineProperty(zi,"className",{enumerable:!0,configurable:!0,writable:!0,value:"MapPolygonSeries"});Object.defineProperty(zi,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:qt.classNames.concat([zi.className])});class Ul extends Gr{setupDefaultRules(){super.setupDefaultRules(),this.rule("Component").setAll({interpolationDuration:600}),this.rule("Hierarchy").set("animationDuration",600),this.rule("Scrollbar").set("animationDuration",600),this.rule("Tooltip").set("animationDuration",300),this.rule("MapChart").set("animationDuration",1e3),this.rule("MapChart").set("wheelDuration",300),this.rule("Entity").setAll({stateAnimationDuration:600}),this.rule("Sprite").states.create("default",{stateAnimationDuration:600}),this.rule("Tooltip",["axis"]).setAll({animationDuration:200}),this.rule("WordCloud").set("animationDuration",500),this.rule("Polygon").set("animationDuration",600),this.rule("ArcDiagram").set("animationDuration",600)}}const Hn={AD:{country:"Andorra",continent_code:"EU",continent:"Europe",maps:["andorraLow","andorraHigh"]},AE:{country:"United Arab Emirates",continent_code:"AS",continent:"Asia",maps:["uaeLow","uaeHigh"]},AF:{country:"Afghanistan",continent_code:"AS",continent:"Asia",maps:["afghanistanLow","afghanistanHigh"]},AG:{country:"Antigua and Barbuda",continent_code:"NA",continent:"North America",maps:["antiguaBarbudaLow","antiguaBarbudaHigh"]},AI:{country:"Anguilla",continent_code:"NA",continent:"North America",maps:["anguillaLow","anguillaHigh"]},AL:{country:"Albania",continent_code:"EU",continent:"Europe",maps:["albaniaLow","albaniaHigh"]},AM:{country:"Armenia",continent_code:"EU",continent:"Europe",maps:["armeniaLow","armeniaHigh"]},AO:{country:"Angola",continent_code:"AF",continent:"Africa",maps:["angolaLow","angolaHigh"]},AQ:{country:"Antarctica",continent_code:"AN",continent:"Antarctica",maps:[]},AR:{country:"Argentina",continent_code:"SA",continent:"South America",maps:["argentinaLow","argentinaHigh"]},AS:{country:"American Samoa",continent_code:"OC",continent:"Oceania",maps:["americanSamoaLow","americanSamoaHigh"]},AT:{country:"Austria",continent_code:"EU",continent:"Europe",maps:["austriaLow","austriaHigh"]},AU:{country:"Australia",continent_code:"OC",continent:"Oceania",maps:["australiaLow","australiaHigh"]},AW:{country:"Aruba",continent_code:"NA",continent:"North America",maps:["arubaLow","arubaHigh"]},AX:{country:"Aland Islands",continent_code:"EU",continent:"Europe",maps:[]},AZ:{country:"Azerbaijan",continent_code:"EU",continent:"Europe",maps:["azerbaijanLow","azerbaijanHigh"]},BA:{country:"Bosnia and Herzegovina",continent_code:"EU",continent:"Europe",maps:["bosniaHerzegovinaLow","bosniaHerzegovinaHigh","bosniaHerzegovinaCantonsLow","bosniaHerzegovinaCantonsHigh"]},BB:{country:"Barbados",continent_code:"NA",continent:"North America",maps:["barbadosLow","barbadosHigh"]},BD:{country:"Bangladesh",continent_code:"AS",continent:"Asia",maps:["bangladeshLow","bangladeshHigh"]},BE:{country:"Belgium",continent_code:"EU",continent:"Europe",maps:["belgiumLow","belgiumHigh"]},BF:{country:"Burkina Faso",continent_code:"AF",continent:"Africa",maps:["burkinaFasoLow","burkinaFasoHigh"]},BG:{country:"Bulgaria",continent_code:"EU",continent:"Europe",maps:["bulgariaLow","bulgariaHigh"]},BH:{country:"Bahrain",continent_code:"AS",continent:"Asia",maps:["bahrainLow","bahrainHigh"]},BI:{country:"Burundi",continent_code:"AF",continent:"Africa",maps:["burundiLow","burundiHigh"]},BJ:{country:"Benin",continent_code:"AF",continent:"Africa",maps:["beninLow","beninHigh"]},BL:{country:"Saint Barthelemy",continent_code:"NA",continent:"North America",maps:[]},BM:{country:"Bermuda",continent_code:"NA",continent:"North America",maps:["bermudaLow","bermudaHigh"]},BN:{country:"Brunei Darussalam",continent_code:"AS",continent:"Asia",maps:["bruneiDarussalamLow","bruneiDarussalamHigh"]},BO:{country:"Bolivia, Plurinational State of",continent_code:"SA",continent:"South America",maps:["boliviaLow","boliviaHigh"]},BQ:{country:"Bonaire, Sint Eustatius and Saba",continent_code:"NA",continent:"North America",maps:["bonaireSintEustatiusSabaLow","bonaireSintEustatiusSabaHigh"]},BR:{country:"Brazil",continent_code:"SA",continent:"South America",maps:["brazilLow","brazilHigh"]},BS:{country:"Bahamas",continent_code:"NA",continent:"North America",maps:["bahamasLow","bahamasHigh"]},BT:{country:"Bhutan",continent_code:"AS",continent:"Asia",maps:["bhutanLow","bhutanHigh"]},BV:{country:"Bouvet Island",continent_code:"AN",continent:"Antarctica",maps:[]},BW:{country:"Botswana",continent_code:"AF",continent:"Africa",maps:["botswanaLow","botswanaHigh"]},BY:{country:"Belarus",continent_code:"EU",continent:"Europe",maps:["belarusLow","belarusHigh"]},BZ:{country:"Belize",continent_code:"NA",continent:"North America",maps:["belizeLow","belizeHigh"]},CA:{country:"Canada",continent_code:"NA",continent:"North America",maps:["canadaLow","canadaHigh"]},CC:{country:"Cocos (Keeling) Islands",continent_code:"AS",continent:"Asia",maps:["cocosKeelingLow","cocosKeelingHigh"]},CD:{country:"Congo, the Democratic Republic of the",continent_code:"AF",continent:"Africa",maps:["congoDRLow","congoDRHigh"]},CF:{country:"Central African Republic",continent_code:"AF",continent:"Africa",maps:["centralAfricanRepublicLow","centralAfricanRepublicHigh"]},CG:{country:"Congo",continent_code:"AF",continent:"Africa",maps:["congoLow","congoHigh"]},CH:{country:"Switzerland",continent_code:"EU",continent:"Europe",maps:["switzerlandLow","switzerlandHigh"]},CI:{country:"Cote d'Ivoire",continent_code:"AF",continent:"Africa",maps:["cotedIvoireLow","cotedIvoireHigh"]},CK:{country:"Cook Islands",continent_code:"OC",continent:"Oceania",maps:[]},CL:{country:"Chile",continent_code:"SA",continent:"South America",maps:["chileLow","chileHigh"]},CM:{country:"Cameroon",continent_code:"AF",continent:"Africa",maps:["cameroonLow","cameroonHigh"]},CN:{country:"China",continent_code:"AS",continent:"Asia",maps:["chinaLow","chinaHigh"]},CO:{country:"Colombia",continent_code:"SA",continent:"South America",maps:["colombiaLow","colombiaHigh","colombiaMuniLow","colombiaMuniHigh"]},CR:{country:"Costa Rica",continent_code:"NA",continent:"North America",maps:["costaRicaLow","costaRicaHigh"]},CU:{country:"Cuba",continent_code:"NA",continent:"North America",maps:["cubaLow","cubaHigh"]},CV:{country:"Cape Verde",continent_code:"AF",continent:"Africa",maps:["capeVerdeLow","capeVerdeHigh"]},CW:{country:"Curacao",continent_code:"NA",continent:"North America",maps:["curacaoLow","curacaoHigh"]},CX:{country:"Christmas Island",continent_code:"AS",continent:"Asia",maps:[]},CY:{country:"Cyprus",continent_code:"EU",continent:"Europe",maps:["cyprusLow","cyprusHigh","cyprusNorthCyprusLow","cyprusNorthCyprusHigh"]},CZ:{country:"Czech Republic",continent_code:"EU",continent:"Europe",maps:["czechiaLow","czechiaHigh"]},DE:{country:"Germany",continent_code:"EU",continent:"Europe",maps:["germanyLow","germanyHigh"]},DJ:{country:"Djibouti",continent_code:"AF",continent:"Africa",maps:["djiboutiLow","djiboutiHigh"]},DK:{country:"Denmark",continent_code:"EU",continent:"Europe",maps:["denmarkLow","denmarkHigh"]},DM:{country:"Dominica",continent_code:"NA",continent:"North America",maps:["dominicaLow","dominicaHigh"]},DO:{country:"Dominican Republic",continent_code:"NA",continent:"North America",maps:["dominicanRepublicLow","dominicanRepublicHigh","dominicanRepublicMuniLow","dominicanRepublicMuniHigh"]},DZ:{country:"Algeria",continent_code:"AF",continent:"Africa",maps:["algeriaLow","alger
3iaHigh"]},EC:{country:"Ecuador",continent_code:"SA",continent:"South America",maps:["ecuadorLow","ecuadorHigh"]},EE:{country:"Estonia",continent_code:"EU",continent:"Europe",maps:["estoniaLow","estoniaHigh"]},EG:{country:"Egypt",continent_code:"AF",continent:"Africa",maps:["egyptLow","egyptHigh"]},EH:{country:"Western Sahara",continent_code:"AF",continent:"Africa",maps:[]},ER:{country:"Eritrea",continent_code:"AF",continent:"Africa",maps:["eritreaLow","eritreaHigh"]},ES:{country:"Spain",continent_code:"EU",continent:"Europe",maps:["spainLow","spainHigh","spainProvincesLow","spainProvincesHigh","spainProvinces2Low","spainProvinces2High"]},ET:{country:"Ethiopia",continent_code:"AF",continent:"Africa",maps:["ethiopiaLow","ethiopiaHigh"]},FI:{country:"Finland",continent_code:"EU",continent:"Europe",maps:["finlandLow","finlandHigh"]},FJ:{country:"Fiji",continent_code:"OC",continent:"Oceania",maps:["fijiEastLow","fijiEastHigh","fijiWestLow","fijiWestHigh"]},FK:{country:"Falkland Islands (Malvinas)",continent_code:"SA",continent:"South America",maps:["falklandIslandsLow","falklandIslandsHigh"]},FM:{country:"Micronesia, Federated States of",continent_code:"OC",continent:"Oceania",maps:[]},FO:{country:"Faroe Islands",continent_code:"EU",continent:"Europe",maps:["faroeIslandsLow","faroeIslandsHigh"]},FR:{country:"France",continent_code:"EU",continent:"Europe",maps:["franceLow","franceHigh","franceDepartmentsLow","franceDepartmentsHigh","franceDepartments2Low","franceDepartments2High"]},GA:{country:"Gabon",continent_code:"AF",continent:"Africa",maps:["gabonLow","gabonHigh"]},GB:{country:"United Kingdom",continent_code:"EU",continent:"Europe",maps:["ukLow","ukHigh","ukCountiesLow","ukCountiesHigh","ukCountriesLow","ukCountriesHigh"]},"GB-CHA":{country:"Channel Islands",continent_code:"EU",continent:"Europe",maps:["channelIslandsLow","channelIslandsHigh"]},GD:{country:"Grenada",continent_code:"NA",continent:"North America",maps:["grenadaLow","grenadaHigh"]},GE:{country:"Georgia",continent_code:"EU",continent:"Europe",maps:["georgiaLow","georgiaHigh","georgiaSouthOssetiaLow","georgiaSouthOssetiaHigh"]},GF:{country:"French Guiana",continent_code:"SA",continent:"South America",maps:["frenchGuianaLow","frenchGuianaHigh"]},GG:{country:"Guernsey",continent_code:"EU",continent:"Europe",maps:[]},GH:{country:"Ghana",continent_code:"AF",continent:"Africa",maps:["ghanaLow","ghanaHigh"]},GI:{country:"Gibraltar",continent_code:"EU",continent:"Europe",maps:[]},GL:{country:"Greenland",continent_code:"NA",continent:"North America",maps:["greenlandLow","greenlandHigh"]},GM:{country:"Gambia",continent_code:"AF",continent:"Africa",maps:["gambiaLow","gambiaHigh"]},GN:{country:"Guinea",continent_code:"AF",continent:"Africa",maps:["guineaLow","guineaHigh"]},GP:{country:"Guadeloupe",continent_code:"NA",continent:"North America",maps:["guadeloupeLow","guadeloupeHigh"]},GQ:{country:"Equatorial Guinea",continent_code:"AF",continent:"Africa",maps:["equatorialGuineaLow","equatorialGuineaHigh"]},GR:{country:"Greece",continent_code:"EU",continent:"Europe",maps:["greeceLow","greeceHigh"]},GS:{country:"South Georgia and the South Sandwich Islands",continent_code:"AN",continent:"Antarctica",maps:[]},GT:{country:"Guatemala",continent_code:"NA",continent:"North America",maps:["guatemalaLow","guatemalaHigh"]},GU:{country:"Guam",continent_code:"OC",continent:"Oceania",maps:["guamLow","guamHigh"]},GW:{country:"Guinea-Bissau",continent_code:"AF",continent:"Africa",maps:["guineaBissauLow","guineaBissauHigh"]},GY:{country:"Guyana",continent_code:"SA",continent:"South America",maps:["guyanaLow","guyanaHigh"]},HK:{country:"Hong Kong",continent_code:"AS",continent:"Asia",maps:["hongKongLow","hongKongHigh"]},HM:{country:"Heard Island and McDonald Islands",continent_code:"AN",continent:"Antarctica",maps:[]},HN:{country:"Honduras",continent_code:"NA",continent:"North America",maps:["hondurasLow","hondurasHigh"]},HR:{country:"Croatia",continent_code:"EU",continent:"Europe",maps:["croatiaLow","croatiaHigh"]},HT:{country:"Haiti",continent_code:"NA",continent:"North America",maps:["haitiLow","haitiHigh"]},HU:{country:"Hungary",continent_code:"EU",continent:"Europe",maps:["hu
3ngaryLow","hungaryHigh"]},ID:{country:"Indonesia",continent_code:"AS",continent:"Asia",maps:["indonesiaLow","indonesiaHigh"]},IE:{country:"Ireland",continent_code:"EU",continent:"Europe",maps:["irelandLow","irelandHigh"]},IL:{country:"Israel",continent_code:"AS",continent:"Asia",maps:["israelLow","israelHigh","israelPalestineLow","israelPalestineHigh"]},IM:{country:"Isle of Man",continent_code:"EU",continent:"Europe",maps:[]},IN:{country:"India",continent_code:"AS",continent:"Asia",maps:["india2023Low","india2023High","india2020Low","india2020High","india2019Low","india2019High","indiaLow","indiaHigh"]},IO:{country:"British Indian Ocean Territory",continent_code:"AS",continent:"Asia",maps:["britishIndianOceanTerritoryLow","britishIndianOceanTerritoryHigh"]},IQ:{country:"Iraq",continent_code:"AS",continent:"Asia",maps:["iraqLow","iraqHigh"]},IR:{country:"Iran, Islamic Republic of",continent_code:"AS",continent:"Asia",maps:["iranLow","iranHigh"]},IS:{country:"Iceland",continent_code:"EU",continent:"Europe",maps:["icelandLow","icelandHigh"]},IT:{country:"Italy",continent_code:"EU",continent:"Europe",maps:["italyLow","italyHigh","italyProvincesLow","italyProvincesHigh"]},JE:{country:"Jersey",continent_code:"EU",continent:"Europe",maps:["channelIslandsLow","channelIslandsHigh"]},JM:{country:"Jamaica",continent_code:"NA",continent:"North America",maps:["jamaicaLow","jamaicaHigh"]},JO:{country:"Jordan",continent_code:"AS",continent:"Asia",maps:["jordanLow","jordanHigh"]},JP:{country:"Japan",continent_code:"AS",continent:"Asia",maps:["japanLow","japanHigh"]},KE:{country:"Kenya",continent_code:"AF",continent:"Africa",maps:["kenyaLow","kenyaHigh"]},KG:{country:"Kyrgyzstan",continent_code:"AS",continent:"Asia",maps:["kyrgyzstanLow","kyrgyzstanHigh"]},KH:{country:"Cambodia",continent_code:"AS",continent:"Asia",maps:["cambodiaLow","cambodiaHigh"]},KI:{country:"Kiribati",continent_code:"OC",continent:"Oceania",maps:[]},KM:{country:"Comoros",continent_code:"AF",continent:"Africa",maps:["comorosLow","comorosHigh"]},KP:{country:"Korea, Democratic People's Republic of",continent_code:"AS",continent:"Asia",maps:["northKoreaLow","northKoreaHigh"]},KR:{country:"Korea, Republic of",continent_code:"AS",continent:"Asia",maps:["southKoreaLow","southKoreaHigh"]},KN:{country:"Saint Kitts and Nevis",continent_code:"NA",continent:"North America",maps:["stKittsNevisLow","stKittsNevisHigh"]},KW:{country:"Kuwait",continent_code:"AS",continent:"Asia",maps:["kuwaitLow","kuwaitHigh"]},KY:{country:"Cayman Islands",continent_code:"NA",continent:"North America",maps:["caymanIslandsLow","caymanIslandsHigh"]},KZ:{country:"Kazakhstan",continent_code:"EU",continent:"Europe",maps:["kazakhstan2023Low","kazakhstan2023High","kazakhstanLow","kazakhstanHigh"]},LA:{country:"Lao People's Democratic Republic",continent_code:"AS",continent:"Asia",maps:["laosLow","laosHigh"]},LB:{country:"Lebanon",continent_code:"AS",continent:"Asia",maps:["lebanonLow","lebanonHigh"]},LC:{country:"Saint Lucia",continent_code:"NA",continent:"North America",maps:["saintLuciaLow","saintLuciaHigh"]},LI:{country:"Liechtenstein",continent_code:"EU",continent:"Europe",maps:["liechtensteinLow","liechtensteinHigh"]},LK:{country:"Sri Lanka",continent_code:"AS",continent:"Asia",maps:["sriLankaLow","sriLankaHigh"]},LR:{country:"Liberia",continent_code:"AF",continent:"Africa",maps:["liberiaLow","liberiaHigh"]},LS:{country:"Lesotho",continent_code:"AF",continent:"Africa",maps:["lesothoLow","lesothoHigh"]},LT:{country:"Lithuania",continent_code:"EU",continent:"Europe",maps:["lithuaniaLow","lithuaniaHigh"]},LU:{country:"Luxembourg",continent_code:"EU",continent:"Europe",maps:["luxembourgLow","luxembourgHigh"]},LV:{country:"Latvia",continent_code:"EU",continent:"Europe",maps:["latvia2021Low","latvia2021High","latviaLow","latviaHigh"]},LY:{country:"Libya",continent_code:"AF",continent:"Africa",maps:["libyaLow","libyaHigh"]},MA:{country:"Morocco",continent_code:"AF",continent:"Africa",maps:["moroccoLow","moroccoHigh"]},MC:{country:"Monaco",continent_code:"EU",continent:"Europe",maps:[]},MD:{country:"Moldova, Republic of",continent_code:"EU",continent:"Europe",maps:["moldovaLow","moldovaHigh"]},ME:{country:"Montenegro",continent_code:"EU",continent:"Europe",maps:["montenegroLow","montenegroHigh"]},MF:{country:"Saint Martin (French Part)",continent_code:"NA",continent:"North America",maps:[]},MG:{country:"Madagascar",continent_code:"AF",continent:"Africa",maps:["madagascarProvinceLow","madagascarProvinceHigh","madagascarRegionLow","madagascarRegionHigh"]},MH:{country:"Marshall Islands",continent_code:"OC",continent:"Oceania",maps:[]},MK:{country:"North Macedonia",continent_code:"EU",continent:"Europe",maps:["northMacedoniaLow","northMacedoniaHigh"]},ML:{country:"Mali",continent_code:"AF",continent:"Africa",maps:["maliLow","maliHigh"]},MM:{country:"Myanmar",continent_code:"AS",continent:"Asia",maps:["myanmarLow","myanmarHigh"]},MN:{country:"Mongolia",continent_code:"AS",continent:"Asia",maps:["mongoliaLow","mongoliaHigh"]},MO:{country:"Macao",continent_code:"AS",continent:"Asia",maps:[]},MP:{country:"Northern Mariana Islands",continent_code:"OC",continent:"Oceania",maps:["northernMarianaLow","northernMarianaHigh"]},MQ:{country:"Martinique",continent_code:"NA",continent:"North America",maps:["martiniqueLow","martiniqueHigh"]},MR:{country:"Mauritania",continent_code:"AF",continent:"Africa",maps:["mauritaniaLow","mauritaniaHigh"]},MS:{country:"Montserrat",continent_code:"NA",continent:"North America",maps:["montserratLow","montserratHigh"]},MT:{country:"Malta",continent_code:"EU",continent:"Europe",maps:["maltaLow","maltaHigh"]},MU:{country:"Mauritius",continent_code:"AF",continent:"Africa",maps:["mauritiusLow","mauritiusHigh"]},MV:{country:"Maldives",continent_code:"AS",continent:"Asia",maps:["maldivesLow","maldivesHigh","maldivesIslandsLow","maldivesIslandsHigh"]},MW:{country:"Malawi",continent_code:"AF",continent:"Africa",maps:["malawiLow","malawiHigh"]},MX:{country:"Mexico",continent_code:"NA",continent:"North America",maps:["mexicoLow","mexicoHigh"]},MY:{country:"Malaysia",continent_code:"AS",continent:"Asia",maps:["malaysiaLow","malaysiaHigh"]},MZ:{country:"Mozambique",continent_code:"AF",continent:"Africa",maps:["mozambiqueLow","mozambiqueHigh"]},NA:{country:"Namibia",continent_code:"AF",continent:"Africa",maps:["namibiaLow","namibiaHigh"]},NC:{country:"New Caledonia",continent_code:"OC",continent:"Oceania",maps:[]},NE:{country:"Niger",continent_code:"AF",continent:"Africa",maps:["nigerLow","nigerHigh"]},NF:{country:"Norfolk Island",continent_code:"OC",continent:"Oceania",maps:[]},NG:{country:"Nigeria",continent_code:"AF",continent:"Africa",maps:["nigeriaLow","nigeriaHigh"]},NI:{country:"Nicaragua",continent_code:"NA",continent:"North America",maps:["nicaraguaLow","nicaraguaHigh"]},NL:{country:"Netherlands",continent_code:"EU",continent:"Europe",maps:["netherlandsLow","netherlandsHigh"]},NO:{country:"Norway",continent_code:"EU",continent:"Europe",maps:["norway2020Low","norway2020High","norwayLow","norwayHigh"]},NP:{country:"Nepal",continent_code:"AS",continent:"Asia",maps:["nepal2020Low","nepal2020High","nepalLow","nepalHigh"]},NR:{country:"Nauru",continent_code:"OC",continent:"Oceania",maps:[]},NU:{country:"Niue",continent_code:"OC",continent:"Oceania",maps:[]},NZ:{country:"New Zealand",continent_code:"OC",continent:"Oceania",maps:["newZealandLow","newZealandHigh"]},OM:{country:"Oman",continent_code:"AS",continent:"Asia",maps:["omanLow","omanHigh"]},PA:{country:"Panama",continent_code:"NA",continent:"North America",maps:["panamaLow","panamaHigh"]},PE:{country:"Peru",continent_code:"SA",continent:"South America",maps:["peruLow","peruHigh"]},PF:{country:"French Polynesia",continent_code:"OC",continent:"Oceania",maps:[]},PG:{country:"Papua New Guinea",continent_code:"OC",continent:"Oceania",maps:[]},PH:{country:"Philippines",continent_code:"AS",continent:"Asia",maps:["philippinesLow","philippinesHigh"]},PK:{country:"Pakistan",continent_code:"AS",continent:"Asia",maps:["pakistanLow","pakistanHigh"]},PL:{country:"Poland",continent_code:"EU",continent:"Europe",maps:["polandLow","polandHigh"]},PM:{country:"Saint Pierre and Miquelon",continent_code:"NA",continent:"North America",maps:["stPierreMiquelonLow","stPierreMiquelonHigh"]},PN:{country:"Pitcairn",continent_code:"OC",continent:"Oceania",maps:[]},PR:{country:"Puerto Rico",continent_code:"NA",continent:"North America",maps:["puertoRicoLow","puertoRicoHigh"]},PS:{country:"Palestinian, State of",continent_code:"AS",continent:"Asia",maps:["palestineLow","palestineHigh"]},PT:{country:"Portugal",continent_code:"EU",continent:"Europe",maps:["portugalLow","portugalHigh","portugalRegionsLow","portugalRegionsHigh"]},PW:{country:"Palau",continent_code:"OC",continent:"Oceania",maps:[]},PY:{country:"Paraguay",continent_code:"SA",continent:"South America",maps:["paraguayLow","paraguayHigh"]},QA:{country:"Qatar",continent_code:"AS",continent:"Asia",maps:["qatarLow","qatarHigh"]},RE:{country:"Reunion",continent_code:"AF",continent:"Africa",maps:[]},RO:{country:"Romania",continent_code:"EU",continent:"Europe",maps:["romaniaLow","romaniaHigh"]},RS:{country:"Serbia",continent_code:"EU",continent:"Europe",maps:["serbiaLow","serbiaHigh","serbiaNoKosovoLow","serbiaNoKosovoHigh"]},RU:{country:"Russian Federation",continent_code:"EU",continent:"Europe",maps:["russiaLow","russiaHigh","russiaCrimeaLow","russiaCrimeaHigh"]},RW:{country:"Rwanda",continent_code:"AF",continent:"Africa",maps:["rwandaLow","rwandaHigh"]},SA:{country:"Saudi Arabia",continent_code:"AS",continent:"Asia",maps:["saudiArabiaLow","saudiArabiaHigh"]},SB:{country:"Solomon Islands",continent_code:"OC",continent:"Oceania",maps:["solomonIslandsLow","solomonIslandsHigh"]},SC:{country:"Seychelles",continent_code:"AF",continent:"Africa",maps:["seychellesLow","seychellesHigh"]},SD:{country:"Sudan",continent_code:"AF",continent:"Africa",maps:["sudanLow","sudanHigh"]},SE:{country:"Sweden",continent_code:"EU",continent:"Europe",maps:["swede
3nLow","swedenHigh"]},SG:{country:"Singapore",continent_code:"AS",continent:"Asia",maps:["singaporeLow","singaporeHigh"]},SH:{country:"Saint Helena, Ascension and Tristan da Cunha",continent_code:"AF",continent:"Africa",maps:["saintHelenaLow","saintHelenaHigh"]},SI:{country:"Slovenia",continent_code:"EU",continent:"Europe",maps:["sloveniaLow","sloveniaHigh","sloveniaRegionsLow","sloveniaRegionsHigh"]},SJ:{country:"Svalbard and Jan Mayen",continent_code:"EU",continent:"Europe",maps:["svalbardLow","svalbardHigh"]},SK:{country:"Slovakia",continent_code:"EU",continent:"Europe",maps:["slovakiaLow","slovakiaHigh"]},SL:{country:"Sierra Leone",continent_code:"AF",continent:"Africa",maps:["sierraLeoneLow","sierraLeoneHigh"]},SM:{country:"San Marino",continent_code:"EU",continent:"Europe",maps:["sanMarinoLow","sanMarinoHigh"]},SN:{country:"Senegal",continent_code:"AF",continent:"Africa",maps:["senegalLow","senegalHigh"]},SO:{country:"Somalia",continent_code:"AF",continent:"Africa",maps:["somaliaLow","somaliaHigh"]},SR:{country:"Suriname",continent_code:"SA",continent:"South America",maps:["surinameLow","surinameHigh"]},SS:{country:"South Sudan",continent_code:"AF",continent:"Africa",maps:["southSudanLow","southSudanHigh","southSudan2015Low","southSudan2015High"]},ST:{country:"Sao Tome and Principe",continent_code:"AF",continent:"Africa",maps:["saoTomePrincipeLow","saoTomePrincipeHigh"]},SV:{country:"El Salvador",continent_code:"NA",continent:"North America",maps:["elSalvadorLow","elSalvadorHigh"]},SX:{country:"Sint Maarten (Dutch Part)",continent_code:"NA",continent:"North America",maps:[]},SY:{country:"Syrian Arab Republic",continent_code:"AS",continent:"Asia",maps:["syriaLow","syriaHigh"]},SZ:{country:"Swaziland",continent_code:"AF",continent:"Africa",maps:["eswatiniLow","eswatiniHigh"]},TC:{country:"Turks and Caicos Islands",continent_code:"NA",continent:"North America",maps:[]},TD:{country:"Chad",continent_code:"AF",continent:"Africa",maps:["chadLow","chadHigh"]},TF:{country:"French Southern Territories",continent_code:"AN",continent:"Antarctica",maps:[]},TG:{country:"Togo",continent_code:"AF",continent:"Africa",maps:["togoLow","togoHigh"]},TH:{country:"Thailand",continent_code:"AS",continent:"Asia",maps:["thailandLow","thailandHigh"]},TJ:{country:"Tajikistan",continent_code:"AS",continent:"Asia",maps:["tajikistanLow","tajikistanHigh"]},TK:{country:"Tokelau",continent_code:"OC",continent:"Oceania",maps:[]},TL:{country:"Timor-Leste",continent_code:"AS",continent:"Asia",maps:["timorLesteLow","timorLesteHigh"]},TM:{country:"Turkmenistan",continent_code:"AS",continent:"Asia",maps:["turkmenistanLow","turkmenistanHigh"]},TN:{country:"Tunisia",continent_code:"AF",continent:"Africa",maps:["tunisiaLow","tunisiaHigh"]},TO:{country:"Tonga",continent_code:"OC",continent:"Oceania",maps:[]},TR:{country:"Türkiye",continent_code:"EU",continent:"Europe",maps:["turkeyLow","turkeyHigh"]},TT:{country:"Trinidad and Tobago",continent_code:"NA",continent:"North America",maps:["trinidadTobagoLow","trinidadTobagoHigh"]},TV:{country:"Tuvalu",continent_code:"OC",continent:"Oceania",maps:[]},TW:{country:"Taiwan",continent_code:"AS",continent:"Asia",maps:["taiwanLow","taiwanHigh"]},TZ:{country:"Tanzania, United Republic of",continent_code:"AF",continent:"Africa",maps:["tanzaniaLow","tanzaniaHigh"]},UA:{country:"Ukraine",continent_code:"EU",continent:"Europe",maps:["ukraineLow","ukraineHigh"]},UG:{country:"Uganda",continent_code:"AF",continent:"Africa",maps:["ugandaLow","ugandaHigh","ugandaRegionsLow","ugandaRegionsHigh"]},UM:{country:"United States Minor Outlying Islands",continent_code:"OC",continent:"Oceania",maps:[]},US:{country:"United States",continent_code:"NA",continent:"North America",maps:["usaLow","usaHigh","usaTerritoriesLow","usaTerritoriesHigh","usaTerritories2Low","usaTerritories2High"]},UY:{country:"Uruguay",continent_code:"SA",continent:"South America",maps:["uruguayLow","uruguayHigh"]},UZ:{country:"Uzbekistan",continent_code:"AS",continent:"Asia",maps:["uzbekistanLow","uzbekistanHigh"]},VA:{country:"Holy See (Vatican City State)",continent_code:"EU",continent:"Europe",maps:["vaticanLow","vaticanHigh"]},VC:{country:"Saint Vincent and the Grenadines",continent_code:"NA",continent:"North America",maps:["saintVincentLow","saintVincentHigh"]},VE:{country:"Venezuela, Bolivarian Republic of",continent_code:"SA",continent:"South America",maps:["venezuelaLow","venezuelaHigh"]},VG:{country:"Virgin Islands, British",continent_code:"NA",continent:"North America",maps:["britishVirginIslandsLow","britishVirginIslandsHigh"]},VI:{country:"Virgin Islands, U.S.",continent_code:"NA",continent:"North America",maps:["usVirginIslandsLow","usVirginIslandsHigh"]},VN:{country:"Viet Nam",continent_code:"AS",continent:"Asia",maps:["vietnamLow","vietnamHigh"]},VU:{country:"Vanuatu",continent_code:"OC",continent:"Oceania",maps:[]},WF:{country:"Wallis and Futuna",continent_code:"OC",continent:"Oceania",maps:[]},WS:{country:"Samoa",continent_code:"OC",continent:"Oceania",maps:["samoaLow","samoaHigh"]},YE:{country:"Yemen",continent_code:"AS",continent:"Asia",maps:["yemenLow","yemenHigh"]},YT:{country:"Mayotte",continent_code:"AF",continent:"Africa",maps:[]},ZA:{country:"South Africa",continent_code:"AF",continent:"Africa",maps:["southAfricaLow","southAfricaHigh"]},ZM:{country:"Zambia",continent_code:"AF",continent:"Africa",maps:["zambiaLow","zambiaHigh"]},ZW:{country:"Zimbabwe",continent_code:"AF",continent:"Africa",maps:["zimbabweL
3ow","zimbabweHigh"]},XK:{country:"Kosovo",continent_code:"EU",continent:"Europe",maps:["kosovoLow","kosovoHigh"]}},Vl={class:"mt-12"},Kl={__name:"MapChart",setup(a){const e={country_code:"TR"},{cityCounts:t}=Bs.page.props;return setTimeout(()=>{var i=Wr.new("chartdiv");i._logo.dispose(),i.setThemes([Ul.new(i)]);var r=i.container.children.push(Fi.new(i,{wheelY:"none",panX:"none",panY:"none",projection:Hr(),layout:i.horizontalLayout})),n=e;o(n.country_code);var s=r.series.push(zi.new(i,{calculateAggregates:!0,valueField:"value"}));s.mapPolygons.template.setAll({fill:Be(13421772),fillOpacity:1}),s.mapPolygons.template.adapters.add("tooltipText",function(l,h){var f,p;const u=h.dataItem,c=((f=u==null?void 0:u.dataContext)==null?void 0:f.name)||"",d=(p=u==null?void 0:u.dataContext)==null?void 0:p.value;return d&&d>0?`${c}: ${d}`:c}),s.mapPolygons.template.states.create("hover",{fill:Be(6781237)}),s.set("heatRules",[{target:s.mapPolygons.template,dataField:"value",min:Be(9091071),max:Be(2445978),key:"fill"}]);function o(l){var h="usaLow";r.set("projection",Hr());var u=h;Hn[l]!==void 0&&(u=Hn[l].maps[0]),Co("https://cdn.amcharts.com/lib/5/geodata/json/"+u+".json",r).then(function(c){var d=Lo.parse(c.response);s.set("geoJSON",d),s.data.setAll(t)})}s.events.on("datavalidated",function(){})},300),(i,r)=>(Hs(),js("div",Vl,[...r[0]||(r[0]=[Rs("div",{id:"chartdiv",class:"w-full h-[300px]"},null,-1)])]))}};export{Kl as default};
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.