var fr=Object.defineProperty,gr=Object.defineProperties,pr=Object.getOwnPropertyDescriptors,Wo=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,xr=Object.prototype.propertyIsEnumerable,No=(tt,X,nt)=>X in tt?fr(tt,X,{enumerable:!0,configurable:!0,writable:!0,value:nt}):tt[X]=nt,ci=(tt,X)=>{for(var nt in X||(X={}))mr.call(X,nt)&&No(tt,nt,X[nt]);if(Wo)for(var nt of Wo(X))xr.call(X,nt)&&No(tt,nt,X[nt]);return tt},ps=(tt,X)=>gr(tt,pr(X));!function(tt,X){"object"==typeof exports&&"undefined"!=typeof module?module.exports=X():"function"==typeof define&&define.amd?define(X):(tt="undefined"!=typeof globalThis?globalThis:tt||self).Chart=X()}(this,function(){"use strict";const tt="undefined"==typeof window?function(i){return i()}:window.requestAnimationFrame;function X(i,t,e){const s=e||(a=>Array.prototype.slice.call(a));let n=!1,o=[];return function(...a){o=s(a),n||(n=!0,tt.call(window,()=>{n=!1,i.apply(t,o)}))}}function nt(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const Pe=i=>"start"===i?"left":"end"===i?"right":"center",Z=(i,t,e)=>"start"===i?t:"end"===i?e:(t+e)/2,ms=(i,t,e,s)=>i===(s?"left":"right")?e:"center"===i?(t+e)/2:t;var pt=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(i,t,e,s){const o=t.duration;t.listeners[s].forEach(a=>a({chart:i,initial:t.initial,numSteps:o,currentStep:Math.min(e-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=tt.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((e,s)=>{if(!e.running||!e.items.length)return;const n=e.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>e.duration&&(e.duration=o._total),o.tick(i),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,e,i,"progress")),n.length||(e.running=!1,this._notify(s,e,i,"complete"),e.initial=!1),t+=n.length}),this._lastDate=i,0===t&&(this._running=!1)}_getAnims(i){const t=this._charts;let e=t.get(i);return e||(e={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,e)),e}listen(i,t,e){this._getAnims(i).listeners[t].push(e)}add(i,t){t&&t.length&&this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){const t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,s)=>Math.max(e,s._duration),0),this._refresh())}running(i){if(!this._running)return!1;const t=this._charts.get(i);return!!(t&&t.running&&t.items.length)}stop(i){const t=this._charts.get(i);if(!t||!t.items.length)return;const e=t.items;let s=e.length-1;for(;s>=0;--s)e[s].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}};const ht={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},di="0123456789ABCDEF",Ho=i=>di[15&i],jo=i=>di[(240&i)>>4]+di[15&i],De=i=>(240&i)>>4==(15&i);function te(i){return i+.5|0}const Ce=(i,t,e)=>Math.max(Math.min(i,e),t);function ee(i){return Ce(te(2.55*i),0,255)}function ie(i){return Ce(te(255*i),0,255)}function ui(i){return Ce(te(i/2.55)/100,0,1)}function xs(i){return Ce(te(100*i),0,100)}const Yo=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Uo=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function bs(i,t,e){const s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Xo(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function qo(i,t,e){const s=bs(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function fi(i){const t=i.r/255,e=i.g/255,s=i.b/255,n=Math.max(t,e,s),o=Math.min(t,e,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=n===t?(e-s)/h+(e<s?6:0):n===e?(s-t)/h+2:(t-e)/h+4,r=60*r+.5),[0|r,l||0,a]}function gi(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(ie)}function pi(i,t,e){return gi(bs,i,t,e)}function _s(i){return(i%360+360)%360}const ys={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},vs={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Oe;function Ae(i,t,e){if(i){let s=fi(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,0===t?360:1)),s=pi(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function ws(i,t){return i&&Object.assign(t||{},i)}function Ms(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=ie(i[3]))):(t=ws(i,{r:0,g:0,b:0,a:1})).a=ie(t.a),t}class Te{constructor(t){if(t instanceof Te)return t;const e=typeof t;let s;var n,o,a;"object"===e?s=Ms(t):"string"===e&&(a=(n=t).length,"#"===n[0]&&(4===a||5===a?o={r:255&17*ht[n[1]],g:255&17*ht[n[2]],b:255&17*ht[n[3]],a:5===a?17*ht[n[4]]:255}:7!==a&&9!==a||(o={r:ht[n[1]]<<4|ht[n[2]],g:ht[n[3]]<<4|ht[n[4]],b:ht[n[5]]<<4|ht[n[6]],a:9===a?ht[n[7]]<<4|ht[n[8]]:255})),s=o||function Go(i){Oe||(Oe=function(){const e={},s=Object.keys(vs),n=Object.keys(ys);let o,a,r,l,h;for(o=0;o<s.length;o++){for(l=h=s[o],a=0;a<n.length;a++)r=n[a],h=h.replace(r,ys[r]);r=parseInt(vs[l],16),e[h]=[r>>16&255,r>>8&255,255&r]}return e}(),Oe.transparent=[0,0,0,0]);const t=Oe[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}(t)||function Zo(i){return"r"===i.charAt(0)?function(t){const e=Yo.exec(t);let s,n,o,a=255;if(e){if(e[7]!==s){const r=+e[7];a=255&(e[8]?ee(r):255*r)}return s=+e[1],n=+e[3],o=+e[5],s=255&(e[2]?ee(s):s),n=255&(e[4]?ee(n):n),o=255&(e[6]?ee(o):o),{r:s,g:n,b:o,a}}}(i):function Ko(i){const t=Uo.exec(i);let e,s=255;if(!t)return;t[5]!==e&&(s=t[6]?ee(+t[5]):ie(+t[5]));const n=_s(+t[2]),o=+t[3]/100,a=+t[4]/100;return e="hwb"===t[1]?gi(qo,n,o,a):"hsv"===t[1]?gi(Xo,n,o,a):pi(n,o,a),{r:e[0],g:e[1],b:e[2],a:s}}(i)}(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=ws(this._rgb);return t&&(t.a=ui(t.a)),t}set rgb(t){this._rgb=Ms(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ui(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?function $o(i){var e,t=De((e=i).r)&&De(e.g)&&De(e.b)&&De(e.a)?Ho:jo;return i&&"#"+t(i.r)+t(i.g)+t(i.b)+(i.a<255?t(i.a):"")}(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=fi(t),s=e[0],n=xs(e[1]),o=xs(e[2]);return t.a<255?`hsla(${s}, ${n}%, ${o}%, ${ui(t.a)})`:`hsl(${s}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const s=this;if(t){const n=s.rgb,o=t.rgb;let a;const r=e===a?.5:e,l=2*r-1,h=n.a-o.a,c=((l*h==-1?l:(l+h)/(1+l*h))+1)/2;a=1-c,n.r=255&c*n.r+a*o.r+.5,n.g=255&c*n.g+a*o.g+.5,n.b=255&c*n.b+a*o.b+.5,n.a=r*n.a+(1-r)*o.a,s.rgb=n}return s}clone(){return new Te(this.rgb)}alpha(t){return this._rgb.a=ie(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=te(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ae(this._rgb,2,t),this}darken(t){return Ae(this._rgb,2,-t),this}saturate(t){return Ae(this._rgb,1,t),this}desaturate(t){return Ae(this._rgb,1,-t),this}rotate(t){return s=t,(n=fi(e=this._rgb))[0]=_s(n[0]+s),n=pi(n),e.r=n[0],e.g=n[1],e.b=n[2],this;var e,s,n}}function ks(i){return new Te(i)}const Ss=i=>i instanceof CanvasGradient||i instanceof CanvasPattern;function mi(i){return Ss(i)?i:ks(i)}function Le(i){return Ss(i)?i:ks(i).saturate(.5).darken(.1).hexString()}function mt(){}const Ps=function(){let i=0;return function(){return i++}}();function I(i){return null==i}function B(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)}function R(i){return null!==i&&"[object Object]"===Object.prototype.toString.call(i)}const $=i=>("number"==typeof i||i instanceof Number)&&isFinite(+i);function ot(i,t){return $(i)?i:t}function L(i,t){return void 0===i?t:i}const Ds=(i,t)=>"string"==typeof i&&i.endsWith("%")?parseFloat(i)/100:i/t,xi=(i,t)=>"string"==typeof i&&i.endsWith("%")?parseFloat(i)/100*t:+i;function V(i,t,e){if(i&&"function"==typeof i.call)return i.apply(e,t)}function z(i,t,e,s){let n,o,a;if(B(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;n<o;n++)t.call(e,i[n],n);else if(R(i))for(a=Object.keys(i),o=a.length,n=0;n<o;n++)t.call(e,i[a[n]],a[n])}function se(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function ne(i){if(B(i))return i.map(ne);if(R(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=ne(i[e[n]]);return t}return i}function Cs(i){return-1===["__proto__","prototype","constructor"].indexOf(i)}function Os(i,t,e,s){if(!Cs(i))return;const n=t[i],o=e[i];R(n)&&R(o)?Ht(n,o,s):t[i]=ne(o)}function Ht(i,t,e){const s=B(t)?t:[t],n=s.length;if(!R(i))return i;const o=(e=e||{}).merger||Os;for(let a=0;a<n;++a){if(!R(t=s[a]))continue;const r=Object.keys(t);for(let l=0,h=r.length;l<h;++l)o(r[l],i,t,e)}return i}function jt(i,t){return Ht(i,t,{merger:As})}function As(i,t,e){if(!Cs(i))return;const s=t[i],n=e[i];R(s)&&R(n)?jt(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=ne(n))}function Ts(i,t){const e=i.indexOf(".",t);return-1===e?i.length:e}function Pt(i,t){if(""===t)return i;let e=0,s=Ts(t,e);for(;i&&s>e;)i=i[t.substr(e,s-e)],e=s+1,s=Ts(t,e);return i}function Re(i){return i.charAt(0).toUpperCase()+i.slice(1)}const at=i=>void 0!==i,vt=i=>"function"==typeof i,bi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Ls(i){return"mouseup"===i.type||"click"===i.type||"contextmenu"===i.type}const It=Object.create(null),_i=Object.create(null);function oe(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function yi(i,t,e){return"string"==typeof t?Ht(oe(i,t),e):Ht(oe(i,""),t)}var E=new class{constructor(i){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Le(e.backgroundColor),this.hoverBorderColor=(t,e)=>Le(e.borderColor),this.hoverColor=(t,e)=>Le(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i)}set(i,t){return yi(this,i,t)}get(i){return oe(this,i)}describe(i,t){return yi(_i,i,t)}override(i,t){return yi(It,i,t)}route(i,t,e,s){const n=oe(this,i),o=oe(this,e),a="_"+t;Object.defineProperties(n,{[a]:{value:n[t],writable:!0},[t]:{enumerable:!0,get(){const r=this[a],l=o[s];return R(r)?Object.assign({},l,r):L(r,l)},set(r){this[a]=r}}})}}({_scriptable:i=>!i.startsWith("on"),_indexable:i=>"events"!==i,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const N=Math.PI,F=2*N,Rs=F+N,ae=Number.POSITIVE_INFINITY,Es=N/180,H=N/2,$t=N/4,vi=2*N/3,rt=Math.log10,ut=Math.sign;function wi(i){const t=Math.round(i);i=Ut(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(rt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function Is(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s==0&&(t.push(s),t.push(i/s));return e===(0|e)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function Yt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Ut(i,t,e){return Math.abs(i-t)<e}function zs(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Mi(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ct(i){return i*(N/180)}function Ee(i){return i*(180/N)}function ki(i){if(!$(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Si(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*N&&(o+=F),{angle:o,distance:n}}function Ie(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function Fs(i,t){return(i-t+Rs)%F-N}function it(i){return(i%F+F)%F}function Xt(i,t,e,s){const n=it(i),o=it(t),a=it(e),r=it(o-n),l=it(a-n),h=it(n-o),c=it(n-a);return n===o||n===a||s&&o===a||r>l&&h<c}function K(i,t,e){return Math.max(t,Math.min(e,i))}function Bs(i){return K(i,-32768,32767)}function xt(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Vs(i){return!i||I(i.size)||I(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function re(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function Ws(i,t,e,s){let n=(s=s||{}).data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0;const r=e.length;let l,h,c,d,u;for(l=0;l<r;l++)if(d=e[l],null!=d&&!0!==B(d))a=re(i,n,o,a,d);else if(B(d))for(h=0,c=d.length;h<c;h++)u=d[h],null==u||B(u)||(a=re(i,n,o,a,u));i.restore();const f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete n[o[l]];o.splice(0,f)}return a}function Dt(i,t,e){const s=i.currentDevicePixelRatio,n=0!==e?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function Pi(i,t){(t=t||i.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore()}function le(i,t,e,s){let n,o,a,r,l;const h=t.pointStyle,c=t.rotation,d=t.radius;let u=(c||0)*Es;if(h&&"object"==typeof h&&(n=h.toString(),"[object HTMLImageElement]"===n||"[object HTMLCanvasElement]"===n))return i.save(),i.translate(e,s),i.rotate(u),i.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),void i.restore();if(!(isNaN(d)||d<=0)){switch(i.beginPath(),h){default:i.arc(e,s,d,0,F),i.closePath();break;case"triangle":i.moveTo(e+Math.sin(u)*d,s-Math.cos(u)*d),u+=vi,i.lineTo(e+Math.sin(u)*d,s-Math.cos(u)*d),u+=vi,i.lineTo(e+Math.sin(u)*d,s-Math.cos(u)*d),i.closePath();break;case"rectRounded":l=.516*d,r=d-l,o=Math.cos(u+$t)*r,a=Math.sin(u+$t)*r,i.arc(e-o,s-a,l,u-N,u-H),i.arc(e+a,s-o,l,u-H,u),i.arc(e+o,s+a,l,u,u+H),i.arc(e-a,s+o,l,u+H,u+N),i.closePath();break;case"rect":if(!c){r=Math.SQRT1_2*d,i.rect(e-r,s-r,2*r,2*r);break}u+=$t;case"rectRot":o=Math.cos(u)*d,a=Math.sin(u)*d,i.moveTo(e-o,s-a),i.lineTo(e+a,s-o),i.lineTo(e+o,s+a),i.lineTo(e-a,s+o),i.closePath();break;case"crossRot":u+=$t;case"cross":o=Math.cos(u)*d,a=Math.sin(u)*d,i.moveTo(e-o,s-a),i.lineTo(e+o,s+a),i.moveTo(e+a,s-o),i.lineTo(e-a,s+o);break;case"star":o=Math.cos(u)*d,a=Math.sin(u)*d,i.moveTo(e-o,s-a),i.lineTo(e+o,s+a),i.moveTo(e+a,s-o),i.lineTo(e-a,s+o),u+=$t,o=Math.cos(u)*d,a=Math.sin(u)*d,i.moveTo(e-o,s-a),i.lineTo(e+o,s+a),i.moveTo(e+a,s-o),i.lineTo(e-a,s+o);break;case"line":o=Math.cos(u)*d,a=Math.sin(u)*d,i.moveTo(e-o,s-a),i.lineTo(e+o,s+a);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(u)*d,s+Math.sin(u)*d)}i.fill(),t.borderWidth>0&&i.stroke()}}function Ct(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function he(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function ce(i){i.restore()}function Ns(i,t,e,s,n){if(!t)return i.lineTo(e.x,e.y);if("middle"===n){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else"after"===n!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function Hs(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function Ot(i,t,e,s,n,o={}){const a=B(t)?t:[t],r=o.strokeWidth>0&&""!==o.strokeColor;let l,h;for(i.save(),i.font=n.string,c=i,(d=o).translation&&c.translate(d.translation[0],d.translation[1]),I(d.rotation)||c.rotate(d.rotation),d.color&&(c.fillStyle=d.color),d.textAlign&&(c.textAlign=d.textAlign),d.textBaseline&&(c.textBaseline=d.textBaseline),l=0;l<a.length;++l)h=a[l],r&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),I(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(h,e,s,o.maxWidth)),i.fillText(h,e,s,o.maxWidth),Jo(i,e,s,h,o),s+=n.lineHeight;var c,d;i.restore()}function Jo(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,h=e+o.actualBoundingBoxDescent,c=n.strikethrough?(l+h)/2:h;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(a,c),i.lineTo(r,c),i.stroke()}}function de(i,t){const{x:e,y:s,w:n,h:o,radius:a}=t;i.arc(e+a.topLeft,s+a.topLeft,a.topLeft,-H,N,!0),i.lineTo(e,s+o-a.bottomLeft),i.arc(e+a.bottomLeft,s+o-a.bottomLeft,a.bottomLeft,N,H,!0),i.lineTo(e+n-a.bottomRight,s+o),i.arc(e+n-a.bottomRight,s+o-a.bottomRight,a.bottomRight,H,0,!0),i.lineTo(e+n,s+a.topRight),i.arc(e+n-a.topRight,s+a.topRight,a.topRight,0,-H,!0),i.lineTo(e+a.topLeft,s)}function ze(i,t,e){e=e||(a=>i[a]<t);let s,n=i.length-1,o=0;for(;n-o>1;)s=o+n>>1,e(s)?o=s:n=s;return{lo:o,hi:n}}const bt=(i,t,e)=>ze(i,e,s=>i[s][t]<e),js=(i,t,e)=>ze(i,e,s=>i[s][t]>=e);function $s(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const Ys=["push","pop","shift","splice","unshift"];function Us(i,t){i._chartjs?i._chartjs.listeners.push(t):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Ys.forEach(e=>{const s="_onData"+Re(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{"function"==typeof r[s]&&r[s](...o)}),a}})}))}function Di(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);-1!==n&&s.splice(n,1),s.length>0||(Ys.forEach(o=>{delete i[o]}),delete i._chartjs)}function Ci(i){const t=new Set;let e,s;for(e=0,s=i.length;e<s;++e)t.add(i[e]);return t.size===s?i:Array.from(t)}function Oi(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Fe(i){let t=i.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function Be(i,t,e){let s;return"string"==typeof i?(s=parseInt(i,10),-1!==i.indexOf("%")&&(s=s/100*t.parentNode[e])):s=i,s}const Ve=i=>window.getComputedStyle(i,null);function Xs(i,t){return Ve(i).getPropertyValue(t)}const Qo=["top","right","bottom","left"];function zt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Qo[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function Ai(i,t){const{canvas:e,currentDevicePixelRatio:s}=t,n=Ve(e),o="border-box"===n.boxSizing,a=zt(n,"padding"),r=zt(n,"border","width"),{x:l,y:h,box:c}=function(p,m){const x=p.native||p,b=x.touches,_=b&&b.length?b[0]:x,{offsetX:y,offsetY:v}=_;let w,M,D=!1;if(O=x.target,!(y>0||v>0)||O&&O.shadowRoot){const C=m.getBoundingClientRect();w=_.clientX-C.left,M=_.clientY-C.top,D=!0}else w=y,M=v;var O;return{x:w,y:M,box:D}}(i,e),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:g}=t;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((h-u)/g*e.height/s)}}const Ti=i=>Math.round(10*i)/10;function qs(i,t,e,s){const n=Ve(i),o=zt(n,"margin"),a=Be(n.maxWidth,i,"clientWidth")||ae,r=Be(n.maxHeight,i,"clientHeight")||ae,l=function(d,u,f){let g,p;if(void 0===u||void 0===f){const m=Fe(d);if(m){const x=m.getBoundingClientRect(),b=Ve(m),_=zt(b,"border","width"),y=zt(b,"padding");u=x.width-y.width-_.width,f=x.height-y.height-_.height,g=Be(b.maxWidth,m,"clientWidth"),p=Be(b.maxHeight,m,"clientHeight")}else u=d.clientWidth,f=d.clientHeight}return{width:u,height:f,maxWidth:g||ae,maxHeight:p||ae}}(i,t,e);let{width:h,height:c}=l;if("content-box"===n.boxSizing){const d=zt(n,"border","width"),u=zt(n,"padding");h-=u.width+d.width,c-=u.height+d.height}return h=Math.max(0,h-o.width),c=Math.max(0,s?Math.floor(h/s):c-o.height),h=Ti(Math.min(h,a,l.maxWidth)),c=Ti(Math.min(c,r,l.maxHeight)),h&&!c&&(c=Ti(h/2)),{width:h,height:c}}function Li(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=n/s,i.width=o/s;const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),(i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0)}const Ks=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}return i}();function Ri(i,t){const e=Xs(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function ue(i,t){return"native"in i?{x:i.x,y:i.y}:Ai(i,t)}function ta(i,t,e,s){const{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale;if(r&&t===r.axis&&"r"!==t&&a&&o.length){const l=r._reversePixels?js:bt;if(!s)return l(o,t,e);if(n._sharedOptions){const h=o[0],c="function"==typeof h.getRange&&h.getRange(t);if(c){const d=l(o,t,e-c),u=l(o,t,e+c);return{lo:d.lo,hi:u.hi}}}}return{lo:0,hi:o.length-1}}function Ei(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){const{index:h,data:c}=o[r],{lo:d,hi:u}=ta(o[r],t,a,n);for(let f=d;f<=u;++f){const g=c[f];g.skip||s(g,h,f)}}}function Ii(i,t,e,s){const n=[];return Ct(t,i.chartArea,i._minPadding)&&Ei(i,e,t,function(o,a,r){o.inRange(t.x,t.y,s)&&n.push({element:o,datasetIndex:a,index:r})},!0),n}function zi(i,t,e,s,n){return Ct(t,i.chartArea,i._minPadding)?"r"!==e||s?function ea(i,t,e,s,n){let o=[];const a=function(l){const h=-1!==l.indexOf("x"),c=-1!==l.indexOf("y");return function(d,u){const f=h?Math.abs(d.x-u.x):0,g=c?Math.abs(d.y-u.y):0;return Math.sqrt(Math.pow(f,2)+Math.pow(g,2))}}(e);let r=Number.POSITIVE_INFINITY;return Ei(i,e,t,function(l,h,c){const d=l.inRange(t.x,t.y,n);if(s&&!d)return;const u=l.getCenterPoint(n);if(!Ct(u,i.chartArea,i._minPadding)&&!d)return;const f=a(t,u);f<r?(o=[{element:l,datasetIndex:h,index:c}],r=f):f===r&&o.push({element:l,datasetIndex:h,index:c})}),o}(i,t,e,s,n):function(o,a,r,l){let h=[];return Ei(o,r,a,function(c,d,u){const{startAngle:f,endAngle:g}=c.getProps(["startAngle","endAngle"],l),{angle:p}=Si(c,{x:a.x,y:a.y});Xt(p,f,g)&&h.push({element:c,datasetIndex:d,index:u})}),h}(i,t,e,n):[]}function Gs(i,t,e,s){const n=ue(t,i),o=[],a=e.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(h,c){const d=h.getSortedVisibleDatasetMetas();let u,f,g;for(let p=0,m=d.length;p<m;++p){({index:u,data:f}=d[p]);for(let x=0,b=f.length;x<b;++x)g=f[x],g.skip||c(g,u,x)}}(i,(h,c,d)=>{h[r](n[a],s)&&o.push({element:h,datasetIndex:c,index:d}),h.inRange(n.x,n.y,s)&&(l=!0)}),e.intersect&&!l?[]:o}var Zs={modes:{index(i,t,e,s){const n=ue(t,i),o=e.axis||"x",a=e.intersect?Ii(i,n,o,s):zi(i,n,o,!1,s),r=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(l=>{const h=a[0].index,c=l.data[h];c&&!c.skip&&r.push({element:c,datasetIndex:l.index,index:h})}),r):[]},dataset(i,t,e,s){const n=ue(t,i),o=e.axis||"xy";let a=e.intersect?Ii(i,n,o,s):zi(i,n,o,!1,s);if(a.length>0){const r=a[0].datasetIndex,l=i.getDatasetMeta(r).data;a=[];for(let h=0;h<l.length;++h)a.push({element:l[h],datasetIndex:r,index:h})}return a},point:(i,t,e,s)=>Ii(i,ue(t,i),e.axis||"xy",s),nearest:(i,t,e,s)=>zi(i,ue(t,i),e.axis||"xy",e.intersect,s),x:(i,t,e,s)=>Gs(i,t,{axis:"x",intersect:e.intersect},s),y:(i,t,e,s)=>Gs(i,t,{axis:"y",intersect:e.intersect},s)}};const ia=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),sa=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Js(i,t){const e=(""+i).match(ia);if(!e||"normal"===e[1])return 1.2*t;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100}return t*i}function We(i,t){const e={},s=R(t),n=s?Object.keys(t):t,o=R(i)?s?a=>L(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of n)e[a]=+o(a)||0;return e}function Fi(i){return We(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Ft(i){return We(i,["topLeft","topRight","bottomLeft","bottomRight"])}function J(i){const t=Fi(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function q(i,t){let e=L((i=i||{}).size,(t=t||E.font).size);"string"==typeof e&&(e=parseInt(e,10));let s=L(i.style,t.style);s&&!(""+s).match(sa)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");const n={family:L(i.family,t.family),lineHeight:Js(L(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:L(i.weight,t.weight),string:""};return n.string=Vs(n),n}function qt(i,t,e,s){let n,o,a,r=!0;for(n=0,o=i.length;n<o;++n)if(a=i[n],void 0!==a&&(void 0!==t&&"function"==typeof a&&(a=a(t),r=!1),void 0!==e&&B(a)&&(a=a[e%a.length],r=!1),void 0!==a))return s&&!r&&(s.cacheable=!1),a}function Qs(i,t,e){const{min:s,max:n}=i,o=xi(t,(n-s)/2),a=(r,l)=>e&&0===r?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function wt(i,t){return Object.assign(Object.create(i),t)}const tn=["left","top","right","bottom"];function fe(i,t){return i.filter(e=>e.pos===t)}function en(i,t){return i.filter(e=>-1===tn.indexOf(e.pos)&&e.box.axis===t)}function ge(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function sn(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function nn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function oa(i,t,e,s){const{pos:n,box:o}=e,a=i.maxPadding;if(!R(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&nn(a,o.getPadding());const r=Math.max(0,t.outerWidth-sn(a,i,"left","right")),l=Math.max(0,t.outerHeight-sn(a,i,"top","bottom")),h=r!==i.w,c=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:h,other:c}:{same:c,other:h}}function aa(i,t){const e=t.maxPadding;return function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}(i?["left","right"]:["top","bottom"])}function pe(i,t,e,s){const n=[];let o,a,r,l,h,c;for(o=0,a=i.length,h=0;o<a;++o){r=i[o],l=r.box,l.update(r.width||t.w,r.height||t.h,aa(r.horizontal,t));const{same:d,other:u}=oa(t,e,r,s);h|=d&&n.length,c=c||u,l.fullSize||n.push(r)}return h&&pe(n,t,e,s)||c}function Ne(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function on(i,t,e,s){const n=e.padding;let{x:o,y:a}=t;for(const r of i){const l=r.box,h=s[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/h.weight||1;if(r.horizontal){const d=t.w*c,u=h.size||l.height;at(h.start)&&(a=h.start),l.fullSize?Ne(l,n.left,a,e.outerWidth-n.right-n.left,u):Ne(l,t.left+h.placed,a,d,u),h.start=a,h.placed+=d,a=l.bottom}else{const d=t.h*c,u=h.size||l.width;at(h.start)&&(o=h.start),l.fullSize?Ne(l,o,n.top,u,e.outerHeight-n.bottom-n.top):Ne(l,o,t.top+h.placed,u,d),h.start=o,h.placed+=d,o=l.right}}t.x=o,t.y=a}E.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Q={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;-1!==e&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,s){if(!i)return;const n=J(i.options.layout.padding),o=Math.max(t-n.width,0),a=Math.max(e-n.height,0),r=function(p){const m=function(D){const C=[];let k,O,A,T,S,P;for(k=0,O=(D||[]).length;k<O;++k)A=D[k],({position:T,options:{stack:S,stackWeight:P=1}}=A),C.push({index:k,box:A,pos:T,horizontal:A.isHorizontal(),weight:A.weight,stack:S&&T+S,stackWeight:P});return C}(p),x=ge(m.filter(D=>D.box.fullSize),!0),b=ge(fe(m,"left"),!0),_=ge(fe(m,"right")),y=ge(fe(m,"top"),!0),v=ge(fe(m,"bottom")),w=en(m,"x"),M=en(m,"y");return{fullSize:x,leftAndTop:b.concat(y),rightAndBottom:_.concat(M).concat(v).concat(w),chartArea:fe(m,"chartArea"),vertical:b.concat(_).concat(M),horizontal:y.concat(v).concat(w)}}(i.boxes),l=r.vertical,h=r.horizontal;z(i.boxes,p=>{"function"==typeof p.beforeLayout&&p.beforeLayout()});const c=l.reduce((p,m)=>m.box.options&&!1===m.box.options.display?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},n);nn(u,J(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=function na(i,t){const e=function(l){const h={};for(const c of l){const{stack:d,pos:u,stackWeight:f}=c;if(!d||!tn.includes(u))continue;const g=h[d]||(h[d]={count:0,placed:0,weight:0,size:0});g.count++,g.weight+=f}return h}(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t;let o,a,r;for(o=0,a=i.length;o<a;++o){r=i[o];const{fullSize:l}=r.box,h=e[r.stack],c=h&&r.stackWeight/h.weight;r.horizontal?(r.width=c?c*s:l&&t.availableWidth,r.height=n):(r.width=s,r.height=c?c*n:l&&t.availableHeight)}return e}(l.concat(h),d);pe(r.fullSize,f,d,g),pe(l,f,d,g),pe(h,f,d,g)&&pe(l,f,d,g),function(p){const m=p.maxPadding;function x(b){const _=Math.max(m[b]-p[b],0);return p[b]+=_,_}p.y+=x("top"),p.x+=x("left"),x("right"),x("bottom")}(f),on(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,on(r.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},z(r.chartArea,p=>{const m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};function He(i,t=[""],e=i,s,n=(()=>i[0])){at(s)||(s=hn("_fallback",i));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:s,_getTarget:n,override:a=>He([a,...i],t,e,s)};return new Proxy(o,{deleteProperty:(a,r)=>(delete a[r],delete a._keys,delete i[0][r],!0),get:(a,r)=>an(a,r,()=>function(l,h,c,d){let u;for(const f of h)if(u=hn(ra(f,l),c),at(u))return Vi(l,u)?Wi(c,d,l,u):u}(r,t,i,a)),getOwnPropertyDescriptor:(a,r)=>Reflect.getOwnPropertyDescriptor(a._scopes[0],r),getPrototypeOf:()=>Reflect.getPrototypeOf(i[0]),has:(a,r)=>cn(a).includes(r),ownKeys:a=>cn(a),set(a,r,l){const h=a._storage||(a._storage=n());return a[r]=h[r]=l,delete a._keys,!0}})}function Bt(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Bi(i,s),setContext:o=>Bt(i,o,e,s),override:o=>Bt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty:(o,a)=>(delete o[a],delete i[a],!0),get:(o,a,r)=>an(o,a,()=>function(l,h,c){const{_proxy:d,_context:u,_subProxy:f,_descriptors:g}=l;let p=d[h];return vt(p)&&g.isScriptable(h)&&(p=function(m,x,b,_){const{_proxy:y,_context:v,_subProxy:w,_stack:M}=b;if(M.has(m))throw new Error("Recursion detected: "+Array.from(M).join("->")+"->"+m);return M.add(m),x=x(v,w||_),M.delete(m),Vi(m,x)&&(x=Wi(y._scopes,y,m,x)),x}(h,p,l,c)),B(p)&&p.length&&(p=function(m,x,b,_){const{_proxy:y,_context:v,_subProxy:w,_descriptors:M}=b;if(at(v.index)&&_(m))x=x[v.index%x.length];else if(R(x[0])){const D=x,C=y._scopes.filter(k=>k!==D);x=[];for(const k of D){const O=Wi(C,y,m,k);x.push(Bt(O,v,w&&w[m],M))}}return x}(h,p,l,g.isIndexable)),Vi(h,p)&&(p=Bt(p,u,f&&f[h],g)),p}(o,a,r)),getOwnPropertyDescriptor:(o,a)=>o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a),getPrototypeOf:()=>Reflect.getPrototypeOf(i),has:(o,a)=>Reflect.has(i,a),ownKeys:()=>Reflect.ownKeys(i),set:(o,a,r)=>(i[a]=r,delete o[a],!0)})}function Bi(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:vt(e)?e:()=>e,isIndexable:vt(s)?s:()=>s}}const ra=(i,t)=>i?i+Re(t):t,Vi=(i,t)=>R(t)&&"adapters"!==i&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function an(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const s=e();return i[t]=s,s}function rn(i,t,e){return vt(i)?i(t,e):i}const la=(i,t)=>!0===i?t:"string"==typeof i?Pt(t,i):void 0;function ha(i,t,e,s,n){for(const o of t){const a=la(e,o);if(a){i.add(a);const r=rn(a._fallback,e,n);if(at(r)&&r!==e&&r!==s)return r}else if(!1===a&&at(s)&&e!==s)return null}return!1}function Wi(i,t,e,s){const n=t._rootScopes,o=rn(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=ln(r,a,e,o||e,s);return null!==l&&(!at(o)||o===e||(l=ln(r,a,o,l,s),null!==l))&&He(Array.from(r),[""],n,o,()=>function(h,c,d){const u=h._getTarget();c in u||(u[c]={});const f=u[c];return B(f)&&R(d)?d:f}(t,e,s))}function ln(i,t,e,s,n){for(;e;)e=ha(i,t,e,s,n);return e}function hn(i,t){for(const e of t){if(!e)continue;const s=e[i];if(at(s))return s}}function cn(i){let t=i._keys;return t||(t=i._keys=function(e){const s=new Set;for(const n of e)for(const o of Object.keys(n).filter(a=>!a.startsWith("_")))s.add(o);return Array.from(s)}(i._scopes)),t}const ca=Number.EPSILON||1e-14,Kt=(i,t)=>t<i.length&&!i[t].skip&&i[t],dn=i=>"x"===i?"y":"x";function un(i,t,e,s){const n=i.skip?t:i,o=t,a=e.skip?t:e,r=Ie(o,n),l=Ie(a,o);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=s*h,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function fn(i,t="x"){const e=dn(t),s=i.length,n=Array(s).fill(0),o=Array(s);let a,r,l,h=Kt(i,0);for(a=0;a<s;++a)if(r=l,l=h,h=Kt(i,a+1),l){if(h){const c=h[t]-l[t];n[a]=0!==c?(h[e]-l[e])/c:0}o[a]=r?h?ut(n[a-1])!==ut(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}(function(c,d,u){const f=c.length;let g,p,m,x,b,_=Kt(c,0);for(let y=0;y<f-1;++y)b=_,_=Kt(c,y+1),b&&_&&(Ut(d[y],0,ca)?u[y]=u[y+1]=0:(g=u[y]/d[y],p=u[y+1]/d[y],x=Math.pow(g,2)+Math.pow(p,2),x<=9||(m=3/Math.sqrt(x),u[y]=g*m*d[y],u[y+1]=p*m*d[y])))})(i,n,o),function(c,d,u="x"){const f=dn(u),g=c.length;let p,m,x,b=Kt(c,0);for(let _=0;_<g;++_){if(m=x,x=b,b=Kt(c,_+1),!x)continue;const y=x[u],v=x[f];m&&(p=(y-m[u])/3,x[`cp1${u}`]=y-p,x[`cp1${f}`]=v-p*d[_]),b&&(p=(b[u]-y)/3,x[`cp2${u}`]=y+p,x[`cp2${f}`]=v+p*d[_])}}(i,o,t)}function je(i,t,e){return Math.max(Math.min(i,e),t)}function gn(i,t,e,s,n){let o,a,r,l;if(t.spanGaps&&(i=i.filter(h=>!h.skip)),"monotone"===t.cubicInterpolationMode)fn(i,n);else{let h=s?i[i.length-1]:i[0];for(o=0,a=i.length;o<a;++o)r=i[o],l=un(h,r,i[Math.min(o+1,a-(s?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,h=r}t.capBezierPoints&&function(h,c){let d,u,f,g,p,m=Ct(h[0],c);for(d=0,u=h.length;d<u;++d)p=g,g=m,m=d<u-1&&Ct(h[d+1],c),g&&(f=h[d],p&&(f.cp1x=je(f.cp1x,c.left,c.right),f.cp1y=je(f.cp1y,c.top,c.bottom)),m&&(f.cp2x=je(f.cp2x,c.left,c.right),f.cp2y=je(f.cp2y,c.top,c.bottom)))}(i,e)}const $e=i=>0===i||1===i,pn=(i,t,e)=>-Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e),mn=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,Gt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>1-Math.cos(i*H),easeOutSine:i=>Math.sin(i*H),easeInOutSine:i=>-.5*(Math.cos(N*i)-1),easeInExpo:i=>0===i?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>1===i?1:1-Math.pow(2,-10*i),easeInOutExpo:i=>$e(i)?i:i<.5?.5*Math.pow(2,10*(2*i-1)):.5*(2-Math.pow(2,-10*(2*i-1))),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>$e(i)?i:pn(i,.075,.3),easeOutElastic:i=>$e(i)?i:mn(i,.075,.3),easeInOutElastic:i=>$e(i)?i:i<.5?.5*pn(2*i,.1125,.45):.5+.5*mn(2*i-1,.1125,.45),easeInBack:i=>i*i*(2.70158*i-1.70158),easeOutBack:i=>(i-=1)*i*(2.70158*i+1.70158)+1,easeInOutBack(i){let t=1.70158;return(i/=.5)<1?i*i*((1+(t*=1.525))*i-t)*.5:.5*((i-=2)*i*((1+(t*=1.525))*i+t)+2)},easeInBounce:i=>1-Gt.easeOutBounce(1-i),easeOutBounce:i=>i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375,easeInOutBounce:i=>i<.5?.5*Gt.easeInBounce(2*i):.5*Gt.easeOutBounce(2*i-1)+.5};function At(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function xn(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:"middle"===s?e<.5?i.y:t.y:"after"===s?e<1?i.y:t.y:e>0?t.y:i.y}}function bn(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=At(i,n,e),r=At(n,o,e),l=At(o,t,e),h=At(a,r,e),c=At(r,l,e);return At(h,c,e)}const _n=new Map;function Zt(i,t,e){return function(s,n){n=n||{};const o=s+JSON.stringify(n);let a=_n.get(o);return a||(a=new Intl.NumberFormat(s,n),_n.set(o,a)),a}(t,e).format(i)}function Vt(i,t,e){return i?(s=t,n=e,{x:o=>s+s+n-o,setWidth(o){n=o},textAlign:o=>"center"===o?o:"right"===o?"left":"right",xPlus:(o,a)=>o-a,leftForLtr:(o,a)=>o-a}):{x:s=>s,setWidth(s){},textAlign:s=>s,xPlus:(s,n)=>s+n,leftForLtr:(s,n)=>s};var s,n}function Ni(i,t){let e,s;"ltr"!==t&&"rtl"!==t||(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Hi(i,t){void 0!==t&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function yn(i){return"angle"===i?{between:Xt,compare:Fs,normalize:it}:{between:xt,compare:(t,e)=>t-e,normalize:t=>t}}function vn({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e==0,style:n}}function ji(i,t,e){if(!e)return[i];const{property:s,start:n,end:o}=e,a=t.length,{compare:r,between:l,normalize:h}=yn(s),{start:c,end:d,loop:u,style:f}=function(w,M,D){const{property:C,start:k,end:O}=D,{between:A,normalize:T}=yn(C),S=M.length;let P,W,{start:j,end:U,loop:G}=w;if(G){for(j+=S,U+=S,P=0,W=S;P<W&&A(T(M[j%S][C]),k,O);++P)j--,U--;j%=S,U%=S}return U<j&&(U+=S),{start:j,end:U,loop:G,style:w.style}}(i,t,e),g=[];let p,m,x,b=!1,_=null;for(let w=c,M=c;w<=d;++w)m=t[w%a],m.skip||(p=h(m[s]),p!==x&&(b=l(p,n,o),null===_&&(b||l(n,x,p)&&0!==r(n,x))&&(_=0===r(p,n)?w:M),null!==_&&(!b||0===r(o,p)||l(o,x,p))&&(g.push(vn({start:_,end:w,loop:u,count:a,style:f})),_=null),M=w,x=p));return null!==_&&g.push(vn({start:_,end:d,loop:u,count:a,style:f})),g}function $i(i,t){const e=[],s=i.segments;for(let n=0;n<s.length;n++){const o=ji(s[n],i.points,t);o.length&&e.push(...o)}return e}function wn(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:a,end:r}=function(l,h,c,d){let u=0,f=h-1;if(c&&!d)for(;u<h&&!l[u].skip;)u++;for(;u<h&&l[u].skip;)u++;for(u%=h,c&&(f+=u);f>u&&l[f%h].skip;)f--;return f%=h,{start:u,end:f}}(e,n,o,s);return function Mn(i,t,e,s){return s&&s.setContext&&e?function(n,o,a,r){const l=n._chart.getContext(),h=kn(n.options),{_datasetIndex:c,options:{spanGaps:d}}=n,u=a.length,f=[];let g=h,p=o[0].start,m=p;function x(b,_,y,v){const w=d?-1:1;if(b!==_){for(b+=u;a[b%u].skip;)b-=w;for(;a[_%u].skip;)_+=w;b%u!=_%u&&(f.push({start:b%u,end:_%u,loop:y,style:v}),g=v,p=_%u)}}for(const b of o){p=d?p:b.start;let _,y=a[p%u];for(m=p+1;m<=b.end;m++){const v=a[m%u];_=kn(r.setContext(wt(l,{type:"segment",p0:y,p1:v,p0DataIndex:(m-1)%u,p1DataIndex:m%u,datasetIndex:c}))),da(_,g)&&x(p,m-1,b.loop,g),y=v,g=_}p<m-1&&x(p,m-1,b.loop,g)}return f}(i,t,e,s):t}(i,!0===s?[{start:a,end:r,loop:o}]:function(l,h,c,d){const u=l.length,f=[];let g,p=h,m=l[h];for(g=h+1;g<=c;++g){const x=l[g%u];x.skip||x.stop?m.skip||(f.push({start:h%u,end:(g-1)%u,loop:d=!1}),h=p=x.stop?g:null):(p=g,m.skip&&(h=g)),m=x}return null!==p&&f.push({start:h%u,end:p%u,loop:d}),f}(e,a,r<a?r+n:r,!!i._fullLoop&&0===a&&r===n-1),e,t)}function kn(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function da(i,t){return t&&JSON.stringify(i)!==JSON.stringify(t)}var ua=Object.freeze({__proto__:null,easingEffects:Gt,color:mi,getHoverColor:Le,noop:mt,uid:Ps,isNullOrUndef:I,isArray:B,isObject:R,isFinite:$,finiteOrDefault:ot,valueOrDefault:L,toPercentage:Ds,toDimension:xi,callback:V,each:z,_elementsEqual:se,clone:ne,_merger:Os,merge:Ht,mergeIf:jt,_mergerIf:As,_deprecated:function(i,t,e,s){void 0!==t&&console.warn(i+': "'+e+'" is deprecated. Please use "'+s+'" instead')},resolveObjectKey:Pt,_capitalize:Re,defined:at,isFunction:vt,setsEqual:bi,_isClickEvent:Ls,toFontString:Vs,_measureText:re,_longestText:Ws,_alignPixel:Dt,clearCanvas:Pi,drawPoint:le,_isPointInArea:Ct,clipArea:he,unclipArea:ce,_steppedLineTo:Ns,_bezierCurveTo:Hs,renderText:Ot,addRoundedRectPath:de,_lookup:ze,_lookupByKey:bt,_rlookupByKey:js,_filterBetween:$s,listenArrayEvents:Us,unlistenArrayEvents:Di,_arrayUnique:Ci,_createResolver:He,_attachContext:Bt,_descriptors:Bi,splineCurve:un,splineCurveMonotone:fn,_updateBezierControlPoints:gn,_isDomSupported:Oi,_getParentNode:Fe,getStyle:Xs,getRelativePosition:Ai,getMaximumSize:qs,retinaScale:Li,supportsEventListenerOptions:Ks,readUsedSize:Ri,fontString:function(i,t,e){return t+" "+i+"px "+e},requestAnimFrame:tt,throttled:X,debounce:nt,_toLeftRightCenter:Pe,_alignStartEnd:Z,_textX:ms,_pointInLine:At,_steppedInterpolation:xn,_bezierInterpolation:bn,formatNumber:Zt,toLineHeight:Js,_readValueToProps:We,toTRBL:Fi,toTRBLCorners:Ft,toPadding:J,toFont:q,resolve:qt,_addGrace:Qs,createContext:wt,PI:N,TAU:F,PITAU:Rs,INFINITY:ae,RAD_PER_DEG:Es,HALF_PI:H,QUARTER_PI:$t,TWO_THIRDS_PI:vi,log10:rt,sign:ut,niceNum:wi,_factorize:Is,isNumber:Yt,almostEquals:Ut,almostWhole:zs,_setMinAndMaxByKey:Mi,toRadians:ct,toDegrees:Ee,_decimalPlaces:ki,getAngleFromPoint:Si,distanceBetweenPoints:Ie,_angleDiff:Fs,_normalizeAngle:it,_angleBetween:Xt,_limitValue:K,_int16Range:Bs,_isBetween:xt,getRtlAdapter:Vt,overrideTextDirection:Ni,restoreTextDirection:Hi,_boundSegment:ji,_boundSegments:$i,_computeSegments:wn});class Yi{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Sn extends Yi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fa={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Pn=i=>null===i||""===i,Dn=!!Ks&&{passive:!0};function ga(i,t,e){i.canvas.removeEventListener(t,e,Dn)}function Ye(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function pa(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Ye(r.addedNodes,s),a=a&&!Ye(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function ma(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Ye(r.removedNodes,s),a=a&&!Ye(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const me=new Map;let Cn=0;function On(){const i=window.devicePixelRatio;i!==Cn&&(Cn=i,me.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function xa(i,t,e){const s=i.canvas,n=s&&Fe(s);if(!n)return;const o=X((r,l)=>{const h=n.clientWidth;e(r,l),h<n.clientWidth&&e()},window),a=new ResizeObserver(r=>{const l=r[0],h=l.contentRect.width,c=l.contentRect.height;0===h&&0===c||o(h,c)});return a.observe(n),r=i,l=o,me.size||window.addEventListener("resize",On),me.set(r,l),a;var r,l}function Ui(i,t,e){e&&e.disconnect(),"resize"===t&&(me.delete(i),me.size||window.removeEventListener("resize",On))}function ba(i,t,e){const s=i.canvas,n=X(o=>{null!==i.ctx&&e(function(a,r){const l=fa[a.type]||a.type,{x:h,y:c}=Ai(a,r);return{type:l,chart:r,native:a,x:void 0!==h?h:null,y:void 0!==c?c:null}}(o,i))},i,o=>{const a=o[0];return[a,a.offsetX,a.offsetY]});return s.addEventListener(t,n,Dn),n}class An extends Yi{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(function(n,o){const a=n.style,r=n.getAttribute("height"),l=n.getAttribute("width");if(n.$chartjs={initial:{height:r,width:l,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",Pn(l)){const h=Ri(n,"width");void 0!==h&&(n.width=h)}if(Pn(r))if(""===n.style.height)n.height=n.width/(o||2);else{const h=Ri(n,"height");void 0!==h&&(n.height=h)}}(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const s=e.$chartjs.initial;["height","width"].forEach(o=>{const a=s[o];I(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,s){this.removeEventListener(t,e),(t.$proxies||(t.$proxies={}))[e]=({attach:pa,detach:ma,resize:xa}[e]||ba)(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];!n||(({attach:Ui,detach:Ui,resize:Ui}[e]||ga)(t,e,n),s[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return qs(t,e,s,n)}isAttached(t){const e=Fe(t);return!(!e||!e.isConnected)}}function Tn(i){return!Oi()||"undefined"!=typeof OffscreenCanvas&&i instanceof OffscreenCanvas?Sn:An}var Ln=Object.freeze({__proto__:null,_detectPlatform:Tn,BasePlatform:Yi,BasicPlatform:Sn,DomPlatform:An});const Rn="transparent",_a={boolean:(i,t,e)=>e>.5?t:i,color(i,t,e){const s=mi(i||Rn),n=s.valid&&mi(t||Rn);return n&&n.valid?n.mix(s,e).hexString():t},number:(i,t,e)=>i+(t-i)*e};class En{constructor(t,e,s,n){const o=e[s];n=qt([t.to,n,o,t.from]);const a=qt([t.from,o,n]);this._active=!0,this._fn=t.fn||_a[t.type||typeof a],this._easing=Gt[t.easing]||Gt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=qt([t.to,e,n,t.from]),this._from=qt([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<s),!this._active)return this._target[n]=r,void this._notify(!0);e<0?this._target[n]=o:(l=e/s%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}E.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const ya=Object.keys(E.animation);E.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>"onProgress"!==i&&"onComplete"!==i&&"fn"!==i}),E.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),E.describe("animations",{_fallback:"animation"}),E.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>0|i}}}});class Xi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!R(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const n=t[s];if(!R(n))return;const o={};for(const a of ya)o[a]=n[a];(B(n.properties)&&n.properties||[s]).forEach(a=>{a!==s&&e.has(a)||e.set(a,o)})})}_animateOptions(t,e){const s=e.options,n=function(a,r){if(!r)return;let l=a.options;return l?(l.$shared&&(a.options=l=Object.assign({},l,{$shared:!1,$animations:{}})),l):void(a.options=r)}(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&function(a,r){const l=[],h=Object.keys(r);for(let c=0;c<h.length;c++){const d=a[h[c]];d&&d.active()&&l.push(d.wait())}return Promise.all(l)}(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const h=a[l];if("$"===h.charAt(0))continue;if("options"===h){n.push(...this._animateOptions(t,e));continue}const c=e[h];let d=o[h];const u=s.get(h);if(d){if(u&&d.active()){d.update(u,c,r);continue}d.cancel()}u&&u.duration?(o[h]=d=new En(u,t,h,c),n.push(d)):t[h]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const s=this._createAnimations(t,e);return s.length?(pt.add(this._chart,s),!0):void 0}}function In(i,t){const e=i&&i.options||{},s=e.reverse,n=void 0===e.min?t:0,o=void 0===e.max?t:0;return{start:s?o:n,end:s?n:o}}function zn(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Fn(i,t,e,s={}){const n=i.keys,o="single"===s.mode;let a,r,l,h;if(null!==t){for(a=0,r=n.length;a<r;++a){if(l=+n[a],l===e){if(s.all)continue;break}h=i.values[l],$(h)&&(o||0===t||ut(t)===ut(h))&&(t+=h)}return t}}function Bn(i,t){const e=i&&i.options.stacked;return e||void 0===e&&void 0!==t.stack}function va(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function Vn(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function Wn(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,h=a.axis,c=`${o.id}.${a.id}.${(p=s).stack||p.type}`,d=t.length;var p;let u;for(let f=0;f<d;++f){const g=t[f],{[l]:p,[h]:m}=g;u=(g._stacks||(g._stacks={}))[h]=va(n,c,p),u[r]=m,u._top=Vn(u,a,!0,s.type),u._bottom=Vn(u,a,!1,s.type)}}function qi(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function xe(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||void 0===o[s]||void 0===o[s][e])return;delete o[s][e]}}}const Ki=i=>"reset"===i||"none"===i,Nn=(i,t)=>t?i:Object.assign({},i);class ft{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Bn(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&xe(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,g)=>"x"===d?u:"r"===d?g:f,o=e.xAxisID=L(s.xAxisID,qi(t,"x")),a=e.yAxisID=L(s.yAxisID,qi(t,"y")),r=e.rAxisID=L(s.rAxisID,qi(t,"r")),l=e.indexAxis,h=e.iAxisID=n(l,o,a,r),c=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Di(this._data,this),t._stacked&&xe(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(R(e))this._data=function(n){const o=Object.keys(n),a=new Array(o.length);let r,l,h;for(r=0,l=o.length;r<l;++r)h=o[r],a[r]={x:h,y:n[h]};return a}(e);else if(s!==e){if(s){Di(s,this);const n=this._cachedMeta;xe(n),n._parsed=[]}e&&Object.isExtensible(e)&&Us(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Bn(e.vScale,e),e.stack!==s.stack&&(n=!0,xe(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&Wn(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis;let l,h,c,d=0===t&&e===n.length||s._sorted,u=t>0&&s._parsed[t-1];if(!1===this._parsing)s._parsed=n,s._sorted=!0,c=n;else{c=B(n[t])?this.parseArrayData(s,n,t,e):R(n[t])?this.parseObjectData(s,n,t,e):this.parsePrimitiveData(s,n,t,e);const f=()=>null===h[r]||u&&h[r]<u[r];for(l=0;l<e;++l)s._parsed[l+t]=h=c[l],d&&(f()&&(d=!1),u=h);s._sorted=d}a&&Wn(this,c)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,h=o.getLabels(),c=o===a,d=new Array(n);let u,f,g;for(u=0,f=n;u<f;++u)g=u+s,d[u]={[r]:c||o.parse(h[g],g),[l]:a.parse(e[g],g)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:a}=t,r=new Array(n);let l,h,c,d;for(l=0,h=n;l<h;++l)c=l+s,d=e[c],r[l]={x:o.parse(d[0],c),y:a.parse(d[1],c)};return r}parseObjectData(t,e,s,n){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,h=new Array(n);let c,d,u,f;for(c=0,d=n;c<d;++c)u=c+s,f=e[u],h[c]={x:o.parse(Pt(f,r),u),y:a.parse(Pt(f,l),u)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const o=this._cachedMeta,a=e[t.axis];return Fn({keys:zn(this.chart,!0),values:e._stacks[t.axis]},a,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let a=null===o?NaN:o;const r=n&&s._stacks[e.axis];n&&r&&(n.values=r,a=Fn(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,a=n.length,r=this._getOtherScale(t),l=((p,m,x)=>p&&!m.hidden&&m._stacked&&{keys:zn(this.chart,!0),values:null})(e,s),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(p){const{min:m,max:x,minDefined:b,maxDefined:_}=p.getUserBounds();return{min:b?m:Number.NEGATIVE_INFINITY,max:_?x:Number.POSITIVE_INFINITY}}(r);let u,f;function g(){f=n[u];const p=f[r.axis];return!$(f[t.axis])||c>p||d<p}for(u=0;u<a&&(g()||(this.updateRangeFromParsed(h,t,f,l),!o));++u);if(o)for(u=a-1;u>=0;--u)if(!g()){this.updateRangeFromParsed(h,t,f,l);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,a;for(n=0,o=e.length;n<o;++n)a=e[n][t.axis],$(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(s){let n,o,a,r;return R(s)?(n=s.top,o=s.right,a=s.bottom,r=s.left):n=o=a=r=s,{top:n,right:o,bottom:a,left:r,disabled:!1===s}}(L(this.options.clip,function(s,n,o){if(!1===o)return!1;const a=In(s,o),r=In(n,o);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,s=this._cachedMeta,n=s.data||[],o=this.chart.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||n.length-r,h=this.options.drawActiveElementsOnTop;let c;for(s.dataset&&s.dataset.draw(t,o,r,l),c=r;c<r+l;++c){const d=n[c];d.hidden||(d.active&&h?a.push(d):d.draw(t,o))}for(c=0;c<a.length;++c)a[c].draw(t,o)}getStyle(t,e){const s=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=wt(this.getContext(),{active:!1,dataIndex:l=t,parsed:void 0,raw:void 0,element:a,index:l,mode:"default",type:"data"})),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=wt(this.chart.getContext(),{active:!1,dataset:void 0,datasetIndex:r=this.index,index:r,mode:"default",type:"dataset"})),o.dataset=n,o.index=o.datasetIndex=this.index;var r,l;return o.active=!!e,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const n="active"===e,o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&at(s);if(r)return Nn(r,l);const h=this.chart.config,c=h.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],u=h.getOptionScopes(this.getDataset(),c),f=Object.keys(E.elements[t]),g=h.resolveNamedOptions(u,f,()=>this.getContext(s,n),d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(Nn(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(!1!==n.options.animation){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,e),u=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(u,this.getContext(t,s,e))}const h=new Xi(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ki(t)||this.chart._animationsDisabled}updateElement(t,e,s,n){Ki(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Ki(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[r,l,h]of this._syncList)this[r](l,h);this._syncList=[];const n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.data,a=t+e;let r;const l=h=>{for(h.length+=e,r=h.length-1;r>=a;r--)h[r]=h[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&xe(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ft.defaults={},ft.prototype.datasetElementType=null,ft.prototype.dataElementType=null;class dt{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Yt(this.x)&&Yt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}dt.defaults={},dt.defaultRoutes=void 0;const Hn={values:i=>B(i)?i:""+i,numeric(i,t,e){if(0===i)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const h=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(h<1e-4||h>1e15)&&(n="scientific"),o=function(c,d){let u=d.length>3?d[2].value-d[1].value:d[1].value-d[0].value;return Math.abs(u)>=1&&c!==Math.floor(c)&&(u=c-Math.floor(c)),u}(i,e)}const a=rt(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Zt(i,s,l)},logarithmic(i,t,e){if(0===i)return"0";const s=i/Math.pow(10,Math.floor(rt(i)));return 1===s||2===s||5===s?Hn.numeric.call(this,i,t,e):""}};var be={formatters:Hn};function Ue(i,t,e,s,n){const o=L(s,0),a=Math.min(L(n,i.length),i.length);let r,l,h,c=0;for(e=Math.ceil(e),n&&(r=n-s,e=r/Math.floor(r/e)),h=o;h<0;)c++,h=Math.round(o+c*e);for(l=Math.max(o,0);l<a;l++)l===h&&(t.push(i[l]),c++,h=Math.round(o+c*e))}E.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:be.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),E.route("scale.ticks","color","","color"),E.route("scale.grid","color","","borderColor"),E.route("scale.grid","borderColor","","borderColor"),E.route("scale.title","color","","color"),E.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&"callback"!==i&&"parser"!==i,_indexable:i=>"borderDash"!==i&&"tickBorderDash"!==i}),E.describe("scales",{_fallback:"scale"}),E.describe("scale.ticks",{_scriptable:i=>"backdropPadding"!==i&&"callback"!==i,_indexable:i=>"backdropPadding"!==i});const jn=(i,t,e)=>"top"===t||"left"===t?i[t]+e:i[t]-e;function $n(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function Ma(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,a=i._endPixel,r=1e-6;let l,h=i.getPixelForTick(n);if(!(e&&(l=1===s?Math.max(h-o,a-h):0===t?(i.getPixelForTick(1)-h)/2:(h-i.getPixelForTick(n-1))/2,h+=n<t?l:-l,h<o-r||h>a+r)))return h}function _e(i){return i.drawTicks?i.tickLength:0}function Yn(i,t){if(!i.display)return 0;const e=q(i.font,t),s=J(i.padding);return(B(i.text)?i.text.length:1)*e.lineHeight+s.height}function ka(i,t,e){let s=Pe(i);return(e&&"right"!==t||!e&&"right"===t)&&(s="left"===(n=s)?"right":"right"===n?"left":n),s;var n}class Tt extends dt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=ot(t,Number.POSITIVE_INFINITY),e=ot(e,Number.NEGATIVE_INFINITY),s=ot(s,Number.POSITIVE_INFINITY),n=ot(n,Number.NEGATIVE_INFINITY),{min:ot(t,s),max:ot(e,n),minDefined:$(t),maxDefined:$(e)}}getMinMax(t){let e,{min:s,max:n,minDefined:o,maxDefined:a}=this.getUserBounds();if(o&&a)return{min:s,max:n};const r=this.getMatchingVisibleMetas();for(let l=0,h=r.length;l<h;++l)e=r[l].controller.getMinMax(this,t),o||(s=Math.min(s,e.min)),a||(n=Math.max(n,e.max));return s=a&&s>n?n:s,n=o&&s>n?s:n,{min:ot(s,ot(n,s)),max:ot(n,ot(s,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){V(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Qs(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?$n(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=function wa(i,t){const e=i.options.ticks,s=e.maxTicksLimit||function(c){const d=c.options.offset,u=c._tickSize();return Math.floor(Math.min(c._length/u+(d?0:1),c._maxLength/u))}(i),n=e.major.enabled?function(c){const d=[];let u,f;for(u=0,f=c.length;u<f;u++)c[u].major&&d.push(u);return d}(t):[],o=n.length,a=n[0],r=n[o-1],l=[];if(o>s)return function(c,d,u,f){let g,p=0,m=u[0];for(f=Math.ceil(f),g=0;g<c.length;g++)g===m&&(d.push(c[g]),p++,m=u[p*f])}(t,l,n,o/s),l;const h=function(c,d,u){const f=function(m){const x=m.length;let b,_;if(x<2)return!1;for(_=m[0],b=1;b<x;++b)if(m[b]-m[b-1]!==_)return!1;return _}(c),g=d.length/u;if(!f)return Math.max(g,1);const p=Is(f);for(let m=0,x=p.length-1;m<x;m++){const b=p[m];if(b>g)return b}return Math.max(g,1)}(n,t,s);if(o>0){let c,d;const u=o>1?Math.round((r-a)/(o-1)):null;for(Ue(t,l,h,I(u)?0:a-u,a),c=0,d=o-1;c<d;c++)Ue(t,l,h,n[c],n[c+1]);return Ue(t,l,h,r,I(u)?t.length:r+u),l}return Ue(t,l,h),l}(this,this.ticks),this._labelSizes=null),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,s=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,s=!s),this._startPixel=t,this._endPixel=e,this._reversePixels=s,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){V(this.options.afterUpdate,[this])}beforeSetDimensions(){V(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){V(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),V(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){V(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=V(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){V(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){V(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=this.ticks.length,n=e.minRotation||0,o=e.maxRotation;let a,r,l,h=n;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),d=c.widest.width,u=c.highest.height,f=K(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),d+6>a&&(a=f/(s-(t.offset?.5:1)),r=this.maxHeight-_e(t.grid)-e.padding-Yn(t.title,this.chart.options.font),l=Math.sqrt(d*d+u*u),h=Ee(Math.min(Math.asin(K((c.highest.height+6)/a,-1,1)),Math.asin(K(r/l,-1,1))-Math.asin(K(u/l,-1,1)))),h=Math.max(n,Math.min(o,h))),this.labelRotation=h}afterCalculateLabelRotation(){V(this.options.afterCalculateLabelRotation,[this])}beforeFit(){V(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=Yn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=_e(o)+l):(t.height=this.maxHeight,t.width=_e(o)+l),s.display&&this.ticks.length){const{first:h,last:c,widest:d,highest:u}=this._getLabelSizes(),f=2*s.padding,g=ct(this.labelRotation),p=Math.cos(g),m=Math.sin(g);r?t.height=Math.min(this.maxHeight,t.height+(s.mirror?0:m*d.width+p*u.height)+f):t.width=Math.min(this.maxWidth,t.width+(s.mirror?0:p*d.width+m*u.height)+f),this._calculatePadding(h,c,m,p)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:a},position:r}=this.options,l=0!==this.labelRotation,h="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?h?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):"start"===o?f=e.width:"end"===o?u=t.width:(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-c+a)*this.width/(this.width-c),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let c=e.height/2,d=t.height/2;"start"===o?(c=0,d=t.height):"end"===o&&(c=e.height,d=0),this.paddingTop=c+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){V(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,s;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,s=t.length;e<s;e++)I(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=$n(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length)}return t}_computeLabelSizes(t,e){const{ctx:s,_longestTextCache:n}=this,o=[],a=[];let r,l,h,c,d,u,f,g,p,m,x,b=0,_=0;for(r=0;r<e;++r){if(c=t[r].label,d=this._resolveTickFontOptions(r),s.font=u=d.string,f=n[u]=n[u]||{data:{},gc:[]},g=d.lineHeight,p=m=0,I(c)||B(c)){if(B(c))for(l=0,h=c.length;l<h;++l)x=c[l],I(x)||B(x)||(p=re(s,f.data,f.gc,p,x),m+=g)}else p=re(s,f.data,f.gc,p,c),m=g;o.push(p),a.push(m),b=Math.max(p,b),_=Math.max(m,_)}var D;D=e,z(n,C=>{const k=C.gc,O=k.length/2;let A;if(O>D){for(A=0;A<O;++A)delete C.data[k[A]];k.splice(0,O)}});const y=o.indexOf(b),v=a.indexOf(_),w=M=>({width:o[M]||0,height:a[M]||0});return{first:w(0),last:w(e-1),widest:w(y),highest:w(v),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Bs(this._alignToPixels?Dt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const s=e[t];return s.$context||(s.$context=wt(this.getContext(),{tick:s,index:t,type:"tick"}))}return this.$context||(this.$context=wt(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=ct(this.labelRotation),s=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*s>r*n?r/s:l/n:l*n<r*s?l/s:r/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:a}=n,r=o.offset,l=this.isHorizontal(),h=this.ticks.length+(r?1:0),c=_e(o),d=[],u=o.setContext(this.getContext()),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(S){return Dt(s,S,f)};let m,x,b,_,y,v,w,M,D,C,k,O;if("top"===a)m=p(this.bottom),v=this.bottom-c,M=m-g,C=p(t.top)+g,O=t.bottom;else if("bottom"===a)m=p(this.top),C=t.top,O=p(t.bottom)-g,v=m+g,M=this.top+c;else if("left"===a)m=p(this.right),y=this.right-c,w=m-g,D=p(t.left)+g,k=t.right;else if("right"===a)m=p(this.left),D=t.left,k=p(t.right)-g,y=m+g,w=this.left+c;else if("x"===e){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(R(a)){const S=Object.keys(a)[0];m=p(this.chart.scales[S].getPixelForValue(a[S]))}C=t.top,O=t.bottom,v=m+g,M=v+c}else if("y"===e){if("center"===a)m=p((t.left+t.right)/2);else if(R(a)){const S=Object.keys(a)[0];m=p(this.chart.scales[S].getPixelForValue(a[S]))}y=m-g,w=y-c,D=t.left,k=t.right}const A=L(n.ticks.maxTicksLimit,h),T=Math.max(1,Math.ceil(h/A));for(x=0;x<h;x+=T){const S=o.setContext(this.getContext(x)),P=S.lineWidth,W=S.color,j=o.borderDash||[],U=S.borderDashOffset,G=S.tickWidth,lt=S.tickColor,et=S.tickBorderDash||[],gt=S.tickBorderDashOffset;b=Ma(this,x,r),void 0!==b&&(_=Dt(s,b,P),l?y=w=D=k=_:v=M=C=O=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:D,y1:C,x2:k,y2:O,width:P,color:W,borderDash:j,borderDashOffset:U,tickWidth:G,tickColor:lt,tickBorderDash:et,tickBorderDashOffset:gt}))}return this._ticksLength=h,this._borderValue=m,d}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:h,padding:c,mirror:d}=o,u=_e(s.grid),f=u+c,g=d?-c:f,p=-ct(this.labelRotation),m=[];let x,b,_,y,v,w,M,D,C,k,O,A,T="middle";if("top"===n)w=this.bottom-g,M=this._getXAxisLabelAlignment();else if("bottom"===n)w=this.top+g,M=this._getXAxisLabelAlignment();else if("left"===n){const P=this._getYAxisLabelAlignment(u);M=P.textAlign,v=P.x}else if("right"===n){const P=this._getYAxisLabelAlignment(u);M=P.textAlign,v=P.x}else if("x"===e){if("center"===n)w=(t.top+t.bottom)/2+f;else if(R(n)){const P=Object.keys(n)[0];w=this.chart.scales[P].getPixelForValue(n[P])+f}M=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)v=(t.left+t.right)/2-f;else if(R(n)){const P=Object.keys(n)[0];v=this.chart.scales[P].getPixelForValue(n[P])}M=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===l?T="top":"end"===l&&(T="bottom"));const S=this._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const P=o.setContext(this.getContext(x));D=this.getPixelForTick(x)+o.labelOffset,C=this._resolveTickFontOptions(x),k=C.lineHeight,O=B(y)?y.length:1;const W=O/2,j=P.color,U=P.textStrokeColor,G=P.textStrokeWidth;let lt;if(a?(v=D,A="top"===n?"near"===h||0!==p?-O*k+k/2:"center"===h?-S.highest.height/2-W*k+k:k/2-S.highest.height:"near"===h||0!==p?k/2:"center"===h?S.highest.height/2-W*k:S.highest.height-O*k,d&&(A*=-1)):(w=D,A=(1-O)*k/2),P.showLabelBackdrop){const et=J(P.backdropPadding),gt=S.heights[x],kt=S.widths[x];let Nt=w+A-et.top,St=v-et.left;switch(T){case"middle":Nt-=gt/2;break;case"bottom":Nt-=gt}switch(M){case"center":St-=kt/2;break;case"right":St-=kt}lt={left:St,top:Nt,width:kt+et.width,height:gt+et.height,color:P.backdropColor}}m.push({rotation:p,label:y,font:C,color:j,strokeColor:U,strokeWidth:G,textOffset:A,textAlign:M,textBaseline:T,translation:[v,w],backdrop:lt})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ct(this.labelRotation))return"top"===t?"left":"right";let s="center";return"start"===e.align?s="left":"end"===e.align&&(s="right"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=t+o,r=this._getLabelSizes().widest.width;let l,h;return"left"===e?n?(h=this.right+o,"near"===s?l="left":"center"===s?(l="center",h+=r/2):(l="right",h+=r)):(h=this.right-a,"near"===s?l="right":"center"===s?(l="center",h-=r/2):(l="left",h=this.left)):"right"===e?n?(h=this.left+o,"near"===s?l="right":"center"===s?(l="center",h-=r/2):(l="left",h-=r)):(h=this.left+a,"near"===s?l="left":"center"===s?(l="center",h+=r/2):(l="right",h=this.right)):l="right",{textAlign:l,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(n=>n.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,h,c)=>{c.width&&c.color&&(s.save(),s.lineWidth=c.width,s.strokeStyle=c.color,s.setLineDash(c.borderDash||[]),s.lineDashOffset=c.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(h.x,h.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o<a;++o){const l=n[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:s}}=this,n=s.setContext(this.getContext()),o=s.drawBorder?n.borderWidth:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,h,c,d;this.isHorizontal()?(l=Dt(t,this.left,o)-o/2,h=Dt(t,this.right,a)+a/2,c=d=r):(c=Dt(t,this.top,o)-o/2,d=Dt(t,this.bottom,a)+a/2,l=h=r),e.save(),e.lineWidth=n.borderWidth,e.strokeStyle=n.borderColor,e.beginPath(),e.moveTo(l,c),e.lineTo(h,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,s=this._computeLabelArea();s&&he(e,s);const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));let o,a;for(o=0,a=n.length;o<a;++o){const r=n[o],l=r.font,h=r.label;r.backdrop&&(e.fillStyle=r.backdrop.color,e.fillRect(r.backdrop.left,r.backdrop.top,r.backdrop.width,r.backdrop.height)),Ot(e,h,0,r.textOffset,l,r)}s&&ce(e)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=q(s.font),a=J(s.padding),r=s.align;let l=o.lineHeight/2;"bottom"===e||"center"===e||R(e)?(l+=a.bottom,B(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=a.top;const{titleX:h,titleY:c,maxWidth:d,rotation:u}=function(f,g,p,m){const{top:x,left:b,bottom:_,right:y,chart:v}=f,{chartArea:w,scales:M}=v;let D,C,k,O=0;const A=_-x,T=y-b;if(f.isHorizontal()){if(C=Z(m,b,y),R(p)){const S=Object.keys(p)[0];k=M[S].getPixelForValue(p[S])+A-g}else k="center"===p?(w.bottom+w.top)/2+A-g:jn(f,p,g);D=y-b}else{if(R(p)){const S=Object.keys(p)[0];C=M[S].getPixelForValue(p[S])-T+g}else C="center"===p?(w.left+w.right)/2-T+g:jn(f,p,g);k=Z(m,_,x),O="left"===p?-H:H}return{titleX:C,titleY:k,maxWidth:D,rotation:O}}(this,l,e,r);Ot(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:ka(r,e,n),textBaseline:"middle",translation:[h,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,s=L(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===Tt.prototype.draw?[{z:s,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:s+1,draw:()=>{this.drawBorder()}},{z:e,draw:n=>{this.drawLabels(n)}}]:[{z:e,draw:n=>{this.draw(n)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[s]!==this.id||t&&r.type!==t||n.push(r)}return n}_resolveTickFontOptions(t){return q(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Xe{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let s;var r;"id"in(r=e)&&"defaults"in r&&(s=this.register(e));const n=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,function(r,l,h){const c=Ht(Object.create(null),[h?E.get(h):{},E.get(l),r.defaults]);var d,u;E.set(l,c),r.defaultRoutes&&(d=l,u=r.defaultRoutes,Object.keys(u).forEach(f=>{const g=f.split("."),p=g.pop(),m=[d].concat(g).join("."),x=u[f].split("."),b=x.pop(),_=x.join(".");E.route(m,p,_,b)})),r.descriptors&&E.describe(l,r.descriptors)}(t,a,s),this.override&&E.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in E[n]&&(delete E[n][s],this.override&&delete It[s])}}var _t=new class{constructor(){this.controllers=new Xe(ft,"datasets",!0),this.elements=new Xe(dt,"elements"),this.plugins=new Xe(Object,"plugins"),this.scales=new Xe(Tt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,t,e){[...t].forEach(s=>{const n=e||this._getRegistryForType(s);e||n.isForType(s)||n===this.plugins&&s.id?this._exec(i,n,s):z(s,o=>{const a=e||this._getRegistryForType(o);this._exec(i,a,o)})})}_exec(i,t,e){const s=Re(i);V(e["before"+s],[],e),t[i](e),V(e["after"+s],[],e)}_getRegistryForType(i){for(let t=0;t<this._typedRegistries.length;t++){const e=this._typedRegistries[t];if(e.isForType(i))return e}return this.plugins}_get(i,t,e){const s=t.get(i);if(void 0===s)throw new Error('"'+i+'" is not a registered '+e+".");return s}};class Sa{constructor(){this._init=[]}notify(t,e,s,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return"afterDestroy"===e&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,s,n){n=n||{};for(const o of t){const a=o.plugin;if(!1===V(a[s],[e,n,o.options],a)&&n.cancelable)return!1}return!0}invalidate(){I(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const s=t&&t.config,n=L(s.options&&s.options.plugins,{}),o=function(a){const r=[],l=Object.keys(_t.plugins.items);for(let c=0;c<l.length;c++)r.push(_t.getPlugin(l[c]));const h=a.plugins||[];for(let c=0;c<h.length;c++){const d=h[c];-1===r.indexOf(d)&&r.push(d)}return r}(s);return!1!==n||e?function(a,r,l,h){const c=[],d=a.getContext();for(let u=0;u<r.length;u++){const f=r[u],g=Pa(l[f.id],h);null!==g&&c.push({plugin:f,options:Da(a.config,f,g,d)})}return c}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Pa(i,t){return t||!1!==i?!0===i?{}:i:null}function Da(i,t,e,s){const n=i.pluginScopeKeys(t),o=i.getOptionScopes(e,n);return i.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Gi(i,t){return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||(E.datasets[i]||{}).indexAxis||"x"}function Zi(i,t){return"x"===i||"y"===i?i:t.axis||("top"===(e=t.position)||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0)||i.charAt(0).toLowerCase();var e}function Un(i){const t=i.options||(i.options={});t.plugins=L(t.plugins,{}),t.scales=function(e,s){const n=It[e.type]||{scales:{}},o=s.scales||{},a=Gi(e.type,s),r=Object.create(null),l=Object.create(null);return Object.keys(o).forEach(h=>{const c=o[h];if(!R(c))return console.error(`Invalid scale configuration for scale: ${h}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${h}`);const d=Zi(h,c),u=d===a?"_index_":"_value_",f=n.scales||{};r[d]=r[d]||h,l[h]=jt(Object.create(null),[{axis:d},c,f[d],f[u]])}),e.data.datasets.forEach(h=>{const c=h.type||e.type,d=h.indexAxis||Gi(c,s),u=(It[c]||{}).scales||{};Object.keys(u).forEach(f=>{const g=function(m,x){let b=m;return"_index_"===m?b=x:"_value_"===m&&(b="x"===x?"y":"x"),b}(f,d),p=h[g+"AxisID"]||r[g]||g;l[p]=l[p]||Object.create(null),jt(l[p],[{axis:g},o[p],u[f]])})}),Object.keys(l).forEach(h=>{const c=l[h];jt(c,[E.scales[c.type],E.scale])}),l}(i,t)}function Xn(i){return(i=i||{}).datasets=i.datasets||[],i.labels=i.labels||[],i}const qn=new Map,Kn=new Set;function qe(i,t){let e=qn.get(i);return e||(e=t(),qn.set(i,e),Kn.add(e)),e}const ye=(i,t,e)=>{const s=Pt(t,e);void 0!==s&&i.add(s)};class Ca{constructor(t){var e;this._config=((e=(e=t)||{}).data=Xn(e.data),Un(e),e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Xn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Un(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return qe(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return qe(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return qe(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return qe(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return n&&!e||(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;const l=new Set;e.forEach(c=>{t&&(l.add(t),c.forEach(d=>ye(l,t,d))),c.forEach(d=>ye(l,n,d)),c.forEach(d=>ye(l,It[o]||{},d)),c.forEach(d=>ye(l,E,d)),c.forEach(d=>ye(l,_i,d))});const h=Array.from(l);return 0===h.length&&h.push(Object.create(null)),Kn.has(e)&&a.set(e,h),h}chartOptionScopes(){const{options:t,type:e}=this;return[t,It[e]||{},E.datasets[e]||{},{type:e},E,_i]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Gn(this._resolverCache,t,n);let l=a;(function(h,c){const{isScriptable:d,isIndexable:u}=Bi(h);for(const f of c){const g=d(f),p=u(f),m=(p||g)&&h[f];if(g&&(vt(m)||Oa(m))||p&&B(m))return!0}return!1})(a,e)&&(o.$shared=!1,l=Bt(a,s=vt(s)?s():s,this.createResolver(t,s,r)));for(const h of e)o[h]=l[h];return o}createResolver(t,e,s=[""],n){const{resolver:o}=Gn(this._resolverCache,t,s);return R(e)?Bt(o,e,void 0,n):o}}function Gn(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:He(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const Oa=i=>R(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||vt(i[e]),!1),Aa=["top","bottom","left","right","chartArea"];function Zn(i,t){return"top"===i||"bottom"===i||-1===Aa.indexOf(i)&&"x"===t}function Jn(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Qn(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),V(e&&e.onComplete,[i],t)}function Ta(i){const t=i.chart,e=t.options.animation;V(e&&e.onProgress,[i],t)}function to(i){return Oi()&&"string"==typeof i?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const Ke={},eo=i=>{const t=to(i);return Object.values(Ke).filter(e=>e.canvas===t).pop()};function La(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}class Y{constructor(t,e){const s=this.config=new Ca(e),n=to(t),o=eo(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Tn(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,h=l&&l.height,c=l&&l.width;this.id=Ps(),this.ctx=r,this.canvas=l,this.width=c,this.height=h,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Sa,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=nt(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Ke[this.id]=this,r&&l?(pt.listen(this,"complete",Qn),pt.listen(this,"progress",Ta),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return I(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Li(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Pi(this.canvas,this.ctx),this}stop(){return pt.stop(this),this}resize(t,e){pt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,a=this.platform.getMaximumSize(this.canvas,t,e,s.maintainAspectRatio&&this.aspectRatio),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Li(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),V(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){z(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=Zi(a,r),h="r"===l,c="x"===l;return{options:r,dposition:h?"chartArea":c?"bottom":"left",dtype:h?"radialLinear":c?"category":"linear"}}))),z(o,a=>{const r=a.options,l=r.id,h=Zi(l,r),c=L(r.type,a.dtype);void 0!==r.position&&Zn(r.position,h)===Zn(a.dposition)||(r.position=a.dposition),n[l]=!0;let d=null;l in s&&s[l].type===c?d=s[l]:(d=new(_t.getScale(c))({id:l,type:c,ctx:this.ctx,chart:this}),s[d.id]=d),d.init(r,t)}),z(n,(a,r)=>{a||delete s[r]}),z(s,a=>{Q.configure(this,a,a.options),Q.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(Jn("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{0===e.filter(o=>o===s._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let a=this.getDatasetMeta(s);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(s),a=this.getDatasetMeta(s)),a.type=r,a.indexAxis=o.indexAxis||Gi(r,this.options),a.order=o.order||0,a.index=s,a.label=""+o.label,a.visible=this.isDatasetVisible(s),a.controller)a.controller.updateIndex(s),a.controller.linkScales();else{const l=_t.getController(r),{datasetElementType:h,dataElementType:c}=E.datasets[r];Object.assign(l.prototype,{dataElementType:_t.getElement(c),datasetElementType:h&&_t.getElement(h)}),a.controller=new l(this,s),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){z(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let h=0,c=this.data.datasets.length;h<c;h++){const{controller:d}=this.getDatasetMeta(h),u=!n&&-1===o.indexOf(d);d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=s.layout.autoPadding?a:0,this._updateLayout(a),n||z(o,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Jn("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){z(this.scales,t=>{Q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);bi(e,s)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e)La(t,n,"_removeElements"===s?-o:o)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!bi(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Q.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],z(this.boxes,n=>{s&&"chartArea"===n.position||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,vt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(pt.has(this)?this.attached&&!pt.running(this)&&pt.start(this):(this.draw(),Qn({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resize(s,n),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const a=e[n];t&&!a.visible||s.push(a)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s=t._clip,n=!s.disabled,o=this.chartArea,a={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",a)&&(n&&he(e,{left:!1===s.left?0:o.left-s.left,right:!1===s.right?this.width:o.right+s.right,top:!1===s.top?0:o.top-s.top,bottom:!1===s.bottom?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&ce(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}getElementsAtEventForMode(t,e,s,n){const o=Zs.modes[e];return"function"==typeof o?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=wt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return"boolean"==typeof s.hidden?!s.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);at(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),pt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Pi(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete Ke[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};z(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,h)=>{e.addEventListener(this,l,h),t[l]=h},n=(l,h)=>{t[l]&&(e.removeEventListener(this,l,h),delete t[l])},o=(l,h)=>{this.canvas&&this.resize(l,h)};let a;const r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){z(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},z(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,a,r,l;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const h=a&&this.getDatasetMeta(a.datasetIndex).controller;h&&h[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map(({datasetIndex:n,index:o})=>{const a=this.getDatasetMeta(n);if(!a)throw new Error("No dataset found at index "+n);return{datasetIndex:n,element:a.data[o],index:o}});!se(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,h)=>l.filter(c=>!h.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:Ct(t,this.chartArea,this._minPadding)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",s,n))return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=this._getActiveElements(t,n,s,e),l=Ls(t),h=(d=t,s&&"mouseout"!==d.type?l?this._lastEvent:d:null);var d;s&&(this._lastEvent=null,V(o.onHover,[t,r,this],this),l&&V(o.onClick,[t,r,this],this));const c=!se(r,n);return(c||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=h,c}_getActiveElements(t,e,s,n){if("mouseout"===t.type)return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}const io=()=>z(Y.instances,i=>i._plugins.invalidate()),Lt=!0;function Wt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(Y,{defaults:{enumerable:Lt,value:E},instances:{enumerable:Lt,value:Ke},overrides:{enumerable:Lt,value:It},registry:{enumerable:Lt,value:_t},version:{enumerable:Lt,value:"3.7.1"},getChart:{enumerable:Lt,value:eo},register:{enumerable:Lt,value:(...i)=>{_t.add(...i),io()}},unregister:{enumerable:Lt,value:(...i)=>{_t.remove(...i),io()}}});class Ji{constructor(t){this.options=t||{}}formats(){return Wt()}parse(t,e){return Wt()}format(t,e){return Wt()}add(t,e,s){return Wt()}diff(t,e,s){return Wt()}startOf(t,e,s){return Wt()}endOf(t,e){return Wt()}}Ji.override=function(i){Object.assign(Ji.prototype,i)};var so={_date:Ji};function Ra(i){const t=i.iScale,e=function(h,c){if(!h._cache.$bar){const d=h.getMatchingVisibleMetas(c);let u=[];for(let f=0,g=d.length;f<g;f++)u=u.concat(d[f].controller.getAllParsedValues(h));h._cache.$bar=Ci(u.sort((f,g)=>f-g))}return h._cache.$bar}(t,i.type);let s,n,o,a,r=t._length;const l=()=>{32767!==o&&-32768!==o&&(at(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=e.length;s<n;++s)o=t.getPixelForValue(e[s]),l();for(a=void 0,s=0,n=t.ticks.length;s<n;++s)o=t.getPixelForTick(s),l();return r}function no(i,t,e,s){return B(i)?function(n,o,a,r){const l=a.parse(n[0],r),h=a.parse(n[1],r),c=Math.min(l,h),d=Math.max(l,h);let u=c,f=d;Math.abs(c)>Math.abs(d)&&(u=d,f=c),o[a.axis]=f,o._custom={barStart:u,barEnd:f,start:l,end:h,min:c,max:d}}(i,t,e,s):t[e.axis]=e.parse(i,s),t}function oo(i,t,e,s){const n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[];let h,c,d,u;for(h=e,c=e+s;h<c;++h)u=t[h],d={},d[n.axis]=r||n.parse(a[h],h),l.push(no(u,d,o,h));return l}function Qi(i){return i&&void 0!==i.barStart&&void 0!==i.barEnd}function Ea(i,t,e,s){let n=t.borderSkipped;const o={};if(!n)return void(i.borderSkipped=o);const{start:a,end:r,reverse:l,top:h,bottom:c}=function(d){let u,f,g,p,m;return d.horizontal?(u=d.base>d.x,f="left",g="right"):(u=d.base<d.y,f="bottom",g="top"),u?(p="end",m="start"):(p="start",m="end"),{start:f,end:g,reverse:u,top:p,bottom:m}}(i);"middle"===n&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=h:(e._bottom||0)===s?n=c:(o[ao(c,a,r,l)]=!0,n=h)),o[ao(n,a,r,l)]=!0,i.borderSkipped=o}function ao(i,t,e,s){var n,o,a;return s?(a=e,i=ro(i=(n=i)===(o=t)?a:n===a?o:n,e,t)):i=ro(i,t,e),i}function ro(i,t,e){return"start"===i?t:"end"===i?e:i}function Ia(i,{inflateAmount:t},e){i.inflateAmount="auto"===t?1===e?.33:0:t}class Ge extends ft{parsePrimitiveData(t,e,s,n){return oo(t,e,s,n)}parseArrayData(t,e,s,n){return oo(t,e,s,n)}parseObjectData(t,e,s,n){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,h="x"===o.axis?r:l,c="x"===a.axis?r:l,d=[];let u,f,g,p;for(u=s,f=s+n;u<f;++u)p=e[u],g={},g[o.axis]=o.parse(Pt(p,h),u),d.push(no(Pt(p,c),g,a,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:s,vScale:n}=e,o=this.getParsed(t),a=o._custom,r=Qi(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,n){const o="reset"===n,{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),h=r.isHorizontal(),c=this._getRuler(),d=this.resolveDataElementOptions(e,n),u=this.getSharedOptions(d),f=this.includeOptions(n,u);this.updateSharedOptions(u,n,d);for(let g=e;g<e+s;g++){const p=this.getParsed(g),m=o||I(p[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(g),x=this._calculateBarIndexPixels(g,c),b=(p._stacks||{})[r.axis],_={horizontal:h,base:m.base,enableBorderRadius:!b||Qi(p._custom)||a===b._top||a===b._bottom,x:h?m.head:x.center,y:h?x.center:m.head,height:h?x.size:Math.abs(m.size),width:h?Math.abs(m.size):x.size};f&&(_.options=u||this.resolveDataElementOptions(g,t[g].active?"active":n));const y=_.options||t[g].options;Ea(_,y,b,a),Ia(_,y,c.ratio),this.updateElement(t[g],g,_,n)}}_getStacks(t,e){const s=this._cachedMeta.iScale,n=s.getMatchingVisibleMetas(this._type),o=s.options.stacked,a=n.length,r=[];let l,h;for(l=0;l<a;++l)if(h=n[l],h.controller.options.grouped){if(void 0!==e){const c=h.controller.getParsed(e)[h.controller._cachedMeta.vScale.axis];if(I(c)||isNaN(c))continue}if((!1===o||-1===r.indexOf(h.stack)||void 0===o&&void 0===h.stack)&&r.push(h.stack),h.index===t)break}return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o<a;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const r=t.barThickness;return{min:r||Ra(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s},options:{base:n,minBarLength:o}}=this,a=n||0,r=this.getParsed(t),l=r._custom,h=Qi(l);let c,d,u=r[e.axis],f=0,g=s?this.applyStack(e,r,s):u;g!==u&&(f=g-u,g=u),h&&(u=l.barStart,g=l.barEnd-l.barStart,0!==u&&ut(u)!==ut(l.barEnd)&&(f=0),f+=u);const p=I(n)||h?f:n;let m=e.getPixelForValue(p);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(f+g):m,d=c-m,Math.abs(d)<o&&(b=e,_=a,d=(0!==(x=d)?ut(x):(b.isHorizontal()?1:-1)*(b.min>=_?1:-1))*o,u===a&&(m-=d/2),c=m+d),m===e.getPixelForValue(a)){const x=ut(d)*e.getLineWidthForValue(a)/2;m+=x,d-=x}var x,b,_;return{size:d,base:m,head:c,center:c+d/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,a=L(n.maxBarThickness,1/0);let r,l;if(e.grouped){const h=o?this._getStackCount(t):e.stackCount,c="flex"===n.barThickness?function(u,f,g,p){const m=f.pixels,x=m[u];let b=u>0?m[u-1]:null,_=u<m.length-1?m[u+1]:null;const y=g.categoryPercentage;null===b&&(b=x-(null===_?f.end-f.start:_-x)),null===_&&(_=x+x-b);const v=x-(x-Math.min(b,_))/2*y;return{chunk:Math.abs(_-b)/2*y/p,ratio:g.barPercentage,start:v}}(t,e,n,h):function(u,f,g,p){const m=g.barThickness;let x,b;return I(m)?(x=f.min*g.categoryPercentage,b=g.barPercentage):(x=m*p,b=1),{chunk:x/p,ratio:b,start:f.pixels[u]-x/2}}(t,e,n,h),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=c.start+c.chunk*d+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else r=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,s=t.data,n=s.length;let o=0;for(;o<n;++o)null!==this.getParsed(o)[e.axis]&&s[o].draw(this._ctx)}}Ge.id="bar",Ge.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Ge.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Ze extends ft{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,s,n){const o=super.parsePrimitiveData(t,e,s,n);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+s).radius;return o}parseArrayData(t,e,s,n){const o=super.parseArrayData(t,e,s,n);for(let a=0;a<o.length;a++)o[a]._custom=L(e[s+a][2],this.resolveDataElementOptions(a+s).radius);return o}parseObjectData(t,e,s,n){const o=super.parseObjectData(t,e,s,n);for(let a=0;a<o.length;a++){const r=e[s+a];o[a]._custom=L(r&&r.r&&+r.r,this.resolveDataElementOptions(a+s).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let s=t.length-1;s>=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),l=o._custom;return{label:e.label,value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){const o="reset"===n,{iScale:a,vScale:r}=this._cachedMeta,l=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(l),c=this.includeOptions(n,h),d=a.axis,u=r.axis;for(let f=e;f<e+s;f++){const g=t[f],p=!o&&this.getParsed(f),m={},x=m[d]=o?a.getPixelForDecimal(.5):a.getPixelForValue(p[d]),b=m[u]=o?r.getBasePixel():r.getPixelForValue(p[u]);m.skip=isNaN(x)||isNaN(b),c&&(m.options=this.resolveDataElementOptions(f,g.active?"active":n),o&&(m.options.radius=0)),this.updateElement(g,f,m,n)}this.updateSharedOptions(h,n,l)}resolveDataElementOptions(t,e){const s=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=L(s&&s._custom,o),n}}Ze.id="bubble",Ze.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Ze.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class Jt extends ft{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const s=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=s;else{let o,a,r=l=>+s[l];if(R(s[t])){const{key:l="value"}=this._parsing;r=h=>+Pt(s[h],l)}for(o=t,a=t+e;o<a;++o)n._parsed[o]=r(o)}}_getRotation(){return ct(this.options.rotation-90)}_getCircumference(){return ct(this.options.circumference)}_getRotationExtents(){let t=F,e=-F;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)){const n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),a=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:s}=e,n=this._cachedMeta,o=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(s.width,s.height)-a)/2,0),l=Math.min(Ds(this.options.cutout,r),1),h=this._getRingWeight(this.index),{circumference:c,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=function(v,w,M){let D=1,C=1,k=0,O=0;if(w<F){const A=v,T=A+w,S=Math.cos(A),P=Math.sin(A),W=Math.cos(T),j=Math.sin(T),U=(Nt,St,Se)=>Xt(Nt,A,T,!0)?1:Math.max(St,St*M,Se,Se*M),G=(Nt,St,Se)=>Xt(Nt,A,T,!0)?-1:Math.min(St,St*M,Se,Se*M),lt=U(0,S,W),et=U(H,P,j),gt=G(N,S,W),kt=G(N+H,P,j);D=(lt-gt)/2,C=(et-kt)/2,k=-(lt+gt)/2,O=-(et+kt)/2}return{ratioX:D,ratioY:C,offsetX:k,offsetY:O}}(d,c,l),b=Math.max(Math.min((s.width-a)/u,(s.height-a)/f)/2,0),_=xi(this.options.radius,b),y=(_-Math.max(_*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=p*_,n.total=this.calculateTotal(),this.outerRadius=_-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*h,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/F)}updateElements(t,e,s,n){const o="reset"===n,a=this.chart,r=a.chartArea,h=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=o&&a.options.animation.animateScale,u=d?0:this.innerRadius,f=d?0:this.outerRadius,g=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(g),m=this.includeOptions(n,p);let x,b=this._getRotation();for(x=0;x<e;++x)b+=this._circumference(x,o);for(x=e;x<e+s;++x){const _=this._circumference(x,o),y=t[x],v={x:h+this.offsetX,y:c+this.offsetY,startAngle:b,endAngle:b+_,circumference:_,outerRadius:f,innerRadius:u};m&&(v.options=p||this.resolveDataElementOptions(x,y.active?"active":n)),b+=_,this.updateElement(y,x,v,n)}this.updateSharedOptions(p,n,g)}calculateTotal(){const t=this._cachedMeta,e=t.data;let s,n=0;for(s=0;s<e.length;s++){const o=t._parsed[s];null===o||isNaN(o)||!this.chart.getDataVisibility(s)||e[s].hidden||(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){const s=this.chart,n=s.data.labels||[],o=Zt(this._cachedMeta._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,a,r,l;if(!t)for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){a=s.getDatasetMeta(n),t=a.data,r=a.controller;break}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=r.resolveDataElementOptions(n),"inner"!==l.borderAlign&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){const o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(L(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Jt.id="doughnut",Jt.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},Jt.descriptors={_scriptable:i=>"spacing"!==i,_indexable:i=>"spacing"!==i},Jt.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){const t=i.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{const o=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title:()=>"",label(i){let t=i.label;const e=": "+i.formattedValue;return B(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};class ve extends ft{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=function(c,d,u){const f=d.length;let g=0,p=f;if(c._sorted){const{iScale:m,_parsed:x}=c,b=m.axis,{min:_,max:y,minDefined:v,maxDefined:w}=m.getUserBounds();v&&(g=K(Math.min(bt(x,m.axis,_).lo,u?f:bt(d,b,m.getPixelForValue(_)).lo),0,f-1)),p=w?K(Math.max(bt(x,m.axis,y).hi+1,u?0:bt(d,b,m.getPixelForValue(y)).hi+1),g,f)-g:f-g}return{start:g,count:p}}(e,n,a);this._drawStart=r,this._drawCount=l,function(c){const{xScale:d,yScale:u,_scaleRanges:f}=c,g={xmin:d.min,xmax:d.max,ymin:u.min,ymax:u.max};if(!f)return c._scaleRanges=g,!0;const p=f.xmin!==d.min||f.xmax!==d.max||f.ymin!==u.min||f.ymax!==u.max;return Object.assign(f,g),p}(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:h},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){const o="reset"===n,{iScale:a,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(c),u=this.includeOptions(n,d),f=a.axis,g=r.axis,{spanGaps:p,segment:m}=this.options,x=Yt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===n;let _=e>0&&this.getParsed(e-1);for(let y=e;y<e+s;++y){const v=t[y],w=this.getParsed(y),M=b?v:{},D=I(w[g]),C=M[f]=a.getPixelForValue(w[f],y),k=M[g]=o||D?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,w,l):w[g],y);M.skip=isNaN(C)||isNaN(k)||D,M.stop=y>0&&w[f]-_[f]>x,m&&(M.parsed=w,M.raw=h.data[y]),u&&(M.options=d||this.resolveDataElementOptions(y,v.active?"active":n)),b||this.updateElement(v,y,M,n),_=w}this.updateSharedOptions(d,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ve.id="line",ve.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},ve.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Je extends ft{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const s=this.chart,n=s.data.labels||[],o=Zt(this._cachedMeta._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=(o-Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,s,n){const o="reset"===n,a=this.chart,r=this.getDataset(),l=a.options.animation,h=this._cachedMeta.rScale,c=h.xCenter,d=h.yCenter,u=h.getIndexAngle(0)-.5*N;let f,g=u;const p=360/this.countVisibleElements();for(f=0;f<e;++f)g+=this._computeAngle(f,n,p);for(f=e;f<e+s;f++){const m=t[f];let x=g,b=g+this._computeAngle(f,n,p),_=a.getDataVisibility(f)?h.getDistanceFromCenterForValue(r.data[f]):0;g=b,o&&(l.animateScale&&(_=0),l.animateRotate&&(x=b=u));const y={x:c,y:d,innerRadius:0,outerRadius:_,startAngle:x,endAngle:b,options:this.resolveDataElementOptions(f,m.active?"active":n)};this.updateElement(m,f,y,n)}}countVisibleElements(){const t=this.getDataset();let s=0;return this._cachedMeta.data.forEach((n,o)=>{!isNaN(t.data[o])&&this.chart.getDataVisibility(o)&&s++}),s}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?ct(this.resolveDataElementOptions(t,e).angle||s):0}}Je.id="polarArea",Je.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Je.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){const t=i.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{const o=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title:()=>"",label:i=>i.chart.data.labels[i.dataIndex]+": "+i.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class ts extends Jt{}ts.id="pie",ts.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Qe extends ft{getLabelAndValue(t){const e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}update(t){const e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,"resize"!==t){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0),this.updateElement(s,void 0,{_loop:!0,_fullLoop:o.length===n.length,options:a},t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){const o=this.getDataset(),a=this._cachedMeta.rScale,r="reset"===n;for(let l=e;l<e+s;l++){const h=t[l],c=this.resolveDataElementOptions(l,h.active?"active":n),d=a.getPointPositionForValue(l,o.data[l]),u=r?a.xCenter:d.x,f=r?a.yCenter:d.y,g={x:u,y:f,angle:d.angle,skip:isNaN(u)||isNaN(f),options:c};this.updateElement(h,l,g,n)}}}Qe.id="radar",Qe.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Qe.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class ti extends ve{}ti.id="scatter",ti.defaults={showLine:!1,fill:!1},ti.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:i=>"("+i.label+", "+i.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var lo=Object.freeze({__proto__:null,BarController:Ge,BubbleController:Ze,DoughnutController:Jt,LineController:ve,PolarAreaController:Je,PieController:ts,RadarController:Qe,ScatterController:ti});function ho(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t;let h=n/r;i.beginPath(),i.arc(o,a,r,s-h,e+h),l>n?(h=n/l,i.arc(o,a,l,e+h,s-h,!0)):i.arc(o,a,n,e+H,s-H),i.closePath(),i.clip()}function Qt(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function es(i,t,e,s,n){const{x:o,y:a,startAngle:r,pixelMargin:l,innerRadius:h}=t,c=Math.max(t.outerRadius+s+e-l,0),d=h>0?h+s+e+l:0;let u=0;const f=n-r;if(s){const P=((h>0?h-s:0)+(c>0?c-s:0))/2;u=(f-(0!==P?f*P/(P+s):f))/2}const g=(f-Math.max(.001,f*c-e/N)/c)/2,p=r+g+u,m=n-g-u,{outerStart:x,outerEnd:b,innerStart:_,innerEnd:y}=function za(i,t,e,s){const n=We(i.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{const h=(e-Math.min(o,l))*s/2;return K(l,0,Math.min(o,h))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:K(n.innerStart,0,a),innerEnd:K(n.innerEnd,0,a)}}(t,d,c,m-p),v=c-x,w=c-b,M=p+x/v,D=m-b/w,C=d+_,k=d+y,O=p+_/C,A=m-y/k;if(i.beginPath(),i.arc(o,a,c,M,D),b>0){const P=Qt(w,D,o,a);i.arc(P.x,P.y,b,D,m+H)}const T=Qt(k,m,o,a);if(i.lineTo(T.x,T.y),y>0){const P=Qt(k,A,o,a);i.arc(P.x,P.y,y,m+H,A+Math.PI)}if(i.arc(o,a,d,m-y/d,p+_/d,!0),_>0){const P=Qt(C,O,o,a);i.arc(P.x,P.y,_,O+Math.PI,p-H)}const S=Qt(v,p,o,a);if(i.lineTo(S.x,S.y),x>0){const P=Qt(v,M,o,a);i.arc(P.x,P.y,x,p-H,M)}i.closePath()}class ei extends dt{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.getProps(["x","y"],s),{angle:o,distance:a}=Si(n,{x:t,y:e}),{startAngle:r,endAngle:l,innerRadius:h,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=this.options.spacing/2,f=L(d,l-r)>=F||Xt(o,r,l),g=xt(a,h+u,c+u);return f&&g}getCenterPoint(t){const{x:e,y:s,startAngle:n,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:h}=this.options,c=(n+o)/2,d=(a+r+h+l)/2;return{x:e+Math.cos(c)*d,y:s+Math.sin(c)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:s}=this,n=(e.offset||0)/2,o=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=s>F?Math.floor(s/F):0,0===s||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(n){a=n/2;const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*a,Math.sin(l)*a),this.circumference>=N&&(a=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function Fa(i,t,e,s,n){const{options:o}=t,{borderWidth:a,borderJoinStyle:r}=o,l="inner"===o.borderAlign;a&&(l?(i.lineWidth=2*a,i.lineJoin=r||"round"):(i.lineWidth=a,i.lineJoin=r||"bevel"),t.fullCircles&&function(h,c,d){const{x:u,y:f,startAngle:g,pixelMargin:p,fullCircles:m}=c,x=Math.max(c.outerRadius-p,0),b=c.innerRadius+p;let _;for(d&&ho(h,c,g+F),h.beginPath(),h.arc(u,f,b,g+F,g,!0),_=0;_<m;++_)h.stroke();for(h.beginPath(),h.arc(u,f,x,g,g+F),_=0;_<m;++_)h.stroke()}(i,t,l),l&&ho(i,t,n),es(i,t,e,s,n),i.stroke())}(t,this,a,o,function(l,h,c,d){const{fullCircles:u,startAngle:f,circumference:g}=h;let p=h.endAngle;if(u){es(l,h,c,d,f+F);for(let m=0;m<u;++m)l.fill();isNaN(g)||(p=f+g%F,g%F==0&&(p+=F))}return es(l,h,c,d,p),l.fill(),p}(t,this,a,o)),t.restore()}}function co(i,t,e=t){i.lineCap=L(e.borderCapStyle,t.borderCapStyle),i.setLineDash(L(e.borderDash,t.borderDash)),i.lineDashOffset=L(e.borderDashOffset,t.borderDashOffset),i.lineJoin=L(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=L(e.borderWidth,t.borderWidth),i.strokeStyle=L(e.borderColor,t.borderColor)}function Ba(i,t,e){i.lineTo(e.x,e.y)}function uo(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),h=Math.min(o,r);return{count:s,start:l,loop:t.loop,ilen:h<l&&!(n<a&&o<a||n>r&&o>r)?s+h-l:h-l}}function Va(i,t,e,s){const{points:n,options:o}=t,{count:a,start:r,loop:l,ilen:h}=uo(n,e,s),c=(m=o).stepped?Ns:m.tension||"monotone"===m.cubicInterpolationMode?Hs:Ba;var m;let d,u,f,{move:g=!0,reverse:p}=s||{};for(d=0;d<=h;++d)u=n[(r+(p?h-d:d))%a],u.skip||(g?(i.moveTo(u.x,u.y),g=!1):c(i,f,u,p,o.stepped),f=u);return l&&(u=n[(r+(p?h:0))%a],c(i,f,u,p,o.stepped)),!!l}function Wa(i,t,e,s){const n=t.points,{count:o,start:a,ilen:r}=uo(n,e,s),{move:l=!0,reverse:h}=s||{};let c,d,u,f,g,p,m=0,x=0;const b=y=>(a+(h?r-y:y))%o,_=()=>{f!==g&&(i.lineTo(m,g),i.lineTo(m,f),i.lineTo(m,p))};for(l&&(d=n[b(0)],i.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[b(c)],d.skip)continue;const y=d.x,v=d.y,w=0|y;w===u?(v<f?f=v:v>g&&(g=v),m=(x*m+y)/++x):(_(),i.lineTo(y,v),u=w,x=0,f=g=v),p=v}_()}function is(i){const t=i.options;return i._decimated||i._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||t.borderDash&&t.borderDash.length?Va:Wa}ei.id="arc",ei.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},ei.defaultRoutes={backgroundColor:"backgroundColor"};const Na="function"==typeof Path2D;class Rt extends dt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;!s.tension&&"monotone"!==s.cubicInterpolationMode||s.stepped||this._pointsUpdated||(gn(this._points,s,t,s.spanGaps?this._loop:this._fullLoop,e),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=wn(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,s=t.length;return s&&this.points[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,a=$i(this,{property:e,start:n,end:n});if(!a.length)return;const r=[],l=(d=s).stepped?xn:d.tension||"monotone"===d.cubicInterpolationMode?bn:At;var d;let h,c;for(h=0,c=a.length;h<c;++h){const{start:d,end:u}=a[h],f=o[d],g=o[u];if(f===g){r.push(f);continue}const p=l(f,g,Math.abs((n-f[e])/(g[e]-f[e])),s.stepped);p[e]=t[e],r.push(p)}return 1===r.length?r[0]:r}pathSegment(t,e,s){return is(this)(t,this,e,s)}path(t,e,s){const n=this.segments,o=is(this);let a=this._loop;e=e||0,s=s||this.points.length-e;for(const r of n)a&=o(t,this,r,{start:e,end:e+s-1});return!!a}draw(t,e,s,n){(this.points||[]).length&&(this.options||{}).borderWidth&&(t.save(),function Ha(i,t,e,s){Na&&!t.options.segment?function(n,o,a,r){let l=o._path;l||(l=o._path=new Path2D,o.path(l,a,r)&&l.closePath()),co(n,o.options),n.stroke(l)}(i,t,e,s):function(n,o,a,r){const{segments:l,options:h}=o,c=is(o);for(const d of l)co(n,h,d.style),n.beginPath(),c(n,o,d,{start:a,end:a+r-1})&&n.closePath(),n.stroke()}(i,t,e,s)}(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function fo(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}Rt.id="line",Rt.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Rt.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Rt.descriptors={_scriptable:!0,_indexable:i=>"borderDash"!==i&&"fill"!==i};class ii extends dt{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.options,{x:o,y:a}=this.getProps(["x","y"],s);return Math.pow(t-o,2)+Math.pow(e-a,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return fo(this,t,"x",e)}inYRange(t,e){return fo(this,t,"y",e)}getCenterPoint(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const s=this.options;this.skip||s.radius<.1||!Ct(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,le(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function go(i,t){const{x:e,y:s,base:n,width:o,height:a}=i.getProps(["x","y","base","width","height"],t);let r,l,h,c,d;return i.horizontal?(d=a/2,r=Math.min(e,n),l=Math.max(e,n),h=s-d,c=s+d):(d=o/2,r=e-d,l=e+d,h=Math.min(s,n),c=Math.max(s,n)),{left:r,top:h,right:l,bottom:c}}function Et(i,t,e,s){return i?0:K(t,e,s)}function ss(i,t,e,s){const n=null===t,o=null===e,a=i&&!(n&&o)&&go(i,s);return a&&(n||xt(t,a.left,a.right))&&(o||xt(e,a.top,a.bottom))}function $a(i,t){i.rect(t.x,t.y,t.w,t.h)}function ns(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0;return{x:i.x+s,y:i.y+n,w:i.w+((i.x+i.w!==e.x+e.w?t:0)-s),h:i.h+((i.y+i.h!==e.y+e.h?t:0)-n),radius:i.radius}}ii.id="point",ii.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},ii.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class si extends dt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:a}=function ja(i){const t=go(i),e=t.right-t.left,s=t.bottom-t.top,n=function(a,r,l){const c=a.borderSkipped,d=Fi(a.options.borderWidth);return{t:Et(c.top,d.top,0,l),r:Et(c.right,d.right,0,r),b:Et(c.bottom,d.bottom,0,l),l:Et(c.left,d.left,0,r)}}(i,e/2,s/2),o=function(a,r,l){const{enableBorderRadius:h}=a.getProps(["enableBorderRadius"]),c=a.options.borderRadius,d=Ft(c),u=Math.min(r,l),f=a.borderSkipped,g=h||R(c);return{topLeft:Et(!g||f.top||f.left,d.topLeft,0,u),topRight:Et(!g||f.top||f.right,d.topRight,0,u),bottomLeft:Et(!g||f.bottom||f.left,d.bottomLeft,0,u),bottomRight:Et(!g||f.bottom||f.right,d.bottomRight,0,u)}}(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}(this),r=(l=a.radius).topLeft||l.topRight||l.bottomLeft||l.bottomRight?de:$a;var l;t.save(),a.w===o.w&&a.h===o.h||(t.beginPath(),r(t,ns(a,e,o)),t.clip(),r(t,ns(o,-e,a)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),r(t,ns(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return ss(this,t,e,s)}inXRange(t,e){return ss(this,t,null,e)}inYRange(t,e){return ss(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}si.id="bar",si.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},si.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var os=Object.freeze({__proto__:null,ArcElement:ei,LineElement:Rt,PointElement:ii,BarElement:si});function po(i){if(i._decimated){const t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{value:t})}}function mo(i){i.data.datasets.forEach(t=>{po(t)})}var Ya={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled)return void mo(i);const s=i.width;i.data.datasets.forEach((n,o)=>{const{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),h=a||n.data;if("y"===qt([r,i.options.indexAxis])||"line"!==l.type)return;const c=i.scales[l.xAxisID];if("linear"!==c.type&&"time"!==c.type||i.options.parsing)return;let f,{start:d,count:u}=function(g,p){const m=p.length;let x,b=0;const{iScale:_}=g,{min:y,max:v,minDefined:w,maxDefined:M}=_.getUserBounds();return w&&(b=K(bt(p,_.axis,y).lo,0,m-1)),x=M?K(bt(p,_.axis,v).hi+1,b,m)-b:m-b,{start:b,count:x}}(l,h);if(u<=(e.threshold||4*s))po(n);else{switch(I(a)&&(n._data=h,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}})),e.algorithm){case"lttb":f=function(g,p,m,x,b){const _=b.samples||x;if(_>=m)return g.slice(p,p+m);const y=[],v=(m-2)/(_-2);let w=0;const M=p+m-1;let D,C,k,O,A,T=p;for(y[w++]=g[T],D=0;D<_-2;D++){let S,P=0,W=0;const j=Math.floor((D+1)*v)+1+p,U=Math.min(Math.floor((D+2)*v)+1,m)+p,G=U-j;for(S=j;S<U;S++)P+=g[S].x,W+=g[S].y;P/=G,W/=G;const lt=Math.floor(D*v)+1+p,et=Math.min(Math.floor((D+1)*v)+1,m)+p,{x:gt,y:kt}=g[T];for(k=O=-1,S=lt;S<et;S++)O=.5*Math.abs((gt-P)*(g[S].y-kt)-(gt-g[S].x)*(W-kt)),O>k&&(k=O,C=g[S],A=S);y[w++]=C,T=A}return y[w++]=g[M],y}(h,d,u,s,e);break;case"min-max":f=function(g,p,m,x){let b,_,y,v,w,M,D,C,k,O,A=0,T=0;const S=[],W=g[p].x,j=g[p+m-1].x-W;for(b=p;b<p+m;++b){_=g[b],y=(_.x-W)/j*x,v=_.y;const U=0|y;if(U===w)v<k?(k=v,M=b):v>O&&(O=v,D=b),A=(T*A+_.x)/++T;else{const G=b-1;if(!I(M)&&!I(D)){const lt=Math.min(M,D),et=Math.max(M,D);lt!==C&&lt!==G&&S.push(ps(ci({},g[lt]),{x:A})),et!==C&&et!==G&&S.push(ps(ci({},g[et]),{x:A}))}b>0&&G!==C&&S.push(g[G]),S.push(_),w=U,T=0,k=O=v,M=D=C=b}}return S}(h,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=f}})},destroy(i){mo(i)}};function Ua(i,t,e){const s=function(o){const a=o.options,r=a.fill;let l=L(r&&r.target,r);return void 0===l&&(l=!!a.backgroundColor),!1!==l&&null!==l&&(!0===l?"origin":l)}(i);if(R(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return $(n)&&Math.floor(n)===n?("-"!==s[0]&&"+"!==s[0]||(n=t+n),!(n===t||n<0||n>=e)&&n):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}class xo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,s){const{x:n,y:o,radius:a}=this;return t.arc(n,o,a,(e=e||{start:0,end:F}).end,e.start,!0),!s.bounds}interpolate(t){const{x:e,y:s,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:s+Math.sin(o)*n,angle:o}}}function as(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function qa(i,t,e){const s=[];for(let n=0;n<e.length;n++){const o=e[n],{first:a,last:r,point:l}=Ka(o,t,"x");if(!(!l||a&&r))if(a)s.unshift(l);else if(i.push(l),!r)break}i.push(...s)}function Ka(i,t,e){const s=i.interpolate(t,e);if(!s)return{};const n=s[e],o=i.segments,a=i.points;let r=!1,l=!1;for(let h=0;h<o.length;h++){const c=o[h],d=a[c.start][e],u=a[c.end][e];if(xt(n,d,u)){r=n===d,l=n===u;break}}return{first:r,last:l,point:s}}function bo(i,t){let e=[],s=!1;return B(i)?(s=!0,e=i):e=function(n,o){const{x:a=null,y:r=null}=n||{},l=o.points,h=[];return o.segments.forEach(({start:c,end:d})=>{d=as(c,d,l);const u=l[c],f=l[d];null!==r?(h.push({x:u.x,y:r}),h.push({x:f.x,y:r})):null!==a&&(h.push({x:a,y:u.y}),h.push({x:a,y:f.y}))}),h}(i,t),e.length?new Rt({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Za(i,t,e){let s=i[t].fill;const n=[t];let o;if(!e)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!$(s))return s;if(o=i[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function _o(i,t,e){const{segments:s,points:n}=t;let o=!0,a=!1;i.beginPath();for(const r of s){const{start:l,end:h}=r,c=n[l],d=n[as(l,h,n)];o?(i.moveTo(c.x,c.y),o=!1):(i.lineTo(c.x,e),i.lineTo(c.x,c.y)),a=!!t.pathSegment(i,r,{move:a}),a?i.closePath():i.lineTo(d.x,e)}i.lineTo(t.first().x,e),i.closePath(),i.clip()}function rs(i,t,e,s){if(s)return;let n=t[i],o=e[i];return"angle"===i&&(n=it(n),o=it(o)),{property:i,start:n,end:o}}function yo(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function Ja(i,t,e){const{top:s,bottom:n}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};"x"===o&&(i.beginPath(),i.rect(a,s,r-a,n-s),i.clip())}function vo(i,t,e,s){const n=t.interpolate(e,s);n&&i.lineTo(n.x,n.y)}function wo(i,t){const{line:e,target:s,property:n,color:o,scale:a}=t,r=function(l,h,c){const d=l.segments,u=l.points,f=h.points,g=[];for(const p of d){let{start:m,end:x}=p;x=as(m,x,u);const b=rs(c,u[m],u[x],p.loop);if(!h.segments){g.push({source:p,target:b,start:u[m],end:u[x]});continue}const _=$i(h,b);for(const y of _){const v=rs(c,f[y.start],f[y.end],y.loop),w=ji(p,u,v);for(const M of w)g.push({source:M,target:y,start:{[c]:yo(b,v,"start",Math.max)},end:{[c]:yo(b,v,"end",Math.min)}})}}return g}(e,s,n);for(const{source:l,target:h,start:c,end:d}of r){const{style:{backgroundColor:u=o}={}}=l,f=!0!==s;i.save(),i.fillStyle=u,Ja(i,a,f&&rs(n,c,d)),i.beginPath();const g=!!e.pathSegment(i,l);let p;if(f){g?i.closePath():vo(i,s,d,n);const m=!!s.pathSegment(i,h,{move:g,reverse:!0});p=g&&m,p||vo(i,s,c,n)}i.closePath(),i.fill(p?"evenodd":"nonzero"),i.restore()}}function ls(i,t,e){const s=function Ga(i){const{chart:t,fill:e,line:s}=i;if($(e))return function(o,a){const r=o.getDatasetMeta(a);return r&&o.isDatasetVisible(a)?r.dataset:null}(t,e);if("stack"===e)return function(o){const{scale:a,index:r,line:l}=o,h=[],c=l.segments,d=l.points,u=function(f,g){const p=[],m=f.getMatchingVisibleMetas("line");for(let x=0;x<m.length;x++){const b=m[x];if(b.index===g)break;b.hidden||p.unshift(b.dataset)}return p}(a,r);u.push(bo({x:null,y:a.bottom},l));for(let f=0;f<c.length;f++){const g=c[f];for(let p=g.start;p<=g.end;p++)qa(h,d[p],u)}return new Rt({points:h,options:{}})}(i);if("shape"===e)return!0;const n=function Xa(i){return(i.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:s}=t,n=e.options,o=e.getLabels().length,a=[],r=n.reverse?e.max:e.min;let h,c,d;if(d="start"===s?r:"end"===s?n.reverse?e.min:e.max:R(s)?s.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,r),new xo({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(d)});for(h=0;h<o;++h)a.push(e.getPointPositionForValue(h,d));return a}(i):function(t){const{scale:e={},fill:s}=t;let n,o=null;return"start"===s?o=e.bottom:"end"===s?o=e.top:R(s)?o=e.getPixelForValue(s.value):e.getBasePixel&&(o=e.getBasePixel()),$(o)?(n=e.isHorizontal(),{x:n?o:null,y:n?null:o}):null}(i)}(i);return n instanceof xo?n:bo(n,s)}(t),{line:n,scale:o,axis:a}=t,r=n.options,l=r.fill,h=r.backgroundColor,{above:c=h,below:d=h}=l||{};s&&n.points.length&&(he(i,e),function(u,f){const{line:g,target:p,above:m,below:x,area:b,scale:_}=f,y=g._loop?"angle":f.axis;u.save(),"x"===y&&x!==m&&(_o(u,p,b.top),wo(u,{line:g,target:p,color:m,scale:_,property:y}),u.restore(),u.save(),_o(u,p,b.bottom)),wo(u,{line:g,target:p,color:x,scale:_,property:y}),u.restore()}(i,{line:n,target:s,above:c,below:d,area:e,scale:o,axis:a}),ce(i))}var Qa={id:"filler",afterDatasetsUpdate(i,t,e){const s=(i.data.datasets||[]).length,n=[];let o,a,r,l;for(a=0;a<s;++a)o=i.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Rt&&(l={visible:i.isDatasetVisible(a),index:a,fill:Ua(r,a,s),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,n.push(l);for(a=0;a<s;++a)l=n[a],l&&!1!==l.fill&&(l.fill=Za(n,a,e.propagate))},beforeDraw(i,t,e){const s="beforeDraw"===e.drawTime,n=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let a=n.length-1;a>=0;--a){const r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&ls(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if("beforeDatasetsDraw"!==e.drawTime)return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;o&&ls(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;s&&!1!==s.fill&&"beforeDatasetDraw"===e.drawTime&&ls(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Mo=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}};class ko extends dt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=V(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const s=t.labels,n=q(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Mo(s,o);let h,c;e.font=n.string,this.isHorizontal()?(h=this.maxWidth,c=this._fitRows(a,o,r,l)+10):(c=this.maxHeight,h=this._fitCols(a,o,r,l)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],h=this.lineWidths=[0],c=n+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-c;return this.legendItems.forEach((g,p)=>{const m=s+e/2+o.measureText(g.text).width;(0===p||h[h.length-1]+m+2*r>a)&&(d+=c,h[h.length-(p>0?0:1)]=0,f+=c,u++),l[p]={left:0,top:f,row:u,width:m,height:n},h[h.length-1]+=m+r}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],h=this.columnSizes=[],c=a-t;let d=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,x)=>{const b=s+e/2+o.measureText(m.text).width;x>0&&f+n+2*r>c&&(d+=u+r,h.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[x]={left:g,top:f,col:p,width:b,height:n},u=Math.max(u,b),f+=n+r}),d+=u,h.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=Vt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=Z(s,this.left+n,this.right-this.lineWidths[r]);for(const h of e)r!==h.row&&(r=h.row,l=Z(s,this.left+n,this.right-this.lineWidths[r])),h.top+=this.top+t+n,h.left=a.leftForLtr(a.x(l),h.width),l+=h.width+n}else{let r=0,l=Z(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const h of e)h.col!==r&&(r=h.col,l=Z(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),h.top=l,h.left+=this.left+n,h.left=a.leftForLtr(a.x(h.left),h.width),l+=h.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;he(t,this),this._draw(),ce(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=E.color,l=Vt(t.rtl,this.left,this.width),h=q(a.font),{color:c,padding:d}=a,u=h.size,f=u/2;let g;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=h.string;const{boxWidth:p,boxHeight:m,itemHeight:x}=Mo(a,u),b=this.isHorizontal(),_=this._computeTitleHeight();g=b?{x:Z(o,this.left+d,this.right-s[0]),y:this.top+d+_,line:0}:{x:this.left+d,y:Z(o,this.top+_+d,this.bottom-e[0].height),line:0},Ni(this.ctx,t.textDirection);const y=x+d;this.legendItems.forEach((v,w)=>{n.strokeStyle=v.fontColor||c,n.fillStyle=v.fontColor||c;const M=n.measureText(v.text).width,D=l.textAlign(v.textAlign||(v.textAlign=a.textAlign)),C=p+f+M;let k=g.x,O=g.y;var A,S;l.setWidth(this.width),b?w>0&&k+C+d>this.right&&(O=g.y+=y,g.line++,k=g.x=Z(o,this.left+d,this.right-s[g.line])):w>0&&O+y>this.bottom&&(k=g.x=k+e[g.line].width+d,g.line++,O=g.y=Z(o,this.top+_+d,this.bottom-e[g.line].height)),function(A,T,S){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;n.save();const P=L(S.lineWidth,1);if(n.fillStyle=L(S.fillStyle,r),n.lineCap=L(S.lineCap,"butt"),n.lineDashOffset=L(S.lineDashOffset,0),n.lineJoin=L(S.lineJoin,"miter"),n.lineWidth=P,n.strokeStyle=L(S.strokeStyle,r),n.setLineDash(L(S.lineDash,[])),a.usePointStyle){const W={radius:p*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:P},j=l.xPlus(A,p/2);le(n,W,j,T+f)}else{const W=T+Math.max((u-m)/2,0),j=l.leftForLtr(A,p),U=Ft(S.borderRadius);n.beginPath(),Object.values(U).some(G=>0!==G)?de(n,{x:j,y:W,w:p,h:m,radius:U}):n.rect(j,W,p,m),n.fill(),0!==P&&n.stroke()}n.restore()}(l.x(k),O,v),k=ms(D,k+p+f,b?k+C:this.right,t.rtl),A=l.x(k),Ot(n,(S=v).text,A,O+x/2,h,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)}),b?g.x+=C+d:g.y+=y}),Hi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=q(e.font),n=J(e.padding);if(!e.display)return;const o=Vt(t.rtl,this.left,this.width),a=this.ctx,r=e.position,h=n.top+s.size/2;let c,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+h,d=Z(t.align,d,this.right-u);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);c=h+Z(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=Z(r,d,d+u);a.textAlign=o.textAlign(Pe(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,Ot(a,e.text,f,c,s)}_computeTitleHeight(){const t=this.options.title,e=q(t.font),s=J(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(xt(t,this.left,this.right)&&xt(e,this.top,this.bottom))for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],xt(t,n.left,n.left+n.width)&&xt(e,n.top,n.top+n.height))return this.legendItems[s];return null}handleEvent(t){const e=this.options;if(r=e,!("mousemove"===(a=t.type)&&(r.onHover||r.onLeave)||r.onClick&&("click"===a||"mouseup"===a)))return;var a,r;const s=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=this._hoveredItem,r=(o=s,null!==(n=a)&&null!==o&&n.datasetIndex===o.datasetIndex&&n.index===o.index);a&&!r&&V(e.onLeave,[t,a,this],this),this._hoveredItem=s,s&&!r&&V(e.onHover,[t,s,this],this)}else s&&V(e.onClick,[t,s,this],this);var n,o}}var tr={id:"legend",_element:ko,start(i,t,e){const s=i.legend=new ko({ctx:i.ctx,options:e,chart:i});Q.configure(i,s,e),Q.addBox(i,s)},stop(i){Q.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;Q.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o}}=i.legend.options;return i._getSortedDatasetMetas().map(a=>{const r=a.controller.getStyle(e?0:void 0),l=J(r.borderWidth);return{text:t[a.index].label,fillStyle:r.backgroundColor,fontColor:o,hidden:!a.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:r.borderColor,pointStyle:s||r.pointStyle,rotation:r.rotation,textAlign:n||r.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class hs extends dt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=B(s.text)?s.text.length:1;this._padding=J(s.padding);const o=n*q(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align;let l,h,c,d=0;return this.isHorizontal()?(h=Z(r,s,o),c=e+t,l=o-s):("left"===a.position?(h=s+t,c=Z(r,n,e),d=-.5*N):(h=o-t,c=Z(r,e,n),d=.5*N),l=n-e),{titleX:h,titleY:c,maxWidth:l,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=q(e.font),n=s.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:r,rotation:l}=this._drawArgs(n);Ot(t,e.text,0,0,s,{color:e.color,maxWidth:r,rotation:l,textAlign:Pe(e.align),textBaseline:"middle",translation:[o,a]})}}var er={id:"title",_element:hs,start(i,t,e){!function(s,n){const o=new hs({ctx:s.ctx,options:n,chart:s});Q.configure(s,o,n),Q.addBox(s,o),s.titleBlock=o}(i,e)},stop(i){Q.removeBox(i,i.titleBlock),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;Q.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ni=new WeakMap;var ir={id:"subtitle",start(i,t,e){const s=new hs({ctx:i.ctx,options:e,chart:i});Q.configure(i,s,e),Q.addBox(i,s),ni.set(i,s)},stop(i){Q.removeBox(i,ni.get(i)),ni.delete(i)},beforeUpdate(i,t,e){const s=ni.get(i);Q.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const we={average(i){if(!i.length)return!1;let t,e,s=0,n=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const r=a.tooltipPosition();s+=r.x,n+=r.y,++o}}return{x:s/o,y:n/o}},nearest(i,t){if(!i.length)return!1;let e,s,n,o=t.x,a=t.y,r=Number.POSITIVE_INFINITY;for(e=0,s=i.length;e<s;++e){const l=i[e].element;if(l&&l.hasValue()){const h=Ie(t,l.getCenterPoint());h<r&&(r=h,n=l)}}if(n){const l=n.tooltipPosition();o=l.x,a=l.y}return{x:o,y:a}}};function yt(i,t){return t&&(B(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function Mt(i){return("string"==typeof i||i instanceof String)&&i.indexOf("\n")>-1?i.split("\n"):i}function sr(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function So(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=q(t.bodyFont),h=q(t.titleFont),c=q(t.footerFont),d=o.length,u=n.length,f=s.length,g=J(t.padding);let p=g.height,m=0,x=s.reduce((y,v)=>y+v.before.length+v.lines.length+v.after.length,0);x+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*h.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x&&(p+=f*(t.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*t.bodySpacing),u&&(p+=t.footerMarginTop+u*c.lineHeight+(u-1)*t.footerSpacing);let b=0;const _=function(y){m=Math.max(m,e.measureText(y).width+b)};return e.save(),e.font=h.string,z(i.title,_),e.font=l.string,z(i.beforeBody.concat(i.afterBody),_),b=t.displayColors?a+2+t.boxPadding:0,z(s,y=>{z(y.before,_),z(y.lines,_),z(y.after,_)}),b=0,e.font=c.string,z(i.footer,_),e.restore(),m+=g.width,{width:m,height:p}}function nr(i,t,e,s){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let h="center";return"center"===s?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),function(c,d,u,f){const{x:g,width:p}=f,m=u.caretSize+u.caretPadding;return"left"===c&&g+p+m>d.width||"right"===c&&g-p-m<0||void 0}(h,i,t,e)&&(h="center"),h}function Po(i,t,e){const s=e.yAlign||t.yAlign||function(n,o){const{y:a,height:r}=o;return a<r/2?"top":a>n.height-r/2?"bottom":"center"}(i,e);return{xAlign:e.xAlign||t.xAlign||nr(i,t,e,s),yAlign:s}}function Do(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Ft(a);let g=function(m,x){let{x:b,width:_}=m;return"right"===x?b-=_:"center"===x&&(b-=_/2),b}(t,r);const p=function(m,x,b){let{y:_,height:y}=m;return"top"===x?_+=b:_-="bottom"===x?y+b:y/2,_}(t,l,h);return"center"===l?"left"===r?g+=h:"right"===r&&(g-=h):"left"===r?g-=Math.max(c,u)+n:"right"===r&&(g+=Math.max(d,f)+n),{x:K(g,0,s.width-t.width),y:K(p,0,s.height-t.height)}}function oi(i,t,e){const s=J(e.padding);return"center"===t?i.x+i.width/2:"right"===t?i.x+i.width-s.right:i.x+s.left}function Co(i){return yt([],Mt(i))}function Oo(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}class cs extends dt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new Xi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wt(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:s}=e,n=s.beforeTitle.apply(this,[t]),o=s.title.apply(this,[t]),a=s.afterTitle.apply(this,[t]);let r=[];return r=yt(r,Mt(n)),r=yt(r,Mt(o)),r=yt(r,Mt(a)),r}getBeforeBody(t,e){return Co(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:s}=e,n=[];return z(t,o=>{const a={before:[],lines:[],after:[]},r=Oo(s,o);yt(a.before,Mt(r.beforeLabel.call(this,o))),yt(a.lines,r.label.call(this,o)),yt(a.after,Mt(r.afterLabel.call(this,o))),n.push(a)}),n}getAfterBody(t,e){return Co(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:s}=e,n=s.beforeFooter.apply(this,[t]),o=s.footer.apply(this,[t]),a=s.afterFooter.apply(this,[t]);let r=[];return r=yt(r,Mt(n)),r=yt(r,Mt(o)),r=yt(r,Mt(a)),r}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],a=[];let r,l,h=[];for(r=0,l=e.length;r<l;++r)h.push(sr(this.chart,e[r]));return t.filter&&(h=h.filter((c,d,u)=>t.filter(c,d,u,s))),t.itemSort&&(h=h.sort((c,d)=>t.itemSort(c,d,s))),z(h,c=>{const d=Oo(t.callbacks,c);n.push(d.labelColor.call(this,c)),o.push(d.labelPointStyle.call(this,c)),a.push(d.labelTextColor.call(this,c))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=h,h}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(n.length){const r=we[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const l=this._size=So(this,s),h=Object.assign({},r,l),c=Po(this.chart,s,h),d=Do(s,h,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:h,bottomLeft:c,bottomRight:d}=Ft(r),{x:u,y:f}=t,{width:g,height:p}=e;let m,x,b,_,y,v;return"center"===o?(y=f+p/2,"left"===n?(m=u,x=m-a,_=y+a,v=y-a):(m=u+g,x=m+a,_=y-a,v=y+a),b=m):(x="left"===n?u+Math.max(l,c)+a:"right"===n?u+g-Math.max(h,d)-a:this.caretX,"top"===o?(_=f,y=_-a,m=x-a,b=x+a):(_=f+p,y=_+a,m=x+a,b=x-a),v=_),{x1:m,x2:x,x3:b,y1:_,y2:y,y3:v}}drawTitle(t,e,s){const n=this.title,o=n.length;let a,r,l;if(o){const h=Vt(s.rtl,this.x,this.width);for(t.x=oi(this,s.titleAlign,s),e.textAlign=h.textAlign(s.titleAlign),e.textBaseline="middle",a=q(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(n[l],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=s.titleMarginBottom-r)}}_drawColorBox(t,e,s,n,o){const a=this.labelColors[s],r=this.labelPointStyles[s],{boxHeight:l,boxWidth:h,boxPadding:c}=o,d=q(o.bodyFont),u=oi(this,"left",o),f=n.x(u),p=e.y+(l<d.lineHeight?(d.lineHeight-l)/2:0);if(o.usePointStyle){const m={radius:Math.min(h,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},x=n.leftForLtr(f,h)+h/2,b=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,le(t,m,x,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,le(t,m,x,b)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const m=n.leftForLtr(f,h-c),x=n.leftForLtr(n.xPlus(f,1),h-c-2),b=Ft(a.borderRadius);Object.values(b).some(_=>0!==_)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,de(t,{x:m,y:p,w:h,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),de(t,{x,y:p+1,w:h-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(m,p,h,l),t.strokeRect(m,p,h,l),t.fillStyle=a.backgroundColor,t.fillRect(x,p+1,h-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:h,boxPadding:c}=s,d=q(s.bodyFont);let u=d.lineHeight,f=0;const g=Vt(s.rtl,this.x,this.width),p=function(D){e.fillText(D,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a);let x,b,_,y,v,w,M;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=oi(this,m,s),e.fillStyle=s.bodyColor,z(this.beforeBody,p),f=r&&"right"!==m?"center"===a?h/2+c:h+2+c:0,y=0,w=n.length;y<w;++y){for(x=n[y],b=this.labelTextColors[y],e.fillStyle=b,z(x.before,p),_=x.lines,r&&_.length&&(this._drawColorBox(e,t,y,g,s),u=Math.max(d.lineHeight,l)),v=0,M=_.length;v<M;++v)p(_[v]),u=d.lineHeight;z(x.after,p)}f=0,u=d.lineHeight,z(this.afterBody,p),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let a,r;if(o){const l=Vt(s.rtl,this.x,this.width);for(t.x=oi(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",a=q(s.footerFont),e.fillStyle=s.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:h,height:c}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=Ft(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+d,l),"top"===a&&this.drawCaret(t,e,s,n),e.lineTo(r+h-u,l),e.quadraticCurveTo(r+h,l,r+h,l+u),"center"===a&&"right"===o&&this.drawCaret(t,e,s,n),e.lineTo(r+h,l+c-g),e.quadraticCurveTo(r+h,l+c,r+h-g,l+c),"bottom"===a&&this.drawCaret(t,e,s,n),e.lineTo(r+f,l+c),e.quadraticCurveTo(r,l+c,r,l+c-f),"center"===a&&"left"===o&&this.drawCaret(t,e,s,n),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const a=we[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=So(this,t),l=Object.assign({},a,this._size),h=Po(e,t,l),c=Do(t,l,h,e);n._to===c.x&&o._to===c.y||(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,c))}}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=J(e.padding);e.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),Ni(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Hi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:r,index:l})=>{const h=this.chart.getDatasetMeta(r);if(!h)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:h.data[l],index:l}}),o=!se(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!se(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if("mouseout"===t.type)return[];if(!n)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,a=we[o.position].call(this,t,e);return!1!==a&&(s!==a.x||n!==a.y)}}cs.positioners=we;var Ao=Object.freeze({__proto__:null,Decimation:Ya,Filler:Qa,Legend:tr,SubTitle:ir,Title:er,Tooltip:{id:"tooltip",_element:cs,positioners:we,afterInit(i,t,e){e&&(i.tooltip=new cs({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip,e={tooltip:t};!1!==i.notifyPlugins("beforeTooltipDraw",e)&&(t&&t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e))},afterEvent(i,t){i.tooltip&&i.tooltip.handleEvent(t.event,t.replay,t.inChartArea)&&(t.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:mt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:mt,beforeBody:mt,beforeLabel:mt,label(i){if(this&&this.options&&"dataset"===this.options.mode)return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return I(e)||(t+=e),t},labelColor(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:mt,afterBody:mt,beforeFooter:mt,footer:mt,afterFooter:mt}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>"filter"!==i&&"itemSort"!==i&&"external"!==i,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});class ai extends Tt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(I(t))return null;const s=this.getLabels();return n=e=isFinite(e)&&s[e]===t?e:function ar(i,t,e,s){const n=i.indexOf(t);return-1===n?(r=e,l=s,"string"==typeof(a=t)?(r=i.push(a)-1,l.unshift({index:r,label:a})):isNaN(a)&&(r=null),r):n!==i.lastIndexOf(t)?e:n;var a,r,l}(s,t,L(e,t),this._addedLabels),o=s.length-1,null===n?null:K(Math.round(n),0,o);var n,o}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=0===t&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function To(i,t,{horizontal:e,minRotation:s}){const n=ct(s),o=(e?Math.sin(n):Math.cos(n))||.001;return Math.min(t/o,.75*t*(""+i).length)}ai.id="category",ai.defaults={ticks:{callback:ai.prototype.getLabelForValue}};class ri extends Tt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return I(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=s?o:l;if(t){const l=ut(n),h=ut(o);l<0&&h<0?r(0):l>0&&h>0&&a(0)}if(n===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(.05*o)),r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:s,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),s=s||11),s&&(e=Math.min(s,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n=function(o,a){const r=[],{bounds:l,step:h,min:c,max:d,precision:u,count:f,maxTicks:g,maxDigits:p,includeBounds:m}=o,x=h||1,b=g-1,{min:_,max:y}=a,v=!I(c),w=!I(d),M=!I(f),D=(y-_)/(p+1);let C,k,O,A,T=wi((y-_)/b/x)*x;if(T<1e-14&&!v&&!w)return[{value:_},{value:y}];A=Math.ceil(y/T)-Math.floor(_/T),A>b&&(T=wi(A*T/b/x)*x),I(u)||(C=Math.pow(10,u),T=Math.ceil(T*C)/C),"ticks"===l?(k=Math.floor(_/T)*T,O=Math.ceil(y/T)*T):(k=_,O=y),v&&w&&h&&zs((d-c)/h,T/1e3)?(A=Math.round(Math.min((d-c)/T,g)),T=(d-c)/A,k=c,O=d):M?(k=v?c:k,O=w?d:O,A=f-1,T=(O-k)/A):(A=(O-k)/T,A=Ut(A,Math.round(A),T/1e3)?Math.round(A):Math.ceil(A));const S=Math.max(ki(T),ki(k));C=Math.pow(10,I(u)?S:u),k=Math.round(k*C)/C,O=Math.round(O*C)/C;let P=0;for(v&&(m&&k!==c?(r.push({value:c}),k<c&&P++,Ut(Math.round((k+P*T)*C)/C,c,To(c,D,o))&&P++):k<c&&P++);P<A;++P)r.push({value:Math.round((k+P*T)*C)/C});return w&&m&&O!==d?r.length&&Ut(r[r.length-1].value,d,To(d,D,o))?r[r.length-1].value=d:r.push({value:d}):w&&O!==d||r.push({value:O}),r}({maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Mi(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Zt(t,this.chart.options.locale,this.options.ticks.format)}}class ds extends ri{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=$(t)?t:0,this.max=$(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=ct(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Lo(i){return i/Math.pow(10,Math.floor(rt(i)))==1}ds.id="linear",ds.defaults={ticks:{callback:be.formatters.numeric}};class us extends Tt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const s=ri.prototype.parse.apply(this,[t,e]);if(0!==s)return $(s)&&s>0?s:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=$(t)?Math.max(0,t):null,this.max=$(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let s=this.min,n=this.max;const o=l=>s=t?s:l,a=l=>n=e?n:l,r=(l,h)=>Math.pow(10,Math.floor(rt(l))+h);s===n&&(s<=0?(o(1),a(10)):(o(r(s,-1)),a(r(n,1)))),s<=0&&o(r(n,-1)),n<=0&&a(r(s,1)),this._zero&&this.min!==this._suggestedMin&&s===r(this.min,0)&&o(r(s,-1)),this.min=s,this.max=n}buildTicks(){const t=this.options,e=function(s,n){const o=Math.floor(rt(n.max)),a=Math.ceil(n.max/Math.pow(10,o)),r=[];let l=ot(s.min,Math.pow(10,Math.floor(rt(n.min)))),h=Math.floor(rt(l)),c=Math.floor(l/Math.pow(10,h)),d=h<0?Math.pow(10,Math.abs(h)):1;do{r.push({value:l,major:Lo(l)}),++c,10===c&&(c=1,++h,d=h>=0?1:d),l=Math.round(c*Math.pow(10,h)*d)/d}while(h<o||h===o&&c<a);const u=ot(s.max,l);return r.push({value:u,major:Lo(l)}),r}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Mi(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Zt(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=rt(t),this._valueRange=rt(this.max)-rt(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(rt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function fs(i){const t=i.ticks;if(t.display&&i.display){const e=J(t.backdropPadding);return L(t.font&&t.font.size,E.font.size)+e.height}return 0}function Ro(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:i<s||i>n?{start:t-e,end:t}:{start:t,end:t+e}}function lr(i,t,e,s,n){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;s.start<t.l?(r=(t.l-s.start)/o,i.l=Math.min(i.l,t.l-r)):s.end>t.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.start<t.t?(l=(t.t-n.start)/a,i.t=Math.min(i.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function hr(i){return 0===i||180===i?"center":i<180?"left":"right"}function cr(i,t,e){return"right"===e?i-=t:"center"===e&&(i-=t/2),i}function dr(i,t,e){return 90===e||270===e?i-=t/2:(e>270||e<90)&&(i-=t),i}function Eo(i,t,e,s){const{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,F);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a<s;a++)o=i.getPointPosition(a,t),n.lineTo(o.x,o.y)}}us.id="logarithmic",us.defaults={ticks:{callback:be.formatters.logarithmic,major:{enabled:!0}}};class Me extends ri{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=J(fs(this.options)/2),e=this.width=this.maxWidth-t.width,s=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+s/2+t.top),this.drawingArea=Math.floor(Math.min(e,s)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=$(t)&&!isNaN(t)?t:0,this.max=$(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/fs(this.options))}generateTickLabels(t){ri.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,s)=>{const n=V(this.options.pointLabels.callback,[e,s],this);return n||0===n?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?function rr(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?N/o:0;for(let d=0;d<o;d++){const u=a.setContext(i.getPointLabelContext(d));n[d]=u.padding;const f=i.getPointPosition(d,i.drawingArea+n[d],r),g=q(u.font),p=(l=i.ctx,h=g,c=B(c=i._pointLabels[d])?c:[c],{w:Ws(l,h.string,c),h:c.length*h.lineHeight});s[d]=p;const m=it(i.getIndexAngle(d)+r),x=Math.round(Ee(m));lr(e,t,m,Ro(x,f.x,p.w,0,180),Ro(x,f.y,p.h,90,270))}var l,h,c;i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=function(d,u,f){const g=[],p=d._pointLabels.length,m=d.options,x=fs(m)/2,b=d.drawingArea,_=m.pointLabels.centerPointLabels?N/p:0;for(let y=0;y<p;y++){const v=d.getPointPosition(y,b+x+f[y],_),w=Math.round(Ee(it(v.angle+H))),M=u[y],D=dr(v.y,M.h,w),C=hr(w),k=cr(v.x,M.w,C);g.push({x:v.x,y:D,textAlign:C,left:k,top:D,right:k+M.w,bottom:D+M.h})}return g}(i,s,n)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){return it(t*(F/(this._pointLabels.length||1))+ct(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(I(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(I(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const s=e[t];return wt(this.getContext(),{label:s,index:t,type:"pointLabel"})}}getPointPosition(t,e,s=0){const n=this.getIndexAngle(t)-H+s;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:s,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:s,right:n,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const s=this.ctx;s.save(),s.beginPath(),Eo(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),s.closePath(),s.fillStyle=t,s.fill(),s.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:s,grid:n}=e,o=this._pointLabels.length;let a,r,l;if(e.pointLabels.display&&function(h,c){const{ctx:d,options:{pointLabels:u}}=h;for(let f=c-1;f>=0;f--){const g=u.setContext(h.getPointLabelContext(f)),p=q(g.font),{x:m,y:x,textAlign:b,left:_,top:y,right:v,bottom:w}=h._pointLabelItems[f],{backdropColor:M}=g;if(!I(M)){const D=J(g.backdropPadding);d.fillStyle=M,d.fillRect(_-D.left,y-D.top,v-_+D.width,w-y+D.height)}Ot(d,h._pointLabels[f],m,x+p.lineHeight/2,p,{color:g.color,textAlign:b,textBaseline:"middle"})}}(this,o),n.display&&this.ticks.forEach((h,c)=>{0!==c&&(r=this.getDistanceFromCenterForValue(h.value),function(d,u,f,g){const p=d.ctx,m=u.circular,{color:x,lineWidth:b}=u;!m&&!g||!x||!b||f<0||(p.save(),p.strokeStyle=x,p.lineWidth=b,p.setLineDash(u.borderDash),p.lineDashOffset=u.borderDashOffset,p.beginPath(),Eo(d,f,m,g),p.closePath(),p.stroke(),p.restore())}(this,n.setContext(this.getContext(c-1)),r,o))}),s.display){for(t.save(),a=o-1;a>=0;a--){const h=s.setContext(this.getPointLabelContext(a)),{color:c,lineWidth:d}=h;d&&c&&(t.lineWidth=d,t.strokeStyle=c,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(0===l&&!e.reverse)return;const h=s.setContext(this.getContext(l)),c=q(h.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),h.showLabelBackdrop){t.font=c.string,a=t.measureText(r.label).width,t.fillStyle=h.backdropColor;const d=J(h.backdropPadding);t.fillRect(-a/2-d.left,-o-c.size/2-d.top,a+d.width,c.size+d.height)}Ot(t,r.label,0,-o,c,{color:h.color})}),t.restore()}drawTitle(){}}Me.id="radialLinear",Me.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:be.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:i=>i,padding:5,centerPointLabels:!1}},Me.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Me.descriptors={angleLines:{_fallback:"grid"}};const li={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},st=Object.keys(li);function ur(i,t){return i-t}function Io(i,t){if(I(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let a=t;return"function"==typeof s&&(a=s(a)),$(a)||(a="string"==typeof s?e.parse(a,s):e.parse(a)),null===a?null:(n&&(a="week"!==n||!Yt(o)&&!0!==o?e.startOf(a,n):e.startOf(a,"isoWeek",o)),+a)}function zo(i,t,e,s){const n=st.length;for(let o=st.indexOf(i);o<n-1;++o){const a=li[st[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=s)return st[o]}return st[n-1]}function Fo(i,t,e){if(e){if(e.length){const{lo:s,hi:n}=ze(e,t);i[e[s]>=t?e[s]:e[n]]=!0}}else i[t]=!0}function Bo(i,t,e){const s=[],n={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],n[r]=a,s.push({value:r,major:!1});return 0!==o&&e?function(l,h,c,d){const u=l._adapter,f=+u.startOf(h[0].value,d),g=h[h.length-1].value;let p,m;for(p=f;p<=g;p=+u.add(p,1,d))m=c[p],m>=0&&(h[m].major=!0);return h}(i,s,n,e):s}class ke extends Tt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const s=t.time||(t.time={}),n=this._adapter=new so._date(t.adapters.date);jt(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Io(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(h){a||isNaN(h.min)||(n=Math.min(n,h.min)),r||isNaN(h.max)||(o=Math.max(o,h.max))}a&&r||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),n=$(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=$(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n="labels"===s.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,a=$s(n,o,this.max);return this._unit=e.unit||(s.autoSkip?zo(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(r,l,h,c,d){for(let u=st.length-1;u>=st.indexOf(h);u--){const f=st[u];if(li[f].common&&r._adapter.diff(d,c,f)>=l-1)return f}return st[h?st.indexOf(h):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=s.major.enabled&&"year"!==this._unit?function(r){for(let l=st.indexOf(r)+1,h=st.length;l<h;++l)if(li[st[l]].common)return st[l]}(this._unit):void 0,this.initOffsets(n),t.reverse&&a.reverse(),Bo(this,a,this._majorUnit)}initOffsets(t){let e,s,n=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,s=this.getDecimalForValue(t[t.length-1]),o=1===t.length?s:(s-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=K(n,0,a),o=K(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||zo(o.minUnit,e,s,this._getLabelCapacity(e)),r=L(o.stepSize,1),l="week"===a&&o.isoWeekday,h=Yt(l)||!0===l,c={};let d,u,f=e;if(h&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,h?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);const g="data"===n.ticks.source&&this.getDataTimestamps();for(d=f,u=0;d<s;d=+t.add(d,r,a),u++)Fo(c,d,g);return d!==s&&"ticks"!==n.bounds&&1!==u||Fo(c,d,g),Object.keys(c).sort((p,m)=>p-m).map(p=>+p)}getLabelForValue(t){const s=this.options.time;return this._adapter.format(t,s.tooltipFormat?s.tooltipFormat:s.displayFormats.datetime)}_tickFormatFunction(t,e,s,n){const o=this.options,a=o.time.displayFormats,r=this._unit,l=this._majorUnit,c=l&&a[l],d=s[e],f=this._adapter.format(t,n||(l&&c&&d&&d.major?c:r&&a[r])),g=o.ticks.callback;return g?V(g,[f,e,s],this):f}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=ct(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:s*o+r*a,h:s*a+r*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,Bo(this,[t],this._majorUnit),n),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,s=this._cache.data||[];if(s.length)return s;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)s=s.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(s)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(Io(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ci(t.sort(ur))}}function hi(i,t,e){let s,n,o,a,r=0,l=i.length-1;e?(t>=i[r].pos&&t<=i[l].pos&&({lo:r,hi:l}=bt(i,"pos",t)),({pos:s,time:o}=i[r]),({pos:n,time:a}=i[l])):(t>=i[r].time&&t<=i[l].time&&({lo:r,hi:l}=bt(i,"time",t)),({time:s,pos:o}=i[r]),({time:n,pos:a}=i[l]));const h=n-s;return h?o+(a-o)*(t-s)/h:o}ke.id="time",ke.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class gs extends ke{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=hi(e,this.min),this._tableRange=hi(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let a,r,l,h,c;for(a=0,r=t.length;a<r;++a)h=t[a],h>=e&&h<=s&&n.push(h);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a<r;++a)c=n[a+1],l=n[a-1],h=n[a],Math.round((c+l)/2)!==h&&o.push({time:h,pos:a/(r-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return t=e.length&&s.length?this.normalize(e.concat(s)):e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(hi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return hi(this._table,s*this._tableRange+this._minPos,!0)}}gs.id="timeseries",gs.defaults=ke.defaults;var Vo=Object.freeze({__proto__:null,CategoryScale:ai,LinearScale:ds,LogarithmicScale:us,RadialLinearScale:Me,TimeScale:ke,TimeSeriesScale:gs});return Y.register(lo,Vo,os,Ao),Y.helpers=ci({},ua),Y._adapters=so,Y.Animation=En,Y.Animations=Xi,Y.animator=pt,Y.controllers=_t.controllers.items,Y.DatasetController=ft,Y.Element=dt,Y.elements=os,Y.Interaction=Zs,Y.layouts=Q,Y.platforms=Ln,Y.Scale=Tt,Y.Ticks=be,Object.assign(Y,lo,Vo,os,Ao,Ln),Y.Chart=Y,"undefined"!=typeof window&&(window.Chart=Y),Y});
"use strict";var DU=Object.defineProperty,wU=Object.defineProperties,CU=Object.getOwnPropertyDescriptors,QE=Object.getOwnPropertySymbols,EU=Object.prototype.hasOwnProperty,xU=Object.prototype.propertyIsEnumerable,JE=(W,et,ht)=>et in W?DU(W,et,{enumerable:!0,configurable:!0,writable:!0,value:ht}):W[et]=ht,Gp=(W,et)=>{for(var ht in et||(et={}))EU.call(et,ht)&&JE(W,ht,et[ht]);if(QE)for(var ht of QE(et))xU.call(et,ht)&&JE(W,ht,et[ht]);return W},qp=(W,et)=>wU(W,CU(et));(self.webpackChunkHotsAngularElements=self.webpackChunkHotsAngularElements||[]).push([[179],{714:()=>{function W(n){return"function"==typeof n}function et(n){const t=n(i=>{Error.call(i),i.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const ht=et(n=>function(t){n(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((i,s)=>`${s+1}) ${i.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=t});function ls(n,e){if(n){const t=n.indexOf(e);0<=t&&n.splice(t,1)}}class ft{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._teardowns=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const r of t)r.remove(this);else t.remove(this);const{initialTeardown:i}=this;if(W(i))try{i()}catch(r){e=r instanceof ht?r.errors:[r]}const{_teardowns:s}=this;if(s){this._teardowns=null;for(const r of s)try{Xp(r)}catch(o){e=null!=e?e:[],o instanceof ht?e=[...e,...o.errors]:e.push(o)}}if(e)throw new ht(e)}}add(e){var t;if(e&&e!==this)if(this.closed)Xp(e);else{if(e instanceof ft){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(t=this._teardowns)&&void 0!==t?t:[]).push(e)}}_hasParent(e){const{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){const{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&ls(t,e)}remove(e){const{_teardowns:t}=this;t&&ls(t,e),e instanceof ft&&e._removeParent(this)}}ft.EMPTY=(()=>{const n=new ft;return n.closed=!0,n})();const Yp=ft.EMPTY;function Kp(n){return n instanceof ft||n&&"closed"in n&&W(n.remove)&&W(n.add)&&W(n.unsubscribe)}function Xp(n){W(n)?n():n.unsubscribe()}const Ti={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Jo={setTimeout(...n){const{delegate:e}=Jo;return((null==e?void 0:e.setTimeout)||setTimeout)(...n)},clearTimeout(n){const{delegate:e}=Jo;return((null==e?void 0:e.clearTimeout)||clearTimeout)(n)},delegate:void 0};function Zp(n){Jo.setTimeout(()=>{const{onUnhandledError:e}=Ti;if(!e)throw n;e(n)})}function Wc(){}const ex=Gc("C",void 0,void 0);function Gc(n,e,t){return{kind:n,value:e,error:t}}let Ai=null;function ea(n){if(Ti.useDeprecatedSynchronousErrorHandling){const e=!Ai;if(e&&(Ai={errorThrown:!1,error:null}),n(),e){const{errorThrown:t,error:i}=Ai;if(Ai=null,t)throw i}}else n()}class qc extends ft{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Kp(e)&&e.add(this)):this.destination=ax}static create(e,t,i){return new ta(e,t,i)}next(e){this.isStopped?Kc(function nx(n){return Gc("N",n,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Kc(function tx(n){return Gc("E",void 0,n)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Kc(ex,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const sx=Function.prototype.bind;function Yc(n,e){return sx.call(n,e)}class rx{constructor(e){this.partialObserver=e}next(e){const{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){na(i)}}error(e){const{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){na(i)}else na(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){na(t)}}}class ta extends qc{constructor(e,t,i){let s;if(super(),W(e)||!e)s={next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=i?i:void 0};else{let r;this&&Ti.useDeprecatedNextContext?(r=Object.create(e),r.unsubscribe=()=>this.unsubscribe(),s={next:e.next&&Yc(e.next,r),error:e.error&&Yc(e.error,r),complete:e.complete&&Yc(e.complete,r)}):s=e}this.destination=new rx(s)}}function na(n){Ti.useDeprecatedSynchronousErrorHandling?function ix(n){Ti.useDeprecatedSynchronousErrorHandling&&Ai&&(Ai.errorThrown=!0,Ai.error=n)}(n):Zp(n)}function Kc(n,e){const{onStoppedNotification:t}=Ti;t&&Jo.setTimeout(()=>t(n,e))}const ax={closed:!0,next:Wc,error:function ox(n){throw n},complete:Wc},Xc="function"==typeof Symbol&&Symbol.observable||"@@observable";function cs(n){return n}let Te=(()=>{class n{constructor(t){t&&(this._subscribe=t)}lift(t){const i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,s){const r=function cx(n){return n&&n instanceof qc||function lx(n){return n&&W(n.next)&&W(n.error)&&W(n.complete)}(n)&&Kp(n)}(t)?t:new ta(t,i,s);return ea(()=>{const{operator:o,source:a}=this;r.add(o?o.call(r,a):a?this._subscribe(r):this._trySubscribe(r))}),r}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return new(i=Jp(i))((s,r)=>{const o=new ta({next:a=>{try{t(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:s});this.subscribe(o)})}_subscribe(t){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(t)}[Xc](){return this}pipe(...t){return function Qp(n){return 0===n.length?cs:1===n.length?n[0]:function(t){return n.reduce((i,s)=>s(i),t)}}(t)(this)}toPromise(t){return new(t=Jp(t))((i,s)=>{let r;this.subscribe(o=>r=o,o=>s(o),()=>i(r))})}}return n.create=e=>new n(e),n})();function Jp(n){var e;return null!==(e=null!=n?n:Ti.Promise)&&void 0!==e?e:Promise}const ux=et(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Ae=(()=>{class n extends Te{constructor(){super(),this.closed=!1,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const i=new eg(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new ux}next(t){ea(()=>{if(this._throwIfClosed(),!this.isStopped){const i=this.observers.slice();for(const s of i)s.next(t)}})}error(t){ea(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){ea(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:i,isStopped:s,observers:r}=this;return i||s?Yp:(r.push(t),new ft(()=>ls(r,t)))}_checkFinalizedStatuses(t){const{hasError:i,thrownError:s,isStopped:r}=this;i?t.error(s):r&&t.complete()}asObservable(){const t=new Te;return t.source=this,t}}return n.create=(e,t)=>new eg(e,t),n})();class eg extends Ae{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,e)}error(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,e)}complete(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)}_subscribe(e){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==i?i:Yp}}function it(n){return e=>{if(function dx(n){return W(null==n?void 0:n.lift)}(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function tt(n,e,t,i,s){return new hx(n,e,t,i,s)}class hx extends qc{constructor(e,t,i,s,r,o){super(e),this.onFinalize=r,this.shouldUnsubscribe=o,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=s?function(a){try{s(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function wt(n,e){return it((t,i)=>{let s=0;t.subscribe(tt(i,r=>{i.next(n.call(e,r,s++))}))})}function Ii(n){return this instanceof Ii?(this.v=n,this):new Ii(n)}function gx(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,i=t.apply(n,e||[]),r=[];return s={},o("next"),o("throw"),o("return"),s[Symbol.asyncIterator]=function(){return this},s;function o(h){i[h]&&(s[h]=function(f){return new Promise(function(p,g){r.push([h,f,p,g])>1||a(h,f)})})}function a(h,f){try{!function l(h){h.value instanceof Ii?Promise.resolve(h.value.v).then(c,u):d(r[0][2],h)}(i[h](f))}catch(p){d(r[0][3],p)}}function c(h){a("next",h)}function u(h){a("throw",h)}function d(h,f){h(f),r.shift(),r.length&&a(r[0][0],r[0][1])}}function mx(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=n[Symbol.asyncIterator];return e?e.call(n):(n=function ig(n){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=n[r]&&function(o){return new Promise(function(a,l){!function s(r,o,a,l){Promise.resolve(l).then(function(c){r({value:c,done:a})},o)}(a,l,(o=n[r](o)).done,o.value)})}}}const Qc=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function sg(n){return W(null==n?void 0:n.then)}function rg(n){return W(n[Xc])}function og(n){return Symbol.asyncIterator&&W(null==n?void 0:n[Symbol.asyncIterator])}function ag(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const lg=function yx(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function cg(n){return W(null==n?void 0:n[lg])}function ug(n){return gx(this,arguments,function*(){const t=n.getReader();try{for(;;){const{value:i,done:s}=yield Ii(t.read());if(s)return yield Ii(void 0);yield yield Ii(i)}}finally{t.releaseLock()}})}function dg(n){return W(null==n?void 0:n.getReader)}function zt(n){if(n instanceof Te)return n;if(null!=n){if(rg(n))return function vx(n){return new Te(e=>{const t=n[Xc]();if(W(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(Qc(n))return function bx(n){return new Te(e=>{for(let t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}(n);if(sg(n))return function Dx(n){return new Te(e=>{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Zp)})}(n);if(og(n))return hg(n);if(cg(n))return function wx(n){return new Te(e=>{for(const t of n)if(e.next(t),e.closed)return;e.complete()})}(n);if(dg(n))return function Cx(n){return hg(ug(n))}(n)}throw ag(n)}function hg(n){return new Te(e=>{(function Ex(n,e){var t,i,s,r;return function fx(n,e,t,i){return new(t||(t=Promise))(function(r,o){function a(u){try{c(i.next(u))}catch(d){o(d)}}function l(u){try{c(i.throw(u))}catch(d){o(d)}}function c(u){u.done?r(u.value):function s(r){return r instanceof t?r:new t(function(o){o(r)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){try{for(t=mx(n);!(i=yield t.next()).done;)if(e.next(i.value),e.closed)return}catch(o){s={error:o}}finally{try{i&&!i.done&&(r=t.return)&&(yield r.call(t))}finally{if(s)throw s.error}}e.complete()})})(n,e).catch(t=>e.error(t))})}function Hn(n,e,t,i=0,s=!1){const r=e.schedule(function(){t(),s?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(r),!s)return r}function Dr(n,e,t=1/0){return W(e)?Dr((i,s)=>wt((r,o)=>e(i,r,s,o))(zt(n(i,s))),t):("number"==typeof e&&(t=e),it((i,s)=>function xx(n,e,t,i,s,r,o,a){const l=[];let c=0,u=0,d=!1;const h=()=>{d&&!l.length&&!c&&e.complete()},f=g=>c<i?p(g):l.push(g),p=g=>{r&&e.next(g),c++;let m=!1;zt(t(g,u++)).subscribe(tt(e,_=>{null==s||s(_),r?f(_):e.next(_)},()=>{m=!0},void 0,()=>{if(m)try{for(c--;l.length&&c<i;){const _=l.shift();o?Hn(e,o,()=>p(_)):p(_)}h()}catch(_){e.error(_)}}))};return n.subscribe(tt(e,f,()=>{d=!0,h()})),()=>{null==a||a()}}(i,s,n,t)))}function fg(n=1/0){return Dr(cs,n)}const Jc=new Te(n=>n.complete());function pg(n){return n&&W(n.schedule)}function eu(n){return n[n.length-1]}function gg(n){return W(eu(n))?n.pop():void 0}function wr(n){return pg(eu(n))?n.pop():void 0}function mg(n,e=0){return it((t,i)=>{t.subscribe(tt(i,s=>Hn(i,n,()=>i.next(s),e),()=>Hn(i,n,()=>i.complete(),e),s=>Hn(i,n,()=>i.error(s),e)))})}function _g(n,e=0){return it((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function yg(n,e){if(!n)throw new Error("Iterable cannot be null");return new Te(t=>{Hn(t,e,()=>{const i=n[Symbol.asyncIterator]();Hn(t,e,()=>{i.next().then(s=>{s.done?t.complete():t.next(s.value)})},0,!0)})})}function us(n,e){return e?function Px(n,e){if(null!=n){if(rg(n))return function Tx(n,e){return zt(n).pipe(_g(e),mg(e))}(n,e);if(Qc(n))return function Ix(n,e){return new Te(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}(n,e);if(sg(n))return function Ax(n,e){return zt(n).pipe(_g(e),mg(e))}(n,e);if(og(n))return yg(n,e);if(cg(n))return function kx(n,e){return new Te(t=>{let i;return Hn(t,e,()=>{i=n[lg](),Hn(t,e,()=>{let s,r;try{({value:s,done:r}=i.next())}catch(o){return void t.error(o)}r?t.complete():t.next(s)},0,!0)}),()=>W(null==i?void 0:i.return)&&i.return()})}(n,e);if(dg(n))return function Ox(n,e){return yg(ug(n),e)}(n,e)}throw ag(n)}(n,e):zt(n)}function tu(...n){const e=wr(n),t=function Mx(n,e){return"number"==typeof eu(n)?n.pop():e}(n,1/0),i=n;return i.length?1===i.length?zt(i[0]):fg(t)(us(i,e)):Jc}function Cr(n){return n<=0?()=>Jc:it((e,t)=>{let i=0;e.subscribe(tt(t,s=>{++i<=n&&(t.next(s),n<=i&&t.complete())}))})}function vg(n={}){const{connector:e=(()=>new Ae),resetOnError:t=!0,resetOnComplete:i=!0,resetOnRefCountZero:s=!0}=n;return r=>{let o=null,a=null,l=null,c=0,u=!1,d=!1;const h=()=>{null==a||a.unsubscribe(),a=null},f=()=>{h(),o=l=null,u=d=!1},p=()=>{const g=o;f(),null==g||g.unsubscribe()};return it((g,m)=>{c++,!d&&!u&&h();const _=l=null!=l?l:e();m.add(()=>{c--,0===c&&!d&&!u&&(a=nu(p,s))}),_.subscribe(m),o||(o=new ta({next:y=>_.next(y),error:y=>{d=!0,h(),a=nu(f,t,y),_.error(y)},complete:()=>{u=!0,h(),a=nu(f,i),_.complete()}}),us(g).subscribe(o))})(r)}}function nu(n,e,...t){return!0===e?(n(),null):!1===e?null:e(...t).pipe(Cr(1)).subscribe(()=>n())}function ge(n){for(let e in n)if(n[e]===ge)return e;throw Error("Could not find renamed property on target object.")}function iu(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function de(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(de).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function su(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const Rx=ge({__forward_ref__:ge});function ru(n){return n.__forward_ref__=ru,n.toString=function(){return de(this())},n}function q(n){return function bg(n){return"function"==typeof n&&n.hasOwnProperty(Rx)&&n.__forward_ref__===ru}(n)?n():n}class O extends Error{constructor(e,t){super(function ou(n,e){return`NG0${Math.abs(n)}${e?": "+e:""}`}(e,t)),this.code=e}}function H(n){return"string"==typeof n?n:null==n?"":String(n)}function pt(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():H(n)}function ia(n,e){const t=e?` in ${e}`:"";throw new O(-201,`No provider for ${pt(n)} found${t}`)}function It(n,e){null==n&&function Ce(n,e,t,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${t} ${i} ${e} <=Actual]`))}(e,n,null,"!=")}function R(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Ue(n){return{providers:n.providers||[],imports:n.imports||[]}}function au(n){return Dg(n,sa)||Dg(n,Cg)}function Dg(n,e){return n.hasOwnProperty(e)?n[e]:null}function wg(n){return n&&(n.hasOwnProperty(lu)||n.hasOwnProperty(Hx))?n[lu]:null}const sa=ge({\u0275prov:ge}),lu=ge({\u0275inj:ge}),Cg=ge({ngInjectableDef:ge}),Hx=ge({ngInjectorDef:ge});var Y=(()=>((Y=Y||{})[Y.Default=0]="Default",Y[Y.Host=1]="Host",Y[Y.Self=2]="Self",Y[Y.SkipSelf=4]="SkipSelf",Y[Y.Optional=8]="Optional",Y))();let cu;function ui(n){const e=cu;return cu=n,e}function Eg(n,e,t){const i=au(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&Y.Optional?null:void 0!==e?e:void ia(de(n),"Injector")}function di(n){return{toString:n}.toString()}var rn=(()=>((rn=rn||{})[rn.OnPush=0]="OnPush",rn[rn.Default=1]="Default",rn))(),on=(()=>{return(n=on||(on={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",on;var n})();const $x="undefined"!=typeof globalThis&&globalThis,Ux="undefined"!=typeof window&&window,Wx="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,pe=$x||"undefined"!=typeof global&&global||Ux||Wx,ds={},me=[],ra=ge({\u0275cmp:ge}),uu=ge({\u0275dir:ge}),du=ge({\u0275pipe:ge}),xg=ge({\u0275mod:ge}),$n=ge({\u0275fac:ge}),Er=ge({__NG_ELEMENT_ID__:ge});let Gx=0;function an(n){return di(()=>{const t={},i={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===rn.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||me,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||on.Emulated,id:"c",styles:n.styles||me,_:null,setInput:null,schemas:n.schemas||null,tView:null},s=n.directives,r=n.features,o=n.pipes;return i.id+=Gx++,i.inputs=Ag(n.inputs,t),i.outputs=Ag(n.outputs),r&&r.forEach(a=>a(i)),i.directiveDefs=s?()=>("function"==typeof s?s():s).map(Sg):null,i.pipeDefs=o?()=>("function"==typeof o?o():o).map(Mg):null,i})}function Sg(n){return st(n)||function hi(n){return n[uu]||null}(n)}function Mg(n){return function ki(n){return n[du]||null}(n)}const Tg={};function Ze(n){return di(()=>{const e={type:n.type,bootstrap:n.bootstrap||me,declarations:n.declarations||me,imports:n.imports||me,exports:n.exports||me,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Tg[n.id]=n.type),e})}function Ag(n,e){if(null==n)return ds;const t={};for(const i in n)if(n.hasOwnProperty(i)){let s=n[i],r=s;Array.isArray(s)&&(r=s[1],s=s[0]),t[s]=i,e&&(e[s]=r)}return t}const Ct=an;function Et(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,onDestroy:n.type.prototype.ngOnDestroy||null}}function st(n){return n[ra]||null}function $t(n,e){const t=n[xg]||null;if(!t&&!0===e)throw new Error(`Type ${de(n)} does not have '\u0275mod' property.`);return t}const K=11;function Cn(n){return Array.isArray(n)&&"object"==typeof n[1]}function cn(n){return Array.isArray(n)&&!0===n[1]}function pu(n){return 0!=(8&n.flags)}function ca(n){return 2==(2&n.flags)}function ua(n){return 1==(1&n.flags)}function un(n){return null!==n.template}function Qx(n){return 0!=(512&n[2])}function Fi(n,e){return n.hasOwnProperty($n)?n[$n]:null}class kg{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function ms(){return Og}function Og(n){return n.type.prototype.ngOnChanges&&(n.setInput=nS),tS}function tS(){const n=Rg(this),e=null==n?void 0:n.current;if(e){const t=n.previous;if(t===ds)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function nS(n,e,t,i){const s=Rg(n)||function iS(n,e){return n[Pg]=e}(n,{previous:ds,current:null}),r=s.current||(s.current={}),o=s.previous,a=this.declaredInputs[t],l=o[a];r[a]=new kg(l&&l.currentValue,e,o===ds),n[i]=e}ms.ngInherit=!0;const Pg="__ngSimpleChanges__";function Rg(n){return n[Pg]||null}let vu;function bu(){return void 0!==vu?vu:"undefined"!=typeof document?document:void 0}function Ie(n){return!!n.listen}const Fg={createRenderer:(n,e)=>bu()};function Ve(n){for(;Array.isArray(n);)n=n[0];return n}function da(n,e){return Ve(e[n])}function Gt(n,e){return Ve(e[n.index])}function Du(n,e){return n.data[e]}function _s(n,e){return n[e]}function Ot(n,e){const t=e[n];return Cn(t)?t:t[0]}function Ng(n){return 4==(4&n[2])}function wu(n){return 128==(128&n[2])}function fi(n,e){return null==e?null:n[e]}function Lg(n){n[18]=0}function Cu(n,e){n[5]+=e;let t=n,i=n[3];for(;null!==i&&(1===e&&1===t[5]||-1===e&&0===t[5]);)i[5]+=e,t=i,i=i[3]}const j={lFrame:Gg(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Bg(){return j.bindingsEnabled}function C(){return j.lFrame.lView}function ae(){return j.lFrame.tView}function We(){let n=jg();for(;null!==n&&64===n.type;)n=n.parent;return n}function jg(){return j.lFrame.currentTNode}function En(n,e){const t=j.lFrame;t.currentTNode=n,t.isParent=e}function Eu(){return j.lFrame.isParent}function xu(){j.lFrame.isParent=!1}function ha(){return j.isInCheckNoChangesMode}function fa(n){j.isInCheckNoChangesMode=n}function ys(){return j.lFrame.bindingIndex++}function bS(n,e){const t=j.lFrame;t.bindingIndex=t.bindingRootIndex=n,Su(e)}function Su(n){j.lFrame.currentDirectiveIndex=n}function Mu(n){const e=j.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}function $g(){return j.lFrame.currentQueryIndex}function Tu(n){j.lFrame.currentQueryIndex=n}function wS(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function Ug(n,e,t){if(t&Y.SkipSelf){let s=e,r=n;for(;!(s=s.parent,null!==s||t&Y.Host||(s=wS(r),null===s||(r=r[15],10&s.type))););if(null===s)return!1;e=s,n=r}const i=j.lFrame=Wg();return i.currentTNode=e,i.lView=n,!0}function pa(n){const e=Wg(),t=n[1];j.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function Wg(){const n=j.lFrame,e=null===n?null:n.child;return null===e?Gg(n):e}function Gg(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function qg(){const n=j.lFrame;return j.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Yg=qg;function ga(){const n=qg();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function mt(){return j.lFrame.selectedIndex}function pi(n){j.lFrame.selectedIndex=n}function ke(){const n=j.lFrame;return Du(n.tView,n.selectedIndex)}function ma(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t<i;t++){const r=n.data[t].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:u}=r;o&&(n.contentHooks||(n.contentHooks=[])).push(-t,o),a&&((n.contentHooks||(n.contentHooks=[])).push(t,a),(n.contentCheckHooks||(n.contentCheckHooks=[])).push(t,a)),l&&(n.viewHooks||(n.viewHooks=[])).push(-t,l),c&&((n.viewHooks||(n.viewHooks=[])).push(t,c),(n.viewCheckHooks||(n.viewCheckHooks=[])).push(t,c)),null!=u&&(n.destroyHooks||(n.destroyHooks=[])).push(t,u)}}function _a(n,e,t){Kg(n,e,3,t)}function ya(n,e,t,i){(3&n[2])===t&&Kg(n,e,t,i)}function Au(n,e){let t=n[2];(3&t)===e&&(t&=2047,t+=1,n[2]=t)}function Kg(n,e,t,i){const r=null!=i?i:-1,o=e.length-1;let a=0;for(let l=void 0!==i?65535&n[18]:0;l<o;l++)if("number"==typeof e[l+1]){if(a=e[l],null!=i&&a>=i)break}else e[l]<0&&(n[18]+=65536),(a<r||-1==r)&&(kS(n,t,e,l),n[18]=(4294901760&n[18])+l+2),l++}function kS(n,e,t,i){const s=t[i]<0,r=t[i+1],a=n[s?-t[i]:t[i]];if(s){if(n[2]>>11<n[18]>>16&&(3&n[2])===e){n[2]+=2048;try{r.call(a)}finally{}}}else try{r.call(a)}finally{}}class Ar{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function va(n,e,t){const i=Ie(n);let s=0;for(;s<t.length;){const r=t[s];if("number"==typeof r){if(0!==r)break;s++;const o=t[s++],a=t[s++],l=t[s++];i?n.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=r,a=t[++s];ku(o)?i&&n.setProperty(e,o,a):i?n.setAttribute(e,o,a):e.setAttribute(o,a),s++}}return s}function Xg(n){return 3===n||4===n||6===n}function ku(n){return 64===n.charCodeAt(0)}function ba(n,e){if(null!==e&&0!==e.length)if(null===n||0===n.length)n=e.slice();else{let t=-1;for(let i=0;i<e.length;i++){const s=e[i];"number"==typeof s?t=s:0===t||Zg(n,t,s,null,-1===t||2===t?e[++i]:null)}}return n}function Zg(n,e,t,i,s){let r=0,o=n.length;if(-1===e)o=-1;else for(;r<n.length;){const a=n[r++];if("number"==typeof a){if(a===e){o=-1;break}if(a>e){o=r-1;break}}}for(;r<n.length;){const a=n[r];if("number"==typeof a)break;if(a===t){if(null===i)return void(null!==s&&(n[r+1]=s));if(i===n[r+1])return void(n[r+2]=s)}r++,null!==i&&r++,null!==s&&r++}-1!==o&&(n.splice(o,0,e),r=o+1),n.splice(r++,0,t),null!==i&&n.splice(r++,0,i),null!==s&&n.splice(r++,0,s)}function Qg(n){return-1!==n}function vs(n){return 32767&n}function bs(n,e){let t=function NS(n){return n>>16}(n),i=e;for(;t>0;)i=i[15],t--;return i}let Ou=!0;function Da(n){const e=Ou;return Ou=n,e}let LS=0;function kr(n,e){const t=Ru(n,e);if(-1!==t)return t;const i=e[1];i.firstCreatePass&&(n.injectorIndex=e.length,Pu(i.data,n),Pu(e,null),Pu(i.blueprint,null));const s=wa(n,e),r=n.injectorIndex;if(Qg(s)){const o=vs(s),a=bs(s,e),l=a[1].data;for(let c=0;c<8;c++)e[r+c]=a[o+c]|l[o+c]}return e[r+8]=s,r}function Pu(n,e){n.push(0,0,0,0,0,0,0,0,e)}function Ru(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function wa(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,i=null,s=e;for(;null!==s;){const r=s[1],o=r.type;if(i=2===o?r.declTNode:1===o?s[6]:null,null===i)return-1;if(t++,s=s[15],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return-1}function Ca(n,e,t){!function BS(n,e,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty(Er)&&(i=t[Er]),null==i&&(i=t[Er]=LS++);const s=255&i;e.data[n+(s>>5)]|=1<<s}(n,e,t)}function tm(n,e,t){if(t&Y.Optional)return n;ia(e,"NodeInjector")}function nm(n,e,t,i){if(t&Y.Optional&&void 0===i&&(i=null),0==(t&(Y.Self|Y.Host))){const s=n[9],r=ui(void 0);try{return s?s.get(e,i,t&Y.Optional):Eg(e,i,t&Y.Optional)}finally{ui(r)}}return tm(i,e,t)}function im(n,e,t,i=Y.Default,s){if(null!==n){const r=function zS(n){if("string"==typeof n)return n.charCodeAt(0)||0;const e=n.hasOwnProperty(Er)?n[Er]:void 0;return"number"==typeof e?e>=0?255&e:jS:e}(t);if("function"==typeof r){if(!Ug(e,n,i))return i&Y.Host?tm(s,t,i):nm(e,t,i,s);try{const o=r(i);if(null!=o||i&Y.Optional)return o;ia(t)}finally{Yg()}}else if("number"==typeof r){let o=null,a=Ru(n,e),l=-1,c=i&Y.Host?e[16][6]:null;for((-1===a||i&Y.SkipSelf)&&(l=-1===a?wa(n,e):e[a+8],-1!==l&&om(i,!1)?(o=e[1],a=vs(l),e=bs(l,e)):a=-1);-1!==a;){const u=e[1];if(rm(r,a,u.data)){const d=HS(a,e,t,o,i,c);if(d!==sm)return d}l=e[a+8],-1!==l&&om(i,e[1].data[a+8]===c)&&rm(r,a,e)?(o=u,a=vs(l),e=bs(l,e)):a=-1}}}return nm(e,t,i,s)}const sm={};function jS(){return new Ds(We(),C())}function HS(n,e,t,i,s,r){const o=e[1],a=o.data[n+8],u=Ea(a,o,t,null==i?ca(a)&&Ou:i!=o&&0!=(3&a.type),s&Y.Host&&r===a);return null!==u?Or(e,o,u,a):sm}function Ea(n,e,t,i,s){const r=n.providerIndexes,o=e.data,a=1048575&r,l=n.directiveStart,u=r>>20,h=s?a+u:n.directiveEnd;for(let f=i?a:a+u;f<h;f++){const p=o[f];if(f<l&&t===p||f>=l&&p.type===t)return f}if(s){const f=o[l];if(f&&un(f)&&f.type===t)return l}return null}function Or(n,e,t,i){let s=n[t];const r=e.data;if(function OS(n){return n instanceof Ar}(s)){const o=s;o.resolving&&function Fx(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new O(-200,`Circular dependency in DI detected for ${n}${t}`)}(pt(r[t]));const a=Da(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?ui(o.injectImpl):null;Ug(n,i,Y.Default);try{s=n[t]=o.factory(void 0,r,n,i),e.firstCreatePass&&t>=i.directiveStart&&function IS(n,e,t){const{ngOnChanges:i,ngOnInit:s,ngDoCheck:r}=e.type.prototype;if(i){const o=Og(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o)}s&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,s),r&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,r),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,r))}(t,r[t],e)}finally{null!==l&&ui(l),Da(a),o.resolving=!1,Yg()}}return s}function rm(n,e,t){return!!(t[e+(n>>5)]&1<<n)}function om(n,e){return!(n&Y.Self||n&Y.Host&&e)}class Ds{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return im(this._tNode,this._lView,e,i,t)}}const Cs="__parameters__";function xs(n,e,t){return di(()=>{const i=function Nu(n){return function(...t){if(n){const i=n(...t);for(const s in i)this[s]=i[s]}}}(e);function s(...r){if(this instanceof s)return i.apply(this,r),this;const o=new s(...r);return a.annotation=o,a;function a(l,c,u){const d=l.hasOwnProperty(Cs)?l[Cs]:Object.defineProperty(l,Cs,{value:[]})[Cs];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(o),l}}return t&&(s.prototype=Object.create(t.prototype)),s.prototype.ngMetadataName=n,s.annotationCls=s,s})}class B{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=R({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return`InjectionToken ${this._desc}`}}function qt(n,e){void 0===e&&(e=n);for(let t=0;t<n.length;t++){let i=n[t];Array.isArray(i)?(e===n&&(e=n.slice(0,t)),qt(i,e)):e!==n&&e.push(i)}return e}function xn(n,e){n.forEach(t=>Array.isArray(t)?xn(t,e):e(t))}function lm(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function Sa(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Fr(n,e){const t=[];for(let i=0;i<n;i++)t.push(e);return t}function Pt(n,e,t){let i=Ss(n,e);return i>=0?n[1|i]=t:(i=~i,function qS(n,e,t,i){let s=n.length;if(s==e)n.push(t,i);else if(1===s)n.push(i,n[0]),n[0]=t;else{for(s--,n.push(n[s-1],n[s]);s>e;)n[s]=n[s-2],s--;n[e]=t,n[e+1]=i}}(n,i,e,t)),i}function Bu(n,e){const t=Ss(n,e);if(t>=0)return n[1|t]}function Ss(n,e){return function dm(n,e,t){let i=0,s=n.length>>t;for(;s!==i;){const r=i+(s-i>>1),o=n[r<<t];if(e===o)return r<<t;o>e?s=r:i=r+1}return~(s<<t)}(n,e,1)}const Nr={},ju="__NG_DI_FLAG__",Ta="ngTempTokenPath",eM=/\n/gm,fm="__source",nM=ge({provide:String,useValue:ge});let Lr;function pm(n){const e=Lr;return Lr=n,e}function iM(n,e=Y.Default){if(void 0===Lr)throw new O(203,"");return null===Lr?Eg(n,void 0,e):Lr.get(n,e&Y.Optional?null:void 0,e)}function w(n,e=Y.Default){return(function zx(){return cu}()||iM)(q(n),e)}const Hu=w;function zu(n){const e=[];for(let t=0;t<n.length;t++){const i=q(n[t]);if(Array.isArray(i)){if(0===i.length)throw new O(900,"");let s,r=Y.Default;for(let o=0;o<i.length;o++){const a=i[o],l=sM(a);"number"==typeof l?-1===l?s=a.token:r|=l:s=a}e.push(w(s,r))}else e.push(w(i))}return e}function Br(n,e){return n[ju]=e,n.prototype[ju]=e,n}function sM(n){return n[ju]}const Aa=Br(xs("Inject",n=>({token:n})),-1),Gn=Br(xs("Optional"),8),Ms=Br(xs("SkipSelf"),4);let ka,Oa;function As(n){var e;return(null===(e=function Uu(){if(void 0===ka&&(ka=null,pe.trustedTypes))try{ka=pe.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return ka}())||void 0===e?void 0:e.createHTML(n))||n}function bm(n){var e;return(null===(e=function Wu(){if(void 0===Oa&&(Oa=null,pe.trustedTypes))try{Oa=pe.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return Oa}())||void 0===e?void 0:e.createHTML(n))||n}class Ni{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class _M extends Ni{getTypeName(){return"HTML"}}class yM extends Ni{getTypeName(){return"Style"}}class vM extends Ni{getTypeName(){return"Script"}}class bM extends Ni{getTypeName(){return"URL"}}class DM extends Ni{getTypeName(){return"ResourceURL"}}function Rt(n){return n instanceof Ni?n.changingThisBreaksApplicationSecurity:n}function Sn(n,e){const t=Cm(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see https://g.co/ng/security#xss)`)}return t===e}function Cm(n){return n instanceof Ni&&n.getTypeName()||null}class MM{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{const t=(new window.DOMParser).parseFromString(As(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(t){return null}}}class TM{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const i=this.inertDocument.createElement("body");t.appendChild(i)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=As(e),t;const i=this.inertDocument.createElement("body");return i.innerHTML=As(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(e){const t=e.attributes;for(let s=t.length-1;0<s;s--){const o=t.item(s).name;("xmlns:ns1"===o||0===o.indexOf("ns1:"))&&e.removeAttribute(o)}let i=e.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}const IM=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,kM=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function jr(n){return(n=String(n)).match(IM)||n.match(kM)?n:"unsafe:"+n}function Mn(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function Hr(...n){const e={};for(const t of n)for(const i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}const Sm=Mn("area,br,col,hr,img,wbr"),Mm=Mn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Tm=Mn("rp,rt"),Gu=Hr(Sm,Hr(Mm,Mn("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Hr(Tm,Mn("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Hr(Tm,Mm)),qu=Mn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Yu=Mn("srcset"),Am=Hr(qu,Yu,Mn("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Mn("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),OM=Mn("script,style,template");class PM{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,i=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let s=this.checkClobberedElement(t,t.nextSibling);if(s){t=s;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!Gu.hasOwnProperty(t))return this.sanitizedSomething=!0,!OM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const i=e.attributes;for(let s=0;s<i.length;s++){const r=i.item(s),o=r.name,a=o.toLowerCase();if(!Am.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=r.value;qu[a]&&(l=jr(l)),Yu[a]&&(n=l,l=(n=String(n)).split(",").map(e=>jr(e.trim())).join(", ")),this.buf.push(" ",o,'="',Im(l),'"')}var n;return this.buf.push(">"),!0}endElement(e){const t=e.nodeName.toLowerCase();Gu.hasOwnProperty(t)&&!Sm.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(Im(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const RM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,FM=/([^\#-~ |!])/g;function Im(n){return n.replace(/&/g,"&amp;").replace(RM,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(FM,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Pa;function km(n,e){let t=null;try{Pa=Pa||function Em(n){const e=new TM(n);return function AM(){try{return!!(new window.DOMParser).parseFromString(As(""),"text/html")}catch(n){return!1}}()?new MM(e):e}(n);let i=e?String(e):"";t=Pa.getInertBodyElement(i);let s=5,r=i;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,i=r,r=t.innerHTML,t=Pa.getInertBodyElement(i)}while(i!==r);return As((new PM).sanitizeChildren(Ku(t)||t))}finally{if(t){const i=Ku(t)||t;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Ku(n){return"content"in n&&function NM(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var ue=(()=>((ue=ue||{})[ue.NONE=0]="NONE",ue[ue.HTML=1]="HTML",ue[ue.STYLE=2]="STYLE",ue[ue.SCRIPT=3]="SCRIPT",ue[ue.URL=4]="URL",ue[ue.RESOURCE_URL=5]="RESOURCE_URL",ue))();function Om(n){const e=function zr(){const n=C();return n&&n[12]}();return e?bm(e.sanitize(ue.HTML,n)||""):Sn(n,"HTML")?bm(Rt(n)):km(bu(),H(n))}const Nm="__ngContext__";function ot(n,e){n[Nm]=e}function Zu(n){const e=function $r(n){return n[Nm]||null}(n);return e?Array.isArray(e)?e:e.lView:null}function Ju(n){return n.ngOriginalError}function QM(n,...e){n.error(...e)}class qn{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),i=function ZM(n){return n&&n.ngErrorLogger||QM}(e);i(this._console,"ERROR",e),t&&i(this._console,"ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&Ju(e);for(;t&&Ju(t);)t=Ju(t);return t||null}}const Hm=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(pe))();function Tn(n){return n instanceof Function?n():n}var Ft=(()=>((Ft=Ft||{})[Ft.Important=1]="Important",Ft[Ft.DashCase=2]="DashCase",Ft))();function td(n,e){return undefined(n,e)}function Ur(n){const e=n[3];return cn(e)?e[3]:e}function nd(n){return Gm(n[13])}function id(n){return Gm(n[4])}function Gm(n){for(;null!==n&&!cn(n);)n=n[4];return n}function ks(n,e,t,i,s){if(null!=i){let r,o=!1;cn(i)?r=i:Cn(i)&&(o=!0,i=i[0]);const a=Ve(i);0===n&&null!==t?null==s?Qm(e,t,a):Li(e,t,a,s||null,!0):1===n&&null!==t?Li(e,t,a,s||null,!0):2===n?function r_(n,e,t){const i=Ra(n,e);i&&function DT(n,e,t,i){Ie(n)?n.removeChild(e,t,i):e.removeChild(t)}(n,i,e,t)}(e,a,o):3===n&&e.destroyNode(a),null!=r&&function ET(n,e,t,i,s){const r=t[7];r!==Ve(t)&&ks(e,n,i,r,s);for(let a=10;a<t.length;a++){const l=t[a];Wr(l[1],l,n,e,i,r)}}(e,n,r,t,s)}}function rd(n,e,t){if(Ie(n))return n.createElement(e,t);{const i=null!==t?function aS(n){const e=n.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(t):null;return null===i?n.createElement(e):n.createElementNS(i,e)}}function Ym(n,e){const t=n[9],i=t.indexOf(e),s=e[3];1024&e[2]&&(e[2]&=-1025,Cu(s,-1)),t.splice(i,1)}function od(n,e){if(n.length<=10)return;const t=10+e,i=n[t];if(i){const s=i[17];null!==s&&s!==n&&Ym(s,i),e>0&&(n[t-1][4]=i[4]);const r=Sa(n,10+e);!function fT(n,e){Wr(n,e,e[K],2,null,null),e[0]=null,e[6]=null}(i[1],i);const o=r[19];null!==o&&o.detachView(r[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function Km(n,e){if(!(256&e[2])){const t=e[K];Ie(t)&&t.destroyNode&&Wr(n,e,t,3,null,null),function mT(n){let e=n[13];if(!e)return ad(n[1],n);for(;e;){let t=null;if(Cn(e))t=e[13];else{const i=e[10];i&&(t=i)}if(!t){for(;e&&!e[4]&&e!==n;)Cn(e)&&ad(e[1],e),e=e[3];null===e&&(e=n),Cn(e)&&ad(e[1],e),t=e&&e[4]}e=t}}(e)}}function ad(n,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function bT(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let i=0;i<t.length;i+=2){const s=e[t[i]];if(!(s instanceof Ar)){const r=t[i+1];if(Array.isArray(r))for(let o=0;o<r.length;o+=2){const a=s[r[o]],l=r[o+1];try{l.call(a)}finally{}}else try{r.call(s)}finally{}}}}(n,e),function vT(n,e){const t=n.cleanup,i=e[7];let s=-1;if(null!==t)for(let r=0;r<t.length-1;r+=2)if("string"==typeof t[r]){const o=t[r+1],a="function"==typeof o?o(e):Ve(e[o]),l=i[s=t[r+2]],c=t[r+3];"boolean"==typeof c?a.removeEventListener(t[r],l,c):c>=0?i[s=c]():i[s=-c].unsubscribe(),r+=2}else{const o=i[s=t[r+1]];t[r].call(o)}if(null!==i){for(let r=s+1;r<i.length;r++)i[r]();e[7]=null}}(n,e),1===e[1].type&&Ie(e[K])&&e[K].destroy();const t=e[17];if(null!==t&&cn(e[3])){t!==e[3]&&Ym(t,e);const i=e[19];null!==i&&i.detachView(n)}}}function Xm(n,e,t){return function Zm(n,e,t){let i=e;for(;null!==i&&40&i.type;)i=(e=i).parent;if(null===i)return t[0];if(2&i.flags){const s=n.data[i.directiveStart].encapsulation;if(s===on.None||s===on.Emulated)return null}return Gt(i,t)}(n,e.parent,t)}function Li(n,e,t,i,s){Ie(n)?n.insertBefore(e,t,i,s):e.insertBefore(t,i,s)}function Qm(n,e,t){Ie(n)?n.appendChild(e,t):e.appendChild(t)}function Jm(n,e,t,i,s){null!==i?Li(n,e,t,i,s):Qm(n,e,t)}function Ra(n,e){return Ie(n)?n.parentNode(e):e.parentNode}function e_(n,e,t){return n_(n,e,t)}let n_=function t_(n,e,t){return 40&n.type?Gt(n,t):null};function Fa(n,e,t,i){const s=Xm(n,i,e),r=e[K],a=e_(i.parent||e[6],i,e);if(null!=s)if(Array.isArray(t))for(let l=0;l<t.length;l++)Jm(r,s,t[l],a,!1);else Jm(r,s,t,a,!1)}function Na(n,e){if(null!==e){const t=e.type;if(3&t)return Gt(e,n);if(4&t)return cd(-1,n[e.index]);if(8&t){const i=e.child;if(null!==i)return Na(n,i);{const s=n[e.index];return cn(s)?cd(-1,s):Ve(s)}}if(32&t)return td(e,n)()||Ve(n[e.index]);{const i=s_(n,e);return null!==i?Array.isArray(i)?i[0]:Na(Ur(n[16]),i):Na(n,e.next)}}return null}function s_(n,e){return null!==e?n[16][6].projection[e.projection]:null}function cd(n,e){const t=10+n+1;if(t<e.length){const i=e[t],s=i[1].firstChild;if(null!==s)return Na(i,s)}return e[7]}function ud(n,e,t,i,s,r,o){for(;null!=t;){const a=i[t.index],l=t.type;if(o&&0===e&&(a&&ot(Ve(a),i),t.flags|=4),64!=(64&t.flags))if(8&l)ud(n,e,t.child,i,s,r,!1),ks(e,n,s,a,r);else if(32&l){const c=td(t,i);let u;for(;u=c();)ks(e,n,s,u,r);ks(e,n,s,a,r)}else 16&l?o_(n,e,i,t,s,r):ks(e,n,s,a,r);t=o?t.projectionNext:t.next}}function Wr(n,e,t,i,s,r){ud(t,i,n.firstChild,e,s,r,!1)}function o_(n,e,t,i,s,r){const o=t[16],l=o[6].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++)ks(e,n,s,l[c],r);else ud(n,e,l,o[3],s,r,!0)}function a_(n,e,t){Ie(n)?n.setAttribute(e,"style",t):e.style.cssText=t}function dd(n,e,t){Ie(n)?""===t?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t):e.className=t}function l_(n,e,t){let i=n.length;for(;;){const s=n.indexOf(e,t);if(-1===s)return s;if(0===s||n.charCodeAt(s-1)<=32){const r=e.length;if(s+r===i||n.charCodeAt(s+r)<=32)return s}t=s+1}}const c_="ng-template";function ST(n,e,t){let i=0;for(;i<n.length;){let s=n[i++];if(t&&"class"===s){if(s=n[i],-1!==l_(s.toLowerCase(),e,0))return!0}else if(1===s){for(;i<n.length&&"string"==typeof(s=n[i++]);)if(s.toLowerCase()===e)return!0;return!1}}return!1}function u_(n){return 4===n.type&&n.value!==c_}function MT(n,e,t){return e===(4!==n.type||t?n.value:c_)}function TT(n,e,t){let i=4;const s=n.attrs||[],r=function kT(n){for(let e=0;e<n.length;e++)if(Xg(n[e]))return e;return n.length}(s);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!MT(n,l,t)||""===l&&1===e.length){if(dn(i))return!1;o=!0}}else{const c=8&i?l:e[++a];if(8&i&&null!==n.attrs){if(!ST(n.attrs,c,t)){if(dn(i))return!1;o=!0}continue}const d=AT(8&i?"class":l,s,u_(n),t);if(-1===d){if(dn(i))return!1;o=!0;continue}if(""!==c){let h;h=d>r?"":s[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==l_(f,c,0)||2&i&&c!==h){if(dn(i))return!1;o=!0}}}}else{if(!o&&!dn(i)&&!dn(l))return!1;if(o&&dn(l))continue;o=!1,i=l|1&i}}return dn(i)||o}function dn(n){return 0==(1&n)}function AT(n,e,t,i){if(null===e)return-1;let s=0;if(i||!t){let r=!1;for(;s<e.length;){const o=e[s];if(o===n)return s;if(3===o||6===o)r=!0;else{if(1===o||2===o){let a=e[++s];for(;"string"==typeof a;)a=e[++s];continue}if(4===o)break;if(0===o){s+=4;continue}}s+=r?1:2}return-1}return function OT(n,e){let t=n.indexOf(4);if(t>-1)for(t++;t<n.length;){const i=n[t];if("number"==typeof i)return-1;if(i===e)return t;t++}return-1}(e,n)}function d_(n,e,t=!1){for(let i=0;i<e.length;i++)if(TT(n,e[i],t))return!0;return!1}function PT(n,e){e:for(let t=0;t<e.length;t++){const i=e[t];if(n.length===i.length){for(let s=0;s<n.length;s++)if(n[s]!==i[s])continue e;return!0}}return!1}function h_(n,e){return n?":not("+e.trim()+")":e}function RT(n){let e=n[0],t=1,i=2,s="",r=!1;for(;t<n.length;){let o=n[t];if("string"==typeof o)if(2&i){const a=n[++t];s+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else 8&i?s+="."+o:4&i&&(s+=" "+o);else""!==s&&!dn(o)&&(e+=h_(r,s),s=""),i=o,r=r||!dn(i);t++}return""!==s&&(e+=h_(r,s)),e}const z={};function Yt(n){f_(ae(),C(),mt()+n,ha())}function f_(n,e,t,i){if(!i)if(3==(3&e[2])){const r=n.preOrderCheckHooks;null!==r&&_a(e,r,t)}else{const r=n.preOrderHooks;null!==r&&ya(e,r,0,t)}pi(t)}function La(n,e){return n<<17|e<<2}function hn(n){return n>>17&32767}function hd(n){return 2|n}function Yn(n){return(131068&n)>>2}function fd(n,e){return-131069&n|e<<2}function pd(n){return 1|n}function E_(n,e){const t=n.contentQueries;if(null!==t)for(let i=0;i<t.length;i+=2){const s=t[i],r=t[i+1];if(-1!==r){const o=n.data[r];Tu(s),o.contentQueries(2,e[r],r)}}}function Gr(n,e,t,i,s,r,o,a,l,c){const u=e.blueprint.slice();return u[0]=s,u[2]=140|i,Lg(u),u[3]=u[15]=n,u[8]=t,u[10]=o||n&&n[10],u[K]=a||n&&n[K],u[12]=l||n&&n[12]||null,u[9]=c||n&&n[9]||null,u[6]=r,u[16]=2==e.type?n[16]:u,u}function Os(n,e,t,i,s){let r=n.data[e];if(null===r)r=function Cd(n,e,t,i,s){const r=jg(),o=Eu(),l=n.data[e]=function QT(n,e,t,i,s,r){return{type:t,index:i,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:s,attrs:r,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?r:r&&r.parent,t,e,i,s);return null===n.firstChild&&(n.firstChild=l),null!==r&&(o?null==r.child&&null!==l.parent&&(r.child=l):null===r.next&&(r.next=l)),l}(n,e,t,i,s),function vS(){return j.lFrame.inI18n}()&&(r.flags|=64);else if(64&r.type){r.type=t,r.value=i,r.attrs=s;const o=function Tr(){const n=j.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}();r.injectorIndex=null===o?-1:o.injectorIndex}return En(r,!0),r}function Ps(n,e,t,i){if(0===t)return-1;const s=e.length;for(let r=0;r<t;r++)e.push(i),n.blueprint.push(i),n.data.push(null);return s}function qr(n,e,t){pa(e);try{const i=n.viewQuery;null!==i&&Od(1,i,t);const s=n.template;null!==s&&x_(n,e,s,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),n.staticContentQueries&&E_(n,e),n.staticViewQueries&&Od(2,n.viewQuery,t);const r=n.components;null!==r&&function KT(n,e){for(let t=0;t<e.length;t++)mA(n,e[t])}(e,r)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[2]&=-5,ga()}}function Rs(n,e,t,i){const s=e[2];if(256==(256&s))return;pa(e);const r=ha();try{Lg(e),function Hg(n){return j.lFrame.bindingIndex=n}(n.bindingStartIndex),null!==t&&x_(n,e,t,2,i);const o=3==(3&s);if(!r)if(o){const c=n.preOrderCheckHooks;null!==c&&_a(e,c,null)}else{const c=n.preOrderHooks;null!==c&&ya(e,c,0,null),Au(e,0)}if(function pA(n){for(let e=nd(n);null!==e;e=id(e)){if(!e[2])continue;const t=e[9];for(let i=0;i<t.length;i++){const s=t[i],r=s[3];0==(1024&s[2])&&Cu(r,1),s[2]|=1024}}}(e),function fA(n){for(let e=nd(n);null!==e;e=id(e))for(let t=10;t<e.length;t++){const i=e[t],s=i[1];wu(i)&&Rs(s,i,s.template,i[8])}}(e),null!==n.contentQueries&&E_(n,e),!r)if(o){const c=n.contentCheckHooks;null!==c&&_a(e,c)}else{const c=n.contentHooks;null!==c&&ya(e,c,1),Au(e,1)}!function qT(n,e){const t=n.hostBindingOpCodes;if(null!==t)try{for(let i=0;i<t.length;i++){const s=t[i];if(s<0)pi(~s);else{const r=s,o=t[++i],a=t[++i];bS(o,r),a(2,e[r])}}}finally{pi(-1)}}(n,e);const a=n.components;null!==a&&function YT(n,e){for(let t=0;t<e.length;t++)gA(n,e[t])}(e,a);const l=n.viewQuery;if(null!==l&&Od(2,l,i),!r)if(o){const c=n.viewCheckHooks;null!==c&&_a(e,c)}else{const c=n.viewHooks;null!==c&&ya(e,c,2),Au(e,2)}!0===n.firstUpdatePass&&(n.firstUpdatePass=!1),r||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,Cu(e[3],-1))}finally{ga()}}function XT(n,e,t,i){const s=e[10],r=!ha(),o=Ng(e);try{r&&!o&&s.begin&&s.begin(),o&&qr(n,e,i),Rs(n,e,t,i)}finally{r&&!o&&s.end&&s.end()}}function x_(n,e,t,i,s){const r=mt(),o=2&i;try{pi(-1),o&&e.length>20&&f_(n,e,20,ha()),t(i,s)}finally{pi(r)}}function Ed(n,e,t){!Bg()||(function rA(n,e,t,i){const s=t.directiveStart,r=t.directiveEnd;n.firstCreatePass||kr(t,e),ot(i,e);const o=t.initialInputs;for(let a=s;a<r;a++){const l=n.data[a],c=un(l);c&&uA(e,t,l);const u=Or(e,n,a,t);ot(u,e),null!==o&&dA(0,a-s,u,l,0,o),c&&(Ot(t.index,e)[8]=u)}}(n,e,t,Gt(t,e)),128==(128&t.flags)&&function oA(n,e,t){const i=t.directiveStart,s=t.directiveEnd,o=t.index,a=function DS(){return j.lFrame.currentDirectiveIndex}();try{pi(o);for(let l=i;l<s;l++){const c=n.data[l],u=e[l];Su(l),(null!==c.hostBindings||0!==c.hostVars||null!==c.hostAttrs)&&R_(c,u)}}finally{pi(-1),Su(a)}}(n,e,t))}function xd(n,e,t=Gt){const i=e.localNames;if(null!==i){let s=e.index+1;for(let r=0;r<i.length;r+=2){const o=i[r+1],a=-1===o?t(e,n):n[o];n[s++]=a}}}function M_(n){const e=n.tView;return null===e||e.incompleteFirstPass?n.tView=ja(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts):e}function ja(n,e,t,i,s,r,o,a,l,c){const u=20+i,d=u+s,h=function ZT(n,e){const t=[];for(let i=0;i<e;i++)t.push(i<n?null:z);return t}(u,d),f="function"==typeof c?c():c;return h[1]={type:n,blueprint:h,template:t,queries:null,viewQuery:a,declTNode:e,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:d,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof r?r():r,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:f,incompleteFirstPass:!1}}function I_(n,e,t,i){const s=j_(e);null===t?s.push(i):(s.push(t),n.firstCreatePass&&H_(n).push(i,s.length-1))}function k_(n,e,t){for(let i in n)if(n.hasOwnProperty(i)){const s=n[i];(t=null===t?{}:t).hasOwnProperty(i)?t[i].push(e,s):t[i]=[e,s]}return t}function Nt(n,e,t,i,s,r,o,a){const l=Gt(e,t);let u,c=e.inputs;!a&&null!=c&&(u=c[i])?(U_(n,t,u,i,s),ca(e)&&function tA(n,e){const t=Ot(e,n);16&t[2]||(t[2]|=64)}(t,e.index)):3&e.type&&(i=function eA(n){return"class"===n?"className":"for"===n?"htmlFor":"formaction"===n?"formAction":"innerHtml"===n?"innerHTML":"readonly"===n?"readOnly":"tabindex"===n?"tabIndex":n}(i),s=null!=o?o(s,e.value||"",i):s,Ie(r)?r.setProperty(l,i,s):ku(i)||(l.setProperty?l.setProperty(i,s):l[i]=s))}function Sd(n,e,t,i){let s=!1;if(Bg()){const r=function aA(n,e,t){const i=n.directiveRegistry;let s=null;if(i)for(let r=0;r<i.length;r++){const o=i[r];d_(t,o.selectors,!1)&&(s||(s=[]),Ca(kr(t,e),n,o.type),un(o)?(F_(n,t),s.unshift(o)):s.push(o))}return s}(n,e,t),o=null===i?null:{"":-1};if(null!==r){s=!0,N_(t,n.data.length,r.length);for(let u=0;u<r.length;u++){const d=r[u];d.providersResolver&&d.providersResolver(d)}let a=!1,l=!1,c=Ps(n,e,r.length,null);for(let u=0;u<r.length;u++){const d=r[u];t.mergedAttrs=ba(t.mergedAttrs,d.hostAttrs),L_(n,t,e,c,d),cA(c,d,o),null!==d.contentQueries&&(t.flags|=8),(null!==d.hostBindings||null!==d.hostAttrs||0!==d.hostVars)&&(t.flags|=128);const h=d.type.prototype;!a&&(h.ngOnChanges||h.ngOnInit||h.ngDoCheck)&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t.index),a=!0),!l&&(h.ngOnChanges||h.ngDoCheck)&&((n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t.index),l=!0),c++}!function JT(n,e){const i=e.directiveEnd,s=n.data,r=e.attrs,o=[];let a=null,l=null;for(let c=e.directiveStart;c<i;c++){const u=s[c],d=u.inputs,h=null===r||u_(e)?null:hA(d,r);o.push(h),a=k_(d,c,a),l=k_(u.outputs,c,l)}null!==a&&(a.hasOwnProperty("class")&&(e.flags|=16),a.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=o,e.inputs=a,e.outputs=l}(n,t)}o&&function lA(n,e,t){if(e){const i=n.localNames=[];for(let s=0;s<e.length;s+=2){const r=t[e[s+1]];if(null==r)throw new O(-301,!1);i.push(e[s],r)}}}(t,i,o)}return t.mergedAttrs=ba(t.mergedAttrs,t.attrs),s}function P_(n,e,t,i,s,r){const o=r.hostBindings;if(o){let a=n.hostBindingOpCodes;null===a&&(a=n.hostBindingOpCodes=[]);const l=~e.index;(function sA(n){let e=n.length;for(;e>0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(a)!=l&&a.push(l),a.push(i,s,o)}}function R_(n,e){null!==n.hostBindings&&n.hostBindings(1,e)}function F_(n,e){e.flags|=2,(n.components||(n.components=[])).push(e.index)}function cA(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;un(e)&&(t[""]=n)}}function N_(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function L_(n,e,t,i,s){n.data[i]=s;const r=s.factory||(s.factory=Fi(s.type)),o=new Ar(r,un(s),null);n.blueprint[i]=o,t[i]=o,P_(n,e,0,i,Ps(n,t,s.hostVars,z),s)}function uA(n,e,t){const i=Gt(e,n),s=M_(t),r=n[10],o=Ha(n,Gr(n,s,null,t.onPush?64:16,i,e,r,r.createRenderer(i,t),null,null));n[e.index]=o}function An(n,e,t,i,s,r){const o=Gt(n,e);!function Md(n,e,t,i,s,r,o){if(null==r)Ie(n)?n.removeAttribute(e,s,t):e.removeAttribute(s);else{const a=null==o?H(r):o(r,i||"",s);Ie(n)?n.setAttribute(e,s,a,t):t?e.setAttributeNS(t,s,a):e.setAttribute(s,a)}}(e[K],o,r,n.value,t,i,s)}function dA(n,e,t,i,s,r){const o=r[e];if(null!==o){const a=i.setInput;for(let l=0;l<o.length;){const c=o[l++],u=o[l++],d=o[l++];null!==a?i.setInput(t,d,c,u):t[u]=d}}}function hA(n,e){let t=null,i=0;for(;i<e.length;){const s=e[i];if(0!==s)if(5!==s){if("number"==typeof s)break;n.hasOwnProperty(s)&&(null===t&&(t=[]),t.push(s,n[s],e[i+1])),i+=2}else i+=2;else i+=4}return t}function B_(n,e,t,i){return new Array(n,!0,!1,e,null,0,i,t,null,null)}function gA(n,e){const t=Ot(e,n);if(wu(t)){const i=t[1];80&t[2]?Rs(i,t,i.template,t[8]):t[5]>0&&Td(t)}}function Td(n){for(let i=nd(n);null!==i;i=id(i))for(let s=10;s<i.length;s++){const r=i[s];if(1024&r[2]){const o=r[1];Rs(o,r,o.template,r[8])}else r[5]>0&&Td(r)}const t=n[1].components;if(null!==t)for(let i=0;i<t.length;i++){const s=Ot(t[i],n);wu(s)&&s[5]>0&&Td(s)}}function mA(n,e){const t=Ot(e,n),i=t[1];(function _A(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])})(i,t),qr(i,t,t[8])}function Ha(n,e){return n[13]?n[14][4]=e:n[13]=e,n[14]=e,e}function Ad(n){for(;n;){n[2]|=64;const e=Ur(n);if(Qx(n)&&!e)return n;n=e}return null}function kd(n,e,t){const i=e[10];i.begin&&i.begin();try{Rs(n,e,n.template,t)}catch(s){throw $_(e,s),s}finally{i.end&&i.end()}}function V_(n){!function Id(n){for(let e=0;e<n.components.length;e++){const t=n.components[e],i=Zu(t),s=i[1];XT(s,i,s.template,t)}}(n[8])}function Od(n,e,t){Tu(0),e(n,t)}const DA=(()=>Promise.resolve(null))();function j_(n){return n[7]||(n[7]=[])}function H_(n){return n.cleanup||(n.cleanup=[])}function z_(n,e,t){return(null===n||un(n))&&(t=function uS(n){for(;Array.isArray(n);){if("object"==typeof n[1])return n;n=n[0]}return null}(t[e.index])),t[K]}function $_(n,e){const t=n[9],i=t?t.get(qn,null):null;i&&i.handleError(e)}function U_(n,e,t,i,s){for(let r=0;r<t.length;){const o=t[r++],a=t[r++],l=e[o],c=n.data[o];null!==c.setInput?c.setInput(l,s,i,a):l[a]=s}}function Kn(n,e,t){const i=da(e,n);!function qm(n,e,t){Ie(n)?n.setValue(e,t):e.textContent=t}(n[K],i,t)}function za(n,e,t){let i=t?n.styles:null,s=t?n.classes:null,r=0;if(null!==e)for(let o=0;o<e.length;o++){const a=e[o];"number"==typeof a?r=a:1==r?s=su(s,a):2==r&&(i=su(i,a+": "+e[++o]+";"))}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=s:n.classesWithoutHost=s}const Pd=new B("INJECTOR",-1);class W_{get(e,t=Nr){if(t===Nr){const i=new Error(`NullInjectorError: No provider for ${de(e)}!`);throw i.name="NullInjectorError",i}return t}}const Rd=new B("Set Injector scope."),Yr={},EA={};let Fd;function G_(){return void 0===Fd&&(Fd=new W_),Fd}function q_(n,e=null,t=null,i){const s=Y_(n,e,t,i);return s._resolveInjectorDefTypes(),s}function Y_(n,e=null,t=null,i){return new xA(n,t,e||G_(),i)}class xA{constructor(e,t,i,s=null){this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const r=[];t&&xn(t,a=>this.processProvider(a,e,t)),xn([e],a=>this.processInjectorType(a,[],r)),this.records.set(Pd,Fs(void 0,this));const o=this.records.get(Rd);this.scope=null!=o?o.value:null,this.source=s||("object"==typeof e?null:de(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=Nr,i=Y.Default){this.assertNotDestroyed();const s=pm(this),r=ui(void 0);try{if(!(i&Y.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function PA(n){return"function"==typeof n||"object"==typeof n&&n instanceof B}(e)&&au(e);a=l&&this.injectableDefInScope(l)?Fs(Nd(e),Yr):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(i&Y.Self?G_():this.parent).get(e,t=i&Y.Optional&&t===Nr?null:t)}catch(o){if("NullInjectorError"===o.name){if((o[Ta]=o[Ta]||[]).unshift(de(e)),s)throw o;return function rM(n,e,t,i){const s=n[Ta];throw e[fm]&&s.unshift(e[fm]),n.message=function oM(n,e,t,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.substr(2):n;let s=de(e);if(Array.isArray(e))s=e.map(de).join(" -> ");else if("object"==typeof e){let r=[];for(let o in e)if(e.hasOwnProperty(o)){let a=e[o];r.push(o+":"+("string"==typeof a?JSON.stringify(a):de(a)))}s=`{${r.join(", ")}}`}return`${t}${i?"("+i+")":""}[${s}]: ${n.replace(eM,"\n  ")}`}("\n"+n.message,s,t,i),n.ngTokenPath=s,n[Ta]=null,n}(o,e,"R3InjectorError",this.source)}throw o}finally{ui(r),pm(s)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((i,s)=>e.push(de(s))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new O(205,!1)}processInjectorType(e,t,i){if(!(e=q(e)))return!1;let s=wg(e);const r=null==s&&e.ngModule||void 0,o=void 0===r?e:r,a=-1!==i.indexOf(o);if(void 0!==r&&(s=wg(r)),null==s)return!1;if(null!=s.imports&&!a){let u;i.push(o);try{xn(s.imports,d=>{this.processInjectorType(d,t,i)&&(void 0===u&&(u=[]),u.push(d))})}finally{}if(void 0!==u)for(let d=0;d<u.length;d++){const{ngModule:h,providers:f}=u[d];xn(f,p=>this.processProvider(p,h,f||me))}}this.injectorDefTypes.add(o);const l=Fi(o)||(()=>new o);this.records.set(o,Fs(l,Yr));const c=s.providers;if(null!=c&&!a){const u=e;xn(c,d=>this.processProvider(d,u,c))}return void 0!==r&&void 0!==e.providers}processProvider(e,t,i){let s=Ns(e=q(e))?e:q(e&&e.provide);const r=function MA(n,e,t){return X_(n)?Fs(void 0,n.useValue):Fs(function K_(n,e,t){let i;if(Ns(n)){const s=q(n);return Fi(s)||Nd(s)}if(X_(n))i=()=>q(n.useValue);else if(function AA(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...zu(n.deps||[]));else if(function TA(n){return!(!n||!n.useExisting)}(n))i=()=>w(q(n.useExisting));else{const s=q(n&&(n.useClass||n.provide));if(!function kA(n){return!!n.deps}(n))return Fi(s)||Nd(s);i=()=>new s(...zu(n.deps))}return i}(n),Yr)}(e);if(Ns(e)||!0!==e.multi)this.records.get(s);else{let o=this.records.get(s);o||(o=Fs(void 0,Yr,!0),o.factory=()=>zu(o.multi),this.records.set(s,o)),s=e,o.multi.push(e)}this.records.set(s,r)}hydrate(e,t){return t.value===Yr&&(t.value=EA,t.value=t.factory()),"object"==typeof t.value&&t.value&&function OA(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=q(e.providedIn);return"string"==typeof t?"any"===t||t===this.scope:this.injectorDefTypes.has(t)}}function Nd(n){const e=au(n),t=null!==e?e.factory:Fi(n);if(null!==t)return t;if(n instanceof B)throw new O(204,!1);if(n instanceof Function)return function SA(n){const e=n.length;if(e>0)throw Fr(e,"?"),new O(204,!1);const t=function Vx(n){const e=n&&(n[sa]||n[Cg]);if(e){const t=function jx(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new O(204,!1)}function Fs(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function X_(n){return null!==n&&"object"==typeof n&&nM in n}function Ns(n){return"function"==typeof n}let Ne=(()=>{class n{static create(t,i){var s;if(Array.isArray(t))return q_({name:""},i,t,"");{const r=null!==(s=t.name)&&void 0!==s?s:"";return q_({name:r},t.parent,t.providers,r)}}}return n.THROW_IF_NOT_FOUND=Nr,n.NULL=new W_,n.\u0275prov=R({token:n,providedIn:"any",factory:()=>w(Pd)}),n.__NG_ELEMENT_ID__=-1,n})();function HA(n,e){ma(Zu(n)[1],We())}function Ls(n){let e=function ly(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),t=!0;const i=[n];for(;e;){let s;if(un(n))s=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new O(903,"");s=e.\u0275dir}if(s){if(t){i.push(s);const o=n;o.inputs=Vd(n.inputs),o.declaredInputs=Vd(n.declaredInputs),o.outputs=Vd(n.outputs);const a=s.hostBindings;a&&WA(n,a);const l=s.viewQuery,c=s.contentQueries;if(l&&$A(n,l),c&&UA(n,c),iu(n.inputs,s.inputs),iu(n.declaredInputs,s.declaredInputs),iu(n.outputs,s.outputs),un(s)&&s.data.animation){const u=n.data;u.animation=(u.animation||[]).concat(s.data.animation)}}const r=s.features;if(r)for(let o=0;o<r.length;o++){const a=r[o];a&&a.ngInherit&&a(n),a===Ls&&(t=!1)}}e=Object.getPrototypeOf(e)}!function zA(n){let e=0,t=null;for(let i=n.length-1;i>=0;i--){const s=n[i];s.hostVars=e+=s.hostVars,s.hostAttrs=ba(s.hostAttrs,t=ba(t,s.hostAttrs))}}(i)}function Vd(n){return n===ds?{}:n===me?[]:n}function $A(n,e){const t=n.viewQuery;n.viewQuery=t?(i,s)=>{e(i,s),t(i,s)}:e}function UA(n,e){const t=n.contentQueries;n.contentQueries=t?(i,s,r)=>{e(i,s,r),t(i,s,r)}:e}function WA(n,e){const t=n.hostBindings;n.hostBindings=t?(i,s)=>{e(i,s),t(i,s)}:e}let $a=null;function Bs(){if(!$a){const n=pe.Symbol;if(n&&n.iterator)$a=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;t<e.length;++t){const i=e[t];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&($a=i)}}}return $a}function Kr(n){return!!jd(n)&&(Array.isArray(n)||!(n instanceof Map)&&Bs()in n)}function jd(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function at(n,e,t){return!Object.is(n[e],t)&&(n[e]=t,!0)}function Zr(n,e,t,i){const s=C();return at(s,ys(),e)&&(ae(),An(ke(),s,n,e,t,i)),Zr}function Xn(n,e,t,i,s,r,o,a){const l=C(),c=ae(),u=n+20,d=c.firstCreatePass?function QA(n,e,t,i,s,r,o,a,l){const c=e.consts,u=Os(e,n,4,o||null,fi(c,a));Sd(e,t,u,fi(c,l)),ma(e,u);const d=u.tViews=ja(2,u,i,s,r,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,u),d.queries=e.queries.embeddedTView(u)),u}(u,c,l,e,t,i,s,r,o):c.data[u];En(d,!1);const h=l[K].createComment("");Fa(c,l,h,d),ot(h,l),Ha(l,l[u]=B_(h,l,h,d)),ua(d)&&Ed(c,l,d),null!=o&&xd(l,d,a)}function P(n,e=Y.Default){const t=C();return null===t?w(n,e):im(We(),t,q(n),e)}function kn(n,e,t){const i=C();return at(i,ys(),e)&&Nt(ae(),ke(),i,n,e,i[K],t,!1),kn}function Wd(n,e,t,i,s){const o=s?"class":"style";U_(n,t,e.inputs[o],o,i)}function lt(n,e,t,i){const s=C(),r=ae(),o=20+n,a=s[K],l=s[o]=rd(a,e,function AS(){return j.lFrame.currentNamespace}()),c=r.firstCreatePass?function bI(n,e,t,i,s,r,o){const a=e.consts,c=Os(e,n,2,s,fi(a,r));return Sd(e,t,c,fi(a,o)),null!==c.attrs&&za(c,c.attrs,!1),null!==c.mergedAttrs&&za(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(o,r,s,0,e,t,i):r.data[o];En(c,!0);const u=c.mergedAttrs;null!==u&&va(a,l,u);const d=c.classes;null!==d&&dd(a,l,d);const h=c.styles;return null!==h&&a_(a,l,h),64!=(64&c.flags)&&Fa(r,s,l,c),0===function fS(){return j.lFrame.elementDepthCount}()&&ot(l,s),function pS(){j.lFrame.elementDepthCount++}(),ua(c)&&(Ed(r,s,c),function S_(n,e,t){if(pu(e)){const s=e.directiveEnd;for(let r=e.directiveStart;r<s;r++){const o=n.data[r];o.contentQueries&&o.contentQueries(1,t[r],r)}}}(r,c,s)),null!==i&&xd(s,c),lt}function yt(){let n=We();Eu()?xu():(n=n.parent,En(n,!1));const e=n;!function gS(){j.lFrame.elementDepthCount--}();const t=ae();return t.firstCreatePass&&(ma(t,n),pu(n)&&t.queries.elementEnd(n)),null!=e.classesWithoutHost&&function RS(n){return 0!=(16&n.flags)}(e)&&Wd(t,e,C(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function FS(n){return 0!=(32&n.flags)}(e)&&Wd(t,e,C(),e.stylesWithoutHost,!1),yt}function Vi(n,e,t,i){return lt(n,e,t,i),yt(),Vi}function Yd(n){return!!n&&"function"==typeof n.then}function ky(n){return!!n&&"function"==typeof n.subscribe}const wI=ky;function Ga(n,e,t,i){const s=C(),r=ae(),o=We();return Oy(r,s,s[K],o,n,e,!!t,i),Ga}function Kd(n,e){const t=We(),i=C(),s=ae();return Oy(s,i,z_(Mu(s.data),t,i),t,n,e,!1),Kd}function Oy(n,e,t,i,s,r,o,a){const l=ua(i),u=n.firstCreatePass&&H_(n),d=e[8],h=j_(e);let f=!0;if(3&i.type||a){const m=Gt(i,e),_=a?a(m):m,y=h.length,b=a?v=>a(Ve(v[i.index])):i.index;if(Ie(t)){let v=null;if(!a&&l&&(v=function CI(n,e,t,i){const s=n.cleanup;if(null!=s)for(let r=0;r<s.length-1;r+=2){const o=s[r];if(o===t&&s[r+1]===i){const a=e[7],l=s[r+2];return a.length>l?a[l]:null}"string"==typeof o&&(r+=2)}return null}(n,e,s,i.index)),null!==v)(v.__ngLastListenerFn__||v).__ngNextListenerFn__=r,v.__ngLastListenerFn__=r,f=!1;else{r=Xd(i,e,d,r,!1);const D=t.listen(_,s,r);h.push(r,D),u&&u.push(s,b,y,y+1)}}else r=Xd(i,e,d,r,!0),_.addEventListener(s,r,o),h.push(r),u&&u.push(s,b,y,o)}else r=Xd(i,e,d,r,!1);const p=i.outputs;let g;if(f&&null!==p&&(g=p[s])){const m=g.length;if(m)for(let _=0;_<m;_+=2){const E=e[g[_]][g[_+1]].subscribe(r),x=h.length;h.push(r,E),u&&u.push(s,i.index,x,-(x+1))}}}function Py(n,e,t,i){try{return!1!==t(i)}catch(s){return $_(n,s),!1}}function Xd(n,e,t,i,s){return function r(o){if(o===Function)return i;const a=2&n.flags?Ot(n.index,e):e;0==(32&e[2])&&Ad(a);let l=Py(e,0,i,o),c=r.__ngNextListenerFn__;for(;c;)l=Py(e,0,c,o)&&l,c=c.__ngNextListenerFn__;return s&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function qa(n=1){return function CS(n){return(j.lFrame.contextLView=function ES(n,e){for(;n>0;)e=e[15],n--;return e}(n,j.lFrame.contextLView))[8]}(n)}function EI(n,e){let t=null;const i=function IT(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(n);for(let s=0;s<e.length;s++){const r=e[s];if("*"!==r){if(null===i?d_(n,r,!0):PT(i,r))return s}else t=s}return t}function Zd(n){const e=C()[16][6];if(!e.projection){const i=e.projection=Fr(n?n.length:1,null),s=i.slice();let r=e.child;for(;null!==r;){const o=n?EI(r,n):0;null!==o&&(s[o]?s[o].projectionNext=r:i[o]=r,s[o]=r),r=r.next}}}function Qd(n,e=0,t){const i=C(),s=ae(),r=Os(s,20+n,16,null,t||null);null===r.projection&&(r.projection=e),xu(),64!=(64&r.flags)&&function CT(n,e,t){o_(e[K],0,e,t,Xm(n,t,e),e_(t.parent||e[6],t,e))}(s,i,r)}function $y(n,e,t,i,s){const r=n[t+1],o=null===e;let a=i?hn(r):Yn(r),l=!1;for(;0!==a&&(!1===l||o);){const u=n[a+1];MI(n[a],e)&&(l=!0,n[a+1]=i?pd(u):hd(u)),a=i?hn(u):Yn(u)}l&&(n[t+1]=i?hd(r):pd(r))}function MI(n,e){return null===n||null==e||(Array.isArray(n)?n[1]:n)===e||!(!Array.isArray(n)||"string"!=typeof e)&&Ss(n,e)>=0}function Xs(n,e){return function pn(n,e,t,i){const s=C(),r=ae(),o=function Wn(n){const e=j.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}(2);r.firstUpdatePass&&function Qy(n,e,t,i){const s=n.data;if(null===s[t+1]){const r=s[mt()],o=function Zy(n,e){return e>=n.expandoStartIndex}(n,t);(function nv(n,e){return 0!=(n.flags&(e?16:32))})(r,i)&&null===e&&!o&&(e=!1),e=function NI(n,e,t,i){const s=Mu(n);let r=i?e.residualClasses:e.residualStyles;if(null===s)0===(i?e.classBindings:e.styleBindings)&&(t=Qr(t=eh(null,n,e,t,i),e.attrs,i),r=null);else{const o=e.directiveStylingLast;if(-1===o||n[o]!==s)if(t=eh(s,n,e,t,i),null===r){let l=function LI(n,e,t){const i=t?e.classBindings:e.styleBindings;if(0!==Yn(i))return n[hn(i)]}(n,e,i);void 0!==l&&Array.isArray(l)&&(l=eh(null,n,e,l[1],i),l=Qr(l,e.attrs,i),function BI(n,e,t,i){n[hn(t?e.classBindings:e.styleBindings)]=i}(n,e,i,l))}else r=function VI(n,e,t){let i;const s=e.directiveEnd;for(let r=1+e.directiveStylingLast;r<s;r++)i=Qr(i,n[r].hostAttrs,t);return Qr(i,e.attrs,t)}(n,e,i)}return void 0!==r&&(i?e.residualClasses=r:e.residualStyles=r),t}(s,r,e,i),function xI(n,e,t,i,s,r){let o=r?e.classBindings:e.styleBindings,a=hn(o),l=Yn(o);n[i]=t;let u,c=!1;if(Array.isArray(t)){const d=t;u=d[1],(null===u||Ss(d,u)>0)&&(c=!0)}else u=t;if(s)if(0!==l){const h=hn(n[a+1]);n[i+1]=La(h,a),0!==h&&(n[h+1]=fd(n[h+1],i)),n[a+1]=function LT(n,e){return 131071&n|e<<17}(n[a+1],i)}else n[i+1]=La(a,0),0!==a&&(n[a+1]=fd(n[a+1],i)),a=i;else n[i+1]=La(l,0),0===a?a=i:n[l+1]=fd(n[l+1],i),l=i;c&&(n[i+1]=hd(n[i+1])),$y(n,u,i,!0),$y(n,u,i,!1),function SI(n,e,t,i,s){const r=s?n.residualClasses:n.residualStyles;null!=r&&"string"==typeof e&&Ss(r,e)>=0&&(t[i+1]=pd(t[i+1]))}(e,u,n,i,r),o=La(a,l),r?e.classBindings=o:e.styleBindings=o}(s,r,e,t,o,i)}}(r,n,o,i),e!==z&&at(s,o,e)&&function ev(n,e,t,i,s,r,o,a){if(!(3&e.type))return;const l=n.data,c=l[a+1];Ya(function m_(n){return 1==(1&n)}(c)?tv(l,e,t,s,Yn(c),o):void 0)||(Ya(r)||function g_(n){return 2==(2&n)}(c)&&(r=tv(l,null,t,s,a,o)),function xT(n,e,t,i,s){const r=Ie(n);if(e)s?r?n.addClass(t,i):t.classList.add(i):r?n.removeClass(t,i):t.classList.remove(i);else{let o=-1===i.indexOf("-")?void 0:Ft.DashCase;if(null==s)r?n.removeStyle(t,i,o):t.style.removeProperty(i);else{const a="string"==typeof s&&s.endsWith("!important");a&&(s=s.slice(0,-10),o|=Ft.Important),r?n.setStyle(t,i,s,o):t.style.setProperty(i,s,a?"important":"")}}}(i,o,da(mt(),t),s,r))}(r,r.data[mt()],s,s[K],n,s[o+1]=function zI(n,e){return null==n||("string"==typeof e?n+=e:"object"==typeof n&&(n=de(Rt(n)))),n}(e,t),i,o)}(n,e,null,!0),Xs}function eh(n,e,t,i,s){let r=null;const o=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a<o&&(r=e[a],i=Qr(i,r.hostAttrs,s),r!==n);)a++;return null!==n&&(t.directiveStylingLast=a),i}function Qr(n,e,t){const i=t?1:2;let s=-1;if(null!==e)for(let r=0;r<e.length;r++){const o=e[r];"number"==typeof o?s=o:s===i&&(Array.isArray(n)||(n=void 0===n?[]:["",n]),Pt(n,o,!!t||e[++r]))}return void 0===n?null:n}function tv(n,e,t,i,s,r){const o=null===e;let a;for(;s>0;){const l=n[s],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=t[s+1];h===z&&(h=d?me:void 0);let f=d?Bu(h,i):u===i?h:void 0;if(c&&!Ya(f)&&(f=Bu(l,i)),Ya(f)&&(a=f,o))return a;const p=n[s+1];s=o?hn(p):Yn(p)}if(null!==e){let l=r?e.residualClasses:e.residualStyles;null!=l&&(a=Bu(l,i))}return a}function Ya(n){return void 0!==n}function Rn(n,e=""){const t=C(),i=ae(),s=n+20,r=i.firstCreatePass?Os(i,s,1,e,null):i.data[s],o=t[s]=function sd(n,e){return Ie(n)?n.createText(e):n.createTextNode(e)}(t[K],e);Fa(i,t,o,r),En(r,!1)}function Zs(n){return th("",n,""),Zs}function th(n,e,t){const i=C(),s=function js(n,e,t,i){return at(n,ys(),t)?e+H(t)+i:z}(i,n,e,t);return s!==z&&Kn(i,mt(),s),th}function nh(n,e,t){const i=C();if(at(i,ys(),e)){const r=ae(),o=ke();Nt(r,o,i,n,e,z_(Mu(r.data),o,i),t,!0)}return nh}const ji=void 0;var lk=["en",[["a","p"],["AM","PM"],ji],[["AM","PM"],ji,ji],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],ji,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],ji,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",ji,"{1} 'at' {0}",ji],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function ak(n){const t=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===i?1:5}];let Qs={};function wv(n){return n in Qs||(Qs[n]=pe.ng&&pe.ng.common&&pe.ng.common.locales&&pe.ng.common.locales[n]),Qs[n]}var I=(()=>((I=I||{})[I.LocaleId=0]="LocaleId",I[I.DayPeriodsFormat=1]="DayPeriodsFormat",I[I.DayPeriodsStandalone=2]="DayPeriodsStandalone",I[I.DaysFormat=3]="DaysFormat",I[I.DaysStandalone=4]="DaysStandalone",I[I.MonthsFormat=5]="MonthsFormat",I[I.MonthsStandalone=6]="MonthsStandalone",I[I.Eras=7]="Eras",I[I.FirstDayOfWeek=8]="FirstDayOfWeek",I[I.WeekendRange=9]="WeekendRange",I[I.DateFormat=10]="DateFormat",I[I.TimeFormat=11]="TimeFormat",I[I.DateTimeFormat=12]="DateTimeFormat",I[I.NumberSymbols=13]="NumberSymbols",I[I.NumberFormats=14]="NumberFormats",I[I.CurrencyCode=15]="CurrencyCode",I[I.CurrencySymbol=16]="CurrencySymbol",I[I.CurrencyName=17]="CurrencyName",I[I.Currencies=18]="Currencies",I[I.Directionality=19]="Directionality",I[I.PluralCase=20]="PluralCase",I[I.ExtraData=21]="ExtraData",I))();const Ka="en-US";let Cv=Ka;class Yv{}class dO{resolveComponentFactory(e){throw function uO(n){const e=Error(`No component factory found for ${de(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let Zn=(()=>{class n{}return n.NULL=new dO,n})();function hO(){return er(We(),C())}function er(n,e){return new Lt(Gt(n,e))}let Lt=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=hO,n})();function fO(n){return n instanceof Lt?n.nativeElement:n}class io{}let mO=(()=>{class n{}return n.\u0275prov=R({token:n,providedIn:"root",factory:()=>null}),n})();class tr{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const _O=new tr("13.2.3"),ch={};function el(n,e,t,i,s=!1){for(;null!==t;){const r=e[t.index];if(null!==r&&i.push(Ve(r)),cn(r))for(let a=10;a<r.length;a++){const l=r[a],c=l[1].firstChild;null!==c&&el(l[1],l,c,i)}const o=t.type;if(8&o)el(n,e,t.child,i);else if(32&o){const a=td(t,e);let l;for(;l=a();)i.push(l)}else if(16&o){const a=s_(e,t);if(Array.isArray(a))i.push(...a);else{const l=Ur(e[16]);el(l[1],l,a,i,!0)}}t=s?t.projectionNext:t.next}return i}class so{constructor(e,t){this._lView=e,this._cdRefInjectingView=t,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const e=this._lView,t=e[1];return el(t,e,t.firstChild,[])}get context(){return this._lView[8]}set context(e){this._lView[8]=e}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const e=this._lView[3];if(cn(e)){const t=e[8],i=t?t.indexOf(this):-1;i>-1&&(od(e,i),Sa(t,i))}this._attachedToViewContainer=!1}Km(this._lView[1],this._lView)}onDestroy(e){I_(this._lView[1],this._lView,null,e)}markForCheck(){Ad(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){kd(this._lView[1],this._lView,this.context)}checkNoChanges(){!function vA(n,e,t){fa(!0);try{kd(n,e,t)}finally{fa(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new O(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function gT(n,e){Wr(n,e,e[K],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new O(902,"");this._appRef=e}}class yO extends so{constructor(e){super(e),this._view=e}detectChanges(){V_(this._view)}checkNoChanges(){!function bA(n){fa(!0);try{V_(n)}finally{fa(!1)}}(this._view)}get context(){return null}}class Zv extends Zn{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=st(e);return new uh(t,this.ngModule)}}function Qv(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}const bO=new B("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Hm});class uh extends Yv{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function FT(n){return n.map(RT).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return Qv(this.componentDef.inputs)}get outputs(){return Qv(this.componentDef.outputs)}create(e,t,i,s){const r=(s=s||this.ngModule)?function DO(n,e){return{get:(t,i,s)=>{const r=n.get(t,ch,s);return r!==ch||i===ch?r:e.get(t,i,s)}}}(e,s.injector):e,o=r.get(io,Fg),a=r.get(mO,null),l=o.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=i?function A_(n,e,t){if(Ie(n))return n.selectRootElement(e,t===on.ShadowDom);let i="string"==typeof e?n.querySelector(e):e;return i.textContent="",i}(l,i,this.componentDef.encapsulation):rd(o.createRenderer(null,this.componentDef),c,function vO(n){const e=n.toLowerCase();return"svg"===e?"svg":"math"===e?"math":null}(c)),d=this.componentDef.onPush?576:528,h=function ay(n,e){return{components:[],scheduler:n||Hm,clean:DA,playerHandler:e||null,flags:0}}(),f=ja(0,null,null,1,0,null,null,null,null,null),p=Gr(null,f,h,d,null,null,o,l,a,r);let g,m;pa(p);try{const _=function ry(n,e,t,i,s,r){const o=t[1];t[20]=n;const l=Os(o,20,2,"#host",null),c=l.mergedAttrs=e.hostAttrs;null!==c&&(za(l,c,!0),null!==n&&(va(s,n,c),null!==l.classes&&dd(s,n,l.classes),null!==l.styles&&a_(s,n,l.styles)));const u=i.createRenderer(n,e),d=Gr(t,M_(e),null,e.onPush?64:16,t[20],l,i,u,r||null,null);return o.firstCreatePass&&(Ca(kr(l,t),o,e.type),F_(o,l),N_(l,t.length,1)),Ha(t,d),t[20]=d}(u,this.componentDef,p,o,l);if(u)if(i)va(l,u,["ng-version",_O.full]);else{const{attrs:y,classes:b}=function NT(n){const e=[],t=[];let i=1,s=2;for(;i<n.length;){let r=n[i];if("string"==typeof r)2===s?""!==r&&e.push(r,n[++i]):8===s&&t.push(r);else{if(!dn(s))break;s=r}i++}return{attrs:e,classes:t}}(this.componentDef.selectors[0]);y&&va(l,u,y),b&&b.length>0&&dd(l,u,b.join(" "))}if(m=Du(f,20),void 0!==t){const y=m.projection=[];for(let b=0;b<this.ngContentSelectors.length;b++){const v=t[b];y.push(null!=v?Array.from(v):null)}}g=function oy(n,e,t,i,s){const r=t[1],o=function iA(n,e,t){const i=We();n.firstCreatePass&&(t.providersResolver&&t.providersResolver(t),L_(n,i,e,Ps(n,e,1,null),t));const s=Or(e,n,i.directiveStart,i);ot(s,e);const r=Gt(i,e);return r&&ot(r,e),s}(r,t,e);if(i.components.push(o),n[8]=o,s&&s.forEach(l=>l(o,e)),e.contentQueries){const l=We();e.contentQueries(1,o,l.directiveStart)}const a=We();return!r.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(pi(a.index),P_(t[1],a,0,a.directiveStart,a.directiveEnd,e),R_(e,o)),o}(_,this.componentDef,p,h,[HA]),qr(f,p,null)}finally{ga()}return new CO(this.componentType,g,er(m,p),p,m)}}class CO extends class cO{}{constructor(e,t,i,s,r){super(),this.location=i,this._rootLView=s,this._tNode=r,this.instance=t,this.hostView=this.changeDetectorRef=new yO(s),this.componentType=e}get injector(){return new Ds(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class nr{}const ir=new Map;class tb extends nr{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Zv(this);const i=$t(e);this._bootstrapComponents=Tn(i.bootstrap),this._r3Injector=Y_(e,t,[{provide:nr,useValue:this},{provide:Zn,useValue:this.componentFactoryResolver}],de(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=Ne.THROW_IF_NOT_FOUND,i=Y.Default){return e===Ne||e===nr||e===Pd?this:this._r3Injector.get(e,t,i)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class dh extends class xO{}{constructor(e){super(),this.moduleType=e,null!==$t(e)&&function SO(n){const e=new Set;!function t(i){const s=$t(i,!0),r=s.id;null!==r&&(function Jv(n,e,t){if(e&&e!==t)throw new Error(`Duplicate module registered for ${n} - ${de(e)} vs ${de(e.name)}`)}(r,ir.get(r),i),ir.set(r,i));const o=Tn(s.imports);for(const a of o)e.has(a)||(e.add(a),t(a))}(n)}(e)}create(e){return new tb(this.moduleType,e)}}function nb(n,e,t,i,s,r){const o=e+t;return at(n,o,s)?function In(n,e,t){return n[e]=t}(n,o+1,r?i.call(r,s):i(s)):function ro(n,e){const t=n[e];return t===z?void 0:t}(n,o+1)}function tl(n,e){const t=ae();let i;const s=n+20;t.firstCreatePass?(i=function LO(n,e){if(e)for(let t=e.length-1;t>=0;t--){const i=e[t];if(n===i.name)return i}}(e,t.pipeRegistry),t.data[s]=i,i.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(s,i.onDestroy)):i=t.data[s];const r=i.factory||(i.factory=Fi(i.type)),o=ui(P);try{const a=Da(!1),l=r();return Da(a),function JA(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}(t,C(),s,l),l}finally{ui(o)}}function nl(n,e,t){const i=n+20,s=C(),r=_s(s,i);return function oo(n,e){return n[1].data[e].pure}(s,i)?nb(s,function gt(){const n=j.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}(),e,r.transform,t,r):r.transform(t)}function hh(n){return e=>{setTimeout(n,void 0,e)}}const Bt=class zO extends Ae{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,i){var s,r,o;let a=e,l=t||(()=>null),c=i;if(e&&"object"==typeof e){const d=e;a=null===(s=d.next)||void 0===s?void 0:s.bind(d),l=null===(r=d.error)||void 0===r?void 0:r.bind(d),c=null===(o=d.complete)||void 0===o?void 0:o.bind(d)}this.__isAsync&&(l=hh(l),a&&(a=hh(a)),c&&(c=hh(c)));const u=super.subscribe({next:a,error:l,complete:c});return e instanceof ft&&e.add(u),u}};function $O(){return this._results[Bs()]()}class fh{constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=Bs(),i=fh.prototype;i[t]||(i[t]=$O)}get changes(){return this._changes||(this._changes=new Bt)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const i=this;i.dirty=!1;const s=qt(e);(this._changesDetected=!function WS(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i<n.length;i++){let s=n[i],r=e[i];if(t&&(s=t(s),r=t(r)),r!==s)return!1}return!0}(i._results,s,t))&&(i._results=s,i.length=s.length,i.last=s[this.length-1],i.first=s[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}Symbol;let Fn=(()=>{class n{}return n.__NG_ELEMENT_ID__=GO,n})();const UO=Fn,WO=class extends UO{constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}createEmbeddedView(e){const t=this._declarationTContainer.tViews,i=Gr(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);i[17]=this._declarationLView[this._declarationTContainer.index];const r=this._declarationLView[19];return null!==r&&(i[19]=r.createEmbeddedView(t)),qr(t,i,e),new so(i)}};function GO(){return il(We(),C())}function il(n,e){return 4&n.type?new WO(e,n,er(n,e)):null}let mn=(()=>{class n{}return n.__NG_ELEMENT_ID__=qO,n})();function qO(){return cb(We(),C())}const YO=mn,ab=class extends YO{constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return er(this._hostTNode,this._hostLView)}get injector(){return new Ds(this._hostTNode,this._hostLView)}get parentInjector(){const e=wa(this._hostTNode,this._hostLView);if(Qg(e)){const t=bs(e,this._hostLView),i=vs(e);return new Ds(t[1].data[i+8],t)}return new Ds(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=lb(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,i){const s=e.createEmbeddedView(t||{});return this.insert(s,i),s}createComponent(e,t,i,s,r){const o=e&&!function Rr(n){return"function"==typeof n}(e);let a;if(o)a=t;else{const d=t||{};a=d.index,i=d.injector,s=d.projectableNodes,r=d.ngModuleRef}const l=o?e:new uh(st(e)),c=i||this.parentInjector;if(!r&&null==l.ngModule){const h=(o?c:this.parentInjector).get(nr,null);h&&(r=h)}const u=l.create(c,s,void 0,r);return this.insert(u.hostView,a),u}insert(e,t){const i=e._lView,s=i[1];if(function hS(n){return cn(n[3])}(i)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const d=i[3],h=new ab(d,d[6],d[3]);h.detach(h.indexOf(e))}}const r=this._adjustIndex(t),o=this._lContainer;!function _T(n,e,t,i){const s=10+i,r=t.length;i>0&&(t[s-1][4]=e),i<r-10?(e[4]=t[s],lm(t,10+i,e)):(t.push(e),e[4]=null),e[3]=t;const o=e[17];null!==o&&t!==o&&function yT(n,e){const t=n[9];e[16]!==e[3][3][16]&&(n[2]=!0),null===t?n[9]=[e]:t.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(n),e[2]|=128}(s,i,o,r);const a=cd(r,o),l=i[K],c=Ra(l,o[7]);return null!==c&&function pT(n,e,t,i,s,r){i[0]=s,i[6]=e,Wr(n,i,t,1,s,r)}(s,o[6],l,i,c,a),e.attachToViewContainerRef(),lm(ph(o),r,e),e}move(e,t){return this.insert(e,t)}indexOf(e){const t=lb(this._lContainer);return null!==t?t.indexOf(e):-1}remove(e){const t=this._adjustIndex(e,-1),i=od(this._lContainer,t);i&&(Sa(ph(this._lContainer),t),Km(i[1],i))}detach(e){const t=this._adjustIndex(e,-1),i=od(this._lContainer,t);return i&&null!=Sa(ph(this._lContainer),t)?new so(i):null}_adjustIndex(e,t=0){return null==e?this.length+t:e}};function lb(n){return n[8]}function ph(n){return n[8]||(n[8]=[])}function cb(n,e){let t;const i=e[n.index];if(cn(i))t=i;else{let s;if(8&n.type)s=Ve(i);else{const r=e[K];s=r.createComment("");const o=Gt(n,e);Li(r,Ra(r,o),s,function wT(n,e){return Ie(n)?n.nextSibling(e):e.nextSibling}(r,o),!1)}e[n.index]=t=B_(i,e,s,n),Ha(e,t)}return new ab(t,n,e)}class gh{constructor(e){this.queryList=e,this.matches=null}clone(){return new gh(this.queryList)}setDirty(){this.queryList.setDirty()}}class mh{constructor(e=[]){this.queries=e}createEmbeddedView(e){const t=e.queries;if(null!==t){const i=null!==e.contentQueries?e.contentQueries[0]:t.length,s=[];for(let r=0;r<i;r++){const o=t.getByIndex(r);s.push(this.queries[o.indexInDeclarationView].clone())}return new mh(s)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)null!==pb(e,t).matches&&this.queries[t].setDirty()}}class ub{constructor(e,t,i=null){this.predicate=e,this.flags=t,this.read=i}}class _h{constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let i=0;i<this.length;i++){const s=null!==t?t.length:0,r=this.getByIndex(i).embeddedTView(e,s);r&&(r.indexInDeclarationView=i,null!==t?t.push(r):t=[r])}return null!==t?new _h(t):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}}class yh{constructor(e,t=-1){this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new yh(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const t=this._declarationNodeIndex;let i=e.parent;for(;null!==i&&8&i.type&&i.index!==t;)i=i.parent;return t===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(e,t){const i=this.metadata.predicate;if(Array.isArray(i))for(let s=0;s<i.length;s++){const r=i[s];this.matchTNodeWithReadOption(e,t,ZO(t,r)),this.matchTNodeWithReadOption(e,t,Ea(t,e,r,!1,!1))}else i===Fn?4&t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,Ea(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(null!==i){const s=this.metadata.read;if(null!==s)if(s===Lt||s===mn||s===Fn&&4&t.type)this.addMatch(t.index,-2);else{const r=Ea(t,e,s,!1,!1);null!==r&&this.addMatch(t.index,r)}else this.addMatch(t.index,i)}}addMatch(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}function ZO(n,e){const t=n.localNames;if(null!==t)for(let i=0;i<t.length;i+=2)if(t[i]===e)return t[i+1];return null}function JO(n,e,t,i){return-1===t?function QO(n,e){return 11&n.type?er(n,e):4&n.type?il(n,e):null}(e,n):-2===t?function eP(n,e,t){return t===Lt?er(e,n):t===Fn?il(e,n):t===mn?cb(e,n):void 0}(n,e,i):Or(n,n[1],t,e)}function db(n,e,t,i){const s=e[19].queries[i];if(null===s.matches){const r=n.data,o=t.matches,a=[];for(let l=0;l<o.length;l+=2){const c=o[l];a.push(c<0?null:JO(e,r[c],o[l+1],t.metadata.read))}s.matches=a}return s.matches}function vh(n,e,t,i){const s=n.queries.getByIndex(t),r=s.matches;if(null!==r){const o=db(n,e,s,t);for(let a=0;a<r.length;a+=2){const l=r[a];if(l>0)i.push(o[a/2]);else{const c=r[a+1],u=e[-l];for(let d=10;d<u.length;d++){const h=u[d];h[17]===h[3]&&vh(h[1],h,c,i)}if(null!==u[9]){const d=u[9];for(let h=0;h<d.length;h++){const f=d[h];vh(f[1],f,c,i)}}}}}return i}function sl(n){const e=C(),t=ae(),i=$g();Tu(i+1);const s=pb(t,i);if(n.dirty&&Ng(e)===(2==(2&s.metadata.flags))){if(null===s.matches)n.reset([]);else{const r=s.crossesNgTemplate?vh(t,e,i,[]):db(t,e,s,i);n.reset(r,fO),n.notifyOnChanges()}return!0}return!1}function rl(n,e,t){const i=ae();i.firstCreatePass&&(function fb(n,e,t){null===n.queries&&(n.queries=new _h),n.queries.track(new yh(e,t))}(i,new ub(n,e,t),-1),2==(2&e)&&(i.staticViewQueries=!0)),function hb(n,e,t){const i=new fh(4==(4&t));I_(n,e,i,i.destroy),null===e[19]&&(e[19]=new mh),e[19].queries.push(new gh(i))}(i,C(),e)}function ol(){return function nP(n,e){return n[19].queries[e].queryList}(C(),$g())}function pb(n,e){return n.queries.getByIndex(e)}function gb(n,e){return il(n,e)}function cl(...n){}const xh=new B("Application Initializer");let rr=(()=>{class n{constructor(t){this.appInits=t,this.resolve=cl,this.reject=cl,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,s)=>{this.resolve=i,this.reject=s})}runInitializers(){if(this.initialized)return;const t=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let s=0;s<this.appInits.length;s++){const r=this.appInits[s]();if(Yd(r))t.push(r);else if(wI(r)){const o=new Promise((a,l)=>{r.subscribe({complete:a,error:l})});t.push(o)}}Promise.all(t).then(()=>{i()}).catch(s=>{this.reject(s)}),0===t.length&&i(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(w(xh,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const lo=new B("AppId"),DP={provide:lo,useFactory:function bP(){return`${Sh()}${Sh()}${Sh()}`},deps:[]};function Sh(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Ob=new B("Platform Initializer"),co=new B("Platform ID"),wP=new B("appBootstrapListener");let CP=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const Qn=new B("LocaleId"),Pb=new B("DefaultCurrencyCode");class EP{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let Rb=(()=>{class n{compileModuleSync(t){return new dh(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const i=this.compileModuleSync(t),r=Tn($t(t).declarations).reduce((o,a)=>{const l=st(a);return l&&o.push(new uh(l)),o},[]);return new EP(i,r)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const SP=(()=>Promise.resolve(0))();function Mh(n){"undefined"==typeof Zone?SP.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class he{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Bt(!1),this.onMicrotaskEmpty=new Bt(!1),this.onStable=new Bt(!1),this.onError=new Bt(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&t,s.shouldCoalesceRunChangeDetection=i,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function MP(){let n=pe.requestAnimationFrame,e=pe.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function IP(n){const e=()=>{!function AP(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(pe,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Ah(n),n.isCheckStableRunning=!0,Th(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Ah(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,s,r,o,a)=>{try{return Fb(n),t.invokeTask(s,r,o,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===r.type||n.shouldCoalesceRunChangeDetection)&&e(),Nb(n)}},onInvoke:(t,i,s,r,o,a,l)=>{try{return Fb(n),t.invoke(s,r,o,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),Nb(n)}},onHasTask:(t,i,s,r)=>{t.hasTask(s,r),i===s&&("microTask"==r.change?(n._hasPendingMicrotasks=r.microTask,Ah(n),Th(n)):"macroTask"==r.change&&(n.hasPendingMacrotasks=r.macroTask))},onHandleError:(t,i,s,r)=>(t.handleError(s,r),n.runOutsideAngular(()=>n.onError.emit(r)),!1)})}(s)}static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!he.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(he.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,s){const r=this._inner,o=r.scheduleEventTask("NgZoneEvent: "+s,e,TP,cl,cl);try{return r.runTask(o,t,i)}finally{r.cancelTask(o)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}}const TP={};function Th(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Ah(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function Fb(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function Nb(n){n._nesting--,Th(n)}class kP{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Bt,this.onMicrotaskEmpty=new Bt,this.onStable=new Bt,this.onError=new Bt}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,s){return e.apply(t,i)}}let Ih=(()=>{class n{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{he.assertNotInAngularZone(),Mh(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Mh(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,s){let r=-1;i&&i>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==r),t(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:s})}whenStable(t,i,s){if(s&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,i,s){return[]}}return n.\u0275fac=function(t){return new(t||n)(w(he))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),Lb=(()=>{class n{constructor(){this._applications=new Map,kh.addToWindow(this)}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return kh.findTestabilityInTree(this,t,i)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class OP{addToWindow(e){}findTestabilityInTree(e,t,i){return null}}let _n,kh=new OP;const Bb=new B("AllowMultipleToken");function Vb(n,e,t=[]){const i=`Platform: ${e}`,s=new B(i);return(r=[])=>{let o=jb();if(!o||o.injector.get(Bb,!1))if(n)n(t.concat(r).concat({provide:s,useValue:!0}));else{const a=t.concat(r).concat({provide:s,useValue:!0},{provide:Rd,useValue:"platform"});!function NP(n){if(_n&&!_n.destroyed&&!_n.injector.get(Bb,!1))throw new O(400,"");_n=n.get(Hb);const e=n.get(Ob,null);e&&e.forEach(t=>t())}(Ne.create({providers:a,name:i}))}return function LP(n){const e=jb();if(!e)throw new O(401,"");return e}()}}function jb(){return _n&&!_n.destroyed?_n:null}let Hb=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const a=function BP(n,e){let t;return t="noop"===n?new kP:("zone.js"===n?void 0:n)||new he({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),t}(i?i.ngZone:void 0,{ngZoneEventCoalescing:i&&i.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:i&&i.ngZoneRunCoalescing||!1}),l=[{provide:he,useValue:a}];return a.run(()=>{const c=Ne.create({providers:l,parent:this.injector,name:t.moduleType.name}),u=t.create(c),d=u.injector.get(qn,null);if(!d)throw new O(402,"");return a.runOutsideAngular(()=>{const h=a.onError.subscribe({next:f=>{d.handleError(f)}});u.onDestroy(()=>{Oh(this._modules,u),h.unsubscribe()})}),function VP(n,e,t){try{const i=t();return Yd(i)?i.catch(s=>{throw e.runOutsideAngular(()=>n.handleError(s)),s}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}(d,a,()=>{const h=u.injector.get(rr);return h.runInitializers(),h.donePromise.then(()=>(function fk(n){It(n,"Expected localeId to be defined"),"string"==typeof n&&(Cv=n.toLowerCase().replace(/_/g,"-"))}(u.injector.get(Qn,Ka)||Ka),this._moduleDoBootstrap(u),u))})})}bootstrapModule(t,i=[]){const s=zb({},i);return function RP(n,e,t){const i=new dh(t);return Promise.resolve(i)}(0,0,t).then(r=>this.bootstrapModuleFactory(r,s))}_moduleDoBootstrap(t){const i=t.injector.get(or);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(s=>i.bootstrap(s));else{if(!t.instance.ngDoBootstrap)throw new O(403,"");t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new O(404,"");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(w(Ne))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function zb(n,e){return Array.isArray(e)?e.reduce(zb,n):Object.assign(Object.assign({},n),e)}let or=(()=>{class n{constructor(t,i,s,r,o){this._zone=t,this._injector=i,this._exceptionHandler=s,this._componentFactoryResolver=r,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new Te(c=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{c.next(this._stable),c.complete()})}),l=new Te(c=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{he.assertNotInAngularZone(),Mh(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,c.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{he.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{c.next(!1)}))});return()=>{u.unsubscribe(),d.unsubscribe()}});this.isStable=tu(a,l.pipe(vg()))}bootstrap(t,i){if(!this._initStatus.done)throw new O(405,"");let s;s=t instanceof Yv?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(s.componentType);const r=function FP(n){return n.isBoundToModule}(s)?void 0:this._injector.get(nr),a=s.create(Ne.NULL,[],i||s.selector,r),l=a.location.nativeElement,c=a.injector.get(Ih,null),u=c&&a.injector.get(Lb);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),Oh(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new O(101,"");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;Oh(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(wP,[]).concat(this._bootstrapListeners).forEach(s=>s(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(t){return new(t||n)(w(he),w(Ne),w(qn),w(Zn),w(rr))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function Oh(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let Ub=!0,Ph=(()=>{class n{}return n.__NG_ELEMENT_ID__=zP,n})();function zP(n){return function $P(n,e,t){if(ca(n)&&!t){const i=Ot(n.index,e);return new so(i,i)}return 47&n.type?new so(e[16],e):null}(We(),C(),16==(16&n))}class Kb{constructor(){}supports(e){return Kr(e)}create(e){return new KP(e)}}const YP=(n,e)=>e;class KP{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||YP}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,s=0,r=null;for(;t||i;){const o=!i||t&&t.currentIndex<Zb(i,s,r)?t:i,a=Zb(o,s,r),l=o.currentIndex;if(o===i)s--,i=i._nextRemoved;else if(t=t._next,null==o.previousIndex)s++;else{r||(r=[]);const c=a-s,u=l-s;if(c!=u){for(let h=0;h<c;h++){const f=h<r.length?r[h]:r[h]=0,p=f+h;u<=p&&p<c&&(r[h]=f+1)}r[o.previousIndex]=u-c}}a!==l&&e(o,a,l)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}diff(e){if(null==e&&(e=[]),!Kr(e))throw new O(900,"");return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let s,r,o,t=this._itHead,i=!1;if(Array.isArray(e)){this.length=e.length;for(let a=0;a<this.length;a++)r=e[a],o=this._trackByFn(a,r),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,r,o,a)),Object.is(t.item,r)||this._addIdentityChange(t,r)):(t=this._mismatch(t,r,o,a),i=!0),t=t._next}else s=0,function ZA(n,e){if(Array.isArray(n))for(let t=0;t<n.length;t++)e(n[t]);else{const t=n[Bs()]();let i;for(;!(i=t.next()).done;)e(i.value)}}(e,a=>{o=this._trackByFn(s,a),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,a,o,s)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,o,s),i=!0),t=t._next,s++}),this.length=s;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,s){let r;return null===e?r=this._itTail:(r=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,r,s)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,s))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,r,s)):e=this._addAfter(new XP(t,i),r,s),e}_verifyReinsertion(e,t,i,s){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==r?e=this._reinsertAfter(r,e._prev,s):e.currentIndex!=s&&(e.currentIndex=s,this._addToMoves(e,s)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const s=e._prevRemoved,r=e._nextRemoved;return null===s?this._removalsHead=r:s._nextRemoved=r,null===r?this._removalsTail=s:r._prevRemoved=s,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){const s=null===t?this._itHead:t._next;return e._next=s,e._prev=t,null===s?this._itTail=e:s._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new Xb),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Xb),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class XP{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class ZP{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){const t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class Xb{constructor(){this.map=new Map}put(e){const t=e.trackById;let i=this.map.get(t);i||(i=new ZP,this.map.set(t,i)),i.add(e)}get(e,t){const s=this.map.get(e);return s?s.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Zb(n,e,t){const i=n.previousIndex;if(null===i)return i;let s=0;return t&&i<t.length&&(s=t[i]),i+e+s}class Qb{constructor(){}supports(e){return e instanceof Map||jd(e)}create(){return new QP}}class QP{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(e){let t;for(t=this._mapHead;null!==t;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}diff(e){if(e){if(!(e instanceof Map||jd(e)))throw new O(900,"")}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(i,s)=>{if(t&&t.key===s)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{const r=this._getOrCreateRecordForKey(s,i);t=this._insertBeforeOrAppend(t,r)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const s=this._records.get(e);this._maybeAddToChanges(s,t);const r=s._prev,o=s._next;return r&&(r._next=o),o&&(o._prev=r),s._next=null,s._prev=null,s}const i=new JP(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}}class JP{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function Jb(){return new uo([new Kb])}let uo=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(null!=i){const s=i.factories.slice();t=t.concat(s)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||Jb()),deps:[[n,new Ms,new Gn]]}}find(t){const i=this.factories.find(s=>s.supports(t));if(null!=i)return i;throw new O(901,"")}}return n.\u0275prov=R({token:n,providedIn:"root",factory:Jb}),n})();function e0(){return new ar([new Qb])}let ar=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(i){const s=i.factories.slice();t=t.concat(s)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||e0()),deps:[[n,new Ms,new Gn]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(i)return i;throw new O(901,"")}}return n.\u0275prov=R({token:n,providedIn:"root",factory:e0}),n})();const eR=[new Qb],nR=new uo([new Kb]),iR=new ar(eR),sR=Vb(null,"core",[{provide:co,useValue:"unknown"},{provide:Hb,deps:[Ne]},{provide:Lb,deps:[]},{provide:CP,deps:[]}]),cR=[{provide:or,useClass:or,deps:[he,Ne,qn,Zn,rr]},{provide:bO,deps:[he],useFactory:function uR(n){let e=[];return n.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:rr,useClass:rr,deps:[[new Gn,xh]]},{provide:Rb,useClass:Rb,deps:[]},DP,{provide:uo,useFactory:function rR(){return nR},deps:[]},{provide:ar,useFactory:function oR(){return iR},deps:[]},{provide:Qn,useFactory:function aR(n){return n||function lR(){return"undefined"!=typeof $localize&&$localize.locale||Ka}()},deps:[[new Aa(Qn),new Gn,new Ms]]},{provide:Pb,useValue:"USD"}];let dR=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(w(or))},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({providers:cR}),n})(),hl=null;function yi(){return hl}const se=new B("DocumentToken");let ho=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:function(){return function gR(){return w(t0)}()},providedIn:"platform"}),n})(),t0=(()=>{class n extends ho{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return yi().getBaseHref(this._doc)}onPopState(t){const i=yi().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){const i=yi().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.removeEventListener("hashchange",t)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,i,s){n0()?this._history.pushState(t,i,s):this.location.hash=s}replaceState(t,i,s){n0()?this._history.replaceState(t,i,s):this.location.hash=s}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(w(se))},n.\u0275prov=R({token:n,factory:function(){return function mR(){return new t0(w(se))}()},providedIn:"platform"}),n})();function n0(){return!!window.history.pushState}function s0(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function r0(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function zi(n){return n&&"?"!==n[0]?"?"+n:n}let Bh=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:function(){return function _R(n){const e=w(se).location;return new vR(w(ho),e&&e.origin||"")}()},providedIn:"root"}),n})();const yR=new B("appBaseHref");let vR=(()=>{class n extends Bh{constructor(t,i){if(super(),this._platformLocation=t,this._removeListenerFns=[],null==i&&(i=this._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=i}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return s0(this._baseHref,t)}path(t=!1){const i=this._platformLocation.pathname+zi(this._platformLocation.search),s=this._platformLocation.hash;return s&&t?`${i}${s}`:i}pushState(t,i,s,r){const o=this.prepareExternalUrl(s+zi(r));this._platformLocation.pushState(t,i,o)}replaceState(t,i,s,r){const o=this.prepareExternalUrl(s+zi(r));this._platformLocation.replaceState(t,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var i,s;null===(s=(i=this._platformLocation).historyGo)||void 0===s||s.call(i,t)}}return n.\u0275fac=function(t){return new(t||n)(w(ho),w(yR,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),o0=(()=>{class n{constructor(t,i){this._subject=new Bt,this._urlChangeListeners=[],this._platformStrategy=t;const s=this._platformStrategy.getBaseHref();this._platformLocation=i,this._baseHref=r0(a0(s)),this._platformStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,i=""){return this.path()==this.normalize(t+zi(i))}normalize(t){return n.stripTrailingSlash(function DR(n,e){return n&&e.startsWith(n)?e.substring(n.length):e}(this._baseHref,a0(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,i="",s=null){this._platformStrategy.pushState(s,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+zi(i)),s)}replaceState(t,i="",s=null){this._platformStrategy.replaceState(s,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+zi(i)),s)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(t=0){var i,s;null===(s=(i=this._platformStrategy).historyGo)||void 0===s||s.call(i,t)}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}))}_notifyUrlChangeListeners(t="",i){this._urlChangeListeners.forEach(s=>s(t,i))}subscribe(t,i,s){return this._subject.subscribe({next:t,error:i,complete:s})}}return n.normalizeQueryParams=zi,n.joinWithSlash=s0,n.stripTrailingSlash=r0,n.\u0275fac=function(t){return new(t||n)(w(Bh),w(ho))},n.\u0275prov=R({token:n,factory:function(){return function bR(){return new o0(w(Bh),w(ho))}()},providedIn:"root"}),n})();function a0(n){return n.replace(/\/index.html$/,"")}var je=(()=>((je=je||{})[je.Zero=0]="Zero",je[je.One=1]="One",je[je.Two=2]="Two",je[je.Few=3]="Few",je[je.Many=4]="Many",je[je.Other=5]="Other",je))();const TR=function Dv(n){return function vt(n){const e=function ck(n){return n.toLowerCase().replace(/_/g,"-")}(n);let t=wv(e);if(t)return t;const i=e.split("-")[0];if(t=wv(i),t)return t;if("en"===i)return lk;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[I.PluralCase]};class wl{}let iF=(()=>{class n extends wl{constructor(t){super(),this.locale=t}getPluralCategory(t,i){switch(TR(i||this.locale)(t)){case je.Zero:return"zero";case je.One:return"one";case je.Two:return"two";case je.Few:return"few";case je.Many:return"many";default:return"other"}}}return n.\u0275fac=function(t){return new(t||n)(w(Qn))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function m0(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const i=t.indexOf("="),[s,r]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(s.trim()===e)return decodeURIComponent(r)}return null}class oF{constructor(e,t,i,s){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=s}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let _0=(()=>{class n{constructor(t,i,s){this._viewContainer=t,this._template=i,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=this._viewContainer;t.forEachOperation((s,r,o)=>{if(null==s.previousIndex)i.createEmbeddedView(this._template,new oF(s.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)i.remove(null===r?void 0:r);else if(null!==r){const a=i.get(r);i.move(a,o),y0(a,s)}});for(let s=0,r=i.length;s<r;s++){const a=i.get(s).context;a.index=s,a.count=r,a.ngForOf=this._ngForOf}t.forEachIdentityChange(s=>{y0(i.get(s.currentIndex),s)})}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(P(mn),P(Fn),P(uo))},n.\u0275dir=Ct({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();function y0(n,e){n.context.$implicit=e.item}let Cl=(()=>{class n{constructor(t,i){this._viewContainer=t,this._context=new aF,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){v0("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){v0("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(P(mn),P(Fn))},n.\u0275dir=Ct({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class aF{constructor(){this.$implicit=null,this.ngIf=null}}function v0(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${de(e)}'.`)}class fF{createSubscription(e,t){return e.subscribe({next:t,error:i=>{throw i}})}dispose(e){e.unsubscribe()}onDestroy(e){e.unsubscribe()}}class pF{createSubscription(e,t){return e.then(t,i=>{throw i})}dispose(e){}onDestroy(e){}}const gF=new pF,mF=new fF;let El=(()=>{class n{constructor(t){this._ref=t,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,i=>this._updateLatestValue(t,i))}_selectStrategy(t){if(Yd(t))return gF;if(ky(t))return mF;throw function vn(n,e){return new O(2100,"")}()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,i){t===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(t){return new(t||n)(P(Ph,16))},n.\u0275pipe=Et({name:"async",type:n,pure:!1}),n})(),w0=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({providers:[{provide:wl,useClass:iF}]}),n})();const C0="browser";class x0{}class Zh extends class BF extends class pR{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function fR(n){hl||(hl=n)}(new Zh)}onAndCancel(e,t,i){return e.addEventListener(t,i,!1),()=>{e.removeEventListener(t,i,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function VF(){return go=go||document.querySelector("base"),go?go.getAttribute("href"):null}();return null==t?null:function jF(n){xl=xl||document.createElement("a"),xl.setAttribute("href",n);const e=xl.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){go=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return m0(document.cookie,e)}}let xl,go=null;const S0=new B("TRANSITION_ID"),zF=[{provide:xh,useFactory:function HF(n,e,t){return()=>{t.get(rr).donePromise.then(()=>{const i=yi(),s=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let r=0;r<s.length;r++)i.remove(s[r])})}},deps:[S0,se,Ne],multi:!0}];class Qh{static init(){!function PP(n){kh=n}(new Qh)}addToWindow(e){pe.getAngularTestability=(i,s=!0)=>{const r=e.findTestabilityInTree(i,s);if(null==r)throw new Error("Could not find testability for element.");return r},pe.getAllAngularTestabilities=()=>e.getAllTestabilities(),pe.getAllAngularRootElements=()=>e.getAllRootElements(),pe.frameworkStabilizers||(pe.frameworkStabilizers=[]),pe.frameworkStabilizers.push(i=>{const s=pe.getAllAngularTestabilities();let r=s.length,o=!1;const a=function(l){o=o||l,r--,0==r&&i(o)};s.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,i){if(null==t)return null;const s=e.getTestability(t);return null!=s?s:i?yi().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}let $F=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const Sl=new B("EventManagerPlugins");let Ml=(()=>{class n{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(s=>s.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,i,s){return this._findPluginFor(i).addEventListener(t,i,s)}addGlobalEventListener(t,i,s){return this._findPluginFor(i).addGlobalEventListener(t,i,s)}getZone(){return this._zone}_findPluginFor(t){const i=this._eventNameToPlugin.get(t);if(i)return i;const s=this._plugins;for(let r=0;r<s.length;r++){const o=s[r];if(o.supports(t))return this._eventNameToPlugin.set(t,o),o}throw new Error(`No event manager plugin found for event ${t}`)}}return n.\u0275fac=function(t){return new(t||n)(w(Sl),w(he))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class M0{constructor(e){this._doc=e}addGlobalEventListener(e,t,i){const s=yi().getGlobalEventTarget(this._doc,e);if(!s)throw new Error(`Unsupported event target ${s} for event ${t}`);return this.addEventListener(s,t,i)}}let T0=(()=>{class n{constructor(){this._stylesSet=new Set}addStyles(t){const i=new Set;t.forEach(s=>{this._stylesSet.has(s)||(this._stylesSet.add(s),i.add(s))}),this.onStylesAdded(i)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),mo=(()=>{class n extends T0{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,i,s){t.forEach(r=>{const o=this._doc.createElement("style");o.textContent=r,s.push(i.appendChild(o))})}addHost(t){const i=[];this._addStylesToHost(this._stylesSet,t,i),this._hostNodes.set(t,i)}removeHost(t){const i=this._hostNodes.get(t);i&&i.forEach(A0),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((i,s)=>{this._addStylesToHost(t,s,i)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(A0))}}return n.\u0275fac=function(t){return new(t||n)(w(se))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();function A0(n){yi().remove(n)}const Jh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},ef=/%COMP%/g;function Tl(n,e,t){for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?Tl(n,s,t):(s=s.replace(ef,n),t.push(s))}return t}function O0(n){return e=>{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let Al=(()=>{class n{constructor(t,i,s){this.eventManager=t,this.sharedStylesHost=i,this.appId=s,this.rendererByCompId=new Map,this.defaultRenderer=new tf(t)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;switch(i.encapsulation){case on.Emulated:{let s=this.rendererByCompId.get(i.id);return s||(s=new KF(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,s)),s.applyToHost(t),s}case 1:case on.ShadowDom:return new XF(this.eventManager,this.sharedStylesHost,t,i);default:if(!this.rendererByCompId.has(i.id)){const s=Tl(i.id,i.styles,[]);this.sharedStylesHost.addStyles(s),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(w(Ml),w(mo),w(lo))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class tf{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(Jh[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,i){e&&e.insertBefore(t,i)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,s){if(s){t=s+":"+t;const r=Jh[s];r?e.setAttributeNS(r,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const s=Jh[i];s?e.removeAttributeNS(s,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,s){s&(Ft.DashCase|Ft.Important)?e.style.setProperty(t,i,s&Ft.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&Ft.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e[t]=i}setValue(e,t){e.nodeValue=t}listen(e,t,i){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,O0(i)):this.eventManager.addEventListener(e,t,O0(i))}}class KF extends tf{constructor(e,t,i,s){super(e),this.component=i;const r=Tl(s+"-"+i.id,i.styles,[]);t.addStyles(r),this.contentAttr=function GF(n){return"_ngcontent-%COMP%".replace(ef,n)}(s+"-"+i.id),this.hostAttr=function qF(n){return"_nghost-%COMP%".replace(ef,n)}(s+"-"+i.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}}class XF extends tf{constructor(e,t,i,s){super(e),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const r=Tl(s.id,s.styles,[]);for(let o=0;o<r.length;o++){const a=document.createElement("style");a.textContent=r[o],this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}}let ZF=(()=>{class n extends M0{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,s){return t.addEventListener(i,s,!1),()=>this.removeEventListener(t,i,s)}removeEventListener(t,i,s){return t.removeEventListener(i,s)}}return n.\u0275fac=function(t){return new(t||n)(w(se))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const R0=["alt","control","meta","shift"],JF={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},F0={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},e1={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let t1=(()=>{class n extends M0{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,i,s){const r=n.parseEventName(i),o=n.eventCallback(r.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>yi().onAndCancel(t,r.domEventName,o))}static parseEventName(t){const i=t.toLowerCase().split("."),s=i.shift();if(0===i.length||"keydown"!==s&&"keyup"!==s)return null;const r=n._normalizeKey(i.pop());let o="";if(R0.forEach(l=>{const c=i.indexOf(l);c>-1&&(i.splice(c,1),o+=l+".")}),o+=r,0!=i.length||0===r.length)return null;const a={};return a.domEventName=s,a.fullKey=o,a}static getEventFullKey(t){let i="",s=function n1(n){let e=n.key;if(null==e){if(e=n.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===n.location&&F0.hasOwnProperty(e)&&(e=F0[e]))}return JF[e]||e}(t);return s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),R0.forEach(r=>{r!=s&&e1[r](t)&&(i+=r+".")}),i+=s,i}static eventCallback(t,i,s){return r=>{n.getEventFullKey(r)===t&&s.runGuarded(()=>i(r))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(w(se))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const a1=Vb(sR,"browser",[{provide:co,useValue:C0},{provide:Ob,useValue:function s1(){Zh.makeCurrent(),Qh.init()},multi:!0},{provide:se,useFactory:function o1(){return function lS(n){vu=n}(document),document},deps:[]}]),l1=[{provide:Rd,useValue:"root"},{provide:qn,useFactory:function r1(){return new qn},deps:[]},{provide:Sl,useClass:ZF,multi:!0,deps:[se,he,co]},{provide:Sl,useClass:t1,multi:!0,deps:[se]},{provide:Al,useClass:Al,deps:[Ml,mo,lo]},{provide:io,useExisting:Al},{provide:T0,useExisting:mo},{provide:mo,useClass:mo,deps:[se]},{provide:Ih,useClass:Ih,deps:[he]},{provide:Ml,useClass:Ml,deps:[Sl,he]},{provide:x0,useClass:$F,deps:[]}];let N0=(()=>{class n{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:n,providers:[{provide:lo,useValue:t.appId},{provide:S0,useExisting:lo},zF]}}}return n.\u0275fac=function(t){return new(t||n)(w(n,12))},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({providers:l1,imports:[w0,dR]}),n})();"undefined"!=typeof window&&window;let sf=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:function(t){let i=null;return i=t?new(t||n):w(V0),i},providedIn:"root"}),n})(),V0=(()=>{class n extends sf{constructor(t){super(),this._doc=t}sanitize(t,i){if(null==i)return null;switch(t){case ue.NONE:return i;case ue.HTML:return Sn(i,"HTML")?Rt(i):km(this._doc,String(i)).toString();case ue.STYLE:return Sn(i,"Style")?Rt(i):i;case ue.SCRIPT:if(Sn(i,"Script"))return Rt(i);throw new Error("unsafe value used in a script context");case ue.URL:return Cm(i),Sn(i,"URL")?Rt(i):jr(String(i));case ue.RESOURCE_URL:if(Sn(i,"ResourceURL"))return Rt(i);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return function wM(n){return new _M(n)}(t)}bypassSecurityTrustStyle(t){return function CM(n){return new yM(n)}(t)}bypassSecurityTrustScript(t){return function EM(n){return new vM(n)}(t)}bypassSecurityTrustUrl(t){return function xM(n){return new bM(n)}(t)}bypassSecurityTrustResourceUrl(t){return function SM(n){return new DM(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(w(se))},n.\u0275prov=R({token:n,factory:function(t){let i=null;return i=t?new t:function y1(n){return new V0(n.get(se))}(w(Ne)),i},providedIn:"root"}),n})();function Nn(...n){return us(n,wr(n))}function rf(n,e){return it((t,i)=>{let s=0;t.subscribe(tt(i,r=>n.call(e,r,s++)&&i.next(r)))})}class j0{}class H0{}class ei{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(t=>{const i=t.indexOf(":");if(i>0){const s=t.slice(0,i),r=s.toLowerCase(),o=t.slice(i+1).trim();this.maybeSetNormalizedName(s,r),this.headers.has(r)?this.headers.get(r).push(o):this.headers.set(r,[o])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let i=e[t];const s=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(s,i),this.maybeSetNormalizedName(t,s))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof ei?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){const t=new ei;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof ei?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(e.name,t);const s=("a"===e.op?this.headers.get(t):void 0)||[];s.push(...i),this.headers.set(t,s);break;case"d":const r=e.value;if(r){let o=this.headers.get(t);if(!o)return;o=o.filter(a=>-1===r.indexOf(a)),0===o.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class b1{encodeKey(e){return z0(e)}encodeValue(e){return z0(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const w1=/%(\d[a-f0-9])/gi,C1={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function z0(n){return encodeURIComponent(n).replace(w1,(e,t)=>{var i;return null!==(i=C1[t])&&void 0!==i?i:e})}function $0(n){return`${n}`}class Ln{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new b1,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function D1(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(s=>{const r=s.indexOf("="),[o,a]=-1==r?[e.decodeKey(s),""]:[e.decodeKey(s.slice(0,r)),e.decodeValue(s.slice(r+1))],l=t.get(o)||[];l.push(a),t.set(o,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const i=e.fromObject[t];this.map.set(t,Array.isArray(i)?i:[i])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){const t=[];return Object.keys(e).forEach(i=>{const s=e[i];Array.isArray(s)?s.forEach(r=>{t.push({param:i,value:r,op:"a"})}):t.push({param:i,value:s,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new Ln({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push($0(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let i=this.map.get(e.param)||[];const s=i.indexOf($0(e.value));-1!==s&&i.splice(s,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class E1{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function U0(n){return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer}function W0(n){return"undefined"!=typeof Blob&&n instanceof Blob}function G0(n){return"undefined"!=typeof FormData&&n instanceof FormData}class _o{constructor(e,t,i,s){let r;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function x1(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||s?(this.body=void 0!==i?i:null,r=s):r=i,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params)),this.headers||(this.headers=new ei),this.context||(this.context=new E1),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":a<t.length-1?"&":"")+o}}else this.params=new Ln,this.urlWithParams=t}serializeBody(){return null===this.body?null:U0(this.body)||W0(this.body)||G0(this.body)||function S1(n){return"undefined"!=typeof URLSearchParams&&n instanceof URLSearchParams}(this.body)||"string"==typeof this.body?this.body:this.body instanceof Ln?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||G0(this.body)?null:W0(this.body)?this.body.type||null:U0(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Ln?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(e={}){var t;const i=e.method||this.method,s=e.url||this.url,r=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,a=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,l=void 0!==e.reportProgress?e.reportProgress:this.reportProgress;let c=e.headers||this.headers,u=e.params||this.params;const d=null!==(t=e.context)&&void 0!==t?t:this.context;return void 0!==e.setHeaders&&(c=Object.keys(e.setHeaders).reduce((h,f)=>h.set(f,e.setHeaders[f]),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((h,f)=>h.set(f,e.setParams[f]),u)),new _o(i,s,o,{params:u,headers:c,context:d,reportProgress:l,responseType:r,withCredentials:a})}}var ze=(()=>((ze=ze||{})[ze.Sent=0]="Sent",ze[ze.UploadProgress=1]="UploadProgress",ze[ze.ResponseHeader=2]="ResponseHeader",ze[ze.DownloadProgress=3]="DownloadProgress",ze[ze.Response=4]="Response",ze[ze.User=5]="User",ze))();class af{constructor(e,t=200,i="OK"){this.headers=e.headers||new ei,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class lf extends af{constructor(e={}){super(e),this.type=ze.ResponseHeader}clone(e={}){return new lf({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Il extends af{constructor(e={}){super(e),this.type=ze.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new Il({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class q0 extends af{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function cf(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let lr=(()=>{class n{constructor(t){this.handler=t}request(t,i,s={}){let r;if(t instanceof _o)r=t;else{let l,c;l=s.headers instanceof ei?s.headers:new ei(s.headers),s.params&&(c=s.params instanceof Ln?s.params:new Ln({fromObject:s.params})),r=new _o(t,i,void 0!==s.body?s.body:null,{headers:l,context:s.context,params:c,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials})}const o=Nn(r).pipe(function v1(n,e){return W(e)?Dr(n,e,1):Dr(n,1)}(l=>this.handler.handle(l)));if(t instanceof _o||"events"===s.observe)return o;const a=o.pipe(rf(l=>l instanceof Il));switch(s.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return a.pipe(wt(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(wt(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(wt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(wt(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:(new Ln).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,s={}){return this.request("PATCH",t,cf(s,i))}post(t,i,s={}){return this.request("POST",t,cf(s,i))}put(t,i,s={}){return this.request("PUT",t,cf(s,i))}}return n.\u0275fac=function(t){return new(t||n)(w(j0))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class Y0{constructor(e,t){this.next=e,this.interceptor=t}handle(e){return this.interceptor.intercept(e,this.next)}}const K0=new B("HTTP_INTERCEPTORS");let M1=(()=>{class n{intercept(t,i){return i.handle(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const T1=/^\)\]\}',?\n/;let X0=(()=>{class n{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Te(i=>{const s=this.xhrFactory.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((f,p)=>s.setRequestHeader(f,p.join(","))),t.headers.has("Accept")||s.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const f=t.detectContentTypeHeader();null!==f&&s.setRequestHeader("Content-Type",f)}if(t.responseType){const f=t.responseType.toLowerCase();s.responseType="json"!==f?f:"text"}const r=t.serializeBody();let o=null;const a=()=>{if(null!==o)return o;const f=s.statusText||"OK",p=new ei(s.getAllResponseHeaders()),g=function A1(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(s)||t.url;return o=new lf({headers:p,status:s.status,statusText:f,url:g}),o},l=()=>{let{headers:f,status:p,statusText:g,url:m}=a(),_=null;204!==p&&(_=void 0===s.response?s.responseText:s.response),0===p&&(p=_?200:0);let y=p>=200&&p<300;if("json"===t.responseType&&"string"==typeof _){const b=_;_=_.replace(T1,"");try{_=""!==_?JSON.parse(_):null}catch(v){_=b,y&&(y=!1,_={error:v,text:_})}}y?(i.next(new Il({body:_,headers:f,status:p,statusText:g,url:m||void 0})),i.complete()):i.error(new q0({error:_,headers:f,status:p,statusText:g,url:m||void 0}))},c=f=>{const{url:p}=a(),g=new q0({error:f,status:s.status||0,statusText:s.statusText||"Unknown Error",url:p||void 0});i.error(g)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:ze.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===t.responseType&&!!s.responseText&&(p.partialText=s.responseText),i.next(p)},h=f=>{let p={type:ze.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return s.addEventListener("load",l),s.addEventListener("error",c),s.addEventListener("timeout",c),s.addEventListener("abort",c),t.reportProgress&&(s.addEventListener("progress",d),null!==r&&s.upload&&s.upload.addEventListener("progress",h)),s.send(r),i.next({type:ze.Sent}),()=>{s.removeEventListener("error",c),s.removeEventListener("abort",c),s.removeEventListener("load",l),s.removeEventListener("timeout",c),t.reportProgress&&(s.removeEventListener("progress",d),null!==r&&s.upload&&s.upload.removeEventListener("progress",h)),s.readyState!==s.DONE&&s.abort()}})}}return n.\u0275fac=function(t){return new(t||n)(w(x0))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const uf=new B("XSRF_COOKIE_NAME"),df=new B("XSRF_HEADER_NAME");class Z0{}let I1=(()=>{class n{constructor(t,i,s){this.doc=t,this.platform=i,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=m0(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return n.\u0275fac=function(t){return new(t||n)(w(se),w(co),w(uf))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),hf=(()=>{class n{constructor(t,i){this.tokenService=t,this.headerName=i}intercept(t,i){const s=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||s.startsWith("http://")||s.startsWith("https://"))return i.handle(t);const r=this.tokenService.getToken();return null!==r&&!t.headers.has(this.headerName)&&(t=t.clone({headers:t.headers.set(this.headerName,r)})),i.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(w(Z0),w(df))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),k1=(()=>{class n{constructor(t,i){this.backend=t,this.injector=i,this.chain=null}handle(t){if(null===this.chain){const i=this.injector.get(K0,[]);this.chain=i.reduceRight((s,r)=>new Y0(s,r),this.backend)}return this.chain.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(w(H0),w(Ne))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),O1=(()=>{class n{static disable(){return{ngModule:n,providers:[{provide:hf,useClass:M1}]}}static withOptions(t={}){return{ngModule:n,providers:[t.cookieName?{provide:uf,useValue:t.cookieName}:[],t.headerName?{provide:df,useValue:t.headerName}:[]]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({providers:[hf,{provide:K0,useExisting:hf,multi:!0},{provide:Z0,useClass:I1},{provide:uf,useValue:"XSRF-TOKEN"},{provide:df,useValue:"X-XSRF-TOKEN"}]}),n})(),P1=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({providers:[lr,{provide:j0,useClass:k1},X0,{provide:H0,useExisting:X0}],imports:[[O1.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),n})();const ff={now:()=>(ff.delegate||Date).now(),delegate:void 0};class R1 extends Ae{constructor(e=1/0,t=1/0,i=ff){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){const{isStopped:t,_buffer:i,_infiniteTimeWindow:s,_timestampProvider:r,_windowTime:o}=this;t||(i.push(e),!s&&i.push(r.now()+o)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();const t=this._innerSubscribe(e),{_infiniteTimeWindow:i,_buffer:s}=this,r=s.slice();for(let o=0;o<r.length&&!e.closed;o+=i?1:2)e.next(r[o]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){const{_bufferSize:e,_timestampProvider:t,_buffer:i,_infiniteTimeWindow:s}=this,r=(s?1:2)*e;if(e<1/0&&r<i.length&&i.splice(0,i.length-r),!s){const o=t.now();let a=0;for(let l=1;l<i.length&&i[l]<=o;l+=2)a=l;a&&i.splice(0,a+1)}}}const kl={schedule(n,e){const t=setTimeout(n,e);return()=>clearTimeout(t)},scheduleBeforeRender(n){if("undefined"==typeof window)return kl.schedule(n,0);if(void 0===window.requestAnimationFrame)return kl.schedule(n,16);const e=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(e)}};let pf;function U1(n,e,t){let i=t;return function L1(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&e.some((s,r)=>!("*"===s||!function V1(n,e){if(!pf){const t=Element.prototype;pf=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&pf.call(n,e)}(n,s)||(i=r,0))),i}class G1{constructor(e,t){this.componentFactory=t.get(Zn).resolveComponentFactory(e)}create(e){return new q1(this.componentFactory,e)}}class q1{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new R1(1),this.events=this.eventEmitters.pipe(function F1(n,e){return it((t,i)=>{let s=null,r=0,o=!1;const a=()=>o&&!s&&i.complete();t.subscribe(tt(i,l=>{null==s||s.unsubscribe();let c=0;const u=r++;zt(n(l,u)).subscribe(s=tt(i,d=>i.next(e?e(l,d,u,c++):d),()=>{s=null,a()}))},()=>{o=!0,a()}))})}(i=>tu(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get(he),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=kl.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(e){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){this.runInZone(()=>{null!==this.componentRef?function j1(n,e){return n===e||n!=n&&e!=e}(t,this.getInputValue(e))&&(void 0!==t||!this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t)})}initializeComponent(e){const t=Ne.create({providers:[],parent:this.injector}),i=function $1(n,e){const t=n.childNodes,i=e.map(()=>[]);let s=-1;e.some((r,o)=>"*"===r&&(s=o,!0));for(let r=0,o=t.length;r<o;++r){const a=t[r],l=U1(a,e,s);-1!==l&&i[l].push(a)}return i}(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,i,e),this.viewChangeDetectorRef=this.componentRef.injector.get(Ph),this.implementsOnChanges=function B1(n){return"function"==typeof n}(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(or).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:e})=>{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e))}),this.initialInputValues.clear()}initializeOutputs(e){const t=this.componentFactory.outputs.map(({propName:i,templateName:s})=>e.instance[i].pipe(wt(o=>({name:s,value:o}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=kl.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[e];if(i)return void(i.currentValue=t);const s=this.unchangedInputs.has(e),r=s?void 0:this.getInputValue(e);this.inputChanges[e]=new kg(r,t,s)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}}class Y1 extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function yo(n,e){const t=function z1(n,e){return e.get(Zn).resolveComponentFactory(n).inputs}(n,e.injector),i=e.strategyFactory||new G1(n,e.injector),s=function H1(n){const e={};return n.forEach(({propName:t,templateName:i})=>{e[function N1(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}(i)]=t}),e}(t);class r extends Y1{constructor(a){super(),this.injector=a}get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||e.injector);t.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(s[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return r.observedAttributes=Object.keys(s),t.forEach(({propName:o})=>{Object.defineProperty(r.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(a){this.ngElementStrategy.setInputValue(o,a)},configurable:!0,enumerable:!0})}),r}let K1=(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=an({type:n,selectors:[["app-hello-world"]],decls:2,vars:0,template:function(t,i){1&t&&(lt(0,"p"),Rn(1,"hello-world works!"),yt())},styles:[""]}),n})(),X1=(()=>{class n{constructor(t){this.http=t}get(t,i){let s=(new Ln).set("tags",t);return i&&(s=s.set("maxEntries",i.toString())),this.http.get("/api/news/get",{params:s})}}return n.\u0275fac=function(t){return new(t||n)(w(lr))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Z1(n,e){if(1&n&&(lt(0,"div"),Vi(1,"div",1)(2,"br"),yt()),2&n){const t=e.$implicit;Yt(1),kn("innerHTML",t.Html,Om)}}let Q1=(()=>{class n{constructor(t){this.news=t,this.tags="none",this.max=null}ngOnInit(){this.setNewsItems()}ngOnChanges(t){(t.tags||t.max)&&this.setNewsItems()}setNewsItems(){this.newsItems$=this.news.get(this.tags,this.max)}}return n.\u0275fac=function(t){return new(t||n)(P(X1))},n.\u0275cmp=an({type:n,selectors:[["app-hotslogs-news"]],inputs:{tags:"tags",max:"max"},features:[ms],decls:2,vars:3,consts:[[4,"ngFor","ngForOf"],[3,"innerHTML"]],template:function(t,i){1&t&&(Xn(0,Z1,3,1,"div",0),tl(1,"async")),2&t&&kn("ngForOf",nl(1,1,i.newsItems$))},directives:[_0],pipes:[El],styles:[""]}),n})();function Ol(n,e,t){const i=W(n)||e||t?{next:n,error:e,complete:t}:n;return i?it((s,r)=>{var o;null===(o=i.subscribe)||void 0===o||o.call(i);let a=!0;s.subscribe(tt(r,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),r.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),r.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),r.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):cs}function Pl(n){return it((e,t)=>{let r,i=null,s=!1;i=e.subscribe(tt(t,void 0,void 0,o=>{r=zt(n(o,Pl(n)(e))),i?(i.unsubscribe(),i=null,r.subscribe(t)):s=!0})),s&&(i.unsubscribe(),i=null,r.subscribe(t))})}const Q0="undefined"==typeof window?function(n){return n()}:window.requestAnimationFrame;function J0(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,r=[];return function(...o){r=i(o),s||(s=!0,Q0.call(window,()=>{s=!1,n.apply(e,r)}))}}const ct=(n,e,t)=>"start"===n?e:"end"===n?t:(e+t)/2;function ti(){}const tN=function(){let n=0;return function(){return n++}}();function le(n){return null==n}function De(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function re(n){return null!==n&&"[object Object]"===Object.prototype.toString.call(n)}const Be=n=>("number"==typeof n||n instanceof Number)&&isFinite(+n);function Qt(n,e){return Be(n)?n:e}function Q(n,e){return void 0===n?e:n}function we(n,e,t){if(n&&"function"==typeof n.call)return n.apply(t,e)}function fe(n,e,t,i){let s,r,o;if(De(n))if(r=n.length,i)for(s=r-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<r;s++)e.call(t,n[s],s);else if(re(n))for(o=Object.keys(n),r=o.length,s=0;s<r;s++)e.call(t,n[o[s]],o[s])}function Rl(n,e){let t,i,s,r;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],r=e[t],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function Fl(n){if(De(n))return n.map(Fl);if(re(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=Fl(n[t[s]]);return e}return n}function tD(n){return-1===["__proto__","prototype","constructor"].indexOf(n)}function iN(n,e,t,i){if(!tD(n))return;const s=e[n],r=t[n];re(s)&&re(r)?vo(s,r,i):e[n]=Fl(r)}function vo(n,e,t){const i=De(e)?e:[e],s=i.length;if(!re(n))return n;const r=(t=t||{}).merger||iN;for(let o=0;o<s;++o){if(!re(e=i[o]))continue;const a=Object.keys(e);for(let l=0,c=a.length;l<c;++l)r(a[l],n,e,t)}return n}function bo(n,e){return vo(n,e,{merger:sN})}function sN(n,e,t){if(!tD(n))return;const i=e[n],s=t[n];re(i)&&re(s)?bo(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=Fl(s))}function nD(n,e){const t=n.indexOf(".",e);return-1===t?n.length:t}function $i(n,e){if(""===e)return n;let t=0,i=nD(e,t);for(;n&&i>t;)n=n[e.substr(t,i-t)],t=i+1,i=nD(e,t);return n}function mf(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Jt=n=>void 0!==n,bi=n=>"function"==typeof n,iD=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0},xe=Math.PI,_e=2*xe,lN=_e+xe,Nl=Number.POSITIVE_INFINITY,cN=xe/180,Pe=xe/2,Do=xe/4,sD=2*xe/3,en=Math.log10,Bn=Math.sign;function rD(n){const e=Math.round(n);n=Co(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(en(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function wo(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Co(n,e,t){return Math.abs(n-e)<t}function oD(n,e,t){let i,s,r;for(i=0,s=n.length;i<s;i++)r=n[i][t],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function bn(n){return n*(xe/180)}function _f(n){return n*(180/xe)}function aD(n){if(!Be(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function lD(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let r=Math.atan2(i,t);return r<-.5*xe&&(r+=_e),{angle:r,distance:s}}function yf(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function hN(n,e){return(n-e+lN)%_e-xe}function Vt(n){return(n%_e+_e)%_e}function Eo(n,e,t,i){const s=Vt(n),r=Vt(e),o=Vt(t),a=Vt(r-s),l=Vt(o-s),c=Vt(s-r),u=Vt(s-o);return s===r||s===o||i&&r===o||a>l&&c<u}function Je(n,e,t){return Math.max(e,Math.min(t,n))}function ni(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}const Ll=n=>0===n||1===n,cD=(n,e,t)=>-Math.pow(2,10*(n-=1))*Math.sin((n-e)*_e/t),uD=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*_e/t)+1,xo={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>1-Math.cos(n*Pe),easeOutSine:n=>Math.sin(n*Pe),easeInOutSine:n=>-.5*(Math.cos(xe*n)-1),easeInExpo:n=>0===n?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>1===n?1:1-Math.pow(2,-10*n),easeInOutExpo:n=>Ll(n)?n:n<.5?.5*Math.pow(2,10*(2*n-1)):.5*(2-Math.pow(2,-10*(2*n-1))),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Ll(n)?n:cD(n,.075,.3),easeOutElastic:n=>Ll(n)?n:uD(n,.075,.3),easeInOutElastic:n=>Ll(n)?n:n<.5?.5*cD(2*n,.1125,.45):.5+.5*uD(2*n-1,.1125,.45),easeInBack:n=>n*n*(2.70158*n-1.70158),easeOutBack:n=>(n-=1)*n*(2.70158*n+1.70158)+1,easeInOutBack(n){let e=1.70158;return(n/=.5)<1?n*n*((1+(e*=1.525))*n-e)*.5:.5*((n-=2)*n*((1+(e*=1.525))*n+e)+2)},easeInBounce:n=>1-xo.easeOutBounce(1-n),easeOutBounce:n=>n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375,easeInOutBounce:n=>n<.5?.5*xo.easeInBounce(2*n):.5*xo.easeOutBounce(2*n-1)+.5},tn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},vf="0123456789ABCDEF",pN=n=>vf[15&n],gN=n=>vf[(240&n)>>4]+vf[15&n],Bl=n=>(240&n)>>4==(15&n);function So(n){return n+.5|0}const Vl=(n,e,t)=>Math.max(Math.min(n,t),e);function Mo(n){return Vl(So(2.55*n),0,255)}function To(n){return Vl(So(255*n),0,255)}function bf(n){return Vl(So(n/2.55)/100,0,1)}function dD(n){return Vl(So(100*n),0,100)}const vN=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,wN=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function hD(n,e,t){const i=e*Math.min(t,1-t),s=(r,o=(r+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function CN(n,e,t){const i=(s,r=(s+n/60)%6)=>t-t*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function EN(n,e,t){const i=hD(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function Df(n){const t=n.r/255,i=n.g/255,s=n.b/255,r=Math.max(t,i,s),o=Math.min(t,i,s),a=(r+o)/2;let l,c,u;return r!==o&&(u=r-o,c=a>.5?u/(2-r-o):u/(r+o),l=r===t?(i-s)/u+(i<s?6:0):r===i?(s-t)/u+2:(t-i)/u+4,l=60*l+.5),[0|l,c||0,a]}function wf(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(To)}function Cf(n,e,t){return wf(hD,n,e,t)}function fD(n){return(n%360+360)%360}const pD={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},gD={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let jl;function Hl(n,e,t){if(n){let i=Df(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,0===e?360:1)),i=Cf(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function mD(n,e){return n&&Object.assign(e||{},n)}function _D(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=To(n[3]))):(e=mD(n,{r:0,g:0,b:0,a:1})).a=To(e.a),e}function ON(n){return"r"===n.charAt(0)?function bN(n){const e=vN.exec(n);let i,s,r,t=255;if(e){if(e[7]!==i){const o=+e[7];t=255&(e[8]?Mo(o):255*o)}return i=+e[1],s=+e[3],r=+e[5],i=255&(e[2]?Mo(i):i),s=255&(e[4]?Mo(s):s),r=255&(e[6]?Mo(r):r),{r:i,g:s,b:r,a:t}}}(n):function MN(n){const e=wN.exec(n);let i,t=255;if(!e)return;e[5]!==i&&(t=e[6]?Mo(+e[5]):To(+e[5]));const s=fD(+e[2]),r=+e[3]/100,o=+e[4]/100;return i="hwb"===e[1]?function xN(n,e,t){return wf(EN,n,e,t)}(s,r,o):"hsv"===e[1]?function SN(n,e,t){return wf(CN,n,e,t)}(s,r,o):Cf(s,r,o),{r:i[0],g:i[1],b:i[2],a:t}}(n)}class zl{constructor(e){if(e instanceof zl)return e;const t=typeof e;let i;"object"===t?i=_D(e):"string"===t&&(i=function _N(n){var t,e=n.length;return"#"===n[0]&&(4===e||5===e?t={r:255&17*tn[n[1]],g:255&17*tn[n[2]],b:255&17*tn[n[3]],a:5===e?17*tn[n[4]]:255}:(7===e||9===e)&&(t={r:tn[n[1]]<<4|tn[n[2]],g:tn[n[3]]<<4|tn[n[4]],b:tn[n[5]]<<4|tn[n[6]],a:9===e?tn[n[7]]<<4|tn[n[8]]:255})),t}(e)||function kN(n){jl||(jl=function IN(){const n={},e=Object.keys(gD),t=Object.keys(pD);let i,s,r,o,a;for(i=0;i<e.length;i++){for(o=a=e[i],s=0;s<t.length;s++)r=t[s],a=a.replace(r,pD[r]);r=parseInt(gD[o],16),n[a]=[r>>16&255,r>>8&255,255&r]}return n}(),jl.transparent=[0,0,0,0]);const e=jl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(e)||ON(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=mD(this._rgb);return e&&(e.a=bf(e.a)),e}set rgb(e){this._rgb=_D(e)}rgbString(){return this._valid?function DN(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${bf(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}(this._rgb):this._rgb}hexString(){return this._valid?function yN(n){var e=function mN(n){return Bl(n.r)&&Bl(n.g)&&Bl(n.b)&&Bl(n.a)}(n)?pN:gN;return n&&"#"+e(n.r)+e(n.g)+e(n.b)+(n.a<255?e(n.a):"")}(this._rgb):this._rgb}hslString(){return this._valid?function AN(n){if(!n)return;const e=Df(n),t=e[0],i=dD(e[1]),s=dD(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${bf(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}(this._rgb):this._rgb}mix(e,t){const i=this;if(e){const s=i.rgb,r=e.rgb;let o;const a=t===o?.5:t,l=2*a-1,c=s.a-r.a,u=((l*c==-1?l:(l+c)/(1+l*c))+1)/2;o=1-u,s.r=255&u*s.r+o*r.r+.5,s.g=255&u*s.g+o*r.g+.5,s.b=255&u*s.b+o*r.b+.5,s.a=a*s.a+(1-a)*r.a,i.rgb=s}return i}clone(){return new zl(this.rgb)}alpha(e){return this._rgb.a=To(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=So(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Hl(this._rgb,2,e),this}darken(e){return Hl(this._rgb,2,-e),this}saturate(e){return Hl(this._rgb,1,e),this}desaturate(e){return Hl(this._rgb,1,-e),this}rotate(e){return function TN(n,e){var t=Df(n);t[0]=fD(t[0]+e),t=Cf(t),n.r=t[0],n.g=t[1],n.b=t[2]}(this._rgb,e),this}}function yD(n){return new zl(n)}const vD=n=>n instanceof CanvasGradient||n instanceof CanvasPattern;function bD(n){return vD(n)?n:yD(n)}function Ef(n){return vD(n)?n:yD(n).saturate(.5).darken(.1).hexString()}const Ui=Object.create(null),xf=Object.create(null);function Ao(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;i<s;++i){const r=t[i];n=n[r]||(n[r]=Object.create(null))}return n}function Sf(n,e,t){return"string"==typeof e?vo(Ao(n,e),t):vo(Ao(n,""),e)}var oe=new class PN{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>Ef(i.backgroundColor),this.hoverBorderColor=(t,i)=>Ef(i.borderColor),this.hoverColor=(t,i)=>Ef(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return Sf(this,e,t)}get(e){return Ao(this,e)}describe(e,t){return Sf(xf,e,t)}override(e,t){return Sf(Ui,e,t)}route(e,t,i,s){const r=Ao(this,e),o=Ao(this,i),a="_"+t;Object.defineProperties(r,{[a]:{value:r[t],writable:!0},[t]:{enumerable:!0,get(){const l=this[a],c=o[s];return re(l)?Object.assign({},c,l):Q(l,c)},set(l){this[a]=l}}})}}({_scriptable:n=>!n.startsWith("on"),_indexable:n=>"events"!==n,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function $l(n,e,t,i,s){let r=e[s];return r||(r=e[s]=n.measureText(s).width,t.push(s)),r>i&&(i=r),i}function FN(n,e,t,i){let s=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},r=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const a=t.length;let l,c,u,d,h;for(l=0;l<a;l++)if(d=t[l],null!=d&&!0!==De(d))o=$l(n,s,r,o,d);else if(De(d))for(c=0,u=d.length;c<u;c++)h=d[c],null!=h&&!De(h)&&(o=$l(n,s,r,o,h));n.restore();const f=r.length/2;if(f>t.length){for(l=0;l<f;l++)delete s[r[l]];r.splice(0,f)}return o}function Wi(n,e,t){const i=n.currentDevicePixelRatio,s=0!==t?Math.max(t/2,.5):0;return Math.round((e-s)*i)/i+s}function DD(n,e){(e=e||n.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,n.width,n.height),e.restore()}function Ul(n,e,t,i){let s,r,o,a,l;const c=e.pointStyle,u=e.rotation,d=e.radius;let h=(u||0)*cN;if(c&&"object"==typeof c&&(s=c.toString(),"[object HTMLImageElement]"===s||"[object HTMLCanvasElement]"===s))return n.save(),n.translate(t,i),n.rotate(h),n.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void n.restore();if(!(isNaN(d)||d<=0)){switch(n.beginPath(),c){default:n.arc(t,i,d,0,_e),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(h)*d,i-Math.cos(h)*d),h+=sD,n.lineTo(t+Math.sin(h)*d,i-Math.cos(h)*d),h+=sD,n.lineTo(t+Math.sin(h)*d,i-Math.cos(h)*d),n.closePath();break;case"rectRounded":l=.516*d,a=d-l,r=Math.cos(h+Do)*a,o=Math.sin(h+Do)*a,n.arc(t-r,i-o,l,h-xe,h-Pe),n.arc(t+o,i-r,l,h-Pe,h),n.arc(t+r,i+o,l,h,h+Pe),n.arc(t-o,i+r,l,h+Pe,h+xe),n.closePath();break;case"rect":if(!u){a=Math.SQRT1_2*d,n.rect(t-a,i-a,2*a,2*a);break}h+=Do;case"rectRot":r=Math.cos(h)*d,o=Math.sin(h)*d,n.moveTo(t-r,i-o),n.lineTo(t+o,i-r),n.lineTo(t+r,i+o),n.lineTo(t-o,i+r),n.closePath();break;case"crossRot":h+=Do;case"cross":r=Math.cos(h)*d,o=Math.sin(h)*d,n.moveTo(t-r,i-o),n.lineTo(t+r,i+o),n.moveTo(t+o,i-r),n.lineTo(t-o,i+r);break;case"star":r=Math.cos(h)*d,o=Math.sin(h)*d,n.moveTo(t-r,i-o),n.lineTo(t+r,i+o),n.moveTo(t+o,i-r),n.lineTo(t-o,i+r),h+=Do,r=Math.cos(h)*d,o=Math.sin(h)*d,n.moveTo(t-r,i-o),n.lineTo(t+r,i+o),n.moveTo(t+o,i-r),n.lineTo(t-o,i+r);break;case"line":r=Math.cos(h)*d,o=Math.sin(h)*d,n.moveTo(t-r,i-o),n.lineTo(t+r,i+o);break;case"dash":n.moveTo(t,i),n.lineTo(t+Math.cos(h)*d,i+Math.sin(h)*d)}n.fill(),e.borderWidth>0&&n.stroke()}}function Gi(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.x<e.right+t&&n.y>e.top-t&&n.y<e.bottom+t}function Wl(n,e){n.save(),n.beginPath(),n.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),n.clip()}function Gl(n){n.restore()}function NN(n,e,t,i,s){if(!e)return n.lineTo(t.x,t.y);if("middle"===s){const r=(e.x+t.x)/2;n.lineTo(r,e.y),n.lineTo(r,t.y)}else"after"===s!=!!i?n.lineTo(e.x,t.y):n.lineTo(t.x,e.y);n.lineTo(t.x,t.y)}function LN(n,e,t,i){if(!e)return n.lineTo(t.x,t.y);n.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?t.cp2x:t.cp1x,i?t.cp2y:t.cp1y,t.x,t.y)}function qi(n,e,t,i,s,r={}){const o=De(e)?e:[e],a=r.strokeWidth>0&&""!==r.strokeColor;let l,c;for(n.save(),n.font=s.string,function BN(n,e){e.translation&&n.translate(e.translation[0],e.translation[1]),le(e.rotation)||n.rotate(e.rotation),e.color&&(n.fillStyle=e.color),e.textAlign&&(n.textAlign=e.textAlign),e.textBaseline&&(n.textBaseline=e.textBaseline)}(n,r),l=0;l<o.length;++l)c=o[l],a&&(r.strokeColor&&(n.strokeStyle=r.strokeColor),le(r.strokeWidth)||(n.lineWidth=r.strokeWidth),n.strokeText(c,t,i,r.maxWidth)),n.fillText(c,t,i,r.maxWidth),VN(n,t,i,c,r),i+=s.lineHeight;n.restore()}function VN(n,e,t,i,s){if(s.strikethrough||s.underline){const r=n.measureText(i),o=e-r.actualBoundingBoxLeft,a=e+r.actualBoundingBoxRight,l=t-r.actualBoundingBoxAscent,c=t+r.actualBoundingBoxDescent,u=s.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(o,u),n.lineTo(a,u),n.stroke()}}function ql(n,e){const{x:t,y:i,w:s,h:r,radius:o}=e;n.arc(t+o.topLeft,i+o.topLeft,o.topLeft,-Pe,xe,!0),n.lineTo(t,i+r-o.bottomLeft),n.arc(t+o.bottomLeft,i+r-o.bottomLeft,o.bottomLeft,xe,Pe,!0),n.lineTo(t+s-o.bottomRight,i+r),n.arc(t+s-o.bottomRight,i+r-o.bottomRight,o.bottomRight,Pe,0,!0),n.lineTo(t+s,i+o.topRight),n.arc(t+s-o.topRight,i+o.topRight,o.topRight,0,-Pe,!0),n.lineTo(t+o.topLeft,i)}const jN=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),HN=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function zN(n,e){const t=(""+n).match(jN);if(!t||"normal"===t[1])return 1.2*e;switch(n=+t[2],t[3]){case"px":return n;case"%":n/=100}return e*n}const $N=n=>+n||0;function Mf(n,e){const t={},i=re(e),s=i?Object.keys(e):e,r=re(n)?i?o=>Q(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=$N(r(o));return t}function wD(n){return Mf(n,{top:"y",right:"x",bottom:"y",left:"x"})}function cr(n){return Mf(n,["topLeft","topRight","bottomLeft","bottomRight"])}function ut(n){const e=wD(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ke(n,e){let t=Q((n=n||{}).size,(e=e||oe.font).size);"string"==typeof t&&(t=parseInt(t,10));let i=Q(n.style,e.style);i&&!(""+i).match(HN)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:Q(n.family,e.family),lineHeight:zN(Q(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:Q(n.weight,e.weight),string:""};return s.string=function RN(n){return!n||le(n.size)||le(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}(s),s}function Io(n,e,t,i){let r,o,a,s=!0;for(r=0,o=n.length;r<o;++r)if(a=n[r],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),s=!1),void 0!==t&&De(a)&&(a=a[t%a.length],s=!1),void 0!==a))return i&&!s&&(i.cacheable=!1),a}function Di(n,e){return Object.assign(Object.create(n),e)}function Tf(n,e,t){t=t||(o=>n[o]<e);let r,i=n.length-1,s=0;for(;i-s>1;)r=s+i>>1,t(r)?s=r:i=r;return{lo:s,hi:i}}const ii=(n,e,t)=>Tf(n,t,i=>n[i][e]<t),WN=(n,e,t)=>Tf(n,t,i=>n[i][e]>=t),CD=["push","pop","shift","splice","unshift"];function ED(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);-1!==s&&i.splice(s,1),!(i.length>0)&&(CD.forEach(r=>{delete n[r]}),delete n._chartjs)}function Af(n,e=[""],t=n,i,s=(()=>n[0])){Jt(i)||(i=ID("_fallback",n));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Af([o,...n],e,t,i)};return new Proxy(r,{deleteProperty:(o,a)=>(delete o[a],delete o._keys,delete n[0][a],!0),get:(o,a)=>MD(o,a,()=>function tL(n,e,t,i){let s;for(const r of e)if(s=ID(YN(r,n),t),Jt(s))return If(n,s)?kf(t,i,n,s):s}(a,e,n,o)),getOwnPropertyDescriptor:(o,a)=>Reflect.getOwnPropertyDescriptor(o._scopes[0],a),getPrototypeOf:()=>Reflect.getPrototypeOf(n[0]),has:(o,a)=>kD(o).includes(a),ownKeys:o=>kD(o),set(o,a,l){const c=o._storage||(o._storage=s());return o[a]=c[a]=l,delete o._keys,!0}})}function ur(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:SD(n,i),setContext:r=>ur(n,r,t,i),override:r=>ur(n.override(r),e,t,i)};return new Proxy(s,{deleteProperty:(r,o)=>(delete r[o],delete n[o],!0),get:(r,o,a)=>MD(r,o,()=>function KN(n,e,t){const{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=n;let a=i[e];return bi(a)&&o.isScriptable(e)&&(a=function XN(n,e,t,i){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=t;if(a.has(n))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+n);return a.add(n),e=e(r,o||i),a.delete(n),If(n,e)&&(e=kf(s._scopes,s,n,e)),e}(e,a,n,t)),De(a)&&a.length&&(a=function ZN(n,e,t,i){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=t;if(Jt(r.index)&&i(n))e=e[r.index%e.length];else if(re(e[0])){const l=e,c=s._scopes.filter(u=>u!==l);e=[];for(const u of l){const d=kf(c,s,n,u);e.push(ur(d,r,o&&o[n],a))}}return e}(e,a,n,o.isIndexable)),If(e,a)&&(a=ur(a,s,r&&r[e],o)),a}(r,o,a)),getOwnPropertyDescriptor:(r,o)=>r._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o),getPrototypeOf:()=>Reflect.getPrototypeOf(n),has:(r,o)=>Reflect.has(n,o),ownKeys:()=>Reflect.ownKeys(n),set:(r,o,a)=>(n[o]=a,delete r[o],!0)})}function SD(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:bi(t)?t:()=>t,isIndexable:bi(i)?i:()=>i}}const YN=(n,e)=>n?n+mf(e):e,If=(n,e)=>re(e)&&"adapters"!==n&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function MD(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function TD(n,e,t){return bi(n)?n(e,t):n}const QN=(n,e)=>!0===n?e:"string"==typeof n?$i(e,n):void 0;function JN(n,e,t,i,s){for(const r of e){const o=QN(t,r);if(o){n.add(o);const a=TD(o._fallback,t,s);if(Jt(a)&&a!==t&&a!==i)return a}else if(!1===o&&Jt(i)&&t!==i)return null}return!1}function kf(n,e,t,i){const s=e._rootScopes,r=TD(e._fallback,t,i),o=[...n,...s],a=new Set;a.add(i);let l=AD(a,o,t,r||t,i);return!(null===l||Jt(r)&&r!==t&&(l=AD(a,o,r,l,i),null===l))&&Af(Array.from(a),[""],s,r,()=>function eL(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return De(s)&&re(t)?t:s}(e,t,i))}function AD(n,e,t,i,s){for(;t;)t=JN(n,e,t,i,s);return t}function ID(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Jt(i))return i}}function kD(n){let e=n._keys;return e||(e=n._keys=function nL(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}(n._scopes)),e}const iL=Number.EPSILON||1e-14,dr=(n,e)=>e<n.length&&!n[e].skip&&n[e],OD=n=>"x"===n?"y":"x";function sL(n,e,t,i){const s=n.skip?e:n,r=e,o=t.skip?e:t,a=yf(r,s),l=yf(o,r);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,h=i*u;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+h*(o.x-s.x),y:r.y+h*(o.y-s.y)}}}function Yl(n,e,t){return Math.max(Math.min(n,t),e)}function cL(n,e,t,i,s){let r,o,a,l;if(e.spanGaps&&(n=n.filter(c=>!c.skip)),"monotone"===e.cubicInterpolationMode)!function aL(n,e="x"){const t=OD(e),i=n.length,s=Array(i).fill(0),r=Array(i);let o,a,l,c=dr(n,0);for(o=0;o<i;++o)if(a=l,l=c,c=dr(n,o+1),l){if(c){const u=c[e]-l[e];s[o]=0!==u?(c[t]-l[t])/u:0}r[o]=a?c?Bn(s[o-1])!==Bn(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}(function rL(n,e,t){const i=n.length;let s,r,o,a,l,c=dr(n,0);for(let u=0;u<i-1;++u)if(l=c,c=dr(n,u+1),l&&c){if(Co(e[u],0,iL)){t[u]=t[u+1]=0;continue}s=t[u]/e[u],r=t[u+1]/e[u],a=Math.pow(s,2)+Math.pow(r,2),!(a<=9)&&(o=3/Math.sqrt(a),t[u]=s*o*e[u],t[u+1]=r*o*e[u])}})(n,s,r),function oL(n,e,t="x"){const i=OD(t),s=n.length;let r,o,a,l=dr(n,0);for(let c=0;c<s;++c){if(o=a,a=l,l=dr(n,c+1),!a)continue;const u=a[t],d=a[i];o&&(r=(u-o[t])/3,a[`cp1${t}`]=u-r,a[`cp1${i}`]=d-r*e[c]),l&&(r=(l[t]-u)/3,a[`cp2${t}`]=u+r,a[`cp2${i}`]=d+r*e[c])}}(n,r,e)}(n,s);else{let c=i?n[n.length-1]:n[0];for(r=0,o=n.length;r<o;++r)a=n[r],l=sL(c,a,n[Math.min(r+1,o-(i?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}e.capBezierPoints&&function lL(n,e){let t,i,s,r,o,a=Gi(n[0],e);for(t=0,i=n.length;t<i;++t)o=r,r=a,a=t<i-1&&Gi(n[t+1],e),r&&(s=n[t],o&&(s.cp1x=Yl(s.cp1x,e.left,e.right),s.cp1y=Yl(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=Yl(s.cp2x,e.left,e.right),s.cp2y=Yl(s.cp2y,e.top,e.bottom)))}(n,t)}function PD(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Of(n){let e=n.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Kl(n,e,t){let i;return"string"==typeof n?(i=parseInt(n,10),-1!==n.indexOf("%")&&(i=i/100*e.parentNode[t])):i=n,i}const Xl=n=>window.getComputedStyle(n,null),dL=["top","right","bottom","left"];function Yi(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const r=dL[s];i[r]=parseFloat(n[e+"-"+r+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function RD(n,e){const{canvas:t,currentDevicePixelRatio:i}=e,s=Xl(t),r="border-box"===s.boxSizing,o=Yi(s,"padding"),a=Yi(s,"border","width"),{x:l,y:c,box:u}=function fL(n,e){const t=n.native||n,i=t.touches,s=i&&i.length?i[0]:t,{offsetX:r,offsetY:o}=s;let l,c,a=!1;if(((n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot))(r,o,t.target))l=r,c=o;else{const u=e.getBoundingClientRect();l=s.clientX-u.left,c=s.clientY-u.top,a=!0}return{x:l,y:c,box:a}}(n,t),d=o.left+(u&&a.left),h=o.top+(u&&a.top);let{width:f,height:p}=e;return r&&(f-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-d)/f*t.width/i),y:Math.round((c-h)/p*t.height/i)}}const Pf=n=>Math.round(10*n)/10;function FD(n,e,t){const i=e||1,s=Math.floor(n.height*i),r=Math.floor(n.width*i);n.height=s/i,n.width=r/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),(n.currentDevicePixelRatio!==i||o.height!==s||o.width!==r)&&(n.currentDevicePixelRatio=i,o.height=s,o.width=r,n.ctx.setTransform(i,0,0,i,0,0),!0)}const mL=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}return n}();function ND(n,e){const t=function uL(n,e){return Xl(n).getPropertyValue(e)}(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ki(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function _L(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:"middle"===i?t<.5?n.y:e.y:"after"===i?t<1?n.y:e.y:t>0?e.y:n.y}}function yL(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},r={x:e.cp1x,y:e.cp1y},o=Ki(n,s,t),a=Ki(s,r,t),l=Ki(r,e,t),c=Ki(o,a,t),u=Ki(a,l,t);return Ki(c,u,t)}const LD=new Map;function ko(n,e,t){return function vL(n,e){e=e||{};const t=n+JSON.stringify(e);let i=LD.get(t);return i||(i=new Intl.NumberFormat(n,e),LD.set(t,i)),i}(e,t).format(n)}function hr(n,e,t){return n?function(n,e){return{x:t=>n+n+e-t,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,i)=>t-i,leftForLtr:(t,i)=>t-i}}(e,t):{x:n=>n,setWidth(n){},textAlign:n=>n,xPlus:(n,e)=>n+e,leftForLtr:(n,e)=>n}}function jD(n){return"angle"===n?{between:Eo,compare:hN,normalize:Vt}:{between:ni,compare:(e,t)=>e-t,normalize:e=>e}}function HD({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t==0,style:s}}function zD(n,e,t){if(!t)return[n];const{property:i,start:s,end:r}=t,o=e.length,{compare:a,between:l,normalize:c}=jD(i),{start:u,end:d,loop:h,style:f}=function wL(n,e,t){const{property:i,start:s,end:r}=t,{between:o,normalize:a}=jD(i),l=e.length;let h,f,{start:c,end:u,loop:d}=n;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&o(a(e[c%l][i]),s,r);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}(n,e,t),p=[];let _,y,b,g=!1,m=null;for(let M=u,k=u;M<=d;++M)y=e[M%o],!y.skip&&(_=c(y[i]),_!==b&&(g=l(_,s,r),null===m&&(g||l(s,b,_)&&0!==a(s,b))&&(m=0===a(_,s)?M:k),null!==m&&(!g||0===a(r,_)||l(r,b,_))&&(p.push(HD({start:m,end:M,loop:h,count:o,style:f})),m=null),k=M,b=_));return null!==m&&p.push(HD({start:m,end:d,loop:h,count:o,style:f})),p}function $D(n,e){const t=[],i=n.segments;for(let s=0;s<i.length;s++){const r=zD(i[s],n.points,e);r.length&&t.push(...r)}return t}function WD(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function ML(n,e){return e&&JSON.stringify(n)!==JSON.stringify(e)}var si=new class TL{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const o=t.duration;t.listeners[s].forEach(a=>a({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Q0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let l,o=r.length-1,a=!1;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,e,"progress")),r.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=r.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}};const GD="transparent",AL={boolean:(n,e,t)=>t>.5?e:n,color(n,e,t){const i=bD(n||GD),s=i.valid&&bD(e||GD);return s&&s.valid?s.mix(i,t).hexString():e},number:(n,e,t)=>n+(e-n)*t};class IL{constructor(e,t,i,s){const r=t[i];s=Io([e.to,s,r,e.from]);const o=Io([e.from,r,s]);this._active=!0,this._fn=e.fn||AL[e.type||typeof o],this._easing=xo[e.easing]||xo.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=Io([e.to,t,s,e.from]),this._from=Io([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||t<i),!this._active)return this._target[s]=a,void this._notify(!0);t<0?this._target[s]=r:(l=t/i%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l))}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}oe.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const PL=Object.keys(oe.animation);oe.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>"onProgress"!==n&&"onComplete"!==n&&"fn"!==n}),oe.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),oe.describe("animations",{_fallback:"animation"}),oe.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>0|n}}}});class qD{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!re(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!re(s))return;const r={};for(const o of PL)r[o]=s[o];(De(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,r)})})}_animateOptions(e,t){const i=t.options,s=function FL(n,e){if(!e)return;let t=n.options;if(t)return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;n.options=e}(e,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&function RL(n,e){const t=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const r=n[i[s]];r&&r.active()&&t.push(r.wait())}return Promise.all(t)}(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,t){const i=this._properties,s=[],r=e.$animations||(e.$animations={}),o=Object.keys(t),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if("$"===c.charAt(0))continue;if("options"===c){s.push(...this._animateOptions(e,t));continue}const u=t[c];let d=r[c];const h=i.get(c);if(d){if(h&&d.active()){d.update(h,u,a);continue}d.cancel()}h&&h.duration?(r[c]=d=new IL(h,e,c,u),s.push(d)):e[c]=u}return s}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const i=this._createAnimations(e,t);return i.length?(si.add(this._chart,i),!0):void 0}}function YD(n,e){const t=n&&n.options||{},i=t.reverse,s=void 0===t.min?e:0,r=void 0===t.max?e:0;return{start:i?r:s,end:i?s:r}}function KD(n,e){const t=[],i=n._getSortedDatasetMetas(e);let s,r;for(s=0,r=i.length;s<r;++s)t.push(i[s].index);return t}function XD(n,e,t,i={}){const s=n.keys,r="single"===i.mode;let o,a,l,c;if(null!==e){for(o=0,a=s.length;o<a;++o){if(l=+s[o],l===t){if(i.all)continue;break}c=n.values[l],Be(c)&&(r||0===e||Bn(e)===Bn(c))&&(e+=c)}return e}}function ZD(n,e){const t=n&&n.options.stacked;return t||void 0===t&&void 0!==e.stack}function HL(n,e,t){const i=n[e]||(n[e]={});return i[t]||(i[t]={})}function QD(n,e,t,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const r=n[s.index];if(t&&r>0||!t&&r<0)return s.index}return null}function JD(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:r,vScale:o,index:a}=i,l=r.axis,c=o.axis,u=function VL(n,e,t){return`${n.id}.${e.id}.${t.stack||t.type}`}(r,o,i),d=e.length;let h;for(let f=0;f<d;++f){const p=e[f],{[l]:g,[c]:m}=p;h=(p._stacks||(p._stacks={}))[c]=HL(s,u,g),h[a]=m,h._top=QD(h,o,!0,i.type),h._bottom=QD(h,o,!1,i.type)}}function Rf(n,e){const t=n.scales;return Object.keys(t).filter(i=>t[i].axis===e).shift()}function Oo(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const r=s._stacks;if(!r||void 0===r[i]||void 0===r[i][t])return;delete r[i][t]}}}const Ff=n=>"reset"===n||"none"===n,ew=(n,e)=>e?n:Object.assign({},n);let ri=(()=>{class n{constructor(t,i){this.chart=t,this._ctx=t.ctx,this.index=i,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ZD(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Oo(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,i=this._cachedMeta,s=this.getDataset(),r=(h,f,p,g)=>"x"===h?f:"r"===h?g:p,o=i.xAxisID=Q(s.xAxisID,Rf(t,"x")),a=i.yAxisID=Q(s.yAxisID,Rf(t,"y")),l=i.rAxisID=Q(s.rAxisID,Rf(t,"r")),c=i.indexAxis,u=i.iAxisID=r(c,o,a,l),d=i.vAxisID=r(c,a,o,l);i.xScale=this.getScaleForId(o),i.yScale=this.getScaleForId(a),i.rScale=this.getScaleForId(l),i.iScale=this.getScaleForId(u),i.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const i=this._cachedMeta;return t===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ED(this._data,this),t._stacked&&Oo(t)}_dataCheck(){const t=this.getDataset(),i=t.data||(t.data=[]),s=this._data;if(re(i))this._data=function BL(n){const e=Object.keys(n),t=new Array(e.length);let i,s,r;for(i=0,s=e.length;i<s;++i)r=e[i],t[i]={x:r,y:n[r]};return t}(i);else if(s!==i){if(s){ED(s,this);const r=this._cachedMeta;Oo(r),r._parsed=[]}i&&Object.isExtensible(i)&&function qN(n,e){n._chartjs?n._chartjs.listeners.push(e):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),CD.forEach(t=>{const i="_onData"+mf(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...r){const o=s.apply(this,r);return n._chartjs.listeners.forEach(a=>{"function"==typeof a[i]&&a[i](...r)}),o}})}))}(i,this),this._syncList=[],this._data=i}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const i=this._cachedMeta,s=this.getDataset();let r=!1;this._dataCheck();const o=i._stacked;i._stacked=ZD(i.vScale,i),i.stack!==s.stack&&(r=!0,Oo(i),i.stack=s.stack),this._resyncElements(t),(r||o!==i._stacked)&&JD(this,i._parsed)}configure(){const t=this.chart.config,i=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),i,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,i){const{_cachedMeta:s,_data:r}=this,{iScale:o,_stacked:a}=s,l=o.axis;let d,h,f,c=0===t&&i===r.length||s._sorted,u=t>0&&s._parsed[t-1];if(!1===this._parsing)s._parsed=r,s._sorted=!0,f=r;else{f=De(r[t])?this.parseArrayData(s,r,t,i):re(r[t])?this.parseObjectData(s,r,t,i):this.parsePrimitiveData(s,r,t,i);const p=()=>null===h[l]||u&&h[l]<u[l];for(d=0;d<i;++d)s._parsed[d+t]=h=f[d],c&&(p()&&(c=!1),u=h);s._sorted=c}a&&JD(this,f)}parsePrimitiveData(t,i,s,r){const{iScale:o,vScale:a}=t,l=o.axis,c=a.axis,u=o.getLabels(),d=o===a,h=new Array(r);let f,p,g;for(f=0,p=r;f<p;++f)g=f+s,h[f]={[l]:d||o.parse(u[g],g),[c]:a.parse(i[g],g)};return h}parseArrayData(t,i,s,r){const{xScale:o,yScale:a}=t,l=new Array(r);let c,u,d,h;for(c=0,u=r;c<u;++c)d=c+s,h=i[d],l[c]={x:o.parse(h[0],d),y:a.parse(h[1],d)};return l}parseObjectData(t,i,s,r){const{xScale:o,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=new Array(r);let d,h,f,p;for(d=0,h=r;d<h;++d)f=d+s,p=i[f],u[d]={x:o.parse($i(p,l),f),y:a.parse($i(p,c),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,i,s){const o=this._cachedMeta,a=i[t.axis];return XD({keys:KD(this.chart,!0),values:i._stacks[t.axis]},a,o.index,{mode:s})}updateRangeFromParsed(t,i,s,r){const o=s[i.axis];let a=null===o?NaN:o;const l=r&&s._stacks[i.axis];r&&l&&(r.values=l,a=XD(r,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,i){const s=this._cachedMeta,r=s._parsed,o=s._sorted&&t===s.iScale,a=r.length,l=this._getOtherScale(t),c=((n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:KD(this.chart,!0),values:null})(i,s),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:h}=function jL(n){const{min:e,max:t,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}(l);let f,p;function g(){p=r[f];const m=p[l.axis];return!Be(p[t.axis])||d>m||h<m}for(f=0;f<a&&(g()||(this.updateRangeFromParsed(u,t,p,c),!o));++f);if(o)for(f=a-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(u,t,p,c);break}return u}getAllParsedValues(t){const i=this._cachedMeta._parsed,s=[];let r,o,a;for(r=0,o=i.length;r<o;++r)a=i[r][t.axis],Be(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const i=this._cachedMeta,s=i.iScale,r=i.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(t){const i=this._cachedMeta;this.update(t||"default"),i._clip=function LL(n){let e,t,i,s;return re(n)?(e=n.top,t=n.right,i=n.bottom,s=n.left):e=t=i=s=n,{top:e,right:t,bottom:i,left:s,disabled:!1===n}}(Q(this.options.clip,function NL(n,e,t){if(!1===t)return!1;const i=YD(n,t),s=YD(e,t);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}(i.xScale,i.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,s=this._cachedMeta,r=s.data||[],o=this.chart.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||r.length-l,u=this.options.drawActiveElementsOnTop;let d;for(s.dataset&&s.dataset.draw(t,o,l,c),d=l;d<l+c;++d){const h=r[d];h.hidden||(h.active&&u?a.push(h):h.draw(t,o))}for(d=0;d<a.length;++d)a[d].draw(t,o)}getStyle(t,i){const s=i?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,i,s){const r=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=function $L(n,e,t){return Di(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=r.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=function zL(n,e){return Di(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!i,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,i){return this._resolveElementOptions(this.dataElementType.id,i,t)}_resolveElementOptions(t,i="default",s){const r="active"===i,o=this._cachedDataOpts,a=t+"-"+i,l=o[a],c=this.enableOptionSharing&&Jt(s);if(l)return ew(l,c);const u=this.chart.config,d=u.datasetElementScopeKeys(this._type,t),h=r?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),d),p=Object.keys(oe.elements[t]),m=u.resolveNamedOptions(f,p,()=>this.getContext(s,r),h);return m.$shared&&(m.$shared=c,o[a]=Object.freeze(ew(m,c))),m}_resolveAnimations(t,i,s){const r=this.chart,o=this._cachedDataOpts,a=`animation-${i}`,l=o[a];if(l)return l;let c;if(!1!==r.options.animation){const d=this.chart.config,h=d.datasetAnimationScopeKeys(this._type,i),f=d.getOptionScopes(this.getDataset(),h);c=d.createResolver(f,this.getContext(t,s,i))}const u=new qD(r,c&&c.animations);return c&&c._cacheable&&(o[a]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,i){return!i||Ff(t)||this.chart._animationsDisabled}updateElement(t,i,s,r){Ff(r)?Object.assign(t,s):this._resolveAnimations(i,r).update(t,s)}updateSharedOptions(t,i,s){t&&!Ff(i)&&this._resolveAnimations(void 0,i).update(t,s)}_setStyle(t,i,s,r){t.active=r;const o=this.getStyle(i,r);this._resolveAnimations(i,s,r).update(t,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(t,i,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,i,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const i=this._data,s=this._cachedMeta.data;for(const[l,c,u]of this._syncList)this[l](c,u);this._syncList=[];const r=s.length,o=i.length,a=Math.min(o,r);a&&this.parse(0,a),o>r?this._insertElements(r,o-r,t):o<r&&this._removeElements(o,r-o)}_insertElements(t,i,s=!0){const r=this._cachedMeta,o=r.data,a=t+i;let l;const c=u=>{for(u.length+=i,l=u.length-1;l>=a;l--)u[l]=u[l-i]};for(c(o),l=t;l<a;++l)o[l]=new this.dataElementType;this._parsing&&c(r._parsed),this.parse(t,i),s&&this.updateElements(o,t,i,"reset")}updateElements(t,i,s,r){}_removeElements(t,i){const s=this._cachedMeta;if(this._parsing){const r=s._parsed.splice(t,i);s._stacked&&Oo(s,r)}s.data.splice(t,i)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[i,s,r]=t;this[i](s,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,i){i&&this._sync(["_removeElements",t,i]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return n.defaults={},n})();ri.prototype.datasetElementType=null,ri.prototype.dataElementType=null;let Zl=(()=>{class n extends ri{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const i=this._cachedMeta,{dataset:s,data:r=[],_dataset:o}=i,a=this.chart._animationsDisabled;let{start:l,count:c}=function sB(n,e,t){const i=e.length;let s=0,r=i;if(n._sorted){const{iScale:o,_parsed:a}=n,l=o.axis,{min:c,max:u,minDefined:d,maxDefined:h}=o.getUserBounds();d&&(s=Je(Math.min(ii(a,o.axis,c).lo,t?i:ii(e,l,o.getPixelForValue(c)).lo),0,i-1)),r=h?Je(Math.max(ii(a,o.axis,u).hi+1,t?0:ii(e,l,o.getPixelForValue(u)).hi+1),s,i)-s:i-s}return{start:s,count:r}}(i,r,a);this._drawStart=l,this._drawCount=c,function rB(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const r=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),r}(i)&&(l=0,c=r.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=r;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:u},t),this.updateElements(r,l,c,t)}updateElements(t,i,s,r){const o="reset"===r,{iScale:a,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,d=this.resolveDataElementOptions(i,r),h=this.getSharedOptions(d),f=this.includeOptions(r,h),p=a.axis,g=l.axis,{spanGaps:m,segment:_}=this.options,y=wo(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===r;let v=i>0&&this.getParsed(i-1);for(let D=i;D<i+s;++D){const E=t[D],x=this.getParsed(D),M=b?E:{},k=le(x[g]),G=M[p]=a.getPixelForValue(x[p],D),J=M[g]=o||k?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,x,c):x[g],D);M.skip=isNaN(G)||isNaN(J)||k,M.stop=D>0&&x[p]-v[p]>y,_&&(M.parsed=x,M.raw=u.data[D]),f&&(M.options=h||this.resolveDataElementOptions(D,E.active?"active":r)),b||this.updateElement(E,D,M,r),v=x}this.updateSharedOptions(h,r,d)}getMaxOverflow(){const t=this._cachedMeta,i=t.dataset,s=i.options&&i.options.borderWidth||0,r=t.data||[];if(!r.length)return s;const o=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(s,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return n.id="line",n.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},n.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}},n})();function Xi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var aB={_date:(()=>{class n{constructor(t){this.options=t||{}}formats(){return Xi()}parse(t,i){return Xi()}format(t,i){return Xi()}add(t,i,s){return Xi()}diff(t,i,s){return Xi()}startOf(t,i,s){return Xi()}endOf(t,i){return Xi()}}return n.override=function(e){Object.assign(n.prototype,e)},n})()};function Po(n,e){return"native"in n?{x:n.x,y:n.y}:RD(n,e)}function cB(n,e,t,i){const{controller:s,data:r,_sorted:o}=n,a=s._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&o&&r.length){const l=a._reversePixels?WN:ii;if(!i)return l(r,e,t);if(s._sharedOptions){const c=r[0],u="function"==typeof c.getRange&&c.getRange(e);if(u){const d=l(r,e,t-u),h=l(r,e,t+u);return{lo:d.lo,hi:h.hi}}}}return{lo:0,hi:r.length-1}}function Lf(n,e,t,i,s){const r=n.getSortedVisibleDatasetMetas(),o=t[e];for(let a=0,l=r.length;a<l;++a){const{index:c,data:u}=r[a],{lo:d,hi:h}=cB(r[a],e,o,s);for(let f=d;f<=h;++f){const p=u[f];p.skip||i(p,c,f)}}}function Bf(n,e,t,i){const s=[];return Gi(e,n.chartArea,n._minPadding)&&Lf(n,t,e,function(o,a,l){o.inRange(e.x,e.y,i)&&s.push({element:o,datasetIndex:a,index:l})},!0),s}function Vf(n,e,t,i,s){return Gi(e,n.chartArea,n._minPadding)?"r"!==t||i?function hB(n,e,t,i,s){let r=[];const o=function uB(n){const e=-1!==n.indexOf("x"),t=-1!==n.indexOf("y");return function(i,s){const r=e?Math.abs(i.x-s.x):0,o=t?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}(t);let a=Number.POSITIVE_INFINITY;return Lf(n,t,e,function l(c,u,d){const h=c.inRange(e.x,e.y,s);if(i&&!h)return;const f=c.getCenterPoint(s);if(!Gi(f,n.chartArea,n._minPadding)&&!h)return;const g=o(e,f);g<a?(r=[{element:c,datasetIndex:u,index:d}],a=g):g===a&&r.push({element:c,datasetIndex:u,index:d})}),r}(n,e,t,i,s):function dB(n,e,t,i){let s=[];return Lf(n,t,e,function r(o,a,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],i),{angle:d}=lD(o,{x:e.x,y:e.y});Eo(d,c,u)&&s.push({element:o,datasetIndex:a,index:l})}),s}(n,e,t,s):[]}function ow(n,e,t,i){const s=Po(e,n),r=[],o=t.axis,a="x"===o?"inXRange":"inYRange";let l=!1;return function lB(n,e){const t=n.getSortedVisibleDatasetMetas();let i,s,r;for(let o=0,a=t.length;o<a;++o){({index:i,data:s}=t[o]);for(let l=0,c=s.length;l<c;++l)r=s[l],r.skip||e(r,i,l)}}(n,(c,u,d)=>{c[a](s[o],i)&&r.push({element:c,datasetIndex:u,index:d}),c.inRange(s.x,s.y,i)&&(l=!0)}),t.intersect&&!l?[]:r}var fB={modes:{index(n,e,t,i){const s=Po(e,n),r=t.axis||"x",o=t.intersect?Bf(n,s,r,i):Vf(n,s,r,!1,i),a=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(l=>{const c=o[0].index,u=l.data[c];u&&!u.skip&&a.push({element:u,datasetIndex:l.index,index:c})}),a):[]},dataset(n,e,t,i){const s=Po(e,n),r=t.axis||"xy";let o=t.intersect?Bf(n,s,r,i):Vf(n,s,r,!1,i);if(o.length>0){const a=o[0].datasetIndex,l=n.getDatasetMeta(a).data;o=[];for(let c=0;c<l.length;++c)o.push({element:l[c],datasetIndex:a,index:c})}return o},point:(n,e,t,i)=>Bf(n,Po(e,n),t.axis||"xy",i),nearest:(n,e,t,i)=>Vf(n,Po(e,n),t.axis||"xy",t.intersect,i),x:(n,e,t,i)=>ow(n,e,{axis:"x",intersect:t.intersect},i),y:(n,e,t,i)=>ow(n,e,{axis:"y",intersect:t.intersect},i)}};const aw=["left","top","right","bottom"];function Ro(n,e){return n.filter(t=>t.pos===e)}function lw(n,e){return n.filter(t=>-1===aw.indexOf(t.pos)&&t.box.axis===e)}function Fo(n,e){return n.sort((t,i)=>{const s=e?i:t,r=e?t:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function cw(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function uw(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function yB(n,e,t,i){const{pos:s,box:r}=t,o=n.maxPadding;if(!re(s)){t.size&&(n[s]-=t.size);const d=i[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?r.height:r.width),t.size=d.size/d.count,n[s]+=t.size}r.getPadding&&uw(o,r.getPadding());const a=Math.max(0,e.outerWidth-cw(o,n,"left","right")),l=Math.max(0,e.outerHeight-cw(o,n,"top","bottom")),c=a!==n.w,u=l!==n.h;return n.w=a,n.h=l,t.horizontal?{same:c,other:u}:{same:u,other:c}}function bB(n,e){const t=e.maxPadding;return function i(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(e[o],t[o])}),r}(n?["left","right"]:["top","bottom"])}function No(n,e,t,i){const s=[];let r,o,a,l,c,u;for(r=0,o=n.length,c=0;r<o;++r){a=n[r],l=a.box,l.update(a.width||e.w,a.height||e.h,bB(a.horizontal,e));const{same:d,other:h}=yB(e,t,a,i);c|=d&&s.length,u=u||h,l.fullSize||s.push(a)}return c&&No(s,e,t,i)||u}function Ql(n,e,t,i,s){n.top=t,n.left=e,n.right=e+i,n.bottom=t+s,n.width=i,n.height=s}function dw(n,e,t,i){const s=t.padding;let{x:r,y:o}=e;for(const a of n){const l=a.box,c=i[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=e.w*u,h=c.size||l.height;Jt(c.start)&&(o=c.start),l.fullSize?Ql(l,s.left,o,t.outerWidth-s.right-s.left,h):Ql(l,e.left+c.placed,o,d,h),c.start=o,c.placed+=d,o=l.bottom}else{const d=e.h*u,h=c.size||l.width;Jt(c.start)&&(r=c.start),l.fullSize?Ql(l,r,s.top,h,t.outerHeight-s.bottom-s.top):Ql(l,r,e.top+c.placed,h,d),c.start=r,c.placed+=d,r=l.right}}e.x=r,e.y=o}oe.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var dt={addBox(n,e){n.boxes||(n.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},n.boxes.push(e)},removeBox(n,e){const t=n.boxes?n.boxes.indexOf(e):-1;-1!==t&&n.boxes.splice(t,1)},configure(n,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(n,e,t,i){if(!n)return;const s=ut(n.options.layout.padding),r=Math.max(e-s.width,0),o=Math.max(t-s.height,0),a=function _B(n){const e=function pB(n){const e=[];let t,i,s,r,o,a;for(t=0,i=(n||[]).length;t<i;++t)s=n[t],({position:r,options:{stack:o,stackWeight:a=1}}=s),e.push({index:t,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&r+o,stackWeight:a});return e}(n),t=Fo(e.filter(c=>c.box.fullSize),!0),i=Fo(Ro(e,"left"),!0),s=Fo(Ro(e,"right")),r=Fo(Ro(e,"top"),!0),o=Fo(Ro(e,"bottom")),a=lw(e,"x"),l=lw(e,"y");return{fullSize:t,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:Ro(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}(n.boxes),l=a.vertical,c=a.horizontal;fe(n.boxes,g=>{"function"==typeof g.beforeLayout&&g.beforeLayout()});const u=l.reduce((g,m)=>m.box.options&&!1===m.box.options.display?g:g+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),h=Object.assign({},s);uw(h,ut(i));const f=Object.assign({maxPadding:h,w:r,h:o,x:s.left,y:s.top},s),p=function mB(n,e){const t=function gB(n){const e={};for(const t of n){const{stack:i,pos:s,stackWeight:r}=t;if(!i||!aw.includes(s))continue;const o=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let r,o,a;for(r=0,o=n.length;r<o;++r){a=n[r];const{fullSize:l}=a.box,c=t[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*i:l&&e.availableWidth,a.height=s):(a.width=i,a.height=u?u*s:l&&e.availableHeight)}return t}(l.concat(c),d);No(a.fullSize,f,d,p),No(l,f,d,p),No(c,f,d,p)&&No(l,f,d,p),function vB(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}(f),dw(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,dw(a.rightAndBottom,f,d,p),n.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},fe(a.chartArea,g=>{const m=g.box;Object.assign(m,n.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class hw{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class DB extends hw{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Jl="$chartjs",wB={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},fw=n=>null===n||""===n,pw=!!mL&&{passive:!0};function xB(n,e,t){n.canvas.removeEventListener(e,t,pw)}function ec(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function MB(n,e,t){const i=n.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||ec(a.addedNodes,i),o=o&&!ec(a.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function TB(n,e,t){const i=n.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||ec(a.removedNodes,i),o=o&&!ec(a.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const Lo=new Map;let gw=0;function mw(){const n=window.devicePixelRatio;n!==gw&&(gw=n,Lo.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function kB(n,e,t){const i=n.canvas,s=i&&Of(i);if(!s)return;const r=J0((a,l)=>{const c=s.clientWidth;t(a,l),c<s.clientWidth&&t()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;0===c&&0===u||r(c,u)});return o.observe(s),function AB(n,e){Lo.size||window.addEventListener("resize",mw),Lo.set(n,e)}(n,r),o}function jf(n,e,t){t&&t.disconnect(),"resize"===e&&function IB(n){Lo.delete(n),Lo.size||window.removeEventListener("resize",mw)}(n)}function OB(n,e,t){const i=n.canvas,s=J0(r=>{null!==n.ctx&&t(function SB(n,e){const t=wB[n.type]||n.type,{x:i,y:s}=RD(n,e);return{type:t,chart:e,native:n,x:void 0!==i?i:null,y:void 0!==s?s:null}}(r,n))},n,r=>{const o=r[0];return[o,o.offsetX,o.offsetY]});return function EB(n,e,t){n.addEventListener(e,t,pw)}(i,e,s),s}class PB extends hw{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(function CB(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[Jl]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",fw(s)){const r=ND(n,"width");void 0!==r&&(n.width=r)}if(fw(i))if(""===n.style.height)n.height=n.width/(e||2);else{const r=ND(n,"height");void 0!==r&&(n.height=r)}}(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[Jl])return!1;const i=t[Jl].initial;["height","width"].forEach(r=>{const o=i[r];le(o)?t.removeAttribute(r):t.setAttribute(r,o)});const s=i.style||{};return Object.keys(s).forEach(r=>{t.style[r]=s[r]}),t.width=t.width,delete t[Jl],!0}addEventListener(e,t,i){this.removeEventListener(e,t),(e.$proxies||(e.$proxies={}))[t]=({attach:MB,detach:TB,resize:kB}[t]||OB)(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];s&&(({attach:jf,detach:jf,resize:jf}[t]||xB)(e,t,s),i[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return function gL(n,e,t,i){const s=Xl(n),r=Yi(s,"margin"),o=Kl(s.maxWidth,n,"clientWidth")||Nl,a=Kl(s.maxHeight,n,"clientHeight")||Nl,l=function pL(n,e,t){let i,s;if(void 0===e||void 0===t){const r=Of(n);if(r){const o=r.getBoundingClientRect(),a=Xl(r),l=Yi(a,"border","width"),c=Yi(a,"padding");e=o.width-c.width-l.width,t=o.height-c.height-l.height,i=Kl(a.maxWidth,r,"clientWidth"),s=Kl(a.maxHeight,r,"clientHeight")}else e=n.clientWidth,t=n.clientHeight}return{width:e,height:t,maxWidth:i||Nl,maxHeight:s||Nl}}(n,e,t);let{width:c,height:u}=l;if("content-box"===s.boxSizing){const d=Yi(s,"border","width"),h=Yi(s,"padding");c-=h.width+d.width,u-=h.height+d.height}return c=Math.max(0,c-r.width),u=Math.max(0,i?Math.floor(c/i):u-r.height),c=Pf(Math.min(c,o,l.maxWidth)),u=Pf(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Pf(c/2)),{width:c,height:u}}(e,t,i,s)}isAttached(e){const t=Of(e);return!(!t||!t.isConnected)}}class Dn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return wo(this.x)&&wo(this.y)}getProps(e,t){const i=this.$animations;if(!t||!i)return this;const s={};return e.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}}Dn.defaults={},Dn.defaultRoutes=void 0;const _w={values:n=>De(n)?n:""+n,numeric(n,e,t){if(0===n)return"0";const i=this.chart.options.locale;let s,r=n;if(t.length>1){const c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),r=function FB(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}(n,t)}const o=en(Math.abs(r)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ko(n,i,l)},logarithmic(n,e,t){if(0===n)return"0";const i=n/Math.pow(10,Math.floor(en(n)));return 1===i||2===i||5===i?_w.numeric.call(this,n,e,t):""}};var tc={formatters:_w};function nc(n,e,t,i,s){const r=Q(i,0),o=Math.min(Q(s,n.length),n.length);let l,c,u,a=0;for(t=Math.ceil(t),s&&(l=s-i,t=l/Math.floor(l/t)),u=r;u<0;)a++,u=Math.round(r+a*t);for(c=Math.max(r,0);c<o;c++)c===u&&(e.push(n[c]),a++,u=Math.round(r+a*t))}oe.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:tc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),oe.route("scale.ticks","color","","color"),oe.route("scale.grid","color","","borderColor"),oe.route("scale.grid","borderColor","","borderColor"),oe.route("scale.title","color","","color"),oe.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&"callback"!==n&&"parser"!==n,_indexable:n=>"borderDash"!==n&&"tickBorderDash"!==n}),oe.describe("scales",{_fallback:"scale"}),oe.describe("scale.ticks",{_scriptable:n=>"backdropPadding"!==n&&"callback"!==n,_indexable:n=>"backdropPadding"!==n});const yw=(n,e,t)=>"top"===e||"left"===e?n[e]+t:n[e]-t;function vw(n,e){const t=[],i=n.length/e,s=n.length;let r=0;for(;r<s;r+=i)t.push(n[Math.floor(r)]);return t}function $B(n,e,t){const i=n.ticks.length,s=Math.min(e,i-1),r=n._startPixel,o=n._endPixel,a=1e-6;let c,l=n.getPixelForTick(s);if(!(t&&(c=1===i?Math.max(l-r,o-l):0===e?(n.getPixelForTick(1)-l)/2:(l-n.getPixelForTick(s-1))/2,l+=s<e?c:-c,l<r-a||l>o+a)))return l}function Bo(n){return n.drawTicks?n.tickLength:0}function bw(n,e){if(!n.display)return 0;const t=Ke(n.font,e),i=ut(n.padding);return(De(n.text)?n.text.length:1)*t.lineHeight+i.height}function qB(n,e,t){let i=(n=>"start"===n?"left":"end"===n?"right":"center")(n);return(t&&"right"!==e||!t&&"right"===e)&&(i=(n=>"left"===n?"right":"right"===n?"left":n)(i)),i}class Zi extends Dn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:s}=this;return e=Qt(e,Number.POSITIVE_INFINITY),t=Qt(t,Number.NEGATIVE_INFINITY),i=Qt(i,Number.POSITIVE_INFINITY),s=Qt(s,Number.NEGATIVE_INFINITY),{min:Qt(e,i),max:Qt(t,s),minDefined:Be(e),maxDefined:Be(t)}}getMinMax(e){let o,{min:t,max:i,minDefined:s,maxDefined:r}=this.getUserBounds();if(s&&r)return{min:t,max:i};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,e),s||(t=Math.min(t,o.min)),r||(i=Math.max(i,o.max));return t=r&&t>i?i:t,i=s&&t>i?t:i,{min:Qt(t,Qt(i,t)),max:Qt(i,Qt(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){we(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function UN(n,e,t){const{min:i,max:s}=n,r=((n,e)=>"string"==typeof n&&n.endsWith("%")?parseFloat(n)/100*e:+n)(e,(s-i)/2),o=(a,l)=>t&&0===a?0:a+l;return{min:o(i,-Math.abs(r)),max:o(s,r)}}(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?vw(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=function NB(n,e){const t=n.options.ticks,i=t.maxTicksLimit||function LB(n){const e=n.options.offset,t=n._tickSize();return Math.floor(Math.min(n._length/t+(e?0:1),n._maxLength/t))}(n),s=t.major.enabled?function VB(n){const e=[];let t,i;for(t=0,i=n.length;t<i;t++)n[t].major&&e.push(t);return e}(e):[],r=s.length,o=s[0],a=s[r-1],l=[];if(r>i)return function jB(n,e,t,i){let o,s=0,r=t[0];for(i=Math.ceil(i),o=0;o<n.length;o++)o===r&&(e.push(n[o]),s++,r=t[s*i])}(e,l,s,r/i),l;const c=function BB(n,e,t){const i=function HB(n){const e=n.length;let t,i;if(e<2)return!1;for(i=n[0],t=1;t<e;++t)if(n[t]-n[t-1]!==i)return!1;return i}(n),s=e.length/t;if(!i)return Math.max(s,1);const r=function uN(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i==0&&(e.push(i),e.push(n/i));return t===(0|t)&&e.push(t),e.sort((s,r)=>s-r).pop(),e}(i);for(let o=0,a=r.length-1;o<a;o++){const l=r[o];if(l>s)return l}return Math.max(s,1)}(s,e,i);if(r>0){let u,d;const h=r>1?Math.round((a-o)/(r-1)):null;for(nc(e,l,c,le(h)?0:o-h,o),u=0,d=r-1;u<d;u++)nc(e,l,c,s[u],s[u+1]);return nc(e,l,c,a,le(h)?e.length:a+h),l}return nc(e,l,c),l}(this,this.ticks),this._labelSizes=null),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,i,e=this.options.reverse;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,e=!e),this._startPixel=t,this._endPixel=i,this._reversePixels=e,this._length=i-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){we(this.options.afterUpdate,[this])}beforeSetDimensions(){we(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){we(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),we(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){we(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let i,s,r;for(i=0,s=e.length;i<s;i++)r=e[i],r.label=we(t.callback,[r.value,i,e],this)}afterTickToLabelConversion(){we(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){we(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,i=this.ticks.length,s=t.minRotation||0,r=t.maxRotation;let a,l,c,o=s;if(!this._isVisible()||!t.display||s>=r||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Je(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(e.offset?.5:1)),l=this.maxHeight-Bo(e.grid)-t.padding-bw(e.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=_f(Math.min(Math.asin(Je((u.highest.height+6)/a,-1,1)),Math.asin(Je(l/c,-1,1))-Math.asin(Je(h/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){we(this.options.afterCalculateLabelRotation,[this])}beforeFit(){we(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=bw(s,t.options.font);if(a?(e.width=this.maxWidth,e.height=Bo(r)+l):(e.height=this.maxHeight,e.width=Bo(r)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=2*i.padding,p=bn(this.labelRotation),g=Math.cos(p),m=Math.sin(p);a?e.height=Math.min(this.maxHeight,e.height+(i.mirror?0:m*d.width+g*h.height)+f):e.width=Math.min(this.maxWidth,e.width+(i.mirror?0:g*d.width+m*h.height)+f),this._calculatePadding(c,u,m,g)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:r,padding:o},position:a}=this.options,l=0!==this.labelRotation,c="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=s*e.width,f=i*t.height):(h=i*e.height,f=s*t.width):"start"===r?f=t.width:"end"===r?h=e.width:(h=e.width/2,f=t.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+o)*this.width/(this.width-d),0)}else{let u=t.height/2,d=e.height/2;"start"===r?(u=0,d=e.height):"end"===r&&(u=t.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){we(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,i=e.length;t<i;t++)le(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=vw(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length)}return e}_computeLabelSizes(e,t){const{ctx:i,_longestTextCache:s}=this,r=[],o=[];let c,u,d,h,f,p,g,m,_,y,b,a=0,l=0;for(c=0;c<t;++c){if(h=e[c].label,f=this._resolveTickFontOptions(c),i.font=p=f.string,g=s[p]=s[p]||{data:{},gc:[]},m=f.lineHeight,_=y=0,le(h)||De(h)){if(De(h))for(u=0,d=h.length;u<d;++u)b=h[u],!le(b)&&!De(b)&&(_=$l(i,g.data,g.gc,_,b),y+=m)}else _=$l(i,g.data,g.gc,_,h),y=m;r.push(_),o.push(y),a=Math.max(_,a),l=Math.max(y,l)}!function UB(n,e){fe(n,t=>{const i=t.gc,s=i.length/2;let r;if(s>e){for(r=0;r<s;++r)delete t.data[i[r]];i.splice(0,s)}})}(s,t);const v=r.indexOf(a),D=o.indexOf(l),E=x=>({width:r[x]||0,height:o[x]||0});return{first:E(0),last:E(t-1),widest:E(v),highest:E(D),widths:r,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return function fN(n){return Je(n,-32768,32767)}(this._alignToPixels?Wi(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const i=t[e];return i.$context||(i.$context=function GB(n,e,t){return Di(n,{tick:t,index:e,type:"tick"})}(this.getContext(),e,i))}return this.$context||(this.$context=function WB(n,e){return Di(n,{scale:e,type:"scale"})}(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=bn(this.labelRotation),i=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),r=this._getLabelSizes(),o=e.autoSkipPadding||0,a=r?r.widest.width+o:0,l=r?r.highest.height+o:0;return this.isHorizontal()?l*i>a*s?a/i:l/s:l*s<a*i?l/i:a/s}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:r,position:o}=s,a=r.offset,l=this.isHorizontal(),u=this.ticks.length+(a?1:0),d=Bo(r),h=[],f=r.setContext(this.getContext()),p=f.drawBorder?f.borderWidth:0,g=p/2,m=function(U){return Wi(i,U,p)};let _,y,b,v,D,E,x,M,k,G,J,$;if("top"===o)_=m(this.bottom),E=this.bottom-d,M=_-g,G=m(e.top)+g,$=e.bottom;else if("bottom"===o)_=m(this.top),G=e.top,$=m(e.bottom)-g,E=_+g,M=this.top+d;else if("left"===o)_=m(this.right),D=this.right-d,x=_-g,k=m(e.left)+g,J=e.right;else if("right"===o)_=m(this.left),k=e.left,J=m(e.right)-g,D=_+g,x=this.left+d;else if("x"===t){if("center"===o)_=m((e.top+e.bottom)/2+.5);else if(re(o)){const U=Object.keys(o)[0];_=m(this.chart.scales[U].getPixelForValue(o[U]))}G=e.top,$=e.bottom,E=_+g,M=E+d}else if("y"===t){if("center"===o)_=m((e.left+e.right)/2);else if(re(o)){const U=Object.keys(o)[0];_=m(this.chart.scales[U].getPixelForValue(o[U]))}D=_-g,x=D-d,k=e.left,J=e.right}const ce=Q(s.ticks.maxTicksLimit,u),Re=Math.max(1,Math.ceil(u/ce));for(y=0;y<u;y+=Re){const U=r.setContext(this.getContext(y)),S=U.lineWidth,F=U.color,N=r.borderDash||[],ee=U.borderDashOffset,Me=U.tickWidth,nt=U.tickColor,Xe=U.tickBorderDash||[],Tt=U.tickBorderDashOffset;b=$B(this,y,a),void 0!==b&&(v=Wi(i,b,S),l?D=x=k=J=v:E=M=G=$=v,h.push({tx1:D,ty1:E,tx2:x,ty2:M,x1:k,y1:G,x2:J,y2:$,width:S,color:F,borderDash:N,borderDashOffset:ee,tickWidth:Me,tickColor:nt,tickBorderDash:Xe,tickBorderDashOffset:Tt}))}return this._ticksLength=u,this._borderValue=_,h}_computeLabelItems(e){const t=this.axis,i=this.options,{position:s,ticks:r}=i,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=r,h=Bo(i.grid),f=h+u,p=d?-u:f,g=-bn(this.labelRotation),m=[];let _,y,b,v,D,E,x,M,k,G,J,$,ce="middle";if("top"===s)E=this.bottom-p,x=this._getXAxisLabelAlignment();else if("bottom"===s)E=this.top+p,x=this._getXAxisLabelAlignment();else if("left"===s){const U=this._getYAxisLabelAlignment(h);x=U.textAlign,D=U.x}else if("right"===s){const U=this._getYAxisLabelAlignment(h);x=U.textAlign,D=U.x}else if("x"===t){if("center"===s)E=(e.top+e.bottom)/2+f;else if(re(s)){const U=Object.keys(s)[0];E=this.chart.scales[U].getPixelForValue(s[U])+f}x=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===s)D=(e.left+e.right)/2-f;else if(re(s)){const U=Object.keys(s)[0];D=this.chart.scales[U].getPixelForValue(s[U])}x=this._getYAxisLabelAlignment(h).textAlign}"y"===t&&("start"===l?ce="top":"end"===l&&(ce="bottom"));const Re=this._getLabelSizes();for(_=0,y=a.length;_<y;++_){b=a[_],v=b.label;const U=r.setContext(this.getContext(_));M=this.getPixelForTick(_)+r.labelOffset,k=this._resolveTickFontOptions(_),G=k.lineHeight,J=De(v)?v.length:1;const S=J/2,F=U.color,N=U.textStrokeColor,ee=U.textStrokeWidth;let Me;if(o?(D=M,$="top"===s?"near"===c||0!==g?-J*G+G/2:"center"===c?-Re.highest.height/2-S*G+G:G/2-Re.highest.height:"near"===c||0!==g?G/2:"center"===c?Re.highest.height/2-S*G:Re.highest.height-J*G,d&&($*=-1)):(E=M,$=(1-J)*G/2),U.showLabelBackdrop){const nt=ut(U.backdropPadding),Xe=Re.heights[_],Tt=Re.widths[_];let ye=E+$-nt.top,br=D-nt.left;switch(ce){case"middle":ye-=Xe/2;break;case"bottom":ye-=Xe}switch(x){case"center":br-=Tt/2;break;case"right":br-=Tt}Me={left:br,top:ye,width:Tt+nt.width,height:Xe+nt.height,color:U.backdropColor}}m.push({rotation:g,label:v,font:k,color:F,strokeColor:N,strokeWidth:ee,textOffset:$,textAlign:x,textBaseline:ce,translation:[D,E],backdrop:Me})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-bn(this.labelRotation))return"top"===e?"left":"right";let s="center";return"start"===t.align?s="left":"end"===t.align&&(s="right"),s}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,a=e+r,l=this._getLabelSizes().widest.width;let c,u;return"left"===t?s?(u=this.right+r,"near"===i?c="left":"center"===i?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,"near"===i?c="right":"center"===i?(c="center",u-=l/2):(c="left",u=this.left)):"right"===t?s?(u=this.left+r,"near"===i?c="right":"center"===i?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,"near"===i?c="left":"center"===i?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:i,top:s,width:r,height:o}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,s,r,o),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(r=>r.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,o;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(t.display)for(r=0,o=s.length;r<o;++r){const l=s[r];t.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{grid:i}}=this,s=i.setContext(this.getContext()),r=i.drawBorder?s.borderWidth:0;if(!r)return;const o=i.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,u,d;this.isHorizontal()?(l=Wi(e,this.left,r)-r/2,c=Wi(e,this.right,o)+o/2,u=d=a):(u=Wi(e,this.top,r)-r/2,d=Wi(e,this.bottom,o)+o/2,l=c=a),t.save(),t.lineWidth=s.borderWidth,t.strokeStyle=s.borderColor,t.beginPath(),t.moveTo(l,u),t.lineTo(c,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Wl(i,s);const r=this._labelItems||(this._labelItems=this._computeLabelItems(e));let o,a;for(o=0,a=r.length;o<a;++o){const l=r[o],c=l.font,u=l.label;l.backdrop&&(i.fillStyle=l.backdrop.color,i.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height)),qi(i,u,0,l.textOffset,c,l)}s&&Gl(i)}drawTitle(){const{ctx:e,options:{position:t,title:i,reverse:s}}=this;if(!i.display)return;const r=Ke(i.font),o=ut(i.padding),a=i.align;let l=r.lineHeight/2;"bottom"===t||"center"===t||re(t)?(l+=o.bottom,De(i.text)&&(l+=r.lineHeight*(i.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=function YB(n,e,t,i){const{top:s,left:r,bottom:o,right:a,chart:l}=n,{chartArea:c,scales:u}=l;let h,f,p,d=0;const g=o-s,m=a-r;if(n.isHorizontal()){if(f=ct(i,r,a),re(t)){const _=Object.keys(t)[0];p=u[_].getPixelForValue(t[_])+g-e}else p="center"===t?(c.bottom+c.top)/2+g-e:yw(n,t,e);h=a-r}else{if(re(t)){const _=Object.keys(t)[0];f=u[_].getPixelForValue(t[_])-m+e}else f="center"===t?(c.left+c.right)/2-m+e:yw(n,t,e);p=ct(i,o,s),d="left"===t?-Pe:Pe}return{titleX:f,titleY:p,maxWidth:h,rotation:d}}(this,l,t,a);qi(e,i.text,0,0,r,{color:i.color,maxWidth:d,rotation:h,textAlign:qB(a,t,s),textBaseline:"middle",translation:[c,u]})}draw(e){!this._isVisible()||(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,i=Q(e.grid&&e.grid.z,-1);return this._isVisible()&&this.draw===Zi.prototype.draw?[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]:[{z:t,draw:s=>{this.draw(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,o;for(r=0,o=t.length;r<o;++r){const a=t[r];a[i]===this.id&&(!e||a.type===e)&&s.push(a)}return s}_resolveTickFontOptions(e){return Ke(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ic{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let i;(function ZB(n){return"id"in n&&"defaults"in n})(t)&&(i=this.register(t));const s=this.items,r=e.id,o=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in s||(s[r]=e,function KB(n,e,t){const i=vo(Object.create(null),[t?oe.get(t):{},oe.get(e),n.defaults]);oe.set(e,i),n.defaultRoutes&&function XB(n,e){Object.keys(e).forEach(t=>{const i=t.split("."),s=i.pop(),r=[n].concat(i).join("."),o=e[t].split("."),a=o.pop(),l=o.join(".");oe.route(r,s,l,a)})}(e,n.defaultRoutes),n.descriptors&&oe.describe(e,n.descriptors)}(e,o,i),this.override&&oe.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const t=this.items,i=e.id,s=this.scope;i in t&&delete t[i],s&&i in oe[s]&&(delete oe[s][i],this.override&&delete Ui[i])}}var oi=new class QB{constructor(){this.controllers=new ic(ri,"datasets",!0),this.elements=new ic(Dn,"elements"),this.plugins=new ic(Object,"plugins"),this.scales=new ic(Zi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(e,r,s):fe(s,o=>{const a=i||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,t,i){const s=mf(e);we(i["before"+s],[],i),t[e](i),we(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){const s=t.get(e);if(void 0===s)throw new Error('"'+e+'" is not a registered '+i+".");return s}};class JB{constructor(){this._init=[]}notify(e,t,i,s){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const r=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(r,e,t,i);return"afterDestroy"===t&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const r of e){const o=r.plugin;if(!1===we(o[i],[t,s,r.options],o)&&s.cancelable)return!1}return!0}invalidate(){le(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=Q(i.options&&i.options.plugins,{}),r=function e2(n){const e=[],t=Object.keys(oi.plugins.items);for(let s=0;s<t.length;s++)e.push(oi.getPlugin(t[s]));const i=n.plugins||[];for(let s=0;s<i.length;s++){const r=i[s];-1===e.indexOf(r)&&e.push(r)}return e}(i);return!1!==s||t?function n2(n,e,t,i){const s=[],r=n.getContext();for(let o=0;o<e.length;o++){const a=e[o],c=t2(t[a.id],i);null!==c&&s.push({plugin:a,options:s2(n.config,a,c,r)})}return s}(e,r,s,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(r,o)=>r.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function t2(n,e){return e||!1!==n?!0===n?{}:n:null}function s2(n,e,t,i){const s=n.pluginScopeKeys(e),r=n.getOptionScopes(t,s);return n.createResolver(r,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Hf(n,e){return((e.datasets||{})[n]||{}).indexAxis||e.indexAxis||(oe.datasets[n]||{}).indexAxis||"x"}function zf(n,e){return"x"===n||"y"===n?n:e.axis||function a2(n){return"top"===n||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0}(e.position)||n.charAt(0).toLowerCase()}function Dw(n){const e=n.options||(n.options={});e.plugins=Q(e.plugins,{}),e.scales=function l2(n,e){const t=Ui[n.type]||{scales:{}},i=e.scales||{},s=Hf(n.type,e),r=Object.create(null),o=Object.create(null);return Object.keys(i).forEach(a=>{const l=i[a];if(!re(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=zf(a,l),u=function o2(n,e){return n===e?"_index_":"_value_"}(c,s),d=t.scales||{};r[c]=r[c]||a,o[a]=bo(Object.create(null),[{axis:c},l,d[c],d[u]])}),n.data.datasets.forEach(a=>{const l=a.type||n.type,c=a.indexAxis||Hf(l,e),d=(Ui[l]||{}).scales||{};Object.keys(d).forEach(h=>{const f=function r2(n,e){let t=n;return"_index_"===n?t=e:"_value_"===n&&(t="x"===e?"y":"x"),t}(h,c),p=a[f+"AxisID"]||r[f]||f;o[p]=o[p]||Object.create(null),bo(o[p],[{axis:f},i[p],d[h]])})}),Object.keys(o).forEach(a=>{const l=o[a];bo(l,[oe.scales[l.type],oe.scale])}),o}(n,e)}function ww(n){return(n=n||{}).datasets=n.datasets||[],n.labels=n.labels||[],n}const Cw=new Map,Ew=new Set;function sc(n,e){let t=Cw.get(n);return t||(t=e(),Cw.set(n,t),Ew.add(t)),t}const Vo=(n,e,t)=>{const i=$i(e,t);void 0!==i&&n.add(i)};class u2{constructor(e){this._config=function c2(n){return(n=n||{}).data=ww(n.data),Dw(n),n}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=ww(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Dw(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return sc(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return sc(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return sc(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id;return sc(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:r}=this,o=this._cachedScopes(e,i),a=o.get(t);if(a)return a;const l=new Set;t.forEach(u=>{e&&(l.add(e),u.forEach(d=>Vo(l,e,d))),u.forEach(d=>Vo(l,s,d)),u.forEach(d=>Vo(l,Ui[r]||{},d)),u.forEach(d=>Vo(l,oe,d)),u.forEach(d=>Vo(l,xf,d))});const c=Array.from(l);return 0===c.length&&c.push(Object.create(null)),Ew.has(t)&&o.set(t,c),c}chartOptionScopes(){const{options:e,type:t}=this;return[e,Ui[t]||{},oe.datasets[t]||{},{type:t},oe,xf]}resolveNamedOptions(e,t,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=xw(this._resolverCache,e,s);let l=o;(function h2(n,e){const{isScriptable:t,isIndexable:i}=SD(n);for(const s of e){const r=t(s),o=i(s),a=(o||r)&&n[s];if(r&&(bi(a)||d2(a))||o&&De(a))return!0}return!1})(o,t)&&(r.$shared=!1,l=ur(o,i=bi(i)?i():i,this.createResolver(e,i,a)));for(const c of t)r[c]=l[c];return r}createResolver(e,t,i=[""],s){const{resolver:r}=xw(this._resolverCache,e,i);return re(t)?ur(r,t,void 0,s):r}}function xw(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let r=i.get(s);return r||(r={resolver:Af(e,t),subPrefixes:t.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const d2=n=>re(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||bi(n[t]),!1),p2=["top","bottom","left","right","chartArea"];function Sw(n,e){return"top"===n||"bottom"===n||-1===p2.indexOf(n)&&"x"===e}function Mw(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function Tw(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),we(t&&t.onComplete,[n],e)}function g2(n){const e=n.chart,t=e.options.animation;we(t&&t.onProgress,[n],e)}function Aw(n){return PD()&&"string"==typeof n?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const rc={},Iw=n=>{const e=Aw(n);return Object.values(rc).filter(t=>t.canvas===e).pop()};function m2(n,e,t){const i=Object.keys(n);for(const s of i){const r=+s;if(r>=e){const o=n[s];delete n[s],(t>0||r>e)&&(n[r+t]=o)}}}class ai{constructor(e,t){const i=this.config=new u2(t),s=Aw(e),r=Iw(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function RB(n){return!PD()||"undefined"!=typeof OffscreenCanvas&&n instanceof OffscreenCanvas?DB:PB}(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;this.id=tN(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new JB,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function J1(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],rc[this.id]=this,a&&l?(si.listen(this,"complete",Tw),si.listen(this,"progress",g2),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:r}=this;return le(e)?t&&r?r:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():FD(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return DD(this.canvas,this.ctx),this}stop(){return si.stop(this),this}resize(e,t){si.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,o=this.platform.getMaximumSize(this.canvas,e,t,i.maintainAspectRatio&&this.aspectRatio),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,FD(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),we(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){fe(this.options.scales||{},(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let r=[];t&&(r=r.concat(Object.keys(t).map(o=>{const a=t[o],l=zf(o,a),c="r"===l,u="x"===l;return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),fe(r,o=>{const a=o.options,l=a.id,c=zf(l,a),u=Q(a.type,o.dtype);(void 0===a.position||Sw(a.position,c)!==Sw(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;l in i&&i[l].type===u?d=i[l]:(d=new(oi.getScale(u))({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d),d.init(a,e)}),fe(s,(o,a)=>{o||delete i[a]}),fe(i,o=>{dt.configure(this,o,o.options),dt.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,r)=>s.index-r.index),i>t){for(let s=t;s<i;++s)this._destroyDatasetMeta(s);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(Mw("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((i,s)=>{0===t.filter(r=>r===i._dataset).length&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i<s;i++){const r=t[i];let o=this.getDatasetMeta(i);const a=r.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=a,o.indexAxis=r.indexAxis||Hf(a,this.options),o.order=r.order||0,o.index=i,o.label=""+r.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const l=oi.getController(a),{datasetElementType:c,dataElementType:u}=oe.datasets[a];Object.assign(l.prototype,{dataElementType:oi.getElement(u),datasetElementType:c&&oi.getElement(c)}),o.controller=new l(this,i),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){fe(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),h=!s&&-1===r.indexOf(d);d.buildOrUpdateElements(h),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),s||fe(r,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Mw("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){fe(this.scales,e=>{dt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!iD(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of t)m2(e,s,"_removeElements"===i?-r:r)}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=r=>new Set(e.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=i(0);for(let r=1;r<t;r++)if(!iD(s,i(r)))return;return Array.from(s).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;dt.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],fe(this.boxes,s=>{i&&"chartArea"===s.position||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let t=0,i=this.data.datasets.length;t<i;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,bi(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const i=this.getDatasetMeta(e),s={meta:i,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(t),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(si.has(this)?this.attached&&!si.running(this)&&si.start(this):(this.draw(),Tw({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,i=[];let s,r;for(s=0,r=t.length;s<r;++s){const o=t[s];(!e||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,r=this.chartArea,o={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&Wl(t,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),e.controller.draw(),s&&Gl(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(e,t,i,s){const r=fB.modes[t];return"function"==typeof r?r(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(r=>r&&r._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Di(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return"boolean"==typeof i.hidden?!i.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",r=this.getDatasetMeta(e),o=r.controller._resolveAnimations(void 0,s);Jt(t)?(r.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),si.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),DD(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete rc[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,i=(r,o)=>{t.addEventListener(this,r,o),e[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};fe(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(l,c)=>{t.addEventListener(this,l,c),e[l]=c},s=(l,c)=>{e[l]&&(t.removeEventListener(this,l,c),delete e[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},t.isAttached(this.canvas)?a():o()}unbindEvents(){fe(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},fe(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let r,o,a,l;for("dataset"===t&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){o=e[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],i=e.map(({datasetIndex:r,index:o})=>{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!Rl(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,r=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=r(t,e),a=i?e:r(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:Gi(e,this.chartArea,this._minPadding)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const r=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:r}=this,a=this._getActiveElements(e,s,i,t),l=function aN(n){return"mouseup"===n.type||"click"===n.type||"contextmenu"===n.type}(e),c=function _2(n,e,t,i){return t&&"mouseout"!==n.type?i?e:n:null}(e,this._lastEvent,i,l);i&&(this._lastEvent=null,we(r.onHover,[e,a,this],this),l&&we(r.onClick,[e,a,this],this));const u=!Rl(a,s);return(u||t)&&(this._active=a,this._updateHoverStyles(a,s,t)),this._lastEvent=c,u}_getActiveElements(e,t,i,s){if("mouseout"===e.type)return[];if(!i)return t;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,s)}}const kw=()=>fe(ai.instances,n=>n._plugins.invalidate()),wi=!0;function Ow(n,e,t){const{startAngle:i,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=e;let c=s/a;n.beginPath(),n.arc(r,o,a,i-c,t+c),l>s?(c=s/l,n.arc(r,o,l,t+c,i-c,!0)):n.arc(r,o,s,t+Pe,i-Pe),n.closePath(),n.clip()}function fr(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function $f(n,e,t,i,s){const{x:r,y:o,startAngle:a,pixelMargin:l,innerRadius:c}=e,u=Math.max(e.outerRadius+i+t-l,0),d=c>0?c+i+t+l:0;let h=0;const f=s-a;if(i){const N=((c>0?c-i:0)+(u>0?u-i:0))/2;h=(f-(0!==N?f*N/(N+i):f))/2}const g=(f-Math.max(.001,f*u-t/xe)/u)/2,m=a+g+h,_=s-g-h,{outerStart:y,outerEnd:b,innerStart:v,innerEnd:D}=function v2(n,e,t,i){const s=function y2(n){return Mf(n,["outerStart","outerEnd","innerStart","innerEnd"])}(n.options.borderRadius),r=(t-e)/2,o=Math.min(r,i*e/2),a=l=>{const c=(t-Math.min(r,l))*i/2;return Je(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Je(s.innerStart,0,o),innerEnd:Je(s.innerEnd,0,o)}}(e,d,u,_-m),E=u-y,x=u-b,M=m+y/E,k=_-b/x,G=d+v,J=d+D,$=m+v/G,ce=_-D/J;if(n.beginPath(),n.arc(r,o,u,M,k),b>0){const S=fr(x,k,r,o);n.arc(S.x,S.y,b,k,_+Pe)}const Re=fr(J,_,r,o);if(n.lineTo(Re.x,Re.y),D>0){const S=fr(J,ce,r,o);n.arc(S.x,S.y,D,_+Pe,ce+Math.PI)}if(n.arc(r,o,d,_-D/d,m+v/d,!0),v>0){const S=fr(G,$,r,o);n.arc(S.x,S.y,v,$+Math.PI,m-Pe)}const U=fr(E,m,r,o);if(n.lineTo(U.x,U.y),y>0){const S=fr(E,M,r,o);n.arc(S.x,S.y,y,m-Pe,M)}n.closePath()}Object.defineProperties(ai,{defaults:{enumerable:wi,value:oe},instances:{enumerable:wi,value:rc},overrides:{enumerable:wi,value:Ui},registry:{enumerable:wi,value:oi},version:{enumerable:wi,value:"3.7.1"},getChart:{enumerable:wi,value:Iw},register:{enumerable:wi,value:(...n)=>{oi.add(...n),kw()}},unregister:{enumerable:wi,value:(...n)=>{oi.remove(...n),kw()}}});class oc extends Dn{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,i){const s=this.getProps(["x","y"],i),{angle:r,distance:o}=lD(s,{x:e,y:t}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=this.options.spacing/2,p=Q(d,l-a)>=_e||Eo(r,a,l),g=ni(o,c+h,u+h);return p&&g}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:l,spacing:c}=this.options,u=(s+r)/2,d=(o+a+c+l)/2;return{x:t+Math.cos(u)*d,y:i+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,r=(t.spacing||0)/2;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=i>_e?Math.floor(i/_e):0,0===i||this.innerRadius<0||this.outerRadius<0)return;e.save();let o=0;if(s){o=s/2;const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o),this.circumference>=xe&&(o=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=function b2(n,e,t,i){const{fullCircles:s,startAngle:r,circumference:o}=e;let a=e.endAngle;if(s){$f(n,e,t,i,r+_e);for(let l=0;l<s;++l)n.fill();isNaN(o)||(a=r+o%_e,o%_e==0&&(a+=_e))}return $f(n,e,t,i,a),n.fill(),a}(e,this,o,r);(function w2(n,e,t,i,s){const{options:r}=e,{borderWidth:o,borderJoinStyle:a}=r,l="inner"===r.borderAlign;!o||(l?(n.lineWidth=2*o,n.lineJoin=a||"round"):(n.lineWidth=o,n.lineJoin=a||"bevel"),e.fullCircles&&function D2(n,e,t){const{x:i,y:s,startAngle:r,pixelMargin:o,fullCircles:a}=e,l=Math.max(e.outerRadius-o,0),c=e.innerRadius+o;let u;for(t&&Ow(n,e,r+_e),n.beginPath(),n.arc(i,s,c,r+_e,r,!0),u=0;u<a;++u)n.stroke();for(n.beginPath(),n.arc(i,s,l,r,r+_e),u=0;u<a;++u)n.stroke()}(n,e,l),l&&Ow(n,e,s),$f(n,e,t,i,s),n.stroke())})(e,this,o,r,a),e.restore()}}function Pw(n,e,t=e){n.lineCap=Q(t.borderCapStyle,e.borderCapStyle),n.setLineDash(Q(t.borderDash,e.borderDash)),n.lineDashOffset=Q(t.borderDashOffset,e.borderDashOffset),n.lineJoin=Q(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=Q(t.borderWidth,e.borderWidth),n.strokeStyle=Q(t.borderColor,e.borderColor)}function C2(n,e,t){n.lineTo(t.x,t.y)}function Rw(n,e,t={}){const i=n.length,{start:s=0,end:r=i-1}=t,{start:o,end:a}=e,l=Math.max(s,o),c=Math.min(r,a);return{count:i,start:l,loop:e.loop,ilen:c<l&&!(s<o&&r<o||s>a&&r>a)?i+c-l:c-l}}function x2(n,e,t,i){const{points:s,options:r}=e,{count:o,start:a,loop:l,ilen:c}=Rw(s,t,i),u=function E2(n){return n.stepped?NN:n.tension||"monotone"===n.cubicInterpolationMode?LN:C2}(r);let f,p,g,{move:d=!0,reverse:h}=i||{};for(f=0;f<=c;++f)p=s[(a+(h?c-f:f))%o],!p.skip&&(d?(n.moveTo(p.x,p.y),d=!1):u(n,g,p,h,r.stepped),g=p);return l&&(p=s[(a+(h?c:0))%o],u(n,g,p,h,r.stepped)),!!l}function S2(n,e,t,i){const s=e.points,{count:r,start:o,ilen:a}=Rw(s,t,i),{move:l=!0,reverse:c}=i||{};let h,f,p,g,m,_,u=0,d=0;const y=v=>(o+(c?a-v:v))%r,b=()=>{g!==m&&(n.lineTo(u,m),n.lineTo(u,g),n.lineTo(u,_))};for(l&&(f=s[y(0)],n.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=s[y(h)],f.skip)continue;const v=f.x,D=f.y,E=0|v;E===p?(D<g?g=D:D>m&&(m=D),u=(d*u+v)/++d):(b(),n.lineTo(v,D),p=E,d=0,g=m=D),_=D}b()}function Uf(n){const e=n.options;return n._decimated||n._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||e.borderDash&&e.borderDash.length?x2:S2}oc.id="arc",oc.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},oc.defaultRoutes={backgroundColor:"backgroundColor"};const I2="function"==typeof Path2D;let jo=(()=>{class n extends Dn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,i){const s=this.options;!s.tension&&"monotone"!==s.cubicInterpolationMode||s.stepped||this._pointsUpdated||(cL(this._points,s,t,s.spanGaps?this._loop:this._fullLoop,i),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function xL(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const r=!!n._loop,{start:o,end:a}=function CL(n,e,t,i){let s=0,r=e-1;if(t&&!i)for(;s<e&&!n[s].skip;)s++;for(;s<e&&n[s].skip;)s++;for(s%=e,t&&(r+=s);r>s&&n[r%e].skip;)r--;return r%=e,{start:s,end:r}}(t,s,r,i);return function UD(n,e,t,i){return i&&i.setContext&&t?function SL(n,e,t,i){const s=n._chart.getContext(),r=WD(n.options),{_datasetIndex:o,options:{spanGaps:a}}=n,l=t.length,c=[];let u=r,d=e[0].start,h=d;function f(p,g,m,_){const y=a?-1:1;if(p!==g){for(p+=l;t[p%l].skip;)p-=y;for(;t[g%l].skip;)g+=y;p%l!=g%l&&(c.push({start:p%l,end:g%l,loop:m,style:_}),u=_,d=g%l)}}for(const p of e){d=a?d:p.start;let m,g=t[d%l];for(h=d+1;h<=p.end;h++){const _=t[h%l];m=WD(i.setContext(Di(s,{type:"segment",p0:g,p1:_,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),ML(m,u)&&f(d,h-1,p.loop,u),g=_,u=m}d<h-1&&f(d,h-1,p.loop,u)}return c}(n,e,t,i):e}(n,!0===i?[{start:o,end:a,loop:r}]:function EL(n,e,t,i){const s=n.length,r=[];let l,o=e,a=n[e];for(l=e+1;l<=t;++l){const c=n[l%s];c.skip||c.stop?a.skip||(r.push({start:e%s,end:(l-1)%s,loop:i=!1}),e=o=c.stop?l:null):(o=l,a.skip&&(e=l)),a=c}return null!==o&&r.push({start:e%s,end:o%s,loop:i}),r}(t,o,a<o?a+s:a,!!n._fullLoop&&0===o&&a===s-1),t,e)}(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,s=t.length;return s&&this.points[t[s-1].end]}interpolate(t,i){const s=this.options,r=t[i],o=this.points,a=$D(this,{property:i,start:r,end:r});if(!a.length)return;const l=[],c=function M2(n){return n.stepped?_L:n.tension||"monotone"===n.cubicInterpolationMode?yL:Ki}(s);let u,d;for(u=0,d=a.length;u<d;++u){const{start:h,end:f}=a[u],p=o[h],g=o[f];if(p===g){l.push(p);continue}const _=c(p,g,Math.abs((r-p[i])/(g[i]-p[i])),s.stepped);_[i]=t[i],l.push(_)}return 1===l.length?l[0]:l}pathSegment(t,i,s){return Uf(this)(t,this,i,s)}path(t,i,s){const r=this.segments,o=Uf(this);let a=this._loop;i=i||0,s=s||this.points.length-i;for(const l of r)a&=o(t,this,l,{start:i,end:i+s-1});return!!a}draw(t,i,s,r){(this.points||[]).length&&(this.options||{}).borderWidth&&(t.save(),function k2(n,e,t,i){I2&&!e.options.segment?function T2(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),Pw(n,e.options),n.stroke(s)}(n,e,t,i):function A2(n,e,t,i){const{segments:s,options:r}=e,o=Uf(e);for(const a of s)Pw(n,r,a.style),n.beginPath(),o(n,e,a,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}(n,e,t,i)}(t,this,s,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return n.id="line",n.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},n.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},n.descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e},n})();function Fw(n,e,t,i){const s=n.options,{[t]:r}=n.getProps([t],i);return Math.abs(e-r)<s.radius+s.hitRadius}let Nw=(()=>{class n extends Dn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,i,s){const r=this.options,{x:o,y:a}=this.getProps(["x","y"],s);return Math.pow(t-o,2)+Math.pow(i-a,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,i){return Fw(this,t,"x",i)}inYRange(t,i){return Fw(this,t,"y",i)}getCenterPoint(t){const{x:i,y:s}=this.getProps(["x","y"],t);return{x:i,y:s}}size(t){let i=(t=t||this.options||{}).radius||0;return i=Math.max(i,i&&t.hoverRadius||0),2*(i+(i&&t.borderWidth||0))}draw(t,i){const s=this.options;this.skip||s.radius<.1||!Gi(this,i,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,Ul(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}return n.id="point",n.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},n.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},n})();function Lw(n,e){const{x:t,y:i,base:s,width:r,height:o}=n.getProps(["x","y","base","width","height"],e);let a,l,c,u,d;return n.horizontal?(d=o/2,a=Math.min(t,s),l=Math.max(t,s),c=i-d,u=i+d):(d=r/2,a=t-d,l=t+d,c=Math.min(i,s),u=Math.max(i,s)),{left:a,top:c,right:l,bottom:u}}function Ci(n,e,t,i){return n?0:Je(e,t,i)}function Wf(n,e,t,i){const s=null===e,r=null===t,a=n&&!(s&&r)&&Lw(n,i);return a&&(s||ni(e,a.left,a.right))&&(r||ni(t,a.top,a.bottom))}function N2(n,e){n.rect(e.x,e.y,e.w,e.h)}function Gf(n,e,t={}){const i=n.x!==t.x?-e:0,s=n.y!==t.y?-e:0;return{x:n.x+i,y:n.y+s,w:n.w+((n.x+n.w!==t.x+t.w?e:0)-i),h:n.h+((n.y+n.h!==t.y+t.h?e:0)-s),radius:n.radius}}class ac extends Dn{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:i,backgroundColor:s}}=this,{inner:r,outer:o}=function R2(n){const e=Lw(n),t=e.right-e.left,i=e.bottom-e.top,s=function O2(n,e,t){const s=n.borderSkipped,r=wD(n.options.borderWidth);return{t:Ci(s.top,r.top,0,t),r:Ci(s.right,r.right,0,e),b:Ci(s.bottom,r.bottom,0,t),l:Ci(s.left,r.left,0,e)}}(n,t/2,i/2),r=function P2(n,e,t){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,r=cr(s),o=Math.min(e,t),a=n.borderSkipped,l=i||re(s);return{topLeft:Ci(!l||a.top||a.left,r.topLeft,0,o),topRight:Ci(!l||a.top||a.right,r.topRight,0,o),bottomLeft:Ci(!l||a.bottom||a.left,r.bottomLeft,0,o),bottomRight:Ci(!l||a.bottom||a.right,r.bottomRight,0,o)}}(n,t/2,i/2);return{outer:{x:e.left,y:e.top,w:t,h:i,radius:r},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,r.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(s.b,s.r))}}}}(this),a=function F2(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}(o.radius)?ql:N2;e.save(),(o.w!==r.w||o.h!==r.h)&&(e.beginPath(),a(e,Gf(o,t,r)),e.clip(),a(e,Gf(r,-t,o)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),a(e,Gf(r,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,i){return Wf(this,e,t,i)}inXRange(e,t){return Wf(this,e,null,t)}inYRange(e,t){return Wf(this,null,e,t)}getCenterPoint(e){const{x:t,y:i,base:s,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(t+s)/2:t,y:r?i:(i+s)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}function U2(n,e,t){const i=function $2(n){const e=n.options,t=e.fill;let i=Q(t&&t.target,t);return void 0===i&&(i=!!e.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}(n);if(re(i))return!isNaN(i.value)&&i;let s=parseFloat(i);return Be(s)&&Math.floor(s)===s?(("-"===i[0]||"+"===i[0])&&(s=e+s),!(s===e||s<0||s>=t)&&s):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}ac.id="bar",ac.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},ac.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class jw{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,i){const{x:s,y:r,radius:o}=this;return e.arc(s,r,o,(t=t||{start:0,end:_e}).end,t.start,!0),!i.bounds}interpolate(e){const{x:t,y:i,radius:s}=this,r=e.angle;return{x:t+Math.cos(r)*s,y:i+Math.sin(r)*s,angle:r}}}function qf(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Z2(n,e,t){const i=[];for(let s=0;s<t.length;s++){const r=t[s],{first:o,last:a,point:l}=Q2(r,e,"x");if(!(!l||o&&a))if(o)i.unshift(l);else if(n.push(l),!a)break}n.push(...i)}function Q2(n,e,t){const i=n.interpolate(e,t);if(!i)return{};const s=i[t],r=n.segments,o=n.points;let a=!1,l=!1;for(let c=0;c<r.length;c++){const u=r[c],d=o[u.start][t],h=o[u.end][t];if(ni(s,d,h)){a=s===d,l=s===h;break}}return{first:a,last:l,point:i}}function J2(n){const{chart:e,fill:t,line:i}=n;if(Be(t))return function z2(n,e){const t=n.getDatasetMeta(e);return t&&n.isDatasetVisible(e)?t.dataset:null}(e,t);if("stack"===t)return function K2(n){const{scale:e,index:t,line:i}=n,s=[],r=i.segments,o=i.points,a=function X2(n,e){const t=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const r=i[s];if(r.index===e)break;r.hidden||t.unshift(r.dataset)}return t}(e,t);a.push(Hw({x:null,y:e.bottom},i));for(let l=0;l<r.length;l++){const c=r[l];for(let u=c.start;u<=c.end;u++)Z2(s,o[u],a)}return new jo({points:s,options:{}})}(n);if("shape"===t)return!0;const s=function q2(n){return(n.scale||{}).getPointPositionForValue?function G2(n){const{scale:e,fill:t}=n,i=e.options,s=e.getLabels().length,r=[],o=i.reverse?e.max:e.min;let l,c,u;if(u="start"===t?o:"end"===t?i.reverse?e.min:e.max:re(t)?t.value:e.getBaseValue(),i.grid.circular)return c=e.getPointPositionForValue(0,o),new jw({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(u)});for(l=0;l<s;++l)r.push(e.getPointPositionForValue(l,u));return r}(n):function W2(n){const{scale:e={},fill:t}=n;let s,i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:re(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),Be(i)?(s=e.isHorizontal(),{x:s?i:null,y:s?null:i}):null}(n)}(n);return s instanceof jw?s:Hw(s,i)}function Hw(n,e){let t=[],i=!1;return De(n)?(i=!0,t=n):t=function Y2(n,e){const{x:t=null,y:i=null}=n||{},s=e.points,r=[];return e.segments.forEach(({start:o,end:a})=>{a=qf(o,a,s);const l=s[o],c=s[a];null!==i?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):null!==t&&(r.push({x:t,y:l.y}),r.push({x:t,y:c.y}))}),r}(n,e),t.length?new jo({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function eV(n,e,t){let s=n[e].fill;const r=[e];let o;if(!t)return s;for(;!1!==s&&-1===r.indexOf(s);){if(!Be(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function zw(n,e,t){const{segments:i,points:s}=e;let r=!0,o=!1;n.beginPath();for(const a of i){const{start:l,end:c}=a,u=s[l],d=s[qf(l,c,s)];r?(n.moveTo(u.x,u.y),r=!1):(n.lineTo(u.x,t),n.lineTo(u.x,u.y)),o=!!e.pathSegment(n,a,{move:o}),o?n.closePath():n.lineTo(d.x,t)}n.lineTo(e.first().x,t),n.closePath(),n.clip()}function Yf(n,e,t,i){if(i)return;let s=e[n],r=t[n];return"angle"===n&&(s=Vt(s),r=Vt(r)),{property:n,start:s,end:r}}function $w(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function nV(n,e,t){const{top:i,bottom:s}=e.chart.chartArea,{property:r,start:o,end:a}=t||{};"x"===r&&(n.beginPath(),n.rect(o,i,a-o,s-i),n.clip())}function Uw(n,e,t,i){const s=e.interpolate(t,i);s&&n.lineTo(s.x,s.y)}function Ww(n,e){const{line:t,target:i,property:s,color:r,scale:o}=e,a=function tV(n,e,t){const i=n.segments,s=n.points,r=e.points,o=[];for(const a of i){let{start:l,end:c}=a;c=qf(l,c,s);const u=Yf(t,s[l],s[c],a.loop);if(!e.segments){o.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=$D(e,u);for(const h of d){const f=Yf(t,r[h.start],r[h.end],h.loop),p=zD(a,s,f);for(const g of p)o.push({source:g,target:h,start:{[t]:$w(u,f,"start",Math.max)},end:{[t]:$w(u,f,"end",Math.min)}})}}return o}(t,i,s);for(const{source:l,target:c,start:u,end:d}of a){const{style:{backgroundColor:h=r}={}}=l,f=!0!==i;n.save(),n.fillStyle=h,nV(n,o,f&&Yf(s,u,d)),n.beginPath();const p=!!t.pathSegment(n,l);let g;if(f){p?n.closePath():Uw(n,i,d,s);const m=!!i.pathSegment(n,c,{move:p,reverse:!0});g=p&&m,g||Uw(n,i,u,s)}n.closePath(),n.fill(g?"evenodd":"nonzero"),n.restore()}}function Kf(n,e,t){const i=J2(e),{line:s,scale:r,axis:o}=e,a=s.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:d=c}=l||{};i&&s.points.length&&(Wl(n,t),function iV(n,e){const{line:t,target:i,above:s,below:r,area:o,scale:a}=e,l=t._loop?"angle":e.axis;n.save(),"x"===l&&r!==s&&(zw(n,i,o.top),Ww(n,{line:t,target:i,color:s,scale:a,property:l}),n.restore(),n.save(),zw(n,i,o.bottom)),Ww(n,{line:t,target:i,color:r,scale:a,property:l}),n.restore()}(n,{line:s,target:i,above:u,below:d,area:t,scale:r,axis:o}),Gl(n))}var Gw={id:"filler",afterDatasetsUpdate(n,e,t){const i=(n.data.datasets||[]).length,s=[];let r,o,a,l;for(o=0;o<i;++o)r=n.getDatasetMeta(o),a=r.dataset,l=null,a&&a.options&&a instanceof jo&&(l={visible:n.isDatasetVisible(o),index:o,fill:U2(a,o,i),chart:n,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=l,s.push(l);for(o=0;o<i;++o)l=s[o],l&&!1!==l.fill&&(l.fill=eV(s,o,t.propagate))},beforeDraw(n,e,t){const i="beforeDraw"===t.drawTime,s=n.getSortedVisibleDatasetMetas(),r=n.chartArea;for(let o=s.length-1;o>=0;--o){const a=s[o].$filler;!a||(a.line.updateControlPoints(r,a.axis),i&&Kf(n.ctx,a,r))}},beforeDatasetsDraw(n,e,t){if("beforeDatasetsDraw"!==t.drawTime)return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;r&&Kf(n.ctx,r,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!i||!1===i.fill||"beforeDatasetDraw"!==t.drawTime||Kf(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ho={average(n){if(!n.length)return!1;let e,t,i=0,s=0,r=0;for(e=0,t=n.length;e<t;++e){const o=n[e].element;if(o&&o.hasValue()){const a=o.tooltipPosition();i+=a.x,s+=a.y,++r}}return{x:i/r,y:s/r}},nearest(n,e){if(!n.length)return!1;let r,o,a,t=e.x,i=e.y,s=Number.POSITIVE_INFINITY;for(r=0,o=n.length;r<o;++r){const l=n[r].element;if(l&&l.hasValue()){const u=yf(e,l.getCenterPoint());u<s&&(s=u,a=l)}}if(a){const l=a.tooltipPosition();t=l.x,i=l.y}return{x:t,y:i}}};function Vn(n,e){return e&&(De(e)?Array.prototype.push.apply(n,e):n.push(e)),n}function li(n){return("string"==typeof n||n instanceof String)&&n.indexOf("\n")>-1?n.split("\n"):n}function uV(n,e){const{element:t,datasetIndex:i,index:s}=e,r=n.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:n,label:o,parsed:r.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function Kw(n,e){const t=n.chart.ctx,{body:i,footer:s,title:r}=n,{boxWidth:o,boxHeight:a}=e,l=Ke(e.bodyFont),c=Ke(e.titleFont),u=Ke(e.footerFont),d=r.length,h=s.length,f=i.length,p=ut(e.padding);let g=p.height,m=0,_=i.reduce((v,D)=>v+D.before.length+D.lines.length+D.after.length,0);_+=n.beforeBody.length+n.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),_&&(g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(_-f)*l.lineHeight+(_-1)*e.bodySpacing),h&&(g+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let y=0;const b=function(v){m=Math.max(m,t.measureText(v).width+y)};return t.save(),t.font=c.string,fe(n.title,b),t.font=l.string,fe(n.beforeBody.concat(n.afterBody),b),y=e.displayColors?o+2+e.boxPadding:0,fe(i,v=>{fe(v.before,b),fe(v.lines,b),fe(v.after,b)}),y=0,t.font=u.string,fe(n.footer,b),t.restore(),m+=p.width,{width:m,height:g}}function fV(n,e,t,i){const{x:s,width:r}=t,{width:o,chartArea:{left:a,right:l}}=n;let c="center";return"center"===i?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),function hV(n,e,t,i){const{x:s,width:r}=i,o=t.caretSize+t.caretPadding;if("left"===n&&s+r+o>e.width||"right"===n&&s-r-o<0)return!0}(c,n,e,t)&&(c="center"),c}function Xw(n,e,t){const i=t.yAlign||e.yAlign||function dV(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}(n,t);return{xAlign:t.xAlign||e.xAlign||fV(n,e,t,i),yAlign:i}}function Zw(n,e,t,i){const{caretSize:s,caretPadding:r,cornerRadius:o}=n,{xAlign:a,yAlign:l}=t,c=s+r,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=cr(o);let p=function pV(n,e){let{x:t,width:i}=n;return"right"===e?t-=i:"center"===e&&(t-=i/2),t}(e,a);const g=function gV(n,e,t){let{y:i,height:s}=n;return"top"===e?i+=t:i-="bottom"===e?s+t:s/2,i}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(u,h)+s:"right"===a&&(p+=Math.max(d,f)+s),{x:Je(p,0,i.width-e.width),y:Je(g,0,i.height-e.height)}}function cc(n,e,t){const i=ut(t.padding);return"center"===e?n.x+n.width/2:"right"===e?n.x+n.width-i.right:n.x+i.left}function Qw(n){return Vn([],li(n))}function Jw(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}let eC=(()=>{class n extends Dn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const i=this.chart,s=this.options.setContext(this.getContext()),r=s.enabled&&i.options.animation&&s.animations,o=new qD(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=function mV(n,e,t){return Di(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,i){const{callbacks:s}=i,r=s.beforeTitle.apply(this,[t]),o=s.title.apply(this,[t]),a=s.afterTitle.apply(this,[t]);let l=[];return l=Vn(l,li(r)),l=Vn(l,li(o)),l=Vn(l,li(a)),l}getBeforeBody(t,i){return Qw(i.callbacks.beforeBody.apply(this,[t]))}getBody(t,i){const{callbacks:s}=i,r=[];return fe(t,o=>{const a={before:[],lines:[],after:[]},l=Jw(s,o);Vn(a.before,li(l.beforeLabel.call(this,o))),Vn(a.lines,l.label.call(this,o)),Vn(a.after,li(l.afterLabel.call(this,o))),r.push(a)}),r}getAfterBody(t,i){return Qw(i.callbacks.afterBody.apply(this,[t]))}getFooter(t,i){const{callbacks:s}=i,r=s.beforeFooter.apply(this,[t]),o=s.footer.apply(this,[t]),a=s.afterFooter.apply(this,[t]);let l=[];return l=Vn(l,li(r)),l=Vn(l,li(o)),l=Vn(l,li(a)),l}_createItems(t){const i=this._active,s=this.chart.data,r=[],o=[],a=[];let c,u,l=[];for(c=0,u=i.length;c<u;++c)l.push(uV(this.chart,i[c]));return t.filter&&(l=l.filter((d,h,f)=>t.filter(d,h,f,s))),t.itemSort&&(l=l.sort((d,h)=>t.itemSort(d,h,s))),fe(l,d=>{const h=Jw(t.callbacks,d);r.push(h.labelColor.call(this,d)),o.push(h.labelPointStyle.call(this,d)),a.push(h.labelTextColor.call(this,d))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=l,l}update(t,i){const s=this.options.setContext(this.getContext()),r=this._active;let o,a=[];if(r.length){const l=Ho[s.position].call(this,r,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const c=this._size=Kw(this,s),u=Object.assign({},l,c),d=Xw(this.chart,s,u),h=Zw(s,u,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(t,i,s,r){const o=this.getCaretPosition(t,s,r);i.lineTo(o.x1,o.y1),i.lineTo(o.x2,o.y2),i.lineTo(o.x3,o.y3)}getCaretPosition(t,i,s){const{xAlign:r,yAlign:o}=this,{caretSize:a,cornerRadius:l}=s,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:h}=cr(l),{x:f,y:p}=t,{width:g,height:m}=i;let _,y,b,v,D,E;return"center"===o?(D=p+m/2,"left"===r?(_=f,y=_-a,v=D+a,E=D-a):(_=f+g,y=_+a,v=D-a,E=D+a),b=_):(y="left"===r?f+Math.max(c,d)+a:"right"===r?f+g-Math.max(u,h)-a:this.caretX,"top"===o?(v=p,D=v-a,_=y-a,b=y+a):(v=p+m,D=v+a,_=y+a,b=y-a),E=v),{x1:_,x2:y,x3:b,y1:v,y2:D,y3:E}}drawTitle(t,i,s){const r=this.title,o=r.length;let a,l,c;if(o){const u=hr(s.rtl,this.x,this.width);for(t.x=cc(this,s.titleAlign,s),i.textAlign=u.textAlign(s.titleAlign),i.textBaseline="middle",a=Ke(s.titleFont),l=s.titleSpacing,i.fillStyle=s.titleColor,i.font=a.string,c=0;c<o;++c)i.fillText(r[c],u.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+l,c+1===o&&(t.y+=s.titleMarginBottom-l)}}_drawColorBox(t,i,s,r,o){const a=this.labelColors[s],l=this.labelPointStyles[s],{boxHeight:c,boxWidth:u,boxPadding:d}=o,h=Ke(o.bodyFont),f=cc(this,"left",o),p=r.x(f),m=i.y+(c<h.lineHeight?(h.lineHeight-c)/2:0);if(o.usePointStyle){const _={radius:Math.min(u,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},y=r.leftForLtr(p,u)+u/2,b=m+c/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Ul(t,_,y,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ul(t,_,y,b)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const _=r.leftForLtr(p,u-d),y=r.leftForLtr(r.xPlus(p,1),u-d-2),b=cr(a.borderRadius);Object.values(b).some(v=>0!==v)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ql(t,{x:_,y:m,w:u,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ql(t,{x:y,y:m+1,w:u-2,h:c-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(_,m,u,c),t.strokeRect(_,m,u,c),t.fillStyle=a.backgroundColor,t.fillRect(y,m+1,u-2,c-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,i,s){const{body:r}=this,{bodySpacing:o,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:u,boxPadding:d}=s,h=Ke(s.bodyFont);let f=h.lineHeight,p=0;const g=hr(s.rtl,this.x,this.width),m=function(k){i.fillText(k,g.x(t.x+p),t.y+f/2),t.y+=f+o},_=g.textAlign(a);let y,b,v,D,E,x,M;for(i.textAlign=a,i.textBaseline="middle",i.font=h.string,t.x=cc(this,_,s),i.fillStyle=s.bodyColor,fe(this.beforeBody,m),p=l&&"right"!==_?"center"===a?u/2+d:u+2+d:0,D=0,x=r.length;D<x;++D){for(y=r[D],b=this.labelTextColors[D],i.fillStyle=b,fe(y.before,m),v=y.lines,l&&v.length&&(this._drawColorBox(i,t,D,g,s),f=Math.max(h.lineHeight,c)),E=0,M=v.length;E<M;++E)m(v[E]),f=h.lineHeight;fe(y.after,m)}p=0,f=h.lineHeight,fe(this.afterBody,m),t.y-=o}drawFooter(t,i,s){const r=this.footer,o=r.length;let a,l;if(o){const c=hr(s.rtl,this.x,this.width);for(t.x=cc(this,s.footerAlign,s),t.y+=s.footerMarginTop,i.textAlign=c.textAlign(s.footerAlign),i.textBaseline="middle",a=Ke(s.footerFont),i.fillStyle=s.footerColor,i.font=a.string,l=0;l<o;++l)i.fillText(r[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}drawBackground(t,i,s,r){const{xAlign:o,yAlign:a}=this,{x:l,y:c}=t,{width:u,height:d}=s,{topLeft:h,topRight:f,bottomLeft:p,bottomRight:g}=cr(r.cornerRadius);i.fillStyle=r.backgroundColor,i.strokeStyle=r.borderColor,i.lineWidth=r.borderWidth,i.beginPath(),i.moveTo(l+h,c),"top"===a&&this.drawCaret(t,i,s,r),i.lineTo(l+u-f,c),i.quadraticCurveTo(l+u,c,l+u,c+f),"center"===a&&"right"===o&&this.drawCaret(t,i,s,r),i.lineTo(l+u,c+d-g),i.quadraticCurveTo(l+u,c+d,l+u-g,c+d),"bottom"===a&&this.drawCaret(t,i,s,r),i.lineTo(l+p,c+d),i.quadraticCurveTo(l,c+d,l,c+d-p),"center"===a&&"left"===o&&this.drawCaret(t,i,s,r),i.lineTo(l,c+h),i.quadraticCurveTo(l,c,l+h,c),i.closePath(),i.fill(),r.borderWidth>0&&i.stroke()}_updateAnimationTarget(t){const i=this.chart,s=this.$animations,r=s&&s.x,o=s&&s.y;if(r||o){const a=Ho[t.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=Kw(this,t),c=Object.assign({},a,this._size),u=Xw(i,t,c),d=Zw(t,c,u,i);(r._to!==d.x||o._to!==d.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}draw(t){const i=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(i);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=ut(i.padding);i.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,r,i),function BD(n,e){let t,i;("ltr"===e||"rtl"===e)&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}(t,i.textDirection),o.y+=a.top,this.drawTitle(o,t,i),this.drawBody(o,t,i),this.drawFooter(o,t,i),function VD(n,e){void 0!==e&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){const s=this._active,r=t.map(({datasetIndex:l,index:c})=>{const u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[c],index:c}}),o=!Rl(s,r),a=this._positionChanged(r,i);(o||a)&&(this._active=r,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,i,s=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],a=this._getActiveElements(t,o,i,s),l=this._positionChanged(a,t),c=i||!Rl(a,o)||l;return c&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,i))),c}_getActiveElements(t,i,s,r){const o=this.options;if("mouseout"===t.type)return[];if(!r)return i;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,i){const{caretX:s,caretY:r,options:o}=this,a=Ho[o.position].call(this,t,i);return!1!==a&&(s!==a.x||r!==a.y)}}return n.positioners=Ho,n})();var tC={id:"tooltip",_element:eC,positioners:Ho,afterInit(n,e,t){t&&(n.tooltip=new eC({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip,t={tooltip:e};!1!==n.notifyPlugins("beforeTooltipDraw",t)&&(e&&e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t))},afterEvent(n,e){n.tooltip&&n.tooltip.handleEvent(e.event,e.replay,e.inChartArea)&&(e.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:ti,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return t[e.dataIndex]}return""},afterTitle:ti,beforeBody:ti,beforeLabel:ti,label(n){if(this&&this.options&&"dataset"===this.options.mode)return n.label+": "+n.formattedValue||n.formattedValue;let e=n.dataset.label||"";e&&(e+=": ");const t=n.formattedValue;return le(t)||(e+=t),e},labelColor(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:ti,afterBody:ti,beforeFooter:ti,footer:ti,afterFooter:ti}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>"filter"!==n&&"itemSort"!==n&&"external"!==n,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};class uc extends Zi{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:r}of t)i[s]===r&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(le(e))return null;const i=this.getLabels();return((n,e)=>null===n?null:Je(Math.round(n),0,e))(t=isFinite(t)&&i[t]===e?t:function vV(n,e,t,i){const s=n.indexOf(e);return-1===s?((n,e,t,i)=>("string"==typeof e?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t))(n,e,t,i):s!==n.lastIndexOf(e)?t:s}(i,e,Q(t,e),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let r=this.getLabels();r=0===e&&t===r.length-1?r:r.slice(e,t+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function nC(n,e,{horizontal:t,minRotation:i}){const s=bn(i),r=(t?Math.sin(s):Math.cos(s))||.001;return Math.min(e/r,.75*e*(""+n).length)}uc.id="category",uc.defaults={ticks:{callback:uc.prototype.getLabelForValue}};class dc extends Zi{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return le(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const o=l=>s=t?s:l,a=l=>r=i?r:l;if(e){const l=Bn(s),c=Bn(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===r){let l=1;(r>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(.05*r)),a(r+l),e||o(s-l)}this.min=s,this.max=r}getTickLimit(){const e=this.options.ticks;let s,{maxTicksLimit:t,stepSize:i}=e;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const o=function DV(n,e){const t=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=n,f=r||1,p=u-1,{min:g,max:m}=e,_=!le(o),y=!le(a),b=!le(c),v=(m-g)/(d+1);let E,x,M,k,D=rD((m-g)/p/f)*f;if(D<1e-14&&!_&&!y)return[{value:g},{value:m}];k=Math.ceil(m/D)-Math.floor(g/D),k>p&&(D=rD(k*D/p/f)*f),le(l)||(E=Math.pow(10,l),D=Math.ceil(D*E)/E),"ticks"===s?(x=Math.floor(g/D)*D,M=Math.ceil(m/D)*D):(x=g,M=m),_&&y&&r&&function dN(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}((a-o)/r,D/1e3)?(k=Math.round(Math.min((a-o)/D,u)),D=(a-o)/k,x=o,M=a):b?(x=_?o:x,M=y?a:M,k=c-1,D=(M-x)/k):(k=(M-x)/D,k=Co(k,Math.round(k),D/1e3)?Math.round(k):Math.ceil(k));const G=Math.max(aD(D),aD(x));E=Math.pow(10,le(l)?G:l),x=Math.round(x*E)/E,M=Math.round(M*E)/E;let J=0;for(_&&(h&&x!==o?(t.push({value:o}),x<o&&J++,Co(Math.round((x+J*D)*E)/E,o,nC(o,v,n))&&J++):x<o&&J++);J<k;++J)t.push({value:Math.round((x+J*D)*E)/E});return y&&h&&M!==a?t.length&&Co(t[t.length-1].value,a,nC(a,v,n))?t[t.length-1].value=a:t.push({value:a}):(!y||M===a)&&t.push({value:M}),t}({maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&oD(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return ko(e,this.chart.options.locale,this.options.ticks.format)}}class hc extends dc{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Be(e)?e:0,this.max=Be(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=bn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,r.lineHeight/s))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}function iC(n){return n/Math.pow(10,Math.floor(en(n)))==1}hc.id="linear",hc.defaults={ticks:{callback:tc.formatters.numeric}};class Zf extends Zi{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const i=dc.prototype.parse.apply(this,[e,t]);if(0!==i)return Be(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Be(e)?Math.max(0,e):null,this.max=Be(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const r=l=>i=e?i:l,o=l=>s=t?s:l,a=(l,c)=>Math.pow(10,Math.floor(en(l))+c);i===s&&(i<=0?(r(1),o(10)):(r(a(i,-1)),o(a(s,1)))),i<=0&&r(a(s,-1)),s<=0&&o(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&r(a(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,i=function wV(n,e){const t=Math.floor(en(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let r=Qt(n.min,Math.pow(10,Math.floor(en(e.min)))),o=Math.floor(en(r)),a=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{s.push({value:r,major:iC(r)}),++a,10===a&&(a=1,++o,l=o>=0?1:l),r=Math.round(a*Math.pow(10,o)*l)/l}while(o<t||o===t&&a<i);const c=Qt(n.max,r);return s.push({value:c,major:iC(r)}),s}({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&oD(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return void 0===e?"0":ko(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=en(e),this._valueRange=en(this.max)-en(e)}getPixelForValue(e){return(void 0===e||0===e)&&(e=this.min),null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(en(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function Qf(n){const e=n.ticks;if(e.display&&n.display){const t=ut(e.backdropPadding);return Q(e.font&&e.font.size,oe.font.size)+t.height}return 0}function CV(n,e,t){return t=De(t)?t:[t],{w:FN(n,e.string,t),h:t.length*e.lineHeight}}function sC(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:n<i||n>s?{start:e-t,end:e}:{start:e,end:e+t}}function xV(n,e,t,i,s){const r=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t));let a=0,l=0;i.start<e.l?(a=(e.l-i.start)/r,n.l=Math.min(n.l,e.l-a)):i.end>e.r&&(a=(i.end-e.r)/r,n.r=Math.max(n.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/o,n.t=Math.min(n.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+l))}function MV(n){return 0===n||180===n?"center":n<180?"left":"right"}function TV(n,e,t){return"right"===t?n-=e:"center"===t&&(n-=e/2),n}function AV(n,e,t){return 90===t||270===t?n-=e/2:(t>270||t<90)&&(n-=e),n}function rC(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,_e);else{let r=n.getPointPosition(0,e);s.moveTo(r.x,r.y);for(let o=1;o<i;o++)r=n.getPointPosition(o,e),s.lineTo(r.x,r.y)}}Zf.id="logarithmic",Zf.defaults={ticks:{callback:tc.formatters.logarithmic,major:{enabled:!0}}};class zo extends dc{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=ut(Qf(this.options)/2),t=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(t,i)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=Be(e)&&!isNaN(e)?e:0,this.max=Be(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Qf(this.options))}generateTickLabels(e){dc.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,i)=>{const s=we(this.options.pointLabels.callback,[t,i],this);return s||0===s?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?function EV(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],r=n._pointLabels.length,o=n.options.pointLabels,a=o.centerPointLabels?xe/r:0;for(let l=0;l<r;l++){const c=o.setContext(n.getPointLabelContext(l));s[l]=c.padding;const u=n.getPointPosition(l,n.drawingArea+s[l],a),d=Ke(c.font),h=CV(n.ctx,d,n._pointLabels[l]);i[l]=h;const f=Vt(n.getIndexAngle(l)+a),p=Math.round(_f(f));xV(t,e,f,sC(p,u.x,h.w,0,180),sC(p,u.y,h.h,90,270))}n.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),n._pointLabelItems=function SV(n,e,t){const i=[],s=n._pointLabels.length,r=n.options,o=Qf(r)/2,a=n.drawingArea,l=r.pointLabels.centerPointLabels?xe/s:0;for(let c=0;c<s;c++){const u=n.getPointPosition(c,a+o+t[c],l),d=Math.round(_f(Vt(u.angle+Pe))),h=e[c],f=AV(u.y,h.h,d),p=MV(d),g=TV(u.x,h.w,p);i.push({x:u.x,y:f,textAlign:p,left:g,top:f,right:g+h.w,bottom:f+h.h})}return i}(n,i,s)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){return Vt(e*(_e/(this._pointLabels.length||1))+bn(this.options.startAngle||0))}getDistanceFromCenterForValue(e){if(le(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(le(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const i=t[e];return function OV(n,e,t){return Di(n,{label:t,index:e,type:"pointLabel"})}(this.getContext(),e,i)}}getPointPosition(e,t,i=0){const s=this.getIndexAngle(e)-Pe+i;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:i,right:s,bottom:r}=this._pointLabelItems[e];return{left:t,top:i,right:s,bottom:r}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),rC(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:i,grid:s}=t,r=this._pointLabels.length;let o,a,l;if(t.pointLabels.display&&function IV(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const r=i.setContext(n.getPointLabelContext(s)),o=Ke(r.font),{x:a,y:l,textAlign:c,left:u,top:d,right:h,bottom:f}=n._pointLabelItems[s],{backdropColor:p}=r;if(!le(p)){const g=ut(r.backdropPadding);t.fillStyle=p,t.fillRect(u-g.left,d-g.top,h-u+g.width,f-d+g.height)}qi(t,n._pointLabels[s],a,l+o.lineHeight/2,o,{color:r.color,textAlign:c,textBaseline:"middle"})}}(this,r),s.display&&this.ticks.forEach((c,u)=>{0!==u&&(a=this.getDistanceFromCenterForValue(c.value),function kV(n,e,t,i){const s=n.ctx,r=e.circular,{color:o,lineWidth:a}=e;!r&&!i||!o||!a||t<0||(s.save(),s.strokeStyle=o,s.lineWidth=a,s.setLineDash(e.borderDash),s.lineDashOffset=e.borderDashOffset,s.beginPath(),rC(n,t,r,i),s.closePath(),s.stroke(),s.restore())}(this,s.setContext(this.getContext(u-1)),a,r))}),i.display){for(e.save(),o=r-1;o>=0;o--){const c=i.setContext(this.getPointLabelContext(o)),{color:u,lineWidth:d}=c;!d||!u||(e.lineWidth=d,e.strokeStyle=u,e.setLineDash(c.borderDash),e.lineDashOffset=c.borderDashOffset,a=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,a),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(0===l&&!t.reverse)return;const c=i.setContext(this.getContext(l)),u=Ke(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,o=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=ut(c.backdropPadding);e.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}qi(e,a.label,0,-r,u,{color:c.color})}),e.restore()}drawTitle(){}}zo.id="radialLinear",zo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:tc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:n=>n,padding:5,centerPointLabels:!1}},zo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},zo.descriptors={angleLines:{_fallback:"grid"}};const fc={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Mt=Object.keys(fc);function PV(n,e){return n-e}function oC(n,e){if(le(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:r}=n._parseOpts;let o=e;return"function"==typeof i&&(o=i(o)),Be(o)||(o="string"==typeof i?t.parse(o,i):t.parse(o)),null===o?null:(s&&(o="week"!==s||!wo(r)&&!0!==r?t.startOf(o,s):t.startOf(o,"isoWeek",r)),+o)}function aC(n,e,t,i){const s=Mt.length;for(let r=Mt.indexOf(n);r<s-1;++r){const o=fc[Mt[r]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((t-e)/(a*o.size))<=i)return Mt[r]}return Mt[s-1]}function lC(n,e,t){if(t){if(t.length){const{lo:i,hi:s}=Tf(t,e);n[t[i]>=e?t[i]:t[s]]=!0}}else n[e]=!0}function cC(n,e,t){const i=[],s={},r=e.length;let o,a;for(o=0;o<r;++o)a=e[o],s[a]=o,i.push({value:a,major:!1});return 0!==r&&t?function NV(n,e,t,i){const s=n._adapter,r=+s.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=r;a<=o;a=+s.add(a,1,i))l=t[a],l>=0&&(e[l].major=!0);return e}(n,i,s,t):i}let Jf=(()=>{class n extends Zi{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,i){const s=t.time||(t.time={}),r=this._adapter=new aB._date(t.adapters.date);bo(s.displayFormats,r.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=i.normalized}parse(t,i){return void 0===t?null:oC(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,i=this._adapter,s=t.time.unit||"day";let{min:r,max:o,minDefined:a,maxDefined:l}=this.getUserBounds();function c(u){!a&&!isNaN(u.min)&&(r=Math.min(r,u.min)),!l&&!isNaN(u.max)&&(o=Math.max(o,u.max))}(!a||!l)&&(c(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&c(this.getMinMax(!1))),r=Be(r)&&!isNaN(r)?r:+i.startOf(Date.now(),s),o=Be(o)&&!isNaN(o)?o:+i.endOf(Date.now(),s)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(i=t[0],s=t[t.length-1]),{min:i,max:s}}buildTicks(){const t=this.options,i=t.time,s=t.ticks,r="labels"===s.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,l=function GN(n,e,t){let i=0,s=n.length;for(;i<s&&n[i]<e;)i++;for(;s>i&&n[s-1]>t;)s--;return i>0||s<n.length?n.slice(i,s):n}(r,o,this.max);return this._unit=i.unit||(s.autoSkip?aC(i.minUnit,this.min,this.max,this._getLabelCapacity(o)):function RV(n,e,t,i,s){for(let r=Mt.length-1;r>=Mt.indexOf(t);r--){const o=Mt[r];if(fc[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return Mt[t?Mt.indexOf(t):0]}(this,l.length,i.minUnit,this.min,this.max)),this._majorUnit=s.major.enabled&&"year"!==this._unit?function FV(n){for(let e=Mt.indexOf(n)+1,t=Mt.length;e<t;++e)if(fc[Mt[e]].common)return Mt[e]}(this._unit):void 0,this.initOffsets(r),t.reverse&&l.reverse(),cC(this,l,this._majorUnit)}initOffsets(t){let r,o,i=0,s=0;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),i=1===t.length?1-r:(this.getDecimalForValue(t[1])-r)/2,o=this.getDecimalForValue(t[t.length-1]),s=1===t.length?o:(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;i=Je(i,0,a),s=Je(s,0,a),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){const t=this._adapter,i=this.min,s=this.max,r=this.options,o=r.time,a=o.unit||aC(o.minUnit,i,s,this._getLabelCapacity(i)),l=Q(o.stepSize,1),c="week"===a&&o.isoWeekday,u=wo(c)||!0===c,d={};let f,p,h=i;if(u&&(h=+t.startOf(h,"isoWeek",c)),h=+t.startOf(h,u?"day":a),t.diff(s,i,a)>1e5*l)throw new Error(i+" and "+s+" are too far apart with stepSize of "+l+" "+a);const g="data"===r.ticks.source&&this.getDataTimestamps();for(f=h,p=0;f<s;f=+t.add(f,l,a),p++)lC(d,f,g);return(f===s||"ticks"===r.bounds||1===p)&&lC(d,f,g),Object.keys(d).sort((m,_)=>m-_).map(m=>+m)}getLabelForValue(t){const s=this.options.time;return this._adapter.format(t,s.tooltipFormat?s.tooltipFormat:s.displayFormats.datetime)}_tickFormatFunction(t,i,s,r){const o=this.options,a=o.time.displayFormats,l=this._unit,c=this._majorUnit,d=c&&a[c],h=s[i],p=this._adapter.format(t,r||(c&&d&&h&&h.major?d:l&&a[l])),g=o.ticks.callback;return g?we(g,[p,i,s],this):p}generateTickLabels(t){let i,s,r;for(i=0,s=t.length;i<s;++i)r=t[i],r.label=this._tickFormatFunction(r.value,i,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const i=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((i.start+s)*i.factor)}getValueForPixel(t){const i=this._offsets,s=this.getDecimalForPixel(t)/i.factor-i.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const i=this.options.ticks,s=this.ctx.measureText(t).width,r=bn(this.isHorizontal()?i.maxRotation:i.minRotation),o=Math.cos(r),a=Math.sin(r),l=this._resolveTickFontOptions(0).size;return{w:s*o+l*a,h:s*a+l*o}}_getLabelCapacity(t){const i=this.options.time,s=i.displayFormats,r=s[i.unit]||s.millisecond,o=this._tickFormatFunction(t,0,cC(this,[t],this._majorUnit),r),a=this._getLabelSize(o),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let i,s,t=this._cache.data||[];if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(i=0,s=r.length;i<s;++i)t=t.concat(r[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let i,s;if(t.length)return t;const r=this.getLabels();for(i=0,s=r.length;i<s;++i)t.push(oC(this,r[i]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return function xD(n){const e=new Set;let t,i;for(t=0,i=n.length;t<i;++t)e.add(n[t]);return e.size===i?n:Array.from(e)}(t.sort(PV))}}return n.id="time",n.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}},n})();function pc(n,e,t){let r,o,a,l,i=0,s=n.length-1;t?(e>=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=ii(n,"pos",e)),({pos:r,time:a}=n[i]),({pos:o,time:l}=n[s])):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=ii(n,"time",e)),({time:r,pos:a}=n[i]),({time:o,pos:l}=n[s]));const c=o-r;return c?a+(l-a)*(e-r)/c:a}class ep extends Jf{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=pc(t,this.min),this._tableRange=pc(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],r=[];let o,a,l,c,u;for(o=0,a=e.length;o<a;++o)c=e[o],c>=t&&c<=i&&s.push(c);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,a=s.length;o<a;++o)u=s[o+1],l=s[o-1],c=s[o],Math.round((u+l)/2)!==c&&r.push({time:c,pos:o/(a-1)});return r}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return e=t.length&&i.length?this.normalize(t.concat(i)):t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(pc(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return pc(this._table,i*this._tableRange+this._minPos,!0)}}ep.id="timeseries",ep.defaults=Jf.defaults;let BV=(()=>{class n{constructor(t){this.http=t}get(t){const i=(new Ln).set("replayId",t.toString());return this.http.get("/api/matchdetails",{params:i})}}return n.\u0275fac=function(t){return new(t||n)(w(lr))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const VV=["cnvs"];function jV(n,e){1&n&&Vi(0,"div",3)}let HV=(()=>{class n{constructor(t){this.svc=t,this.replayNotFound=new Bt,this.heroImages={},this.eventImages={}}ngOnInit(){this.fetch()}ngOnDestroy(){this.chart&&this.chart.destroy()}ngAfterViewInit(){!this.matchDetails||this.setup2()}ngOnChanges(t){t.rid&&this.fetch()}fetch(){isNaN(+this.rid)||(this.matchDetails$=this.svc.get(+this.rid).pipe(Ol(t=>this.setup(t)),Pl(t=>(this.replayNotFound.emit(),Nn(null)))))}setup(t){this.matchDetails=t,this.cnvs&&this.setup2()}setup2(){const t=this.matchDetails;this.ctx_chart=this.cnvs.nativeElement.getContext("2d"),t.Heroes.forEach(d=>{var h=new Image;h.src=`/Images/Heroes/Resized/30x30/${d}.png`,this.heroImages[`hero${d}`]=h}),t.TeamObjectiveNames.forEach((d,h)=>{var f=new Image;f.src=t.TeamObjectiveImages[h],this.eventImages[d]=f});const s=t.TeamObjectiveStyles.map(d=>this.eventImages[d]),r=t.HeroDeathStyles.map(d=>this.heroImages[d]),o=t.XValues.map((d,h)=>({x:d,y:t.YValues[h]})),a=t.XHeroDeaths.map((d,h)=>({x:d,y:t.YHeroDeaths[h]})),l=t.XDiff.map((d,h)=>({x:d,y:t.YDiff[h]}));return this.chart=new ai(this.ctx_chart,{type:"line",data:{datasets:[{type:"line",fill:!1,showLine:!1,pointHitRadius:15,pointStyle:s,data:o},{type:"line",fill:!1,showLine:!1,pointHitRadius:10,pointStyle:r,data:a},{type:"NegativeColoredLine",pointHoverBorderColor:"#337ab7",pointHoverBackgroundColor:"#FFFFFF",borderWidth:5,pointRadius:2,pointHoverRadius:5,pointBorderWidth:0,pointHoverBorderWidth:1,pointHitRadius:7,label:"XP Difference",data:l,fill:{value:0}}]},options:{maintainAspectRatio:!1,title:{display:!1},legend:{display:!1},plugins:{tooltip:{displayColors:!1,bodyFontSize:14,callbacks:{title:d=>this.secondsToMMSS(0==d[0].datasetIndex?t.MatchEventTimers[d[0].dataIndex]:1==d[0].datasetIndex?t.DeathTimers[d[0].dataIndex]:d[0].raw.x),label:d=>0==d.datasetIndex?t.EventLabels[d.dataIndex]:2==d.datasetIndex?(d.dataset.label||"")+": "+d.formattedValue:t.DeathLabels[d.dataIndex]}}},hover:{mode:"nearest"},scales:{x:{type:"linear",position:"bottom",gridLines:{display:!0},ticks:{stepSize:120,max:t.MaxXpDiffTick,callback:(d,h,f)=>d%120==0?this.secondsToMMSS(d):""}},y:{gridLines:{display:!0},ticks:{min:-t.MaxXpDifference,max:t.MaxXpDifference}}}}}),!0}secondsToMMSS(t){var i=Number(t),s=Math.floor(i/60),r=Math.floor(i%60);return s+":"+(r<10?"0"+r:r)}}return n.\u0275fac=function(t){return new(t||n)(P(BV))},n.\u0275cmp=an({type:n,selectors:[["app-match-log"]],viewQuery:function(t,i){if(1&t&&rl(VV,5),2&t){let s;sl(s=ol())&&(i.cnvs=s.first)}},inputs:{rid:"rid"},outputs:{replayNotFound:"replayNotFound"},features:[ms],decls:5,vars:3,consts:[[2,"height","400px","background-color","white","border-radius","5px"],["cnvs",""],["style","visibility: collapse;",4,"ngIf"],[2,"visibility","collapse"]],template:function(t,i){1&t&&(lt(0,"div",0),Vi(1,"canvas",null,1),yt(),Xn(3,jV,1,0,"div",2),tl(4,"async")),2&t&&(Yt(3),kn("ngIf",nl(4,1,i.matchDetails$)))},directives:[Cl],pipes:[El],styles:[""]}),n})();function tp(n){return null!=n&&"false"!=`${n}`}function gc(n){return Array.isArray(n)?n:[n]}function $e(n){return null==n?"":"string"==typeof n?n:`${n}px`}function pr(n){return n instanceof Lt?n.nativeElement:n}const{isArray:$V}=Array;function np(n){return wt(e=>function UV(n,e){return $V(e)?n(...e):n(e)}(n,e))}const WV=["addListener","removeListener"],GV=["addEventListener","removeEventListener"],qV=["on","off"];function ip(n,e,t,i){if(W(t)&&(i=t,t=void 0),i)return ip(n,e,t).pipe(np(i));const[s,r]=function XV(n){return W(n.addEventListener)&&W(n.removeEventListener)}(n)?GV.map(o=>a=>n[o](e,a,t)):function YV(n){return W(n.addListener)&&W(n.removeListener)}(n)?WV.map(uC(n,e)):function KV(n){return W(n.on)&&W(n.off)}(n)?qV.map(uC(n,e)):[];if(!s&&Qc(n))return Dr(o=>ip(o,e,t))(zt(n));if(!s)throw new TypeError("Invalid event target");return new Te(o=>{const a=(...l)=>o.next(1<l.length?l:l[0]);return s(a),()=>r(a)})}function uC(n,e){return t=>i=>n[t](e,i)}class ZV extends ft{constructor(e,t){super()}schedule(e,t=0){return this}}const mc={setInterval(...n){const{delegate:e}=mc;return((null==e?void 0:e.setInterval)||setInterval)(...n)},clearInterval(n){const{delegate:e}=mc;return((null==e?void 0:e.clearInterval)||clearInterval)(n)},delegate:void 0};class sp extends ZV{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const i=this.id,s=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(s,i,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(s,this.id,t),this}requestAsyncId(e,t,i=0){return mc.setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return t;mc.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(e,t);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let s,i=!1;try{this.work(e)}catch(r){i=!0,s=r||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s}unsubscribe(){if(!this.closed){const{id:e,scheduler:t}=this,{actions:i}=t;this.work=this.state=this.scheduler=null,this.pending=!1,ls(i,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}}const $o={schedule(n){let e=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:i}=$o;i&&(e=i.requestAnimationFrame,t=i.cancelAnimationFrame);const s=e(r=>{t=void 0,n(r)});return new ft(()=>null==t?void 0:t(s))},requestAnimationFrame(...n){const{delegate:e}=$o;return((null==e?void 0:e.requestAnimationFrame)||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){const{delegate:e}=$o;return((null==e?void 0:e.cancelAnimationFrame)||cancelAnimationFrame)(...n)},delegate:void 0};class Uo{constructor(e,t=Uo.now){this.schedulerActionCtor=e,this.now=t}schedule(e,t=0,i){return new this.schedulerActionCtor(this,e).schedule(i,t)}}Uo.now=ff.now;class rp extends Uo{constructor(e,t=Uo.now){super(e,t),this.actions=[],this._active=!1,this._scheduled=void 0}flush(e){const{actions:t}=this;if(this._active)return void t.push(e);let i;this._active=!0;do{if(i=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,i){for(;e=t.shift();)e.unsubscribe();throw i}}}new class JV extends rp{flush(e){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let s;e=e||i.shift();do{if(s=e.execute(e.state,e.delay))break}while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,s){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw s}}}(class QV extends sp{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return null!==i&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=$o.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(e,t,i);e.actions.some(s=>s.id===t)||($o.cancelAnimationFrame(t),e._scheduled=void 0)}});let op,tj=1;const _c={};function dC(n){return n in _c&&(delete _c[n],!0)}const nj={setImmediate(n){const e=tj++;return _c[e]=!0,op||(op=Promise.resolve()),op.then(()=>dC(e)&&n()),e},clearImmediate(n){dC(n)}},{setImmediate:ij,clearImmediate:sj}=nj,yc={setImmediate(...n){const{delegate:e}=yc;return((null==e?void 0:e.setImmediate)||ij)(...n)},clearImmediate(n){const{delegate:e}=yc;return((null==e?void 0:e.clearImmediate)||sj)(n)},delegate:void 0},ap=(new class oj extends rp{flush(e){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let s;e=e||i.shift();do{if(s=e.execute(e.state,e.delay))break}while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,s){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw s}}}(class rj extends sp{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return null!==i&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=yc.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,t,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(e,t,i);e.actions.some(s=>s.id===t)||(yc.clearImmediate(t),e._scheduled=void 0)}}),new rp(sp)),lj=ap;function hC(n,e=ap){return function cj(n){return it((e,t)=>{let i=!1,s=null,r=null,o=!1;const a=()=>{if(null==r||r.unsubscribe(),r=null,i){i=!1;const c=s;s=null,t.next(c)}o&&t.complete()},l=()=>{r=null,o&&t.complete()};e.subscribe(tt(t,c=>{i=!0,s=c,r||zt(n(c)).subscribe(r=tt(t,a,l))},()=>{o=!0,(!i||!r||r.closed)&&t.complete()}))})}(()=>function dj(n=0,e,t=lj){let i=-1;return null!=e&&(pg(e)?t=e:i=e),new Te(s=>{let r=function uj(n){return n instanceof Date&&!isNaN(n)}(n)?+n-t.now():n;r<0&&(r=0);let o=0;return t.schedule(function(){s.closed||(s.next(o++),0<=i?this.schedule(void 0,i):s.complete())},r)})}(n,e))}let lp;try{lp="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(n){lp=!1}let Wo,Qi,up,wn=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function NF(n){return n===C0}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!lp)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(w(co))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function cp(n){return function hj(){if(null==Wo&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wo=!0}))}finally{Wo=Wo||!1}return Wo}()?n:!!n.capture}function fj(){if(null==Qi){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Qi=!1,Qi;if("scrollBehavior"in document.documentElement.style)Qi=!0;else{const n=Element.prototype.scrollTo;Qi=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return Qi}function Ji(n){return n.composedPath?n.composedPath()[0]:n.target}function dp(){return"undefined"!=typeof __karma__&&!!__karma__||"undefined"!=typeof jasmine&&!!jasmine||"undefined"!=typeof jest&&!!jest||"undefined"!=typeof Mocha&&!!Mocha}const mj=new B("cdk-dir-doc",{providedIn:"root",factory:function _j(){return Hu(se)}}),yj=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let bj=(()=>{class n{constructor(t){if(this.value="ltr",this.change=new Bt,t){const s=t.documentElement?t.documentElement.dir:null;this.value=function vj(n){const e=(null==n?void 0:n.toLowerCase())||"";return"auto"===e&&"undefined"!=typeof navigator&&(null==navigator?void 0:navigator.language)?yj.test(navigator.language)?"rtl":"ltr":"rtl"===e?"rtl":"ltr"}((t.body?t.body.dir:null)||s||"ltr")}}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(t){return new(t||n)(w(mj,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Go=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({}),n})(),wj=(()=>{class n{constructor(t,i,s){this._ngZone=t,this._platform=i,this._scrolled=new Ae,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=s}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const i=this.scrollContainers.get(t);i&&(i.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new Te(i=>{this._globalSubscription||this._addGlobalListener();const s=t>0?this._scrolled.pipe(hC(t)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{s.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Nn()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(t,i){const s=this.getAncestorScrollContainers(t);return this.scrolled(i).pipe(rf(r=>!r||s.indexOf(r)>-1))}getAncestorScrollContainers(t){const i=[];return this.scrollContainers.forEach((s,r)=>{this._scrollableContainsElement(r,t)&&i.push(r)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,i){let s=pr(i),r=t.getElementRef().nativeElement;do{if(s==r)return!0}while(s=s.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>ip(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(t){return new(t||n)(w(he),w(wn),w(se,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),pC=(()=>{class n{constructor(t,i,s){this._platform=t,this._change=new Ae,this._changeListener=r=>{this._change.next(r)},this._document=s,i.runOutsideAngular(()=>{if(t.isBrowser){const r=this._getWindow();r.addEventListener("resize",this._changeListener),r.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:i,height:s}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+s,right:t.left+i,height:s,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,i=this._getWindow(),s=t.documentElement,r=s.getBoundingClientRect();return{top:-r.top||t.body.scrollTop||i.scrollY||s.scrollTop||0,left:-r.left||t.body.scrollLeft||i.scrollX||s.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(hC(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(t){return new(t||n)(w(wn),w(he),w(se,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),gC=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({}),n})(),mC=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({imports:[[Go,gC],Go,gC]}),n})();class hp{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;null!=e&&(this._attachedHost=null,e.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(e){this._attachedHost=e}}class fp extends hp{constructor(e,t,i,s){super(),this.component=e,this.viewContainerRef=t,this.injector=i,this.componentFactoryResolver=s}}class _C extends hp{constructor(e,t,i){super(),this.templateRef=e,this.viewContainerRef=t,this.context=i}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}}class Ej extends hp{constructor(e){super(),this.element=e instanceof Lt?e.nativeElement:e}}class pp{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){return e instanceof fp?(this._attachedPortal=e,this.attachComponentPortal(e)):e instanceof _C?(this._attachedPortal=e,this.attachTemplatePortal(e)):this.attachDomPortal&&e instanceof Ej?(this._attachedPortal=e,this.attachDomPortal(e)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class xj extends pp{constructor(e,t,i,s,r){super(),this.outletElement=e,this._componentFactoryResolver=t,this._appRef=i,this._defaultInjector=s,this.attachDomPortal=o=>{const a=o.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=r}attachComponentPortal(e){const i=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component);let s;return e.viewContainerRef?(s=e.viewContainerRef.createComponent(i,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector),this.setDisposeFn(()=>s.destroy())):(s=i.create(e.injector||this._defaultInjector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(s)),this._attachedPortal=e,s}attachTemplatePortal(e){let t=e.viewContainerRef,i=t.createEmbeddedView(e.templateRef,e.context);return i.rootNodes.forEach(s=>this.outletElement.appendChild(s)),i.detectChanges(),this.setDisposeFn(()=>{let s=t.indexOf(i);-1!==s&&t.remove(s)}),this._attachedPortal=e,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}}let yC=(()=>{class n extends pp{constructor(t,i,s){super(),this._componentFactoryResolver=t,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new Bt,this.attachDomPortal=r=>{const o=r.element,a=this._document.createComment("dom-portal");r.setAttachedHost(this),o.parentNode.insertBefore(a,o),this._getRootNode().appendChild(o),this._attachedPortal=r,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(o,a)})},this._document=s}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedPortal=null,this._attachedRef=null}attachComponentPortal(t){t.setAttachedHost(this);const i=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,r=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),o=i.createComponent(r,i.length,t.injector||i.injector);return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(t){t.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}}return n.\u0275fac=function(t){return new(t||n)(P(Zn),P(mn),P(se))},n.\u0275dir=Ct({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ls]}),n})(),vC=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({}),n})();function bc(n){return it((e,t)=>{zt(n).subscribe(tt(t,()=>t.complete(),Wc)),!t.closed&&e.subscribe(t)})}const bC=fj();class Sj{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=$e(-this._previousScrollPosition.left),e.style.top=$e(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const e=this._document.documentElement,i=e.style,s=this._document.body.style,r=i.scrollBehavior||"",o=s.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),bC&&(i.scrollBehavior=s.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),bC&&(i.scrollBehavior=r,s.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,i=this._viewportRuler.getViewportSize();return t.scrollHeight>i.height||t.scrollWidth>i.width}}class Mj{constructor(e,t,i,s){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=i,this._config=s,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef=e}enable(){if(this._scrollSubscription)return;const e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class DC{enable(){}disable(){}attach(){}}function gp(n,e){return e.some(t=>n.bottom<t.top||n.top>t.bottom||n.right<t.left||n.left>t.right)}function wC(n,e){return e.some(t=>n.top<t.top||n.bottom>t.bottom||n.left<t.left||n.right>t.right)}class Tj{constructor(e,t,i,s){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=i,this._config=s,this._scrollSubscription=null}attach(e){this._overlayRef=e}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:s}=this._viewportRuler.getViewportSize();gp(t,[{width:i,height:s,bottom:s,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let Aj=(()=>{class n{constructor(t,i,s,r){this._scrollDispatcher=t,this._viewportRuler=i,this._ngZone=s,this.noop=()=>new DC,this.close=o=>new Mj(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new Sj(this._viewportRuler,this._document),this.reposition=o=>new Tj(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=r}}return n.\u0275fac=function(t){return new(t||n)(w(wj),w(pC),w(he),w(se))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class CC{constructor(e){if(this.scrollStrategy=new DC,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){const t=Object.keys(e);for(const i of t)void 0!==e[i]&&(this[i]=e[i])}}}class Ij{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}}class kj{constructor(e,t,i,s,r,o,a,l,c){this._portalOutlet=e,this._host=t,this._pane=i,this._config=s,this._ngZone=r,this._keyboardDispatcher=o,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._backdropElement=null,this._backdropClick=new Ae,this._attachments=new Ae,this._detachments=new Ae,this._locationChanges=ft.EMPTY,this._backdropClickHandler=u=>this._backdropClick.next(u),this._keydownEvents=new Ae,this._outsidePointerEvents=new Ae,s.scrollStrategy&&(this._scrollStrategy=s.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=s.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){let t=this._portalOutlet.attach(e);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Cr(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){var e;const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),null===(e=this._host)||void 0===e||e.remove(),this._previousHostParent=this._pane=this._host=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=Object.assign(Object.assign({},this._config),e),this._updateElementSize()}setDirection(e){this._config=Object.assign(Object.assign({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){const e=this._config.direction;return e?"string"==typeof e?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const e=this._pane.style;e.width=$e(this._config.width),e.height=$e(this._config.height),e.minWidth=$e(this._config.minWidth),e.minHeight=$e(this._config.minHeight),e.maxWidth=$e(this._config.maxWidth),e.maxHeight=$e(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){const e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const e=this._backdropElement;if(!e)return;let t;const i=()=>{e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",i),this._disposeBackdrop(e)),this._config.backdropClass&&this._toggleClasses(e,this._config.backdropClass,!1),clearTimeout(t)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",i)}),e.style.pointerEvents="none",t=this._ngZone.runOutsideAngular(()=>setTimeout(i,500))}_toggleClasses(e,t,i){const s=gc(t||[]).filter(r=>!!r);s.length&&(i?e.classList.add(...s):e.classList.remove(...s))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const e=this._ngZone.onStable.pipe(bc(tu(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){const e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.remove(),this._backdropElement===e&&(this._backdropElement=null))}}let EC=(()=>{class n{constructor(t,i){this._platform=i,this._document=t}ngOnDestroy(){var t;null===(t=this._containerElement)||void 0===t||t.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||dp()){const s=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let r=0;r<s.length;r++)s[r].remove()}const i=this._document.createElement("div");i.classList.add(t),dp()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}}return n.\u0275fac=function(t){return new(t||n)(w(se),w(wn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const xC="cdk-overlay-connected-position-bounding-box",Oj=/([A-Za-z%]+)$/;class Pj{constructor(e,t,i,s,r){this._viewportRuler=t,this._document=i,this._platform=s,this._overlayContainer=r,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Ae,this._resizeSubscription=ft.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}get positions(){return this._preferredPositions}attach(e){this._validatePositions(),e.hostElement.classList.add(xC),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const e=this._originRect,t=this._overlayRect,i=this._viewportRect,s=this._containerRect,r=[];let o;for(let a of this._preferredPositions){let l=this._getOriginPoint(e,s,a),c=this._getOverlayPoint(l,t,a),u=this._getOverlayFit(c,t,i,a);if(u.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(u,c,i)?r.push({position:a,origin:l,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleArea<u.visibleArea)&&(o={overlayFit:u,overlayPoint:c,originPoint:l,position:a,overlayRect:t})}if(r.length){let a=null,l=-1;for(const c of r){const u=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);u>l&&(l=u,a=c)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&es(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(xC),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,-1===e.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,i){let s,r;if("center"==i.originX)s=e.left+e.width/2;else{const o=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;s="start"==i.originX?o:a}return t.left<0&&(s-=t.left),r="center"==i.originY?e.top+e.height/2:"top"==i.originY?e.top:e.bottom,t.top<0&&(r-=t.top),{x:s,y:r}}_getOverlayPoint(e,t,i){let s,r;return s="center"==i.overlayX?-t.width/2:"start"===i.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,r="center"==i.overlayY?-t.height/2:"top"==i.overlayY?0:-t.height,{x:e.x+s,y:e.y+r}}_getOverlayFit(e,t,i,s){const r=MC(t);let{x:o,y:a}=e,l=this._getOffset(s,"x"),c=this._getOffset(s,"y");l&&(o+=l),c&&(a+=c);let h=0-a,f=a+r.height-i.height,p=this._subtractOverflows(r.width,0-o,o+r.width-i.width),g=this._subtractOverflows(r.height,h,f),m=p*g;return{visibleArea:m,isCompletelyWithinViewport:r.width*r.height===m,fitsInViewportVertically:g===r.height,fitsInViewportHorizontally:p==r.width}}_canFitWithFlexibleDimensions(e,t,i){if(this._hasFlexibleDimensions){const s=i.bottom-t.y,r=i.right-t.x,o=SC(this._overlayRef.getConfig().minHeight),a=SC(this._overlayRef.getConfig().minWidth),c=e.fitsInViewportHorizontally||null!=a&&a<=r;return(e.fitsInViewportVertically||null!=o&&o<=s)&&c}return!1}_pushOverlayOnScreen(e,t,i){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};const s=MC(t),r=this._viewportRect,o=Math.max(e.x+s.width-r.width,0),a=Math.max(e.y+s.height-r.height,0),l=Math.max(r.top-i.top-e.y,0),c=Math.max(r.left-i.left-e.x,0);let u=0,d=0;return u=s.width<=r.width?c||-o:e.x<this._viewportMargin?r.left-i.left-e.x:0,d=s.height<=r.height?l||-a:e.y<this._viewportMargin?r.top-i.top-e.y:0,this._previousPushAmount={x:u,y:d},{x:e.x+u,y:e.y+d}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._lastPosition=e,this._positionChanges.observers.length){const i=this._getScrollVisibility(),s=new Ij(e,i);this._positionChanges.next(s)}this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;const t=this._boundingBox.querySelectorAll(this._transformOriginSelector);let i,s=e.overlayY;i="center"===e.overlayX?"center":this._isRtl()?"start"===e.overlayX?"right":"left":"start"===e.overlayX?"left":"right";for(let r=0;r<t.length;r++)t[r].style.transformOrigin=`${i} ${s}`}_calculateBoundingBoxRect(e,t){const i=this._viewportRect,s=this._isRtl();let r,o,a,u,d,h;if("top"===t.overlayY)o=e.y,r=i.height-o+this._viewportMargin;else if("bottom"===t.overlayY)a=i.height-e.y+2*this._viewportMargin,r=i.height-a+this._viewportMargin;else{const f=Math.min(i.bottom-e.y+i.top,e.y),p=this._lastBoundingBoxSize.height;r=2*f,o=e.y-f,r>p&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.y-p/2)}if("end"===t.overlayX&&!s||"start"===t.overlayX&&s)h=i.width-e.x+this._viewportMargin,u=e.x-this._viewportMargin;else if("start"===t.overlayX&&!s||"end"===t.overlayX&&s)d=e.x,u=i.right-e.x;else{const f=Math.min(i.right-e.x+i.left,e.x),p=this._lastBoundingBoxSize.width;u=2*f,d=e.x-f,u>p&&!this._isInitialRender&&!this._growAfterOpen&&(d=e.x-p/2)}return{top:o,left:d,bottom:a,right:h,width:u,height:r}}_setBoundingBoxStyles(e,t){const i=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const s={};if(this._hasExactPosition())s.top=s.left="0",s.bottom=s.right=s.maxHeight=s.maxWidth="",s.width=s.height="100%";else{const r=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;s.height=$e(i.height),s.top=$e(i.top),s.bottom=$e(i.bottom),s.width=$e(i.width),s.left=$e(i.left),s.right=$e(i.right),s.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",s.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",r&&(s.maxHeight=$e(r)),o&&(s.maxWidth=$e(o))}this._lastBoundingBoxSize=i,es(this._boundingBox.style,s)}_resetBoundingBoxStyles(){es(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){es(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){const i={},s=this._hasExactPosition(),r=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(s){const u=this._viewportRuler.getViewportScrollPosition();es(i,this._getExactOverlayY(t,e,u)),es(i,this._getExactOverlayX(t,e,u))}else i.position="static";let a="",l=this._getOffset(t,"x"),c=this._getOffset(t,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),o.maxHeight&&(s?i.maxHeight=$e(o.maxHeight):r&&(i.maxHeight="")),o.maxWidth&&(s?i.maxWidth=$e(o.maxWidth):r&&(i.maxWidth="")),es(this._pane.style,i)}_getExactOverlayY(e,t,i){let s={top:"",bottom:""},r=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,i)),"bottom"===e.overlayY?s.bottom=this._document.documentElement.clientHeight-(r.y+this._overlayRect.height)+"px":s.top=$e(r.y),s}_getExactOverlayX(e,t,i){let o,s={left:"",right:""},r=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,i)),o=this._isRtl()?"end"===e.overlayX?"left":"right":"end"===e.overlayX?"right":"left","right"===o?s.right=this._document.documentElement.clientWidth-(r.x+this._overlayRect.width)+"px":s.left=$e(r.x),s}_getScrollVisibility(){const e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),i=this._scrollables.map(s=>s.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:wC(e,i),isOriginOutsideView:gp(e,i),isOverlayClipped:wC(t,i),isOverlayOutsideView:gp(t,i)}}_subtractOverflows(e,...t){return t.reduce((i,s)=>i-Math.max(s,0),e)}_getNarrowedViewportRect(){const e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+e-this._viewportMargin,bottom:i.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return"x"===t?null==e.offsetX?this._offsetX:e.offsetX:null==e.offsetY?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&gc(e).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){const e=this._origin;if(e instanceof Lt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();const t=e.width||0,i=e.height||0;return{top:e.y,bottom:e.y+i,left:e.x,right:e.x+t,height:i,width:t}}}function es(n,e){for(let t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function SC(n){if("number"!=typeof n&&null!=n){const[e,t]=n.split(Oj);return t&&"px"!==t?null:parseFloat(e)}return n||null}function MC(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}const TC="cdk-global-overlay-wrapper";class Rj{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(e){const t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(TC),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._rightOffset="",this._leftOffset=e,this._justifyContent="flex-start",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._leftOffset="",this._rightOffset=e,this._justifyContent="flex-end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._justifyContent="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:s,height:r,maxWidth:o,maxHeight:a}=i,l=!("100%"!==s&&"100vw"!==s||o&&"100%"!==o&&"100vw"!==o),c=!("100%"!==r&&"100vh"!==r||a&&"100%"!==a&&"100vh"!==a);e.position=this._cssPosition,e.marginLeft=l?"0":this._leftOffset,e.marginTop=c?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=this._rightOffset,l?t.justifyContent="flex-start":"center"===this._justifyContent?t.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?t.justifyContent="flex-end":"flex-end"===this._justifyContent&&(t.justifyContent="flex-start"):t.justifyContent=this._justifyContent,t.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,i=t.style;t.classList.remove(TC),i.justifyContent=i.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}}let Fj=(()=>{class n{constructor(t,i,s,r){this._viewportRuler=t,this._document=i,this._platform=s,this._overlayContainer=r}global(){return new Rj}flexibleConnectedTo(t){return new Pj(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(t){return new(t||n)(w(pC),w(se),w(wn),w(EC))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),AC=(()=>{class n{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const i=this._attachedOverlays.indexOf(t);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(t){return new(t||n)(w(se))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Nj=(()=>{class n extends AC{constructor(t){super(t),this._keydownListener=i=>{const s=this._attachedOverlays;for(let r=s.length-1;r>-1;r--)if(s[r]._keydownEvents.observers.length>0){s[r]._keydownEvents.next(i);break}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(t){return new(t||n)(w(se))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Lj=(()=>{class n extends AC{constructor(t,i){super(t),this._platform=i,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Ji(s)},this._clickListener=s=>{const r=Ji(s),o="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;const a=this._attachedOverlays.slice();for(let l=a.length-1;l>-1;l--){const c=a[l];if(!(c._outsidePointerEvents.observers.length<1)&&c.hasAttached()){if(c.overlayElement.contains(r)||c.overlayElement.contains(o))break;c._outsidePointerEvents.next(s)}}}}add(t){if(super.add(t),!this._isAttached){const i=this._document.body;i.addEventListener("pointerdown",this._pointerDownListener,!0),i.addEventListener("click",this._clickListener,!0),i.addEventListener("auxclick",this._clickListener,!0),i.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}}return n.\u0275fac=function(t){return new(t||n)(w(se),w(wn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Bj=0,Dc=(()=>{class n{constructor(t,i,s,r,o,a,l,c,u,d,h){this.scrollStrategies=t,this._overlayContainer=i,this._componentFactoryResolver=s,this._positionBuilder=r,this._keyboardDispatcher=o,this._injector=a,this._ngZone=l,this._document=c,this._directionality=u,this._location=d,this._outsideClickDispatcher=h}create(t){const i=this._createHostElement(),s=this._createPaneElement(i),r=this._createPortalOutlet(s),o=new CC(t);return o.direction=o.direction||this._directionality.value,new kj(r,i,s,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}position(){return this._positionBuilder}_createPaneElement(t){const i=this._document.createElement("div");return i.id="cdk-overlay-"+Bj++,i.classList.add("cdk-overlay-pane"),t.appendChild(i),i}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(or)),new xj(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(t){return new(t||n)(w(Aj),w(EC),w(Zn),w(Fj),w(Nj),w(Ne),w(he),w(se),w(bj),w(o0),w(Lj))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const Hj={provide:new B("cdk-connected-overlay-scroll-strategy"),deps:[Dc],useFactory:function jj(n){return()=>n.scrollStrategies.reposition()}};let zj=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({providers:[Dc,Hj],imports:[[Go,vC,mC],mC]}),n})();class $j extends Ae{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){const{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}}function kC(n){return rf((e,t)=>n<=t)}function Xj(n,e){return n===e}function FC(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function NC(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}const sH=new B("cdk-input-modality-detector-options"),rH={ignoreKeys:[18,17,224,91,16]},mr=cp({passive:!0,capture:!0});let oH=(()=>{class n{constructor(t,i,s,r){this._platform=t,this._mostRecentTarget=null,this._modality=new $j(null),this._lastTouchMs=0,this._onKeydown=o=>{var a,l;(null===(l=null===(a=this._options)||void 0===a?void 0:a.ignoreKeys)||void 0===l?void 0:l.some(c=>c===o.keyCode))||(this._modality.next("keyboard"),this._mostRecentTarget=Ji(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(FC(o)?"keyboard":"mouse"),this._mostRecentTarget=Ji(o))},this._onTouchstart=o=>{NC(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Ji(o))},this._options=Object.assign(Object.assign({},rH),r),this.modalityDetected=this._modality.pipe(kC(1)),this.modalityChanged=this.modalityDetected.pipe(function Kj(n,e=cs){return n=null!=n?n:Xj,it((t,i)=>{let s,r=!0;t.subscribe(tt(i,o=>{const a=e(o);(r||!n(s,a))&&(r=!1,s=a,i.next(o))}))})}()),t.isBrowser&&i.runOutsideAngular(()=>{s.addEventListener("keydown",this._onKeydown,mr),s.addEventListener("mousedown",this._onMousedown,mr),s.addEventListener("touchstart",this._onTouchstart,mr)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,mr),document.removeEventListener("mousedown",this._onMousedown,mr),document.removeEventListener("touchstart",this._onTouchstart,mr))}}return n.\u0275fac=function(t){return new(t||n)(w(wn),w(he),w(se),w(sH,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const aH=new B("liveAnnouncerElement",{providedIn:"root",factory:function lH(){return null}}),cH=new B("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let BC=(()=>{class n{constructor(t,i,s,r){this._ngZone=i,this._defaultOptions=r,this._document=s,this._liveElement=t||this._createLiveElement()}announce(t,...i){const s=this._defaultOptions;let r,o;return 1===i.length&&"number"==typeof i[0]?o=i[0]:[r,o]=i,this.clear(),clearTimeout(this._previousTimeout),r||(r=s&&s.politeness?s.politeness:"polite"),null==o&&s&&(o=s.duration),this._liveElement.setAttribute("aria-live",r),this._ngZone.runOutsideAngular(()=>new Promise(a=>{clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,a(),"number"==typeof o&&(this._previousTimeout=setTimeout(()=>this.clear(),o))},100)}))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){var t;clearTimeout(this._previousTimeout),null===(t=this._liveElement)||void 0===t||t.remove(),this._liveElement=null}_createLiveElement(){const t="cdk-live-announcer-element",i=this._document.getElementsByClassName(t),s=this._document.createElement("div");for(let r=0;r<i.length;r++)i[r].remove();return s.classList.add(t),s.classList.add("cdk-visually-hidden"),s.setAttribute("aria-atomic","true"),s.setAttribute("aria-live","polite"),this._document.body.appendChild(s),s}}return n.\u0275fac=function(t){return new(t||n)(w(aH,8),w(he),w(se),w(cH,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const uH=new B("cdk-focus-monitor-default-options"),wc=cp({passive:!0,capture:!0});let dH=(()=>{class n{constructor(t,i,s,r,o){this._ngZone=t,this._platform=i,this._inputModalityDetector=s,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Ae,this._rootNodeFocusAndBlurListener=a=>{const l=Ji(a),c="focus"===a.type?this._onFocus:this._onBlur;for(let u=l;u;u=u.parentElement)c.call(this,a,u)},this._document=r,this._detectionMode=(null==o?void 0:o.detectionMode)||0}monitor(t,i=!1){const s=pr(t);if(!this._platform.isBrowser||1!==s.nodeType)return Nn(null);const r=function gj(n){if(function pj(){if(null==up){const n="undefined"!=typeof document?document.head:null;up=!(!n||!n.createShadowRoot&&!n.attachShadow)}return up}()){const e=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}(s)||this._getDocument(),o=this._elementInfo.get(s);if(o)return i&&(o.checkChildren=!0),o.subject;const a={checkChildren:i,subject:new Ae,rootNode:r};return this._elementInfo.set(s,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(t){const i=pr(t),s=this._elementInfo.get(i);s&&(s.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(s))}focusVia(t,i,s){const r=pr(t);r===this._getDocument().activeElement?this._getClosestElementsInfo(r).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),"function"==typeof r.focus&&r.focus(s))}ngOnDestroy(){this._elementInfo.forEach((t,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}_shouldBeAttributedToTouch(t){return 1===this._detectionMode||!!(null==t?void 0:t.contains(this._inputModalityDetector._mostRecentTarget))}_setClasses(t,i){t.classList.toggle("cdk-focused",!!i),t.classList.toggle("cdk-touch-focused","touch"===i),t.classList.toggle("cdk-keyboard-focused","keyboard"===i),t.classList.toggle("cdk-mouse-focused","mouse"===i),t.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(t,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,i){const s=this._elementInfo.get(i),r=Ji(t);!s||!s.checkChildren&&i!==r||this._originChanged(i,this._getFocusOrigin(r),s)}_onBlur(t,i){const s=this._elementInfo.get(i);!s||s.checkChildren&&t.relatedTarget instanceof Node&&i.contains(t.relatedTarget)||(this._setClasses(i),this._emitOrigin(s.subject,null))}_emitOrigin(t,i){this._ngZone.run(()=>t.next(i))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const i=t.rootNode,s=this._rootNodeFocusListenerCount.get(i)||0;s||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,wc),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,wc)}),this._rootNodeFocusListenerCount.set(i,s+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(bc(this._stopInputModalityDetector)).subscribe(r=>{this._setOrigin(r,!0)}))}_removeGlobalListeners(t){const i=t.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const s=this._rootNodeFocusListenerCount.get(i);s>1?this._rootNodeFocusListenerCount.set(i,s-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,wc),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,wc),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,i,s){this._setClasses(t,i),this._emitOrigin(s.subject,i),this._lastFocusOrigin=i}_getClosestElementsInfo(t){const i=[];return this._elementInfo.forEach((s,r)=>{(r===t||s.checkChildren&&r.contains(t))&&i.push([r,s])}),i}}return n.\u0275fac=function(t){return new(t||n)(w(he),w(wn),w(oH),w(se,8),w(uH,8))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const VC="cdk-high-contrast-black-on-white",jC="cdk-high-contrast-white-on-black",mp="cdk-high-contrast-active";let hH=(()=>{class n{constructor(t,i){this._platform=t,this._document=i}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const i=this._document.defaultView||window,s=i&&i.getComputedStyle?i.getComputedStyle(t):null,r=(s&&s.backgroundColor||"").replace(/ /g,"");switch(t.remove(),r){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(mp),t.remove(VC),t.remove(jC),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?(t.add(mp),t.add(VC)):2===i&&(t.add(mp),t.add(jC))}}}return n.\u0275fac=function(t){return new(t||n)(w(wn),w(se))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class HC{}const ci="*";function pH(n,e){return{type:7,name:n,definitions:e,options:{}}}function zC(n,e=null){return{type:4,styles:e,timings:n}}function $C(n,e=null){return{type:2,steps:n,options:e}}function qo(n){return{type:6,styles:n,offset:null}}function UC(n,e,t){return{type:0,name:n,styles:e,options:t}}function WC(n,e,t=null){return{type:1,expr:n,animation:e,options:t}}function GC(n){Promise.resolve(null).then(n)}class Yo{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){GC(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class qC{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,s=0;const r=this.players.length;0==r?GC(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++i==r&&this._onDestroy()}),o.onStart(()=>{++s==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(i=>{const s=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(s)})}getPosition(){const e=this.players.reduce((t,i)=>null===t||i.totalTime>t.totalTime?i:t,null);return null!=e?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}const ie=!1;function YC(n){return new O(3e3,ie)}function KH(){return"undefined"!=typeof window&&void 0!==window.document}function yp(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Ei(n){switch(n.length){case 0:return new Yo;case 1:return n[0];default:return new qC(n)}}function KC(n,e,t,i,s={},r={}){const o=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.offset,h=d==l,f=h&&c||{};Object.keys(u).forEach(p=>{let g=p,m=u[p];if("offset"!==p)switch(g=e.normalizePropertyName(g,o),m){case"!":m=s[p];break;case ci:m=r[p];break;default:m=e.normalizeStyleValue(p,g,m,o)}f[g]=m}),h||a.push(f),c=f,l=d}),o.length)throw function BH(n){return new O(3502,ie)}();return a}function vp(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&bp(t,"start",n)));break;case"done":n.onDone(()=>i(t&&bp(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&bp(t,"destroy",n)))}}function bp(n,e,t){const i=t.totalTime,r=Dp(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,null==i?n.totalTime:i,!!t.disabled),o=n._data;return null!=o&&(r._data=o),r}function Dp(n,e,t,i,s="",r=0,o){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:s,totalTime:r,disabled:!!o}}function jt(n,e,t){let i;return n instanceof Map?(i=n.get(e),i||n.set(e,i=t)):(i=n[e],i||(i=n[e]=t)),i}function XC(n){const e=n.indexOf(":");return[n.substring(1,e),n.substr(e+1)]}let wp=(n,e)=>!1,ZC=(n,e,t)=>[];(yp()||"undefined"!=typeof Element)&&(wp=KH()?(n,e)=>{for(;e&&e!==document.documentElement;){if(e===n)return!0;e=e.parentNode||e.host}return!1}:(n,e)=>n.contains(e),ZC=(n,e,t)=>{if(t)return Array.from(n.querySelectorAll(e));const i=n.querySelector(e);return i?[i]:[]});let ts=null,QC=!1;function JC(n){ts||(ts=function ZH(){return"undefined"!=typeof document?document.body:null}()||{},QC=!!ts.style&&"WebkitAppearance"in ts.style);let e=!0;return ts.style&&!function XH(n){return"ebkit"==n.substring(1,6)}(n)&&(e=n in ts.style,!e&&QC&&(e="Webkit"+n.charAt(0).toUpperCase()+n.substr(1)in ts.style)),e}const eE=wp,tE=ZC;let nE=(()=>{class n{validateStyleProperty(t){return JC(t)}matchesElement(t,i){return!1}containsElement(t,i){return eE(t,i)}query(t,i,s){return tE(t,i,s)}computeStyle(t,i,s){return s||""}animate(t,i,s,r,o,a=[],l){return new Yo(s,r)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),Cp=(()=>{class n{}return n.NOOP=new nE,n})();const Ep="ng-enter",Ec="ng-leave",xc="ng-trigger",Sc=".ng-trigger",sE="ng-animating",xp=".ng-animating";function ns(n){if("number"==typeof n)return n;const e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Sp(parseFloat(e[1]),e[2])}function Sp(n,e){return"s"===e?1e3*n:n}function Mc(n,e,t){return n.hasOwnProperty("duration")?n:function ez(n,e,t){let s,r=0,o="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push(YC()),{duration:0,delay:0,easing:""};s=Sp(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(r=Sp(parseFloat(l),a[4]));const c=a[5];c&&(o=c)}else s=n;if(!t){let a=!1,l=e.length;s<0&&(e.push(function gH(){return new O(3100,ie)}()),a=!0),r<0&&(e.push(function mH(){return new O(3101,ie)}()),a=!0),a&&e.splice(l,0,YC())}return{duration:s,delay:r,easing:o}}(n,e,t)}function _r(n,e={}){return Object.keys(n).forEach(t=>{e[t]=n[t]}),e}function xi(n,e,t={}){if(e)for(let i in n)t[i]=n[i];else _r(n,t);return t}function oE(n,e,t){return t?e+":"+t+";":""}function aE(n){let e="";for(let t=0;t<n.style.length;t++){const i=n.style.item(t);e+=oE(0,i,n.style.getPropertyValue(i))}for(const t in n.style)n.style.hasOwnProperty(t)&&!t.startsWith("_")&&(e+=oE(0,iz(t),n.style[t]));n.setAttribute("style",e)}function jn(n,e,t){n.style&&(Object.keys(e).forEach(i=>{const s=Tp(i);t&&!t.hasOwnProperty(i)&&(t[i]=n.style[s]),n.style[s]=e[i]}),yp()&&aE(n))}function is(n,e){n.style&&(Object.keys(e).forEach(t=>{const i=Tp(t);n.style[i]=""}),yp()&&aE(n))}function Ko(n){return Array.isArray(n)?1==n.length?n[0]:$C(n):n}const Mp=new RegExp("{{\\s*(.+?)\\s*}}","g");function lE(n){let e=[];if("string"==typeof n){let t;for(;t=Mp.exec(n);)e.push(t[1]);Mp.lastIndex=0}return e}function Tc(n,e,t){const i=n.toString(),s=i.replace(Mp,(r,o)=>{let a=e[o];return e.hasOwnProperty(o)||(t.push(function yH(n){return new O(3003,ie)}()),a=""),a.toString()});return s==i?n:s}function Ac(n){const e=[];let t=n.next();for(;!t.done;)e.push(t.value),t=n.next();return e}const nz=/-+([a-z0-9])/g;function Tp(n){return n.replace(nz,(...e)=>e[1].toUpperCase())}function iz(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ht(n,e,t){switch(e.type){case 7:return n.visitTrigger(e,t);case 0:return n.visitState(e,t);case 1:return n.visitTransition(e,t);case 2:return n.visitSequence(e,t);case 3:return n.visitGroup(e,t);case 4:return n.visitAnimate(e,t);case 5:return n.visitKeyframes(e,t);case 6:return n.visitStyle(e,t);case 8:return n.visitReference(e,t);case 9:return n.visitAnimateChild(e,t);case 10:return n.visitAnimateRef(e,t);case 11:return n.visitQuery(e,t);case 12:return n.visitStagger(e,t);default:throw function vH(n){return new O(3004,ie)}()}}function cE(n,e){return window.getComputedStyle(n)[e]}function oz(n,e){const t=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function az(n,e,t){if(":"==n[0]){const l=function lz(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(function RH(n){return new O(3016,ie)}()),"* => *"}}(n,t);if("function"==typeof l)return void e.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return t.push(function PH(n){return new O(3015,ie)}()),e;const s=i[1],r=i[2],o=i[3];e.push(uE(s,o));"<"==r[0]&&!("*"==s&&"*"==o)&&e.push(uE(o,s))}(i,t,e)):t.push(n),t}const kc=new Set(["true","1"]),Oc=new Set(["false","0"]);function uE(n,e){const t=kc.has(n)||Oc.has(n),i=kc.has(e)||Oc.has(e);return(s,r)=>{let o="*"==n||n==s,a="*"==e||e==r;return!o&&t&&"boolean"==typeof s&&(o=s?kc.has(n):Oc.has(n)),!a&&i&&"boolean"==typeof r&&(a=r?kc.has(e):Oc.has(e)),o&&a}}const cz=new RegExp("s*:selfs*,?","g");function Ap(n,e,t){return new uz(n).build(e,t)}class uz{constructor(e){this._driver=e}build(e,t){const i=new fz(t);return this._resetContextStyleTimingState(i),Ht(this,Ko(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,s=t.depCount=0;const r=[],o=[];return"@"==e.name.charAt(0)&&t.errors.push(function DH(){return new O(3006,ie)}()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,r.push(this.visitState(l,t))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,t);i+=l.queryCount,s+=l.depCount,o.push(l)}else t.errors.push(function wH(){return new O(3007,ie)}())}),{type:7,name:e.name,states:r,transitions:o,queryCount:i,depCount:s,options:null}}visitState(e,t){const i=this.visitStyle(e.styles,t),s=e.options&&e.options.params||null;if(i.containsDynamicStyles){const r=new Set,o=s||{};i.styles.forEach(a=>{if(Pc(a)){const l=a;Object.keys(l).forEach(c=>{lE(l[c]).forEach(u=>{o.hasOwnProperty(u)||r.add(u)})})}}),r.size&&(Ac(r.values()),t.errors.push(function CH(n,e){return new O(3008,ie)}()))}return{type:0,name:e.name,style:i,options:s?{params:s}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const i=Ht(this,Ko(e.animation),t);return{type:1,matchers:oz(e.expr,t.errors),animation:i,queryCount:t.queryCount,depCount:t.depCount,options:ss(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(i=>Ht(this,i,t)),options:ss(e.options)}}visitGroup(e,t){const i=t.currentTime;let s=0;const r=e.steps.map(o=>{t.currentTime=i;const a=Ht(this,o,t);return s=Math.max(s,t.currentTime),a});return t.currentTime=s,{type:3,steps:r,options:ss(e.options)}}visitAnimate(e,t){const i=function gz(n,e){let t=null;if(n.hasOwnProperty("duration"))t=n;else if("number"==typeof n)return Ip(Mc(n,e).duration,0,"");const i=n;if(i.split(/\s+/).some(r=>"{"==r.charAt(0)&&"{"==r.charAt(1))){const r=Ip(0,0,"");return r.dynamic=!0,r.strValue=i,r}return t=t||Mc(i,e),Ip(t.duration,t.delay,t.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;let s,r=e.styles?e.styles:qo({});if(5==r.type)s=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;const c={};i.easing&&(c.easing=i.easing),o=qo(c)}t.currentTime+=i.duration+i.delay;const l=this.visitStyle(o,t);l.isEmptyStep=a,s=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:s,options:null}}visitStyle(e,t){const i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){const i=[];Array.isArray(e.styles)?e.styles.forEach(o=>{"string"==typeof o?o==ci?i.push(o):t.errors.push(function EH(n){return new O(3002,ie)}()):i.push(o)}):i.push(e.styles);let s=!1,r=null;return i.forEach(o=>{if(Pc(o)){const a=o,l=a.easing;if(l&&(r=l,delete a.easing),!s)for(let c in a)if(a[c].toString().indexOf("{{")>=0){s=!0;break}}}),{type:6,styles:i,easing:r,offset:e.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(e,t){const i=t.currentAnimateTimings;let s=t.currentTime,r=t.currentTime;i&&r>0&&(r-=i.duration+i.delay),e.styles.forEach(o=>{"string"!=typeof o&&Object.keys(o).forEach(a=>{if(!this._driver.validateStyleProperty(a))return void t.errors.push(function xH(n){return new O(3009,ie)}());const l=t.collectedStyles[t.currentQuerySelector],c=l[a];let u=!0;c&&(r!=s&&r>=c.startTime&&s<=c.endTime&&(t.errors.push(function SH(n,e,t,i,s){return new O(3010,ie)}()),u=!1),r=c.startTime),u&&(l[a]={startTime:r,endTime:s}),t.options&&function tz(n,e,t){const i=e.params||{},s=lE(n);s.length&&s.forEach(r=>{i.hasOwnProperty(r)||t.push(function _H(n){return new O(3001,ie)}())})}(o[a],t.options,t.errors)})})}visitKeyframes(e,t){const i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function MH(){return new O(3011,ie)}()),i;let r=0;const o=[];let a=!1,l=!1,c=0;const u=e.steps.map(_=>{const y=this._makeStyleAst(_,t);let b=null!=y.offset?y.offset:function pz(n){if("string"==typeof n)return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(Pc(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}});else if(Pc(n)&&n.hasOwnProperty("offset")){const t=n;e=parseFloat(t.offset),delete t.offset}return e}(y.styles),v=0;return null!=b&&(r++,v=y.offset=b),l=l||v<0||v>1,a=a||v<c,c=v,o.push(v),y});l&&t.errors.push(function TH(){return new O(3012,ie)}()),a&&t.errors.push(function AH(){return new O(3200,ie)}());const d=e.steps.length;let h=0;r>0&&r<d?t.errors.push(function IH(){return new O(3202,ie)}()):0==r&&(h=1/(d-1));const f=d-1,p=t.currentTime,g=t.currentAnimateTimings,m=g.duration;return u.forEach((_,y)=>{const b=h>0?y==f?1:h*y:o[y],v=b*m;t.currentTime=p+g.delay+v,g.duration=v,this._validateStyleAst(_,t),_.offset=b,i.styles.push(_)}),i}visitReference(e,t){return{type:8,animation:Ht(this,Ko(e.animation),t),options:ss(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:ss(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:ss(e.options)}}visitQuery(e,t){const i=t.currentQuerySelector,s=e.options||{};t.queryCount++,t.currentQuery=e;const[r,o]=function dz(n){const e=!!n.split(/\s*,\s*/).find(t=>":self"==t);return e&&(n=n.replace(cz,"")),n=n.replace(/@\*/g,Sc).replace(/@\w+/g,t=>Sc+"-"+t.substr(1)).replace(/:animating/g,xp),[n,e]}(e.selector);t.currentQuerySelector=i.length?i+" "+r:r,jt(t.collectedStyles,t.currentQuerySelector,{});const a=Ht(this,Ko(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:11,selector:r,limit:s.limit||0,optional:!!s.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:ss(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(function kH(){return new O(3013,ie)}());const i="full"===e.timings?{duration:0,delay:0,easing:"full"}:Mc(e.timings,t.errors,!0);return{type:12,animation:Ht(this,Ko(e.animation),t),timings:i,options:null}}}class fz{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function Pc(n){return!Array.isArray(n)&&"object"==typeof n}function ss(n){return n?(n=_r(n)).params&&(n.params=function hz(n){return n?_r(n):null}(n.params)):n={},n}function Ip(n,e,t){return{duration:n,delay:e,easing:t}}function kp(n,e,t,i,s,r,o=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:s,delay:r,totalTime:s+r,easing:o,subTimeline:a}}class Rc{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const yz=new RegExp(":enter","g"),bz=new RegExp(":leave","g");function Op(n,e,t,i,s,r={},o={},a,l,c=[]){return(new Dz).buildKeyframes(n,e,t,i,s,r,o,a,l,c)}class Dz{buildKeyframes(e,t,i,s,r,o,a,l,c,u=[]){c=c||new Rc;const d=new Pp(e,t,c,s,r,u,[]);d.options=l,d.currentTimeline.setStyles([o],null,d.errors,l),Ht(this,i,d);const h=d.timelines.filter(f=>f.containsAnimation());if(Object.keys(a).length){let f;for(let p=h.length-1;p>=0;p--){const g=h[p];if(g.element===t){f=g;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,d.errors,l)}return h.length?h.map(f=>f.buildKeyframes()):[kp(t,[],[],[],0,0,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const i=t.subInstructions.get(t.element);if(i){const s=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,s,s.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){const i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_visitSubInstructions(e,t,i){let r=t.currentTimeline.currentTime;const o=null!=i.duration?ns(i.duration):null,a=null!=i.delay?ns(i.delay):null;return 0!==o&&e.forEach(l=>{const c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),Ht(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const i=t.subContextCount;let s=t;const r=e.options;if(r&&(r.params||r.delay)&&(s=t.createSubContext(r),s.transformIntoNewTimeline(),null!=r.delay)){6==s.previousNode.type&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=Fc);const o=ns(r.delay);s.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>Ht(this,o,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>i&&s.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const i=[];let s=t.currentTimeline.currentTime;const r=e.options&&e.options.delay?ns(e.options.delay):0;e.steps.forEach(o=>{const a=t.createSubContext(e.options);r&&a.delayNextStep(r),Ht(this,o,a),s=Math.max(s,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(s),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const i=e.strValue;return Mc(t.params?Tc(i,t.params,t.errors):i,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const i=t.currentAnimateTimings=this._visitTiming(e.timings,t),s=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),s.snapshotCurrentStyles());const r=e.style;5==r.type?this.visitKeyframes(r,t):(t.incrementTime(i.duration),this.visitStyle(r,t),s.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const i=t.currentTimeline,s=t.currentAnimateTimings;!s&&i.getCurrentStyleProperties().length&&i.forwardFrame();const r=s&&s.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(r):i.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const i=t.currentAnimateTimings,s=t.currentTimeline.duration,r=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{a.forwardTime((l.offset||0)*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(s+r),t.previousNode=e}visitQuery(e,t){const i=t.currentTimeline.currentTime,s=e.options||{},r=s.delay?ns(s.delay):0;r&&(6===t.previousNode.type||0==i&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Fc);let o=i;const a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!s.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{t.currentQueryIndex=u;const d=t.createSubContext(e.options,c);r&&d.delayNextStep(r),c===t.element&&(l=d.currentTimeline),Ht(this,e.animation,d),d.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,d.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const i=t.parentContext,s=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1);let l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=t.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;Ht(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=s.currentTime-d+(s.startTime-i.currentTimeline.startTime)}}const Fc={};class Pp{constructor(e,t,i,s,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=s,this._leaveClassName=r,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Fc,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Nc(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const i=e;let s=this.options;null!=i.duration&&(s.duration=ns(i.duration)),null!=i.delay&&(s.delay=ns(i.delay));const r=i.params;if(r){let o=s.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=Tc(r[a],o,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const i=e.params={};Object.keys(t).forEach(s=>{i[s]=t[s]})}}return e}createSubContext(e=null,t,i){const s=t||this.element,r=new Pp(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Fc,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){const s={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+e.delay,easing:""},r=new wz(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,s,e.stretchStartingKeyframe);return this.timelines.push(r),s}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,s,r,o){let a=[];if(s&&a.push(this.element),e.length>0){e=(e=e.replace(yz,"."+this._enterClassName)).replace(bz,"."+this._leaveClassName);let c=this._driver.query(this.element,e,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!r&&0==a.length&&o.push(function OH(n){return new O(3014,ie)}()),a}}class Nc{constructor(e,t,i,s){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=s,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new Nc(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||ci,this._currentKeyframe[t]=ci}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,s){t&&(this._previousKeyframe.easing=t);const r=s&&s.params||{},o=function Cz(n,e){const t={};let i;return n.forEach(s=>{"*"===s?(i=i||Object.keys(e),i.forEach(r=>{t[r]=ci})):xi(s,!1,t)}),t}(e,this._globalTimelineStyles);Object.keys(o).forEach(a=>{const l=Tc(o[a],r,i);this._pendingStyles[a]=l,this._localTimelineStyles.hasOwnProperty(a)||(this._backFill[a]=this._globalTimelineStyles.hasOwnProperty(a)?this._globalTimelineStyles[a]:ci),this._updateStyle(a,l)})}applyStylesToKeyframe(){const e=this._pendingStyles,t=Object.keys(e);0!=t.length&&(this._pendingStyles={},t.forEach(i=>{this._currentKeyframe[i]=e[i]}),Object.keys(this._localTimelineStyles).forEach(i=>{this._currentKeyframe.hasOwnProperty(i)||(this._currentKeyframe[i]=this._localTimelineStyles[i])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(e=>{const t=this._localTimelineStyles[e];this._pendingStyles[e]=t,this._updateStyle(e,t)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){Object.keys(e._styleSummary).forEach(t=>{const i=this._styleSummary[t],s=e._styleSummary[t];(!i||s.time>i.time)&&this._updateStyle(t,s.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((a,l)=>{const c=xi(a,!0);Object.keys(c).forEach(u=>{const d=c[u];"!"==d?e.add(u):d==ci&&t.add(u)}),i||(c.offset=l/this.duration),s.push(c)});const r=e.size?Ac(e.values()):[],o=t.size?Ac(t.values()):[];if(i){const a=s[0],l=_r(a);a.offset=0,l.offset=1,s=[a,l]}return kp(this.element,s,r,o,this.duration,this.startTime,this.easing,!1)}}class wz extends Nc{constructor(e,t,i,s,r,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=s,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:s}=this.timings;if(this._stretchStartingKeyframe&&t){const r=[],o=i+t,a=t/o,l=xi(e[0],!1);l.offset=0,r.push(l);const c=xi(e[0],!1);c.offset=fE(a),r.push(c);const u=e.length-1;for(let d=1;d<=u;d++){let h=xi(e[d],!1);h.offset=fE((t+h.offset*i)/o),r.push(h)}i=o,t=0,s="",e=r}return kp(this.element,e,this.preStyleProps,this.postStyleProps,i,t,s,!0)}}function fE(n,e=3){const t=Math.pow(10,e-1);return Math.round(n*t)/t}class Rp{}class Ez extends Rp{normalizePropertyName(e,t){return Tp(e)}normalizeStyleValue(e,t,i,s){let r="";const o=i.toString().trim();if(xz[t]&&0!==i&&"0"!==i)if("number"==typeof i)r="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&s.push(function bH(n,e){return new O(3005,ie)}())}return o+r}}const xz=(()=>function Sz(n){const e={};return n.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function pE(n,e,t,i,s,r,o,a,l,c,u,d,h){return{type:0,element:n,triggerName:e,isRemovalTransition:s,fromState:t,fromStyles:r,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const Fp={};class gE{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,s){return function Mz(n,e,t,i,s){return n.some(r=>r(e,t,i,s))}(this.ast.matchers,e,t,i,s)}buildStyles(e,t,i){const s=this._stateStyles["*"],r=this._stateStyles[e],o=s?s.buildStyles(t,i):{};return r?r.buildStyles(t,i):o}build(e,t,i,s,r,o,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||Fp,p=this.buildStyles(i,a&&a.params||Fp,d),g=l&&l.params||Fp,m=this.buildStyles(s,g,d),_=new Set,y=new Map,b=new Map,v="void"===s,D={params:Object.assign(Object.assign({},h),g)},E=u?[]:Op(e,t,this.ast.animation,r,o,p,m,D,c,d);let x=0;if(E.forEach(k=>{x=Math.max(k.duration+k.delay,x)}),d.length)return pE(t,this._triggerName,i,s,v,p,m,[],[],y,b,x,d);E.forEach(k=>{const G=k.element,J=jt(y,G,{});k.preStyleProps.forEach(ce=>J[ce]=!0);const $=jt(b,G,{});k.postStyleProps.forEach(ce=>$[ce]=!0),G!==t&&_.add(G)});const M=Ac(_.values());return pE(t,this._triggerName,i,s,v,p,m,E,M,y,b,x)}}class Tz{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){const i={},s=_r(this.defaultParams);return Object.keys(e).forEach(r=>{const o=e[r];null!=o&&(s[r]=o)}),this.styles.styles.forEach(r=>{if("string"!=typeof r){const o=r;Object.keys(o).forEach(a=>{let l=o[a];l.length>1&&(l=Tc(l,s,t));const c=this.normalizer.normalizePropertyName(a,t);l=this.normalizer.normalizeStyleValue(a,c,l,t),i[c]=l})}}),i}}class Iz{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states={},t.states.forEach(s=>{this.states[s.name]=new Tz(s.style,s.options&&s.options.params||{},i)}),mE(this.states,"true","1"),mE(this.states,"false","0"),t.transitions.forEach(s=>{this.transitionFactories.push(new gE(e,s,this.states))}),this.fallbackTransition=function kz(n,e,t){return new gE(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},e)}(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,s){return this.transitionFactories.find(o=>o.match(e,t,i,s))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}}function mE(n,e,t){n.hasOwnProperty(e)?n.hasOwnProperty(t)||(n[t]=n[e]):n.hasOwnProperty(t)&&(n[e]=n[t])}const Oz=new Rc;class Pz{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}register(e,t){const i=[],s=Ap(this._driver,t,i);if(i.length)throw function VH(n){return new O(3503,ie)}();this._animations[e]=s}_buildPlayer(e,t,i){const s=e.element,r=KC(0,this._normalizer,0,e.keyframes,t,i);return this._driver.animate(s,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){const s=[],r=this._animations[e];let o;const a=new Map;if(r?(o=Op(this._driver,t,r,Ep,Ec,{},{},i,Oz,s),o.forEach(u=>{const d=jt(a,u.element,{});u.postStyleProps.forEach(h=>d[h]=null)})):(s.push(function jH(){return new O(3300,ie)}()),o=[]),s.length)throw function HH(n){return new O(3504,ie)}();a.forEach((u,d)=>{Object.keys(u).forEach(h=>{u[h]=this._driver.computeStyle(d,h,ci)})});const c=Ei(o.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,{},d)}));return this._playersById[e]=c,c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){const t=this._getPlayer(e);t.destroy(),delete this._playersById[e];const i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){const t=this._playersById[e];if(!t)throw function zH(n){return new O(3301,ie)}();return t}listen(e,t,i,s){const r=Dp(t,"","","");return vp(this._getPlayer(e),i,r,s),()=>{}}command(e,t,i,s){if("register"==i)return void this.register(e,s[0]);if("create"==i)return void this.create(e,t,s[0]||{});const r=this._getPlayer(e);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(e)}}}const _E="ng-animate-queued",Np="ng-animate-disabled",Bz=[],yE={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Vz={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},nn="__ng_removed";class Lp{constructor(e,t=""){this.namespaceId=t;const i=e&&e.hasOwnProperty("value");if(this.value=function $z(n){return null!=n?n:null}(i?e.value:e),i){const r=_r(e);delete r.value,this.options=r}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(e){const t=e.params;if(t){const i=this.options.params;Object.keys(t).forEach(s=>{null==i[s]&&(i[s]=t[s])})}}}const Xo="void",Bp=new Lp(Xo);class jz{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,sn(t,this._hostClassName)}listen(e,t,i,s){if(!this._triggers.hasOwnProperty(t))throw function $H(n,e){return new O(3302,ie)}();if(null==i||0==i.length)throw function UH(n){return new O(3303,ie)}();if(!function Uz(n){return"start"==n||"done"==n}(i))throw function WH(n,e){return new O(3400,ie)}();const r=jt(this._elementListeners,e,[]),o={name:t,phase:i,callback:s};r.push(o);const a=jt(this._engine.statesByElement,e,{});return a.hasOwnProperty(t)||(sn(e,xc),sn(e,xc+"-"+t),a[t]=Bp),()=>{this._engine.afterFlush(()=>{const l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers[t]||delete a[t]})}}register(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}_getTrigger(e){const t=this._triggers[e];if(!t)throw function GH(n){return new O(3401,ie)}();return t}trigger(e,t,i,s=!0){const r=this._getTrigger(t),o=new Vp(this.id,t,e);let a=this._engine.statesByElement.get(e);a||(sn(e,xc),sn(e,xc+"-"+t),this._engine.statesByElement.set(e,a={}));let l=a[t];const c=new Lp(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a[t]=c,l||(l=Bp),c.value!==Xo&&l.value===c.value){if(!function qz(n,e){const t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let s=0;s<t.length;s++){const r=t[s];if(!e.hasOwnProperty(r)||n[r]!==e[r])return!1}return!0}(l.params,c.params)){const g=[],m=r.matchStyles(l.value,l.params,g),_=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{is(e,m),jn(e,_)})}return}const h=jt(this._engine.playersByElement,e,[]);h.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let f=r.matchTransition(l.value,c.value,e,c.params),p=!1;if(!f){if(!s)return;f=r.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:f,fromState:l,toState:c,player:o,isFallbackTransition:p}),p||(sn(e,_E),o.onStart(()=>{yr(e,_E)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);const m=this._engine.playersByElement.get(e);if(m){let _=m.indexOf(o);_>=0&&m.splice(_,1)}}),this.players.push(o),h.push(o),o}deregister(e){delete this._triggers[e],this._engine.statesByElement.forEach((t,i)=>{delete t[e]}),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(s=>s.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const i=this._engine.driver.query(e,Sc,!0);i.forEach(s=>{if(s[nn])return;const r=this._engine.fetchNamespacesByElement(s);r.size?r.forEach(o=>o.triggerLeaveAnimation(s,t,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(e,t,i,s){const r=this._engine.statesByElement.get(e),o=new Map;if(r){const a=[];if(Object.keys(r).forEach(l=>{if(o.set(l,r[l].value),this._triggers[l]){const c=this.trigger(e,l,Xo,s);c&&a.push(c)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),i&&Ei(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){const s=new Set;t.forEach(r=>{const o=r.name;if(s.has(o))return;s.add(o);const l=this._triggers[o].fallbackTransition,c=i[o]||Bp,u=new Lp(Xo),d=new Vp(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(e,t){const i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let s=!1;if(i.totalAnimations){const r=i.players.length?i.playersByQueriedElement.get(e):[];if(r&&r.length)s=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(e),s)i.markElementAsRemoved(this.id,e,!1,t);else{const r=e[nn];(!r||r===yE)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){sn(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(i=>{const s=i.player;if(s.destroyed)return;const r=i.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==i.triggerName){const l=Dp(r,i.triggerName,i.fromState.value,i.toState.value);l._data=e,vp(i.player,a.phase,l,a.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):t.push(i)}),this._queue=[],t.sort((i,s)=>{const r=i.transition.ast.depCount,o=s.transition.ast.depCount;return 0==r||0==o?r-o:this._engine.driver.containsElement(i.element,s.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(i=>i.element===e)||t,t}}class Hz{constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(s,r)=>{}}_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){const i=new jz(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){const i=this._namespaceList.length-1;if(i>=0){let s=!1;for(let r=i;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,t)){this._namespaceList.splice(r+1,0,e),s=!0;break}s||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let s=this._namespaceLookup[e];s&&s.register(t,i)&&this.totalAnimations++}destroy(e,t){if(!e)return;const i=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[e];const s=this._namespaceList.indexOf(i);s>=0&&this._namespaceList.splice(s,1)}),this.afterFlushAnimationsDone(()=>i.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,i=this.statesByElement.get(e);if(i){const s=Object.keys(i);for(let r=0;r<s.length;r++){const o=i[s[r]].namespaceId;if(o){const a=this._fetchNamespace(o);a&&t.add(a)}}}return t}trigger(e,t,i,s){if(Lc(t)){const r=this._fetchNamespace(e);if(r)return r.trigger(t,i,s),!0}return!1}insertNode(e,t,i,s){if(!Lc(t))return;const r=t[nn];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;const o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){const o=this._fetchNamespace(e);o&&o.insertNode(t,i)}s&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),sn(e,Np)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),yr(e,Np))}removeNode(e,t,i,s){if(Lc(t)){const r=e?this._fetchNamespace(e):null;if(r?r.removeNode(t,s):this.markElementAsRemoved(e,t,!1,s),i){const o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,s)}}else this._onRemovalComplete(t,s)}markElementAsRemoved(e,t,i,s,r){this.collectedLeaveElements.push(t),t[nn]={namespaceId:e,setForRemoval:s,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,i,s,r){return Lc(t)?this._fetchNamespace(e).listen(t,i,s,r):()=>{}}_buildInstruction(e,t,i,s,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,s,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,Sc,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,xp,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return Ei(this.players).onDone(()=>e());e()})}processLeaveNode(e){var t;const i=e[nn];if(i&&i.setForRemoval){if(e[nn]=yE,i.namespaceId){this.destroyInnerAnimations(e);const s=this._fetchNamespace(i.namespaceId);s&&s.clearElementCache(e)}this._onRemovalComplete(e,i.setForRemoval)}(null===(t=e.classList)||void 0===t?void 0:t.contains(Np))&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,s)=>this._balanceNamespaceList(i,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)sn(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const i=[];try{t=this._flushAnimations(i,e)}finally{for(let s=0;s<i.length;s++)i[s]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],t.length?Ei(t).onDone(()=>{i.forEach(s=>s())}):i.forEach(s=>s())}}reportError(e){throw function qH(n){return new O(3402,ie)}()}_flushAnimations(e,t){const i=new Rc,s=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(S=>{u.add(S);const F=this.driver.query(S,".ng-animate-queued",!0);for(let N=0;N<F.length;N++)u.add(F[N])});const d=this.bodyNode,h=Array.from(this.statesByElement.keys()),f=DE(h,this.collectedEnterElements),p=new Map;let g=0;f.forEach((S,F)=>{const N=Ep+g++;p.set(F,N),S.forEach(ee=>sn(ee,N))});const m=[],_=new Set,y=new Set;for(let S=0;S<this.collectedLeaveElements.length;S++){const F=this.collectedLeaveElements[S],N=F[nn];N&&N.setForRemoval&&(m.push(F),_.add(F),N.hasAnimation?this.driver.query(F,".ng-star-inserted",!0).forEach(ee=>_.add(ee)):y.add(F))}const b=new Map,v=DE(h,Array.from(_));v.forEach((S,F)=>{const N=Ec+g++;b.set(F,N),S.forEach(ee=>sn(ee,N))}),e.push(()=>{f.forEach((S,F)=>{const N=p.get(F);S.forEach(ee=>yr(ee,N))}),v.forEach((S,F)=>{const N=b.get(F);S.forEach(ee=>yr(ee,N))}),m.forEach(S=>{this.processLeaveNode(S)})});const D=[],E=[];for(let S=this._namespaceList.length-1;S>=0;S--)this._namespaceList[S].drainQueuedTransitions(t).forEach(N=>{const ee=N.player,Me=N.element;if(D.push(ee),this.collectedEnterElements.length){const Dt=Me[nn];if(Dt&&Dt.setForMove){if(Dt.previousTriggersValues&&Dt.previousTriggersValues.has(N.triggerName)){const os=Dt.previousTriggersValues.get(N.triggerName),Mi=this.statesByElement.get(N.element);Mi&&Mi[N.triggerName]&&(Mi[N.triggerName].value=os)}return void ee.destroy()}}const nt=!d||!this.driver.containsElement(d,Me),Xe=b.get(Me),Tt=p.get(Me),ye=this._buildInstruction(N,i,Tt,Xe,nt);if(ye.errors&&ye.errors.length)return void E.push(ye);if(nt)return ee.onStart(()=>is(Me,ye.fromStyles)),ee.onDestroy(()=>jn(Me,ye.toStyles)),void s.push(ee);if(N.isFallbackTransition)return ee.onStart(()=>is(Me,ye.fromStyles)),ee.onDestroy(()=>jn(Me,ye.toStyles)),void s.push(ee);const br=[];ye.timelines.forEach(Dt=>{Dt.stretchStartingKeyframe=!0,this.disabledNodes.has(Dt.element)||br.push(Dt)}),ye.timelines=br,i.append(Me,ye.timelines),o.push({instruction:ye,player:ee,element:Me}),ye.queriedElements.forEach(Dt=>jt(a,Dt,[]).push(ee)),ye.preStyleProps.forEach((Dt,os)=>{const Mi=Object.keys(Dt);if(Mi.length){let as=l.get(os);as||l.set(os,as=new Set),Mi.forEach(Wp=>as.add(Wp))}}),ye.postStyleProps.forEach((Dt,os)=>{const Mi=Object.keys(Dt);let as=c.get(os);as||c.set(os,as=new Set),Mi.forEach(Wp=>as.add(Wp))})});if(E.length){const S=[];E.forEach(F=>{S.push(function YH(n,e){return new O(3505,ie)}())}),D.forEach(F=>F.destroy()),this.reportError(S)}const x=new Map,M=new Map;o.forEach(S=>{const F=S.element;i.has(F)&&(M.set(F,F),this._beforeAnimationBuild(S.player.namespaceId,S.instruction,x))}),s.forEach(S=>{const F=S.element;this._getPreviousPlayers(F,!1,S.namespaceId,S.triggerName,null).forEach(ee=>{jt(x,F,[]).push(ee),ee.destroy()})});const k=m.filter(S=>CE(S,l,c)),G=new Map;bE(G,this.driver,y,c,ci).forEach(S=>{CE(S,l,c)&&k.push(S)});const $=new Map;f.forEach((S,F)=>{bE($,this.driver,new Set(S),l,"!")}),k.forEach(S=>{const F=G.get(S),N=$.get(S);G.set(S,Object.assign(Object.assign({},F),N))});const ce=[],Re=[],U={};o.forEach(S=>{const{element:F,player:N,instruction:ee}=S;if(i.has(F)){if(u.has(F))return N.onDestroy(()=>jn(F,ee.toStyles)),N.disabled=!0,N.overrideTotalTime(ee.totalTime),void s.push(N);let Me=U;if(M.size>1){let Xe=F;const Tt=[];for(;Xe=Xe.parentNode;){const ye=M.get(Xe);if(ye){Me=ye;break}Tt.push(Xe)}Tt.forEach(ye=>M.set(ye,Me))}const nt=this._buildAnimation(N.namespaceId,ee,x,r,$,G);if(N.setRealPlayer(nt),Me===U)ce.push(N);else{const Xe=this.playersByElement.get(Me);Xe&&Xe.length&&(N.parentPlayer=Ei(Xe)),s.push(N)}}else is(F,ee.fromStyles),N.onDestroy(()=>jn(F,ee.toStyles)),Re.push(N),u.has(F)&&s.push(N)}),Re.forEach(S=>{const F=r.get(S.element);if(F&&F.length){const N=Ei(F);S.setRealPlayer(N)}}),s.forEach(S=>{S.parentPlayer?S.syncPlayerEvents(S.parentPlayer):S.destroy()});for(let S=0;S<m.length;S++){const F=m[S],N=F[nn];if(yr(F,Ec),N&&N.hasAnimation)continue;let ee=[];if(a.size){let nt=a.get(F);nt&&nt.length&&ee.push(...nt);let Xe=this.driver.query(F,xp,!0);for(let Tt=0;Tt<Xe.length;Tt++){let ye=a.get(Xe[Tt]);ye&&ye.length&&ee.push(...ye)}}const Me=ee.filter(nt=>!nt.destroyed);Me.length?Wz(this,F,Me):this.processLeaveNode(F)}return m.length=0,ce.forEach(S=>{this.players.push(S),S.onDone(()=>{S.destroy();const F=this.players.indexOf(S);this.players.splice(F,1)}),S.play()}),ce}elementContainsData(e,t){let i=!1;const s=t[nn];return s&&s.setForRemoval&&(i=!0),this.playersByElement.has(t)&&(i=!0),this.playersByQueriedElement.has(t)&&(i=!0),this.statesByElement.has(t)&&(i=!0),this._fetchNamespace(e).elementContainsData(t)||i}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,s,r){let o=[];if(t){const a=this.playersByQueriedElement.get(e);a&&(o=a)}else{const a=this.playersByElement.get(e);if(a){const l=!r||r==Xo;a.forEach(c=>{c.queued||!l&&c.triggerName!=s||o.push(c)})}}return(i||s)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||s&&s!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){const r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:t.triggerName;for(const l of t.timelines){const c=l.element,u=c!==r,d=jt(i,c,[]);this._getPreviousPlayers(c,u,o,a,t.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}is(r,t.fromStyles)}_buildAnimation(e,t,i,s,r,o){const a=t.triggerName,l=t.element,c=[],u=new Set,d=new Set,h=t.timelines.map(p=>{const g=p.element;u.add(g);const m=g[nn];if(m&&m.removedBeforeQueried)return new Yo(p.duration,p.delay);const _=g!==l,y=function Gz(n){const e=[];return wE(n,e),e}((i.get(g)||Bz).map(x=>x.getRealPlayer())).filter(x=>!!x.element&&x.element===g),b=r.get(g),v=o.get(g),D=KC(0,this._normalizer,0,p.keyframes,b,v),E=this._buildPlayer(p,D,y);if(p.subTimeline&&s&&d.add(g),_){const x=new Vp(e,a,g);x.setRealPlayer(E),c.push(x)}return E});c.forEach(p=>{jt(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function zz(n,e,t){let i;if(n instanceof Map){if(i=n.get(e),i){if(i.length){const s=i.indexOf(t);i.splice(s,1)}0==i.length&&n.delete(e)}}else if(i=n[e],i){if(i.length){const s=i.indexOf(t);i.splice(s,1)}0==i.length&&delete n[e]}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>sn(p,sE));const f=Ei(h);return f.onDestroy(()=>{u.forEach(p=>yr(p,sE)),jn(l,t.toStyles)}),d.forEach(p=>{jt(s,p,[]).push(f)}),f}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new Yo(e.duration,e.delay)}}class Vp{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new Yo,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(t=>{this._queuedCallbacks[t].forEach(i=>vp(e,t,void 0,i))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){jt(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function Lc(n){return n&&1===n.nodeType}function vE(n,e){const t=n.style.display;return n.style.display=null!=e?e:"none",t}function bE(n,e,t,i,s){const r=[];t.forEach(l=>r.push(vE(l)));const o=[];i.forEach((l,c)=>{const u={};l.forEach(d=>{const h=u[d]=e.computeStyle(c,d,s);(!h||0==h.length)&&(c[nn]=Vz,o.push(c))}),n.set(c,u)});let a=0;return t.forEach(l=>vE(l,r[a++])),o}function DE(n,e){const t=new Map;if(n.forEach(a=>t.set(a,[])),0==e.length)return t;const s=new Set(e),r=new Map;function o(a){if(!a)return 1;let l=r.get(a);if(l)return l;const c=a.parentNode;return l=t.has(c)?c:s.has(c)?1:o(c),r.set(a,l),l}return e.forEach(a=>{const l=o(a);1!==l&&t.get(l).push(a)}),t}function sn(n,e){var t;null===(t=n.classList)||void 0===t||t.add(e)}function yr(n,e){var t;null===(t=n.classList)||void 0===t||t.remove(e)}function Wz(n,e,t){Ei(t).onDone(()=>n.processLeaveNode(e))}function wE(n,e){for(let t=0;t<n.length;t++){const i=n[t];i instanceof qC?wE(i.players,e):e.push(i)}}function CE(n,e,t){const i=t.get(n);if(!i)return!1;let s=e.get(n);return s?i.forEach(r=>s.add(r)):e.set(n,i),t.delete(n),!0}class Bc{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(s,r)=>{},this._transitionEngine=new Hz(e,t,i),this._timelineEngine=new Pz(e,t,i),this._transitionEngine.onRemovalComplete=(s,r)=>this.onRemovalComplete(s,r)}registerTrigger(e,t,i,s,r){const o=e+"-"+s;let a=this._triggerCache[o];if(!a){const l=[],c=Ap(this._driver,r,l);if(l.length)throw function LH(n,e){return new O(3404,ie)}();a=function Az(n,e,t){return new Iz(n,e,t)}(s,c,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,s,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,s){this._transitionEngine.insertNode(e,t,i,s)}onRemove(e,t,i,s){this._transitionEngine.removeNode(e,t,s||!1,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,s){if("@"==i.charAt(0)){const[r,o]=XC(i);this._timelineEngine.command(r,t,o,s)}else this._transitionEngine.trigger(e,t,i,s)}listen(e,t,i,s,r){if("@"==i.charAt(0)){const[o,a]=XC(i);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,i,s,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let Kz=(()=>{class n{constructor(t,i,s){this._element=t,this._startStyles=i,this._endStyles=s,this._state=0;let r=n.initialStylesByElement.get(t);r||n.initialStylesByElement.set(t,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&jn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(jn(this._element,this._initialStyles),this._endStyles&&(jn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(is(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(is(this._element,this._endStyles),this._endStyles=null),jn(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function jp(n){let e=null;const t=Object.keys(n);for(let i=0;i<t.length;i++){const s=t[i];Xz(s)&&(e=e||{},e[s]=n[s])}return e}function Xz(n){return"display"===n||"position"===n}class EE{constructor(e,t,i,s){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(e,t,i){return e.animate(t,i)}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e={};if(this.hasStarted()){const t=this._finalKeyframe;Object.keys(t).forEach(i=>{"offset"!=i&&(e[i]=this._finished?t[i]:cE(this.element,i))})}this.currentSnapshot=e}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class Zz{validateStyleProperty(e){return JC(e)}matchesElement(e,t){return!1}containsElement(e,t){return eE(e,t)}query(e,t,i){return tE(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}animate(e,t,i,s,r,o=[]){const l={duration:i,delay:s,fill:0==s?"both":"forwards"};r&&(l.easing=r);const c={},u=o.filter(h=>h instanceof EE);(function sz(n,e){return 0===n||0===e})(i,s)&&u.forEach(h=>{let f=h.currentSnapshot;Object.keys(f).forEach(p=>c[p]=f[p])}),t=function rz(n,e,t){const i=Object.keys(t);if(i.length&&e.length){let r=e[0],o=[];if(i.forEach(a=>{r.hasOwnProperty(a)||o.push(a),r[a]=t[a]}),o.length)for(var s=1;s<e.length;s++){let a=e[s];o.forEach(function(l){a[l]=cE(n,l)})}}return e}(e,t=t.map(h=>xi(h,!1)),c);const d=function Yz(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=jp(e[0]),e.length>1&&(i=jp(e[e.length-1]))):e&&(t=jp(e)),t||i?new Kz(n,t,i):null}(e,t);return new EE(e,t,l,d)}}let Qz=(()=>{class n extends HC{constructor(t,i){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(i.body,{id:"0",encapsulation:on.None,styles:[],data:{animation:[]}})}build(t){const i=this._nextAnimationId.toString();this._nextAnimationId++;const s=Array.isArray(t)?$C(t):t;return xE(this._renderer,null,i,"register",[s]),new Jz(i,this._renderer)}}return n.\u0275fac=function(t){return new(t||n)(w(io),w(se))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class Jz extends class fH{}{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new e$(this._id,e,t||{},this._renderer)}}class e${constructor(e,t,i,s){this.id=e,this.element=t,this._renderer=s,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return xE(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(e){this._command("setPosition",e)}getPosition(){var e,t;return null!==(t=null===(e=this._renderer.engine.players[+this.id])||void 0===e?void 0:e.getPosition())&&void 0!==t?t:0}}function xE(n,e,t,i,s){return n.setProperty(e,`@@${t}:${i}`,s)}const SE="@.disabled";let t$=(()=>{class n{constructor(t,i,s){this.delegate=t,this.engine=i,this._zone=s,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(r,o)=>{const a=null==o?void 0:o.parentNode(r);a&&o.removeChild(a,r)}}createRenderer(t,i){const r=this.delegate.createRenderer(t,i);if(!(t&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(r);return u||(u=new ME("",r,this.engine),this._rendererCache.set(r,u)),u}const o=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(o,a,t,u.name,u)};return i.data.animation.forEach(l),new n$(this,a,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,i,s){t>=0&&t<this._microtaskId?this._zone.run(()=>i(s)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(r=>{const[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,s]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(t){return new(t||n)(w(io),w(Bc),w(he))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();class ME{constructor(e,t,i){this.namespaceId=e,this.delegate=t,this.engine=i,this.destroyNode=this.delegate.destroyNode?s=>t.destroyNode(s):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,s=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,s)}removeChild(e,t,i){this.engine.onRemove(this.namespaceId,t,this.delegate,i)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,s){this.delegate.setAttribute(e,t,i,s)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,s){this.delegate.setStyle(e,t,i,s)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){"@"==t.charAt(0)&&t==SE?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class n$ extends ME{constructor(e,t,i,s){super(t,i,s),this.factory=e,this.namespaceId=t}setProperty(e,t,i){"@"==t.charAt(0)?"."==t.charAt(1)&&t==SE?this.disableAnimations(e,i=void 0===i||!!i):this.engine.process(this.namespaceId,e,t.substr(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if("@"==t.charAt(0)){const s=function i$(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(e);let r=t.substr(1),o="";return"@"!=r.charAt(0)&&([r,o]=function s$(n){const e=n.indexOf(".");return[n.substring(0,e),n.substr(e+1)]}(r)),this.engine.listen(this.namespaceId,s,r,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(e,t,i)}}let r$=(()=>{class n extends Bc{constructor(t,i,s){super(t.body,i,s)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(t){return new(t||n)(w(se),w(Cp),w(Rp))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})();const jc=new B("AnimationModuleType"),TE=[{provide:HC,useClass:Qz},{provide:Rp,useFactory:function o$(){return new Ez}},{provide:Bc,useClass:r$},{provide:io,useFactory:function a$(n,e,t){return new t$(n,e,t)},deps:[Al,Bc,he]}],AE=[{provide:Cp,useFactory:()=>new Zz},{provide:jc,useValue:"BrowserAnimations"},...TE],l$=[{provide:Cp,useClass:nE},{provide:jc,useValue:"NoopAnimations"},...TE];let c$=(()=>{class n{static withConfig(t){return{ngModule:n,providers:t.disableAnimations?l$:AE}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({providers:AE,imports:[N0]}),n})();const d$=new B("mat-sanity-checks",{providedIn:"root",factory:function u$(){return!0}});let Si=(()=>{class n{constructor(t,i,s){this._sanityChecks=i,this._document=s,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!dp()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}}return n.\u0275fac=function(t){return new(t||n)(w(hH),w(d$,8),w(se))},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({imports:[[Go],Go]}),n})();function h$(n){return class extends n{constructor(...e){super(...e),this._disabled=!1}get disabled(){return this._disabled}set disabled(e){this._disabled=tp(e)}}}function kE(n,e){return class extends n{constructor(...t){super(...t),this.defaultColor=e,this.color=e}get color(){return this._color}set color(t){const i=t||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}}}function f$(n){return class extends n{constructor(...e){super(...e),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=tp(e)}}}class g${constructor(e,t,i){this._renderer=e,this.element=t,this.config=i,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const OE={enterDuration:225,exitDuration:150},Hp=cp({passive:!0}),PE=["mousedown","touchstart"],RE=["mouseup","mouseleave","touchend","touchcancel"];class _${constructor(e,t,i,s){this._target=e,this._ngZone=t,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,s.isBrowser&&(this._containerElement=pr(i))}fadeInRipple(e,t,i={}){const s=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),r=Object.assign(Object.assign({},OE),i.animation);i.centered&&(e=s.left+s.width/2,t=s.top+s.height/2);const o=i.radius||function v$(n,e,t){const i=Math.max(Math.abs(n-t.left),Math.abs(n-t.right)),s=Math.max(Math.abs(e-t.top),Math.abs(e-t.bottom));return Math.sqrt(i*i+s*s)}(e,t,s),a=e-s.left,l=t-s.top,c=r.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=a-o+"px",u.style.top=l-o+"px",u.style.height=2*o+"px",u.style.width=2*o+"px",null!=i.color&&(u.style.backgroundColor=i.color),u.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(u),function y$(n){window.getComputedStyle(n).getPropertyValue("opacity")}(u),u.style.transform="scale(1)";const d=new g$(this,u,i);return d.state=0,this._activeRipples.add(d),i.persistent||(this._mostRecentTransientRipple=d),this._runTimeoutOutsideZone(()=>{const h=d===this._mostRecentTransientRipple;d.state=1,!i.persistent&&(!h||!this._isPointerDown)&&d.fadeOut()},c),d}fadeOutRipple(e){const t=this._activeRipples.delete(e);if(e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),!t)return;const i=e.element,s=Object.assign(Object.assign({},OE),e.config.animation);i.style.transitionDuration=`${s.exitDuration}ms`,i.style.opacity="0",e.state=2,this._runTimeoutOutsideZone(()=>{e.state=3,i.remove()},s.exitDuration)}fadeOutAll(){this._activeRipples.forEach(e=>e.fadeOut())}fadeOutAllNonPersistent(){this._activeRipples.forEach(e=>{e.config.persistent||e.fadeOut()})}setupTriggerEvents(e){const t=pr(e);!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,this._registerEvents(PE))}handleEvent(e){"mousedown"===e.type?this._onMousedown(e):"touchstart"===e.type?this._onTouchStart(e):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(RE),this._pointerUpEventsRegistered=!0)}_onMousedown(e){const t=FC(e),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;!this._target.rippleDisabled&&!t&&!i&&(this._isPointerDown=!0,this.fadeInRipple(e.clientX,e.clientY,this._target.rippleConfig))}_onTouchStart(e){if(!this._target.rippleDisabled&&!NC(e)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;const t=e.changedTouches;for(let i=0;i<t.length;i++)this.fadeInRipple(t[i].clientX,t[i].clientY,this._target.rippleConfig)}}_onPointerUp(){!this._isPointerDown||(this._isPointerDown=!1,this._activeRipples.forEach(e=>{!e.config.persistent&&(1===e.state||e.config.terminateOnPointerUp&&0===e.state)&&e.fadeOut()}))}_runTimeoutOutsideZone(e,t=0){this._ngZone.runOutsideAngular(()=>setTimeout(e,t))}_registerEvents(e){this._ngZone.runOutsideAngular(()=>{e.forEach(t=>{this._triggerElement.addEventListener(t,this,Hp)})})}_removeTriggerEvents(){this._triggerElement&&(PE.forEach(e=>{this._triggerElement.removeEventListener(e,this,Hp)}),this._pointerUpEventsRegistered&&RE.forEach(e=>{this._triggerElement.removeEventListener(e,this,Hp)}))}}const b$=new B("mat-ripple-global-options");let FE=(()=>{class n{constructor(t,i,s,r,o){this._elementRef=t,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new _$(this,i,t,s)}get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,i=0,s){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,i,Object.assign(Object.assign({},this.rippleConfig),s)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}}return n.\u0275fac=function(t){return new(t||n)(P(Lt),P(he),P(wn),P(b$,8),P(jc,8))},n.\u0275dir=Ct({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,i){2&t&&Xs("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),D$=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({imports:[[Si],Si]}),n})();const w$=["mat-button",""],C$=["*"],x$=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],S$=kE(h$(f$(class{constructor(n){this._elementRef=n}})));let NE=(()=>{class n extends S${constructor(t,i,s){super(t),this._focusMonitor=i,this._animationMode=s,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const r of x$)this._hasHostAttributes(r)&&this._getHostElement().classList.add(r);t.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(t,i){t?this._focusMonitor.focusVia(this._getHostElement(),t,i):this._getHostElement().focus(i)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...t){return t.some(i=>this._getHostElement().hasAttribute(i))}}return n.\u0275fac=function(t){return new(t||n)(P(Lt),P(dH),P(jc,8))},n.\u0275cmp=an({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(t,i){if(1&t&&rl(FE,5),2&t){let s;sl(s=ol())&&(i.ripple=s.first)}},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(t,i){2&t&&(Zr("disabled",i.disabled||null),Xs("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-button-disabled",i.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Ls],attrs:w$,ngContentSelectors:C$,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,i){1&t&&(Zd(),lt(0,"span",0),Qd(1),yt(),Vi(2,"span",1)(3,"span",2)),2&t&&(Yt(2),Xs("mat-button-ripple-round",i.isRoundButton||i.isIconButton),kn("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i.isIconButton)("matRippleTrigger",i._getHostElement()))},directives:[FE],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n"],encapsulation:2,changeDetection:0}),n})(),LE=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({imports:[[D$,Si],Si]}),n})();const{isArray:M$}=Array,{getPrototypeOf:T$,prototype:A$,keys:I$}=Object;function BE(n){if(1===n.length){const e=n[0];if(M$(e))return{args:e,keys:null};if(function k$(n){return n&&"object"==typeof n&&T$(n)===A$}(e)){const t=I$(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}function VE(n,e){return n.reduce((t,i,s)=>(t[i]=e[s],t),{})}function jE(n,e,t){n?Hn(t,n,e):e()}function zp(...n){return function R$(){return fg(1)}()(us(n,wr(n)))}function N$(...n){const e=wr(n);return it((t,i)=>{(e?zp(n,t,e):zp(n,t)).subscribe(i)})}const HE=new Set;let vr,L$=(()=>{class n{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):V$}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function B$(n){if(!HE.has(n))try{vr||(vr=document.createElement("style"),vr.setAttribute("type","text/css"),document.head.appendChild(vr)),vr.sheet&&(vr.sheet.insertRule(`@media ${n} {body{ }}`,0),HE.add(n))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return n.\u0275fac=function(t){return new(t||n)(w(wn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function V$(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}let zE=(()=>{class n{constructor(t,i){this._mediaMatcher=t,this._zone=i,this._queries=new Map,this._destroySubject=new Ae}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return $E(gc(t)).some(s=>this._registerQuery(s).mql.matches)}observe(t){let r=function O$(...n){const e=wr(n),t=gg(n),{args:i,keys:s}=BE(n);if(0===i.length)return us([],e);const r=new Te(function P$(n,e,t=cs){return i=>{jE(e,()=>{const{length:s}=n,r=new Array(s);let o=s,a=s;for(let l=0;l<s;l++)jE(e,()=>{const c=us(n[l],e);let u=!1;c.subscribe(tt(i,d=>{r[l]=d,u||(u=!0,a--),a||i.next(t(r.slice()))},()=>{--o||i.complete()}))},i)},i)}}(i,e,s?o=>VE(s,o):cs));return t?r.pipe(np(t)):r}($E(gc(t)).map(o=>this._registerQuery(o).observable));return r=zp(r.pipe(Cr(1)),r.pipe(kC(1),function F$(n,e=ap){return it((t,i)=>{let s=null,r=null,o=null;const a=()=>{if(s){s.unsubscribe(),s=null;const c=r;r=null,i.next(c)}};function l(){const c=o+n,u=e.now();if(u<c)return s=this.schedule(void 0,c-u),void i.add(s);a()}t.subscribe(tt(i,c=>{r=c,o=e.now(),s||(s=e.schedule(l,n),i.add(s))},()=>{a(),i.complete()},void 0,()=>{r=s=null}))})}(0))),r.pipe(wt(o=>{const a={matches:!1,breakpoints:{}};return o.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const i=this._mediaMatcher.matchMedia(t),r={observable:new Te(o=>{const a=l=>this._zone.run(()=>o.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(N$(i),wt(({matches:o})=>({query:t,matches:o})),bc(this._destroySubject)),mql:i};return this._queries.set(t,r),r}}return n.\u0275fac=function(t){return new(t||n)(w(L$),w(he))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function $E(n){return n.map(e=>e.split(",")).reduce((e,t)=>e.concat(t)).map(e=>e.trim())}function H$(n,e){if(1&n){const t=function Iy(){return C()}();lt(0,"div",2)(1,"button",3),Ga("click",function(){return function Vg(n){return j.lFrame.contextLView=n,n[8]}(t),qa().action()}),Rn(2),yt()()}if(2&n){const t=qa();Yt(2),Zs(t.data.action)}}function z$(n,e){}const UE=new B("MatSnackBarData");class Hc{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const $$=Math.pow(2,31)-1;class $p{constructor(e,t){this._overlayRef=t,this._afterDismissed=new Ae,this._afterOpened=new Ae,this._onAction=new Ae,this._dismissedByAction=!1,this.containerInstance=e,this.onAction().subscribe(()=>this.dismiss()),e._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(e){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(e,$$))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let U$=(()=>{class n{constructor(t,i){this.snackBarRef=t,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(t){return new(t||n)(P($p),P(UE))},n.\u0275cmp=an({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[[1,"mat-simple-snack-bar-content"],["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,i){1&t&&(lt(0,"span",0),Rn(1),yt(),Xn(2,H$,3,1,"div",1)),2&t&&(Yt(1),Zs(i.data.message),Yt(1),kn("ngIf",i.hasAction))},directives:[NE,Cl],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}.mat-simple-snack-bar-content{overflow:hidden;text-overflow:ellipsis}\n"],encapsulation:2,changeDetection:0}),n})();const W$={snackBarState:pH("state",[UC("void, hidden",qo({transform:"scale(0.8)",opacity:0})),UC("visible",qo({transform:"scale(1)",opacity:1})),WC("* => visible",zC("150ms cubic-bezier(0, 0, 0.2, 1)")),WC("* => void, * => hidden",zC("75ms cubic-bezier(0.4, 0.0, 1, 1)",qo({opacity:0})))])};let G$=(()=>{class n extends pp{constructor(t,i,s,r,o){super(),this._ngZone=t,this._elementRef=i,this._changeDetectorRef=s,this._platform=r,this.snackBarConfig=o,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Ae,this._onExit=new Ae,this._onEnter=new Ae,this._animationState="void",this.attachDomPortal=a=>(this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachDomPortal(a)),this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}onAnimationEnd(t){const{fromState:i,toState:s}=t;if(("void"===s&&"void"!==i||"hidden"===s)&&this._completeExit(),"visible"===s){const r=this._onEnter;this._ngZone.run(()=>{r.next(),r.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Cr(1)).subscribe(()=>{this._onExit.next(),this._onExit.complete()})}_applySnackBarClasses(){const t=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(s=>t.classList.add(s)):t.classList.add(i)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&i){let s=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(s=document.activeElement),t.removeAttribute("aria-hidden"),i.appendChild(t),null==s||s.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(t){return new(t||n)(P(he),P(Lt),P(Ph),P(wn),P(Hc))},n.\u0275cmp=an({type:n,selectors:[["snack-bar-container"]],viewQuery:function(t,i){if(1&t&&rl(yC,7),2&t){let s;sl(s=ol())&&(i._portalOutlet=s.first)}},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,i){1&t&&Kd("@state.done",function(r){return i.onAnimationEnd(r)}),2&t&&nh("@state",i._animationState)},features:[Ls],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,i){1&t&&(lt(0,"div",0),Xn(1,z$,0,0,"ng-template",1),yt(),Vi(2,"div")),2&t&&(Yt(2),Zr("aria-live",i._live)("role",i._role))},directives:[yC],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[W$.snackBarState]}}),n})(),WE=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({imports:[[zj,vC,w0,LE,Si],Si]}),n})();const GE=new B("mat-snack-bar-default-options",{providedIn:"root",factory:function q$(){return new Hc}});let Y$=(()=>{class n{constructor(t,i,s,r,o,a){this._overlay=t,this._live=i,this._injector=s,this._breakpointObserver=r,this._parentSnackBar=o,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}openFromComponent(t,i){return this._attach(t,i)}openFromTemplate(t,i){return this._attach(t,i)}open(t,i="",s){const r=Object.assign(Object.assign({},this._defaultConfig),s);return r.data={message:t,action:i},r.announcementMessage===t&&(r.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,r)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,i){const r=Ne.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:Hc,useValue:i}]}),o=new fp(this.snackBarContainerComponent,i.viewContainerRef,r),a=t.attach(o);return a.instance.snackBarConfig=i,a.instance}_attach(t,i){const s=Object.assign(Object.assign(Object.assign({},new Hc),this._defaultConfig),i),r=this._createOverlay(s),o=this._attachSnackBarContainer(r,s),a=new $p(o,r);if(t instanceof Fn){const l=new _C(t,null,{$implicit:s.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(s,a),c=new fp(t,void 0,l),u=o.attachComponentPortal(c);a.instance=u.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(bc(r.detachments())).subscribe(l=>{r.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),s.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(s.announcementMessage,s.politeness)}),this._animateSnackBar(a,s),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(t,i){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),i.duration&&i.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(i.duration))}_createOverlay(t){const i=new CC;i.direction=t.direction;let s=this._overlay.position().global();const r="rtl"===t.direction,o="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!r||"end"===t.horizontalPosition&&r,a=!o&&"center"!==t.horizontalPosition;return o?s.left("0"):a?s.right("0"):s.centerHorizontally(),"top"===t.verticalPosition?s.top("0"):s.bottom("0"),i.positionStrategy=s,this._overlay.create(i)}_createInjector(t,i){return Ne.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:$p,useValue:i},{provide:UE,useValue:t.data}]})}}return n.\u0275fac=function(t){return new(t||n)(w(Dc),w(BC),w(Ne),w(zE),w(n,12),w(GE))},n.\u0275prov=R({token:n,factory:n.\u0275fac}),n})(),K$=(()=>{class n extends Y${constructor(t,i,s,r,o,a){super(t,i,s,r,o,a),this.simpleSnackBarComponent=U$,this.snackBarContainerComponent=G$,this.handsetCssClass="mat-snack-bar-handset"}}return n.\u0275fac=function(t){return new(t||n)(w(Dc),w(BC),w(Ne),w(zE),w(n,12),w(GE))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:WE}),n})();const J$=["*"];let zc;function Qo(n){var e;return(null===(e=function eU(){if(void 0===zc&&(zc=null,"undefined"!=typeof window)){const n=window;void 0!==n.trustedTypes&&(zc=n.trustedTypes.createPolicy("angular#components",{createHTML:e=>e}))}return zc}())||void 0===e?void 0:e.createHTML(n))||n}function qE(n){return Error(`Unable to find icon with the name "${n}"`)}function YE(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function KE(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}class rs{constructor(e,t,i){this.url=e,this.svgText=t,this.options=i}}let $c=(()=>{class n{constructor(t,i,s,r){this._httpClient=t,this._sanitizer=i,this._errorHandler=r,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass="material-icons",this._document=s}addSvgIcon(t,i,s){return this.addSvgIconInNamespace("",t,i,s)}addSvgIconLiteral(t,i,s){return this.addSvgIconLiteralInNamespace("",t,i,s)}addSvgIconInNamespace(t,i,s,r){return this._addSvgIconConfig(t,i,new rs(s,null,r))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,i,s,r){const o=this._sanitizer.sanitize(ue.HTML,s);if(!o)throw KE(s);const a=Qo(o);return this._addSvgIconConfig(t,i,new rs("",a,r))}addSvgIconSet(t,i){return this.addSvgIconSetInNamespace("",t,i)}addSvgIconSetLiteral(t,i){return this.addSvgIconSetLiteralInNamespace("",t,i)}addSvgIconSetInNamespace(t,i,s){return this._addSvgIconSetConfig(t,new rs(i,null,s))}addSvgIconSetLiteralInNamespace(t,i,s){const r=this._sanitizer.sanitize(ue.HTML,i);if(!r)throw KE(i);const o=Qo(r);return this._addSvgIconSetConfig(t,new rs("",o,s))}registerFontClassAlias(t,i=t){return this._fontCssClassesByAlias.set(t,i),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const i=this._sanitizer.sanitize(ue.RESOURCE_URL,t);if(!i)throw YE(t);const s=this._cachedIconsByUrl.get(i);return s?Nn(Uc(s)):this._loadSvgIconFromConfig(new rs(t,null)).pipe(Ol(r=>this._cachedIconsByUrl.set(i,r)),wt(r=>Uc(r)))}getNamedSvgIcon(t,i=""){const s=XE(i,t);let r=this._svgIconConfigs.get(s);if(r)return this._getSvgFromConfig(r);if(r=this._getIconConfigFromResolvers(i,t),r)return this._svgIconConfigs.set(s,r),this._getSvgFromConfig(r);const o=this._iconSetConfigs.get(i);return o?this._getSvgFromIconSetConfigs(t,o):function X$(n,e){const t=W(n)?n:()=>n,i=s=>s.error(t());return new Te(e?s=>e.schedule(i,0,s):i)}(qE(s))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?Nn(Uc(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(wt(i=>Uc(i)))}_getSvgFromIconSetConfigs(t,i){const s=this._extractIconWithNameFromAnySet(t,i);return s?Nn(s):function Z$(...n){const e=gg(n),{args:t,keys:i}=BE(n),s=new Te(r=>{const{length:o}=t;if(!o)return void r.complete();const a=new Array(o);let l=o,c=o;for(let u=0;u<o;u++){let d=!1;zt(t[u]).subscribe(tt(r,h=>{d||(d=!0,c--),a[u]=h},()=>l--,void 0,()=>{(!l||!d)&&(c||r.next(i?VE(i,a):a),r.complete())}))}});return e?s.pipe(np(e)):s}(i.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Pl(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(ue.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),Nn(null)})))).pipe(wt(()=>{const o=this._extractIconWithNameFromAnySet(t,i);if(!o)throw qE(t);return o}))}_extractIconWithNameFromAnySet(t,i){for(let s=i.length-1;s>=0;s--){const r=i[s];if(r.svgText&&r.svgText.toString().indexOf(t)>-1){const o=this._svgElementFromConfig(r),a=this._extractSvgIconFromSet(o,t,r.options);if(a)return a}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Ol(i=>t.svgText=i),wt(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?Nn(null):this._fetchIcon(t).pipe(Ol(i=>t.svgText=i))}_extractSvgIconFromSet(t,i,s){const r=t.querySelector(`[id="${i}"]`);if(!r)return null;const o=r.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,s);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),s);const a=this._svgElementFromString(Qo("<svg></svg>"));return a.appendChild(o),this._setSvgAttributes(a,s)}_svgElementFromString(t){const i=this._document.createElement("DIV");i.innerHTML=t;const s=i.querySelector("svg");if(!s)throw Error("<svg> tag not found");return s}_toSvgElement(t){const i=this._svgElementFromString(Qo("<svg></svg>")),s=t.attributes;for(let r=0;r<s.length;r++){const{name:o,value:a}=s[r];"id"!==o&&i.setAttribute(o,a)}for(let r=0;r<t.childNodes.length;r++)t.childNodes[r].nodeType===this._document.ELEMENT_NODE&&i.appendChild(t.childNodes[r].cloneNode(!0));return i}_setSvgAttributes(t,i){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),i&&i.viewBox&&t.setAttribute("viewBox",i.viewBox),t}_fetchIcon(t){var i;const{url:s,options:r}=t,o=null!==(i=null==r?void 0:r.withCredentials)&&void 0!==i&&i;if(!this._httpClient)throw function tU(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}();if(null==s)throw Error(`Cannot fetch icon from URL "${s}".`);const a=this._sanitizer.sanitize(ue.RESOURCE_URL,s);if(!a)throw YE(s);const l=this._inProgressUrlFetches.get(a);if(l)return l;const c=this._httpClient.get(a,{responseType:"text",withCredentials:o}).pipe(wt(u=>Qo(u)),function Q$(n){return it((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}(()=>this._inProgressUrlFetches.delete(a)),vg());return this._inProgressUrlFetches.set(a,c),c}_addSvgIconConfig(t,i,s){return this._svgIconConfigs.set(XE(t,i),s),this}_addSvgIconSetConfig(t,i){const s=this._iconSetConfigs.get(t);return s?s.push(i):this._iconSetConfigs.set(t,[i]),this}_svgElementFromConfig(t){if(!t.svgElement){const i=this._svgElementFromString(t.svgText);this._setSvgAttributes(i,t.options),t.svgElement=i}return t.svgElement}_getIconConfigFromResolvers(t,i){for(let s=0;s<this._resolvers.length;s++){const r=this._resolvers[s](i,t);if(r)return iU(r)?new rs(r.url,null,r.options):new rs(r,null)}}}return n.\u0275fac=function(t){return new(t||n)(w(lr,8),w(sf),w(se,8),w(qn))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Uc(n){return n.cloneNode(!0)}function XE(n,e){return n+":"+e}function iU(n){return!(!n.url||!n.options)}const sU=kE(class{constructor(n){this._elementRef=n}}),rU=new B("mat-icon-location",{providedIn:"root",factory:function oU(){const n=Hu(se),e=n?n.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}}),ZE=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],aU=ZE.map(n=>`[${n}]`).join(", "),lU=/^url\(['"]?#(.*?)['"]?\)$/;let cU=(()=>{class n extends sU{constructor(t,i,s,r,o){super(t),this._iconRegistry=i,this._location=r,this._errorHandler=o,this._inline=!1,this._currentIconFetch=ft.EMPTY,s||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=tp(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const i=this._cleanupFontValue(t);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const i=this._cleanupFontValue(t);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}_splitIconName(t){if(!t)return["",""];const i=t.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const i=t.querySelectorAll("style");for(let r=0;r<i.length;r++)i[r].textContent+=" ";const s=this._location.getPathname();this._previousPath=s,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(s),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let i=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){const s=t.childNodes[i];(1!==s.nodeType||"svg"===s.nodeName.toLowerCase())&&s.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,i=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();i!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),i&&t.classList.add(i),this._previousFontSetClass=i),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const i=this._elementsWithExternalReferences;i&&i.forEach((s,r)=>{s.forEach(o=>{r.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){const i=t.querySelectorAll(aU),s=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let r=0;r<i.length;r++)ZE.forEach(o=>{const a=i[r],l=a.getAttribute(o),c=l?l.match(lU):null;if(c){let u=s.get(a);u||(u=[],s.set(a,u)),u.push({name:o,value:c[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[i,s]=this._splitIconName(t);i&&(this._svgNamespace=i),s&&(this._svgName=s),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(s,i).pipe(Cr(1)).subscribe(r=>this._setSvgElement(r),r=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${s}! ${r.message}`))})}}}return n.\u0275fac=function(t){return new(t||n)(P(Lt),P($c),function xa(n){return function VS(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const i=t.length;let s=0;for(;s<i;){const r=t[s];if(Xg(r))break;if(0===r)s+=2;else if("number"==typeof r)for(s++;s<i&&"string"==typeof t[s];)s++;else{if(r===e)return t[s+1];s+=2}}}return null}(We(),n)}("aria-hidden"),P(rU),P(qn))},n.\u0275cmp=an({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(t,i){2&t&&(Zr("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet),Xs("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[Ls],ngContentSelectors:J$,decls:1,vars:0,template:function(t,i){1&t&&(Zd(),Qd(0))},styles:[".mat-icon{-webkit-user-select:none;-moz-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),n})(),uU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({imports:[[Si],Si]}),n})(),dU=(()=>{class n{constructor(t){this._snackBar=t}get build(){return this._build}set build(t){this._build=t,this.updateBuildText()}get hero(){return this._hero}set hero(t){this._hero=t,this.updateBuildText()}ngOnInit(){}updateBuildText(){this.buildText=`[T${this._build},${this._hero}]`}copyBuild(t){navigator.clipboard.writeText(this.buildText),this.openSnackBar("Copied",null),t.preventDefault()}openSnackBar(t,i){this._snackBar.open(t,i,{duration:2e3})}}return n.\u0275fac=function(t){return new(t||n)(P(K$))},n.\u0275cmp=an({type:n,selectors:[["app-talent-build"]],inputs:{build:"build",hero:"hero"},decls:6,vars:1,consts:[[1,"outer"],[1,"build-text"],["mat-icon-button","","title","Copy Build",1,"icon",3,"click"]],template:function(t,i){1&t&&(lt(0,"div",0)(1,"span",1),Rn(2),yt(),lt(3,"button",2),Ga("click",function(r){return i.copyBuild(r)}),lt(4,"mat-icon"),Rn(5,"content_copy"),yt()()()),2&t&&(Yt(2),Zs(i.buildText))},directives:[NE,cU],styles:[".outer[_ngcontent-%COMP%]{display:flex;align-items:center}.build-text[_ngcontent-%COMP%]{flex-grow:1}.icon[_ngcontent-%COMP%]{margin-left:5px}"]}),n})();const hU=[uU,LE,WE];let fU=(()=>{class n{constructor(t){this.http=t}getNumberOfReplays(){return this.http.get("/api2/stats/GetNumberOfReplays")}}return n.\u0275fac=function(t){return new(t||n)(w(lr))},n.\u0275prov=R({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function pU(n,e){if(1&n&&(lt(0,"span"),Rn(1),yt()),2&n){const t=e.ngIf;Yt(1),Zs(t)}}function gU(n,e){1&n&&(lt(0,"span",4),Rn(1,"(Loading...)"),yt())}function mU(n,e){1&n&&(lt(0,"span",5),Rn(1,"Error!"),yt())}function _U(n,e){if(1&n&&(Xn(0,gU,2,0,"span",2),Xn(1,mU,2,0,"span",3)),2&n){const t=qa();kn("ngIf",!t.error),Yt(1),kn("ngIf",t.error)}}let yU=(()=>{class n{constructor(t){this.numberOfReplays$=t.getNumberOfReplays().pipe(Pl(i=>(this.error=i,Nn(null))))}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)(P(fU))},n.\u0275cmp=an({type:n,selectors:[["app-demo-replay-count"]],decls:5,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],["class","loading",4,"ngIf"],["class","error","title","Api not responding",4,"ngIf"],[1,"loading"],["title","Api not responding",1,"error"]],template:function(t,i){if(1&t&&(Rn(0,"Number of replays uploaded: "),Xn(1,pU,2,1,"span",0),tl(2,"async"),Xn(3,_U,2,2,"ng-template",null,1,gb)),2&t){const s=function yy(n){return _s(function yS(){return j.lFrame.contextLView}(),20+n)}(4);Yt(1),kn("ngIf",nl(2,2,i.numberOfReplays$))("ngIfElse",s)}},directives:[Cl],pipes:[El],styles:[".loading[_ngcontent-%COMP%]{color:#b8860b}.error[_ngcontent-%COMP%]{color:#8b0000}"]}),n})();class Up extends Zl{update(e){var t=this.chart.data.datasets[2].data.map(p=>p.y),i=Math.min(...t),s=Math.max(...t),r=this.getMeta(),o=this.getScaleForId(r.yAxisID),a=Math.round(o.getPixelForValue(s,0)),l=Math.round(o.getPixelForValue(0,0)),c=Math.round(o.getPixelForValue(i,0)),u=this.chart.ctx,d=c-a!=0?Math.min((l-a)/(c-a),1):0,h=u.createLinearGradient(0,a,0,c);h.addColorStop(0,"rgba(51, 122, 183, 0.6)"),h.addColorStop(d,"rgba(51, 122, 183, 0.6)"),h.addColorStop(d,"rgba(169, 68, 66, 0.6)"),h.addColorStop(1,"rgba(169, 68, 66, 0.6)"),this.chart.data.datasets[2].backgroundColor=h;var f=u.createLinearGradient(0,a,0,c);return f.addColorStop(0,"rgba(51, 122, 183, 1)"),f.addColorStop(d,"rgba(51, 122, 183, 1)"),f.addColorStop(d,"rgba(169, 68, 66, 1)"),f.addColorStop(1,"rgba(169, 68, 66, 1)"),this.chart.data.datasets[2].borderColor=f,super.update(e)}}Up.id="NegativeColoredLine",Up.defaults=Object.assign({},Zl.defaults);let vU=(()=>{class n{constructor(t){this.injector=t,ai.register(hc),ai.register(Nw),ai.register(jo),ai.register(Up),ai.register(Gw),ai.register(tC)}ngDoBootstrap(t){customElements.define("hello-world",yo(K1,{injector:this.injector})),customElements.define("hotslogs-news",yo(Q1,{injector:this.injector})),customElements.define("match-log",yo(HV,{injector:this.injector})),customElements.define("talent-build",yo(dU,{injector:this.injector})),customElements.define("demo-replay-count",yo(yU,{injector:this.injector}))}}return n.\u0275fac=function(t){return new(t||n)(w(Ne))},n.\u0275mod=Ze({type:n}),n.\u0275inj=Ue({providers:[],imports:[[N0,P1,c$,hU]]}),n})();(function HP(){Ub=!1})(),a1().bootstrapModule(vU).catch(n=>console.error(n))}},W=>{W(W.s=714)}]);
(self.webpackChunkHotsAngularElements=self.webpackChunkHotsAngularElements||[]).push([[429],{435:(X,oe,ge)=>{"use strict";ge(583),ge(757)},757:()=>{!function(X,oe){"use strict";function ge(){var e=Ue.splice(0,Ue.length);for(F=0;e.length;)e.shift().call(null,e.shift())}function ye(e,r){for(var i=0,h=e.length;i<h;i++)Ae(e[i],r)}function Ve(e){return function(r){L(r)&&(Ae(r,e),le.length&&ye(r.querySelectorAll(le),e))}}function Ie(e){var r=R.call(e,"is"),i=e.nodeName.toUpperCase(),h=Ee.call(He,r?st+r.toUpperCase():qe+i);return r&&-1<h&&!Je(i,r)?-1:h}function Je(e,r){return-1<le.indexOf(e+'[is="'+r+'"]')}function Qe(e){var r=e.currentTarget,i=e.attrChange,h=e.attrName,s=e.target,o=e[ot]||2,l=e[pt]||3;!n||s&&s!==r||!r[pe]||"style"===h||e.prevValue===e.newValue&&(""!==e.newValue||i!==o&&i!==l)||r[pe](h,i===o?null:e.prevValue,i===l?null:e.newValue)}function et(e){var r=Ve(e);return function(i){Ue.push(r,i.target),F&&clearTimeout(F),F=setTimeout(ge,1)}}function he(e){k&&(k=!1,e.currentTarget.removeEventListener(bt,he)),le.length&&ye((e.target||A).querySelectorAll(le),e.detail===me?me:Le),G&&function lt(){for(var e,r=0,i=T.length;r<i;r++)De.contains(e=T[r])||(i--,T.splice(r--,1),Ae(e,me))}()}function ve(e,r){var i=this;K.call(i,e,r),je.call(i,{target:i})}function Ze(e,r,i){var h=r.apply(e,i),s=Ie(h);return-1<s&&ae(h,We[s]),i.pop()&&le.length&&function _t(e){for(var r,i=0,h=e.length;i<h;i++)ae(r=e[i],We[Ie(r)])}(h.querySelectorAll(le)),h}function Fe(e,r){b(e,r),Ge?Ge.observe(e,re):(I&&(e.setAttribute=ve,e[de]=nt(e),e[be](Et,je)),e[be](Oe,Qe)),e[ze]&&n&&(e.created=!0,e[ze](),e.created=!1)}function U(e){throw new Error("A "+e+" type is already registered")}function Ae(e,r){var i,h,s=Ie(e);-1<s&&!B.call(e,"TEMPLATE")&&(we(e,We[s]),s=0,r!==Le||e[Le]?r!==me||e[me]||(e[Le]=!1,e[me]=!0,h="disconnected",s=1):(e[me]=!1,e[Le]=!0,h="connected",s=1,G&&Ee.call(T,e)<0&&T.push(e)),s&&(i=e[r+ce]||e[h+ce])&&i.call(e))}function ke(){}function J(e,r,i){var h=i&&i[te]||"",s=r.prototype,o=w(s),l=r.observedAttributes||Ne,d={prototype:o};x(o,ze,{value:function(){if(f)f=!1;else if(!this[$e]){this[$e]=!0,new r(this),s[ze]&&s[ze].call(this);var p=m[v.get(r)];(!t||p.create.length>1)&&tt(this)}}}),x(o,pe,{value:function(p){-1<Ee.call(l,p)&&s[pe]&&s[pe].apply(this,arguments)}}),s[rt]&&x(o,vt,{value:s[rt]}),s[mt]&&x(o,kt,{value:s[mt]}),h&&(d[te]=h),e=e.toUpperCase(),m[e]={constructor:r,create:h?[h,C(e)]:[e]},v.set(r,e),A[se](e.toLowerCase(),d),ut(e),E[e].r()}function gt(e){var r=m[e.toUpperCase()];return r&&r.constructor}function yt(e){return"string"==typeof e?e:e&&e.is||""}function tt(e){for(var r,i=e[pe],h=i?e.attributes:Ne,s=h.length;s--;)i.call(e,(r=h[s]).name||r.nodeName,null,r.value||r.nodeValue)}function ut(e){return(e=e.toUpperCase())in E||(E[e]={},E[e].p=new c(function(r){E[e].r=r})),E[e].p}function ft(){Me&&delete X.customElements,Re(X,"customElements",{configurable:!0,value:new ke}),Re(X,"CustomElementRegistry",{configurable:!0,value:ke});for(var e=ht.get(/^HTML[A-Z]*[a-z]/),r=e.length;r--;function(i){var h=X[i];if(h){X[i]=function(s){var o,l;return s||(s=this),s[$e]||(f=!0,o=m[v.get(s.constructor)],(s=(l=t&&1===o.create.length)?Reflect.construct(h,Ne,o.constructor):A.createElement.apply(A,o.create))[$e]=!0,f=!1,l||tt(s)),s},X[i].prototype=h.prototype;try{h.prototype.constructor=X[i]}catch(s){Re(h,$e,{value:X[i]})}}}(e[r]));A.createElement=function(i,h){var s=yt(h);return s?O.call(this,i,C(s)):O.call(this,i)},ue||(W=!0,A[se](""))}var A=X.document,ne=X.Object,ht=function(e){var r,i,h,s,o=/^[A-Z]+[a-z]/,d=function(_,g){(g=g.toLowerCase())in p||(p[_]=(p[_]||[]).concat(g),p[g]=p[g.toUpperCase()]=_)},p=(ne.create||ne)(null),y={};for(i in e)for(s in e[i])for(p[s]=h=e[i][s],r=0;r<h.length;r++)p[h[r].toLowerCase()]=p[h[r].toUpperCase()]=s;return y.get=function(_){return"string"==typeof _?p[_]||(o.test(_)?[]:""):function(_){var g,M=[];for(g in p)_.test(g)&&M.push(g);return M}(_)},y.set=function(_,g){return o.test(_)?d(_,g):d(g,_),y},y}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});"object"!=typeof oe&&(oe={type:oe||"auto"});var Ue,je,Be,nt,Ge,ie,we,ae,Ce,e,r,i,h,s,se="registerElement",dt=1e5*X.Math.random()>>0,de="__"+se+dt,be="addEventListener",Le="attached",ce="Callback",me="detached",te="extends",pe="attributeChanged"+ce,vt=Le+ce,rt="connected"+ce,mt="disconnected"+ce,ze="created"+ce,kt=me+ce,ot="ADDITION",pt="REMOVAL",Oe="DOMAttrModified",bt="DOMContentLoaded",Et="DOMSubtreeModified",qe="<",st="=",Mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,wt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],He=[],We=[],le="",De=A.documentElement,Ee=He.indexOf||function(e){for(var r=this.length;r--&&this[r]!==e;);return r},it=ne.prototype,Pe=it.hasOwnProperty,at=it.isPrototypeOf,Re=ne.defineProperty,Ne=[],Xe=ne.getOwnPropertyDescriptor,Y=ne.getOwnPropertyNames,Ct=ne.getPrototypeOf,Ye=ne.setPrototypeOf,Se=!!ne.__proto__,$e="__dreCEv1",Me=X.customElements,t=!/^force/.test(oe.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),a=ne.create||ne,u=X.Map||function(){var e,r=[],i=[];return{get:function(h){return i[Ee.call(r,h)]},set:function(h,s){(e=Ee.call(r,h))<0?i[r.push(h)-1]=s:i[e]=s}}},c=X.Promise||function(e){function r(o){for(h=!0;i.length;)i.shift()(o)}var i=[],h=!1,s={catch:function(){return s},then:function(o){return i.push(o),h&&setTimeout(r,1),s}};return e(r),s},f=!1,m=a(null),E=a(null),v=new u,C=function(e){return e.toLowerCase()},w=ne.create||function e(r){return r?(e.prototype=r,new e):this},b=Ye||(Se?function(e,r){return e.__proto__=r,e}:Y&&Xe?function(){function e(r,i){for(var h,s=Y(i),o=0,l=s.length;o<l;o++)Pe.call(r,h=s[o])||Re(r,h,Xe(i,h))}return function(r,i){do{e(r,i)}while((i=Ct(i))&&!at.call(i,r));return r}}():function(e,r){for(var i in r)e[i]=r[i];return e}),H=X.MutationObserver||X.WebKitMutationObserver,S=X.HTMLAnchorElement,P=(X.HTMLElement||X.Element||X.Node).prototype,G=!at.call(P,De),x=G?function(e,r,i){return e[r]=i.value,e}:Re,L=G?function(e){return 1===e.nodeType}:function(e){return at.call(P,e)},T=G&&[],Z=P.attachShadow,z=P.cloneNode,B=P.closest||function(e){for(var r=this;r&&r.nodeName!==e;)r=r.parentNode;return r},$=P.dispatchEvent,R=P.getAttribute,Q=P.hasAttribute,V=P.removeAttribute,K=P.setAttribute,N=A.createElement,j=A.importNode,O=N,re=H&&{attributes:!0,characterData:!0,attributeOldValue:!0},Te=H||function(e){I=!1,De.removeEventListener(Oe,Te)},F=0,ue=se in A&&!/^force-all/.test(oe.type),fe=!0,W=!1,I=!0,k=!0,n=!0;if(H&&((Ce=A.createElement("div")).innerHTML="<div><div></div></div>",new H(function(e,r){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var i=(Ce=Xe(P,"innerHTML"))&&Ce.set;i&&Re(P,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);i.call(this,h)}})}r.disconnect(),Ce=null}).observe(Ce,{childList:!0,subtree:!0}),Ce.innerHTML=""),ue||(Ye||Se?(we=function(e,r){at.call(r,e)||Fe(e,r)},ae=Fe):(we=function(e,r){e[de]||(e[de]=ne(!0),Fe(e,r))},ae=we),G?(I=!1,e=Xe(P,be),r=e.value,i=function(o){var l=new CustomEvent(Oe,{bubbles:!0});l.attrName=o,l.prevValue=R.call(this,o),l.newValue=null,l[pt]=l.attrChange=2,V.call(this,o),$.call(this,l)},h=function(o,l){var d=Q.call(this,o),p=d&&R.call(this,o),y=new CustomEvent(Oe,{bubbles:!0});K.call(this,o,l),y.attrName=o,y.prevValue=d?p:null,y.newValue=l,d?y.MODIFICATION=y.attrChange=1:y[ot]=y.attrChange=0,$.call(this,y)},s=function(o){var l,d=o.currentTarget,p=d[de],y=o.propertyName;p.hasOwnProperty(y)&&(p=p[y],(l=new CustomEvent(Oe,{bubbles:!0})).attrName=p.name,l.prevValue=p.value||null,l.newValue=p.value=d[y]||null,null==l.prevValue?l[ot]=l.attrChange=0:l.MODIFICATION=l.attrChange=1,$.call(d,l))},e.value=function(o,l,d){o===Oe&&this[pe]&&this.setAttribute!==h&&(this[de]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=i,r.call(this,"propertychange",s)),r.call(this,o,l,d)},Re(P,be,e)):H||(De[be](Oe,Te),De.setAttribute(de,1),De.removeAttribute(de),I&&(je=function(e){var r,i,h,s=this;if(s===e.target){for(h in r=s[de],s[de]=i=nt(s),i){if(!(h in r))return Be(0,s,h,r[h],i[h],ot);if(i[h]!==r[h])return Be(1,s,h,r[h],i[h],"MODIFICATION")}for(h in r)if(!(h in i))return Be(2,s,h,r[h],i[h],pt)}},Be=function(e,r,i,h,s,o){var l={attrChange:e,currentTarget:r,attrName:i,prevValue:h,newValue:s};l[o]=e,Qe(l)},nt=function(e){for(var r,i,h={},s=e.attributes,o=0,l=s.length;o<l;o++)"setAttribute"!==(i=(r=s[o]).name)&&(h[i]=r.value);return h})),A[se]=function(e,r){if(i=e.toUpperCase(),fe&&(fe=!1,H?(Ge=function(p,y){function _(g,M){for(var D=0,q=g.length;D<q;M(g[D++]));}return new H(function(g){for(var M,D,q,ee=0,_e=g.length;ee<_e;ee++)"childList"===(M=g[ee]).type?(_(M.addedNodes,p),_(M.removedNodes,y)):(D=M.target,n&&D[pe]&&"style"!==M.attributeName&&(q=R.call(D,M.attributeName))!==M.oldValue&&D[pe](M.attributeName,M.oldValue,q))})}(Ve(Le),Ve(me)),(ie=function(p){return Ge.observe(p,{childList:!0,subtree:!0}),p})(A),Z&&(P.attachShadow=function(){return ie(Z.apply(this,arguments))})):(Ue=[],A[be]("DOMNodeInserted",et(Le)),A[be]("DOMNodeRemoved",et(me))),A[be](bt,he),A[be]("readystatechange",he),A.importNode=function(p,y){switch(p.nodeType){case 1:return Ze(A,j,[p,!!y]);case 11:for(var _=A.createDocumentFragment(),g=p.childNodes,M=g.length,D=0;D<M;D++)_.appendChild(A.importNode(g[D],!!y));return _;default:return z.call(p,!!y)}},P.cloneNode=function(p){return Ze(this,z,[!!p])}),W)return W=!1;if(-2<Ee.call(He,st+i)+Ee.call(He,qe+i)&&U(e),!Mt.test(i)||-1<Ee.call(wt,i))throw new Error("The type "+e+" is invalid");var i,h,s=function(){return l?A.createElement(d,i):A.createElement(d)},o=r||it,l=Pe.call(o,te),d=l?r[te].toUpperCase():i;return l&&-1<Ee.call(He,qe+d)&&U(d),h=He.push((l?st:qe)+i)-1,le=le.concat(le.length?",":"",l?d+'[is="'+e.toLowerCase()+'"]':d),s.prototype=We[h]=Pe.call(o,"prototype")?o.prototype:w(P),le.length&&ye(A.querySelectorAll(le),Le),s},A.createElement=O=function(e,r){var i=yt(r),h=i?N.call(A,e,C(i)):N.call(A,e),s=""+e,o=Ee.call(He,(i?st:qe)+(i||s).toUpperCase()),l=-1<o;return i&&(h.setAttribute("is",i=i.toLowerCase()),l&&(l=Je(s.toUpperCase(),i))),n=!A.createElement.innerHTMLHelper,l&&ae(h,We[o]),h}),addEventListener("beforeunload",function(){delete A.createElement,delete A.importNode,delete A[se]},!1),ke.prototype={constructor:ke,define:t?function(e,r,i){if(i)J(e,r,i);else{var h=e.toUpperCase();m[h]={constructor:r,create:[h]},v.set(r,h),Me.define(e,r)}}:J,get:t?function(e){return Me.get(e)||gt(e)}:gt,whenDefined:t?function(e){return c.race([Me.whenDefined(e),ut(e)])}:ut},!Me||/^force/.test(oe.type))ft();else if(!oe.noBuiltIn)try{!function(e,r,i){var h=new RegExp("^<a\\s+is=('|\")"+i+"\\1></a>$");if(r[te]="a",(e.prototype=w(S.prototype)).constructor=e,X.customElements.define(i,e,r),!h.test(A.createElement("a",{is:i}).outerHTML)||!h.test((new e).outerHTML))throw r}(function e(){return Reflect.construct(S,[],e)},{},"document-register-element-a"+dt)}catch(e){ft()}if(!oe.noBuiltIn)try{if(N.call(A,"a","a").outerHTML.indexOf("is")<0)throw{}}catch(e){C=function(r){return{is:r.toLowerCase()}}}}(window)},583:()=>{"use strict";!function(t){const a=t.performance;function u(I){a&&a.mark&&a.mark(I)}function c(I,k){a&&a.measure&&a.measure(I,k)}u("Zone");const f=t.__Zone_symbol_prefix||"__zone_symbol__";function m(I){return f+I}const E=!0===t[m("forceDuplicateZoneCheck")];if(t.Zone){if(E||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let v=(()=>{class I{constructor(n,e){this._parent=n,this._name=e?e.name||"unnamed":"<root>",this._properties=e&&e.properties||{},this._zoneDelegate=new w(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==re.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=I.current;for(;n.parent;)n=n.parent;return n}static get current(){return F.zone}static get currentTask(){return ue}static __load_patch(n,e,r=!1){if(re.hasOwnProperty(n)){if(!r&&E)throw Error("Already loaded patch: "+n)}else if(!t["__Zone_disable_"+n]){const i="Zone:"+n;u(i),re[n]=e(t,I,Te),c(i,i)}}get parent(){return this._parent}get name(){return this._name}get(n){const e=this.getZoneWith(n);if(e)return e._properties[n]}getZoneWith(n){let e=this;for(;e;){if(e._properties.hasOwnProperty(n))return e;e=e._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,e){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const r=this._zoneDelegate.intercept(this,n,e),i=this;return function(){return i.runGuarded(r,this,arguments,e)}}run(n,e,r,i){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,n,e,r,i)}finally{F=F.parent}}runGuarded(n,e=null,r,i){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,n,e,r,i)}catch(h){if(this._zoneDelegate.handleError(this,h))throw h}}finally{F=F.parent}}runTask(n,e,r){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");if(n.state===B&&(n.type===O||n.type===j))return;const i=n.state!=Q;i&&n._transitionTo(Q,R),n.runCount++;const h=ue;ue=n,F={parent:F,zone:this};try{n.type==j&&n.data&&!n.data.isPeriodic&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,n,e,r)}catch(s){if(this._zoneDelegate.handleError(this,s))throw s}}finally{n.state!==B&&n.state!==K&&(n.type==O||n.data&&n.data.isPeriodic?i&&n._transitionTo(R,Q):(n.runCount=0,this._updateTaskCount(n,-1),i&&n._transitionTo(B,Q,B))),F=F.parent,ue=h}}scheduleTask(n){if(n.zone&&n.zone!==this){let r=this;for(;r;){if(r===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);r=r.parent}}n._transitionTo($,B);const e=[];n._zoneDelegates=e,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(r){throw n._transitionTo(K,$,B),this._zoneDelegate.handleError(this,r),r}return n._zoneDelegates===e&&this._updateTaskCount(n,1),n.state==$&&n._transitionTo(R,$),n}scheduleMicroTask(n,e,r,i){return this.scheduleTask(new b(N,n,e,r,i,void 0))}scheduleMacroTask(n,e,r,i,h){return this.scheduleTask(new b(j,n,e,r,i,h))}scheduleEventTask(n,e,r,i,h){return this.scheduleTask(new b(O,n,e,r,i,h))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");n._transitionTo(V,R,Q);try{this._zoneDelegate.cancelTask(this,n)}catch(e){throw n._transitionTo(K,V),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(n,-1),n._transitionTo(B,V),n.runCount=0,n}_updateTaskCount(n,e){const r=n._zoneDelegates;-1==e&&(n._zoneDelegates=null);for(let i=0;i<r.length;i++)r[i]._updateTaskCount(n.type,e)}}return I.__symbol__=m,I})();const C={name:"",onHasTask:(I,k,n,e)=>I.hasTask(n,e),onScheduleTask:(I,k,n,e)=>I.scheduleTask(n,e),onInvokeTask:(I,k,n,e,r,i)=>I.invokeTask(n,e,r,i),onCancelTask:(I,k,n,e)=>I.cancelTask(n,e)};class w{constructor(k,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=k,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._forkCurrZone=e&&(e.onFork?this.zone:n._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=e&&e.onHasTask;(r||n&&n._hasTaskZS)&&(this._hasTaskZS=r?e:C,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=k,e.onScheduleTask||(this._scheduleTaskZS=C,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),e.onInvokeTask||(this._invokeTaskZS=C,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),e.onCancelTask||(this._cancelTaskZS=C,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}fork(k,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,k,n):new v(k,n)}intercept(k,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,k,n,e):n}invoke(k,n,e,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,k,n,e,r,i):n.apply(e,r)}handleError(k,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,k,n)}scheduleTask(k,n){let e=n;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,k,n),e||(e=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=N)throw new Error("Task is missing scheduleFn.");T(n)}return e}invokeTask(k,n,e,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,k,n,e,r):n.callback.apply(e,r)}cancelTask(k,n){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,k,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");e=n.cancelFn(n)}return e}hasTask(k,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,k,n)}catch(e){this.handleError(k,e)}}_updateTaskCount(k,n){const e=this._taskCounts,r=e[k],i=e[k]=r+n;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:k})}}class b{constructor(k,n,e,r,i,h){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=k,this.source=n,this.data=r,this.scheduleFn=i,this.cancelFn=h,!e)throw new Error("callback is not defined");this.callback=e;const s=this;this.invoke=k===O&&r&&r.useG?b.invokeTask:function(){return b.invokeTask.call(t,s,this,arguments)}}static invokeTask(k,n,e){k||(k=this),fe++;try{return k.runCount++,k.zone.runTask(k,n,e)}finally{1==fe&&Z(),fe--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(B,$)}_transitionTo(k,n,e){if(this._state!==n&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${k}', expecting state '${n}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=k,k==B&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const H=m("setTimeout"),S=m("Promise"),P=m("then");let L,G=[],x=!1;function T(I){if(0===fe&&0===G.length)if(L||t[S]&&(L=t[S].resolve(0)),L){let k=L[P];k||(k=L.then),k.call(L,Z)}else t[H](Z,0);I&&G.push(I)}function Z(){if(!x){for(x=!0;G.length;){const I=G;G=[];for(let k=0;k<I.length;k++){const n=I[k];try{n.zone.runTask(n,null,null)}catch(e){Te.onUnhandledError(e)}}}Te.microtaskDrainDone(),x=!1}}const z={name:"NO ZONE"},B="notScheduled",$="scheduling",R="scheduled",Q="running",V="canceling",K="unknown",N="microTask",j="macroTask",O="eventTask",re={},Te={symbol:m,currentZoneFrame:()=>F,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:T,showUncaughtError:()=>!v[m("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W};let F={parent:null,zone:new v(null,null)},ue=null,fe=0;function W(){}c("Zone","Zone"),t.Zone=v}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);const oe=Object.getOwnPropertyDescriptor,ge=Object.defineProperty,ye=Object.getPrototypeOf,_t=Object.create,Ve=Array.prototype.slice,Ie="addEventListener",Je="removeEventListener",Qe=Zone.__symbol__(Ie),et=Zone.__symbol__(Je),he="true",ve="false",Ze=Zone.__symbol__("");function Fe(t,a){return Zone.current.wrap(t,a)}function lt(t,a,u,c,f){return Zone.current.scheduleMacroTask(t,a,u,c,f)}const U=Zone.__symbol__,Ae="undefined"!=typeof window,ke=Ae?window:void 0,J=Ae&&ke||"object"==typeof self&&self||global,yt=[null];function tt(t,a){for(let u=t.length-1;u>=0;u--)"function"==typeof t[u]&&(t[u]=Fe(t[u],a+"_"+u));return t}function ft(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const A="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,ne=!("nw"in J)&&void 0!==J.process&&"[object process]"==={}.toString.call(J.process),ht=!ne&&!A&&!(!Ae||!ke.HTMLElement),Ue=void 0!==J.process&&"[object process]"==={}.toString.call(J.process)&&!A&&!(!Ae||!ke.HTMLElement),je={},Be=function(t){if(!(t=t||J.event))return;let a=je[t.type];a||(a=je[t.type]=U("ON_PROPERTY"+t.type));const u=this||t.target||J,c=u[a];let f;if(ht&&u===ke&&"error"===t.type){const m=t;f=c&&c.call(this,m.message,m.filename,m.lineno,m.colno,m.error),!0===f&&t.preventDefault()}else f=c&&c.apply(this,arguments),null!=f&&!f&&t.preventDefault();return f};function nt(t,a,u){let c=oe(t,a);if(!c&&u&&oe(u,a)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const f=U("on"+a+"patched");if(t.hasOwnProperty(f)&&t[f])return;delete c.writable,delete c.value;const m=c.get,E=c.set,v=a.substr(2);let C=je[v];C||(C=je[v]=U("ON_PROPERTY"+v)),c.set=function(w){let b=this;!b&&t===J&&(b=J),b&&(b[C]&&b.removeEventListener(v,Be),E&&E.apply(b,yt),"function"==typeof w?(b[C]=w,b.addEventListener(v,Be,!1)):b[C]=null)},c.get=function(){let w=this;if(!w&&t===J&&(w=J),!w)return null;const b=w[C];if(b)return b;if(m){let H=m&&m.call(this);if(H)return c.set.call(this,H),"function"==typeof w.removeAttribute&&w.removeAttribute(a),H}return null},ge(t,a,c),t[f]=!0}function Ge(t,a,u){if(a)for(let c=0;c<a.length;c++)nt(t,"on"+a[c],u);else{const c=[];for(const f in t)"on"==f.substr(0,2)&&c.push(f);for(let f=0;f<c.length;f++)nt(t,c[f],u)}}const ie=U("originalInstance");function we(t){const a=J[t];if(!a)return;J[U(t)]=a,J[t]=function(){const f=tt(arguments,t);switch(f.length){case 0:this[ie]=new a;break;case 1:this[ie]=new a(f[0]);break;case 2:this[ie]=new a(f[0],f[1]);break;case 3:this[ie]=new a(f[0],f[1],f[2]);break;case 4:this[ie]=new a(f[0],f[1],f[2],f[3]);break;default:throw new Error("Arg list too long.")}},se(J[t],a);const u=new a(function(){});let c;for(c in u)"XMLHttpRequest"===t&&"responseBlob"===c||function(f){"function"==typeof u[f]?J[t].prototype[f]=function(){return this[ie][f].apply(this[ie],arguments)}:ge(J[t].prototype,f,{set:function(m){"function"==typeof m?(this[ie][f]=Fe(m,t+"."+f),se(this[ie][f],m)):this[ie][f]=m},get:function(){return this[ie][f]}})}(c);for(c in a)"prototype"!==c&&a.hasOwnProperty(c)&&(J[t][c]=a[c])}function ae(t,a,u){let c=t;for(;c&&!c.hasOwnProperty(a);)c=ye(c);!c&&t[a]&&(c=t);const f=U(a);let m=null;if(c&&(!(m=c[f])||!c.hasOwnProperty(f))&&(m=c[f]=c[a],ft(c&&oe(c,a)))){const v=u(m,f,a);c[a]=function(){return v(this,arguments)},se(c[a],m)}return m}function Ce(t,a,u){let c=null;function f(m){const E=m.data;return E.args[E.cbIdx]=function(){m.invoke.apply(this,arguments)},c.apply(E.target,E.args),m}c=ae(t,a,m=>function(E,v){const C=u(E,v);return C.cbIdx>=0&&"function"==typeof v[C.cbIdx]?lt(C.name,v[C.cbIdx],C,f):m.apply(E,v)})}function se(t,a){t[U("OriginalDelegate")]=a}let dt=!1,de=!1;function Le(){if(dt)return de;dt=!0;try{const t=ke.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(de=!0)}catch(t){}return de}Zone.__load_patch("ZoneAwarePromise",(t,a,u)=>{const c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,E=u.symbol,v=[],C=!0===t[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],w=E("Promise"),b=E("then");u.onUnhandledError=s=>{if(u.showUncaughtError()){const o=s&&s.rejection;o?console.error("Unhandled Promise rejection:",o instanceof Error?o.message:o,"; Zone:",s.zone.name,"; Task:",s.task&&s.task.source,"; Value:",o,o instanceof Error?o.stack:void 0):console.error(s)}},u.microtaskDrainDone=()=>{for(;v.length;){const s=v.shift();try{s.zone.runGuarded(()=>{throw s.throwOriginal?s.rejection:s})}catch(o){P(o)}}};const S=E("unhandledPromiseRejectionHandler");function P(s){u.onUnhandledError(s);try{const o=a[S];"function"==typeof o&&o.call(this,s)}catch(o){}}function G(s){return s&&s.then}function x(s){return s}function L(s){return n.reject(s)}const T=E("state"),Z=E("value"),z=E("finally"),B=E("parentPromiseValue"),$=E("parentPromiseState"),Q=null,V=!0,K=!1;function j(s,o){return l=>{try{F(s,o,l)}catch(d){F(s,!1,d)}}}const Te=E("currentTaskTrace");function F(s,o,l){const d=function(){let s=!1;return function(l){return function(){s||(s=!0,l.apply(null,arguments))}}}();if(s===l)throw new TypeError("Promise resolved with itself");if(s[T]===Q){let p=null;try{("object"==typeof l||"function"==typeof l)&&(p=l&&l.then)}catch(y){return d(()=>{F(s,!1,y)})(),s}if(o!==K&&l instanceof n&&l.hasOwnProperty(T)&&l.hasOwnProperty(Z)&&l[T]!==Q)fe(l),F(s,l[T],l[Z]);else if(o!==K&&"function"==typeof p)try{p.call(l,d(j(s,o)),d(j(s,!1)))}catch(y){d(()=>{F(s,!1,y)})()}else{s[T]=o;const y=s[Z];if(s[Z]=l,s[z]===z&&o===V&&(s[T]=s[$],s[Z]=s[B]),o===K&&l instanceof Error){const _=a.currentTask&&a.currentTask.data&&a.currentTask.data.__creationTrace__;_&&f(l,Te,{configurable:!0,enumerable:!1,writable:!0,value:_})}for(let _=0;_<y.length;)W(s,y[_++],y[_++],y[_++],y[_++]);if(0==y.length&&o==K){s[T]=0;let _=l;try{throw new Error("Uncaught (in promise): "+function m(s){return s&&s.toString===Object.prototype.toString?(s.constructor&&s.constructor.name||"")+": "+JSON.stringify(s):s?s.toString():Object.prototype.toString.call(s)}(l)+(l&&l.stack?"\n"+l.stack:""))}catch(g){_=g}C&&(_.throwOriginal=!0),_.rejection=l,_.promise=s,_.zone=a.current,_.task=a.currentTask,v.push(_),u.scheduleMicroTask()}}}return s}const ue=E("rejectionHandledHandler");function fe(s){if(0===s[T]){try{const o=a[ue];o&&"function"==typeof o&&o.call(this,{rejection:s[Z],promise:s})}catch(o){}s[T]=K;for(let o=0;o<v.length;o++)s===v[o].promise&&v.splice(o,1)}}function W(s,o,l,d,p){fe(s);const y=s[T],_=y?"function"==typeof d?d:x:"function"==typeof p?p:L;o.scheduleMicroTask("Promise.then",()=>{try{const g=s[Z],M=!!l&&z===l[z];M&&(l[B]=g,l[$]=y);const D=o.run(_,void 0,M&&_!==L&&_!==x?[]:[g]);F(l,!0,D)}catch(g){F(l,!1,g)}},l)}const k=function(){};class n{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(o){return F(new this(null),V,o)}static reject(o){return F(new this(null),K,o)}static race(o){let l,d,p=new this((g,M)=>{l=g,d=M});function y(g){l(g)}function _(g){d(g)}for(let g of o)G(g)||(g=this.resolve(g)),g.then(y,_);return p}static all(o){return n.allWithCallback(o)}static allSettled(o){return(this&&this.prototype instanceof n?this:n).allWithCallback(o,{thenCallback:d=>({status:"fulfilled",value:d}),errorCallback:d=>({status:"rejected",reason:d})})}static allWithCallback(o,l){let d,p,y=new this((D,q)=>{d=D,p=q}),_=2,g=0;const M=[];for(let D of o){G(D)||(D=this.resolve(D));const q=g;try{D.then(ee=>{M[q]=l?l.thenCallback(ee):ee,_--,0===_&&d(M)},ee=>{l?(M[q]=l.errorCallback(ee),_--,0===_&&d(M)):p(ee)})}catch(ee){p(ee)}_++,g++}return _-=2,0===_&&d(M),y}constructor(o){const l=this;if(!(l instanceof n))throw new Error("Must be an instanceof Promise.");l[T]=Q,l[Z]=[];try{o&&o(j(l,V),j(l,K))}catch(d){F(l,!1,d)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return n}then(o,l){let d=this.constructor[Symbol.species];(!d||"function"!=typeof d)&&(d=this.constructor||n);const p=new d(k),y=a.current;return this[T]==Q?this[Z].push(y,p,o,l):W(this,y,p,o,l),p}catch(o){return this.then(null,o)}finally(o){let l=this.constructor[Symbol.species];(!l||"function"!=typeof l)&&(l=n);const d=new l(k);d[z]=z;const p=a.current;return this[T]==Q?this[Z].push(p,d,o,o):W(this,p,d,o,o),d}}n.resolve=n.resolve,n.reject=n.reject,n.race=n.race,n.all=n.all;const e=t[w]=t.Promise;t.Promise=n;const r=E("thenPatched");function i(s){const o=s.prototype,l=c(o,"then");if(l&&(!1===l.writable||!l.configurable))return;const d=o.then;o[b]=d,s.prototype.then=function(p,y){return new n((g,M)=>{d.call(this,g,M)}).then(p,y)},s[r]=!0}return u.patchThen=i,e&&(i(e),ae(t,"fetch",s=>function h(s){return function(o,l){let d=s.apply(o,l);if(d instanceof n)return d;let p=d.constructor;return p[r]||i(p),d}}(s))),Promise[a.__symbol__("uncaughtPromiseErrors")]=v,n}),Zone.__load_patch("toString",t=>{const a=Function.prototype.toString,u=U("OriginalDelegate"),c=U("Promise"),f=U("Error"),m=function(){if("function"==typeof this){const w=this[u];if(w)return"function"==typeof w?a.call(w):Object.prototype.toString.call(w);if(this===Promise){const b=t[c];if(b)return a.call(b)}if(this===Error){const b=t[f];if(b)return a.call(b)}}return a.call(this)};m[u]=a,Function.prototype.toString=m;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ce=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){ce=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){ce=!1}const me={useG:!0},te={},pe={},vt=new RegExp("^"+Ze+"(\\w+)(true|false)$"),rt=U("propagationStopped");function mt(t,a){const u=(a?a(t):t)+ve,c=(a?a(t):t)+he,f=Ze+u,m=Ze+c;te[t]={},te[t][ve]=f,te[t][he]=m}function ze(t,a,u){const c=u&&u.add||Ie,f=u&&u.rm||Je,m=u&&u.listeners||"eventListeners",E=u&&u.rmAll||"removeAllListeners",v=U(c),C="."+c+":",H=function(L,T,Z){if(L.isRemoved)return;const z=L.callback;"object"==typeof z&&z.handleEvent&&(L.callback=$=>z.handleEvent($),L.originalDelegate=z),L.invoke(L,T,[Z]);const B=L.options;B&&"object"==typeof B&&B.once&&T[f].call(T,Z.type,L.originalDelegate?L.originalDelegate:L.callback,B)},S=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][ve]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;B<z.length&&(!L||!0!==L[rt]);B++)H(z[B],T,L)}},P=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][he]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;B<z.length&&(!L||!0!==L[rt]);B++)H(z[B],T,L)}};function G(L,T){if(!L)return!1;let Z=!0;T&&void 0!==T.useG&&(Z=T.useG);const z=T&&T.vh;let B=!0;T&&void 0!==T.chkDup&&(B=T.chkDup);let $=!1;T&&void 0!==T.rt&&($=T.rt);let R=L;for(;R&&!R.hasOwnProperty(c);)R=ye(R);if(!R&&L[c]&&(R=L),!R||R[v])return!1;const Q=T&&T.eventNameToString,V={},K=R[v]=R[c],N=R[U(f)]=R[f],j=R[U(m)]=R[m],O=R[U(E)]=R[E];let re;function Te(o,l){return!ce&&"object"==typeof o&&o?!!o.capture:ce&&l?"boolean"==typeof o?{capture:o,passive:!0}:o?"object"==typeof o&&!1!==o.passive?Object.assign(Object.assign({},o),{passive:!0}):o:{passive:!0}:o}T&&T.prepend&&(re=R[U(T.prepend)]=R[T.prepend]);const k=Z?function(o){if(!V.isExisting)return K.call(V.target,V.eventName,V.capture?P:S,V.options)}:function(o){return K.call(V.target,V.eventName,o.invoke,V.options)},n=Z?function(o){if(!o.isRemoved){const l=te[o.eventName];let d;l&&(d=l[o.capture?he:ve]);const p=d&&o.target[d];if(p)for(let y=0;y<p.length;y++)if(p[y]===o){p.splice(y,1),o.isRemoved=!0,0===p.length&&(o.allRemoved=!0,o.target[d]=null);break}}if(o.allRemoved)return N.call(o.target,o.eventName,o.capture?P:S,o.options)}:function(o){return N.call(o.target,o.eventName,o.invoke,o.options)},r=T&&T.diff?T.diff:function(o,l){const d=typeof l;return"function"===d&&o.callback===l||"object"===d&&o.originalDelegate===l},i=Zone[U("UNPATCHED_EVENTS")],h=t[U("PASSIVE_EVENTS")],s=function(o,l,d,p,y=!1,_=!1){return function(){const g=this||t;let M=arguments[0];T&&T.transferEventName&&(M=T.transferEventName(M));let D=arguments[1];if(!D)return o.apply(this,arguments);if(ne&&"uncaughtException"===M)return o.apply(this,arguments);let q=!1;if("function"!=typeof D){if(!D.handleEvent)return o.apply(this,arguments);q=!0}if(z&&!z(o,D,g,arguments))return;const ee=ce&&!!h&&-1!==h.indexOf(M),_e=Te(arguments[2],ee);if(i)for(let Ke=0;Ke<i.length;Ke++)if(M===i[Ke])return ee?o.call(g,M,D,_e):o.apply(this,arguments);const Nt=!!_e&&("boolean"==typeof _e||_e.capture),Ht=!(!_e||"object"!=typeof _e)&&_e.once,Zt=Zone.current;let Ot=te[M];Ot||(mt(M,Q),Ot=te[M]);const Dt=Ot[Nt?he:ve];let Lt,ct=g[Dt],Rt=!1;if(ct){if(Rt=!0,B)for(let Ke=0;Ke<ct.length;Ke++)if(r(ct[Ke],D))return}else ct=g[Dt]=[];const St=g.constructor.name,It=pe[St];It&&(Lt=It[M]),Lt||(Lt=St+l+(Q?Q(M):M)),V.options=_e,Ht&&(V.options.once=!1),V.target=g,V.capture=Nt,V.eventName=M,V.isExisting=Rt;const Tt=Z?me:void 0;Tt&&(Tt.taskData=V);const xe=Zt.scheduleEventTask(Lt,D,Tt,d,p);return V.target=null,Tt&&(Tt.taskData=null),Ht&&(_e.once=!0),!ce&&"boolean"==typeof xe.options||(xe.options=_e),xe.target=g,xe.capture=Nt,xe.eventName=M,q&&(xe.originalDelegate=D),_?ct.unshift(xe):ct.push(xe),y?g:void 0}};return R[c]=s(K,C,k,n,$),re&&(R.prependListener=s(re,".prependListener:",function(o){return re.call(V.target,V.eventName,o.invoke,V.options)},n,$,!0)),R[f]=function(){const o=this||t;let l=arguments[0];T&&T.transferEventName&&(l=T.transferEventName(l));const d=arguments[2],p=!!d&&("boolean"==typeof d||d.capture),y=arguments[1];if(!y)return N.apply(this,arguments);if(z&&!z(N,y,o,arguments))return;const _=te[l];let g;_&&(g=_[p?he:ve]);const M=g&&o[g];if(M)for(let D=0;D<M.length;D++){const q=M[D];if(r(q,y))return M.splice(D,1),q.isRemoved=!0,0===M.length&&(q.allRemoved=!0,o[g]=null,"string"==typeof l)&&(o[Ze+"ON_PROPERTY"+l]=null),q.zone.cancelTask(q),$?o:void 0}return N.apply(this,arguments)},R[m]=function(){const o=this||t;let l=arguments[0];T&&T.transferEventName&&(l=T.transferEventName(l));const d=[],p=kt(o,Q?Q(l):l);for(let y=0;y<p.length;y++){const _=p[y];d.push(_.originalDelegate?_.originalDelegate:_.callback)}return d},R[E]=function(){const o=this||t;let l=arguments[0];if(l){T&&T.transferEventName&&(l=T.transferEventName(l));const d=te[l];if(d){const _=o[d[ve]],g=o[d[he]];if(_){const M=_.slice();for(let D=0;D<M.length;D++){const q=M[D];this[f].call(this,l,q.originalDelegate?q.originalDelegate:q.callback,q.options)}}if(g){const M=g.slice();for(let D=0;D<M.length;D++){const q=M[D];this[f].call(this,l,q.originalDelegate?q.originalDelegate:q.callback,q.options)}}}}else{const d=Object.keys(o);for(let p=0;p<d.length;p++){const _=vt.exec(d[p]);let g=_&&_[1];g&&"removeListener"!==g&&this[E].call(this,g)}this[E].call(this,"removeListener")}if($)return this},se(R[c],K),se(R[f],N),O&&se(R[E],O),j&&se(R[m],j),!0}let x=[];for(let L=0;L<a.length;L++)x[L]=G(a[L],u);return x}function kt(t,a){if(!a){const m=[];for(let E in t){const v=vt.exec(E);let C=v&&v[1];if(C&&(!a||C===a)){const w=t[E];if(w)for(let b=0;b<w.length;b++)m.push(w[b])}}return m}let u=te[a];u||(mt(a),u=te[a]);const c=t[u[ve]],f=t[u[he]];return c?f?c.concat(f):c.slice():f?f.slice():[]}function ot(t,a){const u=t.Event;u&&u.prototype&&a.patchMethod(u.prototype,"stopImmediatePropagation",c=>function(f,m){f[rt]=!0,c&&c.apply(f,m)})}function pt(t,a,u,c,f){const m=Zone.__symbol__(c);if(a[m])return;const E=a[m]=a[c];a[c]=function(v,C,w){return C&&C.prototype&&f.forEach(function(b){const H=`${u}.${c}::`+b,S=C.prototype;if(S.hasOwnProperty(b)){const P=t.ObjectGetOwnPropertyDescriptor(S,b);P&&P.value?(P.value=t.wrapWithCurrentZone(P.value,H),t._redefineProperty(C.prototype,b,P)):S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}else S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}),E.call(a,v,C,w)},t.attachOriginToPatched(a[c],E)}const Et=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],st=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],De=["blur","error","focus","load","resize","scroll","messageerror"],Ee=["bounce","finish","start"],it=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Pe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],Re=["error","message"],Ne=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Et,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function Xe(t,a,u){if(!u||0===u.length)return a;const c=u.filter(m=>m.target===t);if(!c||0===c.length)return a;const f=c[0].ignoreProperties;return a.filter(m=>-1===f.indexOf(m))}function Y(t,a,u,c){t&&Ge(t,Xe(t,a,u),c)}Zone.__load_patch("util",(t,a,u)=>{u.patchOnProperties=Ge,u.patchMethod=ae,u.bindArguments=tt,u.patchMacroTask=Ce;const c=a.__symbol__("BLACK_LISTED_EVENTS"),f=a.__symbol__("UNPATCHED_EVENTS");t[f]&&(t[c]=t[f]),t[c]&&(a[c]=a[f]=t[c]),u.patchEventPrototype=ot,u.patchEventTarget=ze,u.isIEOrEdge=Le,u.ObjectDefineProperty=ge,u.ObjectGetOwnPropertyDescriptor=oe,u.ObjectCreate=_t,u.ArraySlice=Ve,u.patchClass=we,u.wrapWithCurrentZone=Fe,u.filterProperties=Xe,u.attachOriginToPatched=se,u._redefineProperty=Object.defineProperty,u.patchCallbacks=pt,u.getGlobalObjects=()=>({globalSources:pe,zoneSymbolEventNames:te,eventNames:Ne,isBrowser:ht,isMix:Ue,isNode:ne,TRUE_STR:he,FALSE_STR:ve,ZONE_SYMBOL_PREFIX:Ze,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Je})});const Ye=U("zoneTask");function Se(t,a,u,c){let f=null,m=null;u+=c;const E={};function v(w){const b=w.data;return b.args[0]=function(){return w.invoke.apply(this,arguments)},b.handleId=f.apply(t,b.args),w}function C(w){return m.call(t,w.data.handleId)}f=ae(t,a+=c,w=>function(b,H){if("function"==typeof H[0]){const S={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?H[1]||0:void 0,args:H},P=H[0];H[0]=function(){try{return P.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete E[S.handleId]:S.handleId&&(S.handleId[Ye]=null))}};const G=lt(a,H[0],S,v,C);if(!G)return G;const x=G.data.handleId;return"number"==typeof x?E[x]=G:x&&(x[Ye]=G),x&&x.ref&&x.unref&&"function"==typeof x.ref&&"function"==typeof x.unref&&(G.ref=x.ref.bind(x),G.unref=x.unref.bind(x)),"number"==typeof x||x?x:G}return w.apply(t,H)}),m=ae(t,u,w=>function(b,H){const S=H[0];let P;"number"==typeof S?P=E[S]:(P=S&&S[Ye],P||(P=S)),P&&"string"==typeof P.type?"notScheduled"!==P.state&&(P.cancelFn&&P.data.isPeriodic||0===P.runCount)&&("number"==typeof S?delete E[S]:S&&(S[Ye]=null),P.zone.cancelTask(P)):w.apply(t,H)})}Zone.__load_patch("legacy",t=>{const a=t[Zone.__symbol__("legacyPatch")];a&&a()}),Zone.__load_patch("queueMicrotask",(t,a,u)=>{u.patchMethod(t,"queueMicrotask",c=>function(f,m){a.current.scheduleMicroTask("queueMicrotask",m[0])})}),Zone.__load_patch("timers",t=>{const a="set",u="clear";Se(t,a,u,"Timeout"),Se(t,a,u,"Interval"),Se(t,a,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Se(t,"request","cancel","AnimationFrame"),Se(t,"mozRequest","mozCancel","AnimationFrame"),Se(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,a)=>{const u=["alert","prompt","confirm"];for(let c=0;c<u.length;c++)ae(t,u[c],(m,E,v)=>function(C,w){return a.current.run(m,t,w,v)})}),Zone.__load_patch("EventTarget",(t,a,u)=>{(function Me(t,a){a.patchEventPrototype(t,a)})(t,u),function $e(t,a){if(Zone[a.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:f,FALSE_STR:m,ZONE_SYMBOL_PREFIX:E}=a.getGlobalObjects();for(let C=0;C<u.length;C++){const w=u[C],S=E+(w+m),P=E+(w+f);c[w]={},c[w][m]=S,c[w][f]=P}const v=t.EventTarget;v&&v.prototype&&a.patchEventTarget(t,[v&&v.prototype])}(t,u);const c=t.XMLHttpRequestEventTarget;c&&c.prototype&&u.patchEventTarget(t,[c.prototype])}),Zone.__load_patch("MutationObserver",(t,a,u)=>{we("MutationObserver"),we("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,a,u)=>{we("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,a,u)=>{we("FileReader")}),Zone.__load_patch("on_property",(t,a,u)=>{!function Ct(t,a){if(ne&&!Ue||Zone[t.symbol("patchEvents")])return;const u="undefined"!=typeof WebSocket,c=a.__Zone_ignore_on_properties;if(ht){const E=window,v=function be(){try{const t=ke.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}()?[{target:E,ignoreProperties:["error"]}]:[];Y(E,Ne.concat(["messageerror"]),c&&c.concat(v),ye(E)),Y(Document.prototype,Ne,c),void 0!==E.SVGElement&&Y(E.SVGElement.prototype,Ne,c),Y(Element.prototype,Ne,c),Y(HTMLElement.prototype,Ne,c),Y(HTMLMediaElement.prototype,st,c),Y(HTMLFrameSetElement.prototype,Et.concat(De),c),Y(HTMLBodyElement.prototype,Et.concat(De),c),Y(HTMLFrameElement.prototype,le,c),Y(HTMLIFrameElement.prototype,le,c);const C=E.HTMLMarqueeElement;C&&Y(C.prototype,Ee,c);const w=E.Worker;w&&Y(w.prototype,Re,c)}const f=a.XMLHttpRequest;f&&Y(f.prototype,it,c);const m=a.XMLHttpRequestEventTarget;m&&Y(m&&m.prototype,it,c),"undefined"!=typeof IDBIndex&&(Y(IDBIndex.prototype,Pe,c),Y(IDBRequest.prototype,Pe,c),Y(IDBOpenDBRequest.prototype,Pe,c),Y(IDBDatabase.prototype,Pe,c),Y(IDBTransaction.prototype,Pe,c),Y(IDBCursor.prototype,Pe,c)),u&&Y(WebSocket.prototype,at,c)}(u,t)}),Zone.__load_patch("customElements",(t,a,u)=>{!function Pt(t,a){const{isBrowser:u,isMix:c}=a.getGlobalObjects();(u||c)&&t.customElements&&"customElements"in t&&a.patchCallbacks(a,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,u)}),Zone.__load_patch("XHR",(t,a)=>{!function C(w){const b=w.XMLHttpRequest;if(!b)return;const H=b.prototype;let P=H[Qe],G=H[et];if(!P){const N=w.XMLHttpRequestEventTarget;if(N){const j=N.prototype;P=j[Qe],G=j[et]}}const x="readystatechange",L="scheduled";function T(N){const j=N.data,O=j.target;O[m]=!1,O[v]=!1;const re=O[f];P||(P=O[Qe],G=O[et]),re&&G.call(O,x,re);const Te=O[f]=()=>{if(O.readyState===O.DONE)if(!j.aborted&&O[m]&&N.state===L){const ue=O[a.__symbol__("loadfalse")];if(0!==O.status&&ue&&ue.length>0){const fe=N.invoke;N.invoke=function(){const W=O[a.__symbol__("loadfalse")];for(let I=0;I<W.length;I++)W[I]===N&&W.splice(I,1);!j.aborted&&N.state===L&&fe.call(N)},ue.push(N)}else N.invoke()}else!j.aborted&&!1===O[m]&&(O[v]=!0)};return P.call(O,x,Te),O[u]||(O[u]=N),V.apply(O,j.args),O[m]=!0,N}function Z(){}function z(N){const j=N.data;return j.aborted=!0,K.apply(j.target,j.args)}const B=ae(H,"open",()=>function(N,j){return N[c]=0==j[2],N[E]=j[1],B.apply(N,j)}),R=U("fetchTaskAborting"),Q=U("fetchTaskScheduling"),V=ae(H,"send",()=>function(N,j){if(!0===a.current[Q]||N[c])return V.apply(N,j);{const O={target:N,url:N[E],isPeriodic:!1,args:j,aborted:!1},re=lt("XMLHttpRequest.send",Z,O,T,z);N&&!0===N[v]&&!O.aborted&&re.state===L&&re.invoke()}}),K=ae(H,"abort",()=>function(N,j){const O=function S(N){return N[u]}(N);if(O&&"string"==typeof O.type){if(null==O.cancelFn||O.data&&O.data.aborted)return;O.zone.cancelTask(O)}else if(!0===a.current[R])return K.apply(N,j)})}(t);const u=U("xhrTask"),c=U("xhrSync"),f=U("xhrListener"),m=U("xhrScheduled"),E=U("xhrURL"),v=U("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function ut(t,a){const u=t.constructor.name;for(let c=0;c<a.length;c++){const f=a[c],m=t[f];if(m){if(!ft(oe(t,f)))continue;t[f]=(v=>{const C=function(){return v.apply(this,tt(arguments,u+"."+f))};return se(C,v),C})(m)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,a)=>{function u(c){return function(f){kt(t,c).forEach(E=>{const v=t.PromiseRejectionEvent;if(v){const C=new v(c,{promise:f.promise,reason:f.rejection});E.invoke(C)}})}}t.PromiseRejectionEvent&&(a[U("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),a[U("rejectionHandledHandler")]=u("rejectionhandled"))})}},X=>{X(X.s=435)}]);
(()=>{"use strict";var e,_={},b={};function n(e){var a=b[e];if(void 0!==a)return a.exports;var r=b[e]={exports:{}};return _[e](r,r.exports,n),r.exports}n.m=_,e=[],n.O=(a,r,u,t)=>{if(!r){var o=1/0;for(l=0;l<e.length;l++){for(var[r,u,t]=e[l],c=!0,f=0;f<r.length;f++)(!1&t||o>=t)&&Object.keys(n.O).every(i=>n.O[i](r[f]))?r.splice(f--,1):(c=!1,t<o&&(o=t));if(c){e.splice(l--,1);var s=u();void 0!==s&&(a=s)}}return a}t=t||0;for(var l=e.length;l>0&&e[l-1][2]>t;l--)e[l]=e[l-1];e[l]=[r,u,t]},n.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return n.d(a,{a}),a},n.d=(e,a)=>{for(var r in a)n.o(a,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},n.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={666:0};n.O.j=u=>0===e[u];var a=(u,t)=>{var f,s,[l,o,c]=t,v=0;if(l.some(h=>0!==e[h])){for(f in o)n.o(o,f)&&(n.m[f]=o[f]);if(c)var d=c(n)}for(u&&u(t);v<l.length;v++)n.o(e,s=l[v])&&e[s]&&e[s][0](),e[s]=0;return n.O(d)},r=self.webpackChunkHotsAngularElements=self.webpackChunkHotsAngularElements||[];r.forEach(a.bind(null,0)),r.push=a.bind(null,r.push.bind(r))})()})();
