File: /var/www/quadcode.com/build/client/_app/immutable/nodes/10.20eeb670.js
import{s as Qe,a as st,n as Fe,c as Je,h as Tr,u as Br,i as Fr,j as Er,b as Vr,k as Lr,r as Ea}from"../chunks/index.614a0f19.js";import{S as et,i as tt,e as S,o as J,s as N,d as D,f as I,p as Q,g as M,b as z,q as _a,h as y,j as pe,r as _,u as te,A as oa,n as la,C as Nt,D as zt,t as se,y as Va,v as La,k as ue,w as Ca,H as da,I as ca,c as he,a as ve,m as ge,l as me,K as $e,F as Ga}from"../chunks/index.f20d589e.js";import{S as Rr}from"../chunks/SeoHead.27938517.js";import{s as Nr}from"../chunks/seo-image.c1f13bb2.js";import{d as Za,g as zr}from"../chunks/schemaUnified.46e5fa2f.js";import{e as Ot,s as ia,c as ya}from"../chunks/Lang.c84e954b.js";import{h as Or,m as Hr}from"../chunks/moment.55cb88ed.js";import{p as Ka}from"../chunks/index.0fccc2a6.js";import{a as Wr,g as qr}from"../chunks/Button.2c063e78.js";import{H as jr}from"../chunks/Header.ab45ac15.js";const Aa=""+new URL("../assets/download.2a482757.svg",import.meta.url).href,Ur=""+new URL("../assets/icon-01.b5527bb3.svg",import.meta.url).href,$r=""+new URL("../assets/icon-02.2e4e27b9.svg",import.meta.url).href,Yr=""+new URL("../assets/icon-03.0f198aa6.svg",import.meta.url).href;function Gr(l){let t,u,o=l[1]("useful-materials.Header")+"",r,n,e,a,s,i,f=`<img src="${Ur}" alt="icon01" class="svelte-2ao8x9"/>`,d,h,c=l[1]("useful-materials.Card1_title")+"",v,g,p,m=l[1]("useful-materials.Card1_text")+"",b,k,w,C,A,P=l[1]("useful-materials.Card1_button")+"",x,V,B,R,T,H,W,Y,E=`<img src="${$r}" alt="icon02" class="svelte-2ao8x9"/>`,q,O,$=l[1]("useful-materials.Card2_title")+"",Z,G,oe,U=l[1]("useful-materials.Card2_text")+"",ee,ne,ae,X,fe,L=l[1]("useful-materials.Card2_button")+"",re,be,de,le,ke,Se,we,Ce,Ee=`<img src="${Yr}" alt="icon03" class="svelte-2ao8x9"/>`,Ae,Te,Me=l[1]("useful-materials.Card3_title")+"",Ne,ut,Ve,Ge=l[1]("useful-materials.Card3_text")+"",ce,We,Ze,ze,pt,Oe=l[1]("useful-materials.Card3_button")+"",Pt,Ke,at,rt,St;return{c(){t=S("section"),u=S("h2"),r=J(o),n=N(),e=S("div"),a=S("div"),s=S("div"),i=S("div"),i.innerHTML=f,d=N(),h=S("div"),v=J(c),g=N(),p=S("div"),b=J(m),k=N(),w=S("div"),C=S("a"),A=S("span"),x=J(P),V=N(),B=S("img"),T=N(),H=S("div"),W=S("div"),Y=S("div"),Y.innerHTML=E,q=N(),O=S("div"),Z=J($),G=N(),oe=S("div"),ee=J(U),ne=N(),ae=S("div"),X=S("a"),fe=S("span"),re=J(L),be=N(),de=S("img"),ke=N(),Se=S("div"),we=S("div"),Ce=S("div"),Ce.innerHTML=Ee,Ae=N(),Te=S("div"),Ne=J(Me),ut=N(),Ve=S("div"),ce=J(Ge),We=N(),Ze=S("div"),ze=S("a"),pt=S("span"),Pt=J(Oe),Ke=N(),at=S("img"),this.h()},l(_e){t=D(_e,"SECTION",{class:!0});var Pe=I(t);u=D(Pe,"H2",{class:!0});var nt=I(u);r=Q(nt,o),nt.forEach(M),n=z(Pe),e=D(Pe,"DIV",{class:!0});var ft=I(e);a=D(ft,"DIV",{class:!0});var Le=I(a);s=D(Le,"DIV",{class:!0});var Dt=I(s);i=D(Dt,"DIV",{class:!0,"data-svelte-h":!0}),_a(i)!=="svelte-t9jvid"&&(i.innerHTML=f),d=z(Dt),h=D(Dt,"DIV",{class:!0});var dt=I(h);v=Q(dt,c),dt.forEach(M),Dt.forEach(M),g=z(Le),p=D(Le,"DIV",{class:!0});var It=I(p);b=Q(It,m),It.forEach(M),k=z(Le),w=D(Le,"DIV",{class:!0});var Ht=I(w);C=D(Ht,"A",{href:!0,target:!0,class:!0});var At=I(C);A=D(At,"SPAN",{});var ye=I(A);x=Q(ye,P),ye.forEach(M),V=z(At),B=D(At,"IMG",{src:!0,alt:!0,class:!0}),At.forEach(M),Ht.forEach(M),Le.forEach(M),T=z(ft),H=D(ft,"DIV",{class:!0});var qe=I(H);W=D(qe,"DIV",{class:!0});var ct=I(W);Y=D(ct,"DIV",{class:!0,"data-svelte-h":!0}),_a(Y)!=="svelte-53nwn3"&&(Y.innerHTML=E),q=z(ct),O=D(ct,"DIV",{class:!0});var Wt=I(O);Z=Q(Wt,$),Wt.forEach(M),ct.forEach(M),G=z(qe),oe=D(qe,"DIV",{class:!0});var Xt=I(oe);ee=Q(Xt,U),Xt.forEach(M),ne=z(qe),ae=D(qe,"DIV",{class:!0});var bt=I(ae);X=D(bt,"A",{href:!0,class:!0});var ht=I(X);fe=D(ht,"SPAN",{});var qt=I(fe);re=Q(qt,L),qt.forEach(M),be=z(ht),de=D(ht,"IMG",{src:!0,alt:!0,class:!0}),ht.forEach(M),bt.forEach(M),qe.forEach(M),ke=z(ft),Se=D(ft,"DIV",{class:!0});var vt=I(Se);we=D(vt,"DIV",{class:!0});var it=I(we);Ce=D(it,"DIV",{class:!0,"data-svelte-h":!0}),_a(Ce)!=="svelte-1dj64u9"&&(Ce.innerHTML=Ee),Ae=z(it),Te=D(it,"DIV",{class:!0});var Tt=I(Te);Ne=Q(Tt,Me),Tt.forEach(M),it.forEach(M),ut=z(vt),Ve=D(vt,"DIV",{class:!0});var jt=I(Ve);ce=Q(jt,Ge),jt.forEach(M),We=z(vt),Ze=D(vt,"DIV",{class:!0});var Jt=I(Ze);ze=D(Jt,"A",{href:!0,class:!0});var _t=I(ze);pt=D(_t,"SPAN",{});var Qt=I(pt);Pt=Q(Qt,Oe),Qt.forEach(M),Ke=z(_t),at=D(_t,"IMG",{src:!0,alt:!0,class:!0}),_t.forEach(M),Jt.forEach(M),vt.forEach(M),ft.forEach(M),Pe.forEach(M),this.h()},h(){y(u,"class","svelte-2ao8x9"),y(i,"class","usefulMaterialsCard__icon svelte-2ao8x9"),y(h,"class","usefulMaterialsCard__title svelte-2ao8x9"),y(s,"class","usefulMaterialsCard__header svelte-2ao8x9"),y(p,"class","usefulMaterialsCard__description svelte-2ao8x9"),st(B.src,R=Aa)||y(B,"src",R),y(B,"alt","download"),y(B,"class","svelte-2ao8x9"),y(C,"href","https://fsms.quadcode.com/storage/public/d0/q3/akhmsj7oc3be3cog/Checklist.pdf"),y(C,"target","_blank"),y(C,"class","usefulMaterialsCard__button--download svelte-2ao8x9"),y(w,"class","usefulMaterialsCard__button svelte-2ao8x9"),y(a,"class","usefulMaterialsCard usefulMaterialsCard__fullWidth svelte-2ao8x9"),y(Y,"class","usefulMaterialsCard__icon svelte-2ao8x9"),y(O,"class","usefulMaterialsCard__title svelte-2ao8x9"),y(W,"class","usefulMaterialsCard__header svelte-2ao8x9"),y(oe,"class","usefulMaterialsCard__description svelte-2ao8x9"),st(de.src,le=Aa)||y(de,"src",le),y(de,"alt","download"),y(de,"class","svelte-2ao8x9"),y(X,"href","https://quadcode.com/business-plan"),y(X,"class","usefulMaterialsCard__button--download svelte-2ao8x9"),y(ae,"class","usefulMaterialsCard__button svelte-2ao8x9"),y(H,"class","usefulMaterialsCard svelte-2ao8x9"),y(Ce,"class","usefulMaterialsCard__icon svelte-2ao8x9"),y(Te,"class","usefulMaterialsCard__title svelte-2ao8x9"),y(we,"class","usefulMaterialsCard__header svelte-2ao8x9"),y(Ve,"class","usefulMaterialsCard__description svelte-2ao8x9"),st(at.src,rt=Aa)||y(at,"src",rt),y(at,"alt","download"),y(at,"class","svelte-2ao8x9"),y(ze,"href","https://quadcode.com/marketing-guide"),y(ze,"class","usefulMaterialsCard__button--download svelte-2ao8x9"),y(Ze,"class","usefulMaterialsCard__button svelte-2ao8x9"),y(Se,"class","usefulMaterialsCard svelte-2ao8x9"),y(e,"class","usefulMaterials__container svelte-2ao8x9"),y(t,"class",St="usefulMaterials "+l[0]+" svelte-2ao8x9")},m(_e,Pe){pe(_e,t,Pe),_(t,u),_(u,r),_(t,n),_(t,e),_(e,a),_(a,s),_(s,i),_(s,d),_(s,h),_(h,v),_(a,g),_(a,p),_(p,b),_(a,k),_(a,w),_(w,C),_(C,A),_(A,x),_(C,V),_(C,B),_(e,T),_(e,H),_(H,W),_(W,Y),_(W,q),_(W,O),_(O,Z),_(H,G),_(H,oe),_(oe,ee),_(H,ne),_(H,ae),_(ae,X),_(X,fe),_(fe,re),_(X,be),_(X,de),_(e,ke),_(e,Se),_(Se,we),_(we,Ce),_(we,Ae),_(we,Te),_(Te,Ne),_(Se,ut),_(Se,Ve),_(Ve,ce),_(Se,We),_(Se,Ze),_(Ze,ze),_(ze,pt),_(pt,Pt),_(ze,Ke),_(ze,at)},p(_e,[Pe]){Pe&2&&o!==(o=_e[1]("useful-materials.Header")+"")&&te(r,o),Pe&2&&c!==(c=_e[1]("useful-materials.Card1_title")+"")&&te(v,c),Pe&2&&m!==(m=_e[1]("useful-materials.Card1_text")+"")&&te(b,m),Pe&2&&P!==(P=_e[1]("useful-materials.Card1_button")+"")&&te(x,P),Pe&2&&$!==($=_e[1]("useful-materials.Card2_title")+"")&&te(Z,$),Pe&2&&U!==(U=_e[1]("useful-materials.Card2_text")+"")&&te(ee,U),Pe&2&&L!==(L=_e[1]("useful-materials.Card2_button")+"")&&te(re,L),Pe&2&&Me!==(Me=_e[1]("useful-materials.Card3_title")+"")&&te(Ne,Me),Pe&2&&Ge!==(Ge=_e[1]("useful-materials.Card3_text")+"")&&te(ce,Ge),Pe&2&&Oe!==(Oe=_e[1]("useful-materials.Card3_button")+"")&&te(Pt,Oe),Pe&1&&St!==(St="usefulMaterials "+_e[0]+" svelte-2ao8x9")&&y(t,"class",St)},i:Fe,o:Fe,d(_e){_e&&M(t)}}}function Zr(l,t,u){let o,r;return Je(l,oa,n=>u(0,o=n)),Je(l,la,n=>u(1,r=n)),[o,r]}class Kr extends et{constructor(t){super(),tt(this,t,Zr,Gr,Qe,{})}}function Xr(l){let t,u,o,r,n,e,a,s,i,f,d,h,c,v,g=l[0].presenters[0].name+"",p,m,b,k=l[0].presenters[0].position+"",w,C,A,P,x,V,B,R,T,H=l[1]("webinars.WatchRecording")+"",W,Y;return{c(){t=S("div"),u=S("div"),o=S("img"),e=N(),a=S("div"),s=S("div"),i=S("img"),h=N(),c=S("div"),v=S("div"),p=J(g),m=N(),b=S("div"),w=J(k),C=N(),A=S("div"),P=S("a"),x=Nt("svg"),V=Nt("path"),R=N(),T=S("a"),W=J(H),this.h()},l(E){t=D(E,"DIV",{class:!0});var q=I(t);u=D(q,"DIV",{class:!0});var O=I(u);o=D(O,"IMG",{src:!0,alt:!0,class:!0}),O.forEach(M),e=z(q),a=D(q,"DIV",{class:!0});var $=I(a);s=D($,"DIV",{class:!0});var Z=I(s);i=D(Z,"IMG",{src:!0,alt:!0,class:!0}),Z.forEach(M),h=z($),c=D($,"DIV",{class:!0});var G=I(c);v=D(G,"DIV",{class:!0});var oe=I(v);p=Q(oe,g),oe.forEach(M),m=z(G),b=D(G,"DIV",{class:!0});var U=I(b);w=Q(U,k),U.forEach(M),G.forEach(M),C=z($),A=D($,"DIV",{class:!0});var ee=I(A);P=D(ee,"A",{href:!0,target:!0,class:!0});var ne=I(P);x=zt(ne,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0,class:!0});var ae=I(x);V=zt(ae,"path",{"fill-rule":!0,"clip-rule":!0,d:!0,fill:!0}),I(V).forEach(M),ae.forEach(M),ne.forEach(M),ee.forEach(M),$.forEach(M),R=z(q),T=D(q,"A",{class:!0,href:!0,target:!0});var X=I(T);W=Q(X,H),X.forEach(M),q.forEach(M),this.h()},h(){st(o.src,r=`https://img.youtube.com/vi/${l[2](l[0].youTubeLink??"")}/maxresdefault.jpg`)||y(o,"src",r),y(o,"alt",n=l[0].title),y(o,"class","svelte-cdkquj"),y(u,"class","webinarCard__thumb svelte-cdkquj"),st(i.src,f=l[0].presenters[0].avatar)||y(i,"src",f),y(i,"alt",d=l[0].presenters[0].name),y(i,"class","svelte-cdkquj"),y(s,"class","webinarCard__presenter--avatar svelte-cdkquj"),y(v,"class","webinarCard__presenter--name svelte-cdkquj"),y(b,"class","webinarCard__presenter--position svelte-cdkquj"),y(c,"class","webinarCard__presenter--info svelte-cdkquj"),y(V,"fill-rule","evenodd"),y(V,"clip-rule","evenodd"),y(V,"d","M30.8279 1.17209C31.578 1.92214 31.9995 2.93928 32 4V28C31.9995 29.0607 31.578 30.0779 30.8279 30.8279C30.0779 31.578 29.0607 31.9995 28 32H4C2.93928 31.9995 1.92214 31.578 1.17209 30.8279C0.42205 30.0779 0.000471118 29.0607 0 28V4C0.000471118 2.93928 0.42205 1.92214 1.17209 1.17209C1.92214 0.42205 2.93928 0.000471118 4 0H28C29.0607 0.000471118 30.0779 0.42205 30.8279 1.17209ZM7.22847 12.336H11.0873V23.943H7.22847V12.336ZM9.18384 6.73919C7.86356 6.73928 7.00103 7.60721 7.00103 8.74431C7.00103 9.858 7.83742 10.7494 9.13286 10.7494H9.15781C10.5034 10.7494 11.3408 9.85757 11.3408 8.74431C11.3159 7.60672 10.5034 6.73919 9.18384 6.73919ZM17.0802 13.9793C17.5936 13.1886 18.5094 12.0629 20.5572 12.0629C23.0955 12.0629 24.9991 13.7214 25 17.2873V23.9426H21.1421V17.7319C21.1421 16.173 20.583 15.1082 19.1877 15.1082C18.1218 15.1082 17.4866 15.8259 17.2082 16.519C17.1052 16.7669 17.0802 17.1137 17.0802 17.4608V23.9437H13.2225C13.2225 23.9437 13.2735 13.4247 13.2225 12.3368H17.0802V13.9793Z"),y(V,"fill","#323232"),y(x,"width","32"),y(x,"height","32"),y(x,"viewBox","0 0 32 32"),y(x,"fill","none"),y(x,"xmlns","http://www.w3.org/2000/svg"),y(x,"class","svelte-cdkquj"),y(P,"href",B=l[0].presenters[0].linkedin),y(P,"target","_blank"),y(P,"class","svelte-cdkquj"),y(A,"class","webinarCard__presenter--social svelte-cdkquj"),y(a,"class","webinarCard__presenter svelte-cdkquj"),y(T,"class","webinarCard__button svelte-cdkquj"),y(T,"href",Y=l[0].youTubeLink),y(T,"target","_blank"),y(t,"class","webinarCard svelte-cdkquj")},m(E,q){pe(E,t,q),_(t,u),_(u,o),_(t,e),_(t,a),_(a,s),_(s,i),_(a,h),_(a,c),_(c,v),_(v,p),_(c,m),_(c,b),_(b,w),_(a,C),_(a,A),_(A,P),_(P,x),_(x,V),_(t,R),_(t,T),_(T,W)},p(E,[q]){q&1&&!st(o.src,r=`https://img.youtube.com/vi/${E[2](E[0].youTubeLink??"")}/maxresdefault.jpg`)&&y(o,"src",r),q&1&&n!==(n=E[0].title)&&y(o,"alt",n),q&1&&!st(i.src,f=E[0].presenters[0].avatar)&&y(i,"src",f),q&1&&d!==(d=E[0].presenters[0].name)&&y(i,"alt",d),q&1&&g!==(g=E[0].presenters[0].name+"")&&te(p,g),q&1&&k!==(k=E[0].presenters[0].position+"")&&te(w,k),q&1&&B!==(B=E[0].presenters[0].linkedin)&&y(P,"href",B),q&2&&H!==(H=E[1]("webinars.WatchRecording")+"")&&te(W,H),q&1&&Y!==(Y=E[0].youTubeLink)&&y(T,"href",Y)},i:Fe,o:Fe,d(E){E&&M(t)}}}function Jr(l,t,u){let o;Je(l,la,e=>u(1,o=e));let{webinar:r}=t;const n=e=>{if(!e)return null;e=e.trim();const a=[/(?:youtube\.com\/.*v=)([A-Za-z0-9_-]{11})/,/(?:youtube\.com\/embed\/)([A-Za-z0-9_-]{11})/,/(?:youtu\.be\/)([A-Za-z0-9_-]{11})/,/(?:youtube\.com\/v\/)([A-Za-z0-9_-]{11})/,/^([A-Za-z0-9_-]{11})$/];for(const i of a){const f=e.match(i);if(f&&f[1])return f[1]}return e.split(/[^A-Za-z0-9_-]/).find(i=>i.length===11)||null};return l.$$set=e=>{"webinar"in e&&u(0,r=e.webinar)},[r,o,n]}class Qr extends et{constructor(t){super(),tt(this,t,Jr,Xr,Qe,{webinar:0})}}const en=""+new URL("../assets/cursor.6d637cca.png",import.meta.url).href,tn=""+new URL("../assets/devices.f59adcf2.png",import.meta.url).href,an=""+new URL("../assets/devices-mobile.0a7880bb.png",import.meta.url).href,rn=""+new URL("../assets/avatar-1.22f4e2e3.png",import.meta.url).href,Xa=""+new URL("../assets/avatar-2.4854104d.jpeg",import.meta.url).href;function Ja(l,t,u){const o=l.slice();return o[5]=t[u],o}function Qa(l,t,u){const o=l.slice();return o[8]=t[u],o}function er(l){let t,u,o,r,n,e,a=l[2]("Upcoming webinar")+"",s,i,f,d,h='<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-1nomy18"><path d="M28.5 5H7.5C5.84315 5 4.5 6.34315 4.5 8V29C4.5 30.6569 5.84315 32 7.5 32H28.5C30.1569 32 31.5 30.6569 31.5 29V8C31.5 6.34315 30.1569 5 28.5 5Z" stroke="#E62334" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><path d="M24 2V8" stroke="#E62334" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 2V8" stroke="#E62334" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4.5 14H31.5" stroke="#E62334" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path></svg>',c,v,g=Or(l[3].date).format("MMM D, HH:mm")+" GMT+3",p,m,b,k=l[3].title+"",w,C,A,P,x,V,B,R,T,H=l[2]("webinars.Agenda")+"",W,Y,E,q=l[3].agenda+"",O,$,Z,G,oe,U=l[2]("webinars.RegisterNow")+"",ee,ne=Ot(l[3].presenters),ae=[];for(let X=0;X<ne.length;X+=1)ae[X]=tr(Qa(l,ne,X));return{c(){t=S("div"),u=S("div"),o=S("div"),r=S("div"),n=S("div"),e=S("div"),s=J(a),i=N(),f=S("div"),d=S("div"),d.innerHTML=h,c=N(),v=S("div"),p=J(g),m=N(),b=S("div"),w=J(k),C=N();for(let X=0;X<ae.length;X+=1)ae[X].c();A=N(),P=S("img"),V=N(),B=S("div"),R=S("div"),T=S("h2"),W=J(H),Y=N(),E=new da(!1),O=N(),$=S("img"),G=N(),oe=S("a"),ee=J(U),this.h()},l(X){t=D(X,"DIV",{class:!0});var fe=I(t);u=D(fe,"DIV",{class:!0});var L=I(u);o=D(L,"DIV",{class:!0});var re=I(o);r=D(re,"DIV",{class:!0});var be=I(r);n=D(be,"DIV",{class:!0});var de=I(n);e=D(de,"DIV",{class:!0});var le=I(e);s=Q(le,a),le.forEach(M),i=z(de),f=D(de,"DIV",{class:!0});var ke=I(f);d=D(ke,"DIV",{class:!0,"data-svelte-h":!0}),_a(d)!=="svelte-pjobtz"&&(d.innerHTML=h),c=z(ke),v=D(ke,"DIV",{class:!0});var Se=I(v);p=Q(Se,g),Se.forEach(M),ke.forEach(M),de.forEach(M),m=z(be),b=D(be,"DIV",{class:!0});var we=I(b);w=Q(we,k),we.forEach(M),C=z(be);for(let Me=0;Me<ae.length;Me+=1)ae[Me].l(be);be.forEach(M),A=z(re),P=D(re,"IMG",{src:!0,class:!0,alt:!0}),V=z(re),B=D(re,"DIV",{class:!0});var Ce=I(B);R=D(Ce,"DIV",{class:!0});var Ee=I(R);T=D(Ee,"H2",{class:!0});var Ae=I(T);W=Q(Ae,H),Ae.forEach(M),Y=z(Ee),E=ca(Ee,!1),Ee.forEach(M),Ce.forEach(M),re.forEach(M),O=z(L),$=D(L,"IMG",{src:!0,class:!0,alt:!0}),G=z(L),oe=D(L,"A",{href:!0,target:!0,class:!0});var Te=I(oe);ee=Q(Te,U),Te.forEach(M),L.forEach(M),fe.forEach(M),this.h()},h(){y(e,"class","webinars__upcoming svelte-1nomy18"),y(d,"class","webinars__date-icon svelte-1nomy18"),y(v,"class","webinars__date-text svelte-1nomy18"),y(f,"class","webinars__date svelte-1nomy18"),y(n,"class","webinars__infoline svelte-1nomy18"),y(b,"class","webinars__title svelte-1nomy18"),y(r,"class","webinars__side webinars__side--left svelte-1nomy18"),st(P.src,x=an)||y(P,"src",x),y(P,"class","webinars__bg--mobile svelte-1nomy18"),y(P,"alt",l[3].title),y(T,"class","svelte-1nomy18"),E.a=null,y(R,"class","webinars__agenda svelte-1nomy18"),y(B,"class","webinars__side webinars__side--right svelte-1nomy18"),y(o,"class","webinars__sides svelte-1nomy18"),st($.src,Z=tn)||y($,"src",Z),y($,"class","webinars__bg svelte-1nomy18"),y($,"alt",l[3].title),y(oe,"href",l[3].registrationLink),y(oe,"target","_blank"),y(oe,"class","webinars__register svelte-1nomy18"),y(u,"class","webinars__featured--container"),y(t,"class","webinars__featured svelte-1nomy18")},m(X,fe){pe(X,t,fe),_(t,u),_(u,o),_(o,r),_(r,n),_(n,e),_(e,s),_(n,i),_(n,f),_(f,d),_(f,c),_(f,v),_(v,p),_(r,m),_(r,b),_(b,w),_(r,C);for(let L=0;L<ae.length;L+=1)ae[L]&&ae[L].m(r,null);_(o,A),_(o,P),_(o,V),_(o,B),_(B,R),_(R,T),_(T,W),_(R,Y),E.m(q,R),_(u,O),_(u,$),_(u,G),_(u,oe),_(oe,ee)},p(X,fe){if(fe&4&&a!==(a=X[2]("Upcoming webinar")+"")&&te(s,a),fe&8){ne=Ot(X[3].presenters);let L;for(L=0;L<ne.length;L+=1){const re=Qa(X,ne,L);ae[L]?ae[L].p(re,fe):(ae[L]=tr(re),ae[L].c(),ae[L].m(r,null))}for(;L<ae.length;L+=1)ae[L].d(1);ae.length=ne.length}fe&4&&H!==(H=X[2]("webinars.Agenda")+"")&&te(W,H),fe&4&&U!==(U=X[2]("webinars.RegisterNow")+"")&&te(ee,U)},d(X){X&&M(t),Ca(ae,X)}}}function tr(l){let t,u,o,r,n,e,a,s=l[8].name+"",i,f,d,h=l[8].position+"",c,v,g,p,m,b,k;return{c(){t=S("div"),u=S("div"),o=S("img"),n=N(),e=S("div"),a=S("div"),i=J(s),f=N(),d=S("div"),c=J(h),v=N(),g=S("div"),p=S("a"),m=Nt("svg"),b=Nt("path"),k=N(),this.h()},l(w){t=D(w,"DIV",{class:!0});var C=I(t);u=D(C,"DIV",{class:!0});var A=I(u);o=D(A,"IMG",{src:!0,alt:!0,class:!0}),A.forEach(M),n=z(C),e=D(C,"DIV",{class:!0});var P=I(e);a=D(P,"DIV",{class:!0});var x=I(a);i=Q(x,s),x.forEach(M),f=z(P),d=D(P,"DIV",{class:!0});var V=I(d);c=Q(V,h),V.forEach(M),P.forEach(M),v=z(C),g=D(C,"DIV",{class:!0});var B=I(g);p=D(B,"A",{href:!0,target:!0,class:!0});var R=I(p);m=zt(R,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0,class:!0});var T=I(m);b=zt(T,"path",{"fill-rule":!0,"clip-rule":!0,d:!0,fill:!0}),I(b).forEach(M),T.forEach(M),R.forEach(M),B.forEach(M),k=z(C),C.forEach(M),this.h()},h(){st(o.src,r=l[8].avatar)||y(o,"src",r),y(o,"alt",l[8].name),y(o,"class","svelte-1nomy18"),y(u,"class","webinars__presenter--avatar svelte-1nomy18"),y(a,"class","webinars__presenter--name svelte-1nomy18"),y(d,"class","webinars__presenter--position svelte-1nomy18"),y(e,"class","webinars__presenter--info svelte-1nomy18"),y(b,"fill-rule","evenodd"),y(b,"clip-rule","evenodd"),y(b,"d","M30.8279 1.17209C31.578 1.92214 31.9995 2.93928 32 4V28C31.9995 29.0607 31.578 30.0779 30.8279 30.8279C30.0779 31.578 29.0607 31.9995 28 32H4C2.93928 31.9995 1.92214 31.578 1.17209 30.8279C0.42205 30.0779 0.000471118 29.0607 0 28V4C0.000471118 2.93928 0.42205 1.92214 1.17209 1.17209C1.92214 0.42205 2.93928 0.000471118 4 0H28C29.0607 0.000471118 30.0779 0.42205 30.8279 1.17209ZM7.22847 12.336H11.0873V23.943H7.22847V12.336ZM9.18384 6.73919C7.86356 6.73928 7.00103 7.60721 7.00103 8.74431C7.00103 9.858 7.83742 10.7494 9.13286 10.7494H9.15781C10.5034 10.7494 11.3408 9.85757 11.3408 8.74431C11.3159 7.60672 10.5034 6.73919 9.18384 6.73919ZM17.0802 13.9793C17.5936 13.1886 18.5094 12.0629 20.5572 12.0629C23.0955 12.0629 24.9991 13.7214 25 17.2873V23.9426H21.1421V17.7319C21.1421 16.173 20.583 15.1082 19.1877 15.1082C18.1218 15.1082 17.4866 15.8259 17.2082 16.519C17.1052 16.7669 17.0802 17.1137 17.0802 17.4608V23.9437H13.2225C13.2225 23.9437 13.2735 13.4247 13.2225 12.3368H17.0802V13.9793Z"),y(b,"fill","white"),y(m,"width","32"),y(m,"height","32"),y(m,"viewBox","0 0 32 32"),y(m,"fill","none"),y(m,"xmlns","http://www.w3.org/2000/svg"),y(m,"class","svelte-1nomy18"),y(p,"href",l[8].linkedin),y(p,"target","_blank"),y(p,"class","svelte-1nomy18"),y(g,"class","webinars__presenter--social svelte-1nomy18"),y(t,"class","webinars__presenter svelte-1nomy18")},m(w,C){pe(w,t,C),_(t,u),_(u,o),_(t,n),_(t,e),_(e,a),_(a,i),_(e,f),_(e,d),_(d,c),_(t,v),_(t,g),_(g,p),_(p,m),_(m,b),_(t,k)},p:Fe,d(w){w&&M(t)}}}function ar(l){let t,u;return t=new Qr({props:{webinar:l[5]}}),{c(){he(t.$$.fragment)},l(o){ve(t.$$.fragment,o)},m(o,r){ge(t,o,r),u=!0},p:Fe,i(o){u||(se(t.$$.fragment,o),u=!0)},o(o){ue(t.$$.fragment,o),u=!1},d(o){me(t,o)}}}function nn(l){let t,u,o,r=l[2]("webinars.Header")+"",n,e,a,s=l[2]("webinars.Subtitle")+"",i,f,d,h,c,v,g,p,m=l[2]("webinars.PreviousHeader")+"",b,k,w,C=l[2]("webinars.SeeAll")+"",A,P,x,V,B,R,T=l[0].featured&&er(l),H=Ot(l[4]),W=[];for(let E=0;E<H.length;E+=1)W[E]=ar(Ja(l,H,E));const Y=E=>ue(W[E],1,1,()=>{W[E]=null});return{c(){t=S("section"),u=S("div"),o=S("h2"),n=J(r),e=N(),a=S("p"),i=J(s),f=N(),d=S("img"),c=N(),T&&T.c(),v=N(),g=S("div"),p=S("h2"),b=J(m),k=N(),w=S("a"),A=J(C),x=N(),V=S("div");for(let E=0;E<W.length;E+=1)W[E].c();this.h()},l(E){t=D(E,"SECTION",{class:!0});var q=I(t);u=D(q,"DIV",{class:!0});var O=I(u);o=D(O,"H2",{class:!0});var $=I(o);n=Q($,r),$.forEach(M),e=z(O),a=D(O,"P",{class:!0});var Z=I(a);i=Q(Z,s),Z.forEach(M),f=z(O),d=D(O,"IMG",{src:!0,class:!0,alt:!0}),c=z(O),T&&T.l(O),v=z(O),g=D(O,"DIV",{class:!0});var G=I(g);p=D(G,"H2",{class:!0});var oe=I(p);b=Q(oe,m),oe.forEach(M),k=z(G),w=D(G,"A",{href:!0,class:!0});var U=I(w);A=Q(U,C),U.forEach(M),G.forEach(M),x=z(O),V=D(O,"DIV",{class:!0});var ee=I(V);for(let ne=0;ne<W.length;ne+=1)W[ne].l(ee);ee.forEach(M),O.forEach(M),q.forEach(M),this.h()},h(){y(o,"class","title svelte-1nomy18"),y(a,"class","webinars__subtitle svelte-1nomy18"),st(d.src,h=en)||y(d,"src",h),y(d,"class","webinars__cursor svelte-1nomy18"),y(d,"alt","cursor"),y(p,"class","svelte-1nomy18"),y(w,"href",P="/"+l[1]+"/webinars"),y(w,"class","webinars__seeAll svelte-1nomy18"),y(g,"class","webinars__previous--line svelte-1nomy18"),y(V,"class","webinars__previous--cards svelte-1nomy18"),y(u,"class","webinars__container svelte-1nomy18"),y(t,"class",B="webinars "+l[1]+" svelte-1nomy18")},m(E,q){pe(E,t,q),_(t,u),_(u,o),_(o,n),_(u,e),_(u,a),_(a,i),_(u,f),_(u,d),_(u,c),T&&T.m(u,null),_(u,v),_(u,g),_(g,p),_(p,b),_(g,k),_(g,w),_(w,A),_(u,x),_(u,V);for(let O=0;O<W.length;O+=1)W[O]&&W[O].m(V,null);R=!0},p(E,[q]){if((!R||q&4)&&r!==(r=E[2]("webinars.Header")+"")&&te(n,r),(!R||q&4)&&s!==(s=E[2]("webinars.Subtitle")+"")&&te(i,s),E[0].featured?T?T.p(E,q):(T=er(E),T.c(),T.m(u,v)):T&&(T.d(1),T=null),(!R||q&4)&&m!==(m=E[2]("webinars.PreviousHeader")+"")&&te(b,m),(!R||q&4)&&C!==(C=E[2]("webinars.SeeAll")+"")&&te(A,C),(!R||q&2&&P!==(P="/"+E[1]+"/webinars"))&&y(w,"href",P),q&16){H=Ot(E[4]);let O;for(O=0;O<H.length;O+=1){const $=Ja(E,H,O);W[O]?(W[O].p($,q),se(W[O],1)):(W[O]=ar($),W[O].c(),se(W[O],1),W[O].m(V,null))}for(Va(),O=H.length;O<W.length;O+=1)Y(O);La()}(!R||q&2&&B!==(B="webinars "+E[1]+" svelte-1nomy18"))&&y(t,"class",B)},i(E){if(!R){for(let q=0;q<H.length;q+=1)se(W[q]);R=!0}},o(E){W=W.filter(Boolean);for(let q=0;q<W.length;q+=1)ue(W[q]);R=!1},d(E){E&&M(t),T&&T.d(),Ca(W,E)}}}function on(l,t,u){let o,r;Je(l,oa,s=>u(1,o=s)),Je(l,la,s=>u(2,r=s));let{data:n}=t;const e=n.featured,a=[{title:"",agenda:"",date:"",presenters:[{name:"Daniel Chatzivarnava",description:"",position:"",avatar:Xa,linkedin:"https://www.linkedin.com/in/daniel-h-972a32b9/"}],registrationLink:"",youTubeLink:"https://www.youtube.com/watch?v=lRWiCeYqYi8",image:null,isFeatured:!1},{title:"",agenda:"",date:"",presenters:[{name:"Ivan Bogatyrev",description:"",position:"Business Development Manager",avatar:rn,linkedin:"https://www.linkedin.com/in/ivan-bogatirev-329984313/"}],registrationLink:"",youTubeLink:"https://www.youtube.com/watch?v=3_dZAp2bOp0",image:null,isFeatured:!1},{title:"",agenda:"",date:"",presenters:[{name:"Daniel Chatzivarnava",description:"",position:"",avatar:Xa,linkedin:"https://www.linkedin.com/in/daniel-h-972a32b9/"}],registrationLink:"",youTubeLink:"https://www.youtube.com/watch?v=X8BwB0aN9Jg",image:null,isFeatured:!1}];return l.$$set=s=>{"data"in s&&u(0,n=s.data)},[n,o,r,e,a]}class ln extends et{constructor(t){super(),tt(this,t,on,nn,Qe,{data:0})}}function rr(l){let t,u;return{c(){t=S("div"),u=J(l[1]),this.h()},l(o){t=D(o,"DIV",{class:!0});var r=I(t);u=Q(r,l[1]),r.forEach(M),this.h()},h(){y(t,"class","calculatorInput__Label svelte-ez0ax")},m(o,r){pe(o,t,r),_(t,u)},p(o,r){r&2&&te(u,o[1])},d(o){o&&M(t)}}}function nr(l){let t,u;return{c(){t=S("div"),u=J(l[2]),this.h()},l(o){t=D(o,"DIV",{class:!0});var r=I(t);u=Q(r,l[2]),r.forEach(M),this.h()},h(){y(t,"class","calculatorInput__Hint svelte-ez0ax")},m(o,r){pe(o,t,r),_(t,u)},p(o,r){r&4&&te(u,o[2])},d(o){o&&M(t)}}}function ir(l){let t,u;return{c(){t=S("div"),u=J(l[5]),this.h()},l(o){t=D(o,"DIV",{class:!0});var r=I(t);u=Q(r,l[5]),r.forEach(M),this.h()},h(){y(t,"class","calculatorInput__SubLabel svelte-ez0ax")},m(o,r){pe(o,t,r),_(t,u)},p(o,r){r&32&&te(u,o[5])},d(o){o&&M(t)}}}function or(l){let t,u;return{c(){t=S("div"),u=J(l[4]),this.h()},l(o){t=D(o,"DIV",{class:!0});var r=I(t);u=Q(r,l[4]),r.forEach(M),this.h()},h(){y(t,"class","calculatorInput__extraPlaceholder svelte-ez0ax")},m(o,r){pe(o,t,r),_(t,u)},p(o,r){r&16&&te(u,o[4])},d(o){o&&M(t)}}}function sn(l){let t,u,o,r,n,e,a,s,i,f,d=l[1]!==""&&rr(l),h=l[1]!==""&&nr(l),c=l[5]!==""&&ir(l),v=l[7]&&or(l);return{c(){t=S("div"),d&&d.c(),u=N(),h&&h.c(),o=N(),c&&c.c(),r=N(),n=S("div"),v&&v.c(),e=N(),a=S("input"),this.h()},l(g){t=D(g,"DIV",{class:!0});var p=I(t);d&&d.l(p),u=z(p),h&&h.l(p),o=z(p),c&&c.l(p),r=z(p),n=D(p,"DIV",{class:!0});var m=I(n);v&&v.l(m),e=z(m),a=D(m,"INPUT",{class:!0,type:!0,placeholder:!0}),m.forEach(M),p.forEach(M),this.h()},h(){y(a,"class","calculatorInput__input svelte-ez0ax"),y(a,"type","number"),a.value=l[0],y(a,"placeholder",l[6]),y(n,"class","calculatorInput__inputContainer svelte-ez0ax"),y(t,"class",s="calculatorInput "+l[8]+" "+l[3]+" svelte-ez0ax")},m(g,p){pe(g,t,p),d&&d.m(t,null),_(t,u),h&&h.m(t,null),_(t,o),c&&c.m(t,null),_(t,r),_(t,n),v&&v.m(n,null),_(n,e),_(n,a),i||(f=$e(a,"input",l[9]),i=!0)},p(g,[p]){g[1]!==""?d?d.p(g,p):(d=rr(g),d.c(),d.m(t,u)):d&&(d.d(1),d=null),g[1]!==""?h?h.p(g,p):(h=nr(g),h.c(),h.m(t,o)):h&&(h.d(1),h=null),g[5]!==""?c?c.p(g,p):(c=ir(g),c.c(),c.m(t,r)):c&&(c.d(1),c=null),g[7]?v?v.p(g,p):(v=or(g),v.c(),v.m(n,e)):v&&(v.d(1),v=null),p&1&&a.value!==g[0]&&(a.value=g[0]),p&64&&y(a,"placeholder",g[6]),p&264&&s!==(s="calculatorInput "+g[8]+" "+g[3]+" svelte-ez0ax")&&y(t,"class",s)},i:Fe,o:Fe,d(g){g&&M(t),d&&d.d(),h&&h.d(),c&&c.d(),v&&v.d(),i=!1,f()}}}function un(l,t,u){let o;Je(l,oa,g=>u(8,o=g));let{id:r}=t,{title:n=""}=t,{hint:e=""}=t,{value:a}=t,{className:s=""}=t,{extraPlaceholder:i=""}=t,{subLabel:f=""}=t,{placeholder:d=""}=t,h=!0,c;ia.subscribe(g=>{var p;c=g,u(0,a=((p=c[r])==null?void 0:p.toString())??"")});const v=g=>{u(0,a=g.currentTarget.value),u(7,h=!1),c[r]=Number(a),ia.set(c)};return l.$$set=g=>{"id"in g&&u(10,r=g.id),"title"in g&&u(1,n=g.title),"hint"in g&&u(2,e=g.hint),"value"in g&&u(0,a=g.value),"className"in g&&u(3,s=g.className),"extraPlaceholder"in g&&u(4,i=g.extraPlaceholder),"subLabel"in g&&u(5,f=g.subLabel),"placeholder"in g&&u(6,d=g.placeholder)},[a,n,e,s,i,f,d,h,o,v,r]}class xt extends et{constructor(t){super(),tt(this,t,un,sn,Qe,{id:10,title:1,hint:2,value:0,className:3,extraPlaceholder:4,subLabel:5,placeholder:6})}}function lr(l){let t,u;return{c(){t=S("div"),u=J(l[1]),this.h()},l(o){t=D(o,"DIV",{class:!0});var r=I(t);u=Q(r,l[1]),r.forEach(M),this.h()},h(){y(t,"class","calculatorSliderInput__Label svelte-lgqbo8")},m(o,r){pe(o,t,r),_(t,u)},p(o,r){r&2&&te(u,o[1])},d(o){o&&M(t)}}}function sr(l){let t,u;return{c(){t=S("div"),u=J(l[2]),this.h()},l(o){t=D(o,"DIV",{class:!0});var r=I(t);u=Q(r,l[2]),r.forEach(M),this.h()},h(){y(t,"class","calculatorSliderInput__Hint svelte-lgqbo8")},m(o,r){pe(o,t,r),_(t,u)},p(o,r){r&4&&te(u,o[2])},d(o){o&&M(t)}}}function ur(l){let t,u;return{c(){t=S("div"),u=J(l[7]),this.h()},l(o){t=D(o,"DIV",{class:!0});var r=I(t);u=Q(r,l[7]),r.forEach(M),this.h()},h(){y(t,"class","calculatorSliderInput__SubLabel svelte-lgqbo8")},m(o,r){pe(o,t,r),_(t,u)},p(o,r){r&128&&te(u,o[7])},d(o){o&&M(t)}}}function fr(l){let t,u;return{c(){t=S("div"),u=J(l[6]),this.h()},l(o){t=D(o,"DIV",{class:!0});var r=I(t);u=Q(r,l[6]),r.forEach(M),this.h()},h(){y(t,"class","calculatorSliderInput__ExtraPlaceholder svelte-lgqbo8")},m(o,r){pe(o,t,r),_(t,u)},p(o,r){r&64&&te(u,o[6])},d(o){o&&M(t)}}}function fn(l){let t,u,o,r,n,e,a,s,i=Ka(parseInt(l[8]),...l[12])+"",f,d,h,c,v,g,p,m,b,k=new Intl.NumberFormat("en-US").format(l[4][0])+"",w,C=l[5]==="%"?"%":"",A,P,x,V=new Intl.NumberFormat("en-US").format(l[4][1])+"",B,R=l[5]==="%"?"%":"",T,H,W,Y,E=l[1]!==""&&lr(l),q=l[1]!==""&&sr(l),O=l[7]!==""&&ur(l),$=l[6]!==""&&fr(l);return{c(){t=S("div"),E&&E.c(),u=N(),q&&q.c(),o=N(),O&&O.c(),r=N(),$&&$.c(),n=N(),e=S("div"),a=J(l[8]),s=N(),f=J(i),d=N(),h=S("div"),c=S("label"),v=S("input"),m=N(),b=S("div"),w=J(k),A=J(C),P=N(),x=S("div"),B=J(V),T=J(R),this.h()},l(Z){t=D(Z,"DIV",{class:!0});var G=I(t);E&&E.l(G),u=z(G),q&&q.l(G),o=z(G),O&&O.l(G),r=z(G),$&&$.l(G),n=z(G),e=D(G,"DIV",{class:!0});var oe=I(e);a=Q(oe,l[8]),s=z(oe),f=Q(oe,i),oe.forEach(M),d=z(G),h=D(G,"DIV",{class:!0});var U=I(h);c=D(U,"LABEL",{class:!0});var ee=I(c);v=D(ee,"INPUT",{type:!0,min:!0,max:!0,"aria-label":!0,style:!0,class:!0}),ee.forEach(M),m=z(U),b=D(U,"DIV",{class:!0});var ne=I(b);w=Q(ne,k),A=Q(ne,C),ne.forEach(M),P=z(U),x=D(U,"DIV",{class:!0});var ae=I(x);B=Q(ae,V),T=Q(ae,R),ae.forEach(M),U.forEach(M),G.forEach(M),this.h()},h(){y(e,"class","calculatorSliderInput__Value svelte-lgqbo8"),y(v,"type","range"),y(v,"min",g=l[4][0]),y(v,"max",p=l[4][1]),v.value=l[0],y(v,"aria-label","Range"),Ga(v,"background","linear-gradient(to right, rgb(68, 86, 103) "+l[9]+"%, rgb(207, 218, 225) "+l[9]+"%)"),y(v,"class","svelte-lgqbo8"),y(c,"class","calculatorSliderInput__range svelte-lgqbo8"),y(b,"class","calculatorSliderInput__rangeContainer--min svelte-lgqbo8"),y(x,"class","calculatorSliderInput__rangeContainer--max svelte-lgqbo8"),y(h,"class","calculatorSliderInput__rangeContainer svelte-lgqbo8"),y(t,"class",H="calculatorSliderInput "+l[10]+" "+l[3]+" svelte-lgqbo8")},m(Z,G){pe(Z,t,G),E&&E.m(t,null),_(t,u),q&&q.m(t,null),_(t,o),O&&O.m(t,null),_(t,r),$&&$.m(t,null),_(t,n),_(t,e),_(e,a),_(e,s),_(e,f),_(t,d),_(t,h),_(h,c),_(c,v),_(h,m),_(h,b),_(b,w),_(b,A),_(h,P),_(h,x),_(x,B),_(x,T),W||(Y=$e(v,"input",l[11]),W=!0)},p(Z,[G]){Z[1]!==""?E?E.p(Z,G):(E=lr(Z),E.c(),E.m(t,u)):E&&(E.d(1),E=null),Z[1]!==""?q?q.p(Z,G):(q=sr(Z),q.c(),q.m(t,o)):q&&(q.d(1),q=null),Z[7]!==""?O?O.p(Z,G):(O=ur(Z),O.c(),O.m(t,r)):O&&(O.d(1),O=null),Z[6]!==""?$?$.p(Z,G):($=fr(Z),$.c(),$.m(t,n)):$&&($.d(1),$=null),G&256&&te(a,Z[8]),G&256&&i!==(i=Ka(parseInt(Z[8]),...Z[12])+"")&&te(f,i),G&16&&g!==(g=Z[4][0])&&y(v,"min",g),G&16&&p!==(p=Z[4][1])&&y(v,"max",p),G&1&&(v.value=Z[0]),G&512&&Ga(v,"background","linear-gradient(to right, rgb(68, 86, 103) "+Z[9]+"%, rgb(207, 218, 225) "+Z[9]+"%)"),G&16&&k!==(k=new Intl.NumberFormat("en-US").format(Z[4][0])+"")&&te(w,k),G&32&&C!==(C=Z[5]==="%"?"%":"")&&te(A,C),G&16&&V!==(V=new Intl.NumberFormat("en-US").format(Z[4][1])+"")&&te(B,V),G&32&&R!==(R=Z[5]==="%"?"%":"")&&te(T,R),G&1032&&H!==(H="calculatorSliderInput "+Z[10]+" "+Z[3]+" svelte-lgqbo8")&&y(t,"class",H)},i:Fe,o:Fe,d(Z){Z&&M(t),E&&E.d(),q&&q.d(),O&&O.d(),$&&$.d(),W=!1,Y()}}}function dn(l,t,u){let o;Je(l,oa,k=>u(10,o=k));let{id:r}=t,{title:n=""}=t,{hint:e=""}=t,{value:a}=t,{className:s=""}=t,{range:i=[0,100]}=t,{name:f=""}=t,{extraPlaceholder:d=""}=t,{subLabel:h=""}=t,c;ia.subscribe(k=>{c=k,u(0,a=c[r]??0)});let v=new Intl.NumberFormat("en-US").format(a),g=a*100/i[1];const p=k=>{u(0,a=Number(k.currentTarget.value)),u(8,v=new Intl.NumberFormat("en-US").format(a)),u(9,g=a*100/i[1]),c[r]=a,ia.set(c)},m=f.split("|"),b=[m[0]??"",m[1]??"",m[2]??""];return l.$$set=k=>{"id"in k&&u(13,r=k.id),"title"in k&&u(1,n=k.title),"hint"in k&&u(2,e=k.hint),"value"in k&&u(0,a=k.value),"className"in k&&u(3,s=k.className),"range"in k&&u(4,i=k.range),"name"in k&&u(5,f=k.name),"extraPlaceholder"in k&&u(6,d=k.extraPlaceholder),"subLabel"in k&&u(7,h=k.subLabel)},[a,n,e,s,i,f,d,h,v,g,o,p,b,r]}class Rt extends et{constructor(t){super(),tt(this,t,dn,fn,Qe,{id:13,title:1,hint:2,value:0,className:3,range:4,name:5,extraPlaceholder:6,subLabel:7})}}const ka=l=>{const t=["","K","M","B"];let u=l,o=0;for(;u>1e3;)o++,u=Math.floor(u/1e3);return`${u}${t[o]}`};function dr(l,t,u){const o=l.slice();return o[8]=t[u],o}function cr(l){let t,u;return{c(){t=S("div"),this.h()},l(o){t=D(o,"DIV",{class:!0}),I(t).forEach(M),this.h()},h(){y(t,"class",u="progress__item "+(l[8]<l[4]?"active":"")+" svelte-fnuyx6")},m(o,r){pe(o,t,r)},p(o,r){r&24&&u!==(u="progress__item "+(o[8]<o[4]?"active":"")+" svelte-fnuyx6")&&y(t,"class",u)},d(o){o&&M(t)}}}function cn(l){let t,u,o,r,n,e,a=`$${ka(l[0])}`,s,i,f,d,h=Ot(l[3]),c=[];for(let v=0;v<h.length;v+=1)c[v]=cr(dr(l,h,v));return{c(){t=S("div"),u=S("div"),o=J(l[1]),r=N(),n=S("div"),e=S("div"),s=J(a),i=N(),f=S("div");for(let v=0;v<c.length;v+=1)c[v].c();this.h()},l(v){t=D(v,"DIV",{class:!0});var g=I(t);u=D(g,"DIV",{class:!0});var p=I(u);o=Q(p,l[1]),p.forEach(M),r=z(g),n=D(g,"DIV",{class:!0});var m=I(n);e=D(m,"DIV",{class:!0});var b=I(e);s=Q(b,a),b.forEach(M),i=z(m),f=D(m,"DIV",{class:!0});var k=I(f);for(let w=0;w<c.length;w+=1)c[w].l(k);k.forEach(M),m.forEach(M),g.forEach(M),this.h()},h(){y(u,"class","progress__title svelte-fnuyx6"),y(e,"class","progress__value svelte-fnuyx6"),y(f,"class","progress__bar svelte-fnuyx6"),y(n,"class","progress__container svelte-fnuyx6"),y(t,"class",d="progress "+l[2]+" svelte-fnuyx6")},m(v,g){pe(v,t,g),_(t,u),_(u,o),_(t,r),_(t,n),_(n,e),_(e,s),_(n,i),_(n,f);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(f,null)},p(v,[g]){if(g&2&&te(o,v[1]),g&1&&a!==(a=`$${ka(v[0])}`)&&te(s,a),g&24){h=Ot(v[3]);let p;for(p=0;p<h.length;p+=1){const m=dr(v,h,p);c[p]?c[p].p(m,g):(c[p]=cr(m),c[p].c(),c[p].m(f,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=h.length}g&4&&d!==(d="progress "+v[2]+" svelte-fnuyx6")&&y(t,"class",d)},i:Fe,o:Fe,d(v){v&&M(t),Ca(c,v)}}}function hn(l,t,u){let o,r,{value:n}=t,{max:e}=t,{title:a}=t,{className:s=""}=t,i,f=20;i=window.innerWidth<769,i?f=11:f=20,r=[];for(let d=0;d<f;d++)r.push(d);return l.$$set=d=>{"value"in d&&u(0,n=d.value),"max"in d&&u(5,e=d.max),"title"in d&&u(1,a=d.title),"className"in d&&u(2,s=d.className)},l.$$.update=()=>{l.$$.dirty&33&&u(4,o=Math.ceil(n/e*21)),l.$$.dirty&64&&u(3,r=Array.from({length:f},(d,h)=>h))},[n,a,s,r,o,e,f]}class hr extends et{constructor(t){super(),tt(this,t,hn,cn,Qe,{value:0,max:5,title:1,className:2})}}function vn(l){let t,u,o,r,n,e,a,s,i;const f=l[4].default,d=Tr(f,l,l[3],null);return{c(){t=S("div"),u=S("div"),o=J(l[0]),r=N(),n=S("div"),e=J(l[1]),a=N(),d&&d.c(),this.h()},l(h){t=D(h,"DIV",{class:!0});var c=I(t);u=D(c,"DIV",{class:!0});var v=I(u);o=Q(v,l[0]),v.forEach(M),r=z(c),n=D(c,"DIV",{class:!0});var g=I(n);e=Q(g,l[1]),g.forEach(M),a=z(c),d&&d.l(c),c.forEach(M),this.h()},h(){y(u,"class","calculatorGroup__Label svelte-e28pn1"),y(n,"class","calculatorGroup__Hint svelte-e28pn1"),y(t,"class",s="calculatorGroup "+l[2]+" svelte-e28pn1")},m(h,c){pe(h,t,c),_(t,u),_(u,o),_(t,r),_(t,n),_(n,e),_(t,a),d&&d.m(t,null),i=!0},p(h,[c]){(!i||c&1)&&te(o,h[0]),(!i||c&2)&&te(e,h[1]),d&&d.p&&(!i||c&8)&&Br(d,f,h,h[3],i?Er(f,h[3],c,null):Fr(h[3]),null),(!i||c&4&&s!==(s="calculatorGroup "+h[2]+" svelte-e28pn1"))&&y(t,"class",s)},i(h){i||(se(d,h),i=!0)},o(h){ue(d,h),i=!1},d(h){h&&M(t),d&&d.d(h)}}}function gn(l,t,u){let o;Je(l,oa,s=>u(2,o=s));let{$$slots:r={},$$scope:n}=t,{title:e}=t,{hint:a}=t;return l.$$set=s=>{"title"in s&&u(0,e=s.title),"hint"in s&&u(1,a=s.hint),"$$scope"in s&&u(3,n=s.$$scope)},[e,a,o,n,r]}class mn extends et{constructor(t){super(),tt(this,t,gn,vn,Qe,{title:0,hint:1})}}var pn=function(){var l=function(t,u){return this.construct(t,u),this};return l.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var u=[];u.push('<ul class="'+t.id+'-legend">');for(var o=0;o<t.data.datasets.length;o++)u.push('<li><span style="background-color:'+t.data.datasets[o].backgroundColor+'"></span>'),t.data.datasets[o].label&&u.push(t.data.datasets[o].label),u.push("</li>");return u.push("</ul>"),u.join("")}}},l.Chart=l,l},kr={exports:{}},bn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Kt=bn,wr={};for(var Ta in Kt)Kt.hasOwnProperty(Ta)&&(wr[Kt[Ta]]=Ta);var K=kr.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var He in K)if(K.hasOwnProperty(He)){if(!("channels"in K[He]))throw new Error("missing channels property: "+He);if(!("labels"in K[He]))throw new Error("missing channel labels property: "+He);if(K[He].labels.length!==K[He].channels)throw new Error("channel and label counts mismatch: "+He);var _n=K[He].channels,yn=K[He].labels;delete K[He].channels,delete K[He].labels,Object.defineProperty(K[He],"channels",{value:_n}),Object.defineProperty(K[He],"labels",{value:yn})}K.rgb.hsl=function(l){var t=l[0]/255,u=l[1]/255,o=l[2]/255,r=Math.min(t,u,o),n=Math.max(t,u,o),e=n-r,a,s,i;return n===r?a=0:t===n?a=(u-o)/e:u===n?a=2+(o-t)/e:o===n&&(a=4+(t-u)/e),a=Math.min(a*60,360),a<0&&(a+=360),i=(r+n)/2,n===r?s=0:i<=.5?s=e/(n+r):s=e/(2-n-r),[a,s*100,i*100]};K.rgb.hsv=function(l){var t,u,o,r,n,e=l[0]/255,a=l[1]/255,s=l[2]/255,i=Math.max(e,a,s),f=i-Math.min(e,a,s),d=function(h){return(i-h)/6/f+1/2};return f===0?r=n=0:(n=f/i,t=d(e),u=d(a),o=d(s),e===i?r=o-u:a===i?r=1/3+t-o:s===i&&(r=2/3+u-t),r<0?r+=1:r>1&&(r-=1)),[r*360,n*100,i*100]};K.rgb.hwb=function(l){var t=l[0],u=l[1],o=l[2],r=K.rgb.hsl(l)[0],n=1/255*Math.min(t,Math.min(u,o));return o=1-1/255*Math.max(t,Math.max(u,o)),[r,n*100,o*100]};K.rgb.cmyk=function(l){var t=l[0]/255,u=l[1]/255,o=l[2]/255,r,n,e,a;return a=Math.min(1-t,1-u,1-o),r=(1-t-a)/(1-a)||0,n=(1-u-a)/(1-a)||0,e=(1-o-a)/(1-a)||0,[r*100,n*100,e*100,a*100]};function kn(l,t){return Math.pow(l[0]-t[0],2)+Math.pow(l[1]-t[1],2)+Math.pow(l[2]-t[2],2)}K.rgb.keyword=function(l){var t=wr[l];if(t)return t;var u=1/0,o;for(var r in Kt)if(Kt.hasOwnProperty(r)){var n=Kt[r],e=kn(l,n);e<u&&(u=e,o=r)}return o};K.keyword.rgb=function(l){return Kt[l]};K.rgb.xyz=function(l){var t=l[0]/255,u=l[1]/255,o=l[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92,o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92;var r=t*.4124+u*.3576+o*.1805,n=t*.2126+u*.7152+o*.0722,e=t*.0193+u*.1192+o*.9505;return[r*100,n*100,e*100]};K.rgb.lab=function(l){var t=K.rgb.xyz(l),u=t[0],o=t[1],r=t[2],n,e,a;return u/=95.047,o/=100,r/=108.883,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=116*o-16,e=500*(u-o),a=200*(o-r),[n,e,a]};K.hsl.rgb=function(l){var t=l[0]/360,u=l[1]/100,o=l[2]/100,r,n,e,a,s;if(u===0)return s=o*255,[s,s,s];o<.5?n=o*(1+u):n=o+u-o*u,r=2*o-n,a=[0,0,0];for(var i=0;i<3;i++)e=t+1/3*-(i-1),e<0&&e++,e>1&&e--,6*e<1?s=r+(n-r)*6*e:2*e<1?s=n:3*e<2?s=r+(n-r)*(2/3-e)*6:s=r,a[i]=s*255;return a};K.hsl.hsv=function(l){var t=l[0],u=l[1]/100,o=l[2]/100,r=u,n=Math.max(o,.01),e,a;return o*=2,u*=o<=1?o:2-o,r*=n<=1?n:2-n,a=(o+u)/2,e=o===0?2*r/(n+r):2*u/(o+u),[t,e*100,a*100]};K.hsv.rgb=function(l){var t=l[0]/60,u=l[1]/100,o=l[2]/100,r=Math.floor(t)%6,n=t-Math.floor(t),e=255*o*(1-u),a=255*o*(1-u*n),s=255*o*(1-u*(1-n));switch(o*=255,r){case 0:return[o,s,e];case 1:return[a,o,e];case 2:return[e,o,s];case 3:return[e,a,o];case 4:return[s,e,o];case 5:return[o,e,a]}};K.hsv.hsl=function(l){var t=l[0],u=l[1]/100,o=l[2]/100,r=Math.max(o,.01),n,e,a;return a=(2-u)*o,n=(2-u)*r,e=u*r,e/=n<=1?n:2-n,e=e||0,a/=2,[t,e*100,a*100]};K.hwb.rgb=function(l){var t=l[0]/360,u=l[1]/100,o=l[2]/100,r=u+o,n,e,a,s;r>1&&(u/=r,o/=r),n=Math.floor(6*t),e=1-o,a=6*t-n,n&1&&(a=1-a),s=u+a*(e-u);var i,f,d;switch(n){default:case 6:case 0:i=e,f=s,d=u;break;case 1:i=s,f=e,d=u;break;case 2:i=u,f=e,d=s;break;case 3:i=u,f=s,d=e;break;case 4:i=s,f=u,d=e;break;case 5:i=e,f=u,d=s;break}return[i*255,f*255,d*255]};K.cmyk.rgb=function(l){var t=l[0]/100,u=l[1]/100,o=l[2]/100,r=l[3]/100,n,e,a;return n=1-Math.min(1,t*(1-r)+r),e=1-Math.min(1,u*(1-r)+r),a=1-Math.min(1,o*(1-r)+r),[n*255,e*255,a*255]};K.xyz.rgb=function(l){var t=l[0]/100,u=l[1]/100,o=l[2]/100,r,n,e;return r=t*3.2406+u*-1.5372+o*-.4986,n=t*-.9689+u*1.8758+o*.0415,e=t*.0557+u*-.204+o*1.057,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*12.92,r=Math.min(Math.max(0,r),1),n=Math.min(Math.max(0,n),1),e=Math.min(Math.max(0,e),1),[r*255,n*255,e*255]};K.xyz.lab=function(l){var t=l[0],u=l[1],o=l[2],r,n,e;return t/=95.047,u/=100,o/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=116*u-16,n=500*(t-u),e=200*(u-o),[r,n,e]};K.lab.xyz=function(l){var t=l[0],u=l[1],o=l[2],r,n,e;n=(t+16)/116,r=u/500+n,e=n-o/200;var a=Math.pow(n,3),s=Math.pow(r,3),i=Math.pow(e,3);return n=a>.008856?a:(n-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,e=i>.008856?i:(e-16/116)/7.787,r*=95.047,n*=100,e*=108.883,[r,n,e]};K.lab.lch=function(l){var t=l[0],u=l[1],o=l[2],r,n,e;return r=Math.atan2(o,u),n=r*360/2/Math.PI,n<0&&(n+=360),e=Math.sqrt(u*u+o*o),[t,e,n]};K.lch.lab=function(l){var t=l[0],u=l[1],o=l[2],r,n,e;return e=o/360*2*Math.PI,r=u*Math.cos(e),n=u*Math.sin(e),[t,r,n]};K.rgb.ansi16=function(l){var t=l[0],u=l[1],o=l[2],r=1 in arguments?arguments[1]:K.rgb.hsv(l)[2];if(r=Math.round(r/50),r===0)return 30;var n=30+(Math.round(o/255)<<2|Math.round(u/255)<<1|Math.round(t/255));return r===2&&(n+=60),n};K.hsv.ansi16=function(l){return K.rgb.ansi16(K.hsv.rgb(l),l[2])};K.rgb.ansi256=function(l){var t=l[0],u=l[1],o=l[2];if(t===u&&u===o)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;var r=16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(o/255*5);return r};K.ansi16.rgb=function(l){var t=l%10;if(t===0||t===7)return l>50&&(t+=3.5),t=t/10.5*255,[t,t,t];var u=(~~(l>50)+1)*.5,o=(t&1)*u*255,r=(t>>1&1)*u*255,n=(t>>2&1)*u*255;return[o,r,n]};K.ansi256.rgb=function(l){if(l>=232){var t=(l-232)*10+8;return[t,t,t]}l-=16;var u,o=Math.floor(l/36)/5*255,r=Math.floor((u=l%36)/6)/5*255,n=u%6/5*255;return[o,r,n]};K.rgb.hex=function(l){var t=((Math.round(l[0])&255)<<16)+((Math.round(l[1])&255)<<8)+(Math.round(l[2])&255),u=t.toString(16).toUpperCase();return"000000".substring(u.length)+u};K.hex.rgb=function(l){var t=l.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var u=t[0];t[0].length===3&&(u=u.split("").map(function(a){return a+a}).join(""));var o=parseInt(u,16),r=o>>16&255,n=o>>8&255,e=o&255;return[r,n,e]};K.rgb.hcg=function(l){var t=l[0]/255,u=l[1]/255,o=l[2]/255,r=Math.max(Math.max(t,u),o),n=Math.min(Math.min(t,u),o),e=r-n,a,s;return e<1?a=n/(1-e):a=0,e<=0?s=0:r===t?s=(u-o)/e%6:r===u?s=2+(o-t)/e:s=4+(t-u)/e+4,s/=6,s%=1,[s*360,e*100,a*100]};K.hsl.hcg=function(l){var t=l[1]/100,u=l[2]/100,o=1,r=0;return u<.5?o=2*t*u:o=2*t*(1-u),o<1&&(r=(u-.5*o)/(1-o)),[l[0],o*100,r*100]};K.hsv.hcg=function(l){var t=l[1]/100,u=l[2]/100,o=t*u,r=0;return o<1&&(r=(u-o)/(1-o)),[l[0],o*100,r*100]};K.hcg.rgb=function(l){var t=l[0]/360,u=l[1]/100,o=l[2]/100;if(u===0)return[o*255,o*255,o*255];var r=[0,0,0],n=t%1*6,e=n%1,a=1-e,s=0;switch(Math.floor(n)){case 0:r[0]=1,r[1]=e,r[2]=0;break;case 1:r[0]=a,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=e;break;case 3:r[0]=0,r[1]=a,r[2]=1;break;case 4:r[0]=e,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=a}return s=(1-u)*o,[(u*r[0]+s)*255,(u*r[1]+s)*255,(u*r[2]+s)*255]};K.hcg.hsv=function(l){var t=l[1]/100,u=l[2]/100,o=t+u*(1-t),r=0;return o>0&&(r=t/o),[l[0],r*100,o*100]};K.hcg.hsl=function(l){var t=l[1]/100,u=l[2]/100,o=u*(1-t)+.5*t,r=0;return o>0&&o<.5?r=t/(2*o):o>=.5&&o<1&&(r=t/(2*(1-o))),[l[0],r*100,o*100]};K.hcg.hwb=function(l){var t=l[1]/100,u=l[2]/100,o=t+u*(1-t);return[l[0],(o-t)*100,(1-o)*100]};K.hwb.hcg=function(l){var t=l[1]/100,u=l[2]/100,o=1-u,r=o-t,n=0;return r<1&&(n=(o-r)/(1-r)),[l[0],r*100,n*100]};K.apple.rgb=function(l){return[l[0]/65535*255,l[1]/65535*255,l[2]/65535*255]};K.rgb.apple=function(l){return[l[0]/255*65535,l[1]/255*65535,l[2]/255*65535]};K.gray.rgb=function(l){return[l[0]/100*255,l[0]/100*255,l[0]/100*255]};K.gray.hsl=K.gray.hsv=function(l){return[0,0,l[0]]};K.gray.hwb=function(l){return[0,100,l[0]]};K.gray.cmyk=function(l){return[0,0,0,l[0]]};K.gray.lab=function(l){return[l[0],0,0]};K.gray.hex=function(l){var t=Math.round(l[0]/100*255)&255,u=(t<<16)+(t<<8)+t,o=u.toString(16).toUpperCase();return"000000".substring(o.length)+o};K.rgb.gray=function(l){var t=(l[0]+l[1]+l[2])/3;return[t/255*100]};var Cr=kr.exports,wa=Cr;function wn(){for(var l={},t=Object.keys(wa),u=t.length,o=0;o<u;o++)l[t[o]]={distance:-1,parent:null};return l}function Cn(l){var t=wn(),u=[l];for(t[l].distance=0;u.length;)for(var o=u.pop(),r=Object.keys(wa[o]),n=r.length,e=0;e<n;e++){var a=r[e],s=t[a];s.distance===-1&&(s.distance=t[o].distance+1,s.parent=o,u.unshift(a))}return t}function Mn(l,t){return function(u){return t(l(u))}}function xn(l,t){for(var u=[t[l].parent,l],o=wa[t[l].parent][l],r=t[l].parent;t[r].parent;)u.unshift(t[r].parent),o=Mn(wa[t[r].parent][r],o),r=t[r].parent;return o.conversion=u,o}var Pn=function(l){for(var t=Cn(l),u={},o=Object.keys(t),r=o.length,n=0;n<r;n++){var e=o[n],a=t[e];a.parent!==null&&(u[e]=xn(e,t))}return u},Ba=Cr,Sn=Pn,na={},Dn=Object.keys(Ba);function In(l){var t=function(u){return u==null?u:(arguments.length>1&&(u=Array.prototype.slice.call(arguments)),l(u))};return"conversion"in l&&(t.conversion=l.conversion),t}function An(l){var t=function(u){if(u==null)return u;arguments.length>1&&(u=Array.prototype.slice.call(arguments));var o=l(u);if(typeof o=="object")for(var r=o.length,n=0;n<r;n++)o[n]=Math.round(o[n]);return o};return"conversion"in l&&(t.conversion=l.conversion),t}Dn.forEach(function(l){na[l]={},Object.defineProperty(na[l],"channels",{value:Ba[l].channels}),Object.defineProperty(na[l],"labels",{value:Ba[l].labels});var t=Sn(l),u=Object.keys(t);u.forEach(function(o){var r=t[o];na[l][o]=An(r),na[l][o].raw=In(r)})});var Tn=na,Bn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Fa=Bn,Fn={getRgba:Ra,getHsla:Na,getRgb:En,getHsl:Vn,getHwb:Mr,getAlpha:Ln,hexString:Rn,rgbString:Nn,rgbaString:xr,percentString:zn,percentaString:Pr,hslString:On,hslaString:Sr,hwbString:Hn,keyword:Wn};function Ra(l){if(l){var t=/^#([a-fA-F0-9]{3,4})$/i,u=/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,o=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,r=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,n=/(\w+)/,e=[0,0,0],a=1,s=l.match(t),i="";if(s){s=s[1],i=s[3];for(var f=0;f<e.length;f++)e[f]=parseInt(s[f]+s[f],16);i&&(a=Math.round(parseInt(i+i,16)/255*100)/100)}else if(s=l.match(u)){i=s[2],s=s[1];for(var f=0;f<e.length;f++)e[f]=parseInt(s.slice(f*2,f*2+2),16);i&&(a=Math.round(parseInt(i,16)/255*100)/100)}else if(s=l.match(o)){for(var f=0;f<e.length;f++)e[f]=parseInt(s[f+1]);a=parseFloat(s[4])}else if(s=l.match(r)){for(var f=0;f<e.length;f++)e[f]=Math.round(parseFloat(s[f+1])*2.55);a=parseFloat(s[4])}else if(s=l.match(n)){if(s[1]=="transparent")return[0,0,0,0];if(e=Fa[s[1]],!e)return}for(var f=0;f<e.length;f++)e[f]=mt(e[f],0,255);return!a&&a!=0?a=1:a=mt(a,0,1),e[3]=a,e}}function Na(l){if(l){var t=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,u=l.match(t);if(u){var o=parseFloat(u[4]),r=mt(parseInt(u[1]),0,360),n=mt(parseFloat(u[2]),0,100),e=mt(parseFloat(u[3]),0,100),a=mt(isNaN(o)?1:o,0,1);return[r,n,e,a]}}}function Mr(l){if(l){var t=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,u=l.match(t);if(u){var o=parseFloat(u[4]),r=mt(parseInt(u[1]),0,360),n=mt(parseFloat(u[2]),0,100),e=mt(parseFloat(u[3]),0,100),a=mt(isNaN(o)?1:o,0,1);return[r,n,e,a]}}}function En(l){var t=Ra(l);return t&&t.slice(0,3)}function Vn(l){var t=Na(l);return t&&t.slice(0,3)}function Ln(l){var t=Ra(l);if(t)return t[3];if(t=Na(l))return t[3];if(t=Mr(l))return t[3]}function Rn(l,u){var u=u!==void 0&&l.length===3?u:l[3];return"#"+ba(l[0])+ba(l[1])+ba(l[2])+(u>=0&&u<1?ba(Math.round(u*255)):"")}function Nn(l,t){return t<1||l[3]&&l[3]<1?xr(l,t):"rgb("+l[0]+", "+l[1]+", "+l[2]+")"}function xr(l,t){return t===void 0&&(t=l[3]!==void 0?l[3]:1),"rgba("+l[0]+", "+l[1]+", "+l[2]+", "+t+")"}function zn(l,t){if(t<1||l[3]&&l[3]<1)return Pr(l,t);var u=Math.round(l[0]/255*100),o=Math.round(l[1]/255*100),r=Math.round(l[2]/255*100);return"rgb("+u+"%, "+o+"%, "+r+"%)"}function Pr(l,t){var u=Math.round(l[0]/255*100),o=Math.round(l[1]/255*100),r=Math.round(l[2]/255*100);return"rgba("+u+"%, "+o+"%, "+r+"%, "+(t||l[3]||1)+")"}function On(l,t){return t<1||l[3]&&l[3]<1?Sr(l,t):"hsl("+l[0]+", "+l[1]+"%, "+l[2]+"%)"}function Sr(l,t){return t===void 0&&(t=l[3]!==void 0?l[3]:1),"hsla("+l[0]+", "+l[1]+"%, "+l[2]+"%, "+t+")"}function Hn(l,t){return t===void 0&&(t=l[3]!==void 0?l[3]:1),"hwb("+l[0]+", "+l[1]+"%, "+l[2]+"%"+(t!==void 0&&t!==1?", "+t:"")+")"}function Wn(l){return Dr[l.slice(0,3)]}function mt(l,t,u){return Math.min(Math.max(t,l),u)}function ba(l){var t=l.toString(16).toUpperCase();return t.length<2?"0"+t:t}var Dr={};for(var vr in Fa)Dr[Fa[vr]]=vr;var qn=Tn,lt=Fn,Ye=function(l){if(l instanceof Ye)return l;if(!(this instanceof Ye))return new Ye(l);this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var t;typeof l=="string"?(t=lt.getRgba(l),t?this.setValues("rgb",t):(t=lt.getHsla(l))?this.setValues("hsl",t):(t=lt.getHwb(l))&&this.setValues("hwb",t)):typeof l=="object"&&(t=l,t.r!==void 0||t.red!==void 0?this.setValues("rgb",t):t.l!==void 0||t.lightness!==void 0?this.setValues("hsl",t):t.v!==void 0||t.value!==void 0?this.setValues("hsv",t):t.w!==void 0||t.whiteness!==void 0?this.setValues("hwb",t):(t.c!==void 0||t.cyan!==void 0)&&this.setValues("cmyk",t))};Ye.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var l=this.values;return l.alpha!==1?l.hwb.concat([l.alpha]):l.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var l=this.values;return l.rgb.concat([l.alpha])},hslaArray:function(){var l=this.values;return l.hsl.concat([l.alpha])},alpha:function(l){return l===void 0?this.values.alpha:(this.setValues("alpha",l),this)},red:function(l){return this.setChannel("rgb",0,l)},green:function(l){return this.setChannel("rgb",1,l)},blue:function(l){return this.setChannel("rgb",2,l)},hue:function(l){return l&&(l%=360,l=l<0?360+l:l),this.setChannel("hsl",0,l)},saturation:function(l){return this.setChannel("hsl",1,l)},lightness:function(l){return this.setChannel("hsl",2,l)},saturationv:function(l){return this.setChannel("hsv",1,l)},whiteness:function(l){return this.setChannel("hwb",1,l)},blackness:function(l){return this.setChannel("hwb",2,l)},value:function(l){return this.setChannel("hsv",2,l)},cyan:function(l){return this.setChannel("cmyk",0,l)},magenta:function(l){return this.setChannel("cmyk",1,l)},yellow:function(l){return this.setChannel("cmyk",2,l)},black:function(l){return this.setChannel("cmyk",3,l)},hexString:function(){return lt.hexString(this.values.rgb)},rgbString:function(){return lt.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return lt.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return lt.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return lt.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return lt.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return lt.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return lt.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var l=this.values.rgb;return l[0]<<16|l[1]<<8|l[2]},luminosity:function(){for(var l=this.values.rgb,t=[],u=0;u<l.length;u++){var o=l[u]/255;t[u]=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(l){var t=this.luminosity(),u=l.luminosity();return t>u?(t+.05)/(u+.05):(u+.05)/(t+.05)},level:function(l){var t=this.contrast(l);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var l=this.values.rgb,t=(l[0]*299+l[1]*587+l[2]*114)/1e3;return t<128},light:function(){return!this.dark()},negate:function(){for(var l=[],t=0;t<3;t++)l[t]=255-this.values.rgb[t];return this.setValues("rgb",l),this},lighten:function(l){var t=this.values.hsl;return t[2]+=t[2]*l,this.setValues("hsl",t),this},darken:function(l){var t=this.values.hsl;return t[2]-=t[2]*l,this.setValues("hsl",t),this},saturate:function(l){var t=this.values.hsl;return t[1]+=t[1]*l,this.setValues("hsl",t),this},desaturate:function(l){var t=this.values.hsl;return t[1]-=t[1]*l,this.setValues("hsl",t),this},whiten:function(l){var t=this.values.hwb;return t[1]+=t[1]*l,this.setValues("hwb",t),this},blacken:function(l){var t=this.values.hwb;return t[2]+=t[2]*l,this.setValues("hwb",t),this},greyscale:function(){var l=this.values.rgb,t=l[0]*.3+l[1]*.59+l[2]*.11;return this.setValues("rgb",[t,t,t]),this},clearer:function(l){var t=this.values.alpha;return this.setValues("alpha",t-t*l),this},opaquer:function(l){var t=this.values.alpha;return this.setValues("alpha",t+t*l),this},rotate:function(l){var t=this.values.hsl,u=(t[0]+l)%360;return t[0]=u<0?360+u:u,this.setValues("hsl",t),this},mix:function(l,t){var u=this,o=l,r=t===void 0?.5:t,n=2*r-1,e=u.alpha()-o.alpha(),a=((n*e===-1?n:(n+e)/(1+n*e))+1)/2,s=1-a;return this.rgb(a*u.red()+s*o.red(),a*u.green()+s*o.green(),a*u.blue()+s*o.blue()).alpha(u.alpha()*r+o.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var l=new Ye,t=this.values,u=l.values,o,r;for(var n in t)t.hasOwnProperty(n)&&(o=t[n],r={}.toString.call(o),r==="[object Array]"?u[n]=o.slice(0):r==="[object Number]"?u[n]=o:console.error("unexpected color value:",o));return l}};Ye.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]};Ye.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]};Ye.prototype.getValues=function(l){for(var t=this.values,u={},o=0;o<l.length;o++)u[l.charAt(o)]=t[l][o];return t.alpha!==1&&(u.a=t.alpha),u};Ye.prototype.setValues=function(l,t){var u=this.values,o=this.spaces,r=this.maxes,n=1,e;if(this.valid=!0,l==="alpha")n=t;else if(t.length)u[l]=t.slice(0,l.length),n=t[l.length];else if(t[l.charAt(0)]!==void 0){for(e=0;e<l.length;e++)u[l][e]=t[l.charAt(e)];n=t.a}else if(t[o[l][0]]!==void 0){var a=o[l];for(e=0;e<l.length;e++)u[l][e]=t[a[e]];n=t.alpha}if(u.alpha=Math.max(0,Math.min(1,n===void 0?u.alpha:n)),l==="alpha")return!1;var s;for(e=0;e<l.length;e++)s=Math.max(0,Math.min(r[l][e],u[l][e])),u[l][e]=Math.round(s);for(var i in o)i!==l&&(u[i]=qn[l][i](u[l]));return!0};Ye.prototype.setSpace=function(l,t){var u=t[0];return u===void 0?this.getValues(l):(typeof u=="number"&&(u=Array.prototype.slice.call(t)),this.setValues(l,u),this)};Ye.prototype.setChannel=function(l,t,u){var o=this.values[l];return u===void 0?o[t]:u===o[t]?this:(o[t]=u,this.setValues(l,o),this)};typeof window<"u"&&(window.Color=Ye);var Ir=Ye,gr=Ir,jn=function(l){var t=l.helpers={};t.each=function(e,a,s,i){var f,d;if(t.isArray(e))if(d=e.length,i)for(f=d-1;f>=0;f--)a.call(s,e[f],f);else for(f=0;f<d;f++)a.call(s,e[f],f);else if(typeof e=="object"){var h=Object.keys(e);for(d=h.length,f=0;f<d;f++)a.call(s,e[h[f]],h[f])}},t.clone=function(e){var a={};return t.each(e,function(s,i){t.isArray(s)?a[i]=s.slice(0):typeof s=="object"&&s!==null?a[i]=t.clone(s):a[i]=s}),a},t.extend=function(e){for(var a=function(f,d){e[d]=f},s=1,i=arguments.length;s<i;s++)t.each(arguments[s],a);return e},t.configMerge=function(e){var a=t.clone(e);return t.each(Array.prototype.slice.call(arguments,1),function(s){t.each(s,function(i,f){var d=a.hasOwnProperty(f),h=d?a[f]:{};f==="scales"?a[f]=t.scaleMerge(h,i):f==="scale"?a[f]=t.configMerge(h,l.scaleService.getScaleDefaults(i.type),i):d&&typeof h=="object"&&!t.isArray(h)&&h!==null&&typeof i=="object"&&!t.isArray(i)?a[f]=t.configMerge(h,i):a[f]=i})}),a},t.scaleMerge=function(e,a){var s=t.clone(e);return t.each(a,function(i,f){f==="xAxes"||f==="yAxes"?s.hasOwnProperty(f)?t.each(i,function(d,h){var c=t.getValueOrDefault(d.type,f==="xAxes"?"category":"linear"),v=l.scaleService.getScaleDefaults(c);h>=s[f].length||!s[f][h].type?s[f].push(t.configMerge(v,d)):d.type&&d.type!==s[f][h].type?s[f][h]=t.configMerge(s[f][h],v,d):s[f][h]=t.configMerge(s[f][h],d)}):(s[f]=[],t.each(i,function(d){var h=t.getValueOrDefault(d.type,f==="xAxes"?"category":"linear");s[f].push(t.configMerge(l.scaleService.getScaleDefaults(h),d))})):s.hasOwnProperty(f)&&typeof s[f]=="object"&&s[f]!==null&&typeof i=="object"?s[f]=t.configMerge(s[f],i):s[f]=i}),s},t.getValueAtIndexOrDefault=function(e,a,s){return e==null?s:t.isArray(e)?a<e.length?e[a]:s:e},t.getValueOrDefault=function(e,a){return e===void 0?a:e},t.indexOf=Array.prototype.indexOf?function(e,a){return e.indexOf(a)}:function(e,a){for(var s=0,i=e.length;s<i;++s)if(e[s]===a)return s;return-1},t.where=function(e,a){if(t.isArray(e)&&Array.prototype.filter)return e.filter(a);var s=[];return t.each(e,function(i){a(i)&&s.push(i)}),s},t.findIndex=Array.prototype.findIndex?function(e,a,s){return e.findIndex(a,s)}:function(e,a,s){s=s===void 0?e:s;for(var i=0,f=e.length;i<f;++i)if(a.call(s,e[i],i,e))return i;return-1},t.findNextWhere=function(e,a,s){s==null&&(s=-1);for(var i=s+1;i<e.length;i++){var f=e[i];if(a(f))return f}},t.findPreviousWhere=function(e,a,s){s==null&&(s=e.length);for(var i=s-1;i>=0;i--){var f=e[i];if(a(f))return f}},t.inherits=function(e){var a=this,s=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return a.apply(this,arguments)},i=function(){this.constructor=s};return i.prototype=a.prototype,s.prototype=new i,s.extend=t.inherits,e&&t.extend(s.prototype,e),s.__super__=a.prototype,s},t.noop=function(){},t.uid=function(){var e=0;return function(){return e++}}(),t.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},t.almostEquals=function(e,a,s){return Math.abs(e-a)<s},t.almostWhole=function(e,a){var s=Math.round(e);return s-a<e&&s+a>e},t.max=function(e){return e.reduce(function(a,s){return isNaN(s)?a:Math.max(a,s)},Number.NEGATIVE_INFINITY)},t.min=function(e){return e.reduce(function(a,s){return isNaN(s)?a:Math.min(a,s)},Number.POSITIVE_INFINITY)},t.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return e=+e,e===0||isNaN(e)?e:e>0?1:-1},t.log10=Math.log10?function(e){return Math.log10(e)}:function(e){return Math.log(e)/Math.LN10},t.toRadians=function(e){return e*(Math.PI/180)},t.toDegrees=function(e){return e*(180/Math.PI)},t.getAngleFromPoint=function(e,a){var s=a.x-e.x,i=a.y-e.y,f=Math.sqrt(s*s+i*i),d=Math.atan2(i,s);return d<-.5*Math.PI&&(d+=2*Math.PI),{angle:d,distance:f}},t.distanceBetweenPoints=function(e,a){return Math.sqrt(Math.pow(a.x-e.x,2)+Math.pow(a.y-e.y,2))},t.aliasPixel=function(e){return e%2===0?0:.5},t.splineCurve=function(e,a,s,i){var f=e.skip?a:e,d=a,h=s.skip?a:s,c=Math.sqrt(Math.pow(d.x-f.x,2)+Math.pow(d.y-f.y,2)),v=Math.sqrt(Math.pow(h.x-d.x,2)+Math.pow(h.y-d.y,2)),g=c/(c+v),p=v/(c+v);g=isNaN(g)?0:g,p=isNaN(p)?0:p;var m=i*g,b=i*p;return{previous:{x:d.x-m*(h.x-f.x),y:d.y-m*(h.y-f.y)},next:{x:d.x+b*(h.x-f.x),y:d.y+b*(h.y-f.y)}}},t.EPSILON=Number.EPSILON||1e-14,t.splineCurveMonotone=function(e){var a=(e||[]).map(function(k){return{model:k._model,deltaK:0,mK:0}}),s=a.length,i,f,d,h;for(i=0;i<s;++i)if(d=a[i],!d.model.skip){if(f=i>0?a[i-1]:null,h=i<s-1?a[i+1]:null,h&&!h.model.skip){var c=h.model.x-d.model.x;d.deltaK=c!==0?(h.model.y-d.model.y)/c:0}!f||f.model.skip?d.mK=d.deltaK:!h||h.model.skip?d.mK=f.deltaK:this.sign(f.deltaK)!==this.sign(d.deltaK)?d.mK=0:d.mK=(f.deltaK+d.deltaK)/2}var v,g,p,m;for(i=0;i<s-1;++i)if(d=a[i],h=a[i+1],!(d.model.skip||h.model.skip)){if(t.almostEquals(d.deltaK,0,this.EPSILON)){d.mK=h.mK=0;continue}v=d.mK/d.deltaK,g=h.mK/d.deltaK,m=Math.pow(v,2)+Math.pow(g,2),!(m<=9)&&(p=3/Math.sqrt(m),d.mK=v*p*d.deltaK,h.mK=g*p*d.deltaK)}var b;for(i=0;i<s;++i)d=a[i],!d.model.skip&&(f=i>0?a[i-1]:null,h=i<s-1?a[i+1]:null,f&&!f.model.skip&&(b=(d.model.x-f.model.x)/3,d.model.controlPointPreviousX=d.model.x-b,d.model.controlPointPreviousY=d.model.y-b*d.mK),h&&!h.model.skip&&(b=(h.model.x-d.model.x)/3,d.model.controlPointNextX=d.model.x+b,d.model.controlPointNextY=d.model.y+b*d.mK))},t.nextItem=function(e,a,s){return s?a>=e.length-1?e[0]:e[a+1]:a>=e.length-1?e[e.length-1]:e[a+1]},t.previousItem=function(e,a,s){return s?a<=0?e[e.length-1]:e[a-1]:a<=0?e[0]:e[a-1]},t.niceNum=function(e,a){var s=Math.floor(t.log10(e)),i=e/Math.pow(10,s),f;return a?i<1.5?f=1:i<3?f=2:i<7?f=5:f=10:i<=1?f=1:i<=2?f=2:i<=5?f=5:f=10,f*Math.pow(10,s)};var u=t.easingEffects={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-1*e*(e-2)},easeInOutQuad:function(e){return(e/=1/2)<1?1/2*e*e:-1/2*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1*((e=e/1-1)*e*e+1)},easeInOutCubic:function(e){return(e/=1/2)<1?1/2*e*e*e:1/2*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-1*((e=e/1-1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=1/2)<1?1/2*e*e*e*e:-1/2*((e-=2)*e*e*e-2)},easeInQuint:function(e){return 1*(e/=1)*e*e*e*e},easeOutQuint:function(e){return 1*((e=e/1-1)*e*e*e*e+1)},easeInOutQuint:function(e){return(e/=1/2)<1?1/2*e*e*e*e*e:1/2*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return-1*Math.cos(e/1*(Math.PI/2))+1},easeOutSine:function(e){return 1*Math.sin(e/1*(Math.PI/2))},easeInOutSine:function(e){return-1/2*(Math.cos(Math.PI*e/1)-1)},easeInExpo:function(e){return e===0?1:1*Math.pow(2,10*(e/1-1))},easeOutExpo:function(e){return e===1?1:1*(-Math.pow(2,-10*e/1)+1)},easeInOutExpo:function(e){return e===0?0:e===1?1:(e/=1/2)<1?1/2*Math.pow(2,10*(e-1)):1/2*(-Math.pow(2,-10*--e)+2)},easeInCirc:function(e){return e>=1?e:-1*(Math.sqrt(1-(e/=1)*e)-1)},easeOutCirc:function(e){return 1*Math.sqrt(1-(e=e/1-1)*e)},easeInOutCirc:function(e){return(e/=1/2)<1?-1/2*(Math.sqrt(1-e*e)-1):1/2*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var a=1.70158,s=0,i=1;return e===0?0:(e/=1)===1?1:(s||(s=1*.3),i<Math.abs(1)?(i=1,a=s/4):a=s/(2*Math.PI)*Math.asin(1/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*1-a)*(2*Math.PI)/s)))},easeOutElastic:function(e){var a=1.70158,s=0,i=1;return e===0?0:(e/=1)===1?1:(s||(s=1*.3),i<Math.abs(1)?(i=1,a=s/4):a=s/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*e)*Math.sin((e*1-a)*(2*Math.PI)/s)+1)},easeInOutElastic:function(e){var a=1.70158,s=0,i=1;return e===0?0:(e/=1/2)===2?1:(s||(s=1*(.3*1.5)),i<Math.abs(1)?(i=1,a=s/4):a=s/(2*Math.PI)*Math.asin(1/i),e<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e*1-a)*(2*Math.PI)/s)):i*Math.pow(2,-10*(e-=1))*Math.sin((e*1-a)*(2*Math.PI)/s)*.5+1)},easeInBack:function(e){var a=1.70158;return 1*(e/=1)*e*((a+1)*e-a)},easeOutBack:function(e){var a=1.70158;return 1*((e=e/1-1)*e*((a+1)*e+a)+1)},easeInOutBack:function(e){var a=1.70158;return(e/=1/2)<1?1/2*(e*e*(((a*=1.525)+1)*e-a)):1/2*((e-=2)*e*(((a*=1.525)+1)*e+a)+2)},easeInBounce:function(e){return 1-u.easeOutBounce(1-e)},easeOutBounce:function(e){return(e/=1)<1/2.75?1*(7.5625*e*e):e<2/2.75?1*(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1*(7.5625*(e-=2.25/2.75)*e+.9375):1*(7.5625*(e-=2.625/2.75)*e+.984375)},easeInOutBounce:function(e){return e<1/2?u.easeInBounce(e*2)*.5:u.easeOutBounce(e*2-1)*.5+1*.5}};t.requestAnimFrame=function(){return typeof window>"u"?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}(),t.getRelativePosition=function(e,a){var s,i,f=e.originalEvent||e,d=e.currentTarget||e.srcElement,h=d.getBoundingClientRect(),c=f.touches;c&&c.length>0?(s=c[0].clientX,i=c[0].clientY):(s=f.clientX,i=f.clientY);var v=parseFloat(t.getStyle(d,"padding-left")),g=parseFloat(t.getStyle(d,"padding-top")),p=parseFloat(t.getStyle(d,"padding-right")),m=parseFloat(t.getStyle(d,"padding-bottom")),b=h.right-h.left-v-p,k=h.bottom-h.top-g-m;return s=Math.round((s-h.left-v)/b*d.width/a.currentDevicePixelRatio),i=Math.round((i-h.top-g)/k*d.height/a.currentDevicePixelRatio),{x:s,y:i}},t.addEvent=function(e,a,s){e.addEventListener?e.addEventListener(a,s):e.attachEvent?e.attachEvent("on"+a,s):e["on"+a]=s},t.removeEvent=function(e,a,s){e.removeEventListener?e.removeEventListener(a,s,!1):e.detachEvent?e.detachEvent("on"+a,s):e["on"+a]=t.noop};function o(e,a,s){var i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*a.parentNode[s])):i=e,i}function r(e){return e!=null&&e!=="none"}function n(e,a,s){var i=document.defaultView,f=e.parentNode,d=i.getComputedStyle(e)[a],h=i.getComputedStyle(f)[a],c=r(d),v=r(h),g=Number.POSITIVE_INFINITY;return c||v?Math.min(c?o(d,e,s):g,v?o(h,f,s):g):"none"}t.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},t.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},t.getMaximumWidth=function(e){var a=e.parentNode,s=parseInt(t.getStyle(a,"padding-left"),10),i=parseInt(t.getStyle(a,"padding-right"),10),f=a.clientWidth-s-i,d=t.getConstraintWidth(e);return isNaN(d)?f:Math.min(f,d)},t.getMaximumHeight=function(e){var a=e.parentNode,s=parseInt(t.getStyle(a,"padding-top"),10),i=parseInt(t.getStyle(a,"padding-bottom"),10),f=a.clientHeight-s-i,d=t.getConstraintHeight(e);return isNaN(d)?f:Math.min(f,d)},t.getStyle=function(e,a){return e.currentStyle?e.currentStyle[a]:document.defaultView.getComputedStyle(e,null).getPropertyValue(a)},t.retinaScale=function(e){var a=e.currentDevicePixelRatio=window.devicePixelRatio||1;if(a!==1){var s=e.canvas,i=e.height,f=e.width;s.height=i*a,s.width=f*a,e.ctx.scale(a,a),s.style.height=i+"px",s.style.width=f+"px"}},t.clear=function(e){e.ctx.clearRect(0,0,e.width,e.height)},t.fontString=function(e,a,s){return a+" "+e+"px "+s},t.longestText=function(e,a,s,i){i=i||{};var f=i.data=i.data||{},d=i.garbageCollect=i.garbageCollect||[];i.font!==a&&(f=i.data={},d=i.garbageCollect=[],i.font=a),e.font=a;var h=0;t.each(s,function(g){g!=null&&t.isArray(g)!==!0?h=t.measureText(e,f,d,h,g):t.isArray(g)&&t.each(g,function(p){p!=null&&!t.isArray(p)&&(h=t.measureText(e,f,d,h,p))})});var c=d.length/2;if(c>s.length){for(var v=0;v<c;v++)delete f[d[v]];d.splice(0,c)}return h},t.measureText=function(e,a,s,i,f){var d=a[f];return d||(d=a[f]=e.measureText(f).width,s.push(f)),d>i&&(i=d),i},t.numberOfLabelLines=function(e){var a=1;return t.each(e,function(s){t.isArray(s)&&s.length>a&&(a=s.length)}),a},t.drawRoundedRectangle=function(e,a,s,i,f,d){e.beginPath(),e.moveTo(a+d,s),e.lineTo(a+i-d,s),e.quadraticCurveTo(a+i,s,a+i,s+d),e.lineTo(a+i,s+f-d),e.quadraticCurveTo(a+i,s+f,a+i-d,s+f),e.lineTo(a+d,s+f),e.quadraticCurveTo(a,s+f,a,s+f-d),e.lineTo(a,s+d),e.quadraticCurveTo(a,s,a+d,s),e.closePath()},t.color=gr?function(e){return e instanceof CanvasGradient&&(e=l.defaults.global.defaultColor),gr(e)}:function(e){return console.error("Color.js not found!"),e},t.isArray=Array.isArray?function(e){return Array.isArray(e)}:function(e){return Object.prototype.toString.call(e)==="[object Array]"},t.arrayEquals=function(e,a){var s,i,f,d;if(!e||!a||e.length!==a.length)return!1;for(s=0,i=e.length;s<i;++s)if(f=e[s],d=a[s],f instanceof Array&&d instanceof Array){if(!t.arrayEquals(f,d))return!1}else if(f!==d)return!1;return!0},t.callback=function(e,a,s){e&&typeof e.call=="function"&&e.apply(s,a)},t.getHoverColor=function(e){return e instanceof CanvasPattern?e:t.color(e).saturate(.5).darken(.1).rgbString()},t.callCallback=t.callback},Un=function(l){var t=l.helpers,u={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function o(f,d){var h=t.getStyle(f,d),c=h&&h.match(/^(\d+)(\.\d+)?px$/);return c?Number(c[1]):void 0}function r(f,d){var h=f.style,c=f.getAttribute("height"),v=f.getAttribute("width");if(f._chartjs={initial:{height:c,width:v,style:{display:h.display,height:h.height,width:h.width}}},h.display=h.display||"block",v===null||v===""){var g=o(f,"width");g!==void 0&&(f.width=g)}if(c===null||c==="")if(f.style.height==="")f.height=f.width/(d.options.aspectRatio||2);else{var p=o(f,"height");g!==void 0&&(f.height=p)}return f}function n(f,d,h,c,v){return{type:f,chart:d,native:v||null,x:h!==void 0?h:null,y:c!==void 0?c:null}}function e(f,d){var h=u[f.type]||f.type,c=t.getRelativePosition(f,d);return n(h,d,c.x,c.y,f)}function a(f){var d=document.createElement("iframe");return d.className="chartjs-hidden-iframe",d.style.cssText="display:block;overflow:hidden;border:0;margin:0;top:0;left:0;bottom:0;right:0;height:100%;width:100%;position:absolute;pointer-events:none;z-index:-1;",d.tabIndex=-1,t.addEvent(d,"load",function(){t.addEvent(d.contentWindow||d,"resize",f),f()}),d}function s(f,d,h){var c=f._chartjs={ticking:!1},v=function(){c.ticking||(c.ticking=!0,t.requestAnimFrame.call(window,function(){if(c.resizer)return c.ticking=!1,d(n("resize",h))}))};c.resizer=a(v),f.insertBefore(c.resizer,f.firstChild)}function i(f){if(!(!f||!f._chartjs)){var d=f._chartjs.resizer;d&&(d.parentNode.removeChild(d),f._chartjs.resizer=null),delete f._chartjs}}return{acquireContext:function(f,d){typeof f=="string"?f=document.getElementById(f):f.length&&(f=f[0]),f&&f.canvas&&(f=f.canvas);var h=f&&f.getContext&&f.getContext("2d");return h&&h.canvas===f?(r(f,d),h):null},releaseContext:function(f){var d=f.canvas;if(d._chartjs){var h=d._chartjs.initial;["height","width"].forEach(function(c){var v=h[c];v==null?d.removeAttribute(c):d.setAttribute(c,v)}),t.each(h.style||{},function(c,v){d.style[v]=c}),d.width=d.width,delete d._chartjs}},addEventListener:function(f,d,h){var c=f.canvas;if(d==="resize"){s(c.parentNode,h,f);return}var v=h._chartjs||(h._chartjs={}),g=v.proxies||(v.proxies={}),p=g[f.id+"_"+d]=function(m){h(e(m,f))};t.addEvent(c,d,p)},removeEventListener:function(f,d,h){var c=f.canvas;if(d==="resize"){i(c.parentNode);return}var v=h._chartjs||{},g=v.proxies||{},p=g[f.id+"_"+d];p&&t.removeEvent(c,d,p)}}},$n=Un,Yn=function(l){l.platform={acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},l.helpers.extend(l.platform,$n(l))},Gn=function(l){var t=l.canvasHelpers={};t.drawPoint=function(u,o,r,n,e){var a,s,i,f,d,h;if(typeof o=="object"&&(a=o.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){u.drawImage(o,n-o.width/2,e-o.height/2,o.width,o.height);return}if(!(isNaN(r)||r<=0)){switch(o){default:u.beginPath(),u.arc(n,e,r,0,Math.PI*2),u.closePath(),u.fill();break;case"triangle":u.beginPath(),s=3*r/Math.sqrt(3),d=s*Math.sqrt(3)/2,u.moveTo(n-s/2,e+d/3),u.lineTo(n+s/2,e+d/3),u.lineTo(n,e-2*d/3),u.closePath(),u.fill();break;case"rect":h=1/Math.SQRT2*r,u.beginPath(),u.fillRect(n-h,e-h,2*h,2*h),u.strokeRect(n-h,e-h,2*h,2*h);break;case"rectRounded":var c=r/Math.SQRT2,v=n-c,g=e-c,p=Math.SQRT2*r;l.helpers.drawRoundedRectangle(u,v,g,p,p,r/2),u.fill();break;case"rectRot":h=1/Math.SQRT2*r,u.beginPath(),u.moveTo(n-h,e),u.lineTo(n,e+h),u.lineTo(n+h,e),u.lineTo(n,e-h),u.closePath(),u.fill();break;case"cross":u.beginPath(),u.moveTo(n,e+r),u.lineTo(n,e-r),u.moveTo(n-r,e),u.lineTo(n+r,e),u.closePath();break;case"crossRot":u.beginPath(),i=Math.cos(Math.PI/4)*r,f=Math.sin(Math.PI/4)*r,u.moveTo(n-i,e-f),u.lineTo(n+i,e+f),u.moveTo(n-i,e+f),u.lineTo(n+i,e-f),u.closePath();break;case"star":u.beginPath(),u.moveTo(n,e+r),u.lineTo(n,e-r),u.moveTo(n-r,e),u.lineTo(n+r,e),i=Math.cos(Math.PI/4)*r,f=Math.sin(Math.PI/4)*r,u.moveTo(n-i,e-f),u.lineTo(n+i,e+f),u.moveTo(n-i,e+f),u.lineTo(n+i,e-f),u.closePath();break;case"line":u.beginPath(),u.moveTo(n-r,e),u.lineTo(n+r,e),u.closePath();break;case"dash":u.beginPath(),u.moveTo(n,e),u.lineTo(n+r,e),u.closePath();break}u.stroke()}},t.clipArea=function(u,o){u.save(),u.beginPath(),u.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),u.clip()},t.unclipArea=function(u){u.restore()},t.lineTo=function(u,o,r,n){if(r.steppedLine){r.steppedLine==="after"?u.lineTo(o.x,r.y):u.lineTo(r.x,o.y),u.lineTo(r.x,r.y);return}if(!r.tension){u.lineTo(r.x,r.y);return}u.bezierCurveTo(n?o.controlPointPreviousX:o.controlPointNextX,n?o.controlPointPreviousY:o.controlPointNextY,n?r.controlPointNextX:r.controlPointPreviousX,n?r.controlPointNextY:r.controlPointPreviousY,r.x,r.y)},l.helpers.canvas=t},mr=Ir,Zn=function(l){var t=l.helpers;function u(o,r,n,e){var a=Object.keys(n),s,i,f,d,h,c,v,g,p;for(s=0,i=a.length;s<i;++s)if(f=a[s],c=n[f],r.hasOwnProperty(f)||(r[f]=c),d=r[f],!(d===c||f[0]==="_")){if(o.hasOwnProperty(f)||(o[f]=d),h=o[f],v=typeof c,v===typeof h){if(v==="string"){if(g=mr(h),g.valid&&(p=mr(c),p.valid)){r[f]=p.mix(g,e).rgbString();continue}}else if(v==="number"&&isFinite(h)&&isFinite(c)){r[f]=h+(c-h)*e;continue}}r[f]=c}}l.elements={},l.Element=function(o){t.extend(this,o),this.initialize.apply(this,arguments)},t.extend(l.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var o=this;return o._view||(o._view=t.clone(o._model)),o._start={},o},transition:function(o){var r=this,n=r._model,e=r._start,a=r._view;return!n||o===1?(r._view=n,r._start=null,r):(a||(a=r._view={}),e||(e=r._start={}),u(e,a,n,o),r)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return t.isNumber(this._model.x)&&t.isNumber(this._model.y)}}),l.Element.extend=t.inherits},Kn=function(l){var t=l.helpers;l.defaults.global.plugins={},l.plugins={_plugins:[],_cacheId:0,register:function(u){var o=this._plugins;[].concat(u).forEach(function(r){o.indexOf(r)===-1&&o.push(r)}),this._cacheId++},unregister:function(u){var o=this._plugins;[].concat(u).forEach(function(r){var n=o.indexOf(r);n!==-1&&o.splice(n,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(u,o,r){var n=this.descriptors(u),e=n.length,a,s,i,f,d;for(a=0;a<e;++a)if(s=n[a],i=s.plugin,d=i[o],typeof d=="function"&&(f=[u].concat(r||[]),f.push(s.options),d.apply(i,f)===!1))return!1;return!0},descriptors:function(u){var o=u._plugins||(u._plugins={});if(o.id===this._cacheId)return o.descriptors;var r=[],n=[],e=u&&u.config||{},a=l.defaults.global.plugins,s=e.options&&e.options.plugins||{};return this._plugins.concat(e.plugins||[]).forEach(function(i){var f=r.indexOf(i);if(f===-1){var d=i.id,h=s[d];h!==!1&&(h===!0&&(h=t.clone(a[d])),r.push(i),n.push({plugin:i,options:h||{}}))}}),o.descriptors=n,o.id=this._cacheId,n}},l.pluginService=l.plugins,l.PluginBase=l.Element.extend({})},Xn=function(l){var t=l.helpers;l.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:t.noop,onComplete:t.noop},l.Animation=l.Element.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),l.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(u,o,r,n){var e=this.animations,a,s;for(o.chart=u,n||(u.animating=!0),a=0,s=e.length;a<s;++a)if(e[a].chart===u){e[a]=o;return}e.push(o),e.length===1&&this.requestAnimationFrame()},cancelAnimation:function(u){var o=t.findIndex(this.animations,function(r){return r.chart===u});o!==-1&&(this.animations.splice(o,1),u.animating=!1)},requestAnimationFrame:function(){var u=this;u.request===null&&(u.request=t.requestAnimFrame.call(window,function(){u.request=null,u.startDigest()}))},startDigest:function(){var u=this,o=Date.now(),r=0;u.dropFrames>1&&(r=Math.floor(u.dropFrames),u.dropFrames=u.dropFrames%1),u.advance(1+r);var n=Date.now();u.dropFrames+=(n-o)/u.frameDuration,u.animations.length>0&&u.requestAnimationFrame()},advance:function(u){for(var o=this.animations,r,n,e=0;e<o.length;)r=o[e],n=r.chart,r.currentStep=(r.currentStep||0)+u,r.currentStep=Math.min(r.currentStep,r.numSteps),t.callback(r.render,[n,r],n),t.callback(r.onAnimationProgress,[r],n),r.currentStep>=r.numSteps?(t.callback(r.onAnimationComplete,[r],n),n.animating=!1,o.splice(e,1)):++e}},Object.defineProperty(l.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(l.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(u){this.chart=u}})},Jn=function(l){var t=l.helpers,u=l.plugins,o=l.platform;l.types={},l.instances={},l.controllers={};function r(a){a=a||{};var s=a.data=a.data||{};return s.datasets=s.datasets||[],s.labels=s.labels||[],a.options=t.configMerge(l.defaults.global,l.defaults[a.type],a.options||{}),a}function n(a){var s=a.options;s.scale?a.scale.options=s.scale:s.scales&&s.scales.xAxes.concat(s.scales.yAxes).forEach(function(i){a.scales[i.id].options=i}),a.tooltip._options=s.tooltips}function e(a){return a==="top"||a==="bottom"}t.extend(l.prototype,{construct:function(a,s){var i=this;s=r(s);var f=o.acquireContext(a,s),d=f&&f.canvas,h=d&&d.height,c=d&&d.width;if(i.id=t.uid(),i.ctx=f,i.canvas=d,i.config=s,i.width=c,i.height=h,i.aspectRatio=h?c/h:null,i.options=s.options,i._bufferedRender=!1,i.chart=i,i.controller=i,l.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(v){i.config.data=v}}),!f||!d){console.error("Failed to create chart: can't acquire context from the given item");return}i.initialize(),i.update()},initialize:function(){var a=this;return u.notify(a,"beforeInit"),t.retinaScale(a),a.bindEvents(),a.options.responsive&&a.resize(!0),a.ensureScalesHaveIDs(),a.buildScales(),a.initToolTip(),u.notify(a,"afterInit"),a},clear:function(){return t.clear(this),this},stop:function(){return l.animationService.cancelAnimation(this),this},resize:function(a){var s=this,i=s.options,f=s.canvas,d=i.maintainAspectRatio&&s.aspectRatio||null,h=Math.floor(t.getMaximumWidth(f)),c=Math.floor(d?h/d:t.getMaximumHeight(f));if(!(s.width===h&&s.height===c)&&(f.width=s.width=h,f.height=s.height=c,f.style.width=h+"px",f.style.height=c+"px",t.retinaScale(s),!a)){var v={width:h,height:c};u.notify(s,"resize",[v]),s.options.onResize&&s.options.onResize(s,v),s.stop(),s.update(s.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var a=this.options,s=a.scales||{},i=a.scale;t.each(s.xAxes,function(f,d){f.id=f.id||"x-axis-"+d}),t.each(s.yAxes,function(f,d){f.id=f.id||"y-axis-"+d}),i&&(i.id=i.id||"scale")},buildScales:function(){var a=this,s=a.options,i=a.scales={},f=[];s.scales&&(f=f.concat((s.scales.xAxes||[]).map(function(d){return{options:d,dtype:"category",dposition:"bottom"}}),(s.scales.yAxes||[]).map(function(d){return{options:d,dtype:"linear",dposition:"left"}}))),s.scale&&f.push({options:s.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),t.each(f,function(d){var h=d.options,c=t.getValueOrDefault(h.type,d.dtype),v=l.scaleService.getScaleConstructor(c);if(v){e(h.position)!==e(d.dposition)&&(h.position=d.dposition);var g=new v({id:h.id,options:h,ctx:a.ctx,chart:a});i[g.id]=g,d.isDefault&&(a.scale=g)}}),l.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var a=this,s=[],i=[];if(t.each(a.data.datasets,function(d,h){var c=a.getDatasetMeta(h);if(c.type||(c.type=d.type||a.config.type),s.push(c.type),c.controller)c.controller.updateIndex(h);else{var v=l.controllers[c.type];if(v===void 0)throw new Error('"'+c.type+'" is not a chart type.');c.controller=new v(a,h),i.push(c.controller)}},a),s.length>1){for(var f=1;f<s.length;f++)if(s[f]!==s[f-1]){a.isCombo=!0;break}}return i},resetElements:function(){var a=this;t.each(a.data.datasets,function(s,i){a.getDatasetMeta(i).controller.reset()},a)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(a,s){var i=this;if(n(i),u.notify(i,"beforeUpdate")!==!1){i.tooltip._data=i.data;var f=i.buildOrUpdateControllers();t.each(i.data.datasets,function(d,h){i.getDatasetMeta(h).controller.buildOrUpdateElements()},i),i.updateLayout(),t.each(f,function(d){d.reset()}),i.updateDatasets(),u.notify(i,"afterUpdate"),i._bufferedRender?i._bufferedRequest={lazy:s,duration:a}:i.render(a,s)}},updateLayout:function(){var a=this;u.notify(a,"beforeLayout")!==!1&&(l.layoutService.update(this,this.width,this.height),u.notify(a,"afterScaleUpdate"),u.notify(a,"afterLayout"))},updateDatasets:function(){var a=this;if(u.notify(a,"beforeDatasetsUpdate")!==!1){for(var s=0,i=a.data.datasets.length;s<i;++s)a.updateDataset(s);u.notify(a,"afterDatasetsUpdate")}},updateDataset:function(a){var s=this,i=s.getDatasetMeta(a),f={meta:i,index:a};u.notify(s,"beforeDatasetUpdate",[f])!==!1&&(i.controller.update(),u.notify(s,"afterDatasetUpdate",[f]))},render:function(a,s){var i=this;if(u.notify(i,"beforeRender")!==!1){var f=i.options.animation,d=function(c){u.notify(i,"afterRender"),t.callback(f&&f.onComplete,[c],i)};if(f&&(typeof a<"u"&&a!==0||typeof a>"u"&&f.duration!==0)){var h=new l.Animation({numSteps:(a||f.duration)/16.66,easing:f.easing,render:function(c,v){var g=t.easingEffects[v.easing],p=v.currentStep,m=p/v.numSteps;c.draw(g(m),m,p)},onAnimationProgress:f.onProgress,onAnimationComplete:d});l.animationService.addAnimation(i,h,a,s)}else i.draw(),d(new l.Animation({numSteps:0,chart:i}));return i}},draw:function(a){var s=this;s.clear(),a==null&&(a=1),s.transition(a),u.notify(s,"beforeDraw",[a])!==!1&&(t.each(s.boxes,function(i){i.draw(s.chartArea)},s),s.scale&&s.scale.draw(),s.drawDatasets(a),s.tooltip.draw(),u.notify(s,"afterDraw",[a]))},transition:function(a){for(var s=this,i=0,f=(s.data.datasets||[]).length;i<f;++i)s.isDatasetVisible(i)&&s.getDatasetMeta(i).controller.transition(a);s.tooltip.transition(a)},drawDatasets:function(a){var s=this;if(u.notify(s,"beforeDatasetsDraw",[a])!==!1){for(var i=(s.data.datasets||[]).length-1;i>=0;--i)s.isDatasetVisible(i)&&s.drawDataset(i,a);u.notify(s,"afterDatasetsDraw",[a])}},drawDataset:function(a,s){var i=this,f=i.getDatasetMeta(a),d={meta:f,index:a,easingValue:s};u.notify(i,"beforeDatasetDraw",[d])!==!1&&(f.controller.draw(s),u.notify(i,"afterDatasetDraw",[d]))},getElementAtEvent:function(a){return l.Interaction.modes.single(this,a)},getElementsAtEvent:function(a){return l.Interaction.modes.label(this,a,{intersect:!0})},getElementsAtXAxis:function(a){return l.Interaction.modes["x-axis"](this,a,{intersect:!0})},getElementsAtEventForMode:function(a,s,i){var f=l.Interaction.modes[s];return typeof f=="function"?f(this,a,i):[]},getDatasetAtEvent:function(a){return l.Interaction.modes.dataset(this,a,{intersect:!0})},getDatasetMeta:function(a){var s=this,i=s.data.datasets[a];i._meta||(i._meta={});var f=i._meta[s.id];return f||(f=i._meta[s.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),f},getVisibleDatasetCount:function(){for(var a=0,s=0,i=this.data.datasets.length;s<i;++s)this.isDatasetVisible(s)&&a++;return a},isDatasetVisible:function(a){var s=this.getDatasetMeta(a);return typeof s.hidden=="boolean"?!s.hidden:!this.data.datasets[a].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var a=this,s=a.canvas,i,f,d;for(a.stop(),f=0,d=a.data.datasets.length;f<d;++f)i=a.getDatasetMeta(f),i.controller&&(i.controller.destroy(),i.controller=null);s&&(a.unbindEvents(),t.clear(a),o.releaseContext(a.ctx),a.canvas=null,a.ctx=null),u.notify(a,"destroy"),delete l.instances[a.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var a=this;a.tooltip=new l.Tooltip({_chart:a,_chartInstance:a,_data:a.data,_options:a.options.tooltips},a),a.tooltip.initialize()},bindEvents:function(){var a=this,s=a._listeners={},i=function(){a.eventHandler.apply(a,arguments)};t.each(a.options.events,function(f){o.addEventListener(a,f,i),s[f]=i}),a.options.responsive&&(i=function(){a.resize()},o.addEventListener(a,"resize",i),s.resize=i)},unbindEvents:function(){var a=this,s=a._listeners;s&&(delete a._listeners,t.each(s,function(i,f){o.removeEventListener(a,f,i)}))},updateHoverStyle:function(a,s,i){var f=i?"setHoverStyle":"removeHoverStyle",d,h,c;for(h=0,c=a.length;h<c;++h)d=a[h],d&&this.getDatasetMeta(d._datasetIndex).controller[f](d)},eventHandler:function(a){var s=this,i=s.tooltip;if(u.notify(s,"beforeEvent",[a])!==!1){s._bufferedRender=!0,s._bufferedRequest=null;var f=s.handleEvent(a);f|=i&&i.handleEvent(a),u.notify(s,"afterEvent",[a]);var d=s._bufferedRequest;return d?s.render(d.duration,d.lazy):f&&!s.animating&&(s.stop(),s.render(s.options.hover.animationDuration,!0)),s._bufferedRender=!1,s._bufferedRequest=null,s}},handleEvent:function(a){var s=this,i=s.options||{},f=i.hover,d=!1;return s.lastActive=s.lastActive||[],a.type==="mouseout"?s.active=[]:s.active=s.getElementsAtEventForMode(a,f.mode,f),f.onHover&&f.onHover.call(s,a.native,s.active),(a.type==="mouseup"||a.type==="click")&&i.onClick&&i.onClick.call(s,a.native,s.active),s.lastActive.length&&s.updateHoverStyle(s.lastActive,f.mode,!1),s.active.length&&f.mode&&s.updateHoverStyle(s.active,f.mode,!0),d=!t.arrayEquals(s.active,s.lastActive),s.lastActive=s.active,d}}),l.Controller=l},Qn=function(l){var t=l.helpers,u=["push","pop","shift","splice","unshift"];function o(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),u.forEach(function(a){var s="onData"+a.charAt(0).toUpperCase()+a.slice(1),i=n[a];Object.defineProperty(n,a,{configurable:!0,enumerable:!1,value:function(){var f=Array.prototype.slice.call(arguments),d=i.apply(this,f);return t.each(n._chartjs.listeners,function(h){typeof h[s]=="function"&&h[s].apply(h,f)}),d}})})}function r(n,e){var a=n._chartjs;if(a){var s=a.listeners,i=s.indexOf(e);i!==-1&&s.splice(i,1),!(s.length>0)&&(u.forEach(function(f){delete n[f]}),delete n._chartjs)}}l.DatasetController=function(n,e){this.initialize(n,e)},t.extend(l.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(n,e){var a=this;a.chart=n,a.index=e,a.linkScales(),a.addElements()},updateIndex:function(n){this.index=n},linkScales:function(){var n=this,e=n.getMeta(),a=n.getDataset();e.xAxisID===null&&(e.xAxisID=a.xAxisID||n.chart.options.scales.xAxes[0].id),e.yAxisID===null&&(e.yAxisID=a.yAxisID||n.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(n){return this.chart.scales[n]},reset:function(){this.update(!0)},destroy:function(){this._data&&r(this._data,this)},createMetaDataset:function(){var n=this,e=n.datasetElementType;return e&&new e({_chart:n.chart,_datasetIndex:n.index})},createMetaData:function(n){var e=this,a=e.dataElementType;return a&&new a({_chart:e.chart,_datasetIndex:e.index,_index:n})},addElements:function(){var n=this,e=n.getMeta(),a=n.getDataset().data||[],s=e.data,i,f;for(i=0,f=a.length;i<f;++i)s[i]=s[i]||n.createMetaData(i);e.dataset=e.dataset||n.createMetaDataset()},addElementAndReset:function(n){var e=this.createMetaData(n);this.getMeta().data.splice(n,0,e),this.updateElement(e,n,!0)},buildOrUpdateElements:function(){var n=this,e=n.getDataset(),a=e.data||(e.data=[]);n._data!==a&&(n._data&&r(n._data,n),o(a,n),n._data=a),n.resyncElements()},update:t.noop,transition:function(n){for(var e=this.getMeta(),a=e.data||[],s=a.length,i=0;i<s;++i)a[i].transition(n);e.dataset&&e.dataset.transition(n)},draw:function(){var n=this.getMeta(),e=n.data||[],a=e.length,s=0;for(n.dataset&&n.dataset.draw();s<a;++s)e[s].draw()},removeHoverStyle:function(n,e){var a=this.chart.data.datasets[n._datasetIndex],s=n._index,i=n.custom||{},f=t.getValueAtIndexOrDefault,d=n._model;d.backgroundColor=i.backgroundColor?i.backgroundColor:f(a.backgroundColor,s,e.backgroundColor),d.borderColor=i.borderColor?i.borderColor:f(a.borderColor,s,e.borderColor),d.borderWidth=i.borderWidth?i.borderWidth:f(a.borderWidth,s,e.borderWidth)},setHoverStyle:function(n){var e=this.chart.data.datasets[n._datasetIndex],a=n._index,s=n.custom||{},i=t.getValueAtIndexOrDefault,f=t.getHoverColor,d=n._model;d.backgroundColor=s.hoverBackgroundColor?s.hoverBackgroundColor:i(e.hoverBackgroundColor,a,f(d.backgroundColor)),d.borderColor=s.hoverBorderColor?s.hoverBorderColor:i(e.hoverBorderColor,a,f(d.borderColor)),d.borderWidth=s.hoverBorderWidth?s.hoverBorderWidth:i(e.hoverBorderWidth,a,d.borderWidth)},resyncElements:function(){var n=this,e=n.getMeta(),a=n.getDataset().data,s=e.data.length,i=a.length;i<s?e.data.splice(i,s-i):i>s&&n.insertElements(s,i-s)},insertElements:function(n,e){for(var a=0;a<e;++a)this.addElementAndReset(n+a)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(n,e){this.getMeta().data.splice(n,e),this.insertElements(n,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),l.DatasetController.extend=t.inherits},ei=function(l){var t=l.helpers;function u(r,n){return t.where(r,function(e){return e.position===n})}function o(r,n){r.forEach(function(e,a){return e._tmpIndex_=a,e}),r.sort(function(e,a){var s=n?a:e,i=n?e:a;return s.weight===i.weight?s._tmpIndex_-i._tmpIndex_:s.weight-i.weight}),r.forEach(function(e){delete e._tmpIndex_})}l.layoutService={defaults:{},addBox:function(r,n){r.boxes||(r.boxes=[]),n.fullWidth=n.fullWidth||!1,n.position=n.position||"top",n.weight=n.weight||0,r.boxes.push(n)},removeBox:function(r,n){var e=r.boxes?r.boxes.indexOf(n):-1;e!==-1&&r.boxes.splice(e,1)},configure:function(r,n,e){for(var a=["fullWidth","position","weight"],s=a.length,i=0,f;i<s;++i)f=a[i],e.hasOwnProperty(f)&&(n[f]=e[f])},update:function(r,n,e){if(!r)return;var a=r.options.layout,s=a?a.padding:null,i=0,f=0,d=0,h=0;isNaN(s)?(i=s.left||0,f=s.right||0,d=s.top||0,h=s.bottom||0):(i=s,f=s,d=s,h=s);var c=u(r.boxes,"left"),v=u(r.boxes,"right"),g=u(r.boxes,"top"),p=u(r.boxes,"bottom"),m=u(r.boxes,"chartArea");o(c,!0),o(v,!1),o(g,!0),o(p,!1);var b=n-i-f,k=e-d-h,w=b/2,C=k/2,A=(n-w)/(c.length+v.length),P=(e-C)/(g.length+p.length),x=b,V=k,B=[];function R(L){var re,be=L.isHorizontal();be?(re=L.update(L.fullWidth?b:x,P),V-=re.height):(re=L.update(A,C),x-=re.width),B.push({horizontal:be,minSize:re,box:L})}t.each(c.concat(v,g,p),R);var T=0,H=0,W=0,Y=0;t.each(g.concat(p),function(L){if(L.getPadding){var re=L.getPadding();T=Math.max(T,re.left),H=Math.max(H,re.right)}}),t.each(c.concat(v),function(L){if(L.getPadding){var re=L.getPadding();W=Math.max(W,re.top),Y=Math.max(Y,re.bottom)}});var E=i,q=f,O=d,$=h;function Z(L){var re=t.findNextWhere(B,function(de){return de.box===L});if(re)if(L.isHorizontal()){var be={left:Math.max(E,T),right:Math.max(q,H),top:0,bottom:0};L.update(L.fullWidth?b:x,k/2,be)}else L.update(re.minSize.width,V)}t.each(c.concat(v),Z),t.each(c,function(L){E+=L.width}),t.each(v,function(L){q+=L.width}),t.each(g.concat(p),Z),t.each(g,function(L){O+=L.height}),t.each(p,function(L){$+=L.height});function G(L){var re=t.findNextWhere(B,function(de){return de.box===L}),be={left:0,right:0,top:O,bottom:$};re&&L.update(re.minSize.width,V,be)}t.each(c.concat(v),G),E=i,q=f,O=d,$=h,t.each(c,function(L){E+=L.width}),t.each(v,function(L){q+=L.width}),t.each(g,function(L){O+=L.height}),t.each(p,function(L){$+=L.height});var oe=Math.max(T-E,0);E+=oe,q+=Math.max(H-q,0);var U=Math.max(W-O,0);O+=U,$+=Math.max(Y-$,0);var ee=e-O-$,ne=n-E-q;(ne!==x||ee!==V)&&(t.each(c,function(L){L.height=ee}),t.each(v,function(L){L.height=ee}),t.each(g,function(L){L.fullWidth||(L.width=ne)}),t.each(p,function(L){L.fullWidth||(L.width=ne)}),V=ee,x=ne);var ae=i+oe,X=d+U;function fe(L){L.isHorizontal()?(L.left=L.fullWidth?i:E,L.right=L.fullWidth?n-f:E+x,L.top=X,L.bottom=X+L.height,X=L.bottom):(L.left=ae,L.right=ae+L.width,L.top=O,L.bottom=O+V,ae=L.right)}t.each(c.concat(g),fe),ae+=x,X+=V,t.each(v,fe),t.each(p,fe),r.chartArea={left:E,top:O,right:E+x,bottom:O+V},t.each(m,function(L){L.left=r.chartArea.left,L.top=r.chartArea.top,L.right=r.chartArea.right,L.bottom=r.chartArea.bottom,L.update(x,V)})}}},ti=function(l){var t=l.helpers;l.scaleService={constructors:{},defaults:{},registerScaleType:function(u,o,r){this.constructors[u]=o,this.defaults[u]=t.clone(r)},getScaleConstructor:function(u){return this.constructors.hasOwnProperty(u)?this.constructors[u]:void 0},getScaleDefaults:function(u){return this.defaults.hasOwnProperty(u)?t.scaleMerge(l.defaults.scale,this.defaults[u]):{}},updateScaleDefaults:function(u,o){var r=this.defaults;r.hasOwnProperty(u)&&(r[u]=t.extend(r[u],o))},addScalesToLayout:function(u){t.each(u.scales,function(o){o.fullWidth=o.options.fullWidth,o.position=o.options.position,o.weight=o.options.weight,l.layoutService.addBox(u,o)})}}},ai=function(l){var t=l.helpers;l.Ticks={generators:{linear:function(u,o){var r=[],n;if(u.stepSize&&u.stepSize>0)n=u.stepSize;else{var e=t.niceNum(o.max-o.min,!1);n=t.niceNum(e/(u.maxTicks-1),!0)}var a=Math.floor(o.min/n)*n,s=Math.ceil(o.max/n)*n;u.min&&u.max&&u.stepSize&&t.almostWhole((u.max-u.min)/u.stepSize,n/1e3)&&(a=u.min,s=u.max);var i=(s-a)/n;t.almostEquals(i,Math.round(i),n/1e3)?i=Math.round(i):i=Math.ceil(i),r.push(u.min!==void 0?u.min:a);for(var f=1;f<i;++f)r.push(a+f*n);return r.push(u.max!==void 0?u.max:s),r},logarithmic:function(u,o){var r=[],n=t.getValueOrDefault,e=n(u.min,Math.pow(10,Math.floor(t.log10(o.min)))),a=Math.floor(t.log10(o.max)),s=Math.ceil(o.max/Math.pow(10,a)),i,f;e===0?(i=Math.floor(t.log10(o.minNotZero)),f=Math.floor(o.minNotZero/Math.pow(10,i)),r.push(e),e=f*Math.pow(10,i)):(i=Math.floor(t.log10(e)),f=Math.floor(e/Math.pow(10,i)));do r.push(e),++f,f===10&&(f=1,++i),e=f*Math.pow(10,i);while(i<a||i===a&&f<s);var d=n(u.max,e);return r.push(d),r}},formatters:{values:function(u){return t.isArray(u)?u:""+u},linear:function(u,o,r){var n=r.length>3?r[2]-r[1]:r[1]-r[0];Math.abs(n)>1&&u!==Math.floor(u)&&(n=u-Math.floor(u));var e=t.log10(Math.abs(n)),a="";if(u!==0){var s=-1*Math.floor(e);s=Math.max(Math.min(s,20),0),a=u.toFixed(s)}else a="0";return a},logarithmic:function(u,o,r){var n=u/Math.pow(10,Math.floor(t.log10(u)));return u===0?"0":n===1||n===2||n===5||o===0||o===r.length-1?u.toExponential():""}}}},ri=function(l){var t=l.helpers;l.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:l.Ticks.formatters.values}};function u(r,n,e){return t.isArray(n)?t.longestText(r,e,n):r.measureText(n).width}function o(r){var n=t.getValueOrDefault,e=l.defaults.global,a=n(r.fontSize,e.defaultFontSize),s=n(r.fontStyle,e.defaultFontStyle),i=n(r.fontFamily,e.defaultFontFamily);return{size:a,style:s,family:i,font:t.fontString(a,s,i)}}l.Scale=l.Element.extend({getPadding:function(){var r=this;return{left:r.paddingLeft||0,top:r.paddingTop||0,right:r.paddingRight||0,bottom:r.paddingBottom||0}},beforeUpdate:function(){t.callback(this.options.beforeUpdate,[this])},update:function(r,n,e){var a=this;return a.beforeUpdate(),a.maxWidth=r,a.maxHeight=n,a.margins=t.extend({left:0,right:0,top:0,bottom:0},e),a.longestTextCache=a.longestTextCache||{},a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeDataLimits(),a.determineDataLimits(),a.afterDataLimits(),a.beforeBuildTicks(),a.buildTicks(),a.afterBuildTicks(),a.beforeTickToLabelConversion(),a.convertTicksToLabels(),a.afterTickToLabelConversion(),a.beforeCalculateTickRotation(),a.calculateTickRotation(),a.afterCalculateTickRotation(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.minSize},afterUpdate:function(){t.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){t.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var r=this;r.isHorizontal()?(r.width=r.maxWidth,r.left=0,r.right=r.width):(r.height=r.maxHeight,r.top=0,r.bottom=r.height),r.paddingLeft=0,r.paddingTop=0,r.paddingRight=0,r.paddingBottom=0},afterSetDimensions:function(){t.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){t.callback(this.options.beforeDataLimits,[this])},determineDataLimits:t.noop,afterDataLimits:function(){t.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){t.callback(this.options.beforeBuildTicks,[this])},buildTicks:t.noop,afterBuildTicks:function(){t.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){t.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var r=this,n=r.options.ticks;r.ticks=r.ticks.map(n.userCallback||n.callback)},afterTickToLabelConversion:function(){t.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){t.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var r=this,n=r.ctx,e=r.options.ticks,a=o(e);n.font=a.font;var s=e.minRotation||0;if(r.options.display&&r.isHorizontal())for(var i=t.longestText(n,a.font,r.ticks,r.longestTextCache),f=i,d,h,c=r.getPixelForTick(1)-r.getPixelForTick(0)-6;f>c&&s<e.maxRotation;){var v=t.toRadians(s);if(d=Math.cos(v),h=Math.sin(v),h*i>r.maxHeight){s--;break}s++,f=d*i}r.labelRotation=s},afterCalculateTickRotation:function(){t.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){t.callback(this.options.beforeFit,[this])},fit:function(){var r=this,n=r.minSize={width:0,height:0},e=r.options,a=e.ticks,s=e.scaleLabel,i=e.gridLines,f=e.display,d=r.isHorizontal(),h=o(a),c=o(s).size*1.5,v=e.gridLines.tickMarkLength;if(d?n.width=r.isFullWidth()?r.maxWidth-r.margins.left-r.margins.right:r.maxWidth:n.width=f&&i.drawTicks?v:0,d?n.height=f&&i.drawTicks?v:0:n.height=r.maxHeight,s.display&&f&&(d?n.height+=c:n.width+=c),a.display&&f){var g=t.longestText(r.ctx,h.font,r.ticks,r.longestTextCache),p=t.numberOfLabelLines(r.ticks),m=h.size*.5;if(d){r.longestLabelWidth=g;var b=t.toRadians(r.labelRotation),k=Math.cos(b),w=Math.sin(b),C=w*g+h.size*p+m*p;n.height=Math.min(r.maxHeight,n.height+C),r.ctx.font=h.font;var A=r.ticks[0],P=u(r.ctx,A,h.font),x=r.ticks[r.ticks.length-1],V=u(r.ctx,x,h.font);r.labelRotation!==0?(r.paddingLeft=e.position==="bottom"?k*P+3:k*m+3,r.paddingRight=e.position==="bottom"?k*m+3:k*V+3):(r.paddingLeft=P/2+3,r.paddingRight=V/2+3)}else a.mirror?g=0:g+=r.options.ticks.padding,n.width=Math.min(r.maxWidth,n.width+g),r.paddingTop=h.size/2,r.paddingBottom=h.size/2}r.handleMargins(),r.width=n.width,r.height=n.height},handleMargins:function(){var r=this;r.margins&&(r.paddingLeft=Math.max(r.paddingLeft-r.margins.left,0),r.paddingTop=Math.max(r.paddingTop-r.margins.top,0),r.paddingRight=Math.max(r.paddingRight-r.margins.right,0),r.paddingBottom=Math.max(r.paddingBottom-r.margins.bottom,0))},afterFit:function(){t.callback(this.options.afterFit,[this])},isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(r){return r===null||typeof r>"u"?NaN:typeof r=="number"&&!isFinite(r)?NaN:typeof r=="object"?r instanceof Date||r.isValid?r:this.getRightValue(this.isHorizontal()?r.x:r.y):r},getLabelForIndex:t.noop,getPixelForValue:t.noop,getValueForPixel:t.noop,getPixelForTick:function(r,n){var e=this;if(e.isHorizontal()){var a=e.width-(e.paddingLeft+e.paddingRight),s=a/Math.max(e.ticks.length-(e.options.gridLines.offsetGridLines?0:1),1),i=s*r+e.paddingLeft;n&&(i+=s/2);var f=e.left+Math.round(i);return f+=e.isFullWidth()?e.margins.left:0,f}var d=e.height-(e.paddingTop+e.paddingBottom);return e.top+r*(d/(e.ticks.length-1))},getPixelForDecimal:function(r){var n=this;if(n.isHorizontal()){var e=n.width-(n.paddingLeft+n.paddingRight),a=e*r+n.paddingLeft,s=n.left+Math.round(a);return s+=n.isFullWidth()?n.margins.left:0,s}return n.top+r*n.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var r=this,n=r.min,e=r.max;return r.beginAtZero?0:n<0&&e<0?e:n>0&&e>0?n:0},draw:function(r){var n=this,e=n.options;if(e.display){var a=n.ctx,s=l.defaults.global,i=e.ticks,f=e.gridLines,d=e.scaleLabel,h=n.labelRotation!==0,c,v=i.autoSkip,g=n.isHorizontal(),p;i.maxTicksLimit&&(p=i.maxTicksLimit);var m=t.getValueOrDefault(i.fontColor,s.defaultFontColor),b=o(i),k=f.drawTicks?f.tickMarkLength:0,w=t.getValueOrDefault(d.fontColor,s.defaultFontColor),C=o(d),A=t.toRadians(n.labelRotation),P=Math.cos(A),x=n.longestLabelWidth*P;a.fillStyle=m;var V=[];if(g){if(c=!1,(x+i.autoSkipPadding)*n.ticks.length>n.width-(n.paddingLeft+n.paddingRight)&&(c=1+Math.floor((x+i.autoSkipPadding)*n.ticks.length/(n.width-(n.paddingLeft+n.paddingRight)))),p&&n.ticks.length>p)for(;!c||n.ticks.length/(c||1)>p;)c||(c=1),c+=1;v||(c=!1)}var B=e.position==="right"?n.left:n.right-k,R=e.position==="right"?n.left+k:n.right,T=e.position==="bottom"?n.top:n.bottom-k,H=e.position==="bottom"?n.top+k:n.bottom;if(t.each(n.ticks,function(U,ee){if(U!=null){var ne=n.ticks.length===ee+1,ae=c>1&&ee%c>0||ee%c===0&&ee+c>=n.ticks.length;if(!(ae&&!ne||U==null)){var X,fe,L,re;ee===(typeof n.zeroLineIndex<"u"?n.zeroLineIndex:0)?(X=f.zeroLineWidth,fe=f.zeroLineColor,L=f.zeroLineBorderDash,re=f.zeroLineBorderDashOffset):(X=t.getValueAtIndexOrDefault(f.lineWidth,ee),fe=t.getValueAtIndexOrDefault(f.color,ee),L=t.getValueOrDefault(f.borderDash,s.borderDash),re=t.getValueOrDefault(f.borderDashOffset,s.borderDashOffset));var be,de,le,ke,Se,we,Ce,Ee,Ae,Te,Me="middle",Ne="middle";if(g){e.position==="bottom"?(Ne=h?"middle":"top",Me=h?"right":"center",Te=n.top+k):(Ne=h?"middle":"bottom",Me=h?"left":"center",Te=n.bottom-k);var ut=n.getPixelForTick(ee)+t.aliasPixel(X);Ae=n.getPixelForTick(ee,f.offsetGridLines)+i.labelOffset,be=le=Se=Ce=ut,de=T,ke=H,we=r.top,Ee=r.bottom}else{var Ve=e.position==="left",Ge=i.padding,ce;i.mirror?(Me=Ve?"left":"right",ce=Ge):(Me=Ve?"right":"left",ce=k+Ge),Ae=Ve?n.right-ce:n.left+ce;var We=n.getPixelForTick(ee);We+=t.aliasPixel(X),Te=n.getPixelForTick(ee,f.offsetGridLines),be=B,le=R,Se=r.left,Ce=r.right,de=ke=we=Ee=We}V.push({tx1:be,ty1:de,tx2:le,ty2:ke,x1:Se,y1:we,x2:Ce,y2:Ee,labelX:Ae,labelY:Te,glWidth:X,glColor:fe,glBorderDash:L,glBorderDashOffset:re,rotation:-1*A,label:U,textBaseline:Ne,textAlign:Me})}}}),t.each(V,function(U){if(f.display&&(a.save(),a.lineWidth=U.glWidth,a.strokeStyle=U.glColor,a.setLineDash&&(a.setLineDash(U.glBorderDash),a.lineDashOffset=U.glBorderDashOffset),a.beginPath(),f.drawTicks&&(a.moveTo(U.tx1,U.ty1),a.lineTo(U.tx2,U.ty2)),f.drawOnChartArea&&(a.moveTo(U.x1,U.y1),a.lineTo(U.x2,U.y2)),a.stroke(),a.restore()),i.display){a.save(),a.translate(U.labelX,U.labelY),a.rotate(U.rotation),a.font=b.font,a.textBaseline=U.textBaseline,a.textAlign=U.textAlign;var ee=U.label;if(t.isArray(ee))for(var ne=0,ae=0;ne<ee.length;++ne)a.fillText(""+ee[ne],0,ae),ae+=b.size*1.5;else a.fillText(ee,0,0);a.restore()}}),d.display){var W,Y,E=0;if(g)W=n.left+(n.right-n.left)/2,Y=e.position==="bottom"?n.bottom-C.size/2:n.top+C.size/2;else{var q=e.position==="left";W=q?n.left+C.size/2:n.right-C.size/2,Y=n.top+(n.bottom-n.top)/2,E=q?-.5*Math.PI:.5*Math.PI}a.save(),a.translate(W,Y),a.rotate(E),a.textAlign="center",a.textBaseline="middle",a.fillStyle=w,a.font=C.font,a.fillText(d.labelString,0,0),a.restore()}if(f.drawBorder){a.lineWidth=t.getValueAtIndexOrDefault(f.lineWidth,0),a.strokeStyle=t.getValueAtIndexOrDefault(f.color,0);var O=n.left,$=n.right,Z=n.top,G=n.bottom,oe=t.aliasPixel(a.lineWidth);g?(Z=G=e.position==="top"?n.bottom:n.top,Z+=oe,G+=oe):(O=$=e.position==="left"?n.right:n.left,O+=oe,$+=oe),a.beginPath(),a.moveTo(O,Z),a.lineTo($,G),a.stroke()}}}})},ni=function(l){var t=l.helpers;function u(a,s){return a.native?{x:a.x,y:a.y}:t.getRelativePosition(a,s)}function o(a,s){var i=a.data.datasets,f,d,h,c,v;for(d=0,c=i.length;d<c;++d)if(a.isDatasetVisible(d))for(f=a.getDatasetMeta(d),h=0,v=f.data.length;h<v;++h){var g=f.data[h];g._view.skip||s(g)}}function r(a,s){var i=[];return o(a,function(f){f.inRange(s.x,s.y)&&i.push(f)}),i}function n(a,s,i,f){var d=Number.POSITIVE_INFINITY,h=[];return f||(f=t.distanceBetweenPoints),o(a,function(c){if(!(i&&!c.inRange(s.x,s.y))){var v=c.getCenterPoint(),g=f(s,v);g<d?(h=[c],d=g):g===d&&h.push(c)}}),h}function e(a,s,i){var f=u(s,a),d=function(v,g){return Math.abs(v.x-g.x)},h=i.intersect?r(a,f):n(a,f,!1,d),c=[];return h.length?(a.data.datasets.forEach(function(v,g){if(a.isDatasetVisible(g)){var p=a.getDatasetMeta(g),m=p.data[h[0]._index];m&&!m._view.skip&&c.push(m)}}),c):[]}l.Interaction={modes:{single:function(a,s){var i=u(s,a),f=[];return o(a,function(d){if(d.inRange(i.x,i.y))return f.push(d),f}),f.slice(0,1)},label:e,index:e,dataset:function(a,s,i){var f=u(s,a),d=i.intersect?r(a,f):n(a,f,!1);return d.length>0&&(d=a.getDatasetMeta(d[0]._datasetIndex).data),d},"x-axis":function(a,s){return e(a,s,!0)},point:function(a,s){var i=u(s,a);return r(a,i)},nearest:function(a,s,i){var f=u(s,a),d=n(a,f,i.intersect);return d.length>1&&d.sort(function(h,c){var v=h.getArea(),g=c.getArea(),p=v-g;return p===0&&(p=h._datasetIndex-c._datasetIndex),p}),d.slice(0,1)},x:function(a,s,i){var f=u(s,a),d=[],h=!1;return o(a,function(c){c.inXRange(f.x)&&d.push(c),c.inRange(f.x,f.y)&&(h=!0)}),i.intersect&&!h&&(d=[]),d},y:function(a,s,i){var f=u(s,a),d=[],h=!1;return o(a,function(c){c.inYRange(f.y)&&d.push(c),c.inRange(f.x,f.y)&&(h=!0)}),i.intersect&&!h&&(d=[]),d}}}},ii=function(l){var t=l.helpers;function u(i,f){var d=t.color(i);return d.alpha(f*d.alpha()).rgbaString()}l.defaults.global.tooltips={enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:t.noop,title:function(i,f){var d="",h=f.labels,c=h?h.length:0;if(i.length>0){var v=i[0];v.xLabel?d=v.xLabel:c>0&&v.index<c&&(d=h[v.index])}return d},afterTitle:t.noop,beforeBody:t.noop,beforeLabel:t.noop,label:function(i,f){var d=f.datasets[i.datasetIndex].label||"";return d&&(d+=": "),d+=i.yLabel,d},labelColor:function(i,f){var d=f.getDatasetMeta(i.datasetIndex),h=d.data[i.index],c=h._view;return{borderColor:c.borderColor,backgroundColor:c.backgroundColor}},afterLabel:t.noop,afterBody:t.noop,beforeFooter:t.noop,footer:t.noop,afterFooter:t.noop}};function o(i,f){return f&&(t.isArray(f)?Array.prototype.push.apply(i,f):i.push(f)),i}function r(i){var f=i._xScale,d=i._yScale||i._scale,h=i._index,c=i._datasetIndex;return{xLabel:f?f.getLabelForIndex(h,c):"",yLabel:d?d.getLabelForIndex(h,c):"",index:h,datasetIndex:c,x:i._model.x,y:i._model.y}}function n(i){var f=l.defaults.global,d=t.getValueOrDefault;return{xPadding:i.xPadding,yPadding:i.yPadding,xAlign:i.xAlign,yAlign:i.yAlign,bodyFontColor:i.bodyFontColor,_bodyFontFamily:d(i.bodyFontFamily,f.defaultFontFamily),_bodyFontStyle:d(i.bodyFontStyle,f.defaultFontStyle),_bodyAlign:i.bodyAlign,bodyFontSize:d(i.bodyFontSize,f.defaultFontSize),bodySpacing:i.bodySpacing,titleFontColor:i.titleFontColor,_titleFontFamily:d(i.titleFontFamily,f.defaultFontFamily),_titleFontStyle:d(i.titleFontStyle,f.defaultFontStyle),titleFontSize:d(i.titleFontSize,f.defaultFontSize),_titleAlign:i.titleAlign,titleSpacing:i.titleSpacing,titleMarginBottom:i.titleMarginBottom,footerFontColor:i.footerFontColor,_footerFontFamily:d(i.footerFontFamily,f.defaultFontFamily),_footerFontStyle:d(i.footerFontStyle,f.defaultFontStyle),footerFontSize:d(i.footerFontSize,f.defaultFontSize),_footerAlign:i.footerAlign,footerSpacing:i.footerSpacing,footerMarginTop:i.footerMarginTop,caretSize:i.caretSize,cornerRadius:i.cornerRadius,backgroundColor:i.backgroundColor,opacity:0,legendColorBackground:i.multiKeyBackground,displayColors:i.displayColors,borderColor:i.borderColor,borderWidth:i.borderWidth}}function e(i,f){var d=i._chart.ctx,h=f.yPadding*2,c=0,v=f.body,g=v.reduce(function(P,x){return P+x.before.length+x.lines.length+x.after.length},0);g+=f.beforeBody.length+f.afterBody.length;var p=f.title.length,m=f.footer.length,b=f.titleFontSize,k=f.bodyFontSize,w=f.footerFontSize;h+=p*b,h+=p?(p-1)*f.titleSpacing:0,h+=p?f.titleMarginBottom:0,h+=g*k,h+=g?(g-1)*f.bodySpacing:0,h+=m?f.footerMarginTop:0,h+=m*w,h+=m?(m-1)*f.footerSpacing:0;var C=0,A=function(P){c=Math.max(c,d.measureText(P).width+C)};return d.font=t.fontString(b,f._titleFontStyle,f._titleFontFamily),t.each(f.title,A),d.font=t.fontString(k,f._bodyFontStyle,f._bodyFontFamily),t.each(f.beforeBody.concat(f.afterBody),A),C=f.displayColors?k+2:0,t.each(v,function(P){t.each(P.before,A),t.each(P.lines,A),t.each(P.after,A)}),C=0,d.font=t.fontString(w,f._footerFontStyle,f._footerFontFamily),t.each(f.footer,A),c+=2*f.xPadding,{width:c,height:h}}function a(i,f){var d=i._model,h=i._chart,c=i._chart.chartArea,v="center",g="center";d.y<f.height?g="top":d.y>h.height-f.height&&(g="bottom");var p,m,b,k,w,C=(c.left+c.right)/2,A=(c.top+c.bottom)/2;g==="center"?(p=function(x){return x<=C},m=function(x){return x>C}):(p=function(x){return x<=f.width/2},m=function(x){return x>=h.width-f.width/2}),b=function(x){return x+f.width>h.width},k=function(x){return x-f.width<0},w=function(x){return x<=A?"top":"bottom"},p(d.x)?(v="left",b(d.x)&&(v="center",g=w(d.y))):m(d.x)&&(v="right",k(d.x)&&(v="center",g=w(d.y)));var P=i._options;return{xAlign:P.xAlign?P.xAlign:v,yAlign:P.yAlign?P.yAlign:g}}function s(i,f,d){var h=i.x,c=i.y,v=i.caretSize,g=i.caretPadding,p=i.cornerRadius,m=d.xAlign,b=d.yAlign,k=v+g,w=p+g;return m==="right"?h-=f.width:m==="center"&&(h-=f.width/2),b==="top"?c+=k:b==="bottom"?c-=f.height+k:c-=f.height/2,b==="center"?m==="left"?h+=k:m==="right"&&(h-=k):m==="left"?h-=w:m==="right"&&(h+=w),{x:h,y:c}}l.Tooltip=l.Element.extend({initialize:function(){this._model=n(this._options)},getTitle:function(){var i=this,f=i._options,d=f.callbacks,h=d.beforeTitle.apply(i,arguments),c=d.title.apply(i,arguments),v=d.afterTitle.apply(i,arguments),g=[];return g=o(g,h),g=o(g,c),g=o(g,v),g},getBeforeBody:function(){var i=this._options.callbacks.beforeBody.apply(this,arguments);return t.isArray(i)?i:i!==void 0?[i]:[]},getBody:function(i,f){var d=this,h=d._options.callbacks,c=[];return t.each(i,function(v){var g={before:[],lines:[],after:[]};o(g.before,h.beforeLabel.call(d,v,f)),o(g.lines,h.label.call(d,v,f)),o(g.after,h.afterLabel.call(d,v,f)),c.push(g)}),c},getAfterBody:function(){var i=this._options.callbacks.afterBody.apply(this,arguments);return t.isArray(i)?i:i!==void 0?[i]:[]},getFooter:function(){var i=this,f=i._options.callbacks,d=f.beforeFooter.apply(i,arguments),h=f.footer.apply(i,arguments),c=f.afterFooter.apply(i,arguments),v=[];return v=o(v,d),v=o(v,h),v=o(v,c),v},update:function(i){var f=this,d=f._options,h=f._model,c=f._model=n(d),v=f._active,g=f._data,p={xAlign:h.xAlign,yAlign:h.yAlign},m={x:h.x,y:h.y},b={width:h.width,height:h.height},k={x:h.caretX,y:h.caretY},w,C;if(v.length){c.opacity=1;var A=[];k=l.Tooltip.positioners[d.position](v,f._eventPosition);var P=[];for(w=0,C=v.length;w<C;++w)P.push(r(v[w]));d.filter&&(P=P.filter(function(x){return d.filter(x,g)})),d.itemSort&&(P=P.sort(function(x,V){return d.itemSort(x,V,g)})),t.each(P,function(x){A.push(d.callbacks.labelColor.call(f,x,f._chart))}),c.title=f.getTitle(P,g),c.beforeBody=f.getBeforeBody(P,g),c.body=f.getBody(P,g),c.afterBody=f.getAfterBody(P,g),c.footer=f.getFooter(P,g),c.x=Math.round(k.x),c.y=Math.round(k.y),c.caretPadding=d.caretPadding,c.labelColors=A,c.dataPoints=P,b=e(this,c),p=a(this,b),m=s(c,b,p)}else c.opacity=0;return c.xAlign=p.xAlign,c.yAlign=p.yAlign,c.x=m.x,c.y=m.y,c.width=b.width,c.height=b.height,c.caretX=k.x,c.caretY=k.y,f._model=c,i&&d.custom&&d.custom.call(f,c),f},drawCaret:function(i,f){var d=this._chart.ctx,h=this._view,c=this.getCaretPosition(i,f,h);d.lineTo(c.x1,c.y1),d.lineTo(c.x2,c.y2),d.lineTo(c.x3,c.y3)},getCaretPosition:function(i,f,d){var h,c,v,g,p,m,b=d.caretSize,k=d.cornerRadius,w=d.xAlign,C=d.yAlign,A=i.x,P=i.y,x=f.width,V=f.height;if(C==="center")p=P+V/2,w==="left"?(h=A,c=h-b,v=h,g=p+b,m=p-b):(h=A+x,c=h+b,v=h,g=p-b,m=p+b);else if(w==="left"?(c=A+k+b,h=c-b,v=c+b):w==="right"?(c=A+x-k-b,h=c-b,v=c+b):(c=A+x/2,h=c-b,v=c+b),C==="top")g=P,p=g-b,m=g;else{g=P+V,p=g+b,m=g;var B=v;v=h,h=B}return{x1:h,x2:c,x3:v,y1:g,y2:p,y3:m}},drawTitle:function(i,f,d,h){var c=f.title;if(c.length){d.textAlign=f._titleAlign,d.textBaseline="top";var v=f.titleFontSize,g=f.titleSpacing;d.fillStyle=u(f.titleFontColor,h),d.font=t.fontString(v,f._titleFontStyle,f._titleFontFamily);var p,m;for(p=0,m=c.length;p<m;++p)d.fillText(c[p],i.x,i.y),i.y+=v+g,p+1===c.length&&(i.y+=f.titleMarginBottom-g)}},drawBody:function(i,f,d,h){var c=f.bodyFontSize,v=f.bodySpacing,g=f.body;d.textAlign=f._bodyAlign,d.textBaseline="top";var p=u(f.bodyFontColor,h);d.fillStyle=p,d.font=t.fontString(c,f._bodyFontStyle,f._bodyFontFamily);var m=0,b=function(w){d.fillText(w,i.x+m,i.y),i.y+=c+v};t.each(f.beforeBody,b);var k=f.displayColors;m=k?c+2:0,t.each(g,function(w,C){t.each(w.before,b),t.each(w.lines,function(A){k&&(d.fillStyle=u(f.legendColorBackground,h),d.fillRect(i.x,i.y,c,c),d.strokeStyle=u(f.labelColors[C].borderColor,h),d.strokeRect(i.x,i.y,c,c),d.fillStyle=u(f.labelColors[C].backgroundColor,h),d.fillRect(i.x+1,i.y+1,c-2,c-2),d.fillStyle=p),b(A)}),t.each(w.after,b)}),m=0,t.each(f.afterBody,b),i.y-=v},drawFooter:function(i,f,d,h){var c=f.footer;c.length&&(i.y+=f.footerMarginTop,d.textAlign=f._footerAlign,d.textBaseline="top",d.fillStyle=u(f.footerFontColor,h),d.font=t.fontString(f.footerFontSize,f._footerFontStyle,f._footerFontFamily),t.each(c,function(v){d.fillText(v,i.x,i.y),i.y+=f.footerFontSize+f.footerSpacing}))},drawBackground:function(i,f,d,h,c){d.fillStyle=u(f.backgroundColor,c),d.strokeStyle=u(f.borderColor,c),d.lineWidth=f.borderWidth;var v=f.xAlign,g=f.yAlign,p=i.x,m=i.y,b=h.width,k=h.height,w=f.cornerRadius;d.beginPath(),d.moveTo(p+w,m),g==="top"&&this.drawCaret(i,h),d.lineTo(p+b-w,m),d.quadraticCurveTo(p+b,m,p+b,m+w),g==="center"&&v==="right"&&this.drawCaret(i,h),d.lineTo(p+b,m+k-w),d.quadraticCurveTo(p+b,m+k,p+b-w,m+k),g==="bottom"&&this.drawCaret(i,h),d.lineTo(p+w,m+k),d.quadraticCurveTo(p,m+k,p,m+k-w),g==="center"&&v==="left"&&this.drawCaret(i,h),d.lineTo(p,m+w),d.quadraticCurveTo(p,m,p+w,m),d.closePath(),d.fill(),f.borderWidth>0&&d.stroke()},draw:function(){var i=this._chart.ctx,f=this._view;if(f.opacity!==0){var d={width:f.width,height:f.height},h={x:f.x,y:f.y},c=Math.abs(f.opacity<.001)?0:f.opacity,v=f.title.length||f.beforeBody.length||f.body.length||f.afterBody.length||f.footer.length;this._options.enabled&&v&&(this.drawBackground(h,f,i,d,c),h.x+=f.xPadding,h.y+=f.yPadding,this.drawTitle(h,f,i,c),this.drawBody(h,f,i,c),this.drawFooter(h,f,i,c))}},handleEvent:function(i){var f=this,d=f._options,h=!1;if(f._lastActive=f._lastActive||[],i.type==="mouseout"?f._active=[]:f._active=f._chart.getElementsAtEventForMode(i,d.mode,d),h=!t.arrayEquals(f._active,f._lastActive),!h)return!1;if(f._lastActive=f._active,d.enabled||d.custom){f._eventPosition={x:i.x,y:i.y};var c=f._model;f.update(!0),f.pivot(),h|=c.x!==f._model.x||c.y!==f._model.y}return h}}),l.Tooltip.positioners={average:function(i){if(!i.length)return!1;var f,d,h=0,c=0,v=0;for(f=0,d=i.length;f<d;++f){var g=i[f];if(g&&g.hasValue()){var p=g.tooltipPosition();h+=p.x,c+=p.y,++v}}return{x:Math.round(h/v),y:Math.round(c/v)}},nearest:function(i,f){var d=f.x,h=f.y,c,v=Number.POSITIVE_INFINITY,g,p;for(g=0,p=i.length;g<p;++g){var m=i[g];if(m&&m.hasValue()){var b=m.getCenterPoint(),k=t.distanceBetweenPoints(f,b);k<v&&(v=k,c=m)}}if(c){var w=c.tooltipPosition();d=w.x,h=w.y}return{x:d,y:h}}}},oi=function(l){var t=l.helpers,u=l.defaults.global;u.elements.arc={backgroundColor:u.defaultColor,borderColor:"#fff",borderWidth:2},l.elements.Arc=l.Element.extend({inLabelRange:function(o){var r=this._view;return r?Math.pow(o-r.x,2)<Math.pow(r.radius+r.hoverRadius,2):!1},inRange:function(o,r){var n=this._view;if(n){for(var e=t.getAngleFromPoint(n,{x:o,y:r}),a=e.angle,s=e.distance,i=n.startAngle,f=n.endAngle;f<i;)f+=2*Math.PI;for(;a>f;)a-=2*Math.PI;for(;a<i;)a+=2*Math.PI;var d=a>=i&&a<=f,h=s>=n.innerRadius&&s<=n.outerRadius;return d&&h}return!1},getCenterPoint:function(){var o=this._view,r=(o.startAngle+o.endAngle)/2,n=(o.innerRadius+o.outerRadius)/2;return{x:o.x+Math.cos(r)*n,y:o.y+Math.sin(r)*n}},getArea:function(){var o=this._view;return Math.PI*((o.endAngle-o.startAngle)/(2*Math.PI))*(Math.pow(o.outerRadius,2)-Math.pow(o.innerRadius,2))},tooltipPosition:function(){var o=this._view,r=o.startAngle+(o.endAngle-o.startAngle)/2,n=(o.outerRadius-o.innerRadius)/2+o.innerRadius;return{x:o.x+Math.cos(r)*n,y:o.y+Math.sin(r)*n}},draw:function(){var o=this._chart.ctx,r=this._view,n=r.startAngle,e=r.endAngle;o.beginPath(),o.arc(r.x,r.y,r.outerRadius,n,e),o.arc(r.x,r.y,r.innerRadius,e,n,!0),o.closePath(),o.strokeStyle=r.borderColor,o.lineWidth=r.borderWidth,o.fillStyle=r.backgroundColor,o.fill(),o.lineJoin="bevel",r.borderWidth&&o.stroke()}})},li=function(l){var t=l.helpers,u=l.defaults.global;l.defaults.global.elements.line={tension:.4,backgroundColor:u.defaultColor,borderWidth:3,borderColor:u.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},l.elements.Line=l.Element.extend({draw:function(){var o=this,r=o._view,n=o._chart.ctx,e=r.spanGaps,a=o._children.slice(),s=u.elements.line,i=-1,f,d,h,c;for(o._loop&&a.length&&a.push(a[0]),n.save(),n.lineCap=r.borderCapStyle||s.borderCapStyle,n.setLineDash&&n.setLineDash(r.borderDash||s.borderDash),n.lineDashOffset=r.borderDashOffset||s.borderDashOffset,n.lineJoin=r.borderJoinStyle||s.borderJoinStyle,n.lineWidth=r.borderWidth||s.borderWidth,n.strokeStyle=r.borderColor||u.defaultColor,n.beginPath(),i=-1,f=0;f<a.length;++f)d=a[f],h=t.previousItem(a,f),c=d._view,f===0?c.skip||(n.moveTo(c.x,c.y),i=f):(h=i===-1?h:a[i],c.skip||(i!==f-1&&!e||i===-1?n.moveTo(c.x,c.y):t.canvas.lineTo(n,h._view,d._view),i=f));n.stroke(),n.restore()}})},si=function(l){var t=l.helpers,u=l.defaults.global,o=u.defaultColor;u.elements.point={radius:3,pointStyle:"circle",backgroundColor:o,borderWidth:1,borderColor:o,hitRadius:1,hoverRadius:4,hoverBorderWidth:1};function r(e){var a=this._view;return a?Math.pow(e-a.x,2)<Math.pow(a.radius+a.hitRadius,2):!1}function n(e){var a=this._view;return a?Math.pow(e-a.y,2)<Math.pow(a.radius+a.hitRadius,2):!1}l.elements.Point=l.Element.extend({inRange:function(e,a){var s=this._view;return s?Math.pow(e-s.x,2)+Math.pow(a-s.y,2)<Math.pow(s.hitRadius+s.radius,2):!1},inLabelRange:r,inXRange:r,inYRange:n,getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var a=this._view,s=this._model,i=this._chart.ctx,f=a.pointStyle,d=a.radius,h=a.x,c=a.y,v=l.helpers.color,g=1.01,p=0;a.skip||(i.strokeStyle=a.borderColor||o,i.lineWidth=t.getValueOrDefault(a.borderWidth,u.elements.point.borderWidth),i.fillStyle=a.backgroundColor||o,e!==void 0&&(s.x<e.left||e.right*g<s.x||s.y<e.top||e.bottom*g<s.y)&&(s.x<e.left?p=(h-s.x)/(e.left-s.x):e.right*g<s.x?p=(s.x-h)/(s.x-e.right):s.y<e.top?p=(c-s.y)/(e.top-s.y):e.bottom*g<s.y&&(p=(s.y-c)/(s.y-e.bottom)),p=Math.round(p*100)/100,i.strokeStyle=v(i.strokeStyle).alpha(p).rgbString(),i.fillStyle=v(i.fillStyle).alpha(p).rgbString()),l.canvasHelpers.drawPoint(i,f,d,h,c))}})},ui=function(l){var t=l.defaults.global;t.elements.rectangle={backgroundColor:t.defaultColor,borderWidth:0,borderColor:t.defaultColor,borderSkipped:"bottom"};function u(r){return r._view.width!==void 0}function o(r){var n=r._view,e,a,s,i;if(u(r)){var f=n.width/2;e=n.x-f,a=n.x+f,s=Math.min(n.y,n.base),i=Math.max(n.y,n.base)}else{var d=n.height/2;e=Math.min(n.x,n.base),a=Math.max(n.x,n.base),s=n.y-d,i=n.y+d}return{left:e,top:s,right:a,bottom:i}}l.elements.Rectangle=l.Element.extend({draw:function(){var r=this._chart.ctx,n=this._view,e,a,s,i,f,d,h,c=n.borderWidth;if(n.horizontal?(e=n.base,a=n.x,s=n.y-n.height/2,i=n.y+n.height/2,f=a>e?1:-1,d=1,h=n.borderSkipped||"left"):(e=n.x-n.width/2,a=n.x+n.width/2,s=n.y,i=n.base,f=1,d=i>s?1:-1,h=n.borderSkipped||"bottom"),c){var v=Math.min(Math.abs(e-a),Math.abs(s-i));c=c>v?v:c;var g=c/2,p=e+(h!=="left"?g*f:0),m=a+(h!=="right"?-g*f:0),b=s+(h!=="top"?g*d:0),k=i+(h!=="bottom"?-g*d:0);p!==m&&(s=b,i=k),b!==k&&(e=p,a=m)}r.beginPath(),r.fillStyle=n.backgroundColor,r.strokeStyle=n.borderColor,r.lineWidth=c;var w=[[e,i],[e,s],[a,s],[a,i]],C=["bottom","left","top","right"],A=C.indexOf(h,0);A===-1&&(A=0);function P(B){return w[(A+B)%4]}var x=P(0);r.moveTo(x[0],x[1]);for(var V=1;V<4;V++)x=P(V),r.lineTo(x[0],x[1]);r.fill(),c&&r.stroke()},height:function(){var r=this._view;return r.base-r.y},inRange:function(r,n){var e=!1;if(this._view){var a=o(this);e=r>=a.left&&r<=a.right&&n>=a.top&&n<=a.bottom}return e},inLabelRange:function(r,n){var e=this;if(!e._view)return!1;var a=!1,s=o(e);return u(e)?a=r>=s.left&&r<=s.right:a=n>=s.top&&n<=s.bottom,a},inXRange:function(r){var n=o(this);return r>=n.left&&r<=n.right},inYRange:function(r){var n=o(this);return r>=n.top&&r<=n.bottom},getCenterPoint:function(){var r=this._view,n,e;return u(this)?(n=r.x,e=(r.y+r.base)/2):(n=(r.x+r.base)/2,e=r.y),{x:n,y:e}},getArea:function(){var r=this._view;return r.width*Math.abs(r.y-r.base)},tooltipPosition:function(){var r=this._view;return{x:r.x,y:r.y}}})},fi=function(l){var t=l.helpers,u=t.noop;l.LinearScaleBase=l.Scale.extend({handleTickRangeOptions:function(){var o=this,r=o.options,n=r.ticks;if(n.beginAtZero){var e=t.sign(o.min),a=t.sign(o.max);e<0&&a<0?o.max=0:e>0&&a>0&&(o.min=0)}n.min!==void 0?o.min=n.min:n.suggestedMin!==void 0&&(o.min===null?o.min=n.suggestedMin:o.min=Math.min(o.min,n.suggestedMin)),n.max!==void 0?o.max=n.max:n.suggestedMax!==void 0&&(o.max===null?o.max=n.suggestedMax:o.max=Math.max(o.max,n.suggestedMax)),o.min===o.max&&(o.max++,n.beginAtZero||o.min--)},getTickLimit:u,handleDirectionalChanges:u,buildTicks:function(){var o=this,r=o.options,n=r.ticks,e=o.getTickLimit();e=Math.max(2,e);var a={maxTicks:e,min:n.min,max:n.max,stepSize:t.getValueOrDefault(n.fixedStepSize,n.stepSize)},s=o.ticks=l.Ticks.generators.linear(a,o);o.handleDirectionalChanges(),o.max=t.max(s),o.min=t.min(s),n.reverse?(s.reverse(),o.start=o.max,o.end=o.min):(o.start=o.min,o.end=o.max)},convertTicksToLabels:function(){var o=this;o.ticksAsNumbers=o.ticks.slice(),o.zeroLineIndex=o.ticks.indexOf(0),l.Scale.prototype.convertTicksToLabels.call(o)}})},di=function(l){var t=l.helpers,u={position:"bottom"},o=l.Scale.extend({getLabels:function(){var r=this.chart.data;return(this.isHorizontal()?r.xLabels:r.yLabels)||r.labels},determineDataLimits:function(){var r=this,n=r.getLabels();r.minIndex=0,r.maxIndex=n.length-1;var e;r.options.ticks.min!==void 0&&(e=t.indexOf(n,r.options.ticks.min),r.minIndex=e!==-1?e:r.minIndex),r.options.ticks.max!==void 0&&(e=t.indexOf(n,r.options.ticks.max),r.maxIndex=e!==-1?e:r.maxIndex),r.min=n[r.minIndex],r.max=n[r.maxIndex]},buildTicks:function(){var r=this,n=r.getLabels();r.ticks=r.minIndex===0&&r.maxIndex===n.length-1?n:n.slice(r.minIndex,r.maxIndex+1)},getLabelForIndex:function(r,n){var e=this,a=e.chart.data,s=e.isHorizontal();return a.yLabels&&!s?e.getRightValue(a.datasets[n].data[r]):e.ticks[r-e.minIndex]},getPixelForValue:function(r,n,e,a){var s=this,i=Math.max(s.maxIndex+1-s.minIndex-(s.options.gridLines.offsetGridLines?0:1),1),f;if(r!=null&&(f=s.isHorizontal()?r.x:r.y),f!==void 0||r!==void 0&&isNaN(n)){var d=s.getLabels();r=f||r;var h=d.indexOf(r);n=h!==-1?h:n}if(s.isHorizontal()){var c=s.width/i,v=c*(n-s.minIndex);return(s.options.gridLines.offsetGridLines&&a||s.maxIndex===s.minIndex&&a)&&(v+=c/2),s.left+Math.round(v)}var g=s.height/i,p=g*(n-s.minIndex);return s.options.gridLines.offsetGridLines&&a&&(p+=g/2),s.top+Math.round(p)},getPixelForTick:function(r,n){return this.getPixelForValue(this.ticks[r],r+this.minIndex,null,n)},getValueForPixel:function(r){var n=this,e,a=Math.max(n.ticks.length-(n.options.gridLines.offsetGridLines?0:1),1),s=n.isHorizontal(),i=(s?n.width:n.height)/a;return r-=s?n.left:n.top,n.options.gridLines.offsetGridLines&&(r-=i/2),r<=0?e=0:e=Math.round(r/i),e},getBasePixel:function(){return this.bottom}});l.scaleService.registerScaleType("category",o,u)},ci=function(l){var t=l.helpers,u={position:"left",ticks:{callback:l.Ticks.formatters.linear}},o=l.LinearScaleBase.extend({determineDataLimits:function(){var r=this,n=r.options,e=r.chart,a=e.data,s=a.datasets,i=r.isHorizontal(),f=0,d=1;function h(g){return i?g.xAxisID===r.id:g.yAxisID===r.id}r.min=null,r.max=null;var c=n.stacked;if(c===void 0&&t.each(s,function(g,p){if(!c){var m=e.getDatasetMeta(p);e.isDatasetVisible(p)&&h(m)&&m.stack!==void 0&&(c=!0)}}),n.stacked||c){var v={};t.each(s,function(g,p){var m=e.getDatasetMeta(p),b=[m.type,n.stacked===void 0&&m.stack===void 0?p:"",m.stack].join(".");v[b]===void 0&&(v[b]={positiveValues:[],negativeValues:[]});var k=v[b].positiveValues,w=v[b].negativeValues;e.isDatasetVisible(p)&&h(m)&&t.each(g.data,function(C,A){var P=+r.getRightValue(C);isNaN(P)||m.data[A].hidden||(k[A]=k[A]||0,w[A]=w[A]||0,n.relativePoints?k[A]=100:P<0?w[A]+=P:k[A]+=P)})}),t.each(v,function(g){var p=g.positiveValues.concat(g.negativeValues),m=t.min(p),b=t.max(p);r.min=r.min===null?m:Math.min(r.min,m),r.max=r.max===null?b:Math.max(r.max,b)})}else t.each(s,function(g,p){var m=e.getDatasetMeta(p);e.isDatasetVisible(p)&&h(m)&&t.each(g.data,function(b,k){var w=+r.getRightValue(b);isNaN(w)||m.data[k].hidden||((r.min===null||w<r.min)&&(r.min=w),(r.max===null||w>r.max)&&(r.max=w))})});r.min=isFinite(r.min)?r.min:f,r.max=isFinite(r.max)?r.max:d,this.handleTickRangeOptions()},getTickLimit:function(){var r,n=this,e=n.options.ticks;if(n.isHorizontal())r=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(n.width/50));else{var a=t.getValueOrDefault(e.fontSize,l.defaults.global.defaultFontSize);r=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(n.height/(2*a)))}return r},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(r,n){return+this.getRightValue(this.chart.data.datasets[n].data[r])},getPixelForValue:function(r){var n=this,e=n.start,a=+n.getRightValue(r),s,i=n.end-e;return n.isHorizontal()?(s=n.left+n.width/i*(a-e),Math.round(s)):(s=n.bottom-n.height/i*(a-e),Math.round(s))},getValueForPixel:function(r){var n=this,e=n.isHorizontal(),a=e?n.width:n.height,s=(e?r-n.left:n.bottom-r)/a;return n.start+(n.end-n.start)*s},getPixelForTick:function(r){return this.getPixelForValue(this.ticksAsNumbers[r])}});l.scaleService.registerScaleType("linear",o,u)},hi=function(l){var t=l.helpers,u={position:"left",ticks:{callback:l.Ticks.formatters.logarithmic}},o=l.Scale.extend({determineDataLimits:function(){var r=this,n=r.options,e=n.ticks,a=r.chart,s=a.data,i=s.datasets,f=t.getValueOrDefault,d=r.isHorizontal();function h(g){return d?g.xAxisID===r.id:g.yAxisID===r.id}r.min=null,r.max=null,r.minNotZero=null;var c=n.stacked;if(c===void 0&&t.each(i,function(g,p){if(!c){var m=a.getDatasetMeta(p);a.isDatasetVisible(p)&&h(m)&&m.stack!==void 0&&(c=!0)}}),n.stacked||c){var v={};t.each(i,function(g,p){var m=a.getDatasetMeta(p),b=[m.type,n.stacked===void 0&&m.stack===void 0?p:"",m.stack].join(".");a.isDatasetVisible(p)&&h(m)&&(v[b]===void 0&&(v[b]=[]),t.each(g.data,function(k,w){var C=v[b],A=+r.getRightValue(k);isNaN(A)||m.data[w].hidden||(C[w]=C[w]||0,n.relativePoints?C[w]=100:C[w]+=A)}))}),t.each(v,function(g){var p=t.min(g),m=t.max(g);r.min=r.min===null?p:Math.min(r.min,p),r.max=r.max===null?m:Math.max(r.max,m)})}else t.each(i,function(g,p){var m=a.getDatasetMeta(p);a.isDatasetVisible(p)&&h(m)&&t.each(g.data,function(b,k){var w=+r.getRightValue(b);isNaN(w)||m.data[k].hidden||((r.min===null||w<r.min)&&(r.min=w),(r.max===null||w>r.max)&&(r.max=w),w!==0&&(r.minNotZero===null||w<r.minNotZero)&&(r.minNotZero=w))})});r.min=f(e.min,r.min),r.max=f(e.max,r.max),r.min===r.max&&(r.min!==0&&r.min!==null?(r.min=Math.pow(10,Math.floor(t.log10(r.min))-1),r.max=Math.pow(10,Math.floor(t.log10(r.max))+1)):(r.min=1,r.max=10))},buildTicks:function(){var r=this,n=r.options,e=n.ticks,a={min:e.min,max:e.max},s=r.ticks=l.Ticks.generators.logarithmic(a,r);r.isHorizontal()||s.reverse(),r.max=t.max(s),r.min=t.min(s),e.reverse?(s.reverse(),r.start=r.max,r.end=r.min):(r.start=r.min,r.end=r.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),l.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(r,n){return+this.getRightValue(this.chart.data.datasets[n].data[r])},getPixelForTick:function(r){return this.getPixelForValue(this.tickValues[r])},getPixelForValue:function(r){var n=this,e,a,s=n.start,i=+n.getRightValue(r),f,d=n.options,h=d.ticks;return n.isHorizontal()?(f=t.log10(n.end)-t.log10(s),i===0?a=n.left:(e=n.width,a=n.left+e/f*(t.log10(i)-t.log10(s)))):(e=n.height,s===0&&!h.reverse?(f=t.log10(n.end)-t.log10(n.minNotZero),i===s?a=n.bottom:i===n.minNotZero?a=n.bottom-e*.02:a=n.bottom-e*.02-e*.98/f*(t.log10(i)-t.log10(n.minNotZero))):n.end===0&&h.reverse?(f=t.log10(n.start)-t.log10(n.minNotZero),i===n.end?a=n.top:i===n.minNotZero?a=n.top+e*.02:a=n.top+e*.02+e*.98/f*(t.log10(i)-t.log10(n.minNotZero))):i===0?a=h.reverse?n.top:n.bottom:(f=t.log10(n.end)-t.log10(s),e=n.height,a=n.bottom-e/f*(t.log10(i)-t.log10(s)))),a},getValueForPixel:function(r){var n=this,e=t.log10(n.end)-t.log10(n.start),a,s;return n.isHorizontal()?(s=n.width,a=n.start*Math.pow(10,(r-n.left)*e/s)):(s=n.height,a=Math.pow(10,(n.bottom-r)*e/s)/n.start),a}});l.scaleService.registerScaleType("logarithmic",o,u)},vi=function(l){var t=l.helpers,u=l.defaults.global,o={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:l.Ticks.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(m){return m}}};function r(m){var b=m.options;return b.angleLines.display||b.pointLabels.display?m.chart.data.labels.length:0}function n(m){var b=m.options.pointLabels,k=t.getValueOrDefault(b.fontSize,u.defaultFontSize),w=t.getValueOrDefault(b.fontStyle,u.defaultFontStyle),C=t.getValueOrDefault(b.fontFamily,u.defaultFontFamily),A=t.fontString(k,w,C);return{size:k,style:w,family:C,font:A}}function e(m,b,k){return t.isArray(k)?{w:t.longestText(m,m.font,k),h:k.length*b+(k.length-1)*1.5*b}:{w:m.measureText(k).width,h:b}}function a(m,b,k,w,C){return m===w||m===C?{start:b-k/2,end:b+k/2}:m<w||m>C?{start:b-k-5,end:b}:{start:b,end:b+k+5}}function s(m){var b=n(m),k=Math.min(m.height/2,m.width/2),w={r:m.width,l:0,t:m.height,b:0},C={},A,P,x;m.ctx.font=b.font,m._pointLabelSizes=[];var V=r(m);for(A=0;A<V;A++){x=m.getPointPosition(A,k),P=e(m.ctx,b.size,m.pointLabels[A]||""),m._pointLabelSizes[A]=P;var B=m.getIndexAngle(A),R=t.toDegrees(B)%360,T=a(R,x.x,P.w,0,180),H=a(R,x.y,P.h,90,270);T.start<w.l&&(w.l=T.start,C.l=B),T.end>w.r&&(w.r=T.end,C.r=B),H.start<w.t&&(w.t=H.start,C.t=B),H.end>w.b&&(w.b=H.end,C.b=B)}m.setReductions(k,w,C)}function i(m){var b=Math.min(m.height/2,m.width/2);m.drawingArea=Math.round(b),m.setCenterPoint(0,0,0,0)}function f(m){return m===0||m===180?"center":m<180?"left":"right"}function d(m,b,k,w){if(t.isArray(b))for(var C=k.y,A=1.5*w,P=0;P<b.length;++P)m.fillText(b[P],k.x,C),C+=A;else m.fillText(b,k.x,k.y)}function h(m,b,k){m===90||m===270?k.y-=b.h/2:(m>270||m<90)&&(k.y-=b.h)}function c(m){var b=m.ctx,k=t.getValueOrDefault,w=m.options,C=w.angleLines,A=w.pointLabels;b.lineWidth=C.lineWidth,b.strokeStyle=C.color;var P=m.getDistanceFromCenterForValue(w.reverse?m.min:m.max),x=n(m);b.textBaseline="top";for(var V=r(m)-1;V>=0;V--){if(C.display){var B=m.getPointPosition(V,P);b.beginPath(),b.moveTo(m.xCenter,m.yCenter),b.lineTo(B.x,B.y),b.stroke(),b.closePath()}if(A.display){var R=m.getPointPosition(V,P+5),T=k(A.fontColor,u.defaultFontColor);b.font=x.font,b.fillStyle=T;var H=m.getIndexAngle(V),W=t.toDegrees(H);b.textAlign=f(W),h(W,m._pointLabelSizes[V],R),d(b,m.pointLabels[V]||"",R,x.size)}}}function v(m,b,k,w){var C=m.ctx;if(C.strokeStyle=t.getValueAtIndexOrDefault(b.color,w-1),C.lineWidth=t.getValueAtIndexOrDefault(b.lineWidth,w-1),m.options.gridLines.circular)C.beginPath(),C.arc(m.xCenter,m.yCenter,k,0,Math.PI*2),C.closePath(),C.stroke();else{var A=r(m);if(A===0)return;C.beginPath();var P=m.getPointPosition(0,k);C.moveTo(P.x,P.y);for(var x=1;x<A;x++)P=m.getPointPosition(x,k),C.lineTo(P.x,P.y);C.closePath(),C.stroke()}}function g(m){return t.isNumber(m)?m:0}var p=l.LinearScaleBase.extend({setDimensions:function(){var m=this,b=m.options,k=b.ticks;m.width=m.maxWidth,m.height=m.maxHeight,m.xCenter=Math.round(m.width/2),m.yCenter=Math.round(m.height/2);var w=t.min([m.height,m.width]),C=t.getValueOrDefault(k.fontSize,u.defaultFontSize);m.drawingArea=b.display?w/2-(C/2+k.backdropPaddingY):w/2},determineDataLimits:function(){var m=this,b=m.chart,k=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY;t.each(b.data.datasets,function(C,A){if(b.isDatasetVisible(A)){var P=b.getDatasetMeta(A);t.each(C.data,function(x,V){var B=+m.getRightValue(x);isNaN(B)||P.data[V].hidden||(k=Math.min(B,k),w=Math.max(B,w))})}}),m.min=k===Number.POSITIVE_INFINITY?0:k,m.max=w===Number.NEGATIVE_INFINITY?0:w,m.handleTickRangeOptions()},getTickLimit:function(){var m=this.options.ticks,b=t.getValueOrDefault(m.fontSize,u.defaultFontSize);return Math.min(m.maxTicksLimit?m.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*b)))},convertTicksToLabels:function(){var m=this;l.LinearScaleBase.prototype.convertTicksToLabels.call(m),m.pointLabels=m.chart.data.labels.map(m.options.pointLabels.callback,m)},getLabelForIndex:function(m,b){return+this.getRightValue(this.chart.data.datasets[b].data[m])},fit:function(){this.options.pointLabels.display?s(this):i(this)},setReductions:function(m,b,k){var w=this,C=b.l/Math.sin(k.l),A=Math.max(b.r-w.width,0)/Math.sin(k.r),P=-b.t/Math.cos(k.t),x=-Math.max(b.b-w.height,0)/Math.cos(k.b);C=g(C),A=g(A),P=g(P),x=g(x),w.drawingArea=Math.min(Math.round(m-(C+A)/2),Math.round(m-(P+x)/2)),w.setCenterPoint(C,A,P,x)},setCenterPoint:function(m,b,k,w){var C=this,A=C.width-b-C.drawingArea,P=m+C.drawingArea,x=k+C.drawingArea,V=C.height-w-C.drawingArea;C.xCenter=Math.round((P+A)/2+C.left),C.yCenter=Math.round((x+V)/2+C.top)},getIndexAngle:function(m){var b=Math.PI*2/r(this),k=this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0,w=k*Math.PI*2/360;return m*b+w},getDistanceFromCenterForValue:function(m){var b=this;if(m===null)return 0;var k=b.drawingArea/(b.max-b.min);return b.options.reverse?(b.max-m)*k:(m-b.min)*k},getPointPosition:function(m,b){var k=this,w=k.getIndexAngle(m)-Math.PI/2;return{x:Math.round(Math.cos(w)*b)+k.xCenter,y:Math.round(Math.sin(w)*b)+k.yCenter}},getPointPositionForValue:function(m,b){return this.getPointPosition(m,this.getDistanceFromCenterForValue(b))},getBasePosition:function(){var m=this,b=m.min,k=m.max;return m.getPointPositionForValue(0,m.beginAtZero?0:b<0&&k<0?k:b>0&&k>0?b:0)},draw:function(){var m=this,b=m.options,k=b.gridLines,w=b.ticks,C=t.getValueOrDefault;if(b.display){var A=m.ctx,P=C(w.fontSize,u.defaultFontSize),x=C(w.fontStyle,u.defaultFontStyle),V=C(w.fontFamily,u.defaultFontFamily),B=t.fontString(P,x,V);t.each(m.ticks,function(R,T){if(T>0||b.reverse){var H=m.getDistanceFromCenterForValue(m.ticksAsNumbers[T]),W=m.yCenter-H;if(k.display&&T!==0&&v(m,k,H,T),w.display){var Y=C(w.fontColor,u.defaultFontColor);if(A.font=B,w.showLabelBackdrop){var E=A.measureText(R).width;A.fillStyle=w.backdropColor,A.fillRect(m.xCenter-E/2-w.backdropPaddingX,W-P/2-w.backdropPaddingY,E+w.backdropPaddingX*2,P+w.backdropPaddingY*2)}A.textAlign="center",A.textBaseline="middle",A.fillStyle=Y,A.fillText(R,m.xCenter,W)}}}),(b.angleLines.display||b.pointLabels.display)&&c(m)}}});l.scaleService.registerScaleType("radialLinear",p,o)};const gi=Wr(Hr);var Re=gi;Re=typeof Re=="function"?Re:window.moment;var mi=function(l){var t=l.helpers,u={millisecond:{size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{size:1e3,steps:[1,2,5,10,30]},minute:{size:6e4,steps:[1,2,5,10,30]},hour:{size:36e5,steps:[1,2,3,6,12]},day:{size:864e5,steps:[1,2,5]},week:{size:6048e5,maxStep:4},month:{size:2628e6,maxStep:3},quarter:{size:7884e6,maxStep:4},year:{size:3154e7,maxStep:!1}},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}};function r(i,f){var d=i.options.time;if(typeof d.parser=="string")return Re(f,d.parser);if(typeof d.parser=="function")return d.parser(f);if(typeof f.getMonth=="function"||typeof f=="number")return Re(f);if(f.isValid&&f.isValid())return f;var h=d.format;return typeof h!="string"&&h.call?(console.warn("options.time.format is deprecated and replaced by options.time.parser."),h(f)):Re(f,h)}function n(i,f,d,h){for(var c=Object.keys(u),v,g=c.length,p=c.indexOf(i);p<g;p++){v=c[p];var m=u[v],b=m.steps&&m.steps[m.steps.length-1]||m.maxStep;if(b===void 0||Math.ceil((d-f)/(b*m.size))<=h)break}return v}function e(i,f,d,h){var c=u[d],v=c.size,g=Math.ceil((f-i)/v),p=1,m=f-i;if(c.steps)for(var b=c.steps.length,k=0;k<b&&g>h;k++)p=c.steps[k],g=Math.ceil(m/(v*p));else for(;g>h&&h>0;)++p,g=Math.ceil(m/(v*p));return p}function a(i,f,d){var h=[];if(i.maxTicks){var c=i.stepSize;h.push(i.min!==void 0?i.min:d.min);for(var v=Re(d.min);v.add(c,i.unit).valueOf()<d.max;)h.push(v.valueOf());var g=i.max||d.max;h[h.length-1]!==g&&h.push(g)}return h}l.Ticks.generators.time=function(i,f){var d,h,c=i.isoWeekday;return i.unit==="week"&&c!==!1?(d=Re(f.min).startOf("isoWeek").isoWeekday(c).valueOf(),h=Re(f.max).startOf("isoWeek").isoWeekday(c),f.max-h>0&&h.add(1,"week"),h=h.valueOf()):(d=Re(f.min).startOf(i.unit).valueOf(),h=Re(f.max).startOf(i.unit),f.max-h>0&&h.add(1,i.unit),h=h.valueOf()),a(i,f,{min:d,max:h})};var s=l.Scale.extend({initialize:function(){if(!Re)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");l.Scale.prototype.initialize.call(this)},determineDataLimits:function(){var i=this,f=i.options.time,d=Number.MAX_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER,c=i.chart.data,v={labels:[],datasets:[]},g;t.each(c.labels,function(p,m){var b=r(i,p);b.isValid()&&(f.round&&b.startOf(f.round),g=b.valueOf(),d=Math.min(g,d),h=Math.max(g,h),v.labels[m]=g)}),t.each(c.datasets,function(p,m){var b=[];typeof p.data[0]=="object"&&p.data[0]!==null&&i.chart.isDatasetVisible(m)?t.each(p.data,function(k,w){var C=r(i,i.getRightValue(k));C.isValid()&&(f.round&&C.startOf(f.round),g=C.valueOf(),d=Math.min(g,d),h=Math.max(g,h),b[w]=g)}):b=v.labels.slice(),v.datasets[m]=b}),i.dataMin=d,i.dataMax=h,i._parsedData=v},buildTicks:function(){var i=this,f=i.options.time,d,h,c=i.dataMin,v=i.dataMax;if(f.min){var g=r(i,f.min);f.round&&g.round(f.round),d=g.valueOf()}f.max&&(h=r(i,f.max).valueOf());var p=i.getLabelCapacity(d||c),m=f.unit||n(f.minUnit,d||c,h||v,p);i.displayFormat=f.displayFormats[m];var b=f.stepSize||e(d||c,h||v,m,p);i.ticks=l.Ticks.generators.time({maxTicks:p,min:d,max:h,stepSize:b,unit:m,isoWeekday:f.isoWeekday},{min:c,max:v}),i.max=t.max(i.ticks),i.min=t.min(i.ticks)},getLabelForIndex:function(i,f){var d=this,h=d.chart.data.labels&&i<d.chart.data.labels.length?d.chart.data.labels[i]:"",c=d.chart.data.datasets[f].data[i];return c!==null&&typeof c=="object"&&(h=d.getRightValue(c)),d.options.time.tooltipFormat&&(h=r(d,h).format(d.options.time.tooltipFormat)),h},tickFormatFunction:function(i,f,d){var h=i.format(this.displayFormat),c=this.options.ticks,v=t.getValueOrDefault(c.callback,c.userCallback);return v?v(h,f,d):h},convertTicksToLabels:function(){var i=this;i.ticksAsTimestamps=i.ticks,i.ticks=i.ticks.map(function(f){return Re(f)}).map(i.tickFormatFunction,i)},getPixelForOffset:function(i){var f=this,d=f.max-f.min,h=d?(i-f.min)/d:0;if(f.isHorizontal()){var c=f.width*h;return f.left+Math.round(c)}var v=f.height*h;return f.top+Math.round(v)},getPixelForValue:function(i,f,d){var h=this,c=null;if(f!==void 0&&d!==void 0&&(c=h._parsedData.datasets[d][f]),c===null&&((!i||!i.isValid)&&(i=r(h,h.getRightValue(i))),i&&i.isValid&&i.isValid()&&(c=i.valueOf())),c!==null)return h.getPixelForOffset(c)},getPixelForTick:function(i){return this.getPixelForOffset(this.ticksAsTimestamps[i])},getValueForPixel:function(i){var f=this,d=f.isHorizontal()?f.width:f.height,h=(i-(f.isHorizontal()?f.left:f.top))/d;return Re(f.min+h*(f.max-f.min))},getLabelWidth:function(i){var f=this,d=f.options.ticks,h=f.ctx.measureText(i).width,c=Math.cos(t.toRadians(d.maxRotation)),v=Math.sin(t.toRadians(d.maxRotation)),g=t.getValueOrDefault(d.fontSize,l.defaults.global.defaultFontSize);return h*c+g*v},getLabelCapacity:function(i){var f=this;f.displayFormat=f.options.time.displayFormats.millisecond;var d=f.tickFormatFunction(Re(i),0,[]),h=f.getLabelWidth(d),c=f.isHorizontal()?f.width:f.height,v=c/h;return v}});l.scaleService.registerScaleType("time",s,o)},pi=function(l){var t=l.helpers;l.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}},l.controllers.bar=l.DatasetController.extend({dataElementType:l.elements.Rectangle,initialize:function(){var u=this,o;l.DatasetController.prototype.initialize.apply(u,arguments),o=u.getMeta(),o.stack=u.getDataset().stack,o.bar=!0},update:function(u){var o=this,r=o.getMeta().data,n,e;for(o._ruler=o.getRuler(),n=0,e=r.length;n<e;++n)o.updateElement(r[n],n,u)},updateElement:function(u,o,r){var n=this,e=n.chart,a=n.getMeta(),s=n.getDataset(),i=u.custom||{},f=e.options.elements.rectangle;u._xScale=n.getScaleForId(a.xAxisID),u._yScale=n.getScaleForId(a.yAxisID),u._datasetIndex=n.index,u._index=o,u._model={datasetLabel:s.label,label:e.data.labels[o],borderSkipped:i.borderSkipped?i.borderSkipped:f.borderSkipped,backgroundColor:i.backgroundColor?i.backgroundColor:t.getValueAtIndexOrDefault(s.backgroundColor,o,f.backgroundColor),borderColor:i.borderColor?i.borderColor:t.getValueAtIndexOrDefault(s.borderColor,o,f.borderColor),borderWidth:i.borderWidth?i.borderWidth:t.getValueAtIndexOrDefault(s.borderWidth,o,f.borderWidth)},n.updateElementGeometry(u,o,r),u.pivot()},updateElementGeometry:function(u,o,r){var n=this,e=u._model,a=n.getValueScale(),s=a.getBasePixel(),i=a.isHorizontal(),f=n._ruler||n.getRuler(),d=n.calculateBarValuePixels(n.index,o),h=n.calculateBarIndexPixels(n.index,o,f);e.horizontal=i,e.base=r?s:d.base,e.x=i?r?s:d.head:h.center,e.y=i?h.center:r?s:d.head,e.height=i?h.size:void 0,e.width=i?void 0:h.size},getValueScaleId:function(){return this.getMeta().yAxisID},getIndexScaleId:function(){return this.getMeta().xAxisID},getValueScale:function(){return this.getScaleForId(this.getValueScaleId())},getIndexScale:function(){return this.getScaleForId(this.getIndexScaleId())},getStackCount:function(u){var o=this,r=o.chart,n=o.getIndexScale(),e=n.options.stacked,a=u===void 0?r.data.datasets.length:u+1,s=[],i,f;for(i=0;i<a;++i)f=r.getDatasetMeta(i),f.bar&&r.isDatasetVisible(i)&&(e===!1||e===!0&&s.indexOf(f.stack)===-1||e===void 0&&(f.stack===void 0||s.indexOf(f.stack)===-1))&&s.push(f.stack);return s.length},getStackIndex:function(u){return this.getStackCount(u)-1},getRuler:function(){var u=this,o=u.getIndexScale(),r=o.options,n=u.getStackCount(),e=o.isHorizontal()?o.width:o.height,a=e/o.ticks.length,s=a*r.categoryPercentage,i=s/n,f=i*r.barPercentage;return f=Math.min(t.getValueOrDefault(r.barThickness,f),t.getValueOrDefault(r.maxBarThickness,1/0)),{stackCount:n,tickSize:a,categorySize:s,categorySpacing:a-s,fullBarSize:i,barSize:f,barSpacing:i-f,scale:o}},calculateBarValuePixels:function(u,o){var r=this,n=r.chart,e=r.getMeta(),a=r.getValueScale(),s=n.data.datasets,i=Number(s[u].data[o]),f=a.options.stacked,d=e.stack,h=0,c,v,g,p,m,b;if(f||f===void 0&&d!==void 0)for(c=0;c<u;++c)v=n.getDatasetMeta(c),v.bar&&v.stack===d&&v.controller.getValueScaleId()===a.id&&n.isDatasetVisible(c)&&(g=Number(s[c].data[o]),(i<0&&g<0||i>=0&&g>0)&&(h+=g));return p=a.getPixelForValue(h),m=a.getPixelForValue(h+i),b=(m-p)/2,{size:b,base:p,head:m,center:m+b/2}},calculateBarIndexPixels:function(u,o,r){var n=this,e=r.scale,a=n.chart.isCombo,s=n.getStackIndex(u),i=e.getPixelForValue(null,o,u,a),f=r.barSize;return i-=a?r.tickSize/2:0,i+=r.fullBarSize*s,i+=r.categorySpacing/2,i+=r.barSpacing/2,{size:f,base:i,head:i+f,center:i+f/2}},draw:function(){var u=this,o=u.chart,r=u.getMeta().data,n=u.getDataset(),e=r.length,a=0,s;for(t.canvas.clipArea(o.ctx,o.chartArea);a<e;++a)s=n.data[a],s!=null&&!isNaN(s)&&r[a].draw();t.canvas.unclipArea(o.ctx)},setHoverStyle:function(u){var o=this.chart.data.datasets[u._datasetIndex],r=u._index,n=u.custom||{},e=u._model;e.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:t.getValueAtIndexOrDefault(o.hoverBackgroundColor,r,t.getHoverColor(e.backgroundColor)),e.borderColor=n.hoverBorderColor?n.hoverBorderColor:t.getValueAtIndexOrDefault(o.hoverBorderColor,r,t.getHoverColor(e.borderColor)),e.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:t.getValueAtIndexOrDefault(o.hoverBorderWidth,r,e.borderWidth)},removeHoverStyle:function(u){var o=this.chart.data.datasets[u._datasetIndex],r=u._index,n=u.custom||{},e=u._model,a=this.chart.options.elements.rectangle;e.backgroundColor=n.backgroundColor?n.backgroundColor:t.getValueAtIndexOrDefault(o.backgroundColor,r,a.backgroundColor),e.borderColor=n.borderColor?n.borderColor:t.getValueAtIndexOrDefault(o.borderColor,r,a.borderColor),e.borderWidth=n.borderWidth?n.borderWidth:t.getValueAtIndexOrDefault(o.borderWidth,r,a.borderWidth)}}),l.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(u,o){var r="";return u.length>0&&(u[0].yLabel?r=u[0].yLabel:o.labels.length>0&&u[0].index<o.labels.length&&(r=o.labels[u[0].index])),r},label:function(u,o){var r=o.datasets[u.datasetIndex].label||"";return r+": "+u.xLabel}}}},l.controllers.horizontalBar=l.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})},bi=function(l){var t=l.helpers;l.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(u,o){var r=o.datasets[u.datasetIndex].label||"",n=o.datasets[u.datasetIndex].data[u.index];return r+": ("+u.xLabel+", "+u.yLabel+", "+n.r+")"}}}},l.controllers.bubble=l.DatasetController.extend({dataElementType:l.elements.Point,update:function(u){var o=this,r=o.getMeta(),n=r.data;t.each(n,function(e,a){o.updateElement(e,a,u)})},updateElement:function(u,o,r){var n=this,e=n.getMeta(),a=n.getScaleForId(e.xAxisID),s=n.getScaleForId(e.yAxisID),i=u.custom||{},f=n.getDataset(),d=f.data[o],h=n.chart.options.elements.point,c=n.index;t.extend(u,{_xScale:a,_yScale:s,_datasetIndex:c,_index:o,_model:{x:r?a.getPixelForDecimal(.5):a.getPixelForValue(typeof d=="object"?d:NaN,o,c,n.chart.isCombo),y:r?s.getBasePixel():s.getPixelForValue(d,o,c),radius:r?0:i.radius?i.radius:n.getRadius(d),hitRadius:i.hitRadius?i.hitRadius:t.getValueAtIndexOrDefault(f.hitRadius,o,h.hitRadius)}}),l.DatasetController.prototype.removeHoverStyle.call(n,u,h);var v=u._model;v.skip=i.skip?i.skip:isNaN(v.x)||isNaN(v.y),u.pivot()},getRadius:function(u){return u.r||this.chart.options.elements.point.radius},setHoverStyle:function(u){var o=this;l.DatasetController.prototype.setHoverStyle.call(o,u);var r=o.chart.data.datasets[u._datasetIndex],n=u._index,e=u.custom||{},a=u._model;a.radius=e.hoverRadius?e.hoverRadius:t.getValueAtIndexOrDefault(r.hoverRadius,n,o.chart.options.elements.point.hoverRadius)+o.getRadius(r.data[n])},removeHoverStyle:function(u){var o=this;l.DatasetController.prototype.removeHoverStyle.call(o,u,o.chart.options.elements.point);var r=o.chart.data.datasets[u._datasetIndex].data[u._index],n=u.custom||{},e=u._model;e.radius=n.radius?n.radius:o.getRadius(r)}})},_i=function(l){var t=l.helpers,u=l.defaults;u.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(o){var r=[];r.push('<ul class="'+o.id+'-legend">');var n=o.data,e=n.datasets,a=n.labels;if(e.length)for(var s=0;s<e[0].data.length;++s)r.push('<li><span style="background-color:'+e[0].backgroundColor[s]+'"></span>'),a[s]&&r.push(a[s]),r.push("</li>");return r.push("</ul>"),r.join("")},legend:{labels:{generateLabels:function(o){var r=o.data;return r.labels.length&&r.datasets.length?r.labels.map(function(n,e){var a=o.getDatasetMeta(0),s=r.datasets[0],i=a.data[e],f=i&&i.custom||{},d=t.getValueAtIndexOrDefault,h=o.options.elements.arc,c=f.backgroundColor?f.backgroundColor:d(s.backgroundColor,e,h.backgroundColor),v=f.borderColor?f.borderColor:d(s.borderColor,e,h.borderColor),g=f.borderWidth?f.borderWidth:d(s.borderWidth,e,h.borderWidth);return{text:n,fillStyle:c,strokeStyle:v,lineWidth:g,hidden:isNaN(s.data[e])||a.data[e].hidden,index:e}}):[]}},onClick:function(o,r){var n=r.index,e=this.chart,a,s,i;for(a=0,s=(e.data.datasets||[]).length;a<s;++a)i=e.getDatasetMeta(a),i.data[n]&&(i.data[n].hidden=!i.data[n].hidden);e.update()}},cutoutPercentage:50,rotation:Math.PI*-.5,circumference:Math.PI*2,tooltips:{callbacks:{title:function(){return""},label:function(o,r){var n=r.labels[o.index],e=": "+r.datasets[o.datasetIndex].data[o.index];return t.isArray(n)?(n=n.slice(),n[0]+=e):n+=e,n}}}},u.pie=t.clone(u.doughnut),t.extend(u.pie,{cutoutPercentage:0}),l.controllers.doughnut=l.controllers.pie=l.DatasetController.extend({dataElementType:l.elements.Arc,linkScales:t.noop,getRingIndex:function(o){for(var r=0,n=0;n<o;++n)this.chart.isDatasetVisible(n)&&++r;return r},update:function(o){var r=this,n=r.chart,e=n.chartArea,a=n.options,s=a.elements.arc,i=e.right-e.left-s.borderWidth,f=e.bottom-e.top-s.borderWidth,d=Math.min(i,f),h={x:0,y:0},c=r.getMeta(),v=a.cutoutPercentage,g=a.circumference;if(g<Math.PI*2){var p=a.rotation%(Math.PI*2);p+=Math.PI*2*(p>=Math.PI?-1:p<-Math.PI?1:0);var m=p+g,b={x:Math.cos(p),y:Math.sin(p)},k={x:Math.cos(m),y:Math.sin(m)},w=p<=0&&0<=m||p<=Math.PI*2&&Math.PI*2<=m,C=p<=Math.PI*.5&&Math.PI*.5<=m||p<=Math.PI*2.5&&Math.PI*2.5<=m,A=p<=-Math.PI&&-Math.PI<=m||p<=Math.PI&&Math.PI<=m,P=p<=-Math.PI*.5&&-Math.PI*.5<=m||p<=Math.PI*1.5&&Math.PI*1.5<=m,x=v/100,V={x:A?-1:Math.min(b.x*(b.x<0?1:x),k.x*(k.x<0?1:x)),y:P?-1:Math.min(b.y*(b.y<0?1:x),k.y*(k.y<0?1:x))},B={x:w?1:Math.max(b.x*(b.x>0?1:x),k.x*(k.x>0?1:x)),y:C?1:Math.max(b.y*(b.y>0?1:x),k.y*(k.y>0?1:x))},R={width:(B.x-V.x)*.5,height:(B.y-V.y)*.5};d=Math.min(i/R.width,f/R.height),h={x:(B.x+V.x)*-.5,y:(B.y+V.y)*-.5}}n.borderWidth=r.getMaxBorderWidth(c.data),n.outerRadius=Math.max((d-n.borderWidth)/2,0),n.innerRadius=Math.max(v?n.outerRadius/100*v:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=h.x*n.outerRadius,n.offsetY=h.y*n.outerRadius,c.total=r.calculateTotal(),r.outerRadius=n.outerRadius-n.radiusLength*r.getRingIndex(r.index),r.innerRadius=Math.max(r.outerRadius-n.radiusLength,0),t.each(c.data,function(T,H){r.updateElement(T,H,o)})},updateElement:function(o,r,n){var e=this,a=e.chart,s=a.chartArea,i=a.options,f=i.animation,d=(s.left+s.right)/2,h=(s.top+s.bottom)/2,c=i.rotation,v=i.rotation,g=e.getDataset(),p=n&&f.animateRotate||o.hidden?0:e.calculateCircumference(g.data[r])*(i.circumference/(2*Math.PI)),m=n&&f.animateScale?0:e.innerRadius,b=n&&f.animateScale?0:e.outerRadius,k=t.getValueAtIndexOrDefault;t.extend(o,{_datasetIndex:e.index,_index:r,_model:{x:d+a.offsetX,y:h+a.offsetY,startAngle:c,endAngle:v,circumference:p,outerRadius:b,innerRadius:m,label:k(g.label,r,a.data.labels[r])}});var w=o._model;this.removeHoverStyle(o),(!n||!f.animateRotate)&&(r===0?w.startAngle=i.rotation:w.startAngle=e.getMeta().data[r-1]._model.endAngle,w.endAngle=w.startAngle+w.circumference),o.pivot()},removeHoverStyle:function(o){l.DatasetController.prototype.removeHoverStyle.call(this,o,this.chart.options.elements.arc)},calculateTotal:function(){var o=this.getDataset(),r=this.getMeta(),n=0,e;return t.each(r.data,function(a,s){e=o.data[s],!isNaN(e)&&!a.hidden&&(n+=Math.abs(e))}),n},calculateCircumference:function(o){var r=this.getMeta().total;return r>0&&!isNaN(o)?Math.PI*2*(o/r):0},getMaxBorderWidth:function(o){for(var r=0,n=this.index,e=o.length,a,s,i=0;i<e;i++)a=o[i]._model?o[i]._model.borderWidth:0,s=o[i]._chart?o[i]._chart.config.data.datasets[n].hoverBorderWidth:0,r=a>r?a:r,r=s>r?s:r;return r}})},yi=function(l){var t=l.helpers;l.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}};function u(o,r){return t.getValueOrDefault(o.showLine,r.showLines)}l.controllers.line=l.DatasetController.extend({datasetElementType:l.elements.Line,dataElementType:l.elements.Point,update:function(o){var r=this,n=r.getMeta(),e=n.dataset,a=n.data||[],s=r.chart.options,i=s.elements.line,f=r.getScaleForId(n.yAxisID),d,h,c,v=r.getDataset(),g=u(v,s);for(g&&(c=e.custom||{},v.tension!==void 0&&v.lineTension===void 0&&(v.lineTension=v.tension),e._scale=f,e._datasetIndex=r.index,e._children=a,e._model={spanGaps:v.spanGaps?v.spanGaps:s.spanGaps,tension:c.tension?c.tension:t.getValueOrDefault(v.lineTension,i.tension),backgroundColor:c.backgroundColor?c.backgroundColor:v.backgroundColor||i.backgroundColor,borderWidth:c.borderWidth?c.borderWidth:v.borderWidth||i.borderWidth,borderColor:c.borderColor?c.borderColor:v.borderColor||i.borderColor,borderCapStyle:c.borderCapStyle?c.borderCapStyle:v.borderCapStyle||i.borderCapStyle,borderDash:c.borderDash?c.borderDash:v.borderDash||i.borderDash,borderDashOffset:c.borderDashOffset?c.borderDashOffset:v.borderDashOffset||i.borderDashOffset,borderJoinStyle:c.borderJoinStyle?c.borderJoinStyle:v.borderJoinStyle||i.borderJoinStyle,fill:c.fill?c.fill:v.fill!==void 0?v.fill:i.fill,steppedLine:c.steppedLine?c.steppedLine:t.getValueOrDefault(v.steppedLine,i.stepped),cubicInterpolationMode:c.cubicInterpolationMode?c.cubicInterpolationMode:t.getValueOrDefault(v.cubicInterpolationMode,i.cubicInterpolationMode)},e.pivot()),d=0,h=a.length;d<h;++d)r.updateElement(a[d],d,o);for(g&&e._model.tension!==0&&r.updateBezierControlPoints(),d=0,h=a.length;d<h;++d)a[d].pivot()},getPointBackgroundColor:function(o,r){var n=this.chart.options.elements.point.backgroundColor,e=this.getDataset(),a=o.custom||{};return a.backgroundColor?n=a.backgroundColor:e.pointBackgroundColor?n=t.getValueAtIndexOrDefault(e.pointBackgroundColor,r,n):e.backgroundColor&&(n=e.backgroundColor),n},getPointBorderColor:function(o,r){var n=this.chart.options.elements.point.borderColor,e=this.getDataset(),a=o.custom||{};return a.borderColor?n=a.borderColor:e.pointBorderColor?n=t.getValueAtIndexOrDefault(e.pointBorderColor,r,n):e.borderColor&&(n=e.borderColor),n},getPointBorderWidth:function(o,r){var n=this.chart.options.elements.point.borderWidth,e=this.getDataset(),a=o.custom||{};return isNaN(a.borderWidth)?isNaN(e.pointBorderWidth)?isNaN(e.borderWidth)||(n=e.borderWidth):n=t.getValueAtIndexOrDefault(e.pointBorderWidth,r,n):n=a.borderWidth,n},updateElement:function(o,r,n){var e=this,a=e.getMeta(),s=o.custom||{},i=e.getDataset(),f=e.index,d=i.data[r],h=e.getScaleForId(a.yAxisID),c=e.getScaleForId(a.xAxisID),v=e.chart.options.elements.point,g,p,m=e.chart.data.labels||[],b=m.length===1||i.data.length===1||e.chart.isCombo;i.radius!==void 0&&i.pointRadius===void 0&&(i.pointRadius=i.radius),i.hitRadius!==void 0&&i.pointHitRadius===void 0&&(i.pointHitRadius=i.hitRadius),g=c.getPixelForValue(typeof d=="object"?d:NaN,r,f,b),p=n?h.getBasePixel():e.calculatePointY(d,r,f),o._xScale=c,o._yScale=h,o._datasetIndex=f,o._index=r,o._model={x:g,y:p,skip:s.skip||isNaN(g)||isNaN(p),radius:s.radius||t.getValueAtIndexOrDefault(i.pointRadius,r,v.radius),pointStyle:s.pointStyle||t.getValueAtIndexOrDefault(i.pointStyle,r,v.pointStyle),backgroundColor:e.getPointBackgroundColor(o,r),borderColor:e.getPointBorderColor(o,r),borderWidth:e.getPointBorderWidth(o,r),tension:a.dataset._model?a.dataset._model.tension:0,steppedLine:a.dataset._model?a.dataset._model.steppedLine:!1,hitRadius:s.hitRadius||t.getValueAtIndexOrDefault(i.pointHitRadius,r,v.hitRadius)}},calculatePointY:function(o,r,n){var e=this,a=e.chart,s=e.getMeta(),i=e.getScaleForId(s.yAxisID),f=0,d=0,h,c,v;if(i.options.stacked){for(h=0;h<n;h++)if(c=a.data.datasets[h],v=a.getDatasetMeta(h),v.type==="line"&&v.yAxisID===i.id&&a.isDatasetVisible(h)){var g=Number(i.getRightValue(c.data[r]));g<0?d+=g||0:f+=g||0}var p=Number(i.getRightValue(o));return p<0?i.getPixelForValue(d+p):i.getPixelForValue(f+p)}return i.getPixelForValue(o)},updateBezierControlPoints:function(){var o=this,r=o.getMeta(),n=o.chart.chartArea,e=r.data||[],a,s,i,f,d;r.dataset._model.spanGaps&&(e=e.filter(function(c){return!c._model.skip}));function h(c,v,g){return Math.max(Math.min(c,g),v)}if(r.dataset._model.cubicInterpolationMode==="monotone")t.splineCurveMonotone(e);else for(a=0,s=e.length;a<s;++a)i=e[a],f=i._model,d=t.splineCurve(t.previousItem(e,a)._model,f,t.nextItem(e,a)._model,r.dataset._model.tension),f.controlPointPreviousX=d.previous.x,f.controlPointPreviousY=d.previous.y,f.controlPointNextX=d.next.x,f.controlPointNextY=d.next.y;if(o.chart.options.elements.line.capBezierPoints)for(a=0,s=e.length;a<s;++a)f=e[a]._model,f.controlPointPreviousX=h(f.controlPointPreviousX,n.left,n.right),f.controlPointPreviousY=h(f.controlPointPreviousY,n.top,n.bottom),f.controlPointNextX=h(f.controlPointNextX,n.left,n.right),f.controlPointNextY=h(f.controlPointNextY,n.top,n.bottom)},draw:function(){var o=this,r=o.chart,n=o.getMeta(),e=n.data||[],a=r.chartArea,s=e.length,i=0;for(l.canvasHelpers.clipArea(r.ctx,a),u(o.getDataset(),r.options)&&n.dataset.draw(),l.canvasHelpers.unclipArea(r.ctx);i<s;++i)e[i].draw(a)},setHoverStyle:function(o){var r=this.chart.data.datasets[o._datasetIndex],n=o._index,e=o.custom||{},a=o._model;a.radius=e.hoverRadius||t.getValueAtIndexOrDefault(r.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=e.hoverBackgroundColor||t.getValueAtIndexOrDefault(r.pointHoverBackgroundColor,n,t.getHoverColor(a.backgroundColor)),a.borderColor=e.hoverBorderColor||t.getValueAtIndexOrDefault(r.pointHoverBorderColor,n,t.getHoverColor(a.borderColor)),a.borderWidth=e.hoverBorderWidth||t.getValueAtIndexOrDefault(r.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(o){var r=this,n=r.chart.data.datasets[o._datasetIndex],e=o._index,a=o.custom||{},s=o._model;n.radius!==void 0&&n.pointRadius===void 0&&(n.pointRadius=n.radius),s.radius=a.radius||t.getValueAtIndexOrDefault(n.pointRadius,e,r.chart.options.elements.point.radius),s.backgroundColor=r.getPointBackgroundColor(o,e),s.borderColor=r.getPointBorderColor(o,e),s.borderWidth=r.getPointBorderWidth(o,e)}})},ki=function(l){var t=l.helpers;l.defaults.polarArea={scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(u){var o=[];o.push('<ul class="'+u.id+'-legend">');var r=u.data,n=r.datasets,e=r.labels;if(n.length)for(var a=0;a<n[0].data.length;++a)o.push('<li><span style="background-color:'+n[0].backgroundColor[a]+'"></span>'),e[a]&&o.push(e[a]),o.push("</li>");return o.push("</ul>"),o.join("")},legend:{labels:{generateLabels:function(u){var o=u.data;return o.labels.length&&o.datasets.length?o.labels.map(function(r,n){var e=u.getDatasetMeta(0),a=o.datasets[0],s=e.data[n],i=s.custom||{},f=t.getValueAtIndexOrDefault,d=u.options.elements.arc,h=i.backgroundColor?i.backgroundColor:f(a.backgroundColor,n,d.backgroundColor),c=i.borderColor?i.borderColor:f(a.borderColor,n,d.borderColor),v=i.borderWidth?i.borderWidth:f(a.borderWidth,n,d.borderWidth);return{text:r,fillStyle:h,strokeStyle:c,lineWidth:v,hidden:isNaN(a.data[n])||e.data[n].hidden,index:n}}):[]}},onClick:function(u,o){var r=o.index,n=this.chart,e,a,s;for(e=0,a=(n.data.datasets||[]).length;e<a;++e)s=n.getDatasetMeta(e),s.data[r].hidden=!s.data[r].hidden;n.update()}},tooltips:{callbacks:{title:function(){return""},label:function(u,o){return o.labels[u.index]+": "+u.yLabel}}}},l.controllers.polarArea=l.DatasetController.extend({dataElementType:l.elements.Arc,linkScales:t.noop,update:function(u){var o=this,r=o.chart,n=r.chartArea,e=o.getMeta(),a=r.options,s=a.elements.arc,i=Math.min(n.right-n.left,n.bottom-n.top);r.outerRadius=Math.max((i-s.borderWidth/2)/2,0),r.innerRadius=Math.max(a.cutoutPercentage?r.outerRadius/100*a.cutoutPercentage:1,0),r.radiusLength=(r.outerRadius-r.innerRadius)/r.getVisibleDatasetCount(),o.outerRadius=r.outerRadius-r.radiusLength*o.index,o.innerRadius=o.outerRadius-r.radiusLength,e.count=o.countVisibleElements(),t.each(e.data,function(f,d){o.updateElement(f,d,u)})},updateElement:function(u,o,r){for(var n=this,e=n.chart,a=n.getDataset(),s=e.options,i=s.animation,f=e.scale,d=t.getValueAtIndexOrDefault,h=e.data.labels,c=n.calculateCircumference(a.data[o]),v=f.xCenter,g=f.yCenter,p=0,m=n.getMeta(),b=0;b<o;++b)!isNaN(a.data[b])&&!m.data[b].hidden&&++p;var k=s.startAngle,w=u.hidden?0:f.getDistanceFromCenterForValue(a.data[o]),C=k+c*p,A=C+(u.hidden?0:c),P=i.animateScale?0:f.getDistanceFromCenterForValue(a.data[o]);t.extend(u,{_datasetIndex:n.index,_index:o,_scale:f,_model:{x:v,y:g,innerRadius:0,outerRadius:r?P:w,startAngle:r&&i.animateRotate?k:C,endAngle:r&&i.animateRotate?k:A,label:d(h,o,h[o])}}),n.removeHoverStyle(u),u.pivot()},removeHoverStyle:function(u){l.DatasetController.prototype.removeHoverStyle.call(this,u,this.chart.options.elements.arc)},countVisibleElements:function(){var u=this.getDataset(),o=this.getMeta(),r=0;return t.each(o.data,function(n,e){!isNaN(u.data[e])&&!n.hidden&&r++}),r},calculateCircumference:function(u){var o=this.getMeta().count;return o>0&&!isNaN(u)?2*Math.PI/o:0}})},wi=function(l){var t=l.helpers;l.defaults.radar={aspectRatio:1,scale:{type:"radialLinear"},elements:{line:{tension:0}}},l.controllers.radar=l.DatasetController.extend({datasetElementType:l.elements.Line,dataElementType:l.elements.Point,linkScales:t.noop,update:function(u){var o=this,r=o.getMeta(),n=r.dataset,e=r.data,a=n.custom||{},s=o.getDataset(),i=o.chart.options.elements.line,f=o.chart.scale;s.tension!==void 0&&s.lineTension===void 0&&(s.lineTension=s.tension),t.extend(r.dataset,{_datasetIndex:o.index,_scale:f,_children:e,_loop:!0,_model:{tension:a.tension?a.tension:t.getValueOrDefault(s.lineTension,i.tension),backgroundColor:a.backgroundColor?a.backgroundColor:s.backgroundColor||i.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:s.borderWidth||i.borderWidth,borderColor:a.borderColor?a.borderColor:s.borderColor||i.borderColor,fill:a.fill?a.fill:s.fill!==void 0?s.fill:i.fill,borderCapStyle:a.borderCapStyle?a.borderCapStyle:s.borderCapStyle||i.borderCapStyle,borderDash:a.borderDash?a.borderDash:s.borderDash||i.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:s.borderDashOffset||i.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:s.borderJoinStyle||i.borderJoinStyle}}),r.dataset.pivot(),t.each(e,function(d,h){o.updateElement(d,h,u)},o),o.updateBezierControlPoints()},updateElement:function(u,o,r){var n=this,e=u.custom||{},a=n.getDataset(),s=n.chart.scale,i=n.chart.options.elements.point,f=s.getPointPositionForValue(o,a.data[o]);a.radius!==void 0&&a.pointRadius===void 0&&(a.pointRadius=a.radius),a.hitRadius!==void 0&&a.pointHitRadius===void 0&&(a.pointHitRadius=a.hitRadius),t.extend(u,{_datasetIndex:n.index,_index:o,_scale:s,_model:{x:r?s.xCenter:f.x,y:r?s.yCenter:f.y,tension:e.tension?e.tension:t.getValueOrDefault(a.lineTension,n.chart.options.elements.line.tension),radius:e.radius?e.radius:t.getValueAtIndexOrDefault(a.pointRadius,o,i.radius),backgroundColor:e.backgroundColor?e.backgroundColor:t.getValueAtIndexOrDefault(a.pointBackgroundColor,o,i.backgroundColor),borderColor:e.borderColor?e.borderColor:t.getValueAtIndexOrDefault(a.pointBorderColor,o,i.borderColor),borderWidth:e.borderWidth?e.borderWidth:t.getValueAtIndexOrDefault(a.pointBorderWidth,o,i.borderWidth),pointStyle:e.pointStyle?e.pointStyle:t.getValueAtIndexOrDefault(a.pointStyle,o,i.pointStyle),hitRadius:e.hitRadius?e.hitRadius:t.getValueAtIndexOrDefault(a.pointHitRadius,o,i.hitRadius)}}),u._model.skip=e.skip?e.skip:isNaN(u._model.x)||isNaN(u._model.y)},updateBezierControlPoints:function(){var u=this.chart.chartArea,o=this.getMeta();t.each(o.data,function(r,n){var e=r._model,a=t.splineCurve(t.previousItem(o.data,n,!0)._model,e,t.nextItem(o.data,n,!0)._model,e.tension);e.controlPointPreviousX=Math.max(Math.min(a.previous.x,u.right),u.left),e.controlPointPreviousY=Math.max(Math.min(a.previous.y,u.bottom),u.top),e.controlPointNextX=Math.max(Math.min(a.next.x,u.right),u.left),e.controlPointNextY=Math.max(Math.min(a.next.y,u.bottom),u.top),r.pivot()})},setHoverStyle:function(u){var o=this.chart.data.datasets[u._datasetIndex],r=u.custom||{},n=u._index,e=u._model;e.radius=r.hoverRadius?r.hoverRadius:t.getValueAtIndexOrDefault(o.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),e.backgroundColor=r.hoverBackgroundColor?r.hoverBackgroundColor:t.getValueAtIndexOrDefault(o.pointHoverBackgroundColor,n,t.getHoverColor(e.backgroundColor)),e.borderColor=r.hoverBorderColor?r.hoverBorderColor:t.getValueAtIndexOrDefault(o.pointHoverBorderColor,n,t.getHoverColor(e.borderColor)),e.borderWidth=r.hoverBorderWidth?r.hoverBorderWidth:t.getValueAtIndexOrDefault(o.pointHoverBorderWidth,n,e.borderWidth)},removeHoverStyle:function(u){var o=this.chart.data.datasets[u._datasetIndex],r=u.custom||{},n=u._index,e=u._model,a=this.chart.options.elements.point;e.radius=r.radius?r.radius:t.getValueAtIndexOrDefault(o.pointRadius,n,a.radius),e.backgroundColor=r.backgroundColor?r.backgroundColor:t.getValueAtIndexOrDefault(o.pointBackgroundColor,n,a.backgroundColor),e.borderColor=r.borderColor?r.borderColor:t.getValueAtIndexOrDefault(o.pointBorderColor,n,a.borderColor),e.borderWidth=r.borderWidth?r.borderWidth:t.getValueAtIndexOrDefault(o.pointBorderWidth,n,a.borderWidth)}})},Ci=function(l){l.Bar=function(t,u){return u.type="bar",new l(t,u)}},Mi=function(l){l.Bubble=function(t,u){return u.type="bubble",new l(t,u)}},xi=function(l){l.Doughnut=function(t,u){return u.type="doughnut",new l(t,u)}},Pi=function(l){l.Line=function(t,u){return u.type="line",new l(t,u)}},Si=function(l){l.PolarArea=function(t,u){return u.type="polarArea",new l(t,u)}},Di=function(l){l.Radar=function(t,u){return u.type="radar",new l(t,u)}},Ii=function(l){var t={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(){return""},label:function(u){return"("+u.xLabel+", "+u.yLabel+")"}}}};l.defaults.scatter=t,l.controllers.scatter=l.controllers.line,l.Scatter=function(u,o){return o.type="scatter",new l(u,o)}},Ai=function(l){l.defaults.global.plugins.filler={propagate:!0};var t=l.defaults,u=l.helpers,o={dataset:function(d){var h=d.fill,c=d.chart,v=c.getDatasetMeta(h),g=v&&c.isDatasetVisible(h),p=g&&v.dataset._children||[];return p.length?function(m,b){return p[b]._view||null}:null},boundary:function(d){var h=d.boundary,c=h?h.x:null,v=h?h.y:null;return function(g){return{x:c===null?g.x:c,y:v===null?g.y:v}}}};function r(d,h,c){var v=d._model||{},g=v.fill,p;if(g===void 0&&(g=!!v.backgroundColor),g===!1||g===null)return!1;if(g===!0)return"origin";if(p=parseFloat(g,10),isFinite(p)&&Math.floor(p)===p)return(g[0]==="-"||g[0]==="+")&&(p=h+p),p===h||p<0||p>=c?!1:p;switch(g){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return g;default:return!1}}function n(d){var h=d.el._model||{},c=d.el._scale||{},v=d.fill,g=null,p;if(isFinite(v))return null;if(v==="start"?g=h.scaleBottom===void 0?c.bottom:h.scaleBottom:v==="end"?g=h.scaleTop===void 0?c.top:h.scaleTop:h.scaleZero!==void 0?g=h.scaleZero:c.getBasePosition?g=c.getBasePosition():c.getBasePixel&&(g=c.getBasePixel()),g!=null){if(g.x!==void 0&&g.y!==void 0)return g;if(typeof g=="number"&&isFinite(g))return p=c.isHorizontal(),{x:p?g:null,y:p?null:g}}return null}function e(d,h,c){var v=d[h],g=v.fill,p=[h],m;if(!c)return g;for(;g!==!1&&p.indexOf(g)===-1;){if(!isFinite(g))return g;if(m=d[g],!m)return!1;if(m.visible)return g;p.push(g),g=m.fill}return!1}function a(d){var h=d.fill,c="dataset";return h===!1?null:(isFinite(h)||(c="boundary"),o[c](d))}function s(d){return d&&!d.skip}function i(d,h,c,v,g){var p;if(!(!v||!g)){for(d.moveTo(h[0].x,h[0].y),p=1;p<v;++p)u.canvas.lineTo(d,h[p-1],h[p]);for(d.lineTo(c[g-1].x,c[g-1].y),p=g-1;p>0;--p)u.canvas.lineTo(d,c[p],c[p-1],!0)}}function f(d,h,c,v,g,p){var m=h.length,b=v.spanGaps,k=[],w=[],C=0,A=0,P,x,V,B,R,T,H;for(d.beginPath(),P=0,x=m+!!p;P<x;++P)V=P%m,B=h[V]._view,R=c(B,V,v),T=s(B),H=s(R),T&&H?(C=k.push(B),A=w.push(R)):C&&A&&(b?(T&&k.push(B),H&&w.push(R)):(i(d,k,w,C,A),C=A=0,k=[],w=[]));i(d,k,w,C,A),d.closePath(),d.fillStyle=g,d.fill()}return{id:"filler",afterDatasetsUpdate:function(d,h){var c=(d.data.datasets||[]).length,v=h.propagate,g=[],p,m,b,k;for(m=0;m<c;++m)p=d.getDatasetMeta(m),b=p.dataset,k=null,b&&b._model&&b instanceof l.elements.Line&&(k={visible:d.isDatasetVisible(m),fill:r(b,m,c),chart:d,el:b}),p.$filler=k,g.push(k);for(m=0;m<c;++m)k=g[m],k&&(k.fill=e(g,m,v),k.boundary=n(k),k.mapper=a(k))},beforeDatasetDraw:function(d,h){var c=h.meta.$filler;if(c){var v=c.el,g=v._view,p=v._children||[],m=c.mapper,b=g.backgroundColor||t.global.defaultColor;m&&b&&p.length&&f(d.ctx,p,m,g,b,v._loop)}}}},Ti=function(l){var t=l.helpers,u=l.layoutService,o=t.noop;l.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,a){var s=a.datasetIndex,i=this.chart,f=i.getDatasetMeta(s);f.hidden=f.hidden===null?!i.data.datasets[s].hidden:null,i.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var a=e.data;return t.isArray(a.datasets)?a.datasets.map(function(s,i){return{text:s.label,fillStyle:t.isArray(s.backgroundColor)?s.backgroundColor[0]:s.backgroundColor,hidden:!e.isDatasetVisible(i),lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:s.borderWidth,strokeStyle:s.borderColor,pointStyle:s.pointStyle,datasetIndex:i}},this):[]}}};function r(e,a){return e.usePointStyle?a*Math.SQRT2:e.boxWidth}l.Legend=l.Element.extend({initialize:function(e){t.extend(this,e),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:o,update:function(e,a,s){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=a,i.margins=s,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:o,beforeSetDimensions:o,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:o,beforeBuildLabels:o,buildLabels:function(){var e=this,a=e.options.labels,s=a.generateLabels.call(e,e.chart);a.filter&&(s=s.filter(function(i){return a.filter(i,e.chart.data)})),e.options.reverse&&s.reverse(),e.legendItems=s},afterBuildLabels:o,beforeFit:o,fit:function(){var e=this,a=e.options,s=a.labels,i=a.display,f=e.ctx,d=l.defaults.global,h=t.getValueOrDefault,c=h(s.fontSize,d.defaultFontSize),v=h(s.fontStyle,d.defaultFontStyle),g=h(s.fontFamily,d.defaultFontFamily),p=t.fontString(c,v,g),m=e.legendHitBoxes=[],b=e.minSize,k=e.isHorizontal();if(k?(b.width=e.maxWidth,b.height=i?10:0):(b.width=i?10:0,b.height=e.maxHeight),i)if(f.font=p,k){var w=e.lineWidths=[0],C=e.legendItems.length?c+s.padding:0;f.textAlign="left",f.textBaseline="top",t.each(e.legendItems,function(T,H){var W=r(s,c),Y=W+c/2+f.measureText(T.text).width;w[w.length-1]+Y+s.padding>=e.width&&(C+=c+s.padding,w[w.length]=e.left),m[H]={left:0,top:0,width:Y,height:c},w[w.length-1]+=Y+s.padding}),b.height+=C}else{var A=s.padding,P=e.columnWidths=[],x=s.padding,V=0,B=0,R=c+A;t.each(e.legendItems,function(T,H){var W=r(s,c),Y=W+c/2+f.measureText(T.text).width;B+R>b.height&&(x+=V+s.padding,P.push(V),V=0,B=0),V=Math.max(V,Y),B+=R,m[H]={left:0,top:0,width:Y,height:c}}),x+=V,P.push(V),b.width+=x}e.width=b.width,e.height=b.height},afterFit:o,isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},draw:function(){var e=this,a=e.options,s=a.labels,i=l.defaults.global,f=i.elements.line,d=e.width,h=e.lineWidths;if(a.display){var c=e.ctx,v,g=t.getValueOrDefault,p=g(s.fontColor,i.defaultFontColor),m=g(s.fontSize,i.defaultFontSize),b=g(s.fontStyle,i.defaultFontStyle),k=g(s.fontFamily,i.defaultFontFamily),w=t.fontString(m,b,k);c.textAlign="left",c.textBaseline="top",c.lineWidth=.5,c.strokeStyle=p,c.fillStyle=p,c.font=w;var C=r(s,m),A=e.legendHitBoxes,P=function(R,T,H){if(!(isNaN(C)||C<=0)){c.save(),c.fillStyle=g(H.fillStyle,i.defaultColor),c.lineCap=g(H.lineCap,f.borderCapStyle),c.lineDashOffset=g(H.lineDashOffset,f.borderDashOffset),c.lineJoin=g(H.lineJoin,f.borderJoinStyle),c.lineWidth=g(H.lineWidth,f.borderWidth),c.strokeStyle=g(H.strokeStyle,i.defaultColor);var W=g(H.lineWidth,f.borderWidth)===0;if(c.setLineDash&&c.setLineDash(g(H.lineDash,f.borderDash)),a.labels&&a.labels.usePointStyle){var Y=m*Math.SQRT2/2,E=Y/Math.SQRT2,q=R+E,O=T+E;l.canvasHelpers.drawPoint(c,H.pointStyle,Y,q,O)}else W||c.strokeRect(R,T,C,m),c.fillRect(R,T,C,m);c.restore()}},x=function(R,T,H,W){c.fillText(H.text,C+m/2+R,T),H.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(C+m/2+R,T+m/2),c.lineTo(C+m/2+R+W,T+m/2),c.stroke())},V=e.isHorizontal();V?v={x:e.left+(d-h[0])/2,y:e.top+s.padding,line:0}:v={x:e.left+s.padding,y:e.top+s.padding,line:0};var B=m+s.padding;t.each(e.legendItems,function(R,T){var H=c.measureText(R.text).width,W=C+m/2+H,Y=v.x,E=v.y;V?Y+W>=d&&(E=v.y+=B,v.line++,Y=v.x=e.left+(d-h[v.line])/2):E+B>e.bottom&&(Y=v.x=Y+e.columnWidths[v.line]+s.padding,E=v.y=e.top+s.padding,v.line++),P(Y,E,R),A[T].left=Y,A[T].top=E,x(Y,E,R,H),V?v.x+=W+s.padding:v.y+=B})}},handleEvent:function(e){var a=this,s=a.options,i=e.type==="mouseup"?"click":e.type,f=!1;if(i==="mousemove"){if(!s.onHover)return}else if(i==="click"){if(!s.onClick)return}else return;var d=e.x,h=e.y;if(d>=a.left&&d<=a.right&&h>=a.top&&h<=a.bottom)for(var c=a.legendHitBoxes,v=0;v<c.length;++v){var g=c[v];if(d>=g.left&&d<=g.left+g.width&&h>=g.top&&h<=g.top+g.height){if(i==="click"){s.onClick.call(a,e.native,a.legendItems[v]),f=!0;break}else if(i==="mousemove"){s.onHover.call(a,e.native,a.legendItems[v]),f=!0;break}}}return f}});function n(e,a){var s=new l.Legend({ctx:e.ctx,options:a,chart:e});u.configure(e,s,a),u.addBox(e,s),e.legend=s}return{id:"legend",beforeInit:function(e){var a=e.options.legend;a&&n(e,a)},beforeUpdate:function(e){var a=e.options.legend,s=e.legend;a?(a=t.configMerge(l.defaults.global.legend,a),s?(u.configure(e,s,a),s.options=a):n(e,a)):s&&(u.removeBox(e,s),delete e.legend)},afterEvent:function(e,a){var s=e.legend;s&&s.handleEvent(a)}}},Bi=function(l){var t=l.helpers,u=l.layoutService,o=t.noop;l.defaults.global.title={display:!1,position:"top",fullWidth:!0,weight:2e3,fontStyle:"bold",padding:10,text:""},l.Title=l.Element.extend({initialize:function(n){var e=this;t.extend(e,n),e.legendHitBoxes=[]},beforeUpdate:o,update:function(n,e,a){var s=this;return s.beforeUpdate(),s.maxWidth=n,s.maxHeight=e,s.margins=a,s.beforeSetDimensions(),s.setDimensions(),s.afterSetDimensions(),s.beforeBuildLabels(),s.buildLabels(),s.afterBuildLabels(),s.beforeFit(),s.fit(),s.afterFit(),s.afterUpdate(),s.minSize},afterUpdate:o,beforeSetDimensions:o,setDimensions:function(){var n=this;n.isHorizontal()?(n.width=n.maxWidth,n.left=0,n.right=n.width):(n.height=n.maxHeight,n.top=0,n.bottom=n.height),n.paddingLeft=0,n.paddingTop=0,n.paddingRight=0,n.paddingBottom=0,n.minSize={width:0,height:0}},afterSetDimensions:o,beforeBuildLabels:o,buildLabels:o,afterBuildLabels:o,beforeFit:o,fit:function(){var n=this,e=t.getValueOrDefault,a=n.options,s=l.defaults.global,i=a.display,f=e(a.fontSize,s.defaultFontSize),d=n.minSize;n.isHorizontal()?(d.width=n.maxWidth,d.height=i?f+a.padding*2:0):(d.width=i?f+a.padding*2:0,d.height=n.maxHeight),n.width=d.width,n.height=d.height},afterFit:o,isHorizontal:function(){var n=this.options.position;return n==="top"||n==="bottom"},draw:function(){var n=this,e=n.ctx,a=t.getValueOrDefault,s=n.options,i=l.defaults.global;if(s.display){var f=a(s.fontSize,i.defaultFontSize),d=a(s.fontStyle,i.defaultFontStyle),h=a(s.fontFamily,i.defaultFontFamily),c=t.fontString(f,d,h),v=0,g,p,m=n.top,b=n.left,k=n.bottom,w=n.right,C;e.fillStyle=a(s.fontColor,i.defaultFontColor),e.font=c,n.isHorizontal()?(g=b+(w-b)/2,p=m+(k-m)/2,C=w-b):(g=s.position==="left"?b+f/2:w-f/2,p=m+(k-m)/2,C=k-m,v=Math.PI*(s.position==="left"?-.5:.5)),e.save(),e.translate(g,p),e.rotate(v),e.textAlign="center",e.textBaseline="middle",e.fillText(s.text,0,0,C),e.restore()}}});function r(n,e){var a=new l.Title({ctx:n.ctx,options:e,chart:n});u.configure(n,a,e),u.addBox(n,a),n.titleBlock=a}return{id:"title",beforeInit:function(n){var e=n.options.title;e&&r(n,e)},beforeUpdate:function(n){var e=n.options.title,a=n.titleBlock;e?(e=t.configMerge(l.defaults.global.title,e),a?(u.configure(n,a,e),a.options=e):r(n,e)):a&&(l.layoutService.removeBox(n,a),delete n.titleBlock)}}},ie=pn();jn(ie);Yn(ie);Gn(ie);Zn(ie);Kn(ie);Xn(ie);Jn(ie);Qn(ie);ei(ie);ti(ie);ai(ie);ri(ie);ni(ie);ii(ie);oi(ie);li(ie);si(ie);ui(ie);fi(ie);di(ie);ci(ie);hi(ie);vi(ie);mi(ie);pi(ie);bi(ie);_i(ie);yi(ie);ki(ie);wi(ie);Ci(ie);Mi(ie);xi(ie);Pi(ie);Si(ie);Di(ie);Ii(ie);var Ar=[];Ar.push(Ai(ie),Ti(ie),Bi(ie));ie.plugins.register(Ar);var Fi=ie;typeof window<"u"&&(window.Chart=ie);const pr=qr(Fi);function Ei(l){let t,u,o,r,n;return{c(){t=S("div"),u=S("canvas"),this.h()},l(e){t=D(e,"DIV",{class:!0});var a=I(t);u=D(a,"CANVAS",{}),I(u).forEach(M),a.forEach(M),this.h()},h(){y(t,"class","chart svelte-1ct4z9m")},m(e,a){pe(e,t,a),_(t,u),r||(n=Vr(o=l[1].call(null,u,l[0])),r=!0)},p(e,[a]){o&&Lr(o.update)&&a&1&&o.update.call(null,e[0])},i:Fe,o:Fe,d(e){e&&M(t),r=!1,n()}}}function Vi(l,t,u){let{config:o}=t;console.log("!!",{...o});const r=(n,e)=>{let a=new pr(n,e);return console.log("!",e),{update(s){a.destroy(),a=new pr(n,s)},destroy(){a.destroy()}}};return l.$$set=n=>{"config"in n&&u(0,o=n.config)},[o,r]}class Li extends et{constructor(t){super(),tt(this,t,Vi,Ei,Qe,{config:0})}}function Ri(l){let t,u,o,r,n;return u=new Rt({props:{id:"aff",subLabel:l[8]("BPC.Aff_SubLabel"),value:1,range:[1,100],name:l[8]("BPC.Aff_Name")}}),r=new xt({props:{id:"inhouse",subLabel:l[8]("BPC.Inhouse_SubLabel"),value:"0",className:"money"}}),{c(){t=S("div"),he(u.$$.fragment),o=N(),he(r.$$.fragment),this.h()},l(e){t=D(e,"DIV",{class:!0});var a=I(t);ve(u.$$.fragment,a),o=z(a),ve(r.$$.fragment,a),a.forEach(M),this.h()},h(){y(t,"class","brokerageProfitCalculator__twoInOne svelte-11kwjs8")},m(e,a){pe(e,t,a),ge(u,t,null),_(t,o),ge(r,t,null),n=!0},p(e,a){const s={};a&256&&(s.subLabel=e[8]("BPC.Aff_SubLabel")),a&256&&(s.name=e[8]("BPC.Aff_Name")),u.$set(s);const i={};a&256&&(i.subLabel=e[8]("BPC.Inhouse_SubLabel")),r.$set(i)},i(e){n||(se(u.$$.fragment,e),se(r.$$.fragment,e),n=!0)},o(e){ue(u.$$.fragment,e),ue(r.$$.fragment,e),n=!1},d(e){e&&M(t),me(u),me(r)}}}function br(l){let t,u;return t=new Li({props:{config:l[6]}}),{c(){he(t.$$.fragment)},l(o){ve(t.$$.fragment,o)},m(o,r){ge(t,o,r),u=!0},p(o,r){const n={};r&64&&(n.config=o[6]),t.$set(n)},i(o){u||(se(t.$$.fragment,o),u=!0)},o(o){ue(t.$$.fragment,o),u=!1},d(o){me(t,o)}}}function Ni(l){let t,u,o,r,n,e=l[8]("BPC.Title")+"",a,s,i,f=l[8]("BPC.SubTitle")+"",d,h,c,v,g,p,m=l[8]("BPC.Simplified")+"",b,k,w,C,A=l[8]("BPC.Extended")+"",P,x,V,B,R,T,H,W,Y,E,q,O,$=l[8]("BPC.Calculate")+"",Z,G,oe,U,ee,ne,ae,X,fe,L,re,be,de,le,ke,Se,we,Ce,Ee,Ae,Te,Me,Ne=l[8]("BPC.Calculate")+"",ut,Ve,Ge,ce,We,Ze=l[8]("BPC.MB")+"",ze,pt,Oe,Pt,Ke,at,rt,St,_e,Pe,nt,ft,Le,Dt,dt,It=l[8]("BPC.Calculate")+"",Ht,At,ye,qe,ct=(l[7]==="simple"?l[8]("BPC.ResultTitleSimple"):l[8]("BPC.ResultTitleTotal"))+"",Wt,Xt,bt,ht=l[8]("BPC.ResultSubTitle")+"",qt,vt,it,Tt=`$${ka(l[0])}`,jt,Jt,_t,Qt,Bt,Ma,Ft,xa,ha,sa,Pa,gt,va,Sa,ea,ua=l[8]("BPC.ResultFooterCTAText")+"",ga,Da,ta,Et,fa=l[8]("BPC.TalkToUs")+"",ma,pa,xe,Ia,za;T=new Rt({props:{id:"at",title:l[8]("BPC.AT"),hint:l[8]("BPC.AT_Hint"),value:10,range:[10,1e4],name:l[8]("BPC.AT_Name")}}),W=new xt({props:{id:"arppu",title:l[8]("BPC.ARPPU"),hint:l[8]("BPC.ARPPU_Hint"),value:"65",className:"money",extraPlaceholder:l[8]("BPC.ARPPU_ExtraPlaceholder")}}),E=new mn({props:{title:l[8]("BPC.MC"),hint:l[8]("BPC.MC_Hint"),$$slots:{default:[Ri]},$$scope:{ctx:l}}}),ne=new xt({props:{id:"ata",title:l[8]("BPC.ATA"),hint:l[8]("BPC.ATA_Hint"),value:"1000",className:"money "+l[7]}}),X=new xt({props:{id:"tpu",title:l[8]("BPC.TPU"),hint:l[8]("BPC.TPU_Hint"),value:"100",className:l[7]}}),re=new Rt({props:{id:"tw",title:l[8]("BPC.TW"),hint:l[8]("BPC.TW_Hint"),name:l[8]("BPC.TW_Name"),value:45,range:[1,100],className:l[7],extraPlaceholder:l[8]("BPC.TW_ExtraPlaceholder")}}),de=new Rt({props:{id:"pr",title:l[8]("BPC.PR"),hint:l[8]("BPC.PR_Hint"),name:l[8]("BPC.PR_Name"),value:80,range:[1,100],className:l[7],extraPlaceholder:l[8]("BPC.PR_ExtraPlaceholder")}}),ke=new xt({props:{id:"ats",title:l[8]("BPC.ATS"),hint:l[8]("BPC.ATS_Hint"),value:"100",className:l[7]}}),Ce=new Rt({props:{id:"as",title:l[8]("BPC.AS"),hint:l[8]("BPC.AS_Hint"),name:l[8]("BPC.AS_Name"),value:40,range:[1,100],className:l[7]}}),Ae=new Rt({props:{id:"cr",title:l[8]("BPC.CR"),hint:l[8]("BPC.CR_Hint"),name:l[8]("BPC.CR_Name"),value:15,range:[1,100],className:l[7]}}),Oe=new xt({props:{id:"cac",className:"money smaller",title:l[8]("BPC.CAC_SubLabel"),hint:l[8]("BPC.CAC_Hint"),value:""}}),Ke=new xt({props:{id:"affF",className:"smaller",title:l[8]("BPC.affF_SubLabel"),hint:l[8]("BPC.affF_Hint"),value:"50"}}),rt=new xt({props:{id:"fc",className:"money smaller",title:l[8]("BPC.FC_Title"),placeholder:"8000",value:""}}),_e=new xt({props:{id:"m_budget",className:"money smaller",title:l[8]("BPC.m_budget_Title"),placeholder:"8000",value:""}}),nt=new Rt({props:{id:"affPayout",className:"smaller",title:l[8]("BPC.affPayout_Title"),name:"%",value:10,range:[1,100]}}),Le=new Rt({props:{id:"ph",className:"mb",title:l[8]("BPC.PH_Title"),hint:l[8]("BPC.PH_Hint"),name:l[8]("BPC.months"),value:5,range:[1,12]}}),Bt=new hr({props:{title:l[8]("BPC.ResultRevenueAff"),value:l[1],max:l[3]}}),Ft=new hr({props:{title:l[8]("BPC.ResultRevenueBroker"),value:l[4],max:l[2],className:"grey-bg"}});let Ie=l[5].length&&br(l);return{c(){t=S("section"),u=S("div"),o=S("div"),r=S("div"),n=S("h2"),a=J(e),s=N(),i=S("p"),d=J(f),h=N(),c=S("div"),v=S("div"),g=S("div"),p=S("button"),b=J(m),w=N(),C=S("button"),P=J(A),B=N(),R=S("div"),he(T.$$.fragment),H=N(),he(W.$$.fragment),Y=N(),he(E.$$.fragment),q=N(),O=S("button"),Z=J($),oe=N(),U=S("div"),ee=S("div"),he(ne.$$.fragment),ae=N(),he(X.$$.fragment),fe=N(),L=S("div"),he(re.$$.fragment),be=N(),he(de.$$.fragment),le=N(),he(ke.$$.fragment),Se=N(),we=S("div"),he(Ce.$$.fragment),Ee=N(),he(Ae.$$.fragment),Te=N(),Me=S("button"),ut=J(Ne),Ge=N(),ce=S("div"),We=S("h3"),ze=J(Ze),pt=N(),he(Oe.$$.fragment),Pt=N(),he(Ke.$$.fragment),at=N(),he(rt.$$.fragment),St=N(),he(_e.$$.fragment),Pe=N(),he(nt.$$.fragment),ft=N(),he(Le.$$.fragment),Dt=N(),dt=S("button"),Ht=J(It),At=N(),ye=S("div"),qe=S("h2"),Wt=J(ct),Xt=N(),bt=S("p"),qt=J(ht),vt=N(),it=S("div"),jt=J(Tt),Jt=N(),_t=S("hr"),Qt=N(),he(Bt.$$.fragment),Ma=N(),he(Ft.$$.fragment),xa=N(),Ie&&Ie.c(),ha=N(),sa=S("div"),Pa=N(),gt=S("div"),va=S("hr"),Sa=N(),ea=S("p"),ga=J(ua),Da=N(),ta=S("div"),Et=S("button"),ma=J(fa),this.h()},l(F){t=D(F,"SECTION",{class:!0});var j=I(t);u=D(j,"DIV",{class:!0});var yt=I(u);o=D(yt,"DIV",{class:!0});var kt=I(o);r=D(kt,"DIV",{class:!0});var wt=I(r);n=D(wt,"H2",{class:!0});var Ut=I(n);a=Q(Ut,e),Ut.forEach(M),s=z(wt),i=D(wt,"P",{class:!0});var $t=I(i);d=Q($t,f),$t.forEach(M),wt.forEach(M),h=z(kt),c=D(kt,"DIV",{class:!0});var ot=I(c);v=D(ot,"DIV",{class:!0});var je=I(v);g=D(je,"DIV",{class:!0});var Ct=I(g);p=D(Ct,"BUTTON",{class:!0});var Vt=I(p);b=Q(Vt,m),Vt.forEach(M),w=z(Ct),C=D(Ct,"BUTTON",{class:!0});var Lt=I(C);P=Q(Lt,A),Lt.forEach(M),Ct.forEach(M),B=z(je),R=D(je,"DIV",{class:!0});var Xe=I(R);ve(T.$$.fragment,Xe),H=z(Xe),ve(W.$$.fragment,Xe),Y=z(Xe),ve(E.$$.fragment,Xe),q=z(Xe),O=D(Xe,"BUTTON",{class:!0});var aa=I(O);Z=Q(aa,$),aa.forEach(M),Xe.forEach(M),oe=z(je),U=D(je,"DIV",{class:!0});var Ue=I(U);ee=D(Ue,"DIV",{class:!0});var Yt=I(ee);ve(ne.$$.fragment,Yt),ae=z(Yt),ve(X.$$.fragment,Yt),Yt.forEach(M),fe=z(Ue),L=D(Ue,"DIV",{class:!0});var Gt=I(L);ve(re.$$.fragment,Gt),be=z(Gt),ve(de.$$.fragment,Gt),Gt.forEach(M),le=z(Ue),ve(ke.$$.fragment,Ue),Se=z(Ue),we=D(Ue,"DIV",{class:!0});var Mt=I(we);ve(Ce.$$.fragment,Mt),Ee=z(Mt),ve(Ae.$$.fragment,Mt),Mt.forEach(M),Te=z(Ue),Me=D(Ue,"BUTTON",{class:!0});var Zt=I(Me);ut=Q(Zt,Ne),Zt.forEach(M),Ue.forEach(M),je.forEach(M),Ge=z(ot),ce=D(ot,"DIV",{class:!0});var De=I(ce);We=D(De,"H3",{class:!0});var Oa=I(We);ze=Q(Oa,Ze),Oa.forEach(M),pt=z(De),ve(Oe.$$.fragment,De),Pt=z(De),ve(Ke.$$.fragment,De),at=z(De),ve(rt.$$.fragment,De),St=z(De),ve(_e.$$.fragment,De),Pe=z(De),ve(nt.$$.fragment,De),ft=z(De),ve(Le.$$.fragment,De),Dt=z(De),dt=D(De,"BUTTON",{class:!0});var Ha=I(dt);Ht=Q(Ha,It),Ha.forEach(M),De.forEach(M),ot.forEach(M),kt.forEach(M),At=z(yt),ye=D(yt,"DIV",{class:!0});var Be=I(ye);qe=D(Be,"H2",{class:!0});var Wa=I(qe);Wt=Q(Wa,ct),Wa.forEach(M),Xt=z(Be),bt=D(Be,"P",{class:!0});var qa=I(bt);qt=Q(qa,ht),qa.forEach(M),vt=z(Be),it=D(Be,"DIV",{class:!0});var ja=I(it);jt=Q(ja,Tt),ja.forEach(M),Jt=z(Be),_t=D(Be,"HR",{class:!0}),Qt=z(Be),ve(Bt.$$.fragment,Be),Ma=z(Be),ve(Ft.$$.fragment,Be),xa=z(Be),Ie&&Ie.l(Be),ha=z(Be),sa=D(Be,"DIV",{class:!0}),I(sa).forEach(M),Pa=z(Be),gt=D(Be,"DIV",{class:!0});var ra=I(gt);va=D(ra,"HR",{class:!0}),Sa=z(ra),ea=D(ra,"P",{class:!0});var Ua=I(ea);ga=Q(Ua,ua),Ua.forEach(M),Da=z(ra),ta=D(ra,"DIV",{class:!0});var $a=I(ta);Et=D($a,"BUTTON",{class:!0});var Ya=I(Et);ma=Q(Ya,fa),Ya.forEach(M),$a.forEach(M),ra.forEach(M),Be.forEach(M),yt.forEach(M),j.forEach(M),this.h()},h(){y(n,"class","svelte-11kwjs8"),y(i,"class","svelte-11kwjs8"),y(r,"class","brokerageProfitCalculator__header svelte-11kwjs8"),y(p,"class",k="brokerageProfitCalculator__item "+(l[7]==="simple"?"active":"")+" svelte-11kwjs8"),y(C,"class",x="brokerageProfitCalculator__item "+(l[7]==="extended"?"active":"")+" svelte-11kwjs8"),y(g,"class",V="brokerageProfitCalculator__toggle "+(l[7]==="extended"?"item2":"")+" svelte-11kwjs8"),y(O,"class","brokerageProfitCalculator__calculate svelte-11kwjs8"),y(R,"class",G=l[7]==="simple"?"":"hidden"),y(ee,"class","brokerageProfitCalculator__twoInOne svelte-11kwjs8"),y(L,"class","brokerageProfitCalculator__twoInOne svelte-11kwjs8"),y(we,"class","brokerageProfitCalculator__twoInOne svelte-11kwjs8"),y(Me,"class","brokerageProfitCalculator__calculate svelte-11kwjs8"),y(U,"class",Ve=l[7]==="extended"?"":"hidden"),y(v,"class","brokerageProfitCalculator__simple svelte-11kwjs8"),y(We,"class","svelte-11kwjs8"),y(dt,"class","brokerageProfitCalculator__calculate brokerageProfitCalculator__calculate--mob svelte-11kwjs8"),y(ce,"class","brokerageProfitCalculator__extended svelte-11kwjs8"),y(c,"class","brokerageProfitCalculator__form svelte-11kwjs8"),y(o,"class","brokerageProfitCalculator__inputForm svelte-11kwjs8"),y(qe,"class","svelte-11kwjs8"),y(bt,"class","svelte-11kwjs8"),y(it,"class","brokerageProfitCalculator__RevenueValue svelte-11kwjs8"),y(_t,"class","svelte-11kwjs8"),y(sa,"class","brokerageProfitCalculator__Canvas svelte-11kwjs8"),y(va,"class","svelte-11kwjs8"),y(ea,"class","footer svelte-11kwjs8"),y(Et,"class","svelte-11kwjs8"),y(ta,"class","brokerageProfitCalculator__cta svelte-11kwjs8"),y(gt,"class","brokerageProfitCalculator__Result--footer svelte-11kwjs8"),y(ye,"class","brokerageProfitCalculator__Result svelte-11kwjs8"),y(u,"class","brokerageProfitCalculator__container svelte-11kwjs8"),y(t,"class",pa="brokerageProfitCalculator "+l[9]+" "+l[7]+" svelte-11kwjs8")},m(F,j){pe(F,t,j),_(t,u),_(u,o),_(o,r),_(r,n),_(n,a),_(r,s),_(r,i),_(i,d),_(o,h),_(o,c),_(c,v),_(v,g),_(g,p),_(p,b),_(g,w),_(g,C),_(C,P),_(v,B),_(v,R),ge(T,R,null),_(R,H),ge(W,R,null),_(R,Y),ge(E,R,null),_(R,q),_(R,O),_(O,Z),_(v,oe),_(v,U),_(U,ee),ge(ne,ee,null),_(ee,ae),ge(X,ee,null),_(U,fe),_(U,L),ge(re,L,null),_(L,be),ge(de,L,null),_(U,le),ge(ke,U,null),_(U,Se),_(U,we),ge(Ce,we,null),_(we,Ee),ge(Ae,we,null),_(U,Te),_(U,Me),_(Me,ut),_(c,Ge),_(c,ce),_(ce,We),_(We,ze),_(ce,pt),ge(Oe,ce,null),_(ce,Pt),ge(Ke,ce,null),_(ce,at),ge(rt,ce,null),_(ce,St),ge(_e,ce,null),_(ce,Pe),ge(nt,ce,null),_(ce,ft),ge(Le,ce,null),_(ce,Dt),_(ce,dt),_(dt,Ht),_(u,At),_(u,ye),_(ye,qe),_(qe,Wt),_(ye,Xt),_(ye,bt),_(bt,qt),_(ye,vt),_(ye,it),_(it,jt),_(ye,Jt),_(ye,_t),_(ye,Qt),ge(Bt,ye,null),_(ye,Ma),ge(Ft,ye,null),_(ye,xa),Ie&&Ie.m(ye,null),_(ye,ha),_(ye,sa),_(ye,Pa),_(ye,gt),_(gt,va),_(gt,Sa),_(gt,ea),_(ea,ga),_(gt,Da),_(gt,ta),_(ta,Et),_(Et,ma),xe=!0,Ia||(za=[$e(p,"click",l[12]),$e(C,"click",l[13]),$e(O,"click",l[14]),$e(Me,"click",l[15]),$e(dt,"click",l[16]),$e(Et,"click",l[17]),$e(Et,"keydown",l[18])],Ia=!0)},p(F,[j]){(!xe||j&256)&&e!==(e=F[8]("BPC.Title")+"")&&te(a,e),(!xe||j&256)&&f!==(f=F[8]("BPC.SubTitle")+"")&&te(d,f),(!xe||j&256)&&m!==(m=F[8]("BPC.Simplified")+"")&&te(b,m),(!xe||j&128&&k!==(k="brokerageProfitCalculator__item "+(F[7]==="simple"?"active":"")+" svelte-11kwjs8"))&&y(p,"class",k),(!xe||j&256)&&A!==(A=F[8]("BPC.Extended")+"")&&te(P,A),(!xe||j&128&&x!==(x="brokerageProfitCalculator__item "+(F[7]==="extended"?"active":"")+" svelte-11kwjs8"))&&y(C,"class",x),(!xe||j&128&&V!==(V="brokerageProfitCalculator__toggle "+(F[7]==="extended"?"item2":"")+" svelte-11kwjs8"))&&y(g,"class",V);const yt={};j&256&&(yt.title=F[8]("BPC.AT")),j&256&&(yt.hint=F[8]("BPC.AT_Hint")),j&256&&(yt.name=F[8]("BPC.AT_Name")),T.$set(yt);const kt={};j&256&&(kt.title=F[8]("BPC.ARPPU")),j&256&&(kt.hint=F[8]("BPC.ARPPU_Hint")),j&256&&(kt.extraPlaceholder=F[8]("BPC.ARPPU_ExtraPlaceholder")),W.$set(kt);const wt={};j&256&&(wt.title=F[8]("BPC.MC")),j&256&&(wt.hint=F[8]("BPC.MC_Hint")),j&1048832&&(wt.$$scope={dirty:j,ctx:F}),E.$set(wt),(!xe||j&256)&&$!==($=F[8]("BPC.Calculate")+"")&&te(Z,$),(!xe||j&128&&G!==(G=F[7]==="simple"?"":"hidden"))&&y(R,"class",G);const Ut={};j&256&&(Ut.title=F[8]("BPC.ATA")),j&256&&(Ut.hint=F[8]("BPC.ATA_Hint")),j&128&&(Ut.className="money "+F[7]),ne.$set(Ut);const $t={};j&256&&($t.title=F[8]("BPC.TPU")),j&256&&($t.hint=F[8]("BPC.TPU_Hint")),j&128&&($t.className=F[7]),X.$set($t);const ot={};j&256&&(ot.title=F[8]("BPC.TW")),j&256&&(ot.hint=F[8]("BPC.TW_Hint")),j&256&&(ot.name=F[8]("BPC.TW_Name")),j&128&&(ot.className=F[7]),j&256&&(ot.extraPlaceholder=F[8]("BPC.TW_ExtraPlaceholder")),re.$set(ot);const je={};j&256&&(je.title=F[8]("BPC.PR")),j&256&&(je.hint=F[8]("BPC.PR_Hint")),j&256&&(je.name=F[8]("BPC.PR_Name")),j&128&&(je.className=F[7]),j&256&&(je.extraPlaceholder=F[8]("BPC.PR_ExtraPlaceholder")),de.$set(je);const Ct={};j&256&&(Ct.title=F[8]("BPC.ATS")),j&256&&(Ct.hint=F[8]("BPC.ATS_Hint")),j&128&&(Ct.className=F[7]),ke.$set(Ct);const Vt={};j&256&&(Vt.title=F[8]("BPC.AS")),j&256&&(Vt.hint=F[8]("BPC.AS_Hint")),j&256&&(Vt.name=F[8]("BPC.AS_Name")),j&128&&(Vt.className=F[7]),Ce.$set(Vt);const Lt={};j&256&&(Lt.title=F[8]("BPC.CR")),j&256&&(Lt.hint=F[8]("BPC.CR_Hint")),j&256&&(Lt.name=F[8]("BPC.CR_Name")),j&128&&(Lt.className=F[7]),Ae.$set(Lt),(!xe||j&256)&&Ne!==(Ne=F[8]("BPC.Calculate")+"")&&te(ut,Ne),(!xe||j&128&&Ve!==(Ve=F[7]==="extended"?"":"hidden"))&&y(U,"class",Ve),(!xe||j&256)&&Ze!==(Ze=F[8]("BPC.MB")+"")&&te(ze,Ze);const Xe={};j&256&&(Xe.title=F[8]("BPC.CAC_SubLabel")),j&256&&(Xe.hint=F[8]("BPC.CAC_Hint")),Oe.$set(Xe);const aa={};j&256&&(aa.title=F[8]("BPC.affF_SubLabel")),j&256&&(aa.hint=F[8]("BPC.affF_Hint")),Ke.$set(aa);const Ue={};j&256&&(Ue.title=F[8]("BPC.FC_Title")),rt.$set(Ue);const Yt={};j&256&&(Yt.title=F[8]("BPC.m_budget_Title")),_e.$set(Yt);const Gt={};j&256&&(Gt.title=F[8]("BPC.affPayout_Title")),nt.$set(Gt);const Mt={};j&256&&(Mt.title=F[8]("BPC.PH_Title")),j&256&&(Mt.hint=F[8]("BPC.PH_Hint")),j&256&&(Mt.name=F[8]("BPC.months")),Le.$set(Mt),(!xe||j&256)&&It!==(It=F[8]("BPC.Calculate")+"")&&te(Ht,It),(!xe||j&384)&&ct!==(ct=(F[7]==="simple"?F[8]("BPC.ResultTitleSimple"):F[8]("BPC.ResultTitleTotal"))+"")&&te(Wt,ct),(!xe||j&256)&&ht!==(ht=F[8]("BPC.ResultSubTitle")+"")&&te(qt,ht),(!xe||j&1)&&Tt!==(Tt=`$${ka(F[0])}`)&&te(jt,Tt);const Zt={};j&256&&(Zt.title=F[8]("BPC.ResultRevenueAff")),j&2&&(Zt.value=F[1]),j&8&&(Zt.max=F[3]),Bt.$set(Zt);const De={};j&256&&(De.title=F[8]("BPC.ResultRevenueBroker")),j&16&&(De.value=F[4]),j&4&&(De.max=F[2]),Ft.$set(De),F[5].length?Ie?(Ie.p(F,j),j&32&&se(Ie,1)):(Ie=br(F),Ie.c(),se(Ie,1),Ie.m(ye,ha)):Ie&&(Va(),ue(Ie,1,1,()=>{Ie=null}),La()),(!xe||j&256)&&ua!==(ua=F[8]("BPC.ResultFooterCTAText")+"")&&te(ga,ua),(!xe||j&256)&&fa!==(fa=F[8]("BPC.TalkToUs")+"")&&te(ma,fa),(!xe||j&640&&pa!==(pa="brokerageProfitCalculator "+F[9]+" "+F[7]+" svelte-11kwjs8"))&&y(t,"class",pa)},i(F){xe||(se(T.$$.fragment,F),se(W.$$.fragment,F),se(E.$$.fragment,F),se(ne.$$.fragment,F),se(X.$$.fragment,F),se(re.$$.fragment,F),se(de.$$.fragment,F),se(ke.$$.fragment,F),se(Ce.$$.fragment,F),se(Ae.$$.fragment,F),se(Oe.$$.fragment,F),se(Ke.$$.fragment,F),se(rt.$$.fragment,F),se(_e.$$.fragment,F),se(nt.$$.fragment,F),se(Le.$$.fragment,F),se(Bt.$$.fragment,F),se(Ft.$$.fragment,F),se(Ie),xe=!0)},o(F){ue(T.$$.fragment,F),ue(W.$$.fragment,F),ue(E.$$.fragment,F),ue(ne.$$.fragment,F),ue(X.$$.fragment,F),ue(re.$$.fragment,F),ue(de.$$.fragment,F),ue(ke.$$.fragment,F),ue(Ce.$$.fragment,F),ue(Ae.$$.fragment,F),ue(Oe.$$.fragment,F),ue(Ke.$$.fragment,F),ue(rt.$$.fragment,F),ue(_e.$$.fragment,F),ue(nt.$$.fragment,F),ue(Le.$$.fragment,F),ue(Bt.$$.fragment,F),ue(Ft.$$.fragment,F),ue(Ie),xe=!1},d(F){F&&M(t),me(T),me(W),me(E),me(ne),me(X),me(re),me(de),me(ke),me(Ce),me(Ae),me(Oe),me(Ke),me(rt),me(_e),me(nt),me(Le),me(Bt),me(Ft),Ie&&Ie.d(),Ia=!1,Ea(za)}}}function zi(l,t,u){let o,r;Je(l,la,P=>u(8,o=P)),Je(l,oa,P=>u(9,r=P));let n;ia.subscribe(P=>{n=P});let e=0,a=0,s=1e7,i=s,f=0,d=[],h={type:"line",data:{labels:["1","2","3","4","5"],datasets:[{label:"Test",data:[10,20,30,40,50],borderColor:"#FF3737",backgroundColor:"rgba(255, 55, 55, 0.1)"}]},options:{responsive:!0,maintainAspectRatio:!1,scales:{y:{beginAtZero:!0}}}},c="simple";const v=P=>{u(7,c=P),n.mode=P,ia.set(n)},g=()=>{const P=n.as,x=n.aff,V=n.inhouse,B=n.arppu,R=n.ata,T=n.tw,H=n.pr,W=n.fc??1e4,Y=n.cac??50,E=n.at,q=n.affPayout,O=n.ph,$=n.cr,Z=n.tpu,G=n.ats,oe=n.m_budget;if(c==="simple")u(5,d=[]),u(4,f=Math.floor(E*B-E*B*(x/100)-V)),u(0,e=f),u(1,a=Math.floor(.8*.3*f)),u(2,s=e),u(3,i=a*4);else{let U=R*(100-T-T*H/100)/100;const ee=[],ne=[],ae=[],X=[],fe=[],L=[],re=[];ee[0]=G*(P/100),ne[0]=G*((100-P)/100);const be=oe/Y,de=50;u(5,d=[0]);for(let le=1;le<=O;le++)ae[le]=ee[le-1]*U*Z,X[le]=ne[le-1]*U*Z,fe[le]=ae[le]+X[le],L[le]=ae[le]*q/100,re[le]=L[le]+oe+W,u(5,d[le]=fe[le]-re[le],d),ee[le]=ee[le-1]*(100-$)/100+de,ne[le]=ne[le-1]*(100-$)/100+be;u(6,h={type:"line",data:{labels:Object.keys(d).map(le=>(parseInt(le)+1).toString(10).padStart(2,"0")),datasets:[{label:o("BPC.ResultTitle"),data:d,fill:!1,borderColor:"white",backgroundColor:"rgba(255, 55, 55, 0.1)"}]},options:{responsive:!0,maintainAspectRatio:!1,scales:{y:{beginAtZero:!0}}}}),u(0,e=d.reduce((le,ke)=>le+ke,0)),u(4,f=fe.reduce((le,ke)=>le+ke,0)),u(1,a=.8*.3*f),u(2,s=e),u(3,i=a*4)}};return[e,a,s,i,f,d,h,c,o,r,v,g,()=>{v("simple")},()=>{v("extended")},()=>{g()},()=>{g()},()=>{g()},()=>ya.set(!0),P=>{P.key==="Escape"&&ya.set(!1)}]}class Oi extends et{constructor(t){super(),tt(this,t,zi,Ni,Qe,{})}}function Hi(l){let t,u;return{c(){t=Nt("svg"),u=Nt("path"),this.h()},l(o){t=zt(o,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0,class:!0});var r=I(t);u=zt(r,"path",{d:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0}),I(u).forEach(M),r.forEach(M),this.h()},h(){y(u,"d","M6 9L12 15L18 9"),y(u,"stroke","#E62334"),y(u,"stroke-width","1.6"),y(u,"stroke-linecap","round"),y(u,"stroke-linejoin","round"),y(t,"width","24"),y(t,"height","24"),y(t,"viewBox","0 0 24 24"),y(t,"fill","none"),y(t,"xmlns","http://www.w3.org/2000/svg"),y(t,"class","svelte-2e28gt")},m(o,r){pe(o,t,r),_(t,u)},d(o){o&&M(t)}}}function Wi(l){let t,u;return{c(){t=Nt("svg"),u=Nt("path"),this.h()},l(o){t=zt(o,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0,class:!0});var r=I(t);u=zt(r,"path",{d:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0}),I(u).forEach(M),r.forEach(M),this.h()},h(){y(u,"d","M6 9L12 15L18 9"),y(u,"stroke","#E62334"),y(u,"stroke-width","1.6"),y(u,"stroke-linecap","round"),y(u,"stroke-linejoin","round"),y(t,"width","24"),y(t,"height","24"),y(t,"viewBox","0 0 24 24"),y(t,"fill","none"),y(t,"xmlns","http://www.w3.org/2000/svg"),y(t,"class","svelte-2e28gt")},m(o,r){pe(o,t,r),_(t,u)},d(o){o&&M(t)}}}function qi(l){let t,u,o,r,n,e=l[1]!==void 0?`${l[1]+1}.`:"",a,s,i,f,d=(l[0]??"")+"",h,c,v,g,p,m,b,k=(l[2]??"")+"",w,C;function A(V,B){return V[3]?Wi:Hi}let P=A(l),x=P(l);return{c(){t=S("div"),u=S("div"),o=S("div"),r=S("div"),n=S("span"),a=J(e),s=N(),i=S("span"),f=new da(!1),h=N(),c=S("div"),x.c(),v=N(),g=S("div"),p=S("div"),m=S("p"),b=new da(!1),this.h()},l(V){t=D(V,"DIV",{class:!0,"data-widget":!0});var B=I(t);u=D(B,"DIV",{class:!0});var R=I(u);o=D(R,"DIV",{class:!0,role:!0,tabindex:!0});var T=I(o);r=D(T,"DIV",{class:!0});var H=I(r);n=D(H,"SPAN",{class:!0});var W=I(n);a=Q(W,e),W.forEach(M),s=z(H),i=D(H,"SPAN",{class:!0});var Y=I(i);f=ca(Y,!1),Y.forEach(M),H.forEach(M),h=z(T),c=D(T,"DIV",{class:!0});var E=I(c);x.l(E),E.forEach(M),T.forEach(M),v=z(R),g=D(R,"DIV",{class:!0,"data-accordion":!0});var q=I(g);p=D(q,"DIV",{class:!0});var O=I(p);m=D(O,"P",{});var $=I(m);b=ca($,!1),$.forEach(M),O.forEach(M),q.forEach(M),R.forEach(M),B.forEach(M),this.h()},h(){y(n,"class","accordion__title-number svelte-2e28gt"),f.a=null,y(i,"class","accordion__title-text"),y(r,"class","accordion__title svelte-2e28gt"),y(c,"class","accordion__arrow svelte-2e28gt"),y(o,"class","accordion__btn svelte-2e28gt"),y(o,"role","button"),y(o,"tabindex","0"),b.a=null,y(p,"class","accordion__inner svelte-2e28gt"),y(g,"class","accordion__list svelte-2e28gt"),y(g,"data-accordion","container"),y(u,"class","accordion__container"),y(t,"class","accordion svelte-2e28gt"),y(t,"data-widget","accordion")},m(V,B){pe(V,t,B),_(t,u),_(u,o),_(o,r),_(r,n),_(n,a),_(r,s),_(r,i),f.m(d,i),_(o,h),_(o,c),x.m(c,null),_(u,v),_(u,g),_(g,p),_(p,m),b.m(k,m),w||(C=[$e(o,"click",l[5]),$e(o,"keydown",ji)],w=!0)},p(V,[B]){B&2&&e!==(e=V[1]!==void 0?`${V[1]+1}.`:"")&&te(a,e),B&1&&d!==(d=(V[0]??"")+"")&&f.p(d),P!==(P=A(V))&&(x.d(1),x=P(V),x&&(x.c(),x.m(c,null))),B&4&&k!==(k=(V[2]??"")+"")&&b.p(k)},i:Fe,o:Fe,d(V){V&&M(t),x.d(),w=!1,Ea(C)}}}const ji=()=>!1;function Ui(l,t,u){let{title:o}=t,{i:r}=t,{text:n}=t,{large:e=!1}=t;const a=c=>{var p,m;let v=(m=(p=c==null?void 0:c.currentTarget)==null?void 0:p.parentElement)==null?void 0:m.parentElement;if(!v)return;const g=v.querySelector('[data-accordion="container"]');g&&(s(v)?f(v,g):i(v,g))},s=c=>c.classList.contains("accordion--active"),i=(c,v)=>{d(),v.style.maxHeight=v.scrollHeight+"px",c.classList.add("accordion--active")},f=(c,v)=>{v.style.maxHeight="",c.classList.remove("accordion--active")},d=()=>{document.querySelectorAll(".accordion.accordion--active").forEach(v=>{const g=v.querySelector(".accordion__list");g&&(v.classList.remove("accordion--active"),g.style.maxHeight="")})},h=c=>a(c);return l.$$set=c=>{"title"in c&&u(0,o=c.title),"i"in c&&u(1,r=c.i),"text"in c&&u(2,n=c.text),"large"in c&&u(3,e=c.large)},[o,r,n,e,a,h]}class $i extends et{constructor(t){super(),tt(this,t,Ui,qi,Qe,{title:0,i:1,text:2,large:3})}}function _r(l,t,u){const o=l.slice();return o[6]=t[u],o[8]=u,o}function yr(l){let t,u;return t=new $i({props:{large:l[1],title:l[6].title,text:l[6].text,i:l[8]}}),{c(){he(t.$$.fragment)},l(o){ve(t.$$.fragment,o)},m(o,r){ge(t,o,r),u=!0},p(o,r){const n={};r&2&&(n.large=o[1]),r&4&&(n.title=o[6].title),r&4&&(n.text=o[6].text),t.$set(n)},i(o){u||(se(t.$$.fragment,o),u=!0)},o(o){ue(t.$$.fragment,o),u=!1},d(o){me(t,o)}}}function Yi(l){let t,u,o,r,n,e=l[3]("FAQ")+"",a,s,i=l[3]("Can't find the answer to your question?")+"",f,d,h,c,v,g,p=l[3]("Contact Us")+"",m,b,k,w,C,A,P=Ot(l[2]),x=[];for(let B=0;B<P.length;B+=1)x[B]=yr(_r(l,P,B));const V=B=>ue(x[B],1,1,()=>{x[B]=null});return{c(){t=S("div"),u=S("div"),o=S("div"),r=S("div"),n=new da(!1),a=N(),s=S("div"),f=J(i),d=N(),h=S("br"),c=N(),v=S("button"),g=new da(!1),m=N(),b=S("div");for(let B=0;B<x.length;B+=1)x[B].c();this.h()},l(B){t=D(B,"DIV",{class:!0});var R=I(t);u=D(R,"DIV",{class:!0});var T=I(u);o=D(T,"DIV",{class:!0});var H=I(o);r=D(H,"DIV",{class:!0});var W=I(r);n=ca(W,!1),W.forEach(M),a=z(H),s=D(H,"DIV",{class:!0});var Y=I(s);f=Q(Y,i),d=z(Y),h=D(Y,"BR",{}),c=z(Y),v=D(Y,"BUTTON",{role:!0,tabindex:!0,class:!0});var E=I(v);g=ca(E,!1),E.forEach(M),Y.forEach(M),H.forEach(M),m=z(T),b=D(T,"DIV",{class:!0});var q=I(b);for(let O=0;O<x.length;O+=1)x[O].l(q);q.forEach(M),T.forEach(M),R.forEach(M),this.h()},h(){n.a=null,y(r,"class","block-faq__title svelte-dk61fu"),g.a=null,y(v,"role","button"),y(v,"tabindex","0"),y(v,"class","svelte-dk61fu"),y(s,"class","block-faq__subtitle svelte-dk61fu"),y(o,"class","block-faq__text svelte-dk61fu"),y(b,"class","block-faq__list svelte-dk61fu"),y(u,"class","block-faq__wrapper svelte-dk61fu"),y(t,"class",k="block-faq "+l[0]+" "+(l[1]?"large":"")+" svelte-dk61fu")},m(B,R){pe(B,t,R),_(t,u),_(u,o),_(o,r),n.m(e,r),_(o,a),_(o,s),_(s,f),_(s,d),_(s,h),_(s,c),_(s,v),g.m(p,v),_(u,m),_(u,b);for(let T=0;T<x.length;T+=1)x[T]&&x[T].m(b,null);w=!0,C||(A=[$e(v,"click",l[4]),$e(v,"keydown",l[5])],C=!0)},p(B,[R]){if((!w||R&8)&&e!==(e=B[3]("FAQ")+"")&&n.p(e),(!w||R&8)&&i!==(i=B[3]("Can't find the answer to your question?")+"")&&te(f,i),(!w||R&8)&&p!==(p=B[3]("Contact Us")+"")&&g.p(p),R&6){P=Ot(B[2]);let T;for(T=0;T<P.length;T+=1){const H=_r(B,P,T);x[T]?(x[T].p(H,R),se(x[T],1)):(x[T]=yr(H),x[T].c(),se(x[T],1),x[T].m(b,null))}for(Va(),T=P.length;T<x.length;T+=1)V(T);La()}(!w||R&3&&k!==(k="block-faq "+B[0]+" "+(B[1]?"large":"")+" svelte-dk61fu"))&&y(t,"class",k)},i(B){if(!w){for(let R=0;R<P.length;R+=1)se(x[R]);w=!0}},o(B){x=x.filter(Boolean);for(let R=0;R<x.length;R+=1)ue(x[R]);w=!1},d(B){B&&M(t),Ca(x,B),C=!1,Ea(A)}}}function Gi(l,t,u){let o;Je(l,la,i=>u(3,o=i));let{className:r=""}=t,{large:n=!1}=t,{options:e}=t;const a=()=>ya.set(!0),s=i=>{i.key==="Escape"&&ya.set(!1)};return l.$$set=i=>{"className"in i&&u(0,r=i.className),"large"in i&&u(1,n=i.large),"options"in i&&u(2,e=i.options)},[r,n,e,o,a,s]}class Zi extends et{constructor(t){super(),tt(this,t,Gi,Yi,Qe,{className:0,large:1,options:2})}}function Ki(l){let t,u,o,r,n,e,a,s,i,f,d,h,c;return t=new Rr({props:{image:Nr,type:"website",title:l[1]("BPC.Brokerage Profit Calculator – Estimate Your Earnings"),description:l[1]("BPC.Plan smarter with our Brokerage Profit Calculator. Get a clear picture of your earnings potential in just a few clicks."),createjs:!0,schemaScript:l[3]}}),o=new jr({}),e=new Oi({}),s=new Kr({}),f=new ln({props:{data:l[0]}}),h=new Zi({props:{options:l[2]}}),{c(){he(t.$$.fragment),u=N(),he(o.$$.fragment),r=N(),n=S("section"),he(e.$$.fragment),a=N(),he(s.$$.fragment),i=N(),he(f.$$.fragment),d=N(),he(h.$$.fragment),this.h()},l(v){ve(t.$$.fragment,v),u=z(v),ve(o.$$.fragment,v),r=z(v),n=D(v,"SECTION",{class:!0});var g=I(n);ve(e.$$.fragment,g),a=z(g),ve(s.$$.fragment,g),i=z(g),ve(f.$$.fragment,g),d=z(g),ve(h.$$.fragment,g),g.forEach(M),this.h()},h(){y(n,"class","layout svelte-if7udy")},m(v,g){ge(t,v,g),pe(v,u,g),ge(o,v,g),pe(v,r,g),pe(v,n,g),ge(e,n,null),_(n,a),ge(s,n,null),_(n,i),ge(f,n,null),_(n,d),ge(h,n,null),c=!0},p(v,[g]){const p={};g&2&&(p.title=v[1]("BPC.Brokerage Profit Calculator – Estimate Your Earnings")),g&2&&(p.description=v[1]("BPC.Plan smarter with our Brokerage Profit Calculator. Get a clear picture of your earnings potential in just a few clicks.")),t.$set(p);const m={};g&1&&(m.data=v[0]),f.$set(m)},i(v){c||(se(t.$$.fragment,v),se(o.$$.fragment,v),se(e.$$.fragment,v),se(s.$$.fragment,v),se(f.$$.fragment,v),se(h.$$.fragment,v),c=!0)},o(v){ue(t.$$.fragment,v),ue(o.$$.fragment,v),ue(e.$$.fragment,v),ue(s.$$.fragment,v),ue(f.$$.fragment,v),ue(h.$$.fragment,v),c=!1},d(v){v&&(M(u),M(r),M(n)),me(t,v),me(o,v),me(e),me(s),me(f),me(h)}}}function Xi(l,t,u){let o;Je(l,la,s=>u(1,o=s));let{data:r}=t;const n=[{title:o("BPC.How is my profit calculated?"),text:`<p>${o("BPC.Your profit is estimated using the formula: Traders = 15% × Registrations Profit = Traders × $35 This means we assume about 15% of your registrations will convert into active traders, and each trader generates an average profit of $35.")}</p>`},{title:o("BPC.How much does white label brokerage cost?"),text:`<p>${o("BPC.The cost of a white label brokerage ranges from around $25,000 to $50,000, depending on the technical specifications you need. Prices vary based on customization level, model, liquidity, back office, payment gates and other specific platform features.")}</p>`},{title:o("BPC.I don't have trading expertise can I still open broker?"),text:`<p>${o("BPC.The most important thing is to be a businessman, not a trader. We provide our expert consultation and support at every stage of operating your own brokerage business. Focus on being an entrepreneur. We take care of everything else.")}</p>`},{title:o("BPC.Do I need a broker license?"),text:`<p>${o("BPC.You need to comply with the regulatory requirements of the country where you plan to conduct your brokerage business. If the laws of the country require a brokerage business license, you must have that license. If there are no such requirements, then there is no need.")}</p>`},{title:o("BPC.What factors impact my brokerage earnings the most?"),text:`<p>${o("BPC.Your trader base size, activity level, spread settings, and how well you manage operational expenses all play a big role.")}</p>`},{title:o("BPC.Where can I get help understanding my results or planning my brokerage?"),text:`<p>${o("BPC.Contact our team directly — we're happy to walk you through your calculations and business options.")}</p>`}],e=n.map(s=>({question:Za(s.title),answer:Za(s.text)})),a=zr({title:o("BPC.Brokerage Profit Calculator – Estimate Your Earnings"),description:o("BPC.Plan smarter with our Brokerage Profit Calculator. Get a clear picture of your earnings potential in just a few clicks."),faqItems:e});return l.$$set=s=>{"data"in s&&u(0,r=s.data)},[r,o,n,a]}class so extends et{constructor(t){super(),tt(this,t,Xi,Ki,Qe,{data:0})}}export{so as component};