!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,()=>{s=!1,e.apply(i,a)}))}}function i(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i)=>"right"===t?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.duration;e.listeners[n].forEach(n=>n({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,()=>{e._update(),e._request=null,e._running&&e._refresh()}))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete"),n.initial=!1),i+=s.length}),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const r={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},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){return t+.5|0}const f=(t,e,i)=>Math.max(Math.min(t,i),e);function g(t){return f(u(2.55*t),0,255)}function p(t){return f(u(255*t),0,255)}function m(t){return f(u(t/2.55)/100,0,1)}function x(t){return f(u(100*t),0,100)}const b=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,_=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function v(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function w(t,e,i){const n=y(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function M(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i<n?6:0):o===i?(n-e)/c+2:(e-i)/c+4,r=60*r+.5),[0|r,l||0,a]}function k(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(p)}function S(t,e,i){return k(y,t,e,i)}function P(t){return(t%360+360)%360}const D={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"},C={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 O;function T(t,e,i){if(t){let n=M(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=S(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function A(t,e){return t?Object.assign(e||{},t):t}function L(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=p(t[3]))):(e=A(t,{r:0,g:0,b:0,a:1})).a=p(e.a),e}class R{constructor(t){if(t instanceof R)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=L(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||function(t){O||(O=function(){const t={},e=Object.keys(C),i=Object.keys(D);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,D[s]);s=parseInt(C[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),O.transparent=[0,0,0,0]);const e=O[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||function(t){return"r"===t.charAt(0)?function(t){const e=b.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?g(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?g(i):i),n=255&(e[4]?g(n):n),o=255&(e[6]?g(o):o),{r:i,g:n,b:o,a:s}}}(t):function(t){const e=_.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?g(+e[5]):p(+e[5]));const o=P(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return k(w,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return k(v,t,e,i)}(o,s,a):S(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}(t)}(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=A(this._rgb);return t&&(t.a=m(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${m(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?function(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=M(t),i=e[0],n=x(e[1]),o=x(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${m(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new R(this.rgb)}alpha(t){return this._rgb.a=p(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=u(.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 T(this._rgb,2,t),this}darken(t){return T(this._rgb,2,-t),this}saturate(t){return T(this._rgb,1,t),this}desaturate(t){return T(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=M(t);i[0]=P(i[0]+e),i=S(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function E(t){return new R(t)}const I=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function z(t){return I(t)?t:E(t)}function F(t){return I(t)?t:E(t).saturate(.5).darken(.1).hexString()}function V(){}const B=function(){let t=0;return function(){return t++}}();function W(t){return null==t}function H(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function N(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const j=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function $(t,e){return j(t)?t:e}function Y(t,e){return void 0===t?e:t}const U=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,X=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function K(t,e,i,n){let o,s,a;if(H(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(N(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function G(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function Z(t){if(H(t))return t.map(Z);if(N(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=Z(t[i[o]]);return e}return t}function Q(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function J(t,e,i,n){if(!Q(t))return;const o=e[t],s=i[t];N(o)&&N(s)?tt(o,s,n):e[t]=Z(s)}function tt(t,e,i){const n=H(e)?e:[e],o=n.length;if(!N(t))return t;const s=(i=i||{}).merger||J;for(let a=0;a<o;++a){if(!N(e=n[a]))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function et(t,e){return tt(t,e,{merger:it})}function it(t,e,i){if(!Q(t))return;const n=e[t],o=i[t];N(n)&&N(o)?et(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Z(o))}function nt(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function ot(t,e){if(""===e)return t;let i=0,n=nt(e,i);for(;t&&n>i;)t=t[e.substr(i,n-i)],i=n+1,n=nt(e,i);return t}function st(t){return t.charAt(0).toUpperCase()+t.slice(1)}const at=t=>void 0!==t,rt=t=>"function"==typeof t,lt=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ct=Object.create(null),ht=Object.create(null);function dt(t,e){if(!e)return t;const i=e.split(".");for(let n=0,o=i.length;n<o;++n){const e=i[n];t=t[e]||(t[e]=Object.create(null))}return t}function ut(t,e,i){return"string"==typeof e?tt(dt(t,e),i):tt(dt(t,""),e)}var ft=new class{constructor(t){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)=>F(e.backgroundColor),this.hoverBorderColor=(t,e)=>F(e.borderColor),this.hoverColor=(t,e)=>F(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.describe(t)}set(t,e){return ut(this,t,e)}get(t){return dt(this,t)}describe(t,e){return ut(ht,t,e)}override(t,e){return ut(ct,t,e)}route(t,e,i,n){const o=dt(this,t),s=dt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return N(t)?Object.assign({},e,t):Y(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const gt=Math.PI,pt=2*gt,mt=pt+gt,xt=Number.POSITIVE_INFINITY,bt=gt/180,_t=gt/2,yt=gt/4,vt=2*gt/3,wt=Math.log10,Mt=Math.sign;function kt(t){const e=Math.pow(10,Math.floor(wt(t))),i=t/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function St(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}function Pt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Dt(t,e,i){return Math.abs(t-e)<i}function Ct(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function Ot(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Tt(t){return t*(gt/180)}function At(t){return t*(180/gt)}function Lt(t){if(!j(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Rt(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*gt&&(s+=pt),{angle:s,distance:o}}function Et(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function It(t,e){return(t-e+mt)%pt-gt}function zt(t){return(t%pt+pt)%pt}function Ft(t,e,i,n){const o=zt(t),s=zt(e),a=zt(i),r=zt(s-o),l=zt(a-o),c=zt(o-s),h=zt(o-a);return o===s||o===a||n&&s===a||r>l&&c<h}function Vt(t,e,i){return Math.max(e,Math.min(i,t))}function Bt(t){return Vt(t,-32768,32767)}function Wt(t){return!t||W(t.size)||W(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ht(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Nt(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=i[l],null!=d&&!0!==H(d))a=Ht(t,o,s,a,d);else if(H(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||H(u)||(a=Ht(t,o,s,a,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return a}function jt(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function $t(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Yt(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*bt;if(c&&"object"==typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,pt),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=vt,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=vt,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+yt)*r,a=Math.sin(u+yt)*r,t.arc(i-s,n-a,l,u-gt,u-_t),t.arc(i+a,n-s,l,u-_t,u),t.arc(i+s,n+a,l,u,u+_t),t.arc(i-a,n+s,l,u+_t,u+gt),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=yt;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=yt;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=yt,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d)}t.fill(),e.borderWidth>0&&t.stroke()}}function Ut(t,e,i){return i=i||.5,t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Xt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function qt(t){t.restore()}function Kt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Gt(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Zt(t,e,i,n,o,s={}){const a=H(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),s.translation&&t.translate(s.translation[0],s.translation[1]),W(s.rotation)||t.rotate(s.rotation),t.font=o.string,s.color&&(t.fillStyle=s.color),s.textAlign&&(t.textAlign=s.textAlign),s.textBaseline&&(t.textBaseline=s.textBaseline),l=0;l<a.length;++l){if(c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),W(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),s.strikethrough||s.underline){const e=t.measureText(c),o=i-e.actualBoundingBoxLeft,a=i+e.actualBoundingBoxRight,r=n-e.actualBoundingBoxAscent,l=n+e.actualBoundingBoxDescent,h=s.strikethrough?(r+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}n+=o.lineHeight}t.restore()}function Qt(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-_t,gt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,gt,_t,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,_t,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-_t,!0),t.lineTo(i+a.topLeft,n)}function Jt(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const te=(t,e,i)=>Jt(t,i,n=>t[n][e]<i),ee=(t,e,i)=>Jt(t,i,n=>t[n][e]>=i);function ie(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}const ne=["push","pop","shift","splice","unshift"];function oe(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ne.forEach(e=>{const i="_onData"+st(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[i]&&t[i](...e)}),o}})}))}function se(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(ne.forEach(e=>{delete t[e]}),delete t._chartjs)}function ae(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);if(e.size===n)return t;const o=[];return e.forEach(t=>{o.push(t)}),o}function re(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function le(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const ce=t=>window.getComputedStyle(t,null);function he(t,e){return ce(t).getPropertyValue(e)}const de=["top","right","bottom","left"];function ue(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=de[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function fe(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=ce(i),s="border-box"===o.boxSizing,a=ue(o,"padding"),r=ue(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const ge=t=>Math.round(10*t)/10;function pe(t,e,i,n){const o=ce(t),s=ue(o,"margin"),a=le(o.maxWidth,t,"clientWidth")||xt,r=le(o.maxHeight,t,"clientHeight")||xt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=re(t);if(s){const t=s.getBoundingClientRect(),a=ce(s),r=ue(a,"border","width"),l=ue(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=le(a.maxWidth,s,"clientWidth"),o=le(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||xt,maxHeight:o||xt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=ue(o,"border","width"),e=ue(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=ge(Math.min(c,a,l.maxWidth)),h=ge(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ge(c/2)),{width:c,height:h}}function me(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const xe=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function be(t,e){const i=he(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function _e(t,e){return"native"in t?{x:t.x,y:t.y}:fe(t,e)}function ye(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?ee:te;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function ve(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let r=0,l=s.length;r<l;++r){const{index:t,data:i}=s[r],{lo:l,hi:c}=ye(s[r],e,a,o);for(let e=l;e<=c;++e){const o=i[e];o.skip||n(o,t,e)}}}function we(t,e,i,n){const o=[];return Ut(e,t.chartArea,t._minPadding)?(ve(t,i,e,function(t,i,s){t.inRange(e.x,e.y,n)&&o.push({element:t,datasetIndex:i,index:s})},!0),o):o}function Me(t,e,i,n,o){const s=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let a=Number.POSITIVE_INFINITY,r=[];return Ut(e,t.chartArea,t._minPadding)?(ve(t,i,e,function(i,l,c){if(n&&!i.inRange(e.x,e.y,o))return;const h=i.getCenterPoint(o);if(!Ut(h,t.chartArea,t._minPadding))return;const d=s(e,h);d<a?(r=[{element:i,datasetIndex:l,index:c}],a=d):d===a&&r.push({element:i,datasetIndex:l,index:c})}),r):r}function ke(t,e,i,n){const o=_e(e,t),s=[],a=i.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(t,e){const i=t.getSortedVisibleDatasetMetas();let n,o,s;for(let a=0,r=i.length;a<r;++a){({index:n,data:o}=i[a]);for(let t=0,i=o.length;t<i;++t)s=o[t],s.skip||e(s,n,t)}}(t,(t,e,i)=>{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)}),i.intersect&&!l?[]:s}var Se={modes:{index(t,e,i,n){const o=_e(e,t),s=i.axis||"x",a=i.intersect?we(t,o,s,n):Me(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})}),r):[]},dataset(t,e,i,n){const o=_e(e,t),s=i.axis||"xy";let a=i.intersect?we(t,o,s,n):Me(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>we(t,_e(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Me(t,_e(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",ke(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",ke(t,e,i,n))}};const Pe=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),De=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Ce(t,e){const i=(""+t).match(Pe);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Oe(t,e){const i={},n=N(e),o=n?Object.keys(e):e,s=N(t)?n?i=>Y(t[i],t[e[i]]):e=>t[e]:()=>t;for(const a of o)i[a]=+s(a)||0;return i}function Te(t){return Oe(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ae(t){return Oe(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Le(t){const e=Te(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Re(t,e){let i=Y((t=t||{}).size,(e=e||ft.font).size);"string"==typeof i&&(i=parseInt(i,10));let n=Y(t.style,e.style);n&&!(""+n).match(De)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:Y(t.family,e.family),lineHeight:Ce(Y(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:Y(t.weight,e.weight),string:""};return o.string=Wt(o),o}function Ee(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&H(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Ie(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(X(e,i)),max:n+X(e,n)}}const ze=["left","top","right","bottom"];function Fe(t,e){return t.filter(t=>t.pos===e)}function Ve(t,e){return t.filter(t=>-1===ze.indexOf(t.pos)&&t.box.axis===e)}function Be(t,e){return t.sort((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function We(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function He(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ne(t,e,i){const n=i.box,o=t.maxPadding;N(i.pos)||(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?n.height:n.width,t[i.pos]+=i.size),n.getPadding&&He(o,n.getPadding());const s=Math.max(0,e.outerWidth-We(o,t,"left","right")),a=Math.max(0,e.outerHeight-We(o,t,"top","bottom")),r=s!==t.w,l=a!==t.h;return t.w=s,t.h=a,i.horizontal?{same:r,other:l}:{same:l,other:r}}function je(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function $e(t,e,i){const n=[];let o,s,a,r,l,c;for(o=0,s=t.length,l=0;o<s;++o){a=t[o],r=a.box,r.update(a.width||e.w,a.height||e.h,je(a.horizontal,e));const{same:s,other:h}=Ne(e,i,a);l|=s&&n.length,c=c||h,r.fullSize||n.push(a)}return l&&$e(n,e,i)||c}function Ye(t,e,i){const n=i.padding;let o,s,a,r,l=e.x,c=e.y;for(o=0,s=t.length;o<s;++o)a=t[o],r=a.box,a.horizontal?(r.left=r.fullSize?n.left:e.left,r.right=r.fullSize?i.outerWidth-n.right:e.left+e.w,r.top=c,r.bottom=c+r.height,r.width=r.right-r.left,c=r.bottom):(r.left=l,r.right=l+r.width,r.top=r.fullSize?n.top:e.top,r.bottom=r.fullSize?i.outerHeight-n.right:e.top+e.h,r.height=r.bottom-r.top,l=r.right);e.x=l,e.y=c}ft.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Ue={addBox(t,e){t.boxes||(t.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)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=Le(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),r=function(t){const e=function(t){const e=[];let i,n,o;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],e.push({index:i,box:o,pos:o.position,horizontal:o.isHorizontal(),weight:o.weight});return e}(t),i=Be(e.filter(t=>t.box.fullSize),!0),n=Be(Fe(e,"left"),!0),o=Be(Fe(e,"right")),s=Be(Fe(e,"top"),!0),a=Be(Fe(e,"bottom")),r=Ve(e,"x"),l=Ve(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:Fe(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;K(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);He(u,Le(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o);!function(t,e){let i,n,o;for(i=0,n=t.length;i<n;++i)o=t[i],o.horizontal?(o.width=o.box.fullSize&&e.availableWidth,o.height=e.hBoxMaxHeight):(o.width=e.vBoxMaxWidth,o.height=o.box.fullSize&&e.availableHeight)}(l.concat(c),d),$e(r.fullSize,f,d),$e(l,f,d),$e(c,f,d)&&$e(l,f,d),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Ye(r.leftAndTop,f,d),f.x+=f.w,f.y+=f.h,Ye(r.rightAndBottom,f,d),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},K(r.chartArea,e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)})}};class Xe{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}}class qe extends Xe{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const Ke={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ge=t=>null===t||""===t,Ze=!!xe&&{passive:!0};function Qe(t,e,i){t.canvas.removeEventListener(e,i,Ze)}function Je(t,e,i){const n=t.canvas,o=n&&re(n)||n,s=new MutationObserver(t=>{const e=re(o);t.forEach(t=>{for(let n=0;n<t.addedNodes.length;n++){const s=t.addedNodes[n];s!==o&&s!==e||i(t.target)}})});return s.observe(document,{childList:!0,subtree:!0}),s}function ti(t,e,i){const n=t.canvas,o=n&&re(n);if(!o)return;const s=new MutationObserver(t=>{t.forEach(t=>{for(let e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===n){i();break}})});return s.observe(o,{childList:!0}),s}const ei=new Map;let ii=0;function ni(){const t=window.devicePixelRatio;t!==ii&&(ii=t,ei.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function oi(t,i,n){const o=t.canvas,s=o&&re(o);if(!s)return;const a=e((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()},window),r=new ResizeObserver(t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)});return r.observe(s),function(t,e){ei.size||window.addEventListener("resize",ni),ei.set(t,e)}(t,a),r}function si(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){ei.delete(t),ei.size||window.removeEventListener("resize",ni)}(t)}function ai(t,i,n){const o=t.canvas,s=e(e=>{null!==t.ctx&&n(function(t,e){const i=Ke[t.type]||t.type,{x:n,y:o}=fe(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,i){t.addEventListener(e,i,Ze)}(o,i,s),s}class ri extends Xe{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ge(o)){const e=be(t,"width");void 0!==e&&(t.width=e)}if(Ge(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=be(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach(t=>{const n=i[t];W(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e),(t.$proxies||(t.$proxies={}))[e]=({attach:Je,detach:ti,resize:oi}[e]||ai)(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:si,detach:si,resize:si}[e]||Qe)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return pe(t,e,i,n)}isAttached(t){const e=re(t);return!(!e||!re(e))}}var li=Object.freeze({__proto__:null,BasePlatform:Xe,BasicPlatform:qe,DomPlatform:ri});const ci=t=>0===t||1===t,hi=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*pt/i),di=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*pt/i)+1,ui={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*_t),easeOutSine:t=>Math.sin(t*_t),easeInOutSine:t=>-.5*(Math.cos(gt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ci(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ci(t)?t:hi(t,.075,.3),easeOutElastic:t=>ci(t)?t:di(t,.075,.3),easeInOutElastic(t){const e=.1125;return ci(t)?t:t<.5?.5*hi(2*t,e,.45):.5+.5*di(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ui.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ui.easeInBounce(2*t):.5*ui.easeOutBounce(2*t-1)+.5},fi="transparent",gi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=z(t||fi),o=n.valid&&z(e||fi);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class pi{constructor(t,e,i,n){const o=e[i];n=Ee([t.to,n,o,t.from]);const s=Ee([t.from,o,n]);this._active=!0,this._fn=t.fn||gi[t.type||typeof s],this._easing=ui[t.easing]||ui.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=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=Ee([t.to,e,o,t.from]),n._from=Ee([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][e]()}}ft.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 mi=Object.keys(ft.animation);ft.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),ft.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),ft.describe("animations",{_fallback:"animation"}),ft.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:t=>0|t}}}});class xi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!N(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!N(n))return;const o={};for(const t of mi)o[t]=n[t];(H(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,o)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let o=0;o<n.length;o++){const e=t[n[o]];e&&e.active()&&i.push(e.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new pi(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function bi(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function _i(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function yi(t,e,i,n){const o=t.keys,s="single"===n.mode;let a,r,l,c;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}c=t.values[l],j(c)&&(s||0===e||Mt(e)===Mt(c))&&(e+=c)}return e}}function vi(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function wi(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Mi(t,e,i){for(const n of e.getMatchingVisibleMetas("bar").reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function ki(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,c=a.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),d=e.length;let u;for(let f=0;f<d;++f){const t=e[f],{[l]:i,[c]:n}=t;u=(t._stacks||(t._stacks={}))[c]=wi(o,h,i),u[r]=n,u._top=Mi(u,a,!0),u._bottom=Mi(u,a,!1)}}function Si(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function Pi(t,e){const i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const n of e){const e=n._stacks;if(!e||void 0===e[i]||void 0===e[i][t.index])return;delete e[i][t.index]}}}const Di=t=>"reset"===t||"none"===t,Ci=(t,e)=>e?t:Object.assign({},t);class Oi{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,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=vi(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&Pi(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=Y(n.xAxisID,Si(e,"x")),a=i.yAxisID=Y(n.yAxisID,Si(e,"y")),r=i.rAxisID=Y(n.rAxisID,Si(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.getScaleForId(h)}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&&se(this._data,this),t._stacked&&Pi(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]),n=t._data;if(N(i))t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(i);else if(n!==i){if(n){se(n,t);const e=t._cachedMeta;Pi(e),e._parsed=[]}i&&Object.isExtensible(i)&&oe(i,t),t._syncList=[],t._data=i}}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,n=e.getDataset();let o=!1;e._dataCheck();const s=i._stacked;i._stacked=vi(i.vScale,i),i.stack!==n.stack&&(o=!0,Pi(i),i.stack=n.stack),e._resyncElements(t),(o||s!==i._stacked)&&ki(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),n=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(n,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:n,_data:o}=i,{iScale:s,_stacked:a}=n,r=s.axis;let l,c,h,d=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0,h=o;else{h=H(o[t])?i.parseArrayData(n,o,t,e):N(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||u&&c[r]<u[r];for(l=0;l<e;++l)n._parsed[l+t]=c=h[l],d&&(s()&&(d=!1),u=c);n._sorted=d}a&&ki(i,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),c=o===s,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[a]:c||o.parse(l[f],f),[r]:s.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+i,h=e[c],a[r]={x:o.parse(h[0],c),y:s.parse(h[1],c)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:o.parse(ot(u,a),d),y:s.parse(ot(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this._cachedMeta,o=e[t.axis];return yi({keys:_i(this.chart,!0),values:e._stacks[t.axis]},o,n.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,s),t.max=Math.max(t.max,s),s=yi(n,o,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this,n=i._cachedMeta,o=n._parsed,s=n._sorted&&t===n.iScale,a=o.length,r=i._getOtherScale(t),l=e&&n._stacked&&{keys:_i(i.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,f,g,p;function m(){return g=o[u],f=g[t.axis],p=g[r.axis],!j(f)||h>p||d<p}for(u=0;u<a&&(m()||(i.updateRangeFromParsed(c,t,g,l),!s));++u);if(s)for(u=a-1;u>=0;--u)if(!m()){i.updateRangeFromParsed(c,t,g,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],j(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,n,o;return N(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o}}(Y(e.options.clip,function(t,e,i){if(!1===i)return!1;const n=bi(t,i),o=bi(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t._cachedMeta,n=i.data||[],o=t.chart.chartArea,s=[],a=t._drawStart||0,r=t._drawCount||n.length-a;let l;for(i.dataset&&i.dataset.draw(e,o,a,r),l=a;l<a+r;++l){const t=n[l];t.active?s.push(t):t.draw(e,o)}for(l=0;l<s.length;++l)s[l].draw(e,o)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this,o=n.getDataset();let s;if(t>=0&&t<n._cachedMeta.data.length){const e=n._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(n.getContext(),t,e)),s.parsed=n.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=n.$context||(n.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(n.chart.getContext(),n.index)),s.dataset=o,s.index=s.datasetIndex=n.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=this,o="active"===e,s=n._cachedDataOpts,a=t+"-"+e,r=s[a],l=n.enableOptionSharing&&at(i);if(r)return Ci(r,l);const c=n.chart.config,h=c.datasetElementScopeKeys(n._type,t),d=o?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(n.getDataset(),h),f=Object.keys(ft.elements[t]),g=c.resolveNamedOptions(u,f,()=>n.getContext(i,o),d);return g.$shared&&(g.$shared=l,s[a]=Object.freeze(Ci(g,l))),g}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a=`animation-${e}`,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new xi(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Di(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Di(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Di(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"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,i=e._data,n=e._cachedMeta.data;for(const[r,l,c]of e._syncList)e[r](l,c);e._syncList=[];const o=n.length,s=i.length,a=Math.min(s,o);a&&e.parse(0,a),s>o?e._insertElements(o,s-o,t):s<o&&e._removeElements(s,o-s)}_insertElements(t,e,i=!0){const n=this,o=n._cachedMeta,s=o.data,a=t+e;let r;const l=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r<a;++r)s[r]=new n.dataElementType;n._parsing&&l(o._parsed),n.parse(t,e),i&&n.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&Pi(i,n)}i.data.splice(t,e)}_onDataPush(){const t=arguments.length;this._syncList.push(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._syncList.push(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._syncList.push(["_removeElements",0,1])}_onDataSplice(t,e){this._syncList.push(["_removeElements",t,e]),this._syncList.push(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._syncList.push(["_insertElements",0,arguments.length])}}Oi.defaults={},Oi.prototype.datasetElementType=null,Oi.prototype.dataElementType=null;class Ti{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:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Pt(this.x)&&Pt(this.y)}getProps(t,e){const i=this,n=this.$animations;if(!e||!n)return i;const o={};return t.forEach(t=>{o[t]=n[t]&&n[t].active()?n[t]._to:i[t]}),o}}Ti.defaults={},Ti.defaultRoutes=void 0;const Ai=new Map;function Li(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ai.get(i);return n||(n=new Intl.NumberFormat(t,e),Ai.set(i,n)),n}(e,i).format(t)}const Ri={values:t=>H(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const a=wt(Math.abs(s)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Li(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(wt(t)));return 1===n||2===n||5===n?Ri.numeric.call(this,t,e,i):""}};var Ei={formatters:Ri};function Ii(t,e,i,n,o){const s=Y(n,0),a=Math.min(Y(o,t.length),t.length);let r,l,c,h=0;for(i=Math.ceil(i),o&&(r=o-n,i=r/Math.floor(r/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);l<a;l++)l===c&&(e.push(t[l]),h++,c=Math.round(s+h*i))}ft.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:(t,e)=>e.lineWidth,tickColor:(t,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:Ei.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ft.route("scale.ticks","color","","color"),ft.route("scale.grid","color","","borderColor"),ft.route("scale.grid","borderColor","","borderColor"),ft.route("scale.title","color","","color"),ft.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),ft.describe("scales",{_fallback:"scale"});const zi=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Fi(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function Vi(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(c-s,a-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,c+=o<e?l:-l,c<s-r||c>a+r)))return c}function Bi(t){return t.drawTicks?t.tickLength:0}function Wi(t,e){if(!t.display)return 0;const i=Re(t.font,e),n=Le(t.padding);return(H(t.text)?t.text.length:1)*i.lineHeight+n.height}function Hi(t,e,i){let o=n(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class Ni extends Ti{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){const e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=$(t,Number.POSITIVE_INFINITY),e=$(e,Number.NEGATIVE_INFINITY),i=$(i,Number.POSITIVE_INFINITY),n=$(n,Number.NEGATIVE_INFINITY),{min:$(t,i),max:$(e,n),minDefined:j(t),maxDefined:j(e)}}getMinMax(t){const e=this;let i,{min:n,max:o,minDefined:s,maxDefined:a}=e.getUserBounds();if(s&&a)return{min:n,max:o};const r=e.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)i=r[l].controller.getMinMax(e,t),s||(n=Math.min(n,i.min)),a||(o=Math.max(o,i.max));return{min:$(n,$(o,n)),max:$(o,$(n,o))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.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(){q(this.options.beforeUpdate,[this])}update(t,e,i){const n=this,o=n.options.ticks,s=o.sampleSize;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),n.ticks=null,n._labelSizes=null,n._gridLineItems=null,n._labelItems=null,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n._maxLength=n.isHorizontal()?n.width+i.left+i.right:n.height+i.top+i.bottom,n._dataLimitsCached||(n.beforeDataLimits(),n.determineDataLimits(),n.afterDataLimits(),n._range=Ie(n,n.options.grace),n._dataLimitsCached=!0),n.beforeBuildTicks(),n.ticks=n.buildTicks()||[],n.afterBuildTicks();const a=s<n.ticks.length;n._convertTicksToLabels(a?Fi(n.ticks,s):n.ticks),n.configure(),n.beforeCalculateLabelRotation(),n.calculateLabelRotation(),n.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(n.ticks=function(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize();return Math.floor(Math.min(t._length/i+(e?0:1),t._maxLength/i))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,a=o[0],r=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=i[s*n])}(e,l,o,s/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=St(n);for(let a=0,r=s.length-1;a<r;a++){const t=s[a];if(t>o)return t}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((r-a)/(s-1)):null;for(Ii(e,l,c,W(n)?0:a-n,a),t=0,i=s-1;t<i;t++)Ii(e,l,c,o[t],o[t+1]);return Ii(e,l,c,r,W(n)?e.length:r+n),l}return Ii(e,l,c),l}(n,n.ticks),n._labelSizes=null),a&&n._convertTicksToLabels(n.ticks),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()}configure(){const t=this;let e,i,n=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,n=!n),t._startPixel=e,t._endPixel=i,t._reversePixels=n,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){q(this.options.afterUpdate,[this])}beforeSetDimensions(){q(this.options.beforeSetDimensions,[this])}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){q(this.options.afterSetDimensions,[this])}_callHooks(t){const e=this;e.chart.notifyPlugins(t,e.getContext()),q(e.options[t],[e])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){q(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this,i=e.options.ticks;let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n],s.label=q(i.callback,[s.value,n,t],e);for(n=0;n<o;n++)W(t[n].label)&&(t.splice(n,1),o--,n--)}afterTickToLabelConversion(){q(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){q(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,e=t.options,i=e.ticks,n=t.ticks.length,o=i.minRotation||0,s=i.maxRotation;let a,r,l,c=o;if(!t._isVisible()||!i.display||o>=s||n<=1||!t.isHorizontal())return void(t.labelRotation=o);const h=t._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Vt(t.chart.width-d,0,t.maxWidth);a=e.offset?t.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),r=t.maxHeight-Bi(e.grid)-i.padding-Wi(e.title,t.chart.options.font),l=Math.sqrt(d*d+u*u),c=At(Math.min(Math.asin(Math.min((h.highest.height+6)/a,1)),Math.asin(Math.min(r/l,1))-Math.asin(u/l))),c=Math.max(o,Math.min(s,c))),t.labelRotation=c}afterCalculateLabelRotation(){q(this.options.afterCalculateLabelRotation,[this])}beforeFit(){q(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:n,title:o,grid:s}}=t,a=t._isVisible(),r=t.isHorizontal();if(a){const a=Wi(o,i.options.font);if(r?(e.width=t.maxWidth,e.height=Bi(s)+a):(e.height=t.maxHeight,e.width=Bi(s)+a),n.display&&t.ticks.length){const{first:i,last:o,widest:s,highest:a}=t._getLabelSizes(),l=2*n.padding,c=Tt(t.labelRotation),h=Math.cos(c),d=Math.sin(c);r?e.height=Math.min(t.maxHeight,e.height+(n.mirror?0:d*s.width+h*a.height)+l):e.width=Math.min(t.maxWidth,e.width+(n.mirror?0:h*s.width+d*a.height)+l),t._calculatePadding(i,o,d,h)}}t._handleMargins(),r?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,i,n){const o=this,{ticks:{align:s,padding:a},position:r}=o.options,l=0!==o.labelRotation,c="top"!==r&&"x"===o.axis;if(o.isHorizontal()){const r=o.getPixelForTick(0)-o.left,h=o.right-o.getPixelForTick(o.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=i*e.height):(d=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?d=t.width:(d=t.width/2,u=e.width/2),o.paddingLeft=Math.max((d-r+a)*o.width/(o.width-r),0),o.paddingRight=Math.max((u-h+a)*o.width/(o.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),o.paddingTop=i+a,o.paddingBottom=n+a}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){q(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){const e=this;e.beforeTickToLabelConversion(),e.generateTickLabels(t),e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const i=t.options.ticks.sampleSize;let n=t.ticks;i<n.length&&(n=Fi(n,i)),t._labelSizes=e=t._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let a,r,l,c,h,d,u,f,g,p,m,x=0,b=0;for(a=0;a<e;++a){if(c=t[a].label,h=this._resolveTickFontOptions(a),i.font=d=h.string,u=n[d]=n[d]||{data:{},gc:[]},f=h.lineHeight,g=p=0,W(c)||H(c)){if(H(c))for(r=0,l=c.length;r<l;++r)m=c[r],W(m)||H(m)||(g=Ht(i,u.data,u.gc,g,m),p+=f)}else g=Ht(i,u.data,u.gc,g,c),p=f;o.push(g),s.push(p),x=Math.max(g,x),b=Math.max(p,b)}!function(t,e){K(t,t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}})}(n,e);const _=o.indexOf(x),y=s.indexOf(b),v=t=>({width:o[t]||0,height:s[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y),widths:o,heights:s}}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){const e=this;e._reversePixels&&(t=1-t);const i=e._startPixel+t*e._length;return Bt(e._alignToPixels?jt(e.chart,i,0):i)}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,i=e.ticks||[];if(t>=0&&t<i.length){const n=i[t];return n.$context||(n.$context=function(t,e,i){return Object.assign(Object.create(t),{tick:i,index:e,type:"tick"})}(e.getContext(),t,n))}return e.$context||(e.$context=(n=e.chart.getContext(),o=e,Object.assign(Object.create(n),{scale:o,type:"scale"})));var n,o}_tickSize(){const t=this,e=t.options.ticks,i=Tt(t.labelRotation),n=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),s=t._getLabelSizes(),a=e.autoSkipPadding||0,r=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return t.isHorizontal()?l*n>r*o?r/n:l/o:l*o<r*n?l/n:r/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this,i=e.axis,n=e.chart,o=e.options,{grid:s,position:a}=o,r=s.offset,l=e.isHorizontal(),c=e.ticks.length+(r?1:0),h=Bi(s),d=[],u=s.setContext(e.getContext()),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(t){return jt(n,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===a)m=p(e.bottom),v=e.bottom-h,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===a)m=p(e.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=e.top+h;else if("left"===a)m=p(e.right),y=e.right-h,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===a)m=p(e.left),k=t.left,P=p(t.right)-g,y=m+g,w=e.left+h;else if("x"===i){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(N(a)){const t=Object.keys(a)[0];m=p(e.chart.scales[t].getPixelForValue(a[t]))}S=t.top,D=t.bottom,v=m+g,M=v+h}else if("y"===i){if("center"===a)m=p((t.left+t.right)/2);else if(N(a)){const t=Object.keys(a)[0];m=p(e.chart.scales[t].getPixelForValue(a[t]))}y=m-g,w=y-h,k=t.left,P=t.right}for(x=0;x<c;++x){const t=s.setContext(e.getContext(x)),i=t.lineWidth,o=t.color,a=s.borderDash||[],c=t.borderDashOffset,h=t.tickWidth,u=t.tickColor,f=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=Vi(e,x,r),void 0!==b&&(_=jt(n,b,i),l?y=w=k=P=_:v=M=S=D=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:o,borderDash:a,borderDashOffset:c,tickWidth:h,tickColor:u,tickBorderDash:f,tickBorderDashOffset:g}))}return e._ticksLength=c,e._borderValue=m,d}_computeLabelItems(t){const e=this,i=e.axis,n=e.options,{position:o,ticks:s}=n,a=e.isHorizontal(),r=e.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=s,u=Bi(n.grid),f=u+h,g=d?-h:f,p=-Tt(e.labelRotation),m=[];let x,b,_,y,v,w,M,k,S,P,D,C,O="middle";if("top"===o)w=e.bottom-g,M=e._getXAxisLabelAlignment();else if("bottom"===o)w=e.top+g,M=e._getXAxisLabelAlignment();else if("left"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("right"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("x"===i){if("center"===o)w=(t.top+t.bottom)/2+f;else if(N(o)){const t=Object.keys(o)[0];w=e.chart.scales[t].getPixelForValue(o[t])+f}M=e._getXAxisLabelAlignment()}else if("y"===i){if("center"===o)v=(t.left+t.right)/2-f;else if(N(o)){const t=Object.keys(o)[0];v=e.chart.scales[t].getPixelForValue(o[t])}M=e._getYAxisLabelAlignment(u).textAlign}"y"===i&&("start"===l?O="top":"end"===l&&(O="bottom"));const T=e._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const t=s.setContext(e.getContext(x));k=e.getPixelForTick(x)+s.labelOffset,S=e._resolveTickFontOptions(x),P=S.lineHeight,D=H(y)?y.length:1;const i=D/2,n=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let u;if(a?(v=k,C="top"===o?"near"===c||0!==p?-D*P+P/2:"center"===c?-T.highest.height/2-i*P+P:P/2-T.highest.height:"near"===c||0!==p?P/2:"center"===c?T.highest.height/2-i*P:T.highest.height-D*P,d&&(C*=-1)):(w=k,C=(1-D)*P/2),t.showLabelBackdrop){const e=Le(t.backdropPadding),i=T.heights[x],n=T.widths[x];let o=w+C-e.top,s=v-e.left;switch(O){case"middle":o-=i/2;break;case"bottom":o-=i}switch(M){case"center":s-=n/2;break;case"right":s-=n}u={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({rotation:p,label:y,font:S,color:n,strokeColor:l,strokeWidth:h,textOffset:C,textAlign:M,textBaseline:O,translation:[v,w],backdrop:u})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Tt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){const e=this,{position:i,ticks:{crossAlign:n,mirror:o,padding:s}}=e.options,a=t+s,r=e._getLabelSizes().widest.width;let l,c;return"left"===i?o?(l="left",c=e.right+s):(c=e.right-a,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c=e.left)):"right"===i?o?(l="right",c=e.left+s):(c=e.left+a,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c=e.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this,i=e.options.grid;if(!e._isVisible()||!i.display)return 0;const n=e.ticks.findIndex(e=>e.value===t);return n>=0?i.setContext(e.getContext(n)).lineWidth:0}drawGrid(t){const e=this,i=e.options.grid,n=e.ctx,o=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let s,a;const r=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(i.display)for(s=0,a=o.length;s<a;++s){const t=o[s];i.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const t=this,{chart:e,ctx:i,options:{grid:n}}=t,o=n.setContext(t.getContext()),s=n.drawBorder?o.borderWidth:0;if(!s)return;const a=n.setContext(t.getContext(0)).lineWidth,r=t._borderValue;let l,c,h,d;t.isHorizontal()?(l=jt(e,t.left,s)-s/2,c=jt(e,t.right,a)+a/2,h=d=r):(h=jt(e,t.top,s)-s/2,d=jt(e,t.bottom,a)+a/2,l=c=r),i.save(),i.lineWidth=o.borderWidth,i.strokeStyle=o.borderColor,i.beginPath(),i.moveTo(l,h),i.lineTo(c,d),i.stroke(),i.restore()}drawLabels(t){const e=this;if(!e.options.ticks.display)return;const i=e.ctx,n=e._computeLabelArea();n&&Xt(i,n);const o=e._labelItems||(e._labelItems=e._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const t=o[s],e=t.font,n=t.label;t.backdrop&&(i.fillStyle=t.backdrop.color,i.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),Zt(i,n,0,t.textOffset,e,t)}n&&qt(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Re(i.font),a=Le(i.padding),r=i.align;let l=s.lineHeight/2;"bottom"===e?(l+=a.bottom,H(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function(t,e,i,n){const{top:s,left:a,bottom:r,right:l}=t;let c,h,d,u=0;return t.isHorizontal()?(h=o(n,a,l),d=zi(t,i,e),c=l-a):(h=zi(t,i,e),d=o(n,r,s),u="left"===i?-_t:_t),{titleX:h,titleY:d,maxWidth:c,rotation:u}}(this,l,e,r);Zt(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:u,textAlign:Hi(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){const e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=e.grid&&e.grid.z||0;return t._isVisible()&&t.draw===Ni.prototype.draw?[{z:n,draw(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:n+1,draw(){t.drawBorder()}},{z:i,draw(e){t.drawLabels(e)}}]:[{z:i,draw(e){t.draw(e)}}]}getMatchingVisibleMetas(t){const e=this,i=e.chart.getSortedVisibleDatasetMetas(),n=e.axis+"AxisID",o=[];let s,a;for(s=0,a=i.length;s<a;++s){const a=i[s];a[n]!==e.id||t&&a.type!==t||o.push(a)}return o}_resolveTickFontOptions(t){return Re(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this,e=t._resolveTickFontOptions(0).lineHeight;return(t.isHorizontal()?t.width:t.height)/e}}function ji(t,e=[""],i=t,n,o=(()=>t[0])){at(n)||(n=tn("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>ji([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>qi(i,n,()=>function(t,e,i,n){let o;for(const s of e)if(o=tn(Ui(s,t),i),at(o))return Xi(t,o)?Qi(i,n,t,o):o}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>en(t).includes(e),ownKeys:t=>en(t),set:(t,e,i)=>((t._storage||(t._storage=o()))[e]=i,delete t[e],delete t._keys,!0)})}function $i(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Yi(t,n),setContext:e=>$i(t,e,i,n),override:o=>$i(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>qi(t,e,()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];return rt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+[...r].join("->")+"->"+t);return r.add(t),e=e(s,a||n),r.delete(t),N(e)&&(e=Qi(o._scopes,o,t,e)),e}(e,r,t,i)),H(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(at(s.index)&&n(t))e=e[s.index%e.length];else if(N(e[0])){const i=e,n=o._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Qi(n,o,t,l);e.push($i(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable)),Xi(e,r)&&(r=$i(r,o,s&&s[e],a)),r}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Yi(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:rt(i)?i:()=>i,isIndexable:rt(n)?n:()=>n}}const Ui=(t,e)=>t?t+st(e):e,Xi=(t,e)=>N(e)&&"adapters"!==t;function qi(t,e,i){let n=t[e];return at(n)||(n=i(),at(n)&&(t[e]=n)),n}function Ki(t,e,i){return rt(t)?t(e,i):t}const Gi=(t,e)=>!0===t?e:"string"==typeof t?ot(e,t):void 0;function Zi(t,e,i,n){for(const o of e){const e=Gi(i,o);if(e){t.add(e);const o=Ki(e._fallback,i,e);if(at(o)&&o!==i&&o!==n)return o}else if(!1===e&&at(n)&&i!==n)return null}return!1}function Qi(t,e,i,n){const o=e._rootScopes,s=Ki(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=Ji(r,a,i,s||i);return null!==l&&(!at(s)||s===i||(l=Ji(r,a,s,l),null!==l))&&ji([...r],[""],o,s,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];return H(o)&&N(i)?i:o}(e,i,n))}function Ji(t,e,i,n){for(;i;)i=Zi(t,e,i,n);return i}function tn(t,e){for(const i of e){if(!i)continue;const e=i[t];if(at(e))return e}}function en(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return[...e]}(t._scopes)),e}const nn=Number.EPSILON||1e-14,on=(t,e)=>e<t.length&&!t[e].skip&&t[e],sn=t=>"x"===t?"y":"x";function an(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=Et(s,o),l=Et(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function rn(t,e="x"){const i=sn(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,c=on(t,0);for(a=0;a<n;++a)if(r=l,l=c,c=on(t,a+1),l){if(c){const t=c[e]-l[e];o[a]=0!==t?(c[i]-l[i])/t:0}s[a]=r?c?Mt(o[a-1])!==Mt(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(t,e,i){const n=t.length;let o,s,a,r,l,c=on(t,0);for(let h=0;h<n-1;++h)l=c,c=on(t,h+1),l&&c&&(Dt(e[h],0,nn)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}(t,o,s),function(t,e,i="x"){const n=sn(i),o=t.length;let s,a,r,l=on(t,0);for(let c=0;c<o;++c){if(a=r,r=l,l=on(t,c+1),!r)continue;const o=r[i],h=r[n];a&&(s=(o-a[i])/3,r[`cp1${i}`]=o-s,r[`cp1${n}`]=h-s*e[c]),l&&(s=(l[i]-o)/3,r[`cp2${i}`]=o+s,r[`cp2${n}`]=h+s*e[c])}}(t,s,e)}function ln(t,e,i){return Math.max(Math.min(t,i),e)}function cn(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)rn(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=an(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Ut(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Ut(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=ln(o.cp1x,e.left,e.right),o.cp1y=ln(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=ln(o.cp2x,e.left,e.right),o.cp2y=ln(o.cp2y,e.top,e.bottom)))}(t,i)}function hn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function dn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function un(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=hn(t,o,i),r=hn(o,s,i),l=hn(s,e,i),c=hn(a,r,i),h=hn(r,l,i);return hn(c,h,i)}function fn(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function gn(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function pn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mn(t){return"angle"===t?{between:Ft,compare:It,normalize:zt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function xn({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function bn(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=mn(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=mn(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&a(r(e[d%l][n]),o,s);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;for(let y=h,v=h;y<=d;++y)m=e[y%a],m.skip||(p=c(m[n]),p!==x&&(b=l(p,o,s),null===_&&(b||l(o,x,p)&&0!==r(o,x))&&(_=0===r(p,o)?y:v),null!==_&&(!b||0===r(s,p)||l(s,x,p))&&(g.push(xn({start:_,end:y,loop:u,count:a,style:f})),_=null),v=y,x=p));return null!==_&&g.push(xn({start:_,end:d,loop:u,count:a,style:f})),g}function _n(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=bn(n[o],t.points,e);s.length&&i.push(...s)}return i}function yn(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);return function(t,e,i){return i&&i.setContext&&e?function(t,e,i){const n=e.length,o=[];let s=t[0].start,a=s;for(const r of t){let t,l,c=e[s%n];for(a=s+1;a<=r.end;a++){const h=e[a%n];l=vn(i.setContext({type:"segment",p0:c,p1:h})),wn(l,t)&&(o.push({start:s,end:a-1,loop:r.loop,style:t}),t=l,s=a-1),c=h,t=l}s<a-1&&(o.push({start:s,end:a-1,loop:r.loop,style:l}),s=a-1)}return o}(t,e,i):t}(!0===n?[{start:a,end:r,loop:s}]:function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(s.push({start:e%o,end:(a-1)%o,loop:n=!1}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}function vn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function wn(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Mn=Object.freeze({__proto__:null,easingEffects:ui,color:z,getHoverColor:F,noop:V,uid:B,isNullOrUndef:W,isArray:H,isObject:N,isFinite:j,finiteOrDefault:$,valueOrDefault:Y,toPercentage:U,toDimension:X,callback:q,each:K,_elementsEqual:G,clone:Z,_merger:J,merge:tt,mergeIf:et,_mergerIf:it,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:ot,_capitalize:st,defined:at,isFunction:rt,setsEqual:lt,toFontString:Wt,_measureText:Ht,_longestText:Nt,_alignPixel:jt,clearCanvas:$t,drawPoint:Yt,_isPointInArea:Ut,clipArea:Xt,unclipArea:qt,_steppedLineTo:Kt,_bezierCurveTo:Gt,renderText:Zt,addRoundedRectPath:Qt,_lookup:Jt,_lookupByKey:te,_rlookupByKey:ee,_filterBetween:ie,listenArrayEvents:oe,unlistenArrayEvents:se,_arrayUnique:ae,_createResolver:ji,_attachContext:$i,_descriptors:Yi,splineCurve:an,splineCurveMonotone:rn,_updateBezierControlPoints:cn,_getParentNode:re,getStyle:he,getRelativePosition:fe,getMaximumSize:pe,retinaScale:me,supportsEventListenerOptions:xe,readUsedSize:be,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:t,throttled:e,debounce:i,_toLeftRightCenter:n,_alignStartEnd:o,_textX:s,_pointInLine:hn,_steppedInterpolation:dn,_bezierInterpolation:un,formatNumber:Li,toLineHeight:Ce,_readValueToProps:Oe,toTRBL:Te,toTRBLCorners:Ae,toPadding:Le,toFont:Re,resolve:Ee,_addGrace:Ie,PI:gt,TAU:pt,PITAU:mt,INFINITY:xt,RAD_PER_DEG:bt,HALF_PI:_t,QUARTER_PI:yt,TWO_THIRDS_PI:vt,log10:wt,sign:Mt,niceNum:kt,_factorize:St,isNumber:Pt,almostEquals:Dt,almostWhole:Ct,_setMinAndMaxByKey:Ot,toRadians:Tt,toDegrees:At,_decimalPlaces:Lt,getAngleFromPoint:Rt,distanceBetweenPoints:Et,_angleDiff:It,_normalizeAngle:zt,_angleBetween:Ft,_limitValue:Vt,_int16Range:Bt,getRtlAdapter:fn,overrideTextDirection:gn,restoreTextDirection:pn,_boundSegment:bn,_boundSegments:_n,_computeSegments:yn});class kn{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=this,i=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(i)&&(n=e.register(i));const o=e.items,s=t.id,a=e.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in o||(o[s]=t,function(t,e,i){const n=tt(Object.create(null),[i?ft.get(i):{},ft.get(e),t.defaults]);ft.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");ft.route(s,o,l,r)})}(e,t.defaultRoutes),t.descriptors&&ft.describe(e,t.descriptors)}(t,a,n),e.override&&ft.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in ft[n]&&(delete ft[n][i],this.override&&delete ct[i])}}var Sn=new class{constructor(){this.controllers=new kn(Oi,"datasets",!0),this.elements=new kn(Ti,"elements"),this.plugins=new kn(Object,"plugins"),this.scales=new kn(Ni,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){const n=this;[...e].forEach(e=>{const o=i||n._getRegistryForType(e);i||o.isForType(e)||o===n.plugins&&e.id?n._exec(t,o,e):K(e,e=>{const o=i||n._getRegistryForType(e);n._exec(t,o,e)})})}_exec(t,e,i){const n=st(t);q(i["before"+n],[],i),e[t](i),q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class Pn{constructor(){this._init=[]}notify(t,e,i,n){const o=this;"beforeInit"===e&&(o._init=o._createDescriptors(t,!0),o._notify(o._init,t,"install"));const s=n?o._descriptors(t).filter(n):o._descriptors(t),a=o._notify(s,t,e,i);return"destroy"===e&&(o._notify(s,t,"stop"),o._notify(o._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===q(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){W(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 i=t&&t.config,n=Y(i.options&&i.options.plugins,{}),o=function(t){const e=[],i=Object.keys(Sn.plugins.items);for(let o=0;o<i.length;o++)e.push(Sn.getPlugin(i[o]));const n=t.plugins||[];for(let o=0;o<n.length;o++){const t=n[o];-1===e.indexOf(t)&&e.push(t)}return e}(i);return!1!==n||e?function(t,e,i,n){const o=[],s=t.getContext();for(let a=0;a<e.length;a++){const r=e[a],l=Dn(i[r.id],n);null!==l&&o.push({plugin:r,options:Cn(t.config,r,l,s)})}return o}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Dn(t,e){return e||!1!==t?!0===t?{}:t:null}function Cn(t,e,i,n){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function On(t,e){return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||(ft.datasets[t]||{}).indexAxis||"x"}function Tn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function An(t){const e=t.options||(t.options={});e.plugins=Y(e.plugins,{}),e.scales=function(t,e){const i=ct[t.type]||{scales:{}},n=e.scales||{},o=On(t.type,e),s=Object.create(null),a=Object.create(null);return Object.keys(n).forEach(t=>{const e=n[t],r=Tn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),c=i.scales||{};s[r]=s[r]||t,a[t]=et(Object.create(null),[{axis:r},e,c[r],c[l]])}),t.data.datasets.forEach(i=>{const o=i.type||t.type,r=i.indexAxis||On(o,e),l=(ct[o]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),o=i[e+"AxisID"]||s[e]||e;a[o]=a[o]||Object.create(null),et(a[o],[{axis:e},n[o],l[t]])})}),Object.keys(a).forEach(t=>{const e=a[t];et(e,[ft.scales[e.type],ft.scale])}),a}(t,e)}function Ln(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Rn=new Map,En=new Set;function In(t,e){let i=Rn.get(t);return i||(i=e(),Rn.set(t,i),En.add(i)),i}const zn=(t,e,i)=>{const n=ot(e,i);void 0!==n&&t.add(n)};class Fn{constructor(t){this._config=function(t){return(t=t||{}).data=Ln(t.data),An(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}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=Ln(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(),An(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return In(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return In(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return In(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return In(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach(e=>{t&&(r.add(t),e.forEach(e=>zn(r,t,e))),e.forEach(t=>zn(r,n,t)),e.forEach(t=>zn(r,ct[o]||{},t)),e.forEach(t=>zn(r,ft,t)),e.forEach(t=>zn(r,ht,t))});const l=[...r];return En.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,ct[e]||{},ft.datasets[e]||{},{type:e},ft,ht]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Vn(this._resolverCache,t,n);let r=s;(function(t,e){const{isScriptable:i,isIndexable:n}=Yi(t);for(const o of e)if(i(o)&&rt(t[o])||n(o)&&H(t[o]))return!0;return!1})(s,e)&&(o.$shared=!1,r=$i(s,i=rt(i)?i():i,this.createResolver(t,i,a)));for(const l of e)o[l]=r[l];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Vn(this._resolverCache,t,i);return N(e)?$i(o,e,void 0,n):o}}function Vn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);return s||(s={resolver:ji(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(o,s)),s}const Bn=["top","bottom","left","right","chartArea"];function Wn(t,e){return"top"===t||"bottom"===t||-1===Bn.indexOf(t)&&"x"===e}function Hn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Nn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),q(i&&i.onComplete,[t],e)}function jn(t){const e=t.chart,i=e.options.animation;q(i&&i.onProgress,[t],e)}function $n(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Yn(t){return $n()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Un={},Xn=t=>{const e=Yn(t);return Object.values(Un).filter(t=>t.canvas===e).pop()};class qn{constructor(t,e){const n=this;this.config=e=new Fn(e);const o=Yn(t),s=Xn(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");const r=e.createResolver(e.chartOptionScopes(),n.getContext());this.platform=n._initializePlatform(o,e);const l=n.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;this.id=B(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,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.scale=void 0,this._plugins=new Pn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=i(()=>this.update("resize"),r.resizeDelay||0),Un[n.id]=n,l&&c?(a.listen(n,"complete",Nn),a.listen(n,"progress",jn),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return W(t)?e&&o?o:n?i/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(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():me(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,e){return e.platform?new e.platform:!$n()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?new qe:new ri}clear(){return $t(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this,n=i.options,o=i.platform.getMaximumSize(i.canvas,t,e,n.maintainAspectRatio&&i.aspectRatio),s=n.devicePixelRatio||i.platform.getDevicePixelRatio();i.width=o.width,i.height=o.height,i._aspectRatio=i.aspectRatio,me(i,s,!0)&&(i.notifyPlugins("resize",{size:o}),q(n.onResize,[i,o],i),i.attached&&i._doResize()&&i.render())}ensureScalesHaveIDs(){K(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this,e=t.options,i=e.scales,n=t.scales,o=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{});let s=[];i&&(s=s.concat(Object.keys(i).map(t=>{const e=i[t],n=Tn(t,e),o="r"===n,s="x"===n;return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}}))),K(s,i=>{const s=i.options,a=s.id,r=Tn(a,s),l=Y(s.type,i.dtype);void 0!==s.position&&Wn(s.position,r)===Wn(i.dposition)||(s.position=i.dposition),o[a]=!0;let c=null;a in n&&n[a].type===l?c=n[a]:(c=new(Sn.getScale(l))({id:a,type:l,ctx:t.ctx,chart:t}),n[c.id]=c),c.init(s,e)}),K(o,(t,e)=>{t||delete n[e]}),K(n,e=>{Ue.configure(t,e,e.options),Ue.addBox(t,e)})}_updateMetasets(){const t=this,e=t._metasets,i=t.data.datasets.length,n=e.length;if(e.sort((t,e)=>t.index-e.index),n>i){for(let e=i;e<n;++e)t._destroyDatasetMeta(e);e.splice(i,n-i)}t._sortedMetasets=e.slice(0).sort(Hn("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:e,data:{datasets:i}}=t;e.length>i.length&&delete t._stacks,e.forEach((e,n)=>{0===i.filter(t=>t===e._dataset).length&&t._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=this,e=[],i=t.data.datasets;let n,o;for(t._removeUnreferencedMetasets(),n=0,o=i.length;n<o;n++){const o=i[n];let s=t.getDatasetMeta(n);const a=o.type||t.config.type;if(s.type&&s.type!==a&&(t._destroyDatasetMeta(n),s=t.getDatasetMeta(n)),s.type=a,s.indexAxis=o.indexAxis||On(a,t.options),s.order=o.order||0,s.index=n,s.label=""+o.label,s.visible=t.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const i=Sn.getController(a),{datasetElementType:o,dataElementType:r}=ft.datasets[a];Object.assign(i.prototype,{dataElementType:Sn.getElement(r),datasetElementType:o&&Sn.getElement(o)}),s.controller=new i(t,n),e.push(s.controller)}}return t._updateMetasets(),e}_resetElements(){const t=this;K(t.data.datasets,(e,i)=>{t.getDatasetMeta(i).controller.reset()},t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,i=e.config;i.update(),e._options=i.createResolver(i.chartOptionScopes(),e.getContext()),K(e.scales,t=>{Ue.removeBox(e,t)});const n=e._animationsDisabled=!e.options.animation;e.ensureScalesHaveIDs(),e.buildOrUpdateScales();const o=new Set(Object.keys(e._listeners)),s=new Set(e.options.events);if(lt(o,s)&&!!this._responsiveListeners===e.options.responsive||(e.unbindEvents(),e.bindEvents()),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let r=0;for(let l=0,c=e.data.datasets.length;l<c;l++){const{controller:t}=e.getDatasetMeta(l),i=!n&&-1===a.indexOf(t);t.buildOrUpdateElements(i),r=Math.max(+t.getMaxOverflow(),r)}e._minPadding=r,e._updateLayout(r),n||K(a,t=>{t.reset()}),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(Hn("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;Ue.update(e,e.width,e.height,t);const i=e.chartArea,n=i.width<=0||i.height<=0;e._layers=[],K(e.boxes,t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))},e),e._layers.forEach((t,e)=>{t._idx=e}),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,i="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,o=e.data.datasets.length;n<o;++n)e._updateDataset(n,i?t({datasetIndex:n}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,mode:e,cancelable:!0};!1!==i.notifyPlugins("beforeDatasetUpdate",o)&&(n.controller._update(e),o.cancelable=!1,i.notifyPlugins("afterDatasetUpdate",o))}render(){const t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(t)?t.attached&&!a.running(t)&&a.start(t):(t.draw(),Nn({chart:t})))}draw(){const t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0)return;if(!1===t.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(!1===t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=t.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)t._drawDataset(e[i]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,i=e.ctx,n=t._clip,o=e.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",s)&&(Xt(i,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?e.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?e.height:o.bottom+n.bottom}),t.controller.draw(),qt(i),s.cancelable=!1,e.notifyPlugins("afterDatasetDraw",s))}getElementsAtEventForMode(t,e,i,n){const o=Se.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._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},i.push(n)),n}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.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]}_updateDatasetVisibility(t,e){const i=this,n=e?"show":"hide",o=i.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,n);i.setDatasetVisibility(t,e),s.update(o,{visible:e}),i.update(e=>e.datasetIndex===t?n:void 0)}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const e=this,i=e._metasets&&e._metasets[t];i&&i.controller&&(i.controller._destroy(),delete e._metasets[t])}destroy(){const t=this,{canvas:e,ctx:i}=t;let n,o;for(t.stop(),a.remove(t),n=0,o=t.data.datasets.length;n<o;++n)t._destroyDatasetMeta(n);t.config.clearCache(),e&&(t.unbindEvents(),$t(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete Un[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this,e=t._listeners,i=t.platform,n=function(e,i,n){e.offsetX=i,e.offsetY=n,t._eventHandler(e)};K(t.options.events,o=>((n,o)=>{i.addEventListener(t,n,o),e[n]=o})(o,n))}bindResponsiveEvents(){const t=this;t._responsiveListeners||(t._responsiveListeners={});const e=t._responsiveListeners,i=t.platform,n=(n,o)=>{i.addEventListener(t,n,o),e[n]=o},o=(n,o)=>{e[n]&&(i.removeEventListener(t,n,o),delete e[n])},s=(e,i)=>{t.canvas&&t.resize(e,i)};let a;const r=()=>{o("attach",r),t.attached=!0,t.resize(),n("resize",s),n("detach",a)};a=()=>{t.attached=!1,o("resize",s),n("attach",r)},i.isAttached(t.canvas)?r():a()}unbindEvents(){const t=this;K(t._listeners,(e,i)=>{t.platform.removeEventListener(t,i,e)}),t._listeners={},K(t._responsiveListeners,(e,i)=>{t.platform.removeEventListener(t,i,e)}),t._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this,i=e._active||[],n=t.map(({datasetIndex:t,index:i})=>{const n=e.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[i],index:i}});!G(n,i)&&(e._active=n,e._updateHoverStyles(n,i))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this,o=n.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),a=s(e,t),r=i?t:s(t,e);a.length&&n.updateHoverStyle(a,o.mode,!1),r.length&&o.mode&&n.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i=this,n={event:t,replay:e,cancelable:!0},o=e=>(e.options.events||this.options.events).includes(t.type);if(!1===i.notifyPlugins("beforeEvent",n,o))return;const s=i._handleEvent(t,e);return n.cancelable=!1,i.notifyPlugins("afterEvent",n,o),(s||n.changed)&&i.render(),i}_handleEvent(t,e){const i=this,{_active:n=[],options:o}=i,s=o.hover;let a=[],r=!1,l=null;return"mouseout"!==t.type&&(a=i.getElementsAtEventForMode(t,s.mode,s,e),l="click"===t.type?i._lastEvent:t),i._lastEvent=null,Ut(t,i.chartArea,i._minPadding)&&(q(o.onHover,[t,a,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||q(o.onClick,[t,a,i],i)),r=!G(a,n),(r||e)&&(i._active=a,i._updateHoverStyles(a,n,e)),i._lastEvent=l,r}}const Kn=()=>K(qn.instances,t=>t._plugins.invalidate()),Gn=!0;function Zn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(qn,{defaults:{enumerable:Gn,value:ft},instances:{enumerable:Gn,value:Un},overrides:{enumerable:Gn,value:ct},registry:{enumerable:Gn,value:Sn},version:{enumerable:Gn,value:"3.3.2"},getChart:{enumerable:Gn,value:Xn},register:{enumerable:Gn,value:(...t)=>{Sn.add(...t),Kn()}},unregister:{enumerable:Gn,value:(...t)=>{Sn.remove(...t),Kn()}}});class Qn{constructor(t){this.options=t||{}}formats(){return Zn()}parse(t,e){return Zn()}format(t,e){return Zn()}add(t,e,i){return Zn()}diff(t,e,i){return Zn()}startOf(t,e,i){return Zn()}endOf(t,e){return Zn()}}Qn.override=function(t){Object.assign(Qn.prototype,t)};var Jn={_date:Qn};function to(t){const e=function(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let i=[];for(let n=0,o=e.length;n<o;n++)i=i.concat(e[n].controller.getAllParsedValues(t));t._cache.$bar=ae(i.sort((t,e)=>t-e))}return t._cache.$bar}(t);let i,n,o,s,a=t._length;const r=()=>{32767!==o&&-32768!==o&&(at(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(i=0,n=e.length;i<n;++i)o=t.getPixelForValue(e[i]),r();for(s=void 0,i=0,n=t.ticks.length;i<n;++i)o=t.getPixelForTick(i),r();return a}function eo(t,e,i,n){return H(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function io(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[o.axis]=r||o.parse(a[c],c),l.push(eo(u,d,s,c));return l}function no(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}class oo extends Oi{parsePrimitiveData(t,e,i,n){return io(t,e,i,n)}parseArrayData(t,e,i,n){return io(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===o.axis?a:r,c="x"===s.axis?a:r,h=[];let d,u,f,g;for(d=i,u=i+n;d<u;++d)g=e[d],f={},f[o.axis]=o.parse(ot(g,l),d),h.push(eo(ot(g,c),f,s,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,a=no(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize(),t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o._cachedMeta.vScale,r=a.getBasePixel(),l=a.isHorizontal(),c=o._getRuler(),h=o.resolveDataElementOptions(e,n),d=o.getSharedOptions(h),u=o.includeOptions(n,d);o.updateSharedOptions(d,n,h);for(let f=e;f<e+i;f++){const e=o.getParsed(f),i=s||W(e[a.axis])?{base:r,head:r}:o._calculateBarValuePixels(f),h=o._calculateBarIndexPixels(f,c),g=(e._stacks||{})[a.axis],p={horizontal:l,base:i.base,enableBorderRadius:!g||no(e._custom)||o.index===g._top||o.index===g._bottom,x:l?i.head:h.center,y:l?h.center:i.head,height:l?h.size:void 0,width:l?void 0:h.size};u&&(p.options=d||o.resolveDataElementOptions(f,n)),o.updateElement(t[f],f,p,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,n=i.getMatchingVisibleMetas(this._type),o=i.options.stacked,s=n.length,a=[];let r,l;for(r=0;r<s;++r){if(l=n[r],void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if(W(t)||isNaN(t))continue}if((!1===o||-1===a.indexOf(l.stack)||void 0===o&&void 0===l.stack)&&a.push(l.stack),l.index===t)break}return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this,e=t.options,i=t._cachedMeta,n=i.iScale,o=[];let s,a;for(s=0,a=i.data.length;s<a;++s)o.push(n.getPixelForValue(t.getParsed(s)[n.axis],s));const r=e.barThickness;return{min:r||to(n),pixels:o,start:n._startPixel,end:n._endPixel,stackCount:t._getStackCount(),scale:n,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{vScale:i,_stacked:n}=e._cachedMeta,{base:o,minBarLength:s}=e.options,a=e.getParsed(t),r=a._custom,l=no(r);let c,h,d=a[i.axis],u=0,f=n?e.applyStack(i,a,n):d;f!==d&&(u=f-d,f=d),l&&(d=r.barStart,f=r.barEnd-r.barStart,0!==d&&Mt(d)!==Mt(r.barEnd)&&(u=0),u+=d);const g=W(o)||l?u:o;let p=i.getPixelForValue(g);c=this.chart.getDataVisibility(t)?i.getPixelForValue(u+f):p,h=c-p,void 0!==s&&Math.abs(h)<s&&(h=h<0?-s:s,0===d&&(p-=h/2),c=p+h);const m=o||0;if(p===i.getPixelForValue(m)){const t=i.getLineWidthForValue(m)/2;h>0?(p+=t,h-=t):h<0&&(p-=t,h+=t)}return{size:h,base:p,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=this,n=e.scale,o=i.options,s=o.skipNull,a=Y(o.maxBarThickness,1/0);let r,l;if(e.grouped){const n=s?i._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const c=s-(s-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,o,n):function(t,e,i,n){const o=i.barThickness;let s,a;return W(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,o,n),h=i._getStackIndex(i.index,i._cachedMeta.stack,s?t:void 0);r=c.start+c.chunk*h+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else r=n.getPixelForValue(i.getParsed(t)[n.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,e=t.chart,i=t._cachedMeta,n=i.vScale,o=i.data,s=o.length;let a=0;for(Xt(e.ctx,e.chartArea);a<s;++a)null!==t.getParsed(a)[n.axis]&&o[a].draw(t._ctx);qt(e.ctx)}}oo.id="bar",oo.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},oo.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class so extends Oi{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=[];let c,h,d;for(c=i,h=i+n;c<h;++c)d=e[c],l.push({x:o.parse(ot(d,a),c),y:s.parse(ot(d,r),c),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:t,_parsed:e}=this._cachedMeta;let i=0;for(let n=t.length-1;n>=0;--n)i=Math.max(i,t[n].size()/2,e[n]._custom);return i>0&&i}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=n.getLabelForValue(o.y),r=o._custom;return{label:e.label,value:"("+s+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r}=o._cachedMeta,l=o.resolveDataElementOptions(e,n),c=o.getSharedOptions(l),h=o.includeOptions(n,c),d=a.axis,u=r.axis;for(let f=e;f<e+i;f++){const e=t[f],i=!s&&o.getParsed(f),l={},c=l[d]=s?a.getPixelForDecimal(.5):a.getPixelForValue(i[d]),g=l[u]=s?r.getBasePixel():r.getPixelForValue(i[u]);l.skip=isNaN(c)||isNaN(g),h&&(l.options=o.resolveDataElementOptions(f,n),s&&(l.options.radius=0)),o.updateElement(e,f,l,n)}o.updateSharedOptions(c,n,l)}resolveDataElementOptions(t,e){const i=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+=Y(i&&i._custom,o),n}}so.id="bubble",so.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},so.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class ao extends Oi{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 i=this.getDataset().data,n=this._cachedMeta;let o,s;for(o=t,s=t+e;o<s;++o)n._parsed[o]=+i[o]}_getRotation(){return Tt(this.options.rotation-90)}_getCircumference(){return Tt(this.options.circumference)}_getRotationExtents(){let t=pt,e=-pt;const i=this;for(let n=0;n<i.chart.data.datasets.length;++n)if(i.chart.isDatasetVisible(n)){const o=i.chart.getDatasetMeta(n).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this,i=e.chart,{chartArea:n}=i,o=e._cachedMeta,s=o.data,a=e.getMaxBorderWidth()+e.getMaxOffset(s),r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(U(e.options.cutout,r),1),c=e._getRingWeight(e.index),{circumference:h,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=function(t,e,i){let n=1,o=1,s=0,a=0;if(e<pt){const r=t,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>Ft(t,r,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>Ft(t,r,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(_t,h,u),x=g(gt,c,d),b=g(gt+_t,h,u);n=(p-x)/2,o=(m-b)/2,s=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(d,h,l),m=Math.max(Math.min((n.width-a)/u,(n.height-a)/f)/2,0),x=X(e.options.radius,m),b=(x-Math.max(x*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*x,e.offsetY=p*x,o.total=e.calculateTotal(),e.outerRadius=x-b*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-b*c,0),e.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this,n=i.options,o=i._cachedMeta,s=i._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]?0:i.calculateCircumference(o._parsed[t]*s/pt)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=a.chartArea,l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,h=s&&a.options.animation.animateScale,d=h?0:o.innerRadius,u=h?0:o.outerRadius,f=o.resolveDataElementOptions(e,n),g=o.getSharedOptions(f),p=o.includeOptions(n,g);let m,x=o._getRotation();for(m=0;m<e;++m)x+=o._circumference(m,s);for(m=e;m<e+i;++m){const e=o._circumference(m,s),i=t[m],a={x:l+o.offsetX,y:c+o.offsetY,startAngle:x,endAngle:x+e,circumference:e,outerRadius:u,innerRadius:d};p&&(a.options=g||o.resolveDataElementOptions(m,n)),x+=e,o.updateElement(i,m,a,n)}o.updateSharedOptions(g,n,f)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const e=t._parsed[i];null!==e&&!isNaN(e)&&this.chart.getDataVisibility(i)&&(n+=Math.abs(e))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?pt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this.chart,i=e.data.labels||[],n=Li(this._cachedMeta._parsed[t],e.options.locale);return{label:i[t]||"",value:n}}getMaxBorderWidth(t){const e=this;let i=0;const n=e.chart;let o,s,a,r,l;if(!t)for(o=0,s=n.data.datasets.length;o<s;++o)if(n.isDatasetVisible(o)){a=n.getDatasetMeta(o),t=a.data,r=a.controller,r!==e&&r.configure();break}if(!t)return 0;for(o=0,s=t.length;o<s;++o)l=r.resolveDataElementOptions(o),"inner"!==l.borderAlign&&(i=Math.max(i,l.borderWidth||0,l.hoverBorderWidth||0));return i}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(Y(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ao.id="doughnut",ao.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",indexAxis:"r"},ao.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((e,i)=>{const n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return H(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class ro extends Oi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,i=e._cachedMeta,{dataset:n,data:o=[],_dataset:s}=i,a=e.chart._animationsDisabled;let{start:r,count:l}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Vt(Math.min(te(r,a.axis,c).lo,i?n:te(e,l,a.getPixelForValue(c)).lo),0,n-1)),s=u?Vt(Math.max(te(r,a.axis,h).hi+1,i?0:te(e,l,a.getPixelForValue(h)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(i,o,a);e._drawStart=r,e._drawCount=l,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(i)&&(r=0,l=o.length),n._decimated=!!s._decimated,n.points=o;const c=e.resolveDatasetElementOptions(t);e.options.showLine||(c.borderWidth=0),c.segment=e.options.segment,e.updateElement(n,void 0,{animated:!a,options:c},t),e.updateElements(o,r,l,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r,_stacked:l}=o._cachedMeta,c=o.resolveDataElementOptions(e,n),h=o.getSharedOptions(c),d=o.includeOptions(n,h),u=a.axis,f=r.axis,g=o.options.spanGaps,p=Pt(g)?g:Number.POSITIVE_INFINITY,m=o.chart._animationsDisabled||s||"none"===n;let x=e>0&&o.getParsed(e-1);for(let b=e;b<e+i;++b){const e=t[b],i=o.getParsed(b),c=m?e:{},g=W(i[f]),_=c[u]=a.getPixelForValue(i[u],b),y=c[f]=s||g?r.getBasePixel():r.getPixelForValue(l?o.applyStack(r,i,l):i[f],b);c.skip=isNaN(_)||isNaN(y)||g,c.stop=b>0&&i[u]-x[u]>p,c.parsed=i,d&&(c.options=h||o.resolveDataElementOptions(b,n)),m||o.updateElement(e,b,c,n),x=i}o.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,i=e.dataset,n=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return n;const s=o[0].size(t.resolveDataElementOptions(0)),a=o[o.length-1].size(t.resolveDataElementOptions(o.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ro.id="line",ro.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},ro.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class lo extends Oi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this.chart,i=e.data.labels||[],n=Li(this._cachedMeta._parsed[t].r,e.options.locale);return{label:i[t]||"",value:n}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,n=e.options,o=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(o/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=s-a*t.index,t.innerRadius=t.outerRadius-a}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=o.getDataset(),l=a.options.animation,c=o._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*gt;let f,g=u;const p=360/o.countVisibleElements();for(f=0;f<e;++f)g+=o._computeAngle(f,n,p);for(f=e;f<e+i;f++){const e=t[f];let i=g,m=g+o._computeAngle(f,n,p),x=a.getDataVisibility(f)?c.getDistanceFromCenterForValue(r.data[f]):0;g=m,s&&(l.animateScale&&(x=0),l.animateRotate&&(i=m=u));const b={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:i,endAngle:m,options:o.resolveDataElementOptions(f,n)};o.updateElement(e,f,b,n)}}countVisibleElements(){const t=this.getDataset();let e=0;return this._cachedMeta.data.forEach((i,n)=>{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Tt(this.resolveDataElementOptions(t,e).angle||i):0}}lo.id="polarArea",lo.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},lo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((e,i)=>{const n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class co extends ao{}co.id="pie",co.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class ho extends Oi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,n=i.dataset,o=i.data||[],s=i.iScale.getLabels();if(n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0),e.updateElement(n,void 0,{_loop:!0,_fullLoop:s.length===o.length,options:i},t)}e.updateElements(o,0,o.length,t)}updateElements(t,e,i,n){const o=this,s=o.getDataset(),a=o._cachedMeta.rScale,r="reset"===n;for(let l=e;l<e+i;l++){const e=t[l],i=o.resolveDataElementOptions(l,n),c=a.getPointPositionForValue(l,s.data[l]),h=r?a.xCenter:c.x,d=r?a.yCenter:c.y,u={x:h,y:d,angle:c.angle,skip:isNaN(h)||isNaN(d),options:i};o.updateElement(e,l,u,n)}}}ho.id="radar",ho.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},ho.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class uo extends ro{}uo.id="scatter",uo.defaults={showLine:!1,fill:!1},uo.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var fo=Object.freeze({__proto__:null,BarController:oo,BubbleController:so,DoughnutController:ao,LineController:ro,PolarAreaController:lo,PieController:co,RadarController:ho,ScatterController:uo});function go(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let c=o/r;t.beginPath(),t.arc(s,a,r,n-c,i+c),l>o?(c=o/l,t.arc(s,a,l,i+c,n-c,!0)):t.arc(s,a,o,i+_t,n-_t),t.closePath(),t.clip()}function po(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function mo(t,e,i,n){const{x:o,y:s,startAngle:a,pixelMargin:r,innerRadius:l}=e,c=Math.max(e.outerRadius+i-r,0),h=l>0?l+i+r:0,d=n-a,u=(d-Math.max(.001,d*c-i/gt)/c)/2,f=a+u,g=n-u,{outerStart:p,outerEnd:m,innerStart:x,innerEnd:b}=function(t,e,i,n){const o=Oe(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),s=(i-e)/2,a=Math.min(s,n*e/2),r=t=>{const e=(i-Math.min(s,t))*n/2;return Vt(t,0,Math.min(s,e))};return{outerStart:r(o.outerStart),outerEnd:r(o.outerEnd),innerStart:Vt(o.innerStart,0,a),innerEnd:Vt(o.innerEnd,0,a)}}(e,h,c,g-f),_=c-p,y=c-m,v=f+p/_,w=g-m/y,M=h+x,k=h+b,S=f+x/M,P=g-b/k;if(t.beginPath(),t.arc(o,s,c,v,w),m>0){const e=po(y,w,o,s);t.arc(e.x,e.y,m,w,g+_t)}const D=po(k,g,o,s);if(t.lineTo(D.x,D.y),b>0){const e=po(k,P,o,s);t.arc(e.x,e.y,b,g+_t,P+Math.PI)}if(t.arc(o,s,h,g-b/h,f+x/h,!0),x>0){const e=po(M,S,o,s);t.arc(e.x,e.y,x,S+Math.PI,f-_t)}const C=po(_,f,o,s);if(t.lineTo(C.x,C.y),p>0){const e=po(_,v,o,s);t.arc(e.x,e.y,p,f-_t,v)}t.closePath()}class xo extends Ti{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,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=Rt(n,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i);return(h>=pt||Ft(o,a,r))&&s>=l&&s<=c}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),r=(n+o)/2,l=(s+a)/2;return{x:e+Math.cos(r)*l,y:i+Math.sin(r)*l}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,{options:i,circumference:n}=e,o=(i.offset||0)/2;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=n>pt?Math.floor(n/pt):0,0===n||e.innerRadius<0||e.outerRadius<0)return;t.save();let s=0;if(o){s=o/2;const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*s,Math.sin(i)*s),e.circumference>=gt&&(s=o)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor;const a=function(t,e,i){const{fullCircles:n,startAngle:o,circumference:s}=e;let a=e.endAngle;if(n){mo(t,e,i,o+pt);for(let e=0;e<n;++e)t.fill();isNaN(s)||(a=o+s%pt,s%pt==0&&(a+=pt))}return mo(t,e,i,a),t.fill(),a}(t,e,s);(function(t,e,i,n){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),c=e.innerRadius+a;let h;for(i&&go(t,e,s+pt),t.beginPath(),t.arc(n,o,c,s+pt,s,!0),h=0;h<r;++h)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+pt),h=0;h<r;++h)t.stroke()}(t,e,s),s&&go(t,e,n),mo(t,e,i,n),t.stroke())})(t,e,s,a),t.restore()}}function bo(t,e,i=e){t.lineCap=Y(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Y(i.borderDash,e.borderDash)),t.lineDashOffset=Y(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Y(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Y(i.borderWidth,e.borderWidth),t.strokeStyle=Y(i.borderColor,e.borderColor)}function _o(t,e,i){t.lineTo(i.x,i.y)}function yo(t,e,i={}){const n=t.length,{start:o=0,end:s=n-1}=i,{start:a,end:r}=e,l=Math.max(o,a),c=Math.min(s,r);return{count:n,start:l,loop:e.loop,ilen:c<l&&!(o<a&&s<a||o>r&&s>r)?n+c-l:c-l}}function vo(t,e,i,n){const{points:o,options:s}=e,{count:a,start:r,loop:l,ilen:c}=yo(o,i,n),h=function(t){return t.stepped?Kt:t.tension||"monotone"===t.cubicInterpolationMode?Gt:_o}(s);let d,u,f,{move:g=!0,reverse:p}=n||{};for(d=0;d<=c;++d)u=o[(r+(p?c-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):h(t,f,u,p,s.stepped),f=u);return l&&(u=o[(r+(p?c:0))%a],h(t,f,u,p,s.stepped)),!!l}function wo(t,e,i,n){const o=e.points,{count:s,start:a,ilen:r}=yo(o,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,g,p,m=0,x=0;const b=t=>(a+(c?r-t:t))%s,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=o[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=o[b(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function Mo(t){const e=t.options;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||e.borderDash&&e.borderDash.length?vo:wo}xo.id="arc",xo.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,angle:void 0},xo.defaultRoutes={backgroundColor:"backgroundColor"};const ko="function"==typeof Path2D;class So extends Ti{constructor(t){super(),this.animated=!0,this.options=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,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this,n=i.options;!n.tension&&"monotone"!==n.cubicInterpolationMode||n.stepped||i._pointsUpdated||(cn(i._points,n,t,n.spanGaps?i._loop:i._fullLoop,e),i._pointsUpdated=!0)}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=yn(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,e=t.length;return e&&this.points[t[e-1].end]}interpolate(t,e){const i=this,n=i.options,o=t[e],s=i.points,a=_n(i,{property:e,start:o,end:o});if(!a.length)return;const r=[],l=function(t){return t.stepped?dn:t.tension||"monotone"===t.cubicInterpolationMode?un:hn}(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:i,end:h}=a[c],d=s[i],u=s[h];if(d===u){r.push(d);continue}const f=l(d,u,Math.abs((o-d[e])/(u[e]-d[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Mo(this)(t,this,e,i)}path(t,e,i){const n=this,o=n.segments,s=Mo(n);let a=n._loop;e=e||0,i=i||n.points.length-e;for(const r of o)a&=s(t,n,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this;(o.points||[]).length&&(o.options||{}).borderWidth&&(t.save(),function(t,e,i,n){ko&&1===e.segments.length?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),bo(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,a=Mo(e);for(const r of o)bo(t,s,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}(t,o,i,n),t.restore(),o.animated&&(o._pointsUpdated=!1,o._path=void 0))}}function Po(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}So.id="line",So.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},So.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},So.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Do extends Ti{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,i){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Po(this,t,"x",e)}inYRange(t,e){return Po(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}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){const e=this,i=e.options;e.skip||i.radius<.1||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Yt(t,i,e.x,e.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Co(t,e){const{x:i,y:n,base:o,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,c,h,d;return t.horizontal?(d=a/2,r=Math.min(i,o),l=Math.max(i,o),c=n-d,h=n+d):(d=s/2,r=i-d,l=i+d,c=Math.min(n,o),h=Math.max(n,o)),{left:r,top:c,right:l,bottom:h}}function Oo(t){let e=t.options.borderSkipped;const i={};return e?(e=t.horizontal?To(e,"left","right",t.base>t.x):To(e,"bottom","top",t.base<t.y),i[e]=!0,i):i}function To(t,e,i,n){var o,s,a;return n?(a=i,t=Ao(t=(o=t)===(s=e)?a:o===a?s:o,i,e)):t=Ao(t,e,i),t}function Ao(t,e,i){return"start"===t?e:"end"===t?i:t}function Lo(t,e,i,n){return t?0:Math.max(Math.min(e,n),i)}function Ro(t,e,i,n){const o=null===e,s=null===i,a=t&&!(o&&s)&&Co(t,n);return a&&(o||e>=a.left&&e<=a.right)&&(s||i>=a.top&&i<=a.bottom)}function Eo(t,e){t.rect(e.x,e.y,e.w,e.h)}Do.id="point",Do.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Do.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Io extends Ti{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:n}=function(t){const e=Co(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=Oo(t),s=Te(n);return{t:Lo(o.top,s.top,0,i),r:Lo(o.right,s.right,0,e),b:Lo(o.bottom,s.bottom,0,i),l:Lo(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=Ae(o),a=Math.min(e,i),r=Oo(t),l=n||N(o);return{topLeft:Lo(!l||r.top||r.left,s.topLeft,0,a),topRight:Lo(!l||r.top||r.right,s.topRight,0,a),bottomLeft:Lo(!l||r.bottom||r.left,s.bottomLeft,0,a),bottomRight:Lo(!l||r.bottom||r.right,s.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}(this),o=(s=n.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?Qt:Eo;var s;t.save(),n.w===i.w&&n.h===i.h||(t.beginPath(),o(t,n),t.clip(),o(t,i),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),o(t,i),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return Ro(this,t,e,i)}inXRange(t,e){return Ro(this,t,null,e)}inYRange(t,e){return Ro(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Io.id="bar",Io.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},Io.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var zo=Object.freeze({__proto__:null,ArcElement:xo,LineElement:So,PointElement:Do,BarElement:Io});function Fo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Vo(t){t.data.datasets.forEach(t=>{Fo(t)})}var Bo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Vo(t);const n=t.width;t.data.datasets.forEach((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===Ee([a,t.options.indexAxis]))return;if("line"!==r.type)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let h,{start:d,count:u}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:a,max:r,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(o=Vt(te(e,s.axis,a).lo,0,i-1)),n=c?Vt(te(e,s.axis,r).hi+1,o,i)-o:i-o,{start:o,count:n}}(r,l);if(u<=4*n)Fo(e);else{switch(W(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":h=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(s-2);let l=0;const c=e+i-1;let h,d,u,f,g,p=e;for(a[l++]=t[p],h=0;h<s-2;h++){let n,o=0,s=0;const c=Math.floor((h+1)*r)+1+e,m=Math.min(Math.floor((h+2)*r)+1,i)+e,x=m-c;for(n=c;n<m;n++)o+=t[n].x,s+=t[n].y;o/=x,s/=x;const b=Math.floor(h*r)+1+e,_=Math.floor((h+1)*r)+1+e,{x:y,y:v}=t[p];for(u=f=-1,n=b;n<_;n++)f=.5*Math.abs((y-o)*(t[n].y-v)-(y-t[n].x)*(s-v)),f>u&&(u=f,d=t[n],g=n);a[l++]=d,p=g}return a[l++]=t[c],a}(l,d,u,n,i);break;case"min-max":h=function(t,e,i,n){let o,s,a,r,l,c,h,d,u,f,g=0,p=0;const m=[],x=t[e].x,b=t[e+i-1].x-x;for(o=e;o<e+i;++o){s=t[o],a=(s.x-x)/b*n,r=s.y;const e=0|a;if(e===l)r<u?(u=r,c=o):r>f&&(f=r,h=o),g=(p*g+s.x)/++p;else{const i=o-1;if(!W(c)&&!W(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:g}),n!==d&&n!==i&&m.push({...t[n],x:g})}o>0&&i!==d&&m.push(t[i]),m.push(s),l=e,p=0,u=f=r,c=h=d=o}}return m}(l,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=h}})},destroy(t){Vo(t)}};function Wo(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=Y(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(N(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return j(o)&&Math.floor(o)===o?("-"!==n[0]&&"+"!==n[0]||(o=e+o),!(o===e||o<0||o>=i)&&o):["origin","start","end","stack"].indexOf(n)>=0&&n}class Ho{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return t.arc(n,o,s,(e=e||{start:0,end:pt}).end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}const No=t=>"line"===t.type&&!t.hidden;function jo(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:a,last:r,point:l}=$o(s,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function $o(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,a=t.points;let r=!1,l=!1;for(let c=0;c<s.length;c++){const t=s[c],e=a[t.start][i],n=a[t.end][i];if(o>=e&&o<=n){r=o===e,l=o===n;break}}return{first:r,last:l,point:n}}function Yo(t,e){let i=[],n=!1;return H(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach(t=>{const e=o[t.start],a=o[t.end];null!==n?(s.push({x:e.x,y:n}),s.push({x:a.x,y:n})):null!==i&&(s.push({x:i,y:e.y}),s.push({x:i,y:a.y}))}),s}(t,e),i.length?new So({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Uo(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!j(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function Xo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function qo(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=zt(o),s=zt(s)),{property:t,start:o,end:s}}function Ko(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Go(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function Zo(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}function Qo(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(const r of n){const t=qo(i,o[r.start],o[r.end],r.loop);if(!e.segments){a.push({source:r,target:t,start:o[r.start],end:o[r.end]});continue}const n=_n(e,t);for(const e of n){const n=qo(i,s[e.start],s[e.end],e.loop),l=bn(r,o,n);for(const o of l)a.push({source:o,target:e,start:{[i]:Ko(t,n,"start",Math.max)},end:{[i]:Ko(t,n,"end",Math.min)}})}}return a}(i,n,o);for(const{source:l,target:c,start:h,end:d}of r){const{style:{backgroundColor:e=s}={}}=l;t.save(),t.fillStyle=e,Go(t,a,qo(o,h,d)),t.beginPath();const r=!!i.pathSegment(t,l);r?t.closePath():Zo(t,n,d,o);const u=!!n.pathSegment(t,c,{move:r,reverse:!0}),f=r&&u;f||Zo(t,n,h,o),t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function Jo(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(j(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{chart:e,scale:i,index:n,line:o}=t,s=[],a=o.segments,r=o.points,l=function(t,e){const i=[],n=t.getSortedVisibleDatasetMetas();for(let o=0;o<n.length;o++){const t=n[o];if(t.index===e)break;No(t)&&i.unshift(t.dataset)}return i}(e,n);l.push(Yo({x:null,y:i.bottom},o));for(let c=0;c<a.length;c++){const t=a[c];for(let e=t.start;e<=t.end;e++)jo(s,r[e],l)}return new So({points:s,options:{}})}(t);const o=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=[],a=n.reverse?e.max:e.min;let r,l,c;if(c="start"===i?a:"end"===i?n.reverse?e.min:e.max:N(i)?i.value:e.getBaseValue(),n.grid.circular)return l=e.getPointPositionForValue(0,a),new Ho({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(c)});for(r=0;r<o;++r)s.push(e.getPointPositionForValue(r,c));return s}(t):function(t){const{scale:e={},fill:i}=t;let n,o=null;return"start"===i?o=e.bottom:"end"===i?o=e.top:N(i)?o=e.getPixelForValue(i.value):e.getBasePixel&&(o=e.getBasePixel()),j(o)?(n=e.isHorizontal(),{x:n?o:null,y:n?null:o}):null}(t)}(t);return o instanceof Ho?o:Yo(o,n)}(e),{line:o,scale:s,axis:a}=e,r=o.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};n&&o.points.length&&(Xt(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==o&&(Xo(t,n,a.top),Qo(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),Xo(t,n,a.bottom)),Qo(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(t,{line:o,target:n,above:h,below:d,area:i,scale:s,axis:a}),qt(t))}var ts={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,a,r,l;for(a=0;a<n;++a)s=t.getDatasetMeta(a),r=s.dataset,l=null,r&&r.options&&r instanceof So&&(l={visible:t.isDatasetVisible(a),index:a,fill:Wo(r,a,n),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:r}),s.$filler=l,o.push(l);for(a=0;a<n;++a)l=o[a],l&&!1!==l.fill&&(l.fill=Uo(o,a,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let a=o.length-1;a>=0;--a){const e=o[a].$filler;e&&(e.line.updateControlPoints(s,e.axis),n&&Jo(t.ctx,e,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let o=n.length-1;o>=0;--o){const e=n[o].$filler;e&&Jo(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&Jo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const es=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class is extends Ti{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,i){const n=this;n.maxWidth=t,n.maxHeight=e,n._margins=i,n.setDimensions(),n.buildLabels(),n.fit()}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height)}buildLabels(){const t=this,e=t.options.labels||{};let i=q(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(i=>e.filter(i,t.chart.data))),e.sort&&(i=i.sort((i,n)=>e.sort(i,n,t.chart.data))),t.options.reverse&&i.reverse(),t.legendItems=i}fit(){const t=this,{options:e,ctx:i}=t;if(!e.display)return void(t.width=t.height=0);const n=e.labels,o=Re(n.font),s=o.size,a=t._computeTitleHeight(),{boxWidth:r,itemHeight:l}=es(n,s);let c,h;i.font=o.string,t.isHorizontal()?(c=t.maxWidth,h=t._fitRows(a,s,r,l)+10):(h=t.maxHeight,c=t._fitCols(a,s,r,l)+10),t.width=Math.min(c,e.maxWidth||t.maxWidth),t.height=Math.min(h,e.maxHeight||t.maxHeight)}_fitRows(t,e,i,n){const o=this,{ctx:s,maxWidth:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.lineWidths=[0],h=n+r;let d=t;s.textAlign="left",s.textBaseline="middle";let u=-1,f=-h;return o.legendItems.forEach((t,o)=>{const g=i+e/2+s.measureText(t.text).width;(0===o||c[c.length-1]+g+2*r>a)&&(d+=h,c[c.length-(o>0?0:1)]=0,f+=h,u++),l[o]={left:0,top:f,row:u,width:g,height:n},c[c.length-1]+=g+r}),d}_fitCols(t,e,i,n){const o=this,{ctx:s,maxHeight:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0,m=0;return o.legendItems.forEach((t,o)=>{const a=i+e/2+s.measureText(t.text).width;o>0&&f+e+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,m++,p=0,u=f=0),u=Math.max(u,a),f+=e+r,l[o]={left:g,top:p,col:m,width:a,height:n},p+=n+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){const t=this;if(!t.options.display)return;const e=t._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s}}}=t;if(this.isHorizontal()){let a=0,r=o(n,t.left+s,t.right-t.lineWidths[a]);for(const l of i)a!==l.row&&(a=l.row,r=o(n,t.left+s,t.right-t.lineWidths[a])),l.top+=t.top+e+s,l.left=r,r+=l.width+s}else{let a=0,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height);for(const l of i)l.col!==a&&(a=l.col,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height)),l.top=r,l.left+=t.left+s,r+=l.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const t=this;if(t.options.display){const e=t.ctx;Xt(e,t),t._draw(),qt(e)}}_draw(){const t=this,{options:e,columnSizes:i,lineWidths:n,ctx:a}=t,{align:r,labels:l}=e,c=ft.color,h=fn(e.rtl,t.left,t.width),d=Re(l.font),{color:u,padding:f}=l,g=d.size,p=g/2;let m;t.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:x,boxHeight:b,itemHeight:_}=es(l,g),y=t.isHorizontal(),v=this._computeTitleHeight();m=y?{x:o(r,t.left+f,t.right-n[0]),y:t.top+f+v,line:0}:{x:t.left+f,y:o(r,t.top+v+f,t.bottom-i[0].height),line:0},gn(t.ctx,e.textDirection);const w=_+f;t.legendItems.forEach((e,M)=>{a.strokeStyle=e.fontColor||u,a.fillStyle=e.fontColor||u;const k=a.measureText(e.text).width,S=h.textAlign(e.textAlign||(e.textAlign=l.textAlign)),P=x+g/2+k;let D=m.x,C=m.y;h.setWidth(t.width),y?M>0&&D+P+f>t.right&&(C=m.y+=w,m.line++,D=m.x=o(r,t.left+f,t.right-n[m.line])):M>0&&C+w>t.bottom&&(D=m.x=D+i[m.line].width+f,m.line++,C=m.y=o(r,t.top+v+f,t.bottom-i[m.line].height)),function(t,e,i){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;a.save();const n=Y(i.lineWidth,1);if(a.fillStyle=Y(i.fillStyle,c),a.lineCap=Y(i.lineCap,"butt"),a.lineDashOffset=Y(i.lineDashOffset,0),a.lineJoin=Y(i.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=Y(i.strokeStyle,c),a.setLineDash(Y(i.lineDash,[])),l.usePointStyle){const o={radius:x*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=h.xPlus(t,x/2);Yt(a,o,s,e+p)}else{const o=e+Math.max((g-b)/2,0),s=h.leftForLtr(t,x),r=Ae(i.borderRadius);a.beginPath(),Object.values(r).some(t=>0!==t)?Qt(a,{x:s,y:o,w:x,h:b,radius:r}):a.rect(s,o,x,b),a.fill(),0!==n&&a.stroke()}a.restore()}(h.x(D),C,e),D=s(S,D+x+p,t.right),function(t,e,i){Zt(a,i.text,t,e+_/2,d,{strikethrough:i.hidden,textAlign:i.textAlign})}(h.x(D),C,e),y?m.x+=P+f:m.y+=w}),pn(t.ctx,e.textDirection)}drawTitle(){const t=this,e=t.options,i=e.title,s=Re(i.font),a=Le(i.padding);if(!i.display)return;const r=fn(e.rtl,t.left,t.width),l=t.ctx,c=i.position,h=a.top+s.size/2;let d,u=t.left,f=t.width;if(this.isHorizontal())f=Math.max(...t.lineWidths),d=t.top+h,u=o(e.align,u,t.right-f);else{const i=t.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);d=h+o(e.align,t.top,t.bottom-i-e.labels.padding-t._computeTitleHeight())}const g=o(c,u,u+f);l.textAlign=r.textAlign(n(c)),l.textBaseline="middle",l.strokeStyle=i.color,l.fillStyle=i.color,l.font=s.string,Zt(l,i.text,g,d,s)}_computeTitleHeight(){const t=this.options.title,e=Re(t.font),i=Le(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){const i=this;let n,o,s;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(s=i.legendHitBoxes,n=0;n<s.length;++n)if(o=s[n],t>=o.left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null}handleEvent(t){const e=this,i=e.options;if(!function(t,e){return!("mousemove"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,i))return;const n=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=e._hoveredItem,r=(s=n,null!==(o=a)&&null!==s&&o.datasetIndex===s.datasetIndex&&o.index===s.index);a&&!r&&q(i.onLeave,[t,a,e],e),e._hoveredItem=n,n&&!r&&q(i.onHover,[t,n,e],e)}else n&&q(i.onClick,[t,n,e],e);var o,s}}var ns={id:"legend",_element:is,start(t,e,i){const n=t.legend=new is({ctx:t.ctx,options:i,chart:t});Ue.configure(t,n,i),Ue.addBox(t,n)},stop(t){Ue.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Ue.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const a=t.controller.getStyle(i?0:void 0),r=Le(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:o||a.textAlign,borderRadius:0,datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class os extends Ti{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 i=this,n=i.options;if(i.left=0,i.top=0,!n.display)return void(i.width=i.height=i.right=i.bottom=0);i.width=i.right=t,i.height=i.bottom=e;const o=H(n.text)?n.text.length:1;i._padding=Le(n.padding);const s=o*Re(n.font).lineHeight+i._padding.height;i.isHorizontal()?i.height=s:i.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:a}=this,r=a.align;let l,c,h,d=0;return this.isHorizontal()?(c=o(r,i,s),h=e+t,l=s-i):("left"===a.position?(c=i+t,h=o(r,n,e),d=-.5*gt):(c=s-t,h=o(r,e,n),d=.5*gt),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){const t=this,e=t.ctx,i=t.options;if(!i.display)return;const o=Re(i.font),s=o.lineHeight/2+t._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=t._drawArgs(s);Zt(e,i.text,0,0,o,{color:i.color,maxWidth:l,rotation:c,textAlign:n(i.align),textBaseline:"middle",translation:[a,r]})}}var ss={id:"title",_element:os,start(t,e,i){!function(t,e){const i=new os({ctx:t.ctx,options:e,chart:t});Ue.configure(t,i,e),Ue.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){Ue.removeBox(t,t.titleBlock),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Ue.configure(t,n,i),n.options=i},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 as={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Et(e,n.getCenterPoint());t<r&&(r=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function rs(t,e){return e&&(H(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ls(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function cs(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function hs(t,e){const i=t._chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Re(e.bodyFont),c=Re(e.titleFont),h=Re(e.footerFont),d=s.length,u=o.length,f=n.length,g=Le(e.padding);let p=g.height,m=0,x=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x&&(p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,K(t.title,_),i.font=l.string,K(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2:0,K(n,t=>{K(t.before,_),K(t.lines,_),K(t.after,_)}),b=0,i.font=h.string,K(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function ds(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let c="center";return"center"===n?c=o<=(r+l)/2?"left":"right":o<=s/2?c="left":o>=a-s/2&&(c="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(c,t,e,i)&&(c="center"),c}function us(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||ds(t,e,i,n),yAlign:n}}function fs(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,c=o+s,h=a+s;let d=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const u=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,c);return"center"===l?"left"===r?d+=c:"right"===r&&(d-=c):"left"===r?d-=h:"right"===r&&(d+=h),{x:Vt(d,0,n.width-e.width),y:Vt(u,0,n.height-e.height)}}function gs(t,e,i){const n=Le(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function ps(t){return rs([],ls(t))}function ms(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class xs extends Ti{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,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,e=t._cachedAnimations;if(e)return e;const i=t._chart,n=t.options.setContext(t.getContext()),o=n.enabled&&i.options.animation&&n.animations,s=new xi(t._chart,o);return o._cacheable&&(t._cachedAnimations=Object.freeze(s)),s}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),i=t,n=t._tooltipItems,Object.assign(Object.create(e),{tooltip:i,tooltipItems:n,type:"tooltip"})));var e,i,n}getTitle(t,e){const i=this,{callbacks:n}=e,o=n.beforeTitle.apply(i,[t]),s=n.title.apply(i,[t]),a=n.afterTitle.apply(i,[t]);let r=[];return r=rs(r,ls(o)),r=rs(r,ls(s)),r=rs(r,ls(a)),r}getBeforeBody(t,e){return ps(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const i=this,{callbacks:n}=e,o=[];return K(t,t=>{const e={before:[],lines:[],after:[]},s=ms(n,t);rs(e.before,ls(s.beforeLabel.call(i,t))),rs(e.lines,s.label.call(i,t)),rs(e.after,ls(s.afterLabel.call(i,t))),o.push(e)}),o}getAfterBody(t,e){return ps(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const i=this,{callbacks:n}=e,o=n.beforeFooter.apply(i,[t]),s=n.footer.apply(i,[t]),a=n.afterFooter.apply(i,[t]);let r=[];return r=rs(r,ls(o)),r=rs(r,ls(s)),r=rs(r,ls(a)),r}_createItems(t){const e=this,i=e._active,n=e._chart.data,o=[],s=[],a=[];let r,l,c=[];for(r=0,l=i.length;r<l;++r)c.push(cs(e._chart,i[r]));return t.filter&&(c=c.filter((e,i,o)=>t.filter(e,i,o,n))),t.itemSort&&(c=c.sort((e,i)=>t.itemSort(e,i,n))),K(c,i=>{const n=ms(t.callbacks,i);o.push(n.labelColor.call(e,i)),s.push(n.labelPointStyle.call(e,i)),a.push(n.labelTextColor.call(e,i))}),e.labelColors=o,e.labelPointStyles=s,e.labelTextColors=a,e.dataPoints=c,c}update(t,e){const i=this,n=i.options.setContext(i.getContext()),o=i._active;let s,a=[];if(o.length){const t=as[n.position].call(i,o,i._eventPosition);a=i._createItems(n),i.title=i.getTitle(a,n),i.beforeBody=i.getBeforeBody(a,n),i.body=i.getBody(a,n),i.afterBody=i.getAfterBody(a,n),i.footer=i.getFooter(a,n);const e=i._size=hs(i,n),r=Object.assign({},t,e),l=us(i._chart,n,r),c=fs(n,r,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,s={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(s={opacity:0});i._tooltipItems=a,i.$context=void 0,s&&i._resolveAnimations().update(i,s),t&&n.external&&n.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{cornerRadius:s,caretSize:a}=i,{x:r,y:l}=t,{width:c,height:h}=e;let d,u,f,g,p,m;return"center"===o?(p=l+h/2,"left"===n?(d=r,u=d-a,g=p+a,m=p-a):(d=r+c,u=d+a,g=p-a,m=p+a),f=d):(u="left"===n?r+s+a:"right"===n?r+c-s-a:this.caretX,"top"===o?(g=l,p=g-a,d=u-a,f=u+a):(g=l+h,p=g+a,d=u+a,f=u-a),m=g),{x1:d,x2:u,x3:f,y1:g,y2:p,y3:m}}drawTitle(t,e,i){const n=this,o=n.title,s=o.length;let a,r,l;if(s){const c=fn(i.rtl,n.x,n.width);for(t.x=gs(n,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=Re(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<s;++l)e.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this,a=s.labelColors[i],r=s.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,h=Re(o.bodyFont),d=gs(s,"left",o),u=n.x(d),f=e.y+(l<h.lineHeight?(h.lineHeight-l)/2:0);if(o.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(u,c)+c/2,s=f+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Yt(t,e,i,s),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Yt(t,e,i,s)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=n.leftForLtr(u,c),i=n.leftForLtr(n.xPlus(u,1),c-2),s=Ae(a.borderRadius);Object.values(s).some(t=>0!==t)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Qt(t,{x:e,y:f,w:c,h:l,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Qt(t,{x:i,y:f+1,w:c-2,h:l-2,radius:s}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,f,c,l),t.strokeRect(e,f,c,l),t.fillStyle=a.backgroundColor,t.fillRect(i,f+1,c-2,l-2))}t.fillStyle=s.labelTextColors[i]}drawBody(t,e,i){const n=this,{body:o}=n,{bodySpacing:s,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c}=i,h=Re(i.bodyFont);let d=h.lineHeight,u=0;const f=fn(i.rtl,n.x,n.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},p=f.textAlign(a);let m,x,b,_,y,v,w;for(e.textAlign=a,e.textBaseline="middle",e.font=h.string,t.x=gs(n,p,i),e.fillStyle=i.bodyColor,K(n.beforeBody,g),u=r&&"right"!==p?"center"===a?c/2+1:c+2:0,_=0,v=o.length;_<v;++_){for(m=o[_],x=n.labelTextColors[_],e.fillStyle=x,K(m.before,g),b=m.lines,r&&b.length&&(n._drawColorBox(e,t,_,f,i),d=Math.max(h.lineHeight,l)),y=0,w=b.length;y<w;++y)g(b[y]),d=h.lineHeight;K(m.after,g)}u=0,d=h.lineHeight,K(n.afterBody,g),t.y-=s}drawFooter(t,e,i){const n=this,o=n.footer,s=o.length;let a,r;if(s){const l=fn(i.rtl,n.x,n.width);for(t.x=gs(n,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=Re(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<s;++r)e.fillText(o[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:a,y:r}=t,{width:l,height:c}=i,h=n.cornerRadius;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+h,r),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-h,r),e.quadraticCurveTo(a+l,r,a+l,r+h),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(a+l,r+c-h),e.quadraticCurveTo(a+l,r+c,a+l-h,r+c),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+h,r+c),e.quadraticCurveTo(a,r+c,a,r+c-h),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(a,r+h),e.quadraticCurveTo(a,r,a+h,r),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,n=e.$animations,o=n&&n.x,s=n&&n.y;if(o||s){const n=as[t.position].call(e,e._active,e._eventPosition);if(!n)return;const a=e._size=hs(e,t),r=Object.assign({},n,e._size),l=us(i,t,r),c=fs(t,r,l,i);o._to===c.x&&s._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=a.width,e.height=a.height,e.caretX=n.x,e.caretY=n.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,i=e.options.setContext(e.getContext());let n=e.opacity;if(!n)return;e._updateAnimationTarget(i);const o={width:e.width,height:e.height},s={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;const a=Le(i.padding);i.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=n,e.drawBackground(s,t,o,i),gn(t,i.textDirection),s.y+=a.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),pn(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this,n=i._active,o=t.map(({datasetIndex:t,index:e})=>{const n=i._chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}),s=!G(n,o),a=i._positionChanged(o,e);(s||a)&&(i._active=o,i._eventPosition=e,i.update(!0))}handleEvent(t,e){const i=this,n=i.options,o=i._active||[];let s=!1,a=[];"mouseout"!==t.type&&(a=i._chart.getElementsAtEventForMode(t,n.mode,n,e),n.reverse&&a.reverse());const r=i._positionChanged(a,t);return s=e||!G(a,o)||r,s&&(i._active=a,(n.enabled||n.external)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0,e))),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=as[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}xs.positioners=as;var bs=Object.freeze({__proto__:null,Decimation:Bo,Filler:ts,Legend:ns,Title:ss,Tooltip:{id:"tooltip",_element:xs,positioners:as,afterInit(t,e,i){i&&(t.tooltip=new xs({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){t.tooltip&&t.tooltip.handleEvent(e.event,e.replay)&&(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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!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:V,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:V,beforeBody:V,beforeLabel:V,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return W(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:V,afterBody:V,beforeFooter:V,footer:V,afterFooter:V}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});class _s extends Ni{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(W(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Vt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i){const n=t.indexOf(e);return-1===n?((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i):n!==t.lastIndexOf(e)?i:n}(i,t,Y(e,t)),i.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let{min:n,max:o}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(n=0),i||(o=t.getLabels().length-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.min,i=t.max,n=t.options.offset,o=[];let s=t.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),t._valueRange=Math.max(s.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(let a=e;a<=i;a++)o.push({value:a});return o}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const e=this;return"number"!=typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}function ys(t,e,{horizontal:i,minRotation:n}){const o=Tt(n),s=(i?Math.sin(o):Math.cos(o))||.001;return Math.min(e/s,.75*e*(""+t).length)}_s.id="category",_s.defaults={ticks:{callback:_s.prototype.getLabelForValue}};class vs extends Ni{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 W(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e}=t.options,{minDefined:i,maxDefined:n}=t.getUserBounds();let{min:o,max:s}=t;const a=t=>o=i?o:t,r=t=>s=n?s:t;if(e){const t=Mt(o),e=Mt(s);t<0&&e<0?r(0):t>0&&e>0&&a(0)}o===s&&(r(s+1),e||a(o-1)),t.min=o,t.max=s}getTickLimit(){const t=this,e=t.options.ticks;let i,{maxTicksLimit:n,stepSize:o}=e;return o?i=Math.ceil(t.max/o)-Math.floor(t.min/o)+1:(i=t.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,i=e.ticks;let n=t.getTickLimit();n=Math.max(2,n);const o=function(t,e){const i=[],{bounds:n,step:o,min:s,max:a,precision:r,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=o||1,f=c-1,{min:g,max:p}=e,m=!W(s),x=!W(a),b=!W(l),_=(p-g)/(h+1);let y,v,w,M,k=kt((p-g)/f/u)*u;if(k<1e-14&&!m&&!x)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=kt(M*k/f/u)*u),W(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===n?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&x&&o&&Ct((a-s)/o,k/1e3)?(M=Math.min((a-s)/k,c),k=(a-s)/M,v=s,w=a):b?(v=m?s:v,w=x?a:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=Dt(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(Lt(k),Lt(v));y=Math.pow(10,W(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let P=0;for(m&&(d&&v!==s?(i.push({value:s}),v<s&&P++,Dt(Math.round((v+P*k)*y)/y,s,ys(s,_,t))&&P++):v<s&&P++);P<M;++P)i.push({value:Math.round((v+P*k)*y)/y});return x&&d&&w!==a?Dt(i[i.length-1].value,a,ys(a,_,t))?i[i.length-1].value=a:i.push({value:a}):x&&w!==a||i.push({value:w}),i}({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:t._maxDigits(),horizontal:t.isHorizontal(),minRotation:i.minRotation||0,includeBounds:!1!==i.includeBounds},t._range||t);return"ticks"===e.bounds&&Ot(o,t,"value"),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o}configure(){const t=this,e=t.ticks;let i=t.min,n=t.max;if(super.configure(),t.options.offset&&e.length){const t=(n-i)/Math.max(e.length-1,1)/2;i-=t,n+=t}t._startValue=i,t._endValue=n,t._valueRange=n-i}getLabelForValue(t){return Li(t,this.chart.options.locale)}}class ws extends vs{determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=j(e)?e:0,t.max=j(i)?i:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this,e=t.isHorizontal(),i=e?t.width:t.height,n=Tt(t.options.ticks.minRotation),o=(e?Math.sin(n):Math.cos(n))||.001,s=t._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,s.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ms(t){return 1==t/Math.pow(10,Math.floor(wt(t)))}ws.id="linear",ws.defaults={ticks:{callback:Ei.formatters.numeric}};class ks extends Ni{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=vs.prototype.parse.apply(this,[t,e]);if(0!==i)return j(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=j(e)?Math.max(0,e):null,t.max=j(i)?Math.max(0,i):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let n=t.min,o=t.max;const s=t=>n=e?n:t,a=t=>o=i?o:t,r=(t,e)=>Math.pow(10,Math.floor(wt(t))+e);n===o&&(n<=0?(s(1),a(10)):(s(r(n,-1)),a(r(o,1)))),n<=0&&s(r(o,-1)),o<=0&&a(r(n,1)),t._zero&&t.min!==t._suggestedMin&&n===r(t.min,0)&&s(r(n,-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(wt(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=$(t.min,Math.pow(10,Math.floor(wt(e.min)))),a=Math.floor(wt(s)),r=Math.floor(s/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push({value:s,major:Ms(s)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),s=Math.round(r*Math.pow(10,a)*l)/l}while(a<i||a===i&&r<n);const c=$(t.max,s);return o.push({value:c,major:Ms(s)}),o}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&Ot(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":Li(t,this.chart.options.locale)}configure(){const t=this,e=t.min;super.configure(),t._startValue=wt(e),t._valueRange=wt(t.max)-wt(e)}getPixelForValue(t){const e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(wt(t)-e._startValue)/e._valueRange)}getValueForPixel(t){const e=this,i=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+i*e._valueRange)}}function Ss(t){const e=t.ticks;if(e.display&&t.display){const t=Le(e.backdropPadding);return Y(e.font&&e.font.size,ft.font.size)+t.height}return 0}function Ps(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Ds(t){return 0===t||180===t?"center":t<180?"left":"right"}function Cs(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function Os(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,pt);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}function Ts(t){return Pt(t)?t:0}ks.id="logarithmic",ks.defaults={ticks:{callback:Ei.formatters.logarithmic,major:{enabled:!0}}};class As extends vs{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Ss(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!1);t.min=j(e)&&!isNaN(e)?e:0,t.max=j(i)&&!isNaN(i)?i:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ss(this.options))}generateTickLabels(t){const e=this;vs.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map((t,i)=>{const n=q(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""})}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?function(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={};let n,o,s;const a=[],r=[],l=t.getLabels().length;for(n=0;n<l;n++){const l=t.options.pointLabels.setContext(t.getContext(n));r[n]=l.padding,s=t.getPointPosition(n,t.drawingArea+r[n]);const u=Re(l.font);t.ctx.font=u.string,c=t.ctx,h=u.lineHeight,o=H(d=t._pointLabels[n])?{w:Nt(c,c.font,d),h:d.length*h}:{w:c.measureText(d).width,h:h},a[n]=o;const f=t.getIndexAngle(n),g=At(f),p=Ps(g,s.x,o.w,0,180),m=Ps(g,s.y,o.h,90,270);p.start<e.l&&(e.l=p.start,i.l=f),p.end>e.r&&(e.r=p.end,i.r=f),m.start<e.t&&(e.t=m.start,i.t=f),m.end>e.b&&(e.b=m.end,i.b=f)}var c,h,d;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=[];const u=t.options,f=Ss(u),g=t.getDistanceFromCenterForValue(u.ticks.reverse?t.min:t.max);for(n=0;n<l;n++){const e=t.getPointPosition(n,g+(0===n?f/2:0)+r[n]),i=At(t.getIndexAngle(n)),o=a[n];Cs(i,o,e);const s=Ds(i);let l;l="left"===s?e.x:"center"===s?e.x-o.w/2:e.x-o.w,t._pointLabelItems[n]={x:e.x,y:e.y,textAlign:s,left:l,top:e.y,right:l+o.w,bottom:e.y+o.h}}}(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){const n=this;let o=e.l/Math.sin(i.l),s=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);o=Ts(o),s=Ts(s),a=Ts(a),r=Ts(r),n.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(o+s)/2),Math.floor(t-(a+r)/2))),n.setCenterPoint(o,s,a,r)}setCenterPoint(t,e,i,n){const o=this,s=i+o.drawingArea,a=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((t+o.drawingArea+(o.width-e-o.drawingArea))/2+o.left),o.yCenter=Math.floor((s+a)/2+o.top+o.paddingTop)}getIndexAngle(t){return zt(t*(pt/this.getLabels().length)+Tt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){const e=this;if(W(t))return NaN;const i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i}getValueForDistanceFromCenter(t){if(W(t))return NaN;const e=this,i=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-i:e.min+i}getPointPosition(t,e){const i=this,n=i.getIndexAngle(t)-_t;return{x:Math.cos(n)*e+i.xCenter,y:Math.sin(n)*e+i.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:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const t=this,{backgroundColor:e,grid:{circular:i}}=t.options;if(e){const n=t.ctx;n.save(),n.beginPath(),Os(t,t.getDistanceFromCenterForValue(t._endValue),i,t.getLabels().length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const t=this,e=t.ctx,i=t.options,{angleLines:n,grid:o}=i,s=t.getLabels().length;let a,r,l;if(i.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getContext(o)),s=Re(e.font),{x:a,y:r,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:f}=e;if(!W(f)){const t=Le(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}Zt(i,t._pointLabels[o],a,r+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,s),o.display&&t.ticks.forEach((e,i)=>{if(0!==i){r=t.getDistanceFromCenterForValue(e.value);const n=o.setContext(t.getContext(i-1));!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:a,lineWidth:r}=e;!s&&!n||!a||!r||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=r,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Os(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(t,n,r,s)}}),n.display){for(e.save(),a=t.getLabels().length-1;a>=0;a--){const o=n.setContext(t.getContext(a)),{color:s,lineWidth:c}=o;c&&s&&(e.lineWidth=c,e.strokeStyle=s,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),l=t.getPointPosition(a,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const t=this,e=t.ctx,i=t.options,n=i.ticks;if(!n.display)return;const o=t.getIndexAngle(0);let s,a;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach((o,r)=>{if(0===r&&!i.reverse)return;const l=n.setContext(t.getContext(r)),c=Re(l.font);if(s=t.getDistanceFromCenterForValue(t.ticks[r].value),l.showLabelBackdrop){a=e.measureText(o.label).width,e.fillStyle=l.backdropColor;const t=Le(l.backdropPadding);e.fillRect(-a/2-t.left,-s-c.size/2-t.top,a+t.width,c.size+t.height)}Zt(e,o.label,0,-s,c,{color:l.color})}),e.restore()}drawTitle(){}}As.id="radialLinear",As.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ei.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},As.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},As.descriptors={angleLines:{_fallback:"grid"}};const Ls={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}},Rs=Object.keys(Ls);function Es(t,e){return t-e}function Is(t,e){if(W(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),j(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(o&&(a="week"!==o||!Pt(s)&&!0!==s?i.startOf(a,o):i.startOf(a,"isoWeek",s)),+a)}function zs(t,e,i,n){const o=Rs.length;for(let s=Rs.indexOf(t);s<o-1;++s){const t=Ls[Rs[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return Rs[s]}return Rs[o-1]}function Fs(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=Jt(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function Vs(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a<s;++a)r=e[a],o[r]=a,n.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=s;r<=a;r=+o.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class Bs extends Ni{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 i=t.time||(t.time={}),n=this._adapter=new Jn._date(t.adapters.date);et(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Is(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,i=t._adapter,n=e.time.unit||"day";let{min:o,max:s,minDefined:a,maxDefined:r}=t.getUserBounds();function l(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}a&&r||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),o=j(o)&&!isNaN(o)?o:+i.startOf(Date.now(),n),s=j(s)&&!isNaN(s)?s:+i.endOf(Date.now(),n)+1,t.min=Math.min(o,s-1),t.max=Math.max(o+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this,e=t.options,i=e.time,n=e.ticks,o="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&o.length&&(t.min=t._userMin||o[0],t.max=t._userMax||o[o.length-1]);const s=t.min,a=ie(o,s,t.max);return t._unit=i.unit||(n.autoSkip?zs(i.minUnit,t.min,t.max,t._getLabelCapacity(s)):function(t,e,i,n,o){for(let s=Rs.length-1;s>=Rs.indexOf(i);s--){const i=Rs[s];if(Ls[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return Rs[i?Rs.indexOf(i):0]}(t,a.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(let e=Rs.indexOf(t)+1,i=Rs.length;e<i;++e)if(Ls[Rs[e]].common)return Rs[e]}(t._unit):void 0,t.initOffsets(o),e.reverse&&a.reverse(),Vs(t,a,t._majorUnit)}initOffsets(t){const e=this;let i,n,o=0,s=0;e.options.offset&&t.length&&(i=e.getDecimalForValue(t[0]),o=1===t.length?1-i:(e.getDecimalForValue(t[1])-i)/2,n=e.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-e.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Vt(o,0,a),s=Vt(s,0,a),e._offsets={start:o,end:s,factor:1/(o+1+s)}}_generate(){const t=this,e=t._adapter,i=t.min,n=t.max,o=t.options,s=o.time,a=s.unit||zs(s.minUnit,i,n,t._getLabelCapacity(i)),r=Y(s.stepSize,1),l="week"===a&&s.isoWeekday,c=Pt(l)||!0===l,h={};let d,u,f=i;if(c&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,c?"day":a),e.diff(n,i,a)>1e5*r)throw new Error(i+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g="data"===o.ticks.source&&t.getDataTimestamps();for(d=f,u=0;d<n;d=+e.add(d,r,a),u++)Fs(h,d,g);return d!==n&&"ticks"!==o.bounds&&1!==u||Fs(h,d,g),Object.keys(h).sort((t,e)=>t-e).map(t=>+t)}getLabelForValue(t){const e=this.options.time;return this._adapter.format(t,e.tooltipFormat?e.tooltipFormat:e.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this,s=o.options,a=s.time.displayFormats,r=o._unit,l=o._majorUnit,c=l&&a[l],h=i[e],d=o._adapter.format(t,n||(l&&c&&h&&h.major?c:r&&a[r])),u=s.ticks.callback;return u?q(u,[d,e,i],o):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){const e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}getPixelForValue(t){const e=this,i=e._offsets,n=e.getDecimalForValue(t);return e.getPixelForDecimal((i.start+n)*i.factor)}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return e.min+n*(e.max-e.min)}_getLabelSize(t){const e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=Tt(e.isHorizontal()?i.maxRotation:i.minRotation),s=Math.cos(o),a=Math.sin(o),r=e._resolveTickFontOptions(0).size;return{w:n*s+r*a,h:n*a+r*s}}_getLabelCapacity(t){const e=this,i=e.options.time,n=i.displayFormats,o=n[i.unit]||n.millisecond,s=e._tickFormatFunction(t,0,Vs(e,[t],e._majorUnit),o),a=e._getLabelSize(s),r=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h)-1;return r>0?r:1}getDataTimestamps(){const t=this;let e,i,n=t._cache.data||[];if(n.length)return n;const o=t.getMatchingVisibleMetas();if(t._normalized&&o.length)return t._cache.data=o[0].controller.getAllParsedValues(t);for(e=0,i=o.length;e<i;++e)n=n.concat(o[e].controller.getAllParsedValues(t));return t._cache.data=t.normalize(n)}getLabelTimestamps(){const t=this,e=t._cache.labels||[];let i,n;if(e.length)return e;const o=t.getLabels();for(i=0,n=o.length;i<n;++i)e.push(Is(t,o[i]));return t._cache.labels=t._normalized?e:t.normalize(e)}normalize(t){return ae(t.sort(Es))}}function Ws(t,e,i){let n,o,s,a;if(i)n=Math.floor(e),o=Math.ceil(e),s=t[n],a=t[o];else{const i=Jt(t,e);s=i.lo,a=i.hi,n=t[s],o=t[a]}const r=o-n;return r?s+(a-s)*(e-n)/r:s}Bs.id="time",Bs.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Hs extends Bs{constructor(t){super(t),this._table=[],this._maxIndex=void 0}initOffsets(){const t=this,e=t._getTimestampsForTable();t._table=t.buildLookupTable(e),t._maxIndex=t._table.length-1,super.initOffsets(e)}buildLookupTable(t){const{min:e,max:i}=this;if(!t.length)return[{time:e,pos:0},{time:i,pos:1}];const n=[e];let o,s,a;for(o=0,s=t.length;o<s;++o)a=t[o],a>e&&a<i&&n.push(a);return n.push(i),n}_getTimestampsForTable(){const t=this;let e=t._cache.all||[];if(e.length)return e;const i=t.getDataTimestamps(),n=t.getLabelTimestamps();return e=i.length&&n.length?t.normalize(i.concat(n)):i.length?i:n,e=t._cache.all=e,e}getPixelForValue(t,e){const i=this,n=i._offsets,o=i._normalized&&i._maxIndex>0&&!W(e)?e/i._maxIndex:i.getDecimalForValue(t);return i.getPixelForDecimal((n.start+o)*n.factor)}getDecimalForValue(t){return Ws(this._table,t)/this._maxIndex}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return Ws(e._table,n*this._maxIndex,!0)}}Hs.id="timeseries",Hs.defaults=Bs.defaults;var Ns=Object.freeze({__proto__:null,CategoryScale:_s,LinearScale:ws,LogarithmicScale:ks,RadialLinearScale:As,TimeScale:Bs,TimeSeriesScale:Hs});return qn.register(fo,Ns,zo,bs),qn.helpers={...Mn},qn._adapters=Jn,qn.Animation=pi,qn.Animations=xi,qn.animator=a,qn.controllers=Sn.controllers.items,qn.DatasetController=Oi,qn.Element=Ti,qn.elements=zo,qn.Interaction=Se,qn.layouts=Ue,qn.platforms=li,qn.Scale=Ni,qn.Ticks=Ei,Object.assign(qn,fo,Ns,zo,bs,li),qn.Chart=qn,"undefined"!=typeof window&&(window.Chart=qn),qn});
(self.webpackChunkhots_angular_elements=self.webpackChunkhots_angular_elements||[]).push([[179],{255:t=>{function e(t){return Promise.resolve().then(()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}e.keys=()=>[],e.resolve=e,e.id=255,t.exports=e},418:(t,e,n)=>{"use strict";function s(t){return"function"==typeof t}let i=!1;const r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=t},get useDeprecatedSynchronousErrorHandling(){return i}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(r.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const h=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let u=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_unsubscribe:i,_subscriptions:r}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;t<n.length;++t)n[t].remove(this);if(s(i))try{i.call(this)}catch(o){e=o instanceof h?d(o.errors):[o]}if(l(r)){let t=-1,n=r.length;for(;++t<n;){const n=r[t];if(c(n))try{n.unsubscribe()}catch(o){e=e||[],o instanceof h?e=e.concat(d(o.errors)):e.push(o)}}}if(e)throw new h(e)}add(e){let n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){const e=n;n=new t,n._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:s}=n;if(null===s)n._parentOrParents=this;else if(s instanceof t){if(s===this)return n;n._parentOrParents=[s,this]}else{if(-1!==s.indexOf(this))return n;s.push(this)}const i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}return t.EMPTY=function(t){return t.closed=!0,t}(new t),t})();function d(t){return t.reduce((t,e)=>t.concat(e instanceof h?e.errors:e),[])}const p=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class f extends u{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof f?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new m(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new m(this,t,e,n)}}[p](){return this}static create(t,e,n){const s=new f(t,e,n);return s.syncErrorThrowable=!1,s}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class m extends f{constructor(t,e,n,i){let r;super(),this._parentSubscriber=t;let o=this;s(e)?r=e:e&&(r=e.next,n=e.error,i=e.complete,e!==a&&(o=Object.create(e),s(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=r,this._error=n,this._complete=i}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;r.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=r;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);r.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),r.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!r.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(s){return r.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=s,t.syncErrorThrown=!0,!0):(o(s),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const g=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function _(t){return t}let y=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:s}=this,i=function(t,e,n){if(t){if(t instanceof f)return t;if(t[p])return t[p]()}return t||e||n?new f(t,e,n):new f(a)}(t,e,n);if(i.add(s?s.call(i,this.source):this.source||r.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),r.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i}_trySubscribe(t){try{return this._subscribe(t)}catch(e){r.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:s}=t;if(e||s)return!1;t=n&&n instanceof f?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=b(e))((e,n)=>{let s;s=this.subscribe(e=>{try{t(e)}catch(i){n(i),s&&s.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[g](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?_:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=b(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function b(t){if(t||(t=r.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const v=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class x extends u{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class w extends f{constructor(t){super(t),this.destination=t}}let S=(()=>{class t extends y{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[p](){return new w(this)}lift(t){const e=new E(this,this);return e.operator=t,e}next(t){if(this.closed)throw new v;if(!this.isStopped){const{observers:e}=this,n=e.length,s=e.slice();for(let i=0;i<n;i++)s[i].next(t)}}error(t){if(this.closed)throw new v;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,s=e.slice();for(let i=0;i<n;i++)s[i].error(t);this.observers.length=0}complete(){if(this.closed)throw new v;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let s=0;s<e;s++)n[s].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new v;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new v;return this.hasError?(t.error(this.thrownError),u.EMPTY):this.isStopped?(t.complete(),u.EMPTY):(this.observers.push(t),new x(this,t))}asObservable(){const t=new y;return t.source=this,t}}return t.create=(t,e)=>new E(t,e),t})();class E extends S{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):u.EMPTY}}function k(t){return t&&"function"==typeof t.schedule}class C extends f{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}const T=t=>e=>{for(let n=0,s=t.length;n<s&&!e.closed;n++)e.next(t[n]);e.complete()};function O(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}const P=O(),I=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function A(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const R=t=>{if(t&&"function"==typeof t[g])return n=t,t=>{const e=n[g]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(I(t))return T(t);if(A(t))return(t=>e=>(t.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,o),e))(t);if(t&&"function"==typeof t[P])return e=t,t=>{const n=e[P]();for(;;){const e=n.next();if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n};function M(t,e,n,s,i=new C(t,n,s)){if(!i.closed)return e instanceof y?e.subscribe(i):R(e)(i)}class D extends f{notifyNext(t,e,n,s,i){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}function F(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new L(t,e))}}class L{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new N(t,this.project,this.thisArg))}}class N extends f{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function j(t,e){return new y(n=>{const s=new u;let i=0;return s.add(e.schedule(function(){i!==t.length?(n.next(t[i++]),n.closed||s.add(this.schedule())):n.complete()})),s})}function B(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[g]}(t))return function(t,e){return new y(n=>{const s=new u;return s.add(e.schedule(()=>{const i=t[g]();s.add(i.subscribe({next(t){s.add(e.schedule(()=>n.next(t)))},error(t){s.add(e.schedule(()=>n.error(t)))},complete(){s.add(e.schedule(()=>n.complete()))}}))})),s})}(t,e);if(A(t))return function(t,e){return new y(n=>{const s=new u;return s.add(e.schedule(()=>t.then(t=>{s.add(e.schedule(()=>{n.next(t),s.add(e.schedule(()=>n.complete()))}))},t=>{s.add(e.schedule(()=>n.error(t)))}))),s})}(t,e);if(I(t))return j(t,e);if(function(t){return t&&"function"==typeof t[P]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new y(n=>{const s=new u;let i;return s.add(()=>{i&&"function"==typeof i.return&&i.return()}),s.add(e.schedule(()=>{i=t[P](),s.add(e.schedule(function(){if(n.closed)return;let t,e;try{const n=i.next();t=n.value,e=n.done}catch(s){return void n.error(s)}e?n.complete():(n.next(t),this.schedule())}))})),s})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof y?t:new y(R(t))}function V(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?s=>s.pipe(V((n,s)=>B(t(n,s)).pipe(F((t,i)=>e(n,t,s,i))),n)):("number"==typeof e&&(n=e),e=>e.lift(new z(t,n)))}class z{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new H(t,this.project,this.concurrent))}}class H extends D{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(s){return void this.destination.error(s)}this.active++,this._innerSub(e,t,n)}_innerSub(t,e,n){const s=new C(this,e,n),i=this.destination;i.add(s);const r=M(this,t,void 0,void 0,s);r!==s&&i.add(r)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t,e,n,s,i){this.destination.next(e)}notifyComplete(t){const e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function $(t=Number.POSITIVE_INFINITY){return V(_,t)}function W(t,e){return e?j(t,e):new y(T(t))}function q(...t){let e=Number.POSITIVE_INFINITY,n=null,s=t[t.length-1];return k(s)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof s&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof y?t[0]:$(e)(W(t,n))}function U(){return function(t){return t.lift(new Z(t))}}class Z{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const s=new Y(t,n),i=e.subscribe(s);return s.closed||(s.connection=n.connect()),i}}class Y extends f{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,s=t._connection;this.connection=null,!s||n&&s!==n||s.unsubscribe()}}class K extends y{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new u,t.add(this.source.subscribe(new X(this.getSubject(),this))),t.closed&&(this._connection=null,t=u.EMPTY)),t}refCount(){return U()(this)}}const Q=(()=>{const t=K.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class X extends w{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function G(){return new S}function J(){return t=>{return U()((e=G,function(t){let n;n="function"==typeof e?e:function(){return e};const s=Object.create(t,Q);return s.source=t,s.subjectFactory=n,s})(t));var e}}function tt(t){for(let e in t)if(t[e]===tt)return e;throw Error("Could not find renamed property on target object.")}function et(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function nt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(nt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function st(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const it=tt({__forward_ref__:tt});function rt(t){return t.__forward_ref__=rt,t.toString=function(){return nt(this())},t}function ot(t){return"function"==typeof(e=t)&&e.hasOwnProperty(it)&&e.__forward_ref__===rt?t():t;var e}class at extends Error{constructor(t,e){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(t,e)),this.code=t}}function lt(t){return"string"==typeof t?t:null==t?"":String(t)}function ct(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():lt(t)}function ht(t,e){const n=e?` in ${e}`:"";throw new at("201",`No provider for ${ct(t)} found${n}`)}function ut(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function dt(t){return{providers:t.providers||[],imports:t.imports||[]}}function pt(t){return ft(t,gt)||ft(t,yt)}function ft(t,e){return t.hasOwnProperty(e)?t[e]:null}function mt(t){return t&&(t.hasOwnProperty(_t)||t.hasOwnProperty(bt))?t[_t]:null}const gt=tt({"\u0275prov":tt}),_t=tt({"\u0275inj":tt}),yt=tt({ngInjectableDef:tt}),bt=tt({ngInjectorDef:tt});var vt=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});let xt;function wt(t){const e=xt;return xt=t,e}function St(t,e,n){const s=pt(t);return s&&"root"==s.providedIn?void 0===s.value?s.value=s.factory():s.value:n&vt.Optional?null:void 0!==e?e:void ht(nt(t),"Injector")}function Et(t){return{toString:t}.toString()}var kt=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),Ct=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const Tt="undefined"!=typeof globalThis&&globalThis,Ot="undefined"!=typeof window&&window,Pt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,It="undefined"!=typeof global&&global,At=Tt||It||Ot||Pt,Rt={},Mt=[],Dt=tt({"\u0275cmp":tt}),Ft=tt({"\u0275dir":tt}),Lt=tt({"\u0275pipe":tt}),Nt=tt({"\u0275mod":tt}),jt=tt({"\u0275loc":tt}),Bt=tt({"\u0275fac":tt}),Vt=tt({__NG_ELEMENT_ID__:tt});let zt=0;function Ht(t){return Et(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===kt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Mt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Ct.Emulated,id:"c",styles:t.styles||Mt,_:null,setInput:null,schemas:t.schemas||null,tView:null},s=t.directives,i=t.features,r=t.pipes;return n.id+=zt++,n.inputs=Zt(t.inputs,e),n.outputs=Zt(t.outputs),i&&i.forEach(t=>t(n)),n.directiveDefs=s?()=>("function"==typeof s?s():s).map($t):null,n.pipeDefs=r?()=>("function"==typeof r?r():r).map(Wt):null,n})}function $t(t){return Qt(t)||function(t){return t[Ft]||null}(t)}function Wt(t){return function(t){return t[Lt]||null}(t)}const qt={};function Ut(t){return Et(()=>{const e={type:t.type,bootstrap:t.bootstrap||Mt,declarations:t.declarations||Mt,imports:t.imports||Mt,exports:t.exports||Mt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&(qt[t.id]=t.type),e})}function Zt(t,e){if(null==t)return Rt;const n={};for(const s in t)if(t.hasOwnProperty(s)){let i=t[s],r=i;Array.isArray(i)&&(r=i[1],i=i[0]),n[i]=s,e&&(e[i]=r)}return n}const Yt=Ht;function Kt(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Qt(t){return t[Dt]||null}function Xt(t,e){const n=t[Nt]||null;if(!n&&!0===e)throw new Error(`Type ${nt(t)} does not have '\u0275mod' property.`);return n}const Gt=20,Jt=10;function te(t){return Array.isArray(t)&&"object"==typeof t[1]}function ee(t){return Array.isArray(t)&&!0===t[1]}function ne(t){return 0!=(8&t.flags)}function se(t){return 2==(2&t.flags)}function ie(t){return 1==(1&t.flags)}function re(t){return null!==t.template}function oe(t,e){return t.hasOwnProperty(Bt)?t[Bt]:null}class ae{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function le(){return ce}function ce(t){return t.type.prototype.ngOnChanges&&(t.setInput=ue),he}function he(){const t=de(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===Rt)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function ue(t,e,n,s){const i=de(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:Rt,current:null}),r=i.current||(i.current={}),o=i.previous,a=this.declaredInputs[n],l=o[a];r[a]=new ae(l&&l.currentValue,e,o===Rt),t[s]=e}function de(t){return t.__ngSimpleChanges__||null}let pe;function fe(){return void 0!==pe?pe:"undefined"!=typeof document?document:void 0}function me(t){return!!t.listen}le.ngInherit=!0;const ge={createRenderer:(t,e)=>fe()};function _e(t){for(;Array.isArray(t);)t=t[0];return t}function ye(t,e){return _e(e[t])}function be(t,e){return _e(e[t.index])}function ve(t,e){return t.data[e]}function xe(t,e){return t[e]}function we(t,e){const n=e[t];return te(n)?n:n[0]}function Se(t){return 4==(4&t[2])}function Ee(t){return 128==(128&t[2])}function ke(t,e){return null==e?null:t[e]}function Ce(t){t[18]=0}function Te(t,e){t[5]+=e;let n=t,s=t[3];for(;null!==s&&(1===e&&1===n[5]||-1===e&&0===n[5]);)s[5]+=e,n=s,s=s[3]}const Oe={lFrame:Ke(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Pe(){return Oe.bindingsEnabled}function Ie(){return Oe.lFrame.lView}function Ae(){return Oe.lFrame.tView}function Re(){let t=Me();for(;null!==t&&64===t.type;)t=t.parent;return t}function Me(){return Oe.lFrame.currentTNode}function De(t,e){const n=Oe.lFrame;n.currentTNode=t,n.isParent=e}function Fe(){return Oe.lFrame.isParent}function Le(){Oe.lFrame.isParent=!1}function Ne(){return Oe.isInCheckNoChangesMode}function je(t){Oe.isInCheckNoChangesMode=t}function Be(){return Oe.lFrame.bindingIndex++}function Ve(t,e){const n=Oe.lFrame;n.bindingIndex=n.bindingRootIndex=t,ze(e)}function ze(t){Oe.lFrame.currentDirectiveIndex=t}function He(t){const e=Oe.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function $e(){return Oe.lFrame.currentQueryIndex}function We(t){Oe.lFrame.currentQueryIndex=t}function qe(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function Ue(t,e,n){if(n&vt.SkipSelf){let s=e,i=t;for(;s=s.parent,!(null!==s||n&vt.Host||(s=qe(i),null===s)||(i=i[15],10&s.type)););if(null===s)return!1;e=s,t=i}const s=Oe.lFrame=Ye();return s.currentTNode=e,s.lView=t,!0}function Ze(t){const e=Ye(),n=t[1];Oe.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Ye(){const t=Oe.lFrame,e=null===t?null:t.child;return null===e?Ke(t):e}function Ke(t){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:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Qe(){const t=Oe.lFrame;return Oe.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Xe=Qe;function Ge(){const t=Qe();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Je(){return Oe.lFrame.selectedIndex}function tn(t){Oe.lFrame.selectedIndex=t}function en(){const t=Oe.lFrame;return ve(t.tView,t.selectedIndex)}function nn(t,e){for(let n=e.directiveStart,s=e.directiveEnd;n<s;n++){const e=t.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:i,ngAfterViewInit:r,ngAfterViewChecked:o,ngOnDestroy:a}=e;s&&(t.contentHooks||(t.contentHooks=[])).push(-n,s),i&&((t.contentHooks||(t.contentHooks=[])).push(n,i),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,i)),r&&(t.viewHooks||(t.viewHooks=[])).push(-n,r),o&&((t.viewHooks||(t.viewHooks=[])).push(n,o),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,o)),null!=a&&(t.destroyHooks||(t.destroyHooks=[])).push(n,a)}}function sn(t,e,n){an(t,e,3,n)}function rn(t,e,n,s){(3&t[2])===n&&an(t,e,n,s)}function on(t,e){let n=t[2];(3&n)===e&&(n&=2047,n+=1,t[2]=n)}function an(t,e,n,s){const i=null!=s?s:-1,r=e.length-1;let o=0;for(let a=void 0!==s?65535&t[18]:0;a<r;a++)if("number"==typeof e[a+1]){if(o=e[a],null!=s&&o>=s)break}else e[a]<0&&(t[18]+=65536),(o<i||-1==i)&&(ln(t,n,e,a),t[18]=(4294901760&t[18])+a+2),a++}function ln(t,e,n,s){const i=n[s]<0,r=n[s+1],o=t[i?-n[s]:n[s]];if(i){if(t[2]>>11<t[18]>>16&&(3&t[2])===e){t[2]+=2048;try{r.call(o)}finally{}}}else try{r.call(o)}finally{}}const cn=-1;class hn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function un(t,e,n){const s=me(t);let i=0;for(;i<n.length;){const r=n[i];if("number"==typeof r){if(0!==r)break;i++;const o=n[i++],a=n[i++],l=n[i++];s?t.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=r,a=n[++i];pn(o)?s&&t.setProperty(e,o,a):s?t.setAttribute(e,o,a):e.setAttribute(o,a),i++}}return i}function dn(t){return 3===t||4===t||6===t}function pn(t){return 64===t.charCodeAt(0)}function fn(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let n=-1;for(let s=0;s<e.length;s++){const i=e[s];"number"==typeof i?n=i:0===n||mn(t,n,i,null,-1===n||2===n?e[++s]:null)}}return t}function mn(t,e,n,s,i){let r=0,o=t.length;if(-1===e)o=-1;else for(;r<t.length;){const n=t[r++];if("number"==typeof n){if(n===e){o=-1;break}if(n>e){o=r-1;break}}}for(;r<t.length;){const e=t[r];if("number"==typeof e)break;if(e===n){if(null===s)return void(null!==i&&(t[r+1]=i));if(s===t[r+1])return void(t[r+2]=i)}r++,null!==s&&r++,null!==i&&r++}-1!==o&&(t.splice(o,0,e),r=o+1),t.splice(r++,0,n),null!==s&&t.splice(r++,0,s),null!==i&&t.splice(r++,0,i)}function gn(t){return t!==cn}function _n(t){return 32767&t}function yn(t,e){let n=t>>16,s=e;for(;n>0;)s=s[15],n--;return s}let bn=!0;function vn(t){const e=bn;return bn=t,e}let xn=0;function wn(t,e){const n=En(t,e);if(-1!==n)return n;const s=e[1];s.firstCreatePass&&(t.injectorIndex=e.length,Sn(s.data,t),Sn(e,null),Sn(s.blueprint,null));const i=kn(t,e),r=t.injectorIndex;if(gn(i)){const t=_n(i),n=yn(i,e),s=n[1].data;for(let i=0;i<8;i++)e[r+i]=n[t+i]|s[t+i]}return e[r+8]=i,r}function Sn(t,e){t.push(0,0,0,0,0,0,0,0,e)}function En(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function kn(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,s=null,i=e;for(;null!==i;){const t=i[1],e=t.type;if(s=2===e?t.declTNode:1===e?i[6]:null,null===s)return cn;if(n++,i=i[15],-1!==s.injectorIndex)return s.injectorIndex|n<<16}return cn}function Cn(t,e,n){!function(t,e,n){let s;"string"==typeof n?s=n.charCodeAt(0)||0:n.hasOwnProperty(Vt)&&(s=n[Vt]),null==s&&(s=n[Vt]=xn++);const i=255&s;e.data[t+(i>>5)]|=1<<i}(t,e,n)}function Tn(t,e,n){if(n&vt.Optional)return t;ht(e,"NodeInjector")}function On(t,e,n,s){if(n&vt.Optional&&void 0===s&&(s=null),0==(n&(vt.Self|vt.Host))){const i=t[9],r=wt(void 0);try{return i?i.get(e,s,n&vt.Optional):St(e,s,n&vt.Optional)}finally{wt(r)}}return Tn(s,e,n)}function Pn(t,e,n,s=vt.Default,i){if(null!==t){const r=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Vt)?t[Vt]:void 0;return"number"==typeof e?e>=0?255&e:An:e}(n);if("function"==typeof r){if(!Ue(e,t,s))return s&vt.Host?Tn(i,n,s):On(e,n,s,i);try{const t=r(s);if(null!=t||s&vt.Optional)return t;ht(n)}finally{Xe()}}else if("number"==typeof r){let i=null,o=En(t,e),a=cn,l=s&vt.Host?e[16][6]:null;for((-1===o||s&vt.SkipSelf)&&(a=-1===o?kn(t,e):e[o+8],a!==cn&&Ln(s,!1)?(i=e[1],o=_n(a),e=yn(a,e)):o=-1);-1!==o;){const t=e[1];if(Fn(r,o,t.data)){const t=Rn(o,e,n,i,s,l);if(t!==In)return t}a=e[o+8],a!==cn&&Ln(s,e[1].data[o+8]===l)&&Fn(r,o,e)?(i=t,o=_n(a),e=yn(a,e)):o=-1}}}return On(e,n,s,i)}const In={};function An(){return new Nn(Re(),Ie())}function Rn(t,e,n,s,i,r){const o=e[1],a=o.data[t+8],l=Mn(a,o,n,null==s?se(a)&&bn:s!=o&&0!=(3&a.type),i&vt.Host&&r===a);return null!==l?Dn(e,o,l,a):In}function Mn(t,e,n,s,i){const r=t.providerIndexes,o=e.data,a=1048575&r,l=t.directiveStart,c=r>>20,h=i?a+c:t.directiveEnd;for(let u=s?a:a+c;u<h;u++){const t=o[u];if(u<l&&n===t||u>=l&&t.type===n)return u}if(i){const t=o[l];if(t&&re(t)&&t.type===n)return l}return null}function Dn(t,e,n,s){let i=t[n];const r=e.data;if(i instanceof hn){const o=i;o.resolving&&function(t,e){throw new at("200",`Circular dependency in DI detected for ${t}`)}(ct(r[n]));const a=vn(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?wt(o.injectImpl):null;Ue(t,s,vt.Default);try{i=t[n]=o.factory(void 0,r,t,s),e.firstCreatePass&&n>=s.directiveStart&&function(t,e,n){const{ngOnChanges:s,ngOnInit:i,ngDoCheck:r}=e.type.prototype;if(s){const s=ce(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s)}i&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,i),r&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,r),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,r))}(n,r[n],e)}finally{null!==l&&wt(l),vn(a),o.resolving=!1,Xe()}}return i}function Fn(t,e,n){return!!(n[e+(t>>5)]&1<<t)}function Ln(t,e){return!(t&vt.Self||t&vt.Host&&e)}class Nn{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return Pn(this._tNode,this._lView,t,void 0,e)}}const jn="__parameters__";function Bn(t,e,n){return Et(()=>{const s=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function i(...t){if(this instanceof i)return s.apply(this,t),this;const e=new i(...t);return n.annotation=e,n;function n(t,n,s){const i=t.hasOwnProperty(jn)?t[jn]:Object.defineProperty(t,jn,{value:[]})[jn];for(;i.length<=s;)i.push(null);return(i[s]=i[s]||[]).push(e),t}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}class Vn{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ut({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}function zn(t,e){void 0===e&&(e=t);for(let n=0;n<t.length;n++){let s=t[n];Array.isArray(s)?(e===t&&(e=t.slice(0,n)),zn(s,e)):e!==t&&e.push(s)}return e}function Hn(t,e){t.forEach(t=>Array.isArray(t)?Hn(t,e):e(t))}function $n(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Wn(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function qn(t,e){const n=[];for(let s=0;s<t;s++)n.push(e);return n}function Un(t,e,n){let s=Yn(t,e);return s>=0?t[1|s]=n:(s=~s,function(t,e,n,s){let i=t.length;if(i==e)t.push(n,s);else if(1===i)t.push(s,t[0]),t[0]=n;else{for(i--,t.push(t[i-1],t[i]);i>e;)t[i]=t[i-2],i--;t[e]=n,t[e+1]=s}}(t,s,e,n)),s}function Zn(t,e){const n=Yn(t,e);if(n>=0)return t[1|n]}function Yn(t,e){return function(t,e,n){let s=0,i=t.length>>1;for(;i!==s;){const n=s+(i-s>>1),r=t[n<<1];if(e===r)return n<<1;r>e?i=n:s=n+1}return~(i<<1)}(t,e)}const Kn={},Qn=/\n/gm,Xn="__source",Gn=tt({provide:String,useValue:tt});let Jn;function ts(t){const e=Jn;return Jn=t,e}function es(t,e=vt.Default){if(void 0===Jn)throw new Error("inject() must be called from an injection context");return null===Jn?St(t,void 0,e):Jn.get(t,e&vt.Optional?null:void 0,e)}function ns(t,e=vt.Default){return(xt||es)(ot(t),e)}const ss=ns;function is(t){const e=[];for(let n=0;n<t.length;n++){const s=ot(t[n]);if(Array.isArray(s)){if(0===s.length)throw new Error("Arguments array must have arguments.");let t,n=vt.Default;for(let e=0;e<s.length;e++){const i=s[e],r=i.__NG_DI_FLAG__;"number"==typeof r?-1===r?t=i.token:n|=r:t=i}e.push(ns(t,n))}else e.push(ns(s))}return e}function rs(t,e){return t.__NG_DI_FLAG__=e,t.prototype.__NG_DI_FLAG__=e,t}const os=rs(Bn("Inject",t=>({token:t})),-1),as=rs(Bn("Optional"),8),ls=rs(Bn("SkipSelf"),4);let cs,hs;function us(t){var e;return(null===(e=function(){if(void 0===cs&&(cs=null,At.trustedTypes))try{cs=At.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(e){}return cs}())||void 0===e?void 0:e.createHTML(t))||t}function ds(t){var e;return(null===(e=function(){if(void 0===hs&&(hs=null,At.trustedTypes))try{hs=At.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(e){}return hs}())||void 0===e?void 0:e.createHTML(t))||t}class ps{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class fs extends ps{getTypeName(){return"HTML"}}class ms extends ps{getTypeName(){return"Style"}}class gs extends ps{getTypeName(){return"Script"}}class _s extends ps{getTypeName(){return"URL"}}class ys extends ps{getTypeName(){return"ResourceURL"}}function bs(t){return t instanceof ps?t.changingThisBreaksApplicationSecurity:t}function vs(t,e){const n=xs(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see https://g.co/ng/security#xss)`)}return n===e}function xs(t){return t instanceof ps&&t.getTypeName()||null}class ws{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{const e=(new window.DOMParser).parseFromString(us(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(e){return null}}}class Ss{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=us(t),e;const n=this.inertDocument.createElement("body");return n.innerHTML=us(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let s=e.length-1;0<s;s--){const n=e.item(s).name;"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||t.removeAttribute(n)}let n=t.firstChild;for(;n;)n.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(n),n=n.nextSibling}}const Es=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,ks=/^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 Cs(t){return(t=String(t)).match(Es)||t.match(ks)?t:"unsafe:"+t}function Ts(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function Os(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const Ps=Ts("area,br,col,hr,img,wbr"),Is=Ts("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),As=Ts("rp,rt"),Rs=Os(As,Is),Ms=Os(Ps,Os(Is,Ts("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")),Os(As,Ts("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")),Rs),Ds=Ts("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Fs=Ts("srcset"),Ls=Os(Ds,Fs,Ts("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"),Ts("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")),Ns=Ts("script,style,template");class js{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!Ms.hasOwnProperty(e))return this.sanitizedSomething=!0,!Ns.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let i=0;i<n.length;i++){const t=n.item(i),e=t.name,r=e.toLowerCase();if(!Ls.hasOwnProperty(r)){this.sanitizedSomething=!0;continue}let o=t.value;Ds[r]&&(o=Cs(o)),Fs[r]&&(s=o,o=(s=String(s)).split(",").map(t=>Cs(t.trim())).join(", ")),this.buf.push(" ",e,'="',zs(o),'"')}var s;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();Ms.hasOwnProperty(e)&&!Ps.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(zs(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const Bs=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Vs=/([^\#-~ |!])/g;function zs(t){return t.replace(/&/g,"&amp;").replace(Bs,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Vs,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Hs;function $s(t,e){let n=null;try{Hs=Hs||function(t){const e=new Ss(t);return function(){try{return!!(new window.DOMParser).parseFromString(us(""),"text/html")}catch(t){return!1}}()?new ws(e):e}(t);let s=e?String(e):"";n=Hs.getInertBodyElement(s);let i=5,r=s;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,s=r,r=n.innerHTML,n=Hs.getInertBodyElement(s)}while(s!==r);return us((new js).sanitizeChildren(Ws(n)||n))}finally{if(n){const t=Ws(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function Ws(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var qs=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Us(t){const e=function(){const t=Ie();return t&&t[12]}();return e?ds(e.sanitize(qs.HTML,t)||""):vs(t,"HTML")?ds(bs(t)):$s(fe(),lt(t))}function Zs(t,e){t.__ngContext__=e}function Ys(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Ks(t){return t.ngDebugContext}function Qs(t){return t.ngOriginalError}function Xs(t,...e){t.error(...e)}class Gs{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),s=function(t){return t.ngErrorLogger||Xs}(t);s(this._console,"ERROR",t),e&&s(this._console,"ORIGINAL ERROR",e),n&&s(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?Ks(t)?Ks(t):this._findContext(Qs(t)):null}_findOriginalError(t){let e=Qs(t);for(;e&&Qs(e);)e=Qs(e);return e}}const Js=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(At))();function ti(t){return t instanceof Function?t():t}var ei=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});function ni(t,e){return(void 0)(t,e)}function si(t){const e=t[3];return ee(e)?e[3]:e}function ii(t){return oi(t[13])}function ri(t){return oi(t[4])}function oi(t){for(;null!==t&&!ee(t);)t=t[4];return t}function ai(t,e,n,s,i){if(null!=s){let r,o=!1;ee(s)?r=s:te(s)&&(o=!0,s=s[0]);const a=_e(s);0===t&&null!==n?null==i?mi(e,n,a):fi(e,n,a,i||null,!0):1===t&&null!==n?fi(e,n,a,i||null,!0):2===t?function(t,e,n){const s=_i(t,e);s&&function(t,e,n,s){me(t)?t.removeChild(e,n,s):e.removeChild(n)}(t,s,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=r&&function(t,e,n,s,i){const r=n[7];r!==_e(n)&&ai(e,t,s,r,i);for(let o=Jt;o<n.length;o++){const i=n[o];ki(i[1],i,t,e,s,r)}}(e,t,r,n,i)}}function li(t,e,n){return me(t)?t.createElement(e,n):null===n?t.createElement(e):t.createElementNS(n,e)}function ci(t,e){const n=t[9],s=n.indexOf(e),i=e[3];1024&e[2]&&(e[2]&=-1025,Te(i,-1)),n.splice(s,1)}function hi(t,e){if(t.length<=Jt)return;const n=Jt+e,s=t[n];if(s){const r=s[17];null!==r&&r!==t&&ci(r,s),e>0&&(t[n-1][4]=s[4]);const o=Wn(t,Jt+e);ki(s[1],i=s,i[11],2,null,null),i[0]=null,i[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),s[3]=null,s[4]=null,s[2]&=-129}var i;return s}function ui(t,e){if(!(256&e[2])){const n=e[11];me(n)&&n.destroyNode&&ki(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return di(t[1],t);for(;e;){let n=null;if(te(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)te(e)&&di(e[1],e),e=e[3];null===e&&(e=t),te(e)&&di(e[1],e),n=e&&e[4]}e=n}}(e)}}function di(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let s=0;s<n.length;s+=2){const t=e[n[s]];if(!(t instanceof hn)){const e=n[s+1];if(Array.isArray(e))for(let n=0;n<e.length;n+=2){const s=t[e[n]],i=e[n+1];try{i.call(s)}finally{}}else try{e.call(t)}finally{}}}}(t,e),function(t,e){const n=t.cleanup,s=e[7];let i=-1;if(null!==n)for(let r=0;r<n.length-1;r+=2)if("string"==typeof n[r]){const t=n[r+1],o="function"==typeof t?t(e):_e(e[t]),a=s[i=n[r+2]],l=n[r+3];"boolean"==typeof l?o.removeEventListener(n[r],a,l):l>=0?s[i=l]():s[i=-l].unsubscribe(),r+=2}else{const t=s[i=n[r+1]];n[r].call(t)}if(null!==s){for(let t=i+1;t<s.length;t++)(0,s[t])();e[7]=null}}(t,e),1===e[1].type&&me(e[11])&&e[11].destroy();const n=e[17];if(null!==n&&ee(e[3])){n!==e[3]&&ci(n,e);const s=e[19];null!==s&&s.detachView(t)}}}function pi(t,e,n){return function(t,e,n){let s=e;for(;null!==s&&40&s.type;)s=(e=s).parent;if(null===s)return n[0];if(2&s.flags){const e=t.data[s.directiveStart].encapsulation;if(e===Ct.None||e===Ct.Emulated)return null}return be(s,n)}(t,e.parent,n)}function fi(t,e,n,s,i){me(t)?t.insertBefore(e,n,s,i):e.insertBefore(n,s,i)}function mi(t,e,n){me(t)?t.appendChild(e,n):e.appendChild(n)}function gi(t,e,n,s,i){null!==s?fi(t,e,n,s,i):mi(t,e,n)}function _i(t,e){return me(t)?t.parentNode(e):e.parentNode}function yi(t,e,n){return bi(t,e,n)}let bi=function(t,e,n){return 40&t.type?be(t,n):null};function vi(t,e,n,s){const i=pi(t,s,e),r=e[11],o=yi(s.parent||e[6],s,e);if(null!=i)if(Array.isArray(n))for(let a=0;a<n.length;a++)gi(r,i,n[a],o,!1);else gi(r,i,n,o,!1)}function xi(t,e){if(null!==e){const n=e.type;if(3&n)return be(e,t);if(4&n)return Si(-1,t[e.index]);if(8&n){const n=e.child;if(null!==n)return xi(t,n);{const n=t[e.index];return ee(n)?Si(-1,n):_e(n)}}if(32&n)return ni(e,t)()||_e(t[e.index]);{const n=wi(t,e);return null!==n?Array.isArray(n)?n[0]:xi(si(t[16]),n):xi(t,e.next)}}return null}function wi(t,e){return null!==e?t[16][6].projection[e.projection]:null}function Si(t,e){const n=Jt+t+1;if(n<e.length){const t=e[n],s=t[1].firstChild;if(null!==s)return xi(t,s)}return e[7]}function Ei(t,e,n,s,i,r,o){for(;null!=n;){const a=s[n.index],l=n.type;if(o&&0===e&&(a&&Zs(_e(a),s),n.flags|=4),64!=(64&n.flags))if(8&l)Ei(t,e,n.child,s,i,r,!1),ai(e,t,i,a,r);else if(32&l){const o=ni(n,s);let l;for(;l=o();)ai(e,t,i,l,r);ai(e,t,i,a,r)}else 16&l?Ci(t,e,s,n,i,r):ai(e,t,i,a,r);n=o?n.projectionNext:n.next}}function ki(t,e,n,s,i,r){Ei(n,s,t.firstChild,e,i,r,!1)}function Ci(t,e,n,s,i,r){const o=n[16],a=o[6].projection[s.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++)ai(e,t,i,a[l],r);else Ei(t,e,a,o[3],i,r,!0)}function Ti(t,e,n){me(t)?t.setAttribute(e,"style",n):e.style.cssText=n}function Oi(t,e,n){me(t)?""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n):e.className=n}function Pi(t,e,n){let s=t.length;for(;;){const i=t.indexOf(e,n);if(-1===i)return i;if(0===i||t.charCodeAt(i-1)<=32){const n=e.length;if(i+n===s||t.charCodeAt(i+n)<=32)return i}n=i+1}}const Ii="ng-template";function Ai(t,e,n){let s=0;for(;s<t.length;){let i=t[s++];if(n&&"class"===i){if(i=t[s],-1!==Pi(i.toLowerCase(),e,0))return!0}else if(1===i){for(;s<t.length&&"string"==typeof(i=t[s++]);)if(i.toLowerCase()===e)return!0;return!1}}return!1}function Ri(t){return 4===t.type&&t.value!==Ii}function Mi(t,e,n){return e===(4!==t.type||n?t.value:Ii)}function Di(t,e,n){let s=4;const i=t.attrs||[],r=function(t){for(let e=0;e<t.length;e++)if(dn(t[e]))return e;return t.length}(i);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&s){if(s=2|1&s,""!==l&&!Mi(t,l,n)||""===l&&1===e.length){if(Fi(s))return!1;o=!0}}else{const c=8&s?l:e[++a];if(8&s&&null!==t.attrs){if(!Ai(t.attrs,c,n)){if(Fi(s))return!1;o=!0}continue}const h=Li(8&s?"class":l,i,Ri(t),n);if(-1===h){if(Fi(s))return!1;o=!0;continue}if(""!==c){let t;t=h>r?"":i[h+1].toLowerCase();const e=8&s?t:null;if(e&&-1!==Pi(e,c,0)||2&s&&c!==t){if(Fi(s))return!1;o=!0}}}}else{if(!o&&!Fi(s)&&!Fi(l))return!1;if(o&&Fi(l))continue;o=!1,s=l|1&s}}return Fi(s)||o}function Fi(t){return 0==(1&t)}function Li(t,e,n,s){if(null===e)return-1;let i=0;if(s||!n){let n=!1;for(;i<e.length;){const s=e[i];if(s===t)return i;if(3===s||6===s)n=!0;else{if(1===s||2===s){let t=e[++i];for(;"string"==typeof t;)t=e[++i];continue}if(4===s)break;if(0===s){i+=4;continue}}i+=n?1:2}return-1}return function(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){const s=t[n];if("number"==typeof s)return-1;if(s===e)return n;n++}return-1}(e,t)}function Ni(t,e,n=!1){for(let s=0;s<e.length;s++)if(Di(t,e[s],n))return!0;return!1}function ji(t,e){t:for(let n=0;n<e.length;n++){const s=e[n];if(t.length===s.length){for(let e=0;e<t.length;e++)if(t[e]!==s[e])continue t;return!0}}return!1}function Bi(t,e){return t?":not("+e.trim()+")":e}function Vi(t){let e=t[0],n=1,s=2,i="",r=!1;for(;n<t.length;){let o=t[n];if("string"==typeof o)if(2&s){const e=t[++n];i+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&s?i+="."+o:4&s&&(i+=" "+o);else""===i||Fi(o)||(e+=Bi(r,i),i=""),s=o,r=r||!Fi(s);n++}return""!==i&&(e+=Bi(r,i)),e}const zi={};function Hi(t){$i(Ae(),Ie(),Je()+t,Ne())}function $i(t,e,n,s){if(!s)if(3==(3&e[2])){const s=t.preOrderCheckHooks;null!==s&&sn(e,s,n)}else{const s=t.preOrderHooks;null!==s&&rn(e,s,0,n)}tn(n)}function Wi(t,e){return t<<17|e<<2}function qi(t){return t>>17&32767}function Ui(t){return 2|t}function Zi(t){return(131068&t)>>2}function Yi(t,e){return-131069&t|e<<2}function Ki(t){return 1|t}function Qi(t,e){const n=t.contentQueries;if(null!==n)for(let s=0;s<n.length;s+=2){const i=n[s],r=n[s+1];if(-1!==r){const n=t.data[r];We(i),n.contentQueries(2,e[r],r)}}}function Xi(t,e,n,s,i,r,o,a,l,c){const h=e.blueprint.slice();return h[0]=i,h[2]=140|s,Ce(h),h[3]=h[15]=t,h[8]=n,h[10]=o||t&&t[10],h[11]=a||t&&t[11],h[12]=l||t&&t[12]||null,h[9]=c||t&&t[9]||null,h[6]=r,h[16]=2==e.type?t[16]:h,h}function Gi(t,e,n,s,i){let r=t.data[e];if(null===r)r=function(t,e,n,s,i){const r=Me(),o=Fe(),a=t.data[e]=function(t,e,n,s,i,r){return{type:n,index:s,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:i,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,n,e,s,i);return null===t.firstChild&&(t.firstChild=a),null!==r&&(o?null==r.child&&null!==a.parent&&(r.child=a):null===r.next&&(r.next=a)),a}(t,e,n,s,i),Oe.lFrame.inI18n&&(r.flags|=64);else if(64&r.type){r.type=n,r.value=s,r.attrs=i;const t=function(){const t=Oe.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}();r.injectorIndex=null===t?-1:t.injectorIndex}return De(r,!0),r}function Ji(t,e,n,s){if(0===n)return-1;const i=e.length;for(let r=0;r<n;r++)e.push(s),t.blueprint.push(s),t.data.push(null);return i}function tr(t,e,n){Ze(e);try{const s=t.viewQuery;null!==s&&Pr(1,s,n);const i=t.template;null!==i&&sr(t,e,i,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Qi(t,e),t.staticViewQueries&&Pr(2,t.viewQuery,n);const r=t.components;null!==r&&function(t,e){for(let n=0;n<e.length;n++)Er(t,e[n])}(e,r)}catch(s){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),s}finally{e[2]&=-5,Ge()}}function er(t,e,n,s){const i=e[2];if(256==(256&i))return;Ze(e);const r=Ne();try{Ce(e),Oe.lFrame.bindingIndex=t.bindingStartIndex,null!==n&&sr(t,e,n,2,s);const o=3==(3&i);if(!r)if(o){const n=t.preOrderCheckHooks;null!==n&&sn(e,n,null)}else{const n=t.preOrderHooks;null!==n&&rn(e,n,0,null),on(e,0)}if(function(t){for(let e=ii(t);null!==e;e=ri(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const n=t[e],s=n[3];0==(1024&n[2])&&Te(s,1),n[2]|=1024}}}(e),function(t){for(let e=ii(t);null!==e;e=ri(e))for(let t=Jt;t<e.length;t++){const n=e[t],s=n[1];Ee(n)&&er(s,n,s.template,n[8])}}(e),null!==t.contentQueries&&Qi(t,e),!r)if(o){const n=t.contentCheckHooks;null!==n&&sn(e,n)}else{const n=t.contentHooks;null!==n&&rn(e,n,1),on(e,1)}!function(t,e){const n=t.hostBindingOpCodes;if(null!==n)try{for(let t=0;t<n.length;t++){const s=n[t];if(s<0)tn(~s);else{const i=s,r=n[++t],o=n[++t];Ve(r,i),o(2,e[i])}}}finally{tn(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let n=0;n<e.length;n++)wr(t,e[n])}(e,a);const l=t.viewQuery;if(null!==l&&Pr(2,l,s),!r)if(o){const n=t.viewCheckHooks;null!==n&&sn(e,n)}else{const n=t.viewHooks;null!==n&&rn(e,n,2),on(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),r||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,Te(e[3],-1))}finally{Ge()}}function nr(t,e,n,s){const i=e[10],r=!Ne(),o=Se(e);try{r&&!o&&i.begin&&i.begin(),o&&tr(t,e,s),er(t,e,n,s)}finally{r&&!o&&i.end&&i.end()}}function sr(t,e,n,s,i){const r=Je(),o=2&s;try{tn(-1),o&&e.length>Gt&&$i(t,e,Gt,Ne()),n(s,i)}finally{tn(r)}}function ir(t,e,n){Pe()&&(function(t,e,n,s){const i=n.directiveStart,r=n.directiveEnd;t.firstCreatePass||wn(n,e),Zs(s,e);const o=n.initialInputs;for(let a=i;a<r;a++){const s=t.data[a],r=re(s);r&&yr(e,n,s);const l=Dn(e,t,a,n);Zs(l,e),null!==o&&br(0,a-i,l,s,0,o),r&&(we(n.index,e)[8]=l)}}(t,e,n,be(n,e)),128==(128&n.flags)&&function(t,e,n){const s=n.directiveStart,i=n.directiveEnd,r=n.index,o=Oe.lFrame.currentDirectiveIndex;try{tn(r);for(let n=s;n<i;n++){const s=t.data[n],i=e[n];ze(n),null===s.hostBindings&&0===s.hostVars&&null===s.hostAttrs||pr(s,i)}}finally{tn(-1),ze(o)}}(t,e,n))}function rr(t,e,n=be){const s=e.localNames;if(null!==s){let i=e.index+1;for(let r=0;r<s.length;r+=2){const o=s[r+1],a=-1===o?n(e,t):t[o];t[i++]=a}}}function or(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=ar(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function ar(t,e,n,s,i,r,o,a,l,c){const h=Gt+s,u=h+i,d=function(t,e){const n=[];for(let s=0;s<e;s++)n.push(s<t?null:zi);return n}(h,u),p="function"==typeof c?c():c;return d[1]={type:t,blueprint:d,template:n,queries:null,viewQuery:a,declTNode:e,data:d.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:u,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:p,incompleteFirstPass:!1}}function lr(t,e,n,s){const i=Ar(e);null===n?i.push(s):(i.push(n),t.firstCreatePass&&Rr(t).push(s,i.length-1))}function cr(t,e,n){for(let s in t)if(t.hasOwnProperty(s)){const i=t[s];(n=null===n?{}:n).hasOwnProperty(s)?n[s].push(e,i):n[s]=[e,i]}return n}function hr(t,e,n,s,i,r,o,a){const l=be(e,n);let c,h=e.inputs;var u;!a&&null!=h&&(c=h[s])?(Fr(t,n,c,s,i),se(e)&&function(t,e){const n=we(e,t);16&n[2]||(n[2]|=64)}(n,e.index)):3&e.type&&(s="class"===(u=s)?"className":"for"===u?"htmlFor":"formaction"===u?"formAction":"innerHtml"===u?"innerHTML":"readonly"===u?"readOnly":"tabindex"===u?"tabIndex":u,i=null!=o?o(i,e.value||"",s):i,me(r)?r.setProperty(l,s,i):pn(s)||(l.setProperty?l.setProperty(s,i):l[s]=i))}function ur(t,e,n,s){let i=!1;if(Pe()){const r=function(t,e,n){const s=t.directiveRegistry;let i=null;if(s)for(let r=0;r<s.length;r++){const o=s[r];Ni(n,o.selectors,!1)&&(i||(i=[]),Cn(wn(n,e),t,o.type),re(o)?(fr(t,n),i.unshift(o)):i.push(o))}return i}(t,e,n),o=null===s?null:{"":-1};if(null!==r){i=!0,gr(n,t.data.length,r.length);for(let t=0;t<r.length;t++){const e=r[t];e.providersResolver&&e.providersResolver(e)}let s=!1,a=!1,l=Ji(t,e,r.length,null);for(let i=0;i<r.length;i++){const c=r[i];n.mergedAttrs=fn(n.mergedAttrs,c.hostAttrs),_r(t,n,e,l,c),mr(l,c,o),null!==c.contentQueries&&(n.flags|=8),null===c.hostBindings&&null===c.hostAttrs&&0===c.hostVars||(n.flags|=128);const h=c.type.prototype;!s&&(h.ngOnChanges||h.ngOnInit||h.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index),s=!0),a||!h.ngOnChanges&&!h.ngDoCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index),a=!0),l++}!function(t,e){const n=e.directiveEnd,s=t.data,i=e.attrs,r=[];let o=null,a=null;for(let l=e.directiveStart;l<n;l++){const t=s[l],n=t.inputs,c=null===i||Ri(e)?null:vr(n,i);r.push(c),o=cr(n,l,o),a=cr(t.outputs,l,a)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=r,e.inputs=o,e.outputs=a}(t,n)}o&&function(t,e,n){if(e){const s=t.localNames=[];for(let t=0;t<e.length;t+=2){const i=n[e[t+1]];if(null==i)throw new at("301",`Export of name '${e[t+1]}' not found!`);s.push(e[t],i)}}}(n,s,o)}return n.mergedAttrs=fn(n.mergedAttrs,n.attrs),i}function dr(t,e,n,s,i,r){const o=r.hostBindings;if(o){let n=t.hostBindingOpCodes;null===n&&(n=t.hostBindingOpCodes=[]);const r=~e.index;(function(t){let e=t.length;for(;e>0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(n)!=r&&n.push(r),n.push(s,i,o)}}function pr(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function fr(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function mr(t,e,n){if(n){if(e.exportAs)for(let s=0;s<e.exportAs.length;s++)n[e.exportAs[s]]=t;re(e)&&(n[""]=t)}}function gr(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function _r(t,e,n,s,i){t.data[s]=i;const r=i.factory||(i.factory=oe(i.type)),o=new hn(r,re(i),null);t.blueprint[s]=o,n[s]=o,dr(t,e,0,s,Ji(t,n,i.hostVars,zi),i)}function yr(t,e,n){const s=be(e,t),i=or(n),r=t[10],o=kr(t,Xi(t,i,null,n.onPush?64:16,s,e,r,r.createRenderer(s,n),null,null));t[e.index]=o}function br(t,e,n,s,i,r){const o=r[e];if(null!==o){const t=s.setInput;for(let e=0;e<o.length;){const i=o[e++],r=o[e++],a=o[e++];null!==t?s.setInput(n,a,i,r):n[r]=a}}}function vr(t,e){let n=null,s=0;for(;s<e.length;){const i=e[s];if(0!==i)if(5!==i){if("number"==typeof i)break;t.hasOwnProperty(i)&&(null===n&&(n=[]),n.push(i,t[i],e[s+1])),s+=2}else s+=2;else s+=4}return n}function xr(t,e,n,s){return new Array(t,!0,!1,e,null,0,s,n,null,null)}function wr(t,e){const n=we(e,t);if(Ee(n)){const t=n[1];80&n[2]?er(t,n,t.template,n[8]):n[5]>0&&Sr(n)}}function Sr(t){for(let n=ii(t);null!==n;n=ri(n))for(let t=Jt;t<n.length;t++){const e=n[t];if(1024&e[2]){const t=e[1];er(t,e,t.template,e[8])}else e[5]>0&&Sr(e)}const e=t[1].components;if(null!==e)for(let n=0;n<e.length;n++){const s=we(e[n],t);Ee(s)&&s[5]>0&&Sr(s)}}function Er(t,e){const n=we(e,t),s=n[1];!function(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}(s,n),tr(s,n,n[8])}function kr(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function Cr(t){for(;t;){t[2]|=64;const e=si(t);if(0!=(512&t[2])&&!e)return t;t=e}return null}function Tr(t,e,n){const s=e[10];s.begin&&s.begin();try{er(t,e,t.template,n)}catch(i){throw Dr(e,i),i}finally{s.end&&s.end()}}function Or(t){!function(t){for(let e=0;e<t.components.length;e++){const n=t.components[e],s=Ys(n),i=s[1];nr(i,s,i.template,n)}}(t[8])}function Pr(t,e,n){We(0),e(t,n)}const Ir=(()=>Promise.resolve(null))();function Ar(t){return t[7]||(t[7]=[])}function Rr(t){return t.cleanup||(t.cleanup=[])}function Mr(t,e,n){return(null===t||re(t))&&(n=function(t){for(;Array.isArray(t);){if("object"==typeof t[1])return t;t=t[0]}return null}(n[e.index])),n[11]}function Dr(t,e){const n=t[9],s=n?n.get(Gs,null):null;s&&s.handleError(e)}function Fr(t,e,n,s,i){for(let r=0;r<n.length;){const o=n[r++],a=n[r++],l=e[o],c=t.data[o];null!==c.setInput?c.setInput(l,i,s,a):l[a]=i}}function Lr(t,e,n){let s=n?t.styles:null,i=n?t.classes:null,r=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?r=t:1==r?i=st(i,t):2==r&&(s=st(s,t+": "+e[++o]+";"))}n?t.styles=s:t.stylesWithoutHost=s,n?t.classes=i:t.classesWithoutHost=i}const Nr=new Vn("INJECTOR",-1);class jr{get(t,e=Kn){if(e===Kn){const e=new Error(`NullInjectorError: No provider for ${nt(t)}!`);throw e.name="NullInjectorError",e}return e}}const Br=new Vn("Set Injector scope."),Vr={},zr={};let Hr;function $r(){return void 0===Hr&&(Hr=new jr),Hr}function Wr(t,e=null,n=null,s){return new qr(t,n,e||$r(),s)}class qr{constructor(t,e,n,s=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const i=[];e&&Hn(e,n=>this.processProvider(n,t,e)),Hn([t],t=>this.processInjectorType(t,[],i)),this.records.set(Nr,Zr(void 0,this));const r=this.records.get(Br);this.scope=null!=r?r.value:null,this.source=s||("object"==typeof t?null:nt(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Kn,n=vt.Default){this.assertNotDestroyed();const s=ts(this);try{if(!(n&vt.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(i=t)||"object"==typeof i&&i instanceof Vn)&&pt(t);e=n&&this.injectableDefInScope(n)?Zr(Ur(t),Vr):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&vt.Self?$r():this.parent).get(t,e=n&vt.Optional&&e===Kn?null:e)}catch(r){if("NullInjectorError"===r.name){if((r.ngTempTokenPath=r.ngTempTokenPath||[]).unshift(nt(t)),s)throw r;return function(t,e,n,s){const i=t.ngTempTokenPath;throw e[Xn]&&i.unshift(e[Xn]),t.message=function(t,e,n,s=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let i=nt(e);if(Array.isArray(e))i=e.map(nt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let s=e[n];t.push(n+":"+("string"==typeof s?JSON.stringify(s):nt(s)))}i=`{${t.join(", ")}}`}return`${n}${s?"("+s+")":""}[${i}]: ${t.replace(Qn,"\n  ")}`}("\n"+t.message,i,n,s),t.ngTokenPath=i,t.ngTempTokenPath=null,t}(r,t,"R3InjectorError",this.source)}throw r}finally{ts(s)}var i}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(nt(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=ot(t)))return!1;let s=mt(t);const i=null==s&&t.ngModule||void 0,r=void 0===i?t:i,o=-1!==n.indexOf(r);if(void 0!==i&&(s=mt(i)),null==s)return!1;if(null!=s.imports&&!o){let t;n.push(r);try{Hn(s.imports,s=>{this.processInjectorType(s,e,n)&&(void 0===t&&(t=[]),t.push(s))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:n,providers:s}=t[e];Hn(s,t=>this.processProvider(t,n,s||Mt))}}this.injectorDefTypes.add(r);const a=oe(r)||(()=>new r);this.records.set(r,Zr(a,Vr));const l=s.providers;if(null!=l&&!o){const e=t;Hn(l,t=>this.processProvider(t,e,l))}return void 0!==i&&void 0!==t.providers}processProvider(t,e,n){let s=Kr(t=ot(t))?t:ot(t&&t.provide);const i=function(t,e,n){return Yr(t)?Zr(void 0,t.useValue):Zr(function(t,e,n){let s;if(Kr(t)){const e=ot(t);return oe(e)||Ur(e)}if(Yr(t))s=()=>ot(t.useValue);else if((i=t)&&i.useFactory)s=()=>t.useFactory(...is(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))s=()=>ns(ot(t.useExisting));else{const e=ot(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return oe(e)||Ur(e);s=()=>new e(...is(t.deps))}var i;return s}(t),Vr)}(t);if(Kr(t)||!0!==t.multi)this.records.get(s);else{let e=this.records.get(s);e||(e=Zr(void 0,Vr,!0),e.factory=()=>is(e.multi),this.records.set(s,e)),s=t,e.multi.push(t)}this.records.set(s,i)}hydrate(t,e){var n;return e.value===Vr&&(e.value=zr,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=ot(t.providedIn);return"string"==typeof e?"any"===e||e===this.scope:this.injectorDefTypes.has(e)}}function Ur(t){const e=pt(t),n=null!==e?e.factory:oe(t);if(null!==n)return n;if(t instanceof Vn)throw new Error(`Token ${nt(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=qn(e,"?");throw new Error(`Can't resolve all parameters for ${nt(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[gt]||t[yt]);if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" 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 "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function Zr(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Yr(t){return null!==t&&"object"==typeof t&&Gn in t}function Kr(t){return"function"==typeof t}const Qr=function(t,e,n){return function(t,e=null,n=null,s){const i=Wr(t,e,n,s);return i._resolveInjectorDefTypes(),i}({name:n},e,t,n)};let Xr=(()=>{class t{static create(t,e){return Array.isArray(t)?Qr(t,e,""):Qr(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Kn,t.NULL=new jr,t.\u0275prov=ut({token:t,providedIn:"any",factory:()=>ns(Nr)}),t.__NG_ELEMENT_ID__=-1,t})();function Gr(t,e){nn(Ys(t)[1],Re())}function Jr(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0;const s=[t];for(;e;){let i;if(re(t))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");i=e.\u0275dir}if(i){if(n){s.push(i);const e=t;e.inputs=to(t.inputs),e.declaredInputs=to(t.declaredInputs),e.outputs=to(t.outputs);const n=i.hostBindings;n&&so(t,n);const r=i.viewQuery,o=i.contentQueries;if(r&&eo(t,r),o&&no(t,o),et(t.inputs,i.inputs),et(t.declaredInputs,i.declaredInputs),et(t.outputs,i.outputs),re(i)&&i.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(i.data.animation)}}const e=i.features;if(e)for(let s=0;s<e.length;s++){const i=e[s];i&&i.ngInherit&&i(t),i===Jr&&(n=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,n=null;for(let s=t.length-1;s>=0;s--){const i=t[s];i.hostVars=e+=i.hostVars,i.hostAttrs=fn(i.hostAttrs,n=fn(n,i.hostAttrs))}}(s)}function to(t){return t===Rt?{}:t===Mt?[]:t}function eo(t,e){const n=t.viewQuery;t.viewQuery=n?(t,s)=>{e(t,s),n(t,s)}:e}function no(t,e){const n=t.contentQueries;t.contentQueries=n?(t,s,i)=>{e(t,s,i),n(t,s,i)}:e}function so(t,e){const n=t.hostBindings;t.hostBindings=n?(t,s)=>{e(t,s),n(t,s)}:e}let io=null;function ro(){if(!io){const t=At.Symbol;if(t&&t.iterator)io=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const n=t[e];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(io=n)}}}return io}class oo{constructor(t){this.wrapped=t}static wrap(t){return new oo(t)}static unwrap(t){return oo.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof oo}}function ao(t){return!!lo(t)&&(Array.isArray(t)||!(t instanceof Map)&&ro()in t)}function lo(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function co(t,e,n){return!Object.is(t[e],n)&&(t[e]=n,!0)}function ho(t,e,n,s){const i=Ie();return co(i,Be(),e)&&(Ae(),function(t,e,n,s,i,r){const o=be(t,e);!function(t,e,n,s,i,r,o){if(null==r)me(t)?t.removeAttribute(e,i,n):e.removeAttribute(i);else{const a=null==o?lt(r):o(r,s||"",i);me(t)?t.setAttribute(e,i,a,n):n?e.setAttributeNS(n,i,a):e.setAttribute(i,a)}}(e[11],o,r,t.value,n,s,i)}(en(),i,t,e,n,s)),ho}function uo(t,e,n,s,i,r,o,a){const l=Ie(),c=Ae(),h=t+Gt,u=c.firstCreatePass?function(t,e,n,s,i,r,o,a,l){const c=e.consts,h=Gi(e,t,4,o||null,ke(c,a));ur(e,n,h,ke(c,l)),nn(e,h);const u=h.tViews=ar(2,h,s,i,r,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,h),u.queries=e.queries.embeddedTView(h)),h}(h,c,l,e,n,s,i,r,o):c.data[h];De(u,!1);const d=l[11].createComment("");vi(c,l,d,u),Zs(d,l),kr(l,l[h]=xr(d,l,d,u)),ie(u)&&ir(c,l,u),null!=o&&rr(l,u,a)}function po(t,e=vt.Default){const n=Ie();return null===n?ns(t,e):Pn(Re(),n,ot(t),e)}function fo(t,e,n){const s=Ie();return co(s,Be(),e)&&hr(Ae(),en(),s,t,e,s[11],n,!1),fo}function mo(t,e,n,s,i){const r=i?"class":"style";Fr(t,n,e.inputs[r],r,s)}function go(t,e,n,s){const i=Ie(),r=Ae(),o=Gt+t,a=i[11],l=i[o]=li(a,e,Oe.lFrame.currentNamespace),c=r.firstCreatePass?function(t,e,n,s,i,r,o){const a=e.consts,l=Gi(e,t,2,i,ke(a,r));return ur(e,n,l,ke(a,o)),null!==l.attrs&&Lr(l,l.attrs,!1),null!==l.mergedAttrs&&Lr(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(o,r,i,0,e,n,s):r.data[o];De(c,!0);const h=c.mergedAttrs;null!==h&&un(a,l,h);const u=c.classes;null!==u&&Oi(a,l,u);const d=c.styles;null!==d&&Ti(a,l,d),64!=(64&c.flags)&&vi(r,i,l,c),0===Oe.lFrame.elementDepthCount&&Zs(l,i),Oe.lFrame.elementDepthCount++,ie(c)&&(ir(r,i,c),function(t,e,n){if(ne(e)){const s=e.directiveEnd;for(let i=e.directiveStart;i<s;i++){const e=t.data[i];e.contentQueries&&e.contentQueries(1,n[i],i)}}}(r,c,i)),null!==s&&rr(i,c)}function _o(){let t=Re();Fe()?Le():(t=t.parent,De(t,!1));const e=t;Oe.lFrame.elementDepthCount--;const n=Ae();n.firstCreatePass&&(nn(n,t),ne(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&mo(n,e,Ie(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&mo(n,e,Ie(),e.stylesWithoutHost,!1)}function yo(t,e,n,s){go(t,e,n,s),_o()}function bo(t){return!!t&&"function"==typeof t.then}function vo(t){return!!t&&"function"==typeof t.subscribe}const xo=vo;function wo(t,e,n,s){const i=Ie(),r=Ae(),o=Re();return Eo(r,i,i[11],o,t,e,!!n,s),wo}function So(t,e){const n=Re(),s=Ie(),i=Ae();return Eo(i,s,Mr(He(i.data),n,s),n,t,e,!1),So}function Eo(t,e,n,s,i,r,o,a){const l=ie(s),c=t.firstCreatePass&&Rr(t),h=Ar(e);let u=!0;if(3&s.type||a){const d=be(s,e),p=a?a(d):d,f=h.length,m=a?t=>a(_e(t[s.index])):s.index;if(me(n)){let o=null;if(!a&&l&&(o=function(t,e,n,s){const i=t.cleanup;if(null!=i)for(let r=0;r<i.length-1;r+=2){const t=i[r];if(t===n&&i[r+1]===s){const t=e[7],n=i[r+2];return t.length>n?t[n]:null}"string"==typeof t&&(r+=2)}return null}(t,e,i,s.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=r,o.__ngLastListenerFn__=r,u=!1;else{r=Co(s,e,0,r,!1);const t=n.listen(p,i,r);h.push(r,t),c&&c.push(i,m,f,f+1)}}else r=Co(s,e,0,r,!0),p.addEventListener(i,r,o),h.push(r),c&&c.push(i,m,f,o)}else r=Co(s,e,0,r,!1);const d=s.outputs;let p;if(u&&null!==d&&(p=d[i])){const t=p.length;if(t)for(let n=0;n<t;n+=2){const t=e[p[n]][p[n+1]].subscribe(r),o=h.length;h.push(r,t),c&&c.push(i,s.index,o,-(o+1))}}}function ko(t,e,n,s){try{return!1!==n(s)}catch(i){return Dr(t,i),!1}}function Co(t,e,n,s,i){return function n(r){if(r===Function)return s;const o=2&t.flags?we(t.index,e):e;0==(32&e[2])&&Cr(o);let a=ko(e,0,s,r),l=n.__ngNextListenerFn__;for(;l;)a=ko(e,0,l,r)&&a,l=l.__ngNextListenerFn__;return i&&!1===a&&(r.preventDefault(),r.returnValue=!1),a}}function To(t=1){return function(t){return(Oe.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Oe.lFrame.contextLView))[8]}(t)}function Oo(t,e){let n=null;const s=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let i=0;i<e.length;i++){const r=e[i];if("*"!==r){if(null===s?Ni(t,r,!0):ji(s,r))return i}else n=i}return n}function Po(t){const e=Ie()[16][6];if(!e.projection){const n=e.projection=qn(t?t.length:1,null),s=n.slice();let i=e.child;for(;null!==i;){const e=t?Oo(i,t):0;null!==e&&(s[e]?s[e].projectionNext=i:n[e]=i,s[e]=i),i=i.next}}}function Io(t,e=0,n){const s=Ie(),i=Ae(),r=Gi(i,Gt+t,16,null,n||null);null===r.projection&&(r.projection=e),Le(),64!=(64&r.flags)&&function(t,e,n){Ci(e[11],0,e,n,pi(t,n,e),yi(n.parent||e[6],n,e))}(i,s,r)}function Ao(t,e,n,s,i){const r=t[n+1],o=null===e;let a=s?qi(r):Zi(r),l=!1;for(;0!==a&&(!1===l||o);){const n=t[a+1];Ro(t[a],e)&&(l=!0,t[a+1]=s?Ki(n):Ui(n)),a=s?qi(n):Zi(n)}l&&(t[n+1]=s?Ui(r):Ki(r))}function Ro(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Yn(t,e)>=0}function Mo(t,e){return function(t,e,n,s){const i=Ie(),r=Ae(),o=function(t){const e=Oe.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+2,n}();r.firstUpdatePass&&function(t,e,n,s){const i=t.data;if(null===i[n+1]){const r=i[Je()],o=function(t,e){return e>=t.expandoStartIndex}(t,n);(function(t,e){return 0!=(16&t.flags)})(r)&&null===e&&!o&&(e=!1),e=function(t,e,n,s){const i=He(t);let r=e.residualClasses;if(null===i)0===e.classBindings&&(n=Fo(n=Do(null,t,e,n,s),e.attrs,s),r=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==i)if(n=Do(i,t,e,n,s),null===r){let n=function(t,e,n){const s=e.classBindings;if(0!==Zi(s))return t[qi(s)]}(t,e);void 0!==n&&Array.isArray(n)&&(n=Do(null,t,e,n[1],s),n=Fo(n,e.attrs,s),function(t,e,n,s){t[qi(e.classBindings)]=s}(t,e,0,n))}else r=function(t,e,n){let s;const i=e.directiveEnd;for(let r=1+e.directiveStylingLast;r<i;r++)s=Fo(s,t[r].hostAttrs,true);return Fo(s,e.attrs,true)}(t,e)}return void 0!==r&&(e.residualClasses=r),n}(i,r,e,s),function(t,e,n,s,i,r){let o=e.classBindings,a=qi(o),l=Zi(o);t[s]=n;let c,h=!1;if(Array.isArray(n)){const t=n;c=t[1],(null===c||Yn(t,c)>0)&&(h=!0)}else c=n;if(i)if(0!==l){const e=qi(t[a+1]);t[s+1]=Wi(e,a),0!==e&&(t[e+1]=Yi(t[e+1],s)),t[a+1]=131071&t[a+1]|s<<17}else t[s+1]=Wi(a,0),0!==a&&(t[a+1]=Yi(t[a+1],s)),a=s;else t[s+1]=Wi(l,0),0===a?a=s:t[l+1]=Yi(t[l+1],s),l=s;h&&(t[s+1]=Ui(t[s+1])),Ao(t,c,s,!0),Ao(t,c,s,!1),function(t,e,n,s,i){const r=t.residualClasses;null!=r&&"string"==typeof e&&Yn(r,e)>=0&&(n[s+1]=Ki(n[s+1]))}(e,c,t,s),o=Wi(a,l),e.classBindings=o}(i,r,e,n,o)}}(r,t,o,true),e!==zi&&co(i,o,e)&&function(t,e,n,s,i,r,o,a){if(!(3&e.type))return;const l=t.data,c=l[a+1];No(1==(1&c)?Lo(l,e,n,i,Zi(c),o):void 0)||(No(r)||function(t){return 2==(2&t)}(c)&&(r=Lo(l,null,n,i,a,o)),function(t,e,n,s,i){const r=me(t);i?r?t.addClass(n,s):n.classList.add(s):r?t.removeClass(n,s):n.classList.remove(s)}(s,0,ye(Je(),n),i,r))}(r,r.data[Je()],i,i[11],t,i[o+1]=function(t,e){return null==t||"object"==typeof t&&(t=nt(bs(t))),t}(e),true,o)}(t,e),Mo}function Do(t,e,n,s,i){let r=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<o&&(r=e[a],s=Fo(s,r.hostAttrs,i),r!==t);)a++;return null!==t&&(n.directiveStylingLast=a),s}function Fo(t,e,n){const s=n?1:2;let i=-1;if(null!==e)for(let r=0;r<e.length;r++){const o=e[r];"number"==typeof o?i=o:i===s&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),Un(t,o,!!n||e[++r]))}return void 0===t?null:t}function Lo(t,e,n,s,i,r){const o=null===e;let a;for(;i>0;){const e=t[i],r=Array.isArray(e),l=r?e[1]:e,c=null===l;let h=n[i+1];h===zi&&(h=c?Mt:void 0);let u=c?Zn(h,s):l===s?h:void 0;if(r&&!No(u)&&(u=Zn(e,s)),No(u)&&(a=u,o))return a;const d=t[i+1];i=o?qi(d):Zi(d)}if(null!==e){let t=r?e.residualClasses:e.residualStyles;null!=t&&(a=Zn(t,s))}return a}function No(t){return void 0!==t}function jo(t,e=""){const n=Ie(),s=Ae(),i=t+Gt,r=s.firstCreatePass?Gi(s,i,1,e,null):s.data[i],o=n[i]=function(t,e){return me(t)?t.createText(e):t.createTextNode(e)}(n[11],e);vi(s,n,o,r),De(r,!1)}function Bo(t){return Vo("",t,""),Bo}function Vo(t,e,n){const s=Ie(),i=function(t,e,n,s){return co(t,Be(),n)?e+lt(n)+s:zi}(s,t,e,n);return i!==zi&&function(t,e,n){const s=ye(e,t);!function(t,e,n){me(t)?t.setValue(e,n):e.textContent=n}(t[11],s,n)}(s,Je(),i),Vo}function zo(t,e,n){const s=Ie();if(co(s,Be(),e)){const i=Ae(),r=en();hr(i,r,s,t,e,Mr(He(i.data),r,s),n,!0)}return zo}const Ho=void 0;var $o=["en",[["a","p"],["AM","PM"],Ho],[["AM","PM"],Ho,Ho],[["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"]],Ho,[["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"]],Ho,[["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}",Ho,"{1} 'at' {0}",Ho],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let Wo={};function qo(t){return t in Wo||(Wo[t]=At.ng&&At.ng.common&&At.ng.common.locales&&At.ng.common.locales[t]),Wo[t]}var Uo=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});const Zo="en-US";let Yo=Zo;function Ko(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,s){throw new Error(`ASSERTION ERROR: ${t} [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(Yo=t.toLowerCase().replace(/_/g,"-"))}class Qo{}class Xo{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${nt(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let Go=(()=>{class t{}return t.NULL=new Xo,t})();function Jo(...t){}function ta(t,e){return new na(be(t,e))}const ea=function(){return ta(Re(),Ie())};let na=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=ea,t})();function sa(t){return t instanceof na?t.nativeElement:t}class ia{}let ra=(()=>{class t{}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>null}),t})();class oa{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const aa=new oa("12.0.5");class la{constructor(){}supports(t){return ao(t)}create(t){return new ha(t)}}const ca=(t,e)=>e;class ha{constructor(t){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=t||ca}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,s=0,i=null;for(;e||n;){const r=!n||e&&e.currentIndex<fa(n,s,i)?e:n,o=fa(r,s,i),a=r.currentIndex;if(r===n)s--,n=n._nextRemoved;else if(e=e._next,null==r.previousIndex)s++;else{i||(i=[]);const t=o-s,e=a-s;if(t!=e){for(let n=0;n<t;n++){const s=n<i.length?i[n]:i[n]=0,r=s+n;e<=r&&r<t&&(i[n]=s+1)}i[r.previousIndex]=e-t}}o!==a&&t(r,o,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!ao(t))throw new Error(`Error trying to diff '${nt(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,n,s,i=this._itHead,r=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)n=t[e],s=this._trackByFn(e,n),null!==i&&Object.is(i.trackById,s)?(r&&(i=this._verifyReinsertion(i,n,s,e)),Object.is(i.item,n)||this._addIdentityChange(i,n)):(i=this._mismatch(i,n,s,e),r=!0),i=i._next}else e=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[ro()]();let s;for(;!(s=n.next()).done;)e(s.value)}}(t,t=>{s=this._trackByFn(e,t),null!==i&&Object.is(i.trackById,s)?(r&&(i=this._verifyReinsertion(i,t,s,e)),Object.is(i.item,t)||this._addIdentityChange(i,t)):(i=this._mismatch(i,t,s,e),r=!0),i=i._next,e++}),this.length=e;return this._truncate(i),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,s){let i;return null===t?i=this._itTail:(i=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,i,s)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,s))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,i,s)):t=this._addAfter(new ua(e,n),i,s),t}_verifyReinsertion(t,e,n,s){let i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?t=this._reinsertAfter(i,t._prev,s):t.currentIndex!=s&&(t.currentIndex=s,this._addToMoves(t,s)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}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(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const s=t._prevRemoved,i=t._nextRemoved;return null===s?this._removalsHead=i:s._nextRemoved=i,null===i?this._removalsTail=s:i._prevRemoved=s,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const s=null===e?this._itHead:e._next;return t._next=s,t._prev=e,null===s?this._itTail=t:s._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new pa),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new pa),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class ua{constructor(t,e){this.item=t,this.trackById=e,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 da{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class pa{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new da,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function fa(t,e,n){const s=t.previousIndex;if(null===s)return s;let i=0;return n&&s<n.length&&(i=n[s]),s+e+i}class ma{constructor(){}supports(t){return t instanceof Map||lo(t)}create(){return new ga}}class ga{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(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||lo(t)))throw new Error(`Error trying to diff '${nt(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,n)=>{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const s=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,s)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const s=n._prev,i=n._next;return s&&(s._next=i),i&&(i._prev=s),n._next=null,n._prev=null,n}const n=new _a(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class _a{constructor(t){this.key=t,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 ya(){return new ba([new la])}let ba=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>t.create(e,n||ya()),deps:[[t,new ls,new as]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=ut({token:t,providedIn:"root",factory:ya}),t})();function va(){return new xa([new ma])}let xa=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>t.create(e,n||va()),deps:[[t,new ls,new as]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=ut({token:t,providedIn:"root",factory:va}),t})();function wa(t,e,n,s,i=!1){for(;null!==n;){const r=e[n.index];if(null!==r&&s.push(_e(r)),ee(r))for(let t=Jt;t<r.length;t++){const e=r[t],n=e[1].firstChild;null!==n&&wa(e[1],e,n,s)}const o=n.type;if(8&o)wa(t,e,n.child,s);else if(32&o){const t=ni(n,e);let i;for(;i=t();)s.push(i)}else if(16&o){const t=wi(e,n);if(Array.isArray(t))s.push(...t);else{const n=si(e[16]);wa(n[1],n,t,s,!0)}}n=i?n.projectionNext:n.next}return s}class Sa{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const t=this._lView,e=t[1];return wa(e,t,e.firstChild,[])}get context(){return this._lView[8]}set context(t){this._lView[8]=t}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const t=this._lView[3];if(ee(t)){const e=t[8],n=e?e.indexOf(this):-1;n>-1&&(hi(t,n),Wn(e,n))}this._attachedToViewContainer=!1}ui(this._lView[1],this._lView)}onDestroy(t){lr(this._lView[1],this._lView,null,t)}markForCheck(){Cr(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Tr(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){je(!0);try{Tr(t,e,n)}finally{je(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,ki(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class Ea extends Sa{constructor(t){super(t),this._view=t}detectChanges(){Or(this._view)}checkNoChanges(){!function(t){je(!0);try{Or(t)}finally{je(!1)}}(this._view)}get context(){return null}}const ka=function(t){return function(t,e,n){if(se(t)&&!n){const n=we(t.index,e);return new Sa(n,n)}return 47&t.type?new Sa(e[16],e):null}(Re(),Ie(),16==(16&t))};let Ca=(()=>{class t{}return t.__NG_ELEMENT_ID__=ka,t})();const Ta=[new ma],Oa=new ba([new la]),Pa=new xa(Ta),Ia=function(){return Da(Re(),Ie())};let Aa=(()=>{class t{}return t.__NG_ELEMENT_ID__=Ia,t})();const Ra=Aa,Ma=class extends Ra{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=Xi(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(n[19]=s.createEmbeddedView(e)),tr(e,n,t),new Sa(n)}};function Da(t,e){return 4&t.type?new Ma(e,t,ta(t,e)):null}class Fa{}const La=function(){return Ha(Re(),Ie())};let Na=(()=>{class t{}return t.__NG_ELEMENT_ID__=La,t})();const ja=Na,Ba=class extends ja{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return ta(this._hostTNode,this._hostLView)}get injector(){return new Nn(this._hostTNode,this._hostLView)}get parentInjector(){const t=kn(this._hostTNode,this._hostLView);if(gn(t)){const e=yn(t,this._hostLView),n=_n(t);return new Nn(e[1].data[n+8],e)}return new Nn(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Va(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Jt}createEmbeddedView(t,e,n){const s=t.createEmbeddedView(e||{});return this.insert(s,n),s}createComponent(t,e,n,s,i){const r=n||this.parentInjector;if(!i&&null==t.ngModule&&r){const t=r.get(Fa,null);t&&(i=t)}const o=t.create(r,s,void 0,i);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,s=n[1];if(ee(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],s=new Ba(e,e[6],e[3]);s.detach(s.indexOf(t))}}const i=this._adjustIndex(e),r=this._lContainer;!function(t,e,n,s){const i=Jt+s,r=n.length;s>0&&(n[i-1][4]=e),s<r-Jt?(e[4]=n[i],$n(n,Jt+s,e)):(n.push(e),e[4]=null),e[3]=n;const o=e[17];null!==o&&n!==o&&function(t,e){const n=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===n?t[9]=[e]:n.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(s,n,r,i);const o=Si(i,r),a=n[11],l=_i(a,r[7]);return null!==l&&function(t,e,n,s,i,r){s[0]=i,s[6]=e,ki(t,s,n,1,i,r)}(s,r[6],a,n,l,o),t.attachToViewContainerRef(),$n(za(r),i,t),t}move(t,e){return this.insert(t,e)}indexOf(t){const e=Va(this._lContainer);return null!==e?e.indexOf(t):-1}remove(t){const e=this._adjustIndex(t,-1),n=hi(this._lContainer,e);n&&(Wn(za(this._lContainer),e),ui(n[1],n))}detach(t){const e=this._adjustIndex(t,-1),n=hi(this._lContainer,e);return n&&null!=Wn(za(this._lContainer),e)?new Sa(n):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}};function Va(t){return t[8]}function za(t){return t[8]||(t[8]=[])}function Ha(t,e){let n;const s=e[t.index];if(ee(s))n=s;else{let i;if(8&t.type)i=_e(s);else{const n=e[11];i=n.createComment("");const s=be(t,e);fi(n,_i(n,s),i,function(t,e){return me(t)?t.nextSibling(e):e.nextSibling}(n,s),!1)}e[t.index]=n=xr(s,e,i,t),kr(e,n)}return new Ba(n,t,e)}const $a={};class Wa extends Go{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Qt(t);return new Za(e,this.ngModule)}}function qa(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const Ua=new Vn("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Js});class Za extends Qo{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(Vi).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return qa(this.componentDef.inputs)}get outputs(){return qa(this.componentDef.outputs)}create(t,e,n,s){const i=(s=s||this.ngModule)?function(t,e){return{get:(n,s,i)=>{const r=t.get(n,$a,i);return r!==$a||s===$a?r:e.get(n,s,i)}}}(t,s.injector):t,r=i.get(ia,ge),o=i.get(ra,null),a=r.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(me(t))return t.selectRootElement(e,n===Ct.ShadowDom);let s="string"==typeof e?t.querySelector(e):e;return s.textContent="",s}(a,n,this.componentDef.encapsulation):li(r.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),h=this.componentDef.onPush?576:528,u={components:[],scheduler:Js,clean:Ir,playerHandler:null,flags:0},d=ar(0,null,null,1,0,null,null,null,null,null),p=Xi(null,d,u,h,null,null,r,a,o,i);let f,m;Ze(p);try{const t=function(t,e,n,s,i,r){const o=n[1];n[20]=t;const a=Gi(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(Lr(a,l,!0),null!==t&&(un(i,t,l),null!==a.classes&&Oi(i,t,a.classes),null!==a.styles&&Ti(i,t,a.styles)));const c=s.createRenderer(t,e),h=Xi(n,or(e),null,e.onPush?64:16,n[20],a,s,c,null,null);return o.firstCreatePass&&(Cn(wn(a,n),o,e.type),fr(o,a),gr(a,n.length,1)),kr(n,h),n[20]=h}(c,this.componentDef,p,r,a);if(c)if(n)un(a,c,["ng-version",aa.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let s=1,i=2;for(;s<t.length;){let r=t[s];if("string"==typeof r)2===i?""!==r&&e.push(r,t[++s]):8===i&&n.push(r);else{if(!Fi(i))break;i=r}s++}return{attrs:e,classes:n}}(this.componentDef.selectors[0]);t&&un(a,c,t),e&&e.length>0&&Oi(a,c,e.join(" "))}if(m=ve(d,Gt),void 0!==e){const t=m.projection=[];for(let n=0;n<this.ngContentSelectors.length;n++){const s=e[n];t.push(null!=s?Array.from(s):null)}}f=function(t,e,n,s,i){const r=n[1],o=function(t,e,n){const s=Re();t.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),_r(t,s,e,Ji(t,e,1,null),n));const i=Dn(e,t,s.directiveStart,s);Zs(i,e);const r=be(s,e);return r&&Zs(r,e),i}(r,n,e);if(s.components.push(o),t[8]=o,i&&i.forEach(t=>t(o,e)),e.contentQueries){const t=Re();e.contentQueries(1,o,t.directiveStart)}const a=Re();return!r.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(tn(a.index),dr(n[1],a,0,a.directiveStart,a.directiveEnd,e),pr(e,o)),o}(t,this.componentDef,p,u,[Gr]),tr(d,p,null)}finally{Ge()}return new Ya(this.componentType,f,ta(m,p),p,m)}}class Ya extends class{}{constructor(t,e,n,s,i){super(),this.location=n,this._rootLView=s,this._tNode=i,this.instance=e,this.hostView=this.changeDetectorRef=new Ea(s),this.componentType=t}get injector(){return new Nn(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}const Ka=new Map;class Qa extends Fa{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Wa(this);const n=Xt(t),s=t[jt]||null;s&&Ko(s),this._bootstrapComponents=ti(n.bootstrap),this._r3Injector=Wr(t,e,[{provide:Fa,useValue:this},{provide:Go,useValue:this.componentFactoryResolver}],nt(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=Xr.THROW_IF_NOT_FOUND,n=vt.Default){return t===Xr||t===Fa||t===Nr?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Xa extends class{}{constructor(t){super(),this.moduleType=t,null!==Xt(t)&&function(t){const e=new Set;!function t(n){const s=Xt(n,!0),i=s.id;null!==i&&(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${nt(e)} vs ${nt(e.name)}`)}(i,Ka.get(i),n),Ka.set(i,n));const r=ti(s.imports);for(const o of r)e.has(o)||(e.add(o),t(o))}(t)}(t)}create(t){return new Qa(this.moduleType,t)}}function Ga(t,e){const n=Ae();let s;const i=t+Gt;n.firstCreatePass?(s=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const s=e[n];if(t===s.name)return s}throw new at("302",`The pipe '${t}' could not be found!`)}(e,n.pipeRegistry),n.data[i]=s,s.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(i,s.onDestroy)):s=n.data[i];const r=s.factory||(s.factory=oe(s.type)),o=wt(po);try{const t=vn(!1),e=r();return vn(t),function(t,e,n,s){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=s}(n,Ie(),i,e),e}finally{wt(o)}}function Ja(t,e,n){const s=t+Gt,i=Ie(),r=xe(i,s);return function(t,e){return oo.isWrapped(e)&&(e=oo.unwrap(e),t[Oe.lFrame.bindingIndex]=zi),e}(i,function(t,e){return t[1].data[e].pure}(i,s)?function(t,e,n,s,i,r){const o=e+n;return co(t,o,i)?function(t,e,n){return t[e]=n}(t,o+1,r?s.call(r,i):s(i)):function(t,e){const n=t[e];return n===zi?void 0:n}(t,o+1)}(i,function(){const t=Oe.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}(),e,r.transform,n,r):r.transform(n))}function tl(t){return e=>{setTimeout(t,void 0,e)}}const el=class extends S{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){var s,i,r;let o=t,a=e||(()=>null),l=n;if(t&&"object"==typeof t){const e=t;o=null===(s=e.next)||void 0===s?void 0:s.bind(e),a=null===(i=e.error)||void 0===i?void 0:i.bind(e),l=null===(r=e.complete)||void 0===r?void 0:r.bind(e)}this.__isAsync&&(a=tl(a),o&&(o=tl(o)),l&&(l=tl(l)));const c=super.subscribe({next:o,error:a,complete:l});return t instanceof u&&t.add(c),c}};function nl(){return this._results[ro()]()}class sl{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=ro(),n=sl.prototype;n[e]||(n[e]=nl)}get changes(){return this._changes||(this._changes=new el)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const n=this;n.dirty=!1;const s=zn(t);(this._changesDetected=!function(t,e,n){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++){let i=t[s],r=e[s];if(n&&(i=n(i),r=n(r)),r!==i)return!1}return!0}(n._results,s,e))&&(n._results=s,n.length=s.length,n.last=s[this.length-1],n.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()}}class il{constructor(t){this.queryList=t,this.matches=null}clone(){return new il(this.queryList)}setDirty(){this.queryList.setDirty()}}class rl{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,s=[];for(let t=0;t<n;t++){const n=e.getByIndex(t);s.push(this.queries[n.indexInDeclarationView].clone())}return new rl(s)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==gl(t,e).matches&&this.queries[e].setDirty()}}class ol{constructor(t,e,n=null){this.predicate=t,this.flags=e,this.read=n}}class al{constructor(t=[]){this.queries=t}elementStart(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let n=0;n<this.length;n++){const s=null!==e?e.length:0,i=this.getByIndex(n).embeddedTView(t,s);i&&(i.indexInDeclarationView=n,null!==e?e.push(i):e=[i])}return null!==e?new al(e):null}template(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class ll{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new ll(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const e=this._declarationNodeIndex;let n=t.parent;for(;null!==n&&8&n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}matchTNode(t,e){const n=this.metadata.predicate;if(Array.isArray(n))for(let s=0;s<n.length;s++){const i=n[s];this.matchTNodeWithReadOption(t,e,cl(e,i)),this.matchTNodeWithReadOption(t,e,Mn(e,t,i,!1,!1))}else n===Aa?4&e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Mn(e,t,n,!1,!1))}matchTNodeWithReadOption(t,e,n){if(null!==n){const s=this.metadata.read;if(null!==s)if(s===na||s===Na||s===Aa&&4&e.type)this.addMatch(e.index,-2);else{const n=Mn(e,t,s,!1,!1);null!==n&&this.addMatch(e.index,n)}else this.addMatch(e.index,n)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function cl(t,e){const n=t.localNames;if(null!==n)for(let s=0;s<n.length;s+=2)if(n[s]===e)return n[s+1];return null}function hl(t,e,n,s){return-1===n?function(t,e){return 11&t.type?ta(t,e):4&t.type?Da(t,e):null}(e,t):-2===n?function(t,e,n){return n===na?ta(e,t):n===Aa?Da(e,t):n===Na?Ha(e,t):void 0}(t,e,s):Dn(t,t[1],n,e)}function ul(t,e,n,s){const i=e[19].queries[s];if(null===i.matches){const s=t.data,r=n.matches,o=[];for(let t=0;t<r.length;t+=2){const i=r[t];o.push(i<0?null:hl(e,s[i],r[t+1],n.metadata.read))}i.matches=o}return i.matches}function dl(t,e,n,s){const i=t.queries.getByIndex(n),r=i.matches;if(null!==r){const o=ul(t,e,i,n);for(let t=0;t<r.length;t+=2){const n=r[t];if(n>0)s.push(o[t/2]);else{const i=r[t+1],o=e[-n];for(let t=Jt;t<o.length;t++){const e=o[t];e[17]===e[3]&&dl(e[1],e,i,s)}if(null!==o[9]){const t=o[9];for(let e=0;e<t.length;e++){const n=t[e];dl(n[1],n,i,s)}}}}}return s}function pl(t){const e=Ie(),n=Ae(),s=$e();We(s+1);const i=gl(n,s);if(t.dirty&&Se(e)===(2==(2&i.metadata.flags))){if(null===i.matches)t.reset([]);else{const r=i.crossesNgTemplate?dl(n,e,s,[]):ul(n,e,i,s);t.reset(r,sa),t.notifyOnChanges()}return!0}return!1}function fl(t,e,n){const s=Ae();s.firstCreatePass&&(function(t,e,n){null===t.queries&&(t.queries=new al),t.queries.track(new ll(e,-1))}(s,new ol(t,e,n)),2==(2&e)&&(s.staticViewQueries=!0)),function(t,e,n){const s=new sl(4==(4&n));lr(t,e,s,s.destroy),null===e[19]&&(e[19]=new rl),e[19].queries.push(new il(s))}(s,Ie(),e)}function ml(){return t=Ie(),e=$e(),t[19].queries[e].queryList;var t,e}function gl(t,e){return t.queries.getByIndex(e)}function _l(t,e){return Da(t,e)}const yl=new Vn("Application Initializer");let bl=(()=>{class t{constructor(t){this.appInits=t,this.resolve=Jo,this.reject=Jo,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const e=this.appInits[n]();if(bo(e))t.push(e);else if(xo(e)){const n=new Promise((t,n)=>{e.subscribe({complete:t,error:n})});t.push(n)}}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(ns(yl,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const vl=new Vn("AppId"),xl={provide:vl,useFactory:function(){return`${wl()}${wl()}${wl()}`},deps:[]};function wl(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Sl=new Vn("Platform Initializer"),El=new Vn("Platform ID"),kl=new Vn("appBootstrapListener");let Cl=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Tl=new Vn("LocaleId"),Ol=new Vn("DefaultCurrencyCode");class Pl{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const Il=function(t){return new Xa(t)},Al=Il,Rl=function(t){return Promise.resolve(Il(t))},Ml=function(t){const e=Il(t),n=ti(Xt(t).declarations).reduce((t,e)=>{const n=Qt(e);return n&&t.push(new Za(n)),t},[]);return new Pl(e,n)},Dl=Ml,Fl=function(t){return Promise.resolve(Ml(t))};let Ll=(()=>{class t{constructor(){this.compileModuleSync=Al,this.compileModuleAsync=Rl,this.compileModuleAndAllComponentsSync=Dl,this.compileModuleAndAllComponentsAsync=Fl}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Nl=(()=>Promise.resolve(0))();function jl(t){"undefined"==typeof Zone?Nl.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Bl{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new el(!1),this.onMicrotaskEmpty=new el(!1),this.onStable=new el(!1),this.onError=new el(!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)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!n&&e,s.shouldCoalesceRunChangeDetection=n,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function(){let t=At.requestAnimationFrame,e=At.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const s=e[Zone.__symbol__("OriginalDelegate")];s&&(e=s)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=()=>{!function(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(At,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Hl(t),t.isCheckStableRunning=!0,zl(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Hl(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,s,i,r,o,a)=>{try{return $l(t),n.invokeTask(i,r,o,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===r.type||t.shouldCoalesceRunChangeDetection)&&e(),Wl(t)}},onInvoke:(n,s,i,r,o,a,l)=>{try{return $l(t),n.invoke(i,r,o,a,l)}finally{t.shouldCoalesceRunChangeDetection&&e(),Wl(t)}},onHasTask:(e,n,s,i)=>{e.hasTask(s,i),n===s&&("microTask"==i.change?(t._hasPendingMicrotasks=i.microTask,Hl(t),zl(t)):"macroTask"==i.change&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:(e,n,s,i)=>(e.handleError(s,i),t.runOutsideAngular(()=>t.onError.emit(i)),!1)})}(s)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Bl.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Bl.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,s){const i=this._inner,r=i.scheduleEventTask("NgZoneEvent: "+s,t,Vl,Jo,Jo);try{return i.runTask(r,e,n)}finally{i.cancelTask(r)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}const Vl={};function zl(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Hl(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function $l(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Wl(t){t._nesting--,zl(t)}class ql{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new el,this.onMicrotaskEmpty=new el,this.onStable=new el,this.onError=new el}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,s){return t.apply(e,n)}}let Ul=(()=>{class t{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:()=>{Bl.assertNotInAngularZone(),jl(()=>{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())jl(()=>{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(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.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,e,n){let s=-1;e&&e>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==s),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:n})}whenStable(t,e,n){if(n&&!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,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(ns(Bl))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Zl=(()=>{class t{constructor(){this._applications=new Map,Ql.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}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,e=!0){return Ql.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Yl{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let Kl,Ql=new Yl,Xl=!0,Gl=!1;function Jl(){return Gl=!0,Xl}const tc=new Vn("AllowMultipleToken");function ec(t,e,n=[]){const s=`Platform: ${e}`,i=new Vn(s);return(e=[])=>{let r=nc();if(!r||r.injector.get(tc,!1))if(t)t(n.concat(e).concat({provide:i,useValue:!0}));else{const t=n.concat(e).concat({provide:i,useValue:!0},{provide:Br,useValue:"platform"});!function(t){if(Kl&&!Kl.destroyed&&!Kl.injector.get(tc,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Kl=t.get(sc);const e=t.get(Sl,null);e&&e.forEach(t=>t())}(Xr.create({providers:t,name:s}))}return function(t){const e=nc();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(i)}}function nc(){return Kl&&!Kl.destroyed?Kl:null}let sc=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new ql:("zone.js"===t?void 0:t)||new Bl({enableLongStackTrace:Jl(),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),n}(e?e.ngZone:void 0,{ngZoneEventCoalescing:e&&e.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:e&&e.ngZoneRunCoalescing||!1}),s=[{provide:Bl,useValue:n}];return n.run(()=>{const e=Xr.create({providers:s,parent:this.injector,name:t.moduleType.name}),i=t.create(e),r=i.injector.get(Gs,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.runOutsideAngular(()=>{const t=n.onError.subscribe({next:t=>{r.handleError(t)}});i.onDestroy(()=>{oc(this._modules,i),t.unsubscribe()})}),function(t,e,n){try{const s=n();return bo(s)?s.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):s}catch(s){throw e.runOutsideAngular(()=>t.handleError(s)),s}}(r,n,()=>{const t=i.injector.get(bl);return t.runInitializers(),t.donePromise.then(()=>(Ko(i.injector.get(Tl,Zo)||Zo),this._moduleDoBootstrap(i),i))})})}bootstrapModule(t,e=[]){const n=ic({},e);return function(t,e,n){const s=new Xa(n);return Promise.resolve(s)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(rc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${nt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(ns(Xr))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function ic(t,e){return Array.isArray(e)?e.reduce(ic,t):Object.assign(Object.assign({},t),e)}let rc=(()=>{class t{constructor(t,e,n,s,i){this._zone=t,this._injector=e,this._exceptionHandler=n,this._componentFactoryResolver=s,this._initStatus=i,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 r=new y(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),o=new y(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{Bl.assertNotInAngularZone(),jl(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{Bl.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=q(r,o.pipe(J()))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof Qo?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const s=n.isBoundToModule?void 0:this._injector.get(Fa),i=n.create(Xr.NULL,[],e||n.selector,s),r=i.location.nativeElement,o=i.injector.get(Ul,null),a=o&&i.injector.get(Zl);return o&&a&&a.registerApplication(r,o),i.onDestroy(()=>{this.detachView(i.hostView),oc(this.components,i),a&&a.unregisterApplication(r)}),this._loadComponent(i),i}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");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 e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;oc(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(kl,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(ns(Bl),ns(Xr),ns(Gs),ns(Go),ns(bl))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function oc(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ac=ec(null,"core",[{provide:El,useValue:"unknown"},{provide:sc,deps:[Xr]},{provide:Zl,deps:[]},{provide:Cl,deps:[]}]),lc=[{provide:rc,useClass:rc,deps:[Bl,Xr,Gs,Go,bl]},{provide:Ua,deps:[Bl],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:bl,useClass:bl,deps:[[new as,yl]]},{provide:Ll,useClass:Ll,deps:[]},xl,{provide:ba,useFactory:function(){return Oa},deps:[]},{provide:xa,useFactory:function(){return Pa},deps:[]},{provide:Tl,useFactory:function(t){return Ko(t=t||"undefined"!=typeof $localize&&$localize.locale||Zo),t},deps:[[new os(Tl),new as,new ls]]},{provide:Ol,useValue:"USD"}];let cc=(()=>{class t{constructor(t){}}return t.\u0275fac=function(e){return new(e||t)(ns(rc))},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({providers:lc}),t})(),hc=null;function uc(){return hc}const dc=new Vn("DocumentToken");let pc=(()=>{class t{historyGo(t){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:fc,token:t,providedIn:"platform"}),t})();function fc(){return ns(mc)}let mc=(()=>{class t extends pc{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return uc().getBaseHref(this._doc)}onPopState(t){const e=uc().getGlobalEventTarget(this._doc,"window");return e.addEventListener("popstate",t,!1),()=>e.removeEventListener("popstate",t)}onHashChange(t){const e=uc().getGlobalEventTarget(this._doc,"window");return e.addEventListener("hashchange",t,!1),()=>e.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,e,n){gc()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){gc()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(ns(dc))},t.\u0275prov=ut({factory:_c,token:t,providedIn:"platform"}),t})();function gc(){return!!window.history.pushState}function _c(){return new mc(ns(dc))}function yc(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function bc(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function vc(t){return t&&"?"!==t[0]?"?"+t:t}let xc=(()=>{class t{historyGo(t){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:wc,token:t,providedIn:"root"}),t})();function wc(t){const e=ns(dc).location;return new Ec(ns(pc),e&&e.origin||"")}const Sc=new Vn("appBaseHref");let Ec=(()=>{class t extends xc{constructor(t,e){if(super(),this._platformLocation=t,this._removeListenerFns=[],null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)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=e}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 yc(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+vc(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,s){const i=this.prepareExternalUrl(n+vc(s));this._platformLocation.pushState(t,e,i)}replaceState(t,e,n,s){const i=this.prepareExternalUrl(n+vc(s));this._platformLocation.replaceState(t,e,i)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var e,n;null===(n=(e=this._platformLocation).historyGo)||void 0===n||n.call(e,t)}}return t.\u0275fac=function(e){return new(e||t)(ns(pc),ns(Sc,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),kc=(()=>{class t{constructor(t,e){this._subject=new el,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=bc(Tc(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+vc(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,Tc(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+vc(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+vc(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(t=0){var e,n;null===(n=(e=this._platformStrategy).historyGo)||void 0===n||n.call(e,t)}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(ns(xc),ns(pc))},t.normalizeQueryParams=vc,t.joinWithSlash=yc,t.stripTrailingSlash=bc,t.\u0275prov=ut({factory:Cc,token:t,providedIn:"root"}),t})();function Cc(){return new kc(ns(xc),ns(pc))}function Tc(t){return t.replace(/\/index.html$/,"")}var Oc=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({});class Pc{}let Ic=(()=>{class t extends Pc{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(function(t){return function(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=qo(e);if(n)return n;const s=e.split("-")[0];if(n=qo(s),n)return n;if("en"===s)return $o;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[Uo.PluralCase]}(e||this.locale)(t)){case Oc.Zero:return"zero";case Oc.One:return"one";case Oc.Two:return"two";case Oc.Few:return"few";case Oc.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(ns(Tl))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function Ac(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[s,i]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(s.trim()===e)return decodeURIComponent(i)}return null}class Rc{constructor(t,e,n,s){this.$implicit=t,this.ngForOf=e,this.index=n,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 Mc=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,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 n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${n}' of type '${t=n,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,s)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new Rc(null,this._ngForOf,-1,-1),null===s?void 0:s),i=new Dc(t,n);e.push(i)}else if(null==s)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const i=this._viewContainer.get(n);this._viewContainer.move(i,s);const r=new Dc(t,i);e.push(r)}});for(let n=0;n<e.length;n++)this._perViewChange(e[n].view,e[n].record);for(let n=0,s=this._viewContainer.length;n<s;n++){const t=this._viewContainer.get(n);t.context.index=n,t.context.count=s,t.context.ngForOf=this._ngForOf}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(po(Na),po(Aa),po(ba))},t.\u0275dir=Yt({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class Dc{constructor(t,e){this.record=t,this.view=e}}let Fc=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new Lc,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Nc("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Nc("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,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(po(Na),po(Aa))},t.\u0275dir=Yt({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class Lc{constructor(){this.$implicit=null,this.ngIf=null}}function Nc(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${nt(e)}'.`)}class jc{createSubscription(t,e){return t.subscribe({next:e,error:t=>{throw t}})}dispose(t){t.unsubscribe()}onDestroy(t){t.unsubscribe()}}class Bc{createSubscription(t,e){return t.then(e,t=>{throw t})}dispose(t){}onDestroy(t){}}const Vc=new Bc,zc=new jc;let Hc=(()=>{class t{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,e=>this._updateLatestValue(t,e))}_selectStrategy(e){if(bo(e))return Vc;if(vo(e))return zc;throw Error(`InvalidPipeArgument: '${e}' for pipe '${nt(t)}'`)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(po(Ca,16))},t.\u0275pipe=Kt({name:"async",type:t,pure:!1}),t})(),$c=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({providers:[{provide:Pc,useClass:Ic}]}),t})();class Wc{}class qc extends class extends class{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){var t;t=new qc,hc||(hc=t)}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=(Zc=Zc||document.querySelector("base"),Zc?Zc.getAttribute("href"):null);return null==e?null:function(t){Uc=Uc||document.createElement("a"),Uc.setAttribute("href",t);const e=Uc.pathname;return"/"===e.charAt(0)?e:`/${e}`}(e)}resetBaseElement(){Zc=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Ac(document.cookie,t)}}let Uc,Zc=null;const Yc=new Vn("TRANSITION_ID"),Kc=[{provide:yl,useFactory:function(t,e,n){return()=>{n.get(bl).donePromise.then(()=>{const n=uc();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[Yc,dc,Xr],multi:!0}];class Qc{static init(){var t;t=new Qc,Ql=t}addToWindow(t){At.getAngularTestability=(e,n=!0)=>{const s=t.findTestabilityInTree(e,n);if(null==s)throw new Error("Could not find testability for element.");return s},At.getAllAngularTestabilities=()=>t.getAllTestabilities(),At.getAllAngularRootElements=()=>t.getAllRootElements(),At.frameworkStabilizers||(At.frameworkStabilizers=[]),At.frameworkStabilizers.push(t=>{const e=At.getAllAngularTestabilities();let n=e.length,s=!1;const i=function(e){s=s||e,n--,0==n&&t(s)};e.forEach(function(t){t.whenStable(i)})})}findTestabilityInTree(t,e,n){if(null==e)return null;const s=t.getTestability(e);return null!=s?s:n?uc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}let Xc=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Gc=new Vn("EventManagerPlugins");let Jc=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let s=0;s<n.length;s++){const e=n[s];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error(`No event manager plugin found for event ${t}`)}}return t.\u0275fac=function(e){return new(e||t)(ns(Gc),ns(Bl))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class th{constructor(t){this._doc=t}addGlobalEventListener(t,e,n){const s=uc().getGlobalEventTarget(this._doc,t);if(!s)throw new Error(`Unsupported event target ${s} for event ${e}`);return this.addEventListener(s,e,n)}}let eh=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),nh=(()=>{class t extends eh{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,e,n){t.forEach(t=>{const s=this._doc.createElement("style");s.textContent=t,n.push(e.appendChild(s))})}addHost(t){const e=[];this._addStylesToHost(this._stylesSet,t,e),this._hostNodes.set(t,e)}removeHost(t){const e=this._hostNodes.get(t);e&&e.forEach(sh),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((e,n)=>{this._addStylesToHost(t,n,e)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(sh))}}return t.\u0275fac=function(e){return new(e||t)(ns(dc))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function sh(t){uc().remove(t)}const ih={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/"},rh=/%COMP%/g;function oh(t,e,n){for(let s=0;s<e.length;s++){let i=e[s];Array.isArray(i)?oh(t,i,n):(i=i.replace(rh,t),n.push(i))}return n}function ah(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let lh=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new ch(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case Ct.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new hh(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case 1:case Ct.ShadowDom:return new uh(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=oh(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(ns(Jc),ns(nh),ns(vl))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class ch{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(ih[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,s){if(s){e=s+":"+e;const i=ih[s];i?t.setAttributeNS(i,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const s=ih[n];s?t.removeAttributeNS(s,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,s){s&(ei.DashCase|ei.Important)?t.style.setProperty(e,n,s&ei.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&ei.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,ah(n)):this.eventManager.addEventListener(t,e,ah(n))}}class hh extends ch{constructor(t,e,n,s){super(t),this.component=n;const i=oh(s+"-"+n.id,n.styles,[]);e.addStyles(i),this.contentAttr="_ngcontent-%COMP%".replace(rh,s+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(rh,s+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class uh extends ch{constructor(t,e,n,s){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const i=oh(s.id,s.styles,[]);for(let r=0;r<i.length;r++){const t=document.createElement("style");t.textContent=i[r],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let dh=(()=>{class t extends th{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(ns(dc))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const ph=["alt","control","meta","shift"],fh={"\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"},mh={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"},gh={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let _h=(()=>{class t extends th{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,s){const i=t.parseEventName(n),r=t.eventCallback(i.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>uc().onAndCancel(e,i.domEventName,r))}static parseEventName(e){const n=e.toLowerCase().split("."),s=n.shift();if(0===n.length||"keydown"!==s&&"keyup"!==s)return null;const i=t._normalizeKey(n.pop());let r="";if(ph.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),r+=t+".")}),r+=i,0!=n.length||0===i.length)return null;const o={};return o.domEventName=s,o.fullKey=r,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&mh.hasOwnProperty(e)&&(e=mh[e]))}return fh[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),ph.forEach(s=>{s!=n&&(0,gh[s])(t)&&(e+=s+".")}),e+=n,e}static eventCallback(e,n,s){return i=>{t.getEventFullKey(i)===e&&s.runGuarded(()=>n(i))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(ns(dc))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),yh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return ns(vh)},token:t,providedIn:"root"}),t})();function bh(t){return new vh(t.get(dc))}let vh=(()=>{class t extends yh{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case qs.NONE:return e;case qs.HTML:return vs(e,"HTML")?bs(e):$s(this._doc,String(e)).toString();case qs.STYLE:return vs(e,"Style")?bs(e):e;case qs.SCRIPT:if(vs(e,"Script"))return bs(e);throw new Error("unsafe value used in a script context");case qs.URL:return xs(e),vs(e,"URL")?bs(e):Cs(String(e));case qs.RESOURCE_URL:if(vs(e,"ResourceURL"))return bs(e);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 new fs(t)}bypassSecurityTrustStyle(t){return new ms(t)}bypassSecurityTrustScript(t){return new gs(t)}bypassSecurityTrustUrl(t){return new _s(t)}bypassSecurityTrustResourceUrl(t){return new ys(t)}}return t.\u0275fac=function(e){return new(e||t)(ns(dc))},t.\u0275prov=ut({factory:function(){return bh(ns(Nr))},token:t,providedIn:"root"}),t})();const xh=ec(ac,"browser",[{provide:El,useValue:"browser"},{provide:Sl,useValue:function(){qc.makeCurrent(),Qc.init()},multi:!0},{provide:dc,useFactory:function(){return function(t){pe=t}(document),document},deps:[]}]),wh=[[],{provide:Br,useValue:"root"},{provide:Gs,useFactory:function(){return new Gs},deps:[]},{provide:Gc,useClass:dh,multi:!0,deps:[dc,Bl,El]},{provide:Gc,useClass:_h,multi:!0,deps:[dc]},[],{provide:lh,useClass:lh,deps:[Jc,nh,vl]},{provide:ia,useExisting:lh},{provide:eh,useExisting:nh},{provide:nh,useClass:nh,deps:[dc]},{provide:Ul,useClass:Ul,deps:[Bl]},{provide:Jc,useClass:Jc,deps:[Gc,Bl]},{provide:Wc,useClass:Xc,deps:[]},[]];let Sh=(()=>{class t{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(e){return{ngModule:t,providers:[{provide:vl,useValue:e.appId},{provide:Yc,useExisting:vl},Kc]}}}return t.\u0275fac=function(e){return new(e||t)(ns(t,12))},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({providers:wh,imports:[$c,cc]}),t})();function Eh(...t){let e=t[t.length-1];return k(e)?(t.pop(),j(t,e)):W(t)}function kh(t,e){return function(n){return n.lift(new Ch(t,e))}}"undefined"!=typeof window&&window;class Ch{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new Th(t,this.predicate,this.thisArg))}}class Th extends f{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}class Oh{}class Ph{}class Ih{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),s=n.toLowerCase(),i=t.slice(e+1).trim();this.maybeSetNormalizedName(n,s),this.headers.has(s)?this.headers.get(s).push(i):this.headers.set(s,[i])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const s=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(s,n),this.maybeSetNormalizedName(e,s))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Ih?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Ih;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Ih?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const s=("a"===t.op?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":const i=t.value;if(i){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===i.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class Ah{encodeKey(t){return Rh(t)}encodeValue(t){return Rh(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function Rh(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}function Mh(t){return`${t}`}class Dh{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Ah,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(t=>{const s=t.indexOf("="),[i,r]=-1==s?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,s)),e.decodeValue(t.slice(s+1))],o=n.get(i)||[];o.push(r),n.set(i,o)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(n=>{const s=t[n];Array.isArray(s)?s.forEach(t=>{e.push({param:n,value:t,op:"a"})}):e.push({param:n,value:s,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Dh({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(Mh(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(Mh(t.value));-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class Fh{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}keys(){return this.map.keys()}}function Lh(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Nh(t){return"undefined"!=typeof Blob&&t instanceof Blob}function jh(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Bh{constructor(t,e,n,s){let i;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||s?(this.body=void 0!==n?n:null,i=s):i=n,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params)),this.headers||(this.headers=new Ih),this.context||(this.context=new Fh),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":n<e.length-1?"&":"")+t}}else this.params=new Dh,this.urlWithParams=e}serializeBody(){return null===this.body?null:Lh(this.body)||Nh(this.body)||jh(this.body)||"string"==typeof this.body?this.body:this.body instanceof Dh?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||jh(this.body)?null:Nh(this.body)?this.body.type||null:Lh(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Dh?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(t={}){var e;const n=t.method||this.method,s=t.url||this.url,i=t.responseType||this.responseType,r=void 0!==t.body?t.body:this.body,o=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,a=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let l=t.headers||this.headers,c=t.params||this.params;const h=null!==(e=t.context)&&void 0!==e?e:this.context;return void 0!==t.setHeaders&&(l=Object.keys(t.setHeaders).reduce((e,n)=>e.set(n,t.setHeaders[n]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),c)),new Bh(n,s,r,{params:c,headers:l,context:h,reportProgress:a,responseType:i,withCredentials:o})}}var Vh=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class zh{constructor(t,e=200,n="OK"){this.headers=t.headers||new Ih,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class Hh extends zh{constructor(t={}){super(t),this.type=Vh.ResponseHeader}clone(t={}){return new Hh({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class $h extends zh{constructor(t={}){super(t),this.type=Vh.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new $h({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Wh extends zh{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function qh(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Uh=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let s;if(t instanceof Bh)s=t;else{let i,r;i=n.headers instanceof Ih?n.headers:new Ih(n.headers),n.params&&(r=n.params instanceof Dh?n.params:new Dh({fromObject:n.params})),s=new Bh(t,e,void 0!==n.body?n.body:null,{headers:i,context:n.context,params:r,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const i=Eh(s).pipe(V(t=>this.handler.handle(t),void 0,1));if(t instanceof Bh||"events"===n.observe)return i;const r=i.pipe(kh(t=>t instanceof $h));switch(n.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return r.pipe(F(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return r.pipe(F(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return r.pipe(F(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return r.pipe(F(t=>t.body))}case"response":return r;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new Dh).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,qh(n,e))}post(t,e,n={}){return this.request("POST",t,qh(n,e))}put(t,e,n={}){return this.request("PUT",t,qh(n,e))}}return t.\u0275fac=function(e){return new(e||t)(ns(Oh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Zh{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const Yh=new Vn("HTTP_INTERCEPTORS");let Kh=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Qh=/^\)\]\}',?\n/;let Xh=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new y(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const s=t.serializeBody();let i=null;const r=()=>{if(null!==i)return i;const e=1223===n.status?204:n.status,s=n.statusText||"OK",r=new Ih(n.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return i=new Hh({headers:r,status:e,statusText:s,url:o}),i},o=()=>{let{headers:s,status:i,statusText:o,url:a}=r(),l=null;204!==i&&(l=void 0===n.response?n.responseText:n.response),0===i&&(i=l?200:0);let c=i>=200&&i<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(Qh,"");try{l=""!==l?JSON.parse(l):null}catch(h){l=t,c&&(c=!1,l={error:h,text:l})}}c?(e.next(new $h({body:l,headers:s,status:i,statusText:o,url:a||void 0})),e.complete()):e.error(new Wh({error:l,headers:s,status:i,statusText:o,url:a||void 0}))},a=t=>{const{url:s}=r(),i=new Wh({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:s||void 0});e.error(i)};let l=!1;const c=s=>{l||(e.next(r()),l=!0);let i={type:Vh.DownloadProgress,loaded:s.loaded};s.lengthComputable&&(i.total=s.total),"text"===t.responseType&&n.responseText&&(i.partialText=n.responseText),e.next(i)},h=t=>{let n={type:Vh.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),n.addEventListener("timeout",a),n.addEventListener("abort",a),t.reportProgress&&(n.addEventListener("progress",c),null!==s&&n.upload&&n.upload.addEventListener("progress",h)),n.send(s),e.next({type:Vh.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("abort",a),n.removeEventListener("load",o),n.removeEventListener("timeout",a),t.reportProgress&&(n.removeEventListener("progress",c),null!==s&&n.upload&&n.upload.removeEventListener("progress",h)),n.readyState!==n.DONE&&n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(ns(Wc))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Gh=new Vn("XSRF_COOKIE_NAME"),Jh=new Vn("XSRF_HEADER_NAME");class tu{}let eu=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,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=Ac(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(ns(dc),ns(El),ns(Gh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),nu=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const s=this.tokenService.getToken();return null===s||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,s)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(ns(tu),ns(Jh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),su=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(Yh,[]);this.chain=t.reduceRight((t,e)=>new Zh(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(ns(Ph),ns(Xr))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),iu=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:nu,useClass:Kh}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Gh,useValue:e.cookieName}:[],e.headerName?{provide:Jh,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({providers:[nu,{provide:Yh,useExisting:nu,multi:!0},{provide:tu,useClass:eu},{provide:Gh,useValue:"XSRF-TOKEN"},{provide:Jh,useValue:"X-XSRF-TOKEN"}]}),t})(),ru=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({providers:[Uh,{provide:Oh,useClass:su},Xh,{provide:Ph,useExisting:Xh}],imports:[[iu.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();class ou extends u{constructor(t,e){super()}schedule(t,e=0){return this}}class au extends ou{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,s=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(s,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(s,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n,s=!1;try{this.work(t)}catch(i){s=!0,n=!!i&&i||new Error(i)}if(s)return this.unsubscribe(),n}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,s=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==s&&n.splice(s,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}class lu extends au{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(t,e,n):t.flush(this)}}let cu=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class hu extends cu{constructor(t,e=cu.now){super(t,()=>hu.delegate&&hu.delegate!==this?hu.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return hu.delegate&&hu.delegate!==this?hu.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}class uu extends hu{}const du=new uu(lu),pu=new y(t=>t.complete());function fu(t){return t?function(t){return new y(e=>t.schedule(()=>e.complete()))}(t):pu}function mu(t,e){return new y(e?n=>e.schedule(gu,0,{error:t,subscriber:n}):e=>e.error(t))}function gu({error:t,subscriber:e}){e.error(t)}let _u=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return Eh(this.value);case"E":return mu(this.error);case"C":return fu()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class yu extends f{constructor(t,e,n=0){super(t),this.scheduler=e,this.delay=n}static dispatch(t){const{notification:e,destination:n}=t;e.observe(n),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(yu.dispatch,this.delay,new bu(t,this.destination)))}_next(t){this.scheduleMessage(_u.createNext(t))}_error(t){this.scheduleMessage(_u.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(_u.createComplete()),this.unsubscribe()}}class bu{constructor(t,e){this.notification=t,this.destination=e}}class vu extends S{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift(),super.next(t)}nextTimeWindow(t){this._events.push(new xu(this._getNow(),t)),this._trimBufferThenGetEvents(),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),s=this.scheduler,i=n.length;let r;if(this.closed)throw new v;if(this.isStopped||this.hasError?r=u.EMPTY:(this.observers.push(t),r=new x(this,t)),s&&t.add(t=new yu(t,s)),e)for(let o=0;o<i&&!t.closed;o++)t.next(n[o]);else for(let o=0;o<i&&!t.closed;o++)t.next(n[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),r}_getNow(){return(this.scheduler||du).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,n=this._windowTime,s=this._events,i=s.length;let r=0;for(;r<i&&!(t-s[r].time<n);)r++;return i>e&&(r=Math.max(r,i-e)),r>0&&s.splice(0,r),s}}class xu{constructor(t,e){this.time=t,this.value=e}}function wu(t,e){return"function"==typeof e?n=>n.pipe(wu((n,s)=>B(t(n,s)).pipe(F((t,i)=>e(n,t,s,i))))):e=>e.lift(new Su(t))}class Su{constructor(t){this.project=t}call(t,e){return e.subscribe(new Eu(t,this.project))}}class Eu extends D{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(s){return void this.destination.error(s)}this._innerSub(e,t,n)}_innerSub(t,e,n){const s=this.innerSubscription;s&&s.unsubscribe();const i=new C(this,e,n),r=this.destination;r.add(i),this.innerSubscription=M(this,t,void 0,void 0,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=null}notifyComplete(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(t,e,n,s,i){this.destination.next(e)}}const ku={schedule(t,e){const n=setTimeout(t,e);return()=>clearTimeout(n)},scheduleBeforeRender(t){if("undefined"==typeof window)return ku.schedule(t,0);if(void 0===window.requestAnimationFrame)return ku.schedule(t,16);const e=window.requestAnimationFrame(t);return()=>window.cancelAnimationFrame(e)}};let Cu;function Tu(t,e,n){let s=n;return function(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}(t)&&e.some((e,n)=>!("*"===e||!function(t,e){if(!Cu){const t=Element.prototype;Cu=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE&&Cu.call(t,e)}(t,e)||(s=n,0))),s}class Ou{constructor(t,e){this.componentFactory=e.get(Go).resolveComponentFactory(t)}create(t){return new Pu(this.componentFactory,t)}}class Pu{constructor(t,e){this.componentFactory=t,this.injector=e,this.eventEmitters=new vu(1),this.events=this.eventEmitters.pipe(wu(t=>q(...t))),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:t})=>t)),this.ngZone=this.injector.get(Bl),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null!==this.componentRef&&null===this.scheduledDestroyFn&&(this.scheduledDestroyFn=ku.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){this.runInZone(()=>{var n,s;null!==this.componentRef?((n=e)!==(s=this.getInputValue(t))&&(n==n||s==s)||void 0===e&&this.unchangedInputs.has(t))&&(this.recordInputChange(t,e),this.unchangedInputs.delete(t),this.hasInputChanges=!0,this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e)})}initializeComponent(t){const e=Xr.create({providers:[],parent:this.injector}),n=function(t,e){const n=t.childNodes,s=e.map(()=>[]);let i=-1;e.some((t,e)=>"*"===t&&(i=e,!0));for(let r=0,o=n.length;r<o;++r){const t=n[r],o=Tu(t,e,i);-1!==o&&s[o].push(t)}return s}(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,n,t),this.viewChangeDetectorRef=this.componentRef.injector.get(Ca),this.implementsOnChanges="function"==typeof this.componentRef.instance.ngOnChanges,this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(rc).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:t})=>{this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const e=this.componentFactory.outputs.map(({propName:e,templateName:n})=>t.instance[e].pipe(F(t=>({name:n,value:t}))));this.eventEmitters.next(e)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const e=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(e)}markViewForCheck(t){this.hasInputChanges&&(this.hasInputChanges=!1,t.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=ku.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const n=this.inputChanges[t];if(n)return void(n.currentValue=e);const s=this.unchangedInputs.has(t),i=s?void 0:this.getInputValue(t);this.inputChanges[t]=new ae(i,e,s)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class Iu extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function Au(t,e){const n=function(t,e){return e.get(Go).resolveComponentFactory(t).inputs}(t,e.injector),s=e.strategyFactory||new Ou(t,e.injector),i=function(t){const e={};return t.forEach(({propName:t,templateName:n})=>{var s;e[(s=n,s.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`))]=t}),e}(n);class r extends Iu{constructor(t){super(),this.injector=t}get ngElementStrategy(){if(!this._ngElementStrategy){const t=this._ngElementStrategy=s.create(this.injector||e.injector);n.forEach(({propName:e})=>{if(!this.hasOwnProperty(e))return;const n=this[e];delete this[e],t.setInputValue(e,n)})}return this._ngElementStrategy}attributeChangedCallback(t,e,n,s){this.ngElementStrategy.setInputValue(i[t],n)}connectedCallback(){let t=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),t=!0),this.ngElementStrategy.connect(this),t||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(t=>{const e=function(t,e,n){if("function"!=typeof CustomEvent){const s=t.createEvent("CustomEvent");return s.initCustomEvent(e,!1,!1,n),s}return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:n})}(this.ownerDocument,t.name,t.value);this.dispatchEvent(e)})}}return r.observedAttributes=Object.keys(i),n.forEach(({propName:t})=>{Object.defineProperty(r.prototype,t,{get(){return this.ngElementStrategy.getInputValue(t)},set(e){this.ngElementStrategy.setInputValue(t,e)},configurable:!0,enumerable:!0})}),r}new oa("12.0.5");let Ru=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Ht({type:t,selectors:[["app-hello-world"]],decls:2,vars:0,template:function(t,e){1&t&&(go(0,"p"),jo(1,"hello-world works!"),_o())},styles:[""]}),t})(),Mu=(()=>{class t{constructor(t){this.http=t}get(t,e){let n=(new Dh).set("tags",t);return e&&(n=n.set("maxEntries",e.toString())),this.http.get("/api/news/get",{params:n})}}return t.\u0275fac=function(e){return new(e||t)(ns(Uh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Du(t,e){if(1&t&&(go(0,"div"),yo(1,"div",1),yo(2,"br"),_o()),2&t){const t=e.$implicit;Hi(1),fo("innerHTML",t.Html,Us)}}let Fu=(()=>{class t{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 t.\u0275fac=function(e){return new(e||t)(po(Mu))},t.\u0275cmp=Ht({type:t,selectors:[["app-hotslogs-news"]],inputs:{tags:"tags",max:"max"},features:[le],decls:2,vars:3,consts:[[4,"ngFor","ngForOf"],[3,"innerHTML"]],template:function(t,e){1&t&&(uo(0,Du,3,1,"div",0),Ga(1,"async")),2&t&&fo("ngForOf",Ja(1,1,e.newsItems$))},directives:[Mc],pipes:[Hc],styles:[""]}),t})();function Lu(){}function Nu(t,e,n){return function(s){return s.lift(new ju(t,e,n))}}class ju{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new Bu(t,this.nextOrObserver,this.error,this.complete))}}class Bu extends f{constructor(t,e,n,i){super(t),this._tapNext=Lu,this._tapError=Lu,this._tapComplete=Lu,this._tapError=n||Lu,this._tapComplete=i||Lu,s(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Lu,this._tapError=e.error||Lu,this._tapComplete=e.complete||Lu)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}const Vu="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function zu(t,e,n){const s=n||(t=>Array.prototype.slice.call(t));let i=!1,r=[];return function(...n){r=s(n),i||(i=!0,Vu.call(window,()=>{i=!1,t.apply(e,r)}))}}const Hu=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function $u(){}const Wu=function(){let t=0;return function(){return t++}}();function qu(t){return null==t}function Uu(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function Zu(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const Yu=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function Ku(t,e){return Yu(t)?t:e}function Qu(t,e){return void 0===t?e:t}const Xu=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Gu(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function Ju(t,e,n,s){let i,r,o;if(Uu(t))if(r=t.length,s)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<r;i++)e.call(n,t[i],i);else if(Zu(t))for(o=Object.keys(t),r=o.length,i=0;i<r;i++)e.call(n,t[o[i]],o[i])}function td(t,e){let n,s,i,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,s=t.length;n<s;++n)if(i=t[n],r=e[n],i.datasetIndex!==r.datasetIndex||i.index!==r.index)return!1;return!0}function ed(t){if(Uu(t))return t.map(ed);if(Zu(t)){const e=Object.create(null),n=Object.keys(t),s=n.length;let i=0;for(;i<s;++i)e[n[i]]=ed(t[n[i]]);return e}return t}function nd(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function sd(t,e,n,s){if(!nd(t))return;const i=e[t],r=n[t];Zu(i)&&Zu(r)?id(i,r,s):e[t]=ed(r)}function id(t,e,n){const s=Uu(e)?e:[e],i=s.length;if(!Zu(t))return t;const r=(n=n||{}).merger||sd;for(let o=0;o<i;++o){if(!Zu(e=s[o]))continue;const i=Object.keys(e);for(let s=0,o=i.length;s<o;++s)r(i[s],t,e,n)}return t}function rd(t,e){return id(t,e,{merger:od})}function od(t,e,n){if(!nd(t))return;const s=e[t],i=n[t];Zu(s)&&Zu(i)?rd(s,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ed(i))}function ad(t,e){const n=t.indexOf(".",e);return-1===n?t.length:n}function ld(t,e){if(""===e)return t;let n=0,s=ad(e,n);for(;t&&s>n;)t=t[e.substr(n,s-n)],n=s+1,s=ad(e,n);return t}function cd(t){return t.charAt(0).toUpperCase()+t.slice(1)}const hd=t=>void 0!==t,ud=t=>"function"==typeof t,dd=Math.PI,pd=2*dd,fd=pd+dd,md=Number.POSITIVE_INFINITY,gd=dd/180,_d=dd/2,yd=dd/4,bd=2*dd/3,vd=Math.log10,xd=Math.sign;function wd(t){const e=Math.pow(10,Math.floor(vd(t))),n=t/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function Sd(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Ed(t,e,n){return Math.abs(t-e)<n}function kd(t,e,n){let s,i,r;for(s=0,i=t.length;s<i;s++)r=t[s][n],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function Cd(t){return t*(dd/180)}function Td(t){return t*(180/dd)}function Od(t){if(!Yu(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Pd(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Id(t,e){return(t-e+fd)%pd-dd}function Ad(t){return(t%pd+pd)%pd}function Rd(t,e,n,s){const i=Ad(t),r=Ad(e),o=Ad(n),a=Ad(r-i),l=Ad(o-i),c=Ad(i-r),h=Ad(i-o);return i===r||i===o||s&&r===o||a>l&&c<h}function Md(t,e,n){return Math.max(e,Math.min(n,t))}const Dd=t=>0===t||1===t,Fd=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*pd/n),Ld=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*pd/n)+1,Nd={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*_d),easeOutSine:t=>Math.sin(t*_d),easeInOutSine:t=>-.5*(Math.cos(dd*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Dd(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Dd(t)?t:Fd(t,.075,.3),easeOutElastic:t=>Dd(t)?t:Ld(t,.075,.3),easeInOutElastic(t){const e=.1125;return Dd(t)?t:t<.5?.5*Fd(2*t,e,.45):.5+.5*Ld(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Nd.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*Nd.easeInBounce(2*t):.5*Nd.easeOutBounce(2*t-1)+.5},jd={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},Bd="0123456789ABCDEF",Vd=t=>Bd[15&t],zd=t=>Bd[(240&t)>>4]+Bd[15&t],Hd=t=>(240&t)>>4==(15&t);function $d(t){return t+.5|0}const Wd=(t,e,n)=>Math.max(Math.min(t,n),e);function qd(t){return Wd($d(2.55*t),0,255)}function Ud(t){return Wd($d(255*t),0,255)}function Zd(t){return Wd($d(t/2.55)/100,0,1)}function Yd(t){return Wd($d(100*t),0,100)}const Kd=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Qd=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Xd(t,e,n){const s=e*Math.min(n,1-n),i=(e,i=(e+t/30)%12)=>n-s*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function Gd(t,e,n){const s=(s,i=(s+t/60)%6)=>n-n*e*Math.max(Math.min(i,4-i,1),0);return[s(5),s(3),s(1)]}function Jd(t,e,n){const s=Xd(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)s[i]*=1-e-n,s[i]+=e;return s}function tp(t){const e=t.r/255,n=t.g/255,s=t.b/255,i=Math.max(e,n,s),r=Math.min(e,n,s),o=(i+r)/2;let a,l,c;return i!==r&&(c=i-r,l=o>.5?c/(2-i-r):c/(i+r),a=i===e?(n-s)/c+(n<s?6:0):i===n?(s-e)/c+2:(e-n)/c+4,a=60*a+.5),[0|a,l||0,o]}function ep(t,e,n,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,s)).map(Ud)}function np(t,e,n){return ep(Xd,t,e,n)}function sp(t){return(t%360+360)%360}const ip={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"},rp={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 op;function ap(t,e,n){if(t){let s=tp(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*n,0===e?360:1)),s=np(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function lp(t,e){return t?Object.assign(e||{},t):t}function cp(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ud(t[3]))):(e=lp(t,{r:0,g:0,b:0,a:1})).a=Ud(e.a),e}class hp{constructor(t){if(t instanceof hp)return t;const e=typeof t;let n;var s,i,r;"object"===e?n=cp(t):"string"===e&&(r=(s=t).length,"#"===s[0]&&(4===r||5===r?i={r:255&17*jd[s[1]],g:255&17*jd[s[2]],b:255&17*jd[s[3]],a:5===r?17*jd[s[4]]:255}:7!==r&&9!==r||(i={r:jd[s[1]]<<4|jd[s[2]],g:jd[s[3]]<<4|jd[s[4]],b:jd[s[5]]<<4|jd[s[6]],a:9===r?jd[s[7]]<<4|jd[s[8]]:255})),n=i||function(t){op||(op=function(){const t={},e=Object.keys(rp),n=Object.keys(ip);let s,i,r,o,a;for(s=0;s<e.length;s++){for(o=a=e[s],i=0;i<n.length;i++)r=n[i],a=a.replace(r,ip[r]);r=parseInt(rp[o],16),t[a]=[r>>16&255,r>>8&255,255&r]}return t}(),op.transparent=[0,0,0,0]);const e=op[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||function(t){return"r"===t.charAt(0)?function(t){const e=Kd.exec(t);let n,s,i,r=255;if(e){if(e[7]!==n){const t=+e[7];r=255&(e[8]?qd(t):255*t)}return n=+e[1],s=+e[3],i=+e[5],n=255&(e[2]?qd(n):n),s=255&(e[4]?qd(s):s),i=255&(e[6]?qd(i):i),{r:n,g:s,b:i,a:r}}}(t):function(t){const e=Qd.exec(t);let n,s=255;if(!e)return;e[5]!==n&&(s=e[6]?qd(+e[5]):Ud(+e[5]));const i=sp(+e[2]),r=+e[3]/100,o=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return ep(Jd,t,e,n)}(i,r,o):"hsv"===e[1]?function(t,e,n){return ep(Gd,t,e,n)}(i,r,o):np(i,r,o),{r:n[0],g:n[1],b:n[2],a:s}}(t)}(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=lp(this._rgb);return t&&(t.a=Zd(t.a)),t}set rgb(t){this._rgb=cp(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Zd(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(e=function(t){return Hd(t.r)&&Hd(t.g)&&Hd(t.b)&&Hd(t.a)}(t=this._rgb)?Vd:zd,t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t):this._rgb;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=tp(t),n=e[0],s=Yd(e[1]),i=Yd(e[2]);return t.a<255?`hsla(${n}, ${s}%, ${i}%, ${Zd(t.a)})`:`hsl(${n}, ${s}%, ${i}%)`}(this._rgb):this._rgb}mix(t,e){const n=this;if(t){const s=n.rgb,i=t.rgb;let r;const o=e===r?.5:e,a=2*o-1,l=s.a-i.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,s.r=255&c*s.r+r*i.r+.5,s.g=255&c*s.g+r*i.g+.5,s.b=255&c*s.b+r*i.b+.5,s.a=o*s.a+(1-o)*i.a,n.rgb=s}return n}clone(){return new hp(this.rgb)}alpha(t){return this._rgb.a=Ud(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=$d(.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 ap(this._rgb,2,t),this}darken(t){return ap(this._rgb,2,-t),this}saturate(t){return ap(this._rgb,1,t),this}desaturate(t){return ap(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=tp(t);n[0]=sp(n[0]+e),n=np(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function up(t){return new hp(t)}const dp=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function pp(t){return dp(t)?t:up(t)}function fp(t){return dp(t)?t:up(t).saturate(.5).darken(.1).hexString()}const mp=Object.create(null),gp=Object.create(null);function _p(t,e){if(!e)return t;const n=e.split(".");for(let s=0,i=n.length;s<i;++s){const e=n[s];t=t[e]||(t[e]=Object.create(null))}return t}function yp(t,e,n){return"string"==typeof e?id(_p(t,e),n):id(_p(t,""),e)}var bp=new class{constructor(t){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)=>fp(e.backgroundColor),this.hoverBorderColor=(t,e)=>fp(e.borderColor),this.hoverColor=(t,e)=>fp(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.describe(t)}set(t,e){return yp(this,t,e)}get(t){return _p(this,t)}describe(t,e){return yp(gp,t,e)}override(t,e){return yp(mp,t,e)}route(t,e,n,s){const i=_p(this,t),r=_p(this,n),o="_"+e;Object.defineProperties(i,{[o]:{value:i[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=r[s];return Zu(t)?Object.assign({},e,t):Qu(t,e)},set(t){this[o]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function vp(t,e,n,s,i){let r=e[i];return r||(r=e[i]=t.measureText(i).width,n.push(i)),r>s&&(s=r),s}function xp(t,e,n,s){let i=(s=s||{}).data=s.data||{},r=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(i=s.data={},r=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,c,h,u,d;for(l=0;l<a;l++)if(u=n[l],null!=u&&!0!==Uu(u))o=vp(t,i,r,o,u);else if(Uu(u))for(c=0,h=u.length;c<h;c++)d=u[c],null==d||Uu(d)||(o=vp(t,i,r,o,d));t.restore();const p=r.length/2;if(p>n.length){for(l=0;l<p;l++)delete i[r[l]];r.splice(0,p)}return o}function wp(t,e,n){const s=t.currentDevicePixelRatio,i=0!==n?Math.max(n/2,.5):0;return Math.round((e-i)*s)/s+i}function Sp(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ep(t,e,n,s){let i,r,o,a,l;const c=e.pointStyle,h=e.rotation,u=e.radius;let d=(h||0)*gd;if(c&&"object"==typeof c&&(i=c.toString(),"[object HTMLImageElement]"===i||"[object HTMLCanvasElement]"===i))return t.save(),t.translate(n,s),t.rotate(d),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(u)||u<=0)){switch(t.beginPath(),c){default:t.arc(n,s,u,0,pd),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(d)*u,s-Math.cos(d)*u),d+=bd,t.lineTo(n+Math.sin(d)*u,s-Math.cos(d)*u),d+=bd,t.lineTo(n+Math.sin(d)*u,s-Math.cos(d)*u),t.closePath();break;case"rectRounded":l=.516*u,a=u-l,r=Math.cos(d+yd)*a,o=Math.sin(d+yd)*a,t.arc(n-r,s-o,l,d-dd,d-_d),t.arc(n+o,s-r,l,d-_d,d),t.arc(n+r,s+o,l,d,d+_d),t.arc(n-o,s+r,l,d+_d,d+dd),t.closePath();break;case"rect":if(!h){a=Math.SQRT1_2*u,t.rect(n-a,s-a,2*a,2*a);break}d+=yd;case"rectRot":r=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-r,s-o),t.lineTo(n+o,s-r),t.lineTo(n+r,s+o),t.lineTo(n-o,s+r),t.closePath();break;case"crossRot":d+=yd;case"cross":r=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-r,s-o),t.lineTo(n+r,s+o),t.moveTo(n+o,s-r),t.lineTo(n-o,s+r);break;case"star":r=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-r,s-o),t.lineTo(n+r,s+o),t.moveTo(n+o,s-r),t.lineTo(n-o,s+r),d+=yd,r=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-r,s-o),t.lineTo(n+r,s+o),t.moveTo(n+o,s-r),t.lineTo(n-o,s+r);break;case"line":r=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-r,s-o),t.lineTo(n+r,s+o);break;case"dash":t.moveTo(n,s),t.lineTo(n+Math.cos(d)*u,s+Math.sin(d)*u)}t.fill(),e.borderWidth>0&&t.stroke()}}function kp(t,e,n){return n=n||.5,t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Cp(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Tp(t){t.restore()}function Op(t,e,n,s,i){if(!e)return t.lineTo(n.x,n.y);if("middle"===i){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else"after"===i!=!!s?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Pp(t,e,n,s){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?n.cp2x:n.cp1x,s?n.cp2y:n.cp1y,n.x,n.y)}function Ip(t,e,n,s,i,r={}){const o=Uu(e)?e:[e],a=r.strokeWidth>0&&""!==r.strokeColor;let l,c;for(t.save(),r.translation&&t.translate(r.translation[0],r.translation[1]),qu(r.rotation)||t.rotate(r.rotation),t.font=i.string,r.color&&(t.fillStyle=r.color),r.textAlign&&(t.textAlign=r.textAlign),r.textBaseline&&(t.textBaseline=r.textBaseline),l=0;l<o.length;++l){if(c=o[l],a&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),qu(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(c,n,s,r.maxWidth)),t.fillText(c,n,s,r.maxWidth),r.strikethrough||r.underline){const e=t.measureText(c),i=n-e.actualBoundingBoxLeft,o=n+e.actualBoundingBoxRight,a=s-e.actualBoundingBoxAscent,l=s+e.actualBoundingBoxDescent,h=r.strikethrough?(a+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(i,h),t.lineTo(o,h),t.stroke()}s+=i.lineHeight}t.restore()}function Ap(t,e){const{x:n,y:s,w:i,h:r,radius:o}=e;t.arc(n+o.topLeft,s+o.topLeft,o.topLeft,-_d,dd,!0),t.lineTo(n,s+r-o.bottomLeft),t.arc(n+o.bottomLeft,s+r-o.bottomLeft,o.bottomLeft,dd,_d,!0),t.lineTo(n+i-o.bottomRight,s+r),t.arc(n+i-o.bottomRight,s+r-o.bottomRight,o.bottomRight,_d,0,!0),t.lineTo(n+i,s+o.topRight),t.arc(n+i-o.topRight,s+o.topRight,o.topRight,0,-_d,!0),t.lineTo(n+o.topLeft,s)}const Rp=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Mp=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Dp(t,e){const n=(""+t).match(Rp);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}function Fp(t,e){const n={},s=Zu(e),i=s?Object.keys(e):e,r=Zu(t)?s?n=>Qu(t[n],t[e[n]]):e=>t[e]:()=>t;for(const o of i)n[o]=+r(o)||0;return n}function Lp(t){return Fp(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Np(t){return Fp(t,["topLeft","topRight","bottomLeft","bottomRight"])}function jp(t){const e=Lp(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Bp(t,e){let n=Qu((t=t||{}).size,(e=e||bp.font).size);"string"==typeof n&&(n=parseInt(n,10));let s=Qu(t.style,e.style);s&&!(""+s).match(Mp)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");const i={family:Qu(t.family,e.family),lineHeight:Dp(Qu(t.lineHeight,e.lineHeight),n),size:n,style:s,weight:Qu(t.weight,e.weight),string:""};return i.string=function(t){return!t||qu(t.size)||qu(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i}function Vp(t,e,n,s){let i,r,o,a=!0;for(i=0,r=t.length;i<r;++i)if(o=t[i],void 0!==o&&(void 0!==e&&"function"==typeof o&&(o=o(e),a=!1),void 0!==n&&Uu(o)&&(o=o[n%o.length],a=!1),void 0!==o))return s&&!a&&(s.cacheable=!1),o}function zp(t,e,n){n=n||(n=>t[n]<e);let s,i=t.length-1,r=0;for(;i-r>1;)s=r+i>>1,n(s)?r=s:i=s;return{lo:r,hi:i}}const Hp=(t,e,n)=>zp(t,n,s=>t[s][e]<n),$p=(t,e,n)=>zp(t,n,s=>t[s][e]>=n),Wp=["push","pop","shift","splice","unshift"];function qp(t,e){const n=t._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(e);-1!==i&&s.splice(i,1),s.length>0||(Wp.forEach(e=>{delete t[e]}),delete t._chartjs)}function Up(t){const e=new Set;let n,s;for(n=0,s=t.length;n<s;++n)e.add(t[n]);if(e.size===s)return t;const i=[];return e.forEach(t=>{i.push(t)}),i}function Zp(t,e=[""],n=t,s,i=(()=>t[0])){hd(s)||(s=rf("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:s,_getTarget:i,override:i=>Zp([i,...t],e,n,s)};return new Proxy(r,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,s)=>Gp(n,s,()=>function(t,e,n,s){let i;for(const r of e)if(i=rf(Qp(r,t),n),hd(i))return Xp(t,i)?nf(n,s,t,i):i}(s,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>of(t).includes(e),ownKeys:t=>of(t),set:(t,e,n)=>((t._storage||(t._storage=i()))[e]=n,delete t[e],delete t._keys,!0)})}function Yp(t,e,n,s){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Kp(t,s),setContext:e=>Yp(t,e,n,s),override:i=>Yp(t.override(i),e,n,s)};return new Proxy(i,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Gp(t,e,()=>function(t,e,n){const{_proxy:s,_context:i,_subProxy:r,_descriptors:o}=t;let a=s[e];return ud(a)&&o.isScriptable(e)&&(a=function(t,e,n,s){const{_proxy:i,_context:r,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+[...a].join("->")+"->"+t);return a.add(t),e=e(r,o||s),a.delete(t),Zu(e)&&(e=nf(i._scopes,i,t,e)),e}(e,a,t,n)),Uu(a)&&a.length&&(a=function(t,e,n,s){const{_proxy:i,_context:r,_subProxy:o,_descriptors:a}=n;if(hd(r.index)&&s(t))e=e[r.index%e.length];else if(Zu(e[0])){const n=e,s=i._scopes.filter(t=>t!==n);e=[];for(const l of n){const n=nf(s,i,t,l);e.push(Yp(n,r,o&&o[t],a))}}return e}(e,a,t,o.isIndexable)),Xp(e,a)&&(a=Yp(a,i,r&&r[e],o)),a}(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,s)=>(t[n]=s,delete e[n],!0)})}function Kp(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:s=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:s,isScriptable:ud(n)?n:()=>n,isIndexable:ud(s)?s:()=>s}}const Qp=(t,e)=>t?t+cd(e):e,Xp=(t,e)=>Zu(e)&&"adapters"!==t;function Gp(t,e,n){let s=t[e];return hd(s)||(s=n(),hd(s)&&(t[e]=s)),s}function Jp(t,e,n){return ud(t)?t(e,n):t}const tf=(t,e)=>!0===t?e:"string"==typeof t?ld(e,t):void 0;function ef(t,e,n,s){for(const i of e){const e=tf(n,i);if(e){t.add(e);const i=Jp(e._fallback,n,e);if(hd(i)&&i!==n&&i!==s)return i}else if(!1===e&&hd(s)&&n!==s)return null}return!1}function nf(t,e,n,s){const i=e._rootScopes,r=Jp(e._fallback,n,s),o=[...t,...i],a=new Set;a.add(s);let l=sf(a,o,n,r||n);return null!==l&&(!hd(r)||r===n||(l=sf(a,o,r,l),null!==l))&&Zp([...a],[""],i,r,()=>function(t,e,n){const s=t._getTarget();e in s||(s[e]={});const i=s[e];return Uu(i)&&Zu(n)?n:i}(e,n,s))}function sf(t,e,n,s){for(;n;)n=ef(t,e,n,s);return n}function rf(t,e){for(const n of e){if(!n)continue;const e=n[t];if(hd(e))return e}}function of(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return[...e]}(t._scopes)),e}const af=Number.EPSILON||1e-14,lf=(t,e)=>e<t.length&&!t[e].skip&&t[e],cf=t=>"x"===t?"y":"x";function hf(t,e,n,s){const i=t.skip?e:t,r=e,o=n.skip?e:n,a=Pd(r,i),l=Pd(o,r);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=s*c,d=s*h;return{previous:{x:r.x-u*(o.x-i.x),y:r.y-u*(o.y-i.y)},next:{x:r.x+d*(o.x-i.x),y:r.y+d*(o.y-i.y)}}}function uf(t,e,n){return Math.max(Math.min(t,n),e)}function df(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function pf(t,e,n){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[n])):s=t,s}const ff=t=>window.getComputedStyle(t,null),mf=["top","right","bottom","left"];function gf(t,e,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const r=mf[i];s[r]=parseFloat(t[e+"-"+r+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function _f(t,e){const{canvas:n,currentDevicePixelRatio:s}=e,i=ff(n),r="border-box"===i.boxSizing,o=gf(i,"padding"),a=gf(i,"border","width"),{x:l,y:c,box:h}=function(t,e){const n=t.native||t,s=n.touches,i=s&&s.length?s[0]:n,{offsetX:r,offsetY:o}=i;let a,l,c=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(r,o,n.target))a=r,l=o;else{const t=e.getBoundingClientRect();a=i.clientX-t.left,l=i.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,n),u=o.left+(h&&a.left),d=o.top+(h&&a.top);let{width:p,height:f}=e;return r&&(p-=o.width+a.width,f-=o.height+a.height),{x:Math.round((l-u)/p*n.width/s),y:Math.round((c-d)/f*n.height/s)}}const yf=t=>Math.round(10*t)/10;function bf(t,e,n){const s=e||1,i=Math.floor(t.height*s),r=Math.floor(t.width*s);t.height=i/s,t.width=r/s;const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||o.height!==i||o.width!==r)&&(t.currentDevicePixelRatio=s,o.height=i,o.width=r,t.ctx.setTransform(s,0,0,s,0,0),!0)}const vf=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}return t}();function xf(t,e){const n=function(t,e){return ff(t).getPropertyValue(e)}(t,e),s=n&&n.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function wf(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Sf(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:"middle"===s?n<.5?t.y:e.y:"after"===s?n<1?t.y:e.y:n>0?e.y:t.y}}function Ef(t,e,n,s){const i={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=wf(t,i,n),a=wf(i,r,n),l=wf(r,e,n),c=wf(o,a,n),h=wf(a,l,n);return wf(c,h,n)}const kf=new Map;function Cf(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let s=kf.get(n);return s||(s=new Intl.NumberFormat(t,e),kf.set(n,s)),s}(e,n).format(t)}function Tf(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Of(t){return"angle"===t?{between:Rd,compare:Id,normalize:Ad}:{between:(t,e,n)=>t>=Math.min(e,n)&&t<=Math.max(n,e),compare:(t,e)=>t-e,normalize:t=>t}}function Pf({start:t,end:e,count:n,loop:s,style:i}){return{start:t%n,end:e%n,loop:s&&(e-t+1)%n==0,style:i}}function If(t,e,n){if(!n)return[t];const{property:s,start:i,end:r}=n,o=e.length,{compare:a,between:l,normalize:c}=Of(s),{start:h,end:u,loop:d,style:p}=function(t,e,n){const{property:s,start:i,end:r}=n,{between:o,normalize:a}=Of(s),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;c<h&&o(a(e[u%l][s]),i,r);++c)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:p,style:t.style}}(t,e,n),f=[];let m,g,_,y=!1,b=null;for(let v=h,x=h;v<=u;++v)g=e[v%o],g.skip||(m=c(g[s]),m!==_&&(y=l(m,i,r),null===b&&(y||l(i,_,m)&&0!==a(i,_))&&(b=0===a(m,i)?v:x),null!==b&&(!y||0===a(r,m)||l(r,_,m))&&(f.push(Pf({start:b,end:v,loop:d,count:o,style:p})),b=null),x=v,_=m));return null!==b&&f.push(Pf({start:b,end:u,loop:d,count:o,style:p})),f}function Af(t,e){const n=[],s=t.segments;for(let i=0;i<s.length;i++){const r=If(s[i],t.points,e);r.length&&n.push(...r)}return n}function Rf(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Mf=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){const i=e.duration;e.listeners[s].forEach(s=>s({chart:t,initial:e.initial,numSteps:i,currentStep:Math.min(n-e.start,i)}))}_refresh(){const t=this;t._request||(t._running=!0,t._request=Vu.call(window,()=>{t._update(),t._request=null,t._running&&t._refresh()}))}_update(t=Date.now()){const e=this;let n=0;e._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const r=s.items;let o,a=r.length-1,l=!1;for(;a>=0;--a)o=r[a],o._active?(o._total>s.duration&&(s.duration=o._total),o.tick(t),l=!0):(r[a]=r[r.length-1],r.pop());l&&(i.draw(),e._notify(i,s,t,"progress")),r.length||(s.running=!1,e._notify(i,s,t,"complete"),s.initial=!1),n+=r.length}),e._lastDate=t,0===n&&(e._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Df="transparent",Ff={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const s=pp(t||Df),i=s.valid&&pp(e||Df);return i&&i.valid?i.mix(s,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Lf{constructor(t,e,n,s){const i=e[n];s=Vp([t.to,s,i,t.from]);const r=Vp([t.from,i,s]);this._active=!0,this._fn=t.fn||Ff[t.type||typeof r],this._easing=Nd[t.easing]||Nd.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=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){const s=this;if(s._active){s._notify(!1);const i=s._target[s._prop],r=n-s._start,o=s._duration-r;s._start=n,s._duration=Math.floor(Math.max(o,t.duration)),s._total+=r,s._loop=!!t.loop,s._to=Vp([t.to,e,i,t.from]),s._from=Vp([t.from,i,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,n=t-e._start,s=e._duration,i=e._prop,r=e._from,o=e._loop,a=e._to;let l;if(e._active=r!==a&&(o||n<s),!e._active)return e._target[i]=a,void e._notify(!0);n<0?e._target[i]=r:(l=n/s%2,l=o&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[i]=e._fn(r,a,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][e]()}}bp.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 Nf=Object.keys(bp.animation);bp.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),bp.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),bp.describe("animations",{_fallback:"animation"}),bp.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:t=>0|t}}}});class jf{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Zu(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const s=t[n];if(!Zu(s))return;const i={};for(const t of Nf)i[t]=s[t];(Uu(s.properties)&&s.properties||[n]).forEach(t=>{t!==n&&e.has(t)||e.set(t,i)})})}_animateOptions(t,e){const n=e.options,s=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!s)return[];const i=this._createAnimations(s,n);return n.$shared&&function(t,e){const n=[],s=Object.keys(e);for(let i=0;i<s.length;i++){const e=t[s[i]];e&&e.active()&&n.push(e.wait())}return Promise.all(n)}(t.options.$animations,n).then(()=>{t.options=n},()=>{}),i}_createAnimations(t,e){const n=this._properties,s=[],i=t.$animations||(t.$animations={}),r=Object.keys(e),o=Date.now();let a;for(a=r.length-1;a>=0;--a){const l=r[a];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const c=e[l];let h=i[l];const u=n.get(l);if(h){if(u&&h.active()){h.update(u,c,o);continue}h.cancel()}u&&u.duration?(i[l]=h=new Lf(u,t,l,c),s.push(h)):t[l]=c}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(Mf.add(this._chart,n),!0):void 0}}function Bf(t,e){const n=t&&t.options||{},s=n.reverse,i=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:s?r:i,end:s?i:r}}function Vf(t,e){const n=[],s=t._getSortedDatasetMetas(e);let i,r;for(i=0,r=s.length;i<r;++i)n.push(s[i].index);return n}function zf(t,e,n,s){const i=t.keys,r="single"===s.mode;let o,a,l,c;if(null!==e){for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(s.all)continue;break}c=t.values[l],Yu(c)&&(r||0===e||xd(e)===xd(c))&&(e+=c)}return e}}function Hf(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function $f(t,e,n){const s=t[e]||(t[e]={});return s[n]||(s[n]={})}function Wf(t,e,n){for(const s of e.getMatchingVisibleMetas("bar").reverse()){const e=t[s.index];if(n&&e>0||!n&&e<0)return s.index}return null}function qf(t,e){const{chart:n,_cachedMeta:s}=t,i=n._stacks||(n._stacks={}),{iScale:r,vScale:o,index:a}=s,l=r.axis,c=o.axis,h=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(r,o,s),u=e.length;let d;for(let p=0;p<u;++p){const t=e[p],{[l]:n,[c]:s}=t;d=(t._stacks||(t._stacks={}))[c]=$f(i,h,n),d[a]=s,d._top=Wf(d,o,!0),d._bottom=Wf(d,o,!1)}}function Uf(t,e){const n=t.scales;return Object.keys(n).filter(t=>n[t].axis===e).shift()}function Zf(t,e){const n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const s of e){const e=s._stacks;if(!e||void 0===e[n]||void 0===e[n][t.index])return;delete e[n][t.index]}}}const Yf=t=>"reset"===t||"none"===t,Kf=(t,e)=>e?t:Object.assign({},t);class Qf{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,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=Hf(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&Zf(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,n=t._cachedMeta,s=t.getDataset(),i=(t,e,n,s)=>"x"===t?e:"r"===t?s:n,r=n.xAxisID=Qu(s.xAxisID,Uf(e,"x")),o=n.yAxisID=Qu(s.yAxisID,Uf(e,"y")),a=n.rAxisID=Qu(s.rAxisID,Uf(e,"r")),l=n.indexAxis,c=n.iAxisID=i(l,r,o,a),h=n.vAxisID=i(l,o,r,a);n.xScale=t.getScaleForId(r),n.yScale=t.getScaleForId(o),n.rScale=t.getScaleForId(a),n.iScale=t.getScaleForId(c),n.vScale=t.getScaleForId(h)}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&&qp(this._data,this),t._stacked&&Zf(t)}_dataCheck(){const t=this,e=t.getDataset(),n=e.data||(e.data=[]),s=t._data;if(Zu(n))t._data=function(t){const e=Object.keys(t),n=new Array(e.length);let s,i,r;for(s=0,i=e.length;s<i;++s)r=e[s],n[s]={x:r,y:t[r]};return n}(n);else if(s!==n){if(s){qp(s,t);const e=t._cachedMeta;Zf(e),e._parsed=[]}n&&Object.isExtensible(n)&&(r=t,(i=n)._chartjs?i._chartjs.listeners.push(r):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[r]}}),Wp.forEach(t=>{const e="_onData"+cd(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const s=n.apply(this,t);return i._chartjs.listeners.forEach(n=>{"function"==typeof n[e]&&n[e](...t)}),s}})}))),t._syncList=[],t._data=n}var i,r}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,n=e._cachedMeta,s=e.getDataset();let i=!1;e._dataCheck();const r=n._stacked;n._stacked=Hf(n.vScale,n),n.stack!==s.stack&&(i=!0,Zf(n),n.stack=s.stack),e._resyncElements(t),(i||r!==n._stacked)&&qf(e,n._parsed)}configure(){const t=this,e=t.chart.config,n=e.datasetScopeKeys(t._type),s=e.getOptionScopes(t.getDataset(),n,!0);t.options=e.createResolver(s,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const n=this,{_cachedMeta:s,_data:i}=n,{iScale:r,_stacked:o}=s,a=r.axis;let l,c,h,u=0===t&&e===i.length||s._sorted,d=t>0&&s._parsed[t-1];if(!1===n._parsing)s._parsed=i,s._sorted=!0,h=i;else{h=Uu(i[t])?n.parseArrayData(s,i,t,e):Zu(i[t])?n.parseObjectData(s,i,t,e):n.parsePrimitiveData(s,i,t,e);const r=()=>null===c[a]||d&&c[a]<d[a];for(l=0;l<e;++l)s._parsed[l+t]=c=h[l],u&&(r()&&(u=!1),d=c);s._sorted=u}o&&qf(n,h)}parsePrimitiveData(t,e,n,s){const{iScale:i,vScale:r}=t,o=i.axis,a=r.axis,l=i.getLabels(),c=i===r,h=new Array(s);let u,d,p;for(u=0,d=s;u<d;++u)p=u+n,h[u]={[o]:c||i.parse(l[p],p),[a]:r.parse(e[p],p)};return h}parseArrayData(t,e,n,s){const{xScale:i,yScale:r}=t,o=new Array(s);let a,l,c,h;for(a=0,l=s;a<l;++a)c=a+n,h=e[c],o[a]={x:i.parse(h[0],c),y:r.parse(h[1],c)};return o}parseObjectData(t,e,n,s){const{xScale:i,yScale:r}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l=new Array(s);let c,h,u,d;for(c=0,h=s;c<h;++c)u=c+n,d=e[u],l[c]={x:i.parse(ld(d,o),u),y:r.parse(ld(d,a),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const s=this._cachedMeta,i=e[t.axis];return zf({keys:Vf(this.chart,!0),values:e._stacks[t.axis]},i,s.index,{mode:n})}updateRangeFromParsed(t,e,n,s){const i=n[e.axis];let r=null===i?NaN:i;const o=s&&n._stacks[e.axis];s&&o&&(s.values=o,t.min=Math.min(t.min,r),t.max=Math.max(t.max,r),r=zf(s,i,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const n=this,s=n._cachedMeta,i=s._parsed,r=s._sorted&&t===s.iScale,o=i.length,a=n._getOtherScale(t),l=e&&s._stacked&&{keys:Vf(n.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:u}=function(t){const{min:e,max:n,minDefined:s,maxDefined:i}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}(a);let d,p,f,m;function g(){return f=i[d],p=f[t.axis],m=f[a.axis],!Yu(p)||h>m||u<m}for(d=0;d<o&&(g()||(n.updateRangeFromParsed(c,t,f,l),!r));++d);if(r)for(d=o-1;d>=0;--d)if(!g()){n.updateRangeFromParsed(c,t,f,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let s,i,r;for(s=0,i=e.length;s<i;++s)r=e[s][t.axis],Yu(r)&&n.push(r);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,s=e.vScale,i=this.getParsed(t);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:s?""+s.getLabelForValue(i[s.axis]):""}}_update(t){const e=this,n=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),n._clip=function(t){let e,n,s,i;return Zu(t)?(e=t.top,n=t.right,s=t.bottom,i=t.left):e=n=s=i=t,{top:e,right:n,bottom:s,left:i}}(Qu(e.options.clip,function(t,e,n){if(!1===n)return!1;const s=Bf(t,n),i=Bf(e,n);return{top:i.end,right:s.end,bottom:i.start,left:s.start}}(n.xScale,n.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,n=t._cachedMeta,s=n.data||[],i=t.chart.chartArea,r=[],o=t._drawStart||0,a=t._drawCount||s.length-o;let l;for(n.dataset&&n.dataset.draw(e,i,o,a),l=o;l<o+a;++l){const t=s[l];t.active?r.push(t):t.draw(e,i)}for(l=0;l<r.length;++l)r[l].draw(e,i)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const s=this,i=s.getDataset();let r;if(t>=0&&t<s._cachedMeta.data.length){const e=s._cachedMeta.data[t];r=e.$context||(e.$context=function(t,e,n){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(s.getContext(),t,e)),r.parsed=s.getParsed(t),r.raw=i.data[t],r.index=r.dataIndex=t}else r=s.$context||(s.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(s.chart.getContext(),s.index)),r.dataset=i,r.index=r.datasetIndex=s.index;return r.active=!!e,r.mode=n,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const s=this,i="active"===e,r=s._cachedDataOpts,o=t+"-"+e,a=r[o],l=s.enableOptionSharing&&hd(n);if(a)return Kf(a,l);const c=s.chart.config,h=c.datasetElementScopeKeys(s._type,t),u=i?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(s.getDataset(),h),p=Object.keys(bp.elements[t]),f=c.resolveNamedOptions(d,p,()=>s.getContext(n,i),u);return f.$shared&&(f.$shared=l,r[o]=Object.freeze(Kf(f,l))),f}_resolveAnimations(t,e,n){const s=this,i=s.chart,r=s._cachedDataOpts,o=`animation-${e}`,a=r[o];if(a)return a;let l;if(!1!==i.options.animation){const i=s.chart.config,r=i.datasetAnimationScopeKeys(s._type,e),o=i.getOptionScopes(s.getDataset(),r);l=i.createResolver(o,s.getContext(t,n,e))}const c=new jf(i,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Yf(t)||this.chart._animationsDisabled}updateElement(t,e,n,s){Yf(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!Yf(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;const i=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(i)||i})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"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,n=e._data,s=e._cachedMeta.data;for(const[a,l,c]of e._syncList)e[a](l,c);e._syncList=[];const i=s.length,r=n.length,o=Math.min(r,i);o&&e.parse(0,o),r>i?e._insertElements(i,r-i,t):r<i&&e._removeElements(r,i-r)}_insertElements(t,e,n=!0){const s=this,i=s._cachedMeta,r=i.data,o=t+e;let a;const l=t=>{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(l(r),a=t;a<o;++a)r[a]=new s.dataElementType;s._parsing&&l(i._parsed),s.parse(t,e),n&&s.updateElements(r,t,e,"reset")}updateElements(t,e,n,s){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const s=n._parsed.splice(t,e);n._stacked&&Zf(n,s)}n.data.splice(t,e)}_onDataPush(){const t=arguments.length;this._syncList.push(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._syncList.push(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._syncList.push(["_removeElements",0,1])}_onDataSplice(t,e){this._syncList.push(["_removeElements",t,e]),this._syncList.push(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._syncList.push(["_insertElements",0,arguments.length])}}function Xf(t){const e=function(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let n=[];for(let s=0,i=e.length;s<i;s++)n=n.concat(e[s].controller.getAllParsedValues(t));t._cache.$bar=Up(n.sort((t,e)=>t-e))}return t._cache.$bar}(t);let n,s,i,r,o=t._length;const a=()=>{32767!==i&&-32768!==i&&(hd(r)&&(o=Math.min(o,Math.abs(i-r)||o)),r=i)};for(n=0,s=e.length;n<s;++n)i=t.getPixelForValue(e[n]),a();for(r=void 0,n=0,s=t.ticks.length;n<s;++n)i=t.getPixelForTick(n),a();return o}function Gf(t,e,n,s){return Uu(t)?function(t,e,n,s){const i=n.parse(t[0],s),r=n.parse(t[1],s),o=Math.min(i,r),a=Math.max(i,r);let l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:i,end:r,min:o,max:a}}(t,e,n,s):e[n.axis]=n.parse(t,s),e}function Jf(t,e,n,s){const i=t.iScale,r=t.vScale,o=i.getLabels(),a=i===r,l=[];let c,h,u,d;for(c=n,h=n+s;c<h;++c)d=e[c],u={},u[i.axis]=a||i.parse(o[c],c),l.push(Gf(d,u,r,c));return l}function tm(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}Qf.defaults={},Qf.prototype.datasetElementType=null,Qf.prototype.dataElementType=null;class em extends Qf{parsePrimitiveData(t,e,n,s){return Jf(t,e,n,s)}parseArrayData(t,e,n,s){return Jf(t,e,n,s)}parseObjectData(t,e,n,s){const{iScale:i,vScale:r}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l="x"===i.axis?o:a,c="x"===r.axis?o:a,h=[];let u,d,p,f;for(u=n,d=n+s;u<d;++u)f=e[u],p={},p[i.axis]=i.parse(ld(f,l),u),h.push(Gf(ld(f,c),p,r,u));return h}updateRangeFromParsed(t,e,n,s){super.updateRangeFromParsed(t,e,n,s);const i=n._custom;i&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:s}=e,i=this.getParsed(t),r=i._custom,o=tm(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(i[s.axis]);return{label:""+n.getLabelForValue(i[n.axis]),value:o}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize(),t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,s){const i=this,r="reset"===s,o=i._cachedMeta.vScale,a=o.getBasePixel(),l=o.isHorizontal(),c=i._getRuler(),h=i.resolveDataElementOptions(e,s),u=i.getSharedOptions(h),d=i.includeOptions(s,u);i.updateSharedOptions(u,s,h);for(let p=e;p<e+n;p++){const e=i.getParsed(p),n=r||qu(e[o.axis])?{base:a,head:a}:i._calculateBarValuePixels(p),h=i._calculateBarIndexPixels(p,c),f=(e._stacks||{})[o.axis],m={horizontal:l,base:n.base,enableBorderRadius:!f||tm(e._custom)||i.index===f._top||i.index===f._bottom,x:l?n.head:h.center,y:l?h.center:n.head,height:l?h.size:void 0,width:l?void 0:h.size};d&&(m.options=u||i.resolveDataElementOptions(p,s)),i.updateElement(t[p],p,m,s)}}_getStacks(t,e){const n=this._cachedMeta.iScale,s=n.getMatchingVisibleMetas(this._type),i=n.options.stacked,r=s.length,o=[];let a,l;for(a=0;a<r;++a){if(l=s[a],void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if(qu(t)||isNaN(t))continue}if((!1===i||-1===o.indexOf(l.stack)||void 0===i&&void 0===l.stack)&&o.push(l.stack),l.index===t)break}return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const s=this._getStacks(t,n),i=void 0!==e?s.indexOf(e):-1;return-1===i?s.length-1:i}_getRuler(){const t=this,e=t.options,n=t._cachedMeta,s=n.iScale,i=[];let r,o;for(r=0,o=n.data.length;r<o;++r)i.push(s.getPixelForValue(t.getParsed(r)[s.axis],r));const a=e.barThickness;return{min:a||Xf(s),pixels:i,start:s._startPixel,end:s._endPixel,stackCount:t._getStackCount(),scale:s,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{vScale:n,_stacked:s}=e._cachedMeta,{base:i,minBarLength:r}=e.options,o=e.getParsed(t),a=o._custom,l=tm(a);let c,h,u=o[n.axis],d=0,p=s?e.applyStack(n,o,s):u;p!==u&&(d=p-u,p=u),l&&(u=a.barStart,p=a.barEnd-a.barStart,0!==u&&xd(u)!==xd(a.barEnd)&&(d=0),d+=u);const f=qu(i)||l?d:i;let m=n.getPixelForValue(f);c=this.chart.getDataVisibility(t)?n.getPixelForValue(d+p):m,h=c-m,void 0!==r&&Math.abs(h)<r&&(h=h<0?-r:r,0===u&&(m-=h/2),c=m+h);const g=i||0;if(m===n.getPixelForValue(g)){const t=n.getLineWidthForValue(g)/2;h>0?(m+=t,h-=t):h<0&&(m-=t,h+=t)}return{size:h,base:m,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const n=this,s=e.scale,i=n.options,r=i.skipNull,o=Qu(i.maxBarThickness,1/0);let a,l;if(e.grouped){const s=r?n._getStackCount(t):e.stackCount,c="flex"===i.barThickness?function(t,e,n,s){const i=e.pixels,r=i[t];let o=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const l=n.categoryPercentage;null===o&&(o=r-(null===a?e.end-e.start:a-r)),null===a&&(a=r+r-o);const c=r-(r-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/s,ratio:n.barPercentage,start:c}}(t,e,i,s):function(t,e,n,s){const i=n.barThickness;let r,o;return qu(i)?(r=e.min*n.categoryPercentage,o=n.barPercentage):(r=i*s,o=1),{chunk:r/s,ratio:o,start:e.pixels[t]-r/2}}(t,e,i,s),h=n._getStackIndex(n.index,n._cachedMeta.stack,r?t:void 0);a=c.start+c.chunk*h+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else a=s.getPixelForValue(n.getParsed(t)[s.axis],t),l=Math.min(o,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this,e=t.chart,n=t._cachedMeta,s=n.vScale,i=n.data,r=i.length;let o=0;for(Cp(e.ctx,e.chartArea);o<r;++o)null!==t.getParsed(o)[s.axis]&&i[o].draw(t._ctx);Tp(e.ctx)}}em.id="bar",em.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},em.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class nm extends Qf{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,n,s){const{xScale:i,yScale:r}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l=[];let c,h,u;for(c=n,h=n+s;c<h;++c)u=e[c],l.push({x:i.parse(ld(u,o),c),y:r.parse(ld(u,a),c),_custom:u&&u.r&&+u.r});return l}getMaxOverflow(){const{data:t,_parsed:e}=this._cachedMeta;let n=0;for(let s=t.length-1;s>=0;--s)n=Math.max(n,t[s].size()/2,e[s]._custom);return n>0&&n}getLabelAndValue(t){const e=this._cachedMeta,{xScale:n,yScale:s}=e,i=this.getParsed(t),r=n.getLabelForValue(i.x),o=s.getLabelForValue(i.y),a=i._custom;return{label:e.label,value:"("+r+", "+o+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,s){const i=this,r="reset"===s,{iScale:o,vScale:a}=i._cachedMeta,l=i.resolveDataElementOptions(e,s),c=i.getSharedOptions(l),h=i.includeOptions(s,c),u=o.axis,d=a.axis;for(let p=e;p<e+n;p++){const e=t[p],n=!r&&i.getParsed(p),l={},c=l[u]=r?o.getPixelForDecimal(.5):o.getPixelForValue(n[u]),f=l[d]=r?a.getBasePixel():a.getPixelForValue(n[d]);l.skip=isNaN(c)||isNaN(f),h&&(l.options=i.resolveDataElementOptions(p,s),r&&(l.options.radius=0)),i.updateElement(e,p,l,s)}i.updateSharedOptions(c,s,l)}resolveDataElementOptions(t,e){const n=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const i=s.radius;return"active"!==e&&(s.radius=0),s.radius+=Qu(n&&n._custom,i),s}}nm.id="bubble",nm.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},nm.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class sm extends Qf{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 n=this.getDataset().data,s=this._cachedMeta;let i,r;for(i=t,r=t+e;i<r;++i)s._parsed[i]=+n[i]}_getRotation(){return Cd(this.options.rotation-90)}_getCircumference(){return Cd(this.options.circumference)}_getRotationExtents(){let t=pd,e=-pd;const n=this;for(let s=0;s<n.chart.data.datasets.length;++s)if(n.chart.isDatasetVisible(s)){const i=n.chart.getDatasetMeta(s).controller,r=i._getRotation(),o=i._getCircumference();t=Math.min(t,r),e=Math.max(e,r+o)}return{rotation:t,circumference:e-t}}update(t){const e=this,n=e.chart,{chartArea:s}=n,i=e._cachedMeta,r=i.data,o=e.getMaxBorderWidth()+e.getMaxOffset(r),a=Math.max((Math.min(s.width,s.height)-o)/2,0),l=Math.min((h=a,"string"==typeof(c=e.options.cutout)&&c.endsWith("%")?parseFloat(c)/100:c/h),1);var c,h;const u=e._getRingWeight(e.index),{circumference:d,rotation:p}=e._getRotationExtents(),{ratioX:f,ratioY:m,offsetX:g,offsetY:_}=function(t,e,n){let s=1,i=1,r=0,o=0;if(e<pd){const a=t,l=a+e,c=Math.cos(a),h=Math.sin(a),u=Math.cos(l),d=Math.sin(l),p=(t,e,s)=>Rd(t,a,l,!0)?1:Math.max(e,e*n,s,s*n),f=(t,e,s)=>Rd(t,a,l,!0)?-1:Math.min(e,e*n,s,s*n),m=p(0,c,u),g=p(_d,h,d),_=f(dd,c,u),y=f(dd+_d,h,d);s=(m-_)/2,i=(g-y)/2,r=-(m+_)/2,o=-(g+y)/2}return{ratioX:s,ratioY:i,offsetX:r,offsetY:o}}(p,d,l),y=Math.max(Math.min((s.width-o)/f,(s.height-o)/m)/2,0),b=Xu(e.options.radius,y),v=(b-Math.max(b*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*b,e.offsetY=_*b,i.total=e.calculateTotal(),e.outerRadius=b-v*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-v*u,0),e.updateElements(r,0,r.length,t)}_circumference(t,e){const n=this,s=n.options,i=n._cachedMeta,r=n._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]?0:n.calculateCircumference(i._parsed[t]*r/pd)}updateElements(t,e,n,s){const i=this,r="reset"===s,o=i.chart,a=o.chartArea,l=(a.left+a.right)/2,c=(a.top+a.bottom)/2,h=r&&o.options.animation.animateScale,u=h?0:i.innerRadius,d=h?0:i.outerRadius,p=i.resolveDataElementOptions(e,s),f=i.getSharedOptions(p),m=i.includeOptions(s,f);let g,_=i._getRotation();for(g=0;g<e;++g)_+=i._circumference(g,r);for(g=e;g<e+n;++g){const e=i._circumference(g,r),n=t[g],o={x:l+i.offsetX,y:c+i.offsetY,startAngle:_,endAngle:_+e,circumference:e,outerRadius:d,innerRadius:u};m&&(o.options=f||i.resolveDataElementOptions(g,s)),_+=e,i.updateElement(n,g,o,s)}i.updateSharedOptions(f,s,p)}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,s=0;for(n=0;n<e.length;n++){const e=t._parsed[n];null!==e&&!isNaN(e)&&this.chart.getDataVisibility(n)&&(s+=Math.abs(e))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?pd*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this.chart,n=e.data.labels||[],s=Cf(this._cachedMeta._parsed[t],e.options.locale);return{label:n[t]||"",value:s}}getMaxBorderWidth(t){const e=this;let n=0;const s=e.chart;let i,r,o,a,l;if(!t)for(i=0,r=s.data.datasets.length;i<r;++i)if(s.isDatasetVisible(i)){o=s.getDatasetMeta(i),t=o.data,a=o.controller,a!==e&&a.configure();break}if(!t)return 0;for(i=0,r=t.length;i<r;++i)l=a.resolveDataElementOptions(i),"inner"!==l.borderAlign&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let e=0;for(let n=0,s=t.length;n<s;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(Qu(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}sm.id="doughnut",sm.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",indexAxis:"r"},sm.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((e,n)=>{const s=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,hidden:!t.getDataVisibility(n),index:n}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const n=": "+t.formattedValue;return Uu(e)?(e=e.slice(),e[0]+=n):e+=n,e}}}}};class im extends Qf{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,n=e._cachedMeta,{dataset:s,data:i=[],_dataset:r}=n,o=e.chart._animationsDisabled;let{start:a,count:l}=function(t,e,n){const s=e.length;let i=0,r=s;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:c,max:h,minDefined:u,maxDefined:d}=o.getUserBounds();u&&(i=Md(Math.min(Hp(a,o.axis,c).lo,n?s:Hp(e,l,o.getPixelForValue(c)).lo),0,s-1)),r=d?Md(Math.max(Hp(a,o.axis,h).hi+1,n?0:Hp(e,l,o.getPixelForValue(h)).hi+1),i,s)-i:s-i}return{start:i,count:r}}(n,i,o);e._drawStart=a,e._drawCount=l,function(t){const{xScale:e,yScale:n,_scaleRanges:s}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!s)return t._scaleRanges=i,!0;const r=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),r}(n)&&(a=0,l=i.length),s._decimated=!!r._decimated,s.points=i;const c=e.resolveDatasetElementOptions(t);e.options.showLine||(c.borderWidth=0),c.segment=e.options.segment,e.updateElement(s,void 0,{animated:!o,options:c},t),e.updateElements(i,a,l,t)}updateElements(t,e,n,s){const i=this,r="reset"===s,{iScale:o,vScale:a,_stacked:l}=i._cachedMeta,c=i.resolveDataElementOptions(e,s),h=i.getSharedOptions(c),u=i.includeOptions(s,h),d=o.axis,p=a.axis,f=i.options.spanGaps,m=Sd(f)?f:Number.POSITIVE_INFINITY,g=i.chart._animationsDisabled||r||"none"===s;let _=e>0&&i.getParsed(e-1);for(let y=e;y<e+n;++y){const e=t[y],n=i.getParsed(y),c=g?e:{},f=qu(n[p]),b=c[d]=o.getPixelForValue(n[d],y),v=c[p]=r||f?a.getBasePixel():a.getPixelForValue(l?i.applyStack(a,n,l):n[p],y);c.skip=isNaN(b)||isNaN(v)||f,c.stop=y>0&&n[d]-_[d]>m,c.parsed=n,u&&(c.options=h||i.resolveDataElementOptions(y,s)),g||i.updateElement(e,y,c,s),_=n}i.updateSharedOptions(h,s,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,n=e.dataset,s=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return s;const r=i[0].size(t.resolveDataElementOptions(0)),o=i[i.length-1].size(t.resolveDataElementOptions(i.length-1));return Math.max(s,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}im.id="line",im.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},im.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class rm extends Qf{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this.chart,n=e.data.labels||[],s=Cf(this._cachedMeta._parsed[t].r,e.options.locale);return{label:n[t]||"",value:s}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,n=e.chartArea,s=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(i/2,0),o=(r-Math.max(s.cutoutPercentage?r/100*s.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=r-o*t.index,t.innerRadius=t.outerRadius-o}updateElements(t,e,n,s){const i=this,r="reset"===s,o=i.chart,a=i.getDataset(),l=o.options.animation,c=i._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,d=c.getIndexAngle(0)-.5*dd;let p,f=d;const m=360/i.countVisibleElements();for(p=0;p<e;++p)f+=i._computeAngle(p,s,m);for(p=e;p<e+n;p++){const e=t[p];let n=f,g=f+i._computeAngle(p,s,m),_=o.getDataVisibility(p)?c.getDistanceFromCenterForValue(a.data[p]):0;f=g,r&&(l.animateScale&&(_=0),l.animateRotate&&(n=g=d));const y={x:h,y:u,innerRadius:0,outerRadius:_,startAngle:n,endAngle:g,options:i.resolveDataElementOptions(p,s)};i.updateElement(e,p,y,s)}}countVisibleElements(){const t=this.getDataset();let e=0;return this._cachedMeta.data.forEach((n,s)=>{!isNaN(t.data[s])&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?Cd(this.resolveDataElementOptions(t,e).angle||n):0}}rm.id="polarArea",rm.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},rm.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((e,n)=>{const s=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,hidden:!t.getDataVisibility(n),index:n}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class om extends sm{}om.id="pie",om.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class am extends Qf{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}update(t){const e=this,n=e._cachedMeta,s=n.dataset,i=n.data||[],r=n.iScale.getLabels();if(s.points=i,"resize"!==t){const n=e.resolveDatasetElementOptions(t);e.options.showLine||(n.borderWidth=0),e.updateElement(s,void 0,{_loop:!0,_fullLoop:r.length===i.length,options:n},t)}e.updateElements(i,0,i.length,t)}updateElements(t,e,n,s){const i=this,r=i.getDataset(),o=i._cachedMeta.rScale,a="reset"===s;for(let l=e;l<e+n;l++){const e=t[l],n=i.resolveDataElementOptions(l,s),c=o.getPointPositionForValue(l,r.data[l]),h=a?o.xCenter:c.x,u=a?o.yCenter:c.y,d={x:h,y:u,angle:c.angle,skip:isNaN(h)||isNaN(u),options:n};i.updateElement(e,l,d,s)}}}am.id="radar",am.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},am.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class lm extends im{}function cm(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}lm.id="scatter",lm.defaults={showLine:!1,fill:!1},lm.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};class hm{constructor(t){this.options=t||{}}formats(){return cm()}parse(t,e){return cm()}format(t,e){return cm()}add(t,e,n){return cm()}diff(t,e,n){return cm()}startOf(t,e,n){return cm()}endOf(t,e){return cm()}}hm.override=function(t){Object.assign(hm.prototype,t)};var um={_date:hm};function dm(t,e){return"native"in t?{x:t.x,y:t.y}:_f(t,e)}function pm(t,e,n,s){const{controller:i,data:r,_sorted:o}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&o&&r.length){const t=a._reversePixels?$p:Hp;if(!s)return t(r,e,n);if(i._sharedOptions){const s=r[0],i="function"==typeof s.getRange&&s.getRange(e);if(i){const s=t(r,e,n-i),o=t(r,e,n+i);return{lo:s.lo,hi:o.hi}}}}return{lo:0,hi:r.length-1}}function fm(t,e,n,s,i){const r=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=r.length;a<l;++a){const{index:t,data:n}=r[a],{lo:l,hi:c}=pm(r[a],e,o,i);for(let e=l;e<=c;++e){const i=n[e];i.skip||s(i,t,e)}}}function mm(t,e,n,s){const i=[];return kp(e,t.chartArea,t._minPadding)?(fm(t,n,e,function(t,n,r){t.inRange(e.x,e.y,s)&&i.push({element:t,datasetIndex:n,index:r})},!0),i):i}function gm(t,e,n,s,i){const r=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,s){const i=e?Math.abs(t.x-s.x):0,r=n?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(r,2))}}(n);let o=Number.POSITIVE_INFINITY,a=[];return kp(e,t.chartArea,t._minPadding)?(fm(t,n,e,function(n,l,c){if(s&&!n.inRange(e.x,e.y,i))return;const h=n.getCenterPoint(i);if(!kp(h,t.chartArea,t._minPadding))return;const u=r(e,h);u<o?(a=[{element:n,datasetIndex:l,index:c}],o=u):u===o&&a.push({element:n,datasetIndex:l,index:c})}),a):a}function _m(t,e,n,s){const i=dm(e,t),r=[],o=n.axis,a="x"===o?"inXRange":"inYRange";let l=!1;return function(t,e){const n=t.getSortedVisibleDatasetMetas();let s,i,r;for(let o=0,a=n.length;o<a;++o){({index:s,data:i}=n[o]);for(let t=0,n=i.length;t<n;++t)r=i[t],r.skip||e(r,s,t)}}(t,(t,e,n)=>{t[a](i[o],s)&&r.push({element:t,datasetIndex:e,index:n}),t.inRange(i.x,i.y,s)&&(l=!0)}),n.intersect&&!l?[]:r}var ym={modes:{index(t,e,n,s){const i=dm(e,t),r=n.axis||"x",o=n.intersect?mm(t,i,r,s):gm(t,i,r,!1,s),a=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=o[0].index,n=t.data[e];n&&!n.skip&&a.push({element:n,datasetIndex:t.index,index:e})}),a):[]},dataset(t,e,n,s){const i=dm(e,t),r=n.axis||"xy";let o=n.intersect?mm(t,i,r,s):gm(t,i,r,!1,s);if(o.length>0){const e=o[0].datasetIndex,n=t.getDatasetMeta(e).data;o=[];for(let t=0;t<n.length;++t)o.push({element:n[t],datasetIndex:e,index:t})}return o},point:(t,e,n,s)=>mm(t,dm(e,t),n.axis||"xy",s),nearest:(t,e,n,s)=>gm(t,dm(e,t),n.axis||"xy",n.intersect,s),x:(t,e,n,s)=>(n.axis="x",_m(t,e,n,s)),y:(t,e,n,s)=>(n.axis="y",_m(t,e,n,s))}};const bm=["left","top","right","bottom"];function vm(t,e){return t.filter(t=>t.pos===e)}function xm(t,e){return t.filter(t=>-1===bm.indexOf(t.pos)&&t.box.axis===e)}function wm(t,e){return t.sort((t,n)=>{const s=e?n:t,i=e?t:n;return s.weight===i.weight?s.index-i.index:s.weight-i.weight})}function Sm(t,e,n,s){return Math.max(t[n],e[n])+Math.max(t[s],e[s])}function Em(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function km(t,e,n){const s=n.box,i=t.maxPadding;Zu(n.pos)||(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?s.height:s.width,t[n.pos]+=n.size),s.getPadding&&Em(i,s.getPadding());const r=Math.max(0,e.outerWidth-Sm(i,t,"left","right")),o=Math.max(0,e.outerHeight-Sm(i,t,"top","bottom")),a=r!==t.w,l=o!==t.h;return t.w=r,t.h=o,n.horizontal?{same:a,other:l}:{same:l,other:a}}function Cm(t,e){const n=e.maxPadding;return function(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{s[t]=Math.max(e[t],n[t])}),s}(t?["left","right"]:["top","bottom"])}function Tm(t,e,n){const s=[];let i,r,o,a,l,c;for(i=0,r=t.length,l=0;i<r;++i){o=t[i],a=o.box,a.update(o.width||e.w,o.height||e.h,Cm(o.horizontal,e));const{same:r,other:h}=km(e,n,o);l|=r&&s.length,c=c||h,a.fullSize||s.push(o)}return l&&Tm(s,e,n)||c}function Om(t,e,n){const s=n.padding;let i,r,o,a,l=e.x,c=e.y;for(i=0,r=t.length;i<r;++i)o=t[i],a=o.box,o.horizontal?(a.left=a.fullSize?s.left:e.left,a.right=a.fullSize?n.outerWidth-s.right:e.left+e.w,a.top=c,a.bottom=c+a.height,a.width=a.right-a.left,c=a.bottom):(a.left=l,a.right=l+a.width,a.top=a.fullSize?s.top:e.top,a.bottom=a.fullSize?n.outerHeight-s.right:e.top+e.h,a.height=a.bottom-a.top,l=a.right);e.x=l,e.y=c}bp.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Pm={addBox(t,e){t.boxes||(t.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)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,s){if(!t)return;const i=jp(t.options.layout.padding),r=Math.max(e-i.width,0),o=Math.max(n-i.height,0),a=function(t){const e=function(t){const e=[];let n,s,i;for(n=0,s=(t||[]).length;n<s;++n)i=t[n],e.push({index:n,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return e}(t),n=wm(e.filter(t=>t.box.fullSize),!0),s=wm(vm(e,"left"),!0),i=wm(vm(e,"right")),r=wm(vm(e,"top"),!0),o=wm(vm(e,"bottom")),a=xm(e,"x"),l=xm(e,"y");return{fullSize:n,leftAndTop:s.concat(r),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:vm(e,"chartArea"),vertical:s.concat(i).concat(l),horizontal:r.concat(o).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;Ju(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/h,hBoxMaxHeight:o/2}),d=Object.assign({},i);Em(d,jp(s));const p=Object.assign({maxPadding:d,w:r,h:o,x:i.left,y:i.top},i);!function(t,e){let n,s,i;for(n=0,s=t.length;n<s;++n)i=t[n],i.horizontal?(i.width=i.box.fullSize&&e.availableWidth,i.height=e.hBoxMaxHeight):(i.width=e.vBoxMaxWidth,i.height=i.box.fullSize&&e.availableHeight)}(l.concat(c),u),Tm(a.fullSize,p,u),Tm(l,p,u),Tm(c,p,u)&&Tm(l,p,u),function(t){const e=t.maxPadding;function n(n){const s=Math.max(e[n]-t[n],0);return t[n]+=s,s}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(p),Om(a.leftAndTop,p,u),p.x+=p.w,p.y+=p.h,Om(a.rightAndBottom,p,u),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ju(a.chartArea,e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(p.w,p.h)})}};class Im{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}}class Am extends Im{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const Rm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Mm=t=>null===t||""===t,Dm=!!vf&&{passive:!0};function Fm(t,e,n){t.canvas.removeEventListener(e,n,Dm)}function Lm(t,e,n){const s=t.canvas,i=s&&df(s)||s,r=new MutationObserver(t=>{const e=df(i);t.forEach(t=>{for(let s=0;s<t.addedNodes.length;s++){const r=t.addedNodes[s];r!==i&&r!==e||n(t.target)}})});return r.observe(document,{childList:!0,subtree:!0}),r}function Nm(t,e,n){const s=t.canvas,i=s&&df(s);if(!i)return;const r=new MutationObserver(t=>{t.forEach(t=>{for(let e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===s){n();break}})});return r.observe(i,{childList:!0}),r}const jm=new Map;let Bm=0;function Vm(){const t=window.devicePixelRatio;t!==Bm&&(Bm=t,jm.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function zm(t,e,n){const s=t.canvas,i=s&&df(s);if(!i)return;const r=zu((t,e)=>{const s=i.clientWidth;n(t,e),s<i.clientWidth&&n()},window),o=new ResizeObserver(t=>{const e=t[0],n=e.contentRect.width,s=e.contentRect.height;0===n&&0===s||r(n,s)});return o.observe(i),function(t,e){jm.size||window.addEventListener("resize",Vm),jm.set(t,e)}(t,r),o}function Hm(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){jm.delete(t),jm.size||window.removeEventListener("resize",Vm)}(t)}function $m(t,e,n){const s=t.canvas,i=zu(e=>{null!==t.ctx&&n(function(t,e){const n=Rm[t.type]||t.type,{x:s,y:i}=_f(t,e);return{type:n,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==i?i:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,n){t.addEventListener(e,n,Dm)}(s,e,i),i}class Wm extends Im{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,s=t.getAttribute("height"),i=t.getAttribute("width");if(t.$chartjs={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Mm(i)){const e=xf(t,"width");void 0!==e&&(t.width=e)}if(Mm(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=xf(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const n=e.$chartjs.initial;["height","width"].forEach(t=>{const s=n[t];qu(s)?e.removeAttribute(t):e.setAttribute(t,s)});const s=n.style||{};return Object.keys(s).forEach(t=>{e.style[t]=s[t]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,n){this.removeEventListener(t,e),(t.$proxies||(t.$proxies={}))[e]=({attach:Lm,detach:Nm,resize:zm}[e]||$m)(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),s=n[e];s&&(({attach:Hm,detach:Hm,resize:Hm}[e]||Fm)(t,e,s),n[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return function(t,e,n,s){const i=ff(t),r=gf(i,"margin"),o=pf(i.maxWidth,t,"clientWidth")||md,a=pf(i.maxHeight,t,"clientHeight")||md,l=function(t,e,n){let s,i;if(void 0===e||void 0===n){const r=df(t);if(r){const t=r.getBoundingClientRect(),o=ff(r),a=gf(o,"border","width"),l=gf(o,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,s=pf(o.maxWidth,r,"clientWidth"),i=pf(o.maxHeight,r,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:s||md,maxHeight:i||md}}(t,e,n);let{width:c,height:h}=l;if("content-box"===i.boxSizing){const t=gf(i,"border","width"),e=gf(i,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-r.width),h=Math.max(0,s?Math.floor(c/s):h-r.height),c=yf(Math.min(c,o,l.maxWidth)),h=yf(Math.min(h,a,l.maxHeight)),c&&!h&&(h=yf(c/2)),{width:c,height:h}}(t,e,n,s)}isAttached(t){const e=df(t);return!(!e||!df(e))}}class qm{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:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Sd(this.x)&&Sd(this.y)}getProps(t,e){const n=this,s=this.$animations;if(!e||!s)return n;const i={};return t.forEach(t=>{i[t]=s[t]&&s[t].active()?s[t]._to:n[t]}),i}}qm.defaults={},qm.defaultRoutes=void 0;const Um={values:t=>Uu(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const s=this.chart.options.locale;let i,r=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(i="scientific"),r=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}const o=vd(Math.abs(r)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Cf(t,s,l)},logarithmic(t,e,n){if(0===t)return"0";const s=t/Math.pow(10,Math.floor(vd(t)));return 1===s||2===s||5===s?Um.numeric.call(this,t,e,n):""}};var Zm={formatters:Um};function Ym(t,e,n,s,i){const r=Qu(s,0),o=Math.min(Qu(i,t.length),t.length);let a,l,c,h=0;for(n=Math.ceil(n),i&&(a=i-s,n=a/Math.floor(a/n)),c=r;c<0;)h++,c=Math.round(r+h*n);for(l=Math.max(r,0);l<o;l++)l===c&&(e.push(t[l]),h++,c=Math.round(r+h*n))}bp.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:(t,e)=>e.lineWidth,tickColor:(t,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:Zm.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),bp.route("scale.ticks","color","","color"),bp.route("scale.grid","color","","borderColor"),bp.route("scale.grid","borderColor","","borderColor"),bp.route("scale.title","color","","color"),bp.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),bp.describe("scales",{_fallback:"scale"});const Km=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n;function Qm(t,e){const n=[],s=t.length/e,i=t.length;let r=0;for(;r<i;r+=s)n.push(t[Math.floor(r)]);return n}function Xm(t,e,n){const s=t.ticks.length,i=Math.min(e,s-1),r=t._startPixel,o=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(i);if(!(n&&(l=1===s?Math.max(c-r,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(i-1))/2,c+=i<e?l:-l,c<r-a||c>o+a)))return c}function Gm(t){return t.drawTicks?t.tickLength:0}function Jm(t,e){if(!t.display)return 0;const n=Bp(t.font,e),s=jp(t.padding);return(Uu(t.text)?t.text.length:1)*n.lineHeight+s.height}function tg(t,e,n){let s=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(n&&"right"!==e||!n&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class eg extends qm{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){const e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:s}=this;return t=Ku(t,Number.POSITIVE_INFINITY),e=Ku(e,Number.NEGATIVE_INFINITY),n=Ku(n,Number.POSITIVE_INFINITY),s=Ku(s,Number.NEGATIVE_INFINITY),{min:Ku(t,n),max:Ku(e,s),minDefined:Yu(t),maxDefined:Yu(e)}}getMinMax(t){const e=this;let n,{min:s,max:i,minDefined:r,maxDefined:o}=e.getUserBounds();if(r&&o)return{min:s,max:i};const a=e.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)n=a[l].controller.getMinMax(e,t),r||(s=Math.min(s,n.min)),o||(i=Math.max(i,n.max));return{min:Ku(s,Ku(i,s)),max:Ku(i,Ku(s,i))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.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(){Gu(this.options.beforeUpdate,[this])}update(t,e,n){const s=this,i=s.options.ticks,r=i.sampleSize;s.beforeUpdate(),s.maxWidth=t,s.maxHeight=e,s._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),s.ticks=null,s._labelSizes=null,s._gridLineItems=null,s._labelItems=null,s.beforeSetDimensions(),s.setDimensions(),s.afterSetDimensions(),s._maxLength=s.isHorizontal()?s.width+n.left+n.right:s.height+n.top+n.bottom,s._dataLimitsCached||(s.beforeDataLimits(),s.determineDataLimits(),s.afterDataLimits(),s._range=function(t,e){const{min:n,max:s}=t;return{min:n-Math.abs(Xu(e,n)),max:s+Xu(e,s)}}(s,s.options.grace),s._dataLimitsCached=!0),s.beforeBuildTicks(),s.ticks=s.buildTicks()||[],s.afterBuildTicks();const o=r<s.ticks.length;s._convertTicksToLabels(o?Qm(s.ticks,r):s.ticks),s.configure(),s.beforeCalculateLabelRotation(),s.calculateLabelRotation(),s.afterCalculateLabelRotation(),i.display&&(i.autoSkip||"auto"===i.source)&&(s.ticks=function(t,e){const n=t.options.ticks,s=n.maxTicksLimit||function(t){const e=t.options.offset,n=t._tickSize();return Math.floor(Math.min(t._length/n+(e?0:1),t._maxLength/n))}(t),i=n.major.enabled?function(t){const e=[];let n,s;for(n=0,s=t.length;n<s;n++)t[n].major&&e.push(n);return e}(e):[],r=i.length,o=i[0],a=i[r-1],l=[];if(r>s)return function(t,e,n,s){let i,r=0,o=n[0];for(s=Math.ceil(s),i=0;i<t.length;i++)i===o&&(e.push(t[i]),r++,o=n[r*s])}(e,l,i,r/s),l;const c=function(t,e,n){const s=function(t){const e=t.length;let n,s;if(e<2)return!1;for(s=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==s)return!1;return s}(t),i=e.length/n;if(!s)return Math.max(i,1);const r=function(t){const e=[],n=Math.sqrt(t);let s;for(s=1;s<n;s++)t%s==0&&(e.push(s),e.push(t/s));return n===(0|n)&&e.push(n),e.sort((t,e)=>t-e).pop(),e}(s);for(let o=0,a=r.length-1;o<a;o++){const t=r[o];if(t>i)return t}return Math.max(i,1)}(i,e,s);if(r>0){let t,n;const s=r>1?Math.round((a-o)/(r-1)):null;for(Ym(e,l,c,qu(s)?0:o-s,o),t=0,n=r-1;t<n;t++)Ym(e,l,c,i[t],i[t+1]);return Ym(e,l,c,a,qu(s)?e.length:a+s),l}return Ym(e,l,c),l}(s,s.ticks),s._labelSizes=null),o&&s._convertTicksToLabels(s.ticks),s.beforeFit(),s.fit(),s.afterFit(),s.afterUpdate()}configure(){const t=this;let e,n,s=t.options.reverse;t.isHorizontal()?(e=t.left,n=t.right):(e=t.top,n=t.bottom,s=!s),t._startPixel=e,t._endPixel=n,t._reversePixels=s,t._length=n-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){Gu(this.options.afterUpdate,[this])}beforeSetDimensions(){Gu(this.options.beforeSetDimensions,[this])}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){Gu(this.options.afterSetDimensions,[this])}_callHooks(t){const e=this;e.chart.notifyPlugins(t,e.getContext()),Gu(e.options[t],[e])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Gu(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this,n=e.options.ticks;let s,i,r;for(s=0,i=t.length;s<i;s++)r=t[s],r.label=Gu(n.callback,[r.value,s,t],e);for(s=0;s<i;s++)qu(t[s].label)&&(t.splice(s,1),i--,s--)}afterTickToLabelConversion(){Gu(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Gu(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,e=t.options,n=e.ticks,s=t.ticks.length,i=n.minRotation||0,r=n.maxRotation;let o,a,l,c=i;if(!t._isVisible()||!n.display||i>=r||s<=1||!t.isHorizontal())return void(t.labelRotation=i);const h=t._getLabelSizes(),u=h.widest.width,d=h.highest.height,p=Md(t.chart.width-u,0,t.maxWidth);o=e.offset?t.maxWidth/s:p/(s-1),u+6>o&&(o=p/(s-(e.offset?.5:1)),a=t.maxHeight-Gm(e.grid)-n.padding-Jm(e.title,t.chart.options.font),l=Math.sqrt(u*u+d*d),c=Td(Math.min(Math.asin(Math.min((h.highest.height+6)/o,1)),Math.asin(Math.min(a/l,1))-Math.asin(d/l))),c=Math.max(i,Math.min(r,c))),t.labelRotation=c}afterCalculateLabelRotation(){Gu(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Gu(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:r}}=t,o=t._isVisible(),a=t.isHorizontal();if(o){const o=Jm(i,n.options.font);if(a?(e.width=t.maxWidth,e.height=Gm(r)+o):(e.height=t.maxHeight,e.width=Gm(r)+o),s.display&&t.ticks.length){const{first:n,last:i,widest:r,highest:o}=t._getLabelSizes(),l=2*s.padding,c=Cd(t.labelRotation),h=Math.cos(c),u=Math.sin(c);a?e.height=Math.min(t.maxHeight,e.height+(s.mirror?0:u*r.width+h*o.height)+l):e.width=Math.min(t.maxWidth,e.width+(s.mirror?0:h*r.width+u*o.height)+l),t._calculatePadding(n,i,u,h)}}t._handleMargins(),a?(t.width=t._length=n.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,n,s){const i=this,{ticks:{align:r,padding:o},position:a}=i.options,l=0!==i.labelRotation,c="top"!==a&&"x"===i.axis;if(i.isHorizontal()){const a=i.getPixelForTick(0)-i.left,h=i.right-i.getPixelForTick(i.ticks.length-1);let u=0,d=0;l?c?(u=s*t.width,d=n*e.height):(u=n*t.height,d=s*e.width):"start"===r?d=e.width:"end"===r?u=t.width:(u=t.width/2,d=e.width/2),i.paddingLeft=Math.max((u-a+o)*i.width/(i.width-a),0),i.paddingRight=Math.max((d-h+o)*i.width/(i.width-h),0)}else{let n=e.height/2,s=t.height/2;"start"===r?(n=0,s=t.height):"end"===r&&(n=e.height,s=0),i.paddingTop=n+o,i.paddingBottom=s+o}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Gu(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){const e=this;e.beforeTickToLabelConversion(),e.generateTickLabels(t),e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const n=t.options.ticks.sampleSize;let s=t.ticks;n<s.length&&(s=Qm(s,n)),t._labelSizes=e=t._computeLabelSizes(s,s.length)}return e}_computeLabelSizes(t,e){const{ctx:n,_longestTextCache:s}=this,i=[],r=[];let o,a,l,c,h,u,d,p,f,m,g,_=0,y=0;for(o=0;o<e;++o){if(c=t[o].label,h=this._resolveTickFontOptions(o),n.font=u=h.string,d=s[u]=s[u]||{data:{},gc:[]},p=h.lineHeight,f=m=0,qu(c)||Uu(c)){if(Uu(c))for(a=0,l=c.length;a<l;++a)g=c[a],qu(g)||Uu(g)||(f=vp(n,d.data,d.gc,f,g),m+=p)}else f=vp(n,d.data,d.gc,f,c),m=p;i.push(f),r.push(m),_=Math.max(f,_),y=Math.max(m,y)}!function(t,e){Ju(t,t=>{const n=t.gc,s=n.length/2;let i;if(s>e){for(i=0;i<s;++i)delete t.data[n[i]];n.splice(0,s)}})}(s,e);const b=i.indexOf(_),v=r.indexOf(y),x=t=>({width:i[t]||0,height:r[t]||0});return{first:x(0),last:x(e-1),widest:x(b),highest:x(v),widths:i,heights:r}}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){const e=this;e._reversePixels&&(t=1-t);const n=e._startPixel+t*e._length;return Md(e._alignToPixels?wp(e.chart,n,0):n,-32768,32767)}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,n=e.ticks||[];if(t>=0&&t<n.length){const s=n[t];return s.$context||(s.$context=function(t,e,n){return Object.assign(Object.create(t),{tick:n,index:e,type:"tick"})}(e.getContext(),t,s))}return e.$context||(e.$context=(s=e.chart.getContext(),i=e,Object.assign(Object.create(s),{scale:i,type:"scale"})));var s,i}_tickSize(){const t=this,e=t.options.ticks,n=Cd(t.labelRotation),s=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=t._getLabelSizes(),o=e.autoSkipPadding||0,a=r?r.widest.width+o:0,l=r?r.highest.height+o:0;return t.isHorizontal()?l*s>a*i?a/s:l/i:l*i<a*s?l/s:a/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this,n=e.axis,s=e.chart,i=e.options,{grid:r,position:o}=i,a=r.offset,l=e.isHorizontal(),c=e.ticks.length+(a?1:0),h=Gm(r),u=[],d=r.setContext(e.getContext()),p=d.drawBorder?d.borderWidth:0,f=p/2,m=function(t){return wp(s,t,p)};let g,_,y,b,v,x,w,S,E,k,C,T;if("top"===o)g=m(e.bottom),x=e.bottom-h,S=g-f,k=m(t.top)+f,T=t.bottom;else if("bottom"===o)g=m(e.top),k=t.top,T=m(t.bottom)-f,x=g+f,S=e.top+h;else if("left"===o)g=m(e.right),v=e.right-h,w=g-f,E=m(t.left)+f,C=t.right;else if("right"===o)g=m(e.left),E=t.left,C=m(t.right)-f,v=g+f,w=e.left+h;else if("x"===n){if("center"===o)g=m((t.top+t.bottom)/2+.5);else if(Zu(o)){const t=Object.keys(o)[0];g=m(e.chart.scales[t].getPixelForValue(o[t]))}k=t.top,T=t.bottom,x=g+f,S=x+h}else if("y"===n){if("center"===o)g=m((t.left+t.right)/2);else if(Zu(o)){const t=Object.keys(o)[0];g=m(e.chart.scales[t].getPixelForValue(o[t]))}v=g-f,w=v-h,E=t.left,C=t.right}for(_=0;_<c;++_){const t=r.setContext(e.getContext(_)),n=t.lineWidth,i=t.color,o=r.borderDash||[],c=t.borderDashOffset,h=t.tickWidth,d=t.tickColor,p=t.tickBorderDash||[],f=t.tickBorderDashOffset;y=Xm(e,_,a),void 0!==y&&(b=wp(s,y,n),l?v=w=E=C=b:x=S=k=T=b,u.push({tx1:v,ty1:x,tx2:w,ty2:S,x1:E,y1:k,x2:C,y2:T,width:n,color:i,borderDash:o,borderDashOffset:c,tickWidth:h,tickColor:d,tickBorderDash:p,tickBorderDashOffset:f}))}return e._ticksLength=c,e._borderValue=g,u}_computeLabelItems(t){const e=this,n=e.axis,s=e.options,{position:i,ticks:r}=s,o=e.isHorizontal(),a=e.ticks,{align:l,crossAlign:c,padding:h,mirror:u}=r,d=Gm(s.grid),p=d+h,f=u?-h:p,m=-Cd(e.labelRotation),g=[];let _,y,b,v,x,w,S,E,k,C,T,O,P="middle";if("top"===i)w=e.bottom-f,S=e._getXAxisLabelAlignment();else if("bottom"===i)w=e.top+f,S=e._getXAxisLabelAlignment();else if("left"===i){const t=e._getYAxisLabelAlignment(d);S=t.textAlign,x=t.x}else if("right"===i){const t=e._getYAxisLabelAlignment(d);S=t.textAlign,x=t.x}else if("x"===n){if("center"===i)w=(t.top+t.bottom)/2+p;else if(Zu(i)){const t=Object.keys(i)[0];w=e.chart.scales[t].getPixelForValue(i[t])+p}S=e._getXAxisLabelAlignment()}else if("y"===n){if("center"===i)x=(t.left+t.right)/2-p;else if(Zu(i)){const t=Object.keys(i)[0];x=e.chart.scales[t].getPixelForValue(i[t])}S=e._getYAxisLabelAlignment(d).textAlign}"y"===n&&("start"===l?P="top":"end"===l&&(P="bottom"));const I=e._getLabelSizes();for(_=0,y=a.length;_<y;++_){b=a[_],v=b.label;const t=r.setContext(e.getContext(_));E=e.getPixelForTick(_)+r.labelOffset,k=e._resolveTickFontOptions(_),C=k.lineHeight,T=Uu(v)?v.length:1;const n=T/2,s=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let d;if(o?(x=E,O="top"===i?"near"===c||0!==m?-T*C+C/2:"center"===c?-I.highest.height/2-n*C+C:C/2-I.highest.height:"near"===c||0!==m?C/2:"center"===c?I.highest.height/2-n*C:I.highest.height-T*C,u&&(O*=-1)):(w=E,O=(1-T)*C/2),t.showLabelBackdrop){const e=jp(t.backdropPadding),n=I.heights[_],s=I.widths[_];let i=w+O-e.top,r=x-e.left;switch(P){case"middle":i-=n/2;break;case"bottom":i-=n}switch(S){case"center":r-=s/2;break;case"right":r-=s}d={left:r,top:i,width:s+e.width,height:n+e.height,color:t.backdropColor}}g.push({rotation:m,label:v,font:k,color:s,strokeColor:l,strokeWidth:h,textOffset:O,textAlign:S,textBaseline:P,translation:[x,w],backdrop:d})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Cd(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align&&(n="right"),n}_getYAxisLabelAlignment(t){const e=this,{position:n,ticks:{crossAlign:s,mirror:i,padding:r}}=e.options,o=t+r,a=e._getLabelSizes().widest.width;let l,c;return"left"===n?i?(l="left",c=e.right+r):(c=e.right-o,"near"===s?l="right":"center"===s?(l="center",c-=a/2):(l="left",c=e.left)):"right"===n?i?(l="right",c=e.left+r):(c=e.left+o,"near"===s?l="left":"center"===s?(l="center",c+=a/2):(l="right",c=e.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const e=t.chart,n=t.options.position;return"left"===n||"right"===n?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===n||"bottom"===n?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:s,width:i,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,s,i,r),t.restore())}getLineWidthForValue(t){const e=this,n=e.options.grid;if(!e._isVisible()||!n.display)return 0;const s=e.ticks.findIndex(e=>e.value===t);return s>=0?n.setContext(e.getContext(s)).lineWidth:0}drawGrid(t){const e=this,n=e.options.grid,s=e.ctx,i=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let r,o;const a=(t,e,n)=>{n.width&&n.color&&(s.save(),s.lineWidth=n.width,s.strokeStyle=n.color,s.setLineDash(n.borderDash||[]),s.lineDashOffset=n.borderDashOffset,s.beginPath(),s.moveTo(t.x,t.y),s.lineTo(e.x,e.y),s.stroke(),s.restore())};if(n.display)for(r=0,o=i.length;r<o;++r){const t=i[r];n.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),n.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const t=this,{chart:e,ctx:n,options:{grid:s}}=t,i=s.setContext(t.getContext()),r=s.drawBorder?i.borderWidth:0;if(!r)return;const o=s.setContext(t.getContext(0)).lineWidth,a=t._borderValue;let l,c,h,u;t.isHorizontal()?(l=wp(e,t.left,r)-r/2,c=wp(e,t.right,o)+o/2,h=u=a):(h=wp(e,t.top,r)-r/2,u=wp(e,t.bottom,o)+o/2,l=c=a),n.save(),n.lineWidth=i.borderWidth,n.strokeStyle=i.borderColor,n.beginPath(),n.moveTo(l,h),n.lineTo(c,u),n.stroke(),n.restore()}drawLabels(t){const e=this;if(!e.options.ticks.display)return;const n=e.ctx,s=e._computeLabelArea();s&&Cp(n,s);const i=e._labelItems||(e._labelItems=e._computeLabelItems(t));let r,o;for(r=0,o=i.length;r<o;++r){const t=i[r],e=t.font,s=t.label;t.backdrop&&(n.fillStyle=t.backdrop.color,n.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),Ip(n,s,0,t.textOffset,e,t)}s&&Tp(n)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:s}}=this;if(!n.display)return;const i=Bp(n.font),r=jp(n.padding),o=n.align;let a=i.lineHeight/2;"bottom"===e?(a+=r.bottom,Uu(n.text)&&(a+=i.lineHeight*(n.text.length-1))):a+=r.top;const{titleX:l,titleY:c,maxWidth:h,rotation:u}=function(t,e,n,s){const{top:i,left:r,bottom:o,right:a}=t;let l,c,h,u=0;return t.isHorizontal()?(c=Hu(s,r,a),h=Km(t,n,e),l=a-r):(c=Km(t,n,e),h=Hu(s,o,i),u="left"===n?-_d:_d),{titleX:c,titleY:h,maxWidth:l,rotation:u}}(this,a,e,o);Ip(t,n.text,0,0,i,{color:n.color,maxWidth:h,rotation:u,textAlign:tg(o,e,s),textBaseline:"middle",translation:[l,c]})}draw(t){const e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const t=this,e=t.options,n=e.ticks&&e.ticks.z||0,s=e.grid&&e.grid.z||0;return t._isVisible()&&t.draw===eg.prototype.draw?[{z:s,draw(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:s+1,draw(){t.drawBorder()}},{z:n,draw(e){t.drawLabels(e)}}]:[{z:n,draw(e){t.draw(e)}}]}getMatchingVisibleMetas(t){const e=this,n=e.chart.getSortedVisibleDatasetMetas(),s=e.axis+"AxisID",i=[];let r,o;for(r=0,o=n.length;r<o;++r){const o=n[r];o[s]!==e.id||t&&o.type!==t||i.push(o)}return i}_resolveTickFontOptions(t){return Bp(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this,e=t._resolveTickFontOptions(0).lineHeight;return(t.isHorizontal()?t.width:t.height)/e}}class ng{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=this,n=Object.getPrototypeOf(t);let s;(function(t){return"id"in t&&"defaults"in t})(n)&&(s=e.register(n));const i=e.items,r=t.id,o=e.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in i||(i[r]=t,function(t,e,n){const s=id(Object.create(null),[n?bp.get(n):{},bp.get(e),t.defaults]);bp.set(e,s),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(n=>{const s=n.split("."),i=s.pop(),r=[t].concat(s).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");bp.route(r,i,l,a)})}(e,t.defaultRoutes),t.descriptors&&bp.describe(e,t.descriptors)}(t,o,s),e.override&&bp.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,s=this.scope;n in e&&delete e[n],s&&n in bp[s]&&(delete bp[s][n],this.override&&delete mp[n])}}var sg=new class{constructor(){this.controllers=new ng(Qf,"datasets",!0),this.elements=new ng(qm,"elements"),this.plugins=new ng(Object,"plugins"),this.scales=new ng(eg,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){const s=this;[...e].forEach(e=>{const i=n||s._getRegistryForType(e);n||i.isForType(e)||i===s.plugins&&e.id?s._exec(t,i,e):Ju(e,e=>{const i=n||s._getRegistryForType(e);s._exec(t,i,e)})})}_exec(t,e,n){const s=cd(t);Gu(n["before"+s],[],n),e[t](n),Gu(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const s=e.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+n+".");return s}};class ig{constructor(){this._init=[]}notify(t,e,n,s){const i=this;"beforeInit"===e&&(i._init=i._createDescriptors(t,!0),i._notify(i._init,t,"install"));const r=s?i._descriptors(t).filter(s):i._descriptors(t),o=i._notify(r,t,e,n);return"destroy"===e&&(i._notify(r,t,"stop"),i._notify(i._init,t,"uninstall")),o}_notify(t,e,n,s){s=s||{};for(const i of t){const t=i.plugin;if(!1===Gu(t[n],[e,s,i.options],t)&&s.cancelable)return!1}return!0}invalidate(){qu(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 n=t&&t.config,s=Qu(n.options&&n.options.plugins,{}),i=function(t){const e=[],n=Object.keys(sg.plugins.items);for(let i=0;i<n.length;i++)e.push(sg.getPlugin(n[i]));const s=t.plugins||[];for(let i=0;i<s.length;i++){const t=s[i];-1===e.indexOf(t)&&e.push(t)}return e}(n);return!1!==s||e?function(t,e,n,s){const i=[],r=t.getContext();for(let o=0;o<e.length;o++){const a=e[o],l=rg(n[a.id],s);null!==l&&i.push({plugin:a,options:og(t.config,a,l,r)})}return i}(t,i,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,s=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}}function rg(t,e){return e||!1!==t?!0===t?{}:t:null}function og(t,e,n,s){const i=t.pluginScopeKeys(e),r=t.getOptionScopes(n,i);return t.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ag(t,e){return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||(bp.datasets[t]||{}).indexAxis||"x"}function lg(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(n=e.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.charAt(0).toLowerCase();var n}function cg(t){const e=t.options||(t.options={});e.plugins=Qu(e.plugins,{}),e.scales=function(t,e){const n=mp[t.type]||{scales:{}},s=e.scales||{},i=ag(t.type,e),r=Object.create(null),o=Object.create(null);return Object.keys(s).forEach(t=>{const e=s[t],a=lg(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,i),c=n.scales||{};r[a]=r[a]||t,o[t]=rd(Object.create(null),[{axis:a},e,c[a],c[l]])}),t.data.datasets.forEach(n=>{const i=n.type||t.type,a=n.indexAxis||ag(i,e),l=(mp[i]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,a),i=n[e+"AxisID"]||r[e]||e;o[i]=o[i]||Object.create(null),rd(o[i],[{axis:e},s[i],l[t]])})}),Object.keys(o).forEach(t=>{const e=o[t];rd(e,[bp.scales[e.type],bp.scale])}),o}(t,e)}function hg(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const ug=new Map,dg=new Set;function pg(t,e){let n=ug.get(t);return n||(n=e(),ug.set(t,n),dg.add(n)),n}const fg=(t,e,n)=>{const s=ld(e,n);void 0!==s&&t.add(s)};class mg{constructor(t){this._config=function(t){return(t=t||{}).data=hg(t.data),cg(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}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=hg(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(),cg(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return pg(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return pg(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return pg(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return pg(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let s=n.get(t);return s&&!e||(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){const{options:s,type:i}=this,r=this._cachedScopes(t,n),o=r.get(e);if(o)return o;const a=new Set;e.forEach(e=>{t&&(a.add(t),e.forEach(e=>fg(a,t,e))),e.forEach(t=>fg(a,s,t)),e.forEach(t=>fg(a,mp[i]||{},t)),e.forEach(t=>fg(a,bp,t)),e.forEach(t=>fg(a,gp,t))});const l=[...a];return dg.has(e)&&r.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,mp[e]||{},bp.datasets[e]||{},{type:e},bp,gp]}resolveNamedOptions(t,e,n,s=[""]){const i={$shared:!0},{resolver:r,subPrefixes:o}=gg(this._resolverCache,t,s);let a=r;(function(t,e){const{isScriptable:n,isIndexable:s}=Kp(t);for(const i of e)if(n(i)&&ud(t[i])||s(i)&&Uu(t[i]))return!0;return!1})(r,e)&&(i.$shared=!1,a=Yp(r,n=ud(n)?n():n,this.createResolver(t,n,o)));for(const l of e)i[l]=a[l];return i}createResolver(t,e,n=[""],s){const{resolver:i}=gg(this._resolverCache,t,n);return Zu(e)?Yp(i,e,void 0,s):i}}function gg(t,e,n){let s=t.get(e);s||(s=new Map,t.set(e,s));const i=n.join();let r=s.get(i);return r||(r={resolver:Zp(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},s.set(i,r)),r}const _g=["top","bottom","left","right","chartArea"];function yg(t,e){return"top"===t||"bottom"===t||-1===_g.indexOf(t)&&"x"===e}function bg(t,e){return function(n,s){return n[t]===s[t]?n[e]-s[e]:n[t]-s[t]}}function vg(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Gu(n&&n.onComplete,[t],e)}function xg(t){const e=t.chart,n=e.options.animation;Gu(n&&n.onProgress,[t],e)}function wg(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Sg(t){return wg()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Eg={},kg=t=>{const e=Sg(t);return Object.values(Eg).filter(t=>t.canvas===e).pop()};class Cg{constructor(t,e){const n=this;this.config=e=new mg(e);const s=Sg(t),i=kg(s);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas can be reused.");const r=e.createResolver(e.chartOptionScopes(),n.getContext());this.platform=n._initializePlatform(s,e);const o=n.platform.acquireContext(s,r.aspectRatio),a=o&&o.canvas,l=a&&a.height,c=a&&a.width;this.id=Wu(),this.ctx=o,this.canvas=a,this.width=c,this.height=l,this._options=r,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.scale=void 0,this._plugins=new ig,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(){return e?(clearTimeout(n),n=setTimeout(t,e)):t(),e}}(()=>this.update("resize"),r.resizeDelay||0),Eg[n.id]=n,o&&a?(Mf.listen(n,"complete",vg),Mf.listen(n,"progress",xg),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:i}=this;return qu(t)?e&&i?i:s?n/s: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(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():bf(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,e){return e.platform?new e.platform:!wg()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?new Am:new Wm}clear(){return Sp(this.canvas,this.ctx),this}stop(){return Mf.stop(this),this}resize(t,e){Mf.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this,s=n.options,i=n.platform.getMaximumSize(n.canvas,t,e,s.maintainAspectRatio&&n.aspectRatio),r=s.devicePixelRatio||n.platform.getDevicePixelRatio();n.width=i.width,n.height=i.height,n._aspectRatio=n.aspectRatio,bf(n,r,!0)&&(n.notifyPlugins("resize",{size:i}),Gu(s.onResize,[n,i],n),n.attached&&n._doResize()&&n.render())}ensureScalesHaveIDs(){Ju(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this,e=t.options,n=e.scales,s=t.scales,i=Object.keys(s).reduce((t,e)=>(t[e]=!1,t),{});let r=[];n&&(r=r.concat(Object.keys(n).map(t=>{const e=n[t],s=lg(t,e),i="r"===s,r="x"===s;return{options:e,dposition:i?"chartArea":r?"bottom":"left",dtype:i?"radialLinear":r?"category":"linear"}}))),Ju(r,n=>{const r=n.options,o=r.id,a=lg(o,r),l=Qu(r.type,n.dtype);void 0!==r.position&&yg(r.position,a)===yg(n.dposition)||(r.position=n.dposition),i[o]=!0;let c=null;o in s&&s[o].type===l?c=s[o]:(c=new(sg.getScale(l))({id:o,type:l,ctx:t.ctx,chart:t}),s[c.id]=c),c.init(r,e)}),Ju(i,(t,e)=>{t||delete s[e]}),Ju(s,e=>{Pm.configure(t,e,e.options),Pm.addBox(t,e)})}_updateMetasets(){const t=this,e=t._metasets,n=t.data.datasets.length,s=e.length;if(e.sort((t,e)=>t.index-e.index),s>n){for(let e=n;e<s;++e)t._destroyDatasetMeta(e);e.splice(n,s-n)}t._sortedMetasets=e.slice(0).sort(bg("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:e,data:{datasets:n}}=t;e.length>n.length&&delete t._stacks,e.forEach((e,s)=>{0===n.filter(t=>t===e._dataset).length&&t._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=this,e=[],n=t.data.datasets;let s,i;for(t._removeUnreferencedMetasets(),s=0,i=n.length;s<i;s++){const i=n[s];let r=t.getDatasetMeta(s);const o=i.type||t.config.type;if(r.type&&r.type!==o&&(t._destroyDatasetMeta(s),r=t.getDatasetMeta(s)),r.type=o,r.indexAxis=i.indexAxis||ag(o,t.options),r.order=i.order||0,r.index=s,r.label=""+i.label,r.visible=t.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const n=sg.getController(o),{datasetElementType:i,dataElementType:a}=bp.datasets[o];Object.assign(n.prototype,{dataElementType:sg.getElement(a),datasetElementType:i&&sg.getElement(i)}),r.controller=new n(t,s),e.push(r.controller)}}return t._updateMetasets(),e}_resetElements(){const t=this;Ju(t.data.datasets,(e,n)=>{t.getDatasetMeta(n).controller.reset()},t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,n=e.config;n.update(),e._options=n.createResolver(n.chartOptionScopes(),e.getContext()),Ju(e.scales,t=>{Pm.removeBox(e,t)});const s=e._animationsDisabled=!e.options.animation;if(e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),((t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0})(new Set(Object.keys(e._listeners)),new Set(e.options.events))&&!!this._responsiveListeners===e.options.responsive||(e.unbindEvents(),e.bindEvents()),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const i=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let r=0;for(let o=0,a=e.data.datasets.length;o<a;o++){const{controller:t}=e.getDatasetMeta(o),n=!s&&-1===i.indexOf(t);t.buildOrUpdateElements(n),r=Math.max(+t.getMaxOverflow(),r)}e._minPadding=r,e._updateLayout(r),s||Ju(i,t=>{t.reset()}),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(bg("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;Pm.update(e,e.width,e.height,t);const n=e.chartArea,s=n.width<=0||n.height<=0;e._layers=[],Ju(e.boxes,t=>{s&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))},e),e._layers.forEach((t,e)=>{t._idx=e}),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,n="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let s=0,i=e.data.datasets.length;s<i;++s)e._updateDataset(s,n?t({datasetIndex:s}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this,s=n.getDatasetMeta(t),i={meta:s,index:t,mode:e,cancelable:!0};!1!==n.notifyPlugins("beforeDatasetUpdate",i)&&(s.controller._update(e),i.cancelable=!1,n.notifyPlugins("afterDatasetUpdate",i))}render(){const t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(Mf.has(t)?t.attached&&!Mf.running(t)&&Mf.start(t):(t.draw(),vg({chart:t})))}draw(){const t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:n}=t._resizeBeforeDraw;t._resize(e,n),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0)return;if(!1===t.notifyPlugins("beforeDraw",{cancelable:!0}))return;const n=t._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(t.chartArea);for(t._drawDatasets();e<n.length;++e)n[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let s,i;for(s=0,i=e.length;s<i;++s){const i=e[s];t&&!i.visible||n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(!1===t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=t.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)t._drawDataset(e[n]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,n=e.ctx,s=t._clip,i=e.chartArea,r={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",r)&&(Cp(n,{left:!1===s.left?0:i.left-s.left,right:!1===s.right?e.width:i.right+s.right,top:!1===s.top?0:i.top-s.top,bottom:!1===s.bottom?e.height:i.bottom+s.bottom}),t.controller.draw(),Tp(n),r.cancelable=!1,e.notifyPlugins("afterDatasetDraw",r))}getElementsAtEventForMode(t,e,n,s){const i=ym.modes[e];return"function"==typeof i?i(this,t,n,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let s=n.filter(t=>t&&t._dataset===e).pop();return s||(s={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},n.push(s)),s}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.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]}_updateDatasetVisibility(t,e){const n=this,s=e?"show":"hide",i=n.getDatasetMeta(t),r=i.controller._resolveAnimations(void 0,s);n.setDatasetVisibility(t,e),r.update(i,{visible:e}),n.update(e=>e.datasetIndex===t?s:void 0)}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const e=this,n=e._metasets&&e._metasets[t];n&&n.controller&&(n.controller._destroy(),delete e._metasets[t])}destroy(){const t=this,{canvas:e,ctx:n}=t;let s,i;for(t.stop(),Mf.remove(t),s=0,i=t.data.datasets.length;s<i;++s)t._destroyDatasetMeta(s);t.config.clearCache(),e&&(t.unbindEvents(),Sp(e,n),t.platform.releaseContext(n),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete Eg[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this,e=t._listeners,n=t.platform,s=function(e,n,s){e.offsetX=n,e.offsetY=s,t._eventHandler(e)};Ju(t.options.events,i=>((s,i)=>{n.addEventListener(t,s,i),e[s]=i})(i,s))}bindResponsiveEvents(){const t=this;t._responsiveListeners||(t._responsiveListeners={});const e=t._responsiveListeners,n=t.platform,s=(s,i)=>{n.addEventListener(t,s,i),e[s]=i},i=(s,i)=>{e[s]&&(n.removeEventListener(t,s,i),delete e[s])},r=(e,n)=>{t.canvas&&t.resize(e,n)};let o;const a=()=>{i("attach",a),t.attached=!0,t.resize(),s("resize",r),s("detach",o)};o=()=>{t.attached=!1,i("resize",r),s("attach",a)},n.isAttached(t.canvas)?a():o()}unbindEvents(){const t=this;Ju(t._listeners,(e,n)=>{t.platform.removeEventListener(t,n,e)}),t._listeners={},Ju(t._responsiveListeners,(e,n)=>{t.platform.removeEventListener(t,n,e)}),t._responsiveListeners=void 0}updateHoverStyle(t,e,n){const s=n?"set":"remove";let i,r,o,a;for("dataset"===e&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+s+"DatasetHoverStyle"]()),o=0,a=t.length;o<a;++o){r=t[o];const e=r&&this.getDatasetMeta(r.datasetIndex).controller;e&&e[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this,n=e._active||[],s=t.map(({datasetIndex:t,index:n})=>{const s=e.getDatasetMeta(t);if(!s)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:s.data[n],index:n}});!td(s,n)&&(e._active=s,e._updateHoverStyles(s,n))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}_updateHoverStyles(t,e,n){const s=this,i=s.options.hover,r=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),o=r(e,t),a=n?t:r(t,e);o.length&&s.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&s.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,e){const n=this,s={event:t,replay:e,cancelable:!0},i=e=>(e.options.events||this.options.events).includes(t.type);if(!1===n.notifyPlugins("beforeEvent",s,i))return;const r=n._handleEvent(t,e);return s.cancelable=!1,n.notifyPlugins("afterEvent",s,i),(r||s.changed)&&n.render(),n}_handleEvent(t,e){const n=this,{_active:s=[],options:i}=n,r=i.hover;let o=[],a=!1,l=null;return"mouseout"!==t.type&&(o=n.getElementsAtEventForMode(t,r.mode,r,e),l="click"===t.type?n._lastEvent:t),n._lastEvent=null,kp(t,n.chartArea,n._minPadding)&&(Gu(i.onHover,[t,o,n],n),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Gu(i.onClick,[t,o,n],n)),a=!td(o,s),(a||e)&&(n._active=o,n._updateHoverStyles(o,s,e)),n._lastEvent=l,a}}const Tg=()=>Ju(Cg.instances,t=>t._plugins.invalidate()),Og=!0;function Pg(t,e,n){const{startAngle:s,pixelMargin:i,x:r,y:o,outerRadius:a,innerRadius:l}=e;let c=i/a;t.beginPath(),t.arc(r,o,a,s-c,n+c),l>i?(c=i/l,t.arc(r,o,l,n+c,s-c,!0)):t.arc(r,o,i,n+_d,s-_d),t.closePath(),t.clip()}function Ig(t,e,n,s){return{x:n+t*Math.cos(e),y:s+t*Math.sin(e)}}function Ag(t,e,n,s){const{x:i,y:r,startAngle:o,pixelMargin:a,innerRadius:l}=e,c=Math.max(e.outerRadius+n-a,0),h=l>0?l+n+a:0,u=s-o,d=(u-Math.max(.001,u*c-n/dd)/c)/2,p=o+d,f=s-d,{outerStart:m,outerEnd:g,innerStart:_,innerEnd:y}=function(t,e,n,s){const i=Fp(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),r=(n-e)/2,o=Math.min(r,s*e/2),a=t=>{const e=(n-Math.min(r,t))*s/2;return Md(t,0,Math.min(r,e))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Md(i.innerStart,0,o),innerEnd:Md(i.innerEnd,0,o)}}(e,h,c,f-p),b=c-m,v=c-g,x=p+m/b,w=f-g/v,S=h+_,E=h+y,k=p+_/S,C=f-y/E;if(t.beginPath(),t.arc(i,r,c,x,w),g>0){const e=Ig(v,w,i,r);t.arc(e.x,e.y,g,w,f+_d)}const T=Ig(E,f,i,r);if(t.lineTo(T.x,T.y),y>0){const e=Ig(E,C,i,r);t.arc(e.x,e.y,y,f+_d,C+Math.PI)}if(t.arc(i,r,h,f-y/h,p+_/h,!0),_>0){const e=Ig(S,k,i,r);t.arc(e.x,e.y,_,k+Math.PI,p-_d)}const O=Ig(b,p,i,r);if(t.lineTo(O.x,O.y),m>0){const e=Ig(b,x,i,r);t.arc(e.x,e.y,m,p-_d,x)}t.closePath()}Object.defineProperties(Cg,{defaults:{enumerable:Og,value:bp},instances:{enumerable:Og,value:Eg},overrides:{enumerable:Og,value:mp},registry:{enumerable:Og,value:sg},version:{enumerable:Og,value:"3.3.2"},getChart:{enumerable:Og,value:kg},register:{enumerable:Og,value:(...t)=>{sg.add(...t),Tg()}},unregister:{enumerable:Og,value:(...t)=>{sg.remove(...t),Tg()}}});class Rg extends qm{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,n){const s=this.getProps(["x","y"],n),{angle:i,distance:r}=function(t,e){const n=e.x-t.x,s=e.y-t.y,i=Math.sqrt(n*n+s*s);let r=Math.atan2(s,n);return r<-.5*dd&&(r+=pd),{angle:r,distance:i}}(s,{x:t,y:e}),{startAngle:o,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n);return(h>=pd||Rd(i,o,a))&&r>=l&&r<=c}getCenterPoint(t){const{x:e,y:n,startAngle:s,endAngle:i,innerRadius:r,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),a=(s+i)/2,l=(r+o)/2;return{x:e+Math.cos(a)*l,y:n+Math.sin(a)*l}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,{options:n,circumference:s}=e,i=(n.offset||0)/2;if(e.pixelMargin="inner"===n.borderAlign?.33:0,e.fullCircles=s>pd?Math.floor(s/pd):0,0===s||e.innerRadius<0||e.outerRadius<0)return;t.save();let r=0;if(i){r=i/2;const n=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(n)*r,Math.sin(n)*r),e.circumference>=dd&&(r=i)}t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor;const o=function(t,e,n){const{fullCircles:s,startAngle:i,circumference:r}=e;let o=e.endAngle;if(s){Ag(t,e,n,i+pd);for(let e=0;e<s;++e)t.fill();isNaN(r)||(o=i+r%pd,r%pd==0&&(o+=pd))}return Ag(t,e,n,o),t.fill(),o}(t,e,r);(function(t,e,n,s){const{options:i}=e,r="inner"===i.borderAlign;i.borderWidth&&(r?(t.lineWidth=2*i.borderWidth,t.lineJoin="round"):(t.lineWidth=i.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,n){const{x:s,y:i,startAngle:r,pixelMargin:o,fullCircles:a}=e,l=Math.max(e.outerRadius-o,0),c=e.innerRadius+o;let h;for(n&&Pg(t,e,r+pd),t.beginPath(),t.arc(s,i,c,r+pd,r,!0),h=0;h<a;++h)t.stroke();for(t.beginPath(),t.arc(s,i,l,r,r+pd),h=0;h<a;++h)t.stroke()}(t,e,r),r&&Pg(t,e,s),Ag(t,e,n,s),t.stroke())})(t,e,r,o),t.restore()}}function Mg(t,e,n=e){t.lineCap=Qu(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Qu(n.borderDash,e.borderDash)),t.lineDashOffset=Qu(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Qu(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Qu(n.borderWidth,e.borderWidth),t.strokeStyle=Qu(n.borderColor,e.borderColor)}function Dg(t,e,n){t.lineTo(n.x,n.y)}function Fg(t,e,n={}){const s=t.length,{start:i=0,end:r=s-1}=n,{start:o,end:a}=e,l=Math.max(i,o),c=Math.min(r,a);return{count:s,start:l,loop:e.loop,ilen:c<l&&!(i<o&&r<o||i>a&&r>a)?s+c-l:c-l}}function Lg(t,e,n,s){const{points:i,options:r}=e,{count:o,start:a,loop:l,ilen:c}=Fg(i,n,s),h=function(t){return t.stepped?Op:t.tension||"monotone"===t.cubicInterpolationMode?Pp:Dg}(r);let u,d,p,{move:f=!0,reverse:m}=s||{};for(u=0;u<=c;++u)d=i[(a+(m?c-u:u))%o],d.skip||(f?(t.moveTo(d.x,d.y),f=!1):h(t,p,d,m,r.stepped),p=d);return l&&(d=i[(a+(m?c:0))%o],h(t,p,d,m,r.stepped)),!!l}function Ng(t,e,n,s){const i=e.points,{count:r,start:o,ilen:a}=Fg(i,n,s),{move:l=!0,reverse:c}=s||{};let h,u,d,p,f,m,g=0,_=0;const y=t=>(o+(c?a-t:t))%r,b=()=>{p!==f&&(t.lineTo(g,f),t.lineTo(g,p),t.lineTo(g,m))};for(l&&(u=i[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=i[y(h)],u.skip)continue;const e=u.x,n=u.y,s=0|e;s===d?(n<p?p=n:n>f&&(f=n),g=(_*g+e)/++_):(b(),t.lineTo(e,n),d=s,_=0,p=f=n),m=n}b()}function jg(t){const e=t.options;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||e.borderDash&&e.borderDash.length?Lg:Ng}Rg.id="arc",Rg.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,angle:void 0},Rg.defaultRoutes={backgroundColor:"backgroundColor"};const Bg="function"==typeof Path2D;class Vg extends qm{constructor(t){super(),this.animated=!0,this.options=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,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this,s=n.options;!s.tension&&"monotone"!==s.cubicInterpolationMode||s.stepped||n._pointsUpdated||(function(t,e,n,s,i){let r,o,a,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const n=cf(e),s=t.length,i=Array(s).fill(0),r=Array(s);let o,a,l,c=lf(t,0);for(o=0;o<s;++o)if(a=l,l=c,c=lf(t,o+1),l){if(c){const t=c[e]-l[e];i[o]=0!==t?(c[n]-l[n])/t:0}r[o]=a?c?xd(i[o-1])!==xd(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}!function(t,e,n){const s=t.length;let i,r,o,a,l,c=lf(t,0);for(let h=0;h<s-1;++h)l=c,c=lf(t,h+1),l&&c&&(Ed(e[h],0,af)?n[h]=n[h+1]=0:(i=n[h]/e[h],r=n[h+1]/e[h],a=Math.pow(i,2)+Math.pow(r,2),a<=9||(o=3/Math.sqrt(a),n[h]=i*o*e[h],n[h+1]=r*o*e[h])))}(t,i,r),function(t,e,n="x"){const s=cf(n),i=t.length;let r,o,a,l=lf(t,0);for(let c=0;c<i;++c){if(o=a,a=l,l=lf(t,c+1),!a)continue;const i=a[n],h=a[s];o&&(r=(i-o[n])/3,a[`cp1${n}`]=i-r,a[`cp1${s}`]=h-r*e[c]),l&&(r=(l[n]-i)/3,a[`cp2${n}`]=i+r,a[`cp2${s}`]=h+r*e[c])}}(t,r,e)}(t,i);else{let n=s?t[t.length-1]:t[0];for(r=0,o=t.length;r<o;++r)a=t[r],l=hf(n,a,t[Math.min(r+1,o-(s?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,n=a}e.capBezierPoints&&function(t,e){let n,s,i,r,o,a=kp(t[0],e);for(n=0,s=t.length;n<s;++n)o=r,r=a,a=n<s-1&&kp(t[n+1],e),r&&(i=t[n],o&&(i.cp1x=uf(i.cp1x,e.left,e.right),i.cp1y=uf(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=uf(i.cp2x,e.left,e.right),i.cp2y=uf(i.cp2y,e.top,e.bottom)))}(t,n)}(n._points,s,t,s.spanGaps?n._loop:n._fullLoop,e),n._pointsUpdated=!0)}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,s=t.options.spanGaps,i=n.length;if(!i)return[];const r=!!t._loop,{start:o,end:a}=function(t,e,n,s){let i=0,r=e-1;if(n&&!s)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(r+=i);r>i&&t[r%e].skip;)r--;return r%=e,{start:i,end:r}}(n,i,r,s);return function(t,e,n){return n&&n.setContext&&e?function(t,e,n){const s=e.length,i=[];let r=t[0].start,o=r;for(const l of t){let t,c,h=e[r%s];for(o=r+1;o<=l.end;o++){const u=e[o%s];c={backgroundColor:(a=n.setContext({type:"segment",p0:h,p1:u})).backgroundColor,borderCapStyle:a.borderCapStyle,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderJoinStyle:a.borderJoinStyle,borderWidth:a.borderWidth,borderColor:a.borderColor},Rf(c,t)&&(i.push({start:r,end:o-1,loop:l.loop,style:t}),t=c,r=o-1),h=u,t=c}r<o-1&&(i.push({start:r,end:o-1,loop:l.loop,style:c}),r=o-1)}var a;return i}(t,e,n):t}(!0===s?[{start:o,end:a,loop:r}]:function(t,e,n,s){const i=t.length,r=[];let o,a=e,l=t[e];for(o=e+1;o<=n;++o){const n=t[o%i];n.skip||n.stop?l.skip||(r.push({start:e%i,end:(o-1)%i,loop:s=!1}),e=a=n.stop?o:null):(a=o,l.skip&&(e=o)),l=n}return null!==a&&r.push({start:e%i,end:a%i,loop:s}),r}(n,o,a<o?a+i:a,!!t._fullLoop&&0===o&&a===i-1),n,e)}(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,e=t.length;return e&&this.points[t[e-1].end]}interpolate(t,e){const n=this,s=n.options,i=t[e],r=n.points,o=Af(n,{property:e,start:i,end:i});if(!o.length)return;const a=[],l=function(t){return t.stepped?Sf:t.tension||"monotone"===t.cubicInterpolationMode?Ef:wf}(s);let c,h;for(c=0,h=o.length;c<h;++c){const{start:n,end:h}=o[c],u=r[n],d=r[h];if(u===d){a.push(u);continue}const p=l(u,d,Math.abs((i-u[e])/(d[e]-u[e])),s.stepped);p[e]=t[e],a.push(p)}return 1===a.length?a[0]:a}pathSegment(t,e,n){return jg(this)(t,this,e,n)}path(t,e,n){const s=this,i=s.segments,r=jg(s);let o=s._loop;e=e||0,n=n||s.points.length-e;for(const a of i)o&=r(t,s,a,{start:e,end:e+n-1});return!!o}draw(t,e,n,s){const i=this;(i.points||[]).length&&(i.options||{}).borderWidth&&(t.save(),function(t,e,n,s){Bg&&1===e.segments.length?function(t,e,n,s){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,s)&&i.closePath()),Mg(t,e.options),t.stroke(i)}(t,e,n,s):function(t,e,n,s){const{segments:i,options:r}=e,o=jg(e);for(const a of i)Mg(t,r,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+s-1})&&t.closePath(),t.stroke()}(t,e,n,s)}(t,i,n,s),t.restore(),i.animated&&(i._pointsUpdated=!1,i._path=void 0))}}function zg(t,e,n,s){const i=t.options,{[n]:r}=t.getProps([n],s);return Math.abs(e-r)<i.radius+i.hitRadius}Vg.id="line",Vg.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Vg.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Vg.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Hg extends qm{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,n){const s=this.options,{x:i,y:r}=this.getProps(["x","y"],n);return Math.pow(t-i,2)+Math.pow(e-r,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return zg(this,t,"x",e)}inYRange(t,e){return zg(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}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){const e=this,n=e.options;e.skip||n.radius<.1||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Ep(t,n,e.x,e.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function $g(t,e){const{x:n,y:s,base:i,width:r,height:o}=t.getProps(["x","y","base","width","height"],e);let a,l,c,h,u;return t.horizontal?(u=o/2,a=Math.min(n,i),l=Math.max(n,i),c=s-u,h=s+u):(u=r/2,a=n-u,l=n+u,c=Math.min(s,i),h=Math.max(s,i)),{left:a,top:c,right:l,bottom:h}}function Wg(t){let e=t.options.borderSkipped;const n={};return e?(e=t.horizontal?qg(e,"left","right",t.base>t.x):qg(e,"bottom","top",t.base<t.y),n[e]=!0,n):n}function qg(t,e,n,s){var i,r,o;return s?(o=n,t=Ug(t=(i=t)===(r=e)?o:i===o?r:i,n,e)):t=Ug(t,e,n),t}function Ug(t,e,n){return"start"===t?e:"end"===t?n:t}function Zg(t,e,n,s){return t?0:Math.max(Math.min(e,s),n)}function Yg(t,e,n,s){const i=null===e,r=null===n,o=t&&!(i&&r)&&$g(t,s);return o&&(i||e>=o.left&&e<=o.right)&&(r||n>=o.top&&n<=o.bottom)}function Kg(t,e){t.rect(e.x,e.y,e.w,e.h)}Hg.id="point",Hg.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Hg.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Qg extends qm{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:n,outer:s}=function(t){const e=$g(t),n=e.right-e.left,s=e.bottom-e.top,i=function(t,e,n){const s=t.options.borderWidth,i=Wg(t),r=Lp(s);return{t:Zg(i.top,r.top,0,n),r:Zg(i.right,r.right,0,e),b:Zg(i.bottom,r.bottom,0,n),l:Zg(i.left,r.left,0,e)}}(t,n/2,s/2),r=function(t,e,n){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,r=Np(i),o=Math.min(e,n),a=Wg(t),l=s||Zu(i);return{topLeft:Zg(!l||a.top||a.left,r.topLeft,0,o),topRight:Zg(!l||a.top||a.right,r.topRight,0,o),bottomLeft:Zg(!l||a.bottom||a.left,r.bottomLeft,0,o),bottomRight:Zg(!l||a.bottom||a.right,r.bottomRight,0,o)}}(t,n/2,s/2);return{outer:{x:e.left,y:e.top,w:n,h:s,radius:r},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:s-i.t-i.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,r.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(i.b,i.r))}}}}(this),i=(r=s.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?Ap:Kg;var r;t.save(),s.w===n.w&&s.h===n.h||(t.beginPath(),i(t,s),t.clip(),i(t,n),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),i(t,n),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,n){return Yg(this,t,e,n)}inXRange(t,e){return Yg(this,t,null,e)}inYRange(t,e){return Yg(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:s,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(e+s)/2:e,y:i?n:(n+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}function Xg(t,e,n){const s=function(t){const e=t.options,n=e.fill;let s=Qu(n&&n.target,n);return void 0===s&&(s=!!e.backgroundColor),!1!==s&&null!==s&&(!0===s?"origin":s)}(t);if(Zu(s))return!isNaN(s.value)&&s;let i=parseFloat(s);return Yu(i)&&Math.floor(i)===i?("-"!==s[0]&&"+"!==s[0]||(i=e+i),!(i===e||i<0||i>=n)&&i):["origin","start","end","stack"].indexOf(s)>=0&&s}Qg.id="bar",Qg.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},Qg.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Gg{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:s,y:i,radius:r}=this;return t.arc(s,i,r,(e=e||{start:0,end:pd}).end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:s}=this,i=t.angle;return{x:e+Math.cos(i)*s,y:n+Math.sin(i)*s,angle:i}}}const Jg=t=>"line"===t.type&&!t.hidden;function t_(t,e,n){const s=[];for(let i=0;i<n.length;i++){const r=n[i],{first:o,last:a,point:l}=e_(r,e,"x");if(!(!l||o&&a))if(o)s.unshift(l);else if(t.push(l),!a)break}t.push(...s)}function e_(t,e,n){const s=t.interpolate(e,n);if(!s)return{};const i=s[n],r=t.segments,o=t.points;let a=!1,l=!1;for(let c=0;c<r.length;c++){const t=r[c],e=o[t.start][n],s=o[t.end][n];if(i>=e&&i<=s){a=i===e,l=i===s;break}}return{first:a,last:l,point:s}}function n_(t,e){let n=[],s=!1;return Uu(t)?(s=!0,n=t):n=function(t,e){const{x:n=null,y:s=null}=t||{},i=e.points,r=[];return e.segments.forEach(t=>{const e=i[t.start],o=i[t.end];null!==s?(r.push({x:e.x,y:s}),r.push({x:o.x,y:s})):null!==n&&(r.push({x:n,y:e.y}),r.push({x:n,y:o.y}))}),r}(t,e),n.length?new Vg({points:n,options:{tension:0},_loop:s,_fullLoop:s}):null}function s_(t,e,n){let s=t[e].fill;const i=[e];let r;if(!n)return s;for(;!1!==s&&-1===i.indexOf(s);){if(!Yu(s))return s;if(r=t[s],!r)return!1;if(r.visible)return s;i.push(s),s=r.fill}return!1}function i_(t,e,n){t.beginPath(),e.path(t),t.lineTo(e.last().x,n),t.lineTo(e.first().x,n),t.closePath(),t.clip()}function r_(t,e,n,s){if(s)return;let i=e[t],r=n[t];return"angle"===t&&(i=Ad(i),r=Ad(r)),{property:t,start:i,end:r}}function o_(t,e,n,s){return t&&e?s(t[n],e[n]):t?t[n]:e?e[n]:0}function a_(t,e,n){const{top:s,bottom:i}=e.chart.chartArea,{property:r,start:o,end:a}=n||{};"x"===r&&(t.beginPath(),t.rect(o,s,a-o,i-s),t.clip())}function l_(t,e,n,s){const i=e.interpolate(n,s);i&&t.lineTo(i.x,i.y)}function c_(t,e){const{line:n,target:s,property:i,color:r,scale:o}=e,a=function(t,e,n){const s=t.segments,i=t.points,r=e.points,o=[];for(const a of s){const t=r_(n,i[a.start],i[a.end],a.loop);if(!e.segments){o.push({source:a,target:t,start:i[a.start],end:i[a.end]});continue}const s=Af(e,t);for(const e of s){const s=r_(n,r[e.start],r[e.end],e.loop),l=If(a,i,s);for(const i of l)o.push({source:i,target:e,start:{[n]:o_(t,s,"start",Math.max)},end:{[n]:o_(t,s,"end",Math.min)}})}}return o}(n,s,i);for(const{source:l,target:c,start:h,end:u}of a){const{style:{backgroundColor:e=r}={}}=l;t.save(),t.fillStyle=e,a_(t,o,r_(i,h,u)),t.beginPath();const a=!!n.pathSegment(t,l);a?t.closePath():l_(t,s,u,i);const d=!!s.pathSegment(t,c,{move:a,reverse:!0}),p=a&&d;p||l_(t,s,h,i),t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function h_(t,e,n){const s=function(t){const{chart:e,fill:n,line:s}=t;if(Yu(n))return function(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}(e,n);if("stack"===n)return function(t){const{chart:e,scale:n,index:s,line:i}=t,r=[],o=i.segments,a=i.points,l=function(t,e){const n=[],s=t.getSortedVisibleDatasetMetas();for(let i=0;i<s.length;i++){const t=s[i];if(t.index===e)break;Jg(t)&&n.unshift(t.dataset)}return n}(e,s);l.push(n_({x:null,y:n.bottom},i));for(let c=0;c<o.length;c++){const t=o[c];for(let e=t.start;e<=t.end;e++)t_(r,a[e],l)}return new Vg({points:r,options:{}})}(t);const i=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:n}=t,s=e.options,i=e.getLabels().length,r=[],o=s.reverse?e.max:e.min;let a,l,c;if(c="start"===n?o:"end"===n?s.reverse?e.min:e.max:Zu(n)?n.value:e.getBaseValue(),s.grid.circular)return l=e.getPointPositionForValue(0,o),new Gg({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(c)});for(a=0;a<i;++a)r.push(e.getPointPositionForValue(a,c));return r}(t):function(t){const{scale:e={},fill:n}=t;let s,i=null;return"start"===n?i=e.bottom:"end"===n?i=e.top:Zu(n)?i=e.getPixelForValue(n.value):e.getBasePixel&&(i=e.getBasePixel()),Yu(i)?(s=e.isHorizontal(),{x:s?i:null,y:s?null:i}):null}(t)}(t);return i instanceof Gg?i:n_(i,s)}(e),{line:i,scale:r,axis:o}=e,a=i.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};s&&i.points.length&&(Cp(t,n),function(t,e){const{line:n,target:s,above:i,below:r,area:o,scale:a}=e,l=n._loop?"angle":e.axis;t.save(),"x"===l&&r!==i&&(i_(t,s,o.top),c_(t,{line:n,target:s,color:i,scale:a,property:l}),t.restore(),t.save(),i_(t,s,o.bottom)),c_(t,{line:n,target:s,color:r,scale:a,property:l}),t.restore()}(t,{line:i,target:s,above:h,below:u,area:n,scale:r,axis:o}),Tp(t))}var u_={id:"filler",afterDatasetsUpdate(t,e,n){const s=(t.data.datasets||[]).length,i=[];let r,o,a,l;for(o=0;o<s;++o)r=t.getDatasetMeta(o),a=r.dataset,l=null,a&&a.options&&a instanceof Vg&&(l={visible:t.isDatasetVisible(o),index:o,fill:Xg(a,o,s),chart:t,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=l,i.push(l);for(o=0;o<s;++o)l=i[o],l&&!1!==l.fill&&(l.fill=s_(i,o,n.propagate))},beforeDraw(t,e,n){const s="beforeDraw"===n.drawTime,i=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let o=i.length-1;o>=0;--o){const e=i[o].$filler;e&&(e.line.updateControlPoints(r,e.axis),s&&h_(t.ctx,e,r))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let i=s.length-1;i>=0;--i){const e=s[i].$filler;e&&h_(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,n){const s=e.meta.$filler;s&&!1!==s.fill&&"beforeDatasetDraw"===n.drawTime&&h_(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const d_={average(t){if(!t.length)return!1;let e,n,s=0,i=0,r=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();s+=t.x,i+=t.y,++r}}return{x:s/r,y:i/r}},nearest(t,e){if(!t.length)return!1;let n,s,i,r=e.x,o=e.y,a=Number.POSITIVE_INFINITY;for(n=0,s=t.length;n<s;++n){const s=t[n].element;if(s&&s.hasValue()){const t=Pd(e,s.getCenterPoint());t<a&&(a=t,i=s)}}if(i){const t=i.tooltipPosition();r=t.x,o=t.y}return{x:r,y:o}}};function p_(t,e){return e&&(Uu(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function f_(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function m_(t,e){const{element:n,datasetIndex:s,index:i}=e,r=t.getDatasetMeta(s).controller,{label:o,value:a}=r.getLabelAndValue(i);return{chart:t,label:o,parsed:r.getParsed(i),raw:t.data.datasets[s].data[i],formattedValue:a,dataset:r.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function g_(t,e){const n=t._chart.ctx,{body:s,footer:i,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=Bp(e.bodyFont),c=Bp(e.titleFont),h=Bp(e.footerFont),u=r.length,d=i.length,p=s.length,f=jp(e.padding);let m=f.height,g=0,_=s.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);_+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),_&&(m+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(_-p)*l.lineHeight+(_-1)*e.bodySpacing),d&&(m+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let y=0;const b=function(t){g=Math.max(g,n.measureText(t).width+y)};return n.save(),n.font=c.string,Ju(t.title,b),n.font=l.string,Ju(t.beforeBody.concat(t.afterBody),b),y=e.displayColors?o+2:0,Ju(s,t=>{Ju(t.before,b),Ju(t.lines,b),Ju(t.after,b)}),y=0,n.font=h.string,Ju(t.footer,b),n.restore(),g+=f.width,{width:g,height:m}}function __(t,e,n,s){const{x:i,width:r}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return"center"===s?c=i<=(a+l)/2?"left":"right":i<=r/2?c="left":i>=o-r/2&&(c="right"),function(t,e,n,s){const{x:i,width:r}=s,o=n.caretSize+n.caretPadding;return"left"===t&&i+r+o>e.width||"right"===t&&i-r-o<0||void 0}(c,t,e,n)&&(c="center"),c}function y_(t,e,n){const s=e.yAlign||function(t,e){const{y:n,height:s}=e;return n<s/2?"top":n>t.height-s/2?"bottom":"center"}(t,n);return{xAlign:e.xAlign||__(t,e,n,s),yAlign:s}}function b_(t,e,n,s){const{caretSize:i,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=i+r,h=o+r;let u=function(t,e){let{x:n,width:s}=t;return"right"===e?n-=s:"center"===e&&(n-=s/2),n}(e,a);const d=function(t,e,n){let{y:s,height:i}=t;return"top"===e?s+=n:s-="bottom"===e?i+n:i/2,s}(e,l,c);return"center"===l?"left"===a?u+=c:"right"===a&&(u-=c):"left"===a?u-=h:"right"===a&&(u+=h),{x:Md(u,0,s.width-e.width),y:Md(d,0,s.height-e.height)}}function v_(t,e,n){const s=jp(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function x_(t){return p_([],f_(t))}function w_(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}class S_ extends qm{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,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,e=t._cachedAnimations;if(e)return e;const n=t._chart,s=t.options.setContext(t.getContext()),i=s.enabled&&n.options.animation&&s.animations,r=new jf(t._chart,i);return i._cacheable&&(t._cachedAnimations=Object.freeze(r)),r}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),n=t,s=t._tooltipItems,Object.assign(Object.create(e),{tooltip:n,tooltipItems:s,type:"tooltip"})));var e,n,s}getTitle(t,e){const n=this,{callbacks:s}=e,i=s.beforeTitle.apply(n,[t]),r=s.title.apply(n,[t]),o=s.afterTitle.apply(n,[t]);let a=[];return a=p_(a,f_(i)),a=p_(a,f_(r)),a=p_(a,f_(o)),a}getBeforeBody(t,e){return x_(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const n=this,{callbacks:s}=e,i=[];return Ju(t,t=>{const e={before:[],lines:[],after:[]},r=w_(s,t);p_(e.before,f_(r.beforeLabel.call(n,t))),p_(e.lines,r.label.call(n,t)),p_(e.after,f_(r.afterLabel.call(n,t))),i.push(e)}),i}getAfterBody(t,e){return x_(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const n=this,{callbacks:s}=e,i=s.beforeFooter.apply(n,[t]),r=s.footer.apply(n,[t]),o=s.afterFooter.apply(n,[t]);let a=[];return a=p_(a,f_(i)),a=p_(a,f_(r)),a=p_(a,f_(o)),a}_createItems(t){const e=this,n=e._active,s=e._chart.data,i=[],r=[],o=[];let a,l,c=[];for(a=0,l=n.length;a<l;++a)c.push(m_(e._chart,n[a]));return t.filter&&(c=c.filter((e,n,i)=>t.filter(e,n,i,s))),t.itemSort&&(c=c.sort((e,n)=>t.itemSort(e,n,s))),Ju(c,n=>{const s=w_(t.callbacks,n);i.push(s.labelColor.call(e,n)),r.push(s.labelPointStyle.call(e,n)),o.push(s.labelTextColor.call(e,n))}),e.labelColors=i,e.labelPointStyles=r,e.labelTextColors=o,e.dataPoints=c,c}update(t,e){const n=this,s=n.options.setContext(n.getContext()),i=n._active;let r,o=[];if(i.length){const t=d_[s.position].call(n,i,n._eventPosition);o=n._createItems(s),n.title=n.getTitle(o,s),n.beforeBody=n.getBeforeBody(o,s),n.body=n.getBody(o,s),n.afterBody=n.getAfterBody(o,s),n.footer=n.getFooter(o,s);const e=n._size=g_(n,s),a=Object.assign({},t,e),l=y_(n._chart,s,a),c=b_(s,a,l,n._chart);n.xAlign=l.xAlign,n.yAlign=l.yAlign,r={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==n.opacity&&(r={opacity:0});n._tooltipItems=o,n.$context=void 0,r&&n._resolveAnimations().update(n,r),t&&s.external&&s.external.call(n,{chart:n._chart,tooltip:n,replay:e})}drawCaret(t,e,n,s){const i=this.getCaretPosition(t,n,s);e.lineTo(i.x1,i.y1),e.lineTo(i.x2,i.y2),e.lineTo(i.x3,i.y3)}getCaretPosition(t,e,n){const{xAlign:s,yAlign:i}=this,{cornerRadius:r,caretSize:o}=n,{x:a,y:l}=t,{width:c,height:h}=e;let u,d,p,f,m,g;return"center"===i?(m=l+h/2,"left"===s?(u=a,d=u-o,f=m+o,g=m-o):(u=a+c,d=u+o,f=m-o,g=m+o),p=u):(d="left"===s?a+r+o:"right"===s?a+c-r-o:this.caretX,"top"===i?(f=l,m=f-o,u=d-o,p=d+o):(f=l+h,m=f+o,u=d+o,p=d-o),g=f),{x1:u,x2:d,x3:p,y1:f,y2:m,y3:g}}drawTitle(t,e,n){const s=this,i=s.title,r=i.length;let o,a,l;if(r){const c=Tf(n.rtl,s.x,s.width);for(t.x=v_(s,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",o=Bp(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=o.string,l=0;l<r;++l)e.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===r&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,s,i){const r=this,o=r.labelColors[n],a=r.labelPointStyles[n],{boxHeight:l,boxWidth:c}=i,h=Bp(i.bodyFont),u=v_(r,"left",i),d=s.x(u),p=e.y+(l<h.lineHeight?(h.lineHeight-l)/2:0);if(i.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=s.leftForLtr(d,c)+c/2,r=p+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,Ep(t,e,n,r),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Ep(t,e,n,r)}else{t.lineWidth=o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=s.leftForLtr(d,c),n=s.leftForLtr(s.xPlus(d,1),c-2),r=Np(o.borderRadius);Object.values(r).some(t=>0!==t)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,Ap(t,{x:e,y:p,w:c,h:l,radius:r}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Ap(t,{x:n,y:p+1,w:c-2,h:l-2,radius:r}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(e,p,c,l),t.strokeRect(e,p,c,l),t.fillStyle=o.backgroundColor,t.fillRect(n,p+1,c-2,l-2))}t.fillStyle=r.labelTextColors[n]}drawBody(t,e,n){const s=this,{body:i}=s,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c}=n,h=Bp(n.bodyFont);let u=h.lineHeight,d=0;const p=Tf(n.rtl,s.x,s.width),f=function(n){e.fillText(n,p.x(t.x+d),t.y+u/2),t.y+=u+r},m=p.textAlign(o);let g,_,y,b,v,x,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=v_(s,m,n),e.fillStyle=n.bodyColor,Ju(s.beforeBody,f),d=a&&"right"!==m?"center"===o?c/2+1:c+2:0,b=0,x=i.length;b<x;++b){for(g=i[b],_=s.labelTextColors[b],e.fillStyle=_,Ju(g.before,f),y=g.lines,a&&y.length&&(s._drawColorBox(e,t,b,p,n),u=Math.max(h.lineHeight,l)),v=0,w=y.length;v<w;++v)f(y[v]),u=h.lineHeight;Ju(g.after,f)}d=0,u=h.lineHeight,Ju(s.afterBody,f),t.y-=r}drawFooter(t,e,n){const s=this,i=s.footer,r=i.length;let o,a;if(r){const l=Tf(n.rtl,s.x,s.width);for(t.x=v_(s,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",o=Bp(n.footerFont),e.fillStyle=n.footerColor,e.font=o.string,a=0;a<r;++a)e.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,e,n,s){const{xAlign:i,yAlign:r}=this,{x:o,y:a}=t,{width:l,height:c}=n,h=s.cornerRadius;e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(o+h,a),"top"===r&&this.drawCaret(t,e,n,s),e.lineTo(o+l-h,a),e.quadraticCurveTo(o+l,a,o+l,a+h),"center"===r&&"right"===i&&this.drawCaret(t,e,n,s),e.lineTo(o+l,a+c-h),e.quadraticCurveTo(o+l,a+c,o+l-h,a+c),"bottom"===r&&this.drawCaret(t,e,n,s),e.lineTo(o+h,a+c),e.quadraticCurveTo(o,a+c,o,a+c-h),"center"===r&&"left"===i&&this.drawCaret(t,e,n,s),e.lineTo(o,a+h),e.quadraticCurveTo(o,a,o+h,a),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this,n=e._chart,s=e.$animations,i=s&&s.x,r=s&&s.y;if(i||r){const s=d_[t.position].call(e,e._active,e._eventPosition);if(!s)return;const o=e._size=g_(e,t),a=Object.assign({},s,e._size),l=y_(n,t,a),c=b_(t,a,l,n);i._to===c.x&&r._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=o.width,e.height=o.height,e.caretX=s.x,e.caretY=s.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,n=e.options.setContext(e.getContext());let s=e.opacity;if(!s)return;e._updateAnimationTarget(n);const i={width:e.width,height:e.height},r={x:e.x,y:e.y};s=Math.abs(s)<.001?0:s;const o=jp(n.padding);n.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=s,e.drawBackground(r,t,i,n),function(t,e){let n,s;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=s)}(t,n.textDirection),r.y+=o.top,e.drawTitle(r,t,n),e.drawBody(r,t,n),e.drawFooter(r,t,n),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this,s=n._active,i=t.map(({datasetIndex:t,index:e})=>{const s=n._chart.getDatasetMeta(t);if(!s)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:s.data[e],index:e}}),r=!td(s,i),o=n._positionChanged(i,e);(r||o)&&(n._active=i,n._eventPosition=e,n.update(!0))}handleEvent(t,e){const n=this,s=n.options,i=n._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=n._chart.getElementsAtEventForMode(t,s.mode,s,e),s.reverse&&o.reverse());const a=n._positionChanged(o,t);return r=e||!td(o,i)||a,r&&(n._active=o,(s.enabled||s.external)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0,e))),r}_positionChanged(t,e){const{caretX:n,caretY:s,options:i}=this,r=d_[i.position].call(this,t,e);return!1!==r&&(n!==r.x||s!==r.y)}}S_.positioners=d_;var E_={id:"tooltip",_element:S_,positioners:d_,afterInit(t,e,n){n&&(t.tooltip=new S_({_chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip,n={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",n)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n))},afterEvent(t,e){t.tooltip&&t.tooltip.handleEvent(e.event,e.replay)&&(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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!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:$u,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,s=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return n[e.dataIndex]}return""},afterTitle:$u,beforeBody:$u,beforeLabel:$u,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return qu(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:$u,afterBody:$u,beforeFooter:$u,footer:$u,afterFooter:$u}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};class k_ extends eg{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(qu(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:Md(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:function(t,e,n){const s=t.indexOf(e);return-1===s?((t,e,n)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:n)(t,e,n):s!==t.lastIndexOf(e)?n:s}(n,t,Qu(e,t)),n.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:n}=t.getUserBounds();let{min:s,max:i}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(s=0),n||(i=t.getLabels().length-1)),t.min=s,t.max=i}buildTicks(){const t=this,e=t.min,n=t.max,s=t.options.offset,i=[];let r=t.getLabels();r=0===e&&n===r.length-1?r:r.slice(e,n+1),t._valueRange=Math.max(r.length-(s?0:1),1),t._startValue=t.min-(s?.5:0);for(let o=e;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const e=this;return"number"!=typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}function C_(t,e,{horizontal:n,minRotation:s}){const i=Cd(s),r=(n?Math.sin(i):Math.cos(i))||.001;return Math.min(e/r,.75*e*(""+t).length)}k_.id="category",k_.defaults={ticks:{callback:k_.prototype.getLabelForValue}};class T_ extends eg{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 qu(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e}=t.options,{minDefined:n,maxDefined:s}=t.getUserBounds();let{min:i,max:r}=t;const o=t=>i=n?i:t,a=t=>r=s?r:t;if(e){const t=xd(i),e=xd(r);t<0&&e<0?a(0):t>0&&e>0&&o(0)}i===r&&(a(r+1),e||o(i-1)),t.min=i,t.max=r}getTickLimit(){const t=this,e=t.options.ticks;let n,{maxTicksLimit:s,stepSize:i}=e;return i?n=Math.ceil(t.max/i)-Math.floor(t.min/i)+1:(n=t.computeTickLimit(),s=s||11),s&&(n=Math.min(s,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,n=e.ticks;let s=t.getTickLimit();s=Math.max(2,s);const i=function(t,e){const n=[],{bounds:s,step:i,min:r,max:o,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=i||1,p=c-1,{min:f,max:m}=e,g=!qu(r),_=!qu(o),y=!qu(l),b=(m-f)/(h+1);let v,x,w,S,E=wd((m-f)/p/d)*d;if(E<1e-14&&!g&&!_)return[{value:f},{value:m}];S=Math.ceil(m/E)-Math.floor(f/E),S>p&&(E=wd(S*E/p/d)*d),qu(a)||(v=Math.pow(10,a),E=Math.ceil(E*v)/v),"ticks"===s?(x=Math.floor(f/E)*E,w=Math.ceil(m/E)*E):(x=f,w=m),g&&_&&i&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((o-r)/i,E/1e3)?(S=Math.min((o-r)/E,c),E=(o-r)/S,x=r,w=o):y?(x=g?r:x,w=_?o:w,S=l-1,E=(w-x)/S):(S=(w-x)/E,S=Ed(S,Math.round(S),E/1e3)?Math.round(S):Math.ceil(S));const k=Math.max(Od(E),Od(x));v=Math.pow(10,qu(a)?k:a),x=Math.round(x*v)/v,w=Math.round(w*v)/v;let C=0;for(g&&(u&&x!==r?(n.push({value:r}),x<r&&C++,Ed(Math.round((x+C*E)*v)/v,r,C_(r,b,t))&&C++):x<r&&C++);C<S;++C)n.push({value:Math.round((x+C*E)*v)/v});return _&&u&&w!==o?Ed(n[n.length-1].value,o,C_(o,b,t))?n[n.length-1].value=o:n.push({value:o}):_&&w!==o||n.push({value:w}),n}({maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:t._maxDigits(),horizontal:t.isHorizontal(),minRotation:n.minRotation||0,includeBounds:!1!==n.includeBounds},t._range||t);return"ticks"===e.bounds&&kd(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}configure(){const t=this,e=t.ticks;let n=t.min,s=t.max;if(super.configure(),t.options.offset&&e.length){const t=(s-n)/Math.max(e.length-1,1)/2;n-=t,s+=t}t._startValue=n,t._endValue=s,t._valueRange=s-n}getLabelForValue(t){return Cf(t,this.chart.options.locale)}}class O_ extends T_{determineDataLimits(){const t=this,{min:e,max:n}=t.getMinMax(!0);t.min=Yu(e)?e:0,t.max=Yu(n)?n:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this,e=t.isHorizontal(),n=e?t.width:t.height,s=Cd(t.options.ticks.minRotation),i=(e?Math.sin(s):Math.cos(s))||.001,r=t._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function P_(t){return 1==t/Math.pow(10,Math.floor(vd(t)))}O_.id="linear",O_.defaults={ticks:{callback:Zm.formatters.numeric}};class I_ extends eg{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=T_.prototype.parse.apply(this,[t,e]);if(0!==n)return Yu(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:n}=t.getMinMax(!0);t.min=Yu(e)?Math.max(0,e):null,t.max=Yu(n)?Math.max(0,n):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:n}=t.getUserBounds();let s=t.min,i=t.max;const r=t=>s=e?s:t,o=t=>i=n?i:t,a=(t,e)=>Math.pow(10,Math.floor(vd(t))+e);s===i&&(s<=0?(r(1),o(10)):(r(a(s,-1)),o(a(i,1)))),s<=0&&r(a(i,-1)),i<=0&&o(a(s,1)),t._zero&&t.min!==t._suggestedMin&&s===a(t.min,0)&&r(a(s,-1)),t.min=s,t.max=i}buildTicks(){const t=this,e=t.options,n=function(t,e){const n=Math.floor(vd(e.max)),s=Math.ceil(e.max/Math.pow(10,n)),i=[];let r=Ku(t.min,Math.pow(10,Math.floor(vd(e.min)))),o=Math.floor(vd(r)),a=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{i.push({value:r,major:P_(r)}),++a,10===a&&(a=1,++o,l=o>=0?1:l),r=Math.round(a*Math.pow(10,o)*l)/l}while(o<n||o===n&&a<s);const c=Ku(t.max,r);return i.push({value:c,major:P_(r)}),i}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&kd(n,t,"value"),e.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n}getLabelForValue(t){return void 0===t?"0":Cf(t,this.chart.options.locale)}configure(){const t=this,e=t.min;super.configure(),t._startValue=vd(e),t._valueRange=vd(t.max)-vd(e)}getPixelForValue(t){const e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(vd(t)-e._startValue)/e._valueRange)}getValueForPixel(t){const e=this,n=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+n*e._valueRange)}}function A_(t){const e=t.ticks;if(e.display&&t.display){const t=jp(e.backdropPadding);return Qu(e.font&&e.font.size,bp.font.size)+t.height}return 0}function R_(t,e,n,s,i){return t===s||t===i?{start:e-n/2,end:e+n/2}:t<s||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function M_(t){return 0===t||180===t?"center":t<180?"left":"right"}function D_(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function F_(t,e,n,s){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,pd);else{let n=t.getPointPosition(0,e);i.moveTo(n.x,n.y);for(let r=1;r<s;r++)n=t.getPointPosition(r,e),i.lineTo(n.x,n.y)}}function L_(t){return Sd(t)?t:0}I_.id="logarithmic",I_.defaults={ticks:{callback:Zm.formatters.logarithmic,major:{enabled:!0}}};class N_ extends T_{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=A_(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:e,max:n}=t.getMinMax(!1);t.min=Yu(e)&&!isNaN(e)?e:0,t.max=Yu(n)&&!isNaN(n)?n:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/A_(this.options))}generateTickLabels(t){const e=this;T_.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map((t,n)=>{const s=Gu(e.options.pointLabels.callback,[t,n],e);return s||0===s?s:""})}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?function(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},n={};let s,i,r;const o=[],a=[],l=t.getLabels().length;for(s=0;s<l;s++){const l=t.options.pointLabels.setContext(t.getContext(s));a[s]=l.padding,r=t.getPointPosition(s,t.drawingArea+a[s]);const d=Bp(l.font);t.ctx.font=d.string,c=t.ctx,h=d.lineHeight,i=Uu(u=t._pointLabels[s])?{w:xp(c,c.font,u),h:u.length*h}:{w:c.measureText(u).width,h:h},o[s]=i;const p=t.getIndexAngle(s),f=Td(p),m=R_(f,r.x,i.w,0,180),g=R_(f,r.y,i.h,90,270);m.start<e.l&&(e.l=m.start,n.l=p),m.end>e.r&&(e.r=m.end,n.r=p),g.start<e.t&&(e.t=g.start,n.t=p),g.end>e.b&&(e.b=g.end,n.b=p)}var c,h,u;t._setReductions(t.drawingArea,e,n),t._pointLabelItems=[];const d=t.options,p=A_(d),f=t.getDistanceFromCenterForValue(d.ticks.reverse?t.min:t.max);for(s=0;s<l;s++){const e=t.getPointPosition(s,f+(0===s?p/2:0)+a[s]),n=Td(t.getIndexAngle(s)),i=o[s];D_(n,i,e);const r=M_(n);let l;l="left"===r?e.x:"center"===r?e.x-i.w/2:e.x-i.w,t._pointLabelItems[s]={x:e.x,y:e.y,textAlign:r,left:l,top:e.y,right:l+i.w,bottom:e.y+i.h}}}(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,e,n){const s=this;let i=e.l/Math.sin(n.l),r=Math.max(e.r-s.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),a=-Math.max(e.b-(s.height-s.paddingTop),0)/Math.cos(n.b);i=L_(i),r=L_(r),o=L_(o),a=L_(a),s.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(i+r)/2),Math.floor(t-(o+a)/2))),s.setCenterPoint(i,r,o,a)}setCenterPoint(t,e,n,s){const i=this,r=n+i.drawingArea,o=i.height-i.paddingTop-s-i.drawingArea;i.xCenter=Math.floor((t+i.drawingArea+(i.width-e-i.drawingArea))/2+i.left),i.yCenter=Math.floor((r+o)/2+i.top+i.paddingTop)}getIndexAngle(t){return Ad(t*(pd/this.getLabels().length)+Cd(this.options.startAngle||0))}getDistanceFromCenterForValue(t){const e=this;if(qu(t))return NaN;const n=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*n:(t-e.min)*n}getValueForDistanceFromCenter(t){if(qu(t))return NaN;const e=this,n=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-n:e.min+n}getPointPosition(t,e){const n=this,s=n.getIndexAngle(t)-_d;return{x:Math.cos(s)*e+n.xCenter,y:Math.sin(s)*e+n.yCenter,angle:s}}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:n,right:s,bottom:i}=this._pointLabelItems[t];return{left:e,top:n,right:s,bottom:i}}drawBackground(){const t=this,{backgroundColor:e,grid:{circular:n}}=t.options;if(e){const s=t.ctx;s.save(),s.beginPath(),F_(t,t.getDistanceFromCenterForValue(t._endValue),n,t.getLabels().length),s.closePath(),s.fillStyle=e,s.fill(),s.restore()}}drawGrid(){const t=this,e=t.ctx,n=t.options,{angleLines:s,grid:i}=n,r=t.getLabels().length;let o,a,l;if(n.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:s}}=t;for(let i=e-1;i>=0;i--){const e=s.setContext(t.getContext(i)),r=Bp(e.font),{x:o,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[i],{backdropColor:p}=e;if(!qu(p)){const t=jp(e.backdropPadding);n.fillStyle=p,n.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}Ip(n,t._pointLabels[i],o,a+r.lineHeight/2,r,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,r),i.display&&t.ticks.forEach((e,n)=>{if(0!==n){a=t.getDistanceFromCenterForValue(e.value);const s=i.setContext(t.getContext(n-1));!function(t,e,n,s){const i=t.ctx,r=e.circular,{color:o,lineWidth:a}=e;!r&&!s||!o||!a||n<0||(i.save(),i.strokeStyle=o,i.lineWidth=a,i.setLineDash(e.borderDash),i.lineDashOffset=e.borderDashOffset,i.beginPath(),F_(t,n,r,s),i.closePath(),i.stroke(),i.restore())}(t,s,a,r)}}),s.display){for(e.save(),o=t.getLabels().length-1;o>=0;o--){const i=s.setContext(t.getContext(o)),{color:r,lineWidth:c}=i;c&&r&&(e.lineWidth=c,e.strokeStyle=r,e.setLineDash(i.borderDash),e.lineDashOffset=i.borderDashOffset,a=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),l=t.getPointPosition(o,a),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const t=this,e=t.ctx,n=t.options,s=n.ticks;if(!s.display)return;const i=t.getIndexAngle(0);let r,o;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach((i,a)=>{if(0===a&&!n.reverse)return;const l=s.setContext(t.getContext(a)),c=Bp(l.font);if(r=t.getDistanceFromCenterForValue(t.ticks[a].value),l.showLabelBackdrop){o=e.measureText(i.label).width,e.fillStyle=l.backdropColor;const t=jp(l.backdropPadding);e.fillRect(-o/2-t.left,-r-c.size/2-t.top,o+t.width,c.size+t.height)}Ip(e,i.label,0,-r,c,{color:l.color})}),e.restore()}drawTitle(){}}N_.id="radialLinear",N_.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Zm.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},N_.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},N_.descriptors={angleLines:{_fallback:"grid"}};const j_={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}},B_=Object.keys(j_);function V_(t,e){return t-e}function z_(t,e){if(qu(e))return null;const n=t._adapter,{parser:s,round:i,isoWeekday:r}=t._parseOpts;let o=e;return"function"==typeof s&&(o=s(o)),Yu(o)||(o="string"==typeof s?n.parse(o,s):n.parse(o)),null===o?null:(i&&(o="week"!==i||!Sd(r)&&!0!==r?n.startOf(o,i):n.startOf(o,"isoWeek",r)),+o)}function H_(t,e,n,s){const i=B_.length;for(let r=B_.indexOf(t);r<i-1;++r){const t=j_[B_[r]],i=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(i*t.size))<=s)return B_[r]}return B_[i-1]}function $_(t,e,n){if(n){if(n.length){const{lo:s,hi:i}=zp(n,e);t[n[s]>=e?n[s]:n[i]]=!0}}else t[e]=!0}function W_(t,e,n){const s=[],i={},r=e.length;let o,a;for(o=0;o<r;++o)a=e[o],i[a]=o,s.push({value:a,major:!1});return 0!==r&&n?function(t,e,n,s){const i=t._adapter,r=+i.startOf(e[0].value,s),o=e[e.length-1].value;let a,l;for(a=r;a<=o;a=+i.add(a,1,s))l=n[a],l>=0&&(e[l].major=!0);return e}(t,s,i,n):s}class q_ extends eg{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 n=t.time||(t.time={}),s=this._adapter=new um._date(t.adapters.date);rd(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:z_(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,n=t._adapter,s=e.time.unit||"day";let{min:i,max:r,minDefined:o,maxDefined:a}=t.getUserBounds();function l(t){o||isNaN(t.min)||(i=Math.min(i,t.min)),a||isNaN(t.max)||(r=Math.max(r,t.max))}o&&a||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),i=Yu(i)&&!isNaN(i)?i:+n.startOf(Date.now(),s),r=Yu(r)&&!isNaN(r)?r:+n.endOf(Date.now(),s)+1,t.min=Math.min(i,r-1),t.max=Math.max(i+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this,e=t.options,n=e.time,s=e.ticks,i="labels"===s.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&i.length&&(t.min=t._userMin||i[0],t.max=t._userMax||i[i.length-1]);const r=t.min,o=function(t,e,n){let s=0,i=t.length;for(;s<i&&t[s]<e;)s++;for(;i>s&&t[i-1]>n;)i--;return s>0||i<t.length?t.slice(s,i):t}(i,r,t.max);return t._unit=n.unit||(s.autoSkip?H_(n.minUnit,t.min,t.max,t._getLabelCapacity(r)):function(t,e,n,s,i){for(let r=B_.length-1;r>=B_.indexOf(n);r--){const n=B_[r];if(j_[n].common&&t._adapter.diff(i,s,n)>=e-1)return n}return B_[n?B_.indexOf(n):0]}(t,o.length,n.minUnit,t.min,t.max)),t._majorUnit=s.major.enabled&&"year"!==t._unit?function(t){for(let e=B_.indexOf(t)+1,n=B_.length;e<n;++e)if(j_[B_[e]].common)return B_[e]}(t._unit):void 0,t.initOffsets(i),e.reverse&&o.reverse(),W_(t,o,t._majorUnit)}initOffsets(t){const e=this;let n,s,i=0,r=0;e.options.offset&&t.length&&(n=e.getDecimalForValue(t[0]),i=1===t.length?1-n:(e.getDecimalForValue(t[1])-n)/2,s=e.getDecimalForValue(t[t.length-1]),r=1===t.length?s:(s-e.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;i=Md(i,0,o),r=Md(r,0,o),e._offsets={start:i,end:r,factor:1/(i+1+r)}}_generate(){const t=this,e=t._adapter,n=t.min,s=t.max,i=t.options,r=i.time,o=r.unit||H_(r.minUnit,n,s,t._getLabelCapacity(n)),a=Qu(r.stepSize,1),l="week"===o&&r.isoWeekday,c=Sd(l)||!0===l,h={};let u,d,p=n;if(c&&(p=+e.startOf(p,"isoWeek",l)),p=+e.startOf(p,c?"day":o),e.diff(s,n,o)>1e5*a)throw new Error(n+" and "+s+" are too far apart with stepSize of "+a+" "+o);const f="data"===i.ticks.source&&t.getDataTimestamps();for(u=p,d=0;u<s;u=+e.add(u,a,o),d++)$_(h,u,f);return u!==s&&"ticks"!==i.bounds&&1!==d||$_(h,u,f),Object.keys(h).sort((t,e)=>t-e).map(t=>+t)}getLabelForValue(t){const e=this.options.time;return this._adapter.format(t,e.tooltipFormat?e.tooltipFormat:e.displayFormats.datetime)}_tickFormatFunction(t,e,n,s){const i=this,r=i.options,o=r.time.displayFormats,a=i._unit,l=i._majorUnit,c=l&&o[l],h=n[e],u=i._adapter.format(t,s||(l&&c&&h&&h.major?c:a&&o[a])),d=r.ticks.callback;return d?Gu(d,[u,e,n],i):u}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e<n;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){const e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}getPixelForValue(t){const e=this,n=e._offsets,s=e.getDecimalForValue(t);return e.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(t){const e=this,n=e._offsets,s=e.getDecimalForPixel(t)/n.factor-n.end;return e.min+s*(e.max-e.min)}_getLabelSize(t){const e=this,n=e.options.ticks,s=e.ctx.measureText(t).width,i=Cd(e.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(i),o=Math.sin(i),a=e._resolveTickFontOptions(0).size;return{w:s*r+a*o,h:s*o+a*r}}_getLabelCapacity(t){const e=this,n=e.options.time,s=n.displayFormats,i=s[n.unit]||s.millisecond,r=e._tickFormatFunction(t,0,W_(e,[t],e._majorUnit),i),o=e._getLabelSize(r),a=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h)-1;return a>0?a:1}getDataTimestamps(){const t=this;let e,n,s=t._cache.data||[];if(s.length)return s;const i=t.getMatchingVisibleMetas();if(t._normalized&&i.length)return t._cache.data=i[0].controller.getAllParsedValues(t);for(e=0,n=i.length;e<n;++e)s=s.concat(i[e].controller.getAllParsedValues(t));return t._cache.data=t.normalize(s)}getLabelTimestamps(){const t=this,e=t._cache.labels||[];let n,s;if(e.length)return e;const i=t.getLabels();for(n=0,s=i.length;n<s;++n)e.push(z_(t,i[n]));return t._cache.labels=t._normalized?e:t.normalize(e)}normalize(t){return Up(t.sort(V_))}}function U_(t,e,n){let s,i,r,o;if(n)s=Math.floor(e),i=Math.ceil(e),r=t[s],o=t[i];else{const n=zp(t,e);r=n.lo,o=n.hi,s=t[r],i=t[o]}const a=i-s;return a?r+(o-r)*(e-s)/a:r}q_.id="time",q_.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Z_ extends q_{constructor(t){super(t),this._table=[],this._maxIndex=void 0}initOffsets(){const t=this,e=t._getTimestampsForTable();t._table=t.buildLookupTable(e),t._maxIndex=t._table.length-1,super.initOffsets(e)}buildLookupTable(t){const{min:e,max:n}=this;if(!t.length)return[{time:e,pos:0},{time:n,pos:1}];const s=[e];let i,r,o;for(i=0,r=t.length;i<r;++i)o=t[i],o>e&&o<n&&s.push(o);return s.push(n),s}_getTimestampsForTable(){const t=this;let e=t._cache.all||[];if(e.length)return e;const n=t.getDataTimestamps(),s=t.getLabelTimestamps();return e=n.length&&s.length?t.normalize(n.concat(s)):n.length?n:s,e=t._cache.all=e,e}getPixelForValue(t,e){const n=this,s=n._offsets,i=n._normalized&&n._maxIndex>0&&!qu(e)?e/n._maxIndex:n.getDecimalForValue(t);return n.getPixelForDecimal((s.start+i)*s.factor)}getDecimalForValue(t){return U_(this._table,t)/this._maxIndex}getValueForPixel(t){const e=this,n=e._offsets,s=e.getDecimalForPixel(t)/n.factor-n.end;return U_(e._table,s*this._maxIndex,!0)}}Z_.id="timeseries",Z_.defaults=q_.defaults;let Y_=(()=>{class t{constructor(t){this.http=t}get(t){const e=(new Dh).set("replayId",t.toString());return this.http.get("/api/matchdetails",{params:e})}}return t.\u0275fac=function(e){return new(e||t)(ns(Uh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const K_=["cnvs"];function Q_(t,e){1&t&&yo(0,"div",3)}let X_=(()=>{class t{constructor(t){this.svc=t,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(Nu(t=>this.setup(t))))}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(t=>{var e=new Image;e.src=`/Images/Heroes/Resized/30x30/${t}.png`,this.heroImages[`hero${t}`]=e}),t.TeamObjectiveNames.forEach((e,n)=>{var s=new Image;s.src=t.TeamObjectiveImages[n],this.eventImages[e]=s});const e=t.TeamObjectiveStyles.map(t=>this.eventImages[t]),n=t.HeroDeathStyles.map(t=>this.heroImages[t]),s=t.XValues.map((e,n)=>({x:e,y:t.YValues[n]})),i=t.XHeroDeaths.map((e,n)=>({x:e,y:t.YHeroDeaths[n]})),r=t.XDiff.map((e,n)=>({x:e,y:t.YDiff[n]}));return this.chart=new Cg(this.ctx_chart,{type:"line",data:{datasets:[{type:"line",fill:!1,showLine:!1,pointHitRadius:15,pointStyle:e,data:s},{type:"line",fill:!1,showLine:!1,pointHitRadius:10,pointStyle:n,data:i},{type:"NegativeColoredLine",pointHoverBorderColor:"#337ab7",pointHoverBackgroundColor:"#FFFFFF",borderWidth:5,pointRadius:2,pointHoverRadius:5,pointBorderWidth:0,pointHoverBorderWidth:1,pointHitRadius:7,label:"XP Difference",data:r,fill:{value:0}}]},options:{maintainAspectRatio:!1,title:{display:!1},legend:{display:!1},plugins:{tooltip:{displayColors:!1,bodyFontSize:14,callbacks:{title:e=>this.secondsToMMSS(0==e[0].datasetIndex?t.MatchEventTimers[e[0].dataIndex]:1==e[0].datasetIndex?t.DeathTimers[e[0].dataIndex]:e[0].raw.x),label:e=>0==e.datasetIndex?t.EventLabels[e.dataIndex]:2==e.datasetIndex?(e.dataset.label||"")+": "+e.formattedValue:t.DeathLabels[e.dataIndex]}}},hover:{mode:"nearest"},scales:{x:{type:"linear",position:"bottom",gridLines:{display:!0},ticks:{stepSize:120,max:t.MaxXpDiffTick,callback:(t,e,n)=>t%120==0?this.secondsToMMSS(t):""}},y:{gridLines:{display:!0},ticks:{min:-t.MaxXpDifference,max:t.MaxXpDifference}}}}}),!0}secondsToMMSS(t){var e=Number(t),n=Math.floor(e/60),s=Math.floor(e%60);return n+":"+(s<10?"0"+s:s)}}return t.\u0275fac=function(e){return new(e||t)(po(Y_))},t.\u0275cmp=Ht({type:t,selectors:[["app-match-log"]],viewQuery:function(t,e){if(1&t&&fl(K_,5),2&t){let t;pl(t=ml())&&(e.cnvs=t.first)}},inputs:{rid:"rid"},features:[le],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,e){1&t&&(go(0,"div",0),yo(1,"canvas",null,1),_o(),uo(3,Q_,1,0,"div",2),Ga(4,"async")),2&t&&(Hi(3),fo("ngIf",Ja(4,1,e.matchDetails$)))},directives:[Fc],pipes:[Hc],styles:[""]}),t})();function G_(t){return null!=t&&"false"!=`${t}`}function J_(t){return Array.isArray(t)?t:[t]}function ty(t){return null==t?"":"string"==typeof t?t:`${t}px`}function ey(t){return t instanceof na?t.nativeElement:t}function ny(t,e,n,i){return s(n)&&(i=n,n=void 0),i?ny(t,e,n).pipe(F(t=>l(t)?i(...t):i(t))):new y(s=>{sy(t,e,function(t){s.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},s,n)})}function sy(t,e,n,s,i){let r;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(e,n,i),r=()=>s.removeEventListener(e,n,i)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(e,n),r=()=>s.off(e,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(e,n),r=()=>s.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let r=0,o=t.length;r<o;r++)sy(t[r],e,n,s,i)}s.add(r)}const iy=new hu(au);class ry{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new oy(t,this.durationSelector))}}class oy extends D{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let n;try{const{durationSelector:e}=this;n=e(t)}catch(e){return this.destination.error(e)}const s=M(this,n);!s||s.closed?this.clearThrottle():this.add(this.throttled=s)}}clearThrottle(){const{value:t,hasValue:e,throttled:n}=this;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))}notifyNext(t,e,n,s){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function ay(t){return!l(t)&&t-parseFloat(t)+1>=0}function ly(t){const{index:e,period:n,subscriber:s}=t;if(s.next(e),!s.closed){if(-1===n)return s.complete();t.index=e+1,this.schedule(t,n)}}function cy(t,e=iy){return n=()=>function(t=0,e,n){let s=-1;return ay(e)?s=Number(e)<1?1:Number(e):k(e)&&(n=e),k(n)||(n=iy),new y(e=>{const i=ay(t)?t:+t-n.now();return n.schedule(ly,i,{index:0,period:s,subscriber:e})})}(t,e),function(t){return t.lift(new ry(n))};var n}function hy(t){return e=>e.lift(new uy(t))}class uy{constructor(t){this.notifier=t}call(t,e){const n=new dy(t),s=M(n,this.notifier);return s&&!n.seenValue?(n.add(s),e.subscribe(n)):n}}class dy extends D{constructor(t){super(t),this.seenValue=!1}notifyNext(t,e,n,s,i){this.seenValue=!0,this.complete()}notifyComplete(){}}function py(...t){return $(1)(Eh(...t))}function fy(...t){const e=t[t.length-1];return k(e)?(t.pop(),n=>py(t,n,e)):e=>py(t,e)}let my;try{my="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(ZS){my=!1}let gy,_y,yy,by=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?"browser"===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&&!my)&&"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 t.\u0275fac=function(e){return new(e||t)(ns(El))},t.\u0275prov=ut({factory:function(){return new t(ns(El))},token:t,providedIn:"root"}),t})(),vy=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({}),t})();function xy(t){return function(){if(null==gy&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>gy=!0}))}finally{gy=gy||!1}return gy}()?t:!!t.capture}function wy(){if(null==_y){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return _y=!1,_y;if("scrollBehavior"in document.documentElement.style)_y=!0;else{const t=Element.prototype.scrollTo;_y=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return _y}const Sy=new Vn("cdk-dir-doc",{providedIn:"root",factory:function(){return ss(dc)}});let Ey=(()=>{class t{constructor(t){if(this.value="ltr",this.change=new el,t){const e=t.documentElement?t.documentElement.dir:null,n=(t.body?t.body.dir:null)||e;this.value="ltr"===n||"rtl"===n?n:"ltr"}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(ns(Sy,8))},t.\u0275prov=ut({factory:function(){return new t(ns(Sy,8))},token:t,providedIn:"root"}),t})(),ky=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({}),t})(),Cy=(()=>{class t{constructor(t,e,n){this._ngZone=t,this._platform=e,this._scrolled=new S,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=n}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new y(e=>{this._globalSubscription||this._addGlobalListener();const n=t>0?this._scrolled.pipe(cy(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Eh()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(kh(t=>!t||n.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((n,s)=>{this._scrollableContainsElement(s,t)&&e.push(s)}),e}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,e){let n=ey(e),s=t.getElementRef().nativeElement;do{if(n==s)return!0}while(n=n.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>ny(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(ns(Bl),ns(by),ns(dc,8))},t.\u0275prov=ut({factory:function(){return new t(ns(Bl),ns(by),ns(dc,8))},token:t,providedIn:"root"}),t})(),Ty=(()=>{class t{constructor(t,e,n){this._platform=t,this._change=new S,this._changeListener=t=>{this._change.next(t)},this._document=n,e.runOutsideAngular(()=>{if(t.isBrowser){const t=this._getWindow();t.addEventListener("resize",this._changeListener),t.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._updateViewportSize())})}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:e,height:n}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+n,right:t.left+e,height:n,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,e=this._getWindow(),n=t.documentElement,s=n.getBoundingClientRect();return{top:-s.top||t.body.scrollTop||e.scrollY||n.scrollTop||0,left:-s.left||t.body.scrollLeft||e.scrollX||n.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(cy(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 t.\u0275fac=function(e){return new(e||t)(ns(by),ns(Bl),ns(dc,8))},t.\u0275prov=ut({factory:function(){return new t(ns(by),ns(Bl),ns(dc,8))},token:t,providedIn:"root"}),t})(),Oy=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({}),t})(),Py=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({imports:[[ky,vy,Oy],ky,Oy]}),t})();class Iy{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class Ay extends Iy{constructor(t,e,n,s){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.componentFactoryResolver=s}}class Ry extends Iy{constructor(t,e,n){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class My extends Iy{constructor(t){super(),this.element=t instanceof na?t.nativeElement:t}}class Dy{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Ay?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Ry?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof My?(this._attachedPortal=t,this.attachDomPortal(t)):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(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Fy extends Dy{constructor(t,e,n,s,i){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=n,this._defaultInjector=s,this.attachDomPortal=t=>{const e=t.element,n=this._document.createComment("dom-portal");e.parentNode.insertBefore(n,e),this.outletElement.appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(e,n)})},this._document=i}attachComponentPortal(t){const e=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let n;return t.viewContainerRef?(n=t.viewContainerRef.createComponent(e,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>n.destroy())):(n=e.create(t.injector||this._defaultInjector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(n)),this._attachedPortal=t,n}attachTemplatePortal(t){let e=t.viewContainerRef,n=e.createEmbeddedView(t.templateRef,t.context);return n.rootNodes.forEach(t=>this.outletElement.appendChild(t)),n.detectChanges(),this.setDisposeFn(()=>{let t=e.indexOf(n);-1!==t&&e.remove(t)}),this._attachedPortal=t,n}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let Ly=(()=>{class t extends Dy{constructor(t,e,n){super(),this._componentFactoryResolver=t,this._viewContainerRef=e,this._isInitialized=!1,this.attached=new el,this.attachDomPortal=t=>{const e=t.element,n=this._document.createComment("dom-portal");t.setAttachedHost(this),e.parentNode.insertBefore(n,e),this._getRootNode().appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(e,n)})},this._document=n}get portal(){return this._attachedPortal}set portal(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedPortal=null,this._attachedRef=null}attachComponentPortal(t){t.setAttachedHost(this);const e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,n=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),s=e.createComponent(n,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=t,this._attachedRef=s,this.attached.emit(s),s}attachTemplatePortal(t){t.setAttachedHost(this);const e=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=e,this.attached.emit(e),e}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}}return t.\u0275fac=function(e){return new(e||t)(po(Go),po(Na),po(dc))},t.\u0275dir=Yt({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Jr]}),t})(),Ny=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({}),t})();const jy=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function By(t){return e=>0===t?fu():e.lift(new Vy(t))}class Vy{constructor(t){if(this.total=t,this.total<0)throw new jy}call(t,e){return e.subscribe(new zy(t,this.total))}}class zy extends f{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}const Hy=wy();class $y{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=ty(-this._previousScrollPosition.left),t.style.top=ty(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,e=t.style,n=this._document.body.style,s=e.scrollBehavior||"",i=n.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),Hy&&(e.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Hy&&(e.scrollBehavior=s,n.scrollBehavior=i)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}class Wy{constructor(t,e,n,s){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=s,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class qy{enable(){}disable(){}attach(){}}function Uy(t,e){return e.some(e=>t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right)}function Zy(t,e){return e.some(e=>t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)}class Yy{constructor(t,e,n,s){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=s,this._scrollSubscription=null}attach(t){this._overlayRef=t}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:e,height:n}=this._viewportRuler.getViewportSize();Uy(t,[{width:e,height:n,bottom:n,right:e,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 Ky=(()=>{class t{constructor(t,e,n,s){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this.noop=()=>new qy,this.close=t=>new Wy(this._scrollDispatcher,this._ngZone,this._viewportRuler,t),this.block=()=>new $y(this._viewportRuler,this._document),this.reposition=t=>new Yy(this._scrollDispatcher,this._viewportRuler,this._ngZone,t),this._document=s}}return t.\u0275fac=function(e){return new(e||t)(ns(Cy),ns(Ty),ns(Bl),ns(dc))},t.\u0275prov=ut({factory:function(){return new t(ns(Cy),ns(Ty),ns(Bl),ns(dc))},token:t,providedIn:"root"}),t})();class Qy{constructor(t){if(this.scrollStrategy=new qy,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const n of e)void 0!==t[n]&&(this[n]=t[n])}}}class Xy{constructor(t,e,n,s,i){this.offsetX=n,this.offsetY=s,this.panelClass=i,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}class Gy{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let Jy=(()=>{class t{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}return t.\u0275fac=function(e){return new(e||t)(ns(dc))},t.\u0275prov=ut({factory:function(){return new t(ns(dc))},token:t,providedIn:"root"}),t})(),tb=(()=>{class t extends Jy{constructor(t){super(t),this._keydownListener=t=>{const e=this._attachedOverlays;for(let n=e.length-1;n>-1;n--)if(e[n]._keydownEvents.observers.length>0){e[n]._keydownEvents.next(t);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 t.\u0275fac=function(e){return new(e||t)(ns(dc))},t.\u0275prov=ut({factory:function(){return new t(ns(dc))},token:t,providedIn:"root"}),t})(),eb=(()=>{class t extends Jy{constructor(t,e){super(t),this._platform=e,this._cursorStyleIsSet=!1,this._clickListener=t=>{const e=t.composedPath?t.composedPath()[0]:t.target,n=this._attachedOverlays.slice();for(let s=n.length-1;s>-1;s--){const i=n[s];if(!(i._outsidePointerEvents.observers.length<1)&&i.hasAttached()){if(i.overlayElement.contains(e))break;i._outsidePointerEvents.next(t)}}}}add(t){if(super.add(t),!this._isAttached){const t=this._document.body;t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=t.style.cursor,t.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;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 t.\u0275fac=function(e){return new(e||t)(ns(dc),ns(by))},t.\u0275prov=ut({factory:function(){return new t(ns(dc),ns(by))},token:t,providedIn:"root"}),t})();const nb="undefined"!=typeof __karma__&&!!__karma__||"undefined"!=typeof jasmine&&!!jasmine||"undefined"!=typeof jest&&!!jest||"undefined"!=typeof Mocha&&!!Mocha;let sb=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||nb){const e=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let t=0;t<e.length;t++)e[t].parentNode.removeChild(e[t])}const e=this._document.createElement("div");e.classList.add(t),nb?e.setAttribute("platform","test"):this._platform.isBrowser||e.setAttribute("platform","server"),this._document.body.appendChild(e),this._containerElement=e}}return t.\u0275fac=function(e){return new(e||t)(ns(dc),ns(by))},t.\u0275prov=ut({factory:function(){return new t(ns(dc),ns(by))},token:t,providedIn:"root"}),t})();class ib{constructor(t,e,n,s,i,r,o,a,l){this._portalOutlet=t,this._host=e,this._pane=n,this._config=s,this._ngZone=i,this._keyboardDispatcher=r,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._backdropElement=null,this._backdropClick=new S,this._attachments=new S,this._detachments=new S,this._locationChanges=u.EMPTY,this._backdropClickHandler=t=>this._backdropClick.next(t),this._keydownEvents=new S,this._outsidePointerEvents=new S,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(t){let e=this._portalOutlet.attach(t);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(By(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),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),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),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=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(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=ty(this._config.width),t.height=ty(this._config.height),t.minWidth=ty(this._config.minWidth),t.minHeight=ty(this._config.minHeight),t.maxWidth=ty(this._config.maxWidth),t.maxHeight=ty(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){const t="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(t)})}):this._backdropElement.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t,e=this._backdropElement;if(!e)return;let n=()=>{e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",n),e.parentNode&&e.parentNode.removeChild(e)),this._backdropElement==e&&(this._backdropElement=null),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",n)}),e.style.pointerEvents="none",t=this._ngZone.runOutsideAngular(()=>setTimeout(n,500))}_toggleClasses(t,e,n){const s=t.classList;J_(e).forEach(t=>{t&&(n?s.add(t):s.remove(t))})}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(hy(q(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._previousHostParent.removeChild(this._host)),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}}const rb="cdk-overlay-connected-position-bounding-box",ob=/([A-Za-z%]+)$/;class ab{constructor(t,e,n,s,i){this._viewportRuler=e,this._document=n,this._platform=s,this._overlayContainer=i,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 S,this._resizeSubscription=u.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){this._validatePositions(),t.hostElement.classList.add(rb),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.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();const t=this._originRect,e=this._overlayRect,n=this._viewportRect,s=[];let i;for(let r of this._preferredPositions){let o=this._getOriginPoint(t,r),a=this._getOverlayPoint(o,e,r),l=this._getOverlayFit(a,e,n,r);if(l.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(r,o);this._canFitWithFlexibleDimensions(l,a,n)?s.push({position:r,origin:o,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(o,r)}):(!i||i.overlayFit.visibleArea<l.visibleArea)&&(i={overlayFit:l,overlayPoint:a,originPoint:o,position:r,overlayRect:e})}if(s.length){let t=null,e=-1;for(const n of s){const s=n.boundingBoxRect.width*n.boundingBoxRect.height*(n.position.weight||1);s>e&&(e=s,t=n)}return this._isPushed=!1,void this._applyPosition(t.position,t.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(i.position,i.originPoint);this._applyPosition(i.position,i.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&lb(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(rb),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();const t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e){let n,s;if("center"==e.originX)n=t.left+t.width/2;else{const s=this._isRtl()?t.right:t.left,i=this._isRtl()?t.left:t.right;n="start"==e.originX?s:i}return s="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom,{x:n,y:s}}_getOverlayPoint(t,e,n){let s,i;return s="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,i="center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height,{x:t.x+s,y:t.y+i}}_getOverlayFit(t,e,n,s){const i=hb(e);let{x:r,y:o}=t,a=this._getOffset(s,"x"),l=this._getOffset(s,"y");a&&(r+=a),l&&(o+=l);let c=0-o,h=o+i.height-n.height,u=this._subtractOverflows(i.width,0-r,r+i.width-n.width),d=this._subtractOverflows(i.height,c,h),p=u*d;return{visibleArea:p,isCompletelyWithinViewport:i.width*i.height===p,fitsInViewportVertically:d===i.height,fitsInViewportHorizontally:u==i.width}}_canFitWithFlexibleDimensions(t,e,n){if(this._hasFlexibleDimensions){const s=n.bottom-e.y,i=n.right-e.x,r=cb(this._overlayRef.getConfig().minHeight),o=cb(this._overlayRef.getConfig().minWidth),a=t.fitsInViewportHorizontally||null!=o&&o<=i;return(t.fitsInViewportVertically||null!=r&&r<=s)&&a}return!1}_pushOverlayOnScreen(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const s=hb(e),i=this._viewportRect,r=Math.max(t.x+s.width-i.width,0),o=Math.max(t.y+s.height-i.height,0),a=Math.max(i.top-n.top-t.y,0),l=Math.max(i.left-n.left-t.x,0);let c=0,h=0;return c=s.width<=i.width?l||-r:t.x<this._viewportMargin?i.left-n.left-t.x:0,h=s.height<=i.height?a||-o:t.y<this._viewportMargin?i.top-n.top-t.y:0,this._previousPushAmount={x:c,y:h},{x:t.x+c,y:t.y+h}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){const e=this._getScrollVisibility(),n=new Gy(t,e);this._positionChanges.next(n)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;const e=this._boundingBox.querySelectorAll(this._transformOriginSelector);let n,s=t.overlayY;n="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let i=0;i<e.length;i++)e[i].style.transformOrigin=`${n} ${s}`}_calculateBoundingBoxRect(t,e){const n=this._viewportRect,s=this._isRtl();let i,r,o,a,l,c;if("top"===e.overlayY)r=t.y,i=n.height-r+this._viewportMargin;else if("bottom"===e.overlayY)o=n.height-t.y+2*this._viewportMargin,i=n.height-o+this._viewportMargin;else{const e=Math.min(n.bottom-t.y+n.top,t.y),s=this._lastBoundingBoxSize.height;i=2*e,r=t.y-e,i>s&&!this._isInitialRender&&!this._growAfterOpen&&(r=t.y-s/2)}if("end"===e.overlayX&&!s||"start"===e.overlayX&&s)c=n.width-t.x+this._viewportMargin,a=t.x-this._viewportMargin;else if("start"===e.overlayX&&!s||"end"===e.overlayX&&s)l=t.x,a=n.right-t.x;else{const e=Math.min(n.right-t.x+n.left,t.x),s=this._lastBoundingBoxSize.width;a=2*e,l=t.x-e,a>s&&!this._isInitialRender&&!this._growAfterOpen&&(l=t.x-s/2)}return{top:r,left:l,bottom:o,right:c,width:a,height:i}}_setBoundingBoxStyles(t,e){const n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.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 t=this._overlayRef.getConfig().maxHeight,i=this._overlayRef.getConfig().maxWidth;s.height=ty(n.height),s.top=ty(n.top),s.bottom=ty(n.bottom),s.width=ty(n.width),s.left=ty(n.left),s.right=ty(n.right),s.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",s.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",t&&(s.maxHeight=ty(t)),i&&(s.maxWidth=ty(i))}this._lastBoundingBoxSize=n,lb(this._boundingBox.style,s)}_resetBoundingBoxStyles(){lb(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){lb(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const n={},s=this._hasExactPosition(),i=this._hasFlexibleDimensions,r=this._overlayRef.getConfig();if(s){const s=this._viewportRuler.getViewportScrollPosition();lb(n,this._getExactOverlayY(e,t,s)),lb(n,this._getExactOverlayX(e,t,s))}else n.position="static";let o="",a=this._getOffset(e,"x"),l=this._getOffset(e,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),n.transform=o.trim(),r.maxHeight&&(s?n.maxHeight=ty(r.maxHeight):i&&(n.maxHeight="")),r.maxWidth&&(s?n.maxWidth=ty(r.maxWidth):i&&(n.maxWidth="")),lb(this._pane.style,n)}_getExactOverlayY(t,e,n){let s={top:"",bottom:""},i=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let r=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return i.y-=r,"bottom"===t.overlayY?s.bottom=this._document.documentElement.clientHeight-(i.y+this._overlayRect.height)+"px":s.top=ty(i.y),s}_getExactOverlayX(t,e,n){let s,i={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),s=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===s?i.right=this._document.documentElement.clientWidth-(r.x+this._overlayRect.width)+"px":i.left=ty(r.x),i}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(t=>t.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Zy(t,n),isOriginOutsideView:Uy(t,n),isOverlayClipped:Zy(e,n),isOverlayOutsideView:Uy(e,n)}}_subtractOverflows(t,...e){return e.reduce((t,e)=>t-Math.max(e,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&J_(t).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof na)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,n=t.height||0;return{top:t.y,bottom:t.y+n,left:t.x,right:t.x+e,height:n,width:e}}}function lb(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function cb(t){if("number"!=typeof t&&null!=t){const[e,n]=t.split(ob);return n&&"px"!==n?null:parseFloat(e)}return t||null}function hb(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}class ub{constructor(t,e,n,s,i,r,o){this._preferredPositions=[],this._positionStrategy=new ab(n,s,i,r,o).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e),this.onPositionChange=this._positionStrategy.positionChanges}get positions(){return this._preferredPositions}attach(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}dispose(){this._positionStrategy.dispose()}detach(){this._positionStrategy.detach()}apply(){this._positionStrategy.apply()}recalculateLastPosition(){this._positionStrategy.reapplyLastPosition()}withScrollableContainers(t){this._positionStrategy.withScrollableContainers(t)}withFallbackPosition(t,e,n,s){const i=new Xy(t,e,n,s);return this._preferredPositions.push(i),this._positionStrategy.withPositions(this._preferredPositions),this}withDirection(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}withOffsetX(t){return this._positionStrategy.withDefaultOffsetX(t),this}withOffsetY(t){return this._positionStrategy.withDefaultOffsetY(t),this}withLockedPosition(t){return this._positionStrategy.withLockedPosition(t),this}withPositions(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}setOrigin(t){return this._positionStrategy.setOrigin(t),this}}const db="cdk-global-overlay-wrapper";class pb{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(db),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._justifyContent="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:s,height:i,maxWidth:r,maxHeight:o}=n,a=!("100%"!==s&&"100vw"!==s||r&&"100%"!==r&&"100vw"!==r),l=!("100%"!==i&&"100vh"!==i||o&&"100%"!==o&&"100vh"!==o);t.position=this._cssPosition,t.marginLeft=a?"0":this._leftOffset,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,a?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(db),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let fb=(()=>{class t{constructor(t,e,n,s){this._viewportRuler=t,this._document=e,this._platform=n,this._overlayContainer=s}global(){return new pb}connectedTo(t,e,n){return new ub(e,n,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}flexibleConnectedTo(t){return new ab(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return t.\u0275fac=function(e){return new(e||t)(ns(Ty),ns(dc),ns(by),ns(sb))},t.\u0275prov=ut({factory:function(){return new t(ns(Ty),ns(dc),ns(by),ns(sb))},token:t,providedIn:"root"}),t})(),mb=0,gb=(()=>{class t{constructor(t,e,n,s,i,r,o,a,l,c,h){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=n,this._positionBuilder=s,this._keyboardDispatcher=i,this._injector=r,this._ngZone=o,this._document=a,this._directionality=l,this._location=c,this._outsideClickDispatcher=h}create(t){const e=this._createHostElement(),n=this._createPaneElement(e),s=this._createPortalOutlet(n),i=new Qy(t);return i.direction=i.direction||this._directionality.value,new ib(s,e,n,i,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}position(){return this._positionBuilder}_createPaneElement(t){const e=this._document.createElement("div");return e.id="cdk-overlay-"+mb++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(rc)),new Fy(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return t.\u0275fac=function(e){return new(e||t)(ns(Ky),ns(sb),ns(Go),ns(fb),ns(tb),ns(Xr),ns(Bl),ns(dc),ns(Ey),ns(kc),ns(eb))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const _b={provide:new Vn("cdk-connected-overlay-scroll-strategy"),deps:[gb],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};let yb=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({providers:[gb,_b],imports:[[ky,Ny,Py],Py]}),t})();class bb{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new vb(t,this.dueTime,this.scheduler))}}class vb extends f{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(xb,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function xb(t){t.debouncedNext()}"undefined"!=typeof Element&&Element;const wb=new Vn("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),Sb=new Vn("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let Eb=(()=>{class t{constructor(t,e,n,s){this._ngZone=e,this._defaultOptions=s,this._document=n,this._liveElement=t||this._createLiveElement()}announce(t,...e){const n=this._defaultOptions;let s,i;return 1===e.length&&"number"==typeof e[0]?i=e[0]:[s,i]=e,this.clear(),clearTimeout(this._previousTimeout),s||(s=n&&n.politeness?n.politeness:"polite"),null==i&&n&&(i=n.duration),this._liveElement.setAttribute("aria-live",s),this._ngZone.runOutsideAngular(()=>new Promise(e=>{clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,e(),"number"==typeof i&&(this._previousTimeout=setTimeout(()=>this.clear(),i))},100)}))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)}_createLiveElement(){const t="cdk-live-announcer-element",e=this._document.getElementsByClassName(t),n=this._document.createElement("div");for(let s=0;s<e.length;s++)e[s].parentNode.removeChild(e[s]);return n.classList.add(t),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),this._document.body.appendChild(n),n}}return t.\u0275fac=function(e){return new(e||t)(ns(wb,8),ns(Bl),ns(dc),ns(Sb,8))},t.\u0275prov=ut({factory:function(){return new t(ns(wb,8),ns(Bl),ns(dc),ns(Sb,8))},token:t,providedIn:"root"}),t})();function kb(t){return 0===t.buttons}function Cb(t){const e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}const Tb=new Vn("cdk-focus-monitor-default-options"),Ob=xy({passive:!0,capture:!0});let Pb=(()=>{class t{constructor(t,e,n,s){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=()=>{this._lastTouchTarget=null,this._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=t=>{if(!this._lastTouchTarget){const e=kb(t)?"keyboard":"mouse";this._setOriginForCurrentEventQueue(e)}},this._documentTouchstartListener=t=>{Cb(t)?this._lastTouchTarget||this._setOriginForCurrentEventQueue("keyboard"):(null!=this._touchTimeoutId&&clearTimeout(this._touchTimeoutId),this._lastTouchTarget=Ib(t),this._touchTimeoutId=setTimeout(()=>this._lastTouchTarget=null,650))},this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._rootNodeFocusAndBlurListener=t=>{const e=Ib(t),n="focus"===t.type?this._onFocus:this._onBlur;for(let s=e;s;s=s.parentElement)n.call(this,t,s)},this._document=n,this._detectionMode=(null==s?void 0:s.detectionMode)||0}monitor(t,e=!1){const n=ey(t);if(!this._platform.isBrowser||1!==n.nodeType)return Eh(null);const s=function(t){if(function(){if(null==yy){const t="undefined"!=typeof document?document.head:null;yy=!(!t||!t.createShadowRoot&&!t.attachShadow)}return yy}()){const e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}(n)||this._getDocument(),i=this._elementInfo.get(n);if(i)return e&&(i.checkChildren=!0),i.subject;const r={checkChildren:e,subject:new S,rootNode:s};return this._elementInfo.set(n,r),this._registerGlobalListeners(r),r.subject}stopMonitoring(t){const e=ey(t),n=this._elementInfo.get(e);n&&(n.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(n))}focusVia(t,e,n){const s=ey(t);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([t,n])=>this._originChanged(t,e,n)):(this._setOriginForCurrentEventQueue(e),"function"==typeof s.focus&&s.focus(n))}ngOnDestroy(){this._elementInfo.forEach((t,e)=>this.stopMonitoring(e))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_toggleClass(t,e,n){n?t.classList.add(e):t.classList.remove(e)}_getFocusOrigin(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}_setClasses(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}_setOriginForCurrentEventQueue(t){this._ngZone.runOutsideAngular(()=>{this._origin=t,0===this._detectionMode&&(this._originTimeoutId=setTimeout(()=>this._origin=null,1))})}_wasCausedByTouch(t){const e=Ib(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}_onFocus(t,e){const n=this._elementInfo.get(e);n&&(n.checkChildren||e===Ib(t))&&this._originChanged(e,this._getFocusOrigin(t),n)}_onBlur(t,e){const n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))}_emitOrigin(t,e){this._ngZone.run(()=>t.next(e))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const e=t.rootNode,n=this._rootNodeFocusListenerCount.get(e)||0;n||this._ngZone.runOutsideAngular(()=>{e.addEventListener("focus",this._rootNodeFocusAndBlurListener,Ob),e.addEventListener("blur",this._rootNodeFocusAndBlurListener,Ob)}),this._rootNodeFocusListenerCount.set(e,n+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(()=>{const t=this._getDocument(),e=this._getWindow();t.addEventListener("keydown",this._documentKeydownListener,Ob),t.addEventListener("mousedown",this._documentMousedownListener,Ob),t.addEventListener("touchstart",this._documentTouchstartListener,Ob),e.addEventListener("focus",this._windowFocusListener)})}_removeGlobalListeners(t){const e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){const t=this._rootNodeFocusListenerCount.get(e);t>1?this._rootNodeFocusListenerCount.set(e,t-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Ob),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Ob),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){const t=this._getDocument(),e=this._getWindow();t.removeEventListener("keydown",this._documentKeydownListener,Ob),t.removeEventListener("mousedown",this._documentMousedownListener,Ob),t.removeEventListener("touchstart",this._documentTouchstartListener,Ob),e.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}_originChanged(t,e,n){this._setClasses(t,e),this._emitOrigin(n.subject,e),this._lastFocusOrigin=e}_getClosestElementsInfo(t){const e=[];return this._elementInfo.forEach((n,s)=>{(s===t||n.checkChildren&&s.contains(t))&&e.push([s,n])}),e}}return t.\u0275fac=function(e){return new(e||t)(ns(Bl),ns(by),ns(dc,8),ns(Tb,8))},t.\u0275prov=ut({factory:function(){return new t(ns(Bl),ns(by),ns(dc,8),ns(Tb,8))},token:t,providedIn:"root"}),t})();function Ib(t){return t.composedPath?t.composedPath()[0]:t.target}const Ab="cdk-high-contrast-black-on-white",Rb="cdk-high-contrast-white-on-black",Mb="cdk-high-contrast-active";let Db=(()=>{class t{constructor(t,e){this._platform=t,this._document=e}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 e=this._document.defaultView||window,n=e&&e.getComputedStyle?e.getComputedStyle(t):null,s=(n&&n.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),s){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(Mb),t.remove(Ab),t.remove(Rb),this._hasCheckedHighContrastMode=!0;const e=this.getHighContrastMode();1===e?(t.add(Mb),t.add(Ab)):2===e&&(t.add(Mb),t.add(Rb))}}}return t.\u0275fac=function(e){return new(e||t)(ns(by),ns(dc))},t.\u0275prov=ut({factory:function(){return new t(ns(by),ns(dc))},token:t,providedIn:"root"}),t})();const Fb=new oa("12.0.5");class Lb{}const Nb="*";function jb(t,e){return{type:7,name:t,definitions:e,options:{}}}function Bb(t,e=null){return{type:4,styles:e,timings:t}}function Vb(t,e=null){return{type:2,steps:t,options:e}}function zb(t){return{type:6,styles:t,offset:null}}function Hb(t,e,n){return{type:0,name:t,styles:e,options:n}}function $b(t,e,n=null){return{type:1,expr:t,animation:e,options:n}}function Wb(t){Promise.resolve(null).then(t)}class qb{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){Wb(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class Ub{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,s=0;const i=this.players.length;0==i?Wb(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==i&&this._onFinish()}),t.onDestroy(()=>{++n==i&&this._onDestroy()}),t.onStart(()=>{++s==i&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){const t=this.players.reduce((t,e)=>null===t||e.totalTime>t.totalTime?e:t,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function Zb(){return"undefined"!=typeof window&&void 0!==window.document}function Yb(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Kb(t){switch(t.length){case 0:return new qb;case 1:return t[0];default:return new Ub(t)}}function Qb(t,e,n,s,i={},r={}){const o=[],a=[];let l=-1,c=null;if(s.forEach(t=>{const n=t.offset,s=n==l,h=s&&c||{};Object.keys(t).forEach(n=>{let s=n,a=t[n];if("offset"!==n)switch(s=e.normalizePropertyName(s,o),a){case"!":a=i[n];break;case Nb:a=r[n];break;default:a=e.normalizeStyleValue(n,s,a,o)}h[s]=a}),s||a.push(h),c=h,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function Xb(t,e,n,s){switch(e){case"start":t.onStart(()=>s(n&&Gb(n,"start",t)));break;case"done":t.onDone(()=>s(n&&Gb(n,"done",t)));break;case"destroy":t.onDestroy(()=>s(n&&Gb(n,"destroy",t)))}}function Gb(t,e,n){const s=n.totalTime,i=Jb(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==s?t.totalTime:s,!!n.disabled),r=t._data;return null!=r&&(i._data=r),i}function Jb(t,e,n,s,i="",r=0,o){return{element:t,triggerName:e,fromState:n,toState:s,phaseName:i,totalTime:r,disabled:!!o}}function tv(t,e,n){let s;return t instanceof Map?(s=t.get(e),s||t.set(e,s=n)):(s=t[e],s||(s=t[e]=n)),s}function ev(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let nv=(t,e)=>!1,sv=(t,e)=>!1,iv=(t,e,n)=>[];const rv=Yb();(rv||"undefined"!=typeof Element)&&(nv=Zb()?(t,e)=>{for(;e&&e!==document.documentElement;){if(e===t)return!0;e=e.parentNode||e.host}return!1}:(t,e)=>t.contains(e),sv=(()=>{if(rv||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):sv}})(),iv=(t,e,n)=>{let s=[];if(n){const n=t.querySelectorAll(e);for(let t=0;t<n.length;t++)s.push(n[t])}else{const n=t.querySelector(e);n&&s.push(n)}return s});let ov=null,av=!1;function lv(t){ov||(ov=("undefined"!=typeof document?document.body:null)||{},av=!!ov.style&&"WebkitAppearance"in ov.style);let e=!0;return ov.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in ov.style,!e&&av)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in ov.style),e}const cv=sv,hv=nv,uv=iv;function dv(t){const e={};return Object.keys(t).forEach(n=>{const s=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[s]=t[n]}),e}let pv=(()=>{class t{validateStyleProperty(t){return lv(t)}matchesElement(t,e){return cv(t,e)}containsElement(t,e){return hv(t,e)}query(t,e,n){return uv(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,s,i,r=[],o){return new qb(n,s)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),fv=(()=>{class t{}return t.NOOP=new pv,t})();const mv="ng-enter",gv="ng-leave",_v="ng-trigger",yv=".ng-trigger",bv="ng-animating",vv=".ng-animating";function xv(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:wv(parseFloat(e[1]),e[2])}function wv(t,e){switch(e){case"s":return 1e3*t;default:return t}}function Sv(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let s,i=0,r="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};s=wv(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(i=wv(parseFloat(o),n[4]));const a=n[5];a&&(r=a)}else s=t;if(!n){let n=!1,r=e.length;s<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),i<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(r,0,`The provided timing value "${t}" is invalid.`)}return{duration:s,delay:i,easing:r}}(t,e,n)}function Ev(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function kv(t,e,n={}){if(e)for(let s in t)n[s]=t[s];else Ev(t,n);return n}function Cv(t,e,n){return n?e+":"+n+";":""}function Tv(t){let e="";for(let n=0;n<t.style.length;n++){const s=t.style.item(n);e+=Cv(0,s,t.style.getPropertyValue(s))}for(const n in t.style)t.style.hasOwnProperty(n)&&!n.startsWith("_")&&(e+=Cv(0,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[n]));t.setAttribute("style",e)}function Ov(t,e,n){t.style&&(Object.keys(e).forEach(s=>{const i=Lv(s);n&&!n.hasOwnProperty(s)&&(n[s]=t.style[i]),t.style[i]=e[s]}),Yb()&&Tv(t))}function Pv(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=Lv(e);t.style[n]=""}),Yb()&&Tv(t))}function Iv(t){return Array.isArray(t)?1==t.length?t[0]:Vb(t):t}const Av=new RegExp("{{\\s*(.+?)\\s*}}","g");function Rv(t){let e=[];if("string"==typeof t){let n;for(;n=Av.exec(t);)e.push(n[1]);Av.lastIndex=0}return e}function Mv(t,e,n){const s=t.toString(),i=s.replace(Av,(t,s)=>{let i=e[s];return e.hasOwnProperty(s)||(n.push(`Please provide a value for the animation param ${s}`),i=""),i.toString()});return i==s?t:i}function Dv(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const Fv=/-+([a-z0-9])/g;function Lv(t){return t.replace(Fv,(...t)=>t[1].toUpperCase())}function Nv(t,e){return 0===t||0===e}function jv(t,e,n){const s=Object.keys(n);if(s.length&&e.length){let r=e[0],o=[];if(s.forEach(t=>{r.hasOwnProperty(t)||o.push(t),r[t]=n[t]}),o.length)for(var i=1;i<e.length;i++){let n=e[i];o.forEach(function(e){n[e]=Vv(t,e)})}}return e}function Bv(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error(`Unable to resolve animation metadata node #${e.type}`)}}function Vv(t,e){return window.getComputedStyle(t)[e]}const zv="*";function Hv(t,e){const n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,n){if(":"==t[0]){const s=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,n);if("function"==typeof s)return void e.push(s);t=s}const s=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==s||s.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const i=s[1],r=s[2],o=s[3];e.push(qv(i,o)),"<"!=r[0]||i==zv&&o==zv||e.push(qv(o,i))}(t,n,e)):n.push(t),n}const $v=new Set(["true","1"]),Wv=new Set(["false","0"]);function qv(t,e){const n=$v.has(t)||Wv.has(t),s=$v.has(e)||Wv.has(e);return(i,r)=>{let o=t==zv||t==i,a=e==zv||e==r;return!o&&n&&"boolean"==typeof i&&(o=i?$v.has(t):Wv.has(t)),!a&&s&&"boolean"==typeof r&&(a=r?$v.has(e):Wv.has(e)),o&&a}}const Uv=new RegExp("s*:selfs*,?","g");function Zv(t,e,n){return new Yv(t).build(e,n)}class Yv{constructor(t){this._driver=t}build(t,e){const n=new Kv(e);return this._resetContextStyleTimingState(n),Bv(this,Iv(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,s=e.depCount=0;const i=[],r=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,s=n.name;s.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,i.push(this.visitState(n,e))}),n.name=s}else if(1==t.type){const i=this.visitTransition(t,e);n+=i.queryCount,s+=i.depCount,r.push(i)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:i,transitions:r,queryCount:n,depCount:s,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),s=t.options&&t.options.params||null;if(n.containsDynamicStyles){const i=new Set,r=s||{};if(n.styles.forEach(t=>{if(Qv(t)){const e=t;Object.keys(e).forEach(t=>{Rv(e[t]).forEach(t=>{r.hasOwnProperty(t)||i.add(t)})})}}),i.size){const n=Dv(i.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:s?{params:s}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Bv(this,Iv(t.animation),e);return{type:1,matchers:Hv(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Xv(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>Bv(this,t,e)),options:Xv(t.options)}}visitGroup(t,e){const n=e.currentTime;let s=0;const i=t.steps.map(t=>{e.currentTime=n;const i=Bv(this,t,e);return s=Math.max(s,e.currentTime),i});return e.currentTime=s,{type:3,steps:i,options:Xv(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return Gv(Sv(t,e).duration,0,"");const s=t;if(s.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=Gv(0,0,"");return t.dynamic=!0,t.strValue=s,t}return n=n||Sv(s,e),Gv(n.duration,n.delay,n.easing)}(t.timings,e.errors);let s;e.currentAnimateTimings=n;let i=t.styles?t.styles:zb({});if(5==i.type)s=this.visitKeyframes(i,e);else{let i=t.styles,r=!1;if(!i){r=!0;const t={};n.easing&&(t.easing=n.easing),i=zb(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(i,e);o.isEmptyStep=r,s=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:s,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==Nb?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let s=!1,i=null;return n.forEach(t=>{if(Qv(t)){const e=t,n=e.easing;if(n&&(i=n,delete e.easing),!s)for(let t in e)if(e[t].toString().indexOf("{{")>=0){s=!0;break}}}),{type:6,styles:n,easing:i,offset:t.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let s=e.currentTime,i=e.currentTime;n&&i>0&&(i-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const r=e.collectedStyles[e.currentQuerySelector],o=r[n];let a=!0;o&&(i!=s&&i>=o.startTime&&s<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${i}ms" and "${s}ms"`),a=!1),i=o.startTime),a&&(r[n]={startTime:i,endTime:s}),e.options&&function(t,e,n){const s=e.params||{},i=Rv(t);i.length&&i.forEach(t=>{s.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let s=0;const i=[];let r=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(Qv(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(Qv(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(s++,c=n.offset=l),o=o||c<0||c>1,r=r||c<a,a=c,i.push(c),n});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),r&&e.errors.push("Please ensure that all keyframe offsets are in order");const c=t.steps.length;let h=0;s>0&&s<c?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==s&&(h=1/(c-1));const u=c-1,d=e.currentTime,p=e.currentAnimateTimings,f=p.duration;return l.forEach((t,s)=>{const r=h>0?s==u?1:h*s:i[s],o=r*f;e.currentTime=d+p.delay+o,p.duration=o,this._validateStyleAst(t,e),t.offset=r,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:Bv(this,Iv(t.animation),e),options:Xv(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Xv(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Xv(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,s=t.options||{};e.queryCount++,e.currentQuery=t;const[i,r]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(Uv,"")),[t=t.replace(/@\*/g,yv).replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,vv),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+i:i,tv(e.collectedStyles,e.currentQuerySelector,{});const o=Bv(this,Iv(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:i,limit:s.limit||0,optional:!!s.optional,includeSelf:r,animation:o,originalSelector:t.selector,options:Xv(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Sv(t.timings,e.errors,!0);return{type:12,animation:Bv(this,Iv(t.animation),e),timings:n,options:null}}}class Kv{constructor(t){this.errors=t,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 Qv(t){return!Array.isArray(t)&&"object"==typeof t}function Xv(t){var e;return t?(t=Ev(t)).params&&(t.params=(e=t.params)?Ev(e):null):t={},t}function Gv(t,e,n){return{duration:t,delay:e,easing:n}}function Jv(t,e,n,s,i,r,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:s,duration:i,delay:r,totalTime:i+r,easing:o,subTimeline:a}}class tx{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const ex=new RegExp(":enter","g"),nx=new RegExp(":leave","g");function sx(t,e,n,s,i,r={},o={},a,l,c=[]){return(new ix).buildKeyframes(t,e,n,s,i,r,o,a,l,c)}class ix{buildKeyframes(t,e,n,s,i,r,o,a,l,c=[]){l=l||new tx;const h=new ox(t,e,l,s,i,c,[]);h.options=a,h.currentTimeline.setStyles([r],null,h.errors,a),Bv(this,n,h);const u=h.timelines.filter(t=>t.containsAnimation());if(u.length&&Object.keys(o).length){const t=u[u.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,h.errors,a)}return u.length?u.map(t=>t.buildKeyframes()):[Jv(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const s=e.createSubContext(t.options),i=e.currentTimeline.currentTime,r=this._visitSubInstructions(n,s,s.options);i!=r&&e.transformIntoNewTimeline(r)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const i=null!=n.duration?xv(n.duration):null,r=null!=n.delay?xv(n.delay):null;return 0!==i&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,i,r);s=Math.max(s,n.duration+n.delay)}),s}visitReference(t,e){e.updateOptions(t.options,!0),Bv(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let s=e;const i=t.options;if(i&&(i.params||i.delay)&&(s=e.createSubContext(i),s.transformIntoNewTimeline(),null!=i.delay)){6==s.previousNode.type&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=rx);const t=xv(i.delay);s.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>Bv(this,t,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>n&&s.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let s=e.currentTimeline.currentTime;const i=t.options&&t.options.delay?xv(t.options.delay):0;t.steps.forEach(r=>{const o=e.createSubContext(t.options);i&&o.delayNextStep(i),Bv(this,r,o),s=Math.max(s,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(s),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Sv(e.params?Mv(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),s=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),s.snapshotCurrentStyles());const i=t.style;5==i.type?this.visitKeyframes(i,e):(e.incrementTime(n.duration),this.visitStyle(i,e),s.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,s=e.currentAnimateTimings;!s&&n.getCurrentStyleProperties().length&&n.forwardFrame();const i=s&&s.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(i):n.setStyles(t.styles,i,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,s=e.currentTimeline.duration,i=n.duration,r=e.createSubContext().currentTimeline;r.easing=n.easing,t.styles.forEach(t=>{r.forwardTime((t.offset||0)*i),r.setStyles(t.styles,t.easing,e.errors,e.options),r.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(r),e.transformIntoNewTimeline(s+i),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,s=t.options||{},i=s.delay?xv(s.delay):0;i&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=rx);let r=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!s.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,s)=>{e.currentQueryIndex=s;const o=e.createSubContext(t.options,n);i&&o.delayNextStep(i),n===e.element&&(a=o.currentTimeline),Bv(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),r=Math.max(r,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(r),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,s=e.currentTimeline,i=t.timings,r=Math.abs(i.duration),o=r*(e.currentQueryTotal-1);let a=r*e.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;Bv(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=s.currentTime-c+(s.startTime-n.currentTimeline.startTime)}}const rx={};class ox{constructor(t,e,n,s,i,r,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=s,this._leaveClassName=i,this.errors=r,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=rx,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new ax(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let s=this.options;null!=n.duration&&(s.duration=xv(n.duration)),null!=n.delay&&(s.delay=xv(n.delay));const i=n.params;if(i){let t=s.params;t||(t=this.options.params={}),Object.keys(i).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=Mv(i[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const s=e||this.element,i=new ox(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,n||0));return i.previousNode=this.previousNode,i.currentAnimateTimings=this.currentAnimateTimings,i.options=this._copyOptions(),i.updateOptions(t),i.currentQueryIndex=this.currentQueryIndex,i.currentQueryTotal=this.currentQueryTotal,i.parentContext=this,this.subContextCount++,i}transformIntoNewTimeline(t){return this.previousNode=rx,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const s={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},i=new lx(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,s,t.stretchStartingKeyframe);return this.timelines.push(i),s}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,s,i,r){let o=[];if(s&&o.push(this.element),t.length>0){t=(t=t.replace(ex,"."+this._enterClassName)).replace(nx,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return i||0!=o.length||r.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class ax{constructor(t,e,n,s){this._driver=t,this.element=e,this.startTime=n,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(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,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(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new ax(this._driver,t,e||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(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||Nb,this._currentKeyframe[t]=Nb}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,s){e&&(this._previousKeyframe.easing=e);const i=s&&s.params||{},r=function(t,e){const n={};let s;return t.forEach(t=>{"*"===t?(s=s||Object.keys(e),s.forEach(t=>{n[t]=Nb})):kv(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(r).forEach(t=>{const e=Mv(r[t],i,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:Nb),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],s=t._styleSummary[e];(!n||s.time>n.time)&&this._updateStyle(e,s.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((i,r)=>{const o=kv(i,!0);Object.keys(o).forEach(n=>{const s=o[n];"!"==s?t.add(n):s==Nb&&e.add(n)}),n||(o.offset=r/this.duration),s.push(o)});const i=t.size?Dv(t.values()):[],r=e.size?Dv(e.values()):[];if(n){const t=s[0],e=Ev(t);t.offset=0,e.offset=1,s=[t,e]}return Jv(this.element,s,i,r,this.duration,this.startTime,this.easing,!1)}}class lx extends ax{constructor(t,e,n,s,i,r,o=!1){super(t,e,r.delay),this.element=e,this.keyframes=n,this.preStyleProps=s,this.postStyleProps=i,this._stretchStartingKeyframe=o,this.timings={duration:r.duration,delay:r.delay,easing:r.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:s}=this.timings;if(this._stretchStartingKeyframe&&e){const i=[],r=n+e,o=e/r,a=kv(t[0],!1);a.offset=0,i.push(a);const l=kv(t[0],!1);l.offset=cx(o),i.push(l);const c=t.length-1;for(let s=1;s<=c;s++){let o=kv(t[s],!1);o.offset=cx((e+o.offset*n)/r),i.push(o)}n=r,e=0,s="",t=i}return Jv(this.element,t,this.preStyleProps,this.postStyleProps,n,e,s,!0)}}function cx(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class hx{}class ux extends hx{normalizePropertyName(t,e){return Lv(t)}normalizeStyleValue(t,e,n,s){let i="";const r=n.toString().trim();if(dx[e]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&s.push(`Please provide a CSS unit value for ${t}:${n}`)}return r+i}}const dx=(()=>function(t){const e={};return t.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 px(t,e,n,s,i,r,o,a,l,c,h,u,d){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:n,fromStyles:r,toState:s,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:d}}const fx={};class mx{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,s){return function(t,e,n,s,i){return t.some(t=>t(e,n,s,i))}(this.ast.matchers,t,e,n,s)}buildStyles(t,e,n){const s=this._stateStyles["*"],i=this._stateStyles[t],r=s?s.buildStyles(e,n):{};return i?i.buildStyles(e,n):r}build(t,e,n,s,i,r,o,a,l,c){const h=[],u=this.ast.options&&this.ast.options.params||fx,d=this.buildStyles(n,o&&o.params||fx,h),p=a&&a.params||fx,f=this.buildStyles(s,p,h),m=new Set,g=new Map,_=new Map,y="void"===s,b={params:Object.assign(Object.assign({},u),p)},v=c?[]:sx(t,e,this.ast.animation,i,r,d,f,b,l,h);let x=0;if(v.forEach(t=>{x=Math.max(t.duration+t.delay,x)}),h.length)return px(e,this._triggerName,n,s,y,d,f,[],[],g,_,x,h);v.forEach(t=>{const n=t.element,s=tv(g,n,{});t.preStyleProps.forEach(t=>s[t]=!0);const i=tv(_,n,{});t.postStyleProps.forEach(t=>i[t]=!0),n!==e&&m.add(n)});const w=Dv(m.values());return px(e,this._triggerName,n,s,y,d,f,v,w,g,_,x)}}class gx{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},s=Ev(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(s[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const i=t;Object.keys(i).forEach(t=>{let r=i[t];r.length>1&&(r=Mv(r,s,e)),n[t]=r})}}),n}}class _x{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new gx(t.style,t.options&&t.options.params||{})}),yx(this.states,"true","1"),yx(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new mx(t,e,this.states))}),this.fallbackTransition=new mx(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,s){return this.transitionFactories.find(i=>i.match(t,e,n,s))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function yx(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const bx=new tx;class vx{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],s=Zv(this._driver,e,n);if(n.length)throw new Error(`Unable to build the animation due to the following errors: ${n.join("\n")}`);this._animations[t]=s}_buildPlayer(t,e,n){const s=t.element,i=Qb(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(s,i,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const s=[],i=this._animations[t];let r;const o=new Map;if(i?(r=sx(this._driver,e,i,mv,gv,{},{},n,bx,s),r.forEach(t=>{const e=tv(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(s.push("The requested animation doesn't exist or has already been destroyed"),r=[]),s.length)throw new Error(`Unable to create the animation due to the following errors: ${s.join("\n")}`);o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,Nb)})});const a=Kb(r.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,n,s){const i=Jb(e,"","","");return Xb(this._getPlayer(t),n,i,s),()=>{}}command(t,e,n,s){if("register"==n)return void this.register(t,s[0]);if("create"==n)return void this.create(t,e,s[0]||{});const i=this._getPlayer(t);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(s[0]));break;case"destroy":this.destroy(t)}}}const xx="ng-animate-queued",wx="ng-animate-disabled",Sx=".ng-animate-disabled",Ex=[],kx={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Cx={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class Tx{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(s=n?t.value:t)?s:null,n){const e=Ev(t);delete e.value,this.options=e}else this.options={};var s;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const Ox="void",Px=new Tx(Ox);class Ix{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Nx(e,this._hostClassName)}listen(t,e,n,s){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(i=n)&&"done"!=i)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var i;const r=tv(this._elementListeners,t,[]),o={name:e,phase:n,callback:s};r.push(o);const a=tv(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(Nx(t,_v),Nx(t,"ng-trigger-"+e),a[e]=Px),()=>{this._engine.afterFlush(()=>{const t=r.indexOf(o);t>=0&&r.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,s=!0){const i=this._getTrigger(e),r=new Rx(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Nx(t,_v),Nx(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new Tx(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=Px),l.value!==Ox&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),s=Object.keys(e);if(n.length!=s.length)return!1;for(let i=0;i<n.length;i++){const s=n[i];if(!e.hasOwnProperty(s)||t[s]!==e[s])return!1}return!0}(a.params,l.params)){const e=[],n=i.matchStyles(a.value,a.params,e),s=i.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{Pv(t,n),Ov(t,s)})}return}const c=tv(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let h=i.matchTransition(a.value,l.value,t,l.params),u=!1;if(!h){if(!s)return;h=i.fallbackTransition,u=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:a,toState:l,player:r,isFallbackTransition:u}),u||(Nx(t,xx),r.onStart(()=>{jx(t,xx)})),r.onDone(()=>{let e=this.players.indexOf(r);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(r);t>=0&&n.splice(t,1)}}),this.players.push(r),c.push(r),r}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,yv,!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,s){const i=this._engine.statesByElement.get(t);if(i){const r=[];if(Object.keys(i).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,Ox,s);n&&r.push(n)}}),r.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Kb(r).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),n=this._engine.statesByElement.get(t);if(e&&n){const s=new Set;e.forEach(e=>{const i=e.name;if(s.has(i))return;s.add(i);const r=this._triggers[i].fallbackTransition,o=n[i]||Px,a=new Tx(Ox),l=new Rx(this.id,i,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:i,transition:r,fromState:o,toState:a,player:l,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let s=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)s=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(t),s)n.markElementAsRemoved(this.id,t,!1,e);else{const s=t.__ng_removed;s&&s!==kx||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Nx(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const s=n.player;if(s.destroyed)return;const i=n.element,r=this._elementListeners.get(i);r&&r.forEach(e=>{if(e.name==n.triggerName){const s=Jb(i,n.triggerName,n.fromState.value,n.toState.value);s._data=t,Xb(n.player,e.phase,s,e.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,s=e.transition.ast.depCount;return 0==n||0==s?n-s:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Ax{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,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=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new Ix(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let s=!1;for(let i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,e)){this._namespaceList.splice(i+1,0,t),s=!0;break}s||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let s=this._namespaceLookup[t];s&&s.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let s=0;s<t.length;s++){const i=n[t[s]].namespaceId;if(i){const t=this._fetchNamespace(i);t&&e.add(t)}}}return e}trigger(t,e,n,s){if(Mx(e)){const i=this._fetchNamespace(t);if(i)return i.trigger(e,n,s),!0}return!1}insertNode(t,e,n,s){if(!Mx(e))return;const i=e.__ng_removed;if(i&&i.setForRemoval){i.setForRemoval=!1,i.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(e,n)}s&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Nx(t,wx)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),jx(t,wx))}removeNode(t,e,n,s){if(Mx(e)){const i=t?this._fetchNamespace(t):null;if(i?i.removeNode(e,s):this.markElementAsRemoved(t,e,!1,s),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,s)}}else this._onRemovalComplete(e,s)}markElementAsRemoved(t,e,n,s){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:s,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,s,i){return Mx(e)?this._fetchNamespace(t).listen(e,n,s,i):()=>{}}_buildInstruction(t,e,n,s,i){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,s,t.fromState.options,t.toState.options,e,i)}destroyInnerAnimations(t){let e=this.driver.query(t,yv,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,vv,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Kb(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=kx,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,Sx)&&this.markElementAsDisabled(t,!1),this.driver.query(t,Sx,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)Nx(this.collectedEnterElements[n],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{e=this._flushAnimations(n,t)}finally{for(let t=0;t<n.length;t++)n[t]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++)this.processLeaveNode(this.collectedLeaveElements[n]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?Kb(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const n=new tx,s=[],i=new Map,r=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n<e.length;n++)c.add(e[n])});const h=this.bodyNode,u=Array.from(this.statesByElement.keys()),d=Lx(u,this.collectedEnterElements),p=new Map;let f=0;d.forEach((t,e)=>{const n=mv+f++;p.set(e,n),t.forEach(t=>Nx(t,n))});const m=[],g=new Set,_=new Set;for(let I=0;I<this.collectedLeaveElements.length;I++){const t=this.collectedLeaveElements[I],e=t.__ng_removed;e&&e.setForRemoval&&(m.push(t),g.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>g.add(t)):_.add(t))}const y=new Map,b=Lx(u,Array.from(g));b.forEach((t,e)=>{const n=gv+f++;y.set(e,n),t.forEach(t=>Nx(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=p.get(e);t.forEach(t=>jx(t,n))}),b.forEach((t,e)=>{const n=y.get(e);t.forEach(t=>jx(t,n))}),m.forEach(t=>{this.processLeaveNode(t)})});const v=[],x=[];for(let I=this._namespaceList.length-1;I>=0;I--)this._namespaceList[I].drainQueuedTransitions(e).forEach(t=>{const e=t.player,i=t.element;if(v.push(e),this.collectedEnterElements.length){const t=i.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!h||!this.driver.containsElement(h,i),u=y.get(i),d=p.get(i),f=this._buildInstruction(t,n,d,u,c);if(f.errors&&f.errors.length)x.push(f);else{if(c)return e.onStart(()=>Pv(i,f.fromStyles)),e.onDestroy(()=>Ov(i,f.toStyles)),void s.push(e);if(t.isFallbackTransition)return e.onStart(()=>Pv(i,f.fromStyles)),e.onDestroy(()=>Ov(i,f.toStyles)),void s.push(e);f.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(i,f.timelines),r.push({instruction:f,player:e,element:i}),f.queriedElements.forEach(t=>tv(o,t,[]).push(e)),f.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),f.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let s=l.get(e);s||l.set(e,s=new Set),n.forEach(t=>s.add(t))})}});if(x.length){const t=[];x.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),v.forEach(t=>t.destroy()),this.reportError(t)}const w=new Map,S=new Map;r.forEach(t=>{const e=t.element;n.has(e)&&(S.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,w))}),s.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{tv(w,e,[]).push(t),t.destroy()})});const E=m.filter(t=>zx(t,a,l)),k=new Map;Fx(k,this.driver,_,l,Nb).forEach(t=>{zx(t,a,l)&&E.push(t)});const C=new Map;d.forEach((t,e)=>{Fx(C,this.driver,new Set(t),a,"!")}),E.forEach(t=>{const e=k.get(t),n=C.get(t);k.set(t,Object.assign(Object.assign({},e),n))});const T=[],O=[],P={};r.forEach(t=>{const{element:e,player:r,instruction:o}=t;if(n.has(e)){if(c.has(e))return r.onDestroy(()=>Ov(e,o.toStyles)),r.disabled=!0,r.overrideTotalTime(o.totalTime),void s.push(r);let t=P;if(S.size>1){let n=e;const s=[];for(;n=n.parentNode;){const e=S.get(n);if(e){t=e;break}s.push(n)}s.forEach(e=>S.set(e,t))}const n=this._buildAnimation(r.namespaceId,o,w,i,C,k);if(r.setRealPlayer(n),t===P)T.push(r);else{const e=this.playersByElement.get(t);e&&e.length&&(r.parentPlayer=Kb(e)),s.push(r)}}else Pv(e,o.fromStyles),r.onDestroy(()=>Ov(e,o.toStyles)),O.push(r),c.has(e)&&s.push(r)}),O.forEach(t=>{const e=i.get(t.element);if(e&&e.length){const n=Kb(e);t.setRealPlayer(n)}}),s.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let I=0;I<m.length;I++){const t=m[I],e=t.__ng_removed;if(jx(t,gv),e&&e.hasAnimation)continue;let n=[];if(o.size){let e=o.get(t);e&&e.length&&n.push(...e);let s=this.driver.query(t,vv,!0);for(let t=0;t<s.length;t++){let e=o.get(s[t]);e&&e.length&&n.push(...e)}}const s=n.filter(t=>!t.destroyed);s.length?Bx(this,t,s):this.processLeaveNode(t)}return m.length=0,T.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),T}elementContainsData(t,e){let n=!1;const s=e.__ng_removed;return s&&s.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,s,i){let r=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(r=e)}else{const e=this.playersByElement.get(t);if(e){const t=!i||i==Ox;e.forEach(e=>{e.queued||(t||e.triggerName==s)&&r.push(e)})}}return(n||s)&&(r=r.filter(t=>!(n&&n!=t.namespaceId||s&&s!=t.triggerName))),r}_beforeAnimationBuild(t,e,n){const s=e.element,i=e.isRemovalTransition?void 0:t,r=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==s,l=tv(n,t,[]);this._getPreviousPlayers(t,a,i,r,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Pv(s,e.fromStyles)}_buildAnimation(t,e,n,s,i,r){const o=e.triggerName,a=e.element,l=[],c=new Set,h=new Set,u=e.timelines.map(e=>{const u=e.element;c.add(u);const d=u.__ng_removed;if(d&&d.removedBeforeQueried)return new qb(e.duration,e.delay);const p=u!==a,f=function(t){const e=[];return Vx(t,e),e}((n.get(u)||Ex).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===u),m=i.get(u),g=r.get(u),_=Qb(0,this._normalizer,0,e.keyframes,m,g),y=this._buildPlayer(e,_,f);if(e.subTimeline&&s&&h.add(u),p){const e=new Rx(t,o,u);e.setRealPlayer(y),l.push(e)}return y});l.forEach(t=>{tv(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let s;if(t instanceof Map){if(s=t.get(e),s){if(s.length){const t=s.indexOf(n);s.splice(t,1)}0==s.length&&t.delete(e)}}else if(s=t[e],s){if(s.length){const t=s.indexOf(n);s.splice(t,1)}0==s.length&&delete t[e]}return s}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>Nx(t,bv));const d=Kb(u);return d.onDestroy(()=>{c.forEach(t=>jx(t,bv)),Ov(a,e.toStyles)}),h.forEach(t=>{tv(s,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new qb(t.duration,t.delay)}}class Rx{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new qb,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>Xb(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){tv(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}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(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Mx(t){return t&&1===t.nodeType}function Dx(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function Fx(t,e,n,s,i){const r=[];n.forEach(t=>r.push(Dx(t)));const o=[];s.forEach((n,s)=>{const r={};n.forEach(t=>{const n=r[t]=e.computeStyle(s,t,i);n&&0!=n.length||(s.__ng_removed=Cx,o.push(s))}),t.set(s,r)});let a=0;return n.forEach(t=>Dx(t,r[a++])),o}function Lx(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const s=new Set(e),i=new Map;function r(t){if(!t)return 1;let e=i.get(t);if(e)return e;const o=t.parentNode;return e=n.has(o)?o:s.has(o)?1:r(o),i.set(t,e),e}return e.forEach(t=>{const e=r(t);1!==e&&n.get(e).push(t)}),n}function Nx(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function jx(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function Bx(t,e,n){Kb(n).onDone(()=>t.processLeaveNode(e))}function Vx(t,e){for(let n=0;n<t.length;n++){const s=t[n];s instanceof Ub?Vx(s.players,e):e.push(s)}}function zx(t,e,n){const s=n.get(t);if(!s)return!1;let i=e.get(t);return i?s.forEach(t=>i.add(t)):e.set(t,s),n.delete(t),!0}class Hx{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Ax(t,e,n),this._timelineEngine=new vx(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,s,i){const r=t+"-"+s;let o=this._triggerCache[r];if(!o){const t=[],e=Zv(this._driver,i,t);if(t.length)throw new Error(`The animation trigger "${s}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new _x(t,e)}(s,e),this._triggerCache[r]=o}this._transitionEngine.registerTrigger(e,s,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,s){this._transitionEngine.insertNode(t,e,n,s)}onRemove(t,e,n,s){this._transitionEngine.removeNode(t,e,s||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,s){if("@"==n.charAt(0)){const[t,i]=ev(n);this._timelineEngine.command(t,e,i,s)}else this._transitionEngine.trigger(t,e,n,s)}listen(t,e,n,s,i){if("@"==n.charAt(0)){const[t,s]=ev(n);return this._timelineEngine.listen(t,e,s,i)}return this._transitionEngine.listen(t,e,n,s,i)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function $x(t,e){let n=null,s=null;return Array.isArray(e)&&e.length?(n=qx(e[0]),e.length>1&&(s=qx(e[e.length-1]))):e&&(n=qx(e)),n||s?new Wx(t,n,s):null}let Wx=(()=>{class t{constructor(e,n,s){this._element=e,this._startStyles=n,this._endStyles=s,this._state=0;let i=t.initialStylesByElement.get(e);i||t.initialStylesByElement.set(e,i={}),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&Ov(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Ov(this._element,this._initialStyles),this._endStyles&&(Ov(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Pv(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Pv(this._element,this._endStyles),this._endStyles=null),Ov(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function qx(t){let e=null;const n=Object.keys(t);for(let s=0;s<n.length;s++){const i=n[s];Ux(i)&&(e=e||{},e[i]=t[i])}return e}function Ux(t){return"display"===t||"position"===t}const Zx="animation",Yx="animationend";class Kx{constructor(t,e,n,s,i,r,o){this._element=t,this._name=e,this._duration=n,this._delay=s,this._easing=i,this._fillMode=r,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const n=ew(t,"").trim();n.length&&(function(t,e){let n=0;for(let s=0;s<t.length;s++)","===t.charAt(s)&&n++}(n),e=`${n}, ${e}`),tw(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),Jx(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){Qx(this._element,this._name,"paused")}resume(){Qx(this._element,this._name,"running")}setPosition(t){const e=Xx(this._element,this._name);this._position=t*this._duration,tw(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Jx(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=ew(t,"").split(","),s=Gx(n,e);s>=0&&(n.splice(s,1),tw(t,"",n.join(",")))}(this._element,this._name))}}function Qx(t,e,n){tw(t,"PlayState",n,Xx(t,e))}function Xx(t,e){const n=ew(t,"");return n.indexOf(",")>0?Gx(n.split(","),e):Gx([n],e)}function Gx(t,e){for(let n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function Jx(t,e,n){n?t.removeEventListener(Yx,e):t.addEventListener(Yx,e)}function tw(t,e,n,s){const i=Zx+e;if(null!=s){const e=t.style[i];if(e.length){const t=e.split(",");t[s]=n,n=t.join(",")}}t.style[i]=n}function ew(t,e){return t.style[Zx+e]||""}class nw{constructor(t,e,n,s,i,r,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=s,this._delay=i,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this.currentSnapshot={},this._state=0,this.easing=r||"linear",this.totalTime=s+i,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._state=0,this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Kx(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:Vv(this.element,n))})}this.currentSnapshot=t}}class sw extends qb{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=dv(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class iw{constructor(){this._count=0}validateStyleProperty(t){return lv(t)}matchesElement(t,e){return cv(t,e)}containsElement(t,e){return hv(t,e)}query(t,e,n){return uv(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>dv(t));let s=`@keyframes ${e} {\n`,i="";n.forEach(t=>{i=" ";const e=parseFloat(t.offset);s+=`${i}${100*e}% {\n`,i+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(s+=`${i}animation-timing-function: ${n};\n`));default:return void(s+=`${i}${e}: ${n};\n`)}}),s+=`${i}}\n`}),s+="}\n";const r=document.createElement("style");return r.textContent=s,r}animate(t,e,n,s,i,r=[],o){const a=r.filter(t=>t instanceof nw),l={};Nv(n,s)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=jv(t,e,l));if(0==n)return new sw(t,c);const h="gen_css_kf_"+this._count++,u=this.buildKeyframeElement(t,h,e);(function(t){var e;const n=null===(e=t.getRootNode)||void 0===e?void 0:e.call(t);return"undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot?n:document.head})(t).appendChild(u);const d=$x(t,e),p=new nw(t,e,h,n,s,i,c,d);return p.onDestroy(()=>{var t;(t=u).parentNode.removeChild(t)}),p}}class rw{constructor(t,e,n,s){this.element=t,this.keyframes=e,this.options=n,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=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),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(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Vv(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class ow{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(aw().toString()),this._cssKeyframesDriver=new iw}validateStyleProperty(t){return lv(t)}matchesElement(t,e){return cv(t,e)}containsElement(t,e){return hv(t,e)}query(t,e,n){return uv(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,s,i,r=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,s,i,r);const a={duration:n,delay:s,fill:0==s?"both":"forwards"};i&&(a.easing=i);const l={},c=r.filter(t=>t instanceof rw);Nv(n,s)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const h=$x(t,e=jv(t,e=e.map(t=>kv(t,!1)),l));return new rw(t,e,a,h)}}function aw(){return Zb()&&Element.prototype.animate||{}}let lw=(()=>{class t extends Lb{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:Ct.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?Vb(t):t;return uw(this._renderer,null,e,"register",[n]),new cw(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(ns(ia),ns(dc))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class cw extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new hw(this._id,t,e||{},this._renderer)}}class hw{constructor(t,e,n,s){this.id=t,this.element=e,this._renderer=s,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return uw(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}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(t){this._command("setPosition",t)}getPosition(){var t,e;return null!==(e=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}}function uw(t,e,n,s,i){return t.setProperty(e,`@@${n}:${s}`,i)}const dw="@",pw="@.disabled";let fw=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new mw("",n,this.engine),this._rendererCache.set(n,t)),t}const s=e.id,i=e.id+"-"+this._currentId;this._currentId++,this.engine.register(i,t);const r=e=>{Array.isArray(e)?e.forEach(r):this.engine.registerTrigger(s,i,t,e.name,e)};return e.data.animation.forEach(r),new gw(this,i,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&t<this._microtaskId?this._zone.run(()=>e(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}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 t.\u0275fac=function(e){return new(e||t)(ns(ia),ns(Hx),ns(Bl))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class mw{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n,s=!0){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,s)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,s){this.delegate.setAttribute(t,e,n,s)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,s){this.delegate.setStyle(t,e,n,s)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){e.charAt(0)==dw&&e==pw?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class gw extends mw{constructor(t,e,n,s){super(e,n,s),this.factory=t,this.namespaceId=e}setProperty(t,e,n){e.charAt(0)==dw?"."==e.charAt(1)&&e==pw?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if(e.charAt(0)==dw){const s=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let i=e.substr(1),r="";return i.charAt(0)!=dw&&([i,r]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(i)),this.engine.listen(this.namespaceId,s,i,r,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let _w=(()=>{class t extends Hx{constructor(t,e,n){super(t.body,e,n)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(ns(dc),ns(fv),ns(hx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const yw=new Vn("AnimationModuleType"),bw=[{provide:Lb,useClass:lw},{provide:hx,useFactory:function(){return new ux}},{provide:Hx,useClass:_w},{provide:ia,useFactory:function(t,e,n){return new fw(t,e,n)},deps:[lh,Hx,Bl]}],vw=[{provide:fv,useFactory:function(){return"function"==typeof aw()?new ow:new iw}},{provide:yw,useValue:"BrowserAnimations"},...bw],xw=[{provide:fv,useClass:pv},{provide:yw,useValue:"NoopAnimations"},...bw];let ww=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?xw:vw}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({providers:vw,imports:[Sh]}),t})();const Sw=new oa("12.0.5"),Ew=new Vn("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});let kw,Cw=(()=>{class t{constructor(t,e,n){this._hasDoneGlobalChecks=!1,this._document=n,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=e,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_getWindow(){const t=this._document.defaultView||window;return"object"==typeof t&&t?t:null}_checksAreEnabled(){return Jl()&&!this._isTestEnv()}_isTestEnv(){const t=this._getWindow();return t&&(t.__karma__||t.jasmine)}_checkDoctypeIsDefined(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype)&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(!this._checksAreEnabled()||!1===this._sanityChecks||!this._sanityChecks.theme||!this._document.body||"function"!=typeof getComputedStyle)return;const t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);const e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}_checkCdkVersionMatch(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&Sw.full!==Fb.full&&console.warn("The Angular Material version ("+Sw.full+") does not match the Angular CDK version ("+Fb.full+").\nPlease ensure the versions of these two packages exactly match.")}}return t.\u0275fac=function(e){return new(e||t)(ns(Db),ns(Ew,8),ns(dc))},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({imports:[[ky],ky]}),t})();function Tw(t){return class extends t{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=G_(t)}}}function Ow(t,e){return class extends t{constructor(...t){super(...t),this.defaultColor=e,this.color=e}get color(){return this._color}set color(t){const e=t||this.defaultColor;e!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),e&&this._elementRef.nativeElement.classList.add(`mat-${e}`),this._color=e)}}}function Pw(t){return class extends t{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=G_(t)}}}try{kw="undefined"!=typeof Intl}catch(ZS){kw=!1}class Iw{constructor(t,e,n){this._renderer=t,this.element=e,this.config=n,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const Aw={enterDuration:450,exitDuration:400},Rw=xy({passive:!0}),Mw=["mousedown","touchstart"],Dw=["mouseup","mouseleave","touchend","touchcancel"];class Fw{constructor(t,e,n,s){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,s.isBrowser&&(this._containerElement=ey(n))}fadeInRipple(t,e,n={}){const s=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),i=Object.assign(Object.assign({},Aw),n.animation);n.centered&&(t=s.left+s.width/2,e=s.top+s.height/2);const r=n.radius||function(t,e,n){const s=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),i=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(s*s+i*i)}(t,e,s),o=t-s.left,a=e-s.top,l=i.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=o-r+"px",c.style.top=a-r+"px",c.style.height=2*r+"px",c.style.width=2*r+"px",null!=n.color&&(c.style.backgroundColor=n.color),c.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(c),window.getComputedStyle(c).getPropertyValue("opacity"),c.style.transform="scale(1)";const h=new Iw(this,c,n);return h.state=0,this._activeRipples.add(h),n.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone(()=>{const t=h===this._mostRecentTransientRipple;h.state=1,n.persistent||t&&this._isPointerDown||h.fadeOut()},l),h}fadeOutRipple(t){const e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),!e)return;const n=t.element,s=Object.assign(Object.assign({},Aw),t.config.animation);n.style.transitionDuration=`${s.exitDuration}ms`,n.style.opacity="0",t.state=2,this._runTimeoutOutsideZone(()=>{t.state=3,n.parentNode.removeChild(n)},s.exitDuration)}fadeOutAll(){this._activeRipples.forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._activeRipples.forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){const e=ey(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(Mw))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(Dw),this._pointerUpEventsRegistered=!0)}_onMousedown(t){const e=kb(t),n=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;this._target.rippleDisabled||e||n||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!Cb(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;const e=t.changedTouches;for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach(t=>{!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_runTimeoutOutsideZone(t,e=0){this._ngZone.runOutsideAngular(()=>setTimeout(t,e))}_registerEvents(t){this._ngZone.runOutsideAngular(()=>{t.forEach(t=>{this._triggerElement.addEventListener(t,this,Rw)})})}_removeTriggerEvents(){this._triggerElement&&(Mw.forEach(t=>{this._triggerElement.removeEventListener(t,this,Rw)}),this._pointerUpEventsRegistered&&Dw.forEach(t=>{this._triggerElement.removeEventListener(t,this,Rw)}))}}const Lw=new Vn("mat-ripple-global-options");let Nw=(()=>{class t{constructor(t,e,n,s,i){this._elementRef=t,this._animationMode=i,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new Fw(this,e,t,n)}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,e=0,n){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}}return t.\u0275fac=function(e){return new(e||t)(po(na),po(Bl),po(by),po(Lw,8),po(yw,8))},t.\u0275dir=Yt({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&Mo("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),t})(),jw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({imports:[[Cw,vy],Cw]}),t})();const Bw=["mat-button",""],Vw=["*"],zw=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"];class Hw{constructor(t){this._elementRef=t}}const $w=Ow(Tw(Pw(Hw)));let Ww=(()=>{class t extends $w{constructor(t,e,n){super(t),this._focusMonitor=e,this._animationMode=n,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const s of zw)this._hasHostAttributes(s)&&this._getHostElement().classList.add(s);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,e){t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...t){return t.some(t=>this._getHostElement().hasAttribute(t))}}return t.\u0275fac=function(e){return new(e||t)(po(na),po(Pb),po(yw,8))},t.\u0275cmp=Ht({type:t,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,e){if(1&t&&fl(Nw,5),2&t){let t;pl(t=ml())&&(e.ripple=t.first)}},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(t,e){2&t&&(ho("disabled",e.disabled||null),Mo("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Jr],attrs:Bw,ngContentSelectors:Vw,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,e){1&t&&(Po(),go(0,"span",0),Io(1),_o(),yo(2,"span",1),yo(3,"span",2)),2&t&&(Hi(2),Mo("mat-button-ripple-round",e.isRoundButton||e.isIconButton),fo("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[Nw],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;-ms-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;-ms-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;-ms-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;-ms-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}),t})(),qw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({imports:[[jw,Cw],Cw]}),t})();const Uw={};class Zw{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new Yw(t,this.resultSelector))}}class Yw extends D{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(Uw),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n<e;n++){const e=t[n];this.add(M(this,e,e,n))}}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,n,s,i){const r=this.values,o=this.toRespond?r[n]===Uw?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}class Kw{constructor(t){this.total=t}call(t,e){return e.subscribe(new Qw(t,this.total))}}class Qw extends f{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}const Xw=new Set;let Gw,Jw=(()=>{class t{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):tS}matchMedia(t){return this._platform.WEBKIT&&function(t){if(!Xw.has(t))try{Gw||(Gw=document.createElement("style"),Gw.setAttribute("type","text/css"),document.head.appendChild(Gw)),Gw.sheet&&(Gw.sheet.insertRule(`@media ${t} {.fx-query-test{ }}`,0),Xw.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return t.\u0275fac=function(e){return new(e||t)(ns(by))},t.\u0275prov=ut({factory:function(){return new t(ns(by))},token:t,providedIn:"root"}),t})();function tS(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}let eS=(()=>{class t{constructor(t,e){this._mediaMatcher=t,this._zone=e,this._queries=new Map,this._destroySubject=new S}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return nS(J_(t)).some(t=>this._registerQuery(t).mql.matches)}observe(t){let e=function(...t){let e=null,n=null;return k(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),W(t,n).lift(new Zw(e))}(nS(J_(t)).map(t=>this._registerQuery(t).observable));return e=py(e.pipe(By(1)),e.pipe(t=>t.lift(new Kw(1)),function(t,e=iy){return n=>n.lift(new bb(t,e))}(0))),e.pipe(F(t=>{const e={matches:!1,breakpoints:{}};return t.forEach(({matches:t,query:n})=>{e.matches=e.matches||t,e.breakpoints[n]=t}),e}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const e=this._mediaMatcher.matchMedia(t),n={observable:new y(t=>{const n=e=>this._zone.run(()=>t.next(e));return e.addListener(n),()=>{e.removeListener(n)}}).pipe(fy(e),F(({matches:e})=>({query:t,matches:e})),hy(this._destroySubject)),mql:e};return this._queries.set(t,n),n}}return t.\u0275fac=function(e){return new(e||t)(ns(Jw),ns(Bl))},t.\u0275prov=ut({factory:function(){return new t(ns(Jw),ns(Bl))},token:t,providedIn:"root"}),t})();function nS(t){return t.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function sS(t,e){if(1&t){const t=Ie();go(0,"div",1),go(1,"button",2),wo("click",function(){return Oe.lFrame.contextLView=t,To().action()}),jo(2),_o(),_o()}if(2&t){const t=To();Hi(2),Bo(t.data.action)}}function iS(t,e){}const rS=new Vn("MatSnackBarData");class oS{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const aS=Math.pow(2,31)-1;class lS{constructor(t,e){this._overlayRef=e,this._afterDismissed=new S,this._afterOpened=new S,this._onAction=new S,this._dismissedByAction=!1,this.containerInstance=t,this.onAction().subscribe(()=>this.dismiss()),t._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(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,aS))}_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 cS=(()=>{class t{constructor(t,e){this.snackBarRef=t,this.data=e}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return t.\u0275fac=function(e){return new(e||t)(po(lS),po(rS))},t.\u0275cmp=Ht({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(go(0,"span"),jo(1),_o(),uo(2,sS,3,1,"div",0)),2&t&&(Hi(1),Bo(e.data.message),Hi(1),fo("ngIf",e.hasAction))},directives:[Fc,Ww],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}\n"],encapsulation:2,changeDetection:0}),t})();const hS={snackBarState:jb("state",[Hb("void, hidden",zb({transform:"scale(0.8)",opacity:0})),Hb("visible",zb({transform:"scale(1)",opacity:1})),$b("* => visible",Bb("150ms cubic-bezier(0, 0, 0.2, 1)")),$b("* => void, * => hidden",Bb("75ms cubic-bezier(0.4, 0.0, 1, 1)",zb({opacity:0})))])};let uS=(()=>{class t extends Dy{constructor(t,e,n,s,i){super(),this._ngZone=t,this._elementRef=e,this._changeDetectorRef=n,this._platform=s,this.snackBarConfig=i,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new S,this._onExit=new S,this._onEnter=new S,this._animationState="void",this.attachDomPortal=t=>(this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachDomPortal(t)),this._live="assertive"!==i.politeness||i.announcementMessage?"off"===i.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:e,toState:n}=t;if(("void"===n&&"void"!==e||"hidden"===n)&&this._completeExit(),"visible"===n){const t=this._onEnter;this._ngZone.run(()=>{t.next(),t.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(By(1)).subscribe(()=>{this._onExit.next(),this._onExit.complete()})}_applySnackBarClasses(){const t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(e=>t.classList.add(e)):t.classList.add(e)),"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]"),e=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&e){let n=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(n=document.activeElement),t.removeAttribute("aria-hidden"),e.appendChild(t),null==n||n.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return t.\u0275fac=function(e){return new(e||t)(po(Bl),po(na),po(Ca),po(by),po(oS))},t.\u0275cmp=Ht({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){if(1&t&&fl(Ly,7),2&t){let t;pl(t=ml())&&(e._portalOutlet=t.first)}},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,e){1&t&&So("@state.done",function(t){return e.onAnimationEnd(t)}),2&t&&zo("@state",e._animationState)},features:[Jr],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,e){1&t&&(go(0,"div",0),uo(1,iS,0,0,"ng-template",1),_o(),yo(2,"div")),2&t&&(Hi(2),ho("aria-live",e._live)("role",e._role))},directives:[Ly],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:[hS.snackBarState]}}),t})(),dS=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({imports:[[yb,Ny,$c,qw,Cw],Cw]}),t})();const pS=new Vn("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new oS}});let fS=(()=>{class t{constructor(t,e,n,s,i,r){this._overlay=t,this._live=e,this._injector=n,this._breakpointObserver=s,this._parentSnackBar=i,this._defaultConfig=r,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=cS,this.snackBarContainerComponent=uS,this.handsetCssClass="mat-snack-bar-handset"}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,e){return this._attach(t,e)}openFromTemplate(t,e){return this._attach(t,e)}open(t,e="",n){const s=Object.assign(Object.assign({},this._defaultConfig),n);return s.data={message:t,action:e},s.announcementMessage===t&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,e){const n=Xr.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:oS,useValue:e}]}),s=new Ay(this.snackBarContainerComponent,e.viewContainerRef,n),i=t.attach(s);return i.instance.snackBarConfig=e,i.instance}_attach(t,e){const n=Object.assign(Object.assign(Object.assign({},new oS),this._defaultConfig),e),s=this._createOverlay(n),i=this._attachSnackBarContainer(s,n),r=new lS(i,s);if(t instanceof Aa){const e=new Ry(t,null,{$implicit:n.data,snackBarRef:r});r.instance=i.attachTemplatePortal(e)}else{const e=this._createInjector(n,r),s=new Ay(t,void 0,e),o=i.attachComponentPortal(s);r.instance=o.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(hy(s.detachments())).subscribe(t=>{const e=s.overlayElement.classList;t.matches?e.add(this.handsetCssClass):e.remove(this.handsetCssClass)}),n.announcementMessage&&i._onAnnounce.subscribe(()=>{this._live.announce(n.announcementMessage,n.politeness)}),this._animateSnackBar(r,n),this._openedSnackBarRef=r,this._openedSnackBarRef}_animateSnackBar(t,e){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),e.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(e.duration))}_createOverlay(t){const e=new Qy;e.direction=t.direction;let n=this._overlay.position().global();const s="rtl"===t.direction,i="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!s||"end"===t.horizontalPosition&&s,r=!i&&"center"!==t.horizontalPosition;return i?n.left("0"):r?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)}_createInjector(t,e){return Xr.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:lS,useValue:e},{provide:rS,useValue:t.data}]})}}return t.\u0275fac=function(e){return new(e||t)(ns(gb),ns(Eb),ns(Xr),ns(eS),ns(t,12),ns(pS))},t.\u0275prov=ut({factory:function(){return new t(ns(gb),ns(Eb),ns(Nr),ns(eS),ns(t,12),ns(pS))},token:t,providedIn:dS}),t})();function mS(t,e){return new y(n=>{const s=t.length;if(0===s)return void n.complete();const i=new Array(s);let r=0,o=0;for(let a=0;a<s;a++){const l=B(t[a]);let c=!1;n.add(l.subscribe({next:t=>{c||(c=!0,o++),i[a]=t},error:t=>n.error(t),complete:()=>{r++,r!==s&&c||(o===s&&n.next(e?e.reduce((t,e,n)=>(t[e]=i[n],t),{}):i),n.complete())}}))}})}function gS(t){return function(e){const n=new _S(t),s=e.lift(n);return n.caught=s}}class _S{constructor(t){this.selector=t}call(t,e){return e.subscribe(new yS(t,this.selector,this.caught))}}class yS extends D{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const s=new C(this,void 0,void 0);this.add(s);const i=M(this,n,void 0,void 0,s);i!==s&&this.add(i)}}}class bS{constructor(t){this.callback=t}call(t,e){return e.subscribe(new vS(t,this.callback))}}class vS extends f{constructor(t,e){super(t),this.add(new u(e))}}const xS=["*"];function wS(t){return Error(`Unable to find icon with the name "${t}"`)}function SS(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function ES(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}class kS{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let CS=(()=>{class t{constructor(t,e,n,s){this._httpClient=t,this._sanitizer=e,this._errorHandler=s,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=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,s){return this._addSvgIconConfig(t,e,new kS(n,null,s))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,s){const i=this._sanitizer.sanitize(qs.HTML,n);if(!i)throw ES(n);return this._addSvgIconConfig(t,e,new kS("",i,s))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new kS(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){const s=this._sanitizer.sanitize(qs.HTML,e);if(!s)throw ES(e);return this._addSvgIconSetConfig(t,new kS("",s,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(qs.RESOURCE_URL,t);if(!e)throw SS(t);const n=this._cachedIconsByUrl.get(e);return n?Eh(TS(n)):this._loadSvgIconFromConfig(new kS(t,null)).pipe(Nu(t=>this._cachedIconsByUrl.set(e,t)),F(t=>TS(t)))}getNamedSvgIcon(t,e=""){const n=OS(e,t);let s=this._svgIconConfigs.get(n);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(e,t),s)return this._svgIconConfigs.set(n,s),this._getSvgFromConfig(s);const i=this._iconSetConfigs.get(e);return i?this._getSvgFromIconSetConfigs(t,i):mu(wS(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?Eh(TS(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(F(t=>TS(t)))}_getSvgFromIconSetConfigs(t,e){const n=this._extractIconWithNameFromAnySet(t,e);return n?Eh(n):function(...t){if(1===t.length){const e=t[0];if(l(e))return mS(e,null);if(c(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return mS(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return mS(t=1===t.length&&l(t[0])?t[0]:t,null).pipe(F(t=>e(...t)))}return mS(t,null)}(e.filter(t=>!t.svgText).map(t=>this._loadSvgIconSetFromConfig(t).pipe(gS(e=>{const n=this._sanitizer.sanitize(qs.RESOURCE_URL,t.url);return this._errorHandler.handleError(new Error(`Loading icon set URL: ${n} failed: ${e.message}`)),Eh(null)})))).pipe(F(()=>{const n=this._extractIconWithNameFromAnySet(t,e);if(!n)throw wS(t);return n}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){const s=e[n];if(s.svgText&&s.svgText.indexOf(t)>-1){const e=this._svgElementFromConfig(s),n=this._extractSvgIconFromSet(e,t,s.options);if(n)return n}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Nu(e=>t.svgText=e),F(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?Eh(null):this._fetchIcon(t).pipe(Nu(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){const s=t.querySelector(`[id="${e}"]`);if(!s)return null;const i=s.cloneNode(!0);if(i.removeAttribute("id"),"svg"===i.nodeName.toLowerCase())return this._setSvgAttributes(i,n);if("symbol"===i.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(i),n);const r=this._svgElementFromString("<svg></svg>");return r.appendChild(i),this._setSvgAttributes(r,n)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){const e=this._svgElementFromString("<svg></svg>"),n=t.attributes;for(let s=0;s<n.length;s++){const{name:t,value:i}=n[s];"id"!==t&&e.setAttribute(t,i)}for(let s=0;s<t.childNodes.length;s++)t.childNodes[s].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[s].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){var e;const{url:n,options:s}=t,i=null!==(e=null==s?void 0:s.withCredentials)&&void 0!==e&&e;if(!this._httpClient)throw 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==n)throw Error(`Cannot fetch icon from URL "${n}".`);const r=this._sanitizer.sanitize(qs.RESOURCE_URL,n);if(!r)throw SS(n);const o=this._inProgressUrlFetches.get(r);if(o)return o;const a=this._httpClient.get(r,{responseType:"text",withCredentials:i}).pipe(function(t){return e=>e.lift(new bS(t))}(()=>this._inProgressUrlFetches.delete(r)),J());return this._inProgressUrlFetches.set(r,a),a}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(OS(t,e),n),this}_addSvgIconSetConfig(t,e){const n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){const e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let s=0;s<this._resolvers.length;s++){const i=this._resolvers[s](e,t);if(i)return(n=i).url&&n.options?new kS(i.url,null,i.options):new kS(i,null)}var n}}return t.\u0275fac=function(e){return new(e||t)(ns(Uh,8),ns(yh),ns(dc,8),ns(Gs))},t.\u0275prov=ut({factory:function(){return new t(ns(Uh,8),ns(yh),ns(dc,8),ns(Gs))},token:t,providedIn:"root"}),t})();function TS(t){return t.cloneNode(!0)}function OS(t,e){return t+":"+e}class PS{constructor(t){this._elementRef=t}}const IS=Ow(PS),AS=new Vn("mat-icon-location",{providedIn:"root",factory:function(){const t=ss(dc),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}}),RS=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],MS=RS.map(t=>`[${t}]`).join(", "),DS=/^url\(['"]?#(.*?)['"]?\)$/;let FS=(()=>{class t extends IS{constructor(t,e,n,s,i){super(t),this._iconRegistry=e,this._location=s,this._errorHandler=i,this._inline=!1,this._currentIconFetch=u.EMPTY,n||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=G_(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 e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=t.querySelectorAll("style");for(let s=0;s<e.length;s++)e[s].textContent+=" ";const n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){const n=t.childNodes[e];1===n.nodeType&&"svg"!==n.nodeName.toLowerCase()||t.removeChild(n)}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),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 e=this._elementsWithExternalReferences;e&&e.forEach((e,n)=>{e.forEach(e=>{n.setAttribute(e.name,`url('${t}#${e.value}')`)})})}_cacheChildrenWithExternalReferences(t){const e=t.querySelectorAll(MS),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s<e.length;s++)RS.forEach(t=>{const i=e[s],r=i.getAttribute(t),o=r?r.match(DS):null;if(o){let e=n.get(i);e||(e=[],n.set(i,e)),e.push({name:t,value:o[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(By(1)).subscribe(t=>this._setSvgElement(t),t=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${e}:${n}! ${t.message}`))})}}}return t.\u0275fac=function(e){return new(e||t)(po(na),po(CS),("aria-hidden",function(t,e){const n=t.attrs;if(n){const t=n.length;let s=0;for(;s<t;){const i=n[s];if(dn(i))break;if(0===i)s+=2;else if("number"==typeof i)for(s++;s<t&&"string"==typeof n[s];)s++;else{if(i===e)return n[s+1];s+=2}}}return null}(Re(),"aria-hidden")),po(AS),po(Gs))},t.\u0275cmp=Ht({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(t,e){2&t&&(ho("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet),Mo("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[Jr],ngContentSelectors:xS,decls:1,vars:0,template:function(t,e){1&t&&(Po(),Io(0))},styles:[".mat-icon{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}),t})(),LS=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({imports:[[Cw],Cw]}),t})(),NS=(()=>{class t{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,e){this._snackBar.open(t,e,{duration:2e3})}}return t.\u0275fac=function(e){return new(e||t)(po(fS))},t.\u0275cmp=Ht({type:t,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,e){1&t&&(go(0,"div",0),go(1,"span",1),jo(2),_o(),go(3,"button",2),wo("click",function(t){return e.copyBuild(t)}),go(4,"mat-icon"),jo(5,"content_copy"),_o(),_o(),_o()),2&t&&(Hi(2),Bo(e.buildText))},directives:[Ww,FS],styles:[".outer[_ngcontent-%COMP%]{display:flex;align-items:center}.build-text[_ngcontent-%COMP%]{flex-grow:1}.icon[_ngcontent-%COMP%]{margin-left:5px}"]}),t})();const jS=[LS,qw,dS];let BS=(()=>{class t{constructor(t){this.http=t}getNumberOfReplays(){return this.http.get("/api2/stats/GetNumberOfReplays")}}return t.\u0275fac=function(e){return new(e||t)(ns(Uh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function VS(t,e){if(1&t&&(go(0,"span"),jo(1),_o()),2&t){const t=e.ngIf;Hi(1),Bo(t)}}function zS(t,e){1&t&&(go(0,"span",4),jo(1,"(Loading...)"),_o())}function HS(t,e){1&t&&(go(0,"span",5),jo(1,"Error!"),_o())}function $S(t,e){if(1&t&&(uo(0,zS,2,0,"span",2),uo(1,HS,2,0,"span",3)),2&t){const t=To();fo("ngIf",!t.error),Hi(1),fo("ngIf",t.error)}}let WS=(()=>{class t{constructor(t){this.numberOfReplays$=t.getNumberOfReplays().pipe(gS(t=>(this.error=t,Eh(null))))}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(po(BS))},t.\u0275cmp=Ht({type:t,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,e){if(1&t&&(jo(0,"Number of replays uploaded: "),uo(1,VS,2,1,"span",0),Ga(2,"async"),uo(3,$S,2,2,"ng-template",null,1,_l)),2&t){const t=xe(Oe.lFrame.contextLView,24);Hi(1),fo("ngIf",Ja(2,2,e.numberOfReplays$))("ngIfElse",t)}},directives:[Fc],pipes:[Hc],styles:[".loading[_ngcontent-%COMP%]{color:#b8860b}.error[_ngcontent-%COMP%]{color:darkred}"]}),t})(),qS=(()=>{class t extends im{update(t){var e=this.chart.data.datasets[2].data.map(t=>t.y),n=Math.min(...e),s=Math.max(...e),i=this.getMeta(),r=this.getScaleForId(i.yAxisID),o=Math.round(r.getPixelForValue(s,0)),a=Math.round(r.getPixelForValue(0,0)),l=Math.round(r.getPixelForValue(n,0)),c=this.chart.ctx,h=l-o!=0?Math.min((a-o)/(l-o),1):0,u=c.createLinearGradient(0,o,0,l);u.addColorStop(0,"rgba(51, 122, 183, 0.6)"),u.addColorStop(h,"rgba(51, 122, 183, 0.6)"),u.addColorStop(h,"rgba(169, 68, 66, 0.6)"),u.addColorStop(1,"rgba(169, 68, 66, 0.6)"),this.chart.data.datasets[2].backgroundColor=u;var d=c.createLinearGradient(0,o,0,l);return d.addColorStop(0,"rgba(51, 122, 183, 1)"),d.addColorStop(h,"rgba(51, 122, 183, 1)"),d.addColorStop(h,"rgba(169, 68, 66, 1)"),d.addColorStop(1,"rgba(169, 68, 66, 1)"),this.chart.data.datasets[2].borderColor=d,super.update(t)}}return t.id="NegativeColoredLine",t.defaults=Object.assign({},im.defaults),t})(),US=(()=>{class t{constructor(t){this.injector=t,Cg.register(O_),Cg.register(Hg),Cg.register(Vg),Cg.register(qS),Cg.register(u_),Cg.register(E_)}ngDoBootstrap(t){customElements.define("hello-world",Au(Ru,{injector:this.injector})),customElements.define("hotslogs-news",Au(Fu,{injector:this.injector})),customElements.define("match-log",Au(X_,{injector:this.injector})),customElements.define("talent-build",Au(NS,{injector:this.injector})),customElements.define("demo-replay-count",Au(WS,{injector:this.injector}))}}return t.\u0275fac=function(e){return new(e||t)(ns(Xr))},t.\u0275mod=Ut({type:t}),t.\u0275inj=dt({providers:[],imports:[[Sh,ru,ww,jS]]}),t})();(function(){if(Gl)throw new Error("Cannot enable prod mode after platform setup.");Xl=!1})(),xh().bootstrapModule(US).catch(t=>console.error(t))}},t=>{"use strict";t(t.s=418)}]);
(self.webpackChunkhots_angular_elements=self.webpackChunkhots_angular_elements||[]).push([[429],{22:()=>{!function(e,t){"use strict";function n(){var e=M.splice(0,M.length);for(Ke=0;e.length;)e.shift().call(null,e.shift())}function o(e,t){for(var n=0,o=e.length;n<o;n++)d(e[n],t)}function r(e){return function(t){Ie(t)&&(d(t,e),ae.length&&o(t.querySelectorAll(ae),e))}}function a(e){var t=Ve.call(e,"is"),n=e.nodeName.toUpperCase(),o=se.call(oe,t?ee+t.toUpperCase():Q+n);return t&&-1<o&&!i(n,t)?-1:o}function i(e,t){return-1<ae.indexOf(e+'[is="'+t+'"]')}function s(e){var t=e.currentTarget,n=e.attrChange,o=e.attrName,r=e.target,a=e[$]||2,i=e[X]||3;!ot||r&&r!==t||!t[V]||"style"===o||e.prevValue===e.newValue&&(""!==e.newValue||n!==a&&n!==i)||t[V](o,n===a?null:e.prevValue,n===i?null:e.newValue)}function c(e){var t=r(e);return function(e){M.push(t,e.target),Ke&&clearTimeout(Ke),Ke=setTimeout(n,1)}}function l(e){nt&&(nt=!1,e.currentTarget.removeEventListener(K,l)),ae.length&&o((e.target||E).querySelectorAll(ae),e.detail===x?x:j),Ne&&function(){for(var e,t=0,n=Ae.length;t<n;t++)ie.contains(e=Ae[t])||(n--,Ae.splice(t--,1),d(e,x))}()}function u(e,t){var n=this;Be.call(n,e,t),L.call(n,{target:n})}function h(e,t,n){var o=t.apply(e,n),r=a(o);return-1<r&&Z(o,re[r]),n.pop()&&ae.length&&function(e){for(var t,n=0,o=e.length;n<o;n++)Z(t=e[n],re[a(t)])}(o.querySelectorAll(ae)),o}function p(e,t){De(e,t),O?O.observe(e,Xe):(tt&&(e.setAttribute=u,e[I]=S(e),e[A](J,L)),e[A](Y,s)),e[G]&&ot&&(e.created=!0,e[G](),e.created=!1)}function f(e){throw new Error("A "+e+" type is already registered")}function d(e,t){var n,o,r=a(e);-1<r&&!xe.call(e,"TEMPLATE")&&(H(e,re[r]),r=0,t!==j||e[j]?t!==x||e[x]||(e[j]=!1,e[x]=!0,o="disconnected",r=1):(e[x]=!1,e[j]=!0,o="connected",r=1,Ne&&se.call(Ae,e)<0&&Ae.push(e)),r&&(n=e[t+R]||e[o+R])&&n.call(e))}function m(){}function g(e,t,n){var o=n&&n[F]||"",r=t.prototype,a=Oe(r),i=t.observedAttributes||pe,s={prototype:a};ze(a,G,{value:function(){if(we)we=!1;else if(!this[ye]){this[ye]=!0,new t(this),r[G]&&r[G].call(this);var e=Me[Ce.get(t)];(!ve||e.create.length>1)&&_(this)}}}),ze(a,V,{value:function(e){-1<se.call(i,e)&&r[V]&&r[V].apply(this,arguments)}}),r[q]&&ze(a,U,{value:r[q]}),r[B]&&ze(a,W,{value:r[B]}),o&&(s[F]=o),e=e.toUpperCase(),Me[e]={constructor:t,create:o?[o,Se(e)]:[e]},Ce.set(t,e),E[N](e.toLowerCase(),s),v(e),Le[e].r()}function T(e){var t=Me[e.toUpperCase()];return t&&t.constructor}function y(e){return"string"==typeof e?e:e&&e.is||""}function _(e){for(var t,n=e[V],o=n?e.attributes:pe,r=o.length;r--;)n.call(e,(t=o[r]).name||t.nodeName,null,t.value||t.nodeValue)}function v(e){return(e=e.toUpperCase())in Le||(Le[e]={},Le[e].p=new be(function(t){Le[e].r=t})),Le[e].p}function k(){_e&&delete e.customElements,he(e,"customElements",{configurable:!0,value:new m}),he(e,"CustomElementRegistry",{configurable:!0,value:m});for(var t=w.get(/^HTML[A-Z]*[a-z]/),n=t.length;n--;function(t){var n=e[t];if(n){e[t]=function(e){var t,o;return e||(e=this),e[ye]||(we=!0,t=Me[Ce.get(e.constructor)],(e=(o=ve&&1===t.create.length)?Reflect.construct(n,pe,t.constructor):E.createElement.apply(E,t.create))[ye]=!0,we=!1,o||_(e)),e},e[t].prototype=n.prototype;try{n.prototype.constructor=e[t]}catch(o){he(n,ye,{value:e[t]})}}}(t[n]));E.createElement=function(e,t){var n=y(t);return n?$e.call(this,e,Se(n)):$e.call(this,e)},Je||(et=!0,E[N](""))}var E=e.document,b=e.Object,w=function(e){var t,n,o,r,a=/^[A-Z]+[a-z]/,i=function(e,t){(t=t.toLowerCase())in s||(s[e]=(s[e]||[]).concat(t),s[t]=s[t.toUpperCase()]=e)},s=(b.create||b)(null),c={};for(n in e)for(r in e[n])for(s[r]=o=e[n][r],t=0;t<o.length;t++)s[o[t].toLowerCase()]=s[o[t].toUpperCase()]=r;return c.get=function(e){return"string"==typeof e?s[e]||(a.test(e)?[]:""):function(e){var t,n=[];for(t in s)e.test(t)&&n.push(t);return n}(e)},c.set=function(e,t){return a.test(e)?i(e,t):i(t,e),c},c}({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 t&&(t={type:t||"auto"});var M,L,C,S,O,D,H,Z,P,N="registerElement",z=1e5*e.Math.random()>>0,I="__"+N+z,A="addEventListener",j="attached",R="Callback",x="detached",F="extends",V="attributeChanged"+R,U=j+R,q="connected"+R,B="disconnected"+R,G="created"+R,W=x+R,$="ADDITION",X="REMOVAL",Y="DOMAttrModified",K="DOMContentLoaded",J="DOMSubtreeModified",Q="<",ee="=",te=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,ne=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],oe=[],re=[],ae="",ie=E.documentElement,se=oe.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},ce=b.prototype,le=ce.hasOwnProperty,ue=ce.isPrototypeOf,he=b.defineProperty,pe=[],fe=b.getOwnPropertyDescriptor,de=b.getOwnPropertyNames,me=b.getPrototypeOf,ge=b.setPrototypeOf,Te=!!b.__proto__,ye="__dreCEv1",_e=e.customElements,ve=!/^force/.test(t.type)&&!!(_e&&_e.define&&_e.get&&_e.whenDefined),ke=b.create||b,Ee=e.Map||function(){var e,t=[],n=[];return{get:function(e){return n[se.call(t,e)]},set:function(o,r){(e=se.call(t,o))<0?n[t.push(o)-1]=r:n[e]=r}}},be=e.Promise||function(e){function t(e){for(o=!0;n.length;)n.shift()(e)}var n=[],o=!1,r={catch:function(){return r},then:function(e){return n.push(e),o&&setTimeout(t,1),r}};return e(t),r},we=!1,Me=ke(null),Le=ke(null),Ce=new Ee,Se=function(e){return e.toLowerCase()},Oe=b.create||function e(t){return t?(e.prototype=t,new e):this},De=ge||(Te?function(e,t){return e.__proto__=t,e}:de&&fe?function(){function e(e,t){for(var n,o=de(t),r=0,a=o.length;r<a;r++)le.call(e,n=o[r])||he(e,n,fe(t,n))}return function(t,n){do{e(t,n)}while((n=me(n))&&!ue.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),He=e.MutationObserver||e.WebKitMutationObserver,Ze=e.HTMLAnchorElement,Pe=(e.HTMLElement||e.Element||e.Node).prototype,Ne=!ue.call(Pe,ie),ze=Ne?function(e,t,n){return e[t]=n.value,e}:he,Ie=Ne?function(e){return 1===e.nodeType}:function(e){return ue.call(Pe,e)},Ae=Ne&&[],je=Pe.attachShadow,Re=Pe.cloneNode,xe=Pe.closest||function(e){for(var t=this;t&&t.nodeName!==e;)t=t.parentNode;return t},Fe=Pe.dispatchEvent,Ve=Pe.getAttribute,Ue=Pe.hasAttribute,qe=Pe.removeAttribute,Be=Pe.setAttribute,Ge=E.createElement,We=E.importNode,$e=Ge,Xe=He&&{attributes:!0,characterData:!0,attributeOldValue:!0},Ye=He||function(e){tt=!1,ie.removeEventListener(Y,Ye)},Ke=0,Je=N in E&&!/^force-all/.test(t.type),Qe=!0,et=!1,tt=!0,nt=!0,ot=!0;if(He&&((P=E.createElement("div")).innerHTML="<div><div></div></div>",new He(function(e,t){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var n=(P=fe(Pe,"innerHTML"))&&P.set;n&&he(Pe,"innerHTML",{set:function(e){for(;this.lastChild;)this.removeChild(this.lastChild);n.call(this,e)}})}t.disconnect(),P=null}).observe(P,{childList:!0,subtree:!0}),P.innerHTML=""),Je||(ge||Te?(H=function(e,t){ue.call(t,e)||p(e,t)},Z=p):Z=H=function(e,t){e[I]||(e[I]=b(!0),p(e,t))},Ne?(tt=!1,function(){var e=fe(Pe,A),t=e.value,n=function(e){var t=new CustomEvent(Y,{bubbles:!0});t.attrName=e,t.prevValue=Ve.call(this,e),t.newValue=null,t[X]=t.attrChange=2,qe.call(this,e),Fe.call(this,t)},o=function(e,t){var n=Ue.call(this,e),o=n&&Ve.call(this,e),r=new CustomEvent(Y,{bubbles:!0});Be.call(this,e,t),r.attrName=e,r.prevValue=n?o:null,r.newValue=t,n?r.MODIFICATION=r.attrChange=1:r[$]=r.attrChange=0,Fe.call(this,r)},r=function(e){var t,n=e.currentTarget,o=n[I],r=e.propertyName;o.hasOwnProperty(r)&&(o=o[r],(t=new CustomEvent(Y,{bubbles:!0})).attrName=o.name,t.prevValue=o.value||null,t.newValue=o.value=n[r]||null,null==t.prevValue?t[$]=t.attrChange=0:t.MODIFICATION=t.attrChange=1,Fe.call(n,t))};e.value=function(e,a,i){e===Y&&this[V]&&this.setAttribute!==o&&(this[I]={className:{name:"class",value:this.className}},this.setAttribute=o,this.removeAttribute=n,t.call(this,"propertychange",r)),t.call(this,e,a,i)},he(Pe,A,e)}()):He||(ie[A](Y,Ye),ie.setAttribute(I,1),ie.removeAttribute(I),tt&&(L=function(e){var t,n,o,r=this;if(r===e.target){for(o in t=r[I],r[I]=n=S(r),n){if(!(o in t))return C(0,r,o,t[o],n[o],$);if(n[o]!==t[o])return C(1,r,o,t[o],n[o],"MODIFICATION")}for(o in t)if(!(o in n))return C(2,r,o,t[o],n[o],X)}},C=function(e,t,n,o,r,a){var i={attrChange:e,currentTarget:t,attrName:n,prevValue:o,newValue:r};i[a]=e,s(i)},S=function(e){for(var t,n,o={},r=e.attributes,a=0,i=r.length;a<i;a++)"setAttribute"!==(n=(t=r[a]).name)&&(o[n]=t.value);return o})),E[N]=function(e,t){if(n=e.toUpperCase(),Qe&&(Qe=!1,He?(O=function(e,t){function n(e,t){for(var n=0,o=e.length;n<o;t(e[n++]));}return new He(function(o){for(var r,a,i,s=0,c=o.length;s<c;s++)"childList"===(r=o[s]).type?(n(r.addedNodes,e),n(r.removedNodes,t)):(a=r.target,ot&&a[V]&&"style"!==r.attributeName&&(i=Ve.call(a,r.attributeName))!==r.oldValue&&a[V](r.attributeName,r.oldValue,i))})}(r(j),r(x)),(D=function(e){return O.observe(e,{childList:!0,subtree:!0}),e})(E),je&&(Pe.attachShadow=function(){return D(je.apply(this,arguments))})):(M=[],E[A]("DOMNodeInserted",c(j)),E[A]("DOMNodeRemoved",c(x))),E[A](K,l),E[A]("readystatechange",l),E.importNode=function(e,t){switch(e.nodeType){case 1:return h(E,We,[e,!!t]);case 11:for(var n=E.createDocumentFragment(),o=e.childNodes,r=o.length,a=0;a<r;a++)n.appendChild(E.importNode(o[a],!!t));return n;default:return Re.call(e,!!t)}},Pe.cloneNode=function(e){return h(this,Re,[!!e])}),et)return et=!1;if(-2<se.call(oe,ee+n)+se.call(oe,Q+n)&&f(e),!te.test(n)||-1<se.call(ne,n))throw new Error("The type "+e+" is invalid");var n,a,i=function(){return u?E.createElement(p,n):E.createElement(p)},s=t||ce,u=le.call(s,F),p=u?t[F].toUpperCase():n;return u&&-1<se.call(oe,Q+p)&&f(p),a=oe.push((u?ee:Q)+n)-1,ae=ae.concat(ae.length?",":"",u?p+'[is="'+e.toLowerCase()+'"]':p),i.prototype=re[a]=le.call(s,"prototype")?s.prototype:Oe(Pe),ae.length&&o(E.querySelectorAll(ae),j),i},E.createElement=$e=function(e,t){var n=y(t),o=n?Ge.call(E,e,Se(n)):Ge.call(E,e),r=""+e,a=se.call(oe,(n?ee:Q)+(n||r).toUpperCase()),s=-1<a;return n&&(o.setAttribute("is",n=n.toLowerCase()),s&&(s=i(r.toUpperCase(),n))),ot=!E.createElement.innerHTMLHelper,s&&Z(o,re[a]),o}),addEventListener("beforeunload",function(){delete E.createElement,delete E.importNode,delete E[N]},!1),m.prototype={constructor:m,define:ve?function(e,t,n){if(n)g(e,t,n);else{var o=e.toUpperCase();Me[o]={constructor:t,create:[o]},Ce.set(t,o),_e.define(e,t)}}:g,get:ve?function(e){return _e.get(e)||T(e)}:T,whenDefined:ve?function(e){return be.race([_e.whenDefined(e),v(e)])}:v},!_e||/^force/.test(t.type))k();else if(!t.noBuiltIn)try{!function(t,n,o){var r=new RegExp("^<a\\s+is=('|\")"+o+"\\1></a>$");if(n[F]="a",(t.prototype=Oe(Ze.prototype)).constructor=t,e.customElements.define(o,t,n),!r.test(E.createElement("a",{is:o}).outerHTML)||!r.test((new t).outerHTML))throw n}(function e(){return Reflect.construct(Ze,[],e)},{},"document-register-element-a"+z)}catch(rt){k()}if(!t.noBuiltIn)try{if(Ge.call(E,"a","a").outerHTML.indexOf("is")<0)throw{}}catch(at){Se=function(e){return{is:e.toLowerCase()}}}}(window)},167:()=>{"use strict";!function(e){const t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function o(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");const r=e.__Zone_symbol_prefix||"__zone_symbol__";function a(e){return r+e}const i=!0===e[a("forceDuplicateZoneCheck")];if(e.Zone){if(i||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}class s{constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(e.Promise!==O.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 e=s.current;for(;e.parent;)e=e.parent;return e}static get current(){return H.zone}static get currentTask(){return Z}static __load_patch(t,r,a=!1){if(O.hasOwnProperty(t)){if(!a&&i)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const a="Zone:"+t;n(a),O[t]=r(e,s,D),o(a,a)}}get parent(){return this._parent}get name(){return this._name}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){H={parent:H,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{H=H.parent}}runGuarded(e,t=null,n,o){H={parent:H,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(r){if(this._zoneDelegate.handleError(this,r))throw r}}finally{H=H.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||_).name+"; Execution: "+this.name+")");if(e.state===v&&(e.type===S||e.type===C))return;const o=e.state!=b;o&&e._transitionTo(b,E),e.runCount++;const r=Z;Z=e,H={parent:H,zone:this};try{e.type==C&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{e.state!==v&&e.state!==M&&(e.type==S||e.data&&e.data.isPeriodic?o&&e._transitionTo(E,b):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(v,b,v))),H=H.parent,Z=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(k,v);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(n){throw e._transitionTo(M,k,v),this._zoneDelegate.handleError(this,n),n}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==k&&e._transitionTo(E,k),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new u(L,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new u(C,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new u(S,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||_).name+"; Execution: "+this.name+")");e._transitionTo(w,E,b);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(M,w),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(v,w),e.runCount=0,e}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}s.__symbol__=a;const c={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,a)=>e.invokeTask(n,o,r,a),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class l{constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask;(o||t&&t._hasTaskZS)&&(this._hasTaskZS=o?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new s(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=L)throw new Error("Task is missing scheduleFn.");T(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(n){this.handleError(e,n)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");0!=o&&0!=r||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class u{constructor(t,n,o,r,a,i){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=n,this.data=r,this.scheduleFn=a,this.cancelFn=i,!o)throw new Error("callback is not defined");this.callback=o;const s=this;this.invoke=t===S&&r&&r.useG?u.invokeTask:function(){return u.invokeTask.call(e,s,this,arguments)}}static invokeTask(e,t,n){e||(e=this),P++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==P&&y(),P--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(v,k)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==v&&(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=a("setTimeout"),p=a("Promise"),f=a("then");let d,m=[],g=!1;function T(t){if(0===P&&0===m.length)if(d||e[p]&&(d=e[p].resolve(0)),d){let e=d[f];e||(e=d.then),e.call(d,y)}else e[h](y,0);t&&m.push(t)}function y(){if(!g){for(g=!0;m.length;){const t=m;m=[];for(let n=0;n<t.length;n++){const o=t[n];try{o.zone.runTask(o,null,null)}catch(e){D.onUnhandledError(e)}}}D.microtaskDrainDone(),g=!1}}const _={name:"NO ZONE"},v="notScheduled",k="scheduling",E="scheduled",b="running",w="canceling",M="unknown",L="microTask",C="macroTask",S="eventTask",O={},D={symbol:a,currentZoneFrame:()=>H,onUnhandledError:N,microtaskDrainDone:N,scheduleMicroTask:T,showUncaughtError:()=>!s[a("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:N,patchMethod:()=>N,bindArguments:()=>[],patchThen:()=>N,patchMacroTask:()=>N,patchEventPrototype:()=>N,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>N,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>N,wrapWithCurrentZone:()=>N,filterProperties:()=>[],attachOriginToPatched:()=>N,_redefineProperty:()=>N,patchCallbacks:()=>N};let H={parent:null,zone:new s(null,null)},Z=null,P=0;function N(){}o("Zone","Zone"),e.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);const e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,o=Object.create,r=Array.prototype.slice,a="addEventListener",i="removeEventListener",s=Zone.__symbol__(a),c=Zone.__symbol__(i),l="true",u="false",h=Zone.__symbol__("");function p(e,t){return Zone.current.wrap(e,t)}function f(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const d=Zone.__symbol__,m="undefined"!=typeof window,g=m?window:void 0,T=m&&g||"object"==typeof self&&self||global,y=[null];function _(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=p(e[n],t+"_"+n));return e}function v(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const k="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,E=!("nw"in T)&&void 0!==T.process&&"[object process]"==={}.toString.call(T.process),b=!E&&!k&&!(!m||!g.HTMLElement),w=void 0!==T.process&&"[object process]"==={}.toString.call(T.process)&&!k&&!(!m||!g.HTMLElement),M={},L=function(e){if(!(e=e||T.event))return;let t=M[e.type];t||(t=M[e.type]=d("ON_PROPERTY"+e.type));const n=this||e.target||T,o=n[t];let r;if(b&&n===g&&"error"===e.type){const t=e;r=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===r&&e.preventDefault()}else r=o&&o.apply(this,arguments),null==r||r||e.preventDefault();return r};function C(n,o,r){let a=e(n,o);if(!a&&r&&e(r,o)&&(a={enumerable:!0,configurable:!0}),!a||!a.configurable)return;const i=d("on"+o+"patched");if(n.hasOwnProperty(i)&&n[i])return;delete a.writable,delete a.value;const s=a.get,c=a.set,l=o.substr(2);let u=M[l];u||(u=M[l]=d("ON_PROPERTY"+l)),a.set=function(e){let t=this;t||n!==T||(t=T),t&&(t[u]&&t.removeEventListener(l,L),c&&c.apply(t,y),"function"==typeof e?(t[u]=e,t.addEventListener(l,L,!1)):t[u]=null)},a.get=function(){let e=this;if(e||n!==T||(e=T),!e)return null;const t=e[u];if(t)return t;if(s){let t=s&&s.call(this);if(t)return a.set.call(this,t),"function"==typeof e.removeAttribute&&e.removeAttribute(o),t}return null},t(n,o,a),n[i]=!0}function S(e,t,n){if(t)for(let o=0;o<t.length;o++)C(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.substr(0,2)&&t.push(n);for(let o=0;o<t.length;o++)C(e,t[o],n)}}const O=d("originalInstance");function D(e){const n=T[e];if(!n)return;T[d(e)]=n,T[e]=function(){const t=_(arguments,e);switch(t.length){case 0:this[O]=new n;break;case 1:this[O]=new n(t[0]);break;case 2:this[O]=new n(t[0],t[1]);break;case 3:this[O]=new n(t[0],t[1],t[2]);break;case 4:this[O]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error("Arg list too long.")}},P(T[e],n);const o=new n(function(){});let r;for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||function(n){"function"==typeof o[n]?T[e].prototype[n]=function(){return this[O][n].apply(this[O],arguments)}:t(T[e].prototype,n,{set:function(t){"function"==typeof t?(this[O][n]=p(t,e+"."+n),P(this[O][n],t)):this[O][n]=t},get:function(){return this[O][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(T[e][r]=n[r])}function H(t,o,r){let a=t;for(;a&&!a.hasOwnProperty(o);)a=n(a);!a&&t[o]&&(a=t);const i=d(o);let s=null;if(a&&(!(s=a[i])||!a.hasOwnProperty(i))&&(s=a[i]=a[o],v(a&&e(a,o)))){const e=r(s,i,o);a[o]=function(){return e(this,arguments)},P(a[o],s)}return s}function Z(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=H(e,t,e=>function(t,o){const a=n(t,o);return a.cbIdx>=0&&"function"==typeof o[a.cbIdx]?f(a.name,o[a.cbIdx],a,r):e.apply(t,o)})}function P(e,t){e[d("OriginalDelegate")]=t}let N=!1,z=!1;function I(){try{const e=g.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function A(){if(N)return z;N=!0;try{const e=g.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(z=!0)}catch(e){}return z}Zone.__load_patch("ZoneAwarePromise",(e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty,a=n.symbol,i=[],s=!0===e[a("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=a("Promise"),l=a("then");n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;i.length;){const t=i.shift();try{t.zone.runGuarded(()=>{if(t.throwOriginal)throw t.rejection;throw t})}catch(e){h(e)}}};const u=a("unhandledPromiseRejectionHandler");function h(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(o){}}function p(e){return e&&e.then}function f(e){return e}function d(e){return D.reject(e)}const m=a("state"),g=a("value"),T=a("finally"),y=a("parentPromiseValue"),_=a("parentPromiseState"),v=null,k=!0,E=!1;function b(e,t){return n=>{try{M(e,t,n)}catch(o){M(e,!1,o)}}}const w=a("currentTaskTrace");function M(e,o,a){const c=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}}();if(e===a)throw new TypeError("Promise resolved with itself");if(e[m]===v){let h=null;try{"object"!=typeof a&&"function"!=typeof a||(h=a&&a.then)}catch(u){return c(()=>{M(e,!1,u)})(),e}if(o!==E&&a instanceof D&&a.hasOwnProperty(m)&&a.hasOwnProperty(g)&&a[m]!==v)C(a),M(e,a[m],a[g]);else if(o!==E&&"function"==typeof h)try{h.call(a,c(b(e,o)),c(b(e,!1)))}catch(u){c(()=>{M(e,!1,u)})()}else{e[m]=o;const c=e[g];if(e[g]=a,e[T]===T&&o===k&&(e[m]=e[_],e[g]=e[y]),o===E&&a instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;e&&r(a,w,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)S(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&o==E){e[m]=0;let o=a;try{throw new Error("Uncaught (in promise): "+((l=a)&&l.toString===Object.prototype.toString?(l.constructor&&l.constructor.name||"")+": "+JSON.stringify(l):l?l.toString():Object.prototype.toString.call(l))+(a&&a.stack?"\n"+a.stack:""))}catch(u){o=u}s&&(o.throwOriginal=!0),o.rejection=a,o.promise=e,o.zone=t.current,o.task=t.currentTask,i.push(o),n.scheduleMicroTask()}}}var l;return e}const L=a("rejectionHandledHandler");function C(e){if(0===e[m]){try{const n=t[L];n&&"function"==typeof n&&n.call(this,{rejection:e[g],promise:e})}catch(n){}e[m]=E;for(let t=0;t<i.length;t++)e===i[t].promise&&i.splice(t,1)}}function S(e,t,n,o,r){C(e);const a=e[m],i=a?"function"==typeof o?o:f:"function"==typeof r?r:d;t.scheduleMicroTask("Promise.then",()=>{try{const o=e[g],r=!!n&&T===n[T];r&&(n[y]=o,n[_]=a);const s=t.run(i,void 0,r&&i!==d&&i!==f?[]:[o]);M(n,!0,s)}catch(o){M(n,!1,o)}},n)}const O=function(){};class D{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return M(new this(null),k,e)}static reject(e){return M(new this(null),E,e)}static race(e){let t,n,o=new this((e,o)=>{t=e,n=o});function r(e){t(e)}function a(e){n(e)}for(let i of e)p(i)||(i=this.resolve(i)),i.then(r,a);return o}static all(e){return D.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof D?this:D).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,o,r=new this((e,t)=>{n=e,o=t}),a=2,i=0;const s=[];for(let l of e){p(l)||(l=this.resolve(l));const e=i;try{l.then(o=>{s[e]=t?t.thenCallback(o):o,a--,0===a&&n(s)},r=>{t?(s[e]=t.errorCallback(r),a--,0===a&&n(s)):o(r)})}catch(c){o(c)}a++,i++}return a-=2,0===a&&n(s),r}constructor(e){const t=this;if(!(t instanceof D))throw new Error("Must be an instanceof Promise.");t[m]=v,t[g]=[];try{e&&e(b(t,k),b(t,E))}catch(n){M(t,!1,n)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return D}then(e,n){let o=this.constructor[Symbol.species];o&&"function"==typeof o||(o=this.constructor||D);const r=new o(O),a=t.current;return this[m]==v?this[g].push(a,r,e,n):S(this,a,r,e,n),r}catch(e){return this.then(null,e)}finally(e){let n=this.constructor[Symbol.species];n&&"function"==typeof n||(n=D);const o=new n(O);o[T]=T;const r=t.current;return this[m]==v?this[g].push(r,o,e,e):S(this,r,o,e,e),o}}D.resolve=D.resolve,D.reject=D.reject,D.race=D.race,D.all=D.all;const Z=e[c]=e.Promise;e.Promise=D;const P=a("thenPatched");function N(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[l]=r,e.prototype.then=function(e,t){return new D((e,t)=>{r.call(this,e,t)}).then(e,t)},e[P]=!0}return n.patchThen=N,Z&&(N(Z),H(e,"fetch",e=>{return t=e,function(e,n){let o=t.apply(e,n);if(o instanceof D)return o;let r=o.constructor;return r[P]||N(r),o};var t})),Promise[t.__symbol__("uncaughtPromiseErrors")]=i,D}),Zone.__load_patch("toString",e=>{const t=Function.prototype.toString,n=d("OriginalDelegate"),o=d("Promise"),r=d("Error"),a=function(){if("function"==typeof this){const a=this[n];if(a)return"function"==typeof a?t.call(a):Object.prototype.toString.call(a);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;const i=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":i.call(this)}});let j=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){j=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(he){j=!1}const R={useG:!0},x={},F={},V=new RegExp("^"+h+"(\\w+)(true|false)$"),U=d("propagationStopped");function q(e,t){const n=(t?t(e):e)+u,o=(t?t(e):e)+l,r=h+n,a=h+o;x[e]={},x[e].false=r,x[e].true=a}function B(e,t,o){const r=o&&o.add||a,s=o&&o.rm||i,c=o&&o.listeners||"eventListeners",p=o&&o.rmAll||"removeAllListeners",f=d(r),m="."+r+":",g=function(e,t,n){if(e.isRemoved)return;const o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=e=>o.handleEvent(e),e.originalDelegate=o),e.invoke(e,t,[n]);const r=e.options;r&&"object"==typeof r&&r.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,r)},T=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,o=n[x[t.type].false];if(o)if(1===o.length)g(o[0],n,t);else{const e=o.slice();for(let o=0;o<e.length&&(!t||!0!==t[U]);o++)g(e[o],n,t)}},y=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,o=n[x[t.type].true];if(o)if(1===o.length)g(o[0],n,t);else{const e=o.slice();for(let o=0;o<e.length&&(!t||!0!==t[U]);o++)g(e[o],n,t)}};function _(t,o){if(!t)return!1;let a=!0;o&&void 0!==o.useG&&(a=o.useG);const i=o&&o.vh;let g=!0;o&&void 0!==o.chkDup&&(g=o.chkDup);let _=!1;o&&void 0!==o.rt&&(_=o.rt);let v=t;for(;v&&!v.hasOwnProperty(r);)v=n(v);if(!v&&t[r]&&(v=t),!v)return!1;if(v[f])return!1;const k=o&&o.eventNameToString,b={},w=v[f]=v[r],M=v[d(s)]=v[s],L=v[d(c)]=v[c],C=v[d(p)]=v[p];let S;function O(e,t){return!j&&"object"==typeof e&&e?!!e.capture:j&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?Object.assign(Object.assign({},e),{passive:!0}):e:{passive:!0}:e}o&&o.prepend&&(S=v[d(o.prepend)]=v[o.prepend]);const D=a?function(e){if(!b.isExisting)return w.call(b.target,b.eventName,b.capture?y:T,b.options)}:function(e){return w.call(b.target,b.eventName,e.invoke,b.options)},H=a?function(e){if(!e.isRemoved){const t=x[e.eventName];let n;t&&(n=t[e.capture?l:u]);const o=n&&e.target[n];if(o)for(let r=0;r<o.length;r++)if(o[r]===e){o.splice(r,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return M.call(e.target,e.eventName,e.capture?y:T,e.options)}:function(e){return M.call(e.target,e.eventName,e.invoke,e.options)},Z=o&&o.diff?o.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},N=Zone[d("UNPATCHED_EVENTS")],z=e[d("PASSIVE_EVENTS")],I=function(t,n,r,s,c=!1,h=!1){return function(){const p=this||e;let f=arguments[0];o&&o.transferEventName&&(f=o.transferEventName(f));let d=arguments[1];if(!d)return t.apply(this,arguments);if(E&&"uncaughtException"===f)return t.apply(this,arguments);let m=!1;if("function"!=typeof d){if(!d.handleEvent)return t.apply(this,arguments);m=!0}if(i&&!i(t,d,p,arguments))return;const T=j&&!!z&&-1!==z.indexOf(f),y=O(arguments[2],T);if(N)for(let e=0;e<N.length;e++)if(f===N[e])return T?t.call(p,f,d,y):t.apply(this,arguments);const _=!!y&&("boolean"==typeof y||y.capture),v=!(!y||"object"!=typeof y)&&y.once,w=Zone.current;let M=x[f];M||(q(f,k),M=x[f]);const L=M[_?l:u];let C,S=p[L],D=!1;if(S){if(D=!0,g)for(let e=0;e<S.length;e++)if(Z(S[e],d))return}else S=p[L]=[];const H=p.constructor.name,P=F[H];P&&(C=P[f]),C||(C=H+n+(k?k(f):f)),b.options=y,v&&(b.options.once=!1),b.target=p,b.capture=_,b.eventName=f,b.isExisting=D;const I=a?R:void 0;I&&(I.taskData=b);const A=w.scheduleEventTask(C,d,I,r,s);return b.target=null,I&&(I.taskData=null),v&&(y.once=!0),(j||"boolean"!=typeof A.options)&&(A.options=y),A.target=p,A.capture=_,A.eventName=f,m&&(A.originalDelegate=d),h?S.unshift(A):S.push(A),c?p:void 0}};return v[r]=I(w,m,D,H,_),S&&(v.prependListener=I(S,".prependListener:",function(e){return S.call(b.target,b.eventName,e.invoke,b.options)},H,_,!0)),v[s]=function(){const t=this||e;let n=arguments[0];o&&o.transferEventName&&(n=o.transferEventName(n));const r=arguments[2],a=!!r&&("boolean"==typeof r||r.capture),s=arguments[1];if(!s)return M.apply(this,arguments);if(i&&!i(M,s,t,arguments))return;const c=x[n];let p;c&&(p=c[a?l:u]);const f=p&&t[p];if(f)for(let e=0;e<f.length;e++){const o=f[e];if(Z(o,s))return f.splice(e,1),o.isRemoved=!0,0===f.length&&(o.allRemoved=!0,t[p]=null,"string"==typeof n)&&(t[h+"ON_PROPERTY"+n]=null),o.zone.cancelTask(o),_?t:void 0}return M.apply(this,arguments)},v[c]=function(){const t=this||e;let n=arguments[0];o&&o.transferEventName&&(n=o.transferEventName(n));const r=[],a=G(t,k?k(n):n);for(let e=0;e<a.length;e++){const t=a[e];r.push(t.originalDelegate?t.originalDelegate:t.callback)}return r},v[p]=function(){const t=this||e;let n=arguments[0];if(n){o&&o.transferEventName&&(n=o.transferEventName(n));const e=x[n];if(e){const o=t[e.false],r=t[e.true];if(o){const e=o.slice();for(let t=0;t<e.length;t++){const o=e[t];this[s].call(this,n,o.originalDelegate?o.originalDelegate:o.callback,o.options)}}if(r){const e=r.slice();for(let t=0;t<e.length;t++){const o=e[t];this[s].call(this,n,o.originalDelegate?o.originalDelegate:o.callback,o.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=V.exec(e[t]);let o=n&&n[1];o&&"removeListener"!==o&&this[p].call(this,o)}this[p].call(this,"removeListener")}if(_)return this},P(v[r],w),P(v[s],M),C&&P(v[p],C),L&&P(v[c],L),!0}let v=[];for(let n=0;n<t.length;n++)v[n]=_(t[n],o);return v}function G(e,t){if(!t){const n=[];for(let o in e){const r=V.exec(o);let a=r&&r[1];if(a&&(!t||a===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=x[t];n||(q(t),n=x[t]);const o=e[n.false],r=e[n.true];return o?r?o.concat(r):o.slice():r?r.slice():[]}function W(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",e=>function(t,n){t[U]=!0,e&&e.apply(t,n)})}function $(e,t,n,o,r){const a=Zone.__symbol__(o);if(t[a])return;const i=t[a]=t[o];t[o]=function(a,s,c){return s&&s.prototype&&r.forEach(function(t){const r=`${n}.${o}::`+t,a=s.prototype;if(a.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(a,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,r),e._redefineProperty(s.prototype,t,n)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],r))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],r))}),i.call(t,a,s,c)},e.attachOriginToPatched(t[o],i)}const X=["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"],Y=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],K=["load"],J=["blur","error","focus","load","resize","scroll","messageerror"],Q=["bounce","finish","start"],ee=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],te=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],ne=["close","error","open","message"],oe=["error","message"],re=["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"],X,["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 ae(e,t,n){if(!n||0===n.length)return t;const o=n.filter(t=>t.target===e);if(!o||0===o.length)return t;const r=o[0].ignoreProperties;return t.filter(e=>-1===r.indexOf(e))}function ie(e,t,n,o){e&&S(e,ae(e,t,n),o)}function se(e,t){if(E&&!w)return;if(Zone[e.symbol("patchEvents")])return;const o="undefined"!=typeof WebSocket,r=t.__Zone_ignore_on_properties;if(b){const e=window,t=I()?[{target:e,ignoreProperties:["error"]}]:[];ie(e,re.concat(["messageerror"]),r?r.concat(t):r,n(e)),ie(Document.prototype,re,r),void 0!==e.SVGElement&&ie(e.SVGElement.prototype,re,r),ie(Element.prototype,re,r),ie(HTMLElement.prototype,re,r),ie(HTMLMediaElement.prototype,Y,r),ie(HTMLFrameSetElement.prototype,X.concat(J),r),ie(HTMLBodyElement.prototype,X.concat(J),r),ie(HTMLFrameElement.prototype,K,r),ie(HTMLIFrameElement.prototype,K,r);const o=e.HTMLMarqueeElement;o&&ie(o.prototype,Q,r);const a=e.Worker;a&&ie(a.prototype,oe,r)}const a=t.XMLHttpRequest;a&&ie(a.prototype,ee,r);const i=t.XMLHttpRequestEventTarget;i&&ie(i&&i.prototype,ee,r),"undefined"!=typeof IDBIndex&&(ie(IDBIndex.prototype,te,r),ie(IDBRequest.prototype,te,r),ie(IDBOpenDBRequest.prototype,te,r),ie(IDBDatabase.prototype,te,r),ie(IDBTransaction.prototype,te,r),ie(IDBCursor.prototype,te,r)),o&&ie(WebSocket.prototype,ne,r)}Zone.__load_patch("util",(n,s,c)=>{c.patchOnProperties=S,c.patchMethod=H,c.bindArguments=_,c.patchMacroTask=Z;const f=s.__symbol__("BLACK_LISTED_EVENTS"),d=s.__symbol__("UNPATCHED_EVENTS");n[d]&&(n[f]=n[d]),n[f]&&(s[f]=s[d]=n[f]),c.patchEventPrototype=W,c.patchEventTarget=B,c.isIEOrEdge=A,c.ObjectDefineProperty=t,c.ObjectGetOwnPropertyDescriptor=e,c.ObjectCreate=o,c.ArraySlice=r,c.patchClass=D,c.wrapWithCurrentZone=p,c.filterProperties=ae,c.attachOriginToPatched=P,c._redefineProperty=Object.defineProperty,c.patchCallbacks=$,c.getGlobalObjects=()=>({globalSources:F,zoneSymbolEventNames:x,eventNames:re,isBrowser:b,isMix:w,isNode:E,TRUE_STR:l,FALSE_STR:u,ZONE_SYMBOL_PREFIX:h,ADD_EVENT_LISTENER_STR:a,REMOVE_EVENT_LISTENER_STR:i})});const ce=d("zoneTask");function le(e,t,n,o){let r=null,a=null;n+=o;const i={};function s(t){const n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=r.apply(e,n.args),t}function c(t){return a.call(e,t.data.handleId)}r=H(e,t+=o,n=>function(r,a){if("function"==typeof a[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?a[1]||0:void 0,args:a},n=a[0];a[0]=function(){try{return n.apply(this,arguments)}finally{e.isPeriodic||("number"==typeof e.handleId?delete i[e.handleId]:e.handleId&&(e.handleId[ce]=null))}};const r=f(t,a[0],e,s,c);if(!r)return r;const l=r.data.handleId;return"number"==typeof l?i[l]=r:l&&(l[ce]=r),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(r.ref=l.ref.bind(l),r.unref=l.unref.bind(l)),"number"==typeof l||l?l:r}return n.apply(e,a)}),a=H(e,n,t=>function(n,o){const r=o[0];let a;"number"==typeof r?a=i[r]:(a=r&&r[ce],a||(a=r)),a&&"string"==typeof a.type?"notScheduled"!==a.state&&(a.cancelFn&&a.data.isPeriodic||0===a.runCount)&&("number"==typeof r?delete i[r]:r&&(r[ce]=null),a.zone.cancelTask(a)):t.apply(e,o)})}function ue(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:o,TRUE_STR:r,FALSE_STR:a,ZONE_SYMBOL_PREFIX:i}=t.getGlobalObjects();for(let c=0;c<n.length;c++){const e=n[c],t=i+(e+a),s=i+(e+r);o[e]={},o[e][a]=t,o[e][r]=s}const s=e.EventTarget;return s&&s.prototype?(t.patchEventTarget(e,[s&&s.prototype]),!0):void 0}Zone.__load_patch("legacy",e=>{const t=e[Zone.__symbol__("legacyPatch")];t&&t()}),Zone.__load_patch("queueMicrotask",(e,t,n)=>{n.patchMethod(e,"queueMicrotask",e=>function(e,n){t.current.scheduleMicroTask("queueMicrotask",n[0])})}),Zone.__load_patch("timers",e=>{const t="set",n="clear";le(e,t,n,"Timeout"),le(e,t,n,"Interval"),le(e,t,n,"Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{le(e,"request","cancel","AnimationFrame"),le(e,"mozRequest","mozCancel","AnimationFrame"),le(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,t)=>{const n=["alert","prompt","confirm"];for(let o=0;o<n.length;o++)H(e,n[o],(n,o,r)=>function(o,a){return t.current.run(n,e,a,r)})}),Zone.__load_patch("EventTarget",(e,t,n)=>{!function(e,t){t.patchEventPrototype(e,t)}(e,n),ue(e,n);const o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,[o.prototype])}),Zone.__load_patch("MutationObserver",(e,t,n)=>{D("MutationObserver"),D("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(e,t,n)=>{D("IntersectionObserver")}),Zone.__load_patch("FileReader",(e,t,n)=>{D("FileReader")}),Zone.__load_patch("on_property",(e,t,n)=>{se(n,e)}),Zone.__load_patch("customElements",(e,t,n)=>{!function(e,t){const{isBrowser:n,isMix:o}=t.getGlobalObjects();(n||o)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,n)}),Zone.__load_patch("XHR",(e,t)=>{!function(e){const u=e.XMLHttpRequest;if(!u)return;const h=u.prototype;let p=h[s],m=h[c];if(!p){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;p=e[s],m=e[c]}}const g="readystatechange",T="scheduled";function y(e){const o=e.data,i=o.target;i[a]=!1,i[l]=!1;const u=i[r];p||(p=i[s],m=i[c]),u&&m.call(i,g,u);const h=i[r]=()=>{if(i.readyState===i.DONE)if(!o.aborted&&i[a]&&e.state===T){const n=i[t.__symbol__("loadfalse")];if(0!==i.status&&n&&n.length>0){const r=e.invoke;e.invoke=function(){const n=i[t.__symbol__("loadfalse")];for(let t=0;t<n.length;t++)n[t]===e&&n.splice(t,1);o.aborted||e.state!==T||r.call(e)},n.push(e)}else e.invoke()}else o.aborted||!1!==i[a]||(i[l]=!0)};return p.call(i,g,h),i[n]||(i[n]=e),w.apply(i,o.args),i[a]=!0,e}function _(){}function v(e){const t=e.data;return t.aborted=!0,M.apply(t.target,t.args)}const k=H(h,"open",()=>function(e,t){return e[o]=0==t[2],e[i]=t[1],k.apply(e,t)}),E=d("fetchTaskAborting"),b=d("fetchTaskScheduling"),w=H(h,"send",()=>function(e,n){if(!0===t.current[b])return w.apply(e,n);if(e[o])return w.apply(e,n);{const t={target:e,url:e[i],isPeriodic:!1,args:n,aborted:!1},o=f("XMLHttpRequest.send",_,t,y,v);e&&!0===e[l]&&!t.aborted&&o.state===T&&o.invoke()}}),M=H(h,"abort",()=>function(e,o){const r=e[n];if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(!0===t.current[E])return M.apply(e,o)})}(e);const n=d("xhrTask"),o=d("xhrSync"),r=d("xhrListener"),a=d("xhrScheduled"),i=d("xhrURL"),l=d("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function(t,n){const o=t.constructor.name;for(let r=0;r<n.length;r++){const a=n[r],i=t[a];if(i){if(!v(e(t,a)))continue;t[a]=(e=>{const t=function(){return e.apply(this,_(arguments,o+"."+a))};return P(t,e),t})(i)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,t)=>{function n(t){return function(n){G(e,t).forEach(o=>{const r=e.PromiseRejectionEvent;if(r){const e=new r(t,{promise:n.promise,reason:n.rejection});o.invoke(e)}})}}e.PromiseRejectionEvent&&(t[d("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[d("rejectionHandledHandler")]=n("rejectionhandled"))})},796:(e,t,n)=>{"use strict";n(167),n(22)}},e=>{"use strict";e(e.s=796)}]);
(()=>{"use strict";var e,r={},t={};function n(e){var o=t[e];if(void 0!==o)return o.exports;var a=t[e]={exports:{}};return r[e](a,a.exports,n),a.exports}n.m=r,e=[],n.O=(r,t,o,a)=>{if(!t){var l=1/0;for(f=0;f<e.length;f++){for(var[t,o,a]=e[f],s=!0,u=0;u<t.length;u++)(!1&a||l>=a)&&Object.keys(n.O).every(e=>n.O[e](t[u]))?t.splice(u--,1):(s=!1,a<l&&(l=a));s&&(e.splice(f--,1),r=o())}return r}a=a||0;for(var f=e.length;f>0&&e[f-1][2]>a;f--)e[f]=e[f-1];e[f]=[t,o,a]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={666:0};n.O.j=r=>0===e[r];var r=(r,t)=>{var o,a,[l,s,u]=t,f=0;for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(u)var i=u(n);for(r&&r(t);f<l.length;f++)n.o(e,a=l[f])&&e[a]&&e[a][0](),e[l[f]]=0;return n.O(i)},t=self.webpackChunkhots_angular_elements=self.webpackChunkhots_angular_elements||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
